0004a91c <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 ) {
4a91c: 7007 moveq #7,%d0
#define MAXSYMLINK 5
int IMFS_Set_handlers(
rtems_filesystem_location_info_t *loc
)
{
4a91e: 4e56 0000 linkw %fp,#0 4a922: 206e 0008 moveal %fp@(8),%a0 4a926: 2f0a movel %a2,%sp@-
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
4a928: 2468 0010 moveal %a0@(16),%a2
switch( node->type ) {
4a92c: 2250 moveal %a0@,%a1
)
{
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
4a92e: 246a 0034 moveal %a2@(52),%a2
switch( node->type ) {
4a932: b0a9 0048 cmpl %a1@(72),%d0
4a936: 6526 bcss 4a95e <IMFS_Set_handlers+0x42> <== NEVER TAKEN
4a938: 2029 0048 movel %a1@(72),%d0 4a93c: d080 addl %d0,%d0 4a93e: 303b 0808 movew %pc@(4a948 <IMFS_Set_handlers+0x2c>,%d0:l),%d0 4a942: 48c0 extl %d0 4a944: 4efb 0802 jmp %pc@(4a948 <IMFS_Set_handlers+0x2c>,%d0:l)
4a948: 0016 .short 0x0016 <== NOT EXECUTED 4a94a: 0010 .short 0x0010 <== NOT EXECUTED 4a94c: 004c .short 0x004c <== NOT EXECUTED 4a94e: 002c .short 0x002c <== NOT EXECUTED 4a950: 002c .short 0x002c <== NOT EXECUTED 4a952: 001e .short 0x001e <== NOT EXECUTED 4a954: 001e .short 0x001e <== NOT EXECUTED 4a956: 003e .short 0x003e <== NOT EXECUTED
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
4a958: 216a 000c 0008 movel %a2@(12),%a0@(8)
loc->handlers = fs_info->fifo_handlers;
break;
}
return 0;
}
4a95e: 245f moveal %sp@+,%a2 4a960: 4280 clrl %d0 4a962: 4e5e unlk %fp 4a964: 4e75 rts 4a966: 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;
4a968: 216a 0008 0008 movel %a2@(8),%a0@(8)
loc->handlers = fs_info->fifo_handlers;
break;
}
return 0;
}
4a96e: 245f moveal %sp@+,%a2 4a970: 4e5e unlk %fp 4a972: 4e75 rts 4a974: 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;
4a976: 203c 0005 ea52 movel #387666,%d0
loc->handlers = fs_info->fifo_handlers;
break;
}
return 0;
}
4a97c: 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;
4a97e: 2140 0008 movel %d0,%a0@(8)
loc->handlers = fs_info->fifo_handlers;
break;
}
return 0;
}
4a982: 4280 clrl %d0 4a984: 4e75 rts 4a986: 4280 clrl %d0
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_FIFO:
loc->handlers = fs_info->fifo_handlers;
4a988: 216a 0010 0008 movel %a2@(16),%a0@(8)
break;
}
return 0;
}
4a98e: 245f moveal %sp@+,%a2 4a990: 4e5e unlk %fp 4a992: 4e75 rts 4a994: 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;
4a996: 203c 0005 e9e2 movel #387554,%d0
loc->handlers = fs_info->fifo_handlers;
break;
}
return 0;
}
4a99c: 4e5e unlk %fp
switch( node->type ) {
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
break;
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
4a99e: 2140 0008 movel %d0,%a0@(8)
loc->handlers = fs_info->fifo_handlers;
break;
}
return 0;
}
4a9a2: 4280 clrl %d0 <== NOT EXECUTED
0004b478 <IMFS_check_node_remove>:
void IMFS_check_node_remove( IMFS_jnode_t *jnode )
{
4b478: 4e56 0000 linkw %fp,#0 4b47c: 2f0a movel %a2,%sp@- 4b47e: 246e 0008 moveal %fp@(8),%a2
if ( !rtems_libio_is_file_open( jnode ) && jnode->st_nlink < 1 ) {
4b482: 2f0a movel %a2,%sp@- 4b484: 4eb9 0004 bc08 jsr 4bc08 <rtems_libio_is_file_open> 4b48a: 588f addql #4,%sp 4b48c: 4a80 tstl %d0
4b48e: 6634 bnes 4b4c4 <IMFS_check_node_remove+0x4c>
4b490: 4a6a 0032 tstw %a2@(50)
4b494: 662e bnes 4b4c4 <IMFS_check_node_remove+0x4c>
if ( rtems_filesystem_current.node_access == jnode )
4b496: 2079 0005 f8d0 moveal 5f8d0 <rtems_current_user_env>,%a0 4b49c: b5e8 0004 cmpal %a0@(4),%a2
4b4a0: 6744 beqs 4b4e6 <IMFS_check_node_remove+0x6e>
rtems_filesystem_current.node_access = NULL;
switch ( jnode->type ) {
4b4a2: 202a 0048 movel %a2@(72),%d0 4b4a6: 7204 moveq #4,%d1 4b4a8: b280 cmpl %d0,%d1
4b4aa: 6748 beqs 4b4f4 <IMFS_check_node_remove+0x7c>
4b4ac: 123c 0005 moveb #5,%d1 4b4b0: b280 cmpl %d0,%d1
4b4b2: 6718 beqs 4b4cc <IMFS_check_node_remove+0x54>
break;
default:
break;
}
free( jnode );
4b4b4: 2d4a 0008 movel %a2,%fp@(8)
} }
4b4b8: 246e fffc moveal %fp@(-4),%a2 4b4bc: 4e5e unlk %fp
break;
default:
break;
}
free( jnode );
4b4be: 4ef9 0004 32dc jmp 432dc <free>
} }
4b4c4: 246e fffc moveal %fp@(-4),%a2 4b4c8: 4e5e unlk %fp 4b4ca: 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 );
4b4cc: 2f0a movel %a2,%sp@- 4b4ce: 4eb9 0004 d9fc jsr 4d9fc <IMFS_memfile_remove>
break;
4b4d4: 588f addql #4,%sp
break;
default:
break;
}
free( jnode );
4b4d6: 2d4a 0008 movel %a2,%fp@(8)
} }
4b4da: 246e fffc moveal %fp@(-4),%a2 4b4de: 4e5e unlk %fp
break;
default:
break;
}
free( jnode );
4b4e0: 4ef9 0004 32dc jmp 432dc <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 ) {
4b4e6: 202a 0048 movel %a2@(72),%d0 4b4ea: 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;
4b4ec: 42a8 0004 clrl %a0@(4)
switch ( jnode->type ) {
4b4f0: b280 cmpl %d0,%d1
4b4f2: 66b8 bnes 4b4ac <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 );
4b4f4: 2f2a 004c movel %a2@(76),%sp@- 4b4f8: 4eb9 0004 32dc jsr 432dc <free>
break;
4b4fe: 588f addql #4,%sp
default:
break;
}
free( jnode );
4b500: 2d4a 0008 movel %a2,%fp@(8)
} }
4b504: 246e fffc moveal %fp@(-4),%a2 4b508: 4e5e unlk %fp
break;
default:
break;
}
free( jnode );
4b50a: 4ef9 0004 32dc jmp 432dc <free>
0004a5a4 <IMFS_chown>:
int IMFS_chown(
rtems_filesystem_location_info_t *pathloc, /* IN */
uid_t owner, /* IN */
gid_t group /* IN */
)
{
4a5a4: 4e56 ffe8 linkw %fp,#-24 4a5a8: 206e 0008 moveal %fp@(8),%a0 4a5ac: 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;
4a5b0: 2450 moveal %a0@,%a2
*/
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
4a5b2: 4284 clrl %d4
int IMFS_chown(
rtems_filesystem_location_info_t *pathloc, /* IN */
uid_t owner, /* IN */
gid_t group /* IN */
)
{
4a5b4: 362e 000e movew %fp@(14),%d3 4a5b8: 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();
4a5bc: 4eb9 0004 b994 jsr 4b994 <geteuid>
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
4a5c2: 4281 clrl %d1 4a5c4: 382a 0038 movew %a2@(56),%d4 4a5c8: 3200 movew %d0,%d1 4a5ca: b284 cmpl %d4,%d1
4a5cc: 6704 beqs 4a5d2 <IMFS_chown+0x2e>
4a5ce: 4a40 tstw %d0
4a5d0: 6628 bnes 4a5fa <IMFS_chown+0x56> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EPERM );
#endif
jnode->st_uid = owner;
4a5d2: 3543 0038 movew %d3,%a2@(56)
jnode->st_gid = group;
4a5d6: 3542 003a movew %d2,%a2@(58)
IMFS_update_ctime( jnode );
4a5da: 42a7 clrl %sp@- 4a5dc: 486e fff8 pea %fp@(-8) 4a5e0: 4eb9 0004 336c jsr 4336c <gettimeofday> 4a5e6: 256e fff8 0044 movel %fp@(-8),%a2@(68)
return 0;
4a5ec: 508f addql #8,%sp 4a5ee: 4280 clrl %d0
}
4a5f0: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 4a5f6: 4e5e unlk %fp 4a5f8: 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 );
4a5fa: 4eb9 0004 f098 jsr 4f098 <__errno> 4a600: 7201 moveq #1,%d1 4a602: 2040 moveal %d0,%a0 4a604: 70ff moveq #-1,%d0
jnode->st_gid = group;
IMFS_update_ctime( jnode );
return 0;
}
4a606: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2
#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 );
4a60c: 2081 movel %d1,%a0@
jnode->st_gid = group;
IMFS_update_ctime( jnode );
return 0;
}
4a60e: 4e5e unlk %fp
...
0004a692 <IMFS_create_node>:
IMFS_jnode_types_t type,
const char *name,
mode_t mode,
const IMFS_types_union *info
)
{
4a692: 4e56 ffec linkw %fp,#-20 4a696: 206e 0008 moveal %fp@(8),%a0 4a69a: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 4a69e: 242e 000c movel %fp@(12),%d2 4a6a2: 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 )
4a6a6: 4a88 tstl %a0 4a6a8: 6700 00aa beqw 4a754 <IMFS_create_node+0xc2>
return NULL;
parent = parent_loc->node_access;
fs_info = parent_loc->mt_entry->fs_info;
4a6ac: 2268 0010 moveal %a0@(16),%a1
/*
* Reject creation of FIFOs if support is disabled.
*/
if ( type == IMFS_FIFO &&
4a6b0: 7007 moveq #7,%d0
* MUST have a parent node to call this routine.
*/
if ( parent_loc == NULL )
return NULL;
parent = parent_loc->node_access;
4a6b2: 2650 moveal %a0@,%a3
fs_info = parent_loc->mt_entry->fs_info;
4a6b4: 2469 0034 moveal %a1@(52),%a2
/*
* Reject creation of FIFOs if support is disabled.
*/
if ( type == IMFS_FIFO &&
4a6b8: b082 cmpl %d2,%d0 4a6ba: 6700 008a beqw 4a746 <IMFS_create_node+0xb4>
return NULL;
/*
* Allocate filesystem node and fill in basic information
*/
node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask );
4a6be: 2079 0005 f8d0 moveal 5f8d0 <rtems_current_user_env>,%a0 4a6c4: 2028 002c movel %a0@(44),%d0 4a6c8: 4680 notl %d0 4a6ca: c0ae 0014 andl %fp@(20),%d0 4a6ce: 2f00 movel %d0,%sp@- 4a6d0: 2f2e 0010 movel %fp@(16),%sp@- 4a6d4: 2f02 movel %d2,%sp@- 4a6d6: 4eb9 0004 a614 jsr 4a614 <IMFS_allocate_node>
if ( !node )
4a6dc: 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 );
4a6e0: 2a40 moveal %d0,%a5
if ( !node )
4a6e2: 4a80 tstl %d0
4a6e4: 6754 beqs 4a73a <IMFS_create_node+0xa8>
return NULL;
/*
* Set the type specific information
*/
if ( type == IMFS_DIRECTORY ) {
4a6e6: 7001 moveq #1,%d0 4a6e8: b082 cmpl %d2,%d0 4a6ea: 6700 009c beqw 4a788 <IMFS_create_node+0xf6>
rtems_chain_initialize_empty(&node->info.directory.Entries);
} else if ( type == IMFS_HARD_LINK ) {
4a6ee: 7003 moveq #3,%d0 4a6f0: b082 cmpl %d2,%d0
4a6f2: 676e beqs 4a762 <IMFS_create_node+0xd0>
node->info.hard_link.link_node = info->hard_link.link_node;
} else if ( type == IMFS_SYM_LINK ) {
4a6f4: 7204 moveq #4,%d1 4a6f6: b282 cmpl %d2,%d1
4a6f8: 6768 beqs 4a762 <IMFS_create_node+0xd0>
node->info.sym_link.name = info->sym_link.name;
} else if ( type == IMFS_DEVICE ) {
4a6fa: 7002 moveq #2,%d0 4a6fc: b082 cmpl %d2,%d0 4a6fe: 6700 00f4 beqw 4a7f4 <IMFS_create_node+0x162>
node->info.device.major = info->device.major;
node->info.device.minor = info->device.minor;
} else if ( type == IMFS_LINEAR_FILE ) {
4a702: 7206 moveq #6,%d1 4a704: b282 cmpl %d2,%d1 4a706: 6700 00b8 beqw 4a7c0 <IMFS_create_node+0x12e>
node->info.linearfile.size = 0;
node->info.linearfile.direct = 0;
} else if ( type == IMFS_MEMORY_FILE ) {
4a70a: 7205 moveq #5,%d1 4a70c: b282 cmpl %d2,%d1 4a70e: 6700 0112 beqw 4a822 <IMFS_create_node+0x190>
node->info.file.size = 0;
node->info.file.indirect = 0;
node->info.file.doubly_indirect = 0;
node->info.file.triply_indirect = 0;
} else if ( type == IMFS_FIFO ) {
4a712: 7207 moveq #7,%d1 4a714: b282 cmpl %d2,%d1 4a716: 6700 0146 beqw 4a85e <IMFS_create_node+0x1cc>
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
4a71a: 202a 0004 movel %a2@(4),%d0 <== NOT EXECUTED 4a71e: 5280 addql #1,%d0 <== NOT EXECUTED
}
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
4a720: 2b4b 0008 movel %a3,%a5@(8) <== NOT EXECUTED
node->st_ino = ++fs_info->ino_count;
4a724: 2540 0004 movel %d0,%a2@(4) <== NOT EXECUTED 4a728: 2b40 0034 movel %d0,%a5@(52) <== NOT EXECUTED 4a72c: 2f0d movel %a5,%sp@- <== NOT EXECUTED 4a72e: 486b 004c pea %a3@(76) <== NOT EXECUTED 4a732: 4eb9 0004 7574 jsr 47574 <_Chain_Append> <== NOT EXECUTED
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
4a738: 508f addql #8,%sp <== NOT EXECUTED
}
4a73a: 200d movel %a5,%d0 4a73c: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4a742: 4e5e unlk %fp 4a744: 4e75 rts
fs_info = parent_loc->mt_entry->fs_info;
/*
* Reject creation of FIFOs if support is disabled.
*/
if ( type == IMFS_FIFO &&
4a746: 223c 0005 e972 movel #387442,%d1 4a74c: b2aa 0010 cmpl %a2@(16),%d1 4a750: 6600 ff6c bnew 4a6be <IMFS_create_node+0x2c>
fs_info->fifo_handlers == &rtems_filesystem_handlers_default )
return NULL;
4a754: 9bcd subal %a5,%a5
node->st_ino = ++fs_info->ino_count;
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
}
4a756: 200d movel %a5,%d0 4a758: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4a75e: 4e5e unlk %fp 4a760: 4e75 rts
if ( type == IMFS_DIRECTORY ) {
rtems_chain_initialize_empty(&node->info.directory.Entries);
} else if ( type == IMFS_HARD_LINK ) {
node->info.hard_link.link_node = info->hard_link.link_node;
} else if ( type == IMFS_SYM_LINK ) {
node->info.sym_link.name = info->sym_link.name;
4a762: 2b54 004c movel %a4@,%a5@(76)
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
4a766: 202a 0004 movel %a2@(4),%d0 4a76a: 5280 addql #1,%d0
}
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
4a76c: 2b4b 0008 movel %a3,%a5@(8)
node->st_ino = ++fs_info->ino_count;
4a770: 2540 0004 movel %d0,%a2@(4) 4a774: 2b40 0034 movel %d0,%a5@(52) 4a778: 2f0d movel %a5,%sp@- 4a77a: 486b 004c pea %a3@(76) 4a77e: 4eb9 0004 7574 jsr 47574 <_Chain_Append>
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
4a784: 508f addql #8,%sp 4a786: 60b2 bras 4a73a <IMFS_create_node+0xa8>
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
4a788: 41ed 0050 lea %a5@(80),%a0 4a78c: 2b48 004c movel %a0,%a5@(76)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
4a790: 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;
4a794: 202a 0004 movel %a2@(4),%d0 4a798: 5280 addql #1,%d0
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
4a79a: 42ad 0050 clrl %a5@(80)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
4a79e: 2b48 0054 movel %a0,%a5@(84)
}
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
4a7a2: 2b4b 0008 movel %a3,%a5@(8)
node->st_ino = ++fs_info->ino_count;
4a7a6: 2540 0004 movel %d0,%a2@(4) 4a7aa: 2b40 0034 movel %d0,%a5@(52) 4a7ae: 2f0d movel %a5,%sp@- 4a7b0: 486b 004c pea %a3@(76) 4a7b4: 4eb9 0004 7574 jsr 47574 <_Chain_Append>
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
4a7ba: 508f addql #8,%sp 4a7bc: 6000 ff7c braw 4a73a <IMFS_create_node+0xa8>
} else if ( type == IMFS_DEVICE ) {
node->info.device.major = info->device.major;
node->info.device.minor = info->device.minor;
} else if ( type == IMFS_LINEAR_FILE ) {
node->info.linearfile.size = 0;
node->info.linearfile.direct = 0;
4a7c0: 42ad 0054 clrl %a5@(84)
node->info.sym_link.name = info->sym_link.name;
} else if ( type == IMFS_DEVICE ) {
node->info.device.major = info->device.major;
node->info.device.minor = info->device.minor;
} else if ( type == IMFS_LINEAR_FILE ) {
node->info.linearfile.size = 0;
4a7c4: 4280 clrl %d0 4a7c6: 4281 clrl %d1
}
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
4a7c8: 2b4b 0008 movel %a3,%a5@(8)
node->info.sym_link.name = info->sym_link.name;
} else if ( type == IMFS_DEVICE ) {
node->info.device.major = info->device.major;
node->info.device.minor = info->device.minor;
} else if ( type == IMFS_LINEAR_FILE ) {
node->info.linearfile.size = 0;
4a7cc: 2b40 004c movel %d0,%a5@(76) 4a7d0: 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;
4a7d4: 202a 0004 movel %a2@(4),%d0 4a7d8: 5280 addql #1,%d0 4a7da: 2540 0004 movel %d0,%a2@(4) 4a7de: 2b40 0034 movel %d0,%a5@(52) 4a7e2: 2f0d movel %a5,%sp@- 4a7e4: 486b 004c pea %a3@(76) 4a7e8: 4eb9 0004 7574 jsr 47574 <_Chain_Append>
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
4a7ee: 508f addql #8,%sp 4a7f0: 6000 ff48 braw 4a73a <IMFS_create_node+0xa8>
} else if ( type == IMFS_HARD_LINK ) {
node->info.hard_link.link_node = info->hard_link.link_node;
} else if ( type == IMFS_SYM_LINK ) {
node->info.sym_link.name = info->sym_link.name;
} else if ( type == IMFS_DEVICE ) {
node->info.device.major = info->device.major;
4a7f4: 2b54 004c movel %a4@,%a5@(76)
node->info.device.minor = info->device.minor;
4a7f8: 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;
4a7fe: 202a 0004 movel %a2@(4),%d0 4a802: 5280 addql #1,%d0
}
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
4a804: 2b4b 0008 movel %a3,%a5@(8)
node->st_ino = ++fs_info->ino_count;
4a808: 2540 0004 movel %d0,%a2@(4) 4a80c: 2b40 0034 movel %d0,%a5@(52) 4a810: 2f0d movel %a5,%sp@- 4a812: 486b 004c pea %a3@(76) 4a816: 4eb9 0004 7574 jsr 47574 <_Chain_Append>
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
4a81c: 508f addql #8,%sp 4a81e: 6000 ff1a braw 4a73a <IMFS_create_node+0xa8>
} else if ( type == IMFS_LINEAR_FILE ) {
node->info.linearfile.size = 0;
node->info.linearfile.direct = 0;
} else if ( type == IMFS_MEMORY_FILE ) {
node->info.file.size = 0;
node->info.file.indirect = 0;
4a822: 42ad 0054 clrl %a5@(84)
node->info.device.minor = info->device.minor;
} else if ( type == IMFS_LINEAR_FILE ) {
node->info.linearfile.size = 0;
node->info.linearfile.direct = 0;
} else if ( type == IMFS_MEMORY_FILE ) {
node->info.file.size = 0;
4a826: 4280 clrl %d0 4a828: 4281 clrl %d1
node->info.file.indirect = 0;
node->info.file.doubly_indirect = 0;
4a82a: 42ad 0058 clrl %a5@(88)
node->info.device.minor = info->device.minor;
} else if ( type == IMFS_LINEAR_FILE ) {
node->info.linearfile.size = 0;
node->info.linearfile.direct = 0;
} else if ( type == IMFS_MEMORY_FILE ) {
node->info.file.size = 0;
4a82e: 2b40 004c movel %d0,%a5@(76) 4a832: 2b41 0050 movel %d1,%a5@(80)
node->info.file.indirect = 0;
node->info.file.doubly_indirect = 0;
node->info.file.triply_indirect = 0;
4a836: 42ad 005c clrl %a5@(92)
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
4a83a: 202a 0004 movel %a2@(4),%d0 4a83e: 5280 addql #1,%d0
}
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
4a840: 2b4b 0008 movel %a3,%a5@(8)
node->st_ino = ++fs_info->ino_count;
4a844: 2540 0004 movel %d0,%a2@(4) 4a848: 2b40 0034 movel %d0,%a5@(52) 4a84c: 2f0d movel %a5,%sp@- 4a84e: 486b 004c pea %a3@(76) 4a852: 4eb9 0004 7574 jsr 47574 <_Chain_Append>
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
4a858: 508f addql #8,%sp 4a85a: 6000 fede braw 4a73a <IMFS_create_node+0xa8>
node->info.file.size = 0;
node->info.file.indirect = 0;
node->info.file.doubly_indirect = 0;
node->info.file.triply_indirect = 0;
} else if ( type == IMFS_FIFO ) {
node->info.fifo.pipe = NULL;
4a85e: 42ad 004c clrl %a5@(76)
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
4a862: 202a 0004 movel %a2@(4),%d0
}
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
4a866: 2b4b 0008 movel %a3,%a5@(8)
node->st_ino = ++fs_info->ino_count;
4a86a: 5280 addql #1,%d0 4a86c: 2540 0004 movel %d0,%a2@(4) 4a870: 2b40 0034 movel %d0,%a5@(52) 4a874: 2f0d movel %a5,%sp@- 4a876: 486b 004c pea %a3@(76) 4a87a: 4eb9 0004 7574 jsr 47574 <_Chain_Append>
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
4a880: 508f addql #8,%sp 4a882: 6000 feb6 braw 4a73a <IMFS_create_node+0xa8>
0004536c <IMFS_dump_directory>:
*/
void IMFS_dump_directory(
IMFS_jnode_t *the_directory,
int level
)
{
4536c: 4e56 ffe0 linkw %fp,#-32 45370: 206e 0008 moveal %fp@(8),%a0 45374: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Tail(the_chain));
45378: 2808 movel %a0,%d4 4537a: 49f9 0004 51e0 lea 451e0 <IMFS_print_jnode>,%a4 45380: 0684 0000 0050 addil #80,%d4 45386: 262e 000c movel %fp@(12),%d3
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
4538a: 2668 004c moveal %a0@(76),%a3
IMFS_assert( level >= 0 );
IMFS_assert( the_directory->type == IMFS_DIRECTORY );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
4538e: b88b cmpl %a3,%d4
45390: 674e beqs 453e0 <IMFS_dump_directory+0x74>
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 );
45392: 2a03 movel %d3,%d5 45394: 45f9 0005 45ac lea 545ac <fwrite>,%a2 4539a: 5285 addql #1,%d5 4539c: 4bf9 0004 536c lea 4536c <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++ )
453a2: 4a83 tstl %d3
453a4: 6d26 blts 453cc <IMFS_dump_directory+0x60> <== NEVER TAKEN
453a6: 4282 clrl %d2
fprintf(stdout, "...." );
453a8: 2079 0006 5bd8 moveal 65bd8 <_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++ )
453ae: 5282 addql #1,%d2
fprintf(stdout, "...." );
453b0: 2f28 0008 movel %a0@(8),%sp@- 453b4: 4878 0004 pea 4 <CONTEXT_ARG> 453b8: 4878 0001 pea 1 <ADD> 453bc: 4879 0006 4288 pea 64288 <map.6435+0x74> 453c2: 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++ )
453c4: 4fef 0010 lea %sp@(16),%sp 453c8: b483 cmpl %d3,%d2
453ca: 6fdc bles 453a8 <IMFS_dump_directory+0x3c>
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
453cc: 2f0b movel %a3,%sp@- 453ce: 4e94 jsr %a4@
if ( the_jnode->type == IMFS_DIRECTORY )
453d0: 588f addql #4,%sp 453d2: 7001 moveq #1,%d0 453d4: b0ab 0048 cmpl %a3@(72),%d0
453d8: 6710 beqs 453ea <IMFS_dump_directory+0x7e>
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
453da: 2653 moveal %a3@,%a3
IMFS_assert( level >= 0 );
IMFS_assert( the_directory->type == IMFS_DIRECTORY );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
453dc: b88b cmpl %a3,%d4
453de: 66c2 bnes 453a2 <IMFS_dump_directory+0x36>
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
if ( the_jnode->type == IMFS_DIRECTORY )
IMFS_dump_directory( the_jnode, level + 1 );
}
}
453e0: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 453e6: 4e5e unlk %fp 453e8: 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 );
453ea: 2f05 movel %d5,%sp@- 453ec: 2f0b movel %a3,%sp@- 453ee: 4e95 jsr %a5@
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
453f0: 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 );
453f2: 508f addql #8,%sp
IMFS_assert( level >= 0 );
IMFS_assert( the_directory->type == IMFS_DIRECTORY );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
453f4: b88b cmpl %a3,%d4
453f6: 66aa bnes 453a2 <IMFS_dump_directory+0x36>
453f8: 60e6 bras 453e0 <IMFS_dump_directory+0x74>
0004aa8c <IMFS_eval_path>:
IMFS_token_types type = IMFS_CURRENT_DIR;
char token[ IMFS_NAME_MAX + 1 ];
IMFS_jnode_t *node;
int result;
if ( !rtems_libio_is_valid_perms( flags ) ) {
4aa8c: 70f8 moveq #-8,%d0
const char *pathname, /* IN */
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
4aa8e: 4e56 ffac linkw %fp,#-84 4aa92: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4aa96: 2a2e 0010 movel %fp@(16),%d5
IMFS_token_types type = IMFS_CURRENT_DIR;
char token[ IMFS_NAME_MAX + 1 ];
IMFS_jnode_t *node;
int result;
if ( !rtems_libio_is_valid_perms( flags ) ) {
4aa9a: c085 andl %d5,%d0
const char *pathname, /* IN */
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
4aa9c: 286e 0008 moveal %fp@(8),%a4 4aaa0: 246e 0014 moveal %fp@(20),%a2
int i = 0;
4aaa4: 42ae fff8 clrl %fp@(-8)
IMFS_token_types type = IMFS_CURRENT_DIR;
char token[ IMFS_NAME_MAX + 1 ];
IMFS_jnode_t *node;
int result;
if ( !rtems_libio_is_valid_perms( flags ) ) {
4aaa8: 4a80 tstl %d0 4aaaa: 6600 0280 bnew 4ad2c <IMFS_eval_path+0x2a0> 4aaae: 280e movel %fp,%d4 4aab0: 260e movel %fp,%d3
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
4aab2: 4280 clrl %d0 4aab4: 5984 subql #4,%d4 4aab6: 0683 ffff ffd7 addil #-41,%d3 4aabc: 4bf9 0004 b354 lea 4b354 <IMFS_get_token>,%a5
/*
* 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 ) )
4aac2: 2e3c 0004 a9a6 movel #305574,%d7
rtems_set_errno_and_return_minus_one( ENOTDIR );
/*
* Find the token name in the current node.
*/
node = IMFS_find_match_in_dir( node, token );
4aac8: 2c3c 0004 b2cc movel #307916,%d6
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
4aace: 2652 moveal %a2@,%a3
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
4aad0: 2f04 movel %d4,%sp@- 4aad2: 2f03 movel %d3,%sp@- 4aad4: 2f2e 000c movel %fp@(12),%sp@- 4aad8: 4874 0800 pea %a4@(00000000,%d0:l) 4aadc: 4e95 jsr %a5@
pathnamelen -= len;
i += len;
if ( !pathloc->node_access )
4aade: 2052 moveal %a2@,%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 );
4aae0: 2400 movel %d0,%d2
pathnamelen -= len;
i += len;
if ( !pathloc->node_access )
4aae2: 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;
4aae6: 202e fffc movel %fp@(-4),%d0 4aaea: 91ae 000c subl %d0,%fp@(12)
i += len;
4aaee: d1ae fff8 addl %d0,%fp@(-8)
if ( !pathloc->node_access )
4aaf2: 4a88 tstl %a0 4aaf4: 6700 00f2 beqw 4abe8 <IMFS_eval_path+0x15c>
rtems_set_errno_and_return_minus_one( ENOENT );
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
4aaf8: 4a82 tstl %d2
4aafa: 665c bnes 4ab58 <IMFS_eval_path+0xcc>
* 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 ) {
4aafc: 7201 moveq #1,%d1 4aafe: b2a8 0048 cmpl %a0@(72),%d1 4ab02: 6600 019c bnew 4aca0 <IMFS_eval_path+0x214>
if ( node->info.directory.mt_fs != NULL ) {
4ab06: 2268 0058 moveal %a0@(88),%a1 4ab0a: 4a89 tstl %a1 4ab0c: 6700 0192 beqw 4aca0 <IMFS_eval_path+0x214>
*pathloc = node->info.directory.mt_fs->mt_fs_root;
4ab10: 204a moveal %a2,%a0 <== NOT EXECUTED 4ab12: 20e9 001c movel %a1@(28),%a0@+ <== NOT EXECUTED 4ab16: 20e9 0020 movel %a1@(32),%a0@+ <== NOT EXECUTED 4ab1a: 20e9 0024 movel %a1@(36),%a0@+ <== NOT EXECUTED 4ab1e: 20e9 0028 movel %a1@(40),%a0@+ <== NOT EXECUTED 4ab22: 20a9 002c movel %a1@(44),%a0@ <== NOT EXECUTED
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
4ab26: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED 4ab2a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4ab2c: 222e fff8 movel %fp@(-8),%d1 <== NOT EXECUTED 4ab30: 9280 subl %d0,%d1 <== NOT EXECUTED 4ab32: d0ae 000c addl %fp@(12),%d0 <== NOT EXECUTED 4ab36: 206a 000c moveal %a2@(12),%a0 <== NOT EXECUTED 4ab3a: 2f05 movel %d5,%sp@- <== NOT EXECUTED 4ab3c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4ab3e: 4874 1800 pea %a4@(00000000,%d1:l) <== NOT EXECUTED 4ab42: 2050 moveal %a0@,%a0 <== NOT EXECUTED 4ab44: 4e90 jsr %a0@ <== NOT EXECUTED 4ab46: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4ab4a: 2400 movel %d0,%d2 <== NOT EXECUTED
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4ab4c: 2002 movel %d2,%d0 4ab4e: 4cee 3cfc ffac moveml %fp@(-84),%d2-%d7/%a2-%a5 4ab54: 4e5e unlk %fp 4ab56: 4e75 rts
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
4ab58: 7001 moveq #1,%d0 4ab5a: b0ab 0048 cmpl %a3@(72),%d0 4ab5e: 6700 00bc beqw 4ac1c <IMFS_eval_path+0x190>
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
switch( type ) {
4ab62: 7003 moveq #3,%d0 4ab64: b082 cmpl %d2,%d0
4ab66: 6722 beqs 4ab8a <IMFS_eval_path+0xfe>
4ab68: 7204 moveq #4,%d1 4ab6a: b282 cmpl %d2,%d1 4ab6c: 6700 0094 beqw 4ac02 <IMFS_eval_path+0x176> 4ab70: 103c 0002 moveb #2,%d0 4ab74: b082 cmpl %d2,%d0
4ab76: 6750 beqs 4abc8 <IMFS_eval_path+0x13c>
/*
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
4ab78: 7004 moveq #4,%d0 4ab7a: b082 cmpl %d2,%d0 4ab7c: 6700 ff7e beqw 4aafc <IMFS_eval_path+0x70> 4ab80: 202e fff8 movel %fp@(-8),%d0 4ab84: 2648 moveal %a0,%a3 4ab86: 6000 ff48 braw 4aad0 <IMFS_eval_path+0x44>
case IMFS_NAME:
/*
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
4ab8a: 2028 0048 movel %a0@(72),%d0 4ab8e: 7203 moveq #3,%d1 4ab90: b280 cmpl %d0,%d1 4ab92: 6700 0142 beqw 4acd6 <IMFS_eval_path+0x24a>
* It would be a design error if we evaluated the link and
* was broken.
*/
IMFS_assert( node );
} else if ( node->type == IMFS_SYM_LINK ) {
4ab96: 7404 moveq #4,%d2 4ab98: b480 cmpl %d0,%d2 4ab9a: 6700 00e4 beqw 4ac80 <IMFS_eval_path+0x1f4>
}
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
4ab9e: 7201 moveq #1,%d1 4aba0: b280 cmpl %d0,%d1 4aba2: 6600 01a2 bnew 4ad46 <IMFS_eval_path+0x2ba>
rtems_set_errno_and_return_minus_one( ENOTDIR );
/*
* Find the token name in the current node.
*/
node = IMFS_find_match_in_dir( node, token );
4aba6: 2f03 movel %d3,%sp@- 4aba8: 2f08 movel %a0,%sp@- 4abaa: 2046 moveal %d6,%a0 4abac: 4e90 jsr %a0@
if ( !node )
4abae: 508f addql #8,%sp
rtems_set_errno_and_return_minus_one( ENOTDIR );
/*
* Find the token name in the current node.
*/
node = IMFS_find_match_in_dir( node, token );
4abb0: 2640 moveal %d0,%a3
if ( !node )
4abb2: 4a80 tstl %d0
4abb4: 6732 beqs 4abe8 <IMFS_eval_path+0x15c>
* file system and not the IMFS. For example the IMFS length is
* limited. If the token is a parent directory move back up otherwise
* set loc to the new fs root node and let them finish evaluating the
* path.
*/
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
4abb6: 7001 moveq #1,%d0 4abb8: b0ab 0048 cmpl %a3@(72),%d0
4abbc: 6776 beqs 4ac34 <IMFS_eval_path+0x1a8>
}
/*
* Set the node access to the point we have found.
*/
pathloc->node_access = node;
4abbe: 248b movel %a3,%a2@
/*
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
4abc0: 202e fff8 movel %fp@(-8),%d0 4abc4: 6000 ff0a braw 4aad0 <IMFS_eval_path+0x44>
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
4abc8: 2279 0005 f8d0 moveal 5f8d0 <rtems_current_user_env>,%a1 4abce: b1e9 0018 cmpal %a1@(24),%a0
4abd2: 67ac beqs 4ab80 <IMFS_eval_path+0xf4>
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4abd4: 226a 0010 moveal %a2@(16),%a1
/*
* Am I at the root of this mounted filesystem?
*/
if ( rtems_filesystem_is_root_location( pathloc ) ) {
4abd8: b1e9 001c cmpal %a1@(28),%a0 4abdc: 6700 010e beqw 4acec <IMFS_eval_path+0x260>
pathnamelen+len,
flags,pathloc);
}
} else {
if ( !node->Parent )
4abe0: 2668 0008 moveal %a0@(8),%a3 4abe4: 4a8b tstl %a3
4abe6: 66d6 bnes 4abbe <IMFS_eval_path+0x132>
/*
* Find the token name in the current node.
*/
node = IMFS_find_match_in_dir( node, token );
if ( !node )
rtems_set_errno_and_return_minus_one( ENOENT );
4abe8: 4eb9 0004 f098 jsr 4f098 <__errno> 4abee: 74ff moveq #-1,%d2 4abf0: 7a02 moveq #2,%d5 4abf2: 2040 moveal %d0,%a0
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4abf4: 2002 movel %d2,%d0
/*
* Find the token name in the current node.
*/
node = IMFS_find_match_in_dir( node, token );
if ( !node )
rtems_set_errno_and_return_minus_one( ENOENT );
4abf6: 2085 movel %d5,%a0@
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4abf8: 4cee 3cfc ffac moveml %fp@(-84),%d2-%d7/%a2-%a5 4abfe: 4e5e unlk %fp 4ac00: 4e75 rts
case IMFS_NO_MORE_PATH:
case IMFS_CURRENT_DIR:
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
4ac02: 4eb9 0004 f098 jsr 4f098 <__errno> 4ac08: 74ff moveq #-1,%d2 4ac0a: 785b moveq #91,%d4 4ac0c: 2040 moveal %d0,%a0
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4ac0e: 2002 movel %d2,%d0
case IMFS_NO_MORE_PATH:
case IMFS_CURRENT_DIR:
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
4ac10: 2084 movel %d4,%a0@
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4ac12: 4cee 3cfc ffac moveml %fp@(-84),%d2-%d7/%a2-%a5 4ac18: 4e5e unlk %fp 4ac1a: 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 ) )
4ac1c: 4878 0001 pea 1 <ADD> 4ac20: 2047 moveal %d7,%a0 4ac22: 2f0a movel %a2,%sp@- 4ac24: 4e90 jsr %a0@ 4ac26: 508f addql #8,%sp 4ac28: 4a80 tstl %d0 4ac2a: 6700 0090 beqw 4acbc <IMFS_eval_path+0x230> 4ac2e: 2052 moveal %a2@,%a0 4ac30: 6000 ff30 braw 4ab62 <IMFS_eval_path+0xd6>
* file system and not the IMFS. For example the IMFS length is
* limited. If the token is a parent directory move back up otherwise
* set loc to the new fs root node and let them finish evaluating the
* path.
*/
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
4ac34: 4aab 0058 tstl %a3@(88)
4ac38: 6784 beqs 4abbe <IMFS_eval_path+0x132>
IMFS_skip_separator( pathname, &pathnamelen, &i);
4ac3a: 486e fff8 pea %fp@(-8)
if ((pathname[i] != '.') || (pathname[i + 1] != '.')) {
4ac3e: 742e moveq #46,%d2
* limited. If the token is a parent directory move back up otherwise
* set loc to the new fs root node and let them finish evaluating the
* path.
*/
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
IMFS_skip_separator( pathname, &pathnamelen, &i);
4ac40: 486e 000c pea %fp@(12) 4ac44: 2f0c movel %a4,%sp@- 4ac46: 4eba fc78 jsr %pc@(4a8c0 <IMFS_skip_separator>)
if ((pathname[i] != '.') || (pathname[i + 1] != '.')) {
4ac4a: 202e fff8 movel %fp@(-8),%d0 4ac4e: 4fef 000c lea %sp@(12),%sp 4ac52: 41f4 0800 lea %a4@(00000000,%d0:l),%a0 4ac56: 1210 moveb %a0@,%d1 4ac58: 49c1 extbl %d1 4ac5a: b481 cmpl %d1,%d2 4ac5c: 6600 0102 bnew 4ad60 <IMFS_eval_path+0x2d4> 4ac60: 1234 0801 moveb %a4@(00000001,%d0:l),%d1 4ac64: 49c1 extbl %d1 4ac66: b481 cmpl %d1,%d2 4ac68: 6600 00f6 bnew 4ad60 <IMFS_eval_path+0x2d4>
pathnamelen,
flags, pathloc );
}
i += 2;
pathnamelen -= 2;
node = node->Parent;
4ac6c: 266b 0008 moveal %a3@(8),%a3
*pathloc = node->info.directory.mt_fs->mt_fs_root;
return (*pathloc->ops->evalpath_h)( &pathname[i],
pathnamelen,
flags, pathloc );
}
i += 2;
4ac70: 5480 addql #2,%d0
pathnamelen -= 2;
4ac72: 55ae 000c subql #2,%fp@(12)
*pathloc = node->info.directory.mt_fs->mt_fs_root;
return (*pathloc->ops->evalpath_h)( &pathname[i],
pathnamelen,
flags, pathloc );
}
i += 2;
4ac76: 2d40 fff8 movel %d0,%fp@(-8)
}
/*
* Set the node access to the point we have found.
*/
pathloc->node_access = node;
4ac7a: 248b movel %a3,%a2@ 4ac7c: 6000 ff42 braw 4abc0 <IMFS_eval_path+0x134>
* was broken.
*/
IMFS_assert( node );
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
4ac80: 42a7 clrl %sp@- 4ac82: 2f0a movel %a2,%sp@- 4ac84: 4eb9 0004 ada0 jsr 4ada0 <IMFS_evaluate_sym_link>
/*
* In contrast to a hard link, it is possible to have a broken
* symbolic link.
*/
node = pathloc->node_access;
4ac8a: 2052 moveal %a2@,%a0
* was broken.
*/
IMFS_assert( node );
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
4ac8c: 2400 movel %d0,%d2
/*
* In contrast to a hard link, it is possible to have a broken
* symbolic link.
*/
node = pathloc->node_access;
if ( result == -1 )
4ac8e: 508f addql #8,%sp 4ac90: 70ff moveq #-1,%d0 4ac92: b082 cmpl %d2,%d0 4ac94: 6700 feb6 beqw 4ab4c <IMFS_eval_path+0xc0> 4ac98: 2028 0048 movel %a0@(72),%d0 4ac9c: 6000 ff00 braw 4ab9e <IMFS_eval_path+0x112>
flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
4aca0: 2f0a movel %a2,%sp@- 4aca2: 4eb9 0004 a91c jsr 4a91c <IMFS_Set_handlers> 4aca8: 2400 movel %d0,%d2
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
4acaa: 2e85 movel %d5,%sp@ 4acac: 2f0a movel %a2,%sp@- 4acae: 4eb9 0004 a9a6 jsr 4a9a6 <IMFS_evaluate_permission> 4acb4: 508f addql #8,%sp 4acb6: 4a80 tstl %d0 4acb8: 6600 fe92 bnew 4ab4c <IMFS_eval_path+0xc0>
rtems_set_errno_and_return_minus_one( EACCES );
4acbc: 4eb9 0004 f098 jsr 4f098 <__errno> 4acc2: 74ff moveq #-1,%d2 4acc4: 760d moveq #13,%d3 4acc6: 2040 moveal %d0,%a0
return result;
}
4acc8: 2002 movel %d2,%d0
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
4acca: 2083 movel %d3,%a0@
return result;
}
4accc: 4cee 3cfc ffac moveml %fp@(-84),%d2-%d7/%a2-%a5 4acd2: 4e5e unlk %fp 4acd4: 4e75 rts
case IMFS_NAME:
/*
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
IMFS_evaluate_hard_link( pathloc, 0 );
4acd6: 42a7 clrl %sp@- 4acd8: 2f0a movel %a2,%sp@- 4acda: 4eb9 0004 aa40 jsr 4aa40 <IMFS_evaluate_hard_link>
node = pathloc->node_access;
4ace0: 2052 moveal %a2@,%a0 4ace2: 508f addql #8,%sp 4ace4: 2028 0048 movel %a0@(72),%d0 4ace8: 6000 feb4 braw 4ab9e <IMFS_eval_path+0x112>
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
*pathloc = pathloc->mt_entry->mt_point_node;
4acec: 204a moveal %a2,%a0 4acee: 20e9 0008 movel %a1@(8),%a0@+ 4acf2: 20e9 000c movel %a1@(12),%a0@+ 4acf6: 20e9 0010 movel %a1@(16),%a0@+ 4acfa: 20e9 0014 movel %a1@(20),%a0@+ 4acfe: 20a9 0018 movel %a1@(24),%a0@
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
*pathloc = node->info.directory.mt_fs->mt_fs_root;
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
4ad02: 202e fffc movel %fp@(-4),%d0 4ad06: 2f0a movel %a2,%sp@- 4ad08: 222e fff8 movel %fp@(-8),%d1 4ad0c: 9280 subl %d0,%d1 4ad0e: d0ae 000c addl %fp@(12),%d0 4ad12: 206a 000c moveal %a2@(12),%a0 4ad16: 2f05 movel %d5,%sp@- 4ad18: 2f00 movel %d0,%sp@- 4ad1a: 4874 1800 pea %a4@(00000000,%d1:l) 4ad1e: 2050 moveal %a0@,%a0 4ad20: 4e90 jsr %a0@ 4ad22: 4fef 0010 lea %sp@(16),%sp 4ad26: 2400 movel %d0,%d2 4ad28: 6000 fe22 braw 4ab4c <IMFS_eval_path+0xc0>
char token[ IMFS_NAME_MAX + 1 ];
IMFS_jnode_t *node;
int result;
if ( !rtems_libio_is_valid_perms( flags ) ) {
rtems_set_errno_and_return_minus_one( EIO );
4ad2c: 4eb9 0004 f098 jsr 4f098 <__errno> <== NOT EXECUTED 4ad32: 74ff moveq #-1,%d2 <== NOT EXECUTED 4ad34: 7e05 moveq #5,%d7 <== NOT EXECUTED 4ad36: 2040 moveal %d0,%a0 <== NOT EXECUTED
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4ad38: 2002 movel %d2,%d0 <== NOT EXECUTED
char token[ IMFS_NAME_MAX + 1 ];
IMFS_jnode_t *node;
int result;
if ( !rtems_libio_is_valid_perms( flags ) ) {
rtems_set_errno_and_return_minus_one( EIO );
4ad3a: 2087 movel %d7,%a0@ <== NOT EXECUTED
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4ad3c: 4cee 3cfc ffac moveml %fp@(-84),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4ad42: 4e5e unlk %fp <== NOT EXECUTED 4ad44: 4e75 rts <== NOT EXECUTED
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
4ad46: 4eb9 0004 f098 jsr 4f098 <__errno> 4ad4c: 74ff moveq #-1,%d2 4ad4e: 7c14 moveq #20,%d6 4ad50: 2040 moveal %d0,%a0
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4ad52: 2002 movel %d2,%d0
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
4ad54: 2086 movel %d6,%a0@
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4ad56: 4cee 3cfc ffac moveml %fp@(-84),%d2-%d7/%a2-%a5 4ad5c: 4e5e unlk %fp 4ad5e: 4e75 rts
* path.
*/
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
IMFS_skip_separator( pathname, &pathnamelen, &i);
if ((pathname[i] != '.') || (pathname[i + 1] != '.')) {
*pathloc = node->info.directory.mt_fs->mt_fs_root;
4ad60: 266b 0058 moveal %a3@(88),%a3 4ad64: 224a moveal %a2,%a1 4ad66: 22eb 001c movel %a3@(28),%a1@+ 4ad6a: 22eb 0020 movel %a3@(32),%a1@+ 4ad6e: 22eb 0024 movel %a3@(36),%a1@+ 4ad72: 22eb 0028 movel %a3@(40),%a1@+ 4ad76: 22ab 002c movel %a3@(44),%a1@
return (*pathloc->ops->evalpath_h)( &pathname[i],
4ad7a: 226a 000c moveal %a2@(12),%a1 4ad7e: 2f0a movel %a2,%sp@- 4ad80: 2f05 movel %d5,%sp@- 4ad82: 2f2e 000c movel %fp@(12),%sp@- 4ad86: 2f08 movel %a0,%sp@- 4ad88: 2011 movel %a1@,%d0 4ad8a: 2040 moveal %d0,%a0 4ad8c: 4e90 jsr %a0@ 4ad8e: 4fef 0010 lea %sp@(16),%sp 4ad92: 2400 movel %d0,%d2
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4ad94: 2002 movel %d2,%d0 4ad96: 4cee 3cfc ffac moveml %fp@(-84),%d2-%d7/%a2-%a5
4ad9c: 4e5e unlk %fp <== NOT EXECUTED
0004aee2 <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 */
)
{
4aee2: 4e56 ffa8 linkw %fp,#-88 4aee6: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4aeea: 286e 0008 moveal %fp@(8),%a4 4aeee: 280e movel %fp,%d4 4aef0: 260e movel %fp,%d3 4aef2: 5184 subql #8,%d4 4aef4: 0683 ffff ffd3 addil #-45,%d3 4aefa: 4bf9 0004 b354 lea 4b354 <IMFS_get_token>,%a5
* 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 ) )
4af00: 2c3c 0004 a9a6 movel #305574,%d6
/*
* Find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
4af06: 2a3c 0004 b2cc movel #307916,%d5
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_link( pathloc, 0 );
4af0c: 2e3c 0004 ae28 movel #306728,%d7
node = pathloc->node_access;
/*
* Get the path length.
*/
pathlen = strlen( path );
4af12: 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 */
)
{
4af14: 246e 000c moveal %fp@(12),%a2
int i = 0;
4af18: 42ae fff4 clrl %fp@(-12)
node = pathloc->node_access;
/*
* Get the path length.
*/
pathlen = strlen( path );
4af1c: 4eb9 0005 0404 jsr 50404 <strlen>
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
4af22: 2652 moveal %a2@,%a3
/*
* Get the path length.
*/
pathlen = strlen( path );
4af24: 588f addql #4,%sp 4af26: 4281 clrl %d1 4af28: 2d40 fffc movel %d0,%fp@(-4)
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
4af2c: 2f04 movel %d4,%sp@- 4af2e: 2f03 movel %d3,%sp@- 4af30: 2f00 movel %d0,%sp@- 4af32: 4874 1800 pea %a4@(00000000,%d1:l) 4af36: 4e95 jsr %a5@
pathlen -= len;
i += len;
if ( !pathloc->node_access )
4af38: 2052 moveal %a2@,%a0
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
4af3a: 2400 movel %d0,%d2
pathlen -= len;
i += len;
if ( !pathloc->node_access )
4af3c: 4fef 0010 lea %sp@(16),%sp
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
4af40: 202e fff8 movel %fp@(-8),%d0 4af44: 91ae fffc subl %d0,%fp@(-4)
i += len;
4af48: d1ae fff4 addl %d0,%fp@(-12)
if ( !pathloc->node_access )
4af4c: 4a88 tstl %a0 4af4e: 6700 016e beqw 4b0be <IMFS_evaluate_for_make+0x1dc>
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
4af52: 4a82 tstl %d2
4af54: 6730 beqs 4af86 <IMFS_evaluate_for_make+0xa4>
if ( node->type == IMFS_DIRECTORY )
4af56: 7001 moveq #1,%d0 4af58: b0ab 0048 cmpl %a3@(72),%d0 4af5c: 6700 00dc beqw 4b03a <IMFS_evaluate_for_make+0x158>
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
switch( type ) {
4af60: 7002 moveq #2,%d0 4af62: b082 cmpl %d2,%d0 4af64: 6700 00a0 beqw 4b006 <IMFS_evaluate_for_make+0x124>
4af68: 6418 bccs 4af82 <IMFS_evaluate_for_make+0xa0>
4af6a: 7203 moveq #3,%d1 4af6c: b282 cmpl %d2,%d1
4af6e: 674a beqs 4afba <IMFS_evaluate_for_make+0xd8>
4af70: 7004 moveq #4,%d0 4af72: b082 cmpl %d2,%d0
4af74: 672a beqs 4afa0 <IMFS_evaluate_for_make+0xbe> <== ALWAYS TAKEN
4af76: 202e fffc movel %fp@(-4),%d0 4af7a: 2648 moveal %a0,%a3 4af7c: 222e fff4 movel %fp@(-12),%d1 4af80: 60aa bras 4af2c <IMFS_evaluate_for_make+0x4a> 4af82: 4a82 tstl %d2
4af84: 66f0 bnes 4af76 <IMFS_evaluate_for_make+0x94> <== ALWAYS TAKEN
pathloc->node_access = node;
}
break;
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
4af86: 4eb9 0004 f098 jsr 4f098 <__errno> 4af8c: 7e11 moveq #17,%d7 4af8e: 74ff moveq #-1,%d2 4af90: 2040 moveal %d0,%a0 4af92: 2087 movel %d7,%a0@
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4af94: 2002 movel %d2,%d0 4af96: 4cee 3cfc ffa8 moveml %fp@(-88),%d2-%d7/%a2-%a5 4af9c: 4e5e unlk %fp 4af9e: 4e75 rts
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 );
4afa0: 4eb9 0004 f098 jsr 4f098 <__errno> 4afa6: 74ff moveq #-1,%d2 4afa8: 7c5b moveq #91,%d6 4afaa: 2040 moveal %d0,%a0
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4afac: 2002 movel %d2,%d0
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 );
4afae: 2086 movel %d6,%a0@
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4afb0: 4cee 3cfc ffa8 moveml %fp@(-88),%d2-%d7/%a2-%a5 4afb6: 4e5e unlk %fp 4afb8: 4e75 rts
pathloc->node_access = node;
break;
case IMFS_NAME:
if ( node->type == IMFS_HARD_LINK ) {
4afba: 2028 0048 movel %a0@(72),%d0 4afbe: 7203 moveq #3,%d1 4afc0: b280 cmpl %d0,%d1 4afc2: 6700 00e0 beqw 4b0a4 <IMFS_evaluate_for_make+0x1c2>
result = IMFS_evaluate_link( pathloc, 0 );
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
4afc6: 7204 moveq #4,%d1 4afc8: b280 cmpl %d0,%d1 4afca: 6700 00d8 beqw 4b0a4 <IMFS_evaluate_for_make+0x1c2>
if ( result == -1 )
return -1;
}
node = pathloc->node_access;
if ( !node )
4afce: 4a88 tstl %a0 4afd0: 6700 01d8 beqw 4b1aa <IMFS_evaluate_for_make+0x2c8>
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
4afd4: 7001 moveq #1,%d0 4afd6: b0a8 0048 cmpl %a0@(72),%d0 4afda: 6600 01ce bnew 4b1aa <IMFS_evaluate_for_make+0x2c8>
/*
* Find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
4afde: 2f03 movel %d3,%sp@- 4afe0: 2f08 movel %a0,%sp@- 4afe2: 2045 moveal %d5,%a0 4afe4: 4e90 jsr %a0@
/*
* If there is no node we have found the name of the node we
* wish to create.
*/
if ( ! node )
4afe6: 508f addql #8,%sp
/*
* Find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
4afe8: 2640 moveal %d0,%a3
/*
* If there is no node we have found the name of the node we
* wish to create.
*/
if ( ! node )
4afea: 4a80 tstl %d0 4afec: 6700 013a beqw 4b128 <IMFS_evaluate_for_make+0x246>
done = true;
else {
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
4aff0: 7001 moveq #1,%d0 4aff2: b0ab 0048 cmpl %a3@(72),%d0
4aff6: 675a beqs 4b052 <IMFS_evaluate_for_make+0x170>
4aff8: 202e fffc movel %fp@(-4),%d0 4affc: 222e fff4 movel %fp@(-12),%d1
}
i += 2;
pathlen -= 2;
node = node->Parent;
}
pathloc->node_access = node;
4b000: 248b movel %a3,%a2@ 4b002: 6000 ff28 braw 4af2c <IMFS_evaluate_for_make+0x4a>
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
4b006: 2279 0005 f8d0 moveal 5f8d0 <rtems_current_user_env>,%a1 4b00c: 2669 0018 moveal %a1@(24),%a3 4b010: b1cb cmpal %a3,%a0 4b012: 6700 00c4 beqw 4b0d8 <IMFS_evaluate_for_make+0x1f6>
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4b016: 226a 0010 moveal %a2@(16),%a1
/*
* Am I at the root of this mounted filesystem?
*/
if ( rtems_filesystem_is_root_location( pathloc ) ) {
4b01a: b1e9 001c cmpal %a1@(28),%a0 4b01e: 6700 00c4 beqw 4b0e4 <IMFS_evaluate_for_make+0x202>
*pathloc = pathloc->mt_entry->mt_point_node;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
}
} else {
if ( !node->Parent )
4b022: 2668 0008 moveal %a0@(8),%a3 4b026: 4a8b tstl %a3 4b028: 6700 0094 beqw 4b0be <IMFS_evaluate_for_make+0x1dc>
rtems_set_errno_and_return_minus_one( ENOENT );
node = node->Parent;
}
pathloc->node_access = node;
4b02c: 248b movel %a3,%a2@ 4b02e: 202e fffc movel %fp@(-4),%d0 4b032: 222e fff4 movel %fp@(-12),%d1
break;
4b036: 6000 fef4 braw 4af2c <IMFS_evaluate_for_make+0x4a>
* 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 ) )
4b03a: 4878 0001 pea 1 <ADD> 4b03e: 2046 moveal %d6,%a0 4b040: 2f0a movel %a2,%sp@- 4b042: 4e90 jsr %a0@ 4b044: 508f addql #8,%sp 4b046: 4a80 tstl %d0 4b048: 6700 0146 beqw 4b190 <IMFS_evaluate_for_make+0x2ae> 4b04c: 2052 moveal %a2@,%a0 4b04e: 6000 ff10 braw 4af60 <IMFS_evaluate_for_make+0x7e>
*/
if ( ! node )
done = true;
else {
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
4b052: 4aab 0058 tstl %a3@(88)
4b056: 67a0 beqs 4aff8 <IMFS_evaluate_for_make+0x116>
IMFS_skip_separator( path, &pathlen, &i);
4b058: 486e fff4 pea %fp@(-12)
if ((path[i] != '.') || (path[i + 1] != '.')) {
4b05c: 742e moveq #46,%d2
if ( ! node )
done = true;
else {
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
IMFS_skip_separator( path, &pathlen, &i);
4b05e: 486e fffc pea %fp@(-4) 4b062: 2f0c movel %a4,%sp@- 4b064: 4eba f85a jsr %pc@(4a8c0 <IMFS_skip_separator>)
if ((path[i] != '.') || (path[i + 1] != '.')) {
4b068: 222e fff4 movel %fp@(-12),%d1 4b06c: 4fef 000c lea %sp@(12),%sp 4b070: 41f4 1800 lea %a4@(00000000,%d1:l),%a0 4b074: 1010 moveb %a0@,%d0 4b076: 49c0 extbl %d0 4b078: b480 cmpl %d0,%d2 4b07a: 6600 0148 bnew 4b1c4 <IMFS_evaluate_for_make+0x2e2> 4b07e: 1034 1801 moveb %a4@(00000001,%d1:l),%d0 4b082: 49c0 extbl %d0 4b084: b480 cmpl %d0,%d2 4b086: 6600 013c bnew 4b1c4 <IMFS_evaluate_for_make+0x2e2>
return (*pathloc->ops->evalformake_h)( &path[i],
pathloc,
name );
}
i += 2;
pathlen -= 2;
4b08a: 202e fffc movel %fp@(-4),%d0
*pathloc = node->info.directory.mt_fs->mt_fs_root;
return (*pathloc->ops->evalformake_h)( &path[i],
pathloc,
name );
}
i += 2;
4b08e: 5481 addql #2,%d1
pathlen -= 2;
4b090: 5580 subql #2,%d0
node = node->Parent;
4b092: 266b 0008 moveal %a3@(8),%a3
*pathloc = node->info.directory.mt_fs->mt_fs_root;
return (*pathloc->ops->evalformake_h)( &path[i],
pathloc,
name );
}
i += 2;
4b096: 2d41 fff4 movel %d1,%fp@(-12)
pathlen -= 2;
4b09a: 2d40 fffc movel %d0,%fp@(-4)
node = node->Parent;
}
pathloc->node_access = node;
4b09e: 248b movel %a3,%a2@ 4b0a0: 6000 fe8a braw 4af2c <IMFS_evaluate_for_make+0x4a>
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_link( pathloc, 0 );
4b0a4: 42a7 clrl %sp@- 4b0a6: 2047 moveal %d7,%a0 4b0a8: 2f0a movel %a2,%sp@- 4b0aa: 4e90 jsr %a0@
if ( result == -1 )
4b0ac: 508f addql #8,%sp
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_link( pathloc, 0 );
4b0ae: 2400 movel %d0,%d2
if ( result == -1 )
4b0b0: 70ff moveq #-1,%d0 4b0b2: b082 cmpl %d2,%d0 4b0b4: 6700 fede beqw 4af94 <IMFS_evaluate_for_make+0xb2> 4b0b8: 2052 moveal %a2@,%a0 4b0ba: 6000 ff12 braw 4afce <IMFS_evaluate_for_make+0xec>
* 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 );
4b0be: 4eb9 0004 f098 jsr 4f098 <__errno> 4b0c4: 74ff moveq #-1,%d2 4b0c6: 7a02 moveq #2,%d5 4b0c8: 2040 moveal %d0,%a0
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4b0ca: 2002 movel %d2,%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 );
4b0cc: 2085 movel %d5,%a0@
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4b0ce: 4cee 3cfc ffa8 moveml %fp@(-88),%d2-%d7/%a2-%a5 4b0d4: 4e5e unlk %fp 4b0d6: 4e75 rts
/*
* 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 );
4b0d8: 202e fffc movel %fp@(-4),%d0 4b0dc: 222e fff4 movel %fp@(-12),%d1 4b0e0: 6000 fe4a braw 4af2c <IMFS_evaluate_for_make+0x4a>
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
*pathloc = pathloc->mt_entry->mt_point_node;
4b0e4: 204a moveal %a2,%a0 4b0e6: 20e9 0008 movel %a1@(8),%a0@+ 4b0ea: 20e9 000c movel %a1@(12),%a0@+ 4b0ee: 20e9 0010 movel %a1@(16),%a0@+ 4b0f2: 20e9 0014 movel %a1@(20),%a0@+ 4b0f6: 20a9 0018 movel %a1@(24),%a0@
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
4b0fa: 206a 000c moveal %a2@(12),%a0 4b0fe: 2f2e 0010 movel %fp@(16),%sp@- 4b102: 202e fff4 movel %fp@(-12),%d0 4b106: 90ae fff8 subl %fp@(-8),%d0 4b10a: 2f0a movel %a2,%sp@- 4b10c: 4874 0800 pea %a4@(00000000,%d0:l) 4b110: 2068 0004 moveal %a0@(4),%a0 4b114: 4e90 jsr %a0@ 4b116: 4fef 000c lea %sp@(12),%sp 4b11a: 2400 movel %d0,%d2
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4b11c: 2002 movel %d2,%d0 4b11e: 4cee 3cfc ffa8 moveml %fp@(-88),%d2-%d7/%a2-%a5 4b124: 4e5e unlk %fp 4b126: 4e75 rts
case IMFS_CURRENT_DIR:
break;
}
}
*name = &path[ i - len ];
4b128: 202e fff4 movel %fp@(-12),%d0 4b12c: 2200 movel %d0,%d1 4b12e: 92ae fff8 subl %fp@(-8),%d1 4b132: d28c addl %a4,%d1 4b134: 206e 0010 moveal %fp@(16),%a0 4b138: 2081 movel %d1,%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++) {
4b13a: 1034 0800 moveb %a4@(00000000,%d0:l),%d0
4b13e: 6726 beqs 4b166 <IMFS_evaluate_for_make+0x284>
4b140: 47f9 0004 4220 lea 44220 <rtems_filesystem_is_separator>,%a3
if ( !IMFS_is_separator( path[ i ] ) )
4b146: 49c0 extbl %d0 4b148: 2f00 movel %d0,%sp@- 4b14a: 4e93 jsr %a3@ 4b14c: 588f addql #4,%sp 4b14e: 4a80 tstl %d0 4b150: 6700 ff6c beqw 4b0be <IMFS_evaluate_for_make+0x1dc>
/*
* 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++) {
4b154: 222e fff4 movel %fp@(-12),%d1 4b158: 5281 addql #1,%d1 4b15a: 1034 1800 moveb %a4@(00000000,%d1:l),%d0 4b15e: 2d41 fff4 movel %d1,%fp@(-12) 4b162: 4a00 tstb %d0
4b164: 66e0 bnes 4b146 <IMFS_evaluate_for_make+0x264>
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
4b166: 2f0a movel %a2,%sp@- 4b168: 4eb9 0004 a91c jsr 4a91c <IMFS_Set_handlers>
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
4b16e: 2052 moveal %a2@,%a0
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
4b170: 2400 movel %d0,%d2
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
4b172: 588f addql #4,%sp 4b174: 7001 moveq #1,%d0 4b176: b0a8 0048 cmpl %a0@(72),%d0
4b17a: 662e bnes 4b1aa <IMFS_evaluate_for_make+0x2c8> <== NEVER TAKEN
/*
* We must have Write and execute permission on the returned node.
*/
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
4b17c: 4878 0003 pea 3 <DIVIDE> 4b180: 2f0a movel %a2,%sp@- 4b182: 4eb9 0004 a9a6 jsr 4a9a6 <IMFS_evaluate_permission> 4b188: 508f addql #8,%sp 4b18a: 4a80 tstl %d0 4b18c: 6600 fe06 bnew 4af94 <IMFS_evaluate_for_make+0xb2>
rtems_set_errno_and_return_minus_one( EACCES );
4b190: 4eb9 0004 f098 jsr 4f098 <__errno> 4b196: 74ff moveq #-1,%d2 4b198: 760d moveq #13,%d3 4b19a: 2040 moveal %d0,%a0
return result;
}
4b19c: 2002 movel %d2,%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 );
4b19e: 2083 movel %d3,%a0@
return result;
}
4b1a0: 4cee 3cfc ffa8 moveml %fp@(-88),%d2-%d7/%a2-%a5 4b1a6: 4e5e unlk %fp 4b1a8: 4e75 rts
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
4b1aa: 4eb9 0004 f098 jsr 4f098 <__errno> 4b1b0: 74ff moveq #-1,%d2 4b1b2: 7814 moveq #20,%d4 4b1b4: 2040 moveal %d0,%a0
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4b1b6: 2002 movel %d2,%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 );
4b1b8: 2084 movel %d4,%a0@
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4b1ba: 4cee 3cfc ffa8 moveml %fp@(-88),%d2-%d7/%a2-%a5 4b1c0: 4e5e unlk %fp 4b1c2: 4e75 rts
done = true;
else {
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
IMFS_skip_separator( path, &pathlen, &i);
if ((path[i] != '.') || (path[i + 1] != '.')) {
*pathloc = node->info.directory.mt_fs->mt_fs_root;
4b1c4: 266b 0058 moveal %a3@(88),%a3 4b1c8: 224a moveal %a2,%a1 4b1ca: 22eb 001c movel %a3@(28),%a1@+ 4b1ce: 22eb 0020 movel %a3@(32),%a1@+ 4b1d2: 22eb 0024 movel %a3@(36),%a1@+ 4b1d6: 22eb 0028 movel %a3@(40),%a1@+ 4b1da: 22ab 002c movel %a3@(44),%a1@
return (*pathloc->ops->evalformake_h)( &path[i],
4b1de: 226a 000c moveal %a2@(12),%a1 4b1e2: 2f2e 0010 movel %fp@(16),%sp@- 4b1e6: 2f0a movel %a2,%sp@- 4b1e8: 2f08 movel %a0,%sp@- 4b1ea: 2029 0004 movel %a1@(4),%d0 4b1ee: 2040 moveal %d0,%a0 4b1f0: 4e90 jsr %a0@ 4b1f2: 4fef 000c lea %sp@(12),%sp 4b1f6: 2400 movel %d0,%d2
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4b1f8: 2002 movel %d2,%d0 4b1fa: 4cee 3cfc ffa8 moveml %fp@(-88),%d2-%d7/%a2-%a5
4b200: 4e5e unlk %fp <== NOT EXECUTED
0004ae28 <IMFS_evaluate_link>:
*/
int IMFS_evaluate_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
4ae28: 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 );
4ae2c: 2079 0005 f8d0 moveal 5f8d0 <rtems_current_user_env>,%a0
*/
int IMFS_evaluate_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
4ae32: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 4ae36: 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 );
4ae3a: 4bf9 0004 ada0 lea 4ada0 <IMFS_evaluate_sym_link>,%a5
/*
* Follow the Link node.
*/
if ( jnode->type == IMFS_HARD_LINK )
result = IMFS_evaluate_hard_link( node, flags );
4ae40: 49f9 0004 aa40 lea 4aa40 <IMFS_evaluate_hard_link>,%a4
*/
int IMFS_evaluate_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
4ae46: 242e 000c movel %fp@(12),%d2
IMFS_jnode_t *jnode;
int result = 0;
do {
jnode = node->node_access;
4ae4a: 2453 moveal %a3@,%a2
/*
* Increment and check the link counter.
*/
rtems_filesystem_link_counts ++;
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
4ae4c: 4281 clrl %d1
/*
* Increment and check the link counter.
*/
rtems_filesystem_link_counts ++;
4ae4e: 3028 0030 movew %a0@(48),%d0 4ae52: 5280 addql #1,%d0
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
4ae54: 3200 movew %d0,%d1
/*
* Increment and check the link counter.
*/
rtems_filesystem_link_counts ++;
4ae56: 3140 0030 movew %d0,%a0@(48)
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
4ae5a: 7005 moveq #5,%d0 4ae5c: b081 cmpl %d1,%d0
4ae5e: 6564 bcss 4aec4 <IMFS_evaluate_link+0x9c>
/*
* Follow the Link node.
*/
if ( jnode->type == IMFS_HARD_LINK )
4ae60: 202a 0048 movel %a2@(72),%d0 4ae64: 7203 moveq #3,%d1 4ae66: b280 cmpl %d0,%d1
4ae68: 6740 beqs 4aeaa <IMFS_evaluate_link+0x82>
result = IMFS_evaluate_hard_link( node, flags );
else if (jnode->type == IMFS_SYM_LINK )
4ae6a: 7204 moveq #4,%d1 4ae6c: b280 cmpl %d0,%d1
4ae6e: 671a beqs 4ae8a <IMFS_evaluate_link+0x62>
result = IMFS_evaluate_sym_link( node, flags );
} while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
4ae70: 5780 subql #3,%d0 4ae72: 7201 moveq #1,%d1 4ae74: b280 cmpl %d0,%d1
4ae76: 64d2 bccs 4ae4a <IMFS_evaluate_link+0x22> <== NEVER TAKEN
4ae78: 4280 clrl %d0
/*
* Clear link counter.
*/
rtems_filesystem_link_counts = 0;
4ae7a: 4241 clrw %d1 4ae7c: 3141 0030 movew %d1,%a0@(48)
return result;
}
4ae80: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4ae86: 4e5e unlk %fp 4ae88: 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 );
4ae8a: 2f02 movel %d2,%sp@- 4ae8c: 2f0b movel %a3,%sp@- 4ae8e: 4e95 jsr %a5@ 4ae90: 508f addql #8,%sp
} while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
( jnode->type == IMFS_HARD_LINK ) ) );
4ae92: 4a80 tstl %d0
4ae94: 6620 bnes 4aeb6 <IMFS_evaluate_link+0x8e>
4ae96: 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 ) ||
4ae9a: 7201 moveq #1,%d1 4ae9c: 5780 subql #3,%d0
( jnode->type == IMFS_HARD_LINK ) ) );
4ae9e: 2079 0005 f8d0 moveal 5f8d0 <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 ) ||
4aea4: b280 cmpl %d0,%d1
4aea6: 64a2 bccs 4ae4a <IMFS_evaluate_link+0x22> <== ALWAYS TAKEN
4aea8: 60ce bras 4ae78 <IMFS_evaluate_link+0x50> <== NOT EXECUTED
/*
* Follow the Link node.
*/
if ( jnode->type == IMFS_HARD_LINK )
result = IMFS_evaluate_hard_link( node, flags );
4aeaa: 2f02 movel %d2,%sp@- 4aeac: 2f0b movel %a3,%sp@- 4aeae: 4e94 jsr %a4@ 4aeb0: 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 ) ) );
4aeb2: 4a80 tstl %d0
4aeb4: 67e0 beqs 4ae96 <IMFS_evaluate_link+0x6e>
4aeb6: 2079 0005 f8d0 moveal 5f8d0 <rtems_current_user_env>,%a0
/*
* Clear link counter.
*/
rtems_filesystem_link_counts = 0;
4aebc: 4241 clrw %d1 4aebe: 3141 0030 movew %d1,%a0@(48) 4aec2: 60bc bras 4ae80 <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;
4aec4: 4241 clrw %d1 4aec6: 3141 0030 movew %d1,%a0@(48)
rtems_set_errno_and_return_minus_one( ELOOP );
4aeca: 4eb9 0004 f098 jsr 4f098 <__errno> 4aed0: 725c moveq #92,%d1 4aed2: 2040 moveal %d0,%a0 4aed4: 70ff moveq #-1,%d0
*/
rtems_filesystem_link_counts = 0;
return result;
}
4aed6: 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 );
4aedc: 2081 movel %d1,%a0@
*/
rtems_filesystem_link_counts = 0;
return result;
}
4aede: 4e5e unlk %fp <== NOT EXECUTED
0004a9a6 <IMFS_evaluate_permission>:
uid_t st_uid;
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
4a9a6: 70f8 moveq #-8,%d0
*/
int IMFS_evaluate_permission(
rtems_filesystem_location_info_t *node,
int flags
)
{
4a9a8: 4e56 fff4 linkw %fp,#-12 4a9ac: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4a9b0: 242e 000c movel %fp@(12),%d2
uid_t st_uid;
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
4a9b4: c082 andl %d2,%d0
4a9b6: 6670 bnes 4aa28 <IMFS_evaluate_permission+0x82> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EPERM );
jnode = node->node_access;
4a9b8: 206e 0008 moveal %fp@(8),%a0 4a9bc: 2450 moveal %a0@,%a2
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
4a9be: 4eb9 0004 b994 jsr 4b994 <geteuid> 4a9c4: 3600 movew %d0,%d3
st_gid = getegid();
4a9c6: 4eb9 0004 b980 jsr 4b980 <getegid>
* Check if I am owner or a group member or someone else.
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
4a9cc: 4281 clrl %d1 4a9ce: 0283 0000 ffff andil #65535,%d3 4a9d4: 322a 0038 movew %a2@(56),%d1 4a9d8: b681 cmpl %d1,%d3
4a9da: 6728 beqs 4aa04 <IMFS_evaluate_permission+0x5e>
flags_to_test <<= 6;
else if ( st_gid == jnode->st_gid )
4a9dc: 4281 clrl %d1 4a9de: 0280 0000 ffff andil #65535,%d0 4a9e4: 322a 003a movew %a2@(58),%d1 4a9e8: b081 cmpl %d1,%d0
4a9ea: 672a beqs 4aa16 <IMFS_evaluate_permission+0x70>
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
4a9ec: 2002 movel %d2,%d0 4a9ee: c0aa 002e andl %a2@(46),%d0
return 1;
4a9f2: b082 cmpl %d2,%d0 4a9f4: 57c0 seq %d0 4a9f6: 49c0 extbl %d0 4a9f8: 4480 negl %d0
return 0;
}
4a9fa: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4aa00: 4e5e unlk %fp 4aa02: 4e75 rts
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
flags_to_test <<= 6;
4aa04: ed8a lsll #6,%d2
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
4aa06: 2002 movel %d2,%d0 4aa08: c0aa 002e andl %a2@(46),%d0
return 1;
4aa0c: b082 cmpl %d2,%d0 4aa0e: 57c0 seq %d0 4aa10: 49c0 extbl %d0 4aa12: 4480 negl %d0 4aa14: 60e4 bras 4a9fa <IMFS_evaluate_permission+0x54>
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
flags_to_test <<= 6;
else if ( st_gid == jnode->st_gid )
flags_to_test <<= 3;
4aa16: e78a lsll #3,%d2
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
4aa18: 2002 movel %d2,%d0 4aa1a: c0aa 002e andl %a2@(46),%d0
return 1;
4aa1e: b082 cmpl %d2,%d0 4aa20: 57c0 seq %d0 4aa22: 49c0 extbl %d0 4aa24: 4480 negl %d0 4aa26: 60d2 bras 4a9fa <IMFS_evaluate_permission+0x54>
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
rtems_set_errno_and_return_minus_one( EPERM );
4aa28: 4eb9 0004 f098 jsr 4f098 <__errno> <== NOT EXECUTED 4aa2e: 7201 moveq #1,%d1 <== NOT EXECUTED 4aa30: 2040 moveal %d0,%a0 <== NOT EXECUTED 4aa32: 70ff moveq #-1,%d0 <== NOT EXECUTED
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
return 1;
return 0;
}
4aa34: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
rtems_set_errno_and_return_minus_one( EPERM );
4aa3a: 2081 movel %d1,%a0@ <== NOT EXECUTED
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
return 1;
return 0;
}
4aa3c: 4e5e unlk %fp <== NOT EXECUTED
0004e570 <IMFS_fchmod>:
int IMFS_fchmod(
rtems_filesystem_location_info_t *loc,
mode_t mode
)
{
4e570: 4e56 fff8 linkw %fp,#-8 4e574: 206e 0008 moveal %fp@(8),%a0 4e578: 2f0a movel %a2,%sp@-
IMFS_jnode_t *jnode;
#if defined(RTEMS_POSIX_API)
uid_t st_uid;
#endif
jnode = loc->node_access;
4e57a: 2450 moveal %a0@,%a2
int IMFS_fchmod(
rtems_filesystem_location_info_t *loc,
mode_t mode
)
{
4e57c: 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 ) )
4e57e: 4282 clrl %d2
/*
* Verify I am the owner of the node or the super user.
*/
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
4e580: 4eb9 0004 b994 jsr 4b994 <geteuid>
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
4e586: 4281 clrl %d1 4e588: 342a 0038 movew %a2@(56),%d2 4e58c: 3200 movew %d0,%d1 4e58e: b282 cmpl %d2,%d1
4e590: 6704 beqs 4e596 <IMFS_fchmod+0x26>
4e592: 4a40 tstw %d0
4e594: 663c bnes 4e5d2 <IMFS_fchmod+0x62> <== ALWAYS TAKEN
/*
* 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);
4e596: 202a 002e movel %a2@(46),%d0
jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
4e59a: 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);
4e59e: 0280 ffff f000 andil #-4096,%d0
jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
4e5a4: 0281 0000 0fff andil #4095,%d1 4e5aa: 8280 orl %d0,%d1 4e5ac: 2541 002e movel %d1,%a2@(46)
IMFS_update_ctime( jnode );
4e5b0: 42a7 clrl %sp@- 4e5b2: 486e fff8 pea %fp@(-8) 4e5b6: 4eb9 0004 336c jsr 4336c <gettimeofday> 4e5bc: 256e fff8 0044 movel %fp@(-8),%a2@(68)
return 0;
4e5c2: 508f addql #8,%sp 4e5c4: 4280 clrl %d0
}
4e5c6: 242e fff0 movel %fp@(-16),%d2 4e5ca: 246e fff4 moveal %fp@(-12),%a2 4e5ce: 4e5e unlk %fp 4e5d0: 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 );
4e5d2: 4eb9 0004 f098 jsr 4f098 <__errno>
jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
IMFS_update_ctime( jnode );
return 0;
}
4e5d8: 242e fff0 movel %fp@(-16),%d2
*/
#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 );
4e5dc: 2040 moveal %d0,%a0 4e5de: 7201 moveq #1,%d1 4e5e0: 70ff moveq #-1,%d0
jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
IMFS_update_ctime( jnode );
return 0;
}
4e5e2: 246e fff4 moveal %fp@(-12),%a2 4e5e6: 4e5e unlk %fp
*/
#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 );
4e5e8: 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;
}
00043c46 <IMFS_fifo_ioctl>:
int IMFS_fifo_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
43c46: 4e56 0000 linkw %fp,#0 43c4a: 206e 0008 moveal %fp@(8),%a0 43c4e: 202e 000c movel %fp@(12),%d0 43c52: 226e 0010 moveal %fp@(16),%a1 43c56: 2f02 movel %d2,%sp@-
int err;
if (command == FIONBIO) {
43c58: 0c80 8004 667e cmpil #-2147195266,%d0
43c5e: 6724 beqs 43c84 <IMFS_fifo_ioctl+0x3e>
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
return 0;
}
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
43c60: 2f08 movel %a0,%sp@- 43c62: 2068 0018 moveal %a0@(24),%a0 43c66: 2f09 movel %a1,%sp@- 43c68: 2f00 movel %d0,%sp@- 43c6a: 2f28 004c movel %a0@(76),%sp@- 43c6e: 4eb9 0004 df04 jsr 4df04 <pipe_ioctl>
IMFS_FIFO_RETURN(err);
43c74: 4fef 0010 lea %sp@(16),%sp 43c78: 4a80 tstl %d0
43c7a: 6d44 blts 43cc0 <IMFS_fifo_ioctl+0x7a> <== NEVER TAKEN
}
43c7c: 242e fffc movel %fp@(-4),%d2 43c80: 4e5e unlk %fp 43c82: 4e75 rts
)
{
int err;
if (command == FIONBIO) {
if (buffer == NULL)
43c84: 4a89 tstl %a1
43c86: 6722 beqs 43caa <IMFS_fifo_ioctl+0x64> <== NEVER TAKEN
err = -EFAULT;
else {
if (*(int *)buffer)
iop->flags |= LIBIO_FLAGS_NO_DELAY;
43c88: 4280 clrl %d0
if (command == FIONBIO) {
if (buffer == NULL)
err = -EFAULT;
else {
if (*(int *)buffer)
43c8a: 4a91 tstl %a1@
43c8c: 670e beqs 43c9c <IMFS_fifo_ioctl+0x56>
iop->flags |= LIBIO_FLAGS_NO_DELAY;
43c8e: 7201 moveq #1,%d1
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
IMFS_FIFO_RETURN(err);
}
43c90: 242e fffc movel %fp@(-4),%d2 43c94: 4e5e unlk %fp
if (command == FIONBIO) {
if (buffer == NULL)
err = -EFAULT;
else {
if (*(int *)buffer)
iop->flags |= LIBIO_FLAGS_NO_DELAY;
43c96: 83a8 0014 orl %d1,%a0@(20)
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
IMFS_FIFO_RETURN(err);
}
43c9a: 4e75 rts
err = -EFAULT;
else {
if (*(int *)buffer)
iop->flags |= LIBIO_FLAGS_NO_DELAY;
else
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
43c9c: 72fe moveq #-2,%d1
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
IMFS_FIFO_RETURN(err);
}
43c9e: 242e fffc movel %fp@(-4),%d2 43ca2: 4e5e unlk %fp
err = -EFAULT;
else {
if (*(int *)buffer)
iop->flags |= LIBIO_FLAGS_NO_DELAY;
else
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
43ca4: c3a8 0014 andl %d1,%a0@(20)
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
IMFS_FIFO_RETURN(err);
}
43ca8: 4e75 rts
}
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
IMFS_FIFO_RETURN(err);
43caa: 4eb9 0005 13ac jsr 513ac <__errno>
)
{
int err;
if (command == FIONBIO) {
if (buffer == NULL)
43cb0: 740e moveq #14,%d2
}
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
IMFS_FIFO_RETURN(err);
43cb2: 2040 moveal %d0,%a0 43cb4: 70ff moveq #-1,%d0 43cb6: 2082 movel %d2,%a0@
}
43cb8: 242e fffc movel %fp@(-4),%d2 43cbc: 4e5e unlk %fp 43cbe: 4e75 rts
}
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
IMFS_FIFO_RETURN(err);
43cc0: 2400 movel %d0,%d2 43cc2: 4482 negl %d2 43cc4: 4eb9 0005 13ac jsr 513ac <__errno> 43cca: 2040 moveal %d0,%a0 43ccc: 70ff moveq #-1,%d0 43cce: 2082 movel %d2,%a0@ 43cd0: 60e6 bras 43cb8 <IMFS_fifo_ioctl+0x72>
...
00043a80 <IMFS_fifo_lseek>:
rtems_off64_t IMFS_fifo_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
43a80: 4e56 fff4 linkw %fp,#-12 43a84: 206e 0008 moveal %fp@(8),%a0 43a88: 48d7 001c moveml %d2-%d4,%sp@
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
43a8c: 2f08 movel %a0,%sp@- 43a8e: 2f2e 0014 movel %fp@(20),%sp@- 43a92: 2068 0018 moveal %a0@(24),%a0 43a96: 2f2e 0010 movel %fp@(16),%sp@- 43a9a: 2f2e 000c movel %fp@(12),%sp@- 43a9e: 2f28 004c movel %a0@(76),%sp@- 43aa2: 4eb9 0004 df82 jsr 4df82 <pipe_lseek>
IMFS_FIFO_RETURN(err);
43aa8: 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);
43aac: 2800 movel %d0,%d4 43aae: 2600 movel %d0,%d3 43ab0: 5bc2 smi %d2 43ab2: 49c2 extbl %d2
IMFS_FIFO_RETURN(err);
43ab4: 4a82 tstl %d2
43ab6: 6b0e bmis 43ac6 <IMFS_fifo_lseek+0x46> <== ALWAYS TAKEN
}
43ab8: 2002 movel %d2,%d0 <== NOT EXECUTED 43aba: 2203 movel %d3,%d1 <== NOT EXECUTED 43abc: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 <== NOT EXECUTED 43ac2: 4e5e unlk %fp <== NOT EXECUTED 43ac4: 4e75 rts <== NOT EXECUTED
rtems_off64_t offset,
int whence
)
{
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
IMFS_FIFO_RETURN(err);
43ac6: 4eb9 0005 13ac jsr 513ac <__errno> 43acc: 4484 negl %d4 43ace: 2040 moveal %d0,%a0 43ad0: 74ff moveq #-1,%d2 43ad2: 76ff moveq #-1,%d3 43ad4: 2084 movel %d4,%a0@
}
43ad6: 2002 movel %d2,%d0 43ad8: 2203 movel %d3,%d1 43ada: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4
43ae0: 4e5e unlk %fp <== NOT EXECUTED
00043ae4 <IMFS_fifo_write>:
ssize_t IMFS_fifo_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
43ae4: 4e56 fff8 linkw %fp,#-8 43ae8: 206e 0008 moveal %fp@(8),%a0 43aec: 2f0a movel %a2,%sp@- 43aee: 2f02 movel %d2,%sp@-
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
43af0: 2f08 movel %a0,%sp@- 43af2: 2f2e 0010 movel %fp@(16),%sp@-
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
43af6: 2468 0018 moveal %a0@(24),%a2
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
43afa: 2f2e 000c movel %fp@(12),%sp@- 43afe: 2f2a 004c movel %a2@(76),%sp@- 43b02: 4eb9 0004 dcae jsr 4dcae <pipe_write>
if (err > 0) {
43b08: 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);
43b0c: 2400 movel %d0,%d2
if (err > 0) {
43b0e: 6f28 bles 43b38 <IMFS_fifo_write+0x54>
IMFS_mtime_ctime_update(jnode);
43b10: 42a7 clrl %sp@- 43b12: 486e fff8 pea %fp@(-8) 43b16: 4eb9 0004 5020 jsr 45020 <gettimeofday> 43b1c: 202e fff8 movel %fp@(-8),%d0 43b20: 508f addql #8,%sp 43b22: 2540 0040 movel %d0,%a2@(64) 43b26: 2540 0044 movel %d0,%a2@(68)
}
IMFS_FIFO_RETURN(err);
}
43b2a: 2002 movel %d2,%d0 43b2c: 242e fff0 movel %fp@(-16),%d2 43b30: 246e fff4 moveal %fp@(-12),%a2 43b34: 4e5e unlk %fp 43b36: 4e75 rts
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
if (err > 0) {
IMFS_mtime_ctime_update(jnode);
}
IMFS_FIFO_RETURN(err);
43b38: 4a80 tstl %d0
43b3a: 67ee beqs 43b2a <IMFS_fifo_write+0x46> <== NEVER TAKEN
43b3c: 4eb9 0005 13ac jsr 513ac <__errno> 43b42: 4482 negl %d2 43b44: 2040 moveal %d0,%a0 43b46: 2082 movel %d2,%a0@ 43b48: 74ff moveq #-1,%d2
}
43b4a: 2002 movel %d2,%d0 43b4c: 242e fff0 movel %fp@(-16),%d2 43b50: 246e fff4 moveal %fp@(-12),%a2
43b54: 4e5e unlk %fp <== NOT EXECUTED
0004b2cc <IMFS_find_match_in_dir>:
IMFS_jnode_t *IMFS_find_match_in_dir(
IMFS_jnode_t *directory,
char *name
)
{
4b2cc: 4e56 ffec linkw %fp,#-20 4b2d0: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@
/*
* Check for "." and ".."
*/
if ( !strcmp( name, dotname ) )
4b2d4: 4879 0005 e9da pea 5e9da <dotname> 4b2da: 47f9 0004 fe50 lea 4fe50 <strcmp>,%a3
IMFS_jnode_t *IMFS_find_match_in_dir(
IMFS_jnode_t *directory,
char *name
)
{
4b2e0: 242e 000c movel %fp@(12),%d2
/*
* Check for "." and ".."
*/
if ( !strcmp( name, dotname ) )
4b2e4: 2f02 movel %d2,%sp@-
IMFS_jnode_t *IMFS_find_match_in_dir(
IMFS_jnode_t *directory,
char *name
)
{
4b2e6: 286e 0008 moveal %fp@(8),%a4
/*
* Check for "." and ".."
*/
if ( !strcmp( name, dotname ) )
4b2ea: 4e93 jsr %a3@ 4b2ec: 508f addql #8,%sp 4b2ee: 4a80 tstl %d0
4b2f0: 6736 beqs 4b328 <IMFS_find_match_in_dir+0x5c> <== NEVER TAKEN
return directory;
if ( !strcmp( name, dotdotname ) )
4b2f2: 4879 0005 e9dc pea 5e9dc <dotdotname> 4b2f8: 2f02 movel %d2,%sp@- 4b2fa: 4e93 jsr %a3@ 4b2fc: 508f addql #8,%sp 4b2fe: 4a80 tstl %d0
4b300: 6732 beqs 4b334 <IMFS_find_match_in_dir+0x68> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Tail(the_chain));
4b302: 260c movel %a4,%d3 4b304: 0683 0000 0050 addil #80,%d3
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
4b30a: 246c 004c moveal %a4@(76),%a2
return directory->Parent;
the_chain = &directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
4b30e: b68a cmpl %a2,%d3
4b310: 6714 beqs 4b326 <IMFS_find_match_in_dir+0x5a>
!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 ) )
4b312: 486a 000c pea %a2@(12) 4b316: 2f02 movel %d2,%sp@- 4b318: 4e93 jsr %a3@ 4b31a: 508f addql #8,%sp 4b31c: 4a80 tstl %d0
4b31e: 6724 beqs 4b344 <IMFS_find_match_in_dir+0x78>
the_chain = &directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
4b320: 2452 moveal %a2@,%a2
if ( !strcmp( name, dotdotname ) )
return directory->Parent;
the_chain = &directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
4b322: b68a cmpl %a2,%d3
4b324: 66ec bnes 4b312 <IMFS_find_match_in_dir+0x46>
if ( !strcmp( name, the_jnode->name ) )
return the_jnode;
}
return 0;
4b326: 99cc subal %a4,%a4
}
4b328: 200c movel %a4,%d0 4b32a: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 4b330: 4e5e unlk %fp 4b332: 4e75 rts
if ( !strcmp( name, dotname ) )
return directory;
if ( !strcmp( name, dotdotname ) )
return directory->Parent;
4b334: 286c 0008 moveal %a4@(8),%a4 <== NOT EXECUTED
if ( !strcmp( name, the_jnode->name ) )
return the_jnode;
}
return 0;
}
4b338: 200c movel %a4,%d0 <== NOT EXECUTED 4b33a: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 <== NOT EXECUTED 4b340: 4e5e unlk %fp <== NOT EXECUTED 4b342: 4e75 rts <== NOT EXECUTED
!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 ) )
4b344: 284a moveal %a2,%a4
return the_jnode;
}
return 0;
}
4b346: 200c movel %a4,%d0 4b348: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 4b34e: 4e5e unlk %fp
...
0004b204 <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
)
{
4b204: 4e56 ffd8 linkw %fp,#-40 4b208: 206e 0008 moveal %fp@(8),%a0 4b20c: 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;
4b210: 47ee ffec lea %fp@(-20),%a3 4b214: 49f9 0004 a91c lea 4a91c <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 );
4b21a: 4bf9 0004 2b9c lea 42b9c <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;
4b220: 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;
4b224: 2468 001c moveal %a0@(28),%a2
loc = temp_mt_entry->mt_fs_root;
4b228: 2d68 0020 fff0 movel %a0@(32),%fp@(-16) 4b22e: 2d68 0024 fff4 movel %a0@(36),%fp@(-12) 4b234: 2d68 0028 fff8 movel %a0@(40),%fp@(-8) 4b23a: 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;
4b240: 42a8 001c clrl %a0@(28)
do {
next = jnode->Parent;
4b244: 242a 0008 movel %a2@(8),%d2
loc.node_access = (void *)jnode;
4b248: 2d4a ffec movel %a2,%fp@(-20)
IMFS_Set_handlers( &loc );
4b24c: 2f0b movel %a3,%sp@- 4b24e: 4e94 jsr %a4@
if ( jnode->type != IMFS_DIRECTORY ) {
4b250: 588f addql #4,%sp 4b252: 7001 moveq #1,%d0 4b254: b0aa 0048 cmpl %a2@(72),%d0
4b258: 6646 bnes 4b2a0 <IMFS_fsunmount+0x9c> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
4b25a: 200a movel %a2,%d0 4b25c: 0680 0000 0050 addil #80,%d0
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
4b262: b0aa 004c cmpl %a2@(76),%d0
4b266: 6738 beqs 4b2a0 <IMFS_fsunmount+0x9c>
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
}
if ( jnode != NULL ) {
4b268: 4a8a tstl %a2
4b26a: 6746 beqs 4b2b2 <IMFS_fsunmount+0xae> <== NEVER TAKEN
if ( jnode->type == IMFS_DIRECTORY ) {
4b26c: 7001 moveq #1,%d0 4b26e: b0aa 0048 cmpl %a2@(72),%d0
4b272: 66d0 bnes 4b244 <IMFS_fsunmount+0x40> <== NEVER TAKEN
4b274: 220a movel %a2,%d1 4b276: 0681 0000 0050 addil #80,%d1
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
4b27c: 202a 004c movel %a2@(76),%d0
if ( jnode_has_children( jnode ) )
4b280: b280 cmpl %d0,%d1
4b282: 67c0 beqs 4b244 <IMFS_fsunmount+0x40>
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
4b284: 4a80 tstl %d0
4b286: 672c beqs 4b2b4 <IMFS_fsunmount+0xb0> <== NEVER TAKEN
4b288: 2440 moveal %d0,%a2
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
do {
next = jnode->Parent;
4b28a: 242a 0008 movel %a2@(8),%d2
loc.node_access = (void *)jnode;
4b28e: 2d4a ffec movel %a2,%fp@(-20)
IMFS_Set_handlers( &loc );
4b292: 2f0b movel %a3,%sp@- 4b294: 4e94 jsr %a4@
if ( jnode->type != IMFS_DIRECTORY ) {
4b296: 588f addql #4,%sp 4b298: 7001 moveq #1,%d0 4b29a: b0aa 0048 cmpl %a2@(72),%d0
4b29e: 67ba beqs 4b25a <IMFS_fsunmount+0x56>
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
result = IMFS_unlink( NULL, &loc );
4b2a0: 2f0b movel %a3,%sp@- 4b2a2: 42a7 clrl %sp@- 4b2a4: 4e95 jsr %a5@
if (result != 0)
4b2a6: 508f addql #8,%sp 4b2a8: 4a80 tstl %d0
4b2aa: 6612 bnes 4b2be <IMFS_fsunmount+0xba> <== NEVER TAKEN
return -1;
jnode = next;
4b2ac: 2442 moveal %d2,%a2
}
if ( jnode != NULL ) {
4b2ae: 4a8a tstl %a2
4b2b0: 66ba bnes 4b26c <IMFS_fsunmount+0x68>
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
return 0;
4b2b2: 4280 clrl %d0
}
4b2b4: 4cee 3c04 ffd8 moveml %fp@(-40),%d2/%a2-%a5 4b2ba: 4e5e unlk %fp 4b2bc: 4e75 rts
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
4b2be: 70ff moveq #-1,%d0 <== NOT EXECUTED
}
}
} while (jnode != NULL);
return 0;
}
4b2c0: 4cee 3c04 ffd8 moveml %fp@(-40),%d2/%a2-%a5 <== NOT EXECUTED 4b2c6: 4e5e unlk %fp <== NOT EXECUTED
...
0004b354 <IMFS_get_token>:
const char *path,
int pathlen,
char *token,
int *token_len
)
{
4b354: 4e56 ffe4 linkw %fp,#-28 4b358: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@
register char c;
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
4b35c: 246e 0008 moveal %fp@(8),%a2 4b360: 49f9 0004 4220 lea 44220 <rtems_filesystem_is_separator>,%a4
int pathlen,
char *token,
int *token_len
)
{
register int i = 0;
4b366: 4282 clrl %d2
register char c;
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
4b368: 161a moveb %a2@+,%d3
const char *path,
int pathlen,
char *token,
int *token_len
)
{
4b36a: 2a6e 0010 moveal %fp@(16),%a5
register char c;
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
4b36e: 264d moveal %a5,%a3
while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) {
4b370: 1003 moveb %d3,%d0
const char *path,
int pathlen,
char *token,
int *token_len
)
{
4b372: 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) ) {
4b376: 49c0 extbl %d0 4b378: 2f00 movel %d0,%sp@- 4b37a: 4e94 jsr %a4@ 4b37c: 588f addql #4,%sp 4b37e: 4a80 tstl %d0
4b380: 6620 bnes 4b3a2 <IMFS_get_token+0x4e>
4b382: b882 cmpl %d2,%d4
4b384: 6f1c bles 4b3a2 <IMFS_get_token+0x4e>
token[i] = c;
if ( i == IMFS_NAME_MAX )
4b386: 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;
4b388: 16c3 moveb %d3,%a3@+
if ( i == IMFS_NAME_MAX )
4b38a: b082 cmpl %d2,%d0 4b38c: 6700 0082 beqw 4b410 <IMFS_get_token+0xbc>
return IMFS_INVALID_TOKEN;
if ( !IMFS_is_valid_name_char(c) )
type = IMFS_INVALID_TOKEN;
c = path [++i];
4b390: 5282 addql #1,%d2 4b392: 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) ) {
4b394: 1003 moveb %d3,%d0 4b396: 49c0 extbl %d0 4b398: 2f00 movel %d0,%sp@- 4b39a: 4e94 jsr %a4@ 4b39c: 588f addql #4,%sp 4b39e: 4a80 tstl %d0
4b3a0: 67e0 beqs 4b382 <IMFS_get_token+0x2e>
/*
* Copy a seperator into token.
*/
if ( i == 0 ) {
4b3a2: 4a82 tstl %d2
4b3a4: 6626 bnes 4b3cc <IMFS_get_token+0x78>
token[i] = c;
4b3a6: 1a83 moveb %d3,%a5@
if ( (token[i] != '\0') && pathlen ) {
4b3a8: 6718 beqs 4b3c2 <IMFS_get_token+0x6e>
4b3aa: 4a84 tstl %d4
4b3ac: 6714 beqs 4b3c2 <IMFS_get_token+0x6e>
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
4b3ae: 206e 0014 moveal %fp@(20),%a0
if ( i == 0 ) {
token[i] = c;
if ( (token[i] != '\0') && pathlen ) {
i++;
4b3b2: 7401 moveq #1,%d2
type = IMFS_CURRENT_DIR;
4b3b4: 7001 moveq #1,%d0
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
4b3b6: 2082 movel %d2,%a0@
else if ( strcmp( token, "." ) == 0 )
type = IMFS_CURRENT_DIR;
}
return type;
}
4b3b8: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 4b3be: 4e5e unlk %fp 4b3c0: 4e75 rts
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
4b3c2: 206e 0014 moveal %fp@(20),%a0
if ( (token[i] != '\0') && pathlen ) {
i++;
type = IMFS_CURRENT_DIR;
} else {
type = IMFS_NO_MORE_PATH;
4b3c6: 4280 clrl %d0
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
4b3c8: 2082 movel %d2,%a0@ 4b3ca: 60ec bras 4b3b8 <IMFS_get_token+0x64>
i++;
type = IMFS_CURRENT_DIR;
} else {
type = IMFS_NO_MORE_PATH;
}
} else if (token[ i-1 ] != '\0') {
4b3cc: 4a35 28ff tstb %a5@(ffffffff,%d2:l)
4b3d0: 6706 beqs 4b3d8 <IMFS_get_token+0x84> <== NEVER TAKEN
token[i] = '\0';
4b3d2: 4200 clrb %d0 4b3d4: 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 )
4b3d8: 4879 0005 e9df pea 5e9df <dotdotname+0x3> 4b3de: 45f9 0004 fe50 lea 4fe50 <strcmp>,%a2
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
4b3e4: 206e 0014 moveal %fp@(20),%a0 4b3e8: 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 )
4b3ea: 2f0d movel %a5,%sp@- 4b3ec: 4e92 jsr %a2@ 4b3ee: 508f addql #8,%sp 4b3f0: 4a80 tstl %d0
4b3f2: 6728 beqs 4b41c <IMFS_get_token+0xc8>
type = IMFS_UP_DIR;
else if ( strcmp( token, "." ) == 0 )
4b3f4: 4879 0005 e9e0 pea 5e9e0 <dotdotname+0x4> 4b3fa: 2f0d movel %a5,%sp@- 4b3fc: 4e92 jsr %a2@ 4b3fe: 508f addql #8,%sp 4b400: 4a80 tstl %d0
4b402: 6724 beqs 4b428 <IMFS_get_token+0xd4>
4b404: 7003 moveq #3,%d0
type = IMFS_CURRENT_DIR;
}
return type;
}
4b406: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 4b40c: 4e5e unlk %fp 4b40e: 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;
4b410: 7004 moveq #4,%d0
else if ( strcmp( token, "." ) == 0 )
type = IMFS_CURRENT_DIR;
}
return type;
}
4b412: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 4b418: 4e5e unlk %fp 4b41a: 4e75 rts
* it was a special name.
*/
if ( type == IMFS_NAME ) {
if ( strcmp( token, "..") == 0 )
type = IMFS_UP_DIR;
4b41c: 7002 moveq #2,%d0
else if ( strcmp( token, "." ) == 0 )
type = IMFS_CURRENT_DIR;
}
return type;
}
4b41e: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 4b424: 4e5e unlk %fp 4b426: 4e75 rts
if ( type == IMFS_NAME ) {
if ( strcmp( token, "..") == 0 )
type = IMFS_UP_DIR;
else if ( strcmp( token, "." ) == 0 )
type = IMFS_CURRENT_DIR;
4b428: 7001 moveq #1,%d0
}
return type;
}
4b42a: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5
4b430: 4e5e unlk %fp <== NOT EXECUTED
000426e0 <IMFS_initialize_support>:
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
if (bit_mask == requested_bytes_per_block) {
426e0: 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
)
{
426e2: 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,
426e6: 2239 0005 f78e movel 5f78e <imfs_rq_memfile_bytes_per_block>,%d1
const rtems_filesystem_operations_table *op_table,
const rtems_filesystem_file_handlers_r *memfile_handlers,
const rtems_filesystem_file_handlers_r *directory_handlers,
const rtems_filesystem_file_handlers_r *fifo_handlers
)
{
426ec: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 426f0: 246e 0008 moveal %fp@(8),%a2 426f4: 242e 0014 movel %fp@(20),%d2
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
if (bit_mask == requested_bytes_per_block) {
426f8: b081 cmpl %d1,%d0
426fa: 6724 beqs 42720 <IMFS_initialize_support+0x40>
is_valid = true;
break;
}
if(bit_mask > requested_bytes_per_block)
426fc: 103c 000f moveb #15,%d0 42700: b081 cmpl %d1,%d0
42702: 6c16 bges 4271a <IMFS_initialize_support+0x3a>
42704: 307c 0005 moveaw #5,%a0 42708: 103c 0020 moveb #32,%d0
int bit_mask;
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
4270c: 5388 subql #1,%a0
if (bit_mask == requested_bytes_per_block) {
4270e: b081 cmpl %d1,%d0
42710: 670e beqs 42720 <IMFS_initialize_support+0x40>
is_valid = true;
break;
}
if(bit_mask > requested_bytes_per_block)
42712: 6e06 bgts 4271a <IMFS_initialize_support+0x3a> <== NEVER TAKEN
int bit_mask;
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
42714: d080 addl %d0,%d0 42716: 4a88 tstl %a0
42718: 66f2 bnes 4270c <IMFS_initialize_support+0x2c> <== ALWAYS TAKEN
if(bit_mask > requested_bytes_per_block)
break;
}
*dest_bytes_per_block = ((is_valid)
? requested_bytes_per_block
: default_bytes_per_block);
4271a: 223c 0000 0080 movel #128,%d1
break;
}
if(bit_mask > requested_bytes_per_block)
break;
}
*dest_bytes_per_block = ((is_valid)
42720: 23c1 0006 06f4 movel %d1,606f4 <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();
42726: 4eb9 0004 a886 jsr 4a886 <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 ) );
4272c: 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;
42730: 41f9 0005 e9aa lea 5e9aa <IMFS_LIMITS_AND_OPTIONS>,%a0 42736: 43f9 0005 e9ae lea 5e9ae <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();
4273c: 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;
4273e: 2550 0038 movel %a0@,%a2@(56) 42742: 41f9 0005 e9b2 lea 5e9b2 <IMFS_LIMITS_AND_OPTIONS+0x8>,%a0 42748: 2551 003c movel %a1@,%a2@(60) 4274c: 43f9 0005 e9b6 lea 5e9b6 <IMFS_LIMITS_AND_OPTIONS+0xc>,%a1 42752: 2550 0040 movel %a0@,%a2@(64) 42756: 41f9 0005 e9ba lea 5e9ba <IMFS_LIMITS_AND_OPTIONS+0x10>,%a0 4275c: 2551 0044 movel %a1@,%a2@(68) 42760: 43f9 0005 e9be lea 5e9be <IMFS_LIMITS_AND_OPTIONS+0x14>,%a1
/*
* Create custom file system data.
*/
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
42766: 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;
4276a: 2550 0048 movel %a0@,%a2@(72) 4276e: 41f9 0005 e9c2 lea 5e9c2 <IMFS_LIMITS_AND_OPTIONS+0x18>,%a0 42774: 2551 004c movel %a1@,%a2@(76) 42778: 43f9 0005 e9c6 lea 5e9c6 <IMFS_LIMITS_AND_OPTIONS+0x1c>,%a1 4277e: 2550 0050 movel %a0@,%a2@(80) 42782: 41f9 0005 e9ca lea 5e9ca <IMFS_LIMITS_AND_OPTIONS+0x20>,%a0 42788: 2551 0054 movel %a1@,%a2@(84) 4278c: 43f9 0005 e9ce lea 5e9ce <IMFS_LIMITS_AND_OPTIONS+0x24>,%a1 42792: 2550 0058 movel %a0@,%a2@(88) 42796: 41f9 0005 e9d2 lea 5e9d2 <IMFS_LIMITS_AND_OPTIONS+0x28>,%a0 4279c: 2551 005c movel %a1@,%a2@(92) 427a0: 43f9 0005 e9d6 lea 5e9d6 <IMFS_LIMITS_AND_OPTIONS+0x2c>,%a1 427a6: 2550 0060 movel %a0@,%a2@(96) 427aa: 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;
427ae: 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();
427b4: 2540 001c movel %d0,%a2@(28)
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
427b8: 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 ) );
427bc: 4eb9 0004 2ec8 jsr 42ec8 <calloc>
if ( !fs_info ) {
427c2: 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 ) );
427c4: 2040 moveal %d0,%a0
if ( !fs_info ) {
427c6: 4a80 tstl %d0
427c8: 673c beqs 42806 <IMFS_initialize_support+0x126> <== 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;
427ca: 2548 0034 movel %a0,%a2@(52)
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
427ce: 2239 0006 06f8 movel 606f8 <imfs_instance.5997>,%d1 427d4: 2241 moveal %d1,%a1 427d6: 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;
427d8: 4280 clrl %d0
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
427da: 2081 movel %d1,%a0@
fs_info->ino_count = 1;
427dc: 7201 moveq #1,%d1
fs_info->memfile_handlers = memfile_handlers;
427de: 216e 0010 0008 movel %fp@(16),%a0@(8)
fs_info->directory_handlers = directory_handlers; fs_info->fifo_handlers = fifo_handlers;
427e4: 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;
427ea: 2142 000c movel %d2,%a0@(12)
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
fs_info->ino_count = 1;
427ee: 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;
427f2: 2741 0034 movel %d1,%a3@(52)
return 0;
}
427f6: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
427fc: 23c9 0006 06f8 movel %a1,606f8 <imfs_instance.5997>
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
return 0;
}
42802: 4e5e unlk %fp 42804: 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);
42806: 2f0b movel %a3,%sp@- 42808: 4eb9 0004 32dc jsr 432dc <free>
rtems_set_errno_and_return_minus_one(ENOMEM);
4280e: 4eb9 0004 f098 jsr 4f098 <__errno> 42814: 588f addql #4,%sp 42816: 720c moveq #12,%d1 42818: 2040 moveal %d0,%a0 4281a: 70ff moveq #-1,%d0
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
return 0;
}
4281c: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3
* 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);
42822: 2081 movel %d1,%a0@
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
return 0;
}
42824: 4e5e unlk %fp <== NOT EXECUTED
0004db3a <IMFS_memfile_extend>:
*/
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
4db3a: 4e56 ffd0 linkw %fp,#-48
IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE );
/*
* Verify new file size is supported
*/
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
4db3e: 2039 0006 06f4 movel 606f4 <imfs_memfile_bytes_per_block>,%d0
*/
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
4db44: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE );
/*
* Verify new file size is supported
*/
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
4db48: 2800 movel %d0,%d4 4db4a: e48c lsrl #2,%d4 4db4c: 2204 movel %d4,%d1 4db4e: 5281 addql #1,%d1 4db50: 4c04 1800 mulsl %d4,%d1 4db54: 4282 clrl %d2
*/
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
4db56: 246e 0008 moveal %fp@(8),%a2
IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE );
/*
* Verify new file size is supported
*/
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
4db5a: 5281 addql #1,%d1 4db5c: 4c04 1800 mulsl %d4,%d1
*/
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
4db60: 2c2e 000c movel %fp@(12),%d6 4db64: 2e2e 0010 movel %fp@(16),%d7
IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE );
/*
* Verify new file size is supported
*/
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
4db68: 5381 subql #1,%d1 4db6a: 4c00 1800 mulsl %d0,%d1 4db6e: 2601 movel %d1,%d3 4db70: 2802 movel %d2,%d4 4db72: 2a03 movel %d3,%d5 4db74: 9a87 subl %d7,%d5 4db76: 9986 subxl %d6,%d4 4db78: 6f00 00da blew 4dc54 <IMFS_memfile_extend+0x11a>
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* Verify new file size is actually larger than current size
*/
if ( new_length <= the_jnode->info.file.size )
4db7c: 282a 004c movel %a2@(76),%d4 4db80: 2a2a 0050 movel %a2@(80),%d5 4db84: 2206 movel %d6,%d1 4db86: 2407 movel %d7,%d2 4db88: 9485 subl %d5,%d2 4db8a: 9384 subxl %d4,%d1 4db8c: 6f00 008a blew 4dc18 <IMFS_memfile_extend+0xde>
return 0;
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
4db90: 47f9 0005 b5e4 lea 5b5e4 <__divdi3>,%a3 4db96: 2400 movel %d0,%d2 4db98: 5bc1 smi %d1 4db9a: 49c1 extbl %d1 4db9c: 2841 moveal %d1,%a4 4db9e: 2a42 moveal %d2,%a5 4dba0: 2f0d movel %a5,%sp@- 4dba2: 2f01 movel %d1,%sp@- 4dba4: 2f07 movel %d7,%sp@- 4dba6: 2f06 movel %d6,%sp@- 4dba8: 4e93 jsr %a3@ 4dbaa: 4fef 0010 lea %sp@(16),%sp 4dbae: 2401 movel %d1,%d2
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
4dbb0: 2f0d movel %a5,%sp@- 4dbb2: 2f0c movel %a4,%sp@- 4dbb4: 2f05 movel %d5,%sp@- 4dbb6: 2f04 movel %d4,%sp@- 4dbb8: 4e93 jsr %a3@ 4dbba: 4fef 0010 lea %sp@(16),%sp 4dbbe: 2841 moveal %d1,%a4
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
4dbc0: b282 cmpl %d2,%d1
4dbc2: 621a bhis 4dbde <IMFS_memfile_extend+0xa4> <== NEVER TAKEN
4dbc4: 2801 movel %d1,%d4 4dbc6: 47f9 0004 d950 lea 4d950 <IMFS_memfile_addblock>,%a3
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
4dbcc: 2f04 movel %d4,%sp@- 4dbce: 2f0a movel %a2,%sp@- 4dbd0: 4e93 jsr %a3@ 4dbd2: 508f addql #8,%sp 4dbd4: 4a80 tstl %d0
4dbd6: 664c bnes 4dc24 <IMFS_memfile_extend+0xea>
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
4dbd8: 5284 addql #1,%d4 4dbda: b882 cmpl %d2,%d4
4dbdc: 63ee blss 4dbcc <IMFS_memfile_extend+0x92>
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
IMFS_update_ctime(the_jnode);
4dbde: 42a7 clrl %sp@- 4dbe0: 240e movel %fp,%d2 4dbe2: 5182 subql #8,%d2 4dbe4: 47f9 0004 336c lea 4336c <gettimeofday>,%a3
}
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
4dbea: 2546 004c movel %d6,%a2@(76) 4dbee: 2547 0050 movel %d7,%a2@(80)
IMFS_update_ctime(the_jnode);
4dbf2: 2f02 movel %d2,%sp@- 4dbf4: 4e93 jsr %a3@ 4dbf6: 256e fff8 0044 movel %fp@(-8),%a2@(68)
IMFS_update_mtime(the_jnode);
4dbfc: 42a7 clrl %sp@- 4dbfe: 2f02 movel %d2,%sp@- 4dc00: 4e93 jsr %a3@ 4dc02: 256e fff8 0040 movel %fp@(-8),%a2@(64) 4dc08: 4fef 0010 lea %sp@(16),%sp
return 0;
4dc0c: 4280 clrl %d0
}
4dc0e: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 4dc14: 4e5e unlk %fp 4dc16: 4e75 rts
/*
* Verify new file size is actually larger than current size
*/
if ( new_length <= the_jnode->info.file.size )
return 0;
4dc18: 4280 clrl %d0
the_jnode->info.file.size = new_length;
IMFS_update_ctime(the_jnode);
IMFS_update_mtime(the_jnode);
return 0;
}
4dc1a: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 4dc20: 4e5e unlk %fp 4dc22: 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-- ) {
4dc24: b88c cmpl %a4,%d4
4dc26: 6514 bcss 4dc3c <IMFS_memfile_extend+0x102> <== NEVER TAKEN
4dc28: 47f9 0004 db12 lea 4db12 <IMFS_memfile_remove_block>,%a3
IMFS_memfile_remove_block( the_jnode, block );
4dc2e: 2f04 movel %d4,%sp@-
/*
* 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-- ) {
4dc30: 5384 subql #1,%d4
IMFS_memfile_remove_block( the_jnode, block );
4dc32: 2f0a movel %a2,%sp@- 4dc34: 4e93 jsr %a3@
/*
* 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-- ) {
4dc36: 508f addql #8,%sp 4dc38: b88c cmpl %a4,%d4
4dc3a: 64f2 bccs 4dc2e <IMFS_memfile_extend+0xf4>
IMFS_memfile_remove_block( the_jnode, block );
}
rtems_set_errno_and_return_minus_one( ENOSPC );
4dc3c: 4eb9 0004 f098 jsr 4f098 <__errno> 4dc42: 721c moveq #28,%d1 4dc44: 2040 moveal %d0,%a0 4dc46: 70ff moveq #-1,%d0
the_jnode->info.file.size = new_length;
IMFS_update_ctime(the_jnode);
IMFS_update_mtime(the_jnode);
return 0;
}
4dc48: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
for ( ; block>=old_blocks ; block-- ) {
IMFS_memfile_remove_block( the_jnode, block );
}
rtems_set_errno_and_return_minus_one( ENOSPC );
4dc4e: 2081 movel %d1,%a0@
the_jnode->info.file.size = new_length;
IMFS_update_ctime(the_jnode);
IMFS_update_mtime(the_jnode);
return 0;
}
4dc50: 4e5e unlk %fp 4dc52: 4e75 rts
/*
* Verify new file size is supported
*/
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
rtems_set_errno_and_return_minus_one( EINVAL );
4dc54: 4eb9 0004 f098 jsr 4f098 <__errno> 4dc5a: 7416 moveq #22,%d2 4dc5c: 2040 moveal %d0,%a0 4dc5e: 70ff moveq #-1,%d0 4dc60: 2082 movel %d2,%a0@
the_jnode->info.file.size = new_length;
IMFS_update_ctime(the_jnode);
IMFS_update_mtime(the_jnode);
return 0;
}
4dc62: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5
4dc68: 4e5e unlk %fp <== NOT EXECUTED
0004d51c <IMFS_memfile_get_block_pointer>:
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
4d51c: 4e56 fff0 linkw %fp,#-16
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
4d520: 2239 0006 06f4 movel 606f4 <imfs_memfile_bytes_per_block>,%d1 4d526: e489 lsrl #2,%d1 4d528: 2001 movel %d1,%d0 4d52a: 5380 subql #1,%d0
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
4d52c: 48d7 041c moveml %d2-%d4/%a2,%sp@ 4d530: 246e 0008 moveal %fp@(8),%a2 4d534: 242e 000c movel %fp@(12),%d2 4d538: 206e 0010 moveal %fp@(16),%a0
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
4d53c: b082 cmpl %d2,%d0
4d53e: 6520 bcss 4d560 <IMFS_memfile_get_block_pointer+0x44>
p = info->indirect;
4d540: 226a 0054 moveal %a2@(84),%a1
if ( malloc_it ) {
4d544: 4a88 tstl %a0 4d546: 6700 00a4 beqw 4d5ec <IMFS_memfile_get_block_pointer+0xd0>
if ( !p ) {
4d54a: 4a89 tstl %a1 4d54c: 6700 0106 beqw 4d654 <IMFS_memfile_get_block_pointer+0x138>
}
if ( !p )
return 0;
return &info->indirect[ my_block ];
4d550: 43f1 2c00 lea %a1@(00000000,%d2:l:4),%a1 4d554: 2009 movel %a1,%d0
/*
* This means the requested block number is out of range.
*/
return 0;
}
4d556: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 4d55c: 4e5e unlk %fp 4d55e: 4e75 rts
/*
* Is the block number in the doubly indirect portion?
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
4d560: 2001 movel %d1,%d0 4d562: 5280 addql #1,%d0 4d564: 4c01 0800 mulsl %d1,%d0 4d568: 2240 moveal %d0,%a1 4d56a: 5389 subql #1,%a1 4d56c: b3c2 cmpal %d2,%a1
4d56e: 644e bccs 4d5be <IMFS_memfile_get_block_pointer+0xa2>
}
/*
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
4d570: 2600 movel %d0,%d3 4d572: 5283 addql #1,%d3 4d574: 4c01 3800 mulsl %d1,%d3 4d578: 5383 subql #1,%d3 4d57a: b682 cmpl %d2,%d3
4d57c: 6574 bcss 4d5f2 <IMFS_memfile_get_block_pointer+0xd6><== NEVER TAKEN
my_block -= FIRST_TRIPLY_INDIRECT;
4d57e: 9480 subl %d0,%d2
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
4d580: 4c41 2004 remul %d1,%d4,%d2 4d584: 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;
4d588: 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;
4d58c: 4c41 2003 remul %d1,%d3,%d2 4d590: 4c41 2002 remul %d1,%d2,%d2
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
p = info->triply_indirect;
if ( malloc_it ) {
4d594: 4a88 tstl %a0 4d596: 6600 008a bnew 4d622 <IMFS_memfile_get_block_pointer+0x106>
p1[ doubly ] = (block_p) p2;
}
return (block_p *)&p2[ singly ];
}
if ( !p )
4d59a: 4a89 tstl %a1
4d59c: 6754 beqs 4d5f2 <IMFS_memfile_get_block_pointer+0xd6><== NEVER TAKEN
return 0;
p1 = (block_p *) p[ triply ];
4d59e: 2071 2c00 moveal %a1@(00000000,%d2:l:4),%a0
if ( !p1 )
4d5a2: 4a88 tstl %a0
4d5a4: 674c beqs 4d5f2 <IMFS_memfile_get_block_pointer+0xd6><== NEVER TAKEN
return 0;
p2 = (block_p *)p1[ doubly ];
4d5a6: 2070 3c00 moveal %a0@(00000000,%d3:l:4),%a0
if ( !p2 )
4d5aa: 4a88 tstl %a0
4d5ac: 6744 beqs 4d5f2 <IMFS_memfile_get_block_pointer+0xd6><== NEVER TAKEN
return 0;
return (block_p *)&p2[ singly ];
4d5ae: 41f0 4c00 lea %a0@(00000000,%d4:l:4),%a0 4d5b2: 2008 movel %a0,%d0
/*
* This means the requested block number is out of range.
*/
return 0;
}
4d5b4: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 4d5ba: 4e5e unlk %fp 4d5bc: 4e75 rts
/*
* Is the block number in the doubly indirect portion?
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
my_block -= FIRST_DOUBLY_INDIRECT;
4d5be: 9481 subl %d1,%d2
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
p = info->doubly_indirect;
4d5c0: 226a 0058 moveal %a2@(88),%a1
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
my_block -= FIRST_DOUBLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
4d5c4: 4c41 2003 remul %d1,%d3,%d2 4d5c8: 4c41 2002 remul %d1,%d2,%d2
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
p = info->doubly_indirect;
if ( malloc_it ) {
4d5cc: 4a88 tstl %a0
4d5ce: 662e bnes 4d5fe <IMFS_memfile_get_block_pointer+0xe2>
}
return (block_p *)&p1[ singly ];
}
if ( !p )
4d5d0: 4a89 tstl %a1
4d5d2: 671e beqs 4d5f2 <IMFS_memfile_get_block_pointer+0xd6><== NEVER TAKEN
return 0;
p = (block_p *)p[ doubly ];
4d5d4: 2071 2c00 moveal %a1@(00000000,%d2:l:4),%a0
if ( !p )
4d5d8: 4a88 tstl %a0
4d5da: 6716 beqs 4d5f2 <IMFS_memfile_get_block_pointer+0xd6><== NEVER TAKEN
return 0;
return (block_p *)&p[ singly ];
4d5dc: 41f0 3c00 lea %a0@(00000000,%d3:l:4),%a0 4d5e0: 2008 movel %a0,%d0
/*
* This means the requested block number is out of range.
*/
return 0;
}
4d5e2: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 4d5e8: 4e5e unlk %fp 4d5ea: 4e75 rts
info->indirect = p;
}
return &info->indirect[ my_block ];
}
if ( !p )
4d5ec: 4a89 tstl %a1 4d5ee: 6600 ff60 bnew 4d550 <IMFS_memfile_get_block_pointer+0x34>
return 0;
4d5f2: 4280 clrl %d0 <== NOT EXECUTED
/*
* This means the requested block number is out of range.
*/
return 0;
}
4d5f4: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 4d5fa: 4e5e unlk %fp <== NOT EXECUTED 4d5fc: 4e75 rts <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
p = info->doubly_indirect;
if ( malloc_it ) {
if ( !p ) {
4d5fe: 4a89 tstl %a1
4d600: 676c beqs 4d66e <IMFS_memfile_get_block_pointer+0x152>
if ( !p )
return 0;
info->doubly_indirect = p;
}
p1 = (block_p *)p[ doubly ];
4d602: 45f1 2c00 lea %a1@(00000000,%d2:l:4),%a2 4d606: 2052 moveal %a2@,%a0
if ( !p1 ) {
4d608: 4a88 tstl %a0
4d60a: 66d0 bnes 4d5dc <IMFS_memfile_get_block_pointer+0xc0>
p1 = memfile_alloc_block();
4d60c: 4eb9 0004 d4f8 jsr 4d4f8 <memfile_alloc_block> 4d612: 2040 moveal %d0,%a0
if ( !p1 )
4d614: 4a80 tstl %d0
4d616: 67da beqs 4d5f2 <IMFS_memfile_get_block_pointer+0xd6><== NEVER TAKEN
return 0;
p[ doubly ] = (block_p) p1;
4d618: 2480 movel %d0,%a2@
p = (block_p *)p[ doubly ];
if ( !p )
return 0;
return (block_p *)&p[ singly ];
4d61a: 41f0 3c00 lea %a0@(00000000,%d3:l:4),%a0 4d61e: 2008 movel %a0,%d0 4d620: 60c0 bras 4d5e2 <IMFS_memfile_get_block_pointer+0xc6>
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
p = info->triply_indirect;
if ( malloc_it ) {
if ( !p ) {
4d622: 4a89 tstl %a1
4d624: 676a beqs 4d690 <IMFS_memfile_get_block_pointer+0x174>
if ( !p )
return 0;
info->triply_indirect = p;
}
p1 = (block_p *) p[ triply ];
4d626: 45f1 2c00 lea %a1@(00000000,%d2:l:4),%a2 4d62a: 2052 moveal %a2@,%a0
if ( !p1 ) {
4d62c: 4a88 tstl %a0
4d62e: 677c beqs 4d6ac <IMFS_memfile_get_block_pointer+0x190>
if ( !p1 )
return 0;
p[ triply ] = (block_p) p1;
}
p2 = (block_p *)p1[ doubly ];
4d630: 45f0 3c00 lea %a0@(00000000,%d3:l:4),%a2 4d634: 2052 moveal %a2@,%a0
if ( !p2 ) {
4d636: 4a88 tstl %a0 4d638: 6600 ff74 bnew 4d5ae <IMFS_memfile_get_block_pointer+0x92>
p2 = memfile_alloc_block();
4d63c: 4eb9 0004 d4f8 jsr 4d4f8 <memfile_alloc_block> 4d642: 2040 moveal %d0,%a0
if ( !p2 )
4d644: 4a80 tstl %d0
4d646: 67aa beqs 4d5f2 <IMFS_memfile_get_block_pointer+0xd6><== NEVER TAKEN
return 0;
p1[ doubly ] = (block_p) p2;
4d648: 2480 movel %d0,%a2@
p2 = (block_p *)p1[ doubly ];
if ( !p2 )
return 0;
return (block_p *)&p2[ singly ];
4d64a: 41f0 4c00 lea %a0@(00000000,%d4:l:4),%a0 4d64e: 2008 movel %a0,%d0 4d650: 6000 ff62 braw 4d5b4 <IMFS_memfile_get_block_pointer+0x98>
p = info->indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
4d654: 4eb9 0004 d4f8 jsr 4d4f8 <memfile_alloc_block> 4d65a: 2240 moveal %d0,%a1
if ( !p )
4d65c: 4a80 tstl %d0
4d65e: 6792 beqs 4d5f2 <IMFS_memfile_get_block_pointer+0xd6><== NEVER TAKEN
return 0;
info->indirect = p;
4d660: 2540 0054 movel %d0,%a2@(84)
}
if ( !p )
return 0;
return &info->indirect[ my_block ];
4d664: 43f1 2c00 lea %a1@(00000000,%d2:l:4),%a1 4d668: 2009 movel %a1,%d0 4d66a: 6000 feea braw 4d556 <IMFS_memfile_get_block_pointer+0x3a>
p = info->doubly_indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
4d66e: 4eb9 0004 d4f8 jsr 4d4f8 <memfile_alloc_block> 4d674: 2240 moveal %d0,%a1
if ( !p )
4d676: 4a80 tstl %d0 4d678: 6700 ff78 beqw 4d5f2 <IMFS_memfile_get_block_pointer+0xd6>
return 0;
info->doubly_indirect = p;
4d67c: 2540 0058 movel %d0,%a2@(88)
}
p1 = (block_p *)p[ doubly ];
4d680: 45f1 2c00 lea %a1@(00000000,%d2:l:4),%a2 4d684: 2052 moveal %a2@,%a0
if ( !p1 ) {
4d686: 4a88 tstl %a0 4d688: 6600 ff52 bnew 4d5dc <IMFS_memfile_get_block_pointer+0xc0> 4d68c: 6000 ff7e braw 4d60c <IMFS_memfile_get_block_pointer+0xf0>
p = info->triply_indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
4d690: 4eb9 0004 d4f8 jsr 4d4f8 <memfile_alloc_block> 4d696: 2240 moveal %d0,%a1
if ( !p )
4d698: 4a80 tstl %d0 4d69a: 6700 ff56 beqw 4d5f2 <IMFS_memfile_get_block_pointer+0xd6>
return 0;
info->triply_indirect = p;
4d69e: 2540 005c movel %d0,%a2@(92)
}
p1 = (block_p *) p[ triply ];
4d6a2: 45f1 2c00 lea %a1@(00000000,%d2:l:4),%a2 4d6a6: 2052 moveal %a2@,%a0
if ( !p1 ) {
4d6a8: 4a88 tstl %a0
4d6aa: 6684 bnes 4d630 <IMFS_memfile_get_block_pointer+0x114><== NEVER TAKEN
p1 = memfile_alloc_block();
4d6ac: 4eb9 0004 d4f8 jsr 4d4f8 <memfile_alloc_block> 4d6b2: 2040 moveal %d0,%a0
if ( !p1 )
4d6b4: 4a80 tstl %d0 4d6b6: 6700 ff3a beqw 4d5f2 <IMFS_memfile_get_block_pointer+0xd6>
return 0;
p[ triply ] = (block_p) p1;
4d6ba: 2480 movel %d0,%a2@
}
p2 = (block_p *)p1[ doubly ];
4d6bc: 45f0 3c00 lea %a0@(00000000,%d3:l:4),%a2 4d6c0: 2052 moveal %a2@,%a0
if ( !p2 ) {
4d6c2: 4a88 tstl %a0 4d6c4: 6600 fee8 bnew 4d5ae <IMFS_memfile_get_block_pointer+0x92> 4d6c8: 6000 ff72 braw 4d63c <IMFS_memfile_get_block_pointer+0x120>
0004d6cc <IMFS_memfile_read>:
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
4d6cc: 4e56 ffc8 linkw %fp,#-56 4d6d0: 206e 0018 moveal %fp@(24),%a0 4d6d4: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4d6d8: 246e 0008 moveal %fp@(8),%a2
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
my_length = length;
if (the_jnode->type == IMFS_LINEAR_FILE) {
4d6dc: 7406 moveq #6,%d2
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
4d6de: 2e2e 0014 movel %fp@(20),%d7 4d6e2: 286e 000c moveal %fp@(12),%a4 4d6e6: 2a6e 0010 moveal %fp@(16),%a5
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
my_length = length;
if (the_jnode->type == IMFS_LINEAR_FILE) {
4d6ea: b4aa 0048 cmpl %a2@(72),%d2 4d6ee: 6700 017a beqw 4d86a <IMFS_memfile_read+0x19e>
/*
* 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;
4d6f2: 2408 movel %a0,%d2 4d6f4: d48d addl %a5,%d2
if ( last_byte > the_jnode->info.file.size )
4d6f6: 2202 movel %d2,%d1 4d6f8: 4280 clrl %d0 4d6fa: 242a 004c movel %a2@(76),%d2 4d6fe: 262a 0050 movel %a2@(80),%d3 4d702: 2800 movel %d0,%d4 4d704: 2a01 movel %d1,%d5 4d706: 9a83 subl %d3,%d5 4d708: 9982 subxl %d2,%d4 4d70a: 6f00 010e blew 4d81a <IMFS_memfile_read+0x14e>
*/
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
4d70e: 2839 0006 06f4 movel 606f4 <imfs_memfile_bytes_per_block>,%d4
* If the last byte we are supposed to read is past the end of this
* in memory file, then shorten the length to read.
*/
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size )
my_length = the_jnode->info.file.size - start;
4d714: 2a03 movel %d3,%d5 4d716: 9a8d subl %a5,%d5
*/
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
4d718: 2604 movel %d4,%d3 4d71a: 5bc2 smi %d2 4d71c: 49c2 extbl %d2 4d71e: 2f03 movel %d3,%sp@- 4d720: 2f02 movel %d2,%sp@- 4d722: 2f0d movel %a5,%sp@- 4d724: 2f0c movel %a4,%sp@- 4d726: 4eb9 0005 ba2c jsr 5ba2c <__moddi3> 4d72c: 4fef 0010 lea %sp@(16),%sp 4d730: 2c01 movel %d1,%d6
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
4d732: 2f03 movel %d3,%sp@- 4d734: 2f02 movel %d2,%sp@- 4d736: 2f0d movel %a5,%sp@- 4d738: 2f0c movel %a4,%sp@- 4d73a: 4eb9 0005 b5e4 jsr 5b5e4 <__divdi3> 4d740: 4fef 0010 lea %sp@(16),%sp 4d744: 2401 movel %d1,%d2
if ( start_offset ) {
4d746: 4a86 tstl %d6 4d748: 6700 010c beqw 4d856 <IMFS_memfile_read+0x18a>
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 );
4d74c: 42a7 clrl %sp@- 4d74e: 2f01 movel %d1,%sp@- 4d750: 2f0a movel %a2,%sp@- 4d752: 4eb9 0004 d51c jsr 4d51c <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
4d758: 4fef 000c lea %sp@(12),%sp 4d75c: 4a80 tstl %d0 4d75e: 6700 01be beqw 4d91e <IMFS_memfile_read+0x252>
* 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 ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
4d762: 9886 subl %d6,%d4 4d764: 2845 moveal %d5,%a4 4d766: b885 cmpl %d5,%d4 4d768: 6500 0162 bcsw 4d8cc <IMFS_memfile_read+0x200>
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 );
4d76c: 2f0c movel %a4,%sp@- 4d76e: 2040 moveal %d0,%a0 4d770: dc90 addl %a0@,%d6
dest += to_copy;
block++;
4d772: 5282 addql #1,%d2
my_length -= to_copy;
4d774: 9a8c subl %a4,%d5
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 );
4d776: 2f06 movel %d6,%sp@-
dest += to_copy;
4d778: 2c07 movel %d7,%d6 4d77a: dc8c addl %a4,%d6
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
4d77c: 2f07 movel %d7,%sp@- 4d77e: 4eb9 0004 f8b8 jsr 4f8b8 <memcpy>
dest += to_copy;
block++;
my_length -= to_copy;
4d784: 2839 0006 06f4 movel 606f4 <imfs_memfile_bytes_per_block>,%d4 4d78a: 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 ) {
4d78e: b885 cmpl %d5,%d4
4d790: 623c bhis 4d7ce <IMFS_memfile_read+0x102>
4d792: 47f9 0004 d51c lea 4d51c <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 );
4d798: 4bf9 0004 f8b8 lea 4f8b8 <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 );
4d79e: 42a7 clrl %sp@-
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
dest += to_copy;
block++;
my_length -= to_copy;
4d7a0: 9a84 subl %d4,%d5
/*
* 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 );
4d7a2: 2f02 movel %d2,%sp@-
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
dest += to_copy;
block++;
4d7a4: 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 );
4d7a6: 2f0a movel %a2,%sp@- 4d7a8: 4e93 jsr %a3@
if ( !block_ptr )
4d7aa: 4fef 000c lea %sp@(12),%sp 4d7ae: 4a80 tstl %d0 4d7b0: 6700 00ac beqw 4d85e <IMFS_memfile_read+0x192>
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
4d7b4: 2240 moveal %d0,%a1
dest += to_copy;
block++;
my_length -= to_copy;
copied += to_copy;
4d7b6: d9c4 addal %d4,%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 );
4d7b8: 2f04 movel %d4,%sp@- 4d7ba: 2f11 movel %a1@,%sp@- 4d7bc: 2f06 movel %d6,%sp@-
dest += to_copy;
4d7be: dc84 addl %d4,%d6
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 );
4d7c0: 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 ) {
4d7c2: 4fef 000c lea %sp@(12),%sp 4d7c6: bab9 0006 06f4 cmpl 606f4 <imfs_memfile_bytes_per_block>,%d5
4d7cc: 64d0 bccs 4d79e <IMFS_memfile_read+0xd2>
/*
* Phase 3: possibly the first part of one block
*/
IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
if ( my_length ) {
4d7ce: 4a85 tstl %d5
4d7d0: 6728 beqs 4d7fa <IMFS_memfile_read+0x12e>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
4d7d2: 42a7 clrl %sp@- 4d7d4: 2f02 movel %d2,%sp@- 4d7d6: 2f0a movel %a2,%sp@- 4d7d8: 4eb9 0004 d51c jsr 4d51c <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
4d7de: 4fef 000c lea %sp@(12),%sp 4d7e2: 4a80 tstl %d0
4d7e4: 6778 beqs 4d85e <IMFS_memfile_read+0x192> <== NEVER TAKEN
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], my_length );
4d7e6: 2040 moveal %d0,%a0
copied += my_length;
4d7e8: d9c5 addal %d5,%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 );
4d7ea: 2f05 movel %d5,%sp@- 4d7ec: 2f10 movel %a0@,%sp@- 4d7ee: 2f06 movel %d6,%sp@- 4d7f0: 4eb9 0004 f8b8 jsr 4f8b8 <memcpy>
copied += my_length;
4d7f6: 4fef 000c lea %sp@(12),%sp
}
IMFS_update_atime( the_jnode );
4d7fa: 42a7 clrl %sp@- 4d7fc: 486e fff8 pea %fp@(-8) 4d800: 4eb9 0004 336c jsr 4336c <gettimeofday> 4d806: 256e fff8 003c movel %fp@(-8),%a2@(60)
return copied;
4d80c: 200c movel %a4,%d0 4d80e: 508f addql #8,%sp
}
4d810: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 4d816: 4e5e unlk %fp 4d818: 4e75 rts
*/
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
4d81a: 2839 0006 06f4 movel 606f4 <imfs_memfile_bytes_per_block>,%d4
/*
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
my_length = length;
4d820: 2a08 movel %a0,%d5
*/
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
4d822: 2604 movel %d4,%d3 4d824: 5bc2 smi %d2 4d826: 49c2 extbl %d2 4d828: 2f03 movel %d3,%sp@- 4d82a: 2f02 movel %d2,%sp@- 4d82c: 2f0d movel %a5,%sp@- 4d82e: 2f0c movel %a4,%sp@- 4d830: 4eb9 0005 ba2c jsr 5ba2c <__moddi3> 4d836: 4fef 0010 lea %sp@(16),%sp 4d83a: 2c01 movel %d1,%d6
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
4d83c: 2f03 movel %d3,%sp@- 4d83e: 2f02 movel %d2,%sp@- 4d840: 2f0d movel %a5,%sp@- 4d842: 2f0c movel %a4,%sp@- 4d844: 4eb9 0005 b5e4 jsr 5b5e4 <__divdi3> 4d84a: 4fef 0010 lea %sp@(16),%sp 4d84e: 2401 movel %d1,%d2
if ( start_offset ) {
4d850: 4a86 tstl %d6 4d852: 6600 fef8 bnew 4d74c <IMFS_memfile_read+0x80>
unsigned int last_byte;
unsigned int copied;
unsigned int start_offset;
unsigned char *dest;
dest = destination;
4d856: 2c07 movel %d7,%d6
*/
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size )
my_length = the_jnode->info.file.size - start;
copied = 0;
4d858: 99cc subal %a4,%a4 4d85a: 6000 ff32 braw 4d78e <IMFS_memfile_read+0xc2>
IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
if ( my_length ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
4d85e: 200c movel %a4,%d0 <== NOT EXECUTED
}
IMFS_update_atime( the_jnode );
return copied;
}
4d860: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4d866: 4e5e unlk %fp <== NOT EXECUTED 4d868: 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))
4d86a: 93c9 subal %a1,%a1 4d86c: 242a 004c movel %a2@(76),%d2 4d870: 262a 0050 movel %a2@(80),%d3 4d874: 2d49 fff0 movel %a1,%fp@(-16)
my_length = length;
if (the_jnode->type == IMFS_LINEAR_FILE) {
unsigned char *file_ptr;
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
4d878: 226a 0054 moveal %a2@(84),%a1
if (my_length > (the_jnode->info.linearfile.size - start))
4d87c: 2002 movel %d2,%d0 4d87e: 2203 movel %d3,%d1 4d880: 2d48 fff4 movel %a0,%fp@(-12) 4d884: 280c movel %a4,%d4 4d886: 928d subl %a5,%d1 4d888: 9184 subxl %d4,%d0 4d88a: 2a2e fff0 movel %fp@(-16),%d5 4d88e: 2c2e fff4 movel %fp@(-12),%d6 4d892: 9c81 subl %d1,%d6 4d894: 9b80 subxl %d0,%d5
4d896: 6f5c bles 4d8f4 <IMFS_memfile_read+0x228> <== NEVER TAKEN
my_length = the_jnode->info.linearfile.size - start;
4d898: 2403 movel %d3,%d2 4d89a: 948d subl %a5,%d2
memcpy(dest, &file_ptr[start], my_length);
4d89c: 2f02 movel %d2,%sp@- 4d89e: 4871 d800 pea %a1@(00000000,%a5:l) 4d8a2: 2f07 movel %d7,%sp@- 4d8a4: 4eb9 0004 f8b8 jsr 4f8b8 <memcpy>
IMFS_update_atime( the_jnode );
4d8aa: 42a7 clrl %sp@- 4d8ac: 486e fff8 pea %fp@(-8) 4d8b0: 4eb9 0004 336c jsr 4336c <gettimeofday> 4d8b6: 256e fff8 003c movel %fp@(-8),%a2@(60)
return my_length;
4d8bc: 2002 movel %d2,%d0 4d8be: 4fef 0014 lea %sp@(20),%sp
}
IMFS_update_atime( the_jnode );
return copied;
}
4d8c2: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 4d8c8: 4e5e unlk %fp 4d8ca: 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 ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
4d8cc: 2844 moveal %d4,%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 );
4d8ce: 2040 moveal %d0,%a0
dest += to_copy;
block++;
4d8d0: 5282 addql #1,%d2
my_length -= to_copy;
4d8d2: 9a8c subl %a4,%d5
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 );
4d8d4: 2f0c movel %a4,%sp@- 4d8d6: dc90 addl %a0@,%d6 4d8d8: 2f06 movel %d6,%sp@-
dest += to_copy;
4d8da: 2c07 movel %d7,%d6 4d8dc: dc8c addl %a4,%d6
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
4d8de: 2f07 movel %d7,%sp@- 4d8e0: 4eb9 0004 f8b8 jsr 4f8b8 <memcpy>
dest += to_copy;
block++;
my_length -= to_copy;
4d8e6: 2839 0006 06f4 movel 606f4 <imfs_memfile_bytes_per_block>,%d4 4d8ec: 4fef 000c lea %sp@(12),%sp 4d8f0: 6000 fe9c braw 4d78e <IMFS_memfile_read+0xc2>
/*
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
my_length = length;
4d8f4: 2408 movel %a0,%d2 <== NOT EXECUTED
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
if (my_length > (the_jnode->info.linearfile.size - start))
my_length = the_jnode->info.linearfile.size - start;
memcpy(dest, &file_ptr[start], my_length);
4d8f6: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4d8f8: 4871 d800 pea %a1@(00000000,%a5:l) <== NOT EXECUTED 4d8fc: 2f07 movel %d7,%sp@- <== NOT EXECUTED 4d8fe: 4eb9 0004 f8b8 jsr 4f8b8 <memcpy> <== NOT EXECUTED
IMFS_update_atime( the_jnode );
4d904: 42a7 clrl %sp@- <== NOT EXECUTED 4d906: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 4d90a: 4eb9 0004 336c jsr 4336c <gettimeofday> <== NOT EXECUTED 4d910: 256e fff8 003c movel %fp@(-8),%a2@(60) <== NOT EXECUTED
return my_length;
4d916: 2002 movel %d2,%d0 <== NOT EXECUTED 4d918: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4d91c: 60a4 bras 4d8c2 <IMFS_memfile_read+0x1f6> <== 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;
4d91e: 4280 clrl %d0 <== NOT EXECUTED
}
IMFS_update_atime( the_jnode );
return copied;
}
4d920: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4d926: 4e5e unlk %fp <== NOT EXECUTED
0004d9fc <IMFS_memfile_remove>:
* is better to stick to simple, easy to understand algorithms.
*/
int IMFS_memfile_remove(
IMFS_jnode_t *the_jnode
)
{
4d9fc: 4e56 ffe0 linkw %fp,#-32 4da00: 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;
4da04: 2839 0006 06f4 movel 606f4 <imfs_memfile_bytes_per_block>,%d4 4da0a: e48c lsrl #2,%d4
* is better to stick to simple, easy to understand algorithms.
*/
int IMFS_memfile_remove(
IMFS_jnode_t *the_jnode
)
{
4da0c: 286e 0008 moveal %fp@(8),%a4
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
if ( info->indirect ) {
4da10: 4aac 0054 tstl %a4@(84)
4da14: 670e beqs 4da24 <IMFS_memfile_remove+0x28>
memfile_free_blocks_in_table( &info->indirect, to_free );
4da16: 2f04 movel %d4,%sp@- 4da18: 486c 0054 pea %a4@(84) 4da1c: 4eb9 0004 d9b6 jsr 4d9b6 <memfile_free_blocks_in_table> 4da22: 508f addql #8,%sp
}
if ( info->doubly_indirect ) {
4da24: 206c 0058 moveal %a4@(88),%a0 4da28: 4a88 tstl %a0
4da2a: 674e beqs 4da7a <IMFS_memfile_remove+0x7e>
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
4da2c: 2239 0006 06f4 movel 606f4 <imfs_memfile_bytes_per_block>,%d1 4da32: 2001 movel %d1,%d0 4da34: e488 lsrl #2,%d0 4da36: 47f9 0004 d9b6 lea 4d9b6 <memfile_free_blocks_in_table>,%a3
4da3c: 6732 beqs 4da70 <IMFS_memfile_remove+0x74> <== NEVER TAKEN
4da3e: 4280 clrl %d0 4da40: 4282 clrl %d2 4da42: 47f9 0004 d9b6 lea 4d9b6 <memfile_free_blocks_in_table>,%a3 4da48: 5282 addql #1,%d2
if ( info->doubly_indirect[i] ) {
4da4a: 41f0 0c00 lea %a0@(00000000,%d0:l:4),%a0 4da4e: 4a90 tstl %a0@
4da50: 670e beqs 4da60 <IMFS_memfile_remove+0x64> <== NEVER TAKEN
memfile_free_blocks_in_table(
4da52: 2f04 movel %d4,%sp@- 4da54: 2f08 movel %a0,%sp@- 4da56: 4e93 jsr %a3@ 4da58: 2239 0006 06f4 movel 606f4 <imfs_memfile_bytes_per_block>,%d1 4da5e: 508f addql #8,%sp
if ( info->indirect ) {
memfile_free_blocks_in_table( &info->indirect, to_free );
}
if ( info->doubly_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
4da60: 2601 movel %d1,%d3 4da62: 2002 movel %d2,%d0 4da64: e48b lsrl #2,%d3 4da66: b682 cmpl %d2,%d3
4da68: 6306 blss 4da70 <IMFS_memfile_remove+0x74>
4da6a: 206c 0058 moveal %a4@(88),%a0 4da6e: 60d8 bras 4da48 <IMFS_memfile_remove+0x4c>
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 );
4da70: 2f04 movel %d4,%sp@- 4da72: 486c 0058 pea %a4@(88) 4da76: 4e93 jsr %a3@ 4da78: 508f addql #8,%sp
}
if ( info->triply_indirect ) {
4da7a: 206c 005c moveal %a4@(92),%a0 4da7e: 4a88 tstl %a0 4da80: 6700 0084 beqw 4db06 <IMFS_memfile_remove+0x10a>
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
4da84: 2239 0006 06f4 movel 606f4 <imfs_memfile_bytes_per_block>,%d1 4da8a: 2001 movel %d1,%d0 4da8c: e488 lsrl #2,%d0 4da8e: 47f9 0004 d9b6 lea 4d9b6 <memfile_free_blocks_in_table>,%a3
4da94: 6766 beqs 4dafc <IMFS_memfile_remove+0x100> <== NEVER TAKEN
p = (block_p *) info->triply_indirect[i];
4da96: 2450 moveal %a0@,%a2 4da98: 47f9 0004 d9b6 lea 4d9b6 <memfile_free_blocks_in_table>,%a3
if ( !p ) /* ensure we have a valid pointer */
4da9e: 4a8a tstl %a2
4daa0: 675a beqs 4dafc <IMFS_memfile_remove+0x100> <== NEVER TAKEN
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
4daa2: 4286 clrl %d6
if ( !p ) /* ensure we have a valid pointer */
4daa4: 4285 clrl %d5
break;
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
4daa6: 4a80 tstl %d0
4daa8: 6726 beqs 4dad0 <IMFS_memfile_remove+0xd4> <== NEVER TAKEN
4daaa: 4280 clrl %d0 4daac: 4282 clrl %d2 4daae: 5282 addql #1,%d2
if ( p[j] ) {
4dab0: 41f2 0c00 lea %a2@(00000000,%d0:l:4),%a0 4dab4: 4a90 tstl %a0@
4dab6: 670e beqs 4dac6 <IMFS_memfile_remove+0xca> <== NEVER TAKEN
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
4dab8: 2f04 movel %d4,%sp@- 4daba: 2f08 movel %a0,%sp@- 4dabc: 4e93 jsr %a3@ 4dabe: 2239 0006 06f4 movel 606f4 <imfs_memfile_bytes_per_block>,%d1 4dac4: 508f addql #8,%sp
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++ ) {
4dac6: 2601 movel %d1,%d3 4dac8: 2002 movel %d2,%d0 4daca: e48b lsrl #2,%d3 4dacc: b682 cmpl %d2,%d3
4dace: 62de bhis 4daae <IMFS_memfile_remove+0xb2> <== NEVER TAKEN
if ( p[j] ) {
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
}
}
memfile_free_blocks_in_table(
4dad0: 2f04 movel %d4,%sp@- 4dad2: dcac 005c addl %a4@(92),%d6
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
4dad6: 5285 addql #1,%d5
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(
4dad8: 2f06 movel %d6,%sp@- 4dada: 4e93 jsr %a3@
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
4dadc: 2239 0006 06f4 movel 606f4 <imfs_memfile_bytes_per_block>,%d1 4dae2: 2001 movel %d1,%d0 4dae4: 508f addql #8,%sp 4dae6: e488 lsrl #2,%d0 4dae8: b085 cmpl %d5,%d0
4daea: 6310 blss 4dafc <IMFS_memfile_remove+0x100> * a significant difference in the performance of this routine. * * Regardless until the IMFS implementation is proven, it * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove(
4daec: 2c05 movel %d5,%d6
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
4daee: 206c 005c moveal %a4@(92),%a0
* a significant difference in the performance of this routine. * * Regardless until the IMFS implementation is proven, it * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove(
4daf2: e58e lsll #2,%d6
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
4daf4: 2470 6800 moveal %a0@(00000000,%d6:l),%a2
if ( !p ) /* ensure we have a valid pointer */
4daf8: 4a8a tstl %a2
4dafa: 66aa bnes 4daa6 <IMFS_memfile_remove+0xaa>
}
}
memfile_free_blocks_in_table(
(block_p **)&info->triply_indirect[i], to_free );
}
memfile_free_blocks_in_table(
4dafc: 2f04 movel %d4,%sp@- 4dafe: 486c 005c pea %a4@(92) 4db02: 4e93 jsr %a3@ 4db04: 508f addql #8,%sp
(block_p **)&info->triply_indirect, to_free );
}
return 0;
}
4db06: 4280 clrl %d0 4db08: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4
4db0e: 4e5e unlk %fp <== NOT EXECUTED
0004dc6c <IMFS_memfile_write>:
* 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 + my_length;
if ( last_byte > the_jnode->info.file.size ) {
4dc6c: 4280 clrl %d0
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
4dc6e: 4e56 ffd0 linkw %fp,#-48 4dc72: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4dc76: 286e 000c moveal %fp@(12),%a4 4dc7a: 2a6e 0010 moveal %fp@(16),%a5 4dc7e: 282e 0018 movel %fp@(24),%d4
/*
* 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 + my_length;
4dc82: 41f5 4800 lea %a5@(00000000,%d4:l),%a0
if ( last_byte > the_jnode->info.file.size ) {
4dc86: 2208 movel %a0,%d1
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
4dc88: 246e 0008 moveal %fp@(8),%a2 4dc8c: 2e2e 0014 movel %fp@(20),%d7
* 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 + my_length;
if ( last_byte > the_jnode->info.file.size ) {
4dc90: 242a 004c movel %a2@(76),%d2 4dc94: 262a 0050 movel %a2@(80),%d3 4dc98: 9681 subl %d1,%d3 4dc9a: 9580 subxl %d0,%d2 4dc9c: 6d00 0116 bltw 4ddb4 <IMFS_memfile_write+0x148>
*/
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
4dca0: 2a39 0006 06f4 movel 606f4 <imfs_memfile_bytes_per_block>,%d5 4dca6: 2605 movel %d5,%d3 4dca8: 5bc2 smi %d2 4dcaa: 49c2 extbl %d2 4dcac: 2f03 movel %d3,%sp@- 4dcae: 2f02 movel %d2,%sp@- 4dcb0: 2f0d movel %a5,%sp@- 4dcb2: 2f0c movel %a4,%sp@- 4dcb4: 4eb9 0005 ba2c jsr 5ba2c <__moddi3> 4dcba: 4fef 0010 lea %sp@(16),%sp 4dcbe: 2c01 movel %d1,%d6
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
4dcc0: 2f03 movel %d3,%sp@- 4dcc2: 2f02 movel %d2,%sp@- 4dcc4: 2f0d movel %a5,%sp@- 4dcc6: 2f0c movel %a4,%sp@- 4dcc8: 4eb9 0005 b5e4 jsr 5b5e4 <__divdi3> 4dcce: 4fef 0010 lea %sp@(16),%sp 4dcd2: 2401 movel %d1,%d2
if ( start_offset ) {
4dcd4: 4a86 tstl %d6 4dcd6: 6700 00d4 beqw 4ddac <IMFS_memfile_write+0x140>
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 );
4dcda: 42a7 clrl %sp@- 4dcdc: 2f01 movel %d1,%sp@- 4dcde: 2f0a movel %a2,%sp@- 4dce0: 4eb9 0004 d51c jsr 4d51c <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
4dce6: 4fef 000c lea %sp@(12),%sp 4dcea: 4a80 tstl %d0 4dcec: 6700 0120 beqw 4de0e <IMFS_memfile_write+0x1a2>
* 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 ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
4dcf0: 9a86 subl %d6,%d5 4dcf2: b885 cmpl %d5,%d4 4dcf4: 6500 00ee bcsw 4dde4 <IMFS_memfile_write+0x178>
block,
to_copy,
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
4dcf8: 2f05 movel %d5,%sp@- 4dcfa: 2040 moveal %d0,%a0
src += to_copy;
4dcfc: 2847 moveal %d7,%a4 4dcfe: d9c5 addal %d5,%a4
block++;
my_length -= to_copy;
4dd00: 9885 subl %d5,%d4
copied += to_copy;
4dd02: 2605 movel %d5,%d3
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
src += to_copy;
block++;
4dd04: 5282 addql #1,%d2
block,
to_copy,
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
4dd06: 2f07 movel %d7,%sp@- 4dd08: dc90 addl %a0@,%d6 4dd0a: 2f06 movel %d6,%sp@- 4dd0c: 4eb9 0004 f8b8 jsr 4f8b8 <memcpy>
src += to_copy;
block++;
my_length -= to_copy;
copied += to_copy;
4dd12: 2a39 0006 06f4 movel 606f4 <imfs_memfile_bytes_per_block>,%d5 4dd18: 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 ) {
4dd1c: ba84 cmpl %d4,%d5
4dd1e: 623a bhis 4dd5a <IMFS_memfile_write+0xee>
4dd20: 47f9 0004 d51c lea 4d51c <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 );
4dd26: 4bf9 0004 f8b8 lea 4f8b8 <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 );
4dd2c: 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;
4dd2e: 9885 subl %d5,%d4
* 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 );
4dd30: 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++;
4dd32: 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 );
4dd34: 2f0a movel %a2,%sp@- 4dd36: 4e93 jsr %a3@
if ( !block_ptr )
4dd38: 4fef 000c lea %sp@(12),%sp 4dd3c: 4a80 tstl %d0
4dd3e: 6760 beqs 4dda0 <IMFS_memfile_write+0x134> <== 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 );
4dd40: 2f05 movel %d5,%sp@- 4dd42: 2040 moveal %d0,%a0
* IMFS_memfile_write * * 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(
4dd44: d685 addl %d5,%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 );
4dd46: 2f0c movel %a4,%sp@- 4dd48: 2f10 movel %a0@,%sp@-
src += to_copy;
4dd4a: d9c5 addal %d5,%a4
if ( !block_ptr )
return copied;
#if 0
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, to_copy );
4dd4c: 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 ) {
4dd4e: 4fef 000c lea %sp@(12),%sp 4dd52: b8b9 0006 06f4 cmpl 606f4 <imfs_memfile_bytes_per_block>,%d4
4dd58: 64d2 bccs 4dd2c <IMFS_memfile_write+0xc0>
* Phase 3: possibly the first part of one block
*/
IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
to_copy = my_length;
if ( my_length ) {
4dd5a: 4a84 tstl %d4
4dd5c: 6728 beqs 4dd86 <IMFS_memfile_write+0x11a>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
4dd5e: 42a7 clrl %sp@- 4dd60: 2f02 movel %d2,%sp@- 4dd62: 2f0a movel %a2,%sp@- 4dd64: 4eb9 0004 d51c jsr 4d51c <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
4dd6a: 4fef 000c lea %sp@(12),%sp 4dd6e: 4a80 tstl %d0
4dd70: 672e beqs 4dda0 <IMFS_memfile_write+0x134> <== 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 );
4dd72: 2f04 movel %d4,%sp@- 4dd74: 2040 moveal %d0,%a0
my_length = 0;
copied += to_copy;
4dd76: d684 addl %d4,%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 );
4dd78: 2f0c movel %a4,%sp@- 4dd7a: 2f10 movel %a0@,%sp@- 4dd7c: 4eb9 0004 f8b8 jsr 4f8b8 <memcpy>
my_length = 0;
copied += to_copy;
4dd82: 4fef 000c lea %sp@(12),%sp
}
IMFS_mtime_ctime_update( the_jnode );
4dd86: 42a7 clrl %sp@- 4dd88: 486e fff8 pea %fp@(-8) 4dd8c: 4eb9 0004 336c jsr 4336c <gettimeofday> 4dd92: 202e fff8 movel %fp@(-8),%d0
return copied;
4dd96: 508f addql #8,%sp
memcpy( &(*block_ptr)[ 0 ], src, my_length );
my_length = 0;
copied += to_copy;
}
IMFS_mtime_ctime_update( the_jnode );
4dd98: 2540 0040 movel %d0,%a2@(64) 4dd9c: 2540 0044 movel %d0,%a2@(68)
return copied;
}
4dda0: 2003 movel %d3,%d0 4dda2: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 4dda8: 4e5e unlk %fp 4ddaa: 4e75 rts
unsigned int last_byte;
unsigned int start_offset;
int copied;
const unsigned char *src;
src = source;
4ddac: 2847 moveal %d7,%a4
status = IMFS_memfile_extend( the_jnode, last_byte );
if ( status )
rtems_set_errno_and_return_minus_one( ENOSPC );
}
copied = 0;
4ddae: 4283 clrl %d3 4ddb0: 6000 ff6a braw 4dd1c <IMFS_memfile_write+0xb0>
* in memory file, then extend the length.
*/
last_byte = start + my_length;
if ( last_byte > the_jnode->info.file.size ) {
status = IMFS_memfile_extend( the_jnode, last_byte );
4ddb4: 2f08 movel %a0,%sp@- 4ddb6: 2f00 movel %d0,%sp@- 4ddb8: 2f0a movel %a2,%sp@- 4ddba: 4eb9 0004 db3a jsr 4db3a <IMFS_memfile_extend>
if ( status )
4ddc0: 4fef 000c lea %sp@(12),%sp 4ddc4: 4a80 tstl %d0 4ddc6: 6700 fed8 beqw 4dca0 <IMFS_memfile_write+0x34>
rtems_set_errno_and_return_minus_one( ENOSPC );
4ddca: 4eb9 0004 f098 jsr 4f098 <__errno> 4ddd0: 76ff moveq #-1,%d3 4ddd2: 781c moveq #28,%d4 4ddd4: 2040 moveal %d0,%a0
}
IMFS_mtime_ctime_update( the_jnode );
return copied;
}
4ddd6: 2003 movel %d3,%d0
last_byte = start + my_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 );
4ddd8: 2084 movel %d4,%a0@
}
IMFS_mtime_ctime_update( the_jnode );
return copied;
}
4ddda: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 4dde0: 4e5e unlk %fp 4dde2: 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 ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
4dde4: 2a04 movel %d4,%d5
block,
to_copy,
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
4dde6: 2040 moveal %d0,%a0
src += to_copy;
4dde8: 2847 moveal %d7,%a4 4ddea: d9c5 addal %d5,%a4
block++;
my_length -= to_copy;
4ddec: 9885 subl %d5,%d4
copied += to_copy;
4ddee: 2605 movel %d5,%d3
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
src += to_copy;
block++;
4ddf0: 5282 addql #1,%d2
block,
to_copy,
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
4ddf2: 2f05 movel %d5,%sp@- 4ddf4: 2f07 movel %d7,%sp@- 4ddf6: dc90 addl %a0@,%d6 4ddf8: 2f06 movel %d6,%sp@- 4ddfa: 4eb9 0004 f8b8 jsr 4f8b8 <memcpy>
src += to_copy;
block++;
my_length -= to_copy;
copied += to_copy;
4de00: 2a39 0006 06f4 movel 606f4 <imfs_memfile_bytes_per_block>,%d5 4de06: 4fef 000c lea %sp@(12),%sp 4de0a: 6000 ff10 braw 4dd1c <IMFS_memfile_write+0xb0>
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;
4de0e: 4283 clrl %d3 <== NOT EXECUTED
}
IMFS_mtime_ctime_update( the_jnode );
return copied;
}
4de10: 2003 movel %d3,%d0 <== NOT EXECUTED 4de12: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4de18: 4e5e unlk %fp <== NOT EXECUTED
000428f8 <IMFS_mknod>:
const char *token, /* IN */
mode_t mode, /* IN */
dev_t dev, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
428f8: 4e56 ffa8 linkw %fp,#-88 428fc: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 42900: 262e 0008 movel %fp@(8),%d3
IMFS_jnode_t *new_node;
int result;
char new_name[ IMFS_NAME_MAX + 1 ];
IMFS_types_union info;
IMFS_get_token( token, strlen( token ), new_name, &result );
42904: 45ee ffbf lea %fp@(-65),%a2 42908: 2f03 movel %d3,%sp@-
const char *token, /* IN */
mode_t mode, /* IN */
dev_t dev, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
4290a: 242e 000c movel %fp@(12),%d2
IMFS_jnode_t *new_node;
int result;
char new_name[ IMFS_NAME_MAX + 1 ];
IMFS_types_union info;
IMFS_get_token( token, strlen( token ), new_name, &result );
4290e: 4eb9 0005 0404 jsr 50404 <strlen> 42914: 588f addql #4,%sp 42916: 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 */
)
{
4291a: 282e 0010 movel %fp@(16),%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 );
4291e: 2f0a movel %a2,%sp@-
const char *token, /* IN */
mode_t mode, /* IN */
dev_t dev, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
42920: 266e 0014 moveal %fp@(20),%a3
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 );
42924: 2f00 movel %d0,%sp@- 42926: 2f03 movel %d3,%sp@- 42928: 4eb9 0004 b354 jsr 4b354 <IMFS_get_token>
/*
* Figure out what type of IMFS node this is.
*/
if ( S_ISDIR(mode) )
4292e: 4fef 0010 lea %sp@(16),%sp 42932: 2002 movel %d2,%d0 42934: 0280 0000 f000 andil #61440,%d0 4293a: 0c80 0000 4000 cmpil #16384,%d0 42940: 6700 008e beqw 429d0 <IMFS_mknod+0xd8>
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
42944: 0c80 0000 8000 cmpil #32768,%d0 4294a: 6700 0088 beqw 429d4 <IMFS_mknod+0xdc>
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
4294e: 0c80 0000 6000 cmpil #24576,%d0
42954: 676e beqs 429c4 <IMFS_mknod+0xcc>
42956: 0c80 0000 2000 cmpil #8192,%d0
4295c: 6766 beqs 429c4 <IMFS_mknod+0xcc>
type = IMFS_DEVICE;
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
} else if (S_ISFIFO(mode))
4295e: 0c80 0000 1000 cmpil #4096,%d0
42964: 6772 beqs 429d8 <IMFS_mknod+0xe0> <== ALWAYS TAKEN
mode_t mode, /* IN */
dev_t dev, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
IMFS_token_types type = 0;
42966: 4280 clrl %d0 <== NOT EXECUTED
* was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( pathloc, type, new_name, mode, &info );
42968: 486e ffe0 pea %fp@(-32) 4296c: 2f02 movel %d2,%sp@- 4296e: 2f0a movel %a2,%sp@- 42970: 2f00 movel %d0,%sp@- 42972: 2f2e 0018 movel %fp@(24),%sp@- 42976: 4eb9 0004 a692 jsr 4a692 <IMFS_create_node>
if ( !new_node )
4297c: 4fef 0014 lea %sp@(20),%sp
* 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( pathloc, type, new_name, mode, &info );
42980: 2440 moveal %d0,%a2
if ( !new_node )
42982: 4a80 tstl %d0
42984: 6756 beqs 429dc <IMFS_mknod+0xe4>
rtems_set_errno_and_return_minus_one( ENOMEM );
IMFS_update_ctime(new_node->Parent);
42986: 42a7 clrl %sp@- 42988: 240e movel %fp,%d2 4298a: 0682 ffff fff4 addil #-12,%d2 42990: 47f9 0004 336c lea 4336c <gettimeofday>,%a3 42996: 2f02 movel %d2,%sp@- 42998: 4e93 jsr %a3@ 4299a: 206a 0008 moveal %a2@(8),%a0 4299e: 216e fff4 0044 movel %fp@(-12),%a0@(68)
IMFS_update_mtime(new_node->Parent);
429a4: 42a7 clrl %sp@- 429a6: 2f02 movel %d2,%sp@- 429a8: 4e93 jsr %a3@ 429aa: 206a 0008 moveal %a2@(8),%a0
return 0;
429ae: 4fef 0010 lea %sp@(16),%sp 429b2: 4280 clrl %d0
new_node = IMFS_create_node( pathloc, type, new_name, mode, &info );
if ( !new_node )
rtems_set_errno_and_return_minus_one( ENOMEM );
IMFS_update_ctime(new_node->Parent);
IMFS_update_mtime(new_node->Parent);
429b4: 216e fff4 0040 movel %fp@(-12),%a0@(64)
return 0; }
429ba: 4cee 0c1c ffa8 moveml %fp@(-88),%d2-%d4/%a2-%a3 429c0: 4e5e unlk %fp 429c2: 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 );
429c4: 2d44 ffe0 movel %d4,%fp@(-32)
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;
429c8: 7002 moveq #2,%d0
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
429ca: 2d4b ffe4 movel %a3,%fp@(-28) 429ce: 6098 bras 42968 <IMFS_mknod+0x70>
/*
* Figure out what type of IMFS node this is.
*/
if ( S_ISDIR(mode) )
type = IMFS_DIRECTORY;
429d0: 7001 moveq #1,%d0 429d2: 6094 bras 42968 <IMFS_mknod+0x70>
else if ( S_ISREG(mode) )
type = IMFS_MEMORY_FILE;
429d4: 7005 moveq #5,%d0 429d6: 6090 bras 42968 <IMFS_mknod+0x70>
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
type = IMFS_DEVICE;
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
} else if (S_ISFIFO(mode))
type = IMFS_FIFO;
429d8: 7007 moveq #7,%d0 429da: 608c bras 42968 <IMFS_mknod+0x70>
* existed. The result was simpler code which should not have
* this path.
*/
new_node = IMFS_create_node( pathloc, type, new_name, mode, &info );
if ( !new_node )
rtems_set_errno_and_return_minus_one( ENOMEM );
429dc: 4eb9 0004 f098 jsr 4f098 <__errno> 429e2: 720c moveq #12,%d1 429e4: 2040 moveal %d0,%a0 429e6: 70ff moveq #-1,%d0
IMFS_update_ctime(new_node->Parent);
IMFS_update_mtime(new_node->Parent);
return 0;
}
429e8: 4cee 0c1c ffa8 moveml %fp@(-88),%d2-%d4/%a2-%a3
* existed. The result was simpler code which should not have
* this path.
*/
new_node = IMFS_create_node( pathloc, type, new_name, mode, &info );
if ( !new_node )
rtems_set_errno_and_return_minus_one( ENOMEM );
429ee: 2081 movel %d1,%a0@
IMFS_update_ctime(new_node->Parent);
IMFS_update_mtime(new_node->Parent);
return 0;
}
429f0: 4e5e unlk %fp <== NOT EXECUTED
000429f4 <IMFS_mount>:
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
429f4: 7001 moveq #1,%d0
#include <rtems/seterr.h>
int IMFS_mount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
429f6: 4e56 0000 linkw %fp,#0 429fa: 226e 0008 moveal %fp@(8),%a1
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
429fe: 2069 0008 moveal %a1@(8),%a0
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
42a02: b0a8 0048 cmpl %a0@(72),%d0
42a06: 660a bnes 42a12 <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;
42a08: 2149 0058 movel %a1,%a0@(88)
return 0;
42a0c: 4280 clrl %d0
}
42a0e: 4e5e unlk %fp 42a10: 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 );
42a12: 4eb9 0004 f098 jsr 4f098 <__errno> <== NOT EXECUTED 42a18: 7214 moveq #20,%d1 <== NOT EXECUTED 42a1a: 2040 moveal %d0,%a0 <== NOT EXECUTED 42a1c: 70ff moveq #-1,%d0 <== NOT EXECUTED
* the mounted file system.
*/
node->info.directory.mt_fs = mt_entry;
return 0;
}
42a1e: 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 );
42a20: 2081 movel %d1,%a0@ <== NOT EXECUTED
* the mounted file system.
*/
node->info.directory.mt_fs = mt_entry;
return 0;
}
000451e0 <IMFS_print_jnode>:
* This routine prints the contents of the specified jnode.
*/
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
451e0: 4e56 0000 linkw %fp,#0
IMFS_assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
451e4: 2079 0006 5bd8 moveal 65bd8 <_impure_ptr>,%a0
* This routine prints the contents of the specified jnode.
*/
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
451ea: 2f0a movel %a2,%sp@-
IMFS_assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
451ec: 2f28 0008 movel %a0@(8),%sp@-
* This routine prints the contents of the specified jnode.
*/
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
451f0: 246e 0008 moveal %fp@(8),%a2
IMFS_assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
451f4: 486a 000c pea %a2@(12) 451f8: 4eb9 0005 3a7c jsr 53a7c <fputs>
switch( the_jnode->type ) {
451fe: 202a 0048 movel %a2@(72),%d0 45202: 508f addql #8,%sp 45204: 7207 moveq #7,%d1 45206: b280 cmpl %d0,%d1
45208: 6424 bccs 4522e <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 );
4520a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4520c: 4879 0006 427a pea 6427a <map.6435+0x66> <== NOT EXECUTED 45212: 2079 0006 5bd8 moveal 65bd8 <_impure_ptr>,%a0 <== NOT EXECUTED 45218: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 4521c: 4eb9 0005 392e jsr 5392e <fprintf> <== NOT EXECUTED
return;
}
puts("");
}
45222: 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;
45226: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
}
puts("");
}
4522a: 4e5e unlk %fp <== NOT EXECUTED 4522c: 4e75 rts <== NOT EXECUTED
)
{
IMFS_assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
switch( the_jnode->type ) {
4522e: 323b 0a08 movew %pc@(45238 <IMFS_print_jnode+0x58>,%d0:l:2),%d1 45232: 48c1 extl %d1 45234: 4efb 1802 jmp %pc@(45238 <IMFS_print_jnode+0x58>,%d1:l)
45238: ffd2 .short 0xffd2 <== NOT EXECUTED 4523a: 003a .short 0x003a <== NOT EXECUTED 4523c: 0066 .short 0x0066 <== NOT EXECUTED 4523e: 0010 .short 0x0010 <== NOT EXECUTED 45240: 0010 .short 0x0010 <== NOT EXECUTED 45242: 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" );
45248: 2079 0006 5bd8 moveal 65bd8 <_impure_ptr>,%a0 4524e: 2f28 0008 movel %a0@(8),%sp@- 45252: 4878 0013 pea 13 <INVALID_OPERATION+0x3> 45256: 4878 0001 pea 1 <ADD> 4525a: 4879 0006 4253 pea 64253 <map.6435+0x3f> 45260: 4eb9 0005 45ac jsr 545ac <fwrite>
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
}
45266: 246e fffc moveal %fp@(-4),%a2
fprintf(stdout, " links not printed\n" );
return;
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
return;
4526a: 4fef 0010 lea %sp@(16),%sp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
}
4526e: 4e5e unlk %fp 45270: 4e75 rts
IMFS_assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
switch( the_jnode->type ) {
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
45272: 2079 0006 5bd8 moveal 65bd8 <_impure_ptr>,%a0 45278: 2f28 0008 movel %a0@(8),%sp@- 4527c: 4878 002f pea 2f <OPER2+0x1b> 45280: 4eb9 0005 39ac jsr 539ac <fputc>
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
}
45286: 246e fffc moveal %fp@(-4),%a2
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
4528a: 203c 0006 492e movel #411950,%d0
fprintf(stdout, "%s", the_jnode->name );
switch( the_jnode->type ) {
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
break;
45290: 508f addql #8,%sp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
45292: 2d40 0008 movel %d0,%fp@(8)
}
45296: 4e5e unlk %fp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
45298: 4ef9 0005 52ba jmp 552ba <puts>
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
break;
case IMFS_DEVICE:
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
4529e: 2f2a 0050 movel %a2@(80),%sp@- 452a2: 2f2a 004c movel %a2@(76),%sp@- 452a6: 2079 0006 5bd8 moveal 65bd8 <_impure_ptr>,%a0 452ac: 4879 0006 4225 pea 64225 <map.6435+0x11> 452b2: 2f28 0008 movel %a0@(8),%sp@- 452b6: 4eb9 0005 392e jsr 5392e <fprintf>
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
}
452bc: 246e fffc moveal %fp@(-4),%a2
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
452c0: 203c 0006 492e movel #411950,%d0
break;
case IMFS_DEVICE:
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
the_jnode->info.device.major, the_jnode->info.device.minor );
break;
452c6: 4fef 0010 lea %sp@(16),%sp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
452ca: 2d40 0008 movel %d0,%fp@(8)
}
452ce: 4e5e unlk %fp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
452d0: 4ef9 0005 52ba jmp 552ba <puts>
the_jnode->info.file.indirect,
the_jnode->info.file.doubly_indirect,
the_jnode->info.file.triply_indirect
);
#else
fprintf(stdout, " (file %" PRId32 ")",
452d6: 2f2a 0050 movel %a2@(80),%sp@- 452da: 2079 0006 5bd8 moveal 65bd8 <_impure_ptr>,%a0 452e0: 4879 0006 4247 pea 64247 <map.6435+0x33> 452e6: 2f28 0008 movel %a0@(8),%sp@- 452ea: 4eb9 0005 392e jsr 5392e <fprintf>
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
}
452f0: 246e fffc moveal %fp@(-4),%a2
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
452f4: 203c 0006 492e movel #411950,%d0
);
#else
fprintf(stdout, " (file %" PRId32 ")",
(uint32_t)the_jnode->info.file.size );
#endif
break;
452fa: 4fef 000c lea %sp@(12),%sp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
452fe: 2d40 0008 movel %d0,%fp@(8)
}
45302: 4e5e unlk %fp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
45304: 4ef9 0005 52ba jmp 552ba <puts>
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)",
4530a: 2f2a 0054 movel %a2@(84),%sp@- 4530e: 2f2a 0050 movel %a2@(80),%sp@- 45312: 2079 0006 5bd8 moveal 65bd8 <_impure_ptr>,%a0 45318: 4879 0006 4238 pea 64238 <map.6435+0x24> 4531e: 2f28 0008 movel %a0@(8),%sp@- 45322: 4eb9 0005 392e jsr 5392e <fprintf>
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
}
45328: 246e fffc moveal %fp@(-4),%a2
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
4532c: 203c 0006 492e movel #411950,%d0
case IMFS_LINEAR_FILE:
fprintf(stdout, " (file %" PRId32 " %p)",
(uint32_t)the_jnode->info.linearfile.size,
the_jnode->info.linearfile.direct
);
break;
45332: 4fef 0010 lea %sp@(16),%sp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
45336: 2d40 0008 movel %d0,%fp@(8)
}
4533a: 4e5e unlk %fp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
4533c: 4ef9 0005 52ba jmp 552ba <puts>
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
return;
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
45342: 2079 0006 5bd8 moveal 65bd8 <_impure_ptr>,%a0 45348: 2f28 0008 movel %a0@(8),%sp@- 4534c: 4878 0012 pea 12 <INVALID_OPERATION+0x2> 45350: 4878 0001 pea 1 <ADD> 45354: 4879 0006 4267 pea 64267 <map.6435+0x53> 4535a: 4eb9 0005 45ac jsr 545ac <fwrite>
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
}
45360: 246e fffc moveal %fp@(-4),%a2
fprintf(stdout, " links not printed\n" );
return;
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
return;
45364: 4fef 0010 lea %sp@(16),%sp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
}
45368: 4e5e unlk %fp <== NOT EXECUTED
00042a38 <IMFS_readlink>:
ssize_t IMFS_readlink(
rtems_filesystem_location_info_t *loc,
char *buf, /* OUT */
size_t bufsize
)
{
42a38: 4e56 fff4 linkw %fp,#-12
IMFS_jnode_t *node;
ssize_t i;
node = loc->node_access;
42a3c: 206e 0008 moveal %fp@(8),%a0
ssize_t IMFS_readlink(
rtems_filesystem_location_info_t *loc,
char *buf, /* OUT */
size_t bufsize
)
{
42a40: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 42a44: 266e 000c moveal %fp@(12),%a3 42a48: 242e 0010 movel %fp@(16),%d2
IMFS_jnode_t *node;
ssize_t i;
node = loc->node_access;
42a4c: 2450 moveal %a0@,%a2
IMFS_assert( node->type == IMFS_SYM_LINK );
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
42a4e: 672a beqs 42a7a <IMFS_readlink+0x42> <== NEVER TAKEN
42a50: 206a 004c moveal %a2@(76),%a0 42a54: 1210 moveb %a0@,%d1
42a56: 6722 beqs 42a7a <IMFS_readlink+0x42> <== NEVER TAKEN
42a58: 91c8 subal %a0,%a0 42a5a: 4280 clrl %d0 42a5c: 5280 addql #1,%d0
buf[i] = node->info.sym_link.name[i];
42a5e: 1781 8800 moveb %d1,%a3@(00000000,%a0:l)
node = loc->node_access;
IMFS_assert( node->type == IMFS_SYM_LINK );
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
42a62: 2040 moveal %d0,%a0 42a64: b480 cmpl %d0,%d2
42a66: 670a beqs 42a72 <IMFS_readlink+0x3a>
42a68: 226a 004c moveal %a2@(76),%a1 42a6c: 1231 0800 moveb %a1@(00000000,%d0:l),%d1
42a70: 66ea bnes 42a5c <IMFS_readlink+0x24>
buf[i] = node->info.sym_link.name[i];
return i;
}
42a72: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 42a76: 4e5e unlk %fp 42a78: 4e75 rts
node = loc->node_access;
IMFS_assert( node->type == IMFS_SYM_LINK );
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
42a7a: 4280 clrl %d0 <== NOT EXECUTED
buf[i] = node->info.sym_link.name[i];
return i;
}
42a7c: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 <== NOT EXECUTED 42a80: 4e5e unlk %fp <== NOT EXECUTED
00042a84 <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 */
)
{
42a84: 4e56 fff8 linkw %fp,#-8
IMFS_jnode_t *the_jnode;
IMFS_jnode_t *new_parent;
the_jnode = old_loc->node_access;
42a88: 206e 000c moveal %fp@(12),%a0
rtems_filesystem_location_info_t *old_parent_loc, /* IN */
rtems_filesystem_location_info_t *old_loc, /* IN */
rtems_filesystem_location_info_t *new_parent_loc, /* IN */
const char *new_name /* IN */
)
{
42a8c: 2f0a movel %a2,%sp@-
IMFS_jnode_t *the_jnode;
IMFS_jnode_t *new_parent;
the_jnode = old_loc->node_access;
strncpy( the_jnode->name, new_name, IMFS_NAME_MAX );
42a8e: 4878 0020 pea 20 <OPER2+0xc> 42a92: 2f2e 0014 movel %fp@(20),%sp@-
)
{
IMFS_jnode_t *the_jnode;
IMFS_jnode_t *new_parent;
the_jnode = old_loc->node_access;
42a96: 2450 moveal %a0@,%a2
strncpy( the_jnode->name, new_name, IMFS_NAME_MAX );
42a98: 486a 000c pea %a2@(12) 42a9c: 4eb9 0005 0420 jsr 50420 <strncpy>
if ( the_jnode->Parent != NULL )
42aa2: 4fef 000c lea %sp@(12),%sp 42aa6: 4aaa 0008 tstl %a2@(8)
42aaa: 670a beqs 42ab6 <IMFS_rename+0x32> <== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
42aac: 2f0a movel %a2,%sp@- 42aae: 4eb9 0004 75ac jsr 475ac <_Chain_Extract> 42ab4: 588f addql #4,%sp
rtems_chain_extract( (rtems_chain_node *) the_jnode );
new_parent = new_parent_loc->node_access;
42ab6: 206e 0010 moveal %fp@(16),%a0 42aba: 2050 moveal %a0@,%a0
the_jnode->Parent = new_parent;
42abc: 2548 0008 movel %a0,%a2@(8)
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
42ac0: 2f0a movel %a2,%sp@- 42ac2: 4868 004c pea %a0@(76) 42ac6: 4eb9 0004 7574 jsr 47574 <_Chain_Append>
rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node );
/*
* Update the time.
*/
IMFS_update_ctime( the_jnode );
42acc: 42a7 clrl %sp@- 42ace: 486e fff8 pea %fp@(-8) 42ad2: 4eb9 0004 336c jsr 4336c <gettimeofday> 42ad8: 256e fff8 0044 movel %fp@(-8),%a2@(68)
return 0;
}
42ade: 4280 clrl %d0 42ae0: 246e fff4 moveal %fp@(-12),%a2
42ae4: 4e5e unlk %fp <== NOT EXECUTED
0004a8c0 <IMFS_skip_separator>:
static void IMFS_skip_separator (
const char *path, /* IN */
size_t *len, /* IN/OUT */
int *index /* IN/OUT */
)
{
4a8c0: 4e56 fff0 linkw %fp,#-16 4a8c4: 48d7 3c00 moveml %a2-%a5,%sp@ 4a8c8: 266e 0010 moveal %fp@(16),%a3 4a8cc: 4bf9 0004 4220 lea 44220 <rtems_filesystem_is_separator>,%a5 4a8d2: 2013 movel %a3@,%d0 4a8d4: 246e 0008 moveal %fp@(8),%a2
while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) {
4a8d8: 1032 0800 moveb %a2@(00000000,%d0:l),%d0
static void IMFS_skip_separator (
const char *path, /* IN */
size_t *len, /* IN/OUT */
int *index /* IN/OUT */
)
{
4a8dc: 286e 000c moveal %fp@(12),%a4
while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) {
4a8e0: 49c0 extbl %d0 4a8e2: 2f00 movel %d0,%sp@- 4a8e4: 4e95 jsr %a5@ 4a8e6: 588f addql #4,%sp 4a8e8: 4a80 tstl %d0
4a8ea: 6726 beqs 4a912 <IMFS_skip_separator+0x52> <== NEVER TAKEN
4a8ec: 2013 movel %a3@,%d0 4a8ee: 4a32 0800 tstb %a2@(00000000,%d0:l)
4a8f2: 671e beqs 4a912 <IMFS_skip_separator+0x52>
4a8f4: 2214 movel %a4@,%d1
++(*index);
4a8f6: 5280 addql #1,%d0
const char *path, /* IN */
size_t *len, /* IN/OUT */
int *index /* IN/OUT */
)
{
while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) {
4a8f8: 4a81 tstl %d1
4a8fa: 6716 beqs 4a912 <IMFS_skip_separator+0x52> <== NEVER TAKEN
++(*index);
4a8fc: 2680 movel %d0,%a3@
--(*len);
4a8fe: 5381 subql #1,%d1 4a900: 2881 movel %d1,%a4@
const char *path, /* IN */
size_t *len, /* IN/OUT */
int *index /* IN/OUT */
)
{
while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) {
4a902: 1032 0800 moveb %a2@(00000000,%d0:l),%d0 4a906: 49c0 extbl %d0 4a908: 2f00 movel %d0,%sp@- 4a90a: 4e95 jsr %a5@ 4a90c: 588f addql #4,%sp 4a90e: 4a80 tstl %d0
4a910: 66da bnes 4a8ec <IMFS_skip_separator+0x2c>
++(*index);
--(*len);
}
}
4a912: 4cee 3c00 fff0 moveml %fp@(-16),%a2-%a5
4a918: 4e5e unlk %fp <== NOT EXECUTED
0004b538 <IMFS_stat>:
IMFS_device_t *io;
the_jnode = loc->node_access;
switch ( the_jnode->type ) {
4b538: 7007 moveq #7,%d0
int IMFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
4b53a: 4e56 0000 linkw %fp,#0 4b53e: 206e 000c moveal %fp@(12),%a0 4b542: 2f0a movel %a2,%sp@- 4b544: 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;
4b548: 2252 moveal %a2@,%a1
switch ( the_jnode->type ) {
4b54a: b0a9 0048 cmpl %a1@(72),%d0
4b54e: 6418 bccs 4b568 <IMFS_stat+0x30> <== ALWAYS TAKEN
case IMFS_FIFO:
buf->st_size = 0;
break;
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
4b550: 4eb9 0004 f098 jsr 4f098 <__errno>
buf->st_ctime = the_jnode->stat_ctime;
buf->st_blksize = imfs_rq_memfile_bytes_per_block;
return 0;
}
4b556: 246e fffc moveal %fp@(-4),%a2
case IMFS_FIFO:
buf->st_size = 0;
break;
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
4b55a: 2040 moveal %d0,%a0 4b55c: 70ff moveq #-1,%d0
buf->st_ctime = the_jnode->stat_ctime;
buf->st_blksize = imfs_rq_memfile_bytes_per_block;
return 0;
}
4b55e: 4e5e unlk %fp
case IMFS_FIFO:
buf->st_size = 0;
break;
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
4b560: 20bc 0000 0086 movel #134,%a0@
buf->st_ctime = the_jnode->stat_ctime;
buf->st_blksize = imfs_rq_memfile_bytes_per_block;
return 0;
}
4b566: 4e75 rts
IMFS_device_t *io;
the_jnode = loc->node_access;
switch ( the_jnode->type ) {
4b568: 2029 0048 movel %a1@(72),%d0 4b56c: d080 addl %d0,%d0 4b56e: 303b 0808 movew %pc@(4b578 <IMFS_stat+0x40>,%d0:l),%d0 4b572: 48c0 extl %d0 4b574: 4efb 0802 jmp %pc@(4b578 <IMFS_stat+0x40>,%d0:l)
4b578: ffd8 .short 0xffd8 <== NOT EXECUTED 4b57a: ffd8 .short 0xffd8 <== NOT EXECUTED 4b57c: 00d6 .short 0x00d6 <== NOT EXECUTED 4b57e: ffd8 .short 0xffd8 <== NOT EXECUTED 4b580: 0010 .short 0x0010 <== NOT EXECUTED 4b582: 0074 .short 0x0074 <== NOT EXECUTED 4b584: 0074 .short 0x0074 <== NOT EXECUTED 4b586: 0010 .short 0x0010 <== 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;
4b588: 246a 0010 moveal %a2@(16),%a2
case IMFS_SYM_LINK:
buf->st_size = 0;
break;
case IMFS_FIFO:
buf->st_size = 0;
4b58c: 4280 clrl %d0 4b58e: 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 );
4b590: 246a 0034 moveal %a2@(52),%a2
case IMFS_SYM_LINK:
buf->st_size = 0;
break;
case IMFS_FIFO:
buf->st_size = 0;
4b594: 2140 001e movel %d0,%a0@(30) 4b598: 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 );
4b59c: 2212 movel %a2@,%d1
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
buf->st_blksize = imfs_rq_memfile_bytes_per_block;
return 0;
4b59e: 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;
4b5a0: 2169 002e 000c movel %a1@(46),%a0@(12)
buf->st_nlink = the_jnode->st_nlink;
4b5a6: 3169 0032 0010 movew %a1@(50),%a0@(16)
buf->st_ino = the_jnode->st_ino;
4b5ac: 2169 0034 0008 movel %a1@(52),%a0@(8)
buf->st_uid = the_jnode->st_uid;
4b5b2: 3169 0038 0012 movew %a1@(56),%a0@(18)
buf->st_gid = the_jnode->st_gid;
4b5b8: 3169 003a 0014 movew %a1@(58),%a0@(20)
buf->st_atime = the_jnode->stat_atime;
4b5be: 2169 003c 0026 movel %a1@(60),%a0@(38)
buf->st_mtime = the_jnode->stat_mtime;
4b5c4: 2169 0040 002e movel %a1@(64),%a0@(46)
buf->st_ctime = the_jnode->stat_ctime;
4b5ca: 2169 0044 0036 movel %a1@(68),%a0@(54)
buf->st_blksize = imfs_rq_memfile_bytes_per_block;
4b5d0: 43f9 0005 f78e lea 5f78e <imfs_rq_memfile_bytes_per_block>,%a1 4b5d6: 2151 003e movel %a1@,%a0@(62)
/* * 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 =
4b5da: 2141 0004 movel %d1,%a0@(4) 4b5de: 20bc 0000 fffe movel #65534,%a0@
buf->st_ctime = the_jnode->stat_ctime;
buf->st_blksize = imfs_rq_memfile_bytes_per_block;
return 0;
}
4b5e4: 246e fffc moveal %fp@(-4),%a2 4b5e8: 4e5e unlk %fp 4b5ea: 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;
4b5ec: 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;
4b5f0: 2029 004c movel %a1@(76),%d0 4b5f4: 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 );
4b5f8: 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;
4b5fc: 2140 001e movel %d0,%a0@(30) 4b600: 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 );
4b604: 2212 movel %a2@,%d1
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
buf->st_blksize = imfs_rq_memfile_bytes_per_block;
return 0;
4b606: 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;
4b608: 2169 002e 000c movel %a1@(46),%a0@(12)
buf->st_nlink = the_jnode->st_nlink;
4b60e: 3169 0032 0010 movew %a1@(50),%a0@(16)
buf->st_ino = the_jnode->st_ino;
4b614: 2169 0034 0008 movel %a1@(52),%a0@(8)
buf->st_uid = the_jnode->st_uid;
4b61a: 3169 0038 0012 movew %a1@(56),%a0@(18)
buf->st_gid = the_jnode->st_gid;
4b620: 3169 003a 0014 movew %a1@(58),%a0@(20)
buf->st_atime = the_jnode->stat_atime;
4b626: 2169 003c 0026 movel %a1@(60),%a0@(38)
buf->st_mtime = the_jnode->stat_mtime;
4b62c: 2169 0040 002e movel %a1@(64),%a0@(46)
buf->st_ctime = the_jnode->stat_ctime;
4b632: 2169 0044 0036 movel %a1@(68),%a0@(54)
buf->st_blksize = imfs_rq_memfile_bytes_per_block;
4b638: 43f9 0005 f78e lea 5f78e <imfs_rq_memfile_bytes_per_block>,%a1 4b63e: 2151 003e movel %a1@,%a0@(62)
/* * 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 =
4b642: 2141 0004 movel %d1,%a0@(4) 4b646: 20bc 0000 fffe movel #65534,%a0@ 4b64c: 6096 bras 4b5e4 <IMFS_stat+0xac>
/*
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
4b64e: 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 );
4b652: 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 );
4b656: 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 );
4b65a: 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 );
4b660: 2212 movel %a2@,%d1
buf->st_mode = the_jnode->st_mode;
4b662: 2169 002e 000c movel %a1@(46),%a0@(12)
buf->st_nlink = the_jnode->st_nlink;
4b668: 3169 0032 0010 movew %a1@(50),%a0@(16)
buf->st_ino = the_jnode->st_ino;
4b66e: 2169 0034 0008 movel %a1@(52),%a0@(8)
buf->st_uid = the_jnode->st_uid;
4b674: 3169 0038 0012 movew %a1@(56),%a0@(18)
buf->st_gid = the_jnode->st_gid;
4b67a: 3169 003a 0014 movew %a1@(58),%a0@(20)
buf->st_atime = the_jnode->stat_atime;
4b680: 2169 003c 0026 movel %a1@(60),%a0@(38)
buf->st_mtime = the_jnode->stat_mtime;
4b686: 2169 0040 002e movel %a1@(64),%a0@(46)
buf->st_ctime = the_jnode->stat_ctime;
4b68c: 2169 0044 0036 movel %a1@(68),%a0@(54)
buf->st_blksize = imfs_rq_memfile_bytes_per_block;
4b692: 43f9 0005 f78e lea 5f78e <imfs_rq_memfile_bytes_per_block>,%a1 4b698: 2151 003e movel %a1@,%a0@(62)
switch ( the_jnode->type ) {
case IMFS_DEVICE:
io = &the_jnode->info.device;
buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
4b69c: 2140 001a movel %d0,%a0@(26)
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
buf->st_blksize = imfs_rq_memfile_bytes_per_block;
return 0;
4b6a0: 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 =
4b6a2: 20bc 0000 fffe movel #65534,%a0@ 4b6a8: 2141 0004 movel %d1,%a0@(4) 4b6ac: 6000 ff36 braw 4b5e4 <IMFS_stat+0xac>
00042b9c <IMFS_unlink>:
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
42b9c: 7003 moveq #3,%d0
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
42b9e: 4e56 ffd4 linkw %fp,#-44 42ba2: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 42ba6: 246e 000c moveal %fp@(12),%a2 42baa: 242e 0008 movel %fp@(8),%d2
IMFS_jnode_t *node;
rtems_filesystem_location_info_t the_link;
int result = 0;
node = loc->node_access;
42bae: 2652 moveal %a2@,%a3
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
42bb0: b0ab 0048 cmpl %a3@(72),%d0
42bb4: 671a beqs 42bd0 <IMFS_unlink+0x34>
/*
* Now actually free the node we were asked to free.
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
42bb6: 2f0a movel %a2,%sp@- 42bb8: 206a 0008 moveal %a2@(8),%a0 42bbc: 2f02 movel %d2,%sp@- 42bbe: 2068 0034 moveal %a0@(52),%a0 42bc2: 4e90 jsr %a0@
return result;
42bc4: 508f addql #8,%sp
}
42bc6: 4cee 0c0c ffd4 moveml %fp@(-44),%d2-%d3/%a2-%a3 42bcc: 4e5e unlk %fp 42bce: 4e75 rts
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
42bd0: 202b 004c movel %a3@(76),%d0 42bd4: 6700 008c beqw 42c62 <IMFS_unlink+0xc6>
rtems_set_errno_and_return_minus_one( EINVAL );
the_link = *loc;
42bd8: 41ea 0004 lea %a2@(4),%a0
/*
* 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)
42bdc: 7601 moveq #1,%d3
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
rtems_set_errno_and_return_minus_one( EINVAL );
the_link = *loc;
42bde: 2d58 ffe8 movel %a0@+,%fp@(-24) 42be2: 2d58 ffec movel %a0@+,%fp@(-20) 42be6: 2d58 fff0 movel %a0@+,%fp@(-16) 42bea: 2d50 fff4 movel %a0@,%fp@(-12)
the_link.node_access = node->info.hard_link.link_node;
IMFS_Set_handlers( &the_link );
42bee: 486e ffe4 pea %fp@(-28)
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;
42bf2: 2d40 ffe4 movel %d0,%fp@(-28)
IMFS_Set_handlers( &the_link );
42bf6: 4eb9 0004 a91c jsr 4a91c <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)
42bfc: 206b 004c moveal %a3@(76),%a0 42c00: 4281 clrl %d1 42c02: 588f addql #4,%sp 42c04: 3028 0032 movew %a0@(50),%d0 42c08: 3200 movew %d0,%d1 42c0a: b681 cmpl %d1,%d3
42c0c: 6730 beqs 42c3e <IMFS_unlink+0xa2>
if ( result != 0 )
return -1;
}
else
{
node->info.hard_link.link_node->st_nlink --;
42c0e: 5380 subql #1,%d0 42c10: 3140 0032 movew %d0,%a0@(50)
IMFS_update_ctime( node->info.hard_link.link_node );
42c14: 42a7 clrl %sp@- 42c16: 486e fff8 pea %fp@(-8) 42c1a: 4eb9 0004 336c jsr 4336c <gettimeofday> 42c20: 206b 004c moveal %a3@(76),%a0 42c24: 508f addql #8,%sp 42c26: 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 );
42c2c: 2f0a movel %a2,%sp@- 42c2e: 206a 0008 moveal %a2@(8),%a0 42c32: 2f02 movel %d2,%sp@- 42c34: 2068 0034 moveal %a0@(52),%a0 42c38: 4e90 jsr %a0@
return result;
42c3a: 508f addql #8,%sp 42c3c: 6088 bras 42bc6 <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 );
42c3e: 486e ffe4 pea %fp@(-28) 42c42: 206e ffec moveal %fp@(-20),%a0 42c46: 2f02 movel %d2,%sp@- 42c48: 2068 0034 moveal %a0@(52),%a0 42c4c: 4e90 jsr %a0@
if ( result != 0 )
42c4e: 508f addql #8,%sp 42c50: 4a80 tstl %d0 42c52: 6700 ff62 beqw 42bb6 <IMFS_unlink+0x1a>
return -1;
42c56: 70ff moveq #-1,%d0
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
return result;
}
42c58: 4cee 0c0c ffd4 moveml %fp@(-44),%d2-%d3/%a2-%a3 42c5e: 4e5e unlk %fp 42c60: 4e75 rts
*/
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
rtems_set_errno_and_return_minus_one( EINVAL );
42c62: 4eb9 0004 f098 jsr 4f098 <__errno> <== NOT EXECUTED 42c68: 7216 moveq #22,%d1 <== NOT EXECUTED 42c6a: 2040 moveal %d0,%a0 <== NOT EXECUTED 42c6c: 70ff moveq #-1,%d0 <== NOT EXECUTED
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
return result;
}
42c6e: 4cee 0c0c ffd4 moveml %fp@(-44),%d2-%d3/%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 );
42c74: 2081 movel %d1,%a0@ <== NOT EXECUTED
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
return result;
}
42c76: 4e5e unlk %fp <== NOT EXECUTED
...
00042c7c <IMFS_unmount>:
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
42c7c: 7001 moveq #1,%d0
#include <rtems/seterr.h>
int IMFS_unmount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
42c7e: 4e56 0000 linkw %fp,#0 42c82: 206e 0008 moveal %fp@(8),%a0
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
42c86: 2068 0008 moveal %a0@(8),%a0
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
42c8a: b0a8 0048 cmpl %a0@(72),%d0
42c8e: 6610 bnes 42ca0 <IMFS_unmount+0x24> <== NEVER TAKEN
/*
* Did the node indicate that there was a directory mounted here?
*/
if ( node->info.directory.mt_fs == NULL )
42c90: 4aa8 0058 tstl %a0@(88)
42c94: 671c beqs 42cb2 <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;
42c96: 42a8 0058 clrl %a0@(88)
return 0;
42c9a: 4280 clrl %d0
}
42c9c: 4e5e unlk %fp 42c9e: 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 );
42ca0: 4eb9 0004 f098 jsr 4f098 <__errno> <== NOT EXECUTED 42ca6: 7214 moveq #20,%d1 <== NOT EXECUTED 42ca8: 2040 moveal %d0,%a0 <== NOT EXECUTED 42caa: 70ff moveq #-1,%d0 <== NOT EXECUTED
*/
node->info.directory.mt_fs = NULL;
return 0;
}
42cac: 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 );
42cae: 2081 movel %d1,%a0@ <== NOT EXECUTED
*/
node->info.directory.mt_fs = NULL;
return 0;
}
42cb0: 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 */
42cb2: 4eb9 0004 f098 jsr 4f098 <__errno> <== NOT EXECUTED 42cb8: 7216 moveq #22,%d1 <== NOT EXECUTED 42cba: 2040 moveal %d0,%a0 <== NOT EXECUTED 42cbc: 70ff moveq #-1,%d0 <== NOT EXECUTED
*/
node->info.directory.mt_fs = NULL;
return 0;
}
42cbe: 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 */
42cc0: 2081 movel %d1,%a0@ <== NOT EXECUTED
*/
node->info.directory.mt_fs = NULL;
return 0;
}
00043538 <RTEMS_Malloc_Initialize>:
void RTEMS_Malloc_Initialize(
void *heap_begin,
uintptr_t heap_size,
size_t sbrk_amount
)
{
43538: 4e56 0000 linkw %fp,#0
/*
* If configured, initialize the statistics support
*/
if ( rtems_malloc_statistics_helpers != NULL ) {
4353c: 2079 0005 fec4 moveal 5fec4 <rtems_malloc_statistics_helpers>,%a0
void RTEMS_Malloc_Initialize(
void *heap_begin,
uintptr_t heap_size,
size_t sbrk_amount
)
{
43542: 2f03 movel %d3,%sp@- 43544: 262e 0008 movel %fp@(8),%d3 43548: 2f02 movel %d2,%sp@- 4354a: 242e 000c movel %fp@(12),%d2
/*
* If configured, initialize the statistics support
*/
if ( rtems_malloc_statistics_helpers != NULL ) {
4354e: 4a88 tstl %a0
43550: 6704 beqs 43556 <RTEMS_Malloc_Initialize+0x1e>
(*rtems_malloc_statistics_helpers->initialize)();
43552: 2050 moveal %a0@,%a0 43554: 4e90 jsr %a0@
}
/*
* Initialize the garbage collection list to start with nothing on it.
*/
malloc_deferred_frees_initialize();
43556: 4eb9 0004 34bc jsr 434bc <malloc_deferred_frees_initialize>
/*
* Initialize the optional sbrk support for extending the heap
*/
if ( rtems_malloc_sbrk_helpers != NULL ) {
4355c: 2079 0005 fec0 moveal 5fec0 <rtems_malloc_sbrk_helpers>,%a0 43562: 4a88 tstl %a0
43564: 6712 beqs 43578 <RTEMS_Malloc_Initialize+0x40>
void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)(
43566: 2f2e 0010 movel %fp@(16),%sp@-
heap_begin,
sbrk_amount
);
heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin;
4356a: d483 addl %d3,%d2
/*
* Initialize the optional sbrk support for extending the heap
*/
if ( rtems_malloc_sbrk_helpers != NULL ) {
void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)(
4356c: 2f03 movel %d3,%sp@- 4356e: 2050 moveal %a0@,%a0 43570: 4e90 jsr %a0@
heap_begin,
sbrk_amount
);
heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin;
43572: 508f addql #8,%sp 43574: 9480 subl %d0,%d2
heap_begin = new_heap_begin;
43576: 2600 movel %d0,%d3
* 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 (
43578: 4a39 0005 fec8 tstb 5fec8 <rtems_unified_work_area>
4357e: 6624 bnes 435a4 <RTEMS_Malloc_Initialize+0x6c>
!rtems_unified_work_area
&& rtems_configuration_get_do_zero_of_workspace()
43580: 4a39 0005 f694 tstb 5f694 <Configuration+0x28>
43586: 6644 bnes 435cc <RTEMS_Malloc_Initialize+0x94>
void *area_begin,
uintptr_t area_size,
uintptr_t page_size
)
{
return _Heap_Initialize( heap, area_begin, area_size, page_size );
43588: 4878 0004 pea 4 <CONTEXT_ARG> 4358c: 2f02 movel %d2,%sp@- 4358e: 2f03 movel %d3,%sp@- 43590: 2f39 0005 f74a movel 5f74a <RTEMS_Malloc_Heap>,%sp@- 43596: 4eb9 0004 7c62 jsr 47c62 <_Heap_Initialize>
RTEMS_Malloc_Heap,
heap_begin,
heap_size,
CPU_HEAP_ALIGNMENT
);
if ( status == 0 ) {
4359c: 4fef 0010 lea %sp@(16),%sp 435a0: 4a80 tstl %d0
435a2: 675c beqs 43600 <RTEMS_Malloc_Initialize+0xc8>
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
}
}
MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) );
435a4: 2f39 0005 f74a movel 5f74a <RTEMS_Malloc_Heap>,%sp@- 435aa: 2439 0006 0f0c movel 60f0c <rtems_malloc_statistics>,%d2 435b0: 4eb9 0004 87c4 jsr 487c4 <_Protected_heap_Get_size>
}
435b6: 262e fffc movel %fp@(-4),%d3
if ( status == 0 ) {
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
}
}
MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) );
435ba: d082 addl %d2,%d0 435bc: 588f addql #4,%sp
}
435be: 242e fff8 movel %fp@(-8),%d2 435c2: 4e5e unlk %fp
if ( status == 0 ) {
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
}
}
MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) );
435c4: 23c0 0006 0f0c movel %d0,60f0c <rtems_malloc_statistics>
}
435ca: 4e75 rts
if (
!rtems_unified_work_area
&& rtems_configuration_get_do_zero_of_workspace()
) {
memset( heap_begin, 0, heap_size );
435cc: 2f02 movel %d2,%sp@- 435ce: 42a7 clrl %sp@- 435d0: 2f03 movel %d3,%sp@- 435d2: 4eb9 0004 f928 jsr 4f928 <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 ) {
435d8: 4fef 000c lea %sp@(12),%sp 435dc: 4a39 0005 fec8 tstb 5fec8 <rtems_unified_work_area>
435e2: 66c0 bnes 435a4 <RTEMS_Malloc_Initialize+0x6c> <== NEVER TAKEN
435e4: 4878 0004 pea 4 <CONTEXT_ARG> 435e8: 2f02 movel %d2,%sp@- 435ea: 2f03 movel %d3,%sp@- 435ec: 2f39 0005 f74a movel 5f74a <RTEMS_Malloc_Heap>,%sp@- 435f2: 4eb9 0004 7c62 jsr 47c62 <_Heap_Initialize>
RTEMS_Malloc_Heap,
heap_begin,
heap_size,
CPU_HEAP_ALIGNMENT
);
if ( status == 0 ) {
435f8: 4fef 0010 lea %sp@(16),%sp 435fc: 4a80 tstl %d0
435fe: 66a4 bnes 435a4 <RTEMS_Malloc_Initialize+0x6c> <== ALWAYS TAKEN
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
43600: 4878 001a pea 1a <OPER2+0x6> 43604: 4eb9 0004 724c jsr 4724c <rtems_fatal_error_occurred>
...
00042b58 <Stack_check_Dump_threads_usage>:
/*
* Obtain interrupt stack information
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (the_thread == (Thread_Control *) -1) {
42b58: 70ff moveq #-1,%d0 <== NOT EXECUTED
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
42b5a: 4e56 ffdc linkw %fp,#-36 <== NOT EXECUTED 42b5e: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ <== NOT EXECUTED 42b62: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
/*
* Obtain interrupt stack information
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (the_thread == (Thread_Control *) -1) {
42b66: b08a cmpl %a2,%d0 <== NOT EXECUTED 42b68: 6700 015a beqw 42cc4 <Stack_check_Dump_threads_usage+0x16c><== NOT EXECUTED
current = 0;
} else
#endif
{
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
42b6c: 262a 00f2 movel %a2@(242),%d3 <== NOT EXECUTED
the_thread = 0;
current = 0;
} else
#endif
{
stack = &the_thread->Start.Initial_stack;
42b70: 47ea 00b2 lea %a2@(178),%a3 <== NOT EXECUTED
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
42b74: 226a 00b6 moveal %a2@(182),%a1 <== NOT EXECUTED
}
low = Stack_check_usable_stack_start(stack);
size = Stack_check_usable_stack_size(stack);
42b78: 2413 movel %a3@,%d2 <== NOT EXECUTED
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
for (ebase = base + length; base < ebase; base++)
42b7a: 72fc moveq #-4,%d1 <== NOT EXECUTED
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
low = Stack_check_usable_stack_start(stack);
size = Stack_check_usable_stack_size(stack);
42b7c: 0682 ffff fff0 addil #-16,%d2 <== NOT EXECUTED
/*
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
42b82: 2009 movel %a1,%d0 <== NOT EXECUTED 42b84: 0680 0000 0020 addil #32,%d0 <== NOT EXECUTED
for (ebase = base + length; base < ebase; base++)
42b8a: c282 andl %d2,%d1 <== NOT EXECUTED 42b8c: d280 addl %d0,%d1 <== NOT EXECUTED 42b8e: b280 cmpl %d0,%d1 <== NOT EXECUTED 42b90: 6300 00bc blsw 42c4e <Stack_check_Dump_threads_usage+0xf6><== NOT EXECUTED
if (*base != U32_PATTERN)
42b94: 283c a5a5 a5a5 movel #-1515870811,%d4 <== NOT EXECUTED 42b9a: b8a9 0020 cmpl %a1@(32),%d4 <== NOT EXECUTED 42b9e: 6616 bnes 42bb6 <Stack_check_Dump_threads_usage+0x5e><== NOT EXECUTED
* Try to print out how much stack was actually used by the task.
*/
static void *print_context;
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
42ba0: 41e9 0024 lea %a1@(36),%a0 <== NOT EXECUTED
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
for (ebase = base + length; base < ebase; base++)
42ba4: 5880 addql #4,%d0 <== NOT EXECUTED 42ba6: b081 cmpl %d1,%d0 <== NOT EXECUTED 42ba8: 6400 00a4 bccw 42c4e <Stack_check_Dump_threads_usage+0xf6><== NOT EXECUTED
if (*base != U32_PATTERN)
42bac: 283c a5a5 a5a5 movel #-1515870811,%d4 <== NOT EXECUTED 42bb2: b898 cmpl %a0@+,%d4 <== NOT EXECUTED 42bb4: 67ee beqs 42ba4 <Stack_check_Dump_threads_usage+0x4c><== NOT EXECUTED
low = Stack_check_usable_stack_start(stack);
size = Stack_check_usable_stack_size(stack);
high_water_mark = Stack_check_find_high_water_mark(low, size);
if ( high_water_mark )
42bb6: 4a80 tstl %d0 <== NOT EXECUTED 42bb8: 6700 0094 beqw 42c4e <Stack_check_Dump_threads_usage+0xf6><== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark );
42bbc: 49f1 2810 lea %a1@(00000010,%d2:l),%a4 <== NOT EXECUTED 42bc0: 99c0 subal %d0,%a4 <== NOT EXECUTED
else
used = 0;
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if ( the_thread )
42bc2: 4a8a tstl %a2 <== NOT EXECUTED 42bc4: 6700 0090 beqw 42c56 <Stack_check_Dump_threads_usage+0xfe><== NOT EXECUTED
#endif
{
(*print_handler)(
42bc8: 486e fffb pea %fp@(-5) <== NOT EXECUTED 42bcc: 4878 0005 pea 5 <COMPARE> <== NOT EXECUTED 42bd0: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 42bd4: 2a79 0006 352c moveal 6352c <print_handler>,%a5 <== NOT EXECUTED 42bda: 4eb9 0004 940c jsr 4940c <rtems_object_get_name> <== NOT EXECUTED 42be0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42be2: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 42be6: 4879 0006 0e91 pea 60e91 <map.6435+0x11> <== NOT EXECUTED 42bec: 2f39 0006 3530 movel 63530 <print_context>,%sp@- <== NOT EXECUTED 42bf2: 4e95 jsr %a5@ <== NOT EXECUTED
(*print_handler)(
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
42bf4: 206b 0004 moveal %a3@(4),%a0 <== NOT EXECUTED
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if ( the_thread )
#endif
{
(*print_handler)(
42bf8: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
#endif
(*print_handler)(
42bfc: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42bfe: 2f03 movel %d3,%sp@- <== NOT EXECUTED
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
42c00: 2013 movel %a3@,%d0 <== NOT EXECUTED 42c02: 5380 subql #1,%d0 <== NOT EXECUTED
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
#endif
(*print_handler)(
42c04: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 42c08: 2f08 movel %a0,%sp@- <== NOT EXECUTED 42c0a: 4879 0006 0eac pea 60eac <map.6435+0x2c> <== NOT EXECUTED 42c10: 2f39 0006 3530 movel 63530 <print_context>,%sp@- <== NOT EXECUTED 42c16: 2079 0006 352c moveal 6352c <print_handler>,%a0 <== NOT EXECUTED 42c1c: 4e90 jsr %a0@ <== NOT EXECUTED
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
42c1e: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 42c22: 4ab9 0006 3528 tstl 63528 <Stack_check_Initialized> <== NOT EXECUTED 42c28: 677a beqs 42ca4 <Stack_check_Dump_threads_usage+0x14c><== NOT EXECUTED
(*print_handler)( print_context, "Unavailable\n" );
} else {
(*print_handler)( print_context, "%8" PRId32 "\n", used );
42c2a: 2f0c movel %a4,%sp@- <== NOT EXECUTED 42c2c: 4879 0006 0ed7 pea 60ed7 <map.6435+0x57> <== NOT EXECUTED 42c32: 2f39 0006 3530 movel 63530 <print_context>,%sp@- <== NOT EXECUTED 42c38: 2079 0006 352c moveal 6352c <print_handler>,%a0 <== NOT EXECUTED 42c3e: 4e90 jsr %a0@ <== NOT EXECUTED 42c40: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
}
}
42c44: 4cee 3c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a5 <== NOT EXECUTED 42c4a: 4e5e unlk %fp <== NOT EXECUTED 42c4c: 4e75 rts <== NOT EXECUTED
high_water_mark = Stack_check_find_high_water_mark(low, size);
if ( high_water_mark )
used = Stack_check_Calculate_used( low, size, high_water_mark );
else
used = 0;
42c4e: 99cc subal %a4,%a4 <== NOT EXECUTED
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if ( the_thread )
42c50: 4a8a tstl %a2 <== NOT EXECUTED 42c52: 6600 ff74 bnew 42bc8 <Stack_check_Dump_threads_usage+0x70><== NOT EXECUTED
rtems_object_get_name( the_thread->Object.id, sizeof(name), name )
);
}
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
42c56: 4878 ffff pea ffffffff <LESS> <== NOT EXECUTED 42c5a: 4879 0006 0e9e pea 60e9e <map.6435+0x1e> <== NOT EXECUTED 42c60: 2f39 0006 3530 movel 63530 <print_context>,%sp@- <== NOT EXECUTED 42c66: 2079 0006 352c moveal 6352c <print_handler>,%a0 <== NOT EXECUTED 42c6c: 4e90 jsr %a0@ <== NOT EXECUTED
(*print_handler)(
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
42c6e: 206b 0004 moveal %a3@(4),%a0 <== NOT EXECUTED
rtems_object_get_name( the_thread->Object.id, sizeof(name), name )
);
}
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
42c72: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
}
#endif
(*print_handler)(
42c76: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42c78: 2f03 movel %d3,%sp@- <== NOT EXECUTED
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
42c7a: 2013 movel %a3@,%d0 <== NOT EXECUTED 42c7c: 5380 subql #1,%d0 <== NOT EXECUTED
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
#endif
(*print_handler)(
42c7e: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 42c82: 2f08 movel %a0,%sp@- <== NOT EXECUTED 42c84: 4879 0006 0eac pea 60eac <map.6435+0x2c> <== NOT EXECUTED 42c8a: 2f39 0006 3530 movel 63530 <print_context>,%sp@- <== NOT EXECUTED 42c90: 2079 0006 352c moveal 6352c <print_handler>,%a0 <== NOT EXECUTED 42c96: 4e90 jsr %a0@ <== NOT EXECUTED
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
42c98: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 42c9c: 4ab9 0006 3528 tstl 63528 <Stack_check_Initialized> <== NOT EXECUTED 42ca2: 6686 bnes 42c2a <Stack_check_Dump_threads_usage+0xd2><== NOT EXECUTED
(*print_handler)( print_context, "Unavailable\n" );
42ca4: 4879 0006 0eca pea 60eca <map.6435+0x4a> <== NOT EXECUTED 42caa: 2f39 0006 3530 movel 63530 <print_context>,%sp@- <== NOT EXECUTED 42cb0: 2079 0006 352c moveal 6352c <print_handler>,%a0 <== NOT EXECUTED 42cb6: 4e90 jsr %a0@ <== NOT EXECUTED 42cb8: 508f addql #8,%sp <== NOT EXECUTED
} else {
(*print_handler)( print_context, "%8" PRId32 "\n", used );
}
}
42cba: 4cee 3c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a5 <== NOT EXECUTED 42cc0: 4e5e unlk %fp <== NOT EXECUTED 42cc2: 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)
42cc4: 2279 0006 3d48 moveal 63d48 <Stack_check_Interrupt_stack+0x4>,%a1<== NOT EXECUTED 42cca: 4a89 tstl %a1 <== NOT EXECUTED 42ccc: 6700 ff76 beqw 42c44 <Stack_check_Dump_threads_usage+0xec><== NOT EXECUTED
return;
stack = &Stack_check_Interrupt_stack;
42cd0: 47f9 0006 3d44 lea 63d44 <Stack_check_Interrupt_stack>,%a3 <== NOT EXECUTED
the_thread = 0;
current = 0;
42cd6: 4283 clrl %d3 <== NOT EXECUTED
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (the_thread == (Thread_Control *) -1) {
if (!Stack_check_Interrupt_stack.area)
return;
stack = &Stack_check_Interrupt_stack;
the_thread = 0;
42cd8: 95ca subal %a2,%a2 <== NOT EXECUTED 42cda: 6000 fe9c braw 42b78 <Stack_check_Dump_threads_usage+0x20><== NOT EXECUTED
00042cde <Stack_check_Initialize>:
/*
* Stack_check_Initialize
*/
void Stack_check_Initialize( void )
{
42cde: 4e56 0000 linkw %fp,#0
static uint32_t pattern[ 4 ] = {
0xFEEDF00D, 0x0BAD0D06, /* FEED FOOD to BAD DOG */
0xDEADF00D, 0x600D0D06 /* DEAD FOOD but GOOD DOG */
};
if ( Stack_check_Initialized )
42ce2: 4ab9 0006 3528 tstl 63528 <Stack_check_Initialized>
42ce8: 666a bnes 42d54 <Stack_check_Initialize+0x76>
/*
* If appropriate, setup the interrupt stack for high water testing
* also.
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) {
42cea: 2039 0006 4366 movel 64366 <_Per_CPU_Information>,%d0
/*
* Dope the pattern and fill areas
*/
p = Stack_check_Pattern.pattern;
for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) {
p[i] = pattern[ i%4 ];
42cf0: 223c feed f00d movel #-17960947,%d1 42cf6: 23c1 0006 3d34 movel %d1,63d34 <Stack_check_Pattern> 42cfc: 223c 0bad 0d06 movel #195890438,%d1 42d02: 23c1 0006 3d38 movel %d1,63d38 <Stack_check_Pattern+0x4> 42d08: 223c dead f00d movel #-559026163,%d1 42d0e: 23c1 0006 3d3c movel %d1,63d3c <Stack_check_Pattern+0x8> 42d14: 223c 600d 0d06 movel #1611468038,%d1 42d1a: 23c1 0006 3d40 movel %d1,63d40 <Stack_check_Pattern+0xc>
/*
* If appropriate, setup the interrupt stack for high water testing
* also.
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) {
42d20: 4a80 tstl %d0
42d22: 6728 beqs 42d4c <Stack_check_Initialize+0x6e> <== NEVER TAKEN
42d24: 2239 0006 436a movel 6436a <_Per_CPU_Information+0x4>,%d1
42d2a: 6720 beqs 42d4c <Stack_check_Initialize+0x6e> <== NEVER TAKEN
Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low;
Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high -
42d2c: 9280 subl %d0,%d1
(char *) _CPU_Interrupt_stack_low;
Stack_check_Dope_stack(&Stack_check_Interrupt_stack);
42d2e: 2f01 movel %d1,%sp@- 42d30: 4878 00a5 pea a5 <DBL_MANT_DIG+0x70>
* If appropriate, setup the interrupt stack for high water testing
* also.
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) {
Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low;
42d34: 23c0 0006 3d48 movel %d0,63d48 <Stack_check_Interrupt_stack+0x4>
Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high -
(char *) _CPU_Interrupt_stack_low;
Stack_check_Dope_stack(&Stack_check_Interrupt_stack);
42d3a: 2f00 movel %d0,%sp@-
* also.
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) {
Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low;
Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high -
42d3c: 23c1 0006 3d44 movel %d1,63d44 <Stack_check_Interrupt_stack>
(char *) _CPU_Interrupt_stack_low;
Stack_check_Dope_stack(&Stack_check_Interrupt_stack);
42d42: 4eb9 0005 2458 jsr 52458 <memset> 42d48: 4fef 000c lea %sp@(12),%sp
}
#endif
Stack_check_Initialized = 1;
42d4c: 7001 moveq #1,%d0 42d4e: 23c0 0006 3528 movel %d0,63528 <Stack_check_Initialized>
}
42d54: 4e5e unlk %fp <== NOT EXECUTED
00042dca <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)
{
42dca: 4e56 ffd0 linkw %fp,#-48 <== NOT EXECUTED 42dce: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ <== NOT EXECUTED
Stack_Control *stack = &running->Start.Initial_stack;
void *pattern_area = Stack_check_Get_pattern(stack);
char name[32];
printk("BLOWN STACK!!!\n");
42dd2: 4879 0006 0edd pea 60edd <map.6435+0x5d> <== NOT EXECUTED 42dd8: 47f9 0004 4f38 lea 44f38 <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)
{
42dde: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern(stack);
42de2: 286a 00b6 moveal %a2@(182),%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)
{
42de6: 142e 000f moveb %fp@(15),%d2 <== NOT EXECUTED
Stack_Control *stack = &running->Start.Initial_stack;
void *pattern_area = Stack_check_Get_pattern(stack);
char name[32];
printk("BLOWN STACK!!!\n");
42dea: 4e93 jsr %a3@ <== NOT EXECUTED
printk("task control block: 0x%08" PRIxPTR "\n", running);
42dec: 2f0a movel %a2,%sp@- <== NOT EXECUTED 42dee: 4879 0006 0eed pea 60eed <map.6435+0x6d> <== NOT EXECUTED 42df4: 4e93 jsr %a3@ <== NOT EXECUTED
printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id);
42df6: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 42dfa: 4879 0006 0f0a pea 60f0a <map.6435+0x8a> <== NOT EXECUTED 42e00: 4e93 jsr %a3@ <== NOT EXECUTED
printk(
42e02: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED 42e06: 4879 0006 0f1c pea 60f1c <map.6435+0x9c> <== NOT EXECUTED 42e0c: 4e93 jsr %a3@ <== NOT EXECUTED
"task name: 0x%08" PRIx32 "\n",
running->Object.name.name_u32
);
printk(
42e0e: 486e ffe0 pea %fp@(-32) <== NOT EXECUTED 42e12: 4878 0020 pea 20 <OPER2+0xc> <== NOT EXECUTED 42e16: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 42e1a: 4eb9 0004 940c jsr 4940c <rtems_object_get_name> <== NOT EXECUTED 42e20: 4fef 0024 lea %sp@(36),%sp <== NOT EXECUTED 42e24: 2e80 movel %d0,%sp@ <== NOT EXECUTED 42e26: 4879 0006 0f30 pea 60f30 <map.6435+0xb0> <== NOT EXECUTED 42e2c: 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)
42e2e: 206a 00b6 moveal %a2@(182),%a0 <== NOT EXECUTED 42e32: 202a 00b2 movel %a2@(178),%d0 <== NOT EXECUTED
);
printk(
"task name string: %s\n",
rtems_object_get_name(running->Object.id, sizeof(name), name)
);
printk(
42e36: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 42e3a: 2f08 movel %a0,%sp@- <== NOT EXECUTED 42e3c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42e3e: 4879 0006 0f46 pea 60f46 <map.6435+0xc6> <== NOT EXECUTED 42e44: 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) {
42e46: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 42e4a: 4a02 tstb %d2 <== NOT EXECUTED 42e4c: 670a beqs 42e58 <Stack_check_report_blown_task+0x8e><== NOT EXECUTED
rtems_configuration_get_user_multiprocessing_table()->node
);
}
#endif
rtems_fatal_error_occurred(0x81);
42e4e: 4878 0081 pea 81 <DBL_MANT_DIG+0x4c> <== NOT EXECUTED 42e52: 4eb9 0004 9d60 jsr 49d60 <rtems_fatal_error_occurred> <== NOT EXECUTED
(unsigned long) stack->size,
stack->area,
((char *) stack->area + stack->size)
);
if (!pattern_ok) {
printk(
42e58: 486c 0018 pea %a4@(24) <== NOT EXECUTED 42e5c: 486c 0008 pea %a4@(8) <== NOT EXECUTED 42e60: 4878 0010 pea 10 <INVALID_OPERATION> <== NOT EXECUTED 42e64: 4879 0006 0f77 pea 60f77 <map.6435+0xf7> <== NOT EXECUTED 42e6a: 4e93 jsr %a3@ <== NOT EXECUTED 42e6c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rtems_configuration_get_user_multiprocessing_table()->node
);
}
#endif
rtems_fatal_error_occurred(0x81);
42e70: 4878 0081 pea 81 <DBL_MANT_DIG+0x4c> <== NOT EXECUTED 42e74: 4eb9 0004 9d60 jsr 49d60 <rtems_fatal_error_occurred> <== NOT EXECUTED
0004cc84 <TOD_MICROSECONDS_TO_TICKS>:
* We should ensure the ticks not be truncated by integer division. We
* need to have it be greater than or equal to the requested time. It
* should not be shorter.
*/
microseconds_per_tick = rtems_configuration_get_microseconds_per_tick();
ticks = microseconds / microseconds_per_tick;
4cc84: 41f9 0006 4ca8 lea 64ca8 <Configuration+0xc>,%a0
#include <rtems/score/tod.h>
uint32_t TOD_MICROSECONDS_TO_TICKS(
uint32_t microseconds
)
{
4cc8a: 4e56 0000 linkw %fp,#0
* We should ensure the ticks not be truncated by integer division. We * need to have it be greater than or equal to the requested time. It * should not be shorter. */ microseconds_per_tick = rtems_configuration_get_microseconds_per_tick(); ticks = microseconds / microseconds_per_tick;
4cc8e: 202e 0008 movel %fp@(8),%d0 4cc92: 4c50 0001 remul %a0@,%d1,%d0 4cc96: 4c50 0000 remul %a0@,%d0,%d0
if ( (microseconds % microseconds_per_tick) != 0 )
4cc9a: 4a81 tstl %d1
4cc9c: 6702 beqs 4cca0 <TOD_MICROSECONDS_TO_TICKS+0x1c> <== ALWAYS TAKEN
ticks += 1;
4cc9e: 5280 addql #1,%d0 <== NOT EXECUTED
return ticks;
}
4cca0: 4e5e unlk %fp <== NOT EXECUTED
000482d4 <TOD_MILLISECONDS_TO_TICKS>:
#include <rtems/score/tod.h>
uint32_t TOD_MILLISECONDS_TO_TICKS(
uint32_t milliseconds
)
{
482d4: 4e56 0000 linkw %fp,#0
/** * We should ensure the ticks not be truncated by integer division. We * need to have it be greater than or equal to the requested time. It * should not be shorter. */ milliseconds_per_tick = rtems_configuration_get_milliseconds_per_tick();
482d8: 2039 0006 0838 movel 60838 <Configuration+0xc>,%d0
#include <rtems/score/tod.h>
uint32_t TOD_MILLISECONDS_TO_TICKS(
uint32_t milliseconds
)
{
482de: 2f02 movel %d2,%sp@-
/** * We should ensure the ticks not be truncated by integer division. We * need to have it be greater than or equal to the requested time. It * should not be shorter. */ milliseconds_per_tick = rtems_configuration_get_milliseconds_per_tick();
482e0: 243c 0000 03e8 movel #1000,%d2 482e6: 4c42 0000 remul %d2,%d0,%d0
ticks = milliseconds / milliseconds_per_tick;
482ea: 242e 0008 movel %fp@(8),%d2 482ee: 4c40 2001 remul %d0,%d1,%d2 482f2: 4c40 2002 remul %d0,%d2,%d2 482f6: 2002 movel %d2,%d0
if ( (milliseconds % milliseconds_per_tick) != 0 )
482f8: 4a81 tstl %d1
482fa: 6702 beqs 482fe <TOD_MILLISECONDS_TO_TICKS+0x2a> <== ALWAYS TAKEN
ticks += 1;
482fc: 5280 addql #1,%d0 <== NOT EXECUTED
return ticks;
}
482fe: 241f movel %sp@+,%d2
48300: 4e5e unlk %fp <== NOT EXECUTED
00047416 <_API_extensions_Run_postdriver>:
/*
* _API_extensions_Run_postdriver
*/
void _API_extensions_Run_postdriver( void )
{
47416: 4e56 0000 linkw %fp,#0 4741a: 2f0a movel %a2,%sp@-
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
4741c: 2479 0006 119c moveal 6119c <_API_extensions_List>,%a2
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
47422: b5fc 0006 11a0 cmpal #397728,%a2
47428: 6710 beqs 4743a <_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)();
4742a: 206a 0008 moveal %a2@(8),%a0 4742e: 4e90 jsr %a0@
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
47430: 2452 moveal %a2@,%a2
void _API_extensions_Run_postdriver( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
47432: b5fc 0006 11a0 cmpal #397728,%a2
47438: 66f0 bnes 4742a <_API_extensions_Run_postdriver+0x14>
#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
if ( the_extension->postdriver_hook )
#endif
(*the_extension->postdriver_hook)();
}
}
4743a: 246e fffc moveal %fp@(-4),%a2
4743e: 4e5e unlk %fp <== NOT EXECUTED
00047442 <_API_extensions_Run_postswitch>:
/*
* _API_extensions_Run_postswitch
*/
void _API_extensions_Run_postswitch( void )
{
47442: 4e56 0000 linkw %fp,#0 47446: 2f0a movel %a2,%sp@- 47448: 2479 0006 119c moveal 6119c <_API_extensions_List>,%a2
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
4744e: b5fc 0006 11a0 cmpal #397728,%a2
47454: 6718 beqs 4746e <_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 );
47456: 2f39 0006 14aa movel 614aa <_Per_CPU_Information+0xc>,%sp@- 4745c: 206a 000c moveal %a2@(12),%a0 47460: 4e90 jsr %a0@
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
47462: 2452 moveal %a2@,%a2
void _API_extensions_Run_postswitch( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
47464: 588f addql #4,%sp 47466: b5fc 0006 11a0 cmpal #397728,%a2
4746c: 66e8 bnes 47456 <_API_extensions_Run_postswitch+0x14>
the_extension = (API_extensions_Control *) the_node;
(*the_extension->postswitch_hook)( _Thread_Executing );
}
}
4746e: 246e fffc moveal %fp@(-4),%a2 47472: 4e5e unlk %fp
...
000498e0 <_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 );
498e0: 203c 0000 0700 movel #1792,%d0
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_RWLock_API_mp_support_callout api_rwlock_mp_support
)
{
498e6: 4e56 fff4 linkw %fp,#-12 498ea: 206e 0008 moveal %fp@(8),%a0 498ee: 48d7 001c moveml %d2-%d4,%sp@ 498f2: 282e 000c movel %fp@(12),%d4 498f6: 262e 0014 movel %fp@(20),%d3
ISR_Level level; Thread_Control *executing = _Thread_Executing;
498fa: 2279 0006 40ce moveal 640ce <_Per_CPU_Information+0xc>,%a1
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_RWLock_API_mp_support_callout api_rwlock_mp_support
)
{
49900: 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 );
49904: 40c1 movew %sr,%d1 49906: 8081 orl %d1,%d0 49908: 46c0 movew %d0,%sr
switch ( the_rwlock->current_state ) {
4990a: 4aa8 0044 tstl %a0@(68)
4990e: 6614 bnes 49924 <_CORE_RWLock_Obtain_for_writing+0x44>
case CORE_RWLOCK_UNLOCKED:
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING;
49910: 7002 moveq #2,%d0 49912: 2140 0044 movel %d0,%a0@(68)
_ISR_Enable( level );
49916: 46c1 movew %d1,%sr
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
49918: 42a9 0034 clrl %a1@(52)
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
4991c: 4cd7 001c moveml %sp@,%d2-%d4 49920: 4e5e unlk %fp 49922: 4e75 rts
/*
* If the thread is not willing to wait, then return immediately.
*/
if ( !wait ) {
49924: 4a02 tstb %d2
49926: 6610 bnes 49938 <_CORE_RWLock_Obtain_for_writing+0x58>
_ISR_Enable( level );
49928: 46c1 movew %d1,%sr
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
4992a: 7002 moveq #2,%d0
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
4992c: 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;
49930: 2340 0034 movel %d0,%a1@(52)
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
49934: 4e5e unlk %fp 49936: 4e75 rts 49938: 7001 moveq #1,%d0 4993a: 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;
4993e: 2348 0044 movel %a0,%a1@(68)
executing->Wait.id = id;
49942: 2344 0020 movel %d4,%a1@(32)
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE;
49946: 2340 0030 movel %d0,%a1@(48)
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
4994a: 42a9 0034 clrl %a1@(52)
_ISR_Enable( level );
4994e: 46c1 movew %d1,%sr
_Thread_queue_Enqueue_with_handler(
49950: 2d43 000c movel %d3,%fp@(12) 49954: 203c 0004 9a4c movel #301644,%d0 4995a: 2d48 0008 movel %a0,%fp@(8)
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
4995e: 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(
49962: 2d40 0010 movel %d0,%fp@(16)
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
49966: 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(
49968: 4ef9 0004 b7ec jmp 4b7ec <_Thread_queue_Enqueue_with_handler>
...
00049970 <_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 );
49970: 203c 0000 0700 movel #1792,%d0
*/
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
49976: 4e56 fff0 linkw %fp,#-16
ISR_Level level; Thread_Control *executing = _Thread_Executing;
4997a: 2079 0006 40ce moveal 640ce <_Per_CPU_Information+0xc>,%a0
*/
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
49980: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 49984: 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 );
49988: 40c1 movew %sr,%d1 4998a: 8081 orl %d1,%d0 4998c: 46c0 movew %d0,%sr
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
4998e: 202a 0044 movel %a2@(68),%d0 49992: 6700 0090 beqw 49a24 <_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 ) {
49996: 7401 moveq #1,%d2 49998: b480 cmpl %d0,%d2
4999a: 676e beqs 49a0a <_CORE_RWLock_Release+0x9a>
return CORE_RWLOCK_SUCCESSFUL;
}
}
/* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
4999c: 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;
499a0: 42aa 0044 clrl %a2@(68)
_ISR_Enable( level );
499a4: 46c1 movew %d1,%sr
next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue );
499a6: 2f0a movel %a2,%sp@- 499a8: 4eb9 0004 b67c jsr 4b67c <_Thread_queue_Dequeue>
if ( next ) {
499ae: 588f addql #4,%sp 499b0: 4a80 tstl %d0
499b2: 674a beqs 499fe <_CORE_RWLock_Release+0x8e>
if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) {
499b4: 7201 moveq #1,%d1 499b6: 2040 moveal %d0,%a0 499b8: b2a8 0030 cmpl %a0@(48),%d1
499bc: 677c beqs 49a3a <_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;
499be: 7201 moveq #1,%d1
}
/*
* Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING
*/
the_rwlock->number_of_readers += 1;
499c0: 52aa 0048 addql #1,%a2@(72) 499c4: 47f9 0004 bb58 lea 4bb58 <_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 );
499ca: 49f9 0004 ba0c lea 4ba0c <_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;
499d0: 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 );
499d4: 2f0a movel %a2,%sp@- 499d6: 4e93 jsr %a3@
if ( !next ||
499d8: 588f addql #4,%sp 499da: 4a80 tstl %d0
499dc: 6720 beqs 499fe <_CORE_RWLock_Release+0x8e>
499de: 7401 moveq #1,%d2 499e0: 2040 moveal %d0,%a0 499e2: b4a8 0030 cmpl %a0@(48),%d2
499e6: 6716 beqs 499fe <_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;
499e8: 52aa 0048 addql #1,%a2@(72)
_Thread_queue_Extract( &the_rwlock->Wait_queue, next );
499ec: 2f00 movel %d0,%sp@- 499ee: 2f0a movel %a2,%sp@- 499f0: 4e94 jsr %a4@
}
499f2: 508f addql #8,%sp
/*
* Now see if more readers can be let go.
*/
while ( 1 ) {
next = _Thread_queue_First( &the_rwlock->Wait_queue );
499f4: 2f0a movel %a2,%sp@- 499f6: 4e93 jsr %a3@
if ( !next ||
499f8: 588f addql #4,%sp 499fa: 4a80 tstl %d0
499fc: 66e0 bnes 499de <_CORE_RWLock_Release+0x6e> <== NEVER TAKEN
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
499fe: 4280 clrl %d0 49a00: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 49a06: 4e5e unlk %fp 49a08: 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;
49a0a: 202a 0048 movel %a2@(72),%d0 49a0e: 5380 subql #1,%d0 49a10: 2540 0048 movel %d0,%a2@(72)
if ( the_rwlock->number_of_readers != 0 ) {
49a14: 6786 beqs 4999c <_CORE_RWLock_Release+0x2c>
/* must be unlocked again */
_ISR_Enable( level );
49a16: 46c1 movew %d1,%sr
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
49a18: 4280 clrl %d0 49a1a: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 49a20: 4e5e unlk %fp 49a22: 4e75 rts
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
_ISR_Enable( level );
49a24: 46c1 movew %d1,%sr
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
49a26: 103c 0002 moveb #2,%d0
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
49a2a: 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;
49a30: 2140 0034 movel %d0,%a0@(52)
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
49a34: 4280 clrl %d0 49a36: 4e5e unlk %fp 49a38: 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;
49a3a: 7002 moveq #2,%d0 49a3c: 2540 0044 movel %d0,%a2@(68)
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
49a40: 4280 clrl %d0 49a42: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4
49a48: 4e5e unlk %fp <== NOT EXECUTED
00049a4c <_CORE_RWLock_Timeout>:
void _CORE_RWLock_Timeout(
Objects_Id id,
void *ignored
)
{
49a4c: 4e56 fffc linkw %fp,#-4
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
49a50: 486e fffc pea %fp@(-4) 49a54: 2f2e 0008 movel %fp@(8),%sp@- 49a58: 4eb9 0004 b318 jsr 4b318 <_Thread_Get>
switch ( location ) {
49a5e: 508f addql #8,%sp 49a60: 4aae fffc tstl %fp@(-4)
49a64: 661e bnes 49a84 <_CORE_RWLock_Timeout+0x38> <== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
49a66: 2f00 movel %d0,%sp@- 49a68: 4eb9 0004 bc78 jsr 4bc78 <_Thread_queue_Process_timeout>
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
return _Thread_Dispatch_disable_level;
49a6e: 588f addql #4,%sp
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
49a70: 2039 0006 3c6c movel 63c6c <_Thread_Dispatch_disable_level>,%d0 49a76: 5380 subql #1,%d0 49a78: 23c0 0006 3c6c movel %d0,63c6c <_Thread_Dispatch_disable_level>
return _Thread_Dispatch_disable_level;
49a7e: 2039 0006 3c6c movel 63c6c <_Thread_Dispatch_disable_level>,%d0
_Thread_Unnest_dispatch();
break;
}
}
49a84: 4e5e unlk %fp <== NOT EXECUTED
000485c8 <_CORE_barrier_Wait>:
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL;
_ISR_Disable( level );
485c8: 203c 0000 0700 movel #1792,%d0
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_barrier_API_mp_support_callout api_barrier_mp_support
)
{
485ce: 4e56 fff4 linkw %fp,#-12
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
485d2: 2279 0006 29be moveal 629be <_Per_CPU_Information+0xc>,%a1
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_barrier_API_mp_support_callout api_barrier_mp_support
)
{
485d8: 48d7 001c moveml %d2-%d4,%sp@ 485dc: 206e 0008 moveal %fp@(8),%a0
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL;
485e0: 42a9 0034 clrl %a1@(52)
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_barrier_API_mp_support_callout api_barrier_mp_support
)
{
485e4: 242e 000c movel %fp@(12),%d2 485e8: 262e 0014 movel %fp@(20),%d3 485ec: 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 );
485f0: 40c1 movew %sr,%d1 485f2: 8081 orl %d1,%d0 485f4: 46c0 movew %d0,%sr
the_barrier->number_of_waiting_threads++;
485f6: 2028 0048 movel %a0@(72),%d0 485fa: 5280 addql #1,%d0 485fc: 2140 0048 movel %d0,%a0@(72)
if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) {
48600: 4aa8 0040 tstl %a0@(64)
48604: 6606 bnes 4860c <_CORE_barrier_Wait+0x44>
if ( the_barrier->number_of_waiting_threads ==
48606: b0a8 0044 cmpl %a0@(68),%d0
4860a: 672e beqs 4863a <_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;
4860c: 7001 moveq #1,%d0 4860e: 2140 0030 movel %d0,%a0@(48)
return;
}
}
_Thread_queue_Enter_critical_section( &the_barrier->Wait_queue );
executing->Wait.queue = &the_barrier->Wait_queue;
48612: 2348 0044 movel %a0,%a1@(68)
executing->Wait.id = id;
48616: 2342 0020 movel %d2,%a1@(32)
_ISR_Enable( level );
4861a: 46c1 movew %d1,%sr
_Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout );
4861c: 2d43 000c movel %d3,%fp@(12) 48620: 203c 0004 aa68 movel #305768,%d0 48626: 2d48 0008 movel %a0,%fp@(8)
}
4862a: 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 );
4862e: 2d40 0010 movel %d0,%fp@(16)
}
48632: 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 );
48634: 4ef9 0004 a6e0 jmp 4a6e0 <_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;
4863a: 7001 moveq #1,%d0 4863c: 2340 0034 movel %d0,%a1@(52)
_ISR_Enable( level );
48640: 46c1 movew %d1,%sr
_CORE_barrier_Release( the_barrier, id, api_barrier_mp_support );
48642: 2d44 0010 movel %d4,%fp@(16) 48646: 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 );
}
4864a: 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 );
4864e: 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 );
}
48652: 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 );
48654: 4ef9 0004 dcd8 jmp 4dcd8 <_CORE_barrier_Release>
...
0004dd18 <_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
)
{
4dd18: 4e56 0000 linkw %fp,#0 4dd1c: 2f0a movel %a2,%sp@-
/*
* This will flush blocked threads whether they were blocked on
* a send or receive.
*/
_Thread_queue_Flush(
4dd1e: 2f2e 0010 movel %fp@(16),%sp@- 4dd22: 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
)
{
4dd26: 246e 0008 moveal %fp@(8),%a2
/*
* This will flush blocked threads whether they were blocked on
* a send or receive.
*/
_Thread_queue_Flush(
4dd2a: 2f0a movel %a2,%sp@- 4dd2c: 4eb9 0004 a374 jsr 4a374 <_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 )
4dd32: 4fef 000c lea %sp@(12),%sp 4dd36: 4aaa 0048 tstl %a2@(72)
4dd3a: 6612 bnes 4dd4e <_CORE_message_queue_Close+0x36>
(void) _CORE_message_queue_Flush_support( the_message_queue );
(void) _Workspace_Free( the_message_queue->message_buffers );
4dd3c: 2d6a 005c 0008 movel %a2@(92),%fp@(8)
}
4dd42: 246e fffc moveal %fp@(-4),%a2 4dd46: 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 );
4dd48: 4ef9 0004 ad0e jmp 4ad0e <_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 );
4dd4e: 2f0a movel %a2,%sp@- 4dd50: 4eb9 0004 dd6c jsr 4dd6c <_CORE_message_queue_Flush_support>
(void) _Workspace_Free( the_message_queue->message_buffers );
4dd56: 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 );
4dd5c: 588f addql #4,%sp
(void) _Workspace_Free( the_message_queue->message_buffers );
}
4dd5e: 246e fffc moveal %fp@(-4),%a2 4dd62: 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 );
4dd64: 4ef9 0004 ad0e jmp 4ad0e <_Workspace_Free>
...
00050438 <_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)) {
50438: 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
)
{
5043a: 4e56 ffe4 linkw %fp,#-28 5043e: 202e 0014 movel %fp@(20),%d0 50442: 48d7 04fc moveml %d2-%d7/%a2,%sp@ 50446: 246e 0008 moveal %fp@(8),%a2
* Round size up to multiple of a pointer for chain init and
* check for overflow on adding overhead to each message.
*/
allocated_message_size = maximum_message_size;
if (allocated_message_size & (sizeof(uint32_t) - 1)) {
allocated_message_size += sizeof(uint32_t);
5044a: 2600 movel %d0,%d3
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
)
{
5044c: 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)) {
50450: c280 andl %d0,%d1
)
{
size_t message_buffering_required = 0;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
50452: 2542 0044 movel %d2,%a2@(68)
the_message_queue->number_of_pending_messages = 0;
50456: 42aa 0048 clrl %a2@(72)
the_message_queue->maximum_message_size = maximum_message_size;
5045a: 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;
5045e: 42aa 0060 clrl %a2@(96)
the_message_queue->notify_argument = the_argument;
50462: 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)) {
50466: 4a81 tstl %d1
50468: 6716 beqs 50480 <_CORE_message_queue_Initialize+0x48>
allocated_message_size += sizeof(uint32_t);
5046a: 5883 addql #4,%d3
allocated_message_size &= ~(sizeof(uint32_t) - 1);
5046c: 72fc moveq #-4,%d1 5046e: c681 andl %d1,%d3
}
if (allocated_message_size < maximum_message_size)
50470: b680 cmpl %d0,%d3
50472: 640c bccs 50480 <_CORE_message_queue_Initialize+0x48><== ALWAYS TAKEN
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
}
50474: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
return false;
5047a: 4200 clrb %d0
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
}
5047c: 4e5e unlk %fp 5047e: 4e75 rts
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
if ( !size_t_mult32_with_overflow(
50480: 0683 0000 0014 addil #20,%d3
size_t a,
size_t b,
size_t *c
)
{
long long x = (long long)a*b;
50486: 2f03 movel %d3,%sp@-
if ( x > SIZE_MAX )
50488: 4286 clrl %d6 5048a: 7eff moveq #-1,%d7
size_t a,
size_t b,
size_t *c
)
{
long long x = (long long)a*b;
5048c: 42a7 clrl %sp@- 5048e: 2f02 movel %d2,%sp@- 50490: 42a7 clrl %sp@- 50492: 4eb9 0006 4928 jsr 64928 <__muldi3> 50498: 4fef 0010 lea %sp@(16),%sp 5049c: 2800 movel %d0,%d4 5049e: 2a01 movel %d1,%d5
if ( x > SIZE_MAX )
504a0: 9e85 subl %d5,%d7 504a2: 9d84 subxl %d4,%d6
504a4: 6dce blts 50474 <_CORE_message_queue_Initialize+0x3c>
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
_Workspace_Allocate( message_buffering_required );
504a6: 2f01 movel %d1,%sp@- 504a8: 4eb9 0005 34de jsr 534de <_Workspace_Allocate>
if (the_message_queue->message_buffers == 0)
504ae: 588f addql #4,%sp
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
504b0: 2540 005c movel %d0,%a2@(92)
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
504b4: 67be beqs 50474 <_CORE_message_queue_Initialize+0x3c>
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
504b6: 2f03 movel %d3,%sp@-
allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
);
_Chain_Initialize_empty( &the_message_queue->Pending_messages );
_Thread_queue_Initialize(
504b8: 7e01 moveq #1,%d7
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
504ba: 2f02 movel %d2,%sp@- 504bc: 2f00 movel %d0,%sp@- 504be: 486a 0068 pea %a2@(104) 504c2: 4eb9 0005 5e0c jsr 55e0c <_Chain_Initialize>
allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
);
_Chain_Initialize_empty( &the_message_queue->Pending_messages );
_Thread_queue_Initialize(
504c8: 4878 0006 pea 6 <EXTENDSFDF> 504cc: 206e 000c moveal %fp@(12),%a0 504d0: be90 cmpl %a0@,%d7 504d2: 57c0 seq %d0 504d4: 4878 0080 pea 80 <DBL_MANT_DIG+0x4b> 504d8: 49c0 extbl %d0 504da: 4480 negl %d0
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
504dc: 41ea 0054 lea %a2@(84),%a0 504e0: 2f00 movel %d0,%sp@- 504e2: 2548 0050 movel %a0,%a2@(80)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
504e6: 41ea 0050 lea %a2@(80),%a0
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
504ea: 42aa 0054 clrl %a2@(84)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
504ee: 2548 0058 movel %a0,%a2@(88) 504f2: 2f0a movel %a2,%sp@- 504f4: 4eb9 0005 2b9c jsr 52b9c <_Thread_queue_Initialize>
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
504fa: 4fef 0020 lea %sp@(32),%sp
}
504fe: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
50504: 7001 moveq #1,%d0
}
50506: 4e5e unlk %fp
...
00055e80 <_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
)
{
55e80: 4e56 fff4 linkw %fp,#-12 55e84: 226e 000c moveal %fp@(12),%a1 55e88: 202e 0010 movel %fp@(16),%d0 55e8c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 55e90: 206e 0008 moveal %fp@(8),%a0 55e94: 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 ) {
55e98: 0c80 7fff ffff cmpil #2147483647,%d0 55e9e: 6700 0082 beqw 55f22 <_CORE_message_queue_Insert_message+0xa2>
_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 ) {
55ea2: 0c80 8000 0000 cmpil #-2147483648,%d0 55ea8: 6700 00ae beqw 55f58 <_CORE_message_queue_Insert_message+0xd8>
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Tail(the_chain));
55eac: 2208 movel %a0,%d1 55eae: 0681 0000 0054 addil #84,%d1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
55eb4: 2468 0050 moveal %a0@(80),%a2
int the_priority;
the_priority = _CORE_message_queue_Get_message_priority(the_message);
the_header = &the_message_queue->Pending_messages;
the_node = _Chain_First( the_header );
while ( !_Chain_Is_tail( the_header, the_node ) ) {
55eb8: b5c1 cmpal %d1,%a2
55eba: 6712 beqs 55ece <_CORE_message_queue_Insert_message+0x4e>
this_message = (CORE_message_queue_Buffer_control *) the_node;
this_priority = _CORE_message_queue_Get_message_priority(this_message);
if ( this_priority <= the_priority ) {
55ebc: b0aa 0008 cmpl %a2@(8),%d0
55ec0: 6d0c blts 55ece <_CORE_message_queue_Insert_message+0x4e>
the_node = the_node->next;
55ec2: 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 = _Chain_First( the_header );
while ( !_Chain_Is_tail( the_header, the_node ) ) {
55ec4: b5c1 cmpal %d1,%a2
55ec6: 6706 beqs 55ece <_CORE_message_queue_Insert_message+0x4e>
this_message = (CORE_message_queue_Buffer_control *) the_node;
this_priority = _CORE_message_queue_Get_message_priority(this_message);
if ( this_priority <= the_priority ) {
55ec8: b0aa 0008 cmpl %a2@(8),%d0
55ecc: 6cf4 bges 55ec2 <_CORE_message_queue_Insert_message+0x42>
the_node = the_node->next;
continue;
}
break;
}
_ISR_Disable( level );
55ece: 203c 0000 0700 movel #1792,%d0 55ed4: 40c1 movew %sr,%d1 55ed6: 8081 orl %d1,%d0 55ed8: 46c0 movew %d0,%sr
SET_NOTIFY();
55eda: 2028 0048 movel %a0@(72),%d0
the_message_queue->number_of_pending_messages++;
55ede: 2400 movel %d0,%d2 55ee0: 5282 addql #1,%d2
*
* INTERRUPT LATENCY:
* insert
*/
void _CORE_message_queue_Insert_message(
55ee2: 4a80 tstl %d0 55ee4: 57c0 seq %d0
break;
}
_ISR_Disable( level );
SET_NOTIFY();
the_message_queue->number_of_pending_messages++;
_Chain_Insert_unprotected( the_node->previous, &the_message->Node );
55ee6: 246a 0004 moveal %a2@(4),%a2
*
* INTERRUPT LATENCY:
* insert
*/
void _CORE_message_queue_Insert_message(
55eea: 4480 negl %d0
}
break;
}
_ISR_Disable( level );
SET_NOTIFY();
the_message_queue->number_of_pending_messages++;
55eec: 2142 0048 movel %d2,%a0@(72)
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
55ef0: 2652 moveal %a2@,%a3
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
55ef2: 234a 0004 movel %a2,%a1@(4)
before_node = after_node->next; after_node->next = the_node;
55ef6: 2489 movel %a1,%a2@
the_node->next = before_node; before_node->previous = the_node;
55ef8: 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;
55efc: 228b movel %a3,%a1@
_Chain_Insert_unprotected( the_node->previous, &the_message->Node );
_ISR_Enable( level );
55efe: 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 )
55f00: 4a00 tstb %d0
55f02: 6716 beqs 55f1a <_CORE_message_queue_Insert_message+0x9a>
55f04: 2268 0060 moveal %a0@(96),%a1 55f08: 4a89 tstl %a1
55f0a: 670e beqs 55f1a <_CORE_message_queue_Insert_message+0x9a>
(*the_message_queue->notify_handler)(the_message_queue->notify_argument);
55f0c: 2d68 0064 0008 movel %a0@(100),%fp@(8)
#endif }
55f12: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 55f16: 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);
55f18: 4ed1 jmp %a1@
#endif }
55f1a: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 55f1e: 4e5e unlk %fp 55f20: 4e75 rts
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 );
55f22: 203c 0000 0700 movel #1792,%d0 55f28: 40c1 movew %sr,%d1 55f2a: 8081 orl %d1,%d0 55f2c: 46c0 movew %d0,%sr
SET_NOTIFY();
55f2e: 2028 0048 movel %a0@(72),%d0
the_message_queue->number_of_pending_messages++;
55f32: 2400 movel %d0,%d2 55f34: 5282 addql #1,%d2
RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
55f36: 47e8 0054 lea %a0@(84),%a3
*
* INTERRUPT LATENCY:
* insert
*/
void _CORE_message_queue_Insert_message(
55f3a: 4a80 tstl %d0 55f3c: 57c0 seq %d0
_ISR_Enable( level );
#else
if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) {
_ISR_Disable( level );
SET_NOTIFY();
the_message_queue->number_of_pending_messages++;
55f3e: 2142 0048 movel %d2,%a0@(72)
Chain_Node *old_last = tail->previous;
55f42: 2468 0058 moveal %a0@(88),%a2
*
* INTERRUPT LATENCY:
* insert
*/
void _CORE_message_queue_Insert_message(
55f46: 4480 negl %d0
RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
55f48: 228b movel %a3,%a1@
Chain_Node *old_last = tail->previous;
the_node->next = tail;
tail->previous = the_node;
55f4a: 2149 0058 movel %a1,%a0@(88)
old_last->next = the_node;
55f4e: 2489 movel %a1,%a2@
the_node->previous = old_last;
55f50: 234a 0004 movel %a2,%a1@(4)
if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) {
_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 );
55f54: 46c1 movew %d1,%sr 55f56: 60a8 bras 55f00 <_CORE_message_queue_Insert_message+0x80>
} else if ( submit_type == CORE_MESSAGE_QUEUE_URGENT_REQUEST ) {
_ISR_Disable( level );
55f58: 203c 0000 0700 movel #1792,%d0 55f5e: 40c1 movew %sr,%d1 55f60: 8081 orl %d1,%d0 55f62: 46c0 movew %d0,%sr
SET_NOTIFY();
55f64: 2028 0048 movel %a0@(72),%d0
the_message_queue->number_of_pending_messages++;
55f68: 2400 movel %d0,%d2 55f6a: 5282 addql #1,%d2
RTEMS_INLINE_ROUTINE void _Chain_Prepend_unprotected(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert_unprotected(_Chain_Head(the_chain), the_node);
55f6c: 47e8 0050 lea %a0@(80),%a3
*
* INTERRUPT LATENCY:
* insert
*/
void _CORE_message_queue_Insert_message(
55f70: 4a80 tstl %d0 55f72: 57c0 seq %d0
_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 );
SET_NOTIFY();
the_message_queue->number_of_pending_messages++;
55f74: 2142 0048 movel %d2,%a0@(72)
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
55f78: 2468 0050 moveal %a0@(80),%a2
*
* INTERRUPT LATENCY:
* insert
*/
void _CORE_message_queue_Insert_message(
55f7c: 4480 negl %d0
RTEMS_INLINE_ROUTINE void _Chain_Prepend_unprotected(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert_unprotected(_Chain_Head(the_chain), the_node);
55f7e: 234b 0004 movel %a3,%a1@(4)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
after_node->next = the_node;
55f82: 2149 0050 movel %a1,%a0@(80)
the_node->next = before_node; before_node->previous = the_node;
55f86: 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;
55f8a: 228a movel %a2,%a1@
} else if ( submit_type == CORE_MESSAGE_QUEUE_URGENT_REQUEST ) {
_ISR_Disable( level );
SET_NOTIFY();
the_message_queue->number_of_pending_messages++;
_CORE_message_queue_Prepend_unprotected(the_message_queue, the_message);
_ISR_Enable( level );
55f8c: 46c1 movew %d1,%sr 55f8e: 6000 ff70 braw 55f00 <_CORE_message_queue_Insert_message+0x80>
...
0005050c <_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 );
5050c: 203c 0000 0700 movel #1792,%d0
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
50512: 4e56 ffe4 linkw %fp,#-28
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
executing = _Thread_Executing;
50516: 2279 0006 b032 moveal 6b032 <_Per_CPU_Information+0xc>,%a1
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
5051c: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 50520: 246e 0008 moveal %fp@(8),%a2 50524: 2a2e 000c movel %fp@(12),%d5 50528: 262e 0010 movel %fp@(16),%d3 5052c: 206e 0014 moveal %fp@(20),%a0 50530: 286e 001c moveal %fp@(28),%a4 50534: 182e 001b moveb %fp@(27),%d4
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;
50538: 42a9 0034 clrl %a1@(52)
_ISR_Disable( level );
5053c: 40c1 movew %sr,%d1 5053e: 8081 orl %d1,%d0 50540: 46c0 movew %d0,%sr
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
50542: 240a movel %a2,%d2 50544: 200a movel %a2,%d0 50546: 0682 0000 0050 addil #80,%d2 5054c: 0680 0000 0054 addil #84,%d0
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
50552: 266a 0050 moveal %a2@(80),%a3
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
50556: b08b cmpl %a3,%d0 50558: 6700 0084 beqw 505de <_CORE_message_queue_Seize+0xd2>
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
5055c: 2253 moveal %a3@,%a1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_first_unprotected(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
5055e: 2342 0004 movel %d2,%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;
50562: 53aa 0048 subql #1,%a2@(72)
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
head->next = new_first;
50566: 2549 0050 movel %a1,%a2@(80)
_ISR_Enable( level );
5056a: 46c1 movew %d1,%sr
*size_p = the_message->Contents.size;
_Thread_Executing->Wait.count =
5056c: 2279 0006 b032 moveal 6b032 <_Per_CPU_Information+0xc>,%a1
_CORE_message_queue_Get_message_priority( the_message );
_CORE_message_queue_Copy_buffer(
the_message->Contents.buffer,
50572: 240b movel %a3,%d2 50574: 0682 0000 0010 addil #16,%d2
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
5057a: 49f9 0005 8b6c lea 58b6c <memcpy>,%a4
the_message = _CORE_message_queue_Get_pending_message( the_message_queue );
if ( the_message != NULL ) {
the_message_queue->number_of_pending_messages -= 1;
_ISR_Enable( level );
*size_p = the_message->Contents.size;
50580: 20ab 000c movel %a3@(12),%a0@
_Thread_Executing->Wait.count =
50584: 236b 0008 0024 movel %a3@(8),%a1@(36) 5058a: 2f10 movel %a0@,%sp@- 5058c: 2f02 movel %d2,%sp@- 5058e: 2f03 movel %d3,%sp@- 50590: 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 );
50592: 2f0a movel %a2,%sp@- 50594: 4eb9 0005 27a0 jsr 527a0 <_Thread_queue_Dequeue>
if ( !the_thread ) {
5059a: 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 );
5059e: 2040 moveal %d0,%a0
if ( !the_thread ) {
505a0: 4a80 tstl %d0 505a2: 6700 0088 beqw 5062c <_CORE_message_queue_Seize+0x120>
*/
_CORE_message_queue_Set_message_priority(
the_message,
the_thread->Wait.count
);
the_message->Contents.size = (size_t) the_thread->Wait.option;
505a6: 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;
505aa: 2768 0024 0008 movel %a0@(36),%a3@(8) 505b0: 2740 000c movel %d0,%a3@(12)
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
505b4: 2f00 movel %d0,%sp@- 505b6: 2f28 002c movel %a0@(44),%sp@- 505ba: 2f02 movel %d2,%sp@- 505bc: 4e94 jsr %a4@
the_thread->Wait.return_argument_second.immutable_object,
the_message->Contents.buffer,
the_message->Contents.size
);
_CORE_message_queue_Insert_message(
505be: 2d6b 0008 0010 movel %a3@(8),%fp@(16) 505c4: 4fef 000c lea %sp@(12),%sp 505c8: 2d4b 000c movel %a3,%fp@(12) 505cc: 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 );
}
505d0: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 505d6: 4e5e unlk %fp
the_thread->Wait.return_argument_second.immutable_object,
the_message->Contents.buffer,
the_message->Contents.size
);
_CORE_message_queue_Insert_message(
505d8: 4ef9 0005 5e80 jmp 55e80 <_CORE_message_queue_Insert_message>
return;
}
#endif
}
if ( !wait ) {
505de: 4a04 tstb %d4
505e0: 6612 bnes 505f4 <_CORE_message_queue_Seize+0xe8>
_ISR_Enable( level );
505e2: 46c1 movew %d1,%sr
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
505e4: 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 );
}
505e6: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4
#endif
}
if ( !wait ) {
_ISR_Enable( level );
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
505ec: 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 );
}
505f0: 4e5e unlk %fp 505f2: 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;
505f4: 7001 moveq #1,%d0 505f6: 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;
505fa: 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;
505fe: 234a 0044 movel %a2,%a1@(68)
executing->Wait.id = id;
50602: 2345 0020 movel %d5,%a1@(32)
executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p;
50606: 2348 0028 movel %a0,%a1@(40)
/* Wait.count will be filled in with the message priority */ _ISR_Enable( level );
5060a: 46c1 movew %d1,%sr
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
5060c: 2d4c 000c movel %a4,%fp@(12) 50610: 203c 0005 2c98 movel #339096,%d0 50616: 2d4a 0008 movel %a2,%fp@(8)
}
5061a: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4
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 );
50620: 2d40 0010 movel %d0,%fp@(16)
}
50624: 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 );
50626: 4ef9 0005 2910 jmp 52910 <_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 );
5062c: 45ea 0068 lea %a2@(104),%a2 50630: 2d4b 000c movel %a3,%fp@(12) 50634: 2d4a 0008 movel %a2,%fp@(8)
}
50638: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 5063e: 4e5e unlk %fp 50640: 4ef9 0005 036c jmp 5036c <_Chain_Append>
...
000479ac <_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
)
{
479ac: 4e56 0000 linkw %fp,#0 479b0: 2f0a movel %a2,%sp@- 479b2: 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)) ) {
479b6: 2f0a movel %a2,%sp@- 479b8: 4eb9 0004 95a4 jsr 495a4 <_Thread_queue_Dequeue> 479be: 588f addql #4,%sp 479c0: 4a80 tstl %d0
479c2: 670a beqs 479ce <_CORE_semaphore_Surrender+0x22>
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
}
return status;
}
479c4: 246e fffc moveal %fp@(-4),%a2
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
479c8: 4280 clrl %d0
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
}
return status;
}
479ca: 4e5e unlk %fp 479cc: 4e75 rts
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
479ce: 303c 0700 movew #1792,%d0 479d2: 40c1 movew %sr,%d1 479d4: 8081 orl %d1,%d0 479d6: 46c0 movew %d0,%sr
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
479d8: 202a 0048 movel %a2@(72),%d0 479dc: b0aa 0040 cmpl %a2@(64),%d0
479e0: 6412 bccs 479f4 <_CORE_semaphore_Surrender+0x48> <== NEVER TAKEN
the_semaphore->count += 1;
479e2: 5280 addql #1,%d0 479e4: 2540 0048 movel %d0,%a2@(72)
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
479e8: 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 );
479ea: 46c1 movew %d1,%sr
}
return status;
}
479ec: 246e fffc moveal %fp@(-4),%a2 479f0: 4e5e unlk %fp 479f2: 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;
479f4: 7004 moveq #4,%d0 <== NOT EXECUTED
_ISR_Enable( level );
479f6: 46c1 movew %d1,%sr <== NOT EXECUTED 479f8: 60f2 bras 479ec <_CORE_semaphore_Surrender+0x40> <== NOT EXECUTED
...
0004cbfc <_Chain_Initialize>:
Chain_Control *the_chain,
void *starting_address,
size_t number_nodes,
size_t node_size
)
{
4cbfc: 4e56 ffec linkw %fp,#-20 4cc00: 202e 0010 movel %fp@(16),%d0 4cc04: 48d7 043c moveml %d2-%d5/%a2,%sp@ 4cc08: 246e 0008 moveal %fp@(8),%a2
size_t count = number_nodes; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain );
4cc0c: 280a movel %a2,%d4 4cc0e: 5884 addql #4,%d4
Chain_Control *the_chain,
void *starting_address,
size_t number_nodes,
size_t node_size
)
{
4cc10: 262e 000c movel %fp@(12),%d3 4cc14: 242e 0014 movel %fp@(20),%d2
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
4cc18: 42aa 0004 clrl %a2@(4)
while ( count-- ) {
4cc1c: 4a80 tstl %d0
4cc1e: 6740 beqs 4cc60 <_Chain_Initialize+0x64> <== NEVER TAKEN
{
size_t count = number_nodes;
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *current = head;
Chain_Node *next = starting_address;
4cc20: 2043 moveal %d3,%a0
)
{
size_t count = number_nodes;
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *current = head;
4cc22: 224a moveal %a2,%a1
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
4cc24: 5380 subql #1,%d0
* node_size - size of node in bytes
*
* Output parameters: NONE
*/
void _Chain_Initialize(
4cc26: 2208 movel %a0,%d1
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
4cc28: 2a00 movel %d0,%d5
* node_size - size of node in bytes
*
* Output parameters: NONE
*/
void _Chain_Initialize(
4cc2a: d282 addl %d2,%d1
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
current->next = next;
4cc2c: 2288 movel %a0,%a1@
next->previous = current;
4cc2e: 2149 0004 movel %a1,%a0@(4)
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
4cc32: 4a80 tstl %d0
4cc34: 6714 beqs 4cc4a <_Chain_Initialize+0x4e>
4cc36: 2248 moveal %a0,%a1
current->next = next;
next->previous = current;
current = next;
next = (Chain_Node *)
4cc38: 2041 moveal %d1,%a0
* node_size - size of node in bytes
*
* Output parameters: NONE
*/
void _Chain_Initialize(
4cc3a: 2208 movel %a0,%d1 4cc3c: 5380 subql #1,%d0 4cc3e: d282 addl %d2,%d1
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
current->next = next;
4cc40: 2288 movel %a0,%a1@
next->previous = current;
4cc42: 2149 0004 movel %a1,%a0@(4)
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
4cc46: 4a80 tstl %d0
4cc48: 66ec bnes 4cc36 <_Chain_Initialize+0x3a>
* node_size - size of node in bytes
*
* Output parameters: NONE
*/
void _Chain_Initialize(
4cc4a: 4c05 2800 mulsl %d5,%d2
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
4cc4e: 2043 moveal %d3,%a0 4cc50: d1c2 addal %d2,%a0
current = next;
next = (Chain_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
current->next = tail;
4cc52: 2084 movel %d4,%a0@
tail->previous = current;
4cc54: 2548 0008 movel %a0,%a2@(8)
}
4cc58: 4cd7 043c moveml %sp@,%d2-%d5/%a2 4cc5c: 4e5e unlk %fp 4cc5e: 4e75 rts
)
{
size_t count = number_nodes;
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *current = head;
4cc60: 204a moveal %a2,%a0 <== NOT EXECUTED
current = next;
next = (Chain_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
current->next = tail;
4cc62: 2084 movel %d4,%a0@ <== NOT EXECUTED
tail->previous = current;
4cc64: 2548 0008 movel %a0,%a2@(8) <== NOT EXECUTED
}
4cc68: 4cd7 043c moveml %sp@,%d2-%d5/%a2 <== NOT EXECUTED 4cc6c: 4e5e unlk %fp <== NOT EXECUTED
0004661c <_Event_Surrender>:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
option_set = (rtems_option) the_thread->Wait.option;
_ISR_Disable( level );
4661c: 203c 0000 0700 movel #1792,%d0
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
46622: 4e56 ffec linkw %fp,#-20 46626: 48d7 043c moveml %d2-%d5/%a2,%sp@ 4662a: 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 ];
4662e: 206a 00fe moveal %a2@(254),%a0
option_set = (rtems_option) the_thread->Wait.option;
46632: 282a 0030 movel %a2@(48),%d4
_ISR_Disable( level );
46636: 40c3 movew %sr,%d3 46638: 8083 orl %d3,%d0 4663a: 46c0 movew %d0,%sr
pending_events = api->pending_events; event_condition = (rtems_event_set) the_thread->Wait.count;
4663c: 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 );
46640: 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;
46642: 2410 movel %a0@,%d2 46644: 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 ) ) {
46646: 6700 00ac beqw 466f4 <_Event_Surrender+0xd8>
/*
* 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() &&
4664a: 4ab9 0006 14a6 tstl 614a6 <_Per_CPU_Information+0x8>
46650: 6708 beqs 4665a <_Event_Surrender+0x3e>
46652: b5f9 0006 14aa cmpal 614aa <_Per_CPU_Information+0xc>,%a2
46658: 675c beqs 466b6 <_Event_Surrender+0x9a>
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_event (
States_Control the_states
)
{
return (the_states & STATES_WAITING_FOR_EVENT);
4665a: 2a2a 0010 movel %a2@(16),%d5 4665e: 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 ) ) {
46664: 6700 008e beqw 466f4 <_Event_Surrender+0xd8>
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
46668: b081 cmpl %d1,%d0
4666a: 6708 beqs 46674 <_Event_Surrender+0x58>
4666c: 0804 0001 btst #1,%d4 46670: 6700 0082 beqw 466f4 <_Event_Surrender+0xd8>
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) );
46674: 2200 movel %d0,%d1 46676: 4681 notl %d1 46678: c282 andl %d2,%d1 4667a: 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;
4667c: 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;
46680: 42aa 0024 clrl %a2@(36)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
46684: 2080 movel %d0,%a0@
_ISR_Flash( level );
46686: 203c 0000 0700 movel #1792,%d0 4668c: 46c3 movew %d3,%sr 4668e: 8083 orl %d3,%d0 46690: 46c0 movew %d0,%sr
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
46692: 7a02 moveq #2,%d5 46694: baaa 0050 cmpl %a2@(80),%d5
46698: 6766 beqs 46700 <_Event_Surrender+0xe4>
_ISR_Enable( level );
4669a: 46c3 movew %d3,%sr
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
4669c: 2f3c 1003 fff8 movel #268697592,%sp@- 466a2: 2f0a movel %a2,%sp@- 466a4: 4eb9 0004 8e1c jsr 48e1c <_Thread_Clear_state> 466aa: 508f addql #8,%sp
}
return;
}
}
_ISR_Enable( level );
}
466ac: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 466b2: 4e5e unlk %fp 466b4: 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) ||
466b6: 2279 0006 1884 moveal 61884 <_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 ) &&
466bc: 7a02 moveq #2,%d5 466be: ba89 cmpl %a1,%d5
466c0: 670e beqs 466d0 <_Event_Surrender+0xb4> <== NEVER TAKEN
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
466c2: 2279 0006 1884 moveal 61884 <_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) ||
466c8: 1a3c 0001 moveb #1,%d5 466cc: ba89 cmpl %a1,%d5
466ce: 668a bnes 4665a <_Event_Surrender+0x3e>
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
466d0: b081 cmpl %d1,%d0
466d2: 6706 beqs 466da <_Event_Surrender+0xbe>
466d4: 0804 0001 btst #1,%d4
466d8: 671a beqs 466f4 <_Event_Surrender+0xd8> <== NEVER TAKEN
466da: 2200 movel %d0,%d1 466dc: 4681 notl %d1 466de: c282 andl %d2,%d1 466e0: 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;
466e2: 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;
466e6: 42aa 0024 clrl %a2@(36)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
466ea: 2080 movel %d0,%a0@
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
466ec: 7003 moveq #3,%d0 466ee: 23c0 0006 1884 movel %d0,61884 <_Event_Sync_state>
_Thread_Unblock( the_thread );
}
return;
}
}
_ISR_Enable( level );
466f4: 46c3 movew %d3,%sr
}
466f6: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 466fc: 4e5e unlk %fp 466fe: 4e75 rts
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
46700: 7003 moveq #3,%d0 46702: 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 );
46706: 46c3 movew %d3,%sr
(void) _Watchdog_Remove( &the_thread->Timer );
46708: 486a 0048 pea %a2@(72) 4670c: 4eb9 0004 a160 jsr 4a160 <_Watchdog_Remove> 46712: 2f3c 1003 fff8 movel #268697592,%sp@- 46718: 2f0a movel %a2,%sp@- 4671a: 4eb9 0004 8e1c jsr 48e1c <_Thread_Clear_state> 46720: 4fef 000c lea %sp@(12),%sp
}
return;
}
}
_ISR_Enable( level );
}
46724: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 4672a: 4e5e unlk %fp
...
00046730 <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
46730: 4e56 fffc linkw %fp,#-4 46734: 2f03 movel %d3,%sp@- 46736: 2f02 movel %d2,%sp@-
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
46738: 486e fffc pea %fp@(-4) 4673c: 2f2e 0008 movel %fp@(8),%sp@- 46740: 4eb9 0004 9240 jsr 49240 <_Thread_Get>
switch ( location ) {
46746: 508f addql #8,%sp 46748: 4aae fffc tstl %fp@(-4)
4674c: 6648 bnes 46796 <_Event_Timeout+0x66> <== 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 );
4674e: 223c 0000 0700 movel #1792,%d1 46754: 40c2 movew %sr,%d2 46756: 8282 orl %d2,%d1 46758: 46c1 movew %d1,%sr
_ISR_Enable( level );
return;
}
#endif
the_thread->Wait.count = 0;
4675a: 2040 moveal %d0,%a0 4675c: 42a8 0024 clrl %a0@(36)
if ( _Thread_Is_executing( the_thread ) ) {
46760: b0b9 0006 14aa cmpl 614aa <_Per_CPU_Information+0xc>,%d0
46766: 673a beqs 467a2 <_Event_Timeout+0x72>
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
46768: 7606 moveq #6,%d3 4676a: 2040 moveal %d0,%a0 4676c: 2143 0034 movel %d3,%a0@(52)
_ISR_Enable( level );
46770: 46c2 movew %d2,%sr 46772: 2f3c 1003 fff8 movel #268697592,%sp@- 46778: 2f00 movel %d0,%sp@- 4677a: 4eb9 0004 8e1c jsr 48e1c <_Thread_Clear_state>
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
return _Thread_Dispatch_disable_level;
46780: 508f addql #8,%sp
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
46782: 2039 0006 1048 movel 61048 <_Thread_Dispatch_disable_level>,%d0 46788: 5380 subql #1,%d0 4678a: 23c0 0006 1048 movel %d0,61048 <_Thread_Dispatch_disable_level>
return _Thread_Dispatch_disable_level;
46790: 2039 0006 1048 movel 61048 <_Thread_Dispatch_disable_level>,%d0
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
46796: 242e fff4 movel %fp@(-12),%d2 4679a: 262e fff8 movel %fp@(-8),%d3 4679e: 4e5e unlk %fp 467a0: 4e75 rts
}
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
467a2: 2239 0006 1884 movel 61884 <_Event_Sync_state>,%d1 467a8: 7601 moveq #1,%d3 467aa: b681 cmpl %d1,%d3
467ac: 66ba bnes 46768 <_Event_Timeout+0x38>
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
467ae: 7606 moveq #6,%d3 467b0: 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;
467b2: 7202 moveq #2,%d1
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
467b4: 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;
467b8: 23c1 0006 1884 movel %d1,61884 <_Event_Sync_state>
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
_ISR_Enable( level );
467be: 46c2 movew %d2,%sr
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
467c0: 2f3c 1003 fff8 movel #268697592,%sp@- 467c6: 2f00 movel %d0,%sp@- 467c8: 4eb9 0004 8e1c jsr 48e1c <_Thread_Clear_state>
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
return _Thread_Dispatch_disable_level;
467ce: 508f addql #8,%sp
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
467d0: 2039 0006 1048 movel 61048 <_Thread_Dispatch_disable_level>,%d0 467d6: 5380 subql #1,%d0 467d8: 23c0 0006 1048 movel %d0,61048 <_Thread_Dispatch_disable_level>
return _Thread_Dispatch_disable_level;
467de: 2039 0006 1048 movel 61048 <_Thread_Dispatch_disable_level>,%d0 467e4: 60b0 bras 46796 <_Event_Timeout+0x66>
...
0004ce00 <_Heap_Allocate_aligned_with_boundary>:
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
4ce00: 4e56 ffcc linkw %fp,#-52 4ce04: 226e 000c moveal %fp@(12),%a1 4ce08: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4ce0c: 246e 0008 moveal %fp@(8),%a2
Heap_Statistics *const stats = &heap->stats; uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
4ce10: 2c09 movel %a1,%d6 4ce12: 5886 addql #4,%d6
- HEAP_ALLOC_BONUS;
uintptr_t const page_size = heap->page_size;
4ce14: 202a 0010 movel %a2@(16),%d0
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
4ce18: 222e 0010 movel %fp@(16),%d1 4ce1c: 282e 0014 movel %fp@(20),%d4
Heap_Statistics *const stats = &heap->stats;
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
- HEAP_ALLOC_BONUS;
uintptr_t const page_size = heap->page_size;
4ce20: 2d40 fffc movel %d0,%fp@(-4)
Heap_Block *block = NULL;
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
bool search_again = false;
if ( block_size_floor < alloc_size ) {
4ce24: bc89 cmpl %a1,%d6 4ce26: 6500 0148 bcsw 4cf70 <_Heap_Allocate_aligned_with_boundary+0x170>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
4ce2a: 4a84 tstl %d4
4ce2c: 670c beqs 4ce3a <_Heap_Allocate_aligned_with_boundary+0x3a>
if ( boundary < alloc_size ) {
4ce2e: b889 cmpl %a1,%d4 4ce30: 6500 013e bcsw 4cf70 <_Heap_Allocate_aligned_with_boundary+0x170>
return NULL;
}
if ( alignment == 0 ) {
4ce34: 4a81 tstl %d1
4ce36: 6602 bnes 4ce3a <_Heap_Allocate_aligned_with_boundary+0x3a>
alignment = page_size;
4ce38: 2200 movel %d0,%d1
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
4ce3a: 206a 0008 moveal %a2@(8),%a0
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
4ce3e: 4283 clrl %d3 4ce40: b1ca cmpal %a2,%a0
4ce42: 6732 beqs 4ce76 <_Heap_Allocate_aligned_with_boundary+0x76>
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
4ce44: 242e fffc movel %fp@(-4),%d2
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
4ce48: 7a04 moveq #4,%d5
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
4ce4a: 5e82 addql #7,%d2
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
4ce4c: 9a89 subl %a1,%d5
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
4ce4e: 2d42 fff8 movel %d2,%fp@(-8)
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
4ce52: 2d45 fff4 movel %d5,%fp@(-12)
/*
* The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag
* field. Thus the value is about one unit larger than the real block
* size. The greater than operator takes this into account.
*/
if ( block->size_and_flag > block_size_floor ) {
4ce56: 2028 0004 movel %a0@(4),%d0 4ce5a: b086 cmpl %d6,%d0
4ce5c: 6330 blss 4ce8e <_Heap_Allocate_aligned_with_boundary+0x8e>
if ( alignment == 0 ) {
4ce5e: 4a81 tstl %d1
4ce60: 6638 bnes 4ce9a <_Heap_Allocate_aligned_with_boundary+0x9a>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
4ce62: 2408 movel %a0,%d2 4ce64: 5082 addql #8,%d2
);
}
}
/* Statistics */
++search_count;
4ce66: 5283 addql #1,%d3
if ( alloc_begin != 0 ) {
4ce68: 4a82 tstl %d2 4ce6a: 6600 00e6 bnew 4cf52 <_Heap_Allocate_aligned_with_boundary+0x152>
break;
}
block = block->next;
4ce6e: 2068 0008 moveal %a0@(8),%a0
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
4ce72: b1ca cmpal %a2,%a0
4ce74: 66e0 bnes 4ce56 <_Heap_Allocate_aligned_with_boundary+0x56>
4ce76: 4282 clrl %d2
boundary
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
4ce78: b6aa 0044 cmpl %a2@(68),%d3
4ce7c: 6304 blss 4ce82 <_Heap_Allocate_aligned_with_boundary+0x82>
stats->max_search = search_count;
4ce7e: 2543 0044 movel %d3,%a2@(68)
}
return (void *) alloc_begin;
4ce82: 2002 movel %d2,%d0
}
4ce84: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4ce8a: 4e5e unlk %fp 4ce8c: 4e75 rts
if ( alloc_begin != 0 ) {
break;
}
block = block->next;
4ce8e: 2068 0008 moveal %a0@(8),%a0
);
}
}
/* Statistics */
++search_count;
4ce92: 5283 addql #1,%d3
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
4ce94: b1ca cmpal %a2,%a0
4ce96: 66be bnes 4ce56 <_Heap_Allocate_aligned_with_boundary+0x56>
4ce98: 60dc bras 4ce76 <_Heap_Allocate_aligned_with_boundary+0x76>
- 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;
4ce9a: 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;
4ce9c: 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;
4cea0: c087 andl %d7,%d0
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
4cea2: 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;
4cea6: 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;
4cea8: 2a2e fff8 movel %fp@(-8),%d5 4ceac: 9a8c subl %a4,%d5
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
uintptr_t alloc_begin = alloc_end - alloc_size;
4ceae: 242e fff4 movel %fp@(-12),%d2 4ceb2: d480 addl %d0,%d2
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
4ceb4: 2e02 movel %d2,%d7
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
4ceb6: d085 addl %d5,%d0 4ceb8: 4c41 7005 remul %d1,%d5,%d7 4cebc: 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 ) {
4cebe: b480 cmpl %d0,%d2
4cec0: 630a blss 4cecc <_Heap_Allocate_aligned_with_boundary+0xcc>
4cec2: 2a00 movel %d0,%d5 4cec4: 4c41 5002 remul %d1,%d2,%d5 4cec8: 9082 subl %d2,%d0 4ceca: 2400 movel %d0,%d2
}
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
4cecc: 4a84 tstl %d4
4cece: 6756 beqs 4cf26 <_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;
4ced0: 2002 movel %d2,%d0 4ced2: d089 addl %a1,%d0 4ced4: 2e00 movel %d0,%d7 4ced6: 4c44 7005 remul %d4,%d5,%d7 4ceda: 2e00 movel %d0,%d7 4cedc: 9e85 subl %d5,%d7 4cede: 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 ) {
4cee0: be82 cmpl %d2,%d7
4cee2: 6342 blss 4cf26 <_Heap_Allocate_aligned_with_boundary+0x126>
4cee4: be80 cmpl %d0,%d7
4cee6: 643e bccs 4cf26 <_Heap_Allocate_aligned_with_boundary+0x126>
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
4cee8: 2e0d movel %a5,%d7 4ceea: de89 addl %a1,%d7
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
if ( boundary_line < boundary_floor ) {
4ceec: ba87 cmpl %d7,%d5
4ceee: 652a bcss 4cf1a <_Heap_Allocate_aligned_with_boundary+0x11a>
4cef0: 2647 moveal %d7,%a3
return 0;
}
alloc_begin = boundary_line - alloc_size;
4cef2: 2405 movel %d5,%d2 4cef4: 9489 subl %a1,%d2 4cef6: 2a02 movel %d2,%d5 4cef8: 4c41 5000 remul %d1,%d0,%d5 4cefc: 9480 subl %d0,%d2
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
4cefe: 2002 movel %d2,%d0 4cf00: d089 addl %a1,%d0 4cf02: 2e00 movel %d0,%d7 4cf04: 4c44 7005 remul %d4,%d5,%d7 4cf08: 2e00 movel %d0,%d7 4cf0a: 9e85 subl %d5,%d7 4cf0c: 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 ) {
4cf0e: be82 cmpl %d2,%d7
4cf10: 6314 blss 4cf26 <_Heap_Allocate_aligned_with_boundary+0x126>
4cf12: be80 cmpl %d0,%d7
4cf14: 6410 bccs 4cf26 <_Heap_Allocate_aligned_with_boundary+0x126>
if ( boundary_line < boundary_floor ) {
4cf16: ba8b cmpl %a3,%d5
4cf18: 64d8 bccs 4cef2 <_Heap_Allocate_aligned_with_boundary+0xf2><== ALWAYS TAKEN
if ( free_size >= min_block_size || free_size == 0 ) {
return alloc_begin;
}
}
return 0;
4cf1a: 4282 clrl %d2
);
}
}
/* Statistics */
++search_count;
4cf1c: 5283 addql #1,%d3
if ( alloc_begin != 0 ) {
4cf1e: 4a82 tstl %d2 4cf20: 6700 ff4c beqw 4ce6e <_Heap_Allocate_aligned_with_boundary+0x6e>
4cf24: 602c bras 4cf52 <_Heap_Allocate_aligned_with_boundary+0x152><== NOT EXECUTED
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 ) {
4cf26: b48d cmpl %a5,%d2
4cf28: 65f0 bcss 4cf1a <_Heap_Allocate_aligned_with_boundary+0x11a>
4cf2a: 70f8 moveq #-8,%d0 4cf2c: 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);
4cf2e: 2a40 moveal %d0,%a5
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
4cf30: 2e02 movel %d2,%d7
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
4cf32: dbc2 addal %d2,%a5
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
4cf34: 202e fffc movel %fp@(-4),%d0 4cf38: 4c40 7005 remul %d0,%d5,%d7
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;
4cf3c: 9bc5 subal %d5,%a5
if ( free_size >= min_block_size || free_size == 0 ) {
4cf3e: bbcc cmpal %a4,%a5 4cf40: 6400 ff24 bccw 4ce66 <_Heap_Allocate_aligned_with_boundary+0x66>
return alloc_begin;
}
}
return 0;
4cf44: 4a8d tstl %a5 4cf46: 57c0 seq %d0
);
}
}
/* Statistics */
++search_count;
4cf48: 5283 addql #1,%d3
if ( free_size >= min_block_size || free_size == 0 ) {
return alloc_begin;
}
}
return 0;
4cf4a: 49c0 extbl %d0 4cf4c: c480 andl %d0,%d2
}
/* Statistics */
++search_count;
if ( alloc_begin != 0 ) {
4cf4e: 6700 ff1e beqw 4ce6e <_Heap_Allocate_aligned_with_boundary+0x6e>
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
stats->searches += search_count;
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
4cf52: 2f09 movel %a1,%sp@-
search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin );
} while ( search_again );
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
4cf54: 52aa 0048 addql #1,%a2@(72)
stats->searches += search_count;
4cf58: d7aa 004c addl %d3,%a2@(76)
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
4cf5c: 2f02 movel %d2,%sp@- 4cf5e: 2f08 movel %a0,%sp@- 4cf60: 2f0a movel %a2,%sp@- 4cf62: 4eb9 0004 7dac jsr 47dac <_Heap_Block_allocate> 4cf68: 4fef 0010 lea %sp@(16),%sp 4cf6c: 6000 ff0a braw 4ce78 <_Heap_Allocate_aligned_with_boundary+0x78>
return NULL;
}
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
return NULL;
4cf70: 4280 clrl %d0
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
4cf72: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5
4cf78: 4e5e unlk %fp <== NOT EXECUTED
0004cf30 <_Heap_Extend>:
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
4cf30: 4e56 ffcc linkw %fp,#-52 4cf34: 202e 0010 movel %fp@(16),%d0 4cf38: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4cf3c: 246e 0008 moveal %fp@(8),%a2 4cf40: 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;
4cf44: 2602 movel %d2,%d3 4cf46: 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;
4cf48: 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;
4cf4c: 282a 0010 movel %a2@(16),%d4
uintptr_t const min_block_size = heap->min_block_size;
4cf50: 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;
4cf54: 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;
4cf58: 42ae fff8 clrl %fp@(-8)
Heap_Block *extend_last_block = NULL;
4cf5c: 42ae fffc clrl %fp@(-4)
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 ) {
4cf60: b682 cmpl %d2,%d3
4cf62: 640c bccs 4cf70 <_Heap_Extend+0x40>
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
4cf64: 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;
4cf6a: 4200 clrb %d0
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
4cf6c: 4e5e unlk %fp 4cf6e: 4e75 rts
if ( extend_area_end < extend_area_begin ) {
return false;
}
extend_area_ok = _Heap_Get_first_and_last_block(
4cf70: 486e fffc pea %fp@(-4) 4cf74: 486e fff8 pea %fp@(-8) 4cf78: 2f01 movel %d1,%sp@- 4cf7a: 2f04 movel %d4,%sp@- 4cf7c: 2f00 movel %d0,%sp@- 4cf7e: 2f02 movel %d2,%sp@- 4cf80: 4eb9 0004 7bd0 jsr 47bd0 <_Heap_Get_first_and_last_block>
page_size,
min_block_size,
&extend_first_block,
&extend_last_block
);
if (!extend_area_ok ) {
4cf86: 4fef 0018 lea %sp@(24),%sp 4cf8a: 4a00 tstb %d0
4cf8c: 67d6 beqs 4cf64 <_Heap_Extend+0x34>
4cf8e: 2045 moveal %d5,%a0 4cf90: 9bcd subal %a5,%a5 4cf92: 97cb subal %a3,%a3 4cf94: 99cc subal %a4,%a4 4cf96: 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;
4cf9a: ba88 cmpl %a0,%d5 4cf9c: 6700 0148 beqw 4d0e6 <_Heap_Extend+0x1b6> 4cfa0: 2208 movel %a0,%d1
uintptr_t const sub_area_end = start_block->prev_size;
4cfa2: 2010 movel %a0@,%d0
Heap_Block *const end_block =
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
4cfa4: b082 cmpl %d2,%d0
4cfa6: 6304 blss 4cfac <_Heap_Extend+0x7c>
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
4cfa8: b681 cmpl %d1,%d3
4cfaa: 62b8 bhis 4cf64 <_Heap_Extend+0x34> <== NEVER TAKEN
) {
return false;
}
if ( extend_area_end == sub_area_begin ) {
4cfac: b681 cmpl %d1,%d3 4cfae: 6700 0130 beqw 4d0e0 <_Heap_Extend+0x1b0>
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
4cfb2: b083 cmpl %d3,%d0
4cfb4: 6304 blss 4cfba <_Heap_Extend+0x8a>
4cfb6: 2d48 fff4 movel %a0,%fp@(-12) 4cfba: 2e00 movel %d0,%d7 4cfbc: 2240 moveal %d0,%a1 4cfbe: 5189 subql #8,%a1 4cfc0: 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);
4cfc4: 93c1 subal %d1,%a1
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
4cfc6: b480 cmpl %d0,%d2 4cfc8: 6700 00fe beqw 4d0c8 <_Heap_Extend+0x198>
start_block->prev_size = extend_area_end;
merge_above_block = end_block;
} else if ( sub_area_end < extend_area_begin ) {
4cfcc: b082 cmpl %d2,%d0
4cfce: 6402 bccs 4cfd2 <_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 )
4cfd0: 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;
4cfd2: 70fe moveq #-2,%d0 4cfd4: 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);
4cfd8: 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 );
4cfdc: b1c5 cmpal %d5,%a0
4cfde: 66ba bnes 4cf9a <_Heap_Extend+0x6a>
if ( extend_area_begin < heap->area_begin ) {
4cfe0: b4aa 0018 cmpl %a2@(24),%d2 4cfe4: 6500 0108 bcsw 4d0ee <_Heap_Extend+0x1be>
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
4cfe8: b6aa 001c cmpl %a2@(28),%d3
4cfec: 6304 blss 4cff2 <_Heap_Extend+0xc2>
heap->area_end = extend_area_end;
4cfee: 2543 001c movel %d3,%a2@(28)
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
4cff2: 226e fffc moveal %fp@(-4),%a1
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
4cff6: 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;
4cff8: 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;
4cffa: 206e fff8 moveal %fp@(-8),%a0
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
4cffe: 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;
4d000: 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;
4d002: 2083 movel %d3,%a0@
extend_first_block->size_and_flag =
extend_first_block_size | HEAP_PREV_BLOCK_USED;
4d004: 2141 0004 movel %d1,%a0@(4)
_Heap_Protection_block_initialize( heap, extend_first_block );
extend_last_block->prev_size = extend_first_block_size;
4d008: 2280 movel %d0,%a1@
extend_last_block->size_and_flag = 0;
4d00a: 42a9 0004 clrl %a1@(4)
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
4d00e: b1ea 0020 cmpal %a2@(32),%a0 4d012: 6400 0102 bccw 4d116 <_Heap_Extend+0x1e6>
heap->first_block = extend_first_block;
4d016: 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 ) {
4d01a: 4a8c tstl %a4 4d01c: 6700 0146 beqw 4d164 <_Heap_Extend+0x234>
Heap_Control *heap,
uintptr_t extend_area_begin,
Heap_Block *first_block
)
{
uintptr_t const page_size = heap->page_size;
4d020: 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 );
4d024: 5082 addql #8,%d2
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
4d026: 2802 movel %d2,%d4 4d028: 4c40 4001 remul %d0,%d1,%d4
if ( remainder != 0 ) {
4d02c: 4a81 tstl %d1
4d02e: 6704 beqs 4d034 <_Heap_Extend+0x104>
return value - remainder + alignment;
4d030: d480 addl %d0,%d2 4d032: 9481 subl %d1,%d2
uintptr_t const new_first_block_begin =
4d034: 2042 moveal %d2,%a0 4d036: 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 =
4d038: 200c movel %a4,%d0 4d03a: 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;
4d03c: 7201 moveq #1,%d1 4d03e: 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;
4d040: 2094 movel %a4@,%a0@
new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED;
4d042: 2141 0004 movel %d1,%a0@(4)
_Heap_Free_block( heap, new_first_block );
4d046: 2f08 movel %a0,%sp@- 4d048: 2f0a movel %a2,%sp@- 4d04a: 4eba fec8 jsr %pc@(4cf14 <_Heap_Free_block>) 4d04e: 508f addql #8,%sp
link_below_block,
extend_last_block
);
}
if ( merge_above_block != NULL ) {
4d050: 4a8b tstl %a3 4d052: 6700 00d2 beqw 4d126 <_Heap_Extend+0x1f6>
)
{
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,
4d056: 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(
4d058: 968b subl %a3,%d3
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
4d05a: 2203 movel %d3,%d1 4d05c: 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;
4d062: 7201 moveq #1,%d1 4d064: 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)
4d066: 202b 0004 movel %a3@(4),%d0 4d06a: 9083 subl %d3,%d0
| HEAP_PREV_BLOCK_USED;
4d06c: 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;
4d06e: 7001 moveq #1,%d0 4d070: 2781 3804 movel %d1,%a3@(00000004,%d3:l) 4d074: c0ab 0004 andl %a3@(4),%d0
block->size_and_flag = size | flag;
4d078: 8680 orl %d0,%d3 4d07a: 2743 0004 movel %d3,%a3@(4)
_Heap_Block_set_size( last_block, last_block_new_size );
_Heap_Free_block( heap, last_block );
4d07e: 2f0b movel %a3,%sp@- 4d080: 2f0a movel %a2,%sp@- 4d082: 4eba fe90 jsr %pc@(4cf14 <_Heap_Free_block>) 4d086: 508f addql #8,%sp
extend_first_block,
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
4d088: 4a8c tstl %a4 4d08a: 6700 00c2 beqw 4d14e <_Heap_Extend+0x21e>
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
4d08e: 206a 0024 moveal %a2@(36),%a0
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
4d092: 7201 moveq #1,%d1
* 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(
4d094: 202a 0020 movel %a2@(32),%d0 4d098: 9088 subl %a0,%d0
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;
4d09a: c2a8 0004 andl %a0@(4),%d1
block->size_and_flag = size | flag;
4d09e: 8280 orl %d0,%d1 4d0a0: 2141 0004 movel %d1,%a0@(4)
_Heap_Free_block( heap, extend_first_block );
}
_Heap_Set_last_block_size( heap );
extended_size = stats->free_size - free_size;
4d0a4: 222a 0030 movel %a2@(48),%d1 4d0a8: 9286 subl %d6,%d1
/* Statistics */
stats->size += extended_size;
4d0aa: d3aa 002c addl %d1,%a2@(44)
if ( extended_size_ptr != NULL )
4d0ae: 4aae 0014 tstl %fp@(20) 4d0b2: 6700 00ca beqw 4d17e <_Heap_Extend+0x24e>
*extended_size_ptr = extended_size;
4d0b6: 206e 0014 moveal %fp@(20),%a0
return true;
}
4d0ba: 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;
4d0c0: 7001 moveq #1,%d0
/* Statistics */
stats->size += extended_size;
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
4d0c2: 2081 movel %d1,%a0@
return true;
}
4d0c4: 4e5e unlk %fp 4d0c6: 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;
4d0c8: 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 )
4d0ca: 2649 moveal %a1,%a3
} 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;
4d0cc: 2083 movel %d3,%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;
4d0ce: 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);
4d0d2: 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 );
4d0d6: b1c5 cmpal %d5,%a0 4d0d8: 6600 fec0 bnew 4cf9a <_Heap_Extend+0x6a> 4d0dc: 6000 ff02 braw 4cfe0 <_Heap_Extend+0xb0>
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
}
if ( extend_area_end == sub_area_begin ) {
4d0e0: 2848 moveal %a0,%a4 4d0e2: 6000 fed6 braw 4cfba <_Heap_Extend+0x8a>
return false;
}
do {
uintptr_t const sub_area_begin = (start_block != first_block) ?
(uintptr_t) start_block : heap->area_begin;
4d0e6: 222a 0018 movel %a2@(24),%d1 4d0ea: 6000 feb6 braw 4cfa2 <_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;
4d0ee: 226e fffc moveal %fp@(-4),%a1
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
4d0f2: 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;
4d0f4: 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;
4d0f6: 206e fff8 moveal %fp@(-8),%a0
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
4d0fa: 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;
4d0fc: 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;
4d100: 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;
4d102: 2083 movel %d3,%a0@
extend_first_block->size_and_flag =
extend_first_block_size | HEAP_PREV_BLOCK_USED;
4d104: 2141 0004 movel %d1,%a0@(4)
_Heap_Protection_block_initialize( heap, extend_first_block );
extend_last_block->prev_size = extend_first_block_size;
4d108: 2280 movel %d0,%a1@
extend_last_block->size_and_flag = 0;
4d10a: 42a9 0004 clrl %a1@(4)
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
4d10e: b1ea 0020 cmpal %a2@(32),%a0 4d112: 6500 ff02 bcsw 4d016 <_Heap_Extend+0xe6>
heap->first_block = extend_first_block;
} else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) {
4d116: b3ea 0024 cmpal %a2@(36),%a1 4d11a: 6300 fefe blsw 4d01a <_Heap_Extend+0xea>
heap->last_block = extend_last_block;
4d11e: 2549 0024 movel %a1,%a2@(36) 4d122: 6000 fef6 braw 4d01a <_Heap_Extend+0xea>
);
}
if ( merge_above_block != NULL ) {
_Heap_Merge_above( heap, merge_above_block, extend_area_end );
} else if ( link_above_block != NULL ) {
4d126: 4a8d tstl %a5 4d128: 6700 ff5e beqw 4d088 <_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;
4d12c: 7201 moveq #1,%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 );
4d12e: 202e fff8 movel %fp@(-8),%d0 4d132: 908d subl %a5,%d0 4d134: c2ad 0004 andl %a5@(4),%d1
}
if ( merge_above_block != NULL ) {
_Heap_Merge_above( heap, merge_above_block, extend_area_end );
} else if ( link_above_block != NULL ) {
_Heap_Link_above(
4d138: 206e fffc moveal %fp@(-4),%a0
block->size_and_flag = size | flag;
4d13c: 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;
4d13e: 7001 moveq #1,%d0 4d140: 2b41 0004 movel %d1,%a5@(4) 4d144: 81a8 0004 orl %d0,%a0@(4)
extend_first_block,
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
4d148: 4a8c tstl %a4 4d14a: 6600 ff42 bnew 4d08e <_Heap_Extend+0x15e> 4d14e: 4a8b tstl %a3 4d150: 6600 ff3c bnew 4d08e <_Heap_Extend+0x15e>
_Heap_Free_block( heap, extend_first_block );
4d154: 2f2e fff8 movel %fp@(-8),%sp@- 4d158: 2f0a movel %a2,%sp@- 4d15a: 4eba fdb8 jsr %pc@(4cf14 <_Heap_Free_block>) 4d15e: 508f addql #8,%sp 4d160: 6000 ff2c braw 4d08e <_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 ) {
4d164: 4aae fff4 tstl %fp@(-12) 4d168: 6700 fee6 beqw 4d050 <_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;
4d16c: 202e fff4 movel %fp@(-12),%d0 4d170: 7201 moveq #1,%d1 4d172: 9089 subl %a1,%d0 4d174: 8280 orl %d0,%d1 4d176: 2341 0004 movel %d1,%a1@(4) 4d17a: 6000 fed4 braw 4d050 <_Heap_Extend+0x120>
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
4d17e: 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;
4d184: 7001 moveq #1,%d0 <== NOT EXECUTED
}
4d186: 4e5e unlk %fp <== NOT EXECUTED
...
0004cf7c <_Heap_Free>:
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
4cf7c: 4e56 ffe8 linkw %fp,#-24 4cf80: 206e 0008 moveal %fp@(8),%a0 4cf84: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 4cf88: 202e 000c movel %fp@(12),%d0
/*
* If NULL return true so a free on NULL is considered a valid release. This
* is a special case that could be handled by the in heap check how-ever that
* would result in false being returned which is wrong.
*/
if ( alloc_begin_ptr == NULL ) {
4cf8c: 6700 00f2 beqw 4d080 <_Heap_Free+0x104> 4cf90: 2240 moveal %d0,%a1 4cf92: 5189 subql #8,%a1 4cf94: 4c68 0001 0010 remul %a0@(16),%d1,%d0
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
4cf9a: 2028 0020 movel %a0@(32),%d0
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
4cf9e: 93c1 subal %d1,%a1
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
4cfa0: b089 cmpl %a1,%d0 4cfa2: 6200 0098 bhiw 4d03c <_Heap_Free+0xc0> 4cfa6: 2228 0024 movel %a0@(36),%d1 4cfaa: b289 cmpl %a1,%d1 4cfac: 6500 008e bcsw 4d03c <_Heap_Free+0xc0>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
4cfb0: 2629 0004 movel %a1@(4),%d3
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
4cfb4: 74fe moveq #-2,%d2 4cfb6: 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);
4cfb8: 45f1 2800 lea %a1@(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;
4cfbc: b5c0 cmpal %d0,%a2
4cfbe: 657c bcss 4d03c <_Heap_Free+0xc0> <== NEVER TAKEN
4cfc0: b5c1 cmpal %d1,%a2
4cfc2: 6278 bhis 4d03c <_Heap_Free+0xc0> <== NEVER TAKEN
4cfc4: 282a 0004 movel %a2@(4),%d4
return false;
}
_Heap_Protection_block_check( heap, next_block );
if ( !_Heap_Is_prev_used( next_block ) ) {
4cfc8: 0804 0000 btst #0,%d4
4cfcc: 676e beqs 4d03c <_Heap_Free+0xc0> <== 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;
4cfce: 7afe moveq #-2,%d5 4cfd0: c885 andl %d5,%d4
return true;
}
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 ));
4cfd2: b5c1 cmpal %d1,%a2 4cfd4: 6700 00fa beqw 4d0d0 <_Heap_Free+0x154>
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;
4cfd8: 7a01 moveq #1,%d5 4cfda: cab2 4804 andl %a2@(00000004,%d4:l),%d5
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
4cfde: 57c5 seq %d5 4cfe0: 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 ) ) {
4cfe2: 0803 0000 btst #0,%d3
4cfe6: 665e bnes 4d046 <_Heap_Free+0xca>
uintptr_t const prev_size = block->prev_size;
4cfe8: 2611 movel %a1@,%d3
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
4cfea: 93c3 subal %d3,%a1
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
4cfec: b3c0 cmpal %d0,%a1
4cfee: 654c bcss 4d03c <_Heap_Free+0xc0> <== NEVER TAKEN
4cff0: b3c1 cmpal %d1,%a1
4cff2: 6248 bhis 4d03c <_Heap_Free+0xc0> <== 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;
4cff4: 7001 moveq #1,%d0 4cff6: c0a9 0004 andl %a1@(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) ) {
4cffa: 6740 beqs 4d03c <_Heap_Free+0xc0> <== NEVER TAKEN
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
4cffc: 4a05 tstb %d5 4cffe: 6700 00d6 beqw 4d0d6 <_Heap_Free+0x15a>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
4d002: 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;
4d006: d682 addl %d2,%d3 4d008: d883 addl %d3,%d4
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4d00a: 7001 moveq #1,%d0
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
4d00c: 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;
4d010: 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;
4d014: 8084 orl %d4,%d0
next->prev = prev;
4d016: 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;
4d01a: 53a8 0038 subql #1,%a0@(56)
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
4d01e: 2384 4800 movel %d4,%a1@(00000000,%d4: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;
4d022: 2340 0004 movel %d0,%a1@(4)
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
4d026: 53a8 0040 subql #1,%a0@(64)
++stats->frees;
4d02a: 52a8 0050 addql #1,%a0@(80)
stats->free_size += block_size;
4d02e: d5a8 0030 addl %d2,%a0@(48)
return( true );
4d032: 7001 moveq #1,%d0
}
4d034: 4cd7 0c3c moveml %sp@,%d2-%d5/%a2-%a3 4d038: 4e5e unlk %fp 4d03a: 4e75 rts 4d03c: 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 );
4d040: 4200 clrb %d0
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
4d042: 4e5e unlk %fp 4d044: 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 */
4d046: 4a05 tstb %d5
4d048: 673a beqs 4d084 <_Heap_Free+0x108>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
4d04a: 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;
4d04e: d882 addl %d2,%d4
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4d050: 7001 moveq #1,%d0
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
4d052: 246a 000c moveal %a2@(12),%a2
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;
4d056: 8084 orl %d4,%d0
)
{
Heap_Block *next = old_block->next;
Heap_Block *prev = old_block->prev;
new_block->next = next;
4d058: 234b 0008 movel %a3,%a1@(8)
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
4d05c: 2384 4800 movel %d4,%a1@(00000000,%d4:l)
new_block->prev = prev;
4d060: 234a 000c movel %a2,%a1@(12)
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;
4d064: 2340 0004 movel %d0,%a1@(4)
/* Statistics */
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
4d068: 7001 moveq #1,%d0
next->prev = new_block;
prev->next = new_block;
4d06a: 2549 0008 movel %a1,%a2@(8)
Heap_Block *prev = old_block->prev;
new_block->next = next;
new_block->prev = prev;
next->prev = new_block;
4d06e: 2749 000c movel %a1,%a3@(12)
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
4d072: 53a8 0040 subql #1,%a0@(64)
++stats->frees;
4d076: 52a8 0050 addql #1,%a0@(80)
stats->free_size += block_size;
4d07a: d5a8 0030 addl %d2,%a0@(48) 4d07e: 60b4 bras 4d034 <_Heap_Free+0xb8>
* If NULL return true so a free on NULL is considered a valid release. This
* is a special case that could be handled by the in heap check how-ever that
* would result in false being returned which is wrong.
*/
if ( alloc_begin_ptr == NULL ) {
return true;
4d080: 7001 moveq #1,%d0 4d082: 60b0 bras 4d034 <_Heap_Free+0xb8>
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;
4d084: 2028 0038 movel %a0@(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;
4d088: 7201 moveq #1,%d1
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4d08a: 7afe moveq #-2,%d5
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
4d08c: 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;
4d08e: 2668 0008 moveal %a0@(8),%a3
new_block->next = next;
new_block->prev = block_before;
4d092: 2348 000c movel %a0,%a1@(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;
4d096: 8282 orl %d2,%d1
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
new_block->next = next;
4d098: 234b 0008 movel %a3,%a1@(8) 4d09c: 2341 0004 movel %d1,%a1@(4)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4d0a0: cbaa 0004 andl %d5,%a2@(4)
new_block->prev = block_before; block_before->next = new_block; next->prev = new_block;
4d0a4: 2749 000c movel %a1,%a3@(12)
next_block->prev_size = block_size;
4d0a8: 2482 movel %d2,%a2@
{
Heap_Block *next = block_before->next;
new_block->next = next;
new_block->prev = block_before;
block_before->next = new_block;
4d0aa: 2149 0008 movel %a1,%a0@(8)
/* Statistics */
++stats->free_blocks;
4d0ae: 2140 0038 movel %d0,%a0@(56)
if ( stats->max_free_blocks < stats->free_blocks ) {
4d0b2: b0a8 003c cmpl %a0@(60),%d0 4d0b6: 6300 ff6e blsw 4d026 <_Heap_Free+0xaa>
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
4d0ba: 53a8 0040 subql #1,%a0@(64)
++stats->frees;
4d0be: 52a8 0050 addql #1,%a0@(80)
stats->free_size += block_size;
4d0c2: d5a8 0030 addl %d2,%a0@(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;
4d0c6: 2140 003c movel %d0,%a0@(60)
/* Statistics */
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
4d0ca: 7001 moveq #1,%d0 4d0cc: 6000 ff66 braw 4d034 <_Heap_Free+0xb8>
return true;
}
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 ));
4d0d0: 4205 clrb %d5 4d0d2: 6000 ff0e braw 4cfe2 <_Heap_Free+0x66>
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
} else { /* coalesce prev */
uintptr_t const size = block_size + prev_size;
4d0d6: d682 addl %d2,%d3
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4d0d8: 7201 moveq #1,%d1
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4d0da: 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;
4d0dc: 8283 orl %d3,%d1
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = size;
4d0de: 2483 movel %d3,%a2@
/* Statistics */
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
4d0e0: 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;
4d0e2: 2341 0004 movel %d1,%a1@(4)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4d0e6: cbaa 0004 andl %d5,%a2@(4)
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
4d0ea: 53a8 0040 subql #1,%a0@(64)
++stats->frees;
4d0ee: 52a8 0050 addql #1,%a0@(80)
stats->free_size += block_size;
4d0f2: d5a8 0030 addl %d2,%a0@(48) 4d0f6: 6000 ff3c braw 4d034 <_Heap_Free+0xb8>
...
0004d99c <_Heap_Get_information>:
void _Heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
4d99c: 4e56 fff0 linkw %fp,#-16 4d9a0: 48d7 041c moveml %d2-%d4/%a2,%sp@ 4d9a4: 246e 0008 moveal %fp@(8),%a2 4d9a8: 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));
4d9ac: 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;
4d9ae: 226a 0020 moveal %a2@(32),%a1
Heap_Block *const end = the_heap->last_block;
4d9b2: 242a 0024 movel %a2@(36),%d2
memset(the_info, 0, sizeof(*the_info));
4d9b6: 4298 clrl %a0@+ 4d9b8: 4298 clrl %a0@+ 4d9ba: 4298 clrl %a0@+ 4d9bc: 4298 clrl %a0@+ 4d9be: 4298 clrl %a0@+ 4d9c0: 4290 clrl %a0@
while ( the_block != end ) {
4d9c2: b489 cmpl %a1,%d2
4d9c4: 6734 beqs 4d9fa <_Heap_Get_information+0x5e> <== 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;
4d9c6: 2604 movel %d4,%d3 4d9c8: 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 ) {
4d9ce: 2229 0004 movel %a1@(4),%d1
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
4d9d2: 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;
4d9d4: 2043 moveal %d3,%a0 4d9d6: 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);
4d9d8: d3c0 addal %d0,%a1
if ( info->largest < the_size )
info->largest = the_size;
the_block = next_block;
}
}
4d9da: 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) )
4d9de: 0801 0000 btst #0,%d1
4d9e2: 6602 bnes 4d9e6 <_Heap_Get_information+0x4a>
info = &the_info->Used;
else
info = &the_info->Free;
4d9e4: 2044 moveal %d4,%a0
info->number++;
4d9e6: 5290 addql #1,%a0@
info->total += the_size;
4d9e8: d1a8 0008 addl %d0,%a0@(8)
if ( info->largest < the_size )
4d9ec: b0a8 0004 cmpl %a0@(4),%d0
4d9f0: 6304 blss 4d9f6 <_Heap_Get_information+0x5a>
info->largest = the_size;
4d9f2: 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 ) {
4d9f6: b3c2 cmpal %d2,%a1
4d9f8: 66d8 bnes 4d9d2 <_Heap_Get_information+0x36>
if ( info->largest < the_size )
info->largest = the_size;
the_block = next_block;
}
}
4d9fa: 4cd7 041c moveml %sp@,%d2-%d4/%a2 4d9fe: 4e5e unlk %fp
...
0005d654 <_Heap_Size_of_alloc_area>:
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
5d654: 4e56 0000 linkw %fp,#0 5d658: 202e 000c movel %fp@(12),%d0
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
5d65c: 2040 moveal %d0,%a0 5d65e: 5188 subql #8,%a0 5d660: 226e 0008 moveal %fp@(8),%a1 5d664: 2f02 movel %d2,%sp@- 5d666: 2400 movel %d0,%d2 5d668: 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);
5d66e: 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
5d670: 2229 0020 movel %a1@(32),%d1
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
5d674: b288 cmpl %a0,%d1
5d676: 6238 bhis 5d6b0 <_Heap_Size_of_alloc_area+0x5c>
5d678: 2269 0024 moveal %a1@(36),%a1 5d67c: b3c8 cmpal %a0,%a1
5d67e: 6530 bcss 5d6b0 <_Heap_Size_of_alloc_area+0x5c> <== 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;
5d680: 74fe moveq #-2,%d2 5d682: 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);
5d686: 41f0 2800 lea %a0@(00000000,%d2:l),%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;
5d68a: b1c1 cmpal %d1,%a0
5d68c: 6522 bcss 5d6b0 <_Heap_Size_of_alloc_area+0x5c> <== NEVER TAKEN
5d68e: b1c9 cmpal %a1,%a0
5d690: 621e bhis 5d6b0 <_Heap_Size_of_alloc_area+0x5c> <== 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;
5d692: 7201 moveq #1,%d1 5d694: 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 )
5d698: 6716 beqs 5d6b0 <_Heap_Size_of_alloc_area+0x5c> <== NEVER TAKEN
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
5d69a: 7204 moveq #4,%d1 5d69c: 9280 subl %d0,%d1 5d69e: 2001 movel %d1,%d0 5d6a0: d088 addl %a0,%d0 5d6a2: 226e 0010 moveal %fp@(16),%a1
return true;
}
5d6a6: 241f movel %sp@+,%d2 5d6a8: 4e5e unlk %fp
|| !_Heap_Is_prev_used( next_block )
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
5d6aa: 2280 movel %d0,%a1@
return true;
5d6ac: 7001 moveq #1,%d0
}
5d6ae: 4e75 rts 5d6b0: 241f movel %sp@+,%d2 5d6b2: 4e5e unlk %fp
if (
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
) {
return false;
5d6b4: 4200 clrb %d0 <== NOT EXECUTED
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
return true;
}
0004864a <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
4864a: 4e56 ffc4 linkw %fp,#-60 4864e: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 48652: 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;
48656: 4bfa ff94 lea %pc@(485ec <_Heap_Walk_print_nothing>),%a5
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
4865a: 2a2e 000c movel %fp@(12),%d5
uintptr_t const page_size = heap->page_size;
4865e: 262a 0010 movel %a2@(16),%d3
uintptr_t const min_block_size = heap->min_block_size;
48662: 2c2a 0014 movel %a2@(20),%d6
Heap_Block *const first_block = heap->first_block;
48666: 282a 0020 movel %a2@(32),%d4
Heap_Block *const last_block = heap->last_block;
4866a: 2e2a 0024 movel %a2@(36),%d7
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
4866e: 4a2e 0013 tstb %fp@(19)
48672: 6704 beqs 48678 <_Heap_Walk+0x2e>
48674: 4bfa ff7e lea %pc@(485f4 <_Heap_Walk_print>),%a5
if ( !_System_state_Is_up( _System_state_Get() ) ) {
48678: 7003 moveq #3,%d0 4867a: b0b9 0006 3364 cmpl 63364 <_System_state_Current>,%d0
48680: 670c beqs 4868e <_Heap_Walk+0x44>
block = next_block;
} while ( block != first_block );
return true;
}
48682: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5
}
block = next_block;
} while ( block != first_block );
return true;
48688: 7001 moveq #1,%d0
}
4868a: 4e5e unlk %fp 4868c: 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)(
4868e: 2f2a 000c movel %a2@(12),%sp@- 48692: 2f2a 0008 movel %a2@(8),%sp@- 48696: 2f07 movel %d7,%sp@- 48698: 2f04 movel %d4,%sp@- 4869a: 2f2a 001c movel %a2@(28),%sp@- 4869e: 2f2a 0018 movel %a2@(24),%sp@- 486a2: 2f06 movel %d6,%sp@- 486a4: 2f03 movel %d3,%sp@- 486a6: 4879 0005 f5eb pea 5f5eb <_Status_Object_name_errors_to_status+0x5d> 486ac: 42a7 clrl %sp@- 486ae: 2f05 movel %d5,%sp@- 486b0: 4e95 jsr %a5@
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
486b2: 4fef 002c lea %sp@(44),%sp 486b6: 4a83 tstl %d3 486b8: 6700 0082 beqw 4873c <_Heap_Walk+0xf2>
)
{
#if (CPU_ALIGNMENT == 0)
return true;
#else
return (((uintptr_t)address % CPU_ALIGNMENT) == 0);
486bc: 7003 moveq #3,%d0 486be: c083 andl %d3,%d0
(*printer)( source, true, "page size is zero\n" );
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
486c0: 6600 0090 bnew 48752 <_Heap_Walk+0x108>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
486c4: 2206 movel %d6,%d1 486c6: 4c43 1000 remul %d3,%d0,%d1
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
486ca: 4a80 tstl %d0 486cc: 6600 00a4 bnew 48772 <_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;
486d0: 2004 movel %d4,%d0 486d2: 5080 addql #8,%d0
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
486d4: 4c43 0001 remul %d3,%d1,%d0
);
return false;
}
if (
486d8: 4a81 tstl %d1 486da: 6600 00ae bnew 4878a <_Heap_Walk+0x140>
block = next_block;
} while ( block != first_block );
return true;
}
486de: 2044 moveal %d4,%a0 486e0: 2228 0004 movel %a0@(4),%d1 486e4: 2d41 fff0 movel %d1,%fp@(-16)
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
486e8: 0801 0000 btst #0,%d1 486ec: 6700 00b4 beqw 487a2 <_Heap_Walk+0x158>
- 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;
486f0: 2047 moveal %d7,%a0 486f2: 72fe moveq #-2,%d1 486f4: 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);
486f8: 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;
486fa: 7201 moveq #1,%d1 486fc: c2a8 0004 andl %a0@(4),%d1
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
48700: 6724 beqs 48726 <_Heap_Walk+0xdc>
);
return false;
}
if (
48702: b1c4 cmpal %d4,%a0 48704: 6700 00b4 beqw 487ba <_Heap_Walk+0x170>
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
48708: 4879 0005 f745 pea 5f745 <_Status_Object_name_errors_to_status+0x1b7>
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
(*printer)(
4870e: 4878 0001 pea 1 <ADD> 48712: 2f05 movel %d5,%sp@- 48714: 4e95 jsr %a5@ 48716: 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;
4871a: 4200 clrb %d0
block = next_block;
} while ( block != first_block );
return true;
}
4871c: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 48722: 4e5e unlk %fp 48724: 4e75 rts
return false;
}
if ( _Heap_Is_free( last_block ) ) {
(*printer)(
48726: 4879 0005 f730 pea 5f730 <_Status_Object_name_errors_to_status+0x1a2>
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
(*printer)(
4872c: 4878 0001 pea 1 <ADD> 48730: 2f05 movel %d5,%sp@- 48732: 4e95 jsr %a5@ 48734: 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;
48738: 4200 clrb %d0 4873a: 60e0 bras 4871c <_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" );
4873c: 4879 0005 f67c pea 5f67c <_Status_Object_name_errors_to_status+0xee>
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
(*printer)(
48742: 4878 0001 pea 1 <ADD> 48746: 2f05 movel %d5,%sp@- 48748: 4e95 jsr %a5@ 4874a: 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;
4874e: 4200 clrb %d0 48750: 60ca bras 4871c <_Heap_Walk+0xd2>
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
(*printer)(
48752: 2f03 movel %d3,%sp@- 48754: 4879 0005 f68f pea 5f68f <_Status_Object_name_errors_to_status+0x101>
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)(
4875a: 4878 0001 pea 1 <ADD> 4875e: 2f05 movel %d5,%sp@- 48760: 4e95 jsr %a5@ 48762: 4fef 0010 lea %sp@(16),%sp
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
48766: 4200 clrb %d0
block = next_block;
} while ( block != first_block );
return true;
}
48768: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 4876e: 4e5e unlk %fp 48770: 4e75 rts
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
(*printer)(
48772: 2f06 movel %d6,%sp@- 48774: 4879 0005 f6ad pea 5f6ad <_Status_Object_name_errors_to_status+0x11f>
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)(
4877a: 4878 0001 pea 1 <ADD> 4877e: 2f05 movel %d5,%sp@- 48780: 4e95 jsr %a5@ 48782: 4fef 0010 lea %sp@(16),%sp
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
48786: 4200 clrb %d0 48788: 60de bras 48768 <_Heap_Walk+0x11e>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
4878a: 2f04 movel %d4,%sp@- 4878c: 4879 0005 f6d1 pea 5f6d1 <_Status_Object_name_errors_to_status+0x143>
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)(
48792: 4878 0001 pea 1 <ADD> 48796: 2f05 movel %d5,%sp@- 48798: 4e95 jsr %a5@ 4879a: 4fef 0010 lea %sp@(16),%sp
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
4879e: 4200 clrb %d0 487a0: 60c6 bras 48768 <_Heap_Walk+0x11e>
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
(*printer)(
487a2: 4879 0005 f702 pea 5f702 <_Status_Object_name_errors_to_status+0x174> 487a8: 4878 0001 pea 1 <ADD> 487ac: 2f05 movel %d5,%sp@- 487ae: 4e95 jsr %a5@ 487b0: 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;
487b4: 4200 clrb %d0 487b6: 6000 ff64 braw 4871c <_Heap_Walk+0xd2>
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
487ba: 202a 0010 movel %a2@(16),%d0
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
487be: 206a 0008 moveal %a2@(8),%a0 487c2: 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 ) {
487c6: b1ca cmpal %a2,%a0 487c8: 6700 0316 beqw 48ae0 <_Heap_Walk+0x496>
block = next_block;
} while ( block != first_block );
return true;
}
487cc: 242a 0020 movel %a2@(32),%d2 487d0: 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;
487d4: b1c2 cmpal %d2,%a0 487d6: 6500 0090 bcsw 48868 <_Heap_Walk+0x21e> 487da: 266a 0024 moveal %a2@(36),%a3 487de: b7c8 cmpal %a0,%a3 487e0: 6500 0086 bcsw 48868 <_Heap_Walk+0x21e>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
487e4: 49e8 0008 lea %a0@(8),%a4
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
487e8: 200c movel %a4,%d0 487ea: 222e fffc movel %fp@(-4),%d1 487ee: 4c41 0002 remul %d1,%d2,%d0
);
return false;
}
if (
487f2: 4a82 tstl %d2 487f4: 6600 00ae bnew 488a4 <_Heap_Walk+0x25a>
- 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;
487f8: 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;
487fa: 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;
487fc: 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;
48800: c0b0 2804 andl %a0@(00000004,%d2:l),%d0
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
48804: 6648 bnes 4884e <_Heap_Walk+0x204> <== NEVER TAKEN
48806: 222e fff4 movel %fp@(-12),%d1 4880a: 224a moveal %a2,%a1 4880c: 2848 moveal %a0,%a4 4880e: 2d43 fff8 movel %d3,%fp@(-8)
);
return false;
}
if ( free_block->prev != prev_block ) {
48812: 2428 000c movel %a0@(12),%d2 48816: b3c2 cmpal %d2,%a1
48818: 6668 bnes 48882 <_Heap_Walk+0x238>
return false;
}
prev_block = free_block;
free_block = free_block->next;
4881a: 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 ) {
4881e: b1ca cmpal %a2,%a0 48820: 6700 009c beqw 488be <_Heap_Walk+0x274>
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;
48824: b288 cmpl %a0,%d1
48826: 6240 bhis 48868 <_Heap_Walk+0x21e>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
48828: 2408 movel %a0,%d2 4882a: 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;
4882c: b7c8 cmpal %a0,%a3
4882e: 6538 bcss 48868 <_Heap_Walk+0x21e> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
48830: 202e fffc movel %fp@(-4),%d0
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
48834: 224c moveal %a4,%a1 48836: 2848 moveal %a0,%a4 48838: 4c40 2003 remul %d0,%d3,%d2
);
return false;
}
if (
4883c: 4a83 tstl %d3
4883e: 6664 bnes 488a4 <_Heap_Walk+0x25a>
- 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;
48840: 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;
48842: 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;
48844: 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;
48848: c0b0 2804 andl %a0@(00000004,%d2:l),%d0
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
4884c: 67c4 beqs 48812 <_Heap_Walk+0x1c8>
(*printer)(
4884e: 2f08 movel %a0,%sp@- 48850: 4879 0005 f7c4 pea 5f7c4 <_Status_Object_name_errors_to_status+0x236>
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)(
48856: 4878 0001 pea 1 <ADD> 4885a: 2f05 movel %d5,%sp@- 4885c: 4e95 jsr %a5@ 4885e: 4fef 0010 lea %sp@(16),%sp
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
48862: 4200 clrb %d0 48864: 6000 ff02 braw 48768 <_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)(
48868: 2f08 movel %a0,%sp@- 4886a: 4879 0005 f774 pea 5f774 <_Status_Object_name_errors_to_status+0x1e6> 48870: 4878 0001 pea 1 <ADD> 48874: 2f05 movel %d5,%sp@- 48876: 4e95 jsr %a5@ 48878: 4fef 0010 lea %sp@(16),%sp
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
4887c: 4200 clrb %d0 4887e: 6000 fee8 braw 48768 <_Heap_Walk+0x11e>
return false;
}
if ( free_block->prev != prev_block ) {
(*printer)(
48882: 2f02 movel %d2,%sp@- 48884: 2f08 movel %a0,%sp@- 48886: 4879 0005 f7e0 pea 5f7e0 <_Status_Object_name_errors_to_status+0x252>
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
(*printer)(
4888c: 4878 0001 pea 1 <ADD> 48890: 2f05 movel %d5,%sp@- 48892: 4e95 jsr %a5@
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
48894: 4fef 0014 lea %sp@(20),%sp 48898: 4200 clrb %d0
block = next_block;
} while ( block != first_block );
return true;
}
4889a: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 488a0: 4e5e unlk %fp 488a2: 4e75 rts
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
488a4: 2f08 movel %a0,%sp@- 488a6: 4879 0005 f794 pea 5f794 <_Status_Object_name_errors_to_status+0x206>
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)(
488ac: 4878 0001 pea 1 <ADD> 488b0: 2f05 movel %d5,%sp@- 488b2: 4e95 jsr %a5@ 488b4: 4fef 0010 lea %sp@(16),%sp
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
488b8: 4200 clrb %d0 488ba: 6000 feac braw 48768 <_Heap_Walk+0x11e> 488be: 262e fff8 movel %fp@(-8),%d3
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
488c2: 2844 moveal %d4,%a4 488c4: 2d41 fff4 movel %d1,%fp@(-12) 488c8: 222e fff4 movel %fp@(-12),%d1 488cc: 2d43 fffc movel %d3,%fp@(-4) 488d0: 262e fff0 movel %fp@(-16),%d3 488d4: 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;
488d8: 74fe moveq #-2,%d2 488da: 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);
488dc: 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;
488e0: b7c1 cmpal %d1,%a3
488e2: 657e bcss 48962 <_Heap_Walk+0x318> <== NEVER TAKEN
488e4: b7ea 0024 cmpal %a2@(36),%a3
488e8: 6278 bhis 48962 <_Heap_Walk+0x318>
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;
488ea: b9ee ffec cmpal %fp@(-20),%a4 488ee: 56c1 sne %d1
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
488f0: 202e fffc movel %fp@(-4),%d0 488f4: 2e02 movel %d2,%d7 488f6: 3241 moveaw %d1,%a1 488f8: 4c40 7001 remul %d0,%d1,%d7 488fc: 2009 movel %a1,%d0 488fe: 4480 negl %d0
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
48900: 4a81 tstl %d1
48902: 6704 beqs 48908 <_Heap_Walk+0x2be>
48904: 4a00 tstb %d0
48906: 6676 bnes 4897e <_Heap_Walk+0x334>
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
48908: b486 cmpl %d6,%d2
4890a: 6406 bccs 48912 <_Heap_Walk+0x2c8>
4890c: 4a00 tstb %d0 4890e: 6600 008a bnew 4899a <_Heap_Walk+0x350>
);
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
48912: b7cc cmpal %a4,%a3
48914: 6206 bhis 4891c <_Heap_Walk+0x2d2>
48916: 4a00 tstb %d0 48918: 6600 00a4 bnew 489be <_Heap_Walk+0x374>
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;
4891c: 7001 moveq #1,%d0 4891e: 7e01 moveq #1,%d7 48920: c0ab 0004 andl %a3@(4),%d0 48924: c687 andl %d7,%d3
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
48926: 4a80 tstl %d0 48928: 6700 00ca beqw 489f4 <_Heap_Walk+0x3aa>
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
4892c: 4a83 tstl %d3 4892e: 6700 00aa beqw 489da <_Heap_Walk+0x390>
(*printer)(
48932: 2f02 movel %d2,%sp@- 48934: 2f0c movel %a4,%sp@- 48936: 4879 0005 f969 pea 5f969 <_Status_Object_name_errors_to_status+0x3db> 4893c: 42a7 clrl %sp@- 4893e: 2f05 movel %d5,%sp@- 48940: 4e95 jsr %a5@ 48942: 4fef 0014 lea %sp@(20),%sp
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
48946: b7c4 cmpal %d4,%a3 48948: 6700 fd38 beqw 48682 <_Heap_Walk+0x38> 4894c: 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;
48950: 74fe moveq #-2,%d2 48952: 284b moveal %a3,%a4 48954: c483 andl %d3,%d2 48956: 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);
4895a: 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;
4895e: b7c1 cmpal %d1,%a3
48960: 6482 bccs 488e4 <_Heap_Walk+0x29a> <== 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)(
48962: 2f0b movel %a3,%sp@- 48964: 2f0c movel %a4,%sp@- 48966: 4879 0005 f812 pea 5f812 <_Status_Object_name_errors_to_status+0x284>
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
(*printer)(
4896c: 4878 0001 pea 1 <ADD> 48970: 2f05 movel %d5,%sp@- 48972: 4e95 jsr %a5@
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
48974: 4fef 0014 lea %sp@(20),%sp 48978: 4200 clrb %d0 4897a: 6000 ff1e braw 4889a <_Heap_Walk+0x250>
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
(*printer)(
4897e: 2f02 movel %d2,%sp@- 48980: 2f0c movel %a4,%sp@- 48982: 4879 0005 f83f pea 5f83f <_Status_Object_name_errors_to_status+0x2b1>
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
(*printer)(
48988: 4878 0001 pea 1 <ADD> 4898c: 2f05 movel %d5,%sp@- 4898e: 4e95 jsr %a5@
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
48990: 4fef 0014 lea %sp@(20),%sp 48994: 4200 clrb %d0 48996: 6000 ff02 braw 4889a <_Heap_Walk+0x250>
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
(*printer)(
4899a: 2f06 movel %d6,%sp@- 4899c: 2f02 movel %d2,%sp@- 4899e: 2f0c movel %a4,%sp@- 489a0: 4879 0005 f86d pea 5f86d <_Status_Object_name_errors_to_status+0x2df> 489a6: 4878 0001 pea 1 <ADD> 489aa: 2f05 movel %d5,%sp@- 489ac: 4e95 jsr %a5@
block,
block_size,
min_block_size
);
return false;
489ae: 4fef 0018 lea %sp@(24),%sp
block = next_block;
} while ( block != first_block );
return true;
}
489b2: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5
block,
block_size,
min_block_size
);
return false;
489b8: 4200 clrb %d0
block = next_block;
} while ( block != first_block );
return true;
}
489ba: 4e5e unlk %fp 489bc: 4e75 rts
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
(*printer)(
489be: 2f0b movel %a3,%sp@- 489c0: 2f0c movel %a4,%sp@- 489c2: 4879 0005 f898 pea 5f898 <_Status_Object_name_errors_to_status+0x30a> 489c8: 4878 0001 pea 1 <ADD> 489cc: 2f05 movel %d5,%sp@- 489ce: 4e95 jsr %a5@
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
489d0: 4fef 0014 lea %sp@(20),%sp 489d4: 4200 clrb %d0 489d6: 6000 fec2 braw 4889a <_Heap_Walk+0x250>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
489da: 2f14 movel %a4@,%sp@- 489dc: 2f02 movel %d2,%sp@- 489de: 2f0c movel %a4,%sp@- 489e0: 4879 0005 f980 pea 5f980 <_Status_Object_name_errors_to_status+0x3f2> 489e6: 42a7 clrl %sp@- 489e8: 2f05 movel %d5,%sp@- 489ea: 4e95 jsr %a5@ 489ec: 4fef 0018 lea %sp@(24),%sp 489f0: 6000 ff54 braw 48946 <_Heap_Walk+0x2fc>
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
489f4: 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)(
489f8: 43f9 0005 f5b8 lea 5f5b8 <_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 ?
489fe: 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)(
48a02: b2aa 000c cmpl %a2@(12),%d1
48a06: 670a beqs 48a12 <_Heap_Walk+0x3c8>
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
48a08: 43f9 0005 f500 lea 5f500 <rtems_filesystem_default_pathconf+0xb4>,%a1 48a0e: b28a cmpl %a2,%d1
48a10: 676c beqs 48a7e <_Heap_Walk+0x434>
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 ?
48a12: 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)(
48a16: 41f9 0005 f5d1 lea 5f5d1 <_Status_Object_name_errors_to_status+0x43>,%a0 48a1c: b087 cmpl %d7,%d0
48a1e: 670a beqs 48a2a <_Heap_Walk+0x3e0>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
48a20: 41f9 0005 f500 lea 5f500 <rtems_filesystem_default_pathconf+0xb4>,%a0 48a26: b08a cmpl %a2,%d0
48a28: 674c beqs 48a76 <_Heap_Walk+0x42c>
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)(
48a2a: 2f09 movel %a1,%sp@- 48a2c: 2f01 movel %d1,%sp@- 48a2e: 2f08 movel %a0,%sp@- 48a30: 2f00 movel %d0,%sp@- 48a32: 2f02 movel %d2,%sp@- 48a34: 2f0c movel %a4,%sp@- 48a36: 4879 0005 f8cc pea 5f8cc <_Status_Object_name_errors_to_status+0x33e> 48a3c: 42a7 clrl %sp@- 48a3e: 2f05 movel %d5,%sp@- 48a40: 4e95 jsr %a5@
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
48a42: 2213 movel %a3@,%d1 48a44: 4fef 0024 lea %sp@(36),%sp 48a48: b282 cmpl %d2,%d1
48a4a: 663a bnes 48a86 <_Heap_Walk+0x43c>
);
return false;
}
if ( !prev_used ) {
48a4c: 4a83 tstl %d3
48a4e: 6776 beqs 48ac6 <_Heap_Walk+0x47c>
48a50: 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 ) {
48a54: b1ca cmpal %a2,%a0
48a56: 6754 beqs 48aac <_Heap_Walk+0x462> <== NEVER TAKEN
if ( free_block == block ) {
48a58: b1cc cmpal %a4,%a0 48a5a: 6700 feea beqw 48946 <_Heap_Walk+0x2fc> 48a5e: 2e2e ffec movel %fp@(-20),%d7
return true;
}
free_block = free_block->next;
48a62: 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 ) {
48a66: b1ca cmpal %a2,%a0
48a68: 6742 beqs 48aac <_Heap_Walk+0x462>
if ( free_block == block ) {
48a6a: b1cc cmpal %a4,%a0
48a6c: 66f4 bnes 48a62 <_Heap_Walk+0x418>
48a6e: 2d47 ffec movel %d7,%fp@(-20) 48a72: 6000 fed2 braw 48946 <_Heap_Walk+0x2fc>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
48a76: 41f9 0005 f5e1 lea 5f5e1 <_Status_Object_name_errors_to_status+0x53>,%a0 48a7c: 60ac bras 48a2a <_Heap_Walk+0x3e0>
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
48a7e: 43f9 0005 f5c7 lea 5f5c7 <_Status_Object_name_errors_to_status+0x39>,%a1 48a84: 608c bras 48a12 <_Heap_Walk+0x3c8>
);
if ( block_size != next_block->prev_size ) {
(*printer)(
48a86: 2f0b movel %a3,%sp@- 48a88: 2f01 movel %d1,%sp@- 48a8a: 2f02 movel %d2,%sp@- 48a8c: 2f0c movel %a4,%sp@- 48a8e: 4879 0005 f901 pea 5f901 <_Status_Object_name_errors_to_status+0x373> 48a94: 4878 0001 pea 1 <ADD> 48a98: 2f05 movel %d5,%sp@- 48a9a: 4e95 jsr %a5@ 48a9c: 4fef 001c lea %sp@(28),%sp
block = next_block;
} while ( block != first_block );
return true;
}
48aa0: 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;
48aa6: 4200 clrb %d0
block = next_block;
} while ( block != first_block );
return true;
}
48aa8: 4e5e unlk %fp 48aaa: 4e75 rts
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
48aac: 2f0c movel %a4,%sp@- 48aae: 4879 0005 f9a5 pea 5f9a5 <_Status_Object_name_errors_to_status+0x417>
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)(
48ab4: 4878 0001 pea 1 <ADD> 48ab8: 2f05 movel %d5,%sp@- 48aba: 4e95 jsr %a5@ 48abc: 4fef 0010 lea %sp@(16),%sp
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
48ac0: 4200 clrb %d0 48ac2: 6000 fca4 braw 48768 <_Heap_Walk+0x11e>
return false;
}
if ( !prev_used ) {
(*printer)(
48ac6: 2f0c movel %a4,%sp@- 48ac8: 4879 0005 f93a pea 5f93a <_Status_Object_name_errors_to_status+0x3ac>
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)(
48ace: 4878 0001 pea 1 <ADD> 48ad2: 2f05 movel %d5,%sp@- 48ad4: 4e95 jsr %a5@ 48ad6: 4fef 0010 lea %sp@(16),%sp
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
48ada: 4200 clrb %d0 48adc: 6000 fc8a braw 48768 <_Heap_Walk+0x11e>
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 ) {
48ae0: 222a 0020 movel %a2@(32),%d1
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
48ae4: 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 ) {
48ae6: 2d41 fff4 movel %d1,%fp@(-12) 48aea: 222e fff4 movel %fp@(-12),%d1 48aee: 2d43 fffc movel %d3,%fp@(-4) 48af2: 262e fff0 movel %fp@(-16),%d3 48af6: 2d47 ffec movel %d7,%fp@(-20) 48afa: 6000 fddc braw 488d8 <_Heap_Walk+0x28e>
...
000472fa <_IO_Initialize_all_drivers>:
*
* Output Parameters: NONE
*/
void _IO_Initialize_all_drivers( void )
{
472fa: 4e56 0000 linkw %fp,#0 472fe: 2f0a movel %a2,%sp@- 47300: 2f02 movel %d2,%sp@-
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
47302: 4ab9 0006 18c2 tstl 618c2 <_IO_Number_of_drivers>
47308: 671e beqs 47328 <_IO_Initialize_all_drivers+0x2e><== NEVER TAKEN
4730a: 4282 clrl %d2 4730c: 45f9 0004 cbb4 lea 4cbb4 <rtems_io_initialize>,%a2
(void) rtems_io_initialize( major, 0, NULL );
47312: 42a7 clrl %sp@- 47314: 42a7 clrl %sp@- 47316: 2f02 movel %d2,%sp@-
void _IO_Initialize_all_drivers( void )
{
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
47318: 5282 addql #1,%d2
(void) rtems_io_initialize( major, 0, NULL );
4731a: 4e92 jsr %a2@
void _IO_Initialize_all_drivers( void )
{
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
4731c: 4fef 000c lea %sp@(12),%sp 47320: b4b9 0006 18c2 cmpl 618c2 <_IO_Number_of_drivers>,%d2
47326: 65ea bcss 47312 <_IO_Initialize_all_drivers+0x18>
(void) rtems_io_initialize( major, 0, NULL );
}
47328: 242e fff8 movel %fp@(-8),%d2 4732c: 246e fffc moveal %fp@(-4),%a2
47330: 4e5e unlk %fp <== NOT EXECUTED
00047260 <_IO_Manager_initialization>:
* workspace.
*
*/
void _IO_Manager_initialization(void)
{
47260: 4e56 fff0 linkw %fp,#-16 47264: 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;
47268: 2639 0005 f69e movel 5f69e <Configuration+0x32>,%d3
drivers_in_table = Configuration.number_of_device_drivers;
4726e: 2439 0005 f69a movel 5f69a <Configuration+0x2e>,%d2
number_of_drivers = Configuration.maximum_drivers;
47274: 2839 0005 f696 movel 5f696 <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 )
4727a: b882 cmpl %d2,%d4
4727c: 6366 blss 472e4 <_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(
4727e: 2004 movel %d4,%d0 47280: 2a04 movel %d4,%d5 47282: e788 lsll #3,%d0 47284: eb8d lsll #5,%d5 47286: 9a80 subl %d0,%d5 47288: 2f05 movel %d5,%sp@- 4728a: 4eb9 0004 a318 jsr 4a318 <_Workspace_Allocate_or_fatal_error>
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
memset(
47290: 2f05 movel %d5,%sp@- 47292: 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 *)
47294: 23c0 0006 18c6 movel %d0,618c6 <_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(
4729a: 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;
4729c: 23c4 0006 18c2 movel %d4,618c2 <_IO_Number_of_drivers>
memset(
472a2: 4eb9 0004 f928 jsr 4f928 <memset>
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
472a8: 4fef 0010 lea %sp@(16),%sp 472ac: 4a82 tstl %d2
472ae: 672a beqs 472da <_IO_Manager_initialization+0x7a><== NEVER TAKEN
472b0: 2839 0006 18c6 movel 618c6 <_IO_Driver_address_table>,%d4 472b6: 4280 clrl %d0 472b8: 4281 clrl %d1
_IO_Driver_address_table[index] = driver_table[index];
472ba: 2243 moveal %d3,%a1 472bc: 2044 moveal %d4,%a0 472be: d3c0 addal %d0,%a1 472c0: 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++ )
472c2: 5281 addql #1,%d1 472c4: 0680 0000 0018 addil #24,%d0
_IO_Driver_address_table[index] = driver_table[index];
472ca: 20d9 movel %a1@+,%a0@+ 472cc: 20d9 movel %a1@+,%a0@+ 472ce: 20d9 movel %a1@+,%a0@+ 472d0: 20d9 movel %a1@+,%a0@+ 472d2: 20d9 movel %a1@+,%a0@+ 472d4: 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++ )
472d6: b481 cmpl %d1,%d2
472d8: 66e0 bnes 472ba <_IO_Manager_initialization+0x5a>
_IO_Driver_address_table[index] = driver_table[index];
}
472da: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 472e0: 4e5e unlk %fp 472e2: 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;
472e4: 23c3 0006 18c6 movel %d3,618c6 <_IO_Driver_address_table>
_IO_Number_of_drivers = number_of_drivers;
472ea: 23c2 0006 18c2 movel %d2,618c2 <_IO_Number_of_drivers>
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
_IO_Driver_address_table[index] = driver_table[index];
}
472f0: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5
472f6: 4e5e unlk %fp <== NOT EXECUTED
00047ec8 <_Internal_error_Occurred>:
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
47ec8: 4e56 fffc linkw %fp,#-4 47ecc: 206e 0010 moveal %fp@(16),%a0 47ed0: 2f02 movel %d2,%sp@- 47ed2: 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 );
47ed6: 4282 clrl %d2 47ed8: 1401 moveb %d1,%d2 47eda: 2242 moveal %d2,%a1 47edc: 2f08 movel %a0,%sp@-
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
47ede: 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 );
47ee2: 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;
47ee4: 13c1 0006 10e2 moveb %d1,610e2 <_Internal_errors_What_happened+0x4>
_Internal_errors_What_happened.the_error = the_error;
_User_extensions_Fatal( the_source, is_internal, the_error );
47eea: 2d48 fffc movel %a0,%fp@(-4)
bool is_internal,
Internal_errors_t the_error
)
{
_Internal_errors_What_happened.the_source = the_source;
47eee: 23c0 0006 10de movel %d0,610de <_Internal_errors_What_happened>
_Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error;
47ef4: 23c8 0006 10e4 movel %a0,610e4 <_Internal_errors_What_happened+0x6>
_User_extensions_Fatal( the_source, is_internal, the_error );
47efa: 2f00 movel %d0,%sp@- 47efc: 4eb9 0004 9ea2 jsr 49ea2 <_User_extensions_Fatal>
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
47f02: 206e fffc moveal %fp@(-4),%a0 47f06: 327c 0700 moveaw #1792,%a1 47f0a: 2409 movel %a1,%d2 47f0c: 40c0 movew %sr,%d0 47f0e: 8082 orl %d2,%d0 47f10: 46c0 movew %d0,%sr
47f12: 2008 movel %a0,%d0 <== NOT EXECUTED 47f14: 223c dead beef movel #-559038737,%d1 <== NOT EXECUTED 47f1a: 4ac8 halt <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
47f1c: 7005 moveq #5,%d0 47f1e: 4fef 000c lea %sp@(12),%sp 47f22: 23c0 0006 118c movel %d0,6118c <_System_state_Current> 47f28: 60fe bras 47f28 <_Internal_error_Occurred+0x60>
...
00047f8c <_Objects_Allocate>:
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
47f8c: 4e56 fff0 linkw %fp,#-16 47f90: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 47f94: 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 )
47f98: 4aaa 0014 tstl %a2@(20)
47f9c: 6756 beqs 47ff4 <_Objects_Allocate+0x68> <== NEVER TAKEN
/*
* OK. The manager should be initialized and configured to have objects.
* With any luck, it is safe to attempt to allocate an object.
*/
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
47f9e: 240a movel %a2,%d2 47fa0: 0682 0000 001c addil #28,%d2 47fa6: 47f9 0004 75d4 lea 475d4 <_Chain_Get>,%a3 47fac: 2f02 movel %d2,%sp@- 47fae: 4e93 jsr %a3@
if ( information->auto_extend ) {
47fb0: 588f addql #4,%sp 47fb2: 4a2a 0010 tstb %a2@(16)
47fb6: 6732 beqs 47fea <_Objects_Allocate+0x5e>
/*
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
47fb8: 4a80 tstl %d0
47fba: 6744 beqs 48000 <_Objects_Allocate+0x74>
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
47fbc: 2040 moveal %d0,%a0 47fbe: 4281 clrl %d1 47fc0: 4283 clrl %d3
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
47fc2: 4282 clrl %d2
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
47fc4: 3228 000a movew %a0@(10),%d1 47fc8: 362a 0008 movew %a2@(8),%d3
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
47fcc: 342a 0012 movew %a2@(18),%d2
information->inactive_per_block[ block ]--;
47fd0: 206a 002a moveal %a2@(42),%a0
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
47fd4: 9283 subl %d3,%d1
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
47fd6: 4c42 1001 remul %d2,%d1,%d1
information->inactive_per_block[ block ]--;
information->inactive--;
47fda: 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 ]--;
47fde: e589 lsll #2,%d1
information->inactive--;
47fe0: 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 ]--;
47fe2: d1c1 addal %d1,%a0 47fe4: 5390 subql #1,%a0@
information->inactive--;
47fe6: 3549 0028 movew %a1,%a2@(40)
);
}
#endif
return the_object;
}
47fea: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 47ff0: 4e5e unlk %fp 47ff2: 4e75 rts
* still attempts to create the object, the information block
* should be all zeroed out because it is in the BSS. So let's
* check that code for this manager is even present.
*/
if ( information->size == 0 )
return NULL;
47ff4: 4280 clrl %d0 <== NOT EXECUTED
);
}
#endif
return the_object;
}
47ff6: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED 47ffc: 4e5e unlk %fp <== NOT EXECUTED 47ffe: 4e75 rts <== NOT EXECUTED
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
_Objects_Extend_information( information );
48000: 2f0a movel %a2,%sp@- 48002: 4eb9 0004 8044 jsr 48044 <_Objects_Extend_information>
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
48008: 2f02 movel %d2,%sp@- 4800a: 4e93 jsr %a3@
}
if ( the_object ) {
4800c: 508f addql #8,%sp 4800e: 4a80 tstl %d0
48010: 66aa bnes 47fbc <_Objects_Allocate+0x30>
);
}
#endif
return the_object;
}
48012: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3
48018: 4e5e unlk %fp <== NOT EXECUTED
0004801c <_Objects_Close>:
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
4801c: 4280 clrl %d0
void _Objects_Close(
Objects_Information *information,
Objects_Control *the_object
)
{
4801e: 4e56 0000 linkw %fp,#0 48022: 206e 0008 moveal %fp@(8),%a0 48026: 226e 000c moveal %fp@(12),%a1 4802a: 2f0a movel %a2,%sp@- 4802c: 2468 0018 moveal %a0@(24),%a2 48030: 3029 000a movew %a1@(10),%d0 48034: 42b2 0c00 clrl %a2@(00000000,%d0:l:4)
_Objects_Invalidate_Id( information, the_object );
_Objects_Namespace_remove( information, the_object );
}
48038: 245f moveal %sp@+,%a2 4803a: 4e5e unlk %fp
Objects_Control *the_object
)
{
_Objects_Invalidate_Id( information, the_object );
_Objects_Namespace_remove( information, the_object );
4803c: 4ef9 0004 85d8 jmp 485d8 <_Objects_Namespace_remove>
...
00048044 <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
48044: 4e56 ffcc linkw %fp,#-52 48048: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4804c: 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 );
48050: 4285 clrl %d5
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
48052: 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 );
48056: 3a2a 0008 movew %a2@(8),%d5
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
4805a: 4a88 tstl %a0 4805c: 6700 0232 beqw 48290 <_Objects_Extend_information+0x24c>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
48060: 322a 000e movew %a2@(14),%d1 48064: 302a 0012 movew %a2@(18),%d0 48068: 3801 movew %d1,%d4 4806a: 0284 0000 ffff andil #65535,%d4 48070: 88c0 divuw %d0,%d4 48072: 0284 0000 ffff andil #65535,%d4
for ( ; block < block_count; block++ ) {
48078: 6700 022c beqw 482a6 <_Objects_Extend_information+0x262>
if ( information->object_blocks[ block ] == NULL ) {
4807c: 4a90 tstl %a0@ 4807e: 6700 0236 beqw 482b6 <_Objects_Extend_information+0x272>
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
48082: 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 );
48084: 2605 movel %d5,%d3
index_base = minimum_index; block = 0;
48086: 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 ) {
48088: 0280 0000 ffff andil #65535,%d0
do_extend = false;
break;
} else
index_base += information->allocation_size;
4808e: 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++ ) {
48090: 5282 addql #1,%d2 48092: b484 cmpl %d4,%d2 48094: 6400 01a6 bccw 4823c <_Objects_Extend_information+0x1f8>
if ( information->object_blocks[ block ] == NULL ) {
48098: 4a98 tstl %a0@+
4809a: 66f2 bnes 4808e <_Objects_Extend_information+0x4a>
do_extend = false;
4809c: 4207 clrb %d7
} else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
4809e: 0281 0000 ffff andil #65535,%d1 480a4: 2641 moveal %d1,%a3 480a6: 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 ) {
480a8: b7fc 0000 ffff cmpal #65535,%a3 480ae: 6200 0182 bhiw 48232 <_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;
480b2: 41ea 0014 lea %a2@(20),%a0 480b6: 4c10 0800 mulsl %a0@,%d0
if ( information->auto_extend ) {
480ba: 4a2a 0010 tstb %a2@(16) 480be: 6700 0182 beqw 48242 <_Objects_Extend_information+0x1fe>
new_object_block = _Workspace_Allocate( block_size );
480c2: 2f00 movel %d0,%sp@- 480c4: 4eb9 0004 a2e2 jsr 4a2e2 <_Workspace_Allocate>
if ( !new_object_block )
480ca: 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 );
480cc: 2c00 movel %d0,%d6
if ( !new_object_block )
480ce: 6700 0162 beqw 48232 <_Objects_Extend_information+0x1ee>
}
/*
* Do we need to grow the tables?
*/
if ( do_extend ) {
480d2: 4a07 tstb %d7 480d4: 6700 00be beqw 48194 <_Objects_Extend_information+0x150>
*/
/*
* Up the block count and maximum
*/
block_count++;
480d8: 2a44 moveal %d4,%a5 480da: 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 *));
480dc: 200b movel %a3,%d0
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
480de: 41f5 da00 lea %a5@(00000000,%a5:l:2),%a0
((maximum + minimum_index) * sizeof(Objects_Control *));
480e2: d088 addl %a0,%d0
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
480e4: d085 addl %d5,%d0
block_count++;
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
480e6: 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 );
480e8: 2f00 movel %d0,%sp@- 480ea: 4eb9 0004 a2e2 jsr 4a2e2 <_Workspace_Allocate>
if ( !object_blocks ) {
480f0: 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 );
480f2: 2840 moveal %d0,%a4
if ( !object_blocks ) {
480f4: 4a80 tstl %d0 480f6: 6700 01ce beqw 482c6 <_Objects_Extend_information+0x282>
}
/*
* Break the block into the various sections.
*/
inactive_per_block = (uint32_t *) _Addresses_Add_offset(
480fa: 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 ) {
480fc: 4280 clrl %d0
}
/*
* Break the block into the various sections.
*/
inactive_per_block = (uint32_t *) _Addresses_Add_offset(
480fe: 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 ) {
48100: 302a 000e movew %a2@(14),%d0 48104: 4bf4 7800 lea %a4@(00000000,%d7:l),%a5 48108: de8d addl %a5,%d7 4810a: b085 cmpl %d5,%d0 4810c: 6200 0144 bhiw 48252 <_Objects_Extend_information+0x20e>
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
48110: 4a85 tstl %d5
48112: 670c beqs 48120 <_Objects_Extend_information+0xdc><== NEVER TAKEN
48114: 2047 moveal %d7,%a0 48116: 4280 clrl %d0
local_table[ index ] = NULL;
48118: 4298 clrl %a0@+
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
4811a: 5280 addql #1,%d0 4811c: b085 cmpl %d5,%d0
4811e: 65f8 bcss 48118 <_Objects_Extend_information+0xd4><== NEVER TAKEN
48120: 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 );
48122: 4281 clrl %d1
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
48124: 42b4 4800 clrl %a4@(00000000,%d4:l)
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
48128: 322a 0012 movew %a2@(18),%d1
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
4812c: 42b5 4800 clrl %a5@(00000000,%d4:l)
for ( index=index_base ;
index < ( information->allocation_size + index_base );
48130: 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 ;
48132: b283 cmpl %d3,%d1
48134: 6310 blss 48146 <_Objects_Extend_information+0x102><== NEVER TAKEN
48136: 2247 moveal %d7,%a1
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
48138: 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 ;
4813a: 41f1 3c00 lea %a1@(00000000,%d3:l:4),%a0
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
4813e: 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++ ) {
48140: 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 ;
48142: b081 cmpl %d1,%d0
48144: 65f8 bcss 4813e <_Objects_Extend_information+0xfa>
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
}
_ISR_Disable( level );
48146: 203c 0000 0700 movel #1792,%d0 4814c: 40c4 movew %sr,%d4 4814e: 8084 orl %d4,%d0 48150: 46c0 movew %d0,%sr
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
48152: 2012 movel %a2@,%d0 48154: 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(
48156: 4281 clrl %d1 48158: eba8 lsll %d5,%d0 4815a: 322a 0004 movew %a2@(4),%d1
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
4815e: 1a3c 001b moveb #27,%d5
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
48162: 08c0 0010 bset #16,%d0
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
48166: eba9 lsll %d5,%d1 48168: 4285 clrl %d5 4816a: 8081 orl %d1,%d0 4816c: 3a0b movew %a3,%d5
local_table[ index ] = NULL;
}
_ISR_Disable( level );
old_tables = information->object_blocks;
4816e: 206a 002e moveal %a2@(46),%a0
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
48172: 8085 orl %d5,%d0
information->object_blocks = object_blocks;
48174: 254c 002e movel %a4,%a2@(46)
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
48178: 354b 000e movew %a3,%a2@(14)
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
4817c: 254d 002a movel %a5,%a2@(42)
information->local_table = local_table;
48180: 2547 0018 movel %d7,%a2@(24) 48184: 2540 000a movel %d0,%a2@(10)
information->the_class,
_Objects_Local_node,
information->maximum
);
_ISR_Enable( level );
48188: 46c4 movew %d4,%sr
_Workspace_Free( old_tables );
4818a: 2f08 movel %a0,%sp@- 4818c: 4eb9 0004 a2fe jsr 4a2fe <_Workspace_Free> 48192: 588f addql #4,%sp
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
48194: 206a 002e moveal %a2@(46),%a0
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
48198: 4280 clrl %d0 4819a: 280e movel %fp,%d4 4819c: 0684 ffff fff4 addil #-12,%d4 481a2: 47f9 0004 75d4 lea 475d4 <_Chain_Get>,%a3
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
481a8: 2a0a movel %a2,%d5 481aa: 0685 0000 001c addil #28,%d5 481b0: 49f9 0004 7574 lea 47574 <_Chain_Append>,%a4
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
481b6: e58a lsll #2,%d2
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
481b8: 302a 0012 movew %a2@(18),%d0
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
481bc: 2186 2800 movel %d6,%a0@(00000000,%d2:l)
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
481c0: 2f2a 0014 movel %a2@(20),%sp@- 481c4: 206a 002e moveal %a2@(46),%a0 481c8: 2f00 movel %d0,%sp@- 481ca: 2f30 2800 movel %a0@(00000000,%d2:l),%sp@- 481ce: 2f04 movel %d4,%sp@- 481d0: 4eb9 0004 cbfc jsr 4cbfc <_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 ) {
481d6: 4fef 0010 lea %sp@(16),%sp 481da: 2f04 movel %d4,%sp@- 481dc: 4e93 jsr %a3@ 481de: 588f addql #4,%sp 481e0: 4a80 tstl %d0
481e2: 6734 beqs 48218 <_Objects_Extend_information+0x1d4><== NEVER TAKEN
481e4: 2212 movel %a2@,%d1 481e6: 7e18 moveq #24,%d7
the_object->id = _Objects_Build_id(
481e8: 4286 clrl %d6 481ea: 2040 moveal %d0,%a0 481ec: 3c2a 0004 movew %a2@(4),%d6 481f0: efa9 lsll %d7,%d1
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
481f2: 1e3c 001b moveb #27,%d7
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
481f6: 08c1 0010 bset #16,%d1
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
481fa: efae lsll %d7,%d6 481fc: 8286 orl %d6,%d1
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
481fe: 8283 orl %d3,%d1
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
48200: 5283 addql #1,%d3 48202: 2141 0008 movel %d1,%a0@(8)
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
48206: 2f00 movel %d0,%sp@- 48208: 2f05 movel %d5,%sp@- 4820a: 4e94 jsr %a4@
index++;
4820c: 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 ) {
4820e: 2f04 movel %d4,%sp@- 48210: 4e93 jsr %a3@ 48212: 588f addql #4,%sp 48214: 4a80 tstl %d0
48216: 66cc bnes 481e4 <_Objects_Extend_information+0x1a0>
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
48218: 4281 clrl %d1 4821a: 302a 0012 movew %a2@(18),%d0
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
4821e: 326a 0028 moveaw %a2@(40),%a1
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
48222: 206a 002a moveal %a2@(42),%a0 48226: 3200 movew %d0,%d1
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
48228: d089 addl %a1,%d0
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
4822a: 2181 2800 movel %d1,%a0@(00000000,%d2:l)
information->inactive =
4822e: 3540 0028 movew %d0,%a2@(40)
(Objects_Maximum)(information->inactive + information->allocation_size);
}
48232: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 48238: 4e5e unlk %fp 4823a: 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;
4823c: 7e01 moveq #1,%d7 4823e: 6000 fe5e braw 4809e <_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 );
48242: 2f00 movel %d0,%sp@- 48244: 4eb9 0004 a318 jsr 4a318 <_Workspace_Allocate_or_fatal_error> 4824a: 588f addql #4,%sp 4824c: 2c00 movel %d0,%d6 4824e: 6000 fe82 braw 480d2 <_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,
48252: e58c lsll #2,%d4 48254: 2f04 movel %d4,%sp@- 48256: 2f2a 002e movel %a2@(46),%sp@- 4825a: 2f0c movel %a4,%sp@- 4825c: 4eb9 0004 f8b8 jsr 4f8b8 <memcpy>
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
48262: 2f04 movel %d4,%sp@- 48264: 2f2a 002a movel %a2@(42),%sp@- 48268: 2f0d movel %a5,%sp@- 4826a: 4eb9 0004 f8b8 jsr 4f8b8 <memcpy>
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
information->local_table,
(information->maximum + minimum_index) * sizeof(Objects_Control *) );
48270: 4280 clrl %d0 48272: 302a 000e movew %a2@(14),%d0 48276: 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,
48278: e58d lsll #2,%d5 4827a: 2f05 movel %d5,%sp@- 4827c: 2f2a 0018 movel %a2@(24),%sp@- 48280: 2f07 movel %d7,%sp@- 48282: 4eb9 0004 f8b8 jsr 4f8b8 <memcpy> 48288: 4fef 0024 lea %sp@(36),%sp 4828c: 6000 fe94 braw 48122 <_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 )
48290: 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 );
48292: 2605 movel %d5,%d3
index_base = minimum_index; block = 0;
48294: 4282 clrl %d2
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
block_count = 0;
48296: 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 )
48298: 322a 000e movew %a2@(14),%d1 4829c: 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;
482a0: 7e01 moveq #1,%d7 482a2: 6000 fdfa braw 4809e <_Objects_Extend_information+0x5a>
minimum_index = _Objects_Get_index( information->minimum_id );
482a6: 2605 movel %d5,%d3 <== NOT EXECUTED
index_base = minimum_index; block = 0;
482a8: 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++ ) {
482aa: 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;
482b0: 7e01 moveq #1,%d7 <== NOT EXECUTED 482b2: 6000 fdea braw 4809e <_Objects_Extend_information+0x5a><== NOT EXECUTED
minimum_index = _Objects_Get_index( information->minimum_id );
482b6: 2605 movel %d5,%d3 <== NOT EXECUTED
index_base = minimum_index; block = 0;
482b8: 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 ) {
482ba: 0280 0000 ffff andil #65535,%d0 <== NOT EXECUTED
do_extend = false;
482c0: 4207 clrb %d7 <== NOT EXECUTED 482c2: 6000 fdda braw 4809e <_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 );
482c6: 2f06 movel %d6,%sp@- 482c8: 4eb9 0004 a2fe jsr 4a2fe <_Workspace_Free>
return;
482ce: 588f addql #4,%sp
}
information->inactive_per_block[ block ] = information->allocation_size;
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
}
482d0: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 482d6: 4e5e unlk %fp
...
0004838c <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint16_t the_class
)
{
4838c: 4e56 0000 linkw %fp,#0 48390: 2f03 movel %d3,%sp@- 48392: 262e 0008 movel %fp@(8),%d3 48396: 2f02 movel %d2,%sp@- 48398: 342e 000e movew %fp@(14),%d2
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
4839c: 6744 beqs 483e2 <_Objects_Get_information+0x56>
/*
* 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 );
4839e: 2f03 movel %d3,%sp@- 483a0: 4eb9 0004 d0fc jsr 4d0fc <_Objects_API_maximum_class>
if ( the_class_api_maximum == 0 )
483a6: 588f addql #4,%sp 483a8: 4a80 tstl %d0
483aa: 6736 beqs 483e2 <_Objects_Get_information+0x56>
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
483ac: 0282 0000 ffff andil #65535,%d2 483b2: b480 cmpl %d0,%d2
483b4: 622c bhis 483e2 <_Objects_Get_information+0x56>
return NULL;
if ( !_Objects_Information_table[ the_api ] )
483b6: 41f9 0006 1004 lea 61004 <_Objects_Information_table>,%a0 483bc: 2070 3c00 moveal %a0@(00000000,%d3:l:4),%a0 483c0: 4a88 tstl %a0
483c2: 671e beqs 483e2 <_Objects_Get_information+0x56> <== NEVER TAKEN
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
483c4: 2030 2c00 movel %a0@(00000000,%d2:l:4),%d0
if ( !info )
483c8: 670c beqs 483d6 <_Objects_Get_information+0x4a> <== 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;
483ca: 2040 moveal %d0,%a0 483cc: 4a68 000e tstw %a0@(14) 483d0: 56c1 sne %d1 483d2: 49c1 extbl %d1 483d4: c081 andl %d1,%d0
#endif
return info;
}
483d6: 242e fff8 movel %fp@(-8),%d2 483da: 262e fffc movel %fp@(-4),%d3 483de: 4e5e unlk %fp 483e0: 4e75 rts 483e2: 242e fff8 movel %fp@(-8),%d2
if ( the_class > (uint32_t) the_class_api_maximum )
return NULL;
if ( !_Objects_Information_table[ the_api ] )
return NULL;
483e6: 4280 clrl %d0
if ( info->maximum == 0 )
return NULL;
#endif
return info;
}
483e8: 262e fffc movel %fp@(-4),%d3
483ec: 4e5e unlk %fp <== NOT EXECUTED
000483a0 <_Objects_Get_next>:
Objects_Information *information,
Objects_Id id,
Objects_Locations *location_p,
Objects_Id *next_id_p
)
{
483a0: 4e56 ffec linkw %fp,#-20 483a4: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 483a8: 246e 0008 moveal %fp@(8),%a2 483ac: 242e 000c movel %fp@(12),%d2 483b0: 266e 0010 moveal %fp@(16),%a3 483b4: 2a6e 0014 moveal %fp@(20),%a5
Objects_Control *object;
Objects_Id next_id;
if ( !information )
483b8: 4a8a tstl %a2
483ba: 6756 beqs 48412 <_Objects_Get_next+0x72> <== NEVER TAKEN
return NULL;
if ( !location_p )
483bc: 4a8b tstl %a3
483be: 6752 beqs 48412 <_Objects_Get_next+0x72> <== NEVER TAKEN
return NULL;
if ( !next_id_p )
483c0: 4a8d tstl %a5
483c2: 674e beqs 48412 <_Objects_Get_next+0x72> <== NEVER TAKEN
return NULL;
if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX)
483c4: 4a42 tstw %d2
483c6: 6604 bnes 483cc <_Objects_Get_next+0x2c>
next_id = information->minimum_id;
483c8: 242a 0006 movel %a2@(6),%d2
*location_p = OBJECTS_ERROR;
goto final;
}
/* try to grab one */
object = _Objects_Get(information, next_id, location_p);
483cc: 49f9 0004 8420 lea 48420 <_Objects_Get>,%a4
else
next_id = id;
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
483d2: 4281 clrl %d1 483d4: 4280 clrl %d0 483d6: 322a 000e movew %a2@(14),%d1 483da: 3002 movew %d2,%d0 483dc: b081 cmpl %d1,%d0
483de: 621e bhis 483fe <_Objects_Get_next+0x5e>
*location_p = OBJECTS_ERROR;
goto final;
}
/* try to grab one */
object = _Objects_Get(information, next_id, location_p);
483e0: 2f0b movel %a3,%sp@- 483e2: 2f02 movel %d2,%sp@-
next_id++;
483e4: 5282 addql #1,%d2
*location_p = OBJECTS_ERROR;
goto final;
}
/* try to grab one */
object = _Objects_Get(information, next_id, location_p);
483e6: 2f0a movel %a2,%sp@- 483e8: 4e94 jsr %a4@
next_id++;
} while (*location_p != OBJECTS_LOCAL);
483ea: 4fef 000c lea %sp@(12),%sp 483ee: 4a93 tstl %a3@
483f0: 66e0 bnes 483d2 <_Objects_Get_next+0x32>
*next_id_p = next_id;
483f2: 2a82 movel %d2,%a5@
return object;
final:
*next_id_p = OBJECTS_ID_FINAL;
return 0;
}
483f4: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 483fa: 4e5e unlk %fp 483fc: 4e75 rts
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
{
*location_p = OBJECTS_ERROR;
483fe: 7001 moveq #1,%d0
*next_id_p = next_id;
return object;
final:
*next_id_p = OBJECTS_ID_FINAL;
48400: 72ff moveq #-1,%d1
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
{
*location_p = OBJECTS_ERROR;
48402: 2680 movel %d0,%a3@
*next_id_p = next_id;
return object;
final:
*next_id_p = OBJECTS_ID_FINAL;
return 0;
48404: 4280 clrl %d0
*next_id_p = next_id;
return object;
final:
*next_id_p = OBJECTS_ID_FINAL;
48406: 2a81 movel %d1,%a5@
return 0;
}
48408: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4840e: 4e5e unlk %fp 48410: 4e75 rts
if ( !location_p )
return NULL;
if ( !next_id_p )
return NULL;
48412: 4280 clrl %d0
return object;
final:
*next_id_p = OBJECTS_ID_FINAL;
return 0;
}
48414: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4841a: 4e5e unlk %fp
...
00059f00 <_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;
59f00: 7001 moveq #1,%d0
if ( information->maximum >= index ) {
59f02: 4281 clrl %d1
Objects_Control *_Objects_Get_no_protection(
Objects_Information *information,
Objects_Id id,
Objects_Locations *location
)
{
59f04: 4e56 0000 linkw %fp,#0 59f08: 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;
59f0c: 90a8 0006 subl %a0@(6),%d0 59f10: d0ae 000c addl %fp@(12),%d0
if ( information->maximum >= index ) {
59f14: 3228 000e movew %a0@(14),%d1
Objects_Control *_Objects_Get_no_protection(
Objects_Information *information,
Objects_Id id,
Objects_Locations *location
)
{
59f18: 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 ) {
59f1c: b280 cmpl %d0,%d1
59f1e: 6510 bcss 59f30 <_Objects_Get_no_protection+0x30>
if ( (the_object = information->local_table[ index ]) != NULL ) {
59f20: 2068 0018 moveal %a0@(24),%a0 59f24: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0
59f28: 6706 beqs 59f30 <_Objects_Get_no_protection+0x30><== NEVER TAKEN
*location = OBJECTS_LOCAL;
59f2a: 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; }
59f2c: 4e5e unlk %fp 59f2e: 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;
59f30: 7001 moveq #1,%d0
return NULL; }
59f32: 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;
59f34: 2280 movel %d0,%a1@
return NULL;
59f36: 4280 clrl %d0
}
...
00048e04 <_Objects_Id_to_name>:
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
48e04: 4e56 fffc linkw %fp,#-4 48e08: 202e 0008 movel %fp@(8),%d0 48e0c: 2f02 movel %d2,%sp@-
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
48e0e: 4a80 tstl %d0
48e10: 664e bnes 48e60 <_Objects_Id_to_name+0x5c>
48e12: 2079 0006 26c2 moveal 626c2 <_Per_CPU_Information+0xc>,%a0 48e18: 2228 0008 movel %a0@(8),%d1 48e1c: 7418 moveq #24,%d2 48e1e: 2001 movel %d1,%d0 48e20: e4a8 lsrl %d2,%d0 48e22: 143c 0007 moveb #7,%d2 48e26: c082 andl %d2,%d0
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
48e28: 143c 0002 moveb #2,%d2 48e2c: 2040 moveal %d0,%a0 48e2e: 5388 subql #1,%a0 48e30: b488 cmpl %a0,%d2
48e32: 6522 bcss 48e56 <_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 ] )
48e34: 41f9 0006 221c lea 6221c <_Objects_Information_table>,%a0 48e3a: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 48e3e: 4a88 tstl %a0
48e40: 6714 beqs 48e56 <_Objects_Id_to_name+0x52>
*/
RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class(
Objects_Id id
)
{
return (uint32_t)
48e42: 2001 movel %d1,%d0 48e44: 741b moveq #27,%d2 48e46: e4a8 lsrl %d2,%d0
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
48e48: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0
if ( !information )
48e4c: 4a88 tstl %a0
48e4e: 6706 beqs 48e56 <_Objects_Id_to_name+0x52> <== NEVER TAKEN
return OBJECTS_INVALID_ID;
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string )
48e50: 4a28 0032 tstb %a0@(50)
48e54: 670e beqs 48e64 <_Objects_Id_to_name+0x60> <== ALWAYS TAKEN
return OBJECTS_INVALID_ID;
*name = the_object->name;
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
}
48e56: 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;
48e5a: 7003 moveq #3,%d0
return OBJECTS_INVALID_ID;
*name = the_object->name;
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
}
48e5c: 4e5e unlk %fp 48e5e: 4e75 rts
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
48e60: 2200 movel %d0,%d1 48e62: 60b8 bras 48e1c <_Objects_Id_to_name+0x18>
#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 );
48e64: 486e fffc pea %fp@(-4) 48e68: 2f01 movel %d1,%sp@- 48e6a: 2f08 movel %a0,%sp@- 48e6c: 4eb9 0004 8d90 jsr 48d90 <_Objects_Get>
if ( !the_object )
48e72: 4fef 000c lea %sp@(12),%sp 48e76: 4a80 tstl %d0
48e78: 67dc beqs 48e56 <_Objects_Id_to_name+0x52> <== NEVER TAKEN
return OBJECTS_INVALID_ID;
*name = the_object->name;
48e7a: 206e 000c moveal %fp@(12),%a0 48e7e: 2240 moveal %d0,%a1 48e80: 20a9 000c movel %a1@(12),%a0@
_Thread_Enable_dispatch();
48e84: 4eb9 0004 9b68 jsr 49b68 <_Thread_Enable_dispatch>
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; }
48e8a: 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;
48e8e: 4280 clrl %d0
}
48e90: 4e5e unlk %fp <== NOT EXECUTED
00048780 <_Objects_Set_name>:
{
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
48780: 4280 clrl %d0
bool _Objects_Set_name(
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
48782: 4e56 fff0 linkw %fp,#-16 48786: 48d7 3c00 moveml %a2-%a5,%sp@ 4878a: 286e 0008 moveal %fp@(8),%a4
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
4878e: 302c 0034 movew %a4@(52),%d0
bool _Objects_Set_name(
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
48792: 246e 0010 moveal %fp@(16),%a2
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
48796: 2f00 movel %d0,%sp@-
bool _Objects_Set_name(
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
48798: 2a6e 000c moveal %fp@(12),%a5
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
4879c: 2f0a movel %a2,%sp@- 4879e: 4eb9 0005 0a7c jsr 50a7c <strnlen>
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
487a4: 508f addql #8,%sp
{
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
487a6: 2640 moveal %d0,%a3
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
487a8: 4a2c 0032 tstb %a4@(50)
487ac: 6662 bnes 48810 <_Objects_Set_name+0x90>
d[length] = '\0';
the_object->name.name_p = d;
} else
#endif
{
the_object->name.name_u32 = _Objects_Build_name(
487ae: 7018 moveq #24,%d0 487b0: 1212 moveb %a2@,%d1 487b2: 49c1 extbl %d1 487b4: e1a9 lsll %d0,%d1 487b6: 103c 0001 moveb #1,%d0 487ba: b08b cmpl %a3,%d0
487bc: 643c bccs 487fa <_Objects_Set_name+0x7a>
487be: 102a 0001 moveb %a2@(1),%d0 487c2: 49c0 extbl %d0 487c4: 4840 swap %d0 487c6: 4240 clrw %d0 487c8: 8081 orl %d1,%d0 487ca: 7202 moveq #2,%d1 487cc: b28b cmpl %a3,%d1
487ce: 6730 beqs 48800 <_Objects_Set_name+0x80>
487d0: 122a 0002 moveb %a2@(2),%d1 487d4: 49c1 extbl %d1 487d6: e189 lsll #8,%d1 487d8: 8081 orl %d1,%d0 487da: 7203 moveq #3,%d1 487dc: b28b cmpl %a3,%d1 487de: 6700 0082 beqw 48862 <_Objects_Set_name+0xe2> 487e2: 122a 0003 moveb %a2@(3),%d1 487e6: 49c1 extbl %d1 487e8: 8081 orl %d1,%d0 487ea: 2b40 000c movel %d0,%a5@(12)
((3 < length) ? s[ 3 ] : ' ')
);
}
return true;
487ee: 7001 moveq #1,%d0
}
487f0: 4cee 3c00 fff0 moveml %fp@(-16),%a2-%a5 487f6: 4e5e unlk %fp 487f8: 4e75 rts
d[length] = '\0';
the_object->name.name_p = d;
} else
#endif
{
the_object->name.name_u32 = _Objects_Build_name(
487fa: 2001 movel %d1,%d0 487fc: 08c0 0015 bset #21,%d0 48800: 7220 moveq #32,%d1 48802: 08c0 000d bset #13,%d0 48806: 8081 orl %d1,%d0 48808: 2b40 000c movel %d0,%a5@(12)
((3 < length) ? s[ 3 ] : ' ')
);
}
return true;
4880c: 7001 moveq #1,%d0 4880e: 60e0 bras 487f0 <_Objects_Set_name+0x70>
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
char *d;
d = _Workspace_Allocate( length + 1 );
48810: 486b 0001 pea %a3@(1) 48814: 4eb9 0004 a4c2 jsr 4a4c2 <_Workspace_Allocate>
if ( !d )
4881a: 588f addql #4,%sp
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
char *d;
d = _Workspace_Allocate( length + 1 );
4881c: 2840 moveal %d0,%a4
if ( !d )
4881e: 4a80 tstl %d0
48820: 6734 beqs 48856 <_Objects_Set_name+0xd6>
return false;
_Workspace_Free( (void *)the_object->name.name_p );
48822: 2f2d 000c movel %a5@(12),%sp@- 48826: 4eb9 0004 a4de jsr 4a4de <_Workspace_Free>
the_object->name.name_p = NULL;
strncpy( d, name, length );
4882c: 2f0b movel %a3,%sp@- 4882e: 2f0a movel %a2,%sp@-
d = _Workspace_Allocate( length + 1 );
if ( !d )
return false;
_Workspace_Free( (void *)the_object->name.name_p );
the_object->name.name_p = NULL;
48830: 42ad 000c clrl %a5@(12)
strncpy( d, name, length );
48834: 2f0c movel %a4,%sp@- 48836: 4eb9 0005 09f4 jsr 509f4 <strncpy>
d[length] = '\0';
the_object->name.name_p = d;
4883c: 4fef 0010 lea %sp@(16),%sp
_Workspace_Free( (void *)the_object->name.name_p );
the_object->name.name_p = NULL;
strncpy( d, name, length );
d[length] = '\0';
48840: 4200 clrb %d0 48842: 1980 b800 moveb %d0,%a4@(00000000,%a3:l)
((3 < length) ? s[ 3 ] : ' ')
);
}
return true;
48846: 7001 moveq #1,%d0
_Workspace_Free( (void *)the_object->name.name_p );
the_object->name.name_p = NULL;
strncpy( d, name, length );
d[length] = '\0';
the_object->name.name_p = d;
48848: 2b4c 000c movel %a4,%a5@(12)
);
}
return true;
}
4884c: 4cee 3c00 fff0 moveml %fp@(-16),%a2-%a5 48852: 4e5e unlk %fp 48854: 4e75 rts 48856: 4cee 3c00 fff0 moveml %fp@(-16),%a2-%a5
if ( information->is_string ) {
char *d;
d = _Workspace_Allocate( length + 1 );
if ( !d )
return false;
4885c: 4200 clrb %d0
);
}
return true;
}
4885e: 4e5e unlk %fp 48860: 4e75 rts
d[length] = '\0';
the_object->name.name_p = d;
} else
#endif
{
the_object->name.name_u32 = _Objects_Build_name(
48862: 7220 moveq #32,%d1 48864: 8081 orl %d1,%d0 48866: 2b40 000c movel %d0,%a5@(12)
((3 < length) ? s[ 3 ] : ' ')
);
}
return true;
4886a: 7001 moveq #1,%d0 4886c: 6082 bras 487f0 <_Objects_Set_name+0x70>
...
00048690 <_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) /
48690: 4281 clrl %d1
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
48692: 4e56 ffec linkw %fp,#-20 48696: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 4869a: 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 );
4869e: 4282 clrl %d2
block_count = (information->maximum - index_base) /
486a0: 4283 clrl %d3
/*
* Search the list to find block or chunk with all objects inactive.
*/
index_base = _Objects_Get_index( information->minimum_id );
486a2: 342a 0008 movew %a2@(8),%d2
block_count = (information->maximum - index_base) /
486a6: 362a 000e movew %a2@(14),%d3 486aa: 322a 0012 movew %a2@(18),%d1 486ae: 9682 subl %d2,%d3 486b0: 4c41 3003 remul %d1,%d3,%d3
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
486b4: 6774 beqs 4872a <_Objects_Shrink_information+0x9a><== NEVER TAKEN
if ( information->inactive_per_block[ block ] ==
486b6: 206a 002a moveal %a2@(42),%a0 486ba: b290 cmpl %a0@,%d1
486bc: 677e beqs 4873c <_Objects_Shrink_information+0xac><== NEVER TAKEN
* the_block - the block to remove
*
* Output parameters: NONE
*/
void _Objects_Shrink_information(
486be: 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++ ) {
486c0: 4280 clrl %d0 486c2: 5280 addql #1,%d0
information->inactive -= information->allocation_size;
return;
}
index_base += information->allocation_size;
486c4: d481 addl %d1,%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++ ) {
486c6: b680 cmpl %d0,%d3
486c8: 6760 beqs 4872a <_Objects_Shrink_information+0x9a>
if ( information->inactive_per_block[ block ] ==
486ca: 2800 movel %d0,%d4 486cc: e58c lsll #2,%d4 486ce: b298 cmpl %a0@+,%d1
486d0: 66f0 bnes 486c2 <_Objects_Shrink_information+0x32>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
486d2: 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 );
486d6: 47f9 0004 75ac lea 475ac <_Chain_Extract>,%a3
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) _Chain_First( &information->Inactive );
do {
index = _Objects_Get_index( the_object->id );
486dc: 4280 clrl %d0 486de: 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;
486e2: 2610 movel %a0@,%d3
if ((index >= index_base) &&
486e4: b480 cmpl %d0,%d2
486e6: 620c bhis 486f4 <_Objects_Shrink_information+0x64>
(index < (index_base + information->allocation_size))) {
486e8: 4281 clrl %d1 486ea: 322a 0012 movew %a2@(18),%d1 486ee: d282 addl %d2,%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) &&
486f0: b280 cmpl %d0,%d1
486f2: 6240 bhis 48734 <_Objects_Shrink_information+0xa4>
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
}
}
while ( the_object );
486f4: 4a83 tstl %d3
486f6: 6704 beqs 486fc <_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;
486f8: 2043 moveal %d3,%a0 486fa: 60e0 bras 486dc <_Objects_Shrink_information+0x4c>
while ( the_object );
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
486fc: 206a 002e moveal %a2@(46),%a0 48700: 2f30 4800 movel %a0@(00000000,%d4:l),%sp@- 48704: 4eb9 0004 a2fe jsr 4a2fe <_Workspace_Free>
information->object_blocks[ block ] = NULL;
4870a: 206a 002e moveal %a2@(46),%a0
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
return;
4870e: 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;
48710: 42b0 4800 clrl %a0@(00000000,%d4:l)
information->inactive_per_block[ block ] = 0;
48714: 206a 002a moveal %a2@(42),%a0
information->inactive -= information->allocation_size;
48718: 302a 0028 movew %a2@(40),%d0 4871c: 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;
48720: 42b0 4800 clrl %a0@(00000000,%d4:l)
information->inactive -= information->allocation_size;
48724: 9081 subl %d1,%d0 48726: 3540 0028 movew %d0,%a2@(40)
return;
}
index_base += information->allocation_size;
}
}
4872a: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 48730: 4e5e unlk %fp 48732: 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 );
48734: 2f08 movel %a0,%sp@- 48736: 4e93 jsr %a3@ 48738: 588f addql #4,%sp 4873a: 60b8 bras 486f4 <_Objects_Shrink_information+0x64>
4873c: 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 ] ==
48740: 4284 clrl %d4 <== 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 );
48742: 47f9 0004 75ac lea 475ac <_Chain_Extract>,%a3 <== NOT EXECUTED 48748: 6092 bras 486dc <_Objects_Shrink_information+0x4c><== NOT EXECUTED
...
000474c0 <_POSIX_Condition_variables_Get>:
POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get (
pthread_cond_t *cond,
Objects_Locations *location
)
{
474c0: 4e56 0000 linkw %fp,#0 474c4: 2f0b movel %a3,%sp@- 474c6: 266e 000c moveal %fp@(12),%a3 474ca: 2f0a movel %a2,%sp@- 474cc: 246e 0008 moveal %fp@(8),%a2
int status;
if ( !cond ) {
474d0: 4a8a tstl %a2
474d2: 6750 beqs 47524 <_POSIX_Condition_variables_Get+0x64>
*location = OBJECTS_ERROR;
return (POSIX_Condition_variables_Control *) 0;
}
if ( *cond == PTHREAD_COND_INITIALIZER ) {
474d4: 2012 movel %a2@,%d0 474d6: 72ff moveq #-1,%d1 474d8: b280 cmpl %d0,%d1
474da: 6720 beqs 474fc <_POSIX_Condition_variables_Get+0x3c><== NEVER TAKEN
}
/*
* Now call Objects_Get()
*/
return (POSIX_Condition_variables_Control *)_Objects_Get(
474dc: 2f0b movel %a3,%sp@- 474de: 2f00 movel %d0,%sp@- 474e0: 4879 0006 3a8a pea 63a8a <_POSIX_Condition_variables_Information> 474e6: 4eb9 0004 a448 jsr 4a448 <_Objects_Get> 474ec: 4fef 000c lea %sp@(12),%sp
&_POSIX_Condition_variables_Information,
(Objects_Id) *cond,
location
);
}
474f0: 246e fff8 moveal %fp@(-8),%a2 474f4: 266e fffc moveal %fp@(-4),%a3 474f8: 4e5e unlk %fp 474fa: 4e75 rts
if ( *cond == PTHREAD_COND_INITIALIZER ) {
/*
* Do an "auto-create" here.
*/
status = pthread_cond_init( cond, 0 );
474fc: 42a7 clrl %sp@- 474fe: 2f0a movel %a2,%sp@- 47500: 4eb9 0004 7538 jsr 47538 <pthread_cond_init>
if ( status ) {
47506: 508f addql #8,%sp 47508: 4a80 tstl %d0
4750a: 6618 bnes 47524 <_POSIX_Condition_variables_Get+0x64>
4750c: 2012 movel %a2@,%d0
}
/*
* Now call Objects_Get()
*/
return (POSIX_Condition_variables_Control *)_Objects_Get(
4750e: 2f0b movel %a3,%sp@- 47510: 2f00 movel %d0,%sp@- 47512: 4879 0006 3a8a pea 63a8a <_POSIX_Condition_variables_Information> 47518: 4eb9 0004 a448 jsr 4a448 <_Objects_Get> 4751e: 4fef 000c lea %sp@(12),%sp 47522: 60cc bras 474f0 <_POSIX_Condition_variables_Get+0x30>
* Do an "auto-create" here.
*/
status = pthread_cond_init( cond, 0 );
if ( status ) {
*location = OBJECTS_ERROR;
47524: 7001 moveq #1,%d0 47526: 2680 movel %d0,%a3@
return (POSIX_Condition_variables_Control *)_Objects_Get(
&_POSIX_Condition_variables_Information,
(Objects_Id) *cond,
location
);
}
47528: 246e fff8 moveal %fp@(-8),%a2
*/
status = pthread_cond_init( cond, 0 );
if ( status ) {
*location = OBJECTS_ERROR;
return (POSIX_Condition_variables_Control *) 0;
4752c: 4280 clrl %d0
return (POSIX_Condition_variables_Control *)_Objects_Get(
&_POSIX_Condition_variables_Information,
(Objects_Id) *cond,
location
);
}
4752e: 266e fffc moveal %fp@(-4),%a3 47532: 4e5e unlk %fp
...
000476dc <_POSIX_Condition_variables_Wait_support>:
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
476dc: 4e56 ffe8 linkw %fp,#-24 476e0: 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 ) ) {
476e4: 240e movel %fp,%d2 476e6: 5982 subql #4,%d2
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
476e8: 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 ) ) {
476ec: 2f02 movel %d2,%sp@-
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
476ee: 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 ) ) {
476f2: 2f0a movel %a2,%sp@-
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
476f4: 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 ) ) {
476f8: 4eb9 0004 7864 jsr 47864 <_POSIX_Mutex_Get> 476fe: 508f addql #8,%sp 47700: 4a80 tstl %d0
47702: 676a beqs 4776e <_POSIX_Condition_variables_Wait_support+0x92>
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
47704: 2039 0006 3708 movel 63708 <_Thread_Dispatch_disable_level>,%d0 4770a: 5380 subql #1,%d0
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
4770c: 2f02 movel %d2,%sp@- 4770e: 23c0 0006 3708 movel %d0,63708 <_Thread_Dispatch_disable_level>
return _Thread_Dispatch_disable_level;
47714: 2039 0006 3708 movel 63708 <_Thread_Dispatch_disable_level>,%d0 4771a: 2f0b movel %a3,%sp@- 4771c: 4eb9 0004 74c0 jsr 474c0 <_POSIX_Condition_variables_Get>
switch ( location ) {
47722: 508f addql #8,%sp
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
47724: 2840 moveal %d0,%a4
switch ( location ) {
47726: 4aae fffc tstl %fp@(-4)
4772a: 6642 bnes 4776e <_POSIX_Condition_variables_Wait_support+0x92>
case OBJECTS_LOCAL:
if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) {
4772c: 202c 0014 movel %a4@(20),%d0
47730: 6718 beqs 4774a <_POSIX_Condition_variables_Wait_support+0x6e>
47732: b092 cmpl %a2@,%d0
47734: 6714 beqs 4774a <_POSIX_Condition_variables_Wait_support+0x6e>
_Thread_Enable_dispatch();
47736: 4eb9 0004 b190 jsr 4b190 <_Thread_Enable_dispatch>
return EINVAL;
4773c: 7416 moveq #22,%d2
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
4773e: 2002 movel %d2,%d0 47740: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 47746: 4e5e unlk %fp 47748: 4e75 rts
if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) {
_Thread_Enable_dispatch();
return EINVAL;
}
(void) pthread_mutex_unlock( mutex );
4774a: 2f0a movel %a2,%sp@- 4774c: 4eb9 0004 7b2c jsr 47b2c <pthread_mutex_unlock>
_Thread_Enable_dispatch();
return EINVAL;
}
*/
if ( !already_timedout ) {
47752: 588f addql #4,%sp 47754: 4a03 tstb %d3
47756: 6724 beqs 4777c <_POSIX_Condition_variables_Wait_support+0xa0>
status = _Thread_Executing->Wait.return_code;
if ( status == EINTR )
status = 0;
} else {
_Thread_Enable_dispatch();
47758: 4eb9 0004 b190 jsr 4b190 <_Thread_Enable_dispatch>
status = ETIMEDOUT;
4775e: 7474 moveq #116,%d2
/*
* When we get here the dispatch disable level is 0.
*/
mutex_status = pthread_mutex_lock( mutex );
47760: 2f0a movel %a2,%sp@- 47762: 4eb9 0004 7a90 jsr 47a90 <pthread_mutex_lock>
if ( mutex_status )
47768: 588f addql #4,%sp 4776a: 4a80 tstl %d0
4776c: 67d0 beqs 4773e <_POSIX_Condition_variables_Wait_support+0x62><== ALWAYS TAKEN
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
4776e: 7416 moveq #22,%d2
}
47770: 2002 movel %d2,%d0 47772: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 47778: 4e5e unlk %fp 4777a: 4e75 rts
return EINVAL;
}
*/
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
4777c: 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;
47780: 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;
47782: 200c movel %a4,%d0 47784: 0680 0000 0018 addil #24,%d0
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
4778a: 2079 0006 3b6a moveal 63b6a <_Per_CPU_Information+0xc>,%a0 47790: 2941 0048 movel %d1,%a4@(72) 47794: 42a8 0034 clrl %a0@(52)
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
_Thread_Executing->Wait.id = *cond;
47798: 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;
4779c: 2140 0044 movel %d0,%a0@(68)
_Thread_Executing->Wait.id = *cond;
_Thread_queue_Enqueue( &the_cond->Wait_queue, timeout );
477a0: 4879 0004 ba70 pea 4ba70 <_Thread_queue_Timeout> 477a6: 2f2e 0010 movel %fp@(16),%sp@- 477aa: 2f00 movel %d0,%sp@- 477ac: 4eb9 0004 b68c jsr 4b68c <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
477b2: 4eb9 0004 b190 jsr 4b190 <_Thread_Enable_dispatch>
* a POSIX signal, then pthread_cond_wait returns spuriously,
* according to the POSIX standard. It means that pthread_cond_wait
* returns a success status, except for the fact that it was not
* woken up a pthread_cond_signal or a pthread_cond_broadcast.
*/
status = _Thread_Executing->Wait.return_code;
477b8: 2079 0006 3b6a moveal 63b6a <_Per_CPU_Information+0xc>,%a0
if ( status == EINTR )
status = 0;
477be: 7004 moveq #4,%d0
* according to the POSIX standard. It means that pthread_cond_wait
* returns a success status, except for the fact that it was not
* woken up a pthread_cond_signal or a pthread_cond_broadcast.
*/
status = _Thread_Executing->Wait.return_code;
if ( status == EINTR )
477c0: 4fef 000c lea %sp@(12),%sp
* a POSIX signal, then pthread_cond_wait returns spuriously,
* according to the POSIX standard. It means that pthread_cond_wait
* returns a success status, except for the fact that it was not
* woken up a pthread_cond_signal or a pthread_cond_broadcast.
*/
status = _Thread_Executing->Wait.return_code;
477c4: 2428 0034 movel %a0@(52),%d2
if ( status == EINTR )
status = 0;
477c8: b082 cmpl %d2,%d0 477ca: 56c0 sne %d0
/*
* When we get here the dispatch disable level is 0.
*/
mutex_status = pthread_mutex_lock( mutex );
477cc: 2f0a movel %a2,%sp@-
* returns a success status, except for the fact that it was not
* woken up a pthread_cond_signal or a pthread_cond_broadcast.
*/
status = _Thread_Executing->Wait.return_code;
if ( status == EINTR )
status = 0;
477ce: 49c0 extbl %d0 477d0: c480 andl %d0,%d2
/*
* When we get here the dispatch disable level is 0.
*/
mutex_status = pthread_mutex_lock( mutex );
477d2: 4eb9 0004 7a90 jsr 47a90 <pthread_mutex_lock>
if ( mutex_status )
477d8: 588f addql #4,%sp 477da: 4a80 tstl %d0
477dc: 6690 bnes 4776e <_POSIX_Condition_variables_Wait_support+0x92>
477de: 6000 ff5e braw 4773e <_POSIX_Condition_variables_Wait_support+0x62>
...
000468d0 <_POSIX_Keys_Free_memory>:
#include <rtems/posix/key.h>
void _POSIX_Keys_Free_memory(
POSIX_Keys_Control *the_key
)
{
468d0: 4e56 0000 linkw %fp,#0 468d4: 2f0b movel %a3,%sp@-
uint32_t the_api;
for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ )
_Workspace_Free( the_key->Values[ the_api ] );
468d6: 47f9 0004 b1d6 lea 4b1d6 <_Workspace_Free>,%a3
#include <rtems/posix/key.h>
void _POSIX_Keys_Free_memory(
POSIX_Keys_Control *the_key
)
{
468dc: 2f0a movel %a2,%sp@- 468de: 246e 0008 moveal %fp@(8),%a2
uint32_t the_api;
for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ )
_Workspace_Free( the_key->Values[ the_api ] );
468e2: 2f2a 0018 movel %a2@(24),%sp@- 468e6: 4e93 jsr %a3@ 468e8: 2f2a 001c movel %a2@(28),%sp@- 468ec: 4e93 jsr %a3@ 468ee: 2d6a 0020 0008 movel %a2@(32),%fp@(8) 468f4: 508f addql #8,%sp
}
468f6: 246e fff8 moveal %fp@(-8),%a2 468fa: 266e fffc moveal %fp@(-4),%a3 468fe: 4e5e unlk %fp
)
{
uint32_t the_api;
for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ )
_Workspace_Free( the_key->Values[ the_api ] );
46900: 4ef9 0004 b1d6 jmp 4b1d6 <_Workspace_Free>
...
0004e6bc <_POSIX_Keys_Run_destructors>:
4e6bc: 7218 moveq #24,%d1
*/
void _POSIX_Keys_Run_destructors(
Thread_Control *thread
)
{
4e6be: 4e56 ffec linkw %fp,#-20 4e6c2: 206e 0008 moveal %fp@(8),%a0 4e6c6: 48d7 007c moveml %d2-%d6,%sp@
Objects_Maximum thread_index = _Objects_Get_index( thread->Object.id );
4e6ca: 2628 0008 movel %a0@(8),%d3 4e6ce: 2003 movel %d3,%d0 4e6d0: e2a8 lsrl %d1,%d0 4e6d2: 123c 0007 moveb #7,%d1 4e6d6: c081 andl %d1,%d0
for ( index = 1 ; index <= max ; ++index ) {
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
_POSIX_Keys_Information.local_table [ index ];
if ( key != NULL && key->destructor != NULL ) {
void *value = key->Values [ thread_api ][ thread_index ];
4e6d8: 0283 0000 ffff andil #65535,%d3 4e6de: 2c00 movel %d0,%d6 4e6e0: 5a86 addql #5,%d6
*
* Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99.
*/
while ( !done ) {
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
4e6e2: 3039 0006 139e movew 6139e <_POSIX_Keys_Information+0xe>,%d0
for ( index = 1 ; index <= max ; ++index ) {
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
_POSIX_Keys_Information.local_table [ index ];
if ( key != NULL && key->destructor != NULL ) {
void *value = key->Values [ thread_api ][ thread_index ];
4e6e8: e58b lsll #2,%d3
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
done = true;
for ( index = 1 ; index <= max ; ++index ) {
4e6ea: 4a40 tstw %d0
4e6ec: 660a bnes 4e6f8 <_POSIX_Keys_Run_destructors+0x3c>
done = false;
}
}
}
}
}
4e6ee: 4cee 007c ffec moveml %fp@(-20),%d2-%d6 4e6f4: 4e5e unlk %fp 4e6f6: 4e75 rts 4e6f8: 4285 clrl %d5 4e6fa: 7201 moveq #1,%d1
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
done = true;
for ( index = 1 ; index <= max ; ++index ) {
4e6fc: 7401 moveq #1,%d2 4e6fe: 7801 moveq #1,%d4 4e700: 3a00 movew %d0,%d5
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
4e702: 2079 0006 13a8 moveal 613a8 <_POSIX_Keys_Information+0x18>,%a0
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
done = true;
for ( index = 1 ; index <= max ; ++index ) {
4e708: 5282 addql #1,%d2
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
4e70a: 2070 1c00 moveal %a0@(00000000,%d1:l:4),%a0
_POSIX_Keys_Information.local_table [ index ];
if ( key != NULL && key->destructor != NULL ) {
4e70e: 4a88 tstl %a0
4e710: 671e beqs 4e730 <_POSIX_Keys_Run_destructors+0x74>
4e712: 4aa8 0010 tstl %a0@(16)
4e716: 6718 beqs 4e730 <_POSIX_Keys_Run_destructors+0x74>
void *value = key->Values [ thread_api ][ thread_index ];
4e718: 2270 6c00 moveal %a0@(00000000,%d6:l:4),%a1 4e71c: d3c3 addal %d3,%a1 4e71e: 2211 movel %a1@,%d1
if ( value != NULL ) {
4e720: 670e beqs 4e730 <_POSIX_Keys_Run_destructors+0x74><== ALWAYS TAKEN
key->Values [ thread_api ][ thread_index ] = NULL;
4e722: 4291 clrl %a1@ <== NOT EXECUTED
(*key->destructor)( value );
done = false;
4e724: 4204 clrb %d4 <== NOT EXECUTED
if ( key != NULL && key->destructor != NULL ) {
void *value = key->Values [ thread_api ][ thread_index ];
if ( value != NULL ) {
key->Values [ thread_api ][ thread_index ] = NULL;
(*key->destructor)( value );
4e726: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4e728: 2068 0010 moveal %a0@(16),%a0 <== NOT EXECUTED 4e72c: 4e90 jsr %a0@ <== NOT EXECUTED 4e72e: 588f addql #4,%sp <== NOT EXECUTED
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
done = true;
for ( index = 1 ; index <= max ; ++index ) {
4e730: 4281 clrl %d1 4e732: 3202 movew %d2,%d1 4e734: b285 cmpl %d5,%d1
4e736: 63ca blss 4e702 <_POSIX_Keys_Run_destructors+0x46>
* number of iterations. An infinite loop may happen if destructors set
* thread specific data. This can be considered dubious.
*
* Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99.
*/
while ( !done ) {
4e738: 4a04 tstb %d4
4e73a: 66b2 bnes 4e6ee <_POSIX_Keys_Run_destructors+0x32><== ALWAYS TAKEN
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
4e73c: 3039 0006 139e movew 6139e <_POSIX_Keys_Information+0xe>,%d0<== NOT EXECUTED
done = true;
for ( index = 1 ; index <= max ; ++index ) {
4e742: 67aa beqs 4e6ee <_POSIX_Keys_Run_destructors+0x32><== NOT EXECUTED 4e744: 60b2 bras 4e6f8 <_POSIX_Keys_Run_destructors+0x3c><== NOT EXECUTED
...
0004c288 <_POSIX_Message_queue_Receive_support>:
size_t msg_len,
unsigned int *msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
4c288: 4e56 ffe4 linkw %fp,#-28 4c28c: 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(
4c290: 486e fff8 pea %fp@(-8) 4c294: 242e 0008 movel %fp@(8),%d2 4c298: 2f02 movel %d2,%sp@- 4c29a: 4879 0006 abd4 pea 6abd4 <_POSIX_Message_queue_Information_fds> 4c2a0: 246e 0014 moveal %fp@(20),%a2 4c2a4: 162e 001b moveb %fp@(27),%d3 4c2a8: 4eb9 0004 f7d4 jsr 4f7d4 <_Objects_Get>
Objects_Locations location;
size_t length_out;
bool do_wait;
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
4c2ae: 4fef 000c lea %sp@(12),%sp 4c2b2: 4aae fff8 tstl %fp@(-8)
4c2b6: 671a beqs 4c2d2 <_POSIX_Message_queue_Receive_support+0x4a>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
4c2b8: 4eb9 0005 6b34 jsr 56b34 <__errno> 4c2be: 72ff moveq #-1,%d1 4c2c0: 2040 moveal %d0,%a0 4c2c2: 7009 moveq #9,%d0
}
4c2c4: 4cee 043c ffe4 moveml %fp@(-28),%d2-%d5/%a2
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
4c2ca: 2080 movel %d0,%a0@
}
4c2cc: 2001 movel %d1,%d0 4c2ce: 4e5e unlk %fp 4c2d0: 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 ) {
4c2d2: 2040 moveal %d0,%a0 4c2d4: 7803 moveq #3,%d4 4c2d6: 7a01 moveq #1,%d5 4c2d8: 2228 0014 movel %a0@(20),%d1 4c2dc: c881 andl %d1,%d4 4c2de: ba84 cmpl %d4,%d5 4c2e0: 6700 00c4 beqw 4c3a6 <_POSIX_Message_queue_Receive_support+0x11e>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EBADF );
}
the_mq = the_mq_fd->Queue;
4c2e4: 2068 0010 moveal %a0@(16),%a0
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
4c2e8: 202e 0010 movel %fp@(16),%d0 4c2ec: b0a8 0066 cmpl %a0@(102),%d0
4c2f0: 656a bcss 4c35c <_POSIX_Message_queue_Receive_support+0xd4>
/*
* Now if something goes wrong, we return a "length" of -1
* to indicate an error.
*/
length_out = -1;
4c2f2: 70ff moveq #-1,%d0 4c2f4: 2d40 fffc movel %d0,%fp@(-4)
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
4c2f8: 4a03 tstb %d3
4c2fa: 6756 beqs 4c352 <_POSIX_Message_queue_Receive_support+0xca>
4c2fc: 0801 000e btst #14,%d1 4c300: 57c0 seq %d0 4c302: 49c0 extbl %d0 4c304: 4480 negl %d0
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
4c306: 2f2e 001c movel %fp@(28),%sp@- 4c30a: 2f00 movel %d0,%sp@- 4c30c: 486e fffc pea %fp@(-4) 4c310: 2f2e 000c movel %fp@(12),%sp@- 4c314: 2f02 movel %d2,%sp@- 4c316: 4868 001a pea %a0@(26) 4c31a: 4eb9 0004 e6f4 jsr 4e6f4 <_CORE_message_queue_Seize>
&length_out,
do_wait,
timeout
);
_Thread_Enable_dispatch();
4c320: 4eb9 0005 05a4 jsr 505a4 <_Thread_Enable_dispatch>
if (msg_prio) {
*msg_prio = _POSIX_Message_queue_Priority_from_core(
_Thread_Executing->Wait.count
4c326: 2079 0006 ac46 moveal 6ac46 <_Per_CPU_Information+0xc>,%a0
do_wait,
timeout
);
_Thread_Enable_dispatch();
if (msg_prio) {
4c32c: 4fef 0018 lea %sp@(24),%sp 4c330: 4a8a tstl %a2
4c332: 6708 beqs 4c33c <_POSIX_Message_queue_Receive_support+0xb4><== NEVER TAKEN
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);
4c334: 2028 0024 movel %a0@(36),%d0
4c338: 6d1c blts 4c356 <_POSIX_Message_queue_Receive_support+0xce>
*msg_prio = _POSIX_Message_queue_Priority_from_core(
4c33a: 2480 movel %d0,%a2@
_Thread_Executing->Wait.count
);
}
if ( !_Thread_Executing->Wait.return_code )
4c33c: 4aa8 0034 tstl %a0@(52)
4c340: 663a bnes 4c37c <_POSIX_Message_queue_Receive_support+0xf4>
return length_out;
4c342: 222e fffc movel %fp@(-4),%d1
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
4c346: 2001 movel %d1,%d0 4c348: 4cee 043c ffe4 moveml %fp@(-28),%d2-%d5/%a2 4c34e: 4e5e unlk %fp 4c350: 4e75 rts
length_out = -1;
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
4c352: 4280 clrl %d0 4c354: 60b0 bras 4c306 <_POSIX_Message_queue_Receive_support+0x7e> 4c356: 4480 negl %d0
timeout
);
_Thread_Enable_dispatch();
if (msg_prio) {
*msg_prio = _POSIX_Message_queue_Priority_from_core(
4c358: 2480 movel %d0,%a2@ 4c35a: 60e0 bras 4c33c <_POSIX_Message_queue_Receive_support+0xb4>
}
the_mq = the_mq_fd->Queue;
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
_Thread_Enable_dispatch();
4c35c: 4eb9 0005 05a4 jsr 505a4 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EMSGSIZE );
4c362: 747a moveq #122,%d2 4c364: 4eb9 0005 6b34 jsr 56b34 <__errno> 4c36a: 72ff moveq #-1,%d1 4c36c: 2040 moveal %d0,%a0
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
4c36e: 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 );
4c370: 2082 movel %d2,%a0@
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
4c372: 4cee 043c ffe4 moveml %fp@(-28),%d2-%d5/%a2 4c378: 4e5e unlk %fp 4c37a: 4e75 rts
}
if ( !_Thread_Executing->Wait.return_code )
return length_out;
rtems_set_errno_and_return_minus_one(
4c37c: 4eb9 0005 6b34 jsr 56b34 <__errno> 4c382: 2079 0006 ac46 moveal 6ac46 <_Per_CPU_Information+0xc>,%a0 4c388: 2440 moveal %d0,%a2 4c38a: 2f28 0034 movel %a0@(52),%sp@- 4c38e: 4eb9 0004 c65c jsr 4c65c <_POSIX_Message_queue_Translate_core_message_queue_return_code> 4c394: 588f addql #4,%sp 4c396: 72ff moveq #-1,%d1 4c398: 2480 movel %d0,%a2@
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
4c39a: 2001 movel %d1,%d0 4c39c: 4cee 043c ffe4 moveml %fp@(-28),%d2-%d5/%a2 4c3a2: 4e5e unlk %fp 4c3a4: 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();
4c3a6: 4eb9 0005 05a4 jsr 505a4 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EBADF );
4c3ac: 7609 moveq #9,%d3 4c3ae: 4eb9 0005 6b34 jsr 56b34 <__errno> 4c3b4: 72ff moveq #-1,%d1 4c3b6: 2040 moveal %d0,%a0
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
4c3b8: 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 );
4c3ba: 2083 movel %d3,%a0@
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
4c3bc: 4cee 043c ffe4 moveml %fp@(-28),%d2-%d5/%a2 4c3c2: 4e5e unlk %fp
...
0004c3ec <_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 )
4c3ec: 7020 moveq #32,%d0
size_t msg_len,
uint32_t msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
4c3ee: 4e56 ffe8 linkw %fp,#-24 4c3f2: 48d7 043c moveml %d2-%d5/%a2,%sp@ 4c3f6: 262e 0008 movel %fp@(8),%d3 4c3fa: 242e 0014 movel %fp@(20),%d2 4c3fe: 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 )
4c402: b082 cmpl %d2,%d0 4c404: 6500 00e2 bcsw 4c4e8 <_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(
4c408: 486e fffc pea %fp@(-4) 4c40c: 2f03 movel %d3,%sp@- 4c40e: 4879 0006 abd4 pea 6abd4 <_POSIX_Message_queue_Information_fds> 4c414: 4eb9 0004 f7d4 jsr 4f7d4 <_Objects_Get>
rtems_set_errno_and_return_minus_one( EINVAL );
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
4c41a: 4fef 000c lea %sp@(12),%sp 4c41e: 4aae fffc tstl %fp@(-4) 4c422: 6600 00aa bnew 4c4ce <_POSIX_Message_queue_Send_support+0xe2>
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) {
4c426: 2240 moveal %d0,%a1 4c428: 7a03 moveq #3,%d5 4c42a: 2229 0014 movel %a1@(20),%d1 4c42e: ca81 andl %d1,%d5 4c430: 6700 00d0 beqw 4c502 <_POSIX_Message_queue_Send_support+0x116>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EBADF );
}
the_mq = the_mq_fd->Queue;
4c434: 2240 moveal %d0,%a1 4c436: 2069 0010 moveal %a1@(16),%a0
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
4c43a: 4a04 tstb %d4
4c43c: 6750 beqs 4c48e <_POSIX_Message_queue_Send_support+0xa2>
do_wait = wait;
/*
* Now perform the actual message receive
*/
msg_status = _CORE_message_queue_Submit(
4c43e: 2f2e 001c movel %fp@(28),%sp@- 4c442: 4482 negl %d2
the_mq = the_mq_fd->Queue;
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
4c444: 0801 000e btst #14,%d1 4c448: 57c0 seq %d0 4c44a: 49c0 extbl %d0 4c44c: 4480 negl %d0
do_wait = wait;
/*
* Now perform the actual message receive
*/
msg_status = _CORE_message_queue_Submit(
4c44e: 2f00 movel %d0,%sp@- 4c450: 2f02 movel %d2,%sp@- 4c452: 42a7 clrl %sp@- 4c454: 2f03 movel %d3,%sp@- 4c456: 2f2e 0010 movel %fp@(16),%sp@- 4c45a: 2f2e 000c movel %fp@(12),%sp@- 4c45e: 4868 001a pea %a0@(26) 4c462: 4eb9 0004 e830 jsr 4e830 <_CORE_message_queue_Submit>
_POSIX_Message_queue_Priority_to_core( msg_prio ),
do_wait,
timeout /* no timeout */
);
_Thread_Enable_dispatch();
4c468: 4fef 0020 lea %sp@(32),%sp
do_wait = wait;
/*
* Now perform the actual message receive
*/
msg_status = _CORE_message_queue_Submit(
4c46c: 2400 movel %d0,%d2
_POSIX_Message_queue_Priority_to_core( msg_prio ),
do_wait,
timeout /* no timeout */
);
_Thread_Enable_dispatch();
4c46e: 4eb9 0005 05a4 jsr 505a4 <_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 )
4c474: 7007 moveq #7,%d0 4c476: b082 cmpl %d2,%d0
4c478: 6748 beqs 4c4c2 <_POSIX_Message_queue_Send_support+0xd6>
msg_status = _Thread_Executing->Wait.return_code;
if ( !msg_status )
4c47a: 4a82 tstl %d2 4c47c: 6600 00a4 bnew 4c522 <_POSIX_Message_queue_Send_support+0x136>
return msg_status;
4c480: 4281 clrl %d1
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
4c482: 2001 movel %d1,%d0 4c484: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 4c48a: 4e5e unlk %fp 4c48c: 4e75 rts
do_wait = wait;
/*
* Now perform the actual message receive
*/
msg_status = _CORE_message_queue_Submit(
4c48e: 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 )
4c492: 4280 clrl %d0
do_wait = wait;
/*
* Now perform the actual message receive
*/
msg_status = _CORE_message_queue_Submit(
4c494: 4482 negl %d2 4c496: 2f00 movel %d0,%sp@- 4c498: 2f02 movel %d2,%sp@- 4c49a: 42a7 clrl %sp@- 4c49c: 2f03 movel %d3,%sp@- 4c49e: 2f2e 0010 movel %fp@(16),%sp@- 4c4a2: 2f2e 000c movel %fp@(12),%sp@- 4c4a6: 4868 001a pea %a0@(26) 4c4aa: 4eb9 0004 e830 jsr 4e830 <_CORE_message_queue_Submit>
_POSIX_Message_queue_Priority_to_core( msg_prio ),
do_wait,
timeout /* no timeout */
);
_Thread_Enable_dispatch();
4c4b0: 4fef 0020 lea %sp@(32),%sp
do_wait = wait;
/*
* Now perform the actual message receive
*/
msg_status = _CORE_message_queue_Submit(
4c4b4: 2400 movel %d0,%d2
_POSIX_Message_queue_Priority_to_core( msg_prio ),
do_wait,
timeout /* no timeout */
);
_Thread_Enable_dispatch();
4c4b6: 4eb9 0005 05a4 jsr 505a4 <_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 )
4c4bc: 7007 moveq #7,%d0 4c4be: b082 cmpl %d2,%d0
4c4c0: 66b8 bnes 4c47a <_POSIX_Message_queue_Send_support+0x8e><== ALWAYS TAKEN
msg_status = _Thread_Executing->Wait.return_code;
4c4c2: 2079 0006 ac46 moveal 6ac46 <_Per_CPU_Information+0xc>,%a0 4c4c8: 2428 0034 movel %a0@(52),%d2 4c4cc: 60ac bras 4c47a <_POSIX_Message_queue_Send_support+0x8e>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
4c4ce: 4eb9 0005 6b34 jsr 56b34 <__errno> 4c4d4: 72ff moveq #-1,%d1 4c4d6: 2040 moveal %d0,%a0 4c4d8: 7009 moveq #9,%d0
}
4c4da: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
4c4e0: 2080 movel %d0,%a0@
}
4c4e2: 2001 movel %d1,%d0 4c4e4: 4e5e unlk %fp 4c4e6: 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 );
4c4e8: 4eb9 0005 6b34 jsr 56b34 <__errno> 4c4ee: 7616 moveq #22,%d3 4c4f0: 72ff moveq #-1,%d1 4c4f2: 2040 moveal %d0,%a0
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
4c4f4: 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 );
4c4f6: 2083 movel %d3,%a0@
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
4c4f8: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 4c4fe: 4e5e unlk %fp 4c500: 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();
4c502: 4eb9 0005 05a4 jsr 505a4 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EBADF );
4c508: 7409 moveq #9,%d2 4c50a: 4eb9 0005 6b34 jsr 56b34 <__errno> 4c510: 72ff moveq #-1,%d1 4c512: 2040 moveal %d0,%a0
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
4c514: 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 );
4c516: 2082 movel %d2,%a0@
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
4c518: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 4c51e: 4e5e unlk %fp 4c520: 4e75 rts
msg_status = _Thread_Executing->Wait.return_code;
if ( !msg_status )
return msg_status;
rtems_set_errno_and_return_minus_one(
4c522: 4eb9 0005 6b34 jsr 56b34 <__errno> 4c528: 2440 moveal %d0,%a2 4c52a: 2f02 movel %d2,%sp@- 4c52c: 4eb9 0004 c65c jsr 4c65c <_POSIX_Message_queue_Translate_core_message_queue_return_code> 4c532: 588f addql #4,%sp 4c534: 72ff moveq #-1,%d1 4c536: 2480 movel %d0,%a2@
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
4c538: 2001 movel %d1,%d0 4c53a: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2
4c540: 4e5e unlk %fp <== NOT EXECUTED
0004c05c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>:
#include <rtems/posix/pthread.h>
void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(
Thread_Control *the_thread
)
{
4c05c: 4e56 0000 linkw %fp,#0 4c060: 226e 0008 moveal %fp@(8),%a1
POSIX_API_Control *thread_support;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
4c064: 2069 0102 moveal %a1@(258),%a0
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
4c068: 4aa8 00d8 tstl %a0@(216)
4c06c: 6608 bnes 4c076 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x1a><== NEVER TAKEN
4c06e: 7001 moveq #1,%d0 4c070: b0a8 00dc cmpl %a0@(220),%d0
4c074: 6708 beqs 4c07e <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x22>
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
} else
_Thread_Enable_dispatch();
}
4c076: 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();
4c078: 4ef9 0004 92d8 jmp 492d8 <_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 &&
4c07e: 4aa8 00e0 tstl %a0@(224)
4c082: 67f2 beqs 4c076 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x1a>
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
4c084: 2039 0006 14bc movel 614bc <_Thread_Dispatch_disable_level>,%d0
thread_support->cancelation_requested ) {
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
4c08a: 4878 ffff pea ffffffff <LESS> 4c08e: 5380 subql #1,%d0 4c090: 23c0 0006 14bc movel %d0,614bc <_Thread_Dispatch_disable_level>
return _Thread_Dispatch_disable_level;
4c096: 2039 0006 14bc movel 614bc <_Thread_Dispatch_disable_level>,%d0 4c09c: 2f09 movel %a1,%sp@- 4c09e: 4eb9 0004 c798 jsr 4c798 <_POSIX_Thread_Exit> 4c0a4: 508f addql #8,%sp
} else
_Thread_Enable_dispatch();
}
4c0a6: 4e5e unlk %fp
...
0004d6b0 <_POSIX_Thread_Translate_sched_param>:
int policy,
struct sched_param *param,
Thread_CPU_budget_algorithms *budget_algorithm,
Thread_CPU_budget_algorithm_callout *budget_callout
)
{
4d6b0: 4e56 ffe8 linkw %fp,#-24 4d6b4: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4d6b8: 246e 000c moveal %fp@(12),%a2
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
4d6bc: 47f9 0004 d68c lea 4d68c <_POSIX_Priority_Is_valid>,%a3 4d6c2: 2f12 movel %a2@,%sp@-
int policy,
struct sched_param *param,
Thread_CPU_budget_algorithms *budget_algorithm,
Thread_CPU_budget_algorithm_callout *budget_callout
)
{
4d6c4: 242e 0008 movel %fp@(8),%d2 4d6c8: 286e 0010 moveal %fp@(16),%a4 4d6cc: 2a6e 0014 moveal %fp@(20),%a5
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
4d6d0: 4e93 jsr %a3@ 4d6d2: 588f addql #4,%sp 4d6d4: 4a00 tstb %d0
4d6d6: 660c bnes 4d6e4 <_POSIX_Thread_Translate_sched_param+0x34><== ALWAYS TAKEN
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;
4d6d8: 7016 moveq #22,%d0
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
return 0;
}
return EINVAL;
}
4d6da: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4d6e0: 4e5e unlk %fp 4d6e2: 4e75 rts
)
{
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
4d6e4: 4294 clrl %a4@
*budget_callout = NULL;
4d6e6: 4295 clrl %a5@
if ( policy == SCHED_OTHER ) {
4d6e8: 4a82 tstl %d2
4d6ea: 676c beqs 4d758 <_POSIX_Thread_Translate_sched_param+0xa8>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
return 0;
}
if ( policy == SCHED_FIFO ) {
4d6ec: 7001 moveq #1,%d0 4d6ee: b082 cmpl %d2,%d0
4d6f0: 6776 beqs 4d768 <_POSIX_Thread_Translate_sched_param+0xb8>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
return 0;
}
if ( policy == SCHED_RR ) {
4d6f2: 103c 0002 moveb #2,%d0 4d6f6: b082 cmpl %d2,%d0
4d6f8: 677a beqs 4d774 <_POSIX_Thread_Translate_sched_param+0xc4>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
return 0;
}
if ( policy == SCHED_SPORADIC ) {
4d6fa: 7004 moveq #4,%d0 4d6fc: b082 cmpl %d2,%d0
4d6fe: 66d8 bnes 4d6d8 <_POSIX_Thread_Translate_sched_param+0x28>
if ( (param->sched_ss_repl_period.tv_sec == 0) &&
4d700: 4aaa 0008 tstl %a2@(8)
4d704: 6606 bnes 4d70c <_POSIX_Thread_Translate_sched_param+0x5c>
4d706: 4aaa 000c tstl %a2@(12)
4d70a: 67cc beqs 4d6d8 <_POSIX_Thread_Translate_sched_param+0x28>
(param->sched_ss_repl_period.tv_nsec == 0) )
return EINVAL;
if ( (param->sched_ss_init_budget.tv_sec == 0) &&
4d70c: 4aaa 0010 tstl %a2@(16)
4d710: 6606 bnes 4d718 <_POSIX_Thread_Translate_sched_param+0x68>
4d712: 4aaa 0014 tstl %a2@(20)
4d716: 67c0 beqs 4d6d8 <_POSIX_Thread_Translate_sched_param+0x28>
(param->sched_ss_init_budget.tv_nsec == 0) )
return EINVAL;
if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) <
4d718: 486a 0008 pea %a2@(8) 4d71c: 243c 0004 aeec movel #306924,%d2 4d722: 2042 moveal %d2,%a0 4d724: 4e90 jsr %a0@
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
4d726: 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 ) <
4d72a: 2600 movel %d0,%d3
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
4d72c: 2042 moveal %d2,%a0 4d72e: 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 ) <
4d730: 508f addql #8,%sp 4d732: b083 cmpl %d3,%d0
4d734: 62a2 bhis 4d6d8 <_POSIX_Thread_Translate_sched_param+0x28>
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
return EINVAL;
if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) )
4d736: 2f2a 0004 movel %a2@(4),%sp@- 4d73a: 4e93 jsr %a3@ 4d73c: 588f addql #4,%sp 4d73e: 4a00 tstb %d0
4d740: 6796 beqs 4d6d8 <_POSIX_Thread_Translate_sched_param+0x28>
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
4d742: 7003 moveq #3,%d0 4d744: 2880 movel %d0,%a4@
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
return 0;
4d746: 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;
4d748: 2abc 0004 726e movel #291438,%a5@
return 0;
}
return EINVAL;
}
4d74e: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4d754: 4e5e unlk %fp 4d756: 4e75 rts
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
*budget_callout = NULL;
if ( policy == SCHED_OTHER ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
4d758: 7401 moveq #1,%d2
return 0;
4d75a: 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;
4d75c: 2882 movel %d2,%a4@
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
return 0;
}
return EINVAL;
}
4d75e: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4d764: 4e5e unlk %fp 4d766: 4e75 rts
return 0;
}
if ( policy == SCHED_FIFO ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
return 0;
4d768: 4280 clrl %d0
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
return 0;
}
return EINVAL;
}
4d76a: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4d770: 4e5e unlk %fp 4d772: 4e75 rts
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
return 0;
}
if ( policy == SCHED_RR ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
4d774: 7202 moveq #2,%d1
return 0;
4d776: 4200 clrb %d0
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
return 0;
}
if ( policy == SCHED_RR ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
4d778: 2881 movel %d1,%a4@
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
return 0;
}
return EINVAL;
}
4d77a: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5
4d780: 4e5e unlk %fp <== NOT EXECUTED
0004c3aa <_POSIX_Threads_Delete_extension>:
*/
void _POSIX_Threads_Delete_extension(
Thread_Control *executing __attribute__((unused)),
Thread_Control *deleted
)
{
4c3aa: 4e56 ffec linkw %fp,#-20 4c3ae: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4c3b2: 266e 000c moveal %fp@(12),%a3 4c3b6: 45f9 0004 95a4 lea 495a4 <_Thread_queue_Dequeue>,%a2
api = deleted->API_Extensions[ THREAD_API_POSIX ];
/*
* Run the POSIX cancellation handlers
*/
_POSIX_Threads_cancel_run( deleted );
4c3bc: 2f0b movel %a3,%sp@-
{
Thread_Control *the_thread;
POSIX_API_Control *api;
void **value_ptr;
api = deleted->API_Extensions[ THREAD_API_POSIX ];
4c3be: 286b 0102 moveal %a3@(258),%a4 4c3c2: 240c movel %a4,%d2 4c3c4: 0682 0000 0044 addil #68,%d2
/*
* Run the POSIX cancellation handlers
*/
_POSIX_Threads_cancel_run( deleted );
4c3ca: 4eb9 0004 e650 jsr 4e650 <_POSIX_Threads_cancel_run>
/*
* Run all the key destructors
*/
_POSIX_Keys_Run_destructors( deleted );
4c3d0: 2f0b movel %a3,%sp@- 4c3d2: 4eb9 0004 e6bc jsr 4e6bc <_POSIX_Keys_Run_destructors>
/*
* Wakeup all the tasks which joined with this one
*/
value_ptr = (void **) deleted->Wait.return_argument;
4c3d8: 262b 0028 movel %a3@(40),%d3
while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
4c3dc: 508f addql #8,%sp 4c3de: 2f02 movel %d2,%sp@- 4c3e0: 4e92 jsr %a2@ 4c3e2: 588f addql #4,%sp 4c3e4: 4a80 tstl %d0
4c3e6: 6712 beqs 4c3fa <_POSIX_Threads_Delete_extension+0x50><== ALWAYS TAKEN
*(void **)the_thread->Wait.return_argument = value_ptr;
4c3e8: 2240 moveal %d0,%a1 <== NOT EXECUTED 4c3ea: 2069 0028 moveal %a1@(40),%a0 <== NOT EXECUTED 4c3ee: 2083 movel %d3,%a0@ <== NOT EXECUTED
/*
* Wakeup all the tasks which joined with this one
*/
value_ptr = (void **) deleted->Wait.return_argument;
while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
4c3f0: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4c3f2: 4e92 jsr %a2@ <== NOT EXECUTED 4c3f4: 588f addql #4,%sp <== NOT EXECUTED 4c3f6: 4a80 tstl %d0 <== NOT EXECUTED 4c3f8: 66ee bnes 4c3e8 <_POSIX_Threads_Delete_extension+0x3e><== NOT EXECUTED
*(void **)the_thread->Wait.return_argument = value_ptr;
if ( api->schedpolicy == SCHED_SPORADIC )
4c3fa: 103c 0004 moveb #4,%d0 4c3fe: b0ac 0084 cmpl %a4@(132),%d0
4c402: 6716 beqs 4c41a <_POSIX_Threads_Delete_extension+0x70>
(void) _Watchdog_Remove( &api->Sporadic_timer );
deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
4c404: 42ab 0102 clrl %a3@(258)
_Workspace_Free( api );
4c408: 2d4c 0008 movel %a4,%fp@(8)
}
4c40c: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 4c412: 4e5e unlk %fp
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
_Workspace_Free( api );
4c414: 4ef9 0004 a2fe jmp 4a2fe <_Workspace_Free>
while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
*(void **)the_thread->Wait.return_argument = value_ptr;
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
4c41a: 486c 00a8 pea %a4@(168) 4c41e: 4eb9 0004 a160 jsr 4a160 <_Watchdog_Remove> 4c424: 588f addql #4,%sp
deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
4c426: 42ab 0102 clrl %a3@(258)
_Workspace_Free( api );
4c42a: 2d4c 0008 movel %a4,%fp@(8)
}
4c42e: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 4c434: 4e5e unlk %fp
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
_Workspace_Free( api );
4c436: 4ef9 0004 a2fe jmp 4a2fe <_Workspace_Free>
00046efc <_POSIX_Threads_Initialize_user_threads_body>:
*
* Output parameters: NONE
*/
void _POSIX_Threads_Initialize_user_threads_body(void)
{
46efc: 4e56 ff98 linkw %fp,#-104 46f00: 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;
46f04: 2479 0006 07a4 moveal 607a4 <Configuration_POSIX_API+0x34>,%a2
maximum = Configuration_POSIX_API.number_of_initialization_threads;
46f0a: 2839 0006 07a0 movel 607a0 <Configuration_POSIX_API+0x30>,%d4
if ( !user_threads || maximum == 0 )
46f10: 4a8a tstl %a2
46f12: 675a beqs 46f6e <_POSIX_Threads_Initialize_user_threads_body+0x72><== NEVER TAKEN
46f14: 4a84 tstl %d4
46f16: 6756 beqs 46f6e <_POSIX_Threads_Initialize_user_threads_body+0x72><== NEVER TAKEN
46f18: 240e movel %fp,%d2 46f1a: 2a0e movel %fp,%d5 46f1c: 4283 clrl %d3 46f1e: 0682 ffff ffbc addil #-68,%d2 46f24: 2c3c 0004 d784 movel #317316,%d6 46f2a: 4bf9 0004 d7b0 lea 4d7b0 <pthread_attr_setinheritsched>,%a5 46f30: 49f9 0004 d7ec lea 4d7ec <pthread_attr_setstacksize>,%a4 46f36: 5985 subql #4,%d5 46f38: 47f9 0004 6af8 lea 46af8 <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 );
46f3e: 2f02 movel %d2,%sp@- 46f40: 2046 moveal %d6,%a0 46f42: 4e90 jsr %a0@
(void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
46f44: 4878 0002 pea 2 <DOUBLE_FLOAT> 46f48: 2f02 movel %d2,%sp@- 46f4a: 4e95 jsr %a5@
(void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size);
46f4c: 2f2a 0004 movel %a2@(4),%sp@- 46f50: 2f02 movel %d2,%sp@- 46f52: 4e94 jsr %a4@
status = pthread_create(
46f54: 42a7 clrl %sp@- 46f56: 2f12 movel %a2@,%sp@- 46f58: 2f02 movel %d2,%sp@- 46f5a: 2f05 movel %d5,%sp@- 46f5c: 4e93 jsr %a3@
&thread_id,
&attr,
user_threads[ index ].thread_entry,
NULL
);
if ( status )
46f5e: 4fef 0024 lea %sp@(36),%sp 46f62: 4a80 tstl %d0
46f64: 6612 bnes 46f78 <_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++ ) {
46f66: 5283 addql #1,%d3 46f68: 508a addql #8,%a2 46f6a: b684 cmpl %d4,%d3
46f6c: 66d0 bnes 46f3e <_POSIX_Threads_Initialize_user_threads_body+0x42><== NEVER TAKEN
NULL
);
if ( status )
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status );
}
}
46f6e: 4cee 3c7c ff98 moveml %fp@(-104),%d2-%d6/%a2-%a5 46f74: 4e5e unlk %fp 46f76: 4e75 rts
&attr,
user_threads[ index ].thread_entry,
NULL
);
if ( status )
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status );
46f78: 2f00 movel %d0,%sp@- 46f7a: 4878 0001 pea 1 <ADD> 46f7e: 4878 0002 pea 2 <DOUBLE_FLOAT> 46f82: 4eb9 0004 9098 jsr 49098 <_Internal_error_Occurred>
0004c5a6 <_POSIX_Threads_Sporadic_budget_TSR>:
*/
void _POSIX_Threads_Sporadic_budget_TSR(
Objects_Id id __attribute__((unused)),
void *argument
)
{
4c5a6: 4e56 fff4 linkw %fp,#-12 4c5aa: 48d7 1c00 moveml %a2-%a4,%sp@ 4c5ae: 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 );
4c5b2: 49f9 0004 d418 lea 4d418 <_Timespec_To_ticks>,%a4
Thread_Control *the_thread;
POSIX_API_Control *api;
the_thread = argument;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
4c5b8: 246b 0102 moveal %a3@(258),%a2
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget );
4c5bc: 486a 0098 pea %a2@(152) 4c5c0: 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 ) {
4c5c2: 588f addql #4,%sp
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
4c5c4: 4281 clrl %d1 4c5c6: 1239 0005 f6aa moveb 5f6aa <rtems_maximum_priority>,%d1 4c5cc: 92aa 0088 subl %a2@(136),%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;
4c5d0: 2740 0076 movel %d0,%a3@(118)
new_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority );
the_thread->real_priority = new_priority;
4c5d4: 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 ) {
4c5d8: 4aab 001c tstl %a3@(28)
4c5dc: 6606 bnes 4c5e4 <_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 ) {
4c5de: b2ab 0014 cmpl %a3@(20),%d1
4c5e2: 652c bcss 4c610 <_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 );
4c5e4: 486a 0090 pea %a2@(144) 4c5e8: 4e94 jsr %a4@
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
4c5ea: 588f addql #4,%sp
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
4c5ec: 2540 00b4 movel %d0,%a2@(180)
_Watchdog_Insert_ticks( &api->Sporadic_timer, ticks );
4c5f0: 45ea 00a8 lea %a2@(168),%a2
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
4c5f4: 203c 0006 1100 movel #397568,%d0 4c5fa: 2d4a 000c movel %a2,%fp@(12)
}
4c5fe: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4 4c604: 2d40 0008 movel %d0,%fp@(8) 4c608: 4e5e unlk %fp 4c60a: 4ef9 0004 a018 jmp 4a018 <_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 );
4c610: 4878 0001 pea 1 <ADD> 4c614: 2f01 movel %d1,%sp@- 4c616: 2f0b movel %a3,%sp@- 4c618: 4eb9 0004 8d38 jsr 48d38 <_Thread_Change_priority> 4c61e: 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 );
4c622: 486a 0090 pea %a2@(144) 4c626: 4e94 jsr %a4@ 4c628: 588f addql #4,%sp
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
4c62a: 2540 00b4 movel %d0,%a2@(180)
_Watchdog_Insert_ticks( &api->Sporadic_timer, ticks );
4c62e: 45ea 00a8 lea %a2@(168),%a2
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
4c632: 203c 0006 1100 movel #397568,%d0 4c638: 2d4a 000c movel %a2,%fp@(12)
}
4c63c: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4 4c642: 2d40 0008 movel %d0,%fp@(8) 4c646: 4e5e unlk %fp 4c648: 4ef9 0004 a018 jmp 4a018 <_Watchdog_Insert>
0004c64e <_POSIX_Threads_Sporadic_budget_callout>:
4c64e: 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 */
4c650: 72ff moveq #-1,%d1
* _POSIX_Threads_Sporadic_budget_callout
*/
void _POSIX_Threads_Sporadic_budget_callout(
Thread_Control *the_thread
)
{
4c652: 4e56 0000 linkw %fp,#0 4c656: 206e 0008 moveal %fp@(8),%a0 4c65a: 1039 0005 f6aa moveb 5f6aa <rtems_maximum_priority>,%d0
POSIX_API_Control *api;
uint32_t new_priority;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
4c660: 2268 0102 moveal %a0@(258),%a1 4c664: 90a9 008c subl %a1@(140),%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 */
4c668: 2141 0076 movel %d1,%a0@(118)
new_priority = _POSIX_Priority_To_core(api->schedparam.sched_ss_low_priority);
the_thread->real_priority = new_priority;
4c66c: 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 ) {
4c670: 4aa8 001c tstl %a0@(28)
4c674: 6606 bnes 4c67c <_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 ) {
4c676: b0a8 0014 cmpl %a0@(20),%d0
4c67a: 6204 bhis 4c680 <_POSIX_Threads_Sporadic_budget_callout+0x32><== ALWAYS TAKEN
#if 0
printk( "lower priority\n" );
#endif
}
}
}
4c67c: 4e5e unlk %fp <== NOT EXECUTED 4c67e: 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 );
4c680: 4878 0001 pea 1 <ADD> 4c684: 2f00 movel %d0,%sp@- 4c686: 2f08 movel %a0,%sp@- 4c688: 4eb9 0004 8d38 jsr 48d38 <_Thread_Change_priority> 4c68e: 4fef 000c lea %sp@(12),%sp
#if 0
printk( "lower priority\n" );
#endif
}
}
}
4c692: 4e5e unlk %fp <== NOT EXECUTED
0004e650 <_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;
4e650: 7001 moveq #1,%d0
#include <rtems/posix/threadsup.h>
void _POSIX_Threads_cancel_run(
Thread_Control *the_thread
)
{
4e652: 4e56 ffec linkw %fp,#-20 4e656: 206e 0008 moveal %fp@(8),%a0 4e65a: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%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 ];
4e65e: 2668 0102 moveal %a0@(258),%a3
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
4e662: 240b movel %a3,%d2 4e664: 0682 0000 00e8 addil #232,%d2
handler_stack = &thread_support->Cancellation_Handlers;
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
4e66a: 2740 00d8 movel %d0,%a3@(216)
while ( !_Chain_Is_empty( handler_stack ) ) {
4e66e: b4ab 00e4 cmpl %a3@(228),%d2
4e672: 673c beqs 4e6b0 <_POSIX_Threads_cancel_run+0x60>
4e674: 49f9 0004 a2fe lea 4a2fe <_Workspace_Free>,%a4
_ISR_Disable( level );
4e67a: 263c 0000 0700 movel #1792,%d3 4e680: 2003 movel %d3,%d0 4e682: 40c1 movew %sr,%d1 4e684: 8081 orl %d1,%d0 4e686: 46c0 movew %d0,%sr
handler = (POSIX_Cancel_Handler_control *)
4e688: 246b 00ec moveal %a3@(236),%a2
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
4e68c: 2252 moveal %a2@,%a1
previous = the_node->previous;
4e68e: 206a 0004 moveal %a2@(4),%a0
next->previous = previous;
4e692: 2348 0004 movel %a0,%a1@(4)
previous->next = next;
4e696: 2089 movel %a1,%a0@
_Chain_Tail( handler_stack )->previous;
_Chain_Extract_unprotected( &handler->Node );
_ISR_Enable( level );
4e698: 46c1 movew %d1,%sr
(*handler->routine)( handler->arg );
4e69a: 2f2a 000c movel %a2@(12),%sp@- 4e69e: 206a 0008 moveal %a2@(8),%a0 4e6a2: 4e90 jsr %a0@
_Workspace_Free( handler );
4e6a4: 2f0a movel %a2,%sp@- 4e6a6: 4e94 jsr %a4@
handler_stack = &thread_support->Cancellation_Handlers;
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
while ( !_Chain_Is_empty( handler_stack ) ) {
4e6a8: 508f addql #8,%sp 4e6aa: b4ab 00e4 cmpl %a3@(228),%d2
4e6ae: 66d0 bnes 4e680 <_POSIX_Threads_cancel_run+0x30> <== NEVER TAKEN
(*handler->routine)( handler->arg );
_Workspace_Free( handler );
}
}
4e6b0: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 4e6b6: 4e5e unlk %fp
...
000467d0 <_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)
{
467d0: 4e56 0000 linkw %fp,#0 467d4: 2f0a movel %a2,%sp@- 467d6: 246e 000c moveal %fp@(12),%a2
bool activated;
ptimer = (POSIX_Timer_Control *)data;
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
467da: 52aa 0066 addql #1,%a2@(102)
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
467de: 4aaa 0052 tstl %a2@(82)
467e2: 6606 bnes 467ea <_POSIX_Timer_TSR+0x1a>
467e4: 4aaa 0056 tstl %a2@(86)
467e8: 672a beqs 46814 <_POSIX_Timer_TSR+0x44> <== NEVER TAKEN
( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) {
activated = _POSIX_Timer_Insert_helper(
467ea: 2f0a movel %a2,%sp@- 467ec: 4879 0004 67d0 pea 467d0 <_POSIX_Timer_TSR> 467f2: 2f2a 0008 movel %a2@(8),%sp@- 467f6: 2f2a 0062 movel %a2@(98),%sp@- 467fa: 486a 0010 pea %a2@(16) 467fe: 4eb9 0004 ce90 jsr 4ce90 <_POSIX_Timer_Insert_helper>
ptimer->ticks,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated )
46804: 4fef 0014 lea %sp@(20),%sp 46808: 4a00 tstb %d0
4680a: 662a bnes 46836 <_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;
}
4680c: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 46810: 4e5e unlk %fp <== NOT EXECUTED 46812: 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;
46814: 7004 moveq #4,%d0 <== NOT EXECUTED 46816: 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 ) ) {
4681a: 2f2a 0042 movel %a2@(66),%sp@- <== NOT EXECUTED 4681e: 2f2a 0038 movel %a2@(56),%sp@- <== NOT EXECUTED 46822: 4eb9 0004 c9b4 jsr 4c9b4 <pthread_kill> <== NOT EXECUTED
}
/* After the signal handler returns, the count of expirations of the
* timer must be set to 0.
*/
ptimer->overrun = 0;
46828: 508f addql #8,%sp <== NOT EXECUTED 4682a: 42aa 0066 clrl %a2@(102) <== NOT EXECUTED
}
4682e: 246e fffc moveal %fp@(-4),%a2 46832: 4e5e unlk %fp 46834: 4e75 rts
);
if ( !activated )
return;
/* Store the time when the timer was started again */
_TOD_Get( &ptimer->time );
46836: 486a 006a pea %a2@(106) 4683a: 4eb9 0004 800c jsr 4800c <_TOD_Get>
/* The state really did not change but just to be safe */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
46840: 588f addql #4,%sp 46842: 7003 moveq #3,%d0 46844: 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 ) ) {
46848: 2f2a 0042 movel %a2@(66),%sp@- 4684c: 2f2a 0038 movel %a2@(56),%sp@- 46850: 4eb9 0004 c9b4 jsr 4c9b4 <pthread_kill>
}
/* After the signal handler returns, the count of expirations of the
* timer must be set to 0.
*/
ptimer->overrun = 0;
46856: 508f addql #8,%sp 46858: 42aa 0066 clrl %a2@(102) 4685c: 60d0 bras 4682e <_POSIX_Timer_TSR+0x5e>
...
0004f004 <_POSIX_signals_Clear_process_signals>:
clear_signal = true;
mask = signo_to_mask( signo );
ISR_Level level;
_ISR_Disable( level );
4f004: 203c 0000 0700 movel #1792,%d0
*/
void _POSIX_signals_Clear_process_signals(
int signo
)
{
4f00a: 4e56 0000 linkw %fp,#0 4f00e: 222e 0008 movel %fp@(8),%d1 4f012: 2f03 movel %d3,%sp@- 4f014: 2f02 movel %d2,%sp@-
clear_signal = true;
mask = signo_to_mask( signo );
ISR_Level level;
_ISR_Disable( level );
4f016: 40c2 movew %sr,%d2 4f018: 8082 orl %d2,%d0 4f01a: 46c0 movew %d0,%sr
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
4f01c: 2601 movel %d1,%d3 4f01e: 2001 movel %d1,%d0 4f020: 41f9 0006 14e4 lea 614e4 <_POSIX_signals_Vectors>,%a0 4f026: e58b lsll #2,%d3 4f028: e988 lsll #4,%d0 4f02a: 9083 subl %d3,%d0 4f02c: 7602 moveq #2,%d3 4f02e: b6b0 0800 cmpl %a0@(00000000,%d0:l),%d3
4f032: 6718 beqs 4f04c <_POSIX_signals_Clear_process_signals+0x48>
4f034: 5381 subql #1,%d1 4f036: 7001 moveq #1,%d0 4f038: e3a8 lsll %d1,%d0
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
clear_signal = false;
}
if ( clear_signal ) {
_POSIX_signals_Pending &= ~mask;
4f03a: 4680 notl %d0 4f03c: c1b9 0006 16d8 andl %d0,616d8 <_POSIX_signals_Pending>
}
_ISR_Enable( level );
4f042: 46c2 movew %d2,%sr
}
4f044: 241f movel %sp@+,%d2 4f046: 261f movel %sp@+,%d3 4f048: 4e5e unlk %fp 4f04a: 4e75 rts
ISR_Level level;
_ISR_Disable( level );
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
4f04c: 0680 0006 16dc addil #399068,%d0
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
4f052: 2040 moveal %d0,%a0 4f054: 5888 addql #4,%a0 4f056: 2240 moveal %d0,%a1 4f058: b1d1 cmpal %a1@,%a0
4f05a: 67d8 beqs 4f034 <_POSIX_signals_Clear_process_signals+0x30><== ALWAYS TAKEN
clear_signal = false;
}
if ( clear_signal ) {
_POSIX_signals_Pending &= ~mask;
}
_ISR_Enable( level );
4f05c: 46c2 movew %d2,%sr <== NOT EXECUTED
}
4f05e: 241f movel %sp@+,%d2 <== NOT EXECUTED 4f060: 261f movel %sp@+,%d3 <== NOT EXECUTED 4f062: 4e5e unlk %fp <== NOT EXECUTED
...
000475f4 <_POSIX_signals_Get_lowest>:
sigset_t set
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
475f4: 701b moveq #27,%d0
#include <rtems/score/isr.h>
int _POSIX_signals_Get_lowest(
sigset_t set
)
{
475f6: 4e56 fff4 linkw %fp,#-12 475fa: 48d7 001c moveml %d2-%d4,%sp@ 475fe: 242e 0008 movel %fp@(8),%d2 47602: 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_lowest(
47604: 2200 movel %d0,%d1 47606: 5381 subql #1,%d1 47608: 2803 movel %d3,%d4 4760a: e3ac lsll %d1,%d4 4760c: 2204 movel %d4,%d1
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
if ( set & signo_to_mask( signo ) ) {
4760e: c282 andl %d2,%d1
47610: 6626 bnes 47638 <_POSIX_signals_Get_lowest+0x44> <== NEVER TAKEN
sigset_t set
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
47612: 5280 addql #1,%d0 47614: 123c 0020 moveb #32,%d1 47618: b280 cmpl %d0,%d1
4761a: 66e8 bnes 47604 <_POSIX_signals_Get_lowest+0x10>
4761c: 7001 moveq #1,%d0 4761e: 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_lowest(
47620: 2200 movel %d0,%d1 47622: 5381 subql #1,%d1 47624: 2803 movel %d3,%d4 47626: e3ac lsll %d1,%d4 47628: 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 ) ) {
4762a: c282 andl %d2,%d1
4762c: 660a bnes 47638 <_POSIX_signals_Get_lowest+0x44>
*/
#if (SIGHUP != 1)
#error "Assumption that SIGHUP==1 violated!!"
#endif
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
4762e: 5280 addql #1,%d0 47630: 123c 001b moveb #27,%d1 47634: b280 cmpl %d0,%d1
47636: 66e8 bnes 47620 <_POSIX_signals_Get_lowest+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; }
47638: 4cd7 001c moveml %sp@,%d2-%d4
4763c: 4e5e unlk %fp <== NOT EXECUTED
0004c13a <_POSIX_signals_Post_switch_extension>:
*/
void _POSIX_signals_Post_switch_extension(
Thread_Control *the_thread
)
{
4c13a: 4e56 ffec linkw %fp,#-20 4c13e: 206e 0008 moveal %fp@(8),%a0 4c142: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@
POSIX_API_Control *api;
int signo;
ISR_Level level;
int hold_errno;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
4c146: 2468 0102 moveal %a0@(258),%a2
/*
* We need to ensure that if the signal handler executes a call
* which overwrites the unblocking status, we restore it.
*/
hold_errno = _Thread_Executing->Wait.return_code;
4c14a: 2079 0006 14aa moveal 614aa <_Per_CPU_Information+0xc>,%a0 4c150: 2828 0034 movel %a0@(52),%d4
/*
* api may be NULL in case of a thread close in progress
*/
if ( !api )
4c154: 4a8a tstl %a2 4c156: 6700 0098 beqw 4c1f0 <_POSIX_signals_Post_switch_extension+0xb6>
*
* 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 );
4c15a: 263c 0000 0700 movel #1792,%d3 4c160: 47f9 0004 e748 lea 4e748 <_POSIX_signals_Check_signal>,%a3 4c166: 2003 movel %d3,%d0 4c168: 40c1 movew %sr,%d1 4c16a: 8081 orl %d1,%d0 4c16c: 46c0 movew %d0,%sr
if ( !(~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending)) ) {
4c16e: 2039 0006 16d8 movel 616d8 <_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 &
4c174: 242a 00d0 movel %a2@(208),%d2 4c178: 4682 notl %d2
(api->signals_pending | _POSIX_signals_Pending)) ) {
4c17a: 80aa 00d4 orl %a2@(212),%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 &
4c17e: c082 andl %d2,%d0
(api->signals_pending | _POSIX_signals_Pending)) ) {
_ISR_Enable( level );
4c180: 46c1 movew %d1,%sr
* 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 &
4c182: 4a80 tstl %d0
4c184: 6760 beqs 4c1e6 <_POSIX_signals_Post_switch_extension+0xac>
_ISR_Enable( level );
break;
}
_ISR_Enable( level );
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
4c186: 741b moveq #27,%d2
_POSIX_signals_Check_signal( api, signo, false );
4c188: 42a7 clrl %sp@- 4c18a: 2f02 movel %d2,%sp@- 4c18c: 2f0a movel %a2,%sp@- 4c18e: 4e93 jsr %a3@
_POSIX_signals_Check_signal( api, signo, true );
4c190: 4878 0001 pea 1 <ADD> 4c194: 2f02 movel %d2,%sp@-
_ISR_Enable( level );
break;
}
_ISR_Enable( level );
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
4c196: 5282 addql #1,%d2
_POSIX_signals_Check_signal( api, signo, false );
_POSIX_signals_Check_signal( api, signo, true );
4c198: 2f0a movel %a2,%sp@- 4c19a: 4e93 jsr %a3@
_ISR_Enable( level );
break;
}
_ISR_Enable( level );
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
4c19c: 4fef 0018 lea %sp@(24),%sp 4c1a0: 7020 moveq #32,%d0 4c1a2: b082 cmpl %d2,%d0
4c1a4: 66e2 bnes 4c188 <_POSIX_signals_Post_switch_extension+0x4e>
4c1a6: 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 );
4c1a8: 42a7 clrl %sp@- 4c1aa: 2f02 movel %d2,%sp@- 4c1ac: 2f0a movel %a2,%sp@- 4c1ae: 4e93 jsr %a3@
_POSIX_signals_Check_signal( api, signo, true );
4c1b0: 4878 0001 pea 1 <ADD> 4c1b4: 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++ ) {
4c1b6: 5282 addql #1,%d2
_POSIX_signals_Check_signal( api, signo, false );
_POSIX_signals_Check_signal( api, signo, true );
4c1b8: 2f0a movel %a2,%sp@- 4c1ba: 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++ ) {
4c1bc: 4fef 0018 lea %sp@(24),%sp 4c1c0: 701b moveq #27,%d0 4c1c2: b082 cmpl %d2,%d0
4c1c4: 67a0 beqs 4c166 <_POSIX_signals_Post_switch_extension+0x2c><== NEVER TAKEN
_POSIX_signals_Check_signal( api, signo, false );
4c1c6: 42a7 clrl %sp@- 4c1c8: 2f02 movel %d2,%sp@- 4c1ca: 2f0a movel %a2,%sp@- 4c1cc: 4e93 jsr %a3@
_POSIX_signals_Check_signal( api, signo, true );
4c1ce: 4878 0001 pea 1 <ADD> 4c1d2: 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++ ) {
4c1d4: 5282 addql #1,%d2
_POSIX_signals_Check_signal( api, signo, false );
_POSIX_signals_Check_signal( api, signo, true );
4c1d6: 2f0a movel %a2,%sp@- 4c1d8: 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++ ) {
4c1da: 4fef 0018 lea %sp@(24),%sp 4c1de: 701b moveq #27,%d0 4c1e0: b082 cmpl %d2,%d0
4c1e2: 66c4 bnes 4c1a8 <_POSIX_signals_Post_switch_extension+0x6e>
4c1e4: 6080 bras 4c166 <_POSIX_signals_Post_switch_extension+0x2c>
_POSIX_signals_Check_signal( api, signo, false );
_POSIX_signals_Check_signal( api, signo, true );
}
}
_Thread_Executing->Wait.return_code = hold_errno;
4c1e6: 2079 0006 14aa moveal 614aa <_Per_CPU_Information+0xc>,%a0 4c1ec: 2144 0034 movel %d4,%a0@(52)
}
4c1f0: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3
4c1f6: 4e5e unlk %fp <== NOT EXECUTED
0005d2c0 <_POSIX_signals_Unblock_thread>:
5d2c0: 7001 moveq #1,%d0
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
)
{
5d2c2: 4e56 ffec linkw %fp,#-20 5d2c6: 206e 000c moveal %fp@(12),%a0 5d2ca: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 5d2ce: 246e 0008 moveal %fp@(8),%a2 5d2d2: 2608 movel %a0,%d3 5d2d4: 5383 subql #1,%d3
/*
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
5d2d6: 222a 0010 movel %a2@(16),%d1 5d2da: 2401 movel %d1,%d2 5d2dc: 0282 1000 8000 andil #268468224,%d2
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
)
{
5d2e2: 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 ];
5d2e6: 226a 0102 moveal %a2@(258),%a1 5d2ea: e7a8 lsll %d3,%d0
/*
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
5d2ec: 0c82 1000 8000 cmpil #268468224,%d2
5d2f2: 6770 beqs 5d364 <_POSIX_signals_Unblock_thread+0xa4>
}
/*
* Thread is not waiting due to a sigwait.
*/
if ( ~api->signals_blocked & mask ) {
5d2f4: 2429 00d0 movel %a1@(208),%d2 5d2f8: 4682 notl %d2 5d2fa: c082 andl %d2,%d0
5d2fc: 675a beqs 5d358 <_POSIX_signals_Unblock_thread+0x98>
* it is not blocked, THEN
* we need to dispatch at the end of this ISR.
* + Any other combination, do nothing.
*/
if ( _States_Is_interruptible_by_signal( the_thread->current_state ) ) {
5d2fe: 0801 001c btst #28,%d1
5d302: 673e beqs 5d342 <_POSIX_signals_Unblock_thread+0x82>
the_thread->Wait.return_code = EINTR;
5d304: 7004 moveq #4,%d0 5d306: 2540 0034 movel %d0,%a2@(52)
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue (
States_Control the_states
)
{
return (the_states & STATES_WAITING_ON_THREAD_QUEUE);
5d30a: 2001 movel %d1,%d0 5d30c: 0280 0003 bee0 andil #245472,%d0
/*
* In pthread_cond_wait, a thread will be blocking on a thread
* queue, but is also interruptible by a POSIX signal.
*/
if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) )
5d312: 6600 00a0 bnew 5d3b4 <_POSIX_signals_Unblock_thread+0xf4>
_Thread_queue_Extract_with_proxy( the_thread );
else if ( _States_Is_delaying(the_thread->current_state) ) {
5d316: 44c1 movew %d1,%ccr
5d318: 6a3e bpls 5d358 <_POSIX_signals_Unblock_thread+0x98><== NEVER TAKEN
(void) _Watchdog_Remove( &the_thread->Timer );
5d31a: 486a 0048 pea %a2@(72) 5d31e: 4eb9 0004 a160 jsr 4a160 <_Watchdog_Remove>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
5d324: 2f3c 1003 fff8 movel #268697592,%sp@- 5d32a: 2f0a movel %a2,%sp@- 5d32c: 4eb9 0004 8e1c jsr 48e1c <_Thread_Clear_state> 5d332: 4fef 000c lea %sp@(12),%sp
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
}
}
return false;
}
5d336: 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 ) )
_Thread_Dispatch_necessary = true;
}
}
return false;
5d33c: 4200 clrb %d0
}
5d33e: 4e5e unlk %fp 5d340: 4e75 rts
else if ( _States_Is_delaying(the_thread->current_state) ) {
(void) _Watchdog_Remove( &the_thread->Timer );
_Thread_Unblock( the_thread );
}
} else if ( the_thread->current_state == STATES_READY ) {
5d342: 4a81 tstl %d1
5d344: 6612 bnes 5d358 <_POSIX_signals_Unblock_thread+0x98><== NEVER TAKEN
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
5d346: 4ab9 0006 14a6 tstl 614a6 <_Per_CPU_Information+0x8>
5d34c: 670a beqs 5d358 <_POSIX_signals_Unblock_thread+0x98>
5d34e: b5f9 0006 14aa cmpal 614aa <_Per_CPU_Information+0xc>,%a2 5d354: 6700 0090 beqw 5d3e6 <_POSIX_signals_Unblock_thread+0x126>
_Thread_Dispatch_necessary = true;
}
}
return false;
}
5d358: 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 ) )
_Thread_Dispatch_necessary = true;
}
}
return false;
5d35e: 4200 clrb %d0
}
5d360: 4e5e unlk %fp 5d362: 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) ) {
5d364: 2200 movel %d0,%d1 5d366: c2aa 0030 andl %a2@(48),%d1
5d36a: 672e beqs 5d39a <_POSIX_signals_Unblock_thread+0xda>
the_thread->Wait.return_code = EINTR;
5d36c: 7004 moveq #4,%d0
the_info = (siginfo_t *) the_thread->Wait.return_argument;
5d36e: 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;
5d372: 2540 0034 movel %d0,%a2@(52)
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
5d376: 4a84 tstl %d4
5d378: 6750 beqs 5d3ca <_POSIX_signals_Unblock_thread+0x10a>
the_info->si_signo = signo;
the_info->si_code = SI_USER;
the_info->si_value.sival_int = 0;
} else {
*the_info = *info;
5d37a: 2244 moveal %d4,%a1 5d37c: 204b moveal %a3,%a0 5d37e: 20d9 movel %a1@+,%a0@+ 5d380: 20d9 movel %a1@+,%a0@+ 5d382: 2091 movel %a1@,%a0@
}
_Thread_queue_Extract_with_proxy( the_thread );
5d384: 2f0a movel %a2,%sp@- 5d386: 4eb9 0004 9934 jsr 49934 <_Thread_queue_Extract_with_proxy>
return true;
5d38c: 588f addql #4,%sp 5d38e: 7001 moveq #1,%d0
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
}
}
return false;
}
5d390: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 5d396: 4e5e unlk %fp 5d398: 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) ) {
5d39a: 2229 00d0 movel %a1@(208),%d1 5d39e: 4681 notl %d1 5d3a0: c081 andl %d1,%d0
5d3a2: 67b4 beqs 5d358 <_POSIX_signals_Unblock_thread+0x98>
the_thread->Wait.return_code = EINTR;
5d3a4: 7004 moveq #4,%d0
the_info = (siginfo_t *) the_thread->Wait.return_argument;
5d3a6: 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;
5d3aa: 2540 0034 movel %d0,%a2@(52)
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
5d3ae: 4a84 tstl %d4
5d3b0: 66c8 bnes 5d37a <_POSIX_signals_Unblock_thread+0xba><== ALWAYS TAKEN
5d3b2: 6016 bras 5d3ca <_POSIX_signals_Unblock_thread+0x10a><== NOT EXECUTED
/*
* In pthread_cond_wait, a thread will be blocking on a thread
* queue, but is also interruptible by a POSIX signal.
*/
if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) )
_Thread_queue_Extract_with_proxy( the_thread );
5d3b4: 2f0a movel %a2,%sp@- 5d3b6: 4eb9 0004 9934 jsr 49934 <_Thread_queue_Extract_with_proxy> 5d3bc: 588f addql #4,%sp
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
}
}
return false;
}
5d3be: 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 ) )
_Thread_Dispatch_necessary = true;
}
}
return false;
5d3c4: 4200 clrb %d0
}
5d3c6: 4e5e unlk %fp 5d3c8: 4e75 rts
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
the_info->si_signo = signo;
the_info->si_code = SI_USER;
5d3ca: 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;
5d3ce: 2688 movel %a0,%a3@
the_info->si_code = SI_USER;
5d3d0: 2740 0004 movel %d0,%a3@(4)
the_info->si_value.sival_int = 0;
5d3d4: 42ab 0008 clrl %a3@(8)
} else {
*the_info = *info;
}
_Thread_queue_Extract_with_proxy( the_thread );
5d3d8: 2f0a movel %a2,%sp@- 5d3da: 4eb9 0004 9934 jsr 49934 <_Thread_queue_Extract_with_proxy>
return true;
5d3e0: 588f addql #4,%sp 5d3e2: 7001 moveq #1,%d0 5d3e4: 60aa bras 5d390 <_POSIX_signals_Unblock_thread+0xd0>
_Thread_Unblock( the_thread );
}
} else if ( the_thread->current_state == STATES_READY ) {
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
5d3e6: 7001 moveq #1,%d0
}
}
return false;
}
5d3e8: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 5d3ee: 4e5e unlk %fp
_Thread_Unblock( the_thread );
}
} else if ( the_thread->current_state == STATES_READY ) {
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
5d3f0: 13c0 0006 14b6 moveb %d0,614b6 <_Per_CPU_Information+0x18>
}
}
return false;
5d3f6: 4200 clrb %d0
}
...
0004d5b0 <_Protected_heap_Walk>:
bool _Protected_heap_Walk(
Heap_Control *the_heap,
int source,
bool do_dump
)
{
4d5b0: 4e56 fff0 linkw %fp,#-16
* This routine returns true if thread dispatch indicates
* that we are in a critical section.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Dispatch_in_critical_section(void)
{
if ( _Thread_Dispatch_disable_level == 0 )
4d5b4: 2039 0006 7254 movel 67254 <_Thread_Dispatch_disable_level>,%d0 4d5ba: 48d7 001c moveml %d2-%d4,%sp@ 4d5be: 242e 0008 movel %fp@(8),%d2 4d5c2: 282e 000c movel %fp@(12),%d4 4d5c6: 162e 0013 moveb %fp@(19),%d3 4d5ca: 4a80 tstl %d0
4d5cc: 6640 bnes 4d60e <_Protected_heap_Walk+0x5e>
* a critical section, it should be safe to walk it unlocked.
*
* NOTE: Dispatching is also disabled during initialization.
*/
if ( _Thread_Dispatch_in_critical_section() == false ) {
_RTEMS_Lock_allocator();
4d5ce: 2f39 0006 72f4 movel 672f4 <_RTEMS_Allocator_Mutex>,%sp@-
status = _Heap_Walk( the_heap, source, do_dump );
4d5d4: 0283 0000 00ff andil #255,%d3
* a critical section, it should be safe to walk it unlocked.
*
* NOTE: Dispatching is also disabled during initialization.
*/
if ( _Thread_Dispatch_in_critical_section() == false ) {
_RTEMS_Lock_allocator();
4d5da: 4eb9 0004 b7d0 jsr 4b7d0 <_API_Mutex_Lock>
status = _Heap_Walk( the_heap, source, do_dump );
4d5e0: 2f03 movel %d3,%sp@- 4d5e2: 2f04 movel %d4,%sp@- 4d5e4: 2f02 movel %d2,%sp@- 4d5e6: 4eb9 0004 c69e jsr 4c69e <_Heap_Walk>
_RTEMS_Unlock_allocator();
4d5ec: 2f39 0006 72f4 movel 672f4 <_RTEMS_Allocator_Mutex>,%sp@- 4d5f2: 2d40 fffc movel %d0,%fp@(-4) 4d5f6: 4eb9 0004 b830 jsr 4b830 <_API_Mutex_Unlock>
} else {
status = _Heap_Walk( the_heap, source, do_dump );
}
return status;
}
4d5fc: 202e fffc movel %fp@(-4),%d0
* NOTE: Dispatching is also disabled during initialization.
*/
if ( _Thread_Dispatch_in_critical_section() == false ) {
_RTEMS_Lock_allocator();
status = _Heap_Walk( the_heap, source, do_dump );
_RTEMS_Unlock_allocator();
4d600: 4fef 0014 lea %sp@(20),%sp
} else {
status = _Heap_Walk( the_heap, source, do_dump );
}
return status;
}
4d604: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 4d60a: 4e5e unlk %fp 4d60c: 4e75 rts
if ( _Thread_Dispatch_in_critical_section() == false ) {
_RTEMS_Lock_allocator();
status = _Heap_Walk( the_heap, source, do_dump );
_RTEMS_Unlock_allocator();
} else {
status = _Heap_Walk( the_heap, source, do_dump );
4d60e: 2d44 000c movel %d4,%fp@(12) 4d612: 0283 0000 00ff andil #255,%d3 4d618: 2d42 0008 movel %d2,%fp@(8) 4d61c: 2d43 0010 movel %d3,%fp@(16)
} return status; }
4d620: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 4d626: 4e5e unlk %fp
if ( _Thread_Dispatch_in_critical_section() == false ) {
_RTEMS_Lock_allocator();
status = _Heap_Walk( the_heap, source, do_dump );
_RTEMS_Unlock_allocator();
} else {
status = _Heap_Walk( the_heap, source, do_dump );
4d628: 4ef9 0004 c69e jmp 4c69e <_Heap_Walk>
...
0004dd38 <_RBTree_Extract_unprotected>:
*/
void _RBTree_Extract_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
4dd38: 4e56 ffec linkw %fp,#-20 4dd3c: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 4dd40: 2a6e 0008 moveal %fp@(8),%a5 4dd44: 266e 000c moveal %fp@(12),%a3
RBTree_Node *leaf, *target;
RBTree_Color victim_color;
RBTree_Direction dir;
if (!the_node) return;
4dd48: 4a8b tstl %a3 4dd4a: 6700 00b0 beqw 4ddfc <_RBTree_Extract_unprotected+0xc4>
/* check if min needs to be updated */
if (the_node == the_rbtree->first[RBT_LEFT]) {
4dd4e: b7ed 0008 cmpal %a5@(8),%a3 4dd52: 6700 00f6 beqw 4de4a <_RBTree_Extract_unprotected+0x112>
the_rbtree->first[RBT_LEFT]))
the_rbtree->first[RBT_LEFT] = NULL;
}
}
/* check if max needs to be updated: note, min can equal max (1 element) */
if (the_node == the_rbtree->first[RBT_RIGHT]) {
4dd56: b7ed 000c cmpal %a5@(12),%a3 4dd5a: 6700 00aa beqw 4de06 <_RBTree_Extract_unprotected+0xce>
* either max in node->child[RBT_LEFT] or min in node->child[RBT_RIGHT],
* and replace the_node with the target node. This maintains the binary
* search tree property, but may violate the red-black properties.
*/
if (the_node->child[RBT_LEFT] && the_node->child[RBT_RIGHT]) {
4dd5e: 246b 0004 moveal %a3@(4),%a2 4dd62: 4a8a tstl %a2 4dd64: 6700 00b6 beqw 4de1c <_RBTree_Extract_unprotected+0xe4> 4dd68: 4aab 0008 tstl %a3@(8) 4dd6c: 6700 00f0 beqw 4de5e <_RBTree_Extract_unprotected+0x126>
target = the_node->child[RBT_LEFT]; /* find max in node->child[RBT_LEFT] */
while (target->child[RBT_RIGHT]) target = target->child[RBT_RIGHT];
4dd70: 202a 0008 movel %a2@(8),%d0
4dd74: 6708 beqs 4dd7e <_RBTree_Extract_unprotected+0x46>
4dd76: 2440 moveal %d0,%a2 4dd78: 202a 0008 movel %a2@(8),%d0
4dd7c: 66f8 bnes 4dd76 <_RBTree_Extract_unprotected+0x3e>
* target's position (target is the right child of target->parent)
* when target vacates it. if there is no child, then target->parent
* should become NULL. This may cause the coloring to be violated.
* For now we store the color of the node being deleted in victim_color.
*/
leaf = target->child[RBT_LEFT];
4dd7e: 286a 0004 moveal %a2@(4),%a4
if(leaf) {
4dd82: 4a8c tstl %a4 4dd84: 6700 00f4 beqw 4de7a <_RBTree_Extract_unprotected+0x142>
leaf->parent = target->parent;
4dd88: 2892 movel %a2@,%a4@
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(target);
}
victim_color = target->color;
dir = target != target->parent->child[0];
4dd8a: 2252 moveal %a2@,%a1 4dd8c: b5e9 0004 cmpal %a1@(4),%a2 4dd90: 56c0 sne %d0
target->parent->child[dir] = leaf;
4dd92: 7201 moveq #1,%d1
/* now replace the_node with target */
dir = the_node != the_node->parent->child[0];
the_node->parent->child[dir] = target;
4dd94: 7401 moveq #1,%d2
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(target);
}
victim_color = target->color;
dir = target != target->parent->child[0];
4dd96: 49c0 extbl %d0
target->parent->child[dir] = leaf;
4dd98: 9280 subl %d0,%d1
/* now replace the_node with target */
dir = the_node != the_node->parent->child[0];
4dd9a: 2053 moveal %a3@,%a0
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(target);
}
victim_color = target->color;
dir = target != target->parent->child[0];
target->parent->child[dir] = leaf;
4dd9c: 238c 1c00 movel %a4,%a1@(00000000,%d1:l:4)
/* now replace the_node with target */
dir = the_node != the_node->parent->child[0];
4dda0: b7e8 0004 cmpal %a0@(4),%a3 4dda4: 56c1 sne %d1
leaf->parent = target->parent;
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(target);
}
victim_color = target->color;
4dda6: 202a 000c movel %a2@(12),%d0
dir = target != target->parent->child[0];
target->parent->child[dir] = leaf;
/* now replace the_node with target */
dir = the_node != the_node->parent->child[0];
4ddaa: 49c1 extbl %d1
the_node->parent->child[dir] = target;
4ddac: 9481 subl %d1,%d2 4ddae: 218a 2c00 movel %a2,%a0@(00000000,%d2:l:4)
/* set target's new children to the original node's children */
target->child[RBT_RIGHT] = the_node->child[RBT_RIGHT];
4ddb2: 256b 0008 0008 movel %a3@(8),%a2@(8)
if (the_node->child[RBT_RIGHT])
4ddb8: 206b 0008 moveal %a3@(8),%a0 4ddbc: 4a88 tstl %a0
4ddbe: 6702 beqs 4ddc2 <_RBTree_Extract_unprotected+0x8a><== NEVER TAKEN
the_node->child[RBT_RIGHT]->parent = target;
4ddc0: 208a movel %a2,%a0@
target->child[RBT_LEFT] = the_node->child[RBT_LEFT];
4ddc2: 256b 0004 0004 movel %a3@(4),%a2@(4)
if (the_node->child[RBT_LEFT])
4ddc8: 206b 0004 moveal %a3@(4),%a0 4ddcc: 4a88 tstl %a0
4ddce: 6702 beqs 4ddd2 <_RBTree_Extract_unprotected+0x9a>
the_node->child[RBT_LEFT]->parent = target;
4ddd0: 208a movel %a2,%a0@
/* finally, update the parent node and recolor. target has completely
* replaced the_node, and target's child has moved up the tree if needed.
* the_node is no longer part of the tree, although it has valid pointers
* still.
*/
target->parent = the_node->parent;
4ddd2: 2493 movel %a3@,%a2@
target->color = the_node->color;
4ddd4: 256b 000c 000c movel %a3@(12),%a2@(12)
/* fix coloring. leaf has moved up the tree. The color of the deleted
* node is in victim_color. There are two cases:
* 1. Deleted a red node, its child must be black. Nothing must be done.
* 2. Deleted a black node, its child must be red. Paint child black.
*/
if (victim_color == RBT_BLACK) { /* eliminate case 1 */
4ddda: 4a80 tstl %d0
4dddc: 6608 bnes 4dde6 <_RBTree_Extract_unprotected+0xae>
if (leaf) {
4ddde: 4a8c tstl %a4
4dde0: 6704 beqs 4dde6 <_RBTree_Extract_unprotected+0xae>
leaf->color = RBT_BLACK; /* case 2 */
4dde2: 42ac 000c clrl %a4@(12)
/* Wipe the_node */
_RBTree_Set_off_rbtree(the_node);
/* set root to black, if it exists */
if (the_rbtree->root) the_rbtree->root->color = RBT_BLACK;
4dde6: 206d 0004 moveal %a5@(4),%a0
*/
RTEMS_INLINE_ROUTINE void _RBTree_Set_off_rbtree(
RBTree_Node *node
)
{
node->parent = node->child[RBT_LEFT] = node->child[RBT_RIGHT] = NULL;
4ddea: 42ab 0008 clrl %a3@(8) 4ddee: 42ab 0004 clrl %a3@(4) 4ddf2: 4293 clrl %a3@ 4ddf4: 4a88 tstl %a0
4ddf6: 6704 beqs 4ddfc <_RBTree_Extract_unprotected+0xc4>
4ddf8: 42a8 000c clrl %a0@(12)
}
4ddfc: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4de02: 4e5e unlk %fp 4de04: 4e75 rts
the_rbtree->first[RBT_LEFT] = NULL;
}
}
/* check if max needs to be updated: note, min can equal max (1 element) */
if (the_node == the_rbtree->first[RBT_RIGHT]) {
if (the_node->child[RBT_LEFT])
4de06: 202b 0004 movel %a3@(4),%d0 4de0a: 6700 0098 beqw 4dea4 <_RBTree_Extract_unprotected+0x16c>
* either max in node->child[RBT_LEFT] or min in node->child[RBT_RIGHT],
* and replace the_node with the target node. This maintains the binary
* search tree property, but may violate the red-black properties.
*/
if (the_node->child[RBT_LEFT] && the_node->child[RBT_RIGHT]) {
4de0e: 246b 0004 moveal %a3@(4),%a2
}
}
/* check if max needs to be updated: note, min can equal max (1 element) */
if (the_node == the_rbtree->first[RBT_RIGHT]) {
if (the_node->child[RBT_LEFT])
the_rbtree->first[RBT_RIGHT] = the_node->child[RBT_LEFT];
4de12: 2b40 000c movel %d0,%a5@(12)
* either max in node->child[RBT_LEFT] or min in node->child[RBT_RIGHT],
* and replace the_node with the target node. This maintains the binary
* search tree property, but may violate the red-black properties.
*/
if (the_node->child[RBT_LEFT] && the_node->child[RBT_RIGHT]) {
4de16: 4a8a tstl %a2 4de18: 6600 ff4e bnew 4dd68 <_RBTree_Extract_unprotected+0x30>
* the_node's location in the tree. This may cause the coloring to be
* violated. We will fix it later.
* For now we store the color of the node being deleted in victim_color.
*/
leaf = the_node->child[RBT_LEFT] ?
the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT];
4de1c: 286b 0008 moveal %a3@(8),%a4
if( leaf ) {
4de20: 4a8c tstl %a4
4de22: 663c bnes 4de60 <_RBTree_Extract_unprotected+0x128>
leaf->parent = the_node->parent;
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(the_node);
4de24: 2f0b movel %a3,%sp@-
}
victim_color = the_node->color;
/* remove the_node from the tree */
dir = the_node != the_node->parent->child[0];
the_node->parent->child[dir] = leaf;
4de26: 7401 moveq #1,%d2
the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT];
if( leaf ) {
leaf->parent = the_node->parent;
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(the_node);
4de28: 4eb9 0004 db3c jsr 4db3c <_RBTree_Extract_validate_unprotected>
}
victim_color = the_node->color;
/* remove the_node from the tree */
dir = the_node != the_node->parent->child[0];
4de2e: 2053 moveal %a3@,%a0 4de30: b7e8 0004 cmpal %a0@(4),%a3 4de34: 56c1 sne %d1
leaf->parent = the_node->parent;
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(the_node);
}
victim_color = the_node->color;
4de36: 202b 000c movel %a3@(12),%d0
/* remove the_node from the tree */
dir = the_node != the_node->parent->child[0];
4de3a: 49c1 extbl %d1
the_node->parent->child[dir] = leaf;
4de3c: 9481 subl %d1,%d2
the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT];
if( leaf ) {
leaf->parent = the_node->parent;
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(the_node);
4de3e: 588f addql #4,%sp
}
victim_color = the_node->color;
/* remove the_node from the tree */
dir = the_node != the_node->parent->child[0];
the_node->parent->child[dir] = leaf;
4de40: 218c 2c00 movel %a4,%a0@(00000000,%d2:l:4)
/* fix coloring. leaf has moved up the tree. The color of the deleted
* node is in victim_color. There are two cases:
* 1. Deleted a red node, its child must be black. Nothing must be done.
* 2. Deleted a black node, its child must be red. Paint child black.
*/
if (victim_color == RBT_BLACK) { /* eliminate case 1 */
4de44: 4a80 tstl %d0
4de46: 669e bnes 4dde6 <_RBTree_Extract_unprotected+0xae>
4de48: 6094 bras 4ddde <_RBTree_Extract_unprotected+0xa6>
if (!the_node) return;
/* check if min needs to be updated */
if (the_node == the_rbtree->first[RBT_LEFT]) {
if (the_node->child[RBT_RIGHT])
4de4a: 202b 0008 movel %a3@(8),%d0
4de4e: 6738 beqs 4de88 <_RBTree_Extract_unprotected+0x150>
the_rbtree->first[RBT_LEFT] = the_node->child[RBT_RIGHT];
4de50: 2b40 0008 movel %d0,%a5@(8)
the_rbtree->first[RBT_LEFT]))
the_rbtree->first[RBT_LEFT] = NULL;
}
}
/* check if max needs to be updated: note, min can equal max (1 element) */
if (the_node == the_rbtree->first[RBT_RIGHT]) {
4de54: b7ed 000c cmpal %a5@(12),%a3 4de58: 6600 ff04 bnew 4dd5e <_RBTree_Extract_unprotected+0x26>
4de5c: 60a8 bras 4de06 <_RBTree_Extract_unprotected+0xce><== NOT EXECUTED
* either max in node->child[RBT_LEFT] or min in node->child[RBT_RIGHT],
* and replace the_node with the target node. This maintains the binary
* search tree property, but may violate the red-black properties.
*/
if (the_node->child[RBT_LEFT] && the_node->child[RBT_RIGHT]) {
4de5e: 284a moveal %a2,%a4
* For now we store the color of the node being deleted in victim_color.
*/
leaf = the_node->child[RBT_LEFT] ?
the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT];
if( leaf ) {
leaf->parent = the_node->parent;
4de60: 2893 movel %a3@,%a4@
}
victim_color = the_node->color;
/* remove the_node from the tree */
dir = the_node != the_node->parent->child[0];
the_node->parent->child[dir] = leaf;
4de62: 7401 moveq #1,%d2
_RBTree_Extract_validate_unprotected(the_node);
}
victim_color = the_node->color;
/* remove the_node from the tree */
dir = the_node != the_node->parent->child[0];
4de64: 2053 moveal %a3@,%a0 4de66: b7e8 0004 cmpal %a0@(4),%a3 4de6a: 56c1 sne %d1
leaf->parent = the_node->parent;
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(the_node);
}
victim_color = the_node->color;
4de6c: 202b 000c movel %a3@(12),%d0
/* remove the_node from the tree */
dir = the_node != the_node->parent->child[0];
4de70: 49c1 extbl %d1
the_node->parent->child[dir] = leaf;
4de72: 9481 subl %d1,%d2 4de74: 218c 2c00 movel %a4,%a0@(00000000,%d2:l:4) 4de78: 60ca bras 4de44 <_RBTree_Extract_unprotected+0x10c>
leaf = target->child[RBT_LEFT];
if(leaf) {
leaf->parent = target->parent;
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(target);
4de7a: 2f0a movel %a2,%sp@- 4de7c: 4eb9 0004 db3c jsr 4db3c <_RBTree_Extract_validate_unprotected> 4de82: 588f addql #4,%sp 4de84: 6000 ff04 braw 4dd8a <_RBTree_Extract_unprotected+0x52>
/* check if min needs to be updated */
if (the_node == the_rbtree->first[RBT_LEFT]) {
if (the_node->child[RBT_RIGHT])
the_rbtree->first[RBT_LEFT] = the_node->child[RBT_RIGHT];
else {
the_rbtree->first[RBT_LEFT] = the_node->parent;
4de88: 2013 movel %a3@,%d0 4de8a: 2b40 0008 movel %d0,%a5@(8)
if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree,
4de8e: b08d cmpl %a5,%d0 4de90: 6600 fec4 bnew 4dd56 <_RBTree_Extract_unprotected+0x1e>
the_rbtree->first[RBT_LEFT]))
the_rbtree->first[RBT_LEFT] = NULL;
4de94: 42ad 0008 clrl %a5@(8)
}
}
/* check if max needs to be updated: note, min can equal max (1 element) */
if (the_node == the_rbtree->first[RBT_RIGHT]) {
4de98: b7ed 000c cmpal %a5@(12),%a3 4de9c: 6600 fec0 bnew 4dd5e <_RBTree_Extract_unprotected+0x26> 4dea0: 6000 ff64 braw 4de06 <_RBTree_Extract_unprotected+0xce>
if (the_node->child[RBT_LEFT])
the_rbtree->first[RBT_RIGHT] = the_node->child[RBT_LEFT];
else {
the_rbtree->first[RBT_RIGHT] = the_node->parent;
4dea4: 2013 movel %a3@,%d0 4dea6: 2b40 000c movel %d0,%a5@(12)
if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree,
4deaa: b08d cmpl %a5,%d0 4deac: 6600 feb0 bnew 4dd5e <_RBTree_Extract_unprotected+0x26>
the_rbtree->first[RBT_RIGHT]))
the_rbtree->first[RBT_RIGHT] = NULL;
4deb0: 42ad 000c clrl %a5@(12) 4deb4: 6000 fea8 braw 4dd5e <_RBTree_Extract_unprotected+0x26>
0004db3c <_RBTree_Extract_validate_unprotected>:
* of the extract operation.
*/
void _RBTree_Extract_validate_unprotected(
RBTree_Node *the_node
)
{
4db3c: 4e56 ffec linkw %fp,#-20 4db40: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4db44: 266e 0008 moveal %fp@(8),%a3
RBTree_Node *parent, *sibling;
RBTree_Direction dir;
parent = the_node->parent;
4db48: 2053 moveal %a3@,%a0
if(!parent->parent) return;
4db4a: 4a90 tstl %a0@
4db4c: 677e beqs 4dbcc <_RBTree_Extract_validate_unprotected+0x90><== NEVER TAKEN
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
if(!(the_node->parent->parent)) return NULL;
if(the_node == the_node->parent->child[RBT_LEFT])
4db4e: 2268 0004 moveal %a0@(4),%a1 4db52: b3cb cmpal %a3,%a1 4db54: 6700 01da beqw 4dd30 <_RBTree_Extract_validate_unprotected+0x1f4>
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
4db58: 7401 moveq #1,%d2 4db5a: b4ab 000c cmpl %a3@(12),%d2
4db5e: 6764 beqs 4dbc4 <_RBTree_Extract_validate_unprotected+0x88>
sibling = _RBTree_Sibling(the_node);
/* continue to correct tree as long as the_node is black and not the root */
while (!_RBTree_Is_red(the_node) && parent->parent) {
4db60: 4a90 tstl %a0@
4db62: 6760 beqs 4dbc4 <_RBTree_Extract_validate_unprotected+0x88>
4db64: 4a89 tstl %a1
4db66: 6708 beqs 4db70 <_RBTree_Extract_validate_unprotected+0x34><== NEVER TAKEN
4db68: 7001 moveq #1,%d0 4db6a: b0a9 000c cmpl %a1@(12),%d0
4db6e: 6764 beqs 4dbd4 <_RBTree_Extract_validate_unprotected+0x98>
_RBTree_Rotate(parent, dir);
sibling = parent->child[!dir];
}
/* sibling is black, see if both of its children are also black. */
if (!_RBTree_Is_red(sibling->child[RBT_RIGHT]) &&
4db70: 2469 0008 moveal %a1@(8),%a2 4db74: 4a8a tstl %a2
4db76: 670a beqs 4db82 <_RBTree_Extract_validate_unprotected+0x46>
4db78: 7001 moveq #1,%d0 4db7a: b0aa 000c cmpl %a2@(12),%d0 4db7e: 6700 00dc beqw 4dc5c <_RBTree_Extract_validate_unprotected+0x120>
!_RBTree_Is_red(sibling->child[RBT_LEFT])) {
4db82: 2469 0004 moveal %a1@(4),%a2 4db86: 4a8a tstl %a2
4db88: 670a beqs 4db94 <_RBTree_Extract_validate_unprotected+0x58>
4db8a: 7201 moveq #1,%d1 4db8c: b2aa 000c cmpl %a2@(12),%d1 4db90: 6700 00ca beqw 4dc5c <_RBTree_Extract_validate_unprotected+0x120>
sibling->color = RBT_RED;
4db94: 7601 moveq #1,%d3 4db96: 2343 000c movel %d3,%a1@(12) 4db9a: b6a8 000c cmpl %a0@(12),%d3 4db9e: 6700 00ac beqw 4dc4c <_RBTree_Extract_validate_unprotected+0x110>
if (_RBTree_Is_red(parent)) {
parent->color = RBT_BLACK;
break;
}
the_node = parent; /* done if parent is red */
parent = the_node->parent;
4dba2: 2450 moveal %a0@,%a2
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling(
RBTree_Node *the_node
)
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
4dba4: 4a8a tstl %a2 4dba6: 6700 009a beqw 4dc42 <_RBTree_Extract_validate_unprotected+0x106>
if(!(the_node->parent->parent)) return NULL;
4dbaa: 4a92 tstl %a2@ 4dbac: 6700 0094 beqw 4dc42 <_RBTree_Extract_validate_unprotected+0x106>
if(the_node == the_node->parent->child[RBT_LEFT])
4dbb0: 226a 0004 moveal %a2@(4),%a1 4dbb4: b3c8 cmpal %a0,%a1
4dbb6: 677e beqs 4dc36 <_RBTree_Extract_validate_unprotected+0xfa>
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
c->parent = the_node->parent;
the_node->parent = c;
4dbb8: 2648 moveal %a0,%a3
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling(
RBTree_Node *the_node
)
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
4dbba: 204a moveal %a2,%a0
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
4dbbc: 7401 moveq #1,%d2 4dbbe: b4ab 000c cmpl %a3@(12),%d2
4dbc2: 669c bnes 4db60 <_RBTree_Extract_validate_unprotected+0x24><== ALWAYS TAKEN
sibling->child[!dir]->color = RBT_BLACK;
_RBTree_Rotate(parent, dir);
break; /* done */
}
} /* while */
if(!the_node->parent->parent) the_node->color = RBT_BLACK;
4dbc4: 2053 moveal %a3@,%a0 4dbc6: 4a90 tstl %a0@ 4dbc8: 6700 015a beqw 4dd24 <_RBTree_Extract_validate_unprotected+0x1e8>
}
4dbcc: 4cd7 1c0c moveml %sp@,%d2-%d3/%a2-%a4 4dbd0: 4e5e unlk %fp 4dbd2: 4e75 rts
* update sibling pointer.
*/
if (_RBTree_Is_red(sibling)) {
parent->color = RBT_RED;
sibling->color = RBT_BLACK;
dir = the_node != parent->child[0];
4dbd4: b7e8 0004 cmpal %a0@(4),%a3 4dbd8: 56c0 sne %d0
* then rotate parent left, making the sibling be the_node's grandparent.
* Now the_node has a black sibling and red parent. After rotation,
* update sibling pointer.
*/
if (_RBTree_Is_red(sibling)) {
parent->color = RBT_RED;
4dbda: 7201 moveq #1,%d1
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[(1-dir)] == NULL) return;
4dbdc: 7402 moveq #2,%d2
sibling->color = RBT_BLACK;
dir = the_node != parent->child[0];
4dbde: 49c0 extbl %d0 4dbe0: 4480 negl %d0 4dbe2: 9480 subl %d0,%d2
* then rotate parent left, making the sibling be the_node's grandparent.
* Now the_node has a black sibling and red parent. After rotation,
* update sibling pointer.
*/
if (_RBTree_Is_red(sibling)) {
parent->color = RBT_RED;
4dbe4: 2141 000c movel %d1,%a0@(12) 4dbe8: 2470 2c00 moveal %a0@(00000000,%d2:l:4),%a2
sibling->color = RBT_BLACK;
4dbec: 42a9 000c clrl %a1@(12) 4dbf0: 4a8a tstl %a2
4dbf2: 6730 beqs 4dc24 <_RBTree_Extract_validate_unprotected+0xe8><== NEVER TAKEN
c = the_node->child[(1-dir)];
the_node->child[(1-dir)] = c->child[dir];
4dbf4: 2200 movel %d0,%d1 4dbf6: 5281 addql #1,%d1 4dbf8: 43f2 1c00 lea %a2@(00000000,%d1:l:4),%a1 4dbfc: 2191 2c00 movel %a1@,%a0@(00000000,%d2:l:4)
if (c->child[dir])
4dc00: 2272 1c00 moveal %a2@(00000000,%d1:l:4),%a1 4dc04: 4a89 tstl %a1
4dc06: 6702 beqs 4dc0a <_RBTree_Extract_validate_unprotected+0xce><== NEVER TAKEN
c->child[dir]->parent = the_node;
4dc08: 2288 movel %a0,%a1@
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
4dc0a: 2250 moveal %a0@,%a1 4dc0c: 7401 moveq #1,%d2
the_node->child[(1-dir)] = c->child[dir];
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
4dc0e: 2588 1c00 movel %a0,%a2@(00000000,%d1:l:4)
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
4dc12: b1e9 0004 cmpal %a1@(4),%a0 4dc16: 56c1 sne %d1
c->parent = the_node->parent;
4dc18: 2489 movel %a1,%a2@
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
4dc1a: 49c1 extbl %d1 4dc1c: 9481 subl %d1,%d2 4dc1e: 238a 2c00 movel %a2,%a1@(00000000,%d2:l:4)
c->parent = the_node->parent;
the_node->parent = c;
4dc22: 208a movel %a2,%a0@
dir = the_node != parent->child[0];
_RBTree_Rotate(parent, dir);
sibling = parent->child[!dir];
4dc24: 4a80 tstl %d0 4dc26: 57c0 seq %d0 4dc28: 7601 moveq #1,%d3 4dc2a: 49c0 extbl %d0 4dc2c: 9680 subl %d0,%d3 4dc2e: 2270 3c00 moveal %a0@(00000000,%d3:l:4),%a1 4dc32: 6000 ff3c braw 4db70 <_RBTree_Extract_validate_unprotected+0x34> 4dc36: 2648 moveal %a0,%a3
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling(
RBTree_Node *the_node
)
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
4dc38: 204a moveal %a2,%a0
if(!(the_node->parent->parent)) return NULL;
if(the_node == the_node->parent->child[RBT_LEFT])
return the_node->parent->child[RBT_RIGHT];
4dc3a: 226a 0008 moveal %a2@(8),%a1 4dc3e: 6000 ff7c braw 4dbbc <_RBTree_Extract_validate_unprotected+0x80>
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
c->parent = the_node->parent;
the_node->parent = c;
4dc42: 2648 moveal %a0,%a3
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling(
RBTree_Node *the_node
)
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
4dc44: 93c9 subal %a1,%a1 4dc46: 204a moveal %a2,%a0 4dc48: 6000 ff72 braw 4dbbc <_RBTree_Extract_validate_unprotected+0x80>
/* sibling is black, see if both of its children are also black. */
if (!_RBTree_Is_red(sibling->child[RBT_RIGHT]) &&
!_RBTree_Is_red(sibling->child[RBT_LEFT])) {
sibling->color = RBT_RED;
if (_RBTree_Is_red(parent)) {
parent->color = RBT_BLACK;
4dc4c: 42a8 000c clrl %a0@(12)
sibling->child[!dir]->color = RBT_BLACK;
_RBTree_Rotate(parent, dir);
break; /* done */
}
} /* while */
if(!the_node->parent->parent) the_node->color = RBT_BLACK;
4dc50: 2053 moveal %a3@,%a0 4dc52: 4a90 tstl %a0@ 4dc54: 6600 ff76 bnew 4dbcc <_RBTree_Extract_validate_unprotected+0x90>
4dc58: 6000 00ca braw 4dd24 <_RBTree_Extract_validate_unprotected+0x1e8><== NOT EXECUTED
* cases, either the_node is to the left or the right of the parent.
* In both cases, first check if one of sibling's children is black,
* and if so rotate in the proper direction and update sibling pointer.
* Then switch the sibling and parent colors, and rotate through parent.
*/
dir = the_node != parent->child[0];
4dc5c: b7e8 0004 cmpal %a0@(4),%a3 4dc60: 56c0 sne %d0
if (!_RBTree_Is_red(sibling->child[!dir])) {
4dc62: 7401 moveq #1,%d2
* cases, either the_node is to the left or the right of the parent.
* In both cases, first check if one of sibling's children is black,
* and if so rotate in the proper direction and update sibling pointer.
* Then switch the sibling and parent colors, and rotate through parent.
*/
dir = the_node != parent->child[0];
4dc64: 49c0 extbl %d0 4dc66: 4480 negl %d0
if (!_RBTree_Is_red(sibling->child[!dir])) {
4dc68: 57c1 seq %d1 4dc6a: 49c1 extbl %d1 4dc6c: 9481 subl %d1,%d2 4dc6e: 2202 movel %d2,%d1 4dc70: 2471 2c00 moveal %a1@(00000000,%d2:l:4),%a2
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
4dc74: 4a8a tstl %a2
4dc76: 6708 beqs 4dc80 <_RBTree_Extract_validate_unprotected+0x144>
4dc78: 7601 moveq #1,%d3 4dc7a: b6aa 000c cmpl %a2@(12),%d3
4dc7e: 6756 beqs 4dcd6 <_RBTree_Extract_validate_unprotected+0x19a>
sibling->color = RBT_RED;
sibling->child[dir]->color = RBT_BLACK;
_RBTree_Rotate(sibling, !dir);
4dc80: 7601 moveq #1,%d3
* and if so rotate in the proper direction and update sibling pointer.
* Then switch the sibling and parent colors, and rotate through parent.
*/
dir = the_node != parent->child[0];
if (!_RBTree_Is_red(sibling->child[!dir])) {
sibling->color = RBT_RED;
4dc82: 7401 moveq #1,%d2
sibling->child[dir]->color = RBT_BLACK;
_RBTree_Rotate(sibling, !dir);
4dc84: b183 eorl %d0,%d3
* and if so rotate in the proper direction and update sibling pointer.
* Then switch the sibling and parent colors, and rotate through parent.
*/
dir = the_node != parent->child[0];
if (!_RBTree_Is_red(sibling->child[!dir])) {
sibling->color = RBT_RED;
4dc86: 2342 000c movel %d2,%a1@(12)
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[(1-dir)] == NULL) return;
4dc8a: 143c 0002 moveb #2,%d2 4dc8e: 9483 subl %d3,%d2
sibling->child[dir]->color = RBT_BLACK;
4dc90: 2871 0c04 moveal %a1@(00000004,%d0:l:4),%a4 4dc94: 2471 2c00 moveal %a1@(00000000,%d2:l:4),%a2 4dc98: 42ac 000c clrl %a4@(12) 4dc9c: 4a8a tstl %a2
4dc9e: 672e beqs 4dcce <_RBTree_Extract_validate_unprotected+0x192><== NEVER TAKEN
c = the_node->child[(1-dir)];
the_node->child[(1-dir)] = c->child[dir];
4dca0: 5283 addql #1,%d3 4dca2: 49f2 3c00 lea %a2@(00000000,%d3:l:4),%a4 4dca6: 2394 2c00 movel %a4@,%a1@(00000000,%d2:l:4)
if (c->child[dir])
4dcaa: 2872 3c00 moveal %a2@(00000000,%d3:l:4),%a4 4dcae: 4a8c tstl %a4
4dcb0: 6702 beqs 4dcb4 <_RBTree_Extract_validate_unprotected+0x178>
c->child[dir]->parent = the_node;
4dcb2: 2889 movel %a1,%a4@
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
4dcb4: 2851 moveal %a1@,%a4
the_node->child[(1-dir)] = c->child[dir];
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
4dcb6: 2589 3c00 movel %a1,%a2@(00000000,%d3:l:4)
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
4dcba: 7601 moveq #1,%d3 4dcbc: b3ec 0004 cmpal %a4@(4),%a1 4dcc0: 56c2 sne %d2
c->parent = the_node->parent;
4dcc2: 248c movel %a4,%a2@
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
4dcc4: 49c2 extbl %d2 4dcc6: 9682 subl %d2,%d3 4dcc8: 298a 3c00 movel %a2,%a4@(00000000,%d3:l:4)
c->parent = the_node->parent;
the_node->parent = c;
4dccc: 228a movel %a2,%a1@
_RBTree_Rotate(sibling, !dir);
sibling = parent->child[!dir];
4dcce: 2270 1c00 moveal %a0@(00000000,%d1:l:4),%a1 4dcd2: 2471 1c00 moveal %a1@(00000000,%d1:l:4),%a2
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[(1-dir)] == NULL) return;
4dcd6: 7202 moveq #2,%d1 4dcd8: 9280 subl %d0,%d1
}
sibling->color = parent->color;
4dcda: 2368 000c 000c movel %a0@(12),%a1@(12) 4dce0: 2270 1c00 moveal %a0@(00000000,%d1:l:4),%a1
parent->color = RBT_BLACK;
4dce4: 42a8 000c clrl %a0@(12)
sibling->child[!dir]->color = RBT_BLACK;
4dce8: 42aa 000c clrl %a2@(12) 4dcec: 4a89 tstl %a1 4dcee: 6700 fed4 beqw 4dbc4 <_RBTree_Extract_validate_unprotected+0x88>
c = the_node->child[(1-dir)];
the_node->child[(1-dir)] = c->child[dir];
4dcf2: 5280 addql #1,%d0 4dcf4: 45f1 0c00 lea %a1@(00000000,%d0:l:4),%a2 4dcf8: 2192 1c00 movel %a2@,%a0@(00000000,%d1:l:4)
if (c->child[dir])
4dcfc: 2471 0c00 moveal %a1@(00000000,%d0:l:4),%a2 4dd00: 4a8a tstl %a2
4dd02: 6702 beqs 4dd06 <_RBTree_Extract_validate_unprotected+0x1ca>
c->child[dir]->parent = the_node;
4dd04: 2488 movel %a0,%a2@
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
4dd06: 2450 moveal %a0@,%a2 4dd08: 7201 moveq #1,%d1
the_node->child[(1-dir)] = c->child[dir];
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
4dd0a: 2388 0c00 movel %a0,%a1@(00000000,%d0:l:4)
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
4dd0e: b1ea 0004 cmpal %a2@(4),%a0 4dd12: 56c0 sne %d0
c->parent = the_node->parent;
4dd14: 228a movel %a2,%a1@
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
4dd16: 49c0 extbl %d0 4dd18: 9280 subl %d0,%d1 4dd1a: 2589 1c00 movel %a1,%a2@(00000000,%d1:l:4)
c->parent = the_node->parent;
the_node->parent = c;
4dd1e: 2089 movel %a1,%a0@ 4dd20: 6000 fea2 braw 4dbc4 <_RBTree_Extract_validate_unprotected+0x88>
_RBTree_Rotate(parent, dir);
break; /* done */
}
} /* while */
if(!the_node->parent->parent) the_node->color = RBT_BLACK;
4dd24: 42ab 000c clrl %a3@(12)
}
4dd28: 4cd7 1c0c moveml %sp@,%d2-%d3/%a2-%a4 4dd2c: 4e5e unlk %fp 4dd2e: 4e75 rts
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
if(!(the_node->parent->parent)) return NULL;
if(the_node == the_node->parent->child[RBT_LEFT])
return the_node->parent->child[RBT_RIGHT];
4dd30: 2268 0008 moveal %a0@(8),%a1 4dd34: 6000 fe22 braw 4db58 <_RBTree_Extract_validate_unprotected+0x1c>
00049bc8 <_RBTree_Find>:
{
ISR_Level level;
RBTree_Node *return_node;
return_node = NULL;
_ISR_Disable( level );
49bc8: 203c 0000 0700 movel #1792,%d0
RBTree_Node *_RBTree_Find(
RBTree_Control *the_rbtree,
RBTree_Node *search_node
)
{
49bce: 4e56 ffec linkw %fp,#-20 49bd2: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 49bd6: 266e 0008 moveal %fp@(8),%a3 49bda: 242e 000c movel %fp@(12),%d2
ISR_Level level;
RBTree_Node *return_node;
return_node = NULL;
_ISR_Disable( level );
49bde: 40c4 movew %sr,%d4 49be0: 8084 orl %d4,%d0 49be2: 46c0 movew %d0,%sr
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Find_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
RBTree_Node* iter_node = the_rbtree->root;
49be4: 246b 0004 moveal %a3@(4),%a2
RBTree_Node* found = NULL;
int compare_result;
while (iter_node) {
49be8: 4283 clrl %d3 49bea: 4a8a tstl %a2
49bec: 672a beqs 49c18 <_RBTree_Find+0x50> <== NEVER TAKEN
compare_result = the_rbtree->compare_function(the_node, iter_node);
49bee: 2f0a movel %a2,%sp@- 49bf0: 206b 0010 moveal %a3@(16),%a0 49bf4: 2f02 movel %d2,%sp@- 49bf6: 4e90 jsr %a0@
if (compare_result == 0) {
49bf8: 508f addql #8,%sp 49bfa: 4a80 tstl %d0
49bfc: 6608 bnes 49c06 <_RBTree_Find+0x3e> <== NEVER TAKEN
found = iter_node;
if ( the_rbtree->is_unique )
49bfe: 260a movel %a2,%d3 49c00: 4a2b 0014 tstb %a3@(20)
49c04: 6612 bnes 49c18 <_RBTree_Find+0x50>
break;
}
RBTree_Direction dir = (compare_result == 1);
49c06: 7201 moveq #1,%d1 49c08: b280 cmpl %d0,%d1 49c0a: 57c0 seq %d0 49c0c: 49c0 extbl %d0
iter_node = iter_node->child[dir];
49c0e: 9280 subl %d0,%d1 49c10: 2472 1c00 moveal %a2@(00000000,%d1:l:4),%a2
)
{
RBTree_Node* iter_node = the_rbtree->root;
RBTree_Node* found = NULL;
int compare_result;
while (iter_node) {
49c14: 4a8a tstl %a2
49c16: 66d6 bnes 49bee <_RBTree_Find+0x26> <== NEVER TAKEN
return_node = _RBTree_Find_unprotected( the_rbtree, search_node );
_ISR_Enable( level );
49c18: 46c4 movew %d4,%sr
return return_node; }
49c1a: 2003 movel %d3,%d0 49c1c: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 49c22: 4e5e unlk %fp
...
00049b88 <_RBTree_Find_header>:
{
ISR_Level level;
RBTree_Control *return_header;
return_header = NULL;
_ISR_Disable( level );
49b88: 203c 0000 0700 movel #1792,%d0
*/
RBTree_Control *_RBTree_Find_header(
RBTree_Node *the_node
)
{
49b8e: 4e56 0000 linkw %fp,#0 49b92: 206e 0008 moveal %fp@(8),%a0 49b96: 2f02 movel %d2,%sp@-
ISR_Level level;
RBTree_Control *return_header;
return_header = NULL;
_ISR_Disable( level );
49b98: 40c2 movew %sr,%d2 49b9a: 8082 orl %d2,%d0 49b9c: 46c0 movew %d0,%sr
*/
RTEMS_INLINE_ROUTINE RBTree_Control *_RBTree_Find_header_unprotected(
RBTree_Node *the_node
)
{
if(!the_node) return NULL;
49b9e: 4a88 tstl %a0
49ba0: 671a beqs 49bbc <_RBTree_Find_header+0x34> if(!(the_node->parent)) return NULL;
49ba2: 2050 moveal %a0@,%a0 49ba4: 4a88 tstl %a0
49ba6: 670a beqs 49bb2 <_RBTree_Find_header+0x2a>
49ba8: 2210 movel %a0@,%d1
while(the_node->parent) the_node = the_node->parent;
49baa: 6706 beqs 49bb2 <_RBTree_Find_header+0x2a> <== NEVER TAKEN
49bac: 2041 moveal %d1,%a0
RTEMS_INLINE_ROUTINE RBTree_Control *_RBTree_Find_header_unprotected(
RBTree_Node *the_node
)
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
49bae: 2210 movel %a0@,%d1
while(the_node->parent) the_node = the_node->parent;
49bb0: 66fa bnes 49bac <_RBTree_Find_header+0x24>
return_header = _RBTree_Find_header_unprotected( the_node );
_ISR_Enable( level );
49bb2: 46c2 movew %d2,%sr
return return_header; }
49bb4: 241f movel %sp@+,%d2 49bb6: 2008 movel %a0,%d0 49bb8: 4e5e unlk %fp 49bba: 4e75 rts
*/
RTEMS_INLINE_ROUTINE RBTree_Control *_RBTree_Find_header_unprotected(
RBTree_Node *the_node
)
{
if(!the_node) return NULL;
49bbc: 91c8 subal %a0,%a0
RBTree_Control *return_header;
return_header = NULL;
_ISR_Disable( level );
return_header = _RBTree_Find_header_unprotected( the_node );
_ISR_Enable( level );
49bbe: 46c2 movew %d2,%sr
return return_header; }
49bc0: 241f movel %sp@+,%d2 49bc2: 2008 movel %a0,%d0
49bc4: 4e5e unlk %fp <== NOT EXECUTED
00049e90 <_RBTree_Initialize>:
void *starting_address,
size_t number_nodes,
size_t node_size,
bool is_unique
)
{
49e90: 4e56 ffec linkw %fp,#-20 49e94: 202e 001c movel %fp@(28),%d0 49e98: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 49e9c: 246e 0008 moveal %fp@(8),%a2 49ea0: 242e 0014 movel %fp@(20),%d2 49ea4: 282e 0018 movel %fp@(24),%d4
size_t count;
RBTree_Node *next;
/* TODO: Error message? */
if (!the_rbtree) return;
49ea8: 4a8a tstl %a2
49eaa: 6736 beqs 49ee2 <_RBTree_Initialize+0x52> <== NEVER TAKEN
RBTree_Control *the_rbtree,
RBTree_Compare_function compare_function,
bool is_unique
)
{
the_rbtree->permanent_null = NULL;
49eac: 4292 clrl %a2@
the_rbtree->root = NULL; the_rbtree->first[0] = NULL; the_rbtree->first[1] = NULL; the_rbtree->compare_function = compare_function;
49eae: 256e 000c 0010 movel %fp@(12),%a2@(16)
the_rbtree->is_unique = is_unique;
49eb4: 1540 0014 moveb %d0,%a2@(20)
RBTree_Compare_function compare_function,
bool is_unique
)
{
the_rbtree->permanent_null = NULL;
the_rbtree->root = NULL;
49eb8: 42aa 0004 clrl %a2@(4)
the_rbtree->first[0] = NULL;
49ebc: 42aa 0008 clrl %a2@(8)
the_rbtree->first[1] = NULL;
49ec0: 42aa 000c clrl %a2@(12)
/* could do sanity checks here */
_RBTree_Initialize_empty(the_rbtree, compare_function, is_unique);
count = number_nodes;
next = starting_address;
while ( count-- ) {
49ec4: 4a82 tstl %d2
49ec6: 671a beqs 49ee2 <_RBTree_Initialize+0x52> <== NEVER TAKEN
/* could do sanity checks here */
_RBTree_Initialize_empty(the_rbtree, compare_function, is_unique);
count = number_nodes;
next = starting_address;
49ec8: 262e 0010 movel %fp@(16),%d3 49ecc: 47f9 0004 9e62 lea 49e62 <_RBTree_Insert>,%a3
while ( count-- ) {
_RBTree_Insert(the_rbtree, next);
49ed2: 2f03 movel %d3,%sp@-
* node_size - size of node in bytes
*
* Output parameters: NONE
*/
void _RBTree_Initialize(
49ed4: d684 addl %d4,%d3 49ed6: 5382 subql #1,%d2
_RBTree_Initialize_empty(the_rbtree, compare_function, is_unique);
count = number_nodes;
next = starting_address;
while ( count-- ) {
_RBTree_Insert(the_rbtree, next);
49ed8: 2f0a movel %a2,%sp@- 49eda: 4e93 jsr %a3@
/* could do sanity checks here */
_RBTree_Initialize_empty(the_rbtree, compare_function, is_unique);
count = number_nodes;
next = starting_address;
while ( count-- ) {
49edc: 508f addql #8,%sp 49ede: 4a82 tstl %d2
49ee0: 66f0 bnes 49ed2 <_RBTree_Initialize+0x42>
_RBTree_Insert(the_rbtree, next);
next = (RBTree_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
}
49ee2: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3
49ee8: 4e5e unlk %fp <== NOT EXECUTED
0004e0e2 <_RBTree_Insert>:
RBTree_Node *node
)
{
ISR_Level level;
_ISR_Disable( level );
4e0e2: 203c 0000 0700 movel #1792,%d0
RBTree_Node *_RBTree_Insert(
RBTree_Control *tree,
RBTree_Node *node
)
{
4e0e8: 4e56 0000 linkw %fp,#0 4e0ec: 222e 0008 movel %fp@(8),%d1 4e0f0: 206e 000c moveal %fp@(12),%a0 4e0f4: 2f02 movel %d2,%sp@-
ISR_Level level;
_ISR_Disable( level );
4e0f6: 40c2 movew %sr,%d2 4e0f8: 8082 orl %d2,%d0 4e0fa: 46c0 movew %d0,%sr
return _RBTree_Insert_unprotected( tree, node );
_ISR_Enable( level );
}
4e0fc: 241f movel %sp@+,%d2
)
{
ISR_Level level;
_ISR_Disable( level );
return _RBTree_Insert_unprotected( tree, node );
4e0fe: 2d48 000c movel %a0,%fp@(12) 4e102: 2d41 0008 movel %d1,%fp@(8)
_ISR_Enable( level ); }
4e106: 4e5e unlk %fp
)
{
ISR_Level level;
_ISR_Disable( level );
return _RBTree_Insert_unprotected( tree, node );
4e108: 4ef9 0004 e00e jmp 4e00e <_RBTree_Insert_unprotected>
...
0004dee4 <_RBTree_Validate_insert_unprotected>:
* append operation.
*/
void _RBTree_Validate_insert_unprotected(
RBTree_Node *the_node
)
{
4dee4: 4e56 ffe8 linkw %fp,#-24 4dee8: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4deec: 266e 0008 moveal %fp@(8),%a3
ISR_Level level;
_ISR_Disable( level );
return _RBTree_Insert_unprotected( tree, node );
_ISR_Enable( level );
}
4def0: 2053 moveal %a3@,%a0
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent(
RBTree_Node *the_node
)
{
if (!the_node->parent->parent) return NULL;
4def2: 2250 moveal %a0@,%a1 4def4: 2449 moveal %a1,%a2 4def6: 4a89 tstl %a1 4def8: 6700 00de beqw 4dfd8 <_RBTree_Validate_insert_unprotected+0xf4>
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
4defc: 7601 moveq #1,%d3 4defe: b6a8 000c cmpl %a0@(12),%d3
4df02: 6708 beqs 4df0c <_RBTree_Validate_insert_unprotected+0x28>
/* now rotate grandparent in the other branch direction (toward uncle) */
_RBTree_Rotate(g, (1-pdir));
}
}
if(!the_node->parent->parent) the_node->color = RBT_BLACK;
}
4df04: 4cd7 3c0c moveml %sp@,%d2-%d3/%a2-%a5 4df08: 4e5e unlk %fp 4df0a: 4e75 rts
)
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
if(!(the_node->parent->parent)) return NULL;
if(!(the_node->parent->parent->parent)) return NULL;
4df0c: 4a91 tstl %a1@ 4df0e: 6700 00ee beqw 4dffe <_RBTree_Validate_insert_unprotected+0x11a>
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
if(!(the_node->parent->parent)) return NULL;
if(the_node == the_node->parent->child[RBT_LEFT])
4df12: 2429 0004 movel %a1@(4),%d2 4df16: b488 cmpl %a0,%d2 4df18: 6700 00ec beqw 4e006 <_RBTree_Validate_insert_unprotected+0x122> 4df1c: 2842 moveal %d2,%a4
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
4df1e: 4a8c tstl %a4
4df20: 670a beqs 4df2c <_RBTree_Validate_insert_unprotected+0x48>
4df22: 7001 moveq #1,%d0 4df24: b0ac 000c cmpl %a4@(12),%d0 4df28: 6700 00ba beqw 4dfe4 <_RBTree_Validate_insert_unprotected+0x100>
the_node->parent->color = RBT_BLACK;
u->color = RBT_BLACK;
g->color = RBT_RED;
the_node = g;
} else { /* if uncle is black */
RBTree_Direction dir = the_node != the_node->parent->child[0];
4df2c: b7e8 0004 cmpal %a0@(4),%a3 4df30: 56c1 sne %d1
RBTree_Direction pdir = the_node->parent != g->child[0];
4df32: b488 cmpl %a0,%d2 4df34: 56c0 sne %d0
the_node->parent->color = RBT_BLACK;
u->color = RBT_BLACK;
g->color = RBT_RED;
the_node = g;
} else { /* if uncle is black */
RBTree_Direction dir = the_node != the_node->parent->child[0];
4df36: 49c1 extbl %d1 4df38: 4481 negl %d1
RBTree_Direction pdir = the_node->parent != g->child[0];
4df3a: 49c0 extbl %d0 4df3c: 4480 negl %d0
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[(1-dir)] == NULL) return;
4df3e: 7401 moveq #1,%d2
/* ensure node is on the same branch direction as parent */
if (dir != pdir) {
4df40: b081 cmpl %d1,%d0 4df42: 6700 00b2 beqw 4dff6 <_RBTree_Validate_insert_unprotected+0x112> 4df46: 9480 subl %d0,%d2 4df48: 2202 movel %d2,%d1 4df4a: 5281 addql #1,%d1 4df4c: 5280 addql #1,%d0 4df4e: 2870 1c00 moveal %a0@(00000000,%d1:l:4),%a4 4df52: 4a8c tstl %a4
4df54: 672c beqs 4df82 <_RBTree_Validate_insert_unprotected+0x9e><== NEVER TAKEN
c = the_node->child[(1-dir)];
the_node->child[(1-dir)] = c->child[dir];
4df56: 4bf4 0c00 lea %a4@(00000000,%d0:l:4),%a5 4df5a: 2195 1c00 movel %a5@,%a0@(00000000,%d1:l:4)
if (c->child[dir])
4df5e: 2a74 0c00 moveal %a4@(00000000,%d0:l:4),%a5 4df62: 4a8d tstl %a5
4df64: 6704 beqs 4df6a <_RBTree_Validate_insert_unprotected+0x86>
c->child[dir]->parent = the_node;
4df66: 2a88 movel %a0,%a5@ 4df68: 2250 moveal %a0@,%a1
c->child[dir] = the_node;
4df6a: 2988 0c00 movel %a0,%a4@(00000000,%d0:l:4)
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
4df6e: 7601 moveq #1,%d3 4df70: b1e9 0004 cmpal %a1@(4),%a0 4df74: 56c1 sne %d1
c->parent = the_node->parent;
4df76: 2889 movel %a1,%a4@
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
4df78: 49c1 extbl %d1 4df7a: 9681 subl %d1,%d3 4df7c: 238c 3c00 movel %a4,%a1@(00000000,%d3:l:4)
c->parent = the_node->parent;
the_node->parent = c;
4df80: 208c movel %a4,%a0@
_RBTree_Rotate(the_node->parent, pdir);
the_node = the_node->child[pdir];
4df82: 2673 0c00 moveal %a3@(00000000,%d0:l:4),%a3 4df86: 2053 moveal %a3@,%a0
}
the_node->parent->color = RBT_BLACK;
4df88: 42a8 000c clrl %a0@(12)
g->color = RBT_RED;
4df8c: 7201 moveq #1,%d1
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[(1-dir)] == NULL) return;
4df8e: 2072 0c00 moveal %a2@(00000000,%d0:l:4),%a0 4df92: 2541 000c movel %d1,%a2@(12) 4df96: 4a88 tstl %a0 4df98: 6700 ff56 beqw 4def0 <_RBTree_Validate_insert_unprotected+0xc>
c = the_node->child[(1-dir)];
the_node->child[(1-dir)] = c->child[dir];
4df9c: 2202 movel %d2,%d1 4df9e: 5281 addql #1,%d1 4dfa0: 43f0 1c00 lea %a0@(00000000,%d1:l:4),%a1 4dfa4: 2591 0c00 movel %a1@,%a2@(00000000,%d0:l:4)
if (c->child[dir])
4dfa8: 2270 1c00 moveal %a0@(00000000,%d1:l:4),%a1 4dfac: 4a89 tstl %a1
4dfae: 6702 beqs 4dfb2 <_RBTree_Validate_insert_unprotected+0xce>
c->child[dir]->parent = the_node;
4dfb0: 228a movel %a2,%a1@
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
4dfb2: 2252 moveal %a2@,%a1
the_node->child[(1-dir)] = c->child[dir];
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
4dfb4: 218a 1c00 movel %a2,%a0@(00000000,%d1:l:4)
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
4dfb8: 7201 moveq #1,%d1 4dfba: b5e9 0004 cmpal %a1@(4),%a2 4dfbe: 56c0 sne %d0
c->parent = the_node->parent;
4dfc0: 2089 movel %a1,%a0@
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
4dfc2: 49c0 extbl %d0 4dfc4: 9280 subl %d0,%d1 4dfc6: 2388 1c00 movel %a0,%a1@(00000000,%d1:l:4)
c->parent = the_node->parent;
the_node->parent = c;
4dfca: 2488 movel %a0,%a2@
ISR_Level level;
_ISR_Disable( level );
return _RBTree_Insert_unprotected( tree, node );
_ISR_Enable( level );
}
4dfcc: 2053 moveal %a3@,%a0
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent(
RBTree_Node *the_node
)
{
if (!the_node->parent->parent) return NULL;
4dfce: 2250 moveal %a0@,%a1 4dfd0: 2449 moveal %a1,%a2 4dfd2: 4a89 tstl %a1 4dfd4: 6600 ff26 bnew 4defc <_RBTree_Validate_insert_unprotected+0x18>
/* now rotate grandparent in the other branch direction (toward uncle) */
_RBTree_Rotate(g, (1-pdir));
}
}
if(!the_node->parent->parent) the_node->color = RBT_BLACK;
4dfd8: 42ab 000c clrl %a3@(12)
}
4dfdc: 4cd7 3c0c moveml %sp@,%d2-%d3/%a2-%a5 4dfe0: 4e5e unlk %fp 4dfe2: 4e75 rts
u = _RBTree_Parent_sibling(the_node);
g = the_node->parent->parent;
/* if uncle is red, repaint uncle/parent black and grandparent red */
if(_RBTree_Is_red(u)) {
the_node->parent->color = RBT_BLACK;
4dfe4: 42a8 000c clrl %a0@(12)
u->color = RBT_BLACK;
g->color = RBT_RED;
4dfe8: 2649 moveal %a1,%a3
g = the_node->parent->parent;
/* if uncle is red, repaint uncle/parent black and grandparent red */
if(_RBTree_Is_red(u)) {
the_node->parent->color = RBT_BLACK;
u->color = RBT_BLACK;
4dfea: 42ac 000c clrl %a4@(12)
g->color = RBT_RED;
4dfee: 2340 000c movel %d0,%a1@(12) 4dff2: 6000 fefc braw 4def0 <_RBTree_Validate_insert_unprotected+0xc> 4dff6: 2001 movel %d1,%d0
} else { /* if uncle is black */
RBTree_Direction dir = the_node != the_node->parent->child[0];
RBTree_Direction pdir = the_node->parent != g->child[0];
/* ensure node is on the same branch direction as parent */
if (dir != pdir) {
4dff8: 9481 subl %d1,%d2 4dffa: 5280 addql #1,%d0 4dffc: 608a bras 4df88 <_RBTree_Validate_insert_unprotected+0xa4>
/* now rotate grandparent in the other branch direction (toward uncle) */
_RBTree_Rotate(g, (1-pdir));
}
}
if(!the_node->parent->parent) the_node->color = RBT_BLACK;
}
4dffe: 2429 0004 movel %a1@(4),%d2 <== NOT EXECUTED 4e002: 6000 ff28 braw 4df2c <_RBTree_Validate_insert_unprotected+0x48><== NOT EXECUTED
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
if(!(the_node->parent->parent)) return NULL;
if(the_node == the_node->parent->child[RBT_LEFT])
return the_node->parent->child[RBT_RIGHT];
4e006: 2869 0008 moveal %a1@(8),%a4 4e00a: 6000 ff12 braw 4df1e <_RBTree_Validate_insert_unprotected+0x3a>
0004ca52 <_RTEMS_tasks_Create_extension>:
bool _RTEMS_tasks_Create_extension(
Thread_Control *executing,
Thread_Control *created
)
{
4ca52: 4e56 0000 linkw %fp,#0 4ca56: 2f0a movel %a2,%sp@- 4ca58: 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() )
4ca5c: 4a39 0005 f6b4 tstb 5f6b4 <Configuration_RTEMS_API+0x4>
4ca62: 6758 beqs 4cabc <_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 );
4ca64: 705e moveq #94,%d0
if ( !rtems_configuration_get_notepads_enabled() )
to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t));
api = _Workspace_Allocate( to_allocate );
4ca66: 2f00 movel %d0,%sp@- 4ca68: 4eb9 0004 a2e2 jsr 4a2e2 <_Workspace_Allocate>
if ( !api )
4ca6e: 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 );
4ca70: 2040 moveal %d0,%a0
if ( !api )
4ca72: 4a80 tstl %d0
4ca74: 6758 beqs 4cace <_RTEMS_tasks_Create_extension+0x7c>
return false;
created->API_Extensions[ THREAD_API_RTEMS ] = api;
4ca76: 2540 00fe movel %d0,%a2@(254)
*/
RTEMS_INLINE_ROUTINE void _ASR_Initialize (
ASR_Information *information
)
{
information->is_enabled = false;
4ca7a: 4200 clrb %d0
api->pending_events = EVENT_SETS_NONE_PENDING;
4ca7c: 4290 clrl %a0@ 4ca7e: 1140 0008 moveb %d0,%a0@(8)
api->event_condition = 0;
4ca82: 42a8 0004 clrl %a0@(4)
information->handler = NULL;
4ca86: 42a8 000a clrl %a0@(10)
information->mode_set = RTEMS_DEFAULT_MODES;
4ca8a: 42a8 000e clrl %a0@(14)
information->signals_posted = 0;
4ca8e: 42a8 0012 clrl %a0@(18)
information->signals_pending = 0;
4ca92: 42a8 0016 clrl %a0@(22)
information->nest_level = 0;
4ca96: 42a8 001a clrl %a0@(26)
_ASR_Initialize( &api->Signal ); created->task_variables = NULL;
4ca9a: 42aa 010a clrl %a2@(266)
if ( rtems_configuration_get_notepads_enabled() ) {
4ca9e: 4a39 0005 f6b4 tstb 5f6b4 <Configuration_RTEMS_API+0x4>
4caa4: 670c beqs 4cab2 <_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(
4caa6: 41e8 001e lea %a0@(30),%a0 4caaa: 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;
4caac: 4298 clrl %a0@+ 4caae: 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++)
4cab0: 66fa bnes 4caac <_RTEMS_tasks_Create_extension+0x5a>
api->Notepads[i] = 0;
}
return true;
}
4cab2: 246e fffc moveal %fp@(-4),%a2 4cab6: 4e5e unlk %fp
if ( rtems_configuration_get_notepads_enabled() ) {
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
api->Notepads[i] = 0;
}
return true;
4cab8: 7001 moveq #1,%d0
}
4caba: 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));
4cabc: 701e moveq #30,%d0
api = _Workspace_Allocate( to_allocate );
4cabe: 2f00 movel %d0,%sp@- 4cac0: 4eb9 0004 a2e2 jsr 4a2e2 <_Workspace_Allocate>
if ( !api )
4cac6: 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 );
4cac8: 2040 moveal %d0,%a0
if ( !api )
4caca: 4a80 tstl %d0
4cacc: 66a8 bnes 4ca76 <_RTEMS_tasks_Create_extension+0x24><== ALWAYS TAKEN
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
api->Notepads[i] = 0;
}
return true;
}
4cace: 246e fffc moveal %fp@(-4),%a2 4cad2: 4e5e unlk %fp
to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t));
api = _Workspace_Allocate( to_allocate );
if ( !api )
return false;
4cad4: 4200 clrb %d0 <== NOT EXECUTED
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
api->Notepads[i] = 0;
}
return true;
}
0004c9fc <_RTEMS_tasks_Delete_extension>:
void _RTEMS_tasks_Delete_extension(
Thread_Control *executing,
Thread_Control *deleted
)
{
4c9fc: 4e56 fff4 linkw %fp,#-12 4ca00: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 4ca04: 246e 000c moveal %fp@(12),%a2 4ca08: 47f9 0004 cb24 lea 4cb24 <_RTEMS_Tasks_Invoke_task_variable_dtor>,%a3
/*
* Free per task variable memory
*/
tvp = deleted->task_variables;
4ca0e: 206a 010a moveal %a2@(266),%a0
deleted->task_variables = NULL;
4ca12: 42aa 010a clrl %a2@(266)
while (tvp) {
4ca16: 4a88 tstl %a0
4ca18: 671e beqs 4ca38 <_RTEMS_tasks_Delete_extension+0x3c>
next = (rtems_task_variable_t *)tvp->next;
4ca1a: 2410 movel %a0@,%d2
_RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp );
4ca1c: 2f08 movel %a0,%sp@- 4ca1e: 2f0a movel %a2,%sp@- 4ca20: 4e93 jsr %a3@
* Free per task variable memory
*/
tvp = deleted->task_variables;
deleted->task_variables = NULL;
while (tvp) {
4ca22: 508f addql #8,%sp 4ca24: 4a82 tstl %d2
4ca26: 6710 beqs 4ca38 <_RTEMS_tasks_Delete_extension+0x3c><== NEVER TAKEN
next = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp );
tvp = next;
4ca28: 2042 moveal %d2,%a0
*/
tvp = deleted->task_variables;
deleted->task_variables = NULL;
while (tvp) {
next = (rtems_task_variable_t *)tvp->next;
4ca2a: 2410 movel %a0@,%d2
_RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp );
4ca2c: 2f08 movel %a0,%sp@- 4ca2e: 2f0a movel %a2,%sp@- 4ca30: 4e93 jsr %a3@
* Free per task variable memory
*/
tvp = deleted->task_variables;
deleted->task_variables = NULL;
while (tvp) {
4ca32: 508f addql #8,%sp 4ca34: 4a82 tstl %d2
4ca36: 66f0 bnes 4ca28 <_RTEMS_tasks_Delete_extension+0x2c>
/*
* Free API specific memory
*/
(void) _Workspace_Free( deleted->API_Extensions[ THREAD_API_RTEMS ] );
4ca38: 2f2a 00fe movel %a2@(254),%sp@- 4ca3c: 4eb9 0004 a2fe jsr 4a2fe <_Workspace_Free>
deleted->API_Extensions[ THREAD_API_RTEMS ] = NULL;
4ca42: 588f addql #4,%sp 4ca44: 42aa 00fe clrl %a2@(254)
}
4ca48: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3
4ca4e: 4e5e unlk %fp <== NOT EXECUTED
00046f00 <_RTEMS_tasks_Initialize_user_tasks_body>:
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks_body( void )
{
46f00: 4e56 ffe4 linkw %fp,#-28 46f04: 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;
46f08: 2479 0005 f6da moveal 5f6da <Configuration_RTEMS_API+0x2a>,%a2
maximum = Configuration_RTEMS_API.number_of_initialization_tasks;
46f0e: 2639 0005 f6d6 movel 5f6d6 <Configuration_RTEMS_API+0x26>,%d3
/*
* Verify that we have a set of user tasks to iterate
*/
if ( !user_tasks )
46f14: 4a8a tstl %a2
46f16: 6754 beqs 46f6c <_RTEMS_tasks_Initialize_user_tasks_body+0x6c>
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
46f18: 4a83 tstl %d3
46f1a: 6750 beqs 46f6c <_RTEMS_tasks_Initialize_user_tasks_body+0x6c><== NEVER TAKEN
46f1c: 280e movel %fp,%d4 46f1e: 4282 clrl %d2 46f20: 5984 subql #4,%d4 46f22: 47f9 0004 6cd8 lea 46cd8 <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(
46f28: 49f9 0004 6f88 lea 46f88 <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(
46f2e: 2f04 movel %d4,%sp@- 46f30: 2f2a 000c movel %a2@(12),%sp@- 46f34: 2f2a 0014 movel %a2@(20),%sp@- 46f38: 2f2a 0004 movel %a2@(4),%sp@- 46f3c: 2f2a 0008 movel %a2@(8),%sp@- 46f40: 2f12 movel %a2@,%sp@- 46f42: 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 ) )
46f44: 4fef 0018 lea %sp@(24),%sp 46f48: 4a80 tstl %d0
46f4a: 662a bnes 46f76 <_RTEMS_tasks_Initialize_user_tasks_body+0x76>
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
return_value = rtems_task_start(
46f4c: 2f2a 0018 movel %a2@(24),%sp@- 46f50: 2f2a 0010 movel %a2@(16),%sp@- 46f54: 2f2e fffc movel %fp@(-4),%sp@- 46f58: 4e94 jsr %a4@
id,
user_tasks[ index ].entry_point,
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
46f5a: 4fef 000c lea %sp@(12),%sp 46f5e: 4a80 tstl %d0
46f60: 6614 bnes 46f76 <_RTEMS_tasks_Initialize_user_tasks_body+0x76>
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
46f62: 5282 addql #1,%d2 46f64: 45ea 001c lea %a2@(28),%a2 46f68: b682 cmpl %d2,%d3
46f6a: 66c2 bnes 46f2e <_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 );
}
}
46f6c: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 46f72: 4e5e unlk %fp 46f74: 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 );
46f76: 2f00 movel %d0,%sp@- 46f78: 4878 0001 pea 1 <ADD> 46f7c: 4878 0001 pea 1 <ADD> 46f80: 4eb9 0004 7ec8 jsr 47ec8 <_Internal_error_Occurred>
...
0004c926 <_RTEMS_tasks_Switch_extension>:
void _RTEMS_tasks_Switch_extension(
Thread_Control *executing,
Thread_Control *heir
)
{
4c926: 4e56 0000 linkw %fp,#0 4c92a: 206e 0008 moveal %fp@(8),%a0
/*
* Per Task Variables
*/
tvp = executing->task_variables;
4c92e: 2068 010a moveal %a0@(266),%a0
while (tvp) {
4c932: 4a88 tstl %a0
4c934: 6712 beqs 4c948 <_RTEMS_tasks_Switch_extension+0x22>
tvp->tval = *tvp->ptr;
4c936: 2268 0004 moveal %a0@(4),%a1 4c93a: 2151 000c movel %a1@,%a0@(12)
*tvp->ptr = tvp->gval;
4c93e: 22a8 0008 movel %a0@(8),%a1@
tvp = (rtems_task_variable_t *)tvp->next;
4c942: 2050 moveal %a0@,%a0
/*
* Per Task Variables
*/
tvp = executing->task_variables;
while (tvp) {
4c944: 4a88 tstl %a0
4c946: 66ee bnes 4c936 <_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;
4c948: 206e 000c moveal %fp@(12),%a0 4c94c: 2068 010a moveal %a0@(266),%a0
while (tvp) {
4c950: 4a88 tstl %a0
4c952: 6712 beqs 4c966 <_RTEMS_tasks_Switch_extension+0x40>
tvp->gval = *tvp->ptr;
4c954: 2268 0004 moveal %a0@(4),%a1 4c958: 2151 0008 movel %a1@,%a0@(8)
*tvp->ptr = tvp->tval;
4c95c: 22a8 000c movel %a0@(12),%a1@
tvp = (rtems_task_variable_t *)tvp->next;
4c960: 2050 moveal %a0@,%a0
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
while (tvp) {
4c962: 4a88 tstl %a0
4c964: 66ee bnes 4c954 <_RTEMS_tasks_Switch_extension+0x2e><== NEVER TAKEN
tvp->gval = *tvp->ptr;
*tvp->ptr = tvp->tval;
tvp = (rtems_task_variable_t *)tvp->next;
}
}
4c966: 4e5e unlk %fp <== NOT EXECUTED
00047e14 <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
47e14: 4e56 fffc linkw %fp,#-4 47e18: 2f0a movel %a2,%sp@- 47e1a: 486e fffc pea %fp@(-4) 47e1e: 2f2e 0008 movel %fp@(8),%sp@- 47e22: 4879 0006 2e4c pea 62e4c <_Rate_monotonic_Information> 47e28: 4eb9 0004 9dd4 jsr 49dd4 <_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 ) {
47e2e: 4fef 000c lea %sp@(12),%sp 47e32: 2440 moveal %d0,%a2 47e34: 4aae fffc tstl %fp@(-4)
47e38: 663c bnes 47e76 <_Rate_monotonic_Timeout+0x62> <== NEVER TAKEN
case OBJECTS_LOCAL:
the_thread = the_period->owner;
47e3a: 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);
47e3e: 2028 0010 movel %a0@(16),%d0 47e42: 0280 0000 4000 andil #16384,%d0
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
47e48: 670a beqs 47e54 <_Rate_monotonic_Timeout+0x40>
47e4a: 202a 0008 movel %a2@(8),%d0 47e4e: b0a8 0020 cmpl %a0@(32),%d0
47e52: 676a beqs 47ebe <_Rate_monotonic_Timeout+0xaa>
_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 ) {
47e54: 7001 moveq #1,%d0 47e56: b0aa 0038 cmpl %a2@(56),%d0
47e5a: 6722 beqs 47e7e <_Rate_monotonic_Timeout+0x6a> <== NEVER TAKEN
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else
the_period->state = RATE_MONOTONIC_EXPIRED;
47e5c: 7004 moveq #4,%d0 47e5e: 2540 0038 movel %d0,%a2@(56)
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
47e62: 2039 0006 2f42 movel 62f42 <_Thread_Dispatch_disable_level>,%d0 47e68: 5380 subql #1,%d0 47e6a: 23c0 0006 2f42 movel %d0,62f42 <_Thread_Dispatch_disable_level>
return _Thread_Dispatch_disable_level;
47e70: 2039 0006 2f42 movel 62f42 <_Thread_Dispatch_disable_level>,%d0
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
47e76: 246e fff8 moveal %fp@(-8),%a2 47e7a: 4e5e unlk %fp 47e7c: 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;
47e7e: 103c 0003 moveb #3,%d0 47e82: 2540 0038 movel %d0,%a2@(56)
_Rate_monotonic_Initiate_statistics( the_period );
47e86: 2f0a movel %a2,%sp@- 47e88: 4eb9 0004 77b0 jsr 477b0 <_Rate_monotonic_Initiate_statistics>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
47e8e: 256a 003c 001c movel %a2@(60),%a2@(28)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
47e94: 486a 0010 pea %a2@(16) 47e98: 4879 0006 2ffa pea 62ffa <_Watchdog_Ticks_chain> 47e9e: 4eb9 0004 ba94 jsr 4ba94 <_Watchdog_Insert> 47ea4: 4fef 000c lea %sp@(12),%sp
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
47ea8: 2039 0006 2f42 movel 62f42 <_Thread_Dispatch_disable_level>,%d0 47eae: 5380 subql #1,%d0 47eb0: 23c0 0006 2f42 movel %d0,62f42 <_Thread_Dispatch_disable_level>
return _Thread_Dispatch_disable_level;
47eb6: 2039 0006 2f42 movel 62f42 <_Thread_Dispatch_disable_level>,%d0 47ebc: 60b8 bras 47e76 <_Rate_monotonic_Timeout+0x62>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
47ebe: 2f3c 1003 fff8 movel #268697592,%sp@- 47ec4: 2f08 movel %a0,%sp@- 47ec6: 4eb9 0004 a7a0 jsr 4a7a0 <_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 );
47ecc: 2f0a movel %a2,%sp@- 47ece: 4eb9 0004 77b0 jsr 477b0 <_Rate_monotonic_Initiate_statistics>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
47ed4: 256a 003c 001c movel %a2@(60),%a2@(28)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
47eda: 486a 0010 pea %a2@(16) 47ede: 4879 0006 2ffa pea 62ffa <_Watchdog_Ticks_chain> 47ee4: 4eb9 0004 ba94 jsr 4ba94 <_Watchdog_Insert> 47eea: 4fef 0014 lea %sp@(20),%sp
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
47eee: 2039 0006 2f42 movel 62f42 <_Thread_Dispatch_disable_level>,%d0 47ef4: 5380 subql #1,%d0 47ef6: 23c0 0006 2f42 movel %d0,62f42 <_Thread_Dispatch_disable_level>
return _Thread_Dispatch_disable_level;
47efc: 2039 0006 2f42 movel 62f42 <_Thread_Dispatch_disable_level>,%d0 47f02: 6000 ff72 braw 47e76 <_Rate_monotonic_Timeout+0x62>
...
0005e5fc <_Region_Process_queue>:
*/
void _Region_Process_queue(
Region_Control *the_region
)
{
5e5fc: 4e56 ffe4 linkw %fp,#-28
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
5e600: 2039 0007 dd4c movel 7dd4c <_Thread_Dispatch_disable_level>,%d0 5e606: 5280 addql #1,%d0 5e608: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 5e60c: 23c0 0007 dd4c movel %d0,7dd4c <_Thread_Dispatch_disable_level> 5e612: 266e 0008 moveal %fp@(8),%a3
return _Thread_Dispatch_disable_level;
5e616: 2039 0007 dd4c movel 7dd4c <_Thread_Dispatch_disable_level>,%d0
* NOTE: Be sure to disable dispatching before unlocking the mutex * since we do not want to open a window where a context * switch could occur. */ _Thread_Disable_dispatch(); _RTEMS_Unlock_allocator();
5e61c: 2f39 0007 ddec movel 7ddec <_RTEMS_Allocator_Mutex>,%sp@- 5e622: 240b movel %a3,%d2 5e624: 0682 0000 0010 addil #16,%d2
RTEMS_INLINE_ROUTINE void *_Region_Allocate_segment (
Region_Control *the_region,
uintptr_t size
)
{
return _Heap_Allocate( &the_region->Memory, size );
5e62a: 260b movel %a3,%d3 5e62c: 49f9 0005 ee48 lea 5ee48 <_Thread_queue_First>,%a4 5e632: 0683 0000 0068 addil #104,%d3 5e638: 4bf9 0005 8e2c lea 58e2c <_Heap_Allocate_aligned_with_boundary>,%a5 5e63e: 4eb9 0005 8224 jsr 58224 <_API_Mutex_Unlock> 5e644: 588f addql #4,%sp
if ( the_segment == NULL )
break;
*(void **)the_thread->Wait.return_argument = the_segment;
the_region->number_of_used_blocks += 1;
_Thread_queue_Extract( &the_region->Wait_queue, the_thread );
5e646: 283c 0005 ed2c movel #388396,%d4
/*
* NOTE: The following loop is O(n) where n is the number of
* threads whose memory request is satisfied.
*/
for ( ; ; ) {
the_thread = _Thread_queue_First( &the_region->Wait_queue );
5e64c: 2f02 movel %d2,%sp@- 5e64e: 4e94 jsr %a4@
if ( the_thread == NULL )
5e650: 588f addql #4,%sp
/*
* NOTE: The following loop is O(n) where n is the number of
* threads whose memory request is satisfied.
*/
for ( ; ; ) {
the_thread = _Thread_queue_First( &the_region->Wait_queue );
5e652: 2440 moveal %d0,%a2
if ( the_thread == NULL )
5e654: 4a80 tstl %d0
5e656: 6738 beqs 5e690 <_Region_Process_queue+0x94>
5e658: 42a7 clrl %sp@- 5e65a: 42a7 clrl %sp@- 5e65c: 2f2a 0024 movel %a2@(36),%sp@- 5e660: 2f03 movel %d3,%sp@- 5e662: 4e95 jsr %a5@
the_segment = (void **) _Region_Allocate_segment(
the_region,
the_thread->Wait.count
);
if ( the_segment == NULL )
5e664: 4fef 0010 lea %sp@(16),%sp 5e668: 4a80 tstl %d0
5e66a: 6724 beqs 5e690 <_Region_Process_queue+0x94>
break;
*(void **)the_thread->Wait.return_argument = the_segment;
5e66c: 206a 0028 moveal %a2@(40),%a0 5e670: 2080 movel %d0,%a0@
the_region->number_of_used_blocks += 1;
5e672: 52ab 0064 addql #1,%a3@(100)
_Thread_queue_Extract( &the_region->Wait_queue, the_thread );
5e676: 2044 moveal %d4,%a0 5e678: 2f0a movel %a2,%sp@- 5e67a: 2f02 movel %d2,%sp@- 5e67c: 4e90 jsr %a0@
the_thread->Wait.return_code = RTEMS_SUCCESSFUL;
}
5e67e: 508f addql #8,%sp
break;
*(void **)the_thread->Wait.return_argument = the_segment;
the_region->number_of_used_blocks += 1;
_Thread_queue_Extract( &the_region->Wait_queue, the_thread );
the_thread->Wait.return_code = RTEMS_SUCCESSFUL;
5e680: 42aa 0034 clrl %a2@(52)
/*
* NOTE: The following loop is O(n) where n is the number of
* threads whose memory request is satisfied.
*/
for ( ; ; ) {
the_thread = _Thread_queue_First( &the_region->Wait_queue );
5e684: 2f02 movel %d2,%sp@- 5e686: 4e94 jsr %a4@
if ( the_thread == NULL )
5e688: 588f addql #4,%sp
/*
* NOTE: The following loop is O(n) where n is the number of
* threads whose memory request is satisfied.
*/
for ( ; ; ) {
the_thread = _Thread_queue_First( &the_region->Wait_queue );
5e68a: 2440 moveal %d0,%a2
if ( the_thread == NULL )
5e68c: 4a80 tstl %d0
5e68e: 66c8 bnes 5e658 <_Region_Process_queue+0x5c>
the_region->number_of_used_blocks += 1;
_Thread_queue_Extract( &the_region->Wait_queue, the_thread );
the_thread->Wait.return_code = RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
}
5e690: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 5e696: 4e5e unlk %fp
*(void **)the_thread->Wait.return_argument = the_segment;
the_region->number_of_used_blocks += 1;
_Thread_queue_Extract( &the_region->Wait_queue, the_thread );
the_thread->Wait.return_code = RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
5e698: 4ef9 0005 ad04 jmp 5ad04 <_Thread_Enable_dispatch>
...
00049174 <_Scheduler_EDF_Allocate>:
#include <rtems/score/wkspace.h>
void *_Scheduler_EDF_Allocate(
Thread_Control *the_thread
)
{
49174: 4e56 0000 linkw %fp,#0 49178: 2f0a movel %a2,%sp@-
void *sched;
Scheduler_EDF_Per_thread *schinfo;
sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) );
4917a: 4878 0018 pea 18 <OPER2+0x4>
#include <rtems/score/wkspace.h>
void *_Scheduler_EDF_Allocate(
Thread_Control *the_thread
)
{
4917e: 246e 0008 moveal %fp@(8),%a2
void *sched;
Scheduler_EDF_Per_thread *schinfo;
sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) );
49182: 4eb9 0004 acfe jsr 4acfe <_Workspace_Allocate>
if ( sched ) {
49188: 588f addql #4,%sp 4918a: 4a80 tstl %d0
4918c: 670e beqs 4919c <_Scheduler_EDF_Allocate+0x28> <== NEVER TAKEN
the_thread->scheduler_info = sched;
4918e: 2540 008a movel %d0,%a2@(138)
schinfo = (Scheduler_EDF_Per_thread *)(the_thread->scheduler_info);
schinfo->thread = the_thread;
49192: 2040 moveal %d0,%a0
schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN;
49194: 7202 moveq #2,%d1
sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) );
if ( sched ) {
the_thread->scheduler_info = sched;
schinfo = (Scheduler_EDF_Per_thread *)(the_thread->scheduler_info);
schinfo->thread = the_thread;
49196: 208a movel %a2,%a0@
schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN;
49198: 2141 0014 movel %d1,%a0@(20)
}
return sched;
}
4919c: 246e fffc moveal %fp@(-4),%a2
491a0: 4e5e unlk %fp <== NOT EXECUTED
000491a4 <_Scheduler_EDF_Block>:
#include <rtems/score/thread.h>
void _Scheduler_EDF_Block(
Thread_Control *the_thread
)
{
491a4: 4e56 0000 linkw %fp,#0 491a8: 2f02 movel %d2,%sp@- 491aa: 242e 0008 movel %fp@(8),%d2
_Scheduler_EDF_Extract( the_thread );
491ae: 2f02 movel %d2,%sp@- 491b0: 4eb9 0004 922c jsr 4922c <_Scheduler_EDF_Extract>
/* TODO: flash critical section? */
if ( _Thread_Is_heir( the_thread ) )
491b6: 588f addql #4,%sp 491b8: b4b9 0006 2d36 cmpl 62d36 <_Per_CPU_Information+0x10>,%d2
491be: 6720 beqs 491e0 <_Scheduler_EDF_Block+0x3c> <== ALWAYS TAKEN
_Scheduler_EDF_Schedule();
if ( _Thread_Is_executing( the_thread ) )
491c0: b4b9 0006 2d32 cmpl 62d32 <_Per_CPU_Information+0xc>,%d2 <== NOT EXECUTED 491c6: 6708 beqs 491d0 <_Scheduler_EDF_Block+0x2c> <== NOT EXECUTED
_Thread_Dispatch_necessary = true;
}
491c8: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 491cc: 4e5e unlk %fp <== NOT EXECUTED 491ce: 4e75 rts <== NOT EXECUTED
491d0: 242e fffc movel %fp@(-4),%d2 491d4: 4e5e unlk %fp
if ( _Thread_Is_heir( the_thread ) )
_Scheduler_EDF_Schedule();
if ( _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
491d6: 7001 moveq #1,%d0 491d8: 13c0 0006 2d3e moveb %d0,62d3e <_Per_CPU_Information+0x18>
}
491de: 4e75 rts
_Scheduler_EDF_Extract( the_thread );
/* TODO: flash critical section? */
if ( _Thread_Is_heir( the_thread ) )
_Scheduler_EDF_Schedule();
491e0: 4eb9 0004 9364 jsr 49364 <_Scheduler_EDF_Schedule>
if ( _Thread_Is_executing( the_thread ) )
491e6: b4b9 0006 2d32 cmpl 62d32 <_Per_CPU_Information+0xc>,%d2
491ec: 66da bnes 491c8 <_Scheduler_EDF_Block+0x24> <== NEVER TAKEN
491ee: 60e0 bras 491d0 <_Scheduler_EDF_Block+0x2c>
00049258 <_Scheduler_EDF_Free>:
#include <rtems/score/wkspace.h>
void _Scheduler_EDF_Free(
Thread_Control *the_thread
)
{
49258: 4e56 0000 linkw %fp,#0 4925c: 206e 0008 moveal %fp@(8),%a0
_Workspace_Free( the_thread->scheduler_info );
49260: 2d68 008a 0008 movel %a0@(138),%fp@(8)
}
49266: 4e5e unlk %fp
void _Scheduler_EDF_Free(
Thread_Control *the_thread
)
{
_Workspace_Free( the_thread->scheduler_info );
49268: 4ef9 0004 ad1a jmp 4ad1a <_Workspace_Free>
...
00049310 <_Scheduler_EDF_Release_job>:
void _Scheduler_EDF_Release_job(
Thread_Control *the_thread,
uint32_t deadline
)
{
49310: 4e56 0000 linkw %fp,#0 49314: 206e 0008 moveal %fp@(8),%a0 49318: 202e 000c movel %fp@(12),%d0
Priority_Control new_priority;
if (deadline) {
4931c: 661e bnes 4933c <_Scheduler_EDF_Release_job+0x2c><== ALWAYS TAKEN
new_priority = (_Watchdog_Ticks_since_boot + deadline)
& ~SCHEDULER_EDF_PRIO_MSB;
}
else {
/* Switch back to background priority. */
new_priority = the_thread->Start.initial_priority;
4931e: 2028 00ac movel %a0@(172),%d0 <== NOT EXECUTED
}
the_thread->real_priority = new_priority;
_Thread_Change_priority(the_thread, new_priority, true);
49322: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 49326: 2f00 movel %d0,%sp@- <== NOT EXECUTED
else {
/* Switch back to background priority. */
new_priority = the_thread->Start.initial_priority;
}
the_thread->real_priority = new_priority;
49328: 2140 0018 movel %d0,%a0@(24) <== NOT EXECUTED
_Thread_Change_priority(the_thread, new_priority, true);
4932c: 2f08 movel %a0,%sp@- <== NOT EXECUTED 4932e: 4eb9 0004 96c0 jsr 496c0 <_Thread_Change_priority> <== NOT EXECUTED 49334: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
}
49338: 4e5e unlk %fp <== NOT EXECUTED 4933a: 4e75 rts <== NOT EXECUTED
{
Priority_Control new_priority;
if (deadline) {
/* Initializing or shifting deadline. */
new_priority = (_Watchdog_Ticks_since_boot + deadline)
4933c: 2239 0006 29d2 movel 629d2 <_Watchdog_Ticks_since_boot>,%d1
/* Switch back to background priority. */
new_priority = the_thread->Start.initial_priority;
}
the_thread->real_priority = new_priority;
_Thread_Change_priority(the_thread, new_priority, true);
49342: 4878 0001 pea 1 <ADD>
{
Priority_Control new_priority;
if (deadline) {
/* Initializing or shifting deadline. */
new_priority = (_Watchdog_Ticks_since_boot + deadline)
49346: d081 addl %d1,%d0 49348: 0880 001f bclr #31,%d0
/* Switch back to background priority. */
new_priority = the_thread->Start.initial_priority;
}
the_thread->real_priority = new_priority;
_Thread_Change_priority(the_thread, new_priority, true);
4934c: 2f00 movel %d0,%sp@-
else {
/* Switch back to background priority. */
new_priority = the_thread->Start.initial_priority;
}
the_thread->real_priority = new_priority;
4934e: 2140 0018 movel %d0,%a0@(24)
_Thread_Change_priority(the_thread, new_priority, true);
49352: 2f08 movel %a0,%sp@- 49354: 4eb9 0004 96c0 jsr 496c0 <_Thread_Change_priority> 4935a: 4fef 000c lea %sp@(12),%sp
}
4935e: 4e5e unlk %fp
...
00049388 <_Scheduler_EDF_Unblock>:
#include <rtems/score/scheduleredf.h>
void _Scheduler_EDF_Unblock(
Thread_Control *the_thread
)
{
49388: 4e56 0000 linkw %fp,#0 4938c: 2f0a movel %a2,%sp@- 4938e: 246e 0008 moveal %fp@(8),%a2
_Scheduler_EDF_Enqueue(the_thread);
49392: 2f0a movel %a2,%sp@- 49394: 4eb9 0004 91fc jsr 491fc <_Scheduler_EDF_Enqueue> 4939a: 2f2a 0014 movel %a2@(20),%sp@-
* 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 ( _Scheduler_Is_priority_lower_than(
4939e: 2079 0006 2d36 moveal 62d36 <_Per_CPU_Information+0x10>,%a0 493a4: 2f28 0014 movel %a0@(20),%sp@- 493a8: 2079 0006 0f8e moveal 60f8e <_Scheduler+0x30>,%a0 493ae: 4e90 jsr %a0@ 493b0: 4fef 000c lea %sp@(12),%sp 493b4: 4a80 tstl %d0
493b6: 6d08 blts 493c0 <_Scheduler_EDF_Unblock+0x38>
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
}
}
493b8: 246e fffc moveal %fp@(-4),%a2 493bc: 4e5e unlk %fp 493be: 4e75 rts
*/
if ( _Scheduler_Is_priority_lower_than(
_Thread_Heir->current_priority,
the_thread->current_priority )) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
493c0: 2079 0006 2d32 moveal 62d32 <_Per_CPU_Information+0xc>,%a0
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( _Scheduler_Is_priority_lower_than(
_Thread_Heir->current_priority,
the_thread->current_priority )) {
_Thread_Heir = the_thread;
493c6: 23ca 0006 2d36 movel %a2,62d36 <_Per_CPU_Information+0x10>
if ( _Thread_Executing->is_preemptible ||
493cc: 4a28 0074 tstb %a0@(116)
493d0: 6710 beqs 493e2 <_Scheduler_EDF_Unblock+0x5a> <== NEVER TAKEN
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
493d2: 7001 moveq #1,%d0 493d4: 13c0 0006 2d3e moveb %d0,62d3e <_Per_CPU_Information+0x18>
} }
493da: 246e fffc moveal %fp@(-4),%a2 493de: 4e5e unlk %fp 493e0: 4e75 rts
*/
if ( _Scheduler_Is_priority_lower_than(
_Thread_Heir->current_priority,
the_thread->current_priority )) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
493e2: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 493e6: 66d0 bnes 493b8 <_Scheduler_EDF_Unblock+0x30> <== NOT EXECUTED
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
493e8: 7001 moveq #1,%d0 <== NOT EXECUTED 493ea: 13c0 0006 2d3e moveb %d0,62d3e <_Per_CPU_Information+0x18> <== NOT EXECUTED 493f0: 60e8 bras 493da <_Scheduler_EDF_Unblock+0x52> <== NOT EXECUTED
...
000493f4 <_Scheduler_EDF_Update>:
{
Scheduler_EDF_Per_thread *sched_info =
(Scheduler_EDF_Per_thread*)the_thread->scheduler_info;
RBTree_Node *the_node = &(sched_info->Node);
if (sched_info->queue_state == SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN) {
493f4: 7202 moveq #2,%d1
#include <rtems/score/thread.h>
void _Scheduler_EDF_Update(
Thread_Control *the_thread
)
{
493f6: 4e56 0000 linkw %fp,#0 493fa: 2f0a movel %a2,%sp@- 493fc: 246e 0008 moveal %fp@(8),%a2
Scheduler_EDF_Per_thread *sched_info =
49400: 206a 008a moveal %a2@(138),%a0
(Scheduler_EDF_Per_thread*)the_thread->scheduler_info;
RBTree_Node *the_node = &(sched_info->Node);
if (sched_info->queue_state == SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN) {
49404: 2028 0014 movel %a0@(20),%d0
#include <rtems/score/thread.h>
void _Scheduler_EDF_Update(
Thread_Control *the_thread
)
{
49408: 2f02 movel %d2,%sp@-
Scheduler_EDF_Per_thread *sched_info =
(Scheduler_EDF_Per_thread*)the_thread->scheduler_info;
RBTree_Node *the_node = &(sched_info->Node);
if (sched_info->queue_state == SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN) {
4940a: b280 cmpl %d0,%d1
4940c: 6712 beqs 49420 <_Scheduler_EDF_Update+0x2c>
the_thread->real_priority = the_thread->Start.initial_priority;
the_thread->current_priority = the_thread->Start.initial_priority;
sched_info->queue_state = SCHEDULER_EDF_QUEUE_STATE_NOT_PRESENTLY;
}
if ( sched_info->queue_state == SCHEDULER_EDF_QUEUE_STATE_YES ) {
4940e: 7201 moveq #1,%d1 49410: b280 cmpl %d0,%d1
49412: 6730 beqs 49444 <_Scheduler_EDF_Update+0x50> <== NEVER TAKEN
if ( _Thread_Executing->is_preemptible ||
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
}
}
}
49414: 242e fff8 movel %fp@(-8),%d2 49418: 246e fffc moveal %fp@(-4),%a2 4941c: 4e5e unlk %fp 4941e: 4e75 rts
(Scheduler_EDF_Per_thread*)the_thread->scheduler_info;
RBTree_Node *the_node = &(sched_info->Node);
if (sched_info->queue_state == SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN) {
/* Shifts the priority to the region of background tasks. */
the_thread->Start.initial_priority |= (SCHEDULER_EDF_PRIO_MSB);
49420: 202a 00ac movel %a2@(172),%d0 49424: 08c0 001f bset #31,%d0
if ( _Thread_Executing->is_preemptible ||
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
}
}
}
49428: 242e fff8 movel %fp@(-8),%d2
(Scheduler_EDF_Per_thread*)the_thread->scheduler_info;
RBTree_Node *the_node = &(sched_info->Node);
if (sched_info->queue_state == SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN) {
/* Shifts the priority to the region of background tasks. */
the_thread->Start.initial_priority |= (SCHEDULER_EDF_PRIO_MSB);
4942c: 2540 00ac movel %d0,%a2@(172)
the_thread->real_priority = the_thread->Start.initial_priority;
49430: 2540 0018 movel %d0,%a2@(24)
the_thread->current_priority = the_thread->Start.initial_priority;
49434: 2540 0014 movel %d0,%a2@(20)
if ( _Thread_Executing->is_preemptible ||
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
}
}
}
49438: 246e fffc moveal %fp@(-4),%a2 4943c: 4e5e unlk %fp
if (sched_info->queue_state == SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN) {
/* Shifts the priority to the region of background tasks. */
the_thread->Start.initial_priority |= (SCHEDULER_EDF_PRIO_MSB);
the_thread->real_priority = the_thread->Start.initial_priority;
the_thread->current_priority = the_thread->Start.initial_priority;
sched_info->queue_state = SCHEDULER_EDF_QUEUE_STATE_NOT_PRESENTLY;
4943e: 42a8 0014 clrl %a0@(20)
if ( _Thread_Executing->is_preemptible ||
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
}
}
}
49442: 4e75 rts
Thread_Control *the_thread
)
{
Scheduler_EDF_Per_thread *sched_info =
(Scheduler_EDF_Per_thread*)the_thread->scheduler_info;
RBTree_Node *the_node = &(sched_info->Node);
49444: 2408 movel %a0,%d2 <== NOT EXECUTED 49446: 5882 addql #4,%d2 <== NOT EXECUTED
the_thread->current_priority = the_thread->Start.initial_priority;
sched_info->queue_state = SCHEDULER_EDF_QUEUE_STATE_NOT_PRESENTLY;
}
if ( sched_info->queue_state == SCHEDULER_EDF_QUEUE_STATE_YES ) {
_RBTree_Extract(&_Scheduler_EDF_Ready_queue, the_node);
49448: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4944a: 4879 0006 2d48 pea 62d48 <_Scheduler_EDF_Ready_queue> <== NOT EXECUTED 49450: 4eb9 0004 deb8 jsr 4deb8 <_RBTree_Extract> <== NOT EXECUTED
_RBTree_Insert(&_Scheduler_EDF_Ready_queue, the_node);
49456: 2f02 movel %d2,%sp@- <== NOT EXECUTED 49458: 4879 0006 2d48 pea 62d48 <_Scheduler_EDF_Ready_queue> <== NOT EXECUTED 4945e: 4eb9 0004 e0e2 jsr 4e0e2 <_RBTree_Insert> <== NOT EXECUTED
_Scheduler_EDF_Schedule();
49464: 4eb9 0004 9364 jsr 49364 <_Scheduler_EDF_Schedule> <== NOT EXECUTED
if ( _Thread_Executing != _Thread_Heir ) {
4946a: 2079 0006 2d32 moveal 62d32 <_Per_CPU_Information+0xc>,%a0 <== NOT EXECUTED 49470: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 49474: b1f9 0006 2d36 cmpal 62d36 <_Per_CPU_Information+0x10>,%a0 <== NOT EXECUTED 4947a: 6798 beqs 49414 <_Scheduler_EDF_Update+0x20> <== NOT EXECUTED
if ( _Thread_Executing->is_preemptible ||
4947c: 4a28 0074 tstb %a0@(116) <== NOT EXECUTED 49480: 6606 bnes 49488 <_Scheduler_EDF_Update+0x94> <== NOT EXECUTED 49482: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 49486: 668c bnes 49414 <_Scheduler_EDF_Update+0x20> <== NOT EXECUTED
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
}
}
}
49488: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED
_Scheduler_EDF_Schedule();
if ( _Thread_Executing != _Thread_Heir ) {
if ( _Thread_Executing->is_preemptible ||
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
4948c: 7001 moveq #1,%d0 <== NOT EXECUTED
}
}
}
4948e: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 49492: 4e5e unlk %fp <== NOT EXECUTED
_Scheduler_EDF_Schedule();
if ( _Thread_Executing != _Thread_Heir ) {
if ( _Thread_Executing->is_preemptible ||
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
49494: 13c0 0006 2d3e moveb %d0,62d3e <_Per_CPU_Information+0x18> <== NOT EXECUTED
}
}
}
0004949c <_Scheduler_EDF_Yield>:
Thread_Control *executing = _Thread_Executing;
Scheduler_EDF_Per_thread *executing_info =
(Scheduler_EDF_Per_thread *) executing->scheduler_info;
RBTree_Node *executing_node = &(executing_info->Node);
_ISR_Disable( level );
4949c: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED
#include <rtems/score/scheduler.h>
#include <rtems/score/scheduleredf.h>
#include <rtems/score/thread.h>
void _Scheduler_EDF_Yield(void)
{
494a2: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 494a6: 48d7 040c moveml %d2-%d3/%a2,%sp@ <== NOT EXECUTED
Scheduler_EDF_Per_thread *first_info;
RBTree_Node *first_node;
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
494aa: 2479 0006 2d32 moveal 62d32 <_Per_CPU_Information+0xc>,%a2 <== NOT EXECUTED
Scheduler_EDF_Per_thread *executing_info =
494b0: 262a 008a movel %a2@(138),%d3 <== NOT EXECUTED
(Scheduler_EDF_Per_thread *) executing->scheduler_info;
RBTree_Node *executing_node = &(executing_info->Node);
_ISR_Disable( level );
494b4: 40c2 movew %sr,%d2 <== NOT EXECUTED 494b6: 8082 orl %d2,%d0 <== NOT EXECUTED 494b8: 46c0 movew %d0,%sr <== NOT EXECUTED
RTEMS_INLINE_ROUTINE bool _RBTree_Has_only_one_node(
const RBTree_Control *the_rbtree
)
{
if(!the_rbtree) return NULL; /* TODO: expected behavior? */
return (the_rbtree->root->child[RBT_LEFT] == NULL && the_rbtree->root->child[RBT_RIGHT] == NULL);
494ba: 2079 0006 2d4c moveal 62d4c <_Scheduler_EDF_Ready_queue+0x4>,%a0<== NOT EXECUTED 494c0: 4aa8 0004 tstl %a0@(4) <== NOT EXECUTED 494c4: 674a beqs 49510 <_Scheduler_EDF_Yield+0x74> <== NOT EXECUTED
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
Scheduler_EDF_Per_thread *executing_info =
(Scheduler_EDF_Per_thread *) executing->scheduler_info;
RBTree_Node *executing_node = &(executing_info->Node);
494c6: 5883 addql #4,%d3 <== NOT EXECUTED
if ( !_RBTree_Has_only_one_node(&_Scheduler_EDF_Ready_queue) ) {
/*
* The RBTree has more than one node, enqueue behind the tasks
* with the same priority in case there are such ones.
*/
_RBTree_Extract( &_Scheduler_EDF_Ready_queue, executing_node );
494c8: 2f03 movel %d3,%sp@- <== NOT EXECUTED 494ca: 4879 0006 2d48 pea 62d48 <_Scheduler_EDF_Ready_queue> <== NOT EXECUTED 494d0: 4eb9 0004 deb8 jsr 4deb8 <_RBTree_Extract> <== NOT EXECUTED
_RBTree_Insert( &_Scheduler_EDF_Ready_queue, executing_node );
494d6: 2f03 movel %d3,%sp@- <== NOT EXECUTED 494d8: 4879 0006 2d48 pea 62d48 <_Scheduler_EDF_Ready_queue> <== NOT EXECUTED 494de: 4eb9 0004 e0e2 jsr 4e0e2 <_RBTree_Insert> <== NOT EXECUTED
_ISR_Flash( level );
494e4: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED 494ea: 46c2 movew %d2,%sr <== NOT EXECUTED 494ec: 8082 orl %d2,%d0 <== NOT EXECUTED 494ee: 46c0 movew %d0,%sr <== NOT EXECUTED
if ( _Thread_Is_heir( executing ) ) {
494f0: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 494f4: b5f9 0006 2d36 cmpal 62d36 <_Per_CPU_Information+0x10>,%a2 <== NOT EXECUTED 494fa: 672c beqs 49528 <_Scheduler_EDF_Yield+0x8c> <== NOT EXECUTED
_Thread_Heir = first_info->thread;
}
_Thread_Dispatch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
_Thread_Dispatch_necessary = true;
494fc: 7001 moveq #1,%d0 <== NOT EXECUTED 494fe: 13c0 0006 2d3e moveb %d0,62d3e <_Per_CPU_Information+0x18> <== NOT EXECUTED
_ISR_Enable( level );
49504: 46c2 movew %d2,%sr <== NOT EXECUTED
}
49506: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 4950c: 4e5e unlk %fp <== NOT EXECUTED 4950e: 4e75 rts <== NOT EXECUTED 49510: 4aa8 0008 tstl %a0@(8) <== NOT EXECUTED 49514: 66b0 bnes 494c6 <_Scheduler_EDF_Yield+0x2a> <== NOT EXECUTED
_RBTree_Container_of(first_node, Scheduler_EDF_Per_thread, Node);
_Thread_Heir = first_info->thread;
}
_Thread_Dispatch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
49516: b5f9 0006 2d36 cmpal 62d36 <_Per_CPU_Information+0x10>,%a2 <== NOT EXECUTED 4951c: 67e6 beqs 49504 <_Scheduler_EDF_Yield+0x68> <== NOT EXECUTED
_Thread_Dispatch_necessary = true;
4951e: 7001 moveq #1,%d0 <== NOT EXECUTED 49520: 13c0 0006 2d3e moveb %d0,62d3e <_Per_CPU_Information+0x18> <== NOT EXECUTED 49526: 60dc bras 49504 <_Scheduler_EDF_Yield+0x68> <== NOT EXECUTED
_RBTree_Insert( &_Scheduler_EDF_Ready_queue, executing_node );
_ISR_Flash( level );
if ( _Thread_Is_heir( executing ) ) {
first_node = _RBTree_Peek( &_Scheduler_EDF_Ready_queue, RBT_LEFT );
49528: 42a7 clrl %sp@- <== NOT EXECUTED 4952a: 4879 0006 2d48 pea 62d48 <_Scheduler_EDF_Ready_queue> <== NOT EXECUTED 49530: 4eb9 0004 e110 jsr 4e110 <_RBTree_Peek> <== NOT EXECUTED
first_info =
_RBTree_Container_of(first_node, Scheduler_EDF_Per_thread, Node);
_Thread_Heir = first_info->thread;
49536: 508f addql #8,%sp <== NOT EXECUTED 49538: 2040 moveal %d0,%a0 <== NOT EXECUTED 4953a: 5988 subql #4,%a0 <== NOT EXECUTED 4953c: 23d0 0006 2d36 movel %a0@,62d36 <_Per_CPU_Information+0x10><== NOT EXECUTED
}
_Thread_Dispatch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
_Thread_Dispatch_necessary = true;
49542: 7001 moveq #1,%d0 <== NOT EXECUTED 49544: 13c0 0006 2d3e moveb %d0,62d3e <_Per_CPU_Information+0x18> <== NOT EXECUTED 4954a: 60b8 bras 49504 <_Scheduler_EDF_Yield+0x68> <== NOT EXECUTED
000487d4 <_Scheduler_Handler_initialization>:
#include <rtems/system.h>
#include <rtems/config.h>
#include <rtems/score/scheduler.h>
void _Scheduler_Handler_initialization(void)
{
487d4: 4e56 0000 linkw %fp,#0
(*_Scheduler.Operations.initialize)(); }
487d8: 4e5e unlk %fp
#include <rtems/config.h>
#include <rtems/score/scheduler.h>
void _Scheduler_Handler_initialization(void)
{
(*_Scheduler.Operations.initialize)();
487da: 2279 0005 f752 moveal 5f752 <_Scheduler+0x4>,%a1 487e0: 4ed1 jmp %a1@
...
00048800 <_Scheduler_priority_Block>:
#include <rtems/score/thread.h>
void _Scheduler_priority_Block(
Thread_Control *the_thread
)
{
48800: 4e56 0000 linkw %fp,#0 48804: 206e 0008 moveal %fp@(8),%a0 48808: 2f0b movel %a3,%sp@- 4880a: 2f0a movel %a2,%sp@-
)
{
Scheduler_priority_Per_thread *sched_info;
Chain_Control *ready;
sched_info = (Scheduler_priority_Per_thread *) the_thread->scheduler_info;
4880c: 2468 008a moveal %a0@(138),%a2
ready = sched_info->ready_chain;
48810: 2252 moveal %a2@,%a1
if ( _Chain_Has_only_one_node( ready ) ) {
48812: 2029 0008 movel %a1@(8),%d0 48816: b091 cmpl %a1@,%d0 48818: 6700 0088 beqw 488a2 <_Scheduler_priority_Block+0xa2>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
4881c: 2450 moveal %a0@,%a2
previous = the_node->previous;
4881e: 2268 0004 moveal %a0@(4),%a1
next->previous = previous;
48822: 2549 0004 movel %a1,%a2@(4)
previous->next = next;
48826: 228a movel %a2,%a1@
_Scheduler_priority_Ready_queue_extract( the_thread );
/* TODO: flash critical section? */
if ( _Thread_Is_heir( the_thread ) )
48828: b1f9 0006 14ae cmpal 614ae <_Per_CPU_Information+0x10>,%a0
4882e: 6720 beqs 48850 <_Scheduler_priority_Block+0x50>
_Scheduler_priority_Schedule_body();
if ( _Thread_Is_executing( the_thread ) )
48830: b1f9 0006 14aa cmpal 614aa <_Per_CPU_Information+0xc>,%a0
48836: 6708 beqs 48840 <_Scheduler_priority_Block+0x40>
_Thread_Dispatch_necessary = true;
}
48838: 245f moveal %sp@+,%a2 4883a: 265f moveal %sp@+,%a3 4883c: 4e5e unlk %fp 4883e: 4e75 rts 48840: 245f moveal %sp@+,%a2
if ( _Thread_Is_heir( the_thread ) )
_Scheduler_priority_Schedule_body();
if ( _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
48842: 7001 moveq #1,%d0
}
48844: 265f moveal %sp@+,%a3 48846: 4e5e unlk %fp
if ( _Thread_Is_heir( the_thread ) )
_Scheduler_priority_Schedule_body();
if ( _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
48848: 13c0 0006 14b6 moveb %d0,614b6 <_Per_CPU_Information+0x18>
}
4884e: 4e75 rts
RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void )
{
Priority_bit_map_Control minor;
Priority_bit_map_Control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
48850: 3039 0006 14c0 movew 614c0 <_Priority_Major_bit_map>,%d0 48856: 4840 swap %d0 48858: 04c0 ff1 %d0
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
4885a: 43f9 0006 14c4 lea 614c4 <_Priority_Bit_map>,%a1 48860: 0280 0000 ffff andil #65535,%d0 48866: 3231 0a00 movew %a1@(00000000,%d0:l:2),%d1 4886a: 4841 swap %d1 4886c: 04c1 ff1 %d1
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
4886e: 2279 0005 f74e moveal 5f74e <_Scheduler>,%a1
return (_Priority_Bits_index( major ) << 4) +
48874: 0281 0000 ffff andil #65535,%d1 4887a: e988 lsll #4,%d0 4887c: d081 addl %d1,%d0
Chain_Control *the_ready_queue
)
{
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
4887e: 2200 movel %d0,%d1 48880: e988 lsll #4,%d0 48882: e589 lsll #2,%d1 48884: 9081 subl %d1,%d0 48886: d3c0 addal %d0,%a1 48888: 2019 movel %a1@+,%d0
return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
return NULL;
4888a: b3c0 cmpal %d0,%a1 4888c: 56c1 sne %d1 4888e: 49c1 extbl %d1
*
* @param[in] the_thread - pointer to thread
*/
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
48890: c081 andl %d1,%d0 48892: 23c0 0006 14ae movel %d0,614ae <_Per_CPU_Information+0x10>
/* TODO: flash critical section? */
if ( _Thread_Is_heir( the_thread ) )
_Scheduler_priority_Schedule_body();
if ( _Thread_Is_executing( the_thread ) )
48898: b1f9 0006 14aa cmpal 614aa <_Per_CPU_Information+0xc>,%a0
4889e: 6698 bnes 48838 <_Scheduler_priority_Block+0x38>
488a0: 609e bras 48840 <_Scheduler_priority_Block+0x40>
RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove (
Priority_bit_map_Information *the_priority_map
)
{
*the_priority_map->minor &= the_priority_map->block_minor;
488a2: 266a 0004 moveal %a2@(4),%a3
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
488a6: 2009 movel %a1,%d0 488a8: 5880 addql #4,%d0 488aa: 2280 movel %d0,%a1@ 488ac: 3213 movew %a3@,%d1 488ae: 302a 000e movew %a2@(14),%d0
head->next = tail;
head->previous = NULL;
488b2: 42a9 0004 clrl %a1@(4) 488b6: c081 andl %d1,%d0
tail->previous = head;
488b8: 2349 0008 movel %a1,%a1@(8) 488bc: 3680 movew %d0,%a3@
if ( *the_priority_map->minor == 0 )
488be: 6600 ff68 bnew 48828 <_Scheduler_priority_Block+0x28>
_Priority_Major_bit_map &= the_priority_map->block_major;
488c2: 3239 0006 14c0 movew 614c0 <_Priority_Major_bit_map>,%d1 488c8: 302a 000c movew %a2@(12),%d0 488cc: c081 andl %d1,%d0 488ce: 33c0 0006 14c0 movew %d0,614c0 <_Priority_Major_bit_map>
{
_Scheduler_priority_Ready_queue_extract( the_thread );
/* TODO: flash critical section? */
if ( _Thread_Is_heir( the_thread ) )
488d4: b1f9 0006 14ae cmpal 614ae <_Per_CPU_Information+0x10>,%a0 488da: 6600 ff54 bnew 48830 <_Scheduler_priority_Block+0x30> 488de: 6000 ff70 braw 48850 <_Scheduler_priority_Block+0x50>
...
000489d8 <_Scheduler_priority_Free>:
#include <rtems/score/wkspace.h>
void _Scheduler_priority_Free (
Thread_Control *the_thread
)
{
489d8: 4e56 0000 linkw %fp,#0 489dc: 206e 0008 moveal %fp@(8),%a0
_Workspace_Free( the_thread->scheduler_info );
489e0: 2d68 008a 0008 movel %a0@(138),%fp@(8)
}
489e6: 4e5e unlk %fp
void _Scheduler_priority_Free (
Thread_Control *the_thread
)
{
_Workspace_Free( the_thread->scheduler_info );
489e8: 4ef9 0004 a2fe jmp 4a2fe <_Workspace_Free>
...
00048ad4 <_Scheduler_priority_Tick>:
#include <rtems/system.h>
#include <rtems/score/schedulerpriority.h>
void _Scheduler_priority_Tick( void )
{
48ad4: 4e56 0000 linkw %fp,#0 48ad8: 2f0a movel %a2,%sp@-
Thread_Control *executing;
executing = _Thread_Executing;
48ada: 2479 0006 14aa moveal 614aa <_Per_CPU_Information+0xc>,%a2
/*
* If the thread is not preemptible or is not ready, then
* just return.
*/
if ( !executing->is_preemptible )
48ae0: 4a2a 0074 tstb %a2@(116)
48ae4: 6720 beqs 48b06 <_Scheduler_priority_Tick+0x32>
return;
if ( !_States_Is_ready( executing->current_state ) )
48ae6: 4aaa 0010 tstl %a2@(16)
48aea: 661a bnes 48b06 <_Scheduler_priority_Tick+0x32>
/*
* The cpu budget algorithm determines what happens next.
*/
switch ( executing->budget_algorithm ) {
48aec: 202a 007a movel %a2@(122),%d0 48af0: 7201 moveq #1,%d1 48af2: b280 cmpl %d0,%d1
48af4: 6210 bhis 48b06 <_Scheduler_priority_Tick+0x32>
48af6: 123c 0002 moveb #2,%d1 48afa: b280 cmpl %d0,%d1
48afc: 642e bccs 48b2c <_Scheduler_priority_Tick+0x58>
48afe: 123c 0003 moveb #3,%d1 48b02: b280 cmpl %d0,%d1
48b04: 6708 beqs 48b0e <_Scheduler_priority_Tick+0x3a> <== ALWAYS TAKEN
if ( --executing->cpu_time_budget == 0 )
(*executing->budget_callout)( executing );
break;
#endif
}
}
48b06: 246e fffc moveal %fp@(-4),%a2 48b0a: 4e5e unlk %fp 48b0c: 4e75 rts
}
break;
#if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
if ( --executing->cpu_time_budget == 0 )
48b0e: 202a 0076 movel %a2@(118),%d0 48b12: 5380 subql #1,%d0 48b14: 2540 0076 movel %d0,%a2@(118)
48b18: 66ec bnes 48b06 <_Scheduler_priority_Tick+0x32> (*executing->budget_callout)( executing );
48b1a: 2f0a movel %a2,%sp@- 48b1c: 206a 007e moveal %a2@(126),%a0 48b20: 4e90 jsr %a0@
break;
#endif
}
}
48b22: 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 );
48b26: 588f addql #4,%sp
break;
#endif
}
}
48b28: 4e5e unlk %fp 48b2a: 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 ) {
48b2c: 202a 0076 movel %a2@(118),%d0 48b30: 5380 subql #1,%d0 48b32: 2540 0076 movel %d0,%a2@(118)
48b36: 6ece bgts 48b06 <_Scheduler_priority_Tick+0x32>
* always operates on the scheduler that 'owns' the currently executing
* thread.
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Yield( void )
{
_Scheduler.Operations.yield();
48b38: 2079 0005 f75a moveal 5f75a <_Scheduler+0xc>,%a0 48b3e: 4e90 jsr %a0@
* 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.
*/
_Scheduler_Yield();
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
48b40: 41f9 0006 1000 lea 61000 <_Thread_Ticks_per_timeslice>,%a0 48b46: 2550 0076 movel %a0@,%a2@(118)
if ( --executing->cpu_time_budget == 0 )
(*executing->budget_callout)( executing );
break;
#endif
}
}
48b4a: 246e fffc moveal %fp@(-4),%a2 48b4e: 4e5e unlk %fp
...
000491d0 <_Scheduler_simple_Block>:
#include <rtems/score/schedulersimple.h>
void _Scheduler_simple_Block(
Thread_Control *the_thread
)
{
491d0: 4e56 0000 linkw %fp,#0 491d4: 2f02 movel %d2,%sp@- 491d6: 242e 0008 movel %fp@(8),%d2
_Scheduler_simple_Extract(the_thread);
491da: 2f02 movel %d2,%sp@- 491dc: 4eb9 0004 9234 jsr 49234 <_Scheduler_simple_Extract>
if ( _Thread_Is_heir( the_thread ) )
491e2: 588f addql #4,%sp 491e4: b4b9 0006 23f6 cmpl 623f6 <_Per_CPU_Information+0x10>,%d2
491ea: 6720 beqs 4920c <_Scheduler_simple_Block+0x3c>
_Scheduler_simple_Schedule();
if ( _Thread_Is_executing( the_thread ) )
491ec: b4b9 0006 23f2 cmpl 623f2 <_Per_CPU_Information+0xc>,%d2
491f2: 6708 beqs 491fc <_Scheduler_simple_Block+0x2c> <== NEVER TAKEN
_Thread_Dispatch_necessary = true;
}
491f4: 242e fffc movel %fp@(-4),%d2 491f8: 4e5e unlk %fp 491fa: 4e75 rts 491fc: 242e fffc movel %fp@(-4),%d2 49200: 4e5e unlk %fp
if ( _Thread_Is_heir( the_thread ) )
_Scheduler_simple_Schedule();
if ( _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
49202: 7001 moveq #1,%d0 49204: 13c0 0006 23fe moveb %d0,623fe <_Per_CPU_Information+0x18>
}
4920a: 4e75 rts
)
{
_Scheduler_simple_Extract(the_thread);
if ( _Thread_Is_heir( the_thread ) )
_Scheduler_simple_Schedule();
4920c: 4eb9 0004 9348 jsr 49348 <_Scheduler_simple_Schedule>
if ( _Thread_Is_executing( the_thread ) )
49212: b4b9 0006 23f2 cmpl 623f2 <_Per_CPU_Information+0xc>,%d2
49218: 66da bnes 491f4 <_Scheduler_simple_Block+0x24> <== NEVER TAKEN
4921a: 60e0 bras 491fc <_Scheduler_simple_Block+0x2c>
00047750 <_TOD_Validate>:
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
47750: 4e56 0000 linkw %fp,#0 47754: 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();
47758: 2039 0006 1a98 movel 61a98 <Configuration+0xc>,%d0
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
4775e: 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) ||
47760: 4a88 tstl %a0
47762: 6762 beqs 477c6 <_TOD_Validate+0x76> <== NEVER TAKEN
)
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
47764: 243c 000f 4240 movel #1000000,%d2 4776a: 4c40 2002 remul %d0,%d2,%d2
rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) ||
4776e: b4a8 0018 cmpl %a0@(24),%d2
47772: 6352 blss 477c6 <_TOD_Validate+0x76>
(the_tod->ticks >= ticks_per_second) ||
47774: 703b moveq #59,%d0 47776: b0a8 0014 cmpl %a0@(20),%d0
4777a: 654a bcss 477c6 <_TOD_Validate+0x76>
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
4777c: b0a8 0010 cmpl %a0@(16),%d0
47780: 6544 bcss 477c6 <_TOD_Validate+0x76>
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
47782: 7217 moveq #23,%d1 47784: b2a8 000c cmpl %a0@(12),%d1
47788: 653c bcss 477c6 <_TOD_Validate+0x76>
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
4778a: 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) ||
4778e: 6736 beqs 477c6 <_TOD_Validate+0x76> <== NEVER TAKEN
(the_tod->month == 0) ||
47790: 740c moveq #12,%d2 47792: b480 cmpl %d0,%d2
47794: 6530 bcss 477c6 <_TOD_Validate+0x76>
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
47796: 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) ||
47798: 0c81 0000 07c3 cmpil #1987,%d1
4779e: 6326 blss 477c6 <_TOD_Validate+0x76>
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
477a0: 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) ||
477a4: 4a88 tstl %a0
477a6: 671e beqs 477c6 <_TOD_Validate+0x76> <== NEVER TAKEN
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
477a8: 143c 0003 moveb #3,%d2
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
477ac: 43f9 0006 0b18 lea 60b18 <_TOD_Days_per_month>,%a1
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
477b2: c282 andl %d2,%d1
477b4: 6618 bnes 477ce <_TOD_Validate+0x7e>
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
477b6: 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(
477ba: b1c0 cmpal %d0,%a0 477bc: 53c0 sls %d0 477be: 4480 negl %d0
if ( the_tod->day > days_in_month )
return false;
return true;
}
477c0: 241f movel %sp@+,%d2 477c2: 4e5e unlk %fp 477c4: 4e75 rts 477c6: 241f movel %sp@+,%d2 477c8: 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;
477ca: 4200 clrb %d0
if ( the_tod->day > days_in_month )
return false;
return true;
}
477cc: 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 ];
477ce: 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(
477d2: b1c0 cmpal %d0,%a0 477d4: 53c0 sls %d0 477d6: 4480 negl %d0 477d8: 60e6 bras 477c0 <_TOD_Validate+0x70>
...
00048d38 <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
48d38: 4e56 fff0 linkw %fp,#-16 48d3c: 48d7 041c moveml %d2-%d4/%a2,%sp@ 48d40: 246e 0008 moveal %fp@(8),%a2
States_Control state, original_state;
/*
* Save original state
*/
original_state = the_thread->current_state;
48d44: 262a 0010 movel %a2@(16),%d3
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
48d48: 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 );
48d4c: 2f0a movel %a2,%sp@-
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
48d4e: 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 );
48d52: 4eb9 0004 9b3c jsr 49b3c <_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 )
48d58: 588f addql #4,%sp 48d5a: b4aa 0014 cmpl %a2@(20),%d2
48d5e: 670c beqs 48d6c <_Thread_Change_priority+0x34>
_Thread_Set_priority( the_thread, new_priority );
48d60: 2f02 movel %d2,%sp@- 48d62: 2f0a movel %a2,%sp@- 48d64: 4eb9 0004 9ad8 jsr 49ad8 <_Thread_Set_priority> 48d6a: 508f addql #8,%sp
_ISR_Disable( level );
48d6c: 203c 0000 0700 movel #1792,%d0 48d72: 40c2 movew %sr,%d2 48d74: 8082 orl %d2,%d0 48d76: 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;
48d78: 202a 0010 movel %a2@(16),%d0
if ( state != STATES_TRANSIENT ) {
48d7c: 7204 moveq #4,%d1 48d7e: b280 cmpl %d0,%d1
48d80: 6738 beqs 48dba <_Thread_Change_priority+0x82>
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
48d82: 44c3 movew %d3,%ccr
48d84: 6708 beqs 48d8e <_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);
48d86: 72fb moveq #-5,%d1 48d88: c280 andl %d0,%d1 48d8a: 2541 0010 movel %d1,%a2@(16)
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
_ISR_Enable( level );
48d8e: 46c2 movew %d2,%sr
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue (
States_Control the_states
)
{
return (the_states & STATES_WAITING_ON_THREAD_QUEUE);
48d90: 0280 0003 bee0 andil #245472,%d0
if ( _States_Is_waiting_on_thread_queue( state ) ) {
48d96: 660a bnes 48da2 <_Thread_Change_priority+0x6a>
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
_ISR_Enable( level );
}
48d98: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 48d9e: 4e5e unlk %fp 48da0: 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 );
48da2: 2d4a 000c movel %a2,%fp@(12) 48da6: 2d6a 0044 0008 movel %a2@(68),%fp@(8)
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
_ISR_Enable( level );
}
48dac: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 48db2: 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 );
48db4: 4ef9 0004 9a28 jmp 49a28 <_Thread_queue_Requeue>
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
48dba: 44c3 movew %d3,%ccr
48dbc: 6714 beqs 48dd2 <_Thread_Change_priority+0x9a> <== NEVER TAKEN
* 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 );
48dbe: 42aa 0010 clrl %a2@(16)
if ( prepend_it )
48dc2: 4a04 tstb %d4
48dc4: 6748 beqs 48e0e <_Thread_Change_priority+0xd6>
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue_first( the_thread );
48dc6: 2f0a movel %a2,%sp@- 48dc8: 2079 0005 f776 moveal 5f776 <_Scheduler+0x28>,%a0 48dce: 4e90 jsr %a0@ 48dd0: 588f addql #4,%sp
_Scheduler_Enqueue_first( the_thread );
else
_Scheduler_Enqueue( the_thread );
}
_ISR_Flash( level );
48dd2: 203c 0000 0700 movel #1792,%d0 48dd8: 46c2 movew %d2,%sr 48dda: 8082 orl %d2,%d0 48ddc: 46c0 movew %d0,%sr
* This kernel routine implements the scheduling decision logic for
* the scheduler. It does NOT dispatch.
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Schedule( void )
{
_Scheduler.Operations.schedule();
48dde: 2079 0005 f756 moveal 5f756 <_Scheduler+0x8>,%a0 48de4: 4e90 jsr %a0@
* is also the heir thread, and false otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void )
{
return ( _Thread_Executing == _Thread_Heir );
48de6: 2079 0006 14aa moveal 614aa <_Per_CPU_Information+0xc>,%a0
* We altered the set of thread priorities. So let's figure out
* who is the heir and if we need to switch to them.
*/
_Scheduler_Schedule();
if ( !_Thread_Is_executing_also_the_heir() &&
48dec: b1f9 0006 14ae cmpal 614ae <_Per_CPU_Information+0x10>,%a0
48df2: 670e beqs 48e02 <_Thread_Change_priority+0xca>
48df4: 4a28 0074 tstb %a0@(116)
48df8: 6708 beqs 48e02 <_Thread_Change_priority+0xca>
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
48dfa: 7001 moveq #1,%d0 48dfc: 13c0 0006 14b6 moveb %d0,614b6 <_Per_CPU_Information+0x18>
_ISR_Enable( level );
48e02: 46c2 movew %d2,%sr
}
48e04: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 48e0a: 4e5e unlk %fp 48e0c: 4e75 rts
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue( the_thread );
48e0e: 2f0a movel %a2,%sp@- 48e10: 2079 0005 f772 moveal 5f772 <_Scheduler+0x24>,%a0 48e16: 4e90 jsr %a0@ 48e18: 588f addql #4,%sp 48e1a: 60b6 bras 48dd2 <_Thread_Change_priority+0x9a>
00048e78 <_Thread_Close>:
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
48e78: 4280 clrl %d0
void _Thread_Close(
Objects_Information *information,
Thread_Control *the_thread
)
{
48e7a: 4e56 0000 linkw %fp,#0 48e7e: 2f0b movel %a3,%sp@- 48e80: 266e 0008 moveal %fp@(8),%a3 48e84: 2f0a movel %a2,%sp@- 48e86: 246e 000c moveal %fp@(12),%a2 48e8a: 206b 0018 moveal %a3@(24),%a0 48e8e: 302a 000a movew %a2@(10),%d0 48e92: 42b0 0c00 clrl %a0@(00000000,%d0:l:4)
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
48e96: 2039 0006 1048 movel 61048 <_Thread_Dispatch_disable_level>,%d0 48e9c: 5380 subql #1,%d0 48e9e: 23c0 0006 1048 movel %d0,61048 <_Thread_Dispatch_disable_level>
return _Thread_Dispatch_disable_level;
48ea4: 2039 0006 1048 movel 61048 <_Thread_Dispatch_disable_level>,%d0
* disappear and set a transient state on it. So we temporarily
* unnest dispatching.
*/
_Thread_Unnest_dispatch();
_User_extensions_Thread_delete( the_thread );
48eaa: 2f0a movel %a2,%sp@- 48eac: 4eb9 0004 9f4c jsr 49f4c <_User_extensions_Thread_delete>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
48eb2: 2039 0006 1048 movel 61048 <_Thread_Dispatch_disable_level>,%d0 48eb8: 5280 addql #1,%d0 48eba: 23c0 0006 1048 movel %d0,61048 <_Thread_Dispatch_disable_level>
return _Thread_Dispatch_disable_level;
48ec0: 2039 0006 1048 movel 61048 <_Thread_Dispatch_disable_level>,%d0
/* * 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 );
48ec6: 2f0a movel %a2,%sp@- 48ec8: 2f0b movel %a3,%sp@- 48eca: 4eb9 0004 801c jsr 4801c <_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 );
48ed0: 4878 0001 pea 1 <ADD> 48ed4: 2f0a movel %a2,%sp@- 48ed6: 4eb9 0004 9af0 jsr 49af0 <_Thread_Set_state>
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
48edc: 2f0a movel %a2,%sp@- 48ede: 4eb9 0004 9934 jsr 49934 <_Thread_queue_Extract_with_proxy> 48ee4: 4fef 0018 lea %sp@(24),%sp 48ee8: 4a00 tstb %d0
48eea: 660a bnes 48ef6 <_Thread_Close+0x7e>
if ( _Watchdog_Is_active( &the_thread->Timer ) )
48eec: 7002 moveq #2,%d0 48eee: b0aa 0050 cmpl %a2@(80),%d0 48ef2: 6700 0088 beqw 48f7c <_Thread_Close+0x104>
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Free(
Thread_Control *the_thread
)
{
return _Scheduler.Operations.free( the_thread );
48ef6: 2f0a movel %a2,%sp@- 48ef8: 2079 0005 f76a moveal 5f76a <_Scheduler+0x1c>,%a0 48efe: 4e90 jsr %a0@
/* * 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 ) )
48f00: 588f addql #4,%sp 48f02: b5f9 0006 10ca cmpal 610ca <_Thread_Allocated_fp>,%a2
48f08: 6736 beqs 48f40 <_Thread_Close+0xc8>
_Thread_Deallocate_fp();
#endif
the_thread->fp_context = NULL;
_Workspace_Free( the_thread->Start.fp_context );
48f0a: 2f2a 00ba movel %a2@(186),%sp@- 48f0e: 47f9 0004 a2fe lea 4a2fe <_Workspace_Free>,%a3
#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;
48f14: 42aa 00f6 clrl %a2@(246)
_Workspace_Free( the_thread->Start.fp_context );
48f18: 4e93 jsr %a3@
/*
* Free the rest of the memory associated with this task
* and set the associated pointers to NULL for safety.
*/
_Thread_Stack_Free( the_thread );
48f1a: 2f0a movel %a2,%sp@- 48f1c: 4eb9 0004 9be8 jsr 49be8 <_Thread_Stack_Free>
the_thread->Start.stack = NULL;
_Workspace_Free( the_thread->extensions );
48f22: 2f2a 0106 movel %a2@(262),%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;
48f26: 42aa 00be clrl %a2@(190)
_Workspace_Free( the_thread->extensions );
48f2a: 4e93 jsr %a3@
the_thread->extensions = NULL; }
48f2c: 266e fffc moveal %fp@(-4),%a3
*/
_Thread_Stack_Free( the_thread );
the_thread->Start.stack = NULL;
_Workspace_Free( the_thread->extensions );
the_thread->extensions = NULL;
48f30: 4fef 000c lea %sp@(12),%sp 48f34: 42aa 0106 clrl %a2@(262)
}
48f38: 246e fff8 moveal %fp@(-8),%a2 48f3c: 4e5e unlk %fp 48f3e: 4e75 rts
if ( _Thread_Is_allocated_fp( the_thread ) )
_Thread_Deallocate_fp();
#endif
the_thread->fp_context = NULL;
_Workspace_Free( the_thread->Start.fp_context );
48f40: 2f2a 00ba movel %a2@(186),%sp@- 48f44: 47f9 0004 a2fe lea 4a2fe <_Workspace_Free>,%a3
#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;
48f4a: 42aa 00f6 clrl %a2@(246)
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void )
{
_Thread_Allocated_fp = NULL;
48f4e: 42b9 0006 10ca clrl 610ca <_Thread_Allocated_fp>
_Workspace_Free( the_thread->Start.fp_context );
48f54: 4e93 jsr %a3@
/*
* Free the rest of the memory associated with this task
* and set the associated pointers to NULL for safety.
*/
_Thread_Stack_Free( the_thread );
48f56: 2f0a movel %a2,%sp@- 48f58: 4eb9 0004 9be8 jsr 49be8 <_Thread_Stack_Free>
the_thread->Start.stack = NULL;
_Workspace_Free( the_thread->extensions );
48f5e: 2f2a 0106 movel %a2@(262),%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;
48f62: 42aa 00be clrl %a2@(190)
_Workspace_Free( the_thread->extensions );
48f66: 4e93 jsr %a3@
the_thread->extensions = NULL; }
48f68: 266e fffc moveal %fp@(-4),%a3
*/
_Thread_Stack_Free( the_thread );
the_thread->Start.stack = NULL;
_Workspace_Free( the_thread->extensions );
the_thread->extensions = NULL;
48f6c: 4fef 000c lea %sp@(12),%sp 48f70: 42aa 0106 clrl %a2@(262)
}
48f74: 246e fff8 moveal %fp@(-8),%a2 48f78: 4e5e unlk %fp 48f7a: 4e75 rts
*/
_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 );
48f7c: 486a 0048 pea %a2@(72) 48f80: 4eb9 0004 a160 jsr 4a160 <_Watchdog_Remove> 48f86: 588f addql #4,%sp 48f88: 2079 0005 f76a moveal 5f76a <_Scheduler+0x1c>,%a0 48f8e: 2f0a movel %a2,%sp@- 48f90: 4e90 jsr %a0@
/* * 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 ) )
48f92: 588f addql #4,%sp 48f94: b5f9 0006 10ca cmpal 610ca <_Thread_Allocated_fp>,%a2 48f9a: 6600 ff6e bnew 48f0a <_Thread_Close+0x92>
48f9e: 60a0 bras 48f40 <_Thread_Close+0xc8> <== NOT EXECUTED
00049058 <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
49058: 4e56 fffc linkw %fp,#-4
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
4905c: 486e fffc pea %fp@(-4) 49060: 2f2e 0008 movel %fp@(8),%sp@- 49064: 4eb9 0004 9240 jsr 49240 <_Thread_Get>
switch ( location ) {
4906a: 508f addql #8,%sp 4906c: 4aae fffc tstl %fp@(-4)
49070: 6624 bnes 49096 <_Thread_Delay_ended+0x3e> <== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_Clear_state(
49072: 2f3c 1000 0018 movel #268435480,%sp@- 49078: 2f00 movel %d0,%sp@- 4907a: 4eb9 0004 8e1c jsr 48e1c <_Thread_Clear_state> 49080: 508f addql #8,%sp
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
49082: 2039 0006 1048 movel 61048 <_Thread_Dispatch_disable_level>,%d0 49088: 5380 subql #1,%d0 4908a: 23c0 0006 1048 movel %d0,61048 <_Thread_Dispatch_disable_level>
return _Thread_Dispatch_disable_level;
49090: 2039 0006 1048 movel 61048 <_Thread_Dispatch_disable_level>,%d0
| STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Thread_Unnest_dispatch();
break;
}
}
49096: 4e5e unlk %fp
...
0004909c <_Thread_Dispatch>:
* INTERRUPT LATENCY:
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
4909c: 4e56 ffc8 linkw %fp,#-56
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
490a0: 2039 0006 1048 movel 61048 <_Thread_Dispatch_disable_level>,%d0 490a6: 5280 addql #1,%d0 490a8: 23c0 0006 1048 movel %d0,61048 <_Thread_Dispatch_disable_level>
return _Thread_Dispatch_disable_level;
490ae: 2039 0006 1048 movel 61048 <_Thread_Dispatch_disable_level>,%d0 490b4: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
/*
* Now determine if we need to perform a dispatch on the current CPU.
*/
executing = _Thread_Executing;
_ISR_Disable( level );
490b8: 283c 0000 0700 movel #1792,%d4 490be: 2004 movel %d4,%d0
#endif
/*
* Now determine if we need to perform a dispatch on the current CPU.
*/
executing = _Thread_Executing;
490c0: 2479 0006 14aa moveal 614aa <_Per_CPU_Information+0xc>,%a2
_ISR_Disable( level );
490c6: 40c1 movew %sr,%d1 490c8: 8081 orl %d1,%d0 490ca: 46c0 movew %d0,%sr
while ( _Thread_Dispatch_necessary == true ) {
490cc: 1039 0006 14b6 moveb 614b6 <_Per_CPU_Information+0x18>,%d0 490d2: 6700 0110 beqw 491e4 <_Thread_Dispatch+0x148>
heir = _Thread_Heir;
490d6: 2679 0006 14ae moveal 614ae <_Per_CPU_Information+0x10>,%a3
_Thread_Dispatch_necessary = false;
490dc: 4200 clrb %d0
_Thread_Executing = heir;
490de: 23cb 0006 14aa movel %a3,614aa <_Per_CPU_Information+0xc>
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
heir = _Thread_Heir;
_Thread_Dispatch_necessary = false;
490e4: 13c0 0006 14b6 moveb %d0,614b6 <_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 )
490ea: b7ca cmpal %a2,%a3 490ec: 6700 00f6 beqw 491e4 <_Thread_Dispatch+0x148> 490f0: 260e movel %fp,%d3 490f2: 240e movel %fp,%d2 490f4: 0683 ffff fff0 addil #-16,%d3 490fa: 2e3c 0004 cd9c movel #314780,%d7 49100: 5182 subql #8,%d2 49102: 2c3c 0004 9d0c movel #302348,%d6 49108: 2a3c 0004 9cc4 movel #302276,%d5 4910e: 4bf9 0004 9fd8 lea 49fd8 <_User_extensions_Thread_switch>,%a5 49114: 49f9 0004 a34c lea 4a34c <_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 )
4911a: 7001 moveq #1,%d0 4911c: b0ab 007a cmpl %a3@(122),%d0 49120: 6700 00e8 beqw 4920a <_Thread_Dispatch+0x16e>
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
_ISR_Enable( level );
49124: 46c1 movew %d1,%sr
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
49126: 2f03 movel %d3,%sp@- 49128: 2047 moveal %d7,%a0 4912a: 4e90 jsr %a0@
_Timestamp_Subtract(
4912c: 2046 moveal %d6,%a0 4912e: 2f02 movel %d2,%sp@- 49130: 2f03 movel %d3,%sp@- 49132: 4879 0006 14b8 pea 614b8 <_Per_CPU_Information+0x1a> 49138: 4e90 jsr %a0@
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
4913a: 2045 moveal %d5,%a0 4913c: 2f02 movel %d2,%sp@- 4913e: 486a 0082 pea %a2@(130) 49142: 4e90 jsr %a0@
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
49144: 2079 0006 10ce moveal 610ce <_Thread_libc_reent>,%a0 4914a: 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;
4914e: 202e fff0 movel %fp@(-16),%d0 49152: 222e fff4 movel %fp@(-12),%d1 49156: 23c0 0006 14b8 movel %d0,614b8 <_Per_CPU_Information+0x1a> 4915c: 23c1 0006 14bc movel %d1,614bc <_Per_CPU_Information+0x1e>
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
49162: 4a88 tstl %a0
49164: 6708 beqs 4916e <_Thread_Dispatch+0xd2> <== NEVER TAKEN
executing->libc_reent = *_Thread_libc_reent;
49166: 2550 00fa movel %a0@,%a2@(250)
*_Thread_libc_reent = heir->libc_reent;
4916a: 20ab 00fa movel %a3@(250),%a0@
}
_User_extensions_Thread_switch( executing, heir );
4916e: 2f0b movel %a3,%sp@- 49170: 2f0a movel %a2,%sp@- 49172: 4e95 jsr %a5@
if ( executing->fp_context != NULL )
_Context_Save_fp( &executing->fp_context );
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
49174: 486b 00c2 pea %a3@(194) 49178: 486a 00c2 pea %a2@(194) 4917c: 4e94 jsr %a4@
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
4917e: 4fef 0010 lea %sp@(16),%sp 49182: 4aaa 00f6 tstl %a2@(246)
49186: 672c beqs 491b4 <_Thread_Dispatch+0x118>
#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 );
49188: 2079 0006 10ca moveal 610ca <_Thread_Allocated_fp>,%a0 4918e: b1ca cmpal %a2,%a0
49190: 6722 beqs 491b4 <_Thread_Dispatch+0x118>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
49192: 4a88 tstl %a0
49194: 670c beqs 491a2 <_Thread_Dispatch+0x106>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
49196: 4868 00f6 pea %a0@(246) 4919a: 4eb9 0004 a47c jsr 4a47c <_CPU_Context_save_fp> 491a0: 588f addql #4,%sp
_Context_Restore_fp( &executing->fp_context );
491a2: 486a 00f6 pea %a2@(246) 491a6: 4eb9 0004 a4b4 jsr 4a4b4 <_CPU_Context_restore_fp>
_Thread_Allocated_fp = executing;
491ac: 588f addql #4,%sp 491ae: 23ca 0006 10ca movel %a2,610ca <_Thread_Allocated_fp>
if ( executing->fp_context != NULL )
_Context_Restore_fp( &executing->fp_context );
#endif
#endif
executing = _Thread_Executing;
491b4: 2479 0006 14aa moveal 614aa <_Per_CPU_Information+0xc>,%a2
_ISR_Disable( level );
491ba: 2004 movel %d4,%d0 491bc: 40c1 movew %sr,%d1 491be: 8081 orl %d1,%d0 491c0: 46c0 movew %d0,%sr
/*
* Now determine if we need to perform a dispatch on the current CPU.
*/
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
491c2: 1039 0006 14b6 moveb 614b6 <_Per_CPU_Information+0x18>,%d0
491c8: 671a beqs 491e4 <_Thread_Dispatch+0x148>
heir = _Thread_Heir;
491ca: 2679 0006 14ae moveal 614ae <_Per_CPU_Information+0x10>,%a3
_Thread_Dispatch_necessary = false;
491d0: 4200 clrb %d0
_Thread_Executing = heir;
491d2: 23cb 0006 14aa movel %a3,614aa <_Per_CPU_Information+0xc>
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
heir = _Thread_Heir;
_Thread_Dispatch_necessary = false;
491d8: 13c0 0006 14b6 moveb %d0,614b6 <_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 )
491de: b5cb cmpal %a3,%a2 491e0: 6600 ff38 bnew 4911a <_Thread_Dispatch+0x7e>
_ISR_Disable( level );
}
post_switch:
_ISR_Enable( level );
491e4: 46c1 movew %d1,%sr
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
491e6: 2039 0006 1048 movel 61048 <_Thread_Dispatch_disable_level>,%d0 491ec: 5380 subql #1,%d0 491ee: 23c0 0006 1048 movel %d0,61048 <_Thread_Dispatch_disable_level>
return _Thread_Dispatch_disable_level;
491f4: 2039 0006 1048 movel 61048 <_Thread_Dispatch_disable_level>,%d0
_Thread_Unnest_dispatch();
_API_extensions_Run_postswitch();
491fa: 4eb9 0004 7442 jsr 47442 <_API_extensions_Run_postswitch>
}
49200: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 49206: 4e5e unlk %fp 49208: 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;
4920a: 41f9 0006 1000 lea 61000 <_Thread_Ticks_per_timeslice>,%a0 49210: 2750 0076 movel %a0@,%a3@(118) 49214: 6000 ff0e braw 49124 <_Thread_Dispatch+0x88>
00049218 <_Thread_Enable_dispatch>:
* dispatch thread
* no dispatch thread
*/
#if defined (__THREAD_DO_NOT_INLINE_ENABLE_DISPATCH__ )
void _Thread_Enable_dispatch( void )
{
49218: 4e56 0000 linkw %fp,#0
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
4921c: 2039 0006 1048 movel 61048 <_Thread_Dispatch_disable_level>,%d0 49222: 5380 subql #1,%d0 49224: 23c0 0006 1048 movel %d0,61048 <_Thread_Dispatch_disable_level>
return _Thread_Dispatch_disable_level;
4922a: 2039 0006 1048 movel 61048 <_Thread_Dispatch_disable_level>,%d0
if ( _Thread_Dispatch_decrement_disable_level() )
49230: 6704 beqs 49236 <_Thread_Enable_dispatch+0x1e>
return;
_Thread_Dispatch();
}
49232: 4e5e unlk %fp 49234: 4e75 rts 49236: 4e5e unlk %fp
#if defined (__THREAD_DO_NOT_INLINE_ENABLE_DISPATCH__ )
void _Thread_Enable_dispatch( void )
{
if ( _Thread_Dispatch_decrement_disable_level() )
return;
_Thread_Dispatch();
49238: 4ef9 0004 909c jmp 4909c <_Thread_Dispatch>
...
0004ee40 <_Thread_Handler>:
* Input parameters: NONE
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
4ee40: 4e56 0000 linkw %fp,#0 4ee44: 2f0a movel %a2,%sp@-
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static bool doneConstructors;
bool doCons;
#endif
executing = _Thread_Executing;
4ee46: 2479 0006 14aa moveal 614aa <_Per_CPU_Information+0xc>,%a2
* Input parameters: NONE
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
4ee4c: 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;
4ee4e: 222a 00a8 movel %a2@(168),%d1
_ISR_Set_level(level);
4ee52: 40c0 movew %sr,%d0 4ee54: e189 lsll #8,%d1 4ee56: 0280 0000 f8ff andil #63743,%d0 4ee5c: 8081 orl %d1,%d0 4ee5e: 46c0 movew %d0,%sr
&& _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API;
if (doCons)
doneConstructors = true;
#else
doCons = !doneConstructors;
doneConstructors = true;
4ee60: 7001 moveq #1,%d0
doCons = !doneConstructors
&& _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API;
if (doCons)
doneConstructors = true;
#else
doCons = !doneConstructors;
4ee62: 1439 0006 0808 moveb 60808 <doneConstructors.3399>,%d2
doneConstructors = true;
4ee68: 13c0 0006 0808 moveb %d0,60808 <doneConstructors.3399>
#endif
#endif
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
4ee6e: 4aaa 00f6 tstl %a2@(246)
4ee72: 6720 beqs 4ee94 <_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 );
4ee74: 2079 0006 10ca moveal 610ca <_Thread_Allocated_fp>,%a0 4ee7a: b1ca cmpal %a2,%a0
4ee7c: 6716 beqs 4ee94 <_Thread_Handler+0x54>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
4ee7e: 4a88 tstl %a0
4ee80: 670c beqs 4ee8e <_Thread_Handler+0x4e>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
4ee82: 4868 00f6 pea %a0@(246) 4ee86: 4eb9 0004 a47c jsr 4a47c <_CPU_Context_save_fp> 4ee8c: 588f addql #4,%sp
_Thread_Allocated_fp = executing;
4ee8e: 23ca 0006 10ca movel %a2,610ca <_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 );
4ee94: 2f0a movel %a2,%sp@- 4ee96: 4eb9 0004 9e24 jsr 49e24 <_User_extensions_Thread_begin>
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
4ee9c: 4eb9 0004 9218 jsr 49218 <_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 (doCons) /* && (volatile void *)_init) */ {
4eea2: 588f addql #4,%sp 4eea4: 4a02 tstb %d2
4eea6: 6724 beqs 4eecc <_Thread_Handler+0x8c>
_Thread_Enable_dispatch();
#endif
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
4eea8: 202a 0092 movel %a2@(146),%d0
4eeac: 672a beqs 4eed8 <_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 ) {
4eeae: 7201 moveq #1,%d1 4eeb0: b280 cmpl %d0,%d1
4eeb2: 674c beqs 4ef00 <_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 );
4eeb4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4eeb6: 4eb9 0004 9e62 jsr 49e62 <_User_extensions_Thread_exitted> <== NOT EXECUTED
_Internal_error_Occurred(
4eebc: 4878 0005 pea 5 <COMPARE> <== NOT EXECUTED 4eec0: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 4eec4: 42a7 clrl %sp@- <== NOT EXECUTED 4eec6: 4eb9 0004 7ec8 jsr 47ec8 <_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 (doCons) /* && (volatile void *)_init) */ {
INIT_NAME ();
4eecc: 4eb9 0005 d74c jsr 5d74c <_init>
_Thread_Enable_dispatch();
#endif
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
4eed2: 202a 0092 movel %a2@(146),%d0
4eed6: 66d6 bnes 4eeae <_Thread_Handler+0x6e>
executing->Wait.return_argument =
(*(Thread_Entry_numeric) executing->Start.entry_point)(
4eed8: 2f2a 009a movel %a2@(154),%sp@- 4eedc: 206a 008e moveal %a2@(142),%a0 4eee0: 4e90 jsr %a0@
#endif
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
executing->Wait.return_argument =
4eee2: 588f addql #4,%sp 4eee4: 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 );
4eee8: 2f0a movel %a2,%sp@- 4eeea: 4eb9 0004 9e62 jsr 49e62 <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
4eef0: 4878 0005 pea 5 <COMPARE> 4eef4: 4878 0001 pea 1 <ADD> 4eef8: 42a7 clrl %sp@- 4eefa: 4eb9 0004 7ec8 jsr 47ec8 <_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)(
4ef00: 2f2a 0096 movel %a2@(150),%sp@- 4ef04: 206a 008e moveal %a2@(142),%a0 4ef08: 4e90 jsr %a0@
executing->Start.numeric_argument
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
executing->Wait.return_argument =
4ef0a: 588f addql #4,%sp 4ef0c: 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 );
4ef10: 2f0a movel %a2,%sp@- 4ef12: 4eb9 0004 9e62 jsr 49e62 <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
4ef18: 4878 0005 pea 5 <COMPARE> <== NOT EXECUTED 4ef1c: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 4ef20: 42a7 clrl %sp@- <== NOT EXECUTED 4ef22: 4eb9 0004 7ec8 jsr 47ec8 <_Internal_error_Occurred> <== NOT EXECUTED
00049518 <_Thread_Handler_initialization>:
*
* Output parameters: NONE
*/
void _Thread_Handler_initialization(void)
{
49518: 4e56 0000 linkw %fp,#0
/*
* BOTH stacks hooks must be set or both must be NULL.
* Do not allow mixture.
*/
if ( !( (!Configuration.stack_allocate_hook)
== (!Configuration.stack_free_hook) ) )
4951c: 4ab9 0005 f690 tstl 5f690 <Configuration+0x24> 49522: 57c1 seq %d1
#endif
/*
* BOTH stacks hooks must be set or both must be NULL.
* Do not allow mixture.
*/
if ( !( (!Configuration.stack_allocate_hook)
49524: 4ab9 0005 f68c tstl 5f68c <Configuration+0x20> 4952a: 57c0 seq %d0
== (!Configuration.stack_free_hook) ) )
4952c: 4481 negl %d1
#endif
/*
* BOTH stacks hooks must be set or both must be NULL.
* Do not allow mixture.
*/
if ( !( (!Configuration.stack_allocate_hook)
4952e: 4480 negl %d0 49530: b380 eorl %d1,%d0
uint32_t maximum_internal_threads;
#if defined(RTEMS_MULTIPROCESSING)
uint32_t maximum_proxies;
#endif
ticks_per_timeslice = Configuration.ticks_per_timeslice;
49532: 2239 0005 f67c movel 5f67c <Configuration+0x10>,%d1
maximum_extensions = Configuration.maximum_extensions;
49538: 2079 0005 f674 moveal 5f674 <Configuration+0x8>,%a0
#endif
/*
* BOTH stacks hooks must be set or both must be NULL.
* Do not allow mixture.
*/
if ( !( (!Configuration.stack_allocate_hook)
4953e: 4a00 tstb %d0
49540: 6650 bnes 49592 <_Thread_Handler_initialization+0x7a>
#if defined(RTEMS_MULTIPROCESSING)
if ( _System_state_Is_multiprocessing )
maximum_internal_threads += 1;
#endif
_Objects_Initialize_information(
49542: 4878 0008 pea 8 <DIVIDE_BY_ZERO>
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_BAD_STACK_HOOK
);
_Thread_Dispatch_necessary = false;
49546: 4200 clrb %d0
#if defined(RTEMS_MULTIPROCESSING)
if ( _System_state_Is_multiprocessing )
maximum_internal_threads += 1;
#endif
_Objects_Initialize_information(
49548: 42a7 clrl %sp@- 4954a: 4878 010e pea 10e <DBL_MANT_DIG+0xd9> 4954e: 4878 0001 pea 1 <ADD> 49552: 4878 0001 pea 1 <ADD> 49556: 4878 0001 pea 1 <ADD> 4955a: 4879 0006 1152 pea 61152 <_Thread_Internal_information>
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_BAD_STACK_HOOK
);
_Thread_Dispatch_necessary = false;
49560: 13c0 0006 14b6 moveb %d0,614b6 <_Per_CPU_Information+0x18>
_Thread_Executing = NULL;
49566: 42b9 0006 14aa clrl 614aa <_Per_CPU_Information+0xc>
_Thread_Heir = NULL;
4956c: 42b9 0006 14ae clrl 614ae <_Per_CPU_Information+0x10>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL;
49572: 42b9 0006 10ca clrl 610ca <_Thread_Allocated_fp>
#endif
_Thread_Maximum_extensions = maximum_extensions;
49578: 23c8 0006 10da movel %a0,610da <_Thread_Maximum_extensions>
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
4957e: 23c1 0006 1000 movel %d1,61000 <_Thread_Ticks_per_timeslice>
#if defined(RTEMS_MULTIPROCESSING)
if ( _System_state_Is_multiprocessing )
maximum_internal_threads += 1;
#endif
_Objects_Initialize_information(
49584: 4eb9 0004 84c4 jsr 484c4 <_Objects_Initialize_information> 4958a: 4fef 001c lea %sp@(28),%sp
false, /* true if this is a global object class */
NULL /* Proxy extraction support callout */
#endif
);
}
4958e: 4e5e unlk %fp 49590: 4e75 rts
* BOTH stacks hooks must be set or both must be NULL.
* Do not allow mixture.
*/
if ( !( (!Configuration.stack_allocate_hook)
== (!Configuration.stack_free_hook) ) )
_Internal_error_Occurred(
49592: 4878 000e pea e <OPER1+0x2> 49596: 4878 0001 pea 1 <ADD> 4959a: 42a7 clrl %sp@- 4959c: 4eb9 0004 7ec8 jsr 47ec8 <_Internal_error_Occurred>
...
000492e4 <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
492e4: 4e56 ffe4 linkw %fp,#-28 492e8: 202e 0010 movel %fp@(16),%d0 492ec: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 492f0: 246e 000c moveal %fp@(12),%a2 492f4: 242e 0014 movel %fp@(20),%d2 492f8: 262e 001c movel %fp@(28),%d3 492fc: 282e 0024 movel %fp@(36),%d4 49300: 1a2e 001b moveb %fp@(27),%d5 49304: 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;
49308: 42aa 00fe clrl %a2@(254) 4930c: 42aa 0102 clrl %a2@(258)
extensions_area = NULL;
the_thread->libc_reent = NULL;
49310: 42aa 00fa clrl %a2@(250)
if ( !actual_stack_size || actual_stack_size < stack_size )
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
#else
if ( !stack_area ) {
49314: 4a80 tstl %d0 49316: 6700 0198 beqw 494b0 <_Thread_Initialize+0x1cc>
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;
4931a: 2202 movel %d2,%d1 4931c: 4202 clrb %d2 4931e: 1542 00b0 moveb %d2,%a2@(176)
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
49322: 2540 00b6 movel %d0,%a2@(182)
the_stack->size = size;
49326: 2541 00b2 movel %d1,%a2@(178)
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
4932a: 4a05 tstb %d5 4932c: 6600 0100 bnew 4942e <_Thread_Initialize+0x14a>
extensions_area = NULL;
the_thread->libc_reent = NULL;
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
fp_area = NULL;
49330: 4282 clrl %d2
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
49332: 2039 0006 10da movel 610da <_Thread_Maximum_extensions>,%d0
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;
49338: 2542 00f6 movel %d2,%a2@(246)
the_thread->Start.fp_context = fp_area;
4933c: 2542 00ba movel %d2,%a2@(186)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
49340: 42aa 0050 clrl %a2@(80)
the_watchdog->routine = routine;
49344: 42aa 0064 clrl %a2@(100)
the_watchdog->id = id;
49348: 42aa 0068 clrl %a2@(104)
the_watchdog->user_data = user_data;
4934c: 42aa 006c clrl %a2@(108)
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
49350: 4a80 tstl %d0 49352: 6600 0124 bnew 49478 <_Thread_Initialize+0x194>
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
49356: 42aa 0106 clrl %a2@(262)
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
extensions_area = NULL;
4935a: 4285 clrl %d5
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
4935c: 2544 00a0 movel %d4,%a2@(160)
the_thread->Start.budget_callout = budget_callout;
switch ( budget_algorithm ) {
49360: 7002 moveq #2,%d0
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
49362: 1546 009e moveb %d6,%a2@(158)
the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout;
49366: 256e 0028 00a4 movel %fp@(40),%a2@(164)
switch ( budget_algorithm ) {
4936c: b084 cmpl %d4,%d0 4936e: 6700 00a4 beqw 49414 <_Thread_Initialize+0x130>
#endif
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
49372: 7001 moveq #1,%d0
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
49374: 256e 002c 00a8 movel %fp@(44),%a2@(168)
*/
RTEMS_INLINE_ROUTINE void* _Scheduler_Allocate(
Thread_Control *the_thread
)
{
return _Scheduler.Operations.allocate( the_thread );
4937a: 2079 0005 f766 moveal 5f766 <_Scheduler+0x18>,%a0
the_thread->current_state = STATES_DORMANT;
49380: 2540 0010 movel %d0,%a2@(16)
the_thread->Wait.queue = NULL;
49384: 42aa 0044 clrl %a2@(68)
the_thread->resource_count = 0;
49388: 42aa 001c clrl %a2@(28)
the_thread->real_priority = priority;
4938c: 2543 0018 movel %d3,%a2@(24)
the_thread->Start.initial_priority = priority;
49390: 2543 00ac movel %d3,%a2@(172) 49394: 2f0a movel %a2,%sp@- 49396: 4e90 jsr %a0@
sched =_Scheduler_Allocate( the_thread ); if ( !sched )
49398: 588f addql #4,%sp 4939a: 2800 movel %d0,%d4
4939c: 673a beqs 493d8 <_Thread_Initialize+0xf4>
goto failed;
_Thread_Set_priority( the_thread, priority );
4939e: 2f03 movel %d3,%sp@- 493a0: 2f0a movel %a2,%sp@- 493a2: 4eb9 0004 9ad8 jsr 49ad8 <_Thread_Set_priority>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
493a8: 206e 0008 moveal %fp@(8),%a0 493ac: 4280 clrl %d0 493ae: 2068 0018 moveal %a0@(24),%a0 493b2: 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 );
493b6: 42aa 0082 clrl %a2@(130) 493ba: 42aa 0086 clrl %a2@(134) 493be: 218a 0c00 movel %a2,%a0@(00000000,%d0:l:4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
493c2: 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 );
493c8: 2f0a movel %a2,%sp@- 493ca: 4eb9 0004 9ef4 jsr 49ef4 <_User_extensions_Thread_create>
if ( extension_status )
493d0: 4fef 000c lea %sp@(12),%sp 493d4: 4a00 tstb %d0
493d6: 664a bnes 49422 <_Thread_Initialize+0x13e>
return true;
failed:
_Workspace_Free( the_thread->libc_reent );
493d8: 2f2a 00fa movel %a2@(250),%sp@- 493dc: 47f9 0004 a2fe lea 4a2fe <_Workspace_Free>,%a3 493e2: 4e93 jsr %a3@
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
_Workspace_Free( the_thread->API_Extensions[i] );
493e4: 2f2a 00fe movel %a2@(254),%sp@- 493e8: 4e93 jsr %a3@ 493ea: 2f2a 0102 movel %a2@(258),%sp@- 493ee: 4e93 jsr %a3@
_Workspace_Free( extensions_area );
493f0: 2f05 movel %d5,%sp@- 493f2: 4e93 jsr %a3@
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Workspace_Free( fp_area );
493f4: 2f02 movel %d2,%sp@- 493f6: 4e93 jsr %a3@
#endif
_Workspace_Free( sched );
493f8: 2f04 movel %d4,%sp@- 493fa: 4e93 jsr %a3@
_Thread_Stack_Free( the_thread );
493fc: 2f0a movel %a2,%sp@- 493fe: 4eb9 0004 9be8 jsr 49be8 <_Thread_Stack_Free>
return false;
49404: 4fef 001c lea %sp@(28),%sp 49408: 4200 clrb %d0
}
4940a: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 49410: 4e5e unlk %fp 49412: 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;
49414: 41f9 0006 1000 lea 61000 <_Thread_Ticks_per_timeslice>,%a0 4941a: 2550 0076 movel %a0@,%a2@(118)
break;
4941e: 6000 ff52 braw 49372 <_Thread_Initialize+0x8e>
_Workspace_Free( sched );
_Thread_Stack_Free( the_thread );
return false;
}
49422: 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;
49428: 7001 moveq #1,%d0
_Workspace_Free( sched );
_Thread_Stack_Free( the_thread );
return false;
}
4942a: 4e5e unlk %fp 4942c: 4e75 rts
/*
* 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 );
4942e: 4878 001c pea 1c <OPER2+0x8> 49432: 4eb9 0004 a2e2 jsr 4a2e2 <_Workspace_Allocate>
if ( !fp_area )
49438: 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 );
4943a: 2400 movel %d0,%d2
if ( !fp_area )
4943c: 6600 fef4 bnew 49332 <_Thread_Initialize+0x4e>
extension_status = _User_extensions_Thread_create( the_thread );
if ( extension_status )
return true;
failed:
_Workspace_Free( the_thread->libc_reent );
49440: 2f2a 00fa movel %a2@(250),%sp@- 49444: 47f9 0004 a2fe lea 4a2fe <_Workspace_Free>,%a3
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
extensions_area = NULL;
4944a: 4285 clrl %d5
size_t actual_stack_size = 0;
void *stack = NULL;
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
void *fp_area;
#endif
void *sched = NULL;
4944c: 4284 clrl %d4
extension_status = _User_extensions_Thread_create( the_thread );
if ( extension_status )
return true;
failed:
_Workspace_Free( the_thread->libc_reent );
4944e: 4e93 jsr %a3@
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
_Workspace_Free( the_thread->API_Extensions[i] );
49450: 2f2a 00fe movel %a2@(254),%sp@- 49454: 4e93 jsr %a3@ 49456: 2f2a 0102 movel %a2@(258),%sp@- 4945a: 4e93 jsr %a3@
_Workspace_Free( extensions_area );
4945c: 2f05 movel %d5,%sp@- 4945e: 4e93 jsr %a3@
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Workspace_Free( fp_area );
49460: 2f02 movel %d2,%sp@- 49462: 4e93 jsr %a3@
#endif
_Workspace_Free( sched );
49464: 2f04 movel %d4,%sp@- 49466: 4e93 jsr %a3@
_Thread_Stack_Free( the_thread );
49468: 2f0a movel %a2,%sp@- 4946a: 4eb9 0004 9be8 jsr 49be8 <_Thread_Stack_Free>
return false;
49470: 4fef 001c lea %sp@(28),%sp 49474: 4200 clrb %d0 49476: 6092 bras 4940a <_Thread_Initialize+0x126>
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
extensions_area = _Workspace_Allocate(
49478: e588 lsll #2,%d0 4947a: 2040 moveal %d0,%a0 4947c: 4868 0004 pea %a0@(4) 49480: 4eb9 0004 a2e2 jsr 4a2e2 <_Workspace_Allocate>
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
49486: 588f addql #4,%sp
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
extensions_area = _Workspace_Allocate(
49488: 2a00 movel %d0,%d5
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
4948a: 6752 beqs 494de <_Thread_Initialize+0x1fa>
goto failed;
}
the_thread->extensions = (void **) extensions_area;
4948c: 2540 0106 movel %d0,%a2@(262) 49490: 2040 moveal %d0,%a0
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
49492: 4281 clrl %d1
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
49494: 4280 clrl %d0 49496: 2279 0006 10da moveal 610da <_Thread_Maximum_extensions>,%a1
* 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;
4949c: 42b0 1c00 clrl %a0@(00000000,%d1:l:4)
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
494a0: 5280 addql #1,%d0 494a2: 2200 movel %d0,%d1 494a4: b3c0 cmpal %d0,%a1 494a6: 6500 feb4 bcsw 4935c <_Thread_Initialize+0x78>
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
494aa: 206a 0106 moveal %a2@(262),%a0 494ae: 60ec bras 4949c <_Thread_Initialize+0x1b8>
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
#else
if ( !stack_area ) {
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
494b0: 2f02 movel %d2,%sp@- 494b2: 2f0a movel %a2,%sp@- 494b4: 4eb9 0004 9b84 jsr 49b84 <_Thread_Stack_Allocate>
if ( !actual_stack_size || actual_stack_size < stack_size )
494ba: 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 );
494bc: 2200 movel %d0,%d1
if ( !actual_stack_size || actual_stack_size < stack_size )
494be: 6712 beqs 494d2 <_Thread_Initialize+0x1ee>
494c0: b082 cmpl %d2,%d0
494c2: 650e bcss 494d2 <_Thread_Initialize+0x1ee> <== NEVER TAKEN
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
494c4: 202a 00be movel %a2@(190),%d0
the_thread->Start.core_allocated_stack = true;
494c8: 7401 moveq #1,%d2 494ca: 1542 00b0 moveb %d2,%a2@(176) 494ce: 6000 fe52 braw 49322 <_Thread_Initialize+0x3e>
_Workspace_Free( sched );
_Thread_Stack_Free( the_thread );
return false;
}
494d2: 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 */
494d8: 4200 clrb %d0
_Workspace_Free( sched );
_Thread_Stack_Free( the_thread );
return false;
}
494da: 4e5e unlk %fp 494dc: 4e75 rts
extension_status = _User_extensions_Thread_create( the_thread );
if ( extension_status )
return true;
failed:
_Workspace_Free( the_thread->libc_reent );
494de: 2f2a 00fa movel %a2@(250),%sp@- 494e2: 47f9 0004 a2fe lea 4a2fe <_Workspace_Free>,%a3
size_t actual_stack_size = 0;
void *stack = NULL;
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
void *fp_area;
#endif
void *sched = NULL;
494e8: 4284 clrl %d4
extension_status = _User_extensions_Thread_create( the_thread );
if ( extension_status )
return true;
failed:
_Workspace_Free( the_thread->libc_reent );
494ea: 4e93 jsr %a3@
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
_Workspace_Free( the_thread->API_Extensions[i] );
494ec: 2f2a 00fe movel %a2@(254),%sp@- 494f0: 4e93 jsr %a3@ 494f2: 2f2a 0102 movel %a2@(258),%sp@- 494f6: 4e93 jsr %a3@
_Workspace_Free( extensions_area );
494f8: 2f05 movel %d5,%sp@- 494fa: 4e93 jsr %a3@
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Workspace_Free( fp_area );
494fc: 2f02 movel %d2,%sp@- 494fe: 4e93 jsr %a3@
#endif
_Workspace_Free( sched );
49500: 2f04 movel %d4,%sp@- 49502: 4e93 jsr %a3@
_Thread_Stack_Free( the_thread );
49504: 2f0a movel %a2,%sp@- 49506: 4eb9 0004 9be8 jsr 49be8 <_Thread_Stack_Free>
return false;
4950c: 4fef 001c lea %sp@(28),%sp 49510: 4200 clrb %d0 49512: 6000 fef6 braw 4940a <_Thread_Initialize+0x126>
...
0004dda4 <_Thread_Reset>:
void _Thread_Reset(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
4dda4: 4e56 0000 linkw %fp,#0 4dda8: 2f0a movel %a2,%sp@- 4ddaa: 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;
4ddae: 256a 00a0 007a movel %a2@(160),%a2@(122)
the_thread->budget_callout = the_thread->Start.budget_callout;
4ddb4: 256a 00a4 007e movel %a2@(164),%a2@(126)
the_thread->Start.pointer_argument = pointer_argument;
4ddba: 256e 000c 0096 movel %fp@(12),%a2@(150)
the_thread->Start.numeric_argument = numeric_argument;
4ddc0: 256e 0010 009a movel %fp@(16),%a2@(154)
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
the_thread->resource_count = 0;
the_thread->is_preemptible = the_thread->Start.is_preemptible;
4ddc6: 156a 009e 0074 moveb %a2@(158),%a2@(116)
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
the_thread->resource_count = 0;
4ddcc: 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 ) ) {
4ddd0: 2f0a movel %a2,%sp@- 4ddd2: 4eb9 0004 a1ec jsr 4a1ec <_Thread_queue_Extract_with_proxy> 4ddd8: 588f addql #4,%sp 4ddda: 4a00 tstb %d0
4dddc: 6608 bnes 4dde6 <_Thread_Reset+0x42>
if ( _Watchdog_Is_active( &the_thread->Timer ) )
4ddde: 7002 moveq #2,%d0 4dde0: b0aa 0050 cmpl %a2@(80),%d0
4dde4: 672a beqs 4de10 <_Thread_Reset+0x6c>
(void) _Watchdog_Remove( &the_thread->Timer );
}
if ( the_thread->current_priority != the_thread->Start.initial_priority ) {
4dde6: 202a 00ac movel %a2@(172),%d0 4ddea: b0aa 0014 cmpl %a2@(20),%d0
4ddee: 6718 beqs 4de08 <_Thread_Reset+0x64>
the_thread->real_priority = the_thread->Start.initial_priority;
4ddf0: 2540 0018 movel %d0,%a2@(24)
_Thread_Set_priority( the_thread, the_thread->Start.initial_priority );
4ddf4: 2d4a 0008 movel %a2,%fp@(8)
} }
4ddf8: 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 );
4ddfc: 2d40 000c movel %d0,%fp@(12)
} }
4de00: 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 );
4de02: 4ef9 0004 a420 jmp 4a420 <_Thread_Set_priority>
} }
4de08: 246e fffc moveal %fp@(-4),%a2 4de0c: 4e5e unlk %fp 4de0e: 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 );
4de10: 486a 0048 pea %a2@(72) 4de14: 4eb9 0004 aaec jsr 4aaec <_Watchdog_Remove> 4de1a: 588f addql #4,%sp 4de1c: 60c8 bras 4dde6 <_Thread_Reset+0x42>
...
0004a390 <_Thread_Restart>:
*/
RTEMS_INLINE_ROUTINE bool _States_Is_dormant (
States_Control the_states
)
{
return (the_states & STATES_DORMANT);
4a390: 7001 moveq #1,%d0
bool _Thread_Restart(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
4a392: 4e56 0000 linkw %fp,#0 4a396: 2f0a movel %a2,%sp@- 4a398: 246e 0008 moveal %fp@(8),%a2 4a39c: c0aa 0010 andl %a2@(16),%d0
if ( !_States_Is_dormant( the_thread->current_state ) ) {
4a3a0: 670a beqs 4a3ac <_Thread_Restart+0x1c>
return true;
}
return false;
}
4a3a2: 246e fffc moveal %fp@(-4),%a2 4a3a6: 4e5e unlk %fp
_Thread_Restart_self();
return true;
}
return false;
4a3a8: 4200 clrb %d0
}
4a3aa: 4e75 rts
Thread_Entry_numeric_type numeric_argument
)
{
if ( !_States_Is_dormant( the_thread->current_state ) ) {
_Thread_Set_transient( the_thread );
4a3ac: 2f0a movel %a2,%sp@- 4a3ae: 4eb9 0004 a484 jsr 4a484 <_Thread_Set_transient>
_Thread_Reset( the_thread, pointer_argument, numeric_argument );
4a3b4: 2f2e 0010 movel %fp@(16),%sp@- 4a3b8: 2f2e 000c movel %fp@(12),%sp@- 4a3bc: 2f0a movel %a2,%sp@- 4a3be: 4eb9 0004 dda4 jsr 4dda4 <_Thread_Reset>
_Thread_Load_environment( the_thread );
4a3c4: 2f0a movel %a2,%sp@- 4a3c6: 4eb9 0004 daac jsr 4daac <_Thread_Load_environment>
_Thread_Ready( the_thread );
4a3cc: 2f0a movel %a2,%sp@- 4a3ce: 4eb9 0004 dd74 jsr 4dd74 <_Thread_Ready>
_User_extensions_Thread_restart( the_thread );
4a3d4: 2f0a movel %a2,%sp@- 4a3d6: 4eb9 0004 a8dc jsr 4a8dc <_User_extensions_Thread_restart>
if ( _Thread_Is_executing ( the_thread ) )
4a3dc: 4fef 001c lea %sp@(28),%sp 4a3e0: b5f9 0006 2082 cmpal 62082 <_Per_CPU_Information+0xc>,%a2
4a3e6: 670a beqs 4a3f2 <_Thread_Restart+0x62>
return true;
}
return false;
}
4a3e8: 246e fffc moveal %fp@(-4),%a2 4a3ec: 4e5e unlk %fp
_User_extensions_Thread_restart( the_thread );
if ( _Thread_Is_executing ( the_thread ) )
_Thread_Restart_self();
return true;
4a3ee: 7001 moveq #1,%d0
}
return false;
}
4a3f0: 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 )
4a3f2: 4aaa 00f6 tstl %a2@(246)
4a3f6: 6712 beqs 4a40a <_Thread_Restart+0x7a>
_Context_Restore_fp( &_Thread_Executing->fp_context );
4a3f8: 486a 00f6 pea %a2@(246) 4a3fc: 4eb9 0004 ae40 jsr 4ae40 <_CPU_Context_restore_fp> 4a402: 2479 0006 2082 moveal 62082 <_Per_CPU_Information+0xc>,%a2 4a408: 588f addql #4,%sp
#endif
_CPU_Context_Restart_self( &_Thread_Executing->Registers );
4a40a: 486a 00c2 pea %a2@(194) 4a40e: 4eb9 0004 acee jsr 4acee <_CPU_Context_Restart_self>
4a414: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4a418: 588f addql #4,%sp <== NOT EXECUTED 4a41a: 4e5e unlk %fp <== NOT EXECUTED
_User_extensions_Thread_restart( the_thread );
if ( _Thread_Is_executing ( the_thread ) )
_Thread_Restart_self();
return true;
4a41c: 7001 moveq #1,%d0 <== NOT EXECUTED
}
return false;
}
00049be8 <_Thread_Stack_Free>:
*/
void _Thread_Stack_Free(
Thread_Control *the_thread
)
{
49be8: 4e56 0000 linkw %fp,#0 49bec: 206e 0008 moveal %fp@(8),%a0
#if defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
/*
* If the API provided the stack space, then don't free it.
*/
if ( !the_thread->Start.core_allocated_stack )
49bf0: 4a28 00b0 tstb %a0@(176)
49bf4: 6714 beqs 49c0a <_Thread_Stack_Free+0x22> <== NEVER TAKEN
* Call ONLY the CPU table stack free hook, or the
* the RTEMS workspace free. This is so the free
* routine properly matches the allocation of the stack.
*/
if ( Configuration.stack_free_hook )
49bf6: 2279 0005 f690 moveal 5f690 <Configuration+0x24>,%a1
(*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area );
49bfc: 2d68 00b6 0008 movel %a0@(182),%fp@(8)
* Call ONLY the CPU table stack free hook, or the
* the RTEMS workspace free. This is so the free
* routine properly matches the allocation of the stack.
*/
if ( Configuration.stack_free_hook )
49c02: 4a89 tstl %a1
49c04: 6708 beqs 49c0e <_Thread_Stack_Free+0x26>
(*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area );
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
}
49c06: 4e5e unlk %fp
* the RTEMS workspace free. This is so the free
* routine properly matches the allocation of the stack.
*/
if ( Configuration.stack_free_hook )
(*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area );
49c08: 4ed1 jmp %a1@
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
}
49c0a: 4e5e unlk %fp <== NOT EXECUTED 49c0c: 4e75 rts <== NOT EXECUTED
49c0e: 4e5e unlk %fp
*/
if ( Configuration.stack_free_hook )
(*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area );
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
49c10: 4ef9 0004 a2fe jmp 4a2fe <_Workspace_Free>
...
00048cd0 <_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 ) ) {
48cd0: 7202 moveq #2,%d1
Thread_blocking_operation_States sync_state __attribute__((unused)),
#endif
Thread_Control *the_thread,
ISR_Level level
)
{
48cd2: 4e56 0000 linkw %fp,#0 48cd6: 202e 0010 movel %fp@(16),%d0 48cda: 2f0a movel %a2,%sp@- 48cdc: 246e 000c moveal %fp@(12),%a2
#endif
/*
* The thread is not waiting on anything after this completes.
*/
the_thread->Wait.queue = NULL;
48ce0: 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 ) ) {
48ce4: b2aa 0050 cmpl %a2@(80),%d1
48ce8: 671c beqs 48d06 <_Thread_blocking_operation_Cancel+0x36>
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
(void) _Watchdog_Remove( &the_thread->Timer );
} else
_ISR_Enable( level );
48cea: 46c0 movew %d0,%sr
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
48cec: 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
}
48cf0: 246e fffc moveal %fp@(-4),%a2 48cf4: 203c 1003 fff8 movel #268697592,%d0 48cfa: 2d40 000c movel %d0,%fp@(12) 48cfe: 4e5e unlk %fp 48d00: 4ef9 0004 8e1c jmp 48e1c <_Thread_Clear_state>
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
48d06: 123c 0003 moveb #3,%d1 48d0a: 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 );
48d0e: 46c0 movew %d0,%sr
(void) _Watchdog_Remove( &the_thread->Timer );
48d10: 486a 0048 pea %a2@(72) 48d14: 4eb9 0004 a160 jsr 4a160 <_Watchdog_Remove> 48d1a: 588f addql #4,%sp 48d1c: 203c 1003 fff8 movel #268697592,%d0 48d22: 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
}
48d26: 246e fffc moveal %fp@(-4),%a2 48d2a: 2d40 000c movel %d0,%fp@(12) 48d2e: 4e5e unlk %fp 48d30: 4ef9 0004 8e1c jmp 48e1c <_Thread_Clear_state>
...
00049620 <_Thread_queue_Dequeue_priority>:
Chain_Node *new_second_node;
Chain_Node *last_node;
Chain_Node *next_node;
Chain_Node *previous_node;
_ISR_Disable( level );
49620: 203c 0000 0700 movel #1792,%d0
*/
Thread_Control *_Thread_queue_Dequeue_priority(
Thread_queue_Control *the_thread_queue
)
{
49626: 4e56 ffe8 linkw %fp,#-24 4962a: 226e 0008 moveal %fp@(8),%a1 4962e: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@
Chain_Node *new_second_node;
Chain_Node *last_node;
Chain_Node *next_node;
Chain_Node *previous_node;
_ISR_Disable( level );
49632: 40c3 movew %sr,%d3 49634: 8083 orl %d3,%d0 49636: 46c0 movew %d0,%sr
for( index=0 ;
49638: 4280 clrl %d0
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) {
4963a: 2400 movel %d0,%d2 4963c: 2200 movel %d0,%d1
Chain_Node *previous_node;
_ISR_Disable( level );
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
4963e: 5280 addql #1,%d0
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) {
49640: e58a lsll #2,%d2 49642: e989 lsll #4,%d1 49644: 9282 subl %d2,%d1
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
49646: 41f1 1800 lea %a1@(00000000,%d1:l),%a0 4964a: 2458 moveal %a0@+,%a2 4964c: b1ca cmpal %a2,%a0
4964e: 6616 bnes 49666 <_Thread_queue_Dequeue_priority+0x46>
Chain_Node *last_node;
Chain_Node *next_node;
Chain_Node *previous_node;
_ISR_Disable( level );
for( index=0 ;
49650: 7204 moveq #4,%d1 49652: b280 cmpl %d0,%d1
49654: 66e4 bnes 4963a <_Thread_queue_Dequeue_priority+0x1a>
}
/*
* We did not find a thread to unblock.
*/
_ISR_Enable( level );
49656: 46c3 movew %d3,%sr
return NULL;
49658: 95ca subal %a2,%a2
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
return( the_thread );
}
4965a: 200a movel %a2,%d0 4965c: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 49662: 4e5e unlk %fp 49664: 4e75 rts
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
49666: 200a movel %a2,%d0 49668: 0680 0000 003c addil #60,%d0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
4966e: 206a 0038 moveal %a2@(56),%a0
dequeue:
the_thread->Wait.queue = NULL;
new_first_node = _Chain_First( &the_thread->Wait.Block2n );
new_first_thread = (Thread_Control *) new_first_node;
next_node = the_thread->Object.Node.next;
49672: 2252 moveal %a2@,%a1
previous_node = the_thread->Object.Node.previous;
49674: 266a 0004 moveal %a2@(4),%a3
*/
_ISR_Enable( level );
return NULL;
dequeue:
the_thread->Wait.queue = NULL;
49678: 42aa 0044 clrl %a2@(68)
new_first_node = _Chain_First( &the_thread->Wait.Block2n );
new_first_thread = (Thread_Control *) new_first_node;
next_node = the_thread->Object.Node.next;
previous_node = the_thread->Object.Node.previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
4967c: b088 cmpl %a0,%d0 4967e: 6700 008a beqw 4970a <_Thread_queue_Dequeue_priority+0xea>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last(
Chain_Control *the_chain
)
{
return _Chain_Tail( the_chain )->previous;
49682: 286a 0040 moveal %a2@(64),%a4
last_node = _Chain_Last( &the_thread->Wait.Block2n );
new_second_node = new_first_node->next;
49686: 2a50 moveal %a0@,%a5
previous_node->next = new_first_node;
next_node->previous = new_first_node;
49688: 2348 0004 movel %a0,%a1@(4)
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
last_node = _Chain_Last( &the_thread->Wait.Block2n );
new_second_node = new_first_node->next;
previous_node->next = new_first_node;
4968c: 2688 movel %a0,%a3@
next_node->previous = new_first_node;
new_first_node->next = next_node;
new_first_node->previous = previous_node;
4968e: 214b 0004 movel %a3,%a0@(4)
last_node = _Chain_Last( &the_thread->Wait.Block2n );
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;
49692: 2089 movel %a1,%a0@
new_first_node->previous = previous_node;
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
49694: 226a 0040 moveal %a2@(64),%a1 49698: b3ea 0038 cmpal %a2@(56),%a1
4969c: 6716 beqs 496b4 <_Thread_queue_Dequeue_priority+0x94>
/* > two threads on 2-n */
head = _Chain_Head( &new_first_thread->Wait.Block2n );
tail = _Chain_Tail( &new_first_thread->Wait.Block2n );
new_second_node->previous = head;
head->next = new_second_node;
4969e: 214d 0038 movel %a5,%a0@(56)
new_first_node->previous = previous_node;
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
/* > two threads on 2-n */
head = _Chain_Head( &new_first_thread->Wait.Block2n );
tail = _Chain_Tail( &new_first_thread->Wait.Block2n );
496a2: 43e8 003c lea %a0@(60),%a1 496a6: 2889 movel %a1,%a4@
new_first_node->next = next_node;
new_first_node->previous = previous_node;
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
/* > two threads on 2-n */
head = _Chain_Head( &new_first_thread->Wait.Block2n );
496a8: 43e8 0038 lea %a0@(56),%a1 496ac: 2b49 0004 movel %a1,%a5@(4)
tail = _Chain_Tail( &new_first_thread->Wait.Block2n );
new_second_node->previous = head;
head->next = new_second_node;
tail->previous = last_node;
496b0: 214c 0040 movel %a4,%a0@(64)
} else {
previous_node->next = next_node;
next_node->previous = previous_node;
}
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
496b4: 7002 moveq #2,%d0 496b6: b0aa 0050 cmpl %a2@(80),%d0
496ba: 671e beqs 496da <_Thread_queue_Dequeue_priority+0xba>
_ISR_Enable( level );
496bc: 46c3 movew %d3,%sr
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
496be: 2f3c 1003 fff8 movel #268697592,%sp@- 496c4: 2f0a movel %a2,%sp@- 496c6: 4eb9 0004 8e1c jsr 48e1c <_Thread_Clear_state> 496cc: 508f addql #8,%sp
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
return( the_thread );
}
496ce: 200a movel %a2,%d0 496d0: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 496d6: 4e5e unlk %fp 496d8: 4e75 rts
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
496da: 7203 moveq #3,%d1 496dc: 2541 0050 movel %d1,%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 );
496e0: 46c3 movew %d3,%sr
(void) _Watchdog_Remove( &the_thread->Timer );
496e2: 486a 0048 pea %a2@(72) 496e6: 4eb9 0004 a160 jsr 4a160 <_Watchdog_Remove> 496ec: 2f3c 1003 fff8 movel #268697592,%sp@- 496f2: 2f0a movel %a2,%sp@- 496f4: 4eb9 0004 8e1c jsr 48e1c <_Thread_Clear_state> 496fa: 4fef 000c lea %sp@(12),%sp
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
return( the_thread );
}
496fe: 200a movel %a2,%d0 49700: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 49706: 4e5e unlk %fp 49708: 4e75 rts
head->next = new_second_node;
tail->previous = last_node;
last_node->next = tail;
}
} else {
previous_node->next = next_node;
4970a: 2689 movel %a1,%a3@
next_node->previous = previous_node;
4970c: 234b 0004 movel %a3,%a1@(4) 49710: 60a2 bras 496b4 <_Thread_queue_Dequeue_priority+0x94>
...
000497bc <_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
)
{
497bc: 4e56 ffe0 linkw %fp,#-32 497c0: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 497c4: 266e 000c moveal %fp@(12),%a3
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
497c8: 45eb 0038 lea %a3@(56),%a2
Chain_Node *tail = _Chain_Tail( the_chain );
497cc: 41eb 003c lea %a3@(60),%a0
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
497d0: 2a3c 0000 0700 movel #1792,%d5
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
497d6: 222b 0014 movel %a3@(20),%d1
RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number (
Priority_Control the_priority
)
{
return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER);
497da: 2001 movel %d1,%d0 497dc: ec88 lsrl #6,%d0
header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ];
497de: 2400 movel %d0,%d2 497e0: e988 lsll #4,%d0 497e2: e58a lsll #2,%d2
Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
497e4: 286e 0008 moveal %fp@(8),%a4
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
497e8: 9082 subl %d2,%d0
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
497ea: 274a 0040 movel %a2,%a3@(64)
block_state = the_thread_queue->state;
497ee: 242c 0038 movel %a4@(56),%d2
_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 ];
497f2: 45f4 0800 lea %a4@(00000000,%d0:l),%a2
Chain_Node *tail = _Chain_Tail( the_chain );
497f6: 2748 0038 movel %a0,%a3@(56)
head->next = tail;
head->previous = NULL;
497fa: 42ab 003c clrl %a3@(60)
block_state = the_thread_queue->state;
if ( _Thread_queue_Is_reverse_search( priority ) )
497fe: 0801 0005 btst #5,%d1
49802: 6652 bnes 49856 <_Thread_queue_Enqueue_priority+0x9a>
49804: 2c0a movel %a2,%d6 49806: 5886 addql #4,%d6
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
49808: 2005 movel %d5,%d0 4980a: 40c3 movew %sr,%d3 4980c: 8083 orl %d3,%d0 4980e: 46c0 movew %d0,%sr 49810: 2803 movel %d3,%d4
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
49812: 2052 moveal %a2@,%a0
search_thread = (Thread_Control *) _Chain_First( header );
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
49814: bc88 cmpl %a0,%d6 49816: 6700 010a beqw 49922 <_Thread_queue_Enqueue_priority+0x166>
search_priority = search_thread->current_priority;
4981a: 2268 0014 moveal %a0@(20),%a1
if ( priority <= search_priority )
4981e: b3c1 cmpal %d1,%a1
49820: 6418 bccs 4983a <_Thread_queue_Enqueue_priority+0x7e>
break;
search_priority = search_thread->current_priority;
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
49822: 2005 movel %d5,%d0 49824: 46c3 movew %d3,%sr 49826: 8083 orl %d3,%d0 49828: 46c0 movew %d0,%sr
RTEMS_INLINE_ROUTINE bool _States_Are_set (
States_Control the_states,
States_Control mask
)
{
return ( (the_states & mask) != STATES_READY);
4982a: 2002 movel %d2,%d0 4982c: c0a8 0010 andl %a0@(16),%d0
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
49830: 6700 0090 beqw 498c2 <_Thread_queue_Enqueue_priority+0x106>
_ISR_Enable( level );
goto restart_forward_search;
}
search_thread =
49834: 2050 moveal %a0@,%a0
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) _Chain_First( header );
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
49836: bc88 cmpl %a0,%d6
49838: 66e0 bnes 4981a <_Thread_queue_Enqueue_priority+0x5e>
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
4983a: 202c 0030 movel %a4@(48),%d0 4983e: 7401 moveq #1,%d2 49840: b480 cmpl %d0,%d2 49842: 6700 0094 beqw 498d8 <_Thread_queue_Enqueue_priority+0x11c>
* For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level;
49846: 206e 0010 moveal %fp@(16),%a0 4984a: 2084 movel %d4,%a0@
return the_thread_queue->sync_state; }
4984c: 4cd7 1c7c moveml %sp@,%d2-%d6/%a2-%a4 49850: 4e5e unlk %fp 49852: 4e75 rts
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
_ISR_Enable( level );
49854: 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;
49856: 4283 clrl %d3 49858: 1639 0005 f6aa moveb 5f6aa <rtems_maximum_priority>,%d3
_ISR_Disable( level );
4985e: 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;
49860: 2243 moveal %d3,%a1 49862: 5289 addql #1,%a1
_ISR_Disable( level );
49864: 40c3 movew %sr,%d3 49866: 8083 orl %d3,%d0 49868: 46c0 movew %d0,%sr 4986a: 2803 movel %d3,%d4
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last(
Chain_Control *the_chain
)
{
return _Chain_Tail( the_chain )->previous;
4986c: 206a 0008 moveal %a2@(8),%a0
search_thread = (Thread_Control *) _Chain_Last( header );
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
49870: b5c8 cmpal %a0,%a2
49872: 6720 beqs 49894 <_Thread_queue_Enqueue_priority+0xd8>
search_priority = search_thread->current_priority;
49874: 2268 0014 moveal %a0@(20),%a1
if ( priority >= search_priority )
49878: b3c1 cmpal %d1,%a1
4987a: 6318 blss 49894 <_Thread_queue_Enqueue_priority+0xd8>
break;
search_priority = search_thread->current_priority;
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
4987c: 2005 movel %d5,%d0 4987e: 46c3 movew %d3,%sr 49880: 8083 orl %d3,%d0 49882: 46c0 movew %d0,%sr 49884: 2002 movel %d2,%d0 49886: c0a8 0010 andl %a0@(16),%d0
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
4988a: 67c8 beqs 49854 <_Thread_queue_Enqueue_priority+0x98>
_ISR_Enable( level );
goto restart_reverse_search;
}
search_thread = (Thread_Control *)
4988c: 2068 0004 moveal %a0@(4),%a0
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) _Chain_Last( header );
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
49890: b5c8 cmpal %a0,%a2
49892: 66e0 bnes 49874 <_Thread_queue_Enqueue_priority+0xb8>
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
49894: 202c 0030 movel %a4@(48),%d0 49898: 7401 moveq #1,%d2 4989a: b480 cmpl %d0,%d2
4989c: 66a8 bnes 49846 <_Thread_queue_Enqueue_priority+0x8a>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
4989e: 42ac 0030 clrl %a4@(48)
if ( priority == search_priority )
498a2: b3c1 cmpal %d1,%a1
498a4: 6758 beqs 498fe <_Thread_queue_Enqueue_priority+0x142><== NEVER TAKEN
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
498a6: 2250 moveal %a0@,%a1
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
498a8: 2748 0004 movel %a0,%a3@(4)
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
498ac: 2689 movel %a1,%a3@
the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node;
498ae: 234b 0004 movel %a3,%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;
498b2: 208b movel %a3,%a0@
next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue;
498b4: 274c 0044 movel %a4,%a3@(68)
_ISR_Enable( level );
498b8: 46c3 movew %d3,%sr
* * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; }
498ba: 4cd7 1c7c moveml %sp@,%d2-%d6/%a2-%a4 498be: 4e5e unlk %fp 498c0: 4e75 rts
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
_ISR_Enable( level );
498c2: 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 );
498c4: 2005 movel %d5,%d0 498c6: 40c3 movew %sr,%d3 498c8: 8083 orl %d3,%d0 498ca: 46c0 movew %d0,%sr 498cc: 2803 movel %d3,%d4
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
498ce: 2052 moveal %a2@,%a0
search_thread = (Thread_Control *) _Chain_First( header );
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
498d0: bc88 cmpl %a0,%d6 498d2: 6600 ff46 bnew 4981a <_Thread_queue_Enqueue_priority+0x5e> 498d6: 604a bras 49922 <_Thread_queue_Enqueue_priority+0x166>
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
498d8: 42ac 0030 clrl %a4@(48)
if ( priority == search_priority )
498dc: b3c1 cmpal %d1,%a1
498de: 671e beqs 498fe <_Thread_queue_Enqueue_priority+0x142>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
498e0: 2268 0004 moveal %a0@(4),%a1
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
498e4: 2688 movel %a0,%a3@
the_node->previous = previous_node;
498e6: 2749 0004 movel %a1,%a3@(4)
previous_node->next = the_node;
498ea: 228b movel %a3,%a1@
search_node->previous = the_node;
498ec: 214b 0004 movel %a3,%a0@(4)
the_thread->Wait.queue = the_thread_queue;
498f0: 274c 0044 movel %a4,%a3@(68)
_ISR_Enable( level );
498f4: 46c3 movew %d3,%sr
* * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; }
498f6: 4cd7 1c7c moveml %sp@,%d2-%d6/%a2-%a4 498fa: 4e5e unlk %fp 498fc: 4e75 rts
_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;
498fe: 2268 0040 moveal %a0@(64),%a1
the_thread->Wait.queue = the_thread_queue;
_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 );
49902: 45e8 003c lea %a0@(60),%a2
previous_node = search_node->previous;
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
the_node->previous = previous_node;
49906: 2749 0004 movel %a1,%a3@(4)
the_thread->Wait.queue = the_thread_queue;
_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 );
4990a: 268a movel %a2,%a3@
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
the_node->previous = previous_node;
previous_node->next = the_node;
search_node->previous = the_node;
4990c: 214b 0040 movel %a3,%a0@(64)
previous_node = search_node->previous;
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
the_node->previous = previous_node;
previous_node->next = the_node;
49910: 228b movel %a3,%a1@
search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue;
49912: 274c 0044 movel %a4,%a3@(68)
_ISR_Enable( level );
49916: 46c4 movew %d4,%sr
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
49918: 7001 moveq #1,%d0
* * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; }
4991a: 4cd7 1c7c moveml %sp@,%d2-%d6/%a2-%a4 4991e: 4e5e unlk %fp 49920: 4e75 rts
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
49922: 202c 0030 movel %a4@(48),%d0
if ( _Thread_queue_Is_reverse_search( priority ) )
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
49926: 327c ffff moveaw #-1,%a1
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
4992a: 7401 moveq #1,%d2 4992c: b480 cmpl %d0,%d2 4992e: 6600 ff16 bnew 49846 <_Thread_queue_Enqueue_priority+0x8a> 49932: 60a4 bras 498d8 <_Thread_queue_Enqueue_priority+0x11c>
0004ef28 <_Thread_queue_Extract_fifo>:
Thread_Control *the_thread
)
{
ISR_Level level;
_ISR_Disable( level );
4ef28: 203c 0000 0700 movel #1792,%d0
void _Thread_queue_Extract_fifo(
Thread_queue_Control *the_thread_queue __attribute__((unused)),
Thread_Control *the_thread
)
{
4ef2e: 4e56 0000 linkw %fp,#0 4ef32: 2f0a movel %a2,%sp@- 4ef34: 246e 000c moveal %fp@(12),%a2
ISR_Level level;
_ISR_Disable( level );
4ef38: 40c1 movew %sr,%d1 4ef3a: 8081 orl %d1,%d0 4ef3c: 46c0 movew %d0,%sr 4ef3e: 202a 0010 movel %a2@(16),%d0 4ef42: 0280 0003 bee0 andil #245472,%d0
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
4ef48: 6734 beqs 4ef7e <_Thread_queue_Extract_fifo+0x56>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
4ef4a: 2252 moveal %a2@,%a1
_Chain_Extract_unprotected( &the_thread->Object.Node );
the_thread->Wait.queue = NULL;
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
4ef4c: 7002 moveq #2,%d0
previous = the_node->previous;
4ef4e: 206a 0004 moveal %a2@(4),%a0
next->previous = previous;
4ef52: 2348 0004 movel %a0,%a1@(4)
previous->next = next;
4ef56: 2089 movel %a1,%a0@
return;
}
_Chain_Extract_unprotected( &the_thread->Object.Node );
the_thread->Wait.queue = NULL;
4ef58: 42aa 0044 clrl %a2@(68)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
4ef5c: b0aa 0050 cmpl %a2@(80),%d0
4ef60: 6726 beqs 4ef88 <_Thread_queue_Extract_fifo+0x60>
_ISR_Enable( level );
4ef62: 46c1 movew %d1,%sr
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
4ef64: 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
}
4ef68: 246e fffc moveal %fp@(-4),%a2 4ef6c: 203c 1003 fff8 movel #268697592,%d0 4ef72: 2d40 000c movel %d0,%fp@(12) 4ef76: 4e5e unlk %fp 4ef78: 4ef9 0004 8e1c jmp 48e1c <_Thread_Clear_state>
ISR_Level level;
_ISR_Disable( level );
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
_ISR_Enable( level );
4ef7e: 46c1 movew %d1,%sr
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
4ef80: 246e fffc moveal %fp@(-4),%a2 4ef84: 4e5e unlk %fp 4ef86: 4e75 rts 4ef88: 7003 moveq #3,%d0 4ef8a: 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 );
4ef8e: 46c1 movew %d1,%sr
(void) _Watchdog_Remove( &the_thread->Timer );
4ef90: 486a 0048 pea %a2@(72) 4ef94: 4eb9 0004 a160 jsr 4a160 <_Watchdog_Remove> 4ef9a: 588f addql #4,%sp 4ef9c: 203c 1003 fff8 movel #268697592,%d0 4efa2: 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
}
4efa6: 246e fffc moveal %fp@(-4),%a2 4efaa: 2d40 000c movel %d0,%fp@(12) 4efae: 4e5e unlk %fp 4efb0: 4ef9 0004 8e1c jmp 48e1c <_Thread_Clear_state>
...
0004d2bc <_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 );
4d2bc: 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
)
{
4d2c2: 4e56 ffec linkw %fp,#-20 4d2c6: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 4d2ca: 246e 000c moveal %fp@(12),%a2 4d2ce: 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 );
4d2d2: 40c1 movew %sr,%d1 4d2d4: 8081 orl %d1,%d0 4d2d6: 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);
4d2d8: 202a 0010 movel %a2@(16),%d0 4d2dc: 0280 0003 bee0 andil #245472,%d0
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
4d2e2: 6772 beqs 4d356 <_Thread_queue_Extract_priority_helper+0x9a>
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
4d2e4: 200a movel %a2,%d0 4d2e6: 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;
4d2ec: 2252 moveal %a2@,%a1
previous_node = the_node->previous;
4d2ee: 266a 0004 moveal %a2@(4),%a3
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
4d2f2: 206a 0038 moveal %a2@(56),%a0
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
4d2f6: b088 cmpl %a0,%d0
4d2f8: 6768 beqs 4d362 <_Thread_queue_Extract_priority_helper+0xa6>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last(
Chain_Control *the_chain
)
{
return _Chain_Tail( the_chain )->previous;
4d2fa: 286a 0040 moveal %a2@(64),%a4
new_first_node = _Chain_First( &the_thread->Wait.Block2n );
new_first_thread = (Thread_Control *) new_first_node;
last_node = _Chain_Last( &the_thread->Wait.Block2n );
new_second_node = new_first_node->next;
4d2fe: 2a50 moveal %a0@,%a5
previous_node->next = new_first_node;
next_node->previous = new_first_node;
4d300: 2348 0004 movel %a0,%a1@(4)
new_first_node = _Chain_First( &the_thread->Wait.Block2n );
new_first_thread = (Thread_Control *) new_first_node;
last_node = _Chain_Last( &the_thread->Wait.Block2n );
new_second_node = new_first_node->next;
previous_node->next = new_first_node;
4d304: 2688 movel %a0,%a3@
next_node->previous = new_first_node;
new_first_node->next = next_node;
new_first_node->previous = previous_node;
4d306: 214b 0004 movel %a3,%a0@(4)
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
4d30a: 202a 0040 movel %a2@(64),%d0
last_node = _Chain_Last( &the_thread->Wait.Block2n );
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;
4d30e: 2089 movel %a1,%a0@
new_first_node->previous = previous_node;
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
4d310: b0aa 0038 cmpl %a2@(56),%d0
4d314: 6716 beqs 4d32c <_Thread_queue_Extract_priority_helper+0x70>
/* > two threads on 2-n */
head = _Chain_Head( &new_first_thread->Wait.Block2n );
tail = _Chain_Tail( &new_first_thread->Wait.Block2n );
new_second_node->previous = head;
head->next = new_second_node;
4d316: 214d 0038 movel %a5,%a0@(56)
new_first_node->previous = previous_node;
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
/* > two threads on 2-n */
head = _Chain_Head( &new_first_thread->Wait.Block2n );
tail = _Chain_Tail( &new_first_thread->Wait.Block2n );
4d31a: 43e8 003c lea %a0@(60),%a1 4d31e: 2889 movel %a1,%a4@
new_first_node->next = next_node;
new_first_node->previous = previous_node;
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
/* > two threads on 2-n */
head = _Chain_Head( &new_first_thread->Wait.Block2n );
4d320: 43e8 0038 lea %a0@(56),%a1 4d324: 2b49 0004 movel %a1,%a5@(4)
tail = _Chain_Tail( &new_first_thread->Wait.Block2n );
new_second_node->previous = head;
head->next = new_second_node;
tail->previous = last_node;
4d328: 214c 0040 movel %a4,%a0@(64)
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
4d32c: 4a02 tstb %d2
4d32e: 6626 bnes 4d356 <_Thread_queue_Extract_priority_helper+0x9a>
_ISR_Enable( level );
return;
}
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
4d330: 7002 moveq #2,%d0 4d332: b0aa 0050 cmpl %a2@(80),%d0
4d336: 6736 beqs 4d36e <_Thread_queue_Extract_priority_helper+0xb2>
_ISR_Enable( level );
4d338: 46c1 movew %d1,%sr 4d33a: 2d4a 0008 movel %a2,%fp@(8) 4d33e: 227c 1003 fff8 moveal #268697592,%a1
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
4d344: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4d34a: 2d49 000c movel %a1,%fp@(12) 4d34e: 4e5e unlk %fp 4d350: 4ef9 0004 8e1c jmp 48e1c <_Thread_Clear_state>
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
_ISR_Enable( level );
4d356: 46c1 movew %d1,%sr
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
4d358: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4d35e: 4e5e unlk %fp 4d360: 4e75 rts
head->next = new_second_node;
tail->previous = last_node;
last_node->next = tail;
}
} else {
previous_node->next = next_node;
4d362: 2689 movel %a1,%a3@
next_node->previous = previous_node;
4d364: 234b 0004 movel %a3,%a1@(4)
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
4d368: 4a02 tstb %d2
4d36a: 67c4 beqs 4d330 <_Thread_queue_Extract_priority_helper+0x74>
4d36c: 60e8 bras 4d356 <_Thread_queue_Extract_priority_helper+0x9a> 4d36e: 7003 moveq #3,%d0 4d370: 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 );
4d374: 46c1 movew %d1,%sr
(void) _Watchdog_Remove( &the_thread->Timer );
4d376: 486a 0048 pea %a2@(72) 4d37a: 4eb9 0004 a160 jsr 4a160 <_Watchdog_Remove> 4d380: 588f addql #4,%sp 4d382: 227c 1003 fff8 moveal #268697592,%a1 4d388: 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
}
4d38c: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4d392: 2d49 000c movel %a1,%fp@(12) 4d396: 4e5e unlk %fp 4d398: 4ef9 0004 8e1c jmp 48e1c <_Thread_Clear_state>
...
000499a0 <_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 ) {
499a0: 7201 moveq #1,%d1
Thread_queue_Control *the_thread_queue,
Thread_queue_Disciplines the_discipline,
States_Control state,
uint32_t timeout_status
)
{
499a2: 4e56 0000 linkw %fp,#0 499a6: 206e 0008 moveal %fp@(8),%a0 499aa: 2f02 movel %d2,%sp@- 499ac: 202e 000c movel %fp@(12),%d0
the_thread_queue->state = state;
499b0: 216e 0010 0038 movel %fp@(16),%a0@(56)
the_thread_queue->discipline = the_discipline; the_thread_queue->timeout_status = timeout_status;
499b6: 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;
499bc: 2140 0034 movel %d0,%a0@(52)
the_thread_queue->timeout_status = timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
499c0: 42a8 0030 clrl %a0@(48)
if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
499c4: b280 cmpl %d0,%d1
499c6: 6714 beqs 499dc <_Thread_queue_Initialize+0x3c>
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
499c8: 2008 movel %a0,%d0 499ca: 5880 addql #4,%d0
head->next = tail;
head->previous = NULL;
499cc: 42a8 0004 clrl %a0@(4)
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
499d0: 2080 movel %d0,%a0@
head->next = tail;
head->previous = NULL;
tail->previous = head;
499d2: 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 );
}
}
499d6: 241f movel %sp@+,%d2 499d8: 4e5e unlk %fp 499da: 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 ) {
499dc: 4280 clrl %d0
uint32_t index;
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++)
_Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] );
499de: 2400 movel %d0,%d2 499e0: 2200 movel %d0,%d1
if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
uint32_t index;
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++)
499e2: 5280 addql #1,%d0
_Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] );
499e4: e58a lsll #2,%d2 499e6: e989 lsll #4,%d1 499e8: 9282 subl %d2,%d1 499ea: 43f0 1800 lea %a0@(00000000,%d1:l),%a1
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
499ee: 2209 movel %a1,%d1 499f0: 5881 addql #4,%d1 499f2: 2281 movel %d1,%a1@
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
uint32_t index;
for( index=0 ;
499f4: 7204 moveq #4,%d1
head->next = tail;
head->previous = NULL;
499f6: 42a9 0004 clrl %a1@(4)
tail->previous = head;
499fa: 2349 0008 movel %a1,%a1@(8) 499fe: b280 cmpl %d0,%d1
49a00: 67d4 beqs 499d6 <_Thread_queue_Initialize+0x36> <== NEVER TAKEN
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++)
_Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] );
49a02: 2400 movel %d0,%d2 49a04: 2200 movel %d0,%d1
if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
uint32_t index;
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++)
49a06: 5280 addql #1,%d0
_Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] );
49a08: e58a lsll #2,%d2 49a0a: e989 lsll #4,%d1 49a0c: 9282 subl %d2,%d1 49a0e: 43f0 1800 lea %a0@(00000000,%d1:l),%a1
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
49a12: 2209 movel %a1,%d1 49a14: 5881 addql #4,%d1 49a16: 2281 movel %d1,%a1@
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
uint32_t index;
for( index=0 ;
49a18: 7204 moveq #4,%d1
head->next = tail;
head->previous = NULL;
49a1a: 42a9 0004 clrl %a1@(4)
tail->previous = head;
49a1e: 2349 0008 movel %a1,%a1@(8) 49a22: b280 cmpl %d0,%d1
49a24: 66b8 bnes 499de <_Thread_queue_Initialize+0x3e>
49a26: 60ae bras 499d6 <_Thread_queue_Initialize+0x36>
00049a28 <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
49a28: 4e56 fff0 linkw %fp,#-16 49a2c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 49a30: 246e 0008 moveal %fp@(8),%a2 49a34: 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 )
49a38: 4a8a tstl %a2
49a3a: 6708 beqs 49a44 <_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 ) {
49a3c: 7001 moveq #1,%d0 49a3e: b0aa 0034 cmpl %a2@(52),%d0
49a42: 670a beqs 49a4e <_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 );
}
}
49a44: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 <== NOT EXECUTED 49a4a: 4e5e unlk %fp <== NOT EXECUTED 49a4c: 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 );
49a4e: 303c 0700 movew #1792,%d0 49a52: 40c2 movew %sr,%d2 49a54: 8082 orl %d2,%d0 49a56: 46c0 movew %d0,%sr 49a58: 202b 0010 movel %a3@(16),%d0 49a5c: 0280 0003 bee0 andil #245472,%d0
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
49a62: 660c bnes 49a70 <_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 );
49a64: 46c2 movew %d2,%sr <== NOT EXECUTED
} }
49a66: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 49a6c: 4e5e unlk %fp 49a6e: 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 );
49a70: 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;
49a74: 7001 moveq #1,%d0 49a76: 2f0b movel %a3,%sp@- 49a78: 2540 0030 movel %d0,%a2@(48) 49a7c: 2f0a movel %a2,%sp@- 49a7e: 4eb9 0004 d2bc jsr 4d2bc <_Thread_queue_Extract_priority_helper>
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
49a84: 486e fffc pea %fp@(-4) 49a88: 2f0b movel %a3,%sp@- 49a8a: 2f0a movel %a2,%sp@- 49a8c: 4eb9 0004 97bc jsr 497bc <_Thread_queue_Enqueue_priority> 49a92: 4fef 0018 lea %sp@(24),%sp
}
_ISR_Enable( level );
49a96: 46c2 movew %d2,%sr 49a98: 60cc bras 49a66 <_Thread_queue_Requeue+0x3e>
...
00049a9c <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
49a9c: 4e56 fffc linkw %fp,#-4
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
49aa0: 486e fffc pea %fp@(-4) 49aa4: 2f2e 0008 movel %fp@(8),%sp@- 49aa8: 4eb9 0004 9240 jsr 49240 <_Thread_Get>
switch ( location ) {
49aae: 508f addql #8,%sp 49ab0: 4aae fffc tstl %fp@(-4)
49ab4: 661e bnes 49ad4 <_Thread_queue_Timeout+0x38> <== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
49ab6: 2f00 movel %d0,%sp@- 49ab8: 4eb9 0004 d3a0 jsr 4d3a0 <_Thread_queue_Process_timeout>
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
return _Thread_Dispatch_disable_level;
49abe: 588f addql #4,%sp
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
49ac0: 2039 0006 1048 movel 61048 <_Thread_Dispatch_disable_level>,%d0 49ac6: 5380 subql #1,%d0 49ac8: 23c0 0006 1048 movel %d0,61048 <_Thread_Dispatch_disable_level>
return _Thread_Dispatch_disable_level;
49ace: 2039 0006 1048 movel 61048 <_Thread_Dispatch_disable_level>,%d0
_Thread_Unnest_dispatch();
break;
}
}
49ad4: 4e5e unlk %fp <== NOT EXECUTED
00057684 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
57684: 4e56 ffb0 linkw %fp,#-80
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
tail->previous = head;
57688: 41ee ffe8 lea %fp@(-24),%a0
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
5768c: 200e movel %fp,%d0 5768e: 5180 subql #8,%d0 57690: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 57694: 246e 0008 moveal %fp@(8),%a2 57698: 260e movel %fp,%d3 5769a: 2c0e movel %fp,%d6 5769c: 0683 ffff fff4 addil #-12,%d3 576a2: 0686 ffff ffec addil #-20,%d6 576a8: 240a movel %a2,%d2 576aa: 2a0a movel %a2,%d5 576ac: 4bf9 0005 bcd4 lea 5bcd4 <_Watchdog_Adjust_to_chain>,%a5 576b2: 0682 0000 0030 addil #48,%d2 576b8: 0685 0000 0068 addil #104,%d5 576be: 47f9 0005 82bc lea 582bc <_Chain_Get>,%a3 576c4: 49f9 0005 bd5c lea 5bd5c <_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 );
576ca: 283c 0000 0700 movel #1792,%d4
head->previous = NULL; tail->previous = head;
576d0: 2d48 fff0 movel %a0,%fp@(-16) 576d4: 41ea 0008 lea %a2@(8),%a0 576d8: 2d48 ffe4 movel %a0,%fp@(-28) 576dc: 41ea 0040 lea %a2@(64),%a0
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
576e0: 2d40 fff4 movel %d0,%fp@(-12)
head->previous = NULL;
576e4: 42ae ffec clrl %fp@(-20) 576e8: 42ae fff8 clrl %fp@(-8)
tail->previous = head;
576ec: 2d43 fffc movel %d3,%fp@(-4) 576f0: 2d40 ffd8 movel %d0,%fp@(-40) 576f4: 2d48 ffe0 movel %a0,%fp@(-32)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
576f8: 2d46 ffe8 movel %d6,%fp@(-24)
{
/*
* 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;
576fc: 41ee ffe8 lea %fp@(-24),%a0 57700: 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;
57704: 2039 0007 de4e movel 7de4e <_Watchdog_Ticks_since_boot>,%d0
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
5770a: 222a 003c movel %a2@(60),%d1
watchdogs->last_snapshot = snapshot;
5770e: 2540 003c movel %d0,%a2@(60)
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
57712: 9081 subl %d1,%d0 57714: 2f03 movel %d3,%sp@- 57716: 2f00 movel %d0,%sp@- 57718: 2f02 movel %d2,%sp@- 5771a: 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();
5771c: 2039 0007 ddd6 movel 7ddd6 <_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 ) {
57722: 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;
57726: 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 ) {
5772a: b280 cmpl %d0,%d1 5772c: 6500 0086 bcsw 577b4 <_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 ) {
57730: b280 cmpl %d0,%d1 57732: 6200 00a4 bhiw 577d8 <_Timer_server_Body+0x154>
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
}
watchdogs->last_snapshot = snapshot;
57736: 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 );
5773a: 202a 0078 movel %a2@(120),%d0 5773e: 2f00 movel %d0,%sp@- 57740: 4e93 jsr %a3@
if ( timer == NULL ) {
57742: 588f addql #4,%sp 57744: 4a80 tstl %d0
57746: 672e beqs 57776 <_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 ) {
57748: 2040 moveal %d0,%a0 <== NOT EXECUTED 5774a: 7e01 moveq #1,%d7 <== NOT EXECUTED 5774c: 2228 0038 movel %a0@(56),%d1 <== NOT EXECUTED 57750: be81 cmpl %d1,%d7 <== NOT EXECUTED 57752: 6700 00a8 beqw 577fc <_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 ) {
57756: 7e03 moveq #3,%d7 <== NOT EXECUTED 57758: be81 cmpl %d1,%d7 <== NOT EXECUTED 5775a: 66de bnes 5773a <_Timer_server_Body+0xb6> <== NOT EXECUTED
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
5775c: 2040 moveal %d0,%a0 <== NOT EXECUTED 5775e: 4868 0010 pea %a0@(16) <== NOT EXECUTED 57762: 2f05 movel %d5,%sp@- <== NOT EXECUTED 57764: 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 );
57766: 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 );
5776a: 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 );
5776c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5776e: 4e93 jsr %a3@ <== NOT EXECUTED
if ( timer == NULL ) {
57770: 588f addql #4,%sp <== NOT EXECUTED 57772: 4a80 tstl %d0 <== NOT EXECUTED 57774: 66d2 bnes 57748 <_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 );
57776: 2004 movel %d4,%d0 57778: 40c1 movew %sr,%d1 5777a: 8081 orl %d1,%d0 5777c: 46c0 movew %d0,%sr
if ( _Chain_Is_empty( insert_chain ) ) {
5777e: bcae ffe8 cmpl %fp@(-24),%d6 57782: 6700 0086 beqw 5780a <_Timer_server_Body+0x186>
ts->insert_chain = NULL;
_ISR_Enable( level );
break;
} else {
_ISR_Enable( level );
57786: 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;
57788: 2039 0007 de4e movel 7de4e <_Watchdog_Ticks_since_boot>,%d0<== NOT EXECUTED
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
5778e: 222a 003c movel %a2@(60),%d1 <== NOT EXECUTED
watchdogs->last_snapshot = snapshot;
57792: 2540 003c movel %d0,%a2@(60) <== NOT EXECUTED
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
57796: 9081 subl %d1,%d0 <== NOT EXECUTED 57798: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5779a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5779c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5779e: 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();
577a0: 2039 0007 ddd6 movel 7ddd6 <_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 ) {
577a6: 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;
577aa: 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 ) {
577ae: b280 cmpl %d0,%d1 <== NOT EXECUTED 577b0: 6400 ff7e bccw 57730 <_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 );
577b4: 2f03 movel %d3,%sp@- 577b6: 2e00 movel %d0,%d7 577b8: 9e81 subl %d1,%d7 577ba: 2f07 movel %d7,%sp@- 577bc: 2d40 ffdc movel %d0,%fp@(-36) 577c0: 2f05 movel %d5,%sp@- 577c2: 4eb9 0005 bcd4 jsr 5bcd4 <_Watchdog_Adjust_to_chain> 577c8: 202e ffdc movel %fp@(-36),%d0 577cc: 4fef 000c lea %sp@(12),%sp
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
}
watchdogs->last_snapshot = snapshot;
577d0: 2540 0074 movel %d0,%a2@(116) 577d4: 6000 ff64 braw 5773a <_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 );
577d8: 9280 subl %d0,%d1 577da: 2f01 movel %d1,%sp@- 577dc: 4878 0001 pea 1 <ADD> 577e0: 2d40 ffdc movel %d0,%fp@(-36) 577e4: 2f05 movel %d5,%sp@- 577e6: 4eb9 0005 bc40 jsr 5bc40 <_Watchdog_Adjust> 577ec: 202e ffdc movel %fp@(-36),%d0 577f0: 4fef 000c lea %sp@(12),%sp
}
watchdogs->last_snapshot = snapshot;
577f4: 2540 0074 movel %d0,%a2@(116) 577f8: 6000 ff40 braw 5773a <_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 );
577fc: 4868 0010 pea %a0@(16) <== NOT EXECUTED 57800: 2f02 movel %d2,%sp@- <== NOT EXECUTED 57802: 4e94 jsr %a4@ <== NOT EXECUTED 57804: 508f addql #8,%sp <== NOT EXECUTED 57806: 6000 ff32 braw 5773a <_Timer_server_Body+0xb6> <== NOT EXECUTED
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
ts->insert_chain = NULL;
5780a: 42aa 0078 clrl %a2@(120)
_ISR_Enable( level );
5780e: 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 ) ) {
57810: 2e2e ffd8 movel %fp@(-40),%d7 57814: beae fff4 cmpl %fp@(-12),%d7
57818: 6752 beqs 5786c <_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 );
5781a: 2204 movel %d4,%d1 5781c: 40c0 movew %sr,%d0 5781e: 8280 orl %d0,%d1 57820: 46c1 movew %d1,%sr
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
57822: 206e fff4 moveal %fp@(-12),%a0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
57826: b1ee ffd8 cmpal %fp@(-40),%a0
5782a: 6732 beqs 5785e <_Timer_server_Body+0x1da> <== NEVER TAKEN
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
5782c: 2250 moveal %a0@,%a1
head->next = new_first;
new_first->previous = head;
5782e: 2343 0004 movel %d3,%a1@(4)
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
57832: 42a8 0008 clrl %a0@(8)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
head->next = new_first;
57836: 2d49 fff4 movel %a1,%fp@(-12)
_ISR_Enable( level );
5783a: 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 );
5783c: 2f28 0024 movel %a0@(36),%sp@- 57840: 2f28 0020 movel %a0@(32),%sp@- 57844: 2068 001c moveal %a0@(28),%a0 57848: 4e90 jsr %a0@
}
5784a: 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 );
5784c: 2204 movel %d4,%d1 5784e: 40c0 movew %sr,%d0 57850: 8280 orl %d0,%d1 57852: 46c1 movew %d1,%sr
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
57854: 206e fff4 moveal %fp@(-12),%a0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
57858: b1ee ffd8 cmpal %fp@(-40),%a0
5785c: 66ce bnes 5782c <_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 );
5785e: 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;
57860: 41ee ffe8 lea %fp@(-24),%a0 57864: 2548 0078 movel %a0,%a2@(120) 57868: 6000 fe9a braw 57704 <_Timer_server_Body+0x80>
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
}
} else {
ts->active = false;
5786c: 4200 clrb %d0 5786e: 1540 007c moveb %d0,%a2@(124)
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
57872: 2039 0007 dd4c movel 7dd4c <_Thread_Dispatch_disable_level>,%d0 57878: 5280 addql #1,%d0 5787a: 23c0 0007 dd4c movel %d0,7dd4c <_Thread_Dispatch_disable_level>
return _Thread_Dispatch_disable_level;
57880: 2039 0007 dd4c movel 7dd4c <_Thread_Dispatch_disable_level>,%d0
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
57886: 4878 0008 pea 8 <DIVIDE_BY_ZERO> 5788a: 2f12 movel %a2@,%sp@-
_Timer_server_Reset_interval_system_watchdog( ts );
_Timer_server_Reset_tod_system_watchdog( ts );
_Thread_Enable_dispatch();
ts->active = true;
5788c: 7e01 moveq #1,%d7
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
5788e: 4eb9 0005 b66c jsr 5b66c <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
57894: 2f0a movel %a2,%sp@- 57896: 4eba fd14 jsr %pc@(575ac <_Timer_server_Reset_interval_system_watchdog>)
_Timer_server_Reset_tod_system_watchdog( ts );
5789a: 2f0a movel %a2,%sp@- 5789c: 4eba fd78 jsr %pc@(57616 <_Timer_server_Reset_tod_system_watchdog>)
_Thread_Enable_dispatch();
578a0: 4eb9 0005 ad04 jsr 5ad04 <_Thread_Enable_dispatch>
ts->active = true;
578a6: 1547 007c moveb %d7,%a2@(124)
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
578aa: 2f2e ffe4 movel %fp@(-28),%sp@- 578ae: 4eb9 0005 bea4 jsr 5bea4 <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
578b4: 2f2e ffe0 movel %fp@(-32),%sp@- 578b8: 4eb9 0005 bea4 jsr 5bea4 <_Watchdog_Remove> 578be: 4fef 0018 lea %sp@(24),%sp 578c2: 6000 fe38 braw 576fc <_Timer_server_Body+0x78>
000578c6 <_Timer_server_Schedule_operation_method>:
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
578c6: 4e56 fff0 linkw %fp,#-16 578ca: 206e 000c moveal %fp@(12),%a0 578ce: 48d7 041c moveml %d2-%d4/%a2,%sp@ 578d2: 246e 0008 moveal %fp@(8),%a2
if ( ts->insert_chain == NULL ) {
578d6: 202a 0078 movel %a2@(120),%d0
578da: 671a beqs 578f6 <_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 );
578dc: 202a 0078 movel %a2@(120),%d0 <== NOT EXECUTED 578e0: 2d48 000c movel %a0,%fp@(12) <== NOT EXECUTED
} }
578e4: 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 );
578ea: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED
} }
578ee: 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 );
578f0: 4ef9 0005 825c jmp 5825c <_Chain_Append> <== NOT EXECUTED
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
578f6: 2039 0007 dd4c movel 7dd4c <_Thread_Dispatch_disable_level>,%d0 578fc: 5280 addql #1,%d0 578fe: 23c0 0007 dd4c movel %d0,7dd4c <_Thread_Dispatch_disable_level>
return _Thread_Dispatch_disable_level;
57904: 2039 0007 dd4c movel 7dd4c <_Thread_Dispatch_disable_level>,%d0
* being inserted. This could result in an integer overflow.
*/
_Thread_Disable_dispatch();
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
5790a: 2028 0038 movel %a0@(56),%d0 5790e: 7201 moveq #1,%d1 57910: b280 cmpl %d0,%d1 57912: 6700 008a beqw 5799e <_Timer_server_Schedule_operation_method+0xd8>
_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 ) {
57916: 7803 moveq #3,%d4 57918: b880 cmpl %d0,%d4
5791a: 670e beqs 5792a <_Timer_server_Schedule_operation_method+0x64>
* 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 );
}
}
5791c: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 57922: 4e5e unlk %fp
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
57924: 4ef9 0005 ad04 jmp 5ad04 <_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 );
5792a: 203c 0000 0700 movel #1792,%d0 57930: 40c2 movew %sr,%d2 57932: 8082 orl %d2,%d0 57934: 46c0 movew %d0,%sr
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
57936: 260a movel %a2,%d3 57938: 0683 0000 006c addil #108,%d3
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
5793e: 2039 0007 ddd6 movel 7ddd6 <_TOD_Now>,%d0
last_snapshot = ts->TOD_watchdogs.last_snapshot;
57944: 222a 0074 movel %a2@(116),%d1
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
57948: 226a 0068 moveal %a2@(104),%a1
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
5794c: b689 cmpl %a1,%d3
5794e: 671c beqs 5796c <_Timer_server_Schedule_operation_method+0xa6>
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
57950: 2629 0010 movel %a1@(16),%d3
if ( snapshot > last_snapshot ) {
57954: b280 cmpl %d0,%d1 57956: 6400 00ba bccw 57a12 <_Timer_server_Schedule_operation_method+0x14c>
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
5795a: 2800 movel %d0,%d4 5795c: 9881 subl %d1,%d4
if (delta_interval > delta) {
5795e: b883 cmpl %d3,%d4 57960: 6400 00bc bccw 57a1e <_Timer_server_Schedule_operation_method+0x158>
delta_interval -= delta;
57964: 9684 subl %d4,%d3 57966: 2203 movel %d3,%d1
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
delta_interval += delta;
}
first_watchdog->delta_interval = delta_interval;
57968: 2341 0010 movel %d1,%a1@(16)
}
ts->TOD_watchdogs.last_snapshot = snapshot;
5796c: 2540 0074 movel %d0,%a2@(116)
_ISR_Enable( level );
57970: 46c2 movew %d2,%sr
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
57972: 4868 0010 pea %a0@(16) 57976: 486a 0068 pea %a2@(104) 5797a: 4eb9 0005 bd5c jsr 5bd5c <_Watchdog_Insert>
if ( !ts->active ) {
57980: 508f addql #8,%sp 57982: 102a 007c moveb %a2@(124),%d0
57986: 6694 bnes 5791c <_Timer_server_Schedule_operation_method+0x56>
_Timer_server_Reset_tod_system_watchdog( ts );
57988: 2f0a movel %a2,%sp@- 5798a: 4eba fc8a jsr %pc@(57616 <_Timer_server_Reset_tod_system_watchdog>) 5798e: 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 );
}
}
57990: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 57996: 4e5e unlk %fp
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
57998: 4ef9 0005 ad04 jmp 5ad04 <_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 );
5799e: 203c 0000 0700 movel #1792,%d0 579a4: 40c3 movew %sr,%d3 579a6: 8083 orl %d3,%d0 579a8: 46c0 movew %d0,%sr
snapshot = _Watchdog_Ticks_since_boot;
579aa: 2039 0007 de4e movel 7de4e <_Watchdog_Ticks_since_boot>,%d0
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
579b0: 220a movel %a2,%d1 579b2: 0681 0000 0034 addil #52,%d1
last_snapshot = ts->Interval_watchdogs.last_snapshot;
579b8: 282a 003c movel %a2@(60),%d4
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
579bc: 226a 0030 moveal %a2@(48),%a1
if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) {
579c0: b289 cmpl %a1,%d1
579c2: 6712 beqs 579d6 <_Timer_server_Schedule_operation_method+0x110>
first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain );
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
579c4: 2200 movel %d0,%d1 579c6: 9284 subl %d4,%d1
delta_interval = first_watchdog->delta_interval;
579c8: 2429 0010 movel %a1@(16),%d2
if (delta_interval > delta) {
579cc: b481 cmpl %d1,%d2
579ce: 633a blss 57a0a <_Timer_server_Schedule_operation_method+0x144>
delta_interval -= delta;
579d0: 9481 subl %d1,%d2
} else {
delta_interval = 0;
}
first_watchdog->delta_interval = delta_interval;
579d2: 2342 0010 movel %d2,%a1@(16)
}
ts->Interval_watchdogs.last_snapshot = snapshot;
579d6: 2540 003c movel %d0,%a2@(60)
_ISR_Enable( level );
579da: 46c3 movew %d3,%sr
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
579dc: 4868 0010 pea %a0@(16) 579e0: 486a 0030 pea %a2@(48) 579e4: 4eb9 0005 bd5c jsr 5bd5c <_Watchdog_Insert>
if ( !ts->active ) {
579ea: 508f addql #8,%sp 579ec: 102a 007c moveb %a2@(124),%d0 579f0: 6600 ff2a bnew 5791c <_Timer_server_Schedule_operation_method+0x56>
_Timer_server_Reset_interval_system_watchdog( ts );
579f4: 2f0a movel %a2,%sp@- 579f6: 4eba fbb4 jsr %pc@(575ac <_Timer_server_Reset_interval_system_watchdog>) 579fa: 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 );
}
}
579fc: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 57a02: 4e5e unlk %fp
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
57a04: 4ef9 0005 ad04 jmp 5ad04 <_Thread_Enable_dispatch>
delta_interval = first_watchdog->delta_interval;
if (delta_interval > delta) {
delta_interval -= delta;
} else {
delta_interval = 0;
57a0a: 4282 clrl %d2
}
first_watchdog->delta_interval = delta_interval;
57a0c: 2342 0010 movel %d2,%a1@(16) 57a10: 60c4 bras 579d6 <_Timer_server_Schedule_operation_method+0x110>
}
} else {
/*
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
57a12: d283 addl %d3,%d1
delta_interval += delta;
57a14: 9280 subl %d0,%d1
}
first_watchdog->delta_interval = delta_interval;
57a16: 2341 0010 movel %d1,%a1@(16) 57a1a: 6000 ff50 braw 5796c <_Timer_server_Schedule_operation_method+0xa6>
*/
delta = snapshot - last_snapshot;
if (delta_interval > delta) {
delta_interval -= delta;
} else {
delta_interval = 0;
57a1e: 4281 clrl %d1 <== NOT EXECUTED
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
delta_interval += delta;
}
first_watchdog->delta_interval = delta_interval;
57a20: 2341 0010 movel %d1,%a1@(16) <== NOT EXECUTED 57a24: 6000 ff46 braw 5796c <_Timer_server_Schedule_operation_method+0xa6><== NOT EXECUTED
00049ea2 <_User_extensions_Fatal>:
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
49ea2: 4e56 fff0 linkw %fp,#-16 49ea6: 48d7 041c moveml %d2-%d4/%a2,%sp@ 49eaa: 242e 0008 movel %fp@(8),%d2 49eae: 262e 0010 movel %fp@(16),%d3 49eb2: 2479 0006 1198 moveal 61198 <_User_extensions_List+0x8>,%a2 49eb8: 182e 000f moveb %fp@(15),%d4
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
49ebc: b5fc 0006 1190 cmpal #397712,%a2
49ec2: 6726 beqs 49eea <_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 );
49ec4: 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 )
49eca: 206a 0030 moveal %a2@(48),%a0 49ece: 4a88 tstl %a0
49ed0: 670c beqs 49ede <_User_extensions_Fatal+0x3c>
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
49ed2: 2f03 movel %d3,%sp@- 49ed4: 2f04 movel %d4,%sp@- 49ed6: 2f02 movel %d2,%sp@- 49ed8: 4e90 jsr %a0@ 49eda: 4fef 000c lea %sp@(12),%sp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
49ede: 246a 0004 moveal %a2@(4),%a2
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
49ee2: b5fc 0006 1190 cmpal #397712,%a2
49ee8: 66e0 bnes 49eca <_User_extensions_Fatal+0x28>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
49eea: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2
49ef0: 4e5e unlk %fp <== NOT EXECUTED
00049d60 <_User_extensions_Handler_initialization>:
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
{
49d60: 4e56 ffec linkw %fp,#-20
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
49d64: 203c 0006 1194 movel #397716,%d0 49d6a: 23c0 0006 1190 movel %d0,61190 <_User_extensions_List>
head->previous = NULL; tail->previous = head;
49d70: 203c 0006 1190 movel #397712,%d0 49d76: 23c0 0006 1198 movel %d0,61198 <_User_extensions_List+0x8>
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
49d7c: 203c 0006 1050 movel #397392,%d0 49d82: 23c0 0006 104c movel %d0,6104c <_User_extensions_Switches_list>
head->previous = NULL; tail->previous = head;
49d88: 203c 0006 104c movel #397388,%d0
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
49d8e: 42b9 0006 1194 clrl 61194 <_User_extensions_List+0x4> 49d94: 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;
49d98: 2439 0005 f6a2 movel 5f6a2 <Configuration+0x36>,%d2
initial_extensions = Configuration.User_extension_table;
49d9e: 2639 0005 f6a6 movel 5f6a6 <Configuration+0x3a>,%d3 49da4: 42b9 0006 1050 clrl 61050 <_User_extensions_Switches_list+0x4>
tail->previous = head;
49daa: 23c0 0006 1054 movel %d0,61054 <_User_extensions_Switches_list+0x8>
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
49db0: 4a83 tstl %d3
49db2: 6764 beqs 49e18 <_User_extensions_Handler_initialization+0xb8><== NEVER TAKEN
extension = (User_extensions_Control *)
_Workspace_Allocate_or_fatal_error(
49db4: 7834 moveq #52,%d4 49db6: 4c02 4800 mulsl %d2,%d4
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
extension = (User_extensions_Control *)
49dba: 2f04 movel %d4,%sp@- 49dbc: 4eb9 0004 a318 jsr 4a318 <_Workspace_Allocate_or_fatal_error> 49dc2: 2440 moveal %d0,%a2
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
49dc4: 2f04 movel %d4,%sp@- 49dc6: 42a7 clrl %sp@- 49dc8: 2f00 movel %d0,%sp@- 49dca: 4eb9 0004 f928 jsr 4f928 <memset>
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
49dd0: 4fef 0010 lea %sp@(16),%sp 49dd4: 4a82 tstl %d2
49dd6: 6740 beqs 49e18 <_User_extensions_Handler_initialization+0xb8><== NEVER TAKEN
49dd8: 4284 clrl %d4 49dda: 47f9 0004 d474 lea 4d474 <_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;
49de0: 2043 moveal %d3,%a0 49de2: 5284 addql #1,%d4 49de4: 0683 0000 0020 addil #32,%d3 49dea: 2558 0014 movel %a0@+,%a2@(20) 49dee: 2558 0018 movel %a0@+,%a2@(24) 49df2: 2558 001c movel %a0@+,%a2@(28) 49df6: 2558 0020 movel %a0@+,%a2@(32) 49dfa: 2558 0024 movel %a0@+,%a2@(36) 49dfe: 2558 0028 movel %a0@+,%a2@(40) 49e02: 2558 002c movel %a0@+,%a2@(44) 49e06: 2550 0030 movel %a0@,%a2@(48)
_User_extensions_Add_set( extension );
49e0a: 2f0a movel %a2,%sp@-
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
49e0c: 45ea 0034 lea %a2@(52),%a2 49e10: 4e93 jsr %a3@
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
49e12: 588f addql #4,%sp 49e14: b484 cmpl %d4,%d2
49e16: 66c8 bnes 49de0 <_User_extensions_Handler_initialization+0x80>
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
}
}
}
49e18: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 49e1e: 4e5e unlk %fp
...
00049e24 <_User_extensions_Thread_begin>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_begin (
Thread_Control *executing
)
{
49e24: 4e56 0000 linkw %fp,#0 49e28: 2f0a movel %a2,%sp@-
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
49e2a: 2479 0006 1190 moveal 61190 <_User_extensions_List>,%a2 49e30: 2f02 movel %d2,%sp@- 49e32: 242e 0008 movel %fp@(8),%d2
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
49e36: b5fc 0006 1194 cmpal #397716,%a2
49e3c: 6718 beqs 49e56 <_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 )
49e3e: 206a 0028 moveal %a2@(40),%a0 49e42: 4a88 tstl %a0
49e44: 6706 beqs 49e4c <_User_extensions_Thread_begin+0x28>
(*the_extension->Callouts.thread_begin)( executing );
49e46: 2f02 movel %d2,%sp@- 49e48: 4e90 jsr %a0@ 49e4a: 588f addql #4,%sp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
49e4c: 2452 moveal %a2@,%a2
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
49e4e: b5fc 0006 1194 cmpal #397716,%a2
49e54: 66e8 bnes 49e3e <_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 );
}
}
49e56: 242e fff8 movel %fp@(-8),%d2 49e5a: 246e fffc moveal %fp@(-4),%a2
49e5e: 4e5e unlk %fp <== NOT EXECUTED
00049ef4 <_User_extensions_Thread_create>:
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
49ef4: 4e56 0000 linkw %fp,#0 49ef8: 2f0a movel %a2,%sp@-
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
49efa: 2479 0006 1190 moveal 61190 <_User_extensions_List>,%a2 49f00: 2f02 movel %d2,%sp@- 49f02: 242e 0008 movel %fp@(8),%d2
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _Chain_First( &_User_extensions_List );
49f06: b5fc 0006 1194 cmpal #397716,%a2
49f0c: 6722 beqs 49f30 <_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 ) {
49f0e: 206a 0014 moveal %a2@(20),%a0 49f12: 4a88 tstl %a0
49f14: 6710 beqs 49f26 <_User_extensions_Thread_create+0x32>
status = (*the_extension->Callouts.thread_create)(
49f16: 2f02 movel %d2,%sp@- 49f18: 2f39 0006 14aa movel 614aa <_Per_CPU_Information+0xc>,%sp@- 49f1e: 4e90 jsr %a0@
_Thread_Executing,
the_thread
);
if ( !status )
49f20: 508f addql #8,%sp 49f22: 4a00 tstb %d0
49f24: 6718 beqs 49f3e <_User_extensions_Thread_create+0x4a>
User_extensions_Control *the_extension;
bool status;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
49f26: 2452 moveal %a2@,%a2
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _Chain_First( &_User_extensions_List );
49f28: b5fc 0006 1194 cmpal #397716,%a2
49f2e: 66de bnes 49f0e <_User_extensions_Thread_create+0x1a>
return false;
}
}
return true;
}
49f30: 242e fff8 movel %fp@(-8),%d2 49f34: 246e fffc moveal %fp@(-4),%a2 49f38: 4e5e unlk %fp
if ( !status )
return false;
}
}
return true;
49f3a: 7001 moveq #1,%d0
}
49f3c: 4e75 rts 49f3e: 242e fff8 movel %fp@(-8),%d2 49f42: 246e fffc moveal %fp@(-4),%a2 49f46: 4e5e unlk %fp
status = (*the_extension->Callouts.thread_create)(
_Thread_Executing,
the_thread
);
if ( !status )
return false;
49f48: 4200 clrb %d0 <== NOT EXECUTED
}
}
return true;
}
00049f4c <_User_extensions_Thread_delete>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_delete (
Thread_Control *the_thread
)
{
49f4c: 4e56 0000 linkw %fp,#0 49f50: 2f0a movel %a2,%sp@-
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last(
Chain_Control *the_chain
)
{
return _Chain_Tail( the_chain )->previous;
49f52: 2479 0006 1198 moveal 61198 <_User_extensions_List+0x8>,%a2 49f58: 2f02 movel %d2,%sp@- 49f5a: 242e 0008 movel %fp@(8),%d2
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
49f5e: b5fc 0006 1190 cmpal #397712,%a2
49f64: 6720 beqs 49f86 <_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 )
49f66: 206a 0020 moveal %a2@(32),%a0 49f6a: 4a88 tstl %a0
49f6c: 670c beqs 49f7a <_User_extensions_Thread_delete+0x2e>
(*the_extension->Callouts.thread_delete)(
49f6e: 2f02 movel %d2,%sp@- 49f70: 2f39 0006 14aa movel 614aa <_Per_CPU_Information+0xc>,%sp@- 49f76: 4e90 jsr %a0@ 49f78: 508f addql #8,%sp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
49f7a: 246a 0004 moveal %a2@(4),%a2
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
49f7e: b5fc 0006 1190 cmpal #397712,%a2
49f84: 66e0 bnes 49f66 <_User_extensions_Thread_delete+0x1a>
(*the_extension->Callouts.thread_delete)(
_Thread_Executing,
the_thread
);
}
}
49f86: 242e fff8 movel %fp@(-8),%d2 49f8a: 246e fffc moveal %fp@(-4),%a2 49f8e: 4e5e unlk %fp
...
00049e62 <_User_extensions_Thread_exitted>:
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
49e62: 4e56 0000 linkw %fp,#0 49e66: 2f0a movel %a2,%sp@-
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last(
Chain_Control *the_chain
)
{
return _Chain_Tail( the_chain )->previous;
49e68: 2479 0006 1198 moveal 61198 <_User_extensions_List+0x8>,%a2 49e6e: 2f02 movel %d2,%sp@- 49e70: 242e 0008 movel %fp@(8),%d2
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
49e74: b5fc 0006 1190 cmpal #397712,%a2
49e7a: 671a beqs 49e96 <_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 )
49e7c: 206a 002c moveal %a2@(44),%a0 49e80: 4a88 tstl %a0
49e82: 6706 beqs 49e8a <_User_extensions_Thread_exitted+0x28>
(*the_extension->Callouts.thread_exitted)( executing );
49e84: 2f02 movel %d2,%sp@- 49e86: 4e90 jsr %a0@ 49e88: 588f addql #4,%sp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
49e8a: 246a 0004 moveal %a2@(4),%a2
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
49e8e: b5fc 0006 1190 cmpal #397712,%a2
49e94: 66e6 bnes 49e7c <_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 );
}
}
49e96: 242e fff8 movel %fp@(-8),%d2 49e9a: 246e fffc moveal %fp@(-4),%a2
49e9e: 4e5e unlk %fp <== NOT EXECUTED
0004a8dc <_User_extensions_Thread_restart>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_restart (
Thread_Control *the_thread
)
{
4a8dc: 4e56 0000 linkw %fp,#0 4a8e0: 2f0a movel %a2,%sp@-
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
4a8e2: 2479 0006 1d68 moveal 61d68 <_User_extensions_List>,%a2 4a8e8: 2f02 movel %d2,%sp@- 4a8ea: 242e 0008 movel %fp@(8),%d2
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
4a8ee: b5fc 0006 1d6c cmpal #400748,%a2
4a8f4: 671e beqs 4a914 <_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 )
4a8f6: 206a 001c moveal %a2@(28),%a0 4a8fa: 4a88 tstl %a0
4a8fc: 670c beqs 4a90a <_User_extensions_Thread_restart+0x2e>
(*the_extension->Callouts.thread_restart)(
4a8fe: 2f02 movel %d2,%sp@- 4a900: 2f39 0006 2082 movel 62082 <_Per_CPU_Information+0xc>,%sp@- 4a906: 4e90 jsr %a0@ 4a908: 508f addql #8,%sp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
4a90a: 2452 moveal %a2@,%a2
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
4a90c: b5fc 0006 1d6c cmpal #400748,%a2
4a912: 66e2 bnes 4a8f6 <_User_extensions_Thread_restart+0x1a>
(*the_extension->Callouts.thread_restart)(
_Thread_Executing,
the_thread
);
}
}
4a914: 242e fff8 movel %fp@(-8),%d2 4a918: 246e fffc moveal %fp@(-4),%a2
4a91c: 4e5e unlk %fp <== NOT EXECUTED
00049f94 <_User_extensions_Thread_start>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
49f94: 4e56 0000 linkw %fp,#0 49f98: 2f0a movel %a2,%sp@-
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
49f9a: 2479 0006 1190 moveal 61190 <_User_extensions_List>,%a2 49fa0: 2f02 movel %d2,%sp@- 49fa2: 242e 0008 movel %fp@(8),%d2
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
49fa6: b5fc 0006 1194 cmpal #397716,%a2
49fac: 671e beqs 49fcc <_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 )
49fae: 206a 0018 moveal %a2@(24),%a0 49fb2: 4a88 tstl %a0
49fb4: 670c beqs 49fc2 <_User_extensions_Thread_start+0x2e>
(*the_extension->Callouts.thread_start)(
49fb6: 2f02 movel %d2,%sp@- 49fb8: 2f39 0006 14aa movel 614aa <_Per_CPU_Information+0xc>,%sp@- 49fbe: 4e90 jsr %a0@ 49fc0: 508f addql #8,%sp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
49fc2: 2452 moveal %a2@,%a2
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
49fc4: b5fc 0006 1194 cmpal #397716,%a2
49fca: 66e2 bnes 49fae <_User_extensions_Thread_start+0x1a>
(*the_extension->Callouts.thread_start)(
_Thread_Executing,
the_thread
);
}
}
49fcc: 242e fff8 movel %fp@(-8),%d2 49fd0: 246e fffc moveal %fp@(-4),%a2
49fd4: 4e5e unlk %fp <== NOT EXECUTED
00049fd8 <_User_extensions_Thread_switch>:
void _User_extensions_Thread_switch (
Thread_Control *executing,
Thread_Control *heir
)
{
49fd8: 4e56 fff4 linkw %fp,#-12 49fdc: 48d7 040c moveml %d2-%d3/%a2,%sp@ 49fe0: 262e 0008 movel %fp@(8),%d3 49fe4: 242e 000c movel %fp@(12),%d2 49fe8: 2479 0006 104c moveal 6104c <_User_extensions_Switches_list>,%a2
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _Chain_First( &_User_extensions_Switches_list );
49fee: b5fc 0006 1050 cmpal #397392,%a2
49ff4: 6716 beqs 4a00c <_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 );
49ff6: 2f02 movel %d2,%sp@- 49ff8: 2f03 movel %d3,%sp@- 49ffa: 206a 0008 moveal %a2@(8),%a0 49ffe: 4e90 jsr %a0@
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _Chain_First( &_User_extensions_Switches_list );
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
the_node = the_node->next ) {
4a000: 2452 moveal %a2@,%a2
)
{
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _Chain_First( &_User_extensions_Switches_list );
4a002: 508f addql #8,%sp 4a004: b5fc 0006 1050 cmpal #397392,%a2
4a00a: 66ea bnes 49ff6 <_User_extensions_Thread_switch+0x1e>
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
}
}
4a00c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4a012: 4e5e unlk %fp
...
0004b938 <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
4b938: 4e56 ffe8 linkw %fp,#-24 4b93c: 226e 000c moveal %fp@(12),%a1 4b940: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@
ISR_Level level;
_ISR_Disable( level );
4b944: 283c 0000 0700 movel #1792,%d4 4b94a: 2004 movel %d4,%d0
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
4b94c: 266e 0008 moveal %fp@(8),%a3 4b950: 242e 0010 movel %fp@(16),%d2
ISR_Level level;
_ISR_Disable( level );
4b954: 40c1 movew %sr,%d1 4b956: 8081 orl %d1,%d0 4b958: 46c0 movew %d0,%sr
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
4b95a: 244b moveal %a3,%a2 4b95c: 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 ) ) {
4b95e: b5c8 cmpal %a0,%a2
4b960: 6746 beqs 4b9a8 <_Watchdog_Adjust+0x70>
switch ( direction ) {
4b962: 4a89 tstl %a1
4b964: 664e bnes 4b9b4 <_Watchdog_Adjust+0x7c>
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
4b966: 4a82 tstl %d2
4b968: 673e beqs 4b9a8 <_Watchdog_Adjust+0x70> <== NEVER TAKEN
if ( units < _Watchdog_First( header )->delta_interval ) {
4b96a: 2628 0010 movel %a0@(16),%d3 4b96e: 49f9 0004 bbb4 lea 4bbb4 <_Watchdog_Tickle>,%a4 4b974: b682 cmpl %d2,%d3
4b976: 622a bhis 4b9a2 <_Watchdog_Adjust+0x6a> <== NEVER TAKEN
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
4b978: 7001 moveq #1,%d0 4b97a: 2140 0010 movel %d0,%a0@(16)
_ISR_Enable( level );
4b97e: 46c1 movew %d1,%sr
_Watchdog_Tickle( header );
4b980: 2f0b movel %a3,%sp@- 4b982: 4e94 jsr %a4@
_ISR_Disable( level );
4b984: 2004 movel %d4,%d0 4b986: 40c1 movew %sr,%d1 4b988: 8081 orl %d1,%d0 4b98a: 46c0 movew %d0,%sr
if ( _Chain_Is_empty( header ) )
4b98c: 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;
4b98e: 9483 subl %d3,%d2 4b990: 2053 moveal %a3@,%a0
_Watchdog_Tickle( header );
_ISR_Disable( level );
if ( _Chain_Is_empty( header ) )
4b992: b1ca cmpal %a2,%a0
4b994: 6712 beqs 4b9a8 <_Watchdog_Adjust+0x70>
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
4b996: 4a82 tstl %d2
4b998: 670e beqs 4b9a8 <_Watchdog_Adjust+0x70> <== NEVER TAKEN
if ( units < _Watchdog_First( header )->delta_interval ) {
4b99a: 2628 0010 movel %a0@(16),%d3 4b99e: b483 cmpl %d3,%d2
4b9a0: 64d6 bccs 4b978 <_Watchdog_Adjust+0x40>
_Watchdog_First( header )->delta_interval -= units;
4b9a2: 9682 subl %d2,%d3 4b9a4: 2143 0010 movel %d3,%a0@(16)
}
break;
}
}
_ISR_Enable( level );
4b9a8: 46c1 movew %d1,%sr
}
4b9aa: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 4b9b0: 4e5e unlk %fp 4b9b2: 4e75 rts
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
4b9b4: 7001 moveq #1,%d0 4b9b6: b089 cmpl %a1,%d0
4b9b8: 66ee bnes 4b9a8 <_Watchdog_Adjust+0x70> <== NEVER TAKEN
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
4b9ba: d5a8 0010 addl %d2,%a0@(16)
}
break;
}
}
_ISR_Enable( level );
4b9be: 46c1 movew %d1,%sr
}
4b9c0: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 4b9c6: 4e5e unlk %fp
...
0004a018 <_Watchdog_Insert>:
void _Watchdog_Insert(
Chain_Control *header,
Watchdog_Control *the_watchdog
)
{
4a018: 4e56 ffec linkw %fp,#-20 4a01c: 226e 000c moveal %fp@(12),%a1 4a020: 48d7 043c moveml %d2-%d5/%a2,%sp@ 4a024: 246e 0008 moveal %fp@(8),%a2
Watchdog_Interval delta_interval;
insert_isr_nest_level = _ISR_Nest_level;
_ISR_Disable( level );
4a028: 283c 0000 0700 movel #1792,%d4 4a02e: 2004 movel %d4,%d0
Watchdog_Control *after;
uint32_t insert_isr_nest_level;
Watchdog_Interval delta_interval;
insert_isr_nest_level = _ISR_Nest_level;
4a030: 2639 0006 14a6 movel 614a6 <_Per_CPU_Information+0x8>,%d3
_ISR_Disable( level );
4a036: 40c2 movew %sr,%d2 4a038: 8082 orl %d2,%d0 4a03a: 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 ) {
4a03c: 4aa9 0008 tstl %a1@(8) 4a040: 6600 00bc bnew 4a0fe <_Watchdog_Insert+0xe6>
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
_Watchdog_Sync_count++;
4a044: 2039 0006 1146 movel 61146 <_Watchdog_Sync_count>,%d0
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
4a04a: 7201 moveq #1,%d1
_Watchdog_Sync_count++;
4a04c: 5280 addql #1,%d0
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
4a04e: 2341 0008 movel %d1,%a1@(8)
_Watchdog_Sync_count++;
4a052: 23c0 0006 1146 movel %d0,61146 <_Watchdog_Sync_count>
restart:
delta_interval = the_watchdog->initial;
4a058: 2029 000c movel %a1@(12),%d0 4a05c: 2052 moveal %a2@,%a0
for ( after = _Watchdog_First( header ) ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
4a05e: 6764 beqs 4a0c4 <_Watchdog_Insert+0xac> <== NEVER TAKEN
4a060: 4a90 tstl %a0@
4a062: 6760 beqs 4a0c4 <_Watchdog_Insert+0xac>
break;
if ( delta_interval < after->delta_interval ) {
4a064: 2228 0010 movel %a0@(16),%d1 4a068: b280 cmpl %d0,%d1
4a06a: 6252 bhis 4a0be <_Watchdog_Insert+0xa6>
break;
}
delta_interval -= after->delta_interval;
_ISR_Flash( level );
4a06c: 2a04 movel %d4,%d5 4a06e: 46c2 movew %d2,%sr 4a070: 8a82 orl %d2,%d5 4a072: 46c5 movew %d5,%sr
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
4a074: 7a01 moveq #1,%d5 4a076: baa9 0008 cmpl %a1@(8),%d5
4a07a: 666e bnes 4a0ea <_Watchdog_Insert+0xd2>
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
4a07c: 2a39 0006 10ec movel 610ec <_Watchdog_Sync_level>,%d5 4a082: ba83 cmpl %d3,%d5
4a084: 6230 bhis 4a0b6 <_Watchdog_Insert+0x9e>
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
break;
}
delta_interval -= after->delta_interval;
4a086: 9081 subl %d1,%d0
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
_Watchdog_Sync_count--;
_ISR_Enable( level );
}
4a088: 2050 moveal %a0@,%a0
for ( after = _Watchdog_First( header ) ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
4a08a: 4a80 tstl %d0
4a08c: 6736 beqs 4a0c4 <_Watchdog_Insert+0xac>
4a08e: 4a90 tstl %a0@
4a090: 6732 beqs 4a0c4 <_Watchdog_Insert+0xac>
break;
if ( delta_interval < after->delta_interval ) {
4a092: 2228 0010 movel %a0@(16),%d1 4a096: b081 cmpl %d1,%d0
4a098: 6524 bcss 4a0be <_Watchdog_Insert+0xa6>
after->delta_interval -= delta_interval;
break;
}
delta_interval -= after->delta_interval;
4a09a: 9081 subl %d1,%d0
_ISR_Flash( level );
4a09c: 2204 movel %d4,%d1 4a09e: 46c2 movew %d2,%sr 4a0a0: 8282 orl %d2,%d1 4a0a2: 46c1 movew %d1,%sr
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
4a0a4: 7201 moveq #1,%d1 4a0a6: b2a9 0008 cmpl %a1@(8),%d1
4a0aa: 663e bnes 4a0ea <_Watchdog_Insert+0xd2> <== NEVER TAKEN
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
4a0ac: 2239 0006 10ec movel 610ec <_Watchdog_Sync_level>,%d1 4a0b2: b283 cmpl %d3,%d1
4a0b4: 63d2 blss 4a088 <_Watchdog_Insert+0x70> <== ALWAYS TAKEN
_Watchdog_Sync_level = insert_isr_nest_level;
4a0b6: 23c3 0006 10ec movel %d3,610ec <_Watchdog_Sync_level>
goto restart;
4a0bc: 609a bras 4a058 <_Watchdog_Insert+0x40>
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
break;
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
4a0be: 9280 subl %d0,%d1 4a0c0: 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 );
4a0c4: 2068 0004 moveal %a0@(4),%a0
RTEMS_INLINE_ROUTINE void _Watchdog_Activate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_ACTIVE;
4a0c8: 7a02 moveq #2,%d5
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
4a0ca: 2450 moveal %a0@,%a2
}
}
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
4a0cc: 2340 0010 movel %d0,%a1@(16)
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
4a0d0: 2039 0006 114a movel 6114a <_Watchdog_Ticks_since_boot>,%d0 4a0d6: 2345 0008 movel %d5,%a1@(8)
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
4a0da: 2348 0004 movel %a0,%a1@(4)
before_node = after_node->next; after_node->next = the_node;
4a0de: 2089 movel %a1,%a0@
the_node->next = before_node; before_node->previous = the_node;
4a0e0: 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;
4a0e4: 228a movel %a2,%a1@ 4a0e6: 2340 0014 movel %d0,%a1@(20)
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
4a0ea: 23c3 0006 10ec movel %d3,610ec <_Watchdog_Sync_level>
_Watchdog_Sync_count--;
4a0f0: 2039 0006 1146 movel 61146 <_Watchdog_Sync_count>,%d0 4a0f6: 5380 subql #1,%d0 4a0f8: 23c0 0006 1146 movel %d0,61146 <_Watchdog_Sync_count>
_ISR_Enable( level );
4a0fe: 46c2 movew %d2,%sr
}
4a100: 4cd7 043c moveml %sp@,%d2-%d5/%a2
4a104: 4e5e unlk %fp <== NOT EXECUTED
0004a160 <_Watchdog_Remove>:
{
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
4a160: 203c 0000 0700 movel #1792,%d0
*/
Watchdog_States _Watchdog_Remove(
Watchdog_Control *the_watchdog
)
{
4a166: 4e56 0000 linkw %fp,#0 4a16a: 206e 0008 moveal %fp@(8),%a0 4a16e: 2f0a movel %a2,%sp@- 4a170: 2f02 movel %d2,%sp@-
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
4a172: 40c1 movew %sr,%d1 4a174: 8081 orl %d1,%d0 4a176: 46c0 movew %d0,%sr
previous_state = the_watchdog->state;
4a178: 2028 0008 movel %a0@(8),%d0
switch ( previous_state ) {
4a17c: 7401 moveq #1,%d2 4a17e: b480 cmpl %d0,%d2
4a180: 6764 beqs 4a1e6 <_Watchdog_Remove+0x86> <== NEVER TAKEN
4a182: 6314 blss 4a198 <_Watchdog_Remove+0x38>
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
4a184: 2279 0006 114a moveal 6114a <_Watchdog_Ticks_since_boot>,%a1 4a18a: 2149 0018 movel %a1,%a0@(24)
_ISR_Enable( level );
4a18e: 46c1 movew %d1,%sr
return( previous_state ); }
4a190: 241f movel %sp@+,%d2 4a192: 245f moveal %sp@+,%a2 4a194: 4e5e unlk %fp 4a196: 4e75 rts
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
previous_state = the_watchdog->state;
switch ( previous_state ) {
4a198: 143c 0003 moveb #3,%d2 4a19c: b480 cmpl %d0,%d2
4a19e: 65e4 bcss 4a184 <_Watchdog_Remove+0x24> <== NEVER TAKEN
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
_ISR_Enable( level );
return( previous_state );
}
4a1a0: 2250 moveal %a0@,%a1
break;
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
4a1a2: 42a8 0008 clrl %a0@(8)
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
4a1a6: 4a91 tstl %a1@
4a1a8: 6708 beqs 4a1b2 <_Watchdog_Remove+0x52>
next_watchdog->delta_interval += the_watchdog->delta_interval;
4a1aa: 2428 0010 movel %a0@(16),%d2 4a1ae: d5a9 0010 addl %d2,%a1@(16)
if ( _Watchdog_Sync_count )
4a1b2: 2479 0006 1146 moveal 61146 <_Watchdog_Sync_count>,%a2 4a1b8: 4a8a tstl %a2
4a1ba: 670c beqs 4a1c8 <_Watchdog_Remove+0x68>
_Watchdog_Sync_level = _ISR_Nest_level;
4a1bc: 45f9 0006 14a6 lea 614a6 <_Per_CPU_Information+0x8>,%a2 4a1c2: 23d2 0006 10ec movel %a2@,610ec <_Watchdog_Sync_level>
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
4a1c8: 2468 0004 moveal %a0@(4),%a2
next->previous = previous;
4a1cc: 234a 0004 movel %a2,%a1@(4)
previous->next = next;
4a1d0: 2489 movel %a1,%a2@
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
4a1d2: 2279 0006 114a moveal 6114a <_Watchdog_Ticks_since_boot>,%a1 4a1d8: 2149 0018 movel %a1,%a0@(24)
_ISR_Enable( level );
4a1dc: 46c1 movew %d1,%sr
return( previous_state ); }
4a1de: 241f movel %sp@+,%d2 4a1e0: 245f moveal %sp@+,%a2 4a1e2: 4e5e unlk %fp 4a1e4: 4e75 rts
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
4a1e6: 2279 0006 114a moveal 6114a <_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;
4a1ec: 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;
4a1f0: 2149 0018 movel %a1,%a0@(24)
_ISR_Enable( level );
4a1f4: 46c1 movew %d1,%sr
return( previous_state ); }
4a1f6: 241f movel %sp@+,%d2 4a1f8: 245f moveal %sp@+,%a2 4a1fa: 4e5e unlk %fp
...
0004b328 <_Watchdog_Report_chain>:
)
{
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
4b328: 203c 0000 0700 movel #1792,%d0
void _Watchdog_Report_chain(
const char *name,
Chain_Control *header
)
{
4b32e: 4e56 ffe8 linkw %fp,#-24 4b332: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4b336: 242e 0008 movel %fp@(8),%d2 4b33a: 266e 000c moveal %fp@(12),%a3
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
4b33e: 40c3 movew %sr,%d3 4b340: 8083 orl %d3,%d0 4b342: 46c0 movew %d0,%sr
printk( "Watchdog Chain: %s %p\n", name, header );
4b344: 2f0b movel %a3,%sp@- 4b346: 4bf9 0004 4be0 lea 44be0 <printk>,%a5 4b34c: 2f02 movel %d2,%sp@- 4b34e: 4879 0006 051c pea 6051c <_Status_Object_name_errors_to_status+0x14> 4b354: 4e95 jsr %a5@
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
4b356: 245b moveal %a3@+,%a2
if ( !_Chain_Is_empty( header ) ) {
4b358: 4fef 000c lea %sp@(12),%sp 4b35c: b7ca cmpal %a2,%a3
4b35e: 672c beqs 4b38c <_Watchdog_Report_chain+0x64>
4b360: 49f9 0004 b3a4 lea 4b3a4 <_Watchdog_Report>,%a4
node != _Chain_Tail(header) ;
node = node->next )
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
4b366: 2f0a movel %a2,%sp@- 4b368: 42a7 clrl %sp@- 4b36a: 4e94 jsr %a4@
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = _Chain_First( header ) ;
node != _Chain_Tail(header) ;
node = node->next )
4b36c: 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 = _Chain_First( header ) ;
4b36e: 508f addql #8,%sp 4b370: b7ca cmpal %a2,%a3
4b372: 66f2 bnes 4b366 <_Watchdog_Report_chain+0x3e> <== NEVER TAKEN
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
4b374: 2f02 movel %d2,%sp@- 4b376: 4879 0006 0533 pea 60533 <_Status_Object_name_errors_to_status+0x2b> 4b37c: 4e95 jsr %a5@ 4b37e: 508f addql #8,%sp
} else {
printk( "Chain is empty\n" );
}
_ISR_Enable( level );
4b380: 46c3 movew %d3,%sr
}
4b382: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4b388: 4e5e unlk %fp 4b38a: 4e75 rts
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
} else {
printk( "Chain is empty\n" );
4b38c: 4879 0006 0542 pea 60542 <_Status_Object_name_errors_to_status+0x3a> 4b392: 4e95 jsr %a5@ 4b394: 588f addql #4,%sp
}
_ISR_Enable( level );
4b396: 46c3 movew %d3,%sr
}
4b398: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4b39e: 4e5e unlk %fp
...
0004a200 <_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 );
4a200: 203c 0000 0700 movel #1792,%d0
*/
void _Watchdog_Tickle(
Chain_Control *header
)
{
4a206: 4e56 ffe8 linkw %fp,#-24 4a20a: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4a20e: 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 );
4a212: 40c2 movew %sr,%d2 4a214: 8082 orl %d2,%d0 4a216: 46c0 movew %d0,%sr
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
4a218: 264c moveal %a4,%a3 4a21a: 245b moveal %a3@+,%a2
if ( _Chain_Is_empty( header ) )
4a21c: b7ca cmpal %a2,%a3
4a21e: 673c beqs 4a25c <_Watchdog_Tickle+0x5c>
* 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) {
4a220: 202a 0010 movel %a2@(16),%d0 4a224: 4bf9 0004 a160 lea 4a160 <_Watchdog_Remove>,%a5
4a22a: 6708 beqs 4a234 <_Watchdog_Tickle+0x34>
the_watchdog->delta_interval--;
4a22c: 5380 subql #1,%d0 4a22e: 2540 0010 movel %d0,%a2@(16)
if ( the_watchdog->delta_interval != 0 )
4a232: 6628 bnes 4a25c <_Watchdog_Tickle+0x5c>
case WATCHDOG_REMOVE_IT:
break;
}
_ISR_Disable( level );
4a234: 263c 0000 0700 movel #1792,%d3
if ( the_watchdog->delta_interval != 0 )
goto leave;
}
do {
watchdog_state = _Watchdog_Remove( the_watchdog );
4a23a: 2f0a movel %a2,%sp@- 4a23c: 4e95 jsr %a5@
_ISR_Enable( level );
4a23e: 46c2 movew %d2,%sr
switch( watchdog_state ) {
4a240: 7202 moveq #2,%d1 4a242: 588f addql #4,%sp 4a244: b280 cmpl %d0,%d1
4a246: 6720 beqs 4a268 <_Watchdog_Tickle+0x68> <== ALWAYS TAKEN
case WATCHDOG_REMOVE_IT:
break;
}
_ISR_Disable( level );
4a248: 2003 movel %d3,%d0 4a24a: 40c2 movew %sr,%d2 4a24c: 8082 orl %d2,%d0 4a24e: 46c0 movew %d0,%sr
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
4a250: 2454 moveal %a4@,%a2
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
4a252: b5cb cmpal %a3,%a2
4a254: 6706 beqs 4a25c <_Watchdog_Tickle+0x5c>
}
_ISR_Disable( level );
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
4a256: 4aaa 0010 tstl %a2@(16)
4a25a: 67de beqs 4a23a <_Watchdog_Tickle+0x3a>
(the_watchdog->delta_interval == 0) );
leave:
_ISR_Enable(level);
4a25c: 46c2 movew %d2,%sr
}
4a25e: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4a264: 4e5e unlk %fp 4a266: 4e75 rts
_ISR_Enable( level );
switch( watchdog_state ) {
case WATCHDOG_ACTIVE:
(*the_watchdog->routine)(
4a268: 2f2a 0024 movel %a2@(36),%sp@- 4a26c: 2f2a 0020 movel %a2@(32),%sp@- 4a270: 206a 001c moveal %a2@(28),%a0 4a274: 4e90 jsr %a0@
the_watchdog->id,
the_watchdog->user_data
);
break;
4a276: 508f addql #8,%sp 4a278: 60ce bras 4a248 <_Watchdog_Tickle+0x48>
...
0005ca7c <_calloc_r>:
void *_calloc_r(
struct _reent *ignored __attribute__((unused)),
size_t elements,
size_t size
)
{
5ca7c: 4e56 0000 linkw %fp,#0 5ca80: 202e 000c movel %fp@(12),%d0
return calloc( elements, size );
5ca84: 2d6e 0010 000c movel %fp@(16),%fp@(12) 5ca8a: 2d40 0008 movel %d0,%fp@(8)
}
5ca8e: 4e5e unlk %fp
struct _reent *ignored __attribute__((unused)),
size_t elements,
size_t size
)
{
return calloc( elements, size );
5ca90: 4ef9 0004 2ec8 jmp 42ec8 <calloc>
...
00053bf2 <_fat_block_read>:
uint32_t start,
uint32_t offset,
uint32_t count,
void *buff
)
{
53bf2: 4e56 ffd8 linkw %fp,#-40
int rc = RC_OK;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
53bf6: 206e 0008 moveal %fp@(8),%a0
uint32_t start,
uint32_t offset,
uint32_t count,
void *buff
)
{
53bfa: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 53bfe: 242e 0014 movel %fp@(20),%d2 53c02: 286e 0018 moveal %fp@(24),%a4
int rc = RC_OK;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
53c06: 2468 0034 moveal %a0@(52),%a2
ssize_t cmpltd = 0;
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
53c0a: 42ae fffc clrl %fp@(-4)
uint32_t c = 0;
while (count > 0)
53c0e: 4a82 tstl %d2
53c10: 6776 beqs 53c88 <_fat_block_read+0x96> <== NEVER TAKEN
53c12: 2c0e movel %fp,%d6 53c14: 4283 clrl %d3 53c16: 5986 subql #4,%d6 53c18: 47f9 0005 387c lea 5387c <fat_buf_access>,%a3
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
if (rc != RC_OK)
return -1;
c = MIN(count, (fs_info->vol.bps - ofs));
memcpy((buff + cmpltd), (block->buffer + ofs), c);
53c1e: 4bf9 0005 e2a0 lea 5e2a0 <memcpy>,%a5
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while (count > 0)
53c24: 2a2e 0010 movel %fp@(16),%d5 53c28: 282e 000c movel %fp@(12),%d4
{
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
53c2c: 2f06 movel %d6,%sp@- 53c2e: 4878 0001 pea 1 <ADD> 53c32: 2f04 movel %d4,%sp@-
c = MIN(count, (fs_info->vol.bps - ofs));
memcpy((buff + cmpltd), (block->buffer + ofs), c);
count -= c;
cmpltd += c;
blk++;
53c34: 5284 addql #1,%d4
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while (count > 0)
{
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
53c36: 2f0a movel %a2,%sp@- 53c38: 4e93 jsr %a3@
if (rc != RC_OK)
53c3a: 4fef 0010 lea %sp@(16),%sp 53c3e: 4a80 tstl %d0
53c40: 6638 bnes 53c7a <_fat_block_read+0x88> <== NEVER TAKEN
return -1;
c = MIN(count, (fs_info->vol.bps - ofs));
53c42: 4280 clrl %d0 53c44: 3012 movew %a2@,%d0
memcpy((buff + cmpltd), (block->buffer + ofs), c);
53c46: 206e fffc moveal %fp@(-4),%a0
{
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
if (rc != RC_OK)
return -1;
c = MIN(count, (fs_info->vol.bps - ofs));
53c4a: 9085 subl %d5,%d0 53c4c: b480 cmpl %d0,%d2
53c4e: 6402 bccs 53c52 <_fat_block_read+0x60>
53c50: 2002 movel %d2,%d0
memcpy((buff + cmpltd), (block->buffer + ofs), c);
53c52: 2f00 movel %d0,%sp@- 53c54: daa8 001e addl %a0@(30),%d5
count -= c;
53c58: 9480 subl %d0,%d2
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
if (rc != RC_OK)
return -1;
c = MIN(count, (fs_info->vol.bps - ofs));
memcpy((buff + cmpltd), (block->buffer + ofs), c);
53c5a: 2f05 movel %d5,%sp@- 53c5c: 4874 3800 pea %a4@(00000000,%d3:l)
count -= c;
cmpltd += c;
53c60: d680 addl %d0,%d3
blk++;
ofs = 0;
53c62: 4285 clrl %d5
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
if (rc != RC_OK)
return -1;
c = MIN(count, (fs_info->vol.bps - ofs));
memcpy((buff + cmpltd), (block->buffer + ofs), c);
53c64: 4e95 jsr %a5@
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while (count > 0)
53c66: 4fef 000c lea %sp@(12),%sp 53c6a: 4a82 tstl %d2
53c6c: 66be bnes 53c2c <_fat_block_read+0x3a>
cmpltd += c;
blk++;
ofs = 0;
}
return cmpltd;
}
53c6e: 2003 movel %d3,%d0 53c70: 4cee 3c7c ffd8 moveml %fp@(-40),%d2-%d6/%a2-%a5 53c76: 4e5e unlk %fp 53c78: 4e75 rts
while (count > 0)
{
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
if (rc != RC_OK)
return -1;
53c7a: 76ff moveq #-1,%d3 <== NOT EXECUTED
cmpltd += c;
blk++;
ofs = 0;
}
return cmpltd;
}
53c7c: 2003 movel %d3,%d0 <== NOT EXECUTED 53c7e: 4cee 3c7c ffd8 moveml %fp@(-40),%d2-%d6/%a2-%a5 <== NOT EXECUTED 53c84: 4e5e unlk %fp <== NOT EXECUTED 53c86: 4e75 rts <== NOT EXECUTED
void *buff
)
{
int rc = RC_OK;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
ssize_t cmpltd = 0;
53c88: 4283 clrl %d3 <== NOT EXECUTED
cmpltd += c;
blk++;
ofs = 0;
}
return cmpltd;
}
53c8a: 2003 movel %d3,%d0 <== NOT EXECUTED 53c8c: 4cee 3c7c ffd8 moveml %fp@(-40),%d2-%d6/%a2-%a5 <== NOT EXECUTED 53c92: 4e5e unlk %fp <== NOT EXECUTED
00053d60 <_fat_block_release>:
* 0 on success, or -1 if error occured and errno set appropriately
*/
int
_fat_block_release(
rtems_filesystem_mount_table_entry_t *mt_entry)
{
53d60: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 53d64: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
return fat_buf_release(fs_info);
53d68: 2d68 0034 0008 movel %a0@(52),%fp@(8) <== NOT EXECUTED
}
53d6e: 4e5e unlk %fp <== NOT EXECUTED
int
_fat_block_release(
rtems_filesystem_mount_table_entry_t *mt_entry)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
return fat_buf_release(fs_info);
53d70: 4ef9 0005 3a90 jmp 53a90 <fat_buf_release> <== NOT EXECUTED
00053c96 <_fat_block_write>:
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t start,
uint32_t offset,
uint32_t count,
const void *buff)
{
53c96: 4e56 ffd4 linkw %fp,#-44
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
53c9a: 206e 0008 moveal %fp@(8),%a0
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t start,
uint32_t offset,
uint32_t count,
const void *buff)
{
53c9e: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 53ca2: 262e 0014 movel %fp@(20),%d3 53ca6: 286e 0018 moveal %fp@(24),%a4
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
53caa: 2468 0034 moveal %a0@(52),%a2
ssize_t cmpltd = 0;
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
53cae: 42ae fffc clrl %fp@(-4)
uint32_t c = 0;
while(count > 0)
53cb2: 4a83 tstl %d3 53cb4: 6700 009c beqw 53d52 <_fat_block_write+0xbc> 53cb8: 2e0e movel %fp,%d7 53cba: 4284 clrl %d4 53cbc: 5987 subql #4,%d7 53cbe: 47f9 0005 387c lea 5387c <fat_buf_access>,%a3
else
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
if (rc != RC_OK)
return -1;
memcpy((block->buffer + ofs), (buff + cmpltd), c);
53cc4: 4bf9 0005 e2a0 lea 5e2a0 <memcpy>,%a5
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while(count > 0)
53cca: 2c2e 0010 movel %fp@(16),%d6 53cce: 2a2e 000c movel %fp@(12),%d5
{
c = MIN(count, (fs_info->vol.bps - ofs));
53cd2: 4280 clrl %d0 53cd4: 3012 movew %a2@,%d0 53cd6: 2400 movel %d0,%d2 53cd8: 9486 subl %d6,%d2 53cda: b682 cmpl %d2,%d3
53cdc: 6402 bccs 53ce0 <_fat_block_write+0x4a>
53cde: 2403 movel %d3,%d2
if (c == fs_info->vol.bps)
53ce0: b480 cmpl %d0,%d2
53ce2: 6748 beqs 53d2c <_fat_block_write+0x96>
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block);
else
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
53ce4: 2f07 movel %d7,%sp@- 53ce6: 4878 0001 pea 1 <ADD>
memcpy((block->buffer + ofs), (buff + cmpltd), c);
fat_buf_mark_modified(fs_info);
count -= c;
53cea: 9682 subl %d2,%d3
c = MIN(count, (fs_info->vol.bps - ofs));
if (c == fs_info->vol.bps)
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block);
else
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
53cec: 2f05 movel %d5,%sp@-
fat_buf_mark_modified(fs_info);
count -= c;
cmpltd +=c;
blk++;
53cee: 5285 addql #1,%d5
c = MIN(count, (fs_info->vol.bps - ofs));
if (c == fs_info->vol.bps)
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block);
else
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
53cf0: 2f0a movel %a2,%sp@- 53cf2: 4e93 jsr %a3@ 53cf4: 4fef 0010 lea %sp@(16),%sp
if (rc != RC_OK)
53cf8: 4a80 tstl %d0
53cfa: 6648 bnes 53d44 <_fat_block_write+0xae> <== NEVER TAKEN
return -1;
memcpy((block->buffer + ofs), (buff + cmpltd), c);
53cfc: 2f02 movel %d2,%sp@- 53cfe: 4874 4800 pea %a4@(00000000,%d4:l)
fat_buf_mark_modified(fs_info);
count -= c;
cmpltd +=c;
53d02: d882 addl %d2,%d4
else
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
if (rc != RC_OK)
return -1;
memcpy((block->buffer + ofs), (buff + cmpltd), c);
53d04: 206e fffc moveal %fp@(-4),%a0 53d08: dca8 001e addl %a0@(30),%d6 53d0c: 2f06 movel %d6,%sp@-
fat_buf_mark_modified(fs_info);
count -= c;
cmpltd +=c;
blk++;
ofs = 0;
53d0e: 4286 clrl %d6
else
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
if (rc != RC_OK)
return -1;
memcpy((block->buffer + ofs), (buff + cmpltd), c);
53d10: 4e95 jsr %a5@
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while(count > 0)
53d12: 4fef 000c lea %sp@(12),%sp
}
static inline void
fat_buf_mark_modified(fat_fs_info_t *fs_info)
{
fs_info->c.modified = true;
53d16: 7001 moveq #1,%d0 53d18: 1540 0076 moveb %d0,%a2@(118) 53d1c: 4a83 tstl %d3
53d1e: 66b2 bnes 53cd2 <_fat_block_write+0x3c>
cmpltd +=c;
blk++;
ofs = 0;
}
return cmpltd;
}
53d20: 2004 movel %d4,%d0 53d22: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 53d28: 4e5e unlk %fp 53d2a: 4e75 rts
while(count > 0)
{
c = MIN(count, (fs_info->vol.bps - ofs));
if (c == fs_info->vol.bps)
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block);
53d2c: 2f07 movel %d7,%sp@- 53d2e: 4878 0002 pea 2 <DOUBLE_FLOAT>
memcpy((block->buffer + ofs), (buff + cmpltd), c);
fat_buf_mark_modified(fs_info);
count -= c;
53d32: 9682 subl %d2,%d3
while(count > 0)
{
c = MIN(count, (fs_info->vol.bps - ofs));
if (c == fs_info->vol.bps)
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block);
53d34: 2f05 movel %d5,%sp@-
fat_buf_mark_modified(fs_info);
count -= c;
cmpltd +=c;
blk++;
53d36: 5285 addql #1,%d5
while(count > 0)
{
c = MIN(count, (fs_info->vol.bps - ofs));
if (c == fs_info->vol.bps)
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block);
53d38: 2f0a movel %a2,%sp@- 53d3a: 4e93 jsr %a3@ 53d3c: 4fef 0010 lea %sp@(16),%sp
else
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
if (rc != RC_OK)
53d40: 4a80 tstl %d0
53d42: 67b8 beqs 53cfc <_fat_block_write+0x66> <== ALWAYS TAKEN
return -1;
53d44: 78ff moveq #-1,%d4 <== NOT EXECUTED
cmpltd +=c;
blk++;
ofs = 0;
}
return cmpltd;
}
53d46: 2004 movel %d4,%d0 <== NOT EXECUTED 53d48: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 53d4e: 4e5e unlk %fp <== NOT EXECUTED 53d50: 4e75 rts <== NOT EXECUTED
uint32_t count,
const void *buff)
{
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
ssize_t cmpltd = 0;
53d52: 4284 clrl %d4 <== NOT EXECUTED
cmpltd +=c;
blk++;
ofs = 0;
}
return cmpltd;
}
53d54: 2004 movel %d4,%d0 <== NOT EXECUTED 53d56: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 53d5c: 4e5e unlk %fp <== NOT EXECUTED
0005ca98 <_free_r>:
void _free_r(
struct _reent *ignored __attribute__((unused)),
void *ptr
)
{
5ca98: 4e56 0000 linkw %fp,#0
free( ptr );
5ca9c: 2d6e 000c 0008 movel %fp@(12),%fp@(8)
}
5caa2: 4e5e unlk %fp
void _free_r(
struct _reent *ignored __attribute__((unused)),
void *ptr
)
{
free( ptr );
5caa4: 4ef9 0004 32dc jmp 432dc <free>
...
0005cb48 <_fstat_r>:
int _fstat_r(
struct _reent *ptr __attribute__((unused)),
int fd,
struct stat *buf
)
{
5cb48: 4e56 0000 linkw %fp,#0 5cb4c: 202e 000c movel %fp@(12),%d0
return fstat( fd, buf );
5cb50: 2d6e 0010 000c movel %fp@(16),%fp@(12) 5cb56: 2d40 0008 movel %d0,%fp@(8)
}
5cb5a: 4e5e unlk %fp
struct _reent *ptr __attribute__((unused)),
int fd,
struct stat *buf
)
{
return fstat( fd, buf );
5cb5c: 4ef9 0005 caac jmp 5caac <fstat>
...
000433ea <_gettimeofday>:
int _gettimeofday(
struct timeval *tp,
struct timezone *tzp
)
{
433ea: 4e56 0000 linkw %fp,#0
return gettimeofday( tp, tzp ); }
433ee: 4e5e unlk %fp
int _gettimeofday(
struct timeval *tp,
struct timezone *tzp
)
{
return gettimeofday( tp, tzp );
433f0: 4ef9 0004 336c jmp 4336c <gettimeofday>
...
0005cb78 <_isatty_r>:
int _isatty_r(
struct _reent *ptr __attribute__((unused)),
int fd
)
{
5cb78: 4e56 0000 linkw %fp,#0
return isatty( fd );
5cb7c: 2d6e 000c 0008 movel %fp@(12),%fp@(8)
}
5cb82: 4e5e unlk %fp
int _isatty_r(
struct _reent *ptr __attribute__((unused)),
int fd
)
{
return isatty( fd );
5cb84: 4ef9 0005 d6b8 jmp 5d6b8 <isatty>
...
0005ce20 <_kill_r>:
int _kill_r(
struct _reent *ptr,
pid_t pid,
int sig
)
{
5ce20: 4e56 0000 linkw %fp,#0
return killinfo( pid, sig, NULL );
5ce24: 2d6e 000c 0008 movel %fp@(12),%fp@(8)
int _kill_r(
struct _reent *ptr,
pid_t pid,
int sig
)
{
5ce2a: 202e 0010 movel %fp@(16),%d0
return killinfo( pid, sig, NULL );
5ce2e: 42ae 0010 clrl %fp@(16) 5ce32: 2d40 000c movel %d0,%fp@(12)
}
5ce36: 4e5e unlk %fp
struct _reent *ptr,
pid_t pid,
int sig
)
{
return killinfo( pid, sig, NULL );
5ce38: 4ef9 0005 d028 jmp 5d028 <killinfo>
...
000446e4 <_link_r>:
int _link_r(
struct _reent *ptr __attribute__((unused)),
const char *existing,
const char *new
)
{
446e4: 4e56 0000 linkw %fp,#0 446e8: 202e 000c movel %fp@(12),%d0
return link( existing, new );
446ec: 2d6e 0010 000c movel %fp@(16),%fp@(12) 446f2: 2d40 0008 movel %d0,%fp@(8)
}
446f6: 4e5e unlk %fp
struct _reent *ptr __attribute__((unused)),
const char *existing,
const char *new
)
{
return link( existing, new );
446f8: 4ef9 0004 45e8 jmp 445e8 <link>
...
00045fe8 <_lstat_r>:
int _STAT_R_NAME(
struct _reent *ptr __attribute__((unused)),
const char *path,
struct stat *buf
)
{
45fe8: 4e56 0000 linkw %fp,#0 45fec: 202e 000c movel %fp@(12),%d0
return _STAT_NAME( path, buf );
45ff0: 2d6e 0010 000c movel %fp@(16),%fp@(12) 45ff6: 2d40 0008 movel %d0,%fp@(8)
}
45ffa: 4e5e unlk %fp
struct _reent *ptr __attribute__((unused)),
const char *path,
struct stat *buf
)
{
return _STAT_NAME( path, buf );
45ffc: 4ef9 0004 5f50 jmp 45f50 <lstat>
...
0005ccf4 <_malloc_r>:
void *_malloc_r(
struct _reent *ignored __attribute__((unused)),
size_t size
)
{
5ccf4: 4e56 0000 linkw %fp,#0
return malloc( size );
5ccf8: 2d6e 000c 0008 movel %fp@(12),%fp@(8)
}
5ccfe: 4e5e unlk %fp
void *_malloc_r(
struct _reent *ignored __attribute__((unused)),
size_t size
)
{
return malloc( size );
5cd00: 4ef9 0004 360c jmp 4360c <malloc>
...
0005cde0 <_realloc_r>:
void *_realloc_r(
struct _reent *ignored __attribute__((unused)),
void *ptr,
size_t size
)
{
5cde0: 4e56 0000 linkw %fp,#0 5cde4: 202e 000c movel %fp@(12),%d0
return realloc( ptr, size );
5cde8: 2d6e 0010 000c movel %fp@(16),%fp@(12) 5cdee: 2d40 0008 movel %d0,%fp@(8)
}
5cdf2: 4e5e unlk %fp
struct _reent *ignored __attribute__((unused)),
void *ptr,
size_t size
)
{
return realloc( ptr, size );
5cdf4: 4ef9 0005 ce40 jmp 5ce40 <realloc>
...
000600b0 <_rename_r>:
int _rename_r(
struct _reent *ptr __attribute__((unused)),
const char *old,
const char *new
)
{
600b0: 4e56 ffa0 linkw %fp,#-96 600b4: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 600b8: 262e 000c movel %fp@(12),%d3 600bc: 2a2e 0010 movel %fp@(16),%d5
/*
* Get the parent node of the old path to be renamed. Find the parent path.
*/
old_parent_pathlen = rtems_filesystem_dirname ( old );
600c0: 2f03 movel %d3,%sp@- 600c2: 4eb9 0004 5b6c jsr 45b6c <rtems_filesystem_dirname>
if ( old_parent_pathlen == 0 )
600c8: 588f addql #4,%sp 600ca: 4a80 tstl %d0 600cc: 6600 0092 bnew 60160 <_rename_r+0xb0>
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
600d0: 45ee ffd0 lea %fp@(-48),%a2 600d4: 4282 clrl %d2
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
name = old + old_parent_pathlen;
600d6: d483 addl %d3,%d2
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
600d8: 47f9 0005 38f8 lea 538f8 <strlen>,%a3
*/
old_parent_pathlen = rtems_filesystem_dirname ( old );
if ( old_parent_pathlen == 0 )
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
600de: 2f0a movel %a2,%sp@- 600e0: 486e fff8 pea %fp@(-8)
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;
600e4: 4204 clrb %d4
*/
old_parent_pathlen = rtems_filesystem_dirname ( old );
if ( old_parent_pathlen == 0 )
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
600e6: 2f03 movel %d3,%sp@-
old_loc = old_parent_loc;
name = old + old_parent_pathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
600e8: 260e movel %fp,%d3 600ea: 0683 ffff ffbc addil #-68,%d3
*/
old_parent_pathlen = rtems_filesystem_dirname ( old );
if ( old_parent_pathlen == 0 )
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
600f0: 4eb9 0004 75b0 jsr 475b0 <rtems_filesystem_get_start_loc>
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
600f6: 2d52 ffbc movel %a2@,%fp@(-68)
*/
old_parent_pathlen = rtems_filesystem_dirname ( old );
if ( old_parent_pathlen == 0 )
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
600fa: 4fef 000c lea %sp@(12),%sp
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
600fe: 2d6e ffd4 ffc0 movel %fp@(-44),%fp@(-64) 60104: 2d6e ffd8 ffc4 movel %fp@(-40),%fp@(-60) 6010a: 2d6e ffdc ffc8 movel %fp@(-36),%fp@(-56) 60110: 2d6e ffe0 ffcc movel %fp@(-32),%fp@(-52)
name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) );
60116: 2f02 movel %d2,%sp@-
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
name = old + old_parent_pathlen;
60118: 2d42 fffc movel %d2,%fp@(-4)
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
6011c: 4e93 jsr %a3@ 6011e: 2e80 movel %d0,%sp@ 60120: 2f02 movel %d2,%sp@- 60122: 4eb9 0004 5bae jsr 45bae <rtems_filesystem_prefix_separators> 60128: d480 addl %d0,%d2
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
6012a: 2f02 movel %d2,%sp@-
* 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 ) );
6012c: 2d42 fffc movel %d2,%fp@(-4)
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
60130: 4e93 jsr %a3@ 60132: 4297 clrl %sp@ 60134: 2f03 movel %d3,%sp@- 60136: 42a7 clrl %sp@- 60138: 2f00 movel %d0,%sp@- 6013a: 2f02 movel %d2,%sp@- 6013c: 4eb9 0004 5ab0 jsr 45ab0 <rtems_filesystem_evaluate_relative_path>
0, &old_loc, false );
if ( result != 0 ) {
60142: 4fef 001c lea %sp@(28),%sp 60146: 4a80 tstl %d0 60148: 6700 009a beqw 601e4 <_rename_r+0x134>
if ( free_old_parentloc )
6014c: 4a04 tstb %d4 6014e: 6600 010a bnew 6025a <_rename_r+0x1aa>
rtems_filesystem_freenode( &old_parent_loc );
return -1;
60152: 74ff moveq #-1,%d2
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
return result;
}
60154: 2002 movel %d2,%d0 60156: 4cee 1c3c ffa0 moveml %fp@(-96),%d2-%d5/%a2-%a4 6015c: 4e5e unlk %fp 6015e: 4e75 rts
old_parent_pathlen = rtems_filesystem_dirname ( old );
if ( old_parent_pathlen == 0 )
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
else {
result = rtems_filesystem_evaluate_path( old, old_parent_pathlen,
60160: 42a7 clrl %sp@- 60162: 45ee ffd0 lea %fp@(-48),%a2 60166: 2400 movel %d0,%d2 60168: 2f0a movel %a2,%sp@- 6016a: 4878 0002 pea 2 <DOUBLE_FLOAT> 6016e: 2f00 movel %d0,%sp@- 60170: 2f03 movel %d3,%sp@- 60172: 4eb9 0004 5b20 jsr 45b20 <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&old_parent_loc,
false );
if ( result != 0 )
60178: 4fef 0014 lea %sp@(20),%sp 6017c: 4a80 tstl %d0
6017e: 66d2 bnes 60152 <_rename_r+0xa2> <== NEVER TAKEN
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
60180: 2d52 ffbc movel %a2@,%fp@(-68)
name = old + old_parent_pathlen;
60184: d483 addl %d3,%d2
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
60186: 47f9 0005 38f8 lea 538f8 <strlen>,%a3
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
6018c: 260e movel %fp,%d3 6018e: 0683 ffff ffbc addil #-68,%d3
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
60194: 2d6e ffd4 ffc0 movel %fp@(-44),%fp@(-64) 6019a: 2d6e ffd8 ffc4 movel %fp@(-40),%fp@(-60) 601a0: 2d6e ffdc ffc8 movel %fp@(-36),%fp@(-56) 601a6: 2d6e ffe0 ffcc movel %fp@(-32),%fp@(-52)
name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) );
601ac: 2f02 movel %d2,%sp@-
&old_parent_loc,
false );
if ( result != 0 )
return -1;
free_old_parentloc = true;
601ae: 7801 moveq #1,%d4
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
name = old + old_parent_pathlen;
601b0: 2d42 fffc movel %d2,%fp@(-4)
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
601b4: 4e93 jsr %a3@ 601b6: 2e80 movel %d0,%sp@ 601b8: 2f02 movel %d2,%sp@- 601ba: 4eb9 0004 5bae jsr 45bae <rtems_filesystem_prefix_separators> 601c0: d480 addl %d0,%d2
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
601c2: 2f02 movel %d2,%sp@-
* 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 ) );
601c4: 2d42 fffc movel %d2,%fp@(-4)
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
601c8: 4e93 jsr %a3@ 601ca: 4297 clrl %sp@ 601cc: 2f03 movel %d3,%sp@- 601ce: 42a7 clrl %sp@- 601d0: 2f00 movel %d0,%sp@- 601d2: 2f02 movel %d2,%sp@- 601d4: 4eb9 0004 5ab0 jsr 45ab0 <rtems_filesystem_evaluate_relative_path>
0, &old_loc, false );
if ( result != 0 ) {
601da: 4fef 001c lea %sp@(28),%sp 601de: 4a80 tstl %d0 601e0: 6600 ff6a bnew 6014c <_rename_r+0x9c>
/*
* Get the parent of the new node we are renaming to.
*/
rtems_filesystem_get_start_loc( new, &i, &new_parent_loc );
601e4: 47ee ffe4 lea %fp@(-28),%a3 601e8: 2f0b movel %a3,%sp@- 601ea: 486e fff8 pea %fp@(-8) 601ee: 2f05 movel %d5,%sp@- 601f0: 4eb9 0004 75b0 jsr 475b0 <rtems_filesystem_get_start_loc>
result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name );
601f6: 486e fffc pea %fp@(-4) 601fa: daae fff8 addl %fp@(-8),%d5 601fe: 2f0b movel %a3,%sp@- 60200: 206e fff0 moveal %fp@(-16),%a0 60204: 2f05 movel %d5,%sp@- 60206: 2068 0004 moveal %a0@(4),%a0 6020a: 4e90 jsr %a0@
if ( result != 0 ) {
6020c: 4fef 0018 lea %sp@(24),%sp 60210: 4a80 tstl %d0 60212: 6600 00b8 bnew 602cc <_rename_r+0x21c>
/*
* 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 ) {
60216: 202e fff4 movel %fp@(-12),%d0 6021a: b0ae ffe0 cmpl %fp@(-32),%d0
6021e: 6660 bnes 60280 <_rename_r+0x1d0>
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 );
60220: 2f2e fffc movel %fp@(-4),%sp@-
rtems_filesystem_freenode( &new_parent_loc );
60224: 49f9 0004 5d30 lea 45d30 <rtems_filesystem_freenode>,%a4
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 );
6022a: 206e fff0 moveal %fp@(-16),%a0 6022e: 2f0b movel %a3,%sp@- 60230: 2f03 movel %d3,%sp@- 60232: 2f0a movel %a2,%sp@- 60234: 2068 0040 moveal %a0@(64),%a0 60238: 4e90 jsr %a0@ 6023a: 2400 movel %d0,%d2
rtems_filesystem_freenode( &new_parent_loc );
6023c: 2f0b movel %a3,%sp@- 6023e: 4e94 jsr %a4@
if ( free_old_parentloc )
60240: 4fef 0014 lea %sp@(20),%sp 60244: 4a04 tstb %d4
60246: 662a bnes 60272 <_rename_r+0x1c2>
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
60248: 2f03 movel %d3,%sp@- 6024a: 4e94 jsr %a4@
return result;
6024c: 588f addql #4,%sp
}
6024e: 2002 movel %d2,%d0 60250: 4cee 1c3c ffa0 moveml %fp@(-96),%d2-%d5/%a2-%a4 60256: 4e5e unlk %fp 60258: 4e75 rts
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 );
6025a: 2f0a movel %a2,%sp@-
return -1;
6025c: 74ff moveq #-1,%d2
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 );
6025e: 4eb9 0004 5d30 jsr 45d30 <rtems_filesystem_freenode> 60264: 588f addql #4,%sp
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
return result;
}
60266: 2002 movel %d2,%d0 60268: 4cee 1c3c ffa0 moveml %fp@(-96),%d2-%d5/%a2-%a4 6026e: 4e5e unlk %fp 60270: 4e75 rts
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 );
60272: 2f0a movel %a2,%sp@- 60274: 4e94 jsr %a4@ 60276: 588f addql #4,%sp
rtems_filesystem_freenode( &old_loc );
60278: 2f03 movel %d3,%sp@- 6027a: 4e94 jsr %a4@
return result;
6027c: 588f addql #4,%sp 6027e: 60ce bras 6024e <_rename_r+0x19e>
* 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 );
60280: 2f0b movel %a3,%sp@- 60282: 49f9 0004 5d30 lea 45d30 <rtems_filesystem_freenode>,%a4 60288: 4e94 jsr %a4@
if ( free_old_parentloc )
6028a: 588f addql #4,%sp 6028c: 4a04 tstb %d4
6028e: 6620 bnes 602b0 <_rename_r+0x200>
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
60290: 2f03 movel %d3,%sp@-
rtems_set_errno_and_return_minus_one( EXDEV );
60292: 74ff moveq #-1,%d2
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 );
60294: 4e94 jsr %a4@
rtems_set_errno_and_return_minus_one( EXDEV );
60296: 4eb9 0005 24d4 jsr 524d4 <__errno> 6029c: 588f addql #4,%sp 6029e: 2040 moveal %d0,%a0 602a0: 7012 moveq #18,%d0 602a2: 2080 movel %d0,%a0@
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
return result;
}
602a4: 2002 movel %d2,%d0 602a6: 4cee 1c3c ffa0 moveml %fp@(-96),%d2-%d5/%a2-%a4 602ac: 4e5e unlk %fp 602ae: 4e75 rts
*/
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 );
602b0: 2f0a movel %a2,%sp@-
rtems_filesystem_freenode( &old_loc );
rtems_set_errno_and_return_minus_one( EXDEV );
602b2: 74ff moveq #-1,%d2
*/
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 );
602b4: 4e94 jsr %a4@ 602b6: 588f addql #4,%sp
rtems_filesystem_freenode( &old_loc );
602b8: 2f03 movel %d3,%sp@- 602ba: 4e94 jsr %a4@
rtems_set_errno_and_return_minus_one( EXDEV );
602bc: 4eb9 0005 24d4 jsr 524d4 <__errno> 602c2: 588f addql #4,%sp 602c4: 2040 moveal %d0,%a0 602c6: 7012 moveq #18,%d0 602c8: 2080 movel %d0,%a0@ 602ca: 60d8 bras 602a4 <_rename_r+0x1f4>
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 );
602cc: 2f0b movel %a3,%sp@- 602ce: 49f9 0004 5d30 lea 45d30 <rtems_filesystem_freenode>,%a4 602d4: 4e94 jsr %a4@
if ( free_old_parentloc )
602d6: 588f addql #4,%sp 602d8: 4a04 tstb %d4
602da: 6614 bnes 602f0 <_rename_r+0x240>
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
602dc: 2f03 movel %d3,%sp@-
return -1;
602de: 74ff moveq #-1,%d2
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 );
602e0: 4e94 jsr %a4@
return -1;
602e2: 588f addql #4,%sp
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
return result;
}
602e4: 2002 movel %d2,%d0 602e6: 4cee 1c3c ffa0 moveml %fp@(-96),%d2-%d5/%a2-%a4 602ec: 4e5e unlk %fp 602ee: 4e75 rts
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 );
602f0: 2f0a movel %a2,%sp@-
rtems_filesystem_freenode( &old_loc );
return -1;
602f2: 74ff moveq #-1,%d2
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 );
602f4: 4e94 jsr %a4@ 602f6: 588f addql #4,%sp
rtems_filesystem_freenode( &old_loc );
602f8: 2f03 movel %d3,%sp@- 602fa: 4e94 jsr %a4@
return -1;
602fc: 588f addql #4,%sp 602fe: 60e4 bras 602e4 <_rename_r+0x234>
00045fe8 <_times>:
#endif
clock_t _times(
struct tms *ptms
)
{
45fe8: 4e56 ffdc linkw %fp,#-36 45fec: 48d7 041c moveml %d2-%d4/%a2,%sp@ 45ff0: 246e 0008 moveal %fp@(8),%a2
rtems_interval ticks;
if ( !ptms )
45ff4: 4a8a tstl %a2
45ff6: 6776 beqs 4606e <_times+0x86> <== NEVER TAKEN
/*
* This call does not depend on TOD being initialized and can't fail.
*/
ticks = rtems_clock_get_ticks_since_boot();
45ff8: 4eb9 0004 648c jsr 4648c <rtems_clock_get_ticks_since_boot>
{
Timestamp_Control per_tick;
uint32_t ticks;
uint32_t fractional_ticks;
_Timestamp_Set(
45ffe: 2239 0005 f758 movel 5f758 <Configuration+0xc>,%d1 46004: 243c 0000 03e8 movel #1000,%d2
TOD_MICROSECONDS_PER_SECOND,
(rtems_configuration_get_nanoseconds_per_tick() %
TOD_NANOSECONDS_PER_SECOND)
);
_Timestamp_Divide(
4600a: 486e fffc pea %fp@(-4)
{
Timestamp_Control per_tick;
uint32_t ticks;
uint32_t fractional_ticks;
_Timestamp_Set(
4600e: 4c01 2800 mulsl %d1,%d2 46012: 283c 000f 4240 movel #1000000,%d4 46018: 4c44 1001 remul %d4,%d1,%d1
TOD_MICROSECONDS_PER_SECOND,
(rtems_configuration_get_nanoseconds_per_tick() %
TOD_NANOSECONDS_PER_SECOND)
);
_Timestamp_Divide(
4601c: 486e fff8 pea %fp@(-8) 46020: 486e fff0 pea %fp@(-16) 46024: 2079 0006 158a moveal 6158a <_Per_CPU_Information+0xc>,%a0 4602a: 41e8 0082 lea %a0@(130),%a0
{
Timestamp_Control per_tick;
uint32_t ticks;
uint32_t fractional_ticks;
_Timestamp_Set(
4602e: 2d41 fff0 movel %d1,%fp@(-16) 46032: 223c 3b9a ca00 movel #1000000000,%d1 46038: 4c41 2003 remul %d1,%d3,%d2
TOD_MICROSECONDS_PER_SECOND,
(rtems_configuration_get_nanoseconds_per_tick() %
TOD_NANOSECONDS_PER_SECOND)
);
_Timestamp_Divide(
4603c: 2d40 ffec movel %d0,%fp@(-20)
{
Timestamp_Control per_tick;
uint32_t ticks;
uint32_t fractional_ticks;
_Timestamp_Set(
46040: 2d43 fff4 movel %d3,%fp@(-12)
TOD_MICROSECONDS_PER_SECOND,
(rtems_configuration_get_nanoseconds_per_tick() %
TOD_NANOSECONDS_PER_SECOND)
);
_Timestamp_Divide(
46044: 2f08 movel %a0,%sp@- 46046: 4eb9 0004 9d1c jsr 49d1c <_Timespec_Divide>
ptms->tms_utime = ticks;
}
#else
ptms->tms_utime = _Thread_Executing->cpu_time_used;
#endif
ptms->tms_stime = ticks;
4604c: 202e ffec movel %fp@(-20),%d0
ptms->tms_cutime = 0;
ptms->tms_cstime = 0;
return ticks;
46050: 4fef 0010 lea %sp@(16),%sp
&_Thread_Executing->cpu_time_used,
&per_tick,
&ticks,
&fractional_ticks
);
ptms->tms_utime = ticks;
46054: 24ae fff8 movel %fp@(-8),%a2@
}
#else
ptms->tms_utime = _Thread_Executing->cpu_time_used;
#endif
ptms->tms_stime = ticks;
46058: 2540 0004 movel %d0,%a2@(4)
ptms->tms_cutime = 0;
4605c: 42aa 0008 clrl %a2@(8)
ptms->tms_cstime = 0;
46060: 42aa 000c clrl %a2@(12)
return ticks;
}
46064: 4cee 041c ffdc moveml %fp@(-36),%d2-%d4/%a2 4606a: 4e5e unlk %fp 4606c: 4e75 rts
)
{
rtems_interval ticks;
if ( !ptms )
rtems_set_errno_and_return_minus_one( EFAULT );
4606e: 4eb9 0004 f18c jsr 4f18c <__errno> 46074: 720e moveq #14,%d1 46076: 2040 moveal %d0,%a0 46078: 70ff moveq #-1,%d0
ptms->tms_stime = ticks;
ptms->tms_cutime = 0;
ptms->tms_cstime = 0;
return ticks;
}
4607a: 4cee 041c ffdc moveml %fp@(-36),%d2-%d4/%a2
)
{
rtems_interval ticks;
if ( !ptms )
rtems_set_errno_and_return_minus_one( EFAULT );
46080: 2081 movel %d1,%a0@
ptms->tms_stime = ticks;
ptms->tms_cutime = 0;
ptms->tms_cstime = 0;
return ticks;
}
46082: 4e5e unlk %fp <== NOT EXECUTED
00047190 <_unlink_r>:
int _unlink_r(
struct _reent *ptr __attribute__((unused)),
const char *path
)
{
47190: 4e56 0000 linkw %fp,#0
return unlink( path );
47194: 2d6e 000c 0008 movel %fp@(12),%fp@(8)
}
4719a: 4e5e unlk %fp
int _unlink_r(
struct _reent *ptr __attribute__((unused)),
const char *path
)
{
return unlink( path );
4719c: 4ef9 0004 6fc4 jmp 46fc4 <unlink>
...
0005cdfc <_write_r>:
struct _reent *ptr __attribute__((unused)),
int fd,
const void *buf,
size_t nbytes
)
{
5cdfc: 4e56 0000 linkw %fp,#0 5ce00: 222e 0010 movel %fp@(16),%d1 5ce04: 202e 000c movel %fp@(12),%d0
return write( fd, buf, nbytes );
5ce08: 2d6e 0014 0010 movel %fp@(20),%fp@(16) 5ce0e: 2d41 000c movel %d1,%fp@(12) 5ce12: 2d40 0008 movel %d0,%fp@(8)
}
5ce16: 4e5e unlk %fp
int fd,
const void *buf,
size_t nbytes
)
{
return write( fd, buf, nbytes );
5ce18: 4ef9 0005 cf74 jmp 5cf74 <write>
...
000468c8 <adjtime>:
int adjtime(
struct timeval *delta,
struct timeval *olddelta
)
{
468c8: 4e56 ffec linkw %fp,#-20 468cc: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 468d0: 246e 0008 moveal %fp@(8),%a2 468d4: 266e 000c moveal %fp@(12),%a3
long adjustment;
/*
* Simple validations
*/
if ( !delta )
468d8: 4a8a tstl %a2 468da: 6700 00f2 beqw 469ce <adjtime+0x106>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND )
468de: 202a 0004 movel %a2@(4),%d0 468e2: 0c80 000f 423f cmpil #999999,%d0 468e8: 6200 00e4 bhiw 469ce <adjtime+0x106>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( olddelta ) {
468ec: 4a8b tstl %a3
468ee: 670a beqs 468fa <adjtime+0x32>
olddelta->tv_sec = 0;
olddelta->tv_usec = 0;
468f0: 42ab 0004 clrl %a3@(4) 468f4: 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;
468f8: 4293 clrl %a3@
olddelta->tv_usec = 0;
}
/* convert delta to microseconds */
adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND);
468fa: 223c 000f 4240 movel #1000000,%d1 46900: 4c12 1800 mulsl %a2@,%d1
adjustment += delta->tv_usec;
46904: d081 addl %d1,%d0
/* too small to account for */
if ( adjustment < rtems_configuration_get_microseconds_per_tick() )
46906: b0b9 0006 0a98 cmpl 60a98 <Configuration+0xc>,%d0
4690c: 640c bccs 4691a <adjtime+0x52>
return 0;
4690e: 4280 clrl %d0
/* set the user's output */
if ( olddelta )
*olddelta = *delta;
return 0;
}
46910: 4cee 0c04 ffec moveml %fp@(-20),%d2/%a2-%a3 46916: 4e5e unlk %fp 46918: 4e75 rts
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
4691a: 2039 0006 25a0 movel 625a0 <_Thread_Dispatch_disable_level>,%d0 46920: 5280 addql #1,%d0 46922: 23c0 0006 25a0 movel %d0,625a0 <_Thread_Dispatch_disable_level>
return _Thread_Dispatch_disable_level;
46928: 2039 0006 25a0 movel 625a0 <_Thread_Dispatch_disable_level>,%d0
* This prevents context switches while we are adjusting the TOD
*/
_Thread_Disable_dispatch();
_TOD_Get( &ts );
4692e: 240e movel %fp,%d2 46930: 5182 subql #8,%d2 46932: 2f02 movel %d2,%sp@- 46934: 4eb9 0004 82f0 jsr 482f0 <_TOD_Get>
ts.tv_sec += delta->tv_sec;
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
4693a: 202a 0004 movel %a2@(4),%d0 4693e: 223c 0000 03e8 movel #1000,%d1 46944: 4c01 0800 mulsl %d1,%d0
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
46948: 588f addql #4,%sp
_Thread_Disable_dispatch();
_TOD_Get( &ts );
ts.tv_sec += delta->tv_sec;
4694a: 2212 movel %a2@,%d1
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
4694c: d0ae fffc addl %fp@(-4),%d0
_Thread_Disable_dispatch();
_TOD_Get( &ts );
ts.tv_sec += delta->tv_sec;
46950: d3ae fff8 addl %d1,%fp@(-8)
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
46954: 2d40 fffc movel %d0,%fp@(-4)
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
46958: 0c80 3b9a c9ff cmpil #999999999,%d0
4695e: 631c blss 4697c <adjtime+0xb4>
46960: 222e fff8 movel %fp@(-8),%d1
ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
ts.tv_sec++;
46964: 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;
46966: 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 ) {
4696c: 0c80 3b9a c9ff cmpil #999999999,%d0
46972: 62f0 bhis 46964 <adjtime+0x9c> <== NEVER TAKEN
46974: 2d40 fffc movel %d0,%fp@(-4) 46978: 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) ) {
4697c: 0c80 c465 3600 cmpil #-1000000000,%d0
46982: 621c bhis 469a0 <adjtime+0xd8> <== NEVER TAKEN
46984: 222e fff8 movel %fp@(-8),%d1
ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND;
ts.tv_sec--;
46988: 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;
4698a: 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) ) {
46990: 0c80 c465 3600 cmpil #-1000000000,%d0
46996: 63f0 blss 46988 <adjtime+0xc0>
46998: 2d40 fffc movel %d0,%fp@(-4) 4699c: 2d41 fff8 movel %d1,%fp@(-8)
ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND;
ts.tv_sec--;
}
_TOD_Set( &ts );
469a0: 2f02 movel %d2,%sp@- 469a2: 4eb9 0004 8384 jsr 48384 <_TOD_Set>
_Thread_Enable_dispatch();
469a8: 4eb9 0004 9b28 jsr 49b28 <_Thread_Enable_dispatch>
/* set the user's output */
if ( olddelta )
469ae: 588f addql #4,%sp
*olddelta = *delta;
return 0;
469b0: 4280 clrl %d0
_TOD_Set( &ts );
_Thread_Enable_dispatch();
/* set the user's output */
if ( olddelta )
469b2: 4a8b tstl %a3 469b4: 6700 ff5a beqw 46910 <adjtime+0x48>
*olddelta = *delta;
469b8: 2212 movel %a2@,%d1 469ba: 242a 0004 movel %a2@(4),%d2 469be: 2681 movel %d1,%a3@ 469c0: 2742 0004 movel %d2,%a3@(4)
return 0;
}
469c4: 4cee 0c04 ffec moveml %fp@(-20),%d2/%a2-%a3 469ca: 4e5e unlk %fp 469cc: 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 );
469ce: 4eb9 0004 fae0 jsr 4fae0 <__errno> 469d4: 7216 moveq #22,%d1 469d6: 2040 moveal %d0,%a0 469d8: 70ff moveq #-1,%d0
/* set the user's output */
if ( olddelta )
*olddelta = *delta;
return 0;
}
469da: 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 );
469e0: 2081 movel %d1,%a0@
/* set the user's output */
if ( olddelta )
*olddelta = *delta;
return 0;
}
469e2: 4e5e unlk %fp
...
0004714c <aio_cancel>:
* operation(s) cannot be canceled
*/
int aio_cancel(int fildes, struct aiocb *aiocbp)
{
4714c: 4e56 ffe8 linkw %fp,#-24 47150: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@
rtems_aio_request_chain *r_chain;
int result;
pthread_mutex_lock (&aio_request_queue.mutex);
47154: 4879 0006 3de8 pea 63de8 <aio_request_queue> 4715a: 49f9 0004 8510 lea 48510 <pthread_mutex_lock>,%a4
* operation(s) cannot be canceled
*/
int aio_cancel(int fildes, struct aiocb *aiocbp)
{
47160: 242e 0008 movel %fp@(8),%d2 47164: 246e 000c moveal %fp@(12),%a2
rtems_aio_request_chain *r_chain;
int result;
pthread_mutex_lock (&aio_request_queue.mutex);
47168: 4e94 jsr %a4@
if (fcntl (fildes, F_GETFD) < 0) {
4716a: 4878 0001 pea 1 <ADD> 4716e: 2f02 movel %d2,%sp@- 47170: 4eb9 0004 e65c jsr 4e65c <fcntl> 47176: 4fef 000c lea %sp@(12),%sp 4717a: 4a80 tstl %d0 4717c: 6d00 01c4 bltw 47342 <aio_cancel+0x1f6>
pthread_mutex_unlock(&aio_request_queue.mutex);
rtems_set_errno_and_return_minus_one (EBADF);
}
/* if aiocbp is NULL remove all request for given file descriptor */
if (aiocbp == NULL) {
47180: 4a8a tstl %a2 47182: 6700 00f4 beqw 47278 <aio_cancel+0x12c>
pthread_mutex_unlock (&aio_request_queue.mutex);
return AIO_CANCELED;
} else {
AIO_printf ("Cancel request\n");
if (aiocbp->aio_fildes != fildes) {
47186: 2612 movel %a2@,%d3 47188: b483 cmpl %d3,%d2 4718a: 6600 00c4 bnew 47250 <aio_cancel+0x104>
pthread_mutex_unlock (&aio_request_queue.mutex);
rtems_set_errno_and_return_minus_one (EINVAL);
}
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
4718e: 42a7 clrl %sp@- 47190: 4bf9 0004 75c2 lea 475c2 <rtems_aio_search_fd>,%a5 47196: 2f03 movel %d3,%sp@- 47198: 4879 0006 3e30 pea 63e30 <aio_request_queue+0x48> 4719e: 4e95 jsr %a5@
if (r_chain == NULL) {
471a0: 4fef 000c lea %sp@(12),%sp
if (aiocbp->aio_fildes != fildes) {
pthread_mutex_unlock (&aio_request_queue.mutex);
rtems_set_errno_and_return_minus_one (EINVAL);
}
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
471a4: 2640 moveal %d0,%a3
if (r_chain == NULL) {
471a6: 4a80 tstl %d0
471a8: 673c beqs 471e6 <aio_cancel+0x9a>
return AIO_ALLDONE;
}
}
AIO_printf ("Request on [WQ]\n");
pthread_mutex_lock (&r_chain->mutex);
471aa: 2600 movel %d0,%d3 471ac: 0683 0000 001c addil #28,%d3
result = rtems_aio_remove_req (&r_chain->perfd, aiocbp);
pthread_mutex_unlock (&r_chain->mutex);
471b2: 4bf9 0004 85ac lea 485ac <pthread_mutex_unlock>,%a5
return AIO_ALLDONE;
}
}
AIO_printf ("Request on [WQ]\n");
pthread_mutex_lock (&r_chain->mutex);
471b8: 2f03 movel %d3,%sp@- 471ba: 4e94 jsr %a4@
result = rtems_aio_remove_req (&r_chain->perfd, aiocbp);
471bc: 2f0a movel %a2,%sp@- 471be: 486b 0008 pea %a3@(8) 471c2: 4eb9 0004 7a3a jsr 47a3a <rtems_aio_remove_req> 471c8: 2400 movel %d0,%d2
pthread_mutex_unlock (&r_chain->mutex);
471ca: 2f03 movel %d3,%sp@- 471cc: 4e95 jsr %a5@
pthread_mutex_unlock (&aio_request_queue.mutex);
471ce: 4879 0006 3de8 pea 63de8 <aio_request_queue> 471d4: 4e95 jsr %a5@
return result;
471d6: 4fef 0014 lea %sp@(20),%sp
} return AIO_ALLDONE; }
471da: 2002 movel %d2,%d0 471dc: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 471e2: 4e5e unlk %fp 471e4: 4e75 rts
rtems_set_errno_and_return_minus_one (EINVAL);
}
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
if (r_chain == NULL) {
if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) {
471e6: 203c 0006 3e40 movel #409152,%d0 471ec: b0b9 0006 3e3c cmpl 63e3c <aio_request_queue+0x54>,%d0
471f2: 6740 beqs 47234 <aio_cancel+0xe8> <== NEVER TAKEN
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0);
471f4: 42a7 clrl %sp@- 471f6: 2f03 movel %d3,%sp@- 471f8: 4879 0006 3e3c pea 63e3c <aio_request_queue+0x54> 471fe: 4e95 jsr %a5@
if (r_chain == NULL) {
47200: 4fef 000c lea %sp@(12),%sp 47204: 4a80 tstl %d0
47206: 6748 beqs 47250 <aio_cancel+0x104>
rtems_set_errno_and_return_minus_one (EINVAL);
}
AIO_printf ("Request on [IQ]\n");
result = rtems_aio_remove_req (&r_chain->perfd, aiocbp);
47208: 2f0a movel %a2,%sp@- 4720a: 2040 moveal %d0,%a0 4720c: 4868 0008 pea %a0@(8) 47210: 4eb9 0004 7a3a jsr 47a3a <rtems_aio_remove_req>
pthread_mutex_unlock (&aio_request_queue.mutex);
47216: 4879 0006 3de8 pea 63de8 <aio_request_queue>
rtems_set_errno_and_return_minus_one (EINVAL);
}
AIO_printf ("Request on [IQ]\n");
result = rtems_aio_remove_req (&r_chain->perfd, aiocbp);
4721c: 2400 movel %d0,%d2
pthread_mutex_unlock (&aio_request_queue.mutex);
4721e: 4eb9 0004 85ac jsr 485ac <pthread_mutex_unlock>
return result;
47224: 4fef 000c lea %sp@(12),%sp
pthread_mutex_unlock (&r_chain->mutex);
pthread_mutex_unlock (&aio_request_queue.mutex);
return result;
}
return AIO_ALLDONE;
}
47228: 2002 movel %d2,%d0 4722a: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 47230: 4e5e unlk %fp 47232: 4e75 rts
result = rtems_aio_remove_req (&r_chain->perfd, aiocbp);
pthread_mutex_unlock (&aio_request_queue.mutex);
return result;
} else {
pthread_mutex_unlock (&aio_request_queue.mutex);
47234: 4879 0006 3de8 pea 63de8 <aio_request_queue>
return AIO_ALLDONE;
4723a: 7402 moveq #2,%d2
result = rtems_aio_remove_req (&r_chain->perfd, aiocbp);
pthread_mutex_unlock (&aio_request_queue.mutex);
return result;
} else {
pthread_mutex_unlock (&aio_request_queue.mutex);
4723c: 4eb9 0004 85ac jsr 485ac <pthread_mutex_unlock>
return AIO_ALLDONE;
47242: 588f addql #4,%sp
pthread_mutex_unlock (&r_chain->mutex);
pthread_mutex_unlock (&aio_request_queue.mutex);
return result;
}
return AIO_ALLDONE;
}
47244: 2002 movel %d2,%d0 47246: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4724c: 4e5e unlk %fp 4724e: 4e75 rts
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
if (r_chain == NULL) {
if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) {
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0);
if (r_chain == NULL) {
pthread_mutex_unlock (&aio_request_queue.mutex);
47250: 4879 0006 3de8 pea 63de8 <aio_request_queue>
rtems_set_errno_and_return_minus_one (EINVAL);
47256: 74ff moveq #-1,%d2
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
if (r_chain == NULL) {
if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) {
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0);
if (r_chain == NULL) {
pthread_mutex_unlock (&aio_request_queue.mutex);
47258: 4eb9 0004 85ac jsr 485ac <pthread_mutex_unlock>
rtems_set_errno_and_return_minus_one (EINVAL);
4725e: 4eb9 0005 1b40 jsr 51b40 <__errno> 47264: 588f addql #4,%sp 47266: 2040 moveal %d0,%a0 47268: 7016 moveq #22,%d0 4726a: 2080 movel %d0,%a0@
pthread_mutex_unlock (&r_chain->mutex);
pthread_mutex_unlock (&aio_request_queue.mutex);
return result;
}
return AIO_ALLDONE;
}
4726c: 2002 movel %d2,%d0 4726e: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 47274: 4e5e unlk %fp 47276: 4e75 rts
/* if aiocbp is NULL remove all request for given file descriptor */
if (aiocbp == NULL) {
AIO_printf ("Cancel all requests\n");
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
47278: 42a7 clrl %sp@- 4727a: 45f9 0004 75c2 lea 475c2 <rtems_aio_search_fd>,%a2 47280: 2f02 movel %d2,%sp@- 47282: 4879 0006 3e30 pea 63e30 <aio_request_queue+0x48> 47288: 4e92 jsr %a2@
if (r_chain == NULL) {
4728a: 4fef 000c lea %sp@(12),%sp
/* if aiocbp is NULL remove all request for given file descriptor */
if (aiocbp == NULL) {
AIO_printf ("Cancel all requests\n");
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
4728e: 2600 movel %d0,%d3
if (r_chain == NULL) {
47290: 673e beqs 472d0 <aio_cancel+0x184> <== NEVER TAKEN
return AIO_ALLDONE;
}
AIO_printf ("Request chain on [WQ]\n");
pthread_mutex_lock (&r_chain->mutex);
47292: 2640 moveal %d0,%a3 47294: 47eb 001c lea %a3@(28),%a3
rtems_chain_extract (&r_chain->next_fd);
rtems_aio_remove_fd (r_chain);
pthread_mutex_unlock (&r_chain->mutex);
47298: 45f9 0004 85ac lea 485ac <pthread_mutex_unlock>,%a2
pthread_mutex_unlock (&aio_request_queue.mutex);
return AIO_CANCELED;
4729e: 4282 clrl %d2
return AIO_ALLDONE;
}
AIO_printf ("Request chain on [WQ]\n");
pthread_mutex_lock (&r_chain->mutex);
472a0: 2f0b movel %a3,%sp@- 472a2: 4e94 jsr %a4@
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
472a4: 2f03 movel %d3,%sp@- 472a6: 4eb9 0004 a0c0 jsr 4a0c0 <_Chain_Extract>
rtems_chain_extract (&r_chain->next_fd);
rtems_aio_remove_fd (r_chain);
472ac: 2f03 movel %d3,%sp@- 472ae: 4eb9 0004 79e2 jsr 479e2 <rtems_aio_remove_fd>
pthread_mutex_unlock (&r_chain->mutex);
472b4: 2f0b movel %a3,%sp@- 472b6: 4e92 jsr %a2@
pthread_mutex_unlock (&aio_request_queue.mutex);
472b8: 4879 0006 3de8 pea 63de8 <aio_request_queue> 472be: 4e92 jsr %a2@
return AIO_CANCELED;
472c0: 4fef 0014 lea %sp@(20),%sp
pthread_mutex_unlock (&r_chain->mutex);
pthread_mutex_unlock (&aio_request_queue.mutex);
return result;
}
return AIO_ALLDONE;
}
472c4: 2002 movel %d2,%d0 472c6: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 472cc: 4e5e unlk %fp 472ce: 4e75 rts
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
if (r_chain == NULL) {
AIO_printf ("Request chain not on [WQ]\n");
if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) {
472d0: 203c 0006 3e40 movel #409152,%d0 472d6: b0b9 0006 3e3c cmpl 63e3c <aio_request_queue+0x54>,%d0 472dc: 6700 ff56 beqw 47234 <aio_cancel+0xe8>
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0);
472e0: 42a7 clrl %sp@- 472e2: 2f02 movel %d2,%sp@- 472e4: 4879 0006 3e3c pea 63e3c <aio_request_queue+0x54> 472ea: 4e92 jsr %a2@
if (r_chain == NULL) {
472ec: 4fef 000c lea %sp@(12),%sp
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
if (r_chain == NULL) {
AIO_printf ("Request chain not on [WQ]\n");
if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) {
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0);
472f0: 2600 movel %d0,%d3
if (r_chain == NULL) {
472f2: 6700 ff40 beqw 47234 <aio_cancel+0xe8> 472f6: 2f00 movel %d0,%sp@-
AIO_printf ("Request chain on [IQ]\n");
rtems_chain_extract (&r_chain->next_fd);
rtems_aio_remove_fd (r_chain);
pthread_mutex_destroy (&r_chain->mutex);
472f8: 2440 moveal %d0,%a2 472fa: 45ea 001c lea %a2@(28),%a2
pthread_cond_destroy (&r_chain->mutex);
free (r_chain);
pthread_mutex_unlock (&aio_request_queue.mutex);
return AIO_CANCELED;
472fe: 4282 clrl %d2 47300: 4eb9 0004 a0c0 jsr 4a0c0 <_Chain_Extract>
}
AIO_printf ("Request chain on [IQ]\n");
rtems_chain_extract (&r_chain->next_fd);
rtems_aio_remove_fd (r_chain);
47306: 2f03 movel %d3,%sp@- 47308: 4eb9 0004 79e2 jsr 479e2 <rtems_aio_remove_fd>
pthread_mutex_destroy (&r_chain->mutex);
4730e: 2f0a movel %a2,%sp@- 47310: 4eb9 0004 8264 jsr 48264 <pthread_mutex_destroy>
pthread_cond_destroy (&r_chain->mutex);
47316: 2f0a movel %a2,%sp@- 47318: 4eb9 0004 7ee4 jsr 47ee4 <pthread_cond_destroy>
free (r_chain);
4731e: 2f03 movel %d3,%sp@- 47320: 4eb9 0004 3c9c jsr 43c9c <free>
pthread_mutex_unlock (&aio_request_queue.mutex);
47326: 4879 0006 3de8 pea 63de8 <aio_request_queue> 4732c: 4eb9 0004 85ac jsr 485ac <pthread_mutex_unlock>
return AIO_CANCELED;
47332: 4fef 0018 lea %sp@(24),%sp
pthread_mutex_unlock (&r_chain->mutex);
pthread_mutex_unlock (&aio_request_queue.mutex);
return result;
}
return AIO_ALLDONE;
}
47336: 2002 movel %d2,%d0 47338: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4733e: 4e5e unlk %fp 47340: 4e75 rts
int result;
pthread_mutex_lock (&aio_request_queue.mutex);
if (fcntl (fildes, F_GETFD) < 0) {
pthread_mutex_unlock(&aio_request_queue.mutex);
47342: 4879 0006 3de8 pea 63de8 <aio_request_queue>
rtems_set_errno_and_return_minus_one (EBADF);
47348: 74ff moveq #-1,%d2
int result;
pthread_mutex_lock (&aio_request_queue.mutex);
if (fcntl (fildes, F_GETFD) < 0) {
pthread_mutex_unlock(&aio_request_queue.mutex);
4734a: 4eb9 0004 85ac jsr 485ac <pthread_mutex_unlock>
rtems_set_errno_and_return_minus_one (EBADF);
47350: 4eb9 0005 1b40 jsr 51b40 <__errno> 47356: 588f addql #4,%sp 47358: 7209 moveq #9,%d1 4735a: 2040 moveal %d0,%a0
pthread_mutex_unlock (&r_chain->mutex);
pthread_mutex_unlock (&aio_request_queue.mutex);
return result;
}
return AIO_ALLDONE;
}
4735c: 2002 movel %d2,%d0 4735e: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5
pthread_mutex_lock (&aio_request_queue.mutex);
if (fcntl (fildes, F_GETFD) < 0) {
pthread_mutex_unlock(&aio_request_queue.mutex);
rtems_set_errno_and_return_minus_one (EBADF);
47364: 2081 movel %d1,%a0@
pthread_mutex_unlock (&r_chain->mutex);
pthread_mutex_unlock (&aio_request_queue.mutex);
return result;
}
return AIO_ALLDONE;
}
47366: 4e5e unlk %fp
...
0004737c <aio_fsync>:
)
{
rtems_aio_request *req;
int mode;
if (op != O_SYNC)
4737c: 203c 0000 2000 movel #8192,%d0
int aio_fsync(
int op,
struct aiocb *aiocbp
)
{
47382: 4e56 0000 linkw %fp,#0 47386: 2f0a movel %a2,%sp@- 47388: 246e 000c moveal %fp@(12),%a2
rtems_aio_request *req;
int mode;
if (op != O_SYNC)
4738c: b0ae 0008 cmpl %fp@(8),%d0
47390: 6648 bnes 473da <aio_fsync+0x5e>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
47392: 4878 0003 pea 3 <DIVIDE> 47396: 2f12 movel %a2@,%sp@- 47398: 4eb9 0004 e65c jsr 4e65c <fcntl>
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
4739e: 508f addql #8,%sp 473a0: 7203 moveq #3,%d1 473a2: c081 andl %d1,%d0 473a4: 123c 0001 moveb #1,%d1 473a8: 5380 subql #1,%d0 473aa: b280 cmpl %d0,%d1
473ac: 654e bcss 473fc <aio_fsync+0x80>
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
req = malloc (sizeof (rtems_aio_request));
473ae: 4878 0018 pea 18 <OPER2+0x4> 473b2: 4eb9 0004 42ac jsr 442ac <malloc>
if (req == NULL)
473b8: 588f addql #4,%sp 473ba: 4a80 tstl %d0
473bc: 6760 beqs 4741e <aio_fsync+0xa2> <== NEVER TAKEN
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
473be: 2040 moveal %d0,%a0
req->aiocbp->aio_lio_opcode = LIO_SYNC;
473c0: 7203 moveq #3,%d1
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
473c2: 214a 0014 movel %a2,%a0@(20)
req->aiocbp->aio_lio_opcode = LIO_SYNC;
473c6: 2541 002c movel %d1,%a2@(44)
return rtems_aio_enqueue (req);
}
473ca: 246e fffc moveal %fp@(-4),%a2
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_SYNC;
return rtems_aio_enqueue (req);
473ce: 2d40 0008 movel %d0,%fp@(8)
}
473d2: 4e5e unlk %fp
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_SYNC;
return rtems_aio_enqueue (req);
473d4: 4ef9 0004 7a9e jmp 47a9e <rtems_aio_enqueue>
{
rtems_aio_request *req;
int mode;
if (op != O_SYNC)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
473da: 7216 moveq #22,%d1 473dc: 70ff moveq #-1,%d0 473de: 2541 0030 movel %d1,%a2@(48) 473e2: 2540 0034 movel %d0,%a2@(52) 473e6: 4eb9 0005 1b40 jsr 51b40 <__errno>
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_SYNC;
return rtems_aio_enqueue (req);
}
473ec: 246e fffc moveal %fp@(-4),%a2
{
rtems_aio_request *req;
int mode;
if (op != O_SYNC)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
473f0: 2040 moveal %d0,%a0 473f2: 7016 moveq #22,%d0
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_SYNC;
return rtems_aio_enqueue (req);
}
473f4: 4e5e unlk %fp
{
rtems_aio_request *req;
int mode;
if (op != O_SYNC)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
473f6: 2080 movel %d0,%a0@
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_SYNC;
return rtems_aio_enqueue (req);
}
473f8: 70ff moveq #-1,%d0 473fa: 4e75 rts
if (op != O_SYNC)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
473fc: 72ff moveq #-1,%d1 473fe: 7009 moveq #9,%d0 47400: 2541 0034 movel %d1,%a2@(52) 47404: 2540 0030 movel %d0,%a2@(48) 47408: 4eb9 0005 1b40 jsr 51b40 <__errno>
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_SYNC;
return rtems_aio_enqueue (req);
}
4740e: 246e fffc moveal %fp@(-4),%a2
if (op != O_SYNC)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
47412: 2040 moveal %d0,%a0 47414: 7209 moveq #9,%d1
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_SYNC;
return rtems_aio_enqueue (req);
}
47416: 70ff moveq #-1,%d0 47418: 4e5e unlk %fp
if (op != O_SYNC)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
4741a: 2081 movel %d1,%a0@
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_SYNC;
return rtems_aio_enqueue (req);
}
4741c: 4e75 rts
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
4741e: 103c 000b moveb #11,%d0 <== NOT EXECUTED 47422: 72ff moveq #-1,%d1 <== NOT EXECUTED 47424: 2540 0030 movel %d0,%a2@(48) <== NOT EXECUTED 47428: 2541 0034 movel %d1,%a2@(52) <== NOT EXECUTED 4742c: 4eb9 0005 1b40 jsr 51b40 <__errno> <== NOT EXECUTED
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_SYNC;
return rtems_aio_enqueue (req);
}
47432: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
47436: 2040 moveal %d0,%a0 <== NOT EXECUTED 47438: 700b moveq #11,%d0 <== NOT EXECUTED
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_SYNC;
return rtems_aio_enqueue (req);
}
4743a: 4e5e unlk %fp <== NOT EXECUTED
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
4743c: 2080 movel %d0,%a0@ <== NOT EXECUTED
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_SYNC;
return rtems_aio_enqueue (req);
}
4743e: 70ff moveq #-1,%d0 <== NOT EXECUTED
...
00047cc4 <aio_read>:
* 0 - otherwise
*/
int
aio_read (struct aiocb *aiocbp)
{
47cc4: 4e56 0000 linkw %fp,#0 47cc8: 2f0a movel %a2,%sp@-
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
47cca: 4878 0003 pea 3 <DIVIDE>
* 0 - otherwise
*/
int
aio_read (struct aiocb *aiocbp)
{
47cce: 246e 0008 moveal %fp@(8),%a2
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
47cd2: 2f12 movel %a2@,%sp@- 47cd4: 4eb9 0004 e65c jsr 4e65c <fcntl>
if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR)))
47cda: 508f addql #8,%sp 47cdc: 7203 moveq #3,%d1 47cde: c081 andl %d1,%d0
47ce0: 6708 beqs 47cea <aio_read+0x26> <== NEVER TAKEN
47ce2: 123c 0002 moveb #2,%d1 47ce6: b280 cmpl %d0,%d1
47ce8: 6638 bnes 47d22 <aio_read+0x5e>
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
47cea: 4aaa 0014 tstl %a2@(20)
47cee: 6654 bnes 47d44 <aio_read+0x80>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
47cf0: 4aaa 0004 tstl %a2@(4)
47cf4: 6b4e bmis 47d44 <aio_read+0x80>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
req = malloc (sizeof (rtems_aio_request));
47cf6: 4878 0018 pea 18 <OPER2+0x4> 47cfa: 4eb9 0004 42ac jsr 442ac <malloc>
if (req == NULL)
47d00: 588f addql #4,%sp 47d02: 4a80 tstl %d0
47d04: 6760 beqs 47d66 <aio_read+0xa2> <== NEVER TAKEN
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
47d06: 2040 moveal %d0,%a0
req->aiocbp->aio_lio_opcode = LIO_READ;
47d08: 7201 moveq #1,%d1
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
47d0a: 214a 0014 movel %a2,%a0@(20)
req->aiocbp->aio_lio_opcode = LIO_READ;
47d0e: 2541 002c movel %d1,%a2@(44)
return rtems_aio_enqueue (req);
}
47d12: 246e fffc moveal %fp@(-4),%a2
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_READ;
return rtems_aio_enqueue (req);
47d16: 2d40 0008 movel %d0,%fp@(8)
}
47d1a: 4e5e unlk %fp
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_READ;
return rtems_aio_enqueue (req);
47d1c: 4ef9 0004 7a9e jmp 47a9e <rtems_aio_enqueue>
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR)))
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
47d22: 7009 moveq #9,%d0 47d24: 72ff moveq #-1,%d1 47d26: 2540 0030 movel %d0,%a2@(48) 47d2a: 2541 0034 movel %d1,%a2@(52) 47d2e: 4eb9 0005 1b40 jsr 51b40 <__errno>
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_READ;
return rtems_aio_enqueue (req);
}
47d34: 246e fffc moveal %fp@(-4),%a2
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR)))
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
47d38: 2040 moveal %d0,%a0 47d3a: 7009 moveq #9,%d0
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_READ;
return rtems_aio_enqueue (req);
}
47d3c: 4e5e unlk %fp
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR)))
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
47d3e: 2080 movel %d0,%a0@
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_READ;
return rtems_aio_enqueue (req);
}
47d40: 70ff moveq #-1,%d0 47d42: 4e75 rts
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
47d44: 72ff moveq #-1,%d1 47d46: 7016 moveq #22,%d0 47d48: 2541 0034 movel %d1,%a2@(52) 47d4c: 2540 0030 movel %d0,%a2@(48) 47d50: 4eb9 0005 1b40 jsr 51b40 <__errno>
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_READ;
return rtems_aio_enqueue (req);
}
47d56: 246e fffc moveal %fp@(-4),%a2
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
47d5a: 2040 moveal %d0,%a0 47d5c: 7216 moveq #22,%d1
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_READ;
return rtems_aio_enqueue (req);
}
47d5e: 70ff moveq #-1,%d0 47d60: 4e5e unlk %fp
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
47d62: 2081 movel %d1,%a0@
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_READ;
return rtems_aio_enqueue (req);
}
47d64: 4e75 rts
if (aiocbp->aio_offset < 0)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
47d66: 103c 000b moveb #11,%d0 <== NOT EXECUTED 47d6a: 72ff moveq #-1,%d1 <== NOT EXECUTED 47d6c: 2540 0030 movel %d0,%a2@(48) <== NOT EXECUTED 47d70: 2541 0034 movel %d1,%a2@(52) <== NOT EXECUTED 47d74: 4eb9 0005 1b40 jsr 51b40 <__errno> <== NOT EXECUTED
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_READ;
return rtems_aio_enqueue (req);
}
47d7a: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
if (aiocbp->aio_offset < 0)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
47d7e: 2040 moveal %d0,%a0 <== NOT EXECUTED 47d80: 700b moveq #11,%d0 <== NOT EXECUTED
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_READ;
return rtems_aio_enqueue (req);
}
47d82: 4e5e unlk %fp <== NOT EXECUTED
if (aiocbp->aio_offset < 0)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
47d84: 2080 movel %d0,%a0@ <== NOT EXECUTED
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_READ;
return rtems_aio_enqueue (req);
}
47d86: 70ff moveq #-1,%d0 <== NOT EXECUTED
...
00047d9c <aio_write>:
* 0 - otherwise
*/
int
aio_write (struct aiocb *aiocbp)
{
47d9c: 4e56 0000 linkw %fp,#0 47da0: 2f0a movel %a2,%sp@-
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
47da2: 4878 0003 pea 3 <DIVIDE>
* 0 - otherwise
*/
int
aio_write (struct aiocb *aiocbp)
{
47da6: 246e 0008 moveal %fp@(8),%a2
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
47daa: 2f12 movel %a2@,%sp@- 47dac: 4eb9 0004 e65c jsr 4e65c <fcntl>
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
47db2: 508f addql #8,%sp 47db4: 7203 moveq #3,%d1 47db6: c081 andl %d1,%d0 47db8: 123c 0001 moveb #1,%d1 47dbc: 5380 subql #1,%d0 47dbe: b280 cmpl %d0,%d1
47dc0: 6538 bcss 47dfa <aio_write+0x5e>
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
47dc2: 4aaa 0014 tstl %a2@(20)
47dc6: 6654 bnes 47e1c <aio_write+0x80>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
47dc8: 4aaa 0004 tstl %a2@(4)
47dcc: 6b4e bmis 47e1c <aio_write+0x80>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
req = malloc (sizeof (rtems_aio_request));
47dce: 4878 0018 pea 18 <OPER2+0x4> 47dd2: 4eb9 0004 42ac jsr 442ac <malloc>
if (req == NULL)
47dd8: 588f addql #4,%sp 47dda: 4a80 tstl %d0
47ddc: 6760 beqs 47e3e <aio_write+0xa2> <== NEVER TAKEN
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
47dde: 2040 moveal %d0,%a0
req->aiocbp->aio_lio_opcode = LIO_WRITE;
47de0: 7202 moveq #2,%d1
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
47de2: 214a 0014 movel %a2,%a0@(20)
req->aiocbp->aio_lio_opcode = LIO_WRITE;
47de6: 2541 002c movel %d1,%a2@(44)
return rtems_aio_enqueue (req);
}
47dea: 246e fffc moveal %fp@(-4),%a2
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_WRITE;
return rtems_aio_enqueue (req);
47dee: 2d40 0008 movel %d0,%fp@(8)
}
47df2: 4e5e unlk %fp
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_WRITE;
return rtems_aio_enqueue (req);
47df4: 4ef9 0004 7a9e jmp 47a9e <rtems_aio_enqueue>
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
47dfa: 7009 moveq #9,%d0 47dfc: 72ff moveq #-1,%d1 47dfe: 2540 0030 movel %d0,%a2@(48) 47e02: 2541 0034 movel %d1,%a2@(52) 47e06: 4eb9 0005 1b40 jsr 51b40 <__errno>
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_WRITE;
return rtems_aio_enqueue (req);
}
47e0c: 246e fffc moveal %fp@(-4),%a2
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
47e10: 2040 moveal %d0,%a0 47e12: 7009 moveq #9,%d0
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_WRITE;
return rtems_aio_enqueue (req);
}
47e14: 4e5e unlk %fp
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
47e16: 2080 movel %d0,%a0@
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_WRITE;
return rtems_aio_enqueue (req);
}
47e18: 70ff moveq #-1,%d0 47e1a: 4e75 rts
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
47e1c: 72ff moveq #-1,%d1 47e1e: 7016 moveq #22,%d0 47e20: 2541 0034 movel %d1,%a2@(52) 47e24: 2540 0030 movel %d0,%a2@(48) 47e28: 4eb9 0005 1b40 jsr 51b40 <__errno>
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_WRITE;
return rtems_aio_enqueue (req);
}
47e2e: 246e fffc moveal %fp@(-4),%a2
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
47e32: 2040 moveal %d0,%a0 47e34: 7216 moveq #22,%d1
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_WRITE;
return rtems_aio_enqueue (req);
}
47e36: 70ff moveq #-1,%d0 47e38: 4e5e unlk %fp
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
47e3a: 2081 movel %d1,%a0@
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_WRITE;
return rtems_aio_enqueue (req);
}
47e3c: 4e75 rts
if (aiocbp->aio_offset < 0)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
47e3e: 103c 000b moveb #11,%d0 <== NOT EXECUTED 47e42: 72ff moveq #-1,%d1 <== NOT EXECUTED 47e44: 2540 0030 movel %d0,%a2@(48) <== NOT EXECUTED 47e48: 2541 0034 movel %d1,%a2@(52) <== NOT EXECUTED 47e4c: 4eb9 0005 1b40 jsr 51b40 <__errno> <== NOT EXECUTED
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_WRITE;
return rtems_aio_enqueue (req);
}
47e52: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
if (aiocbp->aio_offset < 0)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
47e56: 2040 moveal %d0,%a0 <== NOT EXECUTED 47e58: 700b moveq #11,%d0 <== NOT EXECUTED
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_WRITE;
return rtems_aio_enqueue (req);
}
47e5a: 4e5e unlk %fp <== NOT EXECUTED
if (aiocbp->aio_offset < 0)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
47e5c: 2080 movel %d0,%a0@ <== NOT EXECUTED
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_WRITE;
return rtems_aio_enqueue (req);
}
47e5e: 70ff moveq #-1,%d0 <== NOT EXECUTED
...
00048828 <alarm>:
}
unsigned int alarm(
unsigned int seconds
)
{
48828: 4e56 fff4 linkw %fp,#-12 4882c: 48d7 001c moveml %d2-%d4,%sp@ 48830: 242e 0008 movel %fp@(8),%d2
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
48834: 4ab9 0006 5bcc tstl 65bcc <_POSIX_signals_Alarm_timer+0x1c>
4883a: 674e beqs 4888a <alarm+0x62>
_Watchdog_Initialize( the_timer, _POSIX_signals_Alarm_TSR, 0, NULL );
} else {
Watchdog_States state;
state = _Watchdog_Remove( the_timer );
4883c: 4879 0006 5bb0 pea 65bb0 <_POSIX_signals_Alarm_timer> 48842: 4eb9 0004 d99c jsr 4d99c <_Watchdog_Remove>
if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) {
48848: 588f addql #4,%sp 4884a: 7201 moveq #1,%d1 4884c: 5580 subql #2,%d0 4884e: b280 cmpl %d0,%d1
48850: 645e bccs 488b0 <alarm+0x88>
unsigned int alarm(
unsigned int seconds
)
{
unsigned int remaining = 0;
48852: 4283 clrl %d3
remaining = the_timer->initial -
((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND);
}
}
if ( seconds )
48854: 4a82 tstl %d2
48856: 660c bnes 48864 <alarm+0x3c> <== NEVER TAKEN
_Watchdog_Insert_seconds( the_timer, seconds );
return remaining;
}
48858: 2003 movel %d3,%d0 4885a: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 48860: 4e5e unlk %fp 48862: 4e75 rts
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
48864: 4879 0006 5bb0 pea 65bb0 <_POSIX_signals_Alarm_timer> 4886a: 4879 0006 5eec pea 65eec <_Watchdog_Seconds_chain>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
48870: 23c2 0006 5bbc movel %d2,65bbc <_POSIX_signals_Alarm_timer+0xc>
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
48876: 4eb9 0004 d854 jsr 4d854 <_Watchdog_Insert> 4887c: 508f addql #8,%sp 4887e: 2003 movel %d3,%d0 48880: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 48886: 4e5e unlk %fp 48888: 4e75 rts
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
4888a: 42b9 0006 5bb8 clrl 65bb8 <_POSIX_signals_Alarm_timer+0x8>
unsigned int alarm(
unsigned int seconds
)
{
unsigned int remaining = 0;
48890: 4283 clrl %d3
the_watchdog->routine = routine;
48892: 203c 0004 880c movel #296972,%d0
the_watchdog->id = id;
48898: 42b9 0006 5bd0 clrl 65bd0 <_POSIX_signals_Alarm_timer+0x20>
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
4889e: 23c0 0006 5bcc movel %d0,65bcc <_POSIX_signals_Alarm_timer+0x1c>
the_watchdog->id = id; the_watchdog->user_data = user_data;
488a4: 42b9 0006 5bd4 clrl 65bd4 <_POSIX_signals_Alarm_timer+0x24>
remaining = the_timer->initial -
((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND);
}
}
if ( seconds )
488aa: 4a82 tstl %d2
488ac: 67aa beqs 48858 <alarm+0x30> <== NEVER TAKEN
488ae: 60b4 bras 48864 <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);
488b0: 2839 0006 5bc8 movel 65bc8 <_POSIX_signals_Alarm_timer+0x18>,%d4 488b6: 98b9 0006 5bc4 subl 65bc4 <_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 -
488bc: 2639 0006 5bbc movel 65bbc <_POSIX_signals_Alarm_timer+0xc>,%d3
((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND);
488c2: 4eb9 0004 b248 jsr 4b248 <TOD_TICKS_PER_SECOND_method> 488c8: 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 -
488cc: 9684 subl %d4,%d3
((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND);
}
}
if ( seconds )
488ce: 4a82 tstl %d2
488d0: 6786 beqs 48858 <alarm+0x30> <== NEVER TAKEN
488d2: 6090 bras 48864 <alarm+0x3c>
00045224 <chmod>:
int chmod(
const char *path,
mode_t mode
)
{
45224: 4e56 ffe8 linkw %fp,#-24 45228: 2f03 movel %d3,%sp@- 4522a: 262e 0008 movel %fp@(8),%d3 4522e: 2f02 movel %d2,%sp@-
int status;
rtems_filesystem_location_info_t loc;
int result;
status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true );
45230: 240e movel %fp,%d2 45232: 0682 ffff ffec addil #-20,%d2 45238: 2f03 movel %d3,%sp@- 4523a: 4eb9 0005 371c jsr 5371c <strlen> 45240: 7201 moveq #1,%d1 45242: 2e81 movel %d1,%sp@ 45244: 2f02 movel %d2,%sp@- 45246: 42a7 clrl %sp@- 45248: 2f00 movel %d0,%sp@- 4524a: 2f03 movel %d3,%sp@- 4524c: 4eb9 0004 5774 jsr 45774 <rtems_filesystem_evaluate_path>
if ( status != 0 )
45252: 4fef 0014 lea %sp@(20),%sp 45256: 4a80 tstl %d0
45258: 6630 bnes 4528a <chmod+0x66> <== NEVER TAKEN
return -1;
result = (*loc.handlers->fchmod_h)( &loc, mode );
4525a: 2f2e 000c movel %fp@(12),%sp@- 4525e: 206e fff4 moveal %fp@(-12),%a0 45262: 2f02 movel %d2,%sp@- 45264: 2068 001c moveal %a0@(28),%a0 45268: 4e90 jsr %a0@
rtems_filesystem_freenode( &loc );
4526a: 2f02 movel %d2,%sp@- 4526c: 2d40 ffe8 movel %d0,%fp@(-24) 45270: 4eb9 0004 5984 jsr 45984 <rtems_filesystem_freenode>
return result;
45276: 202e ffe8 movel %fp@(-24),%d0 4527a: 4fef 000c lea %sp@(12),%sp
}
4527e: 242e ffe0 movel %fp@(-32),%d2 45282: 262e ffe4 movel %fp@(-28),%d3 45286: 4e5e unlk %fp 45288: 4e75 rts 4528a: 242e ffe0 movel %fp@(-32),%d2
rtems_filesystem_location_info_t loc;
int result;
status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true );
if ( status != 0 )
return -1;
4528e: 70ff moveq #-1,%d0
result = (*loc.handlers->fchmod_h)( &loc, mode );
rtems_filesystem_freenode( &loc );
return result;
}
45290: 262e ffe4 movel %fp@(-28),%d3
45294: 4e5e unlk %fp <== NOT EXECUTED
000456e8 <chroot>:
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
456e8: 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) {
456ec: 203c 0006 47e4 movel #411620,%d0
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
456f2: 2f0b movel %a3,%sp@- 456f4: 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) {
456f6: b0b9 0006 3170 cmpl 63170 <rtems_current_user_env>,%d0
456fc: 6778 beqs 45776 <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);
456fe: 2f2e 0008 movel %fp@(8),%sp@- 45702: 4eb9 0004 5614 jsr 45614 <chdir>
if (result) {
45708: 588f addql #4,%sp 4570a: 4a80 tstl %d0 4570c: 6600 009a bnew 457a8 <chroot+0xc0>
rtems_set_errno_and_return_minus_one( errno );
}
/* clone the new root location */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
45710: 42a7 clrl %sp@- 45712: 45ee ffec lea %fp@(-20),%a2 45716: 2f0a movel %a2,%sp@- 45718: 42a7 clrl %sp@- 4571a: 4878 0001 pea 1 <ADD> 4571e: 4879 0006 0f85 pea 60f85 <_rodata_start+0x1b5> 45724: 4eb9 0004 5b20 jsr 45b20 <rtems_filesystem_evaluate_path> 4572a: 4fef 0014 lea %sp@(20),%sp 4572e: 4a80 tstl %d0
45730: 6676 bnes 457a8 <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);
45732: 2079 0006 3170 moveal 63170 <rtems_current_user_env>,%a0 45738: 41e8 0018 lea %a0@(24),%a0 4573c: 2f08 movel %a0,%sp@- 4573e: 4eb9 0004 5d30 jsr 45d30 <rtems_filesystem_freenode>
rtems_filesystem_root = loc;
45744: 2079 0006 3170 moveal 63170 <rtems_current_user_env>,%a0
return 0;
4574a: 588f addql #4,%sp 4574c: 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;
4574e: 2152 0018 movel %a2@,%a0@(24) 45752: 216e fff0 001c movel %fp@(-16),%a0@(28) 45758: 216e fff4 0020 movel %fp@(-12),%a0@(32) 4575e: 216e fff8 0024 movel %fp@(-8),%a0@(36) 45764: 216e fffc 0028 movel %fp@(-4),%a0@(40)
return 0;
}
4576a: 246e ffe4 moveal %fp@(-28),%a2 4576e: 266e ffe8 moveal %fp@(-24),%a3 45772: 4e5e unlk %fp 45774: 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*/
45776: 4eb9 0004 70a8 jsr 470a8 <rtems_libio_set_private_env>
if (rtems_current_user_env == &rtems_global_user_env) /* not ok */
4577c: 41f9 0006 47e4 lea 647e4 <rtems_global_user_env>,%a0 45782: b1f9 0006 3170 cmpal 63170 <rtems_current_user_env>,%a0 45788: 6600 ff74 bnew 456fe <chroot+0x16>
rtems_set_errno_and_return_minus_one( ENOTSUP );
4578c: 4eb9 0005 24d4 jsr 524d4 <__errno>
}
rtems_filesystem_freenode(&rtems_filesystem_root);
rtems_filesystem_root = loc;
return 0;
}
45792: 246e ffe4 moveal %fp@(-28),%a2
/* 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 );
45796: 2040 moveal %d0,%a0 45798: 70ff moveq #-1,%d0
}
rtems_filesystem_freenode(&rtems_filesystem_root);
rtems_filesystem_root = loc;
return 0;
}
4579a: 266e ffe8 moveal %fp@(-24),%a3 4579e: 4e5e unlk %fp
/* 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 );
457a0: 20bc 0000 0086 movel #134,%a0@
}
rtems_filesystem_freenode(&rtems_filesystem_root);
rtems_filesystem_root = loc;
return 0;
}
457a6: 4e75 rts
}
/* 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 );
457a8: 45f9 0005 24d4 lea 524d4 <__errno>,%a2 457ae: 4e92 jsr %a2@ 457b0: 2640 moveal %d0,%a3 457b2: 4e92 jsr %a2@
}
rtems_filesystem_freenode(&rtems_filesystem_root);
rtems_filesystem_root = loc;
return 0;
}
457b4: 246e ffe4 moveal %fp@(-28),%a2
}
/* 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 );
457b8: 2040 moveal %d0,%a0 457ba: 70ff moveq #-1,%d0 457bc: 2690 movel %a0@,%a3@
}
rtems_filesystem_freenode(&rtems_filesystem_root);
rtems_filesystem_root = loc;
return 0;
}
457be: 266e ffe8 moveal %fp@(-24),%a3 457c2: 4e5e unlk %fp
...
0004671c <clock_gettime>:
int clock_gettime(
clockid_t clock_id,
struct timespec *tp
)
{
4671c: 4e56 0000 linkw %fp,#0 46720: 202e 0008 movel %fp@(8),%d0 46724: 222e 000c movel %fp@(12),%d1 46728: 2f02 movel %d2,%sp@-
if ( !tp )
4672a: 4a81 tstl %d1
4672c: 6718 beqs 46746 <clock_gettime+0x2a>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
4672e: 7401 moveq #1,%d2 46730: b480 cmpl %d0,%d2
46732: 6752 beqs 46786 <clock_gettime+0x6a>
_TOD_Get(tp);
return 0;
}
#ifdef CLOCK_MONOTONIC
if ( clock_id == CLOCK_MONOTONIC ) {
46734: 7404 moveq #4,%d2 46736: b480 cmpl %d0,%d2
46738: 6738 beqs 46772 <clock_gettime+0x56> <== NEVER TAKEN
return 0;
}
#endif
#ifdef _POSIX_CPUTIME
if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) {
4673a: 7402 moveq #2,%d2 4673c: b480 cmpl %d0,%d2
4673e: 6732 beqs 46772 <clock_gettime+0x56>
return 0;
}
#endif
#ifdef _POSIX_THREAD_CPUTIME
if ( clock_id == CLOCK_THREAD_CPUTIME_ID )
46740: 7203 moveq #3,%d1 46742: b280 cmpl %d0,%d1
46744: 6716 beqs 4675c <clock_gettime+0x40>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
46746: 4eb9 0004 ffa8 jsr 4ffa8 <__errno>
return 0;
}
4674c: 242e fffc movel %fp@(-4),%d2
#ifdef _POSIX_THREAD_CPUTIME
if ( clock_id == CLOCK_THREAD_CPUTIME_ID )
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
46750: 2040 moveal %d0,%a0 46752: 7216 moveq #22,%d1 46754: 70ff moveq #-1,%d0
return 0;
}
46756: 4e5e unlk %fp
#ifdef _POSIX_THREAD_CPUTIME
if ( clock_id == CLOCK_THREAD_CPUTIME_ID )
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
46758: 2081 movel %d1,%a0@
return 0;
}
4675a: 4e75 rts
}
#endif
#ifdef _POSIX_THREAD_CPUTIME
if ( clock_id == CLOCK_THREAD_CPUTIME_ID )
rtems_set_errno_and_return_minus_one( ENOSYS );
4675c: 4eb9 0004 ffa8 jsr 4ffa8 <__errno> 46762: 7458 moveq #88,%d2 46764: 2040 moveal %d0,%a0 46766: 70ff moveq #-1,%d0 46768: 2082 movel %d2,%a0@
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
4676a: 242e fffc movel %fp@(-4),%d2 4676e: 4e5e unlk %fp 46770: 4e75 rts
}
#endif
#ifdef _POSIX_CPUTIME
if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) {
_TOD_Get_uptime_as_timespec( tp );
46772: 2f01 movel %d1,%sp@- 46774: 4eb9 0004 8824 jsr 48824 <_TOD_Get_uptime_as_timespec>
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
4677a: 242e fffc movel %fp@(-4),%d2
#endif
#ifdef _POSIX_CPUTIME
if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) {
_TOD_Get_uptime_as_timespec( tp );
return 0;
4677e: 588f addql #4,%sp 46780: 4280 clrl %d0
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
46782: 4e5e unlk %fp 46784: 4e75 rts
{
if ( !tp )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
_TOD_Get(tp);
46786: 2f01 movel %d1,%sp@- 46788: 4eb9 0004 87c0 jsr 487c0 <_TOD_Get>
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
4678e: 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;
46792: 588f addql #4,%sp 46794: 4280 clrl %d0
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
46796: 4e5e unlk %fp
...
0004679c <clock_settime>:
int clock_settime(
clockid_t clock_id,
const struct timespec *tp
)
{
4679c: 4e56 0000 linkw %fp,#0 467a0: 202e 0008 movel %fp@(8),%d0 467a4: 206e 000c moveal %fp@(12),%a0
if ( !tp )
467a8: 4a88 tstl %a0
467aa: 6712 beqs 467be <clock_settime+0x22> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
467ac: 7201 moveq #1,%d1 467ae: b280 cmpl %d0,%d1
467b0: 6730 beqs 467e2 <clock_settime+0x46>
_Thread_Disable_dispatch();
_TOD_Set( tp );
_Thread_Enable_dispatch();
}
#ifdef _POSIX_CPUTIME
else if ( clock_id == CLOCK_PROCESS_CPUTIME_ID )
467b2: 7202 moveq #2,%d1 467b4: b280 cmpl %d0,%d1
467b6: 6718 beqs 467d0 <clock_settime+0x34>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME_ID )
467b8: 7203 moveq #3,%d1 467ba: b280 cmpl %d0,%d1
467bc: 6712 beqs 467d0 <clock_settime+0x34>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
467be: 4eb9 0004 ffa8 jsr 4ffa8 <__errno> 467c4: 7216 moveq #22,%d1 467c6: 2040 moveal %d0,%a0 467c8: 70ff moveq #-1,%d0
return 0;
}
467ca: 4e5e unlk %fp
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME_ID )
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
467cc: 2081 movel %d1,%a0@
return 0;
}
467ce: 4e75 rts
else if ( clock_id == CLOCK_PROCESS_CPUTIME_ID )
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME_ID )
rtems_set_errno_and_return_minus_one( ENOSYS );
467d0: 4eb9 0004 ffa8 jsr 4ffa8 <__errno> 467d6: 7258 moveq #88,%d1 467d8: 2040 moveal %d0,%a0 467da: 70ff moveq #-1,%d0
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
467dc: 4e5e unlk %fp
else if ( clock_id == CLOCK_PROCESS_CPUTIME_ID )
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME_ID )
rtems_set_errno_and_return_minus_one( ENOSYS );
467de: 2081 movel %d1,%a0@
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
467e0: 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 )
467e2: 203c 21da e4ff movel #567993599,%d0 467e8: b090 cmpl %a0@,%d0
467ea: 64d2 bccs 467be <clock_settime+0x22>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
467ec: 2039 0006 2c58 movel 62c58 <_Thread_Dispatch_disable_level>,%d0 467f2: 5280 addql #1,%d0 467f4: 23c0 0006 2c58 movel %d0,62c58 <_Thread_Dispatch_disable_level>
return _Thread_Dispatch_disable_level;
467fa: 2039 0006 2c58 movel 62c58 <_Thread_Dispatch_disable_level>,%d0
rtems_set_errno_and_return_minus_one( EINVAL );
_Thread_Disable_dispatch();
_TOD_Set( tp );
46800: 2f08 movel %a0,%sp@- 46802: 4eb9 0004 887c jsr 4887c <_TOD_Set>
_Thread_Enable_dispatch();
46808: 4eb9 0004 a020 jsr 4a020 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
4680e: 588f addql #4,%sp 46810: 4280 clrl %d0
}
46812: 4e5e unlk %fp
...
00042dfc <create_disk>:
return disktab [major].minor + minor;
}
static rtems_status_code
create_disk(dev_t dev, const char *name, rtems_disk_device **dd_ptr)
{
42dfc: 4e56 ffe0 linkw %fp,#-32 42e00: 48d7 0cfc moveml %d2-%d7/%a2-%a3,%sp@ 42e04: 242e 0008 movel %fp@(8),%d2 42e08: 262e 000c movel %fp@(12),%d3
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
rtems_filesystem_split_dev_t(dev, major, minor);
if (major >= disktab_size) {
42e0c: 2c39 0006 44fa movel 644fa <disktab_size>,%d6
)
{
union __rtems_dev_t temp;
temp.device = device;
return temp.__overlay.major;
42e12: 2802 movel %d2,%d4
)
{
union __rtems_dev_t temp;
temp.device = device;
return temp.__overlay.minor;
42e14: 2a03 movel %d3,%d5 42e16: bc84 cmpl %d4,%d6 42e18: 6300 008e blsw 42ea8 <create_disk+0xac> 42e1c: 2479 0006 44fe moveal 644fe <disktab>,%a2
memset(table + old_size, 0, (new_size - old_size) * sizeof(*table));
disktab = table;
disktab_size = new_size;
}
if (disktab [major].minor == NULL || minor >= disktab[major].size) {
42e22: e78c lsll #3,%d4 42e24: 47f2 4800 lea %a2@(00000000,%d4:l),%a3 42e28: 2453 moveal %a3@,%a2 42e2a: 282b 0004 movel %a3@(4),%d4 42e2e: 4a8a tstl %a2
42e30: 671e beqs 42e50 <create_disk+0x54>
42e32: b885 cmpl %d5,%d4
42e34: 631a blss 42e50 <create_disk+0x54> <== NEVER TAKEN
memset(table + old_size, 0, (new_size - old_size) * sizeof(*table));
disktab [major].minor = table;
disktab [major].size = new_size;
}
return disktab [major].minor + minor;
42e36: 45f2 5c00 lea %a2@(00000000,%d5:l:4),%a2
{
rtems_disk_device **dd_entry = create_disk_table_entry(dev);
rtems_disk_device *dd = NULL;
char *alloc_name = NULL;
if (dd_entry == NULL) {
42e3a: 4a8a tstl %a2
42e3c: 675e beqs 42e9c <create_disk+0xa0> <== NEVER TAKEN
return RTEMS_NO_MEMORY;
}
if (*dd_entry != NULL) {
42e3e: 4a92 tstl %a2@ 42e40: 6700 00c0 beqw 42f02 <create_disk+0x106>
return RTEMS_RESOURCE_IN_USE;
42e44: 700c moveq #12,%d0
*dd_entry = dd;
*dd_ptr = dd;
return RTEMS_SUCCESSFUL;
}
42e46: 4cee 0cfc ffe0 moveml %fp@(-32),%d2-%d7/%a2-%a3 42e4c: 4e5e unlk %fp 42e4e: 4e75 rts
if (disktab [major].minor == NULL || minor >= disktab[major].size) {
rtems_disk_device **table = disktab [major].minor;
rtems_device_minor_number old_size = disktab [major].size;
rtems_device_minor_number new_size = 0;
if (old_size == 0) {
42e50: 4a84 tstl %d4 42e52: 6600 00a6 bnew 42efa <create_disk+0xfe>
new_size = DISKTAB_INITIAL_SIZE;
42e56: 7c08 moveq #8,%d6
} else {
new_size = 2 * old_size;
}
if (minor >= new_size) {
42e58: bc85 cmpl %d5,%d6
42e5a: 6204 bhis 42e60 <create_disk+0x64>
new_size = minor + 1;
42e5c: 2c05 movel %d5,%d6 42e5e: 5286 addql #1,%d6
}
table = realloc(table, new_size * sizeof(*table));
42e60: 2006 movel %d6,%d0 42e62: e588 lsll #2,%d0 42e64: 2f00 movel %d0,%sp@- 42e66: 2f0a movel %a2,%sp@- 42e68: 4eb9 0004 507c jsr 4507c <realloc>
if (table == NULL) {
42e6e: 508f addql #8,%sp
}
if (minor >= new_size) {
new_size = minor + 1;
}
table = realloc(table, new_size * sizeof(*table));
42e70: 2440 moveal %d0,%a2
if (table == NULL) {
42e72: 4a80 tstl %d0
42e74: 6726 beqs 42e9c <create_disk+0xa0>
return NULL;
}
memset(table + old_size, 0, (new_size - old_size) * sizeof(*table));
42e76: 2006 movel %d6,%d0 42e78: 9084 subl %d4,%d0 42e7a: e588 lsll #2,%d0 42e7c: 2f00 movel %d0,%sp@- 42e7e: 42a7 clrl %sp@- 42e80: 4872 4c00 pea %a2@(00000000,%d4:l:4) 42e84: 4eb9 0005 3a14 jsr 53a14 <memset>
disktab [major].minor = table;
disktab [major].size = new_size;
42e8a: 4fef 000c lea %sp@(12),%sp
if (table == NULL) {
return NULL;
}
memset(table + old_size, 0, (new_size - old_size) * sizeof(*table));
disktab [major].minor = table;
42e8e: 268a movel %a2,%a3@
disktab [major].size = new_size;
}
return disktab [major].minor + minor;
42e90: 45f2 5c00 lea %a2@(00000000,%d5:l:4),%a2
return NULL;
}
memset(table + old_size, 0, (new_size - old_size) * sizeof(*table));
disktab [major].minor = table;
disktab [major].size = new_size;
42e94: 2746 0004 movel %d6,%a3@(4)
{
rtems_disk_device **dd_entry = create_disk_table_entry(dev);
rtems_disk_device *dd = NULL;
char *alloc_name = NULL;
if (dd_entry == NULL) {
42e98: 4a8a tstl %a2
42e9a: 66a2 bnes 42e3e <create_disk+0x42> <== ALWAYS TAKEN
return RTEMS_RESOURCE_IN_USE;
}
dd = malloc(sizeof(*dd));
if (dd == NULL) {
return RTEMS_NO_MEMORY;
42e9c: 701a moveq #26,%d0
*dd_entry = dd;
*dd_ptr = dd;
return RTEMS_SUCCESSFUL;
}
42e9e: 4cee 0cfc ffe0 moveml %fp@(-32),%d2-%d7/%a2-%a3 42ea4: 4e5e unlk %fp 42ea6: 4e75 rts
rtems_filesystem_split_dev_t(dev, major, minor);
if (major >= disktab_size) {
rtems_disk_device_table *table = disktab;
rtems_device_major_number old_size = disktab_size;
rtems_device_major_number new_size = 2 * old_size;
42ea8: 2e06 movel %d6,%d7 42eaa: de87 addl %d7,%d7
rtems_device_minor_number minor = 0;
rtems_filesystem_split_dev_t(dev, major, minor);
if (major >= disktab_size) {
rtems_disk_device_table *table = disktab;
42eac: 2039 0006 44fe movel 644fe <disktab>,%d0
rtems_device_major_number old_size = disktab_size;
rtems_device_major_number new_size = 2 * old_size;
if (major >= new_size) {
42eb2: be84 cmpl %d4,%d7
42eb4: 6204 bhis 42eba <create_disk+0xbe> <== NEVER TAKEN
new_size = major + 1;
42eb6: 2e04 movel %d4,%d7 42eb8: 5287 addql #1,%d7
}
table = realloc(table, new_size * sizeof(*table));
42eba: 2207 movel %d7,%d1 42ebc: e789 lsll #3,%d1 42ebe: 2f01 movel %d1,%sp@- 42ec0: 2f00 movel %d0,%sp@- 42ec2: 4eb9 0004 507c jsr 4507c <realloc>
if (table == NULL) {
42ec8: 508f addql #8,%sp
if (major >= new_size) {
new_size = major + 1;
}
table = realloc(table, new_size * sizeof(*table));
42eca: 2440 moveal %d0,%a2
if (table == NULL) {
42ecc: 4a80 tstl %d0
42ece: 67cc beqs 42e9c <create_disk+0xa0> <== ALWAYS TAKEN
return NULL;
}
memset(table + old_size, 0, (new_size - old_size) * sizeof(*table));
42ed0: 2007 movel %d7,%d0 <== NOT EXECUTED 42ed2: 9086 subl %d6,%d0 <== NOT EXECUTED 42ed4: e788 lsll #3,%d0 <== NOT EXECUTED 42ed6: e78e lsll #3,%d6 <== NOT EXECUTED 42ed8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42eda: 42a7 clrl %sp@- <== NOT EXECUTED 42edc: 4872 6800 pea %a2@(00000000,%d6:l) <== NOT EXECUTED 42ee0: 4eb9 0005 3a14 jsr 53a14 <memset> <== NOT EXECUTED
disktab = table;
disktab_size = new_size;
42ee6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
if (table == NULL) {
return NULL;
}
memset(table + old_size, 0, (new_size - old_size) * sizeof(*table));
disktab = table;
42eea: 23ca 0006 44fe movel %a2,644fe <disktab> <== NOT EXECUTED
disktab_size = new_size;
42ef0: 23c7 0006 44fa movel %d7,644fa <disktab_size> <== NOT EXECUTED 42ef6: 6000 ff2a braw 42e22 <create_disk+0x26> <== NOT EXECUTED
rtems_device_minor_number new_size = 0;
if (old_size == 0) {
new_size = DISKTAB_INITIAL_SIZE;
} else {
new_size = 2 * old_size;
42efa: 2c04 movel %d4,%d6 <== NOT EXECUTED 42efc: dc86 addl %d6,%d6 <== NOT EXECUTED 42efe: 6000 ff58 braw 42e58 <create_disk+0x5c> <== NOT EXECUTED
if (*dd_entry != NULL) {
return RTEMS_RESOURCE_IN_USE;
}
dd = malloc(sizeof(*dd));
42f02: 4878 0032 pea 32 <OPER2+0x1e> 42f06: 4eb9 0004 44d8 jsr 444d8 <malloc>
if (dd == NULL) {
42f0c: 588f addql #4,%sp
if (*dd_entry != NULL) {
return RTEMS_RESOURCE_IN_USE;
}
dd = malloc(sizeof(*dd));
42f0e: 2640 moveal %d0,%a3
if (dd == NULL) {
42f10: 4a80 tstl %d0
42f12: 6788 beqs 42e9c <create_disk+0xa0> <== NEVER TAKEN
return RTEMS_NO_MEMORY;
}
if (name != NULL) {
42f14: 4aae 0010 tstl %fp@(16)
42f18: 676e beqs 42f88 <create_disk+0x18c>
alloc_name = strdup(name);
42f1a: 2f2e 0010 movel %fp@(16),%sp@- 42f1e: 4eb9 0005 4004 jsr 54004 <strdup>
if (alloc_name == NULL) {
42f24: 588f addql #4,%sp
if (dd == NULL) {
return RTEMS_NO_MEMORY;
}
if (name != NULL) {
alloc_name = strdup(name);
42f26: 2800 movel %d0,%d4 42f28: 2a00 movel %d0,%d5
if (alloc_name == NULL) {
42f2a: 677e beqs 42faa <create_disk+0x1ae> <== NEVER TAKEN
return RTEMS_NO_MEMORY;
}
}
if (name != NULL) {
if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) {
42f2c: 2f03 movel %d3,%sp@- 42f2e: 2f02 movel %d2,%sp@- 42f30: 4878 61ff pea 61ff <D_MAX_EXP+0x5a00> 42f34: 2f00 movel %d0,%sp@- 42f36: 4eb9 0004 45bc jsr 445bc <mknod> 42f3c: 4fef 0010 lea %sp@(16),%sp 42f40: 4a80 tstl %d0
42f42: 6d28 blts 42f6c <create_disk+0x170> <== NEVER TAKEN
return RTEMS_UNSATISFIED;
}
}
dd->dev = dev;
dd->name = alloc_name;
42f44: 2745 0010 movel %d5,%a3@(16)
dd->uses = 0;
dd->deleted = false;
*dd_entry = dd;
*dd_ptr = dd;
42f48: 206e 0014 moveal %fp@(20),%a0
}
}
dd->dev = dev;
dd->name = alloc_name;
dd->uses = 0;
42f4c: 42ab 0014 clrl %a3@(20)
dd->deleted = false;
*dd_entry = dd;
*dd_ptr = dd;
return RTEMS_SUCCESSFUL;
42f50: 4280 clrl %d0
}
dd->dev = dev;
dd->name = alloc_name;
dd->uses = 0;
dd->deleted = false;
42f52: 4201 clrb %d1
free(dd);
return RTEMS_UNSATISFIED;
}
}
dd->dev = dev;
42f54: 2682 movel %d2,%a3@ 42f56: 2743 0004 movel %d3,%a3@(4)
dd->name = alloc_name; dd->uses = 0; dd->deleted = false;
42f5a: 1741 0030 moveb %d1,%a3@(48)
*dd_entry = dd;
42f5e: 248b movel %a3,%a2@
*dd_ptr = dd;
42f60: 208b movel %a3,%a0@
return RTEMS_SUCCESSFUL;
}
42f62: 4cee 0cfc ffe0 moveml %fp@(-32),%d2-%d7/%a2-%a3 42f68: 4e5e unlk %fp 42f6a: 4e75 rts
}
}
if (name != NULL) {
if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) {
free(alloc_name);
42f6c: 2f04 movel %d4,%sp@- <== NOT EXECUTED 42f6e: 45f9 0004 41a8 lea 441a8 <free>,%a2 <== NOT EXECUTED 42f74: 4e92 jsr %a2@ <== NOT EXECUTED
free(dd);
42f76: 2f0b movel %a3,%sp@- <== NOT EXECUTED 42f78: 4e92 jsr %a2@ <== NOT EXECUTED
return RTEMS_UNSATISFIED;
42f7a: 508f addql #8,%sp <== NOT EXECUTED 42f7c: 700d moveq #13,%d0 <== NOT EXECUTED
*dd_entry = dd;
*dd_ptr = dd;
return RTEMS_SUCCESSFUL;
}
42f7e: 4cee 0cfc ffe0 moveml %fp@(-32),%d2-%d7/%a2-%a3 <== NOT EXECUTED 42f84: 4e5e unlk %fp <== NOT EXECUTED 42f86: 4e75 rts <== NOT EXECUTED
static rtems_status_code
create_disk(dev_t dev, const char *name, rtems_disk_device **dd_ptr)
{
rtems_disk_device **dd_entry = create_disk_table_entry(dev);
rtems_disk_device *dd = NULL;
char *alloc_name = NULL;
42f88: 4285 clrl %d5
dd->deleted = false;
*dd_entry = dd;
*dd_ptr = dd;
return RTEMS_SUCCESSFUL;
42f8a: 4280 clrl %d0
}
dd->dev = dev;
dd->name = alloc_name;
dd->uses = 0;
dd->deleted = false;
42f8c: 4201 clrb %d1
return RTEMS_UNSATISFIED;
}
}
dd->dev = dev;
dd->name = alloc_name;
42f8e: 2745 0010 movel %d5,%a3@(16)
dd->uses = 0;
dd->deleted = false;
*dd_entry = dd;
*dd_ptr = dd;
42f92: 206e 0014 moveal %fp@(20),%a0
}
}
dd->dev = dev;
dd->name = alloc_name;
dd->uses = 0;
42f96: 42ab 0014 clrl %a3@(20)
free(dd);
return RTEMS_UNSATISFIED;
}
}
dd->dev = dev;
42f9a: 2682 movel %d2,%a3@ 42f9c: 2743 0004 movel %d3,%a3@(4)
dd->name = alloc_name; dd->uses = 0; dd->deleted = false;
42fa0: 1741 0030 moveb %d1,%a3@(48)
*dd_entry = dd;
42fa4: 248b movel %a3,%a2@
*dd_ptr = dd;
42fa6: 208b movel %a3,%a0@ 42fa8: 60b8 bras 42f62 <create_disk+0x166>
if (name != NULL) {
alloc_name = strdup(name);
if (alloc_name == NULL) {
free(dd);
42faa: 2f0b movel %a3,%sp@- <== NOT EXECUTED 42fac: 4eb9 0004 41a8 jsr 441a8 <free> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
42fb2: 588f addql #4,%sp <== NOT EXECUTED 42fb4: 701a moveq #26,%d0 <== NOT EXECUTED
*dd_entry = dd;
*dd_ptr = dd;
return RTEMS_SUCCESSFUL;
}
42fb6: 4cee 0cfc ffe0 moveml %fp@(-32),%d2-%d7/%a2-%a3 <== NOT EXECUTED 42fbc: 4e5e unlk %fp <== NOT EXECUTED
0004b794 <devFS_evaluate_path>:
{
int i;
rtems_device_name_t *device_name_table;
/* see if 'flags' is valid */
if ( !rtems_libio_is_valid_perms( flags ) )
4b794: 70f8 moveq #-8,%d0
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
4b796: 4e56 ffdc linkw %fp,#-36
int i;
rtems_device_name_t *device_name_table;
/* see if 'flags' is valid */
if ( !rtems_libio_is_valid_perms( flags ) )
4b79a: c0ae 0010 andl %fp@(16),%d0
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
4b79e: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 4b7a2: 2c2e 0008 movel %fp@(8),%d6 4b7a6: 262e 000c movel %fp@(12),%d3 4b7aa: 286e 0014 moveal %fp@(20),%a4
int i;
rtems_device_name_t *device_name_table;
/* see if 'flags' is valid */
if ( !rtems_libio_is_valid_perms( flags ) )
4b7ae: 4a80 tstl %d0 4b7b0: 6600 0090 bnew 4b842 <devFS_evaluate_path+0xae>
rtems_set_errno_and_return_minus_one( EPERM );
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
4b7b4: 2814 movel %a4@,%d4
if (!device_name_table)
4b7b6: 6700 00a2 beqw 4b85a <devFS_evaluate_path+0xc6>
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
4b7ba: 2a39 0005 dc56 movel 5dc56 <rtems_device_table_size>,%d5
4b7c0: 673c beqs 4b7fe <devFS_evaluate_path+0x6a> <== NEVER TAKEN
4b7c2: 4280 clrl %d0
* handlers.
*/
extern rtems_filesystem_file_handlers_r devFS_file_handlers;
int devFS_evaluate_path(
4b7c4: 4282 clrl %d2
for (i = 0; i < rtems_device_table_size; i++) {
if (!device_name_table[i].device_name)
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
4b7c6: 4bf9 0004 f630 lea 4f630 <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)
4b7cc: 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++) {
4b7ce: 5282 addql #1,%d2
if (!device_name_table[i].device_name)
4b7d0: e989 lsll #4,%d1 4b7d2: 2041 moveal %d1,%a0 4b7d4: 47f0 0c00 lea %a0@(00000000,%d0:l:4),%a3 4b7d8: 47f3 4800 lea %a3@(00000000,%d4:l),%a3 4b7dc: 2453 moveal %a3@,%a2 4b7de: 4a8a tstl %a2
4b7e0: 6716 beqs 4b7f8 <devFS_evaluate_path+0x64>
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
4b7e2: 2f03 movel %d3,%sp@- 4b7e4: 2f0a movel %a2,%sp@- 4b7e6: 2f06 movel %d6,%sp@- 4b7e8: 4e95 jsr %a5@ 4b7ea: 4fef 000c lea %sp@(12),%sp 4b7ee: 4a80 tstl %d0
4b7f0: 6606 bnes 4b7f8 <devFS_evaluate_path+0x64>
continue;
if (device_name_table[i].device_name[pathnamelen] != '\0')
4b7f2: 4a32 3800 tstb %a2@(00000000,%d3:l)
4b7f6: 671e beqs 4b816 <devFS_evaluate_path+0x82> <== ALWAYS TAKEN
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
4b7f8: 2002 movel %d2,%d0 4b7fa: ba82 cmpl %d2,%d5
4b7fc: 66ce bnes 4b7cc <devFS_evaluate_path+0x38>
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
return 0;
}
/* no such file or directory */
rtems_set_errno_and_return_minus_one( ENOENT );
4b7fe: 4eb9 0004 e2a8 jsr 4e2a8 <__errno> 4b804: 7202 moveq #2,%d1 4b806: 2040 moveal %d0,%a0 4b808: 70ff moveq #-1,%d0
}
4b80a: 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 );
4b810: 2081 movel %d1,%a0@
}
4b812: 4e5e unlk %fp 4b814: 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;
4b816: 2079 0005 de34 moveal 5de34 <rtems_current_user_env>,%a0 4b81c: 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;
4b822: 223c 0005 dc98 movel #384152,%d1
pathloc->ops = &devFS_ops;
4b828: 41f9 0005 dcd0 lea 5dcd0 <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;
4b82e: 2941 0008 movel %d1,%a4@(8)
pathloc->ops = &devFS_ops;
4b832: 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];
4b836: 288b movel %a3,%a4@
return 0;
}
/* no such file or directory */
rtems_set_errno_and_return_minus_one( ENOENT );
}
4b838: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 4b83e: 4e5e unlk %fp 4b840: 4e75 rts
int i;
rtems_device_name_t *device_name_table;
/* see if 'flags' is valid */
if ( !rtems_libio_is_valid_perms( flags ) )
rtems_set_errno_and_return_minus_one( EPERM );
4b842: 4eb9 0004 e2a8 jsr 4e2a8 <__errno> <== NOT EXECUTED 4b848: 7601 moveq #1,%d3 <== NOT EXECUTED 4b84a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b84c: 70ff moveq #-1,%d0 <== NOT EXECUTED 4b84e: 2083 movel %d3,%a0@ <== NOT EXECUTED
return 0;
}
/* no such file or directory */
rtems_set_errno_and_return_minus_one( ENOENT );
}
4b850: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 <== NOT EXECUTED 4b856: 4e5e unlk %fp <== NOT EXECUTED 4b858: 4e75 rts <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EPERM );
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
4b85a: 4eb9 0004 e2a8 jsr 4e2a8 <__errno> 4b860: 740e moveq #14,%d2 4b862: 2040 moveal %d0,%a0 4b864: 70ff moveq #-1,%d0 4b866: 2082 movel %d2,%a0@
return 0;
}
/* no such file or directory */
rtems_set_errno_and_return_minus_one( ENOENT );
}
4b868: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5
4b86e: 4e5e unlk %fp <== NOT EXECUTED
00042da0 <disk_lock>:
*/
static volatile bool diskdevs_protected;
static rtems_status_code
disk_lock(void)
{
42da0: 4e56 0000 linkw %fp,#0
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
42da4: 42a7 clrl %sp@- 42da6: 42a7 clrl %sp@- 42da8: 2f39 0006 44f6 movel 644f6 <diskdevs_mutex>,%sp@- 42dae: 4eb9 0004 7cac jsr 47cac <rtems_semaphore_obtain>
if (sc == RTEMS_SUCCESSFUL) {
42db4: 4fef 000c lea %sp@(12),%sp 42db8: 4a80 tstl %d0
42dba: 6706 beqs 42dc2 <disk_lock+0x22> <== ALWAYS TAKEN
diskdevs_protected = true;
return RTEMS_SUCCESSFUL;
} else {
return RTEMS_NOT_CONFIGURED;
42dbc: 7016 moveq #22,%d0 <== NOT EXECUTED
} }
42dbe: 4e5e unlk %fp <== NOT EXECUTED 42dc0: 4e75 rts <== NOT EXECUTED
42dc2: 4e5e unlk %fp
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc == RTEMS_SUCCESSFUL) {
diskdevs_protected = true;
42dc4: 7201 moveq #1,%d1 42dc6: 13c1 0006 44f4 moveb %d1,644f4 <diskdevs_protected>
return RTEMS_SUCCESSFUL;
} else {
return RTEMS_NOT_CONFIGURED;
}
}
00042dce <disk_unlock>:
static void
disk_unlock(void)
{
42dce: 4e56 0000 linkw %fp,#0
rtems_status_code sc = RTEMS_SUCCESSFUL;
diskdevs_protected = false;
42dd2: 4200 clrb %d0
sc = rtems_semaphore_release(diskdevs_mutex);
42dd4: 2f39 0006 44f6 movel 644f6 <diskdevs_mutex>,%sp@-
static void
disk_unlock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
diskdevs_protected = false;
42dda: 13c0 0006 44f4 moveb %d0,644f4 <diskdevs_protected>
sc = rtems_semaphore_release(diskdevs_mutex);
42de0: 4eb9 0004 7dfc jsr 47dfc <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL) {
42de6: 588f addql #4,%sp 42de8: 4a80 tstl %d0
42dea: 6604 bnes 42df0 <disk_unlock+0x22> <== NEVER TAKEN
/* FIXME: Error number */
rtems_fatal_error_occurred(0xdeadbeef);
}
}
42dec: 4e5e unlk %fp 42dee: 4e75 rts
diskdevs_protected = false;
sc = rtems_semaphore_release(diskdevs_mutex);
if (sc != RTEMS_SUCCESSFUL) {
/* FIXME: Error number */
rtems_fatal_error_occurred(0xdeadbeef);
42df0: 2f3c dead beef movel #-559038737,%sp@- <== NOT EXECUTED 42df6: 4eb9 0004 83dc jsr 483dc <rtems_fatal_error_occurred> <== NOT EXECUTED
000442c4 <drainOutput.part.0>:
/*
* Drain output queue
*/
static void
drainOutput (struct rtems_termios_tty *tty)
442c4: 4e56 fff4 linkw %fp,#-12 442c8: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
{
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
rtems_interrupt_disable (level);
442cc: 243c 0000 0700 movel #1792,%d2 442d2: 2002 movel %d2,%d0
/*
* Drain output queue
*/
static void
drainOutput (struct rtems_termios_tty *tty)
442d4: 246e 0008 moveal %fp@(8),%a2
{
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
rtems_interrupt_disable (level);
442d8: 40c1 movew %sr,%d1 442da: 8081 orl %d1,%d0 442dc: 46c0 movew %d0,%sr
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
442de: 206a 0084 moveal %a2@(132),%a0 442e2: 202a 0080 movel %a2@(128),%d0 442e6: b088 cmpl %a0,%d0
442e8: 6734 beqs 4431e <drainOutput.part.0+0x5a>
442ea: 47f9 0004 6acc lea 46acc <rtems_semaphore_obtain>,%a3
tty->rawOutBufState = rob_wait;
442f0: 7002 moveq #2,%d0 442f2: 2540 0094 movel %d0,%a2@(148)
rtems_interrupt_enable (level);
442f6: 46c1 movew %d1,%sr
sc = rtems_semaphore_obtain(
442f8: 42a7 clrl %sp@- 442fa: 42a7 clrl %sp@- 442fc: 2f2a 008c movel %a2@(140),%sp@- 44300: 4e93 jsr %a3@
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
44302: 4fef 000c lea %sp@(12),%sp 44306: 4a80 tstl %d0
44308: 6620 bnes 4432a <drainOutput.part.0+0x66> <== NEVER TAKEN
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
4430a: 2002 movel %d2,%d0 4430c: 40c1 movew %sr,%d1 4430e: 8081 orl %d1,%d0 44310: 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) {
44312: 206a 0084 moveal %a2@(132),%a0 44316: 202a 0080 movel %a2@(128),%d0 4431a: b088 cmpl %a0,%d0
4431c: 66d2 bnes 442f0 <drainOutput.part.0+0x2c>
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);
4431e: 46c1 movew %d1,%sr
} }
44320: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 44326: 4e5e unlk %fp 44328: 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);
4432a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4432c: 4eb9 0004 724c jsr 4724c <rtems_fatal_error_occurred> <== NOT EXECUTED
00045038 <echo>:
/*
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
45038: 4e56 fffc linkw %fp,#-4 4503c: 222e 0008 movel %fp@(8),%d1 45040: 2f0a movel %a2,%sp@- 45042: 246e 000c moveal %fp@(12),%a2 45046: 2f02 movel %d2,%sp@-
if ((tty->termios.c_lflag & ECHOCTL) &&
45048: 242a 003c movel %a2@(60),%d2
/*
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
4504c: 1001 moveb %d1,%d0
if ((tty->termios.c_lflag & ECHOCTL) &&
4504e: 0282 0000 0200 andil #512,%d2
iscntrl(c) && (c != '\t') && (c != '\n')) {
45054: 0280 0000 00ff andil #255,%d0
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
if ((tty->termios.c_lflag & ECHOCTL) &&
4505a: 4a82 tstl %d2
4505c: 6720 beqs 4507e <echo+0x46> <== NEVER TAKEN
iscntrl(c) && (c != '\t') && (c != '\n')) {
4505e: 2079 0005 f994 moveal 5f994 <__ctype_ptr__>,%a0 45064: 1430 0801 moveb %a0@(00000001,%d0:l),%d2 45068: 49c2 extbl %d2
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
if ((tty->termios.c_lflag & ECHOCTL) &&
4506a: 0802 0005 btst #5,%d2
4506e: 670e beqs 4507e <echo+0x46>
iscntrl(c) && (c != '\t') && (c != '\n')) {
45070: 7409 moveq #9,%d2 45072: b480 cmpl %d0,%d2
45074: 6708 beqs 4507e <echo+0x46>
45076: 143c 000a moveb #10,%d2 4507a: b480 cmpl %d0,%d2
4507c: 6616 bnes 45094 <echo+0x5c>
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
tty->column += 2;
} else {
oproc (c, tty);
4507e: 2f0a movel %a2,%sp@- 45080: 2f00 movel %d0,%sp@- 45082: 4eba fde0 jsr %pc@(44e64 <oproc>)
} }
45086: 242e fff4 movel %fp@(-12),%d2
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
tty->column += 2;
} else {
oproc (c, tty);
4508a: 508f addql #8,%sp
} }
4508c: 246e fff8 moveal %fp@(-8),%a2 45090: 4e5e unlk %fp 45092: 4e75 rts
iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
45094: 2f0a movel %a2,%sp@- 45096: 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;
4509a: 7040 moveq #64,%d0
rtems_termios_puts (echobuf, 2, tty);
4509c: 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;
450a0: b181 eorl %d0,%d1
{
if ((tty->termios.c_lflag & ECHOCTL) &&
iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
450a2: 745e moveq #94,%d2
echobuf[1] = c ^ 0x40;
450a4: 1d41 ffff moveb %d1,%fp@(-1)
{
if ((tty->termios.c_lflag & ECHOCTL) &&
iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
450a8: 1d42 fffe moveb %d2,%fp@(-2)
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
450ac: 4eb9 0004 4d60 jsr 44d60 <rtems_termios_puts>
tty->column += 2;
} else {
oproc (c, tty);
}
}
450b2: 242e fff4 movel %fp@(-12),%d2
char echobuf[2];
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
tty->column += 2;
450b6: 54aa 0028 addql #2,%a2@(40) 450ba: 4fef 000c lea %sp@(12),%sp
} else {
oproc (c, tty);
}
}
450be: 246e fff8 moveal %fp@(-8),%a2
450c2: 4e5e unlk %fp <== NOT EXECUTED
0004401c <endgrent>:
void endgrent(void)
{
4401c: 4e56 0000 linkw %fp,#0
if (group_fp != NULL)
44020: 2039 0006 2080 movel 62080 <group_fp>,%d0
44026: 670a beqs 44032 <endgrent+0x16> <== NEVER TAKEN
fclose(group_fp);
44028: 2f00 movel %d0,%sp@- 4402a: 4eb9 0004 fe20 jsr 4fe20 <fclose> 44030: 588f addql #4,%sp
}
44032: 4e5e unlk %fp
...
00043ed0 <endpwent>:
void endpwent(void)
{
43ed0: 4e56 0000 linkw %fp,#0
if (passwd_fp != NULL)
43ed4: 2039 0006 1fa6 movel 61fa6 <passwd_fp>,%d0
43eda: 670a beqs 43ee6 <endpwent+0x16> <== NEVER TAKEN
fclose(passwd_fp);
43edc: 2f00 movel %d0,%sp@- 43ede: 4eb9 0004 fe20 jsr 4fe20 <fclose> 43ee4: 588f addql #4,%sp
}
43ee6: 4e5e unlk %fp <== NOT EXECUTED
000450c6 <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)
{
450c6: 4e56 ffe4 linkw %fp,#-28 450ca: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 450ce: 246e 0008 moveal %fp@(8),%a2 450d2: 282e 000c movel %fp@(12),%d4
if (tty->ccount == 0)
450d6: 202a 0020 movel %a2@(32),%d0
450da: 6736 beqs 45112 <erase+0x4c>
return;
if (lineFlag) {
if (!(tty->termios.c_lflag & ECHO)) {
450dc: 262a 003c movel %a2@(60),%d3 450e0: 7208 moveq #8,%d1 450e2: c283 andl %d3,%d1
static void
erase (struct rtems_termios_tty *tty, int lineFlag)
{
if (tty->ccount == 0)
return;
if (lineFlag) {
450e4: 4a84 tstl %d4
450e6: 6734 beqs 4511c <erase+0x56>
if (!(tty->termios.c_lflag & ECHO)) {
450e8: 4a81 tstl %d1 450ea: 6700 01a8 beqw 45294 <erase+0x1ce>
tty->ccount = 0;
return;
}
if (!(tty->termios.c_lflag & ECHOE)) {
450ee: 0803 0004 btst #4,%d3
450f2: 6628 bnes 4511c <erase+0x56> <== ALWAYS TAKEN
tty->ccount = 0;
echo (tty->termios.c_cc[VKILL], tty);
450f4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 450f6: 4280 clrl %d0 <== NOT EXECUTED 450f8: 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;
450fc: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED
echo (tty->termios.c_cc[VKILL], tty);
45100: 2f00 movel %d0,%sp@- <== NOT EXECUTED 45102: 4eba ff34 jsr %pc@(45038 <echo>) <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
45106: 508f addql #8,%sp <== NOT EXECUTED 45108: 7020 moveq #32,%d0 <== NOT EXECUTED 4510a: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 4510e: 6600 0192 bnew 452a2 <erase+0x1dc> <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
45112: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 45118: 4e5e unlk %fp 4511a: 4e75 rts 4511c: 47f9 0004 4d60 lea 44d60 <rtems_termios_puts>,%a3
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
45122: 5380 subql #1,%d0 45124: 206a 001c moveal %a2@(28),%a0 45128: 2540 0020 movel %d0,%a2@(32) 4512c: 1430 0800 moveb %a0@(00000000,%d0:l),%d2
if (tty->termios.c_lflag & ECHO) {
45130: 4a81 tstl %d1
45132: 6734 beqs 45168 <erase+0xa2> <== NEVER TAKEN
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
45134: 4a84 tstl %d4
45136: 6608 bnes 45140 <erase+0x7a>
45138: 0803 0004 btst #4,%d3 4513c: 6700 013c beqw 4527a <erase+0x1b4>
echo (tty->termios.c_cc[VERASE], tty);
} else if (c == '\t') {
45140: 7209 moveq #9,%d1 45142: 0282 0000 00ff andil #255,%d2 45148: b282 cmpl %d2,%d1 4514a: 6700 0090 beqw 451dc <erase+0x116>
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
4514e: 2079 0005 f994 moveal 5f994 <__ctype_ptr__>,%a0 45154: 5282 addql #1,%d2 45156: 1030 2800 moveb %a0@(00000000,%d2:l),%d0 4515a: 49c0 extbl %d0 4515c: 0800 0005 btst #5,%d0
45160: 6756 beqs 451b8 <erase+0xf2>
45162: 0803 0009 btst #9,%d3 <== NOT EXECUTED 45166: 6614 bnes 4517c <erase+0xb6> <== NOT EXECUTED
if (tty->column)
tty->column--;
}
}
}
if (!lineFlag)
45168: 4a84 tstl %d4
4516a: 67a6 beqs 45112 <erase+0x4c>
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
4516c: 202a 0020 movel %a2@(32),%d0
45170: 67a0 beqs 45112 <erase+0x4c>
}
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);
45172: 262a 003c movel %a2@(60),%d3 45176: 7208 moveq #8,%d1 45178: c283 andl %d3,%d1 4517a: 60a6 bras 45122 <erase+0x5c>
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
rtems_termios_puts ("\b \b", 3, tty);
4517c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4517e: 4878 0003 pea 3 <DIVIDE> <== NOT EXECUTED 45182: 4879 0005 e7cd pea 5e7cd <rtems_filesystem_default_pathconf+0xb1><== NOT EXECUTED 45188: 4e93 jsr %a3@ <== NOT EXECUTED
if (tty->column)
4518a: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 4518e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 45192: 6706 beqs 4519a <erase+0xd4> <== NOT EXECUTED
tty->column--;
45194: 5380 subql #1,%d0 <== NOT EXECUTED 45196: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
4519a: 2079 0005 f994 moveal 5f994 <__ctype_ptr__>,%a0 <== NOT EXECUTED 451a0: 1030 2800 moveb %a0@(00000000,%d2:l),%d0 <== NOT EXECUTED 451a4: 49c0 extbl %d0 <== NOT EXECUTED 451a6: 0800 0005 btst #5,%d0 <== NOT EXECUTED 451aa: 670c beqs 451b8 <erase+0xf2> <== NOT EXECUTED 451ac: 202a 003c movel %a2@(60),%d0 <== NOT EXECUTED 451b0: 0280 0000 0200 andil #512,%d0 <== NOT EXECUTED 451b6: 67b0 beqs 45168 <erase+0xa2> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
451b8: 2f0a movel %a2,%sp@- 451ba: 4878 0003 pea 3 <DIVIDE> 451be: 4879 0005 e7cd pea 5e7cd <rtems_filesystem_default_pathconf+0xb1> 451c4: 4eb9 0004 4d60 jsr 44d60 <rtems_termios_puts>
if (tty->column)
451ca: 202a 0028 movel %a2@(40),%d0 451ce: 4fef 000c lea %sp@(12),%sp
451d2: 6794 beqs 45168 <erase+0xa2> <== NEVER TAKEN
tty->column--;
451d4: 5380 subql #1,%d0 451d6: 2540 0028 movel %d0,%a2@(40) 451da: 608c bras 45168 <erase+0xa2>
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;
451dc: 242a 002c movel %a2@(44),%d2
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
451e0: 4a80 tstl %d0
451e2: 6732 beqs 45216 <erase+0x150>
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
} else if (iscntrl (c)) {
if (tty->termios.c_lflag & ECHOCTL)
451e4: 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;
451e6: 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)
451e8: 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)) {
451ee: 2279 0005 f994 moveal 5f994 <__ctype_ptr__>,%a1
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
451f4: 4283 clrl %d3 451f6: 1618 moveb %a0@+,%d3
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
451f8: 5281 addql #1,%d1
if (c == '\t') {
451fa: 7a09 moveq #9,%d5 451fc: ba83 cmpl %d3,%d5
451fe: 676c beqs 4526c <erase+0x1a6>
col = (col | 7) + 1;
} else if (iscntrl (c)) {
45200: 1a31 3801 moveb %a1@(00000001,%d3:l),%d5 45204: 49c5 extbl %d5 45206: 0805 0005 btst #5,%d5
4520a: 6758 beqs 45264 <erase+0x19e> <== ALWAYS TAKEN
if (tty->termios.c_lflag & ECHOCTL)
4520c: 4a86 tstl %d6 <== NOT EXECUTED 4520e: 6702 beqs 45212 <erase+0x14c> <== NOT EXECUTED
col += 2;
45210: 5482 addql #2,%d2 <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
45212: b280 cmpl %d0,%d1 <== NOT EXECUTED 45214: 66de bnes 451f4 <erase+0x12e> <== NOT EXECUTED
}
/*
* Back up over the tab
*/
while (tty->column > col) {
45216: b4aa 0028 cmpl %a2@(40),%d2 4521a: 6c00 ff4c bgew 45168 <erase+0xa2>
rtems_termios_puts ("\b", 1, tty);
4521e: 2f0a movel %a2,%sp@- 45220: 4878 0001 pea 1 <ADD> 45224: 4879 0005 e7cf pea 5e7cf <rtems_filesystem_default_pathconf+0xb3> 4522a: 4e93 jsr %a3@
tty->column--;
4522c: 202a 0028 movel %a2@(40),%d0 45230: 5380 subql #1,%d0
}
/*
* Back up over the tab
*/
while (tty->column > col) {
45232: 4fef 000c lea %sp@(12),%sp
rtems_termios_puts ("\b", 1, tty);
tty->column--;
45236: 2540 0028 movel %d0,%a2@(40)
}
/*
* Back up over the tab
*/
while (tty->column > col) {
4523a: b480 cmpl %d0,%d2 4523c: 6c00 ff2a bgew 45168 <erase+0xa2>
rtems_termios_puts ("\b", 1, tty);
45240: 2f0a movel %a2,%sp@- 45242: 4878 0001 pea 1 <ADD> 45246: 4879 0005 e7cf pea 5e7cf <rtems_filesystem_default_pathconf+0xb3> 4524c: 4e93 jsr %a3@
tty->column--;
4524e: 202a 0028 movel %a2@(40),%d0 45252: 5380 subql #1,%d0
}
/*
* Back up over the tab
*/
while (tty->column > col) {
45254: 4fef 000c lea %sp@(12),%sp
rtems_termios_puts ("\b", 1, tty);
tty->column--;
45258: 2540 0028 movel %d0,%a2@(40)
}
/*
* Back up over the tab
*/
while (tty->column > col) {
4525c: b480 cmpl %d0,%d2
4525e: 6dbe blts 4521e <erase+0x158>
45260: 6000 ff06 braw 45168 <erase+0xa2>
col = (col | 7) + 1;
} else if (iscntrl (c)) {
if (tty->termios.c_lflag & ECHOCTL)
col += 2;
} else {
col++;
45264: 5282 addql #1,%d2
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
45266: b280 cmpl %d0,%d1
45268: 668a bnes 451f4 <erase+0x12e>
4526a: 60aa bras 45216 <erase+0x150>
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
4526c: 7607 moveq #7,%d3 4526e: 8483 orl %d3,%d2 45270: 5282 addql #1,%d2
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
45272: b280 cmpl %d0,%d1 45274: 6600 ff7e bnew 451f4 <erase+0x12e>
45278: 609c bras 45216 <erase+0x150> <== NOT EXECUTED
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
if (tty->termios.c_lflag & ECHO) {
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
echo (tty->termios.c_cc[VERASE], tty);
4527a: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED 4527e: 4280 clrl %d0 <== NOT EXECUTED 45280: 102a 0043 moveb %a2@(67),%d0 <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
45284: 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);
4528a: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
4528e: 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);
45290: 6000 fda6 braw 45038 <echo> <== NOT EXECUTED
{
if (tty->ccount == 0)
return;
if (lineFlag) {
if (!(tty->termios.c_lflag & ECHO)) {
tty->ccount = 0;
45294: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
45298: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 <== NOT EXECUTED 4529e: 4e5e unlk %fp <== NOT EXECUTED 452a0: 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);
452a2: 700a moveq #10,%d0 <== NOT EXECUTED 452a4: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
452a8: 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);
452ae: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
452b2: 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);
452b4: 6000 fd82 braw 45038 <echo> <== NOT EXECUTED
0005387c <fat_buf_access>:
#include "fat_fat_operations.h"
int
fat_buf_access(fat_fs_info_t *fs_info, uint32_t blk, int op_type,
rtems_bdbuf_buffer **buf)
{
5387c: 4e56 ffdc linkw %fp,#-36 53880: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 53884: 246e 0008 moveal %fp@(8),%a2 53888: 242e 000c movel %fp@(12),%d2 5388c: 282e 0010 movel %fp@(16),%d4
rtems_status_code sc = RTEMS_SUCCESSFUL;
uint8_t i;
bool sec_of_fat;
if (fs_info->c.state == FAT_CACHE_EMPTY)
53890: 4a2a 0077 tstb %a2@(119) 53894: 6700 0116 beqw 539ac <fat_buf_access+0x130>
fs_info->c.blk_num = blk;
fs_info->c.modified = 0;
fs_info->c.state = FAT_CACHE_ACTUAL;
}
sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) &&
53898: 4281 clrl %d1 5389a: 322a 0014 movew %a2@(20),%d1
rtems_status_code sc = RTEMS_SUCCESSFUL;
uint8_t i;
bool sec_of_fat;
if (fs_info->c.state == FAT_CACHE_EMPTY)
5389e: 202a 0072 movel %a2@(114),%d0
fs_info->c.blk_num = blk;
fs_info->c.modified = 0;
fs_info->c.state = FAT_CACHE_ACTUAL;
}
sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) &&
538a2: b081 cmpl %d1,%d0 538a4: 6500 0146 bcsw 539ec <fat_buf_access+0x170> 538a8: b0aa 001a cmpl %a2@(26),%d0 538ac: 55c3 scs %d3 538ae: 4483 negl %d3
(fs_info->c.blk_num < fs_info->vol.rdir_loc));
if (fs_info->c.blk_num != blk)
538b0: b082 cmpl %d2,%d0 538b2: 6700 00e4 beqw 53998 <fat_buf_access+0x11c>
{
if (fs_info->c.modified)
538b6: 4a2a 0076 tstb %a2@(118) 538ba: 6700 0136 beqw 539f2 <fat_buf_access+0x176>
{
if (sec_of_fat && !fs_info->vol.mirror)
538be: 4a03 tstb %d3
538c0: 6708 beqs 538ca <fat_buf_access+0x4e> <== ALWAYS TAKEN
538c2: 4a2a 0042 tstb %a2@(66) <== NOT EXECUTED 538c6: 6700 0174 beqw 53a3c <fat_buf_access+0x1c0> <== NOT EXECUTED
memcpy(fs_info->sec_buf, fs_info->c.buf->buffer,
fs_info->vol.bps);
sc = rtems_bdbuf_release_modified(fs_info->c.buf);
538ca: 2f2a 0078 movel %a2@(120),%sp@- 538ce: 47f9 0005 215c lea 5215c <rtems_bdbuf_release_modified>,%a3 538d4: 4e93 jsr %a3@
fs_info->c.state = FAT_CACHE_EMPTY;
fs_info->c.modified = 0;
if (sc != RTEMS_SUCCESSFUL)
538d6: 588f addql #4,%sp
if (sec_of_fat && !fs_info->vol.mirror)
memcpy(fs_info->sec_buf, fs_info->c.buf->buffer,
fs_info->vol.bps);
sc = rtems_bdbuf_release_modified(fs_info->c.buf);
fs_info->c.state = FAT_CACHE_EMPTY;
538d8: 4201 clrb %d1 538da: 1541 0077 moveb %d1,%a2@(119)
fs_info->c.modified = 0;
538de: 1541 0076 moveb %d1,%a2@(118)
if (sc != RTEMS_SUCCESSFUL)
538e2: 4a80 tstl %d0 538e4: 6600 0124 bnew 53a0a <fat_buf_access+0x18e>
rtems_set_errno_and_return_minus_one(EIO);
if (sec_of_fat && !fs_info->vol.mirror)
538e8: 4a03 tstb %d3
538ea: 677e beqs 5396a <fat_buf_access+0xee> <== ALWAYS TAKEN
538ec: 4a2a 0042 tstb %a2@(66) <== NOT EXECUTED 538f0: 6678 bnes 5396a <fat_buf_access+0xee> <== NOT EXECUTED
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
538f2: 4280 clrl %d0 <== NOT EXECUTED 538f4: 102a 0009 moveb %a2@(9),%d0 <== NOT EXECUTED 538f8: 7201 moveq #1,%d1 <== NOT EXECUTED 538fa: b280 cmpl %d0,%d1 <== NOT EXECUTED 538fc: 646c bccs 5396a <fat_buf_access+0xee> <== NOT EXECUTED 538fe: 2a0e movel %fp,%d5 <== NOT EXECUTED 53900: 49f9 0005 1cf4 lea 51cf4 <rtems_bdbuf_get>,%a4 <== NOT EXECUTED 53906: 5985 subql #4,%d5 <== NOT EXECUTED 53908: 7001 moveq #1,%d0 <== NOT EXECUTED
fs_info->c.blk_num +
fs_info->vol.fat_length * i,
&b);
if ( sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(ENOMEM);
memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps);
5390a: 4bf9 0005 e2a0 lea 5e2a0 <memcpy>,%a5 <== NOT EXECUTED
if (sec_of_fat && !fs_info->vol.mirror)
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
53910: 7601 moveq #1,%d3 <== NOT EXECUTED
{
sc = rtems_bdbuf_get(fs_info->vol.dev,
53912: 2f05 movel %d5,%sp@- <== NOT EXECUTED
fs_info->c.blk_num +
fs_info->vol.fat_length * i,
53914: 41ea 0016 lea %a2@(22),%a0 <== NOT EXECUTED
if (sec_of_fat && !fs_info->vol.mirror)
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
53918: 5283 addql #1,%d3 <== NOT EXECUTED
{
sc = rtems_bdbuf_get(fs_info->vol.dev,
fs_info->c.blk_num +
fs_info->vol.fat_length * i,
5391a: 4c10 0800 mulsl %a0@,%d0 <== NOT EXECUTED
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
{
sc = rtems_bdbuf_get(fs_info->vol.dev,
5391e: d0aa 0072 addl %a2@(114),%d0 <== NOT EXECUTED 53922: 2f00 movel %d0,%sp@- <== NOT EXECUTED 53924: 2f2a 004e movel %a2@(78),%sp@- <== NOT EXECUTED 53928: 2f2a 004a movel %a2@(74),%sp@- <== NOT EXECUTED 5392c: 4e94 jsr %a4@ <== NOT EXECUTED
fs_info->c.blk_num +
fs_info->vol.fat_length * i,
&b);
if ( sc != RTEMS_SUCCESSFUL)
5392e: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 53932: 4a80 tstl %d0 <== NOT EXECUTED 53934: 6600 0142 bnew 53a78 <fat_buf_access+0x1fc> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps);
53938: 4280 clrl %d0 <== NOT EXECUTED 5393a: 3012 movew %a2@,%d0 <== NOT EXECUTED 5393c: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 53940: 2f00 movel %d0,%sp@- <== NOT EXECUTED 53942: 2f2a 007c movel %a2@(124),%sp@- <== NOT EXECUTED 53946: 2f28 001e movel %a0@(30),%sp@- <== NOT EXECUTED 5394a: 4e95 jsr %a5@ <== NOT EXECUTED
sc = rtems_bdbuf_release_modified(b);
5394c: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 53950: 4e93 jsr %a3@ <== NOT EXECUTED
if ( sc != RTEMS_SUCCESSFUL)
53952: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 53956: 4a80 tstl %d0 <== NOT EXECUTED 53958: 6600 011e bnew 53a78 <fat_buf_access+0x1fc> <== NOT EXECUTED
if (sec_of_fat && !fs_info->vol.mirror)
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
5395c: 4281 clrl %d1 <== NOT EXECUTED 5395e: 122a 0009 moveb %a2@(9),%d1 <== NOT EXECUTED 53962: 4280 clrl %d0 <== NOT EXECUTED 53964: 1003 moveb %d3,%d0 <== NOT EXECUTED 53966: b081 cmpl %d1,%d0 <== NOT EXECUTED 53968: 65a8 bcss 53912 <fat_buf_access+0x96> <== NOT EXECUTED
fs_info->c.state = FAT_CACHE_EMPTY;
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
}
if (op_type == FAT_OP_TYPE_READ)
5396a: 7001 moveq #1,%d0 5396c: b084 cmpl %d4,%d0 5396e: 6700 00ec beqw 53a5c <fat_buf_access+0x1e0>
sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf);
else
sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf);
53972: 486a 0078 pea %a2@(120) 53976: 2f02 movel %d2,%sp@- 53978: 2f2a 004e movel %a2@(78),%sp@- 5397c: 2f2a 004a movel %a2@(74),%sp@- 53980: 4eb9 0005 1cf4 jsr 51cf4 <rtems_bdbuf_get> 53986: 4fef 0010 lea %sp@(16),%sp
if (sc != RTEMS_SUCCESSFUL)
5398a: 4a80 tstl %d0
5398c: 667c bnes 53a0a <fat_buf_access+0x18e> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one(EIO);
fs_info->c.blk_num = blk;
5398e: 2542 0072 movel %d2,%a2@(114)
fs_info->c.state = FAT_CACHE_ACTUAL;
53992: 7201 moveq #1,%d1 53994: 1541 0077 moveb %d1,%a2@(119)
}
*buf = fs_info->c.buf;
53998: 206e 0014 moveal %fp@(20),%a0
return RC_OK;
5399c: 4280 clrl %d0
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
fs_info->c.blk_num = blk;
fs_info->c.state = FAT_CACHE_ACTUAL;
}
*buf = fs_info->c.buf;
5399e: 20aa 0078 movel %a2@(120),%a0@
return RC_OK;
}
539a2: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5 539a8: 4e5e unlk %fp 539aa: 4e75 rts
bool sec_of_fat;
if (fs_info->c.state == FAT_CACHE_EMPTY)
{
if (op_type == FAT_OP_TYPE_READ)
539ac: 7001 moveq #1,%d0 539ae: b084 cmpl %d4,%d0
539b0: 6770 beqs 53a22 <fat_buf_access+0x1a6>
sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf);
else
sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf);
539b2: 486a 0078 pea %a2@(120) 539b6: 2f02 movel %d2,%sp@- 539b8: 2f2a 004e movel %a2@(78),%sp@- 539bc: 2f2a 004a movel %a2@(74),%sp@- 539c0: 4eb9 0005 1cf4 jsr 51cf4 <rtems_bdbuf_get> 539c6: 4fef 0010 lea %sp@(16),%sp
if (sc != RTEMS_SUCCESSFUL)
539ca: 4a80 tstl %d0
539cc: 663c bnes 53a0a <fat_buf_access+0x18e> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one(EIO);
fs_info->c.blk_num = blk;
539ce: 2542 0072 movel %d2,%a2@(114)
fs_info->c.modified = 0;
fs_info->c.state = FAT_CACHE_ACTUAL;
539d2: 2002 movel %d2,%d0
else
sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
fs_info->c.blk_num = blk;
fs_info->c.modified = 0;
539d4: 4201 clrb %d1 539d6: 1541 0076 moveb %d1,%a2@(118)
fs_info->c.state = FAT_CACHE_ACTUAL;
539da: 7201 moveq #1,%d1 539dc: 1541 0077 moveb %d1,%a2@(119)
}
sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) &&
539e0: 4281 clrl %d1 539e2: 322a 0014 movew %a2@(20),%d1 539e6: b081 cmpl %d1,%d0 539e8: 6400 febe bccw 538a8 <fat_buf_access+0x2c>
539ec: 4203 clrb %d3 <== NOT EXECUTED 539ee: 6000 fec0 braw 538b0 <fat_buf_access+0x34> <== NOT EXECUTED
}
}
}
else
{
sc = rtems_bdbuf_release(fs_info->c.buf);
539f2: 2f2a 0078 movel %a2@(120),%sp@- 539f6: 4eb9 0005 2090 jsr 52090 <rtems_bdbuf_release>
fs_info->c.state = FAT_CACHE_EMPTY;
if (sc != RTEMS_SUCCESSFUL)
539fc: 588f addql #4,%sp
}
}
else
{
sc = rtems_bdbuf_release(fs_info->c.buf);
fs_info->c.state = FAT_CACHE_EMPTY;
539fe: 4201 clrb %d1 53a00: 1541 0077 moveb %d1,%a2@(119)
if (sc != RTEMS_SUCCESSFUL)
53a04: 4a80 tstl %d0 53a06: 6700 ff62 beqw 5396a <fat_buf_access+0xee>
if (op_type == FAT_OP_TYPE_READ)
sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf);
else
sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
53a0a: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 53a10: 7205 moveq #5,%d1 <== NOT EXECUTED 53a12: 2040 moveal %d0,%a0 <== NOT EXECUTED 53a14: 70ff moveq #-1,%d0 <== NOT EXECUTED
fs_info->c.blk_num = blk;
fs_info->c.state = FAT_CACHE_ACTUAL;
}
*buf = fs_info->c.buf;
return RC_OK;
}
53a16: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5 <== NOT EXECUTED
if (op_type == FAT_OP_TYPE_READ)
sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf);
else
sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
53a1c: 2081 movel %d1,%a0@ <== NOT EXECUTED
fs_info->c.blk_num = blk;
fs_info->c.state = FAT_CACHE_ACTUAL;
}
*buf = fs_info->c.buf;
return RC_OK;
}
53a1e: 4e5e unlk %fp <== NOT EXECUTED 53a20: 4e75 rts <== NOT EXECUTED
if (fs_info->c.state == FAT_CACHE_EMPTY)
{
if (op_type == FAT_OP_TYPE_READ)
sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf);
53a22: 486a 0078 pea %a2@(120) 53a26: 2f02 movel %d2,%sp@- 53a28: 2f2a 004e movel %a2@(78),%sp@- 53a2c: 2f2a 004a movel %a2@(74),%sp@- 53a30: 4eb9 0005 1de8 jsr 51de8 <rtems_bdbuf_read> 53a36: 4fef 0010 lea %sp@(16),%sp 53a3a: 608e bras 539ca <fat_buf_access+0x14e>
if (fs_info->c.blk_num != blk)
{
if (fs_info->c.modified)
{
if (sec_of_fat && !fs_info->vol.mirror)
memcpy(fs_info->sec_buf, fs_info->c.buf->buffer,
53a3c: 4280 clrl %d0 <== NOT EXECUTED 53a3e: 206a 0078 moveal %a2@(120),%a0 <== NOT EXECUTED 53a42: 3012 movew %a2@,%d0 <== NOT EXECUTED 53a44: 2f00 movel %d0,%sp@- <== NOT EXECUTED 53a46: 2f28 001e movel %a0@(30),%sp@- <== NOT EXECUTED 53a4a: 2f2a 007c movel %a2@(124),%sp@- <== NOT EXECUTED 53a4e: 4eb9 0005 e2a0 jsr 5e2a0 <memcpy> <== NOT EXECUTED 53a54: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 53a58: 6000 fe70 braw 538ca <fat_buf_access+0x4e> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
}
if (op_type == FAT_OP_TYPE_READ)
sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf);
53a5c: 486a 0078 pea %a2@(120) 53a60: 2f02 movel %d2,%sp@- 53a62: 2f2a 004e movel %a2@(78),%sp@- 53a66: 2f2a 004a movel %a2@(74),%sp@- 53a6a: 4eb9 0005 1de8 jsr 51de8 <rtems_bdbuf_read> 53a70: 4fef 0010 lea %sp@(16),%sp 53a74: 6000 ff14 braw 5398a <fat_buf_access+0x10e>
if ( sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(ENOMEM);
memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps);
sc = rtems_bdbuf_release_modified(b);
if ( sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(ENOMEM);
53a78: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 53a7e: 740c moveq #12,%d2 <== NOT EXECUTED 53a80: 2040 moveal %d0,%a0 <== NOT EXECUTED 53a82: 70ff moveq #-1,%d0 <== NOT EXECUTED 53a84: 2082 movel %d2,%a0@ <== NOT EXECUTED
fs_info->c.blk_num = blk;
fs_info->c.state = FAT_CACHE_ACTUAL;
}
*buf = fs_info->c.buf;
return RC_OK;
}
53a86: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5 <== NOT EXECUTED 53a8c: 4e5e unlk %fp <== NOT EXECUTED
00053a90 <fat_buf_release>:
int
fat_buf_release(fat_fs_info_t *fs_info)
{
53a90: 4e56 ffe4 linkw %fp,#-28 53a94: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 53a98: 246e 0008 moveal %fp@(8),%a2
rtems_status_code sc = RTEMS_SUCCESSFUL;
uint8_t i;
bool sec_of_fat;
if (fs_info->c.state == FAT_CACHE_EMPTY)
53a9c: 4a2a 0077 tstb %a2@(119) 53aa0: 6700 010c beqw 53bae <fat_buf_release+0x11e>
return RC_OK;
sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) &&
53aa4: 4281 clrl %d1 53aa6: 322a 0014 movew %a2@(20),%d1 53aaa: 202a 0072 movel %a2@(114),%d0 53aae: b280 cmpl %d0,%d1 53ab0: 6200 00ca bhiw 53b7c <fat_buf_release+0xec>
*buf = fs_info->c.buf;
return RC_OK;
}
int
fat_buf_release(fat_fs_info_t *fs_info)
53ab4: b0aa 001a cmpl %a2@(26),%d0 53ab8: 55c2 scs %d2 53aba: 4482 negl %d2
return RC_OK;
sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) &&
(fs_info->c.blk_num < fs_info->vol.rdir_loc));
if (fs_info->c.modified)
53abc: 4a2a 0076 tstb %a2@(118) 53ac0: 6700 00c4 beqw 53b86 <fat_buf_release+0xf6>
{
if (sec_of_fat && !fs_info->vol.mirror)
53ac4: 4a02 tstb %d2
53ac6: 6708 beqs 53ad0 <fat_buf_release+0x40>
53ac8: 4a2a 0042 tstb %a2@(66) 53acc: 6700 00ec beqw 53bba <fat_buf_release+0x12a>
memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps);
sc = rtems_bdbuf_release_modified(fs_info->c.buf);
53ad0: 2f2a 0078 movel %a2@(120),%sp@- 53ad4: 47f9 0005 215c lea 5215c <rtems_bdbuf_release_modified>,%a3 53ada: 4e93 jsr %a3@
if (sc != RTEMS_SUCCESSFUL)
53adc: 588f addql #4,%sp 53ade: 4a80 tstl %d0 53ae0: 6600 00b4 bnew 53b96 <fat_buf_release+0x106>
rtems_set_errno_and_return_minus_one(EIO);
fs_info->c.modified = 0;
53ae4: 4200 clrb %d0 53ae6: 1540 0076 moveb %d0,%a2@(118)
if (sec_of_fat && !fs_info->vol.mirror)
53aea: 4a02 tstb %d2
53aec: 677c beqs 53b6a <fat_buf_release+0xda>
53aee: 4a2a 0042 tstb %a2@(66)
53af2: 6676 bnes 53b6a <fat_buf_release+0xda> <== NEVER TAKEN
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
53af4: 4280 clrl %d0 53af6: 102a 0009 moveb %a2@(9),%d0 53afa: 7201 moveq #1,%d1 53afc: b280 cmpl %d0,%d1
53afe: 646a bccs 53b6a <fat_buf_release+0xda> <== NEVER TAKEN
53b00: 260e movel %fp,%d3 53b02: 5983 subql #4,%d3 53b04: 7001 moveq #1,%d0 53b06: 49f9 0005 1cf4 lea 51cf4 <rtems_bdbuf_get>,%a4
fs_info->c.blk_num +
fs_info->vol.fat_length * i,
&b);
if ( sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(ENOMEM);
memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps);
53b0c: 4bf9 0005 e2a0 lea 5e2a0 <memcpy>,%a5
if (sec_of_fat && !fs_info->vol.mirror)
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
53b12: 7401 moveq #1,%d2
{
sc = rtems_bdbuf_get(fs_info->vol.dev,
53b14: 2f03 movel %d3,%sp@-
fs_info->c.blk_num +
fs_info->vol.fat_length * i,
53b16: 41ea 0016 lea %a2@(22),%a0
if (sec_of_fat && !fs_info->vol.mirror)
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
53b1a: 5282 addql #1,%d2
{
sc = rtems_bdbuf_get(fs_info->vol.dev,
fs_info->c.blk_num +
fs_info->vol.fat_length * i,
53b1c: 4c10 0800 mulsl %a0@,%d0
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
{
sc = rtems_bdbuf_get(fs_info->vol.dev,
53b20: d0aa 0072 addl %a2@(114),%d0 53b24: 2f00 movel %d0,%sp@- 53b26: 2f2a 004e movel %a2@(78),%sp@- 53b2a: 2f2a 004a movel %a2@(74),%sp@- 53b2e: 4e94 jsr %a4@
fs_info->c.blk_num +
fs_info->vol.fat_length * i,
&b);
if ( sc != RTEMS_SUCCESSFUL)
53b30: 4fef 0010 lea %sp@(16),%sp 53b34: 4a80 tstl %d0 53b36: 6600 00a2 bnew 53bda <fat_buf_release+0x14a>
rtems_set_errno_and_return_minus_one(ENOMEM);
memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps);
53b3a: 4280 clrl %d0 53b3c: 3012 movew %a2@,%d0 53b3e: 206e fffc moveal %fp@(-4),%a0 53b42: 2f00 movel %d0,%sp@- 53b44: 2f2a 007c movel %a2@(124),%sp@- 53b48: 2f28 001e movel %a0@(30),%sp@- 53b4c: 4e95 jsr %a5@
sc = rtems_bdbuf_release_modified(b);
53b4e: 2f2e fffc movel %fp@(-4),%sp@- 53b52: 4e93 jsr %a3@
if ( sc != RTEMS_SUCCESSFUL)
53b54: 4fef 0010 lea %sp@(16),%sp 53b58: 4a80 tstl %d0
53b5a: 667e bnes 53bda <fat_buf_release+0x14a> <== NEVER TAKEN
if (sec_of_fat && !fs_info->vol.mirror)
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
53b5c: 4281 clrl %d1 53b5e: 122a 0009 moveb %a2@(9),%d1 53b62: 4280 clrl %d0 53b64: 1002 moveb %d2,%d0 53b66: b280 cmpl %d0,%d1
53b68: 62aa bhis 53b14 <fat_buf_release+0x84> <== NEVER TAKEN
sc = rtems_bdbuf_release(fs_info->c.buf);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
}
fs_info->c.state = FAT_CACHE_EMPTY;
return RC_OK;
53b6a: 4280 clrl %d0
{
sc = rtems_bdbuf_release(fs_info->c.buf);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
}
fs_info->c.state = FAT_CACHE_EMPTY;
53b6c: 4201 clrb %d1 53b6e: 1541 0077 moveb %d1,%a2@(119)
return RC_OK;
}
53b72: 4cee 3c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a5 53b78: 4e5e unlk %fp 53b7a: 4e75 rts
bool sec_of_fat;
if (fs_info->c.state == FAT_CACHE_EMPTY)
return RC_OK;
sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) &&
53b7c: 4202 clrb %d2 <== NOT EXECUTED
(fs_info->c.blk_num < fs_info->vol.rdir_loc));
if (fs_info->c.modified)
53b7e: 4a2a 0076 tstb %a2@(118) <== NOT EXECUTED 53b82: 6600 ff40 bnew 53ac4 <fat_buf_release+0x34> <== NOT EXECUTED
}
}
}
else
{
sc = rtems_bdbuf_release(fs_info->c.buf);
53b86: 2f2a 0078 movel %a2@(120),%sp@- 53b8a: 4eb9 0005 2090 jsr 52090 <rtems_bdbuf_release>
if (sc != RTEMS_SUCCESSFUL)
53b90: 588f addql #4,%sp 53b92: 4a80 tstl %d0
53b94: 67d4 beqs 53b6a <fat_buf_release+0xda> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(EIO);
53b96: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 53b9c: 7605 moveq #5,%d3 <== NOT EXECUTED 53b9e: 2040 moveal %d0,%a0 <== NOT EXECUTED 53ba0: 70ff moveq #-1,%d0 <== NOT EXECUTED 53ba2: 2083 movel %d3,%a0@ <== NOT EXECUTED
}
fs_info->c.state = FAT_CACHE_EMPTY;
return RC_OK;
}
53ba4: 4cee 3c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a5 <== NOT EXECUTED 53baa: 4e5e unlk %fp <== NOT EXECUTED 53bac: 4e75 rts <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
uint8_t i;
bool sec_of_fat;
if (fs_info->c.state == FAT_CACHE_EMPTY)
return RC_OK;
53bae: 4280 clrl %d0
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
}
fs_info->c.state = FAT_CACHE_EMPTY;
return RC_OK;
}
53bb0: 4cee 3c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a5 53bb6: 4e5e unlk %fp 53bb8: 4e75 rts
(fs_info->c.blk_num < fs_info->vol.rdir_loc));
if (fs_info->c.modified)
{
if (sec_of_fat && !fs_info->vol.mirror)
memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps);
53bba: 4280 clrl %d0 53bbc: 206a 0078 moveal %a2@(120),%a0 53bc0: 3012 movew %a2@,%d0 53bc2: 2f00 movel %d0,%sp@- 53bc4: 2f28 001e movel %a0@(30),%sp@- 53bc8: 2f2a 007c movel %a2@(124),%sp@- 53bcc: 4eb9 0005 e2a0 jsr 5e2a0 <memcpy> 53bd2: 4fef 000c lea %sp@(12),%sp 53bd6: 6000 fef8 braw 53ad0 <fat_buf_release+0x40>
if ( sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(ENOMEM);
memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps);
sc = rtems_bdbuf_release_modified(b);
if ( sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(ENOMEM);
53bda: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 53be0: 720c moveq #12,%d1 <== NOT EXECUTED 53be2: 2040 moveal %d0,%a0 <== NOT EXECUTED 53be4: 70ff moveq #-1,%d0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
}
fs_info->c.state = FAT_CACHE_EMPTY;
return RC_OK;
}
53be6: 4cee 3c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a5 <== NOT EXECUTED
if ( sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(ENOMEM);
memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps);
sc = rtems_bdbuf_release_modified(b);
if ( sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(ENOMEM);
53bec: 2081 movel %d1,%a0@ <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
}
fs_info->c.state = FAT_CACHE_EMPTY;
return RC_OK;
}
53bee: 4e5e unlk %fp <== NOT EXECUTED
00053d76 <fat_cluster_read>:
fat_cluster_read(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
void *buff
)
{
53d76: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 53d7a: 226e 0008 moveal %fp@(8),%a1 <== NOT EXECUTED 53d7e: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
53d82: 2069 0034 moveal %a1@(52),%a0 <== NOT EXECUTED
fat_cluster_read(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
void *buff
)
{
53d86: 2f02 movel %d2,%sp@- <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
53d88: 4a80 tstl %d0 <== NOT EXECUTED 53d8a: 660c bnes 53d98 <fat_cluster_read+0x22> <== NOT EXECUTED 53d8c: 4281 clrl %d1 <== NOT EXECUTED 53d8e: 1228 000a moveb %a0@(10),%d1 <== NOT EXECUTED 53d92: 7403 moveq #3,%d2 <== NOT EXECUTED 53d94: c282 andl %d2,%d1 <== NOT EXECUTED 53d96: 6636 bnes 53dce <fat_cluster_read+0x58> <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
53d98: 4281 clrl %d1 <== NOT EXECUTED 53d9a: 1228 0005 moveb %a0@(5),%d1 <== NOT EXECUTED 53d9e: 5580 subql #2,%d0 <== NOT EXECUTED
uint32_t fsec = 0;
fsec = fat_cluster_num_to_sector_num(mt_entry, cln);
return _fat_block_read(mt_entry, fsec, 0,
fs_info->vol.spc << fs_info->vol.sec_log2, buff);
53da0: 4282 clrl %d2 <== NOT EXECUTED 53da2: e3a8 lsll %d1,%d0 <== NOT EXECUTED 53da4: 4281 clrl %d1 <== NOT EXECUTED 53da6: d0a8 002c addl %a0@(44),%d0 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t fsec = 0;
fsec = fat_cluster_num_to_sector_num(mt_entry, cln);
return _fat_block_read(mt_entry, fsec, 0,
53daa: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
fs_info->vol.spc << fs_info->vol.sec_log2, buff);
53dae: 1428 0002 moveb %a0@(2),%d2 <== NOT EXECUTED 53db2: 1228 0004 moveb %a0@(4),%d1 <== NOT EXECUTED 53db6: e5a9 lsll %d2,%d1 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t fsec = 0;
fsec = fat_cluster_num_to_sector_num(mt_entry, cln);
return _fat_block_read(mt_entry, fsec, 0,
53db8: 2f01 movel %d1,%sp@- <== NOT EXECUTED 53dba: 42a7 clrl %sp@- <== NOT EXECUTED 53dbc: 2f00 movel %d0,%sp@- <== NOT EXECUTED 53dbe: 2f09 movel %a1,%sp@- <== NOT EXECUTED 53dc0: 4eb9 0005 3bf2 jsr 53bf2 <_fat_block_read> <== NOT EXECUTED
fs_info->vol.spc << fs_info->vol.sec_log2, buff);
}
53dc6: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 53dca: 4e5e unlk %fp <== NOT EXECUTED 53dcc: 4e75 rts <== NOT EXECUTED
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
return fs_info->vol.rdir_loc;
53dce: 2028 001a movel %a0@(26),%d0 <== NOT EXECUTED
uint32_t fsec = 0;
fsec = fat_cluster_num_to_sector_num(mt_entry, cln);
return _fat_block_read(mt_entry, fsec, 0,
fs_info->vol.spc << fs_info->vol.sec_log2, buff);
53dd2: 4281 clrl %d1 <== NOT EXECUTED 53dd4: 4282 clrl %d2 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t fsec = 0;
fsec = fat_cluster_num_to_sector_num(mt_entry, cln);
return _fat_block_read(mt_entry, fsec, 0,
53dd6: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
fs_info->vol.spc << fs_info->vol.sec_log2, buff);
53dda: 1428 0002 moveb %a0@(2),%d2 <== NOT EXECUTED 53dde: 1228 0004 moveb %a0@(4),%d1 <== NOT EXECUTED 53de2: e5a9 lsll %d2,%d1 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t fsec = 0;
fsec = fat_cluster_num_to_sector_num(mt_entry, cln);
return _fat_block_read(mt_entry, fsec, 0,
53de4: 2f01 movel %d1,%sp@- <== NOT EXECUTED 53de6: 42a7 clrl %sp@- <== NOT EXECUTED 53de8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 53dea: 2f09 movel %a1,%sp@- <== NOT EXECUTED 53dec: 4eb9 0005 3bf2 jsr 53bf2 <_fat_block_read> <== NOT EXECUTED
fs_info->vol.spc << fs_info->vol.sec_log2, buff);
}
53df2: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 53df6: 4e5e unlk %fp <== NOT EXECUTED
00053dfa <fat_cluster_write>:
fat_cluster_write(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
const void *buff
)
{
53dfa: 4e56 0000 linkw %fp,#0 53dfe: 226e 0008 moveal %fp@(8),%a1 53e02: 202e 000c movel %fp@(12),%d0
fat_fs_info_t *fs_info = mt_entry->fs_info;
53e06: 2069 0034 moveal %a1@(52),%a0
fat_cluster_write(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
const void *buff
)
{
53e0a: 2f02 movel %d2,%sp@-
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
53e0c: 4a80 tstl %d0
53e0e: 660c bnes 53e1c <fat_cluster_write+0x22> <== ALWAYS TAKEN
53e10: 4281 clrl %d1 <== NOT EXECUTED 53e12: 1228 000a moveb %a0@(10),%d1 <== NOT EXECUTED 53e16: 7403 moveq #3,%d2 <== NOT EXECUTED 53e18: c282 andl %d2,%d1 <== NOT EXECUTED 53e1a: 6636 bnes 53e52 <fat_cluster_write+0x58> <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
53e1c: 4281 clrl %d1 53e1e: 1228 0005 moveb %a0@(5),%d1 53e22: 5580 subql #2,%d0
uint32_t fsec = 0;
fsec = fat_cluster_num_to_sector_num(mt_entry, cln);
return _fat_block_write(mt_entry, fsec, 0,
fs_info->vol.spc << fs_info->vol.sec_log2, buff);
53e24: 4282 clrl %d2 53e26: e3a8 lsll %d1,%d0 53e28: 4281 clrl %d1 53e2a: d0a8 002c addl %a0@(44),%d0
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t fsec = 0;
fsec = fat_cluster_num_to_sector_num(mt_entry, cln);
return _fat_block_write(mt_entry, fsec, 0,
53e2e: 2f2e 0010 movel %fp@(16),%sp@-
fs_info->vol.spc << fs_info->vol.sec_log2, buff);
53e32: 1428 0002 moveb %a0@(2),%d2 53e36: 1228 0004 moveb %a0@(4),%d1 53e3a: e5a9 lsll %d2,%d1
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t fsec = 0;
fsec = fat_cluster_num_to_sector_num(mt_entry, cln);
return _fat_block_write(mt_entry, fsec, 0,
53e3c: 2f01 movel %d1,%sp@- 53e3e: 42a7 clrl %sp@- 53e40: 2f00 movel %d0,%sp@- 53e42: 2f09 movel %a1,%sp@- 53e44: 4eb9 0005 3c96 jsr 53c96 <_fat_block_write>
fs_info->vol.spc << fs_info->vol.sec_log2, buff);
}
53e4a: 242e fffc movel %fp@(-4),%d2 53e4e: 4e5e unlk %fp 53e50: 4e75 rts
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
return fs_info->vol.rdir_loc;
53e52: 2028 001a movel %a0@(26),%d0 <== NOT EXECUTED
uint32_t fsec = 0;
fsec = fat_cluster_num_to_sector_num(mt_entry, cln);
return _fat_block_write(mt_entry, fsec, 0,
fs_info->vol.spc << fs_info->vol.sec_log2, buff);
53e56: 4281 clrl %d1 <== NOT EXECUTED 53e58: 4282 clrl %d2 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t fsec = 0;
fsec = fat_cluster_num_to_sector_num(mt_entry, cln);
return _fat_block_write(mt_entry, fsec, 0,
53e5a: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
fs_info->vol.spc << fs_info->vol.sec_log2, buff);
53e5e: 1428 0002 moveb %a0@(2),%d2 <== NOT EXECUTED 53e62: 1228 0004 moveb %a0@(4),%d1 <== NOT EXECUTED 53e66: e5a9 lsll %d2,%d1 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t fsec = 0;
fsec = fat_cluster_num_to_sector_num(mt_entry, cln);
return _fat_block_write(mt_entry, fsec, 0,
53e68: 2f01 movel %d1,%sp@- <== NOT EXECUTED 53e6a: 42a7 clrl %sp@- <== NOT EXECUTED 53e6c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 53e6e: 2f09 movel %a1,%sp@- <== NOT EXECUTED 53e70: 4eb9 0005 3c96 jsr 53c96 <_fat_block_write> <== NOT EXECUTED
fs_info->vol.spc << fs_info->vol.sec_log2, buff);
}
53e76: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 53e7a: 4e5e unlk %fp <== NOT EXECUTED
00054084 <fat_fat32_update_fsinfo_sector>:
fat_fat32_update_fsinfo_sector(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t free_count,
uint32_t next_free
)
{
54084: 4e56 ffd4 linkw %fp,#-44 <== NOT EXECUTED 54088: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED
uint32_t value
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
5408c: 2200 movel %d0,%d1 <== NOT EXECUTED 5408e: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@ <== NOT EXECUTED 54092: 7418 moveq #24,%d2 <== NOT EXECUTED
uint32_t le_next_free = 0;
le_free_count = CT_LE_L(free_count);
le_next_free = CT_LE_L(next_free);
ret1 = _fat_block_write(mt_entry,
54094: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 54098: e4a9 lsrl %d2,%d1 <== NOT EXECUTED 5409a: 2041 moveal %d1,%a0 <== NOT EXECUTED 5409c: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 540a0: 7a18 moveq #24,%d5 <== NOT EXECUTED
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
540a2: 2200 movel %d0,%d1 <== NOT EXECUTED 540a4: 4878 01e8 pea 1e8 <DBL_MANT_DIG+0x1b3> <== NOT EXECUTED
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
540a8: 2800 movel %d0,%d4 <== NOT EXECUTED
byte2 = (value >> 8) & 0xff;
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
540aa: 7c18 moveq #24,%d6 <== NOT EXECUTED
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
540ac: e08c lsrl #8,%d4 <== NOT EXECUTED 540ae: 47f9 0005 3c96 lea 53c96 <_fat_block_write>,%a3 <== NOT EXECUTED
fat_fat32_update_fsinfo_sector(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t free_count,
uint32_t next_free
)
{
540b4: 242e 0010 movel %fp@(16),%d2 <== NOT EXECUTED
uint32_t value
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
540b8: 2e02 movel %d2,%d7 <== NOT EXECUTED 540ba: eaaf lsrl %d5,%d7 <== NOT EXECUTED
byte3 = (value >> 16) & 0xff;
540bc: 2602 movel %d2,%d3 <== NOT EXECUTED 540be: e08b lsrl #8,%d3 <== NOT EXECUTED
byte2 = (value >> 8) & 0xff;
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
540c0: eba9 lsll %d5,%d1 <== NOT EXECUTED 540c2: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
540c6: 2a00 movel %d0,%d5 <== NOT EXECUTED
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
540c8: 2002 movel %d2,%d0 <== NOT EXECUTED
ssize_t ret1 = 0, ret2 = 0;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
540ca: 286a 0034 moveal %a2@(52),%a4 <== NOT EXECUTED 540ce: eda8 lsll %d6,%d0 <== NOT EXECUTED
uint32_t le_next_free = 0;
le_free_count = CT_LE_L(free_count);
le_next_free = CT_LE_L(next_free);
ret1 = _fat_block_write(mt_entry,
540d0: 4286 clrl %d6 <== NOT EXECUTED 540d2: 3c2c 0038 movew %a4@(56),%d6 <== NOT EXECUTED
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
540d6: e18d lsll #8,%d5 <== NOT EXECUTED 540d8: e18a lsll #8,%d2 <== NOT EXECUTED 540da: 2246 moveal %d6,%a1 <== NOT EXECUTED
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
540dc: 2c08 movel %a0,%d6 <== NOT EXECUTED 540de: 0282 00ff 0000 andil #16711680,%d2 <== NOT EXECUTED 540e4: 8286 orl %d6,%d1 <== NOT EXECUTED 540e6: 0285 00ff 0000 andil #16711680,%d5 <== NOT EXECUTED 540ec: 8087 orl %d7,%d0 <== NOT EXECUTED 540ee: 2f09 movel %a1,%sp@- <== NOT EXECUTED 540f0: 8082 orl %d2,%d0 <== NOT EXECUTED 540f2: 2f0a movel %a2,%sp@- <== NOT EXECUTED 540f4: 8285 orl %d5,%d1 <== NOT EXECUTED 540f6: 0284 0000 ff00 andil #65280,%d4 <== NOT EXECUTED 540fc: 0283 0000 ff00 andil #65280,%d3 <== NOT EXECUTED 54102: 8284 orl %d4,%d1 <== NOT EXECUTED 54104: 8083 orl %d3,%d0 <== NOT EXECUTED 54106: 2d41 fff8 movel %d1,%fp@(-8) <== NOT EXECUTED 5410a: 2d40 fffc movel %d0,%fp@(-4) <== NOT EXECUTED 5410e: 4e93 jsr %a3@ <== NOT EXECUTED
fs_info->vol.info_sec,
FAT_FSINFO_FREE_CLUSTER_COUNT_OFFSET,
4,
(char *)(&le_free_count));
ret2 = _fat_block_write(mt_entry,
54110: 486e fffc pea %fp@(-4) <== NOT EXECUTED
uint32_t le_next_free = 0;
le_free_count = CT_LE_L(free_count);
le_next_free = CT_LE_L(next_free);
ret1 = _fat_block_write(mt_entry,
54114: 2400 movel %d0,%d2 <== NOT EXECUTED
fs_info->vol.info_sec,
FAT_FSINFO_FREE_CLUSTER_COUNT_OFFSET,
4,
(char *)(&le_free_count));
ret2 = _fat_block_write(mt_entry,
54116: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 5411a: 4280 clrl %d0 <== NOT EXECUTED 5411c: 4878 01ec pea 1ec <DBL_MANT_DIG+0x1b7> <== NOT EXECUTED 54120: 302c 0038 movew %a4@(56),%d0 <== NOT EXECUTED 54124: 2f00 movel %d0,%sp@- <== NOT EXECUTED 54126: 2f0a movel %a2,%sp@- <== NOT EXECUTED 54128: 4e93 jsr %a3@ <== NOT EXECUTED
fs_info->vol.info_sec,
FAT_FSINFO_NEXT_FREE_CLUSTER_OFFSET,
4,
(char *)(&le_next_free));
if ( (ret1 < 0) || (ret2 < 0) )
5412a: 4fef 0028 lea %sp@(40),%sp <== NOT EXECUTED 5412e: 4a82 tstl %d2 <== NOT EXECUTED 54130: 6d10 blts 54142 <fat_fat32_update_fsinfo_sector+0xbe><== NOT EXECUTED
return -1;
54132: 4a80 tstl %d0 <== NOT EXECUTED 54134: 5dc0 slt %d0 <== NOT EXECUTED
return RC_OK;
}
54136: 4cee 1cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a4 <== NOT EXECUTED 5413c: 4e5e unlk %fp <== NOT EXECUTED
FAT_FSINFO_NEXT_FREE_CLUSTER_OFFSET,
4,
(char *)(&le_next_free));
if ( (ret1 < 0) || (ret2 < 0) )
return -1;
5413e: 49c0 extbl %d0 <== NOT EXECUTED
return RC_OK;
}
54140: 4e75 rts <== NOT EXECUTED
FAT_FSINFO_NEXT_FREE_CLUSTER_OFFSET,
4,
(char *)(&le_next_free));
if ( (ret1 < 0) || (ret2 < 0) )
return -1;
54142: 70ff moveq #-1,%d0 <== NOT EXECUTED
return RC_OK;
}
54144: 4cee 1cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a4 <== NOT EXECUTED 5414a: 4e5e unlk %fp <== NOT EXECUTED
00052fc2 <fat_file_close>:
/*
* if links_num field of fat-file descriptor is greater than 1
* decrement the count of links and return
*/
if (fat_fd->links_num > 1)
52fc2: 7201 moveq #1,%d1
int
fat_file_close(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
52fc4: 4e56 fff4 linkw %fp,#-12 52fc8: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 52fcc: 266e 0008 moveal %fp@(8),%a3 52fd0: 246e 000c moveal %fp@(12),%a2
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
52fd4: 242b 0034 movel %a3@(52),%d2
/*
* if links_num field of fat-file descriptor is greater than 1
* decrement the count of links and return
*/
if (fat_fd->links_num > 1)
52fd8: 202a 0008 movel %a2@(8),%d0 52fdc: b280 cmpl %d0,%d1
52fde: 6412 bccs 52ff2 <fat_file_close+0x30>
{
fat_fd->links_num--;
52fe0: 5380 subql #1,%d0 52fe2: 2540 0008 movel %d0,%a2@(8)
return rc;
52fe6: 4280 clrl %d0
* flush any modified "cached" buffer back to disk
*/
rc = fat_buf_release(fs_info);
return rc;
}
52fe8: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 52fee: 4e5e unlk %fp 52ff0: 4e75 rts
return rc;
}
key = fat_construct_key(mt_entry, &fat_fd->dir_pos.sname);
if (fat_fd->flags & FAT_FILE_REMOVED)
52ff2: 4280 clrl %d0 52ff4: 102a 0030 moveb %a2@(48),%d0 52ff8: 0800 0000 btst #0,%d0
52ffc: 674c beqs 5304a <fat_file_close+0x88> <== ALWAYS TAKEN
{
rc = fat_file_truncate(mt_entry, fat_fd, 0);
52ffe: 42a7 clrl %sp@- <== NOT EXECUTED 53000: 2f0a movel %a2,%sp@- <== NOT EXECUTED 53002: 2f0b movel %a3,%sp@- <== NOT EXECUTED 53004: 4eb9 0005 2ec6 jsr 52ec6 <fat_file_truncate> <== NOT EXECUTED
if ( rc != RC_OK )
5300a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5300e: 4a80 tstl %d0 <== NOT EXECUTED 53010: 66d6 bnes 52fe8 <fat_file_close+0x26> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
53012: 2f0a movel %a2,%sp@- <== NOT EXECUTED 53014: 4eb9 0004 bb78 jsr 4bb78 <_Chain_Extract> <== NOT EXECUTED
return rc;
_hash_delete(fs_info->rhash, key, fat_fd->ino, fat_fd);
if ( fat_ino_is_unique(mt_entry, fat_fd->ino) )
5301a: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED 5301e: 2f0b movel %a3,%sp@- <== NOT EXECUTED 53020: 4eb9 0005 4068 jsr 54068 <fat_ino_is_unique> <== NOT EXECUTED 53026: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5302a: 4a00 tstb %d0 <== NOT EXECUTED 5302c: 6668 bnes 53096 <fat_file_close+0xd4> <== NOT EXECUTED
fat_free_unique_ino(mt_entry, fat_fd->ino);
free(fat_fd);
5302e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 53030: 4eb9 0004 680c jsr 4680c <free> <== NOT EXECUTED 53036: 588f addql #4,%sp <== NOT EXECUTED
}
}
/*
* flush any modified "cached" buffer back to disk
*/
rc = fat_buf_release(fs_info);
53038: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED
return rc;
}
5303c: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 53042: 4e5e unlk %fp <== NOT EXECUTED
}
}
/*
* flush any modified "cached" buffer back to disk
*/
rc = fat_buf_release(fs_info);
53044: 4ef9 0005 3a90 jmp 53a90 <fat_buf_release> <== NOT EXECUTED
free(fat_fd);
}
else
{
if (fat_ino_is_unique(mt_entry, fat_fd->ino))
5304a: 2f2a 000c movel %a2@(12),%sp@- 5304e: 2f0b movel %a3,%sp@- 53050: 4eb9 0005 4068 jsr 54068 <fat_ino_is_unique> 53056: 508f addql #8,%sp 53058: 4a00 tstb %d0
5305a: 6716 beqs 53072 <fat_file_close+0xb0> <== ALWAYS TAKEN
{
fat_fd->links_num = 0;
5305c: 42aa 0008 clrl %a2@(8) <== NOT EXECUTED
}
}
/*
* flush any modified "cached" buffer back to disk
*/
rc = fat_buf_release(fs_info);
53060: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED
return rc;
}
53064: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 5306a: 4e5e unlk %fp <== NOT EXECUTED
}
}
/*
* flush any modified "cached" buffer back to disk
*/
rc = fat_buf_release(fs_info);
5306c: 4ef9 0005 3a90 jmp 53a90 <fat_buf_release> <== NOT EXECUTED
53072: 2f0a movel %a2,%sp@- 53074: 4eb9 0004 bb78 jsr 4bb78 <_Chain_Extract>
fat_fd->links_num = 0;
}
else
{
_hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd);
free(fat_fd);
5307a: 2f0a movel %a2,%sp@- 5307c: 4eb9 0004 680c jsr 4680c <free> 53082: 508f addql #8,%sp
}
}
/*
* flush any modified "cached" buffer back to disk
*/
rc = fat_buf_release(fs_info);
53084: 2d42 0008 movel %d2,%fp@(8)
return rc;
}
53088: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 5308e: 4e5e unlk %fp
}
}
/*
* flush any modified "cached" buffer back to disk
*/
rc = fat_buf_release(fs_info);
53090: 4ef9 0005 3a90 jmp 53a90 <fat_buf_release>
return rc;
_hash_delete(fs_info->rhash, key, fat_fd->ino, fat_fd);
if ( fat_ino_is_unique(mt_entry, fat_fd->ino) )
fat_free_unique_ino(mt_entry, fat_fd->ino);
53096: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED 5309a: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5309c: 4eb9 0005 4032 jsr 54032 <fat_free_unique_ino> <== NOT EXECUTED 530a2: 508f addql #8,%sp <== NOT EXECUTED
free(fat_fd);
530a4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 530a6: 4eb9 0004 680c jsr 4680c <free> <== NOT EXECUTED 530ac: 588f addql #4,%sp <== NOT EXECUTED 530ae: 6088 bras 53038 <fat_file_close+0x76> <== NOT EXECUTED
000536b0 <fat_file_datasync>:
int
fat_file_datasync(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
536b0: 4e56 ffd0 linkw %fp,#-48 <== NOT EXECUTED 536b4: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 536b8: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED 536bc: 2a2e 0008 movel %fp@(8),%d5 <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_fs_info_t *fs_info = mt_entry->fs_info;
536c0: 2245 moveal %d5,%a1 <== NOT EXECUTED
uint32_t cur_cln = fat_fd->cln;
536c2: 2d68 001c fff8 movel %a0@(28),%fp@(-8) <== NOT EXECUTED
fat_file_fd_t *fat_fd
)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_fs_info_t *fs_info = mt_entry->fs_info;
536c8: 2669 0034 moveal %a1@(52),%a3 <== NOT EXECUTED
uint32_t cur_cln = fat_fd->cln;
rtems_bdbuf_buffer *block = NULL;
536cc: 42ae fffc clrl %fp@(-4) <== NOT EXECUTED
uint32_t sec = 0;
uint32_t i = 0;
if (fat_fd->fat_file_size == 0)
536d0: 4aa8 0018 tstl %a0@(24) <== NOT EXECUTED 536d4: 660e bnes 536e4 <fat_file_datasync+0x34> <== NOT EXECUTED
return RC_OK;
536d6: 4284 clrl %d4 <== NOT EXECUTED
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
if ( rc != RC_OK )
return rc;
}
return rc;
}
536d8: 2004 movel %d4,%d0 <== NOT EXECUTED 536da: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 536e0: 4e5e unlk %fp <== NOT EXECUTED 536e2: 4e75 rts <== NOT EXECUTED
/*
* we can use only one bdbuf :( and we also know that cache is useless
* for sync operation, so don't use it
*/
rc = fat_buf_release(fs_info);
536e4: 2f0b movel %a3,%sp@- <== NOT EXECUTED 536e6: 4eb9 0005 3a90 jsr 53a90 <fat_buf_release> <== NOT EXECUTED
if (rc != RC_OK)
536ec: 588f addql #4,%sp <== NOT EXECUTED
/*
* we can use only one bdbuf :( and we also know that cache is useless
* for sync operation, so don't use it
*/
rc = fat_buf_release(fs_info);
536ee: 2800 movel %d0,%d4 <== NOT EXECUTED
if (rc != RC_OK)
536f0: 66e6 bnes 536d8 <fat_file_datasync+0x28> <== NOT EXECUTED 536f2: 240e movel %fp,%d2 <== NOT EXECUTED 536f4: 5982 subql #4,%d2 <== NOT EXECUTED 536f6: 4bf9 0005 1de8 lea 51de8 <rtems_bdbuf_read>,%a5 <== NOT EXECUTED
/* ... sync it */
sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one( EIO );
sc = rtems_bdbuf_sync(block);
536fc: 263c 0005 21da movel #336346,%d3 <== NOT EXECUTED
if ( sc != RTEMS_SUCCESSFUL )
rtems_set_errno_and_return_minus_one( EIO );
}
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
53702: 2c3c 0005 b828 movel #374824,%d6 <== NOT EXECUTED
rc = fat_buf_release(fs_info);
if (rc != RC_OK)
return rc;
/* for each cluster of the file ... */
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
53708: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED 5370c: 2200 movel %d0,%d1 <== NOT EXECUTED 5370e: c2ab 000c andl %a3@(12),%d1 <== NOT EXECUTED 53712: b2ab 0010 cmpl %a3@(16),%d1 <== NOT EXECUTED 53716: 64c0 bccs 536d8 <fat_file_datasync+0x28> <== NOT EXECUTED
fat_fd->map.disk_cln = cur_cln;
*disk_cln = cur_cln;
}
return RC_OK;
}
53718: 2245 moveal %d5,%a1 <== NOT EXECUTED 5371a: 2069 0034 moveal %a1@(52),%a0 <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
5371e: 4a80 tstl %d0 <== NOT EXECUTED 53720: 6670 bnes 53792 <fat_file_datasync+0xe2> <== NOT EXECUTED 53722: 4281 clrl %d1 <== NOT EXECUTED 53724: 1228 000a moveb %a0@(10),%d1 <== NOT EXECUTED 53728: 7e03 moveq #3,%d7 <== NOT EXECUTED 5372a: c287 andl %d7,%d1 <== NOT EXECUTED 5372c: 6764 beqs 53792 <fat_file_datasync+0xe2> <== NOT EXECUTED
return fs_info->vol.rdir_loc;
5372e: 2868 001a moveal %a0@(26),%a4 <== NOT EXECUTED
/* for each cluster of the file ... */
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
{
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
/* for each sector in cluster ... */
for ( i = 0; i < fs_info->vol.spc; i++ )
53732: 4a2b 0004 tstb %a3@(4) <== NOT EXECUTED 53736: 6738 beqs 53770 <fat_file_datasync+0xc0> <== NOT EXECUTED 53738: 95ca subal %a2,%a2 <== NOT EXECUTED
{
/* ... sync it */
sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block);
5373a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5373c: 4872 c800 pea %a2@(00000000,%a4:l) <== NOT EXECUTED
/* for each cluster of the file ... */
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
{
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
/* for each sector in cluster ... */
for ( i = 0; i < fs_info->vol.spc; i++ )
53740: 528a addql #1,%a2 <== NOT EXECUTED
{
/* ... sync it */
sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block);
53742: 2f2b 004e movel %a3@(78),%sp@- <== NOT EXECUTED 53746: 2f2b 004a movel %a3@(74),%sp@- <== NOT EXECUTED 5374a: 4e95 jsr %a5@ <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
5374c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 53750: 4a80 tstl %d0 <== NOT EXECUTED 53752: 6654 bnes 537a8 <fat_file_datasync+0xf8> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
sc = rtems_bdbuf_sync(block);
53754: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 53758: 2243 moveal %d3,%a1 <== NOT EXECUTED 5375a: 4e91 jsr %a1@ <== NOT EXECUTED
if ( sc != RTEMS_SUCCESSFUL )
5375c: 588f addql #4,%sp <== NOT EXECUTED 5375e: 4a80 tstl %d0 <== NOT EXECUTED 53760: 6646 bnes 537a8 <fat_file_datasync+0xf8> <== NOT EXECUTED
/* for each cluster of the file ... */
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
{
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
/* for each sector in cluster ... */
for ( i = 0; i < fs_info->vol.spc; i++ )
53762: 4280 clrl %d0 <== NOT EXECUTED 53764: 102b 0004 moveb %a3@(4),%d0 <== NOT EXECUTED 53768: b5c0 cmpal %d0,%a2 <== NOT EXECUTED 5376a: 65ce bcss 5373a <fat_file_datasync+0x8a> <== NOT EXECUTED 5376c: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED
sc = rtems_bdbuf_sync(block);
if ( sc != RTEMS_SUCCESSFUL )
rtems_set_errno_and_return_minus_one( EIO );
}
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
53770: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 53774: 2246 moveal %d6,%a1 <== NOT EXECUTED 53776: 2f00 movel %d0,%sp@- <== NOT EXECUTED 53778: 2f05 movel %d5,%sp@- <== NOT EXECUTED 5377a: 4e91 jsr %a1@ <== NOT EXECUTED
if ( rc != RC_OK )
5377c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 53780: 4a80 tstl %d0 <== NOT EXECUTED 53782: 6784 beqs 53708 <fat_file_datasync+0x58> <== NOT EXECUTED
sc = rtems_bdbuf_sync(block);
if ( sc != RTEMS_SUCCESSFUL )
rtems_set_errno_and_return_minus_one( EIO );
}
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
53784: 2800 movel %d0,%d4 <== NOT EXECUTED
if ( rc != RC_OK )
return rc;
}
return rc;
}
53786: 2004 movel %d4,%d0 <== NOT EXECUTED 53788: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5378e: 4e5e unlk %fp <== NOT EXECUTED 53790: 4e75 rts <== NOT EXECUTED
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
53792: 4281 clrl %d1 <== NOT EXECUTED 53794: 2840 moveal %d0,%a4 <== NOT EXECUTED 53796: 1228 0005 moveb %a0@(5),%d1 <== NOT EXECUTED 5379a: 558c subql #2,%a4 <== NOT EXECUTED 5379c: 2e0c movel %a4,%d7 <== NOT EXECUTED 5379e: e3af lsll %d1,%d7 <== NOT EXECUTED 537a0: 2847 moveal %d7,%a4 <== NOT EXECUTED 537a2: d9e8 002c addal %a0@(44),%a4 <== NOT EXECUTED 537a6: 608a bras 53732 <fat_file_datasync+0x82> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one( EIO );
sc = rtems_bdbuf_sync(block);
if ( sc != RTEMS_SUCCESSFUL )
rtems_set_errno_and_return_minus_one( EIO );
537a8: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 537ae: 78ff moveq #-1,%d4 <== NOT EXECUTED 537b0: 7a05 moveq #5,%d5 <== NOT EXECUTED 537b2: 2040 moveal %d0,%a0 <== NOT EXECUTED
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
if ( rc != RC_OK )
return rc;
}
return rc;
}
537b4: 2004 movel %d4,%d0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one( EIO );
sc = rtems_bdbuf_sync(block);
if ( sc != RTEMS_SUCCESSFUL )
rtems_set_errno_and_return_minus_one( EIO );
537b6: 2085 movel %d5,%a0@ <== NOT EXECUTED
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
if ( rc != RC_OK )
return rc;
}
return rc;
}
537b8: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 537be: 4e5e unlk %fp <== NOT EXECUTED
00053162 <fat_file_extend>:
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd,
uint32_t new_length,
uint32_t *a_length
)
{
53162: 4e56 ffcc linkw %fp,#-52 53166: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 5316a: 266e 0008 moveal %fp@(8),%a3 5316e: 242e 0010 movel %fp@(16),%d2 53172: 2a6e 0014 moveal %fp@(20),%a5
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
53176: 286b 0034 moveal %a3@(52),%a4
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd,
uint32_t new_length,
uint32_t *a_length
)
{
5317a: 246e 000c moveal %fp@(12),%a2
uint32_t old_last_cl;
uint32_t last_cl = 0;
uint32_t bytes_remain = 0;
uint32_t cls_added;
*a_length = new_length;
5317e: 2a82 movel %d2,%a5@
if (new_length <= fat_fd->fat_file_size)
53180: 202a 0018 movel %a2@(24),%d0
uint32_t *a_length
)
{
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t chain = 0;
53184: 42ae fff0 clrl %fp@(-16)
uint32_t bytes2add = 0;
uint32_t cls2add = 0;
uint32_t old_last_cl;
uint32_t last_cl = 0;
53188: 42ae fff8 clrl %fp@(-8)
uint32_t bytes_remain = 0;
uint32_t cls_added;
*a_length = new_length;
if (new_length <= fat_fd->fat_file_size)
5318c: b082 cmpl %d2,%d0 5318e: 6400 00c4 bccw 53254 <fat_file_extend+0xf2>
return RC_OK;
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
53192: 7201 moveq #1,%d1 53194: b2aa 0020 cmpl %a2@(32),%d1 53198: 6700 00c8 beqw 53262 <fat_file_extend+0x100>
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
rtems_set_errno_and_return_minus_one( ENOSPC );
bytes_remain = (fs_info->vol.bpc -
(fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) &
5319c: 4283 clrl %d3
(fs_info->vol.bpc - 1);
bytes2add = new_length - fat_fd->fat_file_size;
5319e: 2a02 movel %d2,%d5 531a0: 9a80 subl %d0,%d5
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
rtems_set_errno_and_return_minus_one( ENOSPC );
bytes_remain = (fs_info->vol.bpc -
(fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) &
531a2: 362c 0006 movew %a4@(6),%d3 531a6: 2203 movel %d3,%d1 531a8: 5381 subql #1,%d1 531aa: c081 andl %d1,%d0
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
rtems_set_errno_and_return_minus_one( ENOSPC );
bytes_remain = (fs_info->vol.bpc -
531ac: 9680 subl %d0,%d3 531ae: c681 andl %d1,%d3
(fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) &
(fs_info->vol.bpc - 1);
bytes2add = new_length - fat_fd->fat_file_size;
if (bytes2add > bytes_remain)
531b0: ba83 cmpl %d3,%d5 531b2: 6300 00a0 blsw 53254 <fat_file_extend+0xf2>
bytes2add -= bytes_remain;
531b6: 9a83 subl %d3,%d5
/*
* if in last cluster allocated for the file there is enough room to
* handle extention (hence we don't need to add even one cluster to the
* file ) - return
*/
if (bytes2add == 0)
531b8: 6700 009a beqw 53254 <fat_file_extend+0xf2>
return RC_OK;
cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1;
531bc: 4280 clrl %d0 531be: 102c 0008 moveb %a4@(8),%d0 531c2: 2c05 movel %d5,%d6
rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add,
531c4: 486e fff8 pea %fp@(-8)
* file ) - return
*/
if (bytes2add == 0)
return RC_OK;
cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1;
531c8: 5386 subql #1,%d6
rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add,
531ca: 486e fffc pea %fp@(-4)
* file ) - return
*/
if (bytes2add == 0)
return RC_OK;
cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1;
531ce: e0ae lsrl %d0,%d6 531d0: 5286 addql #1,%d6
rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add,
531d2: 2f06 movel %d6,%sp@- 531d4: 486e fff0 pea %fp@(-16) 531d8: 2f0b movel %a3,%sp@- 531da: 4eb9 0005 bd46 jsr 5bd46 <fat_scan_fat_for_free_clusters>
&cls_added, &last_cl);
/* this means that low level I/O error occured */
if (rc != RC_OK)
531e0: 4fef 0014 lea %sp@(20),%sp
if (bytes2add == 0)
return RC_OK;
cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1;
rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add,
531e4: 2800 movel %d0,%d4
&cls_added, &last_cl);
/* this means that low level I/O error occured */
if (rc != RC_OK)
531e6: 6660 bnes 53248 <fat_file_extend+0xe6> <== NEVER TAKEN
return rc;
/* this means that no space left on device */
if ((cls_added == 0) && (bytes_remain == 0))
531e8: 202e fffc movel %fp@(-4),%d0
531ec: 6606 bnes 531f4 <fat_file_extend+0x92> <== ALWAYS TAKEN
531ee: 4a83 tstl %d3 <== NOT EXECUTED 531f0: 6700 0086 beqw 53278 <fat_file_extend+0x116> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOSPC);
/* check wether we satisfied request for 'cls2add' clusters */
if (cls2add != cls_added)
531f4: b086 cmpl %d6,%d0
531f6: 6720 beqs 53218 <fat_file_extend+0xb6> <== ALWAYS TAKEN
*a_length = new_length -
((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) -
531f8: 2200 movel %d0,%d1 <== NOT EXECUTED 531fa: 4681 notl %d1 <== NOT EXECUTED 531fc: dc81 addl %d1,%d6 <== NOT EXECUTED
(bytes2add & (fs_info->vol.bpc - 1));
531fe: 4281 clrl %d1 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOSPC);
/* check wether we satisfied request for 'cls2add' clusters */
if (cls2add != cls_added)
*a_length = new_length -
((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) -
53200: 4283 clrl %d3 <== NOT EXECUTED 53202: 162c 0008 moveb %a4@(8),%d3 <== NOT EXECUTED
(bytes2add & (fs_info->vol.bpc - 1));
53206: 322c 0006 movew %a4@(6),%d1 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOSPC);
/* check wether we satisfied request for 'cls2add' clusters */
if (cls2add != cls_added)
*a_length = new_length -
((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) -
5320a: e7ae lsll %d3,%d6 <== NOT EXECUTED
(bytes2add & (fs_info->vol.bpc - 1));
5320c: 5381 subql #1,%d1 <== NOT EXECUTED 5320e: ca81 andl %d1,%d5 <== NOT EXECUTED
if ((cls_added == 0) && (bytes_remain == 0))
rtems_set_errno_and_return_minus_one(ENOSPC);
/* check wether we satisfied request for 'cls2add' clusters */
if (cls2add != cls_added)
*a_length = new_length -
53210: 2202 movel %d2,%d1 <== NOT EXECUTED 53212: 9286 subl %d6,%d1 <== NOT EXECUTED
((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) -
53214: 9285 subl %d5,%d1 <== NOT EXECUTED 53216: 2a81 movel %d1,%a5@ <== NOT EXECUTED
(bytes2add & (fs_info->vol.bpc - 1));
/* add new chain to the end of existed */
if ( fat_fd->fat_file_size == 0 )
53218: 206a 0018 moveal %a2@(24),%a0 5321c: 4a88 tstl %a0
5321e: 6672 bnes 53292 <fat_file_extend+0x130>
{
fat_fd->map.disk_cln = fat_fd->cln = chain;
53220: 222e fff0 movel %fp@(-16),%d1
fat_fd->map.file_cln = 0;
53224: 42aa 0032 clrl %a2@(50)
(bytes2add & (fs_info->vol.bpc - 1));
/* add new chain to the end of existed */
if ( fat_fd->fat_file_size == 0 )
{
fat_fd->map.disk_cln = fat_fd->cln = chain;
53228: 2541 001c movel %d1,%a2@(28) 5322c: 2541 0036 movel %d1,%a2@(54)
}
fat_buf_release(fs_info);
}
/* update number of the last cluster of the file if it changed */
if (cls_added != 0)
53230: 4a80 tstl %d0
53232: 6710 beqs 53244 <fat_file_extend+0xe2> <== NEVER TAKEN
{
fat_fd->map.last_cln = last_cl;
if (fat_fd->fat_file_type == FAT_DIRECTORY)
53234: 7601 moveq #1,%d3
}
/* update number of the last cluster of the file if it changed */
if (cls_added != 0)
{
fat_fd->map.last_cln = last_cl;
53236: 256e fff8 003a movel %fp@(-8),%a2@(58)
if (fat_fd->fat_file_type == FAT_DIRECTORY)
5323c: b6aa 0010 cmpl %a2@(16),%d3 53240: 6700 0086 beqw 532c8 <fat_file_extend+0x166>
return rc;
}
}
}
fat_fd->fat_file_size = new_length;
53244: 2542 0018 movel %d2,%a2@(24)
return RC_OK;
}
53248: 2004 movel %d4,%d0 5324a: 4cee 3c7c ffcc moveml %fp@(-52),%d2-%d6/%a2-%a5 53250: 4e5e unlk %fp 53252: 4e75 rts
* if in last cluster allocated for the file there is enough room to
* handle extention (hence we don't need to add even one cluster to the
* file ) - return
*/
if (bytes2add == 0)
return RC_OK;
53254: 4284 clrl %d4
}
fat_fd->fat_file_size = new_length;
return RC_OK;
}
53256: 2004 movel %d4,%d0 53258: 4cee 3c7c ffcc moveml %fp@(-52),%d2-%d6/%a2-%a5 5325e: 4e5e unlk %fp 53260: 4e75 rts
*a_length = new_length;
if (new_length <= fat_fd->fat_file_size)
return RC_OK;
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
53262: 4aaa 0024 tstl %a2@(36) <== NOT EXECUTED 53266: 6600 ff34 bnew 5319c <fat_file_extend+0x3a> <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
5326a: 4281 clrl %d1 <== NOT EXECUTED 5326c: 122c 000a moveb %a4@(10),%d1 <== NOT EXECUTED 53270: 7603 moveq #3,%d3 <== NOT EXECUTED 53272: c283 andl %d3,%d1 <== NOT EXECUTED
*a_length = new_length;
if (new_length <= fat_fd->fat_file_size)
return RC_OK;
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
53274: 6700 ff26 beqw 5319c <fat_file_extend+0x3a> <== NOT EXECUTED
if (rc != RC_OK)
return rc;
/* this means that no space left on device */
if ((cls_added == 0) && (bytes_remain == 0))
rtems_set_errno_and_return_minus_one(ENOSPC);
53278: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 5327e: 78ff moveq #-1,%d4 <== NOT EXECUTED 53280: 761c moveq #28,%d3 <== NOT EXECUTED 53282: 2040 moveal %d0,%a0 <== NOT EXECUTED
}
fat_fd->fat_file_size = new_length;
return RC_OK;
}
53284: 2004 movel %d4,%d0 <== NOT EXECUTED
if (rc != RC_OK)
return rc;
/* this means that no space left on device */
if ((cls_added == 0) && (bytes_remain == 0))
rtems_set_errno_and_return_minus_one(ENOSPC);
53286: 2083 movel %d3,%a0@ <== NOT EXECUTED
}
fat_fd->fat_file_size = new_length;
return RC_OK;
}
53288: 4cee 3c7c ffcc moveml %fp@(-52),%d2-%d6/%a2-%a5 <== NOT EXECUTED 5328e: 4e5e unlk %fp <== NOT EXECUTED 53290: 4e75 rts <== NOT EXECUTED
fat_fd->map.disk_cln = fat_fd->cln = chain;
fat_fd->map.file_cln = 0;
}
else
{
if (fat_fd->map.last_cln != FAT_UNDEFINED_VALUE)
53292: 202a 003a movel %a2@(58),%d0 53296: 72ff moveq #-1,%d1 53298: b280 cmpl %d0,%d1
5329a: 675c beqs 532f8 <fat_file_extend+0x196> <== NEVER TAKEN
fat_free_fat_clusters_chain(mt_entry, chain);
return rc;
}
}
rc = fat_set_fat_cluster(mt_entry, old_last_cl, chain);
5329c: 2f2e fff0 movel %fp@(-16),%sp@- 532a0: 2f00 movel %d0,%sp@-
}
else
{
if (fat_fd->map.last_cln != FAT_UNDEFINED_VALUE)
{
old_last_cl = fat_fd->map.last_cln;
532a2: 2d40 fff4 movel %d0,%fp@(-12)
fat_free_fat_clusters_chain(mt_entry, chain);
return rc;
}
}
rc = fat_set_fat_cluster(mt_entry, old_last_cl, chain);
532a6: 2f0b movel %a3,%sp@- 532a8: 4eb9 0005 b9da jsr 5b9da <fat_set_fat_cluster>
if ( rc != RC_OK )
532ae: 4fef 000c lea %sp@(12),%sp 532b2: 4a80 tstl %d0
532b4: 6626 bnes 532dc <fat_file_extend+0x17a> <== NEVER TAKEN
{
fat_free_fat_clusters_chain(mt_entry, chain);
return rc;
}
fat_buf_release(fs_info);
532b6: 2f0c movel %a4,%sp@- 532b8: 4eb9 0005 3a90 jsr 53a90 <fat_buf_release> 532be: 202e fffc movel %fp@(-4),%d0 532c2: 588f addql #4,%sp 532c4: 6000 ff6a braw 53230 <fat_file_extend+0xce>
if (cls_added != 0)
{
fat_fd->map.last_cln = last_cl;
if (fat_fd->fat_file_type == FAT_DIRECTORY)
{
rc = fat_init_clusters_chain(mt_entry, chain);
532c8: 2f2e fff0 movel %fp@(-16),%sp@- 532cc: 2f0b movel %a3,%sp@- 532ce: 4eb9 0005 3e7e jsr 53e7e <fat_init_clusters_chain>
if ( rc != RC_OK )
532d4: 508f addql #8,%sp 532d6: 4a80 tstl %d0 532d8: 6700 ff6a beqw 53244 <fat_file_extend+0xe2>
{
fat_free_fat_clusters_chain(mt_entry, chain);
532dc: 2f2e fff0 movel %fp@(-16),%sp@- <== NOT EXECUTED
return rc;
532e0: 2800 movel %d0,%d4 <== NOT EXECUTED
if (fat_fd->fat_file_type == FAT_DIRECTORY)
{
rc = fat_init_clusters_chain(mt_entry, chain);
if ( rc != RC_OK )
{
fat_free_fat_clusters_chain(mt_entry, chain);
532e2: 2f0b movel %a3,%sp@- <== NOT EXECUTED 532e4: 4eb9 0005 bc70 jsr 5bc70 <fat_free_fat_clusters_chain> <== NOT EXECUTED
return rc;
532ea: 508f addql #8,%sp <== NOT EXECUTED
}
fat_fd->fat_file_size = new_length;
return RC_OK;
}
532ec: 2004 movel %d4,%d0 <== NOT EXECUTED 532ee: 4cee 3c7c ffcc moveml %fp@(-52),%d2-%d6/%a2-%a5 <== NOT EXECUTED 532f4: 4e5e unlk %fp <== NOT EXECUTED 532f6: 4e75 rts <== NOT EXECUTED
{
old_last_cl = fat_fd->map.last_cln;
}
else
{
rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM,
532f8: 486e fff4 pea %fp@(-12) <== NOT EXECUTED 532fc: 4868 ffff pea %a0@(-1) <== NOT EXECUTED 53300: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 53304: 2f0a movel %a2,%sp@- <== NOT EXECUTED 53306: 2f0b movel %a3,%sp@- <== NOT EXECUTED 53308: 4eb9 0005 30b0 jsr 530b0 <fat_file_ioctl> <== NOT EXECUTED
(fat_fd->fat_file_size - 1), &old_last_cl);
if ( rc != RC_OK )
5330e: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 53312: 4a80 tstl %d0 <== NOT EXECUTED 53314: 66c6 bnes 532dc <fat_file_extend+0x17a> <== NOT EXECUTED
fat_free_fat_clusters_chain(mt_entry, chain);
return rc;
}
}
rc = fat_set_fat_cluster(mt_entry, old_last_cl, chain);
53316: 2f2e fff0 movel %fp@(-16),%sp@- <== NOT EXECUTED
rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM,
(fat_fd->fat_file_size - 1), &old_last_cl);
if ( rc != RC_OK )
{
fat_free_fat_clusters_chain(mt_entry, chain);
return rc;
5331a: 202e fff4 movel %fp@(-12),%d0 <== NOT EXECUTED
}
}
rc = fat_set_fat_cluster(mt_entry, old_last_cl, chain);
5331e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 53320: 2f0b movel %a3,%sp@- <== NOT EXECUTED 53322: 4eb9 0005 b9da jsr 5b9da <fat_set_fat_cluster> <== NOT EXECUTED
if ( rc != RC_OK )
53328: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5332c: 4a80 tstl %d0 <== NOT EXECUTED 5332e: 6786 beqs 532b6 <fat_file_extend+0x154> <== NOT EXECUTED 53330: 60aa bras 532dc <fat_file_extend+0x17a> <== NOT EXECUTED
000530b0 <fat_file_ioctl>:
uint32_t *ret;
va_list ap;
va_start(ap, cmd);
switch (cmd)
530b0: 7001 moveq #1,%d0
fat_file_ioctl(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd,
int cmd,
...)
{
530b2: 4e56 fff0 linkw %fp,#-16 530b6: 226e 0008 moveal %fp@(8),%a1 530ba: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 530be: 206e 000c moveal %fp@(12),%a0
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
530c2: 2669 0034 moveal %a1@(52),%a3
uint32_t cur_cln = 0;
530c6: 42ae fffc clrl %fp@(-4)
uint32_t *ret;
va_list ap;
va_start(ap, cmd);
switch (cmd)
530ca: b0ae 0010 cmpl %fp@(16),%d0
530ce: 6718 beqs 530e8 <fat_file_ioctl+0x38> <== ALWAYS TAKEN
*ret = cur_cln;
break;
default:
errno = EINVAL;
530d0: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 530d6: 7216 moveq #22,%d1 <== NOT EXECUTED 530d8: 2040 moveal %d0,%a0 <== NOT EXECUTED
rc = -1;
530da: 70ff moveq #-1,%d0 <== NOT EXECUTED
*ret = cur_cln;
break;
default:
errno = EINVAL;
530dc: 2081 movel %d1,%a0@ <== NOT EXECUTED
rc = -1;
break;
}
va_end(ap);
return rc;
}
530de: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 <== NOT EXECUTED 530e4: 4e5e unlk %fp <== NOT EXECUTED 530e6: 4e75 rts <== NOT EXECUTED
va_start(ap, cmd);
switch (cmd)
{
case F_CLU_NUM:
pos = va_arg(ap, uint32_t);
530e8: 202e 0014 movel %fp@(20),%d0
ret = va_arg(ap, uint32_t *);
530ec: 246e 0018 moveal %fp@(24),%a2
/* sanity check */
if ( pos >= fat_fd->fat_file_size ) {
530f0: b0a8 0018 cmpl %a0@(24),%d0
530f4: 6454 bccs 5314a <fat_file_ioctl+0x9a> <== NEVER TAKEN
va_end(ap);
rtems_set_errno_and_return_minus_one( EIO );
}
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
530f6: 7201 moveq #1,%d1 530f8: b2a8 0020 cmpl %a0@(32),%d1
530fc: 672c beqs 5312a <fat_file_ioctl+0x7a>
break;
}
cl_start = pos >> fs_info->vol.bpc_log2;
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
530fe: 486e fffc pea %fp@(-4)
*ret = 0;
rc = RC_OK;
break;
}
cl_start = pos >> fs_info->vol.bpc_log2;
53102: 4281 clrl %d1 53104: 122b 0008 moveb %a3@(8),%d1 53108: e2a8 lsrl %d1,%d0
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
5310a: 2f00 movel %d0,%sp@- 5310c: 2f08 movel %a0,%sp@- 5310e: 2f09 movel %a1,%sp@- 53110: 4eba f802 jsr %pc@(52914 <fat_file_lseek>)
if ( rc != RC_OK )
53114: 4fef 0010 lea %sp@(16),%sp
break;
}
cl_start = pos >> fs_info->vol.bpc_log2;
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
53118: 2001 movel %d1,%d0
if ( rc != RC_OK )
5311a: 66c2 bnes 530de <fat_file_ioctl+0x2e> <== NEVER TAKEN
break;
*ret = cur_cln;
5311c: 24ae fffc movel %fp@(-4),%a2@
rc = -1;
break;
}
va_end(ap);
return rc;
}
53120: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 53126: 4e5e unlk %fp 53128: 4e75 rts
if ( pos >= fat_fd->fat_file_size ) {
va_end(ap);
rtems_set_errno_and_return_minus_one( EIO );
}
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
5312a: 4aa8 0024 tstl %a0@(36)
5312e: 66ce bnes 530fe <fat_file_ioctl+0x4e> <== NEVER TAKEN
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
53130: 4281 clrl %d1 53132: 122b 000a moveb %a3@(10),%d1 53136: 7403 moveq #3,%d2 53138: c282 andl %d2,%d1
if ( pos >= fat_fd->fat_file_size ) {
va_end(ap);
rtems_set_errno_and_return_minus_one( EIO );
}
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
5313a: 67c2 beqs 530fe <fat_file_ioctl+0x4e> <== NEVER TAKEN
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
/* cluster 0 (zero) reserved for root dir */
*ret = 0;
5313c: 4292 clrl %a2@
rc = RC_OK;
5313e: 4280 clrl %d0
rc = -1;
break;
}
va_end(ap);
return rc;
}
53140: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 53146: 4e5e unlk %fp 53148: 4e75 rts
ret = va_arg(ap, uint32_t *);
/* sanity check */
if ( pos >= fat_fd->fat_file_size ) {
va_end(ap);
rtems_set_errno_and_return_minus_one( EIO );
5314a: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 53150: 7405 moveq #5,%d2 <== NOT EXECUTED 53152: 2040 moveal %d0,%a0 <== NOT EXECUTED 53154: 70ff moveq #-1,%d0 <== NOT EXECUTED 53156: 2082 movel %d2,%a0@ <== NOT EXECUTED
rc = -1;
break;
}
va_end(ap);
return rc;
}
53158: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 <== NOT EXECUTED 5315e: 4e5e unlk %fp <== NOT EXECUTED
00052914 <fat_file_lseek>:
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd,
uint32_t file_cln,
uint32_t *disk_cln
)
{
52914: 4e56 ffdc linkw %fp,#-36 52918: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 5291c: 266e 000c moveal %fp@(12),%a3 52920: 282e 0008 movel %fp@(8),%d4 52924: 2c2e 0010 movel %fp@(16),%d6 52928: 286e 0014 moveal %fp@(20),%a4
int rc = RC_OK;
if (file_cln == fat_fd->map.file_cln)
5292c: 202b 0032 movel %a3@(50),%d0 52930: bc80 cmpl %d0,%d6
52932: 676c beqs 529a0 <fat_file_lseek+0x8c> <== ALWAYS TAKEN
{
uint32_t cur_cln;
uint32_t count;
uint32_t i;
if (file_cln > fat_fd->map.file_cln)
52934: 634e blss 52984 <fat_file_lseek+0x70> <== NOT EXECUTED
{
cur_cln = fat_fd->map.disk_cln;
52936: 206b 0036 moveal %a3@(54),%a0 <== NOT EXECUTED
count = file_cln - fat_fd->map.file_cln;
5293a: 2606 movel %d6,%d3 <== NOT EXECUTED 5293c: 9680 subl %d0,%d3 <== NOT EXECUTED
uint32_t count;
uint32_t i;
if (file_cln > fat_fd->map.file_cln)
{
cur_cln = fat_fd->map.disk_cln;
5293e: 2d48 fffc movel %a0,%fp@(-4) <== NOT EXECUTED
cur_cln = fat_fd->cln;
count = file_cln;
}
/* skip over the clusters */
for (i = 0; i < count; i++)
52942: 4a83 tstl %d3 <== NOT EXECUTED 52944: 6726 beqs 5296c <fat_file_lseek+0x58> <== NOT EXECUTED 52946: 2a0e movel %fp,%d5 <== NOT EXECUTED 52948: 4282 clrl %d2 <== NOT EXECUTED 5294a: 5985 subql #4,%d5 <== NOT EXECUTED 5294c: 45f9 0005 b828 lea 5b828 <fat_get_fat_cluster>,%a2 <== NOT EXECUTED
{
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
52952: 2f05 movel %d5,%sp@- <== NOT EXECUTED
cur_cln = fat_fd->cln;
count = file_cln;
}
/* skip over the clusters */
for (i = 0; i < count; i++)
52954: 5282 addql #1,%d2 <== NOT EXECUTED
{
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
52956: 2f08 movel %a0,%sp@- <== NOT EXECUTED 52958: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5295a: 4e92 jsr %a2@ <== NOT EXECUTED
if ( rc != RC_OK )
5295c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 52960: 4a80 tstl %d0 <== NOT EXECUTED 52962: 662c bnes 52990 <fat_file_lseek+0x7c> <== NOT EXECUTED
cur_cln = fat_fd->cln;
count = file_cln;
}
/* skip over the clusters */
for (i = 0; i < count; i++)
52964: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 52968: b682 cmpl %d2,%d3 <== NOT EXECUTED 5296a: 66e6 bnes 52952 <fat_file_lseek+0x3e> <== NOT EXECUTED
if ( rc != RC_OK )
return rc;
}
/* update cache */
fat_fd->map.file_cln = file_cln;
5296c: 2746 0032 movel %d6,%a3@(50) <== NOT EXECUTED
fat_fd->map.disk_cln = cur_cln;
52970: 2748 0036 movel %a0,%a3@(54) <== NOT EXECUTED
*disk_cln = cur_cln;
}
return RC_OK;
52974: 4280 clrl %d0 <== NOT EXECUTED 52976: 4281 clrl %d1 <== NOT EXECUTED
/* update cache */
fat_fd->map.file_cln = file_cln;
fat_fd->map.disk_cln = cur_cln;
*disk_cln = cur_cln;
52978: 2888 movel %a0,%a4@ <== NOT EXECUTED
}
return RC_OK;
}
5297a: 4cee 1c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a4 <== NOT EXECUTED 52980: 4e5e unlk %fp <== NOT EXECUTED 52982: 4e75 rts <== NOT EXECUTED
cur_cln = fat_fd->map.disk_cln;
count = file_cln - fat_fd->map.file_cln;
}
else
{
cur_cln = fat_fd->cln;
52984: 206b 001c moveal %a3@(28),%a0 <== NOT EXECUTED 52988: 2606 movel %d6,%d3 <== NOT EXECUTED 5298a: 2d48 fffc movel %a0,%fp@(-4) <== NOT EXECUTED 5298e: 60b2 bras 52942 <fat_file_lseek+0x2e> <== NOT EXECUTED
fat_fd->map.disk_cln = cur_cln;
*disk_cln = cur_cln;
}
return RC_OK;
}
52990: 4cee 1c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a4 <== NOT EXECUTED
/* skip over the clusters */
for (i = 0; i < count; i++)
{
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
if ( rc != RC_OK )
return rc;
52996: 2200 movel %d0,%d1 <== NOT EXECUTED 52998: 5bc0 smi %d0 <== NOT EXECUTED 5299a: 49c0 extbl %d0 <== NOT EXECUTED
fat_fd->map.disk_cln = cur_cln;
*disk_cln = cur_cln;
}
return RC_OK;
}
5299c: 4e5e unlk %fp <== NOT EXECUTED 5299e: 4e75 rts <== NOT EXECUTED
)
{
int rc = RC_OK;
if (file_cln == fat_fd->map.file_cln)
*disk_cln = fat_fd->map.disk_cln;
529a0: 28ab 0036 movel %a3@(54),%a4@
fat_fd->map.disk_cln = cur_cln;
*disk_cln = cur_cln;
}
return RC_OK;
}
529a4: 4cee 1c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a4
fat_fd->map.file_cln = file_cln;
fat_fd->map.disk_cln = cur_cln;
*disk_cln = cur_cln;
}
return RC_OK;
529aa: 4280 clrl %d0 529ac: 4281 clrl %d1
}
529ae: 4e5e unlk %fp <== NOT EXECUTED
000535ae <fat_file_mark_removed>:
uint32_t cln
)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
535ae: 7001 moveq #1,%d0 <== NOT EXECUTED
void
fat_file_mark_removed(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
535b0: 4e56 fff0 linkw %fp,#-16 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
535b4: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
void
fat_file_mark_removed(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
535b8: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ <== NOT EXECUTED 535bc: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
535c0: 2668 0034 moveal %a0@(52),%a3 <== NOT EXECUTED 535c4: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 535c8: b081 cmpl %d1,%d0 <== NOT EXECUTED 535ca: 6700 008c beqw 53658 <fat_file_mark_removed+0xaa> <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
535ce: 4a81 tstl %d1 <== NOT EXECUTED 535d0: 666e bnes 53640 <fat_file_mark_removed+0x92> <== NOT EXECUTED 535d2: 4280 clrl %d0 <== NOT EXECUTED 535d4: 102b 000a moveb %a3@(10),%d0 <== NOT EXECUTED 535d8: 7403 moveq #3,%d2 <== NOT EXECUTED 535da: c082 andl %d2,%d0 <== NOT EXECUTED 535dc: 6762 beqs 53640 <fat_file_mark_removed+0x92> <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
return 1;
return (fat_cluster_num_to_sector_num(mt_entry, cln) <<
535de: 4280 clrl %d0 <== NOT EXECUTED 535e0: 102b 0003 moveb %a3@(3),%d0 <== NOT EXECUTED
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
return fs_info->vol.rdir_loc;
535e4: 222b 001a movel %a3@(26),%d1 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
return 1;
return (fat_cluster_num_to_sector_num(mt_entry, cln) <<
535e8: e1a9 lsll %d0,%d1 <== NOT EXECUTED
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
535ea: 202a 0024 movel %a2@(36),%d0 <== NOT EXECUTED 535ee: 7609 moveq #9,%d3 <== NOT EXECUTED 535f0: 2400 movel %d0,%d2 <== NOT EXECUTED 535f2: e6aa lsrl %d3,%d2 <== NOT EXECUTED
static inline uint32_t
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
535f4: d282 addl %d2,%d1 <== NOT EXECUTED
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) );
535f6: 740f moveq #15,%d2 <== NOT EXECUTED 535f8: ea88 lsrl #5,%d0 <== NOT EXECUTED
_hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd);
_hash_insert(fs_info->rhash, key, fat_fd->ino, fat_fd);
fat_fd->flags |= FAT_FILE_REMOVED;
535fa: 163c 0001 moveb #1,%d3 <== NOT EXECUTED
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
535fe: e989 lsll #4,%d1 <== NOT EXECUTED
((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) );
53600: c082 andl %d2,%d0 <== NOT EXECUTED 53602: 2f0a movel %a2,%sp@- <== NOT EXECUTED
static inline uint32_t
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
53604: 2401 movel %d1,%d2 <== NOT EXECUTED 53606: d480 addl %d0,%d2 <== NOT EXECUTED 53608: 4eb9 0004 bb78 jsr 4bb78 <_Chain_Extract> <== NOT EXECUTED
*/
static inline void
_hash_insert(rtems_chain_control *hash, uint32_t key1, uint32_t key2,
fat_file_fd_t *el)
{
rtems_chain_append((hash) + ((key1) % FAT_HASH_MODULE), &(el)->link);
5360e: 7001 moveq #1,%d0 <== NOT EXECUTED 53610: c082 andl %d2,%d0 <== 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 );
53612: 2f0a movel %a2,%sp@- <== NOT EXECUTED 53614: 2200 movel %d0,%d1 <== NOT EXECUTED 53616: e988 lsll #4,%d0 <== NOT EXECUTED 53618: e589 lsll #2,%d1 <== NOT EXECUTED 5361a: 9081 subl %d1,%d0 <== NOT EXECUTED 5361c: d0ab 005e addl %a3@(94),%d0 <== NOT EXECUTED 53620: 2f00 movel %d0,%sp@- <== NOT EXECUTED 53622: 4eb9 0004 bb40 jsr 4bb40 <_Chain_Append> <== NOT EXECUTED
_hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd);
_hash_insert(fs_info->rhash, key, fat_fd->ino, fat_fd);
fat_fd->flags |= FAT_FILE_REMOVED;
53628: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5362c: 102a 0030 moveb %a2@(48),%d0 <== NOT EXECUTED 53630: 8083 orl %d3,%d0 <== NOT EXECUTED 53632: 1540 0030 moveb %d0,%a2@(48) <== NOT EXECUTED
}
53636: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED 5363c: 4e5e unlk %fp <== NOT EXECUTED 5363e: 4e75 rts <== NOT EXECUTED
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
53640: 4280 clrl %d0 <== NOT EXECUTED 53642: 102b 0005 moveb %a3@(5),%d0 <== NOT EXECUTED 53646: 5581 subql #2,%d1 <== NOT EXECUTED 53648: e1a9 lsll %d0,%d1 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
return 1;
return (fat_cluster_num_to_sector_num(mt_entry, cln) <<
5364a: 4280 clrl %d0 <== NOT EXECUTED 5364c: 102b 0003 moveb %a3@(3),%d0 <== NOT EXECUTED
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
53650: d2ab 002c addl %a3@(44),%d1 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
return 1;
return (fat_cluster_num_to_sector_num(mt_entry, cln) <<
53654: e1a9 lsll %d0,%d1 <== NOT EXECUTED 53656: 6092 bras 535ea <fat_file_mark_removed+0x3c> <== NOT EXECUTED
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
53658: 202a 0024 movel %a2@(36),%d0 <== NOT EXECUTED 5365c: 7609 moveq #9,%d3 <== NOT EXECUTED 5365e: 2400 movel %d0,%d2 <== NOT EXECUTED 53660: e6aa lsrl %d3,%d2 <== NOT EXECUTED
)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
return 1;
53662: 7201 moveq #1,%d1 <== NOT EXECUTED
static inline uint32_t
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
53664: d282 addl %d2,%d1 <== NOT EXECUTED
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) );
53666: 740f moveq #15,%d2 <== NOT EXECUTED 53668: ea88 lsrl #5,%d0 <== NOT EXECUTED
_hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd);
_hash_insert(fs_info->rhash, key, fat_fd->ino, fat_fd);
fat_fd->flags |= FAT_FILE_REMOVED;
5366a: 163c 0001 moveb #1,%d3 <== NOT EXECUTED
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
5366e: e989 lsll #4,%d1 <== NOT EXECUTED
((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) );
53670: c082 andl %d2,%d0 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
53672: 2f0a movel %a2,%sp@- <== NOT EXECUTED
static inline uint32_t
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
53674: 2401 movel %d1,%d2 <== NOT EXECUTED 53676: d480 addl %d0,%d2 <== NOT EXECUTED 53678: 4eb9 0004 bb78 jsr 4bb78 <_Chain_Extract> <== NOT EXECUTED
*/
static inline void
_hash_insert(rtems_chain_control *hash, uint32_t key1, uint32_t key2,
fat_file_fd_t *el)
{
rtems_chain_append((hash) + ((key1) % FAT_HASH_MODULE), &(el)->link);
5367e: 7001 moveq #1,%d0 <== NOT EXECUTED 53680: c082 andl %d2,%d0 <== 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 );
53682: 2f0a movel %a2,%sp@- <== NOT EXECUTED 53684: 2200 movel %d0,%d1 <== NOT EXECUTED 53686: e988 lsll #4,%d0 <== NOT EXECUTED 53688: e589 lsll #2,%d1 <== NOT EXECUTED 5368a: 9081 subl %d1,%d0 <== NOT EXECUTED 5368c: d0ab 005e addl %a3@(94),%d0 <== NOT EXECUTED 53690: 2f00 movel %d0,%sp@- <== NOT EXECUTED 53692: 4eb9 0004 bb40 jsr 4bb40 <_Chain_Append> <== NOT EXECUTED
_hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd);
_hash_insert(fs_info->rhash, key, fat_fd->ino, fat_fd);
fat_fd->flags |= FAT_FILE_REMOVED;
53698: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5369c: 102a 0030 moveb %a2@(48),%d0 <== NOT EXECUTED 536a0: 8083 orl %d3,%d0 <== NOT EXECUTED 536a2: 1540 0030 moveb %d0,%a2@(48) <== NOT EXECUTED
}
536a6: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED 536ac: 4e5e unlk %fp <== NOT EXECUTED
000529b2 <fat_file_open>:
uint32_t cln
)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
529b2: 7201 moveq #1,%d1
fat_file_open(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_dir_pos_t *dir_pos,
fat_file_fd_t **fat_fd
)
{
529b4: 4e56 ffdc linkw %fp,#-36 529b8: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 529bc: 282e 0008 movel %fp@(8),%d4
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
529c0: 2044 moveal %d4,%a0
fat_file_open(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_dir_pos_t *dir_pos,
fat_file_fd_t **fat_fd
)
{
529c2: 286e 000c moveal %fp@(12),%a4 529c6: 2a6e 0010 moveal %fp@(16),%a5
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
529ca: 2468 0034 moveal %a0@(52),%a2
static inline uint32_t
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
529ce: 2014 movel %a4@,%d0 529d0: b280 cmpl %d0,%d1 529d2: 6700 020a beqw 52bde <fat_file_open+0x22c>
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
529d6: 4a80 tstl %d0 529d8: 6600 016e bnew 52b48 <fat_file_open+0x196> 529dc: 4281 clrl %d1 529de: 122a 000a moveb %a2@(10),%d1 529e2: 7403 moveq #3,%d2 529e4: c282 andl %d2,%d1 529e6: 6700 0160 beqw 52b48 <fat_file_open+0x196>
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
return 1;
return (fat_cluster_num_to_sector_num(mt_entry, cln) <<
529ea: 4281 clrl %d1 529ec: 122a 0003 moveb %a2@(3),%d1
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
return fs_info->vol.rdir_loc;
529f0: 202a 001a movel %a2@(26),%d0
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
return 1;
return (fat_cluster_num_to_sector_num(mt_entry, cln) <<
529f4: e3a8 lsll %d1,%d0
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
529f6: 242c 0004 movel %a4@(4),%d2 529fa: 7609 moveq #9,%d3 529fc: 2202 movel %d2,%d1 529fe: e6a9 lsrl %d3,%d1
static inline uint32_t
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
52a00: d081 addl %d1,%d0
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) );
52a02: ea8a lsrl #5,%d2 52a04: 7a0f moveq #15,%d5
uint32_t key1,
uint32_t key2,
fat_file_fd_t **ret
)
{
uint32_t mod = (key1) % FAT_HASH_MODULE;
52a06: 163c 0001 moveb #1,%d3
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
52a0a: e988 lsll #4,%d0
((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) );
52a0c: c485 andl %d5,%d2
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
52a0e: 226a 005a moveal %a2@(90),%a1
static inline uint32_t
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
52a12: d480 addl %d0,%d2 52a14: c682 andl %d2,%d3
rtems_chain_node *the_node = rtems_chain_first(hash + mod);
52a16: 2003 movel %d3,%d0 52a18: e98b lsll #4,%d3 52a1a: e588 lsll #2,%d0 52a1c: 9680 subl %d0,%d3 52a1e: d3c3 addal %d3,%a1 52a20: 2059 moveal %a1@+,%a0
for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; )
52a22: b3c8 cmpal %a0,%a1
52a24: 6752 beqs 52a78 <fat_file_open+0xc6>
52a26: 2228 0020 movel %a0@(32),%d1
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
52a2a: 2001 movel %d1,%d0 52a2c: 5580 subql #2,%d0
uint32_t cln
)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
52a2e: 7c01 moveq #1,%d6 52a30: bc81 cmpl %d1,%d6 52a32: 6700 0158 beqw 52b8c <fat_file_open+0x1da>
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
52a36: 4a81 tstl %d1 52a38: 6600 0128 bnew 52b62 <fat_file_open+0x1b0> 52a3c: 4281 clrl %d1 52a3e: 122a 000a moveb %a2@(10),%d1 52a42: 7a03 moveq #3,%d5 52a44: c285 andl %d5,%d1 52a46: 6700 011a beqw 52b62 <fat_file_open+0x1b0>
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
return 1;
return (fat_cluster_num_to_sector_num(mt_entry, cln) <<
52a4a: 4281 clrl %d1 52a4c: 122a 0003 moveb %a2@(3),%d1
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
return fs_info->vol.rdir_loc;
52a50: 202a 001a movel %a2@(26),%d0
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
return 1;
return (fat_cluster_num_to_sector_num(mt_entry, cln) <<
52a54: e3a8 lsll %d1,%d0
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
52a56: 2228 0024 movel %a0@(36),%d1 52a5a: 7c09 moveq #9,%d6 52a5c: 2a01 movel %d1,%d5 52a5e: ecad lsrl %d6,%d5
static inline uint32_t
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
52a60: d085 addl %d5,%d0
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) );
52a62: ea89 lsrl #5,%d1 52a64: 7a0f moveq #15,%d5
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
52a66: e988 lsll #4,%d0
((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) );
52a68: c285 andl %d5,%d1
static inline uint32_t
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
52a6a: d081 addl %d1,%d0
{
fat_file_fd_t *ffd = (fat_file_fd_t *)the_node;
uint32_t ck = fat_construct_key(mt_entry, &ffd->dir_pos.sname);
if ( (key1) == ck)
52a6c: b082 cmpl %d2,%d0 52a6e: 6700 010a beqw 52b7a <fat_file_open+0x1c8>
{
*ret = (void *)the_node;
return 0;
}
}
the_node = the_node->next;
52a72: 2050 moveal %a0@,%a0
)
{
uint32_t mod = (key1) % FAT_HASH_MODULE;
rtems_chain_node *the_node = rtems_chain_first(hash + mod);
for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; )
52a74: b3c8 cmpal %a0,%a1
52a76: 66ae bnes 52a26 <fat_file_open+0x74>
52a78: 226a 005e moveal %a2@(94),%a1 52a7c: d3c3 addal %d3,%a1 52a7e: 2059 moveal %a1@+,%a0 52a80: b3c8 cmpal %a0,%a1
52a82: 674e beqs 52ad2 <fat_file_open+0x120> <== ALWAYS TAKEN
52a84: 2228 0020 movel %a0@(32),%d1 <== NOT EXECUTED
uint32_t cln
)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
52a88: 7c01 moveq #1,%d6 <== NOT EXECUTED 52a8a: bc81 cmpl %d1,%d6 <== NOT EXECUTED 52a8c: 6700 0130 beqw 52bbe <fat_file_open+0x20c> <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
52a90: 4a81 tstl %d1 <== NOT EXECUTED 52a92: 6600 0110 bnew 52ba4 <fat_file_open+0x1f2> <== NOT EXECUTED 52a96: 4280 clrl %d0 <== NOT EXECUTED 52a98: 102a 000a moveb %a2@(10),%d0 <== NOT EXECUTED 52a9c: 7a03 moveq #3,%d5 <== NOT EXECUTED 52a9e: c085 andl %d5,%d0 <== NOT EXECUTED 52aa0: 6700 0102 beqw 52ba4 <fat_file_open+0x1f2> <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
return 1;
return (fat_cluster_num_to_sector_num(mt_entry, cln) <<
52aa4: 4280 clrl %d0 <== NOT EXECUTED 52aa6: 102a 0003 moveb %a2@(3),%d0 <== NOT EXECUTED
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
return fs_info->vol.rdir_loc;
52aaa: 222a 001a movel %a2@(26),%d1 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
return 1;
return (fat_cluster_num_to_sector_num(mt_entry, cln) <<
52aae: e1a9 lsll %d0,%d1 <== NOT EXECUTED
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
52ab0: 2028 0024 movel %a0@(36),%d0 <== NOT EXECUTED 52ab4: 7c09 moveq #9,%d6 <== NOT EXECUTED 52ab6: 2a00 movel %d0,%d5 <== NOT EXECUTED 52ab8: ecad lsrl %d6,%d5 <== NOT EXECUTED
static inline uint32_t
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
52aba: d285 addl %d5,%d1 <== NOT EXECUTED
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) );
52abc: ea88 lsrl #5,%d0 <== NOT EXECUTED 52abe: 7a0f moveq #15,%d5 <== NOT EXECUTED
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
52ac0: e989 lsll #4,%d1 <== NOT EXECUTED
((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) );
52ac2: c085 andl %d5,%d0 <== NOT EXECUTED
static inline uint32_t
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
52ac4: d081 addl %d1,%d0 <== NOT EXECUTED
{
fat_file_fd_t *ffd = (fat_file_fd_t *)the_node;
uint32_t ck = fat_construct_key(mt_entry, &ffd->dir_pos.sname);
if ( (key1) == ck)
52ac6: b082 cmpl %d2,%d0 <== NOT EXECUTED 52ac8: 6700 00c8 beqw 52b92 <fat_file_open+0x1e0> <== NOT EXECUTED
{
*ret = (void *)the_node;
return 0;
}
}
the_node = the_node->next;
52acc: 2050 moveal %a0@,%a0 <== NOT EXECUTED
)
{
uint32_t mod = (key1) % FAT_HASH_MODULE;
rtems_chain_node *the_node = rtems_chain_first(hash + mod);
for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; )
52ace: b3c8 cmpal %a0,%a1 <== NOT EXECUTED 52ad0: 66b2 bnes 52a84 <fat_file_open+0xd2> <== NOT EXECUTED
return 0;
}
}
the_node = the_node->next;
}
return -1;
52ad2: 7aff moveq #-1,%d5
}
/* access "removed-but-still-open" hash table */
rc = _hash_search(mt_entry, fs_info->rhash, key, key, &lfat_fd);
lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t));
52ad4: 4878 0042 pea 42 <DBL_MANT_DIG+0xd> 52ad8: 4eb9 0004 6f84 jsr 46f84 <malloc>
if ( lfat_fd == NULL )
52ade: 588f addql #4,%sp
}
/* access "removed-but-still-open" hash table */
rc = _hash_search(mt_entry, fs_info->rhash, key, key, &lfat_fd);
lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t));
52ae0: 2640 moveal %d0,%a3 52ae2: 2a80 movel %d0,%a5@
if ( lfat_fd == NULL )
52ae4: 6700 0164 beqw 52c4a <fat_file_open+0x298>
rtems_set_errno_and_return_minus_one( ENOMEM );
memset(lfat_fd, 0, sizeof(fat_file_fd_t));
52ae8: 4878 0042 pea 42 <DBL_MANT_DIG+0xd>
lfat_fd->links_num = 1;
52aec: 7c01 moveq #1,%d6
lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t));
if ( lfat_fd == NULL )
rtems_set_errno_and_return_minus_one( ENOMEM );
memset(lfat_fd, 0, sizeof(fat_file_fd_t));
52aee: 42a7 clrl %sp@- 52af0: 2f00 movel %d0,%sp@- 52af2: 4eb9 0005 e310 jsr 5e310 <memset>
lfat_fd->links_num = 1;
lfat_fd->flags &= ~FAT_FILE_REMOVED;
lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
lfat_fd->dir_pos = *dir_pos;
52af8: 275c 0020 movel %a4@+,%a3@(32)
rtems_set_errno_and_return_minus_one( ENOMEM );
memset(lfat_fd, 0, sizeof(fat_file_fd_t));
lfat_fd->links_num = 1;
lfat_fd->flags &= ~FAT_FILE_REMOVED;
52afc: 72fe moveq #-2,%d1
lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
lfat_fd->dir_pos = *dir_pos;
if ( rc != RC_OK )
52afe: 4fef 000c lea %sp@(12),%sp
lfat_fd->links_num = 1;
lfat_fd->flags &= ~FAT_FILE_REMOVED;
lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
lfat_fd->dir_pos = *dir_pos;
52b02: 275c 0024 movel %a4@+,%a3@(36) 52b06: 275c 0028 movel %a4@+,%a3@(40) 52b0a: 2754 002c movel %a4@,%a3@(44)
rtems_set_errno_and_return_minus_one( ENOMEM );
memset(lfat_fd, 0, sizeof(fat_file_fd_t));
lfat_fd->links_num = 1;
lfat_fd->flags &= ~FAT_FILE_REMOVED;
52b0e: 102b 0030 moveb %a3@(48),%d0
if ( lfat_fd == NULL )
rtems_set_errno_and_return_minus_one( ENOMEM );
memset(lfat_fd, 0, sizeof(fat_file_fd_t));
lfat_fd->links_num = 1;
52b12: 2746 0008 movel %d6,%a3@(8)
lfat_fd->flags &= ~FAT_FILE_REMOVED;
lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
52b16: 7cff moveq #-1,%d6
rtems_set_errno_and_return_minus_one( ENOMEM );
memset(lfat_fd, 0, sizeof(fat_file_fd_t));
lfat_fd->links_num = 1;
lfat_fd->flags &= ~FAT_FILE_REMOVED;
52b18: c081 andl %d1,%d0
lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
52b1a: 2746 003a movel %d6,%a3@(58)
rtems_set_errno_and_return_minus_one( ENOMEM );
memset(lfat_fd, 0, sizeof(fat_file_fd_t));
lfat_fd->links_num = 1;
lfat_fd->flags &= ~FAT_FILE_REMOVED;
52b1e: 1740 0030 moveb %d0,%a3@(48)
lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
lfat_fd->dir_pos = *dir_pos;
if ( rc != RC_OK )
52b22: 4a85 tstl %d5 52b24: 6700 00f0 beqw 52c16 <fat_file_open+0x264>
lfat_fd->ino = key;
52b28: 2742 000c movel %d2,%a3@(12) 52b2c: 2f0b movel %a3,%sp@- 52b2e: d6aa 005a addl %a2@(90),%d3 52b32: 2f03 movel %d3,%sp@- 52b34: 4eb9 0004 bb40 jsr 4bb40 <_Chain_Append>
/*
* other fields of fat-file descriptor will be initialized on upper
* level
*/
return RC_OK;
52b3a: 508f addql #8,%sp 52b3c: 4280 clrl %d0
}
52b3e: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 52b44: 4e5e unlk %fp 52b46: 4e75 rts
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
52b48: 4281 clrl %d1 52b4a: 122a 0005 moveb %a2@(5),%d1 52b4e: 5580 subql #2,%d0 52b50: e3a8 lsll %d1,%d0
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
return 1;
return (fat_cluster_num_to_sector_num(mt_entry, cln) <<
52b52: 4281 clrl %d1 52b54: 122a 0003 moveb %a2@(3),%d1
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
52b58: d0aa 002c addl %a2@(44),%d0
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
return 1;
return (fat_cluster_num_to_sector_num(mt_entry, cln) <<
52b5c: e3a8 lsll %d1,%d0 52b5e: 6000 fe96 braw 529f6 <fat_file_open+0x44>
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
52b62: 4281 clrl %d1 52b64: 122a 0005 moveb %a2@(5),%d1 52b68: e3a8 lsll %d1,%d0
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
return 1;
return (fat_cluster_num_to_sector_num(mt_entry, cln) <<
52b6a: 4281 clrl %d1 52b6c: 122a 0003 moveb %a2@(3),%d1
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
52b70: d0aa 002c addl %a2@(44),%d0
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
return 1;
return (fat_cluster_num_to_sector_num(mt_entry, cln) <<
52b74: e3a8 lsll %d1,%d0 52b76: 6000 fede braw 52a56 <fat_file_open+0xa4>
/* access "valid" hash table */
rc = _hash_search(mt_entry, fs_info->vhash, key, 0, &lfat_fd);
if ( rc == RC_OK )
{
/* return pointer to fat_file_descriptor allocated before */
(*fat_fd) = lfat_fd;
52b7a: 2a88 movel %a0,%a5@
lfat_fd->links_num++;
return rc;
52b7c: 4280 clrl %d0
rc = _hash_search(mt_entry, fs_info->vhash, key, 0, &lfat_fd);
if ( rc == RC_OK )
{
/* return pointer to fat_file_descriptor allocated before */
(*fat_fd) = lfat_fd;
lfat_fd->links_num++;
52b7e: 52a8 0008 addql #1,%a0@(8)
* other fields of fat-file descriptor will be initialized on upper
* level
*/
return RC_OK;
}
52b82: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 52b88: 4e5e unlk %fp 52b8a: 4e75 rts
)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
return 1;
52b8c: 7001 moveq #1,%d0 52b8e: 6000 fec6 braw 52a56 <fat_file_open+0xa4>
fat_file_fd_t *ffd = (fat_file_fd_t *)the_node;
uint32_t ck = fat_construct_key(mt_entry, &ffd->dir_pos.sname);
if ( (key1) == ck)
{
if ( ((key2) == 0) || ((key2) == ffd->ino) )
52b92: 4a82 tstl %d2 <== NOT EXECUTED 52b94: 6708 beqs 52b9e <fat_file_open+0x1ec> <== NOT EXECUTED 52b96: b4a8 000c cmpl %a0@(12),%d2 <== NOT EXECUTED 52b9a: 6600 ff30 bnew 52acc <fat_file_open+0x11a> <== NOT EXECUTED
{
*ret = (void *)the_node;
return 0;
52b9e: 4285 clrl %d5 <== NOT EXECUTED 52ba0: 6000 ff32 braw 52ad4 <fat_file_open+0x122> <== NOT EXECUTED
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
52ba4: 4280 clrl %d0 <== NOT EXECUTED 52ba6: 102a 0005 moveb %a2@(5),%d0 <== NOT EXECUTED 52baa: 5581 subql #2,%d1 <== NOT EXECUTED 52bac: e1a9 lsll %d0,%d1 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
return 1;
return (fat_cluster_num_to_sector_num(mt_entry, cln) <<
52bae: 4280 clrl %d0 <== NOT EXECUTED 52bb0: 102a 0003 moveb %a2@(3),%d0 <== NOT EXECUTED
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
52bb4: d2aa 002c addl %a2@(44),%d1 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
return 1;
return (fat_cluster_num_to_sector_num(mt_entry, cln) <<
52bb8: e1a9 lsll %d0,%d1 <== NOT EXECUTED 52bba: 6000 fef4 braw 52ab0 <fat_file_open+0xfe> <== NOT EXECUTED
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
52bbe: 2028 0024 movel %a0@(36),%d0 <== NOT EXECUTED 52bc2: 7c09 moveq #9,%d6 <== NOT EXECUTED 52bc4: 2a00 movel %d0,%d5 <== NOT EXECUTED 52bc6: ecad lsrl %d6,%d5 <== NOT EXECUTED
)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
return 1;
52bc8: 7201 moveq #1,%d1 <== NOT EXECUTED
static inline uint32_t
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
52bca: d285 addl %d5,%d1 <== NOT EXECUTED
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) );
52bcc: ea88 lsrl #5,%d0 <== NOT EXECUTED 52bce: 7a0f moveq #15,%d5 <== NOT EXECUTED
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
52bd0: e989 lsll #4,%d1 <== NOT EXECUTED
((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) );
52bd2: c085 andl %d5,%d0 <== NOT EXECUTED
static inline uint32_t
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
52bd4: d081 addl %d1,%d0 <== NOT EXECUTED
for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; )
{
fat_file_fd_t *ffd = (fat_file_fd_t *)the_node;
uint32_t ck = fat_construct_key(mt_entry, &ffd->dir_pos.sname);
if ( (key1) == ck)
52bd6: b082 cmpl %d2,%d0 <== NOT EXECUTED 52bd8: 6600 fef2 bnew 52acc <fat_file_open+0x11a> <== NOT EXECUTED 52bdc: 60b4 bras 52b92 <fat_file_open+0x1e0> <== NOT EXECUTED
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
52bde: 242c 0004 movel %a4@(4),%d2 52be2: 7609 moveq #9,%d3 52be4: 2202 movel %d2,%d1 52be6: e6a9 lsrl %d3,%d1 52be8: 7001 moveq #1,%d0
static inline uint32_t
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
52bea: d081 addl %d1,%d0
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) );
52bec: ea8a lsrl #5,%d2 52bee: 7a0f moveq #15,%d5
uint32_t key1,
uint32_t key2,
fat_file_fd_t **ret
)
{
uint32_t mod = (key1) % FAT_HASH_MODULE;
52bf0: 163c 0001 moveb #1,%d3
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
52bf4: e988 lsll #4,%d0
((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) );
52bf6: c485 andl %d5,%d2 52bf8: 226a 005a moveal %a2@(90),%a1
static inline uint32_t
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
52bfc: d480 addl %d0,%d2 52bfe: c682 andl %d2,%d3
rtems_chain_node *the_node = rtems_chain_first(hash + mod);
52c00: 2003 movel %d3,%d0 52c02: e98b lsll #4,%d3 52c04: e588 lsll #2,%d0 52c06: 9680 subl %d0,%d3 52c08: d3c3 addal %d3,%a1 52c0a: 2059 moveal %a1@+,%a0
for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; )
52c0c: b3c8 cmpal %a0,%a1 52c0e: 6600 fe16 bnew 52a26 <fat_file_open+0x74> 52c12: 6000 fe64 braw 52a78 <fat_file_open+0xc6>
if ( rc != RC_OK )
lfat_fd->ino = key;
else
{
lfat_fd->ino = fat_get_unique_ino(mt_entry);
52c16: 2f04 movel %d4,%sp@- <== NOT EXECUTED 52c18: 4eb9 0005 3f70 jsr 53f70 <fat_get_unique_ino> <== NOT EXECUTED
if ( lfat_fd->ino == 0 )
52c1e: 588f addql #4,%sp <== NOT EXECUTED
if ( rc != RC_OK )
lfat_fd->ino = key;
else
{
lfat_fd->ino = fat_get_unique_ino(mt_entry);
52c20: 2740 000c movel %d0,%a3@(12) <== NOT EXECUTED
if ( lfat_fd->ino == 0 )
52c24: 6600 ff06 bnew 52b2c <fat_file_open+0x17a> <== NOT EXECUTED
{
free((*fat_fd));
52c28: 2f15 movel %a5@,%sp@- <== NOT EXECUTED 52c2a: 4eb9 0004 680c jsr 4680c <free> <== NOT EXECUTED
/*
* XXX: kernel resource is unsufficient, but not the memory,
* but there is no suitable errno :(
*/
rtems_set_errno_and_return_minus_one( ENOMEM );
52c30: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 52c36: 588f addql #4,%sp <== NOT EXECUTED 52c38: 720c moveq #12,%d1 <== NOT EXECUTED 52c3a: 2040 moveal %d0,%a0 <== NOT EXECUTED 52c3c: 70ff moveq #-1,%d0 <== NOT EXECUTED
* other fields of fat-file descriptor will be initialized on upper
* level
*/
return RC_OK;
}
52c3e: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 <== NOT EXECUTED
free((*fat_fd));
/*
* XXX: kernel resource is unsufficient, but not the memory,
* but there is no suitable errno :(
*/
rtems_set_errno_and_return_minus_one( ENOMEM );
52c44: 2081 movel %d1,%a0@ <== NOT EXECUTED
* other fields of fat-file descriptor will be initialized on upper
* level
*/
return RC_OK;
}
52c46: 4e5e unlk %fp <== NOT EXECUTED 52c48: 4e75 rts <== NOT EXECUTED
/* access "removed-but-still-open" hash table */
rc = _hash_search(mt_entry, fs_info->rhash, key, key, &lfat_fd);
lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t));
if ( lfat_fd == NULL )
rtems_set_errno_and_return_minus_one( ENOMEM );
52c4a: 4eb9 0005 d92c jsr 5d92c <__errno> 52c50: 740c moveq #12,%d2 52c52: 2040 moveal %d0,%a0 52c54: 70ff moveq #-1,%d0 52c56: 2082 movel %d2,%a0@
* other fields of fat-file descriptor will be initialized on upper
* level
*/
return RC_OK;
}
52c58: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5
52c5e: 4e5e unlk %fp <== NOT EXECUTED
00052c74 <fat_file_read>:
fat_file_fd_t *fat_fd,
uint32_t start,
uint32_t count,
uint8_t *buf
)
{
52c74: 4e56 ffc8 linkw %fp,#-56 52c78: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 52c7c: 246e 0008 moveal %fp@(8),%a2 52c80: 286e 000c moveal %fp@(12),%a4 52c84: 282e 0010 movel %fp@(16),%d4 52c88: 242e 0014 movel %fp@(20),%d2
int rc = RC_OK;
ssize_t ret = 0;
fat_fs_info_t *fs_info = mt_entry->fs_info;
52c8c: 266a 0034 moveal %a2@(52),%a3
uint32_t cmpltd = 0;
uint32_t cur_cln = 0;
52c90: 42ae fffc clrl %fp@(-4)
uint32_t sec = 0;
uint32_t byte = 0;
uint32_t c = 0;
/* it couldn't be removed - otherwise cache update will be broken */
if (count == 0)
52c94: 4a82 tstl %d2 52c96: 6700 0106 beqw 52d9e <fat_file_read+0x12a>
/*
* >= because start is offset and computed from 0 and file_size
* computed from 1
*/
if ( start >= fat_fd->fat_file_size )
52c9a: 202c 0018 movel %a4@(24),%d0 52c9e: b880 cmpl %d0,%d4 52ca0: 6400 00fc bccw 52d9e <fat_file_read+0x12a>
return FAT_EOF;
if ((count > fat_fd->fat_file_size) ||
52ca4: b082 cmpl %d2,%d0 52ca6: 6400 0102 bccw 52daa <fat_file_read+0x136>
(start > fat_fd->fat_file_size - count))
count = fat_fd->fat_file_size - start;
52caa: 2400 movel %d0,%d2 <== NOT EXECUTED 52cac: 9484 subl %d4,%d2 <== NOT EXECUTED
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
52cae: 7001 moveq #1,%d0 52cb0: b0ac 0020 cmpl %a4@(32),%d0 52cb4: 6700 0106 beqw 52dbc <fat_file_read+0x148>
return -1;
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
52cb8: 4280 clrl %d0 52cba: 102b 0008 moveb %a3@(8),%d0 52cbe: 2604 movel %d4,%d3 52cc0: e0ab lsrl %d0,%d3
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
52cc2: 3a2b 0006 movew %a3@(6),%d5
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
52cc6: 486e fffc pea %fp@(-4) 52cca: 2f03 movel %d3,%sp@- 52ccc: 2f0c movel %a4,%sp@-
return -1;
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
52cce: 2d43 fff8 movel %d3,%fp@(-8)
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
52cd2: 2f0a movel %a2,%sp@- 52cd4: 4eba fc3e jsr %pc@(52914 <fat_file_lseek>)
if (rc != RC_OK)
52cd8: 4fef 0010 lea %sp@(16),%sp 52cdc: 4a81 tstl %d1 52cde: 6600 0136 bnew 52e16 <fat_file_read+0x1a2>
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
52ce2: 0285 0000 ffff andil #65535,%d5 52ce8: 5385 subql #1,%d5 52cea: c885 andl %d5,%d4 52cec: 2d44 fff4 movel %d4,%fp@(-12)
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
52cf0: 4a82 tstl %d2 52cf2: 6700 01ac beqw 52ea0 <fat_file_read+0x22c>
cl_start = start >> fs_info->vol.bpc_log2;
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
52cf6: 2d4c fff0 movel %a4,%fp@(-16)
return rc;
while (count > 0)
52cfa: 2a2e fff4 movel %fp@(-12),%d5
cl_start = start >> fs_info->vol.bpc_log2;
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
52cfe: 286e 0018 moveal %fp@(24),%a4
return rc;
while (count > 0)
52d02: 9bcd subal %a5,%a5
cl_start = start >> fs_info->vol.bpc_log2;
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
52d04: 1e2b 0002 moveb %a3@(2),%d7 52d08: 3c13 movew %a3@,%d6
return rc;
while (count > 0)
{
c = MIN(count, (fs_info->vol.bpc - ofs));
52d0a: 4280 clrl %d0
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
52d0c: 226e fffc moveal %fp@(-4),%a1
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
52d10: 2209 movel %a1,%d1 52d12: 5581 subql #2,%d1
if (rc != RC_OK)
return rc;
while (count > 0)
{
c = MIN(count, (fs_info->vol.bpc - ofs));
52d14: 302b 0006 movew %a3@(6),%d0 52d18: 9085 subl %d5,%d0 52d1a: b480 cmpl %d0,%d2
52d1c: 6402 bccs 52d20 <fat_file_read+0xac>
52d1e: 2002 movel %d2,%d0
fat_fd->map.disk_cln = cur_cln;
*disk_cln = cur_cln;
}
return RC_OK;
}
52d20: 206a 0034 moveal %a2@(52),%a0
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
52d24: 4a89 tstl %a1 52d26: 6600 00fa bnew 52e22 <fat_file_read+0x1ae>
52d2a: 4284 clrl %d4 <== NOT EXECUTED 52d2c: 1828 000a moveb %a0@(10),%d4 <== NOT EXECUTED 52d30: 7603 moveq #3,%d3 <== NOT EXECUTED 52d32: c883 andl %d3,%d4 <== NOT EXECUTED 52d34: 6700 00ec beqw 52e22 <fat_file_read+0x1ae> <== NOT EXECUTED
return fs_info->vol.rdir_loc;
52d38: 2228 001a movel %a0@(26),%d1 <== NOT EXECUTED
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
sec += (ofs >> fs_info->vol.sec_log2);
byte = ofs & (fs_info->vol.bps - 1);
ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd);
52d3c: 4874 d800 pea %a4@(00000000,%a5:l) 52d40: 2041 moveal %d1,%a0
if ( ret < 0 )
return -1;
count -= c;
52d42: 9480 subl %d0,%d2
cmpltd += c;
52d44: dbc0 addal %d0,%a5
{
c = MIN(count, (fs_info->vol.bpc - ofs));
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
sec += (ofs >> fs_info->vol.sec_log2);
byte = ofs & (fs_info->vol.bps - 1);
52d46: 0286 0000 ffff andil #65535,%d6
ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd);
52d4c: 2f00 movel %d0,%sp@-
{
c = MIN(count, (fs_info->vol.bpc - ofs));
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
sec += (ofs >> fs_info->vol.sec_log2);
byte = ofs & (fs_info->vol.bps - 1);
52d4e: 5386 subql #1,%d6
while (count > 0)
{
c = MIN(count, (fs_info->vol.bpc - ofs));
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
sec += (ofs >> fs_info->vol.sec_log2);
52d50: 0287 0000 00ff andil #255,%d7
byte = ofs & (fs_info->vol.bps - 1);
ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd);
52d56: cc85 andl %d5,%d6
while (count > 0)
{
c = MIN(count, (fs_info->vol.bpc - ofs));
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
sec += (ofs >> fs_info->vol.sec_log2);
52d58: eead lsrl %d7,%d5
byte = ofs & (fs_info->vol.bps - 1);
ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd);
52d5a: 2f06 movel %d6,%sp@- 52d5c: 4870 5800 pea %a0@(00000000,%d5:l) 52d60: 2f0a movel %a2,%sp@- 52d62: 4eb9 0005 3bf2 jsr 53bf2 <_fat_block_read>
if ( ret < 0 )
52d68: 4fef 0014 lea %sp@(20),%sp 52d6c: 4a80 tstl %d0 52d6e: 6d00 009a bltw 52e0a <fat_file_read+0x196>
return -1;
count -= c;
cmpltd += c;
save_cln = cur_cln;
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
52d72: 486e fffc pea %fp@(-4)
if ( rc != RC_OK )
return rc;
ofs = 0;
52d76: 4285 clrl %d5
if ( ret < 0 )
return -1;
count -= c;
cmpltd += c;
save_cln = cur_cln;
52d78: 2c2e fffc movel %fp@(-4),%d6
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
52d7c: 2f06 movel %d6,%sp@- 52d7e: 2f0a movel %a2,%sp@- 52d80: 4eb9 0005 b828 jsr 5b828 <fat_get_fat_cluster>
if ( rc != RC_OK )
52d86: 4fef 000c lea %sp@(12),%sp 52d8a: 4a80 tstl %d0
52d8c: 6612 bnes 52da0 <fat_file_read+0x12c> <== NEVER TAKEN
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
52d8e: 4a82 tstl %d2 52d90: 6700 00e0 beqw 52e72 <fat_file_read+0x1fe>
52d94: 1e2b 0002 moveb %a3@(2),%d7 <== NOT EXECUTED 52d98: 3c13 movew %a3@,%d6 <== NOT EXECUTED 52d9a: 6000 ff6e braw 52d0a <fat_file_read+0x96> <== NOT EXECUTED
/*
* >= because start is offset and computed from 0 and file_size
* computed from 1
*/
if ( start >= fat_fd->fat_file_size )
return FAT_EOF;
52d9e: 4280 clrl %d0 <== NOT EXECUTED
fat_fd->map.file_cln = cl_start +
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
fat_fd->map.disk_cln = save_cln;
return cmpltd;
}
52da0: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 52da6: 4e5e unlk %fp 52da8: 4e75 rts
*/
if ( start >= fat_fd->fat_file_size )
return FAT_EOF;
if ((count > fat_fd->fat_file_size) ||
(start > fat_fd->fat_file_size - count))
52daa: 2200 movel %d0,%d1 52dac: 9282 subl %d2,%d1
* computed from 1
*/
if ( start >= fat_fd->fat_file_size )
return FAT_EOF;
if ((count > fat_fd->fat_file_size) ||
52dae: b284 cmpl %d4,%d1 52db0: 6400 fefc bccw 52cae <fat_file_read+0x3a>
(start > fat_fd->fat_file_size - count))
count = fat_fd->fat_file_size - start;
52db4: 2400 movel %d0,%d2 <== NOT EXECUTED 52db6: 9484 subl %d4,%d2 <== NOT EXECUTED 52db8: 6000 fef4 braw 52cae <fat_file_read+0x3a> <== NOT EXECUTED
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
52dbc: 4aac 0024 tstl %a4@(36) 52dc0: 6600 fef6 bnew 52cb8 <fat_file_read+0x44>
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
52dc4: 4280 clrl %d0 52dc6: 102b 000a moveb %a3@(10),%d0 52dca: 7203 moveq #3,%d1 52dcc: c081 andl %d1,%d0
if ((count > fat_fd->fat_file_size) ||
(start > fat_fd->fat_file_size - count))
count = fat_fd->fat_file_size - start;
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
52dce: 6700 fee8 beqw 52cb8 <fat_file_read+0x44>
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln);
52dd2: 202c 001c movel %a4@(28),%d0
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
52dd6: 665a bnes 52e32 <fat_file_read+0x1be> <== NEVER TAKEN
return fs_info->vol.rdir_loc;
52dd8: 202b 001a movel %a3@(26),%d0
sec += (start >> fs_info->vol.sec_log2);
byte = start & (fs_info->vol.bps - 1);
52ddc: 4281 clrl %d1
ret = _fat_block_read(mt_entry, sec, byte, count, buf);
52dde: 2040 moveal %d0,%a0 52de0: 2f2e 0018 movel %fp@(24),%sp@- 52de4: 2f02 movel %d2,%sp@-
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln);
sec += (start >> fs_info->vol.sec_log2);
byte = start & (fs_info->vol.bps - 1);
52de6: 3213 movew %a3@,%d1 52de8: 5381 subql #1,%d1
ret = _fat_block_read(mt_entry, sec, byte, count, buf);
52dea: c284 andl %d4,%d1 52dec: 2f01 movel %d1,%sp@-
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln);
sec += (start >> fs_info->vol.sec_log2);
52dee: 4281 clrl %d1 52df0: 122b 0002 moveb %a3@(2),%d1 52df4: e2ac lsrl %d1,%d4
byte = start & (fs_info->vol.bps - 1);
ret = _fat_block_read(mt_entry, sec, byte, count, buf);
52df6: 4870 4800 pea %a0@(00000000,%d4:l) 52dfa: 2f0a movel %a2,%sp@- 52dfc: 4eb9 0005 3bf2 jsr 53bf2 <_fat_block_read>
if ( ret < 0 )
52e02: 4fef 0014 lea %sp@(20),%sp 52e06: 4a80 tstl %d0
52e08: 6c96 bges 52da0 <fat_file_read+0x12c> <== ALWAYS TAKEN
sec += (ofs >> fs_info->vol.sec_log2);
byte = ofs & (fs_info->vol.bps - 1);
ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd);
if ( ret < 0 )
return -1;
52e0a: 70ff moveq #-1,%d0 <== NOT EXECUTED
fat_fd->map.file_cln = cl_start +
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
fat_fd->map.disk_cln = save_cln;
return cmpltd;
}
52e0c: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED 52e12: 4e5e unlk %fp <== NOT EXECUTED 52e14: 4e75 rts <== NOT EXECUTED
cl_start = start >> fs_info->vol.bpc_log2;
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
52e16: 2001 movel %d1,%d0 <== NOT EXECUTED
fat_fd->map.file_cln = cl_start +
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
fat_fd->map.disk_cln = save_cln;
return cmpltd;
}
52e18: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED 52e1e: 4e5e unlk %fp <== NOT EXECUTED 52e20: 4e75 rts <== NOT EXECUTED
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
52e22: 4284 clrl %d4 52e24: 1828 0005 moveb %a0@(5),%d4 52e28: e9a9 lsll %d4,%d1 52e2a: d2a8 002c addl %a0@(44),%d1 52e2e: 6000 ff0c braw 52d3c <fat_file_read+0xc8>
52e32: 4281 clrl %d1 <== NOT EXECUTED 52e34: 122b 0005 moveb %a3@(5),%d1 <== NOT EXECUTED 52e38: 5580 subql #2,%d0 <== NOT EXECUTED 52e3a: e3a8 lsll %d1,%d0 <== NOT EXECUTED
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln);
sec += (start >> fs_info->vol.sec_log2);
byte = start & (fs_info->vol.bps - 1);
52e3c: 4281 clrl %d1 <== NOT EXECUTED 52e3e: d0ab 002c addl %a3@(44),%d0 <== NOT EXECUTED
ret = _fat_block_read(mt_entry, sec, byte, count, buf);
52e42: 2040 moveal %d0,%a0 <== NOT EXECUTED 52e44: 2f2e 0018 movel %fp@(24),%sp@- <== NOT EXECUTED 52e48: 2f02 movel %d2,%sp@- <== NOT EXECUTED
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln);
sec += (start >> fs_info->vol.sec_log2);
byte = start & (fs_info->vol.bps - 1);
52e4a: 3213 movew %a3@,%d1 <== NOT EXECUTED 52e4c: 5381 subql #1,%d1 <== NOT EXECUTED
ret = _fat_block_read(mt_entry, sec, byte, count, buf);
52e4e: c284 andl %d4,%d1 <== NOT EXECUTED 52e50: 2f01 movel %d1,%sp@- <== NOT EXECUTED
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln);
sec += (start >> fs_info->vol.sec_log2);
52e52: 4281 clrl %d1 <== NOT EXECUTED 52e54: 122b 0002 moveb %a3@(2),%d1 <== NOT EXECUTED 52e58: e2ac lsrl %d1,%d4 <== NOT EXECUTED
byte = start & (fs_info->vol.bps - 1);
ret = _fat_block_read(mt_entry, sec, byte, count, buf);
52e5a: 4870 4800 pea %a0@(00000000,%d4:l) <== NOT EXECUTED 52e5e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 52e60: 4eb9 0005 3bf2 jsr 53bf2 <_fat_block_read> <== NOT EXECUTED
if ( ret < 0 )
52e66: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 52e6a: 4a80 tstl %d0 <== NOT EXECUTED 52e6c: 6c00 ff32 bgew 52da0 <fat_file_read+0x12c> <== NOT EXECUTED 52e70: 6098 bras 52e0a <fat_file_read+0x196> <== NOT EXECUTED
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
52e72: 206e fff4 moveal %fp@(-12),%a0 52e76: 4282 clrl %d2 52e78: 142b 0008 moveb %a3@(8),%d2
save_cln = cur_cln;
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
if ( rc != RC_OK )
return rc;
ofs = 0;
52e7c: 200d movel %a5,%d0
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
52e7e: 41f0 d8ff lea %a0@(ffffffff,%a5:l),%a0 52e82: 286e fff0 moveal %fp@(-16),%a4 52e86: 2208 movel %a0,%d1 52e88: e4a9 lsrl %d2,%d1
ofs = 0;
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
52e8a: d2ae fff8 addl %fp@(-8),%d1
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
fat_fd->map.disk_cln = save_cln;
52e8e: 2946 0036 movel %d6,%a4@(54)
ofs = 0;
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
52e92: 2941 0032 movel %d1,%a4@(50)
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
fat_fd->map.disk_cln = save_cln;
return cmpltd;
}
52e96: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 52e9c: 4e5e unlk %fp 52e9e: 4e75 rts
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
52ea0: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
52ea4: 9bcd subal %a5,%a5 <== NOT EXECUTED
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
52ea6: 4282 clrl %d2 <== NOT EXECUTED 52ea8: 142b 0008 moveb %a3@(8),%d2 <== NOT EXECUTED
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
52eac: 4286 clrl %d6 <== NOT EXECUTED 52eae: 4280 clrl %d0 <== NOT EXECUTED
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
52eb0: 41f0 d8ff lea %a0@(ffffffff,%a5:l),%a0 <== NOT EXECUTED
fat_fd->map.disk_cln = save_cln;
52eb4: 2946 0036 movel %d6,%a4@(54) <== NOT EXECUTED
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
52eb8: 2208 movel %a0,%d1 <== NOT EXECUTED 52eba: e4a9 lsrl %d2,%d1 <== NOT EXECUTED
ofs = 0;
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
52ebc: d2ae fff8 addl %fp@(-8),%d1 <== NOT EXECUTED 52ec0: 2941 0032 movel %d1,%a4@(50) <== NOT EXECUTED 52ec4: 60d0 bras 52e96 <fat_file_read+0x222> <== NOT EXECUTED
000537c2 <fat_file_size>:
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = fat_fd->cln;
uint32_t save_cln = 0;
/* Have we requested root dir size for FAT12/16? */
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
537c2: 7001 moveq #1,%d0
int
fat_file_size(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
537c4: 4e56 ffe0 linkw %fp,#-32 537c8: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 537cc: 266e 000c moveal %fp@(12),%a3 537d0: 286e 0008 moveal %fp@(8),%a4
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = fat_fd->cln;
537d4: 242b 001c movel %a3@(28),%d2
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
537d8: 246c 0034 moveal %a4@(52),%a2
uint32_t cur_cln = fat_fd->cln;
537dc: 2d42 fffc movel %d2,%fp@(-4)
uint32_t save_cln = 0;
/* Have we requested root dir size for FAT12/16? */
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
537e0: b0ab 0020 cmpl %a3@(32),%d0
537e4: 6760 beqs 53846 <fat_file_size+0x84> <== NEVER TAKEN
return rc;
}
fat_fd->fat_file_size = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
537e6: 2002 movel %d2,%d0 537e8: c0aa 000c andl %a2@(12),%d0
{
fat_fd->fat_file_size = fs_info->vol.rdir_size;
return rc;
}
fat_fd->fat_file_size = 0;
537ec: 42ab 0018 clrl %a3@(24)
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
537f0: b0aa 0010 cmpl %a2@(16),%d0
537f4: 6474 bccs 5386a <fat_file_size+0xa8> <== NEVER TAKEN
537f6: 260e movel %fp,%d3 537f8: 5983 subql #4,%d3 537fa: 4bf9 0005 b828 lea 5b828 <fat_get_fat_cluster>,%a5
{
save_cln = cur_cln;
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
53800: 2f03 movel %d3,%sp@- 53802: 2f02 movel %d2,%sp@- 53804: 2f0c movel %a4,%sp@- 53806: 4e95 jsr %a5@
if ( rc != RC_OK )
53808: 4fef 000c lea %sp@(12),%sp 5380c: 4a80 tstl %d0
5380e: 662c bnes 5383c <fat_file_size+0x7a> <== NEVER TAKEN
return rc;
}
fat_fd->fat_file_size = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
53810: 202e fffc movel %fp@(-4),%d0
save_cln = cur_cln;
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
if ( rc != RC_OK )
return rc;
fat_fd->fat_file_size += fs_info->vol.bpc;
53814: 4284 clrl %d4
return rc;
}
fat_fd->fat_file_size = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
53816: 2200 movel %d0,%d1
save_cln = cur_cln;
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
if ( rc != RC_OK )
return rc;
fat_fd->fat_file_size += fs_info->vol.bpc;
53818: 382a 0006 movew %a2@(6),%d4
return rc;
}
fat_fd->fat_file_size = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
5381c: c2aa 000c andl %a2@(12),%d1
save_cln = cur_cln;
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
if ( rc != RC_OK )
return rc;
fat_fd->fat_file_size += fs_info->vol.bpc;
53820: d9ab 0018 addl %d4,%a3@(24)
return rc;
}
fat_fd->fat_file_size = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
53824: b2aa 0010 cmpl %a2@(16),%d1
53828: 6442 bccs 5386c <fat_file_size+0xaa> <== ALWAYS TAKEN
{
save_cln = cur_cln;
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
5382a: 2f03 movel %d3,%sp@- <== NOT EXECUTED
return rc;
}
fat_fd->fat_file_size = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
5382c: 2400 movel %d0,%d2 <== NOT EXECUTED
{
save_cln = cur_cln;
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
5382e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 53830: 2f0c movel %a4,%sp@- <== NOT EXECUTED 53832: 4e95 jsr %a5@ <== NOT EXECUTED
if ( rc != RC_OK )
53834: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 53838: 4a80 tstl %d0 <== NOT EXECUTED 5383a: 67d4 beqs 53810 <fat_file_size+0x4e> <== NOT EXECUTED
fat_fd->fat_file_size += fs_info->vol.bpc;
}
fat_fd->map.last_cln = save_cln;
return rc;
}
5383c: 4cee 3c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a5 <== NOT EXECUTED 53842: 4e5e unlk %fp <== NOT EXECUTED 53844: 4e75 rts <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = fat_fd->cln;
uint32_t save_cln = 0;
/* Have we requested root dir size for FAT12/16? */
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
53846: 4aab 0024 tstl %a3@(36) <== NOT EXECUTED 5384a: 669a bnes 537e6 <fat_file_size+0x24> <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
5384c: 4280 clrl %d0 <== NOT EXECUTED 5384e: 102a 000a moveb %a2@(10),%d0 <== NOT EXECUTED 53852: 7203 moveq #3,%d1 <== NOT EXECUTED 53854: c081 andl %d1,%d0 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = fat_fd->cln;
uint32_t save_cln = 0;
/* Have we requested root dir size for FAT12/16? */
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
53856: 678e beqs 537e6 <fat_file_size+0x24> <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
fat_fd->fat_file_size = fs_info->vol.rdir_size;
return rc;
53858: 4280 clrl %d0 <== NOT EXECUTED
/* Have we requested root dir size for FAT12/16? */
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
fat_fd->fat_file_size = fs_info->vol.rdir_size;
5385a: 276a 0024 0018 movel %a2@(36),%a3@(24) <== NOT EXECUTED
fat_fd->fat_file_size += fs_info->vol.bpc;
}
fat_fd->map.last_cln = save_cln;
return rc;
}
53860: 4cee 3c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a5 <== NOT EXECUTED 53866: 4e5e unlk %fp <== NOT EXECUTED 53868: 4e75 rts <== NOT EXECUTED
)
{
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = fat_fd->cln;
uint32_t save_cln = 0;
5386a: 4282 clrl %d2 <== NOT EXECUTED
if ( rc != RC_OK )
return rc;
fat_fd->fat_file_size += fs_info->vol.bpc;
}
fat_fd->map.last_cln = save_cln;
5386c: 2742 003a movel %d2,%a3@(58)
return rc;
53870: 4280 clrl %d0
}
53872: 4cee 3c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a5
53878: 4e5e unlk %fp <== NOT EXECUTED
00052ec6 <fat_file_truncate>:
{
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = 0;
uint32_t cl_start = 0;
uint32_t new_last_cln = FAT_UNDEFINED_VALUE;
52ec6: 72ff moveq #-1,%d1
fat_file_truncate(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd,
uint32_t new_length
)
{
52ec8: 4e56 ffe4 linkw %fp,#-28 52ecc: 206e 0010 moveal %fp@(16),%a0 52ed0: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 52ed4: 246e 0008 moveal %fp@(8),%a2 52ed8: 266e 000c moveal %fp@(12),%a3
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
52edc: 226a 0034 moveal %a2@(52),%a1
uint32_t cur_cln = 0;
uint32_t cl_start = 0;
uint32_t new_last_cln = FAT_UNDEFINED_VALUE;
if ( new_length >= fat_fd->fat_file_size )
52ee0: 202b 0018 movel %a3@(24),%d0
uint32_t new_length
)
{
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = 0;
52ee4: 42ae fff8 clrl %fp@(-8)
uint32_t cl_start = 0;
uint32_t new_last_cln = FAT_UNDEFINED_VALUE;
52ee8: 2d41 fffc movel %d1,%fp@(-4)
if ( new_length >= fat_fd->fat_file_size )
52eec: b1c0 cmpal %d0,%a0
52eee: 6460 bccs 52f50 <fat_file_truncate+0x8a> <== NEVER TAKEN
return rc;
assert(fat_fd->fat_file_size);
52ef0: 4a80 tstl %d0 52ef2: 6700 00b2 beqw 52fa6 <fat_file_truncate+0xe0>
cl_start = (new_length + fs_info->vol.bpc - 1) >> fs_info->vol.bpc_log2;
52ef6: 4282 clrl %d2 52ef8: 4281 clrl %d1 52efa: 1229 0008 moveb %a1@(8),%d1 52efe: 3429 0006 movew %a1@(6),%d2 52f02: 41f0 28ff lea %a0@(ffffffff,%d2:l),%a0 52f06: 2408 movel %a0,%d2 52f08: e2aa lsrl %d1,%d2
if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size)
52f0a: 2602 movel %d2,%d3 52f0c: e3ab lsll %d1,%d3 52f0e: b680 cmpl %d0,%d3
52f10: 643e bccs 52f50 <fat_file_truncate+0x8a> <== NEVER TAKEN
52f12: 49fa fa00 lea %pc@(52914 <fat_file_lseek>),%a4
return RC_OK;
if (cl_start != 0)
52f16: 4a82 tstl %d2
52f18: 6718 beqs 52f32 <fat_file_truncate+0x6c> <== ALWAYS TAKEN
{
rc = fat_file_lseek(mt_entry, fat_fd, cl_start - 1, &new_last_cln);
52f1a: 486e fffc pea %fp@(-4) <== NOT EXECUTED 52f1e: 2042 moveal %d2,%a0 <== NOT EXECUTED 52f20: 4868 ffff pea %a0@(-1) <== NOT EXECUTED 52f24: 2f0b movel %a3,%sp@- <== NOT EXECUTED 52f26: 2f0a movel %a2,%sp@- <== NOT EXECUTED 52f28: 4e94 jsr %a4@ <== NOT EXECUTED
if (rc != RC_OK)
52f2a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size)
return RC_OK;
if (cl_start != 0)
{
rc = fat_file_lseek(mt_entry, fat_fd, cl_start - 1, &new_last_cln);
52f2e: 2001 movel %d1,%d0 <== NOT EXECUTED
if (rc != RC_OK)
52f30: 6614 bnes 52f46 <fat_file_truncate+0x80> <== NOT EXECUTED
return rc;
}
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
52f32: 486e fff8 pea %fp@(-8) 52f36: 2f02 movel %d2,%sp@- 52f38: 2f0b movel %a3,%sp@- 52f3a: 2f0a movel %a2,%sp@- 52f3c: 4e94 jsr %a4@
if (rc != RC_OK)
52f3e: 4fef 0010 lea %sp@(16),%sp
if (rc != RC_OK)
return rc;
}
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
52f42: 2001 movel %d1,%d0
if (rc != RC_OK)
52f44: 6716 beqs 52f5c <fat_file_truncate+0x96> <== ALWAYS TAKEN
fat_fd->map.file_cln = cl_start - 1;
fat_fd->map.disk_cln = new_last_cln;
fat_fd->map.last_cln = new_last_cln;
}
return RC_OK;
}
52f46: 4cee 1c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a4 52f4c: 4e5e unlk %fp 52f4e: 4e75 rts
assert(fat_fd->fat_file_size);
cl_start = (new_length + fs_info->vol.bpc - 1) >> fs_info->vol.bpc_log2;
if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size)
return RC_OK;
52f50: 4280 clrl %d0 <== NOT EXECUTED
fat_fd->map.file_cln = cl_start - 1;
fat_fd->map.disk_cln = new_last_cln;
fat_fd->map.last_cln = new_last_cln;
}
return RC_OK;
}
52f52: 4cee 1c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a4 <== NOT EXECUTED 52f58: 4e5e unlk %fp <== NOT EXECUTED 52f5a: 4e75 rts <== NOT EXECUTED
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
rc = fat_free_fat_clusters_chain(mt_entry, cur_cln);
52f5c: 2f2e fff8 movel %fp@(-8),%sp@- 52f60: 2f0a movel %a2,%sp@- 52f62: 4eb9 0005 bc70 jsr 5bc70 <fat_free_fat_clusters_chain>
if (rc != RC_OK)
52f68: 508f addql #8,%sp 52f6a: 4a80 tstl %d0
52f6c: 66d8 bnes 52f46 <fat_file_truncate+0x80> <== NEVER TAKEN
return rc;
if (cl_start != 0)
52f6e: 4a82 tstl %d2
52f70: 67d4 beqs 52f46 <fat_file_truncate+0x80> <== ALWAYS TAKEN
{
rc = fat_set_fat_cluster(mt_entry, new_last_cln, FAT_GENFAT_EOC);
52f72: 4878 ffff pea ffffffff <LESS> <== NOT EXECUTED 52f76: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 52f7a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 52f7c: 4eb9 0005 b9da jsr 5b9da <fat_set_fat_cluster> <== NOT EXECUTED
if ( rc != RC_OK )
52f82: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 52f86: 4a80 tstl %d0 <== NOT EXECUTED 52f88: 66bc bnes 52f46 <fat_file_truncate+0x80> <== NOT EXECUTED
return rc;
fat_fd->map.file_cln = cl_start - 1;
fat_fd->map.disk_cln = new_last_cln;
52f8a: 222e fffc movel %fp@(-4),%d1 <== NOT EXECUTED
if (cl_start != 0)
{
rc = fat_set_fat_cluster(mt_entry, new_last_cln, FAT_GENFAT_EOC);
if ( rc != RC_OK )
return rc;
fat_fd->map.file_cln = cl_start - 1;
52f8e: 5382 subql #1,%d2 <== NOT EXECUTED
fat_fd->map.disk_cln = new_last_cln;
52f90: 2741 0036 movel %d1,%a3@(54) <== NOT EXECUTED
if (cl_start != 0)
{
rc = fat_set_fat_cluster(mt_entry, new_last_cln, FAT_GENFAT_EOC);
if ( rc != RC_OK )
return rc;
fat_fd->map.file_cln = cl_start - 1;
52f94: 2742 0032 movel %d2,%a3@(50) <== NOT EXECUTED
fat_fd->map.disk_cln = new_last_cln;
fat_fd->map.last_cln = new_last_cln;
52f98: 2741 003a movel %d1,%a3@(58) <== NOT EXECUTED
}
return RC_OK;
}
52f9c: 4cee 1c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a4 <== NOT EXECUTED 52fa2: 4e5e unlk %fp <== NOT EXECUTED 52fa4: 4e75 rts <== NOT EXECUTED
if ( new_length >= fat_fd->fat_file_size )
return rc;
assert(fat_fd->fat_file_size);
52fa6: 4879 0006 d91a pea 6d91a <rtems_filesystem_handlers_default+0x38><== NOT EXECUTED 52fac: 4879 0006 d978 pea 6d978 <__FUNCTION__.6164> <== NOT EXECUTED 52fb2: 4878 026d pea 26d <DBL_MANT_DIG+0x238> <== NOT EXECUTED 52fb6: 4879 0006 d930 pea 6d930 <rtems_filesystem_handlers_default+0x4e><== NOT EXECUTED 52fbc: 4eb9 0005 5c24 jsr 55c24 <__assert_func> <== NOT EXECUTED
00053332 <fat_file_write>:
fat_file_fd_t *fat_fd,
uint32_t start,
uint32_t count,
const uint8_t *buf
)
{
53332: 4e56 ffc8 linkw %fp,#-56 53336: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 5333a: 246e 0008 moveal %fp@(8),%a2 5333e: 286e 000c moveal %fp@(12),%a4 53342: 282e 0010 movel %fp@(16),%d4 53346: 242e 0014 movel %fp@(20),%d2 5334a: 2a6e 0018 moveal %fp@(24),%a5
int rc = 0;
ssize_t ret = 0;
fat_fs_info_t *fs_info = mt_entry->fs_info;
5334e: 266a 0034 moveal %a2@(52),%a3
uint32_t cmpltd = 0;
uint32_t cur_cln = 0;
53352: 42ae fff8 clrl %fp@(-8)
uint32_t cl_start = 0;
uint32_t ofs = 0;
uint32_t save_ofs;
uint32_t sec = 0;
uint32_t byte = 0;
uint32_t c = 0;
53356: 42ae fffc clrl %fp@(-4)
if ( count == 0 )
5335a: 4a82 tstl %d2 5335c: 6700 0128 beqw 53486 <fat_file_write+0x154>
return cmpltd;
if ( start > fat_fd->fat_file_size )
53360: b8ac 0018 cmpl %a4@(24),%d4 53364: 6200 01a4 bhiw 5350a <fat_file_write+0x1d8>
rtems_set_errno_and_return_minus_one( EIO );
if ((count > fat_fd->size_limit) ||
53368: 202c 0014 movel %a4@(20),%d0 5336c: b082 cmpl %d2,%d0 5336e: 6500 019a bcsw 5350a <fat_file_write+0x1d8>
(start > fat_fd->size_limit - count))
53372: 9082 subl %d2,%d0
return cmpltd;
if ( start > fat_fd->fat_file_size )
rtems_set_errno_and_return_minus_one( EIO );
if ((count > fat_fd->size_limit) ||
53374: b084 cmpl %d4,%d0 53376: 6500 0192 bcsw 5350a <fat_file_write+0x1d8>
(start > fat_fd->size_limit - count))
rtems_set_errno_and_return_minus_one( EIO );
rc = fat_file_extend(mt_entry, fat_fd, start + count, &c);
5337a: 486e fffc pea %fp@(-4) 5337e: 2602 movel %d2,%d3 53380: d684 addl %d4,%d3 53382: 2f03 movel %d3,%sp@- 53384: 2f0c movel %a4,%sp@- 53386: 2f0a movel %a2,%sp@- 53388: 4eb9 0005 3162 jsr 53162 <fat_file_extend>
if (rc != RC_OK)
5338e: 4fef 0010 lea %sp@(16),%sp 53392: 4a80 tstl %d0 53394: 6600 00f2 bnew 53488 <fat_file_write+0x156>
/*
* check whether there was enough room on device to locate
* file of 'start + count' bytes
*/
if (c != (start + count))
53398: 202e fffc movel %fp@(-4),%d0 5339c: b083 cmpl %d3,%d0
5339e: 6704 beqs 533a4 <fat_file_write+0x72> <== ALWAYS TAKEN
count = c - start;
533a0: 2400 movel %d0,%d2 <== NOT EXECUTED 533a2: 9484 subl %d4,%d2 <== NOT EXECUTED
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
533a4: 7001 moveq #1,%d0 533a6: b0ac 0020 cmpl %a4@(32),%d0 533aa: 6700 00e6 beqw 53492 <fat_file_write+0x160>
return -1;
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
533ae: 4280 clrl %d0 533b0: 102b 0008 moveb %a3@(8),%d0
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
533b4: 260e movel %fp,%d3 533b6: 5183 subql #8,%d3
return -1;
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
533b8: 2c04 movel %d4,%d6 533ba: e0ae lsrl %d0,%d6
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
533bc: 3a2b 0006 movew %a3@(6),%d5
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
533c0: 2f03 movel %d3,%sp@- 533c2: 2f06 movel %d6,%sp@- 533c4: 2f0c movel %a4,%sp@-
return -1;
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
533c6: 2d46 fff4 movel %d6,%fp@(-12)
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
533ca: 2f0a movel %a2,%sp@- 533cc: 4eba f546 jsr %pc@(52914 <fat_file_lseek>)
if (rc != RC_OK)
533d0: 4fef 0010 lea %sp@(16),%sp
}
cl_start = start >> fs_info->vol.bpc_log2;
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
533d4: 2001 movel %d1,%d0
if (rc != RC_OK)
533d6: 6600 00b0 bnew 53488 <fat_file_write+0x156>
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
533da: 0285 0000 ffff andil #65535,%d5 533e0: 5385 subql #1,%d5 533e2: c885 andl %d5,%d4 533e4: 2d44 fff0 movel %d4,%fp@(-16)
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
533e8: 4a82 tstl %d2 533ea: 6700 019e beqw 5358a <fat_file_write+0x258> 533ee: 2e2e fff0 movel %fp@(-16),%d7 533f2: 4284 clrl %d4
{
c = MIN(count, (fs_info->vol.bpc - ofs));
533f4: 4280 clrl %d0
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
533f6: 226e fff8 moveal %fp@(-8),%a1 533fa: 2209 movel %a1,%d1 533fc: 5581 subql #2,%d1
if (rc != RC_OK)
return rc;
while (count > 0)
{
c = MIN(count, (fs_info->vol.bpc - ofs));
533fe: 302b 0006 movew %a3@(6),%d0 53402: 9087 subl %d7,%d0 53404: b480 cmpl %d0,%d2
53406: 6402 bccs 5340a <fat_file_write+0xd8>
53408: 2002 movel %d2,%d0
fat_fd->map.disk_cln = cur_cln;
*disk_cln = cur_cln;
}
return RC_OK;
}
5340a: 206a 0034 moveal %a2@(52),%a0
if (rc != RC_OK)
return rc;
while (count > 0)
{
c = MIN(count, (fs_info->vol.bpc - ofs));
5340e: 2d40 fffc movel %d0,%fp@(-4)
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
53412: 4a89 tstl %a1 53414: 6600 00e4 bnew 534fa <fat_file_write+0x1c8>
53418: 4285 clrl %d5 <== NOT EXECUTED 5341a: 1a28 000a moveb %a0@(10),%d5 <== NOT EXECUTED 5341e: 7c03 moveq #3,%d6 <== NOT EXECUTED 53420: ca86 andl %d6,%d5 <== NOT EXECUTED 53422: 6700 00d6 beqw 534fa <fat_file_write+0x1c8> <== NOT EXECUTED
return fs_info->vol.rdir_loc;
53426: 2228 001a movel %a0@(26),%d1 <== NOT EXECUTED
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
sec += (ofs >> fs_info->vol.sec_log2);
byte = ofs & (fs_info->vol.bps - 1);
ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd);
5342a: 4875 4800 pea %a5@(00000000,%d4:l) 5342e: 2041 moveal %d1,%a0 53430: 2f00 movel %d0,%sp@-
{
c = MIN(count, (fs_info->vol.bpc - ofs));
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
sec += (ofs >> fs_info->vol.sec_log2);
byte = ofs & (fs_info->vol.bps - 1);
53432: 4280 clrl %d0 53434: 3013 movew %a3@,%d0 53436: 5380 subql #1,%d0
ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd);
53438: c087 andl %d7,%d0 5343a: 2f00 movel %d0,%sp@-
while (count > 0)
{
c = MIN(count, (fs_info->vol.bpc - ofs));
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
sec += (ofs >> fs_info->vol.sec_log2);
5343c: 4280 clrl %d0 5343e: 102b 0002 moveb %a3@(2),%d0 53442: e0af lsrl %d0,%d7
byte = ofs & (fs_info->vol.bps - 1);
ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd);
53444: 4870 7800 pea %a0@(00000000,%d7:l) 53448: 2f0a movel %a2,%sp@- 5344a: 4eb9 0005 3c96 jsr 53c96 <_fat_block_write>
if ( ret < 0 )
53450: 4fef 0014 lea %sp@(20),%sp 53454: 4a80 tstl %d0 53456: 6d00 0096 bltw 534ee <fat_file_write+0x1bc>
return -1;
count -= c;
cmpltd += c;
save_cln = cur_cln;
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
5345a: 2f03 movel %d3,%sp@-
if ( ret < 0 )
return -1;
count -= c;
cmpltd += c;
save_cln = cur_cln;
5345c: 2e2e fff8 movel %fp@(-8),%d7
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
53460: 2f07 movel %d7,%sp@-
ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd);
if ( ret < 0 )
return -1;
count -= c;
53462: 202e fffc movel %fp@(-4),%d0 53466: 9480 subl %d0,%d2
cmpltd += c;
53468: d880 addl %d0,%d4
save_cln = cur_cln;
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
5346a: 2f0a movel %a2,%sp@- 5346c: 4eb9 0005 b828 jsr 5b828 <fat_get_fat_cluster>
if ( rc != RC_OK )
53472: 4fef 000c lea %sp@(12),%sp 53476: 4a80 tstl %d0
53478: 660e bnes 53488 <fat_file_write+0x156> <== NEVER TAKEN
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
5347a: 4a82 tstl %d2 5347c: 6700 00e2 beqw 53560 <fat_file_write+0x22e>
save_cln = cur_cln;
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
if ( rc != RC_OK )
return rc;
ofs = 0;
53480: 4287 clrl %d7 53482: 6000 ff70 braw 533f4 <fat_file_write+0xc2>
uint32_t sec = 0;
uint32_t byte = 0;
uint32_t c = 0;
if ( count == 0 )
return cmpltd;
53486: 4280 clrl %d0 <== NOT EXECUTED
fat_fd->map.file_cln = cl_start +
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
fat_fd->map.disk_cln = save_cln;
return cmpltd;
}
53488: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 5348e: 4e5e unlk %fp 53490: 4e75 rts
* file of 'start + count' bytes
*/
if (c != (start + count))
count = c - start;
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
53492: 4aac 0024 tstl %a4@(36) 53496: 6600 ff16 bnew 533ae <fat_file_write+0x7c>
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
5349a: 4280 clrl %d0 5349c: 102b 000a moveb %a3@(10),%d0 534a0: 7203 moveq #3,%d1 534a2: c081 andl %d1,%d0
* file of 'start + count' bytes
*/
if (c != (start + count))
count = c - start;
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
534a4: 6700 ff08 beqw 533ae <fat_file_write+0x7c>
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln);
534a8: 202c 001c movel %a4@(28),%d0
fat_fd->map.disk_cln = cur_cln;
*disk_cln = cur_cln;
}
return RC_OK;
}
534ac: 206a 0034 moveal %a2@(52),%a0
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
534b0: 6670 bnes 53522 <fat_file_write+0x1f0> <== NEVER TAKEN
534b2: 4281 clrl %d1 534b4: 1228 000a moveb %a0@(10),%d1 534b8: 7603 moveq #3,%d3 534ba: c283 andl %d3,%d1
534bc: 6764 beqs 53522 <fat_file_write+0x1f0> <== NEVER TAKEN
return fs_info->vol.rdir_loc;
534be: 2028 001a movel %a0@(26),%d0
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln);
sec += (start >> fs_info->vol.sec_log2);
byte = start & (fs_info->vol.bps - 1);
534c2: 4281 clrl %d1
ret = _fat_block_write(mt_entry, sec, byte, count, buf);
534c4: 2040 moveal %d0,%a0 534c6: 2f0d movel %a5,%sp@- 534c8: 2f02 movel %d2,%sp@-
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln);
sec += (start >> fs_info->vol.sec_log2);
byte = start & (fs_info->vol.bps - 1);
534ca: 3213 movew %a3@,%d1 534cc: 5381 subql #1,%d1
ret = _fat_block_write(mt_entry, sec, byte, count, buf);
534ce: c284 andl %d4,%d1 534d0: 2f01 movel %d1,%sp@-
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln);
sec += (start >> fs_info->vol.sec_log2);
534d2: 4281 clrl %d1 534d4: 122b 0002 moveb %a3@(2),%d1 534d8: e2ac lsrl %d1,%d4
byte = start & (fs_info->vol.bps - 1);
ret = _fat_block_write(mt_entry, sec, byte, count, buf);
534da: 4870 4800 pea %a0@(00000000,%d4:l) 534de: 2f0a movel %a2,%sp@- 534e0: 4eb9 0005 3c96 jsr 53c96 <_fat_block_write>
if ( ret < 0 )
534e6: 4fef 0014 lea %sp@(20),%sp 534ea: 4a80 tstl %d0
534ec: 6c9a bges 53488 <fat_file_write+0x156> <== ALWAYS TAKEN
sec += (ofs >> fs_info->vol.sec_log2);
byte = ofs & (fs_info->vol.bps - 1);
ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd);
if ( ret < 0 )
return -1;
534ee: 70ff moveq #-1,%d0 <== NOT EXECUTED
fat_fd->map.file_cln = cl_start +
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
fat_fd->map.disk_cln = save_cln;
return cmpltd;
}
534f0: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED 534f6: 4e5e unlk %fp <== NOT EXECUTED 534f8: 4e75 rts <== NOT EXECUTED
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
534fa: 4285 clrl %d5 534fc: 1a28 0005 moveb %a0@(5),%d5 53500: eba9 lsll %d5,%d1 53502: d2a8 002c addl %a0@(44),%d1 53506: 6000 ff22 braw 5342a <fat_file_write+0xf8>
if ( start > fat_fd->fat_file_size )
rtems_set_errno_and_return_minus_one( EIO );
if ((count > fat_fd->size_limit) ||
(start > fat_fd->size_limit - count))
rtems_set_errno_and_return_minus_one( EIO );
5350a: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 53510: 7805 moveq #5,%d4 <== NOT EXECUTED 53512: 2040 moveal %d0,%a0 <== NOT EXECUTED 53514: 70ff moveq #-1,%d0 <== NOT EXECUTED 53516: 2084 movel %d4,%a0@ <== NOT EXECUTED
fat_fd->map.file_cln = cl_start +
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
fat_fd->map.disk_cln = save_cln;
return cmpltd;
}
53518: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5351e: 4e5e unlk %fp <== NOT EXECUTED 53520: 4e75 rts <== NOT EXECUTED 53522: 4281 clrl %d1 <== NOT EXECUTED 53524: 1228 0005 moveb %a0@(5),%d1 <== NOT EXECUTED 53528: 5580 subql #2,%d0 <== NOT EXECUTED 5352a: e3a8 lsll %d1,%d0 <== NOT EXECUTED
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln);
sec += (start >> fs_info->vol.sec_log2);
byte = start & (fs_info->vol.bps - 1);
5352c: 4281 clrl %d1 <== NOT EXECUTED 5352e: d0a8 002c addl %a0@(44),%d0 <== NOT EXECUTED
ret = _fat_block_write(mt_entry, sec, byte, count, buf);
53532: 2040 moveal %d0,%a0 <== NOT EXECUTED 53534: 2f0d movel %a5,%sp@- <== NOT EXECUTED 53536: 2f02 movel %d2,%sp@- <== NOT EXECUTED
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln);
sec += (start >> fs_info->vol.sec_log2);
byte = start & (fs_info->vol.bps - 1);
53538: 3213 movew %a3@,%d1 <== NOT EXECUTED 5353a: 5381 subql #1,%d1 <== NOT EXECUTED
ret = _fat_block_write(mt_entry, sec, byte, count, buf);
5353c: c284 andl %d4,%d1 <== NOT EXECUTED 5353e: 2f01 movel %d1,%sp@- <== NOT EXECUTED
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln);
sec += (start >> fs_info->vol.sec_log2);
53540: 4281 clrl %d1 <== NOT EXECUTED 53542: 122b 0002 moveb %a3@(2),%d1 <== NOT EXECUTED 53546: e2ac lsrl %d1,%d4 <== NOT EXECUTED
byte = start & (fs_info->vol.bps - 1);
ret = _fat_block_write(mt_entry, sec, byte, count, buf);
53548: 4870 4800 pea %a0@(00000000,%d4:l) <== NOT EXECUTED 5354c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5354e: 4eb9 0005 3c96 jsr 53c96 <_fat_block_write> <== NOT EXECUTED
if ( ret < 0 )
53554: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 53558: 4a80 tstl %d0 <== NOT EXECUTED 5355a: 6c00 ff2c bgew 53488 <fat_file_write+0x156> <== NOT EXECUTED 5355e: 608e bras 534ee <fat_file_write+0x1bc> <== NOT EXECUTED
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
53560: 206e fff0 moveal %fp@(-16),%a0 53564: 4282 clrl %d2 53566: 142b 0008 moveb %a3@(8),%d2
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
5356a: 2004 movel %d4,%d0
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
5356c: 41f0 48ff lea %a0@(ffffffff,%d4:l),%a0
fat_fd->map.disk_cln = save_cln;
53570: 2947 0036 movel %d7,%a4@(54)
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
53574: 2208 movel %a0,%d1 53576: e4a9 lsrl %d2,%d1
ofs = 0;
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
53578: d2ae fff4 addl %fp@(-12),%d1 5357c: 2941 0032 movel %d1,%a4@(50)
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
fat_fd->map.disk_cln = save_cln;
return cmpltd;
}
53580: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 53586: 4e5e unlk %fp 53588: 4e75 rts
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
5358a: 206e fff0 moveal %fp@(-16),%a0 <== NOT EXECUTED
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
5358e: 4284 clrl %d4 <== NOT EXECUTED
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
53590: 4282 clrl %d2 <== NOT EXECUTED 53592: 142b 0008 moveb %a3@(8),%d2 <== NOT EXECUTED
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
53596: 4287 clrl %d7 <== NOT EXECUTED
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
53598: 41f0 48ff lea %a0@(ffffffff,%d4:l),%a0 <== NOT EXECUTED
fat_fd->map.disk_cln = save_cln;
5359c: 2947 0036 movel %d7,%a4@(54) <== NOT EXECUTED
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
535a0: 2208 movel %a0,%d1 <== NOT EXECUTED 535a2: e4a9 lsrl %d2,%d1 <== NOT EXECUTED
ofs = 0;
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
535a4: d2ae fff4 addl %fp@(-12),%d1 <== NOT EXECUTED 535a8: 2941 0032 movel %d1,%a4@(50) <== NOT EXECUTED 535ac: 60d2 bras 53580 <fat_file_write+0x24e> <== NOT EXECUTED
0005bc70 <fat_free_fat_clusters_chain>:
int
fat_free_fat_clusters_chain(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t chain
)
{
5bc70: 4e56 ffd4 linkw %fp,#-44 5bc74: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 5bc78: 266e 0008 moveal %fp@(8),%a3 5bc7c: 2e2e 000c movel %fp@(12),%d7
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = chain;
uint32_t next_cln = 0;
uint32_t freed_cls_cnt = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
5bc80: 2007 movel %d7,%d0
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t chain
)
{
int rc = RC_OK, rc1 = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
5bc82: 246b 0034 moveal %a3@(52),%a2
uint32_t cur_cln = chain;
uint32_t next_cln = 0;
uint32_t freed_cls_cnt = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
5bc86: c0aa 000c andl %a2@(12),%d0
)
{
int rc = RC_OK, rc1 = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = chain;
uint32_t next_cln = 0;
5bc8a: 42ae fffc clrl %fp@(-4)
uint32_t freed_cls_cnt = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
5bc8e: b0aa 0010 cmpl %a2@(16),%d0 5bc92: 6400 009e bccw 5bd32 <fat_free_fat_clusters_chain+0xc2> 5bc96: 2a0e movel %fp,%d5 5bc98: 2407 movel %d7,%d2 5bc9a: 4284 clrl %d4 5bc9c: 4286 clrl %d6 5bc9e: 5985 subql #4,%d5 5bca0: 49f9 0005 b828 lea 5b828 <fat_get_fat_cluster>,%a4
fat_buf_release(fs_info);
return rc;
}
rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE);
5bca6: 4bf9 0005 b9da lea 5b9da <fat_set_fat_cluster>,%a5
uint32_t next_cln = 0;
uint32_t freed_cls_cnt = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
{
rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln);
5bcac: 2f05 movel %d5,%sp@- 5bcae: 2f02 movel %d2,%sp@- 5bcb0: 2f0b movel %a3,%sp@- 5bcb2: 4e94 jsr %a4@
if ( rc != RC_OK )
5bcb4: 4fef 000c lea %sp@(12),%sp
uint32_t next_cln = 0;
uint32_t freed_cls_cnt = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
{
rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln);
5bcb8: 2600 movel %d0,%d3
if ( rc != RC_OK )
5bcba: 6650 bnes 5bd0c <fat_free_fat_clusters_chain+0x9c><== NEVER TAKEN
fat_buf_release(fs_info);
return rc;
}
rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE);
5bcbc: 42a7 clrl %sp@-
if ( rc != RC_OK )
rc1 = rc;
freed_cls_cnt++;
5bcbe: 5284 addql #1,%d4
fat_buf_release(fs_info);
return rc;
}
rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE);
5bcc0: 2f02 movel %d2,%sp@- 5bcc2: 2f0b movel %a3,%sp@- 5bcc4: 4e95 jsr %a5@
if ( rc != RC_OK )
5bcc6: 4fef 000c lea %sp@(12),%sp 5bcca: 4a80 tstl %d0
5bccc: 6702 beqs 5bcd0 <fat_free_fat_clusters_chain+0x60><== ALWAYS TAKEN
5bcce: 2c00 movel %d0,%d6 <== NOT EXECUTED
rc1 = rc;
freed_cls_cnt++;
cur_cln = next_cln;
5bcd0: 242e fffc movel %fp@(-4),%d2
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = chain;
uint32_t next_cln = 0;
uint32_t freed_cls_cnt = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
5bcd4: 2002 movel %d2,%d0 5bcd6: c0aa 000c andl %a2@(12),%d0 5bcda: b0aa 0010 cmpl %a2@(16),%d0
5bcde: 65cc bcss 5bcac <fat_free_fat_clusters_chain+0x3c><== NEVER TAKEN
freed_cls_cnt++;
cur_cln = next_cln;
}
fs_info->vol.next_cl = chain;
if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE)
5bce0: 202a 003a movel %a2@(58),%d0 5bce4: 72ff moveq #-1,%d1
freed_cls_cnt++;
cur_cln = next_cln;
}
fs_info->vol.next_cl = chain;
5bce6: 2547 003e movel %d7,%a2@(62)
if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE)
5bcea: b280 cmpl %d0,%d1
5bcec: 6706 beqs 5bcf4 <fat_free_fat_clusters_chain+0x84><== ALWAYS TAKEN
fs_info->vol.free_cls += freed_cls_cnt;
5bcee: d880 addl %d0,%d4 <== NOT EXECUTED 5bcf0: 2544 003a movel %d4,%a2@(58) <== NOT EXECUTED
fat_buf_release(fs_info);
5bcf4: 2f0a movel %a2,%sp@- 5bcf6: 2606 movel %d6,%d3 5bcf8: 4eb9 0005 3a90 jsr 53a90 <fat_buf_release> 5bcfe: 588f addql #4,%sp
if (rc1 != RC_OK)
return rc1;
return RC_OK;
}
5bd00: 2003 movel %d3,%d0 5bd02: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 5bd08: 4e5e unlk %fp 5bd0a: 4e75 rts
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
{
rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln);
if ( rc != RC_OK )
{
if(fs_info->vol.free_cls != FAT_UNDEFINED_VALUE)
5bd0c: 202a 003a movel %a2@(58),%d0 <== NOT EXECUTED 5bd10: 72ff moveq #-1,%d1 <== NOT EXECUTED 5bd12: b280 cmpl %d0,%d1 <== NOT EXECUTED 5bd14: 6706 beqs 5bd1c <fat_free_fat_clusters_chain+0xac><== NOT EXECUTED
fs_info->vol.free_cls += freed_cls_cnt;
5bd16: d880 addl %d0,%d4 <== NOT EXECUTED 5bd18: 2544 003a movel %d4,%a2@(58) <== NOT EXECUTED
fat_buf_release(fs_info);
5bd1c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5bd1e: 4eb9 0005 3a90 jsr 53a90 <fat_buf_release> <== NOT EXECUTED
return rc;
5bd24: 588f addql #4,%sp <== NOT EXECUTED
fat_buf_release(fs_info);
if (rc1 != RC_OK)
return rc1;
return RC_OK;
}
5bd26: 2003 movel %d3,%d0 <== NOT EXECUTED 5bd28: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5bd2e: 4e5e unlk %fp <== NOT EXECUTED 5bd30: 4e75 rts <== NOT EXECUTED
freed_cls_cnt++;
cur_cln = next_cln;
}
fs_info->vol.next_cl = chain;
if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE)
5bd32: 202a 003a movel %a2@(58),%d0 <== NOT EXECUTED
{
int rc = RC_OK, rc1 = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = chain;
uint32_t next_cln = 0;
uint32_t freed_cls_cnt = 0;
5bd36: 4284 clrl %d4 <== NOT EXECUTED
fat_free_fat_clusters_chain(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t chain
)
{
int rc = RC_OK, rc1 = RC_OK;
5bd38: 4286 clrl %d6 <== NOT EXECUTED
freed_cls_cnt++;
cur_cln = next_cln;
}
fs_info->vol.next_cl = chain;
if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE)
5bd3a: 72ff moveq #-1,%d1 <== NOT EXECUTED
freed_cls_cnt++;
cur_cln = next_cln;
}
fs_info->vol.next_cl = chain;
5bd3c: 2547 003e movel %d7,%a2@(62) <== NOT EXECUTED
if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE)
5bd40: b280 cmpl %d0,%d1 <== NOT EXECUTED 5bd42: 66aa bnes 5bcee <fat_free_fat_clusters_chain+0x7e><== NOT EXECUTED 5bd44: 60ae bras 5bcf4 <fat_free_fat_clusters_chain+0x84><== NOT EXECUTED
00054032 <fat_free_unique_ino>:
uint32_t ino
)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino);
54032: 7001 moveq #1,%d0 <== NOT EXECUTED
void
fat_free_unique_ino(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t ino
)
{
54034: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
54038: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino);
5403c: 222e 000c movel %fp@(12),%d1 <== NOT EXECUTED
fat_free_unique_ino(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t ino
)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
54040: 2268 0034 moveal %a0@(52),%a1 <== NOT EXECUTED
FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino);
54044: 92a9 006e subl %a1@(110),%d1 <== NOT EXECUTED
void
fat_free_unique_ino(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t ino
)
{
54048: 2f02 movel %d2,%sp@- <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino);
5404a: 2401 movel %d1,%d2 <== NOT EXECUTED 5404c: e68a lsrl #3,%d2 <== NOT EXECUTED 5404e: 2069 0062 moveal %a1@(98),%a0 <== NOT EXECUTED 54052: d1c2 addal %d2,%a0 <== NOT EXECUTED 54054: 7407 moveq #7,%d2 <== NOT EXECUTED 54056: c282 andl %d2,%d1 <== NOT EXECUTED 54058: 1410 moveb %a0@,%d2 <== NOT EXECUTED 5405a: e3a8 lsll %d1,%d0 <== NOT EXECUTED 5405c: 4680 notl %d0 <== NOT EXECUTED 5405e: c082 andl %d2,%d0 <== NOT EXECUTED 54060: 1080 moveb %d0,%a0@ <== NOT EXECUTED
}
54062: 241f movel %sp@+,%d2 <== NOT EXECUTED 54064: 4e5e unlk %fp <== NOT EXECUTED
0005b828 <fat_get_fat_cluster>:
rtems_bdbuf_buffer *block0 = NULL;
uint32_t sec = 0;
uint32_t ofs = 0;
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
5b828: 7001 moveq #1,%d0
fat_get_fat_cluster(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
uint32_t *ret_val
)
{
5b82a: 4e56 ffdc linkw %fp,#-36
int rc = RC_OK;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
5b82e: 206e 0008 moveal %fp@(8),%a0
fat_get_fat_cluster(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
uint32_t *ret_val
)
{
5b832: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 5b836: 242e 000c movel %fp@(12),%d2 5b83a: 286e 0010 moveal %fp@(16),%a4
int rc = RC_OK;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
5b83e: 2468 0034 moveal %a0@(52),%a2
rtems_bdbuf_buffer *block0 = NULL;
5b842: 42ae fffc clrl %fp@(-4)
uint32_t sec = 0;
uint32_t ofs = 0;
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
5b846: b082 cmpl %d2,%d0
5b848: 6474 bccs 5b8be <fat_get_fat_cluster+0x96> <== NEVER TAKEN
5b84a: 202a 0030 movel %a2@(48),%d0 5b84e: 5280 addql #1,%d0 5b850: b082 cmpl %d2,%d0
5b852: 656a bcss 5b8be <fat_get_fat_cluster+0x96> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
5b854: 4280 clrl %d0 5b856: 102a 000a moveb %a2@(10),%d0 5b85a: 2a02 movel %d2,%d5 5b85c: 0800 0000 btst #0,%d0
5b860: 6676 bnes 5b8d8 <fat_get_fat_cluster+0xb0> <== ALWAYS TAKEN
5b862: 0800 0001 btst #1,%d0 <== NOT EXECUTED 5b866: 6776 beqs 5b8de <fat_get_fat_cluster+0xb6> <== NOT EXECUTED 5b868: da85 addl %d5,%d5 <== NOT EXECUTED
5b86a: 4280 clrl %d0 5b86c: 102a 0002 moveb %a2@(2),%d0 5b870: 2605 movel %d5,%d3 5b872: e0ab lsrl %d0,%d3 5b874: d6aa 0044 addl %a2@(68),%d3
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0);
5b878: 47f9 0005 387c lea 5387c <fat_buf_access>,%a3
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
5b87e: 3c12 movew %a2@,%d6
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0);
5b880: 486e fffc pea %fp@(-4) 5b884: 4878 0001 pea 1 <ADD> 5b888: 2f03 movel %d3,%sp@- 5b88a: 2f0a movel %a2,%sp@- 5b88c: 4e93 jsr %a3@
if (rc != RC_OK)
5b88e: 4fef 0010 lea %sp@(16),%sp
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0);
5b892: 2800 movel %d0,%d4
if (rc != RC_OK)
5b894: 6636 bnes 5b8cc <fat_get_fat_cluster+0xa4> <== NEVER TAKEN
return rc;
switch ( fs_info->vol.type )
5b896: 4280 clrl %d0 5b898: 102a 000a moveb %a2@(10),%d0 5b89c: 7202 moveq #2,%d1
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
5b89e: 0286 0000 ffff andil #65535,%d6 5b8a4: 5386 subql #1,%d6 5b8a6: ca86 andl %d6,%d5
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0);
if (rc != RC_OK)
return rc;
switch ( fs_info->vol.type )
5b8a8: b280 cmpl %d0,%d1 5b8aa: 6700 00b2 beqw 5b95e <fat_get_fat_cluster+0x136> 5b8ae: 123c 0004 moveb #4,%d1 5b8b2: b280 cmpl %d0,%d1
5b8b4: 676a beqs 5b920 <fat_get_fat_cluster+0xf8> <== NEVER TAKEN
5b8b6: 123c 0001 moveb #1,%d1 5b8ba: b280 cmpl %d0,%d1
5b8bc: 6724 beqs 5b8e2 <fat_get_fat_cluster+0xba> <== ALWAYS TAKEN
*ret_val = *((uint32_t *)(block0->buffer + ofs));
*ret_val = CF_LE_L(*ret_val);
break;
default:
rtems_set_errno_and_return_minus_one(EIO);
5b8be: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 5b8c4: 78ff moveq #-1,%d4 <== NOT EXECUTED 5b8c6: 2040 moveal %d0,%a0 <== NOT EXECUTED 5b8c8: 7005 moveq #5,%d0 <== NOT EXECUTED 5b8ca: 2080 movel %d0,%a0@ <== NOT EXECUTED
break;
}
return RC_OK;
}
5b8cc: 2004 movel %d4,%d0 <== NOT EXECUTED 5b8ce: 4cee 1c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a4 <== NOT EXECUTED 5b8d4: 4e5e unlk %fp <== NOT EXECUTED 5b8d6: 4e75 rts <== NOT EXECUTED
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
5b8d8: e28d lsrl #1,%d5 5b8da: da82 addl %d2,%d5 5b8dc: 608c bras 5b86a <fat_get_fat_cluster+0x42>
5b8de: e58d lsll #2,%d5 <== NOT EXECUTED 5b8e0: 6088 bras 5b86a <fat_get_fat_cluster+0x42> <== NOT EXECUTED
case FAT_FAT12:
/*
* we are enforced in complex computations for FAT12 to escape CPU
* align problems for some architectures
*/
*ret_val = (*((uint8_t *)(block0->buffer + ofs)));
5b8e2: 206e fffc moveal %fp@(-4),%a0 5b8e6: 4281 clrl %d1
if ( ofs == (fs_info->vol.bps - 1) )
5b8e8: 4280 clrl %d0
case FAT_FAT12:
/*
* we are enforced in complex computations for FAT12 to escape CPU
* align problems for some architectures
*/
*ret_val = (*((uint8_t *)(block0->buffer + ofs)));
5b8ea: 2068 001e moveal %a0@(30),%a0 5b8ee: 1230 5800 moveb %a0@(00000000,%d5:l),%d1
if ( ofs == (fs_info->vol.bps - 1) )
5b8f2: 3012 movew %a2@,%d0
case FAT_FAT12:
/*
* we are enforced in complex computations for FAT12 to escape CPU
* align problems for some architectures
*/
*ret_val = (*((uint8_t *)(block0->buffer + ofs)));
5b8f4: 2881 movel %d1,%a4@
if ( ofs == (fs_info->vol.bps - 1) )
5b8f6: 5380 subql #1,%d0 5b8f8: ba80 cmpl %d0,%d5 5b8fa: 6700 00a0 beqw 5b99c <fat_get_fat_cluster+0x174>
*ret_val |= (*((uint8_t *)(block0->buffer)))<<8;
}
else
{
*ret_val |= (*((uint8_t *)(block0->buffer + ofs + 1)))<<8;
5b8fe: 4280 clrl %d0 5b900: 1030 5801 moveb %a0@(00000001,%d5:l),%d0 5b904: e188 lsll #8,%d0 5b906: 8081 orl %d1,%d0 5b908: 2880 movel %d0,%a4@
}
if ( FAT_CLUSTER_IS_ODD(cln) )
5b90a: 0802 0000 btst #0,%d2
5b90e: 6778 beqs 5b988 <fat_get_fat_cluster+0x160>
*ret_val = (*ret_val) >> FAT12_SHIFT;
5b910: e888 lsrl #4,%d0 5b912: 2880 movel %d0,%a4@
rtems_set_errno_and_return_minus_one(EIO);
break;
}
return RC_OK;
}
5b914: 2004 movel %d4,%d0 5b916: 4cee 1c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a4 5b91c: 4e5e unlk %fp 5b91e: 4e75 rts
*ret_val = *((uint16_t *)(block0->buffer + ofs));
*ret_val = CF_LE_W(*ret_val);
break;
case FAT_FAT32:
*ret_val = *((uint32_t *)(block0->buffer + ofs));
5b920: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED
uint32_t value
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
5b924: 7018 moveq #24,%d0 <== NOT EXECUTED 5b926: 2068 001e moveal %a0@(30),%a0 <== NOT EXECUTED 5b92a: 2230 5800 movel %a0@(00000000,%d5:l),%d1 <== NOT EXECUTED
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
5b92e: 7a18 moveq #24,%d5 <== NOT EXECUTED
uint32_t value
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
5b930: 2601 movel %d1,%d3 <== NOT EXECUTED 5b932: e0ab lsrl %d0,%d3 <== NOT EXECUTED
byte3 = (value >> 16) & 0xff;
5b934: 2401 movel %d1,%d2 <== NOT EXECUTED
byte2 = (value >> 8) & 0xff;
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
5b936: 2001 movel %d1,%d0 <== NOT EXECUTED
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
5b938: e08a lsrl #8,%d2 <== NOT EXECUTED
byte2 = (value >> 8) & 0xff;
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
5b93a: eba8 lsll %d5,%d0 <== NOT EXECUTED
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
5b93c: e189 lsll #8,%d1 <== NOT EXECUTED
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
5b93e: 0282 0000 ff00 andil #65280,%d2 <== NOT EXECUTED 5b944: 8083 orl %d3,%d0 <== NOT EXECUTED 5b946: 0281 00ff 0000 andil #16711680,%d1 <== NOT EXECUTED 5b94c: 8081 orl %d1,%d0 <== NOT EXECUTED 5b94e: 8082 orl %d2,%d0 <== NOT EXECUTED 5b950: 2880 movel %d0,%a4@ <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
break;
}
return RC_OK;
}
5b952: 2004 movel %d4,%d0 <== NOT EXECUTED 5b954: 4cee 1c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a4 <== NOT EXECUTED 5b95a: 4e5e unlk %fp <== NOT EXECUTED 5b95c: 4e75 rts <== NOT EXECUTED
else
*ret_val = (*ret_val) & FAT_FAT12_MASK;
break;
case FAT_FAT16:
*ret_val = *((uint16_t *)(block0->buffer + ofs));
5b95e: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED
*ret_val = CF_LE_W(*ret_val);
5b962: 4281 clrl %d1 <== NOT EXECUTED
else
*ret_val = (*ret_val) & FAT_FAT12_MASK;
break;
case FAT_FAT16:
*ret_val = *((uint16_t *)(block0->buffer + ofs));
5b964: 2068 001e moveal %a0@(30),%a0 <== NOT EXECUTED
*ret_val = CF_LE_W(*ret_val);
5b968: 3230 5800 movew %a0@(00000000,%d5:l),%d1 <== NOT EXECUTED
static inline uint16_t m68k_swap_u16(
uint16_t value
)
{
return (((value & 0xff) << 8) | ((value >> 8) & 0xff));
5b96c: 2001 movel %d1,%d0 <== NOT EXECUTED 5b96e: e089 lsrl #8,%d1 <== NOT EXECUTED 5b970: e188 lsll #8,%d0 <== NOT EXECUTED 5b972: 0280 0000 ff00 andil #65280,%d0 <== NOT EXECUTED 5b978: 8081 orl %d1,%d0 <== NOT EXECUTED 5b97a: 2880 movel %d0,%a4@ <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
break;
}
return RC_OK;
}
5b97c: 2004 movel %d4,%d0 <== NOT EXECUTED 5b97e: 4cee 1c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a4 <== NOT EXECUTED 5b984: 4e5e unlk %fp <== NOT EXECUTED 5b986: 4e75 rts <== NOT EXECUTED
}
if ( FAT_CLUSTER_IS_ODD(cln) )
*ret_val = (*ret_val) >> FAT12_SHIFT;
else
*ret_val = (*ret_val) & FAT_FAT12_MASK;
5b988: 0280 0000 0fff andil #4095,%d0 5b98e: 2880 movel %d0,%a4@
rtems_set_errno_and_return_minus_one(EIO);
break;
}
return RC_OK;
}
5b990: 2004 movel %d4,%d0 5b992: 4cee 1c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a4 5b998: 4e5e unlk %fp 5b99a: 4e75 rts
* align problems for some architectures
*/
*ret_val = (*((uint8_t *)(block0->buffer + ofs)));
if ( ofs == (fs_info->vol.bps - 1) )
{
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
5b99c: 486e fffc pea %fp@(-4) <== NOT EXECUTED 5b9a0: 2043 moveal %d3,%a0 <== NOT EXECUTED 5b9a2: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 5b9a6: 4868 0001 pea %a0@(1) <== NOT EXECUTED 5b9aa: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5b9ac: 4e93 jsr %a3@ <== NOT EXECUTED
&block0);
if (rc != RC_OK)
5b9ae: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5b9b2: 4a80 tstl %d0 <== NOT EXECUTED 5b9b4: 6616 bnes 5b9cc <fat_get_fat_cluster+0x1a4> <== NOT EXECUTED
return rc;
*ret_val |= (*((uint8_t *)(block0->buffer)))<<8;
5b9b6: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 5b9ba: 4280 clrl %d0 <== NOT EXECUTED 5b9bc: 2068 001e moveal %a0@(30),%a0 <== NOT EXECUTED 5b9c0: 1010 moveb %a0@,%d0 <== NOT EXECUTED 5b9c2: e188 lsll #8,%d0 <== NOT EXECUTED 5b9c4: 8094 orl %a4@,%d0 <== NOT EXECUTED 5b9c6: 2880 movel %d0,%a4@ <== NOT EXECUTED 5b9c8: 6000 ff40 braw 5b90a <fat_get_fat_cluster+0xe2> <== NOT EXECUTED
*ret_val = (*((uint8_t *)(block0->buffer + ofs)));
if ( ofs == (fs_info->vol.bps - 1) )
{
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
&block0);
if (rc != RC_OK)
5b9cc: 2800 movel %d0,%d4 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
break;
}
return RC_OK;
}
5b9ce: 2004 movel %d4,%d0 <== NOT EXECUTED 5b9d0: 4cee 1c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a4 <== NOT EXECUTED 5b9d6: 4e5e unlk %fp <== NOT EXECUTED
00053f70 <fat_get_unique_ino>:
* 0 means FAILED !!!
*
*/
uint32_t
fat_get_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry)
{
53f70: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED
register fat_fs_info_t *fs_info = mt_entry->fs_info;
53f74: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
* 0 means FAILED !!!
*
*/
uint32_t
fat_get_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry)
{
53f78: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ <== NOT EXECUTED
register fat_fs_info_t *fs_info = mt_entry->fs_info;
53f7c: 2468 0034 moveal %a0@(52),%a2 <== NOT EXECUTED
}
if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base))
{
fs_info->uino_pool_size <<= 1;
fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size);
53f80: 47f9 0004 7df8 lea 47df8 <realloc>,%a3 <== NOT EXECUTED
*
*/
uint32_t
fat_get_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
53f86: 242a 006a movel %a2@(106),%d2 <== NOT EXECUTED
uint32_t j = 0;
bool resrc_unsuff = false;
while (!resrc_unsuff)
{
for (j = 0; j < fs_info->uino_pool_size; j++)
53f8a: 4a82 tstl %d2 <== NOT EXECUTED 53f8c: 6768 beqs 53ff6 <fat_get_unique_ino+0x86> <== NOT EXECUTED
{
if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino))
53f8e: 202a 0066 movel %a2@(102),%d0 <== NOT EXECUTED 53f92: 2200 movel %d0,%d1 <== NOT EXECUTED 53f94: e689 lsrl #3,%d1 <== NOT EXECUTED 53f96: 7807 moveq #7,%d4 <== NOT EXECUTED 53f98: 226a 0062 moveal %a2@(98),%a1 <== NOT EXECUTED 53f9c: 41f1 1800 lea %a1@(00000000,%d1:l),%a0 <== NOT EXECUTED 53fa0: 1610 moveb %a0@,%d3 <== NOT EXECUTED 53fa2: c880 andl %d0,%d4 <== NOT EXECUTED 53fa4: 1203 moveb %d3,%d1 <== NOT EXECUTED 53fa6: 49c1 extbl %d1 <== NOT EXECUTED 53fa8: 0901 btst %d4,%d1 <== NOT EXECUTED 53faa: 6730 beqs 53fdc <fat_get_unique_ino+0x6c> <== NOT EXECUTED 53fac: 4281 clrl %d1 <== NOT EXECUTED
{
FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino);
return (fs_info->uino_base + fs_info->index);
}
fs_info->index++;
53fae: 5280 addql #1,%d0 <== NOT EXECUTED
uint32_t j = 0;
bool resrc_unsuff = false;
while (!resrc_unsuff)
{
for (j = 0; j < fs_info->uino_pool_size; j++)
53fb0: 5281 addql #1,%d1 <== NOT EXECUTED
if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino))
{
FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino);
return (fs_info->uino_base + fs_info->index);
}
fs_info->index++;
53fb2: 2540 0066 movel %d0,%a2@(102) <== NOT EXECUTED
if (fs_info->index >= fs_info->uino_pool_size)
53fb6: b480 cmpl %d0,%d2 <== NOT EXECUTED 53fb8: 6204 bhis 53fbe <fat_get_unique_ino+0x4e> <== NOT EXECUTED
fs_info->index = 0;
53fba: 42aa 0066 clrl %a2@(102) <== NOT EXECUTED
uint32_t j = 0;
bool resrc_unsuff = false;
while (!resrc_unsuff)
{
for (j = 0; j < fs_info->uino_pool_size; j++)
53fbe: b481 cmpl %d1,%d2 <== NOT EXECUTED 53fc0: 6734 beqs 53ff6 <fat_get_unique_ino+0x86> <== NOT EXECUTED
{
if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino))
53fc2: 202a 0066 movel %a2@(102),%d0 <== NOT EXECUTED 53fc6: 2600 movel %d0,%d3 <== NOT EXECUTED 53fc8: e68b lsrl #3,%d3 <== NOT EXECUTED 53fca: 41f1 3800 lea %a1@(00000000,%d3:l),%a0 <== NOT EXECUTED 53fce: 7807 moveq #7,%d4 <== NOT EXECUTED 53fd0: 1610 moveb %a0@,%d3 <== NOT EXECUTED 53fd2: c880 andl %d0,%d4 <== NOT EXECUTED 53fd4: 1a03 moveb %d3,%d5 <== NOT EXECUTED 53fd6: 49c5 extbl %d5 <== NOT EXECUTED 53fd8: 0905 btst %d4,%d5 <== NOT EXECUTED 53fda: 66d2 bnes 53fae <fat_get_unique_ino+0x3e> <== NOT EXECUTED
{
FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino);
53fdc: 7001 moveq #1,%d0 <== NOT EXECUTED 53fde: e9a8 lsll %d4,%d0 <== NOT EXECUTED 53fe0: 8083 orl %d3,%d0 <== NOT EXECUTED 53fe2: 1080 moveb %d0,%a0@ <== NOT EXECUTED
return (fs_info->uino_base + fs_info->index);
53fe4: 202a 0066 movel %a2@(102),%d0 <== NOT EXECUTED 53fe8: d0aa 006e addl %a2@(110),%d0 <== NOT EXECUTED
}
else
resrc_unsuff = true;
}
return 0;
}
53fec: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 <== NOT EXECUTED 53ff2: 4e5e unlk %fp <== NOT EXECUTED 53ff4: 4e75 rts <== NOT EXECUTED
fs_info->index++;
if (fs_info->index >= fs_info->uino_pool_size)
fs_info->index = 0;
}
if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base))
53ff6: 203c 0fff ffff movel #268435455,%d0 <== NOT EXECUTED 53ffc: 90aa 006e subl %a2@(110),%d0 <== NOT EXECUTED 54000: d482 addl %d2,%d2 <== NOT EXECUTED 54002: b082 cmpl %d2,%d0 <== NOT EXECUTED 54004: 620c bhis 54012 <fat_get_unique_ino+0xa2> <== NOT EXECUTED
resrc_unsuff = true;
}
else
resrc_unsuff = true;
}
return 0;
54006: 4280 clrl %d0 <== NOT EXECUTED
}
54008: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 <== NOT EXECUTED 5400e: 4e5e unlk %fp <== NOT EXECUTED 54010: 4e75 rts <== NOT EXECUTED
fs_info->index = 0;
}
if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base))
{
fs_info->uino_pool_size <<= 1;
54012: 2542 006a movel %d2,%a2@(106) <== NOT EXECUTED
fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size);
54016: 2f02 movel %d2,%sp@- <== NOT EXECUTED 54018: 2f2a 0062 movel %a2@(98),%sp@- <== NOT EXECUTED 5401c: 4e93 jsr %a3@ <== NOT EXECUTED
if (fs_info->uino != NULL)
5401e: 508f addql #8,%sp <== NOT EXECUTED
}
if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base))
{
fs_info->uino_pool_size <<= 1;
fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size);
54020: 2540 0062 movel %d0,%a2@(98) <== NOT EXECUTED
if (fs_info->uino != NULL)
54024: 67e0 beqs 54006 <fat_get_unique_ino+0x96> <== NOT EXECUTED
fs_info->index = fs_info->uino_pool_size;
54026: 242a 006a movel %a2@(106),%d2 <== NOT EXECUTED 5402a: 2542 0066 movel %d2,%a2@(102) <== NOT EXECUTED 5402e: 6000 ff5a braw 53f8a <fat_get_unique_ino+0x1a> <== NOT EXECUTED
00053e7e <fat_init_clusters_chain>:
ssize_t ret = 0;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = start_cln;
char *buf;
buf = calloc(fs_info->vol.bpc, sizeof(char));
53e7e: 4280 clrl %d0
int
fat_init_clusters_chain(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t start_cln
)
{
53e80: 4e56 ffdc linkw %fp,#-36 53e84: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@
ssize_t ret = 0;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = start_cln;
char *buf;
buf = calloc(fs_info->vol.bpc, sizeof(char));
53e88: 4878 0001 pea 1 <ADD>
int
fat_init_clusters_chain(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t start_cln
)
{
53e8c: 266e 0008 moveal %fp@(8),%a3
int rc = RC_OK;
ssize_t ret = 0;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
53e90: 246b 0034 moveal %a3@(52),%a2
int
fat_init_clusters_chain(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t start_cln
)
{
53e94: 242e 000c movel %fp@(12),%d2
ssize_t ret = 0;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = start_cln;
char *buf;
buf = calloc(fs_info->vol.bpc, sizeof(char));
53e98: 302a 0006 movew %a2@(6),%d0
)
{
int rc = RC_OK;
ssize_t ret = 0;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = start_cln;
53e9c: 2d42 fffc movel %d2,%fp@(-4)
char *buf;
buf = calloc(fs_info->vol.bpc, sizeof(char));
53ea0: 2f00 movel %d0,%sp@- 53ea2: 4eb9 0004 6090 jsr 46090 <calloc>
if ( buf == NULL )
53ea8: 508f addql #8,%sp
ssize_t ret = 0;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = start_cln;
char *buf;
buf = calloc(fs_info->vol.bpc, sizeof(char));
53eaa: 2600 movel %d0,%d3
if ( buf == NULL )
53eac: 6700 00aa beqw 53f58 <fat_init_clusters_chain+0xda>
rtems_set_errno_and_return_minus_one( EIO );
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
53eb0: 2002 movel %d2,%d0
{
free(buf);
return -1;
}
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
53eb2: 280e movel %fp,%d4
if ( buf == NULL )
rtems_set_errno_and_return_minus_one( EIO );
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
{
ret = fat_cluster_write(mt_entry, cur_cln, buf);
53eb4: 49f9 0005 3dfa lea 53dfa <fat_cluster_write>,%a4
{
free(buf);
return -1;
}
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
53eba: 5984 subql #4,%d4 53ebc: 4bf9 0005 b828 lea 5b828 <fat_get_fat_cluster>,%a5
buf = calloc(fs_info->vol.bpc, sizeof(char));
if ( buf == NULL )
rtems_set_errno_and_return_minus_one( EIO );
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
53ec2: c0aa 000c andl %a2@(12),%d0 53ec6: b0aa 0010 cmpl %a2@(16),%d0
53eca: 6434 bccs 53f00 <fat_init_clusters_chain+0x82> <== NEVER TAKEN
{
ret = fat_cluster_write(mt_entry, cur_cln, buf);
53ecc: 2f03 movel %d3,%sp@- 53ece: 2f02 movel %d2,%sp@- 53ed0: 2f0b movel %a3,%sp@- 53ed2: 4e94 jsr %a4@
if ( ret == -1 )
53ed4: 4fef 000c lea %sp@(12),%sp 53ed8: 72ff moveq #-1,%d1 53eda: b280 cmpl %d0,%d1
53edc: 675c beqs 53f3a <fat_init_clusters_chain+0xbc> <== NEVER TAKEN
{
free(buf);
return -1;
}
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
53ede: 2f04 movel %d4,%sp@- 53ee0: 2f2e fffc movel %fp@(-4),%sp@- 53ee4: 2f0b movel %a3,%sp@- 53ee6: 4e95 jsr %a5@
if ( rc != RC_OK )
53ee8: 4fef 000c lea %sp@(12),%sp 53eec: 4a80 tstl %d0
53eee: 662e bnes 53f1e <fat_init_clusters_chain+0xa0> <== NEVER TAKEN
53ef0: 242e fffc movel %fp@(-4),%d2
buf = calloc(fs_info->vol.bpc, sizeof(char));
if ( buf == NULL )
rtems_set_errno_and_return_minus_one( EIO );
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
53ef4: 2002 movel %d2,%d0 53ef6: c0aa 000c andl %a2@(12),%d0 53efa: b0aa 0010 cmpl %a2@(16),%d0
53efe: 65cc bcss 53ecc <fat_init_clusters_chain+0x4e> <== NEVER TAKEN
return rc;
}
}
free(buf);
return rc;
53f00: 4280 clrl %d0
free(buf);
return rc;
}
}
free(buf);
53f02: 2f03 movel %d3,%sp@- 53f04: 2d40 fff8 movel %d0,%fp@(-8) 53f08: 4eb9 0004 680c jsr 4680c <free>
return rc;
53f0e: 202e fff8 movel %fp@(-8),%d0 53f12: 588f addql #4,%sp
}
53f14: 4cee 3c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a5 53f1a: 4e5e unlk %fp 53f1c: 4e75 rts
}
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
if ( rc != RC_OK )
{
free(buf);
53f1e: 2f03 movel %d3,%sp@- <== NOT EXECUTED 53f20: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED 53f24: 4eb9 0004 680c jsr 4680c <free> <== NOT EXECUTED
return rc;
53f2a: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED 53f2e: 588f addql #4,%sp <== NOT EXECUTED
}
}
free(buf);
return rc;
}
53f30: 4cee 3c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a5 <== NOT EXECUTED 53f36: 4e5e unlk %fp <== NOT EXECUTED 53f38: 4e75 rts <== NOT EXECUTED
{
ret = fat_cluster_write(mt_entry, cur_cln, buf);
if ( ret == -1 )
{
free(buf);
return -1;
53f3a: 70ff moveq #-1,%d0 <== NOT EXECUTED
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
{
ret = fat_cluster_write(mt_entry, cur_cln, buf);
if ( ret == -1 )
{
free(buf);
53f3c: 2f03 movel %d3,%sp@- <== NOT EXECUTED 53f3e: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED 53f42: 4eb9 0004 680c jsr 4680c <free> <== NOT EXECUTED
return -1;
53f48: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED 53f4c: 588f addql #4,%sp <== NOT EXECUTED
}
}
free(buf);
return rc;
}
53f4e: 4cee 3c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a5 <== NOT EXECUTED 53f54: 4e5e unlk %fp <== NOT EXECUTED 53f56: 4e75 rts <== NOT EXECUTED
uint32_t cur_cln = start_cln;
char *buf;
buf = calloc(fs_info->vol.bpc, sizeof(char));
if ( buf == NULL )
rtems_set_errno_and_return_minus_one( EIO );
53f58: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 53f5e: 7405 moveq #5,%d2 <== NOT EXECUTED 53f60: 2040 moveal %d0,%a0 <== NOT EXECUTED 53f62: 70ff moveq #-1,%d0 <== NOT EXECUTED 53f64: 2082 movel %d2,%a0@ <== NOT EXECUTED
}
}
free(buf);
return rc;
}
53f66: 4cee 3c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a5 <== NOT EXECUTED 53f6c: 4e5e unlk %fp <== NOT EXECUTED
00054296 <fat_init_volume_info>:
* RC_OK on success, or -1 if error occured
* and errno set appropriately
*/
int
fat_init_volume_info(rtems_filesystem_mount_table_entry_t *mt_entry)
{
54296: 4e56 ff60 linkw %fp,#-160 5429a: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
ssize_t ret = 0;
struct stat stat_buf;
int i = 0;
rtems_bdbuf_buffer *block = NULL;
rc = stat(mt_entry->dev, &stat_buf);
5429e: 486e ffaa pea %fp@(-86)
* RC_OK on success, or -1 if error occured
* and errno set appropriately
*/
int
fat_init_volume_info(rtems_filesystem_mount_table_entry_t *mt_entry)
{
542a2: 266e 0008 moveal %fp@(8),%a3
ssize_t ret = 0;
struct stat stat_buf;
int i = 0;
rtems_bdbuf_buffer *block = NULL;
rc = stat(mt_entry->dev, &stat_buf);
542a6: 2f2b 0070 movel %a3@(112),%sp@-
int
fat_init_volume_info(rtems_filesystem_mount_table_entry_t *mt_entry)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
542aa: 246b 0034 moveal %a3@(52),%a2
char boot_rec[FAT_MAX_BPB_SIZE];
char fs_info_sector[FAT_USEFUL_INFO_SIZE];
ssize_t ret = 0;
struct stat stat_buf;
int i = 0;
rtems_bdbuf_buffer *block = NULL;
542ae: 42ae fffc clrl %fp@(-4)
rc = stat(mt_entry->dev, &stat_buf);
542b2: 4eb9 0004 80f8 jsr 480f8 <stat>
if (rc == -1)
542b8: 508f addql #8,%sp
ssize_t ret = 0;
struct stat stat_buf;
int i = 0;
rtems_bdbuf_buffer *block = NULL;
rc = stat(mt_entry->dev, &stat_buf);
542ba: 2400 movel %d0,%d2
if (rc == -1)
542bc: 70ff moveq #-1,%d0 542be: b082 cmpl %d2,%d0 542c0: 6700 041c beqw 546de <fat_init_volume_info+0x448>
return rc;
/* Must be a block device. */
if (!S_ISBLK(stat_buf.st_mode))
542c4: 202e ffb6 movel %fp@(-74),%d0 542c8: 0280 0000 f000 andil #61440,%d0 542ce: 0c80 0000 6000 cmpil #24576,%d0 542d4: 6600 0658 bnew 5492e <fat_init_volume_info+0x698>
rtems_set_errno_and_return_minus_one(ENOTTY);
/* check that device is registred as block device and lock it */
vol->dd = rtems_disk_obtain(stat_buf.st_rdev);
542d8: 2f2e ffc4 movel %fp@(-60),%sp@- 542dc: 2f2e ffc0 movel %fp@(-64),%sp@- 542e0: 4eb9 0004 55a2 jsr 455a2 <rtems_disk_obtain>
if (vol->dd == NULL)
542e6: 508f addql #8,%sp
/* Must be a block device. */
if (!S_ISBLK(stat_buf.st_mode))
rtems_set_errno_and_return_minus_one(ENOTTY);
/* check that device is registred as block device and lock it */
vol->dd = rtems_disk_obtain(stat_buf.st_rdev);
542e8: 2540 0052 movel %d0,%a2@(82)
if (vol->dd == NULL)
542ec: 6700 0702 beqw 549f0 <fat_init_volume_info+0x75a>
rtems_set_errno_and_return_minus_one(EIO);
vol->dev = stat_buf.st_rdev;
542f0: 202e ffc0 movel %fp@(-64),%d0 542f4: 222e ffc4 movel %fp@(-60),%d1 542f8: 2540 004a movel %d0,%a2@(74) 542fc: 2541 004e movel %d1,%a2@(78)
/* Read boot record */
/* FIXME: Asserts FAT_MAX_BPB_SIZE < bdbuf block size */
sc = rtems_bdbuf_read( vol->dev, 0, &block);
54300: 486e fffc pea %fp@(-4) 54304: 42a7 clrl %sp@- 54306: 2f01 movel %d1,%sp@- 54308: 2f00 movel %d0,%sp@- 5430a: 4eb9 0005 1de8 jsr 51de8 <rtems_bdbuf_read>
if (sc != RTEMS_SUCCESSFUL)
54310: 4fef 0010 lea %sp@(16),%sp 54314: 4a80 tstl %d0 54316: 6600 065c bnew 54974 <fat_init_volume_info+0x6de>
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one( EIO);
}
memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE);
5431a: 226e fffc moveal %fp@(-4),%a1 5431e: 2069 001e moveal %a1@(30),%a0 54322: 1228 000e moveb %a0@(14),%d1 54326: 1628 000f moveb %a0@(15),%d3 5432a: 1028 0013 moveb %a0@(19),%d0 5432e: 1d41 ffa7 moveb %d1,%fp@(-89) 54332: 1228 0014 moveb %a0@(20),%d1 54336: 1d43 ffa6 moveb %d3,%fp@(-90) 5433a: 3a41 moveaw %d1,%a5 5433c: 1228 0016 moveb %a0@(22),%d1 54340: 1828 000b moveb %a0@(11),%d4 54344: 1d41 ffa5 moveb %d1,%fp@(-91) 54348: 1228 0017 moveb %a0@(23),%d1 5434c: 1a28 000c moveb %a0@(12),%d5 54350: 1d41 ffa4 moveb %d1,%fp@(-92) 54354: 1228 0020 moveb %a0@(32),%d1 54358: 1428 000d moveb %a0@(13),%d2 5435c: 1d41 ff9c moveb %d1,%fp@(-100) 54360: 1228 0021 moveb %a0@(33),%d1 54364: 1628 0010 moveb %a0@(16),%d3 54368: 1d41 ff9b moveb %d1,%fp@(-101) 5436c: 1228 0022 moveb %a0@(34),%d1 54370: 1c28 0011 moveb %a0@(17),%d6 54374: 1d41 ff9a moveb %d1,%fp@(-102) 54378: 1228 0023 moveb %a0@(35),%d1 5437c: 1e28 0012 moveb %a0@(18),%d7 54380: 1d41 ff99 moveb %d1,%fp@(-103) 54384: 1228 0024 moveb %a0@(36),%d1 54388: 3840 moveaw %d0,%a4 5438a: 1d41 ffa2 moveb %d1,%fp@(-94) 5438e: 1228 0025 moveb %a0@(37),%d1 54392: 1d41 ff9d moveb %d1,%fp@(-99) 54396: 1228 0026 moveb %a0@(38),%d1 5439a: 1d41 ffa3 moveb %d1,%fp@(-93) 5439e: 1228 0027 moveb %a0@(39),%d1 543a2: 1d41 ffa1 moveb %d1,%fp@(-95) 543a6: 1228 0028 moveb %a0@(40),%d1 543aa: 1d41 ff95 moveb %d1,%fp@(-107) 543ae: 1228 002c moveb %a0@(44),%d1 543b2: 1d41 ff8b moveb %d1,%fp@(-117) 543b6: 1228 002d moveb %a0@(45),%d1 543ba: 1d41 ff8a moveb %d1,%fp@(-118) 543be: 1228 002e moveb %a0@(46),%d1 543c2: 1d41 ff89 moveb %d1,%fp@(-119) 543c6: 1228 002f moveb %a0@(47),%d1 543ca: 1d41 ff8f moveb %d1,%fp@(-113) 543ce: 1228 0030 moveb %a0@(48),%d1 543d2: 1d41 ff91 moveb %d1,%fp@(-111) 543d6: 1228 0031 moveb %a0@(49),%d1
sc = rtems_bdbuf_release( block);
543da: 2f09 movel %a1,%sp@-
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one( EIO);
}
memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE);
543dc: 1d41 ff90 moveb %d1,%fp@(-112)
sc = rtems_bdbuf_release( block);
543e0: 4eb9 0005 2090 jsr 52090 <rtems_bdbuf_release>
if (sc != RTEMS_SUCCESSFUL)
543e6: 588f addql #4,%sp 543e8: 4a80 tstl %d0 543ea: 6600 0588 bnew 54974 <fat_init_volume_info+0x6de>
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one( EIO );
}
/* Evaluate boot record */
vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec);
543ee: 0285 0000 00ff andil #255,%d5 543f4: 0284 0000 00ff andil #255,%d4 543fa: e18d lsll #8,%d5 543fc: 8a84 orl %d4,%d5 543fe: 3485 movew %d5,%a2@
if ( (vol->bps != 512) &&
54400: 0c85 0000 0200 cmpil #512,%d5 54406: 6700 04d8 beqw 548e0 <fat_init_volume_info+0x64a>
5440a: 0c85 0000 0400 cmpil #1024,%d5 <== NOT EXECUTED 54410: 6712 beqs 54424 <fat_init_volume_info+0x18e> <== NOT EXECUTED
(vol->bps != 1024) &&
54412: 0c85 0000 0800 cmpil #2048,%d5 <== NOT EXECUTED 54418: 670a beqs 54424 <fat_init_volume_info+0x18e> <== NOT EXECUTED
(vol->bps != 2048) &&
5441a: 0c85 0000 1000 cmpil #4096,%d5 <== NOT EXECUTED 54420: 6600 052c bnew 5494e <fat_init_volume_info+0x6b8> <== NOT EXECUTED
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one( EINVAL );
}
for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0;
54424: 7209 moveq #9,%d1 <== NOT EXECUTED 54426: 2005 movel %d5,%d0 <== NOT EXECUTED 54428: e2a8 lsrl %d1,%d0 <== NOT EXECUTED
i >>= 1, vol->sec_mul++);
5442a: e280 asrl #1,%d0 <== NOT EXECUTED
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one( EINVAL );
}
for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0;
5442c: 7201 moveq #1,%d1 <== NOT EXECUTED
i >>= 1, vol->sec_mul++);
5442e: 2801 movel %d1,%d4 <== NOT EXECUTED 54430: 5284 addql #1,%d4 <== NOT EXECUTED
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one( EINVAL );
}
for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0;
54432: 0800 0000 btst #0,%d0 <== NOT EXECUTED 54436: 660e bnes 54446 <fat_init_volume_info+0x1b0> <== NOT EXECUTED
i >>= 1, vol->sec_mul++);
54438: e280 asrl #1,%d0 <== NOT EXECUTED
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one( EINVAL );
}
for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0;
5443a: 1204 moveb %d4,%d1 <== NOT EXECUTED
i >>= 1, vol->sec_mul++);
5443c: 2801 movel %d1,%d4 <== NOT EXECUTED 5443e: 5284 addql #1,%d4 <== NOT EXECUTED
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one( EINVAL );
}
for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0;
54440: 0800 0000 btst #0,%d0 <== NOT EXECUTED 54444: 67f2 beqs 54438 <fat_init_volume_info+0x1a2> <== NOT EXECUTED 54446: 1541 0003 moveb %d1,%a2@(3) <== NOT EXECUTED
i >>= 1, vol->sec_mul++);
for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0;
5444a: 4201 clrb %d1 <== NOT EXECUTED 5444c: 1541 0002 moveb %d1,%a2@(2) <== NOT EXECUTED 54450: 0805 0000 btst #0,%d5 <== NOT EXECUTED 54454: 6622 bnes 54478 <fat_init_volume_info+0x1e2> <== NOT EXECUTED
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one( EINVAL );
}
for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0;
54456: 2005 movel %d5,%d0 <== NOT EXECUTED 54458: 7201 moveq #1,%d1 <== NOT EXECUTED
i >>= 1, vol->sec_mul++);
for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0;
i >>= 1, vol->sec_log2++);
5445a: 2801 movel %d1,%d4 5445c: 5284 addql #1,%d4 5445e: e280 asrl #1,%d0
rtems_set_errno_and_return_minus_one( EINVAL );
}
for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0;
i >>= 1, vol->sec_mul++);
for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0;
54460: 0800 0000 btst #0,%d0
54464: 660e bnes 54474 <fat_init_volume_info+0x1de> <== NEVER TAKEN
i >>= 1, vol->sec_log2++);
54466: e280 asrl #1,%d0
rtems_set_errno_and_return_minus_one( EINVAL );
}
for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0;
i >>= 1, vol->sec_mul++);
for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0;
54468: 1204 moveb %d4,%d1
i >>= 1, vol->sec_log2++);
5446a: 2801 movel %d1,%d4 5446c: 5284 addql #1,%d4
rtems_set_errno_and_return_minus_one( EINVAL );
}
for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0;
i >>= 1, vol->sec_mul++);
for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0;
5446e: 0800 0000 btst #0,%d0
54472: 67f2 beqs 54466 <fat_init_volume_info+0x1d0>
54474: 1541 0002 moveb %d1,%a2@(2)
i >>= 1, vol->sec_log2++);
vol->spc = FAT_GET_BR_SECTORS_PER_CLUSTER(boot_rec);
54478: 1542 0004 moveb %d2,%a2@(4)
/*
* "sectors per cluster" of zero is invalid
* (and would hang the following loop)
*/
if (vol->spc == 0)
5447c: 6700 051c beqw 5499a <fat_init_volume_info+0x704>
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one(EINVAL);
}
for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0;
54480: 4200 clrb %d0 54482: 0282 0000 00ff andil #255,%d2 54488: 1540 0005 moveb %d0,%a2@(5) 5448c: 2002 movel %d2,%d0 5448e: 0802 0000 btst #0,%d2 54492: 6600 04b4 bnew 54948 <fat_init_volume_info+0x6b2>
i >>= 1, vol->spc_log2++);
54496: e280 asrl #1,%d0
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one(EINVAL);
}
for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0;
54498: 7201 moveq #1,%d1
i >>= 1, vol->spc_log2++);
5449a: 2801 movel %d1,%d4 5449c: 5284 addql #1,%d4
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one(EINVAL);
}
for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0;
5449e: 0800 0000 btst #0,%d0
544a2: 660e bnes 544b2 <fat_init_volume_info+0x21c> <== ALWAYS TAKEN
i >>= 1, vol->spc_log2++);
544a4: e280 asrl #1,%d0 <== NOT EXECUTED
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one(EINVAL);
}
for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0;
544a6: 1204 moveb %d4,%d1 <== NOT EXECUTED
i >>= 1, vol->spc_log2++);
544a8: 2801 movel %d1,%d4 <== NOT EXECUTED 544aa: 5284 addql #1,%d4 <== NOT EXECUTED
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one(EINVAL);
}
for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0;
544ac: 0800 0000 btst #0,%d0 <== NOT EXECUTED 544b0: 67f2 beqs 544a4 <fat_init_volume_info+0x20e> <== NOT EXECUTED
544b2: 1541 0005 moveb %d1,%a2@(5) 544b6: 0281 0000 00ff andil #255,%d1
i >>= 1, vol->spc_log2++);
/*
* "bytes per cluster" value greater than 32K is invalid
*/
if ((vol->bpc = vol->bps << vol->spc_log2) > MS_BYTES_PER_CLUSTER_LIMIT)
544bc: 2805 movel %d5,%d4 544be: 4280 clrl %d0 544c0: e3ac lsll %d1,%d4 544c2: 3004 movew %d4,%d0 544c4: 3544 0006 movew %d4,%a2@(6) 544c8: 0c80 0000 8000 cmpil #32768,%d0 544ce: 6200 04ca bhiw 5499a <fat_init_volume_info+0x704>
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one(EINVAL);
}
for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0;
544d2: 4201 clrb %d1 544d4: 1541 0008 moveb %d1,%a2@(8) 544d8: 0800 0000 btst #0,%d0
544dc: 6620 bnes 544fe <fat_init_volume_info+0x268> <== NEVER TAKEN
i >>= 1, vol->bpc_log2++);
544de: e280 asrl #1,%d0
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one(EINVAL);
}
for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0;
544e0: 7201 moveq #1,%d1
i >>= 1, vol->bpc_log2++);
544e2: 2801 movel %d1,%d4 544e4: 5284 addql #1,%d4
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one(EINVAL);
}
for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0;
544e6: 0800 0000 btst #0,%d0
544ea: 660e bnes 544fa <fat_init_volume_info+0x264> <== NEVER TAKEN
i >>= 1, vol->bpc_log2++);
544ec: e280 asrl #1,%d0
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one(EINVAL);
}
for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0;
544ee: 1204 moveb %d4,%d1
i >>= 1, vol->bpc_log2++);
544f0: 2801 movel %d1,%d4 544f2: 5284 addql #1,%d4
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one(EINVAL);
}
for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0;
544f4: 0800 0000 btst #0,%d0
544f8: 67f2 beqs 544ec <fat_init_volume_info+0x256>
544fa: 1541 0008 moveb %d1,%a2@(8)
i >>= 1, vol->bpc_log2++);
vol->fats = FAT_GET_BR_FAT_NUM(boot_rec);
vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec);
544fe: 4281 clrl %d1 54500: 122e ffa6 moveb %fp@(-90),%d1
vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) /
vol->bps;
vol->rdir_size = vol->rdir_secs << vol->sec_log2;
if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0)
54504: 4284 clrl %d4 54506: 182e ffa4 moveb %fp@(-92),%d4
i >>= 1, vol->bpc_log2++);
vol->fats = FAT_GET_BR_FAT_NUM(boot_rec);
vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec);
vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec);
5450a: 0287 0000 00ff andil #255,%d7 54510: 0286 0000 00ff andil #255,%d6
for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0;
i >>= 1, vol->bpc_log2++);
vol->fats = FAT_GET_BR_FAT_NUM(boot_rec);
vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec);
54516: e189 lsll #8,%d1
vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec);
54518: e18f lsll #8,%d7
vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) /
vol->bps;
vol->rdir_size = vol->rdir_secs << vol->sec_log2;
if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0)
5451a: e18c lsll #8,%d4
i >>= 1, vol->bpc_log2++);
vol->fats = FAT_GET_BR_FAT_NUM(boot_rec);
vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec);
vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec);
5451c: 8e86 orl %d6,%d7
for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0;
i >>= 1, vol->bpc_log2++);
vol->fats = FAT_GET_BR_FAT_NUM(boot_rec);
vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec);
5451e: 4286 clrl %d6 54520: 1c2e ffa7 moveb %fp@(-89),%d6
vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec);
/* calculate the count of sectors occupied by the root directory */
vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) /
54524: 2007 movel %d7,%d0
for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0;
i >>= 1, vol->bpc_log2++);
vol->fats = FAT_GET_BR_FAT_NUM(boot_rec);
vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec);
54526: 2246 moveal %d6,%a1
vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec);
/* calculate the count of sectors occupied by the root directory */
vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) /
54528: eb88 lsll #5,%d0
}
for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0;
i >>= 1, vol->bpc_log2++);
vol->fats = FAT_GET_BR_FAT_NUM(boot_rec);
5452a: 1543 0009 moveb %d3,%a2@(9)
vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec);
vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec);
5452e: 3547 001e movew %d7,%a2@(30)
/* calculate the count of sectors occupied by the root directory */
vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) /
54532: 2040 moveal %d0,%a0 54534: 41f0 58ff lea %a0@(ffffffff,%d5:l),%a0 54538: 2008 movel %a0,%d0 5453a: 4c45 0800 remsl %d5,%d0,%d0
vol->bps;
vol->rdir_size = vol->rdir_secs << vol->sec_log2;
5453e: 4285 clrl %d5
if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0)
54540: 4286 clrl %d6 54542: 1c2e ffa5 moveb %fp@(-91),%d6
/* calculate the count of sectors occupied by the root directory */
vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) /
vol->bps;
vol->rdir_size = vol->rdir_secs << vol->sec_log2;
54546: 1a2a 0002 moveb %a2@(2),%d5
if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0)
5454a: 2046 moveal %d6,%a0
for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0;
i >>= 1, vol->bpc_log2++);
vol->fats = FAT_GET_BR_FAT_NUM(boot_rec);
vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec);
5454c: 2c09 movel %a1,%d6 5454e: 8286 orl %d6,%d1
/* calculate the count of sectors occupied by the root directory */
vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) /
vol->bps;
vol->rdir_size = vol->rdir_secs << vol->sec_log2;
54550: 2c00 movel %d0,%d6 54552: ebae lsll %d5,%d6
for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0;
i >>= 1, vol->bpc_log2++);
vol->fats = FAT_GET_BR_FAT_NUM(boot_rec);
vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec);
54554: 3541 0014 movew %d1,%a2@(20)
vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec);
/* calculate the count of sectors occupied by the root directory */
vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) /
54558: 2540 0020 movel %d0,%a2@(32)
vol->bps;
vol->rdir_size = vol->rdir_secs << vol->sec_log2;
5455c: 2a06 movel %d6,%d5
if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0)
5455e: 2c08 movel %a0,%d6 54560: 8886 orl %d6,%d4
/* calculate the count of sectors occupied by the root directory */
vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) /
vol->bps;
vol->rdir_size = vol->rdir_secs << vol->sec_log2;
54562: 2545 0024 movel %d5,%a2@(36)
if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0)
54566: 4a44 tstw %d4 54568: 6700 0348 beqw 548b2 <fat_init_volume_info+0x61c>
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec);
5456c: 0284 0000 ffff andil #65535,%d4 54572: 2544 0016 movel %d4,%a2@(22)
else
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec);
vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length +
54576: 0283 0000 00ff andil #255,%d3
vol->rdir_secs;
/* for FAT12/16 root dir starts at(sector) */
vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length;
if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0)
5457c: 3a0d movew %a5,%d5
if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0)
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec);
else
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec);
vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length +
5457e: 4c04 3800 mulsl %d4,%d3
vol->rdir_secs;
/* for FAT12/16 root dir starts at(sector) */
vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length;
if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0)
54582: 4284 clrl %d4 54584: 1805 moveb %d5,%d4 54586: 4285 clrl %d5 54588: 3c0c movew %a4,%d6
if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0)
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec);
else
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec);
vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length +
5458a: 0281 0000 ffff andil #65535,%d1
vol->rdir_secs;
/* for FAT12/16 root dir starts at(sector) */
vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length;
if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0)
54590: e18c lsll #8,%d4 54592: 1a06 moveb %d6,%d5
if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0)
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec);
else
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec);
vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length +
54594: d283 addl %d3,%d1 54596: d081 addl %d1,%d0
vol->rdir_secs;
/* for FAT12/16 root dir starts at(sector) */
vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length;
if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0)
54598: 8885 orl %d5,%d4
if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0)
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec);
else
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec);
vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length +
5459a: 2540 002c movel %d0,%a2@(44)
vol->rdir_secs;
/* for FAT12/16 root dir starts at(sector) */
vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length;
5459e: 2541 001a movel %d1,%a2@(26)
if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0)
545a2: 4a44 tstw %d4 545a4: 6700 0144 beqw 546ea <fat_init_volume_info+0x454>
vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec);
545a8: 0284 0000 ffff andil #65535,%d4 545ae: 2544 0028 movel %d4,%a2@(40)
else
vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec);
data_secs = vol->tot_secs - vol->data_fsec;
545b2: 9880 subl %d0,%d4
vol->data_cls = data_secs / vol->spc;
545b4: 4c42 4004 remul %d2,%d4,%d4 545b8: 2544 0030 movel %d4,%a2@(48)
/* determine FAT type at least */
if ( vol->data_cls < FAT_FAT12_MAX_CLN)
545bc: 0c84 0000 0ff4 cmpil #4084,%d4 545c2: 6200 0164 bhiw 54728 <fat_init_volume_info+0x492>
{
vol->type = FAT_FAT12;
vol->mask = FAT_FAT12_MASK;
vol->eoc_val = FAT_FAT12_EOC;
545c6: 223c 0000 0ff8 movel #4088,%d1
/* determine FAT type at least */
if ( vol->data_cls < FAT_FAT12_MAX_CLN)
{
vol->type = FAT_FAT12;
vol->mask = FAT_FAT12_MASK;
545cc: 307c 0fff moveaw #4095,%a0
vol->data_cls = data_secs / vol->spc;
/* determine FAT type at least */
if ( vol->data_cls < FAT_FAT12_MAX_CLN)
{
vol->type = FAT_FAT12;
545d0: 7001 moveq #1,%d0
vol->mask = FAT_FAT12_MASK;
vol->eoc_val = FAT_FAT12_EOC;
545d2: 2541 0010 movel %d1,%a2@(16)
}
}
else
{
vol->rdir_cl = 0;
vol->mirror = 0;
545d6: 4201 clrb %d1
/* determine FAT type at least */
if ( vol->data_cls < FAT_FAT12_MAX_CLN)
{
vol->type = FAT_FAT12;
vol->mask = FAT_FAT12_MASK;
545d8: 2548 000c movel %a0,%a2@(12)
vol->data_cls = data_secs / vol->spc;
/* determine FAT type at least */
if ( vol->data_cls < FAT_FAT12_MAX_CLN)
{
vol->type = FAT_FAT12;
545dc: 1540 000a moveb %d0,%a2@(10)
else
{
vol->rdir_cl = 0;
vol->mirror = 0;
vol->afat = 0;
vol->free_cls = 0xFFFFFFFF;
545e0: 70ff moveq #-1,%d0
}
}
else
{
vol->rdir_cl = 0;
vol->mirror = 0;
545e2: 1541 0042 moveb %d1,%a2@(66)
vol->afat = 0;
545e6: 1541 0048 moveb %d1,%a2@(72)
}
}
}
else
{
vol->rdir_cl = 0;
545ea: 42aa 0034 clrl %a2@(52)
vol->mirror = 0;
vol->afat = 0;
vol->free_cls = 0xFFFFFFFF;
545ee: 2540 003a movel %d0,%a2@(58)
vol->next_cl = 0xFFFFFFFF;
545f2: 2540 003e movel %d0,%a2@(62)
int
_fat_block_release(
rtems_filesystem_mount_table_entry_t *mt_entry)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
return fat_buf_release(fs_info);
545f6: 2f2b 0034 movel %a3@(52),%sp@-
_fat_block_release(mt_entry);
vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat;
/* set up collection of fat-files fd */
fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control));
545fa: 47f9 0004 6090 lea 46090 <calloc>,%a3
int
_fat_block_release(
rtems_filesystem_mount_table_entry_t *mt_entry)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
return fat_buf_release(fs_info);
54600: 4eb9 0005 3a90 jsr 53a90 <fat_buf_release>
vol->next_cl = 0xFFFFFFFF;
}
_fat_block_release(mt_entry);
vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat;
54606: 4280 clrl %d0 54608: 102a 0048 moveb %a2@(72),%d0 5460c: 41ea 0016 lea %a2@(22),%a0 54610: 4c10 0800 mulsl %a0@,%d0 54614: 4281 clrl %d1 54616: 322a 0014 movew %a2@(20),%d1 5461a: d081 addl %d1,%d0 5461c: 2540 0044 movel %d0,%a2@(68)
/* set up collection of fat-files fd */
fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control));
54620: 4878 000c pea c <OPER1> 54624: 4878 0002 pea 2 <DOUBLE_FLOAT> 54628: 4e93 jsr %a3@
if ( fs_info->vhash == NULL )
5462a: 4fef 000c lea %sp@(12),%sp
_fat_block_release(mt_entry);
vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat;
/* set up collection of fat-files fd */
fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control));
5462e: 2040 moveal %d0,%a0 54630: 2540 005a movel %d0,%a2@(90)
if ( fs_info->vhash == NULL )
54634: 6700 0472 beqw 54aa8 <fat_init_volume_info+0x812>
}
for (i = 0; i < FAT_HASH_SIZE; i++)
rtems_chain_initialize_empty(fs_info->vhash + i);
fs_info->rhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control));
54638: 4878 000c pea c <OPER1>
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
5463c: 2240 moveal %d0,%a1 5463e: 5889 addql #4,%a1 54640: 2089 movel %a1,%a0@ 54642: 43e8 0010 lea %a0@(16),%a1 54646: 2149 000c movel %a1,%a0@(12) 5464a: 4878 0002 pea 2 <DOUBLE_FLOAT>
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
5464e: 43e8 000c lea %a0@(12),%a1
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
54652: 42a8 0004 clrl %a0@(4)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
54656: 2149 0014 movel %a1,%a0@(20)
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
tail->previous = head;
5465a: 2140 0008 movel %d0,%a0@(8)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
5465e: 42a8 0010 clrl %a0@(16) 54662: 4e93 jsr %a3@
if ( fs_info->rhash == NULL )
54664: 508f addql #8,%sp
}
for (i = 0; i < FAT_HASH_SIZE; i++)
rtems_chain_initialize_empty(fs_info->vhash + i);
fs_info->rhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control));
54666: 2040 moveal %d0,%a0 54668: 2540 005e movel %d0,%a2@(94)
if ( fs_info->rhash == NULL )
5466c: 6700 0460 beqw 54ace <fat_init_volume_info+0x838>
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
54670: 2240 moveal %d0,%a1 54672: 5889 addql #4,%a1
}
for (i = 0; i < FAT_HASH_SIZE; i++)
rtems_chain_initialize_empty(fs_info->rhash + i);
fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE;
fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4;
54674: 4281 clrl %d1
rtems_set_errno_and_return_minus_one( ENOMEM );
}
for (i = 0; i < FAT_HASH_SIZE; i++)
rtems_chain_initialize_empty(fs_info->rhash + i);
fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE;
54676: 243c 0000 0100 movel #256,%d2 5467c: 2089 movel %a1,%a0@ 5467e: 43e8 0010 lea %a0@(16),%a1
fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4;
54682: 202a 0028 movel %a2@(40),%d0 54686: 2149 000c movel %a1,%a0@(12)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
5468a: 43e8 000c lea %a0@(12),%a1
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
5468e: 42a8 0004 clrl %a0@(4)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
54692: 2149 0014 movel %a1,%a0@(20)
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
tail->previous = head;
54696: 2148 0008 movel %a0,%a0@(8)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
5469a: 42a8 0010 clrl %a0@(16) 5469e: 122a 0003 moveb %a2@(3),%d1 546a2: e3a8 lsll %d1,%d0
rtems_set_errno_and_return_minus_one( ENOMEM );
}
for (i = 0; i < FAT_HASH_SIZE; i++)
rtems_chain_initialize_empty(fs_info->rhash + i);
fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE;
546a4: 2542 006a movel %d2,%a2@(106)
fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4;
546a8: e988 lsll #4,%d0
fs_info->index = 0;
546aa: 42aa 0066 clrl %a2@(102)
}
for (i = 0; i < FAT_HASH_SIZE; i++)
rtems_chain_initialize_empty(fs_info->rhash + i);
fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE;
fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4;
546ae: 2540 006e movel %d0,%a2@(110)
fs_info->index = 0;
fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char));
546b2: 4878 0001 pea 1 <ADD> 546b6: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> 546ba: 4e93 jsr %a3@
if ( fs_info->uino == NULL )
546bc: 508f addql #8,%sp
rtems_chain_initialize_empty(fs_info->rhash + i);
fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE;
fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4;
fs_info->index = 0;
fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char));
546be: 2540 0062 movel %d0,%a2@(98)
if ( fs_info->uino == NULL )
546c2: 6700 0346 beqw 54a0a <fat_init_volume_info+0x774>
rtems_disk_release(vol->dd);
free(fs_info->vhash);
free(fs_info->rhash);
rtems_set_errno_and_return_minus_one( ENOMEM );
}
fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t));
546c6: 4878 0001 pea 1 <ADD> 546ca: 4280 clrl %d0 546cc: 3012 movew %a2@,%d0 546ce: 2f00 movel %d0,%sp@- 546d0: 4e93 jsr %a3@
if (fs_info->sec_buf == NULL)
546d2: 508f addql #8,%sp
rtems_disk_release(vol->dd);
free(fs_info->vhash);
free(fs_info->rhash);
rtems_set_errno_and_return_minus_one( ENOMEM );
}
fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t));
546d4: 2540 007c movel %d0,%a2@(124)
if (fs_info->sec_buf == NULL)
546d8: 6700 038e beqw 54a68 <fat_init_volume_info+0x7d2>
free(fs_info->rhash);
free(fs_info->uino);
rtems_set_errno_and_return_minus_one( ENOMEM );
}
return RC_OK;
546dc: 4282 clrl %d2
}
546de: 2002 movel %d2,%d0 546e0: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 546e6: 4e5e unlk %fp 546e8: 4e75 rts
vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length;
if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0)
vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec);
else
vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec);
546ea: 4284 clrl %d4 <== NOT EXECUTED 546ec: 4281 clrl %d1 <== NOT EXECUTED 546ee: 182e ff9b moveb %fp@(-101),%d4 <== NOT EXECUTED 546f2: 122e ff9a moveb %fp@(-102),%d1 <== NOT EXECUTED 546f6: 4283 clrl %d3 <== NOT EXECUTED 546f8: 162e ff9c moveb %fp@(-100),%d3 <== NOT EXECUTED 546fc: 7e18 moveq #24,%d7 <== NOT EXECUTED 546fe: 4841 swap %d1 <== NOT EXECUTED 54700: 4241 clrw %d1 <== NOT EXECUTED 54702: e18c lsll #8,%d4 <== NOT EXECUTED 54704: 8881 orl %d1,%d4 <== NOT EXECUTED 54706: 122e ff99 moveb %fp@(-103),%d1 <== NOT EXECUTED 5470a: 8883 orl %d3,%d4 <== NOT EXECUTED 5470c: efa9 lsll %d7,%d1 <== NOT EXECUTED 5470e: 8881 orl %d1,%d4 <== NOT EXECUTED 54710: 2544 0028 movel %d4,%a2@(40) <== NOT EXECUTED
data_secs = vol->tot_secs - vol->data_fsec;
54714: 9880 subl %d0,%d4 <== NOT EXECUTED
vol->data_cls = data_secs / vol->spc;
54716: 4c42 4004 remul %d2,%d4,%d4 <== NOT EXECUTED 5471a: 2544 0030 movel %d4,%a2@(48) <== NOT EXECUTED
/* determine FAT type at least */
if ( vol->data_cls < FAT_FAT12_MAX_CLN)
5471e: 0c84 0000 0ff4 cmpil #4084,%d4 <== NOT EXECUTED 54724: 6300 fea0 blsw 545c6 <fat_init_volume_info+0x330> <== NOT EXECUTED
vol->mask = FAT_FAT12_MASK;
vol->eoc_val = FAT_FAT12_EOC;
}
else
{
if ( vol->data_cls < FAT_FAT16_MAX_CLN)
54728: 0c84 0000 fff4 cmpil #65524,%d4 <== NOT EXECUTED 5472e: 6300 01be blsw 548ee <fat_init_volume_info+0x658> <== NOT EXECUTED
}
}
if (vol->type == FAT_FAT32)
{
vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec);
54732: 4280 clrl %d0 <== NOT EXECUTED 54734: 4281 clrl %d1 <== NOT EXECUTED 54736: 102e ff8a moveb %fp@(-118),%d0 <== NOT EXECUTED 5473a: 122e ff89 moveb %fp@(-119),%d1 <== NOT EXECUTED 5473e: 4283 clrl %d3 <== NOT EXECUTED 54740: 162e ff8b moveb %fp@(-117),%d3 <== NOT EXECUTED 54744: 7a18 moveq #24,%d5 <== NOT EXECUTED
vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR;
54746: 7c80 moveq #-128,%d6 <== NOT EXECUTED
vol->eoc_val = FAT_FAT16_EOC;
}
else
{
vol->type = FAT_FAT32;
vol->mask = FAT_FAT32_MASK;
54748: 207c 0fff ffff moveal #268435455,%a0 <== NOT EXECUTED
vol->eoc_val = FAT_FAT32_EOC;
5474e: 227c 0fff fff8 moveal #268435448,%a1 <== NOT EXECUTED
}
}
if (vol->type == FAT_FAT32)
{
vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec);
54754: 4841 swap %d1 <== NOT EXECUTED 54756: 4241 clrw %d1 <== NOT EXECUTED 54758: e188 lsll #8,%d0 <== NOT EXECUTED 5475a: 142e ff8f moveb %fp@(-113),%d2 <== NOT EXECUTED
vol->mask = FAT_FAT16_MASK;
vol->eoc_val = FAT_FAT16_EOC;
}
else
{
vol->type = FAT_FAT32;
5475e: 7e04 moveq #4,%d7 <== NOT EXECUTED
vol->mask = FAT_FAT32_MASK;
54760: 2548 000c movel %a0,%a2@(12) <== NOT EXECUTED
}
}
if (vol->type == FAT_FAT32)
{
vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec);
54764: 8081 orl %d1,%d0 <== NOT EXECUTED
vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR;
54766: 122e ff95 moveb %fp@(-107),%d1 <== NOT EXECUTED
}
else
{
vol->type = FAT_FAT32;
vol->mask = FAT_FAT32_MASK;
vol->eoc_val = FAT_FAT32_EOC;
5476a: 2549 0010 movel %a1,%a2@(16) <== NOT EXECUTED
}
}
if (vol->type == FAT_FAT32)
{
vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec);
5476e: ebaa lsll %d5,%d2 <== NOT EXECUTED 54770: 8083 orl %d3,%d0 <== NOT EXECUTED
vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR;
54772: c286 andl %d6,%d1 <== NOT EXECUTED
}
}
if (vol->type == FAT_FAT32)
{
vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec);
54774: 8082 orl %d2,%d0 <== NOT EXECUTED
vol->mask = FAT_FAT16_MASK;
vol->eoc_val = FAT_FAT16_EOC;
}
else
{
vol->type = FAT_FAT32;
54776: 1547 000a moveb %d7,%a2@(10) <== NOT EXECUTED
if (vol->type == FAT_FAT32)
{
vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec);
vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR;
5477a: 1541 0042 moveb %d1,%a2@(66) <== NOT EXECUTED
}
}
if (vol->type == FAT_FAT32)
{
vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec);
5477e: 2540 0034 movel %d0,%a2@(52) <== NOT EXECUTED
vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR;
if (vol->mirror)
54782: 4a01 tstb %d1 <== NOT EXECUTED 54784: 6700 019e beqw 54924 <fat_init_volume_info+0x68e> <== NOT EXECUTED
vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM;
54788: 740f moveq #15,%d2 <== NOT EXECUTED 5478a: 102e ff95 moveb %fp@(-107),%d0 <== NOT EXECUTED 5478e: c082 andl %d2,%d0 <== NOT EXECUTED 54790: 1540 0048 moveb %d0,%a2@(72) <== NOT EXECUTED
else
vol->afat = 0;
vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec);
54794: 4280 clrl %d0 <== NOT EXECUTED 54796: 102e ff90 moveb %fp@(-112),%d0 <== NOT EXECUTED 5479a: 4281 clrl %d1 <== NOT EXECUTED 5479c: 122e ff91 moveb %fp@(-111),%d1 <== NOT EXECUTED 547a0: e188 lsll #8,%d0 <== NOT EXECUTED 547a2: 8081 orl %d1,%d0 <== NOT EXECUTED 547a4: 3540 0038 movew %d0,%a2@(56) <== NOT EXECUTED
if( vol->info_sec == 0 )
547a8: 6700 01f0 beqw 5499a <fat_init_volume_info+0x704> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
}
else
{
ret = _fat_block_read(mt_entry, vol->info_sec , 0,
FAT_FSI_LEADSIG_SIZE, fs_info_sector);
547ac: 49ee fff0 lea %fp@(-16),%a4 <== NOT EXECUTED
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one( EINVAL );
}
else
{
ret = _fat_block_read(mt_entry, vol->info_sec , 0,
547b0: 4bf9 0005 3bf2 lea 53bf2 <_fat_block_read>,%a5 <== NOT EXECUTED 547b6: 2f0c movel %a4,%sp@- <== NOT EXECUTED 547b8: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 547bc: 42a7 clrl %sp@- <== NOT EXECUTED 547be: 3f00 movew %d0,%sp@- <== NOT EXECUTED 547c0: 4267 clrw %sp@- <== NOT EXECUTED 547c2: 2f0b movel %a3,%sp@- <== NOT EXECUTED 547c4: 4e95 jsr %a5@ <== NOT EXECUTED
FAT_FSI_LEADSIG_SIZE, fs_info_sector);
if ( ret < 0 )
547c6: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 547ca: 4a80 tstl %d0 <== NOT EXECUTED 547cc: 6d00 0330 bltw 54afe <fat_init_volume_info+0x868> <== NOT EXECUTED
{
rtems_disk_release(vol->dd);
return -1;
}
if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) !=
547d0: 4280 clrl %d0 <== NOT EXECUTED 547d2: 4281 clrl %d1 <== NOT EXECUTED 547d4: 102c 0001 moveb %a4@(1),%d0 <== NOT EXECUTED 547d8: 122c 0002 moveb %a4@(2),%d1 <== NOT EXECUTED 547dc: 4282 clrl %d2 <== NOT EXECUTED 547de: 1414 moveb %a4@,%d2 <== NOT EXECUTED 547e0: 4841 swap %d1 <== NOT EXECUTED 547e2: 4241 clrw %d1 <== NOT EXECUTED 547e4: e188 lsll #8,%d0 <== NOT EXECUTED 547e6: 8081 orl %d1,%d0 <== NOT EXECUTED 547e8: 4281 clrl %d1 <== NOT EXECUTED 547ea: 122c 0003 moveb %a4@(3),%d1 <== NOT EXECUTED 547ee: 8082 orl %d2,%d0 <== NOT EXECUTED 547f0: 7418 moveq #24,%d2 <== NOT EXECUTED 547f2: e5a9 lsll %d2,%d1 <== NOT EXECUTED 547f4: 8081 orl %d1,%d0 <== NOT EXECUTED 547f6: 0c80 4161 5252 cmpil #1096897106,%d0 <== NOT EXECUTED 547fc: 6600 01c2 bnew 549c0 <fat_init_volume_info+0x72a> <== NOT EXECUTED
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one( EINVAL );
}
else
{
ret = _fat_block_read(mt_entry, vol->info_sec , FAT_FSI_INFO,
54800: 2f0c movel %a4,%sp@- <== NOT EXECUTED 54802: 4878 000c pea c <OPER1> <== NOT EXECUTED 54806: 4280 clrl %d0 <== NOT EXECUTED 54808: 4878 01e4 pea 1e4 <DBL_MANT_DIG+0x1af> <== NOT EXECUTED 5480c: 302a 0038 movew %a2@(56),%d0 <== NOT EXECUTED 54810: 2f00 movel %d0,%sp@- <== NOT EXECUTED 54812: 2f0b movel %a3,%sp@- <== NOT EXECUTED 54814: 4e95 jsr %a5@ <== NOT EXECUTED
FAT_USEFUL_INFO_SIZE, fs_info_sector);
if ( ret < 0 )
54816: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 5481a: 4a80 tstl %d0 <== NOT EXECUTED 5481c: 6d00 0226 bltw 54a44 <fat_init_volume_info+0x7ae> <== NOT EXECUTED
_fat_block_release(mt_entry);
rtems_disk_release(vol->dd);
return -1;
}
vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector);
54820: 4281 clrl %d1 <== NOT EXECUTED 54822: 4283 clrl %d3 <== NOT EXECUTED
vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector);
54824: 4280 clrl %d0 <== NOT EXECUTED 54826: 4282 clrl %d2 <== NOT EXECUTED
_fat_block_release(mt_entry);
rtems_disk_release(vol->dd);
return -1;
}
vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector);
54828: 122c 0005 moveb %a4@(5),%d1 <== NOT EXECUTED 5482c: 162c 0006 moveb %a4@(6),%d3 <== NOT EXECUTED
vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector);
54830: 102c 0009 moveb %a4@(9),%d0 <== NOT EXECUTED 54834: 142c 000a moveb %a4@(10),%d2 <== NOT EXECUTED
_fat_block_release(mt_entry);
rtems_disk_release(vol->dd);
return -1;
}
vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector);
54838: 4285 clrl %d5 <== NOT EXECUTED 5483a: 1a2c 0004 moveb %a4@(4),%d5 <== NOT EXECUTED
vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector);
5483e: 4284 clrl %d4 <== NOT EXECUTED 54840: 182c 0008 moveb %a4@(8),%d4 <== NOT EXECUTED
_fat_block_release(mt_entry);
rtems_disk_release(vol->dd);
return -1;
}
vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector);
54844: 4843 swap %d3 <== NOT EXECUTED 54846: 4243 clrw %d3 <== NOT EXECUTED
vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector);
54848: 4842 swap %d2 <== NOT EXECUTED 5484a: 4242 clrw %d2 <== NOT EXECUTED
_fat_block_release(mt_entry);
rtems_disk_release(vol->dd);
return -1;
}
vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector);
5484c: e189 lsll #8,%d1 <== NOT EXECUTED
vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector);
5484e: e188 lsll #8,%d0 <== NOT EXECUTED
_fat_block_release(mt_entry);
rtems_disk_release(vol->dd);
return -1;
}
vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector);
54850: 8283 orl %d3,%d1 <== NOT EXECUTED
vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector);
54852: 8082 orl %d2,%d0 <== NOT EXECUTED
_fat_block_release(mt_entry);
rtems_disk_release(vol->dd);
return -1;
}
vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector);
54854: 4283 clrl %d3 <== NOT EXECUTED
vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector);
54856: 4282 clrl %d2 <== NOT EXECUTED
_fat_block_release(mt_entry);
rtems_disk_release(vol->dd);
return -1;
}
vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector);
54858: 162c 0007 moveb %a4@(7),%d3 <== NOT EXECUTED
vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector);
5485c: 142c 000b moveb %a4@(11),%d2 <== NOT EXECUTED
_fat_block_release(mt_entry);
rtems_disk_release(vol->dd);
return -1;
}
vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector);
54860: 8285 orl %d5,%d1 <== NOT EXECUTED 54862: 7a18 moveq #24,%d5 <== NOT EXECUTED
vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector);
54864: 8084 orl %d4,%d0 <== NOT EXECUTED 54866: ebaa lsll %d5,%d2 <== NOT EXECUTED
_fat_block_release(mt_entry);
rtems_disk_release(vol->dd);
return -1;
}
vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector);
54868: ebab lsll %d5,%d3 <== NOT EXECUTED
vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector);
5486a: 8082 orl %d2,%d0 <== NOT EXECUTED
_fat_block_release(mt_entry);
rtems_disk_release(vol->dd);
return -1;
}
vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector);
5486c: 8283 orl %d3,%d1 <== NOT EXECUTED
vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector);
5486e: 2540 003e movel %d0,%a2@(62) <== NOT EXECUTED
_fat_block_release(mt_entry);
rtems_disk_release(vol->dd);
return -1;
}
vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector);
54872: 2541 003a movel %d1,%a2@(58) <== NOT EXECUTED
vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector);
rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF,
54876: 4878 ffff pea ffffffff <LESS> <== NOT EXECUTED 5487a: 4878 ffff pea ffffffff <LESS> <== NOT EXECUTED 5487e: 2f0b movel %a3,%sp@- <== NOT EXECUTED 54880: 4eb9 0005 4084 jsr 54084 <fat_fat32_update_fsinfo_sector> <== NOT EXECUTED
0xFFFFFFFF);
if ( rc != RC_OK )
54886: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
return -1;
}
vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector);
vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector);
rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF,
5488a: 2400 movel %d0,%d2 <== NOT EXECUTED
0xFFFFFFFF);
if ( rc != RC_OK )
5488c: 6700 fd68 beqw 545f6 <fat_init_volume_info+0x360> <== NOT EXECUTED
int
_fat_block_release(
rtems_filesystem_mount_table_entry_t *mt_entry)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
return fat_buf_release(fs_info);
54890: 2f2b 0034 movel %a3@(52),%sp@- <== NOT EXECUTED 54894: 4eb9 0005 3a90 jsr 53a90 <fat_buf_release> <== NOT EXECUTED
rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF,
0xFFFFFFFF);
if ( rc != RC_OK )
{
_fat_block_release(mt_entry);
rtems_disk_release(vol->dd);
5489a: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED 5489e: 4eb9 0004 561a jsr 4561a <rtems_disk_release> <== NOT EXECUTED
return rc;
548a4: 508f addql #8,%sp <== NOT EXECUTED
free(fs_info->uino);
rtems_set_errno_and_return_minus_one( ENOMEM );
}
return RC_OK;
}
548a6: 2002 movel %d2,%d0 <== NOT EXECUTED 548a8: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 548ae: 4e5e unlk %fp <== NOT EXECUTED 548b0: 4e75 rts <== NOT EXECUTED
vol->rdir_size = vol->rdir_secs << vol->sec_log2;
if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0)
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec);
else
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec);
548b2: 4284 clrl %d4 <== NOT EXECUTED 548b4: 4285 clrl %d5 <== NOT EXECUTED 548b6: 182e ff9d moveb %fp@(-99),%d4 <== NOT EXECUTED 548ba: 1a2e ffa3 moveb %fp@(-93),%d5 <== NOT EXECUTED 548be: 4286 clrl %d6 <== NOT EXECUTED 548c0: 1c2e ffa2 moveb %fp@(-94),%d6 <== NOT EXECUTED 548c4: 7e18 moveq #24,%d7 <== NOT EXECUTED 548c6: 4845 swap %d5 <== NOT EXECUTED 548c8: 4245 clrw %d5 <== NOT EXECUTED 548ca: e18c lsll #8,%d4 <== NOT EXECUTED 548cc: 8885 orl %d5,%d4 <== NOT EXECUTED 548ce: 1a2e ffa1 moveb %fp@(-95),%d5 <== NOT EXECUTED 548d2: 8886 orl %d6,%d4 <== NOT EXECUTED 548d4: efad lsll %d7,%d5 <== NOT EXECUTED 548d6: 8885 orl %d5,%d4 <== NOT EXECUTED 548d8: 2544 0016 movel %d4,%a2@(22) <== NOT EXECUTED 548dc: 6000 fc98 braw 54576 <fat_init_volume_info+0x2e0> <== NOT EXECUTED
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one( EINVAL );
}
for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0;
548e0: 4200 clrb %d0 548e2: 7201 moveq #1,%d1 548e4: 1540 0003 moveb %d0,%a2@(3) 548e8: 2005 movel %d5,%d0 548ea: 6000 fb6e braw 5445a <fat_init_volume_info+0x1c4>
else
{
vol->rdir_cl = 0;
vol->mirror = 0;
vol->afat = 0;
vol->free_cls = 0xFFFFFFFF;
548ee: 70ff moveq #-1,%d0 <== NOT EXECUTED
else
{
if ( vol->data_cls < FAT_FAT16_MAX_CLN)
{
vol->type = FAT_FAT16;
vol->mask = FAT_FAT16_MASK;
548f0: 243c 0000 ffff movel #65535,%d2 <== NOT EXECUTED
vol->eoc_val = FAT_FAT16_EOC;
548f6: 283c 0000 fff8 movel #65528,%d4 <== NOT EXECUTED
}
}
else
{
vol->rdir_cl = 0;
vol->mirror = 0;
548fc: 4201 clrb %d1 <== NOT EXECUTED
}
else
{
if ( vol->data_cls < FAT_FAT16_MAX_CLN)
{
vol->type = FAT_FAT16;
548fe: 7602 moveq #2,%d3 <== NOT EXECUTED
vol->mask = FAT_FAT16_MASK;
54900: 2542 000c movel %d2,%a2@(12) <== NOT EXECUTED
}
else
{
if ( vol->data_cls < FAT_FAT16_MAX_CLN)
{
vol->type = FAT_FAT16;
54904: 1543 000a moveb %d3,%a2@(10) <== NOT EXECUTED
vol->mask = FAT_FAT16_MASK;
vol->eoc_val = FAT_FAT16_EOC;
54908: 2544 0010 movel %d4,%a2@(16) <== NOT EXECUTED
}
}
}
else
{
vol->rdir_cl = 0;
5490c: 42aa 0034 clrl %a2@(52) <== NOT EXECUTED
vol->mirror = 0;
54910: 1541 0042 moveb %d1,%a2@(66) <== NOT EXECUTED
vol->afat = 0;
vol->free_cls = 0xFFFFFFFF;
54914: 2540 003a movel %d0,%a2@(58) <== NOT EXECUTED
}
else
{
vol->rdir_cl = 0;
vol->mirror = 0;
vol->afat = 0;
54918: 1541 0048 moveb %d1,%a2@(72) <== NOT EXECUTED
vol->free_cls = 0xFFFFFFFF;
vol->next_cl = 0xFFFFFFFF;
5491c: 2540 003e movel %d0,%a2@(62) <== NOT EXECUTED 54920: 6000 fcd4 braw 545f6 <fat_init_volume_info+0x360> <== NOT EXECUTED
vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR;
if (vol->mirror)
vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM;
else
vol->afat = 0;
54924: 4203 clrb %d3 <== NOT EXECUTED 54926: 1543 0048 moveb %d3,%a2@(72) <== NOT EXECUTED 5492a: 6000 fe68 braw 54794 <fat_init_volume_info+0x4fe> <== NOT EXECUTED
if (rc == -1)
return rc;
/* Must be a block device. */
if (!S_ISBLK(stat_buf.st_mode))
rtems_set_errno_and_return_minus_one(ENOTTY);
5492e: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 54934: 74ff moveq #-1,%d2 <== NOT EXECUTED 54936: 7c19 moveq #25,%d6 <== NOT EXECUTED 54938: 2040 moveal %d0,%a0 <== NOT EXECUTED
free(fs_info->uino);
rtems_set_errno_and_return_minus_one( ENOMEM );
}
return RC_OK;
}
5493a: 2002 movel %d2,%d0 <== NOT EXECUTED
if (rc == -1)
return rc;
/* Must be a block device. */
if (!S_ISBLK(stat_buf.st_mode))
rtems_set_errno_and_return_minus_one(ENOTTY);
5493c: 2086 movel %d6,%a0@ <== NOT EXECUTED
free(fs_info->uino);
rtems_set_errno_and_return_minus_one( ENOMEM );
}
return RC_OK;
}
5493e: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 54944: 4e5e unlk %fp <== NOT EXECUTED 54946: 4e75 rts <== NOT EXECUTED
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one(EINVAL);
}
for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0;
54948: 4281 clrl %d1 <== NOT EXECUTED 5494a: 6000 fb70 braw 544bc <fat_init_volume_info+0x226> <== NOT EXECUTED
if ( (vol->bps != 512) &&
(vol->bps != 1024) &&
(vol->bps != 2048) &&
(vol->bps != 4096))
{
rtems_disk_release(vol->dd);
5494e: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
54952: 74ff moveq #-1,%d2 <== NOT EXECUTED 54954: 7616 moveq #22,%d3 <== NOT EXECUTED
if ( (vol->bps != 512) &&
(vol->bps != 1024) &&
(vol->bps != 2048) &&
(vol->bps != 4096))
{
rtems_disk_release(vol->dd);
54956: 4eb9 0004 561a jsr 4561a <rtems_disk_release> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
5495c: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 54962: 588f addql #4,%sp <== NOT EXECUTED 54964: 2240 moveal %d0,%a1 <== NOT EXECUTED
free(fs_info->uino);
rtems_set_errno_and_return_minus_one( ENOMEM );
}
return RC_OK;
}
54966: 2002 movel %d2,%d0 <== NOT EXECUTED
(vol->bps != 1024) &&
(vol->bps != 2048) &&
(vol->bps != 4096))
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one( EINVAL );
54968: 2283 movel %d3,%a1@ <== NOT EXECUTED
free(fs_info->uino);
rtems_set_errno_and_return_minus_one( ENOMEM );
}
return RC_OK;
}
5496a: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 54970: 4e5e unlk %fp <== NOT EXECUTED 54972: 4e75 rts <== NOT EXECUTED
memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE);
sc = rtems_bdbuf_release( block);
if (sc != RTEMS_SUCCESSFUL)
{
rtems_disk_release(vol->dd);
54974: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
54978: 74ff moveq #-1,%d2 <== NOT EXECUTED 5497a: 7805 moveq #5,%d4 <== NOT EXECUTED
memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE);
sc = rtems_bdbuf_release( block);
if (sc != RTEMS_SUCCESSFUL)
{
rtems_disk_release(vol->dd);
5497c: 4eb9 0004 561a jsr 4561a <rtems_disk_release> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
54982: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 54988: 588f addql #4,%sp <== NOT EXECUTED 5498a: 2040 moveal %d0,%a0 <== NOT EXECUTED
free(fs_info->uino);
rtems_set_errno_and_return_minus_one( ENOMEM );
}
return RC_OK;
}
5498c: 2002 movel %d2,%d0 <== NOT EXECUTED
sc = rtems_bdbuf_release( block);
if (sc != RTEMS_SUCCESSFUL)
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one( EIO );
5498e: 2084 movel %d4,%a0@ <== NOT EXECUTED
free(fs_info->uino);
rtems_set_errno_and_return_minus_one( ENOMEM );
}
return RC_OK;
}
54990: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 54996: 4e5e unlk %fp <== NOT EXECUTED 54998: 4e75 rts <== NOT EXECUTED
vol->afat = 0;
vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec);
if( vol->info_sec == 0 )
{
rtems_disk_release(vol->dd);
5499a: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
5499e: 74ff moveq #-1,%d2 <== NOT EXECUTED
vol->afat = 0;
vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec);
if( vol->info_sec == 0 )
{
rtems_disk_release(vol->dd);
549a0: 4eb9 0004 561a jsr 4561a <rtems_disk_release> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
549a6: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 549ac: 588f addql #4,%sp <== NOT EXECUTED 549ae: 7216 moveq #22,%d1 <== NOT EXECUTED 549b0: 2040 moveal %d0,%a0 <== NOT EXECUTED
free(fs_info->uino);
rtems_set_errno_and_return_minus_one( ENOMEM );
}
return RC_OK;
}
549b2: 2002 movel %d2,%d0 <== NOT EXECUTED 549b4: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED
vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec);
if( vol->info_sec == 0 )
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one( EINVAL );
549ba: 2081 movel %d1,%a0@ <== NOT EXECUTED
free(fs_info->uino);
rtems_set_errno_and_return_minus_one( ENOMEM );
}
return RC_OK;
}
549bc: 4e5e unlk %fp <== NOT EXECUTED 549be: 4e75 rts <== NOT EXECUTED
int
_fat_block_release(
rtems_filesystem_mount_table_entry_t *mt_entry)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
return fat_buf_release(fs_info);
549c0: 2f2b 0034 movel %a3@(52),%sp@- <== NOT EXECUTED
if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) !=
FAT_FSINFO_LEAD_SIGNATURE_VALUE)
{
_fat_block_release(mt_entry);
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one( EINVAL );
549c4: 74ff moveq #-1,%d2 <== NOT EXECUTED
int
_fat_block_release(
rtems_filesystem_mount_table_entry_t *mt_entry)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
return fat_buf_release(fs_info);
549c6: 4eb9 0005 3a90 jsr 53a90 <fat_buf_release> <== NOT EXECUTED
if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) !=
FAT_FSINFO_LEAD_SIGNATURE_VALUE)
{
_fat_block_release(mt_entry);
rtems_disk_release(vol->dd);
549cc: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED 549d0: 4eb9 0004 561a jsr 4561a <rtems_disk_release> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
549d6: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 549dc: 508f addql #8,%sp <== NOT EXECUTED 549de: 2040 moveal %d0,%a0 <== NOT EXECUTED 549e0: 7016 moveq #22,%d0 <== NOT EXECUTED 549e2: 2080 movel %d0,%a0@ <== NOT EXECUTED
free(fs_info->uino);
rtems_set_errno_and_return_minus_one( ENOMEM );
}
return RC_OK;
}
549e4: 2002 movel %d2,%d0 <== NOT EXECUTED 549e6: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 549ec: 4e5e unlk %fp <== NOT EXECUTED 549ee: 4e75 rts <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOTTY);
/* check that device is registred as block device and lock it */
vol->dd = rtems_disk_obtain(stat_buf.st_rdev);
if (vol->dd == NULL)
rtems_set_errno_and_return_minus_one(EIO);
549f0: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 549f6: 74ff moveq #-1,%d2 <== NOT EXECUTED 549f8: 7a05 moveq #5,%d5 <== NOT EXECUTED 549fa: 2240 moveal %d0,%a1 <== NOT EXECUTED
free(fs_info->uino);
rtems_set_errno_and_return_minus_one( ENOMEM );
}
return RC_OK;
}
549fc: 2002 movel %d2,%d0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOTTY);
/* check that device is registred as block device and lock it */
vol->dd = rtems_disk_obtain(stat_buf.st_rdev);
if (vol->dd == NULL)
rtems_set_errno_and_return_minus_one(EIO);
549fe: 2285 movel %d5,%a1@ <== NOT EXECUTED
free(fs_info->uino);
rtems_set_errno_and_return_minus_one( ENOMEM );
}
return RC_OK;
}
54a00: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 54a06: 4e5e unlk %fp <== NOT EXECUTED 54a08: 4e75 rts <== NOT EXECUTED
fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4;
fs_info->index = 0;
fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char));
if ( fs_info->uino == NULL )
{
rtems_disk_release(vol->dd);
54a0a: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED
free(fs_info->vhash);
54a0e: 47f9 0004 680c lea 4680c <free>,%a3 <== NOT EXECUTED
free(fs_info->rhash);
rtems_set_errno_and_return_minus_one( ENOMEM );
54a14: 74ff moveq #-1,%d2 <== NOT EXECUTED 54a16: 7a0c moveq #12,%d5 <== NOT EXECUTED
fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4;
fs_info->index = 0;
fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char));
if ( fs_info->uino == NULL )
{
rtems_disk_release(vol->dd);
54a18: 4eb9 0004 561a jsr 4561a <rtems_disk_release> <== NOT EXECUTED
free(fs_info->vhash);
54a1e: 2f2a 005a movel %a2@(90),%sp@- <== NOT EXECUTED 54a22: 4e93 jsr %a3@ <== NOT EXECUTED
free(fs_info->rhash);
54a24: 2f2a 005e movel %a2@(94),%sp@- <== NOT EXECUTED 54a28: 4e93 jsr %a3@ <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
54a2a: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 54a30: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 54a34: 2240 moveal %d0,%a1 <== NOT EXECUTED
free(fs_info->uino);
rtems_set_errno_and_return_minus_one( ENOMEM );
}
return RC_OK;
}
54a36: 2002 movel %d2,%d0 <== NOT EXECUTED
if ( fs_info->uino == NULL )
{
rtems_disk_release(vol->dd);
free(fs_info->vhash);
free(fs_info->rhash);
rtems_set_errno_and_return_minus_one( ENOMEM );
54a38: 2285 movel %d5,%a1@ <== NOT EXECUTED
free(fs_info->uino);
rtems_set_errno_and_return_minus_one( ENOMEM );
}
return RC_OK;
}
54a3a: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 54a40: 4e5e unlk %fp <== NOT EXECUTED 54a42: 4e75 rts <== NOT EXECUTED
int
_fat_block_release(
rtems_filesystem_mount_table_entry_t *mt_entry)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
return fat_buf_release(fs_info);
54a44: 2f2b 0034 movel %a3@(52),%sp@- <== NOT EXECUTED
FAT_USEFUL_INFO_SIZE, fs_info_sector);
if ( ret < 0 )
{
_fat_block_release(mt_entry);
rtems_disk_release(vol->dd);
return -1;
54a48: 74ff moveq #-1,%d2 <== NOT EXECUTED
int
_fat_block_release(
rtems_filesystem_mount_table_entry_t *mt_entry)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
return fat_buf_release(fs_info);
54a4a: 4eb9 0005 3a90 jsr 53a90 <fat_buf_release> <== NOT EXECUTED
ret = _fat_block_read(mt_entry, vol->info_sec , FAT_FSI_INFO,
FAT_USEFUL_INFO_SIZE, fs_info_sector);
if ( ret < 0 )
{
_fat_block_release(mt_entry);
rtems_disk_release(vol->dd);
54a50: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED 54a54: 4eb9 0004 561a jsr 4561a <rtems_disk_release> <== NOT EXECUTED
return -1;
54a5a: 508f addql #8,%sp <== NOT EXECUTED
free(fs_info->uino);
rtems_set_errno_and_return_minus_one( ENOMEM );
}
return RC_OK;
}
54a5c: 2002 movel %d2,%d0 <== NOT EXECUTED 54a5e: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 54a64: 4e5e unlk %fp <== NOT EXECUTED 54a66: 4e75 rts <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
}
fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t));
if (fs_info->sec_buf == NULL)
{
rtems_disk_release(vol->dd);
54a68: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED
free(fs_info->vhash);
54a6c: 47f9 0004 680c lea 4680c <free>,%a3 <== NOT EXECUTED
free(fs_info->rhash);
free(fs_info->uino);
rtems_set_errno_and_return_minus_one( ENOMEM );
54a72: 74ff moveq #-1,%d2 <== NOT EXECUTED 54a74: 780c moveq #12,%d4 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
}
fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t));
if (fs_info->sec_buf == NULL)
{
rtems_disk_release(vol->dd);
54a76: 4eb9 0004 561a jsr 4561a <rtems_disk_release> <== NOT EXECUTED
free(fs_info->vhash);
54a7c: 2f2a 005a movel %a2@(90),%sp@- <== NOT EXECUTED 54a80: 4e93 jsr %a3@ <== NOT EXECUTED
free(fs_info->rhash);
54a82: 2f2a 005e movel %a2@(94),%sp@- <== NOT EXECUTED 54a86: 4e93 jsr %a3@ <== NOT EXECUTED
free(fs_info->uino);
54a88: 2f2a 0062 movel %a2@(98),%sp@- <== NOT EXECUTED 54a8c: 4e93 jsr %a3@ <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
54a8e: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 54a94: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 54a98: 2040 moveal %d0,%a0 <== NOT EXECUTED
}
return RC_OK;
}
54a9a: 2002 movel %d2,%d0 <== NOT EXECUTED
{
rtems_disk_release(vol->dd);
free(fs_info->vhash);
free(fs_info->rhash);
free(fs_info->uino);
rtems_set_errno_and_return_minus_one( ENOMEM );
54a9c: 2084 movel %d4,%a0@ <== NOT EXECUTED
}
return RC_OK;
}
54a9e: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 54aa4: 4e5e unlk %fp <== NOT EXECUTED 54aa6: 4e75 rts <== NOT EXECUTED
/* set up collection of fat-files fd */
fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control));
if ( fs_info->vhash == NULL )
{
rtems_disk_release(vol->dd);
54aa8: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
54aac: 74ff moveq #-1,%d2 <== NOT EXECUTED 54aae: 7e0c moveq #12,%d7 <== NOT EXECUTED
/* set up collection of fat-files fd */
fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control));
if ( fs_info->vhash == NULL )
{
rtems_disk_release(vol->dd);
54ab0: 4eb9 0004 561a jsr 4561a <rtems_disk_release> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
54ab6: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 54abc: 588f addql #4,%sp <== NOT EXECUTED 54abe: 2040 moveal %d0,%a0 <== NOT EXECUTED
free(fs_info->uino);
rtems_set_errno_and_return_minus_one( ENOMEM );
}
return RC_OK;
}
54ac0: 2002 movel %d2,%d0 <== NOT EXECUTED
/* set up collection of fat-files fd */
fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control));
if ( fs_info->vhash == NULL )
{
rtems_disk_release(vol->dd);
rtems_set_errno_and_return_minus_one( ENOMEM );
54ac2: 2087 movel %d7,%a0@ <== NOT EXECUTED
free(fs_info->uino);
rtems_set_errno_and_return_minus_one( ENOMEM );
}
return RC_OK;
}
54ac4: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 54aca: 4e5e unlk %fp <== NOT EXECUTED 54acc: 4e75 rts <== NOT EXECUTED
rtems_chain_initialize_empty(fs_info->vhash + i);
fs_info->rhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control));
if ( fs_info->rhash == NULL )
{
rtems_disk_release(vol->dd);
54ace: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED
free(fs_info->vhash);
rtems_set_errno_and_return_minus_one( ENOMEM );
54ad2: 74ff moveq #-1,%d2 <== NOT EXECUTED 54ad4: 7c0c moveq #12,%d6 <== NOT EXECUTED
rtems_chain_initialize_empty(fs_info->vhash + i);
fs_info->rhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control));
if ( fs_info->rhash == NULL )
{
rtems_disk_release(vol->dd);
54ad6: 4eb9 0004 561a jsr 4561a <rtems_disk_release> <== NOT EXECUTED
free(fs_info->vhash);
54adc: 2f2a 005a movel %a2@(90),%sp@- <== NOT EXECUTED 54ae0: 4eb9 0004 680c jsr 4680c <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
54ae6: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 54aec: 508f addql #8,%sp <== NOT EXECUTED 54aee: 2040 moveal %d0,%a0 <== NOT EXECUTED
free(fs_info->uino);
rtems_set_errno_and_return_minus_one( ENOMEM );
}
return RC_OK;
}
54af0: 2002 movel %d2,%d0 <== NOT EXECUTED
fs_info->rhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control));
if ( fs_info->rhash == NULL )
{
rtems_disk_release(vol->dd);
free(fs_info->vhash);
rtems_set_errno_and_return_minus_one( ENOMEM );
54af2: 2086 movel %d6,%a0@ <== NOT EXECUTED
free(fs_info->uino);
rtems_set_errno_and_return_minus_one( ENOMEM );
}
return RC_OK;
}
54af4: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 54afa: 4e5e unlk %fp <== NOT EXECUTED 54afc: 4e75 rts <== NOT EXECUTED
{
ret = _fat_block_read(mt_entry, vol->info_sec , 0,
FAT_FSI_LEADSIG_SIZE, fs_info_sector);
if ( ret < 0 )
{
rtems_disk_release(vol->dd);
54afe: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED
return -1;
54b02: 74ff moveq #-1,%d2 <== NOT EXECUTED
{
ret = _fat_block_read(mt_entry, vol->info_sec , 0,
FAT_FSI_LEADSIG_SIZE, fs_info_sector);
if ( ret < 0 )
{
rtems_disk_release(vol->dd);
54b04: 4eb9 0004 561a jsr 4561a <rtems_disk_release> <== NOT EXECUTED
return -1;
54b0a: 588f addql #4,%sp <== NOT EXECUTED
free(fs_info->uino);
rtems_set_errno_and_return_minus_one( ENOMEM );
}
return RC_OK;
}
54b0c: 2002 movel %d2,%d0 <== NOT EXECUTED 54b0e: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 54b14: 4e5e unlk %fp <== NOT EXECUTED
0005bd46 <fat_scan_fat_for_free_clusters>:
uint32_t *chain,
uint32_t count,
uint32_t *cls_added,
uint32_t *last_cl
)
{
5bd46: 4e56 ffd0 linkw %fp,#-48 5bd4a: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 5bd4e: 246e 0008 moveal %fp@(8),%a2
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
5bd52: 206a 0034 moveal %a2@(52),%a0
uint32_t *chain,
uint32_t count,
uint32_t *cls_added,
uint32_t *last_cl
)
{
5bd56: 266e 0014 moveal %fp@(20),%a3
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cl4find = 2;
uint32_t next_cln = 0;
uint32_t save_cln = 0;
uint32_t data_cls_val = fs_info->vol.data_cls + 2;
5bd5a: 2a28 0030 movel %a0@(48),%d5
uint32_t *cls_added,
uint32_t *last_cl
)
{
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
5bd5e: 2d48 fff8 movel %a0,%fp@(-8)
uint32_t cl4find = 2;
uint32_t next_cln = 0;
5bd62: 42ae fffc clrl %fp@(-4)
uint32_t save_cln = 0;
uint32_t data_cls_val = fs_info->vol.data_cls + 2;
uint32_t i = 2;
*cls_added = 0;
5bd66: 4293 clrl %a3@
if (count == 0)
5bd68: 4aae 0010 tstl %fp@(16) 5bd6c: 6700 0112 beqw 5be80 <fat_scan_fat_for_free_clusters+0x13a>
return rc;
if (fs_info->vol.next_cl != FAT_UNDEFINED_VALUE)
5bd70: 2428 003e movel %a0@(62),%d2 5bd74: 70ff moveq #-1,%d0 5bd76: b082 cmpl %d2,%d0 5bd78: 6700 0114 beqw 5be8e <fat_scan_fat_for_free_clusters+0x148>
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cl4find = 2;
uint32_t next_cln = 0;
uint32_t save_cln = 0;
uint32_t data_cls_val = fs_info->vol.data_cls + 2;
5bd7c: 5485 addql #2,%d5
/*
* fs_info->vol.data_cls is exactly the count of data clusters
* starting at cluster 2, so the maximum valid cluster number is
* (fs_info->vol.data_cls + 1)
*/
while (i < data_cls_val)
5bd7e: 7202 moveq #2,%d1 5bd80: b285 cmpl %d5,%d1 5bd82: 6400 0192 bccw 5bf16 <fat_scan_fat_for_free_clusters+0x1d0> 5bd86: 2c0e movel %fp,%d6 5bd88: 7602 moveq #2,%d3 5bd8a: 4287 clrl %d7 5bd8c: 5986 subql #4,%d6 5bd8e: 49f9 0005 b828 lea 5b828 <fat_get_fat_cluster>,%a4
}
}
else
{
/* set EOC value to new allocated cluster */
rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC);
5bd94: 4bf9 0005 b9da lea 5b9da <fat_set_fat_cluster>,%a5
* starting at cluster 2, so the maximum valid cluster number is
* (fs_info->vol.data_cls + 1)
*/
while (i < data_cls_val)
{
rc = fat_get_fat_cluster(mt_entry, cl4find, &next_cln);
5bd9a: 2f06 movel %d6,%sp@- 5bd9c: 2f02 movel %d2,%sp@- 5bd9e: 2f0a movel %a2,%sp@- 5bda0: 4e94 jsr %a4@
if ( rc != RC_OK )
5bda2: 4fef 000c lea %sp@(12),%sp
* starting at cluster 2, so the maximum valid cluster number is
* (fs_info->vol.data_cls + 1)
*/
while (i < data_cls_val)
{
rc = fat_get_fat_cluster(mt_entry, cl4find, &next_cln);
5bda6: 2800 movel %d0,%d4
if ( rc != RC_OK )
5bda8: 6600 00ea bnew 5be94 <fat_scan_fat_for_free_clusters+0x14e>
if (*cls_added != 0)
fat_free_fat_clusters_chain(mt_entry, (*chain));
return rc;
}
if (next_cln == FAT_GENFAT_FREE)
5bdac: 4aae fffc tstl %fp@(-4)
5bdb0: 662e bnes 5bde0 <fat_scan_fat_for_free_clusters+0x9a>
/*
* We are enforced to process allocation of the first free cluster
* by separate 'if' statement because otherwise undo function
* wouldn't work properly
*/
if (*cls_added == 0)
5bdb2: 4a93 tstl %a3@
5bdb4: 6670 bnes 5be26 <fat_scan_fat_for_free_clusters+0xe0><== NEVER TAKEN
{
*chain = cl4find;
rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC);
5bdb6: 4878 ffff pea ffffffff <LESS>
* by separate 'if' statement because otherwise undo function
* wouldn't work properly
*/
if (*cls_added == 0)
{
*chain = cl4find;
5bdba: 206e 000c moveal %fp@(12),%a0
rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC);
5bdbe: 2f02 movel %d2,%sp@-
* by separate 'if' statement because otherwise undo function
* wouldn't work properly
*/
if (*cls_added == 0)
{
*chain = cl4find;
5bdc0: 2082 movel %d2,%a0@
rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC);
5bdc2: 2f0a movel %a2,%sp@- 5bdc4: 4e95 jsr %a5@
if ( rc != RC_OK )
5bdc6: 4fef 000c lea %sp@(12),%sp 5bdca: 4a80 tstl %d0 5bdcc: 6600 011c bnew 5beea <fat_scan_fat_for_free_clusters+0x1a4>
return rc;
}
}
save_cln = cl4find;
(*cls_added)++;
5bdd0: 2013 movel %a3@,%d0 5bdd2: 5280 addql #1,%d0 5bdd4: 2680 movel %d0,%a3@
/* have we satisfied request ? */
if (*cls_added == count)
5bdd6: b0ae 0010 cmpl %fp@(16),%d0 5bdda: 6700 00d8 beqw 5beb4 <fat_scan_fat_for_free_clusters+0x16e>
5bdde: 2e02 movel %d2,%d7 <== NOT EXECUTED
*last_cl = save_cln;
fat_buf_release(fs_info);
return rc;
}
}
i++;
5bde0: 5283 addql #1,%d3
cl4find++;
5bde2: 5282 addql #1,%d2
if (cl4find >= data_cls_val)
5bde4: b485 cmpl %d5,%d2
5bde6: 6502 bcss 5bdea <fat_scan_fat_for_free_clusters+0xa4><== ALWAYS TAKEN
cl4find = 2;
5bde8: 7402 moveq #2,%d2 <== NOT EXECUTED
/*
* fs_info->vol.data_cls is exactly the count of data clusters
* starting at cluster 2, so the maximum valid cluster number is
* (fs_info->vol.data_cls + 1)
*/
while (i < data_cls_val)
5bdea: b685 cmpl %d5,%d3
5bdec: 65ac bcss 5bd9a <fat_scan_fat_for_free_clusters+0x54><== ALWAYS TAKEN
if (cl4find >= data_cls_val)
cl4find = 2;
}
fs_info->vol.next_cl = save_cln;
if (fs_info->vol.free_cls != 0xFFFFFFFF)
5bdee: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 5bdf2: 72ff moveq #-1,%d1 <== NOT EXECUTED 5bdf4: 2028 003a movel %a0@(58),%d0 <== NOT EXECUTED
cl4find++;
if (cl4find >= data_cls_val)
cl4find = 2;
}
fs_info->vol.next_cl = save_cln;
5bdf8: 2147 003e movel %d7,%a0@(62) <== NOT EXECUTED
if (fs_info->vol.free_cls != 0xFFFFFFFF)
5bdfc: b280 cmpl %d0,%d1 <== NOT EXECUTED 5bdfe: 6706 beqs 5be06 <fat_scan_fat_for_free_clusters+0xc0><== NOT EXECUTED
fs_info->vol.free_cls -= (*cls_added);
5be00: 9093 subl %a3@,%d0 <== NOT EXECUTED 5be02: 2140 003a movel %d0,%a0@(58) <== NOT EXECUTED
*last_cl = save_cln;
5be06: 206e 0018 moveal %fp@(24),%a0 <== NOT EXECUTED
fat_buf_release(fs_info);
return RC_OK;
5be0a: 4284 clrl %d4 <== NOT EXECUTED
fs_info->vol.next_cl = save_cln;
if (fs_info->vol.free_cls != 0xFFFFFFFF)
fs_info->vol.free_cls -= (*cls_added);
*last_cl = save_cln;
5be0c: 2087 movel %d7,%a0@ <== NOT EXECUTED
fat_buf_release(fs_info);
5be0e: 2f2e fff8 movel %fp@(-8),%sp@- <== NOT EXECUTED 5be12: 4eb9 0005 3a90 jsr 53a90 <fat_buf_release> <== NOT EXECUTED
return RC_OK;
5be18: 588f addql #4,%sp <== NOT EXECUTED
}
5be1a: 2004 movel %d4,%d0 <== NOT EXECUTED 5be1c: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5be22: 4e5e unlk %fp <== NOT EXECUTED 5be24: 4e75 rts <== NOT EXECUTED
}
}
else
{
/* set EOC value to new allocated cluster */
rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC);
5be26: 4878 ffff pea ffffffff <LESS> <== NOT EXECUTED 5be2a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5be2c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5be2e: 4e95 jsr %a5@ <== NOT EXECUTED
if ( rc != RC_OK )
5be30: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5be34: 4a80 tstl %d0 <== NOT EXECUTED 5be36: 6600 00c0 bnew 5bef8 <fat_scan_fat_for_free_clusters+0x1b2><== NOT EXECUTED
/* cleanup activity */
fat_free_fat_clusters_chain(mt_entry, (*chain));
return rc;
}
rc = fat_set_fat_cluster(mt_entry, save_cln, cl4find);
5be3a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5be3c: 2f07 movel %d7,%sp@- <== NOT EXECUTED 5be3e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5be40: 4e95 jsr %a5@ <== NOT EXECUTED
if ( rc != RC_OK )
5be42: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5be46: 4a80 tstl %d0 <== NOT EXECUTED 5be48: 6786 beqs 5bdd0 <fat_scan_fat_for_free_clusters+0x8a><== NOT EXECUTED
{
/* cleanup activity */
fat_free_fat_clusters_chain(mt_entry, (*chain));
5be4a: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED
/* cleanup activity */
fat_free_fat_clusters_chain(mt_entry, (*chain));
return rc;
}
rc = fat_set_fat_cluster(mt_entry, save_cln, cl4find);
5be4e: 2800 movel %d0,%d4 <== NOT EXECUTED
if ( rc != RC_OK )
{
/* cleanup activity */
fat_free_fat_clusters_chain(mt_entry, (*chain));
5be50: 2f10 movel %a0@,%sp@- <== NOT EXECUTED 5be52: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5be54: 4eb9 0005 bc70 jsr 5bc70 <fat_free_fat_clusters_chain> <== NOT EXECUTED
/* trying to save last allocated cluster for future use */
fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_FREE);
5be5a: 42a7 clrl %sp@- <== NOT EXECUTED 5be5c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5be5e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5be60: 4eb9 0005 b9da jsr 5b9da <fat_set_fat_cluster> <== NOT EXECUTED
fat_buf_release(fs_info);
5be66: 2f2e fff8 movel %fp@(-8),%sp@- <== NOT EXECUTED 5be6a: 4eb9 0005 3a90 jsr 53a90 <fat_buf_release> <== NOT EXECUTED
return rc;
5be70: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
fs_info->vol.free_cls -= (*cls_added);
*last_cl = save_cln;
fat_buf_release(fs_info);
return RC_OK;
}
5be74: 2004 movel %d4,%d0 <== NOT EXECUTED 5be76: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5be7c: 4e5e unlk %fp <== NOT EXECUTED 5be7e: 4e75 rts <== NOT EXECUTED
uint32_t i = 2;
*cls_added = 0;
if (count == 0)
return rc;
5be80: 4284 clrl %d4 <== NOT EXECUTED
fs_info->vol.free_cls -= (*cls_added);
*last_cl = save_cln;
fat_buf_release(fs_info);
return RC_OK;
}
5be82: 2004 movel %d4,%d0 <== NOT EXECUTED 5be84: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5be8a: 4e5e unlk %fp <== NOT EXECUTED 5be8c: 4e75 rts <== NOT EXECUTED
uint32_t *last_cl
)
{
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cl4find = 2;
5be8e: 7402 moveq #2,%d2 5be90: 6000 feea braw 5bd7c <fat_scan_fat_for_free_clusters+0x36>
while (i < data_cls_val)
{
rc = fat_get_fat_cluster(mt_entry, cl4find, &next_cln);
if ( rc != RC_OK )
{
if (*cls_added != 0)
5be94: 4a93 tstl %a3@ <== NOT EXECUTED 5be96: 6782 beqs 5be1a <fat_scan_fat_for_free_clusters+0xd4><== NOT EXECUTED
fat_free_fat_clusters_chain(mt_entry, (*chain));
5be98: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 5be9c: 2f10 movel %a0@,%sp@- <== NOT EXECUTED 5be9e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5bea0: 4eb9 0005 bc70 jsr 5bc70 <fat_free_fat_clusters_chain> <== NOT EXECUTED 5bea6: 508f addql #8,%sp <== NOT EXECUTED
fs_info->vol.free_cls -= (*cls_added);
*last_cl = save_cln;
fat_buf_release(fs_info);
return RC_OK;
}
5bea8: 2004 movel %d4,%d0 <== NOT EXECUTED 5beaa: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5beb0: 4e5e unlk %fp <== NOT EXECUTED 5beb2: 4e75 rts <== NOT EXECUTED
/* have we satisfied request ? */
if (*cls_added == count)
{
fs_info->vol.next_cl = save_cln;
if (fs_info->vol.free_cls != 0xFFFFFFFF)
5beb4: 206e fff8 moveal %fp@(-8),%a0 5beb8: 72ff moveq #-1,%d1 5beba: 2028 003a movel %a0@(58),%d0
(*cls_added)++;
/* have we satisfied request ? */
if (*cls_added == count)
{
fs_info->vol.next_cl = save_cln;
5bebe: 2142 003e movel %d2,%a0@(62)
if (fs_info->vol.free_cls != 0xFFFFFFFF)
5bec2: b280 cmpl %d0,%d1
5bec4: 6706 beqs 5becc <fat_scan_fat_for_free_clusters+0x186><== ALWAYS TAKEN
fs_info->vol.free_cls -= (*cls_added);
5bec6: 9093 subl %a3@,%d0 <== NOT EXECUTED 5bec8: 2140 003a movel %d0,%a0@(58) <== NOT EXECUTED
*last_cl = save_cln;
5becc: 206e 0018 moveal %fp@(24),%a0 5bed0: 2082 movel %d2,%a0@
fat_buf_release(fs_info);
5bed2: 2f2e fff8 movel %fp@(-8),%sp@- 5bed6: 4eb9 0005 3a90 jsr 53a90 <fat_buf_release>
return rc;
5bedc: 588f addql #4,%sp
fs_info->vol.free_cls -= (*cls_added);
*last_cl = save_cln;
fat_buf_release(fs_info);
return RC_OK;
}
5bede: 2004 movel %d4,%d0 5bee0: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 5bee6: 4e5e unlk %fp 5bee8: 4e75 rts
* wouldn't work properly
*/
if (*cls_added == 0)
{
*chain = cl4find;
rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC);
5beea: 2800 movel %d0,%d4 <== NOT EXECUTED
fs_info->vol.free_cls -= (*cls_added);
*last_cl = save_cln;
fat_buf_release(fs_info);
return RC_OK;
}
5beec: 2004 movel %d4,%d0 <== NOT EXECUTED 5beee: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5bef4: 4e5e unlk %fp <== NOT EXECUTED 5bef6: 4e75 rts <== NOT EXECUTED
/* set EOC value to new allocated cluster */
rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC);
if ( rc != RC_OK )
{
/* cleanup activity */
fat_free_fat_clusters_chain(mt_entry, (*chain));
5bef8: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED
}
}
else
{
/* set EOC value to new allocated cluster */
rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC);
5befc: 2800 movel %d0,%d4 <== NOT EXECUTED
if ( rc != RC_OK )
{
/* cleanup activity */
fat_free_fat_clusters_chain(mt_entry, (*chain));
5befe: 2f10 movel %a0@,%sp@- <== NOT EXECUTED 5bf00: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5bf02: 4eb9 0005 bc70 jsr 5bc70 <fat_free_fat_clusters_chain> <== NOT EXECUTED
return rc;
5bf08: 508f addql #8,%sp <== NOT EXECUTED
fs_info->vol.free_cls -= (*cls_added);
*last_cl = save_cln;
fat_buf_release(fs_info);
return RC_OK;
}
5bf0a: 2004 movel %d4,%d0 <== NOT EXECUTED 5bf0c: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5bf12: 4e5e unlk %fp <== NOT EXECUTED 5bf14: 4e75 rts <== NOT EXECUTED
/*
* fs_info->vol.data_cls is exactly the count of data clusters
* starting at cluster 2, so the maximum valid cluster number is
* (fs_info->vol.data_cls + 1)
*/
while (i < data_cls_val)
5bf16: 4287 clrl %d7 <== NOT EXECUTED 5bf18: 6000 fed4 braw 5bdee <fat_scan_fat_for_free_clusters+0xa8><== NOT EXECUTED
0005b9da <fat_set_fat_cluster>:
uint16_t fat16_clv = 0;
uint32_t fat32_clv = 0;
rtems_bdbuf_buffer *block0 = NULL;
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
5b9da: 7001 moveq #1,%d0
fat_set_fat_cluster(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
uint32_t in_val
)
{
5b9dc: 4e56 ffe0 linkw %fp,#-32
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
5b9e0: 206e 0008 moveal %fp@(8),%a0
fat_set_fat_cluster(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
uint32_t in_val
)
{
5b9e4: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 5b9e8: 242e 000c movel %fp@(12),%d2 5b9ec: 2a2e 0010 movel %fp@(16),%d5
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
5b9f0: 2468 0034 moveal %a0@(52),%a2
uint32_t sec = 0;
uint32_t ofs = 0;
uint16_t fat16_clv = 0;
uint32_t fat32_clv = 0;
rtems_bdbuf_buffer *block0 = NULL;
5b9f4: 42ae fffc clrl %fp@(-4)
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
5b9f8: b082 cmpl %d2,%d0
5b9fa: 6476 bccs 5ba72 <fat_set_fat_cluster+0x98> <== NEVER TAKEN
5b9fc: 202a 0030 movel %a2@(48),%d0 5ba00: 5280 addql #1,%d0 5ba02: b082 cmpl %d2,%d0
5ba04: 656c bcss 5ba72 <fat_set_fat_cluster+0x98> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
5ba06: 4280 clrl %d0 5ba08: 102a 000a moveb %a2@(10),%d0 5ba0c: 2802 movel %d2,%d4 5ba0e: 0800 0000 btst #0,%d0
5ba12: 6676 bnes 5ba8a <fat_set_fat_cluster+0xb0> <== ALWAYS TAKEN
5ba14: 0800 0001 btst #1,%d0 <== NOT EXECUTED 5ba18: 6776 beqs 5ba90 <fat_set_fat_cluster+0xb6> <== NOT EXECUTED 5ba1a: d884 addl %d4,%d4 <== NOT EXECUTED
5ba1c: 4280 clrl %d0 5ba1e: 102a 0002 moveb %a2@(2),%d0 5ba22: 2604 movel %d4,%d3 5ba24: e0ab lsrl %d0,%d3 5ba26: d6aa 0044 addl %a2@(68),%d3
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0);
5ba2a: 47f9 0005 387c lea 5387c <fat_buf_access>,%a3
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
5ba30: 3c12 movew %a2@,%d6
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0);
5ba32: 486e fffc pea %fp@(-4) 5ba36: 4878 0001 pea 1 <ADD> 5ba3a: 2f03 movel %d3,%sp@- 5ba3c: 2f0a movel %a2,%sp@- 5ba3e: 4e93 jsr %a3@
if (rc != RC_OK)
5ba40: 4fef 0010 lea %sp@(16),%sp 5ba44: 4a80 tstl %d0
5ba46: 6638 bnes 5ba80 <fat_set_fat_cluster+0xa6> <== NEVER TAKEN
return rc;
switch ( fs_info->vol.type )
5ba48: 4281 clrl %d1 5ba4a: 122a 000a moveb %a2@(10),%d1
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
5ba4e: 0286 0000 ffff andil #65535,%d6 5ba54: 5386 subql #1,%d6 5ba56: c886 andl %d6,%d4
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0);
if (rc != RC_OK)
return rc;
switch ( fs_info->vol.type )
5ba58: 7c02 moveq #2,%d6 5ba5a: bc81 cmpl %d1,%d6 5ba5c: 6700 00f2 beqw 5bb50 <fat_set_fat_cluster+0x176> 5ba60: 1c3c 0004 moveb #4,%d6 5ba64: bc81 cmpl %d1,%d6 5ba66: 6700 009a beqw 5bb02 <fat_set_fat_cluster+0x128> 5ba6a: 1c3c 0001 moveb #1,%d6 5ba6e: bc81 cmpl %d1,%d6
5ba70: 6722 beqs 5ba94 <fat_set_fat_cluster+0xba> <== ALWAYS TAKEN
fat_buf_mark_modified(fs_info);
break;
default:
rtems_set_errno_and_return_minus_one(EIO);
5ba72: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 5ba78: 7205 moveq #5,%d1 <== NOT EXECUTED 5ba7a: 2040 moveal %d0,%a0 <== NOT EXECUTED 5ba7c: 70ff moveq #-1,%d0 <== NOT EXECUTED 5ba7e: 2081 movel %d1,%a0@ <== NOT EXECUTED
break;
}
return RC_OK;
}
5ba80: 4cee 0c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a3 <== NOT EXECUTED 5ba86: 4e5e unlk %fp <== NOT EXECUTED 5ba88: 4e75 rts <== NOT EXECUTED
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
5ba8a: e28c lsrl #1,%d4 5ba8c: d882 addl %d2,%d4 5ba8e: 608c bras 5ba1c <fat_set_fat_cluster+0x42>
5ba90: e58c lsll #2,%d4 <== NOT EXECUTED 5ba92: 6088 bras 5ba1c <fat_set_fat_cluster+0x42> <== NOT EXECUTED
case FAT_FAT12:
if ( FAT_CLUSTER_IS_ODD(cln) )
{
fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT;
*((uint8_t *)(block0->buffer + ofs)) =
(*((uint8_t *)(block0->buffer + ofs))) & 0x0F;
5ba94: 206e fffc moveal %fp@(-4),%a0 5ba98: 2068 001e moveal %a0@(30),%a0
return rc;
switch ( fs_info->vol.type )
{
case FAT_FAT12:
if ( FAT_CLUSTER_IS_ODD(cln) )
5ba9c: 0802 0000 btst #0,%d2 5baa0: 6700 00d8 beqw 5bb7a <fat_set_fat_cluster+0x1a0>
{
fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT;
*((uint8_t *)(block0->buffer + ofs)) =
(*((uint8_t *)(block0->buffer + ofs))) & 0x0F;
5baa4: d1c4 addal %d4,%a0
{
case FAT_FAT12:
if ( FAT_CLUSTER_IS_ODD(cln) )
{
fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT;
*((uint8_t *)(block0->buffer + ofs)) =
5baa6: 740f moveq #15,%d2 5baa8: 1210 moveb %a0@,%d1
switch ( fs_info->vol.type )
{
case FAT_FAT12:
if ( FAT_CLUSTER_IS_ODD(cln) )
{
fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT;
5baaa: e98d lsll #4,%d5
*((uint8_t *)(block0->buffer + ofs)) =
5baac: c282 andl %d2,%d1 5baae: 1081 moveb %d1,%a0@
(*((uint8_t *)(block0->buffer + ofs))) & 0x0F;
*((uint8_t *)(block0->buffer + ofs)) =
(*((uint8_t *)(block0->buffer + ofs))) |
5bab0: 206e fffc moveal %fp@(-4),%a0 5bab4: 2068 001e moveal %a0@(30),%a0 5bab8: d1c4 addal %d4,%a0
{
fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT;
*((uint8_t *)(block0->buffer + ofs)) =
(*((uint8_t *)(block0->buffer + ofs))) & 0x0F;
*((uint8_t *)(block0->buffer + ofs)) =
5baba: 1210 moveb %a0@,%d1 5babc: 8285 orl %d5,%d1 5babe: 1081 moveb %d1,%a0@
(*((uint8_t *)(block0->buffer + ofs))) |
(uint8_t )(fat16_clv & 0x00FF);
fat_buf_mark_modified(fs_info);
if ( ofs == (fs_info->vol.bps - 1) )
5bac0: 4281 clrl %d1 5bac2: 3212 movew %a2@,%d1
}
static inline void
fat_buf_mark_modified(fat_fs_info_t *fs_info)
{
fs_info->c.modified = true;
5bac4: 1546 0076 moveb %d6,%a2@(118) 5bac8: 5381 subql #1,%d1 5baca: b881 cmpl %d1,%d4 5bacc: 6700 0110 beqw 5bbde <fat_set_fat_cluster+0x204>
fat_buf_mark_modified(fs_info);
}
else
{
*((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00;
5bad0: 206e fffc moveal %fp@(-4),%a0 5bad4: 5284 addql #1,%d4 5bad6: 2068 001e moveal %a0@(30),%a0 5bada: 4201 clrb %d1
*((uint8_t *)(block0->buffer + ofs + 1)) =
(*((uint8_t *)(block0->buffer + ofs + 1))) |
(uint8_t )((fat16_clv & 0xFF00)>>8);
5badc: 0285 0000 ffff andil #65535,%d5
fat_buf_mark_modified(fs_info);
}
else
{
*((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00;
5bae2: 1181 4800 moveb %d1,%a0@(00000000,%d4:l)
*((uint8_t *)(block0->buffer + ofs + 1)) =
(*((uint8_t *)(block0->buffer + ofs + 1))) |
(uint8_t )((fat16_clv & 0xFF00)>>8);
5bae6: e08d lsrl #8,%d5
else
{
*((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00;
*((uint8_t *)(block0->buffer + ofs + 1)) =
(*((uint8_t *)(block0->buffer + ofs + 1))) |
5bae8: 206e fffc moveal %fp@(-4),%a0 5baec: 2068 001e moveal %a0@(30),%a0 5baf0: d1c4 addal %d4,%a0
}
else
{
*((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00;
*((uint8_t *)(block0->buffer + ofs + 1)) =
5baf2: 1210 moveb %a0@,%d1 5baf4: 8a81 orl %d1,%d5 5baf6: 1085 moveb %d5,%a0@
break;
}
return RC_OK;
}
5baf8: 4cee 0c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a3 5bafe: 4e5e unlk %fp 5bb00: 4e75 rts
case FAT_FAT32:
fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK));
*((uint32_t *)(block0->buffer + ofs)) =
(*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000));
5bb02: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED
(uint16_t )(CT_LE_W(in_val));
fat_buf_mark_modified(fs_info);
break;
case FAT_FAT32:
fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK));
5bb06: 2405 movel %d5,%d2 <== NOT EXECUTED
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
5bb08: 7c18 moveq #24,%d6 <== NOT EXECUTED 5bb0a: 0282 0fff ffff andil #268435455,%d2 <== NOT EXECUTED
*((uint32_t *)(block0->buffer + ofs)) =
(*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000));
5bb10: 2068 001e moveal %a0@(30),%a0 <== NOT EXECUTED 5bb14: d1c4 addal %d4,%a0 <== NOT EXECUTED
uint32_t value
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
5bb16: 2802 movel %d2,%d4 <== NOT EXECUTED
byte3 = (value >> 16) & 0xff;
5bb18: 2202 movel %d2,%d1 <== NOT EXECUTED
uint32_t value
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
5bb1a: ecac lsrl %d6,%d4 <== NOT EXECUTED
byte3 = (value >> 16) & 0xff;
5bb1c: e089 lsrl #8,%d1 <== NOT EXECUTED
byte2 = (value >> 8) & 0xff;
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
5bb1e: edad lsll %d6,%d5 <== NOT EXECUTED
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
5bb20: e18a lsll #8,%d2 <== NOT EXECUTED 5bb22: 2610 movel %a0@,%d3 <== NOT EXECUTED
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
5bb24: 8a84 orl %d4,%d5 <== NOT EXECUTED 5bb26: 0282 00ff 0000 andil #16711680,%d2 <== NOT EXECUTED 5bb2c: 0281 0000 ff00 andil #65280,%d1 <== NOT EXECUTED 5bb32: 0283 0000 00f0 andil #240,%d3 <== NOT EXECUTED 5bb38: 8a82 orl %d2,%d5 <== NOT EXECUTED 5bb3a: 8a81 orl %d1,%d5 <== NOT EXECUTED 5bb3c: 7201 moveq #1,%d1 <== NOT EXECUTED
*((uint32_t *)(block0->buffer + ofs)) =
fat32_clv | (*((uint32_t *)(block0->buffer + ofs)));
5bb3e: 8a83 orl %d3,%d5 <== NOT EXECUTED 5bb40: 2085 movel %d5,%a0@ <== NOT EXECUTED 5bb42: 1541 0076 moveb %d1,%a2@(118) <== NOT EXECUTED
break;
}
return RC_OK;
}
5bb46: 4cee 0c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a3 <== NOT EXECUTED 5bb4c: 4e5e unlk %fp <== NOT EXECUTED 5bb4e: 4e75 rts <== NOT EXECUTED
}
}
break;
case FAT_FAT16:
*((uint16_t *)(block0->buffer + ofs)) =
5bb50: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED
(uint16_t )(CT_LE_W(in_val));
5bb54: 0285 0000 ffff andil #65535,%d5 <== NOT EXECUTED
}
}
break;
case FAT_FAT16:
*((uint16_t *)(block0->buffer + ofs)) =
5bb5a: 2068 001e moveal %a0@(30),%a0 <== NOT EXECUTED
static inline uint16_t m68k_swap_u16(
uint16_t value
)
{
return (((value & 0xff) << 8) | ((value >> 8) & 0xff));
5bb5e: 2205 movel %d5,%d1 <== NOT EXECUTED 5bb60: e089 lsrl #8,%d1 <== NOT EXECUTED 5bb62: e18d lsll #8,%d5 <== NOT EXECUTED 5bb64: 8a81 orl %d1,%d5 <== NOT EXECUTED 5bb66: 7201 moveq #1,%d1 <== NOT EXECUTED 5bb68: 3185 4800 movew %d5,%a0@(00000000,%d4:l) <== NOT EXECUTED 5bb6c: 1541 0076 moveb %d1,%a2@(118) <== NOT EXECUTED
break;
}
return RC_OK;
}
5bb70: 4cee 0c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a3 <== NOT EXECUTED 5bb76: 4e5e unlk %fp <== NOT EXECUTED 5bb78: 4e75 rts <== NOT EXECUTED
}
}
else
{
fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK;
*((uint8_t *)(block0->buffer + ofs)) &= 0x00;
5bb7a: 4202 clrb %d2
(uint8_t )((fat16_clv & 0xFF00)>>8);
}
}
else
{
fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK;
5bb7c: 0285 0000 0fff andil #4095,%d5
*((uint8_t *)(block0->buffer + ofs)) &= 0x00;
5bb82: 1182 4800 moveb %d2,%a0@(00000000,%d4:l) 5bb86: 7c01 moveq #1,%d6
*((uint8_t *)(block0->buffer + ofs)) =
(*((uint8_t *)(block0->buffer + ofs))) |
5bb88: 206e fffc moveal %fp@(-4),%a0 5bb8c: 2068 001e moveal %a0@(30),%a0 5bb90: d1c4 addal %d4,%a0
else
{
fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK;
*((uint8_t *)(block0->buffer + ofs)) &= 0x00;
*((uint8_t *)(block0->buffer + ofs)) =
5bb92: 1210 moveb %a0@,%d1 5bb94: 8285 orl %d5,%d1 5bb96: 1081 moveb %d1,%a0@
(*((uint8_t *)(block0->buffer + ofs))) |
(uint8_t )(fat16_clv & 0x00FF);
fat_buf_mark_modified(fs_info);
if ( ofs == (fs_info->vol.bps - 1) )
5bb98: 4281 clrl %d1 5bb9a: 3212 movew %a2@,%d1 5bb9c: 1546 0076 moveb %d6,%a2@(118) 5bba0: 5381 subql #1,%d1 5bba2: b881 cmpl %d1,%d4 5bba4: 6700 0082 beqw 5bc28 <fat_set_fat_cluster+0x24e>
fat_buf_mark_modified(fs_info);
}
else
{
*((uint8_t *)(block0->buffer + ofs + 1)) =
(*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0;
5bba8: 206e fffc moveal %fp@(-4),%a0 5bbac: 5284 addql #1,%d4
fat_buf_mark_modified(fs_info);
}
else
{
*((uint8_t *)(block0->buffer + ofs + 1)) =
5bbae: 7cf0 moveq #-16,%d6
(*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0;
5bbb0: 2068 001e moveal %a0@(30),%a0 5bbb4: d1c4 addal %d4,%a0
fat_buf_mark_modified(fs_info);
}
else
{
*((uint8_t *)(block0->buffer + ofs + 1)) =
5bbb6: 1210 moveb %a0@,%d1
(*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0;
*((uint8_t *)(block0->buffer + ofs+1)) =
(*((uint8_t *)(block0->buffer + ofs+1))) |
(uint8_t )((fat16_clv & 0xFF00)>>8);
5bbb8: 0285 0000 ffff andil #65535,%d5
fat_buf_mark_modified(fs_info);
}
else
{
*((uint8_t *)(block0->buffer + ofs + 1)) =
5bbbe: c286 andl %d6,%d1
(*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0;
*((uint8_t *)(block0->buffer + ofs+1)) =
(*((uint8_t *)(block0->buffer + ofs+1))) |
(uint8_t )((fat16_clv & 0xFF00)>>8);
5bbc0: e08d lsrl #8,%d5
fat_buf_mark_modified(fs_info);
}
else
{
*((uint8_t *)(block0->buffer + ofs + 1)) =
5bbc2: 1081 moveb %d1,%a0@
(*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0;
*((uint8_t *)(block0->buffer + ofs+1)) =
(*((uint8_t *)(block0->buffer + ofs+1))) |
5bbc4: 206e fffc moveal %fp@(-4),%a0 5bbc8: 2068 001e moveal %a0@(30),%a0 5bbcc: d1c4 addal %d4,%a0
else
{
*((uint8_t *)(block0->buffer + ofs + 1)) =
(*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0;
*((uint8_t *)(block0->buffer + ofs+1)) =
5bbce: 1210 moveb %a0@,%d1 5bbd0: 8a81 orl %d1,%d5 5bbd2: 1085 moveb %d5,%a0@
break;
}
return RC_OK;
}
5bbd4: 4cee 0c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a3 5bbda: 4e5e unlk %fp 5bbdc: 4e75 rts
fat_buf_mark_modified(fs_info);
if ( ofs == (fs_info->vol.bps - 1) )
{
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
5bbde: 486e fffc pea %fp@(-4) <== NOT EXECUTED 5bbe2: 2043 moveal %d3,%a0 <== NOT EXECUTED 5bbe4: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 5bbe8: 4868 0001 pea %a0@(1) <== NOT EXECUTED 5bbec: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5bbee: 4e93 jsr %a3@ <== NOT EXECUTED
&block0);
if (rc != RC_OK)
5bbf0: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5bbf4: 4a80 tstl %d0 <== NOT EXECUTED 5bbf6: 6600 fe88 bnew 5ba80 <fat_set_fat_cluster+0xa6> <== NOT EXECUTED
return rc;
*((uint8_t *)(block0->buffer)) &= 0x00;
5bbfa: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 5bbfe: 2068 001e moveal %a0@(30),%a0 <== NOT EXECUTED 5bc02: 4210 clrb %a0@ <== NOT EXECUTED
*((uint8_t *)(block0->buffer)) =
(*((uint8_t *)(block0->buffer))) |
(uint8_t )((fat16_clv & 0xFF00)>>8);
5bc04: 0285 0000 ffff andil #65535,%d5 <== NOT EXECUTED
*((uint8_t *)(block0->buffer)) =
(*((uint8_t *)(block0->buffer))) & 0xF0;
*((uint8_t *)(block0->buffer)) =
(*((uint8_t *)(block0->buffer))) |
5bc0a: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED
*((uint8_t *)(block0->buffer)) &= 0x00;
*((uint8_t *)(block0->buffer)) =
(*((uint8_t *)(block0->buffer))) |
(uint8_t )((fat16_clv & 0xFF00)>>8);
5bc0e: e08d lsrl #8,%d5 <== NOT EXECUTED
*((uint8_t *)(block0->buffer)) =
(*((uint8_t *)(block0->buffer))) & 0xF0;
*((uint8_t *)(block0->buffer)) =
(*((uint8_t *)(block0->buffer))) |
5bc10: 2068 001e moveal %a0@(30),%a0 <== NOT EXECUTED
return rc;
*((uint8_t *)(block0->buffer)) =
(*((uint8_t *)(block0->buffer))) & 0xF0;
*((uint8_t *)(block0->buffer)) =
5bc14: 1210 moveb %a0@,%d1 <== NOT EXECUTED 5bc16: 8a81 orl %d1,%d5 <== NOT EXECUTED 5bc18: 1085 moveb %d5,%a0@ <== NOT EXECUTED 5bc1a: 1546 0076 moveb %d6,%a2@(118) <== NOT EXECUTED
break;
}
return RC_OK;
}
5bc1e: 4cee 0c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a3 <== NOT EXECUTED 5bc24: 4e5e unlk %fp <== NOT EXECUTED 5bc26: 4e75 rts <== NOT EXECUTED
fat_buf_mark_modified(fs_info);
if ( ofs == (fs_info->vol.bps - 1) )
{
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
5bc28: 486e fffc pea %fp@(-4) <== NOT EXECUTED 5bc2c: 2043 moveal %d3,%a0 <== NOT EXECUTED 5bc2e: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 5bc32: 4868 0001 pea %a0@(1) <== NOT EXECUTED 5bc36: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5bc38: 4e93 jsr %a3@ <== NOT EXECUTED
&block0);
if (rc != RC_OK)
5bc3a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5bc3e: 4a80 tstl %d0 <== NOT EXECUTED 5bc40: 6600 fe3e bnew 5ba80 <fat_set_fat_cluster+0xa6> <== NOT EXECUTED
return rc;
*((uint8_t *)(block0->buffer)) =
(*((uint8_t *)(block0->buffer))) & 0xF0;
5bc44: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
&block0);
if (rc != RC_OK)
return rc;
*((uint8_t *)(block0->buffer)) =
5bc48: 74f0 moveq #-16,%d2 <== NOT EXECUTED
(*((uint8_t *)(block0->buffer))) & 0xF0;
5bc4a: 2068 001e moveal %a0@(30),%a0 <== NOT EXECUTED
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
&block0);
if (rc != RC_OK)
return rc;
*((uint8_t *)(block0->buffer)) =
5bc4e: 1210 moveb %a0@,%d1 <== NOT EXECUTED
(*((uint8_t *)(block0->buffer))) & 0xF0;
*((uint8_t *)(block0->buffer)) =
(*((uint8_t *)(block0->buffer))) |
(uint8_t )((fat16_clv & 0xFF00)>>8);
5bc50: 0285 0000 ffff andil #65535,%d5 <== NOT EXECUTED
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
&block0);
if (rc != RC_OK)
return rc;
*((uint8_t *)(block0->buffer)) =
5bc56: c282 andl %d2,%d1 <== NOT EXECUTED
(*((uint8_t *)(block0->buffer))) & 0xF0;
*((uint8_t *)(block0->buffer)) =
(*((uint8_t *)(block0->buffer))) |
(uint8_t )((fat16_clv & 0xFF00)>>8);
5bc58: e08d lsrl #8,%d5 <== NOT EXECUTED
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
&block0);
if (rc != RC_OK)
return rc;
*((uint8_t *)(block0->buffer)) =
5bc5a: 1081 moveb %d1,%a0@ <== NOT EXECUTED
(*((uint8_t *)(block0->buffer))) & 0xF0;
*((uint8_t *)(block0->buffer)) =
(*((uint8_t *)(block0->buffer))) |
5bc5c: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 5bc60: 2068 001e moveal %a0@(30),%a0 <== NOT EXECUTED
return rc;
*((uint8_t *)(block0->buffer)) =
(*((uint8_t *)(block0->buffer))) & 0xF0;
*((uint8_t *)(block0->buffer)) =
5bc64: 1210 moveb %a0@,%d1 <== NOT EXECUTED 5bc66: 8a81 orl %d1,%d5 <== NOT EXECUTED 5bc68: 1085 moveb %d5,%a0@ <== NOT EXECUTED 5bc6a: 1546 0076 moveb %d6,%a2@(118) <== NOT EXECUTED 5bc6e: 60ae bras 5bc1e <fat_set_fat_cluster+0x244> <== NOT EXECUTED
0005414e <fat_shutdown_drive>:
{
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
int i = 0;
if (fs_info->vol.type & FAT_FAT32)
5414e: 4280 clrl %d0 <== NOT EXECUTED
* RC_OK on success, or -1 if error occured
* and errno set appropriately
*/
int
fat_shutdown_drive(rtems_filesystem_mount_table_entry_t *mt_entry)
{
54150: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED 54154: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 54158: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ <== NOT EXECUTED
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
5415c: 2868 0034 moveal %a0@(52),%a4 <== NOT EXECUTED
int i = 0;
if (fs_info->vol.type & FAT_FAT32)
54160: 102c 000a moveb %a4@(10),%d0 <== NOT EXECUTED 54164: 44c0 movew %d0,%ccr <== NOT EXECUTED 54166: 6700 00de beqw 54246 <fat_shutdown_drive+0xf8> <== NOT EXECUTED
* and errno set appropriately
*/
int
fat_shutdown_drive(rtems_filesystem_mount_table_entry_t *mt_entry)
{
int rc = RC_OK;
5416a: 4284 clrl %d4 <== NOT EXECUTED
fs_info->vol.next_cl);
if ( rc != RC_OK )
rc = -1;
}
fat_buf_release(fs_info);
5416c: 2f0c movel %a4,%sp@- <== NOT EXECUTED 5416e: 4eb9 0005 3a90 jsr 53a90 <fat_buf_release> <== NOT EXECUTED
if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL)
54174: 2f2c 004e movel %a4@(78),%sp@- <== NOT EXECUTED 54178: 2f2c 004a movel %a4@(74),%sp@- <== NOT EXECUTED 5417c: 4eb9 0005 233c jsr 5233c <rtems_bdbuf_syncdev> <== NOT EXECUTED 54182: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 54186: 4a80 tstl %d0 <== NOT EXECUTED 54188: 6600 00f8 bnew 54282 <fat_shutdown_drive+0x134> <== NOT EXECUTED
rc = -1;
5418c: 4283 clrl %d3 <== NOT EXECUTED 5418e: 45f9 0004 680c lea 4680c <free>,%a2 <== NOT EXECUTED 54194: 47f9 0004 bba0 lea 4bba0 <_Chain_Get>,%a3 <== NOT EXECUTED
for (i = 0; i < FAT_HASH_SIZE; i++)
{
rtems_chain_node *node = NULL;
rtems_chain_control *the_chain = fs_info->vhash + i;
5419a: 242c 005a movel %a4@(90),%d2 <== NOT EXECUTED 5419e: d483 addl %d3,%d2 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
541a0: 2f02 movel %d2,%sp@- <== NOT EXECUTED 541a2: 4e93 jsr %a3@ <== NOT EXECUTED
while ( (node = rtems_chain_get(the_chain)) != NULL )
541a4: 588f addql #4,%sp <== NOT EXECUTED 541a6: 4a80 tstl %d0 <== NOT EXECUTED 541a8: 6710 beqs 541ba <fat_shutdown_drive+0x6c> <== NOT EXECUTED
free(node);
541aa: 2f00 movel %d0,%sp@- <== NOT EXECUTED 541ac: 4e92 jsr %a2@ <== NOT EXECUTED 541ae: 588f addql #4,%sp <== NOT EXECUTED 541b0: 2f02 movel %d2,%sp@- <== NOT EXECUTED 541b2: 4e93 jsr %a3@ <== NOT EXECUTED
for (i = 0; i < FAT_HASH_SIZE; i++)
{
rtems_chain_node *node = NULL;
rtems_chain_control *the_chain = fs_info->vhash + i;
while ( (node = rtems_chain_get(the_chain)) != NULL )
541b4: 588f addql #4,%sp <== NOT EXECUTED 541b6: 4a80 tstl %d0 <== NOT EXECUTED 541b8: 66f0 bnes 541aa <fat_shutdown_drive+0x5c> <== NOT EXECUTED 541ba: 0683 0000 000c addil #12,%d3 <== NOT EXECUTED
fat_buf_release(fs_info);
if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL)
rc = -1;
for (i = 0; i < FAT_HASH_SIZE; i++)
541c0: 103c 0018 moveb #24,%d0 <== NOT EXECUTED 541c4: b083 cmpl %d3,%d0 <== NOT EXECUTED 541c6: 66d2 bnes 5419a <fat_shutdown_drive+0x4c> <== NOT EXECUTED 541c8: 4283 clrl %d3 <== NOT EXECUTED
}
for (i = 0; i < FAT_HASH_SIZE; i++)
{
rtems_chain_node *node = NULL;
rtems_chain_control *the_chain = fs_info->rhash + i;
541ca: 242c 005e movel %a4@(94),%d2 <== NOT EXECUTED 541ce: d483 addl %d3,%d2 <== NOT EXECUTED 541d0: 2f02 movel %d2,%sp@- <== NOT EXECUTED 541d2: 4e93 jsr %a3@ <== NOT EXECUTED
while ( (node = rtems_chain_get(the_chain)) != NULL )
541d4: 588f addql #4,%sp <== NOT EXECUTED 541d6: 4a80 tstl %d0 <== NOT EXECUTED 541d8: 6710 beqs 541ea <fat_shutdown_drive+0x9c> <== NOT EXECUTED
free(node);
541da: 2f00 movel %d0,%sp@- <== NOT EXECUTED 541dc: 4e92 jsr %a2@ <== NOT EXECUTED 541de: 588f addql #4,%sp <== NOT EXECUTED 541e0: 2f02 movel %d2,%sp@- <== NOT EXECUTED 541e2: 4e93 jsr %a3@ <== NOT EXECUTED
for (i = 0; i < FAT_HASH_SIZE; i++)
{
rtems_chain_node *node = NULL;
rtems_chain_control *the_chain = fs_info->rhash + i;
while ( (node = rtems_chain_get(the_chain)) != NULL )
541e4: 588f addql #4,%sp <== NOT EXECUTED 541e6: 4a80 tstl %d0 <== NOT EXECUTED 541e8: 66f0 bnes 541da <fat_shutdown_drive+0x8c> <== NOT EXECUTED 541ea: 0683 0000 000c addil #12,%d3 <== NOT EXECUTED
while ( (node = rtems_chain_get(the_chain)) != NULL )
free(node);
}
for (i = 0; i < FAT_HASH_SIZE; i++)
541f0: 103c 0018 moveb #24,%d0 <== NOT EXECUTED 541f4: b083 cmpl %d3,%d0 <== NOT EXECUTED 541f6: 66d2 bnes 541ca <fat_shutdown_drive+0x7c> <== NOT EXECUTED
while ( (node = rtems_chain_get(the_chain)) != NULL )
free(node);
}
free(fs_info->vhash);
541f8: 2f2c 005a movel %a4@(90),%sp@- <== NOT EXECUTED 541fc: 4e92 jsr %a2@ <== NOT EXECUTED
free(fs_info->rhash);
541fe: 2f2c 005e movel %a4@(94),%sp@- <== NOT EXECUTED 54202: 4e92 jsr %a2@ <== NOT EXECUTED
free(fs_info->uino);
54204: 2f2c 0062 movel %a4@(98),%sp@- <== NOT EXECUTED 54208: 4e92 jsr %a2@ <== NOT EXECUTED
free(fs_info->sec_buf);
5420a: 2f2c 007c movel %a4@(124),%sp@- <== NOT EXECUTED 5420e: 4e92 jsr %a2@ <== NOT EXECUTED
rtems_disk_release(fs_info->vol.dd);
54210: 2f2c 0052 movel %a4@(82),%sp@- <== NOT EXECUTED 54214: 4eb9 0004 561a jsr 4561a <rtems_disk_release> <== NOT EXECUTED
if (rc)
5421a: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 5421e: 4a84 tstl %d4 <== NOT EXECUTED 54220: 660c bnes 5422e <fat_shutdown_drive+0xe0> <== NOT EXECUTED
errno = EIO;
return rc;
}
54222: 2004 movel %d4,%d0 <== NOT EXECUTED 54224: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 <== NOT EXECUTED 5422a: 4e5e unlk %fp <== NOT EXECUTED 5422c: 4e75 rts <== NOT EXECUTED
free(fs_info->uino);
free(fs_info->sec_buf);
rtems_disk_release(fs_info->vol.dd);
if (rc)
errno = EIO;
5422e: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 54234: 7605 moveq #5,%d3 <== NOT EXECUTED 54236: 2040 moveal %d0,%a0 <== NOT EXECUTED
return rc;
}
54238: 2004 movel %d4,%d0 <== NOT EXECUTED
free(fs_info->uino);
free(fs_info->sec_buf);
rtems_disk_release(fs_info->vol.dd);
if (rc)
errno = EIO;
5423a: 2083 movel %d3,%a0@ <== NOT EXECUTED
return rc;
}
5423c: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 <== NOT EXECUTED 54242: 4e5e unlk %fp <== NOT EXECUTED 54244: 4e75 rts <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
int i = 0;
if (fs_info->vol.type & FAT_FAT32)
{
rc = fat_fat32_update_fsinfo_sector(mt_entry, fs_info->vol.free_cls,
54246: 2f2c 003e movel %a4@(62),%sp@- <== NOT EXECUTED 5424a: 2f2c 003a movel %a4@(58),%sp@- <== NOT EXECUTED 5424e: 2f08 movel %a0,%sp@- <== NOT EXECUTED 54250: 4eb9 0005 4084 jsr 54084 <fat_fat32_update_fsinfo_sector> <== NOT EXECUTED
fs_info->vol.next_cl);
if ( rc != RC_OK )
54256: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
int i = 0;
if (fs_info->vol.type & FAT_FAT32)
{
rc = fat_fat32_update_fsinfo_sector(mt_entry, fs_info->vol.free_cls,
5425a: 2800 movel %d0,%d4 <== NOT EXECUTED
fs_info->vol.next_cl);
if ( rc != RC_OK )
5425c: 6700 ff0e beqw 5416c <fat_shutdown_drive+0x1e> <== NOT EXECUTED
rc = -1;
}
fat_buf_release(fs_info);
54260: 2f0c movel %a4,%sp@- <== NOT EXECUTED
if (fs_info->vol.type & FAT_FAT32)
{
rc = fat_fat32_update_fsinfo_sector(mt_entry, fs_info->vol.free_cls,
fs_info->vol.next_cl);
if ( rc != RC_OK )
rc = -1;
54262: 78ff moveq #-1,%d4 <== NOT EXECUTED
}
fat_buf_release(fs_info);
54264: 4eb9 0005 3a90 jsr 53a90 <fat_buf_release> <== NOT EXECUTED
if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL)
5426a: 2f2c 004e movel %a4@(78),%sp@- <== NOT EXECUTED 5426e: 2f2c 004a movel %a4@(74),%sp@- <== NOT EXECUTED 54272: 4eb9 0005 233c jsr 5233c <rtems_bdbuf_syncdev> <== NOT EXECUTED 54278: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5427c: 4a80 tstl %d0 <== NOT EXECUTED 5427e: 6700 ff0c beqw 5418c <fat_shutdown_drive+0x3e> <== NOT EXECUTED
rc = -1;
54282: 78ff moveq #-1,%d4 <== NOT EXECUTED 54284: 4283 clrl %d3 <== NOT EXECUTED 54286: 45f9 0004 680c lea 4680c <free>,%a2 <== NOT EXECUTED 5428c: 47f9 0004 bba0 lea 4bba0 <_Chain_Get>,%a3 <== NOT EXECUTED 54292: 6000 ff06 braw 5419a <fat_shutdown_drive+0x4c> <== NOT EXECUTED
0005e418 <fcntl>:
int fcntl(
int fd,
int cmd,
...
)
{
5e418: 4e56 fff0 linkw %fp,#-16 5e41c: 202e 0008 movel %fp@(8),%d0 5e420: 48d7 041c moveml %d2-%d4/%a2,%sp@ 5e424: 242e 000c movel %fp@(12),%d2
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
5e428: 2239 0006 1602 movel 61602 <rtems_libio_number_iops>,%d1 5e42e: b280 cmpl %d0,%d1 5e430: 6300 018c blsw 5e5be <fcntl+0x1a6>
iop = rtems_libio_iop( fd );
5e434: 2600 movel %d0,%d3 5e436: ed88 lsll #6,%d0 5e438: e78b lsll #3,%d3 5e43a: 2079 0006 2df4 moveal 62df4 <rtems_libio_iops>,%a0 5e440: 9083 subl %d3,%d0 5e442: 45f0 0800 lea %a0@(00000000,%d0:l),%a2
rtems_libio_check_is_open(iop);
5e446: 282a 0014 movel %a2@(20),%d4 5e44a: 0804 0008 btst #8,%d4 5e44e: 6700 016e beqw 5e5be <fcntl+0x1a6>
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
5e452: 7009 moveq #9,%d0 5e454: b082 cmpl %d2,%d0
5e456: 641a bccs 5e472 <fcntl+0x5a>
errno = ENOTSUP;
ret = -1;
break;
default:
errno = EINVAL;
5e458: 4eb9 0005 01a4 jsr 501a4 <__errno> 5e45e: 2040 moveal %d0,%a0 5e460: 7016 moveq #22,%d0 5e462: 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);
5e464: 76ff moveq #-1,%d3
va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; }
5e466: 2003 movel %d3,%d0 5e468: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 5e46e: 4e5e unlk %fp 5e470: 4e75 rts
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
5e472: 303b 2a08 movew %pc@(5e47c <fcntl+0x64>,%d2:l:2),%d0 5e476: 48c0 extl %d0 5e478: 4efb 0802 jmp %pc@(5e47c <fcntl+0x64>,%d0:l)
5e47c: 00ae 00a2 0090 oril #10616976,%d6 <== NOT EXECUTED 5e482: 0076 .short 0x0076 <== NOT EXECUTED 5e484: 0026 .short 0x0026 <== NOT EXECUTED 5e486: 0014 .short 0x0014 <== NOT EXECUTED 5e488: 0014 .short 0x0014 <== NOT EXECUTED 5e48a: 0014 .short 0x0014 <== NOT EXECUTED 5e48c: 0014 .short 0x0014 <== NOT EXECUTED 5e48e: 0014 .short 0x0014 <== NOT EXECUTED
errno = ENOTSUP;
ret = -1;
break;
case F_GETOWN: /* for sockets. */
errno = ENOTSUP;
5e490: 4eb9 0005 01a4 jsr 501a4 <__errno>
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
5e496: 76ff moveq #-1,%d3
errno = ENOTSUP;
ret = -1;
break;
case F_GETOWN: /* for sockets. */
errno = ENOTSUP;
5e498: 2040 moveal %d0,%a0 5e49a: 20bc 0000 0086 movel #134,%a0@ 5e4a0: 60c4 bras 5e466 <fcntl+0x4e>
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 ) );
5e4a2: 2f2e 0010 movel %fp@(16),%sp@-
rtems_libio_t *iop; rtems_libio_t *diop; int fd2; int flags; int mask; int ret = 0;
5e4a6: 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 ) );
5e4a8: 4eb9 0004 3f24 jsr 43f24 <rtems_libio_fcntl_flags>
/*
* XXX If we are turning on append, should we seek to the end?
*/
iop->flags = (iop->flags & ~mask) | (flags & mask);
5e4ae: 222a 0014 movel %a2@(20),%d1 5e4b2: 588f addql #4,%sp 5e4b4: 0280 0000 0201 andil #513,%d0 5e4ba: 0281 ffff fdfe andil #-514,%d1 5e4c0: 8081 orl %d1,%d0 5e4c2: 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 );
5e4c6: 206a 0020 moveal %a2@(32),%a0 5e4ca: 2f0a movel %a2,%sp@- 5e4cc: 2f02 movel %d2,%sp@- 5e4ce: 2068 0030 moveal %a0@(48),%a0 5e4d2: 4e90 jsr %a0@
if (err) {
5e4d4: 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 );
5e4d6: 2400 movel %d0,%d2
if (err) {
5e4d8: 678c beqs 5e466 <fcntl+0x4e> <== ALWAYS TAKEN
errno = err;
5e4da: 4eb9 0005 01a4 jsr 501a4 <__errno> <== NOT EXECUTED
ret = -1;
5e4e0: 76ff moveq #-1,%d3 <== NOT EXECUTED
*/
if (ret >= 0) {
int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop );
if (err) {
errno = err;
5e4e2: 2040 moveal %d0,%a0 <== NOT EXECUTED
va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; }
5e4e4: 2003 movel %d3,%d0 <== NOT EXECUTED
*/
if (ret >= 0) {
int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop );
if (err) {
errno = err;
5e4e6: 2082 movel %d2,%a0@ <== NOT EXECUTED
va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; }
5e4e8: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 5e4ee: 4e5e unlk %fp <== NOT EXECUTED 5e4f0: 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 );
5e4f2: 2f04 movel %d4,%sp@- 5e4f4: 4eb9 0004 3f64 jsr 43f64 <rtems_libio_to_fcntl_flags> 5e4fa: 588f addql #4,%sp 5e4fc: 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) {
5e4fe: 6cc6 bges 5e4c6 <fcntl+0xae> <== ALWAYS TAKEN
va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; }
5e500: 2003 movel %d3,%d0 <== NOT EXECUTED 5e502: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 5e508: 4e5e unlk %fp <== NOT EXECUTED 5e50a: 4e75 rts <== NOT EXECUTED
rtems_libio_t *iop; rtems_libio_t *diop; int fd2; int flags; int mask; int ret = 0;
5e50c: 4283 clrl %d3
* 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 ) )
5e50e: 4aae 0010 tstl %fp@(16)
5e512: 6768 beqs 5e57c <fcntl+0x164>
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
5e514: 08c4 000b bset #11,%d4 5e518: 2544 0014 movel %d4,%a2@(20) 5e51c: 60a8 bras 5e4c6 <fcntl+0xae>
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);
5e51e: 0804 000b btst #11,%d4 5e522: 56c3 sne %d3 5e524: 49c3 extbl %d3 5e526: 4483 negl %d3 5e528: 609c bras 5e4c6 <fcntl+0xae>
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
5e52a: 202e 0010 movel %fp@(16),%d0
if ( fd2 )
5e52e: 6700 00a8 beqw 5e5d8 <fcntl+0x1c0>
diop = rtems_libio_iop( fd2 );
5e532: b081 cmpl %d1,%d0
5e534: 6452 bccs 5e588 <fcntl+0x170> <== NEVER TAKEN
5e536: 2200 movel %d0,%d1 5e538: ed88 lsll #6,%d0 5e53a: e789 lsll #3,%d1 5e53c: 9081 subl %d1,%d0 5e53e: 43f0 0800 lea %a0@(00000000,%d0:l),%a1 5e542: 2609 movel %a1,%d3
}
}
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
ret = (int) (diop - rtems_libio_iops);
5e544: 9688 subl %a0,%d3 5e546: e683 asrl #3,%d3 5e548: 203c b6db 6db7 movel #-1227133513,%d0 5e54e: 4c00 3800 mulsl %d0,%d3
break;
}
}
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
5e552: 236a 0018 0018 movel %a2@(24),%a1@(24) 5e558: 236a 001c 001c movel %a2@(28),%a1@(28) 5e55e: 236a 0020 0020 movel %a2@(32),%a1@(32) 5e564: 236a 0024 0024 movel %a2@(36),%a1@(36) 5e56a: 236a 0028 0028 movel %a2@(40),%a1@(40)
ret = -1;
break;
}
}
diop->flags = iop->flags;
5e570: 2344 0014 movel %d4,%a1@(20)
/*
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
5e574: 4a83 tstl %d3 5e576: 6c00 ff4e bgew 5e4c6 <fcntl+0xae>
5e57a: 6084 bras 5e500 <fcntl+0xe8> <== NOT EXECUTED
*/
if ( va_arg( ap, int ) )
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
5e57c: 0884 000b bclr #11,%d4 5e580: 2544 0014 movel %d4,%a2@(20) 5e584: 6000 ff40 braw 5e4c6 <fcntl+0xae>
switch ( cmd ) {
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
if ( fd2 )
diop = rtems_libio_iop( fd2 );
5e588: 93c9 subal %a1,%a1 <== NOT EXECUTED 5e58a: 4283 clrl %d3 <== NOT EXECUTED
}
}
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
ret = (int) (diop - rtems_libio_iops);
5e58c: 9688 subl %a0,%d3 <== NOT EXECUTED 5e58e: e683 asrl #3,%d3 <== NOT EXECUTED 5e590: 203c b6db 6db7 movel #-1227133513,%d0 <== NOT EXECUTED 5e596: 4c00 3800 mulsl %d0,%d3 <== NOT EXECUTED
break;
}
}
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
5e59a: 236a 0018 0018 movel %a2@(24),%a1@(24) <== NOT EXECUTED 5e5a0: 236a 001c 001c movel %a2@(28),%a1@(28) <== NOT EXECUTED 5e5a6: 236a 0020 0020 movel %a2@(32),%a1@(32) <== NOT EXECUTED 5e5ac: 236a 0024 0024 movel %a2@(36),%a1@(36) <== NOT EXECUTED 5e5b2: 236a 0028 0028 movel %a2@(40),%a1@(40) <== NOT EXECUTED
ret = -1;
break;
}
}
diop->flags = iop->flags;
5e5b8: 2344 0014 movel %d4,%a1@(20) <== NOT EXECUTED 5e5bc: 60b6 bras 5e574 <fcntl+0x15c> <== NOT EXECUTED
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
5e5be: 4eb9 0005 01a4 jsr 501a4 <__errno> 5e5c4: 76ff moveq #-1,%d3 5e5c6: 7209 moveq #9,%d1 5e5c8: 2040 moveal %d0,%a0
va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; }
5e5ca: 2003 movel %d3,%d0 5e5cc: 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);
5e5d2: 2081 movel %d1,%a0@
va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; }
5e5d4: 4e5e unlk %fp 5e5d6: 4e75 rts
fd2 = va_arg( ap, int );
if ( fd2 )
diop = rtems_libio_iop( fd2 );
else {
/* allocate a file control block */
diop = rtems_libio_allocate();
5e5d8: 4eb9 0004 3fb2 jsr 43fb2 <rtems_libio_allocate> 5e5de: 2240 moveal %d0,%a1
if ( diop == 0 ) {
5e5e0: 4a80 tstl %d0 5e5e2: 6700 fe80 beqw 5e464 <fcntl+0x4c> 5e5e6: 282a 0014 movel %a2@(20),%d4 5e5ea: 2600 movel %d0,%d3
}
}
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
ret = (int) (diop - rtems_libio_iops);
5e5ec: 203c b6db 6db7 movel #-1227133513,%d0
break;
}
}
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
5e5f2: 236a 0018 0018 movel %a2@(24),%a1@(24) 5e5f8: 236a 001c 001c movel %a2@(28),%a1@(28) 5e5fe: 236a 0020 0020 movel %a2@(32),%a1@(32) 5e604: 236a 0024 0024 movel %a2@(36),%a1@(36)
if ( fd2 )
diop = rtems_libio_iop( fd2 );
else {
/* allocate a file control block */
diop = rtems_libio_allocate();
if ( diop == 0 ) {
5e60a: 2079 0006 2df4 moveal 62df4 <rtems_libio_iops>,%a0
}
}
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
ret = (int) (diop - rtems_libio_iops);
5e610: 9688 subl %a0,%d3 5e612: e683 asrl #3,%d3 5e614: 4c00 3800 mulsl %d0,%d3
break;
}
}
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
5e618: 236a 0028 0028 movel %a2@(40),%a1@(40)
ret = -1;
break;
}
}
diop->flags = iop->flags;
5e61e: 2344 0014 movel %d4,%a1@(20) 5e622: 6000 ff50 braw 5e574 <fcntl+0x15c>
0004d622 <fifo_open>:
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
4d622: 4e56 ffdc linkw %fp,#-36
static int pipe_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
4d626: 2039 0006 2ee8 movel 62ee8 <pipe_semaphore>,%d0
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
4d62c: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 4d630: 286e 0008 moveal %fp@(8),%a4 4d634: 47f9 0004 8d58 lea 48d58 <rtems_semaphore_obtain>,%a3 4d63a: 262e 000c movel %fp@(12),%d3
static int pipe_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
4d63e: 4a80 tstl %d0 4d640: 6700 0086 beqw 4d6c8 <fifo_open+0xa6>
rtems_libio_unlock();
}
if (sc == RTEMS_SUCCESSFUL) {
sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
4d644: 42a7 clrl %sp@- 4d646: 42a7 clrl %sp@- 4d648: 2f00 movel %d0,%sp@- 4d64a: 4e93 jsr %a3@
}
if (sc == RTEMS_SUCCESSFUL) {
4d64c: 4fef 000c lea %sp@(12),%sp 4d650: 4a80 tstl %d0 4d652: 6600 0380 bnew 4d9d4 <fifo_open+0x3b2>
err = pipe_lock();
if (err)
return err;
pipe = *pipep;
4d656: 2414 movel %a4@,%d2
if (pipe == NULL) {
4d658: 6700 011a beqw 4d774 <fifo_open+0x152>
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
4d65c: 42a7 clrl %sp@- 4d65e: 2042 moveal %d2,%a0 4d660: 42a7 clrl %sp@- 4d662: 2f28 0028 movel %a0@(40),%sp@- 4d666: 4e93 jsr %a3@ 4d668: 4fef 000c lea %sp@(12),%sp 4d66c: 4a80 tstl %d0 4d66e: 6600 008a bnew 4d6fa <fifo_open+0xd8> 4d672: 95ca subal %a2,%a2
err = -EINTR;
if (*pipep == NULL) {
4d674: 4a94 tstl %a4@ 4d676: 6700 030c beqw 4d984 <fifo_open+0x362>
static void pipe_unlock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_release(pipe_semaphore);
4d67a: 2f39 0006 2ee8 movel 62ee8 <pipe_semaphore>,%sp@- 4d680: 4bf9 0004 8ea8 lea 48ea8 <rtems_semaphore_release>,%a5 4d686: 4e95 jsr %a5@
pipe_control_t *pipe;
unsigned int prevCounter;
int err;
err = pipe_new(pipep);
if (err)
4d688: 588f addql #4,%sp 4d68a: 4a8a tstl %a2
4d68c: 662e bnes 4d6bc <fifo_open+0x9a> <== NEVER TAKEN
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
4d68e: 7006 moveq #6,%d0 4d690: 2043 moveal %d3,%a0 4d692: 7204 moveq #4,%d1 4d694: c0a8 0014 andl %a0@(20),%d0
int err;
err = pipe_new(pipep);
if (err)
return err;
pipe = *pipep;
4d698: 2454 moveal %a4@,%a2
switch (LIBIO_ACCMODE(iop)) {
4d69a: b280 cmpl %d0,%d1 4d69c: 6700 0270 beqw 4d90e <fifo_open+0x2ec> 4d6a0: 123c 0006 moveb #6,%d1 4d6a4: b280 cmpl %d0,%d1 4d6a6: 6700 021c beqw 4d8c4 <fifo_open+0x2a2> 4d6aa: 123c 0002 moveb #2,%d1 4d6ae: b280 cmpl %d0,%d1
4d6b0: 6750 beqs 4d702 <fifo_open+0xe0> <== ALWAYS TAKEN
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
break;
}
PIPE_UNLOCK(pipe);
4d6b2: 2f2a 0028 movel %a2@(40),%sp@-
return 0;
4d6b6: 95ca subal %a2,%a2
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
break;
}
PIPE_UNLOCK(pipe);
4d6b8: 4e95 jsr %a5@
return 0;
4d6ba: 588f addql #4,%sp
out_error:
pipe_release(pipep, iop);
return err;
}
4d6bc: 200a movel %a2,%d0 4d6be: 4cee 3c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a5 4d6c4: 4e5e unlk %fp 4d6c6: 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 );
4d6c8: 42a7 clrl %sp@- 4d6ca: 42a7 clrl %sp@- 4d6cc: 2f39 0006 35e0 movel 635e0 <rtems_libio_semaphore>,%sp@- 4d6d2: 4e93 jsr %a3@
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
rtems_libio_lock();
if (pipe_semaphore == RTEMS_ID_NONE) {
4d6d4: 4fef 000c lea %sp@(12),%sp 4d6d8: 4ab9 0006 2ee8 tstl 62ee8 <pipe_semaphore> 4d6de: 6700 02c0 beqw 4d9a0 <fifo_open+0x37e>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
4d6e2: 2f39 0006 35e0 movel 635e0 <rtems_libio_semaphore>,%sp@- <== NOT EXECUTED 4d6e8: 4eb9 0004 8ea8 jsr 48ea8 <rtems_semaphore_release> <== NOT EXECUTED 4d6ee: 2039 0006 2ee8 movel 62ee8 <pipe_semaphore>,%d0 <== NOT EXECUTED 4d6f4: 588f addql #4,%sp <== NOT EXECUTED 4d6f6: 6000 ff4c braw 4d644 <fifo_open+0x22> <== NOT EXECUTED
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
err = -EINTR;
4d6fa: 347c fffc moveaw #-4,%a2 <== NOT EXECUTED 4d6fe: 6000 ff74 braw 4d674 <fifo_open+0x52> <== NOT EXECUTED
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
4d702: 202a 0010 movel %a2@(16),%d0 4d706: 2040 moveal %d0,%a0 4d708: 5288 addql #1,%a0
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
4d70a: 52aa 0020 addql #1,%a2@(32)
if (pipe->Readers ++ == 0)
4d70e: 2548 0010 movel %a0,%a2@(16) 4d712: 4a80 tstl %d0 4d714: 6700 02f6 beqw 4da0c <fifo_open+0x3ea>
PIPE_WAKEUPWRITERS(pipe);
if (pipe->Writers == 0) {
4d718: 4aaa 0014 tstl %a2@(20)
4d71c: 6694 bnes 4d6b2 <fifo_open+0x90>
/* Not an error */
if (LIBIO_NODELAY(iop))
4d71e: 7001 moveq #1,%d0 4d720: 2043 moveal %d3,%a0 4d722: c0a8 0014 andl %a0@(20),%d0
4d726: 668a bnes 4d6b2 <fifo_open+0x90>
break;
prevCounter = pipe->writerCounter;
4d728: 282a 0024 movel %a2@(36),%d4 4d72c: 243c 0004 f56c movel #324972,%d2
err = -EINTR;
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
4d732: 2f2a 0028 movel %a2@(40),%sp@- 4d736: 4e95 jsr %a5@
if (! PIPE_READWAIT(pipe))
4d738: 2042 moveal %d2,%a0 4d73a: 42a7 clrl %sp@- 4d73c: 2f2a 002c movel %a2@(44),%sp@- 4d740: 4e90 jsr %a0@ 4d742: 4fef 000c lea %sp@(12),%sp 4d746: 4a80 tstl %d0 4d748: 6600 02d6 bnew 4da20 <fifo_open+0x3fe>
goto out_error;
if (! PIPE_LOCK(pipe))
4d74c: 42a7 clrl %sp@- 4d74e: 42a7 clrl %sp@- 4d750: 2f2a 0028 movel %a2@(40),%sp@- 4d754: 4e93 jsr %a3@ 4d756: 4fef 000c lea %sp@(12),%sp 4d75a: 4a80 tstl %d0 4d75c: 6600 02c2 bnew 4da20 <fifo_open+0x3fe>
goto out_error;
} while (prevCounter == pipe->writerCounter);
4d760: b8aa 0024 cmpl %a2@(36),%d4
4d764: 67cc beqs 4d732 <fifo_open+0x110> <== NEVER TAKEN
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
break;
}
PIPE_UNLOCK(pipe);
4d766: 2f2a 0028 movel %a2@(40),%sp@-
return 0;
4d76a: 95ca subal %a2,%a2
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
break;
}
PIPE_UNLOCK(pipe);
4d76c: 4e95 jsr %a5@
return 0;
4d76e: 588f addql #4,%sp 4d770: 6000 ff4a braw 4d6bc <fifo_open+0x9a>
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
4d774: 4878 0034 pea 34 <OPER2+0x20> 4d778: 45f9 0004 5788 lea 45788 <malloc>,%a2 4d77e: 4e92 jsr %a2@
if (pipe == NULL)
4d780: 588f addql #4,%sp
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
4d782: 2400 movel %d0,%d2
if (pipe == NULL)
4d784: 6700 034e beqw 4dad4 <fifo_open+0x4b2>
return err;
memset(pipe, 0, sizeof(pipe_control_t));
4d788: 2040 moveal %d0,%a0
pipe->Size = PIPE_BUF;
4d78a: 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));
4d790: 4298 clrl %a0@+ 4d792: 5888 addql #4,%a0 4d794: 4298 clrl %a0@+ 4d796: 4298 clrl %a0@+ 4d798: 4298 clrl %a0@+ 4d79a: 4298 clrl %a0@+ 4d79c: 4298 clrl %a0@+ 4d79e: 4298 clrl %a0@+ 4d7a0: 4298 clrl %a0@+ 4d7a2: 4298 clrl %a0@+ 4d7a4: 4298 clrl %a0@+ 4d7a6: 4298 clrl %a0@+ 4d7a8: 4290 clrl %a0@
pipe->Size = PIPE_BUF;
4d7aa: 2042 moveal %d2,%a0 4d7ac: 2140 0004 movel %d0,%a0@(4)
pipe->Buffer = malloc(pipe->Size);
4d7b0: 4878 0200 pea 200 <DBL_MANT_DIG+0x1cb> 4d7b4: 4e92 jsr %a2@
if (! pipe->Buffer)
4d7b6: 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);
4d7b8: 2042 moveal %d2,%a0 4d7ba: 45f9 0004 4f68 lea 44f68 <free>,%a2 4d7c0: 2080 movel %d0,%a0@
if (! pipe->Buffer)
4d7c2: 6700 030a beqw 4dace <fifo_open+0x4ac>
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
4d7c6: 2042 moveal %d2,%a0 4d7c8: 4868 002c pea %a0@(44) 4d7cc: 45f9 0004 f378 lea 4f378 <rtems_barrier_create>,%a2
rtems_build_name ('P', 'I', 'r', c),
4d7d2: 1039 0006 1f98 moveb 61f98 <c.6530>,%d0
if (! pipe->Buffer)
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
4d7d8: 42a7 clrl %sp@-
rtems_build_name ('P', 'I', 'r', c),
4d7da: 49c0 extbl %d0
if (! pipe->Buffer)
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
4d7dc: 42a7 clrl %sp@- 4d7de: 0080 5049 7200 oril #1346990592,%d0 4d7e4: 2f00 movel %d0,%sp@- 4d7e6: 4e92 jsr %a2@ 4d7e8: 4fef 0010 lea %sp@(16),%sp 4d7ec: 4a80 tstl %d0 4d7ee: 6600 02d0 bnew 4dac0 <fifo_open+0x49e>
rtems_build_name ('P', 'I', 'r', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->readBarrier) != RTEMS_SUCCESSFUL)
goto err_rbar;
if (rtems_barrier_create(
4d7f2: 2042 moveal %d2,%a0 4d7f4: 4868 0030 pea %a0@(48)
rtems_build_name ('P', 'I', 'w', c),
4d7f8: 1039 0006 1f98 moveb 61f98 <c.6530>,%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(
4d7fe: 42a7 clrl %sp@-
rtems_build_name ('P', 'I', 'w', c),
4d800: 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(
4d802: 42a7 clrl %sp@- 4d804: 0080 5049 7700 oril #1346991872,%d0 4d80a: 2f00 movel %d0,%sp@- 4d80c: 4e92 jsr %a2@ 4d80e: 4fef 0010 lea %sp@(16),%sp 4d812: 45f9 0004 f450 lea 4f450 <rtems_barrier_delete>,%a2 4d818: 4a80 tstl %d0 4d81a: 6600 029a bnew 4dab6 <fifo_open+0x494>
rtems_build_name ('P', 'I', 'w', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->writeBarrier) != RTEMS_SUCCESSFUL)
goto err_wbar;
if (rtems_semaphore_create(
4d81e: 2042 moveal %d2,%a0 4d820: 4868 0028 pea %a0@(40)
rtems_build_name ('P', 'I', 's', c), 1,
4d824: 1039 0006 1f98 moveb 61f98 <c.6530>,%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(
4d82a: 42a7 clrl %sp@- 4d82c: 4878 0010 pea 10 <INVALID_OPERATION>
rtems_build_name ('P', 'I', 's', c), 1,
4d830: 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(
4d832: 4878 0001 pea 1 <ADD> 4d836: 0080 5049 7300 oril #1346990848,%d0 4d83c: 2f00 movel %d0,%sp@- 4d83e: 4eb9 0004 8ab8 jsr 48ab8 <rtems_semaphore_create> 4d844: 4fef 0014 lea %sp@(20),%sp 4d848: 4a80 tstl %d0 4d84a: 6600 025a bnew 4daa6 <fifo_open+0x484>
/* 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
4d84e: 280e movel %fp,%d4 4d850: 5984 subql #4,%d4
RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Barrier_Control *)
4d852: 2042 moveal %d2,%a0 4d854: 4bf9 0004 a68c lea 4a68c <_Objects_Get>,%a5
|= STATES_INTERRUPTIBLE_BY_SIGNAL;
_Thread_Enable_dispatch();
4d85a: 45f9 0004 b404 lea 4b404 <_Thread_Enable_dispatch>,%a2 4d860: 2f04 movel %d4,%sp@- 4d862: 2f28 002c movel %a0@(44),%sp@- 4d866: 4879 0006 3f68 pea 63f68 <_Barrier_Information> 4d86c: 4e95 jsr %a5@
static void pipe_interruptible(pipe_control_t *pipe)
{
Objects_Locations location;
_Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state
|= STATES_INTERRUPTIBLE_BY_SIGNAL;
4d86e: 223c 1000 0000 movel #268435456,%d1 4d874: 2040 moveal %d0,%a0 4d876: 83a8 004c orl %d1,%a0@(76)
_Thread_Enable_dispatch();
4d87a: 4e92 jsr %a2@ 4d87c: 2042 moveal %d2,%a0 4d87e: 2f04 movel %d4,%sp@- 4d880: 2f28 0030 movel %a0@(48),%sp@- 4d884: 4879 0006 3f68 pea 63f68 <_Barrier_Information> 4d88a: 4e95 jsr %a5@
_Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state
|= STATES_INTERRUPTIBLE_BY_SIGNAL;
4d88c: 223c 1000 0000 movel #268435456,%d1 4d892: 2040 moveal %d0,%a0 4d894: 83a8 004c orl %d1,%a0@(76)
_Thread_Enable_dispatch();
4d898: 4e92 jsr %a2@
#ifdef RTEMS_POSIX_API
pipe_interruptible(pipe);
#endif
*pipep = pipe;
if (c ++ == 'z')
4d89a: 4fef 0018 lea %sp@(24),%sp 4d89e: 1039 0006 1f98 moveb 61f98 <c.6530>,%d0 4d8a4: 49c0 extbl %d0 4d8a6: 2200 movel %d0,%d1 4d8a8: 5281 addql #1,%d1 4d8aa: 13c1 0006 1f98 moveb %d1,61f98 <c.6530> 4d8b0: 727a moveq #122,%d1 4d8b2: b280 cmpl %d0,%d1 4d8b4: 6600 fda6 bnew 4d65c <fifo_open+0x3a>
c = 'a';
4d8b8: 7061 moveq #97,%d0 4d8ba: 13c0 0006 1f98 moveb %d0,61f98 <c.6530> 4d8c0: 6000 fd9a braw 4d65c <fifo_open+0x3a>
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
4d8c4: 202a 0010 movel %a2@(16),%d0 4d8c8: 2200 movel %d0,%d1 4d8ca: 5281 addql #1,%d1
} while (prevCounter == pipe->readerCounter);
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
4d8cc: 52aa 0020 addql #1,%a2@(32)
if (pipe->Readers ++ == 0)
4d8d0: 2541 0010 movel %d1,%a2@(16) 4d8d4: 4a80 tstl %d0 4d8d6: 6700 0120 beqw 4d9f8 <fifo_open+0x3d6>
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
4d8da: 202a 0014 movel %a2@(20),%d0 4d8de: 2040 moveal %d0,%a0 4d8e0: 5288 addql #1,%a0
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
4d8e2: 52aa 0024 addql #1,%a2@(36)
if (pipe->Writers ++ == 0)
4d8e6: 2548 0014 movel %a0,%a2@(20) 4d8ea: 4a80 tstl %d0 4d8ec: 6600 fdc4 bnew 4d6b2 <fifo_open+0x90>
PIPE_WAKEUPREADERS(pipe);
4d8f0: 486e fff8 pea %fp@(-8) 4d8f4: 2f2a 002c movel %a2@(44),%sp@- 4d8f8: 4eb9 0004 f4f4 jsr 4f4f4 <rtems_barrier_release> 4d8fe: 508f addql #8,%sp
break;
}
PIPE_UNLOCK(pipe);
4d900: 2f2a 0028 movel %a2@(40),%sp@-
return 0;
4d904: 95ca subal %a2,%a2
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
break;
}
PIPE_UNLOCK(pipe);
4d906: 4e95 jsr %a5@
return 0;
4d908: 588f addql #4,%sp 4d90a: 6000 fdb0 braw 4d6bc <fifo_open+0x9a>
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
4d90e: 202a 0014 movel %a2@(20),%d0 4d912: 2200 movel %d0,%d1 4d914: 5281 addql #1,%d1
} while (prevCounter == pipe->writerCounter);
}
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
4d916: 52aa 0024 addql #1,%a2@(36)
if (pipe->Writers ++ == 0)
4d91a: 2541 0014 movel %d1,%a2@(20) 4d91e: 4a80 tstl %d0 4d920: 6700 00c2 beqw 4d9e4 <fifo_open+0x3c2>
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
4d924: 4aaa 0010 tstl %a2@(16) 4d928: 6600 fd88 bnew 4d6b2 <fifo_open+0x90> 4d92c: 7001 moveq #1,%d0 4d92e: 2043 moveal %d3,%a0 4d930: c0a8 0014 andl %a0@(20),%d0 4d934: 6600 0156 bnew 4da8c <fifo_open+0x46a>
err = -ENXIO;
goto out_error;
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
4d938: 282a 0020 movel %a2@(32),%d4 4d93c: 243c 0004 f56c movel #324972,%d2
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
4d942: 2f2a 0028 movel %a2@(40),%sp@- 4d946: 4e95 jsr %a5@
if (! PIPE_WRITEWAIT(pipe))
4d948: 2042 moveal %d2,%a0 4d94a: 42a7 clrl %sp@- 4d94c: 2f2a 0030 movel %a2@(48),%sp@- 4d950: 4e90 jsr %a0@ 4d952: 4fef 000c lea %sp@(12),%sp 4d956: 4a80 tstl %d0 4d958: 6600 00c6 bnew 4da20 <fifo_open+0x3fe>
goto out_error;
if (! PIPE_LOCK(pipe))
4d95c: 42a7 clrl %sp@- 4d95e: 42a7 clrl %sp@- 4d960: 2f2a 0028 movel %a2@(40),%sp@- 4d964: 4e93 jsr %a3@ 4d966: 4fef 000c lea %sp@(12),%sp 4d96a: 4a80 tstl %d0 4d96c: 6600 00b2 bnew 4da20 <fifo_open+0x3fe>
goto out_error;
} while (prevCounter == pipe->readerCounter);
4d970: b8aa 0020 cmpl %a2@(32),%d4
4d974: 67cc beqs 4d942 <fifo_open+0x320> <== NEVER TAKEN
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
break;
}
PIPE_UNLOCK(pipe);
4d976: 2f2a 0028 movel %a2@(40),%sp@-
return 0;
4d97a: 95ca subal %a2,%a2
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
break;
}
PIPE_UNLOCK(pipe);
4d97c: 4e95 jsr %a5@
return 0;
4d97e: 588f addql #4,%sp 4d980: 6000 fd3a braw 4d6bc <fifo_open+0x9a>
if (! PIPE_LOCK(pipe))
err = -EINTR;
if (*pipep == NULL) {
if (err)
4d984: 4a8a tstl %a2 4d986: 6600 00b4 bnew 4da3c <fifo_open+0x41a>
static void pipe_unlock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_release(pipe_semaphore);
4d98a: 2f39 0006 2ee8 movel 62ee8 <pipe_semaphore>,%sp@- 4d990: 4bf9 0004 8ea8 lea 48ea8 <rtems_semaphore_release>,%a5
if (*pipep == NULL) {
if (err)
pipe_free(pipe);
else
*pipep = pipe;
4d996: 2882 movel %d2,%a4@
static void pipe_unlock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_release(pipe_semaphore);
4d998: 4e95 jsr %a5@ 4d99a: 588f addql #4,%sp 4d99c: 6000 fcf0 braw 4d68e <fifo_open+0x6c>
if (pipe_semaphore == RTEMS_ID_NONE) {
rtems_libio_lock();
if (pipe_semaphore == RTEMS_ID_NONE) {
sc = rtems_semaphore_create(
4d9a0: 4879 0006 2ee8 pea 62ee8 <pipe_semaphore> 4d9a6: 42a7 clrl %sp@- 4d9a8: 4878 0054 pea 54 <DBL_MANT_DIG+0x1f> 4d9ac: 4878 0001 pea 1 <ADD> 4d9b0: 2f3c 5049 5045 movel #1346981957,%sp@- 4d9b6: 4eb9 0004 8ab8 jsr 48ab8 <rtems_semaphore_create> 4d9bc: 2f39 0006 35e0 movel 635e0 <rtems_libio_semaphore>,%sp@- 4d9c2: 2400 movel %d0,%d2 4d9c4: 4eb9 0004 8ea8 jsr 48ea8 <rtems_semaphore_release>
}
rtems_libio_unlock();
}
if (sc == RTEMS_SUCCESSFUL) {
4d9ca: 4fef 0018 lea %sp@(24),%sp 4d9ce: 4a82 tstl %d2 4d9d0: 6700 0116 beqw 4dae8 <fifo_open+0x4c6>
sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
}
if (sc == RTEMS_SUCCESSFUL) {
4d9d4: 347c fff4 moveaw #-12,%a2
return 0;
out_error:
pipe_release(pipep, iop);
return err;
}
4d9d8: 200a movel %a2,%d0 4d9da: 4cee 3c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a5 4d9e0: 4e5e unlk %fp 4d9e2: 4e75 rts
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
4d9e4: 486e fff8 pea %fp@(-8) 4d9e8: 2f2a 002c movel %a2@(44),%sp@- 4d9ec: 4eb9 0004 f4f4 jsr 4f4f4 <rtems_barrier_release> 4d9f2: 508f addql #8,%sp 4d9f4: 6000 ff2e braw 4d924 <fifo_open+0x302>
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
4d9f8: 486e fff8 pea %fp@(-8) 4d9fc: 2f2a 0030 movel %a2@(48),%sp@- 4da00: 4eb9 0004 f4f4 jsr 4f4f4 <rtems_barrier_release> 4da06: 508f addql #8,%sp 4da08: 6000 fed0 braw 4d8da <fifo_open+0x2b8>
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
4da0c: 486e fff8 pea %fp@(-8) 4da10: 2f2a 0030 movel %a2@(48),%sp@- 4da14: 4eb9 0004 f4f4 jsr 4f4f4 <rtems_barrier_release> 4da1a: 508f addql #8,%sp 4da1c: 6000 fcfa braw 4d718 <fifo_open+0xf6>
PIPE_UNLOCK(pipe);
return 0;
out_error:
pipe_release(pipep, iop);
4da20: 2f03 movel %d3,%sp@- <== NOT EXECUTED
goto out_error;
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
4da22: 347c fffc moveaw #-4,%a2 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
out_error:
pipe_release(pipep, iop);
4da26: 2f0c movel %a4,%sp@- <== NOT EXECUTED 4da28: 4eb9 0004 d53c jsr 4d53c <pipe_release> <== NOT EXECUTED
return err;
4da2e: 508f addql #8,%sp <== NOT EXECUTED
}
4da30: 200a movel %a2,%d0 4da32: 4cee 3c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a5 4da38: 4e5e unlk %fp 4da3a: 4e75 rts
/* Called with pipe_semaphore held. */
static inline void pipe_free(
pipe_control_t *pipe
)
{
rtems_barrier_delete(pipe->readBarrier);
4da3c: 2042 moveal %d2,%a0 <== NOT EXECUTED 4da3e: 49f9 0004 f450 lea 4f450 <rtems_barrier_delete>,%a4 <== NOT EXECUTED
rtems_barrier_delete(pipe->writeBarrier); rtems_semaphore_delete(pipe->Semaphore); free(pipe->Buffer);
4da44: 47f9 0004 4f68 lea 44f68 <free>,%a3 <== NOT EXECUTED
/* Called with pipe_semaphore held. */
static inline void pipe_free(
pipe_control_t *pipe
)
{
rtems_barrier_delete(pipe->readBarrier);
4da4a: 2f28 002c movel %a0@(44),%sp@- <== NOT EXECUTED 4da4e: 4e94 jsr %a4@ <== NOT EXECUTED
rtems_barrier_delete(pipe->writeBarrier);
4da50: 2042 moveal %d2,%a0 <== NOT EXECUTED 4da52: 2f28 0030 movel %a0@(48),%sp@- <== NOT EXECUTED 4da56: 4e94 jsr %a4@ <== NOT EXECUTED
rtems_semaphore_delete(pipe->Semaphore);
4da58: 2042 moveal %d2,%a0 <== NOT EXECUTED 4da5a: 2f28 0028 movel %a0@(40),%sp@- <== NOT EXECUTED 4da5e: 4eb9 0004 8c80 jsr 48c80 <rtems_semaphore_delete> <== NOT EXECUTED
free(pipe->Buffer);
4da64: 2042 moveal %d2,%a0 <== NOT EXECUTED 4da66: 2f10 movel %a0@,%sp@- <== NOT EXECUTED 4da68: 4e93 jsr %a3@ <== NOT EXECUTED
free(pipe);
4da6a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4da6c: 4e93 jsr %a3@ <== NOT EXECUTED 4da6e: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
static void pipe_unlock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_release(pipe_semaphore);
4da72: 2f39 0006 2ee8 movel 62ee8 <pipe_semaphore>,%sp@- <== NOT EXECUTED 4da78: 4eb9 0004 8ea8 jsr 48ea8 <rtems_semaphore_release> <== NOT EXECUTED 4da7e: 588f addql #4,%sp <== NOT EXECUTED
return 0;
out_error:
pipe_release(pipep, iop);
return err;
}
4da80: 200a movel %a2,%d0 4da82: 4cee 3c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a5 4da88: 4e5e unlk %fp 4da8a: 4e75 rts
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
PIPE_UNLOCK(pipe);
4da8c: 2f2a 0028 movel %a2@(40),%sp@-
err = -ENXIO;
4da90: 347c fffa moveaw #-6,%a2
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
PIPE_UNLOCK(pipe);
4da94: 4e95 jsr %a5@
err = -ENXIO;
goto out_error;
4da96: 588f addql #4,%sp
PIPE_UNLOCK(pipe);
return 0;
out_error:
pipe_release(pipep, iop);
4da98: 2f03 movel %d3,%sp@- 4da9a: 2f0c movel %a4,%sp@- 4da9c: 4eb9 0004 d53c jsr 4d53c <pipe_release>
return err;
4daa2: 508f addql #8,%sp 4daa4: 608a bras 4da30 <fifo_open+0x40e>
if (c ++ == 'z')
c = 'a';
return 0;
err_sem:
rtems_barrier_delete(pipe->writeBarrier);
4daa6: 2042 moveal %d2,%a0 4daa8: 45f9 0004 f450 lea 4f450 <rtems_barrier_delete>,%a2 4daae: 2f28 0030 movel %a0@(48),%sp@- 4dab2: 4e92 jsr %a2@ 4dab4: 588f addql #4,%sp
err_wbar: rtems_barrier_delete(pipe->readBarrier);
4dab6: 2042 moveal %d2,%a0 4dab8: 2f28 002c movel %a0@(44),%sp@- 4dabc: 4e92 jsr %a2@ 4dabe: 588f addql #4,%sp
err_rbar: free(pipe->Buffer);
4dac0: 2042 moveal %d2,%a0 4dac2: 45f9 0004 4f68 lea 44f68 <free>,%a2 4dac8: 2f10 movel %a0@,%sp@- 4daca: 4e92 jsr %a2@ 4dacc: 588f addql #4,%sp
err_buf: free(pipe);
4dace: 2f02 movel %d2,%sp@- 4dad0: 4e92 jsr %a2@ 4dad2: 588f addql #4,%sp
static void pipe_unlock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_release(pipe_semaphore);
4dad4: 2f39 0006 2ee8 movel 62ee8 <pipe_semaphore>,%sp@-
}
rtems_libio_unlock();
}
if (sc == RTEMS_SUCCESSFUL) {
4dada: 347c fff4 moveaw #-12,%a2
static void pipe_unlock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_release(pipe_semaphore);
4dade: 4eb9 0004 8ea8 jsr 48ea8 <rtems_semaphore_release> 4dae4: 588f addql #4,%sp 4dae6: 6098 bras 4da80 <fifo_open+0x45e>
}
rtems_libio_unlock();
}
if (sc == RTEMS_SUCCESSFUL) {
4dae8: 2039 0006 2ee8 movel 62ee8 <pipe_semaphore>,%d0 4daee: 6000 fb54 braw 4d644 <fifo_open+0x22>
00043d7c <fpathconf>:
long fpathconf(
int fd,
int name
)
{
43d7c: 4e56 0000 linkw %fp,#0 43d80: 202e 0008 movel %fp@(8),%d0 43d84: 222e 000c movel %fp@(12),%d1 43d88: 2f02 movel %d2,%sp@-
long return_value;
rtems_libio_t *iop;
rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
43d8a: b0b9 0006 11b2 cmpl 611b2 <rtems_libio_number_iops>,%d0 43d90: 6400 00f2 bccw 43e84 <fpathconf+0x108>
iop = rtems_libio_iop(fd);
43d94: 2400 movel %d0,%d2 43d96: ed88 lsll #6,%d0 43d98: e78a lsll #3,%d2 43d9a: 2079 0006 2914 moveal 62914 <rtems_libio_iops>,%a0 43da0: 9082 subl %d2,%d0 43da2: d1c0 addal %d0,%a0
rtems_libio_check_is_open(iop);
43da4: 2028 0014 movel %a0@(20),%d0 43da8: 0280 0000 0100 andil #256,%d0 43dae: 6700 00d4 beqw 43e84 <fpathconf+0x108>
/*
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
43db2: 2068 0028 moveal %a0@(40),%a0
switch ( name ) {
43db6: 700b moveq #11,%d0 43db8: b081 cmpl %d1,%d0
43dba: 6416 bccs 43dd2 <fpathconf+0x56>
break;
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
43dbc: 4eb9 0005 0080 jsr 50080 <__errno>
break;
}
return return_value;
}
43dc2: 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 );
43dc6: 2040 moveal %d0,%a0 43dc8: 7216 moveq #22,%d1 43dca: 70ff moveq #-1,%d0
break;
}
return return_value;
}
43dcc: 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 );
43dce: 2081 movel %d1,%a0@
break;
}
return return_value;
}
43dd0: 4e75 rts
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
switch ( name ) {
43dd2: 303b 1a08 movew %pc@(43ddc <fpathconf+0x60>,%d1:l:2),%d0 43dd6: 48c0 extl %d0 43dd8: 4efb 0802 jmp %pc@(43ddc <fpathconf+0x60>,%d0:l)
43ddc: 0090 0084 0078 oril #8650872,%d0 <== NOT EXECUTED 43de2: 006c .short 0x006c <== NOT EXECUTED 43de4: 0060 .short 0x0060 <== NOT EXECUTED 43de6: 0054 .short 0x0054 <== NOT EXECUTED 43de8: 0048 .short 0x0048 <== NOT EXECUTED 43dea: 003c .short 0x003c <== NOT EXECUTED 43dec: 0030 .short 0x0030 <== NOT EXECUTED 43dee: 0024 .short 0x0024 <== NOT EXECUTED 43df0: 0018 .short 0x0018 <== NOT EXECUTED 43df2: 009c 242e fffc oril #607059964,%d4 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43df8: 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;
43dfa: 2028 005c movel %a0@(92),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43dfe: 4e75 rts 43e00: 242e fffc movel %fp@(-4),%d2 43e04: 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;
43e06: 2028 0050 movel %a0@(80),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43e0a: 4e75 rts 43e0c: 242e fffc movel %fp@(-4),%d2 43e10: 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;
43e12: 2028 0064 movel %a0@(100),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43e16: 4e75 rts 43e18: 242e fffc movel %fp@(-4),%d2 43e1c: 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;
43e1e: 2028 0058 movel %a0@(88),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43e22: 4e75 rts 43e24: 242e fffc movel %fp@(-4),%d2 43e28: 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;
43e2a: 2028 0054 movel %a0@(84),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43e2e: 4e75 rts 43e30: 242e fffc movel %fp@(-4),%d2 43e34: 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;
43e36: 2028 004c movel %a0@(76),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43e3a: 4e75 rts 43e3c: 242e fffc movel %fp@(-4),%d2 43e40: 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;
43e42: 2028 0048 movel %a0@(72),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43e46: 4e75 rts 43e48: 242e fffc movel %fp@(-4),%d2 43e4c: 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;
43e4e: 2028 0044 movel %a0@(68),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43e52: 4e75 rts 43e54: 242e fffc movel %fp@(-4),%d2 43e58: 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;
43e5a: 2028 0040 movel %a0@(64),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43e5e: 4e75 rts 43e60: 242e fffc movel %fp@(-4),%d2 43e64: 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;
43e66: 2028 003c movel %a0@(60),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43e6a: 4e75 rts 43e6c: 242e fffc movel %fp@(-4),%d2 43e70: 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;
43e72: 2028 0038 movel %a0@(56),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43e76: 4e75 rts 43e78: 242e fffc movel %fp@(-4),%d2 43e7c: 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;
43e7e: 2028 0060 movel %a0@(96),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43e82: 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);
43e84: 4eb9 0005 0080 jsr 50080 <__errno> 43e8a: 7409 moveq #9,%d2 43e8c: 2040 moveal %d0,%a0 43e8e: 70ff moveq #-1,%d0 43e90: 2082 movel %d2,%a0@
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43e92: 242e fffc movel %fp@(-4),%d2 43e96: 4e5e unlk %fp
...
000432dc <free>:
#include <stdlib.h>
void free(
void *ptr
)
{
432dc: 4e56 0000 linkw %fp,#0
MSBUMP(free_calls, 1);
432e0: 52b9 0006 0f18 addql #1,60f18 <rtems_malloc_statistics+0xc>
#include <stdlib.h>
void free(
void *ptr
)
{
432e6: 2f02 movel %d2,%sp@- 432e8: 242e 0008 movel %fp@(8),%d2
MSBUMP(free_calls, 1);
if ( !ptr )
432ec: 6732 beqs 43320 <free+0x44>
return;
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
432ee: 7003 moveq #3,%d0 432f0: b0b9 0006 118c cmpl 6118c <_System_state_Current>,%d0
432f6: 6758 beqs 43350 <free+0x74> <== ALWAYS TAKEN
}
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
432f8: 2079 0005 fec4 moveal 5fec4 <rtems_malloc_statistics_helpers>,%a0 432fe: 4a88 tstl %a0
43300: 670a beqs 4330c <free+0x30>
(*rtems_malloc_statistics_helpers->at_free)(ptr);
43302: 2f02 movel %d2,%sp@- 43304: 2068 0008 moveal %a0@(8),%a0 43308: 4e90 jsr %a0@ 4330a: 588f addql #4,%sp
if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) {
4330c: 2f02 movel %d2,%sp@- 4330e: 2f39 0005 f74a movel 5f74a <RTEMS_Malloc_Heap>,%sp@- 43314: 4eb9 0004 878c jsr 4878c <_Protected_heap_Free> 4331a: 508f addql #8,%sp 4331c: 4a00 tstb %d0
4331e: 6708 beqs 43328 <free+0x4c>
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
43320: 242e fffc movel %fp@(-4),%d2 43324: 4e5e unlk %fp 43326: 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
43328: 2079 0005 f74a moveal 5f74a <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",
4332e: 2f28 001c movel %a0@(28),%sp@- 43332: 2f28 0018 movel %a0@(24),%sp@- 43336: 2f02 movel %d2,%sp@- 43338: 4879 0005 e6e4 pea 5e6e4 <rtems_status_assoc+0x168> 4333e: 4eb9 0004 4198 jsr 44198 <printk>
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
43344: 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",
43348: 4fef 0010 lea %sp@(16),%sp
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
4334c: 4e5e unlk %fp 4334e: 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() ) {
43350: 4eb9 0004 349c jsr 4349c <malloc_is_system_state_OK>
return;
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
43356: 4a00 tstb %d0
43358: 669e bnes 432f8 <free+0x1c>
!malloc_is_system_state_OK() ) {
malloc_deferred_free(ptr);
4335a: 2d42 0008 movel %d2,%fp@(8)
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
4335e: 242e fffc movel %fp@(-4),%d2 43362: 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);
43364: 4ef9 0004 351e jmp 4351e <malloc_deferred_free>
...
00047060 <free_user_env>:
* NOTE: this must be called with
* thread dispatching disabled!
*/
static void
free_user_env(void *venv)
{
47060: 4e56 0000 linkw %fp,#0 47064: 2f0b movel %a3,%sp@- 47066: 2f0a movel %a2,%sp@- 47068: 246e 0008 moveal %fp@(8),%a2
rtems_user_env_t *env = (rtems_user_env_t*) venv ;
if (env != &rtems_global_user_env
4706c: b5fc 0006 47e4 cmpal #411620,%a2
47072: 6728 beqs 4709c <free_user_env+0x3c> <== NEVER TAKEN
#ifdef HAVE_USERENV_REFCNT
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
47074: 486a 0004 pea %a2@(4) 47078: 47f9 0004 5d30 lea 45d30 <rtems_filesystem_freenode>,%a3 4707e: 4e93 jsr %a3@
rtems_filesystem_freenode( &env->root_directory);
47080: 486a 0018 pea %a2@(24) 47084: 4e93 jsr %a3@
free(env);
}
}
47086: 266e fffc moveal %fp@(-4),%a3
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
rtems_filesystem_freenode( &env->root_directory);
free(env);
4708a: 508f addql #8,%sp 4708c: 2d4a 0008 movel %a2,%fp@(8)
} }
47090: 246e fff8 moveal %fp@(-8),%a2 47094: 4e5e unlk %fp
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
rtems_filesystem_freenode( &env->root_directory);
free(env);
47096: 4ef9 0004 5d44 jmp 45d44 <free>
} }
4709c: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 470a0: 266e fffc moveal %fp@(-4),%a3 <== NOT EXECUTED 470a4: 4e5e unlk %fp <== NOT EXECUTED
00042cf8 <get_disk_entry>:
}
}
static rtems_disk_device *
get_disk_entry(dev_t dev, bool lookup_only)
{
42cf8: 4e56 0000 linkw %fp,#0 42cfc: 202e 0008 movel %fp@(8),%d0 42d00: 2f02 movel %d2,%sp@- 42d02: 206e 000c moveal %fp@(12),%a0 42d06: 142e 0013 moveb %fp@(19),%d2
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
rtems_filesystem_split_dev_t(dev, major, minor);
if (major < disktab_size && disktab != NULL) {
42d0a: b0b9 0006 44fa cmpl 644fa <disktab_size>,%d0
42d10: 6436 bccs 42d48 <get_disk_entry+0x50> <== NEVER TAKEN
42d12: 2239 0006 44fe movel 644fe <disktab>,%d1
42d18: 672e beqs 42d48 <get_disk_entry+0x50> <== NEVER TAKEN
rtems_disk_device_table *dtab = disktab + major;
42d1a: 2241 moveal %d1,%a1 42d1c: e788 lsll #3,%d0 42d1e: d3c0 addal %d0,%a1
if (minor < dtab->size && dtab->minor != NULL) {
42d20: b1e9 0004 cmpal %a1@(4),%a0
42d24: 6422 bccs 42d48 <get_disk_entry+0x50> <== NEVER TAKEN
42d26: 2251 moveal %a1@,%a1 42d28: 4a89 tstl %a1
42d2a: 671c beqs 42d48 <get_disk_entry+0x50> <== NEVER TAKEN
rtems_disk_device *dd = dtab->minor [minor];
42d2c: 2031 8c00 movel %a1@(00000000,%a0:l:4),%d0
if (dd != NULL && !lookup_only) {
42d30: 6710 beqs 42d42 <get_disk_entry+0x4a>
42d32: 4a02 tstb %d2
42d34: 660c bnes 42d42 <get_disk_entry+0x4a>
if (!dd->deleted) {
42d36: 2040 moveal %d0,%a0 42d38: 4a28 0030 tstb %a0@(48)
42d3c: 660a bnes 42d48 <get_disk_entry+0x50>
++dd->uses;
42d3e: 52a8 0014 addql #1,%a0@(20)
return dd;
}
}
return NULL;
}
42d42: 241f movel %sp@+,%d2 42d44: 4e5e unlk %fp 42d46: 4e75 rts 42d48: 241f movel %sp@+,%d2
if (dd != NULL && !lookup_only) {
if (!dd->deleted) {
++dd->uses;
} else {
dd = NULL;
42d4a: 4280 clrl %d0
return dd;
}
}
return NULL;
}
42d4c: 4e5e unlk %fp <== NOT EXECUTED
0005e714 <getdents>:
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
5e714: 4e56 ffec linkw %fp,#-20 5e718: 202e 0008 movel %fp@(8),%d0 5e71c: 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 );
5e71e: b0b9 0006 1602 cmpl 61602 <rtems_libio_number_iops>,%d0
5e724: 6464 bccs 5e78a <getdents+0x76> <== NEVER TAKEN
5e726: 2200 movel %d0,%d1 5e728: ed88 lsll #6,%d0 5e72a: e789 lsll #3,%d1 5e72c: 2479 0006 2df4 moveal 62df4 <rtems_libio_iops>,%a2 5e732: 9081 subl %d1,%d0 5e734: d5c0 addal %d0,%a2
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
5e736: 2d6a 0018 ffec movel %a2@(24),%fp@(-20) 5e73c: 2d6a 001c fff0 movel %a2@(28),%fp@(-16) 5e742: 2d6a 0020 fff4 movel %a2@(32),%fp@(-12) 5e748: 2d6a 0024 fff8 movel %a2@(36),%fp@(-8)
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
5e74e: 206e fff8 moveal %fp@(-8),%a0
iop = rtems_libio_iop( dd_fd );
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
5e752: 2d6a 0028 fffc movel %a2@(40),%fp@(-4)
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
5e758: 486e ffec pea %fp@(-20) 5e75c: 2068 0010 moveal %a0@(16),%a0 5e760: 4e90 jsr %a0@ 5e762: 588f addql #4,%sp 5e764: 7201 moveq #1,%d1 5e766: b280 cmpl %d0,%d1
5e768: 6624 bnes 5e78e <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 );
5e76a: 206a 0020 moveal %a2@(32),%a0 5e76e: 2f2e 0010 movel %fp@(16),%sp@- 5e772: 2f2e 000c movel %fp@(12),%sp@- 5e776: 2f0a movel %a2,%sp@- 5e778: 2068 0008 moveal %a0@(8),%a0 5e77c: 4e90 jsr %a0@
}
5e77e: 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 );
5e782: 4fef 000c lea %sp@(12),%sp
}
5e786: 4e5e unlk %fp 5e788: 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 );
5e78a: 95ca subal %a2,%a2 <== NOT EXECUTED 5e78c: 60a8 bras 5e736 <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 );
5e78e: 4eb9 0005 01a4 jsr 501a4 <__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 ); }
5e794: 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 );
5e798: 2040 moveal %d0,%a0 5e79a: 7214 moveq #20,%d1 5e79c: 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 ); }
5e79e: 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 );
5e7a0: 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 );
}
00043bf6 <getgr_r>:
struct group *grp,
char *buffer,
size_t bufsize,
struct group **result
)
{
43bf6: 4e56 ffe0 linkw %fp,#-32 43bfa: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 43bfe: 242e 0008 movel %fp@(8),%d2 43c02: 47fa fcce lea %pc@(438d2 <scangr>),%a3
for(;;) {
if (!scangr(fp, grp, buffer, bufsize))
goto error_einval;
if (name) {
match = (strcmp(grp->gr_name, name) == 0);
43c06: 49f9 0005 1638 lea 51638 <strcmp>,%a4
struct group *grp,
char *buffer,
size_t bufsize,
struct group **result
)
{
43c0c: 2c2e 000c movel %fp@(12),%d6 43c10: 246e 0010 moveal %fp@(16),%a2 43c14: 2a2e 0014 movel %fp@(20),%d5 43c18: 282e 0018 movel %fp@(24),%d4
FILE *fp;
int match;
init_etc_passwd_group();
43c1c: 4eb9 0004 3aec jsr 43aec <init_etc_passwd_group>
if ((fp = fopen("/etc/group", "r")) == NULL)
43c22: 4879 0006 0727 pea 60727 <_global_impure_ptr+0xc7> 43c28: 4879 0005 feb0 pea 5feb0 <rtems_status_assoc+0x21a> 43c2e: 4eb9 0005 04e2 jsr 504e2 <fopen> 43c34: 508f addql #8,%sp 43c36: 2600 movel %d0,%d3
43c38: 6778 beqs 43cb2 <getgr_r+0xbc> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
for(;;) {
if (!scangr(fp, grp, buffer, bufsize))
43c3a: 2f04 movel %d4,%sp@- 43c3c: 2f05 movel %d5,%sp@- 43c3e: 2f0a movel %a2,%sp@- 43c40: 2f03 movel %d3,%sp@- 43c42: 4e93 jsr %a3@ 43c44: 4fef 0010 lea %sp@(16),%sp 43c48: 4a80 tstl %d0
43c4a: 6744 beqs 43c90 <getgr_r+0x9a>
goto error_einval;
if (name) {
43c4c: 4a82 tstl %d2
43c4e: 672e beqs 43c7e <getgr_r+0x88>
match = (strcmp(grp->gr_name, name) == 0);
43c50: 2f02 movel %d2,%sp@- 43c52: 2f12 movel %a2@,%sp@- 43c54: 4e94 jsr %a4@ 43c56: 508f addql #8,%sp 43c58: 4a80 tstl %d0 43c5a: 57c0 seq %d0 43c5c: 49c0 extbl %d0 43c5e: 4480 negl %d0
} else {
match = (grp->gr_gid == gid);
}
if (match) {
43c60: 67d8 beqs 43c3a <getgr_r+0x44>
fclose(fp);
43c62: 2f03 movel %d3,%sp@- 43c64: 4eb9 0004 fe20 jsr 4fe20 <fclose>
*result = grp;
43c6a: 206e 001c moveal %fp@(28),%a0
return 0;
43c6e: 588f addql #4,%sp 43c70: 4280 clrl %d0
match = (grp->gr_gid == gid);
}
if (match) {
fclose(fp);
*result = grp;
43c72: 208a movel %a2,%a0@
}
}
error_einval:
fclose(fp);
rtems_set_errno_and_return_minus_one( EINVAL );
}
43c74: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 43c7a: 4e5e unlk %fp 43c7c: 4e75 rts
goto error_einval;
if (name) {
match = (strcmp(grp->gr_name, name) == 0);
} else {
match = (grp->gr_gid == gid);
43c7e: 4280 clrl %d0 43c80: 302a 0008 movew %a2@(8),%d0 43c84: bc80 cmpl %d0,%d6 43c86: 57c0 seq %d0 43c88: 49c0 extbl %d0 43c8a: 4480 negl %d0
}
if (match) {
43c8c: 67ac beqs 43c3a <getgr_r+0x44>
43c8e: 60d2 bras 43c62 <getgr_r+0x6c>
*result = grp;
return 0;
}
}
error_einval:
fclose(fp);
43c90: 2f03 movel %d3,%sp@- 43c92: 4eb9 0004 fe20 jsr 4fe20 <fclose>
rtems_set_errno_and_return_minus_one( EINVAL );
43c98: 4eb9 0004 fcec jsr 4fcec <__errno> 43c9e: 588f addql #4,%sp 43ca0: 7216 moveq #22,%d1 43ca2: 2040 moveal %d0,%a0 43ca4: 70ff moveq #-1,%d0
}
43ca6: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4
return 0;
}
}
error_einval:
fclose(fp);
rtems_set_errno_and_return_minus_one( EINVAL );
43cac: 2081 movel %d1,%a0@
}
43cae: 4e5e unlk %fp 43cb0: 4e75 rts
int match;
init_etc_passwd_group();
if ((fp = fopen("/etc/group", "r")) == NULL)
rtems_set_errno_and_return_minus_one( EINVAL );
43cb2: 4eb9 0004 fcec jsr 4fcec <__errno> 43cb8: 7416 moveq #22,%d2 43cba: 2040 moveal %d0,%a0 43cbc: 70ff moveq #-1,%d0 43cbe: 2082 movel %d2,%a0@
}
}
error_einval:
fclose(fp);
rtems_set_errno_and_return_minus_one( EINVAL );
}
43cc0: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4
43cc6: 4e5e unlk %fp <== NOT EXECUTED
0004e294 <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 )
4e294: 7001 moveq #1,%d0
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
4e296: 4e56 0000 linkw %fp,#0 4e29a: 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 )
4e29e: 2268 0018 moveal %a0@(24),%a1
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
4e2a2: 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 )
4e2a4: b0a9 0048 cmpl %a1@(72),%d0
4e2a8: 6614 bnes 4e2be <imfs_dir_open+0x2a> <== NEVER TAKEN
return -1; /* It wasn't a directory --> return error */
iop->offset = 0;
return 0;
4e2aa: 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;
4e2ac: 4281 clrl %d1 4e2ae: 4282 clrl %d2 4e2b0: 2141 000c movel %d1,%a0@(12) 4e2b4: 2142 0010 movel %d2,%a0@(16)
return 0; }
4e2b8: 241f movel %sp@+,%d2 4e2ba: 4e5e unlk %fp 4e2bc: 4e75 rts
4e2be: 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 */
4e2c0: 70ff moveq #-1,%d0 <== NOT EXECUTED
iop->offset = 0;
return 0;
}
4e2c2: 4e5e unlk %fp <== NOT EXECUTED
0004e4fc <imfs_dir_rmnod>:
int imfs_dir_rmnod(
rtems_filesystem_location_info_t *parent_pathloc, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
4e4fc: 4e56 0000 linkw %fp,#0 4e500: 206e 000c moveal %fp@(12),%a0 4e504: 2f0a movel %a2,%sp@-
IMFS_jnode_t *the_jnode;
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
4e506: 2450 moveal %a0@,%a2
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
4e508: 200a movel %a2,%d0 4e50a: 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 ) )
4e510: b0aa 004c cmpl %a2@(76),%d0
4e514: 6642 bnes 4e558 <imfs_dir_rmnod+0x5c>
static inline bool rtems_filesystem_is_root_location(
const rtems_filesystem_location_info_t *loc
)
{
return loc->mt_entry->mt_fs_root.node_access == loc->node_access;
4e516: 2068 0010 moveal %a0@(16),%a0
/*
* You cannot remove the file system root node.
*/
if ( rtems_filesystem_is_root_location(pathloc) )
4e51a: b5e8 001c cmpal %a0@(28),%a2
4e51e: 6722 beqs 4e542 <imfs_dir_rmnod+0x46>
/*
* You cannot remove a mountpoint.
*/
if ( the_jnode->info.directory.mt_fs != NULL )
4e520: 4aaa 0058 tstl %a2@(88)
4e524: 661c bnes 4e542 <imfs_dir_rmnod+0x46> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EBUSY );
IMFS_create_orphan( the_jnode );
4e526: 2f0a movel %a2,%sp@- 4e528: 4eb9 0004 b434 jsr 4b434 <IMFS_create_orphan>
IMFS_check_node_remove( the_jnode );
4e52e: 2f0a movel %a2,%sp@- 4e530: 4eb9 0004 b478 jsr 4b478 <IMFS_check_node_remove>
return 0;
}
4e536: 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;
4e53a: 508f addql #8,%sp 4e53c: 4280 clrl %d0
}
4e53e: 4e5e unlk %fp 4e540: 4e75 rts
/*
* You cannot remove a mountpoint.
*/
if ( the_jnode->info.directory.mt_fs != NULL )
rtems_set_errno_and_return_minus_one( EBUSY );
4e542: 4eb9 0004 f098 jsr 4f098 <__errno>
IMFS_create_orphan( the_jnode );
IMFS_check_node_remove( the_jnode );
return 0;
}
4e548: 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 );
4e54c: 2040 moveal %d0,%a0 4e54e: 7210 moveq #16,%d1 4e550: 70ff moveq #-1,%d0
IMFS_create_orphan( the_jnode );
IMFS_check_node_remove( the_jnode );
return 0;
}
4e552: 4e5e unlk %fp
/*
* You cannot remove a mountpoint.
*/
if ( the_jnode->info.directory.mt_fs != NULL )
rtems_set_errno_and_return_minus_one( EBUSY );
4e554: 2081 movel %d1,%a0@
IMFS_create_orphan( the_jnode );
IMFS_check_node_remove( the_jnode );
return 0;
}
4e556: 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 );
4e558: 4eb9 0004 f098 jsr 4f098 <__errno>
IMFS_create_orphan( the_jnode );
IMFS_check_node_remove( the_jnode );
return 0;
}
4e55e: 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 );
4e562: 2040 moveal %d0,%a0 4e564: 725a moveq #90,%d1 4e566: 70ff moveq #-1,%d0
IMFS_create_orphan( the_jnode );
IMFS_check_node_remove( the_jnode );
return 0;
}
4e568: 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 );
4e56a: 2081 movel %d1,%a0@
IMFS_create_orphan( the_jnode );
IMFS_check_node_remove( the_jnode );
return 0;
}
...
000452b8 <iproc>:
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
452b8: 4e56 fff4 linkw %fp,#-12 452bc: 222e 0008 movel %fp@(8),%d1 452c0: 48d7 040c moveml %d2-%d3/%a2,%sp@ 452c4: 246e 000c moveal %fp@(12),%a2
if (tty->termios.c_iflag & ISTRIP)
452c8: 202a 0030 movel %a2@(48),%d0
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
452cc: 1401 moveb %d1,%d2
if (tty->termios.c_iflag & ISTRIP)
452ce: 0800 0005 btst #5,%d0
452d2: 6704 beqs 452d8 <iproc+0x20> <== ALWAYS TAKEN
c &= 0x7f;
452d4: 747f moveq #127,%d2 <== NOT EXECUTED 452d6: c481 andl %d1,%d2 <== NOT EXECUTED
if (tty->termios.c_iflag & IUCLC)
452d8: 0800 0009 btst #9,%d0
452dc: 6720 beqs 452fe <iproc+0x46>
c = tolower (c);
452de: 2079 0005 f994 moveal 5f994 <__ctype_ptr__>,%a0 452e4: 7603 moveq #3,%d3 452e6: 0282 0000 00ff andil #255,%d2 452ec: 1230 2801 moveb %a0@(00000001,%d2:l),%d1 452f0: 49c1 extbl %d1 452f2: c283 andl %d3,%d1 452f4: 163c 0001 moveb #1,%d3 452f8: b681 cmpl %d1,%d3 452fa: 6700 00e0 beqw 453dc <iproc+0x124>
if (c == '\r') {
452fe: 4281 clrl %d1 45300: 1202 moveb %d2,%d1 45302: 760d moveq #13,%d3 45304: b681 cmpl %d1,%d3
45306: 6740 beqs 45348 <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)) {
45308: 760a moveq #10,%d3 4530a: b681 cmpl %d1,%d3 4530c: 6700 00c4 beqw 453d2 <iproc+0x11a>
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
45310: 4a02 tstb %d2
45312: 664c bnes 45360 <iproc+0xa8> <== ALWAYS TAKEN
}
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
45314: 2039 0005 f8c8 movel 5f8c8 <rtems_termios_cbufsize>,%d0 4531a: 5380 subql #1,%d0 4531c: 222a 0020 movel %a2@(32),%d1 45320: b081 cmpl %d1,%d0
45322: 6f28 bles 4534c <iproc+0x94> <== NEVER TAKEN
if (tty->termios.c_lflag & ECHO)
45324: 7008 moveq #8,%d0 45326: c0aa 003c andl %a2@(60),%d0 4532a: 6600 00ba bnew 453e6 <iproc+0x12e>
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
4532e: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED
} return 0;
45332: 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;
45334: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 45338: 5281 addql #1,%d1 <== NOT EXECUTED 4533a: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED
} return 0; }
4533e: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 45344: 4e5e unlk %fp 45346: 4e75 rts
if (tty->termios.c_iflag & IUCLC)
c = tolower (c);
if (c == '\r') {
if (tty->termios.c_iflag & IGNCR)
45348: 4a00 tstb %d0
4534a: 6c0c bges 45358 <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;
4534c: 4280 clrl %d0 <== NOT EXECUTED
}
4534e: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 45354: 4e5e unlk %fp <== NOT EXECUTED 45356: 4e75 rts <== NOT EXECUTED
c = tolower (c);
if (c == '\r') {
if (tty->termios.c_iflag & IGNCR)
return 0;
if (tty->termios.c_iflag & ICRNL)
45358: 0800 0008 btst #8,%d0
4535c: 6702 beqs 45360 <iproc+0xa8> <== NEVER TAKEN
c = '\n';
4535e: 740a moveq #10,%d2
} else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
45360: 222a 003c movel %a2@(60),%d1 45364: 0801 0001 btst #1,%d1
45368: 67aa beqs 45314 <iproc+0x5c>
if (c == tty->termios.c_cc[VERASE]) {
4536a: 4283 clrl %d3 4536c: 162a 0043 moveb %a2@(67),%d3 45370: 4280 clrl %d0 45372: 1002 moveb %d2,%d0 45374: b083 cmpl %d3,%d0 45376: 6700 0122 beqw 4549a <iproc+0x1e2>
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
4537a: 4283 clrl %d3 4537c: 162a 0044 moveb %a2@(68),%d3 45380: b083 cmpl %d3,%d0 45382: 6700 00a8 beqw 4542c <iproc+0x174>
erase (tty, 1);
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
45386: 4283 clrl %d3 45388: 162a 0045 moveb %a2@(69),%d3 4538c: b083 cmpl %d3,%d0 4538e: 6700 00fe beqw 4548e <iproc+0x1d6>
return 1;
} else if (c == '\n') {
45392: 760a moveq #10,%d3 45394: b680 cmpl %d0,%d3 45396: 6700 00ac beqw 45444 <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]) ||
4539a: 4283 clrl %d3 4539c: 162a 004c moveb %a2@(76),%d3 453a0: b083 cmpl %d3,%d0
453a2: 670c beqs 453b0 <iproc+0xf8> <== NEVER TAKEN
453a4: 4283 clrl %d3 453a6: 162a 0051 moveb %a2@(81),%d3 453aa: b083 cmpl %d3,%d0 453ac: 6600 ff66 bnew 45314 <iproc+0x5c>
(c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
453b0: 44c1 movew %d1,%ccr <== NOT EXECUTED 453b2: 6b58 bmis 4540c <iproc+0x154> <== NOT EXECUTED
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
453b4: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED
return 1;
453b8: 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;
453ba: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 453be: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 453c2: 5281 addql #1,%d1 <== NOT EXECUTED 453c4: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
}
return 0;
}
453c8: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 453ce: 4e5e unlk %fp <== NOT EXECUTED 453d0: 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)) {
453d2: 0800 0006 btst #6,%d0
453d6: 6788 beqs 45360 <iproc+0xa8> <== ALWAYS TAKEN
c = '\r';
453d8: 740d moveq #13,%d2 <== NOT EXECUTED 453da: 6084 bras 45360 <iproc+0xa8> <== NOT EXECUTED
{
if (tty->termios.c_iflag & ISTRIP)
c &= 0x7f;
if (tty->termios.c_iflag & IUCLC)
c = tolower (c);
453dc: 0682 0000 0020 addil #32,%d2 453e2: 6000 ff1a braw 452fe <iproc+0x46>
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
453e6: 2f0a movel %a2,%sp@- 453e8: 4280 clrl %d0 453ea: 1002 moveb %d2,%d0 453ec: 2f00 movel %d0,%sp@- 453ee: 4eba fc48 jsr %pc@(45038 <echo>) 453f2: 222a 0020 movel %a2@(32),%d1 453f6: 508f addql #8,%sp
tty->cbuf[tty->ccount++] = c;
}
return 0;
453f8: 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;
453fa: 206a 001c moveal %a2@(28),%a0 453fe: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) 45402: 5281 addql #1,%d1 45404: 2541 0020 movel %d1,%a2@(32) 45408: 6000 ff34 braw 4533e <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);
4540c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4540e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 45410: 4eba fc26 jsr %pc@(45038 <echo>) <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
45414: 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);
45418: 508f addql #8,%sp <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
return 1;
4541a: 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;
4541c: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 45420: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 45424: 5281 addql #1,%d1 <== NOT EXECUTED 45426: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED 4542a: 609c bras 453c8 <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);
4542c: 4878 0001 pea 1 <ADD> 45430: 2f0a movel %a2,%sp@- 45432: 4eba fc92 jsr %pc@(450c6 <erase>)
return 0;
45436: 508f addql #8,%sp 45438: 4280 clrl %d0
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
}
return 0;
}
4543a: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 45440: 4e5e unlk %fp 45442: 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))
45444: 7048 moveq #72,%d0 45446: c280 andl %d0,%d1
45448: 6620 bnes 4546a <iproc+0x1b2> <== ALWAYS TAKEN
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
4544a: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED
return 1;
4544e: 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;
45450: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 45454: 740a moveq #10,%d2 <== NOT EXECUTED 45456: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 4545a: 5281 addql #1,%d1 <== NOT EXECUTED 4545c: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
}
return 0;
}
45460: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 45466: 4e5e unlk %fp 45468: 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);
4546a: 2f0a movel %a2,%sp@- 4546c: 4878 000a pea a <LASTO>
tty->cbuf[tty->ccount++] = c;
45470: 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);
45472: 4eba fbc4 jsr %pc@(45038 <echo>)
tty->cbuf[tty->ccount++] = c;
45476: 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);
4547a: 508f addql #8,%sp
tty->cbuf[tty->ccount++] = c;
return 1;
4547c: 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;
4547e: 206a 001c moveal %a2@(28),%a0 45482: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) 45486: 5281 addql #1,%d1 45488: 2541 0020 movel %d1,%a2@(32) 4548c: 60d2 bras 45460 <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;
4548e: 7001 moveq #1,%d0 <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
}
return 0;
}
45490: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 45496: 4e5e unlk %fp <== NOT EXECUTED 45498: 4e75 rts <== NOT EXECUTED
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
if (c == tty->termios.c_cc[VERASE]) {
erase (tty, 0);
4549a: 42a7 clrl %sp@- 4549c: 2f0a movel %a2,%sp@- 4549e: 4eba fc26 jsr %pc@(450c6 <erase>)
return 0;
454a2: 508f addql #8,%sp 454a4: 4280 clrl %d0
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
}
return 0;
}
454a6: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
454ac: 4e5e unlk %fp <== NOT EXECUTED
0005d028 <killinfo>:
int killinfo(
pid_t pid,
int sig,
const union sigval *value
)
{
5d028: 4e56 ffc4 linkw %fp,#-60 5d02c: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 5d030: 262e 000c movel %fp@(12),%d3 5d034: 246e 0010 moveal %fp@(16),%a2
POSIX_signals_Siginfo_node *psiginfo;
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
5d038: 4eb9 0005 cb64 jsr 5cb64 <getpid> 5d03e: b0ae 0008 cmpl %fp@(8),%d0 5d042: 6600 020c bnew 5d250 <killinfo+0x228>
rtems_set_errno_and_return_minus_one( ESRCH );
/*
* Validate the signal passed.
*/
if ( !sig )
5d046: 4a83 tstl %d3 5d048: 6700 021e beqw 5d268 <killinfo+0x240>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
5d04c: 2003 movel %d3,%d0 5d04e: 5380 subql #1,%d0
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
5d050: 721f moveq #31,%d1 5d052: b280 cmpl %d0,%d1 5d054: 6500 0212 bcsw 5d268 <killinfo+0x240>
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 )
5d058: 2c03 movel %d3,%d6 5d05a: 2a03 movel %d3,%d5 5d05c: 7201 moveq #1,%d1 5d05e: e98e lsll #4,%d6 5d060: e58d lsll #2,%d5 5d062: 2806 movel %d6,%d4 5d064: 9885 subl %d5,%d4 5d066: 2044 moveal %d4,%a0 5d068: d1fc 0006 14ec addal #398572,%a0 5d06e: b290 cmpl %a0@,%d1 5d070: 6700 01ca beqw 5d23c <killinfo+0x214>
/* * 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 ) )
5d074: 123c 0008 moveb #8,%d1 5d078: b283 cmpl %d3,%d1 5d07a: 6700 0160 beqw 5d1dc <killinfo+0x1b4> 5d07e: 123c 0004 moveb #4,%d1 5d082: b283 cmpl %d3,%d1 5d084: 6700 0156 beqw 5d1dc <killinfo+0x1b4> 5d088: 123c 000b moveb #11,%d1 5d08c: b283 cmpl %d3,%d1 5d08e: 6700 014c beqw 5d1dc <killinfo+0x1b4>
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
5d092: 7401 moveq #1,%d2 5d094: e1aa lsll %d0,%d2
/* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER;
5d096: 7001 moveq #1,%d0
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
5d098: 2d43 fff4 movel %d3,%fp@(-12)
siginfo->si_code = SI_USER;
5d09c: 2d40 fff8 movel %d0,%fp@(-8)
if ( !value ) {
5d0a0: 4a8a tstl %a2 5d0a2: 6700 01a4 beqw 5d248 <killinfo+0x220>
siginfo->si_value.sival_int = 0;
} else {
siginfo->si_value = *value;
5d0a6: 2d52 fffc movel %a2@,%fp@(-4)
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
5d0aa: 2039 0006 1048 movel 61048 <_Thread_Dispatch_disable_level>,%d0 5d0b0: 5280 addql #1,%d0 5d0b2: 23c0 0006 1048 movel %d0,61048 <_Thread_Dispatch_disable_level>
return _Thread_Dispatch_disable_level;
5d0b8: 2039 0006 1048 movel 61048 <_Thread_Dispatch_disable_level>,%d0
/*
* 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;
5d0be: 2679 0006 14aa moveal 614aa <_Per_CPU_Information+0xc>,%a3
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( _POSIX_signals_Is_interested( api, mask ) ) {
5d0c4: 206b 0102 moveal %a3@(258),%a0 5d0c8: 2028 00d0 movel %a0@(208),%d0 5d0cc: 4680 notl %d0 5d0ce: c082 andl %d2,%d0 5d0d0: 6600 00ca bnew 5d19c <killinfo+0x174>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
5d0d4: 2679 0006 1670 moveal 61670 <_POSIX_signals_Wait_queue>,%a3
/* XXX violation of visibility -- need to define thread queue support */
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = _Chain_First( the_chain );
5d0da: b7fc 0006 1674 cmpal #398964,%a3
5d0e0: 6724 beqs 5d106 <killinfo+0xde>
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
5d0e2: 2002 movel %d2,%d0 5d0e4: c0ab 0030 andl %a3@(48),%d0
for ( the_node = _Chain_First( the_chain );
!_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 ];
5d0e8: 206b 0102 moveal %a3@(258),%a0
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
5d0ec: 6600 00ae bnew 5d19c <killinfo+0x174>
/*
* Is this thread is blocked waiting for another signal but has
* not blocked this one?
*/
if (~api->signals_blocked & mask)
5d0f0: 2028 00d0 movel %a0@(208),%d0 5d0f4: 4680 notl %d0 5d0f6: c082 andl %d2,%d0 5d0f8: 6600 00a2 bnew 5d19c <killinfo+0x174>
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = _Chain_First( the_chain );
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
5d0fc: 2653 moveal %a3@,%a3
/* XXX violation of visibility -- need to define thread queue support */
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = _Chain_First( the_chain );
5d0fe: b7fc 0006 1674 cmpal #398964,%a3
5d104: 66dc bnes 5d0e2 <killinfo+0xba> <== NEVER TAKEN
* NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1;
5d106: 4287 clrl %d7 5d108: 1e39 0005 f6aa moveb 5f6aa <rtems_maximum_priority>,%d7 5d10e: 49f9 0006 100c lea 6100c <_Objects_Information_table+0x8>,%a4 5d114: 5287 addql #1,%d7
* * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL;
5d116: 97cb subal %a3,%a3
interested_priority = PRIORITY_MAXIMUM + 1;
5d118: 2447 moveal %d7,%a2
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 ] )
5d11a: 205c moveal %a4@+,%a0 5d11c: 4a88 tstl %a0
5d11e: 6770 beqs 5d190 <killinfo+0x168> <== NEVER TAKEN
continue;
the_info = _Objects_Information_table[ the_api ][ 1 ];
5d120: 2068 0004 moveal %a0@(4),%a0
*/
if ( !the_info )
continue;
#endif
maximum = the_info->maximum;
5d124: 4287 clrl %d7 5d126: 3e28 000e movew %a0@(14),%d7
object_table = the_info->local_table;
5d12a: 2268 0018 moveal %a0@(24),%a1
for ( index = 1 ; index <= maximum ; index++ ) {
5d12e: 4a87 tstl %d7
5d130: 675e beqs 5d190 <killinfo+0x168>
*/
#define _POSIX_signals_Is_interested( _api, _mask ) \
( ~(_api)->signals_blocked & (_mask) )
int killinfo(
5d132: 5889 addql #4,%a1
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
5d134: 7001 moveq #1,%d0 5d136: 2d43 ffec movel %d3,%fp@(-20)
the_thread = (Thread_Control *) object_table[ index ];
5d13a: 2059 moveal %a1@+,%a0
if ( !the_thread )
5d13c: 4a88 tstl %a0
5d13e: 6746 beqs 5d186 <killinfo+0x15e>
/*
* If this thread is of lower priority than the interested thread,
* go on to the next thread.
*/
if ( the_thread->current_priority > interested_priority )
5d140: 2228 0014 movel %a0@(20),%d1 5d144: b5c1 cmpal %d1,%a2
5d146: 653e bcss 5d186 <killinfo+0x15e> <== NEVER TAKEN
#if defined(RTEMS_DEBUG)
if ( !api )
continue;
#endif
if ( !_POSIX_signals_Is_interested( api, mask ) )
5d148: 2a68 0102 moveal %a0@(258),%a5 5d14c: 262d 00d0 movel %a5@(208),%d3 5d150: 4683 notl %d3 5d152: c682 andl %d2,%d3
5d154: 6730 beqs 5d186 <killinfo+0x15e>
*
* 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 ) {
5d156: b5c1 cmpal %d1,%a2
5d158: 6228 bhis 5d182 <killinfo+0x15a>
* and blocking interruptibutable by signal.
*
* If the interested thread is ready, don't think about changing.
*/
if ( interested && !_States_Is_ready( interested->current_state ) ) {
5d15a: 4a8b tstl %a3
5d15c: 6728 beqs 5d186 <killinfo+0x15e> <== NEVER TAKEN
5d15e: 2a6b 0010 moveal %a3@(16),%a5 5d162: 4a8d tstl %a5
5d164: 6720 beqs 5d186 <killinfo+0x15e> <== NEVER TAKEN
/* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
5d166: 2628 0010 movel %a0@(16),%d3 5d16a: 2d43 fff0 movel %d3,%fp@(-16)
5d16e: 6712 beqs 5d182 <killinfo+0x15a> <== NEVER TAKEN
continue;
}
DEBUG_STEP("6");
/* prefer blocked/interruptible over blocked/not interruptible */
if ( !_States_Is_interruptible_by_signal(interested->current_state) ) {
5d170: 260d movel %a5,%d3 5d172: 0803 001c btst #28,%d3
5d176: 660e bnes 5d186 <killinfo+0x15e>
DEBUG_STEP("7");
if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) {
5d178: 262e fff0 movel %fp@(-16),%d3 5d17c: 0803 001c btst #28,%d3
5d180: 6704 beqs 5d186 <killinfo+0x15e>
*/
if ( interested && !_States_Is_ready( interested->current_state ) ) {
/* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
5d182: 2441 moveal %d1,%a2 5d184: 2648 moveal %a0,%a3
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
5d186: 5280 addql #1,%d0 5d188: b087 cmpl %d7,%d0
5d18a: 63ae blss 5d13a <killinfo+0x112>
5d18c: 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++) {
5d190: b9fc 0006 1014 cmpal #397332,%a4
5d196: 6682 bnes 5d11a <killinfo+0xf2>
}
}
}
}
if ( interested ) {
5d198: 4a8b tstl %a3
5d19a: 6716 beqs 5d1b2 <killinfo+0x18a>
/*
* 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 ) ) {
5d19c: 486e fff4 pea %fp@(-12) 5d1a0: 2f03 movel %d3,%sp@- 5d1a2: 2f0b movel %a3,%sp@- 5d1a4: 4eb9 0005 d2c0 jsr 5d2c0 <_POSIX_signals_Unblock_thread> 5d1aa: 4fef 000c lea %sp@(12),%sp 5d1ae: 4a00 tstb %d0
5d1b0: 6618 bnes 5d1ca <killinfo+0x1a2>
/*
* 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 );
5d1b2: 2f02 movel %d2,%sp@- 5d1b4: 4eb9 0005 d2a0 jsr 5d2a0 <_POSIX_signals_Set_process_signals>
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
5d1ba: 588f addql #4,%sp 5d1bc: 41f9 0006 14e4 lea 614e4 <_POSIX_signals_Vectors>,%a0 5d1c2: 7002 moveq #2,%d0 5d1c4: b0b0 4800 cmpl %a0@(00000000,%d4:l),%d0
5d1c8: 672e beqs 5d1f8 <killinfo+0x1d0>
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
5d1ca: 4eb9 0004 9218 jsr 49218 <_Thread_Enable_dispatch>
return 0;
5d1d0: 4280 clrl %d0
}
5d1d2: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 5d1d8: 4e5e unlk %fp 5d1da: 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 );
5d1dc: 4eb9 0005 d4cc jsr 5d4cc <pthread_self> 5d1e2: 2f03 movel %d3,%sp@- 5d1e4: 2f00 movel %d0,%sp@- 5d1e6: 4eb9 0005 d3fc jsr 5d3fc <pthread_kill> 5d1ec: 508f addql #8,%sp
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
return 0;
}
5d1ee: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 5d1f4: 4e5e unlk %fp 5d1f6: 4e75 rts
*/
_POSIX_signals_Set_process_signals( mask );
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
5d1f8: 4879 0006 1664 pea 61664 <_POSIX_signals_Inactive_siginfo> 5d1fe: 4eb9 0004 75d4 jsr 475d4 <_Chain_Get>
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
5d204: 588f addql #4,%sp
*/
_POSIX_signals_Set_process_signals( mask );
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
5d206: 2040 moveal %d0,%a0
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
5d208: 4a80 tstl %d0
5d20a: 6774 beqs 5d280 <killinfo+0x258>
rtems_set_errno_and_return_minus_one( EAGAIN );
}
psiginfo->Info = *siginfo;
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
5d20c: 9c85 subl %d5,%d6 5d20e: 0686 0006 16dc addil #399068,%d6
if ( !psiginfo ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EAGAIN );
}
psiginfo->Info = *siginfo;
5d214: 216e fff4 0008 movel %fp@(-12),%a0@(8) 5d21a: 216e fff8 000c movel %fp@(-8),%a0@(12) 5d220: 216e fffc 0010 movel %fp@(-4),%a0@(16)
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
5d226: 2f00 movel %d0,%sp@- 5d228: 2f06 movel %d6,%sp@- 5d22a: 4eb9 0004 7574 jsr 47574 <_Chain_Append> 5d230: 508f addql #8,%sp
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
5d232: 4eb9 0004 9218 jsr 49218 <_Thread_Enable_dispatch>
return 0;
5d238: 4280 clrl %d0 5d23a: 6096 bras 5d1d2 <killinfo+0x1aa>
/*
* If the signal is being ignored, then we are out of here.
*/
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN )
return 0;
5d23c: 4280 clrl %d0
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
return 0;
}
5d23e: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 5d244: 4e5e unlk %fp 5d246: 4e75 rts
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
if ( !value ) {
siginfo->si_value.sival_int = 0;
5d248: 42ae fffc clrl %fp@(-4) 5d24c: 6000 fe5c braw 5d0aa <killinfo+0x82>
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
rtems_set_errno_and_return_minus_one( ESRCH );
5d250: 4eb9 0004 f098 jsr 4f098 <__errno> 5d256: 7603 moveq #3,%d3 5d258: 2040 moveal %d0,%a0 5d25a: 70ff moveq #-1,%d0 5d25c: 2083 movel %d3,%a0@
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
return 0;
}
5d25e: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 5d264: 4e5e unlk %fp 5d266: 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 );
5d268: 4eb9 0004 f098 jsr 4f098 <__errno> 5d26e: 7416 moveq #22,%d2 5d270: 2040 moveal %d0,%a0 5d272: 70ff moveq #-1,%d0 5d274: 2082 movel %d2,%a0@
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
return 0;
}
5d276: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 5d27c: 4e5e unlk %fp 5d27e: 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();
5d280: 4eb9 0004 9218 jsr 49218 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EAGAIN );
5d286: 4eb9 0004 f098 jsr 4f098 <__errno> 5d28c: 720b moveq #11,%d1 5d28e: 2040 moveal %d0,%a0 5d290: 70ff moveq #-1,%d0
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
return 0;
}
5d292: 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 );
5d298: 2081 movel %d1,%a0@
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
return 0;
}
5d29a: 4e5e unlk %fp
...
00043b84 <libc_wrapup>:
/*
* In case RTEMS is already down, don't do this. It could be
* dangerous.
*/
if (!_System_state_Is_up(_System_state_Get()))
43b84: 7003 moveq #3,%d0
extern void _wrapup_reent(struct _reent *);
extern void _reclaim_reent(struct _reent *);
void libc_wrapup(void)
{
43b86: 4e56 0000 linkw %fp,#0 43b8a: 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()))
43b8c: b0b9 0006 118c cmpl 6118c <_System_state_Current>,%d0
43b92: 6708 beqs 43b9c <libc_wrapup+0x18> <== ALWAYS TAKEN
*/
fclose (stdin);
fclose (stdout);
fclose (stderr);
}
43b94: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 43b98: 4e5e unlk %fp <== NOT EXECUTED 43b9a: 4e75 rts <== NOT EXECUTED
/*
* This was already done if the user called exit() directly .
_wrapup_reent(0);
*/
if (_REENT != _global_impure_ptr) {
43b9c: 2479 0005 ee96 moveal 5ee96 <_global_impure_ptr>,%a2 43ba2: b5f9 0005 f998 cmpal 5f998 <_impure_ptr>,%a2
43ba8: 6710 beqs 43bba <libc_wrapup+0x36>
_wrapup_reent(_global_impure_ptr);
43baa: 2f0a movel %a2,%sp@- 43bac: 4eb9 0004 fb02 jsr 4fb02 <_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;
43bb2: 588f addql #4,%sp 43bb4: 23ca 0005 f998 movel %a2,5f998 <_impure_ptr>
*
* Should this be changed to do *all* file streams?
* _fwalk (_REENT, fclose);
*/
fclose (stdin);
43bba: 2f2a 0004 movel %a2@(4),%sp@- 43bbe: 45f9 0004 f1cc lea 4f1cc <fclose>,%a2 43bc4: 4e92 jsr %a2@
fclose (stdout);
43bc6: 2079 0005 f998 moveal 5f998 <_impure_ptr>,%a0 43bcc: 2f28 0008 movel %a0@(8),%sp@- 43bd0: 4e92 jsr %a2@
fclose (stderr);
43bd2: 2079 0005 f998 moveal 5f998 <_impure_ptr>,%a0 43bd8: 2f28 000c movel %a0@(12),%sp@- 43bdc: 4e92 jsr %a2@
}
43bde: 246e fffc moveal %fp@(-4),%a2
* _fwalk (_REENT, fclose);
*/
fclose (stdin);
fclose (stdout);
fclose (stderr);
43be2: 4fef 000c lea %sp@(12),%sp
}
43be6: 4e5e unlk %fp <== NOT EXECUTED
000445e8 <link>:
int link(
const char *existing,
const char *new
)
{
445e8: 4e56 ffc0 linkw %fp,#-64 445ec: 48d7 041c moveml %d2-%d4/%a2,%sp@ 445f0: 242e 0008 movel %fp@(8),%d2
/*
* Get the node we are linking to.
*/
result = rtems_filesystem_evaluate_path( existing, strlen( existing ),
445f4: 260e movel %fp,%d3 445f6: 0683 ffff ffd0 addil #-48,%d3 445fc: 2f02 movel %d2,%sp@-
int link(
const char *existing,
const char *new
)
{
445fe: 282e 000c movel %fp@(12),%d4
/*
* Get the node we are linking to.
*/
result = rtems_filesystem_evaluate_path( existing, strlen( existing ),
44602: 4eb9 0005 1840 jsr 51840 <strlen> 44608: 7201 moveq #1,%d1 4460a: 2e81 movel %d1,%sp@ 4460c: 2f03 movel %d3,%sp@- 4460e: 42a7 clrl %sp@- 44610: 2f00 movel %d0,%sp@- 44612: 2f02 movel %d2,%sp@- 44614: 4eb9 0004 3f24 jsr 43f24 <rtems_filesystem_evaluate_path>
0, &existing_loc, true );
if ( result != 0 )
4461a: 4fef 0014 lea %sp@(20),%sp 4461e: 4a80 tstl %d0 44620: 6600 009c bnew 446be <link+0xd6>
/*
* Get the parent of the node we are creating.
*/
rtems_filesystem_get_start_loc( new, &i, &parent_loc );
44624: 240e movel %fp,%d2 44626: 0682 ffff ffe4 addil #-28,%d2 4462c: 2f02 movel %d2,%sp@- 4462e: 486e fff8 pea %fp@(-8) 44632: 2f04 movel %d4,%sp@- 44634: 4eb9 0004 56c0 jsr 456c0 <rtems_filesystem_get_start_loc>
result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start );
4463a: 486e fffc pea %fp@(-4) 4463e: d8ae fff8 addl %fp@(-8),%d4 44642: 2f02 movel %d2,%sp@- 44644: 206e fff0 moveal %fp@(-16),%a0 44648: 2f04 movel %d4,%sp@- 4464a: 2068 0004 moveal %a0@(4),%a0 4464e: 4e90 jsr %a0@
if ( result != 0 ) {
44650: 4fef 0018 lea %sp@(24),%sp 44654: 4a80 tstl %d0
44656: 6674 bnes 446cc <link+0xe4> <== NEVER TAKEN
/*
* Check to see if the caller is trying to link across file system
* boundaries.
*/
if ( parent_loc.mt_entry != existing_loc.mt_entry ) {
44658: 202e ffe0 movel %fp@(-32),%d0 4465c: b0ae fff4 cmpl %fp@(-12),%d0
44660: 6632 bnes 44694 <link+0xac>
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 );
44662: 2f2e fffc movel %fp@(-4),%sp@-
rtems_filesystem_freenode( &existing_loc );
44666: 45f9 0004 4134 lea 44134 <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 );
4466c: 206e fff0 moveal %fp@(-16),%a0 44670: 2f02 movel %d2,%sp@- 44672: 2f03 movel %d3,%sp@- 44674: 2068 0008 moveal %a0@(8),%a0 44678: 4e90 jsr %a0@ 4467a: 2800 movel %d0,%d4
rtems_filesystem_freenode( &existing_loc );
4467c: 2f03 movel %d3,%sp@- 4467e: 4e92 jsr %a2@
rtems_filesystem_freenode( &parent_loc );
44680: 2f02 movel %d2,%sp@- 44682: 4e92 jsr %a2@
return result;
44684: 4fef 0014 lea %sp@(20),%sp
}
44688: 2004 movel %d4,%d0 4468a: 4cee 041c ffc0 moveml %fp@(-64),%d2-%d4/%a2 44690: 4e5e unlk %fp 44692: 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 );
44694: 2f03 movel %d3,%sp@- 44696: 45f9 0004 4134 lea 44134 <rtems_filesystem_freenode>,%a2
rtems_filesystem_freenode( &parent_loc );
rtems_set_errno_and_return_minus_one( EXDEV );
4469c: 78ff moveq #-1,%d4
* 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 );
4469e: 4e92 jsr %a2@
rtems_filesystem_freenode( &parent_loc );
446a0: 2f02 movel %d2,%sp@- 446a2: 4e92 jsr %a2@
rtems_set_errno_and_return_minus_one( EXDEV );
446a4: 4eb9 0005 04d4 jsr 504d4 <__errno> 446aa: 508f addql #8,%sp 446ac: 2040 moveal %d0,%a0 446ae: 7012 moveq #18,%d0 446b0: 2080 movel %d0,%a0@
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
return result;
}
446b2: 2004 movel %d4,%d0 446b4: 4cee 041c ffc0 moveml %fp@(-64),%d2-%d4/%a2 446ba: 4e5e unlk %fp 446bc: 4e75 rts
*/
result = rtems_filesystem_evaluate_path( existing, strlen( existing ),
0, &existing_loc, true );
if ( result != 0 )
return -1;
446be: 78ff moveq #-1,%d4
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
return result;
}
446c0: 2004 movel %d4,%d0 446c2: 4cee 041c ffc0 moveml %fp@(-64),%d2-%d4/%a2 446c8: 4e5e unlk %fp 446ca: 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 );
446cc: 2f03 movel %d3,%sp@-
return -1;
446ce: 78ff moveq #-1,%d4
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 );
446d0: 4eb9 0004 4134 jsr 44134 <rtems_filesystem_freenode>
return -1;
446d6: 588f addql #4,%sp
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
return result;
}
446d8: 2004 movel %d4,%d0 446da: 4cee 041c ffc0 moveml %fp@(-64),%d2-%d4/%a2
446e0: 4e5e unlk %fp <== NOT EXECUTED
0004360c <malloc>:
#include "malloc_p.h"
void *malloc(
size_t size
)
{
4360c: 4e56 0000 linkw %fp,#0
void *return_this;
MSBUMP(malloc_calls, 1);
43610: 52b9 0006 0f10 addql #1,60f10 <rtems_malloc_statistics+0x4>
#include "malloc_p.h"
void *malloc(
size_t size
)
{
43616: 2f03 movel %d3,%sp@- 43618: 262e 0008 movel %fp@(8),%d3 4361c: 2f02 movel %d2,%sp@-
MSBUMP(malloc_calls, 1);
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
4361e: 4eb9 0004 34dc jsr 434dc <malloc_deferred_frees_process>
/*
* Validate the parameters
*/
if ( !size )
43624: 4a83 tstl %d3
43626: 6762 beqs 4368a <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()) &&
43628: 7003 moveq #3,%d0 4362a: b0b9 0006 118c cmpl 6118c <_System_state_Current>,%d0
43630: 674e beqs 43680 <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 );
43632: 42a7 clrl %sp@- 43634: 42a7 clrl %sp@- 43636: 2f03 movel %d3,%sp@- 43638: 2f39 0005 f74a movel 5f74a <RTEMS_Malloc_Heap>,%sp@- 4363e: 4eb9 0004 874c jsr 4874c <_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 ) {
43644: 4fef 0010 lea %sp@(16),%sp 43648: 2400 movel %d0,%d2
4364a: 674e beqs 4369a <malloc+0x8e>
}
/*
* If the user wants us to dirty the allocated memory, then do it.
*/
if ( rtems_malloc_dirty_helper )
4364c: 2079 0005 febc moveal 5febc <rtems_malloc_dirty_helper>,%a0 43652: 4a88 tstl %a0
43654: 6708 beqs 4365e <malloc+0x52>
(*rtems_malloc_dirty_helper)( return_this, size );
43656: 2f03 movel %d3,%sp@- 43658: 2f02 movel %d2,%sp@- 4365a: 4e90 jsr %a0@ 4365c: 508f addql #8,%sp
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
4365e: 2079 0005 fec4 moveal 5fec4 <rtems_malloc_statistics_helpers>,%a0 43664: 4a88 tstl %a0
43666: 670a beqs 43672 <malloc+0x66>
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
43668: 2f02 movel %d2,%sp@- 4366a: 2068 0004 moveal %a0@(4),%a0 4366e: 4e90 jsr %a0@ 43670: 588f addql #4,%sp
return return_this;
}
43672: 2002 movel %d2,%d0 43674: 242e fff8 movel %fp@(-8),%d2 43678: 262e fffc movel %fp@(-4),%d3 4367c: 4e5e unlk %fp 4367e: 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() )
43680: 4eb9 0004 349c jsr 4349c <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()) &&
43686: 4a00 tstb %d0
43688: 66a8 bnes 43632 <malloc+0x26> <== ALWAYS TAKEN
!malloc_is_system_state_OK() )
return NULL;
4368a: 4282 clrl %d2
*/
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
return return_this;
}
4368c: 2002 movel %d2,%d0 4368e: 242e fff8 movel %fp@(-8),%d2 43692: 262e fffc movel %fp@(-4),%d3 43696: 4e5e unlk %fp 43698: 4e75 rts
*/
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
if (rtems_malloc_sbrk_helpers)
4369a: 2079 0005 fec0 moveal 5fec0 <rtems_malloc_sbrk_helpers>,%a0 436a0: 4a88 tstl %a0
436a2: 6712 beqs 436b6 <malloc+0xaa>
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
436a4: 2f03 movel %d3,%sp@- 436a6: 2068 0004 moveal %a0@(4),%a0 436aa: 4e90 jsr %a0@
if ( !return_this ) {
436ac: 588f addql #4,%sp 436ae: 4a80 tstl %d0
436b0: 6704 beqs 436b6 <malloc+0xaa>
436b2: 2400 movel %d0,%d2 436b4: 6096 bras 4364c <malloc+0x40>
errno = ENOMEM;
436b6: 4eb9 0004 f098 jsr 4f098 <__errno>
*/
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
return return_this;
}
436bc: 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;
436c0: 2040 moveal %d0,%a0 436c2: 700c moveq #12,%d0 436c4: 2080 movel %d0,%a0@
*/
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
return return_this;
}
436c6: 2002 movel %d2,%d0 436c8: 242e fff8 movel %fp@(-8),%d2
436cc: 4e5e unlk %fp <== NOT EXECUTED
000434dc <malloc_deferred_frees_process>:
void malloc_deferred_frees_process(void)
{
434dc: 4e56 0000 linkw %fp,#0 434e0: 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);
434e2: 47f9 0004 32dc lea 432dc <free>,%a3
{
rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list);
}
void malloc_deferred_frees_process(void)
{
434e8: 2f0a movel %a2,%sp@-
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
434ea: 4879 0006 0f00 pea 60f00 <RTEMS_Malloc_GC_list> 434f0: 45f9 0004 75d4 lea 475d4 <_Chain_Get>,%a2 434f6: 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)
434f8: 588f addql #4,%sp 434fa: 4a80 tstl %d0
434fc: 6714 beqs 43512 <malloc_deferred_frees_process+0x36>
free(to_be_freed);
434fe: 2f00 movel %d0,%sp@- 43500: 4e93 jsr %a3@ 43502: 588f addql #4,%sp 43504: 4879 0006 0f00 pea 60f00 <RTEMS_Malloc_GC_list> 4350a: 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)
4350c: 588f addql #4,%sp 4350e: 4a80 tstl %d0
43510: 66ec bnes 434fe <malloc_deferred_frees_process+0x22><== NEVER TAKEN
free(to_be_freed);
}
43512: 246e fff8 moveal %fp@(-8),%a2 43516: 266e fffc moveal %fp@(-4),%a3
4351a: 4e5e unlk %fp <== NOT EXECUTED
00043600 <malloc_sbrk_extend_and_allocate>:
}
void *malloc_sbrk_extend_and_allocate(
size_t size
)
{
43600: 4e56 fff4 linkw %fp,#-12
* Round to the "requested sbrk amount" so hopefully we won't have
* to grow again for a while. This effectively does sbrk() calls
* in "page" amounts.
*/
sbrk_amount = RTEMS_Malloc_Sbrk_amount;
43604: 2039 0006 11e0 movel 611e0 <RTEMS_Malloc_Sbrk_amount>,%d0
}
void *malloc_sbrk_extend_and_allocate(
size_t size
)
{
4360a: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4360e: 262e 0008 movel %fp@(8),%d3
* in "page" amounts.
*/
sbrk_amount = RTEMS_Malloc_Sbrk_amount;
if ( sbrk_amount == 0 )
43612: 4a80 tstl %d0
43614: 675c beqs 43672 <malloc_sbrk_extend_and_allocate+0x72><== NEVER TAKEN
return (void *) 0;
the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount);
43616: 2403 movel %d3,%d2 43618: d480 addl %d0,%d2
starting_address = (void *) sbrk(the_size);
4361a: 45f9 0004 0750 lea 40750 <sbrk>,%a2
sbrk_amount = RTEMS_Malloc_Sbrk_amount;
if ( sbrk_amount == 0 )
return (void *) 0;
the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount);
43620: 4c40 2002 remul %d0,%d2,%d2 43624: 4c00 2800 mulsl %d0,%d2
starting_address = (void *) sbrk(the_size);
43628: 2f02 movel %d2,%sp@- 4362a: 4e92 jsr %a2@
if ( starting_address == (void*) -1 )
4362c: 588f addql #4,%sp 4362e: 72ff moveq #-1,%d1 43630: b280 cmpl %d0,%d1
43632: 673e beqs 43672 <malloc_sbrk_extend_and_allocate+0x72>
return (void *) 0;
if ( !_Protected_heap_Extend(
43634: 2f02 movel %d2,%sp@- 43636: 2f00 movel %d0,%sp@- 43638: 2f39 0005 f8aa movel 5f8aa <RTEMS_Malloc_Heap>,%sp@- 4363e: 4eb9 0004 86e4 jsr 486e4 <_Protected_heap_Extend> 43644: 4fef 000c lea %sp@(12),%sp 43648: 4a00 tstb %d0
4364a: 6732 beqs 4367e <malloc_sbrk_extend_and_allocate+0x7e>
4364c: 42a7 clrl %sp@-
sbrk(-the_size);
errno = ENOMEM;
return (void *) 0;
}
MSBUMP(space_available, the_size);
4364e: d5b9 0006 11b4 addl %d2,611b4 <rtems_malloc_statistics> 43654: 42a7 clrl %sp@- 43656: 2f03 movel %d3,%sp@- 43658: 2f39 0005 f8aa movel 5f8aa <RTEMS_Malloc_Heap>,%sp@- 4365e: 4eb9 0004 86a4 jsr 486a4 <_Protected_heap_Allocate_aligned_with_boundary>
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
return return_this;
43664: 4fef 0010 lea %sp@(16),%sp
}
43668: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4366e: 4e5e unlk %fp 43670: 4e75 rts
the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount);
starting_address = (void *) sbrk(the_size);
if ( starting_address == (void*) -1 )
return (void *) 0;
43672: 4280 clrl %d0
MSBUMP(space_available, the_size);
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
return return_this;
}
43674: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4367a: 4e5e unlk %fp 4367c: 4e75 rts
if ( starting_address == (void*) -1 )
return (void *) 0;
if ( !_Protected_heap_Extend(
RTEMS_Malloc_Heap, starting_address, the_size) ) {
sbrk(-the_size);
4367e: 4482 negl %d2 43680: 2f02 movel %d2,%sp@- 43682: 4e92 jsr %a2@
errno = ENOMEM;
43684: 4eb9 0004 f2a8 jsr 4f2a8 <__errno>
return (void *) 0;
4368a: 588f addql #4,%sp
return (void *) 0;
if ( !_Protected_heap_Extend(
RTEMS_Malloc_Heap, starting_address, the_size) ) {
sbrk(-the_size);
errno = ENOMEM;
4368c: 720c moveq #12,%d1 4368e: 2040 moveal %d0,%a0
return (void *) 0;
43690: 4280 clrl %d0
MSBUMP(space_available, the_size);
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
return return_this;
}
43692: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
return (void *) 0;
if ( !_Protected_heap_Extend(
RTEMS_Malloc_Heap, starting_address, the_size) ) {
sbrk(-the_size);
errno = ENOMEM;
43698: 2081 movel %d1,%a0@
MSBUMP(space_available, the_size);
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
return return_this;
}
4369a: 4e5e unlk %fp <== NOT EXECUTED
0004369e <malloc_sbrk_initialize>:
void *malloc_sbrk_initialize(
void *starting_address,
size_t length
)
{
4369e: 4e56 0000 linkw %fp,#0 436a2: 222e 000c movel %fp@(12),%d1 436a6: 202e 0008 movel %fp@(8),%d0
uintptr_t old_address;
uintptr_t uaddress;
RTEMS_Malloc_Sbrk_amount = length;
436aa: 23c1 0006 11e0 movel %d1,611e0 <RTEMS_Malloc_Sbrk_amount>
* If the starting address is 0 then we are to attempt to
* get length worth of memory using sbrk. Make sure we
* align the address that we get back.
*/
if (!starting_address) {
436b0: 4a80 tstl %d0
436b2: 6704 beqs 436b8 <malloc_sbrk_initialize+0x1a>
}
starting_address = (void *)uaddress;
}
return starting_address;
}
436b4: 4e5e unlk %fp 436b6: 4e75 rts
* get length worth of memory using sbrk. Make sure we
* align the address that we get back.
*/
if (!starting_address) {
uaddress = (uintptr_t)sbrk(length);
436b8: 2f01 movel %d1,%sp@- 436ba: 4eb9 0004 0750 jsr 40750 <sbrk>
if (uaddress == (uintptr_t) -1) {
436c0: 588f addql #4,%sp 436c2: 72ff moveq #-1,%d1 436c4: b280 cmpl %d0,%d1
436c6: 6710 beqs 436d8 <malloc_sbrk_initialize+0x3a> <== ALWAYS TAKEN
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
/* DOES NOT RETURN!!! */
}
if (uaddress & (CPU_HEAP_ALIGNMENT-1)) {
436c8: 7203 moveq #3,%d1 <== NOT EXECUTED 436ca: c280 andl %d0,%d1 <== NOT EXECUTED 436cc: 67e6 beqs 436b4 <malloc_sbrk_initialize+0x16> <== NOT EXECUTED
old_address = uaddress;
uaddress = (uaddress + CPU_HEAP_ALIGNMENT) & ~(CPU_HEAP_ALIGNMENT-1);
436ce: 5880 addql #4,%d0 <== NOT EXECUTED 436d0: 72fc moveq #-4,%d1 <== NOT EXECUTED
}
starting_address = (void *)uaddress;
}
return starting_address;
}
436d2: 4e5e unlk %fp <== NOT EXECUTED
/* DOES NOT RETURN!!! */
}
if (uaddress & (CPU_HEAP_ALIGNMENT-1)) {
old_address = uaddress;
uaddress = (uaddress + CPU_HEAP_ALIGNMENT) & ~(CPU_HEAP_ALIGNMENT-1);
436d4: c081 andl %d1,%d0 <== NOT EXECUTED
}
starting_address = (void *)uaddress;
}
return starting_address;
}
436d6: 4e75 rts <== NOT EXECUTED
if (!starting_address) {
uaddress = (uintptr_t)sbrk(length);
if (uaddress == (uintptr_t) -1) {
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
436d8: 4878 001a pea 1a <OPER2+0x6> 436dc: 4eb9 0004 7224 jsr 47224 <rtems_fatal_error_occurred>
...
0004d9b6 <memfile_free_blocks_in_table>:
*/
void memfile_free_blocks_in_table(
block_p **block_table,
int entries
)
{
4d9b6: 4e56 ffec linkw %fp,#-20 4d9ba: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4d9be: 286e 0008 moveal %fp@(8),%a4 4d9c2: 47f9 0004 d99c lea 4d99c <memfile_free_block>,%a3 4d9c8: 262e 000c movel %fp@(12),%d3
IMFS_assert( block_table );
/*
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
4d9cc: 2454 moveal %a4@,%a2
for ( i=0 ; i<entries ; i++ ) {
4d9ce: 6f1a bles 4d9ea <memfile_free_blocks_in_table+0x34><== NEVER TAKEN
4d9d0: 4282 clrl %d2
if ( b[i] ) {
4d9d2: 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++ ) {
4d9d4: 5282 addql #1,%d2
if ( b[i] ) {
4d9d6: 4a80 tstl %d0
4d9d8: 670a beqs 4d9e4 <memfile_free_blocks_in_table+0x2e>
memfile_free_block( b[i] );
4d9da: 2f00 movel %d0,%sp@- 4d9dc: 4e93 jsr %a3@
b[i] = 0;
4d9de: 588f addql #4,%sp 4d9e0: 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++ ) {
4d9e4: b682 cmpl %d2,%d3
4d9e6: 66ea bnes 4d9d2 <memfile_free_blocks_in_table+0x1c>
4d9e8: 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 );
4d9ea: 2f0a movel %a2,%sp@- 4d9ec: 4e93 jsr %a3@
*block_table = 0;
4d9ee: 588f addql #4,%sp 4d9f0: 4294 clrl %a4@
}
4d9f2: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4
4d9f8: 4e5e unlk %fp <== NOT EXECUTED
0004df96 <memfile_lseek>:
{
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
if (the_jnode->type == IMFS_LINEAR_FILE) {
4df96: 7006 moveq #6,%d0
rtems_off64_t memfile_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
4df98: 4e56 ffe8 linkw %fp,#-24 4df9c: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 4dfa0: 246e 0008 moveal %fp@(8),%a2
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
4dfa4: 266a 0018 moveal %a2@(24),%a3
if (the_jnode->type == IMFS_LINEAR_FILE) {
4dfa8: b0ab 0048 cmpl %a3@(72),%d0
4dfac: 673a beqs 4dfe8 <memfile_lseek+0x52>
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 ))
4dfae: 2f2a 0010 movel %a2@(16),%sp@- 4dfb2: 2f2a 000c movel %a2@(12),%sp@- 4dfb6: 2f0b movel %a3,%sp@- 4dfb8: 4eb9 0004 db3a jsr 4db3a <IMFS_memfile_extend> 4dfbe: 4fef 000c lea %sp@(12),%sp 4dfc2: 4a80 tstl %d0
4dfc4: 6652 bnes 4e018 <memfile_lseek+0x82>
rtems_set_errno_and_return_minus_one( ENOSPC );
iop->size = the_jnode->info.file.size;
4dfc6: 202b 004c movel %a3@(76),%d0 4dfca: 222b 0050 movel %a3@(80),%d1 4dfce: 2540 0004 movel %d0,%a2@(4) 4dfd2: 2541 0008 movel %d1,%a2@(8) 4dfd6: 202a 000c movel %a2@(12),%d0 4dfda: 222a 0010 movel %a2@(16),%d1
} return iop->offset; }
4dfde: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 4dfe4: 4e5e unlk %fp 4dfe6: 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)
4dfe8: 202a 000c movel %a2@(12),%d0 4dfec: 222a 0010 movel %a2@(16),%d1 4dff0: 242b 004c movel %a3@(76),%d2 4dff4: 262b 0050 movel %a3@(80),%d3 4dff8: 2800 movel %d0,%d4 4dffa: 2a01 movel %d1,%d5 4dffc: 9a83 subl %d3,%d5 4dffe: 9982 subxl %d2,%d4
4e000: 6fdc bles 4dfde <memfile_lseek+0x48> <== ALWAYS TAKEN
iop->offset = the_jnode->info.linearfile.size;
4e002: 2002 movel %d2,%d0 <== NOT EXECUTED 4e004: 2203 movel %d3,%d1 <== NOT EXECUTED 4e006: 2542 000c movel %d2,%a2@(12) <== NOT EXECUTED 4e00a: 2543 0010 movel %d3,%a2@(16) <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSPC );
iop->size = the_jnode->info.file.size;
}
return iop->offset;
}
4e00e: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 <== NOT EXECUTED 4e014: 4e5e unlk %fp <== NOT EXECUTED 4e016: 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 );
4e018: 4eb9 0004 f098 jsr 4f098 <__errno> 4e01e: 7a1c moveq #28,%d5 4e020: 2040 moveal %d0,%a0 4e022: 2085 movel %d5,%a0@
iop->size = the_jnode->info.file.size;
}
return iop->offset;
}
4e024: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3
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 );
4e02a: 70ff moveq #-1,%d0 4e02c: 72ff moveq #-1,%d1
iop->size = the_jnode->info.file.size;
}
return iop->offset;
}
4e02e: 4e5e unlk %fp
...
0004de5e <memfile_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
4de5e: 4e56 fff0 linkw %fp,#-16 4de62: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4de66: 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))
4de6a: 202a 0014 movel %a2@(20),%d0 4de6e: 2200 movel %d0,%d1 4de70: 0281 0000 0204 andil #516,%d1
uint32_t mode
)
{
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
4de76: 266a 0018 moveal %a2@(24),%a3
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
4de7a: 6708 beqs 4de84 <memfile_open+0x26>
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
4de7c: 7206 moveq #6,%d1 4de7e: b2ab 0048 cmpl %a3@(72),%d1
4de82: 6732 beqs 4deb6 <memfile_open+0x58> <== NEVER TAKEN
the_jnode->info.file.size = 0;
the_jnode->info.file.indirect = 0;
the_jnode->info.file.doubly_indirect = 0;
the_jnode->info.file.triply_indirect = 0;
if ((count != 0)
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
4de84: 206b 004c moveal %a3@(76),%a0 4de88: 226b 0050 moveal %a3@(80),%a1
return -1;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
4de8c: 0800 0009 btst #9,%d0
4de90: 6710 beqs 4dea2 <memfile_open+0x44>
iop->offset = the_jnode->info.file.size;
4de92: 2548 000c movel %a0,%a2@(12) 4de96: 2549 0010 movel %a1,%a2@(16) 4de9a: 206b 004c moveal %a3@(76),%a0 4de9e: 226b 0050 moveal %a3@(80),%a1
iop->size = the_jnode->info.file.size;
return 0;
4dea2: 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;
4dea4: 2548 0004 movel %a0,%a2@(4) 4dea8: 2549 0008 movel %a1,%a2@(8)
return 0; }
4deac: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4deb2: 4e5e unlk %fp 4deb4: 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;
4deb6: 202b 0050 movel %a3@(80),%d0 <== NOT EXECUTED
const unsigned char *buffer = the_jnode->info.linearfile.direct;
the_jnode->type = IMFS_MEMORY_FILE;
the_jnode->info.file.size = 0;
4deba: 4282 clrl %d2 <== NOT EXECUTED 4debc: 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;
4debe: 222b 0054 movel %a3@(84),%d1 <== NOT EXECUTED
the_jnode->type = IMFS_MEMORY_FILE;
the_jnode->info.file.size = 0;
4dec2: 2742 004c movel %d2,%a3@(76) <== NOT EXECUTED 4dec6: 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;
4deca: 7605 moveq #5,%d3 <== NOT EXECUTED
the_jnode->info.file.size = 0;
the_jnode->info.file.indirect = 0;
4decc: 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;
4ded0: 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;
4ded4: 42ab 0058 clrl %a3@(88) <== NOT EXECUTED
the_jnode->info.file.triply_indirect = 0;
4ded8: 42ab 005c clrl %a3@(92) <== NOT EXECUTED
if ((count != 0)
4dedc: 4a80 tstl %d0 <== NOT EXECUTED 4dede: 6610 bnes 4def0 <memfile_open+0x92> <== NOT EXECUTED 4dee0: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED 4dee4: 91c8 subal %a0,%a0 <== NOT EXECUTED 4dee6: 93c9 subal %a1,%a1 <== NOT EXECUTED
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
return -1;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
4dee8: 0800 0009 btst #9,%d0 <== NOT EXECUTED 4deec: 67b4 beqs 4dea2 <memfile_open+0x44> <== NOT EXECUTED 4deee: 60a2 bras 4de92 <memfile_open+0x34> <== NOT EXECUTED
the_jnode->info.file.size = 0;
the_jnode->info.file.indirect = 0;
the_jnode->info.file.doubly_indirect = 0;
the_jnode->info.file.triply_indirect = 0;
if ((count != 0)
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
4def0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4def2: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4def4: 42a7 clrl %sp@- <== NOT EXECUTED 4def6: 42a7 clrl %sp@- <== NOT EXECUTED 4def8: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4defa: 4eb9 0004 dc6c jsr 4dc6c <IMFS_memfile_write> <== NOT EXECUTED 4df00: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4df04: 72ff moveq #-1,%d1 <== NOT EXECUTED 4df06: b280 cmpl %d0,%d1 <== NOT EXECUTED 4df08: 6710 beqs 4df1a <memfile_open+0xbc> <== NOT EXECUTED 4df0a: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED 4df0e: 206b 004c moveal %a3@(76),%a0 <== NOT EXECUTED 4df12: 226b 0050 moveal %a3@(80),%a1 <== NOT EXECUTED 4df16: 6000 ff74 braw 4de8c <memfile_open+0x2e> <== NOT EXECUTED
return -1;
4df1a: 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;
}
4df1c: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED 4df22: 4e5e unlk %fp <== NOT EXECUTED
000436f0 <mknod>:
int mknod(
const char *pathname,
mode_t mode,
dev_t dev
)
{
436f0: 4e56 ffd4 linkw %fp,#-44 436f4: 48d7 001c moveml %d2-%d4,%sp@ 436f8: 262e 000c movel %fp@(12),%d3
int result;
/*
* The file type is field within the mode. Check we have a sane mode set.
*/
switch (mode & S_IFMT)
436fc: 2003 movel %d3,%d0 436fe: 0280 0000 f000 andil #61440,%d0
int mknod(
const char *pathname,
mode_t mode,
dev_t dev
)
{
43704: 282e 0008 movel %fp@(8),%d4
int result;
/*
* The file type is field within the mode. Check we have a sane mode set.
*/
switch (mode & S_IFMT)
43708: 0c80 0000 4000 cmpil #16384,%d0
4370e: 673a beqs 4374a <mknod+0x5a> 43710: 6328 blss 4373a <mknod+0x4a>
43712: 0c80 0000 6000 cmpil #24576,%d0
43718: 6730 beqs 4374a <mknod+0x5a>
4371a: 0c80 0000 8000 cmpil #32768,%d0
43720: 6728 beqs 4374a <mknod+0x5a> <== ALWAYS TAKEN
case S_IFBLK:
case S_IFREG:
case S_IFIFO:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
43722: 4eb9 0004 f098 jsr 4f098 <__errno> 43728: 7216 moveq #22,%d1 4372a: 2040 moveal %d0,%a0 4372c: 70ff moveq #-1,%d0
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
rtems_filesystem_freenode( &temp_loc );
return result;
}
4372e: 4cee 001c ffd4 moveml %fp@(-44),%d2-%d4
case S_IFBLK:
case S_IFREG:
case S_IFIFO:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
43734: 2081 movel %d1,%a0@
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
rtems_filesystem_freenode( &temp_loc );
return result;
}
43736: 4e5e unlk %fp 43738: 4e75 rts
int result;
/*
* The file type is field within the mode. Check we have a sane mode set.
*/
switch (mode & S_IFMT)
4373a: 0c80 0000 1000 cmpil #4096,%d0
43740: 6708 beqs 4374a <mknod+0x5a>
43742: 0c80 0000 2000 cmpil #8192,%d0
43748: 66d8 bnes 43722 <mknod+0x32>
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
4374a: 240e movel %fp,%d2 4374c: 0682 ffff ffe4 addil #-28,%d2 43752: 2f02 movel %d2,%sp@- 43754: 486e fff8 pea %fp@(-8) 43758: 2f04 movel %d4,%sp@- 4375a: 4eb9 0004 41b0 jsr 441b0 <rtems_filesystem_get_start_loc>
result = (*temp_loc.ops->evalformake_h)(
43760: 486e fffc pea %fp@(-4) 43764: d8ae fff8 addl %fp@(-8),%d4 43768: 2f02 movel %d2,%sp@- 4376a: 206e fff0 moveal %fp@(-16),%a0 4376e: 2f04 movel %d4,%sp@- 43770: 2068 0004 moveal %a0@(4),%a0 43774: 4e90 jsr %a0@
&pathname[i],
&temp_loc,
&name_start
);
if ( result != 0 )
43776: 4fef 0018 lea %sp@(24),%sp 4377a: 4a80 tstl %d0
4377c: 6638 bnes 437b6 <mknod+0xc6>
return -1;
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
4377e: 2f02 movel %d2,%sp@- 43780: 2f2e 0014 movel %fp@(20),%sp@- 43784: 2f2e 0010 movel %fp@(16),%sp@- 43788: 206e fff0 moveal %fp@(-16),%a0 4378c: 2f03 movel %d3,%sp@- 4378e: 2f2e fffc movel %fp@(-4),%sp@- 43792: 2068 0014 moveal %a0@(20),%a0 43796: 4e90 jsr %a0@
rtems_filesystem_freenode( &temp_loc );
43798: 2f02 movel %d2,%sp@- 4379a: 2d40 ffe0 movel %d0,%fp@(-32) 4379e: 4eb9 0004 32c8 jsr 432c8 <rtems_filesystem_freenode>
return result;
437a4: 202e ffe0 movel %fp@(-32),%d0 437a8: 4fef 0018 lea %sp@(24),%sp
}
437ac: 4cee 001c ffd4 moveml %fp@(-44),%d2-%d4 437b2: 4e5e unlk %fp 437b4: 4e75 rts
&pathname[i],
&temp_loc,
&name_start
);
if ( result != 0 )
return -1;
437b6: 70ff moveq #-1,%d0
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
rtems_filesystem_freenode( &temp_loc );
return result;
}
437b8: 4cee 001c ffd4 moveml %fp@(-44),%d2-%d4 437be: 4e5e unlk %fp
...
00043858 <mount>:
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
43858: 7001 moveq #1,%d0
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
4385a: 4e56 ffb4 linkw %fp,#-76 4385e: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 43862: 282e 0008 movel %fp@(8),%d4 43866: 242e 000c movel %fp@(12),%d2 4386a: 262e 0010 movel %fp@(16),%d3
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
4386e: b0ae 0014 cmpl %fp@(20),%d0 43872: 6500 022a bcsw 43a9e <mount+0x246>
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* Get mount handler
*/
mount_h = rtems_filesystem_get_mount_handler( filesystemtype );
43876: 2f03 movel %d3,%sp@- 43878: 4eb9 0004 bd84 jsr 4bd84 <rtems_filesystem_get_mount_handler>
if ( !mount_h )
4387e: 588f addql #4,%sp
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* Get mount handler
*/
mount_h = rtems_filesystem_get_mount_handler( filesystemtype );
43880: 2d40 ffe4 movel %d0,%fp@(-28)
if ( !mount_h )
43884: 6700 0218 beqw 43a9e <mount+0x246>
{
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;
43888: 4a82 tstl %d2 4388a: 56c7 sne %d7 4388c: 4487 negl %d7
const char *target_or_null,
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
4388e: 4a07 tstb %d7 43890: 6700 01ee beqw 43a80 <mount+0x228>
* 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(
43894: 2f02 movel %d2,%sp@- 43896: 45f9 0005 0404 lea 50404 <strlen>,%a2 4389c: 2d42 ffdc movel %d2,%fp@(-36) 438a0: 4e92 jsr %a2@ 438a2: 588f addql #4,%sp 438a4: 2a40 moveal %d0,%a5 438a6: 528d addql #1,%a5 438a8: 2d40 ffe0 movel %d0,%fp@(-32)
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;
438ac: 2f03 movel %d3,%sp@- 438ae: 4e92 jsr %a2@ 438b0: 588f addql #4,%sp 438b2: 2840 moveal %d0,%a4
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
438b4: 4a84 tstl %d4 438b6: 6700 01c2 beqw 43a7a <mount+0x222> 438ba: 2f04 movel %d4,%sp@- 438bc: 4eb9 0005 0404 jsr 50404 <strlen> 438c2: 588f addql #4,%sp 438c4: 2640 moveal %d0,%a3 438c6: 528b addql #1,%a3
size_t target_size = strlen( target ) + 1;
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_size;
438c8: 41f4 d875 lea %a4@(00000075,%a5:l),%a0
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
438cc: 4870 b800 pea %a0@(00000000,%a3:l) 438d0: 4878 0001 pea 1 <ADD> 438d4: 4eb9 0004 2ec8 jsr 42ec8 <calloc>
if ( mt_entry != NULL ) {
438da: 508f addql #8,%sp
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
size_t target_size = strlen( target ) + 1;
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_size;
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
438dc: 2440 moveal %d0,%a2
if ( mt_entry != NULL ) {
438de: 4a80 tstl %d0 438e0: 6700 0180 beqw 43a62 <mount+0x20a>
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;
438e4: 200c movel %a4,%d0 438e6: 5280 addql #1,%d0
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_size;
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
if ( mt_entry != NULL ) {
char *str = (char *) mt_entry + sizeof( *mt_entry );
438e8: 2c0a movel %a2,%d6 438ea: 0686 0000 0074 addil #116,%d6
memcpy( str, filesystemtype, filesystemtype_size );
mt_entry->type = str;
str += filesystemtype_size;
438f0: 2a06 movel %d6,%d5 438f2: da80 addl %d0,%d5
memcpy( str, source_or_null, source_size );
mt_entry->dev = str;
str += source_size;
438f4: 41f3 5800 lea %a3@(00000000,%d5:l),%a0
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
if ( mt_entry != NULL ) {
char *str = (char *) mt_entry + sizeof( *mt_entry );
memcpy( str, filesystemtype, filesystemtype_size );
438f8: 49f9 0004 f8b8 lea 4f8b8 <memcpy>,%a4 438fe: 2f00 movel %d0,%sp@- 43900: 2f03 movel %d3,%sp@-
mt_entry->type = str;
str += filesystemtype_size;
memcpy( str, source_or_null, source_size );
mt_entry->dev = str;
str += source_size;
43902: 2d48 ffe8 movel %a0,%fp@(-24)
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
if ( mt_entry != NULL ) {
char *str = (char *) mt_entry + sizeof( *mt_entry );
memcpy( str, filesystemtype, filesystemtype_size );
43906: 2f06 movel %d6,%sp@- 43908: 4e94 jsr %a4@
mt_entry->type = str;
str += filesystemtype_size;
memcpy( str, source_or_null, source_size );
4390a: 2f0b movel %a3,%sp@- 4390c: 2f04 movel %d4,%sp@-
if ( mt_entry != NULL ) {
char *str = (char *) mt_entry + sizeof( *mt_entry );
memcpy( str, filesystemtype, filesystemtype_size );
mt_entry->type = str;
4390e: 2546 006c movel %d6,%a2@(108)
str += filesystemtype_size;
memcpy( str, source_or_null, source_size );
43912: 2f05 movel %d5,%sp@- 43914: 4e94 jsr %a4@
mt_entry->dev = str;
str += source_size;
memcpy( str, target, target_size );
43916: 2f0d movel %a5,%sp@- 43918: 2f2e ffdc movel %fp@(-36),%sp@-
memcpy( str, filesystemtype, filesystemtype_size );
mt_entry->type = str;
str += filesystemtype_size;
memcpy( str, source_or_null, source_size );
mt_entry->dev = str;
4391c: 2545 0070 movel %d5,%a2@(112)
str += source_size;
memcpy( str, target, target_size );
43920: 2f2e ffe8 movel %fp@(-24),%sp@- 43924: 4e94 jsr %a4@
mt_entry->target = str;
43926: 222e ffe8 movel %fp@(-24),%d1
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;
4392a: 7005 moveq #5,%d0
/*
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
4392c: 4fef 0024 lea %sp@(36),%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;
43930: 206e 0014 moveal %fp@(20),%a0
memcpy( str, source_or_null, source_size );
mt_entry->dev = str;
str += source_size;
memcpy( str, target, target_size );
mt_entry->target = str;
43934: 2541 0068 movel %d1,%a2@(104)
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
mt_entry->mt_fs_root.mt_entry = mt_entry;
mt_entry->options = options;
mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf;
43938: 223c 0000 0080 movel #128,%d1 4393e: 2540 0038 movel %d0,%a2@(56) 43942: 103c 0007 moveb #7,%d0
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
mt_entry->mt_fs_root.mt_entry = mt_entry;
mt_entry->options = options;
43946: 2548 0030 movel %a0,%a2@(48)
mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf;
4394a: 307c 0400 moveaw #1024,%a0 4394e: 2541 003c movel %d1,%a2@(60) 43952: 123c ffff moveb #-1,%d1 43956: 2540 0040 movel %d0,%a2@(64) 4395a: 103c 0001 moveb #1,%d0
&target_length
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
mt_entry->mt_fs_root.mt_entry = mt_entry;
4395e: 254a 002c movel %a2,%a2@(44)
mt_entry->options = options; mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf;
43962: 2541 0044 movel %d1,%a2@(68) 43966: 2541 0048 movel %d1,%a2@(72) 4396a: 2548 004c movel %a0,%a2@(76) 4396e: 42aa 0050 clrl %a2@(80) 43972: 42aa 0054 clrl %a2@(84) 43976: 2540 0058 movel %d0,%a2@(88) 4397a: 42aa 005c clrl %a2@(92) 4397e: 42aa 0060 clrl %a2@(96) 43982: 42aa 0064 clrl %a2@(100)
/*
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
43986: 4a07 tstb %d7
43988: 6632 bnes 439bc <mount+0x164>
}
} else {
/*
* Do we already have a base file system ?
*/
if ( !rtems_chain_is_empty( &mount_chain ) ) {
4398a: 203c 0005 f7b8 movel #391096,%d0 43990: b0b9 0005 f7b4 cmpl 5f7b4 <mount_chain>,%d0 43996: 6700 0090 beqw 43a28 <mount+0x1d0>
errno = EINVAL;
4399a: 4eb9 0004 f098 jsr 4f098 <__errno> <== NOT EXECUTED 439a0: 2040 moveal %d0,%a0 <== NOT EXECUTED 439a2: 7016 moveq #22,%d0 <== NOT EXECUTED 439a4: 2080 movel %d0,%a0@ <== NOT EXECUTED
return 0;
cleanup_and_bail:
free( mt_entry );
439a6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 439a8: 4eb9 0004 32dc jsr 432dc <free> <== NOT EXECUTED 439ae: 588f addql #4,%sp <== NOT EXECUTED
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
439b0: 70ff moveq #-1,%d0 <== NOT EXECUTED
}
439b2: 4cee 3cfc ffb4 moveml %fp@(-76),%d2-%d7/%a2-%a5 <== NOT EXECUTED 439b8: 4e5e unlk %fp <== NOT EXECUTED 439ba: 4e75 rts <== NOT EXECUTED
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
if ( rtems_filesystem_evaluate_path(
439bc: 4878 0001 pea 1 <ADD> 439c0: 260e movel %fp,%d3 439c2: 0683 ffff ffec addil #-20,%d3 439c8: 2f03 movel %d3,%sp@- 439ca: 4878 0007 pea 7 <TRUNCDFSF> 439ce: 2f2e ffe0 movel %fp@(-32),%sp@- 439d2: 2f02 movel %d2,%sp@- 439d4: 4eb9 0004 31e4 jsr 431e4 <rtems_filesystem_evaluate_path> 439da: 4fef 0014 lea %sp@(20),%sp 439de: 72ff moveq #-1,%d1 439e0: b280 cmpl %d0,%d1
439e2: 67c2 beqs 439a6 <mount+0x14e> <== NEVER TAKEN
/*
* Test to see if it is a directory
*/
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
439e4: 206e fff8 moveal %fp@(-8),%a0 439e8: 2f03 movel %d3,%sp@- 439ea: 2068 0010 moveal %a0@(16),%a0 439ee: 4e90 jsr %a0@ 439f0: 588f addql #4,%sp 439f2: 7201 moveq #1,%d1 439f4: b280 cmpl %d0,%d1 439f6: 6700 012c beqw 43b24 <mount+0x2cc>
errno = ENOTDIR;
439fa: 4eb9 0004 f098 jsr 4f098 <__errno> 43a00: 7414 moveq #20,%d2 43a02: 2040 moveal %d0,%a0 43a04: 2082 movel %d2,%a0@
return 0;
cleanup_and_bail:
free( mt_entry );
43a06: 2f0a movel %a2,%sp@-
if ( has_target ) {
if ( rtems_filesystem_evaluate_path(
target, target_length, RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 )
goto cleanup_and_bail;
loc_to_free = &loc;
43a08: 2403 movel %d3,%d2
return 0;
cleanup_and_bail:
free( mt_entry );
43a0a: 4eb9 0004 32dc jsr 432dc <free> 43a10: 588f addql #4,%sp
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
43a12: 2f02 movel %d2,%sp@- 43a14: 4eb9 0004 32c8 jsr 432c8 <rtems_filesystem_freenode> 43a1a: 588f addql #4,%sp
return -1;
43a1c: 70ff moveq #-1,%d0
}
43a1e: 4cee 3cfc ffb4 moveml %fp@(-76),%d2-%d7/%a2-%a5 43a24: 4e5e unlk %fp 43a26: 4e75 rts
)
{
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;
43a28: 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 ) ) {
43a2a: 2f2e 0018 movel %fp@(24),%sp@- 43a2e: 206e ffe4 moveal %fp@(-28),%a0 43a32: 2f0a movel %a2,%sp@- 43a34: 4e90 jsr %a0@ 43a36: 508f addql #8,%sp 43a38: 4a80 tstl %d0
43a3a: 677a beqs 43ab6 <mount+0x25e>
/*
* Try to undo the mount operation
*/
loc.ops->unmount_h( mt_entry );
43a3c: 206e fff8 moveal %fp@(-8),%a0 43a40: 2f0a movel %a2,%sp@- 43a42: 2068 0028 moveal %a0@(40),%a0 43a46: 4e90 jsr %a0@
return 0;
cleanup_and_bail:
free( mt_entry );
43a48: 2e8a movel %a2,%sp@ 43a4a: 4eb9 0004 32dc jsr 432dc <free>
if ( loc_to_free )
43a50: 588f addql #4,%sp 43a52: 4a82 tstl %d2
43a54: 66bc bnes 43a12 <mount+0x1ba> <== ALWAYS TAKEN
rtems_filesystem_freenode( loc_to_free );
return -1;
43a56: 70ff moveq #-1,%d0 <== NOT EXECUTED
}
43a58: 4cee 3cfc ffb4 moveml %fp@(-76),%d2-%d7/%a2-%a5 <== NOT EXECUTED 43a5e: 4e5e unlk %fp <== NOT EXECUTED 43a60: 4e75 rts <== NOT EXECUTED
target,
filesystemtype,
&target_length
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
43a62: 4eb9 0004 f098 jsr 4f098 <__errno> <== NOT EXECUTED 43a68: 760c moveq #12,%d3 <== NOT EXECUTED 43a6a: 2040 moveal %d0,%a0 <== NOT EXECUTED 43a6c: 70ff moveq #-1,%d0 <== NOT EXECUTED 43a6e: 2083 movel %d3,%a0@ <== NOT EXECUTED
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
}
43a70: 4cee 3cfc ffb4 moveml %fp@(-76),%d2-%d7/%a2-%a5 <== NOT EXECUTED 43a76: 4e5e unlk %fp <== NOT EXECUTED 43a78: 4e75 rts <== NOT EXECUTED
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
43a7a: 97cb subal %a3,%a3 43a7c: 6000 fe4a braw 438c8 <mount+0x70>
const char *target_or_null,
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
43a80: 7201 moveq #1,%d1 43a82: 41f9 0005 e268 lea 5e268 <IMFS_ops+0x48>,%a0 43a88: 3a7c 0002 moveaw #2,%a5 43a8c: 45f9 0005 0404 lea 50404 <strlen>,%a2 43a92: 2d41 ffe0 movel %d1,%fp@(-32) 43a96: 2d48 ffdc movel %a0,%fp@(-36) 43a9a: 6000 fe10 braw 438ac <mount+0x54>
/*
* Get mount handler
*/
mount_h = rtems_filesystem_get_mount_handler( filesystemtype );
if ( !mount_h )
rtems_set_errno_and_return_minus_one( EINVAL );
43a9e: 4eb9 0004 f098 jsr 4f098 <__errno> 43aa4: 7816 moveq #22,%d4 43aa6: 2040 moveal %d0,%a0 43aa8: 70ff moveq #-1,%d0 43aaa: 2084 movel %d4,%a0@
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
}
43aac: 4cee 3cfc ffb4 moveml %fp@(-76),%d2-%d7/%a2-%a5 43ab2: 4e5e unlk %fp 43ab4: 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 );
43ab6: 42a7 clrl %sp@- 43ab8: 42a7 clrl %sp@- 43aba: 2f39 0006 0efc movel 60efc <rtems_libio_semaphore>,%sp@- 43ac0: 4eb9 0004 6acc jsr 46acc <rtems_semaphore_obtain> 43ac6: 2f0a movel %a2,%sp@- 43ac8: 4879 0005 f7b4 pea 5f7b4 <mount_chain> 43ace: 4eb9 0004 7574 jsr 47574 <_Chain_Append>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
43ad4: 2f39 0006 0efc movel 60efc <rtems_libio_semaphore>,%sp@- 43ada: 4eb9 0004 6c1c jsr 46c1c <rtems_semaphore_release>
*/
rtems_libio_lock();
rtems_chain_append( &mount_chain, &mt_entry->Node );
rtems_libio_unlock();
if ( !has_target )
43ae0: 4fef 0018 lea %sp@(24),%sp 43ae4: 4a07 tstb %d7
43ae6: 6630 bnes 43b18 <mount+0x2c0>
rtems_filesystem_root = mt_entry->mt_fs_root;
43ae8: 2079 0005 f8d0 moveal 5f8d0 <rtems_current_user_env>,%a0
return 0;
43aee: 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;
43af0: 216a 001c 0018 movel %a2@(28),%a0@(24) 43af6: 216a 0020 001c movel %a2@(32),%a0@(28) 43afc: 216a 0024 0020 movel %a2@(36),%a0@(32) 43b02: 216a 0028 0024 movel %a2@(40),%a0@(36) 43b08: 216a 002c 0028 movel %a2@(44),%a0@(40)
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
}
43b0e: 4cee 3cfc ffb4 moveml %fp@(-76),%d2-%d7/%a2-%a5 43b14: 4e5e unlk %fp 43b16: 4e75 rts
rtems_libio_unlock();
if ( !has_target )
rtems_filesystem_root = mt_entry->mt_fs_root;
return 0;
43b18: 4280 clrl %d0
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
}
43b1a: 4cee 3cfc ffb4 moveml %fp@(-76),%d2-%d7/%a2-%a5 43b20: 4e5e unlk %fp 43b22: 4e75 rts
/*
* You can only mount one file system onto a single mount point.
*/
if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) {
43b24: 2f2e ffec movel %fp@(-20),%sp@- 43b28: 487a fc9a pea %pc@(437c4 <is_node_fs_root>) 43b2c: 4eb9 0004 37dc jsr 437dc <rtems_filesystem_mount_iterate> 43b32: 508f addql #8,%sp 43b34: 4a00 tstb %d0
43b36: 671c beqs 43b54 <mount+0x2fc>
errno = EBUSY;
43b38: 4eb9 0004 f098 jsr 4f098 <__errno>
if ( has_target ) {
if ( rtems_filesystem_evaluate_path(
target, target_length, RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 )
goto cleanup_and_bail;
loc_to_free = &loc;
43b3e: 2403 movel %d3,%d2
/*
* 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;
43b40: 7210 moveq #16,%d1 43b42: 2040 moveal %d0,%a0 43b44: 2081 movel %d1,%a0@
return 0;
cleanup_and_bail:
free( mt_entry );
43b46: 2f0a movel %a2,%sp@- 43b48: 4eb9 0004 32dc jsr 432dc <free> 43b4e: 588f addql #4,%sp 43b50: 6000 fec0 braw 43a12 <mount+0x1ba>
* 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;
43b54: 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;
43b58: 256e ffec 0008 movel %fp@(-20),%a2@(8)
mt_entry->mt_point_node.handlers = loc.handlers;
43b5e: 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;
43b64: 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 ) ) {
43b6a: 2f0a movel %a2,%sp@- 43b6c: 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;
43b70: 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 ) ) {
43b74: 4e91 jsr %a1@ 43b76: 588f addql #4,%sp 43b78: 4a80 tstl %d0 43b7a: 6600 fe8a bnew 43a06 <mount+0x1ae>
if ( has_target ) {
if ( rtems_filesystem_evaluate_path(
target, target_length, RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 )
goto cleanup_and_bail;
loc_to_free = &loc;
43b7e: 2403 movel %d3,%d2 43b80: 6000 fea8 braw 43a2a <mount+0x1d2>
00043d08 <mount_and_make_target_path>:
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
43d08: 4e56 ffec linkw %fp,#-20 43d0c: 48d7 007c moveml %d2-%d6,%sp@ 43d10: 262e 0008 movel %fp@(8),%d3 43d14: 242e 000c movel %fp@(12),%d2 43d18: 282e 0010 movel %fp@(16),%d4 43d1c: 2a2e 0014 movel %fp@(20),%d5 43d20: 2c2e 0018 movel %fp@(24),%d6
int rv = -1;
if (target != NULL) {
43d24: 4a82 tstl %d2
43d26: 673e beqs 43d66 <mount_and_make_target_path+0x5e>
rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO);
43d28: 4878 01ff pea 1ff <DBL_MANT_DIG+0x1ca> 43d2c: 2f02 movel %d2,%sp@- 43d2e: 4eb9 0004 476c jsr 4476c <rtems_mkdir>
if (rv == 0) {
43d34: 508f addql #8,%sp 43d36: 4a80 tstl %d0
43d38: 670a beqs 43d44 <mount_and_make_target_path+0x3c><== ALWAYS TAKEN
} else {
errno = EINVAL;
}
return rv;
}
43d3a: 4cee 007c ffec moveml %fp@(-20),%d2-%d6 <== NOT EXECUTED 43d40: 4e5e unlk %fp <== NOT EXECUTED 43d42: 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(
43d44: 2d46 0018 movel %d6,%fp@(24) 43d48: 2d45 0014 movel %d5,%fp@(20) 43d4c: 2d44 0010 movel %d4,%fp@(16) 43d50: 2d42 000c movel %d2,%fp@(12) 43d54: 2d43 0008 movel %d3,%fp@(8)
} else {
errno = EINVAL;
}
return rv;
}
43d58: 4cee 007c ffec moveml %fp@(-20),%d2-%d6 43d5e: 4e5e unlk %fp
int rv = -1;
if (target != NULL) {
rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO);
if (rv == 0) {
rv = mount(
43d60: 4ef9 0004 3e14 jmp 43e14 <mount>
options,
data
);
}
} else {
errno = EINVAL;
43d66: 4eb9 0004 f5cc jsr 4f5cc <__errno> 43d6c: 7216 moveq #22,%d1 43d6e: 2040 moveal %d0,%a0
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
int rv = -1;
43d70: 70ff moveq #-1,%d0
} else {
errno = EINVAL;
}
return rv;
}
43d72: 4cee 007c ffec moveml %fp@(-20),%d2-%d6
options,
data
);
}
} else {
errno = EINVAL;
43d78: 2081 movel %d1,%a0@
}
return rv;
}
43d7a: 4e5e unlk %fp
...
0005897c <msdos_creat_node>:
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
5897c: 72ff moveq #-1,%d1
msdos_node_type_t type,
const char *name,
int name_len,
mode_t mode,
const fat_file_fd_t *link_fd)
{
5897e: 4e56 ff3c linkw %fp,#-196
ssize_t ret = 0;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
fat_file_fd_t *parent_fat_fd = parent_loc->node_access;
fat_file_fd_t *fat_fd = NULL;
time_t time_ret = 0;
uint16_t time_val = 0;
58982: 4240 clrw %d0
msdos_node_type_t type,
const char *name,
int name_len,
mode_t mode,
const fat_file_fd_t *link_fd)
{
58984: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 58988: 266e 0008 moveal %fp@(8),%a3
uint32_t byte = 0;
fat_dir_pos_init(&dir_pos);
memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2);
5898c: 2a0e movel %fp,%d5 5898e: 0685 ffff ff68 addil #-152,%d5
uint32_t sec = 0;
uint32_t byte = 0;
fat_dir_pos_init(&dir_pos);
memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
58994: 45ee ffa8 lea %fp@(-88),%a2
mode_t mode,
const fat_file_fd_t *link_fd)
{
int rc = RC_OK;
ssize_t ret = 0;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
58998: 206b 0010 moveal %a3@(16),%a0 5899c: 2a68 0034 moveal %a0@(52),%a5
uint32_t byte = 0;
fat_dir_pos_init(&dir_pos);
memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2);
589a0: 4878 0040 pea 40 <DBL_MANT_DIG+0xb>
msdos_node_type_t type,
const char *name,
int name_len,
mode_t mode,
const fat_file_fd_t *link_fd)
{
589a4: 242e 0010 movel %fp@(16),%d2
uint32_t byte = 0;
fat_dir_pos_init(&dir_pos);
memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2);
589a8: 42a7 clrl %sp@-
msdos_node_type_t type,
const char *name,
int name_len,
mode_t mode,
const fat_file_fd_t *link_fd)
{
589aa: 282e 0014 movel %fp@(20),%d4
uint32_t byte = 0;
fat_dir_pos_init(&dir_pos);
memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2);
589ae: 2f05 movel %d5,%sp@-
const fat_file_fd_t *link_fd)
{
int rc = RC_OK;
ssize_t ret = 0;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
fat_file_fd_t *parent_fat_fd = parent_loc->node_access;
589b0: 2d53 ff64 movel %a3@,%fp@(-156)
msdos_node_type_t type,
const char *name,
int name_len,
mode_t mode,
const fat_file_fd_t *link_fd)
{
589b4: 262e 000c movel %fp@(12),%d3 589b8: 2d41 fff0 movel %d1,%fp@(-16)
ssize_t ret = 0;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
fat_file_fd_t *parent_fat_fd = parent_loc->node_access;
fat_file_fd_t *fat_fd = NULL;
time_t time_ret = 0;
uint16_t time_val = 0;
589bc: 3d40 fffc movew %d0,%fp@(-4)
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
589c0: 2d41 fff4 movel %d1,%fp@(-12)
uint16_t date = 0;
589c4: 3d40 fffe movew %d0,%fp@(-2)
{
int rc = RC_OK;
ssize_t ret = 0;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
fat_file_fd_t *parent_fat_fd = parent_loc->node_access;
fat_file_fd_t *fat_fd = NULL;
589c8: 42ae fff8 clrl %fp@(-8)
name_type = msdos_long_to_short (name, name_len,
MSDOS_DIR_NAME(short_node),
MSDOS_NAME_MAX);
/* fill reserved field */
*MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE;
589cc: 4207 clrb %d7
static inline void
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
589ce: 42ae ffe8 clrl %fp@(-24)
dir_pos->sname.ofs = 0;
589d2: 42ae ffec clrl %fp@(-20)
uint32_t sec = 0;
uint32_t byte = 0;
fat_dir_pos_init(&dir_pos);
memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
589d6: 4292 clrl %a2@ 589d8: 42ae ffac clrl %fp@(-84) 589dc: 42ae ffb0 clrl %fp@(-80) 589e0: 42ae ffb4 clrl %fp@(-76) 589e4: 42ae ffb8 clrl %fp@(-72) 589e8: 42ae ffbc clrl %fp@(-68) 589ec: 42ae ffc0 clrl %fp@(-64) 589f0: 42ae ffc4 clrl %fp@(-60)
memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2);
589f4: 4eb9 0005 e310 jsr 5e310 <memset>
name_type = msdos_long_to_short (name, name_len,
589fa: 4878 000b pea b <LASTO+0x1> 589fe: 2f0a movel %a2,%sp@- 58a00: 2f04 movel %d4,%sp@- 58a02: 2f02 movel %d2,%sp@- 58a04: 4eb9 0005 9b40 jsr 59b40 <msdos_long_to_short>
MSDOS_DIR_NAME(short_node),
MSDOS_NAME_MAX);
/* fill reserved field */
*MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE;
58a0a: 1d47 ffb4 moveb %d7,%fp@(-76)
fat_dir_pos_init(&dir_pos);
memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2);
name_type = msdos_long_to_short (name, name_len,
58a0e: 2c00 movel %d0,%d6
/* fill reserved field */
*MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE;
/* set up last write date and time */
time_ret = time(NULL);
58a10: 42a7 clrl %sp@- 58a12: 4eb9 0006 1748 jsr 61748 <time>
if ( time_ret == -1 )
58a18: 4fef 0020 lea %sp@(32),%sp 58a1c: 72ff moveq #-1,%d1 58a1e: b280 cmpl %d0,%d1 58a20: 6700 035c beqw 58d7e <msdos_creat_node+0x402>
return -1;
msdos_date_unix2dos(time_ret, &date, &time_val);
58a24: 486e fffc pea %fp@(-4) 58a28: 486e fffe pea %fp@(-2) 58a2c: 2f00 movel %d0,%sp@- 58a2e: 4eb9 0005 ca78 jsr 5ca78 <msdos_date_unix2dos>
*MSDOS_DIR_LAST_ACCESS_DATE(short_node) = CT_LE_W(date);
/* initialize directory/file size */
*MSDOS_DIR_FILE_SIZE(short_node) = MSDOS_INIT_DIR_SIZE;
if (type == MSDOS_DIRECTORY) {
58a34: 4fef 000c lea %sp@(12),%sp
time_ret = time(NULL);
if ( time_ret == -1 )
return -1;
msdos_date_unix2dos(time_ret, &date, &time_val);
*MSDOS_DIR_CRT_TIME(short_node) = CT_LE_W(time_val);
58a38: 4281 clrl %d1
*MSDOS_DIR_CRT_DATE(short_node) = CT_LE_W(date);
58a3a: 4280 clrl %d0
time_ret = time(NULL);
if ( time_ret == -1 )
return -1;
msdos_date_unix2dos(time_ret, &date, &time_val);
*MSDOS_DIR_CRT_TIME(short_node) = CT_LE_W(time_val);
58a3c: 322e fffc movew %fp@(-4),%d1
*MSDOS_DIR_CRT_DATE(short_node) = CT_LE_W(date);
58a40: 302e fffe movew %fp@(-2),%d0
*MSDOS_DIR_WRITE_TIME(short_node) = CT_LE_W(time_val);
*MSDOS_DIR_WRITE_DATE(short_node) = CT_LE_W(date);
*MSDOS_DIR_LAST_ACCESS_DATE(short_node) = CT_LE_W(date);
/* initialize directory/file size */
*MSDOS_DIR_FILE_SIZE(short_node) = MSDOS_INIT_DIR_SIZE;
58a44: 42ae ffc4 clrl %fp@(-60)
static inline uint16_t m68k_swap_u16(
uint16_t value
)
{
return (((value & 0xff) << 8) | ((value >> 8) & 0xff));
58a48: 2e01 movel %d1,%d7 58a4a: e08f lsrl #8,%d7 58a4c: 2247 moveal %d7,%a1 58a4e: 2e00 movel %d0,%d7 58a50: e08f lsrl #8,%d7 58a52: 2047 moveal %d7,%a0 58a54: 2e09 movel %a1,%d7 58a56: e189 lsll #8,%d1 58a58: e188 lsll #8,%d0 58a5a: 8287 orl %d7,%d1 58a5c: 2e08 movel %a0,%d7 58a5e: 8087 orl %d7,%d0
time_ret = time(NULL);
if ( time_ret == -1 )
return -1;
msdos_date_unix2dos(time_ret, &date, &time_val);
*MSDOS_DIR_CRT_TIME(short_node) = CT_LE_W(time_val);
58a60: 3d41 ffb6 movew %d1,%fp@(-74)
*MSDOS_DIR_CRT_DATE(short_node) = CT_LE_W(date);
*MSDOS_DIR_WRITE_TIME(short_node) = CT_LE_W(time_val);
58a64: 3d41 ffbe movew %d1,%fp@(-66)
if ( time_ret == -1 )
return -1;
msdos_date_unix2dos(time_ret, &date, &time_val);
*MSDOS_DIR_CRT_TIME(short_node) = CT_LE_W(time_val);
*MSDOS_DIR_CRT_DATE(short_node) = CT_LE_W(date);
58a68: 3d40 ffb8 movew %d0,%fp@(-72)
*MSDOS_DIR_WRITE_TIME(short_node) = CT_LE_W(time_val);
*MSDOS_DIR_WRITE_DATE(short_node) = CT_LE_W(date);
58a6c: 3d40 ffc0 movew %d0,%fp@(-64)
*MSDOS_DIR_LAST_ACCESS_DATE(short_node) = CT_LE_W(date);
58a70: 3d40 ffba movew %d0,%fp@(-70)
/* initialize directory/file size */
*MSDOS_DIR_FILE_SIZE(short_node) = MSDOS_INIT_DIR_SIZE;
if (type == MSDOS_DIRECTORY) {
58a74: 7001 moveq #1,%d0 58a76: b083 cmpl %d3,%d0
58a78: 6746 beqs 58ac0 <msdos_creat_node+0x144>
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_DIRECTORY;
}
else if (type == MSDOS_HARD_LINK) {
58a7a: 7e03 moveq #3,%d7 58a7c: be83 cmpl %d3,%d7
58a7e: 674e beqs 58ace <msdos_creat_node+0x152> <== NEVER TAKEN
* set "archive bit" due to changes
*/
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_ARCHIVE;
}
else { /* regular file... */
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_ARCHIVE;
58a80: 7e20 moveq #32,%d7 58a82: 102a 000b moveb %a2@(11),%d0 58a86: 8087 orl %d7,%d0 58a88: 1d40 ffb3 moveb %d0,%fp@(-77)
/*
* find free space in the parent directory and write new initialized
* FAT 32 Bytes Directory Entry Structure to the disk
*/
rc = msdos_get_name_node(parent_loc, true, name, name_len,
58a8c: 2f0a movel %a2,%sp@- 58a8e: 486e ffe8 pea %fp@(-24) 58a92: 2f06 movel %d6,%sp@- 58a94: 2f04 movel %d4,%sp@- 58a96: 2f02 movel %d2,%sp@- 58a98: 4878 0001 pea 1 <ADD> 58a9c: 2f0b movel %a3,%sp@- 58a9e: 4eb9 0005 b198 jsr 5b198 <msdos_get_name_node>
name_type, &dir_pos, short_node);
if ( rc != RC_OK )
58aa4: 4fef 001c lea %sp@(28),%sp
/*
* find free space in the parent directory and write new initialized
* FAT 32 Bytes Directory Entry Structure to the disk
*/
rc = msdos_get_name_node(parent_loc, true, name, name_len,
58aa8: 2400 movel %d0,%d2
name_type, &dir_pos, short_node);
if ( rc != RC_OK )
58aaa: 6608 bnes 58ab4 <msdos_creat_node+0x138> <== NEVER TAKEN
/*
* if we create a new file we are done, if directory there are more steps
* to do
*/
if (type == MSDOS_DIRECTORY)
58aac: 7001 moveq #1,%d0 58aae: b083 cmpl %d3,%d0 58ab0: 6700 00b4 beqw 58b66 <msdos_creat_node+0x1ea>
err:
/* mark the used 32bytes structure on the disk as free */
msdos_set_first_char4file_name(parent_loc->mt_entry, &dir_pos, 0xE5);
return rc;
}
58ab4: 2002 movel %d2,%d0 58ab6: 4cee 3cfc ff3c moveml %fp@(-196),%d2-%d7/%a2-%a5 58abc: 4e5e unlk %fp 58abe: 4e75 rts
/* initialize directory/file size */
*MSDOS_DIR_FILE_SIZE(short_node) = MSDOS_INIT_DIR_SIZE;
if (type == MSDOS_DIRECTORY) {
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_DIRECTORY;
58ac0: 7210 moveq #16,%d1 58ac2: 102a 000b moveb %a2@(11),%d0 58ac6: 8081 orl %d1,%d0 58ac8: 1d40 ffb3 moveb %d0,%fp@(-77) 58acc: 60be bras 58a8c <msdos_creat_node+0x110>
* node to the newly created
*/
/*
* read the original directory entry
*/
sec = fat_cluster_num_to_sector_num(parent_loc->mt_entry,
58ace: 206e 001c moveal %fp@(28),%a0 <== NOT EXECUTED 58ad2: 226b 0010 moveal %a3@(16),%a1 <== NOT EXECUTED 58ad6: 2028 0020 movel %a0@(32),%d0 <== NOT EXECUTED
err:
/* mark the used 32bytes structure on the disk as free */
msdos_set_first_char4file_name(parent_loc->mt_entry, &dir_pos, 0xE5);
return rc;
}
58ada: 2069 0034 moveal %a1@(52),%a0 <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
58ade: 6600 021c bnew 58cfc <msdos_creat_node+0x380> <== NOT EXECUTED 58ae2: 4281 clrl %d1 <== NOT EXECUTED 58ae4: 1228 000a moveb %a0@(10),%d1 <== NOT EXECUTED 58ae8: c287 andl %d7,%d1 <== NOT EXECUTED 58aea: 6700 0210 beqw 58cfc <msdos_creat_node+0x380> <== NOT EXECUTED
return fs_info->vol.rdir_loc;
58aee: 2028 001a movel %a0@(26),%d0 <== NOT EXECUTED
sec += (link_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
byte = (link_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
ret = _fat_block_read(parent_loc->mt_entry,
sec, byte, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE,
link_node);
58af2: 49ee ffc8 lea %fp@(-56),%a4 <== NOT EXECUTED
* read the original directory entry
*/
sec = fat_cluster_num_to_sector_num(parent_loc->mt_entry,
link_fd->dir_pos.sname.cln);
sec += (link_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
byte = (link_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
58af6: 4287 clrl %d7 <== NOT EXECUTED
ret = _fat_block_read(parent_loc->mt_entry,
58af8: 2f0c movel %a4,%sp@- <== NOT EXECUTED 58afa: 4878 0020 pea 20 <OPER2+0xc> <== NOT EXECUTED
/*
* read the original directory entry
*/
sec = fat_cluster_num_to_sector_num(parent_loc->mt_entry,
link_fd->dir_pos.sname.cln);
sec += (link_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
58afe: 206e 001c moveal %fp@(28),%a0 <== NOT EXECUTED
byte = (link_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
58b02: 3e15 movew %a5@,%d7 <== NOT EXECUTED
/*
* read the original directory entry
*/
sec = fat_cluster_num_to_sector_num(parent_loc->mt_entry,
link_fd->dir_pos.sname.cln);
sec += (link_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
58b04: 2228 0024 movel %a0@(36),%d1 <== NOT EXECUTED
byte = (link_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
58b08: 2047 moveal %d7,%a0 <== NOT EXECUTED 58b0a: 5388 subql #1,%a0 <== NOT EXECUTED
ret = _fat_block_read(parent_loc->mt_entry,
58b0c: 2e08 movel %a0,%d7 <== NOT EXECUTED 58b0e: 2040 moveal %d0,%a0 <== NOT EXECUTED 58b10: ce81 andl %d1,%d7 <== NOT EXECUTED 58b12: 2f07 movel %d7,%sp@- <== NOT EXECUTED
/*
* read the original directory entry
*/
sec = fat_cluster_num_to_sector_num(parent_loc->mt_entry,
link_fd->dir_pos.sname.cln);
sec += (link_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
58b14: 4287 clrl %d7 <== NOT EXECUTED 58b16: 1e2d 0002 moveb %a5@(2),%d7 <== NOT EXECUTED 58b1a: eea9 lsrl %d7,%d1 <== NOT EXECUTED
byte = (link_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
ret = _fat_block_read(parent_loc->mt_entry,
58b1c: 4870 1800 pea %a0@(00000000,%d1:l) <== NOT EXECUTED 58b20: 2f09 movel %a1,%sp@- <== NOT EXECUTED 58b22: 4eb9 0005 3bf2 jsr 53bf2 <_fat_block_read> <== NOT EXECUTED
sec, byte, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE,
link_node);
if (ret < 0) {
58b28: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 58b2c: 4a80 tstl %d0 <== NOT EXECUTED 58b2e: 6d00 024e bltw 58d7e <msdos_creat_node+0x402> <== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_HI(short_node) =
*MSDOS_DIR_FIRST_CLUSTER_HI(link_node);
/*
* set "archive bit" due to changes
*/
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_ARCHIVE;
58b32: 7220 moveq #32,%d1 <== NOT EXECUTED
return -1;
}
/*
* copy various attributes
*/
*MSDOS_DIR_ATTR(short_node) =*MSDOS_DIR_ATTR(link_node);
58b34: 102e ffd3 moveb %fp@(-45),%d0 <== NOT EXECUTED
*MSDOS_DIR_CRT_DATE(short_node) =*MSDOS_DIR_CRT_DATE(link_node);
/*
* copy/set "file size", "first cluster"
*/
*MSDOS_DIR_FILE_SIZE(short_node) =*MSDOS_DIR_FILE_SIZE(link_node);
58b38: 2d6e ffe4 ffc4 movel %fp@(-28),%fp@(-60) <== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_HI(short_node) =
*MSDOS_DIR_FIRST_CLUSTER_HI(link_node);
/*
* set "archive bit" due to changes
*/
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_ARCHIVE;
58b3e: 8081 orl %d1,%d0 <== NOT EXECUTED
}
/*
* copy various attributes
*/
*MSDOS_DIR_ATTR(short_node) =*MSDOS_DIR_ATTR(link_node);
*MSDOS_DIR_CRT_TIME_TENTH(short_node)=*MSDOS_DIR_CRT_TIME_TENTH(link_node);
58b40: 1d6e ffd5 ffb5 moveb %fp@(-43),%fp@(-75) <== NOT EXECUTED
*MSDOS_DIR_CRT_TIME(short_node) =*MSDOS_DIR_CRT_TIME(link_node);
58b46: 3d6e ffd6 ffb6 movew %fp@(-42),%fp@(-74) <== NOT EXECUTED
*MSDOS_DIR_CRT_DATE(short_node) =*MSDOS_DIR_CRT_DATE(link_node);
58b4c: 3d6e ffd8 ffb8 movew %fp@(-40),%fp@(-72) <== NOT EXECUTED
/*
* copy/set "file size", "first cluster"
*/
*MSDOS_DIR_FILE_SIZE(short_node) =*MSDOS_DIR_FILE_SIZE(link_node);
*MSDOS_DIR_FIRST_CLUSTER_LOW(short_node) =
58b52: 3d6e ffe2 ffc2 movew %fp@(-30),%fp@(-62) <== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_LOW(link_node);
*MSDOS_DIR_FIRST_CLUSTER_HI(short_node) =
58b58: 3d6e ffdc ffbc movew %fp@(-36),%fp@(-68) <== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_HI(link_node);
/*
* set "archive bit" due to changes
*/
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_ARCHIVE;
58b5e: 1d40 ffb3 moveb %d0,%fp@(-77) <== NOT EXECUTED 58b62: 6000 ff28 braw 58a8c <msdos_creat_node+0x110> <== NOT EXECUTED
* to do
*/
if (type == MSDOS_DIRECTORY)
{
/* open new directory as fat-file */
rc = fat_file_open(parent_loc->mt_entry, &dir_pos, &fat_fd);
58b66: 486e fff8 pea %fp@(-8) 58b6a: 486e ffe8 pea %fp@(-24) 58b6e: 2f2b 0010 movel %a3@(16),%sp@- 58b72: 4eb9 0005 29b2 jsr 529b2 <fat_file_open>
if (rc != RC_OK)
58b78: 4fef 000c lea %sp@(12),%sp
* to do
*/
if (type == MSDOS_DIRECTORY)
{
/* open new directory as fat-file */
rc = fat_file_open(parent_loc->mt_entry, &dir_pos, &fat_fd);
58b7c: 2400 movel %d0,%d2
if (rc != RC_OK)
58b7e: 6600 015a bnew 58cda <msdos_creat_node+0x35e>
/*
* we opened fat-file for node we just created, so initialize fat-file
* descritor
*/
fat_fd->fat_file_size = 0;
58b82: 286e fff8 moveal %fp@(-8),%a4
fat_fd->fat_file_type = FAT_DIRECTORY;
58b86: 7e01 moveq #1,%d7
/*
* dot and dotdot entries are identical to new node except the
* names
*/
memcpy(DOT_NODE_P(dot_dotdot), short_node,
58b88: 2045 moveal %d5,%a0
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memcpy(DOTDOT_NODE_P(dot_dotdot), short_node,
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memcpy(MSDOS_DIR_NAME(DOT_NODE_P(dot_dotdot)), MSDOS_DOT_NAME,
58b8a: 2a0e movel %fp,%d5 58b8c: 0685 ffff ff68 addil #-152,%d5 58b92: 2245 moveal %d5,%a1
* we opened fat-file for node we just created, so initialize fat-file
* descritor
*/
fat_fd->fat_file_size = 0;
fat_fd->fat_file_type = FAT_DIRECTORY;
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
58b94: 7220 moveq #32,%d1 58b96: 4841 swap %d1
/*
* we opened fat-file for node we just created, so initialize fat-file
* descritor
*/
fat_fd->fat_file_size = 0;
58b98: 42ac 0018 clrl %a4@(24)
fat_fd->fat_file_type = FAT_DIRECTORY;
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
58b9c: 2941 0014 movel %d1,%a4@(20)
/*
* we opened fat-file for node we just created, so initialize fat-file
* descritor
*/
fat_fd->fat_file_size = 0;
fat_fd->fat_file_type = FAT_DIRECTORY;
58ba0: 2947 0010 movel %d7,%a4@(16)
/*
* dot and dotdot entries are identical to new node except the
* names
*/
memcpy(DOT_NODE_P(dot_dotdot), short_node,
58ba4: 20d2 movel %a2@,%a0@+ 58ba6: 20ee ffac movel %fp@(-84),%a0@+ 58baa: 20ee ffb0 movel %fp@(-80),%a0@+ 58bae: 20ee ffb4 movel %fp@(-76),%a0@+ 58bb2: 20ee ffb8 movel %fp@(-72),%a0@+ 58bb6: 20ee ffbc movel %fp@(-68),%a0@+ 58bba: 20ee ffc0 movel %fp@(-64),%a0@+ 58bbe: 20ae ffc4 movel %fp@(-60),%a0@
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memcpy(DOTDOT_NODE_P(dot_dotdot), short_node,
58bc2: 2d52 ff88 movel %a2@,%fp@(-120) 58bc6: 2d6e ffac ff8c movel %fp@(-84),%fp@(-116) 58bcc: 2d6e ffb0 ff90 movel %fp@(-80),%fp@(-112) 58bd2: 2d6e ffb4 ff94 movel %fp@(-76),%fp@(-108) 58bd8: 2d6e ffb8 ff98 movel %fp@(-72),%fp@(-104) 58bde: 2d6e ffbc ff9c movel %fp@(-68),%fp@(-100) 58be4: 2d6e ffc0 ffa0 movel %fp@(-64),%fp@(-96) 58bea: 2d6e ffc4 ffa4 movel %fp@(-60),%fp@(-92)
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memcpy(MSDOS_DIR_NAME(DOT_NODE_P(dot_dotdot)), MSDOS_DOT_NAME,
58bf0: 2479 0006 ddd8 moveal 6ddd8 <MSDOS_DOT_NAME>,%a2 58bf6: 22da movel %a2@+,%a1@+ 58bf8: 22da movel %a2@+,%a1@+
MSDOS_NAME_MAX);
memcpy(MSDOS_DIR_NAME(DOTDOT_NODE_P(dot_dotdot)), MSDOS_DOTDOT_NAME,
58bfa: 2079 0006 ddd4 moveal 6ddd4 <MSDOS_DOTDOT_NAME>,%a0
*/
memcpy(DOT_NODE_P(dot_dotdot), short_node,
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memcpy(DOTDOT_NODE_P(dot_dotdot), short_node,
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memcpy(MSDOS_DIR_NAME(DOT_NODE_P(dot_dotdot)), MSDOS_DOT_NAME,
58c00: 32da movew %a2@+,%a1@+ 58c02: 1292 moveb %a2@,%a1@
MSDOS_NAME_MAX);
memcpy(MSDOS_DIR_NAME(DOTDOT_NODE_P(dot_dotdot)), MSDOS_DOTDOT_NAME,
58c04: 2d58 ff88 movel %a0@+,%fp@(-120) 58c08: 2d58 ff8c movel %a0@+,%fp@(-116) 58c0c: 3d58 ff90 movew %a0@+,%fp@(-112) 58c10: 1d50 ff92 moveb %a0@,%fp@(-110)
/*
* here we can ommit FAT32 condition because for all FAT types dirs
* right under root dir should contain 0 in dotdot entry but for
* FAT12/16 parent_fat_fd->cluster_num always contains such value
*/
if ((FAT_FD_OF_ROOT_DIR(parent_fat_fd)) &&
58c14: 206e ff64 moveal %fp@(-156),%a0 58c18: bea8 0020 cmpl %a0@(32),%d7 58c1c: 6700 00f0 beqw 58d0e <msdos_creat_node+0x392>
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
}
else
{
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOTDOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )((parent_fat_fd->cln) & 0x0000FFFF));
58c20: 206e ff64 moveal %fp@(-156),%a0 58c24: 4283 clrl %d3
/*
* write dot and dotdot entries to new fat-file: currently fat-file
* correspondes to a new node is zero length, so it will be extended
* by one cluster and entries will be written
*/
ret = fat_file_write(parent_loc->mt_entry, fat_fd, 0,
58c26: 45f9 0005 3332 lea 53332 <fat_file_write>,%a2
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
}
else
{
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOTDOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )((parent_fat_fd->cln) & 0x0000FFFF));
58c2c: 2428 001c movel %a0@(28),%d2
/*
* write dot and dotdot entries to new fat-file: currently fat-file
* correspondes to a new node is zero length, so it will be extended
* by one cluster and entries will be written
*/
ret = fat_file_write(parent_loc->mt_entry, fat_fd, 0,
58c30: 2f05 movel %d5,%sp@- 58c32: 4878 0040 pea 40 <DBL_MANT_DIG+0xb>
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
}
else
{
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOTDOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )((parent_fat_fd->cln) & 0x0000FFFF));
58c36: 3602 movew %d2,%d3
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )(((parent_fat_fd->cln) & 0xFFFF0000)>>16));
58c38: 4242 clrw %d2 58c3a: 4842 swap %d2
/*
* write dot and dotdot entries to new fat-file: currently fat-file
* correspondes to a new node is zero length, so it will be extended
* by one cluster and entries will be written
*/
ret = fat_file_write(parent_loc->mt_entry, fat_fd, 0,
58c3c: 42a7 clrl %sp@- 58c3e: 2203 movel %d3,%d1 58c40: 2002 movel %d2,%d0 58c42: e08b lsrl #8,%d3 58c44: e08a lsrl #8,%d2 58c46: e189 lsll #8,%d1 58c48: e188 lsll #8,%d0 58c4a: 2f0c movel %a4,%sp@- 58c4c: 2f2b 0010 movel %a3@(16),%sp@- 58c50: 8283 orl %d3,%d1 58c52: 8082 orl %d2,%d0
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
}
else
{
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOTDOT_NODE_P(dot_dotdot)) =
58c54: 3d41 ffa2 movew %d1,%fp@(-94)
CT_LE_W((uint16_t )((parent_fat_fd->cln) & 0x0000FFFF));
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) =
58c58: 3d40 ff9c movew %d0,%fp@(-100)
/*
* write dot and dotdot entries to new fat-file: currently fat-file
* correspondes to a new node is zero length, so it will be extended
* by one cluster and entries will be written
*/
ret = fat_file_write(parent_loc->mt_entry, fat_fd, 0,
58c5c: 4e92 jsr %a2@
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2,
(uint8_t *)dot_dotdot);
if (ret < 0)
58c5e: 4fef 0014 lea %sp@(20),%sp 58c62: 4a80 tstl %d0 58c64: 6d00 00e6 bltw 58d4c <msdos_creat_node+0x3d0>
rc = -1;
goto error;
}
/* increment fat-file size by cluster size */
fat_fd->fat_file_size += fs_info->fat.vol.bpc;
58c68: 4280 clrl %d0
/* set up cluster num for dot entry */
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )((fat_fd->cln) & 0x0000FFFF));
58c6a: 4281 clrl %d1
rc = -1;
goto error;
}
/* increment fat-file size by cluster size */
fat_fd->fat_file_size += fs_info->fat.vol.bpc;
58c6c: 302d 0006 movew %a5@(6),%d0 58c70: 206e fff8 moveal %fp@(-8),%a0 58c74: d1a8 0018 addl %d0,%a0@(24)
/* set up cluster num for dot entry */
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )((fat_fd->cln) & 0x0000FFFF));
58c78: 2428 001c movel %a0@(28),%d2
*MSDOS_DIR_FIRST_CLUSTER_HI(DOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )(((fat_fd->cln) & 0xFFFF0000) >> 16));
/* rewrite dot entry */
ret = fat_file_write(parent_loc->mt_entry, fat_fd, 0,
58c7c: 2f05 movel %d5,%sp@- 58c7e: 4878 0020 pea 20 <OPER2+0xc>
/* increment fat-file size by cluster size */
fat_fd->fat_file_size += fs_info->fat.vol.bpc;
/* set up cluster num for dot entry */
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )((fat_fd->cln) & 0x0000FFFF));
58c82: 3202 movew %d2,%d1
*MSDOS_DIR_FIRST_CLUSTER_HI(DOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )(((fat_fd->cln) & 0xFFFF0000) >> 16));
58c84: 4242 clrw %d2 58c86: 4842 swap %d2
/* rewrite dot entry */
ret = fat_file_write(parent_loc->mt_entry, fat_fd, 0,
58c88: 42a7 clrl %sp@- 58c8a: 2601 movel %d1,%d3 58c8c: 2002 movel %d2,%d0 58c8e: e08b lsrl #8,%d3 58c90: e08a lsrl #8,%d2 58c92: e189 lsll #8,%d1 58c94: e188 lsll #8,%d0 58c96: 2f08 movel %a0,%sp@- 58c98: 2f2b 0010 movel %a3@(16),%sp@- 58c9c: 8283 orl %d3,%d1 58c9e: 8082 orl %d2,%d0
/* increment fat-file size by cluster size */
fat_fd->fat_file_size += fs_info->fat.vol.bpc;
/* set up cluster num for dot entry */
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOT_NODE_P(dot_dotdot)) =
58ca0: 3d41 ff82 movew %d1,%fp@(-126)
CT_LE_W((uint16_t )((fat_fd->cln) & 0x0000FFFF));
*MSDOS_DIR_FIRST_CLUSTER_HI(DOT_NODE_P(dot_dotdot)) =
58ca4: 3d40 ff7c movew %d0,%fp@(-132)
CT_LE_W((uint16_t )(((fat_fd->cln) & 0xFFFF0000) >> 16));
/* rewrite dot entry */
ret = fat_file_write(parent_loc->mt_entry, fat_fd, 0,
58ca8: 4e92 jsr %a2@
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE,
(uint8_t *)DOT_NODE_P(dot_dotdot));
if (ret < 0)
58caa: 4fef 0014 lea %sp@(20),%sp 58cae: 4a80 tstl %d0 58cb0: 6d00 009a bltw 58d4c <msdos_creat_node+0x3d0>
rc = -1;
goto error;
}
/* write first cluster num of a new directory to disk */
rc = msdos_set_first_cluster_num(parent_loc->mt_entry, fat_fd);
58cb4: 2f2e fff8 movel %fp@(-8),%sp@- 58cb8: 2f2b 0010 movel %a3@(16),%sp@- 58cbc: 4eb9 0005 9ef0 jsr 59ef0 <msdos_set_first_cluster_num>
if (rc != RC_OK)
58cc2: 508f addql #8,%sp
rc = -1;
goto error;
}
/* write first cluster num of a new directory to disk */
rc = msdos_set_first_cluster_num(parent_loc->mt_entry, fat_fd);
58cc4: 2400 movel %d0,%d2
if (rc != RC_OK)
58cc6: 6700 009a beqw 58d62 <msdos_creat_node+0x3e6>
fat_file_close(parent_loc->mt_entry, fat_fd);
}
return RC_OK;
error:
fat_file_close(parent_loc->mt_entry, fat_fd);
58cca: 2f2e fff8 movel %fp@(-8),%sp@- <== NOT EXECUTED 58cce: 2f2b 0010 movel %a3@(16),%sp@- <== NOT EXECUTED 58cd2: 4eb9 0005 2fc2 jsr 52fc2 <fat_file_close> <== NOT EXECUTED 58cd8: 508f addql #8,%sp <== NOT EXECUTED
err:
/* mark the used 32bytes structure on the disk as free */
msdos_set_first_char4file_name(parent_loc->mt_entry, &dir_pos, 0xE5);
58cda: 4878 00e5 pea e5 <DBL_MANT_DIG+0xb0> <== NOT EXECUTED 58cde: 486e ffe8 pea %fp@(-24) <== NOT EXECUTED 58ce2: 2f2b 0010 movel %a3@(16),%sp@- <== NOT EXECUTED 58ce6: 4eb9 0005 a0de jsr 5a0de <msdos_set_first_char4file_name> <== NOT EXECUTED
return rc;
58cec: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
}
58cf0: 2002 movel %d2,%d0 <== NOT EXECUTED 58cf2: 4cee 3cfc ff3c moveml %fp@(-196),%d2-%d7/%a2-%a5 <== NOT EXECUTED 58cf8: 4e5e unlk %fp <== NOT EXECUTED 58cfa: 4e75 rts <== NOT EXECUTED
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
58cfc: 4281 clrl %d1 <== NOT EXECUTED 58cfe: 1228 0005 moveb %a0@(5),%d1 <== NOT EXECUTED 58d02: 5580 subql #2,%d0 <== NOT EXECUTED 58d04: e3a8 lsll %d1,%d0 <== NOT EXECUTED 58d06: d0a8 002c addl %a0@(44),%d0 <== NOT EXECUTED 58d0a: 6000 fde6 braw 58af2 <msdos_creat_node+0x176> <== NOT EXECUTED
/*
* here we can ommit FAT32 condition because for all FAT types dirs
* right under root dir should contain 0 in dotdot entry but for
* FAT12/16 parent_fat_fd->cluster_num always contains such value
*/
if ((FAT_FD_OF_ROOT_DIR(parent_fat_fd)) &&
58d0e: 4aa8 0024 tstl %a0@(36) 58d12: 6600 ff0c bnew 58c20 <msdos_creat_node+0x2a4>
(fs_info->fat.vol.type & FAT_FAT32))
58d16: 4280 clrl %d0 58d18: 102d 000a moveb %a5@(10),%d0
/*
* here we can ommit FAT32 condition because for all FAT types dirs
* right under root dir should contain 0 in dotdot entry but for
* FAT12/16 parent_fat_fd->cluster_num always contains such value
*/
if ((FAT_FD_OF_ROOT_DIR(parent_fat_fd)) &&
58d1c: 44c0 movew %d0,%ccr 58d1e: 6600 ff00 bnew 58c20 <msdos_creat_node+0x2a4>
/*
* write dot and dotdot entries to new fat-file: currently fat-file
* correspondes to a new node is zero length, so it will be extended
* by one cluster and entries will be written
*/
ret = fat_file_write(parent_loc->mt_entry, fat_fd, 0,
58d22: 2f05 movel %d5,%sp@- <== NOT EXECUTED 58d24: 4878 0040 pea 40 <DBL_MANT_DIG+0xb> <== NOT EXECUTED 58d28: 45f9 0005 3332 lea 53332 <fat_file_write>,%a2 <== NOT EXECUTED
* FAT12/16 parent_fat_fd->cluster_num always contains such value
*/
if ((FAT_FD_OF_ROOT_DIR(parent_fat_fd)) &&
(fs_info->fat.vol.type & FAT_FAT32))
{
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
58d2e: 4240 clrw %d0 <== NOT EXECUTED
/*
* write dot and dotdot entries to new fat-file: currently fat-file
* correspondes to a new node is zero length, so it will be extended
* by one cluster and entries will be written
*/
ret = fat_file_write(parent_loc->mt_entry, fat_fd, 0,
58d30: 42a7 clrl %sp@- <== NOT EXECUTED
* FAT12/16 parent_fat_fd->cluster_num always contains such value
*/
if ((FAT_FD_OF_ROOT_DIR(parent_fat_fd)) &&
(fs_info->fat.vol.type & FAT_FAT32))
{
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
58d32: 3d40 ffa2 movew %d0,%fp@(-94) <== NOT EXECUTED
/*
* write dot and dotdot entries to new fat-file: currently fat-file
* correspondes to a new node is zero length, so it will be extended
* by one cluster and entries will be written
*/
ret = fat_file_write(parent_loc->mt_entry, fat_fd, 0,
58d36: 2f0c movel %a4,%sp@- <== NOT EXECUTED 58d38: 2f2b 0010 movel %a3@(16),%sp@- <== NOT EXECUTED
*/
if ((FAT_FD_OF_ROOT_DIR(parent_fat_fd)) &&
(fs_info->fat.vol.type & FAT_FAT32))
{
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
58d3c: 3d40 ff9c movew %d0,%fp@(-100) <== NOT EXECUTED
/*
* write dot and dotdot entries to new fat-file: currently fat-file
* correspondes to a new node is zero length, so it will be extended
* by one cluster and entries will be written
*/
ret = fat_file_write(parent_loc->mt_entry, fat_fd, 0,
58d40: 4e92 jsr %a2@ <== NOT EXECUTED
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2,
(uint8_t *)dot_dotdot);
if (ret < 0)
58d42: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 58d46: 4a80 tstl %d0 <== NOT EXECUTED 58d48: 6c00 ff1e bgew 58c68 <msdos_creat_node+0x2ec> <== NOT EXECUTED
fat_file_close(parent_loc->mt_entry, fat_fd);
}
return RC_OK;
error:
fat_file_close(parent_loc->mt_entry, fat_fd);
58d4c: 2f2e fff8 movel %fp@(-8),%sp@- <== NOT EXECUTED
ret = fat_file_write(parent_loc->mt_entry, fat_fd, 0,
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE,
(uint8_t *)DOT_NODE_P(dot_dotdot));
if (ret < 0)
{
rc = -1;
58d50: 74ff moveq #-1,%d2 <== NOT EXECUTED
fat_file_close(parent_loc->mt_entry, fat_fd);
}
return RC_OK;
error:
fat_file_close(parent_loc->mt_entry, fat_fd);
58d52: 2f2b 0010 movel %a3@(16),%sp@- <== NOT EXECUTED 58d56: 4eb9 0005 2fc2 jsr 52fc2 <fat_file_close> <== NOT EXECUTED 58d5c: 508f addql #8,%sp <== NOT EXECUTED 58d5e: 6000 ff7a braw 58cda <msdos_creat_node+0x35e> <== NOT EXECUTED
/* write first cluster num of a new directory to disk */
rc = msdos_set_first_cluster_num(parent_loc->mt_entry, fat_fd);
if (rc != RC_OK)
goto error;
fat_file_close(parent_loc->mt_entry, fat_fd);
58d62: 2f2e fff8 movel %fp@(-8),%sp@- 58d66: 2f2b 0010 movel %a3@(16),%sp@- 58d6a: 4eb9 0005 2fc2 jsr 52fc2 <fat_file_close> 58d70: 508f addql #8,%sp
err:
/* mark the used 32bytes structure on the disk as free */
msdos_set_first_char4file_name(parent_loc->mt_entry, &dir_pos, 0xE5);
return rc;
}
58d72: 2002 movel %d2,%d0 58d74: 4cee 3cfc ff3c moveml %fp@(-196),%d2-%d7/%a2-%a5 58d7a: 4e5e unlk %fp 58d7c: 4e75 rts
ret = _fat_block_read(parent_loc->mt_entry,
sec, byte, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE,
link_node);
if (ret < 0) {
return -1;
58d7e: 74ff moveq #-1,%d2 <== NOT EXECUTED
err:
/* mark the used 32bytes structure on the disk as free */
msdos_set_first_char4file_name(parent_loc->mt_entry, &dir_pos, 0xE5);
return rc;
}
58d80: 2002 movel %d2,%d0 <== NOT EXECUTED 58d82: 4cee 3cfc ff3c moveml %fp@(-196),%d2-%d7/%a2-%a5 <== NOT EXECUTED 58d88: 4e5e unlk %fp <== NOT EXECUTED
0005cbc2 <msdos_date_dos2unix>:
* called from the stat(), and fstat() system calls and so probably need
* not be too efficient.
*/
unsigned int
msdos_date_dos2unix(unsigned int dd, unsigned int dt)
{
5cbc2: 4e56 fff0 linkw %fp,#-16 5cbc6: 48d7 003c moveml %d2-%d5,%sp@ 5cbca: 242e 000c movel %fp@(12),%d2
uint32_t y, year;
uint32_t days;
uint16_t *months;
seconds = 2 * ((dt & MSDOS_DT_2SECONDS_MASK) >> MSDOS_DT_2SECONDS_SHIFT)
+ ((dt & MSDOS_DT_MINUTES_MASK) >> MSDOS_DT_MINUTES_SHIFT) * 60
5cbce: 2202 movel %d2,%d1
+ ((dt & MSDOS_DT_HOURS_MASK) >> MSDOS_DT_HOURS_SHIFT) * 3600;
5cbd0: 2002 movel %d2,%d0 5cbd2: 760b moveq #11,%d3 5cbd4: 2a3c 0000 0708 movel #1800,%d5
uint32_t y, year;
uint32_t days;
uint16_t *months;
seconds = 2 * ((dt & MSDOS_DT_2SECONDS_MASK) >> MSDOS_DT_2SECONDS_SHIFT)
+ ((dt & MSDOS_DT_MINUTES_MASK) >> MSDOS_DT_MINUTES_SHIFT) * 60
5cbda: 0281 0000 07e0 andil #2016,%d1
+ ((dt & MSDOS_DT_HOURS_MASK) >> MSDOS_DT_HOURS_SHIFT) * 3600;
5cbe0: 0280 0000 f800 andil #63488,%d0
* called from the stat(), and fstat() system calls and so probably need
* not be too efficient.
*/
unsigned int
msdos_date_dos2unix(unsigned int dd, unsigned int dt)
{
5cbe6: 282e 0008 movel %fp@(8),%d4
uint32_t y, year;
uint32_t days;
uint16_t *months;
seconds = 2 * ((dt & MSDOS_DT_2SECONDS_MASK) >> MSDOS_DT_2SECONDS_SHIFT)
+ ((dt & MSDOS_DT_MINUTES_MASK) >> MSDOS_DT_MINUTES_SHIFT) * 60
5cbea: ea89 lsrl #5,%d1
+ ((dt & MSDOS_DT_HOURS_MASK) >> MSDOS_DT_HOURS_SHIFT) * 3600;
5cbec: e6a8 lsrl %d3,%d0
uint32_t y, year;
uint32_t days;
uint16_t *months;
seconds = 2 * ((dt & MSDOS_DT_2SECONDS_MASK) >> MSDOS_DT_2SECONDS_SHIFT)
+ ((dt & MSDOS_DT_MINUTES_MASK) >> MSDOS_DT_MINUTES_SHIFT) * 60
5cbee: 2601 movel %d1,%d3
+ ((dt & MSDOS_DT_HOURS_MASK) >> MSDOS_DT_HOURS_SHIFT) * 3600;
5cbf0: 4c05 0800 mulsl %d5,%d0
uint32_t y, year;
uint32_t days;
uint16_t *months;
seconds = 2 * ((dt & MSDOS_DT_2SECONDS_MASK) >> MSDOS_DT_2SECONDS_SHIFT)
+ ((dt & MSDOS_DT_MINUTES_MASK) >> MSDOS_DT_MINUTES_SHIFT) * 60
5cbf4: d683 addl %d3,%d3 5cbf6: eb89 lsll #5,%d1
uint32_t m, month;
uint32_t y, year;
uint32_t days;
uint16_t *months;
seconds = 2 * ((dt & MSDOS_DT_2SECONDS_MASK) >> MSDOS_DT_2SECONDS_SHIFT)
5cbf8: 3a3c 001f movew #31,%d5
+ ((dt & MSDOS_DT_MINUTES_MASK) >> MSDOS_DT_MINUTES_SHIFT) * 60
5cbfc: 9283 subl %d3,%d1
+ ((dt & MSDOS_DT_HOURS_MASK) >> MSDOS_DT_HOURS_SHIFT) * 3600;
5cbfe: d081 addl %d1,%d0
/*
* If the year, month, and day from the last conversion are the
* same then use the saved value.
*/
if (lastdosdate != dd) {
5cc00: 4281 clrl %d1
uint32_t m, month;
uint32_t y, year;
uint32_t days;
uint16_t *months;
seconds = 2 * ((dt & MSDOS_DT_2SECONDS_MASK) >> MSDOS_DT_2SECONDS_SHIFT)
5cc02: c485 andl %d5,%d2
+ ((dt & MSDOS_DT_HOURS_MASK) >> MSDOS_DT_HOURS_SHIFT) * 3600;
/*
* If the year, month, and day from the last conversion are the
* same then use the saved value.
*/
if (lastdosdate != dd) {
5cc04: 3239 0006 fb58 movew 6fb58 <lastdosdate>,%d1
uint32_t days;
uint16_t *months;
seconds = 2 * ((dt & MSDOS_DT_2SECONDS_MASK) >> MSDOS_DT_2SECONDS_SHIFT)
+ ((dt & MSDOS_DT_MINUTES_MASK) >> MSDOS_DT_MINUTES_SHIFT) * 60
+ ((dt & MSDOS_DT_HOURS_MASK) >> MSDOS_DT_HOURS_SHIFT) * 3600;
5cc0a: d082 addl %d2,%d0
uint32_t m, month;
uint32_t y, year;
uint32_t days;
uint16_t *months;
seconds = 2 * ((dt & MSDOS_DT_2SECONDS_MASK) >> MSDOS_DT_2SECONDS_SHIFT)
5cc0c: d080 addl %d0,%d0
+ ((dt & MSDOS_DT_HOURS_MASK) >> MSDOS_DT_HOURS_SHIFT) * 3600;
/*
* If the year, month, and day from the last conversion are the
* same then use the saved value.
*/
if (lastdosdate != dd) {
5cc0e: b881 cmpl %d1,%d4 5cc10: 6700 00a4 beqw 5ccb6 <msdos_date_dos2unix+0xf4>
lastdosdate = dd; days = 0; year = (dd & MSDOS_DD_YEAR_MASK) >> MSDOS_DD_YEAR_SHIFT;
5cc14: 2604 movel %d4,%d3 5cc16: 7209 moveq #9,%d1
for (y = 0; y < year; y++)
5cc18: 91c8 subal %a0,%a0
days += y & 0x03 ? 365 : 366; months = year & 0x03 ? regyear : leapyear;
5cc1a: 43f9 0006 ec10 lea 6ec10 <leapyear>,%a1
* same then use the saved value.
*/
if (lastdosdate != dd) {
lastdosdate = dd;
days = 0;
year = (dd & MSDOS_DD_YEAR_MASK) >> MSDOS_DD_YEAR_SHIFT;
5cc20: 0283 0000 fe00 andil #65024,%d3
/*
* If the year, month, and day from the last conversion are the
* same then use the saved value.
*/
if (lastdosdate != dd) {
lastdosdate = dd;
5cc26: 33c4 0006 fb58 movew %d4,6fb58 <lastdosdate>
days = 0; year = (dd & MSDOS_DD_YEAR_MASK) >> MSDOS_DD_YEAR_SHIFT;
5cc2c: e2ab lsrl %d1,%d3
for (y = 0; y < year; y++)
5cc2e: 673e beqs 5cc6e <msdos_date_dos2unix+0xac> <== NEVER TAKEN
5cc30: 4281 clrl %d1 5cc32: 243c 0000 016e movel #366,%d2
days += y & 0x03 ? 365 : 366;
5cc38: d1c2 addal %d2,%a0
*/
if (lastdosdate != dd) {
lastdosdate = dd;
days = 0;
year = (dd & MSDOS_DD_YEAR_MASK) >> MSDOS_DD_YEAR_SHIFT;
for (y = 0; y < year; y++)
5cc3a: 5281 addql #1,%d1 5cc3c: b681 cmpl %d1,%d3
5cc3e: 671c beqs 5cc5c <msdos_date_dos2unix+0x9a> <== NEVER TAKEN
days += y & 0x03 ? 365 : 366;
5cc40: 7403 moveq #3,%d2 5cc42: 2a3c 0000 016d movel #365,%d5 5cc48: c481 andl %d1,%d2
*/
if (lastdosdate != dd) {
lastdosdate = dd;
days = 0;
year = (dd & MSDOS_DD_YEAR_MASK) >> MSDOS_DD_YEAR_SHIFT;
for (y = 0; y < year; y++)
5cc4a: 5281 addql #1,%d1
days += y & 0x03 ? 365 : 366;
5cc4c: 4a82 tstl %d2 5cc4e: 57c2 seq %d2 5cc50: 49c2 extbl %d2 5cc52: 9a82 subl %d2,%d5 5cc54: 2405 movel %d5,%d2 5cc56: d1c2 addal %d2,%a0
*/
if (lastdosdate != dd) {
lastdosdate = dd;
days = 0;
year = (dd & MSDOS_DD_YEAR_MASK) >> MSDOS_DD_YEAR_SHIFT;
for (y = 0; y < year; y++)
5cc58: b681 cmpl %d1,%d3
5cc5a: 66e4 bnes 5cc40 <msdos_date_dos2unix+0x7e> days += y & 0x03 ? 365 : 366; months = year & 0x03 ? regyear : leapyear;
5cc5c: 7403 moveq #3,%d2 5cc5e: 43f9 0006 ec10 lea 6ec10 <leapyear>,%a1 5cc64: c282 andl %d2,%d1
5cc66: 6706 beqs 5cc6e <msdos_date_dos2unix+0xac> <== ALWAYS TAKEN
5cc68: 43f9 0006 ebf8 lea 6ebf8 <regyear>,%a1 <== NOT EXECUTED
/* * Prevent going from 0 to 0xffffffff in the following * loop. */ month = (dd & MSDOS_DD_MONTH_MASK) >> MSDOS_DD_MONTH_SHIFT;
5cc6e: 2604 movel %d4,%d3 5cc70: 0283 0000 01e0 andil #480,%d3 5cc76: ea8b lsrl #5,%d3
if (month == 0) {
5cc78: 6712 beqs 5cc8c <msdos_date_dos2unix+0xca> <== NEVER TAKEN
month = 1; } for (m = 0; m < month - 1; m++)
5cc7a: 5383 subql #1,%d3
5cc7c: 670e beqs 5cc8c <msdos_date_dos2unix+0xca> <== ALWAYS TAKEN
5cc7e: 4281 clrl %d1 <== NOT EXECUTED
days += months[m];
5cc80: 4282 clrl %d2 <== NOT EXECUTED
*/
month = (dd & MSDOS_DD_MONTH_MASK) >> MSDOS_DD_MONTH_SHIFT;
if (month == 0) {
month = 1;
}
for (m = 0; m < month - 1; m++)
5cc82: 5281 addql #1,%d1 <== NOT EXECUTED
days += months[m];
5cc84: 3419 movew %a1@+,%d2 <== NOT EXECUTED 5cc86: d1c2 addal %d2,%a0 <== NOT EXECUTED
*/
month = (dd & MSDOS_DD_MONTH_MASK) >> MSDOS_DD_MONTH_SHIFT;
if (month == 0) {
month = 1;
}
for (m = 0; m < month - 1; m++)
5cc88: b681 cmpl %d1,%d3 <== NOT EXECUTED 5cc8a: 62f4 bhis 5cc80 <msdos_date_dos2unix+0xbe> <== NOT EXECUTED
days += months[m]; days += ((dd & MSDOS_DD_DAY_MASK) >> MSDOS_DD_DAY_SHIFT) - 1;
5cc8c: 761f moveq #31,%d3
lastseconds = (days + DAYSTO1980) * SECONDSPERDAY;
5cc8e: 2a3c 0001 5180 movel #86400,%d5
if (month == 0) {
month = 1;
}
for (m = 0; m < month - 1; m++)
days += months[m];
days += ((dd & MSDOS_DD_DAY_MASK) >> MSDOS_DD_DAY_SHIFT) - 1;
5cc94: c883 andl %d3,%d4 5cc96: 41f0 48ff lea %a0@(ffffffff,%d4:l),%a0 5cc9a: 2208 movel %a0,%d1
lastseconds = (days + DAYSTO1980) * SECONDSPERDAY;
5cc9c: 4c05 1800 mulsl %d5,%d1
} return seconds + lastseconds; }
5cca0: 4cd7 003c moveml %sp@,%d2-%d5 5cca4: 4e5e unlk %fp
month = 1; } for (m = 0; m < month - 1; m++) days += months[m]; days += ((dd & MSDOS_DD_DAY_MASK) >> MSDOS_DD_DAY_SHIFT) - 1; lastseconds = (days + DAYSTO1980) * SECONDSPERDAY;
5cca6: 0681 12ce a600 addil #315532800,%d1
} return seconds + lastseconds; }
5ccac: d081 addl %d1,%d0
month = 1; } for (m = 0; m < month - 1; m++) days += months[m]; days += ((dd & MSDOS_DD_DAY_MASK) >> MSDOS_DD_DAY_SHIFT) - 1; lastseconds = (days + DAYSTO1980) * SECONDSPERDAY;
5ccae: 23c1 0006 fb5a movel %d1,6fb5a <lastseconds>
} return seconds + lastseconds; }
5ccb4: 4e75 rts
+ ((dt & MSDOS_DT_HOURS_MASK) >> MSDOS_DT_HOURS_SHIFT) * 3600;
/*
* If the year, month, and day from the last conversion are the
* same then use the saved value.
*/
if (lastdosdate != dd) {
5ccb6: 2239 0006 fb5a movel 6fb5a <lastseconds>,%d1
days += months[m]; days += ((dd & MSDOS_DD_DAY_MASK) >> MSDOS_DD_DAY_SHIFT) - 1; lastseconds = (days + DAYSTO1980) * SECONDSPERDAY; } return seconds + lastseconds; }
5ccbc: d081 addl %d1,%d0 5ccbe: 4cd7 003c moveml %sp@,%d2-%d5
5ccc2: 4e5e unlk %fp <== NOT EXECUTED
0005ca78 <msdos_date_unix2dos>:
* file timestamps. The passed in unix time is assumed to be in GMT.
*/
void
msdos_date_unix2dos(unsigned int t, uint16_t *ddp,
uint16_t *dtp)
{
5ca78: 4e56 fff0 linkw %fp,#-16 5ca7c: 202e 0008 movel %fp@(8),%d0 5ca80: 48d7 003c moveml %d2-%d5,%sp@
/*
* If the time from the last conversion is the same as now, then
* skip the computations and use the saved result.
*/
if (lasttime != t) {
5ca84: b0b9 0006 fb4c cmpl 6fb4c <lasttime>,%d0 5ca8a: 6700 00fc beqw 5cb88 <msdos_date_unix2dos+0x110>
lasttime = t; lastdtime = (((t % 60) >> 1) << MSDOS_DT_2SECONDS_SHIFT) + (((t / 60) % 60) << MSDOS_DT_MINUTES_SHIFT)
5ca8e: 2800 movel %d0,%d4 5ca90: 723c moveq #60,%d1
+ (((t / 3600) % 24) << MSDOS_DT_HOURS_SHIFT);
5ca92: 2600 movel %d0,%d3 5ca94: 243c 0000 0e10 movel #3600,%d2
* skip the computations and use the saved result.
*/
if (lasttime != t) {
lasttime = t;
lastdtime = (((t % 60) >> 1) << MSDOS_DT_2SECONDS_SHIFT)
+ (((t / 60) % 60) << MSDOS_DT_MINUTES_SHIFT)
5ca9a: 4c41 4005 remul %d1,%d5,%d4 5ca9e: 4c41 4004 remul %d1,%d4,%d4
+ (((t / 3600) % 24) << MSDOS_DT_HOURS_SHIFT);
5caa2: 4c42 3003 remul %d2,%d3,%d3
/*
* If the time from the last conversion is the same as now, then
* skip the computations and use the saved result.
*/
if (lasttime != t) {
lasttime = t;
5caa6: 23c0 0006 fb4c movel %d0,6fb4c <lasttime>
lastdtime = (((t % 60) >> 1) << MSDOS_DT_2SECONDS_SHIFT) + (((t / 60) % 60) << MSDOS_DT_MINUTES_SHIFT)
5caac: 723c moveq #60,%d1
* If the time from the last conversion is the same as now, then
* skip the computations and use the saved result.
*/
if (lasttime != t) {
lasttime = t;
lastdtime = (((t % 60) >> 1) << MSDOS_DT_2SECONDS_SHIFT)
5caae: e28d lsrl #1,%d5
+ (((t / 60) % 60) << MSDOS_DT_MINUTES_SHIFT)
5cab0: 4c41 4002 remul %d1,%d2,%d4
+ (((t / 3600) % 24) << MSDOS_DT_HOURS_SHIFT);
5cab4: 7818 moveq #24,%d4 5cab6: 4c44 3001 remul %d4,%d1,%d3
* If the time from the last conversion is the same as now, then
* skip the computations and use the saved result.
*/
if (lasttime != t) {
lasttime = t;
lastdtime = (((t % 60) >> 1) << MSDOS_DT_2SECONDS_SHIFT)
5caba: eb8a lsll #5,%d2 5cabc: 760b moveq #11,%d3
/* * If the number of days since 1970 is the same as the last * time we did the computation then skip all this leap year * and month stuff. */ days = t / (SECONDSPERDAY);
5cabe: 283c 0001 5180 movel #86400,%d4
* If the time from the last conversion is the same as now, then
* skip the computations and use the saved result.
*/
if (lasttime != t) {
lasttime = t;
lastdtime = (((t % 60) >> 1) << MSDOS_DT_2SECONDS_SHIFT)
5cac4: e7a9 lsll %d3,%d1
/* * If the number of days since 1970 is the same as the last * time we did the computation then skip all this leap year * and month stuff. */ days = t / (SECONDSPERDAY);
5cac6: 4c44 0000 remul %d4,%d0,%d0
* If the time from the last conversion is the same as now, then
* skip the computations and use the saved result.
*/
if (lasttime != t) {
lasttime = t;
lastdtime = (((t % 60) >> 1) << MSDOS_DT_2SECONDS_SHIFT)
5caca: d282 addl %d2,%d1 5cacc: d285 addl %d5,%d1
/* * If the number of days since 1970 is the same as the last * time we did the computation then skip all this leap year * and month stuff. */ days = t / (SECONDSPERDAY);
5cace: 2040 moveal %d0,%a0
* If the time from the last conversion is the same as now, then
* skip the computations and use the saved result.
*/
if (lasttime != t) {
lasttime = t;
lastdtime = (((t % 60) >> 1) << MSDOS_DT_2SECONDS_SHIFT)
5cad0: 3601 movew %d1,%d3 5cad2: 33c1 0006 fb50 movew %d1,6fb50 <lastdtime>
* If the number of days since 1970 is the same as the last
* time we did the computation then skip all this leap year
* and month stuff.
*/
days = t / (SECONDSPERDAY);
if (days != lastday) {
5cad8: b0b9 0006 fb52 cmpl 6fb52 <lastday>,%d0 5cade: 6700 00c8 beqw 5cba8 <msdos_date_unix2dos+0x130>
lastday = days;
for (year = 1970;; year++) {
5cae2: 223c 0000 07b2 movel #1970,%d1
inc = year & 0x03 ? 365 : 366;
5cae8: 7403 moveq #3,%d2 5caea: 283c 0000 016d movel #365,%d4 5caf0: c481 andl %d1,%d2
* time we did the computation then skip all this leap year
* and month stuff.
*/
days = t / (SECONDSPERDAY);
if (days != lastday) {
lastday = days;
5caf2: 23c0 0006 fb52 movel %d0,6fb52 <lastday>
for (year = 1970;; year++) {
inc = year & 0x03 ? 365 : 366;
5caf8: 4a82 tstl %d2 5cafa: 57c0 seq %d0 5cafc: 49c0 extbl %d0 5cafe: 9880 subl %d0,%d4
if (days < inc)
5cb00: b888 cmpl %a0,%d4
5cb02: 6218 bhis 5cb1c <msdos_date_unix2dos+0xa4> <== NEVER TAKEN
* and month stuff.
*/
days = t / (SECONDSPERDAY);
if (days != lastday) {
lastday = days;
for (year = 1970;; year++) {
5cb04: 5281 addql #1,%d1
inc = year & 0x03 ? 365 : 366;
5cb06: 7403 moveq #3,%d2
if (days < inc) break; days -= inc;
5cb08: 91c4 subal %d4,%a0
*/
days = t / (SECONDSPERDAY);
if (days != lastday) {
lastday = days;
for (year = 1970;; year++) {
inc = year & 0x03 ? 365 : 366;
5cb0a: 283c 0000 016d movel #365,%d4 5cb10: c481 andl %d1,%d2 5cb12: 57c0 seq %d0 5cb14: 49c0 extbl %d0 5cb16: 9880 subl %d0,%d4
if (days < inc)
5cb18: b888 cmpl %a0,%d4
5cb1a: 63e8 blss 5cb04 <msdos_date_unix2dos+0x8c> break; days -= inc; } months = year & 0x03 ? regyear : leapyear;
5cb1c: 43f9 0006 ec10 lea 6ec10 <leapyear>,%a1 5cb22: 4a82 tstl %d2
5cb24: 6706 beqs 5cb2c <msdos_date_unix2dos+0xb4> <== ALWAYS TAKEN
5cb26: 43f9 0006 ebf8 lea 6ebf8 <regyear>,%a1 <== NOT EXECUTED
for (month = 0; month < 12; month++) {
5cb2c: 4280 clrl %d0
if (days < months[month])
5cb2e: 4282 clrl %d2 5cb30: 3419 movew %a1@+,%d2 5cb32: b1c2 cmpal %d2,%a0
5cb34: 654a bcss 5cb80 <msdos_date_unix2dos+0x108> <== ALWAYS TAKEN
break; days -= months[month];
5cb36: 91c2 subal %d2,%a0 <== NOT EXECUTED
if (days < inc)
break;
days -= inc;
}
months = year & 0x03 ? regyear : leapyear;
for (month = 0; month < 12; month++) {
5cb38: 5280 addql #1,%d0 <== NOT EXECUTED 5cb3a: 740c moveq #12,%d2 <== NOT EXECUTED 5cb3c: b480 cmpl %d0,%d2 <== NOT EXECUTED 5cb3e: 66ee bnes 5cb2e <msdos_date_unix2dos+0xb6> <== NOT EXECUTED 5cb40: 327c 01a0 moveaw #416,%a1 <== NOT EXECUTED
if (days < months[month]) break; days -= months[month]; } lastddate = ((days + 1) << MSDOS_DD_DAY_SHIFT)
5cb44: 41f0 9801 lea %a0@(00000001,%a1:l),%a0 5cb48: 33c8 0006 fb56 movew %a0,6fb56 <lastddate> 5cb4e: 3008 movew %a0,%d0
* Remember dos's idea of time is relative to 1980. * unix's is relative to 1970. If somehow we get a * time before 1980 then don't give totally crazy * results. */ if (year > 1980)
5cb50: 0c81 0000 07bc cmpil #1980,%d1
5cb56: 6314 blss 5cb6c <msdos_date_unix2dos+0xf4> <== NEVER TAKEN
lastddate += (year - 1980) <<
5cb58: 0681 ffff f844 addil #-1980,%d1 5cb5e: 7809 moveq #9,%d4 5cb60: e9a9 lsll %d4,%d1 5cb62: d288 addl %a0,%d1 5cb64: 3001 movew %d1,%d0 5cb66: 33c1 0006 fb56 movew %d1,6fb56 <lastddate>
MSDOS_DD_YEAR_SHIFT; } } *dtp = lastdtime;
5cb6c: 206e 0010 moveal %fp@(16),%a0 5cb70: 3083 movew %d3,%a0@
*ddp = lastddate;
5cb72: 206e 000c moveal %fp@(12),%a0
}
5cb76: 4cd7 003c moveml %sp@,%d2-%d5
lastddate += (year - 1980) << MSDOS_DD_YEAR_SHIFT; } } *dtp = lastdtime; *ddp = lastddate;
5cb7a: 3080 movew %d0,%a0@
}
5cb7c: 4e5e unlk %fp 5cb7e: 4e75 rts
break;
days -= inc;
}
months = year & 0x03 ? regyear : leapyear;
for (month = 0; month < 12; month++) {
if (days < months[month])
5cb80: 5280 addql #1,%d0 5cb82: eb88 lsll #5,%d0 5cb84: 2240 moveal %d0,%a1 5cb86: 60bc bras 5cb44 <msdos_date_unix2dos+0xcc>
if (year > 1980) lastddate += (year - 1980) << MSDOS_DD_YEAR_SHIFT; } } *dtp = lastdtime;
5cb88: 206e 0010 moveal %fp@(16),%a0
/*
* If the time from the last conversion is the same as now, then
* skip the computations and use the saved result.
*/
if (lasttime != t) {
5cb8c: 3639 0006 fb50 movew 6fb50 <lastdtime>,%d3 5cb92: 3039 0006 fb56 movew 6fb56 <lastddate>,%d0
if (year > 1980) lastddate += (year - 1980) << MSDOS_DD_YEAR_SHIFT; } } *dtp = lastdtime;
5cb98: 3083 movew %d3,%a0@
*ddp = lastddate;
5cb9a: 206e 000c moveal %fp@(12),%a0
}
5cb9e: 4cd7 003c moveml %sp@,%d2-%d5
lastddate += (year - 1980) << MSDOS_DD_YEAR_SHIFT; } } *dtp = lastdtime; *ddp = lastddate;
5cba2: 3080 movew %d0,%a0@
}
5cba4: 4e5e unlk %fp 5cba6: 4e75 rts
if (year > 1980) lastddate += (year - 1980) << MSDOS_DD_YEAR_SHIFT; } } *dtp = lastdtime;
5cba8: 206e 0010 moveal %fp@(16),%a0 <== NOT EXECUTED 5cbac: 3083 movew %d3,%a0@ <== NOT EXECUTED
*ddp = lastddate;
5cbae: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED
* If the number of days since 1970 is the same as the last
* time we did the computation then skip all this leap year
* and month stuff.
*/
days = t / (SECONDSPERDAY);
if (days != lastday) {
5cbb2: 3039 0006 fb56 movew 6fb56 <lastddate>,%d0 <== NOT EXECUTED
MSDOS_DD_YEAR_SHIFT; } } *dtp = lastdtime; *ddp = lastddate; }
5cbb8: 4cd7 003c moveml %sp@,%d2-%d5 <== NOT EXECUTED 5cbbc: 4e5e unlk %fp <== NOT EXECUTED
lastddate += (year - 1980) << MSDOS_DD_YEAR_SHIFT; } } *dtp = lastdtime; *ddp = lastddate;
5cbbe: 3080 movew %d0,%a0@ <== NOT EXECUTED
}
0005d700 <msdos_dir_chmod>:
int
msdos_dir_chmod(rtems_filesystem_location_info_t *pathloc,
mode_t mode)
{
return RC_OK;
}
5d700: 4280 clrl %d0 <== NOT EXECUTED
* RC_OK always
*/
int
msdos_dir_chmod(rtems_filesystem_location_info_t *pathloc,
mode_t mode)
{
5d702: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
return RC_OK; }
5d706: 4e5e unlk %fp <== NOT EXECUTED
0005ceea <msdos_dir_close>:
* RC_OK, if directory closed successfully, or -1 if error occured (errno
* set apropriately.
*/
int
msdos_dir_close(rtems_libio_t *iop)
{
5ceea: 4e56 fff4 linkw %fp,#-12 5ceee: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 5cef2: 246e 0008 moveal %fp@(8),%a2
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
5cef6: 206a 0028 moveal %a2@(40),%a0 5cefa: 2668 0034 moveal %a0@(52),%a3
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
5cefe: 42a7 clrl %sp@-
msdos_dir_close(rtems_libio_t *iop)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
5cf00: 242a 0018 movel %a2@(24),%d2
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
5cf04: 42a7 clrl %sp@- 5cf06: 2f2b 0088 movel %a3@(136),%sp@- 5cf0a: 4eb9 0004 af20 jsr 4af20 <rtems_semaphore_obtain>
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
5cf10: 4fef 000c lea %sp@(12),%sp 5cf14: 4a80 tstl %d0
5cf16: 6628 bnes 5cf40 <msdos_dir_close+0x56> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EIO );
rc = fat_file_close(iop->pathinfo.mt_entry, fat_fd);
5cf18: 2f02 movel %d2,%sp@- 5cf1a: 2f2a 0028 movel %a2@(40),%sp@- 5cf1e: 4eb9 0005 2fc2 jsr 52fc2 <fat_file_close>
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
rtems_semaphore_release(fs_info->vol_sema);
5cf24: 588f addql #4,%sp
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one( EIO );
rc = fat_file_close(iop->pathinfo.mt_entry, fat_fd);
5cf26: 2440 moveal %d0,%a2
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
rtems_semaphore_release(fs_info->vol_sema);
5cf28: 2eab 0088 movel %a3@(136),%sp@ 5cf2c: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release>
return RC_OK;
5cf32: 588f addql #4,%sp
}
5cf34: 200a movel %a2,%d0 5cf36: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 5cf3c: 4e5e unlk %fp 5cf3e: 4e75 rts
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one( EIO );
5cf40: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 5cf46: 347c ffff moveaw #-1,%a2 <== NOT EXECUTED 5cf4a: 2040 moveal %d0,%a0 <== NOT EXECUTED
return rc;
}
rtems_semaphore_release(fs_info->vol_sema);
return RC_OK;
}
5cf4c: 200a movel %a2,%d0 <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one( EIO );
5cf4e: 7205 moveq #5,%d1 <== NOT EXECUTED
return rc;
}
rtems_semaphore_release(fs_info->vol_sema);
return RC_OK;
}
5cf50: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one( EIO );
5cf56: 2081 movel %d1,%a0@ <== NOT EXECUTED
return rc;
}
rtems_semaphore_release(fs_info->vol_sema);
return RC_OK;
}
5cf58: 4e5e unlk %fp <== NOT EXECUTED
0005a29c <msdos_dir_is_empty>:
msdos_dir_is_empty(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd,
bool *ret_val
)
{
5a29c: 4e56 ffd8 linkw %fp,#-40 <== NOT EXECUTED 5a2a0: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED 5a2a4: 2a6e 0008 moveal %fp@(8),%a5 <== NOT EXECUTED 5a2a8: 4284 clrl %d4 <== NOT EXECUTED
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t j = 0, i = 0;
5a2aa: 4286 clrl %d6 <== NOT EXECUTED
*/
if (((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
MSDOS_THIS_DIR_ENTRY_EMPTY) ||
((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_LFN_MASK) ==
MSDOS_ATTR_LFN) ||
(strncmp(MSDOS_DIR_NAME((entry)), MSDOS_DOT_NAME,
5a2ac: 47f9 0005 f0a0 lea 5f0a0 <strncmp>,%a3 <== NOT EXECUTED
fat_file_fd_t *fat_fd,
bool *ret_val
)
{
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
5a2b2: 286d 0034 moveal %a5@(52),%a4 <== NOT EXECUTED
msdos_dir_is_empty(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd,
bool *ret_val
)
{
5a2b6: 2e2e 0010 movel %fp@(16),%d7 <== NOT EXECUTED
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t j = 0, i = 0;
/* dir is not empty */
*ret_val = false;
5a2ba: 2047 moveal %d7,%a0 <== NOT EXECUTED 5a2bc: 2a2c 008c movel %a4@(140),%d5 <== NOT EXECUTED 5a2c0: 3814 movew %a4@,%d4 <== NOT EXECUTED 5a2c2: 4210 clrb %a0@ <== NOT EXECUTED
while ((ret = fat_file_read(mt_entry, fat_fd, j * fs_info->fat.vol.bps,
5a2c4: 2f05 movel %d5,%sp@- <== NOT EXECUTED 5a2c6: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5a2c8: 4c06 4800 mulsl %d6,%d4 <== NOT EXECUTED 5a2cc: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5a2ce: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 5a2d2: 2f0d movel %a5,%sp@- <== NOT EXECUTED 5a2d4: 4eb9 0005 2c74 jsr 52c74 <fat_file_read> <== NOT EXECUTED 5a2da: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 5a2de: 4a80 tstl %d0 <== NOT EXECUTED 5a2e0: 6770 beqs 5a352 <msdos_dir_is_empty+0xb6> <== NOT EXECUTED
fs_info->fat.vol.bps,
fs_info->cl_buf)) != FAT_EOF)
{
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
5a2e2: 721f moveq #31,%d1 <== NOT EXECUTED 5a2e4: b280 cmpl %d0,%d1 <== NOT EXECUTED 5a2e6: 6c00 0098 bgew 5a380 <msdos_dir_is_empty+0xe4> <== NOT EXECUTED
return -1;
assert(ret == fs_info->fat.vol.bps);
5a2ea: 4284 clrl %d4 <== NOT EXECUTED 5a2ec: 3814 movew %a4@,%d4 <== NOT EXECUTED 5a2ee: b084 cmpl %d4,%d0 <== NOT EXECUTED 5a2f0: 6600 009a bnew 5a38c <msdos_dir_is_empty+0xf0> <== NOT EXECUTED
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (i = 0;
5a2f4: 4a84 tstl %d4 <== NOT EXECUTED 5a2f6: 677e beqs 5a376 <msdos_dir_is_empty+0xda> <== NOT EXECUTED
fs_info->cl_buf)) != FAT_EOF)
{
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
return -1;
assert(ret == fs_info->fat.vol.bps);
5a2f8: 2a2c 008c movel %a4@(140),%d5 <== NOT EXECUTED
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (i = 0;
5a2fc: 4282 clrl %d2 <== NOT EXECUTED
fs_info->cl_buf)) != FAT_EOF)
{
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
return -1;
assert(ret == fs_info->fat.vol.bps);
5a2fe: 2445 moveal %d5,%a2 <== NOT EXECUTED
* then consider it as empty.
*
* Just ignore long file name entries. They must have a short entry to
* be valid.
*/
if (((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
5a300: 4280 clrl %d0 <== NOT EXECUTED 5a302: 1612 moveb %a2@,%d3 <== NOT EXECUTED 5a304: 1003 moveb %d3,%d0 <== NOT EXECUTED 5a306: 0c80 0000 00e5 cmpil #229,%d0 <== NOT EXECUTED 5a30c: 6754 beqs 5a362 <msdos_dir_is_empty+0xc6> <== NOT EXECUTED
MSDOS_THIS_DIR_ENTRY_EMPTY) ||
((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_LFN_MASK) ==
5a30e: 4280 clrl %d0 <== NOT EXECUTED 5a310: 102a 000b moveb %a2@(11),%d0 <== NOT EXECUTED 5a314: 723f moveq #63,%d1 <== NOT EXECUTED 5a316: c081 andl %d1,%d0 <== NOT EXECUTED
*
* Just ignore long file name entries. They must have a short entry to
* be valid.
*/
if (((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
MSDOS_THIS_DIR_ENTRY_EMPTY) ||
5a318: 123c 000f moveb #15,%d1 <== NOT EXECUTED 5a31c: b280 cmpl %d0,%d1 <== NOT EXECUTED 5a31e: 6742 beqs 5a362 <msdos_dir_is_empty+0xc6> <== NOT EXECUTED
((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_LFN_MASK) ==
MSDOS_ATTR_LFN) ||
(strncmp(MSDOS_DIR_NAME((entry)), MSDOS_DOT_NAME,
5a320: 4878 000b pea b <LASTO+0x1> <== NOT EXECUTED 5a324: 4879 0006 dda1 pea 6dda1 <msdos_file_handlers+0xb7> <== NOT EXECUTED 5a32a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5a32c: 4e93 jsr %a3@ <== NOT EXECUTED 5a32e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
* be valid.
*/
if (((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
MSDOS_THIS_DIR_ENTRY_EMPTY) ||
((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_LFN_MASK) ==
MSDOS_ATTR_LFN) ||
5a332: 4a80 tstl %d0 <== NOT EXECUTED 5a334: 672c beqs 5a362 <msdos_dir_is_empty+0xc6> <== NOT EXECUTED
(strncmp(MSDOS_DIR_NAME((entry)), MSDOS_DOT_NAME,
MSDOS_SHORT_NAME_LEN) == 0) ||
(strncmp(MSDOS_DIR_NAME((entry)),
5a336: 4878 000b pea b <LASTO+0x1> <== NOT EXECUTED 5a33a: 4879 0006 ddad pea 6ddad <msdos_file_handlers+0xc3> <== NOT EXECUTED 5a340: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5a342: 4e93 jsr %a3@ <== NOT EXECUTED 5a344: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
if (((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
MSDOS_THIS_DIR_ENTRY_EMPTY) ||
((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_LFN_MASK) ==
MSDOS_ATTR_LFN) ||
(strncmp(MSDOS_DIR_NAME((entry)), MSDOS_DOT_NAME,
MSDOS_SHORT_NAME_LEN) == 0) ||
5a348: 4a80 tstl %d0 <== NOT EXECUTED 5a34a: 6716 beqs 5a362 <msdos_dir_is_empty+0xc6> <== NOT EXECUTED
*/
if ((*MSDOS_DIR_NAME(entry)) ==
MSDOS_THIS_DIR_ENTRY_AND_REST_EMPTY)
{
*ret_val = true;
return RC_OK;
5a34c: 4280 clrl %d0 <== NOT EXECUTED
continue;
/*
* Nothing more to look at.
*/
if ((*MSDOS_DIR_NAME(entry)) ==
5a34e: 4a03 tstb %d3 <== NOT EXECUTED 5a350: 6606 bnes 5a358 <msdos_dir_is_empty+0xbc> <== NOT EXECUTED
*/
return RC_OK;
}
j++;
}
*ret_val = true;
5a352: 2047 moveal %d7,%a0 <== NOT EXECUTED 5a354: 10bc 0001 moveb #1,%a0@ <== NOT EXECUTED
return RC_OK;
}
5a358: 4cee 3cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5a35e: 4e5e unlk %fp <== NOT EXECUTED 5a360: 4e75 rts <== NOT EXECUTED
assert(ret == fs_info->fat.vol.bps);
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (i = 0;
i < fs_info->fat.vol.bps;
i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
5a362: 0682 0000 0020 addil #32,%d2 <== NOT EXECUTED 5a368: 45ea 0020 lea %a2@(32),%a2 <== NOT EXECUTED
return -1;
assert(ret == fs_info->fat.vol.bps);
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (i = 0;
5a36c: b882 cmpl %d2,%d4 <== NOT EXECUTED 5a36e: 6290 bhis 5a300 <msdos_dir_is_empty+0x64> <== NOT EXECUTED
/*
* Short file name entries mean not empty.
*/
return RC_OK;
}
j++;
5a370: 5286 addql #1,%d6 <== NOT EXECUTED 5a372: 6000 ff50 braw 5a2c4 <msdos_dir_is_empty+0x28> <== NOT EXECUTED
*/
if ((*MSDOS_DIR_NAME(entry)) ==
MSDOS_THIS_DIR_ENTRY_AND_REST_EMPTY)
{
*ret_val = true;
return RC_OK;
5a376: 2a2c 008c movel %a4@(140),%d5 <== NOT EXECUTED
/*
* Short file name entries mean not empty.
*/
return RC_OK;
}
j++;
5a37a: 5286 addql #1,%d6 <== NOT EXECUTED 5a37c: 6000 ff46 braw 5a2c4 <msdos_dir_is_empty+0x28> <== NOT EXECUTED
while ((ret = fat_file_read(mt_entry, fat_fd, j * fs_info->fat.vol.bps,
fs_info->fat.vol.bps,
fs_info->cl_buf)) != FAT_EOF)
{
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
return -1;
5a380: 70ff moveq #-1,%d0 <== NOT EXECUTED
}
j++;
}
*ret_val = true;
return RC_OK;
}
5a382: 4cee 3cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5a388: 4e5e unlk %fp <== NOT EXECUTED 5a38a: 4e75 rts <== NOT EXECUTED
fs_info->cl_buf)) != FAT_EOF)
{
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
return -1;
assert(ret == fs_info->fat.vol.bps);
5a38c: 4879 0006 dd3b pea 6dd3b <msdos_file_handlers+0x51> <== NOT EXECUTED 5a392: 4879 0006 dddc pea 6dddc <__FUNCTION__.7100> <== NOT EXECUTED 5a398: 4878 03b5 pea 3b5 <DBL_MANT_DIG+0x380> <== NOT EXECUTED 5a39c: 4879 0006 dd57 pea 6dd57 <msdos_file_handlers+0x6d> <== NOT EXECUTED 5a3a2: 4eb9 0005 5c24 jsr 55c24 <__assert_func> <== NOT EXECUTED
0005d5b8 <msdos_dir_lseek>:
* set apropriately).
*/
rtems_off64_t
msdos_dir_lseek(rtems_libio_t *iop, rtems_off64_t offset, int whence)
{
switch (whence)
5d5b8: 7001 moveq #1,%d0 <== NOT EXECUTED
* RC_OK on success, or -1 if error occured (errno
* set apropriately).
*/
rtems_off64_t
msdos_dir_lseek(rtems_libio_t *iop, rtems_off64_t offset, int whence)
{
5d5ba: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
switch (whence)
5d5be: b0ae 0014 cmpl %fp@(20),%d0 <== NOT EXECUTED 5d5c2: 6414 bccs 5d5d8 <msdos_dir_lseek+0x20> <== NOT EXECUTED
* Movement past the end of the directory via lseek is not a
* permitted operation
*/
case SEEK_END:
default:
rtems_set_errno_and_return_minus_one( EINVAL );
5d5c4: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED
break;
}
return RC_OK;
}
5d5ca: 4e5e unlk %fp <== NOT EXECUTED
* Movement past the end of the directory via lseek is not a
* permitted operation
*/
case SEEK_END:
default:
rtems_set_errno_and_return_minus_one( EINVAL );
5d5cc: 2040 moveal %d0,%a0 <== NOT EXECUTED 5d5ce: 7016 moveq #22,%d0 <== NOT EXECUTED 5d5d0: 2080 movel %d0,%a0@ <== NOT EXECUTED 5d5d2: 70ff moveq #-1,%d0 <== NOT EXECUTED 5d5d4: 72ff moveq #-1,%d1 <== NOT EXECUTED
break;
}
return RC_OK;
}
5d5d6: 4e75 rts <== NOT EXECUTED 5d5d8: 4e5e unlk %fp <== NOT EXECUTED
case SEEK_END:
default:
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return RC_OK;
5d5da: 4280 clrl %d0 <== NOT EXECUTED 5d5dc: 4281 clrl %d1 <== NOT EXECUTED
}
0005ce58 <msdos_dir_open>:
* set apropriately)
*/
int
msdos_dir_open(rtems_libio_t *iop, const char *pathname, uint32_t flag,
uint32_t mode)
{
5ce58: 4e56 fff4 linkw %fp,#-12 5ce5c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 5ce60: 246e 0008 moveal %fp@(8),%a2
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
5ce64: 206a 0028 moveal %a2@(40),%a0 5ce68: 2668 0034 moveal %a0@(52),%a3
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
5ce6c: 42a7 clrl %sp@-
uint32_t mode)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
5ce6e: 242a 0018 movel %a2@(24),%d2
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
5ce72: 42a7 clrl %sp@- 5ce74: 2f2b 0088 movel %a3@(136),%sp@- 5ce78: 4eb9 0004 af20 jsr 4af20 <rtems_semaphore_obtain>
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
5ce7e: 4fef 000c lea %sp@(12),%sp 5ce82: 4a80 tstl %d0
5ce84: 664a bnes 5ced0 <msdos_dir_open+0x78> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EIO );
rc = fat_file_reopen(fat_fd);
5ce86: 2f02 movel %d2,%sp@- 5ce88: 4eb9 0005 2c62 jsr 52c62 <fat_file_reopen>
if (rc != RC_OK)
5ce8e: 588f addql #4,%sp
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one( EIO );
rc = fat_file_reopen(fat_fd);
5ce90: 2400 movel %d0,%d2
if (rc != RC_OK)
5ce92: 6624 bnes 5ceb8 <msdos_dir_open+0x60> <== NEVER TAKEN
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
iop->offset = 0;
rtems_semaphore_release(fs_info->vol_sema);
5ce94: 2f2b 0088 movel %a3@(136),%sp@-
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
iop->offset = 0;
5ce98: 4280 clrl %d0 5ce9a: 4281 clrl %d1 5ce9c: 2540 000c movel %d0,%a2@(12) 5cea0: 2541 0010 movel %d1,%a2@(16)
rtems_semaphore_release(fs_info->vol_sema);
5cea4: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release>
return RC_OK;
5ceaa: 588f addql #4,%sp
}
5ceac: 2002 movel %d2,%d0 5ceae: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 5ceb4: 4e5e unlk %fp 5ceb6: 4e75 rts
rtems_set_errno_and_return_minus_one( EIO );
rc = fat_file_reopen(fat_fd);
if (rc != RC_OK)
{
rtems_semaphore_release(fs_info->vol_sema);
5ceb8: 2f2b 0088 movel %a3@(136),%sp@- <== NOT EXECUTED 5cebc: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
return rc;
5cec2: 588f addql #4,%sp <== NOT EXECUTED
}
iop->offset = 0;
rtems_semaphore_release(fs_info->vol_sema);
return RC_OK;
}
5cec4: 2002 movel %d2,%d0 <== NOT EXECUTED 5cec6: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 5cecc: 4e5e unlk %fp <== NOT EXECUTED 5cece: 4e75 rts <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one( EIO );
5ced0: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 5ced6: 74ff moveq #-1,%d2 <== NOT EXECUTED 5ced8: 2040 moveal %d0,%a0 <== NOT EXECUTED 5ceda: 7005 moveq #5,%d0 <== NOT EXECUTED 5cedc: 2080 movel %d0,%a0@ <== NOT EXECUTED
}
iop->offset = 0;
rtems_semaphore_release(fs_info->vol_sema);
return RC_OK;
}
5cede: 2002 movel %d2,%d0 <== NOT EXECUTED 5cee0: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 5cee6: 4e5e unlk %fp <== NOT EXECUTED
0005cf5c <msdos_dir_read>:
* too, so read such set of sectors is quick operation for low-level IO
* layer.
*/
bts2rd = (FAT_FD_OF_ROOT_DIR(fat_fd) &&
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16))) ?
fat_fd->fat_file_size :
5cf5c: 7001 moveq #1,%d0 <== NOT EXECUTED
* the number of bytes read on success, or -1 if error occured (errno
* set apropriately).
*/
ssize_t
msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
{
5cf5e: 4e56 fe7c linkw %fp,#-388 <== NOT EXECUTED 5cf62: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED 5cf66: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
5cf6a: 206b 0028 moveal %a3@(40),%a0 <== NOT EXECUTED 5cf6e: 2468 0034 moveal %a0@(52),%a2 <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
5cf72: 206b 0018 moveal %a3@(24),%a0 <== NOT EXECUTED
* the number of bytes read on success, or -1 if error occured (errno
* set apropriately).
*/
ssize_t
msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
{
5cf76: 282e 0010 movel %fp@(16),%d4 <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
5cf7a: 2d48 fecc movel %a0,%fp@(-308) <== NOT EXECUTED
/*
* cast start and count - protect against using sizes that are not exact
* multiples of the -dirent- size. These could result in unexpected
* results
*/
start = iop->offset / sizeof(struct dirent);
5cf7e: 2c2b 000c movel %a3@(12),%d6 <== NOT EXECUTED 5cf82: 2e2b 0010 movel %a3@(16),%d7 <== NOT EXECUTED
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
fat_file_fd_t *tmp_fat_fd = NULL;
5cf86: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED
uint32_t start = 0;
ssize_t ret = 0;
uint32_t cmpltd = 0;
uint32_t j = 0, i = 0;
uint32_t bts2rd = 0;
uint32_t cur_cln = 0;
5cf8a: 42ae fffc clrl %fp@(-4) <== NOT EXECUTED
* too, so read such set of sectors is quick operation for low-level IO
* layer.
*/
bts2rd = (FAT_FD_OF_ROOT_DIR(fat_fd) &&
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16))) ?
fat_fd->fat_file_size :
5cf8e: b0a8 0020 cmpl %a0@(32),%d0 <== NOT EXECUTED 5cf92: 6700 03c2 beqw 5d356 <msdos_dir_read+0x3fa> <== NOT EXECUTED 5cf96: 4283 clrl %d3 <== NOT EXECUTED 5cf98: 362a 0006 movew %a2@(6),%d3 <== NOT EXECUTED 5cf9c: 2d43 fec6 movel %d3,%fp@(-314) <== NOT EXECUTED
fs_info->fat.vol.bpc;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
5cfa0: 42a7 clrl %sp@- <== NOT EXECUTED 5cfa2: 42a7 clrl %sp@- <== NOT EXECUTED 5cfa4: 2f2a 0088 movel %a2@(136),%sp@- <== NOT EXECUTED 5cfa8: 4eb9 0004 af20 jsr 4af20 <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
5cfae: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5cfb2: 4a80 tstl %d0 <== NOT EXECUTED 5cfb4: 6600 05cc bnew 5d582 <msdos_dir_read+0x626> <== NOT EXECUTED
* cast start and count - protect against using sizes that are not exact
* multiples of the -dirent- size. These could result in unexpected
* results
*/
start = iop->offset / sizeof(struct dirent);
count = (count / sizeof(struct dirent)) * sizeof(struct dirent);
5cfb8: 223c 0000 0110 movel #272,%d1 <== NOT EXECUTED 5cfbe: 4c41 4004 remul %d1,%d4,%d4 <== NOT EXECUTED 5cfc2: 2004 movel %d4,%d0 <== NOT EXECUTED 5cfc4: e18c lsll #8,%d4 <== NOT EXECUTED 5cfc6: e988 lsll #4,%d0 <== NOT EXECUTED 5cfc8: d880 addl %d0,%d4 <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
while (count > 0)
5cfca: 6700 05d2 beqw 5d59e <msdos_dir_read+0x642> <== NOT EXECUTED
/*
* cast start and count - protect against using sizes that are not exact
* multiples of the -dirent- size. These could result in unexpected
* results
*/
start = iop->offset / sizeof(struct dirent);
5cfce: 4878 0110 pea 110 <DBL_MANT_DIG+0xdb> <== NOT EXECUTED
* also the checksum of the short entry.
*/
lfn_entries = (*MSDOS_DIR_ENTRY_TYPE(entry) &
MSDOS_LAST_LONG_ENTRY_MASK);
lfn_checksum = *MSDOS_DIR_LFN_CHECKSUM(entry);
memset (tmp_dirent.d_name, 0, sizeof(tmp_dirent.d_name));
5cfd2: 43ee fed8 lea %fp@(-296),%a1 <== NOT EXECUTED 5cfd6: 43e9 0010 lea %a1@(16),%a1 <== NOT EXECUTED
/*
* cast start and count - protect against using sizes that are not exact
* multiples of the -dirent- size. These could result in unexpected
* results
*/
start = iop->offset / sizeof(struct dirent);
5cfda: 74ff moveq #-1,%d2 <== NOT EXECUTED 5cfdc: 4283 clrl %d3 <== NOT EXECUTED 5cfde: 42a7 clrl %sp@- <== NOT EXECUTED 5cfe0: 4200 clrb %d0 <== NOT EXECUTED 5cfe2: 2f07 movel %d7,%sp@- <== NOT EXECUTED 5cfe4: 1d40 fecb moveb %d0,%fp@(-309) <== NOT EXECUTED 5cfe8: 2f06 movel %d6,%sp@- <== NOT EXECUTED 5cfea: 42ae fed0 clrl %fp@(-304) <== NOT EXECUTED 5cfee: 42ae fed4 clrl %fp@(-300) <== NOT EXECUTED
* also the checksum of the short entry.
*/
lfn_entries = (*MSDOS_DIR_ENTRY_TYPE(entry) &
MSDOS_LAST_LONG_ENTRY_MASK);
lfn_checksum = *MSDOS_DIR_LFN_CHECKSUM(entry);
memset (tmp_dirent.d_name, 0, sizeof(tmp_dirent.d_name));
5cff2: 2d49 feba movel %a1,%fp@(-326) <== NOT EXECUTED
/*
* cast start and count - protect against using sizes that are not exact
* multiples of the -dirent- size. These could result in unexpected
* results
*/
start = iop->offset / sizeof(struct dirent);
5cff6: 4eb9 0006 a274 jsr 6a274 <__divdi3> <== NOT EXECUTED 5cffc: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5d000: 2e01 movel %d1,%d7 <== NOT EXECUTED
* fat-file is already opened by open call, so read it
* Always read directory fat-file from the beggining because of MSDOS
* directories feature :( - we should count elements currently
* present in the directory because there may be holes :)
*/
ret = fat_file_read(iop->pathinfo.mt_entry, fat_fd, (j * bts2rd),
5d002: 2f2a 008c movel %a2@(140),%sp@- <== NOT EXECUTED 5d006: 2f2e fec6 movel %fp@(-314),%sp@- <== NOT EXECUTED 5d00a: 2f2e fed0 movel %fp@(-304),%sp@- <== NOT EXECUTED 5d00e: 2f2e fecc movel %fp@(-308),%sp@- <== NOT EXECUTED 5d012: 2f2b 0028 movel %a3@(40),%sp@- <== NOT EXECUTED 5d016: 4eb9 0005 2c74 jsr 52c74 <fat_file_read> <== NOT EXECUTED
bts2rd, fs_info->cl_buf);
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
5d01c: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 5d020: 721f moveq #31,%d1 <== NOT EXECUTED
* fat-file is already opened by open call, so read it
* Always read directory fat-file from the beggining because of MSDOS
* directories feature :( - we should count elements currently
* present in the directory because there may be holes :)
*/
ret = fat_file_read(iop->pathinfo.mt_entry, fat_fd, (j * bts2rd),
5d022: 2c00 movel %d0,%d6 <== NOT EXECUTED
bts2rd, fs_info->cl_buf);
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
5d024: b280 cmpl %d0,%d1 <== NOT EXECUTED 5d026: 6c00 0496 bgew 5d4be <msdos_dir_read+0x562> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
}
for (i = 0; i < ret; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
char* entry = (char*) fs_info->cl_buf + i;
5d02a: 286a 008c moveal %a2@(140),%a4 <== NOT EXECUTED
/*
* Is this directory from here on empty ?
*/
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
5d02e: 1214 moveb %a4@,%d1 <== NOT EXECUTED 5d030: 6740 beqs 5d072 <msdos_dir_read+0x116> <== NOT EXECUTED 5d032: 4285 clrl %d5 <== NOT EXECUTED 5d034: 2d44 feaa movel %d4,%fp@(-342) <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return cmpltd;
}
/* Is the directory entry empty */
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) == MSDOS_THIS_DIR_ENTRY_EMPTY)
5d038: 0281 0000 00ff andil #255,%d1 <== NOT EXECUTED 5d03e: 0c81 0000 00e5 cmpil #229,%d1 <== NOT EXECUTED 5d044: 6718 beqs 5d05e <msdos_dir_read+0x102> <== NOT EXECUTED
continue;
/* Is the directory entry empty a volume label */
if (((*MSDOS_DIR_ATTR(entry)) & MSDOS_ATTR_VOLUME_ID) &&
5d046: 4280 clrl %d0 <== NOT EXECUTED 5d048: 102c 000b moveb %a4@(11),%d0 <== NOT EXECUTED
((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_LFN_MASK) != MSDOS_ATTR_LFN))
5d04c: 783f moveq #63,%d4 <== NOT EXECUTED
/* Is the directory entry empty */
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) == MSDOS_THIS_DIR_ENTRY_EMPTY)
continue;
/* Is the directory entry empty a volume label */
if (((*MSDOS_DIR_ATTR(entry)) & MSDOS_ATTR_VOLUME_ID) &&
5d04e: 44c0 movew %d0,%ccr <== NOT EXECUTED 5d050: 6a00 0144 bplw 5d196 <msdos_dir_read+0x23a> <== NOT EXECUTED
((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_LFN_MASK) != MSDOS_ATTR_LFN))
5d054: c084 andl %d4,%d0 <== NOT EXECUTED
/* Is the directory entry empty */
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) == MSDOS_THIS_DIR_ENTRY_EMPTY)
continue;
/* Is the directory entry empty a volume label */
if (((*MSDOS_DIR_ATTR(entry)) & MSDOS_ATTR_VOLUME_ID) &&
5d056: 183c 000f moveb #15,%d4 <== NOT EXECUTED 5d05a: b880 cmpl %d0,%d4 <== NOT EXECUTED 5d05c: 672e beqs 5d08c <msdos_dir_read+0x130> <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
rtems_set_errno_and_return_minus_one(EIO);
}
for (i = 0; i < ret; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
5d05e: 0685 0000 0020 addil #32,%d5 <== NOT EXECUTED 5d064: bc85 cmpl %d5,%d6 <== NOT EXECUTED 5d066: 6344 blss 5d0ac <msdos_dir_read+0x150> <== NOT EXECUTED
{
char* entry = (char*) fs_info->cl_buf + i;
5d068: 286a 008c moveal %a2@(140),%a4 <== NOT EXECUTED 5d06c: d9c5 addal %d5,%a4 <== NOT EXECUTED
/*
* Is this directory from here on empty ?
*/
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
5d06e: 1214 moveb %a4@,%d1 <== NOT EXECUTED 5d070: 66c6 bnes 5d038 <msdos_dir_read+0xdc> <== NOT EXECUTED
MSDOS_THIS_DIR_ENTRY_AND_REST_EMPTY)
{
rtems_semaphore_release(fs_info->vol_sema);
5d072: 2f2a 0088 movel %a2@(136),%sp@- <== NOT EXECUTED
return cmpltd;
5d076: 2a43 moveal %d3,%a5 <== NOT EXECUTED
* Is this directory from here on empty ?
*/
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
MSDOS_THIS_DIR_ENTRY_AND_REST_EMPTY)
{
rtems_semaphore_release(fs_info->vol_sema);
5d078: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
return cmpltd;
5d07e: 588f addql #4,%sp <== NOT EXECUTED
j++;
}
rtems_semaphore_release(fs_info->vol_sema);
return cmpltd;
}
5d080: 200d movel %a5,%d0 <== NOT EXECUTED 5d082: 4cee 3cfc fe7c moveml %fp@(-388),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5d088: 4e5e unlk %fp <== NOT EXECUTED 5d08a: 4e75 rts <== NOT EXECUTED
int q;
/*
* Is this is the first entry of a LFN ?
*/
if (lfn_start == FAT_FILE_SHORT_NAME)
5d08c: 70ff moveq #-1,%d0 <== NOT EXECUTED 5d08e: b082 cmpl %d2,%d0 <== NOT EXECUTED 5d090: 6744 beqs 5d0d6 <msdos_dir_read+0x17a> <== NOT EXECUTED
* If the entry number or the check sum do not match
* forget this series of long directory entries. These could
* be orphaned entries depending on the history of the
* disk.
*/
if ((lfn_entries != (*MSDOS_DIR_ENTRY_TYPE(entry) &
5d092: 4280 clrl %d0 <== NOT EXECUTED 5d094: 1014 moveb %a4@,%d0 <== NOT EXECUTED 5d096: 723f moveq #63,%d1 <== NOT EXECUTED 5d098: c081 andl %d1,%d0 <== NOT EXECUTED 5d09a: b0ae fed4 cmpl %fp@(-300),%d0 <== NOT EXECUTED 5d09e: 6776 beqs 5d116 <msdos_dir_read+0x1ba> <== NOT EXECUTED
MSDOS_LAST_LONG_ENTRY_MASK)) ||
(lfn_checksum != *MSDOS_DIR_LFN_CHECKSUM(entry)))
{
lfn_start = FAT_FILE_SHORT_NAME;
5d0a0: 74ff moveq #-1,%d2 <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
rtems_set_errno_and_return_minus_one(EIO);
}
for (i = 0; i < ret; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
5d0a2: 0685 0000 0020 addil #32,%d5 <== NOT EXECUTED 5d0a8: bc85 cmpl %d5,%d6 <== NOT EXECUTED 5d0aa: 62bc bhis 5d068 <msdos_dir_read+0x10c> <== NOT EXECUTED 5d0ac: 202e fec6 movel %fp@(-314),%d0 <== NOT EXECUTED 5d0b0: d1ae fed0 addl %d0,%fp@(-304) <== NOT EXECUTED 5d0b4: 282e feaa movel %fp@(-342),%d4 <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
while (count > 0)
5d0b8: 6600 ff48 bnew 5d002 <msdos_dir_read+0xa6> <== NOT EXECUTED 5d0bc: 2a43 moveal %d3,%a5 <== NOT EXECUTED
break;
}
j++;
}
rtems_semaphore_release(fs_info->vol_sema);
5d0be: 2f2a 0088 movel %a2@(136),%sp@- <== NOT EXECUTED 5d0c2: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
return cmpltd;
5d0c8: 588f addql #4,%sp <== NOT EXECUTED
}
5d0ca: 200d movel %a5,%d0 <== NOT EXECUTED 5d0cc: 4cee 3cfc fe7c moveml %fp@(-388),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5d0d2: 4e5e unlk %fp <== NOT EXECUTED 5d0d4: 4e75 rts <== NOT EXECUTED
if (lfn_start == FAT_FILE_SHORT_NAME)
{
/*
* The first entry must have the last long entry flag set.
*/
if ((*MSDOS_DIR_ENTRY_TYPE(entry) &
5d0d6: 0801 0006 btst #6,%d1 <== NOT EXECUTED 5d0da: 6782 beqs 5d05e <msdos_dir_read+0x102> <== NOT EXECUTED
/*
* Remember the start location of the long file name.
*/
lfn_start =
((j * bts2rd) + i) / MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
5d0dc: 242e fed0 movel %fp@(-304),%d2 <== NOT EXECUTED 5d0e0: d485 addl %d5,%d2 <== NOT EXECUTED
continue;
/*
* Remember the start location of the long file name.
*/
lfn_start =
5d0e2: ea8a lsrl #5,%d2 <== NOT EXECUTED
* Get the number of entries so we can count down and
* also the checksum of the short entry.
*/
lfn_entries = (*MSDOS_DIR_ENTRY_TYPE(entry) &
MSDOS_LAST_LONG_ENTRY_MASK);
lfn_checksum = *MSDOS_DIR_LFN_CHECKSUM(entry);
5d0e4: 182c 000d moveb %a4@(13),%d4 <== NOT EXECUTED
memset (tmp_dirent.d_name, 0, sizeof(tmp_dirent.d_name));
5d0e8: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> <== NOT EXECUTED
* Get the number of entries so we can count down and
* also the checksum of the short entry.
*/
lfn_entries = (*MSDOS_DIR_ENTRY_TYPE(entry) &
MSDOS_LAST_LONG_ENTRY_MASK);
lfn_checksum = *MSDOS_DIR_LFN_CHECKSUM(entry);
5d0ec: 1d44 fecb moveb %d4,%fp@(-309) <== NOT EXECUTED
/*
* Get the number of entries so we can count down and
* also the checksum of the short entry.
*/
lfn_entries = (*MSDOS_DIR_ENTRY_TYPE(entry) &
5d0f0: 783f moveq #63,%d4 <== NOT EXECUTED
MSDOS_LAST_LONG_ENTRY_MASK);
lfn_checksum = *MSDOS_DIR_LFN_CHECKSUM(entry);
memset (tmp_dirent.d_name, 0, sizeof(tmp_dirent.d_name));
5d0f2: 42a7 clrl %sp@- <== NOT EXECUTED 5d0f4: 2f2e feba movel %fp@(-326),%sp@- <== NOT EXECUTED
/*
* Get the number of entries so we can count down and
* also the checksum of the short entry.
*/
lfn_entries = (*MSDOS_DIR_ENTRY_TYPE(entry) &
5d0f8: c881 andl %d1,%d4 <== NOT EXECUTED 5d0fa: 2d44 fed4 movel %d4,%fp@(-300) <== NOT EXECUTED
MSDOS_LAST_LONG_ENTRY_MASK);
lfn_checksum = *MSDOS_DIR_LFN_CHECKSUM(entry);
memset (tmp_dirent.d_name, 0, sizeof(tmp_dirent.d_name));
5d0fe: 4eb9 0005 e310 jsr 5e310 <memset> <== NOT EXECUTED 5d104: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
* If the entry number or the check sum do not match
* forget this series of long directory entries. These could
* be orphaned entries depending on the history of the
* disk.
*/
if ((lfn_entries != (*MSDOS_DIR_ENTRY_TYPE(entry) &
5d108: 4280 clrl %d0 <== NOT EXECUTED 5d10a: 1014 moveb %a4@,%d0 <== NOT EXECUTED 5d10c: 723f moveq #63,%d1 <== NOT EXECUTED 5d10e: c081 andl %d1,%d0 <== NOT EXECUTED 5d110: b0ae fed4 cmpl %fp@(-300),%d0 <== NOT EXECUTED 5d114: 668a bnes 5d0a0 <msdos_dir_read+0x144> <== NOT EXECUTED
MSDOS_LAST_LONG_ENTRY_MASK)) ||
5d116: 4280 clrl %d0 <== NOT EXECUTED 5d118: 102e fecb moveb %fp@(-309),%d0 <== NOT EXECUTED 5d11c: 4281 clrl %d1 <== NOT EXECUTED
(lfn_checksum != *MSDOS_DIR_LFN_CHECKSUM(entry)))
5d11e: 182c 000d moveb %a4@(13),%d4 <== NOT EXECUTED 5d122: 3244 moveaw %d4,%a1 <== NOT EXECUTED
* forget this series of long directory entries. These could
* be orphaned entries depending on the history of the
* disk.
*/
if ((lfn_entries != (*MSDOS_DIR_ENTRY_TYPE(entry) &
MSDOS_LAST_LONG_ENTRY_MASK)) ||
5d124: 1204 moveb %d4,%d1 <== NOT EXECUTED 5d126: b081 cmpl %d1,%d0 <== NOT EXECUTED 5d128: 6600 ff76 bnew 5d0a0 <msdos_dir_read+0x144> <== NOT EXECUTED
* The DOS maximum length is 255 characters without the
* trailing nul character. We need to range check the length to
* fit in the directory entry name field.
*/
lfn_entries--;
5d12c: 53ae fed4 subql #1,%fp@(-300) <== NOT EXECUTED
p = entry + 1;
o = lfn_entries * MSDOS_LFN_LEN_PER_ENTRY;
5d130: 700d moveq #13,%d0 <== NOT EXECUTED
* RETURNS: * the number of bytes read on success, or -1 if error occured (errno * set apropriately). */ ssize_t msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
5d132: 41ee fee8 lea %fp@(-280),%a0 <== NOT EXECUTED
* trailing nul character. We need to range check the length to
* fit in the directory entry name field.
*/
lfn_entries--;
p = entry + 1;
5d136: 528c addql #1,%a4 <== NOT EXECUTED
o = lfn_entries * MSDOS_LFN_LEN_PER_ENTRY;
5d138: 222e fed4 movel %fp@(-300),%d1 <== NOT EXECUTED 5d13c: 4c00 1800 mulsl %d0,%d1 <== NOT EXECUTED
* RETURNS: * the number of bytes read on success, or -1 if error occured (errno * set apropriately). */ ssize_t msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
5d140: 4200 clrb %d0 <== NOT EXECUTED 5d142: 282e feaa movel %fp@(-342),%d4 <== NOT EXECUTED 5d146: 4bf0 1800 lea %a0@(00000000,%d1:l),%a5 <== NOT EXECUTED 5d14a: 2d42 fec2 movel %d2,%fp@(-318) <== NOT EXECUTED
* fit in the directory entry name field.
*/
lfn_entries--;
p = entry + 1;
o = lfn_entries * MSDOS_LFN_LEN_PER_ENTRY;
5d14e: 2040 moveal %d0,%a0 <== NOT EXECUTED
for (q = 0; q < MSDOS_LFN_LEN_PER_ENTRY; q++)
{
if (o >= (sizeof(tmp_dirent.d_name) - 1))
break;
tmp_dirent.d_name[o++] = *p;
5d150: 5280 addql #1,%d0 <== NOT EXECUTED
p = entry + 1;
o = lfn_entries * MSDOS_LFN_LEN_PER_ENTRY;
for (q = 0; q < MSDOS_LFN_LEN_PER_ENTRY; q++)
{
if (o >= (sizeof(tmp_dirent.d_name) - 1))
5d152: 0c81 0000 00fe cmpil #254,%d1 <== NOT EXECUTED 5d158: 6220 bhis 5d17a <msdos_dir_read+0x21e> <== NOT EXECUTED
break;
tmp_dirent.d_name[o++] = *p;
5d15a: 5281 addql #1,%d1 <== NOT EXECUTED 5d15c: 1ad4 moveb %a4@,%a5@+ <== NOT EXECUTED
if (*p == '\0')
5d15e: 671a beqs 5d17a <msdos_dir_read+0x21e> <== NOT EXECUTED
break;
switch (q)
5d160: 7404 moveq #4,%d2 <== NOT EXECUTED 5d162: b488 cmpl %a0,%d2 <== NOT EXECUTED 5d164: 6700 0212 beqw 5d378 <msdos_dir_read+0x41c> <== NOT EXECUTED 5d168: 143c 000a moveb #10,%d2 <== NOT EXECUTED 5d16c: b488 cmpl %a0,%d2 <== NOT EXECUTED 5d16e: 6700 020e beqw 5d37e <msdos_dir_read+0x422> <== NOT EXECUTED
break;
case 10:
p += 4;
break;
default:
p += 2;
5d172: 548c addql #2,%a4 <== NOT EXECUTED
lfn_entries--;
p = entry + 1;
o = lfn_entries * MSDOS_LFN_LEN_PER_ENTRY;
for (q = 0; q < MSDOS_LFN_LEN_PER_ENTRY; q++)
5d174: 740d moveq #13,%d2 <== NOT EXECUTED 5d176: b480 cmpl %d0,%d2 <== NOT EXECUTED 5d178: 66d4 bnes 5d14e <msdos_dir_read+0x1f2> <== NOT EXECUTED 5d17a: 2d44 feaa movel %d4,%fp@(-342) <== NOT EXECUTED 5d17e: 242e fec2 movel %fp@(-318),%d2 <== NOT EXECUTED 5d182: 3809 movew %a1,%d4 <== NOT EXECUTED 5d184: 1d44 fecb moveb %d4,%fp@(-309) <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
}
if (count <= 0)
5d188: 4aae feaa tstl %fp@(-342) <== NOT EXECUTED 5d18c: 6600 fed0 bnew 5d05e <msdos_dir_read+0x102> <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
while (count > 0)
5d190: 2a43 moveal %d3,%a5 <== NOT EXECUTED 5d192: 6000 ff2a braw 5d0be <msdos_dir_read+0x162> <== NOT EXECUTED
/*
* Check the attribute to see if the entry is for a long file
* name.
*/
if ((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_LFN_MASK) ==
5d196: c084 andl %d4,%d0 <== NOT EXECUTED 5d198: 183c 000f moveb #15,%d4 <== NOT EXECUTED 5d19c: b880 cmpl %d0,%d4 <== NOT EXECUTED 5d19e: 6700 feec beqw 5d08c <msdos_dir_read+0x130> <== NOT EXECUTED
fat_dir_pos_t dir_pos;
/*
* Skip active entries until get the entry to start from.
*/
if (start)
5d1a2: 4a87 tstl %d7 <== NOT EXECUTED 5d1a4: 6708 beqs 5d1ae <msdos_dir_read+0x252> <== NOT EXECUTED
{
lfn_start = FAT_FILE_SHORT_NAME;
start--;
5d1a6: 5387 subql #1,%d7 <== NOT EXECUTED
/*
* Skip active entries until get the entry to start from.
*/
if (start)
{
lfn_start = FAT_FILE_SHORT_NAME;
5d1a8: 74ff moveq #-1,%d2 <== NOT EXECUTED
start--;
continue;
5d1aa: 6000 feb2 braw 5d05e <msdos_dir_read+0x102> <== NOT EXECUTED
* unfortunately there is no method to extract ino except to
* open fat-file descriptor :( ... so, open it
*/
/* get number of cluster we are working with */
rc = fat_file_ioctl(iop->pathinfo.mt_entry, fat_fd, F_CLU_NUM,
5d1ae: 486e fffc pea %fp@(-4) <== NOT EXECUTED 5d1b2: 2f2e fed0 movel %fp@(-304),%sp@- <== NOT EXECUTED 5d1b6: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 5d1ba: 2f2e fecc movel %fp@(-308),%sp@- <== NOT EXECUTED 5d1be: 2f2b 0028 movel %a3@(40),%sp@- <== NOT EXECUTED 5d1c2: 4eb9 0005 30b0 jsr 530b0 <fat_file_ioctl> <== NOT EXECUTED
j * bts2rd, &cur_cln);
if (rc != RC_OK)
5d1c8: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 5d1cc: 4a80 tstl %d0 <== NOT EXECUTED 5d1ce: 6600 01b4 bnew 5d384 <msdos_dir_read+0x428> <== NOT EXECUTED
}
fat_dir_pos_init(&dir_pos);
dir_pos.sname.cln = cur_cln;
dir_pos.sname.ofs = i;
rc = fat_file_open(iop->pathinfo.mt_entry, &dir_pos, &tmp_fat_fd);
5d1d2: 486e fff8 pea %fp@(-8) <== NOT EXECUTED
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
5d1d6: 78ff moveq #-1,%d4 <== NOT EXECUTED 5d1d8: 486e ffe8 pea %fp@(-24) <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
fat_dir_pos_init(&dir_pos);
dir_pos.sname.cln = cur_cln;
5d1dc: 2d6e fffc ffe8 movel %fp@(-4),%fp@(-24) <== NOT EXECUTED
dir_pos.sname.ofs = i;
rc = fat_file_open(iop->pathinfo.mt_entry, &dir_pos, &tmp_fat_fd);
5d1e2: 2f2b 0028 movel %a3@(40),%sp@- <== NOT EXECUTED 5d1e6: 2d44 fff0 movel %d4,%fp@(-16) <== NOT EXECUTED
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
5d1ea: 2d44 fff4 movel %d4,%fp@(-12) <== NOT EXECUTED
return rc;
}
fat_dir_pos_init(&dir_pos);
dir_pos.sname.cln = cur_cln;
dir_pos.sname.ofs = i;
5d1ee: 2d45 ffec movel %d5,%fp@(-20) <== NOT EXECUTED
rc = fat_file_open(iop->pathinfo.mt_entry, &dir_pos, &tmp_fat_fd);
5d1f2: 4eb9 0005 29b2 jsr 529b2 <fat_file_open> <== NOT EXECUTED
if (rc != RC_OK)
5d1f8: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5d1fc: 4a80 tstl %d0 <== NOT EXECUTED 5d1fe: 6600 0184 bnew 5d384 <msdos_dir_read+0x428> <== NOT EXECUTED
return rc;
}
/* fill in dirent structure */
/* XXX: from what and in what d_off should be computed ?! */
tmp_dirent.d_off = start + cmpltd;
5d202: 42ae fedc clrl %fp@(-292) <== NOT EXECUTED
/*
* If a long file name check if the correct number of
* entries have been found and if the checksum is correct.
* If not return the short file name.
*/
if (lfn_start != FAT_FILE_SHORT_NAME)
5d206: 70ff moveq #-1,%d0 <== NOT EXECUTED
}
/* fill in dirent structure */
/* XXX: from what and in what d_off should be computed ?! */
tmp_dirent.d_off = start + cmpltd;
tmp_dirent.d_reclen = sizeof(struct dirent);
5d208: 307c 0110 moveaw #272,%a0 <== NOT EXECUTED 5d20c: 3d48 fee4 movew %a0,%fp@(-284) <== NOT EXECUTED
tmp_dirent.d_ino = tmp_fat_fd->ino;
5d210: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 5d214: 2d68 000c fed8 movel %a0@(12),%fp@(-296) <== NOT EXECUTED
return rc;
}
/* fill in dirent structure */
/* XXX: from what and in what d_off should be computed ?! */
tmp_dirent.d_off = start + cmpltd;
5d21a: 2d43 fee0 movel %d3,%fp@(-288) <== NOT EXECUTED
/*
* If a long file name check if the correct number of
* entries have been found and if the checksum is correct.
* If not return the short file name.
*/
if (lfn_start != FAT_FILE_SHORT_NAME)
5d21e: b082 cmpl %d2,%d0 <== NOT EXECUTED 5d220: 6746 beqs 5d268 <msdos_dir_read+0x30c> <== NOT EXECUTED 5d222: 282e feaa movel %fp@(-342),%d4 <== NOT EXECUTED
* RETURNS: * the number of bytes read on success, or -1 if error occured (errno * set apropriately). */ ssize_t msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
5d226: 4bec 000b lea %a4@(11),%a5 <== NOT EXECUTED 5d22a: 204c moveal %a4,%a0 <== NOT EXECUTED 5d22c: 4281 clrl %d1 <== NOT EXECUTED
uint8_t cs = 0;
uint8_t* p = (uint8_t*) entry;
int i;
for (i = 0; i < 11; i++, p++)
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
5d22e: 4200 clrb %d0 <== NOT EXECUTED 5d230: e289 lsrl #1,%d1 <== NOT EXECUTED 5d232: 2241 moveal %d1,%a1 <== NOT EXECUTED 5d234: 1218 moveb %a0@+,%d1 <== NOT EXECUTED 5d236: d289 addl %a1,%d1 <== NOT EXECUTED 5d238: d280 addl %d0,%d1 <== NOT EXECUTED
{
uint8_t cs = 0;
uint8_t* p = (uint8_t*) entry;
int i;
for (i = 0; i < 11; i++, p++)
5d23a: bbc8 cmpal %a0,%a5 <== NOT EXECUTED 5d23c: 671e beqs 5d25c <msdos_dir_read+0x300> <== NOT EXECUTED
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
5d23e: 0281 0000 00ff andil #255,%d1 <== NOT EXECUTED 5d244: 7080 moveq #-128,%d0 <== NOT EXECUTED 5d246: 0801 0000 btst #0,%d1 <== NOT EXECUTED 5d24a: 66e4 bnes 5d230 <msdos_dir_read+0x2d4> <== NOT EXECUTED 5d24c: e289 lsrl #1,%d1 <== NOT EXECUTED 5d24e: 2241 moveal %d1,%a1 <== NOT EXECUTED 5d250: 1218 moveb %a0@+,%d1 <== NOT EXECUTED 5d252: 4200 clrb %d0 <== NOT EXECUTED 5d254: d289 addl %a1,%d1 <== NOT EXECUTED 5d256: d280 addl %d0,%d1 <== NOT EXECUTED
{
uint8_t cs = 0;
uint8_t* p = (uint8_t*) entry;
int i;
for (i = 0; i < 11; i++, p++)
5d258: bbc8 cmpal %a0,%a5 <== NOT EXECUTED 5d25a: 66e2 bnes 5d23e <msdos_dir_read+0x2e2> <== NOT EXECUTED 5d25c: 2d44 feaa movel %d4,%fp@(-342) <== NOT EXECUTED
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
if (lfn_entries || (lfn_checksum != cs))
5d260: 4aae fed4 tstl %fp@(-300) <== NOT EXECUTED 5d264: 6700 00ca beqw 5d330 <msdos_dir_read+0x3d4> <== NOT EXECUTED
* RETURNS: * the number of bytes read on success, or -1 if error occured (errno * set apropriately). */ ssize_t msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
5d268: 41ec 0008 lea %a4@(8),%a0 <== NOT EXECUTED 5d26c: 7008 moveq #8,%d0 <== NOT EXECUTED 5d26e: 2248 moveal %a0,%a1 <== NOT EXECUTED 5d270: 2a43 moveal %d3,%a5 <== NOT EXECUTED 5d272: 282e feaa movel %fp@(-342),%d4 <== NOT EXECUTED 5d276: 2d48 fec2 movel %a0,%fp@(-318) <== NOT EXECUTED 5d27a: 2d40 febe movel %d0,%fp@(-322) <== NOT EXECUTED
const char *src_tmp;
/*
* find last non-blank character of base name
*/
for ((i = MSDOS_SHORT_BASE_LEN ,
5d27e: 2400 movel %d0,%d2 <== NOT EXECUTED
src_tmp = src + MSDOS_SHORT_BASE_LEN-1);
((i > 0) &&
5d280: 7620 moveq #32,%d3 <== NOT EXECUTED 5d282: 1220 moveb %a0@-,%d1 <== NOT EXECUTED 5d284: 49c1 extbl %d1 <== NOT EXECUTED 5d286: b681 cmpl %d1,%d3 <== NOT EXECUTED 5d288: 6600 0114 bnew 5d39e <msdos_dir_read+0x442> <== NOT EXECUTED
* RETURNS: * the number of bytes read on success, or -1 if error occured (errno * set apropriately). */ ssize_t msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
5d28c: 2002 movel %d2,%d0 <== NOT EXECUTED 5d28e: 5380 subql #1,%d0 <== NOT EXECUTED
const char *src_tmp;
/*
* find last non-blank character of base name
*/
for ((i = MSDOS_SHORT_BASE_LEN ,
5d290: 66ec bnes 5d27e <msdos_dir_read+0x322> <== NOT EXECUTED
{
/*
* convert dir entry from fixed 8+3 format (without dot)
* to 0..8 + 1dot + 0..3 format
*/
tmp_dirent.d_namlen = msdos_format_dirent_with_dot(
5d292: 206e feba moveal %fp@(-326),%a0 <== NOT EXECUTED 5d296: 260d movel %a5,%d3 <== NOT EXECUTED 5d298: 2d44 feaa movel %d4,%fp@(-342) <== NOT EXECUTED
const char *src_tmp;
/*
* find last non-blank character of base name
*/
for ((i = MSDOS_SHORT_BASE_LEN ,
5d29c: 42ae feb6 clrl %fp@(-330) <== NOT EXECUTED
/*
* find last non-blank character of extension
*/
for ((i = MSDOS_SHORT_EXT_LEN ,
src_tmp = src + MSDOS_SHORT_BASE_LEN+MSDOS_SHORT_EXT_LEN-1);
((i > 0) &&
5d2a0: 7220 moveq #32,%d1 <== NOT EXECUTED 5d2a2: 102c 000a moveb %a4@(10),%d0 <== NOT EXECUTED 5d2a6: 49c0 extbl %d0 <== NOT EXECUTED 5d2a8: b280 cmpl %d0,%d1 <== NOT EXECUTED 5d2aa: 6600 0288 bnew 5d534 <msdos_dir_read+0x5d8> <== NOT EXECUTED 5d2ae: 102c 0009 moveb %a4@(9),%d0 <== NOT EXECUTED 5d2b2: 49c0 extbl %d0 <== NOT EXECUTED 5d2b4: b280 cmpl %d0,%d1 <== NOT EXECUTED 5d2b6: 6600 022e bnew 5d4e6 <msdos_dir_read+0x58a> <== NOT EXECUTED 5d2ba: 102c 0008 moveb %a4@(8),%d0 <== NOT EXECUTED 5d2be: 49c0 extbl %d0 <== NOT EXECUTED 5d2c0: b280 cmpl %d0,%d1 <== NOT EXECUTED 5d2c2: 6600 015a bnew 5d41e <msdos_dir_read+0x4c2> <== NOT EXECUTED
{
/*
* convert dir entry from fixed 8+3 format (without dot)
* to 0..8 + 1dot + 0..3 format
*/
tmp_dirent.d_namlen = msdos_format_dirent_with_dot(
5d2c6: 74ff moveq #-1,%d2 <== NOT EXECUTED 5d2c8: 3a6e feb8 moveaw %fp@(-328),%a5 <== NOT EXECUTED
while (i-- > 0) {
*dst++ = tolower((unsigned char)(*src_tmp++));
len++;
}
}
*dst = '\0'; /* terminate string */
5d2cc: 4210 clrb %a0@ <== NOT EXECUTED
{
/*
* convert dir entry from fixed 8+3 format (without dot)
* to 0..8 + 1dot + 0..3 format
*/
tmp_dirent.d_namlen = msdos_format_dirent_with_dot(
5d2ce: 3d4d fee6 movew %a5,%fp@(-282) <== NOT EXECUTED
else
{
tmp_dirent.d_namlen = strlen(tmp_dirent.d_name);
}
memcpy(buffer + cmpltd, &tmp_dirent, sizeof(struct dirent));
5d2d2: 4878 0110 pea 110 <DBL_MANT_DIG+0xdb> <== NOT EXECUTED 5d2d6: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 5d2da: 486e fed8 pea %fp@(-296) <== NOT EXECUTED 5d2de: 4870 3800 pea %a0@(00000000,%d3:l) <== NOT EXECUTED 5d2e2: 4eb9 0005 e2a0 jsr 5e2a0 <memcpy> <== NOT EXECUTED
iop->offset = iop->offset + sizeof(struct dirent);
cmpltd += (sizeof(struct dirent));
count -= (sizeof(struct dirent));
/* inode number extracted, close fat-file */
rc = fat_file_close(iop->pathinfo.mt_entry, tmp_fat_fd);
5d2e8: 2f2e fff8 movel %fp@(-8),%sp@- <== NOT EXECUTED
tmp_dirent.d_namlen = strlen(tmp_dirent.d_name);
}
memcpy(buffer + cmpltd, &tmp_dirent, sizeof(struct dirent));
iop->offset = iop->offset + sizeof(struct dirent);
5d2ec: 4280 clrl %d0 <== NOT EXECUTED 5d2ee: 223c 0000 0110 movel #272,%d1 <== NOT EXECUTED
cmpltd += (sizeof(struct dirent));
count -= (sizeof(struct dirent));
/* inode number extracted, close fat-file */
rc = fat_file_close(iop->pathinfo.mt_entry, tmp_fat_fd);
5d2f4: 2f2b 0028 movel %a3@(40),%sp@- <== NOT EXECUTED
tmp_dirent.d_namlen = strlen(tmp_dirent.d_name);
}
memcpy(buffer + cmpltd, &tmp_dirent, sizeof(struct dirent));
iop->offset = iop->offset + sizeof(struct dirent);
5d2f8: d3ab 0010 addl %d1,%a3@(16) <== NOT EXECUTED 5d2fc: 282b 000c movel %a3@(12),%d4 <== NOT EXECUTED 5d300: d980 addxl %d0,%d4 <== NOT EXECUTED 5d302: 2744 000c movel %d4,%a3@(12) <== NOT EXECUTED
cmpltd += (sizeof(struct dirent));
count -= (sizeof(struct dirent));
/* inode number extracted, close fat-file */
rc = fat_file_close(iop->pathinfo.mt_entry, tmp_fat_fd);
5d306: 4eb9 0005 2fc2 jsr 52fc2 <fat_file_close> <== NOT EXECUTED
if (rc != RC_OK)
5d30c: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 5d310: 4a80 tstl %d0 <== NOT EXECUTED 5d312: 6670 bnes 5d384 <msdos_dir_read+0x428> <== NOT EXECUTED
memcpy(buffer + cmpltd, &tmp_dirent, sizeof(struct dirent));
iop->offset = iop->offset + sizeof(struct dirent);
cmpltd += (sizeof(struct dirent));
count -= (sizeof(struct dirent));
5d314: 203c ffff fef0 movel #-272,%d0 <== NOT EXECUTED 5d31a: d1ae feaa addl %d0,%fp@(-342) <== NOT EXECUTED
}
memcpy(buffer + cmpltd, &tmp_dirent, sizeof(struct dirent));
iop->offset = iop->offset + sizeof(struct dirent);
cmpltd += (sizeof(struct dirent));
5d31e: 0683 0000 0110 addil #272,%d3 <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
}
if (count <= 0)
5d324: 4aae feaa tstl %fp@(-342) <== NOT EXECUTED 5d328: 6600 fd34 bnew 5d05e <msdos_dir_read+0x102> <== NOT EXECUTED 5d32c: 6000 fe62 braw 5d190 <msdos_dir_read+0x234> <== NOT EXECUTED
int i;
for (i = 0; i < 11; i++, p++)
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
if (lfn_entries || (lfn_checksum != cs))
5d330: 4280 clrl %d0 <== NOT EXECUTED 5d332: 102e fecb moveb %fp@(-309),%d0 <== NOT EXECUTED 5d336: 0281 0000 00ff andil #255,%d1 <== NOT EXECUTED 5d33c: b081 cmpl %d1,%d0 <== NOT EXECUTED 5d33e: 6600 ff28 bnew 5d268 <msdos_dir_read+0x30c> <== NOT EXECUTED
tmp_dirent.d_namlen = msdos_format_dirent_with_dot(
tmp_dirent.d_name, entry); /* src text */
}
else
{
tmp_dirent.d_namlen = strlen(tmp_dirent.d_name);
5d342: 2f2e feba movel %fp@(-326),%sp@- <== NOT EXECUTED 5d346: 4eb9 0005 f084 jsr 5f084 <strlen> <== NOT EXECUTED 5d34c: 588f addql #4,%sp <== NOT EXECUTED 5d34e: 3d40 fee6 movew %d0,%fp@(-282) <== NOT EXECUTED 5d352: 6000 ff7e braw 5d2d2 <msdos_dir_read+0x376> <== NOT EXECUTED
* optimization: we know that root directory for FAT12/16 volumes is
* sequential set of sectors and any cluster is sequential set of sectors
* too, so read such set of sectors is quick operation for low-level IO
* layer.
*/
bts2rd = (FAT_FD_OF_ROOT_DIR(fat_fd) &&
5d356: 4aa8 0024 tstl %a0@(36) <== NOT EXECUTED 5d35a: 6600 fc3a bnew 5cf96 <msdos_dir_read+0x3a> <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16))) ?
5d35e: 4280 clrl %d0 <== NOT EXECUTED 5d360: 102a 000a moveb %a2@(10),%d0 <== NOT EXECUTED 5d364: 7203 moveq #3,%d1 <== NOT EXECUTED 5d366: c081 andl %d1,%d0 <== NOT EXECUTED
* optimization: we know that root directory for FAT12/16 volumes is
* sequential set of sectors and any cluster is sequential set of sectors
* too, so read such set of sectors is quick operation for low-level IO
* layer.
*/
bts2rd = (FAT_FD_OF_ROOT_DIR(fat_fd) &&
5d368: 6700 fc2c beqw 5cf96 <msdos_dir_read+0x3a> <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16))) ?
fat_fd->fat_file_size :
5d36c: 2428 0018 movel %a0@(24),%d2 <== NOT EXECUTED 5d370: 2d42 fec6 movel %d2,%fp@(-314) <== NOT EXECUTED 5d374: 6000 fc2a braw 5cfa0 <msdos_dir_read+0x44> <== NOT EXECUTED
break;
switch (q)
{
case 4:
p += 5;
5d378: 5a8c addql #5,%a4 <== NOT EXECUTED
break;
5d37a: 6000 fdd2 braw 5d14e <msdos_dir_read+0x1f2> <== NOT EXECUTED
case 10:
p += 4;
5d37e: 588c addql #4,%a4 <== NOT EXECUTED
break;
5d380: 6000 fdcc braw 5d14e <msdos_dir_read+0x1f2> <== NOT EXECUTED
/* inode number extracted, close fat-file */
rc = fat_file_close(iop->pathinfo.mt_entry, tmp_fat_fd);
if (rc != RC_OK)
{
rtems_semaphore_release(fs_info->vol_sema);
5d384: 2f2a 0088 movel %a2@(136),%sp@- <== NOT EXECUTED 5d388: 2a40 moveal %d0,%a5 <== NOT EXECUTED 5d38a: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
return rc;
5d390: 588f addql #4,%sp <== NOT EXECUTED
j++;
}
rtems_semaphore_release(fs_info->vol_sema);
return cmpltd;
}
5d392: 200d movel %a5,%d0 <== NOT EXECUTED 5d394: 4cee 3cfc fe7c moveml %fp@(-388),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5d39a: 4e5e unlk %fp <== NOT EXECUTED 5d39c: 4e75 rts <== NOT EXECUTED 5d39e: 2d44 feaa movel %d4,%fp@(-342) <== NOT EXECUTED 5d3a2: 260d movel %a5,%d3 <== NOT EXECUTED 5d3a4: 2d40 febe movel %d0,%fp@(-322) <== NOT EXECUTED 5d3a8: 2d40 feb6 movel %d0,%fp@(-330) <== NOT EXECUTED
/*
* copy base name to destination
*/
src_tmp = src;
len = i;
while (i-- > 0) {
5d3ac: 6f00 0202 blew 5d5b0 <msdos_dir_read+0x654> <== NOT EXECUTED 5d3b0: 2239 0006 ec28 movel 6ec28 <__ctype_ptr__>,%d1 <== NOT EXECUTED
* RETURNS: * the number of bytes read on success, or -1 if error occured (errno * set apropriately). */ ssize_t msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
5d3b6: d08c addl %a4,%d0 <== NOT EXECUTED 5d3b8: 204c moveal %a4,%a0 <== NOT EXECUTED
{
/*
* convert dir entry from fixed 8+3 format (without dot)
* to 0..8 + 1dot + 0..3 format
*/
tmp_dirent.d_namlen = msdos_format_dirent_with_dot(
5d3ba: 2d47 feae movel %d7,%fp@(-338) <== NOT EXECUTED 5d3be: 2e09 movel %a1,%d7 <== NOT EXECUTED 5d3c0: 2241 moveal %d1,%a1 <== NOT EXECUTED 5d3c2: 2d44 feb2 movel %d4,%fp@(-334) <== NOT EXECUTED 5d3c6: 2a6e feba moveal %fp@(-326),%a5 <== NOT EXECUTED 5d3ca: 2800 movel %d0,%d4 <== NOT EXECUTED 5d3cc: 2d43 fea6 movel %d3,%fp@(-346) <== NOT EXECUTED
* copy base name to destination
*/
src_tmp = src;
len = i;
while (i-- > 0) {
*dst++ = tolower((unsigned char)(*src_tmp++));
5d3d0: 4281 clrl %d1 <== NOT EXECUTED 5d3d2: 1218 moveb %a0@+,%d1 <== NOT EXECUTED 5d3d4: 7603 moveq #3,%d3 <== NOT EXECUTED 5d3d6: 2401 movel %d1,%d2 <== NOT EXECUTED 5d3d8: 1031 1801 moveb %a1@(00000001,%d1:l),%d0 <== NOT EXECUTED 5d3dc: 49c0 extbl %d0 <== NOT EXECUTED 5d3de: c083 andl %d3,%d0 <== NOT EXECUTED 5d3e0: 163c 0001 moveb #1,%d3 <== NOT EXECUTED 5d3e4: b680 cmpl %d0,%d3 <== NOT EXECUTED 5d3e6: 6728 beqs 5d410 <msdos_dir_read+0x4b4> <== NOT EXECUTED 5d3e8: 1ac2 moveb %d2,%a5@+ <== NOT EXECUTED
/*
* copy base name to destination
*/
src_tmp = src;
len = i;
while (i-- > 0) {
5d3ea: b888 cmpl %a0,%d4 <== NOT EXECUTED 5d3ec: 66e2 bnes 5d3d0 <msdos_dir_read+0x474> <== NOT EXECUTED 5d3ee: 282e feb2 movel %fp@(-334),%d4 <== NOT EXECUTED 5d3f2: 2247 moveal %d7,%a1 <== NOT EXECUTED 5d3f4: 4bee fee8 lea %fp@(-280),%a5 <== NOT EXECUTED 5d3f8: 202e febe movel %fp@(-322),%d0 <== NOT EXECUTED 5d3fc: 2d44 feaa movel %d4,%fp@(-342) <== NOT EXECUTED 5d400: 262e fea6 movel %fp@(-346),%d3 <== NOT EXECUTED 5d404: 2e2e feae movel %fp@(-338),%d7 <== NOT EXECUTED 5d408: 41f5 0800 lea %a5@(00000000,%d0:l),%a0 <== NOT EXECUTED 5d40c: 6000 fe92 braw 5d2a0 <msdos_dir_read+0x344> <== NOT EXECUTED
*dst++ = tolower((unsigned char)(*src_tmp++));
5d410: 0682 0000 0020 addil #32,%d2 <== NOT EXECUTED 5d416: 1ac2 moveb %d2,%a5@+ <== NOT EXECUTED
/*
* copy base name to destination
*/
src_tmp = src;
len = i;
while (i-- > 0) {
5d418: b888 cmpl %a0,%d4 <== NOT EXECUTED 5d41a: 66b4 bnes 5d3d0 <msdos_dir_read+0x474> <== NOT EXECUTED 5d41c: 60d0 bras 5d3ee <msdos_dir_read+0x492> <== NOT EXECUTED
/*
* find last non-blank character of extension
*/
for ((i = MSDOS_SHORT_EXT_LEN ,
src_tmp = src + MSDOS_SHORT_BASE_LEN+MSDOS_SHORT_EXT_LEN-1);
((i > 0) &&
5d41e: 387c 0001 moveaw #1,%a4 <== NOT EXECUTED
{};
/*
* extension is not empty
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
5d422: 5288 addql #1,%a0 <== NOT EXECUTED
/*
* find last non-blank character of extension
*/
for ((i = MSDOS_SHORT_EXT_LEN ,
src_tmp = src + MSDOS_SHORT_BASE_LEN+MSDOS_SHORT_EXT_LEN-1);
((i > 0) &&
5d424: 2d4c febe movel %a4,%fp@(-322) <== NOT EXECUTED
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
len += i + 1; /* extension + dot */
src_tmp = src + MSDOS_SHORT_BASE_LEN;
while (i-- > 0) {
5d428: 202e febe movel %fp@(-322),%d0 <== NOT EXECUTED 5d42c: 5380 subql #1,%d0 <== NOT EXECUTED 5d42e: 2d40 feae movel %d0,%fp@(-338) <== NOT EXECUTED
/*
* extension is not empty
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
len += i + 1; /* extension + dot */
5d432: 2a6e feb6 moveal %fp@(-330),%a5 <== NOT EXECUTED 5d436: 202e febe movel %fp@(-322),%d0 <== NOT EXECUTED
* RETURNS: * the number of bytes read on success, or -1 if error occured (errno * set apropriately). */ ssize_t msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
5d43a: 242e fec2 movel %fp@(-318),%d2 <== NOT EXECUTED 5d43e: d4ae febe addl %fp@(-322),%d2 <== NOT EXECUTED
{};
/*
* extension is not empty
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
5d442: 2d48 feb2 movel %a0,%fp@(-334) <== NOT EXECUTED 5d446: 5388 subql #1,%a0 <== NOT EXECUTED
len += i + 1; /* extension + dot */
5d448: 4bf5 0801 lea %a5@(00000001,%d0:l),%a5 <== NOT EXECUTED
{};
/*
* extension is not empty
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
5d44c: 10fc 002e moveb #46,%a0@+ <== NOT EXECUTED
len += i + 1; /* extension + dot */
src_tmp = src + MSDOS_SHORT_BASE_LEN;
while (i-- > 0) {
5d450: 2879 0006 ec28 moveal 6ec28 <__ctype_ptr__>,%a4 <== NOT EXECUTED
/*
* extension is not empty
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
len += i + 1; /* extension + dot */
5d456: 2d4d fec2 movel %a5,%fp@(-318) <== NOT EXECUTED
{};
/*
* extension is not empty
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
5d45a: 206e feb2 moveal %fp@(-334),%a0 <== NOT EXECUTED 5d45e: 2a42 moveal %d2,%a5 <== NOT EXECUTED 5d460: 282e feaa movel %fp@(-342),%d4 <== NOT EXECUTED 5d464: 2d43 feb6 movel %d3,%fp@(-330) <== NOT EXECUTED
len += i + 1; /* extension + dot */
src_tmp = src + MSDOS_SHORT_BASE_LEN;
while (i-- > 0) {
*dst++ = tolower((unsigned char)(*src_tmp++));
5d468: 4281 clrl %d1 <== NOT EXECUTED 5d46a: 1219 moveb %a1@+,%d1 <== NOT EXECUTED 5d46c: 7603 moveq #3,%d3 <== NOT EXECUTED 5d46e: 2401 movel %d1,%d2 <== NOT EXECUTED 5d470: 1034 1801 moveb %a4@(00000001,%d1:l),%d0 <== NOT EXECUTED 5d474: 49c0 extbl %d0 <== NOT EXECUTED 5d476: c083 andl %d3,%d0 <== NOT EXECUTED 5d478: 163c 0001 moveb #1,%d3 <== NOT EXECUTED 5d47c: b680 cmpl %d0,%d3 <== NOT EXECUTED 5d47e: 6736 beqs 5d4b6 <msdos_dir_read+0x55a> <== NOT EXECUTED 5d480: 10c2 moveb %d2,%a0@+ <== NOT EXECUTED
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
len += i + 1; /* extension + dot */
src_tmp = src + MSDOS_SHORT_BASE_LEN;
while (i-- > 0) {
5d482: bbc9 cmpal %a1,%a5 <== NOT EXECUTED 5d484: 66e2 bnes 5d468 <msdos_dir_read+0x50c> <== NOT EXECUTED
* RETURNS: * the number of bytes read on success, or -1 if error occured (errno * set apropriately). */ ssize_t msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
5d486: 226e fec2 moveal %fp@(-318),%a1 <== NOT EXECUTED
{
/*
* convert dir entry from fixed 8+3 format (without dot)
* to 0..8 + 1dot + 0..3 format
*/
tmp_dirent.d_namlen = msdos_format_dirent_with_dot(
5d48a: 74ff moveq #-1,%d2 <== NOT EXECUTED
* RETURNS: * the number of bytes read on success, or -1 if error occured (errno * set apropriately). */ ssize_t msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
5d48c: 286e feae moveal %fp@(-338),%a4 <== NOT EXECUTED 5d490: 262e feb6 movel %fp@(-330),%d3 <== NOT EXECUTED
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
len += i + 1; /* extension + dot */
src_tmp = src + MSDOS_SHORT_BASE_LEN;
while (i-- > 0) {
5d494: 206e feb2 moveal %fp@(-334),%a0 <== NOT EXECUTED 5d498: d1ee febe addal %fp@(-322),%a0 <== NOT EXECUTED
* RETURNS: * the number of bytes read on success, or -1 if error occured (errno * set apropriately). */ ssize_t msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
5d49c: 43f1 c801 lea %a1@(00000001,%a4:l),%a1 <== NOT EXECUTED 5d4a0: 2d44 feaa movel %d4,%fp@(-342) <== NOT EXECUTED
while (i-- > 0) {
*dst++ = tolower((unsigned char)(*src_tmp++));
len++;
}
}
*dst = '\0'; /* terminate string */
5d4a4: 4210 clrb %a0@ <== NOT EXECUTED
* RETURNS: * the number of bytes read on success, or -1 if error occured (errno * set apropriately). */ ssize_t msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
5d4a6: 2d49 feb6 movel %a1,%fp@(-330) <== NOT EXECUTED
{
/*
* convert dir entry from fixed 8+3 format (without dot)
* to 0..8 + 1dot + 0..3 format
*/
tmp_dirent.d_namlen = msdos_format_dirent_with_dot(
5d4aa: 3a6e feb8 moveaw %fp@(-328),%a5 <== NOT EXECUTED 5d4ae: 3d4d fee6 movew %a5,%fp@(-282) <== NOT EXECUTED 5d4b2: 6000 fe1e braw 5d2d2 <msdos_dir_read+0x376> <== NOT EXECUTED
if (i > 0) {
*dst++ = '.'; /* append dot */
len += i + 1; /* extension + dot */
src_tmp = src + MSDOS_SHORT_BASE_LEN;
while (i-- > 0) {
*dst++ = tolower((unsigned char)(*src_tmp++));
5d4b6: 0682 0000 0020 addil #32,%d2 <== NOT EXECUTED 5d4bc: 60c2 bras 5d480 <msdos_dir_read+0x524> <== NOT EXECUTED
*/
ret = fat_file_read(iop->pathinfo.mt_entry, fat_fd, (j * bts2rd),
bts2rd, fs_info->cl_buf);
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
rtems_semaphore_release(fs_info->vol_sema);
5d4be: 2f2a 0088 movel %a2@(136),%sp@- <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
5d4c2: 3a7c ffff moveaw #-1,%a5 <== NOT EXECUTED 5d4c6: 7405 moveq #5,%d2 <== NOT EXECUTED
*/
ret = fat_file_read(iop->pathinfo.mt_entry, fat_fd, (j * bts2rd),
bts2rd, fs_info->cl_buf);
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
rtems_semaphore_release(fs_info->vol_sema);
5d4c8: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
5d4ce: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 5d4d4: 588f addql #4,%sp <== NOT EXECUTED 5d4d6: 2040 moveal %d0,%a0 <== NOT EXECUTED
j++;
}
rtems_semaphore_release(fs_info->vol_sema);
return cmpltd;
}
5d4d8: 200d movel %a5,%d0 <== NOT EXECUTED
ret = fat_file_read(iop->pathinfo.mt_entry, fat_fd, (j * bts2rd),
bts2rd, fs_info->cl_buf);
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
rtems_semaphore_release(fs_info->vol_sema);
rtems_set_errno_and_return_minus_one(EIO);
5d4da: 2082 movel %d2,%a0@ <== NOT EXECUTED
j++;
}
rtems_semaphore_release(fs_info->vol_sema);
return cmpltd;
}
5d4dc: 4cee 3cfc fe7c moveml %fp@(-388),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5d4e2: 4e5e unlk %fp <== NOT EXECUTED 5d4e4: 4e75 rts <== NOT EXECUTED
*/
for ((i = MSDOS_SHORT_EXT_LEN ,
src_tmp = src + MSDOS_SHORT_BASE_LEN+MSDOS_SHORT_EXT_LEN-1);
((i > 0) &&
(*src_tmp == ' '));
i--,src_tmp--)
5d4e6: 3a7c 0002 moveaw #2,%a5 <== NOT EXECUTED
{};
/*
* extension is not empty
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
5d4ea: 5288 addql #1,%a0 <== NOT EXECUTED
*/
for ((i = MSDOS_SHORT_EXT_LEN ,
src_tmp = src + MSDOS_SHORT_BASE_LEN+MSDOS_SHORT_EXT_LEN-1);
((i > 0) &&
(*src_tmp == ' '));
i--,src_tmp--)
5d4ec: 2d4d febe movel %a5,%fp@(-322) <== NOT EXECUTED
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
len += i + 1; /* extension + dot */
src_tmp = src + MSDOS_SHORT_BASE_LEN;
while (i-- > 0) {
5d4f0: 202e febe movel %fp@(-322),%d0 <== NOT EXECUTED 5d4f4: 5380 subql #1,%d0 <== NOT EXECUTED 5d4f6: 2d40 feae movel %d0,%fp@(-338) <== NOT EXECUTED
/*
* extension is not empty
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
len += i + 1; /* extension + dot */
5d4fa: 2a6e feb6 moveal %fp@(-330),%a5 <== NOT EXECUTED 5d4fe: 202e febe movel %fp@(-322),%d0 <== NOT EXECUTED
* RETURNS: * the number of bytes read on success, or -1 if error occured (errno * set apropriately). */ ssize_t msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
5d502: 242e fec2 movel %fp@(-318),%d2 <== NOT EXECUTED 5d506: d4ae febe addl %fp@(-322),%d2 <== NOT EXECUTED
{};
/*
* extension is not empty
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
5d50a: 2d48 feb2 movel %a0,%fp@(-334) <== NOT EXECUTED 5d50e: 5388 subql #1,%a0 <== NOT EXECUTED
len += i + 1; /* extension + dot */
5d510: 4bf5 0801 lea %a5@(00000001,%d0:l),%a5 <== NOT EXECUTED
{};
/*
* extension is not empty
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
5d514: 10fc 002e moveb #46,%a0@+ <== NOT EXECUTED
len += i + 1; /* extension + dot */
src_tmp = src + MSDOS_SHORT_BASE_LEN;
while (i-- > 0) {
5d518: 2879 0006 ec28 moveal 6ec28 <__ctype_ptr__>,%a4 <== NOT EXECUTED
/*
* extension is not empty
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
len += i + 1; /* extension + dot */
5d51e: 2d4d fec2 movel %a5,%fp@(-318) <== NOT EXECUTED
{};
/*
* extension is not empty
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
5d522: 206e feb2 moveal %fp@(-334),%a0 <== NOT EXECUTED 5d526: 2a42 moveal %d2,%a5 <== NOT EXECUTED 5d528: 282e feaa movel %fp@(-342),%d4 <== NOT EXECUTED 5d52c: 2d43 feb6 movel %d3,%fp@(-330) <== NOT EXECUTED 5d530: 6000 ff36 braw 5d468 <msdos_dir_read+0x50c> <== NOT EXECUTED
*dst++ = tolower((unsigned char)(*src_tmp++));
}
/*
* find last non-blank character of extension
*/
for ((i = MSDOS_SHORT_EXT_LEN ,
5d534: 387c 0003 moveaw #3,%a4 <== NOT EXECUTED
{};
/*
* extension is not empty
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
5d538: 5288 addql #1,%a0 <== NOT EXECUTED
*dst++ = tolower((unsigned char)(*src_tmp++));
}
/*
* find last non-blank character of extension
*/
for ((i = MSDOS_SHORT_EXT_LEN ,
5d53a: 2d4c febe movel %a4,%fp@(-322) <== NOT EXECUTED
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
len += i + 1; /* extension + dot */
src_tmp = src + MSDOS_SHORT_BASE_LEN;
while (i-- > 0) {
5d53e: 202e febe movel %fp@(-322),%d0 <== NOT EXECUTED 5d542: 5380 subql #1,%d0 <== NOT EXECUTED 5d544: 2d40 feae movel %d0,%fp@(-338) <== NOT EXECUTED
/*
* extension is not empty
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
len += i + 1; /* extension + dot */
5d548: 2a6e feb6 moveal %fp@(-330),%a5 <== NOT EXECUTED 5d54c: 202e febe movel %fp@(-322),%d0 <== NOT EXECUTED
* RETURNS: * the number of bytes read on success, or -1 if error occured (errno * set apropriately). */ ssize_t msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
5d550: 242e fec2 movel %fp@(-318),%d2 <== NOT EXECUTED 5d554: d4ae febe addl %fp@(-322),%d2 <== NOT EXECUTED
{};
/*
* extension is not empty
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
5d558: 2d48 feb2 movel %a0,%fp@(-334) <== NOT EXECUTED 5d55c: 5388 subql #1,%a0 <== NOT EXECUTED
len += i + 1; /* extension + dot */
5d55e: 4bf5 0801 lea %a5@(00000001,%d0:l),%a5 <== NOT EXECUTED
{};
/*
* extension is not empty
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
5d562: 10fc 002e moveb #46,%a0@+ <== NOT EXECUTED
len += i + 1; /* extension + dot */
src_tmp = src + MSDOS_SHORT_BASE_LEN;
while (i-- > 0) {
5d566: 2879 0006 ec28 moveal 6ec28 <__ctype_ptr__>,%a4 <== NOT EXECUTED
/*
* extension is not empty
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
len += i + 1; /* extension + dot */
5d56c: 2d4d fec2 movel %a5,%fp@(-318) <== NOT EXECUTED
{};
/*
* extension is not empty
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
5d570: 206e feb2 moveal %fp@(-334),%a0 <== NOT EXECUTED 5d574: 2a42 moveal %d2,%a5 <== NOT EXECUTED 5d576: 282e feaa movel %fp@(-342),%d4 <== NOT EXECUTED 5d57a: 2d43 feb6 movel %d3,%fp@(-330) <== NOT EXECUTED 5d57e: 6000 fee8 braw 5d468 <msdos_dir_read+0x50c> <== NOT EXECUTED
fs_info->fat.vol.bpc;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
5d582: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 5d588: 3a7c ffff moveaw #-1,%a5 <== NOT EXECUTED 5d58c: 2040 moveal %d0,%a0 <== NOT EXECUTED 5d58e: 7605 moveq #5,%d3 <== NOT EXECUTED
j++;
}
rtems_semaphore_release(fs_info->vol_sema);
return cmpltd;
}
5d590: 200d movel %a5,%d0 <== NOT EXECUTED
fs_info->fat.vol.bpc;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
5d592: 2083 movel %d3,%a0@ <== NOT EXECUTED
j++;
}
rtems_semaphore_release(fs_info->vol_sema);
return cmpltd;
}
5d594: 4cee 3cfc fe7c moveml %fp@(-388),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5d59a: 4e5e unlk %fp <== NOT EXECUTED 5d59c: 4e75 rts <== NOT EXECUTED
break;
}
j++;
}
rtems_semaphore_release(fs_info->vol_sema);
5d59e: 2f2a 0088 movel %a2@(136),%sp@- <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
while (count > 0)
5d5a2: 9bcd subal %a5,%a5 <== NOT EXECUTED
break;
}
j++;
}
rtems_semaphore_release(fs_info->vol_sema);
5d5a4: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
return cmpltd;
5d5aa: 588f addql #4,%sp <== NOT EXECUTED 5d5ac: 6000 fb1c braw 5d0ca <msdos_dir_read+0x16e> <== NOT EXECUTED
{
/*
* convert dir entry from fixed 8+3 format (without dot)
* to 0..8 + 1dot + 0..3 format
*/
tmp_dirent.d_namlen = msdos_format_dirent_with_dot(
5d5b0: 206e feba moveal %fp@(-326),%a0 <== NOT EXECUTED 5d5b4: 6000 fcea braw 5d2a0 <msdos_dir_read+0x344> <== NOT EXECUTED
0005d70a <msdos_dir_rmnod>:
* RC_OK on success, or -1 if error occured (errno set apropriately).
*/
int
msdos_dir_rmnod(rtems_filesystem_location_info_t *parent_pathloc,
rtems_filesystem_location_info_t *pathloc)
{
5d70a: 4e56 ffec linkw %fp,#-20 <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = pathloc->node_access;
bool is_empty = false;
5d70e: 4200 clrb %d0 <== NOT EXECUTED
* RC_OK on success, or -1 if error occured (errno set apropriately).
*/
int
msdos_dir_rmnod(rtems_filesystem_location_info_t *parent_pathloc,
rtems_filesystem_location_info_t *pathloc)
{
5d710: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ <== NOT EXECUTED 5d714: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
5d718: 206a 0010 moveal %a2@(16),%a0 <== NOT EXECUTED 5d71c: 2868 0034 moveal %a0@(52),%a4 <== NOT EXECUTED
fat_file_fd_t *fat_fd = pathloc->node_access;
bool is_empty = false;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
5d720: 42a7 clrl %sp@- <== NOT EXECUTED
rtems_filesystem_location_info_t *pathloc)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = pathloc->node_access;
5d722: 2652 moveal %a2@,%a3 <== NOT EXECUTED
bool is_empty = false;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
5d724: 42a7 clrl %sp@- <== NOT EXECUTED 5d726: 2f2c 0088 movel %a4@(136),%sp@- <== NOT EXECUTED
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = pathloc->node_access;
bool is_empty = false;
5d72a: 1d40 ffff moveb %d0,%fp@(-1) <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
5d72e: 4eb9 0004 af20 jsr 4af20 <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
5d734: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5d738: 4a80 tstl %d0 <== NOT EXECUTED 5d73a: 6600 00b4 bnew 5d7f0 <msdos_dir_rmnod+0xe6> <== NOT EXECUTED
/*
* We deny attempts to delete open directory (if directory is current
* directory we assume it is open one)
*/
if (fat_fd->links_num > 1)
5d73e: 7001 moveq #1,%d0 <== NOT EXECUTED 5d740: b0ab 0008 cmpl %a3@(8),%d0 <== NOT EXECUTED 5d744: 6500 0084 bcsw 5d7ca <msdos_dir_rmnod+0xc0> <== NOT EXECUTED
}
/*
* You cannot remove a node that still has children
*/
rc = msdos_dir_is_empty(pathloc->mt_entry, fat_fd, &is_empty);
5d748: 486e ffff pea %fp@(-1) <== NOT EXECUTED 5d74c: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5d74e: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 5d752: 4eb9 0005 a29c jsr 5a29c <msdos_dir_is_empty> <== NOT EXECUTED
if (rc != RC_OK)
5d758: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
}
/*
* You cannot remove a node that still has children
*/
rc = msdos_dir_is_empty(pathloc->mt_entry, fat_fd, &is_empty);
5d75c: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc != RC_OK)
5d75e: 6652 bnes 5d7b2 <msdos_dir_rmnod+0xa8> <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
if (!is_empty)
5d760: 4a2e ffff tstb %fp@(-1) <== NOT EXECUTED 5d764: 6700 00a4 beqw 5d80a <msdos_dir_rmnod+0x100> <== NOT EXECUTED
fat_file_mark_removed(pathloc->mt_entry, fat_fd);
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
5d768: 206a 0010 moveal %a2@(16),%a0 <== NOT EXECUTED
}
/*
* You cannot remove the file system root node.
*/
if (rtems_filesystem_is_root_location(pathloc))
5d76c: 2028 001c movel %a0@(28),%d0 <== NOT EXECUTED 5d770: b092 cmpl %a2@,%d0 <== NOT EXECUTED 5d772: 6756 beqs 5d7ca <msdos_dir_rmnod+0xc0> <== NOT EXECUTED
* You cannot remove a mountpoint.
* not used - mount() not implemenetd yet.
*/
/* mark file removed */
rc = msdos_set_first_char4file_name(pathloc->mt_entry, &fat_fd->dir_pos,
5d774: 4878 00e5 pea e5 <DBL_MANT_DIG+0xb0> <== NOT EXECUTED 5d778: 486b 0020 pea %a3@(32) <== NOT EXECUTED 5d77c: 2f08 movel %a0,%sp@- <== NOT EXECUTED 5d77e: 4eb9 0005 a0de jsr 5a0de <msdos_set_first_char4file_name> <== NOT EXECUTED
MSDOS_THIS_DIR_ENTRY_EMPTY);
if (rc != RC_OK)
5d784: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
* You cannot remove a mountpoint.
* not used - mount() not implemenetd yet.
*/
/* mark file removed */
rc = msdos_set_first_char4file_name(pathloc->mt_entry, &fat_fd->dir_pos,
5d788: 2400 movel %d0,%d2 <== NOT EXECUTED
MSDOS_THIS_DIR_ENTRY_EMPTY);
if (rc != RC_OK)
5d78a: 6626 bnes 5d7b2 <msdos_dir_rmnod+0xa8> <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
fat_file_mark_removed(pathloc->mt_entry, fat_fd);
5d78c: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5d78e: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 5d792: 4eb9 0005 35ae jsr 535ae <fat_file_mark_removed> <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
5d798: 2f2c 0088 movel %a4@(136),%sp@- <== NOT EXECUTED 5d79c: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
return rc;
5d7a2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
}
5d7a6: 2002 movel %d2,%d0 <== NOT EXECUTED 5d7a8: 4cee 1c04 ffec moveml %fp@(-20),%d2/%a2-%a4 <== NOT EXECUTED 5d7ae: 4e5e unlk %fp <== NOT EXECUTED 5d7b0: 4e75 rts <== NOT EXECUTED
/* mark file removed */
rc = msdos_set_first_char4file_name(pathloc->mt_entry, &fat_fd->dir_pos,
MSDOS_THIS_DIR_ENTRY_EMPTY);
if (rc != RC_OK)
{
rtems_semaphore_release(fs_info->vol_sema);
5d7b2: 2f2c 0088 movel %a4@(136),%sp@- <== NOT EXECUTED 5d7b6: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
return rc;
5d7bc: 588f addql #4,%sp <== NOT EXECUTED
fat_file_mark_removed(pathloc->mt_entry, fat_fd);
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
5d7be: 2002 movel %d2,%d0 <== NOT EXECUTED 5d7c0: 4cee 1c04 ffec moveml %fp@(-20),%d2/%a2-%a4 <== NOT EXECUTED 5d7c6: 4e5e unlk %fp <== NOT EXECUTED 5d7c8: 4e75 rts <== NOT EXECUTED
/*
* You cannot remove the file system root node.
*/
if (rtems_filesystem_is_root_location(pathloc))
{
rtems_semaphore_release(fs_info->vol_sema);
5d7ca: 2f2c 0088 movel %a4@(136),%sp@- <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EBUSY);
5d7ce: 74ff moveq #-1,%d2 <== NOT EXECUTED
/*
* You cannot remove the file system root node.
*/
if (rtems_filesystem_is_root_location(pathloc))
{
rtems_semaphore_release(fs_info->vol_sema);
5d7d0: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EBUSY);
5d7d6: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 5d7dc: 588f addql #4,%sp <== NOT EXECUTED 5d7de: 2040 moveal %d0,%a0 <== NOT EXECUTED 5d7e0: 7010 moveq #16,%d0 <== NOT EXECUTED 5d7e2: 2080 movel %d0,%a0@ <== NOT EXECUTED
fat_file_mark_removed(pathloc->mt_entry, fat_fd);
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
5d7e4: 2002 movel %d2,%d0 <== NOT EXECUTED 5d7e6: 4cee 1c04 ffec moveml %fp@(-20),%d2/%a2-%a4 <== NOT EXECUTED 5d7ec: 4e5e unlk %fp <== NOT EXECUTED 5d7ee: 4e75 rts <== NOT EXECUTED
bool is_empty = false;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
5d7f0: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 5d7f6: 74ff moveq #-1,%d2 <== NOT EXECUTED 5d7f8: 2040 moveal %d0,%a0 <== NOT EXECUTED 5d7fa: 7005 moveq #5,%d0 <== NOT EXECUTED 5d7fc: 2080 movel %d0,%a0@ <== NOT EXECUTED
fat_file_mark_removed(pathloc->mt_entry, fat_fd);
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
5d7fe: 2002 movel %d2,%d0 <== NOT EXECUTED 5d800: 4cee 1c04 ffec moveml %fp@(-20),%d2/%a2-%a4 <== NOT EXECUTED 5d806: 4e5e unlk %fp <== NOT EXECUTED 5d808: 4e75 rts <== NOT EXECUTED
return rc;
}
if (!is_empty)
{
rtems_semaphore_release(fs_info->vol_sema);
5d80a: 2f2c 0088 movel %a4@(136),%sp@- <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOTEMPTY);
5d80e: 74ff moveq #-1,%d2 <== NOT EXECUTED
return rc;
}
if (!is_empty)
{
rtems_semaphore_release(fs_info->vol_sema);
5d810: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOTEMPTY);
5d816: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 5d81c: 588f addql #4,%sp <== NOT EXECUTED 5d81e: 725a moveq #90,%d1 <== NOT EXECUTED 5d820: 2040 moveal %d0,%a0 <== NOT EXECUTED
fat_file_mark_removed(pathloc->mt_entry, fat_fd);
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
5d822: 2002 movel %d2,%d0 <== NOT EXECUTED 5d824: 4cee 1c04 ffec moveml %fp@(-20),%d2/%a2-%a4 <== NOT EXECUTED
}
if (!is_empty)
{
rtems_semaphore_release(fs_info->vol_sema);
rtems_set_errno_and_return_minus_one(ENOTEMPTY);
5d82a: 2081 movel %d1,%a0@ <== NOT EXECUTED
fat_file_mark_removed(pathloc->mt_entry, fat_fd);
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
5d82c: 4e5e unlk %fp <== NOT EXECUTED
0005d5e0 <msdos_dir_stat>:
int
msdos_dir_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
5d5e0: 4e56 ffe8 linkw %fp,#-24 5d5e4: 206e 0008 moveal %fp@(8),%a0
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
5d5e8: 2268 0010 moveal %a0@(16),%a1
int
msdos_dir_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
5d5ec: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
5d5f0: 2669 0034 moveal %a1@(52),%a3
fat_file_fd_t *fat_fd = loc->node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
5d5f4: 42a7 clrl %sp@-
int
msdos_dir_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
5d5f6: 246e 000c moveal %fp@(12),%a2
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = loc->node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
5d5fa: 42a7 clrl %sp@- 5d5fc: 2f2b 0088 movel %a3@(136),%sp@-
struct stat *buf
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = loc->node_access;
5d600: 2850 moveal %a0@,%a4
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
5d602: 4eb9 0004 af20 jsr 4af20 <rtems_semaphore_obtain>
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
5d608: 4fef 000c lea %sp@(12),%sp 5d60c: 4a80 tstl %d0
5d60e: 6666 bnes 5d676 <msdos_dir_stat+0x96> <== NEVER TAKEN
buf->st_dev = fs_info->fat.vol.dev;
buf->st_ino = fat_fd->ino;
buf->st_mode = S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO;
buf->st_rdev = 0ll;
buf->st_size = fat_fd->fat_file_size;
5d610: 202c 0018 movel %a4@(24),%d0
buf->st_blocks = fat_fd->fat_file_size >> FAT_SECTOR512_BITS;
5d614: 7209 moveq #9,%d1 5d616: 2400 movel %d0,%d2 5d618: e2aa lsrl %d1,%d2
buf->st_blksize = fs_info->fat.vol.bps;
5d61a: 4281 clrl %d1
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
buf->st_dev = fs_info->fat.vol.dev;
5d61c: 262b 004a movel %a3@(74),%d3 5d620: 282b 004e movel %a3@(78),%d4
buf->st_ino = fat_fd->ino;
5d624: 256c 000c 0008 movel %a4@(12),%a2@(8)
buf->st_mode = S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO;
buf->st_rdev = 0ll;
buf->st_size = fat_fd->fat_file_size;
buf->st_blocks = fat_fd->fat_file_size >> FAT_SECTOR512_BITS;
buf->st_blksize = fs_info->fat.vol.bps;
5d62a: 3213 movew %a3@,%d1
buf->st_mtime = fat_fd->mtime;
5d62c: 256c 003e 002e movel %a4@(62),%a2@(46)
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
buf->st_dev = fs_info->fat.vol.dev;
5d632: 2483 movel %d3,%a2@ 5d634: 2544 0004 movel %d4,%a2@(4)
buf->st_ino = fat_fd->ino;
buf->st_mode = S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO;
buf->st_rdev = 0ll;
5d638: 4283 clrl %d3 5d63a: 4284 clrl %d4
buf->st_size = fat_fd->fat_file_size;
buf->st_blocks = fat_fd->fat_file_size >> FAT_SECTOR512_BITS;
buf->st_blksize = fs_info->fat.vol.bps;
buf->st_mtime = fat_fd->mtime;
rtems_semaphore_release(fs_info->vol_sema);
5d63c: 2f2b 0088 movel %a3@(136),%sp@-
rtems_set_errno_and_return_minus_one(EIO);
buf->st_dev = fs_info->fat.vol.dev;
buf->st_ino = fat_fd->ino;
buf->st_mode = S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO;
buf->st_rdev = 0ll;
5d640: 2543 0016 movel %d3,%a2@(22) 5d644: 2544 001a movel %d4,%a2@(26)
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
buf->st_dev = fs_info->fat.vol.dev;
buf->st_ino = fat_fd->ino;
buf->st_mode = S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO;
5d648: 283c 0000 41ff movel #16895,%d4
buf->st_rdev = 0ll;
buf->st_size = fat_fd->fat_file_size;
5d64e: 2540 0022 movel %d0,%a2@(34)
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
buf->st_dev = fs_info->fat.vol.dev;
buf->st_ino = fat_fd->ino;
buf->st_mode = S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO;
5d652: 2544 000c movel %d4,%a2@(12)
buf->st_rdev = 0ll;
buf->st_size = fat_fd->fat_file_size;
5d656: 42aa 001e clrl %a2@(30)
buf->st_blocks = fat_fd->fat_file_size >> FAT_SECTOR512_BITS;
5d65a: 2542 0042 movel %d2,%a2@(66)
buf->st_blksize = fs_info->fat.vol.bps;
5d65e: 2541 003e movel %d1,%a2@(62)
buf->st_mtime = fat_fd->mtime;
rtems_semaphore_release(fs_info->vol_sema);
5d662: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release>
return RC_OK;
5d668: 588f addql #4,%sp 5d66a: 4280 clrl %d0
}
5d66c: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 5d672: 4e5e unlk %fp 5d674: 4e75 rts
fat_file_fd_t *fat_fd = loc->node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
5d676: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 5d67c: 7205 moveq #5,%d1 <== NOT EXECUTED 5d67e: 2040 moveal %d0,%a0 <== NOT EXECUTED 5d680: 70ff moveq #-1,%d0 <== NOT EXECUTED
buf->st_blksize = fs_info->fat.vol.bps;
buf->st_mtime = fat_fd->mtime;
rtems_semaphore_release(fs_info->vol_sema);
return RC_OK;
}
5d682: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 <== NOT EXECUTED
fat_file_fd_t *fat_fd = loc->node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
5d688: 2081 movel %d1,%a0@ <== NOT EXECUTED
buf->st_blksize = fs_info->fat.vol.bps;
buf->st_mtime = fat_fd->mtime;
rtems_semaphore_release(fs_info->vol_sema);
return RC_OK;
}
5d68a: 4e5e unlk %fp <== NOT EXECUTED
0005d68e <msdos_dir_sync>:
* RETURNS:
* RC_OK on success, or -1 if error occured (errno set apropriately).
*/
int
msdos_dir_sync(rtems_libio_t *iop)
{
5d68e: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 5d692: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ <== NOT EXECUTED 5d696: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
5d69a: 206a 0028 moveal %a2@(40),%a0 <== NOT EXECUTED 5d69e: 2668 0034 moveal %a0@(52),%a3 <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
5d6a2: 42a7 clrl %sp@- <== NOT EXECUTED
int
msdos_dir_sync(rtems_libio_t *iop)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
5d6a4: 242a 0018 movel %a2@(24),%d2 <== NOT EXECUTED
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
5d6a8: 42a7 clrl %sp@- <== NOT EXECUTED 5d6aa: 2f2b 0088 movel %a3@(136),%sp@- <== NOT EXECUTED 5d6ae: 4eb9 0004 af20 jsr 4af20 <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
5d6b4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5d6b8: 4a80 tstl %d0 <== NOT EXECUTED 5d6ba: 6628 bnes 5d6e4 <msdos_dir_sync+0x56> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
rc = fat_file_datasync(iop->pathinfo.mt_entry, fat_fd);
5d6bc: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5d6be: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 5d6c2: 4eb9 0005 36b0 jsr 536b0 <fat_file_datasync> <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
5d6c8: 2f2b 0088 movel %a3@(136),%sp@- <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
rc = fat_file_datasync(iop->pathinfo.mt_entry, fat_fd);
5d6cc: 2440 moveal %d0,%a2 <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
5d6ce: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
return rc;
5d6d4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
}
5d6d8: 200a movel %a2,%d0 <== NOT EXECUTED 5d6da: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 5d6e0: 4e5e unlk %fp <== NOT EXECUTED 5d6e2: 4e75 rts <== NOT EXECUTED
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
5d6e4: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 5d6ea: 347c ffff moveaw #-1,%a2 <== NOT EXECUTED 5d6ee: 2040 moveal %d0,%a0 <== NOT EXECUTED 5d6f0: 7405 moveq #5,%d2 <== NOT EXECUTED
rc = fat_file_datasync(iop->pathinfo.mt_entry, fat_fd);
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
5d6f2: 200a movel %a2,%d0 <== NOT EXECUTED
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
5d6f4: 2082 movel %d2,%a0@ <== NOT EXECUTED
rc = fat_file_datasync(iop->pathinfo.mt_entry, fat_fd);
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
5d6f6: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 5d6fc: 4e5e unlk %fp <== NOT EXECUTED
00058ff8 <msdos_eval4make>:
msdos_eval4make(
const char *path,
rtems_filesystem_location_info_t *pathloc,
const char **name
)
{
58ff8: 4e56 ffd0 linkw %fp,#-48 58ffc: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 59000: 246e 000c moveal %fp@(12),%a2
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
59004: 206a 0010 moveal %a2@(16),%a0 59008: 2668 0034 moveal %a0@(52),%a3
int i = 0;
int token_len;
const char *token;
bool done = false;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
5900c: 42a7 clrl %sp@-
msdos_eval4make(
const char *path,
rtems_filesystem_location_info_t *pathloc,
const char **name
)
{
5900e: 2a6e 0008 moveal %fp@(8),%a5
int i = 0;
int token_len;
const char *token;
bool done = false;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
59012: 42a7 clrl %sp@- 59014: 2f2b 0088 movel %a3@(136),%sp@- 59018: 4eb9 0004 af20 jsr 4af20 <rtems_semaphore_obtain>
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
5901e: 4fef 000c lea %sp@(12),%sp 59022: 4a80 tstl %d0 59024: 6600 0236 bnew 5925c <msdos_eval4make+0x264>
rtems_set_errno_and_return_minus_one(EIO);
if (!pathloc->node_access)
59028: 2012 movel %a2@,%d0 5902a: 6700 0198 beqw 591c4 <msdos_eval4make+0x1cc>
goto err;
}
fat_fd = pathloc->node_access;
rc = fat_file_reopen(fat_fd);
5902e: 2f00 movel %d0,%sp@- 59030: 4eb9 0005 2c62 jsr 52c62 <fat_file_reopen>
if (rc != RC_OK)
59036: 588f addql #4,%sp
goto err;
}
fat_fd = pathloc->node_access;
rc = fat_file_reopen(fat_fd);
59038: 2600 movel %d0,%d3
if (rc != RC_OK)
5903a: 6718 beqs 59054 <msdos_eval4make+0x5c> <== ALWAYS TAKEN
error:
fat_file_close(pathloc->mt_entry, fat_fd);
err:
rtems_semaphore_release(fs_info->vol_sema);
5903c: 2f2b 0088 movel %a3@(136),%sp@- <== NOT EXECUTED 59040: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
return rc;
59046: 588f addql #4,%sp <== NOT EXECUTED
}
59048: 2003 movel %d3,%d0 5904a: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 59050: 4e5e unlk %fp 59052: 4e75 rts 59054: 2e0e movel %fp,%d7 59056: 2c0e movel %fp,%d6
}
fat_fd = pathloc->node_access;
rc = fat_file_reopen(fat_fd);
if (rc != RC_OK)
59058: 4282 clrl %d2 5905a: 5187 subql #8,%d7 5905c: 5986 subql #4,%d6 5905e: 2a3c 0005 9cf2 movel #367858,%d5
goto err;
while (!done)
{
type = msdos_get_token(&path[i], strlen(&path[i]), &token, &token_len);
59064: 280d movel %a5,%d4 59066: d882 addl %d2,%d4 59068: 2f04 movel %d4,%sp@- 5906a: 4eb9 0005 f084 jsr 5f084 <strlen> 59070: 2045 moveal %d5,%a0 59072: 2e87 movel %d7,%sp@ 59074: 2f06 movel %d6,%sp@- 59076: 2f00 movel %d0,%sp@- 59078: 2f04 movel %d4,%sp@-
i += token_len;
fat_fd = pathloc->node_access;
switch (type)
5907a: 7802 moveq #2,%d4
if (rc != RC_OK)
goto err;
while (!done)
{
type = msdos_get_token(&path[i], strlen(&path[i]), &token, &token_len);
5907c: 4e90 jsr %a0@
i += token_len;
5907e: 222e fff8 movel %fp@(-8),%d1
fat_fd = pathloc->node_access;
switch (type)
59082: 4fef 0010 lea %sp@(16),%sp
goto err;
while (!done)
{
type = msdos_get_token(&path[i], strlen(&path[i]), &token, &token_len);
i += token_len;
59086: d481 addl %d1,%d2
fat_fd = pathloc->node_access;
59088: 2852 moveal %a2@,%a4
switch (type)
5908a: b880 cmpl %d0,%d4 5908c: 6700 00ec beqw 5917a <msdos_eval4make+0x182>
59090: 652e bcss 590c0 <msdos_eval4make+0xc8>
59092: 4a80 tstl %d0
59094: 66ce bnes 59064 <msdos_eval4make+0x6c>
done = true;
}
break;
case MSDOS_NO_MORE_PATH:
errno = EEXIST;
59096: 4eb9 0005 d92c jsr 5d92c <__errno>
rc = -1;
5909c: 76ff moveq #-1,%d3
done = true;
}
break;
case MSDOS_NO_MORE_PATH:
errno = EEXIST;
5909e: 2040 moveal %d0,%a0 590a0: 7011 moveq #17,%d0 590a2: 2080 movel %d0,%a0@
rtems_semaphore_release(fs_info->vol_sema);
return RC_OK;
error:
fat_file_close(pathloc->mt_entry, fat_fd);
590a4: 2f0c movel %a4,%sp@- 590a6: 2f2a 0010 movel %a2@(16),%sp@- 590aa: 4eb9 0005 2fc2 jsr 52fc2 <fat_file_close> 590b0: 508f addql #8,%sp
err:
rtems_semaphore_release(fs_info->vol_sema);
590b2: 2f2b 0088 movel %a3@(136),%sp@- 590b6: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release>
return rc;
590bc: 588f addql #4,%sp 590be: 6088 bras 59048 <msdos_eval4make+0x50>
{
type = msdos_get_token(&path[i], strlen(&path[i]), &token, &token_len);
i += token_len;
fat_fd = pathloc->node_access;
switch (type)
590c0: 7803 moveq #3,%d4 590c2: b880 cmpl %d0,%d4
590c4: 6724 beqs 590ea <msdos_eval4make+0xf2> <== ALWAYS TAKEN
590c6: 7204 moveq #4,%d1 <== NOT EXECUTED 590c8: b280 cmpl %d0,%d1 <== NOT EXECUTED 590ca: 6698 bnes 59064 <msdos_eval4make+0x6c> <== NOT EXECUTED
case MSDOS_CURRENT_DIR:
break;
case MSDOS_INVALID_TOKEN:
errno = ENAMETOOLONG;
590cc: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 590d2: 7e5b moveq #91,%d7 <== NOT EXECUTED
rc = -1;
590d4: 76ff moveq #-1,%d3 <== NOT EXECUTED
case MSDOS_CURRENT_DIR:
break;
case MSDOS_INVALID_TOKEN:
errno = ENAMETOOLONG;
590d6: 2040 moveal %d0,%a0 <== NOT EXECUTED 590d8: 2087 movel %d7,%a0@ <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return RC_OK;
error:
fat_file_close(pathloc->mt_entry, fat_fd);
590da: 2f0c movel %a4,%sp@- <== NOT EXECUTED 590dc: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 590e0: 4eb9 0005 2fc2 jsr 52fc2 <fat_file_close> <== NOT EXECUTED 590e6: 508f addql #8,%sp <== NOT EXECUTED 590e8: 60c8 bras 590b2 <msdos_eval4make+0xba> <== NOT EXECUTED
case MSDOS_NAME:
/*
* Only a directory can be decended into.
*/
if (fat_fd->fat_file_type != FAT_DIRECTORY)
590ea: 7001 moveq #1,%d0 590ec: b0ac 0010 cmpl %a4@(16),%d0 590f0: 6600 0184 bnew 59276 <msdos_eval4make+0x27e>
/*
* Otherwise find the token name in the present location and
* set the node access to the point we have found.
*/
rc = msdos_find_name(pathloc, token, token_len);
590f4: 2f01 movel %d1,%sp@- 590f6: 2f2e fffc movel %fp@(-4),%sp@- 590fa: 2f0a movel %a2,%sp@- 590fc: 4eb9 0005 b282 jsr 5b282 <msdos_find_name>
if (rc)
59102: 4fef 000c lea %sp@(12),%sp 59106: 4a80 tstl %d0 59108: 6700 ff5a beqw 59064 <msdos_eval4make+0x6c>
{
if (rc != MSDOS_NAME_NOT_FOUND_ERR)
5910c: 0c80 0000 7d01 cmpil #32001,%d0 59112: 6600 0182 bnew 59296 <msdos_eval4make+0x29e>
break;
}
}
*name = &path[i - token_len];
59116: 2002 movel %d2,%d0 59118: 90ae fff8 subl %fp@(-8),%d0 5911c: d08d addl %a5,%d0 5911e: 206e 0010 moveal %fp@(16),%a0 59122: 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++)
59124: 1035 2800 moveb %a5@(00000000,%d2:l),%d0
59128: 671e beqs 59148 <msdos_eval4make+0x150> * RETURNS: * RC_OK, filled pathloc for parent directory and name of new node on * success, or -1 if error occured (errno set appropriately) */ int msdos_eval4make(
5912a: 4bf5 2801 lea %a5@(00000001,%d2:l),%a5 5912e: 283c 0004 821c movel #295452,%d4
* 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 (!msdos_is_separator(path[i]))
59134: 49c0 extbl %d0 59136: 2044 moveal %d4,%a0 59138: 2f00 movel %d0,%sp@- 5913a: 4e90 jsr %a0@ 5913c: 588f addql #4,%sp 5913e: 4a80 tstl %d0 59140: 6700 0154 beqw 59296 <msdos_eval4make+0x29e>
/*
* 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++)
59144: 101d moveb %a5@+,%d0
59146: 66ec bnes 59134 <msdos_eval4make+0x13c>
rc = -1;
goto error;
}
}
fat_fd = pathloc->node_access;
59148: 2852 moveal %a2@,%a4
if (fat_fd->fat_file_type != FAT_DIRECTORY)
5914a: 7001 moveq #1,%d0 5914c: b0ac 0010 cmpl %a4@(16),%d0 59150: 6600 0124 bnew 59276 <msdos_eval4make+0x27e>
* None
*/
static void
msdos_set_handlers(rtems_filesystem_location_info_t *loc)
{
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
59154: 206a 0010 moveal %a2@(16),%a0
fat_file_fd_t *fat_fd = loc->node_access;
if (fat_fd->fat_file_type == FAT_DIRECTORY)
loc->handlers = fs_info->directory_handlers;
59158: 2068 0034 moveal %a0@(52),%a0 5915c: 2568 0080 0008 movel %a0@(128),%a2@(8)
goto error;
}
msdos_set_handlers(pathloc);
rtems_semaphore_release(fs_info->vol_sema);
59162: 2f2b 0088 movel %a3@(136),%sp@- 59166: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release>
return RC_OK;
5916c: 588f addql #4,%sp
fat_file_close(pathloc->mt_entry, fat_fd);
err:
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
5916e: 2003 movel %d3,%d0 59170: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 59176: 4e5e unlk %fp 59178: 4e75 rts
{
case MSDOS_UP_DIR:
/*
* Only a directory can be decended into.
*/
if (fat_fd->fat_file_type != FAT_DIRECTORY)
5917a: 7801 moveq #1,%d4 5917c: b8ac 0010 cmpl %a4@(16),%d4 59180: 6600 00f4 bnew 59276 <msdos_eval4make+0x27e>
fat_file_close(pathloc->mt_entry, fat_fd);
err:
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
59184: 206a 0010 moveal %a2@(16),%a0
}
/*
* Am I at the root of this mounted filesystem?
*/
if (rtems_filesystem_is_root_location(pathloc))
59188: b9e8 001c cmpal %a0@(28),%a4
5918c: 6754 beqs 591e2 <msdos_eval4make+0x1ea> <== ALWAYS TAKEN
pathloc, name);
}
}
else
{
rc = msdos_find_name(pathloc, token, token_len);
5918e: 2f01 movel %d1,%sp@- <== NOT EXECUTED 59190: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 59194: 2f0a movel %a2,%sp@- <== NOT EXECUTED 59196: 4eb9 0005 b282 jsr 5b282 <msdos_find_name> <== NOT EXECUTED
if (rc != RC_OK)
5919c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 591a0: 4a80 tstl %d0 <== NOT EXECUTED 591a2: 6700 fec0 beqw 59064 <msdos_eval4make+0x6c> <== NOT EXECUTED
{
if (rc == MSDOS_NAME_NOT_FOUND_ERR)
591a6: 0c80 0000 7d01 cmpil #32001,%d0 <== NOT EXECUTED 591ac: 6700 00e8 beqw 59296 <msdos_eval4make+0x29e> <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return RC_OK;
error:
fat_file_close(pathloc->mt_entry, fat_fd);
591b0: 2f0c movel %a4,%sp@- <== NOT EXECUTED 591b2: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED
else
{
rc = msdos_find_name(pathloc, token, token_len);
if (rc != RC_OK)
{
if (rc == MSDOS_NAME_NOT_FOUND_ERR)
591b6: 2600 movel %d0,%d3 <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return RC_OK;
error:
fat_file_close(pathloc->mt_entry, fat_fd);
591b8: 4eb9 0005 2fc2 jsr 52fc2 <fat_file_close> <== NOT EXECUTED 591be: 508f addql #8,%sp <== NOT EXECUTED 591c0: 6000 fef0 braw 590b2 <msdos_eval4make+0xba> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
if (!pathloc->node_access)
{
errno = ENOENT;
591c4: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED
rc = -1;
591ca: 76ff moveq #-1,%d3 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
if (!pathloc->node_access)
{
errno = ENOENT;
591cc: 7202 moveq #2,%d1 <== NOT EXECUTED 591ce: 2040 moveal %d0,%a0 <== NOT EXECUTED 591d0: 2081 movel %d1,%a0@ <== NOT EXECUTED
error:
fat_file_close(pathloc->mt_entry, fat_fd);
err:
rtems_semaphore_release(fs_info->vol_sema);
591d2: 2f2b 0088 movel %a3@(136),%sp@- <== NOT EXECUTED 591d6: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
return rc;
591dc: 588f addql #4,%sp <== NOT EXECUTED 591de: 6000 fe68 braw 59048 <msdos_eval4make+0x50> <== NOT EXECUTED
/*
* Am I at the root of all filesystems?
* XXX: MSDOS is not supposed to be base fs.
*/
if (pathloc->node_access ==
rtems_filesystem_root.node_access)
591e2: 2279 0006 eb00 moveal 6eb00 <rtems_current_user_env>,%a1
{
/*
* Am I at the root of all filesystems?
* XXX: MSDOS is not supposed to be base fs.
*/
if (pathloc->node_access ==
591e8: b9e9 0018 cmpal %a1@(24),%a4 591ec: 6700 fe76 beqw 59064 <msdos_eval4make+0x6c>
break; /* Throw out the .. in this case */
}
else
{
newloc = pathloc->mt_entry->mt_point_node;
*pathloc = newloc;
591f0: 24a8 0008 movel %a0@(8),%a2@ <== NOT EXECUTED
{
break; /* Throw out the .. in this case */
}
else
{
newloc = pathloc->mt_entry->mt_point_node;
591f4: 2628 000c movel %a0@(12),%d3 <== NOT EXECUTED 591f8: 2268 0010 moveal %a0@(16),%a1 <== NOT EXECUTED 591fc: 2228 0014 movel %a0@(20),%d1 <== NOT EXECUTED 59200: 2028 0018 movel %a0@(24),%d0 <== NOT EXECUTED
*pathloc = newloc;
rc = fat_file_close(pathloc->mt_entry, fat_fd);
59204: 2f0c movel %a4,%sp@- <== NOT EXECUTED
break; /* Throw out the .. in this case */
}
else
{
newloc = pathloc->mt_entry->mt_point_node;
*pathloc = newloc;
59206: 2543 0004 movel %d3,%a2@(4) <== NOT EXECUTED 5920a: 2549 0008 movel %a1,%a2@(8) <== NOT EXECUTED 5920e: 2541 000c movel %d1,%a2@(12) <== NOT EXECUTED 59212: 2540 0010 movel %d0,%a2@(16) <== NOT EXECUTED
rc = fat_file_close(pathloc->mt_entry, fat_fd);
59216: 2f00 movel %d0,%sp@- <== NOT EXECUTED 59218: 4eb9 0005 2fc2 jsr 52fc2 <fat_file_close> <== NOT EXECUTED
if (rc != RC_OK)
5921e: 508f addql #8,%sp <== NOT EXECUTED
else
{
newloc = pathloc->mt_entry->mt_point_node;
*pathloc = newloc;
rc = fat_file_close(pathloc->mt_entry, fat_fd);
59220: 2600 movel %d0,%d3 <== NOT EXECUTED
if (rc != RC_OK)
59222: 6600 fe18 bnew 5903c <msdos_eval4make+0x44> <== NOT EXECUTED
goto err;
rtems_semaphore_release(fs_info->vol_sema);
59226: 2f2b 0088 movel %a3@(136),%sp@- <== NOT EXECUTED 5922a: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
return (*pathloc->ops->evalformake_h)(&path[i-token_len],
59230: 206a 000c moveal %a2@(12),%a0 <== NOT EXECUTED 59234: 94ae fff8 subl %fp@(-8),%d2 <== NOT EXECUTED 59238: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 5923c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5923e: 4875 2800 pea %a5@(00000000,%d2:l) <== NOT EXECUTED 59242: 2028 0004 movel %a0@(4),%d0 <== NOT EXECUTED 59246: 2040 moveal %d0,%a0 <== NOT EXECUTED 59248: 4e90 jsr %a0@ <== NOT EXECUTED 5924a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5924e: 2600 movel %d0,%d3 <== NOT EXECUTED
fat_file_close(pathloc->mt_entry, fat_fd);
err:
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
59250: 2003 movel %d3,%d0 <== NOT EXECUTED 59252: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 59258: 4e5e unlk %fp <== NOT EXECUTED 5925a: 4e75 rts <== NOT EXECUTED
bool done = false;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
5925c: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 59262: 76ff moveq #-1,%d3 <== NOT EXECUTED 59264: 7405 moveq #5,%d2 <== NOT EXECUTED 59266: 2040 moveal %d0,%a0 <== NOT EXECUTED
fat_file_close(pathloc->mt_entry, fat_fd);
err:
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
59268: 2003 movel %d3,%d0 <== NOT EXECUTED
bool done = false;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
5926a: 2082 movel %d2,%a0@ <== NOT EXECUTED
fat_file_close(pathloc->mt_entry, fat_fd);
err:
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
5926c: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 59272: 4e5e unlk %fp <== NOT EXECUTED 59274: 4e75 rts <== NOT EXECUTED
fat_fd = pathloc->node_access;
if (fat_fd->fat_file_type != FAT_DIRECTORY)
{
errno = ENOTDIR;
59276: 4eb9 0005 d92c jsr 5d92c <__errno> 5927c: 7a14 moveq #20,%d5
rc = -1;
5927e: 76ff moveq #-1,%d3
fat_fd = pathloc->node_access;
if (fat_fd->fat_file_type != FAT_DIRECTORY)
{
errno = ENOTDIR;
59280: 2040 moveal %d0,%a0 59282: 2085 movel %d5,%a0@
rtems_semaphore_release(fs_info->vol_sema);
return RC_OK;
error:
fat_file_close(pathloc->mt_entry, fat_fd);
59284: 2f0c movel %a4,%sp@- 59286: 2f2a 0010 movel %a2@(16),%sp@- 5928a: 4eb9 0005 2fc2 jsr 52fc2 <fat_file_close> 59290: 508f addql #8,%sp 59292: 6000 fe1e braw 590b2 <msdos_eval4make+0xba>
*/
for( ; path[i] != '\0'; i++)
{
if (!msdos_is_separator(path[i]))
{
errno = ENOENT;
59296: 4eb9 0005 d92c jsr 5d92c <__errno> 5929c: 7c02 moveq #2,%d6
rc = -1;
5929e: 76ff moveq #-1,%d3
*/
for( ; path[i] != '\0'; i++)
{
if (!msdos_is_separator(path[i]))
{
errno = ENOENT;
592a0: 2040 moveal %d0,%a0 592a2: 2086 movel %d6,%a0@
rtems_semaphore_release(fs_info->vol_sema);
return RC_OK;
error:
fat_file_close(pathloc->mt_entry, fat_fd);
592a4: 2f0c movel %a4,%sp@- 592a6: 2f2a 0010 movel %a2@(16),%sp@- 592aa: 4eb9 0005 2fc2 jsr 52fc2 <fat_file_close> 592b0: 508f addql #8,%sp 592b2: 6000 fdfe braw 590b2 <msdos_eval4make+0xba>
...
00058d8c <msdos_eval_path>:
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
58d8c: 4e56 ffd0 linkw %fp,#-48 58d90: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 58d94: 246e 0014 moveal %fp@(20),%a2
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
58d98: 206a 0010 moveal %a2@(16),%a0 58d9c: 2868 0034 moveal %a0@(52),%a4
int i = 0;
int token_len = 0;
msdos_token_types_t type = MSDOS_CURRENT_DIR;
const char *token;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
58da0: 42a7 clrl %sp@-
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
58da2: 266e 000c moveal %fp@(12),%a3
int i = 0;
int token_len = 0;
msdos_token_types_t type = MSDOS_CURRENT_DIR;
const char *token;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
58da6: 42a7 clrl %sp@- 58da8: 2f2c 0088 movel %a4@(136),%sp@-
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = NULL;
rtems_filesystem_location_info_t newloc;
int i = 0;
int token_len = 0;
58dac: 42ae fff8 clrl %fp@(-8)
msdos_token_types_t type = MSDOS_CURRENT_DIR;
const char *token;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
58db0: 4eb9 0004 af20 jsr 4af20 <rtems_semaphore_obtain>
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
58db6: 4fef 000c lea %sp@(12),%sp 58dba: 4a80 tstl %d0 58dbc: 6600 0200 bnew 58fbe <msdos_eval_path+0x232>
rtems_set_errno_and_return_minus_one(EIO);
if (!pathloc->node_access)
58dc0: 2012 movel %a2@,%d0 58dc2: 6700 01a4 beqw 58f68 <msdos_eval_path+0x1dc>
goto err;
}
fat_fd = pathloc->node_access;
rc = fat_file_reopen(fat_fd);
58dc6: 2f00 movel %d0,%sp@- 58dc8: 4eb9 0005 2c62 jsr 52c62 <fat_file_reopen>
if (rc != RC_OK)
58dce: 588f addql #4,%sp
goto err;
}
fat_fd = pathloc->node_access;
rc = fat_file_reopen(fat_fd);
58dd0: 2600 movel %d0,%d3
if (rc != RC_OK)
58dd2: 6718 beqs 58dec <msdos_eval_path+0x60> <== ALWAYS TAKEN
error:
fat_file_close(pathloc->mt_entry, fat_fd);
err:
rtems_semaphore_release(fs_info->vol_sema);
58dd4: 2f2c 0088 movel %a4@(136),%sp@- <== NOT EXECUTED 58dd8: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
return rc;
58dde: 588f addql #4,%sp <== NOT EXECUTED
}
58de0: 2003 movel %d3,%d0 58de2: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 58de8: 4e5e unlk %fp 58dea: 4e75 rts 58dec: 2e0e movel %fp,%d7 58dee: 2c0e movel %fp,%d6
}
fat_fd = pathloc->node_access;
rc = fat_file_reopen(fat_fd);
if (rc != RC_OK)
58df0: 4282 clrl %d2 58df2: 5187 subql #8,%d7 58df4: 5986 subql #4,%d6 58df6: 2a3c 0005 9cf2 movel #367858,%d5
goto err;
while ((type != MSDOS_NO_MORE_PATH) && (type != MSDOS_INVALID_TOKEN))
{
type = msdos_get_token(&pathname[i], pathnamelen, &token, &token_len);
58dfc: 2f07 movel %d7,%sp@- 58dfe: 206e 0008 moveal %fp@(8),%a0
pathnamelen -= token_len;
i += token_len;
fat_fd = pathloc->node_access;
switch (type)
58e02: 7803 moveq #3,%d4
if (rc != RC_OK)
goto err;
while ((type != MSDOS_NO_MORE_PATH) && (type != MSDOS_INVALID_TOKEN))
{
type = msdos_get_token(&pathname[i], pathnamelen, &token, &token_len);
58e04: 2f06 movel %d6,%sp@- 58e06: 2f0b movel %a3,%sp@- 58e08: 4870 2800 pea %a0@(00000000,%d2:l) 58e0c: 2045 moveal %d5,%a0 58e0e: 4e90 jsr %a0@
pathnamelen -= token_len;
58e10: 222e fff8 movel %fp@(-8),%d1
i += token_len;
fat_fd = pathloc->node_access;
switch (type)
58e14: 4fef 0010 lea %sp@(16),%sp
goto err;
while ((type != MSDOS_NO_MORE_PATH) && (type != MSDOS_INVALID_TOKEN))
{
type = msdos_get_token(&pathname[i], pathnamelen, &token, &token_len);
pathnamelen -= token_len;
58e18: 97c1 subal %d1,%a3
i += token_len;
58e1a: d481 addl %d1,%d2
fat_fd = pathloc->node_access;
58e1c: 2a52 moveal %a2@,%a5
switch (type)
58e1e: b880 cmpl %d0,%d4
58e20: 6744 beqs 58e66 <msdos_eval_path+0xda>
58e22: 183c 0004 moveb #4,%d4 58e26: b880 cmpl %d0,%d4 58e28: 6700 011e beqw 58f48 <msdos_eval_path+0x1bc> 58e2c: 183c 0002 moveb #2,%d4 58e30: b880 cmpl %d0,%d4
58e32: 677e beqs 58eb2 <msdos_eval_path+0x126>
rc = fat_file_reopen(fat_fd);
if (rc != RC_OK)
goto err;
while ((type != MSDOS_NO_MORE_PATH) && (type != MSDOS_INVALID_TOKEN))
58e34: 4a80 tstl %d0
58e36: 6706 beqs 58e3e <msdos_eval_path+0xb2>
58e38: 7204 moveq #4,%d1 58e3a: b280 cmpl %d0,%d1
58e3c: 66be bnes 58dfc <msdos_eval_path+0x70> <== ALWAYS TAKEN
* None
*/
static void
msdos_set_handlers(rtems_filesystem_location_info_t *loc)
{
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
58e3e: 206a 0010 moveal %a2@(16),%a0
fat_file_fd_t *fat_fd = loc->node_access;
if (fat_fd->fat_file_type == FAT_DIRECTORY)
58e42: 7801 moveq #1,%d4
* None
*/
static void
msdos_set_handlers(rtems_filesystem_location_info_t *loc)
{
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
58e44: 2068 0034 moveal %a0@(52),%a0
fat_file_fd_t *fat_fd = loc->node_access;
if (fat_fd->fat_file_type == FAT_DIRECTORY)
58e48: b8ad 0010 cmpl %a5@(16),%d4 58e4c: 6700 0138 beqw 58f86 <msdos_eval_path+0x1fa>
loc->handlers = fs_info->directory_handlers;
else
loc->handlers = fs_info->file_handlers;
58e50: 2568 0084 0008 movel %a0@(132),%a2@(8)
error:
fat_file_close(pathloc->mt_entry, fat_fd);
err:
rtems_semaphore_release(fs_info->vol_sema);
58e56: 2f2c 0088 movel %a4@(136),%sp@- 58e5a: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release>
return rc;
58e60: 588f addql #4,%sp 58e62: 6000 ff7c braw 58de0 <msdos_eval_path+0x54>
case MSDOS_NAME:
/*
* Only a directory can be decended into.
*/
if (fat_fd->fat_file_type != FAT_DIRECTORY)
58e66: 7001 moveq #1,%d0 58e68: b0ad 0010 cmpl %a5@(16),%d0 58e6c: 6600 012e bnew 58f9c <msdos_eval_path+0x210>
/*
* Otherwise find the token name in the present location and
* set the node access to the point we have found.
*/
rc = msdos_find_name(pathloc, token, token_len);
58e70: 2f01 movel %d1,%sp@- 58e72: 2f2e fffc movel %fp@(-4),%sp@- 58e76: 2f0a movel %a2,%sp@- 58e78: 4eb9 0005 b282 jsr 5b282 <msdos_find_name>
if (rc != RC_OK)
58e7e: 4fef 000c lea %sp@(12),%sp 58e82: 4a80 tstl %d0 58e84: 6700 ff76 beqw 58dfc <msdos_eval_path+0x70>
{
if (rc == MSDOS_NAME_NOT_FOUND_ERR)
58e88: 0c80 0000 7d01 cmpil #32001,%d0 58e8e: 6700 0148 beqw 58fd8 <msdos_eval_path+0x24c>
rtems_semaphore_release(fs_info->vol_sema);
return RC_OK;
error:
fat_file_close(pathloc->mt_entry, fat_fd);
58e92: 2f0d movel %a5,%sp@- 58e94: 2f2a 0010 movel %a2@(16),%sp@-
* set the node access to the point we have found.
*/
rc = msdos_find_name(pathloc, token, token_len);
if (rc != RC_OK)
{
if (rc == MSDOS_NAME_NOT_FOUND_ERR)
58e98: 2600 movel %d0,%d3
rtems_semaphore_release(fs_info->vol_sema);
return RC_OK;
error:
fat_file_close(pathloc->mt_entry, fat_fd);
58e9a: 4eb9 0005 2fc2 jsr 52fc2 <fat_file_close> 58ea0: 508f addql #8,%sp
err:
rtems_semaphore_release(fs_info->vol_sema);
58ea2: 2f2c 0088 movel %a4@(136),%sp@- 58ea6: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release>
return rc;
58eac: 588f addql #4,%sp 58eae: 6000 ff30 braw 58de0 <msdos_eval_path+0x54>
{
case MSDOS_UP_DIR:
/*
* Only a directory can be decended into.
*/
if (fat_fd->fat_file_type != FAT_DIRECTORY)
58eb2: 7001 moveq #1,%d0 58eb4: b0ad 0010 cmpl %a5@(16),%d0 58eb8: 6600 00e2 bnew 58f9c <msdos_eval_path+0x210>
fat_file_close(pathloc->mt_entry, fat_fd);
err:
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
58ebc: 206a 0010 moveal %a2@(16),%a0
}
/*
* Am I at the root of this mounted filesystem?
*/
if (rtems_filesystem_is_root_location(pathloc))
58ec0: bbe8 001c cmpal %a0@(28),%a5
58ec4: 66aa bnes 58e70 <msdos_eval_path+0xe4> <== ALWAYS TAKEN
/*
* Am I at the root of all filesystems?
* XXX: MSDOS is not supposed to be base fs.
*/
if (pathloc->node_access ==
rtems_filesystem_root.node_access)
58ec6: 2279 0006 eb00 moveal 6eb00 <rtems_current_user_env>,%a1 <== NOT EXECUTED
{
/*
* Am I at the root of all filesystems?
* XXX: MSDOS is not supposed to be base fs.
*/
if (pathloc->node_access ==
58ecc: bbe9 0018 cmpal %a1@(24),%a5 <== NOT EXECUTED 58ed0: 6700 ff2a beqw 58dfc <msdos_eval_path+0x70> <== NOT EXECUTED
break; /* Throw out the .. in this case */
}
else
{
newloc = pathloc->mt_entry->mt_point_node;
*pathloc = newloc;
58ed4: 24a8 0008 movel %a0@(8),%a2@ <== NOT EXECUTED
{
break; /* Throw out the .. in this case */
}
else
{
newloc = pathloc->mt_entry->mt_point_node;
58ed8: 2628 000c movel %a0@(12),%d3 <== NOT EXECUTED 58edc: 2268 0010 moveal %a0@(16),%a1 <== NOT EXECUTED 58ee0: 2228 0014 movel %a0@(20),%d1 <== NOT EXECUTED 58ee4: 2028 0018 movel %a0@(24),%d0 <== NOT EXECUTED
*pathloc = newloc;
rc = fat_file_close(pathloc->mt_entry, fat_fd);
58ee8: 2f0d movel %a5,%sp@- <== NOT EXECUTED
break; /* Throw out the .. in this case */
}
else
{
newloc = pathloc->mt_entry->mt_point_node;
*pathloc = newloc;
58eea: 2543 0004 movel %d3,%a2@(4) <== NOT EXECUTED 58eee: 2549 0008 movel %a1,%a2@(8) <== NOT EXECUTED 58ef2: 2541 000c movel %d1,%a2@(12) <== NOT EXECUTED 58ef6: 2540 0010 movel %d0,%a2@(16) <== NOT EXECUTED
rc = fat_file_close(pathloc->mt_entry, fat_fd);
58efa: 2f00 movel %d0,%sp@- <== NOT EXECUTED 58efc: 4eb9 0005 2fc2 jsr 52fc2 <fat_file_close> <== NOT EXECUTED
if (rc != RC_OK)
58f02: 508f addql #8,%sp <== NOT EXECUTED
else
{
newloc = pathloc->mt_entry->mt_point_node;
*pathloc = newloc;
rc = fat_file_close(pathloc->mt_entry, fat_fd);
58f04: 2600 movel %d0,%d3 <== NOT EXECUTED
if (rc != RC_OK)
58f06: 6600 fecc bnew 58dd4 <msdos_eval_path+0x48> <== NOT EXECUTED
goto err;
rtems_semaphore_release(fs_info->vol_sema);
58f0a: 2f2c 0088 movel %a4@(136),%sp@- <== NOT EXECUTED 58f0e: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
return (*pathloc->ops->evalpath_h)(&(pathname[i-token_len]),
58f14: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 58f18: 9488 subl %a0,%d2 <== NOT EXECUTED 58f1a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 58f1c: 226a 000c moveal %a2@(12),%a1 <== NOT EXECUTED 58f20: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 58f24: 4873 8800 pea %a3@(00000000,%a0:l) <== NOT EXECUTED 58f28: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 58f2c: 4870 2800 pea %a0@(00000000,%d2:l) <== NOT EXECUTED 58f30: 2011 movel %a1@,%d0 <== NOT EXECUTED 58f32: 2040 moveal %d0,%a0 <== NOT EXECUTED 58f34: 4e90 jsr %a0@ <== NOT EXECUTED 58f36: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 58f3a: 2600 movel %d0,%d3 <== NOT EXECUTED
fat_file_close(pathloc->mt_entry, fat_fd);
err:
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
58f3c: 2003 movel %d3,%d0 <== NOT EXECUTED 58f3e: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 58f44: 4e5e unlk %fp <== NOT EXECUTED 58f46: 4e75 rts <== NOT EXECUTED
case MSDOS_NO_MORE_PATH:
case MSDOS_CURRENT_DIR:
break;
case MSDOS_INVALID_TOKEN:
errno = ENAMETOOLONG;
58f48: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED
rc = -1;
58f4e: 76ff moveq #-1,%d3 <== NOT EXECUTED
case MSDOS_NO_MORE_PATH:
case MSDOS_CURRENT_DIR:
break;
case MSDOS_INVALID_TOKEN:
errno = ENAMETOOLONG;
58f50: 2040 moveal %d0,%a0 <== NOT EXECUTED 58f52: 705b moveq #91,%d0 <== NOT EXECUTED 58f54: 2080 movel %d0,%a0@ <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return RC_OK;
error:
fat_file_close(pathloc->mt_entry, fat_fd);
58f56: 2f0d movel %a5,%sp@- <== NOT EXECUTED 58f58: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 58f5c: 4eb9 0005 2fc2 jsr 52fc2 <fat_file_close> <== NOT EXECUTED 58f62: 508f addql #8,%sp <== NOT EXECUTED 58f64: 6000 ff3c braw 58ea2 <msdos_eval_path+0x116> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
if (!pathloc->node_access)
{
errno = ENOENT;
58f68: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 58f6e: 7402 moveq #2,%d2 <== NOT EXECUTED
rc = -1;
58f70: 76ff moveq #-1,%d3 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
if (!pathloc->node_access)
{
errno = ENOENT;
58f72: 2040 moveal %d0,%a0 <== NOT EXECUTED 58f74: 2082 movel %d2,%a0@ <== NOT EXECUTED
error:
fat_file_close(pathloc->mt_entry, fat_fd);
err:
rtems_semaphore_release(fs_info->vol_sema);
58f76: 2f2c 0088 movel %a4@(136),%sp@- <== NOT EXECUTED 58f7a: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
return rc;
58f80: 588f addql #4,%sp <== NOT EXECUTED 58f82: 6000 fe5c braw 58de0 <msdos_eval_path+0x54> <== NOT EXECUTED
{
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = loc->node_access;
if (fat_fd->fat_file_type == FAT_DIRECTORY)
loc->handlers = fs_info->directory_handlers;
58f86: 2568 0080 0008 movel %a0@(128),%a2@(8)
error:
fat_file_close(pathloc->mt_entry, fat_fd);
err:
rtems_semaphore_release(fs_info->vol_sema);
58f8c: 2f2c 0088 movel %a4@(136),%sp@- 58f90: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release>
return rc;
58f96: 588f addql #4,%sp 58f98: 6000 fe46 braw 58de0 <msdos_eval_path+0x54>
/*
* Only a directory can be decended into.
*/
if (fat_fd->fat_file_type != FAT_DIRECTORY)
{
errno = ENOTSUP;
58f9c: 4eb9 0005 d92c jsr 5d92c <__errno>
rc = -1;
58fa2: 76ff moveq #-1,%d3
/*
* Only a directory can be decended into.
*/
if (fat_fd->fat_file_type != FAT_DIRECTORY)
{
errno = ENOTSUP;
58fa4: 2040 moveal %d0,%a0 58fa6: 20bc 0000 0086 movel #134,%a0@
rtems_semaphore_release(fs_info->vol_sema);
return RC_OK;
error:
fat_file_close(pathloc->mt_entry, fat_fd);
58fac: 2f0d movel %a5,%sp@- 58fae: 2f2a 0010 movel %a2@(16),%sp@- 58fb2: 4eb9 0005 2fc2 jsr 52fc2 <fat_file_close> 58fb8: 508f addql #8,%sp 58fba: 6000 fee6 braw 58ea2 <msdos_eval_path+0x116>
const char *token;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
58fbe: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 58fc4: 76ff moveq #-1,%d3 <== NOT EXECUTED 58fc6: 7805 moveq #5,%d4 <== NOT EXECUTED 58fc8: 2040 moveal %d0,%a0 <== NOT EXECUTED
fat_file_close(pathloc->mt_entry, fat_fd);
err:
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
58fca: 2003 movel %d3,%d0 <== NOT EXECUTED
const char *token;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
58fcc: 2084 movel %d4,%a0@ <== NOT EXECUTED
fat_file_close(pathloc->mt_entry, fat_fd);
err:
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
58fce: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 58fd4: 4e5e unlk %fp <== NOT EXECUTED 58fd6: 4e75 rts <== NOT EXECUTED
rc = msdos_find_name(pathloc, token, token_len);
if (rc != RC_OK)
{
if (rc == MSDOS_NAME_NOT_FOUND_ERR)
{
errno = ENOENT;
58fd8: 4eb9 0005 d92c jsr 5d92c <__errno>
rc = -1;
58fde: 76ff moveq #-1,%d3
rc = msdos_find_name(pathloc, token, token_len);
if (rc != RC_OK)
{
if (rc == MSDOS_NAME_NOT_FOUND_ERR)
{
errno = ENOENT;
58fe0: 7202 moveq #2,%d1 58fe2: 2040 moveal %d0,%a0 58fe4: 2081 movel %d1,%a0@
rtems_semaphore_release(fs_info->vol_sema);
return RC_OK;
error:
fat_file_close(pathloc->mt_entry, fat_fd);
58fe6: 2f0d movel %a5,%sp@- 58fe8: 2f2a 0010 movel %a2@(16),%sp@- 58fec: 4eb9 0005 2fc2 jsr 52fc2 <fat_file_close> 58ff2: 508f addql #8,%sp 58ff4: 6000 feac braw 58ea2 <msdos_eval_path+0x116>
00059922 <msdos_file_chmod>:
int
msdos_file_chmod(rtems_filesystem_location_info_t *pathloc,
mode_t mode)
{
return RC_OK;
}
59922: 4280 clrl %d0 <== NOT EXECUTED
* RC_OK always
*/
int
msdos_file_chmod(rtems_filesystem_location_info_t *pathloc,
mode_t mode)
{
59924: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
return RC_OK; }
59928: 4e5e unlk %fp <== NOT EXECUTED
00059378 <msdos_file_close>:
* RC_OK, if file closed successfully, or -1 if error occured (errno set
* appropriately)
*/
int
msdos_file_close(rtems_libio_t *iop)
{
59378: 4e56 fff0 linkw %fp,#-16 5937c: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 59380: 246e 0008 moveal %fp@(8),%a2
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
59384: 206a 0028 moveal %a2@(40),%a0 59388: 2868 0034 moveal %a0@(52),%a4
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
5938c: 42a7 clrl %sp@-
msdos_file_close(rtems_libio_t *iop)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
5938e: 266a 0018 moveal %a2@(24),%a3
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
59392: 42a7 clrl %sp@- 59394: 2f2c 0088 movel %a4@(136),%sp@- 59398: 4eb9 0004 af20 jsr 4af20 <rtems_semaphore_obtain>
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
5939e: 4fef 000c lea %sp@(12),%sp 593a2: 4a80 tstl %d0 593a4: 6600 0084 bnew 5942a <msdos_file_close+0xb2>
/*
* if fat-file descriptor is not marked as "removed", synchronize
* size, first cluster number, write time and date fields of the file
*/
if (!FAT_FILE_IS_REMOVED(fat_fd))
593a8: 4280 clrl %d0 593aa: 102b 0030 moveb %a3@(48),%d0 593ae: 0800 0000 btst #0,%d0
593b2: 6636 bnes 593ea <msdos_file_close+0x72> <== NEVER TAKEN
{
rc = msdos_set_first_cluster_num(iop->pathinfo.mt_entry, fat_fd);
593b4: 2f0b movel %a3,%sp@- 593b6: 2f2a 0028 movel %a2@(40),%sp@- 593ba: 4eb9 0005 9ef0 jsr 59ef0 <msdos_set_first_cluster_num>
if (rc != RC_OK)
593c0: 508f addql #8,%sp
* if fat-file descriptor is not marked as "removed", synchronize
* size, first cluster number, write time and date fields of the file
*/
if (!FAT_FILE_IS_REMOVED(fat_fd))
{
rc = msdos_set_first_cluster_num(iop->pathinfo.mt_entry, fat_fd);
593c2: 2400 movel %d0,%d2
if (rc != RC_OK)
593c4: 664c bnes 59412 <msdos_file_close+0x9a> <== NEVER TAKEN
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
rc = msdos_set_file_size(iop->pathinfo.mt_entry, fat_fd);
593c6: 2f0b movel %a3,%sp@- 593c8: 2f2a 0028 movel %a2@(40),%sp@- 593cc: 4eb9 0005 9fc4 jsr 59fc4 <msdos_set_file_size>
if (rc != RC_OK)
593d2: 508f addql #8,%sp
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
rc = msdos_set_file_size(iop->pathinfo.mt_entry, fat_fd);
593d4: 2400 movel %d0,%d2
if (rc != RC_OK)
593d6: 663a bnes 59412 <msdos_file_close+0x9a> <== NEVER TAKEN
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
rc = msdos_set_dir_wrt_time_and_date(iop->pathinfo.mt_entry, fat_fd);
593d8: 2f0b movel %a3,%sp@- 593da: 2f2a 0028 movel %a2@(40),%sp@- 593de: 4eb9 0005 9dea jsr 59dea <msdos_set_dir_wrt_time_and_date>
if (rc != RC_OK)
593e4: 508f addql #8,%sp
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
rc = msdos_set_dir_wrt_time_and_date(iop->pathinfo.mt_entry, fat_fd);
593e6: 2400 movel %d0,%d2
if (rc != RC_OK)
593e8: 6628 bnes 59412 <msdos_file_close+0x9a> <== NEVER TAKEN
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
}
rc = fat_file_close(iop->pathinfo.mt_entry, fat_fd);
593ea: 2f0b movel %a3,%sp@- 593ec: 2f2a 0028 movel %a2@(40),%sp@- 593f0: 4eb9 0005 2fc2 jsr 52fc2 <fat_file_close>
rtems_semaphore_release(fs_info->vol_sema);
593f6: 2f2c 0088 movel %a4@(136),%sp@-
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
}
rc = fat_file_close(iop->pathinfo.mt_entry, fat_fd);
593fa: 2400 movel %d0,%d2
rtems_semaphore_release(fs_info->vol_sema);
593fc: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release>
return rc;
59402: 4fef 000c lea %sp@(12),%sp
}
59406: 2002 movel %d2,%d0 59408: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 5940e: 4e5e unlk %fp 59410: 4e75 rts
}
rc = msdos_set_dir_wrt_time_and_date(iop->pathinfo.mt_entry, fat_fd);
if (rc != RC_OK)
{
rtems_semaphore_release(fs_info->vol_sema);
59412: 2f2c 0088 movel %a4@(136),%sp@- <== NOT EXECUTED 59416: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
return rc;
5941c: 588f addql #4,%sp <== NOT EXECUTED
rc = fat_file_close(iop->pathinfo.mt_entry, fat_fd);
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
5941e: 2002 movel %d2,%d0 <== NOT EXECUTED 59420: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 <== NOT EXECUTED 59426: 4e5e unlk %fp <== NOT EXECUTED 59428: 4e75 rts <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
5942a: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 59430: 74ff moveq #-1,%d2 <== NOT EXECUTED 59432: 7205 moveq #5,%d1 <== NOT EXECUTED 59434: 2040 moveal %d0,%a0 <== NOT EXECUTED
rc = fat_file_close(iop->pathinfo.mt_entry, fat_fd);
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
59436: 2002 movel %d2,%d0 <== NOT EXECUTED 59438: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
5943e: 2081 movel %d1,%a0@ <== NOT EXECUTED
rc = fat_file_close(iop->pathinfo.mt_entry, fat_fd);
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
59440: 4e5e unlk %fp <== NOT EXECUTED
000598ac <msdos_file_datasync>:
* RETURNS:
* RC_OK on success, or -1 if error occured (errno set appropriately)
*/
int
msdos_file_datasync(rtems_libio_t *iop)
{
598ac: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 598b0: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ <== NOT EXECUTED 598b4: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
598b8: 206a 0028 moveal %a2@(40),%a0 <== NOT EXECUTED 598bc: 2668 0034 moveal %a0@(52),%a3 <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
598c0: 42a7 clrl %sp@- <== NOT EXECUTED
int
msdos_file_datasync(rtems_libio_t *iop)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
598c2: 242a 0018 movel %a2@(24),%d2 <== NOT EXECUTED
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
598c6: 42a7 clrl %sp@- <== NOT EXECUTED 598c8: 2f2b 0088 movel %a3@(136),%sp@- <== NOT EXECUTED 598cc: 4eb9 0004 af20 jsr 4af20 <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
598d2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 598d6: 4a80 tstl %d0 <== NOT EXECUTED 598d8: 6626 bnes 59900 <msdos_file_datasync+0x54> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
/* synchronize file data */
rc = fat_file_datasync(iop->pathinfo.mt_entry, fat_fd);
598da: 2f02 movel %d2,%sp@- <== NOT EXECUTED 598dc: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 598e0: 4eb9 0005 36b0 jsr 536b0 <fat_file_datasync> <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
598e6: 2f2b 0088 movel %a3@(136),%sp@- <== NOT EXECUTED 598ea: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
return RC_OK;
598f0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 598f4: 4280 clrl %d0 <== NOT EXECUTED
}
598f6: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 598fc: 4e5e unlk %fp <== NOT EXECUTED 598fe: 4e75 rts <== NOT EXECUTED
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
59900: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 59906: 7205 moveq #5,%d1 <== NOT EXECUTED 59908: 2040 moveal %d0,%a0 <== NOT EXECUTED 5990a: 70ff moveq #-1,%d0 <== NOT EXECUTED
/* synchronize file data */
rc = fat_file_datasync(iop->pathinfo.mt_entry, fat_fd);
rtems_semaphore_release(fs_info->vol_sema);
return RC_OK;
}
5990c: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
59912: 2081 movel %d1,%a0@ <== NOT EXECUTED
/* synchronize file data */
rc = fat_file_datasync(iop->pathinfo.mt_entry, fat_fd);
rtems_semaphore_release(fs_info->vol_sema);
return RC_OK;
}
59914: 4e5e unlk %fp <== NOT EXECUTED
00059724 <msdos_file_ftruncate>:
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
if (length >= fat_fd->fat_file_size)
59724: 4280 clrl %d0
* RETURNS:
* RC_OK on success, or -1 if error occured (errno set appropriately).
*/
int
msdos_file_ftruncate(rtems_libio_t *iop, rtems_off64_t length)
{
59726: 4e56 ffdc linkw %fp,#-36 5972a: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@ 5972e: 246e 0008 moveal %fp@(8),%a2
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
59732: 266a 0018 moveal %a2@(24),%a3
int
msdos_file_ftruncate(rtems_libio_t *iop, rtems_off64_t length)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
59736: 206a 0028 moveal %a2@(40),%a0
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
if (length >= fat_fd->fat_file_size)
5973a: 222b 0018 movel %a3@(24),%d1
* RETURNS:
* RC_OK on success, or -1 if error occured (errno set appropriately).
*/
int
msdos_file_ftruncate(rtems_libio_t *iop, rtems_off64_t length)
{
5973e: 242e 000c movel %fp@(12),%d2 59742: 262e 0010 movel %fp@(16),%d3
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
59746: 2868 0034 moveal %a0@(52),%a4
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
if (length >= fat_fd->fat_file_size)
5974a: 2800 movel %d0,%d4 5974c: 2a01 movel %d1,%d5 5974e: 9a83 subl %d3,%d5 59750: 9982 subxl %d2,%d4
59752: 6e0e bgts 59762 <msdos_file_ftruncate+0x3e>
return RC_OK;
59754: 4284 clrl %d4
if (length < fat_fd->fat_file_size)
iop->size = fat_fd->fat_file_size = length;
rtems_semaphore_release(fs_info->vol_sema);
return RC_OK;
}
59756: 2004 movel %d4,%d0 59758: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 5975e: 4e5e unlk %fp 59760: 4e75 rts
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
if (length >= fat_fd->fat_file_size)
return RC_OK;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
59762: 42a7 clrl %sp@- 59764: 42a7 clrl %sp@- 59766: 2f2c 0088 movel %a4@(136),%sp@- 5976a: 4eb9 0004 af20 jsr 4af20 <rtems_semaphore_obtain>
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
59770: 4fef 000c lea %sp@(12),%sp 59774: 4a80 tstl %d0
59776: 664a bnes 597c2 <msdos_file_ftruncate+0x9e> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one(EIO);
rc = fat_file_truncate(iop->pathinfo.mt_entry, fat_fd, length);
59778: 2f03 movel %d3,%sp@- 5977a: 2f0b movel %a3,%sp@- 5977c: 2f2a 0028 movel %a2@(40),%sp@- 59780: 4eb9 0005 2ec6 jsr 52ec6 <fat_file_truncate>
if (rc != RC_OK)
59786: 4fef 000c lea %sp@(12),%sp
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
rc = fat_file_truncate(iop->pathinfo.mt_entry, fat_fd, length);
5978a: 2800 movel %d0,%d4
if (rc != RC_OK)
5978c: 661c bnes 597aa <msdos_file_ftruncate+0x86> <== NEVER TAKEN
/*
* fat_file_truncate do nothing if new length >= fat-file size, so update
* file size only if length < fat-file size
*/
if (length < fat_fd->fat_file_size)
5978e: 2e2b 0018 movel %a3@(24),%d7 59792: 4286 clrl %d6 59794: 2002 movel %d2,%d0 59796: 2203 movel %d3,%d1 59798: 9287 subl %d7,%d1 5979a: 9186 subxl %d6,%d0
5979c: 6c0c bges 597aa <msdos_file_ftruncate+0x86> <== NEVER TAKEN
iop->size = fat_fd->fat_file_size = length;
5979e: 2743 0018 movel %d3,%a3@(24) 597a2: 2543 0008 movel %d3,%a2@(8) 597a6: 42aa 0004 clrl %a2@(4)
rtems_semaphore_release(fs_info->vol_sema);
597aa: 2f2c 0088 movel %a4@(136),%sp@- 597ae: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release>
return RC_OK;
597b4: 588f addql #4,%sp
}
597b6: 2004 movel %d4,%d0 597b8: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 597be: 4e5e unlk %fp 597c0: 4e75 rts
return RC_OK;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
597c2: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 597c8: 78ff moveq #-1,%d4 <== NOT EXECUTED 597ca: 7405 moveq #5,%d2 <== NOT EXECUTED 597cc: 2040 moveal %d0,%a0 <== NOT EXECUTED
if (length < fat_fd->fat_file_size)
iop->size = fat_fd->fat_file_size = length;
rtems_semaphore_release(fs_info->vol_sema);
return RC_OK;
}
597ce: 2004 movel %d4,%d0 <== NOT EXECUTED
return RC_OK;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
597d0: 2082 movel %d2,%a0@ <== NOT EXECUTED
if (length < fat_fd->fat_file_size)
iop->size = fat_fd->fat_file_size = length;
rtems_semaphore_release(fs_info->vol_sema);
return RC_OK;
}
597d2: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 <== NOT EXECUTED 597d8: 4e5e unlk %fp <== NOT EXECUTED
00059918 <msdos_file_ioctl>:
msdos_file_ioctl(rtems_libio_t *iop,uint32_t command, void *buffer)
{
int rc = RC_OK;
return rc;
}
59918: 4280 clrl %d0 <== NOT EXECUTED
* RETURNS:
*
*/
int
msdos_file_ioctl(rtems_libio_t *iop,uint32_t command, void *buffer)
{
5991a: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
int rc = RC_OK;
return rc;
}
5991e: 4e5e unlk %fp <== NOT EXECUTED
00059592 <msdos_file_lseek>:
* new offset on success, or -1 if error occured (errno set
* appropriately).
*/
rtems_off64_t
msdos_file_lseek(rtems_libio_t *iop, rtems_off64_t offset, int whence)
{
59592: 4e56 ffec linkw %fp,#-20 59596: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 5959a: 246e 0008 moveal %fp@(8),%a2
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
5959e: 206a 0028 moveal %a2@(40),%a0 595a2: 2868 0034 moveal %a0@(52),%a4
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
uint32_t real_size = 0;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
595a6: 42a7 clrl %sp@-
msdos_file_lseek(rtems_libio_t *iop, rtems_off64_t offset, int whence)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
595a8: 266a 0018 moveal %a2@(24),%a3
uint32_t real_size = 0;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
595ac: 42a7 clrl %sp@- 595ae: 2f2c 0088 movel %a4@(136),%sp@-
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
uint32_t real_size = 0;
595b2: 42ae fffc clrl %fp@(-4)
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
595b6: 4eb9 0004 af20 jsr 4af20 <rtems_semaphore_obtain>
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
595bc: 4fef 000c lea %sp@(12),%sp 595c0: 4a80 tstl %d0 595c2: 6600 0098 bnew 5965c <msdos_file_lseek+0xca>
rtems_set_errno_and_return_minus_one(EIO);
rc = fat_file_extend(iop->pathinfo.mt_entry, fat_fd, iop->offset,
595c6: 486e fffc pea %fp@(-4) 595ca: 2f2a 0010 movel %a2@(16),%sp@- 595ce: 2f0b movel %a3,%sp@- 595d0: 2f2a 0028 movel %a2@(40),%sp@- 595d4: 4eb9 0005 3162 jsr 53162 <fat_file_extend>
&real_size);
if (rc != RC_OK)
595da: 4fef 0010 lea %sp@(16),%sp
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
rc = fat_file_extend(iop->pathinfo.mt_entry, fat_fd, iop->offset,
595de: 2400 movel %d0,%d2
&real_size);
if (rc != RC_OK)
595e0: 665e bnes 59640 <msdos_file_lseek+0xae> <== NEVER TAKEN
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
if (real_size > fat_fd->fat_file_size)
595e2: 222b 0018 movel %a3@(24),%d1 595e6: 202e fffc movel %fp@(-4),%d0 595ea: b081 cmpl %d1,%d0
595ec: 6332 blss 59620 <msdos_file_lseek+0x8e>
fat_fd->fat_file_size = iop->offset = real_size;
595ee: 42aa 000c clrl %a2@(12) <== NOT EXECUTED 595f2: 2540 0010 movel %d0,%a2@(16) <== NOT EXECUTED 595f6: 2740 0018 movel %d0,%a3@(24) <== NOT EXECUTED
iop->size = fat_fd->fat_file_size;
rtems_semaphore_release(fs_info->vol_sema);
595fa: 2f2c 0088 movel %a4@(136),%sp@- <== NOT EXECUTED
}
if (real_size > fat_fd->fat_file_size)
fat_fd->fat_file_size = iop->offset = real_size;
iop->size = fat_fd->fat_file_size;
595fe: 42aa 0004 clrl %a2@(4) <== NOT EXECUTED 59602: 2540 0008 movel %d0,%a2@(8) <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
59606: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
return iop->offset;
5960c: 588f addql #4,%sp <== NOT EXECUTED 5960e: 202a 000c movel %a2@(12),%d0 <== NOT EXECUTED 59612: 222a 0010 movel %a2@(16),%d1 <== NOT EXECUTED
}
59616: 4cee 1c04 ffec moveml %fp@(-20),%d2/%a2-%a4 5961c: 4e5e unlk %fp 5961e: 4e75 rts
if (real_size > fat_fd->fat_file_size)
fat_fd->fat_file_size = iop->offset = real_size;
iop->size = fat_fd->fat_file_size;
rtems_semaphore_release(fs_info->vol_sema);
59620: 2f2c 0088 movel %a4@(136),%sp@-
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
if (real_size > fat_fd->fat_file_size)
59624: 2001 movel %d1,%d0
fat_fd->fat_file_size = iop->offset = real_size;
iop->size = fat_fd->fat_file_size;
59626: 42aa 0004 clrl %a2@(4) 5962a: 2540 0008 movel %d0,%a2@(8)
rtems_semaphore_release(fs_info->vol_sema);
5962e: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release>
return iop->offset;
59634: 588f addql #4,%sp 59636: 202a 000c movel %a2@(12),%d0 5963a: 222a 0010 movel %a2@(16),%d1 5963e: 60d6 bras 59616 <msdos_file_lseek+0x84>
rc = fat_file_extend(iop->pathinfo.mt_entry, fat_fd, iop->offset,
&real_size);
if (rc != RC_OK)
{
rtems_semaphore_release(fs_info->vol_sema);
59640: 2f2c 0088 movel %a4@(136),%sp@- <== NOT EXECUTED 59644: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
return rc;
5964a: 588f addql #4,%sp <== NOT EXECUTED 5964c: 2202 movel %d2,%d1 <== NOT EXECUTED 5964e: 5bc0 smi %d0 <== NOT EXECUTED 59650: 49c0 extbl %d0 <== NOT EXECUTED
iop->size = fat_fd->fat_file_size;
rtems_semaphore_release(fs_info->vol_sema);
return iop->offset;
}
59652: 4cee 1c04 ffec moveml %fp@(-20),%d2/%a2-%a4 <== NOT EXECUTED 59658: 4e5e unlk %fp <== NOT EXECUTED 5965a: 4e75 rts <== NOT EXECUTED
uint32_t real_size = 0;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
5965c: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 59662: 2040 moveal %d0,%a0 <== NOT EXECUTED 59664: 7005 moveq #5,%d0 <== NOT EXECUTED
iop->size = fat_fd->fat_file_size;
rtems_semaphore_release(fs_info->vol_sema);
return iop->offset;
}
59666: 4cee 1c04 ffec moveml %fp@(-20),%d2/%a2-%a4 <== NOT EXECUTED
uint32_t real_size = 0;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
5966c: 2080 movel %d0,%a0@ <== NOT EXECUTED
iop->size = fat_fd->fat_file_size;
rtems_semaphore_release(fs_info->vol_sema);
return iop->offset;
}
5966e: 4e5e unlk %fp <== NOT EXECUTED
uint32_t real_size = 0;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
59670: 70ff moveq #-1,%d0 <== NOT EXECUTED 59672: 72ff moveq #-1,%d1 <== NOT EXECUTED
iop->size = fat_fd->fat_file_size;
rtems_semaphore_release(fs_info->vol_sema);
return iop->offset;
}
000592b8 <msdos_file_open>:
* and errno set appropriately
*/
int
msdos_file_open(rtems_libio_t *iop, const char *pathname, uint32_t flag,
uint32_t mode)
{
592b8: 4e56 fff0 linkw %fp,#-16 592bc: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 592c0: 246e 0008 moveal %fp@(8),%a2
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
592c4: 206a 0028 moveal %a2@(40),%a0 592c8: 2668 0034 moveal %a0@(52),%a3
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
592cc: 42a7 clrl %sp@-
uint32_t mode)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
592ce: 286a 0018 moveal %a2@(24),%a4
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
592d2: 42a7 clrl %sp@- 592d4: 2f2b 0088 movel %a3@(136),%sp@- 592d8: 4eb9 0004 af20 jsr 4af20 <rtems_semaphore_obtain>
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
592de: 4fef 000c lea %sp@(12),%sp 592e2: 4a80 tstl %d0
592e4: 6678 bnes 5935e <msdos_file_open+0xa6> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one(EIO);
rc = fat_file_reopen(fat_fd);
592e6: 2f0c movel %a4,%sp@- 592e8: 4eb9 0005 2c62 jsr 52c62 <fat_file_reopen>
if (rc != RC_OK)
592ee: 588f addql #4,%sp
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
rc = fat_file_reopen(fat_fd);
592f0: 2400 movel %d0,%d2
if (rc != RC_OK)
592f2: 6652 bnes 59346 <msdos_file_open+0x8e> <== NEVER TAKEN
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
592f4: 202a 0014 movel %a2@(20),%d0 592f8: 0280 0000 0200 andil #512,%d0
592fe: 672c beqs 5932c <msdos_file_open+0x74>
iop->offset = fat_fd->fat_file_size;
59300: 202c 0018 movel %a4@(24),%d0 59304: 42aa 000c clrl %a2@(12) 59308: 2540 0010 movel %d0,%a2@(16)
iop->size = fat_fd->fat_file_size;
rtems_semaphore_release(fs_info->vol_sema);
5930c: 2f2b 0088 movel %a3@(136),%sp@-
}
if (iop->flags & LIBIO_FLAGS_APPEND)
iop->offset = fat_fd->fat_file_size;
iop->size = fat_fd->fat_file_size;
59310: 2540 0008 movel %d0,%a2@(8) 59314: 42aa 0004 clrl %a2@(4)
rtems_semaphore_release(fs_info->vol_sema);
59318: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release>
return RC_OK;
5931e: 588f addql #4,%sp
}
59320: 2002 movel %d2,%d0 59322: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 59328: 4e5e unlk %fp 5932a: 4e75 rts 5932c: 202c 0018 movel %a4@(24),%d0
if (iop->flags & LIBIO_FLAGS_APPEND)
iop->offset = fat_fd->fat_file_size;
iop->size = fat_fd->fat_file_size;
rtems_semaphore_release(fs_info->vol_sema);
59330: 2f2b 0088 movel %a3@(136),%sp@-
}
if (iop->flags & LIBIO_FLAGS_APPEND)
iop->offset = fat_fd->fat_file_size;
iop->size = fat_fd->fat_file_size;
59334: 2540 0008 movel %d0,%a2@(8) 59338: 42aa 0004 clrl %a2@(4)
rtems_semaphore_release(fs_info->vol_sema);
5933c: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release>
return RC_OK;
59342: 588f addql #4,%sp 59344: 60da bras 59320 <msdos_file_open+0x68>
rtems_set_errno_and_return_minus_one(EIO);
rc = fat_file_reopen(fat_fd);
if (rc != RC_OK)
{
rtems_semaphore_release(fs_info->vol_sema);
59346: 2f2b 0088 movel %a3@(136),%sp@- <== NOT EXECUTED 5934a: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
return rc;
59350: 588f addql #4,%sp <== NOT EXECUTED
iop->size = fat_fd->fat_file_size;
rtems_semaphore_release(fs_info->vol_sema);
return RC_OK;
}
59352: 2002 movel %d2,%d0 <== NOT EXECUTED 59354: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 <== NOT EXECUTED 5935a: 4e5e unlk %fp <== NOT EXECUTED 5935c: 4e75 rts <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
5935e: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 59364: 74ff moveq #-1,%d2 <== NOT EXECUTED 59366: 2040 moveal %d0,%a0 <== NOT EXECUTED 59368: 7005 moveq #5,%d0 <== NOT EXECUTED 5936a: 2080 movel %d0,%a0@ <== NOT EXECUTED
iop->size = fat_fd->fat_file_size;
rtems_semaphore_release(fs_info->vol_sema);
return RC_OK;
}
5936c: 2002 movel %d2,%d0 <== NOT EXECUTED 5936e: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 <== NOT EXECUTED 59374: 4e5e unlk %fp <== NOT EXECUTED
00059444 <msdos_file_read>:
* the number of bytes read on success, or -1 if error occured (errno set
* appropriately)
*/
ssize_t
msdos_file_read(rtems_libio_t *iop, void *buffer, size_t count)
{
59444: 4e56 fff4 linkw %fp,#-12 59448: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 5944c: 246e 0008 moveal %fp@(8),%a2
ssize_t ret = 0;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
59450: 206a 0028 moveal %a2@(40),%a0 59454: 2668 0034 moveal %a0@(52),%a3
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
59458: 42a7 clrl %sp@- 5945a: 42a7 clrl %sp@- 5945c: 2f2b 0088 movel %a3@(136),%sp@-
msdos_file_read(rtems_libio_t *iop, void *buffer, size_t count)
{
ssize_t ret = 0;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
59460: 242a 0018 movel %a2@(24),%d2
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
59464: 4eb9 0004 af20 jsr 4af20 <rtems_semaphore_obtain>
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
5946a: 4fef 000c lea %sp@(12),%sp 5946e: 4a80 tstl %d0
59470: 6634 bnes 594a6 <msdos_file_read+0x62> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one(EIO);
ret = fat_file_read(iop->pathinfo.mt_entry, fat_fd, iop->offset, count,
59472: 2f2e 000c movel %fp@(12),%sp@- 59476: 2f2e 0010 movel %fp@(16),%sp@- 5947a: 2f2a 0010 movel %a2@(16),%sp@- 5947e: 2f02 movel %d2,%sp@- 59480: 2f2a 0028 movel %a2@(40),%sp@- 59484: 4eb9 0005 2c74 jsr 52c74 <fat_file_read>
buffer);
rtems_semaphore_release(fs_info->vol_sema);
5948a: 2f2b 0088 movel %a3@(136),%sp@-
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
ret = fat_file_read(iop->pathinfo.mt_entry, fat_fd, iop->offset, count,
5948e: 2440 moveal %d0,%a2
buffer);
rtems_semaphore_release(fs_info->vol_sema);
59490: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release>
return ret;
59496: 4fef 0018 lea %sp@(24),%sp
}
5949a: 200a movel %a2,%d0 5949c: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 594a2: 4e5e unlk %fp 594a4: 4e75 rts
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
594a6: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 594ac: 347c ffff moveaw #-1,%a2 <== NOT EXECUTED 594b0: 2040 moveal %d0,%a0 <== NOT EXECUTED 594b2: 7405 moveq #5,%d2 <== NOT EXECUTED
ret = fat_file_read(iop->pathinfo.mt_entry, fat_fd, iop->offset, count,
buffer);
rtems_semaphore_release(fs_info->vol_sema);
return ret;
}
594b4: 200a movel %a2,%d0 <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
594b6: 2082 movel %d2,%a0@ <== NOT EXECUTED
ret = fat_file_read(iop->pathinfo.mt_entry, fat_fd, iop->offset, count,
buffer);
rtems_semaphore_release(fs_info->vol_sema);
return ret;
}
594b8: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 594be: 4e5e unlk %fp <== NOT EXECUTED
0005992c <msdos_file_rmnod>:
* RC_OK on success, or -1 if error occured (errno set appropriately)
*/
int
msdos_file_rmnod(rtems_filesystem_location_info_t *parent_pathloc,
rtems_filesystem_location_info_t *pathloc)
{
5992c: 4e56 fff0 linkw %fp,#-16 <== NOT EXECUTED 59930: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ <== NOT EXECUTED 59934: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
59938: 206a 0010 moveal %a2@(16),%a0 <== NOT EXECUTED 5993c: 2668 0034 moveal %a0@(52),%a3 <== NOT EXECUTED
fat_file_fd_t *fat_fd = pathloc->node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
59940: 42a7 clrl %sp@- <== NOT EXECUTED
rtems_filesystem_location_info_t *pathloc)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = pathloc->node_access;
59942: 2852 moveal %a2@,%a4 <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
59944: 42a7 clrl %sp@- <== NOT EXECUTED 59946: 2f2b 0088 movel %a3@(136),%sp@- <== NOT EXECUTED 5994a: 4eb9 0004 af20 jsr 4af20 <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
59950: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 59954: 4a80 tstl %d0 <== NOT EXECUTED 59956: 6658 bnes 599b0 <msdos_file_rmnod+0x84> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
/* mark file removed */
rc = msdos_set_first_char4file_name(pathloc->mt_entry,
59958: 4878 00e5 pea e5 <DBL_MANT_DIG+0xb0> <== NOT EXECUTED 5995c: 486c 0020 pea %a4@(32) <== NOT EXECUTED 59960: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 59964: 4eb9 0005 a0de jsr 5a0de <msdos_set_first_char4file_name> <== NOT EXECUTED
&fat_fd->dir_pos,
MSDOS_THIS_DIR_ENTRY_EMPTY);
if (rc != RC_OK)
5996a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
/* mark file removed */
rc = msdos_set_first_char4file_name(pathloc->mt_entry,
5996e: 2400 movel %d0,%d2 <== NOT EXECUTED
&fat_fd->dir_pos,
MSDOS_THIS_DIR_ENTRY_EMPTY);
if (rc != RC_OK)
59970: 6626 bnes 59998 <msdos_file_rmnod+0x6c> <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
fat_file_mark_removed(pathloc->mt_entry, fat_fd);
59972: 2f0c movel %a4,%sp@- <== NOT EXECUTED 59974: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 59978: 4eb9 0005 35ae jsr 535ae <fat_file_mark_removed> <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
5997e: 2f2b 0088 movel %a3@(136),%sp@- <== NOT EXECUTED 59982: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
return RC_OK;
59988: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
}
5998c: 2002 movel %d2,%d0 <== NOT EXECUTED 5998e: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 <== NOT EXECUTED 59994: 4e5e unlk %fp <== NOT EXECUTED 59996: 4e75 rts <== NOT EXECUTED
rc = msdos_set_first_char4file_name(pathloc->mt_entry,
&fat_fd->dir_pos,
MSDOS_THIS_DIR_ENTRY_EMPTY);
if (rc != RC_OK)
{
rtems_semaphore_release(fs_info->vol_sema);
59998: 2f2b 0088 movel %a3@(136),%sp@- <== NOT EXECUTED 5999c: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
return rc;
599a2: 588f addql #4,%sp <== NOT EXECUTED
fat_file_mark_removed(pathloc->mt_entry, fat_fd);
rtems_semaphore_release(fs_info->vol_sema);
return RC_OK;
}
599a4: 2002 movel %d2,%d0 <== NOT EXECUTED 599a6: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 <== NOT EXECUTED 599ac: 4e5e unlk %fp <== NOT EXECUTED 599ae: 4e75 rts <== NOT EXECUTED
fat_file_fd_t *fat_fd = pathloc->node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
599b0: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 599b6: 74ff moveq #-1,%d2 <== NOT EXECUTED 599b8: 2040 moveal %d0,%a0 <== NOT EXECUTED 599ba: 7005 moveq #5,%d0 <== NOT EXECUTED 599bc: 2080 movel %d0,%a0@ <== NOT EXECUTED
fat_file_mark_removed(pathloc->mt_entry, fat_fd);
rtems_semaphore_release(fs_info->vol_sema);
return RC_OK;
}
599be: 2002 movel %d2,%d0 <== NOT EXECUTED 599c0: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 <== NOT EXECUTED 599c6: 4e5e unlk %fp <== NOT EXECUTED
...
00059676 <msdos_file_stat>:
int
msdos_file_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
59676: 4e56 ffe8 linkw %fp,#-24 5967a: 206e 0008 moveal %fp@(8),%a0
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
5967e: 2268 0010 moveal %a0@(16),%a1
int
msdos_file_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
59682: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
59686: 2669 0034 moveal %a1@(52),%a3
fat_file_fd_t *fat_fd = loc->node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
5968a: 42a7 clrl %sp@-
int
msdos_file_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
5968c: 246e 000c moveal %fp@(12),%a2
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = loc->node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
59690: 42a7 clrl %sp@- 59692: 2f2b 0088 movel %a3@(136),%sp@-
struct stat *buf
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = loc->node_access;
59696: 2850 moveal %a0@,%a4
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
59698: 4eb9 0004 af20 jsr 4af20 <rtems_semaphore_obtain>
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
5969e: 4fef 000c lea %sp@(12),%sp 596a2: 4a80 tstl %d0
596a4: 6666 bnes 5970c <msdos_file_stat+0x96> <== NEVER TAKEN
buf->st_dev = fs_info->fat.vol.dev;
buf->st_ino = fat_fd->ino;
buf->st_mode = S_IFREG | S_IRWXU | S_IRWXG | S_IRWXO;
buf->st_rdev = 0ll;
buf->st_size = fat_fd->fat_file_size;
596a6: 202c 0018 movel %a4@(24),%d0
buf->st_blocks = fat_fd->fat_file_size >> FAT_SECTOR512_BITS;
596aa: 7209 moveq #9,%d1 596ac: 2400 movel %d0,%d2 596ae: e2aa lsrl %d1,%d2
buf->st_blksize = fs_info->fat.vol.bps;
596b0: 4281 clrl %d1
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
buf->st_dev = fs_info->fat.vol.dev;
596b2: 262b 004a movel %a3@(74),%d3 596b6: 282b 004e movel %a3@(78),%d4
buf->st_ino = fat_fd->ino;
596ba: 256c 000c 0008 movel %a4@(12),%a2@(8)
buf->st_mode = S_IFREG | S_IRWXU | S_IRWXG | S_IRWXO;
buf->st_rdev = 0ll;
buf->st_size = fat_fd->fat_file_size;
buf->st_blocks = fat_fd->fat_file_size >> FAT_SECTOR512_BITS;
buf->st_blksize = fs_info->fat.vol.bps;
596c0: 3213 movew %a3@,%d1
buf->st_mtime = fat_fd->mtime;
596c2: 256c 003e 002e movel %a4@(62),%a2@(46)
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
buf->st_dev = fs_info->fat.vol.dev;
596c8: 2483 movel %d3,%a2@ 596ca: 2544 0004 movel %d4,%a2@(4)
buf->st_ino = fat_fd->ino;
buf->st_mode = S_IFREG | S_IRWXU | S_IRWXG | S_IRWXO;
buf->st_rdev = 0ll;
596ce: 4283 clrl %d3 596d0: 4284 clrl %d4
buf->st_size = fat_fd->fat_file_size;
buf->st_blocks = fat_fd->fat_file_size >> FAT_SECTOR512_BITS;
buf->st_blksize = fs_info->fat.vol.bps;
buf->st_mtime = fat_fd->mtime;
rtems_semaphore_release(fs_info->vol_sema);
596d2: 2f2b 0088 movel %a3@(136),%sp@-
rtems_set_errno_and_return_minus_one(EIO);
buf->st_dev = fs_info->fat.vol.dev;
buf->st_ino = fat_fd->ino;
buf->st_mode = S_IFREG | S_IRWXU | S_IRWXG | S_IRWXO;
buf->st_rdev = 0ll;
596d6: 2543 0016 movel %d3,%a2@(22) 596da: 2544 001a movel %d4,%a2@(26)
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
buf->st_dev = fs_info->fat.vol.dev;
buf->st_ino = fat_fd->ino;
buf->st_mode = S_IFREG | S_IRWXU | S_IRWXG | S_IRWXO;
596de: 283c 0000 81ff movel #33279,%d4
buf->st_rdev = 0ll;
buf->st_size = fat_fd->fat_file_size;
596e4: 2540 0022 movel %d0,%a2@(34)
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
buf->st_dev = fs_info->fat.vol.dev;
buf->st_ino = fat_fd->ino;
buf->st_mode = S_IFREG | S_IRWXU | S_IRWXG | S_IRWXO;
596e8: 2544 000c movel %d4,%a2@(12)
buf->st_rdev = 0ll;
buf->st_size = fat_fd->fat_file_size;
596ec: 42aa 001e clrl %a2@(30)
buf->st_blocks = fat_fd->fat_file_size >> FAT_SECTOR512_BITS;
596f0: 2542 0042 movel %d2,%a2@(66)
buf->st_blksize = fs_info->fat.vol.bps;
596f4: 2541 003e movel %d1,%a2@(62)
buf->st_mtime = fat_fd->mtime;
rtems_semaphore_release(fs_info->vol_sema);
596f8: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release>
return RC_OK;
596fe: 588f addql #4,%sp 59700: 4280 clrl %d0
}
59702: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 59708: 4e5e unlk %fp 5970a: 4e75 rts
fat_file_fd_t *fat_fd = loc->node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
5970c: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 59712: 7205 moveq #5,%d1 <== NOT EXECUTED 59714: 2040 moveal %d0,%a0 <== NOT EXECUTED 59716: 70ff moveq #-1,%d0 <== NOT EXECUTED
buf->st_blksize = fs_info->fat.vol.bps;
buf->st_mtime = fat_fd->mtime;
rtems_semaphore_release(fs_info->vol_sema);
return RC_OK;
}
59718: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 <== NOT EXECUTED
fat_file_fd_t *fat_fd = loc->node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
5971e: 2081 movel %d1,%a0@ <== NOT EXECUTED
buf->st_blksize = fs_info->fat.vol.bps;
buf->st_mtime = fat_fd->mtime;
rtems_semaphore_release(fs_info->vol_sema);
return RC_OK;
}
59720: 4e5e unlk %fp <== NOT EXECUTED
000597dc <msdos_file_sync>:
* RETURNS:
* RC_OK on success, or -1 if error occured (errno set appropriately)
*/
int
msdos_file_sync(rtems_libio_t *iop)
{
597dc: 4e56 fff0 linkw %fp,#-16 <== NOT EXECUTED 597e0: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ <== NOT EXECUTED 597e4: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
597e8: 206a 0028 moveal %a2@(40),%a0 <== NOT EXECUTED 597ec: 2868 0034 moveal %a0@(52),%a4 <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
597f0: 42a7 clrl %sp@- <== NOT EXECUTED
int
msdos_file_sync(rtems_libio_t *iop)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
597f2: 266a 0018 moveal %a2@(24),%a3 <== NOT EXECUTED
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
597f6: 42a7 clrl %sp@- <== NOT EXECUTED 597f8: 2f2c 0088 movel %a4@(136),%sp@- <== NOT EXECUTED 597fc: 4eb9 0004 af20 jsr 4af20 <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
59802: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 59806: 4a80 tstl %d0 <== NOT EXECUTED 59808: 6600 0088 bnew 59892 <msdos_file_sync+0xb6> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
/* synchronize file data */
rc = fat_file_datasync(iop->pathinfo.mt_entry, fat_fd);
5980c: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5980e: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 59812: 4eb9 0005 36b0 jsr 536b0 <fat_file_datasync> <== NOT EXECUTED
if (rc != RC_OK)
59818: 508f addql #8,%sp <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
/* synchronize file data */
rc = fat_file_datasync(iop->pathinfo.mt_entry, fat_fd);
5981a: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc != RC_OK)
5981c: 6642 bnes 59860 <msdos_file_sync+0x84> <== NOT EXECUTED
/*
* if fat-file descriptor is not marked "removed" - synchronize file
* metadata
*/
if (!FAT_FILE_IS_REMOVED(fat_fd))
5981e: 4280 clrl %d0 <== NOT EXECUTED 59820: 102b 0030 moveb %a3@(48),%d0 <== NOT EXECUTED 59824: 0800 0000 btst #0,%d0 <== NOT EXECUTED 59828: 6636 bnes 59860 <msdos_file_sync+0x84> <== NOT EXECUTED
{
rc = msdos_set_first_cluster_num(iop->pathinfo.mt_entry, fat_fd);
5982a: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5982c: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 59830: 4eb9 0005 9ef0 jsr 59ef0 <msdos_set_first_cluster_num> <== NOT EXECUTED
if (rc != RC_OK)
59836: 508f addql #8,%sp <== NOT EXECUTED 59838: 4a80 tstl %d0 <== NOT EXECUTED 5983a: 663c bnes 59878 <msdos_file_sync+0x9c> <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
rc = msdos_set_file_size(iop->pathinfo.mt_entry, fat_fd);
5983c: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5983e: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 59842: 4eb9 0005 9fc4 jsr 59fc4 <msdos_set_file_size> <== NOT EXECUTED
if (rc != RC_OK)
59848: 508f addql #8,%sp <== NOT EXECUTED 5984a: 4a80 tstl %d0 <== NOT EXECUTED 5984c: 662a bnes 59878 <msdos_file_sync+0x9c> <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
rc = msdos_set_dir_wrt_time_and_date(iop->pathinfo.mt_entry, fat_fd);
5984e: 2f0b movel %a3,%sp@- <== NOT EXECUTED 59850: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 59854: 4eb9 0005 9dea jsr 59dea <msdos_set_dir_wrt_time_and_date> <== NOT EXECUTED
if (rc != RC_OK)
5985a: 508f addql #8,%sp <== NOT EXECUTED 5985c: 4a80 tstl %d0 <== NOT EXECUTED 5985e: 6618 bnes 59878 <msdos_file_sync+0x9c> <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
}
rtems_semaphore_release(fs_info->vol_sema);
59860: 2f2c 0088 movel %a4@(136),%sp@- <== NOT EXECUTED 59864: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
return RC_OK;
5986a: 588f addql #4,%sp <== NOT EXECUTED
}
5986c: 2002 movel %d2,%d0 <== NOT EXECUTED 5986e: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 <== NOT EXECUTED 59874: 4e5e unlk %fp <== NOT EXECUTED 59876: 4e75 rts <== NOT EXECUTED
return rc;
}
rc = msdos_set_dir_wrt_time_and_date(iop->pathinfo.mt_entry, fat_fd);
if (rc != RC_OK)
{
rtems_semaphore_release(fs_info->vol_sema);
59878: 2f2c 0088 movel %a4@(136),%sp@- <== NOT EXECUTED
return rc;
5987c: 2400 movel %d0,%d2 <== NOT EXECUTED
return rc;
}
rc = msdos_set_dir_wrt_time_and_date(iop->pathinfo.mt_entry, fat_fd);
if (rc != RC_OK)
{
rtems_semaphore_release(fs_info->vol_sema);
5987e: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
return rc;
59884: 588f addql #4,%sp <== NOT EXECUTED
}
}
rtems_semaphore_release(fs_info->vol_sema);
return RC_OK;
}
59886: 2002 movel %d2,%d0 <== NOT EXECUTED 59888: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 <== NOT EXECUTED 5988e: 4e5e unlk %fp <== NOT EXECUTED 59890: 4e75 rts <== NOT EXECUTED
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
59892: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 59898: 74ff moveq #-1,%d2 <== NOT EXECUTED 5989a: 2040 moveal %d0,%a0 <== NOT EXECUTED 5989c: 7005 moveq #5,%d0 <== NOT EXECUTED 5989e: 2080 movel %d0,%a0@ <== NOT EXECUTED
}
}
rtems_semaphore_release(fs_info->vol_sema);
return RC_OK;
}
598a0: 2002 movel %d2,%d0 <== NOT EXECUTED 598a2: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 <== NOT EXECUTED 598a8: 4e5e unlk %fp <== NOT EXECUTED
000594c2 <msdos_file_write>:
* the number of bytes written on success, or -1 if error occured
* and errno set appropriately
*/
ssize_t
msdos_file_write(rtems_libio_t *iop,const void *buffer, size_t count)
{
594c2: 4e56 ffdc linkw %fp,#-36 594c6: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@ 594ca: 246e 0008 moveal %fp@(8),%a2
ssize_t ret = 0;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
594ce: 206a 0028 moveal %a2@(40),%a0 594d2: 2868 0034 moveal %a0@(52),%a4
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
594d6: 42a7 clrl %sp@- 594d8: 42a7 clrl %sp@- 594da: 2f2c 0088 movel %a4@(136),%sp@-
msdos_file_write(rtems_libio_t *iop,const void *buffer, size_t count)
{
ssize_t ret = 0;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
594de: 266a 0018 moveal %a2@(24),%a3
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
594e2: 4eb9 0004 af20 jsr 4af20 <rtems_semaphore_obtain>
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
594e8: 4fef 000c lea %sp@(12),%sp 594ec: 4a80 tstl %d0
594ee: 666e bnes 5955e <msdos_file_write+0x9c> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one(EIO);
ret = fat_file_write(iop->pathinfo.mt_entry, fat_fd, iop->offset, count,
594f0: 2f2e 000c movel %fp@(12),%sp@- 594f4: 2f2e 0010 movel %fp@(16),%sp@- 594f8: 2f2a 0010 movel %a2@(16),%sp@- 594fc: 2f0b movel %a3,%sp@- 594fe: 2f2a 0028 movel %a2@(40),%sp@- 59502: 4eb9 0005 3332 jsr 53332 <fat_file_write>
buffer);
if (ret < 0)
59508: 4fef 0014 lea %sp@(20),%sp
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
ret = fat_file_write(iop->pathinfo.mt_entry, fat_fd, iop->offset, count,
5950c: 2400 movel %d0,%d2
buffer);
if (ret < 0)
5950e: 6d68 blts 59578 <msdos_file_write+0xb6> <== NEVER TAKEN
/*
* update file size in both fat-file descriptor and file control block if
* file was extended
*/
if (iop->offset + ret > fat_fd->fat_file_size)
59510: 2a2b 0018 movel %a3@(24),%d5 59514: 4284 clrl %d4 59516: 206a 000c moveal %a2@(12),%a0 5951a: 226a 0010 moveal %a2@(16),%a1 5951e: 2200 movel %d0,%d1 59520: 5bc0 smi %d0 59522: 49c0 extbl %d0 59524: 2608 movel %a0,%d3 59526: d289 addl %a1,%d1 59528: d183 addxl %d3,%d0 5952a: 2c00 movel %d0,%d6 5952c: 2e01 movel %d1,%d7 5952e: 9e85 subl %d5,%d7 59530: 9d84 subxl %d4,%d6
59532: 6f0a bles 5953e <msdos_file_write+0x7c>
fat_fd->fat_file_size = iop->offset + ret;
59534: 2002 movel %d2,%d0 59536: d089 addl %a1,%d0 59538: 2a00 movel %d0,%d5 5953a: 2740 0018 movel %d0,%a3@(24)
iop->size = fat_fd->fat_file_size;
rtems_semaphore_release(fs_info->vol_sema);
5953e: 2f2c 0088 movel %a4@(136),%sp@-
* file was extended
*/
if (iop->offset + ret > fat_fd->fat_file_size)
fat_fd->fat_file_size = iop->offset + ret;
iop->size = fat_fd->fat_file_size;
59542: 2544 0004 movel %d4,%a2@(4) 59546: 2545 0008 movel %d5,%a2@(8)
rtems_semaphore_release(fs_info->vol_sema);
5954a: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release>
return ret;
59550: 588f addql #4,%sp
}
59552: 2002 movel %d2,%d0 59554: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 5955a: 4e5e unlk %fp 5955c: 4e75 rts
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
5955e: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 59564: 74ff moveq #-1,%d2 <== NOT EXECUTED 59566: 7605 moveq #5,%d3 <== NOT EXECUTED 59568: 2040 moveal %d0,%a0 <== NOT EXECUTED
iop->size = fat_fd->fat_file_size;
rtems_semaphore_release(fs_info->vol_sema);
return ret;
}
5956a: 2002 movel %d2,%d0 <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
5956c: 2083 movel %d3,%a0@ <== NOT EXECUTED
iop->size = fat_fd->fat_file_size;
rtems_semaphore_release(fs_info->vol_sema);
return ret;
}
5956e: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 <== NOT EXECUTED 59574: 4e5e unlk %fp <== NOT EXECUTED 59576: 4e75 rts <== NOT EXECUTED
ret = fat_file_write(iop->pathinfo.mt_entry, fat_fd, iop->offset, count,
buffer);
if (ret < 0)
{
rtems_semaphore_release(fs_info->vol_sema);
59578: 2f2c 0088 movel %a4@(136),%sp@- <== NOT EXECUTED
return -1;
5957c: 74ff moveq #-1,%d2 <== NOT EXECUTED
ret = fat_file_write(iop->pathinfo.mt_entry, fat_fd, iop->offset, count,
buffer);
if (ret < 0)
{
rtems_semaphore_release(fs_info->vol_sema);
5957e: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
return -1;
59584: 588f addql #4,%sp <== NOT EXECUTED
iop->size = fat_fd->fat_file_size;
rtems_semaphore_release(fs_info->vol_sema);
return ret;
}
59586: 2002 movel %d2,%d0 <== NOT EXECUTED 59588: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 <== NOT EXECUTED 5958e: 4e5e unlk %fp <== NOT EXECUTED
0005ccc6 <msdos_filename_unix2dos>:
/*
* Fill the dos filename string with blanks. These are DOS's pad
* characters.
*/
for (i = 0; i <= 10; i++)
5ccc6: 4280 clrl %d0
* Convert a unix filename to a DOS filename. Return -1 if wrong name is
* supplied.
*/
int
msdos_filename_unix2dos(const char *un, int unlen, char *dn)
{
5ccc8: 4e56 ffe4 linkw %fp,#-28 5cccc: 206e 0008 moveal %fp@(8),%a0 5ccd0: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 5ccd4: 246e 0010 moveal %fp@(16),%a2
* Copy the unix filename into the dos filename string upto the end
* of string, a '.', or 8 characters. Whichever happens first stops
* us. This forms the name portion of the dos filename. Fold to
* upper case.
*/
for (i = 0; i <= 7 && unlen && (c = *un) && c != '.'; i++) {
5ccd8: 224a moveal %a2,%a1
* Convert a unix filename to a DOS filename. Return -1 if wrong name is
* supplied.
*/
int
msdos_filename_unix2dos(const char *un, int unlen, char *dn)
{
5ccda: 222e 000c movel %fp@(12),%d1
/*
* Fill the dos filename string with blanks. These are DOS's pad
* characters.
*/
for (i = 0; i <= 10; i++)
5ccde: 5280 addql #1,%d0 5cce0: 740b moveq #11,%d2
dn[i] = ' ';
5cce2: 12fc 0020 moveb #32,%a1@+
/*
* Fill the dos filename string with blanks. These are DOS's pad
* characters.
*/
for (i = 0; i <= 10; i++)
5cce6: b480 cmpl %d0,%d2
5cce8: 66f4 bnes 5ccde <msdos_filename_unix2dos+0x18>
/*
* The filenames "." and ".." are handled specially, since they
* don't follow dos filename rules.
*/
if (un[0] == '.' && unlen == 1) {
5ccea: 762e moveq #46,%d3 5ccec: 1010 moveb %a0@,%d0 5ccee: 1400 moveb %d0,%d2 5ccf0: 49c2 extbl %d2 5ccf2: b682 cmpl %d2,%d3 5ccf4: 6700 011c beqw 5ce12 <msdos_filename_unix2dos+0x14c>
}
/*
* Remove any dots from the start of a file name.
*/
while (unlen && (*un == '.')) {
5ccf8: 4a81 tstl %d1 5ccfa: 6700 010c beqw 5ce08 <msdos_filename_unix2dos+0x142> 5ccfe: 782e moveq #46,%d4 5cd00: b882 cmpl %d2,%d4
5cd02: 6618 bnes 5cd1c <msdos_filename_unix2dos+0x56> <== ALWAYS TAKEN
/* * Convert a unix filename to a DOS filename. Return -1 if wrong name is * supplied. */ int msdos_filename_unix2dos(const char *un, int unlen, char *dn)
5cd04: 43e8 0001 lea %a0@(1),%a1 <== NOT EXECUTED
/*
* Remove any dots from the start of a file name.
*/
while (unlen && (*un == '.')) {
un++;
unlen--;
5cd08: 5381 subql #1,%d1 <== NOT EXECUTED
/*
* Remove any dots from the start of a file name.
*/
while (unlen && (*un == '.')) {
un++;
5cd0a: 5288 addql #1,%a0 <== NOT EXECUTED
}
/*
* Remove any dots from the start of a file name.
*/
while (unlen && (*un == '.')) {
5cd0c: 6700 00fa beqw 5ce08 <msdos_filename_unix2dos+0x142> <== NOT EXECUTED 5cd10: 762e moveq #46,%d3 <== NOT EXECUTED 5cd12: 1019 moveb %a1@+,%d0 <== NOT EXECUTED 5cd14: 1400 moveb %d0,%d2 <== NOT EXECUTED 5cd16: 49c2 extbl %d2 <== NOT EXECUTED 5cd18: b682 cmpl %d2,%d3 <== NOT EXECUTED 5cd1a: 67ec beqs 5cd08 <msdos_filename_unix2dos+0x42> <== NOT EXECUTED
* Copy the unix filename into the dos filename string upto the end
* of string, a '.', or 8 characters. Whichever happens first stops
* us. This forms the name portion of the dos filename. Fold to
* upper case.
*/
for (i = 0; i <= 7 && unlen && (c = *un) && c != '.'; i++) {
5cd1c: 1400 moveb %d0,%d2 5cd1e: 6700 0122 beqw 5ce42 <msdos_filename_unix2dos+0x17c>
if (msdos_map[c] == 0)
5cd22: 49f9 0006 de36 lea 6de36 <msdos_map>,%a4 5cd28: 0280 0000 00ff andil #255,%d0 5cd2e: 1634 0800 moveb %a4@(00000000,%d0:l),%d3 5cd32: 6700 010e beqw 5ce42 <msdos_filename_unix2dos+0x17c>
break;
dn[i] = msdos_map[c];
5cd36: 264a moveal %a2,%a3
un++; unlen--;
5cd38: 2001 movel %d1,%d0 5cd3a: 5380 subql #1,%d0
*/
for (i = 0; i <= 7 && unlen && (c = *un) && c != '.'; i++) {
if (msdos_map[c] == 0)
break;
dn[i] = msdos_map[c];
un++;
5cd3c: 43e8 0001 lea %a0@(1),%a1
/* * Convert a unix filename to a DOS filename. Return -1 if wrong name is * supplied. */ int msdos_filename_unix2dos(const char *un, int unlen, char *dn)
5cd40: 5181 subql #8,%d1
* upper case.
*/
for (i = 0; i <= 7 && unlen && (c = *un) && c != '.'; i++) {
if (msdos_map[c] == 0)
break;
dn[i] = msdos_map[c];
5cd42: 16c3 moveb %d3,%a3@+
* Copy the unix filename into the dos filename string upto the end
* of string, a '.', or 8 characters. Whichever happens first stops
* us. This forms the name portion of the dos filename. Fold to
* upper case.
*/
for (i = 0; i <= 7 && unlen && (c = *un) && c != '.'; i++) {
5cd44: 2049 moveal %a1,%a0 5cd46: 5289 addql #1,%a1
if (msdos_map[c] == 0)
break;
dn[i] = msdos_map[c];
un++;
5cd48: 2809 movel %a1,%d4
* Copy the unix filename into the dos filename string upto the end
* of string, a '.', or 8 characters. Whichever happens first stops
* us. This forms the name portion of the dos filename. Fold to
* upper case.
*/
for (i = 0; i <= 7 && unlen && (c = *un) && c != '.'; i++) {
5cd4a: 4a80 tstl %d0 5cd4c: 6700 00ba beqw 5ce08 <msdos_filename_unix2dos+0x142> 5cd50: 4283 clrl %d3 5cd52: 1410 moveb %a0@,%d2 5cd54: 1602 moveb %d2,%d3 5cd56: 6700 00ec beqw 5ce44 <msdos_filename_unix2dos+0x17e> 5cd5a: 7a2e moveq #46,%d5 5cd5c: ba83 cmpl %d3,%d5 5cd5e: 6700 00e4 beqw 5ce44 <msdos_filename_unix2dos+0x17e>
if (msdos_map[c] == 0)
5cd62: 1634 3800 moveb %a4@(00000000,%d3:l),%d3 5cd66: 6700 00dc beqw 5ce44 <msdos_filename_unix2dos+0x17e>
break;
dn[i] = msdos_map[c];
un++;
unlen--;
5cd6a: 5380 subql #1,%d0
* upper case.
*/
for (i = 0; i <= 7 && unlen && (c = *un) && c != '.'; i++) {
if (msdos_map[c] == 0)
break;
dn[i] = msdos_map[c];
5cd6c: 16c3 moveb %d3,%a3@+
* Copy the unix filename into the dos filename string upto the end
* of string, a '.', or 8 characters. Whichever happens first stops
* us. This forms the name portion of the dos filename. Fold to
* upper case.
*/
for (i = 0; i <= 7 && unlen && (c = *un) && c != '.'; i++) {
5cd6e: b280 cmpl %d0,%d1
5cd70: 66d2 bnes 5cd44 <msdos_filename_unix2dos+0x7e>
/*
* Strip any further characters up to a '.' or the end of the
* string.
*/
while (unlen && (c = *un)) {
5cd72: 4a80 tstl %d0 5cd74: 6700 0092 beqw 5ce08 <msdos_filename_unix2dos+0x142> 5cd78: 1428 0001 moveb %a0@(1),%d2 5cd7c: 4a02 tstb %d2 5cd7e: 6700 0088 beqw 5ce08 <msdos_filename_unix2dos+0x142>
un++;
5cd82: 2044 moveal %d4,%a0
unlen--;
5cd84: 2200 movel %d0,%d1
/*
* Strip any further characters up to a '.' or the end of the
* string.
*/
while (unlen && (c = *un)) {
un++;
5cd86: 5288 addql #1,%a0
unlen--;
5cd88: 5381 subql #1,%d1
/* Make sure we've skipped over the dot before stopping. */ if (c == '.')
5cd8a: 762e moveq #46,%d3 5cd8c: 0282 0000 00ff andil #255,%d2 5cd92: b682 cmpl %d2,%d3
5cd94: 671c beqs 5cdb2 <msdos_filename_unix2dos+0xec> <== NEVER TAKEN
5cd96: 2008 movel %a0,%d0 5cd98: 2240 moveal %d0,%a1 5cd9a: 5280 addql #1,%d0
/*
* Strip any further characters up to a '.' or the end of the
* string.
*/
while (unlen && (c = *un)) {
un++;
5cd9c: 2040 moveal %d0,%a0
/*
* Strip any further characters up to a '.' or the end of the
* string.
*/
while (unlen && (c = *un)) {
5cd9e: 4a81 tstl %d1
5cda0: 6766 beqs 5ce08 <msdos_filename_unix2dos+0x142> un++; unlen--; /* Make sure we've skipped over the dot before stopping. */ if (c == '.')
5cda2: 4283 clrl %d3
* Strip any further characters up to a '.' or the end of the
* string.
*/
while (unlen && (c = *un)) {
un++;
unlen--;
5cda4: 5381 subql #1,%d1
/*
* Strip any further characters up to a '.' or the end of the
* string.
*/
while (unlen && (c = *un)) {
5cda6: 1411 moveb %a1@,%d2
un++; unlen--; /* Make sure we've skipped over the dot before stopping. */ if (c == '.')
5cda8: 1602 moveb %d2,%d3
/*
* Strip any further characters up to a '.' or the end of the
* string.
*/
while (unlen && (c = *un)) {
5cdaa: 675c beqs 5ce08 <msdos_filename_unix2dos+0x142> <== NEVER TAKEN
un++; unlen--; /* Make sure we've skipped over the dot before stopping. */ if (c == '.')
5cdac: 742e moveq #46,%d2 5cdae: b483 cmpl %d3,%d2
5cdb0: 66e6 bnes 5cd98 <msdos_filename_unix2dos+0xd2> <== ALWAYS TAKEN
/*
* Copy in the extension part of the name, if any. Force to upper
* case. Note that the extension is allowed to contain '.'s.
* Filenames in this form are probably inaccessable under dos.
*/
for (i = 8; i <= 10 && unlen && (c = *un); i++) {
5cdb2: 4a81 tstl %d1 <== NOT EXECUTED 5cdb4: 6752 beqs 5ce08 <msdos_filename_unix2dos+0x142> <== NOT EXECUTED 5cdb6: 1010 moveb %a0@,%d0 <== NOT EXECUTED 5cdb8: 674e beqs 5ce08 <msdos_filename_unix2dos+0x142> <== NOT EXECUTED
if (msdos_map[c] == 0)
5cdba: 43f9 0006 de36 lea 6de36 <msdos_map>,%a1 <== NOT EXECUTED 5cdc0: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 5cdc6: 1031 0800 moveb %a1@(00000000,%d0:l),%d0 <== NOT EXECUTED 5cdca: 673c beqs 5ce08 <msdos_filename_unix2dos+0x142> <== NOT EXECUTED
/*
* Copy in the extension part of the name, if any. Force to upper
* case. Note that the extension is allowed to contain '.'s.
* Filenames in this form are probably inaccessable under dos.
*/
for (i = 8; i <= 10 && unlen && (c = *un); i++) {
5cdcc: 7801 moveq #1,%d4 <== NOT EXECUTED
if (msdos_map[c] == 0)
break;
dn[i] = msdos_map[c];
5cdce: 1540 0008 moveb %d0,%a2@(8) <== NOT EXECUTED
/*
* Copy in the extension part of the name, if any. Force to upper
* case. Note that the extension is allowed to contain '.'s.
* Filenames in this form are probably inaccessable under dos.
*/
for (i = 8; i <= 10 && unlen && (c = *un); i++) {
5cdd2: b881 cmpl %d1,%d4 <== NOT EXECUTED 5cdd4: 6732 beqs 5ce08 <msdos_filename_unix2dos+0x142> <== NOT EXECUTED 5cdd6: 1028 0001 moveb %a0@(1),%d0 <== NOT EXECUTED 5cdda: 672c beqs 5ce08 <msdos_filename_unix2dos+0x142> <== NOT EXECUTED
if (msdos_map[c] == 0)
5cddc: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 5cde2: 1031 0800 moveb %a1@(00000000,%d0:l),%d0 <== NOT EXECUTED 5cde6: 6720 beqs 5ce08 <msdos_filename_unix2dos+0x142> <== NOT EXECUTED
/*
* Copy in the extension part of the name, if any. Force to upper
* case. Note that the extension is allowed to contain '.'s.
* Filenames in this form are probably inaccessable under dos.
*/
for (i = 8; i <= 10 && unlen && (c = *un); i++) {
5cde8: 7a02 moveq #2,%d5 <== NOT EXECUTED
if (msdos_map[c] == 0)
break;
dn[i] = msdos_map[c];
5cdea: 1540 0009 moveb %d0,%a2@(9) <== NOT EXECUTED
/*
* Copy in the extension part of the name, if any. Force to upper
* case. Note that the extension is allowed to contain '.'s.
* Filenames in this form are probably inaccessable under dos.
*/
for (i = 8; i <= 10 && unlen && (c = *un); i++) {
5cdee: ba81 cmpl %d1,%d5 <== NOT EXECUTED 5cdf0: 6716 beqs 5ce08 <msdos_filename_unix2dos+0x142> <== NOT EXECUTED 5cdf2: 1028 0002 moveb %a0@(2),%d0 <== NOT EXECUTED 5cdf6: 6710 beqs 5ce08 <msdos_filename_unix2dos+0x142> <== NOT EXECUTED
if (msdos_map[c] == 0)
5cdf8: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 5cdfe: 1031 0800 moveb %a1@(00000000,%d0:l),%d0 <== NOT EXECUTED 5ce02: 6704 beqs 5ce08 <msdos_filename_unix2dos+0x142> <== NOT EXECUTED
break;
dn[i] = msdos_map[c];
5ce04: 1540 000a moveb %d0,%a2@(10) <== NOT EXECUTED
un++; unlen--; } return 0; }
5ce08: 4280 clrl %d0 5ce0a: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 5ce0e: 4e5e unlk %fp 5ce10: 4e75 rts
/*
* The filenames "." and ".." are handled specially, since they
* don't follow dos filename rules.
*/
if (un[0] == '.' && unlen == 1) {
5ce12: 7801 moveq #1,%d4 <== NOT EXECUTED 5ce14: b881 cmpl %d1,%d4 <== NOT EXECUTED 5ce16: 6732 beqs 5ce4a <msdos_filename_unix2dos+0x184> <== NOT EXECUTED
dn[0] = '.';
return 0;
}
if (un[0] == '.' && un[1] == '.' && unlen == 2) {
5ce18: 7a2e moveq #46,%d5 <== NOT EXECUTED 5ce1a: 1628 0001 moveb %a0@(1),%d3 <== NOT EXECUTED 5ce1e: 49c3 extbl %d3 <== NOT EXECUTED 5ce20: ba83 cmpl %d3,%d5 <== NOT EXECUTED 5ce22: 6600 fed4 bnew 5ccf8 <msdos_filename_unix2dos+0x32> <== NOT EXECUTED 5ce26: 7602 moveq #2,%d3 <== NOT EXECUTED 5ce28: b681 cmpl %d1,%d3 <== NOT EXECUTED 5ce2a: 6600 fecc bnew 5ccf8 <msdos_filename_unix2dos+0x32> <== NOT EXECUTED
dn[i] = msdos_map[c];
un++;
unlen--;
}
return 0;
}
5ce2e: 4280 clrl %d0 <== NOT EXECUTED
dn[0] = '.';
return 0;
}
if (un[0] == '.' && un[1] == '.' && unlen == 2) {
dn[0] = '.';
dn[1] = '.';
5ce30: 7a2e moveq #46,%d5 <== NOT EXECUTED
if (un[0] == '.' && unlen == 1) {
dn[0] = '.';
return 0;
}
if (un[0] == '.' && un[1] == '.' && unlen == 2) {
dn[0] = '.';
5ce32: 14bc 002e moveb #46,%a2@ <== NOT EXECUTED
dn[1] = '.';
5ce36: 1545 0001 moveb %d5,%a2@(1) <== NOT EXECUTED
dn[i] = msdos_map[c];
un++;
unlen--;
}
return 0;
}
5ce3a: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 <== NOT EXECUTED 5ce3e: 4e5e unlk %fp <== NOT EXECUTED 5ce40: 4e75 rts <== NOT EXECUTED
* of string, a '.', or 8 characters. Whichever happens first stops
* us. This forms the name portion of the dos filename. Fold to
* upper case.
*/
for (i = 0; i <= 7 && unlen && (c = *un) && c != '.'; i++) {
if (msdos_map[c] == 0)
5ce42: 2001 movel %d1,%d0 <== NOT EXECUTED
* Copy the unix filename into the dos filename string upto the end
* of string, a '.', or 8 characters. Whichever happens first stops
* us. This forms the name portion of the dos filename. Fold to
* upper case.
*/
for (i = 0; i <= 7 && unlen && (c = *un) && c != '.'; i++) {
5ce44: 2808 movel %a0,%d4 <== NOT EXECUTED 5ce46: 6000 ff34 braw 5cd7c <msdos_filename_unix2dos+0xb6> <== NOT EXECUTED
dn[i] = msdos_map[c];
un++;
unlen--;
}
return 0;
}
5ce4a: 4280 clrl %d0 <== NOT EXECUTED
/*
* The filenames "." and ".." are handled specially, since they
* don't follow dos filename rules.
*/
if (un[0] == '.' && unlen == 1) {
dn[0] = '.';
5ce4c: 14bc 002e moveb #46,%a2@ <== NOT EXECUTED
dn[i] = msdos_map[c];
un++;
unlen--;
}
return 0;
}
5ce50: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 <== NOT EXECUTED 5ce54: 4e5e unlk %fp <== NOT EXECUTED
0005b282 <msdos_find_name>:
msdos_find_name(
rtems_filesystem_location_info_t *parent_loc,
const char *name,
int name_len
)
{
5b282: 4e56 ffb0 linkw %fp,#-80 5b286: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 5b28a: 266e 0008 moveal %fp@(8),%a3
fat_dir_pos_t dir_pos;
unsigned short time_val = 0;
unsigned short date = 0;
char node_entry[MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE];
memset(node_entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
5b28e: 45ee ffcc lea %fp@(-52),%a2
const char *name,
int name_len
)
{
int rc = RC_OK;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
5b292: 206b 0010 moveal %a3@(16),%a0 5b296: 2868 0034 moveal %a0@(52),%a4
unsigned short date = 0;
char node_entry[MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE];
memset(node_entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
name_type = msdos_long_to_short (name,
5b29a: 4878 000b pea b <LASTO+0x1>
msdos_find_name(
rtems_filesystem_location_info_t *parent_loc,
const char *name,
int name_len
)
{
5b29e: 262e 0010 movel %fp@(16),%d3
unsigned short date = 0;
char node_entry[MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE];
memset(node_entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
name_type = msdos_long_to_short (name,
5b2a2: 2f0a movel %a2,%sp@-
msdos_find_name(
rtems_filesystem_location_info_t *parent_loc,
const char *name,
int name_len
)
{
5b2a4: 242e 000c movel %fp@(12),%d2
unsigned short date = 0;
char node_entry[MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE];
memset(node_entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
name_type = msdos_long_to_short (name,
5b2a8: 2f03 movel %d3,%sp@- 5b2aa: 2f02 movel %d2,%sp@-
int name_len
)
{
int rc = RC_OK;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = NULL;
5b2ac: 42ae fffc clrl %fp@(-4)
fat_dir_pos_t dir_pos;
unsigned short time_val = 0;
unsigned short date = 0;
char node_entry[MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE];
memset(node_entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
5b2b0: 4292 clrl %a2@ 5b2b2: 42ae ffd0 clrl %fp@(-48) 5b2b6: 42ae ffd4 clrl %fp@(-44) 5b2ba: 42ae ffd8 clrl %fp@(-40) 5b2be: 42ae ffdc clrl %fp@(-36) 5b2c2: 42ae ffe0 clrl %fp@(-32) 5b2c6: 42ae ffe4 clrl %fp@(-28) 5b2ca: 42ae ffe8 clrl %fp@(-24)
name_type = msdos_long_to_short (name,
5b2ce: 4eb9 0005 9b40 jsr 59b40 <msdos_long_to_short>
/*
* find the node which correspondes to the name in the directory pointed by
* 'parent_loc'
*/
rc = msdos_get_name_node(parent_loc, false, name, name_len, name_type,
5b2d4: 2f0a movel %a2,%sp@- 5b2d6: 486e ffec pea %fp@(-20) 5b2da: 2f00 movel %d0,%sp@- 5b2dc: 2f03 movel %d3,%sp@- 5b2de: 2f02 movel %d2,%sp@- 5b2e0: 42a7 clrl %sp@- 5b2e2: 2f0b movel %a3,%sp@- 5b2e4: 4eb9 0005 b198 jsr 5b198 <msdos_get_name_node>
&dir_pos, node_entry);
if (rc != RC_OK)
5b2ea: 4fef 002c lea %sp@(44),%sp
/*
* find the node which correspondes to the name in the directory pointed by
* 'parent_loc'
*/
rc = msdos_get_name_node(parent_loc, false, name, name_len, name_type,
5b2ee: 2400 movel %d0,%d2
&dir_pos, node_entry);
if (rc != RC_OK)
5b2f0: 660e bnes 5b300 <msdos_find_name+0x7e>
return rc;
if (((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_VOLUME_ID) ||
5b2f2: 4280 clrl %d0 5b2f4: 102a 000b moveb %a2@(11),%d0
((*MSDOS_DIR_ATTR(node_entry) & MSDOS_ATTR_LFN_MASK) == MSDOS_ATTR_LFN))
return MSDOS_NAME_NOT_FOUND_ERR;
5b2f8: 343c 7d01 movew #32001,%d2
rc = msdos_get_name_node(parent_loc, false, name, name_len, name_type,
&dir_pos, node_entry);
if (rc != RC_OK)
return rc;
if (((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_VOLUME_ID) ||
5b2fc: 44c0 movew %d0,%ccr
5b2fe: 6a0c bpls 5b30c <msdos_find_name+0x8a> <== ALWAYS TAKEN
/* update node_info_ptr field */
parent_loc->node_access = fat_fd;
return rc;
}
5b300: 2002 movel %d2,%d0 5b302: 4cee 3c1c ffb0 moveml %fp@(-80),%d2-%d4/%a2-%a5 5b308: 4e5e unlk %fp 5b30a: 4e75 rts
&dir_pos, node_entry);
if (rc != RC_OK)
return rc;
if (((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_VOLUME_ID) ||
((*MSDOS_DIR_ATTR(node_entry) & MSDOS_ATTR_LFN_MASK) == MSDOS_ATTR_LFN))
5b30c: 723f moveq #63,%d1
rc = msdos_get_name_node(parent_loc, false, name, name_len, name_type,
&dir_pos, node_entry);
if (rc != RC_OK)
return rc;
if (((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_VOLUME_ID) ||
5b30e: 760f moveq #15,%d3
((*MSDOS_DIR_ATTR(node_entry) & MSDOS_ATTR_LFN_MASK) == MSDOS_ATTR_LFN))
5b310: c081 andl %d1,%d0
rc = msdos_get_name_node(parent_loc, false, name, name_len, name_type,
&dir_pos, node_entry);
if (rc != RC_OK)
return rc;
if (((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_VOLUME_ID) ||
5b312: b680 cmpl %d0,%d3
5b314: 67ea beqs 5b300 <msdos_find_name+0x7e> <== NEVER TAKEN
((*MSDOS_DIR_ATTR(node_entry) & MSDOS_ATTR_LFN_MASK) == MSDOS_ATTR_LFN))
return MSDOS_NAME_NOT_FOUND_ERR;
/* open fat-file corresponded to the found node */
rc = fat_file_open(parent_loc->mt_entry, &dir_pos, &fat_fd);
5b316: 486e fffc pea %fp@(-4) 5b31a: 486e ffec pea %fp@(-20) 5b31e: 2f2b 0010 movel %a3@(16),%sp@- 5b322: 4eb9 0005 29b2 jsr 529b2 <fat_file_open>
if (rc != RC_OK)
5b328: 4fef 000c lea %sp@(12),%sp
if (((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_VOLUME_ID) ||
((*MSDOS_DIR_ATTR(node_entry) & MSDOS_ATTR_LFN_MASK) == MSDOS_ATTR_LFN))
return MSDOS_NAME_NOT_FOUND_ERR;
/* open fat-file corresponded to the found node */
rc = fat_file_open(parent_loc->mt_entry, &dir_pos, &fat_fd);
5b32c: 2400 movel %d0,%d2
if (rc != RC_OK)
5b32e: 66d0 bnes 5b300 <msdos_find_name+0x7e>
return rc;
fat_fd->dir_pos = dir_pos;
5b330: 2a6e fffc moveal %fp@(-4),%a5
* size and first cluster num to the disk after each write operation
* (even if one byte is written - that is TOO slow) because
* otherwise real values of these fields stored in fat-file descriptor
* may be accidentally rewritten with wrong values stored on the disk
*/
if (fat_fd->links_num == 1)
5b334: 7801 moveq #1,%d4
/* open fat-file corresponded to the found node */
rc = fat_file_open(parent_loc->mt_entry, &dir_pos, &fat_fd);
if (rc != RC_OK)
return rc;
fat_fd->dir_pos = dir_pos;
5b336: 2b6e ffec 0020 movel %fp@(-20),%a5@(32) 5b33c: 2b6e fff0 0024 movel %fp@(-16),%a5@(36) 5b342: 2b6e fff4 0028 movel %fp@(-12),%a5@(40) 5b348: 2b6e fff8 002c movel %fp@(-8),%a5@(44)
* size and first cluster num to the disk after each write operation
* (even if one byte is written - that is TOO slow) because
* otherwise real values of these fields stored in fat-file descriptor
* may be accidentally rewritten with wrong values stored on the disk
*/
if (fat_fd->links_num == 1)
5b34e: b8ad 0008 cmpl %a5@(8),%d4
5b352: 6726 beqs 5b37a <msdos_find_name+0xf8>
fat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
}
}
/* close fat-file corresponded to the node we searched in */
rc = fat_file_close(parent_loc->mt_entry, parent_loc->node_access);
5b354: 2f13 movel %a3@,%sp@- 5b356: 45f9 0005 2fc2 lea 52fc2 <fat_file_close>,%a2 5b35c: 2f2b 0010 movel %a3@(16),%sp@- 5b360: 4e92 jsr %a2@
if (rc != RC_OK)
5b362: 508f addql #8,%sp
fat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
}
}
/* close fat-file corresponded to the node we searched in */
rc = fat_file_close(parent_loc->mt_entry, parent_loc->node_access);
5b364: 2400 movel %d0,%d2
if (rc != RC_OK)
5b366: 6600 00d8 bnew 5b440 <msdos_find_name+0x1be>
fat_file_close(parent_loc->mt_entry, fat_fd);
return rc;
}
/* update node_info_ptr field */
parent_loc->node_access = fat_fd;
5b36a: 26ae fffc movel %fp@(-4),%a3@
return rc;
}
5b36e: 2002 movel %d2,%d0 5b370: 4cee 3c1c ffb0 moveml %fp@(-80),%d2-%d4/%a2-%a5 5b376: 4e5e unlk %fp 5b378: 4e75 rts
* otherwise real values of these fields stored in fat-file descriptor
* may be accidentally rewritten with wrong values stored on the disk
*/
if (fat_fd->links_num == 1)
{
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(node_entry);
5b37a: 4283 clrl %d3 5b37c: 4281 clrl %d1 5b37e: 362a 0014 movew %a2@(20),%d3 5b382: 322a 001a movew %a2@(26),%d1 5b386: 2003 movel %d3,%d0 5b388: 2401 movel %d1,%d2 5b38a: 2803 movel %d3,%d4 5b38c: e08c lsrl #8,%d4 5b38e: e089 lsrl #8,%d1 5b390: e188 lsll #8,%d0 5b392: e18a lsll #8,%d2
time_val = *MSDOS_DIR_WRITE_TIME(node_entry);
date = *MSDOS_DIR_WRITE_DATE(node_entry);
fat_fd->mtime = msdos_date_dos2unix(CF_LE_W(date), CF_LE_W(time_val));
5b394: 362a 0016 movew %a2@(22),%d3 5b398: 8084 orl %d4,%d0 5b39a: 8481 orl %d1,%d2 5b39c: 2203 movel %d3,%d1 5b39e: 2803 movel %d3,%d4 5b3a0: e08c lsrl #8,%d4
* otherwise real values of these fields stored in fat-file descriptor
* may be accidentally rewritten with wrong values stored on the disk
*/
if (fat_fd->links_num == 1)
{
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(node_entry);
5b3a2: 4840 swap %d0 5b3a4: 4240 clrw %d0 5b3a6: 0282 0000 ffff andil #65535,%d2 5b3ac: e189 lsll #8,%d1
time_val = *MSDOS_DIR_WRITE_TIME(node_entry);
date = *MSDOS_DIR_WRITE_DATE(node_entry);
fat_fd->mtime = msdos_date_dos2unix(CF_LE_W(date), CF_LE_W(time_val));
5b3ae: 362a 0018 movew %a2@(24),%d3
* otherwise real values of these fields stored in fat-file descriptor
* may be accidentally rewritten with wrong values stored on the disk
*/
if (fat_fd->links_num == 1)
{
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(node_entry);
5b3b2: 8082 orl %d2,%d0 5b3b4: 8284 orl %d4,%d1 5b3b6: 2b40 001c movel %d0,%a5@(28) 5b3ba: 2003 movel %d3,%d0
time_val = *MSDOS_DIR_WRITE_TIME(node_entry);
date = *MSDOS_DIR_WRITE_DATE(node_entry);
fat_fd->mtime = msdos_date_dos2unix(CF_LE_W(date), CF_LE_W(time_val));
5b3bc: 3f01 movew %d1,%sp@- 5b3be: 2203 movel %d3,%d1 5b3c0: e089 lsrl #8,%d1 5b3c2: e188 lsll #8,%d0 5b3c4: 4267 clrw %sp@- 5b3c6: 8081 orl %d1,%d0 5b3c8: 3f00 movew %d0,%sp@- 5b3ca: 4267 clrw %sp@- 5b3cc: 4eb9 0005 cbc2 jsr 5cbc2 <msdos_date_dos2unix>
if ((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_DIRECTORY)
5b3d2: 508f addql #8,%sp 5b3d4: 4281 clrl %d1 5b3d6: 122a 000b moveb %a2@(11),%d1
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(node_entry);
time_val = *MSDOS_DIR_WRITE_TIME(node_entry);
date = *MSDOS_DIR_WRITE_DATE(node_entry);
fat_fd->mtime = msdos_date_dos2unix(CF_LE_W(date), CF_LE_W(time_val));
5b3da: 2b40 003e movel %d0,%a5@(62)
if ((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_DIRECTORY)
5b3de: 0801 0004 btst #4,%d1
5b3e2: 667e bnes 5b462 <msdos_find_name+0x1e0>
return rc;
}
}
else
{
fat_fd->fat_file_size = CF_LE_L(*MSDOS_DIR_FILE_SIZE(node_entry));
5b3e4: 222a 001c movel %a2@(28),%d1
uint32_t value
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
5b3e8: 7818 moveq #24,%d4 5b3ea: 2601 movel %d1,%d3
byte3 = (value >> 16) & 0xff;
5b3ec: 2401 movel %d1,%d2
byte2 = (value >> 8) & 0xff;
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
5b3ee: 2001 movel %d1,%d0
uint32_t value
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
5b3f0: e8ab lsrl %d4,%d3
byte3 = (value >> 16) & 0xff;
5b3f2: e08a lsrl #8,%d2
byte2 = (value >> 8) & 0xff;
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
5b3f4: e9a8 lsll %d4,%d0
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
5b3f6: e189 lsll #8,%d1
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
5b3f8: 0282 0000 ff00 andil #65280,%d2 5b3fe: 8083 orl %d3,%d0 5b400: 206e fffc moveal %fp@(-4),%a0
fat_fd->fat_file_type = FAT_FILE;
5b404: 7605 moveq #5,%d3
fat_fd->size_limit = MSDOS_MAX_FILE_SIZE;
5b406: 78ff moveq #-1,%d4 5b408: 0281 00ff 0000 andil #16711680,%d1
}
}
else
{
fat_fd->fat_file_size = CF_LE_L(*MSDOS_DIR_FILE_SIZE(node_entry));
fat_fd->fat_file_type = FAT_FILE;
5b40e: 2143 0010 movel %d3,%a0@(16) 5b412: 8081 orl %d1,%d0
fat_fd->size_limit = MSDOS_MAX_FILE_SIZE;
5b414: 2144 0014 movel %d4,%a0@(20) 5b418: 8082 orl %d2,%d0
return rc;
}
}
else
{
fat_fd->fat_file_size = CF_LE_L(*MSDOS_DIR_FILE_SIZE(node_entry));
5b41a: 2140 0018 movel %d0,%a0@(24)
fat_fd->size_limit = MSDOS_MAX_FILE_SIZE;
}
/* these data is not actual for zero-length fat-file */
fat_fd->map.file_cln = 0;
fat_fd->map.disk_cln = fat_fd->cln;
5b41e: 2228 001c movel %a0@(28),%d1
fat_fd->fat_file_type = FAT_FILE;
fat_fd->size_limit = MSDOS_MAX_FILE_SIZE;
}
/* these data is not actual for zero-length fat-file */
fat_fd->map.file_cln = 0;
5b422: 42a8 0032 clrl %a0@(50)
fat_fd->map.disk_cln = fat_fd->cln;
5b426: 2141 0036 movel %d1,%a0@(54)
if ((fat_fd->fat_file_size != 0) &&
5b42a: 4a80 tstl %d0
5b42c: 672a beqs 5b458 <msdos_find_name+0x1d6>
(fat_fd->fat_file_size <= fs_info->fat.vol.bpc))
5b42e: 4282 clrl %d2 5b430: 342c 0006 movew %a4@(6),%d2
/* these data is not actual for zero-length fat-file */
fat_fd->map.file_cln = 0;
fat_fd->map.disk_cln = fat_fd->cln;
if ((fat_fd->fat_file_size != 0) &&
5b434: b082 cmpl %d2,%d0
5b436: 6220 bhis 5b458 <msdos_find_name+0x1d6> <== NEVER TAKEN
(fat_fd->fat_file_size <= fs_info->fat.vol.bpc))
{
fat_fd->map.last_cln = fat_fd->cln;
5b438: 2141 003a movel %d1,%a0@(58) 5b43c: 6000 ff16 braw 5b354 <msdos_find_name+0xd2>
/* close fat-file corresponded to the node we searched in */
rc = fat_file_close(parent_loc->mt_entry, parent_loc->node_access);
if (rc != RC_OK)
{
fat_file_close(parent_loc->mt_entry, fat_fd);
5b440: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 5b444: 2f2b 0010 movel %a3@(16),%sp@- <== NOT EXECUTED 5b448: 4e92 jsr %a2@ <== NOT EXECUTED
return rc;
5b44a: 508f addql #8,%sp <== NOT EXECUTED
/* update node_info_ptr field */
parent_loc->node_access = fat_fd;
return rc;
}
5b44c: 2002 movel %d2,%d0 <== NOT EXECUTED 5b44e: 4cee 3c1c ffb0 moveml %fp@(-80),%d2-%d4/%a2-%a5 <== NOT EXECUTED 5b454: 4e5e unlk %fp <== NOT EXECUTED 5b456: 4e75 rts <== NOT EXECUTED
{
fat_fd->map.last_cln = fat_fd->cln;
}
else
{
fat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
5b458: 70ff moveq #-1,%d0 5b45a: 2140 003a movel %d0,%a0@(58) 5b45e: 6000 fef4 braw 5b354 <msdos_find_name+0xd2>
fat_fd->mtime = msdos_date_dos2unix(CF_LE_W(date), CF_LE_W(time_val));
if ((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_DIRECTORY)
{
fat_fd->fat_file_type = FAT_DIRECTORY;
5b462: 206e fffc moveal %fp@(-4),%a0 5b466: 7001 moveq #1,%d0
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
5b468: 7220 moveq #32,%d1 5b46a: 4841 swap %d1
fat_fd->mtime = msdos_date_dos2unix(CF_LE_W(date), CF_LE_W(time_val));
if ((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_DIRECTORY)
{
fat_fd->fat_file_type = FAT_DIRECTORY;
5b46c: 2140 0010 movel %d0,%a0@(16)
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
5b470: 2141 0014 movel %d1,%a0@(20)
rc = fat_file_size(parent_loc->mt_entry, fat_fd);
5b474: 2f08 movel %a0,%sp@- 5b476: 2f2b 0010 movel %a3@(16),%sp@- 5b47a: 4eb9 0005 37c2 jsr 537c2 <fat_file_size>
if (rc != RC_OK)
5b480: 508f addql #8,%sp
if ((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_DIRECTORY)
{
fat_fd->fat_file_type = FAT_DIRECTORY;
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
rc = fat_file_size(parent_loc->mt_entry, fat_fd);
5b482: 2400 movel %d0,%d2
if (rc != RC_OK)
5b484: 660a bnes 5b490 <msdos_find_name+0x20e> <== NEVER TAKEN
5b486: 206e fffc moveal %fp@(-4),%a0 5b48a: 2028 0018 movel %a0@(24),%d0 5b48e: 608e bras 5b41e <msdos_find_name+0x19c>
{
fat_file_close(parent_loc->mt_entry, fat_fd);
5b490: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 5b494: 2f2b 0010 movel %a3@(16),%sp@- <== NOT EXECUTED 5b498: 4eb9 0005 2fc2 jsr 52fc2 <fat_file_close> <== NOT EXECUTED
return rc;
5b49e: 508f addql #8,%sp <== NOT EXECUTED
/* update node_info_ptr field */
parent_loc->node_access = fat_fd;
return rc;
}
5b4a0: 2002 movel %d2,%d0 <== NOT EXECUTED 5b4a2: 4cee 3c1c ffb0 moveml %fp@(-80),%d2-%d4/%a2-%a5 <== NOT EXECUTED 5b4a8: 4e5e unlk %fp <== NOT EXECUTED
0005a3a8 <msdos_find_name_in_fat_file>:
int name_len,
msdos_name_type_t name_type,
fat_dir_pos_t *dir_pos,
char *name_dir_entry
)
{
5a3a8: 4e56 ffa8 linkw %fp,#-88
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
5a3ac: 206e 0008 moveal %fp@(8),%a0
int name_len,
msdos_name_type_t name_type,
fat_dir_pos_t *dir_pos,
char *name_dir_entry
)
{
5a3b0: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
5a3b4: 2668 0034 moveal %a0@(52),%a3
int name_len,
msdos_name_type_t name_type,
fat_dir_pos_t *dir_pos,
char *name_dir_entry
)
{
5a3b8: 1a2e 0013 moveb %fp@(19),%d5
uint32_t empty_space_count = 0;
bool empty_space_found = false;
uint32_t entries_per_block;
bool read_cluster = false;
assert(name_len > 0);
5a3bc: 4aae 0018 tstl %fp@(24) 5a3c0: 6f00 0912 blew 5acd4 <msdos_find_name_in_fat_file+0x92c>
static inline void
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
5a3c4: 226e 0020 moveal %fp@(32),%a1
dir_pos->sname.ofs = 0; dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
5a3c8: 70ff moveq #-1,%d0
static inline void
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
5a3ca: 4291 clrl %a1@
dir_pos->sname.ofs = 0;
5a3cc: 42a9 0004 clrl %a1@(4)
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
5a3d0: 2340 0008 movel %d0,%a1@(8)
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
5a3d4: 2340 000c movel %d0,%a1@(12)
fat_dir_pos_init(dir_pos);
lfn_start.cln = lfn_start.ofs = FAT_FILE_SHORT_NAME;
5a3d8: 2d40 fff8 movel %d0,%fp@(-8) 5a3dc: 2d40 fff4 movel %d0,%fp@(-12)
* is short still check for possible long entries with the short name.
*
* In PR1491 we need to have a LFN for a short file name entry. To
* test this make this test always fail, ie add "0 &&".
*/
if (create_node && (name_type == MSDOS_NAME_SHORT))
5a3e0: 4a05 tstb %d5
5a3e2: 670a beqs 5a3ee <msdos_find_name_in_fat_file+0x46>
5a3e4: 7201 moveq #1,%d1 5a3e6: b2ae 001c cmpl %fp@(28),%d1 5a3ea: 6700 045e beqw 5a84a <msdos_find_name_in_fat_file+0x4a2>
lfn_entries = 0;
else
lfn_entries =
((name_len - 1) + MSDOS_LFN_LEN_PER_ENTRY) / MSDOS_LFN_LEN_PER_ENTRY;
5a3ee: 242e 0018 movel %fp@(24),%d2
* test this make this test always fail, ie add "0 &&".
*/
if (create_node && (name_type == MSDOS_NAME_SHORT))
lfn_entries = 0;
else
lfn_entries =
5a3f2: 7e0d moveq #13,%d7
((name_len - 1) + MSDOS_LFN_LEN_PER_ENTRY) / MSDOS_LFN_LEN_PER_ENTRY;
5a3f4: 0682 0000 000c addil #12,%d2
* test this make this test always fail, ie add "0 &&".
*/
if (create_node && (name_type == MSDOS_NAME_SHORT))
lfn_entries = 0;
else
lfn_entries =
5a3fa: 4c47 2802 remsl %d7,%d2,%d2
((name_len - 1) + MSDOS_LFN_LEN_PER_ENTRY) / MSDOS_LFN_LEN_PER_ENTRY;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
5a3fe: 206e 000c moveal %fp@(12),%a0 5a402: 7001 moveq #1,%d0
* test this make this test always fail, ie add "0 &&".
*/
if (create_node && (name_type == MSDOS_NAME_SHORT))
lfn_entries = 0;
else
lfn_entries =
5a404: 2d42 ffd4 movel %d2,%fp@(-44)
((name_len - 1) + MSDOS_LFN_LEN_PER_ENTRY) / MSDOS_LFN_LEN_PER_ENTRY;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
5a408: b0a8 0020 cmpl %a0@(32),%d0 5a40c: 6700 03d2 beqw 5a7e0 <msdos_find_name_in_fat_file+0x438>
/*
* Remainder is not empty so is this entry empty ?
*/
empty_space_count++;
if (empty_space_count == (lfn_entries + 1))
5a410: 242e ffd4 movel %fp@(-44),%d2 5a414: 5282 addql #1,%d2
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
bts2rd = fat_fd->fat_file_size;
else
bts2rd = fs_info->fat.vol.bpc;
5a416: 4284 clrl %d4
uint8_t lfn_checksum = 0;
int lfn_entries;
int lfn_entry = 0;
uint32_t empty_space_offset = 0;
uint32_t empty_space_entry = 0;
uint32_t empty_space_count = 0;
5a418: 4283 clrl %d3
bool lfn_matched = false;
uint8_t lfn_checksum = 0;
int lfn_entries;
int lfn_entry = 0;
uint32_t empty_space_offset = 0;
uint32_t empty_space_entry = 0;
5a41a: 99cc subal %a4,%a4
fat_pos_t lfn_start;
bool lfn_matched = false;
uint8_t lfn_checksum = 0;
int lfn_entries;
int lfn_entry = 0;
uint32_t empty_space_offset = 0;
5a41c: 4287 clrl %d7
char *name_dir_entry
)
{
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t dir_offset = 0;
5a41e: 4286 clrl %d6
/*
* Remainder is not empty so is this entry empty ?
*/
empty_space_count++;
if (empty_space_count == (lfn_entries + 1))
5a420: 2d42 ffdc movel %d2,%fp@(-36)
int lfn_entries;
int lfn_entry = 0;
uint32_t empty_space_offset = 0;
uint32_t empty_space_entry = 0;
uint32_t empty_space_count = 0;
bool empty_space_found = false;
5a424: 4201 clrb %d1
uint32_t dir_offset = 0;
uint32_t dir_entry = 0;
uint32_t bts2rd = 0;
fat_pos_t lfn_start;
bool lfn_matched = false;
uint8_t lfn_checksum = 0;
5a426: 4202 clrb %d2
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
bts2rd = fat_fd->fat_file_size;
else
bts2rd = fs_info->fat.vol.bpc;
5a428: 382b 0006 movew %a3@(6),%d4
int lfn_entries;
int lfn_entry = 0;
uint32_t empty_space_offset = 0;
uint32_t empty_space_entry = 0;
uint32_t empty_space_count = 0;
bool empty_space_found = false;
5a42c: 1d41 ffe8 moveb %d1,%fp@(-24)
/*
* Scan the directory seeing if the file is present. While
* doing this see if a suitable location can be found to
* create the entry if the name is not found.
*/
while ((ret = fat_file_read(mt_entry, fat_fd, (dir_offset * bts2rd),
5a430: 42ae ffd8 clrl %fp@(-40)
uint32_t dir_offset = 0;
uint32_t dir_entry = 0;
uint32_t bts2rd = 0;
fat_pos_t lfn_start;
bool lfn_matched = false;
uint8_t lfn_checksum = 0;
5a434: 1d42 ffe0 moveb %d2,%fp@(-32) 5a438: 3441 moveaw %d1,%a2
int lfn_entries;
int lfn_entry = 0;
5a43a: 42ae ffec clrl %fp@(-20)
/*
* Scan the directory seeing if the file is present. While
* doing this see if a suitable location can be found to
* create the entry if the name is not found.
*/
while ((ret = fat_file_read(mt_entry, fat_fd, (dir_offset * bts2rd),
5a43e: 2f2b 008c movel %a3@(140),%sp@- 5a442: 2f04 movel %d4,%sp@- 5a444: 2f2e ffd8 movel %fp@(-40),%sp@- 5a448: 2f2e 000c movel %fp@(12),%sp@- 5a44c: 2f2e 0008 movel %fp@(8),%sp@- 5a450: 4eb9 0005 2c74 jsr 52c74 <fat_file_read> 5a456: 4fef 0014 lea %sp@(20),%sp 5a45a: 4a80 tstl %d0 5a45c: 6700 05e6 beqw 5aa44 <msdos_find_name_in_fat_file+0x69c>
bool remainder_empty = false;
#if MSDOS_FIND_PRINT
printf ("MSFS:[2] dir_offset:%li\n", dir_offset);
#endif
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
5a460: 721f moveq #31,%d1 5a462: b280 cmpl %d0,%d1 5a464: 6c00 05c2 bgew 5aa28 <msdos_find_name_in_fat_file+0x680>
rtems_set_errno_and_return_minus_one(EIO);
assert(ret == bts2rd);
5a468: b880 cmpl %d0,%d4 5a46a: 6600 0884 bnew 5acf0 <msdos_find_name_in_fat_file+0x948> 5a46e: 4282 clrl %d2 5a470: 304a moveaw %a2,%a0 5a472: 2d47 fff0 movel %d7,%fp@(-16)
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (dir_entry = 0;
dir_entry < bts2rd;
dir_entry += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
char* entry = (char*) fs_info->cl_buf + dir_entry;
5a476: 246b 008c moveal %a3@(140),%a2 5a47a: d5c2 addal %d2,%a2
/*
* See if the entry is empty or the remainder of the directory is
* empty ? Localise to make the code read better.
*/
bool entry_empty = (*MSDOS_DIR_ENTRY_TYPE(entry) ==
5a47c: 1012 moveb %a2@,%d0
* to here and write the long file name if this is the start of
* a series of empty entries. If empty_space_count is 0 then
* we are currently not inside an empty series of entries. It
* is a count of empty entries.
*/
if (empty_space_count == 0)
5a47e: 4a83 tstl %d3
5a480: 6606 bnes 5a488 <msdos_find_name_in_fat_file+0xe0><== NEVER TAKEN
5a482: 2842 moveal %d2,%a4 5a484: 2d46 fff0 movel %d6,%fp@(-16)
{
empty_space_entry = dir_entry;
empty_space_offset = dir_offset;
}
if (remainder_empty)
5a488: 4a00 tstb %d0 5a48a: 6700 02bc beqw 5a748 <msdos_find_name_in_fat_file+0x3a0>
printf ("MSFS:[3.2] esf:%i esc%i\n", empty_space_found, empty_space_count);
#endif
}
break;
}
else if (entry_empty)
5a48e: 4281 clrl %d1 5a490: 1200 moveb %d0,%d1 5a492: 2241 moveal %d1,%a1 5a494: b3fc 0000 00e5 cmpal #229,%a1 5a49a: 6700 00b8 beqw 5a554 <msdos_find_name_in_fat_file+0x1ac>
* A valid entry so handle it.
*
* If empty space has not been found we need to start the
* count again.
*/
if (create_node && !empty_space_found)
5a49e: 4a05 tstb %d5
5a4a0: 670a beqs 5a4ac <msdos_find_name_in_fat_file+0x104>
5a4a2: 4a2e ffe8 tstb %fp@(-24)
5a4a6: 6604 bnes 5a4ac <msdos_find_name_in_fat_file+0x104><== NEVER TAKEN
{
empty_space_entry = 0;
empty_space_count = 0;
5a4a8: 4283 clrl %d3
* If empty space has not been found we need to start the
* count again.
*/
if (create_node && !empty_space_found)
{
empty_space_entry = 0;
5a4aa: 99cc subal %a4,%a4
/*
* Check the attribute to see if the entry is for a long
* file name.
*/
if ((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_LFN_MASK) ==
5a4ac: 4281 clrl %d1 5a4ae: 122a 000b moveb %a2@(11),%d1 5a4b2: 7e3f moveq #63,%d7 5a4b4: c287 andl %d7,%d1 5a4b6: 1e3c 000f moveb #15,%d7 5a4ba: be81 cmpl %d1,%d7 5a4bc: 6700 0166 beqw 5a624 <msdos_find_name_in_fat_file+0x27c>
* If a LFN has been found and it matched check the
* entries have all been found and the checksum is
* correct. If this is the case return the short file
* name entry.
*/
if (lfn_matched)
5a4c0: 3e08 movew %a0,%d7 5a4c2: 4a07 tstb %d7
5a4c4: 675c beqs 5a522 <msdos_find_name_in_fat_file+0x17a>
5a4c6: 2e2e fff0 movel %fp@(-16),%d7 5a4ca: 4281 clrl %d1
uint8_t cs = 0;
uint8_t* p = (uint8_t*) MSDOS_DIR_NAME(entry);
int i;
for (i = 0; i < MSDOS_SHORT_NAME_LEN; i++, p++)
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
5a4cc: e289 lsrl #1,%d1
* RC_OK on success, or error code if error occured (errno set * appropriately) * */ #define MSDOS_FIND_PRINT 0 int msdos_find_name_in_fat_file(
5a4ce: 41ea 0001 lea %a2@(1),%a0 5a4d2: 4bea 000b lea %a2@(11),%a5
uint8_t cs = 0;
uint8_t* p = (uint8_t*) MSDOS_DIR_NAME(entry);
int i;
for (i = 0; i < MSDOS_SHORT_NAME_LEN; i++, p++)
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
5a4d6: 93c9 subal %a1,%a1 5a4d8: 2d42 fff0 movel %d2,%fp@(-16) 5a4dc: 1400 moveb %d0,%d2 5a4de: 3009 movew %a1,%d0 5a4e0: 226e fff0 moveal %fp@(-16),%a1 5a4e4: d082 addl %d2,%d0 5a4e6: d280 addl %d0,%d1
{
uint8_t cs = 0;
uint8_t* p = (uint8_t*) MSDOS_DIR_NAME(entry);
int i;
for (i = 0; i < MSDOS_SHORT_NAME_LEN; i++, p++)
5a4e8: bbc8 cmpal %a0,%a5
5a4ea: 671a beqs 5a506 <msdos_find_name_in_fat_file+0x15e><== NEVER TAKEN
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
5a4ec: 0281 0000 00ff andil #255,%d1 5a4f2: 0801 0000 btst #0,%d1
5a4f6: 6756 beqs 5a54e <msdos_find_name_in_fat_file+0x1a6>
5a4f8: 7080 moveq #-128,%d0 5a4fa: 1418 moveb %a0@+,%d2 5a4fc: d082 addl %d2,%d0 5a4fe: e289 lsrl #1,%d1 5a500: d280 addl %d0,%d1
{
uint8_t cs = 0;
uint8_t* p = (uint8_t*) MSDOS_DIR_NAME(entry);
int i;
for (i = 0; i < MSDOS_SHORT_NAME_LEN; i++, p++)
5a502: bbc8 cmpal %a0,%a5
5a504: 66e6 bnes 5a4ec <msdos_find_name_in_fat_file+0x144>
5a506: 2409 movel %a1,%d2 5a508: 2d47 fff0 movel %d7,%fp@(-16)
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
if (lfn_entry || (lfn_checksum != cs))
5a50c: 4aae ffec tstl %fp@(-20)
5a510: 6610 bnes 5a522 <msdos_find_name_in_fat_file+0x17a><== NEVER TAKEN
5a512: 4280 clrl %d0 5a514: 102e ffe0 moveb %fp@(-32),%d0 5a518: 0281 0000 00ff andil #255,%d1 5a51e: b280 cmpl %d0,%d1
5a520: 6772 beqs 5a594 <msdos_find_name_in_fat_file+0x1ec><== ALWAYS TAKEN
* short and they match then we have the entry. We will not
* match a long file name against a short file name because
* a long file name that generates a matching short file
* name is not a long file name.
*/
if (lfn_matched ||
5a522: 7001 moveq #1,%d0 5a524: b0ae 001c cmpl %fp@(28),%d0
5a528: 674a beqs 5a574 <msdos_find_name_in_fat_file+0x1cc>
memcpy(name_dir_entry, entry,
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
return RC_OK;
}
lfn_start.cln = FAT_FILE_SHORT_NAME;
5a52a: 70ff moveq #-1,%d0
lfn_matched = false;
5a52c: 91c8 subal %a0,%a0
memcpy(name_dir_entry, entry,
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
return RC_OK;
}
lfn_start.cln = FAT_FILE_SHORT_NAME;
5a52e: 2d40 fff4 movel %d0,%fp@(-12)
assert(ret == bts2rd);
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (dir_entry = 0;
dir_entry < bts2rd;
dir_entry += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
5a532: 0682 0000 0020 addil #32,%d2
rtems_set_errno_and_return_minus_one(EIO);
assert(ret == bts2rd);
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (dir_entry = 0;
5a538: b484 cmpl %d4,%d2 5a53a: 6500 ff3a bcsw 5a476 <msdos_find_name_in_fat_file+0xce>
5a53e: d9ae ffd8 addl %d4,%fp@(-40) <== NOT EXECUTED
}
if (remainder_empty)
break;
dir_offset++;
5a542: 5286 addql #1,%d6 <== NOT EXECUTED 5a544: 2e2e fff0 movel %fp@(-16),%d7 <== NOT EXECUTED 5a548: 3448 moveaw %a0,%a2 <== NOT EXECUTED 5a54a: 6000 fef2 braw 5a43e <msdos_find_name_in_fat_file+0x96><== NOT EXECUTED
uint8_t cs = 0;
uint8_t* p = (uint8_t*) MSDOS_DIR_NAME(entry);
int i;
for (i = 0; i < MSDOS_SHORT_NAME_LEN; i++, p++)
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
5a54e: 4200 clrb %d0 5a550: 1418 moveb %a0@+,%d2 5a552: 60a8 bras 5a4fc <msdos_find_name_in_fat_file+0x154>
}
break;
}
else if (entry_empty)
{
if (create_node)
5a554: 4a05 tstb %d5 <== NOT EXECUTED 5a556: 67da beqs 5a532 <msdos_find_name_in_fat_file+0x18a><== NOT EXECUTED
{
/*
* Remainder is not empty so is this entry empty ?
*/
empty_space_count++;
5a558: 5283 addql #1,%d3 <== NOT EXECUTED
if (empty_space_count == (lfn_entries + 1))
5a55a: b6ae ffdc cmpl %fp@(-36),%d3 <== NOT EXECUTED 5a55e: 66d2 bnes 5a532 <msdos_find_name_in_fat_file+0x18a><== NOT EXECUTED
assert(ret == bts2rd);
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (dir_entry = 0;
dir_entry < bts2rd;
dir_entry += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
5a560: 0682 0000 0020 addil #32,%d2 <== NOT EXECUTED
* Remainder is not empty so is this entry empty ?
*/
empty_space_count++;
if (empty_space_count == (lfn_entries + 1))
empty_space_found = true;
5a566: 7201 moveq #1,%d1 <== NOT EXECUTED 5a568: 1d41 ffe8 moveb %d1,%fp@(-24) <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
assert(ret == bts2rd);
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (dir_entry = 0;
5a56c: b484 cmpl %d4,%d2 <== NOT EXECUTED 5a56e: 6500 ff06 bcsw 5a476 <msdos_find_name_in_fat_file+0xce><== NOT EXECUTED 5a572: 60ca bras 5a53e <msdos_find_name_in_fat_file+0x196><== NOT EXECUTED
* match a long file name against a short file name because
* a long file name that generates a matching short file
* name is not a long file name.
*/
if (lfn_matched ||
((name_type == MSDOS_NAME_SHORT) &&
5a574: 72ff moveq #-1,%d1 5a576: b2ae fff4 cmpl %fp@(-12),%d1
5a57a: 66ae bnes 5a52a <msdos_find_name_in_fat_file+0x182><== NEVER TAKEN
(lfn_start.cln == FAT_FILE_SHORT_NAME) &&
(memcmp(MSDOS_DIR_NAME(entry),
5a57c: 4878 000b pea b <LASTO+0x1> 5a580: 2f2e 0024 movel %fp@(36),%sp@- 5a584: 2f0a movel %a2,%sp@- 5a586: 4eb9 0005 e218 jsr 5e218 <memcmp> 5a58c: 4fef 000c lea %sp@(12),%sp
* a long file name that generates a matching short file
* name is not a long file name.
*/
if (lfn_matched ||
((name_type == MSDOS_NAME_SHORT) &&
(lfn_start.cln == FAT_FILE_SHORT_NAME) &&
5a590: 4a80 tstl %d0
5a592: 6696 bnes 5a52a <msdos_find_name_in_fat_file+0x182>
#endif
/*
* We get the entry we looked for - fill the position
* structure and the 32 bytes of the short entry
*/
int rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM,
5a594: 2f2e 0020 movel %fp@(32),%sp@- 5a598: 47f9 0005 30b0 lea 530b0 <fat_file_ioctl>,%a3 5a59e: 2f2e ffd8 movel %fp@(-40),%sp@- 5a5a2: 4878 0001 pea 1 <ADD> 5a5a6: 2f2e 000c movel %fp@(12),%sp@- 5a5aa: 2f2e 0008 movel %fp@(8),%sp@- 5a5ae: 4e93 jsr %a3@
dir_offset * bts2rd,
&dir_pos->sname.cln);
if (rc != RC_OK)
5a5b0: 4fef 0014 lea %sp@(20),%sp
#endif
/*
* We get the entry we looked for - fill the position
* structure and the 32 bytes of the short entry
*/
int rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM,
5a5b4: 2a40 moveal %d0,%a5
dir_offset * bts2rd,
&dir_pos->sname.cln);
if (rc != RC_OK)
5a5b6: 4a80 tstl %d0
5a5b8: 665e bnes 5a618 <msdos_find_name_in_fat_file+0x270><== NEVER TAKEN
return rc;
dir_pos->sname.ofs = dir_entry;
5a5ba: 206e 0020 moveal %fp@(32),%a0
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
5a5be: 72ff moveq #-1,%d1 5a5c0: 202e fff4 movel %fp@(-12),%d0
dir_offset * bts2rd,
&dir_pos->sname.cln);
if (rc != RC_OK)
return rc;
dir_pos->sname.ofs = dir_entry;
5a5c4: 2142 0004 movel %d2,%a0@(4)
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
5a5c8: b280 cmpl %d0,%d1 5a5ca: 6700 0292 beqw 5a85e <msdos_find_name_in_fat_file+0x4b6>
{
rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM,
5a5ce: 486e fff4 pea %fp@(-12) 5a5d2: 4c00 4800 mulsl %d0,%d4 5a5d6: 2f04 movel %d4,%sp@- 5a5d8: 4878 0001 pea 1 <ADD> 5a5dc: 2f2e 000c movel %fp@(12),%sp@- 5a5e0: 2f2e 0008 movel %fp@(8),%sp@- 5a5e4: 4e93 jsr %a3@
lfn_start.cln * bts2rd,
&lfn_start.cln);
if (rc != RC_OK)
5a5e6: 4fef 0014 lea %sp@(20),%sp 5a5ea: 4a80 tstl %d0 5a5ec: 6600 024e bnew 5a83c <msdos_find_name_in_fat_file+0x494>
return rc;
}
dir_pos->lname.cln = lfn_start.cln;
dir_pos->lname.ofs = lfn_start.ofs;
5a5f0: 226e 0020 moveal %fp@(32),%a1 5a5f4: 47ee fff8 lea %fp@(-8),%a3
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
{
rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM,
lfn_start.cln * bts2rd,
&lfn_start.cln);
if (rc != RC_OK)
5a5f8: 202e fff4 movel %fp@(-12),%d0
}
dir_pos->lname.cln = lfn_start.cln;
dir_pos->lname.ofs = lfn_start.ofs;
memcpy(name_dir_entry, entry,
5a5fc: 206e 0024 moveal %fp@(36),%a0
if (rc != RC_OK)
return rc;
}
dir_pos->lname.cln = lfn_start.cln;
dir_pos->lname.ofs = lfn_start.ofs;
5a600: 2353 000c movel %a3@,%a1@(12)
&lfn_start.cln);
if (rc != RC_OK)
return rc;
}
dir_pos->lname.cln = lfn_start.cln;
5a604: 2340 0008 movel %d0,%a1@(8)
dir_pos->lname.ofs = lfn_start.ofs;
memcpy(name_dir_entry, entry,
5a608: 20da movel %a2@+,%a0@+ 5a60a: 20da movel %a2@+,%a0@+ 5a60c: 20da movel %a2@+,%a0@+ 5a60e: 20da movel %a2@+,%a0@+ 5a610: 20da movel %a2@+,%a0@+ 5a612: 20da movel %a2@+,%a0@+ 5a614: 20da movel %a2@+,%a0@+ 5a616: 2092 movel %a2@,%a0@
empty_space_entry = 0;
read_cluster = true;
}
return 0;
}
5a618: 200d movel %a5,%d0 5a61a: 4cee 3cfc ffa8 moveml %fp@(-88),%d2-%d7/%a2-%a5 5a620: 4e5e unlk %fp 5a622: 4e75 rts
#endif
/*
* If we are not already processing a LFN see if this is
* the first entry of a LFN ?
*/
if (lfn_start.cln == FAT_FILE_SHORT_NAME)
5a624: 70ff moveq #-1,%d0 5a626: b0ae fff4 cmpl %fp@(-12),%d0
5a62a: 6722 beqs 5a64e <msdos_find_name_in_fat_file+0x2a6>
* If the entry number or the check sum do not match
* forget this series of long directory entries. These
* could be orphaned entries depending on the history
* of the disk.
*/
if ((lfn_entry != (*MSDOS_DIR_ENTRY_TYPE(entry) &
5a62c: 2209 movel %a1,%d1 5a62e: 7e3f moveq #63,%d7 5a630: c287 andl %d7,%d1 5a632: b2ae ffec cmpl %fp@(-20),%d1
5a636: 673e beqs 5a676 <msdos_find_name_in_fat_file+0x2ce><== ALWAYS TAKEN
(lfn_checksum != *MSDOS_DIR_LFN_CHECKSUM(entry)))
{
#if MSDOS_FIND_PRINT
printf ("MSFS:[4.4] no match\n");
#endif
lfn_start.cln = FAT_FILE_SHORT_NAME;
5a638: 72ff moveq #-1,%d1 <== NOT EXECUTED
assert(ret == bts2rd);
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (dir_entry = 0;
dir_entry < bts2rd;
dir_entry += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
5a63a: 0682 0000 0020 addil #32,%d2 <== NOT EXECUTED
(lfn_checksum != *MSDOS_DIR_LFN_CHECKSUM(entry)))
{
#if MSDOS_FIND_PRINT
printf ("MSFS:[4.4] no match\n");
#endif
lfn_start.cln = FAT_FILE_SHORT_NAME;
5a640: 2d41 fff4 movel %d1,%fp@(-12) <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
assert(ret == bts2rd);
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (dir_entry = 0;
5a644: b484 cmpl %d4,%d2 <== NOT EXECUTED 5a646: 6500 fe2e bcsw 5a476 <msdos_find_name_in_fat_file+0xce><== NOT EXECUTED 5a64a: 6000 fef2 braw 5a53e <msdos_find_name_in_fat_file+0x196><== NOT EXECUTED
/*
* The first entry must have the last long entry
* flag set.
*/
if ((*MSDOS_DIR_ENTRY_TYPE(entry) &
5a64e: 2209 movel %a1,%d1 5a650: 0801 0006 btst #6,%d1
5a654: 670e beqs 5a664 <msdos_find_name_in_fat_file+0x2bc>
* entry match the number we expect for this
* file name. Note we do not know the number of
* characters in the entry so this is check further
* on when the characters are checked.
*/
if (lfn_entries != (*MSDOS_DIR_ENTRY_TYPE(entry) &
5a656: 1e3c 003f moveb #63,%d7 5a65a: c287 andl %d7,%d1 5a65c: b2ae ffd4 cmpl %fp@(-44),%d1 5a660: 6700 014c beqw 5a7ae <msdos_find_name_in_fat_file+0x406>
assert(ret == bts2rd);
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (dir_entry = 0;
dir_entry < bts2rd;
dir_entry += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
5a664: 0682 0000 0020 addil #32,%d2
* If we are not already processing a LFN see if this is
* the first entry of a LFN ?
*/
if (lfn_start.cln == FAT_FILE_SHORT_NAME)
{
lfn_matched = false;
5a66a: 91c8 subal %a0,%a0
rtems_set_errno_and_return_minus_one(EIO);
assert(ret == bts2rd);
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (dir_entry = 0;
5a66c: b484 cmpl %d4,%d2 5a66e: 6500 fe06 bcsw 5a476 <msdos_find_name_in_fat_file+0xce>
5a672: 6000 feca braw 5a53e <msdos_find_name_in_fat_file+0x196><== NOT EXECUTED
* forget this series of long directory entries. These
* could be orphaned entries depending on the history
* of the disk.
*/
if ((lfn_entry != (*MSDOS_DIR_ENTRY_TYPE(entry) &
MSDOS_LAST_LONG_ENTRY_MASK)) ||
5a676: 4280 clrl %d0 5a678: 102a 000d moveb %a2@(13),%d0 5a67c: 2240 moveal %d0,%a1 5a67e: 102e ffe0 moveb %fp@(-32),%d0 5a682: b089 cmpl %a1,%d0
5a684: 66b2 bnes 5a638 <msdos_find_name_in_fat_file+0x290><== NEVER TAKEN
#endif
lfn_start.cln = FAT_FILE_SHORT_NAME;
continue;
}
lfn_entry--;
5a686: 53ae ffec subql #1,%fp@(-20)
o = lfn_entry * MSDOS_LFN_LEN_PER_ENTRY;
5a68a: 700d moveq #13,%d0
p = entry + 1;
5a68c: 41ea 0001 lea %a2@(1),%a0
lfn_start.cln = FAT_FILE_SHORT_NAME;
continue;
}
lfn_entry--;
o = lfn_entry * MSDOS_LFN_LEN_PER_ENTRY;
5a690: 2e2e ffec movel %fp@(-20),%d7 5a694: 4c00 7800 mulsl %d0,%d7
* RC_OK on success, or error code if error occured (errno set * appropriately) * */ #define MSDOS_FIND_PRINT 0 int msdos_find_name_in_fat_file(
5a698: 4200 clrb %d0 5a69a: 226e 0014 moveal %fp@(20),%a1 5a69e: d3c7 addal %d7,%a1
lfn_start.cln = FAT_FILE_SHORT_NAME;
continue;
}
lfn_entry--;
o = lfn_entry * MSDOS_LFN_LEN_PER_ENTRY;
5a6a0: 2d47 ffd0 movel %d7,%fp@(-48)
* RC_OK on success, or error code if error occured (errno set * appropriately) * */ #define MSDOS_FIND_PRINT 0 int msdos_find_name_in_fat_file(
5a6a4: 2e2e fff0 movel %fp@(-16),%d7 5a6a8: 2d41 ffe4 movel %d1,%fp@(-28) 5a6ac: 2d40 fff0 movel %d0,%fp@(-16)
{
#if MSDOS_FIND_PRINT > 1
printf ("MSFS:[6] o:%i i:%i *p:%c(%02x) name[o + i]:%c(%02x)\n",
o, i, *p, *p, name[o + i], name[o + i]);
#endif
if (*p == '\0')
5a6b0: 1210 moveb %a0@,%d1
5a6b2: 6744 beqs 5a6f8 <msdos_find_name_in_fat_file+0x350> * RC_OK on success, or error code if error occured (errno set * appropriately) * */ #define MSDOS_FIND_PRINT 0 int msdos_find_name_in_fat_file(
5a6b4: 246e ffd0 moveal %fp@(-48),%a2 5a6b8: d5c0 addal %d0,%a2
((o + i) != name_len))
lfn_start.cln = FAT_FILE_SHORT_NAME;
break;
}
if (((o + i) >= name_len) || (*p != name[o + i]))
5a6ba: b5ee 0018 cmpal %fp@(24),%a2 5a6be: 6c00 016e bgew 5a82e <msdos_find_name_in_fat_file+0x486> 5a6c2: 49c1 extbl %d1 5a6c4: 2a41 moveal %d1,%a5 5a6c6: 5280 addql #1,%d0 5a6c8: 1219 moveb %a1@+,%d1 5a6ca: 49c1 extbl %d1 5a6cc: b28d cmpl %a5,%d1 5a6ce: 6600 015e bnew 5a82e <msdos_find_name_in_fat_file+0x486>
{
lfn_start.cln = FAT_FILE_SHORT_NAME;
break;
}
switch (i)
5a6d2: 7204 moveq #4,%d1 5a6d4: b2ae fff0 cmpl %fp@(-16),%d1
5a6d8: 6762 beqs 5a73c <msdos_find_name_in_fat_file+0x394>
5a6da: 123c 000a moveb #10,%d1 5a6de: b2ae fff0 cmpl %fp@(-16),%d1
5a6e2: 675e beqs 5a742 <msdos_find_name_in_fat_file+0x39a>
p = entry + 1;
#if MSDOS_FIND_PRINT
printf ("MSFS:[5] lfne:%i\n", lfn_entry);
#endif
for (i = 0; i < MSDOS_LFN_LEN_PER_ENTRY; i++)
5a6e4: 720d moveq #13,%d1 5a6e6: b280 cmpl %d0,%d1 5a6e8: 6700 013c beqw 5a826 <msdos_find_name_in_fat_file+0x47e>
break;
case 10:
p += 4;
break;
default:
p += 2;
5a6ec: 5488 addql #2,%a0
{
#if MSDOS_FIND_PRINT > 1
printf ("MSFS:[6] o:%i i:%i *p:%c(%02x) name[o + i]:%c(%02x)\n",
o, i, *p, *p, name[o + i], name[o + i]);
#endif
if (*p == '\0')
5a6ee: 1210 moveb %a0@,%d1
* RC_OK on success, or error code if error occured (errno set * appropriately) * */ #define MSDOS_FIND_PRINT 0 int msdos_find_name_in_fat_file(
5a6f0: 2d40 fff0 movel %d0,%fp@(-16)
{
#if MSDOS_FIND_PRINT > 1
printf ("MSFS:[6] o:%i i:%i *p:%c(%02x) name[o + i]:%c(%02x)\n",
o, i, *p, *p, name[o + i], name[o + i]);
#endif
if (*p == '\0')
5a6f4: 4a01 tstb %d1
5a6f6: 66bc bnes 5a6b4 <msdos_find_name_in_fat_file+0x30c>
5a6f8: 222e ffe4 movel %fp@(-28),%d1 5a6fc: 2d47 fff0 movel %d7,%fp@(-16)
/*
* If this is the first entry, ie the last part of the
* long file name and the length does not match then
* the file names do not match.
*/
if (((lfn_entry + 1) == lfn_entries) &&
5a700: b2ae ffd4 cmpl %fp@(-44),%d1
5a704: 6610 bnes 5a716 <msdos_find_name_in_fat_file+0x36e><== NEVER TAKEN
((o + i) != name_len))
5a706: d0ae ffd0 addl %fp@(-48),%d0
/*
* If this is the first entry, ie the last part of the
* long file name and the length does not match then
* the file names do not match.
*/
if (((lfn_entry + 1) == lfn_entries) &&
5a70a: b0ae 0018 cmpl %fp@(24),%d0
5a70e: 6706 beqs 5a716 <msdos_find_name_in_fat_file+0x36e><== ALWAYS TAKEN
break;
}
if (((o + i) >= name_len) || (*p != name[o + i]))
{
lfn_start.cln = FAT_FILE_SHORT_NAME;
5a710: 7eff moveq #-1,%d7 <== NOT EXECUTED 5a712: 2d47 fff4 movel %d7,%fp@(-12) <== NOT EXECUTED
p += 2;
break;
}
}
lfn_matched = ((lfn_entry == 0) &&
5a716: 4aae ffec tstl %fp@(-20) 5a71a: 6600 ff48 bnew 5a664 <msdos_find_name_in_fat_file+0x2bc>
* RC_OK on success, or error code if error occured (errno set * appropriately) * */ #define MSDOS_FIND_PRINT 0 int msdos_find_name_in_fat_file(
5a71e: 7eff moveq #-1,%d7 5a720: beae fff4 cmpl %fp@(-12),%d7 5a724: 56c0 sne %d0
assert(ret == bts2rd);
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (dir_entry = 0;
dir_entry < bts2rd;
dir_entry += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
5a726: 0682 0000 0020 addil #32,%d2
* RC_OK on success, or error code if error occured (errno set * appropriately) * */ #define MSDOS_FIND_PRINT 0 int msdos_find_name_in_fat_file(
5a72c: 2200 movel %d0,%d1 5a72e: 4481 negl %d1 5a730: 2041 moveal %d1,%a0
rtems_set_errno_and_return_minus_one(EIO);
assert(ret == bts2rd);
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (dir_entry = 0;
5a732: b484 cmpl %d4,%d2 5a734: 6500 fd40 bcsw 5a476 <msdos_find_name_in_fat_file+0xce>
5a738: 6000 fe04 braw 5a53e <msdos_find_name_in_fat_file+0x196><== NOT EXECUTED
}
switch (i)
{
case 4:
p += 5;
5a73c: 5a88 addql #5,%a0
break;
5a73e: 6000 ff6c braw 5a6ac <msdos_find_name_in_fat_file+0x304>
case 10:
p += 4;
5a742: 5888 addql #4,%a0
break;
5a744: 6000 ff66 braw 5a6ac <msdos_find_name_in_fat_file+0x304> 5a748: 2e2e fff0 movel %fp@(-16),%d7
/*
* If just looking and there is no more entries in the
* directory - return name-not-found
*/
if (!create_node)
return MSDOS_NAME_NOT_FOUND_ERR;
5a74c: 3a7c 7d01 moveaw #32001,%a5
#endif
/*
* If just looking and there is no more entries in the
* directory - return name-not-found
*/
if (!create_node)
5a750: 4a05 tstb %d5 5a752: 6700 fec4 beqw 5a618 <msdos_find_name_in_fat_file+0x270>
* Lets go and write the directory entries. If we have not found
* any available space add the remaining number of entries to any that
* we may have already found that are just before this entry. If more
* are needed FAT_EOF is returned by the read and we extend the file.
*/
if (!empty_space_found)
5a756: 4a2e ffe8 tstb %fp@(-24)
5a75a: 660a bnes 5a766 <msdos_find_name_in_fat_file+0x3be><== NEVER TAKEN
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
bts2rd = fat_fd->fat_file_size;
else
bts2rd = fs_info->fat.vol.bpc;
entries_per_block = bts2rd / MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
5a75c: 2004 movel %d4,%d0 5a75e: ea88 lsrl #5,%d0
* are needed FAT_EOF is returned by the read and we extend the file.
*/
if (!empty_space_found)
{
empty_space_count +=
entries_per_block - (dir_entry / MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
5a760: d680 addl %d0,%d3 5a762: ea8a lsrl #5,%d2
* we may have already found that are just before this entry. If more
* are needed FAT_EOF is returned by the read and we extend the file.
*/
if (!empty_space_found)
{
empty_space_count +=
5a764: 9682 subl %d2,%d3
* data to place in each long file name entry. First set the short
* file name to the slot of the SFN entry. This will mean no clashes
* in this directory.
*/
lfn_checksum = 0;
if (name_type == MSDOS_NAME_LONG)
5a766: 7402 moveq #2,%d2 5a768: b4ae 001c cmpl %fp@(28),%d2 5a76c: 6700 0444 beqw 5abb2 <msdos_find_name_in_fat_file+0x80a>
int slot = (((empty_space_offset * bts2rd) + empty_space_entry) /
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE) + lfn_entries + 1;
msdos_short_name_hex(MSDOS_DIR_NAME(name_dir_entry), slot);
}
if (lfn_entries)
5a770: 4aae ffd4 tstl %fp@(-44) 5a774: 6700 02e4 beqw 5aa5a <msdos_find_name_in_fat_file+0x6b2>
* RC_OK on success, or error code if error occured (errno set * appropriately) * */ #define MSDOS_FIND_PRINT 0 int msdos_find_name_in_fat_file(
5a778: 226e 0024 moveal %fp@(36),%a1 5a77c: 4280 clrl %d0 5a77e: 43e9 000b lea %a1@(11),%a1
if (lfn_entries)
{
uint8_t* p = (uint8_t*) MSDOS_DIR_NAME(name_dir_entry);
int i;
for (i = 0; i < 11; i++, p++)
lfn_checksum =
5a782: 4201 clrb %d1
* RC_OK on success, or error code if error occured (errno set * appropriately) * */ #define MSDOS_FIND_PRINT 0 int msdos_find_name_in_fat_file(
5a784: 206e 0024 moveal %fp@(36),%a0
if (lfn_entries)
{
uint8_t* p = (uint8_t*) MSDOS_DIR_NAME(name_dir_entry);
int i;
for (i = 0; i < 11; i++, p++)
lfn_checksum =
5a788: 2400 movel %d0,%d2 5a78a: e28a lsrl #1,%d2 5a78c: 1018 moveb %a0@+,%d0 5a78e: d082 addl %d2,%d0 5a790: d081 addl %d1,%d0 5a792: 1d40 ffef moveb %d0,%fp@(-17)
if (lfn_entries)
{
uint8_t* p = (uint8_t*) MSDOS_DIR_NAME(name_dir_entry);
int i;
for (i = 0; i < 11; i++, p++)
5a796: b3c8 cmpal %a0,%a1 5a798: 6700 02c6 beqw 5aa60 <msdos_find_name_in_fat_file+0x6b8>
lfn_checksum =
((lfn_checksum & 1) ? 0x80 : 0) + (lfn_checksum >> 1) + *p;
5a79c: 4280 clrl %d0 5a79e: 102e ffef moveb %fp@(-17),%d0
if (lfn_entries)
{
uint8_t* p = (uint8_t*) MSDOS_DIR_NAME(name_dir_entry);
int i;
for (i = 0; i < 11; i++, p++)
lfn_checksum =
5a7a2: 0800 0000 btst #0,%d0 5a7a6: 6700 04a8 beqw 5ac50 <msdos_find_name_in_fat_file+0x8a8> 5a7aa: 7280 moveq #-128,%d1 5a7ac: 60da bras 5a788 <msdos_find_name_in_fat_file+0x3e0>
continue;
/*
* Get the checksum of the short entry.
*/
lfn_start.cln = dir_offset;
5a7ae: 2d46 fff4 movel %d6,%fp@(-12) 5a7b2: 4280 clrl %d0
lfn_start.ofs = dir_entry;
5a7b4: 2d42 fff8 movel %d2,%fp@(-8)
lfn_entry = lfn_entries;
lfn_checksum = *MSDOS_DIR_LFN_CHECKSUM(entry);
5a7b8: 222e ffd4 movel %fp@(-44),%d1 5a7bc: 1012 moveb %a2@,%d0 5a7be: 2240 moveal %d0,%a1 5a7c0: 1e2a 000d moveb %a2@(13),%d7 5a7c4: 2d41 ffec movel %d1,%fp@(-20)
* If the entry number or the check sum do not match
* forget this series of long directory entries. These
* could be orphaned entries depending on the history
* of the disk.
*/
if ((lfn_entry != (*MSDOS_DIR_ENTRY_TYPE(entry) &
5a7c8: 2209 movel %a1,%d1
* Get the checksum of the short entry.
*/
lfn_start.cln = dir_offset;
lfn_start.ofs = dir_entry;
lfn_entry = lfn_entries;
lfn_checksum = *MSDOS_DIR_LFN_CHECKSUM(entry);
5a7ca: 1d47 ffe0 moveb %d7,%fp@(-32)
* If the entry number or the check sum do not match
* forget this series of long directory entries. These
* could be orphaned entries depending on the history
* of the disk.
*/
if ((lfn_entry != (*MSDOS_DIR_ENTRY_TYPE(entry) &
5a7ce: 7e3f moveq #63,%d7 5a7d0: c287 andl %d7,%d1
* If we are not already processing a LFN see if this is
* the first entry of a LFN ?
*/
if (lfn_start.cln == FAT_FILE_SHORT_NAME)
{
lfn_matched = false;
5a7d2: 91c8 subal %a0,%a0
* If the entry number or the check sum do not match
* forget this series of long directory entries. These
* could be orphaned entries depending on the history
* of the disk.
*/
if ((lfn_entry != (*MSDOS_DIR_ENTRY_TYPE(entry) &
5a7d4: b2ae ffec cmpl %fp@(-20),%d1 5a7d8: 6600 fe5e bnew 5a638 <msdos_find_name_in_fat_file+0x290> 5a7dc: 6000 fe98 braw 5a676 <msdos_find_name_in_fat_file+0x2ce>
lfn_entries = 0;
else
lfn_entries =
((name_len - 1) + MSDOS_LFN_LEN_PER_ENTRY) / MSDOS_LFN_LEN_PER_ENTRY;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
5a7e0: 4aa8 0024 tstl %a0@(36) 5a7e4: 6600 fc2a bnew 5a410 <msdos_find_name_in_fat_file+0x68>
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
5a7e8: 4280 clrl %d0 5a7ea: 102b 000a moveb %a3@(10),%d0 5a7ee: 7203 moveq #3,%d1 5a7f0: c081 andl %d1,%d0
lfn_entries = 0;
else
lfn_entries =
((name_len - 1) + MSDOS_LFN_LEN_PER_ENTRY) / MSDOS_LFN_LEN_PER_ENTRY;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
5a7f2: 6700 fc1c beqw 5a410 <msdos_find_name_in_fat_file+0x68>
/*
* Remainder is not empty so is this entry empty ?
*/
empty_space_count++;
if (empty_space_count == (lfn_entries + 1))
5a7f6: 242e ffd4 movel %fp@(-44),%d2 5a7fa: 5282 addql #1,%d2
uint8_t lfn_checksum = 0;
int lfn_entries;
int lfn_entry = 0;
uint32_t empty_space_offset = 0;
uint32_t empty_space_entry = 0;
uint32_t empty_space_count = 0;
5a7fc: 4283 clrl %d3
bool lfn_matched = false;
uint8_t lfn_checksum = 0;
int lfn_entries;
int lfn_entry = 0;
uint32_t empty_space_offset = 0;
uint32_t empty_space_entry = 0;
5a7fe: 99cc subal %a4,%a4
fat_pos_t lfn_start;
bool lfn_matched = false;
uint8_t lfn_checksum = 0;
int lfn_entries;
int lfn_entry = 0;
uint32_t empty_space_offset = 0;
5a800: 4287 clrl %d7
char *name_dir_entry
)
{
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t dir_offset = 0;
5a802: 4286 clrl %d6
/*
* Remainder is not empty so is this entry empty ?
*/
empty_space_count++;
if (empty_space_count == (lfn_entries + 1))
5a804: 2d42 ffdc movel %d2,%fp@(-36)
lfn_entries =
((name_len - 1) + MSDOS_LFN_LEN_PER_ENTRY) / MSDOS_LFN_LEN_PER_ENTRY;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
bts2rd = fat_fd->fat_file_size;
5a808: 2828 0018 movel %a0@(24),%d4
int lfn_entries;
int lfn_entry = 0;
uint32_t empty_space_offset = 0;
uint32_t empty_space_entry = 0;
uint32_t empty_space_count = 0;
bool empty_space_found = false;
5a80c: 4201 clrb %d1
uint32_t dir_offset = 0;
uint32_t dir_entry = 0;
uint32_t bts2rd = 0;
fat_pos_t lfn_start;
bool lfn_matched = false;
uint8_t lfn_checksum = 0;
5a80e: 4202 clrb %d2
/*
* Scan the directory seeing if the file is present. While
* doing this see if a suitable location can be found to
* create the entry if the name is not found.
*/
while ((ret = fat_file_read(mt_entry, fat_fd, (dir_offset * bts2rd),
5a810: 42ae ffd8 clrl %fp@(-40)
int lfn_entries;
int lfn_entry = 0;
uint32_t empty_space_offset = 0;
uint32_t empty_space_entry = 0;
uint32_t empty_space_count = 0;
bool empty_space_found = false;
5a814: 1d41 ffe8 moveb %d1,%fp@(-24)
uint32_t bts2rd = 0;
fat_pos_t lfn_start;
bool lfn_matched = false;
uint8_t lfn_checksum = 0;
int lfn_entries;
int lfn_entry = 0;
5a818: 42ae ffec clrl %fp@(-20)
uint32_t dir_offset = 0;
uint32_t dir_entry = 0;
uint32_t bts2rd = 0;
fat_pos_t lfn_start;
bool lfn_matched = false;
uint8_t lfn_checksum = 0;
5a81c: 1d42 ffe0 moveb %d2,%fp@(-32) 5a820: 3441 moveaw %d1,%a2 5a822: 6000 fc1a braw 5a43e <msdos_find_name_in_fat_file+0x96> 5a826: 2d47 fff0 movel %d7,%fp@(-16) 5a82a: 6000 feea braw 5a716 <msdos_find_name_in_fat_file+0x36e> 5a82e: 2d47 fff0 movel %d7,%fp@(-16)
break;
}
if (((o + i) >= name_len) || (*p != name[o + i]))
{
lfn_start.cln = FAT_FILE_SHORT_NAME;
5a832: 7eff moveq #-1,%d7 5a834: 2d47 fff4 movel %d7,%fp@(-12) 5a838: 6000 fedc braw 5a716 <msdos_find_name_in_fat_file+0x36e>
dir_pos->sname.ofs = dir_entry;
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
{
rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM,
5a83c: 2a40 moveal %d0,%a5 <== NOT EXECUTED
empty_space_entry = 0;
read_cluster = true;
}
return 0;
}
5a83e: 200d movel %a5,%d0 <== NOT EXECUTED 5a840: 4cee 3cfc ffa8 moveml %fp@(-88),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5a846: 4e5e unlk %fp <== NOT EXECUTED 5a848: 4e75 rts <== NOT EXECUTED
lfn_entries = 0;
else
lfn_entries =
((name_len - 1) + MSDOS_LFN_LEN_PER_ENTRY) / MSDOS_LFN_LEN_PER_ENTRY;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
5a84a: 206e 000c moveal %fp@(12),%a0 5a84e: 7001 moveq #1,%d0
*
* In PR1491 we need to have a LFN for a short file name entry. To
* test this make this test always fail, ie add "0 &&".
*/
if (create_node && (name_type == MSDOS_NAME_SHORT))
lfn_entries = 0;
5a850: 42ae ffd4 clrl %fp@(-44)
else
lfn_entries =
((name_len - 1) + MSDOS_LFN_LEN_PER_ENTRY) / MSDOS_LFN_LEN_PER_ENTRY;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
5a854: b0a8 0020 cmpl %a0@(32),%d0 5a858: 6600 fbb6 bnew 5a410 <msdos_find_name_in_fat_file+0x68> 5a85c: 6082 bras 5a7e0 <msdos_find_name_in_fat_file+0x438>
if (rc != RC_OK)
return rc;
}
dir_pos->lname.cln = lfn_start.cln;
dir_pos->lname.ofs = lfn_start.ofs;
5a85e: 226e 0020 moveal %fp@(32),%a1 5a862: 47ee fff8 lea %fp@(-8),%a3
if (rc != RC_OK)
return rc;
dir_pos->sname.ofs = dir_entry;
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
5a866: 70ff moveq #-1,%d0
}
dir_pos->lname.cln = lfn_start.cln;
dir_pos->lname.ofs = lfn_start.ofs;
memcpy(name_dir_entry, entry,
5a868: 206e 0024 moveal %fp@(36),%a0
if (rc != RC_OK)
return rc;
}
dir_pos->lname.cln = lfn_start.cln;
dir_pos->lname.ofs = lfn_start.ofs;
5a86c: 2353 000c movel %a3@,%a1@(12)
&lfn_start.cln);
if (rc != RC_OK)
return rc;
}
dir_pos->lname.cln = lfn_start.cln;
5a870: 2340 0008 movel %d0,%a1@(8)
dir_pos->lname.ofs = lfn_start.ofs;
memcpy(name_dir_entry, entry,
5a874: 20da movel %a2@+,%a0@+ 5a876: 20da movel %a2@+,%a0@+ 5a878: 20da movel %a2@+,%a0@+ 5a87a: 20da movel %a2@+,%a0@+ 5a87c: 20da movel %a2@+,%a0@+ 5a87e: 20da movel %a2@+,%a0@+ 5a880: 20da movel %a2@+,%a0@+ 5a882: 2092 movel %a2@,%a0@ 5a884: 6000 fd92 braw 5a618 <msdos_find_name_in_fat_file+0x270>
* RC_OK on success, or error code if error occured (errno set * appropriately) * */ #define MSDOS_FIND_PRINT 0 int msdos_find_name_in_fat_file(
5a888: 200c movel %a4,%d0 5a88a: 9082 subl %d2,%d0
break;
}
}
*MSDOS_DIR_ENTRY_TYPE(entry) = (lfn_entries - lfn_entry) + 1;
if (lfn_entry == 1)
5a88c: 7a01 moveq #1,%d5
p += 2;
break;
}
}
*MSDOS_DIR_ENTRY_TYPE(entry) = (lfn_entries - lfn_entry) + 1;
5a88e: 1480 moveb %d0,%a2@
if (lfn_entry == 1)
5a890: ba82 cmpl %d2,%d5
5a892: 6606 bnes 5a89a <msdos_find_name_in_fat_file+0x4f2>
*MSDOS_DIR_ENTRY_TYPE(entry) |= MSDOS_LAST_LONG_ENTRY;
5a894: 7240 moveq #64,%d1 5a896: 8081 orl %d1,%d0 5a898: 1480 moveb %d0,%a2@
*MSDOS_DIR_ATTR(entry) |= MSDOS_ATTR_LFN;
5a89a: 7a0f moveq #15,%d5
printf ("MSFS:[10] eso:%li\n", empty_space_offset);
#endif
for (dir_entry = empty_space_entry;
dir_entry < bts2rd;
dir_entry += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
5a89c: 0683 0000 0020 addil #32,%d3
}
*MSDOS_DIR_ENTRY_TYPE(entry) = (lfn_entries - lfn_entry) + 1;
if (lfn_entry == 1)
*MSDOS_DIR_ENTRY_TYPE(entry) |= MSDOS_LAST_LONG_ENTRY;
*MSDOS_DIR_ATTR(entry) |= MSDOS_ATTR_LFN;
5a8a2: 102a 000b moveb %a2@(11),%d0 5a8a6: 8085 orl %d5,%d0 5a8a8: 1540 000b moveb %d0,%a2@(11)
#if MSDOS_FIND_PRINT
printf ("MSFS:[10] eso:%li\n", empty_space_offset);
#endif
for (dir_entry = empty_space_entry;
5a8ac: b684 cmpl %d4,%d3 5a8ae: 6400 038e bccw 5ac3e <msdos_find_name_in_fat_file+0x896>
dir_entry < bts2rd;
dir_entry += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
char* entry = (char*) fs_info->cl_buf + dir_entry;
5a8b2: 246b 008c moveal %a3@(140),%a2
char* p;
const char* n;
int i;
char fill = 0;
length += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
5a8b6: 0687 0000 0020 addil #32,%d7
for (dir_entry = empty_space_entry;
dir_entry < bts2rd;
dir_entry += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
char* entry = (char*) fs_info->cl_buf + dir_entry;
5a8bc: d5c3 addal %d3,%a2
const char* n;
int i;
char fill = 0;
length += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
lfn_entry++;
5a8be: 5282 addql #1,%d2 5a8c0: 4bed fff3 lea %a5@(-13),%a5
length, lfn_entry);
#endif
/*
* Time to write the short file name entry.
*/
if (lfn_entry == (lfn_entries + 1))
5a8c4: b4ae fff0 cmpl %fp@(-16),%d2 5a8c8: 6600 020e bnew 5aad8 <msdos_find_name_in_fat_file+0x730> 5a8cc: 2a07 movel %d7,%d5 5a8ce: 286e ffe0 moveal %fp@(-32),%a4 5a8d2: 2e2e ffe4 movel %fp@(-28),%d7
{
/* get current cluster number */
int rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM,
5a8d6: 2f2e 0020 movel %fp@(32),%sp@- 5a8da: 4bf9 0005 30b0 lea 530b0 <fat_file_ioctl>,%a5 5a8e0: 2f2e ffe8 movel %fp@(-24),%sp@- 5a8e4: 4878 0001 pea 1 <ADD> 5a8e8: 2f2e 000c movel %fp@(12),%sp@- 5a8ec: 2f2e 0008 movel %fp@(8),%sp@- 5a8f0: 4e95 jsr %a5@
empty_space_offset * bts2rd,
&dir_pos->sname.cln);
if (rc != RC_OK)
5a8f2: 4fef 0014 lea %sp@(20),%sp 5a8f6: 4a80 tstl %d0 5a8f8: 6600 ff42 bnew 5a83c <msdos_find_name_in_fat_file+0x494>
return rc;
dir_pos->sname.ofs = dir_entry;
5a8fc: 226e 0020 moveal %fp@(32),%a1
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
5a900: 72ff moveq #-1,%d1 5a902: 202e fff4 movel %fp@(-12),%d0
empty_space_offset * bts2rd,
&dir_pos->sname.cln);
if (rc != RC_OK)
return rc;
dir_pos->sname.ofs = dir_entry;
5a906: 2343 0004 movel %d3,%a1@(4)
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
5a90a: b280 cmpl %d0,%d1 5a90c: 6700 0348 beqw 5ac56 <msdos_find_name_in_fat_file+0x8ae>
{
rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM,
5a910: 486e fff4 pea %fp@(-12) 5a914: 4c04 0800 mulsl %d4,%d0 5a918: 2f00 movel %d0,%sp@- 5a91a: 4878 0001 pea 1 <ADD> 5a91e: 2f2e 000c movel %fp@(12),%sp@- 5a922: 2f2e 0008 movel %fp@(8),%sp@- 5a926: 4e95 jsr %a5@
lfn_start.cln * bts2rd,
&lfn_start.cln);
if (rc != RC_OK)
5a928: 4fef 0014 lea %sp@(20),%sp 5a92c: 4a80 tstl %d0 5a92e: 6600 ff0c bnew 5a83c <msdos_find_name_in_fat_file+0x494>
return rc;
}
dir_pos->lname.cln = lfn_start.cln;
dir_pos->lname.ofs = lfn_start.ofs;
5a932: 226e 0020 moveal %fp@(32),%a1 5a936: 4bee fff8 lea %fp@(-8),%a5
/* write new node entry */
memcpy (entry, (uint8_t *) name_dir_entry,
5a93a: 2005 movel %d5,%d0
const char* n;
int i;
char fill = 0;
length += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
lfn_entry++;
5a93c: 2602 movel %d2,%d3
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
{
rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM,
lfn_start.cln * bts2rd,
&lfn_start.cln);
if (rc != RC_OK)
5a93e: 222e fff4 movel %fp@(-12),%d1
dir_pos->lname.cln = lfn_start.cln;
dir_pos->lname.ofs = lfn_start.ofs;
/* write new node entry */
memcpy (entry, (uint8_t *) name_dir_entry,
5a942: 206e 0024 moveal %fp@(36),%a0
if (rc != RC_OK)
return rc;
}
dir_pos->lname.cln = lfn_start.cln;
dir_pos->lname.ofs = lfn_start.ofs;
5a946: 2355 000c movel %a5@,%a1@(12)
&lfn_start.cln);
if (rc != RC_OK)
return rc;
}
dir_pos->lname.cln = lfn_start.cln;
5a94a: 2341 0008 movel %d1,%a1@(8)
dir_pos->lname.ofs = lfn_start.ofs;
/* write new node entry */
memcpy (entry, (uint8_t *) name_dir_entry,
5a94e: 24d8 movel %a0@+,%a2@+ 5a950: 24d8 movel %a0@+,%a2@+ 5a952: 24d8 movel %a0@+,%a2@+ 5a954: 24d8 movel %a0@+,%a2@+ 5a956: 24d8 movel %a0@+,%a2@+ 5a958: 24d8 movel %a0@+,%a2@+ 5a95a: 24d8 movel %a0@+,%a2@+ 5a95c: 2490 movel %a0@,%a2@
if (lfn_entry == 1)
*MSDOS_DIR_ENTRY_TYPE(entry) |= MSDOS_LAST_LONG_ENTRY;
*MSDOS_DIR_ATTR(entry) |= MSDOS_ATTR_LFN;
}
ret = fat_file_write(mt_entry, fat_fd,
5a95e: 206b 008c moveal %a3@(140),%a0 5a962: d1cc addal %a4,%a0 5a964: 2f08 movel %a0,%sp@- 5a966: 226e ffe8 moveal %fp@(-24),%a1 5a96a: 2f00 movel %d0,%sp@- 5a96c: 4871 c800 pea %a1@(00000000,%a4:l) 5a970: 2f2e 000c movel %fp@(12),%sp@- 5a974: 2f2e 0008 movel %fp@(8),%sp@- 5a978: 4eb9 0005 3332 jsr 53332 <fat_file_write>
(empty_space_offset * bts2rd) + empty_space_entry,
length, fs_info->cl_buf + empty_space_entry);
if (ret == -1)
5a97e: 4fef 0014 lea %sp@(20),%sp 5a982: 72ff moveq #-1,%d1 5a984: b280 cmpl %d0,%d1 5a986: 6700 0384 beqw 5ad0c <msdos_find_name_in_fat_file+0x964>
return ret;
else if (ret != length)
5a98a: ba80 cmpl %d0,%d5 5a98c: 6600 009a bnew 5aa28 <msdos_find_name_in_fat_file+0x680>
rtems_set_errno_and_return_minus_one(EIO);
empty_space_offset++;
5a990: 5287 addql #1,%d7 5a992: d9ae ffe8 addl %d4,%fp@(-24)
#endif
/*
* The one more is the short entry.
*/
while (lfn_entry < (lfn_entries + 1))
5a996: b6ae ffd4 cmpl %fp@(-44),%d3 5a99a: 6e00 032a bgtw 5acc6 <msdos_find_name_in_fat_file+0x91e>
return ret;
else if (ret != length)
rtems_set_errno_and_return_minus_one(EIO);
empty_space_offset++;
empty_space_entry = 0;
5a99e: 99cc subal %a4,%a4 <== NOT EXECUTED
{
uint32_t new_length;
#if MSDOS_FIND_PRINT
printf ("MSFS:[9.1] eso:%li\n", empty_space_offset);
#endif
ret = fat_file_read(mt_entry, fat_fd,
5a9a0: 2f2b 008c movel %a3@(140),%sp@- <== NOT EXECUTED 5a9a4: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5a9a6: 2f2e ffe8 movel %fp@(-24),%sp@- <== NOT EXECUTED 5a9aa: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 5a9ae: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 5a9b2: 4eb9 0005 2c74 jsr 52c74 <fat_file_read> <== NOT EXECUTED
(empty_space_offset * bts2rd), bts2rd,
fs_info->cl_buf);
if (ret != bts2rd)
5a9b8: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 5a9bc: b880 cmpl %d0,%d4 <== NOT EXECUTED 5a9be: 6700 00d0 beqw 5aa90 <msdos_find_name_in_fat_file+0x6e8><== NOT EXECUTED
{
if (ret != FAT_EOF)
5a9c2: 4a80 tstl %d0 <== NOT EXECUTED 5a9c4: 6662 bnes 5aa28 <msdos_find_name_in_fat_file+0x680><== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
#if MSDOS_FIND_PRINT
printf ("MSFS:[9.2] extending file:%li\n", empty_space_offset);
#endif
ret = fat_file_extend (mt_entry, fat_fd, empty_space_offset * bts2rd,
5a9c6: 486e fffc pea %fp@(-4) <== NOT EXECUTED 5a9ca: 2f2e ffe8 movel %fp@(-24),%sp@- <== NOT EXECUTED 5a9ce: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 5a9d2: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 5a9d6: 4eb9 0005 3162 jsr 53162 <fat_file_extend> <== NOT EXECUTED
&new_length);
if (ret != RC_OK)
5a9dc: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5a9e0: 4a80 tstl %d0 <== NOT EXECUTED 5a9e2: 6600 fe58 bnew 5a83c <msdos_find_name_in_fat_file+0x494><== NOT EXECUTED
return ret;
#if MSDOS_FIND_PRINT
printf ("MSFS:[9.3] extended: %d <-> %d\n", new_length, empty_space_offset * bts2rd);
#endif
if (new_length != (empty_space_offset * bts2rd))
5a9e6: 226e ffe8 moveal %fp@(-24),%a1 <== NOT EXECUTED 5a9ea: b3ee fffc cmpal %fp@(-4),%a1 <== NOT EXECUTED 5a9ee: 6600 032c bnew 5ad1c <msdos_find_name_in_fat_file+0x974><== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
memset(fs_info->cl_buf, 0, bts2rd);
5a9f2: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5a9f4: 42a7 clrl %sp@- <== NOT EXECUTED 5a9f6: 2f2b 008c movel %a3@(140),%sp@- <== NOT EXECUTED 5a9fa: 4eb9 0005 e310 jsr 5e310 <memset> <== NOT EXECUTED
ret = fat_file_write(mt_entry, fat_fd,
5aa00: 2f2b 008c movel %a3@(140),%sp@- <== NOT EXECUTED 5aa04: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5aa06: 2f2e ffe8 movel %fp@(-24),%sp@- <== NOT EXECUTED 5aa0a: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 5aa0e: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 5aa12: 4eb9 0005 3332 jsr 53332 <fat_file_write> <== NOT EXECUTED
empty_space_offset * bts2rd,
bts2rd, fs_info->cl_buf);
#if MSDOS_FIND_PRINT
printf ("MSFS:[9.4] clear write: %d\n", ret);
#endif
if (ret == -1)
5aa18: 4fef 0020 lea %sp@(32),%sp <== NOT EXECUTED 5aa1c: 72ff moveq #-1,%d1 <== NOT EXECUTED 5aa1e: b280 cmpl %d0,%d1 <== NOT EXECUTED 5aa20: 6700 02ea beqw 5ad0c <msdos_find_name_in_fat_file+0x964><== NOT EXECUTED
return ret;
else if (ret != bts2rd)
5aa24: b880 cmpl %d0,%d4 <== NOT EXECUTED 5aa26: 6768 beqs 5aa90 <msdos_find_name_in_fat_file+0x6e8><== NOT EXECUTED
(empty_space_offset * bts2rd) + empty_space_entry,
length, fs_info->cl_buf + empty_space_entry);
if (ret == -1)
return ret;
else if (ret != length)
rtems_set_errno_and_return_minus_one(EIO);
5aa28: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 5aa2e: 3a7c ffff moveaw #-1,%a5 <== NOT EXECUTED 5aa32: 2040 moveal %d0,%a0 <== NOT EXECUTED 5aa34: 7005 moveq #5,%d0 <== NOT EXECUTED 5aa36: 2080 movel %d0,%a0@ <== NOT EXECUTED
empty_space_entry = 0;
read_cluster = true;
}
return 0;
}
5aa38: 200d movel %a5,%d0 <== NOT EXECUTED 5aa3a: 4cee 3cfc ffa8 moveml %fp@(-88),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5aa40: 4e5e unlk %fp <== NOT EXECUTED 5aa42: 4e75 rts <== NOT EXECUTED
/*
* If we are not to create the entry return a not found error.
*/
if (!create_node)
return MSDOS_NAME_NOT_FOUND_ERR;
5aa44: 3a7c 7d01 moveaw #32001,%a5 <== NOT EXECUTED
}
/*
* If we are not to create the entry return a not found error.
*/
if (!create_node)
5aa48: 4a05 tstb %d5 <== NOT EXECUTED 5aa4a: 6600 fd1a bnew 5a766 <msdos_find_name_in_fat_file+0x3be><== NOT EXECUTED
empty_space_entry = 0;
read_cluster = true;
}
return 0;
}
5aa4e: 200d movel %a5,%d0 <== NOT EXECUTED 5aa50: 4cee 3cfc ffa8 moveml %fp@(-88),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5aa56: 4e5e unlk %fp <== NOT EXECUTED 5aa58: 4e75 rts <== NOT EXECUTED
* If a long file name calculate the checksum of the short file name
* data to place in each long file name entry. First set the short
* file name to the slot of the SFN entry. This will mean no clashes
* in this directory.
*/
lfn_checksum = 0;
5aa5a: 4205 clrb %d5 5aa5c: 1d45 ffef moveb %d5,%fp@(-17)
* empty_space_count is a count of empty entries in the currently
* read cluster so if 0 there is no space. Note, dir_offset will
* be at the next cluster so we can just make empty_space_offset
* that value.
*/
if (empty_space_count == 0)
5aa60: 4a83 tstl %d3 5aa62: 6700 0258 beqw 5acbc <msdos_find_name_in_fat_file+0x914>
uint32_t empty_space_offset = 0;
uint32_t empty_space_entry = 0;
uint32_t empty_space_count = 0;
bool empty_space_found = false;
uint32_t entries_per_block;
bool read_cluster = false;
5aa66: bc87 cmpl %d7,%d6 5aa68: 56c0 sne %d0 5aa6a: 4480 negl %d0
read_cluster = true;
/*
* Handle the entry writes.
*/
lfn_start.cln = lfn_start.ofs = FAT_FILE_SHORT_NAME;
5aa6c: 72ff moveq #-1,%d1 5aa6e: 2d41 fff8 movel %d1,%fp@(-8) 5aa72: 2d41 fff4 movel %d1,%fp@(-12)
#endif
/*
* The one more is the short entry.
*/
while (lfn_entry < (lfn_entries + 1))
5aa76: 4aae ffd4 tstl %fp@(-44) 5aa7a: 6d00 024a bltw 5acc6 <msdos_find_name_in_fat_file+0x91e> 5aa7e: 2407 movel %d7,%d2 5aa80: 4c04 2800 mulsl %d4,%d2
/*
* Handle the entry writes.
*/
lfn_start.cln = lfn_start.ofs = FAT_FILE_SHORT_NAME;
lfn_entry = 0;
5aa84: 4283 clrl %d3
#endif
/*
* The one more is the short entry.
*/
while (lfn_entry < (lfn_entries + 1))
5aa86: 2d42 ffe8 movel %d2,%fp@(-24)
{
int length = 0;
if (read_cluster)
5aa8a: 4a00 tstb %d0 5aa8c: 6600 ff12 bnew 5a9a0 <msdos_find_name_in_fat_file+0x5f8>
#if MSDOS_FIND_PRINT
printf ("MSFS:[10] eso:%li\n", empty_space_offset);
#endif
for (dir_entry = empty_space_entry;
5aa90: b9c4 cmpal %d4,%a4 5aa92: 6400 0220 bccw 5acb4 <msdos_find_name_in_fat_file+0x90c>
length, lfn_entry);
#endif
/*
* Time to write the short file name entry.
*/
if (lfn_entry == (lfn_entries + 1))
5aa96: 2a2e ffd4 movel %fp@(-44),%d5 5aa9a: 5285 addql #1,%d5
const char* n;
int i;
char fill = 0;
length += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
lfn_entry++;
5aa9c: 2403 movel %d3,%d2 5aa9e: 5282 addql #1,%d2
for (dir_entry = empty_space_entry;
dir_entry < bts2rd;
dir_entry += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
char* entry = (char*) fs_info->cl_buf + dir_entry;
5aaa0: 246b 008c moveal %a3@(140),%a2 5aaa4: d5cc addal %a4,%a2
length, lfn_entry);
#endif
/*
* Time to write the short file name entry.
*/
if (lfn_entry == (lfn_entries + 1))
5aaa6: 2d45 fff0 movel %d5,%fp@(-16) 5aaaa: b485 cmpl %d5,%d2 5aaac: 6700 01fe beqw 5acac <msdos_find_name_in_fat_file+0x904>
* RC_OK on success, or error code if error occured (errno set * appropriately) * */ #define MSDOS_FIND_PRINT 0 int msdos_find_name_in_fat_file(
5aab0: 2003 movel %d3,%d0 5aab2: 4680 notl %d0 5aab4: d0ae ffd4 addl %fp@(-44),%d0 5aab8: 720d moveq #13,%d1 5aaba: 4c01 0800 mulsl %d1,%d0 5aabe: 260c movel %a4,%d3
char* p;
const char* n;
int i;
char fill = 0;
length += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
5aac0: 7a20 moveq #32,%d5
dir_pos->lname.ofs = lfn_start.ofs;
/* write new node entry */
memcpy (entry, (uint8_t *) name_dir_entry,
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
break;
5aac2: 122e fff3 moveb %fp@(-13),%d1
* RC_OK on success, or error code if error occured (errno set * appropriately) * */ #define MSDOS_FIND_PRINT 0 int msdos_find_name_in_fat_file(
5aac6: 2d4c ffe0 movel %a4,%fp@(-32) 5aaca: 2a6e 0014 moveal %fp@(20),%a5 5aace: dbc0 addal %d0,%a5 5aad0: 3841 moveaw %d1,%a4 5aad2: 2d47 ffe4 movel %d7,%fp@(-28) 5aad6: 2e05 movel %d5,%d7
* This is a long file name and we need to write
* a long file name entry. See if this is the
* first entry written and if so remember the
* the location of the long file name.
*/
if (lfn_start.cln == FAT_FILE_SHORT_NAME)
5aad8: 7aff moveq #-1,%d5 5aada: baae fff4 cmpl %fp@(-12),%d5 5aade: 6700 0084 beqw 5ab64 <msdos_find_name_in_fat_file+0x7bc>
}
/*
* Clear the entry before loading the data.
*/
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
5aae2: 204a moveal %a2,%a0
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
p = entry + 1;
5aae4: 2a0a movel %a2,%d5 5aae6: 5285 addql #1,%d5
n = name + (lfn_entries - lfn_entry) * MSDOS_LFN_LEN_PER_ENTRY;
5aae8: 224d moveal %a5,%a1 5aaea: 7001 moveq #1,%d0
}
/*
* Clear the entry before loading the data.
*/
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
5aaec: 4298 clrl %a0@+ 5aaee: 5888 addql #4,%a0 5aaf0: 5988 subql #4,%a0 5aaf2: 4298 clrl %a0@+ 5aaf4: 5888 addql #4,%a0 5aaf6: 5988 subql #4,%a0 5aaf8: 4298 clrl %a0@+ 5aafa: 5888 addql #4,%a0 5aafc: 5988 subql #4,%a0 5aafe: 4298 clrl %a0@+ 5ab00: 5888 addql #4,%a0 5ab02: 5988 subql #4,%a0 5ab04: 4298 clrl %a0@+ 5ab06: 5888 addql #4,%a0 5ab08: 5988 subql #4,%a0 5ab0a: 4298 clrl %a0@+ 5ab0c: 5888 addql #4,%a0 5ab0e: 5988 subql #4,%a0 5ab10: 4298 clrl %a0@+
{
char* entry = (char*) fs_info->cl_buf + dir_entry;
char* p;
const char* n;
int i;
char fill = 0;
5ab12: 4206 clrb %d6
}
/*
* Clear the entry before loading the data.
*/
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
5ab14: 4290 clrl %a0@ 5ab16: 2045 moveal %d5,%a0
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
5ab18: 122e ffef moveb %fp@(-17),%d1 5ab1c: 1541 000d moveb %d1,%a2@(13)
* RC_OK on success, or error code if error occured (errno set * appropriately) * */ #define MSDOS_FIND_PRINT 0 int msdos_find_name_in_fat_file(
5ab20: 2200 movel %d0,%d1 5ab22: 5381 subql #1,%d1
p = entry + 1;
n = name + (lfn_entries - lfn_entry) * MSDOS_LFN_LEN_PER_ENTRY;
for (i = 0; i < MSDOS_LFN_LEN_PER_ENTRY; i++)
{
if (*n != 0)
5ab24: 1a11 moveb %a1@,%d5
5ab26: 6728 beqs 5ab50 <msdos_find_name_in_fat_file+0x7a8><== NEVER TAKEN
{
*p = *n;
n++;
5ab28: 5289 addql #1,%a1
for (i = 0; i < MSDOS_LFN_LEN_PER_ENTRY; i++)
{
if (*n != 0)
{
*p = *n;
5ab2a: 1085 moveb %d5,%a0@
p [0] = fill;
p [1] = fill;
fill = 0xff;
}
switch (i)
5ab2c: 7a04 moveq #4,%d5 5ab2e: ba81 cmpl %d1,%d5
5ab30: 672c beqs 5ab5e <msdos_find_name_in_fat_file+0x7b6>
5ab32: 1a3c 000a moveb #10,%d5 5ab36: ba81 cmpl %d1,%d5 5ab38: 6700 00fc beqw 5ac36 <msdos_find_name_in_fat_file+0x88e>
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
p = entry + 1;
n = name + (lfn_entries - lfn_entry) * MSDOS_LFN_LEN_PER_ENTRY;
for (i = 0; i < MSDOS_LFN_LEN_PER_ENTRY; i++)
5ab3c: 720d moveq #13,%d1 5ab3e: b280 cmpl %d0,%d1 5ab40: 6700 fd46 beqw 5a888 <msdos_find_name_in_fat_file+0x4e0>
break;
case 10:
p += 4;
break;
default:
p += 2;
5ab44: 5488 addql #2,%a0
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
p = entry + 1;
n = name + (lfn_entries - lfn_entry) * MSDOS_LFN_LEN_PER_ENTRY;
5ab46: 5280 addql #1,%d0
* RC_OK on success, or error code if error occured (errno set * appropriately) * */ #define MSDOS_FIND_PRINT 0 int msdos_find_name_in_fat_file(
5ab48: 2200 movel %d0,%d1 5ab4a: 5381 subql #1,%d1
p = entry + 1;
n = name + (lfn_entries - lfn_entry) * MSDOS_LFN_LEN_PER_ENTRY;
for (i = 0; i < MSDOS_LFN_LEN_PER_ENTRY; i++)
{
if (*n != 0)
5ab4c: 1a11 moveb %a1@,%d5
5ab4e: 66d8 bnes 5ab28 <msdos_find_name_in_fat_file+0x780>
p [0] = fill;
p [1] = fill;
fill = 0xff;
}
switch (i)
5ab50: 7a04 moveq #4,%d5
*p = *n;
n++;
}
else
{
p [0] = fill;
5ab52: 1086 moveb %d6,%a0@
p [1] = fill;
5ab54: 1146 0001 moveb %d6,%a0@(1)
fill = 0xff;
5ab58: 50c6 st %d6
}
switch (i)
5ab5a: ba81 cmpl %d1,%d5
5ab5c: 66d4 bnes 5ab32 <msdos_find_name_in_fat_file+0x78a>
{
case 4:
p += 5;
5ab5e: 5a88 addql #5,%a0
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
p = entry + 1;
n = name + (lfn_entries - lfn_entry) * MSDOS_LFN_LEN_PER_ENTRY;
5ab60: 5280 addql #1,%d0 5ab62: 60e4 bras 5ab48 <msdos_find_name_in_fat_file+0x7a0>
* first entry written and if so remember the
* the location of the long file name.
*/
if (lfn_start.cln == FAT_FILE_SHORT_NAME)
{
lfn_start.cln = empty_space_offset;
5ab64: 202e ffe4 movel %fp@(-28),%d0
}
/*
* Clear the entry before loading the data.
*/
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
5ab68: 204a moveal %a2,%a0
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
p = entry + 1;
5ab6a: 2a0a movel %a2,%d5 5ab6c: 5285 addql #1,%d5
n = name + (lfn_entries - lfn_entry) * MSDOS_LFN_LEN_PER_ENTRY;
5ab6e: 224d moveal %a5,%a1
* first entry written and if so remember the
* the location of the long file name.
*/
if (lfn_start.cln == FAT_FILE_SHORT_NAME)
{
lfn_start.cln = empty_space_offset;
5ab70: 2d40 fff4 movel %d0,%fp@(-12)
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
p = entry + 1;
n = name + (lfn_entries - lfn_entry) * MSDOS_LFN_LEN_PER_ENTRY;
5ab74: 7001 moveq #1,%d0
* the location of the long file name.
*/
if (lfn_start.cln == FAT_FILE_SHORT_NAME)
{
lfn_start.cln = empty_space_offset;
lfn_start.ofs = dir_entry;
5ab76: 2d43 fff8 movel %d3,%fp@(-8)
{
char* entry = (char*) fs_info->cl_buf + dir_entry;
char* p;
const char* n;
int i;
char fill = 0;
5ab7a: 4206 clrb %d6
}
/*
* Clear the entry before loading the data.
*/
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
5ab7c: 4298 clrl %a0@+ 5ab7e: 5888 addql #4,%a0 5ab80: 5988 subql #4,%a0 5ab82: 4298 clrl %a0@+ 5ab84: 5888 addql #4,%a0 5ab86: 5988 subql #4,%a0 5ab88: 4298 clrl %a0@+ 5ab8a: 5888 addql #4,%a0 5ab8c: 5988 subql #4,%a0 5ab8e: 4298 clrl %a0@+ 5ab90: 5888 addql #4,%a0 5ab92: 5988 subql #4,%a0 5ab94: 4298 clrl %a0@+ 5ab96: 5888 addql #4,%a0 5ab98: 5988 subql #4,%a0 5ab9a: 4298 clrl %a0@+ 5ab9c: 5888 addql #4,%a0 5ab9e: 5988 subql #4,%a0 5aba0: 4298 clrl %a0@+ 5aba2: 4290 clrl %a0@ 5aba4: 2045 moveal %d5,%a0
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
5aba6: 122e ffef moveb %fp@(-17),%d1 5abaa: 1541 000d moveb %d1,%a2@(13) 5abae: 6000 ff70 braw 5ab20 <msdos_find_name_in_fat_file+0x778>
* in this directory.
*/
lfn_checksum = 0;
if (name_type == MSDOS_NAME_LONG)
{
int slot = (((empty_space_offset * bts2rd) + empty_space_entry) /
5abb2: 2007 movel %d7,%d0 5abb4: 4c04 0800 mulsl %d4,%d0
{
static const char* hex = "0123456789ABCDEF";
char* c = MSDOS_DIR_NAME(sfn);
int i;
for (i = 0; i < 2; i++, c++)
if ((*c == ' ') || (*c == '.'))
5abb8: 206e 0024 moveal %fp@(36),%a0
* in this directory.
*/
lfn_checksum = 0;
if (name_type == MSDOS_NAME_LONG)
{
int slot = (((empty_space_offset * bts2rd) + empty_space_entry) /
5abbc: d08c addl %a4,%d0 5abbe: ea88 lsrl #5,%d0
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE) + lfn_entries + 1;
5abc0: 226e ffd4 moveal %fp@(-44),%a1
{
static const char* hex = "0123456789ABCDEF";
char* c = MSDOS_DIR_NAME(sfn);
int i;
for (i = 0; i < 2; i++, c++)
if ((*c == ' ') || (*c == '.'))
5abc4: 1210 moveb %a0@,%d1
*/
lfn_checksum = 0;
if (name_type == MSDOS_NAME_LONG)
{
int slot = (((empty_space_offset * bts2rd) + empty_space_entry) /
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE) + lfn_entries + 1;
5abc6: 43f1 0801 lea %a1@(00000001,%d0:l),%a1
{
static const char* hex = "0123456789ABCDEF";
char* c = MSDOS_DIR_NAME(sfn);
int i;
for (i = 0; i < 2; i++, c++)
if ((*c == ' ') || (*c == '.'))
5abca: 7020 moveq #32,%d0 5abcc: 49c1 extbl %d1
*/
lfn_checksum = 0;
if (name_type == MSDOS_NAME_LONG)
{
int slot = (((empty_space_offset * bts2rd) + empty_space_entry) /
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE) + lfn_entries + 1;
5abce: 2409 movel %a1,%d2
{
static const char* hex = "0123456789ABCDEF";
char* c = MSDOS_DIR_NAME(sfn);
int i;
for (i = 0; i < 2; i++, c++)
if ((*c == ' ') || (*c == '.'))
5abd0: b081 cmpl %d1,%d0 5abd2: 6700 00b0 beqw 5ac84 <msdos_find_name_in_fat_file+0x8dc> 5abd6: 702e moveq #46,%d0 5abd8: b081 cmpl %d1,%d0 5abda: 6700 00a8 beqw 5ac84 <msdos_find_name_in_fat_file+0x8dc> 5abde: 206e 0024 moveal %fp@(36),%a0 5abe2: 7220 moveq #32,%d1 5abe4: 1028 0001 moveb %a0@(1),%d0 5abe8: 49c0 extbl %d0 5abea: b280 cmpl %d0,%d1 5abec: 6700 00a2 beqw 5ac90 <msdos_find_name_in_fat_file+0x8e8> 5abf0: 722e moveq #46,%d1 5abf2: b280 cmpl %d0,%d1 5abf4: 6700 009a beqw 5ac90 <msdos_find_name_in_fat_file+0x8e8>
msdos_short_name_hex(char* sfn, int num)
{
static const char* hex = "0123456789ABCDEF";
char* c = MSDOS_DIR_NAME(sfn);
int i;
for (i = 0; i < 2; i++, c++)
5abf8: 206e 0024 moveal %fp@(36),%a0 5abfc: 700c moveq #12,%d0 5abfe: 5488 addql #2,%a0 5ac00: 43f9 0006 d5c2 lea 6d5c2 <rtems_filesystem_default_pathconf+0xac>,%a1
if ((*c == ' ') || (*c == '.'))
*c = '_';
for (i = 0; i < 4; i++, c++)
*c = hex[(num >> ((3 - i) * 4)) & 0xf];
5ac06: 2202 movel %d2,%d1 5ac08: e0a1 asrl %d0,%d1 5ac0a: 7a0f moveq #15,%d5
char* c = MSDOS_DIR_NAME(sfn);
int i;
for (i = 0; i < 2; i++, c++)
if ((*c == ' ') || (*c == '.'))
*c = '_';
for (i = 0; i < 4; i++, c++)
5ac0c: 5980 subql #4,%d0
*c = hex[(num >> ((3 - i) * 4)) & 0xf];
5ac0e: c285 andl %d5,%d1 5ac10: 10f1 1800 moveb %a1@(00000000,%d1:l),%a0@+
char* c = MSDOS_DIR_NAME(sfn);
int i;
for (i = 0; i < 2; i++, c++)
if ((*c == ' ') || (*c == '.'))
*c = '_';
for (i = 0; i < 4; i++, c++)
5ac14: 72fc moveq #-4,%d1 5ac16: b280 cmpl %d0,%d1
5ac18: 66ec bnes 5ac06 <msdos_find_name_in_fat_file+0x85e>
*c = hex[(num >> ((3 - i) * 4)) & 0xf];
*c++ = '~';
5ac1a: 206e 0024 moveal %fp@(36),%a0 5ac1e: 747e moveq #126,%d2
*c++ = '1';
5ac20: 7031 moveq #49,%d0
for (i = 0; i < 2; i++, c++)
if ((*c == ' ') || (*c == '.'))
*c = '_';
for (i = 0; i < 4; i++, c++)
*c = hex[(num >> ((3 - i) * 4)) & 0xf];
*c++ = '~';
5ac22: 1142 0006 moveb %d2,%a0@(6)
*c++ = '1';
5ac26: 1140 0007 moveb %d0,%a0@(7)
int slot = (((empty_space_offset * bts2rd) + empty_space_entry) /
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE) + lfn_entries + 1;
msdos_short_name_hex(MSDOS_DIR_NAME(name_dir_entry), slot);
}
if (lfn_entries)
5ac2a: 4aae ffd4 tstl %fp@(-44) 5ac2e: 6700 fe2a beqw 5aa5a <msdos_find_name_in_fat_file+0x6b2> 5ac32: 6000 fb44 braw 5a778 <msdos_find_name_in_fat_file+0x3d0>
{
case 4:
p += 5;
break;
case 10:
p += 4;
5ac36: 5888 addql #4,%a0
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
p = entry + 1;
n = name + (lfn_entries - lfn_entry) * MSDOS_LFN_LEN_PER_ENTRY;
5ac38: 5280 addql #1,%d0 5ac3a: 6000 ff0c braw 5ab48 <msdos_find_name_in_fat_file+0x7a0>
5ac3e: 2a07 movel %d7,%d5 <== NOT EXECUTED
#if MSDOS_FIND_PRINT
printf ("MSFS:[10] eso:%li\n", empty_space_offset);
#endif
for (dir_entry = empty_space_entry;
5ac40: 2005 movel %d5,%d0 <== NOT EXECUTED 5ac42: 2602 movel %d2,%d3 <== NOT EXECUTED 5ac44: 2e2e ffe4 movel %fp@(-28),%d7 <== NOT EXECUTED 5ac48: 286e ffe0 moveal %fp@(-32),%a4 <== NOT EXECUTED 5ac4c: 6000 fd10 braw 5a95e <msdos_find_name_in_fat_file+0x5b6><== NOT EXECUTED
if (lfn_entries)
{
uint8_t* p = (uint8_t*) MSDOS_DIR_NAME(name_dir_entry);
int i;
for (i = 0; i < 11; i++, p++)
lfn_checksum =
5ac50: 4201 clrb %d1 5ac52: 6000 fb34 braw 5a788 <msdos_find_name_in_fat_file+0x3e0>
if (rc != RC_OK)
return rc;
}
dir_pos->lname.cln = lfn_start.cln;
dir_pos->lname.ofs = lfn_start.ofs;
5ac56: 226e 0020 moveal %fp@(32),%a1 5ac5a: 4bee fff8 lea %fp@(-8),%a5
if (rc != RC_OK)
return rc;
dir_pos->sname.ofs = dir_entry;
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
5ac5e: 72ff moveq #-1,%d1
dir_pos->lname.cln = lfn_start.cln;
dir_pos->lname.ofs = lfn_start.ofs;
/* write new node entry */
memcpy (entry, (uint8_t *) name_dir_entry,
5ac60: 2005 movel %d5,%d0
const char* n;
int i;
char fill = 0;
length += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
lfn_entry++;
5ac62: 2602 movel %d2,%d3
dir_pos->lname.cln = lfn_start.cln;
dir_pos->lname.ofs = lfn_start.ofs;
/* write new node entry */
memcpy (entry, (uint8_t *) name_dir_entry,
5ac64: 206e 0024 moveal %fp@(36),%a0
if (rc != RC_OK)
return rc;
}
dir_pos->lname.cln = lfn_start.cln;
dir_pos->lname.ofs = lfn_start.ofs;
5ac68: 2355 000c movel %a5@,%a1@(12)
&lfn_start.cln);
if (rc != RC_OK)
return rc;
}
dir_pos->lname.cln = lfn_start.cln;
5ac6c: 2341 0008 movel %d1,%a1@(8)
dir_pos->lname.ofs = lfn_start.ofs;
/* write new node entry */
memcpy (entry, (uint8_t *) name_dir_entry,
5ac70: 24d8 movel %a0@+,%a2@+ 5ac72: 24d8 movel %a0@+,%a2@+ 5ac74: 24d8 movel %a0@+,%a2@+ 5ac76: 24d8 movel %a0@+,%a2@+ 5ac78: 24d8 movel %a0@+,%a2@+ 5ac7a: 24d8 movel %a0@+,%a2@+ 5ac7c: 24d8 movel %a0@+,%a2@+ 5ac7e: 2490 movel %a0@,%a2@ 5ac80: 6000 fcdc braw 5a95e <msdos_find_name_in_fat_file+0x5b6>
static const char* hex = "0123456789ABCDEF";
char* c = MSDOS_DIR_NAME(sfn);
int i;
for (i = 0; i < 2; i++, c++)
if ((*c == ' ') || (*c == '.'))
*c = '_';
5ac84: 206e 0024 moveal %fp@(36),%a0 <== NOT EXECUTED 5ac88: 10bc 005f moveb #95,%a0@ <== NOT EXECUTED 5ac8c: 6000 ff50 braw 5abde <msdos_find_name_in_fat_file+0x836><== NOT EXECUTED 5ac90: 206e 0024 moveal %fp@(36),%a0 <== NOT EXECUTED
msdos_short_name_hex(char* sfn, int num)
{
static const char* hex = "0123456789ABCDEF";
char* c = MSDOS_DIR_NAME(sfn);
int i;
for (i = 0; i < 2; i++, c++)
5ac94: 700c moveq #12,%d0 <== NOT EXECUTED 5ac96: 43f9 0006 d5c2 lea 6d5c2 <rtems_filesystem_default_pathconf+0xac>,%a1<== NOT EXECUTED
if ((*c == ' ') || (*c == '.'))
*c = '_';
5ac9c: 7a5f moveq #95,%d5 <== NOT EXECUTED 5ac9e: 1145 0001 moveb %d5,%a0@(1) <== NOT EXECUTED
msdos_short_name_hex(char* sfn, int num)
{
static const char* hex = "0123456789ABCDEF";
char* c = MSDOS_DIR_NAME(sfn);
int i;
for (i = 0; i < 2; i++, c++)
5aca2: 206e 0024 moveal %fp@(36),%a0 <== NOT EXECUTED 5aca6: 5488 addql #2,%a0 <== NOT EXECUTED 5aca8: 6000 ff5c braw 5ac06 <msdos_find_name_in_fat_file+0x85e><== NOT EXECUTED
length, lfn_entry);
#endif
/*
* Time to write the short file name entry.
*/
if (lfn_entry == (lfn_entries + 1))
5acac: 260c movel %a4,%d3
char* p;
const char* n;
int i;
char fill = 0;
length += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
5acae: 7a20 moveq #32,%d5 5acb0: 6000 fc24 braw 5a8d6 <msdos_find_name_in_fat_file+0x52e>
#if MSDOS_FIND_PRINT
printf ("MSFS:[10] eso:%li\n", empty_space_offset);
#endif
for (dir_entry = empty_space_entry;
5acb4: 4280 clrl %d0 <== NOT EXECUTED 5acb6: 4285 clrl %d5 <== NOT EXECUTED 5acb8: 6000 fca4 braw 5a95e <msdos_find_name_in_fat_file+0x5b6><== NOT EXECUTED
* empty_space_count is a count of empty entries in the currently
* read cluster so if 0 there is no space. Note, dir_offset will
* be at the next cluster so we can just make empty_space_offset
* that value.
*/
if (empty_space_count == 0)
5acbc: 2e06 movel %d6,%d7 <== NOT EXECUTED
{
read_cluster = true;
empty_space_offset = dir_offset;
empty_space_entry = 0;
5acbe: 99cc subal %a4,%a4 <== NOT EXECUTED
* be at the next cluster so we can just make empty_space_offset
* that value.
*/
if (empty_space_count == 0)
{
read_cluster = true;
5acc0: 7001 moveq #1,%d0 <== NOT EXECUTED 5acc2: 6000 fda8 braw 5aa6c <msdos_find_name_in_fat_file+0x6c4><== NOT EXECUTED
empty_space_offset++;
empty_space_entry = 0;
read_cluster = true;
}
return 0;
5acc6: 9bcd subal %a5,%a5
}
5acc8: 200d movel %a5,%d0 5acca: 4cee 3cfc ffa8 moveml %fp@(-88),%d2-%d7/%a2-%a5 5acd0: 4e5e unlk %fp 5acd2: 4e75 rts
uint32_t empty_space_count = 0;
bool empty_space_found = false;
uint32_t entries_per_block;
bool read_cluster = false;
assert(name_len > 0);
5acd4: 4879 0006 ddb9 pea 6ddb9 <msdos_file_handlers+0xcf> <== NOT EXECUTED 5acda: 4879 0006 ddef pea 6ddef <__FUNCTION__.7135> <== NOT EXECUTED 5ace0: 4878 0419 pea 419 <DBL_MAX_EXP+0x18> <== NOT EXECUTED 5ace4: 4879 0006 dd57 pea 6dd57 <msdos_file_handlers+0x6d> <== NOT EXECUTED 5acea: 4eb9 0005 5c24 jsr 55c24 <__assert_func> <== NOT EXECUTED
#endif
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
rtems_set_errno_and_return_minus_one(EIO);
assert(ret == bts2rd);
5acf0: 4879 0006 ddc6 pea 6ddc6 <msdos_file_handlers+0xdc> <== NOT EXECUTED 5acf6: 4879 0006 ddef pea 6ddef <__FUNCTION__.7135> <== NOT EXECUTED 5acfc: 4878 0449 pea 449 <DBL_MAX_EXP+0x48> <== NOT EXECUTED 5ad00: 4879 0006 dd57 pea 6dd57 <msdos_file_handlers+0x6d> <== NOT EXECUTED 5ad06: 4eb9 0005 5c24 jsr 55c24 <__assert_func> <== NOT EXECUTED
}
ret = fat_file_write(mt_entry, fat_fd,
(empty_space_offset * bts2rd) + empty_space_entry,
length, fs_info->cl_buf + empty_space_entry);
if (ret == -1)
5ad0c: 3a7c ffff moveaw #-1,%a5 <== NOT EXECUTED
empty_space_entry = 0;
read_cluster = true;
}
return 0;
}
5ad10: 200d movel %a5,%d0 <== NOT EXECUTED 5ad12: 4cee 3cfc ffa8 moveml %fp@(-88),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5ad18: 4e5e unlk %fp <== NOT EXECUTED 5ad1a: 4e75 rts <== NOT EXECUTED
#if MSDOS_FIND_PRINT
printf ("MSFS:[9.3] extended: %d <-> %d\n", new_length, empty_space_offset * bts2rd);
#endif
if (new_length != (empty_space_offset * bts2rd))
rtems_set_errno_and_return_minus_one(EIO);
5ad1c: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 5ad22: 3a7c ffff moveaw #-1,%a5 <== NOT EXECUTED 5ad26: 2640 moveal %d0,%a3 <== NOT EXECUTED 5ad28: 7205 moveq #5,%d1 <== NOT EXECUTED
empty_space_entry = 0;
read_cluster = true;
}
return 0;
}
5ad2a: 200d movel %a5,%d0 <== NOT EXECUTED
#if MSDOS_FIND_PRINT
printf ("MSFS:[9.3] extended: %d <-> %d\n", new_length, empty_space_offset * bts2rd);
#endif
if (new_length != (empty_space_offset * bts2rd))
rtems_set_errno_and_return_minus_one(EIO);
5ad2c: 2681 movel %d1,%a3@ <== NOT EXECUTED
empty_space_entry = 0;
read_cluster = true;
}
return 0;
}
5ad2e: 4cee 3cfc ffa8 moveml %fp@(-88),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5ad34: 4e5e unlk %fp <== NOT EXECUTED
0005ad38 <msdos_find_node_by_cluster_num_in_fat_file>:
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t bts2rd = 0;
uint32_t i = 0, j = 0;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
5ad38: 7001 moveq #1,%d0 <== NOT EXECUTED
fat_file_fd_t *fat_fd,
uint32_t cl4find,
fat_dir_pos_t *dir_pos,
char *dir_entry
)
{
5ad3a: 4e56 ffd8 linkw %fp,#-40 <== NOT EXECUTED 5ad3e: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED 5ad42: 2a6e 0008 moveal %fp@(8),%a5 <== NOT EXECUTED 5ad46: 286e 000c moveal %fp@(12),%a4 <== NOT EXECUTED 5ad4a: 282e 0010 movel %fp@(16),%d4 <== NOT EXECUTED
int rc = RC_OK;
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
5ad4e: 266d 0034 moveal %a5@(52),%a3 <== NOT EXECUTED
uint32_t bts2rd = 0;
uint32_t i = 0, j = 0;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
5ad52: b0ac 0020 cmpl %a4@(32),%d0 <== NOT EXECUTED 5ad56: 6700 00f4 beqw 5ae4c <msdos_find_node_by_cluster_num_in_fat_file+0x114><== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
bts2rd = fat_fd->fat_file_size;
else
bts2rd = fs_info->fat.vol.bpc;
5ad5a: 4283 clrl %d3 <== NOT EXECUTED
fs_info->cl_buf)) != FAT_EOF)
{
if ( ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE )
rtems_set_errno_and_return_minus_one( EIO );
assert(ret == bts2rd);
5ad5c: 4285 clrl %d5 <== NOT EXECUTED 5ad5e: 2c3c 0005 2c74 movel #339060,%d6 <== NOT EXECUTED
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
bts2rd = fat_fd->fat_file_size;
else
bts2rd = fs_info->fat.vol.bpc;
5ad64: 362b 0006 movew %a3@(6),%d3 <== NOT EXECUTED
uint32_t bts2rd = 0;
uint32_t i = 0, j = 0;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
bts2rd = fat_fd->fat_file_size;
5ad68: 226b 008c moveal %a3@(140),%a1 <== NOT EXECUTED
else
bts2rd = fs_info->fat.vol.bpc;
while ((ret = fat_file_read(mt_entry, fat_fd, j * bts2rd, bts2rd,
5ad6c: 2f09 movel %a1,%sp@- <== NOT EXECUTED 5ad6e: 2046 moveal %d6,%a0 <== NOT EXECUTED 5ad70: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5ad72: 2f05 movel %d5,%sp@- <== NOT EXECUTED 5ad74: 2f0c movel %a4,%sp@- <== NOT EXECUTED 5ad76: 2f0d movel %a5,%sp@- <== NOT EXECUTED 5ad78: 4e90 jsr %a0@ <== NOT EXECUTED 5ad7a: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 5ad7e: 4a80 tstl %d0 <== NOT EXECUTED 5ad80: 6700 00f4 beqw 5ae76 <msdos_find_node_by_cluster_num_in_fat_file+0x13e><== NOT EXECUTED
fs_info->cl_buf)) != FAT_EOF)
{
if ( ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE )
5ad84: 721f moveq #31,%d1 <== NOT EXECUTED 5ad86: b280 cmpl %d0,%d1 <== NOT EXECUTED 5ad88: 6c00 00fa bgew 5ae84 <msdos_find_node_by_cluster_num_in_fat_file+0x14c><== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
assert(ret == bts2rd);
5ad8c: b680 cmpl %d0,%d3 <== NOT EXECUTED 5ad8e: 6600 010c bnew 5ae9c <msdos_find_node_by_cluster_num_in_fat_file+0x164><== NOT EXECUTED 5ad92: 226b 008c moveal %a3@(140),%a1 <== NOT EXECUTED 5ad96: 4282 clrl %d2 <== NOT EXECUTED 5ad98: 2449 moveal %a1,%a2 <== NOT EXECUTED 5ad9a: 2043 moveal %d3,%a0 <== NOT EXECUTED
for (i = 0; i < bts2rd; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
char* entry = (char*) fs_info->cl_buf + i;
/* if this and all rest entries are empty - return not-found */
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
5ad9c: 1012 moveb %a2@,%d0 <== NOT EXECUTED 5ad9e: 6750 beqs 5adf0 <msdos_find_node_by_cluster_num_in_fat_file+0xb8><== NOT EXECUTED
MSDOS_THIS_DIR_ENTRY_AND_REST_EMPTY)
return MSDOS_NAME_NOT_FOUND_ERR;
/* if this entry is empty - skip it */
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
5ada0: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 5ada6: 0c80 0000 00e5 cmpil #229,%d0 <== NOT EXECUTED 5adac: 672c beqs 5adda <msdos_find_node_by_cluster_num_in_fat_file+0xa2><== NOT EXECUTED
MSDOS_THIS_DIR_ENTRY_EMPTY)
continue;
/* if get a non-empty entry - compare clusters num */
if (MSDOS_EXTRACT_CLUSTER_NUM(entry) == cl4find)
5adae: 4283 clrl %d3 <== NOT EXECUTED 5adb0: 4287 clrl %d7 <== NOT EXECUTED 5adb2: 362a 0014 movew %a2@(20),%d3 <== NOT EXECUTED 5adb6: 3e2a 001a movew %a2@(26),%d7 <== NOT EXECUTED
static inline uint16_t m68k_swap_u16(
uint16_t value
)
{
return (((value & 0xff) << 8) | ((value >> 8) & 0xff));
5adba: 2003 movel %d3,%d0 <== NOT EXECUTED 5adbc: 2207 movel %d7,%d1 <== NOT EXECUTED 5adbe: e08b lsrl #8,%d3 <== NOT EXECUTED 5adc0: e08f lsrl #8,%d7 <== NOT EXECUTED 5adc2: e188 lsll #8,%d0 <== NOT EXECUTED 5adc4: e189 lsll #8,%d1 <== NOT EXECUTED 5adc6: 8083 orl %d3,%d0 <== NOT EXECUTED 5adc8: 8287 orl %d7,%d1 <== NOT EXECUTED 5adca: 4840 swap %d0 <== NOT EXECUTED 5adcc: 4240 clrw %d0 <== NOT EXECUTED 5adce: 0281 0000 ffff andil #65535,%d1 <== NOT EXECUTED 5add4: 8081 orl %d1,%d0 <== NOT EXECUTED 5add6: b880 cmpl %d0,%d4 <== NOT EXECUTED 5add8: 6726 beqs 5ae00 <msdos_find_node_by_cluster_num_in_fat_file+0xc8><== NOT EXECUTED
if ( ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE )
rtems_set_errno_and_return_minus_one( EIO );
assert(ret == bts2rd);
for (i = 0; i < bts2rd; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
5adda: 0682 0000 0020 addil #32,%d2 <== NOT EXECUTED 5ade0: 45ea 0020 lea %a2@(32),%a2 <== NOT EXECUTED 5ade4: b1c2 cmpal %d2,%a0 <== NOT EXECUTED 5ade6: 62b4 bhis 5ad9c <msdos_find_node_by_cluster_num_in_fat_file+0x64><== NOT EXECUTED 5ade8: 2608 movel %a0,%d3 <== NOT EXECUTED 5adea: da88 addl %a0,%d5 <== NOT EXECUTED 5adec: 6000 ff7e braw 5ad6c <msdos_find_node_by_cluster_num_in_fat_file+0x34><== NOT EXECUTED
char* entry = (char*) fs_info->cl_buf + i;
/* if this and all rest entries are empty - return not-found */
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
MSDOS_THIS_DIR_ENTRY_AND_REST_EMPTY)
return MSDOS_NAME_NOT_FOUND_ERR;
5adf0: 203c 0000 7d01 movel #32001,%d0 <== NOT EXECUTED
}
}
j++;
}
return MSDOS_NAME_NOT_FOUND_ERR;
}
5adf6: 4cee 3cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5adfc: 4e5e unlk %fp <== NOT EXECUTED 5adfe: 4e75 rts <== NOT EXECUTED
/* if get a non-empty entry - compare clusters num */
if (MSDOS_EXTRACT_CLUSTER_NUM(entry) == cl4find)
{
/* on success fill aux structure and copy all 32 bytes */
rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM, j * bts2rd,
5ae00: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED 5ae04: 2f05 movel %d5,%sp@- <== NOT EXECUTED 5ae06: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 5ae0a: 2f0c movel %a4,%sp@- <== NOT EXECUTED 5ae0c: 2f0d movel %a5,%sp@- <== NOT EXECUTED 5ae0e: 4eb9 0005 30b0 jsr 530b0 <fat_file_ioctl> <== NOT EXECUTED
&dir_pos->sname.cln);
if (rc != RC_OK)
5ae14: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 5ae18: 4a80 tstl %d0 <== NOT EXECUTED 5ae1a: 66da bnes 5adf6 <msdos_find_node_by_cluster_num_in_fat_file+0xbe><== NOT EXECUTED
return rc;
dir_pos->sname.ofs = i;
5ae1c: 226e 0014 moveal %fp@(20),%a1 <== NOT EXECUTED
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
5ae20: 72ff moveq #-1,%d1 <== NOT EXECUTED
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
memcpy(dir_entry, entry,
5ae22: 206e 0018 moveal %fp@(24),%a0 <== NOT EXECUTED
rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM, j * bts2rd,
&dir_pos->sname.cln);
if (rc != RC_OK)
return rc;
dir_pos->sname.ofs = i;
5ae26: 2342 0004 movel %d2,%a1@(4) <== NOT EXECUTED
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
5ae2a: 2341 0008 movel %d1,%a1@(8) <== NOT EXECUTED
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
5ae2e: 2341 000c movel %d1,%a1@(12) <== NOT EXECUTED
memcpy(dir_entry, entry,
5ae32: 20da movel %a2@+,%a0@+ <== NOT EXECUTED 5ae34: 20da movel %a2@+,%a0@+ <== NOT EXECUTED 5ae36: 20da movel %a2@+,%a0@+ <== NOT EXECUTED 5ae38: 20da movel %a2@+,%a0@+ <== NOT EXECUTED 5ae3a: 20da movel %a2@+,%a0@+ <== NOT EXECUTED 5ae3c: 20da movel %a2@+,%a0@+ <== NOT EXECUTED 5ae3e: 20da movel %a2@+,%a0@+ <== NOT EXECUTED 5ae40: 2092 movel %a2@,%a0@ <== NOT EXECUTED
}
}
j++;
}
return MSDOS_NAME_NOT_FOUND_ERR;
}
5ae42: 4cee 3cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5ae48: 4e5e unlk %fp <== NOT EXECUTED 5ae4a: 4e75 rts <== NOT EXECUTED
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t bts2rd = 0;
uint32_t i = 0, j = 0;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
5ae4c: 4aac 0024 tstl %a4@(36) <== NOT EXECUTED 5ae50: 6600 ff08 bnew 5ad5a <msdos_find_node_by_cluster_num_in_fat_file+0x22><== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
5ae54: 4280 clrl %d0 <== NOT EXECUTED 5ae56: 102b 000a moveb %a3@(10),%d0 <== NOT EXECUTED 5ae5a: 7203 moveq #3,%d1 <== NOT EXECUTED 5ae5c: c081 andl %d1,%d0 <== NOT EXECUTED
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t bts2rd = 0;
uint32_t i = 0, j = 0;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
5ae5e: 6700 fefa beqw 5ad5a <msdos_find_node_by_cluster_num_in_fat_file+0x22><== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
bts2rd = fat_fd->fat_file_size;
5ae62: 262c 0018 movel %a4@(24),%d3 <== NOT EXECUTED
fs_info->cl_buf)) != FAT_EOF)
{
if ( ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE )
rtems_set_errno_and_return_minus_one( EIO );
assert(ret == bts2rd);
5ae66: 4285 clrl %d5 <== NOT EXECUTED 5ae68: 2c3c 0005 2c74 movel #339060,%d6 <== NOT EXECUTED
uint32_t bts2rd = 0;
uint32_t i = 0, j = 0;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
bts2rd = fat_fd->fat_file_size;
5ae6e: 226b 008c moveal %a3@(140),%a1 <== NOT EXECUTED 5ae72: 6000 fef8 braw 5ad6c <msdos_find_node_by_cluster_num_in_fat_file+0x34><== NOT EXECUTED
}
}
j++;
}
return MSDOS_NAME_NOT_FOUND_ERR;
}
5ae76: 4cee 3cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a5 <== NOT EXECUTED
return RC_OK;
}
}
j++;
}
return MSDOS_NAME_NOT_FOUND_ERR;
5ae7c: 303c 7d01 movew #32001,%d0 <== NOT EXECUTED
}
5ae80: 4e5e unlk %fp <== NOT EXECUTED 5ae82: 4e75 rts <== NOT EXECUTED
while ((ret = fat_file_read(mt_entry, fat_fd, j * bts2rd, bts2rd,
fs_info->cl_buf)) != FAT_EOF)
{
if ( ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE )
rtems_set_errno_and_return_minus_one( EIO );
5ae84: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 5ae8a: 7405 moveq #5,%d2 <== NOT EXECUTED 5ae8c: 2040 moveal %d0,%a0 <== NOT EXECUTED 5ae8e: 70ff moveq #-1,%d0 <== NOT EXECUTED 5ae90: 2082 movel %d2,%a0@ <== NOT EXECUTED
}
}
j++;
}
return MSDOS_NAME_NOT_FOUND_ERR;
}
5ae92: 4cee 3cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5ae98: 4e5e unlk %fp <== NOT EXECUTED 5ae9a: 4e75 rts <== NOT EXECUTED
fs_info->cl_buf)) != FAT_EOF)
{
if ( ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE )
rtems_set_errno_and_return_minus_one( EIO );
assert(ret == bts2rd);
5ae9c: 4879 0006 ddc6 pea 6ddc6 <msdos_file_handlers+0xdc> <== NOT EXECUTED 5aea2: 4879 0006 de0b pea 6de0b <__FUNCTION__.7203> <== NOT EXECUTED 5aea8: 4878 069e pea 69e <DBL_MAX_EXP+0x29d> <== NOT EXECUTED 5aeac: 4879 0006 dd57 pea 6dd57 <msdos_file_handlers+0x6d> <== NOT EXECUTED 5aeb2: 4eb9 0005 5c24 jsr 55c24 <__assert_func> <== NOT EXECUTED
0004ed3e <msdos_format>:
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
4ed3e: 4e56 fd24 linkw %fp,#-732 4ed42: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
msdos_format_param_t fmt_params;
/*
* open device for writing
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, "open device\n");
4ed46: 4879 0006 d79e pea 6d79e <_CPU_m68k_BFFFO_table+0x13a> 4ed4c: 47fa fd72 lea %pc@(4eac0 <msdos_format_printf>),%a3 4ed50: 4878 0002 pea 2 <DOUBLE_FLOAT>
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
4ed54: 246e 000c moveal %fp@(12),%a2 4ed58: 262e 0008 movel %fp@(8),%d3
msdos_format_param_t fmt_params;
/*
* open device for writing
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, "open device\n");
4ed5c: 2f0a movel %a2,%sp@- 4ed5e: 4e93 jsr %a3@
fd = open(devname, O_RDWR);
4ed60: 4878 0002 pea 2 <DOUBLE_FLOAT> 4ed64: 2f03 movel %d3,%sp@- 4ed66: 4eb9 0004 7884 jsr 47884 <open>
if (fd == -1) {
4ed6c: 4fef 0014 lea %sp@(20),%sp
/*
* open device for writing
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, "open device\n");
fd = open(devname, O_RDWR);
4ed70: 2400 movel %d0,%d2
if (fd == -1) {
4ed72: 70ff moveq #-1,%d0 4ed74: b082 cmpl %d2,%d0 4ed76: 6700 02d8 beqw 4f050 <msdos_format+0x312>
}
/*
* sanity check on device
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
4ed7a: 2f03 movel %d3,%sp@- 4ed7c: 4879 0006 d7ab pea 6d7ab <_CPU_m68k_BFFFO_table+0x147> 4ed82: 4878 0002 pea 2 <DOUBLE_FLOAT> 4ed86: 2f0a movel %a2,%sp@- 4ed88: 4e93 jsr %a3@
"stat check: %s\n", devname);
if (ret_val == 0) {
rc = fstat(fd, &stat_buf);
4ed8a: 486e ffb0 pea %fp@(-80) 4ed8e: 2f02 movel %d2,%sp@- 4ed90: 4eb9 0005 5e4c jsr 55e4c <fstat> 4ed96: 2c00 movel %d0,%d6
ret_val = rc;
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_INFO,
4ed98: 2f03 movel %d3,%sp@- 4ed9a: 4879 0006 d7bb pea 6d7bb <_CPU_m68k_BFFFO_table+0x157> 4eda0: 4878 0001 pea 1 <ADD> 4eda4: 2f0a movel %a2,%sp@- 4eda6: 4e93 jsr %a3@
"formating: %s\n", devname);
/* rtems feature: no block devices, all are character devices */
if ((ret_val == 0) && (!S_ISBLK(stat_buf.st_mode))) {
4eda8: 4fef 0028 lea %sp@(40),%sp 4edac: 4a86 tstl %d6 4edae: 6600 0c18 bnew 4f9c8 <msdos_format+0xc8a> 4edb2: 202e ffbc movel %fp@(-68),%d0 4edb6: 0280 0000 f000 andil #61440,%d0 4edbc: 0c80 0000 6000 cmpil #24576,%d0
4edc2: 6732 beqs 4edf6 <msdos_format+0xb8> <== ALWAYS TAKEN
/* check that device is registered as block device and lock it */
if (ret_val == 0) {
dd = rtems_disk_obtain(stat_buf.st_rdev);
if (dd == NULL) {
errno = ENOTTY;
4edc4: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED
ret_val = -1;
4edca: 78ff moveq #-1,%d4 <== NOT EXECUTED
* mark this in every copy of the FAT
*/
FAT_SET_VAL32(tmp_sec,8,FAT_FAT32_EOC);
}
for (i = 0;
(i < fmt_params.fat_num) && (ret_val == 0);
4edcc: 99cc subal %a4,%a4 <== NOT EXECUTED
/* check that device is registered as block device and lock it */
if (ret_val == 0) {
dd = rtems_disk_obtain(stat_buf.st_rdev);
if (dd == NULL) {
errno = ENOTTY;
4edce: 2040 moveal %d0,%a0 <== NOT EXECUTED 4edd0: 7019 moveq #25,%d0 <== NOT EXECUTED 4edd2: 2080 movel %d0,%a0@ <== NOT EXECUTED
/*
* cleanup:
* sync and unlock disk
* free any data structures (not needed now)
*/
if (fd != -1) {
4edd4: 70ff moveq #-1,%d0 <== NOT EXECUTED 4edd6: b082 cmpl %d2,%d0 <== NOT EXECUTED 4edd8: 6600 0268 bnew 4f042 <msdos_format+0x304> <== NOT EXECUTED
close(fd);
}
if (dd != NULL) {
4eddc: 4a8c tstl %a4
4edde: 670a beqs 4edea <msdos_format+0xac> <== NEVER TAKEN
rtems_disk_release(dd);
4ede0: 2f0c movel %a4,%sp@- 4ede2: 4eb9 0004 561a jsr 4561a <rtems_disk_release> 4ede8: 588f addql #4,%sp
} return ret_val; }
4edea: 2004 movel %d4,%d0 4edec: 4cee 3cfc fd24 moveml %fp@(-732),%d2-%d7/%a2-%a5 4edf2: 4e5e unlk %fp 4edf4: 4e75 rts
ret_val = -1;
}
/* check that device is registered as block device and lock it */
if (ret_val == 0) {
dd = rtems_disk_obtain(stat_buf.st_rdev);
4edf6: 2f2e ffca movel %fp@(-54),%sp@- 4edfa: 2f2e ffc6 movel %fp@(-58),%sp@- 4edfe: 4eb9 0004 55a2 jsr 455a2 <rtems_disk_obtain>
if (dd == NULL) {
4ee04: 508f addql #8,%sp
ret_val = -1;
}
/* check that device is registered as block device and lock it */
if (ret_val == 0) {
dd = rtems_disk_obtain(stat_buf.st_rdev);
4ee06: 2840 moveal %d0,%a4
if (dd == NULL) {
4ee08: 4a80 tstl %d0
4ee0a: 67b8 beqs 4edc4 <msdos_format+0x86> <== NEVER TAKEN
uint32_t fatdata_sect_cnt;
uint32_t onebit;
uint32_t sectors_per_cluster_adj = 0;
uint64_t total_size = 0;
memset(fmt_params,0,sizeof(*fmt_params));
4ee0c: 4878 004e pea 4e <DBL_MANT_DIG+0x19>
* At least one thing we don't have to magically guess...
*/
if (ret_val == 0) {
fmt_params->bytes_per_sector = dd->block_size;
fmt_params->totl_sector_cnt = dd->size;
total_size = dd->block_size * dd->size;
4ee10: 4284 clrl %d4
uint32_t fatdata_sect_cnt;
uint32_t onebit;
uint32_t sectors_per_cluster_adj = 0;
uint64_t total_size = 0;
memset(fmt_params,0,sizeof(*fmt_params));
4ee12: 42a7 clrl %sp@- 4ee14: 486e ff62 pea %fp@(-158) 4ee18: 4eb9 0005 e310 jsr 5e310 <memset>
* this one is fixed in this implementation.
* At least one thing we don't have to magically guess...
*/
if (ret_val == 0) {
fmt_params->bytes_per_sector = dd->block_size;
fmt_params->totl_sector_cnt = dd->size;
4ee1e: 262c 001c movel %a4@(28),%d3
total_size = dd->block_size * dd->size;
4ee22: 2203 movel %d3,%d1
/*
* this one is fixed in this implementation.
* At least one thing we don't have to magically guess...
*/
if (ret_val == 0) {
fmt_params->bytes_per_sector = dd->block_size;
4ee24: 202c 0020 movel %a4@(32),%d0
fmt_params->totl_sector_cnt = dd->size;
total_size = dd->block_size * dd->size;
4ee28: 4c00 1800 mulsl %d0,%d1
/*
* this one is fixed in this implementation.
* At least one thing we don't have to magically guess...
*/
if (ret_val == 0) {
fmt_params->bytes_per_sector = dd->block_size;
4ee2c: 2d40 ff62 movel %d0,%fp@(-158)
fmt_params->totl_sector_cnt = dd->size;
total_size = dd->block_size * dd->size;
4ee30: 2a01 movel %d1,%d5
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
4ee32: 2f01 movel %d1,%sp@- 4ee34: 2f04 movel %d4,%sp@- 4ee36: 2f03 movel %d3,%sp@- 4ee38: 2f00 movel %d0,%sp@- 4ee3a: 4879 0006 d834 pea 6d834 <_CPU_m68k_BFFFO_table+0x1d0> 4ee40: 4878 0002 pea 2 <DOUBLE_FLOAT>
* this one is fixed in this implementation.
* At least one thing we don't have to magically guess...
*/
if (ret_val == 0) {
fmt_params->bytes_per_sector = dd->block_size;
fmt_params->totl_sector_cnt = dd->size;
4ee44: 2d43 ff66 movel %d3,%fp@(-154)
total_size = dd->block_size * dd->size;
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
4ee48: 2f0a movel %a2,%sp@- 4ee4a: 4e93 jsr %a3@
}
/*
* determine number of FATs
*/
if (ret_val == 0) {
if ((rqdata == NULL) ||
4ee4c: 4fef 0028 lea %sp@(40),%sp 4ee50: 4a8a tstl %a2 4ee52: 6700 0940 beqw 4f794 <msdos_format+0xa56>
(rqdata->fat_num == 0)) {
4ee56: 202a 000c movel %a2@(12),%d0
}
/*
* determine number of FATs
*/
if (ret_val == 0) {
if ((rqdata == NULL) ||
4ee5a: 6700 0220 beqw 4f07c <msdos_format+0x33e>
(rqdata->fat_num == 0)) {
fmt_params->fat_num = 2;
}
else if (rqdata->fat_num <= 6) {
4ee5e: 7206 moveq #6,%d1 <== NOT EXECUTED 4ee60: b280 cmpl %d0,%d1 <== NOT EXECUTED 4ee62: 6500 0230 bcsw 4f094 <msdos_format+0x356> <== NOT EXECUTED
ret_val = EINVAL;
}
}
if (ret_val == 0)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
4ee66: 4281 clrl %d1 <== NOT EXECUTED 4ee68: 1200 moveb %d0,%d1 <== NOT EXECUTED 4ee6a: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4ee6c: 4879 0006 d7ca pea 6d7ca <_CPU_m68k_BFFFO_table+0x166> <== NOT EXECUTED 4ee72: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED
if ((rqdata == NULL) ||
(rqdata->fat_num == 0)) {
fmt_params->fat_num = 2;
}
else if (rqdata->fat_num <= 6) {
fmt_params->fat_num = rqdata->fat_num;
4ee76: 1d40 ff92 moveb %d0,%fp@(-110) <== NOT EXECUTED
ret_val = EINVAL;
}
}
if (ret_val == 0)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
4ee7a: 2f0a movel %a2,%sp@-
/*
* determine FAT type and sectors per cluster
* depends on
*/
if (ret_val == 0) {
fmt_params->sectors_per_cluster = 1;
4ee7c: 7601 moveq #1,%d3
if ((rqdata != NULL) &&
4ee7e: 7e01 moveq #1,%d7
ret_val = EINVAL;
}
}
if (ret_val == 0)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
4ee80: 4e93 jsr %a3@
/*
* determine FAT type and sectors per cluster
* depends on
*/
if (ret_val == 0) {
fmt_params->sectors_per_cluster = 1;
4ee82: 4fef 0010 lea %sp@(16),%sp
if ((rqdata != NULL) &&
4ee86: 4280 clrl %d0
(rqdata->fattype == MSDOS_FMT_FAT12)) {
4ee88: 122a 0014 moveb %a2@(20),%d1
/*
* determine FAT type and sectors per cluster
* depends on
*/
if (ret_val == 0) {
fmt_params->sectors_per_cluster = 1;
4ee8c: 2d43 ff6e movel %d3,%fp@(-146)
if ((rqdata != NULL) &&
4ee90: 1001 moveb %d1,%d0 4ee92: be80 cmpl %d0,%d7 4ee94: 6700 0984 beqw 4f81a <msdos_format+0xadc>
(rqdata->fattype == MSDOS_FMT_FAT12)) {
fmt_params->fattype = FAT_FAT12;
}
else if ((rqdata != NULL) &&
4ee98: 7602 moveq #2,%d3 4ee9a: b680 cmpl %d0,%d3 4ee9c: 6700 098a beqw 4f828 <msdos_format+0xaea>
(rqdata->fattype == MSDOS_FMT_FAT16)) {
fmt_params->fattype = FAT_FAT16;
}
else if ((rqdata != NULL) &&
4eea0: 7e03 moveq #3,%d7 4eea2: be80 cmpl %d0,%d7 4eea4: 6700 0a9e beqw 4f944 <msdos_format+0xc06>
(rqdata->fattype == MSDOS_FMT_FAT32)) {
fmt_params->fattype = FAT_FAT32;
}
else if ((rqdata != NULL) &&
4eea8: 4a01 tstb %d1 4eeaa: 6600 06bc bnew 4f568 <msdos_format+0x82a> 4eeae: 262e ff66 movel %fp@(-154),%d3
/*
* limiting values for disk size, fat type, sectors per cluster
* NOTE: maximum sect_per_clust is arbitrarily choosen with values that
* are a compromise concerning capacity and efficency
*/
if (fmt_params->totl_sector_cnt
4eeb2: 0c83 0000 7fa7 cmpil #32679,%d3 4eeb8: 6200 098a bhiw 4f844 <msdos_format+0xb06>
< ((uint32_t)FAT_FAT12_MAX_CLN)*8) {
fmt_params->fattype = FAT_FAT12;
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
4eebc: 7002 moveq #2,%d0
* NOTE: maximum sect_per_clust is arbitrarily choosen with values that
* are a compromise concerning capacity and efficency
*/
if (fmt_params->totl_sector_cnt
< ((uint32_t)FAT_FAT12_MAX_CLN)*8) {
fmt_params->fattype = FAT_FAT12;
4eebe: 7201 moveq #1,%d1
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
4eec0: 2d40 ff6e movel %d0,%fp@(-146)
* NOTE: maximum sect_per_clust is arbitrarily choosen with values that
* are a compromise concerning capacity and efficency
*/
if (fmt_params->totl_sector_cnt
< ((uint32_t)FAT_FAT12_MAX_CLN)*8) {
fmt_params->fattype = FAT_FAT12;
4eec4: 1d41 ff94 moveb %d1,%fp@(-108)
}
}
/*
* try to use user requested cluster size
*/
if ((rqdata != NULL) &&
4eec8: 4a8a tstl %a2 4eeca: 6700 0a5e beqw 4f92a <msdos_format+0xbec> 4eece: 42ae fd58 clrl %fp@(-680)
(rqdata->sectors_per_cluster > 0)) {
4eed2: 206a 0008 moveal %a2@(8),%a0
}
}
/*
* try to use user requested cluster size
*/
if ((rqdata != NULL) &&
4eed6: 4a88 tstl %a0 4eed8: 6600 085a bnew 4f734 <msdos_format+0x9f6> 4eedc: 226e ff6e moveal %fp@(-146),%a1
*/
for (onebit = 128;onebit >= 1;onebit = onebit>>1) {
if (fmt_params->sectors_per_cluster >= onebit) {
fmt_params->sectors_per_cluster = onebit;
if (fmt_params->sectors_per_cluster
<= 32768L/fmt_params->bytes_per_sector) {
4eee0: 7208 moveq #8,%d1
}
}
/*
* try to use user requested cluster size
*/
if ((rqdata != NULL) &&
4eee2: 2049 moveal %a1,%a0
*/
for (onebit = 128;onebit >= 1;onebit = onebit>>1) {
if (fmt_params->sectors_per_cluster >= onebit) {
fmt_params->sectors_per_cluster = onebit;
if (fmt_params->sectors_per_cluster
<= 32768L/fmt_params->bytes_per_sector) {
4eee4: 203c 0000 0080 movel #128,%d0 4eeea: 262e ff62 movel %fp@(-158),%d3
* check sectors per cluster.
* must be power of 2
* must be smaller than or equal to 128
* sectors_per_cluster*bytes_per_sector must not be bigger than 32K
*/
for (onebit = 128;onebit >= 1;onebit = onebit>>1) {
4eeee: 5381 subql #1,%d1
if (fmt_params->sectors_per_cluster >= onebit) {
4eef0: b1c0 cmpal %d0,%a0 4eef2: 6500 06e2 bcsw 4f5d6 <msdos_format+0x898>
fmt_params->sectors_per_cluster = onebit; if (fmt_params->sectors_per_cluster
4eef6: 2240 moveal %d0,%a1
<= 32768L/fmt_params->bytes_per_sector) {
4eef8: 283c 0000 8000 movel #32768,%d4 4eefe: 4c43 4004 remul %d3,%d4,%d4
* sectors_per_cluster*bytes_per_sector must not be bigger than 32K
*/
for (onebit = 128;onebit >= 1;onebit = onebit>>1) {
if (fmt_params->sectors_per_cluster >= onebit) {
fmt_params->sectors_per_cluster = onebit;
if (fmt_params->sectors_per_cluster
4ef02: b084 cmpl %d4,%d0 4ef04: 6200 06d0 bhiw 4f5d6 <msdos_format+0x898> 4ef08: 2d40 ff6e movel %d0,%fp@(-146)
}
}
}
}
if (ret_val == 0) {
4ef0c: 4aae fd58 tstl %fp@(-680) 4ef10: 6600 0834 bnew 4f746 <msdos_format+0xa08>
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
4ef14: 262e ff6e movel %fp@(-146),%d3
"sectors per cluster: %d\n", fmt_params->sectors_per_cluster);
if (fmt_params->fattype == FAT_FAT32) {
4ef18: 4286 clrl %d6
}
}
}
if (ret_val == 0) {
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
4ef1a: 2f03 movel %d3,%sp@- 4ef1c: 4879 0006 d7de pea 6d7de <_CPU_m68k_BFFFO_table+0x17a> 4ef22: 4878 0002 pea 2 <DOUBLE_FLOAT> 4ef26: 2f0a movel %a2,%sp@- 4ef28: 4e93 jsr %a3@
"sectors per cluster: %d\n", fmt_params->sectors_per_cluster);
if (fmt_params->fattype == FAT_FAT32) {
4ef2a: 4fef 0010 lea %sp@(16),%sp 4ef2e: 1c2e ff94 moveb %fp@(-108),%d6 4ef32: 7004 moveq #4,%d0 4ef34: b086 cmpl %d6,%d0 4ef36: 6700 09a4 beqw 4f8dc <msdos_format+0xb9e>
fmt_params->fsinfo_sec = 1;
}
else {
/* recommended: for FAT12/FAT16, always set reserved sector count to 1 */
fmt_params->rsvd_sector_cnt = 1;
4ef3a: 7e01 moveq #1,%d7 4ef3c: 2d47 ff6a movel %d7,%fp@(-150)
/* recommended: for FAT16, set files per root directory to 512 */
/* for FAT12/FAT16, set files per root directory */
/* must fill up an even count of sectors */
if ((rqdata != NULL) &&
4ef40: 4a8a tstl %a2 4ef42: 6700 08a0 beqw 4f7e4 <msdos_format+0xaa6>
(rqdata->files_per_root_dir > 0)) {
4ef46: 282a 0010 movel %a2@(16),%d4
/* recommended: for FAT12/FAT16, always set reserved sector count to 1 */
fmt_params->rsvd_sector_cnt = 1;
/* recommended: for FAT16, set files per root directory to 512 */
/* for FAT12/FAT16, set files per root directory */
/* must fill up an even count of sectors */
if ((rqdata != NULL) &&
4ef4a: 6700 0898 beqw 4f7e4 <msdos_format+0xaa6>
4ef4e: 5384 subql #1,%d4 <== NOT EXECUTED
else {
fmt_params->files_per_root_dir = 64;
}
}
fmt_params->files_per_root_dir = (fmt_params->files_per_root_dir +
(2*fmt_params->bytes_per_sector/
4ef50: 222e ff62 movel %fp@(-158),%d1 <== NOT EXECUTED 4ef54: 2a01 movel %d1,%d5 <== NOT EXECUTED
FAT_DIRENTRY_SIZE-1));
fmt_params->files_per_root_dir -= (fmt_params->files_per_root_dir %
4ef56: 3a7c 0001 moveaw #1,%a5 <== NOT EXECUTED
else {
fmt_params->files_per_root_dir = 64;
}
}
fmt_params->files_per_root_dir = (fmt_params->files_per_root_dir +
(2*fmt_params->bytes_per_sector/
4ef5a: da85 addl %d5,%d5 <== NOT EXECUTED 4ef5c: ea8d lsrl #5,%d5 <== NOT EXECUTED
}
else {
fmt_params->files_per_root_dir = 64;
}
}
fmt_params->files_per_root_dir = (fmt_params->files_per_root_dir +
4ef5e: d885 addl %d5,%d4 <== NOT EXECUTED
(2*fmt_params->bytes_per_sector/
FAT_DIRENTRY_SIZE-1));
fmt_params->files_per_root_dir -= (fmt_params->files_per_root_dir %
4ef60: 2e04 movel %d4,%d7 <== NOT EXECUTED 4ef62: 4c45 7000 remul %d5,%d0,%d7 <== NOT EXECUTED 4ef66: 9880 subl %d0,%d4 <== NOT EXECUTED 4ef68: 2e04 movel %d4,%d7 <== NOT EXECUTED 4ef6a: eb8f lsll #5,%d7 <== NOT EXECUTED 4ef6c: 2d44 ff7a movel %d4,%fp@(-134) <== NOT EXECUTED
(2*fmt_params->bytes_per_sector
/FAT_DIRENTRY_SIZE));
}
fmt_params->root_dir_sectors =
(((fmt_params->files_per_root_dir * FAT_DIRENTRY_SIZE)
+ fmt_params->bytes_per_sector - 1)
4ef70: 2241 moveal %d1,%a1 4ef72: 5389 subql #1,%a1 4ef74: de89 addl %a1,%d7
/ fmt_params->bytes_per_sector);
4ef76: 4c41 7007 remul %d1,%d7,%d7
}
if (ret_val == 0) {
fatdata_sect_cnt = (fmt_params->totl_sector_cnt -
4ef7a: 2a2e ff66 movel %fp@(-154),%d5
uint32_t sectors_per_fat;
uint32_t data_cluster_cnt;
/*
* ensure, that maximum cluster size (32KByte) is not exceeded
*/
while (MS_BYTES_PER_CLUSTER_LIMIT / bytes_per_sector < sectors_per_cluster) {
4ef7e: 203c 0000 8000 movel #32768,%d0
(((fmt_params->files_per_root_dir * FAT_DIRENTRY_SIZE)
+ fmt_params->bytes_per_sector - 1)
/ fmt_params->bytes_per_sector);
}
if (ret_val == 0) {
fatdata_sect_cnt = (fmt_params->totl_sector_cnt -
4ef84: 9a8d subl %a5,%d5 4ef86: 9a87 subl %d7,%d5
uint32_t sectors_per_fat;
uint32_t data_cluster_cnt;
/*
* ensure, that maximum cluster size (32KByte) is not exceeded
*/
while (MS_BYTES_PER_CLUSTER_LIMIT / bytes_per_sector < sectors_per_cluster) {
4ef88: 4c41 0000 remul %d1,%d0,%d0
ret_val = msdos_format_eval_sectors_per_cluster
(fmt_params->fattype,
fmt_params->bytes_per_sector,
fatdata_sect_cnt,
fmt_params->fat_num,
4ef8c: 182e ff92 moveb %fp@(-110),%d4
FAT_DIRENTRY_SIZE-1));
fmt_params->files_per_root_dir -= (fmt_params->files_per_root_dir %
(2*fmt_params->bytes_per_sector
/FAT_DIRENTRY_SIZE));
}
fmt_params->root_dir_sectors =
4ef90: 2d47 ff7e movel %d7,%fp@(-130)
uint32_t sectors_per_fat;
uint32_t data_cluster_cnt;
/*
* ensure, that maximum cluster size (32KByte) is not exceeded
*/
while (MS_BYTES_PER_CLUSTER_LIMIT / bytes_per_sector < sectors_per_cluster) {
4ef94: b083 cmpl %d3,%d0
4ef96: 6406 bccs 4ef9e <msdos_format+0x260> <== ALWAYS TAKEN
sectors_per_cluster /= 2;
4ef98: e28b lsrl #1,%d3 <== NOT EXECUTED
uint32_t sectors_per_fat;
uint32_t data_cluster_cnt;
/*
* ensure, that maximum cluster size (32KByte) is not exceeded
*/
while (MS_BYTES_PER_CLUSTER_LIMIT / bytes_per_sector < sectors_per_cluster) {
4ef9a: b083 cmpl %d3,%d0 <== NOT EXECUTED 4ef9c: 65fa bcss 4ef98 <msdos_format+0x25a> <== NOT EXECUTED
sectors_per_fat = ((fat_capacity
+ (bytes_per_sector - 1))
/ bytes_per_sector);
data_cluster_cnt = (fatdata_cluster_cnt -
(((sectors_per_fat * fat_num)
4ef9e: 2d42 fd52 movel %d2,%fp@(-686) 4efa2: 0284 0000 00ff andil #255,%d4 4efa8: 2d44 fd5c movel %d4,%fp@(-676)
* compute number of data clusters for current data:
* - compute cluster count for data AND fat
* - compute storage size for FAT
* - subtract from total cluster count
*/
fatdata_cluster_cnt = fatdata_sec_cnt/sectors_per_cluster;
4efac: 2805 movel %d5,%d4
if (fattype == FAT_FAT12) {
4efae: 7e01 moveq #1,%d7
* compute number of data clusters for current data:
* - compute cluster count for data AND fat
* - compute storage size for FAT
* - subtract from total cluster count
*/
fatdata_cluster_cnt = fatdata_sec_cnt/sectors_per_cluster;
4efb0: 4c43 4004 remul %d3,%d4,%d4
if (fattype == FAT_FAT12) {
4efb4: be86 cmpl %d6,%d7 4efb6: 6700 06d0 beqw 4f688 <msdos_format+0x94a>
fat_capacity = fatdata_cluster_cnt * 3 / 2;
}
else if (fattype == FAT_FAT16) {
4efba: 7e02 moveq #2,%d7 <== NOT EXECUTED 4efbc: be86 cmpl %d6,%d7 <== NOT EXECUTED 4efbe: 6700 0718 beqw 4f6d8 <msdos_format+0x99a> <== NOT EXECUTED
else { /* FAT32 */
fat_capacity = fatdata_cluster_cnt * 4;
}
sectors_per_fat = ((fat_capacity
+ (bytes_per_sector - 1))
4efc2: 41f1 4c00 lea %a1@(00000000,%d4:l:4),%a0 <== NOT EXECUTED
if (((fattype == FAT_FAT12) && (data_cluster_cnt > FAT_FAT12_MAX_CLN)) ||
((fattype == FAT_FAT16) && (data_cluster_cnt > FAT_FAT16_MAX_CLN))) {
sectors_per_cluster *= 2;
}
else {
finished = true;
4efc6: 7401 moveq #1,%d2 <== NOT EXECUTED
else { /* FAT32 */
fat_capacity = fatdata_cluster_cnt * 4;
}
sectors_per_fat = ((fat_capacity
+ (bytes_per_sector - 1))
4efc8: 2008 movel %a0,%d0 <== NOT EXECUTED
if (((fattype == FAT_FAT12) && (data_cluster_cnt > FAT_FAT12_MAX_CLN)) ||
((fattype == FAT_FAT16) && (data_cluster_cnt > FAT_FAT16_MAX_CLN))) {
sectors_per_cluster *= 2;
}
else {
finished = true;
4efca: 1d42 fd57 moveb %d2,%fp@(-681) <== NOT EXECUTED
}
else { /* FAT32 */
fat_capacity = fatdata_cluster_cnt * 4;
}
sectors_per_fat = ((fat_capacity
4efce: 4c41 0000 remul %d1,%d0,%d0 <== NOT EXECUTED
finished = true;
}
/*
* when maximum cluster size is exceeded, we have invalid data, abort...
*/
if ((sectors_per_cluster * bytes_per_sector)
4efd2: 2803 movel %d3,%d4 4efd4: 4c01 4800 mulsl %d1,%d4 4efd8: 0c84 0000 8000 cmpil #32768,%d4 4efde: 6300 0614 blsw 4f5f4 <msdos_format+0x8b6>
4efe2: 242e fd52 movel %fp@(-686),%d2 <== NOT EXECUTED
finished = true;
}
} while (!finished);
if (ret_val != 0) {
rtems_set_errno_and_return_minus_one(ret_val);
4efe6: 7c16 moveq #22,%d6 <== NOT EXECUTED
fatdata_sect_cnt,
fmt_params->fat_num,
fmt_params->sectors_per_cluster,
§ors_per_cluster_adj,
&(fmt_params->sectors_per_fat));
fmt_params->sectors_per_cluster = sectors_per_cluster_adj;
4efe8: 7aff moveq #-1,%d5 <== NOT EXECUTED
finished = true;
}
} while (!finished);
if (ret_val != 0) {
rtems_set_errno_and_return_minus_one(ret_val);
4efea: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED
fatdata_sect_cnt,
fmt_params->fat_num,
fmt_params->sectors_per_cluster,
§ors_per_cluster_adj,
&(fmt_params->sectors_per_fat));
fmt_params->sectors_per_cluster = sectors_per_cluster_adj;
4eff0: 4281 clrl %d1 <== NOT EXECUTED
finished = true;
}
} while (!finished);
if (ret_val != 0) {
rtems_set_errno_and_return_minus_one(ret_val);
4eff2: 2040 moveal %d0,%a0 <== NOT EXECUTED
fatdata_sect_cnt,
fmt_params->fat_num,
fmt_params->sectors_per_cluster,
§ors_per_cluster_adj,
&(fmt_params->sectors_per_fat));
fmt_params->sectors_per_cluster = sectors_per_cluster_adj;
4eff4: 122e ff92 moveb %fp@(-110),%d1 <== NOT EXECUTED
finished = true;
}
} while (!finished);
if (ret_val != 0) {
rtems_set_errno_and_return_minus_one(ret_val);
4eff8: 2086 movel %d6,%a0@ <== NOT EXECUTED
fatdata_sect_cnt,
fmt_params->fat_num,
fmt_params->sectors_per_cluster,
§ors_per_cluster_adj,
&(fmt_params->sectors_per_fat));
fmt_params->sectors_per_cluster = sectors_per_cluster_adj;
4effa: 41ee ff72 lea %fp@(-142),%a0 <== NOT EXECUTED 4effe: 4c10 1800 mulsl %a0@,%d1 <== NOT EXECUTED 4f002: 202e ff7e movel %fp@(-130),%d0 <== NOT EXECUTED 4f006: d2ae ff6a addl %fp@(-150),%d1 <== NOT EXECUTED 4f00a: 2d45 fd58 movel %d5,%fp@(-680) <== NOT EXECUTED 4f00e: 42ae ff6e clrl %fp@(-146) <== NOT EXECUTED
}
/*
* determine location and size of root directory
* for formatting
*/
if (fmt_params->root_dir_sectors > 0) {
4f012: 4a80 tstl %d0 4f014: 6700 0086 beqw 4f09c <msdos_format+0x35e>
fmt_params->root_dir_start_sec =
4f018: 2d41 ff82 movel %d1,%fp@(-126)
fmt_params->rsvd_sector_cnt
+ (fmt_params-> fat_num*fmt_params->sectors_per_fat);
fmt_params->root_dir_fmt_sec_cnt = fmt_params->root_dir_sectors;
4f01c: 2d40 ff86 movel %d0,%fp@(-122)
fmt_params->root_dir_fmt_sec_cnt = fmt_params->sectors_per_cluster;
}
/*
* determine usable OEMName
*/
if (ret_val == 0) {
4f020: 4aae fd58 tstl %fp@(-680) 4f024: 6700 0088 beqw 4f0ae <msdos_format+0x370>
}
/*
* Phuuu.... That's it.
*/
if (ret_val != 0) {
rtems_set_errno_and_return_minus_one(ret_val);
4f028: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 4f02e: 78ff moveq #-1,%d4 <== NOT EXECUTED 4f030: 2040 moveal %d0,%a0 <== NOT EXECUTED
/*
* cleanup:
* sync and unlock disk
* free any data structures (not needed now)
*/
if (fd != -1) {
4f032: 70ff moveq #-1,%d0 <== NOT EXECUTED
}
/*
* Phuuu.... That's it.
*/
if (ret_val != 0) {
rtems_set_errno_and_return_minus_one(ret_val);
4f034: 20ae fd58 movel %fp@(-680),%a0@ <== NOT EXECUTED
/*
* cleanup:
* sync and unlock disk
* free any data structures (not needed now)
*/
if (fd != -1) {
4f038: b082 cmpl %d2,%d0 <== NOT EXECUTED 4f03a: 6700 fda0 beqw 4eddc <msdos_format+0x9e> <== NOT EXECUTED 4f03e: 6002 bras 4f042 <msdos_format+0x304> <== NOT EXECUTED
* mark this in every copy of the FAT
*/
FAT_SET_VAL32(tmp_sec,8,FAT_FAT32_EOC);
}
for (i = 0;
(i < fmt_params.fat_num) && (ret_val == 0);
4f040: 78ff moveq #-1,%d4 <== NOT EXECUTED
* cleanup:
* sync and unlock disk
* free any data structures (not needed now)
*/
if (fd != -1) {
close(fd);
4f042: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4f044: 4eb9 0004 6290 jsr 46290 <close> <== NOT EXECUTED 4f04a: 588f addql #4,%sp <== NOT EXECUTED 4f04c: 6000 fd8e braw 4eddc <msdos_format+0x9e> <== NOT EXECUTED
}
/*
* sanity check on device
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
4f050: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4f052: 4879 0006 d7ab pea 6d7ab <_CPU_m68k_BFFFO_table+0x147> <== NOT EXECUTED
if (ret_val == 0) {
rc = fstat(fd, &stat_buf);
ret_val = rc;
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_INFO,
4f058: 78ff moveq #-1,%d4 <== NOT EXECUTED
}
/*
* sanity check on device
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
4f05a: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED
* mark this in every copy of the FAT
*/
FAT_SET_VAL32(tmp_sec,8,FAT_FAT32_EOC);
}
for (i = 0;
(i < fmt_params.fat_num) && (ret_val == 0);
4f05e: 99cc subal %a4,%a4 <== NOT EXECUTED
}
/*
* sanity check on device
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
4f060: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4f062: 4e93 jsr %a3@ <== NOT EXECUTED
if (ret_val == 0) {
rc = fstat(fd, &stat_buf);
ret_val = rc;
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_INFO,
4f064: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4f066: 4879 0006 d7bb pea 6d7bb <_CPU_m68k_BFFFO_table+0x157> <== NOT EXECUTED 4f06c: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 4f070: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4f072: 4e93 jsr %a3@ <== NOT EXECUTED 4f074: 4fef 0020 lea %sp@(32),%sp <== NOT EXECUTED 4f078: 6000 fd5a braw 4edd4 <msdos_format+0x96> <== NOT EXECUTED
ret_val = EINVAL;
}
}
if (ret_val == 0)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
4f07c: 4878 0002 pea 2 <DOUBLE_FLOAT> 4f080: 4879 0006 d7ca pea 6d7ca <_CPU_m68k_BFFFO_table+0x166> 4f086: 4878 0002 pea 2 <DOUBLE_FLOAT>
* determine number of FATs
*/
if (ret_val == 0) {
if ((rqdata == NULL) ||
(rqdata->fat_num == 0)) {
fmt_params->fat_num = 2;
4f08a: 7202 moveq #2,%d1 4f08c: 1d41 ff92 moveb %d1,%fp@(-110) 4f090: 6000 fde8 braw 4ee7a <msdos_format+0x13c>
}
else if (rqdata->fat_num <= 6) {
fmt_params->fat_num = rqdata->fat_num;
}
else {
ret_val = EINVAL;
4f094: 7616 moveq #22,%d3 <== NOT EXECUTED
if (ret_val == 0) {
if ((rqdata == NULL) ||
(rqdata->fat_num == 0)) {
fmt_params->fat_num = 2;
}
else if (rqdata->fat_num <= 6) {
4f096: 4281 clrl %d1 <== NOT EXECUTED
fmt_params->fat_num = rqdata->fat_num;
}
else {
ret_val = EINVAL;
4f098: 2d43 fd58 movel %d3,%fp@(-680) <== NOT EXECUTED
}
else {
/*
* for FAT32: root directory is in cluster 2
*/
fmt_params->root_dir_start_sec =
4f09c: 2d41 ff82 movel %d1,%fp@(-126) <== NOT EXECUTED
fmt_params->rsvd_sector_cnt
+ (fmt_params-> fat_num*fmt_params->sectors_per_fat);
fmt_params->root_dir_fmt_sec_cnt = fmt_params->sectors_per_cluster;
4f0a0: 2d6e ff6e ff86 movel %fp@(-146),%fp@(-122) <== NOT EXECUTED
}
/*
* determine usable OEMName
*/
if (ret_val == 0) {
4f0a6: 4aae fd58 tstl %fp@(-680) <== NOT EXECUTED 4f0aa: 6600 ff7c bnew 4f028 <msdos_format+0x2ea> <== NOT EXECUTED
const char *from;
char *to = fmt_params->OEMName;
int cnt;
from = "RTEMS"; /* default: make "from" point to OS Name */
4f0ae: 43f9 0006 c8a4 lea 6c8a4 <__func__.6070+0x2cc>,%a1
if ((rqdata != NULL) &&
4f0b4: 4a8a tstl %a2
4f0b6: 6708 beqs 4f0c0 <msdos_format+0x382> <== NEVER TAKEN
(rqdata->OEMName != NULL)) {
4f0b8: 2252 moveal %a2@,%a1
if (ret_val == 0) {
const char *from;
char *to = fmt_params->OEMName;
int cnt;
from = "RTEMS"; /* default: make "from" point to OS Name */
if ((rqdata != NULL) &&
4f0ba: 4a89 tstl %a1 4f0bc: 6700 0494 beqw 4f552 <msdos_format+0x814> 4f0c0: 2a79 0006 ec28 moveal 6ec28 <__ctype_ptr__>,%a5
*/
if (ret_val == 0) {
const char *from;
char *to = fmt_params->OEMName;
int cnt;
from = "RTEMS"; /* default: make "from" point to OS Name */
4f0c6: 7208 moveq #8,%d1
/*
* determine usable OEMName
*/
if (ret_val == 0) {
const char *from;
char *to = fmt_params->OEMName;
4f0c8: 41ee ff95 lea %fp@(-107),%a0
from = rqdata->OEMName;
}
for (cnt = 0;
cnt < (sizeof(fmt_params->OEMName)-1);
cnt++) {
if (isprint((unsigned char)*from)) {
4f0cc: 4280 clrl %d0 4f0ce: 1611 moveb %a1@,%d3 4f0d0: 1003 moveb %d3,%d0 4f0d2: 1035 0801 moveb %a5@(00000001,%d0:l),%d0 4f0d6: 49c0 extbl %d0 4f0d8: 0280 0000 0097 andil #151,%d0 4f0de: 6700 050c beqw 4f5ec <msdos_format+0x8ae>
*to++ = *from++;
4f0e2: 5289 addql #1,%a1 4f0e4: 10c3 moveb %d3,%a0@+
* at that character and replace all following characters
* with a ' '
*/
*to++=' ';
}
*to = '\0';
4f0e6: 5381 subql #1,%d1 4f0e8: 4210 clrb %a0@
from = "RTEMS"; /* default: make "from" point to OS Name */
if ((rqdata != NULL) &&
(rqdata->OEMName != NULL)) {
from = rqdata->OEMName;
}
for (cnt = 0;
4f0ea: 4a81 tstl %d1
4f0ec: 66de bnes 4f0cc <msdos_format+0x38e>
*/
if (ret_val == 0) {
const char *from;
char *to = fmt_params->VolLabel;
int cnt;
from = ""; /* default: make "from" point to empty string */
4f0ee: 43f9 0006 d5c1 lea 6d5c1 <rtems_filesystem_default_pathconf+0xab>,%a1
if ((rqdata != NULL) &&
4f0f4: 4a8a tstl %a2
4f0f6: 6710 beqs 4f108 <msdos_format+0x3ca> <== NEVER TAKEN
(rqdata->VolLabel != NULL)) {
4f0f8: 226a 0004 moveal %a2@(4),%a1
if (ret_val == 0) {
const char *from;
char *to = fmt_params->VolLabel;
int cnt;
from = ""; /* default: make "from" point to empty string */
if ((rqdata != NULL) &&
4f0fc: 4a89 tstl %a1 4f0fe: 6700 0852 beqw 4f952 <msdos_format+0xc14>
(rqdata->VolLabel != NULL)) {
from = rqdata->VolLabel;
fmt_params->VolLabel_present = true;
4f102: 7001 moveq #1,%d0 4f104: 1d40 ffaa moveb %d0,%fp@(-86)
*/
if (ret_val == 0) {
const char *from;
char *to = fmt_params->VolLabel;
int cnt;
from = ""; /* default: make "from" point to empty string */
4f108: 720b moveq #11,%d1
/*
* determine usable Volume Label
*/
if (ret_val == 0) {
const char *from;
char *to = fmt_params->VolLabel;
4f10a: 41ee ff9e lea %fp@(-98),%a0
fmt_params->VolLabel_present = true;
}
for (cnt = 0;
cnt < (sizeof(fmt_params->VolLabel)-1);
cnt++) {
if (isprint((unsigned char)*from)) {
4f10e: 4280 clrl %d0 4f110: 1611 moveb %a1@,%d3 4f112: 1003 moveb %d3,%d0 4f114: 1035 0801 moveb %a5@(00000001,%d0:l),%d0 4f118: 49c0 extbl %d0 4f11a: 0280 0000 0097 andil #151,%d0 4f120: 6700 04c2 beqw 4f5e4 <msdos_format+0x8a6>
*to++ = *from++;
4f124: 5289 addql #1,%a1 4f126: 10c3 moveb %d3,%a0@+
* at that character and replace all following characters
* with a ' '
*/
*to++=' ';
}
*to = '\0';
4f128: 5381 subql #1,%d1 4f12a: 4210 clrb %a0@
if ((rqdata != NULL) &&
(rqdata->VolLabel != NULL)) {
from = rqdata->VolLabel;
fmt_params->VolLabel_present = true;
}
for (cnt = 0;
4f12c: 4a81 tstl %d1
4f12e: 66de bnes 4f10e <msdos_format+0x3d0>
{
int ret_val = 0;
int rc;
struct timeval time_value;
rc = rtems_clock_get_tod_timeval(&time_value);
4f130: 486e fff6 pea %fp@(-10) 4f134: 4eb9 0005 6b9c jsr 56b9c <rtems_clock_get_tod_timeval>
if (rc == RTEMS_SUCCESSFUL) {
4f13a: 588f addql #4,%sp 4f13c: 4a80 tstl %d0 4f13e: 6600 06f6 bnew 4f836 <msdos_format+0xaf8>
*volid_ptr = time_value.tv_sec + time_value.tv_sec;
4f142: 202e fff6 movel %fp@(-10),%d0 <== NOT EXECUTED 4f146: d080 addl %d0,%d0 <== NOT EXECUTED 4f148: 2d40 ffac movel %d0,%fp@(-84) <== NOT EXECUTED
ret_val = msdos_format_determine_fmt_params(dd,rqdata,&fmt_params);
}
/*
* if requested, write whole disk/partition with 0xe5
*/
if ((ret_val == 0) &&
4f14c: 4a8a tstl %a2
4f14e: 6708 beqs 4f158 <msdos_format+0x41a> <== NEVER TAKEN
(rqdata != NULL) &&
4f150: 4a2a 0016 tstb %a2@(22) 4f154: 6700 0318 beqw 4f46e <msdos_format+0x730>
*/
if (ret_val == 0) {
/*
* Read the current MBR to obtain the partition table.
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
4f158: 4879 0006 d7f7 pea 6d7f7 <_CPU_m68k_BFFFO_table+0x193> 4f15e: 4878 0002 pea 2 <DOUBLE_FLOAT> 4f162: 2f0a movel %a2,%sp@- 4f164: 4e93 jsr %a3@
"read MRB sector\n");
ret_val = msdos_format_read_sec(fd,
4f166: 262e ff62 movel %fp@(-158),%d3
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
int ret_val = 0;
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
4f16a: 42a7 clrl %sp@- 4f16c: 42a7 clrl %sp@- 4f16e: 42a7 clrl %sp@- 4f170: 2f02 movel %d2,%sp@- 4f172: 4eb9 0004 6cac jsr 46cac <lseek> 4f178: 4fef 001c lea %sp@(28),%sp 4f17c: 4a80 tstl %d0 4f17e: 6b00 054a bmiw 4f6ca <msdos_format+0x98c>
ret_val = -1;
}
if (ret_val == 0) {
if (0 > read(fd,buffer,sector_size)) {
4f182: 2f03 movel %d3,%sp@-
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"read MRB sector\n");
ret_val = msdos_format_read_sec(fd,
0,
fmt_params.bytes_per_sector,
tmp_sec);
4f184: 4bee fd62 lea %fp@(-670),%a5
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
ret_val = -1;
}
if (ret_val == 0) {
if (0 > read(fd,buffer,sector_size)) {
4f188: 2f0d movel %a5,%sp@- 4f18a: 2f02 movel %d2,%sp@- 4f18c: 4eb9 0004 7d20 jsr 47d20 <read> 4f192: 4fef 000c lea %sp@(12),%sp 4f196: 4a80 tstl %d0 4f198: 6d00 0530 bltw 4f6ca <msdos_format+0x98c>
ret_val = msdos_format_read_sec(fd,
0,
fmt_params.bytes_per_sector,
tmp_sec);
if (ret_val == 0) {
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
4f19c: 4879 0006 d86c pea 6d86c <_CPU_m68k_BFFFO_table+0x208> 4f1a2: 4878 0002 pea 2 <DOUBLE_FLOAT> 4f1a6: 2f0a movel %a2,%sp@- 4f1a8: 4eba f916 jsr %pc@(4eac0 <msdos_format_printf>)
{
uint32_t total_sectors_num16 = 0;
uint32_t total_sectors_num32 = 0;
/* store total sector count in either 16 or 32 bit field in mbr */
if (fmt_params->totl_sector_cnt < 0x10000) {
4f1ac: 202e ff66 movel %fp@(-154),%d0 4f1b0: 4fef 000c lea %sp@(12),%sp 4f1b4: 2200 movel %d0,%d1 4f1b6: 0c80 0000 ffff cmpil #65535,%d0 4f1bc: 6200 05a8 bhiw 4f766 <msdos_format+0xa28> 4f1c0: e089 lsrl #8,%d1 4f1c2: 4204 clrb %d4 4f1c4: 4205 clrb %d5 4f1c6: 4207 clrb %d7 4f1c8: 1d41 fd5b moveb %d1,%fp@(-677) 4f1cc: 1d40 fd5c moveb %d0,%fp@(-676) 4f1d0: 1d44 fd51 moveb %d4,%fp@(-687) 4f1d4: 1d45 fd55 moveb %d5,%fp@(-683) 4f1d8: 1d47 fd57 moveb %d7,%fp@(-681)
* finally we are there: let's fill in the values into the MBR * but first clear the MRB leaving the partition table. */ #define RTEMS_IDE_PARTITION_TABLE_OFFSET 0x1be #define RTEMS_IDE_PARTITION_TABLE_SIZE (4 * 16) memset(mbr,0,RTEMS_IDE_PARTITION_TABLE_OFFSET);
4f1dc: 4878 01be pea 1be <DBL_MANT_DIG+0x189>
* fill OEMName */ memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr), fmt_params->OEMName, FAT_BR_OEMNAME_SIZE); FAT_SET_BR_BYTES_PER_SECTOR(mbr , fmt_params->bytes_per_sector);
4f1e0: 2e03 movel %d3,%d7 4f1e2: e08f lsrl #8,%d7
* finally we are there: let's fill in the values into the MBR * but first clear the MRB leaving the partition table. */ #define RTEMS_IDE_PARTITION_TABLE_OFFSET 0x1be #define RTEMS_IDE_PARTITION_TABLE_SIZE (4 * 16) memset(mbr,0,RTEMS_IDE_PARTITION_TABLE_OFFSET);
4f1e4: 42a7 clrl %sp@- 4f1e6: 2f0d movel %a5,%sp@- 4f1e8: 4eb9 0005 e310 jsr 5e310 <memset>
* with 0xEB,.... */ /* * fill OEMName */ memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr),
4f1ee: 2b6e ff99 0007 movel %fp@(-103),%a5@(7)
FAT_SET_BR_SECTORS_PER_TRACK(mbr , 255); /* only needed for INT13... */
FAT_SET_BR_NUMBER_OF_HEADS(mbr , 6); /* only needed for INT13... */
FAT_SET_BR_HIDDEN_SECTORS(mbr , 1); /* only needed for INT13... */
FAT_SET_BR_TOTAL_SECTORS_NUM32(mbr , total_sectors_num32);
if (fmt_params->fattype != FAT_FAT32) {
4f1f4: 4281 clrl %d1 4f1f6: 122e ff94 moveb %fp@(-108),%d1
* with 0xEB,.... */ /* * fill OEMName */ memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr),
4f1fa: 41ed 0003 lea %a5@(3),%a0
FAT_SET_BR_SECTORS_PER_TRACK(mbr , 255); /* only needed for INT13... */
FAT_SET_BR_NUMBER_OF_HEADS(mbr , 6); /* only needed for INT13... */
FAT_SET_BR_HIDDEN_SECTORS(mbr , 1); /* only needed for INT13... */
FAT_SET_BR_TOTAL_SECTORS_NUM32(mbr , total_sectors_num32);
if (fmt_params->fattype != FAT_FAT32) {
4f1fe: 2241 moveal %d1,%a1 4f200: 4fef 000c lea %sp@(12),%sp
* with 0xEB,.... */ /* * fill OEMName */ memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr),
4f204: 20ae ff95 movel %fp@(-107),%a0@
FAT_SET_BR_SECTORS_PER_CLUSTER(mbr , fmt_params->sectors_per_cluster);
FAT_SET_BR_RESERVED_SECTORS_NUM(mbr, fmt_params->rsvd_sector_cnt);
/* number of FATs on medium */
FAT_SET_BR_FAT_NUM(mbr , 2); /* standard/recommended value */
FAT_SET_BR_FILES_PER_ROOT_DIR(mbr , fmt_params->files_per_root_dir);
4f208: 202e ff7a movel %fp@(-134),%d0 4f20c: 2a00 movel %d0,%d5 4f20e: e08d lsrl #8,%d5
* but first clear the MRB leaving the partition table. */ #define RTEMS_IDE_PARTITION_TABLE_OFFSET 0x1be #define RTEMS_IDE_PARTITION_TABLE_SIZE (4 * 16) memset(mbr,0,RTEMS_IDE_PARTITION_TABLE_OFFSET); memset(mbr + RTEMS_IDE_PARTITION_TABLE_OFFSET + RTEMS_IDE_PARTITION_TABLE_SIZE,
4f210: 4241 clrw %d1
* fill OEMName */ memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr), fmt_params->OEMName, FAT_BR_OEMNAME_SIZE); FAT_SET_BR_BYTES_PER_SECTOR(mbr , fmt_params->bytes_per_sector);
4f212: 1d47 fd6e moveb %d7,%fp@(-658)
FAT_SET_BR_SECTORS_PER_CLUSTER(mbr , fmt_params->sectors_per_cluster); FAT_SET_BR_RESERVED_SECTORS_NUM(mbr, fmt_params->rsvd_sector_cnt);
4f216: 1e2e ff6d moveb %fp@(-147),%d7
* but first clear the MRB leaving the partition table. */ #define RTEMS_IDE_PARTITION_TABLE_OFFSET 0x1be #define RTEMS_IDE_PARTITION_TABLE_SIZE (4 * 16) memset(mbr,0,RTEMS_IDE_PARTITION_TABLE_OFFSET); memset(mbr + RTEMS_IDE_PARTITION_TABLE_OFFSET + RTEMS_IDE_PARTITION_TABLE_SIZE,
4f21a: 3d41 ff60 movew %d1,%fp@(-160)
memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr), fmt_params->OEMName, FAT_BR_OEMNAME_SIZE); FAT_SET_BR_BYTES_PER_SECTOR(mbr , fmt_params->bytes_per_sector); FAT_SET_BR_SECTORS_PER_CLUSTER(mbr , fmt_params->sectors_per_cluster); FAT_SET_BR_RESERVED_SECTORS_NUM(mbr, fmt_params->rsvd_sector_cnt);
4f21e: 2c2e ff6a movel %fp@(-150),%d6 4f222: e08e lsrl #8,%d6
/* number of FATs on medium */
FAT_SET_BR_FAT_NUM(mbr , 2); /* standard/recommended value */
4f224: 7202 moveq #2,%d1
memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr), fmt_params->OEMName, FAT_BR_OEMNAME_SIZE); FAT_SET_BR_BYTES_PER_SECTOR(mbr , fmt_params->bytes_per_sector); FAT_SET_BR_SECTORS_PER_CLUSTER(mbr , fmt_params->sectors_per_cluster); FAT_SET_BR_RESERVED_SECTORS_NUM(mbr, fmt_params->rsvd_sector_cnt);
4f226: 1d47 fd70 moveb %d7,%fp@(-656)
/* number of FATs on medium */
FAT_SET_BR_FAT_NUM(mbr , 2); /* standard/recommended value */
4f22a: 1d41 fd72 moveb %d1,%fp@(-654)
FAT_SET_BR_FILES_PER_ROOT_DIR(mbr , fmt_params->files_per_root_dir);
4f22e: 1d45 fd74 moveb %d5,%fp@(-652)
FAT_SET_BR_TOTAL_SECTORS_NUM16(mbr , total_sectors_num16);
4f232: 1a2e fd5c moveb %fp@(-676),%d5 4f236: 1e2e fd5b moveb %fp@(-677),%d7
FAT_SET_BR_MEDIA(mbr , fmt_params->media_code);
FAT_SET_BR_SECTORS_PER_TRACK(mbr , 255); /* only needed for INT13... */
FAT_SET_BR_NUMBER_OF_HEADS(mbr , 6); /* only needed for INT13... */
4f23a: 7206 moveq #6,%d1
FAT_SET_BR_SECTORS_PER_CLUSTER(mbr , fmt_params->sectors_per_cluster);
FAT_SET_BR_RESERVED_SECTORS_NUM(mbr, fmt_params->rsvd_sector_cnt);
/* number of FATs on medium */
FAT_SET_BR_FAT_NUM(mbr , 2); /* standard/recommended value */
FAT_SET_BR_FILES_PER_ROOT_DIR(mbr , fmt_params->files_per_root_dir);
4f23c: 1d40 fd73 moveb %d0,%fp@(-653)
FAT_SET_BR_TOTAL_SECTORS_NUM16(mbr , total_sectors_num16);
4f240: 1d45 fd75 moveb %d5,%fp@(-651) 4f244: 1d47 fd76 moveb %d7,%fp@(-650)
FAT_SET_BR_MEDIA(mbr , fmt_params->media_code);
FAT_SET_BR_SECTORS_PER_TRACK(mbr , 255); /* only needed for INT13... */
FAT_SET_BR_NUMBER_OF_HEADS(mbr , 6); /* only needed for INT13... */
4f248: 1d41 fd7c moveb %d1,%fp@(-644)
FAT_SET_BR_HIDDEN_SECTORS(mbr , 1); /* only needed for INT13... */
4f24c: 7a01 moveq #1,%d5
FAT_SET_BR_TOTAL_SECTORS_NUM32(mbr , total_sectors_num32);
4f24e: 1e2e fd57 moveb %fp@(-681),%d7 4f252: 1d44 fd83 moveb %d4,%fp@(-637) 4f256: 122e fd55 moveb %fp@(-683),%d1
FAT_SET_BR_FAT_NUM(mbr , 2); /* standard/recommended value */
FAT_SET_BR_FILES_PER_ROOT_DIR(mbr , fmt_params->files_per_root_dir);
FAT_SET_BR_TOTAL_SECTORS_NUM16(mbr , total_sectors_num16);
FAT_SET_BR_MEDIA(mbr , fmt_params->media_code);
FAT_SET_BR_SECTORS_PER_TRACK(mbr , 255); /* only needed for INT13... */
4f25a: 50c0 st %d0
FAT_SET_BR_NUMBER_OF_HEADS(mbr , 6); /* only needed for INT13... */
FAT_SET_BR_HIDDEN_SECTORS(mbr , 1); /* only needed for INT13... */
FAT_SET_BR_TOTAL_SECTORS_NUM32(mbr , total_sectors_num32);
4f25c: 182e fd51 moveb %fp@(-687),%d4
FAT_SET_BR_TOTAL_SECTORS_NUM16(mbr , total_sectors_num16);
FAT_SET_BR_MEDIA(mbr , fmt_params->media_code);
FAT_SET_BR_SECTORS_PER_TRACK(mbr , 255); /* only needed for INT13... */
FAT_SET_BR_NUMBER_OF_HEADS(mbr , 6); /* only needed for INT13... */
FAT_SET_BR_HIDDEN_SECTORS(mbr , 1); /* only needed for INT13... */
4f260: 1d45 fd7e moveb %d5,%fp@(-642)
FAT_SET_BR_TOTAL_SECTORS_NUM32(mbr , total_sectors_num32);
if (fmt_params->fattype != FAT_FAT32) {
4f264: 7a04 moveq #4,%d5
* fill OEMName */ memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr), fmt_params->OEMName, FAT_BR_OEMNAME_SIZE); FAT_SET_BR_BYTES_PER_SECTOR(mbr , fmt_params->bytes_per_sector);
4f266: 1d43 fd6d moveb %d3,%fp@(-659)
FAT_SET_BR_SECTORS_PER_CLUSTER(mbr , fmt_params->sectors_per_cluster);
4f26a: 1d6e ff71 fd6f moveb %fp@(-143),%fp@(-657)
FAT_SET_BR_RESERVED_SECTORS_NUM(mbr, fmt_params->rsvd_sector_cnt);
4f270: 1d46 fd71 moveb %d6,%fp@(-655)
/* number of FATs on medium */
FAT_SET_BR_FAT_NUM(mbr , 2); /* standard/recommended value */
FAT_SET_BR_FILES_PER_ROOT_DIR(mbr , fmt_params->files_per_root_dir);
FAT_SET_BR_TOTAL_SECTORS_NUM16(mbr , total_sectors_num16);
FAT_SET_BR_MEDIA(mbr , fmt_params->media_code);
4f274: 1d6e ff93 fd77 moveb %fp@(-109),%fp@(-649)
FAT_SET_BR_SECTORS_PER_TRACK(mbr , 255); /* only needed for INT13... */
4f27a: 1d40 fd7a moveb %d0,%fp@(-646)
FAT_SET_BR_NUMBER_OF_HEADS(mbr , 6); /* only needed for INT13... */
FAT_SET_BR_HIDDEN_SECTORS(mbr , 1); /* only needed for INT13... */
FAT_SET_BR_TOTAL_SECTORS_NUM32(mbr , total_sectors_num32);
4f27e: 1d47 fd82 moveb %d7,%fp@(-638) 4f282: 1d41 fd84 moveb %d1,%fp@(-636) 4f286: 1d44 fd85 moveb %d4,%fp@(-635)
if (fmt_params->fattype != FAT_FAT32) {
4f28a: ba89 cmpl %a1,%d5 4f28c: 6700 05d0 beqw 4f85e <msdos_format+0xb20>
FAT_SET_BR_SECTORS_PER_FAT(mbr ,fmt_params->sectors_per_fat);
FAT_SET_BR_DRVNUM(mbr , 0); /* only needed for INT13... */
FAT_SET_BR_RSVD1(mbr , 0); /* fill with zero */
FAT_SET_BR_BOOTSIG(mbr , FAT_BR_BOOTSIG_VAL);
FAT_SET_BR_VOLID(mbr , fmt_params->vol_id); /* volume id */
4f290: 202e ffac movel %fp@(-84),%d0 4f294: 7e18 moveq #24,%d7 4f296: 2800 movel %d0,%d4 4f298: eeac lsrl %d7,%d4 4f29a: 2a00 movel %d0,%d5 4f29c: 2c00 movel %d0,%d6 4f29e: e08e lsrl #8,%d6
memcpy(FAT_GET_ADDR_BR_VOLLAB(mbr),
fmt_params->VolLabel,
FAT_BR_VOLLAB_SIZE);
memcpy(FAT_GET_ADDR_BR_FILSYSTYPE(mbr),
4f2a0: 41f9 0006 d795 lea 6d795 <_CPU_m68k_BFFFO_table+0x131>,%a0
FAT_SET_BR_NUMBER_OF_HEADS(mbr , 6); /* only needed for INT13... */
FAT_SET_BR_HIDDEN_SECTORS(mbr , 1); /* only needed for INT13... */
FAT_SET_BR_TOTAL_SECTORS_NUM32(mbr , total_sectors_num32);
if (fmt_params->fattype != FAT_FAT32) {
FAT_SET_BR_SECTORS_PER_FAT(mbr ,fmt_params->sectors_per_fat);
4f2a6: 222e ff72 movel %fp@(-142),%d1 4f2aa: 2e01 movel %d1,%d7 4f2ac: e08f lsrl #8,%d7 4f2ae: 1d41 fd78 moveb %d1,%fp@(-648)
FAT_SET_BR_DRVNUM(mbr , 0); /* only needed for INT13... */
FAT_SET_BR_RSVD1(mbr , 0); /* fill with zero */
FAT_SET_BR_BOOTSIG(mbr , FAT_BR_BOOTSIG_VAL);
FAT_SET_BR_VOLID(mbr , fmt_params->vol_id); /* volume id */
4f2b2: 4245 clrw %d5 4f2b4: 4845 swap %d5
FAT_SET_BR_TOTAL_SECTORS_NUM32(mbr , total_sectors_num32);
if (fmt_params->fattype != FAT_FAT32) {
FAT_SET_BR_SECTORS_PER_FAT(mbr ,fmt_params->sectors_per_fat);
FAT_SET_BR_DRVNUM(mbr , 0); /* only needed for INT13... */
FAT_SET_BR_RSVD1(mbr , 0); /* fill with zero */
FAT_SET_BR_BOOTSIG(mbr , FAT_BR_BOOTSIG_VAL);
4f2b6: 7229 moveq #41,%d1
FAT_SET_BR_VOLID(mbr , fmt_params->vol_id); /* volume id */
4f2b8: 1d44 fd8c moveb %d4,%fp@(-628)
memcpy(FAT_GET_ADDR_BR_VOLLAB(mbr),
fmt_params->VolLabel,
FAT_BR_VOLLAB_SIZE);
memcpy(FAT_GET_ADDR_BR_FILSYSTYPE(mbr),
4f2bc: 7801 moveq #1,%d4
FAT_SET_BR_NUMBER_OF_HEADS(mbr , 6); /* only needed for INT13... */
FAT_SET_BR_HIDDEN_SECTORS(mbr , 1); /* only needed for INT13... */
FAT_SET_BR_TOTAL_SECTORS_NUM32(mbr , total_sectors_num32);
if (fmt_params->fattype != FAT_FAT32) {
FAT_SET_BR_SECTORS_PER_FAT(mbr ,fmt_params->sectors_per_fat);
4f2be: 1d47 fd79 moveb %d7,%fp@(-647)
FAT_SET_BR_DRVNUM(mbr , 0); /* only needed for INT13... */
FAT_SET_BR_RSVD1(mbr , 0); /* fill with zero */
FAT_SET_BR_BOOTSIG(mbr , FAT_BR_BOOTSIG_VAL);
4f2c2: 1d41 fd88 moveb %d1,%fp@(-632)
FAT_SET_BR_VOLID(mbr , fmt_params->vol_id); /* volume id */
memcpy(FAT_GET_ADDR_BR_VOLLAB(mbr),
4f2c6: 2b6e ff9e 002b movel %fp@(-98),%a5@(43) 4f2cc: 2b6e ffa2 002f movel %fp@(-94),%a5@(47)
if (fmt_params->fattype != FAT_FAT32) {
FAT_SET_BR_SECTORS_PER_FAT(mbr ,fmt_params->sectors_per_fat);
FAT_SET_BR_DRVNUM(mbr , 0); /* only needed for INT13... */
FAT_SET_BR_RSVD1(mbr , 0); /* fill with zero */
FAT_SET_BR_BOOTSIG(mbr , FAT_BR_BOOTSIG_VAL);
FAT_SET_BR_VOLID(mbr , fmt_params->vol_id); /* volume id */
4f2d2: 1d40 fd89 moveb %d0,%fp@(-631) 4f2d6: 1d46 fd8a moveb %d6,%fp@(-630) 4f2da: 1d45 fd8b moveb %d5,%fp@(-629)
memcpy(FAT_GET_ADDR_BR_VOLLAB(mbr),
4f2de: 3b6e ffa6 0033 movew %fp@(-90),%a5@(51) 4f2e4: 1b6e ffa8 0035 moveb %fp@(-88),%a5@(53)
fmt_params->VolLabel,
FAT_BR_VOLLAB_SIZE);
memcpy(FAT_GET_ADDR_BR_FILSYSTYPE(mbr),
4f2ea: b889 cmpl %a1,%d4 4f2ec: 6700 0290 beqw 4f57e <msdos_format+0x840>
4f2f0: 43ed 0036 lea %a5@(54),%a1 <== NOT EXECUTED 4f2f4: 2290 movel %a0@,%a1@ <== NOT EXECUTED 4f2f6: 2b68 0004 003a movel %a0@(4),%a5@(58) <== NOT EXECUTED
/*
* write master boot record to disk
* also write copy of MBR to disk
*/
if (ret_val == 0) {
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
4f2fc: 4879 0006 d808 pea 6d808 <_CPU_m68k_BFFFO_table+0x1a4>
"write MRB sector\n");
ret_val = msdos_format_write_sec(fd,
4f302: 2e3c 0004 eb0a movel #322314,%d7
/*
* write master boot record to disk
* also write copy of MBR to disk
*/
if (ret_val == 0) {
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
4f308: 4878 0002 pea 2 <DOUBLE_FLOAT>
FAT_BR_FILSYSTYPE_SIZE); } /* * add boot record signature */ FAT_SET_BR_SIGNATURE(mbr, FAT_BR_SIGNATURE_VAL);
4f30c: 7055 moveq #85,%d0 4f30e: 72aa moveq #-86,%d1
/*
* add jump to boot loader at start of sector
*/
FAT_SET_VAL8(mbr,0,0xeb);
4f310: 78eb moveq #-21,%d4
/*
* write master boot record to disk
* also write copy of MBR to disk
*/
if (ret_val == 0) {
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
4f312: 2f0a movel %a2,%sp@-
FAT_BR_FILSYSTYPE_SIZE); } /* * add boot record signature */ FAT_SET_BR_SIGNATURE(mbr, FAT_BR_SIGNATURE_VAL);
4f314: 1d40 ff60 moveb %d0,%fp@(-160)
/* * add jump to boot loader at start of sector */ FAT_SET_VAL8(mbr,0,0xeb); FAT_SET_VAL8(mbr,1,0x3c); FAT_SET_VAL8(mbr,2,0x90);
4f318: 7090 moveq #-112,%d0
/*
* add jump to boot loader at start of sector
*/
FAT_SET_VAL8(mbr,0,0xeb);
FAT_SET_VAL8(mbr,1,0x3c);
4f31a: 7a3c moveq #60,%d5
FAT_BR_FILSYSTYPE_SIZE); } /* * add boot record signature */ FAT_SET_BR_SIGNATURE(mbr, FAT_BR_SIGNATURE_VAL);
4f31c: 1d41 ff61 moveb %d1,%fp@(-159)
/*
* add jump to boot loader at start of sector
*/
FAT_SET_VAL8(mbr,0,0xeb);
4f320: 1d44 fd62 moveb %d4,%fp@(-670)
FAT_SET_VAL8(mbr,1,0x3c); FAT_SET_VAL8(mbr,2,0x90);
4f324: 1d40 fd64 moveb %d0,%fp@(-668)
/*
* add jump to boot loader at start of sector
*/
FAT_SET_VAL8(mbr,0,0xeb);
FAT_SET_VAL8(mbr,1,0x3c);
4f328: 1d45 fd63 moveb %d5,%fp@(-669)
/*
* write master boot record to disk
* also write copy of MBR to disk
*/
if (ret_val == 0) {
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
4f32c: 4e93 jsr %a3@
"write MRB sector\n");
ret_val = msdos_format_write_sec(fd,
4f32e: 2047 moveal %d7,%a0 4f330: 2f0d movel %a5,%sp@- 4f332: 2f03 movel %d3,%sp@- 4f334: 42a7 clrl %sp@- 4f336: 2f02 movel %d2,%sp@- 4f338: 4e90 jsr %a0@
0,
fmt_params.bytes_per_sector,
tmp_sec);
}
if ((ret_val == 0) &&
4f33a: 4fef 001c lea %sp@(28),%sp
* also write copy of MBR to disk
*/
if (ret_val == 0) {
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"write MRB sector\n");
ret_val = msdos_format_write_sec(fd,
4f33e: 2800 movel %d0,%d4
0,
fmt_params.bytes_per_sector,
tmp_sec);
}
if ((ret_val == 0) &&
4f340: 6600 fa92 bnew 4edd4 <msdos_format+0x96>
(fmt_params.mbr_copy_sec != 0)) {
4f344: 282e ff8a movel %fp@(-118),%d4
ret_val = msdos_format_write_sec(fd,
0,
fmt_params.bytes_per_sector,
tmp_sec);
}
if ((ret_val == 0) &&
4f348: 6600 01d6 bnew 4f520 <msdos_format+0x7e2>
}
/*
* for FAT32: initialize info sector on disk
*/
if ((ret_val == 0) &&
(fmt_params.fsinfo_sec != 0)) {
4f34c: 282e ff8e movel %fp@(-114),%d4
}
}
/*
* for FAT32: initialize info sector on disk
*/
if ((ret_val == 0) &&
4f350: 6600 0148 bnew 4f49a <msdos_format+0x75c>
* write FAT as all empty
* -> write all FAT sectors as zero
*/
if (ret_val == 0) {
ret_val = msdos_format_fill_sectors
(rqdata,
4f354: 4286 clrl %d6 4f356: 1c2e ff92 moveb %fp@(-110),%d6
/*
* write FAT as all empty
* -> write all FAT sectors as zero
*/
if (ret_val == 0) {
ret_val = msdos_format_fill_sectors
4f35a: 47fa f81e lea %pc@(4eb7a <msdos_format_fill_sectors>),%a3 4f35e: 42a7 clrl %sp@- 4f360: 202e ff72 movel %fp@(-142),%d0 4f364: 4c06 0800 mulsl %d6,%d0 4f368: 2f03 movel %d3,%sp@- 4f36a: 2f00 movel %d0,%sp@- 4f36c: 2f2e ff6a movel %fp@(-150),%sp@- 4f370: 2f02 movel %d2,%sp@- 4f372: 2f0a movel %a2,%sp@- 4f374: 4e93 jsr %a3@
}
/*
* clear/init root directory
* -> write all directory sectors as 0x00
*/
if (ret_val == 0) {
4f376: 4fef 0018 lea %sp@(24),%sp
/*
* write FAT as all empty
* -> write all FAT sectors as zero
*/
if (ret_val == 0) {
ret_val = msdos_format_fill_sectors
4f37a: 2800 movel %d0,%d4
}
/*
* clear/init root directory
* -> write all directory sectors as 0x00
*/
if (ret_val == 0) {
4f37c: 6600 fa56 bnew 4edd4 <msdos_format+0x96>
ret_val = msdos_format_fill_sectors
4f380: 42a7 clrl %sp@-
(rqdata,
4f382: 2a2e ff82 movel %fp@(-126),%d5
/*
* clear/init root directory
* -> write all directory sectors as 0x00
*/
if (ret_val == 0) {
ret_val = msdos_format_fill_sectors
4f386: 2f03 movel %d3,%sp@- 4f388: 2f2e ff86 movel %fp@(-122),%sp@- 4f38c: 2f05 movel %d5,%sp@- 4f38e: 2f02 movel %d2,%sp@- 4f390: 2f0a movel %a2,%sp@- 4f392: 4e93 jsr %a3@
0x00);
}
/*
* write volume label to first entry of directory
*/
if ((ret_val == 0) && fmt_params.VolLabel_present) {
4f394: 4fef 0018 lea %sp@(24),%sp
/*
* clear/init root directory
* -> write all directory sectors as 0x00
*/
if (ret_val == 0) {
ret_val = msdos_format_fill_sectors
4f398: 2800 movel %d0,%d4
0x00);
}
/*
* write volume label to first entry of directory
*/
if ((ret_val == 0) && fmt_params.VolLabel_present) {
4f39a: 6600 fca6 bnew 4f042 <msdos_format+0x304> 4f39e: 4a2e ffaa tstb %fp@(-86) 4f3a2: 6700 fc9e beqw 4f042 <msdos_format+0x304>
memset(tmp_sec,0,sizeof(tmp_sec));
4f3a6: 4878 0200 pea 200 <DBL_MANT_DIG+0x1cb> 4f3aa: 42a7 clrl %sp@- 4f3ac: 2f0d movel %a5,%sp@- 4f3ae: 4eb9 0005 e310 jsr 5e310 <memset>
memcpy(MSDOS_DIR_NAME(tmp_sec),fmt_params.VolLabel,MSDOS_SHORT_NAME_LEN);
4f3b4: 204d moveal %a5,%a0 4f3b6: 20ee ff9e movel %fp@(-98),%a0@+ 4f3ba: 20ee ffa2 movel %fp@(-94),%a0@+ 4f3be: 30ee ffa6 movew %fp@(-90),%a0@+
*MSDOS_DIR_ATTR(tmp_sec) = MSDOS_ATTR_VOLUME_ID;
4f3c2: 7208 moveq #8,%d1
/*
* write volume label to first entry of directory
*/
if ((ret_val == 0) && fmt_params.VolLabel_present) {
memset(tmp_sec,0,sizeof(tmp_sec));
memcpy(MSDOS_DIR_NAME(tmp_sec),fmt_params.VolLabel,MSDOS_SHORT_NAME_LEN);
4f3c4: 10ae ffa8 moveb %fp@(-88),%a0@
*MSDOS_DIR_ATTR(tmp_sec) = MSDOS_ATTR_VOLUME_ID;
4f3c8: 1d41 fd6d moveb %d1,%fp@(-659)
ret_val = msdos_format_write_sec
4f3cc: 2f0d movel %a5,%sp@- 4f3ce: 2047 moveal %d7,%a0 4f3d0: 2f03 movel %d3,%sp@- 4f3d2: 2f05 movel %d5,%sp@- 4f3d4: 2f02 movel %d2,%sp@- 4f3d6: 4e90 jsr %a0@
/*
* write FAT entry 0 as (0xffffff00|Media_type)EOC,
* write FAT entry 1 as EOC
* allocate directory in a FAT32 FS
*/
if ((ret_val == 0) && fmt_params.VolLabel_present){
4f3d8: 4fef 001c lea %sp@(28),%sp
*/
if ((ret_val == 0) && fmt_params.VolLabel_present) {
memset(tmp_sec,0,sizeof(tmp_sec));
memcpy(MSDOS_DIR_NAME(tmp_sec),fmt_params.VolLabel,MSDOS_SHORT_NAME_LEN);
*MSDOS_DIR_ATTR(tmp_sec) = MSDOS_ATTR_VOLUME_ID;
ret_val = msdos_format_write_sec
4f3dc: 2800 movel %d0,%d4
/*
* write FAT entry 0 as (0xffffff00|Media_type)EOC,
* write FAT entry 1 as EOC
* allocate directory in a FAT32 FS
*/
if ((ret_val == 0) && fmt_params.VolLabel_present){
4f3de: 6600 fc62 bnew 4f042 <msdos_format+0x304>
/*
* empty sector: all clusters are free/do not link further on
*/
memset(tmp_sec,0,sizeof(tmp_sec));
4f3e2: 4878 0200 pea 200 <DBL_MANT_DIG+0x1cb>
switch(fmt_params.fattype) {
4f3e6: 4283 clrl %d3
*/
if ((ret_val == 0) && fmt_params.VolLabel_present){
/*
* empty sector: all clusters are free/do not link further on
*/
memset(tmp_sec,0,sizeof(tmp_sec));
4f3e8: 42a7 clrl %sp@- 4f3ea: 2f0d movel %a5,%sp@- 4f3ec: 4eb9 0005 e310 jsr 5e310 <memset>
switch(fmt_params.fattype) {
4f3f2: 4fef 000c lea %sp@(12),%sp 4f3f6: 162e ff94 moveb %fp@(-108),%d3 4f3fa: 7002 moveq #2,%d0 4f3fc: b083 cmpl %d3,%d0 4f3fe: 6700 03b4 beqw 4f7b4 <msdos_format+0xa76> 4f402: 7204 moveq #4,%d1 4f404: b283 cmpl %d3,%d1 4f406: 6700 018c beqw 4f594 <msdos_format+0x856> 4f40a: 7a01 moveq #1,%d5 4f40c: ba83 cmpl %d3,%d5 4f40e: 6700 03be beqw 4f7ce <msdos_format+0xa90>
FAT_SET_VAL32(tmp_sec,4,FAT_FAT32_EOC);
break;
default:
ret_val = -1;
errno = EINVAL;
4f412: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 4f418: 7816 moveq #22,%d4 <== NOT EXECUTED 4f41a: 2040 moveal %d0,%a0 <== NOT EXECUTED
}
if (fmt_params.fattype == FAT_FAT32) {
4f41c: 7004 moveq #4,%d0 <== NOT EXECUTED
FAT_SET_VAL32(tmp_sec,4,FAT_FAT32_EOC);
break;
default:
ret_val = -1;
errno = EINVAL;
4f41e: 2084 movel %d4,%a0@ <== NOT EXECUTED
/* FAT entry 1: EOC */
FAT_SET_VAL32(tmp_sec,4,FAT_FAT32_EOC);
break;
default:
ret_val = -1;
4f420: 78ff moveq #-1,%d4 <== NOT EXECUTED
errno = EINVAL;
}
if (fmt_params.fattype == FAT_FAT32) {
4f422: b083 cmpl %d3,%d0 <== NOT EXECUTED 4f424: 6700 0196 beqw 4f5bc <msdos_format+0x87e> <== NOT EXECUTED
* to root directory, and is end of chain
* mark this in every copy of the FAT
*/
FAT_SET_VAL32(tmp_sec,8,FAT_FAT32_EOC);
}
for (i = 0;
4f428: 4a86 tstl %d6 4f42a: 6700 fc16 beqw 4f042 <msdos_format+0x304>
(i < fmt_params.fat_num) && (ret_val == 0);
4f42e: 4a84 tstl %d4 4f430: 6600 fc0e bnew 4f040 <msdos_format+0x302> 4f434: 266e ff62 moveal %fp@(-158),%a3 4f438: 4285 clrl %d5 4f43a: 262e ff6a movel %fp@(-150),%d3 4f43e: 246e ff72 moveal %fp@(-142),%a2
i++) {
ret_val = msdos_format_write_sec
4f442: 2f0d movel %a5,%sp@- 4f444: 2047 moveal %d7,%a0
*/
FAT_SET_VAL32(tmp_sec,8,FAT_FAT32_EOC);
}
for (i = 0;
(i < fmt_params.fat_num) && (ret_val == 0);
i++) {
4f446: 5285 addql #1,%d5
ret_val = msdos_format_write_sec
4f448: 2f0b movel %a3,%sp@- 4f44a: 2f03 movel %d3,%sp@-
* to root directory, and is end of chain
* mark this in every copy of the FAT
*/
FAT_SET_VAL32(tmp_sec,8,FAT_FAT32_EOC);
}
for (i = 0;
4f44c: d68a addl %a2,%d3
(i < fmt_params.fat_num) && (ret_val == 0);
i++) {
ret_val = msdos_format_write_sec
4f44e: 2f02 movel %d2,%sp@- 4f450: 4e90 jsr %a0@
* to root directory, and is end of chain
* mark this in every copy of the FAT
*/
FAT_SET_VAL32(tmp_sec,8,FAT_FAT32_EOC);
}
for (i = 0;
4f452: 4fef 0010 lea %sp@(16),%sp 4f456: ba86 cmpl %d6,%d5
4f458: 6c04 bges 4f45e <msdos_format+0x720> (i < fmt_params.fat_num) && (ret_val == 0);
4f45a: 4a80 tstl %d0
4f45c: 67e4 beqs 4f442 <msdos_format+0x704> <== ALWAYS TAKEN
* cleanup:
* sync and unlock disk
* free any data structures (not needed now)
*/
if (fd != -1) {
close(fd);
4f45e: 2f02 movel %d2,%sp@- 4f460: 2800 movel %d0,%d4 4f462: 4eb9 0004 6290 jsr 46290 <close> 4f468: 588f addql #4,%sp 4f46a: 6000 f970 braw 4eddc <msdos_format+0x9e>
* if requested, write whole disk/partition with 0xe5
*/
if ((ret_val == 0) &&
(rqdata != NULL) &&
!(rqdata->quick_format)) {
ret_val = msdos_format_fill_sectors
4f46e: 4878 ffe5 pea ffffffe5 <DBL_MIN_EXP+0x3e2> 4f472: 2f2e ff62 movel %fp@(-158),%sp@- 4f476: 2f2e ff66 movel %fp@(-154),%sp@- 4f47a: 42a7 clrl %sp@- 4f47c: 2f02 movel %d2,%sp@- 4f47e: 2f0a movel %a2,%sp@- 4f480: 4eba f6f8 jsr %pc@(4eb7a <msdos_format_fill_sectors>)
}
/*
* create master boot record
*/
if (ret_val == 0) {
4f484: 4fef 0018 lea %sp@(24),%sp
* if requested, write whole disk/partition with 0xe5
*/
if ((ret_val == 0) &&
(rqdata != NULL) &&
!(rqdata->quick_format)) {
ret_val = msdos_format_fill_sectors
4f488: 2800 movel %d0,%d4
}
/*
* create master boot record
*/
if (ret_val == 0) {
4f48a: 6700 fccc beqw 4f158 <msdos_format+0x41a>
/*
* cleanup:
* sync and unlock disk
* free any data structures (not needed now)
*/
if (fd != -1) {
4f48e: 70ff moveq #-1,%d0 <== NOT EXECUTED 4f490: b082 cmpl %d2,%d0 <== NOT EXECUTED 4f492: 6700 f948 beqw 4eddc <msdos_format+0x9e> <== NOT EXECUTED 4f496: 6000 fbaa braw 4f042 <msdos_format+0x304> <== NOT EXECUTED
\*=========================================================================*/
{
/*
* clear fsinfo sector data
*/
memset(fsinfo,0,FAT_TOTAL_FSINFO_SIZE);
4f49a: 4878 0200 pea 200 <DBL_MANT_DIG+0x1cb> <== NOT EXECUTED
/* * write LEADSIG, STRUCTSIG, TRAILSIG */ FAT_SET_FSINFO_LEAD_SIGNATURE (fsinfo,FAT_FSINFO_LEAD_SIGNATURE_VALUE ); FAT_SET_FSINFO_STRUC_SIGNATURE(fsinfo,FAT_FSINFO_STRUC_SIGNATURE_VALUE);
4f49e: 7a72 moveq #114,%d5 <== NOT EXECUTED
\*=========================================================================*/
{
/*
* clear fsinfo sector data
*/
memset(fsinfo,0,FAT_TOTAL_FSINFO_SIZE);
4f4a0: 42a7 clrl %sp@- <== NOT EXECUTED 4f4a2: 2f0d movel %a5,%sp@- <== NOT EXECUTED 4f4a4: 4eb9 0005 e310 jsr 5e310 <memset> <== NOT EXECUTED
/* * write LEADSIG, STRUCTSIG, TRAILSIG */ FAT_SET_FSINFO_LEAD_SIGNATURE (fsinfo,FAT_FSINFO_LEAD_SIGNATURE_VALUE );
4f4aa: 7052 moveq #82,%d0 <== NOT EXECUTED
/*
* write fsinfo sector
*/
if ((ret_val == 0) &&
(fmt_params.fsinfo_sec != 0)) {
ret_val = msdos_format_write_sec(fd,
4f4ac: 2047 moveal %d7,%a0 <== NOT EXECUTED 4f4ae: 2f0d movel %a5,%sp@- <== NOT EXECUTED
*/ memset(fsinfo,0,FAT_TOTAL_FSINFO_SIZE); /* * write LEADSIG, STRUCTSIG, TRAILSIG */ FAT_SET_FSINFO_LEAD_SIGNATURE (fsinfo,FAT_FSINFO_LEAD_SIGNATURE_VALUE );
4f4b0: 7261 moveq #97,%d1 <== NOT EXECUTED
/*
* write fsinfo sector
*/
if ((ret_val == 0) &&
(fmt_params.fsinfo_sec != 0)) {
ret_val = msdos_format_write_sec(fd,
4f4b2: 2f03 movel %d3,%sp@- <== NOT EXECUTED
*/ memset(fsinfo,0,FAT_TOTAL_FSINFO_SIZE); /* * write LEADSIG, STRUCTSIG, TRAILSIG */ FAT_SET_FSINFO_LEAD_SIGNATURE (fsinfo,FAT_FSINFO_LEAD_SIGNATURE_VALUE );
4f4b4: 1d40 fd62 moveb %d0,%fp@(-670) <== NOT EXECUTED
/*
* write fsinfo sector
*/
if ((ret_val == 0) &&
(fmt_params.fsinfo_sec != 0)) {
ret_val = msdos_format_write_sec(fd,
4f4b8: 2f04 movel %d4,%sp@- <== NOT EXECUTED
*/ memset(fsinfo,0,FAT_TOTAL_FSINFO_SIZE); /* * write LEADSIG, STRUCTSIG, TRAILSIG */ FAT_SET_FSINFO_LEAD_SIGNATURE (fsinfo,FAT_FSINFO_LEAD_SIGNATURE_VALUE );
4f4ba: 7841 moveq #65,%d4 <== NOT EXECUTED 4f4bc: 1d40 fd63 moveb %d0,%fp@(-669) <== NOT EXECUTED 4f4c0: 1d41 fd64 moveb %d1,%fp@(-668) <== NOT EXECUTED 4f4c4: 1d44 fd65 moveb %d4,%fp@(-667) <== NOT EXECUTED
/*
* write fsinfo sector
*/
if ((ret_val == 0) &&
(fmt_params.fsinfo_sec != 0)) {
ret_val = msdos_format_write_sec(fd,
4f4c8: 2f02 movel %d2,%sp@- <== NOT EXECUTED
memset(fsinfo,0,FAT_TOTAL_FSINFO_SIZE); /* * write LEADSIG, STRUCTSIG, TRAILSIG */ FAT_SET_FSINFO_LEAD_SIGNATURE (fsinfo,FAT_FSINFO_LEAD_SIGNATURE_VALUE ); FAT_SET_FSINFO_STRUC_SIGNATURE(fsinfo,FAT_FSINFO_STRUC_SIGNATURE_VALUE);
4f4ca: 1d44 ff48 moveb %d4,%fp@(-184) <== NOT EXECUTED 4f4ce: 1d41 ff49 moveb %d1,%fp@(-183) <== NOT EXECUTED
FAT_SET_FSINFO_TRAIL_SIGNATURE(fsinfo,FAT_FSINFO_TRAIL_SIGNATURE_VALUE); /* * write "empty" values for free cluster count and next cluster number */ FAT_SET_FSINFO_FREE_CLUSTER_COUNT(fsinfo+FAT_FSI_INFO,
4f4d2: 50c4 st %d4 <== NOT EXECUTED
/* * write LEADSIG, STRUCTSIG, TRAILSIG */ FAT_SET_FSINFO_LEAD_SIGNATURE (fsinfo,FAT_FSINFO_LEAD_SIGNATURE_VALUE ); FAT_SET_FSINFO_STRUC_SIGNATURE(fsinfo,FAT_FSINFO_STRUC_SIGNATURE_VALUE); FAT_SET_FSINFO_TRAIL_SIGNATURE(fsinfo,FAT_FSINFO_TRAIL_SIGNATURE_VALUE);
4f4d4: 7055 moveq #85,%d0 <== NOT EXECUTED 4f4d6: 72aa moveq #-86,%d1 <== NOT EXECUTED
/* * write "empty" values for free cluster count and next cluster number */ FAT_SET_FSINFO_FREE_CLUSTER_COUNT(fsinfo+FAT_FSI_INFO,
4f4d8: 1d44 ff4a moveb %d4,%fp@(-182) <== NOT EXECUTED 4f4dc: 1d44 ff4b moveb %d4,%fp@(-181) <== NOT EXECUTED 4f4e0: 1d44 ff4c moveb %d4,%fp@(-180) <== NOT EXECUTED 4f4e4: 1d44 ff4d moveb %d4,%fp@(-179) <== NOT EXECUTED
0xffffffff); FAT_SET_FSINFO_NEXT_FREE_CLUSTER (fsinfo+FAT_FSI_INFO,
4f4e8: 1d44 ff4e moveb %d4,%fp@(-178) <== NOT EXECUTED 4f4ec: 1d44 ff4f moveb %d4,%fp@(-177) <== NOT EXECUTED 4f4f0: 1d44 ff50 moveb %d4,%fp@(-176) <== NOT EXECUTED 4f4f4: 1d44 ff51 moveb %d4,%fp@(-175) <== NOT EXECUTED
memset(fsinfo,0,FAT_TOTAL_FSINFO_SIZE); /* * write LEADSIG, STRUCTSIG, TRAILSIG */ FAT_SET_FSINFO_LEAD_SIGNATURE (fsinfo,FAT_FSINFO_LEAD_SIGNATURE_VALUE ); FAT_SET_FSINFO_STRUC_SIGNATURE(fsinfo,FAT_FSINFO_STRUC_SIGNATURE_VALUE);
4f4f8: 1d45 ff46 moveb %d5,%fp@(-186) <== NOT EXECUTED 4f4fc: 1d45 ff47 moveb %d5,%fp@(-185) <== NOT EXECUTED
FAT_SET_FSINFO_TRAIL_SIGNATURE(fsinfo,FAT_FSINFO_TRAIL_SIGNATURE_VALUE);
4f500: 1d40 ff60 moveb %d0,%fp@(-160) <== NOT EXECUTED 4f504: 1d41 ff61 moveb %d1,%fp@(-159) <== NOT EXECUTED
/*
* write fsinfo sector
*/
if ((ret_val == 0) &&
(fmt_params.fsinfo_sec != 0)) {
ret_val = msdos_format_write_sec(fd,
4f508: 4e90 jsr %a0@ <== NOT EXECUTED
}
/*
* write FAT as all empty
* -> write all FAT sectors as zero
*/
if (ret_val == 0) {
4f50a: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED
/*
* write fsinfo sector
*/
if ((ret_val == 0) &&
(fmt_params.fsinfo_sec != 0)) {
ret_val = msdos_format_write_sec(fd,
4f50e: 2800 movel %d0,%d4 <== NOT EXECUTED
}
/*
* write FAT as all empty
* -> write all FAT sectors as zero
*/
if (ret_val == 0) {
4f510: 6700 fe42 beqw 4f354 <msdos_format+0x616> <== NOT EXECUTED
/*
* cleanup:
* sync and unlock disk
* free any data structures (not needed now)
*/
if (fd != -1) {
4f514: 70ff moveq #-1,%d0 <== NOT EXECUTED 4f516: b082 cmpl %d2,%d0 <== NOT EXECUTED 4f518: 6700 f8c2 beqw 4eddc <msdos_format+0x9e> <== NOT EXECUTED 4f51c: 6000 fb24 braw 4f042 <msdos_format+0x304> <== NOT EXECUTED
if ((ret_val == 0) &&
(fmt_params.mbr_copy_sec != 0)) {
/*
* write copy of MBR
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
4f520: 4879 0006 d81a pea 6d81a <_CPU_m68k_BFFFO_table+0x1b6> <== NOT EXECUTED 4f526: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED 4f52a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4f52c: 4eba f592 jsr %pc@(4eac0 <msdos_format_printf>) <== NOT EXECUTED
"write back up MRB sector\n");
ret_val = msdos_format_write_sec(fd,
4f530: 2047 moveal %d7,%a0 <== NOT EXECUTED 4f532: 2f0d movel %a5,%sp@- <== NOT EXECUTED 4f534: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4f536: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4f538: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4f53a: 4e90 jsr %a0@ <== NOT EXECUTED
}
}
/*
* for FAT32: initialize info sector on disk
*/
if ((ret_val == 0) &&
4f53c: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED
/*
* write copy of MBR
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"write back up MRB sector\n");
ret_val = msdos_format_write_sec(fd,
4f540: 2800 movel %d0,%d4 <== NOT EXECUTED
}
}
/*
* for FAT32: initialize info sector on disk
*/
if ((ret_val == 0) &&
4f542: 6600 f890 bnew 4edd4 <msdos_format+0x96> <== NOT EXECUTED
(fmt_params.fsinfo_sec != 0)) {
4f546: 282e ff8e movel %fp@(-114),%d4 <== NOT EXECUTED
}
}
/*
* for FAT32: initialize info sector on disk
*/
if ((ret_val == 0) &&
4f54a: 6700 fe08 beqw 4f354 <msdos_format+0x616> <== NOT EXECUTED 4f54e: 6000 ff4a braw 4f49a <msdos_format+0x75c> <== NOT EXECUTED
if (ret_val == 0) {
const char *from;
char *to = fmt_params->OEMName;
int cnt;
from = "RTEMS"; /* default: make "from" point to OS Name */
if ((rqdata != NULL) &&
4f552: 2a79 0006 ec28 moveal 6ec28 <__ctype_ptr__>,%a5 <== NOT EXECUTED
*/
if (ret_val == 0) {
const char *from;
char *to = fmt_params->OEMName;
int cnt;
from = "RTEMS"; /* default: make "from" point to OS Name */
4f558: 43f9 0006 c8a4 lea 6c8a4 <__func__.6070+0x2cc>,%a1 <== NOT EXECUTED 4f55e: 7208 moveq #8,%d1 <== NOT EXECUTED
/*
* determine usable OEMName
*/
if (ret_val == 0) {
const char *from;
char *to = fmt_params->OEMName;
4f560: 41ee ff95 lea %fp@(-107),%a0 <== NOT EXECUTED 4f564: 6000 fb66 braw 4f0cc <msdos_format+0x38e> <== NOT EXECUTED
fmt_params->fattype = FAT_FAT32;
}
else if ((rqdata != NULL) &&
(rqdata->fattype != MSDOS_FMT_FATANY)) {
ret_val = -1;
errno = EINVAL;
4f568: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 4f56e: 7e16 moveq #22,%d7 <== NOT EXECUTED
(rqdata->fattype == MSDOS_FMT_FAT32)) {
fmt_params->fattype = FAT_FAT32;
}
else if ((rqdata != NULL) &&
(rqdata->fattype != MSDOS_FMT_FATANY)) {
ret_val = -1;
4f570: 72ff moveq #-1,%d1 <== NOT EXECUTED
errno = EINVAL;
4f572: 2040 moveal %d0,%a0 <== NOT EXECUTED
(rqdata->fattype == MSDOS_FMT_FAT32)) {
fmt_params->fattype = FAT_FAT32;
}
else if ((rqdata != NULL) &&
(rqdata->fattype != MSDOS_FMT_FATANY)) {
ret_val = -1;
4f574: 2d41 fd58 movel %d1,%fp@(-680) <== NOT EXECUTED
errno = EINVAL;
4f578: 2087 movel %d7,%a0@ <== NOT EXECUTED 4f57a: 6000 f956 braw 4eed2 <msdos_format+0x194> <== NOT EXECUTED
FAT_SET_BR_BOOTSIG(mbr , FAT_BR_BOOTSIG_VAL);
FAT_SET_BR_VOLID(mbr , fmt_params->vol_id); /* volume id */
memcpy(FAT_GET_ADDR_BR_VOLLAB(mbr),
fmt_params->VolLabel,
FAT_BR_VOLLAB_SIZE);
memcpy(FAT_GET_ADDR_BR_FILSYSTYPE(mbr),
4f57e: 41f9 0006 d78c lea 6d78c <_CPU_m68k_BFFFO_table+0x128>,%a0 4f584: 43ed 0036 lea %a5@(54),%a1 4f588: 2290 movel %a0@,%a1@ 4f58a: 2b68 0004 003a movel %a0@(4),%a5@(58) 4f590: 6000 fd6a braw 4f2fc <msdos_format+0x5be>
FAT_SET_VAL16(tmp_sec,2,FAT_FAT16_EOC);
break;
case FAT_FAT32:
/* FAT entry 0: 0xffffff00|media_type */
FAT_SET_VAL32(tmp_sec,0,0xffffff00|fmt_params.media_code);
4f594: 50c0 st %d0 <== NOT EXECUTED
/* FAT entry 1: EOC */
FAT_SET_VAL32(tmp_sec,4,FAT_FAT32_EOC);
4f596: 72f8 moveq #-8,%d1 <== NOT EXECUTED 4f598: 760f moveq #15,%d3 <== NOT EXECUTED
FAT_SET_VAL16(tmp_sec,2,FAT_FAT16_EOC);
break;
case FAT_FAT32:
/* FAT entry 0: 0xffffff00|media_type */
FAT_SET_VAL32(tmp_sec,0,0xffffff00|fmt_params.media_code);
4f59a: 1d6e ff93 fd62 moveb %fp@(-109),%fp@(-670) <== NOT EXECUTED 4f5a0: 1d40 fd63 moveb %d0,%fp@(-669) <== NOT EXECUTED 4f5a4: 1d40 fd64 moveb %d0,%fp@(-668) <== NOT EXECUTED 4f5a8: 1d40 fd65 moveb %d0,%fp@(-667) <== NOT EXECUTED
/* FAT entry 1: EOC */
FAT_SET_VAL32(tmp_sec,4,FAT_FAT32_EOC);
4f5ac: 1d41 fd66 moveb %d1,%fp@(-666) <== NOT EXECUTED 4f5b0: 1d40 fd67 moveb %d0,%fp@(-665) <== NOT EXECUTED 4f5b4: 1d40 fd68 moveb %d0,%fp@(-664) <== NOT EXECUTED 4f5b8: 1d43 fd69 moveb %d3,%fp@(-663) <== NOT EXECUTED
/*
* only first valid cluster (cluster number 2) belongs
* to root directory, and is end of chain
* mark this in every copy of the FAT
*/
FAT_SET_VAL32(tmp_sec,8,FAT_FAT32_EOC);
4f5bc: 50c3 st %d3 <== NOT EXECUTED 4f5be: 72f8 moveq #-8,%d1 <== NOT EXECUTED 4f5c0: 7a0f moveq #15,%d5 <== NOT EXECUTED 4f5c2: 1d41 fd6a moveb %d1,%fp@(-662) <== NOT EXECUTED 4f5c6: 1d43 fd6b moveb %d3,%fp@(-661) <== NOT EXECUTED 4f5ca: 1d43 fd6c moveb %d3,%fp@(-660) <== NOT EXECUTED 4f5ce: 1d45 fd6d moveb %d5,%fp@(-659) <== NOT EXECUTED 4f5d2: 6000 fe54 braw 4f428 <msdos_format+0x6ea> <== NOT EXECUTED
* check sectors per cluster.
* must be power of 2
* must be smaller than or equal to 128
* sectors_per_cluster*bytes_per_sector must not be bigger than 32K
*/
for (onebit = 128;onebit >= 1;onebit = onebit>>1) {
4f5d6: e288 lsrl #1,%d0 4f5d8: 4a81 tstl %d1 4f5da: 6700 03f4 beqw 4f9d0 <msdos_format+0xc92> 4f5de: 2049 moveal %a1,%a0 4f5e0: 6000 f90c braw 4eeee <msdos_format+0x1b0>
/* * non-printable character in given name, so keep stuck * at that character and replace all following characters * with a ' ' */ *to++=' ';
4f5e4: 10fc 0020 moveb #32,%a0@+ 4f5e8: 6000 fb3e braw 4f128 <msdos_format+0x3ea>
/* * non-printable character in given name, so keep stuck * at that character and replace all following characters * with a ' ' */ *to++=' ';
4f5ec: 10fc 0020 moveb #32,%a0@+ 4f5f0: 6000 faf4 braw 4f0e6 <msdos_format+0x3a8>
if ((sectors_per_cluster * bytes_per_sector)
> MS_BYTES_PER_CLUSTER_LIMIT) {
ret_val = EINVAL;
finished = true;
}
} while (!finished);
4f5f4: 4a2e fd57 tstb %fp@(-681) 4f5f8: 6700 f9b2 beqw 4efac <msdos_format+0x26e> 4f5fc: 242e fd52 movel %fp@(-686),%d2
if (ret_val != 0) {
rtems_set_errno_and_return_minus_one(ret_val);
}
else {
*sectors_per_cluster_adj = sectors_per_cluster;
*sectors_per_fat_ptr = sectors_per_fat;
4f600: 2d40 ff72 movel %d0,%fp@(-142)
fatdata_sect_cnt,
fmt_params->fat_num,
fmt_params->sectors_per_cluster,
§ors_per_cluster_adj,
&(fmt_params->sectors_per_fat));
fmt_params->sectors_per_cluster = sectors_per_cluster_adj;
4f604: 2d43 ff6e movel %d3,%fp@(-146)
/*
* determine media code
*/
if (ret_val == 0) {
if ((rqdata != NULL) &&
4f608: 4a8a tstl %a2 4f60a: 6700 0108 beqw 4f714 <msdos_format+0x9d6>
(rqdata->media != 0)) {
4f60e: 162a 0015 moveb %a2@(21),%d3
/*
* determine media code
*/
if (ret_val == 0) {
if ((rqdata != NULL) &&
4f612: 6700 0100 beqw 4f714 <msdos_format+0x9d6>
(rqdata->media != 0)) {
const char valid_media_codes[] =
{0xF0,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF};
if (NULL==memchr(valid_media_codes,
4f616: 4878 0009 pea 9 <DIVIDE_BY_ZERO+0x1> <== NOT EXECUTED 4f61a: 4280 clrl %d0 <== NOT EXECUTED 4f61c: 1003 moveb %d3,%d0 <== NOT EXECUTED
* determine media code
*/
if (ret_val == 0) {
if ((rqdata != NULL) &&
(rqdata->media != 0)) {
const char valid_media_codes[] =
4f61e: 72f0 moveq #-16,%d1 <== NOT EXECUTED 4f620: 78f8 moveq #-8,%d4 <== NOT EXECUTED 4f622: 7af9 moveq #-7,%d5 <== NOT EXECUTED 4f624: 7efa moveq #-6,%d7 <== NOT EXECUTED
{0xF0,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF};
if (NULL==memchr(valid_media_codes,
4f626: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4f628: 486e fff6 pea %fp@(-10) <== NOT EXECUTED
* determine media code
*/
if (ret_val == 0) {
if ((rqdata != NULL) &&
(rqdata->media != 0)) {
const char valid_media_codes[] =
4f62c: 1d41 fff6 moveb %d1,%fp@(-10) <== NOT EXECUTED 4f630: 1d44 fff7 moveb %d4,%fp@(-9) <== NOT EXECUTED 4f634: 1d45 fff8 moveb %d5,%fp@(-8) <== NOT EXECUTED 4f638: 1d47 fff9 moveb %d7,%fp@(-7) <== NOT EXECUTED 4f63c: 70fb moveq #-5,%d0 <== NOT EXECUTED 4f63e: 72fc moveq #-4,%d1 <== NOT EXECUTED 4f640: 78fd moveq #-3,%d4 <== NOT EXECUTED 4f642: 7afe moveq #-2,%d5 <== NOT EXECUTED 4f644: 50c7 st %d7 <== NOT EXECUTED 4f646: 1d40 fffa moveb %d0,%fp@(-6) <== NOT EXECUTED 4f64a: 1d41 fffb moveb %d1,%fp@(-5) <== NOT EXECUTED 4f64e: 1d44 fffc moveb %d4,%fp@(-4) <== NOT EXECUTED 4f652: 1d45 fffd moveb %d5,%fp@(-3) <== NOT EXECUTED 4f656: 1d47 fffe moveb %d7,%fp@(-2) <== NOT EXECUTED
{0xF0,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF};
if (NULL==memchr(valid_media_codes,
4f65a: 4eb9 0005 e14c jsr 5e14c <memchr> <== NOT EXECUTED 4f660: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4f664: 4a80 tstl %d0 <== NOT EXECUTED 4f666: 6700 0334 beqw 4f99c <msdos_format+0xc5e> <== NOT EXECUTED
sizeof(valid_media_codes))) {
ret_val = -1;
errno = EINVAL;
}
else {
fmt_params->media_code = rqdata->media;
4f66a: 4281 clrl %d1 <== NOT EXECUTED 4f66c: 122e ff92 moveb %fp@(-110),%d1 <== NOT EXECUTED 4f670: 41ee ff72 lea %fp@(-142),%a0 <== NOT EXECUTED 4f674: 4c10 1800 mulsl %a0@,%d1 <== NOT EXECUTED 4f678: 202e ff7e movel %fp@(-130),%d0 <== NOT EXECUTED 4f67c: d2ae ff6a addl %fp@(-150),%d1 <== NOT EXECUTED 4f680: 1d43 ff93 moveb %d3,%fp@(-109) <== NOT EXECUTED 4f684: 6000 f98c braw 4f012 <msdos_format+0x2d4> <== NOT EXECUTED
* - compute storage size for FAT
* - subtract from total cluster count
*/
fatdata_cluster_cnt = fatdata_sec_cnt/sectors_per_cluster;
if (fattype == FAT_FAT12) {
fat_capacity = fatdata_cluster_cnt * 3 / 2;
4f688: 2044 moveal %d4,%a0 4f68a: 41f0 4a00 lea %a0@(00000000,%d4:l:2),%a0
if (((fattype == FAT_FAT12) && (data_cluster_cnt > FAT_FAT12_MAX_CLN)) ||
((fattype == FAT_FAT16) && (data_cluster_cnt > FAT_FAT16_MAX_CLN))) {
sectors_per_cluster *= 2;
}
else {
finished = true;
4f68e: 7401 moveq #1,%d2
* - compute storage size for FAT
* - subtract from total cluster count
*/
fatdata_cluster_cnt = fatdata_sec_cnt/sectors_per_cluster;
if (fattype == FAT_FAT12) {
fat_capacity = fatdata_cluster_cnt * 3 / 2;
4f690: 2008 movel %a0,%d0 4f692: e288 lsrl #1,%d0
else { /* FAT32 */
fat_capacity = fatdata_cluster_cnt * 4;
}
sectors_per_fat = ((fat_capacity
+ (bytes_per_sector - 1))
4f694: d089 addl %a1,%d0
if (((fattype == FAT_FAT12) && (data_cluster_cnt > FAT_FAT12_MAX_CLN)) ||
((fattype == FAT_FAT16) && (data_cluster_cnt > FAT_FAT16_MAX_CLN))) {
sectors_per_cluster *= 2;
}
else {
finished = true;
4f696: 1d42 fd57 moveb %d2,%fp@(-681)
}
else { /* FAT32 */
fat_capacity = fatdata_cluster_cnt * 4;
}
sectors_per_fat = ((fat_capacity
4f69a: 4c41 0000 remul %d1,%d0,%d0
+ (bytes_per_sector - 1))
/ bytes_per_sector);
data_cluster_cnt = (fatdata_cluster_cnt -
(((sectors_per_fat * fat_num)
4f69e: 242e fd5c movel %fp@(-676),%d2 4f6a2: 4c00 2800 mulsl %d0,%d2 4f6a6: 2042 moveal %d2,%a0
+ (sectors_per_cluster - 1))
4f6a8: 41f0 38ff lea %a0@(ffffffff,%d3:l),%a0
/ sectors_per_cluster));
4f6ac: 2e08 movel %a0,%d7 4f6ae: 4c43 7007 remul %d3,%d7,%d7
sectors_per_fat = ((fat_capacity
+ (bytes_per_sector - 1))
/ bytes_per_sector);
data_cluster_cnt = (fatdata_cluster_cnt -
4f6b2: 9887 subl %d7,%d4
+ (sectors_per_cluster - 1))
/ sectors_per_cluster));
/*
* data cluster count too big? then make sectors bigger
*/
if (((fattype == FAT_FAT12) && (data_cluster_cnt > FAT_FAT12_MAX_CLN)) ||
4f6b4: 0c84 0000 0ff5 cmpil #4085,%d4 4f6ba: 6300 f916 blsw 4efd2 <msdos_format+0x294>
((fattype == FAT_FAT16) && (data_cluster_cnt > FAT_FAT16_MAX_CLN))) {
sectors_per_cluster *= 2;
4f6be: 4204 clrb %d4 <== NOT EXECUTED 4f6c0: d683 addl %d3,%d3 <== NOT EXECUTED 4f6c2: 1d44 fd57 moveb %d4,%fp@(-681) <== NOT EXECUTED 4f6c6: 6000 f90a braw 4efd2 <msdos_format+0x294> <== NOT EXECUTED
}
/*
* Phuuu.... That's it.
*/
if (ret_val != 0) {
rtems_set_errno_and_return_minus_one(ret_val);
4f6ca: 78ff moveq #-1,%d4 <== NOT EXECUTED
/*
* cleanup:
* sync and unlock disk
* free any data structures (not needed now)
*/
if (fd != -1) {
4f6cc: 70ff moveq #-1,%d0 <== NOT EXECUTED 4f6ce: b082 cmpl %d2,%d0 <== NOT EXECUTED 4f6d0: 6700 f70a beqw 4eddc <msdos_format+0x9e> <== NOT EXECUTED 4f6d4: 6000 f96c braw 4f042 <msdos_format+0x304> <== NOT EXECUTED
else { /* FAT32 */
fat_capacity = fatdata_cluster_cnt * 4;
}
sectors_per_fat = ((fat_capacity
+ (bytes_per_sector - 1))
4f6d8: 41f1 4a00 lea %a1@(00000000,%d4:l:2),%a0 <== NOT EXECUTED
if (((fattype == FAT_FAT12) && (data_cluster_cnt > FAT_FAT12_MAX_CLN)) ||
((fattype == FAT_FAT16) && (data_cluster_cnt > FAT_FAT16_MAX_CLN))) {
sectors_per_cluster *= 2;
}
else {
finished = true;
4f6dc: 7401 moveq #1,%d2 <== NOT EXECUTED
else { /* FAT32 */
fat_capacity = fatdata_cluster_cnt * 4;
}
sectors_per_fat = ((fat_capacity
+ (bytes_per_sector - 1))
4f6de: 2008 movel %a0,%d0 <== NOT EXECUTED
if (((fattype == FAT_FAT12) && (data_cluster_cnt > FAT_FAT12_MAX_CLN)) ||
((fattype == FAT_FAT16) && (data_cluster_cnt > FAT_FAT16_MAX_CLN))) {
sectors_per_cluster *= 2;
}
else {
finished = true;
4f6e0: 1d42 fd57 moveb %d2,%fp@(-681) <== NOT EXECUTED
}
else { /* FAT32 */
fat_capacity = fatdata_cluster_cnt * 4;
}
sectors_per_fat = ((fat_capacity
4f6e4: 4c41 0000 remul %d1,%d0,%d0 <== NOT EXECUTED
+ (bytes_per_sector - 1))
/ bytes_per_sector);
data_cluster_cnt = (fatdata_cluster_cnt -
(((sectors_per_fat * fat_num)
4f6e8: 242e fd5c movel %fp@(-676),%d2 <== NOT EXECUTED 4f6ec: 4c00 2800 mulsl %d0,%d2 <== NOT EXECUTED 4f6f0: 2042 moveal %d2,%a0 <== NOT EXECUTED
+ (sectors_per_cluster - 1))
4f6f2: 41f0 38ff lea %a0@(ffffffff,%d3:l),%a0 <== NOT EXECUTED
/ sectors_per_cluster));
4f6f6: 2e08 movel %a0,%d7 <== NOT EXECUTED 4f6f8: 4c43 7007 remul %d3,%d7,%d7 <== NOT EXECUTED
sectors_per_fat = ((fat_capacity
+ (bytes_per_sector - 1))
/ bytes_per_sector);
data_cluster_cnt = (fatdata_cluster_cnt -
4f6fc: 9887 subl %d7,%d4 <== NOT EXECUTED
/ sectors_per_cluster));
/*
* data cluster count too big? then make sectors bigger
*/
if (((fattype == FAT_FAT12) && (data_cluster_cnt > FAT_FAT12_MAX_CLN)) ||
((fattype == FAT_FAT16) && (data_cluster_cnt > FAT_FAT16_MAX_CLN))) {
4f6fe: 0c84 0000 fff5 cmpil #65525,%d4 <== NOT EXECUTED 4f704: 6300 f8cc blsw 4efd2 <msdos_format+0x294> <== NOT EXECUTED
sectors_per_cluster *= 2;
4f708: 4204 clrb %d4 <== NOT EXECUTED 4f70a: d683 addl %d3,%d3 <== NOT EXECUTED 4f70c: 1d44 fd57 moveb %d4,%fp@(-681) <== NOT EXECUTED 4f710: 6000 f8c0 braw 4efd2 <msdos_format+0x294> <== NOT EXECUTED
else {
fmt_params->media_code = rqdata->media;
}
}
else {
fmt_params->media_code = FAT_BR_MEDIA_FIXED;
4f714: 4281 clrl %d1 4f716: 122e ff92 moveb %fp@(-110),%d1 4f71a: 41ee ff72 lea %fp@(-142),%a0 4f71e: 4c10 1800 mulsl %a0@,%d1 4f722: 76f8 moveq #-8,%d3 4f724: 202e ff7e movel %fp@(-130),%d0 4f728: d2ae ff6a addl %fp@(-150),%d1 4f72c: 1d43 ff93 moveb %d3,%fp@(-109) 4f730: 6000 f8e0 braw 4f012 <msdos_format+0x2d4>
*/
for (onebit = 128;onebit >= 1;onebit = onebit>>1) {
if (fmt_params->sectors_per_cluster >= onebit) {
fmt_params->sectors_per_cluster = onebit;
if (fmt_params->sectors_per_cluster
<= 32768L/fmt_params->bytes_per_sector) {
4f734: 262e ff62 movel %fp@(-158),%d3 <== NOT EXECUTED 4f738: 2248 moveal %a0,%a1 <== NOT EXECUTED 4f73a: 7208 moveq #8,%d1 <== NOT EXECUTED 4f73c: 203c 0000 0080 movel #128,%d0 <== NOT EXECUTED 4f742: 6000 f7aa braw 4eeee <msdos_format+0x1b0> <== NOT EXECUTED
}
}
}
}
if (ret_val == 0) {
4f746: 72ff moveq #-1,%d1 <== NOT EXECUTED 4f748: 41ee ff72 lea %fp@(-142),%a0 <== NOT EXECUTED 4f74c: 2d41 fd58 movel %d1,%fp@(-680) <== NOT EXECUTED 4f750: 4281 clrl %d1 <== NOT EXECUTED 4f752: 122e ff92 moveb %fp@(-110),%d1 <== NOT EXECUTED 4f756: 4c10 1800 mulsl %a0@,%d1 <== NOT EXECUTED 4f75a: 202e ff7e movel %fp@(-130),%d0 <== NOT EXECUTED 4f75e: d2ae ff6a addl %fp@(-150),%d1 <== NOT EXECUTED 4f762: 6000 f8ae braw 4f012 <msdos_format+0x2d4> <== NOT EXECUTED
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
ret_val = -1;
}
if (ret_val == 0) {
if (0 > read(fd,buffer,sector_size)) {
4f766: 7818 moveq #24,%d4 <== NOT EXECUTED 4f768: e8a9 lsrl %d4,%d1 <== NOT EXECUTED 4f76a: 2800 movel %d0,%d4 <== NOT EXECUTED 4f76c: 1d40 fd57 moveb %d0,%fp@(-681) <== NOT EXECUTED 4f770: 0284 0000 ffff andil #65535,%d4 <== NOT EXECUTED 4f776: 4240 clrw %d0 <== NOT EXECUTED 4f778: 4840 swap %d0 <== NOT EXECUTED
{
uint32_t total_sectors_num16 = 0;
uint32_t total_sectors_num32 = 0;
/* store total sector count in either 16 or 32 bit field in mbr */
if (fmt_params->totl_sector_cnt < 0x10000) {
4f77a: 4205 clrb %d5 <== NOT EXECUTED
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
ret_val = -1;
}
if (ret_val == 0) {
if (0 > read(fd,buffer,sector_size)) {
4f77c: e08c lsrl #8,%d4 <== NOT EXECUTED
{
uint32_t total_sectors_num16 = 0;
uint32_t total_sectors_num32 = 0;
/* store total sector count in either 16 or 32 bit field in mbr */
if (fmt_params->totl_sector_cnt < 0x10000) {
4f77e: 4207 clrb %d7 <== NOT EXECUTED
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
ret_val = -1;
}
if (ret_val == 0) {
if (0 > read(fd,buffer,sector_size)) {
4f780: 1d41 fd51 moveb %d1,%fp@(-687) <== NOT EXECUTED 4f784: 1d40 fd55 moveb %d0,%fp@(-683) <== NOT EXECUTED
{
uint32_t total_sectors_num16 = 0;
uint32_t total_sectors_num32 = 0;
/* store total sector count in either 16 or 32 bit field in mbr */
if (fmt_params->totl_sector_cnt < 0x10000) {
4f788: 1d45 fd5b moveb %d5,%fp@(-677) <== NOT EXECUTED 4f78c: 1d47 fd5c moveb %d7,%fp@(-676) <== NOT EXECUTED 4f790: 6000 fa4a braw 4f1dc <msdos_format+0x49e> <== NOT EXECUTED
ret_val = EINVAL;
}
}
if (ret_val == 0)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
4f794: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED 4f798: 4879 0006 d7ca pea 6d7ca <_CPU_m68k_BFFFO_table+0x166> <== NOT EXECUTED 4f79e: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED
* determine number of FATs
*/
if (ret_val == 0) {
if ((rqdata == NULL) ||
(rqdata->fat_num == 0)) {
fmt_params->fat_num = 2;
4f7a2: 7002 moveq #2,%d0 <== NOT EXECUTED
ret_val = EINVAL;
}
}
if (ret_val == 0)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
4f7a4: 42a7 clrl %sp@- <== NOT EXECUTED
* determine number of FATs
*/
if (ret_val == 0) {
if ((rqdata == NULL) ||
(rqdata->fat_num == 0)) {
fmt_params->fat_num = 2;
4f7a6: 1d40 ff92 moveb %d0,%fp@(-110) <== NOT EXECUTED
ret_val = EINVAL;
}
}
if (ret_val == 0)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
4f7aa: 4e93 jsr %a3@ <== NOT EXECUTED
/*
* determine FAT type and sectors per cluster
* depends on
*/
if (ret_val == 0) {
fmt_params->sectors_per_cluster = 1;
4f7ac: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4f7b0: 6000 f700 braw 4eeb2 <msdos_format+0x174> <== NOT EXECUTED
break;
case FAT_FAT16:
/* FAT entry 0: 0xff00|media_type */
FAT_SET_VAL8(tmp_sec,0,fmt_params.media_code);
FAT_SET_VAL8(tmp_sec,1,0xff);
4f7b4: 50c3 st %d3 <== NOT EXECUTED
/* FAT entry 1: EOC */
FAT_SET_VAL16(tmp_sec,2,FAT_FAT16_EOC);
4f7b6: 7af8 moveq #-8,%d5 <== NOT EXECUTED
FAT_SET_VAL8(tmp_sec,2,(FAT_FAT12_EOC >> 4));
break;
case FAT_FAT16:
/* FAT entry 0: 0xff00|media_type */
FAT_SET_VAL8(tmp_sec,0,fmt_params.media_code);
4f7b8: 1d6e ff93 fd62 moveb %fp@(-109),%fp@(-670) <== NOT EXECUTED
FAT_SET_VAL8(tmp_sec,1,0xff);
4f7be: 1d43 fd63 moveb %d3,%fp@(-669) <== NOT EXECUTED
/* FAT entry 1: EOC */
FAT_SET_VAL16(tmp_sec,2,FAT_FAT16_EOC);
4f7c2: 1d45 fd64 moveb %d5,%fp@(-668) <== NOT EXECUTED 4f7c6: 1d43 fd65 moveb %d3,%fp@(-667) <== NOT EXECUTED
break;
4f7ca: 6000 fc5c braw 4f428 <msdos_format+0x6ea> <== NOT EXECUTED
switch(fmt_params.fattype) {
case FAT_FAT12:
/* LSBits of FAT entry 0: media_type */
FAT_SET_VAL8(tmp_sec,0,(fmt_params.media_code));
/* MSBits of FAT entry 0:0xf, LSBits of FAT entry 1: LSB of EOC */
FAT_SET_VAL8(tmp_sec,1,(0x0f | (FAT_FAT12_EOC << 4)));
4f7ce: 708f moveq #-113,%d0
/* MSBits of FAT entry 1: MSBits of EOC */
FAT_SET_VAL8(tmp_sec,2,(FAT_FAT12_EOC >> 4));
4f7d0: 50c1 st %d1
memset(tmp_sec,0,sizeof(tmp_sec));
switch(fmt_params.fattype) {
case FAT_FAT12:
/* LSBits of FAT entry 0: media_type */
FAT_SET_VAL8(tmp_sec,0,(fmt_params.media_code));
4f7d2: 1d6e ff93 fd62 moveb %fp@(-109),%fp@(-670)
/* MSBits of FAT entry 0:0xf, LSBits of FAT entry 1: LSB of EOC */
FAT_SET_VAL8(tmp_sec,1,(0x0f | (FAT_FAT12_EOC << 4)));
4f7d8: 1d40 fd63 moveb %d0,%fp@(-669)
/* MSBits of FAT entry 1: MSBits of EOC */
FAT_SET_VAL8(tmp_sec,2,(FAT_FAT12_EOC >> 4));
4f7dc: 1d41 fd64 moveb %d1,%fp@(-668)
break;
4f7e0: 6000 fc46 braw 4f428 <msdos_format+0x6ea>
if ((rqdata != NULL) &&
(rqdata->files_per_root_dir > 0)) {
fmt_params->files_per_root_dir = rqdata->files_per_root_dir;
}
else {
if (fmt_params->fattype == FAT_FAT16) {
4f7e4: 283c 0000 01ff movel #511,%d4 4f7ea: 7002 moveq #2,%d0 4f7ec: b086 cmpl %d6,%d0 4f7ee: 6700 f760 beqw 4ef50 <msdos_format+0x212>
else {
fmt_params->files_per_root_dir = 64;
}
}
fmt_params->files_per_root_dir = (fmt_params->files_per_root_dir +
(2*fmt_params->bytes_per_sector/
4f7f2: 222e ff62 movel %fp@(-158),%d1 4f7f6: 2a01 movel %d1,%d5
FAT_DIRENTRY_SIZE-1));
fmt_params->files_per_root_dir -= (fmt_params->files_per_root_dir %
4f7f8: 3a7c 0001 moveaw #1,%a5
else {
fmt_params->files_per_root_dir = 64;
}
}
fmt_params->files_per_root_dir = (fmt_params->files_per_root_dir +
(2*fmt_params->bytes_per_sector/
4f7fc: da85 addl %d5,%d5
if ((rqdata != NULL) &&
(rqdata->files_per_root_dir > 0)) {
fmt_params->files_per_root_dir = rqdata->files_per_root_dir;
}
else {
if (fmt_params->fattype == FAT_FAT16) {
4f7fe: 383c 003f movew #63,%d4
else {
fmt_params->files_per_root_dir = 64;
}
}
fmt_params->files_per_root_dir = (fmt_params->files_per_root_dir +
(2*fmt_params->bytes_per_sector/
4f802: ea8d lsrl #5,%d5
}
else {
fmt_params->files_per_root_dir = 64;
}
}
fmt_params->files_per_root_dir = (fmt_params->files_per_root_dir +
4f804: d885 addl %d5,%d4
(2*fmt_params->bytes_per_sector/
FAT_DIRENTRY_SIZE-1));
fmt_params->files_per_root_dir -= (fmt_params->files_per_root_dir %
4f806: 2e04 movel %d4,%d7 4f808: 4c45 7000 remul %d5,%d0,%d7 4f80c: 9880 subl %d0,%d4 4f80e: 2e04 movel %d4,%d7 4f810: 2d44 ff7a movel %d4,%fp@(-134) 4f814: eb8f lsll #5,%d7 4f816: 6000 f758 braw 4ef70 <msdos_format+0x232>
*/
if (ret_val == 0) {
fmt_params->sectors_per_cluster = 1;
if ((rqdata != NULL) &&
(rqdata->fattype == MSDOS_FMT_FAT12)) {
fmt_params->fattype = FAT_FAT12;
4f81a: 42ae fd58 clrl %fp@(-680) <== NOT EXECUTED 4f81e: 7001 moveq #1,%d0 <== NOT EXECUTED 4f820: 1d40 ff94 moveb %d0,%fp@(-108) <== NOT EXECUTED 4f824: 6000 f6ac braw 4eed2 <msdos_format+0x194> <== NOT EXECUTED
}
else if ((rqdata != NULL) &&
(rqdata->fattype == MSDOS_FMT_FAT16)) {
fmt_params->fattype = FAT_FAT16;
4f828: 42ae fd58 clrl %fp@(-680) <== NOT EXECUTED 4f82c: 7802 moveq #2,%d4 <== NOT EXECUTED 4f82e: 1d44 ff94 moveb %d4,%fp@(-108) <== NOT EXECUTED 4f832: 6000 f69e braw 4eed2 <msdos_format+0x194> <== NOT EXECUTED
rc = rtems_clock_get_tod_timeval(&time_value);
if (rc == RTEMS_SUCCESSFUL) {
*volid_ptr = time_value.tv_sec + time_value.tv_sec;
}
else {
*volid_ptr = rand();
4f836: 4eb9 0005 e3d4 jsr 5e3d4 <rand> 4f83c: 2d40 ffac movel %d0,%fp@(-84) 4f840: 6000 f90a braw 4f14c <msdos_format+0x40e>
< ((uint32_t)FAT_FAT12_MAX_CLN)*8) {
fmt_params->fattype = FAT_FAT12;
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
}
else if (fmt_params->totl_sector_cnt
4f844: 0c83 001f fe9f cmpil #2096799,%d3 <== NOT EXECUTED 4f84a: 6200 0116 bhiw 4f962 <msdos_format+0xc24> <== NOT EXECUTED
< ((uint32_t)FAT_FAT16_MAX_CLN)*32) {
fmt_params->fattype = FAT_FAT16;
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
4f84e: 7602 moveq #2,%d3 <== NOT EXECUTED
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
}
else if (fmt_params->totl_sector_cnt
< ((uint32_t)FAT_FAT16_MAX_CLN)*32) {
fmt_params->fattype = FAT_FAT16;
4f850: 7802 moveq #2,%d4 <== NOT EXECUTED
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
4f852: 2d43 ff6e movel %d3,%fp@(-146) <== NOT EXECUTED
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
}
else if (fmt_params->totl_sector_cnt
< ((uint32_t)FAT_FAT16_MAX_CLN)*32) {
fmt_params->fattype = FAT_FAT16;
4f856: 1d44 ff94 moveb %d4,%fp@(-108) <== NOT EXECUTED 4f85a: 6000 f66c braw 4eec8 <msdos_format+0x18a> <== NOT EXECUTED
? "FAT12 "
: "FAT16 ",
FAT_BR_FILSYSTYPE_SIZE);
}
else {
FAT_SET_BR_SECTORS_PER_FAT32(mbr ,fmt_params->sectors_per_fat);
4f85e: 202e ff72 movel %fp@(-142),%d0 <== NOT EXECUTED 4f862: 7218 moveq #24,%d1 <== NOT EXECUTED 4f864: 2a00 movel %d0,%d5 <== NOT EXECUTED 4f866: e2ad lsrl %d1,%d5 <== NOT EXECUTED 4f868: 2e00 movel %d0,%d7 <== NOT EXECUTED 4f86a: e08f lsrl #8,%d7 <== NOT EXECUTED 4f86c: 2c00 movel %d0,%d6 <== NOT EXECUTED
FAT_SET_BR_FAT32_DRVNUM(mbr , 0); /* only needed for INT13... */
FAT_SET_BR_FAT32_RSVD1(mbr , 0); /* fill with zero */
FAT_SET_BR_FAT32_BOOTSIG(mbr ,FAT_BR_FAT32_BOOTSIG_VAL);
FAT_SET_BR_FAT32_VOLID(mbr , 0); /* not set */
memset(FAT_GET_ADDR_BR_FAT32_VOLLAB(mbr) ,0,FAT_BR_VOLLAB_SIZE);
memcpy(FAT_GET_ADDR_BR_FAT32_FILSYSTYPE(mbr),
4f86e: 41ed 0052 lea %a5@(82),%a0 <== NOT EXECUTED
FAT_SET_BR_SECTORS_PER_FAT32(mbr ,fmt_params->sectors_per_fat);
FAT_SET_BR_EXT_FLAGS(mbr , 0);
FAT_SET_BR_FSVER(mbr , 0); /* FAT32 Version:0.0 */
FAT_SET_BR_FAT32_ROOT_CLUSTER(mbr , 2); /* put root dir to cluster 2 */
FAT_SET_BR_FAT32_FS_INFO_SECTOR(mbr, 1); /* Put fsinfo to rsrvd sec 1*/
FAT_SET_BR_FAT32_BK_BOOT_SECTOR(mbr, fmt_params->mbr_copy_sec ); /* Put MBR copy to rsrvd sec */
4f872: 222e ff8a movel %fp@(-118),%d1 <== NOT EXECUTED 4f876: 2801 movel %d1,%d4 <== NOT EXECUTED 4f878: e08c lsrl #8,%d4 <== NOT EXECUTED
? "FAT12 "
: "FAT16 ",
FAT_BR_FILSYSTYPE_SIZE);
}
else {
FAT_SET_BR_SECTORS_PER_FAT32(mbr ,fmt_params->sectors_per_fat);
4f87a: 1d45 fd89 moveb %d5,%fp@(-631) <== NOT EXECUTED
FAT_SET_BR_EXT_FLAGS(mbr , 0);
FAT_SET_BR_FSVER(mbr , 0); /* FAT32 Version:0.0 */
FAT_SET_BR_FAT32_ROOT_CLUSTER(mbr , 2); /* put root dir to cluster 2 */
4f87e: 7a02 moveq #2,%d5 <== NOT EXECUTED
? "FAT12 "
: "FAT16 ",
FAT_BR_FILSYSTYPE_SIZE);
}
else {
FAT_SET_BR_SECTORS_PER_FAT32(mbr ,fmt_params->sectors_per_fat);
4f880: 1d40 fd86 moveb %d0,%fp@(-634) <== NOT EXECUTED 4f884: 1d47 fd87 moveb %d7,%fp@(-633) <== NOT EXECUTED
FAT_SET_BR_EXT_FLAGS(mbr , 0);
FAT_SET_BR_FSVER(mbr , 0); /* FAT32 Version:0.0 */
FAT_SET_BR_FAT32_ROOT_CLUSTER(mbr , 2); /* put root dir to cluster 2 */
FAT_SET_BR_FAT32_FS_INFO_SECTOR(mbr, 1); /* Put fsinfo to rsrvd sec 1*/
FAT_SET_BR_FAT32_BK_BOOT_SECTOR(mbr, fmt_params->mbr_copy_sec ); /* Put MBR copy to rsrvd sec */
memset(FAT_GET_ADDR_BR_FAT32_RESERVED(mbr),0,FAT_BR_FAT32_RESERVED_SIZE);
4f888: 42ad 0034 clrl %a5@(52) <== NOT EXECUTED
}
else {
FAT_SET_BR_SECTORS_PER_FAT32(mbr ,fmt_params->sectors_per_fat);
FAT_SET_BR_EXT_FLAGS(mbr , 0);
FAT_SET_BR_FSVER(mbr , 0); /* FAT32 Version:0.0 */
FAT_SET_BR_FAT32_ROOT_CLUSTER(mbr , 2); /* put root dir to cluster 2 */
4f88c: 1d45 fd8e moveb %d5,%fp@(-626) <== NOT EXECUTED
FAT_SET_BR_FAT32_FS_INFO_SECTOR(mbr, 1); /* Put fsinfo to rsrvd sec 1*/
FAT_SET_BR_FAT32_BK_BOOT_SECTOR(mbr, fmt_params->mbr_copy_sec ); /* Put MBR copy to rsrvd sec */
4f890: 1d41 fd94 moveb %d1,%fp@(-620) <== NOT EXECUTED
memset(FAT_GET_ADDR_BR_FAT32_RESERVED(mbr),0,FAT_BR_FAT32_RESERVED_SIZE);
4f894: 42ad 0038 clrl %a5@(56) <== NOT EXECUTED
FAT_SET_BR_SECTORS_PER_FAT32(mbr ,fmt_params->sectors_per_fat);
FAT_SET_BR_EXT_FLAGS(mbr , 0);
FAT_SET_BR_FSVER(mbr , 0); /* FAT32 Version:0.0 */
FAT_SET_BR_FAT32_ROOT_CLUSTER(mbr , 2); /* put root dir to cluster 2 */
FAT_SET_BR_FAT32_FS_INFO_SECTOR(mbr, 1); /* Put fsinfo to rsrvd sec 1*/
FAT_SET_BR_FAT32_BK_BOOT_SECTOR(mbr, fmt_params->mbr_copy_sec ); /* Put MBR copy to rsrvd sec */
4f898: 1d44 fd95 moveb %d4,%fp@(-619) <== NOT EXECUTED
FAT_SET_BR_FAT32_DRVNUM(mbr , 0); /* only needed for INT13... */
FAT_SET_BR_FAT32_RSVD1(mbr , 0); /* fill with zero */
FAT_SET_BR_FAT32_BOOTSIG(mbr ,FAT_BR_FAT32_BOOTSIG_VAL);
FAT_SET_BR_FAT32_VOLID(mbr , 0); /* not set */
memset(FAT_GET_ADDR_BR_FAT32_VOLLAB(mbr) ,0,FAT_BR_VOLLAB_SIZE);
memcpy(FAT_GET_ADDR_BR_FAT32_FILSYSTYPE(mbr),
4f89c: 2a3c 3220 2020 movel #840966176,%d5 <== NOT EXECUTED
? "FAT12 "
: "FAT16 ",
FAT_BR_FILSYSTYPE_SIZE);
}
else {
FAT_SET_BR_SECTORS_PER_FAT32(mbr ,fmt_params->sectors_per_fat);
4f8a2: 4246 clrw %d6 <== NOT EXECUTED 4f8a4: 4846 swap %d6 <== NOT EXECUTED
FAT_SET_BR_EXT_FLAGS(mbr , 0);
FAT_SET_BR_FSVER(mbr , 0); /* FAT32 Version:0.0 */
FAT_SET_BR_FAT32_ROOT_CLUSTER(mbr , 2); /* put root dir to cluster 2 */
FAT_SET_BR_FAT32_FS_INFO_SECTOR(mbr, 1); /* Put fsinfo to rsrvd sec 1*/
4f8a6: 7e01 moveq #1,%d7 <== NOT EXECUTED
FAT_SET_BR_FAT32_BK_BOOT_SECTOR(mbr, fmt_params->mbr_copy_sec ); /* Put MBR copy to rsrvd sec */
memset(FAT_GET_ADDR_BR_FAT32_RESERVED(mbr),0,FAT_BR_FAT32_RESERVED_SIZE);
4f8a8: 42ad 003c clrl %a5@(60) <== NOT EXECUTED
FAT_SET_BR_FAT32_DRVNUM(mbr , 0); /* only needed for INT13... */
FAT_SET_BR_FAT32_RSVD1(mbr , 0); /* fill with zero */
FAT_SET_BR_FAT32_BOOTSIG(mbr ,FAT_BR_FAT32_BOOTSIG_VAL);
4f8ac: 7029 moveq #41,%d0 <== NOT EXECUTED
FAT_SET_BR_FAT32_VOLID(mbr , 0); /* not set */
memset(FAT_GET_ADDR_BR_FAT32_VOLLAB(mbr) ,0,FAT_BR_VOLLAB_SIZE);
4f8ae: 4241 clrw %d1 <== NOT EXECUTED 4f8b0: 42ad 0047 clrl %a5@(71) <== NOT EXECUTED 4f8b4: 4204 clrb %d4 <== NOT EXECUTED 4f8b6: 42ad 004b clrl %a5@(75) <== NOT EXECUTED
? "FAT12 "
: "FAT16 ",
FAT_BR_FILSYSTYPE_SIZE);
}
else {
FAT_SET_BR_SECTORS_PER_FAT32(mbr ,fmt_params->sectors_per_fat);
4f8ba: 1d46 fd88 moveb %d6,%fp@(-632) <== NOT EXECUTED
FAT_SET_BR_FAT32_DRVNUM(mbr , 0); /* only needed for INT13... */
FAT_SET_BR_FAT32_RSVD1(mbr , 0); /* fill with zero */
FAT_SET_BR_FAT32_BOOTSIG(mbr ,FAT_BR_FAT32_BOOTSIG_VAL);
FAT_SET_BR_FAT32_VOLID(mbr , 0); /* not set */
memset(FAT_GET_ADDR_BR_FAT32_VOLLAB(mbr) ,0,FAT_BR_VOLLAB_SIZE);
memcpy(FAT_GET_ADDR_BR_FAT32_FILSYSTYPE(mbr),
4f8be: 2b45 0056 movel %d5,%a5@(86) <== NOT EXECUTED 4f8c2: 20bc 4641 5433 movel #1178686515,%a0@ <== NOT EXECUTED
else {
FAT_SET_BR_SECTORS_PER_FAT32(mbr ,fmt_params->sectors_per_fat);
FAT_SET_BR_EXT_FLAGS(mbr , 0);
FAT_SET_BR_FSVER(mbr , 0); /* FAT32 Version:0.0 */
FAT_SET_BR_FAT32_ROOT_CLUSTER(mbr , 2); /* put root dir to cluster 2 */
FAT_SET_BR_FAT32_FS_INFO_SECTOR(mbr, 1); /* Put fsinfo to rsrvd sec 1*/
4f8c8: 1d47 fd92 moveb %d7,%fp@(-622) <== NOT EXECUTED
FAT_SET_BR_FAT32_BK_BOOT_SECTOR(mbr, fmt_params->mbr_copy_sec ); /* Put MBR copy to rsrvd sec */
memset(FAT_GET_ADDR_BR_FAT32_RESERVED(mbr),0,FAT_BR_FAT32_RESERVED_SIZE);
FAT_SET_BR_FAT32_DRVNUM(mbr , 0); /* only needed for INT13... */
FAT_SET_BR_FAT32_RSVD1(mbr , 0); /* fill with zero */
FAT_SET_BR_FAT32_BOOTSIG(mbr ,FAT_BR_FAT32_BOOTSIG_VAL);
4f8cc: 1d40 fda4 moveb %d0,%fp@(-604) <== NOT EXECUTED
FAT_SET_BR_FAT32_VOLID(mbr , 0); /* not set */
memset(FAT_GET_ADDR_BR_FAT32_VOLLAB(mbr) ,0,FAT_BR_VOLLAB_SIZE);
4f8d0: 3b41 004f movew %d1,%a5@(79) <== NOT EXECUTED 4f8d4: 1b44 0051 moveb %d4,%a5@(81) <== NOT EXECUTED 4f8d8: 6000 fa22 braw 4f2fc <msdos_format+0x5be> <== NOT EXECUTED
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"sectors per cluster: %d\n", fmt_params->sectors_per_cluster);
if (fmt_params->fattype == FAT_FAT32) {
/* recommended: for FAT32, always set reserved sector count to 32 */
fmt_params->rsvd_sector_cnt = 32;
4f8dc: 7220 moveq #32,%d1 <== NOT EXECUTED
/* for FAT32, always set files per root directory 0 */
fmt_params->files_per_root_dir = 0;
/* location of copy of MBR */
fmt_params->mbr_copy_sec = 6;
/* location of fsinfo sector */
fmt_params->fsinfo_sec = 1;
4f8de: 4287 clrl %d7 <== NOT EXECUTED 4f8e0: 7a01 moveq #1,%d5 <== NOT EXECUTED
/* recommended: for FAT32, always set reserved sector count to 32 */
fmt_params->rsvd_sector_cnt = 32;
/* for FAT32, always set files per root directory 0 */
fmt_params->files_per_root_dir = 0;
/* location of copy of MBR */
fmt_params->mbr_copy_sec = 6;
4f8e2: 7806 moveq #6,%d4 <== NOT EXECUTED
/* location of fsinfo sector */
fmt_params->fsinfo_sec = 1;
4f8e4: 3a7c 0020 moveaw #32,%a5 <== NOT EXECUTED
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"sectors per cluster: %d\n", fmt_params->sectors_per_cluster);
if (fmt_params->fattype == FAT_FAT32) {
/* recommended: for FAT32, always set reserved sector count to 32 */
fmt_params->rsvd_sector_cnt = 32;
4f8e8: 2d41 ff6a movel %d1,%fp@(-150) <== NOT EXECUTED
/* for FAT32, always set files per root directory 0 */
fmt_params->files_per_root_dir = 0;
/* location of copy of MBR */
fmt_params->mbr_copy_sec = 6;
/* location of fsinfo sector */
fmt_params->fsinfo_sec = 1;
4f8ec: 222e ff62 movel %fp@(-158),%d1 <== NOT EXECUTED
(2*fmt_params->bytes_per_sector
/FAT_DIRENTRY_SIZE));
}
fmt_params->root_dir_sectors =
(((fmt_params->files_per_root_dir * FAT_DIRENTRY_SIZE)
+ fmt_params->bytes_per_sector - 1)
4f8f0: 2241 moveal %d1,%a1 <== NOT EXECUTED 4f8f2: 5389 subql #1,%a1 <== NOT EXECUTED 4f8f4: de89 addl %a1,%d7 <== NOT EXECUTED
/ fmt_params->bytes_per_sector);
4f8f6: 4c41 7007 remul %d1,%d7,%d7 <== NOT EXECUTED
/* for FAT32, always set files per root directory 0 */
fmt_params->files_per_root_dir = 0;
/* location of copy of MBR */
fmt_params->mbr_copy_sec = 6;
/* location of fsinfo sector */
fmt_params->fsinfo_sec = 1;
4f8fa: 2d45 ff8e movel %d5,%fp@(-114) <== NOT EXECUTED
uint32_t sectors_per_fat;
uint32_t data_cluster_cnt;
/*
* ensure, that maximum cluster size (32KByte) is not exceeded
*/
while (MS_BYTES_PER_CLUSTER_LIMIT / bytes_per_sector < sectors_per_cluster) {
4f8fe: 203c 0000 8000 movel #32768,%d0 <== NOT EXECUTED
/* recommended: for FAT32, always set reserved sector count to 32 */
fmt_params->rsvd_sector_cnt = 32;
/* for FAT32, always set files per root directory 0 */
fmt_params->files_per_root_dir = 0;
/* location of copy of MBR */
fmt_params->mbr_copy_sec = 6;
4f904: 2d44 ff8a movel %d4,%fp@(-118) <== NOT EXECUTED
(((fmt_params->files_per_root_dir * FAT_DIRENTRY_SIZE)
+ fmt_params->bytes_per_sector - 1)
/ fmt_params->bytes_per_sector);
}
if (ret_val == 0) {
fatdata_sect_cnt = (fmt_params->totl_sector_cnt -
4f908: 2a2e ff66 movel %fp@(-154),%d5 <== NOT EXECUTED 4f90c: 9a8d subl %a5,%d5 <== NOT EXECUTED 4f90e: 9a87 subl %d7,%d5 <== NOT EXECUTED
uint32_t sectors_per_fat;
uint32_t data_cluster_cnt;
/*
* ensure, that maximum cluster size (32KByte) is not exceeded
*/
while (MS_BYTES_PER_CLUSTER_LIMIT / bytes_per_sector < sectors_per_cluster) {
4f910: 4c41 0000 remul %d1,%d0,%d0 <== NOT EXECUTED
if (fmt_params->fattype == FAT_FAT32) {
/* recommended: for FAT32, always set reserved sector count to 32 */
fmt_params->rsvd_sector_cnt = 32;
/* for FAT32, always set files per root directory 0 */
fmt_params->files_per_root_dir = 0;
4f914: 42ae ff7a clrl %fp@(-134) <== NOT EXECUTED
ret_val = msdos_format_eval_sectors_per_cluster
(fmt_params->fattype,
fmt_params->bytes_per_sector,
fatdata_sect_cnt,
fmt_params->fat_num,
4f918: 182e ff92 moveb %fp@(-110),%d4 <== NOT EXECUTED
FAT_DIRENTRY_SIZE-1));
fmt_params->files_per_root_dir -= (fmt_params->files_per_root_dir %
(2*fmt_params->bytes_per_sector
/FAT_DIRENTRY_SIZE));
}
fmt_params->root_dir_sectors =
4f91c: 2d47 ff7e movel %d7,%fp@(-130) <== NOT EXECUTED
uint32_t sectors_per_fat;
uint32_t data_cluster_cnt;
/*
* ensure, that maximum cluster size (32KByte) is not exceeded
*/
while (MS_BYTES_PER_CLUSTER_LIMIT / bytes_per_sector < sectors_per_cluster) {
4f920: b083 cmpl %d3,%d0 <== NOT EXECUTED 4f922: 6500 f674 bcsw 4ef98 <msdos_format+0x25a> <== NOT EXECUTED 4f926: 6000 f676 braw 4ef9e <msdos_format+0x260> <== NOT EXECUTED
}
}
/*
* try to use user requested cluster size
*/
if ((rqdata != NULL) &&
4f92a: 226e ff6e moveal %fp@(-146),%a1 <== NOT EXECUTED
*/
for (onebit = 128;onebit >= 1;onebit = onebit>>1) {
if (fmt_params->sectors_per_cluster >= onebit) {
fmt_params->sectors_per_cluster = onebit;
if (fmt_params->sectors_per_cluster
<= 32768L/fmt_params->bytes_per_sector) {
4f92e: 7208 moveq #8,%d1 <== NOT EXECUTED
}
}
/*
* try to use user requested cluster size
*/
if ((rqdata != NULL) &&
4f930: 2049 moveal %a1,%a0 <== NOT EXECUTED
*/
for (onebit = 128;onebit >= 1;onebit = onebit>>1) {
if (fmt_params->sectors_per_cluster >= onebit) {
fmt_params->sectors_per_cluster = onebit;
if (fmt_params->sectors_per_cluster
<= 32768L/fmt_params->bytes_per_sector) {
4f932: 203c 0000 0080 movel #128,%d0 <== NOT EXECUTED
}
}
/*
* try to use user requested cluster size
*/
if ((rqdata != NULL) &&
4f938: 42ae fd58 clrl %fp@(-680) <== NOT EXECUTED
*/
for (onebit = 128;onebit >= 1;onebit = onebit>>1) {
if (fmt_params->sectors_per_cluster >= onebit) {
fmt_params->sectors_per_cluster = onebit;
if (fmt_params->sectors_per_cluster
<= 32768L/fmt_params->bytes_per_sector) {
4f93c: 262e ff62 movel %fp@(-158),%d3 <== NOT EXECUTED 4f940: 6000 f5ac braw 4eeee <msdos_format+0x1b0> <== NOT EXECUTED
(rqdata->fattype == MSDOS_FMT_FAT16)) {
fmt_params->fattype = FAT_FAT16;
}
else if ((rqdata != NULL) &&
(rqdata->fattype == MSDOS_FMT_FAT32)) {
fmt_params->fattype = FAT_FAT32;
4f944: 42ae fd58 clrl %fp@(-680) <== NOT EXECUTED 4f948: 7004 moveq #4,%d0 <== NOT EXECUTED 4f94a: 1d40 ff94 moveb %d0,%fp@(-108) <== NOT EXECUTED 4f94e: 6000 f582 braw 4eed2 <msdos_format+0x194> <== NOT EXECUTED
*/
if (ret_val == 0) {
const char *from;
char *to = fmt_params->VolLabel;
int cnt;
from = ""; /* default: make "from" point to empty string */
4f952: 43f9 0006 d5c1 lea 6d5c1 <rtems_filesystem_default_pathconf+0xab>,%a1<== NOT EXECUTED 4f958: 720b moveq #11,%d1 <== NOT EXECUTED
/*
* determine usable Volume Label
*/
if (ret_val == 0) {
const char *from;
char *to = fmt_params->VolLabel;
4f95a: 41ee ff9e lea %fp@(-98),%a0 <== NOT EXECUTED 4f95e: 6000 f7ae braw 4f10e <msdos_format+0x3d0> <== NOT EXECUTED
#define ONE_GB (1024L * 1024L * 1024L)
uint32_t gigs = (total_size + ONE_GB) / ONE_GB;
int b;
fmt_params->fattype = FAT_FAT32;
/* scale with the size of disk... */
for (b = 31; b > 0; b--)
4f962: 701f moveq #31,%d0 <== NOT EXECUTED
if ((gigs & (1 << b)) != 0)
4f964: 7201 moveq #1,%d1 <== NOT EXECUTED
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
}
else {
#define ONE_GB (1024L * 1024L * 1024L)
uint32_t gigs = (total_size + ONE_GB) / ONE_GB;
4f966: 4287 clrl %d7 <== NOT EXECUTED 4f968: 0685 4000 0000 addil #1073741824,%d5 <== NOT EXECUTED 4f96e: d987 addxl %d7,%d4 <== NOT EXECUTED
int b;
fmt_params->fattype = FAT_FAT32;
4f970: 7604 moveq #4,%d3 <== NOT EXECUTED
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
}
else {
#define ONE_GB (1024L * 1024L * 1024L)
uint32_t gigs = (total_size + ONE_GB) / ONE_GB;
4f972: 7e1e moveq #30,%d7 <== NOT EXECUTED 4f974: 2c04 movel %d4,%d6 <== NOT EXECUTED
int b;
fmt_params->fattype = FAT_FAT32;
4f976: 1d43 ff94 moveb %d3,%fp@(-108) <== NOT EXECUTED
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
}
else {
#define ONE_GB (1024L * 1024L * 1024L)
uint32_t gigs = (total_size + ONE_GB) / ONE_GB;
4f97a: e58e lsll #2,%d6 <== NOT EXECUTED 4f97c: 2605 movel %d5,%d3 <== NOT EXECUTED 4f97e: eeab lsrl %d7,%d3 <== NOT EXECUTED 4f980: 8c83 orl %d3,%d6 <== NOT EXECUTED
int b;
fmt_params->fattype = FAT_FAT32;
/* scale with the size of disk... */
for (b = 31; b > 0; b--)
if ((gigs & (1 << b)) != 0)
4f982: 2601 movel %d1,%d3 <== NOT EXECUTED 4f984: e1ab lsll %d0,%d3 <== NOT EXECUTED
#define ONE_GB (1024L * 1024L * 1024L)
uint32_t gigs = (total_size + ONE_GB) / ONE_GB;
int b;
fmt_params->fattype = FAT_FAT32;
/* scale with the size of disk... */
for (b = 31; b > 0; b--)
4f986: 5380 subql #1,%d0 <== NOT EXECUTED
if ((gigs & (1 << b)) != 0)
4f988: 2803 movel %d3,%d4 <== NOT EXECUTED 4f98a: c886 andl %d6,%d4 <== NOT EXECUTED 4f98c: 6606 bnes 4f994 <msdos_format+0xc56> <== NOT EXECUTED
#define ONE_GB (1024L * 1024L * 1024L)
uint32_t gigs = (total_size + ONE_GB) / ONE_GB;
int b;
fmt_params->fattype = FAT_FAT32;
/* scale with the size of disk... */
for (b = 31; b > 0; b--)
4f98e: 4a80 tstl %d0 <== NOT EXECUTED 4f990: 66f0 bnes 4f982 <msdos_format+0xc44> <== NOT EXECUTED 4f992: 7601 moveq #1,%d3 <== NOT EXECUTED
if ((gigs & (1 << b)) != 0)
break;
fmt_params->sectors_per_cluster = 1 << b;
4f994: 2d43 ff6e movel %d3,%fp@(-146) <== NOT EXECUTED 4f998: 6000 f52e braw 4eec8 <msdos_format+0x18a> <== NOT EXECUTED
{0xF0,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF};
if (NULL==memchr(valid_media_codes,
rqdata->media,
sizeof(valid_media_codes))) {
ret_val = -1;
errno = EINVAL;
4f99c: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 4f9a2: 7a16 moveq #22,%d5 <== NOT EXECUTED
const char valid_media_codes[] =
{0xF0,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF};
if (NULL==memchr(valid_media_codes,
rqdata->media,
sizeof(valid_media_codes))) {
ret_val = -1;
4f9a4: 72ff moveq #-1,%d1 <== NOT EXECUTED
errno = EINVAL;
4f9a6: 2040 moveal %d0,%a0 <== NOT EXECUTED
const char valid_media_codes[] =
{0xF0,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF};
if (NULL==memchr(valid_media_codes,
rqdata->media,
sizeof(valid_media_codes))) {
ret_val = -1;
4f9a8: 2d41 fd58 movel %d1,%fp@(-680) <== NOT EXECUTED
errno = EINVAL;
4f9ac: 4281 clrl %d1 <== NOT EXECUTED 4f9ae: 122e ff92 moveb %fp@(-110),%d1 <== NOT EXECUTED 4f9b2: 2085 movel %d5,%a0@ <== NOT EXECUTED 4f9b4: 41ee ff72 lea %fp@(-142),%a0 <== NOT EXECUTED 4f9b8: 4c10 1800 mulsl %a0@,%d1 <== NOT EXECUTED 4f9bc: 202e ff7e movel %fp@(-130),%d0 <== NOT EXECUTED 4f9c0: d2ae ff6a addl %fp@(-150),%d1 <== NOT EXECUTED 4f9c4: 6000 f64c braw 4f012 <msdos_format+0x2d4> <== NOT EXECUTED
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_INFO,
"formating: %s\n", devname);
/* rtems feature: no block devices, all are character devices */
if ((ret_val == 0) && (!S_ISBLK(stat_buf.st_mode))) {
4f9c8: 2806 movel %d6,%d4 <== NOT EXECUTED
* mark this in every copy of the FAT
*/
FAT_SET_VAL32(tmp_sec,8,FAT_FAT32_EOC);
}
for (i = 0;
(i < fmt_params.fat_num) && (ret_val == 0);
4f9ca: 99cc subal %a4,%a4 <== NOT EXECUTED 4f9cc: 6000 f406 braw 4edd4 <msdos_format+0x96> <== NOT EXECUTED
* check sectors per cluster.
* must be power of 2
* must be smaller than or equal to 128
* sectors_per_cluster*bytes_per_sector must not be bigger than 32K
*/
for (onebit = 128;onebit >= 1;onebit = onebit>>1) {
4f9d0: 2d49 ff6e movel %a1,%fp@(-146) <== NOT EXECUTED 4f9d4: 6000 f536 braw 4ef0c <msdos_format+0x1ce> <== NOT EXECUTED
0004eb7a <msdos_format_fill_sectors>:
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
4eb7a: 4e56 ffd0 linkw %fp,#-48 4eb7e: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4eb82: 246e 0018 moveal %fp@(24),%a2 4eb86: 2a6e 0008 moveal %fp@(8),%a5
/*
* allocate and fill buffer
*/
if (ret_val == 0) {
fill_buffer = malloc(sector_size);
4eb8a: 2f0a movel %a2,%sp@-
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
4eb8c: 266e 000c moveal %fp@(12),%a3 4eb90: 262e 0010 movel %fp@(16),%d3 4eb94: 2a2e 0014 movel %fp@(20),%d5 4eb98: 142e 001f moveb %fp@(31),%d2
/*
* allocate and fill buffer
*/
if (ret_val == 0) {
fill_buffer = malloc(sector_size);
4eb9c: 4eb9 0004 6f84 jsr 46f84 <malloc>
if (fill_buffer == NULL) {
4eba2: 588f addql #4,%sp
/*
* allocate and fill buffer
*/
if (ret_val == 0) {
fill_buffer = malloc(sector_size);
4eba4: 2e00 movel %d0,%d7
if (fill_buffer == NULL) {
4eba6: 6700 012c beqw 4ecd4 <msdos_format_fill_sectors+0x15a>
errno = ENOMEM;
ret_val = -1;
}
else {
memset(fill_buffer,fill_byte,sector_size);
4ebaa: 2f0a movel %a2,%sp@- 4ebac: 49c2 extbl %d2
}
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
4ebae: 41fa ff10 lea %pc@(4eac0 <msdos_format_printf>),%a0
if (fill_buffer == NULL) {
errno = ENOMEM;
ret_val = -1;
}
else {
memset(fill_buffer,fill_byte,sector_size);
4ebb2: 2f02 movel %d2,%sp@-
}
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
4ebb4: 2d48 fffc movel %a0,%fp@(-4)
if (fill_buffer == NULL) {
errno = ENOMEM;
ret_val = -1;
}
else {
memset(fill_buffer,fill_byte,sector_size);
4ebb8: 2f00 movel %d0,%sp@- 4ebba: 4eb9 0005 e310 jsr 5e310 <memset>
}
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
4ebc0: 4879 0006 d764 pea 6d764 <_CPU_m68k_BFFFO_table+0x100> 4ebc6: 4878 0002 pea 2 <DOUBLE_FLOAT> 4ebca: 226e fffc moveal %fp@(-4),%a1 4ebce: 2f0d movel %a5,%sp@- 4ebd0: 4e91 jsr %a1@
"Filling : ");
/*
* write to consecutive sectors
*/
while ((ret_val == 0) &&
4ebd2: 4fef 0018 lea %sp@(24),%sp 4ebd6: 4a85 tstl %d5
4ebd8: 6740 beqs 4ec1a <msdos_format_fill_sectors+0xa0> <== NEVER TAKEN
4ebda: 7464 moveq #100,%d2 4ebdc: 4c05 2800 mulsl %d5,%d2 4ebe0: 2805 movel %d5,%d4
\*=========================================================================*/
{
int ret_val = 0;
char *fill_buffer = NULL;
uint32_t total_sectors = sector_cnt;
int last_percent = -1;
4ebe2: 7cff moveq #-1,%d6 4ebe4: 49fa ff24 lea %pc@(4eb0a <msdos_format_write_sec>),%a4
/*
* write to consecutive sectors
*/
while ((ret_val == 0) &&
(sector_cnt > 0)) {
int percent = (sector_cnt * 100) / total_sectors;
4ebe8: 2002 movel %d2,%d0 4ebea: 4c45 0000 remul %d5,%d0,%d0
if (percent != last_percent) {
4ebee: bc80 cmpl %d0,%d6
4ebf0: 6708 beqs 4ebfa <msdos_format_fill_sectors+0x80>
if ((percent & 1) == 0)
4ebf2: 2c00 movel %d0,%d6 4ebf4: 0800 0000 btst #0,%d0
4ebf8: 675c beqs 4ec56 <msdos_format_fill_sectors+0xdc>
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, ".");
last_percent = percent;
}
ret_val = msdos_format_write_sec(fd,start_sector,sector_size,fill_buffer);
4ebfa: 2f07 movel %d7,%sp@-
start_sector++;
sector_cnt--;
4ebfc: 5384 subql #1,%d4 4ebfe: 0682 ffff ff9c addil #-100,%d2
if (percent != last_percent) {
if ((percent & 1) == 0)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, ".");
last_percent = percent;
}
ret_val = msdos_format_write_sec(fd,start_sector,sector_size,fill_buffer);
4ec04: 2f0a movel %a2,%sp@- 4ec06: 2f03 movel %d3,%sp@-
start_sector++;
4ec08: 5283 addql #1,%d3
if (percent != last_percent) {
if ((percent & 1) == 0)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, ".");
last_percent = percent;
}
ret_val = msdos_format_write_sec(fd,start_sector,sector_size,fill_buffer);
4ec0a: 2f0b movel %a3,%sp@- 4ec0c: 4e94 jsr %a4@
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"Filling : ");
/*
* write to consecutive sectors
*/
while ((ret_val == 0) &&
4ec0e: 4fef 0010 lea %sp@(16),%sp 4ec12: 4a80 tstl %d0
4ec14: 6672 bnes 4ec88 <msdos_format_fill_sectors+0x10e><== NEVER TAKEN
4ec16: 4a84 tstl %d4
4ec18: 66ce bnes 4ebe8 <msdos_format_fill_sectors+0x6e>
ret_val = msdos_format_write_sec(fd,start_sector,sector_size,fill_buffer);
start_sector++;
sector_cnt--;
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, "\n");
4ec1a: 4879 0006 cc04 pea 6cc04 <rtems_filesystem_table+0x314> 4ec20: 4280 clrl %d0 4ec22: 4878 0002 pea 2 <DOUBLE_FLOAT> 4ec26: 226e fffc moveal %fp@(-4),%a1 4ec2a: 2f0d movel %a5,%sp@- 4ec2c: 2d40 fff8 movel %d0,%fp@(-8) 4ec30: 4e91 jsr %a1@ 4ec32: 202e fff8 movel %fp@(-8),%d0 4ec36: 4fef 000c lea %sp@(12),%sp
/*
* cleanup
*/
if (fill_buffer != NULL) {
free(fill_buffer);
4ec3a: 2d40 fff8 movel %d0,%fp@(-8) 4ec3e: 2f07 movel %d7,%sp@- 4ec40: 4eb9 0004 680c jsr 4680c <free> 4ec46: 202e fff8 movel %fp@(-8),%d0 4ec4a: 588f addql #4,%sp
fill_buffer = NULL;
}
return ret_val;
}
4ec4c: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 4ec52: 4e5e unlk %fp 4ec54: 4e75 rts
while ((ret_val == 0) &&
(sector_cnt > 0)) {
int percent = (sector_cnt * 100) / total_sectors;
if (percent != last_percent) {
if ((percent & 1) == 0)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, ".");
4ec56: 4879 0006 c367 pea 6c367 <_rodata_start+0x1b7>
last_percent = percent;
}
ret_val = msdos_format_write_sec(fd,start_sector,sector_size,fill_buffer);
start_sector++;
sector_cnt--;
4ec5c: 5384 subql #1,%d4
while ((ret_val == 0) &&
(sector_cnt > 0)) {
int percent = (sector_cnt * 100) / total_sectors;
if (percent != last_percent) {
if ((percent & 1) == 0)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, ".");
4ec5e: 4878 0002 pea 2 <DOUBLE_FLOAT>
last_percent = percent;
}
ret_val = msdos_format_write_sec(fd,start_sector,sector_size,fill_buffer);
start_sector++;
sector_cnt--;
4ec62: 0682 ffff ff9c addil #-100,%d2
while ((ret_val == 0) &&
(sector_cnt > 0)) {
int percent = (sector_cnt * 100) / total_sectors;
if (percent != last_percent) {
if ((percent & 1) == 0)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, ".");
4ec68: 206e fffc moveal %fp@(-4),%a0 4ec6c: 2f0d movel %a5,%sp@- 4ec6e: 4e90 jsr %a0@ 4ec70: 4fef 000c lea %sp@(12),%sp
last_percent = percent;
}
ret_val = msdos_format_write_sec(fd,start_sector,sector_size,fill_buffer);
4ec74: 2f07 movel %d7,%sp@- 4ec76: 2f0a movel %a2,%sp@- 4ec78: 2f03 movel %d3,%sp@-
start_sector++;
4ec7a: 5283 addql #1,%d3
if (percent != last_percent) {
if ((percent & 1) == 0)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, ".");
last_percent = percent;
}
ret_val = msdos_format_write_sec(fd,start_sector,sector_size,fill_buffer);
4ec7c: 2f0b movel %a3,%sp@- 4ec7e: 4e94 jsr %a4@
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"Filling : ");
/*
* write to consecutive sectors
*/
while ((ret_val == 0) &&
4ec80: 4fef 0010 lea %sp@(16),%sp 4ec84: 4a80 tstl %d0
4ec86: 678e beqs 4ec16 <msdos_format_fill_sectors+0x9c> <== ALWAYS TAKEN
ret_val = msdos_format_write_sec(fd,start_sector,sector_size,fill_buffer);
start_sector++;
sector_cnt--;
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, "\n");
4ec88: 4879 0006 cc04 pea 6cc04 <rtems_filesystem_table+0x314> <== NOT EXECUTED 4ec8e: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED 4ec92: 226e fffc moveal %fp@(-4),%a1 <== NOT EXECUTED 4ec96: 2f0d movel %a5,%sp@- <== NOT EXECUTED 4ec98: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED 4ec9c: 4e91 jsr %a1@ <== NOT EXECUTED
if (ret_val)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_INFO,
4ec9e: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 4eca2: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4eca4: 4879 0006 d76f pea 6d76f <_CPU_m68k_BFFFO_table+0x10b> <== NOT EXECUTED 4ecaa: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 4ecae: 2f0d movel %a5,%sp@- <== NOT EXECUTED 4ecb0: 4e90 jsr %a0@ <== NOT EXECUTED
"filling error on sector: %d\n", start_sector);
/*
* cleanup
*/
if (fill_buffer != NULL) {
4ecb2: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED 4ecb6: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED 4ecba: 4a87 tstl %d7 <== NOT EXECUTED 4ecbc: 678e beqs 4ec4c <msdos_format_fill_sectors+0xd2> <== NOT EXECUTED
free(fill_buffer);
4ecbe: 2f07 movel %d7,%sp@- <== NOT EXECUTED 4ecc0: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED 4ecc4: 4eb9 0004 680c jsr 4680c <free> <== NOT EXECUTED 4ecca: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED 4ecce: 588f addql #4,%sp <== NOT EXECUTED 4ecd0: 6000 ff7a braw 4ec4c <msdos_format_fill_sectors+0xd2> <== NOT EXECUTED
* allocate and fill buffer
*/
if (ret_val == 0) {
fill_buffer = malloc(sector_size);
if (fill_buffer == NULL) {
errno = ENOMEM;
4ecd4: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 4ecda: 720c moveq #12,%d1 <== NOT EXECUTED 4ecdc: 2040 moveal %d0,%a0 <== NOT EXECUTED
ret_val = -1;
4ecde: 70ff moveq #-1,%d0 <== NOT EXECUTED
else {
memset(fill_buffer,fill_byte,sector_size);
}
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
4ece0: 43fa fdde lea %pc@(4eac0 <msdos_format_printf>),%a1 <== NOT EXECUTED
* allocate and fill buffer
*/
if (ret_val == 0) {
fill_buffer = malloc(sector_size);
if (fill_buffer == NULL) {
errno = ENOMEM;
4ece4: 2081 movel %d1,%a0@ <== NOT EXECUTED
else {
memset(fill_buffer,fill_byte,sector_size);
}
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
4ece6: 4879 0006 d764 pea 6d764 <_CPU_m68k_BFFFO_table+0x100> <== NOT EXECUTED 4ecec: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED 4ecf0: 2d49 fffc movel %a1,%fp@(-4) <== NOT EXECUTED 4ecf4: 2f0d movel %a5,%sp@- <== NOT EXECUTED 4ecf6: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED 4ecfa: 4e91 jsr %a1@ <== NOT EXECUTED 4ecfc: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
ret_val = msdos_format_write_sec(fd,start_sector,sector_size,fill_buffer);
start_sector++;
sector_cnt--;
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, "\n");
4ed00: 4879 0006 cc04 pea 6cc04 <rtems_filesystem_table+0x314> <== NOT EXECUTED 4ed06: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED 4ed0a: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED 4ed0e: 2f0d movel %a5,%sp@- <== NOT EXECUTED 4ed10: 226e fffc moveal %fp@(-4),%a1 <== NOT EXECUTED 4ed14: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED 4ed18: 4e91 jsr %a1@ <== NOT EXECUTED
if (ret_val)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_INFO,
4ed1a: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 4ed1e: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4ed20: 4879 0006 d76f pea 6d76f <_CPU_m68k_BFFFO_table+0x10b> <== NOT EXECUTED 4ed26: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 4ed2a: 2f0d movel %a5,%sp@- <== NOT EXECUTED 4ed2c: 4e90 jsr %a0@ <== NOT EXECUTED
"filling error on sector: %d\n", start_sector);
/*
* cleanup
*/
if (fill_buffer != NULL) {
4ed2e: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED 4ed32: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED 4ed36: 4a87 tstl %d7 <== NOT EXECUTED 4ed38: 6684 bnes 4ecbe <msdos_format_fill_sectors+0x144><== NOT EXECUTED 4ed3a: 6000 ff10 braw 4ec4c <msdos_format_fill_sectors+0xd2> <== NOT EXECUTED
0004eac0 <msdos_format_printf>:
*/
static void
msdos_format_printf (const msdos_format_request_param_t *rqdata,
int info_level,
const char *format, ...)
{
4eac0: 4e56 0000 linkw %fp,#0 4eac4: 206e 0008 moveal %fp@(8),%a0
va_list args; va_start (args, format); if (rqdata != NULL && rqdata->info_level >= info_level)
4eac8: 4a88 tstl %a0
4eaca: 670a beqs 4ead6 <msdos_format_printf+0x16> <== NEVER TAKEN
4eacc: 202e 000c movel %fp@(12),%d0 4ead0: b0a8 001c cmpl %a0@(28),%d0
4ead4: 6f04 bles 4eada <msdos_format_printf+0x1a> <== NEVER TAKEN
{
vfprintf (stdout, format, args);
fflush (stdout);
}
va_end (args);
}
4ead6: 4e5e unlk %fp 4ead8: 4e75 rts
{
va_list args;
va_start (args, format);
if (rqdata != NULL && rqdata->info_level >= info_level)
{
vfprintf (stdout, format, args);
4eada: 486e 0014 pea %fp@(20) <== NOT EXECUTED 4eade: 2079 0006 ec2c moveal 6ec2c <_impure_ptr>,%a0 <== NOT EXECUTED 4eae4: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 4eae8: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 4eaec: 4eb9 0006 4e4c jsr 64e4c <vfprintf> <== NOT EXECUTED
fflush (stdout);
4eaf2: 2079 0006 ec2c moveal 6ec2c <_impure_ptr>,%a0 <== NOT EXECUTED 4eaf8: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 4eafc: 4eb9 0005 dcb8 jsr 5dcb8 <fflush> <== NOT EXECUTED 4eb02: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
} va_end (args); }
4eb06: 4e5e unlk %fp <== NOT EXECUTED
0004eb0a <msdos_format_write_sec>:
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
int ret_val = 0;
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
4eb0a: 4280 clrl %d0
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
4eb0c: 4e56 0000 linkw %fp,#0
int ret_val = 0;
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
4eb10: 222e 000c movel %fp@(12),%d1
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
4eb14: 2f03 movel %d3,%sp@- 4eb16: 262e 0010 movel %fp@(16),%d3 4eb1a: 2f02 movel %d2,%sp@- 4eb1c: 242e 0008 movel %fp@(8),%d2
int ret_val = 0;
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
4eb20: 42a7 clrl %sp@- 4eb22: 2f03 movel %d3,%sp@- 4eb24: 42a7 clrl %sp@- 4eb26: 2f01 movel %d1,%sp@- 4eb28: 2f00 movel %d0,%sp@- 4eb2a: 4eb9 0006 a20c jsr 6a20c <__muldi3> 4eb30: 4fef 000c lea %sp@(12),%sp 4eb34: 2e81 movel %d1,%sp@ 4eb36: 2f00 movel %d0,%sp@- 4eb38: 2f02 movel %d2,%sp@- 4eb3a: 4eb9 0004 6cac jsr 46cac <lseek> 4eb40: 4fef 0010 lea %sp@(16),%sp 4eb44: 4a80 tstl %d0
4eb46: 6b24 bmis 4eb6c <msdos_format_write_sec+0x62> <== NEVER TAKEN
ret_val = -1;
}
if (ret_val == 0) {
if (0 > write(fd,buffer,sector_size)) {
4eb48: 2f03 movel %d3,%sp@- 4eb4a: 2f2e 0014 movel %fp@(20),%sp@- 4eb4e: 2f02 movel %d2,%sp@- 4eb50: 4eb9 0004 a734 jsr 4a734 <write>
ret_val = -1;
}
}
return ret_val;
}
4eb56: 242e fff8 movel %fp@(-8),%d2
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
ret_val = -1;
}
if (ret_val == 0) {
if (0 > write(fd,buffer,sector_size)) {
4eb5a: 4a80 tstl %d0 4eb5c: 5dc0 slt %d0
ret_val = -1;
}
}
return ret_val;
}
4eb5e: 262e fffc movel %fp@(-4),%d3
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
ret_val = -1;
}
if (ret_val == 0) {
if (0 > write(fd,buffer,sector_size)) {
4eb62: 4fef 000c lea %sp@(12),%sp 4eb66: 49c0 extbl %d0
ret_val = -1;
}
}
return ret_val;
}
4eb68: 4e5e unlk %fp 4eb6a: 4e75 rts
4eb6c: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
int ret_val = 0;
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
4eb70: 70ff moveq #-1,%d0 <== NOT EXECUTED
ret_val = -1;
}
}
return ret_val;
}
4eb72: 262e fffc movel %fp@(-4),%d3 <== NOT EXECUTED 4eb76: 4e5e unlk %fp <== NOT EXECUTED
000599cc <msdos_free_node_info>:
* RC_OK on success, or -1 code if error occured
*
*/
int
msdos_free_node_info(rtems_filesystem_location_info_t *pathloc)
{
599cc: 4e56 0000 linkw %fp,#0 599d0: 2f0b movel %a3,%sp@- 599d2: 2f0a movel %a2,%sp@- 599d4: 246e 0008 moveal %fp@(8),%a2
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
599d8: 206a 0010 moveal %a2@(16),%a0 599dc: 2668 0034 moveal %a0@(52),%a3
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
599e0: 42a7 clrl %sp@- 599e2: 42a7 clrl %sp@- 599e4: 2f2b 0088 movel %a3@(136),%sp@- 599e8: 4eb9 0004 af20 jsr 4af20 <rtems_semaphore_obtain>
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
599ee: 4fef 000c lea %sp@(12),%sp 599f2: 4a80 tstl %d0
599f4: 662a bnes 59a20 <msdos_free_node_info+0x54> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one(EIO);
rc = fat_file_close(pathloc->mt_entry, pathloc->node_access);
599f6: 2f12 movel %a2@,%sp@- 599f8: 2f2a 0010 movel %a2@(16),%sp@- 599fc: 4eb9 0005 2fc2 jsr 52fc2 <fat_file_close>
rtems_semaphore_release(fs_info->vol_sema);
59a02: 2f2b 0088 movel %a3@(136),%sp@-
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
rc = fat_file_close(pathloc->mt_entry, pathloc->node_access);
59a06: 2440 moveal %d0,%a2
rtems_semaphore_release(fs_info->vol_sema);
59a08: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release>
return rc;
}
59a0e: 266e fffc moveal %fp@(-4),%a3 59a12: 200a movel %a2,%d0
rtems_set_errno_and_return_minus_one(EIO);
rc = fat_file_close(pathloc->mt_entry, pathloc->node_access);
rtems_semaphore_release(fs_info->vol_sema);
return rc;
59a14: 4fef 000c lea %sp@(12),%sp
}
59a18: 246e fff8 moveal %fp@(-8),%a2 59a1c: 4e5e unlk %fp 59a1e: 4e75 rts
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
59a20: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 59a26: 347c ffff moveaw #-1,%a2 <== NOT EXECUTED 59a2a: 2040 moveal %d0,%a0 <== NOT EXECUTED 59a2c: 7005 moveq #5,%d0 <== NOT EXECUTED 59a2e: 2080 movel %d0,%a0@ <== NOT EXECUTED
rc = fat_file_close(pathloc->mt_entry, pathloc->node_access);
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
59a30: 200a movel %a2,%d0 <== NOT EXECUTED 59a32: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 59a36: 266e fffc moveal %fp@(-4),%a3 <== NOT EXECUTED 59a3a: 4e5e unlk %fp <== NOT EXECUTED
...
0005aeb8 <msdos_get_dotdot_dir_info_cluster_num_and_offset>:
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
fat_dir_pos_t *dir_pos,
char *dir_entry
)
{
5aeb8: 4e56 ff8c linkw %fp,#-116 <== NOT EXECUTED 5aebc: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED
int rc = RC_OK;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
fat_file_fd_t *fat_fd = NULL;
5aec0: 264e moveal %fp,%a3 <== NOT EXECUTED
uint32_t cl4find = 0;
/*
* open fat-file corresponded to ".."
*/
rc = fat_file_open(mt_entry, dir_pos, &fat_fd);
5aec2: 4bf9 0005 29b2 lea 529b2 <fat_file_open>,%a5 <== NOT EXECUTED
char *dir_entry
)
{
int rc = RC_OK;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
fat_file_fd_t *fat_fd = NULL;
5aec8: 42a3 clrl %a3@- <== NOT EXECUTED
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
fat_dir_pos_t *dir_pos,
char *dir_entry
)
{
5aeca: 286e 0010 moveal %fp@(16),%a4 <== NOT EXECUTED
uint32_t cl4find = 0;
/*
* open fat-file corresponded to ".."
*/
rc = fat_file_open(mt_entry, dir_pos, &fat_fd);
5aece: 2f0b movel %a3,%sp@- <== NOT EXECUTED
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
fat_dir_pos_t *dir_pos,
char *dir_entry
)
{
5aed0: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
uint32_t cl4find = 0;
/*
* open fat-file corresponded to ".."
*/
rc = fat_file_open(mt_entry, dir_pos, &fat_fd);
5aed4: 2f0c movel %a4,%sp@- <== NOT EXECUTED
fat_dir_pos_t *dir_pos,
char *dir_entry
)
{
int rc = RC_OK;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
5aed6: 282a 0034 movel %a2@(52),%d4 <== NOT EXECUTED
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
fat_dir_pos_t *dir_pos,
char *dir_entry
)
{
5aeda: 262e 000c movel %fp@(12),%d3 <== NOT EXECUTED
uint32_t cl4find = 0;
/*
* open fat-file corresponded to ".."
*/
rc = fat_file_open(mt_entry, dir_pos, &fat_fd);
5aede: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5aee0: 4e95 jsr %a5@ <== NOT EXECUTED
if (rc != RC_OK)
5aee2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
uint32_t cl4find = 0;
/*
* open fat-file corresponded to ".."
*/
rc = fat_file_open(mt_entry, dir_pos, &fat_fd);
5aee6: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc != RC_OK)
5aee8: 670c beqs 5aef6 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x3e><== NOT EXECUTED
fat_file_close(mt_entry, fat_fd);
return rc;
}
rc = fat_file_close(mt_entry, fat_fd);
return rc;
}
5aeea: 2002 movel %d2,%d0 <== NOT EXECUTED 5aeec: 4cee 3cfc ff8c moveml %fp@(-116),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5aef2: 4e5e unlk %fp <== NOT EXECUTED 5aef4: 4e75 rts <== NOT EXECUTED
*/
rc = fat_file_open(mt_entry, dir_pos, &fat_fd);
if (rc != RC_OK)
return rc;
fat_fd->cln = cln;
5aef6: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED
fat_fd->fat_file_type = FAT_DIRECTORY;
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
5aefa: 7020 moveq #32,%d0 <== NOT EXECUTED 5aefc: 4840 swap %d0 <== NOT EXECUTED
*/
rc = fat_file_open(mt_entry, dir_pos, &fat_fd);
if (rc != RC_OK)
return rc;
fat_fd->cln = cln;
5aefe: 2143 001c movel %d3,%a0@(28) <== NOT EXECUTED
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
fat_fd->map.file_cln = 0;
fat_fd->map.disk_cln = fat_fd->cln;
rc = fat_file_size(mt_entry, fat_fd);
5af02: 2a3c 0005 37c2 movel #341954,%d5 <== NOT EXECUTED
if (rc != RC_OK)
return rc;
fat_fd->cln = cln;
fat_fd->fat_file_type = FAT_DIRECTORY;
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
5af08: 2140 0014 movel %d0,%a0@(20) <== NOT EXECUTED
rc = fat_file_open(mt_entry, dir_pos, &fat_fd);
if (rc != RC_OK)
return rc;
fat_fd->cln = cln;
fat_fd->fat_file_type = FAT_DIRECTORY;
5af0c: 7001 moveq #1,%d0 <== NOT EXECUTED
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
fat_fd->map.file_cln = 0;
5af0e: 42a8 0032 clrl %a0@(50) <== NOT EXECUTED
rc = fat_file_open(mt_entry, dir_pos, &fat_fd);
if (rc != RC_OK)
return rc;
fat_fd->cln = cln;
fat_fd->fat_file_type = FAT_DIRECTORY;
5af12: 2140 0010 movel %d0,%a0@(16) <== NOT EXECUTED
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
fat_fd->map.file_cln = 0;
fat_fd->map.disk_cln = fat_fd->cln;
5af16: 2143 0036 movel %d3,%a0@(54) <== NOT EXECUTED
rc = fat_file_size(mt_entry, fat_fd);
5af1a: 2f08 movel %a0,%sp@- <== NOT EXECUTED 5af1c: 2045 moveal %d5,%a0 <== NOT EXECUTED 5af1e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5af20: 4e90 jsr %a0@ <== NOT EXECUTED
if (rc != RC_OK)
5af22: 508f addql #8,%sp <== NOT EXECUTED
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
fat_fd->map.file_cln = 0;
fat_fd->map.disk_cln = fat_fd->cln;
rc = fat_file_size(mt_entry, fat_fd);
5af24: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc != RC_OK)
5af26: 6600 021e bnew 5b146 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x28e><== NOT EXECUTED
return rc;
}
/* find "." node in opened directory */
memset(dot_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
msdos_long_to_short(".", 1, dot_node, MSDOS_SHORT_NAME_LEN);
5af2a: 4878 000b pea b <LASTO+0x1> <== NOT EXECUTED
fat_file_close(mt_entry, fat_fd);
return rc;
}
/* find "." node in opened directory */
memset(dot_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
5af2e: 260e movel %fp,%d3 <== NOT EXECUTED 5af30: 0683 ffff ffbc addil #-68,%d3 <== NOT EXECUTED 5af36: 2243 moveal %d3,%a1 <== NOT EXECUTED
msdos_long_to_short(".", 1, dot_node, MSDOS_SHORT_NAME_LEN);
5af38: 41f9 0005 9b40 lea 59b40 <msdos_long_to_short>,%a0 <== NOT EXECUTED
rc = msdos_find_name_in_fat_file(mt_entry, fat_fd, false, ".", 1,
5af3e: 2e3c 0005 a3a8 movel #369576,%d7 <== NOT EXECUTED
return rc;
}
/* find "." node in opened directory */
memset(dot_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
msdos_long_to_short(".", 1, dot_node, MSDOS_SHORT_NAME_LEN);
5af44: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5af46: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 5af4a: 4879 0006 c367 pea 6c367 <_rodata_start+0x1b7> <== NOT EXECUTED
fat_file_close(mt_entry, fat_fd);
return rc;
}
/* find "." node in opened directory */
memset(dot_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
5af50: 4291 clrl %a1@ <== NOT EXECUTED 5af52: 42ae ffc0 clrl %fp@(-64) <== NOT EXECUTED
msdos_long_to_short(".", 1, dot_node, MSDOS_SHORT_NAME_LEN);
5af56: 2d48 ffb6 movel %a0,%fp@(-74) <== NOT EXECUTED
fat_file_close(mt_entry, fat_fd);
return rc;
}
/* find "." node in opened directory */
memset(dot_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
5af5a: 42ae ffc4 clrl %fp@(-60) <== NOT EXECUTED 5af5e: 42ae ffc8 clrl %fp@(-56) <== NOT EXECUTED 5af62: 42ae ffcc clrl %fp@(-52) <== NOT EXECUTED 5af66: 42ae ffd0 clrl %fp@(-48) <== NOT EXECUTED 5af6a: 42ae ffd4 clrl %fp@(-44) <== NOT EXECUTED 5af6e: 42ae ffd8 clrl %fp@(-40) <== NOT EXECUTED
msdos_long_to_short(".", 1, dot_node, MSDOS_SHORT_NAME_LEN);
5af72: 4e90 jsr %a0@ <== NOT EXECUTED
rc = msdos_find_name_in_fat_file(mt_entry, fat_fd, false, ".", 1,
5af74: 2247 moveal %d7,%a1 <== NOT EXECUTED 5af76: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5af78: 2f0c movel %a4,%sp@- <== NOT EXECUTED 5af7a: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 5af7e: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 5af82: 4879 0006 c367 pea 6c367 <_rodata_start+0x1b7> <== NOT EXECUTED 5af88: 42a7 clrl %sp@- <== NOT EXECUTED 5af8a: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 5af8e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5af90: 4e91 jsr %a1@ <== NOT EXECUTED
MSDOS_NAME_SHORT, dir_pos, dot_node);
if (rc != RC_OK)
5af92: 206e ffb6 moveal %fp@(-74),%a0 <== NOT EXECUTED
}
/* find "." node in opened directory */
memset(dot_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
msdos_long_to_short(".", 1, dot_node, MSDOS_SHORT_NAME_LEN);
rc = msdos_find_name_in_fat_file(mt_entry, fat_fd, false, ".", 1,
5af96: 2400 movel %d0,%d2 <== NOT EXECUTED
MSDOS_NAME_SHORT, dir_pos, dot_node);
if (rc != RC_OK)
5af98: 4fef 0030 lea %sp@(48),%sp <== NOT EXECUTED 5af9c: 6600 01a8 bnew 5b146 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x28e><== NOT EXECUTED
return rc;
}
/* find ".." node in opened directory */
memset(dotdot_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
msdos_long_to_short("..", 2, dotdot_node, MSDOS_SHORT_NAME_LEN);
5afa0: 4878 000b pea b <LASTO+0x1> <== NOT EXECUTED
fat_file_close(mt_entry, fat_fd);
return rc;
}
/* find ".." node in opened directory */
memset(dotdot_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
5afa4: 2c0e movel %fp,%d6 <== NOT EXECUTED 5afa6: 0686 ffff ffdc addil #-36,%d6 <== NOT EXECUTED 5afac: 2246 moveal %d6,%a1 <== NOT EXECUTED
msdos_long_to_short("..", 2, dotdot_node, MSDOS_SHORT_NAME_LEN);
5afae: 2f06 movel %d6,%sp@- <== NOT EXECUTED 5afb0: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED 5afb4: 4879 0006 c366 pea 6c366 <_rodata_start+0x1b6> <== NOT EXECUTED
fat_file_close(mt_entry, fat_fd);
return rc;
}
/* find ".." node in opened directory */
memset(dotdot_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
5afba: 42ae ffe0 clrl %fp@(-32) <== NOT EXECUTED 5afbe: 4291 clrl %a1@ <== NOT EXECUTED 5afc0: 42ae ffe4 clrl %fp@(-28) <== NOT EXECUTED 5afc4: 42ae ffe8 clrl %fp@(-24) <== NOT EXECUTED 5afc8: 42ae ffec clrl %fp@(-20) <== NOT EXECUTED 5afcc: 42ae fff0 clrl %fp@(-16) <== NOT EXECUTED 5afd0: 42ae fff4 clrl %fp@(-12) <== NOT EXECUTED 5afd4: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED
msdos_long_to_short("..", 2, dotdot_node, MSDOS_SHORT_NAME_LEN);
5afd8: 4e90 jsr %a0@ <== NOT EXECUTED
rc = msdos_find_name_in_fat_file(mt_entry, fat_fd, false, "..", 2,
5afda: 2047 moveal %d7,%a0 <== NOT EXECUTED 5afdc: 2f06 movel %d6,%sp@- <== NOT EXECUTED 5afde: 2f0c movel %a4,%sp@- <== NOT EXECUTED 5afe0: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 5afe4: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED 5afe8: 4879 0006 c366 pea 6c366 <_rodata_start+0x1b6> <== NOT EXECUTED 5afee: 42a7 clrl %sp@- <== NOT EXECUTED 5aff0: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 5aff4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5aff6: 4e90 jsr %a0@ <== NOT EXECUTED
MSDOS_NAME_SHORT, dir_pos,
dotdot_node);
if (rc != RC_OK)
5aff8: 4fef 0030 lea %sp@(48),%sp <== NOT EXECUTED
}
/* find ".." node in opened directory */
memset(dotdot_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
msdos_long_to_short("..", 2, dotdot_node, MSDOS_SHORT_NAME_LEN);
rc = msdos_find_name_in_fat_file(mt_entry, fat_fd, false, "..", 2,
5affc: 2400 movel %d0,%d2 <== NOT EXECUTED
MSDOS_NAME_SHORT, dir_pos,
dotdot_node);
if (rc != RC_OK)
5affe: 6600 0146 bnew 5b146 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x28e><== NOT EXECUTED
}
cl4find = MSDOS_EXTRACT_CLUSTER_NUM(dot_node);
/* close fat-file corresponded to ".." directory */
rc = fat_file_close(mt_entry, fat_fd);
5b002: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED
{
fat_file_close(mt_entry, fat_fd);
return rc;
}
cl4find = MSDOS_EXTRACT_CLUSTER_NUM(dot_node);
5b006: 2243 moveal %d3,%a1 <== NOT EXECUTED 5b008: 2043 moveal %d3,%a0 <== NOT EXECUTED
/* close fat-file corresponded to ".." directory */
rc = fat_file_close(mt_entry, fat_fd);
5b00a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5b00c: 2e3c 0005 2fc2 movel #339906,%d7 <== NOT EXECUTED
{
fat_file_close(mt_entry, fat_fd);
return rc;
}
cl4find = MSDOS_EXTRACT_CLUSTER_NUM(dot_node);
5b012: 3269 001a moveaw %a1@(26),%a1 <== NOT EXECUTED 5b016: 3628 0014 movew %a0@(20),%d3 <== NOT EXECUTED 5b01a: 3d49 ffba movew %a1,%fp@(-70) <== NOT EXECUTED 5b01e: 3d43 ffb4 movew %d3,%fp@(-76) <== NOT EXECUTED
/* close fat-file corresponded to ".." directory */
rc = fat_file_close(mt_entry, fat_fd);
5b022: 2247 moveal %d7,%a1 <== NOT EXECUTED 5b024: 4e91 jsr %a1@ <== NOT EXECUTED
if ( rc != RC_OK )
5b026: 508f addql #8,%sp <== NOT EXECUTED
}
cl4find = MSDOS_EXTRACT_CLUSTER_NUM(dot_node);
/* close fat-file corresponded to ".." directory */
rc = fat_file_close(mt_entry, fat_fd);
5b028: 2400 movel %d0,%d2 <== NOT EXECUTED
if ( rc != RC_OK )
5b02a: 6600 febe bnew 5aeea <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x32><== NOT EXECUTED
return rc;
if ( (MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node)) == 0)
5b02e: 2246 moveal %d6,%a1 <== NOT EXECUTED 5b030: 4280 clrl %d0 <== NOT EXECUTED 5b032: 4282 clrl %d2 <== NOT EXECUTED 5b034: 3029 0014 movew %a1@(20),%d0 <== NOT EXECUTED 5b038: 3429 001a movew %a1@(26),%d2 <== NOT EXECUTED 5b03c: 2040 moveal %d0,%a0 <== NOT EXECUTED 5b03e: 2202 movel %d2,%d1 <== NOT EXECUTED 5b040: 2608 movel %a0,%d3 <== NOT EXECUTED 5b042: e08b lsrl #8,%d3 <== NOT EXECUTED 5b044: e08a lsrl #8,%d2 <== NOT EXECUTED 5b046: e188 lsll #8,%d0 <== NOT EXECUTED 5b048: e189 lsll #8,%d1 <== NOT EXECUTED 5b04a: 8083 orl %d3,%d0 <== NOT EXECUTED 5b04c: 8282 orl %d2,%d1 <== NOT EXECUTED 5b04e: 4840 swap %d0 <== NOT EXECUTED 5b050: 4240 clrw %d0 <== NOT EXECUTED 5b052: 0281 0000 ffff andil #65535,%d1 <== NOT EXECUTED 5b058: 8081 orl %d1,%d0 <== NOT EXECUTED 5b05a: 6612 bnes 5b06e <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x1b6><== NOT EXECUTED
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
5b05c: 70ff moveq #-1,%d0 <== NOT EXECUTED
/*
* we handle root dir for all FAT types in the same way with the
* ordinary directories ( through fat_file_* calls )
*/
fat_dir_pos_init(dir_pos);
dir_pos->sname.cln = FAT_ROOTDIR_CLUSTER_NUM;
5b05e: 7601 moveq #1,%d3 <== NOT EXECUTED
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
5b060: 42ac 0004 clrl %a4@(4) <== NOT EXECUTED
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
5b064: 2940 0008 movel %d0,%a4@(8) <== NOT EXECUTED
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
5b068: 2940 000c movel %d0,%a4@(12) <== NOT EXECUTED 5b06c: 2883 movel %d3,%a4@ <== NOT EXECUTED
}
/* open fat-file corresponded to second ".." */
rc = fat_file_open(mt_entry, dir_pos, &fat_fd);
5b06e: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5b070: 2f0c movel %a4,%sp@- <== NOT EXECUTED 5b072: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5b074: 4e95 jsr %a5@ <== NOT EXECUTED
if (rc != RC_OK)
5b076: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
fat_dir_pos_init(dir_pos);
dir_pos->sname.cln = FAT_ROOTDIR_CLUSTER_NUM;
}
/* open fat-file corresponded to second ".." */
rc = fat_file_open(mt_entry, dir_pos, &fat_fd);
5b07a: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc != RC_OK)
5b07c: 6600 fe6c bnew 5aeea <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x32><== NOT EXECUTED
return rc;
if ((MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node)) == 0)
5b080: 2246 moveal %d6,%a1 <== NOT EXECUTED 5b082: 4283 clrl %d3 <== NOT EXECUTED 5b084: 4282 clrl %d2 <== NOT EXECUTED 5b086: 3629 0014 movew %a1@(20),%d3 <== NOT EXECUTED 5b08a: 3429 001a movew %a1@(26),%d2 <== NOT EXECUTED 5b08e: 2043 moveal %d3,%a0 <== NOT EXECUTED 5b090: 2008 movel %a0,%d0 <== NOT EXECUTED 5b092: 2202 movel %d2,%d1 <== NOT EXECUTED 5b094: 2c08 movel %a0,%d6 <== NOT EXECUTED 5b096: e08e lsrl #8,%d6 <== NOT EXECUTED 5b098: e08a lsrl #8,%d2 <== NOT EXECUTED 5b09a: e188 lsll #8,%d0 <== NOT EXECUTED 5b09c: e189 lsll #8,%d1 <== NOT EXECUTED
fat_fd->cln = fs_info->fat.vol.rdir_cl;
5b09e: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 5b0a2: 8086 orl %d6,%d0 <== NOT EXECUTED 5b0a4: 8282 orl %d2,%d1 <== NOT EXECUTED
/* open fat-file corresponded to second ".." */
rc = fat_file_open(mt_entry, dir_pos, &fat_fd);
if (rc != RC_OK)
return rc;
if ((MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node)) == 0)
5b0a6: 4840 swap %d0 <== NOT EXECUTED 5b0a8: 4240 clrw %d0 <== NOT EXECUTED 5b0aa: 0281 0000 ffff andil #65535,%d1 <== NOT EXECUTED 5b0b0: 8081 orl %d1,%d0 <== NOT EXECUTED 5b0b2: 6600 00ac bnew 5b160 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x2a8><== NOT EXECUTED
fat_fd->cln = fs_info->fat.vol.rdir_cl;
5b0b6: 2244 moveal %d4,%a1 <== NOT EXECUTED 5b0b8: 43e9 0034 lea %a1@(52),%a1 <== NOT EXECUTED 5b0bc: 2151 001c movel %a1@,%a0@(28) <== NOT EXECUTED
else
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node);
fat_fd->fat_file_type = FAT_DIRECTORY;
5b0c0: 7001 moveq #1,%d0 <== NOT EXECUTED
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
5b0c2: 7620 moveq #32,%d3 <== NOT EXECUTED 5b0c4: 4843 swap %d3 <== NOT EXECUTED
fat_fd->map.file_cln = 0;
fat_fd->map.disk_cln = fat_fd->cln;
5b0c6: 2168 001c 0036 movel %a0@(28),%a0@(54) <== NOT EXECUTED
if ((MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node)) == 0)
fat_fd->cln = fs_info->fat.vol.rdir_cl;
else
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node);
fat_fd->fat_file_type = FAT_DIRECTORY;
5b0cc: 2140 0010 movel %d0,%a0@(16) <== NOT EXECUTED
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
5b0d0: 2143 0014 movel %d3,%a0@(20) <== NOT EXECUTED
fat_fd->map.file_cln = 0;
5b0d4: 42a8 0032 clrl %a0@(50) <== NOT EXECUTED
fat_fd->map.disk_cln = fat_fd->cln;
rc = fat_file_size(mt_entry, fat_fd);
5b0d8: 2f08 movel %a0,%sp@- <== NOT EXECUTED 5b0da: 2045 moveal %d5,%a0 <== NOT EXECUTED 5b0dc: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5b0de: 4e90 jsr %a0@ <== NOT EXECUTED
if (rc != RC_OK)
5b0e0: 508f addql #8,%sp <== NOT EXECUTED
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
fat_fd->map.file_cln = 0;
fat_fd->map.disk_cln = fat_fd->cln;
rc = fat_file_size(mt_entry, fat_fd);
5b0e2: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc != RC_OK)
5b0e4: 6600 0082 bnew 5b168 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x2b0><== NOT EXECUTED
{
fat_file_close(mt_entry, fat_fd);
return rc;
}
cl4find = MSDOS_EXTRACT_CLUSTER_NUM(dot_node);
5b0e8: 4283 clrl %d3 <== NOT EXECUTED 5b0ea: 4281 clrl %d1 <== NOT EXECUTED 5b0ec: 362e ffb4 movew %fp@(-76),%d3 <== NOT EXECUTED 5b0f0: 322e ffba movew %fp@(-70),%d1 <== NOT EXECUTED
fat_file_close(mt_entry, fat_fd);
return rc;
}
/* in this directory find slot with specified cluster num */
rc = msdos_find_node_by_cluster_num_in_fat_file(mt_entry, fat_fd, cl4find,
5b0f4: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED 5b0f8: 2403 movel %d3,%d2 <== NOT EXECUTED 5b0fa: 2001 movel %d1,%d0 <== NOT EXECUTED 5b0fc: e08a lsrl #8,%d2 <== NOT EXECUTED 5b0fe: e089 lsrl #8,%d1 <== NOT EXECUTED 5b100: e18b lsll #8,%d3 <== NOT EXECUTED 5b102: e188 lsll #8,%d0 <== NOT EXECUTED 5b104: 2f0c movel %a4,%sp@- <== NOT EXECUTED 5b106: 8682 orl %d2,%d3 <== NOT EXECUTED 5b108: 8081 orl %d1,%d0 <== NOT EXECUTED
{
fat_file_close(mt_entry, fat_fd);
return rc;
}
cl4find = MSDOS_EXTRACT_CLUSTER_NUM(dot_node);
5b10a: 4843 swap %d3 <== NOT EXECUTED 5b10c: 4243 clrw %d3 <== NOT EXECUTED 5b10e: 0280 0000 ffff andil #65535,%d0 <== NOT EXECUTED
fat_file_close(mt_entry, fat_fd);
return rc;
}
/* in this directory find slot with specified cluster num */
rc = msdos_find_node_by_cluster_num_in_fat_file(mt_entry, fat_fd, cl4find,
5b114: 8680 orl %d0,%d3 <== NOT EXECUTED 5b116: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5b118: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 5b11c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5b11e: 4eb9 0005 ad38 jsr 5ad38 <msdos_find_node_by_cluster_num_in_fat_file><== NOT EXECUTED
dir_pos, dir_entry);
if (rc != RC_OK)
5b124: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
fat_file_close(mt_entry, fat_fd);
return rc;
}
/* in this directory find slot with specified cluster num */
rc = msdos_find_node_by_cluster_num_in_fat_file(mt_entry, fat_fd, cl4find,
5b128: 2400 movel %d0,%d2 <== NOT EXECUTED
dir_pos, dir_entry);
if (rc != RC_OK)
5b12a: 6654 bnes 5b180 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x2c8><== NOT EXECUTED
{
fat_file_close(mt_entry, fat_fd);
return rc;
}
rc = fat_file_close(mt_entry, fat_fd);
5b12c: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 5b130: 2247 moveal %d7,%a1 <== NOT EXECUTED 5b132: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5b134: 4e91 jsr %a1@ <== NOT EXECUTED
return rc;
5b136: 508f addql #8,%sp <== NOT EXECUTED
if (rc != RC_OK)
{
fat_file_close(mt_entry, fat_fd);
return rc;
}
rc = fat_file_close(mt_entry, fat_fd);
5b138: 2400 movel %d0,%d2 <== NOT EXECUTED
return rc;
}
5b13a: 2002 movel %d2,%d0 <== NOT EXECUTED 5b13c: 4cee 3cfc ff8c moveml %fp@(-116),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5b142: 4e5e unlk %fp <== NOT EXECUTED 5b144: 4e75 rts <== NOT EXECUTED
MSDOS_NAME_SHORT, dir_pos,
dotdot_node);
if (rc != RC_OK)
{
fat_file_close(mt_entry, fat_fd);
5b146: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 5b14a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5b14c: 4eb9 0005 2fc2 jsr 52fc2 <fat_file_close> <== NOT EXECUTED
return rc;
5b152: 508f addql #8,%sp <== NOT EXECUTED
fat_file_close(mt_entry, fat_fd);
return rc;
}
rc = fat_file_close(mt_entry, fat_fd);
return rc;
}
5b154: 2002 movel %d2,%d0 <== NOT EXECUTED 5b156: 4cee 3cfc ff8c moveml %fp@(-116),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5b15c: 4e5e unlk %fp <== NOT EXECUTED 5b15e: 4e75 rts <== NOT EXECUTED
return rc;
if ((MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node)) == 0)
fat_fd->cln = fs_info->fat.vol.rdir_cl;
else
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node);
5b160: 2140 001c movel %d0,%a0@(28) <== NOT EXECUTED 5b164: 6000 ff5a braw 5b0c0 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x208><== NOT EXECUTED
fat_fd->map.disk_cln = fat_fd->cln;
rc = fat_file_size(mt_entry, fat_fd);
if (rc != RC_OK)
{
fat_file_close(mt_entry, fat_fd);
5b168: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 5b16c: 2247 moveal %d7,%a1 <== NOT EXECUTED 5b16e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5b170: 4e91 jsr %a1@ <== NOT EXECUTED
return rc;
5b172: 508f addql #8,%sp <== NOT EXECUTED
fat_file_close(mt_entry, fat_fd);
return rc;
}
rc = fat_file_close(mt_entry, fat_fd);
return rc;
}
5b174: 2002 movel %d2,%d0 <== NOT EXECUTED 5b176: 4cee 3cfc ff8c moveml %fp@(-116),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5b17c: 4e5e unlk %fp <== NOT EXECUTED 5b17e: 4e75 rts <== NOT EXECUTED
/* in this directory find slot with specified cluster num */
rc = msdos_find_node_by_cluster_num_in_fat_file(mt_entry, fat_fd, cl4find,
dir_pos, dir_entry);
if (rc != RC_OK)
{
fat_file_close(mt_entry, fat_fd);
5b180: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 5b184: 2047 moveal %d7,%a0 <== NOT EXECUTED 5b186: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5b188: 4e90 jsr %a0@ <== NOT EXECUTED
return rc;
5b18a: 508f addql #8,%sp <== NOT EXECUTED
}
rc = fat_file_close(mt_entry, fat_fd);
return rc;
}
5b18c: 2002 movel %d2,%d0 <== NOT EXECUTED 5b18e: 4cee 3cfc ff8c moveml %fp@(-116),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5b194: 4e5e unlk %fp <== NOT EXECUTED
0005b198 <msdos_get_name_node>:
int rc = RC_OK;
fat_file_fd_t *fat_fd = parent_loc->node_access;
uint32_t dotdot_cln = 0;
/* find name in fat-file which corresponds to the directory */
rc = msdos_find_name_in_fat_file(parent_loc->mt_entry, fat_fd,
5b198: 4280 clrl %d0
int name_len,
msdos_name_type_t name_type,
fat_dir_pos_t *dir_pos,
char *name_dir_entry
)
{
5b19a: 4e56 ffe8 linkw %fp,#-24 5b19e: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ 5b1a2: 286e 0020 moveal %fp@(32),%a4 5b1a6: 266e 001c moveal %fp@(28),%a3
int rc = RC_OK;
fat_file_fd_t *fat_fd = parent_loc->node_access;
uint32_t dotdot_cln = 0;
/* find name in fat-file which corresponds to the directory */
rc = msdos_find_name_in_fat_file(parent_loc->mt_entry, fat_fd,
5b1aa: 2f0c movel %a4,%sp@-
int name_len,
msdos_name_type_t name_type,
fat_dir_pos_t *dir_pos,
char *name_dir_entry
)
{
5b1ac: 282e 0010 movel %fp@(16),%d4
int rc = RC_OK;
fat_file_fd_t *fat_fd = parent_loc->node_access;
uint32_t dotdot_cln = 0;
/* find name in fat-file which corresponds to the directory */
rc = msdos_find_name_in_fat_file(parent_loc->mt_entry, fat_fd,
5b1b0: 2f0b movel %a3,%sp@- 5b1b2: 2f2e 0018 movel %fp@(24),%sp@- 5b1b6: 2f2e 0014 movel %fp@(20),%sp@-
int name_len,
msdos_name_type_t name_type,
fat_dir_pos_t *dir_pos,
char *name_dir_entry
)
{
5b1ba: 246e 0008 moveal %fp@(8),%a2 5b1be: 162e 000f moveb %fp@(15),%d3
int rc = RC_OK;
fat_file_fd_t *fat_fd = parent_loc->node_access;
uint32_t dotdot_cln = 0;
/* find name in fat-file which corresponds to the directory */
rc = msdos_find_name_in_fat_file(parent_loc->mt_entry, fat_fd,
5b1c2: 2f04 movel %d4,%sp@- 5b1c4: 1003 moveb %d3,%d0 5b1c6: 2f00 movel %d0,%sp@- 5b1c8: 2f12 movel %a2@,%sp@- 5b1ca: 2f2a 0010 movel %a2@(16),%sp@- 5b1ce: 4eb9 0005 a3a8 jsr 5a3a8 <msdos_find_name_in_fat_file>
create_node, name, name_len, name_type,
dir_pos, name_dir_entry);
if ((rc != RC_OK) && (rc != MSDOS_NAME_NOT_FOUND_ERR))
5b1d4: 4fef 0020 lea %sp@(32),%sp
int rc = RC_OK;
fat_file_fd_t *fat_fd = parent_loc->node_access;
uint32_t dotdot_cln = 0;
/* find name in fat-file which corresponds to the directory */
rc = msdos_find_name_in_fat_file(parent_loc->mt_entry, fat_fd,
5b1d8: 2400 movel %d0,%d2
create_node, name, name_len, name_type,
dir_pos, name_dir_entry);
if ((rc != RC_OK) && (rc != MSDOS_NAME_NOT_FOUND_ERR))
5b1da: 6714 beqs 5b1f0 <msdos_get_name_node+0x58>
5b1dc: 0c80 0000 7d01 cmpil #32001,%d0
5b1e2: 670c beqs 5b1f0 <msdos_get_name_node+0x58> <== ALWAYS TAKEN
}
}
}
}
return rc;
}
5b1e4: 2002 movel %d2,%d0 5b1e6: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 5b1ec: 4e5e unlk %fp 5b1ee: 4e75 rts
create_node, name, name_len, name_type,
dir_pos, name_dir_entry);
if ((rc != RC_OK) && (rc != MSDOS_NAME_NOT_FOUND_ERR))
return rc;
if (!create_node)
5b1f0: 4a03 tstb %d3
5b1f2: 66f0 bnes 5b1e4 <msdos_get_name_node+0x4c>
{
/* if we search for valid name and name not found -> return */
if (rc == MSDOS_NAME_NOT_FOUND_ERR)
5b1f4: 0c82 0000 7d01 cmpil #32001,%d2
5b1fa: 67e8 beqs 5b1e4 <msdos_get_name_node+0x4c>
* if we have deal with ".." - it is a special case :(((
*
* Really, we should return cluster num and offset not of ".." slot, but
* slot which correspondes to real directory name.
*/
if (rc == RC_OK)
5b1fc: 4a82 tstl %d2
5b1fe: 66e4 bnes 5b1e4 <msdos_get_name_node+0x4c> <== NEVER TAKEN
{
if (strncmp(name, "..", 2) == 0)
5b200: 4878 0002 pea 2 <DOUBLE_FLOAT> 5b204: 4879 0006 c366 pea 6c366 <_rodata_start+0x1b6> 5b20a: 2f04 movel %d4,%sp@- 5b20c: 4eb9 0005 f0a0 jsr 5f0a0 <strncmp> 5b212: 4fef 000c lea %sp@(12),%sp 5b216: 4a80 tstl %d0
5b218: 66ca bnes 5b1e4 <msdos_get_name_node+0x4c>
{
dotdot_cln = MSDOS_EXTRACT_CLUSTER_NUM((name_dir_entry));
5b21a: 4284 clrl %d4 5b21c: 4283 clrl %d3 5b21e: 382c 0014 movew %a4@(20),%d4 5b222: 362c 001a movew %a4@(26),%d3 5b226: 2004 movel %d4,%d0 5b228: 2203 movel %d3,%d1 5b22a: e08c lsrl #8,%d4 5b22c: e08b lsrl #8,%d3 5b22e: e188 lsll #8,%d0 5b230: e189 lsll #8,%d1 5b232: 8084 orl %d4,%d0 5b234: 8283 orl %d3,%d1 5b236: 4840 swap %d0 5b238: 4240 clrw %d0 5b23a: 0281 0000 ffff andil #65535,%d1 5b240: 8081 orl %d1,%d0
/* are we right under root dir ? */
if (dotdot_cln == 0)
5b242: 661e bnes 5b262 <msdos_get_name_node+0xca> <== NEVER TAKEN
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
5b244: 70ff moveq #-1,%d0
/*
* we can relax about first_char field - it never should be
* used for root dir
*/
fat_dir_pos_init(dir_pos);
dir_pos->sname.cln = FAT_ROOTDIR_CLUSTER_NUM;
5b246: 7801 moveq #1,%d4 5b248: 2740 0008 movel %d0,%a3@(8)
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
5b24c: 2740 000c movel %d0,%a3@(12)
}
}
}
}
return rc;
}
5b250: 2002 movel %d2,%d0
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
5b252: 42ab 0004 clrl %a3@(4)
/*
* we can relax about first_char field - it never should be
* used for root dir
*/
fat_dir_pos_init(dir_pos);
dir_pos->sname.cln = FAT_ROOTDIR_CLUSTER_NUM;
5b256: 2684 movel %d4,%a3@
}
}
}
}
return rc;
}
5b258: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 5b25e: 4e5e unlk %fp 5b260: 4e75 rts
fat_dir_pos_init(dir_pos);
dir_pos->sname.cln = FAT_ROOTDIR_CLUSTER_NUM;
}
else
{
rc =
5b262: 2d4c 0014 movel %a4,%fp@(20) <== NOT EXECUTED 5b266: 2d6a 0010 0008 movel %a2@(16),%fp@(8) <== NOT EXECUTED 5b26c: 2d4b 0010 movel %a3,%fp@(16) <== NOT EXECUTED
}
}
}
}
return rc;
}
5b270: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 <== NOT EXECUTED
fat_dir_pos_init(dir_pos);
dir_pos->sname.cln = FAT_ROOTDIR_CLUSTER_NUM;
}
else
{
rc =
5b276: 2d40 000c movel %d0,%fp@(12) <== NOT EXECUTED
}
}
}
}
return rc;
}
5b27a: 4e5e unlk %fp <== NOT EXECUTED
fat_dir_pos_init(dir_pos);
dir_pos->sname.cln = FAT_ROOTDIR_CLUSTER_NUM;
}
else
{
rc =
5b27c: 4ef9 0005 aeb8 jmp 5aeb8 <msdos_get_dotdot_dir_info_cluster_num_and_offset><== NOT EXECUTED
00059cf2 <msdos_get_token>:
msdos_token_types_t
msdos_get_token(const char *path,
int pathlen,
const char **ret_token,
int *ret_token_len)
{
59cf2: 4e56 ffdc linkw %fp,#-36 59cf6: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 59cfa: 2a2e 0010 movel %fp@(16),%d5
msdos_token_types_t type = MSDOS_NAME;
int i = 0;
*ret_token = NULL;
59cfe: 2045 moveal %d5,%a0
msdos_token_types_t
msdos_get_token(const char *path,
int pathlen,
const char **ret_token,
int *ret_token_len)
{
59d00: 282e 0014 movel %fp@(20),%d4
msdos_token_types_t type = MSDOS_NAME;
int i = 0;
*ret_token = NULL;
59d04: 4290 clrl %a0@
*ret_token_len = 0;
59d06: 2044 moveal %d4,%a0
msdos_token_types_t
msdos_get_token(const char *path,
int pathlen,
const char **ret_token,
int *ret_token_len)
{
59d08: 2c2e 0008 movel %fp@(8),%d6 59d0c: 262e 000c movel %fp@(12),%d3
msdos_token_types_t type = MSDOS_NAME;
int i = 0;
*ret_token = NULL;
*ret_token_len = 0;
59d10: 4290 clrl %a0@
if (pathlen == 0)
59d12: 4a83 tstl %d3
59d14: 6748 beqs 59d5e <msdos_get_token+0x6c>
59d16: 2446 moveal %d6,%a2 59d18: 4282 clrl %d2 59d1a: 49f9 0004 821c lea 4821c <rtems_filesystem_is_separator>,%a4
/*
* Check for a separator.
*/
while (!msdos_is_separator(path[i]) && (i < pathlen))
{
if ( !msdos_is_valid_name_char(path[i]) )
59d20: 4bfa fda2 lea %pc@(59ac4 <msdos_is_valid_name_char>),%a5
* RETURNS: * token type, token and token length * */ msdos_token_types_t msdos_get_token(const char *path,
59d24: 264a moveal %a2,%a3
return MSDOS_NO_MORE_PATH;
/*
* Check for a separator.
*/
while (!msdos_is_separator(path[i]) && (i < pathlen))
59d26: 1212 moveb %a2@,%d1
int i = 0;
*ret_token = NULL;
*ret_token_len = 0;
if (pathlen == 0)
59d28: 528a addql #1,%a2
return MSDOS_NO_MORE_PATH;
/*
* Check for a separator.
*/
while (!msdos_is_separator(path[i]) && (i < pathlen))
59d2a: 49c1 extbl %d1 59d2c: 2f01 movel %d1,%sp@- 59d2e: 4e94 jsr %a4@ 59d30: 588f addql #4,%sp 59d32: 4a80 tstl %d0
59d34: 6634 bnes 59d6a <msdos_get_token+0x78>
59d36: b682 cmpl %d2,%d3
59d38: 6f30 bles 59d6a <msdos_get_token+0x78>
{
if ( !msdos_is_valid_name_char(path[i]) )
return MSDOS_INVALID_TOKEN;
++i;
59d3a: 5282 addql #1,%d2
/*
* Check for a separator.
*/
while (!msdos_is_separator(path[i]) && (i < pathlen))
{
if ( !msdos_is_valid_name_char(path[i]) )
59d3c: 1013 moveb %a3@,%d0 59d3e: 49c0 extbl %d0 59d40: 2f00 movel %d0,%sp@- 59d42: 4e95 jsr %a5@ 59d44: 588f addql #4,%sp 59d46: 4a80 tstl %d0
59d48: 6708 beqs 59d52 <msdos_get_token+0x60> <== NEVER TAKEN
return MSDOS_INVALID_TOKEN;
++i;
if ( i == MSDOS_NAME_MAX_LFN_WITH_DOT )
59d4a: 0c82 0000 0104 cmpil #260,%d2
59d50: 66d2 bnes 59d24 <msdos_get_token+0x32> <== ALWAYS TAKEN
return MSDOS_INVALID_TOKEN;
59d52: 7004 moveq #4,%d0 <== NOT EXECUTED
return type;
}
}
return type;
}
59d54: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 <== NOT EXECUTED 59d5a: 4e5e unlk %fp <== NOT EXECUTED 59d5c: 4e75 rts <== NOT EXECUTED
*ret_token = NULL;
*ret_token_len = 0;
if (pathlen == 0)
return MSDOS_NO_MORE_PATH;
59d5e: 4280 clrl %d0
return type;
}
}
return type;
}
59d60: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 59d66: 4e5e unlk %fp 59d68: 4e75 rts
++i;
if ( i == MSDOS_NAME_MAX_LFN_WITH_DOT )
return MSDOS_INVALID_TOKEN;
}
*ret_token = path;
59d6a: 2045 moveal %d5,%a0 59d6c: 2086 movel %d6,%a0@
/*
* If it is just a separator then it is the current dir.
*/
if ( i == 0 )
59d6e: 4a82 tstl %d2
59d70: 6618 bnes 59d8a <msdos_get_token+0x98>
{
if ( (*path != '\0') && pathlen )
59d72: 2046 moveal %d6,%a0 59d74: 4a10 tstb %a0@
59d76: 672e beqs 59da6 <msdos_get_token+0xb4>
{
i++;
59d78: 7401 moveq #1,%d2
}
/*
* Set the token and token_len to the token start and length.
*/
*ret_token_len = i;
59d7a: 2044 moveal %d4,%a0
if ( i == 0 )
{
if ( (*path != '\0') && pathlen )
{
i++;
type = MSDOS_CURRENT_DIR;
59d7c: 7001 moveq #1,%d0
}
/*
* Set the token and token_len to the token start and length.
*/
*ret_token_len = i;
59d7e: 2082 movel %d2,%a0@
return type;
}
}
return type;
}
59d80: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 59d86: 4e5e unlk %fp 59d88: 4e75 rts
}
/*
* Set the token and token_len to the token start and length.
*/
*ret_token_len = i;
59d8a: 2044 moveal %d4,%a0
* If we copied something that was not a seperator see if
* it was a special name.
*/
if ( type == MSDOS_NAME )
{
if ((i == 2) && ((*ret_token)[0] == '.') && ((*ret_token)[1] == '.'))
59d8c: 7002 moveq #2,%d0
}
/*
* Set the token and token_len to the token start and length.
*/
*ret_token_len = i;
59d8e: 2082 movel %d2,%a0@
* If we copied something that was not a seperator see if
* it was a special name.
*/
if ( type == MSDOS_NAME )
{
if ((i == 2) && ((*ret_token)[0] == '.') && ((*ret_token)[1] == '.'))
59d90: b082 cmpl %d2,%d0
59d92: 6732 beqs 59dc6 <msdos_get_token+0xd4>
{
type = MSDOS_UP_DIR;
return type;
}
if ((i == 1) && ((*ret_token)[0] == '.'))
59d94: 7001 moveq #1,%d0 59d96: b082 cmpl %d2,%d0
59d98: 6714 beqs 59dae <msdos_get_token+0xbc>
msdos_get_token(const char *path,
int pathlen,
const char **ret_token,
int *ret_token_len)
{
msdos_token_types_t type = MSDOS_NAME;
59d9a: 7003 moveq #3,%d0
return type;
}
}
return type;
}
59d9c: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 59da2: 4e5e unlk %fp 59da4: 4e75 rts
}
/*
* Set the token and token_len to the token start and length.
*/
*ret_token_len = i;
59da6: 2044 moveal %d4,%a0
{
i++;
type = MSDOS_CURRENT_DIR;
}
else
type = MSDOS_NO_MORE_PATH;
59da8: 4280 clrl %d0
}
/*
* Set the token and token_len to the token start and length.
*/
*ret_token_len = i;
59daa: 2082 movel %d2,%a0@ 59dac: 60d2 bras 59d80 <msdos_get_token+0x8e>
{
type = MSDOS_UP_DIR;
return type;
}
if ((i == 1) && ((*ret_token)[0] == '.'))
59dae: 2046 moveal %d6,%a0 59db0: 722e moveq #46,%d1 59db2: 1010 moveb %a0@,%d0 59db4: 49c0 extbl %d0 59db6: b280 cmpl %d0,%d1
59db8: 66e0 bnes 59d9a <msdos_get_token+0xa8> <== NEVER TAKEN
{
type = MSDOS_CURRENT_DIR;
return type;
59dba: 7001 moveq #1,%d0
}
}
return type;
}
59dbc: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 59dc2: 4e5e unlk %fp 59dc4: 4e75 rts
* If we copied something that was not a seperator see if
* it was a special name.
*/
if ( type == MSDOS_NAME )
{
if ((i == 2) && ((*ret_token)[0] == '.') && ((*ret_token)[1] == '.'))
59dc6: 2046 moveal %d6,%a0 59dc8: 722e moveq #46,%d1 59dca: 1010 moveb %a0@,%d0 59dcc: 49c0 extbl %d0 59dce: b280 cmpl %d0,%d1
59dd0: 66c8 bnes 59d9a <msdos_get_token+0xa8> <== NEVER TAKEN
59dd2: 1028 0001 moveb %a0@(1),%d0
return type;
}
}
return type;
}
59dd6: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 59ddc: 4e5e unlk %fp
* If we copied something that was not a seperator see if
* it was a special name.
*/
if ( type == MSDOS_NAME )
{
if ((i == 2) && ((*ret_token)[0] == '.') && ((*ret_token)[1] == '.'))
59dde: 49c0 extbl %d0
msdos_get_token(const char *path,
int pathlen,
const char **ret_token,
int *ret_token_len)
{
msdos_token_types_t type = MSDOS_NAME;
59de0: b280 cmpl %d0,%d1 59de2: 57c0 seq %d0 59de4: 49c0 extbl %d0
59de6: 5680 addql #3,%d0 <== NOT EXECUTED
return type;
}
}
return type;
}
0004f9fc <msdos_initialize_support>:
rtems_filesystem_mount_table_entry_t *temp_mt_entry,
const rtems_filesystem_operations_table *op_table,
const rtems_filesystem_file_handlers_r *file_handlers,
const rtems_filesystem_file_handlers_r *directory_handlers
)
{
4f9fc: 4e56 ffd8 linkw %fp,#-40 4fa00: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@
msdos_fs_info_t *fs_info = NULL;
fat_file_fd_t *fat_fd = NULL;
fat_dir_pos_t root_pos;
uint32_t cl_buf_size;
fs_info = (msdos_fs_info_t *)calloc(1, sizeof(msdos_fs_info_t));
4fa04: 4878 0090 pea 90 <DBL_MANT_DIG+0x5b> 4fa08: 49f9 0004 6090 lea 46090 <calloc>,%a4 4fa0e: 4878 0001 pea 1 <ADD>
rtems_filesystem_mount_table_entry_t *temp_mt_entry,
const rtems_filesystem_operations_table *op_table,
const rtems_filesystem_file_handlers_r *file_handlers,
const rtems_filesystem_file_handlers_r *directory_handlers
)
{
4fa12: 266e 0008 moveal %fp@(8),%a3 4fa16: 262e 0014 movel %fp@(20),%d3
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = NULL;
fat_file_fd_t *fat_fd = NULL;
4fa1a: 42ae fffc clrl %fp@(-4)
fat_dir_pos_t root_pos;
uint32_t cl_buf_size;
fs_info = (msdos_fs_info_t *)calloc(1, sizeof(msdos_fs_info_t));
4fa1e: 4e94 jsr %a4@
if (!fs_info)
4fa20: 508f addql #8,%sp
msdos_fs_info_t *fs_info = NULL;
fat_file_fd_t *fat_fd = NULL;
fat_dir_pos_t root_pos;
uint32_t cl_buf_size;
fs_info = (msdos_fs_info_t *)calloc(1, sizeof(msdos_fs_info_t));
4fa22: 2440 moveal %d0,%a2
if (!fs_info)
4fa24: 4a80 tstl %d0 4fa26: 6700 0198 beqw 4fbc0 <msdos_initialize_support+0x1c4>
rtems_set_errno_and_return_minus_one(ENOMEM);
temp_mt_entry->fs_info = fs_info;
4fa2a: 2740 0034 movel %d0,%a3@(52)
rc = fat_init_volume_info(temp_mt_entry);
4fa2e: 2f0b movel %a3,%sp@- 4fa30: 4eb9 0005 4296 jsr 54296 <fat_init_volume_info>
if (rc != RC_OK)
4fa36: 588f addql #4,%sp
if (!fs_info)
rtems_set_errno_and_return_minus_one(ENOMEM);
temp_mt_entry->fs_info = fs_info;
rc = fat_init_volume_info(temp_mt_entry);
4fa38: 2400 movel %d0,%d2
if (rc != RC_OK)
4fa3a: 6600 00c2 bnew 4fafe <msdos_initialize_support+0x102>
* open fat-file which correspondes to root directory
* (so inode number 0x00000010 is always used for root directory)
*/
fat_dir_pos_init(&root_pos);
root_pos.sname.cln = FAT_ROOTDIR_CLUSTER_NUM;
rc = fat_file_open(temp_mt_entry, &root_pos, &fat_fd);
4fa3e: 486e fffc pea %fp@(-4)
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
4fa42: 70ff moveq #-1,%d0 4fa44: 486e ffec pea %fp@(-20)
/*
* open fat-file which correspondes to root directory
* (so inode number 0x00000010 is always used for root directory)
*/
fat_dir_pos_init(&root_pos);
root_pos.sname.cln = FAT_ROOTDIR_CLUSTER_NUM;
4fa48: 7201 moveq #1,%d1
{
free(fs_info);
return rc;
}
fs_info->file_handlers = file_handlers;
4fa4a: 256e 0010 0084 movel %fp@(16),%a2@(132)
* open fat-file which correspondes to root directory
* (so inode number 0x00000010 is always used for root directory)
*/
fat_dir_pos_init(&root_pos);
root_pos.sname.cln = FAT_ROOTDIR_CLUSTER_NUM;
rc = fat_file_open(temp_mt_entry, &root_pos, &fat_fd);
4fa50: 2f0b movel %a3,%sp@-
free(fs_info);
return rc;
}
fs_info->file_handlers = file_handlers;
fs_info->directory_handlers = directory_handlers;
4fa52: 2543 0080 movel %d3,%a2@(128)
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
4fa56: 42ae fff0 clrl %fp@(-16)
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
4fa5a: 2d40 fff4 movel %d0,%fp@(-12)
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
4fa5e: 2d40 fff8 movel %d0,%fp@(-8)
/*
* open fat-file which correspondes to root directory
* (so inode number 0x00000010 is always used for root directory)
*/
fat_dir_pos_init(&root_pos);
root_pos.sname.cln = FAT_ROOTDIR_CLUSTER_NUM;
4fa62: 2d41 ffec movel %d1,%fp@(-20)
rc = fat_file_open(temp_mt_entry, &root_pos, &fat_fd);
4fa66: 4eb9 0005 29b2 jsr 529b2 <fat_file_open>
if (rc != RC_OK)
4fa6c: 4fef 000c lea %sp@(12),%sp
* open fat-file which correspondes to root directory
* (so inode number 0x00000010 is always used for root directory)
*/
fat_dir_pos_init(&root_pos);
root_pos.sname.cln = FAT_ROOTDIR_CLUSTER_NUM;
rc = fat_file_open(temp_mt_entry, &root_pos, &fat_fd);
4fa70: 2400 movel %d0,%d2
if (rc != RC_OK)
4fa72: 6600 00a4 bnew 4fb18 <msdos_initialize_support+0x11c>
free(fs_info);
return rc;
}
/* again: unfortunately "fat-file" is just almost fat file :( */
fat_fd->fat_file_type = FAT_DIRECTORY;
4fa76: 206e fffc moveal %fp@(-4),%a0
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
fat_fd->cln = fs_info->fat.vol.rdir_cl;
4fa7a: 202a 0034 movel %a2@(52),%d0
return rc;
}
/* again: unfortunately "fat-file" is just almost fat file :( */
fat_fd->fat_file_type = FAT_DIRECTORY;
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
4fa7e: 7220 moveq #32,%d1 4fa80: 4841 swap %d1
fat_fd->cln = fs_info->fat.vol.rdir_cl;
4fa82: 2140 001c movel %d0,%a0@(28)
return rc;
}
/* again: unfortunately "fat-file" is just almost fat file :( */
fat_fd->fat_file_type = FAT_DIRECTORY;
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
4fa86: 2141 0014 movel %d1,%a0@(20)
free(fs_info);
return rc;
}
/* again: unfortunately "fat-file" is just almost fat file :( */
fat_fd->fat_file_type = FAT_DIRECTORY;
4fa8a: 7201 moveq #1,%d1
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
fat_fd->cln = fs_info->fat.vol.rdir_cl;
fat_fd->map.file_cln = 0;
4fa8c: 42a8 0032 clrl %a0@(50)
free(fs_info);
return rc;
}
/* again: unfortunately "fat-file" is just almost fat file :( */
fat_fd->fat_file_type = FAT_DIRECTORY;
4fa90: 2141 0010 movel %d1,%a0@(16)
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
fat_fd->cln = fs_info->fat.vol.rdir_cl;
fat_fd->map.file_cln = 0;
fat_fd->map.disk_cln = fat_fd->cln;
4fa94: 2140 0036 movel %d0,%a0@(54)
/* if we have FAT12/16 */
if ( fat_fd->cln == 0 )
4fa98: 6600 009c bnew 4fb36 <msdos_initialize_support+0x13a>
{
fat_fd->fat_file_size = fs_info->fat.vol.rdir_size;
cl_buf_size = (fs_info->fat.vol.bpc > fs_info->fat.vol.rdir_size) ?
fs_info->fat.vol.bpc :
4fa9c: 4280 clrl %d0
fat_fd->map.disk_cln = fat_fd->cln;
/* if we have FAT12/16 */
if ( fat_fd->cln == 0 )
{
fat_fd->fat_file_size = fs_info->fat.vol.rdir_size;
4fa9e: 222a 0024 movel %a2@(36),%d1
cl_buf_size = (fs_info->fat.vol.bpc > fs_info->fat.vol.rdir_size) ?
fs_info->fat.vol.bpc :
4faa2: 302a 0006 movew %a2@(6),%d0
fat_fd->map.disk_cln = fat_fd->cln;
/* if we have FAT12/16 */
if ( fat_fd->cln == 0 )
{
fat_fd->fat_file_size = fs_info->fat.vol.rdir_size;
4faa6: 2141 0018 movel %d1,%a0@(24)
cl_buf_size = (fs_info->fat.vol.bpc > fs_info->fat.vol.rdir_size) ?
4faaa: b280 cmpl %d0,%d1
4faac: 6266 bhis 4fb14 <msdos_initialize_support+0x118> <== ALWAYS TAKEN
return rc;
}
cl_buf_size = fs_info->fat.vol.bpc;
}
fs_info->cl_buf = (uint8_t *)calloc(cl_buf_size, sizeof(char));
4faae: 4878 0001 pea 1 <ADD> 4fab2: 2f00 movel %d0,%sp@- 4fab4: 4e94 jsr %a4@
if (fs_info->cl_buf == NULL)
4fab6: 508f addql #8,%sp
return rc;
}
cl_buf_size = fs_info->fat.vol.bpc;
}
fs_info->cl_buf = (uint8_t *)calloc(cl_buf_size, sizeof(char));
4fab8: 2540 008c movel %d0,%a2@(140)
if (fs_info->cl_buf == NULL)
4fabc: 6700 011c beqw 4fbda <msdos_initialize_support+0x1de>
fat_shutdown_drive(temp_mt_entry);
free(fs_info);
rtems_set_errno_and_return_minus_one(ENOMEM);
}
sc = rtems_semaphore_create(3,
4fac0: 486a 0088 pea %a2@(136) 4fac4: 42a7 clrl %sp@- 4fac6: 4878 0010 pea 10 <INVALID_OPERATION> 4faca: 4878 0001 pea 1 <ADD> 4face: 4878 0003 pea 3 <DIVIDE> 4fad2: 4eb9 0004 ac80 jsr 4ac80 <rtems_semaphore_create>
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_FIFO,
0,
&fs_info->vol_sema);
if (sc != RTEMS_SUCCESSFUL)
4fad8: 4fef 0014 lea %sp@(20),%sp 4fadc: 4a80 tstl %d0 4fade: 6600 009e bnew 4fb7e <msdos_initialize_support+0x182>
temp_mt_entry->mt_fs_root.node_access = fat_fd;
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
temp_mt_entry->mt_fs_root.ops = op_table;
return rc;
}
4fae2: 2002 movel %d2,%d0
free(fs_info->cl_buf);
free(fs_info);
rtems_set_errno_and_return_minus_one( EIO );
}
temp_mt_entry->mt_fs_root.node_access = fat_fd;
4fae4: 276e fffc 001c movel %fp@(-4),%a3@(28)
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
temp_mt_entry->mt_fs_root.ops = op_table;
4faea: 276e 000c 0028 movel %fp@(12),%a3@(40)
free(fs_info);
rtems_set_errno_and_return_minus_one( EIO );
}
temp_mt_entry->mt_fs_root.node_access = fat_fd;
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
4faf0: 2743 0024 movel %d3,%a3@(36)
temp_mt_entry->mt_fs_root.ops = op_table;
return rc;
}
4faf4: 4cee 1c0c ffd8 moveml %fp@(-40),%d2-%d3/%a2-%a4 4fafa: 4e5e unlk %fp 4fafc: 4e75 rts
temp_mt_entry->fs_info = fs_info;
rc = fat_init_volume_info(temp_mt_entry);
if (rc != RC_OK)
{
free(fs_info);
4fafe: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4fb00: 4eb9 0004 680c jsr 4680c <free> <== NOT EXECUTED
return rc;
4fb06: 588f addql #4,%sp <== NOT EXECUTED
temp_mt_entry->mt_fs_root.node_access = fat_fd;
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
temp_mt_entry->mt_fs_root.ops = op_table;
return rc;
}
4fb08: 2002 movel %d2,%d0 <== NOT EXECUTED 4fb0a: 4cee 1c0c ffd8 moveml %fp@(-40),%d2-%d3/%a2-%a4 <== NOT EXECUTED 4fb10: 4e5e unlk %fp <== NOT EXECUTED 4fb12: 4e75 rts <== NOT EXECUTED
/* if we have FAT12/16 */
if ( fat_fd->cln == 0 )
{
fat_fd->fat_file_size = fs_info->fat.vol.rdir_size;
cl_buf_size = (fs_info->fat.vol.bpc > fs_info->fat.vol.rdir_size) ?
4fb14: 2001 movel %d1,%d0 4fb16: 6096 bras 4faae <msdos_initialize_support+0xb2>
fat_dir_pos_init(&root_pos);
root_pos.sname.cln = FAT_ROOTDIR_CLUSTER_NUM;
rc = fat_file_open(temp_mt_entry, &root_pos, &fat_fd);
if (rc != RC_OK)
{
fat_shutdown_drive(temp_mt_entry);
4fb18: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4fb1a: 4eb9 0005 414e jsr 5414e <fat_shutdown_drive> <== NOT EXECUTED
free(fs_info);
4fb20: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4fb22: 4eb9 0004 680c jsr 4680c <free> <== NOT EXECUTED
return rc;
4fb28: 508f addql #8,%sp <== NOT EXECUTED
temp_mt_entry->mt_fs_root.node_access = fat_fd;
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
temp_mt_entry->mt_fs_root.ops = op_table;
return rc;
}
4fb2a: 2002 movel %d2,%d0 <== NOT EXECUTED 4fb2c: 4cee 1c0c ffd8 moveml %fp@(-40),%d2-%d3/%a2-%a4 <== NOT EXECUTED 4fb32: 4e5e unlk %fp <== NOT EXECUTED 4fb34: 4e75 rts <== NOT EXECUTED
fs_info->fat.vol.bpc :
fs_info->fat.vol.rdir_size;
}
else
{
rc = fat_file_size(temp_mt_entry, fat_fd);
4fb36: 2f08 movel %a0,%sp@- <== NOT EXECUTED 4fb38: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4fb3a: 4eb9 0005 37c2 jsr 537c2 <fat_file_size> <== NOT EXECUTED
if ( rc != RC_OK )
4fb40: 508f addql #8,%sp <== NOT EXECUTED 4fb42: 4a80 tstl %d0 <== NOT EXECUTED 4fb44: 660a bnes 4fb50 <msdos_initialize_support+0x154> <== NOT EXECUTED
fat_file_close(temp_mt_entry, fat_fd);
fat_shutdown_drive(temp_mt_entry);
free(fs_info);
return rc;
}
cl_buf_size = fs_info->fat.vol.bpc;
4fb46: 4280 clrl %d0 <== NOT EXECUTED 4fb48: 302a 0006 movew %a2@(6),%d0 <== NOT EXECUTED 4fb4c: 6000 ff60 braw 4faae <msdos_initialize_support+0xb2> <== NOT EXECUTED
else
{
rc = fat_file_size(temp_mt_entry, fat_fd);
if ( rc != RC_OK )
{
fat_file_close(temp_mt_entry, fat_fd);
4fb50: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED
fat_shutdown_drive(temp_mt_entry);
free(fs_info);
return rc;
4fb54: 2400 movel %d0,%d2 <== NOT EXECUTED
else
{
rc = fat_file_size(temp_mt_entry, fat_fd);
if ( rc != RC_OK )
{
fat_file_close(temp_mt_entry, fat_fd);
4fb56: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4fb58: 4eb9 0005 2fc2 jsr 52fc2 <fat_file_close> <== NOT EXECUTED
fat_shutdown_drive(temp_mt_entry);
4fb5e: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4fb60: 4eb9 0005 414e jsr 5414e <fat_shutdown_drive> <== NOT EXECUTED
free(fs_info);
4fb66: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4fb68: 4eb9 0004 680c jsr 4680c <free> <== NOT EXECUTED
return rc;
4fb6e: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
temp_mt_entry->mt_fs_root.node_access = fat_fd;
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
temp_mt_entry->mt_fs_root.ops = op_table;
return rc;
}
4fb72: 2002 movel %d2,%d0 <== NOT EXECUTED 4fb74: 4cee 1c0c ffd8 moveml %fp@(-40),%d2-%d3/%a2-%a4 <== NOT EXECUTED 4fb7a: 4e5e unlk %fp <== NOT EXECUTED 4fb7c: 4e75 rts <== NOT EXECUTED
RTEMS_BINARY_SEMAPHORE | RTEMS_FIFO,
0,
&fs_info->vol_sema);
if (sc != RTEMS_SUCCESSFUL)
{
fat_file_close(temp_mt_entry, fat_fd);
4fb7e: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED
fat_shutdown_drive(temp_mt_entry);
free(fs_info->cl_buf);
4fb82: 49f9 0004 680c lea 4680c <free>,%a4 <== NOT EXECUTED
free(fs_info);
rtems_set_errno_and_return_minus_one( EIO );
4fb88: 74ff moveq #-1,%d2 <== NOT EXECUTED
RTEMS_BINARY_SEMAPHORE | RTEMS_FIFO,
0,
&fs_info->vol_sema);
if (sc != RTEMS_SUCCESSFUL)
{
fat_file_close(temp_mt_entry, fat_fd);
4fb8a: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4fb8c: 4eb9 0005 2fc2 jsr 52fc2 <fat_file_close> <== NOT EXECUTED
fat_shutdown_drive(temp_mt_entry);
4fb92: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4fb94: 4eb9 0005 414e jsr 5414e <fat_shutdown_drive> <== NOT EXECUTED
free(fs_info->cl_buf);
4fb9a: 2f2a 008c movel %a2@(140),%sp@- <== NOT EXECUTED 4fb9e: 4e94 jsr %a4@ <== NOT EXECUTED
free(fs_info);
4fba0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4fba2: 4e94 jsr %a4@ <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
4fba4: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 4fbaa: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4fbae: 2040 moveal %d0,%a0 <== NOT EXECUTED 4fbb0: 7005 moveq #5,%d0 <== NOT EXECUTED 4fbb2: 2080 movel %d0,%a0@ <== NOT EXECUTED
temp_mt_entry->mt_fs_root.node_access = fat_fd;
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
temp_mt_entry->mt_fs_root.ops = op_table;
return rc;
}
4fbb4: 2002 movel %d2,%d0 <== NOT EXECUTED 4fbb6: 4cee 1c0c ffd8 moveml %fp@(-40),%d2-%d3/%a2-%a4 <== NOT EXECUTED 4fbbc: 4e5e unlk %fp <== NOT EXECUTED 4fbbe: 4e75 rts <== NOT EXECUTED
fat_dir_pos_t root_pos;
uint32_t cl_buf_size;
fs_info = (msdos_fs_info_t *)calloc(1, sizeof(msdos_fs_info_t));
if (!fs_info)
rtems_set_errno_and_return_minus_one(ENOMEM);
4fbc0: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 4fbc6: 74ff moveq #-1,%d2 <== NOT EXECUTED 4fbc8: 760c moveq #12,%d3 <== NOT EXECUTED 4fbca: 2040 moveal %d0,%a0 <== NOT EXECUTED
temp_mt_entry->mt_fs_root.node_access = fat_fd;
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
temp_mt_entry->mt_fs_root.ops = op_table;
return rc;
}
4fbcc: 2002 movel %d2,%d0 <== NOT EXECUTED
fat_dir_pos_t root_pos;
uint32_t cl_buf_size;
fs_info = (msdos_fs_info_t *)calloc(1, sizeof(msdos_fs_info_t));
if (!fs_info)
rtems_set_errno_and_return_minus_one(ENOMEM);
4fbce: 2083 movel %d3,%a0@ <== NOT EXECUTED
temp_mt_entry->mt_fs_root.node_access = fat_fd;
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
temp_mt_entry->mt_fs_root.ops = op_table;
return rc;
}
4fbd0: 4cee 1c0c ffd8 moveml %fp@(-40),%d2-%d3/%a2-%a4 <== NOT EXECUTED 4fbd6: 4e5e unlk %fp <== NOT EXECUTED 4fbd8: 4e75 rts <== NOT EXECUTED
}
fs_info->cl_buf = (uint8_t *)calloc(cl_buf_size, sizeof(char));
if (fs_info->cl_buf == NULL)
{
fat_file_close(temp_mt_entry, fat_fd);
4fbda: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED
fat_shutdown_drive(temp_mt_entry);
free(fs_info);
rtems_set_errno_and_return_minus_one(ENOMEM);
4fbde: 74ff moveq #-1,%d2 <== NOT EXECUTED
}
fs_info->cl_buf = (uint8_t *)calloc(cl_buf_size, sizeof(char));
if (fs_info->cl_buf == NULL)
{
fat_file_close(temp_mt_entry, fat_fd);
4fbe0: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4fbe2: 4eb9 0005 2fc2 jsr 52fc2 <fat_file_close> <== NOT EXECUTED
fat_shutdown_drive(temp_mt_entry);
4fbe8: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4fbea: 4eb9 0005 414e jsr 5414e <fat_shutdown_drive> <== NOT EXECUTED
free(fs_info);
4fbf0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4fbf2: 4eb9 0004 680c jsr 4680c <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
4fbf8: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 4fbfe: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4fc02: 720c moveq #12,%d1 <== NOT EXECUTED 4fc04: 2040 moveal %d0,%a0 <== NOT EXECUTED
temp_mt_entry->mt_fs_root.node_access = fat_fd;
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
temp_mt_entry->mt_fs_root.ops = op_table;
return rc;
}
4fc06: 2002 movel %d2,%d0 <== NOT EXECUTED 4fc08: 4cee 1c0c ffd8 moveml %fp@(-40),%d2-%d3/%a2-%a4 <== NOT EXECUTED
if (fs_info->cl_buf == NULL)
{
fat_file_close(temp_mt_entry, fat_fd);
fat_shutdown_drive(temp_mt_entry);
free(fs_info);
rtems_set_errno_and_return_minus_one(ENOMEM);
4fc0e: 2081 movel %d1,%a0@ <== NOT EXECUTED
temp_mt_entry->mt_fs_root.node_access = fat_fd;
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
temp_mt_entry->mt_fs_root.ops = op_table;
return rc;
}
4fc10: 4e5e unlk %fp <== NOT EXECUTED
00059ac4 <msdos_is_valid_name_char>:
* MSDOS_NAME_LONG - Valid in a long name only.
*
*/
static msdos_name_type_t
msdos_is_valid_name_char(const char ch)
{
59ac4: 4e56 fff4 linkw %fp,#-12 59ac8: 48d7 040c moveml %d2-%d3/%a2,%sp@ 59acc: 162e 000b moveb %fp@(11),%d3
if (strchr(" +,;=[]", ch) != NULL)
59ad0: 45f9 0005 e954 lea 5e954 <strchr>,%a2 59ad6: 1403 moveb %d3,%d2 59ad8: 49c2 extbl %d2 59ada: 2f02 movel %d2,%sp@- 59adc: 4879 0006 dd22 pea 6dd22 <msdos_file_handlers+0x38> 59ae2: 4e92 jsr %a2@ 59ae4: 508f addql #8,%sp 59ae6: 4a80 tstl %d0
59ae8: 670c beqs 59af6 <msdos_is_valid_name_char+0x32> <== ALWAYS TAKEN
return MSDOS_NAME_LONG;
59aea: 7002 moveq #2,%d0 <== NOT EXECUTED
if ((ch == '.') || isalnum((unsigned char)ch) ||
(strchr("$%'-_@~`!(){}^#&", ch) != NULL))
return MSDOS_NAME_SHORT;
return MSDOS_NAME_INVALID;
}
59aec: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 59af2: 4e5e unlk %fp <== NOT EXECUTED 59af4: 4e75 rts <== NOT EXECUTED
msdos_is_valid_name_char(const char ch)
{
if (strchr(" +,;=[]", ch) != NULL)
return MSDOS_NAME_LONG;
if ((ch == '.') || isalnum((unsigned char)ch) ||
59af6: 103c 002e moveb #46,%d0 59afa: b082 cmpl %d2,%d0
59afc: 6736 beqs 59b34 <msdos_is_valid_name_char+0x70>
59afe: 2079 0006 ec28 moveal 6ec28 <__ctype_ptr__>,%a0 59b04: 7207 moveq #7,%d1 59b06: 0283 0000 00ff andil #255,%d3 59b0c: 1030 3801 moveb %a0@(00000001,%d3:l),%d0 59b10: 49c0 extbl %d0 59b12: c081 andl %d1,%d0
59b14: 661e bnes 59b34 <msdos_is_valid_name_char+0x70>
(strchr("$%'-_@~`!(){}^#&", ch) != NULL))
59b16: 2f02 movel %d2,%sp@- 59b18: 4879 0006 dd2a pea 6dd2a <msdos_file_handlers+0x40> 59b1e: 4e92 jsr %a2@ 59b20: 508f addql #8,%sp
return MSDOS_NAME_SHORT;
59b22: 4a80 tstl %d0 59b24: 56c0 sne %d0
return MSDOS_NAME_INVALID;
}
59b26: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 59b2c: 4e5e unlk %fp
if (strchr(" +,;=[]", ch) != NULL)
return MSDOS_NAME_LONG;
if ((ch == '.') || isalnum((unsigned char)ch) ||
(strchr("$%'-_@~`!(){}^#&", ch) != NULL))
return MSDOS_NAME_SHORT;
59b2e: 49c0 extbl %d0 59b30: 4480 negl %d0
return MSDOS_NAME_INVALID;
}
59b32: 4e75 rts
if (strchr(" +,;=[]", ch) != NULL)
return MSDOS_NAME_LONG;
if ((ch == '.') || isalnum((unsigned char)ch) ||
(strchr("$%'-_@~`!(){}^#&", ch) != NULL))
return MSDOS_NAME_SHORT;
59b34: 7001 moveq #1,%d0
return MSDOS_NAME_INVALID;
}
59b36: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
59b3c: 4e5e unlk %fp <== NOT EXECUTED
00059b40 <msdos_long_to_short>:
*
*/
#define MSDOS_L2S_PRINT 0
msdos_name_type_t
msdos_long_to_short(const char *lfn, int lfn_len, char* sfn, int sfn_len)
{
59b40: 4e56 ffd4 linkw %fp,#-44 59b44: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
int i;
/*
* Fill with spaces. This is how a short directory entry is padded.
*/
memset (sfn, ' ', sfn_len);
59b48: 2f2e 0014 movel %fp@(20),%sp@- 59b4c: 4878 0020 pea 20 <OPER2+0xc>
*
*/
#define MSDOS_L2S_PRINT 0
msdos_name_type_t
msdos_long_to_short(const char *lfn, int lfn_len, char* sfn, int sfn_len)
{
59b50: 2a6e 0010 moveal %fp@(16),%a5 59b54: 286e 0008 moveal %fp@(8),%a4
int i;
/*
* Fill with spaces. This is how a short directory entry is padded.
*/
memset (sfn, ' ', sfn_len);
59b58: 2f0d movel %a5,%sp@-
*
*/
#define MSDOS_L2S_PRINT 0
msdos_name_type_t
msdos_long_to_short(const char *lfn, int lfn_len, char* sfn, int sfn_len)
{
59b5a: 2a2e 000c movel %fp@(12),%d5
int i;
/*
* Fill with spaces. This is how a short directory entry is padded.
*/
memset (sfn, ' ', sfn_len);
59b5e: 4eb9 0005 e310 jsr 5e310 <memset>
/*
* Handle '.' and '..' specially.
*/
if ((lfn[0] == '.') && (lfn_len == 1))
59b64: 4fef 000c lea %sp@(12),%sp 59b68: 702e moveq #46,%d0 59b6a: 1414 moveb %a4@,%d2 59b6c: 1802 moveb %d2,%d4 59b6e: 49c4 extbl %d4 59b70: b084 cmpl %d4,%d0 59b72: 6700 0106 beqw 59c7a <msdos_long_to_short+0x13a>
}
/*
* Filenames with only blanks and dots are not allowed!
*/
for (i = 0; i < lfn_len; i++)
59b76: 4a85 tstl %d5
59b78: 6f2a bles 59ba4 <msdos_long_to_short+0x64> <== NEVER TAKEN
{
sfn[0] = sfn[1] = '.';
#if MSDOS_L2S_PRINT
printf ("MSDOS_L2S: SHORT[2]: lfn:'%s' SFN:'%s'\n", lfn, sfn);
#endif
return MSDOS_NAME_SHORT;
59b7a: 204c moveal %a4,%a0
}
/*
* Filenames with only blanks and dots are not allowed!
*/
for (i = 0; i < lfn_len; i++)
59b7c: 4280 clrl %d0 59b7e: 5280 addql #1,%d0
if ((lfn[i] != ' ') && (lfn[i] != '.'))
59b80: 7620 moveq #32,%d3 59b82: 1218 moveb %a0@+,%d1 59b84: 49c1 extbl %d1 59b86: b681 cmpl %d1,%d3
59b88: 6708 beqs 59b92 <msdos_long_to_short+0x52> <== NEVER TAKEN
59b8a: 163c 002e moveb #46,%d3 59b8e: b681 cmpl %d1,%d3
59b90: 6616 bnes 59ba8 <msdos_long_to_short+0x68> <== ALWAYS TAKEN
}
/*
* Filenames with only blanks and dots are not allowed!
*/
for (i = 0; i < lfn_len; i++)
59b92: ba80 cmpl %d0,%d5 <== NOT EXECUTED 59b94: 66e8 bnes 59b7e <msdos_long_to_short+0x3e> <== NOT EXECUTED
if (i == lfn_len)
{
#if MSDOS_L2S_PRINT
printf ("MSDOS_L2S: INVALID[1]: lfn:'%s' SFN:'%s'\n", lfn, sfn);
#endif
return MSDOS_NAME_INVALID;
59b96: 4284 clrl %d4 <== NOT EXECUTED
#if MSDOS_L2S_PRINT
printf ("MSDOS_L2S: TYPE:%d lfn:'%s' SFN:'%s'\n", type, lfn, sfn);
#endif
return type;
}
59b98: 2004 movel %d4,%d0 59b9a: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 59ba0: 4e5e unlk %fp 59ba2: 4e75 rts
*/
for (i = 0; i < lfn_len; i++)
if ((lfn[i] != ' ') && (lfn[i] != '.'))
break;
if (i == lfn_len)
59ba4: 4a85 tstl %d5 <== NOT EXECUTED 59ba6: 67ee beqs 59b96 <msdos_long_to_short+0x56> <== NOT EXECUTED
bool lowercase = false;
bool uppercase = false;
int dot_at = -1;
int count = 0;
while (*name && (count < name_len))
59ba8: 4a02 tstb %d2 59baa: 6700 010c beqw 59cb8 <msdos_long_to_short+0x178> 59bae: 4a85 tstl %d5 59bb0: 6f00 0106 blew 59cb8 <msdos_long_to_short+0x178>
* true the name is long, else the name is short. * */ #define MSDOS_L2S_PRINT 0 msdos_name_type_t msdos_long_to_short(const char *lfn, int lfn_len, char* sfn, int sfn_len)
59bb4: 45ec 0001 lea %a4@(1),%a2 59bb8: 4283 clrl %d3 59bba: 7cff moveq #-1,%d6 59bbc: 47fa ff06 lea %pc@(59ac4 <msdos_is_valid_name_char>),%a3 59bc0: 4201 clrb %d1 59bc2: 4207 clrb %d7 59bc4: 1d41 ffff moveb %d1,%fp@(-1)
int count = 0;
while (*name && (count < name_len))
{
bool is_dot = *name == '.';
msdos_name_type_t type = msdos_is_valid_name_char(*name);
59bc8: 2f04 movel %d4,%sp@- 59bca: 4e93 jsr %a3@ 59bcc: 588f addql #4,%sp 59bce: 2800 movel %d0,%d4
#if MSDOS_NAME_TYPE_PRINT
printf ("MSDOS_NAME_TYPE: c:%02x type:%d\n", *name, type);
#endif
if ((type == MSDOS_NAME_INVALID) || (type == MSDOS_NAME_LONG))
59bd0: 67c6 beqs 59b98 <msdos_long_to_short+0x58>
59bd2: 7002 moveq #2,%d0 59bd4: b084 cmpl %d4,%d0 59bd6: 6700 0082 beqw 59c5a <msdos_long_to_short+0x11a>
int dot_at = -1;
int count = 0;
while (*name && (count < name_len))
{
bool is_dot = *name == '.';
59bda: 103c 002e moveb #46,%d0
#endif
if ((type == MSDOS_NAME_INVALID) || (type == MSDOS_NAME_LONG))
return type;
if (dot_at >= 0)
59bde: 72ff moveq #-1,%d1
int dot_at = -1;
int count = 0;
while (*name && (count < name_len))
{
bool is_dot = *name == '.';
59be0: b580 eorl %d2,%d0 59be2: 4a00 tstb %d0 59be4: 57c0 seq %d0 59be6: 4480 negl %d0
#endif
if ((type == MSDOS_NAME_INVALID) || (type == MSDOS_NAME_LONG))
return type;
if (dot_at >= 0)
59be8: b286 cmpl %d6,%d1
59bea: 674c beqs 59c38 <msdos_long_to_short+0xf8> <== ALWAYS TAKEN
{
if (is_dot || ((count - dot_at) > 3))
59bec: 4a00 tstb %d0 <== NOT EXECUTED 59bee: 6600 00dc bnew 59ccc <msdos_long_to_short+0x18c> <== NOT EXECUTED 59bf2: 2003 movel %d3,%d0 <== NOT EXECUTED 59bf4: 9086 subl %d6,%d0 <== NOT EXECUTED 59bf6: 7203 moveq #3,%d1 <== NOT EXECUTED 59bf8: b280 cmpl %d0,%d1 <== NOT EXECUTED 59bfa: 6d00 00d0 bltw 59ccc <msdos_long_to_short+0x18c> <== NOT EXECUTED
}
}
if (is_dot)
dot_at = count;
else if ((*name >= 'A') && (*name <= 'Z'))
59bfe: 2002 movel %d2,%d0 59c00: 0680 ffff ffbf addil #-65,%d0 59c06: 7219 moveq #25,%d1 59c08: 0280 0000 00ff andil #255,%d0 59c0e: b280 cmpl %d0,%d1
59c10: 6464 bccs 59c76 <msdos_long_to_short+0x136> <== NEVER TAKEN
uppercase = true;
else if ((*name >= 'a') && (*name <= 'z'))
59c12: 0682 ffff ff9f addil #-97,%d2 59c18: 0282 0000 00ff andil #255,%d2 59c1e: b282 cmpl %d2,%d1
59c20: 6506 bcss 59c28 <msdos_long_to_short+0xe8>
lowercase = true;
59c22: 7201 moveq #1,%d1 59c24: 1d41 ffff moveb %d1,%fp@(-1)
bool lowercase = false;
bool uppercase = false;
int dot_at = -1;
int count = 0;
while (*name && (count < name_len))
59c28: 141a moveb %a2@+,%d2
59c2a: 671c beqs 59c48 <msdos_long_to_short+0x108>
else if ((*name >= 'A') && (*name <= 'Z'))
uppercase = true;
else if ((*name >= 'a') && (*name <= 'z'))
lowercase = true;
count++;
59c2c: 5283 addql #1,%d3
bool lowercase = false;
bool uppercase = false;
int dot_at = -1;
int count = 0;
while (*name && (count < name_len))
59c2e: ba83 cmpl %d3,%d5
59c30: 6716 beqs 59c48 <msdos_long_to_short+0x108>
59c32: 1802 moveb %d2,%d4 59c34: 49c4 extbl %d4 59c36: 6090 bras 59bc8 <msdos_long_to_short+0x88>
return MSDOS_NAME_LONG;
}
}
else
{
if (count == 8 && !is_dot)
59c38: 7208 moveq #8,%d1 59c3a: b283 cmpl %d3,%d1
59c3c: 6770 beqs 59cae <msdos_long_to_short+0x16e>
#endif
return MSDOS_NAME_LONG;
}
}
if (is_dot)
59c3e: 4a00 tstb %d0
59c40: 67bc beqs 59bfe <msdos_long_to_short+0xbe> <== ALWAYS TAKEN
59c42: 2c03 movel %d3,%d6 <== NOT EXECUTED
bool lowercase = false;
bool uppercase = false;
int dot_at = -1;
int count = 0;
while (*name && (count < name_len))
59c44: 141a moveb %a2@+,%d2 <== NOT EXECUTED 59c46: 66e4 bnes 59c2c <msdos_long_to_short+0xec> <== NOT EXECUTED
count++;
name++;
}
if (lowercase && uppercase)
59c48: 4a2e ffff tstb %fp@(-1)
59c4c: 676a beqs 59cb8 <msdos_long_to_short+0x178> <== NEVER TAKEN
}
#if MSDOS_NAME_TYPE_PRINT
printf ("MSDOS_NAME_TYPE: SHORT[1]\n");
#endif
return MSDOS_NAME_SHORT;
59c4e: 4a07 tstb %d7 59c50: 56c4 sne %d4 59c52: 7601 moveq #1,%d3 59c54: 49c4 extbl %d4 59c56: 9684 subl %d4,%d3 59c58: 2803 movel %d3,%d4
printf ("MSDOS_L2S: INVALID[2]: lfn:'%s' SFN:'%s'\n", lfn, sfn);
#endif
return MSDOS_NAME_INVALID;
}
msdos_filename_unix2dos (lfn, lfn_len, sfn);
59c5a: 2f0d movel %a5,%sp@- 59c5c: 2f05 movel %d5,%sp@- 59c5e: 2f0c movel %a4,%sp@- 59c60: 4eb9 0005 ccc6 jsr 5ccc6 <msdos_filename_unix2dos>
#if MSDOS_L2S_PRINT
printf ("MSDOS_L2S: TYPE:%d lfn:'%s' SFN:'%s'\n", type, lfn, sfn);
#endif
return type;
59c66: 4fef 000c lea %sp@(12),%sp
}
59c6a: 2004 movel %d4,%d0 59c6c: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 59c72: 4e5e unlk %fp 59c74: 4e75 rts
}
if (is_dot)
dot_at = count;
else if ((*name >= 'A') && (*name <= 'Z'))
uppercase = true;
59c76: 7e01 moveq #1,%d7 <== NOT EXECUTED 59c78: 60ae bras 59c28 <msdos_long_to_short+0xe8> <== NOT EXECUTED
memset (sfn, ' ', sfn_len);
/*
* Handle '.' and '..' specially.
*/
if ((lfn[0] == '.') && (lfn_len == 1))
59c7a: 7201 moveq #1,%d1 59c7c: b285 cmpl %d5,%d1
59c7e: 6760 beqs 59ce0 <msdos_long_to_short+0x1a0> <== NEVER TAKEN
printf ("MSDOS_L2S: SHORT[1]: lfn:'%s' SFN:'%s'\n", lfn, sfn);
#endif
return MSDOS_NAME_SHORT;
}
if ((lfn[0] == '.') && (lfn[1] == '.') && (lfn_len == 2))
59c80: 762e moveq #46,%d3 59c82: 102c 0001 moveb %a4@(1),%d0 59c86: 49c0 extbl %d0 59c88: b680 cmpl %d0,%d3 59c8a: 6600 feea bnew 59b76 <msdos_long_to_short+0x36> 59c8e: 7002 moveq #2,%d0 59c90: b085 cmpl %d5,%d0 59c92: 6600 fee2 bnew 59b76 <msdos_long_to_short+0x36>
{
sfn[0] = sfn[1] = '.';
#if MSDOS_L2S_PRINT
printf ("MSDOS_L2S: SHORT[2]: lfn:'%s' SFN:'%s'\n", lfn, sfn);
#endif
return MSDOS_NAME_SHORT;
59c96: 7801 moveq #1,%d4
#if MSDOS_L2S_PRINT
printf ("MSDOS_L2S: TYPE:%d lfn:'%s' SFN:'%s'\n", type, lfn, sfn);
#endif
return type;
}
59c98: 2004 movel %d4,%d0
return MSDOS_NAME_SHORT;
}
if ((lfn[0] == '.') && (lfn[1] == '.') && (lfn_len == 2))
{
sfn[0] = sfn[1] = '.';
59c9a: 722e moveq #46,%d1 59c9c: 1abc 002e moveb #46,%a5@ 59ca0: 1b41 0001 moveb %d1,%a5@(1)
#if MSDOS_L2S_PRINT
printf ("MSDOS_L2S: TYPE:%d lfn:'%s' SFN:'%s'\n", type, lfn, sfn);
#endif
return type;
}
59ca4: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 59caa: 4e5e unlk %fp 59cac: 4e75 rts
return MSDOS_NAME_LONG;
}
}
else
{
if (count == 8 && !is_dot)
59cae: 4a00 tstb %d0
59cb0: 671a beqs 59ccc <msdos_long_to_short+0x18c> <== ALWAYS TAKEN
59cb2: 7c08 moveq #8,%d6 <== NOT EXECUTED 59cb4: 6000 ff72 braw 59c28 <msdos_long_to_short+0xe8> <== NOT EXECUTED
printf ("MSDOS_L2S: INVALID[2]: lfn:'%s' SFN:'%s'\n", lfn, sfn);
#endif
return MSDOS_NAME_INVALID;
}
msdos_filename_unix2dos (lfn, lfn_len, sfn);
59cb8: 2f0d movel %a5,%sp@- <== NOT EXECUTED
}
#if MSDOS_NAME_TYPE_PRINT
printf ("MSDOS_NAME_TYPE: SHORT[1]\n");
#endif
return MSDOS_NAME_SHORT;
59cba: 7801 moveq #1,%d4 <== NOT EXECUTED
printf ("MSDOS_L2S: INVALID[2]: lfn:'%s' SFN:'%s'\n", lfn, sfn);
#endif
return MSDOS_NAME_INVALID;
}
msdos_filename_unix2dos (lfn, lfn_len, sfn);
59cbc: 2f05 movel %d5,%sp@- <== NOT EXECUTED 59cbe: 2f0c movel %a4,%sp@- <== NOT EXECUTED 59cc0: 4eb9 0005 ccc6 jsr 5ccc6 <msdos_filename_unix2dos> <== NOT EXECUTED
#if MSDOS_L2S_PRINT
printf ("MSDOS_L2S: TYPE:%d lfn:'%s' SFN:'%s'\n", type, lfn, sfn);
#endif
return type;
59cc6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 59cca: 609e bras 59c6a <msdos_long_to_short+0x12a> <== NOT EXECUTED
printf ("MSDOS_L2S: INVALID[2]: lfn:'%s' SFN:'%s'\n", lfn, sfn);
#endif
return MSDOS_NAME_INVALID;
}
msdos_filename_unix2dos (lfn, lfn_len, sfn);
59ccc: 2f0d movel %a5,%sp@-
{
#if MSDOS_NAME_TYPE_PRINT
printf ("MSDOS_NAME_TYPE: LONG[2]: is_dot:%d, at:%d cnt\n",
is_dot, dot_at, count);
#endif
return MSDOS_NAME_LONG;
59cce: 7802 moveq #2,%d4
printf ("MSDOS_L2S: INVALID[2]: lfn:'%s' SFN:'%s'\n", lfn, sfn);
#endif
return MSDOS_NAME_INVALID;
}
msdos_filename_unix2dos (lfn, lfn_len, sfn);
59cd0: 2f05 movel %d5,%sp@- 59cd2: 2f0c movel %a4,%sp@- 59cd4: 4eb9 0005 ccc6 jsr 5ccc6 <msdos_filename_unix2dos>
#if MSDOS_L2S_PRINT
printf ("MSDOS_L2S: TYPE:%d lfn:'%s' SFN:'%s'\n", type, lfn, sfn);
#endif
return type;
59cda: 4fef 000c lea %sp@(12),%sp 59cde: 608a bras 59c6a <msdos_long_to_short+0x12a>
{
sfn[0] = '.';
#if MSDOS_L2S_PRINT
printf ("MSDOS_L2S: SHORT[1]: lfn:'%s' SFN:'%s'\n", lfn, sfn);
#endif
return MSDOS_NAME_SHORT;
59ce0: 7801 moveq #1,%d4 <== NOT EXECUTED
#if MSDOS_L2S_PRINT
printf ("MSDOS_L2S: TYPE:%d lfn:'%s' SFN:'%s'\n", type, lfn, sfn);
#endif
return type;
}
59ce2: 2004 movel %d4,%d0 <== NOT EXECUTED
/*
* Handle '.' and '..' specially.
*/
if ((lfn[0] == '.') && (lfn_len == 1))
{
sfn[0] = '.';
59ce4: 1abc 002e moveb #46,%a5@ <== NOT EXECUTED
#if MSDOS_L2S_PRINT
printf ("MSDOS_L2S: TYPE:%d lfn:'%s' SFN:'%s'\n", type, lfn, sfn);
#endif
return type;
}
59ce8: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 59cee: 4e5e unlk %fp <== NOT EXECUTED
0004fc14 <msdos_mknod>:
const char *name,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
4fc14: 4e56 ffec linkw %fp,#-20 4fc18: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 4fc1c: 246e 0018 moveal %fp@(24),%a2 4fc20: 242e 000c movel %fp@(12),%d2
msdos_token_types_t type = 0;
/*
* Figure out what type of msdos node this is.
*/
if (S_ISDIR(mode))
4fc24: 2002 movel %d2,%d0
rtems_filesystem_location_info_t *pathloc
)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
4fc26: 206a 0010 moveal %a2@(16),%a0
msdos_token_types_t type = 0;
/*
* Figure out what type of msdos node this is.
*/
if (S_ISDIR(mode))
4fc2a: 0280 0000 f000 andil #61440,%d0
const char *name,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
4fc30: 262e 0008 movel %fp@(8),%d3
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
4fc34: 2668 0034 moveal %a0@(52),%a3
msdos_token_types_t type = 0;
/*
* Figure out what type of msdos node this is.
*/
if (S_ISDIR(mode))
4fc38: 0c80 0000 4000 cmpil #16384,%d0
4fc3e: 6756 beqs 4fc96 <msdos_mknod+0x82>
{
type = MSDOS_DIRECTORY;
}
else if (S_ISREG(mode))
4fc40: 0c80 0000 8000 cmpil #32768,%d0
4fc46: 666c bnes 4fcb4 <msdos_mknod+0xa0> <== NEVER TAKEN
{
type = MSDOS_REGULAR_FILE;
4fc48: 7805 moveq #5,%d4
}
else
rtems_set_errno_and_return_minus_one(EINVAL);
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
4fc4a: 42a7 clrl %sp@- 4fc4c: 42a7 clrl %sp@- 4fc4e: 2f2b 0088 movel %a3@(136),%sp@- 4fc52: 4eb9 0004 af20 jsr 4af20 <rtems_semaphore_obtain>
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
4fc58: 4fef 000c lea %sp@(12),%sp 4fc5c: 4a80 tstl %d0
4fc5e: 663a bnes 4fc9a <msdos_mknod+0x86> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one(EIO);
/* Create an MSDOS node */
rc = msdos_creat_node(pathloc, type, name, strlen(name), mode, NULL);
4fc60: 2f03 movel %d3,%sp@- 4fc62: 4eb9 0005 f084 jsr 5f084 <strlen> 4fc68: 4297 clrl %sp@ 4fc6a: 2f02 movel %d2,%sp@- 4fc6c: 2f00 movel %d0,%sp@- 4fc6e: 2f03 movel %d3,%sp@- 4fc70: 2f04 movel %d4,%sp@- 4fc72: 2f0a movel %a2,%sp@- 4fc74: 4eb9 0005 897c jsr 5897c <msdos_creat_node>
rtems_semaphore_release(fs_info->vol_sema);
4fc7a: 2f2b 0088 movel %a3@(136),%sp@-
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
/* Create an MSDOS node */
rc = msdos_creat_node(pathloc, type, name, strlen(name), mode, NULL);
4fc7e: 2400 movel %d0,%d2
rtems_semaphore_release(fs_info->vol_sema);
4fc80: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release>
return rc;
4fc86: 4fef 001c lea %sp@(28),%sp
}
4fc8a: 2002 movel %d2,%d0 4fc8c: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 4fc92: 4e5e unlk %fp 4fc94: 4e75 rts
/*
* Figure out what type of msdos node this is.
*/
if (S_ISDIR(mode))
{
type = MSDOS_DIRECTORY;
4fc96: 7801 moveq #1,%d4 4fc98: 60b0 bras 4fc4a <msdos_mknod+0x36>
rtems_set_errno_and_return_minus_one(EINVAL);
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
4fc9a: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 4fca0: 74ff moveq #-1,%d2 <== NOT EXECUTED 4fca2: 2040 moveal %d0,%a0 <== NOT EXECUTED 4fca4: 7005 moveq #5,%d0 <== NOT EXECUTED 4fca6: 2080 movel %d0,%a0@ <== NOT EXECUTED
/* Create an MSDOS node */
rc = msdos_creat_node(pathloc, type, name, strlen(name), mode, NULL);
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
4fca8: 2002 movel %d2,%d0 <== NOT EXECUTED 4fcaa: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 <== NOT EXECUTED 4fcb0: 4e5e unlk %fp <== NOT EXECUTED 4fcb2: 4e75 rts <== NOT EXECUTED
else if (S_ISREG(mode))
{
type = MSDOS_REGULAR_FILE;
}
else
rtems_set_errno_and_return_minus_one(EINVAL);
4fcb4: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 4fcba: 74ff moveq #-1,%d2 <== NOT EXECUTED 4fcbc: 7216 moveq #22,%d1 <== NOT EXECUTED 4fcbe: 2040 moveal %d0,%a0 <== NOT EXECUTED
/* Create an MSDOS node */
rc = msdos_creat_node(pathloc, type, name, strlen(name), mode, NULL);
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
4fcc0: 2002 movel %d2,%d0 <== NOT EXECUTED 4fcc2: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 <== NOT EXECUTED
else if (S_ISREG(mode))
{
type = MSDOS_REGULAR_FILE;
}
else
rtems_set_errno_and_return_minus_one(EINVAL);
4fcc8: 2081 movel %d1,%a0@ <== NOT EXECUTED
/* Create an MSDOS node */
rc = msdos_creat_node(pathloc, type, name, strlen(name), mode, NULL);
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
4fcca: 4e5e unlk %fp <== NOT EXECUTED
...
0004fce4 <msdos_rename>:
int
msdos_rename(rtems_filesystem_location_info_t *old_parent_loc,
rtems_filesystem_location_info_t *old_loc,
rtems_filesystem_location_info_t *new_parent_loc,
const char *new_name)
{
4fce4: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 4fce8: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ <== NOT EXECUTED 4fcec: 246e 0010 moveal %fp@(16),%a2 <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = new_parent_loc->mt_entry->fs_info;
4fcf0: 206a 0010 moveal %a2@(16),%a0 <== NOT EXECUTED
int
msdos_rename(rtems_filesystem_location_info_t *old_parent_loc,
rtems_filesystem_location_info_t *old_loc,
rtems_filesystem_location_info_t *new_parent_loc,
const char *new_name)
{
4fcf4: 242e 0014 movel %fp@(20),%d2 <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = new_parent_loc->mt_entry->fs_info;
4fcf8: 2668 0034 moveal %a0@(52),%a3 <== NOT EXECUTED
int len;
/*
* check spelling and format new node name
*/
if (MSDOS_NAME != msdos_get_token(new_name, strlen(new_name), &token, &len)) {
4fcfc: 2f02 movel %d2,%sp@- <== NOT EXECUTED
int
msdos_rename(rtems_filesystem_location_info_t *old_parent_loc,
rtems_filesystem_location_info_t *old_loc,
rtems_filesystem_location_info_t *new_parent_loc,
const char *new_name)
{
4fcfe: 286e 000c moveal %fp@(12),%a4 <== NOT EXECUTED
int len;
/*
* check spelling and format new node name
*/
if (MSDOS_NAME != msdos_get_token(new_name, strlen(new_name), &token, &len)) {
4fd02: 4eb9 0005 f084 jsr 5f084 <strlen> <== NOT EXECUTED 4fd08: 588f addql #4,%sp <== NOT EXECUTED 4fd0a: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4fd0e: 486e fff8 pea %fp@(-8) <== NOT EXECUTED
const char *new_name)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = new_parent_loc->mt_entry->fs_info;
fat_file_fd_t *old_fat_fd = old_loc->node_access;
4fd12: 2a54 moveal %a4@,%a5 <== NOT EXECUTED
int len;
/*
* check spelling and format new node name
*/
if (MSDOS_NAME != msdos_get_token(new_name, strlen(new_name), &token, &len)) {
4fd14: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4fd16: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4fd18: 4eb9 0005 9cf2 jsr 59cf2 <msdos_get_token> <== NOT EXECUTED 4fd1e: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4fd22: 7203 moveq #3,%d1 <== NOT EXECUTED 4fd24: b280 cmpl %d0,%d1 <== NOT EXECUTED 4fd26: 6600 0082 bnew 4fdaa <msdos_rename+0xc6> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENAMETOOLONG);
}
/*
* lock volume
*/
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
4fd2a: 42a7 clrl %sp@- <== NOT EXECUTED 4fd2c: 42a7 clrl %sp@- <== NOT EXECUTED 4fd2e: 2f2b 0088 movel %a3@(136),%sp@- <== NOT EXECUTED 4fd32: 4eb9 0004 af20 jsr 4af20 <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
4fd38: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4fd3c: 4a80 tstl %d0 <== NOT EXECUTED 4fd3e: 6600 0084 bnew 4fdc4 <msdos_rename+0xe0> <== NOT EXECUTED
/*
* create new directory entry as "hard link", copying relevant info from
* existing file
*/
rc = msdos_creat_node(new_parent_loc,
4fd42: 2f0d movel %a5,%sp@- <== NOT EXECUTED 4fd44: 2f3c 0000 8000 movel #32768,%sp@- <== NOT EXECUTED 4fd4a: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 4fd4e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4fd50: 4878 0003 pea 3 <DIVIDE> <== NOT EXECUTED 4fd54: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4fd56: 4eb9 0005 897c jsr 5897c <msdos_creat_node> <== NOT EXECUTED
MSDOS_HARD_LINK,new_name,len,S_IFREG,
old_fat_fd);
if (rc != RC_OK)
4fd5c: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
/*
* create new directory entry as "hard link", copying relevant info from
* existing file
*/
rc = msdos_creat_node(new_parent_loc,
4fd60: 2400 movel %d0,%d2 <== NOT EXECUTED
MSDOS_HARD_LINK,new_name,len,S_IFREG,
old_fat_fd);
if (rc != RC_OK)
4fd62: 662e bnes 4fd92 <msdos_rename+0xae> <== NOT EXECUTED
}
/*
* mark file removed
*/
rc = msdos_set_first_char4file_name(old_loc->mt_entry,
4fd64: 4878 00e5 pea e5 <DBL_MANT_DIG+0xb0> <== NOT EXECUTED 4fd68: 486d 0020 pea %a5@(32) <== NOT EXECUTED 4fd6c: 2f2c 0010 movel %a4@(16),%sp@- <== NOT EXECUTED 4fd70: 4eb9 0005 a0de jsr 5a0de <msdos_set_first_char4file_name> <== NOT EXECUTED
&old_fat_fd->dir_pos,
MSDOS_THIS_DIR_ENTRY_EMPTY);
rtems_semaphore_release(fs_info->vol_sema);
4fd76: 2f2b 0088 movel %a3@(136),%sp@- <== NOT EXECUTED
}
/*
* mark file removed
*/
rc = msdos_set_first_char4file_name(old_loc->mt_entry,
4fd7a: 2400 movel %d0,%d2 <== NOT EXECUTED
&old_fat_fd->dir_pos,
MSDOS_THIS_DIR_ENTRY_EMPTY);
rtems_semaphore_release(fs_info->vol_sema);
4fd7c: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
return rc;
4fd82: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
}
4fd86: 2002 movel %d2,%d0 <== NOT EXECUTED 4fd88: 4cee 3c04 ffe4 moveml %fp@(-28),%d2/%a2-%a5 <== NOT EXECUTED 4fd8e: 4e5e unlk %fp <== NOT EXECUTED 4fd90: 4e75 rts <== NOT EXECUTED
rc = msdos_creat_node(new_parent_loc,
MSDOS_HARD_LINK,new_name,len,S_IFREG,
old_fat_fd);
if (rc != RC_OK)
{
rtems_semaphore_release(fs_info->vol_sema);
4fd92: 2f2b 0088 movel %a3@(136),%sp@- <== NOT EXECUTED 4fd96: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
return rc;
4fd9c: 588f addql #4,%sp <== NOT EXECUTED
&old_fat_fd->dir_pos,
MSDOS_THIS_DIR_ENTRY_EMPTY);
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
4fd9e: 2002 movel %d2,%d0 <== NOT EXECUTED 4fda0: 4cee 3c04 ffe4 moveml %fp@(-28),%d2/%a2-%a5 <== NOT EXECUTED 4fda6: 4e5e unlk %fp <== NOT EXECUTED 4fda8: 4e75 rts <== NOT EXECUTED
/*
* check spelling and format new node name
*/
if (MSDOS_NAME != msdos_get_token(new_name, strlen(new_name), &token, &len)) {
rtems_set_errno_and_return_minus_one(ENAMETOOLONG);
4fdaa: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 4fdb0: 74ff moveq #-1,%d2 <== NOT EXECUTED 4fdb2: 725b moveq #91,%d1 <== NOT EXECUTED 4fdb4: 2040 moveal %d0,%a0 <== NOT EXECUTED
&old_fat_fd->dir_pos,
MSDOS_THIS_DIR_ENTRY_EMPTY);
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
4fdb6: 2002 movel %d2,%d0 <== NOT EXECUTED 4fdb8: 4cee 3c04 ffe4 moveml %fp@(-28),%d2/%a2-%a5 <== NOT EXECUTED
/*
* check spelling and format new node name
*/
if (MSDOS_NAME != msdos_get_token(new_name, strlen(new_name), &token, &len)) {
rtems_set_errno_and_return_minus_one(ENAMETOOLONG);
4fdbe: 2081 movel %d1,%a0@ <== NOT EXECUTED
&old_fat_fd->dir_pos,
MSDOS_THIS_DIR_ENTRY_EMPTY);
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
4fdc0: 4e5e unlk %fp <== NOT EXECUTED 4fdc2: 4e75 rts <== NOT EXECUTED
* lock volume
*/
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
4fdc4: 4eb9 0005 d92c jsr 5d92c <__errno> <== NOT EXECUTED 4fdca: 74ff moveq #-1,%d2 <== NOT EXECUTED 4fdcc: 2040 moveal %d0,%a0 <== NOT EXECUTED 4fdce: 7005 moveq #5,%d0 <== NOT EXECUTED 4fdd0: 2080 movel %d0,%a0@ <== NOT EXECUTED
&old_fat_fd->dir_pos,
MSDOS_THIS_DIR_ENTRY_EMPTY);
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
4fdd2: 2002 movel %d2,%d0 <== NOT EXECUTED 4fdd4: 4cee 3c04 ffe4 moveml %fp@(-28),%d2/%a2-%a5 <== NOT EXECUTED 4fdda: 4e5e unlk %fp <== NOT EXECUTED
...
00059dea <msdos_set_dir_wrt_time_and_date>:
int
msdos_set_dir_wrt_time_and_date(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
59dea: 4e56 ffdc linkw %fp,#-36 59dee: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@
uint16_t time_val;
uint16_t date;
uint32_t sec = 0;
uint32_t byte = 0;
msdos_date_unix2dos(fat_fd->mtime, &date, &time_val);
59df2: 280e movel %fp,%d4 59df4: 5984 subql #4,%d4 59df6: 260e movel %fp,%d3 59df8: 5583 subql #2,%d3 59dfa: 2f04 movel %d4,%sp@-
int
msdos_set_dir_wrt_time_and_date(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
59dfc: 266e 000c moveal %fp@(12),%a3
uint16_t time_val;
uint16_t date;
uint32_t sec = 0;
uint32_t byte = 0;
msdos_date_unix2dos(fat_fd->mtime, &date, &time_val);
59e00: 2f03 movel %d3,%sp@-
int
msdos_set_dir_wrt_time_and_date(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
59e02: 246e 0008 moveal %fp@(8),%a2
uint16_t time_val;
uint16_t date;
uint32_t sec = 0;
uint32_t byte = 0;
msdos_date_unix2dos(fat_fd->mtime, &date, &time_val);
59e06: 2f2b 003e movel %a3@(62),%sp@-
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
ssize_t ret1 = 0, ret2 = 0, ret3 = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
59e0a: 2a6a 0034 moveal %a2@(52),%a5
uint16_t time_val;
uint16_t date;
uint32_t sec = 0;
uint32_t byte = 0;
msdos_date_unix2dos(fat_fd->mtime, &date, &time_val);
59e0e: 4eb9 0005 ca78 jsr 5ca78 <msdos_date_unix2dos>
/*
* calculate input for _fat_block_write: convert (cluster num, offset) to
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
59e14: 242b 0020 movel %a3@(32),%d2
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
59e18: 4fef 000c lea %sp@(12),%sp
}
}
j++;
}
return MSDOS_NAME_NOT_FOUND_ERR;
}
59e1c: 206a 0034 moveal %a2@(52),%a0 59e20: 6600 00b0 bnew 59ed2 <msdos_set_dir_wrt_time_and_date+0xe8>
59e24: 4280 clrl %d0 <== NOT EXECUTED 59e26: 1028 000a moveb %a0@(10),%d0 <== NOT EXECUTED 59e2a: 7203 moveq #3,%d1 <== NOT EXECUTED 59e2c: c081 andl %d1,%d0 <== NOT EXECUTED 59e2e: 6700 00a2 beqw 59ed2 <msdos_set_dir_wrt_time_and_date+0xe8><== NOT EXECUTED
return fs_info->vol.rdir_loc;
59e32: 2428 001a movel %a0@(26),%d2 <== NOT EXECUTED
/*
* calculate input for _fat_block_write: convert (cluster num, offset) to
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
59e36: 4281 clrl %d1 59e38: 122d 0002 moveb %a5@(2),%d1
/* byte points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
59e3c: 4285 clrl %d5
time_val = CT_LE_W(time_val);
ret1 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_WTIME_OFFSET,
59e3e: 49f9 0005 3c96 lea 53c96 <_fat_block_write>,%a4
/*
* calculate input for _fat_block_write: convert (cluster num, offset) to
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
59e44: 202b 0024 movel %a3@(36),%d0
/* byte points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
59e48: 3a15 movew %a5@,%d5
time_val = CT_LE_W(time_val);
ret1 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_WTIME_OFFSET,
59e4a: 2f04 movel %d4,%sp@-
/*
* calculate input for _fat_block_write: convert (cluster num, offset) to
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
59e4c: 2800 movel %d0,%d4
/* byte points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
59e4e: 2645 moveal %d5,%a3
/*
* calculate input for _fat_block_write: convert (cluster num, offset) to
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
59e50: e2ac lsrl %d1,%d4
/* byte points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
59e52: 538b subql #1,%a3 59e54: 220b movel %a3,%d1
time_val = CT_LE_W(time_val);
ret1 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_WTIME_OFFSET,
59e56: 4878 0002 pea 2 <DOUBLE_FLOAT>
/*
* calculate input for _fat_block_write: convert (cluster num, offset) to
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
59e5a: d484 addl %d4,%d2
/* byte points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
59e5c: c280 andl %d0,%d1
time_val = CT_LE_W(time_val);
59e5e: 4280 clrl %d0
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
/* byte points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
59e60: 2641 moveal %d1,%a3
time_val = CT_LE_W(time_val);
ret1 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_WTIME_OFFSET,
59e62: 486b 0016 pea %a3@(22)
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
/* byte points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
time_val = CT_LE_W(time_val);
59e66: 302e fffc movew %fp@(-4),%d0
ret1 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_WTIME_OFFSET,
59e6a: 2f02 movel %d2,%sp@- 59e6c: 2200 movel %d0,%d1 59e6e: e089 lsrl #8,%d1 59e70: e188 lsll #8,%d0 59e72: 2f0a movel %a2,%sp@- 59e74: 8081 orl %d1,%d0
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
/* byte points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
time_val = CT_LE_W(time_val);
59e76: 3d40 fffc movew %d0,%fp@(-4)
ret1 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_WTIME_OFFSET,
59e7a: 4e94 jsr %a4@
2, (char *)(&time_val));
date = CT_LE_W(date);
59e7c: 4281 clrl %d1
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
/* byte points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
time_val = CT_LE_W(time_val);
ret1 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_WTIME_OFFSET,
59e7e: 2800 movel %d0,%d4
2, (char *)(&time_val));
date = CT_LE_W(date);
ret2 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_WDATE_OFFSET,
59e80: 2f03 movel %d3,%sp@- 59e82: 4878 0002 pea 2 <DOUBLE_FLOAT> 59e86: 486b 0018 pea %a3@(24)
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
time_val = CT_LE_W(time_val);
ret1 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_WTIME_OFFSET,
2, (char *)(&time_val));
date = CT_LE_W(date);
59e8a: 322e fffe movew %fp@(-2),%d1
ret2 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_WDATE_OFFSET,
59e8e: 2f02 movel %d2,%sp@- 59e90: 2001 movel %d1,%d0 59e92: e089 lsrl #8,%d1 59e94: e188 lsll #8,%d0 59e96: 2f0a movel %a2,%sp@- 59e98: 8081 orl %d1,%d0
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
time_val = CT_LE_W(time_val);
ret1 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_WTIME_OFFSET,
2, (char *)(&time_val));
date = CT_LE_W(date);
59e9a: 3d40 fffe movew %d0,%fp@(-2)
ret2 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_WDATE_OFFSET,
59e9e: 4e94 jsr %a4@
2, (char *)(&date));
ret3 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_ADATE_OFFSET,
59ea0: 4fef 0024 lea %sp@(36),%sp
time_val = CT_LE_W(time_val);
ret1 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_WTIME_OFFSET,
2, (char *)(&time_val));
date = CT_LE_W(date);
ret2 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_WDATE_OFFSET,
59ea4: 2a00 movel %d0,%d5
2, (char *)(&date));
ret3 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_ADATE_OFFSET,
59ea6: 2e83 movel %d3,%sp@ 59ea8: 4878 0002 pea 2 <DOUBLE_FLOAT> 59eac: 486b 0012 pea %a3@(18) 59eb0: 2f02 movel %d2,%sp@- 59eb2: 2f0a movel %a2,%sp@- 59eb4: 4e94 jsr %a4@
2, (char *)(&date));
if ( (ret1 < 0) || (ret2 < 0) || (ret3 < 0) )
59eb6: 4fef 0014 lea %sp@(20),%sp 59eba: 4a84 tstl %d4
59ebc: 6d26 blts 59ee4 <msdos_set_dir_wrt_time_and_date+0xfa><== NEVER TAKEN
59ebe: 4a85 tstl %d5
59ec0: 6d22 blts 59ee4 <msdos_set_dir_wrt_time_and_date+0xfa><== NEVER TAKEN
return -1;
59ec2: 4a80 tstl %d0 59ec4: 5dc0 slt %d0
return RC_OK;
}
59ec6: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5 59ecc: 4e5e unlk %fp
2, (char *)(&date));
ret3 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_ADATE_OFFSET,
2, (char *)(&date));
if ( (ret1 < 0) || (ret2 < 0) || (ret3 < 0) )
return -1;
59ece: 49c0 extbl %d0
return RC_OK;
}
59ed0: 4e75 rts
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
59ed2: 4280 clrl %d0 59ed4: 1028 0005 moveb %a0@(5),%d0 59ed8: 5582 subql #2,%d2 59eda: e1aa lsll %d0,%d2 59edc: d4a8 002c addl %a0@(44),%d2 59ee0: 6000 ff54 braw 59e36 <msdos_set_dir_wrt_time_and_date+0x4c>
2, (char *)(&date));
ret3 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_ADATE_OFFSET,
2, (char *)(&date));
if ( (ret1 < 0) || (ret2 < 0) || (ret3 < 0) )
return -1;
59ee4: 70ff moveq #-1,%d0 <== NOT EXECUTED
return RC_OK;
}
59ee6: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5 <== NOT EXECUTED 59eec: 4e5e unlk %fp <== NOT EXECUTED
00059fc4 <msdos_set_file_size>:
int
msdos_set_file_size(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
59fc4: 4e56 ffe0 linkw %fp,#-32 59fc8: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 59fcc: 266e 0008 moveal %fp@(8),%a3 59fd0: 246e 000c moveal %fp@(12),%a2
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
59fd4: 206b 0034 moveal %a3@(52),%a0
uint32_t le_new_length = 0;
uint32_t sec = 0;
uint32_t byte = 0;
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
59fd8: 222a 0020 movel %a2@(32),%d1
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
59fdc: 6600 0082 bnew 5a060 <msdos_set_file_size+0x9c>
59fe0: 4280 clrl %d0 <== NOT EXECUTED 59fe2: 1028 000a moveb %a0@(10),%d0 <== NOT EXECUTED 59fe6: 7403 moveq #3,%d2 <== NOT EXECUTED 59fe8: c082 andl %d2,%d0 <== NOT EXECUTED 59fea: 6774 beqs 5a060 <msdos_set_file_size+0x9c> <== NOT EXECUTED
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
byte = (fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
le_new_length = CT_LE_L((fat_fd->fat_file_size));
59fec: 242a 0018 movel %a2@(24),%d2 <== NOT EXECUTED
uint32_t value
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
59ff0: 7818 moveq #24,%d4 <== NOT EXECUTED 59ff2: 2a02 movel %d2,%d5 <== NOT EXECUTED
byte3 = (value >> 16) & 0xff;
59ff4: 2602 movel %d2,%d3 <== NOT EXECUTED
byte2 = (value >> 8) & 0xff;
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
59ff6: 2002 movel %d2,%d0 <== NOT EXECUTED
uint32_t value
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
59ff8: e8ad lsrl %d4,%d5 <== NOT EXECUTED
byte3 = (value >> 16) & 0xff;
59ffa: e08b lsrl #8,%d3 <== NOT EXECUTED
uint32_t le_new_length = 0;
uint32_t sec = 0;
uint32_t byte = 0;
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
59ffc: 4286 clrl %d6 <== NOT EXECUTED 59ffe: 1c28 0002 moveb %a0@(2),%d6 <== NOT EXECUTED
byte2 = (value >> 8) & 0xff;
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
5a002: 224e moveal %fp,%a1 <== NOT EXECUTED 5a004: e9a8 lsll %d4,%d0 <== NOT EXECUTED
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
5a006: e18a lsll #8,%d2 <== NOT EXECUTED
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
5a008: 0283 0000 ff00 andil #65280,%d3 <== NOT EXECUTED 5a00e: 8085 orl %d5,%d0 <== NOT EXECUTED
byte = (fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
5a010: 4285 clrl %d5 <== NOT EXECUTED 5a012: 0282 00ff 0000 andil #16711680,%d2 <== NOT EXECUTED 5a018: 3a10 movew %a0@,%d5 <== NOT EXECUTED
uint32_t le_new_length = 0;
uint32_t sec = 0;
uint32_t byte = 0;
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
5a01a: 282a 0024 movel %a2@(36),%d4 <== NOT EXECUTED 5a01e: 8082 orl %d2,%d0 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
5a020: 2228 001a movel %a0@(26),%d1 <== NOT EXECUTED 5a024: 2404 movel %d4,%d2 <== NOT EXECUTED 5a026: ecaa lsrl %d6,%d2 <== NOT EXECUTED 5a028: 8083 orl %d3,%d0 <== NOT EXECUTED 5a02a: 2300 movel %d0,%a1@- <== NOT EXECUTED
byte = (fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
5a02c: 2005 movel %d5,%d0 <== NOT EXECUTED 5a02e: 5380 subql #1,%d0 <== NOT EXECUTED
le_new_length = CT_LE_L((fat_fd->fat_file_size));
ret = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_SIZE_OFFSET, 4,
5a030: 2f09 movel %a1,%sp@- <== NOT EXECUTED 5a032: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED
uint32_t sec = 0;
uint32_t byte = 0;
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
byte = (fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
5a036: c084 andl %d4,%d0 <== NOT EXECUTED
le_new_length = CT_LE_L((fat_fd->fat_file_size));
ret = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_SIZE_OFFSET, 4,
5a038: 2040 moveal %d0,%a0 <== NOT EXECUTED 5a03a: 4868 001c pea %a0@(28) <== NOT EXECUTED 5a03e: 2041 moveal %d1,%a0 <== NOT EXECUTED 5a040: 4870 2800 pea %a0@(00000000,%d2:l) <== NOT EXECUTED 5a044: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5a046: 4eb9 0005 3c96 jsr 53c96 <_fat_block_write> <== NOT EXECUTED
(char *)(&le_new_length));
if ( ret < 0 )
5a04c: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
return -1;
5a050: 4a80 tstl %d0 <== NOT EXECUTED 5a052: 5dc0 slt %d0 <== NOT EXECUTED
return RC_OK;
}
5a054: 4cee 0c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a3 <== NOT EXECUTED 5a05a: 4e5e unlk %fp <== NOT EXECUTED
le_new_length = CT_LE_L((fat_fd->fat_file_size));
ret = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_SIZE_OFFSET, 4,
(char *)(&le_new_length));
if ( ret < 0 )
return -1;
5a05c: 49c0 extbl %d0 <== NOT EXECUTED
return RC_OK;
}
5a05e: 4e75 rts <== NOT EXECUTED
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
5a060: 4280 clrl %d0 5a062: 1028 0005 moveb %a0@(5),%d0 5a066: 5581 subql #2,%d1
uint32_t value
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
5a068: 7818 moveq #24,%d4
uint32_t le_new_length = 0;
uint32_t sec = 0;
uint32_t byte = 0;
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
5a06a: 4286 clrl %d6 5a06c: 1c28 0002 moveb %a0@(2),%d6
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
5a070: 224e moveal %fp,%a1
byte = (fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
le_new_length = CT_LE_L((fat_fd->fat_file_size));
5a072: 242a 0018 movel %a2@(24),%d2
uint32_t value
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
5a076: 2a02 movel %d2,%d5
byte3 = (value >> 16) & 0xff;
5a078: 2602 movel %d2,%d3
uint32_t value
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
5a07a: e8ad lsrl %d4,%d5
byte3 = (value >> 16) & 0xff;
5a07c: e08b lsrl #8,%d3 5a07e: e1a9 lsll %d0,%d1
byte2 = (value >> 8) & 0xff;
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
5a080: 2002 movel %d2,%d0
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
5a082: e18a lsll #8,%d2
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
5a084: e9a8 lsll %d4,%d0 5a086: 0283 0000 ff00 andil #65280,%d3 5a08c: 0282 00ff 0000 andil #16711680,%d2 5a092: d2a8 002c addl %a0@(44),%d1 5a096: 8085 orl %d5,%d0
uint32_t sec = 0;
uint32_t byte = 0;
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
byte = (fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
5a098: 4285 clrl %d5 5a09a: 8082 orl %d2,%d0 5a09c: 3a10 movew %a0@,%d5
uint32_t le_new_length = 0;
uint32_t sec = 0;
uint32_t byte = 0;
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
5a09e: 282a 0024 movel %a2@(36),%d4 5a0a2: 2404 movel %d4,%d2 5a0a4: ecaa lsrl %d6,%d2 5a0a6: 8083 orl %d3,%d0 5a0a8: 2300 movel %d0,%a1@-
byte = (fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
5a0aa: 2005 movel %d5,%d0 5a0ac: 5380 subql #1,%d0
le_new_length = CT_LE_L((fat_fd->fat_file_size));
ret = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_SIZE_OFFSET, 4,
5a0ae: 2f09 movel %a1,%sp@- 5a0b0: 4878 0004 pea 4 <CONTEXT_ARG>
uint32_t sec = 0;
uint32_t byte = 0;
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
byte = (fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
5a0b4: c084 andl %d4,%d0
le_new_length = CT_LE_L((fat_fd->fat_file_size));
ret = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_SIZE_OFFSET, 4,
5a0b6: 2040 moveal %d0,%a0 5a0b8: 4868 001c pea %a0@(28) 5a0bc: 2041 moveal %d1,%a0 5a0be: 4870 2800 pea %a0@(00000000,%d2:l) 5a0c2: 2f0b movel %a3,%sp@- 5a0c4: 4eb9 0005 3c96 jsr 53c96 <_fat_block_write>
(char *)(&le_new_length));
if ( ret < 0 )
5a0ca: 4fef 0014 lea %sp@(20),%sp
return -1;
5a0ce: 4a80 tstl %d0 5a0d0: 5dc0 slt %d0
return RC_OK;
}
5a0d2: 4cee 0c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a3 5a0d8: 4e5e unlk %fp
le_new_length = CT_LE_L((fat_fd->fat_file_size));
ret = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_SIZE_OFFSET, 4,
(char *)(&le_new_length));
if ( ret < 0 )
return -1;
5a0da: 49c0 extbl %d0 <== NOT EXECUTED
return RC_OK;
}
0005a0de <msdos_set_first_char4file_name>:
msdos_set_first_char4file_name(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_dir_pos_t *dir_pos,
unsigned char fchar
)
{
5a0de: 4e56 ffc8 linkw %fp,#-56 <== NOT EXECUTED 5a0e2: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 5a0e6: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED 5a0ea: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED
ssize_t ret;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t dir_block_size;
fat_pos_t start = dir_pos->lname;
5a0ee: 2028 0008 movel %a0@(8),%d0 <== NOT EXECUTED 5a0f2: 2228 000c movel %a0@(12),%d1 <== NOT EXECUTED
fat_pos_t end = dir_pos->sname;
5a0f6: 2410 movel %a0@,%d2 <== NOT EXECUTED
fat_dir_pos_t *dir_pos,
unsigned char fchar
)
{
ssize_t ret;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
5a0f8: 246b 0034 moveal %a3@(52),%a2 <== NOT EXECUTED
uint32_t dir_block_size;
fat_pos_t start = dir_pos->lname;
fat_pos_t end = dir_pos->sname;
5a0fc: 2a28 0004 movel %a0@(4),%d5 <== NOT EXECUTED
msdos_set_first_char4file_name(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_dir_pos_t *dir_pos,
unsigned char fchar
)
{
5a100: 1d6e 0013 fff6 moveb %fp@(19),%fp@(-10) <== NOT EXECUTED
ssize_t ret;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t dir_block_size;
fat_pos_t start = dir_pos->lname;
5a106: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED 5a10a: 2d41 fffc movel %d1,%fp@(-4) <== NOT EXECUTED
fat_pos_t end = dir_pos->sname;
if ((end.cln == fs_info->fat.vol.rdir_cl) &&
5a10e: b4aa 0034 cmpl %a2@(52),%d2 <== NOT EXECUTED 5a112: 6700 016a beqw 5a27e <msdos_set_first_char4file_name+0x1a0><== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
dir_block_size = fs_info->fat.vol.rdir_size;
else
dir_block_size = fs_info->fat.vol.bpc;
5a116: 4284 clrl %d4 <== NOT EXECUTED
if (dir_pos->lname.cln == FAT_FILE_SHORT_NAME)
5a118: 76ff moveq #-1,%d3 <== NOT EXECUTED
if ((end.cln == fs_info->fat.vol.rdir_cl) &&
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
dir_block_size = fs_info->fat.vol.rdir_size;
else
dir_block_size = fs_info->fat.vol.bpc;
5a11a: 382a 0006 movew %a2@(6),%d4 <== NOT EXECUTED
if (dir_pos->lname.cln == FAT_FILE_SHORT_NAME)
5a11e: b6a8 0008 cmpl %a0@(8),%d3 <== NOT EXECUTED 5a122: 6700 0130 beqw 5a254 <msdos_set_first_char4file_name+0x176><== NOT EXECUTED
start = dir_pos->sname;
5a126: 222e fffc movel %fp@(-4),%d1 <== NOT EXECUTED
msdos_set_first_char4file_name(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_dir_pos_t *dir_pos,
unsigned char fchar
)
{
5a12a: 224a moveal %a2,%a1 <== NOT EXECUTED 5a12c: 49f9 0005 3c96 lea 53c96 <_fat_block_write>,%a4 <== NOT EXECUTED
{
int rc;
if ((end.cln == fs_info->fat.vol.rdir_cl) &&
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
break;
rc = fat_get_fat_cluster(mt_entry, start.cln, &start.cln);
5a132: 4bf9 0005 b828 lea 5b828 <fat_get_fat_cluster>,%a5 <== NOT EXECUTED
dir_block_size = fs_info->fat.vol.rdir_size;
else
dir_block_size = fs_info->fat.vol.bpc;
if (dir_pos->lname.cln == FAT_FILE_SHORT_NAME)
start = dir_pos->sname;
5a138: 1e2a 0002 moveb %a2@(2),%d7 <== NOT EXECUTED 5a13c: 3c12 movew %a2@,%d6 <== NOT EXECUTED 5a13e: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 5a142: 2d45 fff2 movel %d5,%fp@(-14) <== NOT EXECUTED 5a146: 2008 movel %a0,%d0 <== NOT EXECUTED 5a148: 5580 subql #2,%d0 <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
5a14a: 4a88 tstl %a0 <== NOT EXECUTED 5a14c: 666a bnes 5a1b8 <msdos_set_first_char4file_name+0xda><== NOT EXECUTED 5a14e: 4283 clrl %d3 <== NOT EXECUTED 5a150: 1629 000a moveb %a1@(10),%d3 <== NOT EXECUTED 5a154: 7a03 moveq #3,%d5 <== NOT EXECUTED 5a156: c685 andl %d5,%d3 <== NOT EXECUTED 5a158: 675e beqs 5a1b8 <msdos_set_first_char4file_name+0xda><== NOT EXECUTED
return fs_info->vol.rdir_loc;
5a15a: 2029 001a movel %a1@(26),%d0 <== NOT EXECUTED
{
uint32_t sec = (fat_cluster_num_to_sector_num(mt_entry, start.cln) +
(start.ofs >> fs_info->fat.vol.sec_log2));
uint32_t byte = (start.ofs & (fs_info->fat.vol.bps - 1));;
ret = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_NAME_OFFSET, 1,
5a15e: 486e fff6 pea %fp@(-10) <== NOT EXECUTED 5a162: 2040 moveal %d0,%a0 <== NOT EXECUTED 5a164: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
*/
while (true)
{
uint32_t sec = (fat_cluster_num_to_sector_num(mt_entry, start.cln) +
(start.ofs >> fs_info->fat.vol.sec_log2));
uint32_t byte = (start.ofs & (fs_info->fat.vol.bps - 1));;
5a168: 0286 0000 ffff andil #65535,%d6 <== NOT EXECUTED
* interface.
*/
while (true)
{
uint32_t sec = (fat_cluster_num_to_sector_num(mt_entry, start.cln) +
(start.ofs >> fs_info->fat.vol.sec_log2));
5a16e: 0287 0000 00ff andil #255,%d7 <== NOT EXECUTED
uint32_t byte = (start.ofs & (fs_info->fat.vol.bps - 1));;
5a174: 5386 subql #1,%d6 <== NOT EXECUTED
ret = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_NAME_OFFSET, 1,
5a176: cc81 andl %d1,%d6 <== NOT EXECUTED
* interface.
*/
while (true)
{
uint32_t sec = (fat_cluster_num_to_sector_num(mt_entry, start.cln) +
(start.ofs >> fs_info->fat.vol.sec_log2));
5a178: eea9 lsrl %d7,%d1 <== NOT EXECUTED
uint32_t byte = (start.ofs & (fs_info->fat.vol.bps - 1));;
ret = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_NAME_OFFSET, 1,
5a17a: 2f06 movel %d6,%sp@- <== NOT EXECUTED 5a17c: 4870 1800 pea %a0@(00000000,%d1:l) <== NOT EXECUTED 5a180: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5a182: 4e94 jsr %a4@ <== NOT EXECUTED
&fchar);
if (ret < 0)
5a184: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 5a188: 4a80 tstl %d0 <== NOT EXECUTED 5a18a: 6d66 blts 5a1f2 <msdos_set_first_char4file_name+0x114><== NOT EXECUTED
return -1;
if ((start.cln == end.cln) && (start.ofs == end.ofs))
5a18c: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 5a190: 222e fffc movel %fp@(-4),%d1 <== NOT EXECUTED 5a194: b488 cmpl %a0,%d2 <== NOT EXECUTED 5a196: 6766 beqs 5a1fe <msdos_set_first_char4file_name+0x120><== NOT EXECUTED
break;
start.ofs += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
5a198: 0681 0000 0020 addil #32,%d1 <== NOT EXECUTED 5a19e: 2d41 fffc movel %d1,%fp@(-4) <== NOT EXECUTED
if (start.ofs >= dir_block_size)
5a1a2: b284 cmpl %d4,%d1 <== NOT EXECUTED 5a1a4: 646a bccs 5a210 <msdos_set_first_char4file_name+0x132><== NOT EXECUTED
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
5a1a6: 2008 movel %a0,%d0 <== NOT EXECUTED 5a1a8: 5580 subql #2,%d0 <== NOT EXECUTED 5a1aa: 226b 0034 moveal %a3@(52),%a1 <== NOT EXECUTED 5a1ae: 1e2a 0002 moveb %a2@(2),%d7 <== NOT EXECUTED 5a1b2: 3c12 movew %a2@,%d6 <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
5a1b4: 4a88 tstl %a0 <== NOT EXECUTED 5a1b6: 6796 beqs 5a14e <msdos_set_first_char4file_name+0x70><== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
5a1b8: 4283 clrl %d3 <== NOT EXECUTED 5a1ba: 1629 0005 moveb %a1@(5),%d3 <== NOT EXECUTED 5a1be: e7a8 lsll %d3,%d0 <== NOT EXECUTED
*/
while (true)
{
uint32_t sec = (fat_cluster_num_to_sector_num(mt_entry, start.cln) +
(start.ofs >> fs_info->fat.vol.sec_log2));
uint32_t byte = (start.ofs & (fs_info->fat.vol.bps - 1));;
5a1c0: 0286 0000 ffff andil #65535,%d6 <== NOT EXECUTED
* interface.
*/
while (true)
{
uint32_t sec = (fat_cluster_num_to_sector_num(mt_entry, start.cln) +
(start.ofs >> fs_info->fat.vol.sec_log2));
5a1c6: 0287 0000 00ff andil #255,%d7 <== NOT EXECUTED 5a1cc: d0a9 002c addl %a1@(44),%d0 <== NOT EXECUTED
uint32_t byte = (start.ofs & (fs_info->fat.vol.bps - 1));;
5a1d0: 5386 subql #1,%d6 <== NOT EXECUTED
ret = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_NAME_OFFSET, 1,
5a1d2: 486e fff6 pea %fp@(-10) <== NOT EXECUTED 5a1d6: 2040 moveal %d0,%a0 <== NOT EXECUTED 5a1d8: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 5a1dc: cc81 andl %d1,%d6 <== NOT EXECUTED
* interface.
*/
while (true)
{
uint32_t sec = (fat_cluster_num_to_sector_num(mt_entry, start.cln) +
(start.ofs >> fs_info->fat.vol.sec_log2));
5a1de: eea9 lsrl %d7,%d1 <== NOT EXECUTED
uint32_t byte = (start.ofs & (fs_info->fat.vol.bps - 1));;
ret = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_NAME_OFFSET, 1,
5a1e0: 2f06 movel %d6,%sp@- <== NOT EXECUTED 5a1e2: 4870 1800 pea %a0@(00000000,%d1:l) <== NOT EXECUTED 5a1e6: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5a1e8: 4e94 jsr %a4@ <== NOT EXECUTED
&fchar);
if (ret < 0)
5a1ea: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 5a1ee: 4a80 tstl %d0 <== NOT EXECUTED 5a1f0: 6c9a bges 5a18c <msdos_set_first_char4file_name+0xae><== NOT EXECUTED
return -1;
5a1f2: 70ff moveq #-1,%d0 <== NOT EXECUTED
start.ofs = 0;
}
}
return RC_OK;
}
5a1f4: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5a1fa: 4e5e unlk %fp <== NOT EXECUTED 5a1fc: 4e75 rts <== NOT EXECUTED
ret = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_NAME_OFFSET, 1,
&fchar);
if (ret < 0)
return -1;
if ((start.cln == end.cln) && (start.ofs == end.ofs))
5a1fe: b2ae fff2 cmpl %fp@(-14),%d1 <== NOT EXECUTED 5a202: 6694 bnes 5a198 <msdos_set_first_char4file_name+0xba><== NOT EXECUTED
return rc;
start.ofs = 0;
}
}
return RC_OK;
5a204: 4280 clrl %d0 <== NOT EXECUTED
}
5a206: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5a20c: 4e5e unlk %fp <== NOT EXECUTED 5a20e: 4e75 rts <== NOT EXECUTED 5a210: 2a2e fff2 movel %fp@(-14),%d5 <== NOT EXECUTED
start.ofs += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
if (start.ofs >= dir_block_size)
{
int rc;
if ((end.cln == fs_info->fat.vol.rdir_cl) &&
5a214: b4aa 0034 cmpl %a2@(52),%d2 <== NOT EXECUTED 5a218: 660c bnes 5a226 <msdos_set_first_char4file_name+0x148><== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
5a21a: 4280 clrl %d0 <== NOT EXECUTED 5a21c: 102a 000a moveb %a2@(10),%d0 <== NOT EXECUTED 5a220: 7203 moveq #3,%d1 <== NOT EXECUTED 5a222: c081 andl %d1,%d0 <== NOT EXECUTED
start.ofs += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
if (start.ofs >= dir_block_size)
{
int rc;
if ((end.cln == fs_info->fat.vol.rdir_cl) &&
5a224: 66de bnes 5a204 <msdos_set_first_char4file_name+0x126><== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
break;
rc = fat_get_fat_cluster(mt_entry, start.cln, &start.cln);
5a226: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 5a22a: 2f08 movel %a0,%sp@- <== NOT EXECUTED 5a22c: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5a22e: 4e95 jsr %a5@ <== NOT EXECUTED
if ( rc != RC_OK )
5a230: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5a234: 4a80 tstl %d0 <== NOT EXECUTED 5a236: 66bc bnes 5a1f4 <msdos_set_first_char4file_name+0x116><== NOT EXECUTED
return rc;
start.ofs = 0;
5a238: 42ae fffc clrl %fp@(-4) <== NOT EXECUTED 5a23c: 226b 0034 moveal %a3@(52),%a1 <== NOT EXECUTED
dir_block_size = fs_info->fat.vol.rdir_size;
else
dir_block_size = fs_info->fat.vol.bpc;
if (dir_pos->lname.cln == FAT_FILE_SHORT_NAME)
start = dir_pos->sname;
5a240: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
break;
rc = fat_get_fat_cluster(mt_entry, start.cln, &start.cln);
if ( rc != RC_OK )
return rc;
start.ofs = 0;
5a244: 4281 clrl %d1 <== NOT EXECUTED
dir_block_size = fs_info->fat.vol.rdir_size;
else
dir_block_size = fs_info->fat.vol.bpc;
if (dir_pos->lname.cln == FAT_FILE_SHORT_NAME)
start = dir_pos->sname;
5a246: 2d45 fff2 movel %d5,%fp@(-14) <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
break;
rc = fat_get_fat_cluster(mt_entry, start.cln, &start.cln);
if ( rc != RC_OK )
return rc;
start.ofs = 0;
5a24a: 1e2a 0002 moveb %a2@(2),%d7 <== NOT EXECUTED 5a24e: 3c12 movew %a2@,%d6 <== NOT EXECUTED 5a250: 6000 fef4 braw 5a146 <msdos_set_first_char4file_name+0x68><== NOT EXECUTED
msdos_set_first_char4file_name(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_dir_pos_t *dir_pos,
unsigned char fchar
)
{
5a254: 224a moveal %a2,%a1 <== NOT EXECUTED 5a256: 49f9 0005 3c96 lea 53c96 <_fat_block_write>,%a4 <== NOT EXECUTED
{
int rc;
if ((end.cln == fs_info->fat.vol.rdir_cl) &&
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
break;
rc = fat_get_fat_cluster(mt_entry, start.cln, &start.cln);
5a25c: 4bf9 0005 b828 lea 5b828 <fat_get_fat_cluster>,%a5 <== NOT EXECUTED
dir_block_size = fs_info->fat.vol.rdir_size;
else
dir_block_size = fs_info->fat.vol.bpc;
if (dir_pos->lname.cln == FAT_FILE_SHORT_NAME)
start = dir_pos->sname;
5a262: 2010 movel %a0@,%d0 <== NOT EXECUTED 5a264: 2228 0004 movel %a0@(4),%d1 <== NOT EXECUTED 5a268: 3c12 movew %a2@,%d6 <== NOT EXECUTED 5a26a: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED 5a26e: 2d41 fffc movel %d1,%fp@(-4) <== NOT EXECUTED 5a272: 222e fffc movel %fp@(-4),%d1 <== NOT EXECUTED 5a276: 1e2a 0002 moveb %a2@(2),%d7 <== NOT EXECUTED 5a27a: 6000 fec2 braw 5a13e <msdos_set_first_char4file_name+0x60><== NOT EXECUTED
uint32_t dir_block_size;
fat_pos_t start = dir_pos->lname;
fat_pos_t end = dir_pos->sname;
if ((end.cln == fs_info->fat.vol.rdir_cl) &&
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
5a27e: 4280 clrl %d0 <== NOT EXECUTED 5a280: 102a 000a moveb %a2@(10),%d0 <== NOT EXECUTED 5a284: 7203 moveq #3,%d1 <== NOT EXECUTED 5a286: c081 andl %d1,%d0 <== NOT EXECUTED
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t dir_block_size;
fat_pos_t start = dir_pos->lname;
fat_pos_t end = dir_pos->sname;
if ((end.cln == fs_info->fat.vol.rdir_cl) &&
5a288: 6700 fe8c beqw 5a116 <msdos_set_first_char4file_name+0x38><== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
dir_block_size = fs_info->fat.vol.rdir_size;
5a28c: 282a 0024 movel %a2@(36),%d4 <== NOT EXECUTED
else
dir_block_size = fs_info->fat.vol.bpc;
if (dir_pos->lname.cln == FAT_FILE_SHORT_NAME)
5a290: 76ff moveq #-1,%d3 <== NOT EXECUTED 5a292: b6a8 0008 cmpl %a0@(8),%d3 <== NOT EXECUTED 5a296: 6600 fe8e bnew 5a126 <msdos_set_first_char4file_name+0x48><== NOT EXECUTED 5a29a: 60b8 bras 5a254 <msdos_set_first_char4file_name+0x176><== NOT EXECUTED
00059ef0 <msdos_set_first_cluster_num>:
int
msdos_set_first_cluster_num(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
59ef0: 4e56 ffe4 linkw %fp,#-28
ssize_t ret1 = 0, ret2 = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t new_cln = fat_fd->cln;
uint16_t le_cl_low = 0;
uint16_t le_cl_hi = 0;
59ef4: 4240 clrw %d0
int
msdos_set_first_cluster_num(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
59ef6: 226e 000c moveal %fp@(12),%a1 59efa: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 59efe: 246e 0008 moveal %fp@(8),%a2
ssize_t ret1 = 0, ret2 = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t new_cln = fat_fd->cln;
59f02: 2829 001c movel %a1@(28),%d4
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
ssize_t ret1 = 0, ret2 = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
59f06: 206a 0034 moveal %a2@(52),%a0
uint32_t new_cln = fat_fd->cln;
uint16_t le_cl_low = 0;
uint16_t le_cl_hi = 0;
59f0a: 3d40 fffe movew %d0,%fp@(-2)
/*
* calculate input for _fat_block_write: convert (cluster num, offset) to
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
59f0e: 2629 0020 movel %a1@(32),%d3
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
59f12: 6600 0092 bnew 59fa6 <msdos_set_first_cluster_num+0xb6> 59f16: 4280 clrl %d0 59f18: 1028 000a moveb %a0@(10),%d0 59f1c: 7203 moveq #3,%d1 59f1e: c081 andl %d1,%d0 59f20: 6700 0084 beqw 59fa6 <msdos_set_first_cluster_num+0xb6>
return fs_info->vol.rdir_loc;
59f24: 2628 001a movel %a0@(26),%d3
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
/* byte from points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
59f28: 4282 clrl %d2
/*
* calculate input for _fat_block_write: convert (cluster num, offset) to
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
59f2a: 4281 clrl %d1 59f2c: 1228 0002 moveb %a0@(2),%d1
/* byte from points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF));
ret1 = _fat_block_write(mt_entry, sec,
59f30: 47f9 0005 3c96 lea 53c96 <_fat_block_write>,%a3
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
/* byte from points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
59f36: 3410 movew %a0@,%d2
/*
* calculate input for _fat_block_write: convert (cluster num, offset) to
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
59f38: 2029 0024 movel %a1@(36),%d0
/* byte from points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
59f3c: 5382 subql #1,%d2
le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF));
ret1 = _fat_block_write(mt_entry, sec,
59f3e: 486e fffc pea %fp@(-4)
/*
* calculate input for _fat_block_write: convert (cluster num, offset) to
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
59f42: 2a00 movel %d0,%d5
/* byte from points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF));
ret1 = _fat_block_write(mt_entry, sec,
59f44: 4878 0002 pea 2 <DOUBLE_FLOAT>
/*
* calculate input for _fat_block_write: convert (cluster num, offset) to
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
59f48: e2ad lsrl %d1,%d5 59f4a: d685 addl %d5,%d3
/* byte from points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
59f4c: c480 andl %d0,%d2
le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF));
59f4e: 4280 clrl %d0
ret1 = _fat_block_write(mt_entry, sec,
59f50: 2042 moveal %d2,%a0 59f52: 4868 001a pea %a0@(26)
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
/* byte from points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF));
59f56: 3004 movew %d4,%d0
ret1 = _fat_block_write(mt_entry, sec,
59f58: 2f03 movel %d3,%sp@- 59f5a: 2200 movel %d0,%d1 59f5c: e089 lsrl #8,%d1 59f5e: e188 lsll #8,%d0 59f60: 2f0a movel %a2,%sp@- 59f62: 8081 orl %d1,%d0
byte + MSDOS_FIRST_CLUSTER_LOW_OFFSET, 2,
(char *)(&le_cl_low));
le_cl_hi = CT_LE_W((uint16_t )((new_cln & 0xFFFF0000) >> 16));
59f64: 4244 clrw %d4 59f66: 4844 swap %d4
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
/* byte from points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF));
59f68: 3d40 fffc movew %d0,%fp@(-4)
ret1 = _fat_block_write(mt_entry, sec,
59f6c: 4e93 jsr %a3@
byte + MSDOS_FIRST_CLUSTER_LOW_OFFSET, 2,
(char *)(&le_cl_low));
le_cl_hi = CT_LE_W((uint16_t )((new_cln & 0xFFFF0000) >> 16));
59f6e: 204e moveal %fp,%a0
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
/* byte from points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF));
ret1 = _fat_block_write(mt_entry, sec,
59f70: 2a00 movel %d0,%d5 59f72: 2004 movel %d4,%d0 59f74: e08c lsrl #8,%d4 59f76: e188 lsll #8,%d0 59f78: 8084 orl %d4,%d0
byte + MSDOS_FIRST_CLUSTER_LOW_OFFSET, 2,
(char *)(&le_cl_low));
le_cl_hi = CT_LE_W((uint16_t )((new_cln & 0xFFFF0000) >> 16));
59f7a: 3100 movew %d0,%a0@-
ret2 = _fat_block_write(mt_entry, sec,
59f7c: 2f08 movel %a0,%sp@- 59f7e: 4878 0002 pea 2 <DOUBLE_FLOAT> 59f82: 2042 moveal %d2,%a0 59f84: 4868 0014 pea %a0@(20) 59f88: 2f03 movel %d3,%sp@- 59f8a: 2f0a movel %a2,%sp@- 59f8c: 4e93 jsr %a3@
byte + MSDOS_FIRST_CLUSTER_HI_OFFSET, 2,
(char *)(&le_cl_hi));
if ( (ret1 < 0) || (ret2 < 0) )
59f8e: 4fef 0028 lea %sp@(40),%sp 59f92: 4a85 tstl %d5
59f94: 6d22 blts 59fb8 <msdos_set_first_cluster_num+0xc8><== NEVER TAKEN
return -1;
59f96: 4a80 tstl %d0 59f98: 5dc0 slt %d0
return RC_OK;
}
59f9a: 4cee 0c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a3 59fa0: 4e5e unlk %fp
le_cl_hi = CT_LE_W((uint16_t )((new_cln & 0xFFFF0000) >> 16));
ret2 = _fat_block_write(mt_entry, sec,
byte + MSDOS_FIRST_CLUSTER_HI_OFFSET, 2,
(char *)(&le_cl_hi));
if ( (ret1 < 0) || (ret2 < 0) )
return -1;
59fa2: 49c0 extbl %d0
return RC_OK;
}
59fa4: 4e75 rts
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
59fa6: 4280 clrl %d0 59fa8: 1028 0005 moveb %a0@(5),%d0 59fac: 5583 subql #2,%d3 59fae: e1ab lsll %d0,%d3 59fb0: d6a8 002c addl %a0@(44),%d3 59fb4: 6000 ff72 braw 59f28 <msdos_set_first_cluster_num+0x38>
le_cl_hi = CT_LE_W((uint16_t )((new_cln & 0xFFFF0000) >> 16));
ret2 = _fat_block_write(mt_entry, sec,
byte + MSDOS_FIRST_CLUSTER_HI_OFFSET, 2,
(char *)(&le_cl_hi));
if ( (ret1 < 0) || (ret2 < 0) )
return -1;
59fb8: 70ff moveq #-1,%d0 <== NOT EXECUTED
return RC_OK;
}
59fba: 4cee 0c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a3 <== NOT EXECUTED 59fc0: 4e5e unlk %fp <== NOT EXECUTED
00059a40 <msdos_shut_down>:
* RC_OK on success, or -1 if error occured (errno set apropriately).
*
*/
int
msdos_shut_down(rtems_filesystem_mount_table_entry_t *temp_mt_entry)
{
59a40: 4e56 fff0 linkw %fp,#-16 <== NOT EXECUTED 59a44: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ <== NOT EXECUTED 59a48: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
int rc = RC_OK;
msdos_fs_info_t *fs_info = temp_mt_entry->fs_info;
fat_file_fd_t *fat_fd = temp_mt_entry->mt_fs_root.node_access;
/* close fat-file which correspondes to root directory */
if (fat_file_close(temp_mt_entry, fat_fd) != RC_OK)
59a4c: 2f2a 001c movel %a2@(28),%sp@- <== NOT EXECUTED
*/
int
msdos_shut_down(rtems_filesystem_mount_table_entry_t *temp_mt_entry)
{
int rc = RC_OK;
msdos_fs_info_t *fs_info = temp_mt_entry->fs_info;
59a50: 286a 0034 moveal %a2@(52),%a4 <== NOT EXECUTED
fat_file_fd_t *fat_fd = temp_mt_entry->mt_fs_root.node_access;
/* close fat-file which correspondes to root directory */
if (fat_file_close(temp_mt_entry, fat_fd) != RC_OK)
59a54: 2f0a movel %a2,%sp@- <== NOT EXECUTED 59a56: 4eb9 0005 2fc2 jsr 52fc2 <fat_file_close> <== NOT EXECUTED 59a5c: 508f addql #8,%sp <== NOT EXECUTED
*
*/
int
msdos_shut_down(rtems_filesystem_mount_table_entry_t *temp_mt_entry)
{
int rc = RC_OK;
59a5e: 4a80 tstl %d0 <== NOT EXECUTED 59a60: 56c2 sne %d2 <== NOT EXECUTED
{
/* no return - try to free as much as possible */
rc = -1;
}
if (fat_shutdown_drive(temp_mt_entry) != RC_OK)
59a62: 2f0a movel %a2,%sp@- <== NOT EXECUTED
*
*/
int
msdos_shut_down(rtems_filesystem_mount_table_entry_t *temp_mt_entry)
{
int rc = RC_OK;
59a64: 49c2 extbl %d2 <== NOT EXECUTED
{
/* no return - try to free as much as possible */
rc = -1;
}
if (fat_shutdown_drive(temp_mt_entry) != RC_OK)
59a66: 4eb9 0005 414e jsr 5414e <fat_shutdown_drive> <== NOT EXECUTED 59a6c: 588f addql #4,%sp <== NOT EXECUTED 59a6e: 4a80 tstl %d0 <== NOT EXECUTED 59a70: 6628 bnes 59a9a <msdos_shut_down+0x5a> <== NOT EXECUTED
{
/* no return - try to free as much as possible */
rc = -1;
}
rtems_semaphore_delete(fs_info->vol_sema);
59a72: 2f2c 0088 movel %a4@(136),%sp@- <== NOT EXECUTED
free(fs_info->cl_buf);
59a76: 47f9 0004 680c lea 4680c <free>,%a3 <== NOT EXECUTED
{
/* no return - try to free as much as possible */
rc = -1;
}
rtems_semaphore_delete(fs_info->vol_sema);
59a7c: 4eb9 0004 ae48 jsr 4ae48 <rtems_semaphore_delete> <== NOT EXECUTED
free(fs_info->cl_buf);
59a82: 2f2c 008c movel %a4@(140),%sp@- <== NOT EXECUTED 59a86: 4e93 jsr %a3@ <== NOT EXECUTED
free(temp_mt_entry->fs_info);
59a88: 2f2a 0034 movel %a2@(52),%sp@- <== NOT EXECUTED 59a8c: 4e93 jsr %a3@ <== NOT EXECUTED
return rc;
}
59a8e: 2002 movel %d2,%d0 <== NOT EXECUTED 59a90: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 <== NOT EXECUTED 59a96: 4e5e unlk %fp <== NOT EXECUTED 59a98: 4e75 rts <== NOT EXECUTED
{
/* no return - try to free as much as possible */
rc = -1;
}
rtems_semaphore_delete(fs_info->vol_sema);
59a9a: 2f2c 0088 movel %a4@(136),%sp@- <== NOT EXECUTED
free(fs_info->cl_buf);
59a9e: 47f9 0004 680c lea 4680c <free>,%a3 <== NOT EXECUTED
}
if (fat_shutdown_drive(temp_mt_entry) != RC_OK)
{
/* no return - try to free as much as possible */
rc = -1;
59aa4: 74ff moveq #-1,%d2 <== NOT EXECUTED
}
rtems_semaphore_delete(fs_info->vol_sema);
59aa6: 4eb9 0004 ae48 jsr 4ae48 <rtems_semaphore_delete> <== NOT EXECUTED
free(fs_info->cl_buf);
59aac: 2f2c 008c movel %a4@(140),%sp@- <== NOT EXECUTED 59ab0: 4e93 jsr %a3@ <== NOT EXECUTED
free(temp_mt_entry->fs_info);
59ab2: 2f2a 0034 movel %a2@(52),%sp@- <== NOT EXECUTED 59ab6: 4e93 jsr %a3@ <== NOT EXECUTED
return rc;
}
59ab8: 2002 movel %d2,%d0 <== NOT EXECUTED 59aba: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 <== NOT EXECUTED 59ac0: 4e5e unlk %fp <== NOT EXECUTED
00043e2e <newlib_delete_hook>:
void newlib_delete_hook(
rtems_tcb *current_task,
rtems_tcb *deleted_task
)
{
43e2e: 4e56 fff4 linkw %fp,#-12 43e32: 48d7 040c moveml %d2-%d3/%a2,%sp@ 43e36: 262e 0008 movel %fp@(8),%d3 43e3a: 246e 000c moveal %fp@(12),%a2
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
43e3e: b5c3 cmpal %d3,%a2
43e40: 674c beqs 43e8e <newlib_delete_hook+0x60>
ptr = _REENT;
} else {
ptr = deleted_task->libc_reent;
43e42: 242a 00fa movel %a2@(250),%d2
}
if (ptr && ptr != _global_impure_ptr) {
43e46: 4a82 tstl %d2
43e48: 6722 beqs 43e6c <newlib_delete_hook+0x3e> <== NEVER TAKEN
43e4a: b4b9 0005 ee96 cmpl 5ee96 <_global_impure_ptr>,%d2
43e50: 671a beqs 43e6c <newlib_delete_hook+0x3e>
_reclaim_reent(ptr);
*/
/*
* Just in case there are some buffers lying around.
*/
_fwalk(ptr, newlib_free_buffers);
43e52: 4879 0004 3c0c pea 43c0c <newlib_free_buffers> 43e58: 2f02 movel %d2,%sp@- 43e5a: 4eb9 0004 f7e8 jsr 4f7e8 <_fwalk>
#if REENT_MALLOCED
free(ptr);
#else
_Workspace_Free(ptr);
43e60: 2f02 movel %d2,%sp@- 43e62: 4eb9 0004 a2fe jsr 4a2fe <_Workspace_Free> 43e68: 4fef 000c lea %sp@(12),%sp
#endif
}
deleted_task->libc_reent = NULL;
43e6c: 42aa 00fa clrl %a2@(250)
/*
* Require the switch back to another task to install its own
*/
if ( current_task == deleted_task ) {
43e70: b5c3 cmpal %d3,%a2
43e72: 670a beqs 43e7e <newlib_delete_hook+0x50>
_REENT = 0;
}
}
43e74: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 43e7a: 4e5e unlk %fp 43e7c: 4e75 rts
/*
* Require the switch back to another task to install its own
*/
if ( current_task == deleted_task ) {
_REENT = 0;
43e7e: 42b9 0005 f998 clrl 5f998 <_impure_ptr>
} }
43e84: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 43e8a: 4e5e unlk %fp 43e8c: 4e75 rts
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
ptr = _REENT;
43e8e: 2439 0005 f998 movel 5f998 <_impure_ptr>,%d2 43e94: 60b0 bras 43e46 <newlib_delete_hook+0x18>
...
00043c0c <newlib_free_buffers>:
*/
int newlib_free_buffers(
FILE *fp
)
{
43c0c: 4e56 0000 linkw %fp,#0 43c10: 2f0a movel %a2,%sp@- 43c12: 246e 0008 moveal %fp@(8),%a2
switch ( fileno(fp) ) {
43c16: 2f0a movel %a2,%sp@- 43c18: 4eb9 0004 f45c jsr 4f45c <fileno> 43c1e: 588f addql #4,%sp 43c20: 7202 moveq #2,%d1 43c22: b280 cmpl %d0,%d1
43c24: 6414 bccs 43c3a <newlib_free_buffers+0x2e> <== ALWAYS TAKEN
fp->_flags &= ~__SMBF;
fp->_bf._base = fp->_p = (unsigned char *) NULL;
}
break;
default:
fclose(fp);
43c26: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43c28: 4eb9 0004 f1cc jsr 4f1cc <fclose> <== NOT EXECUTED 43c2e: 588f addql #4,%sp <== NOT EXECUTED
} return 0; }
43c30: 246e fffc moveal %fp@(-4),%a2 43c34: 4280 clrl %d0 43c36: 4e5e unlk %fp 43c38: 4e75 rts
{
switch ( fileno(fp) ) {
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
43c3a: 302a 000c movew %a2@(12),%d0 43c3e: 48c0 extl %d0 43c40: 4a00 tstb %d0
43c42: 6cec bges 43c30 <newlib_free_buffers+0x24> <== ALWAYS TAKEN
free( fp->_bf._base );
43c44: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43c48: 4eb9 0004 32dc jsr 432dc <free> <== NOT EXECUTED
fp->_flags &= ~__SMBF;
fp->_bf._base = fp->_p = (unsigned char *) NULL;
43c4e: 588f addql #4,%sp <== NOT EXECUTED
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
free( fp->_bf._base );
fp->_flags &= ~__SMBF;
43c50: 302a 000c movew %a2@(12),%d0 <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
43c54: 4292 clrl %a2@ <== NOT EXECUTED
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
free( fp->_bf._base );
fp->_flags &= ~__SMBF;
43c56: 0880 0007 bclr #7,%d0 <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
43c5a: 42aa 0010 clrl %a2@(16) <== NOT EXECUTED
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
free( fp->_bf._base );
fp->_flags &= ~__SMBF;
43c5e: 3540 000c movew %d0,%a2@(12) <== NOT EXECUTED
break;
default:
fclose(fp);
}
return 0;
}
43c62: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 43c66: 4280 clrl %d0 <== NOT EXECUTED 43c68: 4e5e unlk %fp <== NOT EXECUTED
00043f0c <open>:
int open(
const char *pathname,
int flags,
...
)
{
43f0c: 4e56 ffcc linkw %fp,#-52 43f10: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 43f14: 242e 000c movel %fp@(12),%d2
/*
* Set the Evaluation flags
*/
eval_flags = 0;
status = flags + 1;
43f18: 2002 movel %d2,%d0 43f1a: 5280 addql #1,%d0
int open(
const char *pathname,
int flags,
...
)
{
43f1c: 262e 0008 movel %fp@(8),%d3
/* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; if ( ( status & _FREAD ) == _FREAD )
43f20: 0800 0000 btst #0,%d0 43f24: 6700 00cc beqw 43ff2 <open+0xe6>
eval_flags |= RTEMS_LIBIO_PERMS_READ;
43f28: 7804 moveq #4,%d4
if ( ( status & _FWRITE ) == _FWRITE )
43f2a: 0800 0001 btst #1,%d0
43f2e: 6704 beqs 43f34 <open+0x28>
eval_flags |= RTEMS_LIBIO_PERMS_WRITE;
43f30: 7002 moveq #2,%d0 43f32: 8880 orl %d0,%d4
va_start(ap, flags);
mode = va_arg( ap, int );
43f34: 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();
43f38: 4eb9 0004 ba36 jsr 4ba36 <rtems_libio_allocate> 43f3e: 2440 moveal %d0,%a2
if ( iop == 0 ) {
43f40: 4a80 tstl %d0 43f42: 6700 00b4 beqw 43ff8 <open+0xec>
}
/*
* See if the file exists.
*/
status = rtems_filesystem_evaluate_path(
43f46: 2f03 movel %d3,%sp@- 43f48: 49f9 0005 0404 lea 50404 <strlen>,%a4 43f4e: 4e94 jsr %a4@ 43f50: 47f9 0004 31e4 lea 431e4 <rtems_filesystem_evaluate_path>,%a3 43f56: 7201 moveq #1,%d1 43f58: 2e81 movel %d1,%sp@ 43f5a: 486e ffec pea %fp@(-20) 43f5e: 2f04 movel %d4,%sp@- 43f60: 2f00 movel %d0,%sp@- 43f62: 2f03 movel %d3,%sp@- 43f64: 4e93 jsr %a3@
pathname, strlen( pathname ), eval_flags, &loc, true );
if ( status == -1 ) {
43f66: 4fef 0014 lea %sp@(20),%sp 43f6a: 72ff moveq #-1,%d1 43f6c: b280 cmpl %d0,%d1 43f6e: 6700 016c beqw 440dc <open+0x1d0>
if ( status != 0 ) { /* The file did not exist */
rc = EACCES;
goto done;
}
} else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) {
43f72: 2002 movel %d2,%d0 43f74: 0280 0000 0a00 andil #2560,%d0 43f7a: 0c80 0000 0a00 cmpil #2560,%d0 43f80: 6700 0090 beqw 44012 <open+0x106>
/*
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->flags |= rtems_libio_fcntl_flags( flags );
43f84: 282a 0014 movel %a2@(20),%d4 43f88: 2f02 movel %d2,%sp@- 43f8a: 4eb9 0004 b9a8 jsr 4b9a8 <rtems_libio_fcntl_flags>
iop->pathinfo = loc;
43f90: 256e fff4 0020 movel %fp@(-12),%a2@(32) 43f96: 256e fff0 001c movel %fp@(-16),%a2@(28) 43f9c: 256e fff8 0024 movel %fp@(-8),%a2@(36) 43fa2: 256e fffc 0028 movel %fp@(-4),%a2@(40) 43fa8: 256e ffec 0018 movel %fp@(-20),%a2@(24)
rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode );
43fae: 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 );
43fb2: 8084 orl %d4,%d0 43fb4: 2540 0014 movel %d0,%a2@(20)
iop->pathinfo = loc;
rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode );
43fb8: 2f05 movel %d5,%sp@- 43fba: 2f02 movel %d2,%sp@- 43fbc: 2f03 movel %d3,%sp@- 43fbe: 2f0a movel %a2,%sp@- 43fc0: 2050 moveal %a0@,%a0 43fc2: 4e90 jsr %a0@
if ( rc ) {
43fc4: 4fef 0014 lea %sp@(20),%sp 43fc8: 4a80 tstl %d0 43fca: 6600 00f6 bnew 440c2 <open+0x1b6>
}
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
43fce: 0802 000a btst #10,%d2
43fd2: 6674 bnes 44048 <open+0x13c>
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
rtems_set_errno_and_return_minus_one( rc );
}
return iop - rtems_libio_iops;
43fd4: 200a movel %a2,%d0 43fd6: 90b9 0006 0ef4 subl 60ef4 <rtems_libio_iops>,%d0 43fdc: 223c b6db 6db7 movel #-1227133513,%d1 43fe2: e680 asrl #3,%d0 43fe4: 4c01 0800 mulsl %d1,%d0
}
43fe8: 4cee 3c3c ffcc moveml %fp@(-52),%d2-%d5/%a2-%a5 43fee: 4e5e unlk %fp 43ff0: 4e75 rts
int eval_flags;
/*
* Set the Evaluation flags
*/
eval_flags = 0;
43ff2: 4284 clrl %d4 43ff4: 6000 ff34 braw 43f2a <open+0x1e>
*/
/* allocate a file control block */
iop = rtems_libio_allocate();
if ( iop == 0 ) {
rc = ENFILE;
43ff8: 7417 moveq #23,%d2 43ffa: 4bf9 0004 f098 lea 4f098 <__errno>,%a5
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 );
44000: 4e95 jsr %a5@ 44002: 2040 moveal %d0,%a0 44004: 70ff moveq #-1,%d0 44006: 2082 movel %d2,%a0@
}
return iop - rtems_libio_iops;
}
44008: 4cee 3c3c ffcc moveml %fp@(-52),%d2-%d5/%a2-%a5 4400e: 4e5e unlk %fp 44010: 4e75 rts
}
} else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) {
/* We were trying to create a file that already exists */
rc = EEXIST;
loc_to_free = &loc;
44012: 260e movel %fp,%d3 44014: 0683 ffff ffec addil #-20,%d3
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;
4401a: 7411 moveq #17,%d2 4401c: 4bf9 0004 f098 lea 4f098 <__errno>,%a5
*/
done:
va_end(ap);
if ( rc ) {
if ( iop )
44022: 4a8a tstl %a2
44024: 670a beqs 44030 <open+0x124>
rtems_libio_free( iop );
44026: 2f0a movel %a2,%sp@- 44028: 4eb9 0004 bafc jsr 4bafc <rtems_libio_free> 4402e: 588f addql #4,%sp
if ( loc_to_free )
44030: 4a83 tstl %d3
44032: 67cc beqs 44000 <open+0xf4>
rtems_filesystem_freenode( loc_to_free );
44034: 2f03 movel %d3,%sp@- 44036: 4eb9 0004 32c8 jsr 432c8 <rtems_filesystem_freenode> 4403c: 588f addql #4,%sp
rtems_set_errno_and_return_minus_one( rc );
4403e: 4e95 jsr %a5@ 44040: 2040 moveal %d0,%a0 44042: 70ff moveq #-1,%d0 44044: 2082 movel %d2,%a0@ 44046: 60c0 bras 44008 <open+0xfc>
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
44048: 200a movel %a2,%d0 4404a: 90b9 0006 0ef4 subl 60ef4 <rtems_libio_iops>,%d0 44050: 223c b6db 6db7 movel #-1227133513,%d1 44056: e680 asrl #3,%d0 44058: 4c00 1800 mulsl %d0,%d1 4405c: 42a7 clrl %sp@- 4405e: 42a7 clrl %sp@- 44060: 2f01 movel %d1,%sp@- 44062: 4eb9 0004 b8b8 jsr 4b8b8 <ftruncate>
if ( rc ) {
44068: 4fef 000c lea %sp@(12),%sp
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
4406c: 2400 movel %d0,%d2
if ( rc ) {
4406e: 6700 ff64 beqw 43fd4 <open+0xc8>
if(errno) rc = errno;
44072: 4bf9 0004 f098 lea 4f098 <__errno>,%a5 44078: 4e95 jsr %a5@ 4407a: 2040 moveal %d0,%a0 4407c: 4a90 tstl %a0@ 4407e: 6600 0088 bnew 44108 <open+0x1fc>
close( iop - rtems_libio_iops );
44082: 200a movel %a2,%d0 <== NOT EXECUTED 44084: 90b9 0006 0ef4 subl 60ef4 <rtems_libio_iops>,%d0 <== NOT EXECUTED 4408a: 223c b6db 6db7 movel #-1227133513,%d1 <== NOT EXECUTED 44090: e680 asrl #3,%d0 <== NOT EXECUTED 44092: 4c00 1800 mulsl %d0,%d1 <== NOT EXECUTED
/* those are released by close(): */
iop = 0;
loc_to_free = NULL;
44096: 4283 clrl %d3 <== 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;
44098: 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 );
4409a: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4409c: 4eb9 0004 b830 jsr 4b830 <close> <== NOT EXECUTED 440a2: 588f addql #4,%sp <== NOT EXECUTED
* Single exit and clean up path.
*/
done:
va_end(ap);
if ( rc ) {
440a4: 4a82 tstl %d2 440a6: 6600 ff7a bnew 44022 <open+0x116>
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
rtems_set_errno_and_return_minus_one( rc );
}
return iop - rtems_libio_iops;
440aa: 200a movel %a2,%d0 <== NOT EXECUTED 440ac: 90b9 0006 0ef4 subl 60ef4 <rtems_libio_iops>,%d0 <== NOT EXECUTED 440b2: 223c b6db 6db7 movel #-1227133513,%d1 <== NOT EXECUTED 440b8: e680 asrl #3,%d0 <== NOT EXECUTED 440ba: 4c01 0800 mulsl %d1,%d0 <== NOT EXECUTED 440be: 6000 ff28 braw 43fe8 <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;
440c2: 4bf9 0004 f098 lea 4f098 <__errno>,%a5
rc = EEXIST;
loc_to_free = &loc;
goto done;
}
loc_to_free = &loc;
440c8: 260e movel %fp,%d3 440ca: 0683 ffff ffec addil #-20,%d3
iop->flags |= rtems_libio_fcntl_flags( flags );
iop->pathinfo = loc;
rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode );
if ( rc ) {
rc = errno;
440d0: 4e95 jsr %a5@ 440d2: 2040 moveal %d0,%a0 440d4: 2410 movel %a0@,%d2
* Single exit and clean up path.
*/
done:
va_end(ap);
if ( rc ) {
440d6: 67d2 beqs 440aa <open+0x19e> <== NEVER TAKEN
440d8: 6000 ff48 braw 44022 <open+0x116>
*/
status = rtems_filesystem_evaluate_path(
pathname, strlen( pathname ), eval_flags, &loc, true );
if ( status == -1 ) {
if ( errno != ENOENT ) {
440dc: 4bf9 0004 f098 lea 4f098 <__errno>,%a5 440e2: 4e95 jsr %a5@ 440e4: 7202 moveq #2,%d1 440e6: 2040 moveal %d0,%a0 440e8: b290 cmpl %a0@,%d1
440ea: 670e beqs 440fa <open+0x1ee>
}
/* Create the node for the new regular file */
rc = mknod( pathname, S_IFREG | mode, 0LL );
if ( rc ) {
rc = errno;
440ec: 4e95 jsr %a5@
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;
440ee: 4283 clrl %d3
}
/* Create the node for the new regular file */
rc = mknod( pathname, S_IFREG | mode, 0LL );
if ( rc ) {
rc = errno;
440f0: 2040 moveal %d0,%a0 440f2: 2410 movel %a0@,%d2
* Single exit and clean up path.
*/
done:
va_end(ap);
if ( rc ) {
440f4: 67b4 beqs 440aa <open+0x19e> <== NEVER TAKEN
440f6: 6000 ff2a braw 44022 <open+0x116>
rc = errno;
goto done;
}
/* If the file does not exist and we are not trying to create it--> error */
if ( !(flags & O_CREAT) ) {
440fa: 0802 0009 btst #9,%d2
440fe: 6634 bnes 44134 <open+0x228> 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;
44100: 4283 clrl %d3
goto done;
}
/* If the file does not exist and we are not trying to create it--> error */
if ( !(flags & O_CREAT) ) {
rc = ENOENT;
44102: 7402 moveq #2,%d2 44104: 6000 ff1c braw 44022 <open+0x116>
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
if ( rc ) {
if(errno) rc = errno;
44108: 4e95 jsr %a5@
close( iop - rtems_libio_iops );
/* those are released by close(): */
iop = 0;
loc_to_free = NULL;
4410a: 4283 clrl %d3
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
if ( rc ) {
if(errno) rc = errno;
4410c: 2040 moveal %d0,%a0
close( iop - rtems_libio_iops );
4410e: 200a movel %a2,%d0 44110: 90b9 0006 0ef4 subl 60ef4 <rtems_libio_iops>,%d0 44116: 223c b6db 6db7 movel #-1227133513,%d1 4411c: e680 asrl #3,%d0 4411e: 4c00 1800 mulsl %d0,%d1
/* those are released by close(): */
iop = 0;
44122: 95ca subal %a2,%a2
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
if ( rc ) {
if(errno) rc = errno;
44124: 2410 movel %a0@,%d2
close( iop - rtems_libio_iops );
44126: 2f01 movel %d1,%sp@- 44128: 4eb9 0004 b830 jsr 4b830 <close> 4412e: 588f addql #4,%sp 44130: 6000 ff72 braw 440a4 <open+0x198>
rc = ENOENT;
goto done;
}
/* Create the node for the new regular file */
rc = mknod( pathname, S_IFREG | mode, 0LL );
44134: 42a7 clrl %sp@- 44136: 2005 movel %d5,%d0 44138: 42a7 clrl %sp@- 4413a: 08c0 000f bset #15,%d0 4413e: 2f00 movel %d0,%sp@- 44140: 2f03 movel %d3,%sp@- 44142: 4eb9 0004 36f0 jsr 436f0 <mknod>
if ( rc ) {
44148: 4fef 0010 lea %sp@(16),%sp 4414c: 4a80 tstl %d0
4414e: 669c bnes 440ec <open+0x1e0> <== 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(
44150: 2f03 movel %d3,%sp@- 44152: 4e94 jsr %a4@ 44154: 7201 moveq #1,%d1 44156: 2e81 movel %d1,%sp@ 44158: 486e ffec pea %fp@(-20) 4415c: 42a7 clrl %sp@- 4415e: 2f00 movel %d0,%sp@- 44160: 2f03 movel %d3,%sp@- 44162: 4e93 jsr %a3@
pathname, strlen( pathname ), 0x0, &loc, true );
if ( status != 0 ) { /* The file did not exist */
44164: 4fef 0014 lea %sp@(20),%sp 44168: 4a80 tstl %d0 4416a: 6700 fe18 beqw 43f84 <open+0x78>
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;
4416e: 4283 clrl %d3
* 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;
44170: 740d moveq #13,%d2 44172: 6000 feae braw 44022 <open+0x116>
00043e98 <open_dev_console>:
/*
* This is a replaceable stub which opens the console, if present.
*/
void open_dev_console(void)
{
43e98: 4e56 0000 linkw %fp,#0 43e9c: 2f0a movel %a2,%sp@-
int stderr_fd;
/*
* Attempt to open /dev/console.
*/
if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) {
43e9e: 45f9 0004 3f0c lea 43f0c <open>,%a2 43ea4: 42a7 clrl %sp@- 43ea6: 42a7 clrl %sp@- 43ea8: 4879 0005 e168 pea 5e168 <CSWTCH.48+0x100> 43eae: 4e92 jsr %a2@ 43eb0: 4fef 000c lea %sp@(12),%sp 43eb4: 72ff moveq #-1,%d1 43eb6: b280 cmpl %d0,%d1
43eb8: 6730 beqs 43eea <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)
43eba: 42a7 clrl %sp@- 43ebc: 4878 0001 pea 1 <ADD> 43ec0: 4879 0005 e168 pea 5e168 <CSWTCH.48+0x100> 43ec6: 4e92 jsr %a2@ 43ec8: 4fef 000c lea %sp@(12),%sp 43ecc: 72ff moveq #-1,%d1 43ece: b280 cmpl %d0,%d1
43ed0: 672c beqs 43efe <open_dev_console+0x66>
rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */
if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1)
43ed2: 42a7 clrl %sp@- 43ed4: 4878 0001 pea 1 <ADD> 43ed8: 4879 0005 e168 pea 5e168 <CSWTCH.48+0x100> 43ede: 4e92 jsr %a2@ 43ee0: 4fef 000c lea %sp@(12),%sp 43ee4: 72ff moveq #-1,%d1 43ee6: b280 cmpl %d0,%d1
43ee8: 6708 beqs 43ef2 <open_dev_console+0x5a> <== NEVER TAKEN
rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */
}
43eea: 246e fffc moveal %fp@(-4),%a2 43eee: 4e5e unlk %fp 43ef0: 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 */
43ef2: 2f3c 5554 4432 movel #1431585842,%sp@- <== NOT EXECUTED 43ef8: 4eb9 0004 724c jsr 4724c <rtems_fatal_error_occurred> <== NOT EXECUTED
/*
* But if we find /dev/console once, we better find it twice more
* or something is REALLY wrong.
*/
if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1)
rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */
43efe: 2f3c 5554 4431 movel #1431585841,%sp@- 43f04: 4eb9 0004 724c jsr 4724c <rtems_fatal_error_occurred>
...
00044e64 <oproc>:
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
44e64: 4e56 fff0 linkw %fp,#-16 44e68: 202e 0008 movel %fp@(8),%d0 44e6c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 44e70: 246e 000c moveal %fp@(12),%a2
int i;
if (tty->termios.c_oflag & OPOST) {
44e74: 222a 0034 movel %a2@(52),%d1
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
44e78: 1d40 fffe moveb %d0,%fp@(-2)
int i;
if (tty->termios.c_oflag & OPOST) {
44e7c: 0801 0000 btst #0,%d1 44e80: 6700 00ae beqw 44f30 <oproc+0xcc>
switch (c) {
44e84: 7409 moveq #9,%d2 44e86: 0280 0000 00ff andil #255,%d0 44e8c: b480 cmpl %d0,%d2 44e8e: 6700 0134 beqw 44fc4 <oproc+0x160>
44e92: 646c bccs 44f00 <oproc+0x9c>
44e94: 740a moveq #10,%d2 44e96: b480 cmpl %d0,%d2 44e98: 6700 00ae beqw 44f48 <oproc+0xe4> 44e9c: 143c 000d moveb #13,%d2 44ea0: b480 cmpl %d0,%d2 44ea2: 6700 00e2 beqw 44f86 <oproc+0x122>
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
c = toupper(c);
44ea6: 2079 0005 f994 moveal 5f994 <__ctype_ptr__>,%a0
if (tty->column > 0)
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
44eac: 0801 0001 btst #1,%d1
44eb0: 671e beqs 44ed0 <oproc+0x6c> <== ALWAYS TAKEN
c = toupper(c);
44eb2: 7403 moveq #3,%d2 <== NOT EXECUTED 44eb4: 1230 0801 moveb %a0@(00000001,%d0:l),%d1 <== NOT EXECUTED 44eb8: 49c1 extbl %d1 <== NOT EXECUTED 44eba: c282 andl %d2,%d1 <== NOT EXECUTED 44ebc: 143c 0002 moveb #2,%d2 <== NOT EXECUTED 44ec0: b481 cmpl %d1,%d2 <== NOT EXECUTED 44ec2: 6700 013c beqw 45000 <oproc+0x19c> <== NOT EXECUTED 44ec6: 1d40 fffe moveb %d0,%fp@(-2) <== NOT EXECUTED 44eca: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED
44ed0: 47f9 0004 4d60 lea 44d60 <rtems_termios_puts>,%a3
if (!iscntrl(c))
44ed6: 1030 0801 moveb %a0@(00000001,%d0:l),%d0 44eda: 49c0 extbl %d0 44edc: 0800 0005 btst #5,%d0
44ee0: 6604 bnes 44ee6 <oproc+0x82>
tty->column++;
44ee2: 52aa 0028 addql #1,%a2@(40)
break;
}
}
rtems_termios_puts (&c, 1, tty);
44ee6: 2f0a movel %a2,%sp@- 44ee8: 4878 0001 pea 1 <ADD> 44eec: 486e fffe pea %fp@(-2) 44ef0: 4e93 jsr %a3@ 44ef2: 4fef 000c lea %sp@(12),%sp
}
44ef6: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 44efc: 4e5e unlk %fp 44efe: 4e75 rts
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
int i;
if (tty->termios.c_oflag & OPOST) {
switch (c) {
44f00: 143c 0008 moveb #8,%d2 44f04: b480 cmpl %d0,%d2
44f06: 669e bnes 44ea6 <oproc+0x42> <== ALWAYS TAKEN
}
tty->column += i;
break;
case '\b':
if (tty->column > 0)
44f08: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 44f0c: 47f9 0004 4d60 lea 44d60 <rtems_termios_puts>,%a3 <== NOT EXECUTED 44f12: 6fd2 bles 44ee6 <oproc+0x82> <== NOT EXECUTED
tty->column--;
44f14: 5380 subql #1,%d0 <== NOT EXECUTED 44f16: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED
if (!iscntrl(c))
tty->column++;
break;
}
}
rtems_termios_puts (&c, 1, tty);
44f1a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44f1c: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 44f20: 486e fffe pea %fp@(-2) <== NOT EXECUTED 44f24: 4e93 jsr %a3@ <== NOT EXECUTED 44f26: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44f2a: 60ca bras 44ef6 <oproc+0x92> <== NOT EXECUTED
c = '\n';
if (tty->termios.c_oflag & ONLRET)
tty->column = 0;
break;
}
tty->column = 0;
44f2c: 42aa 0028 clrl %a2@(40) <== NOT EXECUTED
if (!iscntrl(c))
tty->column++;
break;
}
}
rtems_termios_puts (&c, 1, tty);
44f30: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44f32: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 44f36: 47f9 0004 4d60 lea 44d60 <rtems_termios_puts>,%a3 <== NOT EXECUTED 44f3c: 486e fffe pea %fp@(-2) <== NOT EXECUTED 44f40: 4e93 jsr %a3@ <== NOT EXECUTED 44f42: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44f46: 60ae bras 44ef6 <oproc+0x92> <== NOT EXECUTED
int i;
if (tty->termios.c_oflag & OPOST) {
switch (c) {
case '\n':
if (tty->termios.c_oflag & ONLRET)
44f48: 0801 0005 btst #5,%d1
44f4c: 6704 beqs 44f52 <oproc+0xee> <== ALWAYS TAKEN
tty->column = 0;
44f4e: 42aa 0028 clrl %a2@(40) <== NOT EXECUTED
44f52: 47f9 0004 4d60 lea 44d60 <rtems_termios_puts>,%a3
if (tty->termios.c_oflag & ONLCR) {
44f58: 44c1 movew %d1,%ccr
44f5a: 668a bnes 44ee6 <oproc+0x82> <== NEVER TAKEN
rtems_termios_puts ("\r", 1, tty);
44f5c: 2f0a movel %a2,%sp@- 44f5e: 4878 0001 pea 1 <ADD> 44f62: 4879 0005 e7c2 pea 5e7c2 <rtems_filesystem_default_pathconf+0xa6> 44f68: 4e93 jsr %a3@
tty->column = 0;
44f6a: 4fef 000c lea %sp@(12),%sp 44f6e: 42aa 0028 clrl %a2@(40)
if (!iscntrl(c))
tty->column++;
break;
}
}
rtems_termios_puts (&c, 1, tty);
44f72: 2f0a movel %a2,%sp@- 44f74: 4878 0001 pea 1 <ADD> 44f78: 486e fffe pea %fp@(-2) 44f7c: 4e93 jsr %a3@ 44f7e: 4fef 000c lea %sp@(12),%sp 44f82: 6000 ff72 braw 44ef6 <oproc+0x92>
tty->column = 0;
}
break;
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
44f86: 0801 0004 btst #4,%d1 <== NOT EXECUTED 44f8a: 6708 beqs 44f94 <oproc+0x130> <== NOT EXECUTED 44f8c: 4aaa 0028 tstl %a2@(40) <== NOT EXECUTED 44f90: 6700 ff64 beqw 44ef6 <oproc+0x92> <== NOT EXECUTED
return;
if (tty->termios.c_oflag & OCRNL) {
44f94: 44c1 movew %d1,%ccr <== NOT EXECUTED 44f96: 6a94 bpls 44f2c <oproc+0xc8> <== NOT EXECUTED 44f98: 47f9 0004 4d60 lea 44d60 <rtems_termios_puts>,%a3 <== NOT EXECUTED
c = '\n';
44f9e: 700a moveq #10,%d0 <== NOT EXECUTED 44fa0: 1d40 fffe moveb %d0,%fp@(-2) <== NOT EXECUTED
if (tty->termios.c_oflag & ONLRET)
44fa4: 0801 0005 btst #5,%d1 <== NOT EXECUTED 44fa8: 6700 ff3c beqw 44ee6 <oproc+0x82> <== NOT EXECUTED
tty->column = 0;
44fac: 42aa 0028 clrl %a2@(40) <== NOT EXECUTED
if (!iscntrl(c))
tty->column++;
break;
}
}
rtems_termios_puts (&c, 1, tty);
44fb0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44fb2: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 44fb6: 486e fffe pea %fp@(-2) <== NOT EXECUTED 44fba: 4e93 jsr %a3@ <== NOT EXECUTED 44fbc: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44fc0: 6000 ff34 braw 44ef6 <oproc+0x92> <== NOT EXECUTED
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
44fc4: 202a 0028 movel %a2@(40),%d0 44fc8: 7407 moveq #7,%d2 44fca: 307c 0008 moveaw #8,%a0 44fce: c480 andl %d0,%d2
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
44fd0: 0281 0000 1800 andil #6144,%d1
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
44fd6: 91c2 subal %d2,%a0
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
44fd8: 0c81 0000 1800 cmpil #6144,%d1
44fde: 6734 beqs 45014 <oproc+0x1b0> <== ALWAYS TAKEN
tty->column += i;
rtems_termios_puts ( " ", i, tty);
return;
}
tty->column += i;
44fe0: d088 addl %a0,%d0 <== NOT EXECUTED 44fe2: 47f9 0004 4d60 lea 44d60 <rtems_termios_puts>,%a3 <== NOT EXECUTED 44fe8: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED
if (!iscntrl(c))
tty->column++;
break;
}
}
rtems_termios_puts (&c, 1, tty);
44fec: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44fee: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 44ff2: 486e fffe pea %fp@(-2) <== NOT EXECUTED 44ff6: 4e93 jsr %a3@ <== NOT EXECUTED 44ff8: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44ffc: 6000 fef8 braw 44ef6 <oproc+0x92> <== NOT EXECUTED
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
c = toupper(c);
45000: 0680 ffff ffe0 addil #-32,%d0 <== NOT EXECUTED 45006: 1d40 fffe moveb %d0,%fp@(-2) <== NOT EXECUTED 4500a: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 45010: 6000 febe braw 44ed0 <oproc+0x6c> <== NOT EXECUTED
case '\t':
i = 8 - (tty->column & 7);
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
tty->column += i;
rtems_termios_puts ( " ", i, tty);
45014: 2f0a movel %a2,%sp@-
break;
case '\t':
i = 8 - (tty->column & 7);
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
tty->column += i;
45016: d088 addl %a0,%d0 45018: 2540 0028 movel %d0,%a2@(40)
rtems_termios_puts ( " ", i, tty);
4501c: 2f08 movel %a0,%sp@- 4501e: 4879 0005 e7c4 pea 5e7c4 <rtems_filesystem_default_pathconf+0xa8> 45024: 4eb9 0004 4d60 jsr 44d60 <rtems_termios_puts>
return;
4502a: 4fef 000c lea %sp@(12),%sp
tty->column++;
break;
}
}
rtems_termios_puts (&c, 1, tty);
}
4502e: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3
45034: 4e5e unlk %fp <== NOT EXECUTED
0004c808 <pipe_create>:
* Called by pipe() to create an anonymous pipe.
*/
int pipe_create(
int filsdes[2]
)
{
4c808: 4e56 ffe4 linkw %fp,#-28 4c80c: 48d7 1c00 moveml %a2-%a4,%sp@
rtems_libio_t *iop;
int err = 0;
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
4c810: 4878 01ff pea 1ff <DBL_MANT_DIG+0x1ca> 4c814: 4879 0006 02f0 pea 602f0 <_CPU_m68k_BFFFO_table+0x100>
* Called by pipe() to create an anonymous pipe.
*/
int pipe_create(
int filsdes[2]
)
{
4c81a: 266e 0008 moveal %fp@(8),%a3
rtems_libio_t *iop;
int err = 0;
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
4c81e: 4eb9 0004 e21c jsr 4e21c <rtems_mkdir> 4c824: 508f addql #8,%sp 4c826: 4a80 tstl %d0 4c828: 6600 00f0 bnew 4c91a <pipe_create+0x112>
return -1;
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
4c82c: 45ee fff1 lea %fp@(-15),%a2
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
4c830: 3039 0006 2038 movew 62038 <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);
4c836: 24bc 2f74 6d70 movel #796159344,%a2@
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
4c83c: 2200 movel %d0,%d1 4c83e: 5281 addql #1,%d1 4c840: 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);
4c842: 203c 2f2e 6669 movel #791570025,%d0
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
4c848: 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);
4c84a: 307c 666f moveaw #26223,%a0 4c84e: 2d40 fff5 movel %d0,%fp@(-11)
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
4c852: 4879 0006 02f5 pea 602f5 <_CPU_m68k_BFFFO_table+0x105> 4c858: 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);
4c85c: 3d48 fff9 movew %a0,%fp@(-7)
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
4c860: 33c1 0006 2038 movew %d1,62038 <rtems_pipe_no> 4c866: 4eb9 0005 1958 jsr 51958 <sprintf>
/* Try creating FIFO file until find an available file name */
while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) {
4c86c: 4878 0180 pea 180 <DBL_MANT_DIG+0x14b> 4c870: 2f0a movel %a2,%sp@- 4c872: 4eb9 0004 df3c jsr 4df3c <mkfifo> 4c878: 4fef 0014 lea %sp@(20),%sp 4c87c: 4a80 tstl %d0 4c87e: 6600 00a6 bnew 4c926 <pipe_create+0x11e>
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);
4c882: 4878 4000 pea 4000 <D_MAX_EXP+0x3801> 4c886: 49f9 0004 54f0 lea 454f0 <open>,%a4 4c88c: 2f0a movel %a2,%sp@- 4c88e: 4e94 jsr %a4@
if (filsdes[0] < 0) {
4c890: 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);
4c892: 2680 movel %d0,%a3@
if (filsdes[0] < 0) {
4c894: 6d4e blts 4c8e4 <pipe_create+0xdc>
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]);
4c896: b0b9 0006 0fa2 cmpl 60fa2 <rtems_libio_number_iops>,%d0
4c89c: 6442 bccs 4c8e0 <pipe_create+0xd8> <== NEVER TAKEN
4c89e: 2200 movel %d0,%d1 4c8a0: ed88 lsll #6,%d0 4c8a2: e789 lsll #3,%d1 4c8a4: 2079 0006 272c moveal 6272c <rtems_libio_iops>,%a0 4c8aa: 9081 subl %d1,%d0 4c8ac: d1c0 addal %d0,%a0
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
4c8ae: 70fe moveq #-2,%d0 4c8b0: c1a8 0014 andl %d0,%a0@(20)
filsdes[1] = open(fifopath, O_WRONLY);
4c8b4: 4878 0001 pea 1 <ADD> 4c8b8: 2f0a movel %a2,%sp@- 4c8ba: 4e94 jsr %a4@
if (filsdes[1] < 0) {
4c8bc: 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);
4c8be: 2740 0004 movel %d0,%a3@(4)
if (filsdes[1] < 0) {
4c8c2: 6d36 blts 4c8fa <pipe_create+0xf2>
err = errno;
close(filsdes[0]);
}
unlink(fifopath);
4c8c4: 2f0a movel %a2,%sp@-
int pipe_create(
int filsdes[2]
)
{
rtems_libio_t *iop;
int err = 0;
4c8c6: 99cc subal %a4,%a4
if (filsdes[1] < 0) {
err = errno;
close(filsdes[0]);
}
unlink(fifopath);
4c8c8: 4eb9 0004 7624 jsr 47624 <unlink> 4c8ce: 588f addql #4,%sp
} if(err != 0)
4c8d0: 4a8c tstl %a4
4c8d2: 6664 bnes 4c938 <pipe_create+0x130>
rtems_set_errno_and_return_minus_one(err);
return 0;
4c8d4: 4280 clrl %d0
}
4c8d6: 4cee 1c00 ffe4 moveml %fp@(-28),%a2-%a4 4c8dc: 4e5e unlk %fp 4c8de: 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]);
4c8e0: 91c8 subal %a0,%a0 <== NOT EXECUTED 4c8e2: 60ca bras 4c8ae <pipe_create+0xa6> <== NOT EXECUTED
}
/* Non-blocking open to avoid waiting for writers */
filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK);
if (filsdes[0] < 0) {
err = errno;
4c8e4: 4eb9 0005 0cbc jsr 50cbc <__errno> 4c8ea: 2040 moveal %d0,%a0 4c8ec: 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);
4c8ee: 2f0a movel %a2,%sp@- 4c8f0: 4eb9 0004 7624 jsr 47624 <unlink> 4c8f6: 588f addql #4,%sp 4c8f8: 60d6 bras 4c8d0 <pipe_create+0xc8>
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
filsdes[1] = open(fifopath, O_WRONLY);
if (filsdes[1] < 0) {
err = errno;
4c8fa: 4eb9 0005 0cbc jsr 50cbc <__errno> 4c900: 2040 moveal %d0,%a0 4c902: 2850 moveal %a0@,%a4
close(filsdes[0]);
4c904: 2f13 movel %a3@,%sp@- 4c906: 4eb9 0004 414c jsr 4414c <close> 4c90c: 588f addql #4,%sp
}
unlink(fifopath);
4c90e: 2f0a movel %a2,%sp@- 4c910: 4eb9 0004 7624 jsr 47624 <unlink> 4c916: 588f addql #4,%sp 4c918: 60b6 bras 4c8d0 <pipe_create+0xc8>
{
rtems_libio_t *iop;
int err = 0;
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
return -1;
4c91a: 70ff moveq #-1,%d0 <== NOT EXECUTED
unlink(fifopath);
}
if(err != 0)
rtems_set_errno_and_return_minus_one(err);
return 0;
}
4c91c: 4cee 1c00 ffe4 moveml %fp@(-28),%a2-%a4 <== NOT EXECUTED 4c922: 4e5e unlk %fp <== NOT EXECUTED 4c924: 4e75 rts <== NOT EXECUTED
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){
4c926: 4eb9 0005 0cbc jsr 50cbc <__errno>
return -1;
4c92c: 70ff moveq #-1,%d0
unlink(fifopath);
}
if(err != 0)
rtems_set_errno_and_return_minus_one(err);
return 0;
}
4c92e: 4cee 1c00 ffe4 moveml %fp@(-28),%a2-%a4 4c934: 4e5e unlk %fp 4c936: 4e75 rts
close(filsdes[0]);
}
unlink(fifopath);
}
if(err != 0)
rtems_set_errno_and_return_minus_one(err);
4c938: 4eb9 0005 0cbc jsr 50cbc <__errno> 4c93e: 2040 moveal %d0,%a0 4c940: 70ff moveq #-1,%d0 4c942: 208c movel %a4,%a0@
return 0; }
4c944: 4cee 1c00 ffe4 moveml %fp@(-28),%a2-%a4 4c94a: 4e5e unlk %fp
...
0004df04 <pipe_ioctl>:
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
4df04: 4e56 0000 linkw %fp,#0
if (cmd == FIONREAD) {
4df08: 203c 4004 667f movel #1074030207,%d0
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
4df0e: 2f0b movel %a3,%sp@- 4df10: 266e 0010 moveal %fp@(16),%a3 4df14: 2f0a movel %a2,%sp@- 4df16: 246e 0008 moveal %fp@(8),%a2
if (cmd == FIONREAD) {
4df1a: b0ae 000c cmpl %fp@(12),%d0
4df1e: 6638 bnes 4df58 <pipe_ioctl+0x54>
if (buffer == NULL)
4df20: 4a8b tstl %a3
4df22: 6750 beqs 4df74 <pipe_ioctl+0x70>
return -EFAULT;
if (! PIPE_LOCK(pipe))
4df24: 42a7 clrl %sp@- 4df26: 42a7 clrl %sp@- 4df28: 2f2a 0028 movel %a2@(40),%sp@- 4df2c: 4eb9 0004 8d58 jsr 48d58 <rtems_semaphore_obtain> 4df32: 4fef 000c lea %sp@(12),%sp 4df36: 4a80 tstl %d0
4df38: 662c bnes 4df66 <pipe_ioctl+0x62> <== NEVER TAKEN
return -EINTR;
/* Return length of pipe */
*(unsigned int *)buffer = pipe->Length;
4df3a: 26aa 000c movel %a2@(12),%a3@
PIPE_UNLOCK(pipe);
4df3e: 2f2a 0028 movel %a2@(40),%sp@- 4df42: 4eb9 0004 8ea8 jsr 48ea8 <rtems_semaphore_release>
return 0;
}
return -EINVAL;
}
4df48: 246e fff8 moveal %fp@(-8),%a2
return -EINTR;
/* Return length of pipe */
*(unsigned int *)buffer = pipe->Length;
PIPE_UNLOCK(pipe);
return 0;
4df4c: 588f addql #4,%sp 4df4e: 4280 clrl %d0
}
return -EINVAL;
}
4df50: 266e fffc moveal %fp@(-4),%a3 4df54: 4e5e unlk %fp 4df56: 4e75 rts 4df58: 246e fff8 moveal %fp@(-8),%a2
*(unsigned int *)buffer = pipe->Length;
PIPE_UNLOCK(pipe);
return 0;
}
return -EINVAL;
4df5c: 70ea moveq #-22,%d0
}
4df5e: 266e fffc moveal %fp@(-4),%a3 4df62: 4e5e unlk %fp 4df64: 4e75 rts
4df66: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED
if (cmd == FIONREAD) {
if (buffer == NULL)
return -EFAULT;
if (! PIPE_LOCK(pipe))
return -EINTR;
4df6a: 70fc moveq #-4,%d0 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
}
return -EINVAL;
}
4df6c: 266e fffc moveal %fp@(-4),%a3 <== NOT EXECUTED 4df70: 4e5e unlk %fp <== NOT EXECUTED 4df72: 4e75 rts <== NOT EXECUTED
4df74: 246e fff8 moveal %fp@(-8),%a2
rtems_libio_t *iop
)
{
if (cmd == FIONREAD) {
if (buffer == NULL)
return -EFAULT;
4df78: 70f2 moveq #-14,%d0
PIPE_UNLOCK(pipe);
return 0;
}
return -EINVAL;
}
4df7a: 266e fffc moveal %fp@(-4),%a3
4df7e: 4e5e unlk %fp <== NOT EXECUTED
0004daf2 <pipe_read>:
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
4daf2: 4e56 ffd0 linkw %fp,#-48 4daf6: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
4dafa: 42a7 clrl %sp@-
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
4dafc: 246e 0008 moveal %fp@(8),%a2
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
4db00: 47f9 0004 8d58 lea 48d58 <rtems_semaphore_obtain>,%a3 4db06: 42a7 clrl %sp@- 4db08: 2f2a 0028 movel %a2@(40),%sp@-
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
4db0c: 2a2e 0010 movel %fp@(16),%d5 4db10: 2a6e 0014 moveal %fp@(20),%a5
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
4db14: 4e93 jsr %a3@ 4db16: 4fef 000c lea %sp@(12),%sp 4db1a: 4a80 tstl %d0 4db1c: 6600 016c bnew 4dc8a <pipe_read+0x198>
return -EINTR;
while (read < count) {
4db20: 4a85 tstl %d5 4db22: 6700 0174 beqw 4dc98 <pipe_read+0x1a6> 4db26: 4286 clrl %d6 4db28: 4284 clrl %d4 4db2a: 49f9 0004 8ea8 lea 48ea8 <rtems_semaphore_release>,%a4
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
4db30: 263c 0004 f56c movel #324972,%d3
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);
4db36: 2e3c 0005 229c movel #336540,%d7
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
while (PIPE_EMPTY(pipe)) {
4db3c: 242a 000c movel %a2@(12),%d2
4db40: 6676 bnes 4dbb8 <pipe_read+0xc6>
/* Not an error */
if (pipe->Writers == 0)
4db42: 4aaa 0014 tstl %a2@(20) 4db46: 6700 0100 beqw 4dc48 <pipe_read+0x156>
goto out_locked;
if (LIBIO_NODELAY(iop)) {
4db4a: 7001 moveq #1,%d0 4db4c: c0ad 0014 andl %a5@(20),%d0 4db50: 6600 0104 bnew 4dc56 <pipe_read+0x164>
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
PIPE_UNLOCK(pipe);
4db54: 2f2a 0028 movel %a2@(40),%sp@-
ret = -EAGAIN;
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
4db58: 52aa 0018 addql #1,%a2@(24)
PIPE_UNLOCK(pipe);
4db5c: 4e94 jsr %a4@
if (! PIPE_READWAIT(pipe))
4db5e: 2043 moveal %d3,%a0 4db60: 42a7 clrl %sp@- 4db62: 2f2a 002c movel %a2@(44),%sp@- 4db66: 4e90 jsr %a0@ 4db68: 4fef 000c lea %sp@(12),%sp 4db6c: 4a80 tstl %d0
4db6e: 6636 bnes 4dba6 <pipe_read+0xb4> <== NEVER TAKEN
4db70: 4282 clrl %d2
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
4db72: 42a7 clrl %sp@- 4db74: 42a7 clrl %sp@- 4db76: 2f2a 0028 movel %a2@(40),%sp@- 4db7a: 4e93 jsr %a3@ 4db7c: 4fef 000c lea %sp@(12),%sp 4db80: 4a80 tstl %d0 4db82: 6600 00e0 bnew 4dc64 <pipe_read+0x172>
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
4db86: 53aa 0018 subql #1,%a2@(24)
if (ret != 0)
4db8a: 4a82 tstl %d2
4db8c: 67ae beqs 4db3c <pipe_read+0x4a> <== ALWAYS TAKEN
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
4db8e: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4db92: 4e94 jsr %a4@ <== NOT EXECUTED 4db94: 588f addql #4,%sp <== NOT EXECUTED
out_nolock:
if (read > 0)
4db96: 4a84 tstl %d4
4db98: 6f10 bles 4dbaa <pipe_read+0xb8> <== NEVER TAKEN
return read;
return ret;
}
4db9a: 2004 movel %d4,%d0 4db9c: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 4dba2: 4e5e unlk %fp 4dba4: 4e75 rts
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
ret = -EINTR;
4dba6: 74fc moveq #-4,%d2 <== NOT EXECUTED 4dba8: 60c8 bras 4db72 <pipe_read+0x80> <== NOT EXECUTED
PIPE_UNLOCK(pipe);
out_nolock:
if (read > 0)
return read;
return ret;
4dbaa: 2802 movel %d2,%d4
}
4dbac: 2004 movel %d4,%d0 4dbae: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 4dbb4: 4e5e unlk %fp 4dbb6: 4e75 rts
if (ret != 0)
goto out_locked;
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
4dbb8: 2005 movel %d5,%d0 4dbba: 9086 subl %d6,%d0 4dbbc: b082 cmpl %d2,%d0
4dbbe: 6402 bccs 4dbc2 <pipe_read+0xd0>
4dbc0: 2400 movel %d0,%d2
chunk1 = pipe->Size - pipe->Start;
4dbc2: 202a 0008 movel %a2@(8),%d0 4dbc6: 222a 0004 movel %a2@(4),%d1 4dbca: 9280 subl %d0,%d1
if (chunk > chunk1) {
4dbcc: b282 cmpl %d2,%d1 4dbce: 6c00 00a0 bgew 4dc70 <pipe_read+0x17e>
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
4dbd2: 2f01 movel %d1,%sp@- 4dbd4: d092 addl %a2@,%d0 4dbd6: 206e 000c moveal %fp@(12),%a0 4dbda: 2f00 movel %d0,%sp@- 4dbdc: 4870 6800 pea %a0@(00000000,%d6:l) 4dbe0: 2047 moveal %d7,%a0 4dbe2: 2d41 fff8 movel %d1,%fp@(-8) 4dbe6: 4e90 jsr %a0@
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
4dbe8: 222e fff8 movel %fp@(-8),%d1 4dbec: 2002 movel %d2,%d0 4dbee: 9081 subl %d1,%d0 4dbf0: dc81 addl %d1,%d6 4dbf2: 2f00 movel %d0,%sp@- 4dbf4: 2f12 movel %a2@,%sp@- 4dbf6: 206e 000c moveal %fp@(12),%a0 4dbfa: 4870 6800 pea %a0@(00000000,%d6:l) 4dbfe: 2047 moveal %d7,%a0 4dc00: 4e90 jsr %a0@ 4dc02: 4fef 0018 lea %sp@(24),%sp
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
pipe->Start += chunk;
4dc06: 2202 movel %d2,%d1 4dc08: d2aa 0008 addl %a2@(8),%d1
pipe->Start %= pipe->Size;
pipe->Length -= chunk;
4dc0c: 202a 000c movel %a2@(12),%d0 4dc10: 9082 subl %d2,%d0
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
pipe->Start += chunk;
pipe->Start %= pipe->Size;
4dc12: 4c6a 1006 0004 remul %a2@(4),%d6,%d1
pipe->Length -= chunk;
4dc18: 2540 000c movel %d0,%a2@(12)
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
pipe->Start += chunk;
pipe->Start %= pipe->Size;
4dc1c: 2546 0008 movel %d6,%a2@(8)
pipe->Length -= chunk;
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
4dc20: 4a80 tstl %d0
4dc22: 6604 bnes 4dc28 <pipe_read+0x136>
pipe->Start = 0;
4dc24: 42aa 0008 clrl %a2@(8)
if (pipe->waitingWriters > 0)
4dc28: 4aaa 001c tstl %a2@(28)
4dc2c: 6710 beqs 4dc3e <pipe_read+0x14c>
PIPE_WAKEUPWRITERS(pipe);
4dc2e: 486e fffc pea %fp@(-4) 4dc32: 2f2a 0030 movel %a2@(48),%sp@- 4dc36: 4eb9 0004 f4f4 jsr 4f4f4 <rtems_barrier_release> 4dc3c: 508f addql #8,%sp
read += chunk;
4dc3e: d882 addl %d2,%d4
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
4dc40: 2c04 movel %d4,%d6 4dc42: ba84 cmpl %d4,%d5 4dc44: 6200 fef6 bhiw 4db3c <pipe_read+0x4a>
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
4dc48: 2f2a 0028 movel %a2@(40),%sp@-
return -EINTR;
while (read < count) {
while (PIPE_EMPTY(pipe)) {
/* Not an error */
if (pipe->Writers == 0)
4dc4c: 4282 clrl %d2
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
4dc4e: 4e94 jsr %a4@ 4dc50: 588f addql #4,%sp 4dc52: 6000 ff42 braw 4db96 <pipe_read+0xa4> 4dc56: 2f2a 0028 movel %a2@(40),%sp@-
/* Not an error */
if (pipe->Writers == 0)
goto out_locked;
if (LIBIO_NODELAY(iop)) {
ret = -EAGAIN;
4dc5a: 74f5 moveq #-11,%d2
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
4dc5c: 4e94 jsr %a4@ 4dc5e: 588f addql #4,%sp 4dc60: 6000 ff34 braw 4db96 <pipe_read+0xa4>
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
/* WARN waitingReaders not restored! */
ret = -EINTR;
4dc64: 74fc moveq #-4,%d2 <== NOT EXECUTED
out_locked:
PIPE_UNLOCK(pipe);
out_nolock:
if (read > 0)
4dc66: 4a84 tstl %d4 <== NOT EXECUTED 4dc68: 6e00 ff30 bgtw 4db9a <pipe_read+0xa8> <== NOT EXECUTED 4dc6c: 6000 ff3c braw 4dbaa <pipe_read+0xb8> <== NOT EXECUTED
if (chunk > chunk1) {
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
4dc70: 2f02 movel %d2,%sp@- 4dc72: d092 addl %a2@,%d0 4dc74: 206e 000c moveal %fp@(12),%a0 4dc78: 2f00 movel %d0,%sp@- 4dc7a: 4870 6800 pea %a0@(00000000,%d6:l) 4dc7e: 2047 moveal %d7,%a0 4dc80: 4e90 jsr %a0@ 4dc82: 4fef 000c lea %sp@(12),%sp 4dc86: 6000 ff7e braw 4dc06 <pipe_read+0x114>
)
{
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
4dc8a: 78fc moveq #-4,%d4 <== NOT EXECUTED
out_nolock:
if (read > 0)
return read;
return ret;
}
4dc8c: 2004 movel %d4,%d0 <== NOT EXECUTED 4dc8e: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4dc94: 4e5e unlk %fp <== NOT EXECUTED 4dc96: 4e75 rts <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
4dc98: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4dc9c: 49f9 0004 8ea8 lea 48ea8 <rtems_semaphore_release>,%a4 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
4dca2: 4284 clrl %d4 <== NOT EXECUTED 4dca4: 4282 clrl %d2 <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
4dca6: 4e94 jsr %a4@ <== NOT EXECUTED 4dca8: 588f addql #4,%sp <== NOT EXECUTED 4dcaa: 6000 feea braw 4db96 <pipe_read+0xa4> <== NOT EXECUTED
0004d53c <pipe_release>:
*/
void pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
4d53c: 4e56 ffe8 linkw %fp,#-24
/* WARN pipe not released! */
if (!PIPE_LOCK(pipe))
rtems_fatal_error_occurred(0xdeadbeef);
#endif
mode = LIBIO_ACCMODE(iop);
4d540: 206e 000c moveal %fp@(12),%a0
*/
void pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
4d544: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 4d548: 286e 0008 moveal %fp@(8),%a4
/* WARN pipe not released! */
if (!PIPE_LOCK(pipe))
rtems_fatal_error_occurred(0xdeadbeef);
#endif
mode = LIBIO_ACCMODE(iop);
4d54c: 7406 moveq #6,%d2
void pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
pipe_control_t *pipe = *pipep;
4d54e: 2454 moveal %a4@,%a2
/* WARN pipe not released! */
if (!PIPE_LOCK(pipe))
rtems_fatal_error_occurred(0xdeadbeef);
#endif
mode = LIBIO_ACCMODE(iop);
4d550: c4a8 0014 andl %a0@(20),%d2
if (mode & LIBIO_FLAGS_READ)
4d554: 0802 0001 btst #1,%d2
4d558: 6704 beqs 4d55e <pipe_release+0x22>
pipe->Readers --;
4d55a: 53aa 0010 subql #1,%a2@(16)
if (mode & LIBIO_FLAGS_WRITE)
4d55e: 44c2 movew %d2,%ccr
4d560: 6604 bnes 4d566 <pipe_release+0x2a>
pipe->Writers --;
4d562: 53aa 0014 subql #1,%a2@(20)
PIPE_UNLOCK(pipe);
4d566: 2f2a 0028 movel %a2@(40),%sp@- 4d56a: 47f9 0004 8ea8 lea 48ea8 <rtems_semaphore_release>,%a3 4d570: 4e93 jsr %a3@
if (pipe->Readers == 0 && pipe->Writers == 0) {
4d572: 588f addql #4,%sp 4d574: 4aaa 0010 tstl %a2@(16)
4d578: 6730 beqs 4d5aa <pipe_release+0x6e>
*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)
4d57a: 4aaa 0014 tstl %a2@(20)
4d57e: 6616 bnes 4d596 <pipe_release+0x5a> <== NEVER TAKEN
4d580: 7002 moveq #2,%d0 4d582: b082 cmpl %d2,%d0
4d584: 6710 beqs 4d596 <pipe_release+0x5a> <== NEVER TAKEN
PIPE_WAKEUPREADERS(pipe);
4d586: 486e fffc pea %fp@(-4) 4d58a: 2f2a 002c movel %a2@(44),%sp@- 4d58e: 4eb9 0004 f4f4 jsr 4f4f4 <rtems_barrier_release> 4d594: 508f addql #8,%sp
static void pipe_unlock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_release(pipe_semaphore);
4d596: 2f39 0006 2ee8 movel 62ee8 <pipe_semaphore>,%sp@- 4d59c: 4e93 jsr %a3@ 4d59e: 588f addql #4,%sp
iop->flags &= ~LIBIO_FLAGS_OPEN;
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return;
#endif
}
4d5a0: 4cee 3c04 ffe8 moveml %fp@(-24),%d2/%a2-%a5 4d5a6: 4e5e unlk %fp 4d5a8: 4e75 rts
if (mode & LIBIO_FLAGS_WRITE)
pipe->Writers --;
PIPE_UNLOCK(pipe);
if (pipe->Readers == 0 && pipe->Writers == 0) {
4d5aa: 4aaa 0014 tstl %a2@(20)
4d5ae: 672a beqs 4d5da <pipe_release+0x9e>
delfile = TRUE;
#endif
pipe_free(pipe);
*pipep = NULL;
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
4d5b0: 7004 moveq #4,%d0 4d5b2: b082 cmpl %d2,%d0
4d5b4: 67e0 beqs 4d596 <pipe_release+0x5a> <== NEVER TAKEN
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
4d5b6: 486e fffc pea %fp@(-4) 4d5ba: 2f2a 0030 movel %a2@(48),%sp@- 4d5be: 4eb9 0004 f4f4 jsr 4f4f4 <rtems_barrier_release> 4d5c4: 508f addql #8,%sp
static void pipe_unlock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_release(pipe_semaphore);
4d5c6: 2f39 0006 2ee8 movel 62ee8 <pipe_semaphore>,%sp@- 4d5cc: 4e93 jsr %a3@ 4d5ce: 588f addql #4,%sp
iop->flags &= ~LIBIO_FLAGS_OPEN;
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return;
#endif
}
4d5d0: 4cee 3c04 ffe8 moveml %fp@(-24),%d2/%a2-%a5 4d5d6: 4e5e unlk %fp 4d5d8: 4e75 rts
/* Called with pipe_semaphore held. */
static inline void pipe_free(
pipe_control_t *pipe
)
{
rtems_barrier_delete(pipe->readBarrier);
4d5da: 2f2a 002c movel %a2@(44),%sp@-
rtems_barrier_delete(pipe->writeBarrier); rtems_semaphore_delete(pipe->Semaphore); free(pipe->Buffer);
4d5de: 4bf9 0004 4f68 lea 44f68 <free>,%a5
/* Called with pipe_semaphore held. */
static inline void pipe_free(
pipe_control_t *pipe
)
{
rtems_barrier_delete(pipe->readBarrier);
4d5e4: 243c 0004 f450 movel #324688,%d2 4d5ea: 2042 moveal %d2,%a0 4d5ec: 4e90 jsr %a0@
rtems_barrier_delete(pipe->writeBarrier);
4d5ee: 2f2a 0030 movel %a2@(48),%sp@- 4d5f2: 2042 moveal %d2,%a0 4d5f4: 4e90 jsr %a0@
rtems_semaphore_delete(pipe->Semaphore);
4d5f6: 2f2a 0028 movel %a2@(40),%sp@- 4d5fa: 4eb9 0004 8c80 jsr 48c80 <rtems_semaphore_delete>
free(pipe->Buffer);
4d600: 2f12 movel %a2@,%sp@- 4d602: 4e95 jsr %a5@
free(pipe);
4d604: 2f0a movel %a2,%sp@- 4d606: 4e95 jsr %a5@
/* To delete an anonymous pipe file when all users closed it */
if (pipe->Anonymous)
delfile = TRUE;
#endif
pipe_free(pipe);
*pipep = NULL;
4d608: 4fef 0014 lea %sp@(20),%sp 4d60c: 4294 clrl %a4@
static void pipe_unlock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_release(pipe_semaphore);
4d60e: 2f39 0006 2ee8 movel 62ee8 <pipe_semaphore>,%sp@- 4d614: 4e93 jsr %a3@ 4d616: 588f addql #4,%sp
iop->flags &= ~LIBIO_FLAGS_OPEN;
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return;
#endif
}
4d618: 4cee 3c04 ffe8 moveml %fp@(-24),%d2/%a2-%a5
4d61e: 4e5e unlk %fp <== NOT EXECUTED
0004dcae <pipe_write>:
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
4dcae: 4e56 ffcc linkw %fp,#-52 4dcb2: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4dcb6: 246e 0008 moveal %fp@(8),%a2 4dcba: 262e 0010 movel %fp@(16),%d3 4dcbe: 266e 0014 moveal %fp@(20),%a3
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
4dcc2: 660e bnes 4dcd2 <pipe_write+0x24> <== ALWAYS TAKEN
return 0;
4dcc4: 4282 clrl %d2 <== NOT EXECUTED
#endif
if (written > 0)
return written;
return ret;
}
4dcc6: 2002 movel %d2,%d0 4dcc8: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4dcce: 4e5e unlk %fp 4dcd0: 4e75 rts
/* Write nothing */
if (count == 0)
return 0;
if (! PIPE_LOCK(pipe))
4dcd2: 42a7 clrl %sp@- 4dcd4: 49f9 0004 8d58 lea 48d58 <rtems_semaphore_obtain>,%a4 4dcda: 42a7 clrl %sp@- 4dcdc: 2f2a 0028 movel %a2@(40),%sp@- 4dce0: 4e94 jsr %a4@ 4dce2: 4fef 000c lea %sp@(12),%sp 4dce6: 4a80 tstl %d0 4dce8: 6600 01e2 bnew 4decc <pipe_write+0x21e>
return -EINTR;
if (pipe->Readers == 0) {
4dcec: 4aaa 0010 tstl %a2@(16) 4dcf0: 6700 00fe beqw 4ddf0 <pipe_write+0x142>
ret = -EPIPE;
goto out_locked;
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
4dcf4: 202a 0004 movel %a2@(4),%d0 4dcf8: b083 cmpl %d3,%d0
4dcfa: 657a bcss 4dd76 <pipe_write+0xc8> <== NEVER TAKEN
4dcfc: 2803 movel %d3,%d4 4dcfe: 4286 clrl %d6 4dd00: 4282 clrl %d2 4dd02: 4bf9 0004 8ea8 lea 48ea8 <rtems_semaphore_release>,%a5
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
4dd08: 2a3c 0004 f56c movel #324972,%d5
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);
4dd0e: 2e3c 0005 229c movel #336540,%d7
/* 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) {
4dd14: 222a 000c movel %a2@(12),%d1 4dd18: 2040 moveal %d0,%a0 4dd1a: 91c1 subal %d1,%a0 4dd1c: b888 cmpl %a0,%d4 4dd1e: 6300 00f0 blsw 4de10 <pipe_write+0x162>
if (LIBIO_NODELAY(iop)) {
4dd22: 7001 moveq #1,%d0 4dd24: c0ab 0014 andl %a3@(20),%d0 4dd28: 6600 017c bnew 4dea6 <pipe_write+0x1f8>
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
4dd2c: 2f2a 0028 movel %a2@(40),%sp@-
ret = -EAGAIN;
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
4dd30: 52aa 001c addql #1,%a2@(28)
PIPE_UNLOCK(pipe);
4dd34: 4e95 jsr %a5@
if (! PIPE_WRITEWAIT(pipe))
4dd36: 2045 moveal %d5,%a0 4dd38: 42a7 clrl %sp@- 4dd3a: 2f2a 0030 movel %a2@(48),%sp@- 4dd3e: 4e90 jsr %a0@ 4dd40: 4fef 000c lea %sp@(12),%sp 4dd44: 4a80 tstl %d0
4dd46: 6648 bnes 4dd90 <pipe_write+0xe2> <== NEVER TAKEN
4dd48: 42ae fff8 clrl %fp@(-8)
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
4dd4c: 42a7 clrl %sp@- 4dd4e: 42a7 clrl %sp@- 4dd50: 2f2a 0028 movel %a2@(40),%sp@- 4dd54: 4e94 jsr %a4@ 4dd56: 4fef 000c lea %sp@(12),%sp 4dd5a: 4a80 tstl %d0 4dd5c: 6600 0164 bnew 4dec2 <pipe_write+0x214>
/* WARN waitingWriters not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingWriters --;
4dd60: 53aa 001c subql #1,%a2@(28)
if (ret != 0)
4dd64: 4aae fff8 tstl %fp@(-8)
4dd68: 6632 bnes 4dd9c <pipe_write+0xee> <== NEVER TAKEN
goto out_locked;
if (pipe->Readers == 0) {
4dd6a: 4aaa 0010 tstl %a2@(16)
4dd6e: 6768 beqs 4ddd8 <pipe_write+0x12a> <== NEVER TAKEN
4dd70: 202a 0004 movel %a2@(4),%d0 4dd74: 609e bras 4dd14 <pipe_write+0x66>
ret = -EPIPE;
goto out_locked;
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
4dd76: 7801 moveq #1,%d4 <== NOT EXECUTED 4dd78: 4286 clrl %d6 <== NOT EXECUTED 4dd7a: 4282 clrl %d2 <== NOT EXECUTED 4dd7c: 4bf9 0004 8ea8 lea 48ea8 <rtems_semaphore_release>,%a5 <== NOT EXECUTED
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
4dd82: 2a3c 0004 f56c movel #324972,%d5 <== 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);
4dd88: 2e3c 0005 229c movel #336540,%d7 <== NOT EXECUTED 4dd8e: 6084 bras 4dd14 <pipe_write+0x66> <== NOT EXECUTED
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
ret = -EINTR;
4dd90: 72fc moveq #-4,%d1 <== NOT EXECUTED 4dd92: 2d41 fff8 movel %d1,%fp@(-8) <== NOT EXECUTED 4dd96: 60b4 bras 4dd4c <pipe_write+0x9e> <== NOT EXECUTED
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
4dd98: 42ae fff8 clrl %fp@(-8)
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
4dd9c: 2f2a 0028 movel %a2@(40),%sp@- 4dda0: 4e95 jsr %a5@ 4dda2: 588f addql #4,%sp
out_nolock:
#ifdef RTEMS_POSIX_API
/* Signal SIGPIPE */
if (ret == -EPIPE)
4dda4: 70e0 moveq #-32,%d0 4dda6: b0ae fff8 cmpl %fp@(-8),%d0
4ddaa: 6716 beqs 4ddc2 <pipe_write+0x114> <== NEVER TAKEN
kill(getpid(), SIGPIPE);
#endif
if (written > 0)
4ddac: 4a82 tstl %d2 4ddae: 6e00 ff16 bgtw 4dcc6 <pipe_write+0x18> 4ddb2: 242e fff8 movel %fp@(-8),%d2
return written;
return ret;
}
4ddb6: 2002 movel %d2,%d0 4ddb8: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4ddbe: 4e5e unlk %fp 4ddc0: 4e75 rts
out_nolock:
#ifdef RTEMS_POSIX_API
/* Signal SIGPIPE */
if (ret == -EPIPE)
kill(getpid(), SIGPIPE);
4ddc2: 4eb9 0004 e8b4 jsr 4e8b4 <getpid> 4ddc8: 4878 000d pea d <OPER1+0x1> 4ddcc: 2f00 movel %d0,%sp@- 4ddce: 4eb9 0004 ebf0 jsr 4ebf0 <kill> 4ddd4: 508f addql #8,%sp 4ddd6: 60d4 bras 4ddac <pipe_write+0xfe>
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
4ddd8: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED
pipe->waitingWriters --;
if (ret != 0)
goto out_locked;
if (pipe->Readers == 0) {
ret = -EPIPE;
4dddc: 78e0 moveq #-32,%d4 <== NOT EXECUTED 4ddde: 2d44 fff8 movel %d4,%fp@(-8) <== NOT EXECUTED
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
4dde2: 4e95 jsr %a5@ <== NOT EXECUTED 4dde4: 588f addql #4,%sp <== NOT EXECUTED
out_nolock:
#ifdef RTEMS_POSIX_API
/* Signal SIGPIPE */
if (ret == -EPIPE)
4dde6: 70e0 moveq #-32,%d0 <== NOT EXECUTED 4dde8: b0ae fff8 cmpl %fp@(-8),%d0 <== NOT EXECUTED 4ddec: 66be bnes 4ddac <pipe_write+0xfe> <== NOT EXECUTED 4ddee: 60d2 bras 4ddc2 <pipe_write+0x114> <== NOT EXECUTED
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
4ddf0: 2f2a 0028 movel %a2@(40),%sp@-
if (! PIPE_LOCK(pipe))
return -EINTR;
if (pipe->Readers == 0) {
ret = -EPIPE;
4ddf4: 78e0 moveq #-32,%d4 4ddf6: 4bf9 0004 8ea8 lea 48ea8 <rtems_semaphore_release>,%a5
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
int chunk, chunk1, written = 0, ret = 0;
4ddfc: 4282 clrl %d2
if (! PIPE_LOCK(pipe))
return -EINTR;
if (pipe->Readers == 0) {
ret = -EPIPE;
4ddfe: 2d44 fff8 movel %d4,%fp@(-8)
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
4de02: 4e95 jsr %a5@ 4de04: 588f addql #4,%sp
out_nolock:
#ifdef RTEMS_POSIX_API
/* Signal SIGPIPE */
if (ret == -EPIPE)
4de06: 70e0 moveq #-32,%d0 4de08: b0ae fff8 cmpl %fp@(-8),%d0
4de0c: 669e bnes 4ddac <pipe_write+0xfe> <== NEVER TAKEN
4de0e: 60b2 bras 4ddc2 <pipe_write+0x114>
ret = -EPIPE;
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
4de10: 2243 moveal %d3,%a1 4de12: 93c6 subal %d6,%a1 4de14: 2d48 fff8 movel %a0,%fp@(-8) 4de18: b3c8 cmpal %a0,%a1
4de1a: 6404 bccs 4de20 <pipe_write+0x172>
4de1c: 2d49 fff8 movel %a1,%fp@(-8)
chunk1 = pipe->Size - PIPE_WSTART(pipe);
4de20: 2241 moveal %d1,%a1 4de22: d3ea 0008 addal %a2@(8),%a1 4de26: 2809 movel %a1,%d4 4de28: 4c40 4001 remul %d0,%d1,%d4 4de2c: 2041 moveal %d1,%a0 4de2e: 2200 movel %d0,%d1 4de30: 9288 subl %a0,%d1
if (chunk > chunk1) {
4de32: b2ae fff8 cmpl %fp@(-8),%d1 4de36: 6c00 00a2 bgew 4deda <pipe_write+0x22c>
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
4de3a: 226e 000c moveal %fp@(12),%a1 4de3e: 2f01 movel %d1,%sp@- 4de40: 4871 6800 pea %a1@(00000000,%d6:l) 4de44: d1d2 addal %a2@,%a0 4de46: 2d41 fff4 movel %d1,%fp@(-12) 4de4a: 2f08 movel %a0,%sp@- 4de4c: 2047 moveal %d7,%a0 4de4e: 4e90 jsr %a0@
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
4de50: 222e fff4 movel %fp@(-12),%d1 4de54: dc81 addl %d1,%d6 4de56: 2247 moveal %d7,%a1 4de58: 282e fff8 movel %fp@(-8),%d4 4de5c: 9881 subl %d1,%d4 4de5e: 206e 000c moveal %fp@(12),%a0 4de62: 2f04 movel %d4,%sp@- 4de64: 4870 6800 pea %a0@(00000000,%d6:l) 4de68: 2f12 movel %a2@,%sp@- 4de6a: 4e91 jsr %a1@
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
4de6c: 222e fff8 movel %fp@(-8),%d1 4de70: d3aa 000c addl %d1,%a2@(12)
chunk = MIN(count - written, PIPE_SPACE(pipe));
chunk1 = pipe->Size - PIPE_WSTART(pipe);
if (chunk > chunk1) {
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
4de74: 4fef 0018 lea %sp@(24),%sp
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
if (pipe->waitingReaders > 0)
4de78: 4aaa 0018 tstl %a2@(24)
4de7c: 6616 bnes 4de94 <pipe_write+0x1e6> <== NEVER TAKEN
PIPE_WAKEUPREADERS(pipe);
written += chunk;
4de7e: d4ae fff8 addl %fp@(-8),%d2
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
4de82: 2c02 movel %d2,%d6 4de84: b483 cmpl %d3,%d2 4de86: 6400 ff10 bccw 4dd98 <pipe_write+0xea>
4de8a: 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;
4de8e: 7801 moveq #1,%d4 <== NOT EXECUTED 4de90: 6000 fe82 braw 4dd14 <pipe_write+0x66> <== NOT EXECUTED
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
if (pipe->waitingReaders > 0)
PIPE_WAKEUPREADERS(pipe);
4de94: 486e fffc pea %fp@(-4) 4de98: 2f2a 002c movel %a2@(44),%sp@- 4de9c: 4eb9 0004 f4f4 jsr 4f4f4 <rtems_barrier_release> 4dea2: 508f addql #8,%sp 4dea4: 60d8 bras 4de7e <pipe_write+0x1d0>
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
while (PIPE_SPACE(pipe) < chunk) {
if (LIBIO_NODELAY(iop)) {
ret = -EAGAIN;
4dea6: 72f5 moveq #-11,%d1
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
4dea8: 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;
4deac: 2d41 fff8 movel %d1,%fp@(-8)
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
4deb0: 4e95 jsr %a5@ 4deb2: 588f addql #4,%sp
out_nolock:
#ifdef RTEMS_POSIX_API
/* Signal SIGPIPE */
if (ret == -EPIPE)
4deb4: 70e0 moveq #-32,%d0 4deb6: b0ae fff8 cmpl %fp@(-8),%d0 4deba: 6600 fef0 bnew 4ddac <pipe_write+0xfe>
4debe: 6000 ff02 braw 4ddc2 <pipe_write+0x114> <== NOT EXECUTED
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
/* WARN waitingWriters not restored! */
ret = -EINTR;
4dec2: 72fc moveq #-4,%d1 <== NOT EXECUTED 4dec4: 2d41 fff8 movel %d1,%fp@(-8) <== NOT EXECUTED 4dec8: 6000 fee2 braw 4ddac <pipe_write+0xfe> <== NOT EXECUTED
/* Write nothing */
if (count == 0)
return 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
4decc: 74fc moveq #-4,%d2 <== NOT EXECUTED
#endif
if (written > 0)
return written;
return ret;
}
4dece: 2002 movel %d2,%d0 <== NOT EXECUTED 4ded0: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4ded6: 4e5e unlk %fp <== NOT EXECUTED 4ded8: 4e75 rts <== 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);
4deda: 2f2e fff8 movel %fp@(-8),%sp@- 4dede: 226e 000c moveal %fp@(12),%a1 4dee2: 4871 6800 pea %a1@(00000000,%d6:l) 4dee6: d1d2 addal %a2@,%a0 4dee8: 2f08 movel %a0,%sp@- 4deea: 2047 moveal %d7,%a0 4deec: 4e90 jsr %a0@
pipe->Length += chunk;
4deee: 222e fff8 movel %fp@(-8),%d1 4def2: d3aa 000c addl %d1,%a2@(12)
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);
4def6: 4fef 000c lea %sp@(12),%sp
pipe->Length += chunk;
if (pipe->waitingReaders > 0)
4defa: 4aaa 0018 tstl %a2@(24) 4defe: 6700 ff7e beqw 4de7e <pipe_write+0x1d0> 4df02: 6090 bras 4de94 <pipe_write+0x1e6>
00047f38 <posix_memalign>:
int posix_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
47f38: 4e56 0000 linkw %fp,#0 47f3c: 222e 000c movel %fp@(12),%d1
/*
* Update call statistics
*/
MSBUMP(memalign_calls, 1);
if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *)))
47f40: 2001 movel %d1,%d0 47f42: 5380 subql #1,%d0
)
{
/*
* Update call statistics
*/
MSBUMP(memalign_calls, 1);
47f44: 52b9 0006 7120 addql #1,67120 <rtems_malloc_statistics+0x8>
if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *)))
47f4a: c081 andl %d1,%d0
47f4c: 6706 beqs 47f54 <posix_memalign+0x1c> <== ALWAYS TAKEN
/* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); }
47f4e: 7016 moveq #22,%d0 47f50: 4e5e unlk %fp 47f52: 4e75 rts
/*
* Update call statistics
*/
MSBUMP(memalign_calls, 1);
if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *)))
47f54: 103c 0003 moveb #3,%d0 47f58: b081 cmpl %d1,%d0
47f5a: 64f2 bccs 47f4e <posix_memalign+0x16> /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); }
47f5c: 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 );
47f5e: 4ef9 0004 8128 jmp 48128 <rtems_memalign>
0004b80c <pthread_attr_setschedpolicy>:
int pthread_attr_setschedpolicy(
pthread_attr_t *attr,
int policy
)
{
4b80c: 4e56 0000 linkw %fp,#0 4b810: 206e 0008 moveal %fp@(8),%a0 4b814: 202e 000c movel %fp@(12),%d0 4b818: 2f02 movel %d2,%sp@-
if ( !attr || !attr->is_initialized )
4b81a: 4a88 tstl %a0
4b81c: 6704 beqs 4b822 <pthread_attr_setschedpolicy+0x16>
4b81e: 4a90 tstl %a0@
4b820: 6608 bnes 4b82a <pthread_attr_setschedpolicy+0x1e>
return 0;
default:
return ENOTSUP;
}
}
4b822: 241f movel %sp@+,%d2
pthread_attr_t *attr,
int policy
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
4b824: 7016 moveq #22,%d0
return 0;
default:
return ENOTSUP;
}
}
4b826: 4e5e unlk %fp 4b828: 4e75 rts
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( policy ) {
4b82a: 7204 moveq #4,%d1 4b82c: b280 cmpl %d0,%d1
4b82e: 6518 bcss 4b848 <pthread_attr_setschedpolicy+0x3c>
4b830: 123c 0001 moveb #1,%d1 4b834: 7417 moveq #23,%d2 4b836: e1a9 lsll %d0,%d1 4b838: c282 andl %d2,%d1
4b83a: 670c beqs 4b848 <pthread_attr_setschedpolicy+0x3c><== NEVER TAKEN
return 0;
default:
return ENOTSUP;
}
}
4b83c: 241f movel %sp@+,%d2 4b83e: 4e5e unlk %fp
switch ( policy ) {
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
case SCHED_SPORADIC:
attr->schedpolicy = policy;
4b840: 2140 0014 movel %d0,%a0@(20)
return 0;
4b844: 4280 clrl %d0
default:
return ENOTSUP;
}
}
4b846: 4e75 rts 4b848: 241f movel %sp@+,%d2
case SCHED_SPORADIC:
attr->schedpolicy = policy;
return 0;
default:
return ENOTSUP;
4b84a: 203c 0000 0086 movel #134,%d0
} }
4b850: 4e5e unlk %fp <== NOT EXECUTED
0004b854 <pthread_attr_setscope>:
int pthread_attr_setscope(
pthread_attr_t *attr,
int contentionscope
)
{
4b854: 4e56 0000 linkw %fp,#0 4b858: 206e 0008 moveal %fp@(8),%a0 4b85c: 222e 000c movel %fp@(12),%d1 4b860: 2f02 movel %d2,%sp@-
if ( !attr || !attr->is_initialized )
4b862: 4a88 tstl %a0
4b864: 6704 beqs 4b86a <pthread_attr_setscope+0x16>
4b866: 4a90 tstl %a0@
4b868: 6608 bnes 4b872 <pthread_attr_setscope+0x1e>
case PTHREAD_SCOPE_SYSTEM:
return ENOTSUP;
default:
return EINVAL;
4b86a: 7016 moveq #22,%d0
} }
4b86c: 241f movel %sp@+,%d2 4b86e: 4e5e unlk %fp 4b870: 4e75 rts
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( contentionscope ) {
4b872: 4a81 tstl %d1
4b874: 660c bnes 4b882 <pthread_attr_setscope+0x2e>
return ENOTSUP;
default:
return EINVAL;
}
}
4b876: 241f movel %sp@+,%d2
return EINVAL;
switch ( contentionscope ) {
case PTHREAD_SCOPE_PROCESS:
attr->contentionscope = contentionscope;
return 0;
4b878: 4280 clrl %d0
return ENOTSUP;
default:
return EINVAL;
}
}
4b87a: 4e5e unlk %fp
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( contentionscope ) {
case PTHREAD_SCOPE_PROCESS:
attr->contentionscope = contentionscope;
4b87c: 42a8 000c clrl %a0@(12)
return ENOTSUP;
default:
return EINVAL;
}
}
4b880: 4e75 rts
case PTHREAD_SCOPE_PROCESS:
attr->contentionscope = contentionscope;
return 0;
case PTHREAD_SCOPE_SYSTEM:
return ENOTSUP;
4b882: 203c 0000 0086 movel #134,%d0
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( contentionscope ) {
4b888: 7401 moveq #1,%d2 4b88a: b481 cmpl %d1,%d2
4b88c: 67de beqs 4b86c <pthread_attr_setscope+0x18>
case PTHREAD_SCOPE_SYSTEM:
return ENOTSUP;
default:
return EINVAL;
4b88e: 7016 moveq #22,%d0 4b890: 60da bras 4b86c <pthread_attr_setscope+0x18>
...
00046c34 <pthread_barrier_init>:
int pthread_barrier_init(
pthread_barrier_t *barrier,
const pthread_barrierattr_t *attr,
unsigned int count
)
{
46c34: 4e56 ffe0 linkw %fp,#-32 46c38: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 46c3c: 246e 0008 moveal %fp@(8),%a2 46c40: 262e 000c movel %fp@(12),%d3 46c44: 242e 0010 movel %fp@(16),%d2
const pthread_barrierattr_t *the_attr;
/*
* Error check parameters
*/
if ( !barrier )
46c48: 4a8a tstl %a2
46c4a: 6704 beqs 46c50 <pthread_barrier_init+0x1c>
return EINVAL;
if ( count == 0 )
46c4c: 4a82 tstl %d2
46c4e: 660c bnes 46c5c <pthread_barrier_init+0x28>
switch ( the_attr->process_shared ) {
case PTHREAD_PROCESS_PRIVATE: /* only supported values */
break;
case PTHREAD_PROCESS_SHARED:
default:
return EINVAL;
46c50: 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; }
46c52: 4cee 0c0c ffe0 moveml %fp@(-32),%d2-%d3/%a2-%a3 46c58: 4e5e unlk %fp 46c5a: 4e75 rts
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
46c5c: 4a83 tstl %d3
46c5e: 6776 beqs 46cd6 <pthread_barrier_init+0xa2>
46c60: 2043 moveal %d3,%a0
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
46c62: 4a90 tstl %a0@
46c64: 67ea beqs 46c50 <pthread_barrier_init+0x1c>
return EINVAL;
switch ( the_attr->process_shared ) {
46c66: 4aa8 0004 tstl %a0@(4)
46c6a: 66e4 bnes 46c50 <pthread_barrier_init+0x1c> <== NEVER TAKEN
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
46c6c: 2039 0006 255c movel 6255c <_Thread_Dispatch_disable_level>,%d0 46c72: 5280 addql #1,%d0 46c74: 23c0 0006 255c movel %d0,6255c <_Thread_Dispatch_disable_level>
return _Thread_Dispatch_disable_level;
46c7a: 2039 0006 255c movel 6255c <_Thread_Dispatch_disable_level>,%d0
}
/*
* Convert from POSIX attributes to Core Barrier attributes
*/
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
46c80: 42ae fff0 clrl %fp@(-16)
the_attributes.maximum_count = count;
46c84: 2d42 fff4 movel %d2,%fp@(-12)
* This function allocates a barrier control block from
* the inactive chain of free barrier control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Allocate( void )
{
return (POSIX_Barrier_Control *)
46c88: 4879 0006 2852 pea 62852 <_POSIX_Barrier_Information> 46c8e: 4eb9 0004 8fd8 jsr 48fd8 <_Objects_Allocate>
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _POSIX_Barrier_Allocate();
if ( !the_barrier ) {
46c94: 588f addql #4,%sp 46c96: 2640 moveal %d0,%a3 46c98: 4a80 tstl %d0
46c9a: 6754 beqs 46cf0 <pthread_barrier_init+0xbc>
_Thread_Enable_dispatch();
return EAGAIN;
}
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
46c9c: 486e fff0 pea %fp@(-16) 46ca0: 486b 0010 pea %a3@(16) 46ca4: 4eb9 0004 858c jsr 4858c <_CORE_barrier_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
46caa: 202b 0008 movel %a3@(8),%d0
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
46cae: 4281 clrl %d1 46cb0: 2079 0006 286a moveal 6286a <_POSIX_Barrier_Information+0x18>,%a0 46cb6: 3200 movew %d0,%d1 46cb8: 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;
46cbc: 42ab 000c clrl %a3@(12)
);
/*
* Exit the critical section and return the user an operational barrier
*/
*barrier = the_barrier->Object.id;
46cc0: 2480 movel %d0,%a2@
_Thread_Enable_dispatch();
46cc2: 4eb9 0004 a1e4 jsr 4a1e4 <_Thread_Enable_dispatch>
return 0;
46cc8: 508f addql #8,%sp 46cca: 4280 clrl %d0
}
46ccc: 4cee 0c0c ffe0 moveml %fp@(-32),%d2-%d3/%a2-%a3 46cd2: 4e5e unlk %fp 46cd4: 4e75 rts
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
the_attr = attr;
} else {
(void) pthread_barrierattr_init( &my_attr );
46cd6: 260e movel %fp,%d3 46cd8: 5183 subql #8,%d3 46cda: 2f03 movel %d3,%sp@- 46cdc: 4eb9 0004 6b70 jsr 46b70 <pthread_barrierattr_init> 46ce2: 588f addql #4,%sp
the_attr = &my_attr;
46ce4: 2043 moveal %d3,%a0
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
46ce6: 4a90 tstl %a0@ 46ce8: 6700 ff66 beqw 46c50 <pthread_barrier_init+0x1c> 46cec: 6000 ff78 braw 46c66 <pthread_barrier_init+0x32>
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _POSIX_Barrier_Allocate();
if ( !the_barrier ) {
_Thread_Enable_dispatch();
46cf0: 4eb9 0004 a1e4 jsr 4a1e4 <_Thread_Enable_dispatch>
return EAGAIN;
46cf6: 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; }
46cf8: 4cee 0c0c ffe0 moveml %fp@(-32),%d2-%d3/%a2-%a3 46cfe: 4e5e unlk %fp
...
000460e4 <pthread_cleanup_pop>:
*/
void pthread_cleanup_pop(
int execute
)
{
460e4: 4e56 fff4 linkw %fp,#-12
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
460e8: 2039 0006 10c0 movel 610c0 <_Thread_Dispatch_disable_level>,%d0 460ee: 5280 addql #1,%d0
POSIX_Cancel_Handler_control tmp_handler;
Chain_Control *handler_stack;
POSIX_API_Control *thread_support;
ISR_Level level;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
460f0: 2079 0006 1522 moveal 61522 <_Per_CPU_Information+0xc>,%a0
*/
void pthread_cleanup_pop(
int execute
)
{
460f6: 48d7 040c moveml %d2-%d3/%a2,%sp@ 460fa: 23c0 0006 10c0 movel %d0,610c0 <_Thread_Dispatch_disable_level> 46100: 262e 0008 movel %fp@(8),%d3
POSIX_Cancel_Handler_control tmp_handler;
Chain_Control *handler_stack;
POSIX_API_Control *thread_support;
ISR_Level level;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
46104: 2068 0102 moveal %a0@(258),%a0
return _Thread_Dispatch_disable_level;
46108: 2039 0006 10c0 movel 610c0 <_Thread_Dispatch_disable_level>,%d0
* ensure that we do not get prempted and deleted while we are holding
* memory that needs to be freed.
*/
_Thread_Disable_dispatch();
_ISR_Disable( level );
4610e: 203c 0000 0700 movel #1792,%d0 46114: 40c2 movew %sr,%d2 46116: 8082 orl %d2,%d0 46118: 46c0 movew %d0,%sr
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
4611a: 2008 movel %a0,%d0 4611c: 0680 0000 00e8 addil #232,%d0
if ( _Chain_Is_empty( handler_stack ) ) {
46122: b0a8 00e4 cmpl %a0@(228),%d0
46126: 6748 beqs 46170 <pthread_cleanup_pop+0x8c> <== NEVER TAKEN
_Thread_Enable_dispatch();
_ISR_Enable( level );
return;
}
handler = (POSIX_Cancel_Handler_control *)
46128: 2068 00ec moveal %a0@(236),%a0
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
4612c: 2450 moveal %a0@,%a2
previous = the_node->previous;
4612e: 2268 0004 moveal %a0@(4),%a1
next->previous = previous;
46132: 2549 0004 movel %a1,%a2@(4)
previous->next = next;
46136: 228a movel %a2,%a1@
_Chain_Tail( handler_stack )->previous;
_Chain_Extract_unprotected( &handler->Node );
_ISR_Enable( level );
46138: 46c2 movew %d2,%sr
tmp_handler = *handler;
4613a: 2468 0008 moveal %a0@(8),%a2 4613e: 2428 000c movel %a0@(12),%d2
_Workspace_Free( handler );
46142: 2f08 movel %a0,%sp@- 46144: 4eb9 0004 a09a jsr 4a09a <_Workspace_Free>
_Thread_Enable_dispatch();
4614a: 4eb9 0004 8fb4 jsr 48fb4 <_Thread_Enable_dispatch>
if ( execute )
46150: 588f addql #4,%sp 46152: 4a83 tstl %d3
46154: 660a bnes 46160 <pthread_cleanup_pop+0x7c>
(*tmp_handler.routine)( tmp_handler.arg );
}
46156: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4615c: 4e5e unlk %fp 4615e: 4e75 rts
_Workspace_Free( handler );
_Thread_Enable_dispatch();
if ( execute )
(*tmp_handler.routine)( tmp_handler.arg );
46160: 224a moveal %a2,%a1 46162: 2d42 0008 movel %d2,%fp@(8)
}
46166: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4616c: 4e5e unlk %fp
_Workspace_Free( handler );
_Thread_Enable_dispatch();
if ( execute )
(*tmp_handler.routine)( tmp_handler.arg );
4616e: 4ed1 jmp %a1@
_Thread_Disable_dispatch();
_ISR_Disable( level );
if ( _Chain_Is_empty( handler_stack ) ) {
_Thread_Enable_dispatch();
46170: 4eb9 0004 8fb4 jsr 48fb4 <_Thread_Enable_dispatch>
_ISR_Enable( level );
46176: 46c2 movew %d2,%sr
_Thread_Enable_dispatch();
if ( execute )
(*tmp_handler.routine)( tmp_handler.arg );
}
46178: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4617e: 4e5e unlk %fp
...
000466a4 <pthread_cleanup_push>:
void pthread_cleanup_push(
void (*routine)( void * ),
void *arg
)
{
466a4: 4e56 0000 linkw %fp,#0 466a8: 2f03 movel %d3,%sp@- 466aa: 262e 000c movel %fp@(12),%d3 466ae: 2f02 movel %d2,%sp@- 466b0: 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 )
466b4: 675a beqs 46710 <pthread_cleanup_push+0x6c>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
466b6: 2039 0006 1f72 movel 61f72 <_Thread_Dispatch_disable_level>,%d0 466bc: 5280 addql #1,%d0 466be: 23c0 0006 1f72 movel %d0,61f72 <_Thread_Dispatch_disable_level>
return _Thread_Dispatch_disable_level;
466c4: 2039 0006 1f72 movel 61f72 <_Thread_Dispatch_disable_level>,%d0
return;
_Thread_Disable_dispatch();
handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) );
466ca: 4878 0010 pea 10 <INVALID_OPERATION> 466ce: 4eb9 0004 ae6a jsr 4ae6a <_Workspace_Allocate>
if ( handler ) {
466d4: 588f addql #4,%sp 466d6: 4a80 tstl %d0
466d8: 6726 beqs 46700 <pthread_cleanup_push+0x5c> <== NEVER TAKEN
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
466da: 2079 0006 23d4 moveal 623d4 <_Per_CPU_Information+0xc>,%a0
handler_stack = &thread_support->Cancellation_Handlers;
466e0: 2228 0102 movel %a0@(258),%d1
handler->routine = routine;
466e4: 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;
466e6: 0681 0000 00e4 addil #228,%d1
handler->routine = routine;
466ec: 2142 0008 movel %d2,%a0@(8)
handler->arg = arg;
466f0: 2143 000c movel %d3,%a0@(12)
_Chain_Append( handler_stack, &handler->Node );
466f4: 2f00 movel %d0,%sp@- 466f6: 2f01 movel %d1,%sp@- 466f8: 4eb9 0004 80dc jsr 480dc <_Chain_Append> 466fe: 508f addql #8,%sp
} _Thread_Enable_dispatch(); }
46700: 242e fff8 movel %fp@(-8),%d2 46704: 262e fffc movel %fp@(-4),%d3 46708: 4e5e unlk %fp
handler->routine = routine;
handler->arg = arg;
_Chain_Append( handler_stack, &handler->Node );
}
_Thread_Enable_dispatch();
4670a: 4ef9 0004 9d00 jmp 49d00 <_Thread_Enable_dispatch>
}
46710: 242e fff8 movel %fp@(-8),%d2 46714: 262e fffc movel %fp@(-4),%d3
46718: 4e5e unlk %fp <== NOT EXECUTED
00047538 <pthread_cond_init>:
int pthread_cond_init(
pthread_cond_t *cond,
const pthread_condattr_t *attr
)
{
47538: 4e56 0000 linkw %fp,#0 4753c: 2f0b movel %a3,%sp@- 4753e: 2f0a movel %a2,%sp@- 47540: 246e 000c moveal %fp@(12),%a2
POSIX_Condition_variables_Control *the_cond;
const pthread_condattr_t *the_attr;
if ( attr ) the_attr = attr;
47544: 4a8a tstl %a2
47546: 671a beqs 47562 <pthread_cond_init+0x2a>
else the_attr = &_POSIX_Condition_variables_Default_attributes;
/*
* Be careful about attributes when global!!!
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
47548: 7001 moveq #1,%d0 4754a: b0aa 0004 cmpl %a2@(4),%d0
4754e: 6704 beqs 47554 <pthread_cond_init+0x1c> <== NEVER TAKEN
return EINVAL;
if ( !the_attr->is_initialized )
47550: 4a92 tstl %a2@
47552: 6616 bnes 4756a <pthread_cond_init+0x32>
*cond = the_cond->Object.id;
_Thread_Enable_dispatch();
return 0;
}
47554: 246e fff8 moveal %fp@(-8),%a2
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
return EINVAL;
if ( !the_attr->is_initialized )
return EINVAL;
47558: 7016 moveq #22,%d0
*cond = the_cond->Object.id;
_Thread_Enable_dispatch();
return 0;
}
4755a: 266e fffc moveal %fp@(-4),%a3 4755e: 4e5e unlk %fp 47560: 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;
47562: 45f9 0006 0e76 lea 60e76 <_POSIX_Condition_variables_Default_attributes>,%a2 47568: 60de bras 47548 <pthread_cond_init+0x10>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
4756a: 2039 0006 3708 movel 63708 <_Thread_Dispatch_disable_level>,%d0 47570: 5280 addql #1,%d0 47572: 23c0 0006 3708 movel %d0,63708 <_Thread_Dispatch_disable_level>
return _Thread_Dispatch_disable_level;
47578: 2039 0006 3708 movel 63708 <_Thread_Dispatch_disable_level>,%d0
*/
RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control
*_POSIX_Condition_variables_Allocate( void )
{
return (POSIX_Condition_variables_Control *)
4757e: 4879 0006 3a8a pea 63a8a <_POSIX_Condition_variables_Information> 47584: 4eb9 0004 9f84 jsr 49f84 <_Objects_Allocate>
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
4758a: 588f addql #4,%sp 4758c: 2640 moveal %d0,%a3 4758e: 4a80 tstl %d0
47590: 6754 beqs 475e6 <pthread_cond_init+0xae>
_Thread_Enable_dispatch();
return ENOMEM;
}
the_cond->process_shared = the_attr->process_shared;
47592: 276a 0004 0010 movel %a2@(4),%a3@(16)
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
47598: 42ab 0014 clrl %a3@(20)
_Thread_queue_Initialize(
4759c: 4878 0074 pea 74 <DBL_MANT_DIG+0x3f> 475a0: 2f3c 1000 0800 movel #268437504,%sp@- 475a6: 42a7 clrl %sp@- 475a8: 486b 0018 pea %a3@(24) 475ac: 4eb9 0004 b974 jsr 4b974 <_Thread_queue_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
475b2: 202b 0008 movel %a3@(8),%d0
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
475b6: 4281 clrl %d1 475b8: 2079 0006 3aa2 moveal 63aa2 <_POSIX_Condition_variables_Information+0x18>,%a0 475be: 3200 movew %d0,%d1 475c0: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4)
&_POSIX_Condition_variables_Information,
&the_cond->Object,
0
);
*cond = the_cond->Object.id;
475c4: 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;
475c8: 42ab 000c clrl %a3@(12) 475cc: 2080 movel %d0,%a0@
_Thread_Enable_dispatch();
475ce: 4eb9 0004 b190 jsr 4b190 <_Thread_Enable_dispatch>
return 0;
}
475d4: 246e fff8 moveal %fp@(-8),%a2
*cond = the_cond->Object.id;
_Thread_Enable_dispatch();
return 0;
475d8: 4fef 0010 lea %sp@(16),%sp 475dc: 4280 clrl %d0
}
475de: 266e fffc moveal %fp@(-4),%a3 475e2: 4e5e unlk %fp 475e4: 4e75 rts
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
_Thread_Enable_dispatch();
475e6: 4eb9 0004 b190 jsr 4b190 <_Thread_Enable_dispatch>
*cond = the_cond->Object.id;
_Thread_Enable_dispatch();
return 0;
}
475ec: 246e fff8 moveal %fp@(-8),%a2
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
_Thread_Enable_dispatch();
return ENOMEM;
475f0: 700c moveq #12,%d0
*cond = the_cond->Object.id;
_Thread_Enable_dispatch();
return 0;
}
475f2: 266e fffc moveal %fp@(-4),%a3 475f6: 4e5e unlk %fp
...
00047398 <pthread_condattr_destroy>:
*/
int pthread_condattr_destroy(
pthread_condattr_t *attr
)
{
47398: 4e56 0000 linkw %fp,#0 4739c: 206e 0008 moveal %fp@(8),%a0
if ( !attr || attr->is_initialized == false )
473a0: 4a88 tstl %a0
473a2: 6704 beqs 473a8 <pthread_condattr_destroy+0x10>
473a4: 4a90 tstl %a0@
473a6: 6606 bnes 473ae <pthread_condattr_destroy+0x16> <== ALWAYS TAKEN
return EINVAL;
473a8: 7016 moveq #22,%d0
attr->is_initialized = false;
return 0;
}
473aa: 4e5e unlk %fp 473ac: 4e75 rts
{
if ( !attr || attr->is_initialized == false )
return EINVAL;
attr->is_initialized = false;
return 0;
473ae: 4280 clrl %d0
}
473b0: 4e5e unlk %fp
)
{
if ( !attr || attr->is_initialized == false )
return EINVAL;
attr->is_initialized = false;
473b2: 4290 clrl %a0@
return 0;
}
...
000473d8 <pthread_condattr_init>:
*/
int pthread_condattr_init(
pthread_condattr_t *attr
)
{
473d8: 4e56 0000 linkw %fp,#0 473dc: 206e 0008 moveal %fp@(8),%a0 473e0: 2f02 movel %d2,%sp@-
if ( !attr )
473e2: 4a88 tstl %a0
473e4: 671a beqs 47400 <pthread_condattr_init+0x28> <== NEVER TAKEN
return EINVAL;
*attr = _POSIX_Condition_variables_Default_attributes;
return 0;
473e6: 4280 clrl %d0
)
{
if ( !attr )
return EINVAL;
*attr = _POSIX_Condition_variables_Default_attributes;
473e8: 2239 0006 0e76 movel 60e76 <_POSIX_Condition_variables_Default_attributes>,%d1 473ee: 2439 0006 0e7a movel 60e7a <_POSIX_Condition_variables_Default_attributes+0x4>,%d2 473f4: 2081 movel %d1,%a0@ 473f6: 2142 0004 movel %d2,%a0@(4)
return 0; }
473fa: 241f movel %sp@+,%d2 473fc: 4e5e unlk %fp 473fe: 4e75 rts 47400: 241f movel %sp@+,%d2
int pthread_condattr_init(
pthread_condattr_t *attr
)
{
if ( !attr )
return EINVAL;
47402: 7016 moveq #22,%d0
*attr = _POSIX_Condition_variables_Default_attributes;
return 0;
}
47404: 4e5e unlk %fp <== NOT EXECUTED
00046af8 <pthread_create>:
pthread_t *thread,
const pthread_attr_t *attr,
void *(*start_routine)( void * ),
void *arg
)
{
46af8: 4e56 ffb8 linkw %fp,#-72 46afc: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 46b00: 246e 000c moveal %fp@(12),%a2 46b04: 262e 0010 movel %fp@(16),%d3
int schedpolicy = SCHED_RR;
struct sched_param schedparam;
Objects_Name name;
int rc;
if ( !start_routine )
46b08: 6700 014c beqw 46c56 <pthread_create+0x15e>
return EFAULT;
the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes;
46b0c: 4a8a tstl %a2 46b0e: 6700 0154 beqw 46c64 <pthread_create+0x16c>
if ( !the_attr->is_initialized )
46b12: 4a92 tstl %a2@
46b14: 660e bnes 46b24 <pthread_create+0x2c>
/*
* Interpret the scheduling parameters.
*/
if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) )
return EINVAL;
46b16: 7416 moveq #22,%d2
*/
*thread = the_thread->Object.id;
_RTEMS_Unlock_allocator();
return 0;
}
46b18: 2002 movel %d2,%d0 46b1a: 4cee 3c3c ffb8 moveml %fp@(-72),%d2-%d5/%a2-%a5 46b20: 4e5e unlk %fp 46b22: 4e75 rts
* 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) )
46b24: 4aaa 0004 tstl %a2@(4)
46b28: 670c beqs 46b36 <pthread_create+0x3e>
46b2a: 2039 0006 076c movel 6076c <rtems_minimum_stack_size>,%d0 46b30: b0aa 0008 cmpl %a2@(8),%d0
46b34: 62e0 bhis 46b16 <pthread_create+0x1e>
* 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 ) {
46b36: 202a 0010 movel %a2@(16),%d0 46b3a: 7201 moveq #1,%d1 46b3c: b280 cmpl %d0,%d1 46b3e: 6700 0134 beqw 46c74 <pthread_create+0x17c> 46b42: 123c 0002 moveb #2,%d1 46b46: b280 cmpl %d0,%d1
46b48: 66cc bnes 46b16 <pthread_create+0x1e>
schedparam = api->schedparam;
break;
case PTHREAD_EXPLICIT_SCHED:
schedpolicy = the_attr->schedpolicy;
schedparam = the_attr->schedparam;
46b4a: 47ee ffdc lea %fp@(-36),%a3
schedpolicy = api->schedpolicy;
schedparam = api->schedparam;
break;
case PTHREAD_EXPLICIT_SCHED:
schedpolicy = the_attr->schedpolicy;
46b4e: 282a 0014 movel %a2@(20),%d4
schedparam = the_attr->schedparam;
46b52: 26aa 0018 movel %a2@(24),%a3@ 46b56: 2d6a 001c ffe0 movel %a2@(28),%fp@(-32) 46b5c: 2d6a 0020 ffe4 movel %a2@(32),%fp@(-28) 46b62: 2d6a 0024 ffe8 movel %a2@(36),%fp@(-24) 46b68: 2d6a 0028 ffec movel %a2@(40),%fp@(-20) 46b6e: 2d6a 002c fff0 movel %a2@(44),%fp@(-16) 46b74: 2d6a 0030 fff4 movel %a2@(48),%fp@(-12)
/*
* Check the contentionscope since rtems only supports PROCESS wide
* contention (i.e. no system wide contention).
*/
if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS )
return ENOTSUP;
46b7a: 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 )
46b80: 4aaa 000c tstl %a2@(12)
46b84: 6692 bnes 46b18 <pthread_create+0x20>
return ENOTSUP;
/*
* Interpret the scheduling parameters.
*/
if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) )
46b86: 2f2e ffdc movel %fp@(-36),%sp@- 46b8a: 4eb9 0004 d68c jsr 4d68c <_POSIX_Priority_Is_valid> 46b90: 588f addql #4,%sp 46b92: 4a00 tstb %d0
46b94: 6780 beqs 46b16 <pthread_create+0x1e> <== NEVER TAKEN
core_priority = _POSIX_Priority_To_core( schedparam.sched_priority );
/*
* Set the core scheduling policy information.
*/
rc = _POSIX_Thread_Translate_sched_param(
46b96: 486e fffc pea %fp@(-4) 46b9a: 486e fff8 pea %fp@(-8)
* Interpret the scheduling parameters.
*/
if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) )
return EINVAL;
core_priority = _POSIX_Priority_To_core( schedparam.sched_priority );
46b9e: 286e ffdc moveal %fp@(-36),%a4
/*
* Set the core scheduling policy information.
*/
rc = _POSIX_Thread_Translate_sched_param(
46ba2: 2f0b movel %a3,%sp@-
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
46ba4: 1a39 0006 076a moveb 6076a <rtems_maximum_priority>,%d5 46baa: 2f04 movel %d4,%sp@- 46bac: 4eb9 0004 d6b0 jsr 4d6b0 <_POSIX_Thread_Translate_sched_param>
schedpolicy,
&schedparam,
&budget_algorithm,
&budget_callout
);
if ( rc )
46bb2: 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(
46bb6: 2400 movel %d0,%d2
schedpolicy,
&schedparam,
&budget_algorithm,
&budget_callout
);
if ( rc )
46bb8: 6600 ff5e bnew 46b18 <pthread_create+0x20>
#endif
/*
* Lock the allocator mutex for protection
*/
_RTEMS_Lock_allocator();
46bbc: 2f39 0006 21a8 movel 621a8 <_RTEMS_Allocator_Mutex>,%sp@- 46bc2: 4eb9 0004 86ac jsr 486ac <_API_Mutex_Lock>
* _POSIX_Threads_Allocate
*/
RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void )
{
return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information );
46bc8: 4879 0006 22a2 pea 622a2 <_POSIX_Threads_Information> 46bce: 4eb9 0004 915c jsr 4915c <_Objects_Allocate>
* Allocate the thread control block.
*
* NOTE: Global threads are not currently supported.
*/
the_thread = _POSIX_Threads_Allocate();
if ( !the_thread ) {
46bd4: 508f addql #8,%sp 46bd6: 2a40 moveal %d0,%a5 46bd8: 4a80 tstl %d0 46bda: 6700 013e beqw 46d1a <pthread_create+0x222>
/*
* Initialize the core thread for this task.
*/
name.name_p = NULL; /* posix threads don't have a name by default */
status = _Thread_Initialize(
46bde: 222a 0008 movel %a2@(8),%d1 46be2: 42a7 clrl %sp@-
static inline size_t _POSIX_Threads_Ensure_minimum_stack (
size_t size
)
{
if ( size >= PTHREAD_MINIMUM_STACK_SIZE )
46be4: 2039 0006 076c movel 6076c <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(
46bea: 42a7 clrl %sp@- 46bec: 2f2e fffc movel %fp@(-4),%sp@- 46bf0: 2f2e fff8 movel %fp@(-8),%sp@- 46bf4: 4878 0001 pea 1 <ADD> 46bf8: 0285 0000 00ff andil #255,%d5
static inline size_t _POSIX_Threads_Ensure_minimum_stack (
size_t size
)
{
if ( size >= PTHREAD_MINIMUM_STACK_SIZE )
46bfe: 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(
46c00: 9a8c subl %a4,%d5 46c02: 2f05 movel %d5,%sp@- 46c04: 4878 0001 pea 1 <ADD> 46c08: b280 cmpl %d0,%d1
46c0a: 6302 blss 46c0e <pthread_create+0x116>
46c0c: 2001 movel %d1,%d0 46c0e: 2f00 movel %d0,%sp@- 46c10: 2f2a 0004 movel %a2@(4),%sp@- 46c14: 2f0d movel %a5,%sp@- 46c16: 4879 0006 22a2 pea 622a2 <_POSIX_Threads_Information> 46c1c: 4eb9 0004 a434 jsr 4a434 <_Thread_Initialize>
budget_callout,
0, /* isr level */
name /* posix threads don't have a name */
);
if ( !status ) {
46c22: 4fef 002c lea %sp@(44),%sp 46c26: 4a00 tstb %d0
46c28: 667e bnes 46ca8 <pthread_create+0x1b0>
RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free (
Thread_Control *the_pthread
)
{
_Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object );
46c2a: 2f0d movel %a5,%sp@- 46c2c: 4879 0006 22a2 pea 622a2 <_POSIX_Threads_Information>
_POSIX_Threads_Free( the_thread );
_RTEMS_Unlock_allocator();
return EAGAIN;
46c32: 740b moveq #11,%d2 46c34: 4eb9 0004 94ac jsr 494ac <_Objects_Free>
name /* posix threads don't have a name */
);
if ( !status ) {
_POSIX_Threads_Free( the_thread );
_RTEMS_Unlock_allocator();
46c3a: 2f39 0006 21a8 movel 621a8 <_RTEMS_Allocator_Mutex>,%sp@- 46c40: 4eb9 0004 870c jsr 4870c <_API_Mutex_Unlock>
return EAGAIN;
46c46: 4fef 000c lea %sp@(12),%sp
*/
*thread = the_thread->Object.id;
_RTEMS_Unlock_allocator();
return 0;
}
46c4a: 2002 movel %d2,%d0 46c4c: 4cee 3c3c ffb8 moveml %fp@(-72),%d2-%d5/%a2-%a5 46c52: 4e5e unlk %fp 46c54: 4e75 rts
struct sched_param schedparam;
Objects_Name name;
int rc;
if ( !start_routine )
return EFAULT;
46c56: 740e moveq #14,%d2
*/
*thread = the_thread->Object.id;
_RTEMS_Unlock_allocator();
return 0;
}
46c58: 2002 movel %d2,%d0 46c5a: 4cee 3c3c ffb8 moveml %fp@(-72),%d2-%d5/%a2-%a5 46c60: 4e5e unlk %fp 46c62: 4e75 rts
int rc;
if ( !start_routine )
return EFAULT;
the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes;
46c64: 45f9 0005 f8a6 lea 5f8a6 <_POSIX_Threads_Default_attributes>,%a2
if ( !the_attr->is_initialized )
46c6a: 4a92 tstl %a2@ 46c6c: 6700 fea8 beqw 46b16 <pthread_create+0x1e> 46c70: 6000 feb2 braw 46b24 <pthread_create+0x2c>
* 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 ];
46c74: 2079 0006 256a moveal 6256a <_Per_CPU_Information+0xc>,%a0
schedpolicy = api->schedpolicy;
schedparam = api->schedparam;
46c7a: 47ee ffdc lea %fp@(-36),%a3
* 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 ];
46c7e: 2268 0102 moveal %a0@(258),%a1
schedpolicy = api->schedpolicy;
schedparam = api->schedparam;
46c82: 41e9 0088 lea %a1@(136),%a0 46c86: 2698 movel %a0@+,%a3@ 46c88: 2d58 ffe0 movel %a0@+,%fp@(-32) 46c8c: 2d58 ffe4 movel %a0@+,%fp@(-28) 46c90: 2d58 ffe8 movel %a0@+,%fp@(-24) 46c94: 2d58 ffec movel %a0@+,%fp@(-20) 46c98: 2d58 fff0 movel %a0@+,%fp@(-16) 46c9c: 2d50 fff4 movel %a0@,%fp@(-12)
* attributes structure.
*/
switch ( the_attr->inheritsched ) {
case PTHREAD_INHERIT_SCHED:
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
schedpolicy = api->schedpolicy;
46ca0: 2829 0084 movel %a1@(132),%d4
schedparam = api->schedparam;
break;
46ca4: 6000 fed4 braw 46b7a <pthread_create+0x82>
}
/*
* finish initializing the per API structure
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
46ca8: 286d 0102 moveal %a5@(258),%a4
api->Attributes = *the_attr;
46cac: 4878 0040 pea 40 <DBL_MANT_DIG+0xb> 46cb0: 41f9 0005 0574 lea 50574 <memcpy>,%a0 46cb6: 2f0a movel %a2,%sp@- 46cb8: 2d48 ffd8 movel %a0,%fp@(-40) 46cbc: 2f0c movel %a4,%sp@- 46cbe: 4e90 jsr %a0@
api->detachstate = the_attr->detachstate;
46cc0: 296a 003c 0040 movel %a2@(60),%a4@(64)
api->schedpolicy = schedpolicy;
46cc6: 2944 0084 movel %d4,%a4@(132)
api->schedparam = schedparam;
46cca: 4878 001c pea 1c <OPER2+0x8> 46cce: 206e ffd8 moveal %fp@(-40),%a0 46cd2: 2f0b movel %a3,%sp@- 46cd4: 486c 0088 pea %a4@(136) 46cd8: 4e90 jsr %a0@
/*
* POSIX threads are allocated and started in one operation.
*/
status = _Thread_Start(
46cda: 42a7 clrl %sp@- 46cdc: 2f2e 0014 movel %fp@(20),%sp@- 46ce0: 2f03 movel %d3,%sp@- 46ce2: 4878 0001 pea 1 <ADD> 46ce6: 2f0d movel %a5,%sp@- 46ce8: 4eb9 0004 adb8 jsr 4adb8 <_Thread_Start>
_RTEMS_Unlock_allocator();
return EINVAL;
}
#endif
if ( schedpolicy == SCHED_SPORADIC ) {
46cee: 4fef 002c lea %sp@(44),%sp 46cf2: 7004 moveq #4,%d0 46cf4: b084 cmpl %d4,%d0
46cf6: 6740 beqs 46d38 <pthread_create+0x240>
}
/*
* Return the id and indicate we successfully created the thread
*/
*thread = the_thread->Object.id;
46cf8: 206e 0008 moveal %fp@(8),%a0 46cfc: 20ad 0008 movel %a5@(8),%a0@
_RTEMS_Unlock_allocator();
46d00: 2f39 0006 21a8 movel 621a8 <_RTEMS_Allocator_Mutex>,%sp@- 46d06: 4eb9 0004 870c jsr 4870c <_API_Mutex_Unlock>
return 0;
46d0c: 588f addql #4,%sp
}
46d0e: 2002 movel %d2,%d0 46d10: 4cee 3c3c ffb8 moveml %fp@(-72),%d2-%d5/%a2-%a5 46d16: 4e5e unlk %fp 46d18: 4e75 rts
*
* NOTE: Global threads are not currently supported.
*/
the_thread = _POSIX_Threads_Allocate();
if ( !the_thread ) {
_RTEMS_Unlock_allocator();
46d1a: 2f39 0006 21a8 movel 621a8 <_RTEMS_Allocator_Mutex>,%sp@-
return EAGAIN;
46d20: 143c 000b moveb #11,%d2
*
* NOTE: Global threads are not currently supported.
*/
the_thread = _POSIX_Threads_Allocate();
if ( !the_thread ) {
_RTEMS_Unlock_allocator();
46d24: 4eb9 0004 870c jsr 4870c <_API_Mutex_Unlock>
return EAGAIN;
46d2a: 588f addql #4,%sp
*/
*thread = the_thread->Object.id;
_RTEMS_Unlock_allocator();
return 0;
}
46d2c: 2002 movel %d2,%d0 46d2e: 4cee 3c3c ffb8 moveml %fp@(-72),%d2-%d5/%a2-%a5 46d34: 4e5e unlk %fp 46d36: 4e75 rts
return EINVAL;
}
#endif
if ( schedpolicy == SCHED_SPORADIC ) {
_Watchdog_Insert_ticks(
46d38: 486c 0090 pea %a4@(144) 46d3c: 4eb9 0004 aeec jsr 4aeec <_Timespec_To_ticks>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
46d42: 2940 00b4 movel %d0,%a4@(180)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
46d46: 486c 00a8 pea %a4@(168) 46d4a: 4879 0006 21c0 pea 621c0 <_Watchdog_Ticks_chain> 46d50: 4eb9 0004 b244 jsr 4b244 <_Watchdog_Insert>
}
/*
* Return the id and indicate we successfully created the thread
*/
*thread = the_thread->Object.id;
46d56: 206e 0008 moveal %fp@(8),%a0 46d5a: 4fef 000c lea %sp@(12),%sp 46d5e: 20ad 0008 movel %a5@(8),%a0@
_RTEMS_Unlock_allocator();
46d62: 2f39 0006 21a8 movel 621a8 <_RTEMS_Allocator_Mutex>,%sp@- 46d68: 4eb9 0004 870c jsr 4870c <_API_Mutex_Unlock>
return 0;
46d6e: 588f addql #4,%sp 46d70: 609c bras 46d0e <pthread_create+0x216>
...
0004eb26 <pthread_exit>:
}
void pthread_exit(
void *value_ptr
)
{
4eb26: 4e56 0000 linkw %fp,#0
_POSIX_Thread_Exit( _Thread_Executing, value_ptr );
4eb2a: 2f2e 0008 movel %fp@(8),%sp@- 4eb2e: 2f39 0006 14aa movel 614aa <_Per_CPU_Information+0xc>,%sp@- 4eb34: 4eb9 0004 e9d0 jsr 4e9d0 <_POSIX_Thread_Exit>
4eb3a: 508f addql #8,%sp <== NOT EXECUTED
}
4eb3c: 4e5e unlk %fp <== NOT EXECUTED
0004677c <pthread_key_create>:
int pthread_key_create(
pthread_key_t *key,
void (*destructor)( void * )
)
{
4677c: 4e56 ffe8 linkw %fp,#-24
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
46780: 2039 0006 2be8 movel 62be8 <_Thread_Dispatch_disable_level>,%d0 46786: 5280 addql #1,%d0 46788: 23c0 0006 2be8 movel %d0,62be8 <_Thread_Dispatch_disable_level>
return _Thread_Dispatch_disable_level;
4678e: 2039 0006 2be8 movel 62be8 <_Thread_Dispatch_disable_level>,%d0 46794: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@
* the inactive chain of free keys control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void )
{
return (POSIX_Keys_Control *) _Objects_Allocate( &_POSIX_Keys_Information );
46798: 4879 0006 2f30 pea 62f30 <_POSIX_Keys_Information> 4679e: 4eb9 0004 8db0 jsr 48db0 <_Objects_Allocate>
_Thread_Disable_dispatch();
the_key = _POSIX_Keys_Allocate();
if ( !the_key ) {
467a4: 588f addql #4,%sp 467a6: 2840 moveal %d0,%a4 467a8: 4a80 tstl %d0
467aa: 677e beqs 4682a <pthread_key_create+0xae> <== NEVER TAKEN
_Thread_Enable_dispatch();
return EAGAIN;
}
the_key->destructor = destructor;
467ac: 45f9 0006 2ba8 lea 62ba8 <_Objects_Information_table+0x4>,%a2
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,
467b2: 47ec 0018 lea %a4@(24),%a3 467b6: 4bf9 0004 b1ba lea 4b1ba <_Workspace_Allocate>,%a5 467bc: 296e 000c 0010 movel %fp@(12),%a4@(16)
_Thread_Enable_dispatch();
return ENOMEM;
}
the_key->Values[ the_api ] = table;
memset( table, '\0', bytes_to_allocate );
467c2: 263c 0005 0410 movel #328720,%d3
* APIs are optional.
*
* NOTE: Currently RTEMS Classic API tasks are always enabled.
*/
for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) {
the_key->Values[ the_api ] = NULL;
467c8: 4293 clrl %a3@
INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY
);
#endif
bytes_to_allocate = sizeof( void * ) *
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
467ca: 205a moveal %a2@+,%a0 467cc: 4282 clrl %d2 467ce: 2068 0004 moveal %a0@(4),%a0 467d2: 3428 000e movew %a0@(14),%d2 467d6: 5282 addql #1,%d2
true,
INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY
);
#endif
bytes_to_allocate = sizeof( void * ) *
467d8: e58a lsll #2,%d2
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
table = _Workspace_Allocate( bytes_to_allocate );
467da: 2f02 movel %d2,%sp@- 467dc: 4e95 jsr %a5@
if ( !table ) {
467de: 588f addql #4,%sp 467e0: 4a80 tstl %d0
467e2: 6758 beqs 4683c <pthread_key_create+0xc0>
_POSIX_Keys_Free( the_key );
_Thread_Enable_dispatch();
return ENOMEM;
}
the_key->Values[ the_api ] = table;
467e4: 26c0 movel %d0,%a3@+
memset( table, '\0', bytes_to_allocate );
467e6: 2043 moveal %d3,%a0 467e8: 2f02 movel %d2,%sp@- 467ea: 42a7 clrl %sp@- 467ec: 2f00 movel %d0,%sp@- 467ee: 4e90 jsr %a0@
* This is a bit more complex than one might initially expect because
* APIs are optional.
*
* NOTE: Currently RTEMS Classic API tasks are always enabled.
*/
for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) {
467f0: 4fef 000c lea %sp@(12),%sp 467f4: b5fc 0006 2bb4 cmpal #404404,%a2
467fa: 66cc bnes 467c8 <pthread_key_create+0x4c>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
467fc: 202c 0008 movel %a4@(8),%d0
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
46800: 4281 clrl %d1 46802: 2079 0006 2f48 moveal 62f48 <_POSIX_Keys_Information+0x18>,%a0 46808: 3200 movew %d0,%d1 4680a: 218c 1c00 movel %a4,%a0@(00000000,%d1:l:4)
the_key->Values[ the_api ] = table;
memset( table, '\0', bytes_to_allocate );
}
_Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 );
*key = the_key->Object.id;
4680e: 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;
46812: 42ac 000c clrl %a4@(12) 46816: 2080 movel %d0,%a0@
_Thread_Enable_dispatch();
46818: 4eb9 0004 9fbc jsr 49fbc <_Thread_Enable_dispatch>
return 0; }
4681e: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5
}
_Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 );
*key = the_key->Object.id;
_Thread_Enable_dispatch();
return 0;
46824: 4280 clrl %d0
}
46826: 4e5e unlk %fp 46828: 4e75 rts
_Thread_Disable_dispatch();
the_key = _POSIX_Keys_Allocate();
if ( !the_key ) {
_Thread_Enable_dispatch();
4682a: 4eb9 0004 9fbc jsr 49fbc <_Thread_Enable_dispatch>
return EAGAIN;
46830: 700b moveq #11,%d0
_Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 );
*key = the_key->Object.id;
_Thread_Enable_dispatch();
return 0;
}
46832: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 46838: 4e5e unlk %fp 4683a: 4e75 rts
bytes_to_allocate = sizeof( void * ) *
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
table = _Workspace_Allocate( bytes_to_allocate );
if ( !table ) {
_POSIX_Keys_Free_memory( the_key );
4683c: 2f0c movel %a4,%sp@- 4683e: 4eb9 0004 68d0 jsr 468d0 <_POSIX_Keys_Free_memory>
*/
RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free (
POSIX_Keys_Control *the_key
)
{
_Objects_Free( &_POSIX_Keys_Information, &the_key->Object );
46844: 2f0c movel %a4,%sp@- 46846: 4879 0006 2f30 pea 62f30 <_POSIX_Keys_Information> 4684c: 4eb9 0004 9100 jsr 49100 <_Objects_Free>
_POSIX_Keys_Free( the_key );
_Thread_Enable_dispatch();
46852: 4eb9 0004 9fbc jsr 49fbc <_Thread_Enable_dispatch>
return ENOMEM;
46858: 4fef 000c lea %sp@(12),%sp 4685c: 700c moveq #12,%d0
_Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 );
*key = the_key->Object.id;
_Thread_Enable_dispatch();
return 0;
}
4685e: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5
46864: 4e5e unlk %fp <== NOT EXECUTED
0005d3fc <pthread_kill>:
int pthread_kill(
pthread_t thread,
int sig
)
{
5d3fc: 4e56 fff0 linkw %fp,#-16 5d400: 48d7 040c moveml %d2-%d3/%a2,%sp@ 5d404: 242e 000c movel %fp@(12),%d2
POSIX_API_Control *api;
Thread_Control *the_thread;
Objects_Locations location;
if ( !sig )
5d408: 6700 0090 beqw 5d49a <pthread_kill+0x9e>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
5d40c: 2602 movel %d2,%d3 5d40e: 5383 subql #1,%d3
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
5d410: 701f moveq #31,%d0 5d412: b083 cmpl %d3,%d0 5d414: 6500 0084 bcsw 5d49a <pthread_kill+0x9e>
rtems_set_errno_and_return_minus_one( EINVAL );
the_thread = _Thread_Get( thread, &location );
5d418: 486e fffc pea %fp@(-4) 5d41c: 2f2e 0008 movel %fp@(8),%sp@- 5d420: 4eb9 0004 9240 jsr 49240 <_Thread_Get>
switch ( location ) {
5d426: 508f addql #8,%sp
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
rtems_set_errno_and_return_minus_one( EINVAL );
the_thread = _Thread_Get( thread, &location );
5d428: 2440 moveal %d0,%a2
switch ( location ) {
5d42a: 4aae fffc tstl %fp@(-4) 5d42e: 6600 0082 bnew 5d4b2 <pthread_kill+0xb6>
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( sig ) {
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
5d432: 2202 movel %d2,%d1 5d434: 2002 movel %d2,%d0 5d436: e589 lsll #2,%d1 5d438: e988 lsll #4,%d0
case OBJECTS_LOCAL:
/*
* If sig == 0 then just validate arguments
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
5d43a: 206a 0102 moveal %a2@(258),%a0
if ( sig ) {
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
5d43e: 9081 subl %d1,%d0 5d440: 0680 0006 14ec addil #398572,%d0 5d446: 7201 moveq #1,%d1 5d448: 2240 moveal %d0,%a1 5d44a: b291 cmpl %a1@,%d1
5d44c: 6728 beqs 5d476 <pthread_kill+0x7a>
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
5d44e: 7001 moveq #1,%d0 5d450: e7a8 lsll %d3,%d0
return 0;
}
/* XXX critical section */
api->signals_pending |= signo_to_mask( sig );
5d452: 81a8 00d4 orl %d0,%a0@(212)
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
5d456: 42a7 clrl %sp@- 5d458: 2f02 movel %d2,%sp@- 5d45a: 2f0a movel %a2,%sp@- 5d45c: 4eb9 0005 d2c0 jsr 5d2c0 <_POSIX_signals_Unblock_thread>
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
5d462: 4fef 000c lea %sp@(12),%sp 5d466: 4ab9 0006 14a6 tstl 614a6 <_Per_CPU_Information+0x8>
5d46c: 6708 beqs 5d476 <pthread_kill+0x7a>
5d46e: b5f9 0006 14aa cmpal 614aa <_Per_CPU_Information+0xc>,%a2
5d474: 6712 beqs 5d488 <pthread_kill+0x8c>
_Thread_Dispatch_necessary = true;
}
_Thread_Enable_dispatch();
5d476: 4eb9 0004 9218 jsr 49218 <_Thread_Enable_dispatch>
return 0;
5d47c: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( ESRCH );
}
5d47e: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2 5d484: 4e5e unlk %fp 5d486: 4e75 rts
api->signals_pending |= signo_to_mask( sig );
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
5d488: 7001 moveq #1,%d0 5d48a: 13c0 0006 14b6 moveb %d0,614b6 <_Per_CPU_Information+0x18>
}
_Thread_Enable_dispatch();
5d490: 4eb9 0004 9218 jsr 49218 <_Thread_Enable_dispatch>
return 0;
5d496: 4280 clrl %d0 5d498: 60e4 bras 5d47e <pthread_kill+0x82>
if ( !sig )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
rtems_set_errno_and_return_minus_one( EINVAL );
5d49a: 4eb9 0004 f098 jsr 4f098 <__errno> 5d4a0: 7416 moveq #22,%d2 5d4a2: 2040 moveal %d0,%a0 5d4a4: 70ff moveq #-1,%d0 5d4a6: 2082 movel %d2,%a0@
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( ESRCH );
}
5d4a8: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2 5d4ae: 4e5e unlk %fp 5d4b0: 4e75 rts
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( ESRCH );
5d4b2: 4eb9 0004 f098 jsr 4f098 <__errno> <== NOT EXECUTED 5d4b8: 7203 moveq #3,%d1 <== NOT EXECUTED 5d4ba: 2040 moveal %d0,%a0 <== NOT EXECUTED 5d4bc: 70ff moveq #-1,%d0 <== NOT EXECUTED
}
5d4be: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2 <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( ESRCH );
5d4c4: 2081 movel %d1,%a0@ <== NOT EXECUTED
}
5d4c6: 4e5e unlk %fp <== NOT EXECUTED
...
000487d0 <pthread_mutex_init>:
int pthread_mutex_init(
pthread_mutex_t *mutex,
const pthread_mutexattr_t *attr
)
{
487d0: 4e56 fff0 linkw %fp,#-16 487d4: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 487d8: 266e 0008 moveal %fp@(8),%a3 487dc: 246e 000c moveal %fp@(12),%a2
POSIX_Mutex_Control *the_mutex;
CORE_mutex_Attributes *the_mutex_attr;
const pthread_mutexattr_t *the_attr;
CORE_mutex_Disciplines the_discipline;
if ( attr ) the_attr = attr;
487e0: 4a8a tstl %a2 487e2: 6700 00f0 beqw 488d4 <pthread_mutex_init+0x104>
else the_attr = &_POSIX_Mutex_Default_attributes;
/* Check for NULL mutex */
if ( !mutex )
487e6: 4a8b tstl %a3
487e8: 6704 beqs 487ee <pthread_mutex_init+0x1e>
}
}
}
#endif
if ( !the_attr->is_initialized )
487ea: 4a92 tstl %a2@
487ec: 660c bnes 487fa <pthread_mutex_init+0x2a>
case PTHREAD_MUTEX_ERRORCHECK:
case PTHREAD_MUTEX_DEFAULT:
break;
default:
return EINVAL;
487ee: 7016 moveq #22,%d0
*mutex = the_mutex->Object.id;
_Thread_Enable_dispatch();
return 0;
}
487f0: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 487f6: 4e5e unlk %fp 487f8: 4e75 rts
return EINVAL;
/*
* We only support process private mutexes.
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
487fa: 202a 0004 movel %a2@(4),%d0 487fe: 7201 moveq #1,%d1 48800: b280 cmpl %d0,%d1 48802: 6700 00da beqw 488de <pthread_mutex_init+0x10e>
return ENOSYS;
if ( the_attr->process_shared != PTHREAD_PROCESS_PRIVATE )
48806: 4a80 tstl %d0
48808: 66e4 bnes 487ee <pthread_mutex_init+0x1e> <== NEVER TAKEN
return EINVAL;
/*
* Determine the discipline of the mutex
*/
switch ( the_attr->protocol ) {
4880a: 202a 000c movel %a2@(12),%d0 4880e: b280 cmpl %d0,%d1 48810: 6700 00de beqw 488f0 <pthread_mutex_init+0x120> 48814: 123c 0002 moveb #2,%d1 48818: b280 cmpl %d0,%d1 4881a: 6700 00ce beqw 488ea <pthread_mutex_init+0x11a> 4881e: 4a80 tstl %d0
48820: 66cc bnes 487ee <pthread_mutex_init+0x1e> <== NEVER TAKEN
case PTHREAD_PRIO_NONE:
the_discipline = CORE_MUTEX_DISCIPLINES_FIFO;
48822: 4282 clrl %d2
}
/*
* Validate the priority ceiling field -- should always be valid.
*/
if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) )
48824: 2f2a 0008 movel %a2@(8),%sp@- 48828: 4eb9 0004 8bc8 jsr 48bc8 <_POSIX_Priority_Is_valid> 4882e: 588f addql #4,%sp 48830: 4a00 tstb %d0
48832: 67ba beqs 487ee <pthread_mutex_init+0x1e> <== NEVER TAKEN
#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
/*
* Validate the mutex type and set appropriate SuperCore mutex
* attributes.
*/
switch ( the_attr->type ) {
48834: 7003 moveq #3,%d0 48836: b0aa 0010 cmpl %a2@(16),%d0
4883a: 65b2 bcss 487ee <pthread_mutex_init+0x1e> <== NEVER TAKEN
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
4883c: 2039 0006 5f48 movel 65f48 <_Thread_Dispatch_disable_level>,%d0 48842: 5280 addql #1,%d0 48844: 23c0 0006 5f48 movel %d0,65f48 <_Thread_Dispatch_disable_level>
return _Thread_Dispatch_disable_level;
4884a: 2039 0006 5f48 movel 65f48 <_Thread_Dispatch_disable_level>,%d0
* _POSIX_Mutex_Allocate
*/
RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void )
{
return (POSIX_Mutex_Control *) _Objects_Allocate( &_POSIX_Mutex_Information );
48850: 4879 0006 6204 pea 66204 <_POSIX_Mutex_Information> 48856: 4eb9 0004 b19c jsr 4b19c <_Objects_Allocate>
*/
_Thread_Disable_dispatch();
the_mutex = _POSIX_Mutex_Allocate();
if ( !the_mutex ) {
4885c: 588f addql #4,%sp 4885e: 2840 moveal %d0,%a4 48860: 4a80 tstl %d0 48862: 6700 0092 beqw 488f6 <pthread_mutex_init+0x126>
the_mutex->process_shared = the_attr->process_shared;
the_mutex_attr = &the_mutex->Mutex.Attributes;
if ( the_attr->recursive )
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
48866: 4aaa 0014 tstl %a2@(20) 4886a: 57c0 seq %d0
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
4886c: 4281 clrl %d1 4886e: 1239 0006 454a moveb 6454a <rtems_maximum_priority>,%d1 48874: 49c0 extbl %d0 48876: 92aa 0008 subl %a2@(8),%d1 4887a: 4480 negl %d0
if ( !the_mutex ) {
_Thread_Enable_dispatch();
return EAGAIN;
}
the_mutex->process_shared = the_attr->process_shared;
4887c: 296a 0004 0010 movel %a2@(4),%a4@(16) 48882: 2941 005e movel %d1,%a4@(94)
if ( the_attr->recursive )
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
else
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR;
the_mutex_attr->only_owner_release = true;
48886: 7201 moveq #1,%d1
the_mutex->process_shared = the_attr->process_shared;
the_mutex_attr = &the_mutex->Mutex.Attributes;
if ( the_attr->recursive )
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
48888: 2940 0054 movel %d0,%a4@(84)
else
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR;
the_mutex_attr->only_owner_release = true;
4888c: 1941 0058 moveb %d1,%a4@(88)
the_mutex_attr->priority_ceiling =
_POSIX_Priority_To_core( the_attr->prio_ceiling );
the_mutex_attr->discipline = the_discipline;
48890: 2942 005a movel %d2,%a4@(90)
/*
* Must be initialized to unlocked.
*/
_CORE_mutex_Initialize(
48894: 4878 0001 pea 1 <ADD> 48898: 486c 0054 pea %a4@(84) 4889c: 486c 0014 pea %a4@(20) 488a0: 4eb9 0004 a790 jsr 4a790 <_CORE_mutex_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
488a6: 202c 0008 movel %a4@(8),%d0
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
488aa: 4281 clrl %d1 488ac: 2079 0006 621c moveal 6621c <_POSIX_Mutex_Information+0x18>,%a0 488b2: 3200 movew %d0,%d1 488b4: 218c 1c00 movel %a4,%a0@(00000000,%d1:l:4)
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
488b8: 42ac 000c clrl %a4@(12)
CORE_MUTEX_UNLOCKED
);
_Objects_Open_u32( &_POSIX_Mutex_Information, &the_mutex->Object, 0 );
*mutex = the_mutex->Object.id;
488bc: 2680 movel %d0,%a3@
_Thread_Enable_dispatch();
488be: 4eb9 0004 c3a8 jsr 4c3a8 <_Thread_Enable_dispatch>
return 0;
488c4: 4fef 000c lea %sp@(12),%sp 488c8: 4280 clrl %d0
}
488ca: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 488d0: 4e5e unlk %fp 488d2: 4e75 rts
CORE_mutex_Attributes *the_mutex_attr;
const pthread_mutexattr_t *the_attr;
CORE_mutex_Disciplines the_discipline;
if ( attr ) the_attr = attr;
else the_attr = &_POSIX_Mutex_Default_attributes;
488d4: 45f9 0006 6278 lea 66278 <_POSIX_Mutex_Default_attributes>,%a2 488da: 6000 ff0a braw 487e6 <pthread_mutex_init+0x16>
/*
* We only support process private mutexes.
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
return ENOSYS;
488de: 7058 moveq #88,%d0
*mutex = the_mutex->Object.id;
_Thread_Enable_dispatch();
return 0;
}
488e0: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 488e6: 4e5e unlk %fp 488e8: 4e75 rts
break;
case PTHREAD_PRIO_INHERIT:
the_discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
break;
case PTHREAD_PRIO_PROTECT:
the_discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
488ea: 7403 moveq #3,%d2
break;
488ec: 6000 ff36 braw 48824 <pthread_mutex_init+0x54>
switch ( the_attr->protocol ) {
case PTHREAD_PRIO_NONE:
the_discipline = CORE_MUTEX_DISCIPLINES_FIFO;
break;
case PTHREAD_PRIO_INHERIT:
the_discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
488f0: 7402 moveq #2,%d2 488f2: 6000 ff30 braw 48824 <pthread_mutex_init+0x54>
_Thread_Disable_dispatch();
the_mutex = _POSIX_Mutex_Allocate();
if ( !the_mutex ) {
_Thread_Enable_dispatch();
488f6: 4eb9 0004 c3a8 jsr 4c3a8 <_Thread_Enable_dispatch>
return EAGAIN;
488fc: 700b moveq #11,%d0
*mutex = the_mutex->Object.id;
_Thread_Enable_dispatch();
return 0;
}
488fe: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4
48904: 4e5e unlk %fp <== NOT EXECUTED
00048a24 <pthread_mutex_timedlock>:
int pthread_mutex_timedlock(
pthread_mutex_t *mutex,
const struct timespec *abstime
)
{
48a24: 4e56 fffc linkw %fp,#-4 48a28: 2f03 movel %d3,%sp@- 48a2a: 262e 0008 movel %fp@(8),%d3 48a2e: 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 );
48a30: 486e fffc pea %fp@(-4) 48a34: 2f2e 000c movel %fp@(12),%sp@- 48a38: 4eb9 0004 8b38 jsr 48b38 <_POSIX_Absolute_timeout_to_ticks>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
48a3e: 508f addql #8,%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 );
48a40: 2400 movel %d0,%d2
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
48a42: 7003 moveq #3,%d0 48a44: b082 cmpl %d2,%d0
48a46: 6724 beqs 48a6c <pthread_mutex_timedlock+0x48>
do_wait = false;
lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks );
48a48: 2f2e fffc movel %fp@(-4),%sp@- 48a4c: 42a7 clrl %sp@- 48a4e: 2f03 movel %d3,%sp@- 48a50: 4eb9 0004 8920 jsr 48920 <_POSIX_Mutex_Lock_support>
* This service only gives us the option to block. We used a polling
* attempt to lock if the abstime was not in the future. If we did
* not obtain the mutex, then not look at the status immediately,
* make sure the right reason is returned.
*/
if ( !do_wait && (lock_status == EBUSY) ) {
48a56: 4fef 000c lea %sp@(12),%sp 48a5a: 7210 moveq #16,%d1 48a5c: b280 cmpl %d0,%d1
48a5e: 672c beqs 48a8c <pthread_mutex_timedlock+0x68>
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
return lock_status;
}
48a60: 242e fff4 movel %fp@(-12),%d2 48a64: 262e fff8 movel %fp@(-8),%d3 48a68: 4e5e unlk %fp 48a6a: 4e75 rts
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks );
48a6c: 2f2e fffc movel %fp@(-4),%sp@- 48a70: 4878 0001 pea 1 <ADD> 48a74: 2f03 movel %d3,%sp@- 48a76: 4eb9 0004 8920 jsr 48920 <_POSIX_Mutex_Lock_support>
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
return lock_status;
}
48a7c: 242e fff4 movel %fp@(-12),%d2
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks );
48a80: 4fef 000c lea %sp@(12),%sp
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
return lock_status;
}
48a84: 262e fff8 movel %fp@(-8),%d3 48a88: 4e5e unlk %fp 48a8a: 4e75 rts
* attempt to lock if the abstime was not in the future. If we did
* not obtain the mutex, then not look at the status immediately,
* make sure the right reason is returned.
*/
if ( !do_wait && (lock_status == EBUSY) ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
48a8c: 4a82 tstl %d2
48a8e: 660e bnes 48a9e <pthread_mutex_timedlock+0x7a> <== ALWAYS TAKEN
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
return lock_status;
}
48a90: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED
* not obtain the mutex, then not look at the status immediately,
* make sure the right reason is returned.
*/
if ( !do_wait && (lock_status == EBUSY) ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
return EINVAL;
48a94: 7016 moveq #22,%d0 <== NOT EXECUTED
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
return lock_status;
}
48a96: 262e fff8 movel %fp@(-8),%d3 <== NOT EXECUTED 48a9a: 4e5e unlk %fp <== NOT EXECUTED 48a9c: 4e75 rts <== NOT EXECUTED
* make sure the right reason is returned.
*/
if ( !do_wait && (lock_status == EBUSY) ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
48a9e: 5382 subql #1,%d2 48aa0: 7201 moveq #1,%d1 48aa2: b282 cmpl %d2,%d1
48aa4: 65ba bcss 48a60 <pthread_mutex_timedlock+0x3c> <== NEVER TAKEN
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
return lock_status;
}
48aa6: 242e fff4 movel %fp@(-12),%d2
if ( !do_wait && (lock_status == EBUSY) ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
48aaa: 7074 moveq #116,%d0
}
return lock_status;
}
48aac: 262e fff8 movel %fp@(-8),%d3
48ab0: 4e5e unlk %fp <== NOT EXECUTED
00046428 <pthread_mutexattr_gettype>:
#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
int pthread_mutexattr_gettype(
const pthread_mutexattr_t *attr,
int *type
)
{
46428: 4e56 0000 linkw %fp,#0 4642c: 206e 0008 moveal %fp@(8),%a0 46430: 226e 000c moveal %fp@(12),%a1
if ( !attr )
46434: 4a88 tstl %a0
46436: 6704 beqs 4643c <pthread_mutexattr_gettype+0x14>
return EINVAL;
if ( !attr->is_initialized )
46438: 4a90 tstl %a0@
4643a: 6606 bnes 46442 <pthread_mutexattr_gettype+0x1a>
return EINVAL;
if ( !type )
return EINVAL;
4643c: 7016 moveq #22,%d0
*type = attr->type;
return 0;
}
4643e: 4e5e unlk %fp 46440: 4e75 rts
return EINVAL;
if ( !attr->is_initialized )
return EINVAL;
if ( !type )
46442: 4a89 tstl %a1
46444: 67f6 beqs 4643c <pthread_mutexattr_gettype+0x14> <== NEVER TAKEN
return EINVAL;
*type = attr->type;
46446: 22a8 0010 movel %a0@(16),%a1@
return 0;
4644a: 4280 clrl %d0
}
4644c: 4e5e unlk %fp <== NOT EXECUTED
000485e0 <pthread_mutexattr_setpshared>:
int pthread_mutexattr_setpshared(
pthread_mutexattr_t *attr,
int pshared
)
{
485e0: 4e56 0000 linkw %fp,#0 485e4: 206e 0008 moveal %fp@(8),%a0
if ( !attr || !attr->is_initialized )
485e8: 4a88 tstl %a0
485ea: 6704 beqs 485f0 <pthread_mutexattr_setpshared+0x10>
485ec: 4a90 tstl %a0@
485ee: 6606 bnes 485f6 <pthread_mutexattr_setpshared+0x16>
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
return 0;
default:
return EINVAL;
485f0: 7016 moveq #22,%d0
} }
485f2: 4e5e unlk %fp 485f4: 4e75 rts
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( pshared ) {
485f6: 7001 moveq #1,%d0 485f8: b0ae 000c cmpl %fp@(12),%d0
485fc: 65f2 bcss 485f0 <pthread_mutexattr_setpshared+0x10><== NEVER TAKEN
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
485fe: 202e 000c movel %fp@(12),%d0
return 0;
default:
return EINVAL;
}
}
48602: 4e5e unlk %fp
return EINVAL;
switch ( pshared ) {
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
48604: 2140 0004 movel %d0,%a0@(4)
return 0;
48608: 4280 clrl %d0 <== NOT EXECUTED
default:
return EINVAL;
}
}
0004648c <pthread_mutexattr_settype>:
#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
int pthread_mutexattr_settype(
pthread_mutexattr_t *attr,
int type
)
{
4648c: 4e56 0000 linkw %fp,#0 46490: 206e 0008 moveal %fp@(8),%a0
if ( !attr || !attr->is_initialized )
46494: 4a88 tstl %a0
46496: 6704 beqs 4649c <pthread_mutexattr_settype+0x10>
46498: 4a90 tstl %a0@
4649a: 6606 bnes 464a2 <pthread_mutexattr_settype+0x16> <== ALWAYS TAKEN
case PTHREAD_MUTEX_DEFAULT:
attr->type = type;
return 0;
default:
return EINVAL;
4649c: 7016 moveq #22,%d0
} }
4649e: 4e5e unlk %fp 464a0: 4e75 rts
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( type ) {
464a2: 7003 moveq #3,%d0 464a4: b0ae 000c cmpl %fp@(12),%d0
464a8: 65f2 bcss 4649c <pthread_mutexattr_settype+0x10>
case PTHREAD_MUTEX_NORMAL:
case PTHREAD_MUTEX_RECURSIVE:
case PTHREAD_MUTEX_ERRORCHECK:
case PTHREAD_MUTEX_DEFAULT:
attr->type = type;
464aa: 202e 000c movel %fp@(12),%d0
return 0;
default:
return EINVAL;
}
}
464ae: 4e5e unlk %fp
switch ( type ) {
case PTHREAD_MUTEX_NORMAL:
case PTHREAD_MUTEX_RECURSIVE:
case PTHREAD_MUTEX_ERRORCHECK:
case PTHREAD_MUTEX_DEFAULT:
attr->type = type;
464b0: 2140 0010 movel %d0,%a0@(16)
return 0;
464b4: 4280 clrl %d0 <== NOT EXECUTED
default:
return EINVAL;
}
}
00047304 <pthread_once>:
int pthread_once(
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
47304: 4e56 ffec linkw %fp,#-20 47308: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 4730c: 246e 0008 moveal %fp@(8),%a2 47310: 266e 000c moveal %fp@(12),%a3
if ( !once_control || !init_routine )
47314: 4a8a tstl %a2
47316: 6752 beqs 4736a <pthread_once+0x66>
47318: 4a8b tstl %a3
4731a: 674e beqs 4736a <pthread_once+0x66>
return EINVAL;
if ( !once_control->init_executed ) {
4731c: 4aaa 0004 tstl %a2@(4)
47320: 670c beqs 4732e <pthread_once+0x2a>
once_control->init_executed = true;
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
}
return 0;
47322: 4280 clrl %d0
}
47324: 4cee 1c04 ffec moveml %fp@(-20),%d2/%a2-%a4 4732a: 4e5e unlk %fp 4732c: 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);
4732e: 240e movel %fp,%d2 47330: 5982 subql #4,%d2 47332: 49f9 0004 7fd8 lea 47fd8 <rtems_task_mode>,%a4 47338: 2f02 movel %d2,%sp@- 4733a: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> 4733e: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> 47342: 4e94 jsr %a4@
if ( !once_control->init_executed ) {
47344: 4fef 000c lea %sp@(12),%sp 47348: 4aaa 0004 tstl %a2@(4)
4734c: 6728 beqs 47376 <pthread_once+0x72> <== ALWAYS TAKEN
once_control->is_initialized = true;
once_control->init_executed = true;
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
4734e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 47350: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> <== NOT EXECUTED 47354: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 47358: 4e94 jsr %a4@ <== NOT EXECUTED 4735a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
} return 0;
4735e: 4280 clrl %d0 <== NOT EXECUTED
}
47360: 4cee 1c04 ffec moveml %fp@(-20),%d2/%a2-%a4 47366: 4e5e unlk %fp 47368: 4e75 rts
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
if ( !once_control || !init_routine )
return EINVAL;
4736a: 7016 moveq #22,%d0
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
}
return 0;
}
4736c: 4cee 1c04 ffec moveml %fp@(-20),%d2/%a2-%a4 47372: 4e5e unlk %fp 47374: 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;
47376: 7001 moveq #1,%d0 47378: 2480 movel %d0,%a2@
once_control->init_executed = true;
4737a: 7001 moveq #1,%d0 4737c: 2540 0004 movel %d0,%a2@(4)
(*init_routine)();
47380: 4e93 jsr %a3@
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
47382: 2f02 movel %d2,%sp@- 47384: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> 47388: 2f2e fffc movel %fp@(-4),%sp@- 4738c: 4e94 jsr %a4@ 4738e: 4fef 000c lea %sp@(12),%sp
} return 0;
47392: 4280 clrl %d0 47394: 60ca bras 47360 <pthread_once+0x5c>
...
00047748 <pthread_rwlock_init>:
int pthread_rwlock_init(
pthread_rwlock_t *rwlock,
const pthread_rwlockattr_t *attr
)
{
47748: 4e56 ffe8 linkw %fp,#-24 4774c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 47750: 246e 0008 moveal %fp@(8),%a2 47754: 242e 000c movel %fp@(12),%d2
const pthread_rwlockattr_t *the_attr;
/*
* Error check parameters
*/
if ( !rwlock )
47758: 4a8a tstl %a2
4775a: 670a beqs 47766 <pthread_rwlock_init+0x1e>
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
4775c: 4a82 tstl %d2
4775e: 677e beqs 477de <pthread_rwlock_init+0x96>
47760: 2042 moveal %d2,%a0
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
47762: 4a90 tstl %a0@
47764: 660c bnes 47772 <pthread_rwlock_init+0x2a> <== ALWAYS TAKEN
switch ( the_attr->process_shared ) {
case PTHREAD_PROCESS_PRIVATE: /* only supported values */
break;
case PTHREAD_PROCESS_SHARED:
default:
return EINVAL;
47766: 7016 moveq #22,%d0
*rwlock = the_rwlock->Object.id;
_Thread_Enable_dispatch();
return 0;
}
47768: 4cee 0c04 ffe8 moveml %fp@(-24),%d2/%a2-%a3 4776e: 4e5e unlk %fp 47770: 4e75 rts
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
return EINVAL;
switch ( the_attr->process_shared ) {
47772: 4aa8 0004 tstl %a0@(4)
47776: 66ee bnes 47766 <pthread_rwlock_init+0x1e> <== NEVER TAKEN
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
47778: 2039 0006 3c6c movel 63c6c <_Thread_Dispatch_disable_level>,%d0 4777e: 5280 addql #1,%d0 47780: 23c0 0006 3c6c movel %d0,63c6c <_Thread_Dispatch_disable_level>
return _Thread_Dispatch_disable_level;
47786: 2039 0006 3c6c movel 63c6c <_Thread_Dispatch_disable_level>,%d0
*/
RTEMS_INLINE_ROUTINE void _CORE_RWLock_Initialize_attributes(
CORE_RWLock_Attributes *the_attributes
)
{
the_attributes->XXX = 0;
4778c: 42ae fffc clrl %fp@(-4)
* This function allocates a RWLock control block from
* the inactive chain of free RWLock control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Allocate( void )
{
return (POSIX_RWLock_Control *)
47790: 4879 0006 3dcc pea 63dcc <_POSIX_RWLock_Information> 47796: 4eb9 0004 a0e4 jsr 4a0e4 <_Objects_Allocate>
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
4779c: 588f addql #4,%sp 4779e: 2640 moveal %d0,%a3 477a0: 4a80 tstl %d0
477a2: 6758 beqs 477fc <pthread_rwlock_init+0xb4>
_Thread_Enable_dispatch();
return EAGAIN;
}
_CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes );
477a4: 486e fffc pea %fp@(-4) 477a8: 486b 0010 pea %a3@(16) 477ac: 4eb9 0004 97ec jsr 497ec <_CORE_RWLock_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
477b2: 202b 0008 movel %a3@(8),%d0
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
477b6: 4281 clrl %d1 477b8: 2079 0006 3de4 moveal 63de4 <_POSIX_RWLock_Information+0x18>,%a0 477be: 3200 movew %d0,%d1 477c0: 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;
477c4: 42ab 000c clrl %a3@(12)
&_POSIX_RWLock_Information,
&the_rwlock->Object,
0
);
*rwlock = the_rwlock->Object.id;
477c8: 2480 movel %d0,%a2@
_Thread_Enable_dispatch();
477ca: 4eb9 0004 b2f0 jsr 4b2f0 <_Thread_Enable_dispatch>
return 0;
477d0: 508f addql #8,%sp 477d2: 4280 clrl %d0
}
477d4: 4cee 0c04 ffe8 moveml %fp@(-24),%d2/%a2-%a3 477da: 4e5e unlk %fp 477dc: 4e75 rts
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
the_attr = attr;
} else {
(void) pthread_rwlockattr_init( &default_attr );
477de: 240e movel %fp,%d2 477e0: 0682 ffff fff4 addil #-12,%d2 477e6: 2f02 movel %d2,%sp@- 477e8: 4eb9 0004 822c jsr 4822c <pthread_rwlockattr_init> 477ee: 588f addql #4,%sp
the_attr = &default_attr;
477f0: 2042 moveal %d2,%a0
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
477f2: 4a90 tstl %a0@ 477f4: 6700 ff70 beqw 47766 <pthread_rwlock_init+0x1e> 477f8: 6000 ff78 braw 47772 <pthread_rwlock_init+0x2a>
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
_Thread_Enable_dispatch();
477fc: 4eb9 0004 b2f0 jsr 4b2f0 <_Thread_Enable_dispatch>
return EAGAIN;
47802: 700b moveq #11,%d0
*rwlock = the_rwlock->Object.id;
_Thread_Enable_dispatch();
return 0;
}
47804: 4cee 0c04 ffe8 moveml %fp@(-24),%d2/%a2-%a3 4780a: 4e5e unlk %fp
...
0004787c <pthread_rwlock_timedrdlock>:
int pthread_rwlock_timedrdlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
4787c: 4e56 ffec linkw %fp,#-20 47880: 48d7 040c moveml %d2-%d3/%a2,%sp@ 47884: 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 )
47888: 4a8a tstl %a2 4788a: 6700 0082 beqw 4790e <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 );
4788e: 486e fffc pea %fp@(-4) 47892: 2f2e 000c movel %fp@(12),%sp@- 47896: 4eb9 0004 e528 jsr 4e528 <_POSIX_Absolute_timeout_to_ticks> 4789c: 486e fff8 pea %fp@(-8) 478a0: 2400 movel %d0,%d2 478a2: 2f12 movel %a2@,%sp@- 478a4: 4879 0006 3dcc pea 63dcc <_POSIX_RWLock_Information> 478aa: 4eb9 0004 a5a8 jsr 4a5a8 <_Objects_Get>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
478b0: 4fef 0014 lea %sp@(20),%sp 478b4: 4aae fff8 tstl %fp@(-8)
478b8: 6654 bnes 4790e <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,
478ba: 7203 moveq #3,%d1 478bc: b282 cmpl %d2,%d1 478be: 57c3 seq %d3
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_reading(
478c0: 42a7 clrl %sp@- 478c2: 2f2e fffc movel %fp@(-4),%sp@- 478c6: 4483 negl %d3 478c8: 4281 clrl %d1 478ca: 1203 moveb %d3,%d1 478cc: 2040 moveal %d0,%a0 478ce: 2f01 movel %d1,%sp@- 478d0: 2f12 movel %a2@,%sp@- 478d2: 4868 0010 pea %a0@(16) 478d6: 4eb9 0004 9820 jsr 49820 <_CORE_RWLock_Obtain_for_reading>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
478dc: 4eb9 0004 b2f0 jsr 4b2f0 <_Thread_Enable_dispatch>
if ( !do_wait ) {
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
478e2: 2079 0006 40ce moveal 640ce <_Per_CPU_Information+0xc>,%a0
ticks,
NULL
);
_Thread_Enable_dispatch();
if ( !do_wait ) {
478e8: 4fef 0014 lea %sp@(20),%sp
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
478ec: 2028 0034 movel %a0@(52),%d0
ticks,
NULL
);
_Thread_Enable_dispatch();
if ( !do_wait ) {
478f0: 4a03 tstb %d3
478f2: 6606 bnes 478fa <pthread_rwlock_timedrdlock+0x7e>
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
478f4: 7202 moveq #2,%d1 478f6: b280 cmpl %d0,%d1
478f8: 6720 beqs 4791a <pthread_rwlock_timedrdlock+0x9e>
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
478fa: 2f00 movel %d0,%sp@- 478fc: 4eb9 0004 79ec jsr 479ec <_POSIX_RWLock_Translate_core_RWLock_return_code> 47902: 588f addql #4,%sp
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
47904: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 4790a: 4e5e unlk %fp 4790c: 4e75 rts
_Thread_Enable_dispatch();
if ( !do_wait ) {
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
return EINVAL;
4790e: 7016 moveq #22,%d0
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
47910: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 47916: 4e5e unlk %fp 47918: 4e75 rts
);
_Thread_Enable_dispatch();
if ( !do_wait ) {
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
4791a: 4a82 tstl %d2
4791c: 67f0 beqs 4790e <pthread_rwlock_timedrdlock+0x92><== NEVER TAKEN
return EINVAL; if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
4791e: 5382 subql #1,%d2 47920: 123c 0001 moveb #1,%d1 47924: b282 cmpl %d2,%d1
47926: 65d2 bcss 478fa <pthread_rwlock_timedrdlock+0x7e><== NEVER TAKEN
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT;
47928: 7074 moveq #116,%d0
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
4792a: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2
47930: 4e5e unlk %fp <== NOT EXECUTED
00047934 <pthread_rwlock_timedwrlock>:
int pthread_rwlock_timedwrlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
47934: 4e56 ffec linkw %fp,#-20 47938: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4793c: 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 )
47940: 4a8a tstl %a2 47942: 6700 0082 beqw 479c6 <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 );
47946: 486e fffc pea %fp@(-4) 4794a: 2f2e 000c movel %fp@(12),%sp@- 4794e: 4eb9 0004 e528 jsr 4e528 <_POSIX_Absolute_timeout_to_ticks> 47954: 486e fff8 pea %fp@(-8) 47958: 2400 movel %d0,%d2 4795a: 2f12 movel %a2@,%sp@- 4795c: 4879 0006 3dcc pea 63dcc <_POSIX_RWLock_Information> 47962: 4eb9 0004 a5a8 jsr 4a5a8 <_Objects_Get>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
47968: 4fef 0014 lea %sp@(20),%sp 4796c: 4aae fff8 tstl %fp@(-8)
47970: 6654 bnes 479c6 <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,
47972: 7203 moveq #3,%d1 47974: b282 cmpl %d2,%d1 47976: 57c3 seq %d3
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_writing(
47978: 42a7 clrl %sp@- 4797a: 2f2e fffc movel %fp@(-4),%sp@- 4797e: 4483 negl %d3 47980: 4281 clrl %d1 47982: 1203 moveb %d3,%d1 47984: 2040 moveal %d0,%a0 47986: 2f01 movel %d1,%sp@- 47988: 2f12 movel %a2@,%sp@- 4798a: 4868 0010 pea %a0@(16) 4798e: 4eb9 0004 98e0 jsr 498e0 <_CORE_RWLock_Obtain_for_writing>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
47994: 4eb9 0004 b2f0 jsr 4b2f0 <_Thread_Enable_dispatch>
if ( !do_wait &&
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
4799a: 2079 0006 40ce moveal 640ce <_Per_CPU_Information+0xc>,%a0
ticks,
NULL
);
_Thread_Enable_dispatch();
if ( !do_wait &&
479a0: 4fef 0014 lea %sp@(20),%sp
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
479a4: 2028 0034 movel %a0@(52),%d0
ticks,
NULL
);
_Thread_Enable_dispatch();
if ( !do_wait &&
479a8: 4a03 tstb %d3
479aa: 6606 bnes 479b2 <pthread_rwlock_timedwrlock+0x7e>
479ac: 7202 moveq #2,%d1 479ae: b280 cmpl %d0,%d1
479b0: 6720 beqs 479d2 <pthread_rwlock_timedwrlock+0x9e>
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
479b2: 2f00 movel %d0,%sp@- 479b4: 4eb9 0004 79ec jsr 479ec <_POSIX_RWLock_Translate_core_RWLock_return_code> 479ba: 588f addql #4,%sp
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
479bc: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 479c2: 4e5e unlk %fp 479c4: 4e75 rts
_Thread_Enable_dispatch();
if ( !do_wait &&
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
return EINVAL;
479c6: 7016 moveq #22,%d0
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
479c8: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 479ce: 4e5e unlk %fp 479d0: 4e75 rts
);
_Thread_Enable_dispatch();
if ( !do_wait &&
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
479d2: 4a82 tstl %d2
479d4: 67f0 beqs 479c6 <pthread_rwlock_timedwrlock+0x92><== NEVER TAKEN
return EINVAL; if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
479d6: 5382 subql #1,%d2 479d8: 123c 0001 moveb #1,%d1 479dc: b282 cmpl %d2,%d1
479de: 65d2 bcss 479b2 <pthread_rwlock_timedwrlock+0x7e><== NEVER TAKEN
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT;
479e0: 7074 moveq #116,%d0
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
479e2: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2
479e8: 4e5e unlk %fp <== NOT EXECUTED
0004824c <pthread_rwlockattr_setpshared>:
int pthread_rwlockattr_setpshared(
pthread_rwlockattr_t *attr,
int pshared
)
{
4824c: 4e56 0000 linkw %fp,#0 48250: 206e 0008 moveal %fp@(8),%a0
if ( !attr )
48254: 4a88 tstl %a0
48256: 6704 beqs 4825c <pthread_rwlockattr_setpshared+0x10>
return EINVAL;
if ( !attr->is_initialized )
48258: 4a90 tstl %a0@
4825a: 6606 bnes 48262 <pthread_rwlockattr_setpshared+0x16>
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
return 0;
default:
return EINVAL;
4825c: 7016 moveq #22,%d0
} }
4825e: 4e5e unlk %fp 48260: 4e75 rts
return EINVAL;
if ( !attr->is_initialized )
return EINVAL;
switch ( pshared ) {
48262: 7001 moveq #1,%d0 48264: b0ae 000c cmpl %fp@(12),%d0
48268: 65f2 bcss 4825c <pthread_rwlockattr_setpshared+0x10><== NEVER TAKEN
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
4826a: 202e 000c movel %fp@(12),%d0
return 0;
default:
return EINVAL;
}
}
4826e: 4e5e unlk %fp
return EINVAL;
switch ( pshared ) {
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
48270: 2140 0004 movel %d0,%a0@(4)
return 0;
48274: 4280 clrl %d0 <== NOT EXECUTED
default:
return EINVAL;
}
}
0004947c <pthread_setschedparam>:
int pthread_setschedparam(
pthread_t thread,
int policy,
struct sched_param *param
)
{
4947c: 4e56 ffe0 linkw %fp,#-32 49480: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 49484: 282e 000c movel %fp@(12),%d4 49488: 262e 0010 movel %fp@(16),%d3
int rc;
/*
* Check all the parameters
*/
if ( !param )
4948c: 6700 00b6 beqw 49544 <pthread_setschedparam+0xc8>
return EINVAL;
rc = _POSIX_Thread_Translate_sched_param(
49490: 486e fff8 pea %fp@(-8) 49494: 486e fff4 pea %fp@(-12) 49498: 2f03 movel %d3,%sp@- 4949a: 2f04 movel %d4,%sp@- 4949c: 4eb9 0004 f784 jsr 4f784 <_POSIX_Thread_Translate_sched_param>
policy,
param,
&budget_algorithm,
&budget_callout
);
if ( rc )
494a2: 4fef 0010 lea %sp@(16),%sp
* Check all the parameters
*/
if ( !param )
return EINVAL;
rc = _POSIX_Thread_Translate_sched_param(
494a6: 2400 movel %d0,%d2
policy,
param,
&budget_algorithm,
&budget_callout
);
if ( rc )
494a8: 670c beqs 494b6 <pthread_setschedparam+0x3a>
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
494aa: 2002 movel %d2,%d0 494ac: 4cee 0c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a3 494b2: 4e5e unlk %fp 494b4: 4e75 rts
return rc;
/*
* Actually change the scheduling policy and parameters
*/
the_thread = _Thread_Get( thread, &location );
494b6: 486e fffc pea %fp@(-4) 494ba: 2f2e 0008 movel %fp@(8),%sp@- 494be: 4eb9 0004 c3d0 jsr 4c3d0 <_Thread_Get>
switch ( location ) {
494c4: 508f addql #8,%sp
return rc;
/*
* Actually change the scheduling policy and parameters
*/
the_thread = _Thread_Get( thread, &location );
494c6: 2440 moveal %d0,%a2
switch ( location ) {
494c8: 4aae fffc tstl %fp@(-4) 494cc: 6600 0084 bnew 49552 <pthread_setschedparam+0xd6>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
494d0: 266a 0102 moveal %a2@(258),%a3
if ( api->schedpolicy == SCHED_SPORADIC )
494d4: 7004 moveq #4,%d0 494d6: b0ab 0084 cmpl %a3@(132),%d0 494da: 6700 00b8 beqw 49594 <pthread_setschedparam+0x118>
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
api->schedparam = *param;
494de: 41eb 0088 lea %a3@(136),%a0 494e2: 2243 moveal %d3,%a1
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
494e4: 2744 0084 movel %d4,%a3@(132)
api->schedparam = *param;
494e8: 20d9 movel %a1@+,%a0@+ 494ea: 20d9 movel %a1@+,%a0@+ 494ec: 20d9 movel %a1@+,%a0@+ 494ee: 20d9 movel %a1@+,%a0@+ 494f0: 20d9 movel %a1@+,%a0@+ 494f2: 20d9 movel %a1@+,%a0@+ 494f4: 2091 movel %a1@,%a0@
the_thread->budget_algorithm = budget_algorithm;
494f6: 256e fff4 007a movel %fp@(-12),%a2@(122)
the_thread->budget_callout = budget_callout;
494fc: 256e fff8 007e movel %fp@(-8),%a2@(126)
switch ( api->schedpolicy ) {
49502: 4a84 tstl %d4
49504: 6d2c blts 49532 <pthread_setschedparam+0xb6> <== NEVER TAKEN
49506: 7002 moveq #2,%d0 49508: b084 cmpl %d4,%d0
4950a: 6c54 bges 49560 <pthread_setschedparam+0xe4>
4950c: 103c 0004 moveb #4,%d0 49510: b084 cmpl %d4,%d0
49512: 661e bnes 49532 <pthread_setschedparam+0xb6> <== NEVER TAKEN
true
);
break;
case SCHED_SPORADIC:
api->ss_high_priority = api->schedparam.sched_priority;
49514: 276b 0088 00a4 movel %a3@(136),%a3@(164)
_Watchdog_Remove( &api->Sporadic_timer );
4951a: 486b 00a8 pea %a3@(168) 4951e: 4eb9 0004 d484 jsr 4d484 <_Watchdog_Remove>
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
49524: 2f0a movel %a2,%sp@- 49526: 42a7 clrl %sp@- 49528: 4eb9 0004 932a jsr 4932a <_POSIX_Threads_Sporadic_budget_TSR>
break;
4952e: 4fef 000c lea %sp@(12),%sp
}
_Thread_Enable_dispatch();
49532: 4eb9 0004 c3a8 jsr 4c3a8 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
49538: 2002 movel %d2,%d0 4953a: 4cee 0c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a3 49540: 4e5e unlk %fp 49542: 4e75 rts
/*
* Check all the parameters
*/
if ( !param )
return EINVAL;
49544: 7416 moveq #22,%d2
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
49546: 2002 movel %d2,%d0 49548: 4cee 0c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a3 4954e: 4e5e unlk %fp 49550: 4e75 rts
#endif
case OBJECTS_ERROR:
break;
}
return ESRCH;
49552: 7403 moveq #3,%d2
}
49554: 2002 movel %d2,%d0 49556: 4cee 0c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a3 4955c: 4e5e unlk %fp 4955e: 4e75 rts 49560: 4280 clrl %d0 49562: 1039 0006 454a moveb 6454a <rtems_maximum_priority>,%d0
switch ( api->schedpolicy ) {
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
49568: 41f9 0006 5f00 lea 65f00 <_Thread_Ticks_per_timeslice>,%a0 4956e: 90ab 0088 subl %a3@(136),%d0 49572: 2550 0076 movel %a0@,%a2@(118)
the_thread->real_priority =
49576: 2540 0018 movel %d0,%a2@(24)
_POSIX_Priority_To_core( api->schedparam.sched_priority );
_Thread_Change_priority(
4957a: 4878 0001 pea 1 <ADD> 4957e: 2f00 movel %d0,%sp@- 49580: 2f0a movel %a2,%sp@- 49582: 4eb9 0004 bec8 jsr 4bec8 <_Thread_Change_priority>
the_thread,
the_thread->real_priority,
true
);
break;
49588: 4fef 000c lea %sp@(12),%sp
_Watchdog_Remove( &api->Sporadic_timer );
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
break;
}
_Thread_Enable_dispatch();
4958c: 4eb9 0004 c3a8 jsr 4c3a8 <_Thread_Enable_dispatch> 49592: 60a4 bras 49538 <pthread_setschedparam+0xbc>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
49594: 486b 00a8 pea %a3@(168) 49598: 4eb9 0004 d484 jsr 4d484 <_Watchdog_Remove> 4959e: 588f addql #4,%sp 495a0: 6000 ff3c braw 494de <pthread_setschedparam+0x62>
0004d8b0 <pthread_sigmask>:
int pthread_sigmask(
int how,
const sigset_t *set,
sigset_t *oset
)
{
4d8b0: 4e56 0000 linkw %fp,#0 4d8b4: 202e 0008 movel %fp@(8),%d0 4d8b8: 2f0a movel %a2,%sp@- 4d8ba: 226e 000c moveal %fp@(12),%a1 4d8be: 246e 0010 moveal %fp@(16),%a2
POSIX_API_Control *api;
if ( !set && !oset )
4d8c2: 4a89 tstl %a1 4d8c4: 6700 0084 beqw 4d94a <pthread_sigmask+0x9a>
rtems_set_errno_and_return_minus_one( EINVAL );
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
4d8c8: 2079 0006 30ba moveal 630ba <_Per_CPU_Information+0xc>,%a0 4d8ce: 2068 0102 moveal %a0@(258),%a0
if ( oset )
4d8d2: 4a8a tstl %a2
4d8d4: 6708 beqs 4d8de <pthread_sigmask+0x2e>
*oset = api->signals_blocked;
4d8d6: 24a8 00d0 movel %a0@(208),%a2@
if ( !set )
4d8da: 4a89 tstl %a1
4d8dc: 673a beqs 4d918 <pthread_sigmask+0x68> <== NEVER TAKEN
return 0;
switch ( how ) {
4d8de: 7201 moveq #1,%d1 4d8e0: b280 cmpl %d0,%d1
4d8e2: 675e beqs 4d942 <pthread_sigmask+0x92>
4d8e4: 123c 0002 moveb #2,%d1 4d8e8: b280 cmpl %d0,%d1
4d8ea: 6736 beqs 4d922 <pthread_sigmask+0x72>
4d8ec: 4a80 tstl %d0
4d8ee: 663c bnes 4d92c <pthread_sigmask+0x7c>
break;
case SIG_UNBLOCK:
api->signals_blocked &= ~*set;
break;
case SIG_SETMASK:
api->signals_blocked = *set;
4d8f0: 2151 00d0 movel %a1@,%a0@(208)
/* XXX are there critical section problems here? */
/* XXX evaluate the new set */
if ( ~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending) ) {
4d8f4: 2039 0006 32e8 movel 632e8 <_POSIX_signals_Pending>,%d0
/* XXX are there critical section problems here? */
/* XXX evaluate the new set */
if ( ~api->signals_blocked &
4d8fa: 2228 00d0 movel %a0@(208),%d1 4d8fe: 4681 notl %d1
(api->signals_pending | _POSIX_signals_Pending) ) {
4d900: 80a8 00d4 orl %a0@(212),%d0
/* XXX are there critical section problems here? */
/* XXX evaluate the new set */
if ( ~api->signals_blocked &
4d904: c081 andl %d1,%d0
4d906: 6710 beqs 4d918 <pthread_sigmask+0x68>
(api->signals_pending | _POSIX_signals_Pending) ) {
_Thread_Dispatch();
4d908: 4eb9 0004 9ea4 jsr 49ea4 <_Thread_Dispatch>
}
return 0;
}
4d90e: 246e fffc moveal %fp@(-4),%a2
if ( ~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending) ) {
_Thread_Dispatch();
}
return 0;
4d912: 4280 clrl %d0
}
4d914: 4e5e unlk %fp 4d916: 4e75 rts 4d918: 246e fffc moveal %fp@(-4),%a2
if ( ~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending) ) {
_Thread_Dispatch();
}
return 0;
4d91c: 4280 clrl %d0
}
4d91e: 4e5e unlk %fp 4d920: 4e75 rts
switch ( how ) {
case SIG_BLOCK:
api->signals_blocked |= *set;
break;
case SIG_UNBLOCK:
api->signals_blocked &= ~*set;
4d922: 2011 movel %a1@,%d0 4d924: 4680 notl %d0 4d926: c1a8 00d0 andl %d0,%a0@(208)
break;
4d92a: 60c8 bras 4d8f4 <pthread_sigmask+0x44>
case SIG_SETMASK:
api->signals_blocked = *set;
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
4d92c: 4eb9 0004 ffa8 jsr 4ffa8 <__errno>
(api->signals_pending | _POSIX_signals_Pending) ) {
_Thread_Dispatch();
}
return 0;
}
4d932: 246e fffc moveal %fp@(-4),%a2
break;
case SIG_SETMASK:
api->signals_blocked = *set;
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
4d936: 2040 moveal %d0,%a0 4d938: 7216 moveq #22,%d1 4d93a: 70ff moveq #-1,%d0
(api->signals_pending | _POSIX_signals_Pending) ) {
_Thread_Dispatch();
}
return 0;
}
4d93c: 4e5e unlk %fp
break;
case SIG_SETMASK:
api->signals_blocked = *set;
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
4d93e: 2081 movel %d1,%a0@
(api->signals_pending | _POSIX_signals_Pending) ) {
_Thread_Dispatch();
}
return 0;
}
4d940: 4e75 rts
if ( !set )
return 0;
switch ( how ) {
case SIG_BLOCK:
api->signals_blocked |= *set;
4d942: 2011 movel %a1@,%d0 4d944: 81a8 00d0 orl %d0,%a0@(208)
break;
4d948: 60aa bras 4d8f4 <pthread_sigmask+0x44>
sigset_t *oset
)
{
POSIX_API_Control *api;
if ( !set && !oset )
4d94a: 4a8a tstl %a2
4d94c: 67de beqs 4d92c <pthread_sigmask+0x7c>
rtems_set_errno_and_return_minus_one( EINVAL );
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
4d94e: 2079 0006 30ba moveal 630ba <_Per_CPU_Information+0xc>,%a0 4d954: 2068 0102 moveal %a0@(258),%a0
if ( oset )
*oset = api->signals_blocked;
4d958: 24a8 00d0 movel %a0@(208),%a2@
if ( !set )
4d95c: 4a89 tstl %a1 4d95e: 6600 ff7e bnew 4d8de <pthread_sigmask+0x2e> 4d962: 60b4 bras 4d918 <pthread_sigmask+0x68>
00046f78 <pthread_testcancel>:
/*
* 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183
*/
void pthread_testcancel( void )
{
46f78: 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() )
46f7c: 4ab9 0006 23d0 tstl 623d0 <_Per_CPU_Information+0x8>
46f82: 6642 bnes 46fc6 <pthread_testcancel+0x4e> <== NEVER TAKEN
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
46f84: 2039 0006 1f72 movel 61f72 <_Thread_Dispatch_disable_level>,%d0 46f8a: 5280 addql #1,%d0
return;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
46f8c: 2079 0006 23d4 moveal 623d4 <_Per_CPU_Information+0xc>,%a0 46f92: 23c0 0006 1f72 movel %d0,61f72 <_Thread_Dispatch_disable_level> 46f98: 2068 0102 moveal %a0@(258),%a0
return _Thread_Dispatch_disable_level;
46f9c: 2039 0006 1f72 movel 61f72 <_Thread_Dispatch_disable_level>,%d0
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
46fa2: 4aa8 00d8 tstl %a0@(216)
46fa6: 6622 bnes 46fca <pthread_testcancel+0x52> <== NEVER TAKEN
46fa8: 4aa8 00e0 tstl %a0@(224)
46fac: 671c beqs 46fca <pthread_testcancel+0x52>
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
46fae: 4eb9 0004 9d00 jsr 49d00 <_Thread_Enable_dispatch>
if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
46fb4: 4878 ffff pea ffffffff <LESS> 46fb8: 2f39 0006 23d4 movel 623d4 <_Per_CPU_Information+0xc>,%sp@- 46fbe: 4eb9 0004 d1d4 jsr 4d1d4 <_POSIX_Thread_Exit>
46fc4: 508f addql #8,%sp <== NOT EXECUTED
}
46fc6: 4e5e unlk %fp <== NOT EXECUTED 46fc8: 4e75 rts <== NOT EXECUTED
46fca: 4e5e unlk %fp
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
46fcc: 4ef9 0004 9d00 jmp 49d00 <_Thread_Enable_dispatch>
...
000440dc <putk>:
* putk
*
* Kernel putk (e.g. puts) function requiring minimal infrastrure.
*/
void putk(const char *s)
{
440dc: 4e56 0000 linkw %fp,#0 440e0: 2f0a movel %a2,%sp@- 440e2: 246e 0008 moveal %fp@(8),%a2
const char *p;
for (p=s ; *p ; p++ )
440e6: 1012 moveb %a2@,%d0
440e8: 6714 beqs 440fe <putk+0x22> /* * putk * * Kernel putk (e.g. puts) function requiring minimal infrastrure. */ void putk(const char *s)
440ea: 528a addql #1,%a2
{
const char *p;
for (p=s ; *p ; p++ )
BSP_output_char(*p);
440ec: 49c0 extbl %d0 440ee: 2079 0005 f780 moveal 5f780 <BSP_output_char>,%a0 440f4: 2f00 movel %d0,%sp@- 440f6: 4e90 jsr %a0@
*/
void putk(const char *s)
{
const char *p;
for (p=s ; *p ; p++ )
440f8: 588f addql #4,%sp 440fa: 101a moveb %a2@+,%d0
440fc: 66ee bnes 440ec <putk+0x10>
BSP_output_char(*p);
BSP_output_char('\n');
440fe: 700a moveq #10,%d0
}
44100: 246e fffc moveal %fp@(-4),%a2
{
const char *p;
for (p=s ; *p ; p++ )
BSP_output_char(*p);
BSP_output_char('\n');
44104: 2d40 0008 movel %d0,%fp@(8)
}
44108: 4e5e unlk %fp
{
const char *p;
for (p=s ; *p ; p++ )
BSP_output_char(*p);
BSP_output_char('\n');
4410a: 2279 0005 f780 moveal 5f780 <BSP_output_char>,%a1 44110: 4ed1 jmp %a1@
...
0004b970 <ramdisk_allocate>:
void *area_begin,
uint32_t block_size,
rtems_blkdev_bnum block_count,
bool trace
)
{
4b970: 4e56 ffec linkw %fp,#-20 4b974: 48d7 043c moveml %d2-%d5/%a2,%sp@
struct ramdisk *rd = malloc(sizeof(struct ramdisk));
4b978: 4878 0010 pea 10 <INVALID_OPERATION>
void *area_begin,
uint32_t block_size,
rtems_blkdev_bnum block_count,
bool trace
)
{
4b97c: 242e 0008 movel %fp@(8),%d2 4b980: 282e 000c movel %fp@(12),%d4 4b984: 262e 0010 movel %fp@(16),%d3 4b988: 1a2e 0017 moveb %fp@(23),%d5
struct ramdisk *rd = malloc(sizeof(struct ramdisk));
4b98c: 4eb9 0004 44d8 jsr 444d8 <malloc>
if (rd == NULL) {
4b992: 588f addql #4,%sp
uint32_t block_size,
rtems_blkdev_bnum block_count,
bool trace
)
{
struct ramdisk *rd = malloc(sizeof(struct ramdisk));
4b994: 2440 moveal %d0,%a2
if (rd == NULL) {
4b996: 4a80 tstl %d0
4b998: 671e beqs 4b9b8 <ramdisk_allocate+0x48> <== NEVER TAKEN
return NULL;
}
if (area_begin == NULL) {
4b99a: 4a82 tstl %d2
4b99c: 6726 beqs 4b9c4 <ramdisk_allocate+0x54> <== ALWAYS TAKEN
}
rd->malloced = true;
} else {
rd->malloced = false;
}
rd->block_size = block_size;
4b99e: 2484 movel %d4,%a2@ <== NOT EXECUTED
return NULL;
}
rd->malloced = true;
} else {
rd->malloced = false;
4b9a0: 4200 clrb %d0 <== NOT EXECUTED
} rd->block_size = block_size; rd->block_num = block_count;
4b9a2: 2543 0004 movel %d3,%a2@(4) <== NOT EXECUTED
return NULL;
}
rd->malloced = true;
} else {
rd->malloced = false;
4b9a6: 1540 000d moveb %d0,%a2@(13) <== NOT EXECUTED
} rd->block_size = block_size; rd->block_num = block_count; rd->area = area_begin; rd->trace = trace; rd->initialized = true;
4b9aa: 7001 moveq #1,%d0 <== NOT EXECUTED
} else {
rd->malloced = false;
}
rd->block_size = block_size;
rd->block_num = block_count;
rd->area = area_begin;
4b9ac: 2542 0008 movel %d2,%a2@(8) <== NOT EXECUTED
rd->trace = trace;
4b9b0: 1545 000e moveb %d5,%a2@(14) <== NOT EXECUTED
rd->initialized = true;
4b9b4: 1540 000c moveb %d0,%a2@(12) <== NOT EXECUTED
return rd;
}
4b9b8: 200a movel %a2,%d0 4b9ba: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 4b9c0: 4e5e unlk %fp 4b9c2: 4e75 rts
if (rd == NULL) {
return NULL;
}
if (area_begin == NULL) {
area_begin = calloc(block_count, block_size);
4b9c4: 2f04 movel %d4,%sp@- 4b9c6: 2f03 movel %d3,%sp@- 4b9c8: 4eb9 0004 3d94 jsr 43d94 <calloc>
if (area_begin == NULL) {
4b9ce: 508f addql #8,%sp
if (rd == NULL) {
return NULL;
}
if (area_begin == NULL) {
area_begin = calloc(block_count, block_size);
4b9d0: 2400 movel %d0,%d2
if (area_begin == NULL) {
4b9d2: 671c beqs 4b9f0 <ramdisk_allocate+0x80> <== NEVER TAKEN
}
rd->malloced = true;
} else {
rd->malloced = false;
}
rd->block_size = block_size;
4b9d4: 2484 movel %d4,%a2@
if (area_begin == NULL) {
free(rd);
return NULL;
}
rd->malloced = true;
4b9d6: 7001 moveq #1,%d0
} else {
rd->malloced = false;
}
rd->block_size = block_size;
rd->block_num = block_count;
4b9d8: 2543 0004 movel %d3,%a2@(4)
if (area_begin == NULL) {
free(rd);
return NULL;
}
rd->malloced = true;
4b9dc: 1540 000d moveb %d0,%a2@(13)
} rd->block_size = block_size; rd->block_num = block_count; rd->area = area_begin; rd->trace = trace; rd->initialized = true;
4b9e0: 7001 moveq #1,%d0
} else {
rd->malloced = false;
}
rd->block_size = block_size;
rd->block_num = block_count;
rd->area = area_begin;
4b9e2: 2542 0008 movel %d2,%a2@(8)
rd->trace = trace;
4b9e6: 1545 000e moveb %d5,%a2@(14)
rd->initialized = true;
4b9ea: 1540 000c moveb %d0,%a2@(12) 4b9ee: 60c8 bras 4b9b8 <ramdisk_allocate+0x48>
}
if (area_begin == NULL) {
area_begin = calloc(block_count, block_size);
if (area_begin == NULL) {
free(rd);
4b9f0: 2f0a movel %a2,%sp@- <== NOT EXECUTED
return NULL;
4b9f2: 95ca subal %a2,%a2 <== NOT EXECUTED
}
if (area_begin == NULL) {
area_begin = calloc(block_count, block_size);
if (area_begin == NULL) {
free(rd);
4b9f4: 4eb9 0004 41a8 jsr 441a8 <free> <== NOT EXECUTED
return NULL;
4b9fa: 588f addql #4,%sp <== NOT EXECUTED
rd->area = area_begin;
rd->trace = trace;
rd->initialized = true;
return rd;
}
4b9fc: 200a movel %a2,%d0 <== NOT EXECUTED 4b9fe: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 <== NOT EXECUTED 4ba04: 4e5e unlk %fp <== NOT EXECUTED
0004ba08 <ramdisk_free>:
void ramdisk_free(ramdisk *rd)
{
4ba08: 4e56 0000 linkw %fp,#0 4ba0c: 2f0a movel %a2,%sp@- 4ba0e: 246e 0008 moveal %fp@(8),%a2
if (rd != NULL) {
4ba12: 4a8a tstl %a2
4ba14: 6732 beqs 4ba48 <ramdisk_free+0x40> <== NEVER TAKEN
if (rd->malloced) {
4ba16: 4a2a 000d tstb %a2@(13)
4ba1a: 6610 bnes 4ba2c <ramdisk_free+0x24> <== ALWAYS TAKEN
free(rd->area);
}
free(rd);
4ba1c: 2d4a 0008 movel %a2,%fp@(8) <== NOT EXECUTED
} }
4ba20: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4ba24: 4e5e unlk %fp <== NOT EXECUTED
{
if (rd != NULL) {
if (rd->malloced) {
free(rd->area);
}
free(rd);
4ba26: 4ef9 0004 41a8 jmp 441a8 <free> <== NOT EXECUTED
void ramdisk_free(ramdisk *rd)
{
if (rd != NULL) {
if (rd->malloced) {
free(rd->area);
4ba2c: 2f2a 0008 movel %a2@(8),%sp@- 4ba30: 4eb9 0004 41a8 jsr 441a8 <free> 4ba36: 588f addql #4,%sp
}
free(rd);
4ba38: 2d4a 0008 movel %a2,%fp@(8)
} }
4ba3c: 246e fffc moveal %fp@(-4),%a2 4ba40: 4e5e unlk %fp
{
if (rd != NULL) {
if (rd->malloced) {
free(rd->area);
}
free(rd);
4ba42: 4ef9 0004 41a8 jmp 441a8 <free>
} }
4ba48: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4ba4c: 4e5e unlk %fp <== NOT EXECUTED
0004b854 <ramdisk_ioctl>:
return 0;
}
int
ramdisk_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
4b854: 4e56 ffe8 linkw %fp,#-24 4b858: 206e 0008 moveal %fp@(8),%a0 4b85c: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4b860: 202e 000c movel %fp@(12),%d0 4b864: 266e 0010 moveal %fp@(16),%a3
switch (req)
4b868: 0c80 c018 4201 cmpil #-1072152063,%d0
4b86e: 671a beqs 4b88a <ramdisk_ioctl+0x36>
}
break;
}
default:
return rtems_blkdev_ioctl (dd, req, argp);
4b870: 2d4b 0010 movel %a3,%fp@(16) 4b874: 2d40 000c movel %d0,%fp@(12)
break;
}
errno = EINVAL;
return -1;
}
4b878: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5
}
break;
}
default:
return rtems_blkdev_ioctl (dd, req, argp);
4b87e: 2d48 0008 movel %a0,%fp@(8)
break;
}
errno = EINVAL;
return -1;
}
4b882: 4e5e unlk %fp
}
break;
}
default:
return rtems_blkdev_ioctl (dd, req, argp);
4b884: 4ef9 0004 e2d8 jmp 4e2d8 <rtems_blkdev_ioctl>
break;
}
errno = EINVAL;
return -1;
}
4b88a: 2868 002c moveal %a0@(44),%a4
case RTEMS_BLKIO_REQUEST:
{
rtems_blkdev_request *r = argp;
struct ramdisk *rd = rtems_disk_get_driver_data(dd);
switch (r->req)
4b88e: 2013 movel %a3@,%d0
4b890: 665a bnes 4b8ec <ramdisk_ioctl+0x98>
break;
}
errno = EINVAL;
return -1;
}
4b892: 262c 0008 movel %a4@(8),%d3
#if RTEMS_RAMDISK_TRACE
rtems_ramdisk_printf (rd, "ramdisk read: start=%d, blocks=%d",
req->bufs[0].block, req->bufnum);
#endif
for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++)
4b896: 4aab 0010 tstl %a3@(16)
4b89a: 6732 beqs 4b8ce <ramdisk_ioctl+0x7a> <== NEVER TAKEN
4b89c: 45eb 0018 lea %a3@(24),%a2 4b8a0: 4282 clrl %d2 4b8a2: 4bf9 0005 39a4 lea 539a4 <memcpy>,%a5
#if RTEMS_RAMDISK_TRACE
rtems_ramdisk_printf (rd, "ramdisk read: buf=%d block=%d length=%d off=%d addr=%p",
i, sg->block, sg->length, sg->block * rd->block_size,
from + (sg->block * rd->block_size));
#endif
memcpy(sg->buffer, from + (sg->block * rd->block_size), sg->length);
4b8a8: 2012 movel %a2@,%d0 4b8aa: 4c14 0800 mulsl %a4@,%d0 4b8ae: 2043 moveal %d3,%a0
#if RTEMS_RAMDISK_TRACE
rtems_ramdisk_printf (rd, "ramdisk read: start=%d, blocks=%d",
req->bufs[0].block, req->bufnum);
#endif
for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++)
4b8b0: 5282 addql #1,%d2
#if RTEMS_RAMDISK_TRACE
rtems_ramdisk_printf (rd, "ramdisk read: buf=%d block=%d length=%d off=%d addr=%p",
i, sg->block, sg->length, sg->block * rd->block_size,
from + (sg->block * rd->block_size));
#endif
memcpy(sg->buffer, from + (sg->block * rd->block_size), sg->length);
4b8b2: 2f2a 0004 movel %a2@(4),%sp@- 4b8b6: 4870 0800 pea %a0@(00000000,%d0:l) 4b8ba: 2f2a 0008 movel %a2@(8),%sp@-
#if RTEMS_RAMDISK_TRACE
rtems_ramdisk_printf (rd, "ramdisk read: start=%d, blocks=%d",
req->bufs[0].block, req->bufnum);
#endif
for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++)
4b8be: 45ea 0010 lea %a2@(16),%a2
#if RTEMS_RAMDISK_TRACE
rtems_ramdisk_printf (rd, "ramdisk read: buf=%d block=%d length=%d off=%d addr=%p",
i, sg->block, sg->length, sg->block * rd->block_size,
from + (sg->block * rd->block_size));
#endif
memcpy(sg->buffer, from + (sg->block * rd->block_size), sg->length);
4b8c2: 4e95 jsr %a5@
#if RTEMS_RAMDISK_TRACE
rtems_ramdisk_printf (rd, "ramdisk read: start=%d, blocks=%d",
req->bufs[0].block, req->bufnum);
#endif
for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++)
4b8c4: 4fef 000c lea %sp@(12),%sp 4b8c8: b4ab 0010 cmpl %a3@(16),%d2
4b8cc: 65da bcss 4b8a8 <ramdisk_ioctl+0x54> <== NEVER TAKEN
to + (sg->block * rd->block_size));
#endif
memcpy(to + (sg->block * rd->block_size), sg->buffer, sg->length);
}
req->status = RTEMS_SUCCESSFUL;
req->req_done(req->done_arg, RTEMS_SUCCESSFUL);
4b8ce: 42a7 clrl %sp@- 4b8d0: 2f2b 0008 movel %a3@(8),%sp@- 4b8d4: 206b 0004 moveal %a3@(4),%a0
i, sg->block, sg->length, sg->block * rd->block_size,
to + (sg->block * rd->block_size));
#endif
memcpy(to + (sg->block * rd->block_size), sg->buffer, sg->length);
}
req->status = RTEMS_SUCCESSFUL;
4b8d8: 42ab 000c clrl %a3@(12)
req->req_done(req->done_arg, RTEMS_SUCCESSFUL);
4b8dc: 4e90 jsr %a0@
{
case RTEMS_BLKDEV_REQ_READ:
return ramdisk_read(rd, r);
case RTEMS_BLKDEV_REQ_WRITE:
return ramdisk_write(rd, r);
4b8de: 508f addql #8,%sp 4b8e0: 4280 clrl %d0
break;
}
errno = EINVAL;
return -1;
}
4b8e2: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4b8e8: 4e5e unlk %fp 4b8ea: 4e75 rts
case RTEMS_BLKIO_REQUEST:
{
rtems_blkdev_request *r = argp;
struct ramdisk *rd = rtems_disk_get_driver_data(dd);
switch (r->req)
4b8ec: 7201 moveq #1,%d1 4b8ee: b280 cmpl %d0,%d1
4b8f0: 6718 beqs 4b90a <ramdisk_ioctl+0xb6> <== ALWAYS TAKEN
case RTEMS_BLKDEV_REQ_WRITE:
return ramdisk_write(rd, r);
default:
errno = EINVAL;
4b8f2: 4eb9 0005 3184 jsr 53184 <__errno> <== NOT EXECUTED 4b8f8: 7216 moveq #22,%d1 <== NOT EXECUTED 4b8fa: 2040 moveal %d0,%a0 <== NOT EXECUTED
return -1;
4b8fc: 70ff moveq #-1,%d0 <== NOT EXECUTED
break;
}
errno = EINVAL;
return -1;
}
4b8fe: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 <== NOT EXECUTED
case RTEMS_BLKDEV_REQ_WRITE:
return ramdisk_write(rd, r);
default:
errno = EINVAL;
4b904: 2081 movel %d1,%a0@ <== NOT EXECUTED
break;
}
errno = EINVAL;
return -1;
}
4b906: 4e5e unlk %fp <== NOT EXECUTED 4b908: 4e75 rts <== NOT EXECUTED
4b90a: 262c 0008 movel %a4@(8),%d3
#if RTEMS_RAMDISK_TRACE
rtems_ramdisk_printf (rd, "ramdisk write: start=%d, blocks=%d",
req->bufs[0].block, req->bufnum);
#endif
for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++)
4b90e: 4aab 0010 tstl %a3@(16)
4b912: 67ba beqs 4b8ce <ramdisk_ioctl+0x7a> <== NEVER TAKEN
4b914: 45eb 0018 lea %a3@(24),%a2 4b918: 4282 clrl %d2 4b91a: 4bf9 0005 39a4 lea 539a4 <memcpy>,%a5
#if RTEMS_RAMDISK_TRACE
rtems_ramdisk_printf (rd, "ramdisk write: buf=%d block=%d length=%d off=%d addr=%p",
i, sg->block, sg->length, sg->block * rd->block_size,
to + (sg->block * rd->block_size));
#endif
memcpy(to + (sg->block * rd->block_size), sg->buffer, sg->length);
4b920: 2012 movel %a2@,%d0 4b922: 4c14 0800 mulsl %a4@,%d0 4b926: 2043 moveal %d3,%a0
#if RTEMS_RAMDISK_TRACE
rtems_ramdisk_printf (rd, "ramdisk write: start=%d, blocks=%d",
req->bufs[0].block, req->bufnum);
#endif
for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++)
4b928: 5282 addql #1,%d2
#if RTEMS_RAMDISK_TRACE
rtems_ramdisk_printf (rd, "ramdisk write: buf=%d block=%d length=%d off=%d addr=%p",
i, sg->block, sg->length, sg->block * rd->block_size,
to + (sg->block * rd->block_size));
#endif
memcpy(to + (sg->block * rd->block_size), sg->buffer, sg->length);
4b92a: 2f2a 0004 movel %a2@(4),%sp@- 4b92e: 2f2a 0008 movel %a2@(8),%sp@- 4b932: 4870 0800 pea %a0@(00000000,%d0:l)
#if RTEMS_RAMDISK_TRACE
rtems_ramdisk_printf (rd, "ramdisk write: start=%d, blocks=%d",
req->bufs[0].block, req->bufnum);
#endif
for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++)
4b936: 45ea 0010 lea %a2@(16),%a2
#if RTEMS_RAMDISK_TRACE
rtems_ramdisk_printf (rd, "ramdisk write: buf=%d block=%d length=%d off=%d addr=%p",
i, sg->block, sg->length, sg->block * rd->block_size,
to + (sg->block * rd->block_size));
#endif
memcpy(to + (sg->block * rd->block_size), sg->buffer, sg->length);
4b93a: 4e95 jsr %a5@
#if RTEMS_RAMDISK_TRACE
rtems_ramdisk_printf (rd, "ramdisk write: start=%d, blocks=%d",
req->bufs[0].block, req->bufnum);
#endif
for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++)
4b93c: 4fef 000c lea %sp@(12),%sp 4b940: b4ab 0010 cmpl %a3@(16),%d2
4b944: 6488 bccs 4b8ce <ramdisk_ioctl+0x7a>
#if RTEMS_RAMDISK_TRACE
rtems_ramdisk_printf (rd, "ramdisk write: buf=%d block=%d length=%d off=%d addr=%p",
i, sg->block, sg->length, sg->block * rd->block_size,
to + (sg->block * rd->block_size));
#endif
memcpy(to + (sg->block * rd->block_size), sg->buffer, sg->length);
4b946: 2012 movel %a2@,%d0 4b948: 4c14 0800 mulsl %a4@,%d0 4b94c: 2043 moveal %d3,%a0
#if RTEMS_RAMDISK_TRACE
rtems_ramdisk_printf (rd, "ramdisk write: start=%d, blocks=%d",
req->bufs[0].block, req->bufnum);
#endif
for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++)
4b94e: 5282 addql #1,%d2
#if RTEMS_RAMDISK_TRACE
rtems_ramdisk_printf (rd, "ramdisk write: buf=%d block=%d length=%d off=%d addr=%p",
i, sg->block, sg->length, sg->block * rd->block_size,
to + (sg->block * rd->block_size));
#endif
memcpy(to + (sg->block * rd->block_size), sg->buffer, sg->length);
4b950: 2f2a 0004 movel %a2@(4),%sp@- 4b954: 2f2a 0008 movel %a2@(8),%sp@- 4b958: 4870 0800 pea %a0@(00000000,%d0:l)
#if RTEMS_RAMDISK_TRACE
rtems_ramdisk_printf (rd, "ramdisk write: start=%d, blocks=%d",
req->bufs[0].block, req->bufnum);
#endif
for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++)
4b95c: 45ea 0010 lea %a2@(16),%a2
#if RTEMS_RAMDISK_TRACE
rtems_ramdisk_printf (rd, "ramdisk write: buf=%d block=%d length=%d off=%d addr=%p",
i, sg->block, sg->length, sg->block * rd->block_size,
to + (sg->block * rd->block_size));
#endif
memcpy(to + (sg->block * rd->block_size), sg->buffer, sg->length);
4b960: 4e95 jsr %a5@
#if RTEMS_RAMDISK_TRACE
rtems_ramdisk_printf (rd, "ramdisk write: start=%d, blocks=%d",
req->bufs[0].block, req->bufnum);
#endif
for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++)
4b962: 4fef 000c lea %sp@(12),%sp 4b966: b4ab 0010 cmpl %a3@(16),%d2
4b96a: 65b4 bcss 4b920 <ramdisk_ioctl+0xcc>
4b96c: 6000 ff60 braw 4b8ce <ramdisk_ioctl+0x7a>
0004ba50 <ramdisk_register>:
rtems_blkdev_bnum block_count,
bool trace,
const char *disk,
dev_t *dev_ptr
)
{
4ba50: 4e56 fff0 linkw %fp,#-16
rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_device_major_number major = 0;
4ba54: 204e moveal %fp,%a0
rtems_blkdev_bnum block_count,
bool trace,
const char *disk,
dev_t *dev_ptr
)
{
4ba56: 48d7 001c moveml %d2-%d4,%sp@ 4ba5a: 142e 0013 moveb %fp@(19),%d2
rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_device_major_number major = 0;
4ba5e: 42a0 clrl %a0@-
ramdisk *rd = NULL;
dev_t dev = 0;
sc = rtems_io_register_driver(0, &ramdisk_ops, &major);
4ba60: 2f08 movel %a0,%sp@- 4ba62: 4879 0006 2746 pea 62746 <ramdisk_ops> 4ba68: 42a7 clrl %sp@- 4ba6a: 4eb9 0004 84c4 jsr 484c4 <rtems_io_register_driver>
if (sc != RTEMS_SUCCESSFUL) {
4ba70: 4fef 000c lea %sp@(12),%sp 4ba74: 4a80 tstl %d0
4ba76: 670c beqs 4ba84 <ramdisk_register+0x34> <== ALWAYS TAKEN
return RTEMS_UNSATISFIED;
4ba78: 700d moveq #13,%d0 <== NOT EXECUTED
}
*dev_ptr = dev;
return RTEMS_SUCCESSFUL;
}
4ba7a: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 <== NOT EXECUTED 4ba80: 4e5e unlk %fp <== NOT EXECUTED 4ba82: 4e75 rts <== NOT EXECUTED
sc = rtems_io_register_driver(0, &ramdisk_ops, &major);
if (sc != RTEMS_SUCCESSFUL) {
return RTEMS_UNSATISFIED;
}
rd = ramdisk_allocate(NULL, block_size, block_count, trace);
4ba84: 0282 0000 00ff andil #255,%d2 4ba8a: 2f02 movel %d2,%sp@- 4ba8c: 2f2e 000c movel %fp@(12),%sp@- 4ba90: 2f2e 0008 movel %fp@(8),%sp@- 4ba94: 42a7 clrl %sp@- 4ba96: 4eb9 0004 b970 jsr 4b970 <ramdisk_allocate>
if (rd == NULL) {
4ba9c: 4fef 0010 lea %sp@(16),%sp
sc = rtems_io_register_driver(0, &ramdisk_ops, &major);
if (sc != RTEMS_SUCCESSFUL) {
return RTEMS_UNSATISFIED;
}
rd = ramdisk_allocate(NULL, block_size, block_count, trace);
4baa0: 2800 movel %d0,%d4
if (rd == NULL) {
4baa2: 6762 beqs 4bb06 <ramdisk_register+0xb6> <== NEVER TAKEN
return RTEMS_UNSATISFIED;
}
dev = rtems_filesystem_make_dev_t(major, 0);
sc = rtems_disk_create_phys(
4baa4: 2f2e 0014 movel %fp@(20),%sp@-
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
temp.__overlay.minor = _minor;
return temp.device;
4baa8: 4283 clrl %d3 4baaa: 242e fffc movel %fp@(-4),%d2 4baae: 2f00 movel %d0,%sp@- 4bab0: 4879 0004 b854 pea 4b854 <ramdisk_ioctl> 4bab6: 2f2e 000c movel %fp@(12),%sp@- 4baba: 2f2e 0008 movel %fp@(8),%sp@- 4babe: 2f03 movel %d3,%sp@- 4bac0: 2f02 movel %d2,%sp@- 4bac2: 4eb9 0004 2fc0 jsr 42fc0 <rtems_disk_create_phys>
block_count,
ramdisk_ioctl,
rd,
disk
);
if (sc != RTEMS_SUCCESSFUL) {
4bac8: 4fef 001c lea %sp@(28),%sp 4bacc: 4a80 tstl %d0
4bace: 6616 bnes 4bae6 <ramdisk_register+0x96> <== NEVER TAKEN
rtems_io_unregister_driver(major);
return RTEMS_UNSATISFIED;
}
*dev_ptr = dev;
4bad0: 206e 0018 moveal %fp@(24),%a0
return RTEMS_SUCCESSFUL;
4bad4: 4280 clrl %d0
rtems_io_unregister_driver(major);
return RTEMS_UNSATISFIED;
}
*dev_ptr = dev;
4bad6: 2082 movel %d2,%a0@ 4bad8: 2143 0004 movel %d3,%a0@(4)
return RTEMS_SUCCESSFUL;
}
4badc: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 4bae2: 4e5e unlk %fp 4bae4: 4e75 rts
ramdisk_ioctl,
rd,
disk
);
if (sc != RTEMS_SUCCESSFUL) {
ramdisk_free(rd);
4bae6: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4bae8: 4eb9 0004 ba08 jsr 4ba08 <ramdisk_free> <== NOT EXECUTED
rtems_io_unregister_driver(major);
4baee: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 4baf2: 4eb9 0004 8634 jsr 48634 <rtems_io_unregister_driver> <== NOT EXECUTED
return RTEMS_UNSATISFIED;
4baf8: 508f addql #8,%sp <== NOT EXECUTED 4bafa: 700d moveq #13,%d0 <== NOT EXECUTED
}
*dev_ptr = dev;
return RTEMS_SUCCESSFUL;
}
4bafc: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 <== NOT EXECUTED 4bb02: 4e5e unlk %fp <== NOT EXECUTED 4bb04: 4e75 rts <== NOT EXECUTED
return RTEMS_UNSATISFIED;
}
rd = ramdisk_allocate(NULL, block_size, block_count, trace);
if (rd == NULL) {
rtems_io_unregister_driver(major);
4bb06: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 4bb0a: 4eb9 0004 8634 jsr 48634 <rtems_io_unregister_driver> <== NOT EXECUTED
return RTEMS_UNSATISFIED;
4bb10: 588f addql #4,%sp <== NOT EXECUTED 4bb12: 700d moveq #13,%d0 <== NOT EXECUTED
}
*dev_ptr = dev;
return RTEMS_SUCCESSFUL;
}
4bb14: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 <== NOT EXECUTED 4bb1a: 4e5e unlk %fp <== NOT EXECUTED
...
0005cd08 <read>:
ssize_t read(
int fd,
void *buffer,
size_t count
)
{
5cd08: 4e56 fff4 linkw %fp,#-12 5cd0c: 202e 0008 movel %fp@(8),%d0 5cd10: 222e 000c movel %fp@(12),%d1 5cd14: 206e 0010 moveal %fp@(16),%a0 5cd18: 48d7 040c moveml %d2-%d3/%a2,%sp@
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
5cd1c: b0b9 0005 f792 cmpl 5f792 <rtems_libio_number_iops>,%d0
5cd22: 646a bccs 5cd8e <read+0x86> iop = rtems_libio_iop( fd );
5cd24: 2400 movel %d0,%d2 5cd26: ed88 lsll #6,%d0 5cd28: e78a lsll #3,%d2 5cd2a: 2479 0006 0ef4 moveal 60ef4 <rtems_libio_iops>,%a2 5cd30: 9082 subl %d2,%d0 5cd32: d5c0 addal %d0,%a2
rtems_libio_check_is_open( iop );
5cd34: 202a 0014 movel %a2@(20),%d0 5cd38: 0800 0008 btst #8,%d0
5cd3c: 6750 beqs 5cd8e <read+0x86> rtems_libio_check_buffer( buffer );
5cd3e: 4a81 tstl %d1
5cd40: 6764 beqs 5cda6 <read+0x9e> <== NEVER TAKEN
rtems_libio_check_count( count );
5cd42: 4a88 tstl %a0
5cd44: 673c beqs 5cd82 <read+0x7a> <== NEVER TAKEN
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
5cd46: 0800 0001 btst #1,%d0
5cd4a: 6742 beqs 5cd8e <read+0x86>
/*
* Now process the read().
*/
rc = (*iop->pathinfo.handlers->read_h)( iop, buffer, count );
5cd4c: 226a 0020 moveal %a2@(32),%a1 5cd50: 2f08 movel %a0,%sp@- 5cd52: 2f01 movel %d1,%sp@- 5cd54: 2f0a movel %a2,%sp@- 5cd56: 2069 0008 moveal %a1@(8),%a0 5cd5a: 4e90 jsr %a0@
if ( rc > 0 )
5cd5c: 4fef 000c lea %sp@(12),%sp 5cd60: 4a80 tstl %d0
5cd62: 6f14 bles 5cd78 <read+0x70>
iop->offset += rc;
5cd64: 2600 movel %d0,%d3 5cd66: 5bc2 smi %d2 5cd68: 49c2 extbl %d2 5cd6a: d7aa 0010 addl %d3,%a2@(16) 5cd6e: 222a 000c movel %a2@(12),%d1 5cd72: d382 addxl %d2,%d1 5cd74: 2541 000c movel %d1,%a2@(12)
return rc;
}
5cd78: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 5cd7e: 4e5e unlk %fp 5cd80: 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 );
5cd82: 4280 clrl %d0
if ( rc > 0 )
iop->offset += rc;
return rc;
}
5cd84: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 5cd8a: 4e5e unlk %fp 5cd8c: 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_with_error( iop, LIBIO_FLAGS_READ, EBADF );
5cd8e: 4eb9 0004 f098 jsr 4f098 <__errno> 5cd94: 7209 moveq #9,%d1 5cd96: 2040 moveal %d0,%a0 5cd98: 70ff moveq #-1,%d0
if ( rc > 0 )
iop->offset += rc;
return rc;
}
5cd9a: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
5cda0: 2081 movel %d1,%a0@
if ( rc > 0 )
iop->offset += rc;
return rc;
}
5cda2: 4e5e unlk %fp 5cda4: 4e75 rts
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_buffer( buffer );
5cda6: 4eb9 0004 f098 jsr 4f098 <__errno> <== NOT EXECUTED 5cdac: 7416 moveq #22,%d2 <== NOT EXECUTED 5cdae: 2040 moveal %d0,%a0 <== NOT EXECUTED 5cdb0: 70ff moveq #-1,%d0 <== NOT EXECUTED 5cdb2: 2082 movel %d2,%a0@ <== NOT EXECUTED
if ( rc > 0 )
iop->offset += rc;
return rc;
}
5cdb4: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 5cdba: 4e5e unlk %fp <== NOT EXECUTED
000459e4 <readlink>:
ssize_t readlink(
const char *pathname,
char *buf,
size_t bufsize
)
{
459e4: 4e56 ffe0 linkw %fp,#-32 459e8: 48d7 001c moveml %d2-%d4,%sp@ 459ec: 262e 0008 movel %fp@(8),%d3 459f0: 282e 000c movel %fp@(12),%d4
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
459f4: 6700 009c beqw 45a92 <readlink+0xae>
rtems_set_errno_and_return_minus_one( EFAULT );
result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ),
459f8: 2f03 movel %d3,%sp@- 459fa: 240e movel %fp,%d2 459fc: 0682 ffff ffec addil #-20,%d2 45a02: 4eb9 0005 1fa8 jsr 51fa8 <strlen> 45a08: 4297 clrl %sp@ 45a0a: 2f02 movel %d2,%sp@- 45a0c: 42a7 clrl %sp@- 45a0e: 2f00 movel %d0,%sp@- 45a10: 2f03 movel %d3,%sp@- 45a12: 4eb9 0004 4360 jsr 44360 <rtems_filesystem_evaluate_path>
0, &loc, false );
if ( result != 0 )
45a18: 4fef 0014 lea %sp@(20),%sp 45a1c: 4a80 tstl %d0
45a1e: 6640 bnes 45a60 <readlink+0x7c> <== NEVER TAKEN
return -1;
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
45a20: 206e fff8 moveal %fp@(-8),%a0 45a24: 2f02 movel %d2,%sp@- 45a26: 2068 0010 moveal %a0@(16),%a0 45a2a: 4e90 jsr %a0@ 45a2c: 588f addql #4,%sp 45a2e: 7204 moveq #4,%d1 45a30: b280 cmpl %d0,%d1
45a32: 663a bnes 45a6e <readlink+0x8a>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( EINVAL );
}
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
45a34: 2f2e 0010 movel %fp@(16),%sp@- 45a38: 206e fff8 moveal %fp@(-8),%a0 45a3c: 2f04 movel %d4,%sp@- 45a3e: 2f02 movel %d2,%sp@- 45a40: 2068 003c moveal %a0@(60),%a0 45a44: 4e90 jsr %a0@ 45a46: 2600 movel %d0,%d3
rtems_filesystem_freenode( &loc );
45a48: 2f02 movel %d2,%sp@- 45a4a: 4eb9 0004 4570 jsr 44570 <rtems_filesystem_freenode>
return result;
45a50: 4fef 0010 lea %sp@(16),%sp
}
45a54: 2003 movel %d3,%d0 45a56: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 45a5c: 4e5e unlk %fp 45a5e: 4e75 rts
rtems_set_errno_and_return_minus_one( EFAULT );
result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ),
0, &loc, false );
if ( result != 0 )
return -1;
45a60: 76ff moveq #-1,%d3 <== NOT EXECUTED
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
rtems_filesystem_freenode( &loc );
return result;
}
45a62: 2003 movel %d3,%d0 <== NOT EXECUTED 45a64: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED 45a6a: 4e5e unlk %fp <== NOT EXECUTED 45a6c: 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 );
45a6e: 2f02 movel %d2,%sp@-
rtems_set_errno_and_return_minus_one( EINVAL );
45a70: 76ff moveq #-1,%d3
0, &loc, false );
if ( result != 0 )
return -1;
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
rtems_filesystem_freenode( &loc );
45a72: 4eb9 0004 4570 jsr 44570 <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( EINVAL );
45a78: 4eb9 0005 0c20 jsr 50c20 <__errno> 45a7e: 588f addql #4,%sp 45a80: 2040 moveal %d0,%a0 45a82: 7016 moveq #22,%d0 45a84: 2080 movel %d0,%a0@
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
rtems_filesystem_freenode( &loc );
return result;
}
45a86: 2003 movel %d3,%d0 45a88: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 45a8e: 4e5e unlk %fp 45a90: 4e75 rts
{
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
rtems_set_errno_and_return_minus_one( EFAULT );
45a92: 4eb9 0005 0c20 jsr 50c20 <__errno> 45a98: 76ff moveq #-1,%d3 45a9a: 720e moveq #14,%d1 45a9c: 2040 moveal %d0,%a0
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
rtems_filesystem_freenode( &loc );
return result;
}
45a9e: 2003 movel %d3,%d0 45aa0: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4
{
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
rtems_set_errno_and_return_minus_one( EFAULT );
45aa6: 2081 movel %d1,%a0@
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
rtems_filesystem_freenode( &loc );
return result;
}
45aa8: 4e5e unlk %fp <== NOT EXECUTED
00045140 <readv>:
ssize_t readv(
int fd,
const struct iovec *iov,
int iovcnt
)
{
45140: 4e56 ffe4 linkw %fp,#-28 45144: 202e 0008 movel %fp@(8),%d0 45148: 48d7 0cdc moveml %d2-%d4/%d6-%d7/%a2-%a3,%sp@ 4514c: 246e 000c moveal %fp@(12),%a2 45150: 242e 0010 movel %fp@(16),%d2
int v;
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
45154: b0b9 0006 0212 cmpl 60212 <rtems_libio_number_iops>,%d0 4515a: 6400 00ec bccw 45248 <readv+0x108>
iop = rtems_libio_iop( fd );
4515e: 2200 movel %d0,%d1 45160: ed88 lsll #6,%d0 45162: e789 lsll #3,%d1 45164: 2679 0006 1974 moveal 61974 <rtems_libio_iops>,%a3 4516a: 9081 subl %d1,%d0 4516c: d7c0 addal %d0,%a3
rtems_libio_check_is_open( iop );
4516e: 202b 0014 movel %a3@(20),%d0 45172: 0800 0008 btst #8,%d0 45176: 6700 00d0 beqw 45248 <readv+0x108>
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
4517a: 0800 0001 btst #1,%d0 4517e: 6700 00c8 beqw 45248 <readv+0x108>
/*
* Argument validation on IO vector
*/
if ( !iov )
45182: 4a8a tstl %a2 45184: 6700 008c beqw 45212 <readv+0xd2>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
45188: 4a82 tstl %d2 4518a: 6f00 0086 blew 45212 <readv+0xd2>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
4518e: 0c82 0000 0400 cmpil #1024,%d2
45194: 6e7c bgts 45212 <readv+0xd2> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
45196: 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 )
45198: 4281 clrl %d1 4519a: 4280 clrl %d0 4519c: 7801 moveq #1,%d4
/*
* iov[v].iov_len cannot be less than 0 because size_t is unsigned.
* So we only check for zero.
*/
if ( iov[v].iov_base == 0 )
4519e: 4a90 tstl %a0@
451a0: 6770 beqs 45212 <readv+0xd2>
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
451a2: 2628 0004 movel %a0@(4),%d3 451a6: 2243 moveal %d3,%a1 451a8: d3c0 addal %d0,%a1
if ( total < old )
451aa: b089 cmpl %a1,%d0
451ac: 6e64 bgts 45212 <readv+0xd2>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
all_zeros = false;
451ae: 4a83 tstl %d3 451b0: 57c3 seq %d3
* are obvious errors in the iovec. So this extra loop ensures
* that we do not do anything if there is an argument error.
*/
all_zeros = true;
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
451b2: 5281 addql #1,%d1 451b4: 5088 addql #8,%a0
if ( iov[v].iov_base == 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
451b6: 2009 movel %a1,%d0
if ( total < old )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
all_zeros = false;
451b8: 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++ ) {
451ba: b481 cmpl %d1,%d2
451bc: 66e0 bnes 4519e <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 ) {
451be: 4a04 tstb %d4
451c0: 666a bnes 4522c <readv+0xec>
#include <sys/uio.h>
#include <rtems/libio_.h>
#include <rtems/seterr.h>
ssize_t readv(
451c2: 588a addql #4,%a2 451c4: 4283 clrl %d3 451c6: 4284 clrl %d4
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
bytes = (*iop->pathinfo.handlers->read_h)(
451c8: 206b 0020 moveal %a3@(32),%a0
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
451cc: 5283 addql #1,%d3
bytes = (*iop->pathinfo.handlers->read_h)(
451ce: 2f12 movel %a2@,%sp@- 451d0: 2f2a fffc movel %a2@(-4),%sp@- 451d4: 2f0b movel %a3,%sp@- 451d6: 2068 0008 moveal %a0@(8),%a0 451da: 4e90 jsr %a0@
iop,
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
451dc: 4fef 000c lea %sp@(12),%sp 451e0: 4a80 tstl %d0
451e2: 6d56 blts 4523a <readv+0xfa> <== NEVER TAKEN
return -1;
if ( bytes > 0 ) {
451e4: 6716 beqs 451fc <readv+0xbc> <== NEVER TAKEN
iop->offset += bytes;
total += bytes;
451e6: d880 addl %d0,%d4
if ( bytes < 0 )
return -1;
if ( bytes > 0 ) {
iop->offset += bytes;
451e8: 2e00 movel %d0,%d7 451ea: 5bc6 smi %d6 451ec: 49c6 extbl %d6 451ee: dfab 0010 addl %d7,%a3@(16) 451f2: 222b 000c movel %a3@(12),%d1 451f6: d386 addxl %d6,%d1 451f8: 2741 000c movel %d1,%a3@(12)
total += bytes;
}
if (bytes != iov[ v ].iov_len)
451fc: b092 cmpl %a2@,%d0
451fe: 6606 bnes 45206 <readv+0xc6> <== NEVER TAKEN
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
45200: 508a addql #8,%a2 45202: b483 cmpl %d3,%d2
45204: 66c2 bnes 451c8 <readv+0x88>
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
45206: 2004 movel %d4,%d0 45208: 4cee 0cdc ffe4 moveml %fp@(-28),%d2-%d4/%d6-%d7/%a2-%a3 4520e: 4e5e unlk %fp 45210: 4e75 rts
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old )
rtems_set_errno_and_return_minus_one( EINVAL );
45212: 4eb9 0004 fe28 jsr 4fe28 <__errno> 45218: 78ff moveq #-1,%d4 4521a: 2040 moveal %d0,%a0 4521c: 7016 moveq #22,%d0 4521e: 2080 movel %d0,%a0@
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
45220: 2004 movel %d4,%d0 45222: 4cee 0cdc ffe4 moveml %fp@(-28),%d2-%d4/%d6-%d7/%a2-%a3 45228: 4e5e unlk %fp 4522a: 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;
4522c: 4284 clrl %d4
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
4522e: 2004 movel %d4,%d0 45230: 4cee 0cdc ffe4 moveml %fp@(-28),%d2-%d4/%d6-%d7/%a2-%a3 45236: 4e5e unlk %fp 45238: 4e75 rts
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
return -1;
4523a: 78ff moveq #-1,%d4 <== NOT EXECUTED
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
4523c: 2004 movel %d4,%d0 <== NOT EXECUTED 4523e: 4cee 0cdc ffe4 moveml %fp@(-28),%d2-%d4/%d6-%d7/%a2-%a3 <== NOT EXECUTED 45244: 4e5e unlk %fp <== NOT EXECUTED 45246: 4e75 rts <== NOT EXECUTED
bool all_zeros;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
45248: 4eb9 0004 fe28 jsr 4fe28 <__errno> 4524e: 78ff moveq #-1,%d4 45250: 7209 moveq #9,%d1 45252: 2040 moveal %d0,%a0
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
45254: 2004 movel %d4,%d0 45256: 4cee 0cdc ffe4 moveml %fp@(-28),%d2-%d4/%d6-%d7/%a2-%a3
bool all_zeros;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
4525c: 2081 movel %d1,%a0@
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
4525e: 4e5e unlk %fp
...
0005ce40 <realloc>:
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
5ce40: 7003 moveq #3,%d0
void *realloc(
void *ptr,
size_t size
)
{
5ce42: 4e56 fff0 linkw %fp,#-16
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
5ce46: 52b9 0006 0f1c addql #1,60f1c <rtems_malloc_statistics+0x10>
void *realloc(
void *ptr,
size_t size
)
{
5ce4c: 48d7 001c moveml %d2-%d4,%sp@ 5ce50: 242e 0008 movel %fp@(8),%d2 5ce54: 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())) {
5ce58: b0b9 0006 118c cmpl 6118c <_System_state_Current>,%d0 5ce5e: 6700 0090 beqw 5cef0 <realloc+0xb0>
}
/*
* Continue with realloc().
*/
if ( !ptr )
5ce62: 4a82 tstl %d2 5ce64: 6700 00fa beqw 5cf60 <realloc+0x120>
return malloc( size );
if ( !size ) {
5ce68: 4a83 tstl %d3 5ce6a: 6700 00c2 beqw 5cf2e <realloc+0xee>
free( ptr );
return (void *) 0;
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
5ce6e: 486e fffc pea %fp@(-4) 5ce72: 2f02 movel %d2,%sp@- 5ce74: 2f39 0005 f74a movel 5f74a <RTEMS_Malloc_Heap>,%sp@- 5ce7a: 4eb9 0005 d4e0 jsr 5d4e0 <_Protected_heap_Get_block_size> 5ce80: 4fef 000c lea %sp@(12),%sp 5ce84: 4a00 tstb %d0 5ce86: 6700 00be beqw 5cf46 <realloc+0x106>
}
/*
* Now resize it.
*/
if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, size ) ) {
5ce8a: 2f03 movel %d3,%sp@- 5ce8c: 2f02 movel %d2,%sp@- 5ce8e: 2f39 0005 f74a movel 5f74a <RTEMS_Malloc_Heap>,%sp@- 5ce94: 4eb9 0005 d51c jsr 5d51c <_Protected_heap_Resize_block> 5ce9a: 4fef 000c lea %sp@(12),%sp 5ce9e: 4a00 tstb %d0
5cea0: 670c beqs 5ceae <realloc+0x6e>
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
5cea2: 2002 movel %d2,%d0 5cea4: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5ceaa: 4e5e unlk %fp 5ceac: 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 );
5ceae: 2f03 movel %d3,%sp@- 5ceb0: 4eb9 0004 360c jsr 4360c <malloc>
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
if ( !new_area ) {
5ceb6: 588f addql #4,%sp
* and the C Standard.
*/
new_area = malloc( size );
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
5ceb8: 53b9 0006 0f10 subql #1,60f10 <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 );
5cebe: 2800 movel %d0,%d4
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
if ( !new_area ) {
5cec0: 6740 beqs 5cf02 <realloc+0xc2>
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
5cec2: 202e fffc movel %fp@(-4),%d0 5cec6: b083 cmpl %d3,%d0
5cec8: 6546 bcss 5cf10 <realloc+0xd0> <== ALWAYS TAKEN
5ceca: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5cecc: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5cece: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5ced0: 4eb9 0004 f8b8 jsr 4f8b8 <memcpy> <== NOT EXECUTED
free( ptr );
5ced6: 2f02 movel %d2,%sp@- <== NOT EXECUTED
return new_area;
5ced8: 2404 movel %d4,%d2 <== NOT EXECUTED
if ( !new_area ) {
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
5ceda: 4eb9 0004 32dc jsr 432dc <free> <== NOT EXECUTED
return new_area;
5cee0: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
}
5cee4: 2002 movel %d2,%d0 5cee6: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5ceec: 4e5e unlk %fp 5ceee: 4e75 rts
* This routine returns true if thread dispatch indicates
* that we are in a critical section.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Dispatch_in_critical_section(void)
{
if ( _Thread_Dispatch_disable_level == 0 )
5cef0: 2039 0006 1048 movel 61048 <_Thread_Dispatch_disable_level>,%d0
5cef6: 660a bnes 5cf02 <realloc+0xc2> <== NEVER TAKEN
if (_System_state_Is_up(_System_state_Get())) {
if (_Thread_Dispatch_in_critical_section())
return (void *) 0;
if (_ISR_Nest_level > 0)
5cef8: 4ab9 0006 14a6 tstl 614a6 <_Per_CPU_Information+0x8> 5cefe: 6700 ff62 beqw 5ce62 <realloc+0x22>
new_area = malloc( size );
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
if ( !new_area ) {
return (void *) 0;
5cf02: 4282 clrl %d2
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
5cf04: 2002 movel %d2,%d0 5cf06: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5cf0c: 4e5e unlk %fp 5cf0e: 4e75 rts
if ( !new_area ) {
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
5cf10: 2600 movel %d0,%d3 5cf12: 2f03 movel %d3,%sp@- 5cf14: 2f02 movel %d2,%sp@- 5cf16: 2f04 movel %d4,%sp@- 5cf18: 4eb9 0004 f8b8 jsr 4f8b8 <memcpy>
free( ptr );
5cf1e: 2f02 movel %d2,%sp@-
return new_area;
5cf20: 2404 movel %d4,%d2
if ( !new_area ) {
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
5cf22: 4eb9 0004 32dc jsr 432dc <free>
return new_area;
5cf28: 4fef 0010 lea %sp@(16),%sp 5cf2c: 60b6 bras 5cee4 <realloc+0xa4>
*/
if ( !ptr )
return malloc( size );
if ( !size ) {
free( ptr );
5cf2e: 2f02 movel %d2,%sp@- <== NOT EXECUTED
return (void *) 0;
5cf30: 4282 clrl %d2 <== NOT EXECUTED
*/
if ( !ptr )
return malloc( size );
if ( !size ) {
free( ptr );
5cf32: 4eb9 0004 32dc jsr 432dc <free> <== NOT EXECUTED
return (void *) 0;
5cf38: 588f addql #4,%sp <== NOT EXECUTED
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
5cf3a: 2002 movel %d2,%d0 <== NOT EXECUTED 5cf3c: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 <== NOT EXECUTED 5cf42: 4e5e unlk %fp <== NOT EXECUTED 5cf44: 4e75 rts <== NOT EXECUTED
free( ptr );
return (void *) 0;
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
errno = EINVAL;
5cf46: 4eb9 0004 f098 jsr 4f098 <__errno>
return (void *) 0;
5cf4c: 4282 clrl %d2
free( ptr );
return (void *) 0;
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
errno = EINVAL;
5cf4e: 2040 moveal %d0,%a0 5cf50: 7016 moveq #22,%d0 5cf52: 2080 movel %d0,%a0@
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
5cf54: 2002 movel %d2,%d0 5cf56: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5cf5c: 4e5e unlk %fp 5cf5e: 4e75 rts
/*
* Continue with realloc().
*/
if ( !ptr )
return malloc( size );
5cf60: 2d43 0008 movel %d3,%fp@(8)
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
5cf64: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5cf6a: 4e5e unlk %fp
/*
* Continue with realloc().
*/
if ( !ptr )
return malloc( size );
5cf6c: 4ef9 0004 360c jmp 4360c <malloc>
...
00044434 <rmdir>:
#include <rtems/seterr.h>
int rmdir(
const char *pathname
)
{
44434: 4e56 ffbc linkw %fp,#-68 44438: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 4443c: 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 );
44440: 2f02 movel %d2,%sp@- 44442: 4eb9 0004 34b4 jsr 434b4 <rtems_filesystem_dirname>
if ( parentpathlen == 0 )
44448: 588f addql #4,%sp 4444a: 4a80 tstl %d0 4444c: 6600 0088 bnew 444d6 <rmdir+0xa2>
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
44450: 45ee ffd4 lea %fp@(-44),%a2 44454: 4283 clrl %d3
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
name = pathname + parentpathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
44456: 47f9 0005 0ad4 lea 50ad4 <strlen>,%a3
*/
parentpathlen = rtems_filesystem_dirname ( pathname );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
4445c: 2f0a movel %a2,%sp@- 4445e: 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;
44462: 4204 clrb %d4
*/
parentpathlen = rtems_filesystem_dirname ( pathname );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
44464: 2f02 movel %d2,%sp@-
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
name = pathname + parentpathlen;
44466: d483 addl %d3,%d2
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
44468: 260e movel %fp,%d3 4446a: 0683 ffff ffe8 addil #-24,%d3
*/
parentpathlen = rtems_filesystem_dirname ( pathname );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
44470: 4eb9 0004 4600 jsr 44600 <rtems_filesystem_get_start_loc>
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
44476: 2d52 ffe8 movel %a2@,%fp@(-24)
*/
parentpathlen = rtems_filesystem_dirname ( pathname );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
4447a: 4fef 000c lea %sp@(12),%sp
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
4447e: 2d6e ffd8 ffec movel %fp@(-40),%fp@(-20) 44484: 2d6e ffdc fff0 movel %fp@(-36),%fp@(-16) 4448a: 2d6e ffe0 fff4 movel %fp@(-32),%fp@(-12) 44490: 2d6e ffe4 fff8 movel %fp@(-28),%fp@(-8)
name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) );
44496: 2f02 movel %d2,%sp@- 44498: 4e93 jsr %a3@ 4449a: 2e80 movel %d0,%sp@ 4449c: 2f02 movel %d2,%sp@- 4449e: 4eb9 0004 34f6 jsr 434f6 <rtems_filesystem_prefix_separators> 444a4: d480 addl %d0,%d2
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
444a6: 2f02 movel %d2,%sp@- 444a8: 4e93 jsr %a3@ 444aa: 4297 clrl %sp@ 444ac: 2f03 movel %d3,%sp@- 444ae: 42a7 clrl %sp@- 444b0: 2f00 movel %d0,%sp@- 444b2: 2f02 movel %d2,%sp@- 444b4: 4eb9 0004 33f8 jsr 433f8 <rtems_filesystem_evaluate_relative_path>
0, &loc, false );
if ( result != 0 ) {
444ba: 4fef 001c lea %sp@(28),%sp 444be: 4a80 tstl %d0 444c0: 6700 0090 beqw 44552 <rmdir+0x11e>
if ( free_parentloc )
444c4: 4a04 tstb %d4 444c6: 6600 00dc bnew 445a4 <rmdir+0x170>
rtems_filesystem_freenode( &parentloc );
return -1;
444ca: 70ff moveq #-1,%d0
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return result;
}
444cc: 4cee 0c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a3 444d2: 4e5e unlk %fp 444d4: 4e75 rts
parentpathlen = rtems_filesystem_dirname ( pathname );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
else {
result = rtems_filesystem_evaluate_path(pathname, parentpathlen,
444d6: 42a7 clrl %sp@- 444d8: 45ee ffd4 lea %fp@(-44),%a2 444dc: 2600 movel %d0,%d3 444de: 2f0a movel %a2,%sp@- 444e0: 4878 0002 pea 2 <DOUBLE_FLOAT> 444e4: 2f00 movel %d0,%sp@- 444e6: 2f02 movel %d2,%sp@- 444e8: 4eb9 0004 3468 jsr 43468 <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
444ee: 4fef 0014 lea %sp@(20),%sp 444f2: 4a80 tstl %d0
444f4: 66d4 bnes 444ca <rmdir+0x96> <== NEVER TAKEN
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
444f6: 2d52 ffe8 movel %a2@,%fp@(-24)
name = pathname + parentpathlen;
444fa: d483 addl %d3,%d2
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
444fc: 47f9 0005 0ad4 lea 50ad4 <strlen>,%a3
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
44502: 260e movel %fp,%d3 44504: 0683 ffff ffe8 addil #-24,%d3
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
4450a: 2d6e ffd8 ffec movel %fp@(-40),%fp@(-20) 44510: 2d6e ffdc fff0 movel %fp@(-36),%fp@(-16) 44516: 2d6e ffe0 fff4 movel %fp@(-32),%fp@(-12) 4451c: 2d6e ffe4 fff8 movel %fp@(-28),%fp@(-8)
name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) );
44522: 2f02 movel %d2,%sp@-
&parentloc,
false );
if ( result != 0 )
return -1;
free_parentloc = true;
44524: 7801 moveq #1,%d4
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
name = pathname + parentpathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
44526: 4e93 jsr %a3@ 44528: 2e80 movel %d0,%sp@ 4452a: 2f02 movel %d2,%sp@- 4452c: 4eb9 0004 34f6 jsr 434f6 <rtems_filesystem_prefix_separators> 44532: d480 addl %d0,%d2
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
44534: 2f02 movel %d2,%sp@- 44536: 4e93 jsr %a3@ 44538: 4297 clrl %sp@ 4453a: 2f03 movel %d3,%sp@- 4453c: 42a7 clrl %sp@- 4453e: 2f00 movel %d0,%sp@- 44540: 2f02 movel %d2,%sp@- 44542: 4eb9 0004 33f8 jsr 433f8 <rtems_filesystem_evaluate_relative_path>
0, &loc, false );
if ( result != 0 ) {
44548: 4fef 001c lea %sp@(28),%sp 4454c: 4a80 tstl %d0 4454e: 6600 ff74 bnew 444c4 <rmdir+0x90>
}
/*
* Verify you can remove this node as a directory.
*/
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
44552: 206e fff4 moveal %fp@(-12),%a0 44556: 2f03 movel %d3,%sp@- 44558: 2068 0010 moveal %a0@(16),%a0 4455c: 4e90 jsr %a0@ 4455e: 588f addql #4,%sp 44560: 7201 moveq #1,%d1 44562: b280 cmpl %d0,%d1
44564: 665c bnes 445c2 <rmdir+0x18e>
/*
* Use the filesystems rmnod to remove the node.
*/
result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
44566: 2f03 movel %d3,%sp@- 44568: 206e fff0 moveal %fp@(-16),%a0 4456c: 2f0a movel %a2,%sp@- 4456e: 2068 0034 moveal %a0@(52),%a0
rtems_filesystem_freenode( &loc );
44572: 47f9 0004 354c lea 4354c <rtems_filesystem_freenode>,%a3
/*
* Use the filesystems rmnod to remove the node.
*/
result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
44578: 4e90 jsr %a0@
rtems_filesystem_freenode( &loc );
4457a: 2f03 movel %d3,%sp@- 4457c: 2d40 ffd0 movel %d0,%fp@(-48) 44580: 4e93 jsr %a3@
if ( free_parentloc )
44582: 202e ffd0 movel %fp@(-48),%d0 44586: 4fef 000c lea %sp@(12),%sp 4458a: 4a04 tstb %d4 4458c: 6700 ff3e beqw 444cc <rmdir+0x98>
rtems_filesystem_freenode( &parentloc );
44590: 2f0a movel %a2,%sp@- 44592: 4e93 jsr %a3@ 44594: 202e ffd0 movel %fp@(-48),%d0 44598: 588f addql #4,%sp
return result;
}
4459a: 4cee 0c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a3 445a0: 4e5e unlk %fp 445a2: 4e75 rts
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return -1;
445a4: 70ff moveq #-1,%d0
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
445a6: 2f0a movel %a2,%sp@- 445a8: 2d40 ffd0 movel %d0,%fp@(-48) 445ac: 4eb9 0004 354c jsr 4354c <rtems_filesystem_freenode> 445b2: 202e ffd0 movel %fp@(-48),%d0 445b6: 588f addql #4,%sp
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return result;
}
445b8: 4cee 0c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a3 445be: 4e5e unlk %fp 445c0: 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 );
445c2: 2f03 movel %d3,%sp@- 445c4: 47f9 0004 354c lea 4354c <rtems_filesystem_freenode>,%a3 445ca: 4e93 jsr %a3@
if ( free_parentloc )
445cc: 588f addql #4,%sp 445ce: 4a04 tstb %d4
445d0: 6618 bnes 445ea <rmdir+0x1b6> <== ALWAYS TAKEN
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTDIR );
445d2: 4eb9 0004 f768 jsr 4f768 <__errno> <== NOT EXECUTED 445d8: 7214 moveq #20,%d1 <== NOT EXECUTED 445da: 2040 moveal %d0,%a0 <== NOT EXECUTED 445dc: 70ff moveq #-1,%d0 <== NOT EXECUTED 445de: 2081 movel %d1,%a0@ <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return result;
}
445e0: 4cee 0c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a3 445e6: 4e5e unlk %fp 445e8: 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 );
445ea: 2f0a movel %a2,%sp@- 445ec: 4e93 jsr %a3@ 445ee: 588f addql #4,%sp
rtems_set_errno_and_return_minus_one( ENOTDIR );
445f0: 4eb9 0004 f768 jsr 4f768 <__errno> 445f6: 7214 moveq #20,%d1 445f8: 2040 moveal %d0,%a0 445fa: 70ff moveq #-1,%d0 445fc: 2081 movel %d1,%a0@ 445fe: 60e0 bras 445e0 <rmdir+0x1ac>
00047a9e <rtems_aio_enqueue>:
* errno - otherwise
*/
int
rtems_aio_enqueue (rtems_aio_request *req)
{
47a9e: 4e56 ffc4 linkw %fp,#-60 47aa2: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@
struct sched_param param;
/* The queue should be initialized */
AIO_assert (aio_request_queue.initialized == AIO_QUEUE_INITIALIZED);
result = pthread_mutex_lock (&aio_request_queue.mutex);
47aa6: 4879 0006 3de8 pea 63de8 <aio_request_queue> 47aac: 47f9 0004 8510 lea 48510 <pthread_mutex_lock>,%a3
* errno - otherwise
*/
int
rtems_aio_enqueue (rtems_aio_request *req)
{
47ab2: 246e 0008 moveal %fp@(8),%a2
struct sched_param param;
/* The queue should be initialized */
AIO_assert (aio_request_queue.initialized == AIO_QUEUE_INITIALIZED);
result = pthread_mutex_lock (&aio_request_queue.mutex);
47ab6: 4e93 jsr %a3@
if (result != 0) {
47ab8: 588f addql #4,%sp
struct sched_param param;
/* The queue should be initialized */
AIO_assert (aio_request_queue.initialized == AIO_QUEUE_INITIALIZED);
result = pthread_mutex_lock (&aio_request_queue.mutex);
47aba: 2400 movel %d0,%d2
if (result != 0) {
47abc: 6600 00ba bnew 47b78 <rtems_aio_enqueue+0xda>
return result;
}
/* _POSIX_PRIORITIZED_IO and _POSIX_PRIORITY_SCHEDULING are defined,
we can use aio_reqprio to lower the priority of the request */
pthread_getschedparam (pthread_self(), &policy, ¶m);
47ac0: 49f9 0004 8e38 lea 48e38 <pthread_self>,%a4 47ac6: 4e94 jsr %a4@ 47ac8: 486e ffdc pea %fp@(-36) 47acc: 486e fffc pea %fp@(-4) 47ad0: 2f00 movel %d0,%sp@- 47ad2: 4eb9 0004 89a8 jsr 489a8 <pthread_getschedparam>
req->caller_thread = pthread_self ();
47ad8: 4e94 jsr %a4@
req->priority = param.sched_priority - req->aiocbp->aio_reqprio;
47ada: 206a 0014 moveal %a2@(20),%a0
req->policy = policy;
req->aiocbp->error_code = EINPROGRESS;
req->aiocbp->return_value = 0;
if ((aio_request_queue.idle_threads == 0) &&
47ade: 4fef 000c lea %sp@(12),%sp
/* _POSIX_PRIORITIZED_IO and _POSIX_PRIORITY_SCHEDULING are defined,
we can use aio_reqprio to lower the priority of the request */
pthread_getschedparam (pthread_self(), &policy, ¶m);
req->caller_thread = pthread_self ();
req->priority = param.sched_priority - req->aiocbp->aio_reqprio;
47ae2: 222e ffdc movel %fp@(-36),%d1 47ae6: 92a8 0014 subl %a0@(20),%d1
req->policy = policy;
47aea: 256e fffc 0008 movel %fp@(-4),%a2@(8)
/* _POSIX_PRIORITIZED_IO and _POSIX_PRIORITY_SCHEDULING are defined,
we can use aio_reqprio to lower the priority of the request */
pthread_getschedparam (pthread_self(), &policy, ¶m);
req->caller_thread = pthread_self ();
47af0: 2540 0010 movel %d0,%a2@(16)
req->priority = param.sched_priority - req->aiocbp->aio_reqprio; req->policy = policy; req->aiocbp->error_code = EINPROGRESS;
47af4: 7077 moveq #119,%d0
/* _POSIX_PRIORITIZED_IO and _POSIX_PRIORITY_SCHEDULING are defined,
we can use aio_reqprio to lower the priority of the request */
pthread_getschedparam (pthread_self(), &policy, ¶m);
req->caller_thread = pthread_self ();
req->priority = param.sched_priority - req->aiocbp->aio_reqprio;
47af6: 2541 000c movel %d1,%a2@(12)
req->policy = policy; req->aiocbp->error_code = EINPROGRESS;
47afa: 2140 0030 movel %d0,%a0@(48)
req->aiocbp->return_value = 0;
47afe: 42a8 0034 clrl %a0@(52)
if ((aio_request_queue.idle_threads == 0) &&
47b02: 4ab9 0006 3e50 tstl 63e50 <aio_request_queue+0x68>
47b08: 660a bnes 47b14 <rtems_aio_enqueue+0x76> <== NEVER TAKEN
47b0a: 7204 moveq #4,%d1 47b0c: b2b9 0006 3e4c cmpl 63e4c <aio_request_queue+0x64>,%d1
47b12: 6c7a bges 47b8e <rtems_aio_enqueue+0xf0>
else
{
/* the maximum number of threads has been already created
even though some of them might be idle.
The request belongs to one of the active fd chain */
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req,
47b14: 42a7 clrl %sp@- 47b16: 2f10 movel %a0@,%sp@- 47b18: 4bf9 0004 75c2 lea 475c2 <rtems_aio_search_fd>,%a5 47b1e: 4879 0006 3e30 pea 63e30 <aio_request_queue+0x48> 47b24: 4e95 jsr %a5@
req->aiocbp->aio_fildes, 0);
if (r_chain != NULL)
47b26: 4fef 000c lea %sp@(12),%sp
else
{
/* the maximum number of threads has been already created
even though some of them might be idle.
The request belongs to one of the active fd chain */
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req,
47b2a: 2840 moveal %d0,%a4
req->aiocbp->aio_fildes, 0);
if (r_chain != NULL)
47b2c: 4a80 tstl %d0 47b2e: 6700 00e0 beqw 47c10 <rtems_aio_enqueue+0x172>
{
pthread_mutex_lock (&r_chain->mutex);
47b32: 260c movel %a4,%d3 47b34: 0683 0000 001c addil #28,%d3
rtems_aio_insert_prio (&r_chain->perfd, req); pthread_cond_signal (&r_chain->cond); pthread_mutex_unlock (&r_chain->mutex);
47b3a: 4bf9 0004 85ac lea 485ac <pthread_mutex_unlock>,%a5
The request belongs to one of the active fd chain */
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req,
req->aiocbp->aio_fildes, 0);
if (r_chain != NULL)
{
pthread_mutex_lock (&r_chain->mutex);
47b40: 2f03 movel %d3,%sp@- 47b42: 4e93 jsr %a3@
rtems_aio_insert_prio (&r_chain->perfd, req);
47b44: 2f0a movel %a2,%sp@- 47b46: 486c 0008 pea %a4@(8) 47b4a: 4eb9 0004 7992 jsr 47992 <rtems_aio_insert_prio>
pthread_cond_signal (&r_chain->cond);
47b50: 486c 0020 pea %a4@(32) 47b54: 4eb9 0004 8098 jsr 48098 <pthread_cond_signal>
pthread_mutex_unlock (&r_chain->mutex);
47b5a: 2f03 movel %d3,%sp@- 47b5c: 4e95 jsr %a5@ 47b5e: 4fef 0014 lea %sp@(20),%sp
if (aio_request_queue.idle_threads > 0)
pthread_cond_signal (&aio_request_queue.new_req);
}
}
pthread_mutex_unlock (&aio_request_queue.mutex);
47b62: 4879 0006 3de8 pea 63de8 <aio_request_queue> 47b68: 4e95 jsr %a5@
return 0;
47b6a: 588f addql #4,%sp
}
47b6c: 2002 movel %d2,%d0 47b6e: 4cee 3c0c ffc4 moveml %fp@(-60),%d2-%d3/%a2-%a5 47b74: 4e5e unlk %fp 47b76: 4e75 rts
/* The queue should be initialized */
AIO_assert (aio_request_queue.initialized == AIO_QUEUE_INITIALIZED);
result = pthread_mutex_lock (&aio_request_queue.mutex);
if (result != 0) {
free (req);
47b78: 2f0a movel %a2,%sp@- <== NOT EXECUTED 47b7a: 4eb9 0004 3c9c jsr 43c9c <free> <== NOT EXECUTED
return result;
47b80: 588f addql #4,%sp <== NOT EXECUTED
}
}
pthread_mutex_unlock (&aio_request_queue.mutex);
return 0;
}
47b82: 2002 movel %d2,%d0 <== NOT EXECUTED 47b84: 4cee 3c0c ffc4 moveml %fp@(-60),%d2-%d3/%a2-%a5 <== NOT EXECUTED 47b8a: 4e5e unlk %fp <== NOT EXECUTED 47b8c: 4e75 rts <== NOT EXECUTED
if ((aio_request_queue.idle_threads == 0) &&
aio_request_queue.active_threads < AIO_MAX_THREADS)
/* we still have empty places on the active_threads chain */
{
chain = &aio_request_queue.work_req;
r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1);
47b8e: 4878 0001 pea 1 <ADD> 47b92: 2f10 movel %a0@,%sp@- 47b94: 4879 0006 3e30 pea 63e30 <aio_request_queue+0x48> 47b9a: 4eb9 0004 75c2 jsr 475c2 <rtems_aio_search_fd>
if (r_chain->new_fd == 1) {
47ba0: 4fef 000c lea %sp@(12),%sp
if ((aio_request_queue.idle_threads == 0) &&
aio_request_queue.active_threads < AIO_MAX_THREADS)
/* we still have empty places on the active_threads chain */
{
chain = &aio_request_queue.work_req;
r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1);
47ba4: 2840 moveal %d0,%a4
if (r_chain->new_fd == 1) {
47ba6: 7001 moveq #1,%d0 47ba8: b0ac 0018 cmpl %a4@(24),%d0
47bac: 6684 bnes 47b32 <rtems_aio_enqueue+0x94>
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
47bae: 2f0a movel %a2,%sp@- 47bb0: 486c 0008 pea %a4@(8) 47bb4: 4eb9 0004 a124 jsr 4a124 <_Chain_Insert>
rtems_chain_prepend (&r_chain->perfd, &req->next_prio); r_chain->new_fd = 0;
47bba: 42ac 0018 clrl %a4@(24)
pthread_mutex_init (&r_chain->mutex, NULL);
47bbe: 42a7 clrl %sp@- 47bc0: 486c 001c pea %a4@(28) 47bc4: 4eb9 0004 83d8 jsr 483d8 <pthread_mutex_init>
pthread_cond_init (&r_chain->cond, NULL);
47bca: 42a7 clrl %sp@- 47bcc: 486c 0020 pea %a4@(32) 47bd0: 4eb9 0004 7fd4 jsr 47fd4 <pthread_cond_init>
AIO_printf ("New thread \n");
result = pthread_create (&thid, &aio_request_queue.attr,
47bd6: 2f0c movel %a4,%sp@- 47bd8: 487a fb20 pea %pc@(476fa <rtems_aio_handle>) 47bdc: 4879 0006 3df0 pea 63df0 <aio_request_queue+0x8> 47be2: 486e fff8 pea %fp@(-8) 47be6: 4eb9 0004 872c jsr 4872c <pthread_create>
rtems_aio_handle, (void *) r_chain);
if (result != 0) {
47bec: 4fef 0028 lea %sp@(40),%sp 47bf0: 4a80 tstl %d0 47bf2: 6600 00b4 bnew 47ca8 <rtems_aio_enqueue+0x20a>
if (aio_request_queue.idle_threads > 0)
pthread_cond_signal (&aio_request_queue.new_req);
}
}
pthread_mutex_unlock (&aio_request_queue.mutex);
47bf6: 4879 0006 3de8 pea 63de8 <aio_request_queue>
rtems_aio_handle, (void *) r_chain);
if (result != 0) {
pthread_mutex_unlock (&aio_request_queue.mutex);
return result;
}
++aio_request_queue.active_threads;
47bfc: 52b9 0006 3e4c addql #1,63e4c <aio_request_queue+0x64> 47c02: 4bf9 0004 85ac lea 485ac <pthread_mutex_unlock>,%a5
if (aio_request_queue.idle_threads > 0)
pthread_cond_signal (&aio_request_queue.new_req);
}
}
pthread_mutex_unlock (&aio_request_queue.mutex);
47c08: 4e95 jsr %a5@
return 0;
47c0a: 588f addql #4,%sp 47c0c: 6000 ff5e braw 47b6c <rtems_aio_enqueue+0xce>
} else {
/* or to the idle chain */
chain = &aio_request_queue.idle_req;
r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1);
47c10: 4878 0001 pea 1 <ADD> 47c14: 206a 0014 moveal %a2@(20),%a0 47c18: 2f10 movel %a0@,%sp@- 47c1a: 4879 0006 3e3c pea 63e3c <aio_request_queue+0x54> 47c20: 4e95 jsr %a5@
if (r_chain->new_fd == 1) {
47c22: 4fef 000c lea %sp@(12),%sp 47c26: 7201 moveq #1,%d1
} else {
/* or to the idle chain */
chain = &aio_request_queue.idle_req;
r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1);
47c28: 2640 moveal %d0,%a3
if (r_chain->new_fd == 1) {
47c2a: b2ab 0018 cmpl %a3@(24),%d1
47c2e: 673a beqs 47c6a <rtems_aio_enqueue+0x1cc> r_chain->new_fd = 0; pthread_mutex_init (&r_chain->mutex, NULL); pthread_cond_init (&r_chain->cond, NULL); } else /* just insert the request in the existing fd chain */ rtems_aio_insert_prio (&r_chain->perfd, req);
47c30: 2f0a movel %a2,%sp@- 47c32: 486b 0008 pea %a3@(8) 47c36: 4bf9 0004 85ac lea 485ac <pthread_mutex_unlock>,%a5 47c3c: 4eb9 0004 7992 jsr 47992 <rtems_aio_insert_prio> 47c42: 508f addql #8,%sp
if (aio_request_queue.idle_threads > 0)
47c44: 4ab9 0006 3e50 tstl 63e50 <aio_request_queue+0x68> 47c4a: 6f00 ff16 blew 47b62 <rtems_aio_enqueue+0xc4>
pthread_cond_signal (&aio_request_queue.new_req);
47c4e: 4879 0006 3dec pea 63dec <aio_request_queue+0x4> <== NOT EXECUTED 47c54: 4eb9 0004 8098 jsr 48098 <pthread_cond_signal> <== NOT EXECUTED 47c5a: 588f addql #4,%sp <== NOT EXECUTED
}
}
pthread_mutex_unlock (&aio_request_queue.mutex);
47c5c: 4879 0006 3de8 pea 63de8 <aio_request_queue> <== NOT EXECUTED 47c62: 4e95 jsr %a5@ <== NOT EXECUTED
return 0;
47c64: 588f addql #4,%sp <== NOT EXECUTED 47c66: 6000 ff04 braw 47b6c <rtems_aio_enqueue+0xce> <== NOT EXECUTED
47c6a: 2f0a movel %a2,%sp@- 47c6c: 486b 0008 pea %a3@(8) 47c70: 4bf9 0004 85ac lea 485ac <pthread_mutex_unlock>,%a5 47c76: 4eb9 0004 a124 jsr 4a124 <_Chain_Insert>
if (r_chain->new_fd == 1) {
/* If this is a new fd chain we signal the idle threads that
might be waiting for requests */
AIO_printf (" New chain on waiting queue \n ");
rtems_chain_prepend (&r_chain->perfd, &req->next_prio);
r_chain->new_fd = 0;
47c7c: 42ab 0018 clrl %a3@(24)
pthread_mutex_init (&r_chain->mutex, NULL);
47c80: 42a7 clrl %sp@- 47c82: 486b 001c pea %a3@(28) 47c86: 4eb9 0004 83d8 jsr 483d8 <pthread_mutex_init>
pthread_cond_init (&r_chain->cond, NULL);
47c8c: 42a7 clrl %sp@- 47c8e: 486b 0020 pea %a3@(32) 47c92: 4eb9 0004 7fd4 jsr 47fd4 <pthread_cond_init> 47c98: 4fef 0018 lea %sp@(24),%sp
} else /* just insert the request in the existing fd chain */ rtems_aio_insert_prio (&r_chain->perfd, req); if (aio_request_queue.idle_threads > 0)
47c9c: 4ab9 0006 3e50 tstl 63e50 <aio_request_queue+0x68>
47ca2: 6eaa bgts 47c4e <rtems_aio_enqueue+0x1b0> <== NEVER TAKEN
47ca4: 6000 febc braw 47b62 <rtems_aio_enqueue+0xc4>
AIO_printf ("New thread \n");
result = pthread_create (&thid, &aio_request_queue.attr,
rtems_aio_handle, (void *) r_chain);
if (result != 0) {
pthread_mutex_unlock (&aio_request_queue.mutex);
47ca8: 4879 0006 3de8 pea 63de8 <aio_request_queue> <== NOT EXECUTED
return result;
47cae: 2400 movel %d0,%d2 <== NOT EXECUTED
AIO_printf ("New thread \n");
result = pthread_create (&thid, &aio_request_queue.attr,
rtems_aio_handle, (void *) r_chain);
if (result != 0) {
pthread_mutex_unlock (&aio_request_queue.mutex);
47cb0: 4eb9 0004 85ac jsr 485ac <pthread_mutex_unlock> <== NOT EXECUTED
return result;
47cb6: 588f addql #4,%sp <== NOT EXECUTED
}
}
pthread_mutex_unlock (&aio_request_queue.mutex);
return 0;
}
47cb8: 2002 movel %d2,%d0 <== NOT EXECUTED 47cba: 4cee 3c0c ffc4 moveml %fp@(-60),%d2-%d3/%a2-%a5 <== NOT EXECUTED 47cc0: 4e5e unlk %fp <== NOT EXECUTED
000476fa <rtems_aio_handle>:
* NULL - if error
*/
static void *
rtems_aio_handle (void *arg)
{
476fa: 4e56 ffb0 linkw %fp,#-80 476fe: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
rtems_aio_request_chain *r_chain = arg;
47702: 286e 0008 moveal %fp@(8),%a4 47706: 2a3c 0004 8510 movel #296208,%d5 4770c: 240c movel %a4,%d2
node = rtems_chain_first (chain);
req = (rtems_aio_request *) node;
/* See _POSIX_PRIORITIZE_IO and _POSIX_PRIORITY_SCHEDULING
discussion in rtems_aio_enqueue () */
pthread_getschedparam (pthread_self(), &policy, ¶m);
4770e: 260e movel %fp,%d3 47710: 2c0e movel %fp,%d6 47712: 0682 0000 001c addil #28,%d2
/* acquire the mutex of the current fd chain.
we don't need to lock the queue mutex since we can
add requests to idle fd chains or even active ones
if the working request has been extracted from the
chain */
result = pthread_mutex_lock (&r_chain->mutex);
47718: 2e05 movel %d5,%d7
struct timespec timeout;
AIO_printf ("Chain is empty [WQ], wait for work\n");
pthread_mutex_unlock (&r_chain->mutex);
4771a: 4bf9 0004 85ac lea 485ac <pthread_mutex_unlock>,%a5
node = rtems_chain_first (chain);
req = (rtems_aio_request *) node;
/* See _POSIX_PRIORITIZE_IO and _POSIX_PRIORITY_SCHEDULING
discussion in rtems_aio_enqueue () */
pthread_getschedparam (pthread_self(), &policy, ¶m);
47720: 0683 ffff ffd8 addil #-40,%d3 47726: 5986 subql #4,%d6
/* acquire the mutex of the current fd chain.
we don't need to lock the queue mutex since we can
add requests to idle fd chains or even active ones
if the working request has been extracted from the
chain */
result = pthread_mutex_lock (&r_chain->mutex);
47728: 2f02 movel %d2,%sp@- 4772a: 2045 moveal %d5,%a0 4772c: 4e90 jsr %a0@
if (result != 0)
4772e: 588f addql #4,%sp 47730: 4a80 tstl %d0 47732: 6600 008e bnew 477c2 <rtems_aio_handle+0xc8>
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
47736: 200c movel %a4,%d0 47738: 0680 0000 000c addil #12,%d0
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
4773e: 246c 0008 moveal %a4@(8),%a2
/* If the locked chain is not empty, take the first
request extract it, unlock the chain and process
the request, in this way the user can supply more
requests to this fd chain */
if (!rtems_chain_is_empty (chain)) {
47742: b08a cmpl %a2,%d0 47744: 6700 00e6 beqw 4782c <rtems_aio_handle+0x132>
node = rtems_chain_first (chain);
req = (rtems_aio_request *) node;
/* See _POSIX_PRIORITIZE_IO and _POSIX_PRIORITY_SCHEDULING
discussion in rtems_aio_enqueue () */
pthread_getschedparam (pthread_self(), &policy, ¶m);
47748: 47f9 0004 8e38 lea 48e38 <pthread_self>,%a3 4774e: 4e93 jsr %a3@ 47750: 2f03 movel %d3,%sp@- 47752: 2f06 movel %d6,%sp@- 47754: 2f00 movel %d0,%sp@- 47756: 4eb9 0004 89a8 jsr 489a8 <pthread_getschedparam>
param.sched_priority = req->priority;
4775c: 2d6a 000c ffd8 movel %a2@(12),%fp@(-40)
pthread_setschedparam (pthread_self(), req->policy, ¶m);
47762: 282a 0008 movel %a2@(8),%d4 47766: 4e93 jsr %a3@ 47768: 2f03 movel %d3,%sp@- 4776a: 2f04 movel %d4,%sp@- 4776c: 2f00 movel %d0,%sp@- 4776e: 4eb9 0004 8e4c jsr 48e4c <pthread_setschedparam>
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
47774: 2f0a movel %a2,%sp@- 47776: 4eb9 0004 a0c0 jsr 4a0c0 <_Chain_Extract>
rtems_chain_extract (node);
pthread_mutex_unlock (&r_chain->mutex);
4777c: 2f02 movel %d2,%sp@- 4777e: 4e95 jsr %a5@
switch (req->aiocbp->aio_lio_opcode) {
47780: 266a 0014 moveal %a2@(20),%a3 47784: 4fef 0020 lea %sp@(32),%sp 47788: 7202 moveq #2,%d1 4778a: 202b 002c movel %a3@(44),%d0 4778e: b280 cmpl %d0,%d1
47790: 677c beqs 4780e <rtems_aio_handle+0x114>
47792: 123c 0003 moveb #3,%d1 47796: b280 cmpl %d0,%d1
47798: 6768 beqs 47802 <rtems_aio_handle+0x108> <== NEVER TAKEN
4779a: 123c 0001 moveb #1,%d1 4779e: b280 cmpl %d0,%d1
477a0: 672c beqs 477ce <rtems_aio_handle+0xd4> <== ALWAYS TAKEN
default:
result = -1;
}
if (result == -1) {
req->aiocbp->return_value = -1;
477a2: 70ff moveq #-1,%d0 <== NOT EXECUTED 477a4: 2740 0034 movel %d0,%a3@(52) <== NOT EXECUTED
req->aiocbp->error_code = errno;
477a8: 4eb9 0005 1b40 jsr 51b40 <__errno> <== NOT EXECUTED 477ae: 2040 moveal %d0,%a0 <== NOT EXECUTED 477b0: 2750 0030 movel %a0@,%a3@(48) <== NOT EXECUTED
/* acquire the mutex of the current fd chain.
we don't need to lock the queue mutex since we can
add requests to idle fd chains or even active ones
if the working request has been extracted from the
chain */
result = pthread_mutex_lock (&r_chain->mutex);
477b4: 2f02 movel %d2,%sp@- <== NOT EXECUTED 477b6: 2045 moveal %d5,%a0 <== NOT EXECUTED 477b8: 4e90 jsr %a0@ <== NOT EXECUTED
if (result != 0)
477ba: 588f addql #4,%sp <== NOT EXECUTED 477bc: 4a80 tstl %d0 <== NOT EXECUTED 477be: 6700 ff76 beqw 47736 <rtems_aio_handle+0x3c> <== NOT EXECUTED
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
477c2: 4280 clrl %d0 <== NOT EXECUTED 477c4: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 <== NOT EXECUTED 477ca: 4e5e unlk %fp <== NOT EXECUTED 477cc: 4e75 rts <== NOT EXECUTED
pthread_mutex_unlock (&r_chain->mutex);
switch (req->aiocbp->aio_lio_opcode) {
case LIO_READ:
AIO_printf ("read\n");
result = pread (req->aiocbp->aio_fildes,
477ce: 2f2b 0008 movel %a3@(8),%sp@- 477d2: 2f2b 0004 movel %a3@(4),%sp@- 477d6: 2f2b 0010 movel %a3@(16),%sp@- 477da: 2f2b 000c movel %a3@(12),%sp@- 477de: 2f13 movel %a3@,%sp@- 477e0: 4eb9 0005 2560 jsr 52560 <pread>
(void *) req->aiocbp->aio_buf,
req->aiocbp->aio_nbytes, req->aiocbp->aio_offset);
break;
477e6: 4fef 0014 lea %sp@(20),%sp
break;
default:
result = -1;
}
if (result == -1) {
477ea: 72ff moveq #-1,%d1 477ec: b280 cmpl %d0,%d1 477ee: 6700 0168 beqw 47958 <rtems_aio_handle+0x25e>
req->aiocbp->return_value = -1;
req->aiocbp->error_code = errno;
} else {
req->aiocbp->return_value = result;
477f2: 206a 0014 moveal %a2@(20),%a0 477f6: 2140 0034 movel %d0,%a0@(52)
req->aiocbp->error_code = 0;
477fa: 42a8 0030 clrl %a0@(48) 477fe: 6000 ff28 braw 47728 <rtems_aio_handle+0x2e>
req->aiocbp->aio_nbytes, req->aiocbp->aio_offset);
break;
case LIO_SYNC:
AIO_printf ("sync\n");
result = fsync (req->aiocbp->aio_fildes);
47802: 2f13 movel %a3@,%sp@- <== NOT EXECUTED 47804: 4eb9 0004 e88c jsr 4e88c <fsync> <== NOT EXECUTED
break;
4780a: 588f addql #4,%sp <== NOT EXECUTED 4780c: 60dc bras 477ea <rtems_aio_handle+0xf0> <== NOT EXECUTED
req->aiocbp->aio_nbytes, req->aiocbp->aio_offset);
break;
case LIO_WRITE:
AIO_printf ("write\n");
result = pwrite (req->aiocbp->aio_fildes,
4780e: 2f2b 0008 movel %a3@(8),%sp@- 47812: 2f2b 0004 movel %a3@(4),%sp@- 47816: 2f2b 0010 movel %a3@(16),%sp@- 4781a: 2f2b 000c movel %a3@(12),%sp@- 4781e: 2f13 movel %a3@,%sp@- 47820: 4eb9 0005 2624 jsr 52624 <pwrite>
(void *) req->aiocbp->aio_buf,
req->aiocbp->aio_nbytes, req->aiocbp->aio_offset);
break;
47826: 4fef 0014 lea %sp@(20),%sp 4782a: 60be bras 477ea <rtems_aio_handle+0xf0>
struct timespec timeout;
AIO_printf ("Chain is empty [WQ], wait for work\n");
pthread_mutex_unlock (&r_chain->mutex);
4782c: 2f02 movel %d2,%sp@- 4782e: 4e95 jsr %a5@
pthread_mutex_lock (&aio_request_queue.mutex);
47830: 4879 0006 3de8 pea 63de8 <aio_request_queue> 47836: 2047 moveal %d7,%a0 47838: 4e90 jsr %a0@
if (rtems_chain_is_empty (chain))
4783a: 508f addql #8,%sp 4783c: b5ec 0008 cmpal %a4@(8),%a2
47840: 670e beqs 47850 <rtems_aio_handle+0x156> <== ALWAYS TAKEN
}
}
/* If there was a request added in the initial fd chain then release
the mutex and process it */
pthread_mutex_unlock (&aio_request_queue.mutex);
47842: 4879 0006 3de8 pea 63de8 <aio_request_queue> <== NOT EXECUTED 47848: 4e95 jsr %a5@ <== NOT EXECUTED 4784a: 588f addql #4,%sp <== NOT EXECUTED 4784c: 6000 feda braw 47728 <rtems_aio_handle+0x2e> <== NOT EXECUTED
pthread_mutex_unlock (&r_chain->mutex);
pthread_mutex_lock (&aio_request_queue.mutex);
if (rtems_chain_is_empty (chain))
{
clock_gettime (CLOCK_REALTIME, &timeout);
47850: 486e fff4 pea %fp@(-12)
timeout.tv_sec += 3; timeout.tv_nsec = 0; result = pthread_cond_timedwait (&r_chain->cond,
47854: 280c movel %a4,%d4
pthread_mutex_unlock (&r_chain->mutex);
pthread_mutex_lock (&aio_request_queue.mutex);
if (rtems_chain_is_empty (chain))
{
clock_gettime (CLOCK_REALTIME, &timeout);
47856: 4878 0001 pea 1 <ADD>
timeout.tv_sec += 3; timeout.tv_nsec = 0; result = pthread_cond_timedwait (&r_chain->cond,
4785a: 0684 0000 0020 addil #32,%d4 47860: 45f9 0004 8114 lea 48114 <pthread_cond_timedwait>,%a2
pthread_mutex_unlock (&r_chain->mutex);
pthread_mutex_lock (&aio_request_queue.mutex);
if (rtems_chain_is_empty (chain))
{
clock_gettime (CLOCK_REALTIME, &timeout);
47866: 4eb9 0004 7e64 jsr 47e64 <clock_gettime>
timeout.tv_sec += 3; timeout.tv_nsec = 0; result = pthread_cond_timedwait (&r_chain->cond,
4786c: 486e fff4 pea %fp@(-12)
pthread_mutex_lock (&aio_request_queue.mutex);
if (rtems_chain_is_empty (chain))
{
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
47870: 56ae fff4 addql #3,%fp@(-12)
timeout.tv_nsec = 0; result = pthread_cond_timedwait (&r_chain->cond,
47874: 4879 0006 3de8 pea 63de8 <aio_request_queue>
if (rtems_chain_is_empty (chain))
{
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
timeout.tv_nsec = 0;
4787a: 42ae fff8 clrl %fp@(-8)
result = pthread_cond_timedwait (&r_chain->cond,
4787e: 2f04 movel %d4,%sp@- 47880: 4e92 jsr %a2@
&aio_request_queue.mutex,
&timeout);
/* If no requests were added to the chain we delete the fd chain from
the queue and start working with idle fd chains */
if (result == ETIMEDOUT) {
47882: 4fef 0014 lea %sp@(20),%sp 47886: 7274 moveq #116,%d1 47888: b280 cmpl %d0,%d1
4788a: 66b6 bnes 47842 <rtems_aio_handle+0x148> <== NEVER TAKEN
4788c: 2f0c movel %a4,%sp@- 4788e: 47f9 0004 a0c0 lea 4a0c0 <_Chain_Extract>,%a3 47894: 4e93 jsr %a3@
rtems_chain_extract (&r_chain->next_fd); pthread_mutex_destroy (&r_chain->mutex);
47896: 2f02 movel %d2,%sp@- 47898: 4eb9 0004 8264 jsr 48264 <pthread_mutex_destroy>
pthread_cond_destroy (&r_chain->cond);
4789e: 2f04 movel %d4,%sp@- 478a0: 4eb9 0004 7ee4 jsr 47ee4 <pthread_cond_destroy>
free (r_chain);
478a6: 2f0c movel %a4,%sp@- 478a8: 4eb9 0004 3c9c jsr 43c9c <free> 478ae: 2879 0006 3e3c moveal 63e3c <aio_request_queue+0x54>,%a4
/* If the idle chain is empty sleep for 3 seconds and wait for a
signal. The thread now becomes idle. */
if (rtems_chain_is_empty (&aio_request_queue.idle_req)) {
478b4: 4fef 0010 lea %sp@(16),%sp 478b8: b9fc 0006 3e40 cmpal #409152,%a4
478be: 6730 beqs 478f0 <rtems_aio_handle+0x1f6>
}
}
/* Otherwise move this chain to the working chain and
start the loop all over again */
AIO_printf ("Work on idle\n");
--aio_request_queue.idle_threads;
478c0: 53b9 0006 3e50 subql #1,63e50 <aio_request_queue+0x68> 478c6: 240c movel %a4,%d2
++aio_request_queue.active_threads;
478c8: 52b9 0006 3e4c addql #1,63e4c <aio_request_queue+0x64> 478ce: 0682 0000 001c addil #28,%d2 478d4: 2f0c movel %a4,%sp@- 478d6: 4e93 jsr %a3@
node = rtems_chain_first (&aio_request_queue.idle_req);
rtems_chain_extract (node);
r_chain = (rtems_aio_request_chain *) node;
rtems_aio_move_to_work (r_chain);
478d8: 2f0c movel %a4,%sp@- 478da: 4eb9 0004 7698 jsr 47698 <rtems_aio_move_to_work> 478e0: 508f addql #8,%sp
}
}
/* If there was a request added in the initial fd chain then release
the mutex and process it */
pthread_mutex_unlock (&aio_request_queue.mutex);
478e2: 4879 0006 3de8 pea 63de8 <aio_request_queue> 478e8: 4e95 jsr %a5@ 478ea: 588f addql #4,%sp 478ec: 6000 fe3a braw 47728 <rtems_aio_handle+0x2e>
if (rtems_chain_is_empty (&aio_request_queue.idle_req)) {
AIO_printf ("Chain is empty [IQ], wait for work\n");
++aio_request_queue.idle_threads;
--aio_request_queue.active_threads;
clock_gettime (CLOCK_REALTIME, &timeout);
478f0: 486e fff4 pea %fp@(-12)
/* If the idle chain is empty sleep for 3 seconds and wait for a
signal. The thread now becomes idle. */
if (rtems_chain_is_empty (&aio_request_queue.idle_req)) {
AIO_printf ("Chain is empty [IQ], wait for work\n");
++aio_request_queue.idle_threads;
478f4: 52b9 0006 3e50 addql #1,63e50 <aio_request_queue+0x68>
--aio_request_queue.active_threads;
478fa: 53b9 0006 3e4c subql #1,63e4c <aio_request_queue+0x64>
clock_gettime (CLOCK_REALTIME, &timeout);
47900: 4878 0001 pea 1 <ADD> 47904: 4eb9 0004 7e64 jsr 47e64 <clock_gettime>
timeout.tv_sec += 3;
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&aio_request_queue.new_req,
4790a: 486e fff4 pea %fp@(-12)
AIO_printf ("Chain is empty [IQ], wait for work\n");
++aio_request_queue.idle_threads;
--aio_request_queue.active_threads;
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
4790e: 56ae fff4 addql #3,%fp@(-12)
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&aio_request_queue.new_req,
47912: 4879 0006 3de8 pea 63de8 <aio_request_queue> 47918: 4879 0006 3dec pea 63dec <aio_request_queue+0x4>
++aio_request_queue.idle_threads;
--aio_request_queue.active_threads;
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
timeout.tv_nsec = 0;
4791e: 42ae fff8 clrl %fp@(-8)
result = pthread_cond_timedwait (&aio_request_queue.new_req,
47922: 4e92 jsr %a2@
&aio_request_queue.mutex,
&timeout);
/* If no new fd chain was added in the idle requests
then this thread is finished */
if (result == ETIMEDOUT) {
47924: 4fef 0014 lea %sp@(20),%sp 47928: 7274 moveq #116,%d1 4792a: b280 cmpl %d0,%d1
4792c: 6744 beqs 47972 <rtems_aio_handle+0x278> <== ALWAYS TAKEN
4792e: 2879 0006 3e3c moveal 63e3c <aio_request_queue+0x54>,%a4 <== NOT EXECUTED
}
}
/* Otherwise move this chain to the working chain and
start the loop all over again */
AIO_printf ("Work on idle\n");
--aio_request_queue.idle_threads;
47934: 53b9 0006 3e50 subql #1,63e50 <aio_request_queue+0x68> <== NOT EXECUTED 4793a: 240c movel %a4,%d2 <== NOT EXECUTED
++aio_request_queue.active_threads;
4793c: 52b9 0006 3e4c addql #1,63e4c <aio_request_queue+0x64> <== NOT EXECUTED 47942: 0682 0000 001c addil #28,%d2 <== NOT EXECUTED 47948: 2f0c movel %a4,%sp@- <== NOT EXECUTED 4794a: 4e93 jsr %a3@ <== NOT EXECUTED
node = rtems_chain_first (&aio_request_queue.idle_req);
rtems_chain_extract (node);
r_chain = (rtems_aio_request_chain *) node;
rtems_aio_move_to_work (r_chain);
4794c: 2f0c movel %a4,%sp@- <== NOT EXECUTED 4794e: 4eb9 0004 7698 jsr 47698 <rtems_aio_move_to_work> <== NOT EXECUTED 47954: 508f addql #8,%sp <== NOT EXECUTED 47956: 608a bras 478e2 <rtems_aio_handle+0x1e8> <== NOT EXECUTED
break;
default:
result = -1;
}
if (result == -1) {
47958: 266a 0014 moveal %a2@(20),%a3 <== NOT EXECUTED
req->aiocbp->return_value = -1;
4795c: 70ff moveq #-1,%d0 <== NOT EXECUTED 4795e: 2740 0034 movel %d0,%a3@(52) <== NOT EXECUTED
req->aiocbp->error_code = errno;
47962: 4eb9 0005 1b40 jsr 51b40 <__errno> <== NOT EXECUTED 47968: 2040 moveal %d0,%a0 <== NOT EXECUTED 4796a: 2750 0030 movel %a0@,%a3@(48) <== NOT EXECUTED 4796e: 6000 fe44 braw 477b4 <rtems_aio_handle+0xba> <== NOT EXECUTED
/* If no new fd chain was added in the idle requests
then this thread is finished */
if (result == ETIMEDOUT) {
AIO_printf ("Etimeout\n");
--aio_request_queue.idle_threads;
pthread_mutex_unlock (&aio_request_queue.mutex);
47972: 4879 0006 3de8 pea 63de8 <aio_request_queue>
/* If no new fd chain was added in the idle requests
then this thread is finished */
if (result == ETIMEDOUT) {
AIO_printf ("Etimeout\n");
--aio_request_queue.idle_threads;
47978: 53b9 0006 3e50 subql #1,63e50 <aio_request_queue+0x68>
pthread_mutex_unlock (&aio_request_queue.mutex);
4797e: 4eb9 0004 85ac jsr 485ac <pthread_mutex_unlock>
return NULL;
47984: 588f addql #4,%sp
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
47986: 4280 clrl %d0 47988: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5
4798e: 4e5e unlk %fp <== NOT EXECUTED
00047444 <rtems_aio_init>:
* 0 - if initialization succeeded
*/
int
rtems_aio_init (void)
{
47444: 4e56 0000 linkw %fp,#0 47448: 2f02 movel %d2,%sp@-
int result = 0;
result = pthread_attr_init (&aio_request_queue.attr);
4744a: 4879 0006 3df0 pea 63df0 <aio_request_queue+0x8> 47450: 4eb9 0004 86d4 jsr 486d4 <pthread_attr_init>
if (result != 0)
47456: 588f addql #4,%sp
int
rtems_aio_init (void)
{
int result = 0;
result = pthread_attr_init (&aio_request_queue.attr);
47458: 2400 movel %d0,%d2
if (result != 0)
4745a: 670a beqs 47466 <rtems_aio_init+0x22> <== ALWAYS TAKEN
aio_request_queue.active_threads = 0;
aio_request_queue.idle_threads = 0;
aio_request_queue.initialized = AIO_QUEUE_INITIALIZED;
return result;
}
4745c: 2002 movel %d2,%d0 <== NOT EXECUTED 4745e: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 47462: 4e5e unlk %fp <== NOT EXECUTED 47464: 4e75 rts <== NOT EXECUTED
result = pthread_attr_init (&aio_request_queue.attr);
if (result != 0)
return result;
result =
47466: 42a7 clrl %sp@- 47468: 4879 0006 3df0 pea 63df0 <aio_request_queue+0x8> 4746e: 4eb9 0004 8700 jsr 48700 <pthread_attr_setdetachstate>
pthread_attr_setdetachstate (&aio_request_queue.attr,
PTHREAD_CREATE_DETACHED);
if (result != 0)
47474: 508f addql #8,%sp 47476: 4a80 tstl %d0 47478: 6600 0122 bnew 4759c <rtems_aio_init+0x158>
pthread_attr_destroy (&aio_request_queue.attr);
result = pthread_mutex_init (&aio_request_queue.mutex, NULL);
4747c: 42a7 clrl %sp@- 4747e: 4879 0006 3de8 pea 63de8 <aio_request_queue> 47484: 4eb9 0004 83d8 jsr 483d8 <pthread_mutex_init>
if (result != 0)
4748a: 508f addql #8,%sp 4748c: 4a80 tstl %d0 4748e: 6600 00e4 bnew 47574 <rtems_aio_init+0x130>
pthread_attr_destroy (&aio_request_queue.attr);
result = pthread_cond_init (&aio_request_queue.new_req, NULL);
47492: 42a7 clrl %sp@- 47494: 4879 0006 3dec pea 63dec <aio_request_queue+0x4> 4749a: 4eb9 0004 7fd4 jsr 47fd4 <pthread_cond_init>
if (result != 0) {
474a0: 508f addql #8,%sp
result = pthread_mutex_init (&aio_request_queue.mutex, NULL);
if (result != 0)
pthread_attr_destroy (&aio_request_queue.attr);
result = pthread_cond_init (&aio_request_queue.new_req, NULL);
474a2: 2400 movel %d0,%d2
if (result != 0) {
474a4: 665e bnes 47504 <rtems_aio_init+0xc0> <== NEVER TAKEN
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
474a6: 42b9 0006 3e34 clrl 63e34 <aio_request_queue+0x4c>
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
474ac: 203c 0006 3e34 movel #409140,%d0 474b2: 23c0 0006 3e30 movel %d0,63e30 <aio_request_queue+0x48>
head->previous = NULL; tail->previous = head;
474b8: 203c 0006 3e30 movel #409136,%d0 474be: 23c0 0006 3e38 movel %d0,63e38 <aio_request_queue+0x50>
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
474c4: 203c 0006 3e40 movel #409152,%d0 474ca: 23c0 0006 3e3c movel %d0,63e3c <aio_request_queue+0x54>
head->previous = NULL; tail->previous = head;
474d0: 203c 0006 3e3c movel #409148,%d0 474d6: 23c0 0006 3e44 movel %d0,63e44 <aio_request_queue+0x5c>
rtems_chain_initialize_empty (&aio_request_queue.work_req);
rtems_chain_initialize_empty (&aio_request_queue.idle_req);
aio_request_queue.active_threads = 0;
aio_request_queue.idle_threads = 0;
aio_request_queue.initialized = AIO_QUEUE_INITIALIZED;
474dc: 203c 0000 b00b movel #45067,%d0
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
474e2: 42b9 0006 3e40 clrl 63e40 <aio_request_queue+0x58>
}
rtems_chain_initialize_empty (&aio_request_queue.work_req);
rtems_chain_initialize_empty (&aio_request_queue.idle_req);
aio_request_queue.active_threads = 0;
474e8: 42b9 0006 3e4c clrl 63e4c <aio_request_queue+0x64>
aio_request_queue.idle_threads = 0;
474ee: 42b9 0006 3e50 clrl 63e50 <aio_request_queue+0x68>
aio_request_queue.initialized = AIO_QUEUE_INITIALIZED;
474f4: 23c0 0006 3e48 movel %d0,63e48 <aio_request_queue+0x60>
return result;
}
474fa: 2002 movel %d2,%d0 474fc: 242e fffc movel %fp@(-4),%d2 47500: 4e5e unlk %fp 47502: 4e75 rts
pthread_attr_destroy (&aio_request_queue.attr);
result = pthread_cond_init (&aio_request_queue.new_req, NULL);
if (result != 0) {
pthread_mutex_destroy (&aio_request_queue.mutex);
47504: 4879 0006 3de8 pea 63de8 <aio_request_queue> <== NOT EXECUTED 4750a: 4eb9 0004 8264 jsr 48264 <pthread_mutex_destroy> <== NOT EXECUTED
pthread_attr_destroy (&aio_request_queue.attr);
47510: 4879 0006 3df0 pea 63df0 <aio_request_queue+0x8> <== NOT EXECUTED 47516: 4eb9 0004 86b4 jsr 486b4 <pthread_attr_destroy> <== NOT EXECUTED 4751c: 508f addql #8,%sp <== NOT EXECUTED
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
4751e: 203c 0006 3e34 movel #409140,%d0 <== NOT EXECUTED 47524: 23c0 0006 3e30 movel %d0,63e30 <aio_request_queue+0x48> <== NOT EXECUTED
head->previous = NULL; tail->previous = head;
4752a: 203c 0006 3e30 movel #409136,%d0 <== NOT EXECUTED 47530: 23c0 0006 3e38 movel %d0,63e38 <aio_request_queue+0x50> <== NOT EXECUTED
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
47536: 203c 0006 3e40 movel #409152,%d0 <== NOT EXECUTED 4753c: 23c0 0006 3e3c movel %d0,63e3c <aio_request_queue+0x54> <== NOT EXECUTED
head->previous = NULL; tail->previous = head;
47542: 203c 0006 3e3c movel #409148,%d0 <== NOT EXECUTED 47548: 23c0 0006 3e44 movel %d0,63e44 <aio_request_queue+0x5c> <== NOT EXECUTED
rtems_chain_initialize_empty (&aio_request_queue.work_req);
rtems_chain_initialize_empty (&aio_request_queue.idle_req);
aio_request_queue.active_threads = 0;
aio_request_queue.idle_threads = 0;
aio_request_queue.initialized = AIO_QUEUE_INITIALIZED;
4754e: 203c 0000 b00b movel #45067,%d0 <== NOT EXECUTED
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
47554: 42b9 0006 3e34 clrl 63e34 <aio_request_queue+0x4c> <== NOT EXECUTED 4755a: 42b9 0006 3e40 clrl 63e40 <aio_request_queue+0x58> <== NOT EXECUTED
}
rtems_chain_initialize_empty (&aio_request_queue.work_req);
rtems_chain_initialize_empty (&aio_request_queue.idle_req);
aio_request_queue.active_threads = 0;
47560: 42b9 0006 3e4c clrl 63e4c <aio_request_queue+0x64> <== NOT EXECUTED
aio_request_queue.idle_threads = 0;
47566: 42b9 0006 3e50 clrl 63e50 <aio_request_queue+0x68> <== NOT EXECUTED
aio_request_queue.initialized = AIO_QUEUE_INITIALIZED;
4756c: 23c0 0006 3e48 movel %d0,63e48 <aio_request_queue+0x60> <== NOT EXECUTED 47572: 6086 bras 474fa <rtems_aio_init+0xb6> <== NOT EXECUTED
pthread_attr_destroy (&aio_request_queue.attr);
result = pthread_mutex_init (&aio_request_queue.mutex, NULL);
if (result != 0)
pthread_attr_destroy (&aio_request_queue.attr);
47574: 4879 0006 3df0 pea 63df0 <aio_request_queue+0x8> <== NOT EXECUTED 4757a: 4eb9 0004 86b4 jsr 486b4 <pthread_attr_destroy> <== NOT EXECUTED 47580: 588f addql #4,%sp <== NOT EXECUTED
result = pthread_cond_init (&aio_request_queue.new_req, NULL);
47582: 42a7 clrl %sp@- <== NOT EXECUTED 47584: 4879 0006 3dec pea 63dec <aio_request_queue+0x4> <== NOT EXECUTED 4758a: 4eb9 0004 7fd4 jsr 47fd4 <pthread_cond_init> <== NOT EXECUTED
if (result != 0) {
47590: 508f addql #8,%sp <== NOT EXECUTED
result = pthread_mutex_init (&aio_request_queue.mutex, NULL);
if (result != 0)
pthread_attr_destroy (&aio_request_queue.attr);
result = pthread_cond_init (&aio_request_queue.new_req, NULL);
47592: 2400 movel %d0,%d2 <== NOT EXECUTED
if (result != 0) {
47594: 6700 ff10 beqw 474a6 <rtems_aio_init+0x62> <== NOT EXECUTED 47598: 6000 ff6a braw 47504 <rtems_aio_init+0xc0> <== NOT EXECUTED
result =
pthread_attr_setdetachstate (&aio_request_queue.attr,
PTHREAD_CREATE_DETACHED);
if (result != 0)
pthread_attr_destroy (&aio_request_queue.attr);
4759c: 4879 0006 3df0 pea 63df0 <aio_request_queue+0x8> <== NOT EXECUTED 475a2: 4eb9 0004 86b4 jsr 486b4 <pthread_attr_destroy> <== NOT EXECUTED 475a8: 588f addql #4,%sp <== NOT EXECUTED
result = pthread_mutex_init (&aio_request_queue.mutex, NULL);
475aa: 42a7 clrl %sp@- <== NOT EXECUTED 475ac: 4879 0006 3de8 pea 63de8 <aio_request_queue> <== NOT EXECUTED 475b2: 4eb9 0004 83d8 jsr 483d8 <pthread_mutex_init> <== NOT EXECUTED
if (result != 0)
475b8: 508f addql #8,%sp <== NOT EXECUTED 475ba: 4a80 tstl %d0 <== NOT EXECUTED 475bc: 6700 fed4 beqw 47492 <rtems_aio_init+0x4e> <== NOT EXECUTED 475c0: 60b2 bras 47574 <rtems_aio_init+0x130> <== NOT EXECUTED
00047992 <rtems_aio_insert_prio>:
* NONE
*/
void
rtems_aio_insert_prio (rtems_chain_control *chain, rtems_aio_request *req)
{
47992: 4e56 fff4 linkw %fp,#-12 47996: 202e 0008 movel %fp@(8),%d0 4799a: 48d7 1c00 moveml %a2-%a4,%sp@
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
4799e: 2440 moveal %d0,%a2 479a0: 266e 000c moveal %fp@(12),%a3 479a4: 205a moveal %a2@+,%a0
rtems_chain_node *node;
AIO_printf ("FD exists \n");
node = rtems_chain_first (chain);
if (rtems_chain_is_empty (chain)) {
479a6: b5c8 cmpal %a0,%a2
479a8: 672c beqs 479d6 <rtems_aio_insert_prio+0x44> <== NEVER TAKEN
rtems_chain_prepend (chain, &req->next_prio);
} else {
AIO_printf ("Add by priority \n");
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
while (req->aiocbp->aio_reqprio > prio &&
479aa: 286b 0014 moveal %a3@(20),%a4
if (rtems_chain_is_empty (chain)) {
AIO_printf ("First in chain \n");
rtems_chain_prepend (chain, &req->next_prio);
} else {
AIO_printf ("Add by priority \n");
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
479ae: 2268 0014 moveal %a0@(20),%a1
while (req->aiocbp->aio_reqprio > prio &&
479b2: 202c 0014 movel %a4@(20),%d0 479b6: b0a9 0014 cmpl %a1@(20),%d0
479ba: 6f10 bles 479cc <rtems_aio_insert_prio+0x3a> <== ALWAYS TAKEN
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
479bc: 2050 moveal %a0@,%a0 <== NOT EXECUTED
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
while (req->aiocbp->aio_reqprio > prio &&
!rtems_chain_is_tail (chain, node)) {
node = rtems_chain_next (node);
prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
479be: 2268 0014 moveal %a0@(20),%a1 <== NOT EXECUTED
rtems_chain_prepend (chain, &req->next_prio);
} else {
AIO_printf ("Add by priority \n");
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
while (req->aiocbp->aio_reqprio > prio &&
479c2: b0a9 0014 cmpl %a1@(20),%d0 <== NOT EXECUTED 479c6: 6f04 bles 479cc <rtems_aio_insert_prio+0x3a> <== NOT EXECUTED 479c8: b5c8 cmpal %a0,%a2 <== NOT EXECUTED 479ca: 66f0 bnes 479bc <rtems_aio_insert_prio+0x2a> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void rtems_chain_insert(
rtems_chain_node *after_node,
rtems_chain_node *the_node
)
{
_Chain_Insert( after_node, the_node );
479cc: 2d4b 000c movel %a3,%fp@(12) 479d0: 2d68 0004 0008 movel %a0@(4),%fp@(8)
}
rtems_chain_insert (node->previous, &req->next_prio);
}
}
479d6: 4cd7 1c00 moveml %sp@,%a2-%a4 479da: 4e5e unlk %fp 479dc: 4ef9 0004 a124 jmp 4a124 <_Chain_Insert>
00047698 <rtems_aio_move_to_work>:
* NONE
*/
void
rtems_aio_move_to_work (rtems_aio_request_chain *r_chain)
{
47698: 4e56 0000 linkw %fp,#0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
4769c: 2279 0006 3e30 moveal 63e30 <aio_request_queue+0x48>,%a1 476a2: 2f0a movel %a2,%sp@- 476a4: 246e 0008 moveal %fp@(8),%a2
rtems_chain_node *node;
node = rtems_chain_first (&aio_request_queue.work_req);
temp = (rtems_aio_request_chain *) node;
while (temp->fildes < r_chain->fildes &&
476a8: 202a 0014 movel %a2@(20),%d0 476ac: b0a9 0014 cmpl %a1@(20),%d0
476b0: 6f30 bles 476e2 <rtems_aio_move_to_work+0x4a> <== NEVER TAKEN
476b2: b3fc 0006 3e34 cmpal #409140,%a1
476b8: 6728 beqs 476e2 <rtems_aio_move_to_work+0x4a> <== NEVER TAKEN
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
476ba: 2051 moveal %a1@,%a0
rtems_chain_node *node;
node = rtems_chain_first (&aio_request_queue.work_req);
temp = (rtems_aio_request_chain *) node;
while (temp->fildes < r_chain->fildes &&
476bc: b0a8 0014 cmpl %a0@(20),%d0
476c0: 6f0a bles 476cc <rtems_aio_move_to_work+0x34>
476c2: 2248 moveal %a0,%a1 476c4: b1fc 0006 3e34 cmpal #409140,%a0
476ca: 66ee bnes 476ba <rtems_aio_move_to_work+0x22> <== ALWAYS TAKEN
476cc: 2f0a movel %a2,%sp@- 476ce: 2f28 0004 movel %a0@(4),%sp@- 476d2: 4eb9 0004 a124 jsr 4a124 <_Chain_Insert>
node = rtems_chain_next (node);
temp = (rtems_aio_request_chain *) node;
}
rtems_chain_insert (rtems_chain_previous (node), &r_chain->next_fd);
}
476d8: 246e fffc moveal %fp@(-4),%a2 476dc: 508f addql #8,%sp 476de: 4e5e unlk %fp 476e0: 4e75 rts
rtems_chain_node *node;
node = rtems_chain_first (&aio_request_queue.work_req);
temp = (rtems_aio_request_chain *) node;
while (temp->fildes < r_chain->fildes &&
476e2: 2049 moveal %a1,%a0 <== NOT EXECUTED 476e4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 476e6: 2f28 0004 movel %a0@(4),%sp@- <== NOT EXECUTED 476ea: 4eb9 0004 a124 jsr 4a124 <_Chain_Insert> <== NOT EXECUTED
node = rtems_chain_next (node);
temp = (rtems_aio_request_chain *) node;
}
rtems_chain_insert (rtems_chain_previous (node), &r_chain->next_fd);
}
476f0: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 476f4: 508f addql #8,%sp <== NOT EXECUTED 476f6: 4e5e unlk %fp <== NOT EXECUTED
000479e2 <rtems_aio_remove_fd>:
* Output parameters:
* NONE
*/
void rtems_aio_remove_fd (rtems_aio_request_chain *r_chain)
{
479e2: 4e56 ffec linkw %fp,#-20 479e6: 206e 0008 moveal %fp@(8),%a0 479ea: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Tail(the_chain));
479ee: 2608 movel %a0,%d3 479f0: 0683 0000 000c addil #12,%d3
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
479f6: 2468 0008 moveal %a0@(8),%a2
rtems_chain_control *chain;
rtems_chain_node *node;
chain = &r_chain->perfd;
node = rtems_chain_first (chain);
while (!rtems_chain_is_tail (chain, node))
479fa: b68a cmpl %a2,%d3
479fc: 6732 beqs 47a30 <rtems_aio_remove_fd+0x4e> <== NEVER TAKEN
479fe: 49f9 0004 a0c0 lea 4a0c0 <_Chain_Extract>,%a4 47a04: 47f9 0004 3c9c lea 43c9c <free>,%a3
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
47a0a: 2f0a movel %a2,%sp@- 47a0c: 4e94 jsr %a4@
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
47a0e: 2412 movel %a2@,%d2
while (!rtems_chain_is_tail (chain, node))
{
rtems_chain_extract (node);
rtems_aio_request *req = (rtems_aio_request *) node;
node = rtems_chain_next (node);
req->aiocbp->error_code = ECANCELED;
47a10: 203c 0000 008c movel #140,%d0 47a16: 206a 0014 moveal %a2@(20),%a0 47a1a: 2140 0030 movel %d0,%a0@(48)
req->aiocbp->return_value = -1;
47a1e: 70ff moveq #-1,%d0 47a20: 2140 0034 movel %d0,%a0@(52)
free (req);
47a24: 2f0a movel %a2,%sp@-
while (!rtems_chain_is_tail (chain, node))
{
rtems_chain_extract (node);
rtems_aio_request *req = (rtems_aio_request *) node;
node = rtems_chain_next (node);
47a26: 2442 moveal %d2,%a2
req->aiocbp->error_code = ECANCELED;
req->aiocbp->return_value = -1;
free (req);
47a28: 4e93 jsr %a3@
rtems_chain_control *chain;
rtems_chain_node *node;
chain = &r_chain->perfd;
node = rtems_chain_first (chain);
while (!rtems_chain_is_tail (chain, node))
47a2a: 508f addql #8,%sp 47a2c: b682 cmpl %d2,%d3
47a2e: 66da bnes 47a0a <rtems_aio_remove_fd+0x28>
node = rtems_chain_next (node);
req->aiocbp->error_code = ECANCELED;
req->aiocbp->return_value = -1;
free (req);
}
}
47a30: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4
47a36: 4e5e unlk %fp <== NOT EXECUTED
00047a3a <rtems_aio_remove_req>:
* AIO_NOTCANCELED - if request was not canceled
* AIO_CANCELED - if request was canceled
*/
int rtems_aio_remove_req (rtems_chain_control *chain, struct aiocb *aiocbp)
{
47a3a: 4e56 0000 linkw %fp,#0
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
47a3e: 206e 0008 moveal %fp@(8),%a0 47a42: 2f0a movel %a2,%sp@- 47a44: 202e 000c movel %fp@(12),%d0 47a48: 2458 moveal %a0@+,%a2
if (rtems_chain_is_empty (chain))
47a4a: b1ca cmpal %a2,%a0
47a4c: 6716 beqs 47a64 <rtems_aio_remove_req+0x2a>
rtems_chain_node *node = rtems_chain_first (chain);
rtems_aio_request *current;
current = (rtems_aio_request *) node;
while (!rtems_chain_is_tail (chain, node) && current->aiocbp != aiocbp) {
47a4e: b0aa 0014 cmpl %a2@(20),%d0
47a52: 671a beqs 47a6e <rtems_aio_remove_req+0x34> <== ALWAYS TAKEN
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
47a54: 2452 moveal %a2@,%a2 <== NOT EXECUTED
rtems_chain_node *node = rtems_chain_first (chain);
rtems_aio_request *current;
current = (rtems_aio_request *) node;
while (!rtems_chain_is_tail (chain, node) && current->aiocbp != aiocbp) {
47a56: b1ca cmpal %a2,%a0 <== NOT EXECUTED 47a58: 66f4 bnes 47a4e <rtems_aio_remove_req+0x14> <== NOT EXECUTED
current->aiocbp->return_value = -1;
free (current);
}
return AIO_CANCELED;
}
47a5a: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
node = rtems_chain_next (node);
current = (rtems_aio_request *) node;
}
if (rtems_chain_is_tail (chain, node))
return AIO_NOTCANCELED;
47a5e: 7001 moveq #1,%d0 <== NOT EXECUTED
current->aiocbp->return_value = -1;
free (current);
}
return AIO_CANCELED;
}
47a60: 4e5e unlk %fp <== NOT EXECUTED 47a62: 4e75 rts <== NOT EXECUTED
47a64: 246e fffc moveal %fp@(-4),%a2
*/
int rtems_aio_remove_req (rtems_chain_control *chain, struct aiocb *aiocbp)
{
if (rtems_chain_is_empty (chain))
return AIO_ALLDONE;
47a68: 7002 moveq #2,%d0
current->aiocbp->return_value = -1;
free (current);
}
return AIO_CANCELED;
}
47a6a: 4e5e unlk %fp 47a6c: 4e75 rts 47a6e: 2f0a movel %a2,%sp@- 47a70: 4eb9 0004 a0c0 jsr 4a0c0 <_Chain_Extract>
if (rtems_chain_is_tail (chain, node))
return AIO_NOTCANCELED;
else
{
rtems_chain_extract (node);
current->aiocbp->error_code = ECANCELED;
47a76: 206a 0014 moveal %a2@(20),%a0 47a7a: 203c 0000 008c movel #140,%d0 47a80: 2140 0030 movel %d0,%a0@(48)
current->aiocbp->return_value = -1;
47a84: 70ff moveq #-1,%d0 47a86: 2140 0034 movel %d0,%a0@(52)
free (current);
47a8a: 2f0a movel %a2,%sp@- 47a8c: 4eb9 0004 3c9c jsr 43c9c <free>
}
return AIO_CANCELED;
}
47a92: 246e fffc moveal %fp@(-4),%a2
current->aiocbp->error_code = ECANCELED;
current->aiocbp->return_value = -1;
free (current);
}
return AIO_CANCELED;
47a96: 508f addql #8,%sp 47a98: 4280 clrl %d0
}
47a9a: 4e5e unlk %fp <== NOT EXECUTED
0004e5f8 <rtems_assoc_local_by_remote_bitfield>:
uint32_t rtems_assoc_local_by_remote_bitfield(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
4e5f8: 4e56 ffe8 linkw %fp,#-24 4e5fc: 48d7 047c moveml %d2-%d6/%a2,%sp@ 4e600: 2c2e 0008 movel %fp@(8),%d6 4e604: 7620 moveq #32,%d3
uint32_t b; uint32_t local_value = 0;
4e606: 4285 clrl %d5
for (b = 1; b; b <<= 1) {
4e608: 7401 moveq #1,%d2
if (b & remote_value)
local_value |= rtems_assoc_local_by_remote(ap, b);
4e60a: 45f9 0004 b6b0 lea 4b6b0 <rtems_assoc_local_by_remote>,%a2
uint32_t rtems_assoc_local_by_remote_bitfield(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
4e610: 282e 000c movel %fp@(12),%d4
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
if (b & remote_value)
4e614: 2002 movel %d2,%d0
)
{
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
4e616: 5383 subql #1,%d3
if (b & remote_value)
4e618: c084 andl %d4,%d0
4e61a: 6612 bnes 4e62e <rtems_assoc_local_by_remote_bitfield+0x36>
)
{
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
4e61c: d482 addl %d2,%d2 4e61e: 4a83 tstl %d3
4e620: 66f2 bnes 4e614 <rtems_assoc_local_by_remote_bitfield+0x1c>
if (b & remote_value)
local_value |= rtems_assoc_local_by_remote(ap, b);
}
return local_value;
}
4e622: 2005 movel %d5,%d0 4e624: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 4e62a: 4e5e unlk %fp 4e62c: 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);
4e62e: 2f02 movel %d2,%sp@-
)
{
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
4e630: d482 addl %d2,%d2
if (b & remote_value)
local_value |= rtems_assoc_local_by_remote(ap, b);
4e632: 2f06 movel %d6,%sp@- 4e634: 4e92 jsr %a2@ 4e636: 508f addql #8,%sp 4e638: 8a80 orl %d0,%d5
)
{
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
4e63a: 4a83 tstl %d3
4e63c: 66d6 bnes 4e614 <rtems_assoc_local_by_remote_bitfield+0x1c><== ALWAYS TAKEN
4e63e: 60e2 bras 4e622 <rtems_assoc_local_by_remote_bitfield+0x2a><== NOT EXECUTED
0004386c <rtems_assoc_name_by_local_bitfield>:
char *rtems_assoc_name_by_local_bitfield(
const rtems_assoc_t *ap,
uint32_t value,
char *buffer
)
{
4386c: 4e56 ffe0 linkw %fp,#-32 43870: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 43874: 246e 0010 moveal %fp@(16),%a2
uint32_t b;
*buffer = 0;
43878: 7620 moveq #32,%d3
for (b = 1; b; b <<= 1) {
4387a: 7401 moveq #1,%d2
if (b & value) {
if (*buffer)
strcat(buffer, " ");
strcat(buffer, rtems_assoc_name_by_local(ap, b));
4387c: 49f9 0004 38e8 lea 438e8 <rtems_assoc_name_by_local>,%a4 43882: 47f9 0005 0a10 lea 50a10 <strcat>,%a3
*buffer = 0;
for (b = 1; b; b <<= 1) {
if (b & value) {
if (*buffer)
strcat(buffer, " ");
43888: 4bf9 0005 1038 lea 51038 <strlen>,%a5
char *buffer
)
{
uint32_t b;
*buffer = 0;
4388e: 4212 clrb %a2@
char *rtems_assoc_name_by_local_bitfield(
const rtems_assoc_t *ap,
uint32_t value,
char *buffer
)
{
43890: 2a2e 0008 movel %fp@(8),%d5 43894: 282e 000c movel %fp@(12),%d4
uint32_t b;
*buffer = 0;
for (b = 1; b; b <<= 1) {
if (b & value) {
43898: 2002 movel %d2,%d0
{
uint32_t b;
*buffer = 0;
for (b = 1; b; b <<= 1) {
4389a: 5383 subql #1,%d3
if (b & value) {
4389c: c084 andl %d4,%d0
4389e: 6714 beqs 438b4 <rtems_assoc_name_by_local_bitfield+0x48>
if (*buffer)
438a0: 4a12 tstb %a2@
438a2: 6622 bnes 438c6 <rtems_assoc_name_by_local_bitfield+0x5a>
strcat(buffer, " ");
strcat(buffer, rtems_assoc_name_by_local(ap, b));
438a4: 2f02 movel %d2,%sp@- 438a6: 2f05 movel %d5,%sp@- 438a8: 4e94 jsr %a4@ 438aa: 2f00 movel %d0,%sp@- 438ac: 2f0a movel %a2,%sp@- 438ae: 4e93 jsr %a3@ 438b0: 4fef 0010 lea %sp@(16),%sp
{
uint32_t b;
*buffer = 0;
for (b = 1; b; b <<= 1) {
438b4: d482 addl %d2,%d2 438b6: 4a83 tstl %d3
438b8: 66de bnes 43898 <rtems_assoc_name_by_local_bitfield+0x2c>
strcat(buffer, rtems_assoc_name_by_local(ap, b));
}
}
return buffer;
}
438ba: 200a movel %a2,%d0 438bc: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 438c2: 4e5e unlk %fp 438c4: 4e75 rts
*buffer = 0;
for (b = 1; b; b <<= 1) {
if (b & value) {
if (*buffer)
strcat(buffer, " ");
438c6: 2f0a movel %a2,%sp@- 438c8: 4e95 jsr %a5@ 438ca: 588f addql #4,%sp 438cc: 323c 2000 movew #8192,%d1 438d0: 3581 0800 movew %d1,%a2@(00000000,%d0:l)
strcat(buffer, rtems_assoc_name_by_local(ap, b));
438d4: 2f02 movel %d2,%sp@- 438d6: 2f05 movel %d5,%sp@- 438d8: 4e94 jsr %a4@ 438da: 2f00 movel %d0,%sp@- 438dc: 2f0a movel %a2,%sp@- 438de: 4e93 jsr %a3@ 438e0: 4fef 0010 lea %sp@(16),%sp 438e4: 60ce bras 438b4 <rtems_assoc_name_by_local_bitfield+0x48>
...
00043920 <rtems_assoc_name_by_remote_bitfield>:
char *rtems_assoc_name_by_remote_bitfield(
const rtems_assoc_t *ap,
uint32_t value,
char *buffer
)
{
43920: 4e56 ffe0 linkw %fp,#-32 43924: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 43928: 246e 0010 moveal %fp@(16),%a2
uint32_t b;
*buffer = 0;
4392c: 7620 moveq #32,%d3
for (b = 1; b; b <<= 1) {
4392e: 7401 moveq #1,%d2
if (b & value) {
if (*buffer)
strcat(buffer, " ");
strcat(buffer, rtems_assoc_name_by_remote(ap, b));
43930: 49f9 0004 399c lea 4399c <rtems_assoc_name_by_remote>,%a4 43936: 47f9 0005 0a10 lea 50a10 <strcat>,%a3
*buffer = 0;
for (b = 1; b; b <<= 1) {
if (b & value) {
if (*buffer)
strcat(buffer, " ");
4393c: 4bf9 0005 1038 lea 51038 <strlen>,%a5
char *buffer
)
{
uint32_t b;
*buffer = 0;
43942: 4212 clrb %a2@
char *rtems_assoc_name_by_remote_bitfield(
const rtems_assoc_t *ap,
uint32_t value,
char *buffer
)
{
43944: 2a2e 0008 movel %fp@(8),%d5 43948: 282e 000c movel %fp@(12),%d4
uint32_t b;
*buffer = 0;
for (b = 1; b; b <<= 1) {
if (b & value) {
4394c: 2002 movel %d2,%d0
{
uint32_t b;
*buffer = 0;
for (b = 1; b; b <<= 1) {
4394e: 5383 subql #1,%d3
if (b & value) {
43950: c084 andl %d4,%d0
43952: 6714 beqs 43968 <rtems_assoc_name_by_remote_bitfield+0x48>
if (*buffer)
43954: 4a12 tstb %a2@
43956: 6622 bnes 4397a <rtems_assoc_name_by_remote_bitfield+0x5a>
strcat(buffer, " ");
strcat(buffer, rtems_assoc_name_by_remote(ap, b));
43958: 2f02 movel %d2,%sp@- 4395a: 2f05 movel %d5,%sp@- 4395c: 4e94 jsr %a4@ 4395e: 2f00 movel %d0,%sp@- 43960: 2f0a movel %a2,%sp@- 43962: 4e93 jsr %a3@ 43964: 4fef 0010 lea %sp@(16),%sp
{
uint32_t b;
*buffer = 0;
for (b = 1; b; b <<= 1) {
43968: d482 addl %d2,%d2 4396a: 4a83 tstl %d3
4396c: 66de bnes 4394c <rtems_assoc_name_by_remote_bitfield+0x2c>
strcat(buffer, rtems_assoc_name_by_remote(ap, b));
}
}
return buffer;
}
4396e: 200a movel %a2,%d0 43970: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 43976: 4e5e unlk %fp 43978: 4e75 rts
*buffer = 0;
for (b = 1; b; b <<= 1) {
if (b & value) {
if (*buffer)
strcat(buffer, " ");
4397a: 2f0a movel %a2,%sp@- 4397c: 4e95 jsr %a5@ 4397e: 588f addql #4,%sp 43980: 323c 2000 movew #8192,%d1 43984: 3581 0800 movew %d1,%a2@(00000000,%d0:l)
strcat(buffer, rtems_assoc_name_by_remote(ap, b));
43988: 2f02 movel %d2,%sp@- 4398a: 2f05 movel %d5,%sp@- 4398c: 4e94 jsr %a4@ 4398e: 2f00 movel %d0,%sp@- 43990: 2f0a movel %a2,%sp@- 43992: 4e93 jsr %a3@ 43994: 4fef 0010 lea %sp@(16),%sp 43998: 60ce bras 43968 <rtems_assoc_name_by_remote_bitfield+0x48>
...
0004b710 <rtems_assoc_ptr_by_local>:
const rtems_assoc_t *rtems_assoc_ptr_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
4b710: 4e56 fff4 linkw %fp,#-12 4b714: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4b718: 246e 0008 moveal %fp@(8),%a2 4b71c: 242e 000c movel %fp@(12),%d2
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
4b720: 2012 movel %a2@,%d0
4b722: 6764 beqs 4b788 <rtems_assoc_ptr_by_local+0x78>
4b724: 4879 0005 eac2 pea 5eac2 <IMFS_memfile_handlers+0x38> 4b72a: 2f00 movel %d0,%sp@- 4b72c: 4eb9 0004 fe50 jsr 4fe50 <strcmp> 4b732: 508f addql #8,%sp 4b734: 4a80 tstl %d0
4b736: 6640 bnes 4b778 <rtems_assoc_ptr_by_local+0x68>
default_ap = ap++;
for ( ; ap->name; ap++)
4b738: 4aaa 000c tstl %a2@(12)
4b73c: 6756 beqs 4b794 <rtems_assoc_ptr_by_local+0x84> <== NEVER TAKEN
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
4b73e: 260a movel %a2,%d3 4b740: 45ea 000c lea %a2@(12),%a2
for ( ; ap->name; ap++)
if (ap->local_value == local_value)
4b744: b4aa 0004 cmpl %a2@(4),%d2
4b748: 674a beqs 4b794 <rtems_assoc_ptr_by_local+0x84>
#include <rtems.h>
#include <rtems/assoc.h>
#include <string.h> /* strcat, strcmp */
const rtems_assoc_t *rtems_assoc_ptr_by_local(
4b74a: 41ea 0010 lea %a2@(16),%a0 4b74e: 200a movel %a2,%d0 4b750: 43ea 000c lea %a2@(12),%a1 4b754: 2200 movel %d0,%d1 4b756: 928a subl %a2,%d1
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
4b758: 0680 0000 000c addil #12,%d0 4b75e: 41e8 000c lea %a0@(12),%a0 4b762: 4ab1 1800 tstl %a1@(00000000,%d1:l)
4b766: 6714 beqs 4b77c <rtems_assoc_ptr_by_local+0x6c>
if (ap->local_value == local_value)
4b768: b4a8 fff4 cmpl %a0@(-12),%d2
4b76c: 66e6 bnes 4b754 <rtems_assoc_ptr_by_local+0x44>
return ap;
return default_ap;
}
4b76e: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4b774: 4e5e unlk %fp 4b776: 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;
4b778: 4283 clrl %d3 4b77a: 60c8 bras 4b744 <rtems_assoc_ptr_by_local+0x34>
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
4b77c: 2003 movel %d3,%d0
if (ap->local_value == local_value)
return ap;
return default_ap;
}
4b77e: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4b784: 4e5e unlk %fp 4b786: 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;
4b788: 4280 clrl %d0
for ( ; ap->name; ap++)
if (ap->local_value == local_value)
return ap;
return default_ap;
}
4b78a: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4b790: 4e5e unlk %fp 4b792: 4e75 rts
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
if (ap->local_value == local_value)
4b794: 200a movel %a2,%d0
return ap;
return default_ap;
}
4b796: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
4b79c: 4e5e unlk %fp <== NOT EXECUTED
00043a64 <rtems_assoc_ptr_by_name>:
const rtems_assoc_t *rtems_assoc_ptr_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
43a64: 4e56 ffe4 linkw %fp,#-28 43a68: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 43a6c: 246e 0008 moveal %fp@(8),%a2 43a70: 282e 000c movel %fp@(12),%d4
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
43a74: 2412 movel %a2@,%d2
43a76: 6760 beqs 43ad8 <rtems_assoc_ptr_by_name+0x74>
43a78: 4879 0005 ebc3 pea 5ebc3 <_rodata_start+0x603> 43a7e: 47f9 0005 0a84 lea 50a84 <strcmp>,%a3 43a84: 2f02 movel %d2,%sp@- 43a86: 4e93 jsr %a3@ 43a88: 508f addql #8,%sp 43a8a: 4a80 tstl %d0
43a8c: 6640 bnes 43ace <rtems_assoc_ptr_by_name+0x6a>
default_ap = ap++;
for ( ; ap->name; ap++)
43a8e: 242a 000c movel %a2@(12),%d2
43a92: 6752 beqs 43ae6 <rtems_assoc_ptr_by_name+0x82> <== NEVER TAKEN
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
43a94: 2a0a movel %a2,%d5 43a96: 45ea 000c lea %a2@(12),%a2
const rtems_assoc_t *rtems_assoc_ptr_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
43a9a: 220a movel %a2,%d1
#include <rtems/assoc.h>
#include <string.h> /* strcat, strcmp */
const rtems_assoc_t *rtems_assoc_ptr_by_name(
43a9c: 49ea 000c lea %a2@(12),%a4
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
if (strcmp(ap->name, name) == 0)
43aa0: 2f04 movel %d4,%sp@-
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
43aa2: 2601 movel %d1,%d3
for ( ; ap->name; ap++)
if (strcmp(ap->name, name) == 0)
43aa4: 2f02 movel %d2,%sp@- 43aa6: 4e93 jsr %a3@ 43aa8: 508f addql #8,%sp 43aaa: 2203 movel %d3,%d1 43aac: 0681 0000 000c addil #12,%d1
#include <rtems/assoc.h>
#include <string.h> /* strcat, strcmp */
const rtems_assoc_t *rtems_assoc_ptr_by_name(
43ab2: 2041 moveal %d1,%a0 43ab4: 91ca subal %a2,%a0
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
if (strcmp(ap->name, name) == 0)
43ab6: 4a80 tstl %d0
43ab8: 6708 beqs 43ac2 <rtems_assoc_ptr_by_name+0x5e>
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
43aba: 2430 c8f4 movel %a0@(fffffff4,%a4:l),%d2
43abe: 66e0 bnes 43aa0 <rtems_assoc_ptr_by_name+0x3c>
43ac0: 2605 movel %d5,%d3
if (strcmp(ap->name, name) == 0)
return ap;
return default_ap;
}
43ac2: 2003 movel %d3,%d0 43ac4: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 43aca: 4e5e unlk %fp 43acc: 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;
43ace: 4285 clrl %d5
const rtems_assoc_t *rtems_assoc_ptr_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
43ad0: 220a movel %a2,%d1
#include <rtems/assoc.h>
#include <string.h> /* strcat, strcmp */
const rtems_assoc_t *rtems_assoc_ptr_by_name(
43ad2: 49ea 000c lea %a2@(12),%a4 43ad6: 60c8 bras 43aa0 <rtems_assoc_ptr_by_name+0x3c>
const rtems_assoc_t *ap,
const char *name
)
{
const rtems_assoc_t *default_ap = 0;
43ad8: 4283 clrl %d3
for ( ; ap->name; ap++)
if (strcmp(ap->name, name) == 0)
return ap;
return default_ap;
}
43ada: 2003 movel %d3,%d0 43adc: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 43ae2: 4e5e unlk %fp 43ae4: 4e75 rts
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
43ae6: 260a movel %a2,%d3 <== NOT EXECUTED
if (strcmp(ap->name, name) == 0)
return ap;
return default_ap;
}
43ae8: 2003 movel %d3,%d0 <== NOT EXECUTED 43aea: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 <== NOT EXECUTED 43af0: 4e5e unlk %fp <== NOT EXECUTED
0004b7a0 <rtems_assoc_ptr_by_remote>:
const rtems_assoc_t *rtems_assoc_ptr_by_remote(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
4b7a0: 4e56 fff4 linkw %fp,#-12 4b7a4: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4b7a8: 246e 0008 moveal %fp@(8),%a2 4b7ac: 242e 000c movel %fp@(12),%d2
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
4b7b0: 2012 movel %a2@,%d0
4b7b2: 6764 beqs 4b818 <rtems_assoc_ptr_by_remote+0x78>
4b7b4: 4879 0005 eac2 pea 5eac2 <IMFS_memfile_handlers+0x38> 4b7ba: 2f00 movel %d0,%sp@- 4b7bc: 4eb9 0004 fe50 jsr 4fe50 <strcmp> 4b7c2: 508f addql #8,%sp 4b7c4: 4a80 tstl %d0
4b7c6: 6640 bnes 4b808 <rtems_assoc_ptr_by_remote+0x68>
default_ap = ap++;
for ( ; ap->name; ap++)
4b7c8: 4aaa 000c tstl %a2@(12)
4b7cc: 6756 beqs 4b824 <rtems_assoc_ptr_by_remote+0x84> <== NEVER TAKEN
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
4b7ce: 260a movel %a2,%d3 4b7d0: 45ea 000c lea %a2@(12),%a2
for ( ; ap->name; ap++)
if (ap->remote_value == remote_value)
4b7d4: b4aa 0008 cmpl %a2@(8),%d2
4b7d8: 674a beqs 4b824 <rtems_assoc_ptr_by_remote+0x84>
#include <rtems.h>
#include <rtems/assoc.h>
#include <string.h> /* strcat, strcmp */
const rtems_assoc_t *rtems_assoc_ptr_by_remote(
4b7da: 41ea 0014 lea %a2@(20),%a0 4b7de: 200a movel %a2,%d0 4b7e0: 43ea 000c lea %a2@(12),%a1 4b7e4: 2200 movel %d0,%d1 4b7e6: 928a subl %a2,%d1
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
4b7e8: 0680 0000 000c addil #12,%d0 4b7ee: 41e8 000c lea %a0@(12),%a0 4b7f2: 4ab1 1800 tstl %a1@(00000000,%d1:l)
4b7f6: 6714 beqs 4b80c <rtems_assoc_ptr_by_remote+0x6c>
if (ap->remote_value == remote_value)
4b7f8: b4a8 fff4 cmpl %a0@(-12),%d2
4b7fc: 66e6 bnes 4b7e4 <rtems_assoc_ptr_by_remote+0x44>
return ap;
return default_ap;
}
4b7fe: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4b804: 4e5e unlk %fp 4b806: 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;
4b808: 4283 clrl %d3 4b80a: 60c8 bras 4b7d4 <rtems_assoc_ptr_by_remote+0x34>
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
4b80c: 2003 movel %d3,%d0
if (ap->remote_value == remote_value)
return ap;
return default_ap;
}
4b80e: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4b814: 4e5e unlk %fp 4b816: 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;
4b818: 4280 clrl %d0
for ( ; ap->name; ap++)
if (ap->remote_value == remote_value)
return ap;
return default_ap;
}
4b81a: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4b820: 4e5e unlk %fp 4b822: 4e75 rts
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
if (ap->remote_value == remote_value)
4b824: 200a movel %a2,%d0
return ap;
return default_ap;
}
4b826: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
4b82c: 4e5e unlk %fp <== NOT EXECUTED
00043b84 <rtems_assoc_remote_by_local_bitfield>:
uint32_t rtems_assoc_remote_by_local_bitfield(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
43b84: 4e56 ffe8 linkw %fp,#-24 43b88: 48d7 047c moveml %d2-%d6/%a2,%sp@ 43b8c: 2c2e 0008 movel %fp@(8),%d6 43b90: 7620 moveq #32,%d3
uint32_t b; uint32_t remote_value = 0;
43b92: 4285 clrl %d5
for (b = 1; b; b <<= 1)
43b94: 7401 moveq #1,%d2
if (b & local_value)
remote_value |= rtems_assoc_remote_by_local(ap, b);
43b96: 45f9 0004 3bcc lea 43bcc <rtems_assoc_remote_by_local>,%a2
uint32_t rtems_assoc_remote_by_local_bitfield(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
43b9c: 282e 000c movel %fp@(12),%d4
uint32_t b;
uint32_t remote_value = 0;
for (b = 1; b; b <<= 1)
if (b & local_value)
43ba0: 2002 movel %d2,%d0
)
{
uint32_t b;
uint32_t remote_value = 0;
for (b = 1; b; b <<= 1)
43ba2: 5383 subql #1,%d3
if (b & local_value)
43ba4: c084 andl %d4,%d0
43ba6: 6612 bnes 43bba <rtems_assoc_remote_by_local_bitfield+0x36>
)
{
uint32_t b;
uint32_t remote_value = 0;
for (b = 1; b; b <<= 1)
43ba8: d482 addl %d2,%d2 43baa: 4a83 tstl %d3
43bac: 66f2 bnes 43ba0 <rtems_assoc_remote_by_local_bitfield+0x1c>
if (b & local_value)
remote_value |= rtems_assoc_remote_by_local(ap, b);
return remote_value;
}
43bae: 2005 movel %d5,%d0 43bb0: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 43bb6: 4e5e unlk %fp 43bb8: 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);
43bba: 2f02 movel %d2,%sp@-
)
{
uint32_t b;
uint32_t remote_value = 0;
for (b = 1; b; b <<= 1)
43bbc: d482 addl %d2,%d2
if (b & local_value)
remote_value |= rtems_assoc_remote_by_local(ap, b);
43bbe: 2f06 movel %d6,%sp@- 43bc0: 4e92 jsr %a2@ 43bc2: 508f addql #8,%sp 43bc4: 8a80 orl %d0,%d5
)
{
uint32_t b;
uint32_t remote_value = 0;
for (b = 1; b; b <<= 1)
43bc6: 4a83 tstl %d3
43bc8: 66d6 bnes 43ba0 <rtems_assoc_remote_by_local_bitfield+0x1c><== ALWAYS TAKEN
43bca: 60e2 bras 43bae <rtems_assoc_remote_by_local_bitfield+0x2a><== NOT EXECUTED
0004f450 <rtems_barrier_delete>:
*/
rtems_status_code rtems_barrier_delete(
rtems_id id
)
{
4f450: 4e56 fff8 linkw %fp,#-8
RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Barrier_Control *)
4f454: 486e fffc pea %fp@(-4) 4f458: 2f2e 0008 movel %fp@(8),%sp@- 4f45c: 4879 0006 3f68 pea 63f68 <_Barrier_Information> 4f462: 4eb9 0004 a68c jsr 4a68c <_Objects_Get>
Barrier_Control *the_barrier;
Objects_Locations location;
the_barrier = _Barrier_Get( id, &location );
switch ( location ) {
4f468: 4fef 000c lea %sp@(12),%sp 4f46c: 4aae fffc tstl %fp@(-4)
4f470: 664a bnes 4f4bc <rtems_barrier_delete+0x6c> <== NEVER TAKEN
case OBJECTS_LOCAL:
_CORE_barrier_Flush(
4f472: 4878 0002 pea 2 <DOUBLE_FLOAT> 4f476: 2040 moveal %d0,%a0 4f478: 42a7 clrl %sp@- 4f47a: 4868 0014 pea %a0@(20) 4f47e: 2d40 fff8 movel %d0,%fp@(-8) 4f482: 4eb9 0004 bb50 jsr 4bb50 <_Thread_queue_Flush>
&the_barrier->Barrier,
NULL,
CORE_BARRIER_WAS_DELETED
);
_Objects_Close( &_Barrier_Information, &the_barrier->Object );
4f488: 202e fff8 movel %fp@(-8),%d0 4f48c: 2f00 movel %d0,%sp@- 4f48e: 4879 0006 3f68 pea 63f68 <_Barrier_Information> 4f494: 4eb9 0004 a258 jsr 4a258 <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _Barrier_Free (
Barrier_Control *the_barrier
)
{
_Objects_Free( &_Barrier_Information, &the_barrier->Object );
4f49a: 202e fff8 movel %fp@(-8),%d0 4f49e: 2f00 movel %d0,%sp@- 4f4a0: 4879 0006 3f68 pea 63f68 <_Barrier_Information> 4f4a6: 4eb9 0004 a518 jsr 4a518 <_Objects_Free>
_Barrier_Free( the_barrier );
_Thread_Enable_dispatch();
4f4ac: 4eb9 0004 b404 jsr 4b404 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
4f4b2: 4fef 001c lea %sp@(28),%sp 4f4b6: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4f4b8: 4e5e unlk %fp 4f4ba: 4e75 rts
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
4f4bc: 7004 moveq #4,%d0
}
4f4be: 4e5e unlk %fp
...
0004bfa6 <rtems_bdbuf_add_to_modified_list_after_access>:
}
}
static void
rtems_bdbuf_add_to_modified_list_after_access (rtems_bdbuf_buffer *bd)
{
4bfa6: 4e56 fff4 linkw %fp,#-12
if (bdbuf_cache.sync_active && bdbuf_cache.sync_device == bd->dev)
4bfaa: 1039 0006 4642 moveb 64642 <bdbuf_cache+0x2e>,%d0
}
}
static void
rtems_bdbuf_add_to_modified_list_after_access (rtems_bdbuf_buffer *bd)
{
4bfb0: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4bfb4: 246e 0008 moveal %fp@(8),%a2
if (bdbuf_cache.sync_active && bdbuf_cache.sync_device == bd->dev)
4bfb8: 4a00 tstb %d0
4bfba: 671c beqs 4bfd8 <rtems_bdbuf_add_to_modified_list_after_access+0x32><== ALWAYS TAKEN
4bfbc: 2039 0006 4648 movel 64648 <bdbuf_cache+0x34>,%d0 <== NOT EXECUTED 4bfc2: 2239 0006 464c movel 6464c <bdbuf_cache+0x38>,%d1 <== NOT EXECUTED 4bfc8: 242a 0012 movel %a2@(18),%d2 <== NOT EXECUTED 4bfcc: 262a 0016 movel %a2@(22),%d3 <== NOT EXECUTED 4bfd0: 9681 subl %d1,%d3 <== NOT EXECUTED 4bfd2: 9580 subxl %d0,%d2 <== NOT EXECUTED 4bfd4: 6700 008c beqw 4c062 <rtems_bdbuf_add_to_modified_list_after_access+0xbc><== NOT EXECUTED
* difficult question. Is a snapshot of a block that is changing better than * nothing being written? We have tended to think we should hold changes for * only a specific period of time even if still changing and get onto disk * and letting the file system try and recover this position if it can. */ if (bd->state == RTEMS_BDBUF_STATE_ACCESS_CACHED
4bfd8: 202a 0022 movel %a2@(34),%d0 4bfdc: 7603 moveq #3,%d3 4bfde: b680 cmpl %d0,%d3
4bfe0: 6744 beqs 4c026 <rtems_bdbuf_add_to_modified_list_after_access+0x80>
|| bd->state == RTEMS_BDBUF_STATE_ACCESS_EMPTY)
4bfe2: 202a 0022 movel %a2@(34),%d0 4bfe6: 7205 moveq #5,%d1 4bfe8: b280 cmpl %d0,%d1
4bfea: 673a beqs 4c026 <rtems_bdbuf_add_to_modified_list_after_access+0x80>
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
4bfec: 2f0a movel %a2,%sp@- 4bfee: 4879 0006 4660 pea 64660 <bdbuf_cache+0x4c>
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4bff4: 7007 moveq #7,%d0 4bff6: 2540 0022 movel %d0,%a2@(34) 4bffa: 4eb9 0004 88d4 jsr 488d4 <_Chain_Append>
bd->hold_timer = bdbuf_config.swap_block_hold;
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_MODIFIED);
rtems_chain_append (&bdbuf_cache.modified, &bd->link);
if (bd->waiters)
4c000: 202a 0026 movel %a2@(38),%d0 4c004: 508f addql #8,%sp
4c006: 6644 bnes 4c04c <rtems_bdbuf_add_to_modified_list_after_access+0xa6>
}
static bool
rtems_bdbuf_has_buffer_waiters (void)
{
return bdbuf_cache.buffer_waiters.count;
4c008: 2039 0006 4688 movel 64688 <bdbuf_cache+0x74>,%d0
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_MODIFIED);
rtems_chain_append (&bdbuf_cache.modified, &bd->link);
if (bd->waiters)
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
else if (rtems_bdbuf_has_buffer_waiters ())
4c00e: 660a bnes 4c01a <rtems_bdbuf_add_to_modified_list_after_access+0x74>
rtems_bdbuf_wake_swapper ();
}
4c010: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4c016: 4e5e unlk %fp 4c018: 4e75 rts 4c01a: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4c020: 4e5e unlk %fp
rtems_chain_append (&bdbuf_cache.modified, &bd->link);
if (bd->waiters)
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
else if (rtems_bdbuf_has_buffer_waiters ())
rtems_bdbuf_wake_swapper ();
4c022: 6000 fd64 braw 4bd88 <rtems_bdbuf_wake_swapper>
* only a specific period of time even if still changing and get onto disk
* and letting the file system try and recover this position if it can.
*/
if (bd->state == RTEMS_BDBUF_STATE_ACCESS_CACHED
|| bd->state == RTEMS_BDBUF_STATE_ACCESS_EMPTY)
bd->hold_timer = bdbuf_config.swap_block_hold;
4c026: 41f9 0006 192c lea 6192c <rtems_bdbuf_configuration+0x10>,%a0
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4c02c: 7007 moveq #7,%d0
* only a specific period of time even if still changing and get onto disk
* and letting the file system try and recover this position if it can.
*/
if (bd->state == RTEMS_BDBUF_STATE_ACCESS_CACHED
|| bd->state == RTEMS_BDBUF_STATE_ACCESS_EMPTY)
bd->hold_timer = bdbuf_config.swap_block_hold;
4c02e: 2550 002e movel %a0@,%a2@(46) 4c032: 2f0a movel %a2,%sp@- 4c034: 4879 0006 4660 pea 64660 <bdbuf_cache+0x4c>
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4c03a: 2540 0022 movel %d0,%a2@(34) 4c03e: 4eb9 0004 88d4 jsr 488d4 <_Chain_Append>
bd->hold_timer = bdbuf_config.swap_block_hold;
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_MODIFIED);
rtems_chain_append (&bdbuf_cache.modified, &bd->link);
if (bd->waiters)
4c044: 202a 0026 movel %a2@(38),%d0 4c048: 508f addql #8,%sp
4c04a: 67bc beqs 4c008 <rtems_bdbuf_add_to_modified_list_after_access+0x62>
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
4c04c: 223c 0006 4678 movel #411256,%d1
else if (rtems_bdbuf_has_buffer_waiters ())
rtems_bdbuf_wake_swapper ();
}
4c052: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_MODIFIED);
rtems_chain_append (&bdbuf_cache.modified, &bd->link);
if (bd->waiters)
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
4c058: 2d41 0008 movel %d1,%fp@(8)
else if (rtems_bdbuf_has_buffer_waiters ())
rtems_bdbuf_wake_swapper ();
}
4c05c: 4e5e unlk %fp
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_MODIFIED);
rtems_chain_append (&bdbuf_cache.modified, &bd->link);
if (bd->waiters)
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
4c05e: 6000 ff1a braw 4bf7a <rtems_bdbuf_wake>
static void
rtems_bdbuf_add_to_modified_list_after_access (rtems_bdbuf_buffer *bd)
{
if (bdbuf_cache.sync_active && bdbuf_cache.sync_device == bd->dev)
{
rtems_bdbuf_unlock_cache ();
4c062: 4eba fcb4 jsr %pc@(4bd18 <rtems_bdbuf_unlock_cache>) <== NOT EXECUTED
/*
* Wait for the sync lock.
*/
rtems_bdbuf_lock_sync ();
4c066: 4eba fb24 jsr %pc@(4bb8c <rtems_bdbuf_lock_sync>) <== NOT EXECUTED
rtems_bdbuf_unlock_sync ();
4c06a: 4eba fcd2 jsr %pc@(4bd3e <rtems_bdbuf_unlock_sync>) <== NOT EXECUTED
rtems_bdbuf_lock_cache ();
4c06e: 4eba faf0 jsr %pc@(4bb60 <rtems_bdbuf_lock_cache>) <== NOT EXECUTED 4c072: 6000 ff64 braw 4bfd8 <rtems_bdbuf_add_to_modified_list_after_access+0x32><== NOT EXECUTED
0004be76 <rtems_bdbuf_anonymous_wait>:
* The function assumes the cache is locked on entry and it will be locked on
* exit.
*/
static void
rtems_bdbuf_anonymous_wait (rtems_bdbuf_waiters *waiters)
{
4be76: 4e56 0000 linkw %fp,#0 4be7a: 2f0a movel %a2,%sp@- 4be7c: 246e 0008 moveal %fp@(8),%a2
rtems_mode prev_mode;
/*
* Indicate we are waiting.
*/
++waiters->count;
4be80: 2012 movel %a2@,%d0 4be82: 5280 addql #1,%d0
* The function assumes the cache is locked on entry and it will be locked on
* exit.
*/
static void
rtems_bdbuf_anonymous_wait (rtems_bdbuf_waiters *waiters)
{
4be84: 2f02 movel %d2,%sp@-
rtems_mode prev_mode;
/*
* Indicate we are waiting.
*/
++waiters->count;
4be86: 2480 movel %d0,%a2@
* blocking or just hits that window, and before this task has blocked on the * semaphore. If the preempting task flushes the queue this task will not see * the flush and may block for ever or until another transaction flushes this * semaphore. */ prev_mode = rtems_bdbuf_disable_preemption ();
4be88: 4eba ff88 jsr %pc@(4be12 <rtems_bdbuf_disable_preemption>) 4be8c: 2400 movel %d0,%d2
/*
* Unlock the cache, wait, and lock the cache when we return.
*/
rtems_bdbuf_unlock_cache ();
4be8e: 4eba fe88 jsr %pc@(4bd18 <rtems_bdbuf_unlock_cache>)
sc = rtems_semaphore_obtain (waiters->sema, RTEMS_WAIT, RTEMS_BDBUF_WAIT_TIMEOUT);
4be92: 42a7 clrl %sp@- 4be94: 42a7 clrl %sp@- 4be96: 2f2a 0004 movel %a2@(4),%sp@- 4be9a: 4eb9 0004 7cac jsr 47cac <rtems_semaphore_obtain>
if (sc == RTEMS_TIMEOUT)
4bea0: 4fef 000c lea %sp@(12),%sp 4bea4: 7206 moveq #6,%d1 4bea6: b280 cmpl %d0,%d1
4bea8: 6724 beqs 4bece <rtems_bdbuf_anonymous_wait+0x58><== NEVER TAKEN
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_CACHE_WAIT_TO);
if (sc != RTEMS_UNSATISFIED)
4beaa: 720d moveq #13,%d1 4beac: b280 cmpl %d0,%d1
4beae: 662a bnes 4beda <rtems_bdbuf_anonymous_wait+0x64><== NEVER TAKEN
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_CACHE_WAIT_2);
rtems_bdbuf_lock_cache ();
4beb0: 4eba fcae jsr %pc@(4bb60 <rtems_bdbuf_lock_cache>)
rtems_bdbuf_restore_preemption (prev_mode);
4beb4: 2f02 movel %d2,%sp@- 4beb6: 4eba ff8e jsr %pc@(4be46 <rtems_bdbuf_restore_preemption>)
--waiters->count;
4beba: 2012 movel %a2@,%d0 4bebc: 5380 subql #1,%d0 4bebe: 588f addql #4,%sp 4bec0: 2480 movel %d0,%a2@
}
4bec2: 242e fff8 movel %fp@(-8),%d2 4bec6: 246e fffc moveal %fp@(-4),%a2 4beca: 4e5e unlk %fp 4becc: 4e75 rts
rtems_bdbuf_unlock_cache ();
sc = rtems_semaphore_obtain (waiters->sema, RTEMS_WAIT, RTEMS_BDBUF_WAIT_TIMEOUT);
if (sc == RTEMS_TIMEOUT)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_CACHE_WAIT_TO);
4bece: 2f3c 4200 0012 movel #1107296274,%sp@- <== NOT EXECUTED 4bed4: 4eb9 0004 83dc jsr 483dc <rtems_fatal_error_occurred> <== NOT EXECUTED
if (sc != RTEMS_UNSATISFIED)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_CACHE_WAIT_2);
4beda: 2f3c 4200 0010 movel #1107296272,%sp@- <== NOT EXECUTED 4bee0: 4eb9 0004 83dc jsr 483dc <rtems_fatal_error_occurred> <== NOT EXECUTED
0004be12 <rtems_bdbuf_disable_preemption>:
--bd->group->users;
}
static rtems_mode
rtems_bdbuf_disable_preemption (void)
{
4be12: 4e56 fffc linkw %fp,#-4
rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_mode prev_mode = 0;
4be16: 204e moveal %fp,%a0 4be18: 42a0 clrl %a0@-
sc = rtems_task_mode (RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &prev_mode);
4be1a: 2f08 movel %a0,%sp@- 4be1c: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> 4be20: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> 4be24: 4eb9 0005 086c jsr 5086c <rtems_task_mode>
if (sc != RTEMS_SUCCESSFUL)
4be2a: 4fef 000c lea %sp@(12),%sp 4be2e: 4a80 tstl %d0
4be30: 6608 bnes 4be3a <rtems_bdbuf_disable_preemption+0x28><== NEVER TAKEN
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_PREEMPT_DIS);
return prev_mode;
}
4be32: 202e fffc movel %fp@(-4),%d0 4be36: 4e5e unlk %fp 4be38: 4e75 rts
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_mode prev_mode = 0;
sc = rtems_task_mode (RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &prev_mode);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_PREEMPT_DIS);
4be3a: 2f3c 4200 000f movel #1107296271,%sp@- <== NOT EXECUTED 4be40: 4eb9 0004 83dc jsr 483dc <rtems_fatal_error_occurred> <== NOT EXECUTED
0004c4d6 <rtems_bdbuf_discard_buffer_after_access>:
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4c4d6: 7001 moveq #1,%d0
return bdbuf_cache.max_bds_per_group / bds_per_size;
}
static void
rtems_bdbuf_discard_buffer_after_access (rtems_bdbuf_buffer *bd)
{
4c4d8: 4e56 0000 linkw %fp,#0 4c4dc: 2f0a movel %a2,%sp@- 4c4de: 246e 0008 moveal %fp@(8),%a2
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
4c4e2: 206a 002a moveal %a2@(42),%a0 4c4e6: 53a8 000c subql #1,%a0@(12)
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4c4ea: 2540 0022 movel %d0,%a2@(34)
static void
rtems_bdbuf_discard_buffer (rtems_bdbuf_buffer *bd)
{
rtems_bdbuf_make_empty (bd);
if (bd->waiters == 0)
4c4ee: 202a 0026 movel %a2@(38),%d0
4c4f2: 671a beqs 4c50e <rtems_bdbuf_discard_buffer_after_access+0x38>
rtems_bdbuf_discard_buffer_after_access (rtems_bdbuf_buffer *bd)
{
rtems_bdbuf_group_release (bd);
rtems_bdbuf_discard_buffer (bd);
if (bd->waiters)
4c4f4: 202a 0026 movel %a2@(38),%d0
4c4f8: 6636 bnes 4c530 <rtems_bdbuf_discard_buffer_after_access+0x5a><== ALWAYS TAKEN
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
else
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
}
4c4fa: 246e fffc moveal %fp@(-4),%a2
rtems_bdbuf_discard_buffer (bd);
if (bd->waiters)
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
else
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
4c4fe: 203c 0006 4688 movel #411272,%d0 4c504: 2d40 0008 movel %d0,%fp@(8)
}
4c508: 4e5e unlk %fp
rtems_bdbuf_discard_buffer (bd);
if (bd->waiters)
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
else
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
4c50a: 6000 fa6e braw 4bf7a <rtems_bdbuf_wake>
{
rtems_bdbuf_make_empty (bd);
if (bd->waiters == 0)
{
rtems_bdbuf_remove_from_tree (bd);
4c50e: 2f0a movel %a2,%sp@- 4c510: 4eba fc4a jsr %pc@(4c15c <rtems_bdbuf_remove_from_tree>) 4c514: 2f0a movel %a2,%sp@- 4c516: 4879 0006 4654 pea 64654 <bdbuf_cache+0x40>
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4c51c: 42aa 0022 clrl %a2@(34) 4c520: 4eb9 0005 0ce8 jsr 50ce8 <_Chain_Insert>
rtems_bdbuf_discard_buffer_after_access (rtems_bdbuf_buffer *bd)
{
rtems_bdbuf_group_release (bd);
rtems_bdbuf_discard_buffer (bd);
if (bd->waiters)
4c526: 202a 0026 movel %a2@(38),%d0 4c52a: 4fef 000c lea %sp@(12),%sp
4c52e: 67ca beqs 4c4fa <rtems_bdbuf_discard_buffer_after_access+0x24><== ALWAYS TAKEN
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
else
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
}
4c530: 246e fffc moveal %fp@(-4),%a2
{
rtems_bdbuf_group_release (bd);
rtems_bdbuf_discard_buffer (bd);
if (bd->waiters)
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
4c534: 203c 0006 4678 movel #411256,%d0 4c53a: 2d40 0008 movel %d0,%fp@(8)
else
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
}
4c53e: 4e5e unlk %fp
{
rtems_bdbuf_group_release (bd);
rtems_bdbuf_discard_buffer (bd);
if (bd->waiters)
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
4c540: 6000 fa38 braw 4bf7a <rtems_bdbuf_wake>
0004c6f4 <rtems_bdbuf_execute_transfer_request.isra.9>:
req->bufnum = transfer_index;
}
static rtems_status_code
rtems_bdbuf_execute_transfer_request (const rtems_disk_device *dd,
4c6f4: 4e56 ffd8 linkw %fp,#-40 4c6f8: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4c6fc: 142e 0017 moveb %fp@(23),%d2 4c700: 246e 0010 moveal %fp@(16),%a2
int result = 0;
uint32_t transfer_index = 0;
bool wake_transfer_waiters = false;
bool wake_buffer_waiters = false;
if (cache_locked)
4c704: 6600 0126 bnew 4c82c <rtems_bdbuf_execute_transfer_request.isra.9+0x138>
rtems_bdbuf_unlock_cache ();
result = dd->ioctl (dd->phys_dev, RTEMS_BLKIO_REQUEST, req);
4c708: 206e 000c moveal %fp@(12),%a0 4c70c: 2f0a movel %a2,%sp@- 4c70e: 2050 moveal %a0@,%a0 4c710: 226e 0008 moveal %fp@(8),%a1 4c714: 2f3c c018 4201 movel #-1072152063,%sp@- 4c71a: 2f11 movel %a1@,%sp@- 4c71c: 4e90 jsr %a0@
if (result == 0)
4c71e: 4fef 000c lea %sp@(12),%sp 4c722: 4a80 tstl %d0 4c724: 6700 012a beqw 4c850 <rtems_bdbuf_execute_transfer_request.isra.9+0x15c>
{
rtems_bdbuf_wait_for_event (RTEMS_BDBUF_TRANSFER_SYNC);
sc = req->status;
}
else
sc = RTEMS_IO_ERROR;
4c728: 781b moveq #27,%d4
rtems_bdbuf_lock_cache ();
4c72a: 4eba f434 jsr %pc@(4bb60 <rtems_bdbuf_lock_cache>)
for (transfer_index = 0; transfer_index < req->bufnum; ++transfer_index)
4c72e: 4aaa 0010 tstl %a2@(16)
4c732: 675a beqs 4c78e <rtems_bdbuf_execute_transfer_request.isra.9+0x9a><== NEVER TAKEN
req->bufnum = transfer_index;
}
static rtems_status_code
rtems_bdbuf_execute_transfer_request (const rtems_disk_device *dd,
4c734: 49ea 0024 lea %a2@(36),%a4
else
sc = RTEMS_IO_ERROR;
rtems_bdbuf_lock_cache ();
for (transfer_index = 0; transfer_index < req->bufnum; ++transfer_index)
4c738: 4283 clrl %d3
{
rtems_bdbuf_make_empty (bd);
if (bd->waiters == 0)
{
rtems_bdbuf_remove_from_tree (bd);
4c73a: 2e3c 0004 c15c movel #311644,%d7 4c740: 4bf9 0005 0ce8 lea 50ce8 <_Chain_Insert>,%a5
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
int result = 0;
uint32_t transfer_index = 0;
bool wake_transfer_waiters = false;
bool wake_buffer_waiters = false;
4c746: 4205 clrb %d5
bool cache_locked)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
int result = 0;
uint32_t transfer_index = 0;
bool wake_transfer_waiters = false;
4c748: 4206 clrb %d6
rtems_bdbuf_lock_cache ();
for (transfer_index = 0; transfer_index < req->bufnum; ++transfer_index)
{
rtems_bdbuf_buffer *bd = req->bufs [transfer_index].user;
4c74a: 2654 moveal %a4@,%a3
bool waiters = bd->waiters;
4c74c: 222b 0026 movel %a3@(38),%d1
if (waiters)
4c750: 6700 00a6 beqw 4c7f8 <rtems_bdbuf_execute_transfer_request.isra.9+0x104>
wake_transfer_waiters = true;
4c754: 7c01 moveq #1,%d6
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
4c756: 206b 002a moveal %a3@(42),%a0 4c75a: 53a8 000c subql #1,%a0@(12)
else
wake_buffer_waiters = true;
rtems_bdbuf_group_release (bd);
if (sc == RTEMS_SUCCESSFUL && bd->state == RTEMS_BDBUF_STATE_TRANSFER)
4c75e: 4a84 tstl %d4
4c760: 660a bnes 4c76c <rtems_bdbuf_execute_transfer_request.isra.9+0x78>
4c762: 202b 0022 movel %a3@(34),%d0 4c766: 7209 moveq #9,%d1 4c768: b280 cmpl %d0,%d1
4c76a: 6766 beqs 4c7d2 <rtems_bdbuf_execute_transfer_request.isra.9+0xde>
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4c76c: 7201 moveq #1,%d1 4c76e: 2741 0022 movel %d1,%a3@(34)
static void
rtems_bdbuf_discard_buffer (rtems_bdbuf_buffer *bd)
{
rtems_bdbuf_make_empty (bd);
if (bd->waiters == 0)
4c772: 222b 0026 movel %a3@(38),%d1
4c776: 6732 beqs 4c7aa <rtems_bdbuf_execute_transfer_request.isra.9+0xb6>
else
sc = RTEMS_IO_ERROR;
rtems_bdbuf_lock_cache ();
for (transfer_index = 0; transfer_index < req->bufnum; ++transfer_index)
4c778: 5283 addql #1,%d3 4c77a: 49ec 0010 lea %a4@(16),%a4 4c77e: b6aa 0010 cmpl %a2@(16),%d3
4c782: 65c6 bcss 4c74a <rtems_bdbuf_execute_transfer_request.isra.9+0x56><== NEVER TAKEN
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("transfer", bd);
}
if (wake_transfer_waiters)
4c784: 4a06 tstb %d6 4c786: 6600 0090 bnew 4c818 <rtems_bdbuf_execute_transfer_request.isra.9+0x124>
rtems_bdbuf_wake (&bdbuf_cache.transfer_waiters);
if (wake_buffer_waiters)
4c78a: 4a05 tstb %d5
4c78c: 6676 bnes 4c804 <rtems_bdbuf_execute_transfer_request.isra.9+0x110><== ALWAYS TAKEN
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
if (!cache_locked)
4c78e: 4a02 tstb %d2
4c790: 676c beqs 4c7fe <rtems_bdbuf_execute_transfer_request.isra.9+0x10a>
rtems_bdbuf_unlock_cache ();
if (sc == RTEMS_SUCCESSFUL || sc == RTEMS_UNSATISFIED)
4c792: 4a84 tstl %d4
4c794: 6708 beqs 4c79e <rtems_bdbuf_execute_transfer_request.isra.9+0xaa>
4c796: 700d moveq #13,%d0 4c798: b084 cmpl %d4,%d0
4c79a: 6702 beqs 4c79e <rtems_bdbuf_execute_transfer_request.isra.9+0xaa>
return sc;
else
return RTEMS_IO_ERROR;
4c79c: 781b moveq #27,%d4
}
4c79e: 2004 movel %d4,%d0 4c7a0: 4cee 3cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a5 4c7a6: 4e5e unlk %fp 4c7a8: 4e75 rts
{
rtems_bdbuf_make_empty (bd);
if (bd->waiters == 0)
{
rtems_bdbuf_remove_from_tree (bd);
4c7aa: 2f0b movel %a3,%sp@- 4c7ac: 2047 moveal %d7,%a0
else
sc = RTEMS_IO_ERROR;
rtems_bdbuf_lock_cache ();
for (transfer_index = 0; transfer_index < req->bufnum; ++transfer_index)
4c7ae: 5283 addql #1,%d3 4c7b0: 49ec 0010 lea %a4@(16),%a4
{
rtems_bdbuf_make_empty (bd);
if (bd->waiters == 0)
{
rtems_bdbuf_remove_from_tree (bd);
4c7b4: 4e90 jsr %a0@
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4c7b6: 42ab 0022 clrl %a3@(34) 4c7ba: 2f0b movel %a3,%sp@- 4c7bc: 4879 0006 4654 pea 64654 <bdbuf_cache+0x40> 4c7c2: 4e95 jsr %a5@ 4c7c4: 4fef 000c lea %sp@(12),%sp
else
sc = RTEMS_IO_ERROR;
rtems_bdbuf_lock_cache ();
for (transfer_index = 0; transfer_index < req->bufnum; ++transfer_index)
4c7c8: b6aa 0010 cmpl %a2@(16),%d3 4c7cc: 6500 ff7c bcsw 4c74a <rtems_bdbuf_execute_transfer_request.isra.9+0x56> 4c7d0: 60b2 bras 4c784 <rtems_bdbuf_execute_transfer_request.isra.9+0x90>
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4c7d2: 7002 moveq #2,%d0
else
sc = RTEMS_IO_ERROR;
rtems_bdbuf_lock_cache ();
for (transfer_index = 0; transfer_index < req->bufnum; ++transfer_index)
4c7d4: 5283 addql #1,%d3 4c7d6: 49ec 0010 lea %a4@(16),%a4
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4c7da: 2740 0022 movel %d0,%a3@(34)
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
4c7de: 2f0b movel %a3,%sp@- 4c7e0: 4879 0006 4654 pea 64654 <bdbuf_cache+0x40> 4c7e6: 4eb9 0004 88d4 jsr 488d4 <_Chain_Append> 4c7ec: 508f addql #8,%sp
else
sc = RTEMS_IO_ERROR;
rtems_bdbuf_lock_cache ();
for (transfer_index = 0; transfer_index < req->bufnum; ++transfer_index)
4c7ee: b6aa 0010 cmpl %a2@(16),%d3 4c7f2: 6500 ff56 bcsw 4c74a <rtems_bdbuf_execute_transfer_request.isra.9+0x56> 4c7f6: 608c bras 4c784 <rtems_bdbuf_execute_transfer_request.isra.9+0x90>
bool waiters = bd->waiters;
if (waiters)
wake_transfer_waiters = true;
else
wake_buffer_waiters = true;
4c7f8: 7a01 moveq #1,%d5 4c7fa: 6000 ff5a braw 4c756 <rtems_bdbuf_execute_transfer_request.isra.9+0x62>
if (wake_buffer_waiters)
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
if (!cache_locked)
rtems_bdbuf_unlock_cache ();
4c7fe: 4eba f518 jsr %pc@(4bd18 <rtems_bdbuf_unlock_cache>) 4c802: 608e bras 4c792 <rtems_bdbuf_execute_transfer_request.isra.9+0x9e>
if (wake_transfer_waiters)
rtems_bdbuf_wake (&bdbuf_cache.transfer_waiters);
if (wake_buffer_waiters)
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
4c804: 4879 0006 4688 pea 64688 <bdbuf_cache+0x74> 4c80a: 4eba f76e jsr %pc@(4bf7a <rtems_bdbuf_wake>) 4c80e: 588f addql #4,%sp
if (!cache_locked)
4c810: 4a02 tstb %d2 4c812: 6600 ff7e bnew 4c792 <rtems_bdbuf_execute_transfer_request.isra.9+0x9e> 4c816: 60e6 bras 4c7fe <rtems_bdbuf_execute_transfer_request.isra.9+0x10a>
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("transfer", bd);
}
if (wake_transfer_waiters)
rtems_bdbuf_wake (&bdbuf_cache.transfer_waiters);
4c818: 4879 0006 4680 pea 64680 <bdbuf_cache+0x6c> 4c81e: 4eba f75a jsr %pc@(4bf7a <rtems_bdbuf_wake>) 4c822: 588f addql #4,%sp
if (wake_buffer_waiters)
4c824: 4a05 tstb %d5 4c826: 6700 ff66 beqw 4c78e <rtems_bdbuf_execute_transfer_request.isra.9+0x9a> 4c82a: 60d8 bras 4c804 <rtems_bdbuf_execute_transfer_request.isra.9+0x110>
uint32_t transfer_index = 0;
bool wake_transfer_waiters = false;
bool wake_buffer_waiters = false;
if (cache_locked)
rtems_bdbuf_unlock_cache ();
4c82c: 4eba f4ea jsr %pc@(4bd18 <rtems_bdbuf_unlock_cache>)
result = dd->ioctl (dd->phys_dev, RTEMS_BLKIO_REQUEST, req);
4c830: 206e 000c moveal %fp@(12),%a0 4c834: 2f0a movel %a2,%sp@- 4c836: 2050 moveal %a0@,%a0 4c838: 226e 0008 moveal %fp@(8),%a1 4c83c: 2f3c c018 4201 movel #-1072152063,%sp@- 4c842: 2f11 movel %a1@,%sp@- 4c844: 4e90 jsr %a0@
if (result == 0)
4c846: 4fef 000c lea %sp@(12),%sp 4c84a: 4a80 tstl %d0 4c84c: 6600 feda bnew 4c728 <rtems_bdbuf_execute_transfer_request.isra.9+0x34>
{
rtems_bdbuf_wait_for_event (RTEMS_BDBUF_TRANSFER_SYNC);
4c850: 4878 0002 pea 2 <DOUBLE_FLOAT> 4c854: 4eba f57e jsr %pc@(4bdd4 <rtems_bdbuf_wait_for_event>)
sc = req->status;
4c858: 282a 000c movel %a2@(12),%d4 4c85c: 588f addql #4,%sp 4c85e: 6000 feca braw 4c72a <rtems_bdbuf_execute_transfer_request.isra.9+0x36>
0004bbb8 <rtems_bdbuf_fatal>:
#define RTEMS_BDBUF_AVL_MAX_HEIGHT (32)
#endif
static void
rtems_bdbuf_fatal (rtems_bdbuf_buf_state state, uint32_t error)
{
4bbb8: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 4bbbc: 202e 0008 movel %fp@(8),%d0 <== NOT EXECUTED
rtems_fatal_error_occurred ((((uint32_t) state) << 16) | error);
4bbc0: 4840 swap %d0 <== NOT EXECUTED 4bbc2: 4240 clrw %d0 <== NOT EXECUTED 4bbc4: 80ae 000c orl %fp@(12),%d0 <== NOT EXECUTED 4bbc8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4bbca: 4eb9 0004 83dc jsr 483dc <rtems_fatal_error_occurred> <== NOT EXECUTED
0004d884 <rtems_bdbuf_get>:
rtems_status_code
rtems_bdbuf_get (dev_t dev,
rtems_blkdev_bnum block,
rtems_bdbuf_buffer **bd_ptr)
{
4d884: 4e56 ffe4 linkw %fp,#-28 4d888: 48d7 041c moveml %d2-%d4/%a2,%sp@ 4d88c: 242e 0008 movel %fp@(8),%d2 4d890: 262e 000c movel %fp@(12),%d3
rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_disk_device *dd = NULL;
4d894: 42ae fff4 clrl %fp@(-12)
rtems_bdbuf_buffer *bd = NULL; rtems_blkdev_bnum media_block = 0;
4d898: 42ae fff8 clrl %fp@(-8)
size_t bds_per_group = 0;
4d89c: 42ae fffc clrl %fp@(-4)
rtems_blkdev_bnum *media_block_ptr,
size_t *bds_per_group_ptr)
{
rtems_disk_device *dd = NULL;
if (!bdbuf_cache.initialised)
4d8a0: 4a39 0006 4698 tstb 64698 <bdbuf_cache+0x84>
4d8a6: 660e bnes 4d8b6 <rtems_bdbuf_get+0x32> <== ALWAYS TAKEN
return RTEMS_NOT_CONFIGURED;
4d8a8: 7816 moveq #22,%d4 <== NOT EXECUTED
rtems_bdbuf_release_disk (dd);
*bd_ptr = bd;
return RTEMS_SUCCESSFUL;
}
4d8aa: 2004 movel %d4,%d0 <== NOT EXECUTED 4d8ac: 4cee 041c ffe4 moveml %fp@(-28),%d2-%d4/%a2 <== NOT EXECUTED 4d8b2: 4e5e unlk %fp <== NOT EXECUTED 4d8b4: 4e75 rts <== NOT EXECUTED
rtems_blkdev_bnum *media_block_ptr,
size_t *bds_per_group_ptr)
{
rtems_disk_device *dd = NULL;
if (!bdbuf_cache.initialised)
4d8b6: 486e fffc pea %fp@(-4) 4d8ba: 486e fff8 pea %fp@(-8) 4d8be: 486e fff4 pea %fp@(-12) 4d8c2: 2f2e 0010 movel %fp@(16),%sp@- 4d8c6: 2f03 movel %d3,%sp@- 4d8c8: 2f02 movel %d2,%sp@- 4d8ca: 4eba e7aa jsr %pc@(4c076 <rtems_bdbuf_obtain_disk.part.8>)
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block = 0;
size_t bds_per_group = 0;
sc = rtems_bdbuf_obtain_disk (dev, block, &dd, &media_block, &bds_per_group);
if (sc != RTEMS_SUCCESSFUL)
4d8ce: 4fef 0018 lea %sp@(24),%sp
rtems_blkdev_bnum *media_block_ptr,
size_t *bds_per_group_ptr)
{
rtems_disk_device *dd = NULL;
if (!bdbuf_cache.initialised)
4d8d2: 2800 movel %d0,%d4
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block = 0;
size_t bds_per_group = 0;
sc = rtems_bdbuf_obtain_disk (dev, block, &dd, &media_block, &bds_per_group);
if (sc != RTEMS_SUCCESSFUL)
4d8d4: 66d4 bnes 4d8aa <rtems_bdbuf_get+0x26> <== NEVER TAKEN
return sc;
rtems_bdbuf_lock_cache ();
4d8d6: 4eba e288 jsr %pc@(4bb60 <rtems_bdbuf_lock_cache>)
*/
if (rtems_bdbuf_tracer)
printf ("bdbuf:get: %" PRIu32 " (%" PRIu32 ") (dev = %08x)\n",
media_block, block, (unsigned) dev);
bd = rtems_bdbuf_get_buffer_for_access (dev, media_block, bds_per_group);
4d8da: 2f2e fffc movel %fp@(-4),%sp@- 4d8de: 2f2e fff8 movel %fp@(-8),%sp@- 4d8e2: 2f03 movel %d3,%sp@- 4d8e4: 2f02 movel %d2,%sp@- 4d8e6: 4eba f946 jsr %pc@(4d22e <rtems_bdbuf_get_buffer_for_access>)
switch (bd->state)
4d8ea: 4fef 0010 lea %sp@(16),%sp 4d8ee: 7202 moveq #2,%d1
*/
if (rtems_bdbuf_tracer)
printf ("bdbuf:get: %" PRIu32 " (%" PRIu32 ") (dev = %08x)\n",
media_block, block, (unsigned) dev);
bd = rtems_bdbuf_get_buffer_for_access (dev, media_block, bds_per_group);
4d8f0: 2440 moveal %d0,%a2
switch (bd->state)
4d8f2: 202a 0022 movel %a2@(34),%d0 4d8f6: b280 cmpl %d0,%d1
4d8f8: 6746 beqs 4d940 <rtems_bdbuf_get+0xbc>
4d8fa: 123c 0007 moveb #7,%d1 4d8fe: b280 cmpl %d0,%d1
4d900: 6718 beqs 4d91a <rtems_bdbuf_get+0x96>
4d902: 123c 0001 moveb #1,%d1 4d906: b280 cmpl %d0,%d1
4d908: 6752 beqs 4d95c <rtems_bdbuf_get+0xd8> <== ALWAYS TAKEN
* so just gets the block to fill.
*/
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_ACCESS_MODIFIED);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_2);
4d90a: 202a 0022 movel %a2@(34),%d0 <== NOT EXECUTED 4d90e: 2f3c 4200 001e movel #1107296286,%sp@- <== NOT EXECUTED 4d914: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4d916: 4eba e2a0 jsr %pc@(4bbb8 <rtems_bdbuf_fatal>) <== NOT EXECUTED
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4d91a: 7004 moveq #4,%d0 4d91c: 2540 0022 movel %d0,%a2@(34)
{
rtems_bdbuf_show_users ("get", bd);
rtems_bdbuf_show_usage ();
}
rtems_bdbuf_unlock_cache ();
4d920: 4eba e3f6 jsr %pc@(4bd18 <rtems_bdbuf_unlock_cache>)
rtems_bdbuf_release_disk (dd);
4d924: 2f2e fff4 movel %fp@(-12),%sp@- 4d928: 4eba e43a jsr %pc@(4bd64 <rtems_bdbuf_release_disk>)
*bd_ptr = bd;
4d92c: 206e 0014 moveal %fp@(20),%a0
return RTEMS_SUCCESSFUL;
4d930: 588f addql #4,%sp
rtems_bdbuf_unlock_cache ();
rtems_bdbuf_release_disk (dd);
*bd_ptr = bd;
4d932: 208a movel %a2,%a0@
return RTEMS_SUCCESSFUL;
}
4d934: 2004 movel %d4,%d0 4d936: 4cee 041c ffe4 moveml %fp@(-28),%d2-%d4/%a2 4d93c: 4e5e unlk %fp 4d93e: 4e75 rts
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4d940: 7003 moveq #3,%d0 4d942: 2540 0022 movel %d0,%a2@(34)
{
rtems_bdbuf_show_users ("get", bd);
rtems_bdbuf_show_usage ();
}
rtems_bdbuf_unlock_cache ();
4d946: 4eba e3d0 jsr %pc@(4bd18 <rtems_bdbuf_unlock_cache>)
rtems_bdbuf_release_disk (dd);
4d94a: 2f2e fff4 movel %fp@(-12),%sp@- 4d94e: 4eba e414 jsr %pc@(4bd64 <rtems_bdbuf_release_disk>)
*bd_ptr = bd;
4d952: 206e 0014 moveal %fp@(20),%a0
return RTEMS_SUCCESSFUL;
4d956: 588f addql #4,%sp
rtems_bdbuf_unlock_cache ();
rtems_bdbuf_release_disk (dd);
*bd_ptr = bd;
4d958: 208a movel %a2,%a0@ 4d95a: 60d8 bras 4d934 <rtems_bdbuf_get+0xb0>
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4d95c: 7205 moveq #5,%d1 4d95e: 2541 0022 movel %d1,%a2@(34)
{
rtems_bdbuf_show_users ("get", bd);
rtems_bdbuf_show_usage ();
}
rtems_bdbuf_unlock_cache ();
4d962: 4eba e3b4 jsr %pc@(4bd18 <rtems_bdbuf_unlock_cache>)
rtems_bdbuf_release_disk (dd);
4d966: 2f2e fff4 movel %fp@(-12),%sp@- 4d96a: 4eba e3f8 jsr %pc@(4bd64 <rtems_bdbuf_release_disk>)
*bd_ptr = bd;
4d96e: 206e 0014 moveal %fp@(20),%a0
return RTEMS_SUCCESSFUL;
4d972: 588f addql #4,%sp
rtems_bdbuf_unlock_cache ();
rtems_bdbuf_release_disk (dd);
*bd_ptr = bd;
4d974: 208a movel %a2,%a0@ 4d976: 60bc bras 4d934 <rtems_bdbuf_get+0xb0>
0004d22e <rtems_bdbuf_get_buffer_for_access>:
static rtems_bdbuf_buffer *
rtems_bdbuf_get_buffer_for_access (dev_t dev,
rtems_blkdev_bnum block,
size_t bds_per_group)
{
4d22e: 4e56 ffd4 linkw %fp,#-44
rtems_bdbuf_buffer *bd = NULL;
do
{
bd = rtems_bdbuf_avl_search (&bdbuf_cache.tree, dev, block);
4d232: 2079 0006 4650 moveal 64650 <bdbuf_cache+0x3c>,%a0
static rtems_bdbuf_buffer *
rtems_bdbuf_get_buffer_for_access (dev_t dev,
rtems_blkdev_bnum block,
size_t bds_per_group)
{
4d238: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4d23c: 2c2e 0010 movel %fp@(16),%d6
rtems_bdbuf_wait (bd, &bdbuf_cache.access_waiters);
break;
case RTEMS_BDBUF_STATE_SYNC:
case RTEMS_BDBUF_STATE_TRANSFER:
case RTEMS_BDBUF_STATE_TRANSFER_PURGED:
rtems_bdbuf_wait (bd, &bdbuf_cache.transfer_waiters);
4d240: 45fa eca4 lea %pc@(4bee6 <rtems_bdbuf_wait>),%a2
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
4d244: 49f9 0004 890c lea 4890c <_Chain_Extract>,%a4
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
4d24a: 4bf9 0004 88d4 lea 488d4 <_Chain_Append>,%a5
rtems_bdbuf_request_sync_for_modified_buffer (rtems_bdbuf_buffer *bd)
{
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_SYNC);
rtems_chain_extract (&bd->link);
rtems_chain_append (&bdbuf_cache.sync, &bd->link);
rtems_bdbuf_wake_swapper ();
4d250: 47fa eb36 lea %pc@(4bd88 <rtems_bdbuf_wake_swapper>),%a3
{
if (bd->group->bds_per_group != bds_per_group)
{
if (rtems_bdbuf_wait_for_recycle (bd))
{
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
4d254: 2e3c 0004 c498 movel #312472,%d7
static rtems_bdbuf_buffer *
rtems_bdbuf_get_buffer_for_access (dev_t dev,
rtems_blkdev_bnum block,
size_t bds_per_group)
{
4d25a: 242e 0008 movel %fp@(8),%d2 4d25e: 262e 000c movel %fp@(12),%d3
dev_t dev,
rtems_blkdev_bnum block)
{
rtems_bdbuf_buffer* p = *root;
while ((p != NULL) && ((p->dev != dev) || (p->block != block)))
4d262: 4a88 tstl %a0
4d264: 6724 beqs 4d28a <rtems_bdbuf_get_buffer_for_access+0x5c>
4d266: 2828 0012 movel %a0@(18),%d4 4d26a: 2a28 0016 movel %a0@(22),%d5 4d26e: 2002 movel %d2,%d0 4d270: 2203 movel %d3,%d1 4d272: 9285 subl %d5,%d1 4d274: 9184 subxl %d4,%d0
4d276: 674c beqs 4d2c4 <rtems_bdbuf_get_buffer_for_access+0x96>
{
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
4d278: 2002 movel %d2,%d0 4d27a: 2203 movel %d3,%d1 4d27c: 9285 subl %d5,%d1 4d27e: 9184 subxl %d4,%d0
4d280: 634c blss 4d2ce <rtems_bdbuf_get_buffer_for_access+0xa0>
{
p = p->avl.right;
4d282: 2068 000c moveal %a0@(12),%a0
dev_t dev,
rtems_blkdev_bnum block)
{
rtems_bdbuf_buffer* p = *root;
while ((p != NULL) && ((p->dev != dev) || (p->block != block)))
4d286: 4a88 tstl %a0
4d288: 66dc bnes 4d266 <rtems_bdbuf_get_buffer_for_access+0x38>
bd = NULL;
}
}
else
{
bd = rtems_bdbuf_get_buffer_from_lru_list (dev, block, bds_per_group);
4d28a: 2f2e 0014 movel %fp@(20),%sp@- 4d28e: 2f06 movel %d6,%sp@- 4d290: 2f03 movel %d3,%sp@- 4d292: 2f02 movel %d2,%sp@- 4d294: 4eba fbf8 jsr %pc@(4ce8e <rtems_bdbuf_get_buffer_from_lru_list>)
if (bd == NULL)
4d298: 4fef 0010 lea %sp@(16),%sp
bd = NULL;
}
}
else
{
bd = rtems_bdbuf_get_buffer_from_lru_list (dev, block, bds_per_group);
4d29c: 2040 moveal %d0,%a0
if (bd == NULL)
4d29e: 4a80 tstl %d0 4d2a0: 6700 013a beqw 4d3dc <rtems_bdbuf_get_buffer_for_access+0x1ae>
static void
rtems_bdbuf_wait_for_access (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
4d2a4: 2028 0022 movel %a0@(34),%d0
rtems_bdbuf_wait (bd, &bdbuf_cache.access_waiters);
break;
case RTEMS_BDBUF_STATE_SYNC:
case RTEMS_BDBUF_STATE_TRANSFER:
case RTEMS_BDBUF_STATE_TRANSFER_PURGED:
rtems_bdbuf_wait (bd, &bdbuf_cache.transfer_waiters);
4d2a8: 45fa ec3c lea %pc@(4bee6 <rtems_bdbuf_wait>),%a2
static void
rtems_bdbuf_wait_for_access (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
4d2ac: 720a moveq #10,%d1 4d2ae: b280 cmpl %d0,%d1 4d2b0: 6400 010a bccw 4d3bc <rtems_bdbuf_get_buffer_for_access+0x18e>
case RTEMS_BDBUF_STATE_TRANSFER:
case RTEMS_BDBUF_STATE_TRANSFER_PURGED:
rtems_bdbuf_wait (bd, &bdbuf_cache.transfer_waiters);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_7);
4d2b4: 2028 0022 movel %a0@(34),%d0 <== NOT EXECUTED 4d2b8: 2f3c 4200 0005 movel #1107296261,%sp@- <== NOT EXECUTED 4d2be: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4d2c0: 4eba e8f6 jsr %pc@(4bbb8 <rtems_bdbuf_fatal>) <== NOT EXECUTED
dev_t dev,
rtems_blkdev_bnum block)
{
rtems_bdbuf_buffer* p = *root;
while ((p != NULL) && ((p->dev != dev) || (p->block != block)))
4d2c4: 2028 001a movel %a0@(26),%d0 4d2c8: b086 cmpl %d6,%d0
4d2ca: 670c beqs 4d2d8 <rtems_bdbuf_get_buffer_for_access+0xaa>
{
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
4d2cc: 65b4 bcss 4d282 <rtems_bdbuf_get_buffer_for_access+0x54>
{
p = p->avl.right;
}
else
{
p = p->avl.left;
4d2ce: 2068 0008 moveal %a0@(8),%a0
dev_t dev,
rtems_blkdev_bnum block)
{
rtems_bdbuf_buffer* p = *root;
while ((p != NULL) && ((p->dev != dev) || (p->block != block)))
4d2d2: 4a88 tstl %a0
4d2d4: 6690 bnes 4d266 <rtems_bdbuf_get_buffer_for_access+0x38>
4d2d6: 60b2 bras 4d28a <rtems_bdbuf_get_buffer_for_access+0x5c>
{
bd = rtems_bdbuf_avl_search (&bdbuf_cache.tree, dev, block);
if (bd != NULL)
{
if (bd->group->bds_per_group != bds_per_group)
4d2d8: 2268 002a moveal %a0@(42),%a1 4d2dc: 222e 0014 movel %fp@(20),%d1 4d2e0: b2a9 0008 cmpl %a1@(8),%d1
4d2e4: 67be beqs 4d2a4 <rtems_bdbuf_get_buffer_for_access+0x76>
static bool
rtems_bdbuf_wait_for_recycle (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
4d2e6: 2028 0022 movel %a0@(34),%d0 4d2ea: 720a moveq #10,%d1 4d2ec: b280 cmpl %d0,%d1
4d2ee: 6410 bccs 4d300 <rtems_bdbuf_get_buffer_for_access+0xd2><== ALWAYS TAKEN
case RTEMS_BDBUF_STATE_TRANSFER:
case RTEMS_BDBUF_STATE_TRANSFER_PURGED:
rtems_bdbuf_wait (bd, &bdbuf_cache.transfer_waiters);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_8);
4d2f0: 2028 0022 movel %a0@(34),%d0 <== NOT EXECUTED 4d2f4: 2f3c 4200 0006 movel #1107296262,%sp@- <== NOT EXECUTED 4d2fa: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4d2fc: 4eba e8ba jsr %pc@(4bbb8 <rtems_bdbuf_fatal>) <== NOT EXECUTED
static bool
rtems_bdbuf_wait_for_recycle (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
4d300: 303b 0a08 movew %pc@(4d30a <rtems_bdbuf_get_buffer_for_access+0xdc>,%d0:l:2),%d0 4d304: 48c0 extl %d0 4d306: 4efb 0802 jmp %pc@(4d30a <rtems_bdbuf_get_buffer_for_access+0xdc>,%d0:l)
4d30a: 005c .short 0x005c <== NOT EXECUTED 4d30c: 0054 .short 0x0054 <== NOT EXECUTED 4d30e: 0054 .short 0x0054 <== NOT EXECUTED 4d310: 003e .short 0x003e <== NOT EXECUTED 4d312: 003e .short 0x003e <== NOT EXECUTED 4d314: 003e .short 0x003e <== NOT EXECUTED 4d316: 003e .short 0x003e <== NOT EXECUTED 4d318: 0016 .short 0x0016 <== NOT EXECUTED 4d31a: 009a 009a 009a oril #10092698,%d2 <== NOT EXECUTED
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4d320: 7008 moveq #8,%d0 <== NOT EXECUTED 4d322: 2140 0022 movel %d0,%a0@(34) <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
4d326: 2f08 movel %a0,%sp@- <== NOT EXECUTED 4d328: 2d48 fffc movel %a0,%fp@(-4) <== NOT EXECUTED 4d32c: 4e94 jsr %a4@ <== 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 );
4d32e: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 4d332: 2f08 movel %a0,%sp@- <== NOT EXECUTED 4d334: 4879 0006 466c pea 6466c <bdbuf_cache+0x58> <== NOT EXECUTED 4d33a: 4e95 jsr %a5@ <== NOT EXECUTED
rtems_bdbuf_request_sync_for_modified_buffer (rtems_bdbuf_buffer *bd)
{
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_SYNC);
rtems_chain_extract (&bd->link);
rtems_chain_append (&bdbuf_cache.sync, &bd->link);
rtems_bdbuf_wake_swapper ();
4d33c: 4e93 jsr %a3@ <== NOT EXECUTED 4d33e: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 4d342: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4d346: 609e bras 4d2e6 <rtems_bdbuf_get_buffer_for_access+0xb8><== NOT EXECUTED
}
case RTEMS_BDBUF_STATE_ACCESS_CACHED:
case RTEMS_BDBUF_STATE_ACCESS_EMPTY:
case RTEMS_BDBUF_STATE_ACCESS_MODIFIED:
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
rtems_bdbuf_wait (bd, &bdbuf_cache.access_waiters);
4d348: 4879 0006 4678 pea 64678 <bdbuf_cache+0x64>
break;
case RTEMS_BDBUF_STATE_SYNC:
case RTEMS_BDBUF_STATE_TRANSFER:
case RTEMS_BDBUF_STATE_TRANSFER_PURGED:
rtems_bdbuf_wait (bd, &bdbuf_cache.transfer_waiters);
4d34e: 2d48 fffc movel %a0,%fp@(-4) 4d352: 2f08 movel %a0,%sp@- 4d354: 4e92 jsr %a2@ 4d356: 206e fffc moveal %fp@(-4),%a0 4d35a: 508f addql #8,%sp 4d35c: 6088 bras 4d2e6 <rtems_bdbuf_get_buffer_for_access+0xb8>
case RTEMS_BDBUF_STATE_MODIFIED:
rtems_bdbuf_request_sync_for_modified_buffer (bd);
break;
case RTEMS_BDBUF_STATE_CACHED:
case RTEMS_BDBUF_STATE_EMPTY:
if (bd->waiters == 0)
4d35e: 2028 0026 movel %a0@(38),%d0 4d362: 6600 0088 bnew 4d3ec <rtems_bdbuf_get_buffer_for_access+0x1be>
{
if (bd->group->bds_per_group != bds_per_group)
{
if (rtems_bdbuf_wait_for_recycle (bd))
{
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
4d366: 2f08 movel %a0,%sp@- <== NOT EXECUTED 4d368: 2247 moveal %d7,%a1 <== NOT EXECUTED 4d36a: 2d48 fffc movel %a0,%fp@(-4) <== NOT EXECUTED 4d36e: 4e91 jsr %a1@ <== NOT EXECUTED
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4d370: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 4d374: 42a8 0022 clrl %a0@(34) <== NOT EXECUTED 4d378: 2f08 movel %a0,%sp@- <== NOT EXECUTED 4d37a: 4879 0006 4654 pea 64654 <bdbuf_cache+0x40> <== NOT EXECUTED 4d380: 4eb9 0005 0ce8 jsr 50ce8 <_Chain_Insert> <== NOT EXECUTED
{
if (rtems_bdbuf_wait_for_recycle (bd))
{
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
rtems_bdbuf_make_free_and_add_to_lru_list (bd);
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
4d386: 4879 0006 4688 pea 64688 <bdbuf_cache+0x74> <== NOT EXECUTED 4d38c: 4eba ebec jsr %pc@(4bf7a <rtems_bdbuf_wake>) <== NOT EXECUTED
{
rtems_bdbuf_buffer *bd = NULL;
do
{
bd = rtems_bdbuf_avl_search (&bdbuf_cache.tree, dev, block);
4d390: 2079 0006 4650 moveal 64650 <bdbuf_cache+0x3c>,%a0 <== NOT EXECUTED
{
if (rtems_bdbuf_wait_for_recycle (bd))
{
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
rtems_bdbuf_make_free_and_add_to_lru_list (bd);
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
4d396: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
dev_t dev,
rtems_blkdev_bnum block)
{
rtems_bdbuf_buffer* p = *root;
while ((p != NULL) && ((p->dev != dev) || (p->block != block)))
4d39a: 4a88 tstl %a0 <== NOT EXECUTED 4d39c: 6600 fec8 bnew 4d266 <rtems_bdbuf_get_buffer_for_access+0x38><== NOT EXECUTED 4d3a0: 6000 fee8 braw 4d28a <rtems_bdbuf_get_buffer_for_access+0x5c><== NOT EXECUTED
rtems_bdbuf_wait (bd, &bdbuf_cache.access_waiters);
break;
case RTEMS_BDBUF_STATE_SYNC:
case RTEMS_BDBUF_STATE_TRANSFER:
case RTEMS_BDBUF_STATE_TRANSFER_PURGED:
rtems_bdbuf_wait (bd, &bdbuf_cache.transfer_waiters);
4d3a4: 4879 0006 4680 pea 64680 <bdbuf_cache+0x6c> <== NOT EXECUTED 4d3aa: 2d48 fffc movel %a0,%fp@(-4) <== NOT EXECUTED 4d3ae: 2f08 movel %a0,%sp@- <== NOT EXECUTED 4d3b0: 4e92 jsr %a2@ <== NOT EXECUTED 4d3b2: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 4d3b6: 508f addql #8,%sp <== NOT EXECUTED 4d3b8: 6000 ff2c braw 4d2e6 <rtems_bdbuf_get_buffer_for_access+0xb8><== NOT EXECUTED
static void
rtems_bdbuf_wait_for_access (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
4d3bc: 303b 0a08 movew %pc@(4d3c6 <rtems_bdbuf_get_buffer_for_access+0x198>,%d0:l:2),%d0 4d3c0: 48c0 extl %d0 4d3c2: 4efb 0802 jmp %pc@(4d3c6 <rtems_bdbuf_get_buffer_for_access+0x198>,%d0:l)
4d3c6: feee .short 0xfeee <== NOT EXECUTED 4d3c8: 005c .short 0x005c <== NOT EXECUTED 4d3ca: 004a .short 0x004a <== NOT EXECUTED 4d3cc: 0094 0094 0094 oril #9699476,%d4 <== NOT EXECUTED 4d3d2: 0094 0042 0070 oril #4325488,%d4 <== NOT EXECUTED 4d3d8: 0070 .short 0x0070 <== NOT EXECUTED 4d3da: 0070 .short 0x0070 <== NOT EXECUTED
}
static void
rtems_bdbuf_wait_for_buffer (void)
{
if (!rtems_chain_is_empty (&bdbuf_cache.modified))
4d3dc: 203c 0006 4664 movel #411236,%d0 4d3e2: b0b9 0006 4660 cmpl 64660 <bdbuf_cache+0x4c>,%d0
4d3e8: 6702 beqs 4d3ec <rtems_bdbuf_get_buffer_for_access+0x1be>
rtems_bdbuf_wake_swapper ();
4d3ea: 4e93 jsr %a3@
rtems_bdbuf_anonymous_wait (&bdbuf_cache.buffer_waiters);
4d3ec: 4879 0006 4688 pea 64688 <bdbuf_cache+0x74> 4d3f2: 4eba ea82 jsr %pc@(4be76 <rtems_bdbuf_anonymous_wait>)
{
rtems_bdbuf_buffer *bd = NULL;
do
{
bd = rtems_bdbuf_avl_search (&bdbuf_cache.tree, dev, block);
4d3f6: 2079 0006 4650 moveal 64650 <bdbuf_cache+0x3c>,%a0
rtems_bdbuf_wait_for_buffer (void)
{
if (!rtems_chain_is_empty (&bdbuf_cache.modified))
rtems_bdbuf_wake_swapper ();
rtems_bdbuf_anonymous_wait (&bdbuf_cache.buffer_waiters);
4d3fc: 588f addql #4,%sp
dev_t dev,
rtems_blkdev_bnum block)
{
rtems_bdbuf_buffer* p = *root;
while ((p != NULL) && ((p->dev != dev) || (p->block != block)))
4d3fe: 4a88 tstl %a0 4d400: 6600 fe64 bnew 4d266 <rtems_bdbuf_get_buffer_for_access+0x38> 4d404: 6000 fe84 braw 4d28a <rtems_bdbuf_get_buffer_for_access+0x5c>
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
4d408: 2268 002a moveal %a0@(42),%a1 4d40c: 53a9 000c subql #1,%a1@(12)
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
4d410: 2f08 movel %a0,%sp@- 4d412: 2d48 fffc movel %a0,%fp@(-4) 4d416: 4eb9 0004 890c jsr 4890c <_Chain_Extract> 4d41c: 206e fffc moveal %fp@(-4),%a0 4d420: 588f addql #4,%sp
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
4d422: 2268 002a moveal %a0@(42),%a1
rtems_bdbuf_wait_for_access (bd);
rtems_bdbuf_group_obtain (bd);
return bd;
}
4d426: 2008 movel %a0,%d0
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
4d428: 52a9 000c addql #1,%a1@(12)
rtems_bdbuf_wait_for_access (bd);
rtems_bdbuf_group_obtain (bd);
return bd;
}
4d42c: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 4d432: 4e5e unlk %fp 4d434: 4e75 rts
rtems_bdbuf_wait (bd, &bdbuf_cache.access_waiters);
break;
case RTEMS_BDBUF_STATE_SYNC:
case RTEMS_BDBUF_STATE_TRANSFER:
case RTEMS_BDBUF_STATE_TRANSFER_PURGED:
rtems_bdbuf_wait (bd, &bdbuf_cache.transfer_waiters);
4d436: 4879 0006 4680 pea 64680 <bdbuf_cache+0x6c> 4d43c: 2d48 fffc movel %a0,%fp@(-4) 4d440: 2f08 movel %a0,%sp@- 4d442: 4e92 jsr %a2@ 4d444: 206e fffc moveal %fp@(-4),%a0 4d448: 508f addql #8,%sp
static void
rtems_bdbuf_wait_for_access (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
4d44a: 2028 0022 movel %a0@(34),%d0 4d44e: 720a moveq #10,%d1 4d450: b280 cmpl %d0,%d1 4d452: 6500 fe60 bcsw 4d2b4 <rtems_bdbuf_get_buffer_for_access+0x86> 4d456: 6000 ff64 braw 4d3bc <rtems_bdbuf_get_buffer_for_access+0x18e>
return;
case RTEMS_BDBUF_STATE_ACCESS_CACHED:
case RTEMS_BDBUF_STATE_ACCESS_EMPTY:
case RTEMS_BDBUF_STATE_ACCESS_MODIFIED:
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
rtems_bdbuf_wait (bd, &bdbuf_cache.access_waiters);
4d45a: 4879 0006 4678 pea 64678 <bdbuf_cache+0x64>
break;
case RTEMS_BDBUF_STATE_SYNC:
case RTEMS_BDBUF_STATE_TRANSFER:
case RTEMS_BDBUF_STATE_TRANSFER_PURGED:
rtems_bdbuf_wait (bd, &bdbuf_cache.transfer_waiters);
4d460: 2d48 fffc movel %a0,%fp@(-4) 4d464: 2f08 movel %a0,%sp@- 4d466: 4e92 jsr %a2@ 4d468: 206e fffc moveal %fp@(-4),%a0 4d46c: 508f addql #8,%sp 4d46e: 60da bras 4d44a <rtems_bdbuf_get_buffer_for_access+0x21c>
0004ce8e <rtems_bdbuf_get_buffer_from_lru_list>:
static rtems_bdbuf_buffer *
rtems_bdbuf_get_buffer_from_lru_list (dev_t dev,
rtems_blkdev_bnum block,
size_t bds_per_group)
{
4ce8e: 4e56 ff54 linkw %fp,#-172 4ce92: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4ce96: 2c2e 0014 movel %fp@(20),%d6
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
4ce9a: 2879 0006 4654 moveal 64654 <bdbuf_cache+0x40>,%a4 4cea0: 242e 0008 movel %fp@(8),%d2 4cea4: 262e 000c movel %fp@(12),%d3
rtems_chain_node *node = rtems_chain_first (&bdbuf_cache.lru);
while (!rtems_chain_is_tail (&bdbuf_cache.lru, node))
4cea8: b9fc 0006 4658 cmpal #411224,%a4 4ceae: 6700 00be beqw 4cf6e <rtems_bdbuf_get_buffer_from_lru_list+0xe0> 4ceb2: 4bfa f5e4 lea %pc@(4c498 <rtems_bdbuf_remove_from_tree_and_lru_list>),%a5 4ceb6: 2a3c 0005 0ce8 movel #330984,%d5
bd->group->bds_per_group, bds_per_group);
/*
* If nobody waits for this BD, we may recycle it.
*/
if (bd->waiters == 0)
4cebc: 202c 0026 movel %a4@(38),%d0 4cec0: 6600 00a0 bnew 4cf62 <rtems_bdbuf_get_buffer_from_lru_list+0xd4>
{
if (bd->group->bds_per_group == bds_per_group)
4cec4: 266c 002a moveal %a4@(42),%a3 4cec8: 202b 0008 movel %a3@(8),%d0 4cecc: bc80 cmpl %d0,%d6 4cece: 6700 00b6 beqw 4cf86 <rtems_bdbuf_get_buffer_from_lru_list+0xf8>
{
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
empty_bd = bd;
}
else if (bd->group->users == 0)
4ced2: 4aab 000c tstl %a3@(12) 4ced6: 6600 008a bnew 4cf62 <rtems_bdbuf_get_buffer_from_lru_list+0xd4>
if (rtems_bdbuf_tracer)
printf ("bdbuf:realloc: %tu: %zd -> %zd\n",
group - bdbuf_cache.groups, group->bds_per_group,
new_bds_per_group);
bufs_per_bd = bdbuf_cache.max_bds_per_group / group->bds_per_group;
4ceda: 2239 0006 4632 movel 64632 <bdbuf_cache+0x1e>,%d1
for (b = 0, bd = group->bdbuf;
4cee0: 246b 0010 moveal %a3@(16),%a2 4cee4: 4a80 tstl %d0
4cee6: 6726 beqs 4cf0e <rtems_bdbuf_get_buffer_from_lru_list+0x80><== NEVER TAKEN
4cee8: 4284 clrl %d4
if (rtems_bdbuf_tracer)
printf ("bdbuf:realloc: %tu: %zd -> %zd\n",
group - bdbuf_cache.groups, group->bds_per_group,
new_bds_per_group);
bufs_per_bd = bdbuf_cache.max_bds_per_group / group->bds_per_group;
4ceea: 4c40 1001 remul %d0,%d1,%d1
for (b = 0, bd = group->bdbuf;
4ceee: 703a moveq #58,%d0 4cef0: 4c00 1800 mulsl %d0,%d1 4cef4: 2d41 ff7c movel %d1,%fp@(-132)
b < group->bds_per_group;
b++, bd += bufs_per_bd)
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
4cef8: 2f0a movel %a2,%sp@-
bufs_per_bd = bdbuf_cache.max_bds_per_group / group->bds_per_group;
for (b = 0, bd = group->bdbuf;
b < group->bds_per_group;
b++, bd += bufs_per_bd)
4cefa: d5ee ff7c addal %fp@(-132),%a2 4cefe: 5284 addql #1,%d4
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
4cf00: 4e95 jsr %a5@
group - bdbuf_cache.groups, group->bds_per_group,
new_bds_per_group);
bufs_per_bd = bdbuf_cache.max_bds_per_group / group->bds_per_group;
for (b = 0, bd = group->bdbuf;
4cf02: 588f addql #4,%sp 4cf04: b8ab 0008 cmpl %a3@(8),%d4
4cf08: 65ee bcss 4cef8 <rtems_bdbuf_get_buffer_from_lru_list+0x6a>
4cf0a: 246b 0010 moveal %a3@(16),%a2
b < group->bds_per_group;
b++, bd += bufs_per_bd)
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
group->bds_per_group = new_bds_per_group;
4cf0e: 2746 0008 movel %d6,%a3@(8)
bufs_per_bd = bdbuf_cache.max_bds_per_group / new_bds_per_group;
4cf12: 2e39 0006 4632 movel 64632 <bdbuf_cache+0x1e>,%d7
for (b = 1, bd = group->bdbuf + bufs_per_bd;
4cf18: 7201 moveq #1,%d1 4cf1a: b286 cmpl %d6,%d1
4cf1c: 6440 bccs 4cf5e <rtems_bdbuf_get_buffer_from_lru_list+0xd0>
4cf1e: 7801 moveq #1,%d4
b < group->bds_per_group;
b++, bd += bufs_per_bd)
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
group->bds_per_group = new_bds_per_group;
bufs_per_bd = bdbuf_cache.max_bds_per_group / new_bds_per_group;
4cf20: 4c46 7007 remul %d6,%d7,%d7
for (b = 1, bd = group->bdbuf + bufs_per_bd;
4cf24: 703a moveq #58,%d0 4cf26: 4c00 7800 mulsl %d0,%d7 4cf2a: d5c7 addal %d7,%a2
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4cf2c: 42aa 0022 clrl %a2@(34)
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
4cf30: 2045 moveal %d5,%a0
group->bds_per_group = new_bds_per_group;
bufs_per_bd = bdbuf_cache.max_bds_per_group / new_bds_per_group;
for (b = 1, bd = group->bdbuf + bufs_per_bd;
b < group->bds_per_group;
b++, bd += bufs_per_bd)
4cf32: 5284 addql #1,%d4 4cf34: 2f0a movel %a2,%sp@- 4cf36: 4879 0006 4654 pea 64654 <bdbuf_cache+0x40> 4cf3c: d5c7 addal %d7,%a2 4cf3e: 4e90 jsr %a0@
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
group->bds_per_group = new_bds_per_group;
bufs_per_bd = bdbuf_cache.max_bds_per_group / new_bds_per_group;
for (b = 1, bd = group->bdbuf + bufs_per_bd;
4cf40: 508f addql #8,%sp 4cf42: b8ab 0008 cmpl %a3@(8),%d4
4cf46: 65e4 bcss 4cf2c <rtems_bdbuf_get_buffer_from_lru_list+0x9e><== NEVER TAKEN
b < group->bds_per_group;
b++, bd += bufs_per_bd)
rtems_bdbuf_make_free_and_add_to_lru_list (bd);
if (b > 1)
4cf48: 7001 moveq #1,%d0 4cf4a: b084 cmpl %d4,%d0
4cf4c: 642e bccs 4cf7c <rtems_bdbuf_get_buffer_from_lru_list+0xee><== NEVER TAKEN
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
4cf4e: 4879 0006 4688 pea 64688 <bdbuf_cache+0x74> 4cf54: 4eba f024 jsr %pc@(4bf7a <rtems_bdbuf_wake>) 4cf58: 246b 0010 moveal %a3@(16),%a2 4cf5c: 588f addql #4,%sp
}
else if (bd->group->users == 0)
empty_bd = rtems_bdbuf_group_realloc (bd->group, bds_per_group);
}
if (empty_bd != NULL)
4cf5e: 4a8a tstl %a2
4cf60: 6630 bnes 4cf92 <rtems_bdbuf_get_buffer_from_lru_list+0x104><== ALWAYS TAKEN
rtems_bdbuf_purge_major (rtems_device_major_number major)
{
dev_t dev = rtems_filesystem_make_dev_t (major, 0);
rtems_bdbuf_purge (rtems_bdbuf_purge_compare_major, dev);
}
4cf62: 2854 moveal %a4@,%a4
rtems_blkdev_bnum block,
size_t bds_per_group)
{
rtems_chain_node *node = rtems_chain_first (&bdbuf_cache.lru);
while (!rtems_chain_is_tail (&bdbuf_cache.lru, node))
4cf64: b9fc 0006 4658 cmpal #411224,%a4 4cf6a: 6600 ff50 bnew 4cebc <rtems_bdbuf_get_buffer_from_lru_list+0x2e>
}
node = rtems_chain_next (node);
}
return NULL;
4cf6e: 95ca subal %a2,%a2
}
4cf70: 200a movel %a2,%d0 4cf72: 4cee 3cfc ff54 moveml %fp@(-172),%d2-%d7/%a2-%a5 4cf78: 4e5e unlk %fp 4cf7a: 4e75 rts
for (b = 1, bd = group->bdbuf + bufs_per_bd;
b < group->bds_per_group;
b++, bd += bufs_per_bd)
rtems_bdbuf_make_free_and_add_to_lru_list (bd);
if (b > 1)
4cf7c: 246b 0010 moveal %a3@(16),%a2 <== NOT EXECUTED
}
else if (bd->group->users == 0)
empty_bd = rtems_bdbuf_group_realloc (bd->group, bds_per_group);
}
if (empty_bd != NULL)
4cf80: 4a8a tstl %a2 <== NOT EXECUTED 4cf82: 67de beqs 4cf62 <rtems_bdbuf_get_buffer_from_lru_list+0xd4><== NOT EXECUTED 4cf84: 600c bras 4cf92 <rtems_bdbuf_get_buffer_from_lru_list+0x104><== NOT EXECUTED
*/
if (bd->waiters == 0)
{
if (bd->group->bds_per_group == bds_per_group)
{
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
4cf86: 2f0c movel %a4,%sp@- 4cf88: 244c moveal %a4,%a2 4cf8a: 4e95 jsr %a5@ 4cf8c: 588f addql #4,%sp
}
else if (bd->group->users == 0)
empty_bd = rtems_bdbuf_group_realloc (bd->group, bds_per_group);
}
if (empty_bd != NULL)
4cf8e: 4a8a tstl %a2
4cf90: 67d0 beqs 4cf62 <rtems_bdbuf_get_buffer_from_lru_list+0xd4><== NEVER TAKEN
dev_t dev,
rtems_blkdev_bnum block)
{
bd->dev = dev;
bd->block = block;
bd->avl.left = NULL;
4cf92: 42aa 0008 clrl %a2@(8)
rtems_bdbuf_setup_empty_buffer (rtems_bdbuf_buffer *bd,
dev_t dev,
rtems_blkdev_bnum block)
{
bd->dev = dev;
bd->block = block;
4cf96: 222e 0010 movel %fp@(16),%d1
bd->avl.left = NULL; bd->avl.right = NULL;
4cf9a: 42aa 000c clrl %a2@(12)
rtems_bdbuf_buffer* node)
{
dev_t dev = node->dev;
rtems_blkdev_bnum block = node->block;
rtems_bdbuf_buffer* p = *root;
4cf9e: 2079 0006 4650 moveal 64650 <bdbuf_cache+0x3c>,%a0
rtems_bdbuf_setup_empty_buffer (rtems_bdbuf_buffer *bd,
dev_t dev,
rtems_blkdev_bnum block)
{
bd->dev = dev;
bd->block = block;
4cfa4: 2541 001a movel %d1,%a2@(26)
static void
rtems_bdbuf_setup_empty_buffer (rtems_bdbuf_buffer *bd,
dev_t dev,
rtems_blkdev_bnum block)
{
bd->dev = dev;
4cfa8: 2542 0012 movel %d2,%a2@(18) 4cfac: 2543 0016 movel %d3,%a2@(22)
bd->block = block; bd->avl.left = NULL; bd->avl.right = NULL; bd->waiters = 0;
4cfb0: 42aa 0026 clrl %a2@(38)
rtems_bdbuf_buffer* buf_stack[RTEMS_BDBUF_AVL_MAX_HEIGHT];
rtems_bdbuf_buffer** buf_prev = buf_stack;
bool modified = false;
if (p == NULL)
4cfb4: 4a88 tstl %a0 4cfb6: 6700 025e beqw 4d216 <rtems_bdbuf_get_buffer_from_lru_list+0x388>
rtems_bdbuf_buffer* p = *root; rtems_bdbuf_buffer* q; rtems_bdbuf_buffer* p1; rtems_bdbuf_buffer* p2; rtems_bdbuf_buffer* buf_stack[RTEMS_BDBUF_AVL_MAX_HEIGHT]; rtems_bdbuf_buffer** buf_prev = buf_stack;
4cfba: 2a0e movel %fp,%d5 4cfbc: 0685 ffff ff80 addil #-128,%d5 4cfc2: 2805 movel %d5,%d4
return 0;
}
while (p != NULL)
{
*buf_prev++ = p;
4cfc4: 2244 moveal %d4,%a1
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
4cfc6: 2028 0012 movel %a0@(18),%d0 4cfca: 2228 0016 movel %a0@(22),%d1 4cfce: 2c02 movel %d2,%d6 4cfd0: 2e03 movel %d3,%d7
return 0;
}
while (p != NULL)
{
*buf_prev++ = p;
4cfd2: 22c8 movel %a0,%a1@+
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
4cfd4: 9e81 subl %d1,%d7 4cfd6: 9d80 subxl %d0,%d6
4cfd8: 6236 bhis 4d010 <rtems_bdbuf_get_buffer_from_lru_list+0x182><== NEVER TAKEN
4cfda: 2c02 movel %d2,%d6 4cfdc: 2e03 movel %d3,%d7 4cfde: 9e81 subl %d1,%d7 4cfe0: 9d80 subxl %d0,%d6 4cfe2: 6700 009c beqw 4d080 <rtems_bdbuf_get_buffer_from_lru_list+0x1f2>
}
}
else if ((p->dev != dev) || (p->block != block))
{
p->avl.cache = -1;
q = p->avl.left;
4cfe6: 2028 0008 movel %a0@(8),%d0
break;
}
}
else if ((p->dev != dev) || (p->block != block))
{
p->avl.cache = -1;
4cfea: 50c1 st %d1 4cfec: 1141 0010 moveb %d1,%a0@(16)
q = p->avl.left;
if (q == NULL)
4cff0: 4a80 tstl %d0 4cff2: 6700 00a6 beqw 4d09a <rtems_bdbuf_get_buffer_from_lru_list+0x20c>
rtems_bdbuf_buffer* buf_stack[RTEMS_BDBUF_AVL_MAX_HEIGHT];
rtems_bdbuf_buffer** buf_prev = buf_stack;
bool modified = false;
if (p == NULL)
4cff6: 2040 moveal %d0,%a0
p->avl.cache = -1;
q = p->avl.left;
if (q == NULL)
{
q = node;
p->avl.left = q;
4cff8: 2809 movel %a1,%d4
return 0;
}
while (p != NULL)
{
*buf_prev++ = p;
4cffa: 2244 moveal %d4,%a1
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
4cffc: 2028 0012 movel %a0@(18),%d0 4d000: 2228 0016 movel %a0@(22),%d1 4d004: 2c02 movel %d2,%d6 4d006: 2e03 movel %d3,%d7
return 0;
}
while (p != NULL)
{
*buf_prev++ = p;
4d008: 22c8 movel %a0,%a1@+
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
4d00a: 9e81 subl %d1,%d7 4d00c: 9d80 subxl %d0,%d6
4d00e: 63ca blss 4cfda <rtems_bdbuf_get_buffer_from_lru_list+0x14c><== ALWAYS TAKEN
{
p->avl.cache = 1;
q = p->avl.right;
4d010: 2028 000c movel %a0@(12),%d0
{
*buf_prev++ = p;
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
{
p->avl.cache = 1;
4d014: 7e01 moveq #1,%d7 4d016: 1147 0010 moveb %d7,%a0@(16)
q = p->avl.right;
if (q == NULL)
4d01a: 4a80 tstl %d0
4d01c: 66d8 bnes 4cff6 <rtems_bdbuf_get_buffer_from_lru_list+0x168>
{
q = node;
p->avl.right = q = node;
4d01e: 214a 000c movel %a2,%a0@(12)
p = q;
}
q->avl.left = q->avl.right = NULL;
q->avl.bal = 0;
4d022: 2244 moveal %d4,%a1 4d024: 4207 clrb %d7
}
p = q;
}
q->avl.left = q->avl.right = NULL;
4d026: 42aa 000c clrl %a2@(12)
p->avl.cache = 1;
q = p->avl.right;
if (q == NULL)
{
q = node;
p->avl.right = q = node;
4d02a: 7001 moveq #1,%d0
p = q;
}
q->avl.left = q->avl.right = NULL;
q->avl.bal = 0;
4d02c: 1547 0011 moveb %d7,%a2@(17)
}
p = q;
}
q->avl.left = q->avl.right = NULL;
4d030: 42aa 0008 clrl %a2@(8) 4d034: 49c0 extbl %d0
modified = true;
buf_prev--;
while (modified)
{
if (p->avl.cache == -1)
4d036: 72ff moveq #-1,%d1 4d038: b280 cmpl %d0,%d1 4d03a: 6700 009c beqw 4d0d8 <rtems_bdbuf_get_buffer_from_lru_list+0x24a>
break;
}
}
else
{
switch (p->avl.bal)
4d03e: 1028 0011 moveb %a0@(17),%d0
4d042: 6670 bnes 4d0b4 <rtems_bdbuf_get_buffer_from_lru_list+0x226>
p->avl.bal = 0;
modified = false;
break;
case 0:
p->avl.bal = 1;
4d044: 2648 moveal %a0,%a3 4d046: 7e01 moveq #1,%d7 4d048: 7201 moveq #1,%d1 4d04a: 1147 0011 moveb %d7,%a0@(17)
default:
break;
}
}
q = p;
if (buf_prev > buf_stack)
4d04e: ba89 cmpl %a1,%d5
4d050: 6478 bccs 4d0ca <rtems_bdbuf_get_buffer_from_lru_list+0x23c>
{
p = *--buf_prev;
4d052: 2069 fffc moveal %a1@(-4),%a0
if (p->avl.cache == -1)
4d056: 74ff moveq #-1,%d2 4d058: 1028 0010 moveb %a0@(16),%d0 4d05c: 49c0 extbl %d0 4d05e: b480 cmpl %d0,%d2 4d060: 6700 008c beqw 4d0ee <rtems_bdbuf_get_buffer_from_lru_list+0x260>
{
p->avl.left = q;
}
else
{
p->avl.right = q;
4d064: 214b 000c movel %a3,%a0@(12)
}
}
else
{
*root = p;
4d068: 5989 subql #4,%a1
q->avl.left = q->avl.right = NULL;
q->avl.bal = 0;
modified = true;
buf_prev--;
while (modified)
4d06a: 4a01 tstb %d1
4d06c: 66c8 bnes 4d036 <rtems_bdbuf_get_buffer_from_lru_list+0x1a8>
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4d06e: 7c01 moveq #1,%d6 4d070: 2546 0022 movel %d6,%a2@(34)
node = rtems_chain_next (node);
}
return NULL;
}
4d074: 200a movel %a2,%d0 4d076: 4cee 3cfc ff54 moveml %fp@(-172),%d2-%d7/%a2-%a5 4d07c: 4e5e unlk %fp 4d07e: 4e75 rts
while (p != NULL)
{
*buf_prev++ = p;
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
4d080: 2028 001a movel %a0@(26),%d0 4d084: b0ae 0010 cmpl %fp@(16),%d0
4d088: 6586 bcss 4d010 <rtems_bdbuf_get_buffer_from_lru_list+0x182>
q = node;
p->avl.right = q = node;
break;
}
}
else if ((p->dev != dev) || (p->block != block))
4d08a: 6600 ff5a bnew 4cfe6 <rtems_bdbuf_get_buffer_from_lru_list+0x158>
bd->avl.left = NULL;
bd->avl.right = NULL;
bd->waiters = 0;
if (rtems_bdbuf_avl_insert (&bdbuf_cache.tree, bd) != 0)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_RECYCLE);
4d08e: 2f3c 4200 001b movel #1107296283,%sp@- <== NOT EXECUTED 4d094: 4eb9 0004 83dc jsr 483dc <rtems_fatal_error_occurred> <== NOT EXECUTED
p->avl.cache = -1;
q = p->avl.left;
if (q == NULL)
{
q = node;
p->avl.left = q;
4d09a: 214a 0008 movel %a2,%a0@(8)
p = q;
}
q->avl.left = q->avl.right = NULL;
q->avl.bal = 0;
4d09e: 2244 moveal %d4,%a1
p->avl.cache = -1;
q = p->avl.left;
if (q == NULL)
{
q = node;
p->avl.left = q;
4d0a0: 50c0 st %d0
}
p = q;
}
q->avl.left = q->avl.right = NULL;
4d0a2: 42aa 000c clrl %a2@(12) 4d0a6: 49c0 extbl %d0
q->avl.bal = 0;
4d0a8: 4207 clrb %d7
}
p = q;
}
q->avl.left = q->avl.right = NULL;
4d0aa: 42aa 0008 clrl %a2@(8)
q->avl.bal = 0;
4d0ae: 1547 0011 moveb %d7,%a2@(17) 4d0b2: 6082 bras 4d036 <rtems_bdbuf_get_buffer_from_lru_list+0x1a8>
break;
}
}
else
{
switch (p->avl.bal)
4d0b4: 49c0 extbl %d0 4d0b6: 7201 moveq #1,%d1 4d0b8: b280 cmpl %d0,%d1
4d0ba: 674e beqs 4d10a <rtems_bdbuf_get_buffer_from_lru_list+0x27c>
4d0bc: 74ff moveq #-1,%d2
{
case -1:
p->avl.bal = 0;
4d0be: 2648 moveal %a0,%a3
break;
}
}
else
{
switch (p->avl.bal)
4d0c0: b480 cmpl %d0,%d2
4d0c2: 673a beqs 4d0fe <rtems_bdbuf_get_buffer_from_lru_list+0x270><== ALWAYS TAKEN
4d0c4: 7201 moveq #1,%d1 <== NOT EXECUTED
default:
break;
}
}
q = p;
if (buf_prev > buf_stack)
4d0c6: ba89 cmpl %a1,%d5 <== NOT EXECUTED 4d0c8: 6588 bcss 4d052 <rtems_bdbuf_get_buffer_from_lru_list+0x1c4><== NOT EXECUTED
p->avl.right = q;
}
}
else
{
*root = p;
4d0ca: 23cb 0006 4650 movel %a3,64650 <bdbuf_cache+0x3c>
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4d0d0: 7c01 moveq #1,%d6 4d0d2: 2546 0022 movel %d6,%a2@(34) 4d0d6: 609c bras 4d074 <rtems_bdbuf_get_buffer_from_lru_list+0x1e6>
while (modified)
{
if (p->avl.cache == -1)
{
switch (p->avl.bal)
4d0d8: 1028 0011 moveb %a0@(17),%d0 4d0dc: 6600 0084 bnew 4d162 <rtems_bdbuf_get_buffer_from_lru_list+0x2d4>
p->avl.bal = 0;
modified = false;
break;
case 0:
p->avl.bal = -1;
4d0e0: 2648 moveal %a0,%a3 4d0e2: 50c7 st %d7 4d0e4: 7201 moveq #1,%d1 4d0e6: 1147 0011 moveb %d7,%a0@(17) 4d0ea: 6000 ff62 braw 4d04e <rtems_bdbuf_get_buffer_from_lru_list+0x1c0>
{
p = *--buf_prev;
if (p->avl.cache == -1)
{
p->avl.left = q;
4d0ee: 214b 0008 movel %a3,%a0@(8)
p->avl.right = q;
}
}
else
{
*root = p;
4d0f2: 5989 subql #4,%a1
q->avl.left = q->avl.right = NULL;
q->avl.bal = 0;
modified = true;
buf_prev--;
while (modified)
4d0f4: 4a01 tstb %d1 4d0f6: 6600 ff3e bnew 4d036 <rtems_bdbuf_get_buffer_from_lru_list+0x1a8> 4d0fa: 6000 ff72 braw 4d06e <rtems_bdbuf_get_buffer_from_lru_list+0x1e0>
else
{
switch (p->avl.bal)
{
case -1:
p->avl.bal = 0;
4d0fe: 4206 clrb %d6
modified = false;
4d100: 4201 clrb %d1
else
{
switch (p->avl.bal)
{
case -1:
p->avl.bal = 0;
4d102: 1146 0011 moveb %d6,%a0@(17) 4d106: 6000 ff46 braw 4d04e <rtems_bdbuf_get_buffer_from_lru_list+0x1c0>
case 0:
p->avl.bal = 1;
break;
case 1:
p1 = p->avl.right;
4d10a: 2868 000c moveal %a0@(12),%a4
if (p1->avl.bal == 1) /* simple RR-turn */
4d10e: 7201 moveq #1,%d1 4d110: 102c 0011 moveb %a4@(17),%d0 4d114: 49c0 extbl %d0 4d116: b280 cmpl %d0,%d1 4d118: 6700 00c0 beqw 4d1da <rtems_bdbuf_get_buffer_from_lru_list+0x34c>
p->avl.bal = 0;
p = p1;
}
else /* double RL-turn */
{
p2 = p1->avl.left;
4d11c: 266c 0008 moveal %a4@(8),%a3
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
p->avl.right = p2->avl.left;
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
4d120: 7c01 moveq #1,%d6
if (p2->avl.bal == -1) p1->avl.bal = +1; else p1->avl.bal = 0;
4d122: 7eff moveq #-1,%d7
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
p->avl.right = p2->avl.left;
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
4d124: 102b 0011 moveb %a3@(17),%d0
p = p1;
}
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
4d128: 296b 000c 0008 movel %a3@(12),%a4@(8)
p2->avl.right = p1;
p->avl.right = p2->avl.left;
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
4d12e: 49c0 extbl %d0 4d130: bc80 cmpl %d0,%d6 4d132: 57c0 seq %d0
}
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
4d134: 274c 000c movel %a4,%a3@(12)
p->avl.right = p2->avl.left;
4d138: 216b 0008 000c movel %a3@(8),%a0@(12)
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
4d13e: 1140 0011 moveb %d0,%a0@(17)
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
p->avl.right = p2->avl.left;
p2->avl.left = p;
4d142: 2748 0008 movel %a0,%a3@(8)
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
if (p2->avl.bal == -1) p1->avl.bal = +1; else p1->avl.bal = 0;
4d146: 102b 0011 moveb %a3@(17),%d0
p = p2;
}
p->avl.bal = 0;
modified = false;
4d14a: 4201 clrb %d1
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
p->avl.right = p2->avl.left;
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
if (p2->avl.bal == -1) p1->avl.bal = +1; else p1->avl.bal = 0;
4d14c: 49c0 extbl %d0 4d14e: be80 cmpl %d0,%d7 4d150: 56c0 sne %d0 4d152: 5280 addql #1,%d0 4d154: 1940 0011 moveb %d0,%a4@(17)
p = p2;
}
p->avl.bal = 0;
4d158: 4200 clrb %d0 4d15a: 1740 0011 moveb %d0,%a3@(17) 4d15e: 6000 feee braw 4d04e <rtems_bdbuf_get_buffer_from_lru_list+0x1c0>
while (modified)
{
if (p->avl.cache == -1)
{
switch (p->avl.bal)
4d162: 49c0 extbl %d0 4d164: 7401 moveq #1,%d2 4d166: b480 cmpl %d0,%d2
4d168: 670c beqs 4d176 <rtems_bdbuf_get_buffer_from_lru_list+0x2e8>
4d16a: b280 cmpl %d0,%d1
4d16c: 6716 beqs 4d184 <rtems_bdbuf_get_buffer_from_lru_list+0x2f6><== ALWAYS TAKEN
4d16e: 2648 moveal %a0,%a3 <== NOT EXECUTED 4d170: 7201 moveq #1,%d1 <== NOT EXECUTED 4d172: 6000 feda braw 4d04e <rtems_bdbuf_get_buffer_from_lru_list+0x1c0><== NOT EXECUTED
{
case 1:
p->avl.bal = 0;
4d176: 2648 moveal %a0,%a3 4d178: 4206 clrb %d6
modified = false;
4d17a: 4201 clrb %d1
if (p->avl.cache == -1)
{
switch (p->avl.bal)
{
case 1:
p->avl.bal = 0;
4d17c: 1146 0011 moveb %d6,%a0@(17) 4d180: 6000 fecc braw 4d04e <rtems_bdbuf_get_buffer_from_lru_list+0x1c0>
case 0:
p->avl.bal = -1;
break;
case -1:
p1 = p->avl.left;
4d184: 2868 0008 moveal %a0@(8),%a4
if (p1->avl.bal == -1) /* simple LL-turn */
4d188: 72ff moveq #-1,%d1 4d18a: 102c 0011 moveb %a4@(17),%d0 4d18e: 49c0 extbl %d0 4d190: b280 cmpl %d0,%d1
4d192: 6764 beqs 4d1f8 <rtems_bdbuf_get_buffer_from_lru_list+0x36a><== NEVER TAKEN
p->avl.bal = 0;
p = p1;
}
else /* double LR-turn */
{
p2 = p1->avl.right;
4d194: 266c 000c moveal %a4@(12),%a3
p1->avl.right = p2->avl.left;
p2->avl.left = p1;
p->avl.left = p2->avl.right;
p2->avl.right = p;
if (p2->avl.bal == -1) p->avl.bal = +1; else p->avl.bal = 0;
4d198: 7cff moveq #-1,%d6
if (p2->avl.bal == +1) p1->avl.bal = -1; else p1->avl.bal = 0;
4d19a: 7e01 moveq #1,%d7
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
p2->avl.left = p1;
p->avl.left = p2->avl.right;
p2->avl.right = p;
if (p2->avl.bal == -1) p->avl.bal = +1; else p->avl.bal = 0;
4d19c: 102b 0011 moveb %a3@(17),%d0
p = p1;
}
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
4d1a0: 296b 0008 000c movel %a3@(8),%a4@(12)
p2->avl.left = p1;
p->avl.left = p2->avl.right;
p2->avl.right = p;
if (p2->avl.bal == -1) p->avl.bal = +1; else p->avl.bal = 0;
4d1a6: 49c0 extbl %d0 4d1a8: bc80 cmpl %d0,%d6 4d1aa: 56c0 sne %d0
}
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
p2->avl.left = p1;
4d1ac: 274c 0008 movel %a4,%a3@(8)
p->avl.left = p2->avl.right;
4d1b0: 216b 000c 0008 movel %a3@(12),%a0@(8)
p2->avl.right = p;
if (p2->avl.bal == -1) p->avl.bal = +1; else p->avl.bal = 0;
4d1b6: 5280 addql #1,%d0 4d1b8: 1140 0011 moveb %d0,%a0@(17)
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
p2->avl.left = p1;
p->avl.left = p2->avl.right;
p2->avl.right = p;
4d1bc: 2748 000c movel %a0,%a3@(12)
if (p2->avl.bal == -1) p->avl.bal = +1; else p->avl.bal = 0;
if (p2->avl.bal == +1) p1->avl.bal = -1; else p1->avl.bal = 0;
4d1c0: 102b 0011 moveb %a3@(17),%d0
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
if (p2->avl.bal == -1) p1->avl.bal = +1; else p1->avl.bal = 0;
p = p2;
}
p->avl.bal = 0;
modified = false;
4d1c4: 4201 clrb %d1
p1->avl.right = p2->avl.left;
p2->avl.left = p1;
p->avl.left = p2->avl.right;
p2->avl.right = p;
if (p2->avl.bal == -1) p->avl.bal = +1; else p->avl.bal = 0;
if (p2->avl.bal == +1) p1->avl.bal = -1; else p1->avl.bal = 0;
4d1c6: 49c0 extbl %d0 4d1c8: be80 cmpl %d0,%d7 4d1ca: 57c0 seq %d0 4d1cc: 1940 0011 moveb %d0,%a4@(17)
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
if (p2->avl.bal == -1) p1->avl.bal = +1; else p1->avl.bal = 0;
p = p2;
}
p->avl.bal = 0;
4d1d0: 4200 clrb %d0 4d1d2: 1740 0011 moveb %d0,%a3@(17) 4d1d6: 6000 fe76 braw 4d04e <rtems_bdbuf_get_buffer_from_lru_list+0x1c0>
p1 = p->avl.right;
if (p1->avl.bal == 1) /* simple RR-turn */
{
p->avl.right = p1->avl.left;
p1->avl.left = p;
p->avl.bal = 0;
4d1da: 264c moveal %a4,%a3
case 1:
p1 = p->avl.right;
if (p1->avl.bal == 1) /* simple RR-turn */
{
p->avl.right = p1->avl.left;
4d1dc: 216c 0008 000c movel %a4@(8),%a0@(12)
p1->avl.left = p;
p->avl.bal = 0;
4d1e2: 4202 clrb %d2
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
if (p2->avl.bal == -1) p1->avl.bal = +1; else p1->avl.bal = 0;
p = p2;
}
p->avl.bal = 0;
4d1e4: 4200 clrb %d0
case 1:
p1 = p->avl.right;
if (p1->avl.bal == 1) /* simple RR-turn */
{
p->avl.right = p1->avl.left;
p1->avl.left = p;
4d1e6: 2948 0008 movel %a0,%a4@(8)
p->avl.bal = 0;
4d1ea: 1142 0011 moveb %d2,%a0@(17)
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
if (p2->avl.bal == -1) p1->avl.bal = +1; else p1->avl.bal = 0;
p = p2;
}
p->avl.bal = 0;
4d1ee: 1740 0011 moveb %d0,%a3@(17)
modified = false;
4d1f2: 4201 clrb %d1 4d1f4: 6000 fe58 braw 4d04e <rtems_bdbuf_get_buffer_from_lru_list+0x1c0>
p1 = p->avl.left;
if (p1->avl.bal == -1) /* simple LL-turn */
{
p->avl.left = p1->avl.right;
p1->avl.right = p;
p->avl.bal = 0;
4d1f8: 264c moveal %a4,%a3 <== NOT EXECUTED
case -1:
p1 = p->avl.left;
if (p1->avl.bal == -1) /* simple LL-turn */
{
p->avl.left = p1->avl.right;
4d1fa: 216c 000c 0008 movel %a4@(12),%a0@(8) <== NOT EXECUTED
p1->avl.right = p;
p->avl.bal = 0;
4d200: 4202 clrb %d2 <== NOT EXECUTED
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
if (p2->avl.bal == -1) p1->avl.bal = +1; else p1->avl.bal = 0;
p = p2;
}
p->avl.bal = 0;
4d202: 4200 clrb %d0 <== NOT EXECUTED
case -1:
p1 = p->avl.left;
if (p1->avl.bal == -1) /* simple LL-turn */
{
p->avl.left = p1->avl.right;
p1->avl.right = p;
4d204: 2948 000c movel %a0,%a4@(12) <== NOT EXECUTED
p->avl.bal = 0;
4d208: 1142 0011 moveb %d2,%a0@(17) <== NOT EXECUTED
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
if (p2->avl.bal == -1) p1->avl.bal = +1; else p1->avl.bal = 0;
p = p2;
}
p->avl.bal = 0;
4d20c: 1740 0011 moveb %d0,%a3@(17) <== NOT EXECUTED
modified = false;
4d210: 4201 clrb %d1 <== NOT EXECUTED 4d212: 6000 fe3a braw 4d04e <rtems_bdbuf_get_buffer_from_lru_list+0x1c0><== NOT EXECUTED
bool modified = false;
if (p == NULL)
{
*root = node;
4d216: 23ca 0006 4650 movel %a2,64650 <bdbuf_cache+0x3c>
node->avl.left = NULL;
node->avl.right = NULL;
node->avl.bal = 0;
4d21c: 4202 clrb %d2
bool modified = false;
if (p == NULL)
{
*root = node;
node->avl.left = NULL;
4d21e: 42aa 0008 clrl %a2@(8)
node->avl.right = NULL;
node->avl.bal = 0;
4d222: 1542 0011 moveb %d2,%a2@(17)
if (p == NULL)
{
*root = node;
node->avl.left = NULL;
node->avl.right = NULL;
4d226: 42aa 000c clrl %a2@(12) 4d22a: 6000 fe42 braw 4d06e <rtems_bdbuf_get_buffer_from_lru_list+0x1e0>
0004d470 <rtems_bdbuf_init>:
*
* @return rtems_status_code The initialisation status.
*/
rtems_status_code
rtems_bdbuf_init (void)
{
4d470: 4e56 ffe0 linkw %fp,#-32 4d474: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@
rtems_mode prev_mode;
if (rtems_bdbuf_tracer)
printf ("bdbuf:init\n");
if (rtems_interrupt_is_in_progress())
4d478: 4ab9 0006 533e tstl 6533e <_Per_CPU_Information+0x8>
4d47e: 670c beqs 4d48c <rtems_bdbuf_init+0x1c> <== ALWAYS TAKEN
return RTEMS_CALLED_FROM_ISR;
4d480: 7012 moveq #18,%d0 <== NOT EXECUTED
}
bdbuf_cache.initialised = false;
return RTEMS_UNSATISFIED;
}
4d482: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 4d488: 4e5e unlk %fp <== NOT EXECUTED 4d48a: 4e75 rts <== NOT EXECUTED
return RTEMS_CALLED_FROM_ISR;
/*
* Check the configuration table values.
*/
if ((bdbuf_config.buffer_max % bdbuf_config.buffer_min) != 0)
4d48c: 2439 0006 193c movel 6193c <rtems_bdbuf_configuration+0x20>,%d2 4d492: 2639 0006 1940 movel 61940 <rtems_bdbuf_configuration+0x24>,%d3 4d498: 4c42 3000 remul %d2,%d0,%d3 4d49c: 4c42 3003 remul %d2,%d3,%d3 4d4a0: 4a80 tstl %d0
4d4a2: 670c beqs 4d4b0 <rtems_bdbuf_init+0x40> <== ALWAYS TAKEN
return RTEMS_INVALID_NUMBER;
4d4a4: 700a moveq #10,%d0 <== NOT EXECUTED
}
bdbuf_cache.initialised = false;
return RTEMS_UNSATISFIED;
}
4d4a6: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 4d4ac: 4e5e unlk %fp <== NOT EXECUTED 4d4ae: 4e75 rts <== NOT EXECUTED
/* * We use a special variable to manage the initialisation incase we have * completing threads doing this. You may get errors if the another thread * makes a call and we have not finished initialisation. */ prev_mode = rtems_bdbuf_disable_preemption ();
4d4b0: 4eba e960 jsr %pc@(4be12 <rtems_bdbuf_disable_preemption>) 4d4b4: 2800 movel %d0,%d4
if (bdbuf_cache.initialised)
4d4b6: 4a39 0006 4698 tstb 64698 <bdbuf_cache+0x84>
4d4bc: 6714 beqs 4d4d2 <rtems_bdbuf_init+0x62> <== ALWAYS TAKEN
{
rtems_bdbuf_restore_preemption (prev_mode);
4d4be: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4d4c0: 4eba e984 jsr %pc@(4be46 <rtems_bdbuf_restore_preemption>)<== NOT EXECUTED
return RTEMS_RESOURCE_IN_USE;
4d4c4: 588f addql #4,%sp <== NOT EXECUTED 4d4c6: 700c moveq #12,%d0 <== NOT EXECUTED
}
bdbuf_cache.initialised = false;
return RTEMS_UNSATISFIED;
}
4d4c8: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 4d4ce: 4e5e unlk %fp <== NOT EXECUTED 4d4d0: 4e75 rts <== NOT EXECUTED
{
rtems_bdbuf_restore_preemption (prev_mode);
return RTEMS_RESOURCE_IN_USE;
}
memset(&bdbuf_cache, 0, sizeof(bdbuf_cache));
4d4d2: 4878 0086 pea 86 <DBL_MANT_DIG+0x51>
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
tail->previous = head;
4d4d6: 2a3c 0006 461a movel #411162,%d5
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
4d4dc: 2c3c 0006 4658 movel #411224,%d6 4d4e2: 42a7 clrl %sp@- 4d4e4: 4879 0006 4614 pea 64614 <bdbuf_cache>
rtems_chain_initialize_empty (&bdbuf_cache.sync);
/*
* Create the locks for the cache.
*/
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 'l'),
4d4ea: 45f9 0004 7a0c lea 47a0c <rtems_semaphore_create>,%a2
{
rtems_bdbuf_restore_preemption (prev_mode);
return RTEMS_RESOURCE_IN_USE;
}
memset(&bdbuf_cache, 0, sizeof(bdbuf_cache));
4d4f0: 4eb9 0005 3a14 jsr 53a14 <memset>
bdbuf_cache.initialised = true;
4d4f6: 7001 moveq #1,%d0
rtems_bdbuf_restore_preemption (prev_mode);
4d4f8: 2f04 movel %d4,%sp@-
rtems_bdbuf_restore_preemption (prev_mode);
return RTEMS_RESOURCE_IN_USE;
}
memset(&bdbuf_cache, 0, sizeof(bdbuf_cache));
bdbuf_cache.initialised = true;
4d4fa: 13c0 0006 4698 moveb %d0,64698 <bdbuf_cache+0x84>
rtems_bdbuf_restore_preemption (prev_mode);
4d500: 4eba e944 jsr %pc@(4be46 <rtems_bdbuf_restore_preemption>)
rtems_chain_initialize_empty (&bdbuf_cache.sync);
/*
* Create the locks for the cache.
*/
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 'l'),
4d504: 4879 0006 463a pea 6463a <bdbuf_cache+0x26> 4d50a: 223c 0006 461e movel #411166,%d1
head->previous = NULL; tail->previous = head;
4d510: 203c 0006 4654 movel #411220,%d0 4d516: 42a7 clrl %sp@- 4d518: 4878 0054 pea 54 <DBL_MANT_DIG+0x1f> 4d51c: 4878 0001 pea 1 <ADD> 4d520: 23c5 0006 4622 movel %d5,64622 <bdbuf_cache+0xe> 4d526: 2a3c 0006 4660 movel #411232,%d5
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
4d52c: 23c6 0006 4654 movel %d6,64654 <bdbuf_cache+0x40> 4d532: 2c3c 0006 4670 movel #411248,%d6
head->previous = NULL; tail->previous = head;
4d538: 23c5 0006 4668 movel %d5,64668 <bdbuf_cache+0x54>
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
4d53e: 23c6 0006 466c movel %d6,6466c <bdbuf_cache+0x58>
*/
cache_aligment = 32; /* FIXME rtems_cache_get_data_line_size() */
if (cache_aligment <= 0)
cache_aligment = CPU_ALIGNMENT;
bdbuf_cache.sync_device = BDBUF_INVALID_DEV;
4d544: 7aff moveq #-1,%d5 4d546: 7cff moveq #-1,%d6 4d548: 23c1 0006 461a movel %d1,6461a <bdbuf_cache+0x6> 4d54e: 223c 0006 4664 movel #411236,%d1
head->previous = NULL; tail->previous = head;
4d554: 23c0 0006 465c movel %d0,6465c <bdbuf_cache+0x48> 4d55a: 203c 0006 466c movel #411244,%d0
rtems_chain_initialize_empty (&bdbuf_cache.sync);
/*
* Create the locks for the cache.
*/
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 'l'),
4d560: 2f3c 4244 436c movel #1111769964,%sp@-
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
4d566: 23c1 0006 4660 movel %d1,64660 <bdbuf_cache+0x4c>
*/
cache_aligment = 32; /* FIXME rtems_cache_get_data_line_size() */
if (cache_aligment <= 0)
cache_aligment = CPU_ALIGNMENT;
bdbuf_cache.sync_device = BDBUF_INVALID_DEV;
4d56c: 23c5 0006 4648 movel %d5,64648 <bdbuf_cache+0x34> 4d572: 23c6 0006 464c movel %d6,6464c <bdbuf_cache+0x38>
head->previous = NULL;
4d578: 42b9 0006 461e clrl 6461e <bdbuf_cache+0xa> 4d57e: 42b9 0006 4658 clrl 64658 <bdbuf_cache+0x44> 4d584: 42b9 0006 4664 clrl 64664 <bdbuf_cache+0x50> 4d58a: 42b9 0006 4670 clrl 64670 <bdbuf_cache+0x5c>
tail->previous = head;
4d590: 23c0 0006 4674 movel %d0,64674 <bdbuf_cache+0x60>
rtems_chain_initialize_empty (&bdbuf_cache.sync);
/*
* Create the locks for the cache.
*/
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 'l'),
4d596: 4e92 jsr %a2@
1, RTEMS_BDBUF_CACHE_LOCK_ATTRIBS, 0,
&bdbuf_cache.lock);
if (sc != RTEMS_SUCCESSFUL)
4d598: 4fef 0024 lea %sp@(36),%sp 4d59c: 4a80 tstl %d0 4d59e: 6700 00e6 beqw 4d686 <rtems_bdbuf_init+0x216>
return RTEMS_SUCCESSFUL;
error:
if (bdbuf_cache.swapout != 0)
4d5a2: 2039 0006 4614 movel 64614 <bdbuf_cache>,%d0 <== NOT EXECUTED 4d5a8: 667e bnes 4d628 <rtems_bdbuf_init+0x1b8> <== NOT EXECUTED
rtems_task_delete (bdbuf_cache.swapout);
free (bdbuf_cache.buffers);
4d5aa: 2f39 0006 462a movel 6462a <bdbuf_cache+0x16>,%sp@- <== NOT EXECUTED 4d5b0: 47f9 0004 41a8 lea 441a8 <free>,%a3 <== NOT EXECUTED
free (bdbuf_cache.groups);
free (bdbuf_cache.bds);
rtems_semaphore_delete (bdbuf_cache.buffer_waiters.sema);
4d5b6: 45f9 0004 7bd4 lea 47bd4 <rtems_semaphore_delete>,%a2 <== NOT EXECUTED
error:
if (bdbuf_cache.swapout != 0)
rtems_task_delete (bdbuf_cache.swapout);
free (bdbuf_cache.buffers);
4d5bc: 4e93 jsr %a3@ <== NOT EXECUTED
free (bdbuf_cache.groups);
4d5be: 2f39 0006 4694 movel 64694 <bdbuf_cache+0x80>,%sp@- <== NOT EXECUTED 4d5c4: 4e93 jsr %a3@ <== NOT EXECUTED
free (bdbuf_cache.bds);
4d5c6: 2f39 0006 4626 movel 64626 <bdbuf_cache+0x12>,%sp@- <== NOT EXECUTED 4d5cc: 4e93 jsr %a3@ <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.buffer_waiters.sema);
4d5ce: 2f39 0006 468c movel 6468c <bdbuf_cache+0x78>,%sp@- <== NOT EXECUTED 4d5d4: 4e92 jsr %a2@ <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.access_waiters.sema);
4d5d6: 2f39 0006 467c movel 6467c <bdbuf_cache+0x68>,%sp@- <== NOT EXECUTED 4d5dc: 4e92 jsr %a2@ <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.transfer_waiters.sema);
4d5de: 2f39 0006 4684 movel 64684 <bdbuf_cache+0x70>,%sp@- <== NOT EXECUTED 4d5e4: 4e92 jsr %a2@ <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.sync_lock);
4d5e6: 2f39 0006 463e movel 6463e <bdbuf_cache+0x2a>,%sp@- <== NOT EXECUTED 4d5ec: 4e92 jsr %a2@ <== NOT EXECUTED
if (bdbuf_cache.lock != 0)
4d5ee: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED 4d5f2: 4ab9 0006 463a tstl 6463a <bdbuf_cache+0x26> <== NOT EXECUTED 4d5f8: 6614 bnes 4d60e <rtems_bdbuf_init+0x19e> <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.lock);
}
bdbuf_cache.initialised = false;
return RTEMS_UNSATISFIED;
4d5fa: 700d moveq #13,%d0 <== NOT EXECUTED
{
rtems_bdbuf_unlock_cache ();
rtems_semaphore_delete (bdbuf_cache.lock);
}
bdbuf_cache.initialised = false;
4d5fc: 4205 clrb %d5 <== NOT EXECUTED 4d5fe: 13c5 0006 4698 moveb %d5,64698 <bdbuf_cache+0x84> <== NOT EXECUTED
return RTEMS_UNSATISFIED;
}
4d604: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 4d60a: 4e5e unlk %fp <== NOT EXECUTED 4d60c: 4e75 rts <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.transfer_waiters.sema);
rtems_semaphore_delete (bdbuf_cache.sync_lock);
if (bdbuf_cache.lock != 0)
{
rtems_bdbuf_unlock_cache ();
4d60e: 4eba e708 jsr %pc@(4bd18 <rtems_bdbuf_unlock_cache>) <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.lock);
4d612: 2f39 0006 463a movel 6463a <bdbuf_cache+0x26>,%sp@- <== NOT EXECUTED
}
bdbuf_cache.initialised = false;
4d618: 4205 clrb %d5 <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.sync_lock);
if (bdbuf_cache.lock != 0)
{
rtems_bdbuf_unlock_cache ();
rtems_semaphore_delete (bdbuf_cache.lock);
4d61a: 4e92 jsr %a2@ <== NOT EXECUTED 4d61c: 588f addql #4,%sp <== NOT EXECUTED
}
bdbuf_cache.initialised = false;
return RTEMS_UNSATISFIED;
4d61e: 700d moveq #13,%d0 <== NOT EXECUTED
{
rtems_bdbuf_unlock_cache ();
rtems_semaphore_delete (bdbuf_cache.lock);
}
bdbuf_cache.initialised = false;
4d620: 13c5 0006 4698 moveb %d5,64698 <bdbuf_cache+0x84> <== NOT EXECUTED 4d626: 60dc bras 4d604 <rtems_bdbuf_init+0x194> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
error:
if (bdbuf_cache.swapout != 0)
rtems_task_delete (bdbuf_cache.swapout);
4d628: 2f00 movel %d0,%sp@- <== NOT EXECUTED
free (bdbuf_cache.buffers);
4d62a: 47f9 0004 41a8 lea 441a8 <free>,%a3 <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
error:
if (bdbuf_cache.swapout != 0)
rtems_task_delete (bdbuf_cache.swapout);
4d630: 4eb9 0004 7ffc jsr 47ffc <rtems_task_delete> <== NOT EXECUTED 4d636: 588f addql #4,%sp <== NOT EXECUTED
free (bdbuf_cache.buffers);
free (bdbuf_cache.groups);
free (bdbuf_cache.bds);
rtems_semaphore_delete (bdbuf_cache.buffer_waiters.sema);
4d638: 45f9 0004 7bd4 lea 47bd4 <rtems_semaphore_delete>,%a2 <== NOT EXECUTED
error:
if (bdbuf_cache.swapout != 0)
rtems_task_delete (bdbuf_cache.swapout);
free (bdbuf_cache.buffers);
4d63e: 2f39 0006 462a movel 6462a <bdbuf_cache+0x16>,%sp@- <== NOT EXECUTED 4d644: 4e93 jsr %a3@ <== NOT EXECUTED
free (bdbuf_cache.groups);
4d646: 2f39 0006 4694 movel 64694 <bdbuf_cache+0x80>,%sp@- <== NOT EXECUTED 4d64c: 4e93 jsr %a3@ <== NOT EXECUTED
free (bdbuf_cache.bds);
4d64e: 2f39 0006 4626 movel 64626 <bdbuf_cache+0x12>,%sp@- <== NOT EXECUTED 4d654: 4e93 jsr %a3@ <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.buffer_waiters.sema);
4d656: 2f39 0006 468c movel 6468c <bdbuf_cache+0x78>,%sp@- <== NOT EXECUTED 4d65c: 4e92 jsr %a2@ <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.access_waiters.sema);
4d65e: 2f39 0006 467c movel 6467c <bdbuf_cache+0x68>,%sp@- <== NOT EXECUTED 4d664: 4e92 jsr %a2@ <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.transfer_waiters.sema);
4d666: 2f39 0006 4684 movel 64684 <bdbuf_cache+0x70>,%sp@- <== NOT EXECUTED 4d66c: 4e92 jsr %a2@ <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.sync_lock);
4d66e: 2f39 0006 463e movel 6463e <bdbuf_cache+0x2a>,%sp@- <== NOT EXECUTED 4d674: 4e92 jsr %a2@ <== NOT EXECUTED
if (bdbuf_cache.lock != 0)
4d676: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED 4d67a: 4ab9 0006 463a tstl 6463a <bdbuf_cache+0x26> <== NOT EXECUTED 4d680: 6700 ff78 beqw 4d5fa <rtems_bdbuf_init+0x18a> <== NOT EXECUTED 4d684: 6088 bras 4d60e <rtems_bdbuf_init+0x19e> <== NOT EXECUTED
1, RTEMS_BDBUF_CACHE_LOCK_ATTRIBS, 0,
&bdbuf_cache.lock);
if (sc != RTEMS_SUCCESSFUL)
goto error;
rtems_bdbuf_lock_cache ();
4d686: 4eba e4d8 jsr %pc@(4bb60 <rtems_bdbuf_lock_cache>)
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 's'),
4d68a: 4879 0006 463e pea 6463e <bdbuf_cache+0x2a> 4d690: 42a7 clrl %sp@- 4d692: 4878 0054 pea 54 <DBL_MANT_DIG+0x1f> 4d696: 4878 0001 pea 1 <ADD> 4d69a: 2f3c 4244 4373 movel #1111769971,%sp@- 4d6a0: 4e92 jsr %a2@
1, RTEMS_BDBUF_CACHE_LOCK_ATTRIBS, 0,
&bdbuf_cache.sync_lock);
if (sc != RTEMS_SUCCESSFUL)
4d6a2: 4fef 0014 lea %sp@(20),%sp 4d6a6: 4a80 tstl %d0 4d6a8: 6600 fef8 bnew 4d5a2 <rtems_bdbuf_init+0x132>
goto error;
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 'a'),
4d6ac: 4879 0006 467c pea 6467c <bdbuf_cache+0x68> 4d6b2: 42a7 clrl %sp@- 4d6b4: 4878 0024 pea 24 <OPER2+0x10> 4d6b8: 42a7 clrl %sp@- 4d6ba: 2f3c 4244 4361 movel #1111769953,%sp@- 4d6c0: 4e92 jsr %a2@
0, RTEMS_BDBUF_CACHE_WAITER_ATTRIBS, 0,
&bdbuf_cache.access_waiters.sema);
if (sc != RTEMS_SUCCESSFUL)
4d6c2: 4fef 0014 lea %sp@(20),%sp 4d6c6: 4a80 tstl %d0 4d6c8: 6600 fed8 bnew 4d5a2 <rtems_bdbuf_init+0x132>
goto error;
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 't'),
4d6cc: 4879 0006 4684 pea 64684 <bdbuf_cache+0x70> 4d6d2: 42a7 clrl %sp@- 4d6d4: 4878 0024 pea 24 <OPER2+0x10> 4d6d8: 42a7 clrl %sp@- 4d6da: 2f3c 4244 4374 movel #1111769972,%sp@- 4d6e0: 4e92 jsr %a2@
0, RTEMS_BDBUF_CACHE_WAITER_ATTRIBS, 0,
&bdbuf_cache.transfer_waiters.sema);
if (sc != RTEMS_SUCCESSFUL)
4d6e2: 4fef 0014 lea %sp@(20),%sp 4d6e6: 4a80 tstl %d0 4d6e8: 6600 feb8 bnew 4d5a2 <rtems_bdbuf_init+0x132>
goto error;
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 'b'),
4d6ec: 4879 0006 468c pea 6468c <bdbuf_cache+0x78> 4d6f2: 42a7 clrl %sp@- 4d6f4: 4878 0024 pea 24 <OPER2+0x10> 4d6f8: 42a7 clrl %sp@- 4d6fa: 2f3c 4244 4362 movel #1111769954,%sp@- 4d700: 4e92 jsr %a2@
0, RTEMS_BDBUF_CACHE_WAITER_ATTRIBS, 0,
&bdbuf_cache.buffer_waiters.sema);
if (sc != RTEMS_SUCCESSFUL)
4d702: 4fef 0014 lea %sp@(20),%sp 4d706: 4a80 tstl %d0 4d708: 6600 fe98 bnew 4d5a2 <rtems_bdbuf_init+0x132>
/*
* Compute the various number of elements in the cache.
*/
bdbuf_cache.buffer_min_count =
bdbuf_config.size / bdbuf_config.buffer_min;
4d70c: 2839 0006 1938 movel 61938 <rtems_bdbuf_configuration+0x1c>,%d4
bdbuf_cache.buffer_min_count / bdbuf_cache.max_bds_per_group;
/*
* Allocate the memory for the buffer descriptors.
*/
bdbuf_cache.bds = calloc (sizeof (rtems_bdbuf_buffer),
4d712: 45f9 0004 3d94 lea 43d94 <calloc>,%a2
/*
* Compute the various number of elements in the cache.
*/
bdbuf_cache.buffer_min_count =
bdbuf_config.size / bdbuf_config.buffer_min;
4d718: 4c42 4004 remul %d2,%d4,%d4
bdbuf_cache.max_bds_per_group =
4d71c: 23c3 0006 4632 movel %d3,64632 <bdbuf_cache+0x1e>
bdbuf_config.buffer_max / bdbuf_config.buffer_min;
bdbuf_cache.group_count =
bdbuf_cache.buffer_min_count / bdbuf_cache.max_bds_per_group;
4d722: 2c04 movel %d4,%d6
/*
* Allocate the memory for the buffer descriptors.
*/
bdbuf_cache.bds = calloc (sizeof (rtems_bdbuf_buffer),
4d724: 2f04 movel %d4,%sp@- 4d726: 4878 003a pea 3a <DBL_MANT_DIG+0x5>
bdbuf_cache.buffer_min_count =
bdbuf_config.size / bdbuf_config.buffer_min;
bdbuf_cache.max_bds_per_group =
bdbuf_config.buffer_max / bdbuf_config.buffer_min;
bdbuf_cache.group_count =
bdbuf_cache.buffer_min_count / bdbuf_cache.max_bds_per_group;
4d72a: 4c43 6006 remul %d3,%d6,%d6
goto error;
/*
* Compute the various number of elements in the cache.
*/
bdbuf_cache.buffer_min_count =
4d72e: 23c4 0006 462e movel %d4,6462e <bdbuf_cache+0x1a>
bdbuf_config.size / bdbuf_config.buffer_min;
bdbuf_cache.max_bds_per_group =
bdbuf_config.buffer_max / bdbuf_config.buffer_min;
bdbuf_cache.group_count =
4d734: 23c6 0006 4690 movel %d6,64690 <bdbuf_cache+0x7c>
bdbuf_cache.buffer_min_count / bdbuf_cache.max_bds_per_group;
/*
* Allocate the memory for the buffer descriptors.
*/
bdbuf_cache.bds = calloc (sizeof (rtems_bdbuf_buffer),
4d73a: 4e92 jsr %a2@
bdbuf_cache.buffer_min_count);
if (!bdbuf_cache.bds)
4d73c: 508f addql #8,%sp
bdbuf_cache.buffer_min_count / bdbuf_cache.max_bds_per_group;
/*
* Allocate the memory for the buffer descriptors.
*/
bdbuf_cache.bds = calloc (sizeof (rtems_bdbuf_buffer),
4d73e: 23c0 0006 4626 movel %d0,64626 <bdbuf_cache+0x12>
bdbuf_cache.buffer_min_count);
if (!bdbuf_cache.bds)
4d744: 6700 fe5c beqw 4d5a2 <rtems_bdbuf_init+0x132>
goto error;
/*
* Allocate the memory for the buffer descriptors.
*/
bdbuf_cache.groups = calloc (sizeof (rtems_bdbuf_group),
4d748: 2f06 movel %d6,%sp@- 4d74a: 4878 0014 pea 14 <OPER2> 4d74e: 4e92 jsr %a2@
bdbuf_cache.group_count);
if (!bdbuf_cache.groups)
4d750: 508f addql #8,%sp
goto error;
/*
* Allocate the memory for the buffer descriptors.
*/
bdbuf_cache.groups = calloc (sizeof (rtems_bdbuf_group),
4d752: 23c0 0006 4694 movel %d0,64694 <bdbuf_cache+0x80>
bdbuf_cache.group_count);
if (!bdbuf_cache.groups)
4d758: 6700 fe48 beqw 4d5a2 <rtems_bdbuf_init+0x132>
* aligned. It is possible to free the memory allocated by rtems_memalign() * with free(). Return 0 if allocated. * * The memory allocate allows a */ if (rtems_memalign ((void **) &bdbuf_cache.buffers,
4d75c: 4c02 4800 mulsl %d2,%d4 4d760: 2f04 movel %d4,%sp@- 4d762: 4878 0020 pea 20 <OPER2+0xc> 4d766: 4879 0006 462a pea 6462a <bdbuf_cache+0x16> 4d76c: 4eb9 0004 fda0 jsr 4fda0 <rtems_memalign> 4d772: 4fef 000c lea %sp@(12),%sp 4d776: 4a80 tstl %d0 4d778: 6600 fe28 bnew 4d5a2 <rtems_bdbuf_init+0x132>
/*
* The cache is empty after opening so we need to add all the buffers to it
* and initialise the groups.
*/
for (b = 0, group = bdbuf_cache.groups,
4d77c: 2679 0006 4694 moveal 64694 <bdbuf_cache+0x80>,%a3 4d782: 4283 clrl %d3
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
4d784: 49f9 0004 88d4 lea 488d4 <_Chain_Append>,%a4
bd = bdbuf_cache.bds, buffer = bdbuf_cache.buffers;
4d78a: 2479 0006 4626 moveal 64626 <bdbuf_cache+0x12>,%a2 4d790: 2839 0006 462a movel 6462a <bdbuf_cache+0x16>,%d4
/*
* The cache is empty after opening so we need to add all the buffers to it
* and initialise the groups.
*/
for (b = 0, group = bdbuf_cache.groups,
4d796: b6b9 0006 462e cmpl 6462e <bdbuf_cache+0x1a>,%d3
4d79c: 6442 bccs 4d7e0 <rtems_bdbuf_init+0x370>
b < bdbuf_cache.buffer_min_count;
b++, bd++, buffer += bdbuf_config.buffer_min)
{
bd->dev = BDBUF_INVALID_DEV;
bd->group = group;
bd->buffer = buffer;
4d79e: 2544 001e movel %d4,%a2@(30)
rtems_chain_append (&bdbuf_cache.lru, &bd->link);
if ((b % bdbuf_cache.max_bds_per_group) ==
4d7a2: 2a03 movel %d3,%d5
* and initialise the groups.
*/
for (b = 0, group = bdbuf_cache.groups,
bd = bdbuf_cache.bds, buffer = bdbuf_cache.buffers;
b < bdbuf_cache.buffer_min_count;
b++, bd++, buffer += bdbuf_config.buffer_min)
4d7a4: d882 addl %d2,%d4 4d7a6: 5283 addql #1,%d3
{
bd->dev = BDBUF_INVALID_DEV;
4d7a8: 70ff moveq #-1,%d0 4d7aa: 72ff moveq #-1,%d1
bd->group = group;
4d7ac: 254b 002a movel %a3,%a2@(42)
for (b = 0, group = bdbuf_cache.groups,
bd = bdbuf_cache.bds, buffer = bdbuf_cache.buffers;
b < bdbuf_cache.buffer_min_count;
b++, bd++, buffer += bdbuf_config.buffer_min)
{
bd->dev = BDBUF_INVALID_DEV;
4d7b0: 2540 0012 movel %d0,%a2@(18) 4d7b4: 2541 0016 movel %d1,%a2@(22) 4d7b8: 2f0a movel %a2,%sp@- 4d7ba: 4879 0006 4654 pea 64654 <bdbuf_cache+0x40>
* and initialise the groups.
*/
for (b = 0, group = bdbuf_cache.groups,
bd = bdbuf_cache.bds, buffer = bdbuf_cache.buffers;
b < bdbuf_cache.buffer_min_count;
b++, bd++, buffer += bdbuf_config.buffer_min)
4d7c0: 45ea 003a lea %a2@(58),%a2 4d7c4: 4e94 jsr %a4@
bd->group = group;
bd->buffer = buffer;
rtems_chain_append (&bdbuf_cache.lru, &bd->link);
if ((b % bdbuf_cache.max_bds_per_group) ==
4d7c6: 2039 0006 4632 movel 64632 <bdbuf_cache+0x1e>,%d0
(bdbuf_cache.max_bds_per_group - 1))
4d7cc: 2200 movel %d0,%d1
bd->group = group;
bd->buffer = buffer;
rtems_chain_append (&bdbuf_cache.lru, &bd->link);
if ((b % bdbuf_cache.max_bds_per_group) ==
4d7ce: 508f addql #8,%sp
(bdbuf_cache.max_bds_per_group - 1))
4d7d0: 5381 subql #1,%d1
bd->group = group;
bd->buffer = buffer;
rtems_chain_append (&bdbuf_cache.lru, &bd->link);
if ((b % bdbuf_cache.max_bds_per_group) ==
4d7d2: 4c40 5006 remul %d0,%d6,%d5 4d7d6: b286 cmpl %d6,%d1
4d7d8: 66bc bnes 4d796 <rtems_bdbuf_init+0x326>
(bdbuf_cache.max_bds_per_group - 1))
group++;
4d7da: 47eb 0014 lea %a3@(20),%a3 4d7de: 60b6 bras 4d796 <rtems_bdbuf_init+0x326>
b < bdbuf_cache.group_count;
b++,
group++,
bd += bdbuf_cache.max_bds_per_group)
{
group->bds_per_group = bdbuf_cache.max_bds_per_group;
4d7e0: 2439 0006 4632 movel 64632 <bdbuf_cache+0x1e>,%d2
group = bdbuf_cache.groups,
bd = bdbuf_cache.bds;
b < bdbuf_cache.group_count;
b++,
group++,
bd += bdbuf_cache.max_bds_per_group)
4d7e6: 763a moveq #58,%d3 4d7e8: 4c02 3800 mulsl %d2,%d3
if ((b % bdbuf_cache.max_bds_per_group) ==
(bdbuf_cache.max_bds_per_group - 1))
group++;
}
for (b = 0,
4d7ec: 4281 clrl %d1
group = bdbuf_cache.groups,
4d7ee: 2079 0006 4694 moveal 64694 <bdbuf_cache+0x80>,%a0
bd = bdbuf_cache.bds;
4d7f4: 2039 0006 4626 movel 64626 <bdbuf_cache+0x12>,%d0
b < bdbuf_cache.group_count;
4d7fa: 2279 0006 4690 moveal 64690 <bdbuf_cache+0x7c>,%a1
if ((b % bdbuf_cache.max_bds_per_group) ==
(bdbuf_cache.max_bds_per_group - 1))
group++;
}
for (b = 0,
4d800: b3c1 cmpal %d1,%a1
4d802: 6712 beqs 4d816 <rtems_bdbuf_init+0x3a6>
b++,
group++,
bd += bdbuf_cache.max_bds_per_group)
{
group->bds_per_group = bdbuf_cache.max_bds_per_group;
group->bdbuf = bd;
4d804: 2140 0010 movel %d0,%a0@(16)
for (b = 0,
group = bdbuf_cache.groups,
bd = bdbuf_cache.bds;
b < bdbuf_cache.group_count;
b++,
4d808: 5281 addql #1,%d1
group++,
bd += bdbuf_cache.max_bds_per_group)
4d80a: d083 addl %d3,%d0
{
group->bds_per_group = bdbuf_cache.max_bds_per_group;
4d80c: 2142 0008 movel %d2,%a0@(8)
for (b = 0,
group = bdbuf_cache.groups,
bd = bdbuf_cache.bds;
b < bdbuf_cache.group_count;
b++,
group++,
4d810: 41e8 0014 lea %a0@(20),%a0 4d814: 60ea bras 4d800 <rtems_bdbuf_init+0x390>
* threads.
*/
bdbuf_cache.swapout_enabled = true;
sc = rtems_task_create (rtems_build_name('B', 'S', 'W', 'P'),
bdbuf_config.swapout_priority ?
4d816: 2039 0006 1924 movel 61924 <rtems_bdbuf_configuration+0x8>,%d0
/*
* Create and start swapout task. This task will create and manage the worker
* threads.
*/
bdbuf_cache.swapout_enabled = true;
4d81c: 7201 moveq #1,%d1 4d81e: 13c1 0006 4618 moveb %d1,64618 <bdbuf_cache+0x4>
sc = rtems_task_create (rtems_build_name('B', 'S', 'W', 'P'),
4d824: 4a80 tstl %d0
4d826: 6604 bnes 4d82c <rtems_bdbuf_init+0x3bc> <== ALWAYS TAKEN
4d828: 103c 000f moveb #15,%d0 <== NOT EXECUTED
4d82c: 4879 0006 4614 pea 64614 <bdbuf_cache> 4d832: 42a7 clrl %sp@- 4d834: 4878 0400 pea 400 <D_BIAS+0x2> 4d838: 4878 2000 pea 2000 <D_MAX_EXP+0x1801> 4d83c: 2f00 movel %d0,%sp@- 4d83e: 2f3c 4253 5750 movel #1112758096,%sp@- 4d844: 4eb9 0004 7eb8 jsr 47eb8 <rtems_task_create>
RTEMS_BDBUF_SWAPOUT_TASK_PRIORITY_DEFAULT,
SWAPOUT_TASK_STACK_SIZE,
RTEMS_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR,
RTEMS_LOCAL | RTEMS_NO_FLOATING_POINT,
&bdbuf_cache.swapout);
if (sc != RTEMS_SUCCESSFUL)
4d84a: 4fef 0018 lea %sp@(24),%sp 4d84e: 4a80 tstl %d0 4d850: 6600 fd50 bnew 4d5a2 <rtems_bdbuf_init+0x132>
goto error;
sc = rtems_task_start (bdbuf_cache.swapout,
4d854: 4879 0006 4614 pea 64614 <bdbuf_cache> 4d85a: 487a f230 pea %pc@(4ca8c <rtems_bdbuf_swapout_task>) 4d85e: 2f39 0006 4614 movel 64614 <bdbuf_cache>,%sp@- 4d864: 4eb9 0004 8118 jsr 48118 <rtems_task_start>
rtems_bdbuf_swapout_task,
(rtems_task_argument) &bdbuf_cache);
if (sc != RTEMS_SUCCESSFUL)
4d86a: 4fef 000c lea %sp@(12),%sp 4d86e: 4a80 tstl %d0 4d870: 6600 fd30 bnew 4d5a2 <rtems_bdbuf_init+0x132>
goto error;
rtems_bdbuf_unlock_cache ();
4d874: 4eba e4a2 jsr %pc@(4bd18 <rtems_bdbuf_unlock_cache>)
return RTEMS_SUCCESSFUL;
4d878: 4280 clrl %d0
}
bdbuf_cache.initialised = false;
return RTEMS_UNSATISFIED;
}
4d87a: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4
4d880: 4e5e unlk %fp <== NOT EXECUTED
0004bb60 <rtems_bdbuf_lock_cache>:
/**
* Lock the cache. A single task can nest calls.
*/
static void
rtems_bdbuf_lock_cache (void)
{
4bb60: 4e56 0000 linkw %fp,#0
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_lock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_obtain (lock,
4bb64: 42a7 clrl %sp@- 4bb66: 42a7 clrl %sp@- 4bb68: 2f39 0006 463a movel 6463a <bdbuf_cache+0x26>,%sp@- 4bb6e: 4eb9 0004 7cac jsr 47cac <rtems_semaphore_obtain>
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
4bb74: 4fef 000c lea %sp@(12),%sp 4bb78: 4a80 tstl %d0
4bb7a: 6604 bnes 4bb80 <rtems_bdbuf_lock_cache+0x20> <== NEVER TAKEN
*/
static void
rtems_bdbuf_lock_cache (void)
{
rtems_bdbuf_lock (bdbuf_cache.lock, RTEMS_BLKDEV_FATAL_BDBUF_CACHE_LOCK);
}
4bb7c: 4e5e unlk %fp 4bb7e: 4e75 rts
{
rtems_status_code sc = rtems_semaphore_obtain (lock,
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (fatal_error_code);
4bb80: 2f3c 4200 000d movel #1107296269,%sp@- <== NOT EXECUTED 4bb86: 4eb9 0004 83dc jsr 483dc <rtems_fatal_error_occurred> <== NOT EXECUTED
0004bb8c <rtems_bdbuf_lock_sync>:
/**
* Lock the cache's sync. A single task can nest calls.
*/
static void
rtems_bdbuf_lock_sync (void)
{
4bb8c: 4e56 0000 linkw %fp,#0
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_lock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_obtain (lock,
4bb90: 42a7 clrl %sp@- 4bb92: 42a7 clrl %sp@- 4bb94: 2f39 0006 463e movel 6463e <bdbuf_cache+0x2a>,%sp@- 4bb9a: 4eb9 0004 7cac jsr 47cac <rtems_semaphore_obtain>
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
4bba0: 4fef 000c lea %sp@(12),%sp 4bba4: 4a80 tstl %d0
4bba6: 6604 bnes 4bbac <rtems_bdbuf_lock_sync+0x20> <== NEVER TAKEN
*/
static void
rtems_bdbuf_lock_sync (void)
{
rtems_bdbuf_lock (bdbuf_cache.sync_lock, RTEMS_BLKDEV_FATAL_BDBUF_SYNC_LOCK);
}
4bba8: 4e5e unlk %fp 4bbaa: 4e75 rts
{
rtems_status_code sc = rtems_semaphore_obtain (lock,
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (fatal_error_code);
4bbac: 2f3c 4200 000b movel #1107296267,%sp@- <== NOT EXECUTED 4bbb2: 4eb9 0004 83dc jsr 483dc <rtems_fatal_error_occurred> <== NOT EXECUTED
0004c076 <rtems_bdbuf_obtain_disk.part.8>:
return bd;
}
static rtems_status_code
rtems_bdbuf_obtain_disk (dev_t dev,
4c076: 4e56 ffe4 linkw %fp,#-28 4c07a: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@
return RTEMS_NOT_CONFIGURED;
/*
* Do not hold the cache lock when obtaining the disk table.
*/
dd = rtems_disk_obtain (dev);
4c07e: 2f2e 000c movel %fp@(12),%sp@- 4c082: 2f2e 0008 movel %fp@(8),%sp@-
return bd;
}
static rtems_status_code
rtems_bdbuf_obtain_disk (dev_t dev,
4c086: 266e 0018 moveal %fp@(24),%a3 4c08a: 286e 001c moveal %fp@(28),%a4
return RTEMS_NOT_CONFIGURED;
/*
* Do not hold the cache lock when obtaining the disk table.
*/
dd = rtems_disk_obtain (dev);
4c08e: 4eb9 0004 32a6 jsr 432a6 <rtems_disk_obtain>
if (dd == NULL)
4c094: 508f addql #8,%sp
return RTEMS_NOT_CONFIGURED;
/*
* Do not hold the cache lock when obtaining the disk table.
*/
dd = rtems_disk_obtain (dev);
4c096: 2440 moveal %d0,%a2
if (dd == NULL)
4c098: 4a80 tstl %d0 4c09a: 6700 00a4 beqw 4c140 <rtems_bdbuf_obtain_disk.part.8+0xca>
return RTEMS_INVALID_ID;
*dd_ptr = dd;
4c09e: 206e 0014 moveal %fp@(20),%a0 4c0a2: 2080 movel %d0,%a0@
if (media_block_ptr != NULL)
4c0a4: 4a8b tstl %a3
4c0a6: 673e beqs 4c0e6 <rtems_bdbuf_obtain_disk.part.8+0x70>
rtems_bdbuf_media_block (rtems_blkdev_bnum block,
size_t block_size,
size_t media_block_size)
{
return (rtems_blkdev_bnum)
((((uint64_t) block) * block_size) / media_block_size);
4c0a8: 2a2a 0020 movel %a2@(32),%d5 4c0ac: 4284 clrl %d4 4c0ae: 4282 clrl %d2 4c0b0: 2f05 movel %d5,%sp@- 4c0b2: 2f04 movel %d4,%sp@- 4c0b4: 2f2e 0010 movel %fp@(16),%sp@- 4c0b8: 42a7 clrl %sp@- 4c0ba: 4eb9 0005 f668 jsr 5f668 <__muldi3> 4c0c0: 262a 0024 movel %a2@(36),%d3 4c0c4: 4fef 0010 lea %sp@(16),%sp 4c0c8: 2f03 movel %d3,%sp@- 4c0ca: 2f02 movel %d2,%sp@- 4c0cc: 2f01 movel %d1,%sp@- 4c0ce: 2f00 movel %d0,%sp@- 4c0d0: 4eb9 0005 ff00 jsr 5ff00 <__udivdi3> 4c0d6: 4fef 0010 lea %sp@(16),%sp
* the user.
*/
rtems_blkdev_bnum mb = rtems_bdbuf_media_block (block,
dd->block_size,
dd->media_block_size);
if (mb >= dd->size)
4c0da: b2aa 001c cmpl %a2@(28),%d1
4c0de: 644a bccs 4c12a <rtems_bdbuf_obtain_disk.part.8+0xb4><== NEVER TAKEN
{
rtems_disk_release(dd);
return RTEMS_INVALID_NUMBER;
}
*media_block_ptr = mb + dd->start;
4c0e0: d2aa 0018 addl %a2@(24),%d1 4c0e4: 2681 movel %d1,%a3@
}
if (bds_per_group_ptr != NULL)
4c0e6: 4a8c tstl %a4
4c0e8: 6766 beqs 4c150 <rtems_bdbuf_obtain_disk.part.8+0xda>
{
size_t bds_per_group = rtems_bdbuf_bds_per_group (dd->block_size);
4c0ea: 222a 0020 movel %a2@(32),%d1
rtems_bdbuf_bds_per_group (size_t size)
{
size_t bufs_per_size;
size_t bds_per_size;
if (size > bdbuf_config.buffer_max)
4c0ee: b2b9 0006 1940 cmpl 61940 <rtems_bdbuf_configuration+0x24>,%d1
4c0f4: 6234 bhis 4c12a <rtems_bdbuf_obtain_disk.part.8+0xb4><== NEVER TAKEN
return 0;
bufs_per_size = ((size - 1) / bdbuf_config.buffer_min) + 1;
4c0f6: 5381 subql #1,%d1 4c0f8: 41f9 0006 193c lea 6193c <rtems_bdbuf_configuration+0x20>,%a0 4c0fe: 4c50 1001 remul %a0@,%d1,%d1
for (bds_per_size = 1;
4c102: 7001 moveq #1,%d0
size_t bds_per_size;
if (size > bdbuf_config.buffer_max)
return 0;
bufs_per_size = ((size - 1) / bdbuf_config.buffer_min) + 1;
4c104: 5281 addql #1,%d1
for (bds_per_size = 1;
4c106: b081 cmpl %d1,%d0
4c108: 6442 bccs 4c14c <rtems_bdbuf_obtain_disk.part.8+0xd6>
bds_per_size < bufs_per_size;
bds_per_size <<= 1)
4c10a: d080 addl %d0,%d0
if (size > bdbuf_config.buffer_max)
return 0;
bufs_per_size = ((size - 1) / bdbuf_config.buffer_min) + 1;
for (bds_per_size = 1;
4c10c: b081 cmpl %d1,%d0
4c10e: 65fa bcss 4c10a <rtems_bdbuf_obtain_disk.part.8+0x94><== NEVER TAKEN
bds_per_size < bufs_per_size;
bds_per_size <<= 1)
;
return bdbuf_cache.max_bds_per_group / bds_per_size;
4c110: 2439 0006 4632 movel 64632 <bdbuf_cache+0x1e>,%d2 4c116: 4c40 2002 remul %d0,%d2,%d2
if (bds_per_group_ptr != NULL)
{
size_t bds_per_group = rtems_bdbuf_bds_per_group (dd->block_size);
if (bds_per_group == 0)
4c11a: 670e beqs 4c12a <rtems_bdbuf_obtain_disk.part.8+0xb4><== NEVER TAKEN
{
rtems_disk_release (dd);
return RTEMS_INVALID_NUMBER;
}
*bds_per_group_ptr = bds_per_group;
4c11c: 2882 movel %d2,%a4@
}
return RTEMS_SUCCESSFUL;
4c11e: 4280 clrl %d0
}
4c120: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4c126: 4e5e unlk %fp 4c128: 4e75 rts
{
size_t bds_per_group = rtems_bdbuf_bds_per_group (dd->block_size);
if (bds_per_group == 0)
{
rtems_disk_release (dd);
4c12a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4c12c: 4eb9 0004 331e jsr 4331e <rtems_disk_release> <== NOT EXECUTED 4c132: 588f addql #4,%sp <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
4c134: 700a moveq #10,%d0 <== NOT EXECUTED
*bds_per_group_ptr = bds_per_group;
}
return RTEMS_SUCCESSFUL;
}
4c136: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 <== NOT EXECUTED 4c13c: 4e5e unlk %fp <== NOT EXECUTED 4c13e: 4e75 rts <== NOT EXECUTED
/*
* Do not hold the cache lock when obtaining the disk table.
*/
dd = rtems_disk_obtain (dev);
if (dd == NULL)
return RTEMS_INVALID_ID;
4c140: 7004 moveq #4,%d0 <== NOT EXECUTED
*bds_per_group_ptr = bds_per_group;
}
return RTEMS_SUCCESSFUL;
}
4c142: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 <== NOT EXECUTED 4c148: 4e5e unlk %fp <== NOT EXECUTED 4c14a: 4e75 rts <== NOT EXECUTED
if (size > bdbuf_config.buffer_max)
return 0;
bufs_per_size = ((size - 1) / bdbuf_config.buffer_min) + 1;
for (bds_per_size = 1;
4c14c: 7001 moveq #1,%d0 4c14e: 60c0 bras 4c110 <rtems_bdbuf_obtain_disk.part.8+0x9a>
}
*bds_per_group_ptr = bds_per_group;
}
return RTEMS_SUCCESSFUL;
4c150: 4280 clrl %d0
}
4c152: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4
4c158: 4e5e unlk %fp <== NOT EXECUTED
0004c544 <rtems_bdbuf_purge>:
}
}
static void
rtems_bdbuf_purge (rtems_bdbuf_purge_compare compare, dev_t dev)
{
4c544: 4e56 ff50 linkw %fp,#-176
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
4c548: 200e movel %fp,%d0 4c54a: 5180 subql #8,%d0 4c54c: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 4c550: 280e movel %fp,%d4 4c552: 0684 ffff fff4 addil #-12,%d4 4c558: 2d40 fff4 movel %d0,%fp@(-12) 4c55c: 286e 0008 moveal %fp@(8),%a4
head->previous = NULL;
4c560: 42ae fff8 clrl %fp@(-8) 4c564: 242e 000c movel %fp@(12),%d2 4c568: 262e 0010 movel %fp@(16),%d3
tail->previous = head;
4c56c: 2d44 fffc movel %d4,%fp@(-4)
rtems_chain_control purge_list;
rtems_chain_initialize_empty (&purge_list);
rtems_bdbuf_lock_cache ();
4c570: 4eba f5ee jsr %pc@(4bb60 <rtems_bdbuf_lock_cache>)
rtems_bdbuf_purge_compare compare,
dev_t dev)
{
rtems_bdbuf_buffer *stack [RTEMS_BDBUF_AVL_MAX_HEIGHT];
rtems_bdbuf_buffer **prev = stack;
rtems_bdbuf_buffer *cur = bdbuf_cache.tree;
4c574: 2479 0006 4650 moveal 64650 <bdbuf_cache+0x3c>,%a2
*prev = NULL;
4c57a: 42ae ff74 clrl %fp@(-140)
while (cur != NULL)
4c57e: 4a8a tstl %a2 4c580: 6700 00ec beqw 4c66e <rtems_bdbuf_purge+0x12a>
rtems_bdbuf_gather_for_purge (rtems_chain_control *purge_list,
rtems_bdbuf_purge_compare compare,
dev_t dev)
{
rtems_bdbuf_buffer *stack [RTEMS_BDBUF_AVL_MAX_HEIGHT];
rtems_bdbuf_buffer **prev = stack;
4c584: 47ee ff74 lea %fp@(-140),%a3
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
4c588: 4bf9 0004 88d4 lea 488d4 <_Chain_Append>,%a5
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
4c58e: 2a3c 0004 890c movel #297228,%d5
case RTEMS_BDBUF_STATE_EMPTY:
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
case RTEMS_BDBUF_STATE_TRANSFER_PURGED:
break;
case RTEMS_BDBUF_STATE_SYNC:
rtems_bdbuf_wake (&bdbuf_cache.transfer_waiters);
4c594: 2c3c 0004 bf7a movel #311162,%d6
*prev = NULL;
while (cur != NULL)
{
if ((*compare) (cur->dev, dev))
4c59a: 2f03 movel %d3,%sp@- 4c59c: 2f02 movel %d2,%sp@- 4c59e: 2f2a 0016 movel %a2@(22),%sp@- 4c5a2: 2f2a 0012 movel %a2@(18),%sp@- 4c5a6: 4e94 jsr %a4@ 4c5a8: 4fef 0010 lea %sp@(16),%sp 4c5ac: 4a00 tstb %d0
4c5ae: 671c beqs 4c5cc <rtems_bdbuf_purge+0x88> <== NEVER TAKEN
{
switch (cur->state)
4c5b0: 202a 0022 movel %a2@(34),%d0 4c5b4: 720a moveq #10,%d1 4c5b6: b280 cmpl %d0,%d1
4c5b8: 644e bccs 4c608 <rtems_bdbuf_purge+0xc4> <== ALWAYS TAKEN
case RTEMS_BDBUF_STATE_ACCESS_EMPTY:
case RTEMS_BDBUF_STATE_ACCESS_MODIFIED:
rtems_bdbuf_set_state (cur, RTEMS_BDBUF_STATE_ACCESS_PURGED);
break;
default:
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_STATE_11);
4c5ba: 2f3c 4200 0001 movel #1107296257,%sp@- <== NOT EXECUTED 4c5c0: 4eb9 0004 83dc jsr 483dc <rtems_fatal_error_occurred> <== NOT EXECUTED
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4c5c6: 700a moveq #10,%d0 4c5c8: 2540 0022 movel %d0,%a2@(34)
default:
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_STATE_11);
}
}
if (cur->avl.left != NULL)
4c5cc: 202a 0008 movel %a2@(8),%d0
4c5d0: 670a beqs 4c5dc <rtems_bdbuf_purge+0x98> <== ALWAYS TAKEN
}
else if (cur->avl.right != NULL)
{
/* Right */
++prev;
*prev = cur;
4c5d2: 274a 0004 movel %a2,%a3@(4) <== NOT EXECUTED 4c5d6: 2440 moveal %d0,%a2 <== NOT EXECUTED
cur = cur->avl.left;
}
else if (cur->avl.right != NULL)
{
/* Right */
++prev;
4c5d8: 588b addql #4,%a3 <== NOT EXECUTED 4c5da: 60be bras 4c59a <rtems_bdbuf_purge+0x56> <== NOT EXECUTED
/* Left */
++prev;
*prev = cur;
cur = cur->avl.left;
}
else if (cur->avl.right != NULL)
4c5dc: 202a 000c movel %a2@(12),%d0
4c5e0: 66f0 bnes 4c5d2 <rtems_bdbuf_purge+0x8e> <== NEVER TAKEN
*prev = cur;
cur = cur->avl.right;
}
else
{
while (*prev != NULL && cur == (*prev)->avl.right)
4c5e2: 2253 moveal %a3@,%a1 4c5e4: 4a89 tstl %a1 4c5e6: 6700 0086 beqw 4c66e <rtems_bdbuf_purge+0x12a>
4c5ea: 2029 000c movel %a1@(12),%d0 <== NOT EXECUTED 4c5ee: b08a cmpl %a2,%d0 <== NOT EXECUTED 4c5f0: 6676 bnes 4c668 <rtems_bdbuf_purge+0x124> <== NOT EXECUTED 4c5f2: 206b fffc moveal %a3@(-4),%a0 <== NOT EXECUTED 4c5f6: 4a88 tstl %a0 <== NOT EXECUTED 4c5f8: 6774 beqs 4c66e <rtems_bdbuf_purge+0x12a> <== NOT EXECUTED 4c5fa: 2028 000c movel %a0@(12),%d0 <== NOT EXECUTED
{
/* Up */
cur = *prev;
--prev;
4c5fe: 598b subql #4,%a3 <== NOT EXECUTED
*prev = cur;
cur = cur->avl.right;
}
else
{
while (*prev != NULL && cur == (*prev)->avl.right)
4c600: b3c0 cmpal %d0,%a1 <== NOT EXECUTED 4c602: 6664 bnes 4c668 <rtems_bdbuf_purge+0x124> <== NOT EXECUTED 4c604: 2248 moveal %a0,%a1 <== NOT EXECUTED 4c606: 60ea bras 4c5f2 <rtems_bdbuf_purge+0xae> <== NOT EXECUTED
while (cur != NULL)
{
if ((*compare) (cur->dev, dev))
{
switch (cur->state)
4c608: 303b 0a08 movew %pc@(4c612 <rtems_bdbuf_purge+0xce>,%d0:l:2),%d0 4c60c: 48c0 extl %d0 4c60e: 4efb 0802 jmp %pc@(4c612 <rtems_bdbuf_purge+0xce>,%d0:l)
4c612: ffba .short 0xffba <== NOT EXECUTED 4c614: ffba .short 0xffba <== NOT EXECUTED 4c616: 002a .short 0x002a <== NOT EXECUTED 4c618: 0042 .short 0x0042 <== NOT EXECUTED 4c61a: 0042 .short 0x0042 <== NOT EXECUTED 4c61c: 0042 .short 0x0042 <== NOT EXECUTED 4c61e: ffba .short 0xffba <== NOT EXECUTED 4c620: 0022 .short 0x0022 <== NOT EXECUTED 4c622: 0016 .short 0x0016 <== NOT EXECUTED 4c624: ffb4 .short 0xffb4 <== NOT EXECUTED 4c626: ffba .short 0xffba <== NOT EXECUTED
case RTEMS_BDBUF_STATE_EMPTY:
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
case RTEMS_BDBUF_STATE_TRANSFER_PURGED:
break;
case RTEMS_BDBUF_STATE_SYNC:
rtems_bdbuf_wake (&bdbuf_cache.transfer_waiters);
4c628: 4879 0006 4680 pea 64680 <bdbuf_cache+0x6c> 4c62e: 2046 moveal %d6,%a0 4c630: 4e90 jsr %a0@ 4c632: 588f addql #4,%sp
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
4c634: 206a 002a moveal %a2@(42),%a0 4c638: 53a8 000c subql #1,%a0@(12) 4c63c: 2f0a movel %a2,%sp@- 4c63e: 2045 moveal %d5,%a0 4c640: 4e90 jsr %a0@
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
4c642: 2f0a movel %a2,%sp@- 4c644: 2f04 movel %d4,%sp@- 4c646: 4e95 jsr %a5@
default:
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_STATE_11);
}
}
if (cur->avl.left != NULL)
4c648: 202a 0008 movel %a2@(8),%d0 4c64c: 4fef 000c lea %sp@(12),%sp
4c650: 6680 bnes 4c5d2 <rtems_bdbuf_purge+0x8e> <== NEVER TAKEN
4c652: 6088 bras 4c5dc <rtems_bdbuf_purge+0x98>
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4c654: 7206 moveq #6,%d1
default:
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_STATE_11);
}
}
if (cur->avl.left != NULL)
4c656: 202a 0008 movel %a2@(8),%d0
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4c65a: 2541 0022 movel %d1,%a2@(34)
default:
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_STATE_11);
}
}
if (cur->avl.left != NULL)
4c65e: 4a80 tstl %d0 4c660: 6600 ff70 bnew 4c5d2 <rtems_bdbuf_purge+0x8e> 4c664: 6000 ff76 braw 4c5dc <rtems_bdbuf_purge+0x98>
rtems_bdbuf_buffer **prev = stack;
rtems_bdbuf_buffer *cur = bdbuf_cache.tree;
*prev = NULL;
while (cur != NULL)
4c668: 4a80 tstl %d0 <== NOT EXECUTED 4c66a: 6600 0082 bnew 4c6ee <rtems_bdbuf_purge+0x1aa> <== NOT EXECUTED
4c66e: 45f9 0004 8934 lea 48934 <_Chain_Get>,%a2
{
rtems_bdbuf_make_empty (bd);
if (bd->waiters == 0)
{
rtems_bdbuf_remove_from_tree (bd);
4c674: 49fa fae6 lea %pc@(4c15c <rtems_bdbuf_remove_from_tree>),%a4
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
4c678: 47f9 0005 0ce8 lea 50ce8 <_Chain_Insert>,%a3
while ((node = rtems_chain_get (purge_list)) != NULL)
{
rtems_bdbuf_buffer *bd = (rtems_bdbuf_buffer *) node;
if (bd->waiters == 0)
wake_buffer_waiters = true;
4c67e: 4202 clrb %d2
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
4c680: 2f04 movel %d4,%sp@- 4c682: 4e92 jsr %a2@
rtems_bdbuf_purge_list (rtems_chain_control *purge_list)
{
bool wake_buffer_waiters = false;
rtems_chain_node *node = NULL;
while ((node = rtems_chain_get (purge_list)) != NULL)
4c684: 588f addql #4,%sp 4c686: 2a40 moveal %d0,%a5 4c688: 4a80 tstl %d0
4c68a: 6736 beqs 4c6c2 <rtems_bdbuf_purge+0x17e>
{
rtems_bdbuf_buffer *bd = (rtems_bdbuf_buffer *) node;
if (bd->waiters == 0)
4c68c: 202d 0026 movel %a5@(38),%d0
4c690: 6602 bnes 4c694 <rtems_bdbuf_purge+0x150>
wake_buffer_waiters = true;
4c692: 7401 moveq #1,%d2
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4c694: 7001 moveq #1,%d0 4c696: 2b40 0022 movel %d0,%a5@(34)
static void
rtems_bdbuf_discard_buffer (rtems_bdbuf_buffer *bd)
{
rtems_bdbuf_make_empty (bd);
if (bd->waiters == 0)
4c69a: 202d 0026 movel %a5@(38),%d0
4c69e: 66e0 bnes 4c680 <rtems_bdbuf_purge+0x13c>
{
rtems_bdbuf_remove_from_tree (bd);
4c6a0: 2f0d movel %a5,%sp@- 4c6a2: 4e94 jsr %a4@
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4c6a4: 42ad 0022 clrl %a5@(34) 4c6a8: 2f0d movel %a5,%sp@- 4c6aa: 4879 0006 4654 pea 64654 <bdbuf_cache+0x40> 4c6b0: 4e93 jsr %a3@ 4c6b2: 4fef 000c lea %sp@(12),%sp 4c6b6: 2f04 movel %d4,%sp@- 4c6b8: 4e92 jsr %a2@
rtems_bdbuf_purge_list (rtems_chain_control *purge_list)
{
bool wake_buffer_waiters = false;
rtems_chain_node *node = NULL;
while ((node = rtems_chain_get (purge_list)) != NULL)
4c6ba: 588f addql #4,%sp 4c6bc: 2a40 moveal %d0,%a5 4c6be: 4a80 tstl %d0
4c6c0: 66ca bnes 4c68c <rtems_bdbuf_purge+0x148> <== NEVER TAKEN
wake_buffer_waiters = true;
rtems_bdbuf_discard_buffer (bd);
}
if (wake_buffer_waiters)
4c6c2: 4a02 tstb %d2
4c6c4: 660e bnes 4c6d4 <rtems_bdbuf_purge+0x190>
rtems_chain_initialize_empty (&purge_list);
rtems_bdbuf_lock_cache ();
rtems_bdbuf_gather_for_purge (&purge_list, compare, dev);
rtems_bdbuf_purge_list (&purge_list);
rtems_bdbuf_unlock_cache ();
4c6c6: 4eba f650 jsr %pc@(4bd18 <rtems_bdbuf_unlock_cache>)
}
4c6ca: 4cee 3c7c ff50 moveml %fp@(-176),%d2-%d6/%a2-%a5 4c6d0: 4e5e unlk %fp 4c6d2: 4e75 rts
rtems_bdbuf_discard_buffer (bd);
}
if (wake_buffer_waiters)
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
4c6d4: 4879 0006 4688 pea 64688 <bdbuf_cache+0x74> 4c6da: 4eba f89e jsr %pc@(4bf7a <rtems_bdbuf_wake>) 4c6de: 588f addql #4,%sp
rtems_chain_initialize_empty (&purge_list);
rtems_bdbuf_lock_cache ();
rtems_bdbuf_gather_for_purge (&purge_list, compare, dev);
rtems_bdbuf_purge_list (&purge_list);
rtems_bdbuf_unlock_cache ();
4c6e0: 4eba f636 jsr %pc@(4bd18 <rtems_bdbuf_unlock_cache>)
}
4c6e4: 4cee 3c7c ff50 moveml %fp@(-176),%d2-%d6/%a2-%a5 4c6ea: 4e5e unlk %fp 4c6ec: 4e75 rts
rtems_bdbuf_buffer **prev = stack;
rtems_bdbuf_buffer *cur = bdbuf_cache.tree;
*prev = NULL;
while (cur != NULL)
4c6ee: 2440 moveal %d0,%a2 <== NOT EXECUTED 4c6f0: 6000 fea8 braw 4c59a <rtems_bdbuf_purge+0x56> <== NOT EXECUTED
0004bb2a <rtems_bdbuf_purge_compare_dev>:
rtems_bdbuf_unlock_cache ();
}
static bool
rtems_bdbuf_purge_compare_dev (dev_t a, dev_t b)
{
4bb2a: 4e56 0000 linkw %fp,#0 4bb2e: 2f02 movel %d2,%sp@-
return a == b;
4bb30: 222e 0010 movel %fp@(16),%d1 4bb34: 242e 0014 movel %fp@(20),%d2 4bb38: b2ae 0008 cmpl %fp@(8),%d1
4bb3c: 6604 bnes 4bb42 <rtems_bdbuf_purge_compare_dev+0x18><== NEVER TAKEN
4bb3e: b4ae 000c cmpl %fp@(12),%d2 4bb42: 57c0 seq %d0
}
4bb44: 241f movel %sp@+,%d2 4bb46: 4480 negl %d0
4bb48: 4e5e unlk %fp <== NOT EXECUTED
0004bb4c <rtems_bdbuf_purge_compare_major>:
rtems_bdbuf_purge (rtems_bdbuf_purge_compare_dev, dev);
}
static bool
rtems_bdbuf_purge_compare_major (dev_t a, dev_t b)
{
4bb4c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
return rtems_filesystem_dev_major_t (a) == rtems_filesystem_dev_major_t (b);
4bb50: 202e 0010 movel %fp@(16),%d0 <== NOT EXECUTED 4bb54: b0ae 0008 cmpl %fp@(8),%d0 <== NOT EXECUTED 4bb58: 57c0 seq %d0 <== NOT EXECUTED
}
4bb5a: 4e5e unlk %fp <== NOT EXECUTED 4bb5c: 4480 negl %d0 <== NOT EXECUTED
0004df7e <rtems_bdbuf_purge_major>:
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
temp.__overlay.minor = _minor;
4df7e: 4281 clrl %d1 <== NOT EXECUTED
return rtems_filesystem_dev_major_t (a) == rtems_filesystem_dev_major_t (b);
}
void
rtems_bdbuf_purge_major (rtems_device_major_number major)
{
4df80: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
4df84: 202e 0008 movel %fp@(8),%d0 <== NOT EXECUTED
dev_t dev = rtems_filesystem_make_dev_t (major, 0);
rtems_bdbuf_purge (rtems_bdbuf_purge_compare_major, dev);
4df88: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4df8a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4df8c: 487a dbbe pea %pc@(4bb4c <rtems_bdbuf_purge_compare_major>)<== NOT EXECUTED 4df90: 4eba e5b2 jsr %pc@(4c544 <rtems_bdbuf_purge>) <== NOT EXECUTED 4df94: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
}
4df98: 4e5e unlk %fp <== NOT EXECUTED
0004d978 <rtems_bdbuf_read>:
rtems_status_code
rtems_bdbuf_read (dev_t dev,
rtems_blkdev_bnum block,
rtems_bdbuf_buffer **bd_ptr)
{
4d978: 4e56 ffc0 linkw %fp,#-64 4d97c: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_disk_device *dd = NULL;
4d980: 42ae fff4 clrl %fp@(-12)
rtems_blkdev_request *req = NULL; rtems_bdbuf_buffer *bd = NULL; rtems_blkdev_bnum media_block = 0;
4d984: 42ae fff8 clrl %fp@(-8)
size_t bds_per_group = 0;
4d988: 42ae fffc clrl %fp@(-4)
rtems_blkdev_bnum *media_block_ptr,
size_t *bds_per_group_ptr)
{
rtems_disk_device *dd = NULL;
if (!bdbuf_cache.initialised)
4d98c: 4a39 0006 4698 tstb 64698 <bdbuf_cache+0x84>
4d992: 6610 bnes 4d9a4 <rtems_bdbuf_read+0x2c> <== ALWAYS TAKEN
return RTEMS_NOT_CONFIGURED;
4d994: 3a7c 0016 moveaw #22,%a5 <== NOT EXECUTED
rtems_bdbuf_unlock_cache ();
rtems_bdbuf_release_disk (dd);
return sc;
}
4d998: 200d movel %a5,%d0 <== NOT EXECUTED 4d99a: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4d9a0: 4e5e unlk %fp <== NOT EXECUTED 4d9a2: 4e75 rts <== NOT EXECUTED
rtems_blkdev_bnum *media_block_ptr,
size_t *bds_per_group_ptr)
{
rtems_disk_device *dd = NULL;
if (!bdbuf_cache.initialised)
4d9a4: 486e fffc pea %fp@(-4) 4d9a8: 486e fff8 pea %fp@(-8) 4d9ac: 486e fff4 pea %fp@(-12) 4d9b0: 2f2e 0010 movel %fp@(16),%sp@- 4d9b4: 2f2e 000c movel %fp@(12),%sp@- 4d9b8: 2f2e 0008 movel %fp@(8),%sp@- 4d9bc: 4eba e6b8 jsr %pc@(4c076 <rtems_bdbuf_obtain_disk.part.8>)
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block = 0;
size_t bds_per_group = 0;
sc = rtems_bdbuf_obtain_disk (dev, block, &dd, &media_block, &bds_per_group);
if (sc != RTEMS_SUCCESSFUL)
4d9c0: 4fef 0018 lea %sp@(24),%sp
rtems_blkdev_bnum *media_block_ptr,
size_t *bds_per_group_ptr)
{
rtems_disk_device *dd = NULL;
if (!bdbuf_cache.initialised)
4d9c4: 2a40 moveal %d0,%a5
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block = 0;
size_t bds_per_group = 0;
sc = rtems_bdbuf_obtain_disk (dev, block, &dd, &media_block, &bds_per_group);
if (sc != RTEMS_SUCCESSFUL)
4d9c6: 4a80 tstl %d0
4d9c8: 66ce bnes 4d998 <rtems_bdbuf_read+0x20> <== NEVER TAKEN
/*
* TODO: This type of request structure is wrong and should be removed.
*/
#define bdbuf_alloc(size) __builtin_alloca (size)
req = bdbuf_alloc (sizeof (rtems_blkdev_request) +
4d9ca: 2839 0006 191c movel 6191c <rtems_bdbuf_configuration>,%d4 4d9d0: 5284 addql #1,%d4 4d9d2: 2004 movel %d4,%d0 4d9d4: e988 lsll #4,%d0 4d9d6: 0680 0000 001c addil #28,%d0 4d9dc: 9fc0 subal %d0,%sp 4d9de: 45ef 0001 lea %sp@(1),%a2 4d9e2: 2a0a movel %a2,%d5
if (rtems_bdbuf_tracer)
printf ("bdbuf:read: %" PRIu32 " (%" PRIu32 ") (dev = %08x)\n",
media_block + dd->start, block, (unsigned) dev);
rtems_bdbuf_lock_cache ();
4d9e4: 4eba e17a jsr %pc@(4bb60 <rtems_bdbuf_lock_cache>)
rtems_bdbuf_create_read_request (dd, media_block, bds_per_group, req, &bd);
4d9e8: 206e fff4 moveal %fp@(-12),%a0
/*
* TODO: This type of request structure is wrong and should be removed.
*/
#define bdbuf_alloc(size) __builtin_alloca (size)
req = bdbuf_alloc (sizeof (rtems_blkdev_request) +
4d9ec: 70fe moveq #-2,%d0
rtems_blkdev_request *req,
rtems_bdbuf_buffer **bd_ptr)
{
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block_end = dd->start + dd->size;
rtems_blkdev_bnum media_block_count = dd->block_size / dd->media_block_size;
4d9ee: 2228 0020 movel %a0@(32),%d1
/*
* TODO: This type of request structure is wrong and should be removed.
*/
#define bdbuf_alloc(size) __builtin_alloca (size)
req = bdbuf_alloc (sizeof (rtems_blkdev_request) +
4d9f2: ca80 andl %d0,%d5
rtems_blkdev_request *req,
rtems_bdbuf_buffer **bd_ptr)
{
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block_end = dd->start + dd->size;
rtems_blkdev_bnum media_block_count = dd->block_size / dd->media_block_size;
4d9f4: 2d41 fff0 movel %d1,%fp@(-16)
size_t bds_per_group,
rtems_blkdev_request *req,
rtems_bdbuf_buffer **bd_ptr)
{
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block_end = dd->start + dd->size;
4d9f8: 2668 0018 moveal %a0@(24),%a3
/*
* TODO: This type of request structure is wrong and should be removed.
*/
#define bdbuf_alloc(size) __builtin_alloca (size)
req = bdbuf_alloc (sizeof (rtems_blkdev_request) +
4d9fc: 2445 moveal %d5,%a2
rtems_blkdev_request *req,
rtems_bdbuf_buffer **bd_ptr)
{
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block_end = dd->start + dd->size;
rtems_blkdev_bnum media_block_count = dd->block_size / dd->media_block_size;
4d9fe: 4c68 1001 0024 remul %a0@(36),%d1,%d1
size_t bds_per_group,
rtems_blkdev_request *req,
rtems_bdbuf_buffer **bd_ptr)
{
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block_end = dd->start + dd->size;
4da04: 2e28 001c movel %a0@(28),%d7
rtems_blkdev_bnum media_block_count = dd->block_size / dd->media_block_size;
4da08: 2d41 ffe8 movel %d1,%fp@(-24)
if (media_block_end - media_block < transfer_count)
transfer_count = media_block_end - media_block;
req->req = RTEMS_BLKDEV_REQ_READ;
req->req_done = rtems_bdbuf_transfer_done;
4da0c: 223c 0004 bdb2 movel #310706,%d1
rtems_bdbuf_buffer **bd_ptr)
{
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block_end = dd->start + dd->size;
rtems_blkdev_bnum media_block_count = dd->block_size / dd->media_block_size;
dev_t dev = dd->dev;
4da12: 2410 movel %a0@,%d2 4da14: 2628 0004 movel %a0@(4),%d3
if (rtems_bdbuf_tracer)
printf ("bdbuf:read: %" PRIu32 " (%" PRIu32 ") (dev = %08x)\n",
media_block + dd->start, block, (unsigned) dev);
rtems_bdbuf_lock_cache ();
rtems_bdbuf_create_read_request (dd, media_block, bds_per_group, req, &bd);
4da18: 2c2e fff8 movel %fp@(-8),%d6
if (media_block_end - media_block < transfer_count)
transfer_count = media_block_end - media_block;
req->req = RTEMS_BLKDEV_REQ_READ;
req->req_done = rtems_bdbuf_transfer_done;
4da1c: 2541 0004 movel %d1,%a2@(4)
if (rtems_bdbuf_tracer)
printf ("bdbuf:read: %" PRIu32 " (%" PRIu32 ") (dev = %08x)\n",
media_block + dd->start, block, (unsigned) dev);
rtems_bdbuf_lock_cache ();
rtems_bdbuf_create_read_request (dd, media_block, bds_per_group, req, &bd);
4da20: 2a2e fffc movel %fp@(-4),%d5
uint32_t transfer_count = bdbuf_config.max_read_ahead_blocks + 1;
if (media_block_end - media_block < transfer_count)
transfer_count = media_block_end - media_block;
req->req = RTEMS_BLKDEV_REQ_READ;
4da24: 4292 clrl %a2@
req->req_done = rtems_bdbuf_transfer_done; req->done_arg = req;
4da26: 254a 0008 movel %a2,%a2@(8)
req->io_task = rtems_task_self ();
4da2a: 4eb9 0005 09ec jsr 509ec <rtems_task_self>
req->status = RTEMS_RESOURCE_IN_USE;
4da30: 720c moveq #12,%d1
transfer_count = media_block_end - media_block;
req->req = RTEMS_BLKDEV_REQ_READ;
req->req_done = rtems_bdbuf_transfer_done;
req->done_arg = req;
req->io_task = rtems_task_self ();
4da32: 2540 0014 movel %d0,%a2@(20)
req->status = RTEMS_RESOURCE_IN_USE;
4da36: 2541 000c movel %d1,%a2@(12)
req->bufnum = 0;
4da3a: 42aa 0010 clrl %a2@(16)
bd = rtems_bdbuf_get_buffer_for_access (dev, media_block, bds_per_group);
4da3e: 2f05 movel %d5,%sp@- 4da40: 2f06 movel %d6,%sp@- 4da42: 2f03 movel %d3,%sp@- 4da44: 2f02 movel %d2,%sp@- 4da46: 4eba f7e6 jsr %pc@(4d22e <rtems_bdbuf_get_buffer_for_access>)
*bd_ptr = bd;
req->bufs [0].user = bd;
req->bufs [0].block = media_block;
req->bufs [0].length = block_size;
4da4a: 222e fff0 movel %fp@(-16),%d1
req->done_arg = req;
req->io_task = rtems_task_self ();
req->status = RTEMS_RESOURCE_IN_USE;
req->bufnum = 0;
bd = rtems_bdbuf_get_buffer_for_access (dev, media_block, bds_per_group);
4da4e: 2840 moveal %d0,%a4
req->bufs [0].buffer = bd->buffer;
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("read", bd);
switch (bd->state)
4da50: 4fef 0010 lea %sp@(16),%sp
bd = rtems_bdbuf_get_buffer_for_access (dev, media_block, bds_per_group);
*bd_ptr = bd;
req->bufs [0].user = bd;
4da54: 2540 0024 movel %d0,%a2@(36)
req->bufs [0].block = media_block; req->bufs [0].length = block_size; req->bufs [0].buffer = bd->buffer;
4da58: 256c 001e 0020 movel %a4@(30),%a2@(32)
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("read", bd);
switch (bd->state)
4da5e: 202c 0022 movel %a4@(34),%d0
*bd_ptr = bd;
req->bufs [0].user = bd;
req->bufs [0].block = media_block;
req->bufs [0].length = block_size;
4da62: 2541 001c movel %d1,%a2@(28)
req->bufs [0].buffer = bd->buffer;
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("read", bd);
switch (bd->state)
4da66: 7202 moveq #2,%d1
bd = rtems_bdbuf_get_buffer_for_access (dev, media_block, bds_per_group);
*bd_ptr = bd;
req->bufs [0].user = bd;
req->bufs [0].block = media_block;
4da68: 2546 0018 movel %d6,%a2@(24)
req->bufs [0].buffer = bd->buffer;
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("read", bd);
switch (bd->state)
4da6c: b280 cmpl %d0,%d1 4da6e: 6700 015c beqw 4dbcc <rtems_bdbuf_read+0x254> 4da72: 123c 0007 moveb #7,%d1 4da76: b280 cmpl %d0,%d1 4da78: 6700 0152 beqw 4dbcc <rtems_bdbuf_read+0x254> 4da7c: 123c 0001 moveb #1,%d1 4da80: b280 cmpl %d0,%d1
4da82: 6710 beqs 4da94 <rtems_bdbuf_read+0x11c> <== ALWAYS TAKEN
return;
case RTEMS_BDBUF_STATE_EMPTY:
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_TRANSFER);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_1);
4da84: 202c 0022 movel %a4@(34),%d0 <== NOT EXECUTED 4da88: 2f3c 4200 001d movel #1107296285,%sp@- <== NOT EXECUTED 4da8e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4da90: 4eba e126 jsr %pc@(4bbb8 <rtems_bdbuf_fatal>) <== NOT EXECUTED
size_t bds_per_group,
rtems_blkdev_request *req,
rtems_bdbuf_buffer **bd_ptr)
{
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block_end = dd->start + dd->size;
4da94: de8b addl %a3,%d7 4da96: 2d47 ffec movel %d7,%fp@(-20)
dev_t dev = dd->dev;
uint32_t block_size = dd->block_size;
uint32_t transfer_index = 1;
uint32_t transfer_count = bdbuf_config.max_read_ahead_blocks + 1;
if (media_block_end - media_block < transfer_count)
4da9a: 9dae ffec subl %d6,%fp@(-20)
req->bufs [0].buffer = bd->buffer;
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("read", bd);
switch (bd->state)
4da9e: b8ae ffec cmpl %fp@(-20),%d4
4daa2: 6404 bccs 4daa8 <rtems_bdbuf_read+0x130>
4daa4: 2d44 ffec movel %d4,%fp@(-20)
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4daa8: 7809 moveq #9,%d4
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_1);
break;
}
while (transfer_index < transfer_count)
4daaa: 7001 moveq #1,%d0
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4daac: 2944 0022 movel %d4,%a4@(34)
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_1);
break;
}
while (transfer_index < transfer_count)
4dab0: b0ae ffec cmpl %fp@(-20),%d0 4dab4: 6400 0160 bccw 4dc16 <rtems_bdbuf_read+0x29e>
bd = rtems_bdbuf_avl_search (&bdbuf_cache.tree, dev, block);
if (bd == NULL)
{
bd = rtems_bdbuf_get_buffer_from_lru_list (dev, block, bds_per_group);
4dab8: 282e ffe8 movel %fp@(-24),%d4
else
return RTEMS_IO_ERROR;
}
rtems_status_code
rtems_bdbuf_read (dev_t dev,
4dabc: 47ea 0034 lea %a2@(52),%a3
rtems_bdbuf_buffer *bd = NULL; rtems_blkdev_bnum media_block_end = dd->start + dd->size; rtems_blkdev_bnum media_block_count = dd->block_size / dd->media_block_size; dev_t dev = dd->dev; uint32_t block_size = dd->block_size; uint32_t transfer_index = 1;
4dac0: 7e01 moveq #1,%d7
rtems_blkdev_bnum block,
size_t bds_per_group)
{
rtems_bdbuf_buffer *bd = NULL;
bd = rtems_bdbuf_avl_search (&bdbuf_cache.tree, dev, block);
4dac2: 2079 0006 4650 moveal 64650 <bdbuf_cache+0x3c>,%a0
break;
}
while (transfer_index < transfer_count)
{
media_block += media_block_count;
4dac8: dc84 addl %d4,%d6
dev_t dev,
rtems_blkdev_bnum block)
{
rtems_bdbuf_buffer* p = *root;
while ((p != NULL) && ((p->dev != dev) || (p->block != block)))
4daca: 4a88 tstl %a0
4dacc: 6734 beqs 4db02 <rtems_bdbuf_read+0x18a> <== NEVER TAKEN
4dace: 2245 moveal %d5,%a1 4dad0: 2d44 ffe8 movel %d4,%fp@(-24) 4dad4: 2028 0012 movel %a0@(18),%d0 4dad8: 2228 0016 movel %a0@(22),%d1 4dadc: 2802 movel %d2,%d4 4dade: 2a03 movel %d3,%d5 4dae0: 9a81 subl %d1,%d5 4dae2: 9980 subxl %d0,%d4 4dae4: 6700 008c beqw 4db72 <rtems_bdbuf_read+0x1fa>
{
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
4dae8: 2802 movel %d2,%d4 <== NOT EXECUTED 4daea: 2a03 movel %d3,%d5 <== NOT EXECUTED 4daec: 9a81 subl %d1,%d5 <== NOT EXECUTED 4daee: 9980 subxl %d0,%d4 <== NOT EXECUTED 4daf0: 6300 008c blsw 4db7e <rtems_bdbuf_read+0x206> <== NOT EXECUTED
{
p = p->avl.right;
4daf4: 2068 000c moveal %a0@(12),%a0
dev_t dev,
rtems_blkdev_bnum block)
{
rtems_bdbuf_buffer* p = *root;
while ((p != NULL) && ((p->dev != dev) || (p->block != block)))
4daf8: 4a88 tstl %a0
4dafa: 66d8 bnes 4dad4 <rtems_bdbuf_read+0x15c> <== NEVER TAKEN
4dafc: 282e ffe8 movel %fp@(-24),%d4 4db00: 2a09 movel %a1,%d5
bd = rtems_bdbuf_avl_search (&bdbuf_cache.tree, dev, block);
if (bd == NULL)
{
bd = rtems_bdbuf_get_buffer_from_lru_list (dev, block, bds_per_group);
4db02: 2f05 movel %d5,%sp@- 4db04: 2f06 movel %d6,%sp@- 4db06: 2f03 movel %d3,%sp@- 4db08: 2f02 movel %d2,%sp@- 4db0a: 4eba f382 jsr %pc@(4ce8e <rtems_bdbuf_get_buffer_from_lru_list>)
if (bd != NULL)
4db0e: 4fef 0010 lea %sp@(16),%sp
bd = rtems_bdbuf_avl_search (&bdbuf_cache.tree, dev, block);
if (bd == NULL)
{
bd = rtems_bdbuf_get_buffer_from_lru_list (dev, block, bds_per_group);
4db12: 2040 moveal %d0,%a0
if (bd != NULL)
4db14: 4a80 tstl %d0
4db16: 6730 beqs 4db48 <rtems_bdbuf_read+0x1d0> <== ALWAYS TAKEN
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
4db18: 2268 002a moveal %a0@(42),%a1 <== NOT EXECUTED 4db1c: 52a9 000c addql #1,%a1@(12) <== NOT EXECUTED
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4db20: 7009 moveq #9,%d0 <== NOT EXECUTED
req->bufs [transfer_index].buffer = bd->buffer;
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("read-ahead", bd);
++transfer_index;
4db22: 5287 addql #1,%d7 <== NOT EXECUTED
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_TRANSFER);
req->bufs [transfer_index].user = bd;
req->bufs [transfer_index].block = media_block;
req->bufs [transfer_index].length = block_size;
4db24: 222e fff0 movel %fp@(-16),%d1 <== NOT EXECUTED
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4db28: 2140 0022 movel %d0,%a0@(34) <== NOT EXECUTED
if (bd == NULL)
break;
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_TRANSFER);
req->bufs [transfer_index].user = bd;
4db2c: 2688 movel %a0,%a3@ <== NOT EXECUTED
req->bufs [transfer_index].block = media_block;
4db2e: 2746 fff4 movel %d6,%a3@(-12) <== NOT EXECUTED
req->bufs [transfer_index].length = block_size;
4db32: 2741 fff8 movel %d1,%a3@(-8) <== NOT EXECUTED
req->bufs [transfer_index].buffer = bd->buffer;
4db36: 2768 001e fffc movel %a0@(30),%a3@(-4) <== NOT EXECUTED
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("read-ahead", bd);
++transfer_index;
4db3c: 47eb 0010 lea %a3@(16),%a3 <== NOT EXECUTED
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_1);
break;
}
while (transfer_index < transfer_count)
4db40: beae ffec cmpl %fp@(-20),%d7 <== NOT EXECUTED 4db44: 6600 ff7c bnew 4dac2 <rtems_bdbuf_read+0x14a> <== NOT EXECUTED
rtems_bdbuf_show_users ("read-ahead", bd);
++transfer_index;
}
req->bufnum = transfer_index;
4db48: 2547 0010 movel %d7,%a2@(16)
media_block + dd->start, block, (unsigned) dev);
rtems_bdbuf_lock_cache ();
rtems_bdbuf_create_read_request (dd, media_block, bds_per_group, req, &bd);
if (req->bufnum > 0)
4db4c: 4a87 tstl %d7
4db4e: 663c bnes 4db8c <rtems_bdbuf_read+0x214> <== ALWAYS TAKEN
}
}
if (sc == RTEMS_SUCCESSFUL)
{
switch (bd->state)
4db50: 202c 0022 movel %a4@(34),%d0 4db54: 7802 moveq #2,%d4 4db56: b880 cmpl %d0,%d4 4db58: 6700 0098 beqw 4dbf2 <rtems_bdbuf_read+0x27a> 4db5c: 7a07 moveq #7,%d5 4db5e: ba80 cmpl %d0,%d5
4db60: 6774 beqs 4dbd6 <rtems_bdbuf_read+0x25e> <== ALWAYS TAKEN
break;
case RTEMS_BDBUF_STATE_MODIFIED:
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_ACCESS_MODIFIED);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_4);
4db62: 202c 0022 movel %a4@(34),%d0 <== NOT EXECUTED 4db66: 2f3c 4200 0002 movel #1107296258,%sp@- <== NOT EXECUTED 4db6c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4db6e: 4eba e048 jsr %pc@(4bbb8 <rtems_bdbuf_fatal>) <== NOT EXECUTED
dev_t dev,
rtems_blkdev_bnum block)
{
rtems_bdbuf_buffer* p = *root;
while ((p != NULL) && ((p->dev != dev) || (p->block != block)))
4db72: 2028 001a movel %a0@(26),%d0 4db76: b086 cmpl %d6,%d0
4db78: 67ce beqs 4db48 <rtems_bdbuf_read+0x1d0> <== NEVER TAKEN
{
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
4db7a: 6500 ff78 bcsw 4daf4 <rtems_bdbuf_read+0x17c>
{
p = p->avl.right;
}
else
{
p = p->avl.left;
4db7e: 2068 0008 moveal %a0@(8),%a0 <== NOT EXECUTED
dev_t dev,
rtems_blkdev_bnum block)
{
rtems_bdbuf_buffer* p = *root;
while ((p != NULL) && ((p->dev != dev) || (p->block != block)))
4db82: 4a88 tstl %a0 <== NOT EXECUTED 4db84: 6600 ff4e bnew 4dad4 <rtems_bdbuf_read+0x15c> <== NOT EXECUTED 4db88: 6000 ff72 braw 4dafc <rtems_bdbuf_read+0x184> <== NOT EXECUTED
rtems_bdbuf_lock_cache ();
rtems_bdbuf_create_read_request (dd, media_block, bds_per_group, req, &bd);
if (req->bufnum > 0)
{
sc = rtems_bdbuf_execute_transfer_request (dd, req, true);
4db8c: 4878 0001 pea 1 <ADD> 4db90: 206e fff4 moveal %fp@(-12),%a0 4db94: 2f0a movel %a2,%sp@- 4db96: 4868 0028 pea %a0@(40) 4db9a: 4868 0008 pea %a0@(8) 4db9e: 4eba eb54 jsr %pc@(4c6f4 <rtems_bdbuf_execute_transfer_request.isra.9>)
if (sc == RTEMS_SUCCESSFUL)
4dba2: 4fef 0010 lea %sp@(16),%sp 4dba6: 4a80 tstl %d0
4dba8: 6756 beqs 4dc00 <rtems_bdbuf_read+0x288>
}
*bd_ptr = bd;
}
else
*bd_ptr = NULL;
4dbaa: 206e 0014 moveal %fp@(20),%a0 4dbae: 2a40 moveal %d0,%a5 4dbb0: 4290 clrl %a0@
rtems_bdbuf_unlock_cache ();
4dbb2: 4eba e164 jsr %pc@(4bd18 <rtems_bdbuf_unlock_cache>)
rtems_bdbuf_release_disk (dd);
4dbb6: 2f2e fff4 movel %fp@(-12),%sp@- 4dbba: 4eba e1a8 jsr %pc@(4bd64 <rtems_bdbuf_release_disk>)
return sc;
4dbbe: 588f addql #4,%sp
}
4dbc0: 200d movel %a5,%d0 4dbc2: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5 4dbc8: 4e5e unlk %fp 4dbca: 4e75 rts
req->bufs [0].buffer = bd->buffer;
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("read", bd);
switch (bd->state)
4dbcc: 2e2a 0010 movel %a2@(16),%d7
media_block + dd->start, block, (unsigned) dev);
rtems_bdbuf_lock_cache ();
rtems_bdbuf_create_read_request (dd, media_block, bds_per_group, req, &bd);
if (req->bufnum > 0)
4dbd0: 6700 ff7e beqw 4db50 <rtems_bdbuf_read+0x1d8>
4dbd4: 60b6 bras 4db8c <rtems_bdbuf_read+0x214> <== NOT EXECUTED
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4dbd6: 7204 moveq #4,%d1
{
rtems_bdbuf_show_users ("read", bd);
rtems_bdbuf_show_usage ();
}
*bd_ptr = bd;
4dbd8: 206e 0014 moveal %fp@(20),%a0
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4dbdc: 2941 0022 movel %d1,%a4@(34)
{
rtems_bdbuf_show_users ("read", bd);
rtems_bdbuf_show_usage ();
}
*bd_ptr = bd;
4dbe0: 208c movel %a4,%a0@
}
else
*bd_ptr = NULL;
rtems_bdbuf_unlock_cache ();
4dbe2: 4eba e134 jsr %pc@(4bd18 <rtems_bdbuf_unlock_cache>)
rtems_bdbuf_release_disk (dd);
4dbe6: 2f2e fff4 movel %fp@(-12),%sp@- 4dbea: 4eba e178 jsr %pc@(4bd64 <rtems_bdbuf_release_disk>)
return sc;
4dbee: 588f addql #4,%sp 4dbf0: 60ce bras 4dbc0 <rtems_bdbuf_read+0x248>
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4dbf2: 7003 moveq #3,%d0
{
rtems_bdbuf_show_users ("read", bd);
rtems_bdbuf_show_usage ();
}
*bd_ptr = bd;
4dbf4: 206e 0014 moveal %fp@(20),%a0
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4dbf8: 2940 0022 movel %d0,%a4@(34)
{
rtems_bdbuf_show_users ("read", bd);
rtems_bdbuf_show_usage ();
}
*bd_ptr = bd;
4dbfc: 208c movel %a4,%a0@ 4dbfe: 60e2 bras 4dbe2 <rtems_bdbuf_read+0x26a>
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
4dc00: 2f0c movel %a4,%sp@- 4dc02: 4eb9 0004 890c jsr 4890c <_Chain_Extract>
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
4dc08: 206c 002a moveal %a4@(42),%a0 4dc0c: 52a8 000c addql #1,%a0@(12) 4dc10: 588f addql #4,%sp 4dc12: 6000 ff3c braw 4db50 <rtems_bdbuf_read+0x1d8>
rtems_bdbuf_buffer *bd = NULL; rtems_blkdev_bnum media_block_end = dd->start + dd->size; rtems_blkdev_bnum media_block_count = dd->block_size / dd->media_block_size; dev_t dev = dd->dev; uint32_t block_size = dd->block_size; uint32_t transfer_index = 1;
4dc16: 7e01 moveq #1,%d7
rtems_bdbuf_show_users ("read-ahead", bd);
++transfer_index;
}
req->bufnum = transfer_index;
4dc18: 2547 0010 movel %d7,%a2@(16) 4dc1c: 6000 ff2e braw 4db4c <rtems_bdbuf_read+0x1d4>
0004dc20 <rtems_bdbuf_release>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_bdbuf_release (rtems_bdbuf_buffer *bd)
{
4dc20: 4e56 0000 linkw %fp,#0 4dc24: 2f0a movel %a2,%sp@- 4dc26: 246e 0008 moveal %fp@(8),%a2
}
static rtems_status_code
rtems_bdbuf_check_bd_and_lock_cache (rtems_bdbuf_buffer *bd, const char *kind)
{
if (!bdbuf_cache.initialised)
4dc2a: 4a39 0006 4698 tstb 64698 <bdbuf_cache+0x84>
4dc30: 672c beqs 4dc5e <rtems_bdbuf_release+0x3e> <== NEVER TAKEN
return RTEMS_NOT_CONFIGURED;
if (bd == NULL)
4dc32: 4a8a tstl %a2
4dc34: 6732 beqs 4dc68 <rtems_bdbuf_release+0x48> <== NEVER TAKEN
if (rtems_bdbuf_tracer)
{
printf ("bdbuf:%s: %" PRIu32 "\n", kind, bd->block);
rtems_bdbuf_show_users (kind, bd);
}
rtems_bdbuf_lock_cache();
4dc36: 4eba df28 jsr %pc@(4bb60 <rtems_bdbuf_lock_cache>)
sc = rtems_bdbuf_check_bd_and_lock_cache (bd, "release");
if (sc != RTEMS_SUCCESSFUL)
return sc;
switch (bd->state)
4dc3a: 202a 0022 movel %a2@(34),%d0 4dc3e: 7204 moveq #4,%d1 4dc40: b280 cmpl %d0,%d1 4dc42: 6700 0084 beqw 4dcc8 <rtems_bdbuf_release+0xa8>
4dc46: 642a bccs 4dc72 <rtems_bdbuf_release+0x52>
4dc48: 7206 moveq #6,%d1 4dc4a: b280 cmpl %d0,%d1
4dc4c: 646a bccs 4dcb8 <rtems_bdbuf_release+0x98> <== ALWAYS TAKEN
break;
case RTEMS_BDBUF_STATE_ACCESS_MODIFIED:
rtems_bdbuf_add_to_modified_list_after_access (bd);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_0);
4dc4e: 202a 0022 movel %a2@(34),%d0 <== NOT EXECUTED 4dc52: 2f3c 4200 001c movel #1107296284,%sp@- <== NOT EXECUTED 4dc58: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4dc5a: 4eba df5c jsr %pc@(4bbb8 <rtems_bdbuf_fatal>) <== NOT EXECUTED
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
return RTEMS_SUCCESSFUL;
}
4dc5e: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
static rtems_status_code
rtems_bdbuf_check_bd_and_lock_cache (rtems_bdbuf_buffer *bd, const char *kind)
{
if (!bdbuf_cache.initialised)
return RTEMS_NOT_CONFIGURED;
4dc62: 7016 moveq #22,%d0 <== NOT EXECUTED
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
return RTEMS_SUCCESSFUL;
}
4dc64: 4e5e unlk %fp <== NOT EXECUTED 4dc66: 4e75 rts <== NOT EXECUTED 4dc68: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
rtems_bdbuf_check_bd_and_lock_cache (rtems_bdbuf_buffer *bd, const char *kind)
{
if (!bdbuf_cache.initialised)
return RTEMS_NOT_CONFIGURED;
if (bd == NULL)
return RTEMS_INVALID_ADDRESS;
4dc6c: 7009 moveq #9,%d0 <== NOT EXECUTED
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
return RTEMS_SUCCESSFUL;
}
4dc6e: 4e5e unlk %fp <== NOT EXECUTED 4dc70: 4e75 rts <== NOT EXECUTED
sc = rtems_bdbuf_check_bd_and_lock_cache (bd, "release");
if (sc != RTEMS_SUCCESSFUL)
return sc;
switch (bd->state)
4dc72: 123c 0003 moveb #3,%d1 4dc76: b280 cmpl %d0,%d1
4dc78: 66d4 bnes 4dc4e <rtems_bdbuf_release+0x2e> <== NEVER TAKEN
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
4dc7a: 206a 002a moveal %a2@(42),%a0 4dc7e: 53a8 000c subql #1,%a0@(12)
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4dc82: 7002 moveq #2,%d0
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
4dc84: 2f0a movel %a2,%sp@- 4dc86: 4879 0006 4654 pea 64654 <bdbuf_cache+0x40> 4dc8c: 2540 0022 movel %d0,%a2@(34) 4dc90: 4eb9 0004 88d4 jsr 488d4 <_Chain_Append>
rtems_bdbuf_add_to_lru_list_after_access (rtems_bdbuf_buffer *bd)
{
rtems_bdbuf_group_release (bd);
rtems_bdbuf_make_cached_and_add_to_lru_list (bd);
if (bd->waiters)
4dc96: 202a 0026 movel %a2@(38),%d0 4dc9a: 508f addql #8,%sp
4dc9c: 673a beqs 4dcd8 <rtems_bdbuf_release+0xb8>
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
4dc9e: 4879 0006 4678 pea 64678 <bdbuf_cache+0x64> 4dca4: 4eba e2d4 jsr %pc@(4bf7a <rtems_bdbuf_wake>) 4dca8: 588f addql #4,%sp
}
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
4dcaa: 4eba e06c jsr %pc@(4bd18 <rtems_bdbuf_unlock_cache>)
return RTEMS_SUCCESSFUL;
4dcae: 4280 clrl %d0
}
4dcb0: 246e fffc moveal %fp@(-4),%a2 4dcb4: 4e5e unlk %fp 4dcb6: 4e75 rts
case RTEMS_BDBUF_STATE_ACCESS_CACHED:
rtems_bdbuf_add_to_lru_list_after_access (bd);
break;
case RTEMS_BDBUF_STATE_ACCESS_EMPTY:
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
rtems_bdbuf_discard_buffer_after_access (bd);
4dcb8: 2f0a movel %a2,%sp@- 4dcba: 4eba e81a jsr %pc@(4c4d6 <rtems_bdbuf_discard_buffer_after_access>)
break;
4dcbe: 588f addql #4,%sp
}
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
4dcc0: 4eba e056 jsr %pc@(4bd18 <rtems_bdbuf_unlock_cache>)
return RTEMS_SUCCESSFUL;
4dcc4: 4280 clrl %d0 4dcc6: 60e8 bras 4dcb0 <rtems_bdbuf_release+0x90>
case RTEMS_BDBUF_STATE_ACCESS_EMPTY:
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
rtems_bdbuf_discard_buffer_after_access (bd);
break;
case RTEMS_BDBUF_STATE_ACCESS_MODIFIED:
rtems_bdbuf_add_to_modified_list_after_access (bd);
4dcc8: 2f0a movel %a2,%sp@- 4dcca: 4eba e2da jsr %pc@(4bfa6 <rtems_bdbuf_add_to_modified_list_after_access>)
break;
4dcce: 588f addql #4,%sp
}
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
4dcd0: 4eba e046 jsr %pc@(4bd18 <rtems_bdbuf_unlock_cache>)
return RTEMS_SUCCESSFUL;
4dcd4: 4280 clrl %d0 4dcd6: 60d8 bras 4dcb0 <rtems_bdbuf_release+0x90>
rtems_bdbuf_make_cached_and_add_to_lru_list (bd);
if (bd->waiters)
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
else
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
4dcd8: 4879 0006 4688 pea 64688 <bdbuf_cache+0x74> 4dcde: 4eba e29a jsr %pc@(4bf7a <rtems_bdbuf_wake>) 4dce2: 588f addql #4,%sp
}
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
4dce4: 4eba e032 jsr %pc@(4bd18 <rtems_bdbuf_unlock_cache>)
return RTEMS_SUCCESSFUL;
4dce8: 4280 clrl %d0 4dcea: 60c4 bras 4dcb0 <rtems_bdbuf_release+0x90>
0004bd64 <rtems_bdbuf_release_disk>:
return RTEMS_SUCCESSFUL;
}
static void
rtems_bdbuf_release_disk (rtems_disk_device *dd)
{
4bd64: 4e56 0000 linkw %fp,#0
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_disk_release (dd);
4bd68: 2f2e 0008 movel %fp@(8),%sp@- 4bd6c: 4eb9 0004 331e jsr 4331e <rtems_disk_release>
if (sc != RTEMS_SUCCESSFUL)
4bd72: 588f addql #4,%sp 4bd74: 4a80 tstl %d0
4bd76: 6604 bnes 4bd7c <rtems_bdbuf_release_disk+0x18> <== NEVER TAKEN
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_DISK_REL);
}
4bd78: 4e5e unlk %fp 4bd7a: 4e75 rts
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_disk_release (dd);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_DISK_REL);
4bd7c: 2f3c 4200 001f movel #1107296287,%sp@- <== NOT EXECUTED 4bd82: 4eb9 0004 83dc jsr 483dc <rtems_fatal_error_occurred> <== NOT EXECUTED
0004dcec <rtems_bdbuf_release_modified>:
}
rtems_status_code
rtems_bdbuf_release_modified (rtems_bdbuf_buffer *bd)
{
4dcec: 4e56 0000 linkw %fp,#0 4dcf0: 2f0a movel %a2,%sp@- 4dcf2: 246e 0008 moveal %fp@(8),%a2
}
static rtems_status_code
rtems_bdbuf_check_bd_and_lock_cache (rtems_bdbuf_buffer *bd, const char *kind)
{
if (!bdbuf_cache.initialised)
4dcf6: 4a39 0006 4698 tstb 64698 <bdbuf_cache+0x84>
4dcfc: 6732 beqs 4dd30 <rtems_bdbuf_release_modified+0x44><== NEVER TAKEN
return RTEMS_NOT_CONFIGURED;
if (bd == NULL)
4dcfe: 4a8a tstl %a2
4dd00: 6738 beqs 4dd3a <rtems_bdbuf_release_modified+0x4e><== NEVER TAKEN
if (rtems_bdbuf_tracer)
{
printf ("bdbuf:%s: %" PRIu32 "\n", kind, bd->block);
rtems_bdbuf_show_users (kind, bd);
}
rtems_bdbuf_lock_cache();
4dd02: 4eba de5c jsr %pc@(4bb60 <rtems_bdbuf_lock_cache>)
sc = rtems_bdbuf_check_bd_and_lock_cache (bd, "release modified");
if (sc != RTEMS_SUCCESSFUL)
return sc;
switch (bd->state)
4dd06: 202a 0022 movel %a2@(34),%d0 4dd0a: 7203 moveq #3,%d1 4dd0c: b280 cmpl %d0,%d1
4dd0e: 6210 bhis 4dd20 <rtems_bdbuf_release_modified+0x34><== NEVER TAKEN
4dd10: 123c 0005 moveb #5,%d1 4dd14: b280 cmpl %d0,%d1
4dd16: 6442 bccs 4dd5a <rtems_bdbuf_release_modified+0x6e>
4dd18: 123c 0006 moveb #6,%d1 4dd1c: b280 cmpl %d0,%d1
4dd1e: 6724 beqs 4dd44 <rtems_bdbuf_release_modified+0x58><== ALWAYS TAKEN
break;
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
rtems_bdbuf_discard_buffer_after_access (bd);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_6);
4dd20: 202a 0022 movel %a2@(34),%d0 <== NOT EXECUTED 4dd24: 2f3c 4200 0004 movel #1107296260,%sp@- <== NOT EXECUTED 4dd2a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4dd2c: 4eba de8a jsr %pc@(4bbb8 <rtems_bdbuf_fatal>) <== NOT EXECUTED
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
return RTEMS_SUCCESSFUL;
}
4dd30: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
static rtems_status_code
rtems_bdbuf_check_bd_and_lock_cache (rtems_bdbuf_buffer *bd, const char *kind)
{
if (!bdbuf_cache.initialised)
return RTEMS_NOT_CONFIGURED;
4dd34: 7016 moveq #22,%d0 <== NOT EXECUTED
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
return RTEMS_SUCCESSFUL;
}
4dd36: 4e5e unlk %fp <== NOT EXECUTED 4dd38: 4e75 rts <== NOT EXECUTED 4dd3a: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
rtems_bdbuf_check_bd_and_lock_cache (rtems_bdbuf_buffer *bd, const char *kind)
{
if (!bdbuf_cache.initialised)
return RTEMS_NOT_CONFIGURED;
if (bd == NULL)
return RTEMS_INVALID_ADDRESS;
4dd3e: 7009 moveq #9,%d0 <== NOT EXECUTED
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
return RTEMS_SUCCESSFUL;
}
4dd40: 4e5e unlk %fp <== NOT EXECUTED 4dd42: 4e75 rts <== NOT EXECUTED
case RTEMS_BDBUF_STATE_ACCESS_EMPTY:
case RTEMS_BDBUF_STATE_ACCESS_MODIFIED:
rtems_bdbuf_add_to_modified_list_after_access (bd);
break;
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
rtems_bdbuf_discard_buffer_after_access (bd);
4dd44: 2f0a movel %a2,%sp@- 4dd46: 4eba e78e jsr %pc@(4c4d6 <rtems_bdbuf_discard_buffer_after_access>)
break;
4dd4a: 588f addql #4,%sp
}
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
4dd4c: 4eba dfca jsr %pc@(4bd18 <rtems_bdbuf_unlock_cache>)
return RTEMS_SUCCESSFUL;
4dd50: 4280 clrl %d0
}
4dd52: 246e fffc moveal %fp@(-4),%a2 4dd56: 4e5e unlk %fp 4dd58: 4e75 rts
switch (bd->state)
{
case RTEMS_BDBUF_STATE_ACCESS_CACHED:
case RTEMS_BDBUF_STATE_ACCESS_EMPTY:
case RTEMS_BDBUF_STATE_ACCESS_MODIFIED:
rtems_bdbuf_add_to_modified_list_after_access (bd);
4dd5a: 2f0a movel %a2,%sp@- 4dd5c: 4eba e248 jsr %pc@(4bfa6 <rtems_bdbuf_add_to_modified_list_after_access>)
break;
4dd60: 588f addql #4,%sp
}
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
4dd62: 4eba dfb4 jsr %pc@(4bd18 <rtems_bdbuf_unlock_cache>)
return RTEMS_SUCCESSFUL;
4dd66: 4280 clrl %d0 4dd68: 60e8 bras 4dd52 <rtems_bdbuf_release_modified+0x66>
0004c15c <rtems_bdbuf_remove_from_tree>:
return bdbuf_cache.buffer_waiters.count;
}
static void
rtems_bdbuf_remove_from_tree (rtems_bdbuf_buffer *bd)
{
4c15c: 4e56 ff58 linkw %fp,#-168 4c160: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
rtems_bdbuf_buffer* buf_stack[RTEMS_BDBUF_AVL_MAX_HEIGHT];
rtems_bdbuf_buffer** buf_prev = buf_stack;
bool modified = false;
memset (buf_stack, 0, sizeof(buf_stack));
4c164: 4878 0080 pea 80 <DBL_MANT_DIG+0x4b> 4c168: 2a0e movel %fp,%d5 4c16a: 0685 ffff ff80 addil #-128,%d5
return bdbuf_cache.buffer_waiters.count;
}
static void
rtems_bdbuf_remove_from_tree (rtems_bdbuf_buffer *bd)
{
4c170: 266e 0008 moveal %fp@(8),%a3
rtems_bdbuf_buffer* buf_stack[RTEMS_BDBUF_AVL_MAX_HEIGHT];
rtems_bdbuf_buffer** buf_prev = buf_stack;
bool modified = false;
memset (buf_stack, 0, sizeof(buf_stack));
4c174: 42a7 clrl %sp@-
static int
rtems_bdbuf_avl_remove(rtems_bdbuf_buffer** root,
const rtems_bdbuf_buffer* node)
{
dev_t dev = node->dev;
rtems_blkdev_bnum block = node->block;
4c176: 282b 001a movel %a3@(26),%d4
rtems_bdbuf_buffer* p = *root;
4c17a: 2479 0006 4650 moveal 64650 <bdbuf_cache+0x3c>,%a2
rtems_bdbuf_buffer* buf_stack[RTEMS_BDBUF_AVL_MAX_HEIGHT];
rtems_bdbuf_buffer** buf_prev = buf_stack;
bool modified = false;
memset (buf_stack, 0, sizeof(buf_stack));
4c180: 2f05 movel %d5,%sp@-
*/
static int
rtems_bdbuf_avl_remove(rtems_bdbuf_buffer** root,
const rtems_bdbuf_buffer* node)
{
dev_t dev = node->dev;
4c182: 242b 0012 movel %a3@(18),%d2 4c186: 262b 0016 movel %a3@(22),%d3
rtems_bdbuf_buffer* buf_stack[RTEMS_BDBUF_AVL_MAX_HEIGHT];
rtems_bdbuf_buffer** buf_prev = buf_stack;
bool modified = false;
memset (buf_stack, 0, sizeof(buf_stack));
4c18a: 4eb9 0005 3a14 jsr 53a14 <memset>
while (p != NULL)
4c190: 4fef 000c lea %sp@(12),%sp 4c194: 4a8a tstl %a2
4c196: 6732 beqs 4c1ca <rtems_bdbuf_remove_from_tree+0x6e><== NEVER TAKEN
4c198: 2045 moveal %d5,%a0 4c19a: 2248 moveal %a0,%a1
{
*buf_prev++ = p;
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
4c19c: 202a 0012 movel %a2@(18),%d0 4c1a0: 222a 0016 movel %a2@(22),%d1 4c1a4: 2c02 movel %d2,%d6 4c1a6: 2e03 movel %d3,%d7
memset (buf_stack, 0, sizeof(buf_stack));
while (p != NULL)
{
*buf_prev++ = p;
4c1a8: 20ca movel %a2,%a0@+
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
4c1aa: 9e81 subl %d1,%d7 4c1ac: 9d80 subxl %d0,%d6 4c1ae: 6200 0114 bhiw 4c2c4 <rtems_bdbuf_remove_from_tree+0x168> 4c1b2: 2c02 movel %d2,%d6 4c1b4: 2e03 movel %d3,%d7 4c1b6: 9e81 subl %d1,%d7 4c1b8: 9d80 subxl %d0,%d6
4c1ba: 671e beqs 4c1da <rtems_bdbuf_remove_from_tree+0x7e><== ALWAYS TAKEN
p->avl.cache = 1;
p = p->avl.right;
}
else if ((p->dev != dev) || (p->block != block))
{
p->avl.cache = -1;
4c1bc: 50c0 st %d0 4c1be: 1540 0010 moveb %d0,%a2@(16)
p = p->avl.left;
4c1c2: 246a 0008 moveal %a2@(8),%a2
bool modified = false;
memset (buf_stack, 0, sizeof(buf_stack));
while (p != NULL)
4c1c6: 4a8a tstl %a2
4c1c8: 66d0 bnes 4c19a <rtems_bdbuf_remove_from_tree+0x3e><== ALWAYS TAKEN
static void
rtems_bdbuf_remove_from_tree (rtems_bdbuf_buffer *bd)
{
if (rtems_bdbuf_avl_remove (&bdbuf_cache.tree, bd) != 0)
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_TREE_RM);
4c1ca: 202b 0022 movel %a3@(34),%d0 <== NOT EXECUTED 4c1ce: 2f3c 4200 0009 movel #1107296265,%sp@- <== NOT EXECUTED 4c1d4: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c1d6: 4eba f9e0 jsr %pc@(4bbb8 <rtems_bdbuf_fatal>) <== NOT EXECUTED
while (p != NULL)
{
*buf_prev++ = p;
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
4c1da: 202a 001a movel %a2@(26),%d0 4c1de: b084 cmpl %d4,%d0 4c1e0: 6500 00e2 bcsw 4c2c4 <rtems_bdbuf_remove_from_tree+0x168>
{
p->avl.cache = 1;
p = p->avl.right;
}
else if ((p->dev != dev) || (p->block != block))
4c1e4: 66d6 bnes 4c1bc <rtems_bdbuf_remove_from_tree+0x60>
}
q = p;
buf_prev--;
if (buf_prev > buf_stack)
4c1e6: ba89 cmpl %a1,%d5 4c1e8: 6500 01f2 bcsw 4c3dc <rtems_bdbuf_remove_from_tree+0x280>
{
p = NULL;
}
/* at this moment q - is a node to delete, p is q's parent */
if (q->avl.right == NULL)
4c1ec: 2a6a 000c moveal %a2@(12),%a5
{
p = *(buf_prev - 1);
}
else
{
p = NULL;
4c1f0: 4282 clrl %d2
}
/* at this moment q - is a node to delete, p is q's parent */
if (q->avl.right == NULL)
4c1f2: 4a8d tstl %a5 4c1f4: 6700 01f4 beqw 4c3ea <rtems_bdbuf_remove_from_tree+0x28e>
{
rtems_bdbuf_buffer **t;
r = q->avl.right;
if (r->avl.left == NULL)
4c1f8: 266d 0008 moveal %a5@(8),%a3 4c1fc: 4a8b tstl %a3 4c1fe: 6700 027a beqw 4c47a <rtems_bdbuf_remove_from_tree+0x31e>
{
r->avl.left = q->avl.left;
r->avl.bal = q->avl.bal;
r->avl.cache = 1;
*buf_prev++ = q = r;
4c202: 2208 movel %a0,%d1
{
rtems_bdbuf_buffer **t;
r = q->avl.right;
if (r->avl.left == NULL)
4c204: 284d moveal %a5,%a4
t = buf_prev++;
s = r;
while (s->avl.left != NULL)
{
*buf_prev++ = r = s;
4c206: 2241 moveal %d1,%a1
s = r->avl.left;
r->avl.cache = -1;
4c208: 50c7 st %d7
t = buf_prev++;
s = r;
while (s->avl.left != NULL)
{
*buf_prev++ = r = s;
4c20a: 22cc movel %a4,%a1@+
else
{
t = buf_prev++;
s = r;
while (s->avl.left != NULL)
4c20c: 202b 0008 movel %a3@(8),%d0
{
*buf_prev++ = r = s;
4c210: 2209 movel %a1,%d1
s = r->avl.left;
r->avl.cache = -1;
4c212: 1947 0010 moveb %d7,%a4@(16)
else
{
t = buf_prev++;
s = r;
while (s->avl.left != NULL)
4c216: 4a80 tstl %d0
4c218: 6718 beqs 4c232 <rtems_bdbuf_remove_from_tree+0xd6>
4c21a: 284b moveal %a3,%a4
{
*buf_prev++ = r = s;
4c21c: 2241 moveal %d1,%a1
else
{
t = buf_prev++;
s = r;
while (s->avl.left != NULL)
4c21e: 2640 moveal %d0,%a3
{
*buf_prev++ = r = s;
s = r->avl.left;
r->avl.cache = -1;
4c220: 50c7 st %d7
t = buf_prev++;
s = r;
while (s->avl.left != NULL)
{
*buf_prev++ = r = s;
4c222: 22cc movel %a4,%a1@+
else
{
t = buf_prev++;
s = r;
while (s->avl.left != NULL)
4c224: 202b 0008 movel %a3@(8),%d0
{
*buf_prev++ = r = s;
4c228: 2209 movel %a1,%d1
s = r->avl.left;
r->avl.cache = -1;
4c22a: 1947 0010 moveb %d7,%a4@(16)
else
{
t = buf_prev++;
s = r;
while (s->avl.left != NULL)
4c22e: 4a80 tstl %d0
4c230: 66e8 bnes 4c21a <rtems_bdbuf_remove_from_tree+0xbe>
r->avl.left = s->avl.right;
s->avl.right = q->avl.right;
s->avl.bal = q->avl.bal;
s->avl.cache = 1;
*t = q = s;
4c232: 214b fffc movel %a3,%a0@(-4)
*buf_prev++ = r = s;
s = r->avl.left;
r->avl.cache = -1;
}
s->avl.left = q->avl.left;
4c236: 276a 0008 0008 movel %a2@(8),%a3@(8)
r->avl.left = s->avl.right;
4c23c: 296b 000c 0008 movel %a3@(12),%a4@(8)
s->avl.right = q->avl.right;
s->avl.bal = q->avl.bal;
s->avl.cache = 1;
4c242: 7001 moveq #1,%d0
}
s->avl.left = q->avl.left;
r->avl.left = s->avl.right;
s->avl.right = q->avl.right;
s->avl.bal = q->avl.bal;
4c244: 176a 0011 0011 moveb %a2@(17),%a3@(17)
r->avl.cache = -1;
}
s->avl.left = q->avl.left;
r->avl.left = s->avl.right;
s->avl.right = q->avl.right;
4c24a: 274d 000c movel %a5,%a3@(12)
s->avl.bal = q->avl.bal;
s->avl.cache = 1;
4c24e: 1740 0010 moveb %d0,%a3@(16)
*t = q = s;
}
}
if (p != NULL)
4c252: 4a82 tstl %d2 4c254: 6700 01aa beqw 4c400 <rtems_bdbuf_remove_from_tree+0x2a4>
{
if (p->avl.cache == -1)
4c258: 2042 moveal %d2,%a0 4c25a: 72ff moveq #-1,%d1 4c25c: 1028 0010 moveb %a0@(16),%d0 4c260: 49c0 extbl %d0 4c262: b280 cmpl %d0,%d1 4c264: 6700 01c4 beqw 4c42a <rtems_bdbuf_remove_from_tree+0x2ce>
{
p->avl.left = q;
}
else
{
p->avl.right = q;
4c268: 2042 moveal %d2,%a0 4c26a: 214b 000c movel %a3,%a0@(12)
modified = true;
while (modified)
{
if (buf_prev > buf_stack)
4c26e: ba89 cmpl %a1,%d5
4c270: 6448 bccs 4c2ba <rtems_bdbuf_remove_from_tree+0x15e>
{
return bdbuf_cache.buffer_waiters.count;
}
static void
rtems_bdbuf_remove_from_tree (rtems_bdbuf_buffer *bd)
4c272: 7003 moveq #3,%d0 4c274: 9085 subl %d5,%d0 4c276: 2a00 movel %d0,%d5 4c278: 72fc moveq #-4,%d1
p->avl.right = q;
}
}
else
{
*root = q;
4c27a: 2061 moveal %a1@-,%a0
{
return bdbuf_cache.buffer_waiters.count;
}
static void
rtems_bdbuf_remove_from_tree (rtems_bdbuf_buffer *bd)
4c27c: da89 addl %a1,%d5 4c27e: 2649 moveal %a1,%a3 4c280: 1028 0010 moveb %a0@(16),%d0 4c284: ca81 andl %d1,%d5 4c286: 49c0 extbl %d0 4c288: 97c5 subal %d5,%a3
else
{
break;
}
if (p->avl.cache == -1)
4c28a: 74ff moveq #-1,%d2 4c28c: b480 cmpl %d0,%d2
4c28e: 6770 beqs 4c300 <rtems_bdbuf_remove_from_tree+0x1a4>
}
}
else
{
/* rebalance right branch */
switch (p->avl.bal)
4c290: 1028 0011 moveb %a0@(17),%d0
4c294: 6642 bnes 4c2d8 <rtems_bdbuf_remove_from_tree+0x17c>
case +1:
p->avl.bal = 0;
break;
case 0:
p->avl.bal = -1;
4c296: 2448 moveal %a0,%a2 4c298: 50c7 st %d7
modified = false;
4c29a: 4201 clrb %d1
case +1:
p->avl.bal = 0;
break;
case 0:
p->avl.bal = -1;
4c29c: 1147 0011 moveb %d7,%a0@(17)
default:
break;
}
}
if (buf_prev > buf_stack)
4c2a0: b7c9 cmpal %a1,%a3
4c2a2: 674c beqs 4c2f0 <rtems_bdbuf_remove_from_tree+0x194>
{
q = *(buf_prev - 1);
4c2a4: 2061 moveal %a1@-,%a0
if (q->avl.cache == -1)
4c2a6: 74ff moveq #-1,%d2 4c2a8: 1028 0010 moveb %a0@(16),%d0 4c2ac: 49c0 extbl %d0 4c2ae: b480 cmpl %d0,%d2
4c2b0: 6760 beqs 4c312 <rtems_bdbuf_remove_from_tree+0x1b6>
{
q->avl.left = p;
}
else
{
q->avl.right = p;
4c2b2: 214a 000c movel %a2,%a0@(12)
*root = q;
}
modified = true;
while (modified)
4c2b6: 4a01 tstb %d1
4c2b8: 66d0 bnes 4c28a <rtems_bdbuf_remove_from_tree+0x12e>
static void
rtems_bdbuf_remove_from_tree (rtems_bdbuf_buffer *bd)
{
if (rtems_bdbuf_avl_remove (&bdbuf_cache.tree, bd) != 0)
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_TREE_RM);
}
4c2ba: 4cee 3cfc ff58 moveml %fp@(-168),%d2-%d7/%a2-%a5 4c2c0: 4e5e unlk %fp 4c2c2: 4e75 rts
{
*buf_prev++ = p;
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
{
p->avl.cache = 1;
4c2c4: 7e01 moveq #1,%d7 4c2c6: 1547 0010 moveb %d7,%a2@(16)
p = p->avl.right;
4c2ca: 246a 000c moveal %a2@(12),%a2
bool modified = false;
memset (buf_stack, 0, sizeof(buf_stack));
while (p != NULL)
4c2ce: 4a8a tstl %a2 4c2d0: 6600 fec8 bnew 4c19a <rtems_bdbuf_remove_from_tree+0x3e>
4c2d4: 6000 fef4 braw 4c1ca <rtems_bdbuf_remove_from_tree+0x6e><== NOT EXECUTED
}
}
else
{
/* rebalance right branch */
switch (p->avl.bal)
4c2d8: 49c0 extbl %d0 4c2da: 7201 moveq #1,%d1 4c2dc: b280 cmpl %d0,%d1 4c2de: 6700 0090 beqw 4c370 <rtems_bdbuf_remove_from_tree+0x214> 4c2e2: 74ff moveq #-1,%d2 4c2e4: b480 cmpl %d0,%d2
4c2e6: 6736 beqs 4c31e <rtems_bdbuf_remove_from_tree+0x1c2><== ALWAYS TAKEN
4c2e8: 2448 moveal %a0,%a2 <== NOT EXECUTED 4c2ea: 7201 moveq #1,%d1 <== NOT EXECUTED
default:
break;
}
}
if (buf_prev > buf_stack)
4c2ec: b7c9 cmpal %a1,%a3 <== NOT EXECUTED 4c2ee: 66b4 bnes 4c2a4 <rtems_bdbuf_remove_from_tree+0x148><== NOT EXECUTED
q->avl.right = p;
}
}
else
{
*root = p;
4c2f0: 23ca 0006 4650 movel %a2,64650 <bdbuf_cache+0x3c>
static void
rtems_bdbuf_remove_from_tree (rtems_bdbuf_buffer *bd)
{
if (rtems_bdbuf_avl_remove (&bdbuf_cache.tree, bd) != 0)
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_TREE_RM);
}
4c2f6: 4cee 3cfc ff58 moveml %fp@(-168),%d2-%d7/%a2-%a5 4c2fc: 4e5e unlk %fp 4c2fe: 4e75 rts
}
if (p->avl.cache == -1)
{
/* rebalance left branch */
switch (p->avl.bal)
4c300: 1028 0011 moveb %a0@(17),%d0
4c304: 6678 bnes 4c37e <rtems_bdbuf_remove_from_tree+0x222>
{
case -1:
p->avl.bal = 0;
break;
case 0:
p->avl.bal = 1;
4c306: 2448 moveal %a0,%a2 4c308: 7001 moveq #1,%d0
modified = false;
4c30a: 4201 clrb %d1
{
case -1:
p->avl.bal = 0;
break;
case 0:
p->avl.bal = 1;
4c30c: 1140 0011 moveb %d0,%a0@(17) 4c310: 608e bras 4c2a0 <rtems_bdbuf_remove_from_tree+0x144>
{
q = *(buf_prev - 1);
if (q->avl.cache == -1)
{
q->avl.left = p;
4c312: 214a 0008 movel %a2,%a0@(8)
*root = q;
}
modified = true;
while (modified)
4c316: 4a01 tstb %d1 4c318: 6600 ff70 bnew 4c28a <rtems_bdbuf_remove_from_tree+0x12e> 4c31c: 609c bras 4c2ba <rtems_bdbuf_remove_from_tree+0x15e>
p->avl.bal = -1;
modified = false;
break;
case -1:
p1 = p->avl.left;
4c31e: 2868 0008 moveal %a0@(8),%a4
if (p1->avl.bal <= 0) /* simple LL-turn */
4c322: 102c 0011 moveb %a4@(17),%d0 4c326: 6f00 0098 blew 4c3c0 <rtems_bdbuf_remove_from_tree+0x264>
}
p = p1;
}
else /* double LR-turn */
{
p2 = p1->avl.right;
4c32a: 246c 000c moveal %a4@(12),%a2
p1->avl.right = p2->avl.left;
p2->avl.left = p1;
p->avl.left = p2->avl.right;
p2->avl.right = p;
if (p2->avl.bal == -1) p->avl.bal = 1; else p->avl.bal = 0;
4c32e: 74ff moveq #-1,%d2
if (p2->avl.bal == +1) p1->avl.bal = -1; else p1->avl.bal = 0;
4c330: 7c01 moveq #1,%d6
p1->avl.right = p2->avl.left;
p2->avl.left = p1;
p->avl.left = p2->avl.right;
p2->avl.right = p;
if (p2->avl.bal == -1) p->avl.bal = 1; else p->avl.bal = 0;
4c332: 102a 0011 moveb %a2@(17),%d0
}
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
4c336: 296a 0008 000c movel %a2@(8),%a4@(12)
p2->avl.left = p1;
p->avl.left = p2->avl.right;
p2->avl.right = p;
if (p2->avl.bal == -1) p->avl.bal = 1; else p->avl.bal = 0;
4c33c: 49c0 extbl %d0 4c33e: b480 cmpl %d0,%d2 4c340: 56c0 sne %d0
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
p2->avl.left = p1;
4c342: 254c 0008 movel %a4,%a2@(8)
p->avl.left = p2->avl.right;
4c346: 216a 000c 0008 movel %a2@(12),%a0@(8)
p2->avl.right = p;
if (p2->avl.bal == -1) p->avl.bal = 1; else p->avl.bal = 0;
4c34c: 5280 addql #1,%d0 4c34e: 1140 0011 moveb %d0,%a0@(17)
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
p2->avl.left = p1;
p->avl.left = p2->avl.right;
p2->avl.right = p;
4c352: 2548 000c movel %a0,%a2@(12)
if (p2->avl.bal == -1) p->avl.bal = 1; else p->avl.bal = 0;
if (p2->avl.bal == +1) p1->avl.bal = -1; else p1->avl.bal = 0;
4c356: 102a 0011 moveb %a2@(17),%d0
p = p2;
p2->avl.bal = 0;
4c35a: 4207 clrb %d7
p2->avl.left = p1;
p->avl.left = p2->avl.right;
p2->avl.right = p;
if (p2->avl.bal == -1) p->avl.bal = 1; else p->avl.bal = 0;
if (p2->avl.bal == +1) p1->avl.bal = -1; else p1->avl.bal = 0;
4c35c: 49c0 extbl %d0 4c35e: bc80 cmpl %d0,%d6 4c360: 57c0 seq %d0
p = p2;
p2->avl.bal = 0;
4c362: 7201 moveq #1,%d1
p2->avl.left = p1;
p->avl.left = p2->avl.right;
p2->avl.right = p;
if (p2->avl.bal == -1) p->avl.bal = 1; else p->avl.bal = 0;
if (p2->avl.bal == +1) p1->avl.bal = -1; else p1->avl.bal = 0;
4c364: 1940 0011 moveb %d0,%a4@(17)
p = p2;
p2->avl.bal = 0;
4c368: 1547 0011 moveb %d7,%a2@(17) 4c36c: 6000 ff32 braw 4c2a0 <rtems_bdbuf_remove_from_tree+0x144>
{
/* rebalance right branch */
switch (p->avl.bal)
{
case +1:
p->avl.bal = 0;
4c370: 2448 moveal %a0,%a2 4c372: 4206 clrb %d6 4c374: 7201 moveq #1,%d1 4c376: 1146 0011 moveb %d6,%a0@(17) 4c37a: 6000 ff24 braw 4c2a0 <rtems_bdbuf_remove_from_tree+0x144>
}
if (p->avl.cache == -1)
{
/* rebalance left branch */
switch (p->avl.bal)
4c37e: 49c0 extbl %d0 4c380: 7c01 moveq #1,%d6 4c382: bc80 cmpl %d0,%d6
4c384: 6714 beqs 4c39a <rtems_bdbuf_remove_from_tree+0x23e>
{
case -1:
p->avl.bal = 0;
4c386: 2448 moveal %a0,%a2
}
if (p->avl.cache == -1)
{
/* rebalance left branch */
switch (p->avl.bal)
4c388: b480 cmpl %d0,%d2 4c38a: 6600 ff5e bnew 4c2ea <rtems_bdbuf_remove_from_tree+0x18e>
{
case -1:
p->avl.bal = 0;
4c38e: 4207 clrb %d7 4c390: 7201 moveq #1,%d1 4c392: 1147 0011 moveb %d7,%a0@(17) 4c396: 6000 ff08 braw 4c2a0 <rtems_bdbuf_remove_from_tree+0x144>
p->avl.bal = 1;
modified = false;
break;
case +1:
p1 = p->avl.right;
4c39a: 2468 000c moveal %a0@(12),%a2
if (p1->avl.bal >= 0) /* simple RR-turn */
4c39e: 102a 0011 moveb %a2@(17),%d0 4c3a2: 6d00 008e bltw 4c432 <rtems_bdbuf_remove_from_tree+0x2d6>
{
p->avl.right = p1->avl.left;
4c3a6: 216a 0008 000c movel %a2@(8),%a0@(12)
p1->avl.left = p;
4c3ac: 2548 0008 movel %a0,%a2@(8)
if (p1->avl.bal == 0)
4c3b0: 4a00 tstb %d0
4c3b2: 6656 bnes 4c40a <rtems_bdbuf_remove_from_tree+0x2ae>
{
p1->avl.bal = -1;
4c3b4: 50c1 st %d1 4c3b6: 1541 0011 moveb %d1,%a2@(17)
modified = false;
4c3ba: 4201 clrb %d1 4c3bc: 6000 fee2 braw 4c2a0 <rtems_bdbuf_remove_from_tree+0x144>
{
p->avl.left = p1->avl.right;
p1->avl.right = p;
if (p1->avl.bal == 0)
{
p1->avl.bal = 1;
4c3c0: 244c moveal %a4,%a2
case -1:
p1 = p->avl.left;
if (p1->avl.bal <= 0) /* simple LL-turn */
{
p->avl.left = p1->avl.right;
4c3c2: 216c 000c 0008 movel %a4@(12),%a0@(8)
p1->avl.right = p;
4c3c8: 2948 000c movel %a0,%a4@(12)
if (p1->avl.bal == 0)
4c3cc: 4a00 tstb %d0
4c3ce: 664a bnes 4c41a <rtems_bdbuf_remove_from_tree+0x2be>
{
p1->avl.bal = 1;
4c3d0: 7001 moveq #1,%d0
modified = false;
4c3d2: 4201 clrb %d1
{
p->avl.left = p1->avl.right;
p1->avl.right = p;
if (p1->avl.bal == 0)
{
p1->avl.bal = 1;
4c3d4: 1940 0011 moveb %d0,%a4@(17) 4c3d8: 6000 fec6 braw 4c2a0 <rtems_bdbuf_remove_from_tree+0x144>
q = p;
buf_prev--;
if (buf_prev > buf_stack)
{
p = *(buf_prev - 1);
4c3dc: 2428 fff8 movel %a0@(-8),%d2
{
p = NULL;
}
/* at this moment q - is a node to delete, p is q's parent */
if (q->avl.right == NULL)
4c3e0: 2a6a 000c moveal %a2@(12),%a5 4c3e4: 4a8d tstl %a5 4c3e6: 6600 fe10 bnew 4c1f8 <rtems_bdbuf_remove_from_tree+0x9c>
{
r = q->avl.left;
4c3ea: 266a 0008 moveal %a2@(8),%a3
if (r != NULL)
4c3ee: 4a8b tstl %a3 4c3f0: 6700 fe60 beqw 4c252 <rtems_bdbuf_remove_from_tree+0xf6>
{
r->avl.bal = 0;
4c3f4: 4201 clrb %d1 4c3f6: 1741 0011 moveb %d1,%a3@(17)
*t = q = s;
}
}
if (p != NULL)
4c3fa: 4a82 tstl %d2 4c3fc: 6600 fe5a bnew 4c258 <rtems_bdbuf_remove_from_tree+0xfc>
p->avl.right = q;
}
}
else
{
*root = q;
4c400: 23cb 0006 4650 movel %a3,64650 <bdbuf_cache+0x3c> 4c406: 6000 fe66 braw 4c26e <rtems_bdbuf_remove_from_tree+0x112>
p1->avl.bal = -1;
modified = false;
}
else
{
p->avl.bal = 0;
4c40a: 4202 clrb %d2
p1->avl.bal = 0;
4c40c: 7201 moveq #1,%d1
p1->avl.bal = -1;
modified = false;
}
else
{
p->avl.bal = 0;
4c40e: 1142 0011 moveb %d2,%a0@(17)
p1->avl.bal = 0;
4c412: 1542 0011 moveb %d2,%a2@(17) 4c416: 6000 fe88 braw 4c2a0 <rtems_bdbuf_remove_from_tree+0x144>
p1->avl.bal = 1;
modified = false;
}
else
{
p->avl.bal = 0;
4c41a: 4201 clrb %d1 4c41c: 1141 0011 moveb %d1,%a0@(17)
p1->avl.bal = 0;
4c420: 1941 0011 moveb %d1,%a4@(17) 4c424: 7201 moveq #1,%d1 4c426: 6000 fe78 braw 4c2a0 <rtems_bdbuf_remove_from_tree+0x144>
if (p != NULL)
{
if (p->avl.cache == -1)
{
p->avl.left = q;
4c42a: 214b 0008 movel %a3,%a0@(8) 4c42e: 6000 fe3e braw 4c26e <rtems_bdbuf_remove_from_tree+0x112>
}
p = p1;
}
else /* double RL-turn */
{
p2 = p1->avl.left;
4c432: 286a 0008 moveal %a2@(8),%a4
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
p->avl.right = p2->avl.left;
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
4c436: 7c01 moveq #1,%d6
if (p2->avl.bal == -1) p1->avl.bal = 1; else p1->avl.bal = 0;
4c438: 7eff moveq #-1,%d7
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
p->avl.right = p2->avl.left;
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
4c43a: 102c 0011 moveb %a4@(17),%d0
}
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
4c43e: 256c 000c 0008 movel %a4@(12),%a2@(8)
p2->avl.right = p1;
p->avl.right = p2->avl.left;
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
4c444: 49c0 extbl %d0 4c446: bc80 cmpl %d0,%d6 4c448: 57c0 seq %d0
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
4c44a: 294a 000c movel %a2,%a4@(12)
p->avl.right = p2->avl.left;
4c44e: 216c 0008 000c movel %a4@(8),%a0@(12)
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
4c454: 1140 0011 moveb %d0,%a0@(17)
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
p->avl.right = p2->avl.left;
p2->avl.left = p;
4c458: 2948 0008 movel %a0,%a4@(8)
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
if (p2->avl.bal == -1) p1->avl.bal = 1; else p1->avl.bal = 0;
4c45c: 102c 0011 moveb %a4@(17),%d0
p = p2;
p2->avl.bal = 0;
4c460: 7201 moveq #1,%d1
p2->avl.right = p1;
p->avl.right = p2->avl.left;
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
if (p2->avl.bal == -1) p1->avl.bal = 1; else p1->avl.bal = 0;
4c462: 49c0 extbl %d0 4c464: be80 cmpl %d0,%d7 4c466: 56c0 sne %d0 4c468: 5280 addql #1,%d0 4c46a: 1540 0011 moveb %d0,%a2@(17)
p = p2;
p2->avl.bal = 0;
4c46e: 4200 clrb %d0 4c470: 244c moveal %a4,%a2 4c472: 1940 0011 moveb %d0,%a4@(17) 4c476: 6000 fe28 braw 4c2a0 <rtems_bdbuf_remove_from_tree+0x144>
if (r->avl.left == NULL)
{
r->avl.left = q->avl.left;
r->avl.bal = q->avl.bal;
r->avl.cache = 1;
*buf_prev++ = q = r;
4c47a: 214d fffc movel %a5,%a0@(-4) 4c47e: 2248 moveal %a0,%a1 4c480: 264d moveal %a5,%a3
r = q->avl.right;
if (r->avl.left == NULL)
{
r->avl.left = q->avl.left;
4c482: 2b6a 0008 0008 movel %a2@(8),%a5@(8)
r->avl.bal = q->avl.bal;
r->avl.cache = 1;
4c488: 7c01 moveq #1,%d6
r = q->avl.right;
if (r->avl.left == NULL)
{
r->avl.left = q->avl.left;
r->avl.bal = q->avl.bal;
4c48a: 1b6a 0011 0011 moveb %a2@(17),%a5@(17)
r->avl.cache = 1;
4c490: 1b46 0010 moveb %d6,%a5@(16) 4c494: 6000 fdbc braw 4c252 <rtems_bdbuf_remove_from_tree+0xf6>
0004c498 <rtems_bdbuf_remove_from_tree_and_lru_list>:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_TREE_RM);
}
static void
rtems_bdbuf_remove_from_tree_and_lru_list (rtems_bdbuf_buffer *bd)
{
4c498: 4e56 0000 linkw %fp,#0 4c49c: 2f0a movel %a2,%sp@- 4c49e: 246e 0008 moveal %fp@(8),%a2
switch (bd->state)
4c4a2: 202a 0022 movel %a2@(34),%d0
4c4a6: 671e beqs 4c4c6 <rtems_bdbuf_remove_from_tree_and_lru_list+0x2e>
4c4a8: 7202 moveq #2,%d1 4c4aa: b280 cmpl %d0,%d1
4c4ac: 6710 beqs 4c4be <rtems_bdbuf_remove_from_tree_and_lru_list+0x26><== ALWAYS TAKEN
break;
case RTEMS_BDBUF_STATE_CACHED:
rtems_bdbuf_remove_from_tree (bd);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_10);
4c4ae: 202a 0022 movel %a2@(34),%d0 <== NOT EXECUTED 4c4b2: 2f3c 4200 0008 movel #1107296264,%sp@- <== NOT EXECUTED 4c4b8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c4ba: 4eba f6fc jsr %pc@(4bbb8 <rtems_bdbuf_fatal>) <== NOT EXECUTED
switch (bd->state)
{
case RTEMS_BDBUF_STATE_FREE:
break;
case RTEMS_BDBUF_STATE_CACHED:
rtems_bdbuf_remove_from_tree (bd);
4c4be: 2f0a movel %a2,%sp@- 4c4c0: 4eba fc9a jsr %pc@(4c15c <rtems_bdbuf_remove_from_tree>)
break;
4c4c4: 588f addql #4,%sp
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
4c4c6: 2d4a 0008 movel %a2,%fp@(8)
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_10);
}
rtems_chain_extract (&bd->link);
}
4c4ca: 246e fffc moveal %fp@(-4),%a2 4c4ce: 4e5e unlk %fp 4c4d0: 4ef9 0004 890c jmp 4890c <_Chain_Extract>
0004be46 <rtems_bdbuf_restore_preemption>:
return prev_mode;
}
static void
rtems_bdbuf_restore_preemption (rtems_mode prev_mode)
{
4be46: 4e56 0000 linkw %fp,#0
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_task_mode (prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode);
4be4a: 486e 0008 pea %fp@(8) 4be4e: 2f3c 0000 ffff movel #65535,%sp@- 4be54: 2f2e 0008 movel %fp@(8),%sp@- 4be58: 4eb9 0005 086c jsr 5086c <rtems_task_mode>
if (sc != RTEMS_SUCCESSFUL)
4be5e: 4fef 000c lea %sp@(12),%sp 4be62: 4a80 tstl %d0
4be64: 6604 bnes 4be6a <rtems_bdbuf_restore_preemption+0x24><== NEVER TAKEN
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_PREEMPT_RST);
}
4be66: 4e5e unlk %fp 4be68: 4e75 rts
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_task_mode (prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_PREEMPT_RST);
4be6a: 2f3c 4200 0011 movel #1107296273,%sp@- <== NOT EXECUTED 4be70: 4eb9 0004 83dc jsr 483dc <rtems_fatal_error_occurred> <== NOT EXECUTED
0004bbd0 <rtems_bdbuf_swapout_modified_processing>:
rtems_chain_control* chain,
rtems_chain_control* transfer,
bool sync_active,
bool update_timers,
uint32_t timer_delta)
{
4bbd0: 4e56 ffd4 linkw %fp,#-44 4bbd4: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
4bbd8: 266e 000c moveal %fp@(12),%a3 4bbdc: 286e 0008 moveal %fp@(8),%a4 4bbe0: 2a6e 0010 moveal %fp@(16),%a5 4bbe4: 2a2e 001c movel %fp@(28),%d5 4bbe8: 245b moveal %a3@+,%a2 4bbea: 162e 0017 moveb %fp@(23),%d3 4bbee: 182e 001b moveb %fp@(27),%d4
if (!rtems_chain_is_empty (chain))
4bbf2: b7ca cmpal %a2,%a3
4bbf4: 6764 beqs 4bc5a <rtems_bdbuf_swapout_modified_processing+0x8a>
node = node->next;
/*
* A sync active with no valid dev means sync all.
*/
if (sync_active && (*dev == BDBUF_INVALID_DEV))
4bbf6: 4a03 tstb %d3
4bbf8: 676a beqs 4bc64 <rtems_bdbuf_swapout_modified_processing+0x94> * @param update_timers If true update the timers. * @param timer_delta It update_timers is true update the timers by this * amount. */ static void rtems_bdbuf_swapout_modified_processing (dev_t* dev,
4bbfa: 2014 movel %a4@,%d0 4bbfc: 72ff moveq #-1,%d1 4bbfe: c0ac 0004 andl %a4@(4),%d0 4bc02: b280 cmpl %d0,%d1 4bc04: 57c2 seq %d2 4bc06: 4482 negl %d2
if (sync_active && (*dev == BDBUF_INVALID_DEV))
sync_all = true;
else
sync_all = false;
while (!rtems_chain_is_tail (chain, node))
4bc08: b7ca cmpal %a2,%a3
4bc0a: 674e beqs 4bc5a <rtems_bdbuf_swapout_modified_processing+0x8a>
* or someone waits for a buffer written force all the timers to 0.
*
* @note Lots of sync requests will skew this timer. It should be based
* on TOD to be accurate. Does it matter ?
*/
if (sync_all || (sync_active && (*dev == bd->dev))
4bc0c: 4a02 tstb %d2
4bc0e: 6658 bnes 4bc68 <rtems_bdbuf_swapout_modified_processing+0x98>
4bc10: 4a03 tstb %d3
4bc12: 6714 beqs 4bc28 <rtems_bdbuf_swapout_modified_processing+0x58>
4bc14: 2c14 movel %a4@,%d6 4bc16: 2e2c 0004 movel %a4@(4),%d7 4bc1a: 202a 0012 movel %a2@(18),%d0 4bc1e: 222a 0016 movel %a2@(22),%d1 4bc22: 9e81 subl %d1,%d7 4bc24: 9d80 subxl %d0,%d6
4bc26: 6740 beqs 4bc68 <rtems_bdbuf_swapout_modified_processing+0x98>
}
static bool
rtems_bdbuf_has_buffer_waiters (void)
{
return bdbuf_cache.buffer_waiters.count;
4bc28: 2039 0006 4688 movel 64688 <bdbuf_cache+0x74>,%d0
*
* @note Lots of sync requests will skew this timer. It should be based
* on TOD to be accurate. Does it matter ?
*/
if (sync_all || (sync_active && (*dev == bd->dev))
|| rtems_bdbuf_has_buffer_waiters ())
4bc2e: 6638 bnes 4bc68 <rtems_bdbuf_swapout_modified_processing+0x98>
bd->hold_timer = 0;
if (bd->hold_timer)
4bc30: 202a 002e movel %a2@(46),%d0
4bc34: 673c beqs 4bc72 <rtems_bdbuf_swapout_modified_processing+0xa2><== NEVER TAKEN
{
if (update_timers)
4bc36: 4a04 tstb %d4
4bc38: 6714 beqs 4bc4e <rtems_bdbuf_swapout_modified_processing+0x7e>
{
if (bd->hold_timer > timer_delta)
4bc3a: 202a 002e movel %a2@(46),%d0 4bc3e: ba80 cmpl %d0,%d5 4bc40: 6400 00c6 bccw 4bd08 <rtems_bdbuf_swapout_modified_processing+0x138>
bd->hold_timer -= timer_delta;
4bc44: 202a 002e movel %a2@(46),%d0 4bc48: 9085 subl %d5,%d0 4bc4a: 2540 002e movel %d0,%a2@(46)
else
bd->hold_timer = 0;
}
if (bd->hold_timer)
4bc4e: 202a 002e movel %a2@(46),%d0
4bc52: 671e beqs 4bc72 <rtems_bdbuf_swapout_modified_processing+0xa2><== NEVER TAKEN
node = next_node;
}
else
{
node = node->next;
4bc54: 2452 moveal %a2@,%a2
if (sync_active && (*dev == BDBUF_INVALID_DEV))
sync_all = true;
else
sync_all = false;
while (!rtems_chain_is_tail (chain, node))
4bc56: b7ca cmpal %a2,%a3
4bc58: 66b2 bnes 4bc0c <rtems_bdbuf_swapout_modified_processing+0x3c>
{
node = node->next;
}
}
}
}
4bc5a: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 4bc60: 4e5e unlk %fp 4bc62: 4e75 rts
* A sync active with no valid dev means sync all.
*/
if (sync_active && (*dev == BDBUF_INVALID_DEV))
sync_all = true;
else
sync_all = false;
4bc64: 4202 clrb %d2 4bc66: 60a0 bras 4bc08 <rtems_bdbuf_swapout_modified_processing+0x38>
* @note Lots of sync requests will skew this timer. It should be based
* on TOD to be accurate. Does it matter ?
*/
if (sync_all || (sync_active && (*dev == bd->dev))
|| rtems_bdbuf_has_buffer_waiters ())
bd->hold_timer = 0;
4bc68: 42aa 002e clrl %a2@(46)
if (bd->hold_timer)
4bc6c: 202a 002e movel %a2@(46),%d0
4bc70: 66c4 bnes 4bc36 <rtems_bdbuf_swapout_modified_processing+0x66><== NEVER TAKEN
/*
* This assumes we can set dev_t to BDBUF_INVALID_DEV which is just an
* assumption. Cannot use the transfer list being empty the sync dev
* calls sets the dev to use.
*/
if (*dev == BDBUF_INVALID_DEV)
4bc72: 2014 movel %a4@,%d0 4bc74: 222c 0004 movel %a4@(4),%d1 4bc78: 7cff moveq #-1,%d6 4bc7a: 7eff moveq #-1,%d7 4bc7c: 9e81 subl %d1,%d7 4bc7e: 9d80 subxl %d0,%d6
4bc80: 6754 beqs 4bcd6 <rtems_bdbuf_swapout_modified_processing+0x106>
*dev = bd->dev;
if (bd->dev == *dev)
4bc82: 2c2a 0012 movel %a2@(18),%d6 4bc86: 2e2a 0016 movel %a2@(22),%d7 4bc8a: 9e81 subl %d1,%d7 4bc8c: 9d80 subxl %d0,%d6
4bc8e: 66c4 bnes 4bc54 <rtems_bdbuf_swapout_modified_processing+0x84><== NEVER TAKEN
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4bc90: 7e09 moveq #9,%d7
if (*dev == BDBUF_INVALID_DEV)
*dev = bd->dev;
if (bd->dev == *dev)
{
rtems_chain_node* next_node = node->next;
4bc92: 2212 movel %a2@,%d1
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4bc94: 2547 0022 movel %d7,%a2@(34)
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
4bc98: 2f0a movel %a2,%sp@- 4bc9a: 2d41 fffc movel %d1,%fp@(-4) 4bc9e: 4eb9 0004 890c jsr 4890c <_Chain_Extract>
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_TRANSFER);
rtems_chain_extract (node);
tnode = tnode->previous;
4bca4: 206d 0008 moveal %a5@(8),%a0
while (node && !rtems_chain_is_head (transfer, tnode))
4bca8: 588f addql #4,%sp 4bcaa: 222e fffc movel %fp@(-4),%d1 4bcae: b1cd cmpal %a5,%a0
4bcb0: 6712 beqs 4bcc4 <rtems_bdbuf_swapout_modified_processing+0xf4>
4bcb2: 202a 001a movel %a2@(26),%d0
{
rtems_bdbuf_buffer* tbd = (rtems_bdbuf_buffer*) tnode;
if (bd->block > tbd->block)
4bcb6: b0a8 001a cmpl %a0@(26),%d0
4bcba: 623a bhis 4bcf6 <rtems_bdbuf_swapout_modified_processing+0x126>
{
rtems_chain_insert (tnode, node);
node = NULL;
}
else
tnode = tnode->previous;
4bcbc: 2068 0004 moveal %a0@(4),%a0
rtems_chain_extract (node);
tnode = tnode->previous;
while (node && !rtems_chain_is_head (transfer, tnode))
4bcc0: b1cd cmpal %a5,%a0
4bcc2: 66f2 bnes 4bcb6 <rtems_bdbuf_swapout_modified_processing+0xe6>
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
4bcc4: 2f0a movel %a2,%sp@-
}
if (node)
rtems_chain_prepend (transfer, node);
node = next_node;
4bcc6: 2441 moveal %d1,%a2 4bcc8: 2f0d movel %a5,%sp@- 4bcca: 4eb9 0005 0ce8 jsr 50ce8 <_Chain_Insert> 4bcd0: 508f addql #8,%sp 4bcd2: 6000 ff34 braw 4bc08 <rtems_bdbuf_swapout_modified_processing+0x38>
* This assumes we can set dev_t to BDBUF_INVALID_DEV which is just an
* assumption. Cannot use the transfer list being empty the sync dev
* calls sets the dev to use.
*/
if (*dev == BDBUF_INVALID_DEV)
*dev = bd->dev;
4bcd6: 202a 0012 movel %a2@(18),%d0 4bcda: 222a 0016 movel %a2@(22),%d1 4bcde: 2880 movel %d0,%a4@ 4bce0: 2941 0004 movel %d1,%a4@(4)
if (bd->dev == *dev)
4bce4: 2c2a 0012 movel %a2@(18),%d6 4bce8: 2e2a 0016 movel %a2@(22),%d7 4bcec: 9e81 subl %d1,%d7 4bcee: 9d80 subxl %d0,%d6 4bcf0: 6600 ff62 bnew 4bc54 <rtems_bdbuf_swapout_modified_processing+0x84> 4bcf4: 609a bras 4bc90 <rtems_bdbuf_swapout_modified_processing+0xc0>
RTEMS_INLINE_ROUTINE void rtems_chain_insert(
rtems_chain_node *after_node,
rtems_chain_node *the_node
)
{
_Chain_Insert( after_node, the_node );
4bcf6: 2f0a movel %a2,%sp@-
}
if (node)
rtems_chain_prepend (transfer, node);
node = next_node;
4bcf8: 2441 moveal %d1,%a2 4bcfa: 2f08 movel %a0,%sp@- 4bcfc: 4eb9 0005 0ce8 jsr 50ce8 <_Chain_Insert> 4bd02: 508f addql #8,%sp 4bd04: 6000 ff02 braw 4bc08 <rtems_bdbuf_swapout_modified_processing+0x38>
if (update_timers)
{
if (bd->hold_timer > timer_delta)
bd->hold_timer -= timer_delta;
else
bd->hold_timer = 0;
4bd08: 42aa 002e clrl %a2@(46)
}
if (bd->hold_timer)
4bd0c: 202a 002e movel %a2@(46),%d0 4bd10: 6700 ff60 beqw 4bc72 <rtems_bdbuf_swapout_modified_processing+0xa2>
4bd14: 6000 ff3e braw 4bc54 <rtems_bdbuf_swapout_modified_processing+0x84><== NOT EXECUTED
0004ca8c <rtems_bdbuf_swapout_task>:
* not this.
* @return rtems_task Not used.
*/
static rtems_task
rtems_bdbuf_swapout_task (rtems_task_argument arg)
{
4ca8c: 4e56 ffa0 linkw %fp,#-96 4ca90: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
rtems_bdbuf_swapout_transfer transfer; uint32_t period_in_ticks; const uint32_t period_in_msecs = bdbuf_config.swapout_period;;
4ca94: 2439 0006 1928 movel 61928 <rtems_bdbuf_configuration+0xc>,%d2
uint32_t timer_delta;
transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
4ca9a: 49fa f48a lea %pc@(4bf26 <rtems_bdbuf_swapout_writereq_alloc>),%a4
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
4ca9e: 280e movel %fp,%d4 4caa0: 0684 ffff ffde addil #-34,%d4
rtems_bdbuf_swapout_workers_open (void)
{
rtems_status_code sc;
size_t w;
rtems_bdbuf_lock_cache ();
4caa6: 47fa f0b8 lea %pc@(4bb60 <rtems_bdbuf_lock_cache>),%a3
rtems_bdbuf_swapout_transfer transfer;
uint32_t period_in_ticks;
const uint32_t period_in_msecs = bdbuf_config.swapout_period;;
uint32_t timer_delta;
transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
4caaa: 4e94 jsr %a4@
transfer.syncing = false;
/*
* Localise the period.
*/
period_in_ticks = RTEMS_MICROSECONDS_TO_TICKS (period_in_msecs * 1000);
4caac: 223c 0000 03e8 movel #1000,%d1 4cab2: 4c02 1800 mulsl %d2,%d1 4cab6: 41ee ffe2 lea %fp@(-30),%a0 4caba: 2d41 ffd4 movel %d1,%fp@(-44) 4cabe: 2c2e ffd4 movel %fp@(-44),%d6
rtems_bdbuf_swapout_transfer transfer;
uint32_t period_in_ticks;
const uint32_t period_in_msecs = bdbuf_config.swapout_period;;
uint32_t timer_delta;
transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
4cac2: 2d40 fff4 movel %d0,%fp@(-12)
rtems_chain_initialize_empty (&transfer.bds); transfer.dev = BDBUF_INVALID_DEV;
4cac6: 70ff moveq #-1,%d0 4cac8: 72ff moveq #-1,%d1 4caca: 2d48 ffde movel %a0,%fp@(-34)
transfer.syncing = false;
/*
* Localise the period.
*/
period_in_ticks = RTEMS_MICROSECONDS_TO_TICKS (period_in_msecs * 1000);
4cace: 41f9 0006 3458 lea 63458 <Configuration+0xc>,%a0
const uint32_t period_in_msecs = bdbuf_config.swapout_period;;
uint32_t timer_delta;
transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
rtems_chain_initialize_empty (&transfer.bds);
transfer.dev = BDBUF_INVALID_DEV;
4cad4: 2d40 ffea movel %d0,%fp@(-22) 4cad8: 2d41 ffee movel %d1,%fp@(-18)
transfer.syncing = false;
/*
* Localise the period.
*/
period_in_ticks = RTEMS_MICROSECONDS_TO_TICKS (period_in_msecs * 1000);
4cadc: 4c50 6006 remul %a0@,%d6,%d6
uint32_t timer_delta;
transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
rtems_chain_initialize_empty (&transfer.bds);
transfer.dev = BDBUF_INVALID_DEV;
transfer.syncing = false;
4cae0: 4201 clrb %d1
head->previous = NULL;
4cae2: 42ae ffe2 clrl %fp@(-30) 4cae6: 1d41 fff2 moveb %d1,%fp@(-14)
tail->previous = head;
4caea: 2d44 ffe6 movel %d4,%fp@(-26)
/*
* Localise the period.
*/
period_in_ticks = RTEMS_MICROSECONDS_TO_TICKS (period_in_msecs * 1000);
4caee: 2d46 ffd4 movel %d6,%fp@(-44)
rtems_bdbuf_swapout_workers_open (void)
{
rtems_status_code sc;
size_t w;
rtems_bdbuf_lock_cache ();
4caf2: 4e93 jsr %a3@
for (w = 0; w < bdbuf_config.swapout_workers; w++)
4caf4: 2039 0006 1930 movel 61930 <rtems_bdbuf_configuration+0x14>,%d0 4cafa: 6700 00be beqw 4cbba <rtems_bdbuf_swapout_task+0x12e>
* @param arg A pointer to the global cache data. Use the global variable and * not this. * @return rtems_task Not used. */ static rtems_task rtems_bdbuf_swapout_task (rtems_task_argument arg)
4cafe: 0680 0000 0061 addil #97,%d0 <== NOT EXECUTED 4cb04: 7661 moveq #97,%d3 <== NOT EXECUTED
worker->transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
rtems_chain_initialize_empty (&worker->transfer.bds);
worker->transfer.dev = BDBUF_INVALID_DEV;
sc = rtems_task_create (rtems_build_name('B', 'D', 'o', 'a' + w),
4cb06: 4bf9 0004 7eb8 lea 47eb8 <rtems_task_create>,%a5 <== NOT EXECUTED
(bdbuf_config.swapout_priority ?
4cb0c: 2a39 0006 1924 movel 61924 <rtems_bdbuf_configuration+0x8>,%d5<== NOT EXECUTED
* @param arg A pointer to the global cache data. Use the global variable and * not this. * @return rtems_task Not used. */ static rtems_task rtems_bdbuf_swapout_task (rtems_task_argument arg)
4cb12: 2d40 ffd8 movel %d0,%fp@(-40) <== NOT EXECUTED
for (w = 0; w < bdbuf_config.swapout_workers; w++)
{
rtems_bdbuf_swapout_worker* worker;
worker = malloc (sizeof (rtems_bdbuf_swapout_worker));
4cb16: 4878 002c pea 2c <OPER2+0x18> <== NOT EXECUTED 4cb1a: 4eb9 0004 44d8 jsr 444d8 <malloc> <== NOT EXECUTED
if (!worker)
4cb20: 588f addql #4,%sp <== NOT EXECUTED
for (w = 0; w < bdbuf_config.swapout_workers; w++)
{
rtems_bdbuf_swapout_worker* worker;
worker = malloc (sizeof (rtems_bdbuf_swapout_worker));
4cb22: 2440 moveal %d0,%a2 <== NOT EXECUTED
if (!worker)
4cb24: 4a80 tstl %d0 <== NOT EXECUTED 4cb26: 6700 02a8 beqw 4cdd0 <rtems_bdbuf_swapout_task+0x344> <== 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 );
4cb2a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4cb2c: 4879 0006 461a pea 6461a <bdbuf_cache+0x6> <== NOT EXECUTED
rtems_chain_append (&bdbuf_cache.swapout_workers, &worker->link);
worker->enabled = true;
worker->transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
rtems_chain_initialize_empty (&worker->transfer.bds);
worker->transfer.dev = BDBUF_INVALID_DEV;
4cb32: 7cff moveq #-1,%d6 <== NOT EXECUTED 4cb34: 7eff moveq #-1,%d7 <== NOT EXECUTED 4cb36: 4eb9 0004 88d4 jsr 488d4 <_Chain_Append> <== NOT EXECUTED
worker = malloc (sizeof (rtems_bdbuf_swapout_worker));
if (!worker)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_NOMEM);
rtems_chain_append (&bdbuf_cache.swapout_workers, &worker->link);
worker->enabled = true;
4cb3c: 7001 moveq #1,%d0 <== NOT EXECUTED 4cb3e: 1540 000c moveb %d0,%a2@(12) <== NOT EXECUTED
worker->transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
4cb42: 4e94 jsr %a4@ <== NOT EXECUTED
rtems_chain_initialize_empty (&worker->transfer.bds);
worker->transfer.dev = BDBUF_INVALID_DEV;
sc = rtems_task_create (rtems_build_name('B', 'D', 'o', 'a' + w),
4cb44: 508f addql #8,%sp <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
4cb46: 41ea 0012 lea %a2@(18),%a0 <== NOT EXECUTED
(bdbuf_config.swapout_priority ?
4cb4a: 2205 movel %d5,%d1 <== NOT EXECUTED 4cb4c: 2548 000e movel %a0,%a2@(14) <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
4cb50: 41ea 000e lea %a2@(14),%a0 <== NOT EXECUTED
rtems_chain_append (&bdbuf_cache.swapout_workers, &worker->link);
worker->enabled = true;
worker->transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
rtems_chain_initialize_empty (&worker->transfer.bds);
worker->transfer.dev = BDBUF_INVALID_DEV;
4cb54: 2546 001a movel %d6,%a2@(26) <== NOT EXECUTED 4cb58: 2547 001e movel %d7,%a2@(30) <== NOT EXECUTED 4cb5c: 2548 0016 movel %a0,%a2@(22) <== NOT EXECUTED
sc = rtems_task_create (rtems_build_name('B', 'D', 'o', 'a' + w),
4cb60: 41ea 0008 lea %a2@(8),%a0 <== NOT EXECUTED
if (!worker)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_NOMEM);
rtems_chain_append (&bdbuf_cache.swapout_workers, &worker->link);
worker->enabled = true;
worker->transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
4cb64: 2540 0024 movel %d0,%a2@(36) <== NOT EXECUTED
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
4cb68: 42aa 0012 clrl %a2@(18) <== NOT EXECUTED
rtems_chain_initialize_empty (&worker->transfer.bds);
worker->transfer.dev = BDBUF_INVALID_DEV;
sc = rtems_task_create (rtems_build_name('B', 'D', 'o', 'a' + w),
4cb6c: 4a85 tstl %d5 <== NOT EXECUTED 4cb6e: 6602 bnes 4cb72 <rtems_bdbuf_swapout_task+0xe6> <== NOT EXECUTED 4cb70: 720f moveq #15,%d1 <== NOT EXECUTED 4cb72: 2f08 movel %a0,%sp@- <== NOT EXECUTED 4cb74: 2e03 movel %d3,%d7 <== NOT EXECUTED 4cb76: 42a7 clrl %sp@- <== NOT EXECUTED 4cb78: 4878 0400 pea 400 <D_BIAS+0x2> <== NOT EXECUTED 4cb7c: 4878 2000 pea 2000 <D_MAX_EXP+0x1801> <== NOT EXECUTED 4cb80: 0087 4244 6f00 oril #1111781120,%d7 <== NOT EXECUTED 4cb86: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4cb88: 2f07 movel %d7,%sp@- <== NOT EXECUTED 4cb8a: 4e95 jsr %a5@ <== NOT EXECUTED
RTEMS_BDBUF_SWAPOUT_TASK_PRIORITY_DEFAULT),
SWAPOUT_TASK_STACK_SIZE,
RTEMS_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR,
RTEMS_LOCAL | RTEMS_NO_FLOATING_POINT,
&worker->id);
if (sc != RTEMS_SUCCESSFUL)
4cb8c: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 4cb90: 4a80 tstl %d0 <== NOT EXECUTED 4cb92: 6600 0254 bnew 4cde8 <rtems_bdbuf_swapout_task+0x35c> <== NOT EXECUTED
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WK_CREATE);
sc = rtems_task_start (worker->id,
4cb96: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4cb98: 487a 025a pea %pc@(4cdf4 <rtems_bdbuf_swapout_worker_task>)<== NOT EXECUTED 4cb9c: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 4cba0: 4eb9 0004 8118 jsr 48118 <rtems_task_start> <== NOT EXECUTED
rtems_bdbuf_swapout_worker_task,
(rtems_task_argument) worker);
if (sc != RTEMS_SUCCESSFUL)
4cba6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4cbaa: 4a80 tstl %d0 <== NOT EXECUTED 4cbac: 6600 022e bnew 4cddc <rtems_bdbuf_swapout_task+0x350> <== NOT EXECUTED
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WK_START);
4cbb0: 5283 addql #1,%d3 <== NOT EXECUTED
rtems_status_code sc;
size_t w;
rtems_bdbuf_lock_cache ();
for (w = 0; w < bdbuf_config.swapout_workers; w++)
4cbb2: b6ae ffd8 cmpl %fp@(-40),%d3 <== NOT EXECUTED 4cbb6: 6600 ff5e bnew 4cb16 <rtems_bdbuf_swapout_task+0x8a> <== NOT EXECUTED
(rtems_task_argument) worker);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WK_START);
}
rtems_bdbuf_unlock_cache ();
4cbba: 49fa f15c lea %pc@(4bd18 <rtems_bdbuf_unlock_cache>),%a4 4cbbe: 45fa f010 lea %pc@(4bbd0 <rtems_bdbuf_swapout_modified_processing>),%a2
*/
if (!rtems_chain_is_empty (&transfer->bds))
{
if (worker)
{
rtems_status_code sc = rtems_event_send (worker->id,
4cbc2: 4bf9 0004 77a0 lea 477a0 <rtems_event_send>,%a5
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
4cbc8: 2a3c 0004 8934 movel #297268,%d5
(rtems_task_argument) worker);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WK_START);
}
rtems_bdbuf_unlock_cache ();
4cbce: 4e94 jsr %a4@
/*
* Create the worker threads.
*/
rtems_bdbuf_swapout_workers_open ();
while (bdbuf_cache.swapout_enabled)
4cbd0: 1039 0006 4618 moveb 64618 <bdbuf_cache+0x4>,%d0 4cbd6: 6700 019c beqw 4cd74 <rtems_bdbuf_swapout_task+0x2e8>
rtems_bdbuf_swapout_transfer* transfer)
{
rtems_bdbuf_swapout_worker* worker;
bool transfered_buffers = false;
rtems_bdbuf_lock_cache ();
4cbda: 4e93 jsr %a3@
/*
* Create the worker threads.
*/
rtems_bdbuf_swapout_workers_open ();
while (bdbuf_cache.swapout_enabled)
4cbdc: 7601 moveq #1,%d3
* here. We do not know the worker is the last in a sequence of sync writes * until after we have it running so we do not know to tell it to release the * lock. The simplest solution is to get the main swap out task perform all * sync operations. */ if (bdbuf_cache.sync_active)
4cbde: 1039 0006 4642 moveb 64642 <bdbuf_cache+0x2e>,%d0
/*
* Extact all the buffers we find for a specific device. The device is
* the first one we find on a modified list. Process the sync queue of
* buffers first.
*/
if (rtems_bdbuf_swapout_processing (timer_delta,
4cbe4: 0283 0000 00ff andil #255,%d3
* here. We do not know the worker is the last in a sequence of sync writes * until after we have it running so we do not know to tell it to release the * lock. The simplest solution is to get the main swap out task perform all * sync operations. */ if (bdbuf_cache.sync_active)
4cbea: 4a00 tstb %d0 4cbec: 6700 00ec beqw 4ccda <rtems_bdbuf_swapout_task+0x24e>
worker = NULL;
4cbf0: 93c9 subal %a1,%a1
/*
* Extact all the buffers we find for a specific device. The device is
* the first one we find on a modified list. Process the sync queue of
* buffers first.
*/
if (rtems_bdbuf_swapout_processing (timer_delta,
4cbf2: 2044 moveal %d4,%a0
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
4cbf4: 2008 movel %a0,%d0 4cbf6: 5880 addql #4,%d0
transfer = &worker->transfer;
}
rtems_chain_initialize_empty (&transfer->bds);
transfer->dev = BDBUF_INVALID_DEV;
transfer->syncing = bdbuf_cache.sync_active;
4cbf8: 1239 0006 4642 moveb 64642 <bdbuf_cache+0x2e>,%d1
if (worker)
transfer = &worker->transfer;
}
rtems_chain_initialize_empty (&transfer->bds);
transfer->dev = BDBUF_INVALID_DEV;
4cbfe: 7cff moveq #-1,%d6 4cc00: 7eff moveq #-1,%d7 4cc02: 2080 movel %d0,%a0@
/* * When the sync is for a device limit the sync to that device. If the sync * is for a buffer handle process the devices in the order on the sync * list. This means the dev is BDBUF_INVALID_DEV. */ if (bdbuf_cache.sync_active)
4cc04: 1039 0006 4642 moveb 64642 <bdbuf_cache+0x2e>,%d0
if (worker)
transfer = &worker->transfer;
}
rtems_chain_initialize_empty (&transfer->bds);
transfer->dev = BDBUF_INVALID_DEV;
4cc0a: 2146 000c movel %d6,%a0@(12) 4cc0e: 2147 0010 movel %d7,%a0@(16)
transfer->syncing = bdbuf_cache.sync_active;
4cc12: 1141 0014 moveb %d1,%a0@(20)
head->next = tail;
head->previous = NULL;
4cc16: 42a8 0004 clrl %a0@(4)
tail->previous = head;
4cc1a: 2148 0008 movel %a0,%a0@(8)
/* * When the sync is for a device limit the sync to that device. If the sync * is for a buffer handle process the devices in the order on the sync * list. This means the dev is BDBUF_INVALID_DEV. */ if (bdbuf_cache.sync_active)
4cc1e: 4a00 tstb %d0
4cc20: 6714 beqs 4cc36 <rtems_bdbuf_swapout_task+0x1aa>
transfer->dev = bdbuf_cache.sync_device;
4cc22: 2039 0006 4648 movel 64648 <bdbuf_cache+0x34>,%d0 4cc28: 2239 0006 464c movel 6464c <bdbuf_cache+0x38>,%d1 4cc2e: 2140 000c movel %d0,%a0@(12) 4cc32: 2141 0010 movel %d1,%a0@(16)
/*
* If we have any buffers in the sync queue move them to the modified
* list. The first sync buffer will select the device we use.
*/
rtems_bdbuf_swapout_modified_processing (&transfer->dev,
4cc36: 2f02 movel %d2,%sp@- 4cc38: 2008 movel %a0,%d0 4cc3a: 0680 0000 000c addil #12,%d0 4cc40: 42a7 clrl %sp@- 4cc42: 4878 0001 pea 1 <ADD> 4cc46: 2f08 movel %a0,%sp@- 4cc48: 4879 0006 466c pea 6466c <bdbuf_cache+0x58> 4cc4e: 2d49 ffd0 movel %a1,%fp@(-48) 4cc52: 2f00 movel %d0,%sp@- 4cc54: 2d40 ffc8 movel %d0,%fp@(-56) 4cc58: 2d48 ffcc movel %a0,%fp@(-52) 4cc5c: 4e92 jsr %a2@
timer_delta);
/*
* Process the cache's modified list.
*/
rtems_bdbuf_swapout_modified_processing (&transfer->dev,
4cc5e: 206e ffcc moveal %fp@(-52),%a0 4cc62: 2f02 movel %d2,%sp@- 4cc64: 202e ffc8 movel %fp@(-56),%d0
&bdbuf_cache.modified,
&transfer->bds,
bdbuf_cache.sync_active,
4cc68: 1239 0006 4642 moveb 64642 <bdbuf_cache+0x2e>,%d1
timer_delta);
/*
* Process the cache's modified list.
*/
rtems_bdbuf_swapout_modified_processing (&transfer->dev,
4cc6e: 2f03 movel %d3,%sp@- 4cc70: 0281 0000 00ff andil #255,%d1 4cc76: 2f01 movel %d1,%sp@- 4cc78: 2f08 movel %a0,%sp@- 4cc7a: 4879 0006 4660 pea 64660 <bdbuf_cache+0x4c> 4cc80: 2f00 movel %d0,%sp@- 4cc82: 4e92 jsr %a2@
/* * We have all the buffers that have been modified for this device so the * cache can be unlocked because the state of each buffer has been set to * TRANSFER. */ rtems_bdbuf_unlock_cache ();
4cc84: 4fef 0030 lea %sp@(48),%sp 4cc88: 4e94 jsr %a4@
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
4cc8a: 206e ffcc moveal %fp@(-52),%a0 4cc8e: 2008 movel %a0,%d0 4cc90: 5880 addql #4,%d0
/*
* If there are buffers to transfer to the media transfer them.
*/
if (!rtems_chain_is_empty (&transfer->bds))
4cc92: 226e ffd0 moveal %fp@(-48),%a1 4cc96: b090 cmpl %a0@,%d0 4cc98: 6700 00c0 beqw 4cd5a <rtems_bdbuf_swapout_task+0x2ce>
{
if (worker)
4cc9c: 4a89 tstl %a1 4cc9e: 6700 00c0 beqw 4cd60 <rtems_bdbuf_swapout_task+0x2d4>
{
rtems_status_code sc = rtems_event_send (worker->id,
4cca2: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 4cca6: 2f29 0008 movel %a1@(8),%sp@- <== NOT EXECUTED 4ccaa: 4e95 jsr %a5@ <== NOT EXECUTED
RTEMS_BDBUF_SWAPOUT_SYNC);
if (sc != RTEMS_SUCCESSFUL)
4ccac: 508f addql #8,%sp <== NOT EXECUTED 4ccae: 4a80 tstl %d0 <== NOT EXECUTED 4ccb0: 6600 0112 bnew 4cdc4 <rtems_bdbuf_swapout_task+0x338> <== NOT EXECUTED
else
{
rtems_bdbuf_swapout_write (transfer);
}
transfered_buffers = true;
4ccb4: 7201 moveq #1,%d1 <== NOT EXECUTED
}
if (bdbuf_cache.sync_active && !transfered_buffers)
4ccb6: 1039 0006 4642 moveb 64642 <bdbuf_cache+0x2e>,%d0 4ccbc: 6700 0092 beqw 4cd50 <rtems_bdbuf_swapout_task+0x2c4> 4ccc0: 4a01 tstb %d1
4ccc2: 6732 beqs 4ccf6 <rtems_bdbuf_swapout_task+0x26a>
/*
* Extact all the buffers we find for a specific device. The device is
* the first one we find on a modified list. Process the sync queue of
* buffers first.
*/
if (rtems_bdbuf_swapout_processing (timer_delta,
4ccc4: 4203 clrb %d3
rtems_bdbuf_swapout_transfer* transfer)
{
rtems_bdbuf_swapout_worker* worker;
bool transfered_buffers = false;
rtems_bdbuf_lock_cache ();
4ccc6: 4e93 jsr %a3@
* here. We do not know the worker is the last in a sequence of sync writes * until after we have it running so we do not know to tell it to release the * lock. The simplest solution is to get the main swap out task perform all * sync operations. */ if (bdbuf_cache.sync_active)
4ccc8: 1039 0006 4642 moveb 64642 <bdbuf_cache+0x2e>,%d0
/*
* Extact all the buffers we find for a specific device. The device is
* the first one we find on a modified list. Process the sync queue of
* buffers first.
*/
if (rtems_bdbuf_swapout_processing (timer_delta,
4ccce: 0283 0000 00ff andil #255,%d3
* here. We do not know the worker is the last in a sequence of sync writes * until after we have it running so we do not know to tell it to release the * lock. The simplest solution is to get the main swap out task perform all * sync operations. */ if (bdbuf_cache.sync_active)
4ccd4: 4a00 tstb %d0 4ccd6: 6600 ff18 bnew 4cbf0 <rtems_bdbuf_swapout_task+0x164> 4ccda: 4879 0006 461a pea 6461a <bdbuf_cache+0x6> 4cce0: 2045 moveal %d5,%a0 4cce2: 4e90 jsr %a0@
worker = NULL;
else
{
worker = (rtems_bdbuf_swapout_worker*)
rtems_chain_get (&bdbuf_cache.swapout_workers);
if (worker)
4cce4: 588f addql #4,%sp 4cce6: 2240 moveal %d0,%a1 4cce8: 4a80 tstl %d0 4ccea: 6700 0082 beqw 4cd6e <rtems_bdbuf_swapout_task+0x2e2>
transfer = &worker->transfer;
4ccee: 41e9 000e lea %a1@(14),%a0 <== NOT EXECUTED 4ccf2: 6000 ff00 braw 4cbf4 <rtems_bdbuf_swapout_task+0x168> <== NOT EXECUTED
}
if (bdbuf_cache.sync_active && !transfered_buffers)
{
rtems_id sync_requester;
rtems_bdbuf_lock_cache ();
4ccf6: 4e93 jsr %a3@
sync_requester = bdbuf_cache.sync_requester;
4ccf8: 2639 0006 4644 movel 64644 <bdbuf_cache+0x30>,%d3
bdbuf_cache.sync_active = false;
4ccfe: 4207 clrb %d7 4cd00: 13c7 0006 4642 moveb %d7,64642 <bdbuf_cache+0x2e>
bdbuf_cache.sync_requester = 0;
4cd06: 42b9 0006 4644 clrl 64644 <bdbuf_cache+0x30>
rtems_bdbuf_unlock_cache ();
4cd0c: 4e94 jsr %a4@
if (sync_requester)
4cd0e: 4a83 tstl %d3
4cd10: 6632 bnes 4cd44 <rtems_bdbuf_swapout_task+0x2b8> <== ALWAYS TAKEN
*/
update_timers = false;
}
while (transfered_buffers);
sc = rtems_event_receive (RTEMS_BDBUF_SWAPOUT_SYNC,
4cd12: 486e fffc pea %fp@(-4) 4cd16: 2f2e ffd4 movel %fp@(-44),%sp@- 4cd1a: 42a7 clrl %sp@- 4cd1c: 4878 0004 pea 4 <CONTEXT_ARG> 4cd20: 4eb9 0004 75f4 jsr 475f4 <rtems_event_receive>
RTEMS_EVENT_ALL | RTEMS_WAIT,
period_in_ticks,
&out);
if ((sc != RTEMS_SUCCESSFUL) && (sc != RTEMS_TIMEOUT))
4cd26: 4fef 0010 lea %sp@(16),%sp 4cd2a: 4a80 tstl %d0 4cd2c: 6700 fea2 beqw 4cbd0 <rtems_bdbuf_swapout_task+0x144> 4cd30: 7206 moveq #6,%d1 4cd32: b280 cmpl %d0,%d1 4cd34: 6700 fe9a beqw 4cbd0 <rtems_bdbuf_swapout_task+0x144>
rtems_fatal_error_occurred (BLKDEV_FATAL_BDBUF_SWAPOUT_RE);
4cd38: 2f3c 4200 0018 movel #1107296280,%sp@- <== NOT EXECUTED 4cd3e: 4eb9 0004 83dc jsr 483dc <rtems_fatal_error_occurred> <== NOT EXECUTED
sync_requester = bdbuf_cache.sync_requester;
bdbuf_cache.sync_active = false;
bdbuf_cache.sync_requester = 0;
rtems_bdbuf_unlock_cache ();
if (sync_requester)
rtems_event_send (sync_requester, RTEMS_BDBUF_TRANSFER_SYNC);
4cd44: 4878 0002 pea 2 <DOUBLE_FLOAT> 4cd48: 2f03 movel %d3,%sp@- 4cd4a: 4e95 jsr %a5@ 4cd4c: 508f addql #8,%sp 4cd4e: 60c2 bras 4cd12 <rtems_bdbuf_swapout_task+0x286>
/*
* Extact all the buffers we find for a specific device. The device is
* the first one we find on a modified list. Process the sync queue of
* buffers first.
*/
if (rtems_bdbuf_swapout_processing (timer_delta,
4cd50: 4a01 tstb %d1
4cd52: 67be beqs 4cd12 <rtems_bdbuf_swapout_task+0x286>
4cd54: 4203 clrb %d3 4cd56: 6000 ff6e braw 4ccc6 <rtems_bdbuf_swapout_task+0x23a>
rtems_bdbuf_swapout_processing (unsigned long timer_delta,
bool update_timers,
rtems_bdbuf_swapout_transfer* transfer)
{
rtems_bdbuf_swapout_worker* worker;
bool transfered_buffers = false;
4cd5a: 4201 clrb %d1 4cd5c: 6000 ff58 braw 4ccb6 <rtems_bdbuf_swapout_task+0x22a>
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WAKE);
}
else
{
rtems_bdbuf_swapout_write (transfer);
4cd60: 2f08 movel %a0,%sp@- 4cd62: 4eba fafe jsr %pc@(4c862 <rtems_bdbuf_swapout_write>) 4cd66: 588f addql #4,%sp
}
transfered_buffers = true;
4cd68: 7201 moveq #1,%d1 4cd6a: 6000 ff4a braw 4ccb6 <rtems_bdbuf_swapout_task+0x22a>
/*
* Extact all the buffers we find for a specific device. The device is
* the first one we find on a modified list. Process the sync queue of
* buffers first.
*/
if (rtems_bdbuf_swapout_processing (timer_delta,
4cd6e: 2044 moveal %d4,%a0 4cd70: 6000 fe82 braw 4cbf4 <rtems_bdbuf_swapout_task+0x168>
static void
rtems_bdbuf_swapout_workers_close (void)
{
rtems_chain_node* node;
rtems_bdbuf_lock_cache ();
4cd74: 4e93 jsr %a3@ <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
4cd76: 2479 0006 461a moveal 6461a <bdbuf_cache+0x6>,%a2 <== NOT EXECUTED
node = rtems_chain_first (&bdbuf_cache.swapout_workers);
while (!rtems_chain_is_tail (&bdbuf_cache.swapout_workers, node))
4cd7c: b5fc 0006 461e cmpal #411166,%a2 <== NOT EXECUTED 4cd82: 6722 beqs 4cda6 <rtems_bdbuf_swapout_task+0x31a> <== NOT EXECUTED 4cd84: 47f9 0004 77a0 lea 477a0 <rtems_event_send>,%a3 <== NOT EXECUTED
{
rtems_bdbuf_swapout_worker* worker = (rtems_bdbuf_swapout_worker*) node;
worker->enabled = false;
4cd8a: 4206 clrb %d6 <== NOT EXECUTED 4cd8c: 1546 000c moveb %d6,%a2@(12) <== NOT EXECUTED
rtems_event_send (worker->id, RTEMS_BDBUF_SWAPOUT_SYNC);
4cd90: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 4cd94: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 4cd98: 4e93 jsr %a3@ <== NOT EXECUTED
rtems_bdbuf_purge_major (rtems_device_major_number major)
{
dev_t dev = rtems_filesystem_make_dev_t (major, 0);
rtems_bdbuf_purge (rtems_bdbuf_purge_compare_major, dev);
}
4cd9a: 2452 moveal %a2@,%a2 <== NOT EXECUTED
rtems_chain_node* node;
rtems_bdbuf_lock_cache ();
node = rtems_chain_first (&bdbuf_cache.swapout_workers);
while (!rtems_chain_is_tail (&bdbuf_cache.swapout_workers, node))
4cd9c: 508f addql #8,%sp <== NOT EXECUTED 4cd9e: b5fc 0006 461e cmpal #411166,%a2 <== NOT EXECUTED 4cda4: 66e4 bnes 4cd8a <rtems_bdbuf_swapout_task+0x2fe> <== NOT EXECUTED
worker->enabled = false;
rtems_event_send (worker->id, RTEMS_BDBUF_SWAPOUT_SYNC);
node = rtems_chain_next (node);
}
rtems_bdbuf_unlock_cache ();
4cda6: 4e94 jsr %a4@ <== NOT EXECUTED
rtems_fatal_error_occurred (BLKDEV_FATAL_BDBUF_SWAPOUT_RE);
}
rtems_bdbuf_swapout_workers_close ();
free (transfer.write_req);
4cda8: 2f2e fff4 movel %fp@(-12),%sp@- <== NOT EXECUTED 4cdac: 4eb9 0004 41a8 jsr 441a8 <free> <== NOT EXECUTED
rtems_task_delete (RTEMS_SELF);
4cdb2: 42a7 clrl %sp@- <== NOT EXECUTED 4cdb4: 4eb9 0004 7ffc jsr 47ffc <rtems_task_delete> <== NOT EXECUTED
}
4cdba: 4cee 3cfc ffa0 moveml %fp@(-96),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4cdc0: 4e5e unlk %fp <== NOT EXECUTED 4cdc2: 4e75 rts <== NOT EXECUTED
if (worker)
{
rtems_status_code sc = rtems_event_send (worker->id,
RTEMS_BDBUF_SWAPOUT_SYNC);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WAKE);
4cdc4: 2f3c 4200 0014 movel #1107296276,%sp@- <== NOT EXECUTED 4cdca: 4eb9 0004 83dc jsr 483dc <rtems_fatal_error_occurred> <== NOT EXECUTED
{
rtems_bdbuf_swapout_worker* worker;
worker = malloc (sizeof (rtems_bdbuf_swapout_worker));
if (!worker)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_NOMEM);
4cdd0: 2f3c 4200 0015 movel #1107296277,%sp@- <== NOT EXECUTED 4cdd6: 4eb9 0004 83dc jsr 483dc <rtems_fatal_error_occurred> <== NOT EXECUTED
sc = rtems_task_start (worker->id,
rtems_bdbuf_swapout_worker_task,
(rtems_task_argument) worker);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WK_START);
4cddc: 2f3c 4200 0017 movel #1107296279,%sp@- <== NOT EXECUTED 4cde2: 4eb9 0004 83dc jsr 483dc <rtems_fatal_error_occurred> <== NOT EXECUTED
SWAPOUT_TASK_STACK_SIZE,
RTEMS_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR,
RTEMS_LOCAL | RTEMS_NO_FLOATING_POINT,
&worker->id);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WK_CREATE);
4cde8: 2f3c 4200 0016 movel #1107296278,%sp@- <== NOT EXECUTED 4cdee: 4eb9 0004 83dc jsr 483dc <rtems_fatal_error_occurred> <== NOT EXECUTED
0004cdf4 <rtems_bdbuf_swapout_worker_task>:
* @param arg A pointer to the worker thread's private data.
* @return rtems_task Not used.
*/
static rtems_task
rtems_bdbuf_swapout_worker_task (rtems_task_argument arg)
{
4cdf4: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 4cdf8: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ <== NOT EXECUTED 4cdfc: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
rtems_bdbuf_swapout_worker* worker = (rtems_bdbuf_swapout_worker*) arg;
while (worker->enabled)
4ce00: 102a 000c moveb %a2@(12),%d0 <== NOT EXECUTED 4ce04: 6764 beqs 4ce6a <rtems_bdbuf_swapout_worker_task+0x76><== NOT EXECUTED 4ce06: 240a movel %a2,%d2 <== NOT EXECUTED 4ce08: 283c 0004 bdd4 movel #310740,%d4 <== NOT EXECUTED 4ce0e: 0682 0000 000e addil #14,%d2 <== NOT EXECUTED 4ce14: 4bfa ed4a lea %pc@(4bb60 <rtems_bdbuf_lock_cache>),%a5<== NOT EXECUTED 4ce18: 49f9 0004 88d4 lea 488d4 <_Chain_Append>,%a4 <== NOT EXECUTED 4ce1e: 47fa eef8 lea %pc@(4bd18 <rtems_bdbuf_unlock_cache>),%a3<== NOT EXECUTED 4ce22: 263c 0004 c862 movel #313442,%d3 <== NOT EXECUTED
{
rtems_bdbuf_wait_for_event (RTEMS_BDBUF_SWAPOUT_SYNC);
4ce28: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 4ce2c: 2044 moveal %d4,%a0 <== NOT EXECUTED 4ce2e: 4e90 jsr %a0@ <== NOT EXECUTED
rtems_bdbuf_swapout_write (&worker->transfer);
4ce30: 2043 moveal %d3,%a0 <== NOT EXECUTED 4ce32: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4ce34: 4e90 jsr %a0@ <== NOT EXECUTED
rtems_bdbuf_lock_cache ();
4ce36: 4e95 jsr %a5@ <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
4ce38: 41ea 0012 lea %a2@(18),%a0 <== NOT EXECUTED 4ce3c: 2548 000e movel %a0,%a2@(14) <== NOT EXECUTED
rtems_chain_initialize_empty (&worker->transfer.bds);
worker->transfer.dev = BDBUF_INVALID_DEV;
4ce40: 70ff moveq #-1,%d0 <== NOT EXECUTED 4ce42: 72ff moveq #-1,%d1 <== 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 );
4ce44: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4ce46: 4879 0006 461a pea 6461a <bdbuf_cache+0x6> <== NOT EXECUTED 4ce4c: 2540 001a movel %d0,%a2@(26) <== NOT EXECUTED 4ce50: 2541 001e movel %d1,%a2@(30) <== NOT EXECUTED
head->next = tail;
head->previous = NULL;
4ce54: 42aa 0012 clrl %a2@(18) <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
4ce58: 2542 0016 movel %d2,%a2@(22) <== NOT EXECUTED 4ce5c: 4e94 jsr %a4@ <== NOT EXECUTED
rtems_chain_append (&bdbuf_cache.swapout_workers, &worker->link);
rtems_bdbuf_unlock_cache ();
4ce5e: 4e93 jsr %a3@ <== NOT EXECUTED
static rtems_task
rtems_bdbuf_swapout_worker_task (rtems_task_argument arg)
{
rtems_bdbuf_swapout_worker* worker = (rtems_bdbuf_swapout_worker*) arg;
while (worker->enabled)
4ce60: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4ce64: 102a 000c moveb %a2@(12),%d0 <== NOT EXECUTED 4ce68: 66be bnes 4ce28 <rtems_bdbuf_swapout_worker_task+0x34><== NOT EXECUTED
rtems_chain_append (&bdbuf_cache.swapout_workers, &worker->link);
rtems_bdbuf_unlock_cache ();
}
free (worker->transfer.write_req);
4ce6a: 2f2a 0024 movel %a2@(36),%sp@- <== NOT EXECUTED 4ce6e: 47f9 0004 41a8 lea 441a8 <free>,%a3 <== NOT EXECUTED 4ce74: 4e93 jsr %a3@ <== NOT EXECUTED
free (worker);
4ce76: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4ce78: 4e93 jsr %a3@ <== NOT EXECUTED
rtems_task_delete (RTEMS_SELF);
4ce7a: 508f addql #8,%sp <== NOT EXECUTED 4ce7c: 42ae 0008 clrl %fp@(8) <== NOT EXECUTED
}
4ce80: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 <== NOT EXECUTED 4ce86: 4e5e unlk %fp <== NOT EXECUTED
}
free (worker->transfer.write_req);
free (worker);
rtems_task_delete (RTEMS_SELF);
4ce88: 4ef9 0004 7ffc jmp 47ffc <rtems_task_delete> <== NOT EXECUTED
0004c862 <rtems_bdbuf_swapout_write>:
*
* @param transfer The transfer transaction.
*/
static void
rtems_bdbuf_swapout_write (rtems_bdbuf_swapout_transfer* transfer)
{
4c862: 4e56 ffd8 linkw %fp,#-40 4c866: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4c86a: 246e 0008 moveal %fp@(8),%a2
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
4c86e: 260a movel %a2,%d3 4c870: 5883 addql #4,%d3
printf ("bdbuf:swapout transfer: %08x\n", (unsigned) transfer->dev);
/*
* If there are buffers to transfer to the media transfer them.
*/
if (!rtems_chain_is_empty (&transfer->bds))
4c872: b692 cmpl %a2@,%d3 4c874: 6700 01ae beqw 4ca24 <rtems_bdbuf_swapout_write+0x1c2>
/*
* Obtain the disk device. The cache's mutex has been released to avoid a
* dead lock.
*/
rtems_disk_device *dd = rtems_disk_obtain (transfer->dev);
4c878: 2f2a 0010 movel %a2@(16),%sp@- 4c87c: 2f2a 000c movel %a2@(12),%sp@- 4c880: 4eb9 0004 32a6 jsr 432a6 <rtems_disk_obtain>
if (dd == NULL)
4c886: 508f addql #8,%sp
/*
* Obtain the disk device. The cache's mutex has been released to avoid a
* dead lock.
*/
rtems_disk_device *dd = rtems_disk_obtain (transfer->dev);
4c888: 2640 moveal %d0,%a3
if (dd == NULL)
4c88a: 4a80 tstl %d0 4c88c: 6700 01a0 beqw 4ca2e <rtems_bdbuf_swapout_write+0x1cc>
dd = &null_disk;
bufs_per_bd = dd->block_size / bdbuf_config.buffer_min;
4c890: 2c2b 0020 movel %a3@(32),%d6 4c894: 43f9 0006 193c lea 6193c <rtems_bdbuf_configuration+0x20>,%a1
rtems_bdbuf_purge_major (rtems_device_major_number major)
{
dev_t dev = rtems_filesystem_make_dev_t (major, 0);
rtems_bdbuf_purge (rtems_bdbuf_purge_compare_major, dev);
}
4c89a: 2a0b movel %a3,%d5 4c89c: 280b movel %a3,%d4
{
/*
* The last block number used when the driver only supports
* continuous blocks in a single request.
*/
uint32_t last_block = 0;
4c89e: 4282 clrl %d2 4c8a0: 49f9 0004 8934 lea 48934 <_Chain_Get>,%a4
rtems_bdbuf_purge_major (rtems_device_major_number major)
{
dev_t dev = rtems_filesystem_make_dev_t (major, 0);
rtems_bdbuf_purge (rtems_bdbuf_purge_compare_major, dev);
}
4c8a6: 0685 0000 0028 addil #40,%d5 4c8ac: 5084 addql #8,%d4
rtems_disk_device *dd = rtems_disk_obtain (transfer->dev);
if (dd == NULL)
dd = &null_disk;
bufs_per_bd = dd->block_size / bdbuf_config.buffer_min;
4c8ae: 4c51 6006 remul %a1@,%d6,%d6
* should be possible to make this change with little effect in this
* code. The array that is passed is broken in design and should be
* removed. Merging members of a struct into the first member is
* trouble waiting to happen.
*/
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
4c8b2: 206a 0016 moveal %a2@(22),%a0 4c8b6: 700c moveq #12,%d0
transfer->write_req->bufnum = 0;
4c8b8: 42a8 0010 clrl %a0@(16)
* should be possible to make this change with little effect in this
* code. The array that is passed is broken in design and should be
* removed. Merging members of a struct into the first member is
* trouble waiting to happen.
*/
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
4c8bc: 2140 000c movel %d0,%a0@(12)
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
4c8c0: 2f0a movel %a2,%sp@- 4c8c2: 4e94 jsr %a4@
transfer->write_req->bufnum = 0;
while ((node = rtems_chain_get(&transfer->bds)) != NULL)
4c8c4: 588f addql #4,%sp 4c8c6: 4a80 tstl %d0
4c8c8: 677e beqs 4c948 <rtems_bdbuf_swapout_write+0xe6> <== NEVER TAKEN
printf ("bdbuf:swapout write: bd:%" PRIu32 ", bufnum:%" PRIu32 " mode:%s\n",
bd->block, transfer->write_req->bufnum,
dd->phys_dev->capabilities &
RTEMS_BLKDEV_CAP_MULTISECTOR_CONT ? "MULIT" : "SCAT");
if ((dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_MULTISECTOR_CONT) &&
4c8ca: 206b 0008 moveal %a3@(8),%a0 4c8ce: 7201 moveq #1,%d1 4c8d0: c2a8 000c andl %a0@(12),%d1
transfer->write_req->bufnum &&
4c8d4: 206a 0016 moveal %a2@(22),%a0
printf ("bdbuf:swapout write: bd:%" PRIu32 ", bufnum:%" PRIu32 " mode:%s\n",
bd->block, transfer->write_req->bufnum,
dd->phys_dev->capabilities &
RTEMS_BLKDEV_CAP_MULTISECTOR_CONT ? "MULIT" : "SCAT");
if ((dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_MULTISECTOR_CONT) &&
4c8d8: 6700 00c6 beqw 4c9a0 <rtems_bdbuf_swapout_write+0x13e>
transfer->write_req->bufnum &&
4c8dc: 2228 0010 movel %a0@(16),%d1 <== NOT EXECUTED
printf ("bdbuf:swapout write: bd:%" PRIu32 ", bufnum:%" PRIu32 " mode:%s\n",
bd->block, transfer->write_req->bufnum,
dd->phys_dev->capabilities &
RTEMS_BLKDEV_CAP_MULTISECTOR_CONT ? "MULIT" : "SCAT");
if ((dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_MULTISECTOR_CONT) &&
4c8e0: 6600 00f2 bnew 4c9d4 <rtems_bdbuf_swapout_write+0x172><== NOT EXECUTED 4c8e4: 2240 moveal %d0,%a1 <== NOT EXECUTED
}
else
{
rtems_blkdev_sg_buffer* buf;
buf = &transfer->write_req->bufs[transfer->write_req->bufnum];
transfer->write_req->bufnum++;
4c8e6: 2a41 moveal %d1,%a5 <== NOT EXECUTED 4c8e8: 528d addql #1,%a5 <== NOT EXECUTED
printf ("bdbuf:swapout write: bd:%" PRIu32 ", bufnum:%" PRIu32 " mode:%s\n",
bd->block, transfer->write_req->bufnum,
dd->phys_dev->capabilities &
RTEMS_BLKDEV_CAP_MULTISECTOR_CONT ? "MULIT" : "SCAT");
if ((dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_MULTISECTOR_CONT) &&
4c8ea: 2429 001a movel %a1@(26),%d2 <== NOT EXECUTED
write = true;
}
else
{
rtems_blkdev_sg_buffer* buf;
buf = &transfer->write_req->bufs[transfer->write_req->bufnum];
4c8ee: e989 lsll #4,%d1 <== NOT EXECUTED
transfer->write_req->bufnum++;
4c8f0: 214d 0010 movel %a5,%a0@(16) <== NOT EXECUTED
buf->user = bd;
buf->block = bd->block;
buf->length = dd->block_size;
buf->buffer = bd->buffer;
4c8f4: 2a40 moveal %d0,%a5 <== NOT EXECUTED 4c8f6: 4bed 001e lea %a5@(30),%a5 <== NOT EXECUTED
write = true;
}
else
{
rtems_blkdev_sg_buffer* buf;
buf = &transfer->write_req->bufs[transfer->write_req->bufnum];
4c8fa: 43f0 1818 lea %a0@(00000018,%d1:l),%a1 <== NOT EXECUTED
transfer->write_req->bufnum = 0;
while ((node = rtems_chain_get(&transfer->bds)) != NULL)
{
rtems_bdbuf_buffer* bd = (rtems_bdbuf_buffer*) node;
bool write = false;
4c8fe: 4207 clrb %d7 <== NOT EXECUTED
rtems_blkdev_sg_buffer* buf;
buf = &transfer->write_req->bufs[transfer->write_req->bufnum];
transfer->write_req->bufnum++;
buf->user = bd;
buf->block = bd->block;
buf->length = dd->block_size;
4c900: 236b 0020 0004 movel %a3@(32),%a1@(4) <== NOT EXECUTED
buf->buffer = bd->buffer;
4c906: 2355 0008 movel %a5@,%a1@(8) <== NOT EXECUTED
else
{
rtems_blkdev_sg_buffer* buf;
buf = &transfer->write_req->bufs[transfer->write_req->bufnum];
transfer->write_req->bufnum++;
buf->user = bd;
4c90a: 2340 000c movel %d0,%a1@(12) <== NOT EXECUTED
buf->block = bd->block;
4c90e: 2282 movel %d2,%a1@ <== NOT EXECUTED
/*
* Perform the transfer if there are no more buffers, or the transfer
* size has reached the configured max. value.
*/
if (rtems_chain_is_empty (&transfer->bds) ||
4c910: b692 cmpl %a2@,%d3
4c912: 670c beqs 4c920 <rtems_bdbuf_swapout_write+0xbe>
4c914: 2039 0006 1920 movel 61920 <rtems_bdbuf_configuration+0x4>,%d0 4c91a: b0a8 0010 cmpl %a0@(16),%d0
4c91e: 625a bhis 4c97a <rtems_bdbuf_swapout_write+0x118>
(transfer->write_req->bufnum >= bdbuf_config.max_write_blocks))
write = true;
if (write)
{
rtems_bdbuf_execute_transfer_request (dd, transfer->write_req, false);
4c920: 42a7 clrl %sp@- 4c922: 2f08 movel %a0,%sp@- 4c924: 2f05 movel %d5,%sp@- 4c926: 2f04 movel %d4,%sp@- 4c928: 4eba fdca jsr %pc@(4c6f4 <rtems_bdbuf_execute_transfer_request.isra.9>)
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
4c92c: 206a 0016 moveal %a2@(22),%a0 4c930: 700c moveq #12,%d0
transfer->write_req->bufnum = 0;
4c932: 4fef 0010 lea %sp@(16),%sp
if (write)
{
rtems_bdbuf_execute_transfer_request (dd, transfer->write_req, false);
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
4c936: 2140 000c movel %d0,%a0@(12)
transfer->write_req->bufnum = 0;
4c93a: 42a8 0010 clrl %a0@(16) 4c93e: 2f0a movel %a2,%sp@- 4c940: 4e94 jsr %a4@
* trouble waiting to happen.
*/
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
transfer->write_req->bufnum = 0;
while ((node = rtems_chain_get(&transfer->bds)) != NULL)
4c942: 588f addql #4,%sp 4c944: 4a80 tstl %d0
4c946: 6682 bnes 4c8ca <rtems_bdbuf_swapout_write+0x68>
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
transfer->write_req->bufnum = 0;
}
}
if (dd != &null_disk)
4c948: b7fc 0006 36a0 cmpal #407200,%a3 4c94e: 6700 00d4 beqw 4ca24 <rtems_bdbuf_swapout_write+0x1c2>
{
/*
* If sync'ing and the deivce is capability of handling a sync IO control
* call perform the call.
*/
if (transfer->syncing &&
4c952: 4a2a 0014 tstb %a2@(20)
4c956: 6710 beqs 4c968 <rtems_bdbuf_swapout_write+0x106>
(dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_SYNC))
4c958: 206b 0008 moveal %a3@(8),%a0 4c95c: 103c 0002 moveb #2,%d0 4c960: c0a8 000c andl %a0@(12),%d0
{
/*
* If sync'ing and the deivce is capability of handling a sync IO control
* call perform the call.
*/
if (transfer->syncing &&
4c964: 6600 0102 bnew 4ca68 <rtems_bdbuf_swapout_write+0x206>
{
/* int result = */ dd->ioctl (dd->phys_dev, RTEMS_BLKDEV_REQ_SYNC, NULL);
/* How should the error be handled ? */
}
rtems_disk_release (dd);
4c968: 2d4b 0008 movel %a3,%fp@(8)
}
}
}
4c96c: 4cee 3cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a5 4c972: 4e5e unlk %fp
{
/* int result = */ dd->ioctl (dd->phys_dev, RTEMS_BLKDEV_REQ_SYNC, NULL);
/* How should the error be handled ? */
}
rtems_disk_release (dd);
4c974: 4ef9 0004 331e jmp 4331e <rtems_disk_release>
if (rtems_chain_is_empty (&transfer->bds) ||
(transfer->write_req->bufnum >= bdbuf_config.max_write_blocks))
write = true;
if (write)
4c97a: 4a07 tstb %d7 4c97c: 6700 ff42 beqw 4c8c0 <rtems_bdbuf_swapout_write+0x5e>
{
rtems_bdbuf_execute_transfer_request (dd, transfer->write_req, false);
4c980: 42a7 clrl %sp@- <== NOT EXECUTED 4c982: 2f08 movel %a0,%sp@- <== NOT EXECUTED 4c984: 2f05 movel %d5,%sp@- <== NOT EXECUTED 4c986: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4c988: 4eba fd6a jsr %pc@(4c6f4 <rtems_bdbuf_execute_transfer_request.isra.9>)<== NOT EXECUTED
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
4c98c: 206a 0016 moveal %a2@(22),%a0 <== NOT EXECUTED 4c990: 700c moveq #12,%d0 <== NOT EXECUTED
transfer->write_req->bufnum = 0;
4c992: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
if (write)
{
rtems_bdbuf_execute_transfer_request (dd, transfer->write_req, false);
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
4c996: 2140 000c movel %d0,%a0@(12) <== NOT EXECUTED
transfer->write_req->bufnum = 0;
4c99a: 42a8 0010 clrl %a0@(16) <== NOT EXECUTED 4c99e: 609e bras 4c93e <rtems_bdbuf_swapout_write+0xdc> <== NOT EXECUTED
if ((dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_MULTISECTOR_CONT) &&
transfer->write_req->bufnum &&
(bd->block != (last_block + bufs_per_bd)))
{
rtems_chain_prepend (&transfer->bds, &bd->link);
write = true;
4c9a0: 2228 0010 movel %a0@(16),%d1 4c9a4: 2240 moveal %d0,%a1
}
else
{
rtems_blkdev_sg_buffer* buf;
buf = &transfer->write_req->bufs[transfer->write_req->bufnum];
transfer->write_req->bufnum++;
4c9a6: 2a41 moveal %d1,%a5 4c9a8: 528d addql #1,%a5
if ((dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_MULTISECTOR_CONT) &&
transfer->write_req->bufnum &&
(bd->block != (last_block + bufs_per_bd)))
{
rtems_chain_prepend (&transfer->bds, &bd->link);
write = true;
4c9aa: 2429 001a movel %a1@(26),%d2
}
else
{
rtems_blkdev_sg_buffer* buf;
buf = &transfer->write_req->bufs[transfer->write_req->bufnum];
4c9ae: e989 lsll #4,%d1
transfer->write_req->bufnum++;
4c9b0: 214d 0010 movel %a5,%a0@(16)
buf->user = bd;
buf->block = bd->block;
buf->length = dd->block_size;
buf->buffer = bd->buffer;
4c9b4: 2a40 moveal %d0,%a5 4c9b6: 4bed 001e lea %a5@(30),%a5
write = true;
}
else
{
rtems_blkdev_sg_buffer* buf;
buf = &transfer->write_req->bufs[transfer->write_req->bufnum];
4c9ba: 43f0 1818 lea %a0@(00000018,%d1:l),%a1
transfer->write_req->bufnum = 0;
while ((node = rtems_chain_get(&transfer->bds)) != NULL)
{
rtems_bdbuf_buffer* bd = (rtems_bdbuf_buffer*) node;
bool write = false;
4c9be: 4207 clrb %d7
rtems_blkdev_sg_buffer* buf;
buf = &transfer->write_req->bufs[transfer->write_req->bufnum];
transfer->write_req->bufnum++;
buf->user = bd;
buf->block = bd->block;
buf->length = dd->block_size;
4c9c0: 236b 0020 0004 movel %a3@(32),%a1@(4)
buf->buffer = bd->buffer;
4c9c6: 2355 0008 movel %a5@,%a1@(8)
else
{
rtems_blkdev_sg_buffer* buf;
buf = &transfer->write_req->bufs[transfer->write_req->bufnum];
transfer->write_req->bufnum++;
buf->user = bd;
4c9ca: 2340 000c movel %d0,%a1@(12)
buf->block = bd->block;
4c9ce: 2282 movel %d2,%a1@ 4c9d0: 6000 ff3e braw 4c910 <rtems_bdbuf_swapout_write+0xae>
dd->phys_dev->capabilities &
RTEMS_BLKDEV_CAP_MULTISECTOR_CONT ? "MULIT" : "SCAT");
if ((dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_MULTISECTOR_CONT) &&
transfer->write_req->bufnum &&
(bd->block != (last_block + bufs_per_bd)))
4c9d4: 2a40 moveal %d0,%a5 <== NOT EXECUTED 4c9d6: 2e02 movel %d2,%d7 <== NOT EXECUTED 4c9d8: de86 addl %d6,%d7 <== NOT EXECUTED 4c9da: 226d 001a moveal %a5@(26),%a1 <== NOT EXECUTED
bd->block, transfer->write_req->bufnum,
dd->phys_dev->capabilities &
RTEMS_BLKDEV_CAP_MULTISECTOR_CONT ? "MULIT" : "SCAT");
if ((dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_MULTISECTOR_CONT) &&
transfer->write_req->bufnum &&
4c9de: be89 cmpl %a1,%d7 <== NOT EXECUTED 4c9e0: 6716 beqs 4c9f8 <rtems_bdbuf_swapout_write+0x196><== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
4c9e2: 2f00 movel %d0,%sp@- <== NOT EXECUTED
(bd->block != (last_block + bufs_per_bd)))
{
rtems_chain_prepend (&transfer->bds, &bd->link);
write = true;
4c9e4: 7e01 moveq #1,%d7 <== NOT EXECUTED 4c9e6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4c9e8: 4eb9 0005 0ce8 jsr 50ce8 <_Chain_Insert> <== NOT EXECUTED 4c9ee: 206a 0016 moveal %a2@(22),%a0 <== NOT EXECUTED 4c9f2: 508f addql #8,%sp <== NOT EXECUTED 4c9f4: 6000 ff1a braw 4c910 <rtems_bdbuf_swapout_write+0xae> <== NOT EXECUTED
}
else
{
rtems_blkdev_sg_buffer* buf;
buf = &transfer->write_req->bufs[transfer->write_req->bufnum];
transfer->write_req->bufnum++;
4c9f8: 2a41 moveal %d1,%a5 <== NOT EXECUTED
bd->block, transfer->write_req->bufnum,
dd->phys_dev->capabilities &
RTEMS_BLKDEV_CAP_MULTISECTOR_CONT ? "MULIT" : "SCAT");
if ((dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_MULTISECTOR_CONT) &&
transfer->write_req->bufnum &&
4c9fa: 2409 movel %a1,%d2 <== NOT EXECUTED
}
else
{
rtems_blkdev_sg_buffer* buf;
buf = &transfer->write_req->bufs[transfer->write_req->bufnum];
transfer->write_req->bufnum++;
4c9fc: 528d addql #1,%a5 <== NOT EXECUTED
write = true;
}
else
{
rtems_blkdev_sg_buffer* buf;
buf = &transfer->write_req->bufs[transfer->write_req->bufnum];
4c9fe: e989 lsll #4,%d1 <== NOT EXECUTED
transfer->write_req->bufnum++;
4ca00: 214d 0010 movel %a5,%a0@(16) <== NOT EXECUTED
buf->user = bd;
buf->block = bd->block;
buf->length = dd->block_size;
buf->buffer = bd->buffer;
4ca04: 2a40 moveal %d0,%a5 <== NOT EXECUTED 4ca06: 4bed 001e lea %a5@(30),%a5 <== NOT EXECUTED
write = true;
}
else
{
rtems_blkdev_sg_buffer* buf;
buf = &transfer->write_req->bufs[transfer->write_req->bufnum];
4ca0a: 43f0 1818 lea %a0@(00000018,%d1:l),%a1 <== NOT EXECUTED
transfer->write_req->bufnum = 0;
while ((node = rtems_chain_get(&transfer->bds)) != NULL)
{
rtems_bdbuf_buffer* bd = (rtems_bdbuf_buffer*) node;
bool write = false;
4ca0e: 4207 clrb %d7 <== NOT EXECUTED
rtems_blkdev_sg_buffer* buf;
buf = &transfer->write_req->bufs[transfer->write_req->bufnum];
transfer->write_req->bufnum++;
buf->user = bd;
buf->block = bd->block;
buf->length = dd->block_size;
4ca10: 236b 0020 0004 movel %a3@(32),%a1@(4) <== NOT EXECUTED
buf->buffer = bd->buffer;
4ca16: 2355 0008 movel %a5@,%a1@(8) <== NOT EXECUTED
else
{
rtems_blkdev_sg_buffer* buf;
buf = &transfer->write_req->bufs[transfer->write_req->bufnum];
transfer->write_req->bufnum++;
buf->user = bd;
4ca1a: 2340 000c movel %d0,%a1@(12) <== NOT EXECUTED
buf->block = bd->block;
4ca1e: 2282 movel %d2,%a1@ <== NOT EXECUTED 4ca20: 6000 feee braw 4c910 <rtems_bdbuf_swapout_write+0xae> <== NOT EXECUTED
}
rtems_disk_release (dd);
}
}
}
4ca24: 4cee 3cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4ca2a: 4e5e unlk %fp <== NOT EXECUTED 4ca2c: 4e75 rts <== NOT EXECUTED
* dead lock.
*/
rtems_disk_device *dd = rtems_disk_obtain (transfer->dev);
if (dd == NULL)
dd = &null_disk;
4ca2e: 47f9 0006 36a0 lea 636a0 <null_disk.6986>,%a3
bufs_per_bd = dd->block_size / bdbuf_config.buffer_min;
4ca34: 43f9 0006 193c lea 6193c <rtems_bdbuf_configuration+0x20>,%a1
rtems_bdbuf_purge_major (rtems_device_major_number major)
{
dev_t dev = rtems_filesystem_make_dev_t (major, 0);
rtems_bdbuf_purge (rtems_bdbuf_purge_compare_major, dev);
}
4ca3a: 2a0b movel %a3,%d5 4ca3c: 280b movel %a3,%d4
{
/*
* The last block number used when the driver only supports
* continuous blocks in a single request.
*/
uint32_t last_block = 0;
4ca3e: 4282 clrl %d2 4ca40: 49f9 0004 8934 lea 48934 <_Chain_Get>,%a4
rtems_bdbuf_purge_major (rtems_device_major_number major)
{
dev_t dev = rtems_filesystem_make_dev_t (major, 0);
rtems_bdbuf_purge (rtems_bdbuf_purge_compare_major, dev);
}
4ca46: 0685 0000 0028 addil #40,%d5 4ca4c: 5084 addql #8,%d4
rtems_disk_device *dd = rtems_disk_obtain (transfer->dev);
if (dd == NULL)
dd = &null_disk;
bufs_per_bd = dd->block_size / bdbuf_config.buffer_min;
4ca4e: 2c2b 0020 movel %a3@(32),%d6 4ca52: 4c51 6006 remul %a1@,%d6,%d6
* should be possible to make this change with little effect in this
* code. The array that is passed is broken in design and should be
* removed. Merging members of a struct into the first member is
* trouble waiting to happen.
*/
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
4ca56: 206a 0016 moveal %a2@(22),%a0 4ca5a: 700c moveq #12,%d0
transfer->write_req->bufnum = 0;
4ca5c: 42a8 0010 clrl %a0@(16)
* should be possible to make this change with little effect in this
* code. The array that is passed is broken in design and should be
* removed. Merging members of a struct into the first member is
* trouble waiting to happen.
*/
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
4ca60: 2140 000c movel %d0,%a0@(12) 4ca64: 6000 fe5a braw 4c8c0 <rtems_bdbuf_swapout_write+0x5e>
* call perform the call.
*/
if (transfer->syncing &&
(dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_SYNC))
{
/* int result = */ dd->ioctl (dd->phys_dev, RTEMS_BLKDEV_REQ_SYNC, NULL);
4ca68: 42a7 clrl %sp@- <== NOT EXECUTED 4ca6a: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED 4ca6e: 2f08 movel %a0,%sp@- <== NOT EXECUTED 4ca70: 206b 0028 moveal %a3@(40),%a0 <== NOT EXECUTED 4ca74: 4e90 jsr %a0@ <== NOT EXECUTED 4ca76: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
/* How should the error be handled ? */
}
rtems_disk_release (dd);
4ca7a: 2d4b 0008 movel %a3,%fp@(8) <== NOT EXECUTED
}
}
}
4ca7e: 4cee 3cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4ca84: 4e5e unlk %fp <== NOT EXECUTED
{
/* int result = */ dd->ioctl (dd->phys_dev, RTEMS_BLKDEV_REQ_SYNC, NULL);
/* How should the error be handled ? */
}
rtems_disk_release (dd);
4ca86: 4ef9 0004 331e jmp 4331e <rtems_disk_release> <== NOT EXECUTED
0004bf26 <rtems_bdbuf_swapout_writereq_alloc>:
*
* @return rtems_blkdev_request* The write reference memory.
*/
static rtems_blkdev_request*
rtems_bdbuf_swapout_writereq_alloc (void)
{
4bf26: 4e56 0000 linkw %fp,#0
* have been a rtems_chain_control. Simple, fast and less storage as the node
* is already part of the buffer structure.
*/
rtems_blkdev_request* write_req =
malloc (sizeof (rtems_blkdev_request) +
(bdbuf_config.max_write_blocks * sizeof (rtems_blkdev_sg_buffer)));
4bf2a: 2039 0006 1920 movel 61920 <rtems_bdbuf_configuration+0x4>,%d0 4bf30: e988 lsll #4,%d0
*
* @return rtems_blkdev_request* The write reference memory.
*/
static rtems_blkdev_request*
rtems_bdbuf_swapout_writereq_alloc (void)
{
4bf32: 2f0a movel %a2,%sp@-
* @note chrisj The rtems_blkdev_request and the array at the end is a hack. * I am disappointment at finding code like this in RTEMS. The request should * have been a rtems_chain_control. Simple, fast and less storage as the node * is already part of the buffer structure. */ rtems_blkdev_request* write_req =
4bf34: 2040 moveal %d0,%a0 4bf36: 4868 0018 pea %a0@(24) 4bf3a: 4eb9 0004 44d8 jsr 444d8 <malloc>
malloc (sizeof (rtems_blkdev_request) +
(bdbuf_config.max_write_blocks * sizeof (rtems_blkdev_sg_buffer)));
if (!write_req)
4bf40: 588f addql #4,%sp
* @note chrisj The rtems_blkdev_request and the array at the end is a hack. * I am disappointment at finding code like this in RTEMS. The request should * have been a rtems_chain_control. Simple, fast and less storage as the node * is already part of the buffer structure. */ rtems_blkdev_request* write_req =
4bf42: 2440 moveal %d0,%a2
malloc (sizeof (rtems_blkdev_request) +
(bdbuf_config.max_write_blocks * sizeof (rtems_blkdev_sg_buffer)));
if (!write_req)
4bf44: 4a80 tstl %d0
4bf46: 6726 beqs 4bf6e <rtems_bdbuf_swapout_writereq_alloc+0x48><== NEVER TAKEN
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_NOMEM);
write_req->req = RTEMS_BLKDEV_REQ_WRITE;
4bf48: 7001 moveq #1,%d0 4bf4a: 2480 movel %d0,%a2@
write_req->req_done = rtems_bdbuf_transfer_done;
4bf4c: 203c 0004 bdb2 movel #310706,%d0
write_req->done_arg = write_req;
4bf52: 254a 0008 movel %a2,%a2@(8)
if (!write_req)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_NOMEM);
write_req->req = RTEMS_BLKDEV_REQ_WRITE;
write_req->req_done = rtems_bdbuf_transfer_done;
4bf56: 2540 0004 movel %d0,%a2@(4)
write_req->done_arg = write_req; write_req->io_task = rtems_task_self ();
4bf5a: 4eb9 0005 09ec jsr 509ec <rtems_task_self> 4bf60: 2540 0014 movel %d0,%a2@(20)
return write_req;
}
4bf64: 200a movel %a2,%d0 4bf66: 246e fffc moveal %fp@(-4),%a2 4bf6a: 4e5e unlk %fp 4bf6c: 4e75 rts
rtems_blkdev_request* write_req =
malloc (sizeof (rtems_blkdev_request) +
(bdbuf_config.max_write_blocks * sizeof (rtems_blkdev_sg_buffer)));
if (!write_req)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_NOMEM);
4bf6e: 2f3c 4200 0015 movel #1107296277,%sp@- <== NOT EXECUTED 4bf74: 4eb9 0004 83dc jsr 483dc <rtems_fatal_error_occurred> <== NOT EXECUTED
0004dd6a <rtems_bdbuf_sync>:
}
rtems_status_code
rtems_bdbuf_sync (rtems_bdbuf_buffer *bd)
{
4dd6a: 4e56 0000 linkw %fp,#0 4dd6e: 2f0b movel %a3,%sp@- 4dd70: 2f0a movel %a2,%sp@- 4dd72: 246e 0008 moveal %fp@(8),%a2
}
static rtems_status_code
rtems_bdbuf_check_bd_and_lock_cache (rtems_bdbuf_buffer *bd, const char *kind)
{
if (!bdbuf_cache.initialised)
4dd76: 4a39 0006 4698 tstb 64698 <bdbuf_cache+0x84>
4dd7c: 6732 beqs 4ddb0 <rtems_bdbuf_sync+0x46> <== NEVER TAKEN
return RTEMS_NOT_CONFIGURED;
if (bd == NULL)
4dd7e: 4a8a tstl %a2
4dd80: 673c beqs 4ddbe <rtems_bdbuf_sync+0x54> <== NEVER TAKEN
if (rtems_bdbuf_tracer)
{
printf ("bdbuf:%s: %" PRIu32 "\n", kind, bd->block);
rtems_bdbuf_show_users (kind, bd);
}
rtems_bdbuf_lock_cache();
4dd82: 4eba dddc jsr %pc@(4bb60 <rtems_bdbuf_lock_cache>)
sc = rtems_bdbuf_check_bd_and_lock_cache (bd, "sync");
if (sc != RTEMS_SUCCESSFUL)
return sc;
switch (bd->state)
4dd86: 202a 0022 movel %a2@(34),%d0 4dd8a: 7203 moveq #3,%d1 4dd8c: b280 cmpl %d0,%d1
4dd8e: 6210 bhis 4dda0 <rtems_bdbuf_sync+0x36> <== NEVER TAKEN
4dd90: 123c 0005 moveb #5,%d1 4dd94: b280 cmpl %d0,%d1
4dd96: 644e bccs 4dde6 <rtems_bdbuf_sync+0x7c>
4dd98: 123c 0006 moveb #6,%d1 4dd9c: b280 cmpl %d0,%d1
4dd9e: 672c beqs 4ddcc <rtems_bdbuf_sync+0x62> <== ALWAYS TAKEN
break;
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
rtems_bdbuf_discard_buffer_after_access (bd);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_5);
4dda0: 202a 0022 movel %a2@(34),%d0 <== NOT EXECUTED 4dda4: 2f3c 4200 0003 movel #1107296259,%sp@- <== NOT EXECUTED 4ddaa: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4ddac: 4eba de0a jsr %pc@(4bbb8 <rtems_bdbuf_fatal>) <== NOT EXECUTED
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
return RTEMS_SUCCESSFUL;
}
4ddb0: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED
static rtems_status_code
rtems_bdbuf_check_bd_and_lock_cache (rtems_bdbuf_buffer *bd, const char *kind)
{
if (!bdbuf_cache.initialised)
return RTEMS_NOT_CONFIGURED;
4ddb4: 7016 moveq #22,%d0 <== NOT EXECUTED
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
return RTEMS_SUCCESSFUL;
}
4ddb6: 266e fffc moveal %fp@(-4),%a3 <== NOT EXECUTED 4ddba: 4e5e unlk %fp <== NOT EXECUTED 4ddbc: 4e75 rts <== NOT EXECUTED 4ddbe: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED
rtems_bdbuf_check_bd_and_lock_cache (rtems_bdbuf_buffer *bd, const char *kind)
{
if (!bdbuf_cache.initialised)
return RTEMS_NOT_CONFIGURED;
if (bd == NULL)
return RTEMS_INVALID_ADDRESS;
4ddc2: 7009 moveq #9,%d0 <== NOT EXECUTED
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
return RTEMS_SUCCESSFUL;
}
4ddc4: 266e fffc moveal %fp@(-4),%a3 <== NOT EXECUTED 4ddc8: 4e5e unlk %fp <== NOT EXECUTED 4ddca: 4e75 rts <== NOT EXECUTED
case RTEMS_BDBUF_STATE_ACCESS_EMPTY:
case RTEMS_BDBUF_STATE_ACCESS_MODIFIED:
rtems_bdbuf_sync_after_access (bd);
break;
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
rtems_bdbuf_discard_buffer_after_access (bd);
4ddcc: 2f0a movel %a2,%sp@- 4ddce: 4eba e706 jsr %pc@(4c4d6 <rtems_bdbuf_discard_buffer_after_access>)
break;
4ddd2: 588f addql #4,%sp
}
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
4ddd4: 4eba df42 jsr %pc@(4bd18 <rtems_bdbuf_unlock_cache>)
return RTEMS_SUCCESSFUL;
4ddd8: 4280 clrl %d0
}
4ddda: 246e fff8 moveal %fp@(-8),%a2 4ddde: 266e fffc moveal %fp@(-4),%a3 4dde2: 4e5e unlk %fp 4dde4: 4e75 rts 4dde6: 2f0a movel %a2,%sp@- 4dde8: 4879 0006 466c pea 6466c <bdbuf_cache+0x58>
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4ddee: 7008 moveq #8,%d0 4ddf0: 2540 0022 movel %d0,%a2@(34) 4ddf4: 4eb9 0004 88d4 jsr 488d4 <_Chain_Append>
{
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_SYNC);
rtems_chain_append (&bdbuf_cache.sync, &bd->link);
if (bd->waiters)
4ddfa: 202a 0026 movel %a2@(38),%d0 4ddfe: 508f addql #8,%sp
4de00: 6632 bnes 4de34 <rtems_bdbuf_sync+0xca>
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
rtems_bdbuf_wake_swapper ();
4de02: 4eba df84 jsr %pc@(4bd88 <rtems_bdbuf_wake_swapper>)
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
return;
case RTEMS_BDBUF_STATE_SYNC:
case RTEMS_BDBUF_STATE_TRANSFER:
case RTEMS_BDBUF_STATE_TRANSFER_PURGED:
rtems_bdbuf_wait (bd, &bdbuf_cache.transfer_waiters);
4de06: 47fa e0de lea %pc@(4bee6 <rtems_bdbuf_wait>),%a3
static void
rtems_bdbuf_wait_for_sync_done (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
4de0a: 202a 0022 movel %a2@(34),%d0 4de0e: 7201 moveq #1,%d1 4de10: b280 cmpl %d0,%d1
4de12: 6210 bhis 4de24 <rtems_bdbuf_sync+0xba> <== NEVER TAKEN
4de14: 123c 0007 moveb #7,%d1 4de18: b280 cmpl %d0,%d1
4de1a: 6446 bccs 4de62 <rtems_bdbuf_sync+0xf8>
4de1c: 123c 000a moveb #10,%d1 4de20: b280 cmpl %d0,%d1
4de22: 6426 bccs 4de4a <rtems_bdbuf_sync+0xe0> <== ALWAYS TAKEN
case RTEMS_BDBUF_STATE_TRANSFER:
case RTEMS_BDBUF_STATE_TRANSFER_PURGED:
rtems_bdbuf_wait (bd, &bdbuf_cache.transfer_waiters);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_9);
4de24: 202a 0022 movel %a2@(34),%d0 <== NOT EXECUTED 4de28: 2f3c 4200 0007 movel #1107296263,%sp@- <== NOT EXECUTED 4de2e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4de30: 4eba dd86 jsr %pc@(4bbb8 <rtems_bdbuf_fatal>) <== NOT EXECUTED
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_SYNC);
rtems_chain_append (&bdbuf_cache.sync, &bd->link);
if (bd->waiters)
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
4de34: 4879 0006 4678 pea 64678 <bdbuf_cache+0x64>
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
return;
case RTEMS_BDBUF_STATE_SYNC:
case RTEMS_BDBUF_STATE_TRANSFER:
case RTEMS_BDBUF_STATE_TRANSFER_PURGED:
rtems_bdbuf_wait (bd, &bdbuf_cache.transfer_waiters);
4de3a: 47fa e0aa lea %pc@(4bee6 <rtems_bdbuf_wait>),%a3
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_SYNC);
rtems_chain_append (&bdbuf_cache.sync, &bd->link);
if (bd->waiters)
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
4de3e: 4eba e13a jsr %pc@(4bf7a <rtems_bdbuf_wake>) 4de42: 588f addql #4,%sp
rtems_bdbuf_wake_swapper ();
4de44: 4eba df42 jsr %pc@(4bd88 <rtems_bdbuf_wake_swapper>) 4de48: 60c0 bras 4de0a <rtems_bdbuf_sync+0xa0>
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
return;
case RTEMS_BDBUF_STATE_SYNC:
case RTEMS_BDBUF_STATE_TRANSFER:
case RTEMS_BDBUF_STATE_TRANSFER_PURGED:
rtems_bdbuf_wait (bd, &bdbuf_cache.transfer_waiters);
4de4a: 4879 0006 4680 pea 64680 <bdbuf_cache+0x6c> 4de50: 2f0a movel %a2,%sp@- 4de52: 4e93 jsr %a3@
static void
rtems_bdbuf_wait_for_sync_done (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
4de54: 202a 0022 movel %a2@(34),%d0
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
return;
case RTEMS_BDBUF_STATE_SYNC:
case RTEMS_BDBUF_STATE_TRANSFER:
case RTEMS_BDBUF_STATE_TRANSFER_PURGED:
rtems_bdbuf_wait (bd, &bdbuf_cache.transfer_waiters);
4de58: 508f addql #8,%sp
static void
rtems_bdbuf_wait_for_sync_done (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
4de5a: 7201 moveq #1,%d1 4de5c: b280 cmpl %d0,%d1
4de5e: 62c4 bhis 4de24 <rtems_bdbuf_sync+0xba> <== NEVER TAKEN
4de60: 60b2 bras 4de14 <rtems_bdbuf_sync+0xaa>
rtems_bdbuf_wait_for_sync_done (bd);
/*
* We may have created a cached or empty buffer which may be recycled.
*/
if (bd->waiters == 0
4de62: 202a 0026 movel %a2@(38),%d0 4de66: 6600 ff6c bnew 4ddd4 <rtems_bdbuf_sync+0x6a>
&& (bd->state == RTEMS_BDBUF_STATE_CACHED
4de6a: 202a 0022 movel %a2@(34),%d0 4de6e: 7202 moveq #2,%d1 4de70: b280 cmpl %d0,%d1
4de72: 670e beqs 4de82 <rtems_bdbuf_sync+0x118>
|| bd->state == RTEMS_BDBUF_STATE_EMPTY))
4de74: 202a 0022 movel %a2@(34),%d0 4de78: 123c 0001 moveb #1,%d1 4de7c: b280 cmpl %d0,%d1 4de7e: 6600 ff54 bnew 4ddd4 <rtems_bdbuf_sync+0x6a>
{
if (bd->state == RTEMS_BDBUF_STATE_EMPTY)
4de82: 202a 0022 movel %a2@(34),%d0 4de86: 7201 moveq #1,%d1 4de88: b280 cmpl %d0,%d1
4de8a: 6716 beqs 4dea2 <rtems_bdbuf_sync+0x138>
{
rtems_bdbuf_remove_from_tree (bd);
rtems_bdbuf_make_free_and_add_to_lru_list (bd);
}
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
4de8c: 4879 0006 4688 pea 64688 <bdbuf_cache+0x74> 4de92: 4eba e0e6 jsr %pc@(4bf7a <rtems_bdbuf_wake>) 4de96: 588f addql #4,%sp
}
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
4de98: 4eba de7e jsr %pc@(4bd18 <rtems_bdbuf_unlock_cache>)
return RTEMS_SUCCESSFUL;
4de9c: 4280 clrl %d0 4de9e: 6000 ff3a braw 4ddda <rtems_bdbuf_sync+0x70>
&& (bd->state == RTEMS_BDBUF_STATE_CACHED
|| bd->state == RTEMS_BDBUF_STATE_EMPTY))
{
if (bd->state == RTEMS_BDBUF_STATE_EMPTY)
{
rtems_bdbuf_remove_from_tree (bd);
4dea2: 2f0a movel %a2,%sp@- 4dea4: 4eba e2b6 jsr %pc@(4c15c <rtems_bdbuf_remove_from_tree>)
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
4dea8: 2f0a movel %a2,%sp@- 4deaa: 4879 0006 4654 pea 64654 <bdbuf_cache+0x40>
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4deb0: 42aa 0022 clrl %a2@(34) 4deb4: 4eb9 0005 0ce8 jsr 50ce8 <_Chain_Insert> 4deba: 4fef 000c lea %sp@(12),%sp
if (bd->state == RTEMS_BDBUF_STATE_EMPTY)
{
rtems_bdbuf_remove_from_tree (bd);
rtems_bdbuf_make_free_and_add_to_lru_list (bd);
}
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
4debe: 4879 0006 4688 pea 64688 <bdbuf_cache+0x74> 4dec4: 4eba e0b4 jsr %pc@(4bf7a <rtems_bdbuf_wake>) 4dec8: 588f addql #4,%sp 4deca: 60cc bras 4de98 <rtems_bdbuf_sync+0x12e>
0004decc <rtems_bdbuf_syncdev>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_bdbuf_syncdev (dev_t dev)
{
4decc: 4e56 fff0 linkw %fp,#-16 4ded0: 48d7 001c moveml %d2-%d4,%sp@
rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_disk_device *dd = NULL;
4ded4: 42ae fffc clrl %fp@(-4)
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_bdbuf_syncdev (dev_t dev)
{
4ded8: 242e 0008 movel %fp@(8),%d2 4dedc: 262e 000c movel %fp@(12),%d3
rtems_blkdev_bnum *media_block_ptr,
size_t *bds_per_group_ptr)
{
rtems_disk_device *dd = NULL;
if (!bdbuf_cache.initialised)
4dee0: 4a39 0006 4698 tstb 64698 <bdbuf_cache+0x84>
4dee6: 660e bnes 4def6 <rtems_bdbuf_syncdev+0x2a> <== ALWAYS TAKEN
return RTEMS_NOT_CONFIGURED;
4dee8: 7816 moveq #22,%d4 <== NOT EXECUTED
rtems_bdbuf_wait_for_event (RTEMS_BDBUF_TRANSFER_SYNC);
rtems_bdbuf_unlock_sync ();
rtems_bdbuf_release_disk (dd);
return RTEMS_SUCCESSFUL;
}
4deea: 2004 movel %d4,%d0 <== NOT EXECUTED 4deec: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 <== NOT EXECUTED 4def2: 4e5e unlk %fp <== NOT EXECUTED 4def4: 4e75 rts <== NOT EXECUTED
rtems_blkdev_bnum *media_block_ptr,
size_t *bds_per_group_ptr)
{
rtems_disk_device *dd = NULL;
if (!bdbuf_cache.initialised)
4def6: 42a7 clrl %sp@- 4def8: 42a7 clrl %sp@- 4defa: 486e fffc pea %fp@(-4) 4defe: 42a7 clrl %sp@- 4df00: 2f03 movel %d3,%sp@- 4df02: 2f02 movel %d2,%sp@- 4df04: 4eba e170 jsr %pc@(4c076 <rtems_bdbuf_obtain_disk.part.8>)
if (rtems_bdbuf_tracer)
printf ("bdbuf:syncdev: %08x\n", (unsigned) dev);
sc = rtems_bdbuf_obtain_disk (dev, 0, &dd, NULL, NULL);
if (sc != RTEMS_SUCCESSFUL)
4df08: 4fef 0018 lea %sp@(24),%sp
rtems_blkdev_bnum *media_block_ptr,
size_t *bds_per_group_ptr)
{
rtems_disk_device *dd = NULL;
if (!bdbuf_cache.initialised)
4df0c: 2800 movel %d0,%d4
if (rtems_bdbuf_tracer)
printf ("bdbuf:syncdev: %08x\n", (unsigned) dev);
sc = rtems_bdbuf_obtain_disk (dev, 0, &dd, NULL, NULL);
if (sc != RTEMS_SUCCESSFUL)
4df0e: 66da bnes 4deea <rtems_bdbuf_syncdev+0x1e> <== NEVER TAKEN
* Take the sync lock before locking the cache. Once we have the sync lock we * can lock the cache. If another thread has the sync lock it will cause this * thread to block until it owns the sync lock then it can own the cache. The * sync lock can only be obtained with the cache unlocked. */ rtems_bdbuf_lock_sync ();
4df10: 4eba dc7a jsr %pc@(4bb8c <rtems_bdbuf_lock_sync>)
rtems_bdbuf_lock_cache ();
4df14: 4eba dc4a jsr %pc@(4bb60 <rtems_bdbuf_lock_cache>)
* out task know the id of the requester to wake when done. * * The swap out task will negate the sync active flag when no more buffers * for the device are held on the "modified for sync" queues. */ bdbuf_cache.sync_active = true;
4df18: 7001 moveq #1,%d0 4df1a: 13c0 0006 4642 moveb %d0,64642 <bdbuf_cache+0x2e>
bdbuf_cache.sync_requester = rtems_task_self ();
4df20: 4eb9 0005 09ec jsr 509ec <rtems_task_self> 4df26: 23c0 0006 4644 movel %d0,64644 <bdbuf_cache+0x30>
bdbuf_cache.sync_device = dev;
4df2c: 23c2 0006 4648 movel %d2,64648 <bdbuf_cache+0x34> 4df32: 23c3 0006 464c movel %d3,6464c <bdbuf_cache+0x38>
rtems_bdbuf_wake_swapper ();
4df38: 4eba de4e jsr %pc@(4bd88 <rtems_bdbuf_wake_swapper>)
rtems_bdbuf_unlock_cache ();
4df3c: 4eba ddda jsr %pc@(4bd18 <rtems_bdbuf_unlock_cache>)
rtems_bdbuf_wait_for_event (RTEMS_BDBUF_TRANSFER_SYNC);
4df40: 4878 0002 pea 2 <DOUBLE_FLOAT> 4df44: 4eba de8e jsr %pc@(4bdd4 <rtems_bdbuf_wait_for_event>)
rtems_bdbuf_unlock_sync ();
4df48: 4eba ddf4 jsr %pc@(4bd3e <rtems_bdbuf_unlock_sync>)
rtems_bdbuf_release_disk (dd);
4df4c: 2f2e fffc movel %fp@(-4),%sp@- 4df50: 4eba de12 jsr %pc@(4bd64 <rtems_bdbuf_release_disk>)
return RTEMS_SUCCESSFUL;
4df54: 508f addql #8,%sp
}
4df56: 2004 movel %d4,%d0 4df58: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4
4df5e: 4e5e unlk %fp <== NOT EXECUTED
0004bd18 <rtems_bdbuf_unlock_cache>:
/**
* Unlock the cache.
*/
static void
rtems_bdbuf_unlock_cache (void)
{
4bd18: 4e56 0000 linkw %fp,#0
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_unlock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_release (lock);
4bd1c: 2f39 0006 463a movel 6463a <bdbuf_cache+0x26>,%sp@- 4bd22: 4eb9 0004 7dfc jsr 47dfc <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL)
4bd28: 588f addql #4,%sp 4bd2a: 4a80 tstl %d0
4bd2c: 6604 bnes 4bd32 <rtems_bdbuf_unlock_cache+0x1a> <== NEVER TAKEN
*/
static void
rtems_bdbuf_unlock_cache (void)
{
rtems_bdbuf_unlock (bdbuf_cache.lock, RTEMS_BLKDEV_FATAL_BDBUF_CACHE_UNLOCK);
}
4bd2e: 4e5e unlk %fp 4bd30: 4e75 rts
static void
rtems_bdbuf_unlock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_release (lock);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (fatal_error_code);
4bd32: 2f3c 4200 000e movel #1107296270,%sp@- <== NOT EXECUTED 4bd38: 4eb9 0004 83dc jsr 483dc <rtems_fatal_error_occurred> <== NOT EXECUTED
0004bd3e <rtems_bdbuf_unlock_sync>:
/**
* Unlock the cache's sync lock. Any blocked writers are woken.
*/
static void
rtems_bdbuf_unlock_sync (void)
{
4bd3e: 4e56 0000 linkw %fp,#0
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_unlock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_release (lock);
4bd42: 2f39 0006 463e movel 6463e <bdbuf_cache+0x2a>,%sp@- 4bd48: 4eb9 0004 7dfc jsr 47dfc <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL)
4bd4e: 588f addql #4,%sp 4bd50: 4a80 tstl %d0
4bd52: 6604 bnes 4bd58 <rtems_bdbuf_unlock_sync+0x1a> <== NEVER TAKEN
static void
rtems_bdbuf_unlock_sync (void)
{
rtems_bdbuf_unlock (bdbuf_cache.sync_lock,
RTEMS_BLKDEV_FATAL_BDBUF_SYNC_UNLOCK);
}
4bd54: 4e5e unlk %fp 4bd56: 4e75 rts
static void
rtems_bdbuf_unlock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_release (lock);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (fatal_error_code);
4bd58: 2f3c 4200 000c movel #1107296268,%sp@- <== NOT EXECUTED 4bd5e: 4eb9 0004 83dc jsr 483dc <rtems_fatal_error_occurred> <== NOT EXECUTED
0004bdd4 <rtems_bdbuf_wait_for_event>:
return RTEMS_UNSATISFIED;
}
static void
rtems_bdbuf_wait_for_event (rtems_event_set event)
{
4bdd4: 4e56 fffc linkw %fp,#-4
rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_event_set out = 0;
4bdd8: 204e moveal %fp,%a0
return RTEMS_UNSATISFIED;
}
static void
rtems_bdbuf_wait_for_event (rtems_event_set event)
{
4bdda: 2f02 movel %d2,%sp@- 4bddc: 242e 0008 movel %fp@(8),%d2
rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_event_set out = 0;
4bde0: 42a0 clrl %a0@-
sc = rtems_event_receive (event,
4bde2: 2f08 movel %a0,%sp@- 4bde4: 42a7 clrl %sp@- 4bde6: 42a7 clrl %sp@- 4bde8: 2f02 movel %d2,%sp@- 4bdea: 4eb9 0004 75f4 jsr 475f4 <rtems_event_receive>
RTEMS_EVENT_ALL | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&out);
if (sc != RTEMS_SUCCESSFUL || out != event)
4bdf0: 4fef 0010 lea %sp@(16),%sp 4bdf4: 4a80 tstl %d0
4bdf6: 660e bnes 4be06 <rtems_bdbuf_wait_for_event+0x32><== NEVER TAKEN
4bdf8: b4ae fffc cmpl %fp@(-4),%d2
4bdfc: 6608 bnes 4be06 <rtems_bdbuf_wait_for_event+0x32><== NEVER TAKEN
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_WAIT_EVNT);
}
4bdfe: 242e fff8 movel %fp@(-8),%d2 4be02: 4e5e unlk %fp 4be04: 4e75 rts
RTEMS_EVENT_ALL | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&out);
if (sc != RTEMS_SUCCESSFUL || out != event)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_WAIT_EVNT);
4be06: 2f3c 4200 001a movel #1107296282,%sp@- <== NOT EXECUTED 4be0c: 4eb9 0004 83dc jsr 483dc <rtems_fatal_error_occurred> <== NOT EXECUTED
0004bf7a <rtems_bdbuf_wake>:
* Wake a blocked resource. The resource has a counter that lets us know if
* there are any waiters.
*/
static void
rtems_bdbuf_wake (const rtems_bdbuf_waiters *waiters)
{
4bf7a: 4e56 0000 linkw %fp,#0 4bf7e: 206e 0008 moveal %fp@(8),%a0
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (waiters->count > 0)
4bf82: 2010 movel %a0@,%d0
4bf84: 6604 bnes 4bf8a <rtems_bdbuf_wake+0x10>
{
sc = rtems_semaphore_flush (waiters->sema);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_CACHE_WAKE);
}
}
4bf86: 4e5e unlk %fp 4bf88: 4e75 rts
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (waiters->count > 0)
{
sc = rtems_semaphore_flush (waiters->sema);
4bf8a: 2f28 0004 movel %a0@(4),%sp@- 4bf8e: 4eb9 0005 07c0 jsr 507c0 <rtems_semaphore_flush>
if (sc != RTEMS_SUCCESSFUL)
4bf94: 588f addql #4,%sp 4bf96: 4a80 tstl %d0
4bf98: 67ec beqs 4bf86 <rtems_bdbuf_wake+0xc> <== ALWAYS TAKEN
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_CACHE_WAKE);
4bf9a: 2f3c 4200 0013 movel #1107296275,%sp@- <== NOT EXECUTED 4bfa0: 4eb9 0004 83dc jsr 483dc <rtems_fatal_error_occurred> <== NOT EXECUTED
0004bd88 <rtems_bdbuf_wake_swapper>:
}
}
static void
rtems_bdbuf_wake_swapper (void)
{
4bd88: 4e56 0000 linkw %fp,#0
rtems_status_code sc = rtems_event_send (bdbuf_cache.swapout,
4bd8c: 4878 0004 pea 4 <CONTEXT_ARG> 4bd90: 2f39 0006 4614 movel 64614 <bdbuf_cache>,%sp@- 4bd96: 4eb9 0004 77a0 jsr 477a0 <rtems_event_send>
RTEMS_BDBUF_SWAPOUT_SYNC);
if (sc != RTEMS_SUCCESSFUL)
4bd9c: 508f addql #8,%sp 4bd9e: 4a80 tstl %d0
4bda0: 6604 bnes 4bda6 <rtems_bdbuf_wake_swapper+0x1e> <== NEVER TAKEN
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WAKE);
}
4bda2: 4e5e unlk %fp 4bda4: 4e75 rts
rtems_bdbuf_wake_swapper (void)
{
rtems_status_code sc = rtems_event_send (bdbuf_cache.swapout,
RTEMS_BDBUF_SWAPOUT_SYNC);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WAKE);
4bda6: 2f3c 4200 0014 movel #1107296276,%sp@- <== NOT EXECUTED 4bdac: 4eb9 0004 83dc jsr 483dc <rtems_fatal_error_occurred> <== NOT EXECUTED
0004e1e4 <rtems_blkdev_generic_ioctl>:
rtems_device_driver
rtems_blkdev_generic_ioctl(
rtems_device_major_number major __attribute__((unused)),
rtems_device_minor_number minor __attribute__((unused)),
void * arg)
{
4e1e4: 4e56 0000 linkw %fp,#0 4e1e8: 2f0a movel %a2,%sp@- 4e1ea: 246e 0010 moveal %fp@(16),%a2
rtems_libio_ioctl_args_t *args = arg;
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
4e1ee: 2052 moveal %a2@,%a0
int rc;
switch (args->command)
4e1f0: 202a 0004 movel %a2@(4),%d0
rtems_device_minor_number minor __attribute__((unused)),
void * arg)
{
rtems_libio_ioctl_args_t *args = arg;
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
4e1f4: 2068 0034 moveal %a0@(52),%a0
int rc;
switch (args->command)
4e1f8: 0c80 4004 4203 cmpil #1074020867,%d0 4e1fe: 6700 00c2 beqw 4e2c2 <rtems_blkdev_generic_ioctl+0xde>
4e202: 633a blss 4e23e <rtems_blkdev_generic_ioctl+0x5a><== NEVER TAKEN
4e204: 0c80 8004 4204 cmpil #-2147204604,%d0
4e20a: 677e beqs 4e28a <rtems_blkdev_generic_ioctl+0xa6><== ALWAYS TAKEN
4e20c: 0c80 c018 4201 cmpil #-1072152063,%d0 <== NOT EXECUTED 4e212: 6750 beqs 4e264 <rtems_blkdev_generic_ioctl+0x80><== NOT EXECUTED 4e214: 0c80 4004 4205 cmpil #1074020869,%d0 <== NOT EXECUTED 4e21a: 6758 beqs 4e274 <rtems_blkdev_generic_ioctl+0x90><== NOT EXECUTED
*/
args->ioctl_return = (uint32_t) -1;
break;
default:
args->ioctl_return = (uint32_t) dd->ioctl(dd->phys_dev,
4e21c: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 4e220: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4e222: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 4e226: 2068 0028 moveal %a0@(40),%a0 <== NOT EXECUTED 4e22a: 4e90 jsr %a0@ <== NOT EXECUTED
args->command,
args->buffer);
break;
4e22c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
*/
args->ioctl_return = (uint32_t) -1;
break;
default:
args->ioctl_return = (uint32_t) dd->ioctl(dd->phys_dev,
4e230: 2540 000c movel %d0,%a2@(12) <== NOT EXECUTED
args->buffer);
break;
}
return RTEMS_SUCCESSFUL;
}
4e234: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4e238: 4280 clrl %d0 <== NOT EXECUTED 4e23a: 4e5e unlk %fp <== NOT EXECUTED 4e23c: 4e75 rts <== NOT EXECUTED
rtems_libio_ioctl_args_t *args = arg;
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
int rc;
switch (args->command)
4e23e: 0c80 2000 4206 cmpil #536887814,%d0 <== NOT EXECUTED 4e244: 675a beqs 4e2a0 <rtems_blkdev_generic_ioctl+0xbc><== NOT EXECUTED 4e246: 0c80 4004 4202 cmpil #1074020866,%d0 <== NOT EXECUTED 4e24c: 66ce bnes 4e21c <rtems_blkdev_generic_ioctl+0x38><== NOT EXECUTED
{
case RTEMS_BLKIO_GETMEDIABLKSIZE:
*((uint32_t *) args->buffer) = dd->media_block_size;
4e24e: 226a 0008 moveal %a2@(8),%a1 <== NOT EXECUTED
args->buffer);
break;
}
return RTEMS_SUCCESSFUL;
}
4e252: 4280 clrl %d0 <== NOT EXECUTED
int rc;
switch (args->command)
{
case RTEMS_BLKIO_GETMEDIABLKSIZE:
*((uint32_t *) args->buffer) = dd->media_block_size;
4e254: 22a8 0024 movel %a0@(36),%a1@ <== NOT EXECUTED
args->ioctl_return = 0;
4e258: 42aa 000c clrl %a2@(12) <== NOT EXECUTED
args->buffer);
break;
}
return RTEMS_SUCCESSFUL;
}
4e25c: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4e260: 4e5e unlk %fp <== NOT EXECUTED 4e262: 4e75 rts <== NOT EXECUTED
case RTEMS_BLKIO_REQUEST:
/*
* It is not allowed to directly access the driver circumventing
* the cache.
*/
args->ioctl_return = (uint32_t) -1;
4e264: 70ff moveq #-1,%d0 <== NOT EXECUTED 4e266: 2540 000c movel %d0,%a2@(12) <== NOT EXECUTED
args->buffer);
break;
}
return RTEMS_SUCCESSFUL;
}
4e26a: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4e26e: 4280 clrl %d0 <== NOT EXECUTED 4e270: 4e5e unlk %fp <== NOT EXECUTED 4e272: 4e75 rts <== NOT EXECUTED
dd->block_size = *((uint32_t *) args->buffer);
args->ioctl_return = 0;
break;
case RTEMS_BLKIO_GETSIZE:
*((rtems_blkdev_bnum *) args->buffer) = dd->size;
4e274: 226a 0008 moveal %a2@(8),%a1 <== NOT EXECUTED
args->buffer);
break;
}
return RTEMS_SUCCESSFUL;
}
4e278: 4280 clrl %d0 <== NOT EXECUTED
dd->block_size = *((uint32_t *) args->buffer);
args->ioctl_return = 0;
break;
case RTEMS_BLKIO_GETSIZE:
*((rtems_blkdev_bnum *) args->buffer) = dd->size;
4e27a: 22a8 001c movel %a0@(28),%a1@ <== NOT EXECUTED
args->ioctl_return = 0;
4e27e: 42aa 000c clrl %a2@(12) <== NOT EXECUTED
args->buffer);
break;
}
return RTEMS_SUCCESSFUL;
}
4e282: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4e286: 4e5e unlk %fp <== NOT EXECUTED 4e288: 4e75 rts <== NOT EXECUTED
*((uint32_t *) args->buffer) = dd->block_size;
args->ioctl_return = 0;
break;
case RTEMS_BLKIO_SETBLKSIZE:
dd->block_size = *((uint32_t *) args->buffer);
4e28a: 226a 0008 moveal %a2@(8),%a1
args->buffer);
break;
}
return RTEMS_SUCCESSFUL;
}
4e28e: 4280 clrl %d0
*((uint32_t *) args->buffer) = dd->block_size;
args->ioctl_return = 0;
break;
case RTEMS_BLKIO_SETBLKSIZE:
dd->block_size = *((uint32_t *) args->buffer);
4e290: 2151 0020 movel %a1@,%a0@(32)
args->ioctl_return = 0;
4e294: 42aa 000c clrl %a2@(12)
args->buffer);
break;
}
return RTEMS_SUCCESSFUL;
}
4e298: 246e fffc moveal %fp@(-4),%a2 4e29c: 4e5e unlk %fp 4e29e: 4e75 rts
*((rtems_blkdev_bnum *) args->buffer) = dd->size;
args->ioctl_return = 0;
break;
case RTEMS_BLKIO_SYNCDEV:
rc = rtems_bdbuf_syncdev(dd->dev);
4e2a0: 2f28 0004 movel %a0@(4),%sp@- <== NOT EXECUTED 4e2a4: 2f10 movel %a0@,%sp@- <== NOT EXECUTED 4e2a6: 4eb9 0004 decc jsr 4decc <rtems_bdbuf_syncdev> <== NOT EXECUTED
args->ioctl_return = (uint32_t) (rc == RTEMS_SUCCESSFUL ? 0 : -1);
4e2ac: 508f addql #8,%sp <== NOT EXECUTED 4e2ae: 4a80 tstl %d0 <== NOT EXECUTED 4e2b0: 56c0 sne %d0 <== NOT EXECUTED 4e2b2: 49c0 extbl %d0 <== NOT EXECUTED 4e2b4: 2540 000c movel %d0,%a2@(12) <== NOT EXECUTED
args->buffer);
break;
}
return RTEMS_SUCCESSFUL;
}
4e2b8: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4e2bc: 4280 clrl %d0 <== NOT EXECUTED 4e2be: 4e5e unlk %fp <== NOT EXECUTED 4e2c0: 4e75 rts <== NOT EXECUTED
*((uint32_t *) args->buffer) = dd->media_block_size;
args->ioctl_return = 0;
break;
case RTEMS_BLKIO_GETBLKSIZE:
*((uint32_t *) args->buffer) = dd->block_size;
4e2c2: 226a 0008 moveal %a2@(8),%a1 <== NOT EXECUTED
args->buffer);
break;
}
return RTEMS_SUCCESSFUL;
}
4e2c6: 4280 clrl %d0 <== NOT EXECUTED
*((uint32_t *) args->buffer) = dd->media_block_size;
args->ioctl_return = 0;
break;
case RTEMS_BLKIO_GETBLKSIZE:
*((uint32_t *) args->buffer) = dd->block_size;
4e2c8: 22a8 0020 movel %a0@(32),%a1@ <== NOT EXECUTED
args->ioctl_return = 0;
4e2cc: 42aa 000c clrl %a2@(12) <== NOT EXECUTED
args->buffer);
break;
}
return RTEMS_SUCCESSFUL;
}
4e2d0: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4e2d4: 4e5e unlk %fp <== NOT EXECUTED
0004e190 <rtems_blkdev_generic_open>:
rtems_device_driver
rtems_blkdev_generic_open(
rtems_device_major_number major,
rtems_device_minor_number minor,
void * arg)
{
4e190: 4e56 0000 linkw %fp,#0
rtems_libio_open_close_args_t *oc = arg; rtems_libio_t *iop = oc->iop;
4e194: 206e 0010 moveal %fp@(16),%a0
rtems_device_driver
rtems_blkdev_generic_open(
rtems_device_major_number major,
rtems_device_minor_number minor,
void * arg)
{
4e198: 2f0a movel %a2,%sp@-
rtems_libio_open_close_args_t *oc = arg; rtems_libio_t *iop = oc->iop;
4e19a: 2450 moveal %a0@,%a2
temp.__overlay.minor = _minor;
4e19c: 222e 000c movel %fp@(12),%d1
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
4e1a0: 202e 0008 movel %fp@(8),%d0
dev_t dev = rtems_filesystem_make_dev_t(major, minor); rtems_disk_device *dd = rtems_disk_obtain(dev);
4e1a4: 2f01 movel %d1,%sp@- 4e1a6: 2f00 movel %d0,%sp@- 4e1a8: 4eb9 0004 32a6 jsr 432a6 <rtems_disk_obtain>
iop->data1 = dd;
if (dd != NULL)
4e1ae: 508f addql #8,%sp
rtems_libio_open_close_args_t *oc = arg;
rtems_libio_t *iop = oc->iop;
dev_t dev = rtems_filesystem_make_dev_t(major, minor);
rtems_disk_device *dd = rtems_disk_obtain(dev);
iop->data1 = dd;
4e1b0: 2540 0034 movel %d0,%a2@(52)
if (dd != NULL)
4e1b4: 670a beqs 4e1c0 <rtems_blkdev_generic_open+0x30> <== NEVER TAKEN
return RTEMS_SUCCESSFUL;
else
return RTEMS_UNSATISFIED;
}
4e1b6: 246e fffc moveal %fp@(-4),%a2
rtems_disk_device *dd = rtems_disk_obtain(dev);
iop->data1 = dd;
if (dd != NULL)
return RTEMS_SUCCESSFUL;
4e1ba: 4280 clrl %d0
else
return RTEMS_UNSATISFIED;
}
4e1bc: 4e5e unlk %fp 4e1be: 4e75 rts
4e1c0: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
iop->data1 = dd;
if (dd != NULL)
return RTEMS_SUCCESSFUL;
else
return RTEMS_UNSATISFIED;
4e1c4: 700d moveq #13,%d0 <== NOT EXECUTED
}
4e1c6: 4e5e unlk %fp <== NOT EXECUTED
0004df9c <rtems_blkdev_generic_read>:
rtems_device_driver
rtems_blkdev_generic_read(
rtems_device_major_number major __attribute__((unused)),
rtems_device_minor_number minor __attribute__((unused)),
void * arg)
{
4df9c: 4e56 ffc4 linkw %fp,#-60 4dfa0: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4dfa4: 246e 0010 moveal %fp@(16),%a2
rtems_status_code rc = RTEMS_SUCCESSFUL;
rtems_libio_rw_args_t *args = arg;
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
4dfa8: 2052 moveal %a2@,%a0 4dfaa: 2068 0034 moveal %a0@(52),%a0
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
uint32_t count = args->count;
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
uint32_t blkofs = (uint32_t) (args->offset % block_size);
dev_t dev = dd->dev;
4dfae: 2010 movel %a0@,%d0 4dfb0: 2228 0004 movel %a0@(4),%d1
{
rtems_status_code rc = RTEMS_SUCCESSFUL;
rtems_libio_rw_args_t *args = arg;
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
uint32_t block_size = dd->block_size;
4dfb4: 2a28 0020 movel %a0@(32),%d5
char *buf = args->buffer;
uint32_t count = args->count;
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
uint32_t blkofs = (uint32_t) (args->offset % block_size);
dev_t dev = dd->dev;
4dfb8: 2d40 fff4 movel %d0,%fp@(-12) 4dfbc: 2d41 fff8 movel %d1,%fp@(-8)
rtems_status_code rc = RTEMS_SUCCESSFUL;
rtems_libio_rw_args_t *args = arg;
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
4dfc0: 282a 000c movel %a2@(12),%d4
uint32_t count = args->count;
4dfc4: 242a 0010 movel %a2@(16),%d2
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
4dfc8: 206a 0004 moveal %a2@(4),%a0 4dfcc: 226a 0008 moveal %a2@(8),%a1
uint32_t blkofs = (uint32_t) (args->offset % block_size);
dev_t dev = dd->dev;
args->bytes_moved = 0;
4dfd0: 42aa 0018 clrl %a2@(24)
while (count > 0)
4dfd4: 4a82 tstl %d2 4dfd6: 6700 00a8 beqw 4e080 <rtems_blkdev_generic_read+0xe4>
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
uint32_t count = args->count;
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
4dfda: 2f05 movel %d5,%sp@- 4dfdc: 4286 clrl %d6 4dfde: 47f9 0004 d978 lea 4d978 <rtems_bdbuf_read>,%a3
if (rc != RTEMS_SUCCESSFUL)
break;
copy = block_size - blkofs;
if (copy > count)
copy = count;
memcpy(buf, (char *)diskbuf->buffer + blkofs, copy);
4dfe4: 49f9 0005 39a4 lea 539a4 <memcpy>,%a4
rc = rtems_bdbuf_release(diskbuf);
4dfea: 4bf9 0004 dc20 lea 4dc20 <rtems_bdbuf_release>,%a5
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
uint32_t count = args->count;
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
4dff0: 2f06 movel %d6,%sp@- 4dff2: 2f09 movel %a1,%sp@- 4dff4: 2d48 fff0 movel %a0,%fp@(-16) 4dff8: 2f08 movel %a0,%sp@- 4dffa: 2d49 ffec movel %a1,%fp@(-20) 4dffe: 4eb9 0005 f6d0 jsr 5f6d0 <__divdi3> 4e004: 4fef 0010 lea %sp@(16),%sp 4e008: 2601 movel %d1,%d3
uint32_t blkofs = (uint32_t) (args->offset % block_size);
4e00a: 2f05 movel %d5,%sp@- 4e00c: 226e ffec moveal %fp@(-20),%a1 4e010: 2f06 movel %d6,%sp@- 4e012: 206e fff0 moveal %fp@(-16),%a0 4e016: 2f09 movel %a1,%sp@- 4e018: 2f08 movel %a0,%sp@- 4e01a: 4eb9 0005 fb18 jsr 5fb18 <__moddi3> 4e020: 4fef 0010 lea %sp@(16),%sp 4e024: 2e01 movel %d1,%d7
while (count > 0)
{
rtems_bdbuf_buffer *diskbuf;
uint32_t copy;
rc = rtems_bdbuf_read(dev, block, &diskbuf);
4e026: 486e fffc pea %fp@(-4)
if (rc != RTEMS_SUCCESSFUL)
break;
copy = block_size - blkofs;
4e02a: 2c05 movel %d5,%d6 4e02c: 9c87 subl %d7,%d6
while (count > 0)
{
rtems_bdbuf_buffer *diskbuf;
uint32_t copy;
rc = rtems_bdbuf_read(dev, block, &diskbuf);
4e02e: 2f03 movel %d3,%sp@- 4e030: 2f2e fff8 movel %fp@(-8),%sp@-
if (rc != RTEMS_SUCCESSFUL)
break;
count -= copy;
buf += copy;
blkofs = 0;
block++;
4e034: 5283 addql #1,%d3
while (count > 0)
{
rtems_bdbuf_buffer *diskbuf;
uint32_t copy;
rc = rtems_bdbuf_read(dev, block, &diskbuf);
4e036: 2f2e fff4 movel %fp@(-12),%sp@- 4e03a: 4e93 jsr %a3@
if (rc != RTEMS_SUCCESSFUL)
4e03c: 4fef 0010 lea %sp@(16),%sp 4e040: 4a80 tstl %d0
4e042: 6632 bnes 4e076 <rtems_blkdev_generic_read+0xda> <== NEVER TAKEN
break;
copy = block_size - blkofs;
if (copy > count)
copy = count;
memcpy(buf, (char *)diskbuf->buffer + blkofs, copy);
4e044: 206e fffc moveal %fp@(-4),%a0
uint32_t copy;
rc = rtems_bdbuf_read(dev, block, &diskbuf);
if (rc != RTEMS_SUCCESSFUL)
break;
copy = block_size - blkofs;
4e048: b486 cmpl %d6,%d2
4e04a: 6402 bccs 4e04e <rtems_blkdev_generic_read+0xb2> <== ALWAYS TAKEN
4e04c: 2c02 movel %d2,%d6 <== NOT EXECUTED
if (copy > count)
copy = count;
memcpy(buf, (char *)diskbuf->buffer + blkofs, copy);
4e04e: 2f06 movel %d6,%sp@- 4e050: dea8 001e addl %a0@(30),%d7
rc = rtems_bdbuf_release(diskbuf);
args->bytes_moved += copy;
if (rc != RTEMS_SUCCESSFUL)
break;
count -= copy;
4e054: 9486 subl %d6,%d2
if (rc != RTEMS_SUCCESSFUL)
break;
copy = block_size - blkofs;
if (copy > count)
copy = count;
memcpy(buf, (char *)diskbuf->buffer + blkofs, copy);
4e056: 2f07 movel %d7,%sp@-
args->bytes_moved += copy;
if (rc != RTEMS_SUCCESSFUL)
break;
count -= copy;
buf += copy;
blkofs = 0;
4e058: 4287 clrl %d7
if (rc != RTEMS_SUCCESSFUL)
break;
copy = block_size - blkofs;
if (copy > count)
copy = count;
memcpy(buf, (char *)diskbuf->buffer + blkofs, copy);
4e05a: 2f04 movel %d4,%sp@-
rc = rtems_bdbuf_release(diskbuf);
args->bytes_moved += copy;
if (rc != RTEMS_SUCCESSFUL)
break;
count -= copy;
buf += copy;
4e05c: d886 addl %d6,%d4
if (rc != RTEMS_SUCCESSFUL)
break;
copy = block_size - blkofs;
if (copy > count)
copy = count;
memcpy(buf, (char *)diskbuf->buffer + blkofs, copy);
4e05e: 4e94 jsr %a4@
rc = rtems_bdbuf_release(diskbuf);
4e060: 2f2e fffc movel %fp@(-4),%sp@- 4e064: 4e95 jsr %a5@
args->bytes_moved += copy;
if (rc != RTEMS_SUCCESSFUL)
4e066: 4fef 0010 lea %sp@(16),%sp
copy = block_size - blkofs;
if (copy > count)
copy = count;
memcpy(buf, (char *)diskbuf->buffer + blkofs, copy);
rc = rtems_bdbuf_release(diskbuf);
args->bytes_moved += copy;
4e06a: ddaa 0018 addl %d6,%a2@(24)
if (rc != RTEMS_SUCCESSFUL)
4e06e: 4a80 tstl %d0
4e070: 6604 bnes 4e076 <rtems_blkdev_generic_read+0xda> <== NEVER TAKEN
uint32_t blkofs = (uint32_t) (args->offset % block_size);
dev_t dev = dd->dev;
args->bytes_moved = 0;
while (count > 0)
4e072: 4a82 tstl %d2
4e074: 66b0 bnes 4e026 <rtems_blkdev_generic_read+0x8a> <== NEVER TAKEN
blkofs = 0;
block++;
}
return rc;
}
4e076: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 4e07c: 4e5e unlk %fp 4e07e: 4e75 rts
rtems_blkdev_generic_read(
rtems_device_major_number major __attribute__((unused)),
rtems_device_minor_number minor __attribute__((unused)),
void * arg)
{
rtems_status_code rc = RTEMS_SUCCESSFUL;
4e080: 4280 clrl %d0 <== NOT EXECUTED
blkofs = 0;
block++;
}
return rc;
}
4e082: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4e088: 4e5e unlk %fp <== NOT EXECUTED
0004e08c <rtems_blkdev_generic_write>:
rtems_device_driver
rtems_blkdev_generic_write(
rtems_device_major_number major __attribute__((unused)),
rtems_device_minor_number minor __attribute__((unused)),
void * arg)
{
4e08c: 4e56 ffcc linkw %fp,#-52 4e090: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4e094: 246e 0010 moveal %fp@(16),%a2
rtems_status_code rc = RTEMS_SUCCESSFUL;
rtems_libio_rw_args_t *args = arg;
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
4e098: 2052 moveal %a2@,%a0 4e09a: 2068 0034 moveal %a0@(52),%a0
uint32_t block_size = dd->block_size;
4e09e: 2a28 0020 movel %a0@(32),%d5
char *buf = args->buffer;
uint32_t count = args->count;
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
uint32_t blkofs = (uint32_t) (args->offset % block_size);
dev_t dev = dd->dev;
4e0a2: 2c10 movel %a0@,%d6 4e0a4: 2e28 0004 movel %a0@(4),%d7
rtems_status_code rc = RTEMS_SUCCESSFUL;
rtems_libio_rw_args_t *args = arg;
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
4e0a8: 282a 000c movel %a2@(12),%d4
uint32_t count = args->count;
4e0ac: 242a 0010 movel %a2@(16),%d2
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
4e0b0: 206a 0004 moveal %a2@(4),%a0 4e0b4: 226a 0008 moveal %a2@(8),%a1
uint32_t blkofs = (uint32_t) (args->offset % block_size);
dev_t dev = dd->dev;
args->bytes_moved = 0;
4e0b8: 42aa 0018 clrl %a2@(24)
while (count > 0)
4e0bc: 4a82 tstl %d2 4e0be: 6700 00c4 beqw 4e184 <rtems_blkdev_generic_write+0xf8>
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
uint32_t count = args->count;
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
4e0c2: 2f05 movel %d5,%sp@- 4e0c4: 99cc subal %a4,%a4 4e0c6: 4bee fffc lea %fp@(-4),%a5 4e0ca: 2f0c movel %a4,%sp@- 4e0cc: 2f09 movel %a1,%sp@- 4e0ce: 2d48 fff8 movel %a0,%fp@(-8) 4e0d2: 2f08 movel %a0,%sp@- 4e0d4: 2d49 fff4 movel %a1,%fp@(-12) 4e0d8: 4eb9 0005 f6d0 jsr 5f6d0 <__divdi3> 4e0de: 4fef 0010 lea %sp@(16),%sp 4e0e2: 2601 movel %d1,%d3
uint32_t blkofs = (uint32_t) (args->offset % block_size);
4e0e4: 2f05 movel %d5,%sp@- 4e0e6: 226e fff4 moveal %fp@(-12),%a1 4e0ea: 2f0c movel %a4,%sp@- 4e0ec: 206e fff8 moveal %fp@(-8),%a0 4e0f0: 2f09 movel %a1,%sp@- 4e0f2: 2f08 movel %a0,%sp@- 4e0f4: 4eb9 0005 fb18 jsr 5fb18 <__moddi3> 4e0fa: 4fef 0010 lea %sp@(16),%sp 4e0fe: 2641 moveal %d1,%a3
while (count > 0)
{
rtems_bdbuf_buffer *diskbuf;
uint32_t copy;
if ((blkofs == 0) && (count >= block_size))
4e100: 4a81 tstl %d1
4e102: 6604 bnes 4e108 <rtems_blkdev_generic_write+0x7c><== NEVER TAKEN
4e104: b485 cmpl %d5,%d2
4e106: 645c bccs 4e164 <rtems_blkdev_generic_write+0xd8><== ALWAYS TAKEN
rc = rtems_bdbuf_get(dev, block, &diskbuf);
else
rc = rtems_bdbuf_read(dev, block, &diskbuf);
4e108: 2f0d movel %a5,%sp@- <== NOT EXECUTED 4e10a: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4e10c: 2f07 movel %d7,%sp@- <== NOT EXECUTED 4e10e: 2f06 movel %d6,%sp@- <== NOT EXECUTED 4e110: 4eb9 0004 d978 jsr 4d978 <rtems_bdbuf_read> <== NOT EXECUTED 4e116: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
if (rc != RTEMS_SUCCESSFUL)
4e11a: 4a80 tstl %d0 <== NOT EXECUTED 4e11c: 665c bnes 4e17a <rtems_blkdev_generic_write+0xee><== NOT EXECUTED
break;
copy = block_size - blkofs;
4e11e: 2845 moveal %d5,%a4 4e120: 99cb subal %a3,%a4 4e122: b48c cmpl %a4,%d2
4e124: 6402 bccs 4e128 <rtems_blkdev_generic_write+0x9c><== ALWAYS TAKEN
4e126: 2842 moveal %d2,%a4 <== NOT EXECUTED
if (copy > count)
copy = count;
memcpy((char *)diskbuf->buffer + blkofs, buf, copy);
4e128: 2f0c movel %a4,%sp@- 4e12a: 206e fffc moveal %fp@(-4),%a0 4e12e: 2f04 movel %d4,%sp@- 4e130: d7e8 001e addal %a0@(30),%a3 4e134: 2f0b movel %a3,%sp@- 4e136: 4eb9 0005 39a4 jsr 539a4 <memcpy>
args->bytes_moved += copy;
rc = rtems_bdbuf_release_modified(diskbuf);
4e13c: 2f2e fffc movel %fp@(-4),%sp@-
copy = block_size - blkofs;
if (copy > count)
copy = count;
memcpy((char *)diskbuf->buffer + blkofs, buf, copy);
args->bytes_moved += copy;
4e140: 200c movel %a4,%d0 4e142: d1aa 0018 addl %d0,%a2@(24)
rc = rtems_bdbuf_release_modified(diskbuf);
4e146: 4eb9 0004 dcec jsr 4dcec <rtems_bdbuf_release_modified>
if (rc != RTEMS_SUCCESSFUL)
4e14c: 4fef 0010 lea %sp@(16),%sp 4e150: 4a80 tstl %d0
4e152: 6626 bnes 4e17a <rtems_blkdev_generic_write+0xee><== NEVER TAKEN
break;
count -= copy;
4e154: 948c subl %a4,%d2
buf += copy;
4e156: d88c addl %a4,%d4
blkofs = 0;
block++;
4e158: 5283 addql #1,%d3
uint32_t blkofs = (uint32_t) (args->offset % block_size);
dev_t dev = dd->dev;
args->bytes_moved = 0;
while (count > 0)
4e15a: 4a82 tstl %d2
4e15c: 671c beqs 4e17a <rtems_blkdev_generic_write+0xee><== ALWAYS TAKEN
if (rc != RTEMS_SUCCESSFUL)
break;
count -= copy;
buf += copy;
blkofs = 0;
4e15e: 97cb subal %a3,%a3 <== NOT EXECUTED
while (count > 0)
{
rtems_bdbuf_buffer *diskbuf;
uint32_t copy;
if ((blkofs == 0) && (count >= block_size))
4e160: b485 cmpl %d5,%d2 <== NOT EXECUTED 4e162: 65a4 bcss 4e108 <rtems_blkdev_generic_write+0x7c><== NOT EXECUTED
rc = rtems_bdbuf_get(dev, block, &diskbuf);
4e164: 2f0d movel %a5,%sp@- 4e166: 2f03 movel %d3,%sp@- 4e168: 2f07 movel %d7,%sp@- 4e16a: 2f06 movel %d6,%sp@- 4e16c: 4eb9 0004 d884 jsr 4d884 <rtems_bdbuf_get> 4e172: 4fef 0010 lea %sp@(16),%sp
else
rc = rtems_bdbuf_read(dev, block, &diskbuf);
if (rc != RTEMS_SUCCESSFUL)
4e176: 4a80 tstl %d0
4e178: 67a4 beqs 4e11e <rtems_blkdev_generic_write+0x92><== ALWAYS TAKEN
blkofs = 0;
block++;
}
return rc;
}
4e17a: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4e180: 4e5e unlk %fp 4e182: 4e75 rts
rtems_blkdev_generic_write(
rtems_device_major_number major __attribute__((unused)),
rtems_device_minor_number minor __attribute__((unused)),
void * arg)
{
rtems_status_code rc = RTEMS_SUCCESSFUL;
4e184: 4280 clrl %d0 <== NOT EXECUTED
blkofs = 0;
block++;
}
return rc;
}
4e186: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4e18c: 4e5e unlk %fp <== NOT EXECUTED
0004e2d8 <rtems_blkdev_ioctl>:
int
rtems_blkdev_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
4e2d8: 4e56 0000 linkw %fp,#0 4e2dc: 226e 0008 moveal %fp@(8),%a1 4e2e0: 202e 000c movel %fp@(12),%d0 4e2e4: 206e 0010 moveal %fp@(16),%a0
size_t *arg_size = argp;
int rc = 0;
switch (req)
4e2e8: 0c80 4004 4203 cmpil #1074020867,%d0
4e2ee: 6740 beqs 4e330 <rtems_blkdev_ioctl+0x58> <== NEVER TAKEN
4e2f0: 6322 blss 4e314 <rtems_blkdev_ioctl+0x3c>
4e2f2: 0c80 4004 4205 cmpil #1074020869,%d0
4e2f8: 6740 beqs 4e33a <rtems_blkdev_ioctl+0x62> <== NEVER TAKEN
4e2fa: 0c80 8004 4204 cmpil #-2147204604,%d0
4e300: 6724 beqs 4e326 <rtems_blkdev_ioctl+0x4e> <== ALWAYS TAKEN
case RTEMS_BLKIO_GETSIZE:
*arg_size = dd->size;
break;
default:
errno = EINVAL;
4e302: 4eb9 0005 3184 jsr 53184 <__errno> 4e308: 7216 moveq #22,%d1 4e30a: 2040 moveal %d0,%a0
rc = -1;
4e30c: 70ff moveq #-1,%d0
break;
}
return rc;
}
4e30e: 4e5e unlk %fp
case RTEMS_BLKIO_GETSIZE:
*arg_size = dd->size;
break;
default:
errno = EINVAL;
4e310: 2081 movel %d1,%a0@
rc = -1;
break;
}
return rc;
}
4e312: 4e75 rts
rtems_blkdev_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
size_t *arg_size = argp;
int rc = 0;
switch (req)
4e314: 0c80 4004 4202 cmpil #1074020866,%d0
4e31a: 66e6 bnes 4e302 <rtems_blkdev_ioctl+0x2a> <== ALWAYS TAKEN
{
case RTEMS_BLKIO_GETMEDIABLKSIZE:
*arg_size = dd->media_block_size;
4e31c: 20a9 0024 movel %a1@(36),%a0@ <== NOT EXECUTED
int
rtems_blkdev_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
size_t *arg_size = argp;
int rc = 0;
4e320: 4280 clrl %d0 <== NOT EXECUTED
rc = -1;
break;
}
return rc;
}
4e322: 4e5e unlk %fp <== NOT EXECUTED 4e324: 4e75 rts <== NOT EXECUTED
case RTEMS_BLKIO_GETBLKSIZE:
*arg_size = dd->block_size;
break;
case RTEMS_BLKIO_SETBLKSIZE:
dd->block_size = *arg_size;
4e326: 2350 0020 movel %a0@,%a1@(32)
int
rtems_blkdev_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
size_t *arg_size = argp;
int rc = 0;
4e32a: 4280 clrl %d0
rc = -1;
break;
}
return rc;
}
4e32c: 4e5e unlk %fp 4e32e: 4e75 rts
case RTEMS_BLKIO_GETMEDIABLKSIZE:
*arg_size = dd->media_block_size;
break;
case RTEMS_BLKIO_GETBLKSIZE:
*arg_size = dd->block_size;
4e330: 20a9 0020 movel %a1@(32),%a0@ <== NOT EXECUTED
int
rtems_blkdev_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
size_t *arg_size = argp;
int rc = 0;
4e334: 4280 clrl %d0 <== NOT EXECUTED
rc = -1;
break;
}
return rc;
}
4e336: 4e5e unlk %fp <== NOT EXECUTED 4e338: 4e75 rts <== NOT EXECUTED
case RTEMS_BLKIO_SETBLKSIZE:
dd->block_size = *arg_size;
break;
case RTEMS_BLKIO_GETSIZE:
*arg_size = dd->size;
4e33a: 20a9 001c movel %a1@(28),%a0@ <== NOT EXECUTED
int
rtems_blkdev_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
size_t *arg_size = argp;
int rc = 0;
4e33e: 4280 clrl %d0 <== NOT EXECUTED
rc = -1;
break;
}
return rc;
}
4e340: 4e5e unlk %fp <== NOT EXECUTED
00042b28 <rtems_bsp_cmdline_get_param>:
const char *rtems_bsp_cmdline_get_param(
const char *name,
char *value,
size_t length
)
{
42b28: 4e56 ffe8 linkw %fp,#-24 42b2c: 202e 0008 movel %fp@(8),%d0 42b30: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ 42b34: 246e 000c moveal %fp@(12),%a2 42b38: 242e 0010 movel %fp@(16),%d2
const char *p;
if ( !name )
42b3c: 4a80 tstl %d0
42b3e: 6768 beqs 42ba8 <rtems_bsp_cmdline_get_param+0x80>
return NULL;
if ( !value )
42b40: 4a8a tstl %a2
42b42: 6754 beqs 42b98 <rtems_bsp_cmdline_get_param+0x70>
return NULL;
if ( !length )
42b44: 4a82 tstl %d2
42b46: 6760 beqs 42ba8 <rtems_bsp_cmdline_get_param+0x80>
return NULL;
value[0] = '\0';
42b48: 4212 clrb %a2@
p = rtems_bsp_cmdline_get_param_raw( name );
42b4a: 2f00 movel %d0,%sp@- 42b4c: 4eb9 0004 2bb8 jsr 42bb8 <rtems_bsp_cmdline_get_param_raw>
if ( !p )
42b52: 588f addql #4,%sp 42b54: 4a80 tstl %d0
42b56: 6750 beqs 42ba8 <rtems_bsp_cmdline_get_param+0x80>
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
42b58: 2040 moveal %d0,%a0 42b5a: 1210 moveb %a0@,%d1
42b5c: 673a beqs 42b98 <rtems_bsp_cmdline_get_param+0x70><== NEVER TAKEN
42b5e: 5382 subql #1,%d2
42b60: 6736 beqs 42b98 <rtems_bsp_cmdline_get_param+0x70><== NEVER TAKEN
value[i] = '\0';
}
}
const char *rtems_bsp_cmdline_get_param(
42b62: 2640 moveal %d0,%a3 42b64: 49ea 0001 lea %a2@(1),%a4 42b68: 528b addql #1,%a3
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
42b6a: 93c9 subal %a1,%a1
value[i] = '\0';
}
}
const char *rtems_bsp_cmdline_get_param(
42b6c: 91c8 subal %a0,%a0 42b6e: 4283 clrl %d3
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
if ( *p == '\"' ) {
42b70: 7822 moveq #34,%d4 42b72: 1001 moveb %d1,%d0 42b74: 49c0 extbl %d0 42b76: b880 cmpl %d0,%d4
42b78: 672a beqs 42ba4 <rtems_bsp_cmdline_get_param+0x7c>
quotes++;
} else if ( ((quotes % 2) == 0) && *p == ' ' )
42b7a: 0803 0000 btst #0,%d3
42b7e: 6606 bnes 42b86 <rtems_bsp_cmdline_get_param+0x5e>
42b80: 7820 moveq #32,%d4 42b82: b880 cmpl %d0,%d4
42b84: 6712 beqs 42b98 <rtems_bsp_cmdline_get_param+0x70>
break;
value[i++] = *p++;
42b86: 5288 addql #1,%a0 42b88: 1581 9800 moveb %d1,%a2@(00000000,%a1:l)
value[i] = '\0';
42b8c: 421c clrb %a4@+ 42b8e: 2248 moveal %a0,%a1
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
42b90: 121b moveb %a3@+,%d1
42b92: 6704 beqs 42b98 <rtems_bsp_cmdline_get_param+0x70>
42b94: b1c2 cmpal %d2,%a0
42b96: 65d8 bcss 42b70 <rtems_bsp_cmdline_get_param+0x48>
return NULL;
copy_string( p, value, length );
return value;
}
42b98: 200a movel %a2,%d0 42b9a: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 42ba0: 4e5e unlk %fp 42ba2: 4e75 rts
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
if ( *p == '\"' ) {
quotes++;
42ba4: 5283 addql #1,%d3 42ba6: 60de bras 42b86 <rtems_bsp_cmdline_get_param+0x5e>
value[0] = '\0';
p = rtems_bsp_cmdline_get_param_raw( name );
if ( !p )
return NULL;
42ba8: 95ca subal %a2,%a2
copy_string( p, value, length );
return value;
}
42baa: 200a movel %a2,%d0 42bac: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 42bb2: 4e5e unlk %fp
...
00042be0 <rtems_bsp_cmdline_get_param_rhs>:
const char *rtems_bsp_cmdline_get_param_rhs(
const char *name,
char *value,
size_t length
)
{
42be0: 4e56 fff0 linkw %fp,#-16 42be4: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
const char *p;
const char *rhs;
char *d;
p = rtems_bsp_cmdline_get_param( name, value, length );
42be8: 2f2e 0010 movel %fp@(16),%sp@-
const char *rtems_bsp_cmdline_get_param_rhs(
const char *name,
char *value,
size_t length
)
{
42bec: 246e 000c moveal %fp@(12),%a2 42bf0: 262e 0008 movel %fp@(8),%d3
const char *p;
const char *rhs;
char *d;
p = rtems_bsp_cmdline_get_param( name, value, length );
42bf4: 2f0a movel %a2,%sp@- 42bf6: 2f03 movel %d3,%sp@- 42bf8: 4eb9 0004 2b28 jsr 42b28 <rtems_bsp_cmdline_get_param>
if ( !p )
42bfe: 4fef 000c lea %sp@(12),%sp
{
const char *p;
const char *rhs;
char *d;
p = rtems_bsp_cmdline_get_param( name, value, length );
42c02: 2400 movel %d0,%d2
if ( !p )
42c04: 6760 beqs 42c66 <rtems_bsp_cmdline_get_param_rhs+0x86>
return NULL;
rhs = &p[strlen(name)];
42c06: 2f03 movel %d3,%sp@- 42c08: 4eb9 0005 0910 jsr 50910 <strlen> 42c0e: 588f addql #4,%sp 42c10: 2042 moveal %d2,%a0 42c12: d1c0 addal %d0,%a0
if ( *rhs != '=' )
42c14: 723d moveq #61,%d1 42c16: 1010 moveb %a0@,%d0 42c18: 49c0 extbl %d0 42c1a: b280 cmpl %d0,%d1
42c1c: 6648 bnes 42c66 <rtems_bsp_cmdline_get_param_rhs+0x86>
return NULL;
rhs++;
if ( *rhs == '\"' )
42c1e: 7422 moveq #34,%d2 42c20: 1228 0001 moveb %a0@(1),%d1 42c24: 1001 moveb %d1,%d0 42c26: 49c0 extbl %d0 42c28: b480 cmpl %d0,%d2
42c2a: 6748 beqs 42c74 <rtems_bsp_cmdline_get_param_rhs+0x94>
rhs = &p[strlen(name)];
if ( *rhs != '=' )
return NULL;
rhs++;
42c2c: 43e8 0001 lea %a0@(1),%a1
if ( *rhs == '\"' )
rhs++;
for ( d=value ; *rhs ; )
42c30: 4a01 tstb %d1
42c32: 674a beqs 42c7e <rtems_bsp_cmdline_get_param_rhs+0x9e>
42c34: 204a moveal %a2,%a0
#include <string.h>
#include <rtems/bspcmdline.h>
const char *rtems_bsp_cmdline_get_param_rhs(
42c36: 5289 addql #1,%a1
rhs++;
if ( *rhs == '\"' )
rhs++;
for ( d=value ; *rhs ; )
*d++ = *rhs++;
42c38: 10c1 moveb %d1,%a0@+
return NULL;
rhs++;
if ( *rhs == '\"' )
rhs++;
for ( d=value ; *rhs ; )
42c3a: 1019 moveb %a1@+,%d0
*d++ = *rhs++;
42c3c: 2648 moveal %a0,%a3
return NULL;
rhs++;
if ( *rhs == '\"' )
rhs++;
for ( d=value ; *rhs ; )
42c3e: 670a beqs 42c4a <rtems_bsp_cmdline_get_param_rhs+0x6a><== NEVER TAKEN
42c40: 1200 moveb %d0,%d1
*d++ = *rhs++;
42c42: 10c1 moveb %d1,%a0@+
return NULL;
rhs++;
if ( *rhs == '\"' )
rhs++;
for ( d=value ; *rhs ; )
42c44: 1019 moveb %a1@+,%d0
*d++ = *rhs++;
42c46: 2648 moveal %a0,%a3
return NULL;
rhs++;
if ( *rhs == '\"' )
rhs++;
for ( d=value ; *rhs ; )
42c48: 66f6 bnes 42c40 <rtems_bsp_cmdline_get_param_rhs+0x60>
*d++ = *rhs++;
if ( *(d-1) == '\"' )
42c4a: 49c1 extbl %d1 42c4c: 7022 moveq #34,%d0 42c4e: b081 cmpl %d1,%d0
42c50: 670e beqs 42c60 <rtems_bsp_cmdline_get_param_rhs+0x80>
d--;
*d = '\0';
42c52: 4213 clrb %a3@
return value;
}
42c54: 200a movel %a2,%d0 42c56: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 42c5c: 4e5e unlk %fp 42c5e: 4e75 rts
if ( *rhs == '\"' )
rhs++;
for ( d=value ; *rhs ; )
*d++ = *rhs++;
if ( *(d-1) == '\"' )
d--;
42c60: 538b subql #1,%a3
*d = '\0';
42c62: 4213 clrb %a3@ 42c64: 60ee bras 42c54 <rtems_bsp_cmdline_get_param_rhs+0x74>
if ( !p )
return NULL;
rhs = &p[strlen(name)];
if ( *rhs != '=' )
return NULL;
42c66: 95ca subal %a2,%a2
if ( *(d-1) == '\"' )
d--;
*d = '\0';
return value;
}
42c68: 200a movel %a2,%d0 42c6a: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 42c70: 4e5e unlk %fp 42c72: 4e75 rts
if ( *rhs != '=' )
return NULL;
rhs++;
if ( *rhs == '\"' )
rhs++;
42c74: 43e8 0002 lea %a0@(2),%a1 42c78: 1228 0002 moveb %a0@(2),%d1 42c7c: 60b2 bras 42c30 <rtems_bsp_cmdline_get_param_rhs+0x50>
for ( d=value ; *rhs ; )
42c7e: 264a moveal %a2,%a3
*d++ = *rhs++;
if ( *(d-1) == '\"' )
42c80: 7022 moveq #34,%d0
return NULL;
rhs++;
if ( *rhs == '\"' )
rhs++;
for ( d=value ; *rhs ; )
42c82: 122a ffff moveb %a2@(-1),%d1
*d++ = *rhs++;
if ( *(d-1) == '\"' )
42c86: 49c1 extbl %d1 42c88: b081 cmpl %d1,%d0
42c8a: 66c6 bnes 42c52 <rtems_bsp_cmdline_get_param_rhs+0x72><== ALWAYS TAKEN
42c8c: 60d2 bras 42c60 <rtems_bsp_cmdline_get_param_rhs+0x80><== NOT EXECUTED
...
00047448 <rtems_chain_append_with_notification>:
rtems_chain_control *chain,
rtems_chain_node *node,
rtems_id task,
rtems_event_set events
)
{
47448: 4e56 0000 linkw %fp,#0 4744c: 2f03 movel %d3,%sp@- 4744e: 262e 0014 movel %fp@(20),%d3 47452: 2f02 movel %d2,%sp@-
RTEMS_INLINE_ROUTINE bool rtems_chain_append_with_empty_check(
rtems_chain_control *chain,
rtems_chain_node *node
)
{
return _Chain_Append_with_empty_check( chain, node );
47454: 2f2e 000c movel %fp@(12),%sp@- 47458: 2f2e 0008 movel %fp@(8),%sp@- 4745c: 242e 0010 movel %fp@(16),%d2 47460: 4eb9 0004 7a28 jsr 47a28 <_Chain_Append_with_empty_check>
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_append_with_empty_check( chain, node );
if ( was_empty ) {
47466: 508f addql #8,%sp 47468: 4a00 tstb %d0
4746a: 660e bnes 4747a <rtems_chain_append_with_notification+0x32>
sc = rtems_event_send( task, events );
}
return sc;
}
4746c: 242e fff8 movel %fp@(-8),%d2 47470: 4280 clrl %d0 47472: 262e fffc movel %fp@(-4),%d3 47476: 4e5e unlk %fp 47478: 4e75 rts
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_append_with_empty_check( chain, node );
if ( was_empty ) {
sc = rtems_event_send( task, events );
4747a: 2d43 000c movel %d3,%fp@(12)
}
return sc;
}
4747e: 262e fffc movel %fp@(-4),%d3
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_append_with_empty_check( chain, node );
if ( was_empty ) {
sc = rtems_event_send( task, events );
47482: 2d42 0008 movel %d2,%fp@(8)
}
return sc;
}
47486: 242e fff8 movel %fp@(-8),%d2 4748a: 4e5e unlk %fp
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_append_with_empty_check( chain, node );
if ( was_empty ) {
sc = rtems_event_send( task, events );
4748c: 4ef9 0004 6968 jmp 46968 <rtems_event_send>
...
00047494 <rtems_chain_get_with_notification>:
rtems_chain_control *chain,
rtems_id task,
rtems_event_set events,
rtems_chain_node **node
)
{
47494: 4e56 0000 linkw %fp,#0 47498: 2f03 movel %d3,%sp@- 4749a: 262e 0010 movel %fp@(16),%d3 4749e: 2f02 movel %d2,%sp@-
RTEMS_INLINE_ROUTINE bool rtems_chain_get_with_empty_check(
rtems_chain_control *chain,
rtems_chain_node **node
)
{
return _Chain_Get_with_empty_check( chain, node );
474a0: 2f2e 0014 movel %fp@(20),%sp@- 474a4: 2f2e 0008 movel %fp@(8),%sp@- 474a8: 242e 000c movel %fp@(12),%d2 474ac: 4eb9 0004 7ac8 jsr 47ac8 <_Chain_Get_with_empty_check>
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool is_empty = rtems_chain_get_with_empty_check( chain, node );
if ( is_empty ) {
474b2: 508f addql #8,%sp 474b4: 4a00 tstb %d0
474b6: 660e bnes 474c6 <rtems_chain_get_with_notification+0x32>
sc = rtems_event_send( task, events );
}
return sc;
}
474b8: 242e fff8 movel %fp@(-8),%d2 474bc: 4280 clrl %d0 474be: 262e fffc movel %fp@(-4),%d3 474c2: 4e5e unlk %fp 474c4: 4e75 rts
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool is_empty = rtems_chain_get_with_empty_check( chain, node );
if ( is_empty ) {
sc = rtems_event_send( task, events );
474c6: 2d43 000c movel %d3,%fp@(12)
}
return sc;
}
474ca: 262e fffc movel %fp@(-4),%d3
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool is_empty = rtems_chain_get_with_empty_check( chain, node );
if ( is_empty ) {
sc = rtems_event_send( task, events );
474ce: 2d42 0008 movel %d2,%fp@(8)
}
return sc;
}
474d2: 242e fff8 movel %fp@(-8),%d2 474d6: 4e5e unlk %fp
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool is_empty = rtems_chain_get_with_empty_check( chain, node );
if ( is_empty ) {
sc = rtems_event_send( task, events );
474d8: 4ef9 0004 6968 jmp 46968 <rtems_event_send>
...
000474e0 <rtems_chain_get_with_wait>:
rtems_chain_control *chain,
rtems_event_set events,
rtems_interval timeout,
rtems_chain_node **node_ptr
)
{
474e0: 4e56 ffe0 linkw %fp,#-32 474e4: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
) {
rtems_event_set out;
sc = rtems_event_receive(
474e8: 2c0e movel %fp,%d6 474ea: 45f9 0004 7b18 lea 47b18 <_Chain_Get>,%a2 474f0: 5986 subql #4,%d6 474f2: 47f9 0004 67bc lea 467bc <rtems_event_receive>,%a3
rtems_chain_control *chain,
rtems_event_set events,
rtems_interval timeout,
rtems_chain_node **node_ptr
)
{
474f8: 262e 0008 movel %fp@(8),%d3 474fc: 2a2e 000c movel %fp@(12),%d5 47500: 282e 0010 movel %fp@(16),%d4
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
47504: 2f03 movel %d3,%sp@- 47506: 4e92 jsr %a2@
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
47508: 588f addql #4,%sp 4750a: 2400 movel %d0,%d2
4750c: 6622 bnes 47530 <rtems_chain_get_with_wait+0x50>
) {
rtems_event_set out;
sc = rtems_event_receive(
4750e: 2f06 movel %d6,%sp@- 47510: 2f04 movel %d4,%sp@- 47512: 42a7 clrl %sp@- 47514: 2f05 movel %d5,%sp@- 47516: 4e93 jsr %a3@
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
47518: 4fef 0010 lea %sp@(16),%sp 4751c: 4a80 tstl %d0
4751e: 67e4 beqs 47504 <rtems_chain_get_with_wait+0x24> <== NEVER TAKEN
timeout,
&out
);
}
*node_ptr = node;
47520: 206e 0014 moveal %fp@(20),%a0 47524: 2082 movel %d2,%a0@
return sc;
}
47526: 4cee 0c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a3 4752c: 4e5e unlk %fp 4752e: 4e75 rts
timeout,
&out
);
}
*node_ptr = node;
47530: 206e 0014 moveal %fp@(20),%a0
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
47534: 4280 clrl %d0
timeout,
&out
);
}
*node_ptr = node;
47536: 2082 movel %d2,%a0@
return sc;
}
47538: 4cee 0c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a3 4753e: 4e5e unlk %fp
...
00047544 <rtems_chain_prepend_with_notification>:
rtems_chain_control *chain,
rtems_chain_node *node,
rtems_id task,
rtems_event_set events
)
{
47544: 4e56 0000 linkw %fp,#0 47548: 2f03 movel %d3,%sp@- 4754a: 262e 0014 movel %fp@(20),%d3 4754e: 2f02 movel %d2,%sp@-
RTEMS_INLINE_ROUTINE bool rtems_chain_prepend_with_empty_check(
rtems_chain_control *chain,
rtems_chain_node *node
)
{
return _Chain_Prepend_with_empty_check( chain, node );
47550: 2f2e 000c movel %fp@(12),%sp@- 47554: 2f2e 0008 movel %fp@(8),%sp@- 47558: 242e 0010 movel %fp@(16),%d2 4755c: 4eb9 0004 7b84 jsr 47b84 <_Chain_Prepend_with_empty_check>
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_prepend_with_empty_check( chain, node );
if (was_empty) {
47562: 508f addql #8,%sp 47564: 4a00 tstb %d0
47566: 660e bnes 47576 <rtems_chain_prepend_with_notification+0x32>
sc = rtems_event_send( task, events );
}
return sc;
}
47568: 242e fff8 movel %fp@(-8),%d2 4756c: 4280 clrl %d0 4756e: 262e fffc movel %fp@(-4),%d3 47572: 4e5e unlk %fp 47574: 4e75 rts
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_prepend_with_empty_check( chain, node );
if (was_empty) {
sc = rtems_event_send( task, events );
47576: 2d43 000c movel %d3,%fp@(12)
}
return sc;
}
4757a: 262e fffc movel %fp@(-4),%d3
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_prepend_with_empty_check( chain, node );
if (was_empty) {
sc = rtems_event_send( task, events );
4757e: 2d42 0008 movel %d2,%fp@(8)
}
return sc;
}
47582: 242e fff8 movel %fp@(-8),%d2 47586: 4e5e unlk %fp
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_prepend_with_empty_check( chain, node );
if (was_empty) {
sc = rtems_event_send( task, events );
47588: 4ef9 0004 6968 jmp 46968 <rtems_event_send>
...
000466d0 <rtems_clock_get>:
rtems_status_code rtems_clock_get(
rtems_clock_get_options option,
void *time_buffer
)
{
466d0: 4e56 0000 linkw %fp,#0 466d4: 202e 0008 movel %fp@(8),%d0 466d8: 2f0a movel %a2,%sp@- 466da: 246e 000c moveal %fp@(12),%a2
if ( !time_buffer )
466de: 4a8a tstl %a2
466e0: 6728 beqs 4670a <rtems_clock_get+0x3a>
return RTEMS_INVALID_ADDRESS;
if ( option == RTEMS_CLOCK_GET_TOD )
466e2: 4a80 tstl %d0
466e4: 6730 beqs 46716 <rtems_clock_get+0x46>
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH )
466e6: 7201 moveq #1,%d1 466e8: b280 cmpl %d0,%d1
466ea: 673a beqs 46726 <rtems_clock_get+0x56>
return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer);
if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) {
466ec: 7202 moveq #2,%d1 466ee: b280 cmpl %d0,%d1
466f0: 6744 beqs 46736 <rtems_clock_get+0x66>
*interval = rtems_clock_get_ticks_since_boot();
return RTEMS_SUCCESSFUL;
}
if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) {
466f2: 7203 moveq #3,%d1 466f4: b280 cmpl %d0,%d1
466f6: 6752 beqs 4674a <rtems_clock_get+0x7a>
*interval = rtems_clock_get_ticks_per_second();
return RTEMS_SUCCESSFUL;
}
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
466f8: 7204 moveq #4,%d1 466fa: b280 cmpl %d0,%d1
466fc: 6760 beqs 4675e <rtems_clock_get+0x8e>
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
return RTEMS_INVALID_NUMBER;
}
466fe: 246e fffc moveal %fp@(-4),%a2
}
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
return RTEMS_INVALID_NUMBER;
46702: 720a moveq #10,%d1
}
46704: 2001 movel %d1,%d0 46706: 4e5e unlk %fp 46708: 4e75 rts 4670a: 246e fffc moveal %fp@(-4),%a2
rtems_clock_get_options option,
void *time_buffer
)
{
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
4670e: 7209 moveq #9,%d1
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
return RTEMS_INVALID_NUMBER;
}
46710: 2001 movel %d1,%d0 46712: 4e5e unlk %fp 46714: 4e75 rts
{
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
if ( option == RTEMS_CLOCK_GET_TOD )
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
46716: 2d4a 0008 movel %a2,%fp@(8)
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
return RTEMS_INVALID_NUMBER;
}
4671a: 246e fffc moveal %fp@(-4),%a2 4671e: 4e5e unlk %fp
{
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
if ( option == RTEMS_CLOCK_GET_TOD )
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
46720: 4ef9 0004 67c4 jmp 467c4 <rtems_clock_get_tod>
if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH )
return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer);
46726: 2d4a 0008 movel %a2,%fp@(8)
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
return RTEMS_INVALID_NUMBER;
}
4672a: 246e fffc moveal %fp@(-4),%a2 4672e: 4e5e unlk %fp
if ( option == RTEMS_CLOCK_GET_TOD )
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH )
return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer);
46730: 4ef9 0004 6770 jmp 46770 <rtems_clock_get_seconds_since_epoch>
if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) {
rtems_interval *interval = (rtems_interval *)time_buffer;
*interval = rtems_clock_get_ticks_since_boot();
46736: 4eb9 0004 67b4 jsr 467b4 <rtems_clock_get_ticks_since_boot>
return RTEMS_SUCCESSFUL;
4673c: 4281 clrl %d1
return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer);
if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) {
rtems_interval *interval = (rtems_interval *)time_buffer;
*interval = rtems_clock_get_ticks_since_boot();
4673e: 2480 movel %d0,%a2@
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
return RTEMS_INVALID_NUMBER;
}
46740: 246e fffc moveal %fp@(-4),%a2 46744: 2001 movel %d1,%d0 46746: 4e5e unlk %fp 46748: 4e75 rts
}
if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) {
rtems_interval *interval = (rtems_interval *)time_buffer;
*interval = rtems_clock_get_ticks_per_second();
4674a: 4eb9 0004 679c jsr 4679c <rtems_clock_get_ticks_per_second>
return RTEMS_SUCCESSFUL;
46750: 4281 clrl %d1
}
if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) {
rtems_interval *interval = (rtems_interval *)time_buffer;
*interval = rtems_clock_get_ticks_per_second();
46752: 2480 movel %d0,%a2@
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
return RTEMS_INVALID_NUMBER;
}
46754: 246e fffc moveal %fp@(-4),%a2 46758: 2001 movel %d1,%d0 4675a: 4e5e unlk %fp 4675c: 4e75 rts
*interval = rtems_clock_get_ticks_per_second();
return RTEMS_SUCCESSFUL;
}
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
4675e: 2d4a 0008 movel %a2,%fp@(8)
return RTEMS_INVALID_NUMBER;
}
46762: 246e fffc moveal %fp@(-4),%a2 46766: 4e5e unlk %fp
*interval = rtems_clock_get_ticks_per_second();
return RTEMS_SUCCESSFUL;
}
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
46768: 4ef9 0004 6888 jmp 46888 <rtems_clock_get_tod_timeval>
...
0004efb8 <rtems_deviceio_errno>:
[RTEMS_IO_ERROR] = EIO,
[RTEMS_PROXY_BLOCKING] = EIO
};
int rtems_deviceio_errno(rtems_status_code sc)
{
4efb8: 4e56 0000 linkw %fp,#0 4efbc: 202e 0008 movel %fp@(8),%d0 4efc0: 2f02 movel %d2,%sp@-
if (sc == RTEMS_SUCCESSFUL) {
4efc2: 4a80 tstl %d0
4efc4: 660a bnes 4efd0 <rtems_deviceio_errno+0x18>
errno = eno;
return -1;
}
}
4efc6: 242e fffc movel %fp@(-4),%d2
};
int rtems_deviceio_errno(rtems_status_code sc)
{
if (sc == RTEMS_SUCCESSFUL) {
return 0;
4efca: 4280 clrl %d0
errno = eno;
return -1;
}
}
4efcc: 4e5e unlk %fp 4efce: 4e75 rts
if (sc == RTEMS_SUCCESSFUL) {
return 0;
} else {
int eno = EINVAL;
if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) {
4efd0: 721c moveq #28,%d1 4efd2: b280 cmpl %d0,%d1
4efd4: 651e bcss 4eff4 <rtems_deviceio_errno+0x3c> <== NEVER TAKEN
eno = status_code_to_errno [sc];
4efd6: 41f9 0005 ed20 lea 5ed20 <status_code_to_errno>,%a0 4efdc: 2430 0c00 movel %a0@(00000000,%d0:l:4),%d2
}
errno = eno;
4efe0: 4eb9 0004 f098 jsr 4f098 <__errno> 4efe6: 2040 moveal %d0,%a0
return -1;
4efe8: 70ff moveq #-1,%d0
if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) {
eno = status_code_to_errno [sc];
}
errno = eno;
4efea: 2082 movel %d2,%a0@
return -1;
}
}
4efec: 242e fffc movel %fp@(-4),%d2 4eff0: 4e5e unlk %fp 4eff2: 4e75 rts
if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) {
eno = status_code_to_errno [sc];
}
errno = eno;
4eff4: 4eb9 0004 f098 jsr 4f098 <__errno> <== NOT EXECUTED
int rtems_deviceio_errno(rtems_status_code sc)
{
if (sc == RTEMS_SUCCESSFUL) {
return 0;
} else {
int eno = EINVAL;
4effa: 7416 moveq #22,%d2 <== NOT EXECUTED
if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) {
eno = status_code_to_errno [sc];
}
errno = eno;
4effc: 2040 moveal %d0,%a0 <== NOT EXECUTED
return -1;
4effe: 70ff moveq #-1,%d0 <== NOT EXECUTED
if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) {
eno = status_code_to_errno [sc];
}
errno = eno;
4f000: 2082 movel %d2,%a0@ <== NOT EXECUTED 4f002: 60e8 bras 4efec <rtems_deviceio_errno+0x34> <== NOT EXECUTED
00043074 <rtems_disk_create_log>:
dev_t phys,
rtems_blkdev_bnum begin_block,
rtems_blkdev_bnum block_count,
const char *name
)
{
43074: 4e56 fff8 linkw %fp,#-8 43078: 2f0a movel %a2,%sp@-
rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_disk_device *physical_disk = NULL; rtems_disk_device *dd = NULL;
4307a: 42ae fffc clrl %fp@(-4)
rtems_blkdev_bnum end_block = begin_block + block_count;
sc = disk_lock();
4307e: 4eba fd20 jsr %pc@(42da0 <disk_lock>)
if (sc != RTEMS_SUCCESSFUL) {
43082: 4a80 tstl %d0
43084: 6708 beqs 4308e <rtems_disk_create_log+0x1a> <== ALWAYS TAKEN
++physical_disk->uses;
disk_unlock();
return RTEMS_SUCCESSFUL;
}
43086: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 4308a: 4e5e unlk %fp <== NOT EXECUTED 4308c: 4e75 rts <== NOT EXECUTED
sc = disk_lock();
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
physical_disk = get_disk_entry(phys, true);
4308e: 4878 0001 pea 1 <ADD> 43092: 2f2e 0014 movel %fp@(20),%sp@- 43096: 2f2e 0010 movel %fp@(16),%sp@- 4309a: 4eba fc5c jsr %pc@(42cf8 <get_disk_entry>)
if (physical_disk == NULL || !is_physical_disk(physical_disk)) {
4309e: 4fef 000c lea %sp@(12),%sp
sc = disk_lock();
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
physical_disk = get_disk_entry(phys, true);
430a2: 2440 moveal %d0,%a2
if (physical_disk == NULL || !is_physical_disk(physical_disk)) {
430a4: 4a80 tstl %d0
430a6: 6706 beqs 430ae <rtems_disk_create_log+0x3a>
430a8: b0aa 0008 cmpl %a2@(8),%d0
430ac: 670e beqs 430bc <rtems_disk_create_log+0x48>
disk_unlock();
430ae: 4eba fd1e jsr %pc@(42dce <disk_unlock>)
++physical_disk->uses;
disk_unlock();
return RTEMS_SUCCESSFUL;
}
430b2: 246e fff4 moveal %fp@(-12),%a2
physical_disk = get_disk_entry(phys, true);
if (physical_disk == NULL || !is_physical_disk(physical_disk)) {
disk_unlock();
return RTEMS_INVALID_ID;
430b6: 7004 moveq #4,%d0
++physical_disk->uses;
disk_unlock();
return RTEMS_SUCCESSFUL;
}
430b8: 4e5e unlk %fp 430ba: 4e75 rts
return RTEMS_INVALID_ID;
}
if (
begin_block >= physical_disk->size
430bc: 202a 001c movel %a2@(28),%d0
disk_unlock();
return RTEMS_INVALID_ID;
}
if (
430c0: b0ae 0018 cmpl %fp@(24),%d0
430c4: 630e blss 430d4 <rtems_disk_create_log+0x60>
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device *physical_disk = NULL;
rtems_disk_device *dd = NULL;
rtems_blkdev_bnum end_block = begin_block + block_count;
430c6: 222e 001c movel %fp@(28),%d1 430ca: d2ae 0018 addl %fp@(24),%d1
return RTEMS_INVALID_ID;
}
if (
begin_block >= physical_disk->size
|| end_block <= begin_block
430ce: b2ae 0018 cmpl %fp@(24),%d1
430d2: 620e bhis 430e2 <rtems_disk_create_log+0x6e> <== ALWAYS TAKEN
|| end_block > physical_disk->size
) {
disk_unlock();
430d4: 4eba fcf8 jsr %pc@(42dce <disk_unlock>)
++physical_disk->uses;
disk_unlock();
return RTEMS_SUCCESSFUL;
}
430d8: 246e fff4 moveal %fp@(-12),%a2
|| end_block <= begin_block
|| end_block > physical_disk->size
) {
disk_unlock();
return RTEMS_INVALID_NUMBER;
430dc: 700a moveq #10,%d0
++physical_disk->uses;
disk_unlock();
return RTEMS_SUCCESSFUL;
}
430de: 4e5e unlk %fp 430e0: 4e75 rts
}
if (
begin_block >= physical_disk->size
|| end_block <= begin_block
|| end_block > physical_disk->size
430e2: b081 cmpl %d1,%d0
430e4: 65ee bcss 430d4 <rtems_disk_create_log+0x60>
disk_unlock();
return RTEMS_INVALID_NUMBER;
}
sc = create_disk(dev, name, &dd);
430e6: 486e fffc pea %fp@(-4) 430ea: 2f2e 0020 movel %fp@(32),%sp@- 430ee: 2f2e 000c movel %fp@(12),%sp@- 430f2: 2f2e 0008 movel %fp@(8),%sp@- 430f6: 4eba fd04 jsr %pc@(42dfc <create_disk>)
if (sc != RTEMS_SUCCESSFUL) {
430fa: 4fef 0010 lea %sp@(16),%sp 430fe: 4a80 tstl %d0
43100: 6634 bnes 43136 <rtems_disk_create_log+0xc2>
disk_unlock();
return sc;
}
dd->phys_dev = physical_disk;
43102: 206e fffc moveal %fp@(-4),%a0
dd->size = block_count;
dd->block_size = dd->media_block_size = physical_disk->block_size;
dd->ioctl = physical_disk->ioctl;
dd->driver_data = physical_disk->driver_data;
++physical_disk->uses;
43106: 52aa 0014 addql #1,%a2@(20)
return sc;
}
dd->phys_dev = physical_disk;
dd->start = begin_block;
4310a: 226e 0018 moveal %fp@(24),%a1 4310e: 2149 0018 movel %a1,%a0@(24)
dd->size = block_count; dd->block_size = dd->media_block_size = physical_disk->block_size;
43112: 222a 0020 movel %a2@(32),%d1
return sc;
}
dd->phys_dev = physical_disk;
dd->start = begin_block;
dd->size = block_count;
43116: 226e 001c moveal %fp@(28),%a1
dd->block_size = dd->media_block_size = physical_disk->block_size; dd->ioctl = physical_disk->ioctl;
4311a: 216a 0028 0028 movel %a2@(40),%a0@(40)
dd->driver_data = physical_disk->driver_data;
43120: 216a 002c 002c movel %a2@(44),%a0@(44)
disk_unlock();
return sc;
}
dd->phys_dev = physical_disk;
43126: 214a 0008 movel %a2,%a0@(8)
dd->start = begin_block; dd->size = block_count;
4312a: 2149 001c movel %a1,%a0@(28)
dd->block_size = dd->media_block_size = physical_disk->block_size;
4312e: 2141 0024 movel %d1,%a0@(36) 43132: 2141 0020 movel %d1,%a0@(32)
dd->ioctl = physical_disk->ioctl;
dd->driver_data = physical_disk->driver_data;
++physical_disk->uses;
disk_unlock();
43136: 2d40 fff8 movel %d0,%fp@(-8) 4313a: 4eba fc92 jsr %pc@(42dce <disk_unlock>) 4313e: 202e fff8 movel %fp@(-8),%d0
return RTEMS_SUCCESSFUL;
}
43142: 246e fff4 moveal %fp@(-12),%a2
43146: 4e5e unlk %fp <== NOT EXECUTED
00042fc0 <rtems_disk_create_phys>:
rtems_blkdev_bnum block_count,
rtems_block_device_ioctl handler,
void *driver_data,
const char *name
)
{
42fc0: 4e56 fff0 linkw %fp,#-16 42fc4: 48d7 040c moveml %d2-%d3/%a2,%sp@ 42fc8: 262e 0010 movel %fp@(16),%d3 42fcc: 246e 0018 moveal %fp@(24),%a2
rtems_disk_device *dd = NULL;
42fd0: 42ae fffc clrl %fp@(-4)
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (handler == NULL) {
42fd4: 4a8a tstl %a2
42fd6: 6712 beqs 42fea <rtems_disk_create_phys+0x2a>
return RTEMS_INVALID_ADDRESS;
}
if (block_size == 0) {
42fd8: 4a83 tstl %d3
42fda: 661c bnes 42ff8 <rtems_disk_create_phys+0x38>
return RTEMS_INVALID_NUMBER;
42fdc: 740a moveq #10,%d2
}
disk_unlock();
return RTEMS_SUCCESSFUL;
}
42fde: 2002 movel %d2,%d0 42fe0: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2 42fe6: 4e5e unlk %fp 42fe8: 4e75 rts
{
rtems_disk_device *dd = NULL;
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (handler == NULL) {
return RTEMS_INVALID_ADDRESS;
42fea: 7409 moveq #9,%d2
}
disk_unlock();
return RTEMS_SUCCESSFUL;
}
42fec: 2002 movel %d2,%d0 42fee: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2 42ff4: 4e5e unlk %fp 42ff6: 4e75 rts
if (block_size == 0) {
return RTEMS_INVALID_NUMBER;
}
sc = disk_lock();
42ff8: 4eba fda6 jsr %pc@(42da0 <disk_lock>) 42ffc: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL) {
42ffe: 66de bnes 42fde <rtems_disk_create_phys+0x1e> <== NEVER TAKEN
return sc;
}
sc = create_disk(dev, name, &dd);
43000: 486e fffc pea %fp@(-4) 43004: 2f2e 0020 movel %fp@(32),%sp@- 43008: 2f2e 000c movel %fp@(12),%sp@- 4300c: 2f2e 0008 movel %fp@(8),%sp@- 43010: 4eba fdea jsr %pc@(42dfc <create_disk>)
if (sc != RTEMS_SUCCESSFUL) {
43014: 4fef 0010 lea %sp@(16),%sp
sc = disk_lock();
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
sc = create_disk(dev, name, &dd);
43018: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL) {
4301a: 663a bnes 43056 <rtems_disk_create_phys+0x96>
disk_unlock();
return sc;
}
dd->phys_dev = dd;
4301c: 206e fffc moveal %fp@(-4),%a0
dd->start = 0; dd->size = block_count;
43020: 216e 0014 001c movel %fp@(20),%a0@(28)
dd->block_size = dd->media_block_size = block_size; dd->ioctl = handler; dd->driver_data = driver_data;
43026: 216e 001c 002c movel %fp@(28),%a0@(44)
disk_unlock();
return sc;
}
dd->phys_dev = dd;
4302c: 2148 0008 movel %a0,%a0@(8)
dd->start = 0;
43030: 42a8 0018 clrl %a0@(24)
dd->size = block_count; dd->block_size = dd->media_block_size = block_size;
43034: 2143 0024 movel %d3,%a0@(36) 43038: 2143 0020 movel %d3,%a0@(32)
dd->ioctl = handler;
4303c: 214a 0028 movel %a2,%a0@(40)
dd->driver_data = driver_data;
if ((*handler)(dd, RTEMS_BLKIO_CAPABILITIES, &dd->capabilities) < 0) {
43040: 4868 000c pea %a0@(12) 43044: 2f3c 2000 4208 movel #536887816,%sp@- 4304a: 2f08 movel %a0,%sp@- 4304c: 4e92 jsr %a2@ 4304e: 4fef 000c lea %sp@(12),%sp 43052: 4a80 tstl %d0
43054: 6d10 blts 43066 <rtems_disk_create_phys+0xa6> <== ALWAYS TAKEN
dd->capabilities = 0;
}
disk_unlock();
43056: 4eba fd76 jsr %pc@(42dce <disk_unlock>)
return RTEMS_SUCCESSFUL;
}
4305a: 2002 movel %d2,%d0 4305c: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2 43062: 4e5e unlk %fp 43064: 4e75 rts
dd->block_size = dd->media_block_size = block_size;
dd->ioctl = handler;
dd->driver_data = driver_data;
if ((*handler)(dd, RTEMS_BLKIO_CAPABILITIES, &dd->capabilities) < 0) {
dd->capabilities = 0;
43066: 206e fffc moveal %fp@(-4),%a0 4306a: 42a8 000c clrl %a0@(12)
}
disk_unlock();
4306e: 4eba fd5e jsr %pc@(42dce <disk_unlock>) 43072: 60e6 bras 4305a <rtems_disk_create_phys+0x9a>
0004314a <rtems_disk_delete>:
}
}
rtems_status_code
rtems_disk_delete(dev_t dev)
{
4314a: 4e56 ffd8 linkw %fp,#-40 4314e: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device *dd = NULL;
sc = disk_lock();
43152: 4eba fc4c jsr %pc@(42da0 <disk_lock>) 43156: 2800 movel %d0,%d4
if (sc != RTEMS_SUCCESSFUL) {
43158: 670c beqs 43166 <rtems_disk_delete+0x1c> <== ALWAYS TAKEN
rtems_disk_cleanup(dd);
disk_unlock();
return RTEMS_SUCCESSFUL;
}
4315a: 2004 movel %d4,%d0 <== NOT EXECUTED 4315c: 4cee 3cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a5 <== NOT EXECUTED 43162: 4e5e unlk %fp <== NOT EXECUTED 43164: 4e75 rts <== NOT EXECUTED
sc = disk_lock();
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
dd = get_disk_entry(dev, true);
43166: 4878 0001 pea 1 <ADD> 4316a: 2f2e 000c movel %fp@(12),%sp@- 4316e: 2f2e 0008 movel %fp@(8),%sp@- 43172: 4eba fb84 jsr %pc@(42cf8 <get_disk_entry>)
if (dd == NULL) {
43176: 4fef 000c lea %sp@(12),%sp
sc = disk_lock();
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
dd = get_disk_entry(dev, true);
4317a: 2040 moveal %d0,%a0
if (dd == NULL) {
4317c: 4a80 tstl %d0 4317e: 6700 00ec beqw 4326c <rtems_disk_delete+0x122>
}
static void
rtems_disk_cleanup(rtems_disk_device *disk_to_remove)
{
rtems_disk_device *const physical_disk = disk_to_remove->phys_dev;
43182: 2668 0008 moveal %a0@(8),%a3
disk_unlock();
return RTEMS_INVALID_ID;
}
dd->deleted = true;
43186: 7001 moveq #1,%d0 43188: 1140 0030 moveb %d0,%a0@(48)
{
rtems_disk_device *const physical_disk = disk_to_remove->phys_dev;
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
if (physical_disk->deleted) {
4318c: 4a2b 0030 tstb %a3@(48)
43190: 6778 beqs 4320a <rtems_disk_delete+0xc0>
dev_t dev = physical_disk->dev;
unsigned deleted_count = 0;
for (major = 0; major < disktab_size; ++major) {
43192: 4287 clrl %d7
rtems_disk_device *const physical_disk = disk_to_remove->phys_dev;
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
if (physical_disk->deleted) {
dev_t dev = physical_disk->dev;
43194: 2413 movel %a3@,%d2 43196: 262b 0004 movel %a3@(4),%d3
unsigned deleted_count = 0;
for (major = 0; major < disktab_size; ++major) {
4319a: 4ab9 0006 44fa tstl 644fa <disktab_size>
431a0: 674a beqs 431ec <rtems_disk_delete+0xa2> <== NEVER TAKEN
431a2: 4286 clrl %d6
if (dd != NULL && dd->phys_dev->dev == dev && dd != physical_disk) {
if (dd->uses == 0) {
++deleted_count;
dtab->minor [minor] = NULL;
free_disk_device(dd);
431a4: 49fa fbaa lea %pc@(42d50 <free_disk_device>),%a4
if (physical_disk->deleted) {
dev_t dev = physical_disk->dev;
unsigned deleted_count = 0;
for (major = 0; major < disktab_size; ++major) {
rtems_disk_device_table *dtab = disktab + major;
431a8: 2006 movel %d6,%d0 431aa: e788 lsll #3,%d0 431ac: 2479 0006 44fe moveal 644fe <disktab>,%a2 431b2: d5c0 addal %d0,%a2
for (minor = 0; minor < dtab->size; ++minor) {
431b4: 4aaa 0004 tstl %a2@(4)
431b8: 6728 beqs 431e2 <rtems_disk_delete+0x98>
431ba: 4285 clrl %d5
rtems_disk_device *dd = dtab->minor [minor];
431bc: 2005 movel %d5,%d0 431be: e588 lsll #2,%d0 431c0: 2252 moveal %a2@,%a1 431c2: d3c0 addal %d0,%a1 431c4: 2051 moveal %a1@,%a0
if (dd != NULL && dd->phys_dev->dev == dev && dd != physical_disk) {
431c6: 4a88 tstl %a0
431c8: 6710 beqs 431da <rtems_disk_delete+0x90>
431ca: 2a68 0008 moveal %a0@(8),%a5 431ce: 2015 movel %a5@,%d0 431d0: 222d 0004 movel %a5@(4),%d1 431d4: 9283 subl %d3,%d1 431d6: 9182 subxl %d2,%d0
431d8: 675e beqs 43238 <rtems_disk_delete+0xee> <== ALWAYS TAKEN
unsigned deleted_count = 0;
for (major = 0; major < disktab_size; ++major) {
rtems_disk_device_table *dtab = disktab + major;
for (minor = 0; minor < dtab->size; ++minor) {
431da: 5285 addql #1,%d5 431dc: baaa 0004 cmpl %a2@(4),%d5
431e0: 65da bcss 431bc <rtems_disk_delete+0x72>
if (physical_disk->deleted) {
dev_t dev = physical_disk->dev;
unsigned deleted_count = 0;
for (major = 0; major < disktab_size; ++major) {
431e2: 5286 addql #1,%d6 431e4: bcb9 0006 44fa cmpl 644fa <disktab_size>,%d6
431ea: 65bc bcss 431a8 <rtems_disk_delete+0x5e>
}
}
}
}
physical_disk->uses -= deleted_count;
431ec: 202b 0014 movel %a3@(20),%d0 431f0: 9087 subl %d7,%d0 431f2: 2740 0014 movel %d0,%a3@(20)
if (physical_disk->uses == 0) {
431f6: 6700 0088 beqw 43280 <rtems_disk_delete+0x136>
}
dd->deleted = true;
rtems_disk_cleanup(dd);
disk_unlock();
431fa: 4eba fbd2 jsr %pc@(42dce <disk_unlock>)
return RTEMS_SUCCESSFUL;
}
431fe: 2004 movel %d4,%d0 43200: 4cee 3cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a5 43206: 4e5e unlk %fp 43208: 4e75 rts
rtems_filesystem_split_dev_t(physical_disk->dev, major, minor);
disktab [major].minor [minor] = NULL;
free_disk_device(physical_disk);
}
} else {
if (disk_to_remove->uses == 0) {
4320a: 4aa8 0014 tstl %a0@(20)
4320e: 66ea bnes 431fa <rtems_disk_delete+0xb0> <== NEVER TAKEN
--physical_disk->uses;
rtems_filesystem_split_dev_t(disk_to_remove->dev, major, minor);
43210: 2010 movel %a0@,%d0
disktab [major].minor [minor] = NULL;
free_disk_device(physical_disk);
}
} else {
if (disk_to_remove->uses == 0) {
--physical_disk->uses;
43212: 53ab 0014 subql #1,%a3@(20)
rtems_filesystem_split_dev_t(disk_to_remove->dev, major, minor);
disktab [major].minor [minor] = NULL;
43216: 2279 0006 44fe moveal 644fe <disktab>,%a1 4321c: e788 lsll #3,%d0
free_disk_device(physical_disk);
}
} else {
if (disk_to_remove->uses == 0) {
--physical_disk->uses;
rtems_filesystem_split_dev_t(disk_to_remove->dev, major, minor);
4321e: 2228 0004 movel %a0@(4),%d1
disktab [major].minor [minor] = NULL;
43222: 2271 0800 moveal %a1@(00000000,%d0:l),%a1 43226: 42b1 1c00 clrl %a1@(00000000,%d1:l:4)
free_disk_device(disk_to_remove);
4322a: 2f08 movel %a0,%sp@- 4322c: 4eba fb22 jsr %pc@(42d50 <free_disk_device>) 43230: 588f addql #4,%sp
}
dd->deleted = true;
rtems_disk_cleanup(dd);
disk_unlock();
43232: 4eba fb9a jsr %pc@(42dce <disk_unlock>) 43236: 60c6 bras 431fe <rtems_disk_delete+0xb4>
rtems_disk_device_table *dtab = disktab + major;
for (minor = 0; minor < dtab->size; ++minor) {
rtems_disk_device *dd = dtab->minor [minor];
if (dd != NULL && dd->phys_dev->dev == dev && dd != physical_disk) {
43238: b1cb cmpal %a3,%a0
4323a: 679e beqs 431da <rtems_disk_delete+0x90>
if (dd->uses == 0) {
4323c: 4aa8 0014 tstl %a0@(20)
43240: 6712 beqs 43254 <rtems_disk_delete+0x10a>
unsigned deleted_count = 0;
for (major = 0; major < disktab_size; ++major) {
rtems_disk_device_table *dtab = disktab + major;
for (minor = 0; minor < dtab->size; ++minor) {
43242: 5285 addql #1,%d5
if (dd->uses == 0) {
++deleted_count;
dtab->minor [minor] = NULL;
free_disk_device(dd);
} else {
dd->deleted = true;
43244: 7201 moveq #1,%d1 43246: 1141 0030 moveb %d1,%a0@(48)
unsigned deleted_count = 0;
for (major = 0; major < disktab_size; ++major) {
rtems_disk_device_table *dtab = disktab + major;
for (minor = 0; minor < dtab->size; ++minor) {
4324a: baaa 0004 cmpl %a2@(4),%d5 4324e: 6500 ff6c bcsw 431bc <rtems_disk_delete+0x72>
43252: 608e bras 431e2 <rtems_disk_delete+0x98> <== NOT EXECUTED
rtems_disk_device *dd = dtab->minor [minor];
if (dd != NULL && dd->phys_dev->dev == dev && dd != physical_disk) {
if (dd->uses == 0) {
++deleted_count;
dtab->minor [minor] = NULL;
43254: 4291 clrl %a1@
for (minor = 0; minor < dtab->size; ++minor) {
rtems_disk_device *dd = dtab->minor [minor];
if (dd != NULL && dd->phys_dev->dev == dev && dd != physical_disk) {
if (dd->uses == 0) {
++deleted_count;
43256: 5287 addql #1,%d7
unsigned deleted_count = 0;
for (major = 0; major < disktab_size; ++major) {
rtems_disk_device_table *dtab = disktab + major;
for (minor = 0; minor < dtab->size; ++minor) {
43258: 5285 addql #1,%d5
if (dd != NULL && dd->phys_dev->dev == dev && dd != physical_disk) {
if (dd->uses == 0) {
++deleted_count;
dtab->minor [minor] = NULL;
free_disk_device(dd);
4325a: 2f08 movel %a0,%sp@- 4325c: 4e94 jsr %a4@ 4325e: 588f addql #4,%sp
unsigned deleted_count = 0;
for (major = 0; major < disktab_size; ++major) {
rtems_disk_device_table *dtab = disktab + major;
for (minor = 0; minor < dtab->size; ++minor) {
43260: baaa 0004 cmpl %a2@(4),%d5 43264: 6500 ff56 bcsw 431bc <rtems_disk_delete+0x72>
43268: 6000 ff78 braw 431e2 <rtems_disk_delete+0x98> <== NOT EXECUTED
return sc;
}
dd = get_disk_entry(dev, true);
if (dd == NULL) {
disk_unlock();
4326c: 4eba fb60 jsr %pc@(42dce <disk_unlock>) <== NOT EXECUTED
return RTEMS_INVALID_ID;
43270: 183c 0004 moveb #4,%d4 <== NOT EXECUTED
rtems_disk_cleanup(dd);
disk_unlock();
return RTEMS_SUCCESSFUL;
}
43274: 2004 movel %d4,%d0 <== NOT EXECUTED 43276: 4cee 3cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4327c: 4e5e unlk %fp <== NOT EXECUTED 4327e: 4e75 rts <== NOT EXECUTED
}
}
physical_disk->uses -= deleted_count;
if (physical_disk->uses == 0) {
rtems_filesystem_split_dev_t(physical_disk->dev, major, minor);
43280: 2013 movel %a3@,%d0
disktab [major].minor [minor] = NULL;
43282: 2079 0006 44fe moveal 644fe <disktab>,%a0 43288: e788 lsll #3,%d0
}
}
physical_disk->uses -= deleted_count;
if (physical_disk->uses == 0) {
rtems_filesystem_split_dev_t(physical_disk->dev, major, minor);
4328a: 222b 0004 movel %a3@(4),%d1
disktab [major].minor [minor] = NULL;
4328e: 2070 0800 moveal %a0@(00000000,%d0:l),%a0 43292: 42b0 1c00 clrl %a0@(00000000,%d1:l:4)
free_disk_device(physical_disk);
43296: 2f0b movel %a3,%sp@- 43298: 4eba fab6 jsr %pc@(42d50 <free_disk_device>) 4329c: 588f addql #4,%sp
}
dd->deleted = true;
rtems_disk_cleanup(dd);
disk_unlock();
4329e: 4eba fb2e jsr %pc@(42dce <disk_unlock>) 432a2: 6000 ff5a braw 431fe <rtems_disk_delete+0xb4>
000434d6 <rtems_disk_io_done>:
rtems_status_code
rtems_disk_io_done(void)
{
434d6: 4e56 ffec linkw %fp,#-20 434da: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
for (major = 0; major < disktab_size; ++major) {
434de: 2439 0006 44fe movel 644fe <disktab>,%d2 434e4: 49f9 0004 41a8 lea 441a8 <free>,%a4 434ea: 4ab9 0006 44fa tstl 644fa <disktab_size>
434f0: 674c beqs 4353e <rtems_disk_io_done+0x68> <== NEVER TAKEN
434f2: 4283 clrl %d3 434f4: 49f9 0004 41a8 lea 441a8 <free>,%a4
for (minor = 0; minor < dtab->size; ++minor) {
rtems_disk_device *dd = dtab->minor [minor];
if (dd != NULL) {
free_disk_device(dd);
434fa: 47fa f854 lea %pc@(42d50 <free_disk_device>),%a3
{
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
for (major = 0; major < disktab_size; ++major) {
rtems_disk_device_table *dtab = disktab + major;
434fe: 2003 movel %d3,%d0 43500: 2442 moveal %d2,%a2 43502: e788 lsll #3,%d0 43504: d5c0 addal %d0,%a2
for (minor = 0; minor < dtab->size; ++minor) {
43506: 4aaa 0004 tstl %a2@(4)
4350a: 6760 beqs 4356c <rtems_disk_io_done+0x96>
4350c: 2052 moveal %a2@,%a0 4350e: 4282 clrl %d2
rtems_disk_device *dd = dtab->minor [minor];
43510: 2030 2c00 movel %a0@(00000000,%d2:l:4),%d0
rtems_device_minor_number minor = 0;
for (major = 0; major < disktab_size; ++major) {
rtems_disk_device_table *dtab = disktab + major;
for (minor = 0; minor < dtab->size; ++minor) {
43514: 5282 addql #1,%d2
rtems_disk_device *dd = dtab->minor [minor];
if (dd != NULL) {
43516: 4a80 tstl %d0
43518: 6708 beqs 43522 <rtems_disk_io_done+0x4c>
free_disk_device(dd);
4351a: 2f00 movel %d0,%sp@- 4351c: 4e93 jsr %a3@ 4351e: 2052 moveal %a2@,%a0 43520: 588f addql #4,%sp
rtems_device_minor_number minor = 0;
for (major = 0; major < disktab_size; ++major) {
rtems_disk_device_table *dtab = disktab + major;
for (minor = 0; minor < dtab->size; ++minor) {
43522: b4aa 0004 cmpl %a2@(4),%d2
43526: 65e8 bcss 43510 <rtems_disk_io_done+0x3a>
if (dd != NULL) {
free_disk_device(dd);
}
}
free(dtab->minor);
43528: 2f08 movel %a0,%sp@-
rtems_device_minor_number minor = 0;
for (major = 0; major < disktab_size; ++major) {
rtems_disk_device_table *dtab = disktab + major;
for (minor = 0; minor < dtab->size; ++minor) {
4352a: 2439 0006 44fe movel 644fe <disktab>,%d2
rtems_disk_io_done(void)
{
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
for (major = 0; major < disktab_size; ++major) {
43530: 5283 addql #1,%d3
if (dd != NULL) {
free_disk_device(dd);
}
}
free(dtab->minor);
43532: 4e94 jsr %a4@
rtems_disk_io_done(void)
{
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
for (major = 0; major < disktab_size; ++major) {
43534: 588f addql #4,%sp 43536: b6b9 0006 44fa cmpl 644fa <disktab_size>,%d3
4353c: 65c0 bcss 434fe <rtems_disk_io_done+0x28> <== ALWAYS TAKEN
free_disk_device(dd);
}
}
free(dtab->minor);
}
free(disktab);
4353e: 2f02 movel %d2,%sp@- 43540: 4e94 jsr %a4@
rtems_semaphore_delete(diskdevs_mutex);
43542: 2f39 0006 44f6 movel 644f6 <diskdevs_mutex>,%sp@- 43548: 4eb9 0004 7bd4 jsr 47bd4 <rtems_semaphore_delete>
diskdevs_mutex = RTEMS_ID_NONE;
disktab = NULL;
disktab_size = 0;
return RTEMS_SUCCESSFUL;
}
4354e: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 43554: 4280 clrl %d0 43556: 4e5e unlk %fp
}
free(disktab);
rtems_semaphore_delete(diskdevs_mutex);
diskdevs_mutex = RTEMS_ID_NONE;
43558: 42b9 0006 44f6 clrl 644f6 <diskdevs_mutex>
disktab = NULL;
4355e: 42b9 0006 44fe clrl 644fe <disktab>
disktab_size = 0;
43564: 42b9 0006 44fa clrl 644fa <disktab_size>
return RTEMS_SUCCESSFUL;
}
4356a: 4e75 rts
rtems_device_minor_number minor = 0;
for (major = 0; major < disktab_size; ++major) {
rtems_disk_device_table *dtab = disktab + major;
for (minor = 0; minor < dtab->size; ++minor) {
4356c: 2052 moveal %a2@,%a0
rtems_disk_io_done(void)
{
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
for (major = 0; major < disktab_size; ++major) {
4356e: 5283 addql #1,%d3
if (dd != NULL) {
free_disk_device(dd);
}
}
free(dtab->minor);
43570: 2f08 movel %a0,%sp@- 43572: 4e94 jsr %a4@
rtems_disk_io_done(void)
{
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
for (major = 0; major < disktab_size; ++major) {
43574: 588f addql #4,%sp 43576: b6b9 0006 44fa cmpl 644fa <disktab_size>,%d3
4357c: 6580 bcss 434fe <rtems_disk_io_done+0x28>
4357e: 60be bras 4353e <rtems_disk_io_done+0x68>
0004342e <rtems_disk_io_initialize>:
}
}
rtems_status_code
rtems_disk_io_initialize(void)
{
4342e: 4e56 0000 linkw %fp,#0
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_device_major_number size = DISKTAB_INITIAL_SIZE;
if (disktab_size > 0) {
43432: 4ab9 0006 44fa tstl 644fa <disktab_size>
43438: 6706 beqs 43440 <rtems_disk_io_initialize+0x12> <== ALWAYS TAKEN
return RTEMS_SUCCESSFUL;
4343a: 4280 clrl %d0 <== NOT EXECUTED
}
disktab_size = size;
return RTEMS_SUCCESSFUL;
}
4343c: 4e5e unlk %fp <== NOT EXECUTED 4343e: 4e75 rts <== NOT EXECUTED
if (disktab_size > 0) {
return RTEMS_SUCCESSFUL;
}
disktab = calloc(size, sizeof(rtems_disk_device_table));
43440: 4878 0008 pea 8 <DIVIDE_BY_ZERO> 43444: 4878 0008 pea 8 <DIVIDE_BY_ZERO> 43448: 4eb9 0004 3d94 jsr 43d94 <calloc>
if (disktab == NULL) {
4344e: 508f addql #8,%sp
if (disktab_size > 0) {
return RTEMS_SUCCESSFUL;
}
disktab = calloc(size, sizeof(rtems_disk_device_table));
43450: 23c0 0006 44fe movel %d0,644fe <disktab>
if (disktab == NULL) {
43456: 6758 beqs 434b0 <rtems_disk_io_initialize+0x82> <== NEVER TAKEN
return RTEMS_NO_MEMORY;
}
diskdevs_protected = false;
sc = rtems_semaphore_create(
43458: 4879 0006 44f6 pea 644f6 <diskdevs_mutex>
disktab = calloc(size, sizeof(rtems_disk_device_table));
if (disktab == NULL) {
return RTEMS_NO_MEMORY;
}
diskdevs_protected = false;
4345e: 4200 clrb %d0
sc = rtems_semaphore_create(
43460: 42a7 clrl %sp@- 43462: 4878 0010 pea 10 <INVALID_OPERATION> 43466: 4878 0001 pea 1 <ADD>
disktab = calloc(size, sizeof(rtems_disk_device_table));
if (disktab == NULL) {
return RTEMS_NO_MEMORY;
}
diskdevs_protected = false;
4346a: 13c0 0006 44f4 moveb %d0,644f4 <diskdevs_protected>
sc = rtems_semaphore_create(
43470: 2f3c 4444 4556 movel #1145324886,%sp@- 43476: 4eb9 0004 7a0c jsr 47a0c <rtems_semaphore_create>
RTEMS_FIFO | RTEMS_BINARY_SEMAPHORE | RTEMS_NO_INHERIT_PRIORITY
| RTEMS_NO_PRIORITY_CEILING | RTEMS_LOCAL,
0,
&diskdevs_mutex
);
if (sc != RTEMS_SUCCESSFUL) {
4347c: 4fef 0014 lea %sp@(20),%sp 43480: 4a80 tstl %d0
43482: 6714 beqs 43498 <rtems_disk_io_initialize+0x6a> <== ALWAYS TAKEN
free(disktab);
43484: 2f39 0006 44fe movel 644fe <disktab>,%sp@- <== NOT EXECUTED 4348a: 4eb9 0004 41a8 jsr 441a8 <free> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
43490: 588f addql #4,%sp <== NOT EXECUTED 43492: 701a moveq #26,%d0 <== NOT EXECUTED
}
disktab_size = size;
return RTEMS_SUCCESSFUL;
}
43494: 4e5e unlk %fp <== NOT EXECUTED 43496: 4e75 rts <== NOT EXECUTED
free(disktab);
return RTEMS_NO_MEMORY;
}
sc = rtems_bdbuf_init();
43498: 4eb9 0004 d470 jsr 4d470 <rtems_bdbuf_init>
if (sc != RTEMS_SUCCESSFUL) {
4349e: 4a80 tstl %d0
434a0: 6614 bnes 434b6 <rtems_disk_io_initialize+0x88> <== NEVER TAKEN
free(disktab);
return RTEMS_UNSATISFIED;
}
disktab_size = size;
434a2: 7008 moveq #8,%d0
return RTEMS_SUCCESSFUL;
}
434a4: 4e5e unlk %fp
free(disktab);
return RTEMS_UNSATISFIED;
}
disktab_size = size;
434a6: 23c0 0006 44fa movel %d0,644fa <disktab_size>
return RTEMS_SUCCESSFUL;
434ac: 4200 clrb %d0
}
434ae: 4e75 rts
return RTEMS_SUCCESSFUL;
}
disktab = calloc(size, sizeof(rtems_disk_device_table));
if (disktab == NULL) {
return RTEMS_NO_MEMORY;
434b0: 701a moveq #26,%d0 <== NOT EXECUTED
}
disktab_size = size;
return RTEMS_SUCCESSFUL;
}
434b2: 4e5e unlk %fp <== NOT EXECUTED 434b4: 4e75 rts <== NOT EXECUTED
return RTEMS_NO_MEMORY;
}
sc = rtems_bdbuf_init();
if (sc != RTEMS_SUCCESSFUL) {
rtems_semaphore_delete(diskdevs_mutex);
434b6: 2f39 0006 44f6 movel 644f6 <diskdevs_mutex>,%sp@- <== NOT EXECUTED 434bc: 4eb9 0004 7bd4 jsr 47bd4 <rtems_semaphore_delete> <== NOT EXECUTED
free(disktab);
434c2: 2f39 0006 44fe movel 644fe <disktab>,%sp@- <== NOT EXECUTED 434c8: 4eb9 0004 41a8 jsr 441a8 <free> <== NOT EXECUTED
return RTEMS_UNSATISFIED;
434ce: 508f addql #8,%sp <== NOT EXECUTED 434d0: 700d moveq #13,%d0 <== NOT EXECUTED
}
disktab_size = size;
return RTEMS_SUCCESSFUL;
}
434d2: 4e5e unlk %fp <== NOT EXECUTED
0004337c <rtems_disk_next>:
rtems_disk_device *
rtems_disk_next(dev_t dev)
{
4337c: 4e56 ffec linkw %fp,#-20 43380: 202e 0008 movel %fp@(8),%d0 43384: 222e 000c movel %fp@(12),%d1 43388: 48d7 043c moveml %d2-%d5/%a2,%sp@
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device_table *dtab = NULL;
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
if (dev != (dev_t) -1) {
4338c: 74ff moveq #-1,%d2 4338e: 76ff moveq #-1,%d3 43390: 9681 subl %d1,%d3 43392: 9580 subxl %d0,%d2 43394: 6700 0090 beqw 43426 <rtems_disk_next+0xaa>
rtems_filesystem_split_dev_t(dev, major, minor);
/* If minor wraps around */
if ((minor + 1) < minor) {
43398: 2401 movel %d1,%d2
)
{
union __rtems_dev_t temp;
temp.device = device;
return temp.__overlay.major;
4339a: 2600 movel %d0,%d3 4339c: 5282 addql #1,%d2 4339e: 78ff moveq #-1,%d4 433a0: b881 cmpl %d1,%d4
433a2: 636a blss 4340e <rtems_disk_next+0x92> <== NEVER TAKEN
} else {
++minor;
}
}
sc = disk_lock();
433a4: 4eba f9fa jsr %pc@(42da0 <disk_lock>)
if (sc != RTEMS_SUCCESSFUL) {
433a8: 4a80 tstl %d0
433aa: 666e bnes 4341a <rtems_disk_next+0x9e> <== NEVER TAKEN
return NULL;
}
if (major >= disktab_size) {
433ac: 2239 0006 44fa movel 644fa <disktab_size>,%d1 433b2: b283 cmpl %d3,%d1
433b4: 6348 blss 433fe <rtems_disk_next+0x82> <== NEVER TAKEN
disk_unlock();
return NULL;
}
dtab = disktab + major;
433b6: 2a39 0006 44fe movel 644fe <disktab>,%d5 433bc: 2003 movel %d3,%d0 433be: 2445 moveal %d5,%a2 433c0: e788 lsll #3,%d0 433c2: d5c0 addal %d0,%a2 433c4: 2052 moveal %a2@,%a0
while (true) {
if (dtab->minor == NULL || minor >= dtab->size) {
433c6: 4a88 tstl %a0
433c8: 672c beqs 433f6 <rtems_disk_next+0x7a>
433ca: b4aa 0004 cmpl %a2@(4),%d2
433ce: 6426 bccs 433f6 <rtems_disk_next+0x7a>
disk_unlock();
return NULL;
}
dtab = disktab + major;
} else if (dtab->minor [minor] == NULL) {
433d0: 2802 movel %d2,%d4
++minor;
433d2: 5282 addql #1,%d2
disk_unlock();
return NULL;
}
dtab = disktab + major;
} else if (dtab->minor [minor] == NULL) {
433d4: e58c lsll #2,%d4 433d6: 2270 4800 moveal %a0@(00000000,%d4:l),%a1 433da: 4a89 tstl %a1
433dc: 67e8 beqs 433c6 <rtems_disk_next+0x4a>
++minor;
} else {
++dtab->minor [minor]->uses;
433de: 52a9 0014 addql #1,%a1@(20)
disk_unlock();
433e2: 4eba f9ea jsr %pc@(42dce <disk_unlock>)
return dtab->minor [minor];
433e6: 2052 moveal %a2@,%a0 433e8: 2030 4800 movel %a0@(00000000,%d4:l),%d0
}
}
}
433ec: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 433f2: 4e5e unlk %fp 433f4: 4e75 rts
dtab = disktab + major;
while (true) {
if (dtab->minor == NULL || minor >= dtab->size) {
minor = 0;
++major;
433f6: 5283 addql #1,%d3
}
dtab = disktab + major;
while (true) {
if (dtab->minor == NULL || minor >= dtab->size) {
minor = 0;
433f8: 4282 clrl %d2
++major;
if (major >= disktab_size) {
433fa: b681 cmpl %d1,%d3
433fc: 65be bcss 433bc <rtems_disk_next+0x40>
disk_unlock();
433fe: 4eba f9ce jsr %pc@(42dce <disk_unlock>)
return NULL;
43402: 4280 clrl %d0
disk_unlock();
return dtab->minor [minor];
}
}
}
43404: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 4340a: 4e5e unlk %fp 4340c: 4e75 rts
rtems_filesystem_split_dev_t(dev, major, minor);
/* If minor wraps around */
if ((minor + 1) < minor) {
/* If major wraps around */
if ((major + 1) < major) {
4340e: 5280 addql #1,%d0 <== NOT EXECUTED 43410: b680 cmpl %d0,%d3 <== NOT EXECUTED 43412: 6206 bhis 4341a <rtems_disk_next+0x9e> <== NOT EXECUTED 43414: 2600 movel %d0,%d3 <== NOT EXECUTED
return NULL;
}
++major;
minor = 0;
43416: 4282 clrl %d2 <== NOT EXECUTED 43418: 608a bras 433a4 <rtems_disk_next+0x28> <== NOT EXECUTED
}
}
sc = disk_lock();
if (sc != RTEMS_SUCCESSFUL) {
return NULL;
4341a: 4280 clrl %d0 <== NOT EXECUTED
disk_unlock();
return dtab->minor [minor];
}
}
}
4341c: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 <== NOT EXECUTED 43422: 4e5e unlk %fp <== NOT EXECUTED 43424: 4e75 rts <== NOT EXECUTED
rtems_disk_next(dev_t dev)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device_table *dtab = NULL;
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
43426: 4282 clrl %d2
rtems_disk_device *
rtems_disk_next(dev_t dev)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device_table *dtab = NULL;
rtems_device_major_number major = 0;
43428: 4283 clrl %d3 4342a: 6000 ff78 braw 433a4 <rtems_disk_next+0x28>
000432a6 <rtems_disk_obtain>:
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device *dd = NULL;
rtems_interrupt_level level;
rtems_interrupt_disable(level);
432a6: 203c 0000 0700 movel #1792,%d0
return RTEMS_SUCCESSFUL;
}
rtems_disk_device *
rtems_disk_obtain(dev_t dev)
{
432ac: 4e56 fff0 linkw %fp,#-16 432b0: 48d7 001c moveml %d2-%d4,%sp@ 432b4: 242e 0008 movel %fp@(8),%d2 432b8: 262e 000c movel %fp@(12),%d3
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device *dd = NULL;
rtems_interrupt_level level;
rtems_interrupt_disable(level);
432bc: 40c4 movew %sr,%d4 432be: 8084 orl %d4,%d0 432c0: 46c0 movew %d0,%sr
if (!diskdevs_protected) {
432c2: 1039 0006 44f4 moveb 644f4 <diskdevs_protected>,%d0
432c8: 672e beqs 432f8 <rtems_disk_obtain+0x52> <== ALWAYS TAKEN
/* Frequent and quickest case */
dd = get_disk_entry(dev, false);
rtems_interrupt_enable(level);
} else {
rtems_interrupt_enable(level);
432ca: 46c4 movew %d4,%sr <== NOT EXECUTED
sc = disk_lock();
432cc: 4eba fad2 jsr %pc@(42da0 <disk_lock>) <== NOT EXECUTED
if (sc == RTEMS_SUCCESSFUL) {
432d0: 4a80 tstl %d0 <== NOT EXECUTED 432d2: 663e bnes 43312 <rtems_disk_obtain+0x6c> <== NOT EXECUTED
dd = get_disk_entry(dev, false);
432d4: 42a7 clrl %sp@- <== NOT EXECUTED 432d6: 2f03 movel %d3,%sp@- <== NOT EXECUTED 432d8: 2f02 movel %d2,%sp@- <== NOT EXECUTED 432da: 4eba fa1c jsr %pc@(42cf8 <get_disk_entry>) <== NOT EXECUTED
disk_unlock();
432de: 2d40 fffc movel %d0,%fp@(-4) <== NOT EXECUTED 432e2: 4eba faea jsr %pc@(42dce <disk_unlock>) <== NOT EXECUTED 432e6: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED 432ea: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
}
}
return dd;
}
432ee: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 <== NOT EXECUTED 432f4: 4e5e unlk %fp <== NOT EXECUTED 432f6: 4e75 rts <== NOT EXECUTED
rtems_interrupt_level level;
rtems_interrupt_disable(level);
if (!diskdevs_protected) {
/* Frequent and quickest case */
dd = get_disk_entry(dev, false);
432f8: 42a7 clrl %sp@- 432fa: 2f03 movel %d3,%sp@- 432fc: 2f02 movel %d2,%sp@- 432fe: 4eba f9f8 jsr %pc@(42cf8 <get_disk_entry>)
rtems_interrupt_enable(level);
43302: 46c4 movew %d4,%sr 43304: 4fef 000c lea %sp@(12),%sp
disk_unlock();
}
}
return dd;
}
43308: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 4330e: 4e5e unlk %fp 43310: 4e75 rts
rtems_disk_device *
rtems_disk_obtain(dev_t dev)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device *dd = NULL;
43312: 4280 clrl %d0 <== NOT EXECUTED
disk_unlock();
}
}
return dd;
}
43314: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 <== NOT EXECUTED 4331a: 4e5e unlk %fp <== NOT EXECUTED
0004bd84 <rtems_filesystem_get_mount_handler>:
rtems_filesystem_fsmount_me_t
rtems_filesystem_get_mount_handler(
const char *type
)
{
4bd84: 4e56 fff8 linkw %fp,#-8 4bd88: 202e 0008 movel %fp@(8),%d0
find_arg fa = {
4bd8c: 42ae fffc clrl %fp@(-4) 4bd90: 2d40 fff8 movel %d0,%fp@(-8)
.type = type,
.mount_h = NULL
};
if ( type != NULL ) {
4bd94: 6718 beqs 4bdae <rtems_filesystem_get_mount_handler+0x2a><== NEVER TAKEN
rtems_filesystem_iterate( find_handler, &fa );
4bd96: 486e fff8 pea %fp@(-8) 4bd9a: 487a feec pea %pc@(4bc88 <find_handler>) 4bd9e: 4eb9 0004 bcca jsr 4bcca <rtems_filesystem_iterate> 4bda4: 202e fffc movel %fp@(-4),%d0 4bda8: 508f addql #8,%sp
}
return fa.mount_h;
}
4bdaa: 4e5e unlk %fp 4bdac: 4e75 rts
find_arg fa = {
.type = type,
.mount_h = NULL
};
if ( type != NULL ) {
4bdae: 4280 clrl %d0 <== NOT EXECUTED
rtems_filesystem_iterate( find_handler, &fa );
}
return fa.mount_h;
}
4bdb0: 4e5e unlk %fp <== NOT EXECUTED
00042dc4 <rtems_filesystem_initialize>:
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
42dc4: 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 )
{
42dc6: 4e56 ffe0 linkw %fp,#-32
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
42dca: 2079 0005 f8d0 moveal 5f8d0 <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 )
{
42dd0: 48d7 1c00 moveml %a2-%a4,%sp@
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
42dd4: 2140 002c movel %d0,%a0@(44)
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
42dd8: 4ab9 0005 daa4 tstl 5daa4 <rtems_filesystem_mount_table_size> 42dde: 6700 00c2 beqw 42ea2 <rtems_filesystem_initialize+0xde>
rtems_fatal_error_occurred( 0xABCD0001 );
mt = &rtems_filesystem_mount_table[0];
42de2: 2079 0005 f78a moveal 5f78a <rtems_filesystem_mount_table>,%a0
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
42de8: 42a7 clrl %sp@- 42dea: 2f28 0004 movel %a0@(4),%sp@- 42dee: 2f10 movel %a0@,%sp@- 42df0: 2f28 000c movel %a0@(12),%sp@- 42df4: 2f28 0008 movel %a0@(8),%sp@- 42df8: 4eb9 0004 3858 jsr 43858 <mount>
if ( status == -1 )
42dfe: 4fef 0014 lea %sp@(20),%sp 42e02: 72ff moveq #-1,%d1 42e04: b280 cmpl %d0,%d1 42e06: 6700 00b2 beqw 42eba <rtems_filesystem_initialize+0xf6>
rtems_fatal_error_occurred( 0xABCD0002 );
rtems_filesystem_link_counts = 0;
42e0a: 2079 0005 f8d0 moveal 5f8d0 <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);
42e10: 45ee ffec lea %fp@(-20),%a2 42e14: 49f9 0004 31e4 lea 431e4 <rtems_filesystem_evaluate_path>,%a4
rtems_filesystem_root = loc;
42e1a: 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;
42e1c: 4240 clrw %d0 42e1e: 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);
42e22: 42a7 clrl %sp@- 42e24: 2f0a movel %a2,%sp@- 42e26: 42a7 clrl %sp@- 42e28: 4878 0001 pea 1 <ADD> 42e2c: 4879 0005 e268 pea 5e268 <IMFS_ops+0x48> 42e32: 4e94 jsr %a4@
rtems_filesystem_root = loc;
42e34: 2079 0005 f8d0 moveal 5f8d0 <rtems_current_user_env>,%a0 42e3a: 2163 0028 movel %a3@-,%a0@(40) 42e3e: 216e fff8 0024 movel %fp@(-8),%a0@(36) 42e44: 2152 0018 movel %a2@,%a0@(24) 42e48: 216e fff0 001c movel %fp@(-16),%a0@(28) 42e4e: 216e fff4 0020 movel %fp@(-12),%a0@(32)
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
42e54: 42a7 clrl %sp@- 42e56: 2f0a movel %a2,%sp@- 42e58: 42a7 clrl %sp@- 42e5a: 4878 0001 pea 1 <ADD> 42e5e: 4879 0005 e268 pea 5e268 <IMFS_ops+0x48> 42e64: 4e94 jsr %a4@
rtems_filesystem_current = loc;
42e66: 2079 0005 f8d0 moveal 5f8d0 <rtems_current_user_env>,%a0 42e6c: 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);
42e6e: 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;
42e72: 20d2 movel %a2@,%a0@+ 42e74: 20ee fff0 movel %fp@(-16),%a0@+ 42e78: 20ee fff4 movel %fp@(-12),%a0@+ 42e7c: 20ee fff8 movel %fp@(-8),%a0@+ 42e80: 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);
42e82: 4878 01ff pea 1ff <DBL_MANT_DIG+0x1ca> 42e86: 4879 0005 e26a pea 5e26a <IMFS_ops+0x4a> 42e8c: 4eb9 0004 36d0 jsr 436d0 <mkdir>
if ( status != 0 )
42e92: 508f addql #8,%sp 42e94: 4a80 tstl %d0
42e96: 6616 bnes 42eae <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. */ }
42e98: 4cee 1c00 ffe0 moveml %fp@(-32),%a2-%a4 42e9e: 4e5e unlk %fp 42ea0: 4e75 rts
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
rtems_fatal_error_occurred( 0xABCD0001 );
42ea2: 2f3c abcd 0001 movel #-1412628479,%sp@- <== NOT EXECUTED 42ea8: 4eb9 0004 724c jsr 4724c <rtems_fatal_error_occurred> <== NOT EXECUTED
* created that way by the IMFS.
*/
status = mkdir( "/dev", 0777);
if ( status != 0 )
rtems_fatal_error_occurred( 0xABCD0003 );
42eae: 2f3c abcd 0003 movel #-1412628477,%sp@- <== NOT EXECUTED 42eb4: 4eb9 0004 724c jsr 4724c <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 );
42eba: 2f3c abcd 0002 movel #-1412628478,%sp@- <== NOT EXECUTED 42ec0: 4eb9 0004 724c jsr 4724c <rtems_fatal_error_occurred> <== NOT EXECUTED
...
0004bcca <rtems_filesystem_iterate>:
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
4bcca: 4e56 ffec linkw %fp,#-20 4bcce: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 4bcd2: 266e 0008 moveal %fp@(8),%a3 4bcd6: 282e 000c movel %fp@(12),%d4
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
4bcda: 4ab9 0005 dab8 tstl 5dab8 <rtems_filesystem_table>
4bce0: 673a beqs 4bd1c <rtems_filesystem_iterate+0x52> <== NEVER TAKEN
4bce2: 45f9 0005 dac0 lea 5dac0 <rtems_filesystem_table+0x8>,%a2 4bce8: 243c 0005 dab8 movel #383672,%d2
stop = (*routine)( table_entry, routine_arg );
4bcee: 2f04 movel %d4,%sp@- 4bcf0: 2f02 movel %d2,%sp@- 4bcf2: 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 ) {
4bcf4: 508f addql #8,%sp
stop = (*routine)( table_entry, routine_arg );
4bcf6: 1600 moveb %d0,%d3
rtems_filesystem_table_t entry;
} filesystem_node;
static RTEMS_CHAIN_DEFINE_EMPTY(filesystem_chain);
bool rtems_filesystem_iterate(
4bcf8: 2002 movel %d2,%d0 4bcfa: 0480 0005 dab8 subil #383672,%d0
{
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
4bd00: 5082 addql #8,%d2 4bd02: 4ab2 0800 tstl %a2@(00000000,%d0:l)
4bd06: 6710 beqs 4bd18 <rtems_filesystem_iterate+0x4e>
4bd08: 4a03 tstb %d3
4bd0a: 67e2 beqs 4bcee <rtems_filesystem_iterate+0x24>
}
rtems_libio_unlock();
}
return stop;
}
4bd0c: 1003 moveb %d3,%d0 4bd0e: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 4bd14: 4e5e unlk %fp 4bd16: 4e75 rts
while ( table_entry->type && !stop ) {
stop = (*routine)( table_entry, routine_arg );
++table_entry;
}
if ( !stop ) {
4bd18: 4a03 tstb %d3
4bd1a: 66f0 bnes 4bd0c <rtems_filesystem_iterate+0x42>
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 );
4bd1c: 42a7 clrl %sp@- 4bd1e: 42a7 clrl %sp@- 4bd20: 2f39 0006 0efc movel 60efc <rtems_libio_semaphore>,%sp@- 4bd26: 4eb9 0004 6acc jsr 46acc <rtems_semaphore_obtain> 4bd2c: 2479 0005 f8d8 moveal 5f8d8 <filesystem_chain>,%a2
rtems_libio_lock();
for (
4bd32: 4fef 000c lea %sp@(12),%sp 4bd36: b5fc 0005 f8dc cmpal #391388,%a2
4bd3c: 6734 beqs 4bd72 <rtems_filesystem_iterate+0xa8>
!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 );
4bd3e: 2f04 movel %d4,%sp@- 4bd40: 486a 0008 pea %a2@(8) 4bd44: 4e93 jsr %a3@
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
4bd46: 2452 moveal %a2@,%a2
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
4bd48: 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 );
4bd4a: 1600 moveb %d0,%d3
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
4bd4c: b5fc 0005 f8dc cmpal #391388,%a2
4bd52: 6704 beqs 4bd58 <rtems_filesystem_iterate+0x8e>
node = rtems_chain_first( &filesystem_chain );
!rtems_chain_is_tail( &filesystem_chain, node ) && !stop;
4bd54: 4a00 tstb %d0
4bd56: 67e6 beqs 4bd3e <rtems_filesystem_iterate+0x74> <== ALWAYS TAKEN
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
4bd58: 2f39 0006 0efc movel 60efc <rtems_libio_semaphore>,%sp@- 4bd5e: 4eb9 0004 6c1c jsr 46c1c <rtems_semaphore_release> 4bd64: 588f addql #4,%sp
}
rtems_libio_unlock();
}
return stop;
}
4bd66: 1003 moveb %d3,%d0 4bd68: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 4bd6e: 4e5e unlk %fp 4bd70: 4e75 rts 4bd72: 2f39 0006 0efc movel 60efc <rtems_libio_semaphore>,%sp@-
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
4bd78: 4203 clrb %d3 4bd7a: 4eb9 0004 6c1c jsr 46c1c <rtems_semaphore_release> 4bd80: 588f addql #4,%sp 4bd82: 60e2 bras 4bd66 <rtems_filesystem_iterate+0x9c>
000437dc <rtems_filesystem_mount_iterate>:
bool rtems_filesystem_mount_iterate(
rtems_per_filesystem_mount_routine routine,
void *routine_arg
)
{
437dc: 4e56 fff0 linkw %fp,#-16 437e0: 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 );
437e4: 42a7 clrl %sp@- 437e6: 266e 0008 moveal %fp@(8),%a3 437ea: 42a7 clrl %sp@- 437ec: 2f39 0006 0efc movel 60efc <rtems_libio_semaphore>,%sp@- 437f2: 262e 000c movel %fp@(12),%d3 437f6: 4eb9 0004 6acc jsr 46acc <rtems_semaphore_obtain>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
437fc: 2479 0005 f7b4 moveal 5f7b4 <mount_chain>,%a2
rtems_chain_node *node = NULL;
bool stop = false;
rtems_libio_lock();
for (
43802: 4fef 000c lea %sp@(12),%sp 43806: b5fc 0005 f7b8 cmpal #391096,%a2
4380c: 6730 beqs 4383e <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 );
4380e: 2f03 movel %d3,%sp@- 43810: 2f0a movel %a2,%sp@- 43812: 4e93 jsr %a3@
}
rtems_libio_unlock();
return stop;
}
43814: 2452 moveal %a2@,%a2
{
rtems_chain_node *node = NULL;
bool stop = false;
rtems_libio_lock();
for (
43816: 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 );
43818: 1400 moveb %d0,%d2
{
rtems_chain_node *node = NULL;
bool stop = false;
rtems_libio_lock();
for (
4381a: b5fc 0005 f7b8 cmpal #391096,%a2
43820: 6704 beqs 43826 <rtems_filesystem_mount_iterate+0x4a>
node = rtems_chain_first( &mount_chain );
!rtems_chain_is_tail( &mount_chain, node ) && !stop;
43822: 4a00 tstb %d0
43824: 67e8 beqs 4380e <rtems_filesystem_mount_iterate+0x32><== ALWAYS TAKEN
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
43826: 2f39 0006 0efc movel 60efc <rtems_libio_semaphore>,%sp@- 4382c: 4eb9 0004 6c1c jsr 46c1c <rtems_semaphore_release>
stop = (*routine)( mt_entry, routine_arg );
}
rtems_libio_unlock();
return stop;
}
43832: 1002 moveb %d2,%d0 43834: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4383a: 4e5e unlk %fp 4383c: 4e75 rts
4383e: 2f39 0006 0efc movel 60efc <rtems_libio_semaphore>,%sp@- <== NOT EXECUTED
rtems_per_filesystem_mount_routine routine,
void *routine_arg
)
{
rtems_chain_node *node = NULL;
bool stop = false;
43844: 4202 clrb %d2 <== NOT EXECUTED 43846: 4eb9 0004 6c1c jsr 46c1c <rtems_semaphore_release> <== NOT EXECUTED
stop = (*routine)( mt_entry, routine_arg );
}
rtems_libio_unlock();
return stop;
}
4384c: 1002 moveb %d2,%d0 <== NOT EXECUTED 4384e: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED 43854: 4e5e unlk %fp <== NOT EXECUTED
00043272 <rtems_filesystem_prefix_separators>:
int rtems_filesystem_prefix_separators(
const char *pathname,
int pathnamelen
)
{
43272: 4e56 fff0 linkw %fp,#-16 43276: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4327a: 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 ) )
4327e: 1012 moveb %a2@,%d0
int rtems_filesystem_prefix_separators(
const char *pathname,
int pathnamelen
)
{
43280: 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 ) )
43284: 4a00 tstb %d0
43286: 6730 beqs 432b8 <rtems_filesystem_prefix_separators+0x46>
43288: 4a83 tstl %d3
4328a: 672c beqs 432b8 <rtems_filesystem_prefix_separators+0x46>
}
return len;
}
int rtems_filesystem_prefix_separators(
4328c: 528a addql #1,%a2
)
{
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
4328e: 4282 clrl %d2 43290: 47f9 0004 4220 lea 44220 <rtems_filesystem_is_separator>,%a3
while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
43296: 49c0 extbl %d0 43298: 2f00 movel %d0,%sp@- 4329a: 4e93 jsr %a3@ 4329c: 588f addql #4,%sp 4329e: 4a80 tstl %d0
432a0: 670a beqs 432ac <rtems_filesystem_prefix_separators+0x3a>
{
pathname++;
pathnamelen--;
stripped++;
432a2: 5282 addql #1,%d2
{
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
432a4: 101a moveb %a2@+,%d0
432a6: 6704 beqs 432ac <rtems_filesystem_prefix_separators+0x3a>
432a8: b483 cmpl %d3,%d2
432aa: 66ea bnes 43296 <rtems_filesystem_prefix_separators+0x24><== ALWAYS TAKEN
pathname++;
pathnamelen--;
stripped++;
}
return stripped;
}
432ac: 2002 movel %d2,%d0 432ae: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 432b4: 4e5e unlk %fp 432b6: 4e75 rts
)
{
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
432b8: 4282 clrl %d2
pathname++;
pathnamelen--;
stripped++;
}
return stripped;
}
432ba: 2002 movel %d2,%d0 432bc: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 432c2: 4e5e unlk %fp
...
0004bdb4 <rtems_filesystem_register>:
int
rtems_filesystem_register(
const char *type,
rtems_filesystem_fsmount_me_t mount_h
)
{
4bdb4: 4e56 fff4 linkw %fp,#-12 4bdb8: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 4bdbc: 242e 0008 movel %fp@(8),%d2
size_t type_size = strlen(type) + 1;
4bdc0: 2f02 movel %d2,%sp@- 4bdc2: 4eb9 0005 0404 jsr 50404 <strlen> 4bdc8: 588f addql #4,%sp 4bdca: 2640 moveal %d0,%a3
size_t fsn_size = sizeof( filesystem_node ) + type_size; filesystem_node *fsn = malloc( fsn_size );
4bdcc: 486b 0011 pea %a3@(17) 4bdd0: 4eb9 0004 360c jsr 4360c <malloc>
char *type_storage = (char *) fsn + sizeof( *fsn );
if ( fsn == NULL )
4bdd6: 588f addql #4,%sp
rtems_filesystem_fsmount_me_t mount_h
)
{
size_t type_size = strlen(type) + 1;
size_t fsn_size = sizeof( filesystem_node ) + type_size;
filesystem_node *fsn = malloc( fsn_size );
4bdd8: 2440 moveal %d0,%a2
char *type_storage = (char *) fsn + sizeof( *fsn );
if ( fsn == NULL )
4bdda: 4a80 tstl %d0 4bddc: 6700 0096 beqw 4be74 <rtems_filesystem_register+0xc0>
rtems_set_errno_and_return_minus_one( ENOMEM );
memcpy(type_storage, type, type_size);
4bde0: 486b 0001 pea %a3@(1)
)
{
size_t type_size = strlen(type) + 1;
size_t fsn_size = sizeof( filesystem_node ) + type_size;
filesystem_node *fsn = malloc( fsn_size );
char *type_storage = (char *) fsn + sizeof( *fsn );
4bde4: 47ea 0010 lea %a2@(16),%a3
if ( fsn == NULL )
rtems_set_errno_and_return_minus_one( ENOMEM );
memcpy(type_storage, type, type_size);
4bde8: 2f02 movel %d2,%sp@- 4bdea: 2f0b movel %a3,%sp@- 4bdec: 4eb9 0004 f8b8 jsr 4f8b8 <memcpy>
fsn->entry.type = type_storage; fsn->entry.mount_h = mount_h;
4bdf2: 256e 000c 000c movel %fp@(12),%a2@(12)
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 );
4bdf8: 42a7 clrl %sp@- 4bdfa: 42a7 clrl %sp@- 4bdfc: 2f39 0006 0efc movel 60efc <rtems_libio_semaphore>,%sp@-
if ( fsn == NULL )
rtems_set_errno_and_return_minus_one( ENOMEM );
memcpy(type_storage, type, type_size);
fsn->entry.type = type_storage;
4be02: 254b 0008 movel %a3,%a2@(8) 4be06: 4eb9 0004 6acc jsr 46acc <rtems_semaphore_obtain>
fsn->entry.mount_h = mount_h;
rtems_libio_lock();
if ( rtems_filesystem_get_mount_handler( type ) == NULL ) {
4be0c: 2f02 movel %d2,%sp@- 4be0e: 4eb9 0004 bd84 jsr 4bd84 <rtems_filesystem_get_mount_handler> 4be14: 4fef 001c lea %sp@(28),%sp 4be18: 4a80 tstl %d0
4be1a: 662a bnes 4be46 <rtems_filesystem_register+0x92> <== NEVER TAKEN
4be1c: 2f0a movel %a2,%sp@- 4be1e: 4879 0005 f8d8 pea 5f8d8 <filesystem_chain> 4be24: 4eb9 0004 7574 jsr 47574 <_Chain_Append>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
4be2a: 2f39 0006 0efc movel 60efc <rtems_libio_semaphore>,%sp@- 4be30: 4eb9 0004 6c1c jsr 46c1c <rtems_semaphore_release> 4be36: 4fef 000c lea %sp@(12),%sp
rtems_set_errno_and_return_minus_one( EINVAL );
}
rtems_libio_unlock();
return 0;
4be3a: 4280 clrl %d0
}
4be3c: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 4be42: 4e5e unlk %fp 4be44: 4e75 rts 4be46: 2f39 0006 0efc movel 60efc <rtems_libio_semaphore>,%sp@- 4be4c: 4eb9 0004 6c1c jsr 46c1c <rtems_semaphore_release>
rtems_libio_lock();
if ( rtems_filesystem_get_mount_handler( type ) == NULL ) {
rtems_chain_append( &filesystem_chain, &fsn->node );
} else {
rtems_libio_unlock();
free( fsn );
4be52: 2f0a movel %a2,%sp@- 4be54: 4eb9 0004 32dc jsr 432dc <free>
rtems_set_errno_and_return_minus_one( EINVAL );
4be5a: 4eb9 0004 f098 jsr 4f098 <__errno> 4be60: 508f addql #8,%sp 4be62: 7216 moveq #22,%d1 4be64: 2040 moveal %d0,%a0 4be66: 70ff moveq #-1,%d0
}
rtems_libio_unlock();
return 0;
}
4be68: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3
rtems_chain_append( &filesystem_chain, &fsn->node );
} else {
rtems_libio_unlock();
free( fsn );
rtems_set_errno_and_return_minus_one( EINVAL );
4be6e: 2081 movel %d1,%a0@
}
rtems_libio_unlock();
return 0;
}
4be70: 4e5e unlk %fp 4be72: 4e75 rts
size_t fsn_size = sizeof( filesystem_node ) + type_size;
filesystem_node *fsn = malloc( fsn_size );
char *type_storage = (char *) fsn + sizeof( *fsn );
if ( fsn == NULL )
rtems_set_errno_and_return_minus_one( ENOMEM );
4be74: 4eb9 0004 f098 jsr 4f098 <__errno> 4be7a: 740c moveq #12,%d2 4be7c: 2040 moveal %d0,%a0 4be7e: 70ff moveq #-1,%d0 4be80: 2082 movel %d2,%a0@
rtems_set_errno_and_return_minus_one( EINVAL );
}
rtems_libio_unlock();
return 0;
}
4be82: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3
4be88: 4e5e unlk %fp <== NOT EXECUTED
0004be8c <rtems_filesystem_unregister>:
int
rtems_filesystem_unregister(
const char *type
)
{
4be8c: 4e56 fff4 linkw %fp,#-12 4be90: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 4be94: 242e 0008 movel %fp@(8),%d2
rtems_chain_node *node = NULL;
if ( type == NULL ) {
4be98: 6700 0094 beqw 4bf2e <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 );
4be9c: 42a7 clrl %sp@- 4be9e: 42a7 clrl %sp@- 4bea0: 2f39 0006 0efc movel 60efc <rtems_libio_semaphore>,%sp@- 4bea6: 4eb9 0004 6acc jsr 46acc <rtems_semaphore_obtain> 4beac: 2479 0005 f8d8 moveal 5f8d8 <filesystem_chain>,%a2
rtems_set_errno_and_return_minus_one( EINVAL );
}
rtems_libio_lock();
for (
4beb2: 4fef 000c lea %sp@(12),%sp 4beb6: b5fc 0005 f8dc cmpal #391388,%a2
4bebc: 671e beqs 4bedc <rtems_filesystem_unregister+0x50>
4bebe: 47f9 0004 fe50 lea 4fe50 <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 ) {
4bec4: 2f02 movel %d2,%sp@- 4bec6: 2f2a 0008 movel %a2@(8),%sp@- 4beca: 4e93 jsr %a3@ 4becc: 508f addql #8,%sp 4bece: 4a80 tstl %d0
4bed0: 6730 beqs 4bf02 <rtems_filesystem_unregister+0x76>
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
4bed2: 2452 moveal %a2@,%a2
if ( type == NULL ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
rtems_libio_lock();
for (
4bed4: b5fc 0005 f8dc cmpal #391388,%a2
4beda: 66e8 bnes 4bec4 <rtems_filesystem_unregister+0x38><== NEVER TAKEN
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
4bedc: 2f39 0006 0efc movel 60efc <rtems_libio_semaphore>,%sp@- 4bee2: 4eb9 0004 6c1c jsr 46c1c <rtems_semaphore_release>
return 0;
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
4bee8: 4eb9 0004 f098 jsr 4f098 <__errno> 4beee: 588f addql #4,%sp 4bef0: 7202 moveq #2,%d1 4bef2: 2040 moveal %d0,%a0 4bef4: 70ff moveq #-1,%d0
}
4bef6: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3
return 0;
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
4befc: 2081 movel %d1,%a0@
}
4befe: 4e5e unlk %fp 4bf00: 4e75 rts
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
4bf02: 2f0a movel %a2,%sp@- 4bf04: 4eb9 0004 75ac jsr 475ac <_Chain_Extract>
) {
filesystem_node *fsn = (filesystem_node *) node;
if ( strcmp( fsn->entry.type, type ) == 0 ) {
rtems_chain_extract( node );
free( fsn );
4bf0a: 2f0a movel %a2,%sp@- 4bf0c: 4eb9 0004 32dc jsr 432dc <free> 4bf12: 2f39 0006 0efc movel 60efc <rtems_libio_semaphore>,%sp@- 4bf18: 4eb9 0004 6c1c jsr 46c1c <rtems_semaphore_release> 4bf1e: 4fef 000c lea %sp@(12),%sp
rtems_libio_unlock();
return 0;
4bf22: 4280 clrl %d0
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
4bf24: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 4bf2a: 4e5e unlk %fp 4bf2c: 4e75 rts
)
{
rtems_chain_node *node = NULL;
if ( type == NULL ) {
rtems_set_errno_and_return_minus_one( EINVAL );
4bf2e: 4eb9 0004 f098 jsr 4f098 <__errno> 4bf34: 7416 moveq #22,%d2 4bf36: 2040 moveal %d0,%a0 4bf38: 70ff moveq #-1,%d0 4bf3a: 2082 movel %d2,%a0@
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
4bf3c: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 4bf42: 4e5e unlk %fp
...
00043be0 <rtems_gxx_key_create>:
int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *))
{
43be0: 4e56 0000 linkw %fp,#0 43be4: 2f0a movel %a2,%sp@- 43be6: 2f02 movel %d2,%sp@-
* pointer to the buffer that will hold the value of the key itself. * We have to to this, because the others functions on this interface * deal with the value of the key, as used with the POSIX API. */ /* Do not pull your hair, trust me this works. :-) */ __gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) );
43be8: 4878 0008 pea 8 <DIVIDE_BY_ZERO>
}
return 0;
}
int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *))
{
43bec: 242e 000c movel %fp@(12),%d2
* pointer to the buffer that will hold the value of the key itself. * We have to to this, because the others functions on this interface * deal with the value of the key, as used with the POSIX API. */ /* Do not pull your hair, trust me this works. :-) */ __gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) );
43bf0: 4eb9 0004 4014 jsr 44014 <malloc>
*key = new_key;
43bf6: 206e 0008 moveal %fp@(8),%a0
* pointer to the buffer that will hold the value of the key itself. * We have to to this, because the others functions on this interface * deal with the value of the key, as used with the POSIX API. */ /* Do not pull your hair, trust me this works. :-) */ __gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) );
43bfa: 2440 moveal %d0,%a2
"gxx_wrappers: create key=%x, dtor=%x, new_key=%x\n", key, dtor, new_key
);
#endif
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor );
43bfc: 2f02 movel %d2,%sp@- 43bfe: 2f00 movel %d0,%sp@-
* We have to to this, because the others functions on this interface * deal with the value of the key, as used with the POSIX API. */ /* Do not pull your hair, trust me this works. :-) */ __gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) ); *key = new_key;
43c00: 2080 movel %d0,%a0@
"gxx_wrappers: create key=%x, dtor=%x, new_key=%x\n", key, dtor, new_key
);
#endif
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor );
43c02: 42a7 clrl %sp@-
* deal with the value of the key, as used with the POSIX API. */ /* Do not pull your hair, trust me this works. :-) */ __gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) ); *key = new_key; new_key->val = NULL;
43c04: 4292 clrl %a2@
new_key->dtor = dtor;
43c06: 2542 0004 movel %d2,%a2@(4)
"gxx_wrappers: create key=%x, dtor=%x, new_key=%x\n", key, dtor, new_key
);
#endif
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor );
43c0a: 4eb9 0004 7b80 jsr 47b80 <rtems_task_variable_add>
if ( status == RTEMS_SUCCESSFUL )
43c10: 4fef 0010 lea %sp@(16),%sp 43c14: 4a80 tstl %d0
43c16: 660e bnes 43c26 <rtems_gxx_key_create+0x46> <== NEVER TAKEN
return 0;
free( new_key );
return -1;
}
43c18: 242e fff8 movel %fp@(-8),%d2
#endif
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor );
if ( status == RTEMS_SUCCESSFUL )
return 0;
43c1c: 4280 clrl %d0
free( new_key );
return -1;
}
43c1e: 246e fffc moveal %fp@(-4),%a2 43c22: 4e5e unlk %fp 43c24: 4e75 rts
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor );
if ( status == RTEMS_SUCCESSFUL )
return 0;
free( new_key );
43c26: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43c28: 4eb9 0004 3a48 jsr 43a48 <free> <== NOT EXECUTED
return -1; }
43c2e: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED
status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor );
if ( status == RTEMS_SUCCESSFUL )
return 0;
free( new_key );
return -1;
43c32: 588f addql #4,%sp <== NOT EXECUTED 43c34: 70ff moveq #-1,%d0 <== NOT EXECUTED
}
43c36: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 43c3a: 4e5e unlk %fp <== NOT EXECUTED
00043c4e <rtems_gxx_key_delete>:
int rtems_gxx_key_delete (__gthread_key_t key)
{
43c4e: 4e56 0000 linkw %fp,#0 43c52: 2f0a movel %a2,%sp@- 43c54: 246e 0008 moveal %fp@(8),%a2
#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 );
43c58: 2f0a movel %a2,%sp@- 43c5a: 42a7 clrl %sp@- 43c5c: 4eb9 0004 7c48 jsr 47c48 <rtems_task_variable_delete>
if ( status == RTEMS_SUCCESSFUL ) {
43c62: 508f addql #8,%sp 43c64: 4a80 tstl %d0
43c66: 660e bnes 43c76 <rtems_gxx_key_delete+0x28> <== NEVER TAKEN
/* Hmm - hopefully all tasks using this key have gone away... */
if ( key ) free( *(void **)key );
43c68: 4a8a tstl %a2
43c6a: 670a beqs 43c76 <rtems_gxx_key_delete+0x28> <== NEVER TAKEN
43c6c: 2f12 movel %a2@,%sp@- 43c6e: 4eb9 0004 3a48 jsr 43a48 <free> 43c74: 588f addql #4,%sp
return 0;
}
key = NULL;
return 0;
}
43c76: 246e fffc moveal %fp@(-4),%a2 43c7a: 4280 clrl %d0
43c7c: 4e5e unlk %fp <== NOT EXECUTED
00043b64 <rtems_gxx_once>:
/* uncomment this if you need to debug this interface */
/*#define DEBUG_GXX_WRAPPERS 1*/
int rtems_gxx_once(__gthread_once_t *once, void (*func) (void))
{
43b64: 4e56 fff0 linkw %fp,#-16 43b68: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 43b6c: 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 ) {
43b70: 2012 movel %a2@,%d0
43b72: 670c beqs 43b80 <rtems_gxx_once+0x1c>
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
if ( o == 0 )
(*func)();
}
return 0;
}
43b74: 4280 clrl %d0 43b76: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 43b7c: 4e5e unlk %fp 43b7e: 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);
43b80: 240e movel %fp,%d2 43b82: 5982 subql #4,%d2 43b84: 47f9 0004 7940 lea 47940 <rtems_task_mode>,%a3 43b8a: 2f02 movel %d2,%sp@- 43b8c: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> 43b90: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> 43b94: 4e93 jsr %a3@
if ( (o = *(volatile __gthread_once_t *)once) == 0 ) {
43b96: 2012 movel %a2@,%d0 43b98: 4fef 000c lea %sp@(12),%sp
43b9c: 6626 bnes 43bc4 <rtems_gxx_once+0x60> <== NEVER TAKEN
*(volatile __gthread_once_t *)once = 1;
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
43b9e: 2f02 movel %d2,%sp@- 43ba0: 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;
43ba4: 7001 moveq #1,%d0
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
43ba6: 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;
43baa: 2480 movel %d0,%a2@
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
43bac: 4e93 jsr %a3@
if ( o == 0 )
(*func)();
43bae: 206e 000c moveal %fp@(12),%a0 43bb2: 4e90 jsr %a0@ 43bb4: 4fef 000c lea %sp@(12),%sp
} return 0; }
43bb8: 4280 clrl %d0 43bba: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 43bc0: 4e5e unlk %fp 43bc2: 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);
43bc4: 2f02 movel %d2,%sp@- <== NOT EXECUTED 43bc6: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> <== NOT EXECUTED 43bca: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 43bce: 4e93 jsr %a3@ <== NOT EXECUTED 43bd0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
if ( o == 0 )
(*func)();
}
return 0;
}
43bd4: 4280 clrl %d0 <== NOT EXECUTED 43bd6: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 <== NOT EXECUTED 43bdc: 4e5e unlk %fp <== NOT EXECUTED
00043df2 <rtems_gxx_recursive_mutex_unlock>:
}
int rtems_gxx_recursive_mutex_unlock(__gthread_recursive_mutex_t *mutex)
{
43df2: 4e56 0000 linkw %fp,#0
return rtems_gxx_mutex_unlock(mutex); }
43df6: 4e5e unlk %fp
return rtems_gxx_mutex_trylock(mutex);
}
int rtems_gxx_recursive_mutex_unlock(__gthread_recursive_mutex_t *mutex)
{
return rtems_gxx_mutex_unlock(mutex);
43df8: 4ef9 0004 3db2 jmp 43db2 <rtems_gxx_mutex_unlock>
...
00043ce0 <rtems_gxx_setspecific>:
#endif
return p;
}
int rtems_gxx_setspecific(__gthread_key_t key, const void *ptr)
{
43ce0: 4e56 0000 linkw %fp,#0 43ce4: 2f0a movel %a2,%sp@- 43ce6: 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 );
43cea: 2f2a 0004 movel %a2@(4),%sp@- 43cee: 2f0a movel %a2,%sp@- 43cf0: 42a7 clrl %sp@- 43cf2: 4eb9 0004 7b80 jsr 47b80 <rtems_task_variable_add>
if ( status == RTEMS_SUCCESSFUL ) {
43cf8: 4fef 000c lea %sp@(12),%sp 43cfc: 4a80 tstl %d0
43cfe: 660c bnes 43d0c <rtems_gxx_setspecific+0x2c> <== NEVER TAKEN
/* now let's set the proper value */
key->val = (void *)ptr;
43d00: 24ae 000c movel %fp@(12),%a2@
return 0;
}
return -1;
}
43d04: 246e fffc moveal %fp@(-4),%a2 43d08: 4e5e unlk %fp 43d0a: 4e75 rts
43d0c: 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;
43d10: 70ff moveq #-1,%d0 <== NOT EXECUTED
}
43d12: 4e5e unlk %fp <== NOT EXECUTED
000480e4 <rtems_heap_allocate_aligned_with_boundary>:
size_t size,
uintptr_t alignment,
uintptr_t boundary
)
{
if (
480e4: 7003 moveq #3,%d0
void *rtems_heap_allocate_aligned_with_boundary(
size_t size,
uintptr_t alignment,
uintptr_t boundary
)
{
480e6: 4e56 0000 linkw %fp,#0
if (
480ea: b0b9 0006 7398 cmpl 67398 <_System_state_Current>,%d0
480f0: 6726 beqs 48118 <rtems_heap_allocate_aligned_with_boundary+0x34><== ALWAYS TAKEN
&& !malloc_is_system_state_OK()
) {
return NULL;
}
malloc_deferred_frees_process();
480f2: 4eb9 0004 7018 jsr 47018 <malloc_deferred_frees_process>
/* FIXME: Statistics, boundary checks */
return _Protected_heap_Allocate_aligned_with_boundary(
480f8: 2f2e 0010 movel %fp@(16),%sp@- 480fc: 2f2e 000c movel %fp@(12),%sp@- 48100: 2f2e 0008 movel %fp@(8),%sp@- 48104: 2f39 0006 506e movel 6506e <RTEMS_Malloc_Heap>,%sp@- 4810a: 4eb9 0004 d3d8 jsr 4d3d8 <_Protected_heap_Allocate_aligned_with_boundary> 48110: 4fef 0010 lea %sp@(16),%sp
RTEMS_Malloc_Heap,
size,
alignment,
boundary
);
}
48114: 4e5e unlk %fp 48116: 4e75 rts
uintptr_t boundary
)
{
if (
_System_state_Is_up( _System_state_Get() )
&& !malloc_is_system_state_OK()
48118: 4eb9 0004 6fd8 jsr 46fd8 <malloc_is_system_state_OK> 4811e: 4a00 tstb %d0
48120: 66d0 bnes 480f2 <rtems_heap_allocate_aligned_with_boundary+0xe>
) {
return NULL;
48122: 4280 clrl %d0
RTEMS_Malloc_Heap,
size,
alignment,
boundary
);
}
48124: 4e5e unlk %fp <== NOT EXECUTED
00042d26 <rtems_io_lookup_name>:
rtems_status_code rtems_io_lookup_name(
const char *name,
rtems_driver_name_t *device_info
)
{
42d26: 4e56 ffd8 linkw %fp,#-40 42d2a: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 42d2e: 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(
42d32: 45f9 0005 0404 lea 50404 <strlen>,%a2 42d38: 240e movel %fp,%d2 42d3a: 0682 ffff ffec addil #-20,%d2 42d40: 2f03 movel %d3,%sp@- 42d42: 4e92 jsr %a2@ 42d44: 7201 moveq #1,%d1 42d46: 2e81 movel %d1,%sp@ 42d48: 2f02 movel %d2,%sp@- 42d4a: 42a7 clrl %sp@- 42d4c: 2f00 movel %d0,%sp@- 42d4e: 2f03 movel %d3,%sp@- 42d50: 4eb9 0004 31e4 jsr 431e4 <rtems_filesystem_evaluate_path>
name, strlen( name ), 0x00, &loc, true );
the_jnode = loc.node_access;
node_type = (*loc.ops->node_type_h)( &loc );
42d56: 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(
42d5a: 2800 movel %d0,%d4
name, strlen( name ), 0x00, &loc, true );
the_jnode = loc.node_access;
node_type = (*loc.ops->node_type_h)( &loc );
42d5c: 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;
42d5e: 266e ffec moveal %fp@(-20),%a3
node_type = (*loc.ops->node_type_h)( &loc );
42d62: 2068 0010 moveal %a0@(16),%a0 42d66: 4e90 jsr %a0@
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
42d68: 4fef 0018 lea %sp@(24),%sp 42d6c: 4a84 tstl %d4
42d6e: 6606 bnes 42d76 <rtems_io_lookup_name+0x50> <== NEVER TAKEN
42d70: 7202 moveq #2,%d1 42d72: b280 cmpl %d0,%d1
42d74: 6716 beqs 42d8c <rtems_io_lookup_name+0x66>
rtems_filesystem_freenode( &loc );
42d76: 2f02 movel %d2,%sp@- 42d78: 4eb9 0004 32c8 jsr 432c8 <rtems_filesystem_freenode>
return RTEMS_UNSATISFIED;
42d7e: 588f addql #4,%sp 42d80: 700d moveq #13,%d0
device_info->minor = the_jnode->info.device.minor;
rtems_filesystem_freenode( &loc );
return RTEMS_SUCCESSFUL;
}
42d82: 4cee 0c1c ffd8 moveml %fp@(-40),%d2-%d4/%a2-%a3 42d88: 4e5e unlk %fp 42d8a: 4e75 rts
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
rtems_filesystem_freenode( &loc );
return RTEMS_UNSATISFIED;
}
device_info->device_name = (char *) name;
42d8c: 206e 000c moveal %fp@(12),%a0 42d90: 2083 movel %d3,%a0@
device_info->device_name_length = strlen( name );
42d92: 2f03 movel %d3,%sp@- 42d94: 4e92 jsr %a2@ 42d96: 226e 000c moveal %fp@(12),%a1
device_info->major = the_jnode->info.device.major;
42d9a: 41eb 004c lea %a3@(76),%a0
device_info->minor = the_jnode->info.device.minor;
42d9e: 47eb 0050 lea %a3@(80),%a3
rtems_filesystem_freenode( &loc );
return RTEMS_UNSATISFIED;
}
device_info->device_name = (char *) name;
device_info->device_name_length = strlen( name );
42da2: 2340 0004 movel %d0,%a1@(4)
device_info->major = the_jnode->info.device.major;
42da6: 2350 0008 movel %a0@,%a1@(8)
device_info->minor = the_jnode->info.device.minor;
42daa: 2353 000c movel %a3@,%a1@(12)
rtems_filesystem_freenode( &loc );
42dae: 2e82 movel %d2,%sp@ 42db0: 4eb9 0004 32c8 jsr 432c8 <rtems_filesystem_freenode>
return RTEMS_SUCCESSFUL;
42db6: 588f addql #4,%sp 42db8: 4280 clrl %d0
}
42dba: 4cee 0c1c ffd8 moveml %fp@(-40),%d2-%d4/%a2-%a3
42dc0: 4e5e unlk %fp <== NOT EXECUTED
000484c4 <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
)
{
484c4: 4e56 0000 linkw %fp,#0 484c8: 226e 000c moveal %fp@(12),%a1 484cc: 2f0a movel %a2,%sp@- 484ce: 206e 0010 moveal %fp@(16),%a0 484d2: 2f02 movel %d2,%sp@- 484d4: 242e 0008 movel %fp@(8),%d2
rtems_device_major_number major_limit = _IO_Number_of_drivers;
484d8: 2039 0006 575a movel 6575a <_IO_Number_of_drivers>,%d0
if ( rtems_interrupt_is_in_progress() )
484de: 4ab9 0006 533e tstl 6533e <_Per_CPU_Information+0x8>
484e4: 670e beqs 484f4 <rtems_io_register_driver+0x30>
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
484e6: 242e fff8 movel %fp@(-8),%d2
)
{
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
return RTEMS_CALLED_FROM_ISR;
484ea: 7012 moveq #18,%d0
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
484ec: 246e fffc moveal %fp@(-4),%a2 484f0: 4e5e unlk %fp 484f2: 4e75 rts
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
return RTEMS_CALLED_FROM_ISR;
if ( registered_major == NULL )
484f4: 4a88 tstl %a0
484f6: 6722 beqs 4851a <rtems_io_register_driver+0x56>
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
484f8: 2080 movel %d0,%a0@
if ( driver_table == NULL )
484fa: 4a89 tstl %a1
484fc: 671c beqs 4851a <rtems_io_register_driver+0x56>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
484fe: 4a91 tstl %a1@
48500: 6712 beqs 48514 <rtems_io_register_driver+0x50>
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
48502: b480 cmpl %d0,%d2
48504: 6522 bcss 48528 <rtems_io_register_driver+0x64>
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
48506: 242e fff8 movel %fp@(-8),%d2
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
return RTEMS_INVALID_NUMBER;
4850a: 700a moveq #10,%d0
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
4850c: 246e fffc moveal %fp@(-4),%a2 48510: 4e5e unlk %fp 48512: 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;
48514: 4aa9 0004 tstl %a1@(4)
48518: 66e8 bnes 48502 <rtems_io_register_driver+0x3e>
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
4851a: 242e fff8 movel %fp@(-8),%d2
if ( driver_table == NULL )
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
4851e: 7009 moveq #9,%d0
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
48520: 246e fffc moveal %fp@(-4),%a2 48524: 4e5e unlk %fp 48526: 4e75 rts
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
48528: 2039 0006 4ee0 movel 64ee0 <_Thread_Dispatch_disable_level>,%d0 4852e: 5280 addql #1,%d0 48530: 23c0 0006 4ee0 movel %d0,64ee0 <_Thread_Dispatch_disable_level>
return _Thread_Dispatch_disable_level;
48536: 2039 0006 4ee0 movel 64ee0 <_Thread_Dispatch_disable_level>,%d0
if ( major >= major_limit )
return RTEMS_INVALID_NUMBER;
_Thread_Disable_dispatch();
if ( major == 0 ) {
4853c: 4a82 tstl %d2
4853e: 667a bnes 485ba <rtems_io_register_driver+0xf6>
static rtems_status_code rtems_io_obtain_major_number(
rtems_device_major_number *major
)
{
rtems_device_major_number n = _IO_Number_of_drivers;
48540: 2039 0006 575a movel 6575a <_IO_Number_of_drivers>,%d0
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
48546: 6700 00dc beqw 48624 <rtems_io_register_driver+0x160> 4854a: 2239 0006 575e movel 6575e <_IO_Driver_address_table>,%d1 48550: 2441 moveal %d1,%a2
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
48552: 4a92 tstl %a2@
48554: 6720 beqs 48576 <rtems_io_register_driver+0xb2>
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 ) {
48556: 5282 addql #1,%d2 48558: 45ea 0018 lea %a2@(24),%a2 4855c: b082 cmpl %d2,%d0
4855e: 66f2 bnes 48552 <rtems_io_register_driver+0x8e>
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
48560: 2082 movel %d2,%a0@
if ( major == 0 ) {
rtems_status_code sc = rtems_io_obtain_major_number( registered_major );
if ( sc != RTEMS_SUCCESSFUL ) {
_Thread_Enable_dispatch();
48562: 4eb9 0004 a580 jsr 4a580 <_Thread_Enable_dispatch>
*major = m;
if ( m != n )
return RTEMS_SUCCESSFUL;
return RTEMS_TOO_MANY;
48568: 7005 moveq #5,%d0
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
4856a: 242e fff8 movel %fp@(-8),%d2 4856e: 246e fffc moveal %fp@(-4),%a2 48572: 4e5e unlk %fp 48574: 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;
48576: 4aaa 0004 tstl %a2@(4)
4857a: 66da bnes 48556 <rtems_io_register_driver+0x92>
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
4857c: 2082 movel %d2,%a0@
if ( m != n )
4857e: b480 cmpl %d0,%d2
48580: 67e0 beqs 48562 <rtems_io_register_driver+0x9e> <== NEVER TAKEN
48582: 7018 moveq #24,%d0 48584: 4c02 0800 mulsl %d2,%d0
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
48588: 2041 moveal %d1,%a0 4858a: d1c0 addal %d0,%a0 4858c: 20d9 movel %a1@+,%a0@+ 4858e: 20d9 movel %a1@+,%a0@+ 48590: 20d9 movel %a1@+,%a0@+ 48592: 20d9 movel %a1@+,%a0@+ 48594: 20d9 movel %a1@+,%a0@+ 48596: 2091 movel %a1@,%a0@
_Thread_Enable_dispatch();
48598: 4eb9 0004 a580 jsr 4a580 <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
}
4859e: 246e fffc moveal %fp@(-4),%a2
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
485a2: 2d42 0008 movel %d2,%fp@(8)
}
485a6: 242e fff8 movel %fp@(-8),%d2
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
485aa: 42ae 0010 clrl %fp@(16) 485ae: 42ae 000c clrl %fp@(12)
}
485b2: 4e5e unlk %fp
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
485b4: 4ef9 0005 0ca0 jmp 50ca0 <rtems_io_initialize>
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
485ba: 2202 movel %d2,%d1 485bc: 2002 movel %d2,%d0 485be: e789 lsll #3,%d1 485c0: eb88 lsll #5,%d0 485c2: 2479 0006 575e moveal 6575e <_IO_Driver_address_table>,%a2 485c8: 9081 subl %d1,%d0 485ca: d5c0 addal %d0,%a2
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
485cc: 4a92 tstl %a2@
485ce: 6714 beqs 485e4 <rtems_io_register_driver+0x120>
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();
485d0: 4eb9 0004 a580 jsr 4a580 <_Thread_Enable_dispatch>
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
485d6: 242e fff8 movel %fp@(-8),%d2
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
485da: 700c moveq #12,%d0
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
485dc: 246e fffc moveal %fp@(-4),%a2 485e0: 4e5e unlk %fp 485e2: 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;
485e4: 4aaa 0004 tstl %a2@(4)
485e8: 66e6 bnes 485d0 <rtems_io_register_driver+0x10c>
485ea: 2239 0006 575e movel 6575e <_IO_Driver_address_table>,%d1
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
*registered_major = major;
485f0: 2082 movel %d2,%a0@
}
_IO_Driver_address_table [major] = *driver_table;
485f2: 2041 moveal %d1,%a0 485f4: d1c0 addal %d0,%a0 485f6: 20d9 movel %a1@+,%a0@+ 485f8: 20d9 movel %a1@+,%a0@+ 485fa: 20d9 movel %a1@+,%a0@+ 485fc: 20d9 movel %a1@+,%a0@+ 485fe: 20d9 movel %a1@+,%a0@+ 48600: 2091 movel %a1@,%a0@
_Thread_Enable_dispatch();
48602: 4eb9 0004 a580 jsr 4a580 <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
}
48608: 246e fffc moveal %fp@(-4),%a2
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
4860c: 2d42 0008 movel %d2,%fp@(8)
}
48610: 242e fff8 movel %fp@(-8),%d2
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
48614: 42ae 0010 clrl %fp@(16) 48618: 42ae 000c clrl %fp@(12)
}
4861c: 4e5e unlk %fp
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
4861e: 4ef9 0005 0ca0 jmp 50ca0 <rtems_io_initialize>
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
48624: 4290 clrl %a0@ <== NOT EXECUTED
if ( major == 0 ) {
rtems_status_code sc = rtems_io_obtain_major_number( registered_major );
if ( sc != RTEMS_SUCCESSFUL ) {
_Thread_Enable_dispatch();
48626: 4eb9 0004 a580 jsr 4a580 <_Thread_Enable_dispatch> <== NOT EXECUTED
*major = m;
if ( m != n )
return RTEMS_SUCCESSFUL;
return RTEMS_TOO_MANY;
4862c: 7005 moveq #5,%d0 <== NOT EXECUTED 4862e: 6000 ff3a braw 4856a <rtems_io_register_driver+0xa6> <== NOT EXECUTED
...
000496a4 <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)
{
496a4: 4e56 fff0 linkw %fp,#-16 496a8: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 496ac: 266e 0008 moveal %fp@(8),%a3
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
496b0: 4a8b tstl %a3
496b2: 673e beqs 496f2 <rtems_iterate_over_all_threads+0x4e><== NEVER TAKEN
496b4: 49f9 0006 37f8 lea 637f8 <_Objects_Information_table+0x4>,%a4
#if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG)
if ( !_Objects_Information_table[ api_index ] )
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
496ba: 205c moveal %a4@+,%a0 496bc: 2468 0004 moveal %a0@(4),%a2
if ( !information )
496c0: 4a8a tstl %a2
496c2: 6726 beqs 496ea <rtems_iterate_over_all_threads+0x46>
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
496c4: 4a6a 000e tstw %a2@(14)
496c8: 6720 beqs 496ea <rtems_iterate_over_all_threads+0x46>
496ca: 7401 moveq #1,%d2
the_thread = (Thread_Control *)information->local_table[ i ];
496cc: 206a 0018 moveal %a2@(24),%a0 496d0: 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++ ) {
496d4: 5282 addql #1,%d2
the_thread = (Thread_Control *)information->local_table[ i ];
if ( !the_thread )
496d6: 4a80 tstl %d0
496d8: 6706 beqs 496e0 <rtems_iterate_over_all_threads+0x3c><== NEVER TAKEN
continue;
(*routine)(the_thread);
496da: 2f00 movel %d0,%sp@- 496dc: 4e93 jsr %a3@ 496de: 588f addql #4,%sp
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
496e0: 4280 clrl %d0 496e2: 302a 000e movew %a2@(14),%d0 496e6: b480 cmpl %d0,%d2
496e8: 63e2 blss 496cc <rtems_iterate_over_all_threads+0x28>
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
496ea: b9fc 0006 3804 cmpal #407556,%a4
496f0: 66c8 bnes 496ba <rtems_iterate_over_all_threads+0x16>
(*routine)(the_thread);
}
}
}
496f2: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4
496f8: 4e5e unlk %fp <== NOT EXECUTED
0004bafc <rtems_libio_free>:
*/
void rtems_libio_free(
rtems_libio_t *iop
)
{
4bafc: 4e56 0000 linkw %fp,#0 4bb00: 2f0a movel %a2,%sp@- 4bb02: 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 );
4bb06: 42a7 clrl %sp@- 4bb08: 42a7 clrl %sp@- 4bb0a: 2f39 0006 0efc movel 60efc <rtems_libio_semaphore>,%sp@- 4bb10: 4eb9 0004 6acc jsr 46acc <rtems_semaphore_obtain>
rtems_libio_lock();
if (iop->sem)
4bb16: 202a 002c movel %a2@(44),%d0 4bb1a: 4fef 000c lea %sp@(12),%sp
4bb1e: 6630 bnes 4bb50 <rtems_libio_free+0x54> <== ALWAYS TAKEN
rtems_semaphore_delete(iop->sem);
iop->flags &= ~LIBIO_FLAGS_OPEN;
iop->data1 = rtems_libio_iop_freelist;
4bb20: 41f9 0006 0ef8 lea 60ef8 <rtems_libio_iop_freelist>,%a0 <== NOT EXECUTED
rtems_libio_lock();
if (iop->sem)
rtems_semaphore_delete(iop->sem);
iop->flags &= ~LIBIO_FLAGS_OPEN;
4bb26: 203c ffff feff movel #-257,%d0 <== NOT EXECUTED
iop->data1 = rtems_libio_iop_freelist;
4bb2c: 2550 0034 movel %a0@,%a2@(52) <== NOT EXECUTED
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
4bb30: 41f9 0006 0efc lea 60efc <rtems_libio_semaphore>,%a0 <== NOT EXECUTED 4bb36: 2d50 0008 movel %a0@,%fp@(8) <== NOT EXECUTED
rtems_libio_lock();
if (iop->sem)
rtems_semaphore_delete(iop->sem);
iop->flags &= ~LIBIO_FLAGS_OPEN;
4bb3a: c1aa 0014 andl %d0,%a2@(20) <== NOT EXECUTED
iop->data1 = rtems_libio_iop_freelist;
rtems_libio_iop_freelist = iop;
4bb3e: 23ca 0006 0ef8 movel %a2,60ef8 <rtems_libio_iop_freelist> <== NOT EXECUTED
rtems_libio_unlock();
}
4bb44: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4bb48: 4e5e unlk %fp <== NOT EXECUTED 4bb4a: 4ef9 0004 6c1c jmp 46c1c <rtems_semaphore_release> <== NOT EXECUTED
)
{
rtems_libio_lock();
if (iop->sem)
rtems_semaphore_delete(iop->sem);
4bb50: 2f00 movel %d0,%sp@- 4bb52: 4eb9 0004 69f4 jsr 469f4 <rtems_semaphore_delete> 4bb58: 588f addql #4,%sp
iop->flags &= ~LIBIO_FLAGS_OPEN;
iop->data1 = rtems_libio_iop_freelist;
4bb5a: 41f9 0006 0ef8 lea 60ef8 <rtems_libio_iop_freelist>,%a0
rtems_libio_lock();
if (iop->sem)
rtems_semaphore_delete(iop->sem);
iop->flags &= ~LIBIO_FLAGS_OPEN;
4bb60: 203c ffff feff movel #-257,%d0
iop->data1 = rtems_libio_iop_freelist;
4bb66: 2550 0034 movel %a0@,%a2@(52) 4bb6a: 41f9 0006 0efc lea 60efc <rtems_libio_semaphore>,%a0 4bb70: 2d50 0008 movel %a0@,%fp@(8)
rtems_libio_lock();
if (iop->sem)
rtems_semaphore_delete(iop->sem);
iop->flags &= ~LIBIO_FLAGS_OPEN;
4bb74: c1aa 0014 andl %d0,%a2@(20)
iop->data1 = rtems_libio_iop_freelist;
rtems_libio_iop_freelist = iop;
4bb78: 23ca 0006 0ef8 movel %a2,60ef8 <rtems_libio_iop_freelist>
rtems_libio_unlock();
}
4bb7e: 246e fffc moveal %fp@(-4),%a2 4bb82: 4e5e unlk %fp 4bb84: 4ef9 0004 6c1c jmp 46c1c <rtems_semaphore_release>
000433f8 <rtems_libio_init>:
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
{
433f8: 4e56 0000 linkw %fp,#0 433fc: 2f02 movel %d2,%sp@-
rtems_status_code rc;
uint32_t i;
rtems_libio_t *iop;
if (rtems_libio_number_iops > 0)
433fe: 2439 0005 f792 movel 5f792 <rtems_libio_number_iops>,%d2
43404: 6744 beqs 4344a <rtems_libio_init+0x52> <== NEVER TAKEN
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
43406: 4878 0038 pea 38 <DBL_MANT_DIG+0x3> 4340a: 2f02 movel %d2,%sp@- 4340c: 4eb9 0004 2ec8 jsr 42ec8 <calloc>
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
43412: 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,
43414: 23c0 0006 0ef4 movel %d0,60ef4 <rtems_libio_iops>
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
4341a: 6774 beqs 43490 <rtems_libio_init+0x98>
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
4341c: 23c0 0006 0ef8 movel %d0,60ef8 <rtems_libio_iop_freelist>
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
43422: 7201 moveq #1,%d1 43424: b282 cmpl %d2,%d1
43426: 641c bccs 43444 <rtems_libio_init+0x4c> <== NEVER TAKEN
43428: 2040 moveal %d0,%a0
iop->data1 = iop + 1;
4342a: 41e8 0038 lea %a0@(56),%a0 4342e: 5281 addql #1,%d1 43430: 2148 fffc movel %a0,%a0@(-4)
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
43434: b481 cmpl %d1,%d2
43436: 66f2 bnes 4342a <rtems_libio_init+0x32>
* rtems_libio_init
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
43438: 5381 subql #1,%d1 4343a: 2401 movel %d1,%d2 4343c: ed89 lsll #6,%d1 4343e: e78a lsll #3,%d2 43440: 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++)
43442: d081 addl %d1,%d0
iop->data1 = iop + 1;
iop->data1 = NULL;
43444: 2040 moveal %d0,%a0 43446: 42a8 0034 clrl %a0@(52)
/*
* Create the binary semaphore used to provide mutual exclusion
* on the IOP Table.
*/
rc = rtems_semaphore_create(
4344a: 4879 0006 0efc pea 60efc <rtems_libio_semaphore> 43450: 42a7 clrl %sp@- 43452: 4878 0054 pea 54 <DBL_MANT_DIG+0x1f> 43456: 4878 0001 pea 1 <ADD> 4345a: 2f3c 4c42 494f movel #1279412559,%sp@- 43460: 4eb9 0004 682c jsr 4682c <rtems_semaphore_create>
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_libio_semaphore
);
if ( rc != RTEMS_SUCCESSFUL )
43466: 4fef 0014 lea %sp@(20),%sp 4346a: 4a80 tstl %d0
4346c: 661a bnes 43488 <rtems_libio_init+0x90> <== NEVER TAKEN
/*
* Initialize the base file system infrastructure.
*/
if (rtems_fs_init_helper)
4346e: 2279 0005 f796 moveal 5f796 <rtems_fs_init_helper>,%a1 43474: 4a89 tstl %a1
43476: 6708 beqs 43480 <rtems_libio_init+0x88> <== NEVER TAKEN
(* rtems_fs_init_helper)();
}
43478: 242e fffc movel %fp@(-4),%d2 4347c: 4e5e unlk %fp
/*
* Initialize the base file system infrastructure.
*/
if (rtems_fs_init_helper)
(* rtems_fs_init_helper)();
4347e: 4ed1 jmp %a1@
}
43480: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 43484: 4e5e unlk %fp <== NOT EXECUTED 43486: 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 );
43488: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4348a: 4eb9 0004 724c jsr 4724c <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);
43490: 4878 001a pea 1a <OPER2+0x6> 43494: 4eb9 0004 724c jsr 4724c <rtems_fatal_error_occurred>
...
0004bc08 <rtems_libio_is_file_open>:
*/
int rtems_libio_is_file_open(
void *node_access
)
{
4bc08: 4e56 0000 linkw %fp,#0 4bc0c: 2f02 movel %d2,%sp@- 4bc0e: 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 );
4bc12: 42a7 clrl %sp@- 4bc14: 42a7 clrl %sp@- 4bc16: 2f39 0006 0efc movel 60efc <rtems_libio_semaphore>,%sp@- 4bc1c: 4eb9 0004 6acc jsr 46acc <rtems_semaphore_obtain>
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
4bc22: 2079 0006 0ef4 moveal 60ef4 <rtems_libio_iops>,%a0 4bc28: 4fef 000c lea %sp@(12),%sp 4bc2c: 2279 0005 f792 moveal 5f792 <rtems_libio_number_iops>,%a1 4bc32: 4a89 tstl %a1
4bc34: 6720 beqs 4bc56 <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(
4bc36: 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++){
4bc3a: 4280 clrl %d0
if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
4bc3c: 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++){
4bc3e: 5280 addql #1,%d0
if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
4bc40: 0281 0000 0100 andil #256,%d1
4bc46: 6706 beqs 4bc4e <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 ) {
4bc48: b4a8 0004 cmpl %a0@(4),%d2
4bc4c: 6720 beqs 4bc6e <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++){
4bc4e: 41e8 0038 lea %a0@(56),%a0 4bc52: b3c0 cmpal %d0,%a1
4bc54: 66e6 bnes 4bc3c <rtems_libio_is_file_open+0x34>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
4bc56: 2f39 0006 0efc movel 60efc <rtems_libio_semaphore>,%sp@-
int rtems_libio_is_file_open(
void *node_access
)
{
rtems_libio_t *iop;
int result=0;
4bc5c: 4282 clrl %d2 4bc5e: 4eb9 0004 6c1c jsr 46c1c <rtems_semaphore_release>
}
rtems_libio_unlock();
return result;
}
4bc64: 2002 movel %d2,%d0 4bc66: 242e fffc movel %fp@(-4),%d2 4bc6a: 4e5e unlk %fp 4bc6c: 4e75 rts 4bc6e: 2f39 0006 0efc movel 60efc <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;
4bc74: 7401 moveq #1,%d2 4bc76: 4eb9 0004 6c1c jsr 46c1c <rtems_semaphore_release>
}
rtems_libio_unlock();
return result;
}
4bc7c: 2002 movel %d2,%d0 4bc7e: 242e fffc movel %fp@(-4),%d2 4bc82: 4e5e unlk %fp
...
0004bb8a <rtems_libio_is_open_files_in_fs>:
*/
int rtems_libio_is_open_files_in_fs(
rtems_filesystem_mount_table_entry_t * fs_mt_entry
)
{
4bb8a: 4e56 0000 linkw %fp,#0 4bb8e: 2f02 movel %d2,%sp@- 4bb90: 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 );
4bb94: 42a7 clrl %sp@- 4bb96: 42a7 clrl %sp@- 4bb98: 2f39 0006 0efc movel 60efc <rtems_libio_semaphore>,%sp@- 4bb9e: 4eb9 0004 6acc jsr 46acc <rtems_semaphore_obtain>
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
4bba4: 2079 0006 0ef4 moveal 60ef4 <rtems_libio_iops>,%a0 4bbaa: 4fef 000c lea %sp@(12),%sp 4bbae: 2279 0005 f792 moveal 5f792 <rtems_libio_number_iops>,%a1 4bbb4: 4a89 tstl %a1
4bbb6: 6720 beqs 4bbd8 <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(
4bbb8: 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++){
4bbbc: 4280 clrl %d0
if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
4bbbe: 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++){
4bbc0: 5280 addql #1,%d0
if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
4bbc2: 0281 0000 0100 andil #256,%d1
4bbc8: 6706 beqs 4bbd0 <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 ) {
4bbca: b4a8 0014 cmpl %a0@(20),%d2
4bbce: 6720 beqs 4bbf0 <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++){
4bbd0: 41e8 0038 lea %a0@(56),%a0 4bbd4: b3c0 cmpal %d0,%a1
4bbd6: 66e6 bnes 4bbbe <rtems_libio_is_open_files_in_fs+0x34>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
4bbd8: 2f39 0006 0efc movel 60efc <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;
4bbde: 4282 clrl %d2 4bbe0: 4eb9 0004 6c1c jsr 46c1c <rtems_semaphore_release>
}
rtems_libio_unlock();
return result;
}
4bbe6: 2002 movel %d2,%d0 4bbe8: 242e fffc movel %fp@(-4),%d2 4bbec: 4e5e unlk %fp 4bbee: 4e75 rts 4bbf0: 2f39 0006 0efc movel 60efc <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;
4bbf6: 7401 moveq #1,%d2 4bbf8: 4eb9 0004 6c1c jsr 46c1c <rtems_semaphore_release>
}
rtems_libio_unlock();
return result;
}
4bbfe: 2002 movel %d2,%d0 4bc00: 242e fffc movel %fp@(-4),%d2
4bc04: 4e5e unlk %fp <== NOT EXECUTED
000470a8 <rtems_libio_set_private_env>:
rtems_status_code rtems_libio_set_private_env(void)
{
470a8: 4e56 ffd8 linkw %fp,#-40 470ac: 2f0a movel %a2,%sp@-
rtems_filesystem_location_info_t root_loc;
rtems_filesystem_location_info_t current_loc;
rtems_user_env_t *new_env = NULL;
int rv = 0;
rv = rtems_filesystem_evaluate_path("/", 1, 0, &root_loc, 0);
470ae: 45f9 0004 5b20 lea 45b20 <rtems_filesystem_evaluate_path>,%a2
free(env);
}
}
rtems_status_code rtems_libio_set_private_env(void)
{
470b4: 2f02 movel %d2,%sp@-
rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_id task_id = rtems_task_self();
470b6: 4eb9 0004 a628 jsr 4a628 <rtems_task_self> 470bc: 2400 movel %d0,%d2
rtems_filesystem_location_info_t root_loc;
rtems_filesystem_location_info_t current_loc;
rtems_user_env_t *new_env = NULL;
int rv = 0;
rv = rtems_filesystem_evaluate_path("/", 1, 0, &root_loc, 0);
470be: 42a7 clrl %sp@- 470c0: 486e ffd8 pea %fp@(-40) 470c4: 42a7 clrl %sp@- 470c6: 4878 0001 pea 1 <ADD> 470ca: 4879 0006 1201 pea 61201 <__func__.6070+0xb> 470d0: 4e92 jsr %a2@
if (rv != 0)
470d2: 4fef 0014 lea %sp@(20),%sp 470d6: 4a80 tstl %d0
470d8: 670e beqs 470e8 <rtems_libio_set_private_env+0x40><== ALWAYS TAKEN
error_1:
rtems_filesystem_freenode(&root_loc);
error_0:
return RTEMS_NO_MEMORY;
}
470da: 242e ffd0 movel %fp@(-48),%d2 <== NOT EXECUTED
error_1:
rtems_filesystem_freenode(&root_loc);
error_0:
return RTEMS_NO_MEMORY;
470de: 701a moveq #26,%d0 <== NOT EXECUTED
}
470e0: 246e ffd4 moveal %fp@(-44),%a2 <== NOT EXECUTED 470e4: 4e5e unlk %fp <== NOT EXECUTED 470e6: 4e75 rts <== NOT EXECUTED
rv = rtems_filesystem_evaluate_path("/", 1, 0, &root_loc, 0);
if (rv != 0)
goto error_0;
rv = rtems_filesystem_evaluate_path("/", 1, 0, ¤t_loc, 0);
470e8: 42a7 clrl %sp@- 470ea: 486e ffec pea %fp@(-20) 470ee: 42a7 clrl %sp@- 470f0: 4878 0001 pea 1 <ADD> 470f4: 4879 0006 1201 pea 61201 <__func__.6070+0xb> 470fa: 4e92 jsr %a2@
if (rv != 0)
470fc: 4fef 0014 lea %sp@(20),%sp 47100: 45f9 0004 5d30 lea 45d30 <rtems_filesystem_freenode>,%a2 47106: 4a80 tstl %d0 47108: 6600 00bc bnew 471c6 <rtems_libio_set_private_env+0x11e>
* Bharath: I'm not sure if the check can be reduced to
* if( rtems_current_user_env->task_id != task_id ) {
*/
if (
rtems_current_user_env == &rtems_global_user_env
4710c: 2479 0006 3170 moveal 63170 <rtems_current_user_env>,%a2
/*
* Bharath: I'm not sure if the check can be reduced to
* if( rtems_current_user_env->task_id != task_id ) {
*/
if (
47112: b5fc 0006 47e4 cmpal #411620,%a2
47118: 6704 beqs 4711e <rtems_libio_set_private_env+0x76>
rtems_current_user_env == &rtems_global_user_env
|| rtems_current_user_env->task_id != task_id
4711a: b492 cmpl %a2@,%d2
4711c: 6734 beqs 47152 <rtems_libio_set_private_env+0xaa>
) {
new_env = malloc(sizeof(rtems_user_env_t));
4711e: 4878 0048 pea 48 <DBL_MANT_DIG+0x13> 47122: 4eb9 0004 64bc jsr 464bc <malloc>
if (new_env == NULL)
47128: 588f addql #4,%sp
if (
rtems_current_user_env == &rtems_global_user_env
|| rtems_current_user_env->task_id != task_id
) {
new_env = malloc(sizeof(rtems_user_env_t));
4712a: 2440 moveal %d0,%a2
if (new_env == NULL)
4712c: 4a80 tstl %d0 4712e: 6700 0088 beqw 471b8 <rtems_libio_set_private_env+0x110>
#ifdef HAVE_USERENV_REFCNT
new_env->refcnt = 1;
#endif
sc = rtems_task_variable_add(
47132: 487a ff2c pea %pc@(47060 <free_user_env>) 47136: 4879 0006 3170 pea 63170 <rtems_current_user_env> 4713c: 42a7 clrl %sp@- 4713e: 4eb9 0004 a6fc jsr 4a6fc <rtems_task_variable_add>
RTEMS_SELF,
(void*)&rtems_current_user_env,
(void(*)(void *))free_user_env
);
if (sc != RTEMS_SUCCESSFUL)
47144: 4fef 000c lea %sp@(12),%sp 47148: 4a80 tstl %d0
4714a: 6662 bnes 471ae <rtems_libio_set_private_env+0x106>
goto error_3;
rtems_current_user_env = new_env;
4714c: 23ca 0006 3170 movel %a2,63170 <rtems_current_user_env>
}
/* Inherit the global values */
*rtems_current_user_env = rtems_global_user_env;
47152: 4878 0048 pea 48 <DBL_MANT_DIG+0x13> 47156: 4879 0006 47e4 pea 647e4 <rtems_global_user_env> 4715c: 2f0a movel %a2,%sp@- 4715e: 4eb9 0005 2cf4 jsr 52cf4 <memcpy>
* Clone the pathlocs. In contrast to most other code we must _not_ free the * original locs because 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_root = root_loc;
47164: 256e ffe0 0020 movel %fp@(-32),%a2@(32)
rtems_filesystem_current = current_loc;
4716a: 41ea 0004 lea %a2@(4),%a0
return RTEMS_SUCCESSFUL;
4716e: 4fef 000c lea %sp@(12),%sp 47172: 4280 clrl %d0
* Clone the pathlocs. In contrast to most other code we must _not_ free the * original locs because 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_root = root_loc;
47174: 256e ffe4 0024 movel %fp@(-28),%a2@(36) 4717a: 256e ffe8 0028 movel %fp@(-24),%a2@(40) 47180: 256e ffdc 001c movel %fp@(-36),%a2@(28) 47186: 256e ffd8 0018 movel %fp@(-40),%a2@(24)
rtems_filesystem_current = current_loc;
4718c: 20ee ffec movel %fp@(-20),%a0@+ 47190: 20ee fff0 movel %fp@(-16),%a0@+ 47194: 20ee fff4 movel %fp@(-12),%a0@+ 47198: 20ee fff8 movel %fp@(-8),%a0@+ 4719c: 20ae fffc movel %fp@(-4),%a0@
}
/* Inherit the global values */
*rtems_current_user_env = rtems_global_user_env;
rtems_current_user_env->task_id = task_id;
471a0: 2482 movel %d2,%a2@
error_1:
rtems_filesystem_freenode(&root_loc);
error_0:
return RTEMS_NO_MEMORY;
}
471a2: 242e ffd0 movel %fp@(-48),%d2 471a6: 246e ffd4 moveal %fp@(-44),%a2 471aa: 4e5e unlk %fp 471ac: 4e75 rts
rtems_filesystem_current = current_loc;
return RTEMS_SUCCESSFUL;
error_3:
free(new_env);
471ae: 2f0a movel %a2,%sp@- 471b0: 4eb9 0004 5d44 jsr 45d44 <free> 471b6: 588f addql #4,%sp
error_2:
rtems_filesystem_freenode(¤t_loc);
471b8: 486e ffec pea %fp@(-20) 471bc: 45f9 0004 5d30 lea 45d30 <rtems_filesystem_freenode>,%a2 471c2: 4e92 jsr %a2@ 471c4: 588f addql #4,%sp
error_1:
rtems_filesystem_freenode(&root_loc);
471c6: 486e ffd8 pea %fp@(-40) 471ca: 4e92 jsr %a2@
error_0:
return RTEMS_NO_MEMORY;
}
471cc: 242e ffd0 movel %fp@(-48),%d2
error_2:
rtems_filesystem_freenode(¤t_loc);
error_1:
rtems_filesystem_freenode(&root_loc);
471d0: 588f addql #4,%sp
error_0:
return RTEMS_NO_MEMORY;
471d2: 701a moveq #26,%d0
}
471d4: 246e ffd4 moveal %fp@(-44),%a2
471d8: 4e5e unlk %fp <== NOT EXECUTED
000471dc <rtems_libio_share_private_env>:
* b) mutex access to rtems_filesystem_current, rtems_filesytem_root
* while changing any of those (chdir(), chroot()).
*/
rtems_status_code rtems_libio_share_private_env(rtems_id task_id)
{
471dc: 4e56 fff8 linkw %fp,#-8 471e0: 2f03 movel %d3,%sp@- 471e2: 2f02 movel %d2,%sp@- 471e4: 242e 0008 movel %fp@(8),%d2
rtems_id current_task_id;
/*
* get current task id
*/
current_task_id = rtems_task_self();
471e8: 4eb9 0004 a628 jsr 4a628 <rtems_task_self> 471ee: 2600 movel %d0,%d3
/*
* If this was an attempt to share the task with self,
* if somebody wanted to do it... Lets tell them, its shared
*/
if( task_id == current_task_id )
471f0: b082 cmpl %d2,%d0
471f2: 673a beqs 4722e <rtems_libio_share_private_env+0x52><== NEVER TAKEN
return RTEMS_SUCCESSFUL;
/*
* Try to get the requested user environment
*/
sc = rtems_task_variable_get(
471f4: 486e fffc pea %fp@(-4) 471f8: 4879 0006 3170 pea 63170 <rtems_current_user_env> 471fe: 2f02 movel %d2,%sp@- 47200: 4eb9 0004 a7c4 jsr 4a7c4 <rtems_task_variable_get>
(void*)&shared_user_env );
/*
* If it was not successful, return the error code
*/
if (sc != RTEMS_SUCCESSFUL)
47206: 4fef 000c lea %sp@(12),%sp 4720a: 4a80 tstl %d0
4720c: 6614 bnes 47222 <rtems_libio_share_private_env+0x46>
* If we have a current environment in place, we need to
* free it, since we will be sharing the variable with the
* shared_user_env
*/
if (rtems_current_user_env->task_id==current_task_id) {
4720e: 2079 0006 3170 moveal 63170 <rtems_current_user_env>,%a0 47214: b690 cmpl %a0@,%d3
47216: 6724 beqs 4723c <rtems_libio_share_private_env+0x60>
rtems_user_env_t *tmp = rtems_current_user_env;
free_user_env( tmp );
}
/* the current_user_env is the same pointer that remote env */
rtems_current_user_env = shared_user_env;
47218: 41ee fffc lea %fp@(-4),%a0 4721c: 23d0 0006 3170 movel %a0@,63170 <rtems_current_user_env>
#ifdef HAVE_USERENV_REFCNT
rtems_current_user_env->refcnt++;
#endif
return RTEMS_SUCCESSFUL;
}
47222: 242e fff0 movel %fp@(-16),%d2 47226: 262e fff4 movel %fp@(-12),%d3 4722a: 4e5e unlk %fp 4722c: 4e75 rts
4722e: 242e fff0 movel %fp@(-16),%d2 <== NOT EXECUTED
* If this was an attempt to share the task with self,
* if somebody wanted to do it... Lets tell them, its shared
*/
if( task_id == current_task_id )
return RTEMS_SUCCESSFUL;
47232: 4280 clrl %d0 <== NOT EXECUTED
#ifdef HAVE_USERENV_REFCNT
rtems_current_user_env->refcnt++;
#endif
return RTEMS_SUCCESSFUL;
}
47234: 262e fff4 movel %fp@(-12),%d3 <== NOT EXECUTED 47238: 4e5e unlk %fp <== NOT EXECUTED 4723a: 4e75 rts <== NOT EXECUTED
* shared_user_env
*/
if (rtems_current_user_env->task_id==current_task_id) {
rtems_user_env_t *tmp = rtems_current_user_env;
free_user_env( tmp );
4723c: 2f08 movel %a0,%sp@- 4723e: 2d40 fff8 movel %d0,%fp@(-8) 47242: 4eba fe1c jsr %pc@(47060 <free_user_env>) 47246: 202e fff8 movel %fp@(-8),%d0
}
/* the current_user_env is the same pointer that remote env */
rtems_current_user_env = shared_user_env;
4724a: 41ee fffc lea %fp@(-4),%a0
* shared_user_env
*/
if (rtems_current_user_env->task_id==current_task_id) {
rtems_user_env_t *tmp = rtems_current_user_env;
free_user_env( tmp );
4724e: 588f addql #4,%sp
}
/* the current_user_env is the same pointer that remote env */
rtems_current_user_env = shared_user_env;
47250: 23d0 0006 3170 movel %a0@,63170 <rtems_current_user_env> 47256: 60ca bras 47222 <rtems_libio_share_private_env+0x46>
0004b9e8 <rtems_libio_to_fcntl_flags>:
uint32_t flags
)
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
4b9e8: 7006 moveq #6,%d0
*/
uint32_t rtems_libio_to_fcntl_flags(
uint32_t flags
)
{
4b9ea: 4e56 0000 linkw %fp,#0 4b9ee: 222e 0008 movel %fp@(8),%d1
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
4b9f2: c081 andl %d1,%d0
*/
uint32_t rtems_libio_to_fcntl_flags(
uint32_t flags
)
{
4b9f4: 2f02 movel %d2,%sp@-
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
4b9f6: 7406 moveq #6,%d2 4b9f8: b480 cmpl %d0,%d2
4b9fa: 6736 beqs 4ba32 <rtems_libio_to_fcntl_flags+0x4a>
fcntl_flags |= O_RDWR;
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
4b9fc: 0801 0001 btst #1,%d1
4ba00: 6726 beqs 4ba28 <rtems_libio_to_fcntl_flags+0x40><== NEVER TAKEN
fcntl_flags |= O_RDONLY;
4ba02: 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 ) {
4ba04: 0801 0000 btst #0,%d1
4ba08: 6704 beqs 4ba0e <rtems_libio_to_fcntl_flags+0x26>
fcntl_flags |= O_NONBLOCK;
4ba0a: 08c0 000e bset #14,%d0
}
if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) {
4ba0e: 0801 0009 btst #9,%d1
4ba12: 6704 beqs 4ba18 <rtems_libio_to_fcntl_flags+0x30>
fcntl_flags |= O_APPEND;
4ba14: 7408 moveq #8,%d2 4ba16: 8082 orl %d2,%d0
}
if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) {
4ba18: 0801 000a btst #10,%d1
4ba1c: 6704 beqs 4ba22 <rtems_libio_to_fcntl_flags+0x3a>
fcntl_flags |= O_CREAT;
4ba1e: 08c0 0009 bset #9,%d0
}
return fcntl_flags;
}
4ba22: 241f movel %sp@+,%d2 4ba24: 4e5e unlk %fp 4ba26: 4e75 rts
)
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
fcntl_flags |= O_RDWR;
4ba28: 44c1 movew %d1,%ccr <== NOT EXECUTED 4ba2a: 57c0 seq %d0 <== NOT EXECUTED 4ba2c: 49c0 extbl %d0 <== NOT EXECUTED 4ba2e: 4480 negl %d0 <== NOT EXECUTED 4ba30: 60d2 bras 4ba04 <rtems_libio_to_fcntl_flags+0x1c><== NOT EXECUTED
4ba32: 7002 moveq #2,%d0 4ba34: 60ce bras 4ba04 <rtems_libio_to_fcntl_flags+0x1c>
00047348 <rtems_malloc_statistics_at_free>:
* size and thus we skip updating the statistics.
*/
static void rtems_malloc_statistics_at_free(
void *pointer
)
{
47348: 4e56 fffc linkw %fp,#-4 4734c: 2f03 movel %d3,%sp@- 4734e: 2f02 movel %d2,%sp@-
uintptr_t size;
if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) {
47350: 486e fffc pea %fp@(-4) 47354: 2f2e 0008 movel %fp@(8),%sp@- 47358: 2f39 0006 506e movel 6506e <RTEMS_Malloc_Heap>,%sp@- 4735e: 4eb9 0004 d490 jsr 4d490 <_Protected_heap_Get_block_size> 47364: 4fef 000c lea %sp@(12),%sp 47368: 4a00 tstb %d0
4736a: 671a beqs 47386 <rtems_malloc_statistics_at_free+0x3e><== NEVER TAKEN
MSBUMP(lifetime_freed, size);
4736c: 262e fffc movel %fp@(-4),%d3 47370: 4282 clrl %d2 47372: d7b9 0006 7140 addl %d3,67140 <rtems_malloc_statistics+0x28> 47378: 2039 0006 713c movel 6713c <rtems_malloc_statistics+0x24>,%d0 4737e: d182 addxl %d2,%d0 47380: 23c0 0006 713c movel %d0,6713c <rtems_malloc_statistics+0x24>
} }
47386: 242e fff4 movel %fp@(-12),%d2 4738a: 262e fff8 movel %fp@(-8),%d3
4738e: 4e5e unlk %fp <== NOT EXECUTED
00047392 <rtems_malloc_statistics_at_malloc>:
}
static void rtems_malloc_statistics_at_malloc(
void *pointer
)
{
47392: 4e56 fffc linkw %fp,#-4 47396: 202e 0008 movel %fp@(8),%d0 4739a: 2f03 movel %d3,%sp@-
uintptr_t actual_size = 0;
4739c: 42ae fffc clrl %fp@(-4)
}
static void rtems_malloc_statistics_at_malloc(
void *pointer
)
{
473a0: 2f02 movel %d2,%sp@-
uintptr_t actual_size = 0;
uint32_t current_depth;
rtems_malloc_statistics_t *s = &rtems_malloc_statistics;
if ( !pointer )
473a2: 4a80 tstl %d0
473a4: 674c beqs 473f2 <rtems_malloc_statistics_at_malloc+0x60><== NEVER TAKEN
return;
_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size);
473a6: 486e fffc pea %fp@(-4)
MSBUMP(lifetime_allocated, actual_size);
473aa: 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);
473ac: 2f00 movel %d0,%sp@- 473ae: 2f39 0006 506e movel 6506e <RTEMS_Malloc_Heap>,%sp@- 473b4: 4eb9 0004 d490 jsr 4d490 <_Protected_heap_Get_block_size>
MSBUMP(lifetime_allocated, actual_size);
473ba: 262e fffc movel %fp@(-4),%d3
current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed);
if (current_depth > s->max_depth)
473be: 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);
473c2: 2039 0006 7134 movel 67134 <rtems_malloc_statistics+0x1c>,%d0 473c8: d6b9 0006 7138 addl 67138 <rtems_malloc_statistics+0x20>,%d3 473ce: d580 addxl %d0,%d2
current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed);
473d0: 2003 movel %d3,%d0 473d2: 90b9 0006 7140 subl 67140 <rtems_malloc_statistics+0x28>,%d0
if ( !pointer )
return;
_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size);
MSBUMP(lifetime_allocated, actual_size);
473d8: 23c2 0006 7134 movel %d2,67134 <rtems_malloc_statistics+0x1c> 473de: 23c3 0006 7138 movel %d3,67138 <rtems_malloc_statistics+0x20>
current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed);
if (current_depth > s->max_depth)
473e4: b0b9 0006 7130 cmpl 67130 <rtems_malloc_statistics+0x18>,%d0
473ea: 6306 blss 473f2 <rtems_malloc_statistics_at_malloc+0x60>
s->max_depth = current_depth;
473ec: 23c0 0006 7130 movel %d0,67130 <rtems_malloc_statistics+0x18>
}
473f2: 242e fff4 movel %fp@(-12),%d2 473f6: 262e fff8 movel %fp@(-8),%d3
473fa: 4e5e unlk %fp <== NOT EXECUTED
0004fda0 <rtems_memalign>:
int rtems_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
4fda0: 4e56 0000 linkw %fp,#0 4fda4: 2f0a movel %a2,%sp@- 4fda6: 246e 0008 moveal %fp@(8),%a2 4fdaa: 2f02 movel %d2,%sp@-
void *return_this;
/*
* Parameter error checks
*/
if ( !pointer )
4fdac: 4a8a tstl %a2
4fdae: 675e beqs 4fe0e <rtems_memalign+0x6e>
return EINVAL;
*pointer = NULL;
4fdb0: 4292 clrl %a2@
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
4fdb2: 7003 moveq #3,%d0 4fdb4: b0b9 0006 5024 cmpl 65024 <_System_state_Current>,%d0
4fdba: 6748 beqs 4fe04 <rtems_memalign+0x64> <== ALWAYS TAKEN
return EINVAL;
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
4fdbc: 4eb9 0004 43a8 jsr 443a8 <malloc_deferred_frees_process>
Heap_Control *heap,
uintptr_t size,
uintptr_t alignment
)
{
return
4fdc2: 42a7 clrl %sp@- 4fdc4: 2f2e 000c movel %fp@(12),%sp@- 4fdc8: 2f2e 0010 movel %fp@(16),%sp@- 4fdcc: 2f39 0006 3512 movel 63512 <RTEMS_Malloc_Heap>,%sp@- 4fdd2: 4eb9 0004 9a2c jsr 49a2c <_Protected_heap_Allocate_aligned_with_boundary>
return_this = _Protected_heap_Allocate_aligned(
RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
4fdd8: 4fef 0010 lea %sp@(16),%sp 4fddc: 2400 movel %d0,%d2
4fdde: 673c beqs 4fe1c <rtems_memalign+0x7c>
return ENOMEM;
/*
* If configured, update the more involved statistics
*/
if ( rtems_malloc_statistics_helpers )
4fde0: 2079 0006 3cc4 moveal 63cc4 <rtems_malloc_statistics_helpers>,%a0 4fde6: 4a88 tstl %a0
4fde8: 670a beqs 4fdf4 <rtems_memalign+0x54>
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
4fdea: 2f0a movel %a2,%sp@- 4fdec: 2068 0004 moveal %a0@(4),%a0 4fdf0: 4e90 jsr %a0@ 4fdf2: 588f addql #4,%sp
*pointer = return_this;
4fdf4: 2482 movel %d2,%a2@
return 0; }
4fdf6: 242e fff8 movel %fp@(-8),%d2
*/
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
*pointer = return_this;
return 0;
4fdfa: 4280 clrl %d0
}
4fdfc: 246e fffc moveal %fp@(-4),%a2 4fe00: 4e5e unlk %fp 4fe02: 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() )
4fe04: 4eb9 0004 4368 jsr 44368 <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()) &&
4fe0a: 4a00 tstb %d0
4fe0c: 66ae bnes 4fdbc <rtems_memalign+0x1c> <== ALWAYS TAKEN
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
*pointer = return_this;
return 0;
}
4fe0e: 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;
4fe12: 7016 moveq #22,%d0
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
*pointer = return_this;
return 0;
}
4fe14: 246e fffc moveal %fp@(-4),%a2 4fe18: 4e5e unlk %fp 4fe1a: 4e75 rts 4fe1c: 242e fff8 movel %fp@(-8),%d2
RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
return ENOMEM;
4fe20: 700c moveq #12,%d0
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
*pointer = return_this;
return 0;
}
4fe22: 246e fffc moveal %fp@(-4),%a2 4fe26: 4e5e unlk %fp
...
000547a8 <rtems_message_queue_broadcast>:
rtems_id id,
const void *buffer,
size_t size,
uint32_t *count
)
{
547a8: 4e56 fff0 linkw %fp,#-16 547ac: 48d7 001c moveml %d2-%d4,%sp@ 547b0: 282e 0008 movel %fp@(8),%d4 547b4: 242e 000c movel %fp@(12),%d2 547b8: 262e 0014 movel %fp@(20),%d3
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status core_status;
if ( !buffer )
547bc: 4a82 tstl %d2
547be: 6756 beqs 54816 <rtems_message_queue_broadcast+0x6e><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( !count )
547c0: 4a83 tstl %d3
547c2: 6752 beqs 54816 <rtems_message_queue_broadcast+0x6e><== NEVER TAKEN
RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Message_queue_Control *)
547c4: 486e fffc pea %fp@(-4) 547c8: 2f04 movel %d4,%sp@- 547ca: 4879 0007 e594 pea 7e594 <_Message_queue_Information> 547d0: 4eb9 0005 9f3c jsr 59f3c <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
547d6: 4fef 000c lea %sp@(12),%sp 547da: 4aae fffc tstl %fp@(-4)
547de: 6642 bnes 54822 <rtems_message_queue_broadcast+0x7a>
case OBJECTS_LOCAL:
core_status = _CORE_message_queue_Broadcast(
547e0: 2f03 movel %d3,%sp@- 547e2: 2040 moveal %d0,%a0 547e4: 42a7 clrl %sp@- 547e6: 2f04 movel %d4,%sp@- 547e8: 2f2e 0010 movel %fp@(16),%sp@- 547ec: 2f02 movel %d2,%sp@- 547ee: 4868 0014 pea %a0@(20) 547f2: 4eb9 0005 836c jsr 5836c <_CORE_message_queue_Broadcast> 547f8: 2400 movel %d0,%d2
NULL,
#endif
count
);
_Thread_Enable_dispatch();
547fa: 4eb9 0005 ad04 jsr 5ad04 <_Thread_Enable_dispatch>
return
54800: 2f02 movel %d2,%sp@- 54802: 4eb9 0005 4bc4 jsr 54bc4 <_Message_queue_Translate_core_message_queue_return_code> 54808: 4fef 001c lea %sp@(28),%sp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
5480c: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 54812: 4e5e unlk %fp 54814: 4e75 rts
if ( !buffer )
return RTEMS_INVALID_ADDRESS;
if ( !count )
return RTEMS_INVALID_ADDRESS;
54816: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
54818: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5481e: 4e5e unlk %fp 54820: 4e75 rts
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
54822: 7004 moveq #4,%d0
}
54824: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5482a: 4e5e unlk %fp
...
00054bdc <rtems_message_queue_urgent>:
rtems_status_code rtems_message_queue_urgent(
rtems_id id,
const void *buffer,
size_t size
)
{
54bdc: 4e56 fffc linkw %fp,#-4 54be0: 2f03 movel %d3,%sp@- 54be2: 262e 0008 movel %fp@(8),%d3 54be6: 2f02 movel %d2,%sp@- 54be8: 242e 000c movel %fp@(12),%d2
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status status;
if ( !buffer )
54bec: 676c beqs 54c5a <rtems_message_queue_urgent+0x7e><== NEVER TAKEN
54bee: 486e fffc pea %fp@(-4) 54bf2: 2f03 movel %d3,%sp@- 54bf4: 4879 0007 e594 pea 7e594 <_Message_queue_Information> 54bfa: 4eb9 0005 9f3c jsr 59f3c <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
54c00: 4fef 000c lea %sp@(12),%sp 54c04: 4aae fffc tstl %fp@(-4)
54c08: 6642 bnes 54c4c <rtems_message_queue_urgent+0x70>
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support,
bool wait,
Watchdog_Interval timeout
)
{
return _CORE_message_queue_Submit(
54c0a: 42a7 clrl %sp@- 54c0c: 2040 moveal %d0,%a0 54c0e: 42a7 clrl %sp@- 54c10: 2f3c 8000 0000 movel #-2147483648,%sp@- 54c16: 42a7 clrl %sp@- 54c18: 2f03 movel %d3,%sp@- 54c1a: 2f2e 0010 movel %fp@(16),%sp@- 54c1e: 2f02 movel %d2,%sp@- 54c20: 4868 0014 pea %a0@(20) 54c24: 4eb9 0005 86d4 jsr 586d4 <_CORE_message_queue_Submit>
id,
MESSAGE_QUEUE_MP_HANDLER,
false, /* sender does not block */
0 /* no timeout */
);
_Thread_Enable_dispatch();
54c2a: 4fef 0020 lea %sp@(32),%sp 54c2e: 2400 movel %d0,%d2 54c30: 4eb9 0005 ad04 jsr 5ad04 <_Thread_Enable_dispatch>
/*
* Since this API does not allow for blocking sends, we can directly
* return the returned status.
*/
return _Message_queue_Translate_core_message_queue_return_code(status);
54c36: 2f02 movel %d2,%sp@- 54c38: 4eb9 0005 4bc4 jsr 54bc4 <_Message_queue_Translate_core_message_queue_return_code>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
54c3e: 242e fff4 movel %fp@(-12),%d2
/*
* Since this API does not allow for blocking sends, we can directly
* return the returned status.
*/
return _Message_queue_Translate_core_message_queue_return_code(status);
54c42: 588f addql #4,%sp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
54c44: 262e fff8 movel %fp@(-8),%d3 54c48: 4e5e unlk %fp 54c4a: 4e75 rts 54c4c: 242e fff4 movel %fp@(-12),%d2
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
54c50: 7004 moveq #4,%d0
}
54c52: 262e fff8 movel %fp@(-8),%d3 54c56: 4e5e unlk %fp 54c58: 4e75 rts 54c5a: 242e fff4 movel %fp@(-12),%d2
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status status;
if ( !buffer )
return RTEMS_INVALID_ADDRESS;
54c5e: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
54c60: 262e fff8 movel %fp@(-8),%d3
54c64: 4e5e unlk %fp <== NOT EXECUTED
0004e21c <rtems_mkdir>:
return (retval);
}
int
rtems_mkdir(const char *path, mode_t mode)
{
4e21c: 4e56 ff90 linkw %fp,#-112 4e220: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
int success = 0; char *dup_path = strdup(path);
4e224: 2f2e 0008 movel %fp@(8),%sp@-
return (retval);
}
int
rtems_mkdir(const char *path, mode_t mode)
{
4e228: 2a2e 000c movel %fp@(12),%d5
int success = 0; char *dup_path = strdup(path);
4e22c: 4eb9 0005 1bd8 jsr 51bd8 <strdup>
if (dup_path != NULL) {
4e232: 588f addql #4,%sp
int
rtems_mkdir(const char *path, mode_t mode)
{
int success = 0;
char *dup_path = strdup(path);
4e234: 2640 moveal %d0,%a3
if (dup_path != NULL) {
4e236: 4a80 tstl %d0 4e238: 6700 0138 beqw 4e372 <rtems_mkdir+0x156>
char *p;
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
4e23c: 742f moveq #47,%d2 4e23e: 1013 moveb %a3@,%d0 4e240: 1200 moveb %d0,%d1 4e242: 49c1 extbl %d1 4e244: b481 cmpl %d1,%d2 4e246: 6700 014a beqw 4e392 <rtems_mkdir+0x176> 4e24a: 244b moveal %a3,%a2
(void)umask(oumask);
return (retval);
}
int
rtems_mkdir(const char *path, mode_t mode)
4e24c: 49ea 0001 lea %a2@(1),%a4 4e250: 4283 clrl %d3 4e252: 7201 moveq #1,%d1 4e254: 4bf9 0004 4cb4 lea 44cb4 <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) {
4e25a: 2e3c 0005 0cbc movel #330940,%d7
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
first = 0;
}
if (last)
(void)umask(oumask);
4e260: 283c 0004 e480 movel #320640,%d4
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
4e266: 4a00 tstb %d0
4e268: 6710 beqs 4e27a <rtems_mkdir+0x5e> <== NEVER TAKEN
last = 1;
else if (p[0] != '/')
4e26a: 49c0 extbl %d0 4e26c: 742f moveq #47,%d2 4e26e: b480 cmpl %d0,%d2
4e270: 6738 beqs 4e2aa <rtems_mkdir+0x8e>
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
for (first = 1, last = 0; !last ; ++p) {
4e272: 528a addql #1,%a2 4e274: 101c moveb %a4@+,%d0
if (p[0] == '\0')
4e276: 4a00 tstb %d0
4e278: 66f0 bnes 4e26a <rtems_mkdir+0x4e>
last = 1;
else if (p[0] != '/')
continue;
*p = '\0';
4e27a: 7401 moveq #1,%d2 4e27c: 4212 clrb %a2@
if (!last && p[1] == '\0')
last = 1;
if (first) {
4e27e: 4a81 tstl %d1
4e280: 6650 bnes 4e2d2 <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) {
4e282: 203c 0000 01ff movel #511,%d0
oumask = umask(0);
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
first = 0;
}
if (last)
4e288: 4a82 tstl %d2
4e28a: 662e bnes 4e2ba <rtems_mkdir+0x9e>
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
4e28c: 2f00 movel %d0,%sp@- 4e28e: 2f0b movel %a3,%sp@- 4e290: 4e95 jsr %a5@ 4e292: 508f addql #8,%sp 4e294: 4a80 tstl %d0
4e296: 6d5c blts 4e2f4 <rtems_mkdir+0xd8>
} else {
retval = 0;
break;
}
}
if (!last)
4e298: 4a82 tstl %d2 4e29a: 6600 00c0 bnew 4e35c <rtems_mkdir+0x140>
*p = '/';
4e29e: 4281 clrl %d1 4e2a0: 14bc 002f moveb #47,%a2@
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
for (first = 1, last = 0; !last ; ++p) {
4e2a4: 528a addql #1,%a2 4e2a6: 101c moveb %a4@+,%d0 4e2a8: 60cc bras 4e276 <rtems_mkdir+0x5a>
if (p[0] == '\0')
last = 1;
else if (p[0] != '/')
continue;
*p = '\0';
4e2aa: 4212 clrb %a2@
if (!last && p[1] == '\0')
4e2ac: 4a14 tstb %a4@ 4e2ae: 57c2 seq %d2 4e2b0: 49c2 extbl %d2 4e2b2: 4482 negl %d2
last = 1;
if (first) {
4e2b4: 4a81 tstl %d1
4e2b6: 67ca beqs 4e282 <rtems_mkdir+0x66>
4e2b8: 6018 bras 4e2d2 <rtems_mkdir+0xb6>
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
first = 0;
}
if (last)
(void)umask(oumask);
4e2ba: 2f03 movel %d3,%sp@- 4e2bc: 2044 moveal %d4,%a0 4e2be: 4e90 jsr %a0@ 4e2c0: 588f addql #4,%sp
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
4e2c2: 2005 movel %d5,%d0 4e2c4: 2f00 movel %d0,%sp@- 4e2c6: 2f0b movel %a3,%sp@- 4e2c8: 4e95 jsr %a5@ 4e2ca: 508f addql #8,%sp 4e2cc: 4a80 tstl %d0
4e2ce: 6cc8 bges 4e298 <rtems_mkdir+0x7c>
4e2d0: 6022 bras 4e2f4 <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);
4e2d2: 42a7 clrl %sp@- 4e2d4: 2044 moveal %d4,%a0 4e2d6: 4e90 jsr %a0@
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
4e2d8: 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);
4e2da: 2600 movel %d0,%d3
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
4e2dc: 0280 ffff ff3f andil #-193,%d0 4e2e2: 2f00 movel %d0,%sp@- 4e2e4: 4e90 jsr %a0@ 4e2e6: 508f addql #8,%sp
first = 0;
}
if (last)
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
4e2e8: 203c 0000 01ff movel #511,%d0
oumask = umask(0);
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
first = 0;
}
if (last)
4e2ee: 4a82 tstl %d2
4e2f0: 679a beqs 4e28c <rtems_mkdir+0x70>
4e2f2: 60c6 bras 4e2ba <rtems_mkdir+0x9e>
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
if (errno == EEXIST || errno == EISDIR) {
4e2f4: 2047 moveal %d7,%a0 4e2f6: 2c3c 0005 0cbc movel #330940,%d6 4e2fc: 4e90 jsr %a0@ 4e2fe: 7211 moveq #17,%d1 4e300: 2040 moveal %d0,%a0 4e302: b290 cmpl %a0@,%d1
4e304: 670c beqs 4e312 <rtems_mkdir+0xf6>
4e306: 2046 moveal %d6,%a0 4e308: 4e90 jsr %a0@ 4e30a: 7215 moveq #21,%d1 4e30c: 2040 moveal %d0,%a0 4e30e: b290 cmpl %a0@,%d1
4e310: 6664 bnes 4e376 <rtems_mkdir+0x15a> <== ALWAYS TAKEN
if (stat(path, &sb) < 0) {
4e312: 486e ffba pea %fp@(-70) 4e316: 2f0b movel %a3,%sp@- 4e318: 4eb9 0004 e3cc jsr 4e3cc <stat> 4e31e: 508f addql #8,%sp 4e320: 4a80 tstl %d0
4e322: 6d52 blts 4e376 <rtems_mkdir+0x15a> <== NEVER TAKEN
retval = 0;
break;
} else if (!S_ISDIR(sb.st_mode)) {
4e324: 202e ffc6 movel %fp@(-58),%d0 4e328: 0280 0000 f000 andil #61440,%d0 4e32e: 0c80 0000 4000 cmpil #16384,%d0 4e334: 6700 ff62 beqw 4e298 <rtems_mkdir+0x7c>
if (last)
errno = EEXIST;
4e338: 2046 moveal %d6,%a0
if (errno == EEXIST || errno == EISDIR) {
if (stat(path, &sb) < 0) {
retval = 0;
break;
} else if (!S_ISDIR(sb.st_mode)) {
if (last)
4e33a: 4a82 tstl %d2
4e33c: 677a beqs 4e3b8 <rtems_mkdir+0x19c>
errno = EEXIST;
4e33e: 4e90 jsr %a0@ 4e340: 7211 moveq #17,%d1 4e342: 2040 moveal %d0,%a0 4e344: 2081 movel %d1,%a0@
int success = 0;
char *dup_path = strdup(path);
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
4e346: 2f0b movel %a3,%sp@- 4e348: 4eb9 0004 459c jsr 4459c <free> 4e34e: 588f addql #4,%sp
}
return success != 0 ? 0 : -1;
4e350: 70ff moveq #-1,%d0
}
4e352: 4cee 3cfc ff90 moveml %fp@(-112),%d2-%d7/%a2-%a5 4e358: 4e5e unlk %fp 4e35a: 4e75 rts
int success = 0;
char *dup_path = strdup(path);
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
4e35c: 2f0b movel %a3,%sp@- 4e35e: 4eb9 0004 459c jsr 4459c <free> 4e364: 588f addql #4,%sp
}
return success != 0 ? 0 : -1;
4e366: 4280 clrl %d0
}
4e368: 4cee 3cfc ff90 moveml %fp@(-112),%d2-%d7/%a2-%a5 4e36e: 4e5e unlk %fp 4e370: 4e75 rts
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
}
return success != 0 ? 0 : -1;
4e372: 70ff moveq #-1,%d0 <== NOT EXECUTED 4e374: 60dc bras 4e352 <rtems_mkdir+0x136> <== NOT EXECUTED
}
}
if (!last)
*p = '/';
}
if (!first && !last)
4e376: 4a82 tstl %d2
4e378: 66cc bnes 4e346 <rtems_mkdir+0x12a> <== ALWAYS TAKEN
(void)umask(oumask);
4e37a: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4e37c: 4eb9 0004 e480 jsr 4e480 <umask> <== NOT EXECUTED 4e382: 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);
4e384: 2f0b movel %a3,%sp@- 4e386: 4eb9 0004 459c jsr 4459c <free> 4e38c: 588f addql #4,%sp
}
return success != 0 ? 0 : -1;
4e38e: 70ff moveq #-1,%d0 4e390: 60c0 bras 4e352 <rtems_mkdir+0x136>
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
4e392: 45eb 0001 lea %a3@(1),%a2
(void)umask(oumask);
return (retval);
}
int
rtems_mkdir(const char *path, mode_t mode)
4e396: 49ea 0001 lea %a2@(1),%a4 4e39a: 4283 clrl %d3 4e39c: 7201 moveq #1,%d1 4e39e: 4bf9 0004 4cb4 lea 44cb4 <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) {
4e3a4: 2e3c 0005 0cbc movel #330940,%d7
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
first = 0;
}
if (last)
(void)umask(oumask);
4e3aa: 283c 0004 e480 movel #320640,%d4
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
4e3b0: 102b 0001 moveb %a3@(1),%d0 4e3b4: 6000 feb0 braw 4e266 <rtems_mkdir+0x4a>
break;
} else if (!S_ISDIR(sb.st_mode)) {
if (last)
errno = EEXIST;
else
errno = ENOTDIR;
4e3b8: 4e90 jsr %a0@ 4e3ba: 2040 moveal %d0,%a0 4e3bc: 7014 moveq #20,%d0 4e3be: 2080 movel %d0,%a0@
}
if (!last)
*p = '/';
}
if (!first && !last)
(void)umask(oumask);
4e3c0: 2f03 movel %d3,%sp@- 4e3c2: 4eb9 0004 e480 jsr 4e480 <umask> 4e3c8: 588f addql #4,%sp 4e3ca: 60b8 bras 4e384 <rtems_mkdir+0x168>
0004682c <rtems_object_get_api_class_name>:
)
{
const rtems_assoc_t *api_assoc;
const rtems_assoc_t *class_assoc;
if ( the_api == OBJECTS_INTERNAL_API )
4682c: 7001 moveq #1,%d0
const char *rtems_object_get_api_class_name(
int the_api,
int the_class
)
{
4682e: 4e56 0000 linkw %fp,#0 46832: 222e 0008 movel %fp@(8),%d1 46836: 2f02 movel %d2,%sp@-
const rtems_assoc_t *api_assoc;
const rtems_assoc_t *class_assoc;
if ( the_api == OBJECTS_INTERNAL_API )
46838: b081 cmpl %d1,%d0
4683a: 674e beqs 4688a <rtems_object_get_api_class_name+0x5e>
api_assoc = rtems_object_api_internal_assoc;
else if ( the_api == OBJECTS_CLASSIC_API )
4683c: 7402 moveq #2,%d2 4683e: b481 cmpl %d1,%d2
46840: 6740 beqs 46882 <rtems_object_get_api_class_name+0x56>
api_assoc = rtems_object_api_classic_assoc;
#ifdef RTEMS_POSIX_API
else if ( the_api == OBJECTS_POSIX_API )
46842: 143c 0003 moveb #3,%d2
api_assoc = rtems_object_api_posix_assoc;
#endif
else
return "BAD API";
46846: 203c 0005 ee5a movel #388698,%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 )
4684c: b481 cmpl %d1,%d2
4684e: 6708 beqs 46858 <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";
}
46850: 242e fffc movel %fp@(-4),%d2 46854: 4e5e unlk %fp 46856: 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;
46858: 203c 0006 0028 movel #393256,%d0
#endif
else
return "BAD API";
class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class );
4685e: 2f2e 000c movel %fp@(12),%sp@- 46862: 2f00 movel %d0,%sp@- 46864: 4eb9 0004 b8f0 jsr 4b8f0 <rtems_assoc_ptr_by_local>
if ( class_assoc )
4686a: 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 );
4686c: 2040 moveal %d0,%a0
if ( class_assoc )
return class_assoc->name;
return "BAD CLASS";
4686e: 203c 0005 ee62 movel #388706,%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 )
46874: 4a88 tstl %a0
46876: 67d8 beqs 46850 <rtems_object_get_api_class_name+0x24>
return class_assoc->name;
return "BAD CLASS";
}
46878: 242e fffc movel %fp@(-4),%d2 4687c: 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;
4687e: 2010 movel %a0@,%d0
return "BAD CLASS"; }
46880: 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;
46882: 203c 0006 00b8 movel #393400,%d0 46888: 60d4 bras 4685e <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;
4688a: 203c 0006 0130 movel #393520,%d0 46890: 60cc bras 4685e <rtems_object_get_api_class_name+0x32>
...
000483d8 <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
)
{
483d8: 4e56 0000 linkw %fp,#0 483dc: 2f0a movel %a2,%sp@- 483de: 246e 0010 moveal %fp@(16),%a2 483e2: 2f02 movel %d2,%sp@-
int i;
/*
* Validate parameters and look up information structure.
*/
if ( !info )
483e4: 4a8a tstl %a2
483e6: 6768 beqs 48450 <rtems_object_get_class_information+0x78><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
483e8: 3f2e 000e movew %fp@(14),%sp@- 483ec: 4267 clrw %sp@- 483ee: 2f2e 0008 movel %fp@(8),%sp@- 483f2: 4eb9 0004 a158 jsr 4a158 <_Objects_Get_information>
if ( !obj_info )
483f8: 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 );
483fa: 2040 moveal %d0,%a0
if ( !obj_info )
483fc: 4a80 tstl %d0
483fe: 675e beqs 4845e <rtems_object_get_class_information+0x86>
return RTEMS_INVALID_NUMBER;
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
48400: 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;
48404: 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;
48406: 2568 000a 0004 movel %a0@(10),%a2@(4)
info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum;
4840c: 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;
48410: 1568 0010 000c moveb %a0@(16),%a2@(12)
info->maximum = obj_info->maximum;
48416: 2542 0008 movel %d2,%a2@(8)
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
4841a: 6750 beqs 4846c <rtems_object_get_class_information+0x94><== NEVER TAKEN
4841c: 2068 0018 moveal %a0@(24),%a0 48420: 7201 moveq #1,%d1 48422: 7001 moveq #1,%d0 48424: 93c9 subal %a1,%a1 48426: 5280 addql #1,%d0
if ( !obj_info->local_table[i] )
48428: 4ab0 1c00 tstl %a0@(00000000,%d1:l:4)
4842c: 6718 beqs 48446 <rtems_object_get_class_information+0x6e>
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++ )
4842e: 2200 movel %d0,%d1 48430: b082 cmpl %d2,%d0
48432: 63f2 blss 48426 <rtems_object_get_class_information+0x4e><== ALWAYS TAKEN
if ( !obj_info->local_table[i] )
unallocated++;
info->unallocated = unallocated;
48434: 2549 000e movel %a1,%a2@(14)
return RTEMS_SUCCESSFUL;
48438: 4280 clrl %d0
}
4843a: 242e fff8 movel %fp@(-8),%d2 4843e: 246e fffc moveal %fp@(-4),%a2 48442: 4e5e unlk %fp 48444: 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++;
48446: 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++ )
48448: 2200 movel %d0,%d1 4844a: b082 cmpl %d2,%d0
4844c: 63d8 blss 48426 <rtems_object_get_class_information+0x4e><== NEVER TAKEN
4844e: 60e4 bras 48434 <rtems_object_get_class_information+0x5c>
unallocated++;
info->unallocated = unallocated;
return RTEMS_SUCCESSFUL;
}
48450: 242e fff8 movel %fp@(-8),%d2
/*
* Validate parameters and look up information structure.
*/
if ( !info )
return RTEMS_INVALID_ADDRESS;
48454: 7009 moveq #9,%d0
unallocated++;
info->unallocated = unallocated;
return RTEMS_SUCCESSFUL;
}
48456: 246e fffc moveal %fp@(-4),%a2 4845a: 4e5e unlk %fp 4845c: 4e75 rts 4845e: 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;
48462: 700a moveq #10,%d0
unallocated++;
info->unallocated = unallocated;
return RTEMS_SUCCESSFUL;
}
48464: 246e fffc moveal %fp@(-4),%a2 48468: 4e5e unlk %fp 4846a: 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++ )
4846c: 93c9 subal %a1,%a1 <== NOT EXECUTED
if ( !obj_info->local_table[i] )
unallocated++;
info->unallocated = unallocated;
return RTEMS_SUCCESSFUL;
4846e: 4280 clrl %d0 <== NOT EXECUTED
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
if ( !obj_info->local_table[i] )
unallocated++;
info->unallocated = unallocated;
48470: 2549 000e movel %a1,%a2@(14) <== NOT EXECUTED 48474: 60c4 bras 4843a <rtems_object_get_class_information+0x62><== NOT EXECUTED
...
0004313e <rtems_panic>:
void rtems_panic(
const char *printf_format,
...
)
{
4313e: 4e56 0000 linkw %fp,#0
va_list arglist;
va_start(arglist, printf_format);
(void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist);
43142: 486e 000c pea %fp@(12) 43146: 2f2e 0008 movel %fp@(8),%sp@- 4314a: 2f3c 2000 0000 movel #536870912,%sp@- 43150: 4eba fdda jsr %pc@(42f2c <rtems_verror>)
va_end(arglist);
rtems_error(0, "fatal error, exiting");
43154: 4879 0005 e29e pea 5e29e <IMFS_ops+0x7e> 4315a: 42a7 clrl %sp@- 4315c: 4eb9 0004 30dc jsr 430dc <rtems_error>
_exit(errno);
43162: 4eb9 0004 f098 jsr 4f098 <__errno> 43168: 2040 moveal %d0,%a0 4316a: 2f10 movel %a0@,%sp@- 4316c: 4eb9 0004 3bea jsr 43bea <_exit>
...
00054c68 <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
54c68: 4e56 fff4 linkw %fp,#-12 54c6c: 48d7 040c moveml %d2-%d3/%a2,%sp@ 54c70: 242e 0008 movel %fp@(8),%d2
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
54c74: 660c bnes 54c82 <rtems_partition_create+0x1a>
return RTEMS_INVALID_NAME;
54c76: 7003 moveq #3,%d0
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
54c78: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 54c7e: 4e5e unlk %fp 54c80: 4e75 rts
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !starting_address )
54c82: 4aae 000c tstl %fp@(12)
54c86: 6718 beqs 54ca0 <rtems_partition_create+0x38>
return RTEMS_INVALID_ADDRESS;
if ( !id )
54c88: 4aae 001c tstl %fp@(28)
54c8c: 6712 beqs 54ca0 <rtems_partition_create+0x38> <== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
54c8e: 4aae 0010 tstl %fp@(16)
54c92: 6618 bnes 54cac <rtems_partition_create+0x44>
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
54c94: 7008 moveq #8,%d0
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
54c96: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 54c9c: 4e5e unlk %fp 54c9e: 4e75 rts
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
return RTEMS_INVALID_ADDRESS;
54ca0: 7009 moveq #9,%d0
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
54ca2: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 54ca8: 4e5e unlk %fp 54caa: 4e75 rts
return RTEMS_INVALID_ADDRESS;
if ( !id )
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
54cac: 4aae 0014 tstl %fp@(20)
54cb0: 67e2 beqs 54c94 <rtems_partition_create+0x2c>
54cb2: 202e 0014 movel %fp@(20),%d0 54cb6: b0ae 0010 cmpl %fp@(16),%d0
54cba: 62d8 bhis 54c94 <rtems_partition_create+0x2c>
*/
RTEMS_INLINE_ROUTINE bool _Partition_Is_buffer_size_aligned (
uint32_t buffer_size
)
{
return ((buffer_size % CPU_PARTITION_ALIGNMENT) == 0);
54cbc: 7003 moveq #3,%d0 54cbe: c0ae 0014 andl %fp@(20),%d0
54cc2: 66d0 bnes 54c94 <rtems_partition_create+0x2c>
)
{
#if (CPU_ALIGNMENT == 0)
return true;
#else
return (((uintptr_t)address % CPU_ALIGNMENT) == 0);
54cc4: 103c 0003 moveb #3,%d0 54cc8: c0ae 000c andl %fp@(12),%d0
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
54ccc: 66d2 bnes 54ca0 <rtems_partition_create+0x38>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
54cce: 2039 0007 dd4c movel 7dd4c <_Thread_Dispatch_disable_level>,%d0 54cd4: 5280 addql #1,%d0 54cd6: 23c0 0007 dd4c movel %d0,7dd4c <_Thread_Dispatch_disable_level>
return _Thread_Dispatch_disable_level;
54cdc: 2039 0007 dd4c movel 7dd4c <_Thread_Dispatch_disable_level>,%d0
* 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 );
54ce2: 4879 0007 dbe2 pea 7dbe2 <_Partition_Information> 54ce8: 4eb9 0005 9a3c jsr 59a3c <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
54cee: 588f addql #4,%sp 54cf0: 2440 moveal %d0,%a2 54cf2: 4a80 tstl %d0
54cf4: 676c beqs 54d62 <rtems_partition_create+0xfa>
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
the_partition->length = length;
54cf6: 262e 0010 movel %fp@(16),%d3
the_partition->buffer_size = buffer_size;
the_partition->attribute_set = attribute_set;
the_partition->number_of_used_blocks = 0;
_Chain_Initialize( &the_partition->Memory, starting_address,
54cfa: 2003 movel %d3,%d0
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
the_partition->length = length;
54cfc: 2543 0014 movel %d3,%a2@(20)
the_partition->buffer_size = buffer_size;
the_partition->attribute_set = attribute_set;
the_partition->number_of_used_blocks = 0;
_Chain_Initialize( &the_partition->Memory, starting_address,
54d00: 262e 0014 movel %fp@(20),%d3
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
54d04: 222e 000c movel %fp@(12),%d1
the_partition->length = length; the_partition->buffer_size = buffer_size; the_partition->attribute_set = attribute_set;
54d08: 256e 0018 001c movel %fp@(24),%a2@(28)
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
54d0e: 2541 0010 movel %d1,%a2@(16)
the_partition->length = length;
the_partition->buffer_size = buffer_size;
the_partition->attribute_set = attribute_set;
the_partition->number_of_used_blocks = 0;
_Chain_Initialize( &the_partition->Memory, starting_address,
54d12: 4c43 0000 remul %d3,%d0,%d0
}
#endif
the_partition->starting_address = starting_address;
the_partition->length = length;
the_partition->buffer_size = buffer_size;
54d16: 2543 0018 movel %d3,%a2@(24)
the_partition->attribute_set = attribute_set; the_partition->number_of_used_blocks = 0;
54d1a: 42aa 0020 clrl %a2@(32)
_Chain_Initialize( &the_partition->Memory, starting_address,
54d1e: 2f03 movel %d3,%sp@- 54d20: 2f00 movel %d0,%sp@- 54d22: 2f2e 000c movel %fp@(12),%sp@- 54d26: 486a 0024 pea %a2@(36) 54d2a: 4eb9 0005 82f8 jsr 582f8 <_Chain_Initialize>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
54d30: 202a 0008 movel %a2@(8),%d0
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
54d34: 4281 clrl %d1 54d36: 2079 0007 dbfa moveal 7dbfa <_Partition_Information+0x18>,%a0 54d3c: 3200 movew %d0,%d1 54d3e: 218a 1c00 movel %a2,%a0@(00000000,%d1:l:4)
&_Partition_Information,
&the_partition->Object,
(Objects_Name) name
);
*id = the_partition->Object.id;
54d42: 206e 001c moveal %fp@(28),%a0
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
54d46: 2542 000c movel %d2,%a2@(12) 54d4a: 2080 movel %d0,%a0@
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
54d4c: 4eb9 0005 ad04 jsr 5ad04 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
54d52: 4fef 0010 lea %sp@(16),%sp 54d56: 4280 clrl %d0
}
54d58: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 54d5e: 4e5e unlk %fp 54d60: 4e75 rts
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
_Thread_Enable_dispatch();
54d62: 4eb9 0005 ad04 jsr 5ad04 <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
54d68: 7005 moveq #5,%d0
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
54d6a: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
54d70: 4e5e unlk %fp <== NOT EXECUTED
00054e94 <rtems_partition_return_buffer>:
rtems_status_code rtems_partition_return_buffer(
rtems_id id,
void *buffer
)
{
54e94: 4e56 fff8 linkw %fp,#-8 54e98: 2f03 movel %d3,%sp@- 54e9a: 2f02 movel %d2,%sp@-
RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Partition_Control *)
54e9c: 486e fffc pea %fp@(-4) 54ea0: 2f2e 0008 movel %fp@(8),%sp@- 54ea4: 4879 0007 dbe2 pea 7dbe2 <_Partition_Information> 54eaa: 242e 000c movel %fp@(12),%d2 54eae: 4eb9 0005 9f3c jsr 59f3c <_Objects_Get>
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
54eb4: 4fef 000c lea %sp@(12),%sp 54eb8: 4aae fffc tstl %fp@(-4)
54ebc: 665a bnes 54f18 <rtems_partition_return_buffer+0x84>
)
{
void *starting;
void *ending;
starting = the_partition->starting_address;
54ebe: 2040 moveal %d0,%a0
ending = _Addresses_Add_offset( starting, the_partition->length );
54ec0: 2240 moveal %d0,%a1
)
{
void *starting;
void *ending;
starting = the_partition->starting_address;
54ec2: 2228 0010 movel %a0@(16),%d1
ending = _Addresses_Add_offset( starting, the_partition->length );
54ec6: 2068 0014 moveal %a0@(20),%a0
const void *address,
const void *base,
const void *limit
)
{
return (address >= base && address <= limit);
54eca: b282 cmpl %d2,%d1
54ecc: 6258 bhis 54f26 <rtems_partition_return_buffer+0x92>
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
54ece: 41f0 1800 lea %a0@(00000000,%d1:l),%a0
const void *address,
const void *base,
const void *limit
)
{
return (address >= base && address <= limit);
54ed2: b1c2 cmpal %d2,%a0
54ed4: 6550 bcss 54f26 <rtems_partition_return_buffer+0x92><== NEVER TAKEN
RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract (
const void *left,
const void *right
)
{
return (int32_t) ((const char *) left - (const char *) right);
54ed6: 2602 movel %d2,%d3 54ed8: 9681 subl %d1,%d3 54eda: 2203 movel %d3,%d1
offset = (uint32_t) _Addresses_Subtract(
the_buffer,
the_partition->starting_address
);
return ((offset % the_partition->buffer_size) == 0);
54edc: 41e9 0018 lea %a1@(24),%a0 54ee0: 4c50 1003 remul %a0@,%d3,%d1
starting = the_partition->starting_address;
ending = _Addresses_Add_offset( starting, the_partition->length );
return (
_Addresses_Is_in_range( the_buffer, starting, ending ) &&
54ee4: 4a83 tstl %d3
54ee6: 663e bnes 54f26 <rtems_partition_return_buffer+0x92>
RTEMS_INLINE_ROUTINE void _Partition_Free_buffer (
Partition_Control *the_partition,
Chain_Node *the_buffer
)
{
_Chain_Append( &the_partition->Memory, the_buffer );
54ee8: 2f02 movel %d2,%sp@- 54eea: 4869 0024 pea %a1@(36) 54eee: 2d40 fff8 movel %d0,%fp@(-8) 54ef2: 4eb9 0005 825c jsr 5825c <_Chain_Append>
case OBJECTS_LOCAL:
if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) {
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
54ef8: 202e fff8 movel %fp@(-8),%d0 54efc: 2240 moveal %d0,%a1 54efe: 53a9 0020 subql #1,%a1@(32)
_Thread_Enable_dispatch();
54f02: 4eb9 0005 ad04 jsr 5ad04 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
54f08: 242e fff0 movel %fp@(-16),%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;
54f0c: 508f addql #8,%sp 54f0e: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
54f10: 262e fff4 movel %fp@(-12),%d3 54f14: 4e5e unlk %fp 54f16: 4e75 rts 54f18: 242e fff0 movel %fp@(-16),%d2
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
54f1c: 7004 moveq #4,%d0
}
54f1e: 262e fff4 movel %fp@(-12),%d3 54f22: 4e5e unlk %fp 54f24: 4e75 rts
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
54f26: 4eb9 0005 ad04 jsr 5ad04 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
54f2c: 242e fff0 movel %fp@(-16),%d2
the_partition->number_of_used_blocks -= 1;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
return RTEMS_INVALID_ADDRESS;
54f30: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
54f32: 262e fff4 movel %fp@(-12),%d3 54f36: 4e5e unlk %fp
...
00054278 <rtems_port_external_to_internal>:
rtems_status_code rtems_port_external_to_internal(
rtems_id id,
void *external,
void **internal
)
{
54278: 4e56 fffc linkw %fp,#-4 5427c: 2f0a movel %a2,%sp@- 5427e: 246e 0010 moveal %fp@(16),%a2
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
uint32_t ending;
if ( !internal )
54282: 4a8a tstl %a2
54284: 674c beqs 542d2 <rtems_port_external_to_internal+0x5a>
RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Dual_ported_memory_Control *)
54286: 486e fffc pea %fp@(-4) 5428a: 2f2e 0008 movel %fp@(8),%sp@- 5428e: 4879 0007 dba8 pea 7dba8 <_Dual_ported_memory_Information> 54294: 4eb9 0005 9f3c jsr 59f3c <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
5429a: 4fef 000c lea %sp@(12),%sp 5429e: 4aae fffc tstl %fp@(-4)
542a2: 6624 bnes 542c8 <rtems_port_external_to_internal+0x50>
RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract (
const void *left,
const void *right
)
{
return (int32_t) ((const char *) left - (const char *) right);
542a4: 222e 000c movel %fp@(12),%d1 542a8: 2040 moveal %d0,%a0 542aa: 92a8 0014 subl %a0@(20),%d1
case OBJECTS_LOCAL:
ending = _Addresses_Subtract( external, the_port->external_base );
if ( ending > the_port->length )
542ae: b2a8 0018 cmpl %a0@(24),%d1
542b2: 6328 blss 542dc <rtems_port_external_to_internal+0x64>
*internal = external;
542b4: 24ae 000c movel %fp@(12),%a2@
else
*internal = _Addresses_Add_offset( the_port->internal_base,
ending );
_Thread_Enable_dispatch();
542b8: 4eb9 0005 ad04 jsr 5ad04 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
542be: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
542c0: 246e fff8 moveal %fp@(-8),%a2 542c4: 4e5e unlk %fp 542c6: 4e75 rts 542c8: 246e fff8 moveal %fp@(-8),%a2
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
542cc: 7004 moveq #4,%d0
}
542ce: 4e5e unlk %fp 542d0: 4e75 rts 542d2: 246e fff8 moveal %fp@(-8),%a2
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
uint32_t ending;
if ( !internal )
return RTEMS_INVALID_ADDRESS;
542d6: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
542d8: 4e5e unlk %fp 542da: 4e75 rts
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
542dc: 2040 moveal %d0,%a0 542de: d2a8 0010 addl %a0@(16),%d1 542e2: 2481 movel %d1,%a2@
if ( ending > the_port->length )
*internal = external;
else
*internal = _Addresses_Add_offset( the_port->internal_base,
ending );
_Thread_Enable_dispatch();
542e4: 4eb9 0005 ad04 jsr 5ad04 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
542ea: 4280 clrl %d0 542ec: 60d2 bras 542c0 <rtems_port_external_to_internal+0x48>
...
00054318 <rtems_port_internal_to_external>:
rtems_status_code rtems_port_internal_to_external(
rtems_id id,
void *internal,
void **external
)
{
54318: 4e56 fffc linkw %fp,#-4 5431c: 2f0a movel %a2,%sp@- 5431e: 246e 0010 moveal %fp@(16),%a2
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
uint32_t ending;
if ( !external )
54322: 4a8a tstl %a2
54324: 674c beqs 54372 <rtems_port_internal_to_external+0x5a>
54326: 486e fffc pea %fp@(-4) 5432a: 2f2e 0008 movel %fp@(8),%sp@- 5432e: 4879 0007 dba8 pea 7dba8 <_Dual_ported_memory_Information> 54334: 4eb9 0005 9f3c jsr 59f3c <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
5433a: 4fef 000c lea %sp@(12),%sp 5433e: 4aae fffc tstl %fp@(-4)
54342: 6624 bnes 54368 <rtems_port_internal_to_external+0x50>
RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract (
const void *left,
const void *right
)
{
return (int32_t) ((const char *) left - (const char *) right);
54344: 222e 000c movel %fp@(12),%d1 54348: 2040 moveal %d0,%a0 5434a: 92a8 0010 subl %a0@(16),%d1
case OBJECTS_LOCAL:
ending = _Addresses_Subtract( internal, the_port->internal_base );
if ( ending > the_port->length )
5434e: b2a8 0018 cmpl %a0@(24),%d1
54352: 6328 blss 5437c <rtems_port_internal_to_external+0x64>
*external = internal;
54354: 24ae 000c movel %fp@(12),%a2@
else
*external = _Addresses_Add_offset( the_port->external_base,
ending );
_Thread_Enable_dispatch();
54358: 4eb9 0005 ad04 jsr 5ad04 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
5435e: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
54360: 246e fff8 moveal %fp@(-8),%a2 54364: 4e5e unlk %fp 54366: 4e75 rts 54368: 246e fff8 moveal %fp@(-8),%a2
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
5436c: 7004 moveq #4,%d0
}
5436e: 4e5e unlk %fp 54370: 4e75 rts 54372: 246e fff8 moveal %fp@(-8),%a2
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
uint32_t ending;
if ( !external )
return RTEMS_INVALID_ADDRESS;
54376: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
54378: 4e5e unlk %fp 5437a: 4e75 rts
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
5437c: 2040 moveal %d0,%a0 5437e: d2a8 0014 addl %a0@(20),%d1 54382: 2481 movel %d1,%a2@
if ( ending > the_port->length )
*external = internal;
else
*external = _Addresses_Add_offset( the_port->external_base,
ending );
_Thread_Enable_dispatch();
54384: 4eb9 0005 ad04 jsr 5ad04 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
5438a: 4280 clrl %d0 5438c: 60d2 bras 54360 <rtems_port_internal_to_external+0x48>
...
0004240c <rtems_print_buffer>:
void rtems_print_buffer(
const unsigned char *buffer,
int length
)
{
4240c: 4e56 ff5c linkw %fp,#-164 42410: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 42414: 2a2e 000c movel %fp@(12),%d5
int i, mod, max;
if ( !length ) return;
42418: 6700 00d8 beqw 424f2 <rtems_print_buffer+0xe6>
mod = length % 16;
4241c: 2e05 movel %d5,%d7 4241e: 0287 8000 000f andil #-2147483633,%d7 42424: 6d00 01ca bltw 425f0 <rtems_print_buffer+0x1e4> 42428: 2d47 ff84 movel %d7,%fp@(-124)
max = length - mod;
4242c: 9a87 subl %d7,%d5
for ( i=0 ; i<max ; i+=16 )
4242e: 4a85 tstl %d5 42430: 6f00 00bc blew 424ee <rtems_print_buffer+0xe2> 42434: 262e 0008 movel %fp@(8),%d3 42438: 4284 clrl %d4 4243a: 45ee ff88 lea %fp@(-120),%a2 4243e: 4bf9 0004 fbf4 lea 4fbf4 <sprintf>,%a5 42444: 49f9 0005 0360 lea 50360 <strlen>,%a4 4244a: 2c3c 0004 4128 movel #278824,%d6
{
int i;
char line_buffer[120];
line_buffer[0] = '\0';
42450: 2643 moveal %d3,%a3
for( i=0 ; i<length ; i++ )
42452: 4282 clrl %d2
{
int i;
char line_buffer[120];
line_buffer[0] = '\0';
42454: 4201 clrb %d1 42456: 1d41 ff88 moveb %d1,%fp@(-120)
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
4245a: 4280 clrl %d0 4245c: 101b moveb %a3@+,%d0
int i;
char line_buffer[120];
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
4245e: 5282 addql #1,%d2
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
42460: 2f00 movel %d0,%sp@- 42462: 2f0a movel %a2,%sp@- 42464: 4879 0005 e00f pea 5e00f <map.6435+0x11> 4246a: 2f0a movel %a2,%sp@- 4246c: 4e95 jsr %a5@
int i;
char line_buffer[120];
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
4246e: 4fef 0010 lea %sp@(16),%sp 42472: 7010 moveq #16,%d0 42474: b082 cmpl %d2,%d0
42476: 66e2 bnes 4245a <rtems_print_buffer+0x4e>
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
42478: 2f0a movel %a2,%sp@- 4247a: 2643 moveal %d3,%a3
for( i=0 ; i<length ; i++ )
4247c: 4282 clrl %d2
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
4247e: 4e94 jsr %a4@ 42480: 588f addql #4,%sp 42482: 323c 7c00 movew #31744,%d1 42486: 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 ] : '.' );
4248a: 4280 clrl %d0 4248c: 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,
4248e: 722e moveq #46,%d1
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
42490: 2040 moveal %d0,%a0 42492: 2279 0005 f7ac moveal 5f7ac <__ctype_ptr__>,%a1 42498: 1031 8801 moveb %a1@(00000001,%a0:l),%d0 4249c: 49c0 extbl %d0 4249e: 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,
424a4: 6702 beqs 424a8 <rtems_print_buffer+0x9c>
424a6: 2208 movel %a0,%d1 424a8: 2f01 movel %d1,%sp@-
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
424aa: 5282 addql #1,%d2
sprintf( line_buffer, "%s%c", line_buffer,
424ac: 2f0a movel %a2,%sp@- 424ae: 4879 0005 e017 pea 5e017 <map.6435+0x19> 424b4: 2f0a movel %a2,%sp@- 424b6: 4e95 jsr %a5@
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
424b8: 4fef 0010 lea %sp@(16),%sp 424bc: 7210 moveq #16,%d1 424be: b282 cmpl %d2,%d1
424c0: 66c8 bnes 4248a <rtems_print_buffer+0x7e>
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|\n" );
424c2: 2f0a movel %a2,%sp@-
mod = length % 16;
max = length - mod;
for ( i=0 ; i<max ; i+=16 )
424c4: 0684 0000 0010 addil #16,%d4
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|\n" );
424ca: 4e94 jsr %a4@
mod = length % 16;
max = length - mod;
for ( i=0 ; i<max ; i+=16 )
424cc: 0683 0000 0010 addil #16,%d3
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|\n" );
424d2: 41f2 0800 lea %a2@(00000000,%d0:l),%a0 424d6: 4200 clrb %d0 424d8: 30bc 7c0a movew #31754,%a0@ 424dc: 1140 0002 moveb %d0,%a0@(2)
printk( line_buffer );
424e0: 2046 moveal %d6,%a0 424e2: 2e8a movel %a2,%sp@ 424e4: 4e90 jsr %a0@
mod = length % 16;
max = length - mod;
for ( i=0 ; i<max ; i+=16 )
424e6: 588f addql #4,%sp 424e8: b885 cmpl %d5,%d4 424ea: 6d00 ff64 bltw 42450 <rtems_print_buffer+0x44>
Dump_Line( &buffer[ i ], 16 );
if ( mod )
424ee: 4a87 tstl %d7
424f0: 660a bnes 424fc <rtems_print_buffer+0xf0>
Dump_Line( &buffer[ max ], mod );
}
424f2: 4cee 3cfc ff5c moveml %fp@(-164),%d2-%d7/%a2-%a5 424f8: 4e5e unlk %fp 424fa: 4e75 rts
for ( i=0 ; i<max ; i+=16 )
Dump_Line( &buffer[ i ], 16 );
if ( mod )
Dump_Line( &buffer[ max ], mod );
424fc: 266e 0008 moveal %fp@(8),%a3 42500: d7c5 addal %d5,%a3
{
int i;
char line_buffer[120];
line_buffer[0] = '\0';
42502: 4200 clrb %d0 42504: 1d40 ff88 moveb %d0,%fp@(-120)
for( i=0 ; i<length ; i++ )
42508: 4a87 tstl %d7 4250a: 6f00 010e blew 4261a <rtems_print_buffer+0x20e> 4250e: 284b moveal %a3,%a4 42510: 4282 clrl %d2 42512: 45ee ff88 lea %fp@(-120),%a2 42516: 4bf9 0004 fbf4 lea 4fbf4 <sprintf>,%a5
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
4251c: 4280 clrl %d0 4251e: 101c moveb %a4@+,%d0
int i;
char line_buffer[120];
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
42520: 5282 addql #1,%d2
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
42522: 2f00 movel %d0,%sp@- 42524: 2f0a movel %a2,%sp@- 42526: 4879 0005 e00f pea 5e00f <map.6435+0x11> 4252c: 2f0a movel %a2,%sp@- 4252e: 4e95 jsr %a5@
int i;
char line_buffer[120];
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
42530: 4fef 0010 lea %sp@(16),%sp 42534: be82 cmpl %d2,%d7
42536: 66e4 bnes 4251c <rtems_print_buffer+0x110>
42538: 2407 movel %d7,%d2 4253a: 49f9 0005 0360 lea 50360 <strlen>,%a4
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
42540: 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++ )
42542: 5282 addql #1,%d2
strcat( line_buffer, " " );
42544: 4e94 jsr %a4@ 42546: 588f addql #4,%sp 42548: 223c 2020 2000 movel #538976256,%d1 4254e: 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++ )
42552: 700f moveq #15,%d0 42554: b082 cmpl %d2,%d0
42556: 6ce8 bges 42540 <rtems_print_buffer+0x134>
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
42558: 2f0a movel %a2,%sp@- 4255a: 4eb9 0005 0360 jsr 50360 <strlen> 42560: 588f addql #4,%sp 42562: 323c 7c00 movew #31744,%d1 42566: 3581 0800 movew %d1,%a2@(00000000,%d0:l)
for( i=0 ; i<length ; i++ )
4256a: 4a87 tstl %d7 4256c: 6f00 008e blew 425fc <rtems_print_buffer+0x1f0> 42570: 4282 clrl %d2 42572: 4bf9 0004 fbf4 lea 4fbf4 <sprintf>,%a5
sprintf( line_buffer, "%s%c", line_buffer,
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
42578: 4283 clrl %d3 4257a: 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,
4257c: 722e moveq #46,%d1
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
4257e: 2079 0005 f7ac moveal 5f7ac <__ctype_ptr__>,%a0 42584: 1030 3801 moveb %a0@(00000001,%d3:l),%d0 42588: 49c0 extbl %d0 4258a: 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,
42590: 6702 beqs 42594 <rtems_print_buffer+0x188>
42592: 2203 movel %d3,%d1 42594: 2f01 movel %d1,%sp@-
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
42596: 5282 addql #1,%d2
sprintf( line_buffer, "%s%c", line_buffer,
42598: 2f0a movel %a2,%sp@- 4259a: 4879 0005 e017 pea 5e017 <map.6435+0x19> 425a0: 2f0a movel %a2,%sp@- 425a2: 4e95 jsr %a5@
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
425a4: 4fef 0010 lea %sp@(16),%sp 425a8: be82 cmpl %d2,%d7
425aa: 66cc bnes 42578 <rtems_print_buffer+0x16c>
425ac: 242e ff84 movel %fp@(-124),%d2
sprintf( line_buffer, "%s%c", line_buffer,
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
425b0: 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++ )
425b2: 5282 addql #1,%d2
strcat( line_buffer, " " );
425b4: 4e94 jsr %a4@ 425b6: 588f addql #4,%sp 425b8: 307c 2000 moveaw #8192,%a0 425bc: 3588 0800 movew %a0,%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++ )
425c0: 700f moveq #15,%d0 425c2: b082 cmpl %d2,%d0
425c4: 6cea bges 425b0 <rtems_print_buffer+0x1a4>
strcat( line_buffer, " " );
strcat( line_buffer, "|\n" );
425c6: 2f0a movel %a2,%sp@- 425c8: 4eb9 0005 0360 jsr 50360 <strlen> 425ce: 4201 clrb %d1 425d0: 41f2 0800 lea %a2@(00000000,%d0:l),%a0 425d4: 30bc 7c0a movew #31754,%a0@ 425d8: 1141 0002 moveb %d1,%a0@(2)
printk( line_buffer );
425dc: 2e8a movel %a2,%sp@ 425de: 4eb9 0004 4128 jsr 44128 <printk> 425e4: 588f addql #4,%sp
for ( i=0 ; i<max ; i+=16 )
Dump_Line( &buffer[ i ], 16 );
if ( mod )
Dump_Line( &buffer[ max ], mod );
}
425e6: 4cee 3cfc ff5c moveml %fp@(-164),%d2-%d7/%a2-%a5 425ec: 4e5e unlk %fp 425ee: 4e75 rts
int i, mod, max;
if ( !length ) return;
mod = length % 16;
425f0: 5387 subql #1,%d7 425f2: 70f0 moveq #-16,%d0 425f4: 8e80 orl %d0,%d7 425f6: 5287 addql #1,%d7 425f8: 6000 fe2e braw 42428 <rtems_print_buffer+0x1c>
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, " " );
425fc: 2f0a movel %a2,%sp@- 425fe: 4282 clrl %d2
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++ )
42600: 5282 addql #1,%d2
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
42602: 42ae ff84 clrl %fp@(-124)
sprintf( line_buffer, "%s%c", line_buffer,
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
42606: 4e94 jsr %a4@ 42608: 588f addql #4,%sp 4260a: 307c 2000 moveaw #8192,%a0 4260e: 3588 0800 movew %a0,%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++ )
42612: 700f moveq #15,%d0 42614: b082 cmpl %d2,%d0
42616: 6c98 bges 425b0 <rtems_print_buffer+0x1a4> <== ALWAYS TAKEN
42618: 60ac bras 425c6 <rtems_print_buffer+0x1ba> <== NOT EXECUTED
4261a: 45ee ff88 lea %fp@(-120),%a2 4261e: 49f9 0005 0360 lea 50360 <strlen>,%a4
int i;
char line_buffer[120];
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
42624: 4282 clrl %d2
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
for( ; i<16 ; i++ )
42626: 5282 addql #1,%d2
strcat( line_buffer, " " );
42628: 2f0a movel %a2,%sp@- 4262a: 4e94 jsr %a4@ 4262c: 588f addql #4,%sp 4262e: 223c 2020 2000 movel #538976256,%d1 42634: 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++ )
42638: 700f moveq #15,%d0 4263a: b082 cmpl %d2,%d0 4263c: 6c00 ff02 bgew 42540 <rtems_print_buffer+0x134>
42640: 6000 ff16 braw 42558 <rtems_print_buffer+0x14c> <== NOT EXECUTED
00047970 <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
47970: 4e56 fff8 linkw %fp,#-8 47974: 2f03 movel %d3,%sp@- 47976: 2f02 movel %d2,%sp@-
RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Rate_monotonic_Control *)
47978: 486e fffc pea %fp@(-4) 4797c: 242e 0008 movel %fp@(8),%d2 47980: 2f02 movel %d2,%sp@- 47982: 4879 0006 2e4c pea 62e4c <_Rate_monotonic_Information> 47988: 4eb9 0004 9dd4 jsr 49dd4 <_Objects_Get>
rtems_rate_monotonic_period_states local_state;
ISR_Level level;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
4798e: 4fef 000c lea %sp@(12),%sp 47992: 4aae fffc tstl %fp@(-4)
47996: 6624 bnes 479bc <rtems_rate_monotonic_period+0x4c>
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
47998: 2279 0006 33a4 moveal 633a4 <_Per_CPU_Information+0xc>,%a1 4799e: 2040 moveal %d0,%a0 479a0: b3e8 0040 cmpal %a0@(64),%a1
479a4: 6726 beqs 479cc <rtems_rate_monotonic_period+0x5c>
_Thread_Enable_dispatch();
479a6: 4eb9 0004 ab9c jsr 4ab9c <_Thread_Enable_dispatch>
return RTEMS_NOT_OWNER_OF_RESOURCE;
479ac: 7617 moveq #23,%d3
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
479ae: 2003 movel %d3,%d0 479b0: 242e fff0 movel %fp@(-16),%d2 479b4: 262e fff4 movel %fp@(-12),%d3 479b8: 4e5e unlk %fp 479ba: 4e75 rts
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
479bc: 7604 moveq #4,%d3
}
479be: 2003 movel %d3,%d0 479c0: 242e fff0 movel %fp@(-16),%d2 479c4: 262e fff4 movel %fp@(-12),%d3 479c8: 4e5e unlk %fp 479ca: 4e75 rts
if ( !_Thread_Is_executing( the_period->owner ) ) {
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
479cc: 4aae 000c tstl %fp@(12) 479d0: 6700 008c beqw 47a5e <rtems_rate_monotonic_period+0xee>
}
_Thread_Enable_dispatch();
return( return_value );
}
_ISR_Disable( level );
479d4: 223c 0000 0700 movel #1792,%d1 479da: 40c3 movew %sr,%d3 479dc: 8283 orl %d3,%d1 479de: 46c1 movew %d1,%sr
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
479e0: 2040 moveal %d0,%a0 479e2: 2228 0038 movel %a0@(56),%d1 479e6: 6700 00aa beqw 47a92 <rtems_rate_monotonic_period+0x122>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_ACTIVE ) {
479ea: 7402 moveq #2,%d2 479ec: b481 cmpl %d1,%d2 479ee: 6700 010c beqw 47afc <rtems_rate_monotonic_period+0x18c>
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_EXPIRED ) {
479f2: 7404 moveq #4,%d2 479f4: b481 cmpl %d1,%d2
479f6: 66c4 bnes 479bc <rtems_rate_monotonic_period+0x4c><== NEVER TAKEN
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
479f8: 2f00 movel %d0,%sp@- 479fa: 2d40 fff8 movel %d0,%fp@(-8) 479fe: 4eb9 0004 7856 jsr 47856 <_Rate_monotonic_Update_statistics>
_ISR_Enable( level );
47a04: 46c3 movew %d3,%sr
the_period->state = RATE_MONOTONIC_ACTIVE;
47a06: 7202 moveq #2,%d1
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Scheduler_Release_job(the_period->owner, the_period->next_length);
_Thread_Enable_dispatch();
return RTEMS_TIMEOUT;
47a08: 7606 moveq #6,%d3
*/
_Rate_monotonic_Update_statistics( the_period );
_ISR_Enable( level );
the_period->state = RATE_MONOTONIC_ACTIVE;
47a0a: 202e fff8 movel %fp@(-8),%d0 47a0e: 2040 moveal %d0,%a0
the_period->next_length = length;
47a10: 226e 000c moveal %fp@(12),%a1
*/
_Rate_monotonic_Update_statistics( the_period );
_ISR_Enable( level );
the_period->state = RATE_MONOTONIC_ACTIVE;
47a14: 2141 0038 movel %d1,%a0@(56)
the_period->next_length = length;
47a18: 2149 003c movel %a1,%a0@(60)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
47a1c: 2149 001c movel %a1,%a0@(28)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
47a20: 4868 0010 pea %a0@(16) 47a24: 4879 0006 2ffa pea 62ffa <_Watchdog_Ticks_chain> 47a2a: 4eb9 0004 ba94 jsr 4ba94 <_Watchdog_Insert> 47a30: 202e fff8 movel %fp@(-8),%d0 47a34: 2040 moveal %d0,%a0 47a36: 2f28 003c movel %a0@(60),%sp@- 47a3a: 2f28 0040 movel %a0@(64),%sp@- 47a3e: 2079 0006 1592 moveal 61592 <_Scheduler+0x34>,%a0 47a44: 4e90 jsr %a0@
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Scheduler_Release_job(the_period->owner, the_period->next_length);
_Thread_Enable_dispatch();
47a46: 4eb9 0004 ab9c jsr 4ab9c <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47a4c: 242e fff0 movel %fp@(-16),%d2 47a50: 2003 movel %d3,%d0
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Scheduler_Release_job(the_period->owner, the_period->next_length);
_Thread_Enable_dispatch();
return RTEMS_TIMEOUT;
47a52: 4fef 0014 lea %sp@(20),%sp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47a56: 262e fff4 movel %fp@(-12),%d3 47a5a: 4e5e unlk %fp 47a5c: 4e75 rts
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
switch ( the_period->state ) {
47a5e: 2040 moveal %d0,%a0 47a60: 7204 moveq #4,%d1 47a62: 2028 0038 movel %a0@(56),%d0 47a66: b280 cmpl %d0,%d1
47a68: 651e bcss 47a88 <rtems_rate_monotonic_period+0x118><== NEVER TAKEN
47a6a: 41f9 0006 049a lea 6049a <CSWTCH.2>,%a0 47a70: 2630 0c00 movel %a0@(00000000,%d0:l:4),%d3
case RATE_MONOTONIC_ACTIVE:
default: /* unreached -- only to remove warnings */
return_value = RTEMS_SUCCESSFUL;
break;
}
_Thread_Enable_dispatch();
47a74: 4eb9 0004 ab9c jsr 4ab9c <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47a7a: 2003 movel %d3,%d0 47a7c: 242e fff0 movel %fp@(-16),%d2 47a80: 262e fff4 movel %fp@(-12),%d3 47a84: 4e5e unlk %fp 47a86: 4e75 rts
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
switch ( the_period->state ) {
47a88: 4283 clrl %d3 <== NOT EXECUTED
case RATE_MONOTONIC_ACTIVE:
default: /* unreached -- only to remove warnings */
return_value = RTEMS_SUCCESSFUL;
break;
}
_Thread_Enable_dispatch();
47a8a: 4eb9 0004 ab9c jsr 4ab9c <_Thread_Enable_dispatch> <== NOT EXECUTED 47a90: 60e8 bras 47a7a <rtems_rate_monotonic_period+0x10a><== NOT EXECUTED
return( return_value );
}
_ISR_Disable( level );
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
_ISR_Enable( level );
47a92: 46c3 movew %d3,%sr
the_period->next_length = length;
47a94: 226e 000c moveal %fp@(12),%a1
NULL
);
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
47a98: 4283 clrl %d3
_ISR_Disable( level );
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
_ISR_Enable( level );
the_period->next_length = length;
47a9a: 2149 003c movel %a1,%a0@(60)
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
47a9e: 2f00 movel %d0,%sp@- 47aa0: 2d40 fff8 movel %d0,%fp@(-8) 47aa4: 4eb9 0004 77b0 jsr 477b0 <_Rate_monotonic_Initiate_statistics>
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
47aaa: 202e fff8 movel %fp@(-8),%d0 47aae: 2040 moveal %d0,%a0 47ab0: 43f9 0004 7e14 lea 47e14 <_Rate_monotonic_Timeout>,%a1
the_period->state = RATE_MONOTONIC_ACTIVE;
47ab6: 7202 moveq #2,%d1
the_watchdog->id = id;
47ab8: 2142 0030 movel %d2,%a0@(48)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
47abc: 242e 000c movel %fp@(12),%d2
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
47ac0: 2149 002c movel %a1,%a0@(44)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
47ac4: 2142 001c movel %d2,%a0@(28) 47ac8: 2141 0038 movel %d1,%a0@(56)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
47acc: 42a8 0018 clrl %a0@(24)
the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data;
47ad0: 42a8 0034 clrl %a0@(52)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
47ad4: 4868 0010 pea %a0@(16) 47ad8: 4879 0006 2ffa pea 62ffa <_Watchdog_Ticks_chain> 47ade: 4eb9 0004 ba94 jsr 4ba94 <_Watchdog_Insert>
id,
NULL
);
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
47ae4: 4eb9 0004 ab9c jsr 4ab9c <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47aea: 242e fff0 movel %fp@(-16),%d2 47aee: 2003 movel %d3,%d0
NULL
);
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
47af0: 4fef 000c lea %sp@(12),%sp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47af4: 262e fff4 movel %fp@(-12),%d3 47af8: 4e5e unlk %fp 47afa: 4e75 rts
if ( the_period->state == RATE_MONOTONIC_ACTIVE ) {
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
47afc: 2f00 movel %d0,%sp@- 47afe: 2d40 fff8 movel %d0,%fp@(-8) 47b02: 4eb9 0004 7856 jsr 47856 <_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;
47b08: 202e fff8 movel %fp@(-8),%d0 47b0c: 7201 moveq #1,%d1 47b0e: 2040 moveal %d0,%a0
the_period->next_length = length;
47b10: 226e 000c moveal %fp@(12),%a1
/*
* 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;
47b14: 2141 0038 movel %d1,%a0@(56)
the_period->next_length = length;
47b18: 2149 003c movel %a1,%a0@(60)
_ISR_Enable( level );
47b1c: 46c3 movew %d3,%sr
_Thread_Executing->Wait.id = the_period->Object.id;
47b1e: 2079 0006 33a4 moveal 633a4 <_Per_CPU_Information+0xc>,%a0 47b24: 2240 moveal %d0,%a1 47b26: 5089 addql #8,%a1 47b28: 2151 0020 movel %a1@,%a0@(32)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
47b2c: 4878 4000 pea 4000 <D_MAX_EXP+0x3801> 47b30: 2d40 fff8 movel %d0,%fp@(-8) 47b34: 2f08 movel %a0,%sp@- 47b36: 4eb9 0004 b474 jsr 4b474 <_Thread_Set_state>
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
47b3c: 223c 0000 0700 movel #1792,%d1 47b42: 40c2 movew %sr,%d2 47b44: 8282 orl %d2,%d1 47b46: 46c1 movew %d1,%sr
local_state = the_period->state;
the_period->state = RATE_MONOTONIC_ACTIVE;
47b48: 7602 moveq #2,%d3
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
local_state = the_period->state;
47b4a: 202e fff8 movel %fp@(-8),%d0 47b4e: 2040 moveal %d0,%a0 47b50: 2228 0038 movel %a0@(56),%d1
the_period->state = RATE_MONOTONIC_ACTIVE;
47b54: 2143 0038 movel %d3,%a0@(56)
_ISR_Enable( level );
47b58: 46c2 movew %d2,%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 )
47b5a: 7003 moveq #3,%d0 47b5c: 4fef 000c lea %sp@(12),%sp 47b60: b081 cmpl %d1,%d0
47b62: 6716 beqs 47b7a <rtems_rate_monotonic_period+0x20a>
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
_Thread_Enable_dispatch();
47b64: 4eb9 0004 ab9c jsr 4ab9c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
47b6a: 4283 clrl %d3
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47b6c: 2003 movel %d3,%d0 47b6e: 242e fff0 movel %fp@(-16),%d2 47b72: 262e fff4 movel %fp@(-12),%d3 47b76: 4e5e unlk %fp 47b78: 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 );
47b7a: 4878 4000 pea 4000 <D_MAX_EXP+0x3801>
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
47b7e: 4283 clrl %d3
/*
* 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 );
47b80: 2f39 0006 33a4 movel 633a4 <_Per_CPU_Information+0xc>,%sp@- 47b86: 4eb9 0004 a7a0 jsr 4a7a0 <_Thread_Clear_state> 47b8c: 508f addql #8,%sp
_Thread_Enable_dispatch();
47b8e: 4eb9 0004 ab9c jsr 4ab9c <_Thread_Enable_dispatch> 47b94: 60d6 bras 47b6c <rtems_rate_monotonic_period+0x1fc>
...
00047b98 <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
47b98: 4e56 ff78 linkw %fp,#-136 47b9c: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 47ba0: 262e 0008 movel %fp@(8),%d3 47ba4: 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 )
47ba8: 4a8a tstl %a2
47baa: 677c beqs 47c28 <rtems_rate_monotonic_report_statistics_with_plugin+0x90><== NEVER TAKEN
return;
(*print)( context, "Period information by period\n" );
47bac: 4879 0006 04ae pea 604ae <CSWTCH.2+0x14> 47bb2: 2f03 movel %d3,%sp@- 47bb4: 4e92 jsr %a2@
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
47bb6: 4879 0006 04cc pea 604cc <CSWTCH.2+0x32> 47bbc: 2f03 movel %d3,%sp@- 47bbe: 4e92 jsr %a2@
(*print)( context, "--- Wall times are in seconds ---\n" );
47bc0: 4879 0006 04ee pea 604ee <CSWTCH.2+0x54> 47bc6: 2f03 movel %d3,%sp@- 47bc8: 4e92 jsr %a2@
Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED "
47bca: 4879 0006 0511 pea 60511 <CSWTCH.2+0x77> 47bd0: 2f03 movel %d3,%sp@- 47bd2: 4e92 jsr %a2@
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
47bd4: 4fef 001c lea %sp@(28),%sp 47bd8: 2ebc 0006 055c movel #394588,%sp@ 47bde: 2f03 movel %d3,%sp@- 47be0: 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 ;
47be2: 2439 0006 2e52 movel 62e52 <_Rate_monotonic_Information+0x6>,%d2 47be8: 508f addql #8,%sp 47bea: b4b9 0006 2e56 cmpl 62e56 <_Rate_monotonic_Information+0xa>,%d2
47bf0: 6236 bhis 47c28 <rtems_rate_monotonic_report_statistics_with_plugin+0x90><== NEVER TAKEN
47bf2: 280e movel %fp,%d4
#if defined(RTEMS_DEBUG)
status = rtems_rate_monotonic_get_status( id, &the_status );
if ( status != RTEMS_SUCCESSFUL )
continue;
#else
(void) rtems_rate_monotonic_get_status( id, &the_status );
47bf4: 2c0e movel %fp,%d6
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
47bf6: 2a0e movel %fp,%d5 47bf8: 0684 ffff ffa2 addil #-94,%d4 47bfe: 47f9 0004 e2d8 lea 4e2d8 <rtems_rate_monotonic_get_statistics>,%a3
#if defined(RTEMS_DEBUG)
status = rtems_rate_monotonic_get_status( id, &the_status );
if ( status != RTEMS_SUCCESSFUL )
continue;
#else
(void) rtems_rate_monotonic_get_status( id, &the_status );
47c04: 0686 ffff ffda addil #-38,%d6 47c0a: 4bf9 0004 e3ac lea 4e3ac <rtems_rate_monotonic_get_status>,%a5
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
47c10: 5b85 subql #5,%d5
* 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 );
47c12: 2f04 movel %d4,%sp@- 47c14: 2f02 movel %d2,%sp@- 47c16: 4e93 jsr %a3@
if ( status != RTEMS_SUCCESSFUL )
47c18: 508f addql #8,%sp 47c1a: 4a80 tstl %d0
47c1c: 6714 beqs 47c32 <rtems_rate_monotonic_report_statistics_with_plugin+0x9a>
* 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++ ) {
47c1e: 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 ;
47c20: b4b9 0006 2e56 cmpl 62e56 <_Rate_monotonic_Information+0xa>,%d2
47c26: 63ea blss 47c12 <rtems_rate_monotonic_report_statistics_with_plugin+0x7a>
the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall
);
#endif
}
}
}
47c28: 4cee 3cfc ff78 moveml %fp@(-136),%d2-%d7/%a2-%a5 47c2e: 4e5e unlk %fp 47c30: 4e75 rts
#if defined(RTEMS_DEBUG)
status = rtems_rate_monotonic_get_status( id, &the_status );
if ( status != RTEMS_SUCCESSFUL )
continue;
#else
(void) rtems_rate_monotonic_get_status( id, &the_status );
47c32: 2f06 movel %d6,%sp@-
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 );
47c34: 49f9 0004 b690 lea 4b690 <_Timespec_Divide_by_integer>,%a4
#if defined(RTEMS_DEBUG)
status = rtems_rate_monotonic_get_status( id, &the_status );
if ( status != RTEMS_SUCCESSFUL )
continue;
#else
(void) rtems_rate_monotonic_get_status( id, &the_status );
47c3a: 2f02 movel %d2,%sp@- 47c3c: 4e95 jsr %a5@
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
47c3e: 2f05 movel %d5,%sp@- 47c40: 4878 0005 pea 5 <COMPARE> 47c44: 2f2e ffda movel %fp@(-38),%sp@- 47c48: 4eb9 0004 7f08 jsr 47f08 <rtems_object_get_name>
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
47c4e: 2f2e ffa6 movel %fp@(-90),%sp@- 47c52: 2f2e ffa2 movel %fp@(-94),%sp@- 47c56: 2f05 movel %d5,%sp@- 47c58: 2f02 movel %d2,%sp@- 47c5a: 4879 0006 05a8 pea 605a8 <CSWTCH.2+0x10e> 47c60: 2f03 movel %d3,%sp@- 47c62: 4e92 jsr %a2@
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
47c64: 202e ffa2 movel %fp@(-94),%d0 47c68: 4fef 002c lea %sp@(44),%sp
47c6c: 6618 bnes 47c86 <rtems_rate_monotonic_report_statistics_with_plugin+0xee>
(*print)( context, "\n" );
47c6e: 4879 0005 fb47 pea 5fb47 <rtems_filesystem_table+0x5cf>
* 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++ ) {
47c74: 5282 addql #1,%d2
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
47c76: 2f03 movel %d3,%sp@- 47c78: 4e92 jsr %a2@
continue;
47c7a: 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 ;
47c7c: b4b9 0006 2e56 cmpl 62e56 <_Rate_monotonic_Information+0xa>,%d2
47c82: 638e blss 47c12 <rtems_rate_monotonic_report_statistics_with_plugin+0x7a><== ALWAYS TAKEN
47c84: 60a2 bras 47c28 <rtems_rate_monotonic_report_statistics_with_plugin+0x90><== 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 );
47c86: 486e fff2 pea %fp@(-14)
* 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++ ) {
47c8a: 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 );
47c8c: 2f00 movel %d0,%sp@- 47c8e: 486e ffba pea %fp@(-70) 47c92: 4e94 jsr %a4@
(*print)( context,
47c94: 202e fff6 movel %fp@(-10),%d0 47c98: 223c 0000 03e8 movel #1000,%d1 47c9e: 4c41 0800 remsl %d1,%d0,%d0 47ca2: 2e2e ffb6 movel %fp@(-74),%d7 47ca6: 2f00 movel %d0,%sp@- 47ca8: 2001 movel %d1,%d0 47caa: 2f2e fff2 movel %fp@(-14),%sp@- 47cae: 4c40 7807 remsl %d0,%d7,%d7 47cb2: 202e ffae movel %fp@(-82),%d0 47cb6: 2247 moveal %d7,%a1 47cb8: 223c 0000 03e8 movel #1000,%d1 47cbe: 2f09 movel %a1,%sp@- 47cc0: 2f2e ffb2 movel %fp@(-78),%sp@- 47cc4: 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,
47cc8: 2e3c 0000 03e8 movel #1000,%d7
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,
47cce: 2f00 movel %d0,%sp@- 47cd0: 2f2e ffaa movel %fp@(-86),%sp@- 47cd4: 4879 0006 05bf pea 605bf <CSWTCH.2+0x125> 47cda: 2f03 movel %d3,%sp@- 47cdc: 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);
47cde: 4fef 002c lea %sp@(44),%sp 47ce2: 486e fff2 pea %fp@(-14) 47ce6: 2f2e ffa2 movel %fp@(-94),%sp@- 47cea: 486e ffd2 pea %fp@(-46) 47cee: 4e94 jsr %a4@
(*print)( context,
47cf0: 202e fff6 movel %fp@(-10),%d0 47cf4: 4c47 0800 remsl %d7,%d0,%d0 47cf8: 222e ffce movel %fp@(-50),%d1 47cfc: 2f00 movel %d0,%sp@- 47cfe: 2f2e fff2 movel %fp@(-14),%sp@- 47d02: 4c47 1801 remsl %d7,%d1,%d1 47d06: 202e ffc6 movel %fp@(-58),%d0 47d0a: 2241 moveal %d1,%a1 47d0c: 2f09 movel %a1,%sp@- 47d0e: 2f2e ffca movel %fp@(-54),%sp@- 47d12: 4c47 0800 remsl %d7,%d0,%d0 47d16: 2f00 movel %d0,%sp@- 47d18: 2f2e ffc2 movel %fp@(-62),%sp@- 47d1c: 4879 0006 05de pea 605de <CSWTCH.2+0x144> 47d22: 2f03 movel %d3,%sp@- 47d24: 4e92 jsr %a2@ 47d26: 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 ;
47d2a: b4b9 0006 2e56 cmpl 62e56 <_Rate_monotonic_Information+0xa>,%d2 47d30: 6300 fee0 blsw 47c12 <rtems_rate_monotonic_report_statistics_with_plugin+0x7a>
47d34: 6000 fef2 braw 47c28 <rtems_rate_monotonic_report_statistics_with_plugin+0x90><== NOT EXECUTED
00047d50 <rtems_rate_monotonic_reset_all_statistics>:
/*
* rtems_rate_monotonic_reset_all_statistics
*/
void rtems_rate_monotonic_reset_all_statistics( void )
{
47d50: 4e56 0000 linkw %fp,#0
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
47d54: 2039 0006 2f42 movel 62f42 <_Thread_Dispatch_disable_level>,%d0 47d5a: 5280 addql #1,%d0 47d5c: 2f0a movel %a2,%sp@- 47d5e: 23c0 0006 2f42 movel %d0,62f42 <_Thread_Dispatch_disable_level>
return _Thread_Dispatch_disable_level;
47d64: 2039 0006 2f42 movel 62f42 <_Thread_Dispatch_disable_level>,%d0 47d6a: 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 ;
47d6c: 2439 0006 2e52 movel 62e52 <_Rate_monotonic_Information+0x6>,%d2 47d72: b4b9 0006 2e56 cmpl 62e56 <_Rate_monotonic_Information+0xa>,%d2
47d78: 6216 bhis 47d90 <rtems_rate_monotonic_reset_all_statistics+0x40><== NEVER TAKEN
47d7a: 45f9 0004 7da0 lea 47da0 <rtems_rate_monotonic_reset_statistics>,%a2
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
(void) rtems_rate_monotonic_reset_statistics( id );
47d80: 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++ ) {
47d82: 5282 addql #1,%d2
(void) rtems_rate_monotonic_reset_statistics( id );
47d84: 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 ;
47d86: 588f addql #4,%sp 47d88: b4b9 0006 2e56 cmpl 62e56 <_Rate_monotonic_Information+0xa>,%d2
47d8e: 63f0 blss 47d80 <rtems_rate_monotonic_reset_all_statistics+0x30>
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
}
47d90: 242e fff8 movel %fp@(-8),%d2 47d94: 246e fffc moveal %fp@(-4),%a2 47d98: 4e5e unlk %fp
}
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
47d9a: 4ef9 0004 ab9c jmp 4ab9c <_Thread_Enable_dispatch>
00055a80 <rtems_region_extend>:
rtems_status_code rtems_region_extend(
rtems_id id,
void *starting_address,
uintptr_t length
)
{
55a80: 4e56 fff8 linkw %fp,#-8 55a84: 2f0a movel %a2,%sp@- 55a86: 2f02 movel %d2,%sp@- 55a88: 242e 000c movel %fp@(12),%d2
bool extend_ok;
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
if ( !starting_address )
55a8c: 6700 0086 beqw 55b14 <rtems_region_extend+0x94>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
55a90: 2f39 0007 ddec movel 7ddec <_RTEMS_Allocator_Mutex>,%sp@- 55a96: 4eb9 0005 81c4 jsr 581c4 <_API_Mutex_Lock>
RTEMS_INLINE_ROUTINE Region_Control *_Region_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Region_Control *)
55a9c: 486e fffc pea %fp@(-4) 55aa0: 2f2e 0008 movel %fp@(8),%sp@- 55aa4: 4879 0007 dc56 pea 7dc56 <_Region_Information> 55aaa: 4eb9 0005 9f00 jsr 59f00 <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
55ab0: 4fef 0010 lea %sp@(16),%sp 55ab4: 2440 moveal %d0,%a2 55ab6: 4aae fffc tstl %fp@(-4)
55aba: 6646 bnes 55b02 <rtems_region_extend+0x82>
case OBJECTS_LOCAL:
extend_ok = _Heap_Extend(
55abc: 486e fff8 pea %fp@(-8) 55ac0: 2f2e 0010 movel %fp@(16),%sp@- 55ac4: 2f02 movel %d2,%sp@- 55ac6: 486a 0068 pea %a2@(104) 55aca: 4eb9 0005 8fc4 jsr 58fc4 <_Heap_Extend>
starting_address,
length,
&amount_extended
);
if ( extend_ok ) {
55ad0: 4fef 0010 lea %sp@(16),%sp 55ad4: 4a00 tstb %d0
55ad6: 674c beqs 55b24 <rtems_region_extend+0xa4>
the_region->length += amount_extended;
55ad8: 202e fff8 movel %fp@(-8),%d0 55adc: d1aa 0054 addl %d0,%a2@(84)
the_region->maximum_segment_size += amount_extended;
return_status = RTEMS_SUCCESSFUL;
55ae0: 4282 clrl %d2
&amount_extended
);
if ( extend_ok ) {
the_region->length += amount_extended;
the_region->maximum_segment_size += amount_extended;
55ae2: d1aa 005c addl %d0,%a2@(92)
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
55ae6: 2f39 0007 ddec movel 7ddec <_RTEMS_Allocator_Mutex>,%sp@- 55aec: 4eb9 0005 8224 jsr 58224 <_API_Mutex_Unlock>
return return_status;
55af2: 588f addql #4,%sp
}
55af4: 2002 movel %d2,%d0 55af6: 242e fff0 movel %fp@(-16),%d2 55afa: 246e fff4 moveal %fp@(-12),%a2 55afe: 4e5e unlk %fp 55b00: 4e75 rts
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
55b02: 2f39 0007 ddec movel 7ddec <_RTEMS_Allocator_Mutex>,%sp@-
break;
#endif
case OBJECTS_ERROR:
default:
return_status = RTEMS_INVALID_ID;
55b08: 7404 moveq #4,%d2
break;
}
_RTEMS_Unlock_allocator();
55b0a: 4eb9 0005 8224 jsr 58224 <_API_Mutex_Unlock>
return return_status;
55b10: 588f addql #4,%sp 55b12: 60e0 bras 55af4 <rtems_region_extend+0x74>
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
if ( !starting_address )
return RTEMS_INVALID_ADDRESS;
55b14: 7409 moveq #9,%d2
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
55b16: 2002 movel %d2,%d0 55b18: 242e fff0 movel %fp@(-16),%d2 55b1c: 246e fff4 moveal %fp@(-12),%a2 55b20: 4e5e unlk %fp 55b22: 4e75 rts
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
55b24: 2f39 0007 ddec movel 7ddec <_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;
55b2a: 7409 moveq #9,%d2
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
55b2c: 4eb9 0005 8224 jsr 58224 <_API_Mutex_Unlock>
return return_status;
55b32: 588f addql #4,%sp 55b34: 60be bras 55af4 <rtems_region_extend+0x74>
...
00055bd0 <rtems_region_get_information>:
rtems_status_code rtems_region_get_information(
rtems_id id,
Heap_Information_block *the_info
)
{
55bd0: 4e56 fffc linkw %fp,#-4 55bd4: 2f02 movel %d2,%sp@- 55bd6: 242e 000c movel %fp@(12),%d2
Objects_Locations location;
rtems_status_code return_status;
register Region_Control *the_region;
if ( !the_info )
55bda: 6766 beqs 55c42 <rtems_region_get_information+0x72><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
55bdc: 2f39 0007 ddec movel 7ddec <_RTEMS_Allocator_Mutex>,%sp@- 55be2: 4eb9 0005 81c4 jsr 581c4 <_API_Mutex_Lock> 55be8: 486e fffc pea %fp@(-4) 55bec: 2f2e 0008 movel %fp@(8),%sp@- 55bf0: 4879 0007 dc56 pea 7dc56 <_Region_Information> 55bf6: 4eb9 0005 9f00 jsr 59f00 <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
55bfc: 4fef 0010 lea %sp@(16),%sp 55c00: 4aae fffc tstl %fp@(-4)
55c04: 662a bnes 55c30 <rtems_region_get_information+0x60>
case OBJECTS_LOCAL:
_Heap_Get_information( &the_region->Memory, the_info );
55c06: 2f02 movel %d2,%sp@- 55c08: 2040 moveal %d0,%a0 55c0a: 4868 0068 pea %a0@(104)
return_status = RTEMS_SUCCESSFUL;
55c0e: 4282 clrl %d2
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_Heap_Get_information( &the_region->Memory, the_info );
55c10: 4eb9 0005 93fc jsr 593fc <_Heap_Get_information>
return_status = RTEMS_SUCCESSFUL;
break;
55c16: 508f addql #8,%sp
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
55c18: 2f39 0007 ddec movel 7ddec <_RTEMS_Allocator_Mutex>,%sp@- 55c1e: 4eb9 0005 8224 jsr 58224 <_API_Mutex_Unlock>
return return_status;
55c24: 588f addql #4,%sp
}
55c26: 2002 movel %d2,%d0 55c28: 242e fff8 movel %fp@(-8),%d2 55c2c: 4e5e unlk %fp 55c2e: 4e75 rts
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
55c30: 2f39 0007 ddec movel 7ddec <_RTEMS_Allocator_Mutex>,%sp@-
break;
#endif
case OBJECTS_ERROR:
default:
return_status = RTEMS_INVALID_ID;
55c36: 7404 moveq #4,%d2
break;
}
_RTEMS_Unlock_allocator();
55c38: 4eb9 0005 8224 jsr 58224 <_API_Mutex_Unlock>
return return_status;
55c3e: 588f addql #4,%sp 55c40: 60e4 bras 55c26 <rtems_region_get_information+0x56>
Objects_Locations location;
rtems_status_code return_status;
register Region_Control *the_region;
if ( !the_info )
return RTEMS_INVALID_ADDRESS;
55c42: 7409 moveq #9,%d2
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
55c44: 2002 movel %d2,%d0 55c46: 242e fff8 movel %fp@(-8),%d2 55c4a: 4e5e unlk %fp
...
00055dc0 <rtems_region_get_segment_size>:
rtems_status_code rtems_region_get_segment_size(
rtems_id id,
void *segment,
uintptr_t *size
)
{
55dc0: 4e56 fff8 linkw %fp,#-8 55dc4: 2f03 movel %d3,%sp@- 55dc6: 262e 0010 movel %fp@(16),%d3 55dca: 2f02 movel %d2,%sp@- 55dcc: 242e 000c movel %fp@(12),%d2
Objects_Locations location;
rtems_status_code return_status = RTEMS_SUCCESSFUL;
register Region_Control *the_region;
if ( !segment )
55dd0: 676a beqs 55e3c <rtems_region_get_segment_size+0x7c>
return RTEMS_INVALID_ADDRESS;
if ( !size )
55dd2: 4a83 tstl %d3
55dd4: 6766 beqs 55e3c <rtems_region_get_segment_size+0x7c>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
55dd6: 2f39 0007 ddec movel 7ddec <_RTEMS_Allocator_Mutex>,%sp@- 55ddc: 4eb9 0005 81c4 jsr 581c4 <_API_Mutex_Lock> 55de2: 486e fffc pea %fp@(-4) 55de6: 2f2e 0008 movel %fp@(8),%sp@- 55dea: 4879 0007 dc56 pea 7dc56 <_Region_Information> 55df0: 4eb9 0005 9f00 jsr 59f00 <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
55df6: 222e fffc movel %fp@(-4),%d1 55dfa: 4fef 0010 lea %sp@(16),%sp
55dfe: 664a bnes 55e4a <rtems_region_get_segment_size+0x8a>
case OBJECTS_LOCAL:
if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) )
55e00: 2f03 movel %d3,%sp@- 55e02: 2040 moveal %d0,%a0 55e04: 2f02 movel %d2,%sp@- 55e06: 4868 0068 pea %a0@(104) 55e0a: 4eb9 0005 9914 jsr 59914 <_Heap_Size_of_alloc_area> 55e10: 4fef 000c lea %sp@(12),%sp 55e14: 4a00 tstb %d0
55e16: 676c beqs 55e84 <rtems_region_get_segment_size+0xc4><== NEVER TAKEN
void *segment,
uintptr_t *size
)
{
Objects_Locations location;
rtems_status_code return_status = RTEMS_SUCCESSFUL;
55e18: 4280 clrl %d0
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
55e1a: 2f39 0007 ddec movel 7ddec <_RTEMS_Allocator_Mutex>,%sp@- 55e20: 2d40 fff8 movel %d0,%fp@(-8) 55e24: 4eb9 0005 8224 jsr 58224 <_API_Mutex_Unlock>
return return_status;
55e2a: 202e fff8 movel %fp@(-8),%d0 55e2e: 588f addql #4,%sp
}
55e30: 242e fff0 movel %fp@(-16),%d2 55e34: 262e fff4 movel %fp@(-12),%d3 55e38: 4e5e unlk %fp 55e3a: 4e75 rts 55e3c: 242e fff0 movel %fp@(-16),%d2
if ( !segment )
return RTEMS_INVALID_ADDRESS;
if ( !size )
return RTEMS_INVALID_ADDRESS;
55e40: 7009 moveq #9,%d0
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
55e42: 262e fff4 movel %fp@(-12),%d3 55e46: 4e5e unlk %fp 55e48: 4e75 rts
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
the_region = _Region_Get( id, &location );
switch ( location ) {
55e4a: 7001 moveq #1,%d0 55e4c: b081 cmpl %d1,%d0
55e4e: 671a beqs 55e6a <rtems_region_get_segment_size+0xaa><== ALWAYS TAKEN
void *segment,
uintptr_t *size
)
{
Objects_Locations location;
rtems_status_code return_status = RTEMS_SUCCESSFUL;
55e50: 4200 clrb %d0 <== NOT EXECUTED
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
55e52: 2f39 0007 ddec movel 7ddec <_RTEMS_Allocator_Mutex>,%sp@- <== NOT EXECUTED 55e58: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED 55e5c: 4eb9 0005 8224 jsr 58224 <_API_Mutex_Unlock> <== NOT EXECUTED
return return_status;
55e62: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED 55e66: 588f addql #4,%sp <== NOT EXECUTED 55e68: 60c6 bras 55e30 <rtems_region_get_segment_size+0x70><== NOT EXECUTED
case OBJECTS_REMOTE: /* this error cannot be returned */
break;
#endif
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
55e6a: 7004 moveq #4,%d0
break;
}
_RTEMS_Unlock_allocator();
55e6c: 2f39 0007 ddec movel 7ddec <_RTEMS_Allocator_Mutex>,%sp@- 55e72: 2d40 fff8 movel %d0,%fp@(-8) 55e76: 4eb9 0005 8224 jsr 58224 <_API_Mutex_Unlock>
return return_status;
55e7c: 202e fff8 movel %fp@(-8),%d0 55e80: 588f addql #4,%sp 55e82: 60ac bras 55e30 <rtems_region_get_segment_size+0x70>
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;
55e84: 7009 moveq #9,%d0 <== NOT EXECUTED
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
55e86: 2f39 0007 ddec movel 7ddec <_RTEMS_Allocator_Mutex>,%sp@- <== NOT EXECUTED 55e8c: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED 55e90: 4eb9 0005 8224 jsr 58224 <_API_Mutex_Unlock> <== NOT EXECUTED
return return_status;
55e96: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED 55e9a: 588f addql #4,%sp <== NOT EXECUTED 55e9c: 6092 bras 55e30 <rtems_region_get_segment_size+0x70><== NOT EXECUTED
...
00055f9c <rtems_region_return_segment>:
rtems_status_code rtems_region_return_segment(
rtems_id id,
void *segment
)
{
55f9c: 4e56 fffc linkw %fp,#-4 55fa0: 2f0a movel %a2,%sp@- 55fa2: 2f02 movel %d2,%sp@-
uint32_t size;
#endif
int status;
register Region_Control *the_region;
_RTEMS_Lock_allocator();
55fa4: 2f39 0007 ddec movel 7ddec <_RTEMS_Allocator_Mutex>,%sp@- 55faa: 4eb9 0005 81c4 jsr 581c4 <_API_Mutex_Lock> 55fb0: 486e fffc pea %fp@(-4) 55fb4: 2f2e 0008 movel %fp@(8),%sp@- 55fb8: 4879 0007 dc56 pea 7dc56 <_Region_Information> 55fbe: 4eb9 0005 9f00 jsr 59f00 <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
55fc4: 4fef 0010 lea %sp@(16),%sp 55fc8: 2440 moveal %d0,%a2 55fca: 4aae fffc tstl %fp@(-4)
55fce: 6632 bnes 56002 <rtems_region_return_segment+0x66><== NEVER TAKEN
RTEMS_INLINE_ROUTINE bool _Region_Free_segment (
Region_Control *the_region,
void *the_segment
)
{
return _Heap_Free( &the_region->Memory, the_segment );
55fd0: 2f2e 000c movel %fp@(12),%sp@- 55fd4: 486a 0068 pea %a2@(104) 55fd8: 4eb9 0005 9220 jsr 59220 <_Heap_Free>
#endif
status = _Region_Free_segment( the_region, segment );
_Region_Debug_Walk( the_region, 4 );
if ( !status )
55fde: 508f addql #8,%sp 55fe0: 4a00 tstb %d0
55fe2: 6630 bnes 56014 <rtems_region_return_segment+0x78>
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
55fe4: 2f39 0007 ddec movel 7ddec <_RTEMS_Allocator_Mutex>,%sp@-
status = _Region_Free_segment( the_region, segment );
_Region_Debug_Walk( the_region, 4 );
if ( !status )
return_status = RTEMS_INVALID_ADDRESS;
55fea: 7409 moveq #9,%d2
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
55fec: 4eb9 0005 8224 jsr 58224 <_API_Mutex_Unlock>
return return_status;
55ff2: 588f addql #4,%sp
}
55ff4: 2002 movel %d2,%d0 55ff6: 242e fff4 movel %fp@(-12),%d2 55ffa: 246e fff8 moveal %fp@(-8),%a2 55ffe: 4e5e unlk %fp 56000: 4e75 rts
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
56002: 2f39 0007 ddec movel 7ddec <_RTEMS_Allocator_Mutex>,%sp@-
break;
#endif
case OBJECTS_ERROR:
default:
return_status = RTEMS_INVALID_ID;
56008: 7404 moveq #4,%d2
break;
}
_RTEMS_Unlock_allocator();
5600a: 4eb9 0005 8224 jsr 58224 <_API_Mutex_Unlock>
return return_status;
56010: 588f addql #4,%sp 56012: 60e0 bras 55ff4 <rtems_region_return_segment+0x58>
_Region_Debug_Walk( the_region, 4 );
if ( !status )
return_status = RTEMS_INVALID_ADDRESS;
else {
the_region->number_of_used_blocks -= 1;
56014: 53aa 0064 subql #1,%a2@(100)
_Region_Process_queue(the_region); /* unlocks allocator */
return RTEMS_SUCCESSFUL;
56018: 4282 clrl %d2
if ( !status )
return_status = RTEMS_INVALID_ADDRESS;
else {
the_region->number_of_used_blocks -= 1;
_Region_Process_queue(the_region); /* unlocks allocator */
5601a: 2f0a movel %a2,%sp@- 5601c: 4eb9 0005 e5fc jsr 5e5fc <_Region_Process_queue>
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
56022: 246e fff8 moveal %fp@(-8),%a2 56026: 2002 movel %d2,%d0
else {
the_region->number_of_used_blocks -= 1;
_Region_Process_queue(the_region); /* unlocks allocator */
return RTEMS_SUCCESSFUL;
56028: 588f addql #4,%sp
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
5602a: 242e fff4 movel %fp@(-12),%d2 5602e: 4e5e unlk %fp
...
0005a854 <rtems_rfs_bitmap_create_search>:
int
rtems_rfs_bitmap_create_search (rtems_rfs_bitmap_control* control)
{
5a854: 4e56 ffdc linkw %fp,#-36 5a858: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@
rtems_rfs_bitmap_map map;
size_t size;
rtems_rfs_bitmap_bit bit;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
5a85c: 486e fffc pea %fp@(-4)
return 0;
}
int
rtems_rfs_bitmap_create_search (rtems_rfs_bitmap_control* control)
{
5a860: 246e 0008 moveal %fp@(8),%a2
rtems_rfs_bitmap_map map;
size_t size;
rtems_rfs_bitmap_bit bit;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
5a864: 2f0a movel %a2,%sp@- 5a866: 4eba f9fc jsr %pc@(5a264 <rtems_rfs_bitmap_load_map>)
if (rc > 0)
5a86a: 508f addql #8,%sp 5a86c: 4a80 tstl %d0
5a86e: 6f0a bles 5a87a <rtems_rfs_bitmap_create_search+0x26><== ALWAYS TAKEN
bit++;
map++;
}
return 0;
}
5a870: 4cee 1c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a4 <== NOT EXECUTED 5a876: 4e5e unlk %fp <== NOT EXECUTED 5a878: 4e75 rts <== NOT EXECUTED
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
control->free = 0;
5a87a: 42aa 0010 clrl %a2@(16)
search_map = control->search_bits;
5a87e: 286a 0014 moveal %a2@(20),%a4
size = control->size;
5a882: 226a 000c moveal %a2@(12),%a1
bit = 0;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
5a886: 70ff moveq #-1,%d0 5a888: 2880 movel %d0,%a4@
while (size)
5a88a: 4a89 tstl %a1
5a88c: 6748 beqs 5a8d6 <rtems_rfs_bitmap_create_search+0x82><== NEVER TAKEN
5a88e: 266e fffc moveal %fp@(-4),%a3
return rc;
control->free = 0;
search_map = control->search_bits;
size = control->size;
bit = 0;
5a892: 4284 clrl %d4
rtems_rfs_bitmap_element
rtems_rfs_bitmap_mask (unsigned int size)
{
rtems_rfs_bitmap_element mask = RTEMS_RFS_BITMAP_ELEMENT_FULL_MASK;
mask >>= (rtems_rfs_bitmap_element_bits () - size);
5a894: 7cff moveq #-1,%d6
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
5a896: 7601 moveq #1,%d3
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
while (size)
{
rtems_rfs_bitmap_element bits;
int available;
if (size < rtems_rfs_bitmap_element_bits ())
5a898: 701f moveq #31,%d0 5a89a: b089 cmpl %a1,%d0
5a89c: 6544 bcss 5a8e2 <rtems_rfs_bitmap_create_search+0x8e>
rtems_rfs_bitmap_element
rtems_rfs_bitmap_mask (unsigned int size)
{
rtems_rfs_bitmap_element mask = RTEMS_RFS_BITMAP_ELEMENT_FULL_MASK;
mask >>= (rtems_rfs_bitmap_element_bits () - size);
5a89e: 103c 0020 moveb #32,%d0 5a8a2: 9089 subl %a1,%d0 5a8a4: 2406 movel %d6,%d2 5a8a6: e0aa lsrl %d0,%d2
if (size < rtems_rfs_bitmap_element_bits ())
{
bits = rtems_rfs_bitmap_merge (*map,
RTEMS_RFS_BITMAP_ELEMENT_SET,
rtems_rfs_bitmap_mask_section (0, size));
available = size;
5a8a8: 2049 moveal %a1,%a0 5a8aa: 2a09 movel %a1,%d5
{
/*
* Use the normal bit operators because we do not change the bits just merge
* the 2 separate parts.
*/
bits1 &= mask;
5a8ac: c493 andl %a3@,%d2
{
bits = *map;
available = rtems_rfs_bitmap_element_bits ();
}
if (rtems_rfs_bitmap_match (bits, RTEMS_RFS_BITMAP_ELEMENT_SET))
5a8ae: 4a82 tstl %d2
5a8b0: 6714 beqs 5a8c6 <rtems_rfs_bitmap_create_search+0x72>
5a8b2: 4280 clrl %d0
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
5a8b4: 2203 movel %d3,%d1 5a8b6: e1a9 lsll %d0,%d1
if (rtems_rfs_bitmap_match (bits, RTEMS_RFS_BITMAP_ELEMENT_SET))
rtems_rfs_bitmap_set (*search_map, bit);
else
{
int b;
for (b = 0; b < available; b++)
5a8b8: 5280 addql #1,%d0
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
5a8ba: c282 andl %d2,%d1
rtems_rfs_bitmap_set (*search_map, bit);
else
{
int b;
for (b = 0; b < available; b++)
if (!rtems_rfs_bitmap_test (bits, b))
5a8bc: 6704 beqs 5a8c2 <rtems_rfs_bitmap_create_search+0x6e>
control->free++;
5a8be: 52aa 0010 addql #1,%a2@(16)
if (rtems_rfs_bitmap_match (bits, RTEMS_RFS_BITMAP_ELEMENT_SET))
rtems_rfs_bitmap_set (*search_map, bit);
else
{
int b;
for (b = 0; b < available; b++)
5a8c2: b088 cmpl %a0,%d0
5a8c4: 6dee blts 5a8b4 <rtems_rfs_bitmap_create_search+0x60>
if (!rtems_rfs_bitmap_test (bits, b))
control->free++;
}
size -= available;
5a8c6: 93c5 subal %d5,%a1
if (bit == rtems_rfs_bitmap_element_bits ())
5a8c8: 7020 moveq #32,%d0 5a8ca: b084 cmpl %d4,%d0
5a8cc: 671e beqs 5a8ec <rtems_rfs_bitmap_create_search+0x98><== NEVER TAKEN
bit = 0;
search_map++;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
}
else
bit++;
5a8ce: 5284 addql #1,%d4 5a8d0: 588b addql #4,%a3
search_map = control->search_bits;
size = control->size;
bit = 0;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
while (size)
5a8d2: 4a89 tstl %a1
5a8d4: 66c2 bnes 5a898 <rtems_rfs_bitmap_create_search+0x44>
else
bit++;
map++;
}
return 0;
5a8d6: 4280 clrl %d0
}
5a8d8: 4cee 1c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a4 5a8de: 4e5e unlk %fp 5a8e0: 4e75 rts
rtems_rfs_bitmap_mask_section (0, size));
available = size;
}
else
{
bits = *map;
5a8e2: 2413 movel %a3@,%d2 5a8e4: 7a20 moveq #32,%d5
available = rtems_rfs_bitmap_element_bits ();
5a8e6: 307c 0020 moveaw #32,%a0 5a8ea: 60c2 bras 5a8ae <rtems_rfs_bitmap_create_search+0x5a>
if (bit == rtems_rfs_bitmap_element_bits ())
{
bit = 0;
search_map++;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
5a8ec: 70ff moveq #-1,%d0 <== NOT EXECUTED
size -= available;
if (bit == rtems_rfs_bitmap_element_bits ())
{
bit = 0;
5a8ee: 4284 clrl %d4 <== NOT EXECUTED
search_map++;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
}
else
bit++;
5a8f0: 588b addql #4,%a3 <== NOT EXECUTED
if (bit == rtems_rfs_bitmap_element_bits ())
{
bit = 0;
search_map++;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
5a8f2: 2940 0004 movel %d0,%a4@(4) <== NOT EXECUTED
size -= available;
if (bit == rtems_rfs_bitmap_element_bits ())
{
bit = 0;
search_map++;
5a8f6: 588c addql #4,%a4 <== NOT EXECUTED
search_map = control->search_bits;
size = control->size;
bit = 0;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
while (size)
5a8f8: 4a89 tstl %a1 <== NOT EXECUTED 5a8fa: 669c bnes 5a898 <rtems_rfs_bitmap_create_search+0x44><== NOT EXECUTED 5a8fc: 60d8 bras 5a8d6 <rtems_rfs_bitmap_create_search+0x82><== NOT EXECUTED
0005a264 <rtems_rfs_bitmap_load_map>:
* @return int The error number (errno). No error if 0.
*/
static int
rtems_rfs_bitmap_load_map (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_map* map)
{
5a264: 4e56 0000 linkw %fp,#0 5a268: 2f0b movel %a3,%sp@- 5a26a: 266e 000c moveal %fp@(12),%a3 5a26e: 2f0a movel %a2,%sp@- 5a270: 246e 0008 moveal %fp@(8),%a2
int rc;
if (!control->buffer)
5a274: 4a92 tstl %a2@
5a276: 6734 beqs 5a2ac <rtems_rfs_bitmap_load_map+0x48> <== NEVER TAKEN
return ENXIO;
*map = NULL;
rc = rtems_rfs_buffer_handle_request (control->fs,
5a278: 4878 0001 pea 1 <ADD> 5a27c: 2f2a 0008 movel %a2@(8),%sp@-
int rc;
if (!control->buffer)
return ENXIO;
*map = NULL;
5a280: 4293 clrl %a3@
rc = rtems_rfs_buffer_handle_request (control->fs,
5a282: 2f12 movel %a2@,%sp@- 5a284: 2f2a 0004 movel %a2@(4),%sp@- 5a288: 4eb9 0005 bd6e jsr 5bd6e <rtems_rfs_buffer_handle_request>
control->buffer,
control->block,
true);
if (rc)
5a28e: 4fef 0010 lea %sp@(16),%sp 5a292: 4a80 tstl %d0
5a294: 660a bnes 5a2a0 <rtems_rfs_bitmap_load_map+0x3c> <== NEVER TAKEN
return rc;
*map = rtems_rfs_buffer_data (control->buffer);
5a296: 2052 moveal %a2@,%a0 5a298: 2068 0006 moveal %a0@(6),%a0 5a29c: 26a8 001e movel %a0@(30),%a3@
return 0; }
5a2a0: 246e fff8 moveal %fp@(-8),%a2 5a2a4: 266e fffc moveal %fp@(-4),%a3 5a2a8: 4e5e unlk %fp 5a2aa: 4e75 rts
5a2ac: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED
rtems_rfs_bitmap_map* map)
{
int rc;
if (!control->buffer)
return ENXIO;
5a2b0: 7006 moveq #6,%d0 <== NOT EXECUTED
if (rc)
return rc;
*map = rtems_rfs_buffer_data (control->buffer);
return 0;
}
5a2b2: 266e fffc moveal %fp@(-4),%a3 <== NOT EXECUTED 5a2b6: 4e5e unlk %fp <== NOT EXECUTED
0005a7b0 <rtems_rfs_bitmap_map_alloc>:
int
rtems_rfs_bitmap_map_alloc (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit seed,
bool* allocated,
rtems_rfs_bitmap_bit* bit)
{
5a7b0: 4e56 ffe4 linkw %fp,#-28 5a7b4: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 5a7b8: 266e 0010 moveal %fp@(16),%a3
* Search up first so bits allocated in succession are grouped together.
*/
if (upper_seed < control->size)
{
*bit = upper_seed;
rc = rtems_rfs_search_map_for_clear_bit (control, bit, allocated,
5a7bc: 283c 0005 a2ba movel #369338,%d4
* seed up then from the seed down a window number of bits, then repeat the * process from the window distance from the seed, again above then * below. Keep moving out until all bits have been searched. */ upper_seed = seed; lower_seed = seed;
5a7c2: 262e 000c movel %fp@(12),%d3
* of bits from the original seed above then below. That is search from the * seed up then from the seed down a window number of bits, then repeat the * process from the window distance from the seed, again above then * below. Keep moving out until all bits have been searched. */ upper_seed = seed;
5a7c6: 2403 movel %d3,%d2
int rc = 0;
/*
* By default we assume the allocation failed.
*/
*allocated = false;
5a7c8: 4213 clrb %a3@
int
rtems_rfs_bitmap_map_alloc (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit seed,
bool* allocated,
rtems_rfs_bitmap_bit* bit)
{
5a7ca: 246e 0008 moveal %fp@(8),%a2 5a7ce: 286e 0014 moveal %fp@(20),%a4
* we have searched all of the map. The seed may not be aligned to a window * boundary so we may need to search a partial window and this may also not * be balanced for the upper or lower seeds. We move to the limits, search * then return false if no clear bits are found. */ while (((upper_seed >= 0) && (upper_seed < control->size))
5a7d2: 4a82 tstl %d2
5a7d4: 6d44 blts 5a81a <rtems_rfs_bitmap_map_alloc+0x6a><== NEVER TAKEN
5a7d6: b4aa 000c cmpl %a2@(12),%d2
5a7da: 643e bccs 5a81a <rtems_rfs_bitmap_map_alloc+0x6a><== NEVER TAKEN
* Search up first so bits allocated in succession are grouped together.
*/
if (upper_seed < control->size)
{
*bit = upper_seed;
rc = rtems_rfs_search_map_for_clear_bit (control, bit, allocated,
5a7dc: 4878 0001 pea 1 <ADD> 5a7e0: 2044 moveal %d4,%a0 5a7e2: 4bfa fad6 lea %pc@(5a2ba <rtems_rfs_search_map_for_clear_bit.constprop.1>),%a5 5a7e6: 2f0b movel %a3,%sp@- 5a7e8: 2f0c movel %a4,%sp@-
/*
* Search up first so bits allocated in succession are grouped together.
*/
if (upper_seed < control->size)
{
*bit = upper_seed;
5a7ea: 2882 movel %d2,%a4@
rc = rtems_rfs_search_map_for_clear_bit (control, bit, allocated,
5a7ec: 2f0a movel %a2,%sp@- 5a7ee: 4e90 jsr %a0@
window, 1);
if ((rc > 0) || *allocated)
5a7f0: 4fef 0010 lea %sp@(16),%sp 5a7f4: 4a80 tstl %d0
5a7f6: 6e50 bgts 5a848 <rtems_rfs_bitmap_map_alloc+0x98><== NEVER TAKEN
5a7f8: 4a13 tstb %a3@
5a7fa: 664c bnes 5a848 <rtems_rfs_bitmap_map_alloc+0x98>
break;
}
if (lower_seed >= 0)
5a7fc: 4a83 tstl %d3
5a7fe: 6c2e bges 5a82e <rtems_rfs_bitmap_map_alloc+0x7e><== ALWAYS TAKEN
/*
* Do not bound the limits at the edges of the map. Do not update if an
* edge has been passed.
*/
if (upper_seed < control->size)
5a800: b4aa 000c cmpl %a2@(12),%d2
5a804: 6406 bccs 5a80c <rtems_rfs_bitmap_map_alloc+0x5c><== NEVER TAKEN
upper_seed += window;
5a806: 0682 0000 0800 addil #2048,%d2
if (lower_seed >= 0)
5a80c: 4a83 tstl %d3
5a80e: 6dc2 blts 5a7d2 <rtems_rfs_bitmap_map_alloc+0x22><== NEVER TAKEN
lower_seed -= window;
5a810: 0683 ffff f800 addil #-2048,%d3
* we have searched all of the map. The seed may not be aligned to a window * boundary so we may need to search a partial window and this may also not * be balanced for the upper or lower seeds. We move to the limits, search * then return false if no clear bits are found. */ while (((upper_seed >= 0) && (upper_seed < control->size))
5a816: 4a82 tstl %d2
5a818: 6cbc bges 5a7d6 <rtems_rfs_bitmap_map_alloc+0x26>
|| ((lower_seed >= 0) && (lower_seed < control->size)))
5a81a: 4a83 tstl %d3
5a81c: 6d2a blts 5a848 <rtems_rfs_bitmap_map_alloc+0x98>
5a81e: 202a 000c movel %a2@(12),%d0 5a822: b083 cmpl %d3,%d0
5a824: 6322 blss 5a848 <rtems_rfs_bitmap_map_alloc+0x98><== ALWAYS TAKEN
5a826: 4bfa fa92 lea %pc@(5a2ba <rtems_rfs_search_map_for_clear_bit.constprop.1>),%a5<== NOT EXECUTED
{
/*
* Search up first so bits allocated in succession are grouped together.
*/
if (upper_seed < control->size)
5a82a: b480 cmpl %d0,%d2 <== NOT EXECUTED 5a82c: 65ae bcss 5a7dc <rtems_rfs_bitmap_map_alloc+0x2c><== NOT EXECUTED
}
if (lower_seed >= 0)
{
*bit = lower_seed;
rc = rtems_rfs_search_map_for_clear_bit (control, bit, allocated,
5a82e: 4878 ffff pea ffffffff <LESS> 5a832: 2f0b movel %a3,%sp@- 5a834: 2f0c movel %a4,%sp@-
break;
}
if (lower_seed >= 0)
{
*bit = lower_seed;
5a836: 2883 movel %d3,%a4@
rc = rtems_rfs_search_map_for_clear_bit (control, bit, allocated,
5a838: 2f0a movel %a2,%sp@- 5a83a: 4e95 jsr %a5@
window, -1);
if ((rc > 0) || *allocated)
5a83c: 4fef 0010 lea %sp@(16),%sp 5a840: 4a80 tstl %d0
5a842: 6e04 bgts 5a848 <rtems_rfs_bitmap_map_alloc+0x98><== NEVER TAKEN
5a844: 4a13 tstb %a3@
5a846: 67b8 beqs 5a800 <rtems_rfs_bitmap_map_alloc+0x50><== ALWAYS TAKEN
if (lower_seed >= 0)
lower_seed -= window;
}
return 0;
}
5a848: 4280 clrl %d0 5a84a: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5
5a850: 4e5e unlk %fp <== NOT EXECUTED
0005a5c2 <rtems_rfs_bitmap_map_clear>:
int
rtems_rfs_bitmap_map_clear (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit bit)
{
5a5c2: 4e56 ffe4 linkw %fp,#-28 5a5c6: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@
rtems_rfs_bitmap_map map; rtems_rfs_bitmap_map search_map; int index; int offset; int rc; rc = rtems_rfs_bitmap_load_map (control, &map);
5a5ca: 486e fffc pea %fp@(-4)
}
int
rtems_rfs_bitmap_map_clear (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit bit)
{
5a5ce: 246e 0008 moveal %fp@(8),%a2 5a5d2: 242e 000c movel %fp@(12),%d2
rtems_rfs_bitmap_map map; rtems_rfs_bitmap_map search_map; int index; int offset; int rc; rc = rtems_rfs_bitmap_load_map (control, &map);
5a5d6: 2f0a movel %a2,%sp@- 5a5d8: 4eba fc8a jsr %pc@(5a264 <rtems_rfs_bitmap_load_map>)
if (rc > 0)
5a5dc: 508f addql #8,%sp 5a5de: 4a80 tstl %d0
5a5e0: 6f0a bles 5a5ec <rtems_rfs_bitmap_map_clear+0x2a><== ALWAYS TAKEN
offset = rtems_rfs_bitmap_map_offset(bit); search_map[index] = rtems_rfs_bitmap_clear (search_map[index], 1 << offset); rtems_rfs_buffer_mark_dirty (control->buffer); control->free++; return 0; }
5a5e2: 4cee 0c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a3 <== NOT EXECUTED 5a5e8: 4e5e unlk %fp <== NOT EXECUTED 5a5ea: 4e75 rts <== NOT EXECUTED
int offset;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
if (bit >= control->size)
5a5ec: b4aa 000c cmpl %a2@(12),%d2
5a5f0: 650c bcss 5a5fe <rtems_rfs_bitmap_map_clear+0x3c><== ALWAYS TAKEN
return EINVAL;
5a5f2: 7016 moveq #22,%d0 <== NOT EXECUTED
offset = rtems_rfs_bitmap_map_offset(bit); search_map[index] = rtems_rfs_bitmap_clear (search_map[index], 1 << offset); rtems_rfs_buffer_mark_dirty (control->buffer); control->free++; return 0; }
5a5f4: 4cee 0c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a3 <== NOT EXECUTED 5a5fa: 4e5e unlk %fp <== NOT EXECUTED 5a5fc: 4e75 rts <== NOT EXECUTED
if (rc > 0)
return rc;
if (bit >= control->size)
return EINVAL;
search_map = control->search_bits;
index = rtems_rfs_bitmap_map_index (bit);
5a5fe: 2802 movel %d2,%d4
offset = rtems_rfs_bitmap_map_offset (bit); map[index] = rtems_rfs_bitmap_clear (map[index], 1 << offset); bit = index; index = rtems_rfs_bitmap_map_index (bit);
5a600: 2202 movel %d2,%d1
return rc;
if (bit >= control->size)
return EINVAL;
search_map = control->search_bits;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
5a602: 7a1f moveq #31,%d5
if (rc > 0)
return rc;
if (bit >= control->size)
return EINVAL;
search_map = control->search_bits;
index = rtems_rfs_bitmap_map_index (bit);
5a604: ea84 asrl #5,%d4
offset = rtems_rfs_bitmap_map_offset (bit); map[index] = rtems_rfs_bitmap_clear (map[index], 1 << offset);
5a606: 7601 moveq #1,%d3
bit = index; index = rtems_rfs_bitmap_map_index (bit);
5a608: 700a moveq #10,%d0 5a60a: e0a1 asrl %d0,%d1
offset = rtems_rfs_bitmap_map_offset(bit); search_map[index] = rtems_rfs_bitmap_clear (search_map[index], 1 << offset); rtems_rfs_buffer_mark_dirty (control->buffer); control->free++; return 0;
5a60c: 4200 clrb %d0
return rc;
if (bit >= control->size)
return EINVAL;
search_map = control->search_bits;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
5a60e: c485 andl %d5,%d2
map[index] = rtems_rfs_bitmap_clear (map[index], 1 << offset);
5a610: 2a04 movel %d4,%d5 5a612: e58d lsll #2,%d5 5a614: 226e fffc moveal %fp@(-4),%a1 5a618: d3c5 addal %d5,%a1 5a61a: 2a03 movel %d3,%d5 5a61c: e5ad lsll %d2,%d5
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
if (bit >= control->size)
return EINVAL;
search_map = control->search_bits;
5a61e: 206a 0014 moveal %a2@(20),%a0
index = rtems_rfs_bitmap_map_index (bit); offset = rtems_rfs_bitmap_map_offset (bit); map[index] = rtems_rfs_bitmap_clear (map[index], 1 << offset);
5a622: 2405 movel %d5,%d2
bit = index; index = rtems_rfs_bitmap_map_index (bit); offset = rtems_rfs_bitmap_map_offset(bit);
5a624: 7a1f moveq #31,%d5
search_map[index] = rtems_rfs_bitmap_clear (search_map[index], 1 << offset); rtems_rfs_buffer_mark_dirty (control->buffer);
5a626: 2652 moveal %a2@,%a3
index = rtems_rfs_bitmap_map_index (bit); offset = rtems_rfs_bitmap_map_offset (bit); map[index] = rtems_rfs_bitmap_clear (map[index], 1 << offset); bit = index; index = rtems_rfs_bitmap_map_index (bit); offset = rtems_rfs_bitmap_map_offset(bit);
5a628: c885 andl %d5,%d4
*/
static rtems_rfs_bitmap_element
rtems_rfs_bitmap_clear (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_element bits)
{
return RTEMS_RFS_BITMAP_CLEAR_BITS (target, bits);
5a62a: 8591 orl %d2,%a1@
offset = rtems_rfs_bitmap_map_offset (bit); map[index] = rtems_rfs_bitmap_clear (map[index], 1 << offset); bit = index; index = rtems_rfs_bitmap_map_index (bit); offset = rtems_rfs_bitmap_map_offset(bit); search_map[index] = rtems_rfs_bitmap_clear (search_map[index], 1 << offset);
5a62c: e9ab lsll %d4,%d3
*/
static rtems_rfs_bitmap_element
rtems_rfs_bitmap_clear (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_element bits)
{
return RTEMS_RFS_BITMAP_CLEAR_BITS (target, bits);
5a62e: 87b0 1c00 orl %d3,%a0@(00000000,%d1:l:4)
map[index] = rtems_rfs_bitmap_clear (map[index], 1 << offset); bit = index; index = rtems_rfs_bitmap_map_index (bit); offset = rtems_rfs_bitmap_map_offset(bit); search_map[index] = rtems_rfs_bitmap_clear (search_map[index], 1 << offset); rtems_rfs_buffer_mark_dirty (control->buffer);
5a632: 16bc 0001 moveb #1,%a3@
control->free++;
5a636: 52aa 0010 addql #1,%a2@(16)
return 0; }
5a63a: 4cee 0c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a3
5a640: 4e5e unlk %fp <== NOT EXECUTED
0005a720 <rtems_rfs_bitmap_map_clear_all>:
int
rtems_rfs_bitmap_map_clear_all (rtems_rfs_bitmap_control* control)
{
5a720: 4e56 ffec linkw %fp,#-20 5a724: 48d7 041c moveml %d2-%d4/%a2,%sp@
rtems_rfs_bitmap_bit last_search_bit;
size_t elements;
int e;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
5a728: 486e fffc pea %fp@(-4)
return 0;
}
int
rtems_rfs_bitmap_map_clear_all (rtems_rfs_bitmap_control* control)
{
5a72c: 246e 0008 moveal %fp@(8),%a2
rtems_rfs_bitmap_bit last_search_bit;
size_t elements;
int e;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
5a730: 2f0a movel %a2,%sp@- 5a732: 4eba fb30 jsr %pc@(5a264 <rtems_rfs_bitmap_load_map>)
if (rc > 0)
5a736: 508f addql #8,%sp 5a738: 4a80 tstl %d0
5a73a: 6f0a bles 5a746 <rtems_rfs_bitmap_map_clear_all+0x26><== ALWAYS TAKEN
rtems_rfs_bitmap_mask (last_search_bit));
rtems_rfs_buffer_mark_dirty (control->buffer);
return 0;
}
5a73c: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 <== NOT EXECUTED 5a742: 4e5e unlk %fp <== NOT EXECUTED 5a744: 4e75 rts <== NOT EXECUTED
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
5a746: 242a 000c movel %a2@(12),%d2 5a74a: 5382 subql #1,%d2 5a74c: ea8a lsrl #5,%d2 5a74e: 2602 movel %d2,%d3 5a750: 5283 addql #1,%d3
control->free = elements;
for (e = 0; e < elements; e++)
5a752: 4281 clrl %d1 5a754: 4280 clrl %d0
if (rc > 0)
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
control->free = elements;
5a756: 206e fffc moveal %fp@(-4),%a0 5a75a: 2543 0010 movel %d3,%a2@(16)
for (e = 0; e < elements; e++)
map[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
5a75e: 78ff moveq #-1,%d4
elements = rtems_rfs_bitmap_elements (control->size);
control->free = elements;
for (e = 0; e < elements; e++)
5a760: 5280 addql #1,%d0
map[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
5a762: 2184 1c00 movel %d4,%a0@(00000000,%d1:l:4)
elements = rtems_rfs_bitmap_elements (control->size);
control->free = elements;
for (e = 0; e < elements; e++)
5a766: 2200 movel %d0,%d1 5a768: b083 cmpl %d3,%d0
5a76a: 65f2 bcss 5a75e <rtems_rfs_bitmap_map_clear_all+0x3e>
/*
* Set the un-mapped bits in the last search element so the available logic
* works.
*/
last_search_bit = rtems_rfs_bitmap_map_offset (elements);
5a76c: 701f moveq #31,%d0 5a76e: c680 andl %d0,%d3
if (last_search_bit == 0)
5a770: 673a beqs 5a7ac <rtems_rfs_bitmap_map_clear_all+0x8c><== ALWAYS TAKEN
5a772: 103c 0020 moveb #32,%d0 <== NOT EXECUTED 5a776: 9083 subl %d3,%d0 <== NOT EXECUTED 5a778: 76ff moveq #-1,%d3 <== NOT EXECUTED 5a77a: e0ab lsrl %d0,%d3 <== NOT EXECUTED
last_search_bit = rtems_rfs_bitmap_element_bits ();
elements = rtems_rfs_bitmap_elements (elements);
for (e = 0; e < (elements - 1); e++)
5a77c: 206a 0014 moveal %a2@(20),%a0
last_search_bit = rtems_rfs_bitmap_map_offset (elements);
if (last_search_bit == 0)
last_search_bit = rtems_rfs_bitmap_element_bits ();
elements = rtems_rfs_bitmap_elements (elements);
5a780: ea8a lsrl #5,%d2
for (e = 0; e < (elements - 1); e++)
5a782: 6712 beqs 5a796 <rtems_rfs_bitmap_map_clear_all+0x76><== ALWAYS TAKEN
5a784: 4281 clrl %d1 <== NOT EXECUTED 5a786: 4280 clrl %d0 <== NOT EXECUTED
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
5a788: 78ff moveq #-1,%d4 <== NOT EXECUTED
if (last_search_bit == 0)
last_search_bit = rtems_rfs_bitmap_element_bits ();
elements = rtems_rfs_bitmap_elements (elements);
for (e = 0; e < (elements - 1); e++)
5a78a: 5280 addql #1,%d0 <== NOT EXECUTED
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
5a78c: 2184 1c00 movel %d4,%a0@(00000000,%d1:l:4) <== NOT EXECUTED
if (last_search_bit == 0)
last_search_bit = rtems_rfs_bitmap_element_bits ();
elements = rtems_rfs_bitmap_elements (elements);
for (e = 0; e < (elements - 1); e++)
5a790: 2200 movel %d0,%d1 <== NOT EXECUTED 5a792: b480 cmpl %d0,%d2 <== NOT EXECUTED 5a794: 66f2 bnes 5a788 <rtems_rfs_bitmap_map_clear_all+0x68><== NOT EXECUTED
control->search_bits[elements - 1] =
rtems_rfs_bitmap_merge (RTEMS_RFS_BITMAP_ELEMENT_CLEAR,
RTEMS_RFS_BITMAP_ELEMENT_SET,
rtems_rfs_bitmap_mask (last_search_bit));
rtems_rfs_buffer_mark_dirty (control->buffer);
5a796: 2252 moveal %a2@,%a1
return 0;
5a798: 4280 clrl %d0
elements = rtems_rfs_bitmap_elements (elements);
for (e = 0; e < (elements - 1); e++)
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
control->search_bits[elements - 1] =
5a79a: 2183 2c00 movel %d3,%a0@(00000000,%d2:l:4)
rtems_rfs_bitmap_mask (last_search_bit));
rtems_rfs_buffer_mark_dirty (control->buffer);
return 0;
}
5a79e: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2
control->search_bits[elements - 1] =
rtems_rfs_bitmap_merge (RTEMS_RFS_BITMAP_ELEMENT_CLEAR,
RTEMS_RFS_BITMAP_ELEMENT_SET,
rtems_rfs_bitmap_mask (last_search_bit));
rtems_rfs_buffer_mark_dirty (control->buffer);
5a7a4: 12bc 0001 moveb #1,%a1@
return 0;
}
5a7a8: 4e5e unlk %fp 5a7aa: 4e75 rts
* Set the un-mapped bits in the last search element so the available logic
* works.
*/
last_search_bit = rtems_rfs_bitmap_map_offset (elements);
if (last_search_bit == 0)
5a7ac: 76ff moveq #-1,%d3 5a7ae: 60cc bras 5a77c <rtems_rfs_bitmap_map_clear_all+0x5c>
0005a52c <rtems_rfs_bitmap_map_set>:
int
rtems_rfs_bitmap_map_set (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit bit)
{
5a52c: 4e56 ffec linkw %fp,#-20 5a530: 48d7 041c moveml %d2-%d4/%a2,%sp@
rtems_rfs_bitmap_map map; rtems_rfs_bitmap_map search_map; int index; int offset; int rc; rc = rtems_rfs_bitmap_load_map (control, &map);
5a534: 486e fffc pea %fp@(-4)
}
int
rtems_rfs_bitmap_map_set (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit bit)
{
5a538: 246e 0008 moveal %fp@(8),%a2 5a53c: 242e 000c movel %fp@(12),%d2
rtems_rfs_bitmap_map map; rtems_rfs_bitmap_map search_map; int index; int offset; int rc; rc = rtems_rfs_bitmap_load_map (control, &map);
5a540: 2f0a movel %a2,%sp@- 5a542: 4eba fd20 jsr %pc@(5a264 <rtems_rfs_bitmap_load_map>)
if (rc > 0)
5a546: 508f addql #8,%sp 5a548: 4a80 tstl %d0
5a54a: 6f0a bles 5a556 <rtems_rfs_bitmap_map_set+0x2a> <== ALWAYS TAKEN
search_map[index] = rtems_rfs_bitmap_set (search_map[index], 1 << offset);
control->free--;
rtems_rfs_buffer_mark_dirty (control->buffer);
}
return 0;
}
5a54c: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 <== NOT EXECUTED 5a552: 4e5e unlk %fp <== NOT EXECUTED 5a554: 4e75 rts <== NOT EXECUTED
int offset;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
if (bit >= control->size)
5a556: b4aa 000c cmpl %a2@(12),%d2
5a55a: 650c bcss 5a568 <rtems_rfs_bitmap_map_set+0x3c> <== ALWAYS TAKEN
return EINVAL;
5a55c: 7016 moveq #22,%d0 <== NOT EXECUTED
search_map[index] = rtems_rfs_bitmap_set (search_map[index], 1 << offset);
control->free--;
rtems_rfs_buffer_mark_dirty (control->buffer);
}
return 0;
}
5a55e: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 <== NOT EXECUTED 5a564: 4e5e unlk %fp <== NOT EXECUTED 5a566: 4e75 rts <== NOT EXECUTED
if (rc > 0)
return rc;
if (bit >= control->size)
return EINVAL;
search_map = control->search_bits;
index = rtems_rfs_bitmap_map_index (bit);
5a568: 2602 movel %d2,%d3 5a56a: ea83 asrl #5,%d3
offset = rtems_rfs_bitmap_map_offset (bit); map[index] = rtems_rfs_bitmap_set (map[index], 1 << offset);
5a56c: 2803 movel %d3,%d4
return rc;
if (bit >= control->size)
return EINVAL;
search_map = control->search_bits;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
5a56e: 701f moveq #31,%d0
map[index] = rtems_rfs_bitmap_set (map[index], 1 << offset);
5a570: 7201 moveq #1,%d1 5a572: e58c lsll #2,%d4 5a574: 206e fffc moveal %fp@(-4),%a0 5a578: d1c4 addal %d4,%a0 5a57a: 2801 movel %d1,%d4
return rc;
if (bit >= control->size)
return EINVAL;
search_map = control->search_bits;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
5a57c: c082 andl %d2,%d0
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
if (bit >= control->size)
return EINVAL;
search_map = control->search_bits;
5a57e: 226a 0014 moveal %a2@(20),%a1
index = rtems_rfs_bitmap_map_index (bit); offset = rtems_rfs_bitmap_map_offset (bit); map[index] = rtems_rfs_bitmap_set (map[index], 1 << offset);
5a582: e1ac lsll %d0,%d4 5a584: 2004 movel %d4,%d0
*/
static rtems_rfs_bitmap_element
rtems_rfs_bitmap_set (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_element bits)
{
return RTEMS_RFS_BITMAP_SET_BITS (target, bits);
5a586: 4680 notl %d0 5a588: c090 andl %a0@,%d0
if (bit >= control->size)
return EINVAL;
search_map = control->search_bits;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
map[index] = rtems_rfs_bitmap_set (map[index], 1 << offset);
5a58a: 2080 movel %d0,%a0@
if (rtems_rfs_bitmap_match(map[index], RTEMS_RFS_BITMAP_ELEMENT_SET))
5a58c: 6628 bnes 5a5b6 <rtems_rfs_bitmap_map_set+0x8a> <== ALWAYS TAKEN
{
bit = index;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
5a58e: 781f moveq #31,%d4 <== NOT EXECUTED
offset = rtems_rfs_bitmap_map_offset (bit);
map[index] = rtems_rfs_bitmap_set (map[index], 1 << offset);
if (rtems_rfs_bitmap_match(map[index], RTEMS_RFS_BITMAP_ELEMENT_SET))
{
bit = index;
index = rtems_rfs_bitmap_map_index (bit);
5a590: 103c 000a moveb #10,%d0 <== NOT EXECUTED 5a594: e0a2 asrl %d0,%d2 <== NOT EXECUTED
offset = rtems_rfs_bitmap_map_offset (bit);
search_map[index] = rtems_rfs_bitmap_set (search_map[index], 1 << offset);
control->free--;
rtems_rfs_buffer_mark_dirty (control->buffer);
}
return 0;
5a596: 4200 clrb %d0 <== NOT EXECUTED
map[index] = rtems_rfs_bitmap_set (map[index], 1 << offset);
if (rtems_rfs_bitmap_match(map[index], RTEMS_RFS_BITMAP_ELEMENT_SET))
{
bit = index;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
5a598: c684 andl %d4,%d3 <== NOT EXECUTED
search_map[index] = rtems_rfs_bitmap_set (search_map[index], 1 << offset);
control->free--;
rtems_rfs_buffer_mark_dirty (control->buffer);
5a59a: 2052 moveal %a2@,%a0 <== NOT EXECUTED
if (rtems_rfs_bitmap_match(map[index], RTEMS_RFS_BITMAP_ELEMENT_SET))
{
bit = index;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
search_map[index] = rtems_rfs_bitmap_set (search_map[index], 1 << offset);
5a59c: e7a9 lsll %d3,%d1 <== NOT EXECUTED
*/
static rtems_rfs_bitmap_element
rtems_rfs_bitmap_set (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_element bits)
{
return RTEMS_RFS_BITMAP_SET_BITS (target, bits);
5a59e: 4681 notl %d1 <== NOT EXECUTED 5a5a0: c3b1 2c00 andl %d1,%a1@(00000000,%d2:l:4) <== NOT EXECUTED
{
bit = index;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
search_map[index] = rtems_rfs_bitmap_set (search_map[index], 1 << offset);
control->free--;
5a5a4: 53aa 0010 subql #1,%a2@(16) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (control->buffer);
}
return 0;
}
5a5a8: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 <== NOT EXECUTED
bit = index;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
search_map[index] = rtems_rfs_bitmap_set (search_map[index], 1 << offset);
control->free--;
rtems_rfs_buffer_mark_dirty (control->buffer);
5a5ae: 10bc 0001 moveb #1,%a0@ <== NOT EXECUTED
} return 0; }
5a5b2: 4e5e unlk %fp <== NOT EXECUTED 5a5b4: 4e75 rts <== NOT EXECUTED
offset = rtems_rfs_bitmap_map_offset (bit);
search_map[index] = rtems_rfs_bitmap_set (search_map[index], 1 << offset);
control->free--;
rtems_rfs_buffer_mark_dirty (control->buffer);
}
return 0;
5a5b6: 4280 clrl %d0
}
5a5b8: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2
5a5be: 4e5e unlk %fp <== NOT EXECUTED
0005a6a6 <rtems_rfs_bitmap_map_set_all>:
int
rtems_rfs_bitmap_map_set_all (rtems_rfs_bitmap_control* control)
{
5a6a6: 4e56 fffc linkw %fp,#-4 <== NOT EXECUTED 5a6aa: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5a6ac: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED 5a6b0: 2f02 movel %d2,%sp@- <== NOT EXECUTED
rtems_rfs_bitmap_map map;
size_t elements;
int e;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
5a6b2: 486e fffc pea %fp@(-4) <== NOT EXECUTED 5a6b6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5a6b8: 4eba fbaa jsr %pc@(5a264 <rtems_rfs_bitmap_load_map>) <== NOT EXECUTED
if (rc > 0)
5a6bc: 508f addql #8,%sp <== NOT EXECUTED 5a6be: 4a80 tstl %d0 <== NOT EXECUTED 5a6c0: 6f0c bles 5a6ce <rtems_rfs_bitmap_map_set_all+0x28><== NOT EXECUTED
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
rtems_rfs_buffer_mark_dirty (control->buffer);
return 0;
}
5a6c2: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED 5a6c6: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 5a6ca: 4e5e unlk %fp <== NOT EXECUTED 5a6cc: 4e75 rts <== NOT EXECUTED
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
5a6ce: 242a 000c movel %a2@(12),%d2 <== NOT EXECUTED 5a6d2: 5382 subql #1,%d2 <== NOT EXECUTED 5a6d4: ea8a lsrl #5,%d2 <== NOT EXECUTED 5a6d6: 2242 moveal %d2,%a1 <== NOT EXECUTED 5a6d8: 5289 addql #1,%a1 <== NOT EXECUTED
control->free = 0;
for (e = 0; e < elements; e++)
5a6da: 4281 clrl %d1 <== NOT EXECUTED 5a6dc: 4280 clrl %d0 <== NOT EXECUTED
if (rc > 0)
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
control->free = 0;
5a6de: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 5a6e2: 42aa 0010 clrl %a2@(16) <== NOT EXECUTED
for (e = 0; e < elements; e++)
map[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
5a6e6: 42b0 1c00 clrl %a0@(00000000,%d1:l:4) <== NOT EXECUTED
elements = rtems_rfs_bitmap_elements (control->size);
control->free = 0;
for (e = 0; e < elements; e++)
5a6ea: 5280 addql #1,%d0 <== NOT EXECUTED 5a6ec: 2200 movel %d0,%d1 <== NOT EXECUTED 5a6ee: b089 cmpl %a1,%d0 <== NOT EXECUTED 5a6f0: 65f4 bcss 5a6e6 <rtems_rfs_bitmap_map_set_all+0x40><== NOT EXECUTED
map[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
elements = rtems_rfs_bitmap_elements (elements);
5a6f2: ea8a lsrl #5,%d2 <== NOT EXECUTED 5a6f4: 2242 moveal %d2,%a1 <== NOT EXECUTED 5a6f6: 5289 addql #1,%a1 <== NOT EXECUTED
for (e = 0; e < elements; e++)
5a6f8: 4281 clrl %d1 <== NOT EXECUTED 5a6fa: 4280 clrl %d0 <== NOT EXECUTED
control->free = 0;
for (e = 0; e < elements; e++)
map[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
elements = rtems_rfs_bitmap_elements (elements);
5a6fc: 206a 0014 moveal %a2@(20),%a0 <== NOT EXECUTED
for (e = 0; e < elements; e++)
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
5a700: 42b0 1c00 clrl %a0@(00000000,%d1:l:4) <== NOT EXECUTED
for (e = 0; e < elements; e++)
map[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
elements = rtems_rfs_bitmap_elements (elements);
for (e = 0; e < elements; e++)
5a704: 5280 addql #1,%d0 <== NOT EXECUTED 5a706: 2200 movel %d0,%d1 <== NOT EXECUTED 5a708: b089 cmpl %a1,%d0 <== NOT EXECUTED 5a70a: 65f4 bcss 5a700 <rtems_rfs_bitmap_map_set_all+0x5a><== NOT EXECUTED
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
rtems_rfs_buffer_mark_dirty (control->buffer);
5a70c: 2052 moveal %a2@,%a0 <== NOT EXECUTED
return 0;
5a70e: 4280 clrl %d0 <== NOT EXECUTED
}
5a710: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED 5a714: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 5a718: 4e5e unlk %fp <== NOT EXECUTED
elements = rtems_rfs_bitmap_elements (elements);
for (e = 0; e < elements; e++)
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
rtems_rfs_buffer_mark_dirty (control->buffer);
5a71a: 10bc 0001 moveb #1,%a0@ <== NOT EXECUTED
return 0;
}
0005a644 <rtems_rfs_bitmap_map_test>:
int
rtems_rfs_bitmap_map_test (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit bit,
bool* state)
{
5a644: 4e56 fff0 linkw %fp,#-16 <== NOT EXECUTED 5a648: 48d7 040c moveml %d2-%d3/%a2,%sp@ <== NOT EXECUTED
rtems_rfs_bitmap_map map; int index; int rc; rc = rtems_rfs_bitmap_load_map (control, &map);
5a64c: 486e fffc pea %fp@(-4) <== NOT EXECUTED
int
rtems_rfs_bitmap_map_test (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit bit,
bool* state)
{
5a650: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED 5a654: 242e 000c movel %fp@(12),%d2 <== NOT EXECUTED
rtems_rfs_bitmap_map map; int index; int rc; rc = rtems_rfs_bitmap_load_map (control, &map);
5a658: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5a65a: 4eba fc08 jsr %pc@(5a264 <rtems_rfs_bitmap_load_map>) <== NOT EXECUTED
if (rc > 0)
5a65e: 508f addql #8,%sp <== NOT EXECUTED 5a660: 4a80 tstl %d0 <== NOT EXECUTED 5a662: 6f0a bles 5a66e <rtems_rfs_bitmap_map_test+0x2a> <== NOT EXECUTED
if (bit >= control->size)
return EINVAL;
index = rtems_rfs_bitmap_map_index (bit);
*state = rtems_rfs_bitmap_test (map[index], bit);
return 0;
}
5a664: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2 <== NOT EXECUTED 5a66a: 4e5e unlk %fp <== NOT EXECUTED 5a66c: 4e75 rts <== NOT EXECUTED
int index;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
if (bit >= control->size)
5a66e: b4aa 000c cmpl %a2@(12),%d2 <== NOT EXECUTED 5a672: 650c bcss 5a680 <rtems_rfs_bitmap_map_test+0x3c> <== NOT EXECUTED
return EINVAL;
5a674: 7016 moveq #22,%d0 <== NOT EXECUTED
index = rtems_rfs_bitmap_map_index (bit); *state = rtems_rfs_bitmap_test (map[index], bit); return 0; }
5a676: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2 <== NOT EXECUTED 5a67c: 4e5e unlk %fp <== NOT EXECUTED 5a67e: 4e75 rts <== NOT EXECUTED
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
5a680: 7201 moveq #1,%d1 <== NOT EXECUTED
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
if (bit >= control->size)
return EINVAL;
index = rtems_rfs_bitmap_map_index (bit);
5a682: 2602 movel %d2,%d3 <== NOT EXECUTED 5a684: ea83 asrl #5,%d3 <== NOT EXECUTED
*state = rtems_rfs_bitmap_test (map[index], bit); return 0;
5a686: 4280 clrl %d0 <== NOT EXECUTED
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
5a688: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 5a68c: e5a9 lsll %d2,%d1 <== NOT EXECUTED 5a68e: c2b0 3c00 andl %a0@(00000000,%d3:l:4),%d1 <== NOT EXECUTED
if (rc > 0)
return rc;
if (bit >= control->size)
return EINVAL;
index = rtems_rfs_bitmap_map_index (bit);
*state = rtems_rfs_bitmap_test (map[index], bit);
5a692: 206e 0010 moveal %fp@(16),%a0 <== NOT EXECUTED
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
5a696: 57c1 seq %d1 <== NOT EXECUTED
if (bit >= control->size)
return EINVAL;
index = rtems_rfs_bitmap_map_index (bit);
*state = rtems_rfs_bitmap_test (map[index], bit);
return 0;
}
5a698: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2 <== NOT EXECUTED 5a69e: 4e5e unlk %fp <== NOT EXECUTED
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
5a6a0: 4481 negl %d1 <== NOT EXECUTED
if (rc > 0)
return rc;
if (bit >= control->size)
return EINVAL;
index = rtems_rfs_bitmap_map_index (bit);
*state = rtems_rfs_bitmap_test (map[index], bit);
5a6a2: 1081 moveb %d1,%a0@ <== NOT EXECUTED
return 0;
}
0005a4ee <rtems_rfs_bitmap_mask>:
rtems_rfs_bitmap_element
rtems_rfs_bitmap_mask (unsigned int size)
{
rtems_rfs_bitmap_element mask = RTEMS_RFS_BITMAP_ELEMENT_FULL_MASK;
mask >>= (rtems_rfs_bitmap_element_bits () - size);
5a4ee: 7220 moveq #32,%d1 <== NOT EXECUTED 5a4f0: 70ff moveq #-1,%d0 <== NOT EXECUTED
return 0;
}
rtems_rfs_bitmap_element
rtems_rfs_bitmap_mask (unsigned int size)
{
5a4f2: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
rtems_rfs_bitmap_element mask = RTEMS_RFS_BITMAP_ELEMENT_FULL_MASK; mask >>= (rtems_rfs_bitmap_element_bits () - size);
5a4f6: 92ae 0008 subl %fp@(8),%d1 <== NOT EXECUTED
return mask; }
5a4fa: 4e5e unlk %fp <== NOT EXECUTED 5a4fc: e2a8 lsrl %d1,%d0 <== NOT EXECUTED
0005a500 <rtems_rfs_bitmap_mask_section>:
rtems_rfs_bitmap_element
rtems_rfs_bitmap_mask_section (unsigned int start, unsigned int end)
{
5a500: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 5a504: 222e 0008 movel %fp@(8),%d1 <== NOT EXECUTED 5a508: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED 5a50c: 2f02 movel %d2,%sp@- <== NOT EXECUTED
rtems_rfs_bitmap_element mask = 0; if (end > start)
5a50e: b280 cmpl %d0,%d1 <== NOT EXECUTED 5a510: 6412 bccs 5a524 <rtems_rfs_bitmap_mask_section+0x24><== NOT EXECUTED
mask = rtems_rfs_bitmap_mask (end - start) << start;
5a512: 9081 subl %d1,%d0 <== NOT EXECUTED
rtems_rfs_bitmap_element
rtems_rfs_bitmap_mask (unsigned int size)
{
rtems_rfs_bitmap_element mask = RTEMS_RFS_BITMAP_ELEMENT_FULL_MASK;
mask >>= (rtems_rfs_bitmap_element_bits () - size);
5a514: 7420 moveq #32,%d2 <== NOT EXECUTED 5a516: 9480 subl %d0,%d2 <== NOT EXECUTED 5a518: 70ff moveq #-1,%d0 <== NOT EXECUTED 5a51a: e4a8 lsrl %d2,%d0 <== NOT EXECUTED
{
rtems_rfs_bitmap_element mask = 0;
if (end > start)
mask = rtems_rfs_bitmap_mask (end - start) << start;
return mask;
}
5a51c: 241f movel %sp@+,%d2 <== NOT EXECUTED 5a51e: 4e5e unlk %fp <== NOT EXECUTED
rtems_rfs_bitmap_element
rtems_rfs_bitmap_mask_section (unsigned int start, unsigned int end)
{
rtems_rfs_bitmap_element mask = 0;
if (end > start)
mask = rtems_rfs_bitmap_mask (end - start) << start;
5a520: e3a8 lsll %d1,%d0 <== NOT EXECUTED
return mask; }
5a522: 4e75 rts <== NOT EXECUTED 5a524: 241f movel %sp@+,%d2 <== NOT EXECUTED
}
rtems_rfs_bitmap_element
rtems_rfs_bitmap_mask_section (unsigned int start, unsigned int end)
{
rtems_rfs_bitmap_element mask = 0;
5a526: 4280 clrl %d0 <== NOT EXECUTED
if (end > start)
mask = rtems_rfs_bitmap_mask (end - start) << start;
return mask;
}
5a528: 4e5e unlk %fp <== NOT EXECUTED
0005a8fe <rtems_rfs_bitmap_open>:
rtems_rfs_bitmap_open (rtems_rfs_bitmap_control* control,
rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* buffer,
size_t size,
rtems_rfs_buffer_block block)
{
5a8fe: 4e56 0000 linkw %fp,#0 5a902: 222e 0014 movel %fp@(20),%d1
size_t elements = rtems_rfs_bitmap_elements (size);
5a906: 2001 movel %d1,%d0 5a908: 5380 subql #1,%d0
rtems_rfs_bitmap_open (rtems_rfs_bitmap_control* control,
rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* buffer,
size_t size,
rtems_rfs_buffer_block block)
{
5a90a: 2f0a movel %a2,%sp@- 5a90c: 246e 0008 moveal %fp@(8),%a2 5a910: 2f02 movel %d2,%sp@-
control->buffer = buffer;
control->fs = fs;
control->block = block;
control->size = size;
elements = rtems_rfs_bitmap_elements (elements);
5a912: 740a moveq #10,%d2 5a914: e4a8 lsrl %d2,%d0
control->search_bits = malloc (elements * sizeof (rtems_rfs_bitmap_element));
5a916: e588 lsll #2,%d0 5a918: 2040 moveal %d0,%a0 5a91a: 4868 0004 pea %a0@(4)
size_t size,
rtems_rfs_buffer_block block)
{
size_t elements = rtems_rfs_bitmap_elements (size);
control->buffer = buffer;
5a91e: 24ae 0010 movel %fp@(16),%a2@
control->fs = fs;
5a922: 256e 000c 0004 movel %fp@(12),%a2@(4)
control->block = block;
5a928: 256e 0018 0008 movel %fp@(24),%a2@(8)
control->size = size;
5a92e: 2541 000c movel %d1,%a2@(12)
elements = rtems_rfs_bitmap_elements (elements);
control->search_bits = malloc (elements * sizeof (rtems_rfs_bitmap_element));
5a932: 4eb9 0004 6f84 jsr 46f84 <malloc>
if (!control->search_bits)
5a938: 588f addql #4,%sp
control->fs = fs;
control->block = block;
control->size = size;
elements = rtems_rfs_bitmap_elements (elements);
control->search_bits = malloc (elements * sizeof (rtems_rfs_bitmap_element));
5a93a: 2540 0014 movel %d0,%a2@(20)
if (!control->search_bits)
5a93e: 6714 beqs 5a954 <rtems_rfs_bitmap_open+0x56> <== NEVER TAKEN
return ENOMEM;
return rtems_rfs_bitmap_create_search (control);
5a940: 2d4a 0008 movel %a2,%fp@(8)
}
5a944: 242e fff8 movel %fp@(-8),%d2 5a948: 246e fffc moveal %fp@(-4),%a2 5a94c: 4e5e unlk %fp
control->search_bits = malloc (elements * sizeof (rtems_rfs_bitmap_element));
if (!control->search_bits)
return ENOMEM;
return rtems_rfs_bitmap_create_search (control);
5a94e: 4ef9 0005 a854 jmp 5a854 <rtems_rfs_bitmap_create_search>
}
5a954: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 5a958: 700c moveq #12,%d0 <== NOT EXECUTED 5a95a: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 5a95e: 4e5e unlk %fp <== NOT EXECUTED
0005aae4 <rtems_rfs_block_find_indirect>:
rtems_rfs_block_find_indirect (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* buffer,
rtems_rfs_block_no block,
int offset,
rtems_rfs_block_no* result)
{
5aae4: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED 5aae8: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ <== NOT EXECUTED
/*
* If the handle has a buffer and this request is a different block the current
* buffer is released.
*/
rc = rtems_rfs_buffer_handle_request (fs, buffer, block, true);
5aaec: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
rtems_rfs_block_find_indirect (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* buffer,
rtems_rfs_block_no block,
int offset,
rtems_rfs_block_no* result)
{
5aaf0: 242e 0010 movel %fp@(16),%d2 <== NOT EXECUTED 5aaf4: 266e 000c moveal %fp@(12),%a3 <== NOT EXECUTED
/*
* If the handle has a buffer and this request is a different block the current
* buffer is released.
*/
rc = rtems_rfs_buffer_handle_request (fs, buffer, block, true);
5aaf8: 2f02 movel %d2,%sp@- <== NOT EXECUTED
rtems_rfs_block_find_indirect (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* buffer,
rtems_rfs_block_no block,
int offset,
rtems_rfs_block_no* result)
{
5aafa: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
/*
* If the handle has a buffer and this request is a different block the current
* buffer is released.
*/
rc = rtems_rfs_buffer_handle_request (fs, buffer, block, true);
5aafe: 2f0b movel %a3,%sp@- <== NOT EXECUTED
rtems_rfs_block_find_indirect (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* buffer,
rtems_rfs_block_no block,
int offset,
rtems_rfs_block_no* result)
{
5ab00: 262e 0014 movel %fp@(20),%d3 <== NOT EXECUTED
/*
* If the handle has a buffer and this request is a different block the current
* buffer is released.
*/
rc = rtems_rfs_buffer_handle_request (fs, buffer, block, true);
5ab04: 2f0a movel %a2,%sp@- <== NOT EXECUTED
rtems_rfs_block_find_indirect (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* buffer,
rtems_rfs_block_no block,
int offset,
rtems_rfs_block_no* result)
{
5ab06: 286e 0018 moveal %fp@(24),%a4 <== NOT EXECUTED
/*
* If the handle has a buffer and this request is a different block the current
* buffer is released.
*/
rc = rtems_rfs_buffer_handle_request (fs, buffer, block, true);
5ab0a: 4eb9 0005 bd6e jsr 5bd6e <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
if (rc > 0)
5ab10: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5ab14: 4a80 tstl %d0 <== NOT EXECUTED 5ab16: 6f0a bles 5ab22 <rtems_rfs_block_find_indirect+0x3e><== NOT EXECUTED
*result = 0;
rc = EIO;
}
return 0;
}
5ab18: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 5ab1e: 4e5e unlk %fp <== NOT EXECUTED 5ab20: 4e75 rts <== NOT EXECUTED
*/
rc = rtems_rfs_buffer_handle_request (fs, buffer, block, true);
if (rc > 0)
return rc;
*result = rtems_rfs_block_get_number (buffer, offset);
5ab22: 206b 0006 moveal %a3@(6),%a0 <== NOT EXECUTED 5ab26: 2203 movel %d3,%d1 <== NOT EXECUTED 5ab28: 4285 clrl %d5 <== NOT EXECUTED 5ab2a: 4280 clrl %d0 <== NOT EXECUTED 5ab2c: 4284 clrl %d4 <== NOT EXECUTED 5ab2e: 7c18 moveq #24,%d6 <== NOT EXECUTED 5ab30: e589 lsll #2,%d1 <== NOT EXECUTED 5ab32: 2068 001e moveal %a0@(30),%a0 <== NOT EXECUTED 5ab36: 1a30 1800 moveb %a0@(00000000,%d1:l),%d5 <== NOT EXECUTED 5ab3a: 1030 1803 moveb %a0@(00000003,%d1:l),%d0 <== NOT EXECUTED 5ab3e: 1830 1801 moveb %a0@(00000001,%d1:l),%d4 <== NOT EXECUTED 5ab42: 1230 1802 moveb %a0@(00000002,%d1:l),%d1 <== NOT EXECUTED 5ab46: edad lsll %d6,%d5 <== NOT EXECUTED 5ab48: 0281 0000 00ff andil #255,%d1 <== NOT EXECUTED 5ab4e: 4844 swap %d4 <== NOT EXECUTED 5ab50: 4244 clrw %d4 <== NOT EXECUTED 5ab52: 8085 orl %d5,%d0 <== NOT EXECUTED 5ab54: e189 lsll #8,%d1 <== NOT EXECUTED 5ab56: 8084 orl %d4,%d0 <== NOT EXECUTED 5ab58: 8081 orl %d1,%d0 <== NOT EXECUTED
if ((*result + 1) == 0)
5ab5a: 72ff moveq #-1,%d1 <== NOT EXECUTED
*/
rc = rtems_rfs_buffer_handle_request (fs, buffer, block, true);
if (rc > 0)
return rc;
*result = rtems_rfs_block_get_number (buffer, offset);
5ab5c: 2880 movel %d0,%a4@ <== NOT EXECUTED
if ((*result + 1) == 0)
5ab5e: b280 cmpl %d0,%d1 <== NOT EXECUTED 5ab60: 6712 beqs 5ab74 <rtems_rfs_block_find_indirect+0x90><== NOT EXECUTED
*result = 0;
if (*result >= rtems_rfs_fs_blocks (fs))
5ab62: b0aa 0004 cmpl %a2@(4),%d0 <== NOT EXECUTED 5ab66: 6416 bccs 5ab7e <rtems_rfs_block_find_indirect+0x9a><== NOT EXECUTED 5ab68: 4280 clrl %d0 <== NOT EXECUTED
*result = 0;
rc = EIO;
}
return 0;
}
5ab6a: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 5ab70: 4e5e unlk %fp <== NOT EXECUTED 5ab72: 4e75 rts <== NOT EXECUTED
if (rc > 0)
return rc;
*result = rtems_rfs_block_get_number (buffer, offset);
if ((*result + 1) == 0)
*result = 0;
5ab74: 4294 clrl %a4@ <== NOT EXECUTED 5ab76: 4280 clrl %d0 <== NOT EXECUTED
if (*result >= rtems_rfs_fs_blocks (fs))
5ab78: b0aa 0004 cmpl %a2@(4),%d0 <== NOT EXECUTED 5ab7c: 65ea bcss 5ab68 <rtems_rfs_block_find_indirect+0x84><== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_FIND))
5ab7e: 4878 1000 pea 1000 <D_MAX_EXP+0x801> <== NOT EXECUTED 5ab82: 42a7 clrl %sp@- <== NOT EXECUTED 5ab84: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 5ab8a: 508f addql #8,%sp <== NOT EXECUTED 5ab8c: 4a00 tstb %d0 <== NOT EXECUTED 5ab8e: 660e bnes 5ab9e <rtems_rfs_block_find_indirect+0xba><== NOT EXECUTED
printf ("rtems-rfs: block-find: invalid block in table:"
" block=%" PRId32 ", indirect=%" PRId32 "/%d\n", *result, block, offset);
*result = 0;
5ab90: 4294 clrl %a4@ <== NOT EXECUTED 5ab92: 4280 clrl %d0 <== NOT EXECUTED
rc = EIO;
}
return 0;
}
5ab94: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 5ab9a: 4e5e unlk %fp <== NOT EXECUTED 5ab9c: 4e75 rts <== NOT EXECUTED
*result = 0;
if (*result >= rtems_rfs_fs_blocks (fs))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_FIND))
printf ("rtems-rfs: block-find: invalid block in table:"
5ab9e: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5aba0: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5aba2: 2f14 movel %a4@,%sp@- <== NOT EXECUTED 5aba4: 4879 0007 361c pea 7361c <CSWTCH.1+0x40> <== NOT EXECUTED 5abaa: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5abb0: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
" block=%" PRId32 ", indirect=%" PRId32 "/%d\n", *result, block, offset);
*result = 0;
5abb4: 4280 clrl %d0 <== NOT EXECUTED 5abb6: 4294 clrl %a4@ <== NOT EXECUTED 5abb8: 60da bras 5ab94 <rtems_rfs_block_find_indirect+0xb0><== NOT EXECUTED
0005ad0c <rtems_rfs_block_get_block_size>:
void
rtems_rfs_block_get_block_size (rtems_rfs_file_system* fs,
rtems_rfs_pos pos,
rtems_rfs_block_size* size)
{
5ad0c: 4e56 ffec linkw %fp,#-20 <== NOT EXECUTED 5ad10: 48d7 043c moveml %d2-%d5/%a2,%sp@ <== NOT EXECUTED 5ad14: 242e 000c movel %fp@(12),%d2 <== NOT EXECUTED 5ad18: 262e 0010 movel %fp@(16),%d3 <== NOT EXECUTED 5ad1c: 246e 0014 moveal %fp@(20),%a2 <== NOT EXECUTED
if (pos == 0)
5ad20: 2002 movel %d2,%d0 <== NOT EXECUTED 5ad22: 8083 orl %d3,%d0 <== NOT EXECUTED 5ad24: 6740 beqs 5ad66 <rtems_rfs_block_get_block_size+0x5a><== NOT EXECUTED
rtems_rfs_block_set_size_zero (size);
else
{
size->count = pos / rtems_rfs_fs_block_size (fs) + 1;
5ad26: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 5ad2a: 4284 clrl %d4 <== NOT EXECUTED 5ad2c: 2a28 0008 movel %a0@(8),%d5 <== NOT EXECUTED 5ad30: 2f05 movel %d5,%sp@- <== NOT EXECUTED 5ad32: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5ad34: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5ad36: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5ad38: 4eb9 0006 f690 jsr 6f690 <__udivdi3> <== NOT EXECUTED 5ad3e: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5ad42: 5281 addql #1,%d1 <== NOT EXECUTED 5ad44: 2481 movel %d1,%a2@ <== NOT EXECUTED
size->offset = pos % rtems_rfs_fs_block_size (fs);
5ad46: 2f05 movel %d5,%sp@- <== NOT EXECUTED 5ad48: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5ad4a: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5ad4c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5ad4e: 4eb9 0006 fabc jsr 6fabc <__umoddi3> <== NOT EXECUTED 5ad54: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5ad58: 2541 0004 movel %d1,%a2@(4) <== NOT EXECUTED
} }
5ad5c: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 <== NOT EXECUTED 5ad62: 4e5e unlk %fp <== NOT EXECUTED 5ad64: 4e75 rts <== NOT EXECUTED
* @param size A pointer to the block size.
*/
static inline void
rtems_rfs_block_set_size_zero (rtems_rfs_block_size* size)
{
size->count = 0;
5ad66: 4292 clrl %a2@ <== NOT EXECUTED
size->offset = 0;
5ad68: 42aa 0004 clrl %a2@(4) <== NOT EXECUTED 5ad6c: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 <== NOT EXECUTED 5ad72: 4e5e unlk %fp <== NOT EXECUTED
0005af84 <rtems_rfs_block_map_close>:
int
rtems_rfs_block_map_close (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map)
{
5af84: 4e56 ffe8 linkw %fp,#-24 5af88: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ 5af8c: 242e 0008 movel %fp@(8),%d2 5af90: 246e 000c moveal %fp@(12),%a2
int rc = 0;
int brc;
if (map->dirty && map->inode)
5af94: 4a12 tstb %a2@
5af96: 675c beqs 5aff4 <rtems_rfs_block_map_close+0x70>
5af98: 202a 0002 movel %a2@(2),%d0
5af9c: 6756 beqs 5aff4 <rtems_rfs_block_map_close+0x70> <== NEVER TAKEN
{
brc = rtems_rfs_inode_load (fs, map->inode);
5af9e: 2f00 movel %d0,%sp@- 5afa0: 2f02 movel %d2,%sp@- 5afa2: 4eb9 0005 0264 jsr 50264 <rtems_rfs_inode_load>
if (brc > 0)
5afa8: 508f addql #8,%sp 5afaa: 4a80 tstl %d0 5afac: 6f00 008a blew 5b038 <rtems_rfs_block_map_close+0xb4>
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
5afb0: 486a 0036 pea %a2@(54) <== NOT EXECUTED 5afb4: 2600 movel %d0,%d3 <== NOT EXECUTED 5afb6: 47f9 0005 bbc0 lea 5bbc0 <rtems_rfs_buffer_handle_release>,%a3<== NOT EXECUTED 5afbc: 2f02 movel %d2,%sp@- <== NOT EXECUTED
map->dirty = false;
}
}
map->inode = NULL;
5afbe: 42aa 0002 clrl %a2@(2) <== NOT EXECUTED 5afc2: 4e93 jsr %a3@ <== NOT EXECUTED 5afc4: 486a 0040 pea %a2@(64) <== NOT EXECUTED
handle->dirty = false;
5afc8: 4200 clrb %d0 <== NOT EXECUTED
handle->bnum = 0;
5afca: 42aa 0038 clrl %a2@(56) <== NOT EXECUTED
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
handle->dirty = false;
5afce: 1540 0036 moveb %d0,%a2@(54) <== NOT EXECUTED
handle->bnum = 0; handle->buffer = NULL;
5afd2: 42aa 003c clrl %a2@(60) <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
5afd6: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5afd8: 4e93 jsr %a3@ <== NOT EXECUTED
handle->dirty = false;
5afda: 4201 clrb %d1 <== NOT EXECUTED
rc = brc;
brc = rtems_rfs_buffer_handle_close (fs, &map->doubly_buffer);
if ((brc > 0) && (rc == 0))
rc = brc;
return rc;
}
5afdc: 2003 movel %d3,%d0 <== NOT EXECUTED 5afde: 1541 0040 moveb %d1,%a2@(64) <== NOT EXECUTED
handle->bnum = 0;
5afe2: 42aa 0042 clrl %a2@(66) <== NOT EXECUTED
handle->buffer = NULL;
5afe6: 42aa 0046 clrl %a2@(70) <== NOT EXECUTED 5afea: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 <== NOT EXECUTED 5aff0: 4e5e unlk %fp <== NOT EXECUTED 5aff2: 4e75 rts <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
5aff4: 486a 0036 pea %a2@(54) 5aff8: 47f9 0005 bbc0 lea 5bbc0 <rtems_rfs_buffer_handle_release>,%a3
int
rtems_rfs_block_map_close (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map)
{
int rc = 0;
5affe: 4283 clrl %d3 5b000: 2f02 movel %d2,%sp@-
map->dirty = false;
}
}
map->inode = NULL;
5b002: 42aa 0002 clrl %a2@(2) 5b006: 4e93 jsr %a3@ 5b008: 486a 0040 pea %a2@(64)
handle->dirty = false;
5b00c: 4200 clrb %d0
handle->bnum = 0;
5b00e: 42aa 0038 clrl %a2@(56)
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
handle->dirty = false;
5b012: 1540 0036 moveb %d0,%a2@(54)
handle->bnum = 0; handle->buffer = NULL;
5b016: 42aa 003c clrl %a2@(60)
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
5b01a: 2f02 movel %d2,%sp@- 5b01c: 4e93 jsr %a3@
handle->dirty = false;
5b01e: 4201 clrb %d1
rc = brc;
brc = rtems_rfs_buffer_handle_close (fs, &map->doubly_buffer);
if ((brc > 0) && (rc == 0))
rc = brc;
return rc;
}
5b020: 2003 movel %d3,%d0 5b022: 1541 0040 moveb %d1,%a2@(64)
handle->bnum = 0;
5b026: 42aa 0042 clrl %a2@(66)
handle->buffer = NULL;
5b02a: 42aa 0046 clrl %a2@(70) 5b02e: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 5b034: 4e5e unlk %fp 5b036: 4e75 rts
return rc;
}
int
rtems_rfs_block_map_close (rtems_rfs_file_system* fs,
5b038: 47ea 0022 lea %a2@(34),%a3 5b03c: 7001 moveq #1,%d0 5b03e: 93c9 subal %a1,%a1
if (rc == 0)
{
int b;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
rtems_rfs_inode_set_block (map->inode, b, map->blocks[b]);
5b040: 206a 0002 moveal %a2@(2),%a0
* @param bno The block number.
*/
static inline void
rtems_rfs_inode_set_block (rtems_rfs_inode_handle* handle, int block, uint32_t bno)
{
rtems_rfs_write_u32 (&handle->node->data.blocks[block], bno);
5b044: 7618 moveq #24,%d3 5b046: 221b movel %a3@+,%d1 5b048: 2801 movel %d1,%d4 5b04a: e6ac lsrl %d3,%d4 5b04c: 2601 movel %d1,%d3 5b04e: e08b lsrl #8,%d3 5b050: 2868 000c moveal %a0@(12),%a4 5b054: 1984 9c1c moveb %d4,%a4@(0000001c,%a1:l:4) 5b058: 2801 movel %d1,%d4
if (rc == 0)
{
int b;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
5b05a: 5289 addql #1,%a1 5b05c: 2868 000c moveal %a0@(12),%a4 5b060: 4244 clrw %d4 5b062: 4844 swap %d4 5b064: 1984 081c moveb %d4,%a4@(0000001c,%d0:l) 5b068: 2868 000c moveal %a0@(12),%a4 5b06c: 1983 081d moveb %d3,%a4@(0000001d,%d0:l) 5b070: 7605 moveq #5,%d3 5b072: 2868 000c moveal %a0@(12),%a4 5b076: 1981 081e moveb %d1,%a4@(0000001e,%d0:l)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
5b07a: 7201 moveq #1,%d1 5b07c: 5880 addql #4,%d0 5b07e: 1141 0010 moveb %d1,%a0@(16) 5b082: b689 cmpl %a1,%d3
5b084: 66ba bnes 5b040 <rtems_rfs_block_map_close+0xbc>
rtems_rfs_inode_set_block (map->inode, b, map->blocks[b]);
rtems_rfs_inode_set_block_count (map->inode, map->size.count);
5b086: 206a 0002 moveal %a2@(2),%a0
* @param block_count The block count.
*/
static inline void
rtems_rfs_inode_set_block_count (rtems_rfs_inode_handle* handle, uint32_t block_count)
{
rtems_rfs_write_u32 (&handle->node->block_count, block_count);
5b08a: 7218 moveq #24,%d1
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
5b08c: 47f9 0005 bbc0 lea 5bbc0 <rtems_rfs_buffer_handle_release>,%a3 5b092: 202a 0006 movel %a2@(6),%d0 5b096: 2600 movel %d0,%d3 5b098: e2ab lsrl %d1,%d3 5b09a: 2200 movel %d0,%d1 5b09c: e089 lsrl #8,%d1 5b09e: 2268 000c moveal %a0@(12),%a1 5b0a2: 1343 000c moveb %d3,%a1@(12) 5b0a6: 2600 movel %d0,%d3 5b0a8: 2268 000c moveal %a0@(12),%a1 5b0ac: 4243 clrw %d3 5b0ae: 4843 swap %d3 5b0b0: 1343 000d moveb %d3,%a1@(13)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
5b0b4: 7601 moveq #1,%d3
* @param block_count The block count.
*/
static inline void
rtems_rfs_inode_set_block_count (rtems_rfs_inode_handle* handle, uint32_t block_count)
{
rtems_rfs_write_u32 (&handle->node->block_count, block_count);
5b0b6: 2268 000c moveal %a0@(12),%a1 5b0ba: 1341 000e moveb %d1,%a1@(14) 5b0be: 2268 000c moveal %a0@(12),%a1 5b0c2: 1340 000f moveb %d0,%a1@(15)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
5b0c6: 1143 0010 moveb %d3,%a0@(16)
rtems_rfs_inode_set_block_offset (map->inode, map->size.offset);
5b0ca: 206a 0002 moveal %a2@(2),%a0 5b0ce: 302a 000c movew %a2@(12),%d0
*/
static inline void
rtems_rfs_inode_set_block_offset (rtems_rfs_inode_handle* handle,
uint16_t block_offset)
{
rtems_rfs_write_u16 (&handle->node->block_offset, block_offset);
5b0d2: 2268 000c moveal %a0@(12),%a1 5b0d6: 2200 movel %d0,%d1 5b0d8: e089 lsrl #8,%d1 5b0da: 1341 000a moveb %d1,%a1@(10)
* @param block_count The last map block number.
*/
static inline void
rtems_rfs_inode_set_last_map_block (rtems_rfs_inode_handle* handle, uint32_t last_map_block)
{
rtems_rfs_write_u32 (&handle->node->last_map_block, last_map_block);
5b0de: 7218 moveq #24,%d1
*/
static inline void
rtems_rfs_inode_set_block_offset (rtems_rfs_inode_handle* handle,
uint16_t block_offset)
{
rtems_rfs_write_u16 (&handle->node->block_offset, block_offset);
5b0e0: 2268 000c moveal %a0@(12),%a1 5b0e4: 1340 000b moveb %d0,%a1@(11)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
5b0e8: 1143 0010 moveb %d3,%a0@(16)
rtems_rfs_inode_set_last_map_block (map->inode, map->last_map_block);
5b0ec: 206a 0002 moveal %a2@(2),%a0 5b0f0: 202a 001a movel %a2@(26),%d0
* @param block_count The last map block number.
*/
static inline void
rtems_rfs_inode_set_last_map_block (rtems_rfs_inode_handle* handle, uint32_t last_map_block)
{
rtems_rfs_write_u32 (&handle->node->last_map_block, last_map_block);
5b0f4: 2600 movel %d0,%d3 5b0f6: e2ab lsrl %d1,%d3 5b0f8: 2200 movel %d0,%d1 5b0fa: e089 lsrl #8,%d1 5b0fc: 2268 000c moveal %a0@(12),%a1 5b100: 1343 0030 moveb %d3,%a1@(48) 5b104: 2600 movel %d0,%d3 5b106: 2268 000c moveal %a0@(12),%a1 5b10a: 4243 clrw %d3 5b10c: 4843 swap %d3 5b10e: 1343 0031 moveb %d3,%a1@(49)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
5b112: 7601 moveq #1,%d3
* @param block_count The last map block number.
*/
static inline void
rtems_rfs_inode_set_last_map_block (rtems_rfs_inode_handle* handle, uint32_t last_map_block)
{
rtems_rfs_write_u32 (&handle->node->last_map_block, last_map_block);
5b114: 2268 000c moveal %a0@(12),%a1 5b118: 1341 0032 moveb %d1,%a1@(50)
* @param block_count The last data block number.
*/
static inline void
rtems_rfs_inode_set_last_data_block (rtems_rfs_inode_handle* handle, uint32_t last_data_block)
{
rtems_rfs_write_u32 (&handle->node->last_data_block, last_data_block);
5b11c: 7218 moveq #24,%d1
* @param block_count The last map block number.
*/
static inline void
rtems_rfs_inode_set_last_map_block (rtems_rfs_inode_handle* handle, uint32_t last_map_block)
{
rtems_rfs_write_u32 (&handle->node->last_map_block, last_map_block);
5b11e: 2268 000c moveal %a0@(12),%a1 5b122: 1340 0033 moveb %d0,%a1@(51)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
5b126: 1143 0010 moveb %d3,%a0@(16)
rtems_rfs_inode_set_last_data_block (map->inode, map->last_data_block);
5b12a: 206a 0002 moveal %a2@(2),%a0 5b12e: 202a 001e movel %a2@(30),%d0
* @param block_count The last data block number.
*/
static inline void
rtems_rfs_inode_set_last_data_block (rtems_rfs_inode_handle* handle, uint32_t last_data_block)
{
rtems_rfs_write_u32 (&handle->node->last_data_block, last_data_block);
5b132: 2600 movel %d0,%d3 5b134: e2ab lsrl %d1,%d3 5b136: 2200 movel %d0,%d1 5b138: e089 lsrl #8,%d1 5b13a: 2268 000c moveal %a0@(12),%a1 5b13e: 1343 0034 moveb %d3,%a1@(52) 5b142: 2600 movel %d0,%d3 5b144: 2268 000c moveal %a0@(12),%a1 5b148: 4243 clrw %d3 5b14a: 4843 swap %d3 5b14c: 1343 0035 moveb %d3,%a1@(53) 5b150: 2268 000c moveal %a0@(12),%a1 5b154: 1341 0036 moveb %d1,%a1@(54)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
5b158: 7601 moveq #1,%d3
* @param block_count The last data block number.
*/
static inline void
rtems_rfs_inode_set_last_data_block (rtems_rfs_inode_handle* handle, uint32_t last_data_block)
{
rtems_rfs_write_u32 (&handle->node->last_data_block, last_data_block);
5b15a: 2268 000c moveal %a0@(12),%a1 5b15e: 1340 0037 moveb %d0,%a1@(55)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
5b162: 1143 0010 moveb %d3,%a0@(16)
brc = rtems_rfs_inode_unload (fs, map->inode, true);
5b166: 4878 0001 pea 1 <ADD> 5b16a: 2f2a 0002 movel %a2@(2),%sp@- 5b16e: 2f02 movel %d2,%sp@- 5b170: 4eb9 0005 03d0 jsr 503d0 <rtems_rfs_inode_unload> 5b176: 4fef 000c lea %sp@(12),%sp 5b17a: 2600 movel %d0,%d3 5b17c: 4680 notl %d0
if (brc > 0)
rc = brc;
map->dirty = false;
5b17e: 4212 clrb %a2@
rtems_rfs_inode_set_block_count (map->inode, map->size.count);
rtems_rfs_inode_set_block_offset (map->inode, map->size.offset);
rtems_rfs_inode_set_last_map_block (map->inode, map->last_map_block);
rtems_rfs_inode_set_last_data_block (map->inode, map->last_data_block);
brc = rtems_rfs_inode_unload (fs, map->inode, true);
5b180: d080 addl %d0,%d0 5b182: 9180 subxl %d0,%d0 5b184: 486a 0036 pea %a2@(54) 5b188: c680 andl %d0,%d3 5b18a: 2f02 movel %d2,%sp@-
map->dirty = false;
}
}
map->inode = NULL;
5b18c: 42aa 0002 clrl %a2@(2) 5b190: 4e93 jsr %a3@ 5b192: 486a 0040 pea %a2@(64)
handle->dirty = false;
5b196: 4200 clrb %d0
handle->bnum = 0;
5b198: 42aa 0038 clrl %a2@(56)
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
handle->dirty = false;
5b19c: 1540 0036 moveb %d0,%a2@(54)
handle->bnum = 0; handle->buffer = NULL;
5b1a0: 42aa 003c clrl %a2@(60)
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
5b1a4: 2f02 movel %d2,%sp@- 5b1a6: 4e93 jsr %a3@
handle->dirty = false;
5b1a8: 4201 clrb %d1
rc = brc;
brc = rtems_rfs_buffer_handle_close (fs, &map->doubly_buffer);
if ((brc > 0) && (rc == 0))
rc = brc;
return rc;
}
5b1aa: 2003 movel %d3,%d0 5b1ac: 1541 0040 moveb %d1,%a2@(64)
handle->bnum = 0;
5b1b0: 42aa 0042 clrl %a2@(66)
handle->buffer = NULL;
5b1b4: 42aa 0046 clrl %a2@(70) 5b1b8: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4
5b1be: 4e5e unlk %fp <== NOT EXECUTED
0005b1c2 <rtems_rfs_block_map_find>:
int
rtems_rfs_block_map_find (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
rtems_rfs_block_pos* bpos,
rtems_rfs_block_no* block)
{
5b1c2: 4e56 ffe0 linkw %fp,#-32 5b1c6: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 5b1ca: 286e 0014 moveal %fp@(20),%a4 5b1ce: 266e 0010 moveal %fp@(16),%a3 5b1d2: 246e 000c moveal %fp@(12),%a2
int rc = 0;
*block = 0;
5b1d6: 4294 clrl %a4@
int
rtems_rfs_block_map_find (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
rtems_rfs_block_pos* bpos,
rtems_rfs_block_no* block)
{
5b1d8: 2a6e 0008 moveal %fp@(8),%a5
*block = 0;
/*
* Range checking here makes the remaining logic simpler.
*/
if (rtems_rfs_block_pos_block_past_end (bpos, &map->size))
5b1dc: 2013 movel %a3@,%d0 5b1de: 222a 0006 movel %a2@(6),%d1 5b1e2: 4a80 tstl %d0
5b1e4: 6710 beqs 5b1f6 <rtems_rfs_block_map_find+0x34>
5b1e6: 4a81 tstl %d1
5b1e8: 660c bnes 5b1f6 <rtems_rfs_block_map_find+0x34> <== ALWAYS TAKEN
return ENXIO;
5b1ea: 7006 moveq #6,%d0
rtems_rfs_block_copy_bpos (&map->bpos, bpos);
map->bpos.block = *block;
}
return rc;
}
5b1ec: 4cee 3c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a5 5b1f2: 4e5e unlk %fp 5b1f4: 4e75 rts
*block = 0;
/*
* Range checking here makes the remaining logic simpler.
*/
if (rtems_rfs_block_pos_block_past_end (bpos, &map->size))
5b1f6: b280 cmpl %d0,%d1
5b1f8: 63f0 blss 5b1ea <rtems_rfs_block_map_find+0x28>
return ENXIO;
/*
* If the block position is the same and we have found the block just return it.
*/
if ((bpos->bno == map->bpos.bno) && (map->bpos.block != 0))
5b1fa: b0aa 000e cmpl %a2@(14),%d0
5b1fe: 672a beqs 5b22a <rtems_rfs_block_map_find+0x68> <== ALWAYS TAKEN
/*
* Determine the type of access we need to perform. If the number of blocks
* is less than or equal to the number of slots in the inode the blocks are
* directly accessed.
*/
if (map->size.count <= RTEMS_RFS_INODE_BLOCKS)
5b200: 7405 moveq #5,%d2 5b202: b481 cmpl %d1,%d2
5b204: 6546 bcss 5b24c <rtems_rfs_block_map_find+0x8a> <== NEVER TAKEN
{
*block = map->blocks[bpos->bno];
5b206: 28b2 0c22 movel %a2@(00000022,%d0:l:4),%a4@
}
}
if (rc == 0)
{
rtems_rfs_block_copy_bpos (&map->bpos, bpos);
5b20a: 2553 000e movel %a3@,%a2@(14)
map->bpos.block = *block;
5b20e: 4280 clrl %d0
}
}
if (rc == 0)
{
rtems_rfs_block_copy_bpos (&map->bpos, bpos);
5b210: 256b 0004 0012 movel %a3@(4),%a2@(18) 5b216: 256b 0008 0016 movel %a3@(8),%a2@(22)
map->bpos.block = *block;
5b21c: 2554 0016 movel %a4@,%a2@(22)
}
return rc;
}
5b220: 4cee 3c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a5 5b226: 4e5e unlk %fp 5b228: 4e75 rts
return ENXIO;
/*
* If the block position is the same and we have found the block just return it.
*/
if ((bpos->bno == map->bpos.bno) && (map->bpos.block != 0))
5b22a: 206a 0016 moveal %a2@(22),%a0 5b22e: 4a88 tstl %a0
5b230: 67ce beqs 5b200 <rtems_rfs_block_map_find+0x3e> <== ALWAYS TAKEN
{
*block = map->bpos.block;
5b232: 2888 movel %a0,%a4@ <== NOT EXECUTED
}
}
if (rc == 0)
{
rtems_rfs_block_copy_bpos (&map->bpos, bpos);
5b234: 2553 000e movel %a3@,%a2@(14) <== NOT EXECUTED
map->bpos.block = *block;
5b238: 4280 clrl %d0 <== NOT EXECUTED
}
}
if (rc == 0)
{
rtems_rfs_block_copy_bpos (&map->bpos, bpos);
5b23a: 256b 0004 0012 movel %a3@(4),%a2@(18) <== NOT EXECUTED 5b240: 256b 0008 0016 movel %a3@(8),%a2@(22) <== NOT EXECUTED
map->bpos.block = *block;
5b246: 2554 0016 movel %a4@,%a2@(22) <== NOT EXECUTED 5b24a: 60d4 bras 5b220 <rtems_rfs_block_map_find+0x5e> <== NOT EXECUTED
* The map is either singly or doubly indirect.
*/
rtems_rfs_block_no direct;
rtems_rfs_block_no singly;
direct = bpos->bno % fs->blocks_per_block;
5b24c: 262d 0030 movel %a5@(48),%d3 <== NOT EXECUTED 5b250: 4c43 0002 remul %d3,%d2,%d0 <== NOT EXECUTED 5b254: 4c43 0000 remul %d3,%d0,%d0 <== NOT EXECUTED
singly = bpos->bno / fs->blocks_per_block;
5b258: 2d40 fffc movel %d0,%fp@(-4) <== NOT EXECUTED
if (map->size.count <= fs->block_map_singly_blocks)
5b25c: b2ad 0034 cmpl %a5@(52),%d1 <== NOT EXECUTED 5b260: 635e blss 5b2c0 <rtems_rfs_block_map_find+0xfe> <== NOT EXECUTED
* The map is doubly indirect.
*/
rtems_rfs_block_no doubly;
doubly = singly / fs->blocks_per_block;
singly %= fs->blocks_per_block;
5b262: 4c43 0004 remul %d3,%d4,%d0 <== NOT EXECUTED 5b266: 4c43 0000 remul %d3,%d0,%d0 <== NOT EXECUTED 5b26a: 2d44 fffc movel %d4,%fp@(-4) <== NOT EXECUTED
if (map->size.count < fs->block_map_doubly_blocks)
5b26e: b2ad 0038 cmpl %a5@(56),%d1 <== NOT EXECUTED 5b272: 6400 ff76 bccw 5b1ea <rtems_rfs_block_map_find+0x28> <== NOT EXECUTED
{
rc = rtems_rfs_block_find_indirect (fs,
5b276: 486e fffc pea %fp@(-4) <== NOT EXECUTED 5b27a: 263c 0005 aae4 movel #371428,%d3 <== NOT EXECUTED 5b280: 2043 moveal %d3,%a0 <== NOT EXECUTED 5b282: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5b284: 2f32 0c22 movel %a2@(00000022,%d0:l:4),%sp@- <== NOT EXECUTED 5b288: 486a 0040 pea %a2@(64) <== NOT EXECUTED 5b28c: 2f0d movel %a5,%sp@- <== NOT EXECUTED 5b28e: 4e90 jsr %a0@ <== NOT EXECUTED
&map->doubly_buffer,
map->blocks[doubly],
singly, &singly);
if (rc == 0)
5b290: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 5b294: 4a80 tstl %d0 <== NOT EXECUTED 5b296: 6600 ff54 bnew 5b1ec <rtems_rfs_block_map_find+0x2a> <== NOT EXECUTED
{
rc = rtems_rfs_block_find_indirect (fs,
5b29a: 2f0c movel %a4,%sp@- <== NOT EXECUTED 5b29c: 2043 moveal %d3,%a0 <== NOT EXECUTED 5b29e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5b2a0: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 5b2a4: 486a 0036 pea %a2@(54) <== NOT EXECUTED 5b2a8: 2f0d movel %a5,%sp@- <== NOT EXECUTED 5b2aa: 4e90 jsr %a0@ <== NOT EXECUTED 5b2ac: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
}
}
}
}
if (rc == 0)
5b2b0: 4a80 tstl %d0 <== NOT EXECUTED 5b2b2: 6700 ff56 beqw 5b20a <rtems_rfs_block_map_find+0x48> <== NOT EXECUTED
rtems_rfs_block_copy_bpos (&map->bpos, bpos);
map->bpos.block = *block;
}
return rc;
}
5b2b6: 4cee 3c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a5 <== NOT EXECUTED 5b2bc: 4e5e unlk %fp <== NOT EXECUTED 5b2be: 4e75 rts <== NOT EXECUTED
{
/*
* This is a single indirect table of blocks anchored off a slot in the
* inode.
*/
rc = rtems_rfs_block_find_indirect (fs,
5b2c0: 2f0c movel %a4,%sp@- <== NOT EXECUTED 5b2c2: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5b2c4: 2f32 0c22 movel %a2@(00000022,%d0:l:4),%sp@- <== NOT EXECUTED 5b2c8: 486a 0036 pea %a2@(54) <== NOT EXECUTED 5b2cc: 2f0d movel %a5,%sp@- <== NOT EXECUTED 5b2ce: 4eba f814 jsr %pc@(5aae4 <rtems_rfs_block_find_indirect>)<== NOT EXECUTED 5b2d2: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
}
}
}
}
if (rc == 0)
5b2d6: 4a80 tstl %d0 <== NOT EXECUTED 5b2d8: 66dc bnes 5b2b6 <rtems_rfs_block_map_find+0xf4> <== NOT EXECUTED 5b2da: 6000 ff2e braw 5b20a <rtems_rfs_block_map_find+0x48> <== NOT EXECUTED
0005b38e <rtems_rfs_block_map_grow>:
int
rtems_rfs_block_map_grow (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
size_t blocks,
rtems_rfs_block_no* new_block)
{
5b38e: 4e56 ffc0 linkw %fp,#-64 5b392: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
int b;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
5b396: 4878 2000 pea 2000 <D_MAX_EXP+0x1801>
int
rtems_rfs_block_map_grow (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
size_t blocks,
rtems_rfs_block_no* new_block)
{
5b39a: 266e 0008 moveal %fp@(8),%a3
int b;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
5b39e: 42a7 clrl %sp@-
int
rtems_rfs_block_map_grow (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
size_t blocks,
rtems_rfs_block_no* new_block)
{
5b3a0: 246e 000c moveal %fp@(12),%a2 5b3a4: 2a2e 0010 movel %fp@(16),%d5 5b3a8: 2a6e 0014 moveal %fp@(20),%a5
int b;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
5b3ac: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> 5b3b2: 508f addql #8,%sp 5b3b4: 4a00 tstb %d0
5b3b6: 661a bnes 5b3d2 <rtems_rfs_block_map_grow+0x44> <== NEVER TAKEN
printf ("rtems-rfs: block-map-grow: entry: blocks=%zd count=%" PRIu32 "\n",
blocks, map->size.count);
if ((map->size.count + blocks) >= rtems_rfs_fs_max_block_map_blocks (fs))
5b3b8: 2005 movel %d5,%d0 5b3ba: d0aa 0006 addl %a2@(6),%d0 5b3be: b0ab 0038 cmpl %a3@(56),%d0
5b3c2: 6530 bcss 5b3f4 <rtems_rfs_block_map_grow+0x66> <== ALWAYS TAKEN
return EFBIG;
5b3c4: 761b moveq #27,%d3 <== NOT EXECUTED
map->last_data_block = block;
map->dirty = true;
}
return 0;
}
5b3c6: 2003 movel %d3,%d0 <== NOT EXECUTED 5b3c8: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5b3ce: 4e5e unlk %fp <== NOT EXECUTED 5b3d0: 4e75 rts <== NOT EXECUTED
rtems_rfs_block_no* new_block)
{
int b;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
printf ("rtems-rfs: block-map-grow: entry: blocks=%zd count=%" PRIu32 "\n",
5b3d2: 2f2a 0006 movel %a2@(6),%sp@- <== NOT EXECUTED 5b3d6: 2f05 movel %d5,%sp@- <== NOT EXECUTED 5b3d8: 4879 0007 3667 pea 73667 <CSWTCH.1+0x8b> <== NOT EXECUTED 5b3de: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5b3e4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
blocks, map->size.count);
if ((map->size.count + blocks) >= rtems_rfs_fs_max_block_map_blocks (fs))
5b3e8: 2005 movel %d5,%d0 <== NOT EXECUTED 5b3ea: d0aa 0006 addl %a2@(6),%d0 <== NOT EXECUTED 5b3ee: b0ab 0038 cmpl %a3@(56),%d0 <== NOT EXECUTED 5b3f2: 64d0 bccs 5b3c4 <rtems_rfs_block_map_grow+0x36> <== NOT EXECUTED
/*
* Allocate a block at a time. The buffer handles hold the blocks so adding
* this way does not thrash the cache with lots of requests.
*/
for (b = 0; b < blocks; b++)
5b3f4: 4a85 tstl %d5
5b3f6: 6768 beqs 5b460 <rtems_rfs_block_map_grow+0xd2> <== NEVER TAKEN
}
singly_block = rtems_rfs_block_get_number (&map->doubly_buffer,
singly);
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
5b3f8: 2e0a movel %a2,%d7
singly,
singly_block);
}
else
{
rc = rtems_rfs_buffer_handle_request (fs,
5b3fa: 41ea 0040 lea %a2@(64),%a0
}
singly_block = rtems_rfs_block_get_number (&map->doubly_buffer,
singly);
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
5b3fe: 0687 0000 0036 addil #54,%d7 5b404: 2c0e movel %fp,%d6
map->last_map_block = new_block;
return 0;
}
int
rtems_rfs_block_map_grow (rtems_rfs_file_system* fs,
5b406: 4282 clrl %d2 5b408: 5186 subql #8,%d6 5b40a: 49f9 0004 fde2 lea 4fde2 <rtems_rfs_group_bitmap_alloc>,%a4
/*
* Allocate a block at a time. The buffer handles hold the blocks so adding
* this way does not thrash the cache with lots of requests.
*/
for (b = 0; b < blocks; b++)
5b410: 202a 001e movel %a2@(30),%d0
singly,
singly_block);
}
else
{
rc = rtems_rfs_buffer_handle_request (fs,
5b414: 2d48 fff4 movel %a0,%fp@(-12)
* doubly indirect block as well. Both always occur when direct is 0
* and the doubly indirect block when singly is 0.
*/
if (direct == 0)
{
rc = rtems_rfs_block_map_indirect_alloc (fs, map,
5b418: 2d47 ffe8 movel %d7,%fp@(-24)
/*
* Allocate the block. If an indirect block is needed and cannot be
* allocated free this block.
*/
rc = rtems_rfs_group_bitmap_alloc (fs, map->last_data_block,
5b41c: 2f06 movel %d6,%sp@- 5b41e: 42a7 clrl %sp@- 5b420: 2f00 movel %d0,%sp@- 5b422: 2f0b movel %a3,%sp@- 5b424: 4e94 jsr %a4@
false, &block);
if (rc > 0)
5b426: 4fef 0010 lea %sp@(16),%sp 5b42a: 4a80 tstl %d0 5b42c: 6e00 02ee bgtw 5b71c <rtems_rfs_block_map_grow+0x38e>
return rc;
if (map->size.count < RTEMS_RFS_INODE_BLOCKS)
5b430: 262a 0006 movel %a2@(6),%d3 5b434: 7004 moveq #4,%d0 5b436: b083 cmpl %d3,%d0
5b438: 6534 bcss 5b46e <rtems_rfs_block_map_grow+0xe0>
map->blocks[map->size.count] = block;
5b43a: 202e fff8 movel %fp@(-8),%d0 5b43e: 2580 3c22 movel %d0,%a2@(00000022,%d3:l:4)
}
rtems_rfs_block_set_number (&map->singly_buffer, direct, block);
}
map->size.count++;
5b442: 5283 addql #1,%d3
map->size.offset = 0;
5b444: 42aa 000a clrl %a2@(10)
}
rtems_rfs_block_set_number (&map->singly_buffer, direct, block);
}
map->size.count++;
5b448: 2543 0006 movel %d3,%a2@(6)
map->size.offset = 0;
if (b == 0)
5b44c: 4a82 tstl %d2
5b44e: 6602 bnes 5b452 <rtems_rfs_block_map_grow+0xc4> <== NEVER TAKEN
*new_block = block;
5b450: 2a80 movel %d0,%a5@
map->last_data_block = block;
5b452: 2540 001e movel %d0,%a2@(30)
/*
* Allocate a block at a time. The buffer handles hold the blocks so adding
* this way does not thrash the cache with lots of requests.
*/
for (b = 0; b < blocks; b++)
5b456: 5282 addql #1,%d2
map->size.offset = 0;
if (b == 0)
*new_block = block;
map->last_data_block = block;
map->dirty = true;
5b458: 14bc 0001 moveb #1,%a2@
/*
* Allocate a block at a time. The buffer handles hold the blocks so adding
* this way does not thrash the cache with lots of requests.
*/
for (b = 0; b < blocks; b++)
5b45c: ba82 cmpl %d2,%d5
5b45e: 66bc bnes 5b41c <rtems_rfs_block_map_grow+0x8e> <== NEVER TAKEN
*new_block = block;
map->last_data_block = block;
map->dirty = true;
}
return 0;
5b460: 4283 clrl %d3
}
5b462: 2003 movel %d3,%d0 5b464: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5 5b46a: 4e5e unlk %fp 5b46c: 4e75 rts
* Single indirect access is occuring. It could still be doubly indirect.
*/
rtems_rfs_block_no direct;
rtems_rfs_block_no singly;
direct = map->size.count % fs->blocks_per_block;
5b46e: 202b 0030 movel %a3@(48),%d0 5b472: 2203 movel %d3,%d1 5b474: 4c40 1004 remul %d0,%d4,%d1 5b478: 4c40 1001 remul %d0,%d1,%d1
singly = map->size.count / fs->blocks_per_block;
if (map->size.count < fs->block_map_singly_blocks)
5b47c: b6ab 0034 cmpl %a3@(52),%d3 5b480: 6400 00aa bccw 5b52c <rtems_rfs_block_map_grow+0x19e>
* Singly indirect tables are being used. Allocate a new block for a
* mapping table if direct is 0 or we are moving up (upping). If upping
* move the direct blocks into the table and if not this is the first
* entry of a new block.
*/
if ((direct == 0) ||
5b484: 4a84 tstl %d4
5b486: 677c beqs 5b504 <rtems_rfs_block_map_grow+0x176>
5b488: 4a81 tstl %d1
5b48a: 6606 bnes 5b492 <rtems_rfs_block_map_grow+0x104>
((singly == 0) && (direct == RTEMS_RFS_INODE_BLOCKS)))
5b48c: 7e05 moveq #5,%d7 5b48e: be84 cmpl %d4,%d7
5b490: 6772 beqs 5b504 <rtems_rfs_block_map_grow+0x176>
&map->blocks[singly],
upping);
}
else
{
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
5b492: 4878 0001 pea 1 <ADD> 5b496: 2f32 1c22 movel %a2@(00000022,%d1:l:4),%sp@- 5b49a: 2f2e ffe8 movel %fp@(-24),%sp@- 5b49e: 2f0b movel %a3,%sp@- 5b4a0: 4eb9 0005 bd6e jsr 5bd6e <rtems_rfs_buffer_handle_request> 5b4a6: 4fef 0010 lea %sp@(16),%sp
singly_block = rtems_rfs_block_get_number (&map->doubly_buffer,
singly);
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
singly_block, true);
if (rc > 0)
5b4aa: 4a80 tstl %d0 5b4ac: 6e00 024e bgtw 5b6fc <rtems_rfs_block_map_grow+0x36e>
return rc;
}
}
}
rtems_rfs_block_set_number (&map->singly_buffer, direct, block);
5b4b0: 206a 003c moveal %a2@(60),%a0 5b4b4: 43ee fff8 lea %fp@(-8),%a1 5b4b8: 2068 001e moveal %a0@(30),%a0 5b4bc: e58c lsll #2,%d4 5b4be: 7001 moveq #1,%d0 5b4c0: 1191 4800 moveb %a1@,%a0@(00000000,%d4:l) 5b4c4: 43ee fff9 lea %fp@(-7),%a1 5b4c8: 206a 003c moveal %a2@(60),%a0 5b4cc: 2068 001e moveal %a0@(30),%a0 5b4d0: 1191 4801 moveb %a1@,%a0@(00000001,%d4:l) 5b4d4: 43ee fffa lea %fp@(-6),%a1 5b4d8: 206a 003c moveal %a2@(60),%a0 5b4dc: 2068 001e moveal %a0@(30),%a0 5b4e0: 1191 4802 moveb %a1@,%a0@(00000002,%d4:l) 5b4e4: 43ee fffb lea %fp@(-5),%a1 5b4e8: 206a 003c moveal %a2@(60),%a0 5b4ec: 2068 001e moveal %a0@(30),%a0 5b4f0: 1191 4803 moveb %a1@,%a0@(00000003,%d4:l) 5b4f4: 1540 0036 moveb %d0,%a2@(54) 5b4f8: 262a 0006 movel %a2@(6),%d3 5b4fc: 202e fff8 movel %fp@(-8),%d0 5b500: 6000 ff40 braw 5b442 <rtems_rfs_block_map_grow+0xb4>
/*
* Upping is when we move from direct to singly indirect.
*/
bool upping;
upping = map->size.count == RTEMS_RFS_INODE_BLOCKS;
rc = rtems_rfs_block_map_indirect_alloc (fs, map,
5b504: 7005 moveq #5,%d0 5b506: b083 cmpl %d3,%d0 5b508: 57c0 seq %d0 5b50a: 49c0 extbl %d0 5b50c: 4480 negl %d0 5b50e: 2f00 movel %d0,%sp@- 5b510: 4872 1c22 pea %a2@(00000022,%d1:l:4) 5b514: 2f2e ffe8 movel %fp@(-24),%sp@- 5b518: 2f0a movel %a2,%sp@- 5b51a: 2f0b movel %a3,%sp@- 5b51c: 4eba f45e jsr %pc@(5a97c <rtems_rfs_block_map_indirect_alloc>)
* move the direct blocks into the table and if not this is the first
* entry of a new block.
*/
if ((direct == 0) ||
((singly == 0) && (direct == RTEMS_RFS_INODE_BLOCKS)))
{
5b520: 4fef 0014 lea %sp@(20),%sp
singly_block = rtems_rfs_block_get_number (&map->doubly_buffer,
singly);
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
singly_block, true);
if (rc > 0)
5b524: 4a80 tstl %d0
5b526: 6f88 bles 5b4b0 <rtems_rfs_block_map_grow+0x122> <== ALWAYS TAKEN
5b528: 6000 01d2 braw 5b6fc <rtems_rfs_block_map_grow+0x36e> <== NOT EXECUTED
* Doubly indirect tables are being used.
*/
rtems_rfs_block_no doubly;
rtems_rfs_block_no singly_block;
doubly = singly / fs->blocks_per_block;
5b52c: 4c40 1003 remul %d0,%d3,%d1 5b530: 4c40 1001 remul %d0,%d1,%d1
* Allocate a new block for a singly indirect table if direct is 0 as
* it is the first entry of a new block. We may also need to allocate a
* doubly indirect block as well. Both always occur when direct is 0
* and the doubly indirect block when singly is 0.
*/
if (direct == 0)
5b534: 4a84 tstl %d4 5b536: 6600 0148 bnew 5b680 <rtems_rfs_block_map_grow+0x2f2>
{
rc = rtems_rfs_block_map_indirect_alloc (fs, map,
5b53a: 42a7 clrl %sp@- 5b53c: 486e fffc pea %fp@(-4) 5b540: 2f2e ffe8 movel %fp@(-24),%sp@- 5b544: 2f0a movel %a2,%sp@- 5b546: 2d41 fff0 movel %d1,%fp@(-16) 5b54a: 2f0b movel %a3,%sp@- 5b54c: 4eba f42e jsr %pc@(5a97c <rtems_rfs_block_map_indirect_alloc>)
&map->singly_buffer,
&singly_block,
false);
if (rc > 0)
5b550: 222e fff0 movel %fp@(-16),%d1 5b554: 4fef 0014 lea %sp@(20),%sp 5b558: 4a80 tstl %d0 5b55a: 6e00 01a0 bgtw 5b6fc <rtems_rfs_block_map_grow+0x36e>
/*
* Allocate a new block for a doubly indirect table if singly is 0 as
* it is the first entry of a new singly indirect block.
*/
if ((singly == 0) ||
5b55e: 4a83 tstl %d3 5b560: 6700 00c8 beqw 5b62a <rtems_rfs_block_map_grow+0x29c> 5b564: 4a81 tstl %d1
5b566: 6608 bnes 5b570 <rtems_rfs_block_map_grow+0x1e2> <== NEVER TAKEN
((doubly == 0) && (singly == RTEMS_RFS_INODE_BLOCKS)))
5b568: 7e05 moveq #5,%d7 5b56a: be83 cmpl %d3,%d7 5b56c: 6700 00bc beqw 5b62a <rtems_rfs_block_map_grow+0x29c>
return rc;
}
}
else
{
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
5b570: 4878 0001 pea 1 <ADD> 5b574: 2f32 1c22 movel %a2@(00000022,%d1:l:4),%sp@- 5b578: 2f2e fff4 movel %fp@(-12),%sp@- 5b57c: 2f0b movel %a3,%sp@- 5b57e: 4eb9 0005 bd6e jsr 5bd6e <rtems_rfs_buffer_handle_request>
map->blocks[doubly], true);
if (rc > 0)
5b584: 4fef 0010 lea %sp@(16),%sp 5b588: 4a80 tstl %d0 5b58a: 6e00 00c8 bgtw 5b654 <rtems_rfs_block_map_grow+0x2c6>
rtems_rfs_group_bitmap_free (fs, false, block);
return rc;
}
}
rtems_rfs_block_set_number (&map->doubly_buffer,
5b58e: 206a 0046 moveal %a2@(70),%a0 5b592: 43ee fffc lea %fp@(-4),%a1 5b596: 2068 001e moveal %a0@(30),%a0 5b59a: e58b lsll #2,%d3 5b59c: 7001 moveq #1,%d0
return rc;
}
}
}
rtems_rfs_block_set_number (&map->singly_buffer, direct, block);
5b59e: e58c lsll #2,%d4
rtems_rfs_group_bitmap_free (fs, false, block);
return rc;
}
}
rtems_rfs_block_set_number (&map->doubly_buffer,
5b5a0: 1191 3800 moveb %a1@,%a0@(00000000,%d3:l) 5b5a4: 43ee fffd lea %fp@(-3),%a1 5b5a8: 206a 0046 moveal %a2@(70),%a0 5b5ac: 2068 001e moveal %a0@(30),%a0 5b5b0: 1191 3801 moveb %a1@,%a0@(00000001,%d3:l) 5b5b4: 43ee fffe lea %fp@(-2),%a1 5b5b8: 206a 0046 moveal %a2@(70),%a0 5b5bc: 2068 001e moveal %a0@(30),%a0 5b5c0: 1191 3802 moveb %a1@,%a0@(00000002,%d3:l) 5b5c4: 43ee ffff lea %fp@(-1),%a1 5b5c8: 206a 0046 moveal %a2@(70),%a0 5b5cc: 2068 001e moveal %a0@(30),%a0 5b5d0: 1191 3803 moveb %a1@,%a0@(00000003,%d3:l)
return rc;
}
}
}
rtems_rfs_block_set_number (&map->singly_buffer, direct, block);
5b5d4: 43ee fff8 lea %fp@(-8),%a1 5b5d8: 206a 003c moveal %a2@(60),%a0 5b5dc: 2068 001e moveal %a0@(30),%a0
rtems_rfs_group_bitmap_free (fs, false, block);
return rc;
}
}
rtems_rfs_block_set_number (&map->doubly_buffer,
5b5e0: 1540 0040 moveb %d0,%a2@(64)
return rc;
}
}
}
rtems_rfs_block_set_number (&map->singly_buffer, direct, block);
5b5e4: 1191 4800 moveb %a1@,%a0@(00000000,%d4:l) 5b5e8: 43ee fff9 lea %fp@(-7),%a1 5b5ec: 206a 003c moveal %a2@(60),%a0 5b5f0: 2068 001e moveal %a0@(30),%a0 5b5f4: 1191 4801 moveb %a1@,%a0@(00000001,%d4:l) 5b5f8: 43ee fffa lea %fp@(-6),%a1 5b5fc: 206a 003c moveal %a2@(60),%a0 5b600: 2068 001e moveal %a0@(30),%a0 5b604: 1191 4802 moveb %a1@,%a0@(00000002,%d4:l) 5b608: 7001 moveq #1,%d0 5b60a: 43ee fffb lea %fp@(-5),%a1 5b60e: 206a 003c moveal %a2@(60),%a0 5b612: 2068 001e moveal %a0@(30),%a0 5b616: 1191 4803 moveb %a1@,%a0@(00000003,%d4:l) 5b61a: 1540 0036 moveb %d0,%a2@(54) 5b61e: 262a 0006 movel %a2@(6),%d3 5b622: 202e fff8 movel %fp@(-8),%d0 5b626: 6000 fe1a braw 5b442 <rtems_rfs_block_map_grow+0xb4>
if ((singly == 0) ||
((doubly == 0) && (singly == RTEMS_RFS_INODE_BLOCKS)))
{
bool upping;
upping = map->size.count == fs->block_map_singly_blocks;
rc = rtems_rfs_block_map_indirect_alloc (fs, map,
5b62a: 206b 0034 moveal %a3@(52),%a0 5b62e: b1ea 0006 cmpal %a2@(6),%a0 5b632: 57c0 seq %d0 5b634: 49c0 extbl %d0 5b636: 4480 negl %d0 5b638: 2f00 movel %d0,%sp@- 5b63a: 4872 1c22 pea %a2@(00000022,%d1:l:4) 5b63e: 2f2e fff4 movel %fp@(-12),%sp@- 5b642: 2f0a movel %a2,%sp@- 5b644: 2f0b movel %a3,%sp@- 5b646: 4eba f334 jsr %pc@(5a97c <rtems_rfs_block_map_indirect_alloc>)
&map->doubly_buffer,
&map->blocks[doubly],
upping);
if (rc > 0)
5b64a: 4fef 0014 lea %sp@(20),%sp 5b64e: 4a80 tstl %d0 5b650: 6f00 ff3c blew 5b58e <rtems_rfs_block_map_grow+0x200>
{
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
map->blocks[doubly], true);
if (rc > 0)
{
rtems_rfs_group_bitmap_free (fs, false, singly_block);
5b654: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 5b658: 2600 movel %d0,%d3 <== NOT EXECUTED 5b65a: 45f9 0004 fffe lea 4fffe <rtems_rfs_group_bitmap_free>,%a2 <== NOT EXECUTED 5b660: 42a7 clrl %sp@- <== NOT EXECUTED 5b662: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5b664: 4e92 jsr %a2@ <== NOT EXECUTED
rtems_rfs_group_bitmap_free (fs, false, block);
5b666: 2f2e fff8 movel %fp@(-8),%sp@- <== NOT EXECUTED 5b66a: 42a7 clrl %sp@- <== NOT EXECUTED 5b66c: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5b66e: 4e92 jsr %a2@ <== NOT EXECUTED
return rc;
5b670: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
map->last_data_block = block;
map->dirty = true;
}
return 0;
}
5b674: 2003 movel %d3,%d0 <== NOT EXECUTED 5b676: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5b67c: 4e5e unlk %fp <== NOT EXECUTED 5b67e: 4e75 rts <== NOT EXECUTED
singly,
singly_block);
}
else
{
rc = rtems_rfs_buffer_handle_request (fs,
5b680: 4878 0001 pea 1 <ADD> 5b684: 2f32 1c22 movel %a2@(00000022,%d1:l:4),%sp@- 5b688: 2f2e fff4 movel %fp@(-12),%sp@- 5b68c: 2f0b movel %a3,%sp@- 5b68e: 4eb9 0005 bd6e jsr 5bd6e <rtems_rfs_buffer_handle_request>
&map->doubly_buffer,
map->blocks[doubly],
true);
if (rc > 0)
5b694: 4fef 0010 lea %sp@(16),%sp 5b698: 4a80 tstl %d0
5b69a: 6e60 bgts 5b6fc <rtems_rfs_block_map_grow+0x36e> <== NEVER TAKEN
{
rtems_rfs_group_bitmap_free (fs, false, block);
return rc;
}
singly_block = rtems_rfs_block_get_number (&map->doubly_buffer,
5b69c: 206a 0046 moveal %a2@(70),%a0 5b6a0: 2203 movel %d3,%d1 5b6a2: 4287 clrl %d7 5b6a4: 4283 clrl %d3 5b6a6: 4280 clrl %d0 5b6a8: e589 lsll #2,%d1 5b6aa: 2068 001e moveal %a0@(30),%a0 5b6ae: 1e30 1801 moveb %a0@(00000001,%d1:l),%d7 5b6b2: 1630 1800 moveb %a0@(00000000,%d1:l),%d3 5b6b6: 1030 1803 moveb %a0@(00000003,%d1:l),%d0 5b6ba: 1230 1802 moveb %a0@(00000002,%d1:l),%d1
singly);
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
5b6be: 4878 0001 pea 1 <ADD>
{
rtems_rfs_group_bitmap_free (fs, false, block);
return rc;
}
singly_block = rtems_rfs_block_get_number (&map->doubly_buffer,
5b6c2: 0281 0000 00ff andil #255,%d1 5b6c8: 2d47 ffec movel %d7,%fp@(-20) 5b6cc: 7e18 moveq #24,%d7 5b6ce: efab lsll %d7,%d3 5b6d0: e189 lsll #8,%d1 5b6d2: 8083 orl %d3,%d0 5b6d4: 262e ffec movel %fp@(-20),%d3 5b6d8: 4843 swap %d3 5b6da: 4243 clrw %d3 5b6dc: 8083 orl %d3,%d0 5b6de: 8081 orl %d1,%d0
singly);
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
5b6e0: 2f00 movel %d0,%sp@- 5b6e2: 2f2e ffe8 movel %fp@(-24),%sp@-
{
rtems_rfs_group_bitmap_free (fs, false, block);
return rc;
}
singly_block = rtems_rfs_block_get_number (&map->doubly_buffer,
5b6e6: 2d40 fffc movel %d0,%fp@(-4)
singly);
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
5b6ea: 2f0b movel %a3,%sp@- 5b6ec: 4eb9 0005 bd6e jsr 5bd6e <rtems_rfs_buffer_handle_request>
singly_block, true);
if (rc > 0)
5b6f2: 4fef 0010 lea %sp@(16),%sp 5b6f6: 4a80 tstl %d0 5b6f8: 6f00 fdb6 blew 5b4b0 <rtems_rfs_block_map_grow+0x122>
{
rtems_rfs_group_bitmap_free (fs, false, block);
5b6fc: 2f2e fff8 movel %fp@(-8),%sp@- <== NOT EXECUTED 5b700: 2600 movel %d0,%d3 <== NOT EXECUTED 5b702: 42a7 clrl %sp@- <== NOT EXECUTED 5b704: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5b706: 4eb9 0004 fffe jsr 4fffe <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
return rc;
5b70c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
map->last_data_block = block;
map->dirty = true;
}
return 0;
}
5b710: 2003 movel %d3,%d0 <== NOT EXECUTED 5b712: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5b718: 4e5e unlk %fp <== NOT EXECUTED 5b71a: 4e75 rts <== NOT EXECUTED
5b71c: 2600 movel %d0,%d3 5b71e: 2003 movel %d3,%d0 5b720: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5
5b726: 4e5e unlk %fp <== NOT EXECUTED
0005a97c <rtems_rfs_block_map_indirect_alloc>:
rtems_rfs_block_map_indirect_alloc (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
rtems_rfs_buffer_handle* buffer,
rtems_rfs_block_no* block,
bool upping)
{
5a97c: 4e56 ffe4 linkw %fp,#-28 5a980: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@
int rc; /* * Save the new block locally because upping can have *block pointing to the * slots which are cleared when upping. */ rc = rtems_rfs_group_bitmap_alloc (fs, map->last_map_block, false, &new_block);
5a984: 486e fffc pea %fp@(-4)
rtems_rfs_block_map_indirect_alloc (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
rtems_rfs_buffer_handle* buffer,
rtems_rfs_block_no* block,
bool upping)
{
5a988: 266e 000c moveal %fp@(12),%a3
int rc; /* * Save the new block locally because upping can have *block pointing to the * slots which are cleared when upping. */ rc = rtems_rfs_group_bitmap_alloc (fs, map->last_map_block, false, &new_block);
5a98c: 42a7 clrl %sp@- 5a98e: 2f2b 001a movel %a3@(26),%sp@-
rtems_rfs_block_map_indirect_alloc (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
rtems_rfs_buffer_handle* buffer,
rtems_rfs_block_no* block,
bool upping)
{
5a992: 246e 0008 moveal %fp@(8),%a2 5a996: 286e 0010 moveal %fp@(16),%a4
int rc; /* * Save the new block locally because upping can have *block pointing to the * slots which are cleared when upping. */ rc = rtems_rfs_group_bitmap_alloc (fs, map->last_map_block, false, &new_block);
5a99a: 2f0a movel %a2,%sp@-
rtems_rfs_block_map_indirect_alloc (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
rtems_rfs_buffer_handle* buffer,
rtems_rfs_block_no* block,
bool upping)
{
5a99c: 162e 001b moveb %fp@(27),%d3
int rc; /* * Save the new block locally because upping can have *block pointing to the * slots which are cleared when upping. */ rc = rtems_rfs_group_bitmap_alloc (fs, map->last_map_block, false, &new_block);
5a9a0: 4eb9 0004 fde2 jsr 4fde2 <rtems_rfs_group_bitmap_alloc>
if (rc > 0)
5a9a6: 4fef 0010 lea %sp@(16),%sp
int rc; /* * Save the new block locally because upping can have *block pointing to the * slots which are cleared when upping. */ rc = rtems_rfs_group_bitmap_alloc (fs, map->last_map_block, false, &new_block);
5a9aa: 2400 movel %d0,%d2
if (rc > 0)
5a9ac: 6f0c bles 5a9ba <rtems_rfs_block_map_indirect_alloc+0x3e><== ALWAYS TAKEN
} rtems_rfs_buffer_mark_dirty (buffer); *block = new_block; map->last_map_block = new_block; return 0; }
5a9ae: 2002 movel %d2,%d0 <== NOT EXECUTED 5a9b0: 4cee 3c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a5 <== NOT EXECUTED 5a9b6: 4e5e unlk %fp <== NOT EXECUTED 5a9b8: 4e75 rts <== NOT EXECUTED
* slots which are cleared when upping.
*/
rc = rtems_rfs_group_bitmap_alloc (fs, map->last_map_block, false, &new_block);
if (rc > 0)
return rc;
rc = rtems_rfs_buffer_handle_request (fs, buffer, new_block, false);
5a9ba: 42a7 clrl %sp@- 5a9bc: 2f2e fffc movel %fp@(-4),%sp@- 5a9c0: 2f0c movel %a4,%sp@- 5a9c2: 2f0a movel %a2,%sp@- 5a9c4: 4eb9 0005 bd6e jsr 5bd6e <rtems_rfs_buffer_handle_request>
if (rc > 0)
5a9ca: 4fef 0010 lea %sp@(16),%sp
* slots which are cleared when upping.
*/
rc = rtems_rfs_group_bitmap_alloc (fs, map->last_map_block, false, &new_block);
if (rc > 0)
return rc;
rc = rtems_rfs_buffer_handle_request (fs, buffer, new_block, false);
5a9ce: 2400 movel %d0,%d2
if (rc > 0)
5a9d0: 6f1e bles 5a9f0 <rtems_rfs_block_map_indirect_alloc+0x74><== ALWAYS TAKEN
{
rtems_rfs_group_bitmap_free (fs, false, new_block);
5a9d2: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 5a9d6: 42a7 clrl %sp@- <== NOT EXECUTED 5a9d8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5a9da: 4eb9 0004 fffe jsr 4fffe <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
return rc;
5a9e0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
} rtems_rfs_buffer_mark_dirty (buffer); *block = new_block; map->last_map_block = new_block; return 0; }
5a9e4: 2002 movel %d2,%d0 <== NOT EXECUTED 5a9e6: 4cee 3c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a5 <== NOT EXECUTED 5a9ec: 4e5e unlk %fp <== NOT EXECUTED 5a9ee: 4e75 rts <== NOT EXECUTED
if (rc > 0)
{
rtems_rfs_group_bitmap_free (fs, false, new_block);
return rc;
}
memset (rtems_rfs_buffer_data (buffer), 0xff, rtems_rfs_fs_block_size (fs));
5a9f0: 2f2a 0008 movel %a2@(8),%sp@- 5a9f4: 206c 0006 moveal %a4@(6),%a0 5a9f8: 4878 00ff pea ff <DBL_MANT_DIG+0xca> 5a9fc: 2f28 001e movel %a0@(30),%sp@- 5aa00: 4eb9 0006 2f48 jsr 62f48 <memset>
if (upping)
5aa06: 4fef 000c lea %sp@(12),%sp 5aa0a: 4a03 tstb %d3
5aa0c: 6620 bnes 5aa2e <rtems_rfs_block_map_indirect_alloc+0xb2>
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
rtems_rfs_block_set_number (buffer, b, map->blocks[b]);
memset (map->blocks, 0, sizeof (map->blocks));
}
rtems_rfs_buffer_mark_dirty (buffer);
*block = new_block;
5aa0e: 202e fffc movel %fp@(-4),%d0
map->last_map_block = new_block; return 0;
5aa12: 4282 clrl %d2
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
rtems_rfs_block_set_number (buffer, b, map->blocks[b]);
memset (map->blocks, 0, sizeof (map->blocks));
}
rtems_rfs_buffer_mark_dirty (buffer);
*block = new_block;
5aa14: 206e 0014 moveal %fp@(20),%a0
map->size.count);
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
rtems_rfs_block_set_number (buffer, b, map->blocks[b]);
memset (map->blocks, 0, sizeof (map->blocks));
}
rtems_rfs_buffer_mark_dirty (buffer);
5aa18: 18bc 0001 moveb #1,%a4@
*block = new_block;
5aa1c: 2080 movel %d0,%a0@
map->last_map_block = new_block;
5aa1e: 2740 001a movel %d0,%a3@(26)
return 0; }
5aa22: 2002 movel %d2,%d0 5aa24: 4cee 3c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a5 5aa2a: 4e5e unlk %fp 5aa2c: 4e75 rts
}
memset (rtems_rfs_buffer_data (buffer), 0xff, rtems_rfs_fs_block_size (fs));
if (upping)
{
int b;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
5aa2e: 4878 2000 pea 2000 <D_MAX_EXP+0x1801> 5aa32: 42a7 clrl %sp@- 5aa34: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> 5aa3a: 508f addql #8,%sp 5aa3c: 4a00 tstb %d0 5aa3e: 6600 0082 bnew 5aac2 <rtems_rfs_block_map_indirect_alloc+0x146>
* @param block The block number of the indirect block allocated. * @param upping True is upping the map to the next indirect level. * @return int The error number (errno). No error if 0. */ static int rtems_rfs_block_map_indirect_alloc (rtems_rfs_file_system* fs,
5aa42: 240b movel %a3,%d2 5aa44: 0682 0000 0022 addil #34,%d2 5aa4a: 2042 moveal %d2,%a0 5aa4c: 4280 clrl %d0
int b;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
printf ("rtems-rfs: block-map-grow: upping: block-count=%" PRId32 "\n",
map->size.count);
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
rtems_rfs_block_set_number (buffer, b, map->blocks[b]);
5aa4e: 226c 0006 moveal %a4@(6),%a1 5aa52: 4be8 0001 lea %a0@(1),%a5
* @param block The block number of the indirect block allocated. * @param upping True is upping the map to the next indirect level. * @return int The error number (errno). No error if 0. */ static int rtems_rfs_block_map_indirect_alloc (rtems_rfs_file_system* fs,
5aa56: 2448 moveal %a0,%a2
int b;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
printf ("rtems-rfs: block-map-grow: upping: block-count=%" PRId32 "\n",
map->size.count);
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
rtems_rfs_block_set_number (buffer, b, map->blocks[b]);
5aa58: 568a addql #3,%a2 5aa5a: 2269 001e moveal %a1@(30),%a1 5aa5e: 1390 0800 moveb %a0@,%a1@(00000000,%d0:l) 5aa62: 226c 0006 moveal %a4@(6),%a1 5aa66: 2269 001e moveal %a1@(30),%a1 5aa6a: 1395 0801 moveb %a5@,%a1@(00000001,%d0:l) 5aa6e: 226c 0006 moveal %a4@(6),%a1 5aa72: 2218 movel %a0@+,%d1 5aa74: e089 lsrl #8,%d1 5aa76: 2269 001e moveal %a1@(30),%a1 5aa7a: 1381 0802 moveb %d1,%a1@(00000002,%d0:l)
{
int b;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
printf ("rtems-rfs: block-map-grow: upping: block-count=%" PRId32 "\n",
map->size.count);
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
5aa7e: 7214 moveq #20,%d1
rtems_rfs_block_set_number (buffer, b, map->blocks[b]);
5aa80: 226c 0006 moveal %a4@(6),%a1 5aa84: 2269 001e moveal %a1@(30),%a1 5aa88: 1392 0803 moveb %a2@,%a1@(00000003,%d0:l) 5aa8c: 18bc 0001 moveb #1,%a4@ 5aa90: 5880 addql #4,%d0
{
int b;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
printf ("rtems-rfs: block-map-grow: upping: block-count=%" PRId32 "\n",
map->size.count);
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
5aa92: b280 cmpl %d0,%d1
5aa94: 66b8 bnes 5aa4e <rtems_rfs_block_map_indirect_alloc+0xd2>
rtems_rfs_block_set_number (buffer, b, map->blocks[b]);
memset (map->blocks, 0, sizeof (map->blocks));
5aa96: 2042 moveal %d2,%a0
} rtems_rfs_buffer_mark_dirty (buffer); *block = new_block; map->last_map_block = new_block; return 0;
5aa98: 4282 clrl %d2
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
printf ("rtems-rfs: block-map-grow: upping: block-count=%" PRId32 "\n",
map->size.count);
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
rtems_rfs_block_set_number (buffer, b, map->blocks[b]);
memset (map->blocks, 0, sizeof (map->blocks));
5aa9a: 4290 clrl %a0@
} rtems_rfs_buffer_mark_dirty (buffer); *block = new_block;
5aa9c: 202e fffc movel %fp@(-4),%d0
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
printf ("rtems-rfs: block-map-grow: upping: block-count=%" PRId32 "\n",
map->size.count);
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
rtems_rfs_block_set_number (buffer, b, map->blocks[b]);
memset (map->blocks, 0, sizeof (map->blocks));
5aaa0: 42ab 0026 clrl %a3@(38)
} rtems_rfs_buffer_mark_dirty (buffer); *block = new_block;
5aaa4: 206e 0014 moveal %fp@(20),%a0
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
printf ("rtems-rfs: block-map-grow: upping: block-count=%" PRId32 "\n",
map->size.count);
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
rtems_rfs_block_set_number (buffer, b, map->blocks[b]);
memset (map->blocks, 0, sizeof (map->blocks));
5aaa8: 42ab 002a clrl %a3@(42) 5aaac: 42ab 002e clrl %a3@(46) 5aab0: 42ab 0032 clrl %a3@(50)
} rtems_rfs_buffer_mark_dirty (buffer);
5aab4: 18bc 0001 moveb #1,%a4@
*block = new_block;
5aab8: 2080 movel %d0,%a0@
map->last_map_block = new_block;
5aaba: 2740 001a movel %d0,%a3@(26) 5aabe: 6000 ff62 braw 5aa22 <rtems_rfs_block_map_indirect_alloc+0xa6>
memset (rtems_rfs_buffer_data (buffer), 0xff, rtems_rfs_fs_block_size (fs));
if (upping)
{
int b;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
printf ("rtems-rfs: block-map-grow: upping: block-count=%" PRId32 "\n",
5aac2: 2f2b 0006 movel %a3@(6),%sp@- <== NOT EXECUTED
* @param block The block number of the indirect block allocated. * @param upping True is upping the map to the next indirect level. * @return int The error number (errno). No error if 0. */ static int rtems_rfs_block_map_indirect_alloc (rtems_rfs_file_system* fs,
5aac6: 240b movel %a3,%d2 <== NOT EXECUTED
memset (rtems_rfs_buffer_data (buffer), 0xff, rtems_rfs_fs_block_size (fs));
if (upping)
{
int b;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
printf ("rtems-rfs: block-map-grow: upping: block-count=%" PRId32 "\n",
5aac8: 4879 0007 35e8 pea 735e8 <CSWTCH.1+0xc> <== NOT EXECUTED
* @param block The block number of the indirect block allocated. * @param upping True is upping the map to the next indirect level. * @return int The error number (errno). No error if 0. */ static int rtems_rfs_block_map_indirect_alloc (rtems_rfs_file_system* fs,
5aace: 0682 0000 0022 addil #34,%d2 <== NOT EXECUTED
memset (rtems_rfs_buffer_data (buffer), 0xff, rtems_rfs_fs_block_size (fs));
if (upping)
{
int b;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
printf ("rtems-rfs: block-map-grow: upping: block-count=%" PRId32 "\n",
5aad4: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5aada: 508f addql #8,%sp <== NOT EXECUTED
* @param block The block number of the indirect block allocated. * @param upping True is upping the map to the next indirect level. * @return int The error number (errno). No error if 0. */ static int rtems_rfs_block_map_indirect_alloc (rtems_rfs_file_system* fs,
5aadc: 2042 moveal %d2,%a0 <== NOT EXECUTED 5aade: 4280 clrl %d0 <== NOT EXECUTED 5aae0: 6000 ff6c braw 5aa4e <rtems_rfs_block_map_indirect_alloc+0xd2><== NOT EXECUTED
0005abba <rtems_rfs_block_map_indirect_shrink.isra.12>:
* @param indirect The index index in the inode's block table.
* @param index The index in the indirect table of the block.
* @return int The error number (errno). No error if 0.
*/
static int
rtems_rfs_block_map_indirect_shrink (rtems_rfs_file_system* fs,
5abba: 4e56 ffec linkw %fp,#-20 <== NOT EXECUTED 5abbe: 202e 0014 movel %fp@(20),%d0 <== NOT EXECUTED 5abc2: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ <== NOT EXECUTED 5abc6: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 5abca: 222e 0018 movel %fp@(24),%d1 <== NOT EXECUTED
* block to be freed and the indirect block is now also free, or we have only * one indirect table and we can fit the remaining blocks into the inode, * then either move to the next indirect block or move the remaining blocks * into the inode and free the indirect table's block. */ if ((index == 0) ||
5abce: 6718 beqs 5abe8 <rtems_rfs_block_map_indirect_shrink.isra.12+0x2e><== NOT EXECUTED 5abd0: 4a80 tstl %d0 <== NOT EXECUTED 5abd2: 6640 bnes 5ac14 <rtems_rfs_block_map_indirect_shrink.isra.12+0x5a><== NOT EXECUTED
((indirect == 0) && (index == RTEMS_RFS_INODE_BLOCKS)))
5abd4: 103c 0005 moveb #5,%d0 <== NOT EXECUTED 5abd8: b081 cmpl %d1,%d0 <== NOT EXECUTED 5abda: 6744 beqs 5ac20 <rtems_rfs_block_map_indirect_shrink.isra.12+0x66><== NOT EXECUTED
rtems_rfs_block_map* map,
rtems_rfs_buffer_handle* buffer,
rtems_rfs_block_no indirect,
rtems_rfs_block_no index)
{
int rc = 0;
5abdc: 4200 clrb %d0 <== NOT EXECUTED
map->last_map_block = block_to_free;
}
return rc;
}
5abde: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 <== NOT EXECUTED 5abe4: 4e5e unlk %fp <== NOT EXECUTED 5abe6: 4e75 rts <== NOT EXECUTED
* into the inode and free the indirect table's block.
*/
if ((index == 0) ||
((indirect == 0) && (index == RTEMS_RFS_INODE_BLOCKS)))
{
rtems_rfs_block_no block_to_free = map->blocks[indirect];
5abe8: 2432 0c22 movel %a2@(00000022,%d0:l:4),%d2 <== NOT EXECUTED
else
{
/*
* One less singly indirect block in the inode.
*/
map->blocks[indirect] = 0;
5abec: 42b2 0c22 clrl %a2@(00000022,%d0:l:4) <== NOT EXECUTED
}
rc = rtems_rfs_group_bitmap_free (fs, false, block_to_free);
5abf0: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5abf2: 42a7 clrl %sp@- <== NOT EXECUTED 5abf4: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 5abf8: 4eb9 0004 fffe jsr 4fffe <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
if (rc > 0)
5abfe: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5ac02: 4a80 tstl %d0 <== NOT EXECUTED 5ac04: 6ed8 bgts 5abde <rtems_rfs_block_map_indirect_shrink.isra.12+0x24><== NOT EXECUTED
return rc;
map->last_map_block = block_to_free;
5ac06: 2542 001a movel %d2,%a2@(26) <== NOT EXECUTED
}
return rc;
}
5ac0a: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 <== NOT EXECUTED 5ac10: 4e5e unlk %fp <== NOT EXECUTED 5ac12: 4e75 rts <== NOT EXECUTED
rtems_rfs_block_map* map,
rtems_rfs_buffer_handle* buffer,
rtems_rfs_block_no indirect,
rtems_rfs_block_no index)
{
int rc = 0;
5ac14: 4280 clrl %d0 <== NOT EXECUTED
map->last_map_block = block_to_free;
}
return rc;
}
5ac16: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 <== NOT EXECUTED 5ac1c: 4e5e unlk %fp <== NOT EXECUTED 5ac1e: 4e75 rts <== NOT EXECUTED
* into the inode and free the indirect table's block.
*/
if ((index == 0) ||
((indirect == 0) && (index == RTEMS_RFS_INODE_BLOCKS)))
{
rtems_rfs_block_no block_to_free = map->blocks[indirect];
5ac20: 206e 0010 moveal %fp@(16),%a0 <== NOT EXECUTED
* @param indirect The index index in the inode's block table. * @param index The index in the indirect table of the block. * @return int The error number (errno). No error if 0. */ static int rtems_rfs_block_map_indirect_shrink (rtems_rfs_file_system* fs,
5ac24: 47ea 0022 lea %a2@(34),%a3 <== NOT EXECUTED 5ac28: 93c9 subal %a1,%a1 <== NOT EXECUTED
* into the inode and free the indirect table's block.
*/
if ((index == 0) ||
((indirect == 0) && (index == RTEMS_RFS_INODE_BLOCKS)))
{
rtems_rfs_block_no block_to_free = map->blocks[indirect];
5ac2a: 2050 moveal %a0@,%a0 <== NOT EXECUTED 5ac2c: 242a 0022 movel %a2@(34),%d2 <== NOT EXECUTED 5ac30: 2068 001e moveal %a0@(30),%a0 <== NOT EXECUTED
/*
* Move to direct inode access.
*/
int b;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
map->blocks[b] = rtems_rfs_block_get_number (buffer, b);
5ac34: 4280 clrl %d0 <== NOT EXECUTED 5ac36: 4283 clrl %d3 <== NOT EXECUTED 5ac38: 1010 moveb %a0@,%d0 <== NOT EXECUTED 5ac3a: 1628 0001 moveb %a0@(1),%d3 <== NOT EXECUTED 5ac3e: 7218 moveq #24,%d1 <== NOT EXECUTED 5ac40: 4284 clrl %d4 <== NOT EXECUTED 5ac42: 1828 0003 moveb %a0@(3),%d4 <== NOT EXECUTED
{
/*
* Move to direct inode access.
*/
int b;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
5ac46: 5289 addql #1,%a1 <== NOT EXECUTED
map->blocks[b] = rtems_rfs_block_get_number (buffer, b);
5ac48: e3a8 lsll %d1,%d0 <== NOT EXECUTED 5ac4a: 4843 swap %d3 <== NOT EXECUTED 5ac4c: 4243 clrw %d3 <== NOT EXECUTED 5ac4e: 4281 clrl %d1 <== NOT EXECUTED 5ac50: 1228 0002 moveb %a0@(2),%d1 <== NOT EXECUTED
{
/*
* Move to direct inode access.
*/
int b;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
5ac54: 5888 addql #4,%a0 <== NOT EXECUTED
map->blocks[b] = rtems_rfs_block_get_number (buffer, b);
5ac56: 8083 orl %d3,%d0 <== NOT EXECUTED 5ac58: e189 lsll #8,%d1 <== NOT EXECUTED 5ac5a: 8084 orl %d4,%d0 <== NOT EXECUTED 5ac5c: 8081 orl %d1,%d0 <== NOT EXECUTED 5ac5e: 26c0 movel %d0,%a3@+ <== NOT EXECUTED
{
/*
* Move to direct inode access.
*/
int b;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
5ac60: 7005 moveq #5,%d0 <== NOT EXECUTED 5ac62: b089 cmpl %a1,%d0 <== NOT EXECUTED 5ac64: 678a beqs 5abf0 <rtems_rfs_block_map_indirect_shrink.isra.12+0x36><== NOT EXECUTED
map->blocks[b] = rtems_rfs_block_get_number (buffer, b);
5ac66: 4280 clrl %d0 <== NOT EXECUTED 5ac68: 4283 clrl %d3 <== NOT EXECUTED 5ac6a: 1010 moveb %a0@,%d0 <== NOT EXECUTED 5ac6c: 1628 0001 moveb %a0@(1),%d3 <== NOT EXECUTED 5ac70: 7218 moveq #24,%d1 <== NOT EXECUTED 5ac72: 4284 clrl %d4 <== NOT EXECUTED 5ac74: 1828 0003 moveb %a0@(3),%d4 <== NOT EXECUTED
{
/*
* Move to direct inode access.
*/
int b;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
5ac78: 5289 addql #1,%a1 <== NOT EXECUTED
map->blocks[b] = rtems_rfs_block_get_number (buffer, b);
5ac7a: e3a8 lsll %d1,%d0 <== NOT EXECUTED 5ac7c: 4843 swap %d3 <== NOT EXECUTED 5ac7e: 4243 clrw %d3 <== NOT EXECUTED 5ac80: 4281 clrl %d1 <== NOT EXECUTED 5ac82: 1228 0002 moveb %a0@(2),%d1 <== NOT EXECUTED
{
/*
* Move to direct inode access.
*/
int b;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
5ac86: 5888 addql #4,%a0 <== NOT EXECUTED
map->blocks[b] = rtems_rfs_block_get_number (buffer, b);
5ac88: 8083 orl %d3,%d0 <== NOT EXECUTED 5ac8a: e189 lsll #8,%d1 <== NOT EXECUTED 5ac8c: 8084 orl %d4,%d0 <== NOT EXECUTED 5ac8e: 8081 orl %d1,%d0 <== NOT EXECUTED 5ac90: 26c0 movel %d0,%a3@+ <== NOT EXECUTED
{
/*
* Move to direct inode access.
*/
int b;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
5ac92: 7005 moveq #5,%d0 <== NOT EXECUTED 5ac94: b089 cmpl %a1,%d0 <== NOT EXECUTED 5ac96: 669c bnes 5ac34 <rtems_rfs_block_map_indirect_shrink.isra.12+0x7a><== NOT EXECUTED 5ac98: 6000 ff56 braw 5abf0 <rtems_rfs_block_map_indirect_shrink.isra.12+0x36><== NOT EXECUTED
0005adf2 <rtems_rfs_block_map_open>:
int
rtems_rfs_block_map_open (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* inode,
rtems_rfs_block_map* map)
{
5adf2: 4e56 ffe0 linkw %fp,#-32
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
5adf6: 4200 clrb %d0 5adf8: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 5adfc: 266e 000c moveal %fp@(12),%a3 5ae00: 246e 0010 moveal %fp@(16),%a2
return rc;
rc = rtems_rfs_buffer_handle_open (fs, &map->doubly_buffer);
if (rc > 0)
return rc;
rc = rtems_rfs_inode_load (fs, inode);
5ae04: 2f0b movel %a3,%sp@-
int
rtems_rfs_block_map_open (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* inode,
rtems_rfs_block_map* map)
{
5ae06: 242e 0008 movel %fp@(8),%d2
* sure the inode has been loaded into memory. If we did not load the inode
* do not unload it. The caller may assume it is still loaded when we return.
*/
map->dirty = false;
map->inode = NULL;
5ae0a: 42aa 0002 clrl %a2@(2)
* Set the count to 0 so at least find fails, then open the handle and make
* sure the inode has been loaded into memory. If we did not load the inode
* do not unload it. The caller may assume it is still loaded when we return.
*/
map->dirty = false;
5ae0e: 4212 clrb %a2@
* @param size A pointer to the block size.
*/
static inline void
rtems_rfs_block_set_size_zero (rtems_rfs_block_size* size)
{
size->count = 0;
5ae10: 42aa 0006 clrl %a2@(6) 5ae14: 1540 0036 moveb %d0,%a2@(54)
size->offset = 0;
5ae18: 42aa 000a clrl %a2@(10) 5ae1c: 1540 0040 moveb %d0,%a2@(64)
* @param bpos A pointer to the block position.
*/
static inline void
rtems_rfs_block_set_bpos_zero (rtems_rfs_block_pos* bpos)
{
bpos->bno = 0;
5ae20: 42aa 000e clrl %a2@(14)
bpos->boff = 0;
5ae24: 42aa 0012 clrl %a2@(18)
bpos->block = 0;
5ae28: 42aa 0016 clrl %a2@(22)
handle->bnum = 0;
5ae2c: 42aa 0038 clrl %a2@(56)
handle->buffer = NULL;
5ae30: 42aa 003c clrl %a2@(60)
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
handle->bnum = 0;
5ae34: 42aa 0042 clrl %a2@(66)
handle->buffer = NULL;
5ae38: 42aa 0046 clrl %a2@(70)
return rc;
rc = rtems_rfs_buffer_handle_open (fs, &map->doubly_buffer);
if (rc > 0)
return rc;
rc = rtems_rfs_inode_load (fs, inode);
5ae3c: 2f02 movel %d2,%sp@- 5ae3e: 4eb9 0005 0264 jsr 50264 <rtems_rfs_inode_load>
if (rc > 0)
5ae44: 508f addql #8,%sp
return rc;
rc = rtems_rfs_buffer_handle_open (fs, &map->doubly_buffer);
if (rc > 0)
return rc;
rc = rtems_rfs_inode_load (fs, inode);
5ae46: 2600 movel %d0,%d3
if (rc > 0)
5ae48: 6e00 00f8 bgtw 5af42 <rtems_rfs_block_map_open+0x150>
/*
* Extract the block and block count data from the inode into the targets
* byte order.
*/
map->inode = inode;
5ae4c: 226b 000c moveal %a3@(12),%a1
block_size = rtems_rfs_fs_block_size (fs);
return (((uint64_t) (size->count - 1)) * block_size) + offset;
}
int
rtems_rfs_block_map_open (rtems_rfs_file_system* fs,
5ae50: 4bea 0022 lea %a2@(34),%a5 5ae54: 7201 moveq #1,%d1
/* * Extract the block and block count data from the inode into the targets * byte order. */ map->inode = inode; for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
5ae56: 91c8 subal %a0,%a0 5ae58: 49e9 001c lea %a1@(28),%a4
/*
* Extract the block and block count data from the inode into the targets
* byte order.
*/
map->inode = inode;
5ae5c: 254b 0002 movel %a3,%a2@(2)
* @return uint32_t The block number.
*/
static inline uint32_t
rtems_rfs_inode_get_block (rtems_rfs_inode_handle* handle, int block)
{
return rtems_rfs_read_u32 (&handle->node->data.blocks[block]);
5ae60: 4285 clrl %d5 5ae62: 1a31 8c1c moveb %a1@(0000001c,%a0:l:4),%d5 5ae66: 7618 moveq #24,%d3 5ae68: 4280 clrl %d0 5ae6a: 4284 clrl %d4 5ae6c: 1034 1802 moveb %a4@(00000002,%d1:l),%d0
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
5ae70: 5288 addql #1,%a0 5ae72: 1834 1800 moveb %a4@(00000000,%d1:l),%d4 5ae76: e7ad lsll %d3,%d5 5ae78: 4283 clrl %d3 5ae7a: 1634 1801 moveb %a4@(00000001,%d1:l),%d3 5ae7e: 5881 addql #4,%d1 5ae80: 8085 orl %d5,%d0 5ae82: 4844 swap %d4 5ae84: 4244 clrw %d4 5ae86: e18b lsll #8,%d3 5ae88: 8084 orl %d4,%d0 5ae8a: 8083 orl %d3,%d0 5ae8c: 2ac0 movel %d0,%a5@+ 5ae8e: 7005 moveq #5,%d0 5ae90: b088 cmpl %a0,%d0
5ae92: 66cc bnes 5ae60 <rtems_rfs_block_map_open+0x6e>
* @return uint32_t The block count.
*/
static inline uint32_t
rtems_rfs_inode_get_block_count (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->block_count);
5ae94: 4280 clrl %d0 5ae96: 4283 clrl %d3 5ae98: 1029 000c moveb %a1@(12),%d0 5ae9c: 1629 000d moveb %a1@(13),%d3 5aea0: 7218 moveq #24,%d1 5aea2: 4284 clrl %d4 5aea4: 1829 000f moveb %a1@(15),%d4 5aea8: e3a8 lsll %d1,%d0 5aeaa: 4843 swap %d3 5aeac: 4243 clrw %d3 5aeae: 4281 clrl %d1 5aeb0: 1229 000e moveb %a1@(14),%d1 5aeb4: 8083 orl %d3,%d0 5aeb6: e189 lsll #8,%d1
* @return uint32_t The last map block number.
*/
static inline uint32_t
rtems_rfs_inode_get_last_map_block (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->last_map_block);
5aeb8: 4283 clrl %d3
* @return uint32_t The block count.
*/
static inline uint32_t
rtems_rfs_inode_get_block_count (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->block_count);
5aeba: 8084 orl %d4,%d0 5aebc: 8081 orl %d1,%d0
* @return uint32_t The block offset.
*/
static inline uint16_t
rtems_rfs_inode_get_block_offset (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->block_offset);
5aebe: 4281 clrl %d1
* @return uint32_t The block count.
*/
static inline uint32_t
rtems_rfs_inode_get_block_count (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->block_count);
5aec0: 2540 0006 movel %d0,%a2@(6)
* @return uint32_t The block offset.
*/
static inline uint16_t
rtems_rfs_inode_get_block_offset (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->block_offset);
5aec4: 4280 clrl %d0 5aec6: 1029 000a moveb %a1@(10),%d0 5aeca: 1229 000b moveb %a1@(11),%d1 5aece: e188 lsll #8,%d0
map->blocks[b] = rtems_rfs_inode_get_block (inode, b);
map->size.count = rtems_rfs_inode_get_block_count (inode);
map->size.offset = rtems_rfs_inode_get_block_offset (inode);
5aed0: 8081 orl %d1,%d0
* @return uint32_t The last map block number.
*/
static inline uint32_t
rtems_rfs_inode_get_last_map_block (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->last_map_block);
5aed2: 7218 moveq #24,%d1 5aed4: 2540 000a movel %d0,%a2@(10) 5aed8: 4280 clrl %d0 5aeda: 1029 0030 moveb %a1@(48),%d0 5aede: 1629 0031 moveb %a1@(49),%d3 5aee2: 1829 0033 moveb %a1@(51),%d4 5aee6: e3a8 lsll %d1,%d0 5aee8: 4843 swap %d3 5aeea: 4243 clrw %d3 5aeec: 4281 clrl %d1 5aeee: 1229 0032 moveb %a1@(50),%d1 5aef2: 8083 orl %d3,%d0 5aef4: e189 lsll #8,%d1
* @return uint32_t The last data block number.
*/
static inline uint32_t
rtems_rfs_inode_get_last_data_block (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->last_data_block);
5aef6: 4283 clrl %d3
* @return uint32_t The last map block number.
*/
static inline uint32_t
rtems_rfs_inode_get_last_map_block (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->last_map_block);
5aef8: 8084 orl %d4,%d0 5aefa: 8081 orl %d1,%d0
* @return uint32_t The last data block number.
*/
static inline uint32_t
rtems_rfs_inode_get_last_data_block (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->last_data_block);
5aefc: 7218 moveq #24,%d1
* @return uint32_t The last map block number.
*/
static inline uint32_t
rtems_rfs_inode_get_last_map_block (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->last_map_block);
5aefe: 2540 001a movel %d0,%a2@(26)
* @return uint32_t The last data block number.
*/
static inline uint32_t
rtems_rfs_inode_get_last_data_block (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->last_data_block);
5af02: 4280 clrl %d0 5af04: 1029 0034 moveb %a1@(52),%d0 5af08: 1629 0035 moveb %a1@(53),%d3 5af0c: 1829 0037 moveb %a1@(55),%d4 5af10: e3a8 lsll %d1,%d0 5af12: 4843 swap %d3 5af14: 4243 clrw %d3 5af16: 4281 clrl %d1 5af18: 1229 0036 moveb %a1@(54),%d1 5af1c: 8083 orl %d3,%d0 5af1e: e189 lsll #8,%d1
map->last_map_block = rtems_rfs_inode_get_last_map_block (inode);
map->last_data_block = rtems_rfs_inode_get_last_data_block (inode);
rc = rtems_rfs_inode_unload (fs, inode, false);
5af20: 2d4b 000c movel %a3,%fp@(12) 5af24: 8084 orl %d4,%d0 5af26: 2d42 0008 movel %d2,%fp@(8) 5af2a: 8081 orl %d1,%d0 5af2c: 42ae 0010 clrl %fp@(16) 5af30: 2540 001e movel %d0,%a2@(30)
return rc;
}
5af34: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 5af3a: 4e5e unlk %fp
map->size.count = rtems_rfs_inode_get_block_count (inode);
map->size.offset = rtems_rfs_inode_get_block_offset (inode);
map->last_map_block = rtems_rfs_inode_get_last_map_block (inode);
map->last_data_block = rtems_rfs_inode_get_last_data_block (inode);
rc = rtems_rfs_inode_unload (fs, inode, false);
5af3c: 4ef9 0005 03d0 jmp 503d0 <rtems_rfs_inode_unload>
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
5af42: 486a 0036 pea %a2@(54) <== NOT EXECUTED 5af46: 47f9 0005 bbc0 lea 5bbc0 <rtems_rfs_buffer_handle_release>,%a3<== NOT EXECUTED 5af4c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5af4e: 4e93 jsr %a3@ <== NOT EXECUTED 5af50: 486a 0040 pea %a2@(64) <== NOT EXECUTED
handle->dirty = false;
5af54: 4201 clrb %d1 <== NOT EXECUTED 5af56: 1541 0036 moveb %d1,%a2@(54) <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
5af5a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
handle->dirty = false; handle->bnum = 0;
5af5c: 42aa 0038 clrl %a2@(56) <== NOT EXECUTED
handle->buffer = NULL;
5af60: 42aa 003c clrl %a2@(60) <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
5af64: 4e93 jsr %a3@ <== NOT EXECUTED
rc = rtems_rfs_inode_load (fs, inode);
if (rc > 0)
{
rtems_rfs_buffer_handle_close (fs, &map->singly_buffer);
rtems_rfs_buffer_handle_close (fs, &map->doubly_buffer);
return rc;
5af66: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
map->last_data_block = rtems_rfs_inode_get_last_data_block (inode);
rc = rtems_rfs_inode_unload (fs, inode, false);
return rc;
}
5af6a: 2003 movel %d3,%d0 <== NOT EXECUTED
handle->dirty = false;
5af6c: 4203 clrb %d3 <== NOT EXECUTED
handle->bnum = 0;
5af6e: 42aa 0042 clrl %a2@(66) <== NOT EXECUTED
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
handle->dirty = false;
5af72: 1543 0040 moveb %d3,%a2@(64) <== NOT EXECUTED
handle->bnum = 0; handle->buffer = NULL;
5af76: 42aa 0046 clrl %a2@(70) <== NOT EXECUTED 5af7a: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 <== NOT EXECUTED 5af80: 4e5e unlk %fp <== NOT EXECUTED
0005b72a <rtems_rfs_block_map_shrink>:
int
rtems_rfs_block_map_shrink (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
size_t blocks)
{
5b72a: 4e56 ffc0 linkw %fp,#-64 5b72e: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_SHRINK))
5b732: 4878 4000 pea 4000 <D_MAX_EXP+0x3801>
int
rtems_rfs_block_map_shrink (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
size_t blocks)
{
5b736: 266e 0008 moveal %fp@(8),%a3
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_SHRINK))
5b73a: 42a7 clrl %sp@-
int
rtems_rfs_block_map_shrink (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
size_t blocks)
{
5b73c: 246e 000c moveal %fp@(12),%a2 5b740: 262e 0010 movel %fp@(16),%d3
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_SHRINK))
5b744: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> 5b74a: 508f addql #8,%sp 5b74c: 4a00 tstb %d0 5b74e: 6600 024e bnew 5b99e <rtems_rfs_block_map_shrink+0x274>
printf ("rtems-rfs: block-map-shrink: entry: blocks=%zd count=%" PRIu32 "\n",
blocks, map->size.count);
if (map->size.count == 0)
5b752: 222a 0006 movel %a2@(6),%d1 5b756: 6700 009a beqw 5b7f2 <rtems_rfs_block_map_shrink+0xc8>
5b75a: b283 cmpl %d3,%d1 <== NOT EXECUTED 5b75c: 6500 023a bcsw 5b998 <rtems_rfs_block_map_shrink+0x26e><== NOT EXECUTED
return 0;
if (blocks > map->size.count)
blocks = map->size.count;
while (blocks)
5b760: 4a83 tstl %d3 <== NOT EXECUTED 5b762: 6776 beqs 5b7da <rtems_rfs_block_map_shrink+0xb0><== NOT EXECUTED
rtems_rfs_block_no doubly_singly;
doubly = singly / fs->blocks_per_block;
doubly_singly = singly % fs->blocks_per_block;
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
5b764: 41ea 0040 lea %a2@(64),%a0 <== NOT EXECUTED 5b768: 4bf9 0005 bd6e lea 5bd6e <rtems_rfs_buffer_handle_request>,%a5<== NOT EXECUTED 5b76e: 2d48 fff8 movel %a0,%fp@(-8) <== NOT EXECUTED
doubly_singly);
/*
* Read the singly indirect table and get the block number.
*/
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
5b772: 41ea 0036 lea %a2@(54),%a0 <== NOT EXECUTED 5b776: 2d48 fffc movel %a0,%fp@(-4) <== NOT EXECUTED
int
rtems_rfs_block_map_free_all (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map)
{
return rtems_rfs_block_map_shrink (fs, map, map->size.count);
}
5b77a: 41ea 0046 lea %a2@(70),%a0 <== NOT EXECUTED 5b77e: 2d48 ffec movel %a0,%fp@(-20) <== NOT EXECUTED 5b782: 41ea 003c lea %a2@(60),%a0 <== NOT EXECUTED 5b786: 2d48 fff0 movel %a0,%fp@(-16) <== NOT EXECUTED
{
rtems_rfs_block_no block;
rtems_rfs_block_no block_to_free;
int rc;
block = map->size.count - 1;
5b78a: 2001 movel %d1,%d0 <== NOT EXECUTED 5b78c: 5380 subql #1,%d0 <== NOT EXECUTED
if (block < RTEMS_RFS_INODE_BLOCKS)
5b78e: 7404 moveq #4,%d2 <== NOT EXECUTED 5b790: b480 cmpl %d0,%d2 <== NOT EXECUTED 5b792: 656a bcss 5b7fe <rtems_rfs_block_map_shrink+0xd4><== NOT EXECUTED
{
/*
* We have less than RTEMS_RFS_INODE_BLOCKS so they are held in the
* inode.
*/
block_to_free = map->blocks[block];
5b794: 2432 0c22 movel %a2@(00000022,%d0:l:4),%d2 <== NOT EXECUTED 5b798: 49f9 0004 fffe lea 4fffe <rtems_rfs_group_bitmap_free>,%a4 <== NOT EXECUTED
map->blocks[block] = 0;
5b79e: 42b2 0c22 clrl %a2@(00000022,%d0:l:4) <== NOT EXECUTED
{
rc = EIO;
break;
}
}
rc = rtems_rfs_group_bitmap_free (fs, false, block_to_free);
5b7a2: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5b7a4: 42a7 clrl %sp@- <== NOT EXECUTED 5b7a6: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5b7a8: 4e94 jsr %a4@ <== NOT EXECUTED
if (rc > 0)
5b7aa: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5b7ae: 4a80 tstl %d0 <== NOT EXECUTED 5b7b0: 6e42 bgts 5b7f4 <rtems_rfs_block_map_shrink+0xca><== NOT EXECUTED
return rc;
map->size.count--;
5b7b2: 222a 0006 movel %a2@(6),%d1 <== NOT EXECUTED 5b7b6: 5381 subql #1,%d1 <== NOT EXECUTED
map->size.offset = 0;
map->last_data_block = block_to_free;
map->dirty = true;
blocks--;
5b7b8: 5383 subql #1,%d3 <== NOT EXECUTED
if (rc > 0)
return rc;
map->size.count--;
map->size.offset = 0;
map->last_data_block = block_to_free;
map->dirty = true;
5b7ba: 14bc 0001 moveb #1,%a2@ <== NOT EXECUTED
}
}
rc = rtems_rfs_group_bitmap_free (fs, false, block_to_free);
if (rc > 0)
return rc;
map->size.count--;
5b7be: 2541 0006 movel %d1,%a2@(6) <== NOT EXECUTED
map->size.offset = 0;
5b7c2: 42aa 000a clrl %a2@(10) <== NOT EXECUTED
map->last_data_block = block_to_free;
5b7c6: 2542 001e movel %d2,%a2@(30) <== NOT EXECUTED
return 0;
if (blocks > map->size.count)
blocks = map->size.count;
while (blocks)
5b7ca: 4a83 tstl %d3 <== NOT EXECUTED 5b7cc: 66bc bnes 5b78a <rtems_rfs_block_map_shrink+0x60><== NOT EXECUTED
map->last_data_block = block_to_free;
map->dirty = true;
blocks--;
}
if (map->size.count == 0)
5b7ce: 4a81 tstl %d1 <== NOT EXECUTED 5b7d0: 6608 bnes 5b7da <rtems_rfs_block_map_shrink+0xb0><== NOT EXECUTED
{
map->last_map_block = 0;
5b7d2: 42aa 001a clrl %a2@(26) <== NOT EXECUTED
map->last_data_block = 0;
5b7d6: 42aa 001e clrl %a2@(30) <== NOT EXECUTED
}
/*
* Keep the position inside the map.
*/
if (rtems_rfs_block_pos_past_end (&map->bpos, &map->size))
5b7da: 202a 000e movel %a2@(14),%d0 <== NOT EXECUTED 5b7de: 6600 01d8 bnew 5b9b8 <rtems_rfs_block_map_shrink+0x28e><== NOT EXECUTED 5b7e2: b081 cmpl %d1,%d0 <== NOT EXECUTED 5b7e4: 6400 01d8 bccw 5b9be <rtems_rfs_block_map_shrink+0x294><== NOT EXECUTED 5b7e8: 2041 moveal %d1,%a0 <== NOT EXECUTED 5b7ea: 5388 subql #1,%a0 <== NOT EXECUTED 5b7ec: b1c0 cmpal %d0,%a0 <== NOT EXECUTED 5b7ee: 6700 01f6 beqw 5b9e6 <rtems_rfs_block_map_shrink+0x2bc><== NOT EXECUTED
rtems_rfs_block_size_get_bpos (&map->size, &map->bpos);
return 0;
5b7f2: 4280 clrl %d0
}
5b7f4: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5 5b7fa: 4e5e unlk %fp 5b7fc: 4e75 rts
* table of block numbers.
*/
rtems_rfs_block_no direct;
rtems_rfs_block_no singly;
direct = block % fs->blocks_per_block;
5b7fe: 242b 0030 movel %a3@(48),%d2 <== NOT EXECUTED 5b802: 2800 movel %d0,%d4 <== NOT EXECUTED 5b804: 4c42 4005 remul %d2,%d5,%d4 <== NOT EXECUTED 5b808: 4c42 4004 remul %d2,%d4,%d4 <== NOT EXECUTED
singly = block / fs->blocks_per_block;
if (block < fs->block_map_singly_blocks)
5b80c: b0ab 0034 cmpl %a3@(52),%d0 <== NOT EXECUTED 5b810: 6500 0102 bcsw 5b914 <rtems_rfs_block_map_shrink+0x1ea><== NOT EXECUTED
rc = rtems_rfs_block_map_indirect_shrink (fs, map, &map->singly_buffer,
singly, direct);
if (rc)
return rc;
}
else if (block < fs->block_map_doubly_blocks)
5b814: b0ab 0038 cmpl %a3@(56),%d0 <== NOT EXECUTED 5b818: 64b4 bccs 5b7ce <rtems_rfs_block_map_shrink+0xa4><== NOT EXECUTED
rtems_rfs_block_no doubly_singly;
doubly = singly / fs->blocks_per_block;
doubly_singly = singly % fs->blocks_per_block;
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
5b81a: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
* value is still valid for doubly indirect tables.
*/
rtems_rfs_block_no doubly;
rtems_rfs_block_no doubly_singly;
doubly = singly / fs->blocks_per_block;
5b81e: 4c42 4006 remul %d2,%d6,%d4 <== NOT EXECUTED 5b822: 4c42 4004 remul %d2,%d4,%d4 <== NOT EXECUTED
doubly_singly = singly % fs->blocks_per_block;
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
5b826: 2f32 4c22 movel %a2@(00000022,%d4:l:4),%sp@- <== NOT EXECUTED 5b82a: 2f2e fff8 movel %fp@(-8),%sp@- <== NOT EXECUTED
* value is still valid for doubly indirect tables.
*/
rtems_rfs_block_no doubly;
rtems_rfs_block_no doubly_singly;
doubly = singly / fs->blocks_per_block;
5b82e: 2d46 ffe8 movel %d6,%fp@(-24) <== NOT EXECUTED
doubly_singly = singly % fs->blocks_per_block;
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
5b832: 2f0b movel %a3,%sp@- <== NOT EXECUTED
* value is still valid for doubly indirect tables.
*/
rtems_rfs_block_no doubly;
rtems_rfs_block_no doubly_singly;
doubly = singly / fs->blocks_per_block;
5b834: 2d44 fff4 movel %d4,%fp@(-12) <== NOT EXECUTED
doubly_singly = singly % fs->blocks_per_block;
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
5b838: 4e95 jsr %a5@ <== NOT EXECUTED
map->blocks[doubly], true);
if (rc > 0)
5b83a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5b83e: 4a80 tstl %d0 <== NOT EXECUTED 5b840: 6eb2 bgts 5b7f4 <rtems_rfs_block_map_shrink+0xca><== NOT EXECUTED
return rc;
singly = rtems_rfs_block_get_number (&map->doubly_buffer,
5b842: 206a 0046 moveal %a2@(70),%a0 <== NOT EXECUTED 5b846: 2006 movel %d6,%d0 <== NOT EXECUTED 5b848: 4282 clrl %d2 <== NOT EXECUTED 5b84a: 4284 clrl %d4 <== NOT EXECUTED 5b84c: 4281 clrl %d1 <== NOT EXECUTED 5b84e: 7e18 moveq #24,%d7 <== NOT EXECUTED 5b850: e588 lsll #2,%d0 <== NOT EXECUTED 5b852: 2068 001e moveal %a0@(30),%a0 <== NOT EXECUTED 5b856: 1430 0800 moveb %a0@(00000000,%d0:l),%d2 <== NOT EXECUTED 5b85a: 1830 0803 moveb %a0@(00000003,%d0:l),%d4 <== NOT EXECUTED 5b85e: 1230 0801 moveb %a0@(00000001,%d0:l),%d1 <== NOT EXECUTED 5b862: 1030 0802 moveb %a0@(00000002,%d0:l),%d0 <== NOT EXECUTED
doubly_singly);
/*
* Read the singly indirect table and get the block number.
*/
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
5b866: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
map->blocks[doubly], true);
if (rc > 0)
return rc;
singly = rtems_rfs_block_get_number (&map->doubly_buffer,
5b86a: efaa lsll %d7,%d2 <== NOT EXECUTED 5b86c: 4841 swap %d1 <== NOT EXECUTED 5b86e: 4241 clrw %d1 <== NOT EXECUTED 5b870: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 5b876: 8882 orl %d2,%d4 <== NOT EXECUTED 5b878: e188 lsll #8,%d0 <== NOT EXECUTED 5b87a: 8881 orl %d1,%d4 <== NOT EXECUTED 5b87c: 8880 orl %d0,%d4 <== NOT EXECUTED
doubly_singly);
/*
* Read the singly indirect table and get the block number.
*/
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
5b87e: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5b880: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 5b884: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5b886: 4e95 jsr %a5@ <== NOT EXECUTED
singly, true);
if (rc > 0)
5b888: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5b88c: 4a80 tstl %d0 <== NOT EXECUTED 5b88e: 6e00 ff64 bgtw 5b7f4 <rtems_rfs_block_map_shrink+0xca><== NOT EXECUTED
return rc;
block_to_free = rtems_rfs_block_get_number (&map->singly_buffer,
5b892: 206a 003c moveal %a2@(60),%a0 <== NOT EXECUTED 5b896: 2005 movel %d5,%d0 <== NOT EXECUTED 5b898: 4281 clrl %d1 <== NOT EXECUTED 5b89a: 4282 clrl %d2 <== NOT EXECUTED 5b89c: 49f9 0004 fffe lea 4fffe <rtems_rfs_group_bitmap_free>,%a4 <== NOT EXECUTED 5b8a2: e588 lsll #2,%d0 <== NOT EXECUTED 5b8a4: 2068 001e moveal %a0@(30),%a0 <== NOT EXECUTED 5b8a8: 1230 0800 moveb %a0@(00000000,%d0:l),%d1 <== NOT EXECUTED 5b8ac: 2241 moveal %d1,%a1 <== NOT EXECUTED 5b8ae: 1430 0803 moveb %a0@(00000003,%d0:l),%d2 <== NOT EXECUTED 5b8b2: 2c09 movel %a1,%d6 <== NOT EXECUTED 5b8b4: 1230 0801 moveb %a0@(00000001,%d0:l),%d1 <== NOT EXECUTED 5b8b8: 1030 0802 moveb %a0@(00000002,%d0:l),%d0 <== NOT EXECUTED 5b8bc: efae lsll %d7,%d6 <== NOT EXECUTED 5b8be: 4841 swap %d1 <== NOT EXECUTED 5b8c0: 4241 clrw %d1 <== NOT EXECUTED 5b8c2: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 5b8c8: 8486 orl %d6,%d2 <== NOT EXECUTED 5b8ca: e188 lsll #8,%d0 <== NOT EXECUTED 5b8cc: 8481 orl %d1,%d2 <== NOT EXECUTED 5b8ce: 8480 orl %d0,%d2 <== NOT EXECUTED
direct);
if (direct == 0)
5b8d0: 4a85 tstl %d5 <== NOT EXECUTED 5b8d2: 6600 fece bnew 5b7a2 <rtems_rfs_block_map_shrink+0x78><== NOT EXECUTED
{
rc = rtems_rfs_group_bitmap_free (fs, false, singly);
5b8d6: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5b8d8: 42a7 clrl %sp@- <== NOT EXECUTED 5b8da: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5b8dc: 4e94 jsr %a4@ <== NOT EXECUTED
if (rc > 0)
5b8de: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5b8e2: 4a80 tstl %d0 <== NOT EXECUTED 5b8e4: 6e00 ff0e bgtw 5b7f4 <rtems_rfs_block_map_shrink+0xca><== NOT EXECUTED
return rc;
map->last_map_block = singly;
rc = rtems_rfs_block_map_indirect_shrink (fs, map, &map->doubly_buffer,
5b8e8: 2f2e ffe8 movel %fp@(-24),%sp@- <== NOT EXECUTED 5b8ec: 2f2e fff4 movel %fp@(-12),%sp@- <== NOT EXECUTED 5b8f0: 2f2e ffec movel %fp@(-20),%sp@- <== NOT EXECUTED 5b8f4: 2f0a movel %a2,%sp@- <== NOT EXECUTED
{
rc = rtems_rfs_group_bitmap_free (fs, false, singly);
if (rc > 0)
return rc;
map->last_map_block = singly;
5b8f6: 2544 001a movel %d4,%a2@(26) <== NOT EXECUTED
rc = rtems_rfs_block_map_indirect_shrink (fs, map, &map->doubly_buffer,
5b8fa: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5b8fc: 4eba f2bc jsr %pc@(5abba <rtems_rfs_block_map_indirect_shrink.isra.12>)<== NOT EXECUTED
doubly, doubly_singly);
if (rc)
5b900: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 5b904: 4a80 tstl %d0 <== NOT EXECUTED 5b906: 6700 fe9a beqw 5b7a2 <rtems_rfs_block_map_shrink+0x78><== NOT EXECUTED
*/
if (rtems_rfs_block_pos_past_end (&map->bpos, &map->size))
rtems_rfs_block_size_get_bpos (&map->size, &map->bpos);
return 0;
}
5b90a: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5b910: 4e5e unlk %fp <== NOT EXECUTED 5b912: 4e75 rts <== NOT EXECUTED
{
/*
* Request the indirect block and then obtain the block number from the
* indirect block.
*/
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
5b914: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 5b918: 2f32 4c22 movel %a2@(00000022,%d4:l:4),%sp@- <== NOT EXECUTED 5b91c: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 5b920: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5b922: 4e95 jsr %a5@ <== NOT EXECUTED
map->blocks[singly], true);
if (rc > 0)
5b924: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5b928: 4a80 tstl %d0 <== NOT EXECUTED 5b92a: 6e00 fec8 bgtw 5b7f4 <rtems_rfs_block_map_shrink+0xca><== NOT EXECUTED
return rc;
block_to_free = rtems_rfs_block_get_number (&map->singly_buffer,
5b92e: 206a 003c moveal %a2@(60),%a0 <== NOT EXECUTED 5b932: 2005 movel %d5,%d0 <== NOT EXECUTED 5b934: 2068 001e moveal %a0@(30),%a0 <== NOT EXECUTED 5b938: e588 lsll #2,%d0 <== NOT EXECUTED 5b93a: 1c30 0800 moveb %a0@(00000000,%d0:l),%d6 <== NOT EXECUTED 5b93e: 1e30 0801 moveb %a0@(00000001,%d0:l),%d7 <== NOT EXECUTED 5b942: 1430 0803 moveb %a0@(00000003,%d0:l),%d2 <== NOT EXECUTED 5b946: 1d46 fff7 moveb %d6,%fp@(-9) <== NOT EXECUTED 5b94a: 1c30 0802 moveb %a0@(00000002,%d0:l),%d6 <== NOT EXECUTED
direct);
rc = rtems_rfs_block_map_indirect_shrink (fs, map, &map->singly_buffer,
5b94e: 2f05 movel %d5,%sp@- <== NOT EXECUTED 5b950: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5b952: 2f2e fff0 movel %fp@(-16),%sp@- <== NOT EXECUTED 5b956: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5b958: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5b95a: 4eba f25e jsr %pc@(5abba <rtems_rfs_block_map_indirect_shrink.isra.12>)<== NOT EXECUTED
singly, direct);
if (rc)
5b95e: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 5b962: 4a80 tstl %d0 <== NOT EXECUTED 5b964: 6600 fe8e bnew 5b7f4 <rtems_rfs_block_map_shrink+0xca><== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
map->blocks[singly], true);
if (rc > 0)
return rc;
block_to_free = rtems_rfs_block_get_number (&map->singly_buffer,
5b968: 7218 moveq #24,%d1 <== NOT EXECUTED 5b96a: 49f9 0004 fffe lea 4fffe <rtems_rfs_group_bitmap_free>,%a4 <== NOT EXECUTED 5b970: 102e fff7 moveb %fp@(-9),%d0 <== NOT EXECUTED 5b974: 0282 0000 00ff andil #255,%d2 <== NOT EXECUTED 5b97a: 0287 0000 00ff andil #255,%d7 <== NOT EXECUTED 5b980: e3a8 lsll %d1,%d0 <== NOT EXECUTED 5b982: 4847 swap %d7 <== NOT EXECUTED 5b984: 4247 clrw %d7 <== NOT EXECUTED 5b986: 8480 orl %d0,%d2 <== NOT EXECUTED 5b988: 0286 0000 00ff andil #255,%d6 <== NOT EXECUTED 5b98e: 8487 orl %d7,%d2 <== NOT EXECUTED 5b990: e18e lsll #8,%d6 <== NOT EXECUTED 5b992: 8486 orl %d6,%d2 <== NOT EXECUTED 5b994: 6000 fe0c braw 5b7a2 <rtems_rfs_block_map_shrink+0x78><== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_SHRINK))
printf ("rtems-rfs: block-map-shrink: entry: blocks=%zd count=%" PRIu32 "\n",
blocks, map->size.count);
if (map->size.count == 0)
5b998: 2601 movel %d1,%d3 <== NOT EXECUTED 5b99a: 6000 fdc4 braw 5b760 <rtems_rfs_block_map_shrink+0x36><== NOT EXECUTED
rtems_rfs_block_map_shrink (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
size_t blocks)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_SHRINK))
printf ("rtems-rfs: block-map-shrink: entry: blocks=%zd count=%" PRIu32 "\n",
5b99e: 2f2a 0006 movel %a2@(6),%sp@- <== NOT EXECUTED 5b9a2: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5b9a4: 4879 0007 369f pea 7369f <CSWTCH.1+0xc3> <== NOT EXECUTED 5b9aa: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5b9b0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5b9b4: 6000 fd9c braw 5b752 <rtems_rfs_block_map_shrink+0x28><== NOT EXECUTED
}
/*
* Keep the position inside the map.
*/
if (rtems_rfs_block_pos_past_end (&map->bpos, &map->size))
5b9b8: 4a81 tstl %d1 <== NOT EXECUTED 5b9ba: 6600 fe26 bnew 5b7e2 <rtems_rfs_block_map_shrink+0xb8><== NOT EXECUTED 5b9be: 202a 000a movel %a2@(10),%d0 <== NOT EXECUTED
rtems_rfs_block_size_get_bpos (&map->size, &map->bpos);
5b9c2: 2541 000e movel %d1,%a2@(14) <== NOT EXECUTED 5b9c6: 2540 0012 movel %d0,%a2@(18) <== NOT EXECUTED 5b9ca: 42aa 0016 clrl %a2@(22) <== NOT EXECUTED 5b9ce: 4a80 tstl %d0 <== NOT EXECUTED 5b9d0: 6700 fe20 beqw 5b7f2 <rtems_rfs_block_map_shrink+0xc8><== NOT EXECUTED 5b9d4: 5381 subql #1,%d1 <== NOT EXECUTED
return 0;
5b9d6: 4280 clrl %d0 <== NOT EXECUTED
/*
* Keep the position inside the map.
*/
if (rtems_rfs_block_pos_past_end (&map->bpos, &map->size))
rtems_rfs_block_size_get_bpos (&map->size, &map->bpos);
5b9d8: 2541 000e movel %d1,%a2@(14) <== NOT EXECUTED
return 0;
}
5b9dc: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5b9e2: 4e5e unlk %fp <== NOT EXECUTED 5b9e4: 4e75 rts <== NOT EXECUTED
}
/*
* Keep the position inside the map.
*/
if (rtems_rfs_block_pos_past_end (&map->bpos, &map->size))
5b9e6: 202a 000a movel %a2@(10),%d0 <== NOT EXECUTED 5b9ea: b0aa 0012 cmpl %a2@(18),%d0 <== NOT EXECUTED 5b9ee: 65d2 bcss 5b9c2 <rtems_rfs_block_map_shrink+0x298><== NOT EXECUTED
rtems_rfs_block_size_get_bpos (&map->size, &map->bpos);
return 0;
5b9f0: 4280 clrl %d0 <== NOT EXECUTED 5b9f2: 6000 fe00 braw 5b7f4 <rtems_rfs_block_map_shrink+0xca><== NOT EXECUTED
000621d2 <rtems_rfs_buffer_bdbuf_release>:
}
int
rtems_rfs_buffer_bdbuf_release (rtems_rfs_buffer* buffer,
bool modified)
{
621d2: 4e56 0000 linkw %fp,#0 621d6: 2f0a movel %a2,%sp@- 621d8: 246e 0008 moveal %fp@(8),%a2 621dc: 2f02 movel %d2,%sp@-
rtems_status_code sc;
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_RELEASE))
621de: 4878 0040 pea 40 <DBL_MANT_DIG+0xb>
}
int
rtems_rfs_buffer_bdbuf_release (rtems_rfs_buffer* buffer,
bool modified)
{
621e2: 142e 000f moveb %fp@(15),%d2
rtems_status_code sc;
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_RELEASE))
621e6: 42a7 clrl %sp@- 621e8: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> 621ee: 508f addql #8,%sp 621f0: 4a00 tstb %d0
621f2: 672a beqs 6221e <rtems_rfs_buffer_bdbuf_release+0x4c><== ALWAYS TAKEN
printf ("rtems-rfs: bdbuf-release: block=%" PRIuPTR " bdbuf=%" PRIu32 " %s\n",
621f4: 203c 0007 223c movel #467516,%d0 <== NOT EXECUTED 621fa: 4a02 tstb %d2 <== NOT EXECUTED 621fc: 6706 beqs 62204 <rtems_rfs_buffer_bdbuf_release+0x32><== NOT EXECUTED 621fe: 203c 0007 4bc0 movel #478144,%d0 <== NOT EXECUTED 62204: 2f00 movel %d0,%sp@- <== NOT EXECUTED 62206: 2f2a 001a movel %a2@(26),%sp@- <== NOT EXECUTED 6220a: 2f2a 0036 movel %a2@(54),%sp@- <== NOT EXECUTED 6220e: 4879 0007 4bcb pea 74bcb <status_code_to_errno+0x7f> <== NOT EXECUTED 62214: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 6221a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
((intptr_t) buffer->user),
buffer->block, modified ? "(modified)" : "");
if (modified)
6221e: 4a02 tstb %d2
62220: 671c beqs 6223e <rtems_rfs_buffer_bdbuf_release+0x6c>
sc = rtems_bdbuf_release_modified (buffer);
62222: 2f0a movel %a2,%sp@- 62224: 4eb9 0005 5c98 jsr 55c98 <rtems_bdbuf_release_modified> 6222a: 588f addql #4,%sp
else
sc = rtems_bdbuf_release (buffer);
if (sc != RTEMS_SUCCESSFUL)
6222c: 4a80 tstl %d0
6222e: 6702 beqs 62232 <rtems_rfs_buffer_bdbuf_release+0x60><== ALWAYS TAKEN
#if RTEMS_RFS_BUFFER_ERRORS
printf ("rtems-rfs: buffer-release: bdbuf-%s: %s(%d)\n",
modified ? "modified" : "not-modified",
rtems_status_text (sc), sc);
#endif
rc = EIO;
62230: 7005 moveq #5,%d0 <== NOT EXECUTED
}
return rc;
}
62232: 242e fff8 movel %fp@(-8),%d2 62236: 246e fffc moveal %fp@(-4),%a2 6223a: 4e5e unlk %fp 6223c: 4e75 rts
buffer->block, modified ? "(modified)" : "");
if (modified)
sc = rtems_bdbuf_release_modified (buffer);
else
sc = rtems_bdbuf_release (buffer);
6223e: 2f0a movel %a2,%sp@- 62240: 4eb9 0005 5bcc jsr 55bcc <rtems_bdbuf_release> 62246: 588f addql #4,%sp 62248: 60e2 bras 6222c <rtems_rfs_buffer_bdbuf_release+0x5a>
...
00062180 <rtems_rfs_buffer_bdbuf_request>:
int
rtems_rfs_buffer_bdbuf_request (rtems_rfs_file_system* fs,
rtems_rfs_buffer_block block,
bool read,
rtems_rfs_buffer** buffer)
{
62180: 4e56 0000 linkw %fp,#0 62184: 206e 0008 moveal %fp@(8),%a0 62188: 202e 000c movel %fp@(12),%d0 6218c: 222e 0014 movel %fp@(20),%d1
rtems_status_code sc;
int rc = 0;
if (read)
62190: 4a2e 0013 tstb %fp@(19)
62194: 6722 beqs 621b8 <rtems_rfs_buffer_bdbuf_request+0x38>
sc = rtems_bdbuf_read (rtems_rfs_fs_device (fs), block, buffer);
62196: 2f01 movel %d1,%sp@- 62198: 2068 000c moveal %a0@(12),%a0 6219c: 2f00 movel %d0,%sp@- 6219e: 2f28 0004 movel %a0@(4),%sp@- 621a2: 2f10 movel %a0@,%sp@- 621a4: 4eb9 0005 5924 jsr 55924 <rtems_bdbuf_read> 621aa: 4fef 0010 lea %sp@(16),%sp
else
sc = rtems_bdbuf_get (rtems_rfs_fs_device (fs), block, buffer);
if (sc != RTEMS_SUCCESSFUL)
621ae: 4a80 tstl %d0
621b0: 6702 beqs 621b4 <rtems_rfs_buffer_bdbuf_request+0x34><== ALWAYS TAKEN
{
#if RTEMS_RFS_BUFFER_ERRORS
printf ("rtems-rfs: buffer-bdbuf-request: block=%lu: bdbuf-%s: %d: %s\n",
block, read ? "read" : "get", sc, rtems_status_text (sc));
#endif
rc = EIO;
621b2: 7005 moveq #5,%d0 <== NOT EXECUTED
}
return rc;
}
621b4: 4e5e unlk %fp 621b6: 4e75 rts
int rc = 0;
if (read)
sc = rtems_bdbuf_read (rtems_rfs_fs_device (fs), block, buffer);
else
sc = rtems_bdbuf_get (rtems_rfs_fs_device (fs), block, buffer);
621b8: 2f01 movel %d1,%sp@- 621ba: 2068 000c moveal %a0@(12),%a0 621be: 2f00 movel %d0,%sp@- 621c0: 2f28 0004 movel %a0@(4),%sp@- 621c4: 2f10 movel %a0@,%sp@- 621c6: 4eb9 0005 5830 jsr 55830 <rtems_bdbuf_get> 621cc: 4fef 0010 lea %sp@(16),%sp 621d0: 60dc bras 621ae <rtems_rfs_buffer_bdbuf_request+0x2e>
0005c3d0 <rtems_rfs_buffer_close>:
return 0;
}
int
rtems_rfs_buffer_close (rtems_rfs_file_system* fs)
{
5c3d0: 4e56 fff4 linkw %fp,#-12 5c3d4: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CLOSE))
5c3d8: 4878 0010 pea 10 <INVALID_OPERATION> 5c3dc: 47f9 0005 37c0 lea 537c0 <rtems_rfs_trace>,%a3
return 0;
}
int
rtems_rfs_buffer_close (rtems_rfs_file_system* fs)
{
5c3e2: 246e 0008 moveal %fp@(8),%a2
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CLOSE))
5c3e6: 42a7 clrl %sp@- 5c3e8: 4e93 jsr %a3@ 5c3ea: 508f addql #8,%sp 5c3ec: 4a00 tstb %d0
5c3ee: 663a bnes 5c42a <rtems_rfs_buffer_close+0x5a> <== NEVER TAKEN
/*
* Change the block size to the media device size. It will release and sync
* all buffers.
*/
rc = rtems_rfs_buffer_setblksize (fs, rtems_rfs_fs_media_block_size (fs));
5c3f0: 206a 000c moveal %a2@(12),%a0 5c3f4: 2f28 0024 movel %a0@(36),%sp@- 5c3f8: 2f0a movel %a2,%sp@- 5c3fa: 4eb9 0005 c2ca jsr 5c2ca <rtems_rfs_buffer_setblksize>
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CLOSE))
5c400: 508f addql #8,%sp
/*
* Change the block size to the media device size. It will release and sync
* all buffers.
*/
rc = rtems_rfs_buffer_setblksize (fs, rtems_rfs_fs_media_block_size (fs));
5c402: 2400 movel %d0,%d2
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CLOSE))
5c404: 6f0e bles 5c414 <rtems_rfs_buffer_close+0x44> <== ALWAYS TAKEN
5c406: 4878 0010 pea 10 <INVALID_OPERATION> <== NOT EXECUTED 5c40a: 42a7 clrl %sp@- <== NOT EXECUTED 5c40c: 4e93 jsr %a3@ <== NOT EXECUTED 5c40e: 508f addql #8,%sp <== NOT EXECUTED 5c410: 4a00 tstb %d0 <== NOT EXECUTED 5c412: 6626 bnes 5c43a <rtems_rfs_buffer_close+0x6a> <== NOT EXECUTED
printf ("rtems-rfs: buffer-close: set media block size failed: %d: %s\n",
rc, strerror (rc));
#if RTEMS_RFS_USE_LIBBLOCK
rtems_disk_release (fs->disk);
5c414: 2f2a 000c movel %a2@(12),%sp@- 5c418: 4eb9 0004 561a jsr 4561a <rtems_disk_release>
rc, strerror (rc));
}
#endif
return rc;
}
5c41e: 2002 movel %d2,%d0 5c420: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 5c426: 4e5e unlk %fp 5c428: 4e75 rts
rtems_rfs_buffer_close (rtems_rfs_file_system* fs)
{
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CLOSE))
printf ("rtems-rfs: buffer-close: closing\n");
5c42a: 4879 0007 3afa pea 73afa <CSWTCH.1+0x51e> <== NOT EXECUTED 5c430: 4eb9 0006 30ce jsr 630ce <puts> <== NOT EXECUTED 5c436: 588f addql #4,%sp <== NOT EXECUTED 5c438: 60b6 bras 5c3f0 <rtems_rfs_buffer_close+0x20> <== NOT EXECUTED
* all buffers.
*/
rc = rtems_rfs_buffer_setblksize (fs, rtems_rfs_fs_media_block_size (fs));
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CLOSE))
printf ("rtems-rfs: buffer-close: set media block size failed: %d: %s\n",
5c43a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5c43c: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED 5c442: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5c444: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5c446: 4879 0007 3b1b pea 73b1b <CSWTCH.1+0x53f> <== NOT EXECUTED 5c44c: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5c452: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rc, strerror (rc));
#if RTEMS_RFS_USE_LIBBLOCK
rtems_disk_release (fs->disk);
5c456: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED 5c45a: 4eb9 0004 561a jsr 4561a <rtems_disk_release> <== NOT EXECUTED
rc, strerror (rc));
}
#endif
return rc;
}
5c460: 2002 movel %d2,%d0 <== NOT EXECUTED 5c462: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 5c468: 4e5e unlk %fp <== NOT EXECUTED
0005bbc0 <rtems_rfs_buffer_handle_release>:
}
int
rtems_rfs_buffer_handle_release (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
5bbc0: 4e56 ffec linkw %fp,#-20 5bbc4: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 5bbc8: 266e 0008 moveal %fp@(8),%a3 5bbcc: 246e 000c moveal %fp@(12),%a2
int rc = 0;
if (rtems_rfs_buffer_handle_has_block (handle))
5bbd0: 4aaa 0006 tstl %a2@(6) 5bbd4: 6700 00c8 beqw 5bc9e <rtems_rfs_buffer_handle_release+0xde>
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_RELEASE))
5bbd8: 4878 0200 pea 200 <DBL_MANT_DIG+0x1cb> 5bbdc: 49f9 0005 37c0 lea 537c0 <rtems_rfs_trace>,%a4 5bbe2: 42a7 clrl %sp@- 5bbe4: 4e94 jsr %a4@ 5bbe6: 508f addql #8,%sp 5bbe8: 4a00 tstb %d0
5bbea: 6624 bnes 5bc10 <rtems_rfs_buffer_handle_release+0x50><== NEVER TAKEN
rtems_rfs_buffer_bnum (handle),
rtems_rfs_buffer_dirty (handle) ? "(dirty)" : "",
rtems_rfs_buffer_refs (handle),
rtems_rfs_buffer_refs (handle) == 0 ? "BAD REF COUNT" : "");
if (rtems_rfs_buffer_refs (handle) > 0)
5bbec: 206a 0006 moveal %a2@(6),%a0 5bbf0: 2428 0032 movel %a0@(50),%d2
5bbf4: 6f06 bles 5bbfc <rtems_rfs_buffer_handle_release+0x3c><== NEVER TAKEN
rtems_rfs_buffer_refs_down (handle);
5bbf6: 5382 subql #1,%d2 5bbf8: 2142 0032 movel %d2,%a0@(50)
if (rtems_rfs_buffer_refs (handle) == 0)
5bbfc: 4a82 tstl %d2
5bbfe: 6752 beqs 5bc52 <rtems_rfs_buffer_handle_release+0x92>
int
rtems_rfs_buffer_handle_release (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
int rc = 0;
5bc00: 4280 clrl %d0
rtems_chain_append (&fs->release, rtems_rfs_buffer_link (handle));
fs->release_count++;
}
}
}
handle->buffer = NULL;
5bc02: 42aa 0006 clrl %a2@(6)
}
return rc;
}
5bc06: 4cee 1c04 ffec moveml %fp@(-20),%d2/%a2-%a4 5bc0c: 4e5e unlk %fp 5bc0e: 4e75 rts
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_RELEASE))
printf ("rtems-rfs: buffer-release: block=%" PRIu32 " %s refs=%d %s\n",
rtems_rfs_buffer_bnum (handle),
rtems_rfs_buffer_dirty (handle) ? "(dirty)" : "",
rtems_rfs_buffer_refs (handle),
rtems_rfs_buffer_refs (handle) == 0 ? "BAD REF COUNT" : "");
5bc10: 226a 0006 moveal %a2@(6),%a1 <== NOT EXECUTED
int rc = 0;
if (rtems_rfs_buffer_handle_has_block (handle))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_RELEASE))
printf ("rtems-rfs: buffer-release: block=%" PRIu32 " %s refs=%d %s\n",
5bc14: 41f9 0007 223c lea 7223c <rtems_filesystem_default_pathconf+0xb4>,%a0<== NOT EXECUTED
rtems_rfs_buffer_bnum (handle),
rtems_rfs_buffer_dirty (handle) ? "(dirty)" : "",
rtems_rfs_buffer_refs (handle),
rtems_rfs_buffer_refs (handle) == 0 ? "BAD REF COUNT" : "");
5bc1a: 2029 0032 movel %a1@(50),%d0 <== NOT EXECUTED
int rc = 0;
if (rtems_rfs_buffer_handle_has_block (handle))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_RELEASE))
printf ("rtems-rfs: buffer-release: block=%" PRIu32 " %s refs=%d %s\n",
5bc1e: 6606 bnes 5bc26 <rtems_rfs_buffer_handle_release+0x66><== NOT EXECUTED 5bc20: 41f9 0007 3751 lea 73751 <CSWTCH.1+0x175>,%a0 <== NOT EXECUTED 5bc26: 223c 0007 223c movel #467516,%d1 <== NOT EXECUTED 5bc2c: 4a12 tstb %a2@ <== NOT EXECUTED 5bc2e: 6706 beqs 5bc36 <rtems_rfs_buffer_handle_release+0x76><== NOT EXECUTED 5bc30: 223c 0007 375f movel #472927,%d1 <== NOT EXECUTED 5bc36: 2f08 movel %a0,%sp@- <== NOT EXECUTED 5bc38: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5bc3a: 2f01 movel %d1,%sp@- <== NOT EXECUTED 5bc3c: 2f2a 0002 movel %a2@(2),%sp@- <== NOT EXECUTED 5bc40: 4879 0007 3767 pea 73767 <CSWTCH.1+0x18b> <== NOT EXECUTED 5bc46: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5bc4c: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 5bc50: 609a bras 5bbec <rtems_rfs_buffer_handle_release+0x2c><== NOT EXECUTED
5bc52: 2f08 movel %a0,%sp@- 5bc54: 4eb9 0004 bb78 jsr 4bb78 <_Chain_Extract>
if (rtems_rfs_buffer_refs (handle) == 0)
{
rtems_chain_extract (rtems_rfs_buffer_link (handle));
fs->buffers_count--;
if (rtems_rfs_fs_no_local_cache (fs))
5bc5a: 588f addql #4,%sp 5bc5c: 7002 moveq #2,%d0
rtems_rfs_buffer_refs_down (handle);
if (rtems_rfs_buffer_refs (handle) == 0)
{
rtems_chain_extract (rtems_rfs_buffer_link (handle));
fs->buffers_count--;
5bc5e: 53ab 004c subql #1,%a3@(76)
if (rtems_rfs_fs_no_local_cache (fs))
5bc62: c093 andl %a3@,%d0
5bc64: 6644 bnes 5bcaa <rtems_rfs_buffer_handle_release+0xea>
* head.
*
* This code stops a large series of transactions causing all the
* buffers in the cache being held in queues of this file system.
*/
if ((fs->release_count +
5bc66: 202b 006c movel %a3@(108),%d0 5bc6a: d0ab 005c addl %a3@(92),%d0 5bc6e: b0ab 003c cmpl %a3@(60),%d0
5bc72: 647a bccs 5bcee <rtems_rfs_buffer_handle_release+0x12e>
int
rtems_rfs_buffer_handle_release (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
int rc = 0;
5bc74: 4280 clrl %d0
}
buffer->user = (void*) 0;
rc = rtems_rfs_buffer_io_release (buffer, modified);
}
if (rtems_rfs_buffer_dirty (handle))
5bc76: 4a12 tstb %a2@
5bc78: 6750 beqs 5bcca <rtems_rfs_buffer_handle_release+0x10a>
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
5bc7a: 2f2a 0006 movel %a2@(6),%sp@- 5bc7e: 486b 0060 pea %a3@(96) 5bc82: 2d40 fffc movel %d0,%fp@(-4) 5bc86: 4eb9 0004 bb40 jsr 4bb40 <_Chain_Append> 5bc8c: 202e fffc movel %fp@(-4),%d0
{
rtems_chain_append (&fs->release_modified,
rtems_rfs_buffer_link (handle));
fs->release_modified_count++;
5bc90: 52ab 006c addql #1,%a3@(108) 5bc94: 508f addql #8,%sp
rtems_chain_append (&fs->release, rtems_rfs_buffer_link (handle));
fs->release_count++;
}
}
}
handle->buffer = NULL;
5bc96: 42aa 0006 clrl %a2@(6) 5bc9a: 6000 ff6a braw 5bc06 <rtems_rfs_buffer_handle_release+0x46>
int
rtems_rfs_buffer_handle_release (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
int rc = 0;
5bc9e: 4280 clrl %d0
}
handle->buffer = NULL;
}
return rc;
}
5bca0: 4cee 1c04 ffec moveml %fp@(-20),%d2/%a2-%a4 5bca6: 4e5e unlk %fp 5bca8: 4e75 rts
fs->buffers_count--;
if (rtems_rfs_fs_no_local_cache (fs))
{
handle->buffer->user = (void*) 0;
rc = rtems_rfs_buffer_io_release (handle->buffer,
5bcaa: 4280 clrl %d0 5bcac: 1012 moveb %a2@,%d0
rtems_chain_extract (rtems_rfs_buffer_link (handle));
fs->buffers_count--;
if (rtems_rfs_fs_no_local_cache (fs))
{
handle->buffer->user = (void*) 0;
5bcae: 206a 0006 moveal %a2@(6),%a0 5bcb2: 42a8 0036 clrl %a0@(54)
rc = rtems_rfs_buffer_io_release (handle->buffer,
5bcb6: 2f00 movel %d0,%sp@- 5bcb8: 2f08 movel %a0,%sp@- 5bcba: 4eb9 0006 21d2 jsr 621d2 <rtems_rfs_buffer_bdbuf_release> 5bcc0: 508f addql #8,%sp
rtems_chain_append (&fs->release, rtems_rfs_buffer_link (handle));
fs->release_count++;
}
}
}
handle->buffer = NULL;
5bcc2: 42aa 0006 clrl %a2@(6) 5bcc6: 6000 ff3e braw 5bc06 <rtems_rfs_buffer_handle_release+0x46> 5bcca: 2f2a 0006 movel %a2@(6),%sp@- 5bcce: 486b 0050 pea %a3@(80) 5bcd2: 2d40 fffc movel %d0,%fp@(-4) 5bcd6: 4eb9 0004 bb40 jsr 4bb40 <_Chain_Append> 5bcdc: 202e fffc movel %fp@(-4),%d0
fs->release_modified_count++;
}
else
{
rtems_chain_append (&fs->release, rtems_rfs_buffer_link (handle));
fs->release_count++;
5bce0: 52ab 005c addql #1,%a3@(92) 5bce4: 508f addql #8,%sp
}
}
}
handle->buffer = NULL;
5bce6: 42aa 0006 clrl %a2@(6) 5bcea: 6000 ff1a braw 5bc06 <rtems_rfs_buffer_handle_release+0x46>
fs->release_modified_count) >= fs->max_held_buffers)
{
rtems_rfs_buffer* buffer;
bool modified;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_RELEASE))
5bcee: 4878 0200 pea 200 <DBL_MANT_DIG+0x1cb> 5bcf2: 42a7 clrl %sp@- 5bcf4: 4e94 jsr %a4@ 5bcf6: 508f addql #8,%sp 5bcf8: 4a00 tstb %d0
5bcfa: 6630 bnes 5bd2c <rtems_rfs_buffer_handle_release+0x16c><== NEVER TAKEN
printf ("rtems-rfs: buffer-release: local cache overflow:"
" %" PRIu32 "\n", fs->release_count + fs->release_modified_count);
if (fs->release_count > fs->release_modified_count)
5bcfc: 206b 006c moveal %a3@(108),%a0 5bd00: b1eb 005c cmpal %a3@(92),%a0
5bd04: 6440 bccs 5bd46 <rtems_rfs_buffer_handle_release+0x186><== ALWAYS TAKEN
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
5bd06: 486b 0050 pea %a3@(80) <== NOT EXECUTED 5bd0a: 4eb9 0004 bba0 jsr 4bba0 <_Chain_Get> <== NOT EXECUTED
{
buffer = (rtems_rfs_buffer*) rtems_chain_get (&fs->release);
fs->release_count--;
5bd10: 588f addql #4,%sp <== NOT EXECUTED 5bd12: 53ab 005c subql #1,%a3@(92) <== NOT EXECUTED
buffer =
(rtems_rfs_buffer*) rtems_chain_get (&fs->release_modified);
fs->release_modified_count--;
modified = true;
}
buffer->user = (void*) 0;
5bd16: 2040 moveal %d0,%a0 <== NOT EXECUTED 5bd18: 42a8 0036 clrl %a0@(54) <== NOT EXECUTED
rc = rtems_rfs_buffer_io_release (buffer, modified);
5bd1c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5bd1e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5bd20: 4eb9 0006 21d2 jsr 621d2 <rtems_rfs_buffer_bdbuf_release> <== NOT EXECUTED 5bd26: 508f addql #8,%sp <== NOT EXECUTED 5bd28: 6000 ff4c braw 5bc76 <rtems_rfs_buffer_handle_release+0xb6><== NOT EXECUTED
{
rtems_rfs_buffer* buffer;
bool modified;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_RELEASE))
printf ("rtems-rfs: buffer-release: local cache overflow:"
5bd2c: 202b 006c movel %a3@(108),%d0 <== NOT EXECUTED 5bd30: d0ab 005c addl %a3@(92),%d0 <== NOT EXECUTED 5bd34: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5bd36: 4879 0007 379b pea 7379b <CSWTCH.1+0x1bf> <== NOT EXECUTED 5bd3c: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5bd42: 508f addql #8,%sp <== NOT EXECUTED 5bd44: 60b6 bras 5bcfc <rtems_rfs_buffer_handle_release+0x13c><== NOT EXECUTED
5bd46: 486b 0060 pea %a3@(96)
}
else
{
buffer =
(rtems_rfs_buffer*) rtems_chain_get (&fs->release_modified);
fs->release_modified_count--;
5bd4a: 7401 moveq #1,%d2 5bd4c: 4eb9 0004 bba0 jsr 4bba0 <_Chain_Get> 5bd52: 588f addql #4,%sp 5bd54: 53ab 006c subql #1,%a3@(108)
modified = true;
}
buffer->user = (void*) 0;
5bd58: 2040 moveal %d0,%a0 5bd5a: 42a8 0036 clrl %a0@(54)
rc = rtems_rfs_buffer_io_release (buffer, modified);
5bd5e: 2f02 movel %d2,%sp@- 5bd60: 2f00 movel %d0,%sp@- 5bd62: 4eb9 0006 21d2 jsr 621d2 <rtems_rfs_buffer_bdbuf_release> 5bd68: 508f addql #8,%sp 5bd6a: 6000 ff0a braw 5bc76 <rtems_rfs_buffer_handle_release+0xb6>
0005bd6e <rtems_rfs_buffer_handle_request>:
int
rtems_rfs_buffer_handle_request (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle,
rtems_rfs_buffer_block block,
bool read)
{
5bd6e: 4e56 ffe8 linkw %fp,#-24 5bd72: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ 5bd76: 266e 0008 moveal %fp@(8),%a3 5bd7a: 49f9 0005 37c0 lea 537c0 <rtems_rfs_trace>,%a4 5bd80: 246e 000c moveal %fp@(12),%a2 5bd84: 242e 0010 movel %fp@(16),%d2 5bd88: 182e 0017 moveb %fp@(23),%d4
/*
* If the handle has a buffer release it. This allows a handle to be reused
* without needing to close then open it again.
*/
if (rtems_rfs_buffer_handle_has_block (handle))
5bd8c: 4aaa 0006 tstl %a2@(6)
5bd90: 6744 beqs 5bdd6 <rtems_rfs_buffer_handle_request+0x68>
{
/*
* Treat block 0 as special to handle the loading of the super block.
*/
if (block && (rtems_rfs_buffer_bnum (handle) == block))
5bd92: 4a82 tstl %d2
5bd94: 6708 beqs 5bd9e <rtems_rfs_buffer_handle_request+0x30><== NEVER TAKEN
5bd96: b4aa 0002 cmpl %a2@(2),%d2 5bd9a: 6700 00fe beqw 5be9a <rtems_rfs_buffer_handle_request+0x12c>
return 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
5bd9e: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> 5bda2: 49f9 0005 37c0 lea 537c0 <rtems_rfs_trace>,%a4 5bda8: 42a7 clrl %sp@- 5bdaa: 4e94 jsr %a4@ 5bdac: 508f addql #8,%sp 5bdae: 4a00 tstb %d0 5bdb0: 6600 00c0 bnew 5be72 <rtems_rfs_buffer_handle_request+0x104>
printf ("rtems-rfs: buffer-request: handle has buffer: %" PRIu32 "\n",
rtems_rfs_buffer_bnum (handle));
rc = rtems_rfs_buffer_handle_release (fs, handle);
5bdb4: 2f0a movel %a2,%sp@- 5bdb6: 2f0b movel %a3,%sp@- 5bdb8: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release>
if (rc > 0)
5bdbe: 508f addql #8,%sp
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
printf ("rtems-rfs: buffer-request: handle has buffer: %" PRIu32 "\n",
rtems_rfs_buffer_bnum (handle));
rc = rtems_rfs_buffer_handle_release (fs, handle);
5bdc0: 2600 movel %d0,%d3
if (rc > 0)
5bdc2: 6f0c bles 5bdd0 <rtems_rfs_buffer_handle_request+0x62><== ALWAYS TAKEN
printf ("rtems-rfs: buffer-request: block=%" PRIu32 " bdbuf-%s=%" PRIu32 " refs=%d\n",
block, read ? "read" : "get", handle->buffer->block,
handle->buffer->references);
return 0;
}
5bdc4: 2003 movel %d3,%d0 <== NOT EXECUTED 5bdc6: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 <== NOT EXECUTED 5bdcc: 4e5e unlk %fp <== NOT EXECUTED 5bdce: 4e75 rts <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_release (fs, handle);
if (rc > 0)
return rc;
handle->dirty = false;
handle->bnum = 0;
5bdd0: 42aa 0002 clrl %a2@(2)
rtems_rfs_buffer_bnum (handle));
rc = rtems_rfs_buffer_handle_release (fs, handle);
if (rc > 0)
return rc;
handle->dirty = false;
5bdd4: 4212 clrb %a2@
handle->bnum = 0;
}
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
5bdd6: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> 5bdda: 42a7 clrl %sp@- 5bddc: 4e94 jsr %a4@ 5bdde: 508f addql #8,%sp 5bde0: 4a00 tstb %d0 5bde2: 6600 013e bnew 5bf22 <rtems_rfs_buffer_handle_request+0x1b4>
* currently attached to a handle. If it is share the access. A buffer could * be shared where different parts of the block have separate functions. An * example is an inode block and the file system needs to handle 2 inodes in * the same block at the same time. */ if (fs->buffers_count)
5bde6: 4aab 004c tstl %a3@(76) 5bdea: 6600 014e bnew 5bf3a <rtems_rfs_buffer_handle_request+0x1cc> 5bdee: 206a 0006 moveal %a2@(6),%a0
/* * If the buffer has not been found check the local cache of released * buffers. There are release and released modified lists to preserve the * state. */ if (!rtems_rfs_fs_no_local_cache (fs) &&
5bdf2: 7002 moveq #2,%d0 5bdf4: c093 andl %a3@,%d0 5bdf6: 6600 00b0 bnew 5bea8 <rtems_rfs_buffer_handle_request+0x13a> 5bdfa: 4a88 tstl %a0 5bdfc: 6700 0190 beqw 5bf8e <rtems_rfs_buffer_handle_request+0x220>
}
/*
* Increase the reference count of the buffer.
*/
rtems_rfs_buffer_refs_up (handle);
5be00: 52a8 0032 addql #1,%a0@(50)
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
5be04: 2f08 movel %a0,%sp@- 5be06: 486b 0040 pea %a3@(64) 5be0a: 4eb9 0004 bb40 jsr 4bb40 <_Chain_Append>
rtems_chain_append (&fs->buffers, rtems_rfs_buffer_link (handle));
fs->buffers_count++;
handle->buffer->user = (void*) ((intptr_t) block);
5be10: 206a 0006 moveal %a2@(6),%a0
/* * Increase the reference count of the buffer. */ rtems_rfs_buffer_refs_up (handle); rtems_chain_append (&fs->buffers, rtems_rfs_buffer_link (handle)); fs->buffers_count++;
5be14: 52ab 004c addql #1,%a3@(76)
handle->buffer->user = (void*) ((intptr_t) block);
5be18: 2142 0036 movel %d2,%a0@(54)
handle->bnum = block;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
5be1c: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> 5be20: 42a7 clrl %sp@-
rtems_rfs_buffer_refs_up (handle);
rtems_chain_append (&fs->buffers, rtems_rfs_buffer_link (handle));
fs->buffers_count++;
handle->buffer->user = (void*) ((intptr_t) block);
handle->bnum = block;
5be22: 2542 0002 movel %d2,%a2@(2)
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
5be26: 4e94 jsr %a4@ 5be28: 4fef 0010 lea %sp@(16),%sp 5be2c: 4a00 tstb %d0
5be2e: 676a beqs 5be9a <rtems_rfs_buffer_handle_request+0x12c><== ALWAYS TAKEN
printf ("rtems-rfs: buffer-request: block=%" PRIu32 " bdbuf-%s=%" PRIu32 " refs=%d\n",
block, read ? "read" : "get", handle->buffer->block,
handle->buffer->references);
5be30: 206a 0006 moveal %a2@(6),%a0 <== NOT EXECUTED
handle->buffer->user = (void*) ((intptr_t) block);
handle->bnum = block;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
printf ("rtems-rfs: buffer-request: block=%" PRIu32 " bdbuf-%s=%" PRIu32 " refs=%d\n",
5be34: 2268 0032 moveal %a0@(50),%a1 <== NOT EXECUTED 5be38: 203c 0007 37d1 movel #473041,%d0 <== NOT EXECUTED 5be3e: 2228 001a movel %a0@(26),%d1 <== NOT EXECUTED 5be42: 4a04 tstb %d4 <== NOT EXECUTED 5be44: 6706 beqs 5be4c <rtems_rfs_buffer_handle_request+0xde><== NOT EXECUTED 5be46: 203c 0007 320a movel #471562,%d0 <== NOT EXECUTED 5be4c: 2f09 movel %a1,%sp@- <== NOT EXECUTED
block, read ? "read" : "get", handle->buffer->block,
handle->buffer->references);
return 0;
5be4e: 4283 clrl %d3 <== NOT EXECUTED
handle->buffer->user = (void*) ((intptr_t) block);
handle->bnum = block;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
printf ("rtems-rfs: buffer-request: block=%" PRIu32 " bdbuf-%s=%" PRIu32 " refs=%d\n",
5be50: 2f01 movel %d1,%sp@- <== NOT EXECUTED 5be52: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5be54: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5be56: 4879 0007 389a pea 7389a <CSWTCH.1+0x2be> <== NOT EXECUTED 5be5c: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5be62: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
block, read ? "read" : "get", handle->buffer->block,
handle->buffer->references);
return 0;
}
5be66: 2003 movel %d3,%d0 <== NOT EXECUTED 5be68: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 <== NOT EXECUTED 5be6e: 4e5e unlk %fp <== NOT EXECUTED 5be70: 4e75 rts <== NOT EXECUTED
*/
if (block && (rtems_rfs_buffer_bnum (handle) == block))
return 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
printf ("rtems-rfs: buffer-request: handle has buffer: %" PRIu32 "\n",
5be72: 2f2a 0002 movel %a2@(2),%sp@- <== NOT EXECUTED 5be76: 4879 0007 37d5 pea 737d5 <CSWTCH.1+0x1f9> <== NOT EXECUTED 5be7c: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5be82: 508f addql #8,%sp <== NOT EXECUTED
rtems_rfs_buffer_bnum (handle));
rc = rtems_rfs_buffer_handle_release (fs, handle);
5be84: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5be86: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5be88: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
if (rc > 0)
5be8e: 508f addql #8,%sp <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
printf ("rtems-rfs: buffer-request: handle has buffer: %" PRIu32 "\n",
rtems_rfs_buffer_bnum (handle));
rc = rtems_rfs_buffer_handle_release (fs, handle);
5be90: 2600 movel %d0,%d3 <== NOT EXECUTED
if (rc > 0)
5be92: 6e00 ff30 bgtw 5bdc4 <rtems_rfs_buffer_handle_request+0x56><== NOT EXECUTED 5be96: 6000 ff38 braw 5bdd0 <rtems_rfs_buffer_handle_request+0x62><== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
printf ("rtems-rfs: buffer-request: block=%" PRIu32 " bdbuf-%s=%" PRIu32 " refs=%d\n",
block, read ? "read" : "get", handle->buffer->block,
handle->buffer->references);
return 0;
5be9a: 4283 clrl %d3
}
5be9c: 2003 movel %d3,%d0 5be9e: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 5bea4: 4e5e unlk %fp 5bea6: 4e75 rts
}
/*
* If not located we request the buffer from the I/O layer.
*/
if (!rtems_rfs_buffer_handle_has_block (handle))
5bea8: 4a88 tstl %a0 5beaa: 6600 ff54 bnew 5be00 <rtems_rfs_buffer_handle_request+0x92>
{
rc = rtems_rfs_buffer_io_request (fs, block, read, &handle->buffer);
5beae: 486a 0006 pea %a2@(6) 5beb2: 4280 clrl %d0 5beb4: 1004 moveb %d4,%d0 5beb6: 2f00 movel %d0,%sp@- 5beb8: 2f02 movel %d2,%sp@- 5beba: 2f0b movel %a3,%sp@- 5bebc: 4eb9 0006 2180 jsr 62180 <rtems_rfs_buffer_bdbuf_request>
rtems_chain_set_off_chain (rtems_rfs_buffer_link(handle));
5bec2: 206a 0006 moveal %a2@(6),%a0
/*
* If not located we request the buffer from the I/O layer.
*/
if (!rtems_rfs_buffer_handle_has_block (handle))
{
rc = rtems_rfs_buffer_io_request (fs, block, read, &handle->buffer);
5bec6: 2600 movel %d0,%d3
rtems_chain_set_off_chain (rtems_rfs_buffer_link(handle));
if (rc > 0)
5bec8: 4fef 0010 lea %sp@(16),%sp 5becc: 42a8 0004 clrl %a0@(4) 5bed0: 4290 clrl %a0@ 5bed2: 4a80 tstl %d0 5bed4: 6f00 ff2a blew 5be00 <rtems_rfs_buffer_handle_request+0x92>
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
5bed8: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> <== NOT EXECUTED 5bedc: 42a7 clrl %sp@- <== NOT EXECUTED 5bede: 4e94 jsr %a4@ <== NOT EXECUTED 5bee0: 508f addql #8,%sp <== NOT EXECUTED 5bee2: 4a00 tstb %d0 <== NOT EXECUTED 5bee4: 6700 fede beqw 5bdc4 <rtems_rfs_buffer_handle_request+0x56><== NOT EXECUTED
printf ("rtems-rfs: buffer-request: block=%" PRIu32 ": bdbuf-%s: %d: %s\n",
5bee8: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5beea: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED 5bef0: 588f addql #4,%sp <== NOT EXECUTED 5bef2: 223c 0007 37d1 movel #473041,%d1 <== NOT EXECUTED 5bef8: 4a04 tstb %d4 <== NOT EXECUTED 5befa: 6600 00e2 bnew 5bfde <rtems_rfs_buffer_handle_request+0x270><== NOT EXECUTED 5befe: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5bf00: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5bf02: 2f01 movel %d1,%sp@- <== NOT EXECUTED 5bf04: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5bf06: 4879 0007 3862 pea 73862 <CSWTCH.1+0x286> <== NOT EXECUTED 5bf0c: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5bf12: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
printf ("rtems-rfs: buffer-request: block=%" PRIu32 " bdbuf-%s=%" PRIu32 " refs=%d\n",
block, read ? "read" : "get", handle->buffer->block,
handle->buffer->references);
return 0;
}
5bf16: 2003 movel %d3,%d0 <== NOT EXECUTED 5bf18: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 <== NOT EXECUTED 5bf1e: 4e5e unlk %fp <== NOT EXECUTED 5bf20: 4e75 rts <== NOT EXECUTED
handle->dirty = false;
handle->bnum = 0;
}
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
printf ("rtems-rfs: buffer-request: block=%" PRIu32 "\n", block);
5bf22: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5bf24: 4879 0007 3808 pea 73808 <CSWTCH.1+0x22c> <== NOT EXECUTED 5bf2a: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5bf30: 508f addql #8,%sp <== NOT EXECUTED
* currently attached to a handle. If it is share the access. A buffer could * be shared where different parts of the block have separate functions. An * example is an inode block and the file system needs to handle 2 inodes in * the same block at the same time. */ if (fs->buffers_count)
5bf32: 4aab 004c tstl %a3@(76) <== NOT EXECUTED 5bf36: 6700 feb6 beqw 5bdee <rtems_rfs_buffer_handle_request+0x80><== NOT EXECUTED
{
/*
* Check the active buffer list for shared buffers.
*/
handle->buffer = rtems_rfs_scan_chain (&fs->buffers,
5bf3a: 2f02 movel %d2,%sp@- 5bf3c: 486b 004c pea %a3@(76) 5bf40: 486b 0040 pea %a3@(64) 5bf44: 4eba fb6a jsr %pc@(5bab0 <rtems_rfs_scan_chain>)
&fs->buffers_count,
block);
if (rtems_rfs_buffer_handle_has_block (handle) &&
5bf48: 4fef 000c lea %sp@(12),%sp
if (fs->buffers_count)
{
/*
* Check the active buffer list for shared buffers.
*/
handle->buffer = rtems_rfs_scan_chain (&fs->buffers,
5bf4c: 2540 0006 movel %d0,%a2@(6)
&fs->buffers_count,
block);
if (rtems_rfs_buffer_handle_has_block (handle) &&
5bf50: 6700 00ae beqw 5c000 <rtems_rfs_buffer_handle_request+0x292>
rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
5bf54: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> 5bf58: 42a7 clrl %sp@- 5bf5a: 4e94 jsr %a4@
printf ("rtems-rfs: buffer-request: buffer shared: refs: %d\n",
rtems_rfs_buffer_refs (handle) + 1);
5bf5c: 206a 0006 moveal %a2@(6),%a0
* Check the active buffer list for shared buffers.
*/
handle->buffer = rtems_rfs_scan_chain (&fs->buffers,
&fs->buffers_count,
block);
if (rtems_rfs_buffer_handle_has_block (handle) &&
5bf60: 508f addql #8,%sp 5bf62: 4a00 tstb %d0 5bf64: 6700 fe8c beqw 5bdf2 <rtems_rfs_buffer_handle_request+0x84>
rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
printf ("rtems-rfs: buffer-request: buffer shared: refs: %d\n",
5bf68: 2068 0032 moveal %a0@(50),%a0 <== NOT EXECUTED 5bf6c: 5288 addql #1,%a0 <== NOT EXECUTED 5bf6e: 2f08 movel %a0,%sp@- <== NOT EXECUTED 5bf70: 4879 0007 382e pea 7382e <CSWTCH.1+0x252> <== NOT EXECUTED 5bf76: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5bf7c: 206a 0006 moveal %a2@(6),%a0 <== NOT EXECUTED
/* * If the buffer has not been found check the local cache of released * buffers. There are release and released modified lists to preserve the * state. */ if (!rtems_rfs_fs_no_local_cache (fs) &&
5bf80: 7002 moveq #2,%d0 <== NOT EXECUTED
handle->buffer = rtems_rfs_scan_chain (&fs->buffers,
&fs->buffers_count,
block);
if (rtems_rfs_buffer_handle_has_block (handle) &&
rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
printf ("rtems-rfs: buffer-request: buffer shared: refs: %d\n",
5bf82: 508f addql #8,%sp <== NOT EXECUTED
/* * If the buffer has not been found check the local cache of released * buffers. There are release and released modified lists to preserve the * state. */ if (!rtems_rfs_fs_no_local_cache (fs) &&
5bf84: c093 andl %a3@,%d0 <== NOT EXECUTED 5bf86: 6600 ff20 bnew 5bea8 <rtems_rfs_buffer_handle_request+0x13a><== NOT EXECUTED 5bf8a: 6000 fe6e braw 5bdfa <rtems_rfs_buffer_handle_request+0x8c><== NOT EXECUTED
!rtems_rfs_buffer_handle_has_block (handle))
{
/*
* Check the local cache of released buffers.
*/
if (fs->release_count)
5bf8e: 4aab 005c tstl %a3@(92)
5bf92: 662c bnes 5bfc0 <rtems_rfs_buffer_handle_request+0x252>
handle->buffer = rtems_rfs_scan_chain (&fs->release,
&fs->release_count,
block);
if (!rtems_rfs_buffer_handle_has_block (handle) &&
5bf94: 4aab 006c tstl %a3@(108) 5bf98: 6700 ff14 beqw 5beae <rtems_rfs_buffer_handle_request+0x140>
fs->release_modified_count)
{
handle->buffer = rtems_rfs_scan_chain (&fs->release_modified,
5bf9c: 2f02 movel %d2,%sp@- 5bf9e: 486b 006c pea %a3@(108) 5bfa2: 486b 0060 pea %a3@(96) 5bfa6: 4eba fb08 jsr %pc@(5bab0 <rtems_rfs_scan_chain>)
&fs->release_modified_count,
block);
/*
* If we found a buffer retain the dirty buffer state.
*/
if (rtems_rfs_buffer_handle_has_block (handle))
5bfaa: 4fef 000c lea %sp@(12),%sp
block);
if (!rtems_rfs_buffer_handle_has_block (handle) &&
fs->release_modified_count)
{
handle->buffer = rtems_rfs_scan_chain (&fs->release_modified,
5bfae: 2040 moveal %d0,%a0 5bfb0: 2540 0006 movel %d0,%a2@(6)
&fs->release_modified_count,
block);
/*
* If we found a buffer retain the dirty buffer state.
*/
if (rtems_rfs_buffer_handle_has_block (handle))
5bfb4: 6700 fef8 beqw 5beae <rtems_rfs_buffer_handle_request+0x140>
rtems_rfs_buffer_mark_dirty (handle);
5bfb8: 14bc 0001 moveb #1,%a2@ 5bfbc: 6000 fe42 braw 5be00 <rtems_rfs_buffer_handle_request+0x92>
{
/*
* Check the local cache of released buffers.
*/
if (fs->release_count)
handle->buffer = rtems_rfs_scan_chain (&fs->release,
5bfc0: 2f02 movel %d2,%sp@- 5bfc2: 486b 005c pea %a3@(92) 5bfc6: 486b 0050 pea %a3@(80) 5bfca: 4eba fae4 jsr %pc@(5bab0 <rtems_rfs_scan_chain>)
&fs->release_count,
block);
if (!rtems_rfs_buffer_handle_has_block (handle) &&
5bfce: 4fef 000c lea %sp@(12),%sp
{
/*
* Check the local cache of released buffers.
*/
if (fs->release_count)
handle->buffer = rtems_rfs_scan_chain (&fs->release,
5bfd2: 2040 moveal %d0,%a0 5bfd4: 2540 0006 movel %d0,%a2@(6)
&fs->release_count,
block);
if (!rtems_rfs_buffer_handle_has_block (handle) &&
5bfd8: 6600 fe26 bnew 5be00 <rtems_rfs_buffer_handle_request+0x92> 5bfdc: 60b6 bras 5bf94 <rtems_rfs_buffer_handle_request+0x226>
rtems_chain_set_off_chain (rtems_rfs_buffer_link(handle));
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
printf ("rtems-rfs: buffer-request: block=%" PRIu32 ": bdbuf-%s: %d: %s\n",
5bfde: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5bfe0: 223c 0007 320a movel #471562,%d1 <== NOT EXECUTED 5bfe6: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5bfe8: 2f01 movel %d1,%sp@- <== NOT EXECUTED 5bfea: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5bfec: 4879 0007 3862 pea 73862 <CSWTCH.1+0x286> <== NOT EXECUTED 5bff2: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5bff8: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 5bffc: 6000 ff18 braw 5bf16 <rtems_rfs_buffer_handle_request+0x1a8><== NOT EXECUTED
/* * If the buffer has not been found check the local cache of released * buffers. There are release and released modified lists to preserve the * state. */ if (!rtems_rfs_fs_no_local_cache (fs) &&
5c000: 7002 moveq #2,%d0
* Check the active buffer list for shared buffers.
*/
handle->buffer = rtems_rfs_scan_chain (&fs->buffers,
&fs->buffers_count,
block);
if (rtems_rfs_buffer_handle_has_block (handle) &&
5c002: 91c8 subal %a0,%a0
/* * If the buffer has not been found check the local cache of released * buffers. There are release and released modified lists to preserve the * state. */ if (!rtems_rfs_fs_no_local_cache (fs) &&
5c004: c093 andl %a3@,%d0 5c006: 6600 fea0 bnew 5bea8 <rtems_rfs_buffer_handle_request+0x13a> 5c00a: 6000 fdee braw 5bdfa <rtems_rfs_buffer_handle_request+0x8c>
0005c00e <rtems_rfs_buffer_open>:
return rc;
}
int
rtems_rfs_buffer_open (const char* name, rtems_rfs_file_system* fs)
{
5c00e: 4e56 ffac linkw %fp,#-84 5c012: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
struct stat st;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
5c016: 4878 0020 pea 20 <OPER2+0xc> 5c01a: 45f9 0005 37c0 lea 537c0 <rtems_rfs_trace>,%a2
return rc;
}
int
rtems_rfs_buffer_open (const char* name, rtems_rfs_file_system* fs)
{
5c020: 242e 0008 movel %fp@(8),%d2
struct stat st;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
5c024: 42a7 clrl %sp@-
return rc;
}
int
rtems_rfs_buffer_open (const char* name, rtems_rfs_file_system* fs)
{
5c026: 266e 000c moveal %fp@(12),%a3
struct stat st;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
5c02a: 4e92 jsr %a2@ 5c02c: 508f addql #8,%sp 5c02e: 4a00 tstb %d0
5c030: 663e bnes 5c070 <rtems_rfs_buffer_open+0x62> <== NEVER TAKEN
printf ("rtems-rfs: buffer-open: opening: %s\n", name);
if (stat (name, &st) < 0)
5c032: 486e ffba pea %fp@(-70) 5c036: 2f02 movel %d2,%sp@- 5c038: 4eb9 0004 80f8 jsr 480f8 <stat> 5c03e: 508f addql #8,%sp 5c040: 4a80 tstl %d0
5c042: 6d4e blts 5c092 <rtems_rfs_buffer_open+0x84> <== NEVER TAKEN
#if RTEMS_RFS_USE_LIBBLOCK
/*
* Is the device a block device ?
*/
if (!S_ISBLK (st.st_mode))
5c044: 202e ffc6 movel %fp@(-58),%d0 5c048: 0280 0000 f000 andil #61440,%d0 5c04e: 0c80 0000 6000 cmpil #24576,%d0
5c054: 6758 beqs 5c0ae <rtems_rfs_buffer_open+0xa0> <== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_OPEN))
5c056: 4878 0008 pea 8 <DIVIDE_BY_ZERO> <== NOT EXECUTED 5c05a: 42a7 clrl %sp@- <== NOT EXECUTED 5c05c: 4e92 jsr %a2@ <== NOT EXECUTED 5c05e: 508f addql #8,%sp <== NOT EXECUTED 5c060: 4a00 tstb %d0 <== NOT EXECUTED 5c062: 667c bnes 5c0e0 <rtems_rfs_buffer_open+0xd2> <== NOT EXECUTED
fs->disk = rtems_disk_obtain (st.st_rdev);
if (!fs->disk)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_OPEN))
printf ("rtems-rfs: buffer-open: cannot obtain the disk\n");
return EIO;
5c064: 7005 moveq #5,%d0 <== NOT EXECUTED
printf ("rtems-rfs: buffer-open: blks=%" PRId32 ", blk-size=%" PRId32 "\n",
rtems_rfs_fs_media_blocks (fs),
rtems_rfs_fs_media_block_size (fs));
return 0;
}
5c066: 4cee 0c04 ffac moveml %fp@(-84),%d2/%a2-%a3 <== NOT EXECUTED 5c06c: 4e5e unlk %fp <== NOT EXECUTED 5c06e: 4e75 rts <== NOT EXECUTED
rtems_rfs_buffer_open (const char* name, rtems_rfs_file_system* fs)
{
struct stat st;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
printf ("rtems-rfs: buffer-open: opening: %s\n", name);
5c070: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5c072: 4879 0007 38d5 pea 738d5 <CSWTCH.1+0x2f9> <== NOT EXECUTED 5c078: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5c07e: 508f addql #8,%sp <== NOT EXECUTED
if (stat (name, &st) < 0)
5c080: 486e ffba pea %fp@(-70) <== NOT EXECUTED 5c084: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5c086: 4eb9 0004 80f8 jsr 480f8 <stat> <== NOT EXECUTED 5c08c: 508f addql #8,%sp <== NOT EXECUTED 5c08e: 4a80 tstl %d0 <== NOT EXECUTED 5c090: 6cb2 bges 5c044 <rtems_rfs_buffer_open+0x36> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_OPEN))
5c092: 4878 0008 pea 8 <DIVIDE_BY_ZERO> <== NOT EXECUTED 5c096: 42a7 clrl %sp@- <== NOT EXECUTED 5c098: 4e92 jsr %a2@ <== NOT EXECUTED 5c09a: 508f addql #8,%sp <== NOT EXECUTED 5c09c: 4a00 tstb %d0 <== NOT EXECUTED 5c09e: 6600 0084 bnew 5c124 <rtems_rfs_buffer_open+0x116> <== NOT EXECUTED
printf ("rtems-rfs: buffer-open: stat '%s' failed: %s\n",
name, strerror (errno));
return ENOENT;
5c0a2: 7002 moveq #2,%d0 <== NOT EXECUTED
printf ("rtems-rfs: buffer-open: blks=%" PRId32 ", blk-size=%" PRId32 "\n",
rtems_rfs_fs_media_blocks (fs),
rtems_rfs_fs_media_block_size (fs));
return 0;
}
5c0a4: 4cee 0c04 ffac moveml %fp@(-84),%d2/%a2-%a3 <== NOT EXECUTED 5c0aa: 4e5e unlk %fp <== NOT EXECUTED 5c0ac: 4e75 rts <== NOT EXECUTED
}
/*
* Check that device is registred as a block device and lock it.
*/
fs->disk = rtems_disk_obtain (st.st_rdev);
5c0ae: 2f2e ffd4 movel %fp@(-44),%sp@- 5c0b2: 2f2e ffd0 movel %fp@(-48),%sp@- 5c0b6: 4eb9 0004 55a2 jsr 455a2 <rtems_disk_obtain>
if (!fs->disk)
5c0bc: 508f addql #8,%sp
}
/*
* Check that device is registred as a block device and lock it.
*/
fs->disk = rtems_disk_obtain (st.st_rdev);
5c0be: 2740 000c movel %d0,%a3@(12)
if (!fs->disk)
5c0c2: 6700 0090 beqw 5c154 <rtems_rfs_buffer_open+0x146>
}
fs->media_size = st.st_size;
strcat (fs->name, name);
#endif
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
5c0c6: 4878 0020 pea 20 <OPER2+0xc> 5c0ca: 42a7 clrl %sp@- 5c0cc: 4e92 jsr %a2@ 5c0ce: 508f addql #8,%sp 5c0d0: 4a00 tstb %d0
5c0d2: 6628 bnes 5c0fc <rtems_rfs_buffer_open+0xee> <== NEVER TAKEN
printf ("rtems-rfs: buffer-open: blks=%" PRId32 ", blk-size=%" PRId32 "\n",
rtems_rfs_fs_media_blocks (fs),
rtems_rfs_fs_media_block_size (fs));
return 0;
5c0d4: 4280 clrl %d0
}
5c0d6: 4cee 0c04 ffac moveml %fp@(-84),%d2/%a2-%a3 5c0dc: 4e5e unlk %fp 5c0de: 4e75 rts
* Is the device a block device ?
*/
if (!S_ISBLK (st.st_mode))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_OPEN))
printf ("rtems-rfs: buffer-open: '%s' is not a block device\n", name);
5c0e0: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5c0e2: 4879 0007 3928 pea 73928 <CSWTCH.1+0x34c> <== NOT EXECUTED 5c0e8: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5c0ee: 508f addql #8,%sp <== NOT EXECUTED
return EIO;
5c0f0: 7005 moveq #5,%d0 <== NOT EXECUTED
printf ("rtems-rfs: buffer-open: blks=%" PRId32 ", blk-size=%" PRId32 "\n",
rtems_rfs_fs_media_blocks (fs),
rtems_rfs_fs_media_block_size (fs));
return 0;
}
5c0f2: 4cee 0c04 ffac moveml %fp@(-84),%d2/%a2-%a3 <== NOT EXECUTED 5c0f8: 4e5e unlk %fp <== NOT EXECUTED 5c0fa: 4e75 rts <== NOT EXECUTED
#endif
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
printf ("rtems-rfs: buffer-open: blks=%" PRId32 ", blk-size=%" PRId32 "\n",
rtems_rfs_fs_media_blocks (fs),
rtems_rfs_fs_media_block_size (fs));
5c0fc: 206b 000c moveal %a3@(12),%a0 <== NOT EXECUTED
fs->media_size = st.st_size;
strcat (fs->name, name);
#endif
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
printf ("rtems-rfs: buffer-open: blks=%" PRId32 ", blk-size=%" PRId32 "\n",
5c100: 2f28 0024 movel %a0@(36),%sp@- <== NOT EXECUTED 5c104: 2f28 001c movel %a0@(28),%sp@- <== NOT EXECUTED 5c108: 4879 0007 398b pea 7398b <CSWTCH.1+0x3af> <== NOT EXECUTED 5c10e: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5c114: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rtems_rfs_fs_media_blocks (fs),
rtems_rfs_fs_media_block_size (fs));
return 0;
5c118: 4280 clrl %d0 <== NOT EXECUTED
}
5c11a: 4cee 0c04 ffac moveml %fp@(-84),%d2/%a2-%a3 <== NOT EXECUTED 5c120: 4e5e unlk %fp <== NOT EXECUTED 5c122: 4e75 rts <== NOT EXECUTED
if (stat (name, &st) < 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_OPEN))
printf ("rtems-rfs: buffer-open: stat '%s' failed: %s\n",
name, strerror (errno));
5c124: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED
printf ("rtems-rfs: buffer-open: opening: %s\n", name);
if (stat (name, &st) < 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_OPEN))
printf ("rtems-rfs: buffer-open: stat '%s' failed: %s\n",
5c12a: 2040 moveal %d0,%a0 <== NOT EXECUTED 5c12c: 2f10 movel %a0@,%sp@- <== NOT EXECUTED 5c12e: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED 5c134: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5c136: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5c138: 4879 0007 38fa pea 738fa <CSWTCH.1+0x31e> <== NOT EXECUTED 5c13e: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5c144: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
name, strerror (errno));
return ENOENT;
5c148: 7002 moveq #2,%d0 <== NOT EXECUTED
printf ("rtems-rfs: buffer-open: blks=%" PRId32 ", blk-size=%" PRId32 "\n",
rtems_rfs_fs_media_blocks (fs),
rtems_rfs_fs_media_block_size (fs));
return 0;
}
5c14a: 4cee 0c04 ffac moveml %fp@(-84),%d2/%a2-%a3 <== NOT EXECUTED 5c150: 4e5e unlk %fp <== NOT EXECUTED 5c152: 4e75 rts <== NOT EXECUTED
* Check that device is registred as a block device and lock it.
*/
fs->disk = rtems_disk_obtain (st.st_rdev);
if (!fs->disk)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_OPEN))
5c154: 4878 0008 pea 8 <DIVIDE_BY_ZERO> <== NOT EXECUTED 5c158: 42a7 clrl %sp@- <== NOT EXECUTED 5c15a: 4e92 jsr %a2@ <== NOT EXECUTED 5c15c: 508f addql #8,%sp <== NOT EXECUTED 5c15e: 4a00 tstb %d0 <== NOT EXECUTED 5c160: 6700 ff02 beqw 5c064 <rtems_rfs_buffer_open+0x56> <== NOT EXECUTED
printf ("rtems-rfs: buffer-open: cannot obtain the disk\n");
5c164: 4879 0007 395c pea 7395c <CSWTCH.1+0x380> <== NOT EXECUTED 5c16a: 4eb9 0006 30ce jsr 630ce <puts> <== NOT EXECUTED 5c170: 588f addql #4,%sp <== NOT EXECUTED
return EIO;
5c172: 7005 moveq #5,%d0 <== NOT EXECUTED
printf ("rtems-rfs: buffer-open: blks=%" PRId32 ", blk-size=%" PRId32 "\n",
rtems_rfs_fs_media_blocks (fs),
rtems_rfs_fs_media_block_size (fs));
return 0;
}
5c174: 4cee 0c04 ffac moveml %fp@(-84),%d2/%a2-%a3 <== NOT EXECUTED 5c17a: 4e5e unlk %fp <== NOT EXECUTED
0005c2ca <rtems_rfs_buffer_setblksize>:
return result;
}
int
rtems_rfs_buffer_setblksize (rtems_rfs_file_system* fs, size_t size)
{
5c2ca: 4e56 fff4 linkw %fp,#-12 5c2ce: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
5c2d2: 4878 0400 pea 400 <D_BIAS+0x2> 5c2d6: 47f9 0005 37c0 lea 537c0 <rtems_rfs_trace>,%a3
return result;
}
int
rtems_rfs_buffer_setblksize (rtems_rfs_file_system* fs, size_t size)
{
5c2dc: 246e 0008 moveal %fp@(8),%a2
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
5c2e0: 42a7 clrl %sp@- 5c2e2: 4e93 jsr %a3@ 5c2e4: 508f addql #8,%sp 5c2e6: 4a00 tstb %d0
5c2e8: 6660 bnes 5c34a <rtems_rfs_buffer_setblksize+0x80><== NEVER TAKEN
printf ("rtems-rfs: buffer-setblksize: block size: %zu\n", size);
rc = rtems_rfs_buffers_release (fs);
5c2ea: 2f0a movel %a2,%sp@- 5c2ec: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release>
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
5c2f2: 588f addql #4,%sp
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
printf ("rtems-rfs: buffer-setblksize: block size: %zu\n", size);
rc = rtems_rfs_buffers_release (fs);
5c2f4: 2400 movel %d0,%d2
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
5c2f6: 6f0e bles 5c306 <rtems_rfs_buffer_setblksize+0x3c><== ALWAYS TAKEN
5c2f8: 4878 0400 pea 400 <D_BIAS+0x2> <== NOT EXECUTED 5c2fc: 42a7 clrl %sp@- <== NOT EXECUTED 5c2fe: 4e93 jsr %a3@ <== NOT EXECUTED 5c300: 508f addql #8,%sp <== NOT EXECUTED 5c302: 4a00 tstb %d0 <== NOT EXECUTED 5c304: 666c bnes 5c372 <rtems_rfs_buffer_setblksize+0xa8><== NOT EXECUTED
printf ("rtems-rfs: buffer-setblksize: buffer release failed: %d: %s\n",
rc, strerror (rc));
rc = rtems_rfs_buffer_sync (fs);
5c306: 2f0a movel %a2,%sp@- 5c308: 4eb9 0005 c17e jsr 5c17e <rtems_rfs_buffer_sync>
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
5c30e: 588f addql #4,%sp
rc = rtems_rfs_buffers_release (fs);
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
printf ("rtems-rfs: buffer-setblksize: buffer release failed: %d: %s\n",
rc, strerror (rc));
rc = rtems_rfs_buffer_sync (fs);
5c310: 2400 movel %d0,%d2
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
5c312: 6f0e bles 5c322 <rtems_rfs_buffer_setblksize+0x58><== ALWAYS TAKEN
5c314: 4878 0400 pea 400 <D_BIAS+0x2> <== NOT EXECUTED 5c318: 42a7 clrl %sp@- <== NOT EXECUTED 5c31a: 4e93 jsr %a3@ <== NOT EXECUTED 5c31c: 508f addql #8,%sp <== NOT EXECUTED 5c31e: 4a00 tstb %d0 <== NOT EXECUTED 5c320: 6670 bnes 5c392 <rtems_rfs_buffer_setblksize+0xc8><== NOT EXECUTED
printf ("rtems-rfs: buffer-setblksize: device sync failed: %d: %s\n",
rc, strerror (rc));
#if RTEMS_RFS_USE_LIBBLOCK
rc = fs->disk->ioctl (fs->disk, RTEMS_BLKIO_SETBLKSIZE, &size);
5c322: 486e 000c pea %fp@(12) 5c326: 206a 000c moveal %a2@(12),%a0 5c32a: 2f3c 8004 4204 movel #-2147204604,%sp@- 5c330: 2f08 movel %a0,%sp@- 5c332: 2068 0028 moveal %a0@(40),%a0 5c336: 4e90 jsr %a0@
if (rc < 0)
5c338: 4fef 000c lea %sp@(12),%sp 5c33c: 4a80 tstl %d0
5c33e: 6d1e blts 5c35e <rtems_rfs_buffer_setblksize+0x94><== NEVER TAKEN
rc = errno;
#endif
return rc;
}
5c340: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 5c346: 4e5e unlk %fp 5c348: 4e75 rts
rtems_rfs_buffer_setblksize (rtems_rfs_file_system* fs, size_t size)
{
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
printf ("rtems-rfs: buffer-setblksize: block size: %zu\n", size);
5c34a: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 5c34e: 4879 0007 3a54 pea 73a54 <CSWTCH.1+0x478> <== NOT EXECUTED 5c354: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5c35a: 508f addql #8,%sp <== NOT EXECUTED 5c35c: 608c bras 5c2ea <rtems_rfs_buffer_setblksize+0x20><== NOT EXECUTED
rc, strerror (rc));
#if RTEMS_RFS_USE_LIBBLOCK
rc = fs->disk->ioctl (fs->disk, RTEMS_BLKIO_SETBLKSIZE, &size);
if (rc < 0)
rc = errno;
5c35e: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 5c364: 2040 moveal %d0,%a0 <== NOT EXECUTED
#endif return rc; }
5c366: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED
rc, strerror (rc));
#if RTEMS_RFS_USE_LIBBLOCK
rc = fs->disk->ioctl (fs->disk, RTEMS_BLKIO_SETBLKSIZE, &size);
if (rc < 0)
rc = errno;
5c36c: 2010 movel %a0@,%d0 <== NOT EXECUTED
#endif return rc; }
5c36e: 4e5e unlk %fp <== NOT EXECUTED 5c370: 4e75 rts <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
printf ("rtems-rfs: buffer-setblksize: block size: %zu\n", size);
rc = rtems_rfs_buffers_release (fs);
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
printf ("rtems-rfs: buffer-setblksize: buffer release failed: %d: %s\n",
5c372: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5c374: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED 5c37a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5c37c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5c37e: 4879 0007 3a83 pea 73a83 <CSWTCH.1+0x4a7> <== NOT EXECUTED 5c384: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5c38a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5c38e: 6000 ff76 braw 5c306 <rtems_rfs_buffer_setblksize+0x3c><== NOT EXECUTED
rc, strerror (rc));
rc = rtems_rfs_buffer_sync (fs);
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
printf ("rtems-rfs: buffer-setblksize: device sync failed: %d: %s\n",
5c392: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5c394: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED 5c39a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5c39c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5c39e: 4879 0007 3ac0 pea 73ac0 <CSWTCH.1+0x4e4> <== NOT EXECUTED 5c3a4: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5c3aa: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rc, strerror (rc));
#if RTEMS_RFS_USE_LIBBLOCK
rc = fs->disk->ioctl (fs->disk, RTEMS_BLKIO_SETBLKSIZE, &size);
5c3ae: 486e 000c pea %fp@(12) <== NOT EXECUTED 5c3b2: 206a 000c moveal %a2@(12),%a0 <== NOT EXECUTED 5c3b6: 2f3c 8004 4204 movel #-2147204604,%sp@- <== NOT EXECUTED 5c3bc: 2f08 movel %a0,%sp@- <== NOT EXECUTED 5c3be: 2068 0028 moveal %a0@(40),%a0 <== NOT EXECUTED 5c3c2: 4e90 jsr %a0@ <== NOT EXECUTED
if (rc < 0)
5c3c4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5c3c8: 4a80 tstl %d0 <== NOT EXECUTED 5c3ca: 6c00 ff74 bgew 5c340 <rtems_rfs_buffer_setblksize+0x76><== NOT EXECUTED 5c3ce: 608e bras 5c35e <rtems_rfs_buffer_setblksize+0x94><== NOT EXECUTED
0005c17e <rtems_rfs_buffer_sync>:
return rc;
}
int
rtems_rfs_buffer_sync (rtems_rfs_file_system* fs)
{
5c17e: 4e56 fff4 linkw %fp,#-12 5c182: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
int result = 0;
#if RTEMS_RFS_USE_LIBBLOCK
rtems_status_code sc;
#endif
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
5c186: 4878 0020 pea 20 <OPER2+0xc> 5c18a: 47f9 0005 37c0 lea 537c0 <rtems_rfs_trace>,%a3
return rc;
}
int
rtems_rfs_buffer_sync (rtems_rfs_file_system* fs)
{
5c190: 246e 0008 moveal %fp@(8),%a2
int result = 0;
#if RTEMS_RFS_USE_LIBBLOCK
rtems_status_code sc;
#endif
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
5c194: 42a7 clrl %sp@- 5c196: 4e93 jsr %a3@ 5c198: 508f addql #8,%sp 5c19a: 4a00 tstb %d0
5c19c: 662e bnes 5c1cc <rtems_rfs_buffer_sync+0x4e> <== NEVER TAKEN
/*
* @todo Split in the separate files for each type.
*/
#if RTEMS_RFS_USE_LIBBLOCK
sc = rtems_bdbuf_syncdev (rtems_rfs_fs_device (fs));
5c19e: 206a 000c moveal %a2@(12),%a0 5c1a2: 2f28 0004 movel %a0@(4),%sp@- 5c1a6: 2f10 movel %a0@,%sp@- 5c1a8: 4eb9 0005 5e78 jsr 55e78 <rtems_bdbuf_syncdev>
if (sc != RTEMS_SUCCESSFUL)
5c1ae: 508f addql #8,%sp
/*
* @todo Split in the separate files for each type.
*/
#if RTEMS_RFS_USE_LIBBLOCK
sc = rtems_bdbuf_syncdev (rtems_rfs_fs_device (fs));
5c1b0: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL)
5c1b2: 663c bnes 5c1f0 <rtems_rfs_buffer_sync+0x72> <== NEVER TAKEN
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
printf ("rtems-rfs: buffer-sync: device sync failed: %s\n",
rtems_status_text (sc));
result = EIO;
}
rtems_disk_release (fs->disk);
5c1b4: 2f2a 000c movel %a2@(12),%sp@-
}
int
rtems_rfs_buffer_sync (rtems_rfs_file_system* fs)
{
int result = 0;
5c1b8: 4282 clrl %d2
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
printf ("rtems-rfs: buffer-sync: device sync failed: %s\n",
rtems_status_text (sc));
result = EIO;
}
rtems_disk_release (fs->disk);
5c1ba: 4eb9 0004 561a jsr 4561a <rtems_disk_release>
printf ("rtems-rfs: buffer-sync: file sync failed: %d: %s\n",
result, strerror (result));
}
#endif
return result;
}
5c1c0: 2002 movel %d2,%d0 5c1c2: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 5c1c8: 4e5e unlk %fp 5c1ca: 4e75 rts
#if RTEMS_RFS_USE_LIBBLOCK
rtems_status_code sc;
#endif
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
printf ("rtems-rfs: buffer-sync: syncing\n");
5c1cc: 4879 0007 39bb pea 739bb <CSWTCH.1+0x3df> <== NOT EXECUTED 5c1d2: 4eb9 0006 30ce jsr 630ce <puts> <== NOT EXECUTED
/*
* @todo Split in the separate files for each type.
*/
#if RTEMS_RFS_USE_LIBBLOCK
sc = rtems_bdbuf_syncdev (rtems_rfs_fs_device (fs));
5c1d8: 206a 000c moveal %a2@(12),%a0 <== NOT EXECUTED
#if RTEMS_RFS_USE_LIBBLOCK
rtems_status_code sc;
#endif
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
printf ("rtems-rfs: buffer-sync: syncing\n");
5c1dc: 588f addql #4,%sp <== NOT EXECUTED
/*
* @todo Split in the separate files for each type.
*/
#if RTEMS_RFS_USE_LIBBLOCK
sc = rtems_bdbuf_syncdev (rtems_rfs_fs_device (fs));
5c1de: 2f28 0004 movel %a0@(4),%sp@- <== NOT EXECUTED 5c1e2: 2f10 movel %a0@,%sp@- <== NOT EXECUTED 5c1e4: 4eb9 0005 5e78 jsr 55e78 <rtems_bdbuf_syncdev> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
5c1ea: 508f addql #8,%sp <== NOT EXECUTED
/*
* @todo Split in the separate files for each type.
*/
#if RTEMS_RFS_USE_LIBBLOCK
sc = rtems_bdbuf_syncdev (rtems_rfs_fs_device (fs));
5c1ec: 2400 movel %d0,%d2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
5c1ee: 67c4 beqs 5c1b4 <rtems_rfs_buffer_sync+0x36> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
5c1f0: 4878 0020 pea 20 <OPER2+0xc> <== NOT EXECUTED 5c1f4: 42a7 clrl %sp@- <== NOT EXECUTED 5c1f6: 4e93 jsr %a3@ <== NOT EXECUTED 5c1f8: 508f addql #8,%sp <== NOT EXECUTED 5c1fa: 4a00 tstb %d0 <== NOT EXECUTED 5c1fc: 6618 bnes 5c216 <rtems_rfs_buffer_sync+0x98> <== NOT EXECUTED
printf ("rtems-rfs: buffer-sync: device sync failed: %s\n",
rtems_status_text (sc));
result = EIO;
}
rtems_disk_release (fs->disk);
5c1fe: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
printf ("rtems-rfs: buffer-sync: device sync failed: %s\n",
rtems_status_text (sc));
result = EIO;
5c202: 7405 moveq #5,%d2 <== NOT EXECUTED
} rtems_disk_release (fs->disk);
5c204: 4eb9 0004 561a jsr 4561a <rtems_disk_release> <== NOT EXECUTED
printf ("rtems-rfs: buffer-sync: file sync failed: %d: %s\n",
result, strerror (result));
}
#endif
return result;
}
5c20a: 2002 movel %d2,%d0 <== NOT EXECUTED 5c20c: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 5c212: 4e5e unlk %fp <== NOT EXECUTED 5c214: 4e75 rts <== NOT EXECUTED
#if RTEMS_RFS_USE_LIBBLOCK
sc = rtems_bdbuf_syncdev (rtems_rfs_fs_device (fs));
if (sc != RTEMS_SUCCESSFUL)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
printf ("rtems-rfs: buffer-sync: device sync failed: %s\n",
5c216: 2f02 movel %d2,%sp@- <== NOT EXECUTED
rtems_status_text (sc));
result = EIO;
5c218: 7405 moveq #5,%d2 <== NOT EXECUTED
#if RTEMS_RFS_USE_LIBBLOCK
sc = rtems_bdbuf_syncdev (rtems_rfs_fs_device (fs));
if (sc != RTEMS_SUCCESSFUL)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
printf ("rtems-rfs: buffer-sync: device sync failed: %s\n",
5c21a: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 5c220: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5c222: 4879 0007 39db pea 739db <CSWTCH.1+0x3ff> <== NOT EXECUTED 5c228: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5c22e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rtems_status_text (sc));
result = EIO;
}
rtems_disk_release (fs->disk);
5c232: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED 5c236: 4eb9 0004 561a jsr 4561a <rtems_disk_release> <== NOT EXECUTED
printf ("rtems-rfs: buffer-sync: file sync failed: %d: %s\n",
result, strerror (result));
}
#endif
return result;
}
5c23c: 2002 movel %d2,%d0 <== NOT EXECUTED 5c23e: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 5c244: 4e5e unlk %fp <== NOT EXECUTED
0005c248 <rtems_rfs_buffers_release>:
return rrc;
}
int
rtems_rfs_buffers_release (rtems_rfs_file_system* fs)
{
5c248: 4e56 fff4 linkw %fp,#-12 5c24c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
int rrc = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_RELEASE))
5c250: 4878 0040 pea 40 <DBL_MANT_DIG+0xb>
return rrc;
}
int
rtems_rfs_buffers_release (rtems_rfs_file_system* fs)
{
5c254: 246e 0008 moveal %fp@(8),%a2
int rrc = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_RELEASE))
5c258: 42a7 clrl %sp@- 5c25a: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> 5c260: 508f addql #8,%sp 5c262: 4a00 tstb %d0
5c264: 6646 bnes 5c2ac <rtems_rfs_buffers_release+0x64> <== NEVER TAKEN
printf ("rtems-rfs: buffers-release: active:%" PRIu32 " "
"release:%" PRIu32 " release-modified:%" PRIu32 "\n",
fs->buffers_count, fs->release_count, fs->release_modified_count);
rc = rtems_rfs_release_chain (&fs->release,
5c266: 42a7 clrl %sp@- 5c268: 486a 005c pea %a2@(92) 5c26c: 47fa f7a6 lea %pc@(5ba14 <rtems_rfs_release_chain>),%a3 5c270: 486a 0050 pea %a2@(80) 5c274: 4e93 jsr %a3@ 5c276: 4fef 000c lea %sp@(12),%sp 5c27a: 2400 movel %d0,%d2
&fs->release_count,
false);
if ((rc > 0) && (rrc == 0))
rrc = rc;
rc = rtems_rfs_release_chain (&fs->release_modified,
5c27c: 4878 0001 pea 1 <ADD>
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_RELEASE))
printf ("rtems-rfs: buffers-release: active:%" PRIu32 " "
"release:%" PRIu32 " release-modified:%" PRIu32 "\n",
fs->buffers_count, fs->release_count, fs->release_modified_count);
rc = rtems_rfs_release_chain (&fs->release,
5c280: 4680 notl %d0
&fs->release_count,
false);
if ((rc > 0) && (rrc == 0))
rrc = rc;
rc = rtems_rfs_release_chain (&fs->release_modified,
5c282: 486a 006c pea %a2@(108) 5c286: 486a 0060 pea %a2@(96)
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_RELEASE))
printf ("rtems-rfs: buffers-release: active:%" PRIu32 " "
"release:%" PRIu32 " release-modified:%" PRIu32 "\n",
fs->buffers_count, fs->release_count, fs->release_modified_count);
rc = rtems_rfs_release_chain (&fs->release,
5c28a: d080 addl %d0,%d0 5c28c: 9180 subxl %d0,%d0 5c28e: c480 andl %d0,%d2
&fs->release_count,
false);
if ((rc > 0) && (rrc == 0))
rrc = rc;
rc = rtems_rfs_release_chain (&fs->release_modified,
5c290: 4e93 jsr %a3@
&fs->release_modified_count,
true);
if ((rc > 0) && (rrc == 0))
5c292: 4fef 000c lea %sp@(12),%sp 5c296: 4a80 tstl %d0
5c298: 6f06 bles 5c2a0 <rtems_rfs_buffers_release+0x58> <== ALWAYS TAKEN
5c29a: 4a82 tstl %d2 <== NOT EXECUTED 5c29c: 6602 bnes 5c2a0 <rtems_rfs_buffers_release+0x58> <== NOT EXECUTED 5c29e: 2400 movel %d0,%d2 <== NOT EXECUTED
rrc = rc;
return rrc;
}
5c2a0: 2002 movel %d2,%d0 5c2a2: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 5c2a8: 4e5e unlk %fp 5c2aa: 4e75 rts
{
int rrc = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_RELEASE))
printf ("rtems-rfs: buffers-release: active:%" PRIu32 " "
5c2ac: 2f2a 006c movel %a2@(108),%sp@- <== NOT EXECUTED 5c2b0: 2f2a 005c movel %a2@(92),%sp@- <== NOT EXECUTED 5c2b4: 2f2a 004c movel %a2@(76),%sp@- <== NOT EXECUTED 5c2b8: 4879 0007 3a0b pea 73a0b <CSWTCH.1+0x42f> <== NOT EXECUTED 5c2be: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5c2c4: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5c2c8: 609c bras 5c266 <rtems_rfs_buffers_release+0x1e> <== NOT EXECUTED
0005ca10 <rtems_rfs_dir_add_entry>:
rtems_rfs_dir_add_entry (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* dir,
const char* name,
size_t length,
rtems_rfs_ino ino)
{
5ca10: 4e56 ff68 linkw %fp,#-152 5ca14: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
rtems_rfs_block_map map;
rtems_rfs_block_pos bpos;
rtems_rfs_buffer_handle buffer;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
5ca18: 2f3c 2000 0000 movel #536870912,%sp@-
rtems_rfs_dir_add_entry (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* dir,
const char* name,
size_t length,
rtems_rfs_ino ino)
{
5ca1e: 266e 0008 moveal %fp@(8),%a3
rtems_rfs_block_map map;
rtems_rfs_block_pos bpos;
rtems_rfs_buffer_handle buffer;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
5ca22: 4bf9 0005 37c0 lea 537c0 <rtems_rfs_trace>,%a5 5ca28: 42a7 clrl %sp@-
rtems_rfs_dir_add_entry (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* dir,
const char* name,
size_t length,
rtems_rfs_ino ino)
{
5ca2a: 286e 0010 moveal %fp@(16),%a4 5ca2e: 2a2e 0014 movel %fp@(20),%d5
rtems_rfs_block_map map;
rtems_rfs_block_pos bpos;
rtems_rfs_buffer_handle buffer;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
5ca32: 4e95 jsr %a5@ 5ca34: 508f addql #8,%sp 5ca36: 4a00 tstb %d0 5ca38: 6600 0260 bnew 5cc9a <rtems_rfs_dir_add_entry+0x28a>
for (c = 0; c < length; c++)
printf ("%c", name[c]);
printf (", len=%zd\n", length);
}
rc = rtems_rfs_block_map_open (fs, dir, &map);
5ca3c: 2c0e movel %fp,%d6 5ca3e: 0686 ffff ff9c addil #-100,%d6 5ca44: 2f06 movel %d6,%sp@- 5ca46: 2f2e 000c movel %fp@(12),%sp@- 5ca4a: 2f0b movel %a3,%sp@- 5ca4c: 4eb9 0005 adf2 jsr 5adf2 <rtems_rfs_block_map_open>
if (rc > 0)
5ca52: 4fef 000c lea %sp@(12),%sp
for (c = 0; c < length; c++)
printf ("%c", name[c]);
printf (", len=%zd\n", length);
}
rc = rtems_rfs_block_map_open (fs, dir, &map);
5ca56: 2400 movel %d0,%d2
if (rc > 0)
5ca58: 6f0c bles 5ca66 <rtems_rfs_dir_add_entry+0x56> <== ALWAYS TAKEN
}
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
5ca5a: 2002 movel %d2,%d0 <== NOT EXECUTED 5ca5c: 4cee 3cfc ff68 moveml %fp@(-152),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5ca62: 4e5e unlk %fp <== NOT EXECUTED 5ca64: 4e75 rts <== NOT EXECUTED
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
{
if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) <
5ca66: 2205 movel %d5,%d1 5ca68: 0681 0000 000a addil #10,%d1
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
5ca6e: 4203 clrb %d3
handle->bnum = 0;
5ca70: 42ae fff4 clrl %fp@(-12)
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
5ca74: 1d43 fff2 moveb %d3,%fp@(-14)
handle->bnum = 0; handle->buffer = NULL;
5ca78: 42ae fff8 clrl %fp@(-8)
* @param bpos A pointer to the block position.
*/
static inline void
rtems_rfs_block_set_bpos_zero (rtems_rfs_block_pos* bpos)
{
bpos->bno = 0;
5ca7c: 42ae ffe6 clrl %fp@(-26)
bpos->boff = 0;
5ca80: 42ae ffea clrl %fp@(-22)
bpos->block = 0;
5ca84: 42ae ffee clrl %fp@(-18) 5ca88: 2d41 ff94 movel %d1,%fp@(-108)
/*
* Locate the first block. If an error the block will be 0. If the map is
* empty which happens when creating a directory and adding the first entry
* the seek will return ENXIO. In this case we need to grow the directory.
*/
rc = rtems_rfs_block_map_find (fs, &map, &bpos, &block);
5ca8c: 486e fffc pea %fp@(-4) 5ca90: 486e ffe6 pea %fp@(-26) 5ca94: 2f06 movel %d6,%sp@- 5ca96: 2f0b movel %a3,%sp@- 5ca98: 4eb9 0005 b1c2 jsr 5b1c2 <rtems_rfs_block_map_find>
if (rc > 0)
5ca9e: 4fef 0010 lea %sp@(16),%sp 5caa2: 4a80 tstl %d0 5caa4: 6f00 02f4 blew 5cd9a <rtems_rfs_dir_add_entry+0x38a>
{
if (rc != ENXIO)
5caa8: 7806 moveq #6,%d4 5caaa: b880 cmpl %d0,%d4 5caac: 6600 037e bnew 5ce2c <rtems_rfs_dir_add_entry+0x41c>
}
/*
* We have reached the end of the directory so add a block.
*/
rc = rtems_rfs_block_map_grow (fs, &map, 1, &block);
5cab0: 486e fffc pea %fp@(-4) 5cab4: 4878 0001 pea 1 <ADD> 5cab8: 2f06 movel %d6,%sp@- 5caba: 2f0b movel %a3,%sp@- 5cabc: 4eb9 0005 b38e jsr 5b38e <rtems_rfs_block_map_grow>
if (rc > 0)
5cac2: 4fef 0010 lea %sp@(16),%sp 5cac6: 4a80 tstl %d0 5cac8: 6e00 03b0 bgtw 5ce7a <rtems_rfs_dir_add_entry+0x46a> 5cacc: 4280 clrl %d0
"block map grow failed for ino %" PRIu32 ": %d: %s\n",
rtems_rfs_inode_ino (dir), rc, strerror (rc));
break;
}
read = false;
5cace: 4203 clrb %d3
}
bpos.bno++;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, read);
5cad0: 2f00 movel %d0,%sp@- 5cad2: 2f2e fffc movel %fp@(-4),%sp@- 5cad6: 486e fff2 pea %fp@(-14)
}
read = false;
}
bpos.bno++;
5cada: 52ae ffe6 addql #1,%fp@(-26)
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, read);
5cade: 2f0b movel %a3,%sp@- 5cae0: 4eb9 0005 bd6e jsr 5bd6e <rtems_rfs_buffer_handle_request>
if (rc > 0)
5cae6: 4fef 0010 lea %sp@(16),%sp 5caea: 4a80 tstl %d0 5caec: 6e00 02b4 bgtw 5cda2 <rtems_rfs_dir_add_entry+0x392>
"block buffer req failed for ino %" PRIu32 ": %d: %s\n",
rtems_rfs_inode_ino (dir), rc, strerror (rc));
break;
}
entry = rtems_rfs_buffer_data (&buffer);
5caf0: 206e fff8 moveal %fp@(-8),%a0 5caf4: 2468 001e moveal %a0@(30),%a2
if (!read)
5caf8: 4a03 tstb %d3 5cafa: 6700 0252 beqw 5cd4e <rtems_rfs_dir_add_entry+0x33e>
memset (entry, 0xff, rtems_rfs_fs_block_size (fs));
offset = 0;
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
5cafe: 202b 0008 movel %a3@(8),%d0 5cb02: 2040 moveal %d0,%a0 5cb04: 41e8 fff6 lea %a0@(-10),%a0 5cb08: 2d40 ff98 movel %d0,%fp@(-104) 5cb0c: 4a88 tstl %a0 5cb0e: 6700 ff7c beqw 5ca8c <rtems_rfs_dir_add_entry+0x7c>
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
5cb12: 4283 clrl %d3 5cb14: 162a 0008 moveb %a2@(8),%d3 5cb18: 4280 clrl %d0 5cb1a: 102a 0009 moveb %a2@(9),%d0 5cb1e: e18b lsll #8,%d3
eino = rtems_rfs_dir_entry_ino (entry);
5cb20: 122a 0001 moveb %a2@(1),%d1 5cb24: 1412 moveb %a2@,%d2
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
5cb26: 8680 orl %d0,%d3
eino = rtems_rfs_dir_entry_ino (entry);
5cb28: 3241 moveaw %d1,%a1 5cb2a: 122a 0002 moveb %a2@(2),%d1 5cb2e: 1e2a 0003 moveb %a2@(3),%d7
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
5cb32: 0c83 0000 ffff cmpil #65535,%d3 5cb38: 6700 02de beqw 5ce18 <rtems_rfs_dir_add_entry+0x408>
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
5cb3c: 7818 moveq #24,%d4 5cb3e: 4280 clrl %d0 5cb40: 0281 0000 00ff andil #255,%d1 5cb46: e9aa lsll %d4,%d2 5cb48: 3809 movew %a1,%d4 5cb4a: e189 lsll #8,%d1
entry = rtems_rfs_buffer_data (&buffer);
if (!read)
memset (entry, 0xff, rtems_rfs_fs_block_size (fs));
offset = 0;
5cb4c: 42ae ff90 clrl %fp@(-112)
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
5cb50: 1004 moveb %d4,%d0 5cb52: 4284 clrl %d4 5cb54: 0287 0000 00ff andil #255,%d7 5cb5a: 8481 orl %d1,%d2 5cb5c: 4840 swap %d0 5cb5e: 4240 clrw %d0 5cb60: 8487 orl %d7,%d2 5cb62: 8480 orl %d0,%d2
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return EIO;
}
entry += elength;
5cb64: d5c3 addal %d3,%a2
}
break;
}
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
5cb66: 700a moveq #10,%d0 5cb68: b083 cmpl %d3,%d0 5cb6a: 6c00 019c bgew 5cd08 <rtems_rfs_dir_add_entry+0x2f8> 5cb6e: b6ab 0018 cmpl %a3@(24),%d3 5cb72: 6400 0194 bccw 5cd08 <rtems_rfs_dir_add_entry+0x2f8> 5cb76: 4a82 tstl %d2 5cb78: 6700 018e beqw 5cd08 <rtems_rfs_dir_add_entry+0x2f8> 5cb7c: b4ab 0010 cmpl %a3@(16),%d2 5cb80: 6200 0186 bhiw 5cd08 <rtems_rfs_dir_add_entry+0x2f8>
rtems_rfs_block_map_close (fs, &map);
return EIO;
}
entry += elength;
offset += elength;
5cb84: d883 addl %d3,%d4
if (!read)
memset (entry, 0xff, rtems_rfs_fs_block_size (fs));
offset = 0;
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
5cb86: 2244 moveal %d4,%a1 5cb88: b1c4 cmpal %d4,%a0 5cb8a: 6300 ff00 blsw 5ca8c <rtems_rfs_dir_add_entry+0x7c>
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
5cb8e: 4282 clrl %d2 5cb90: 4280 clrl %d0 5cb92: 1412 moveb %a2@,%d2 5cb94: 102a 0001 moveb %a2@(1),%d0 5cb98: 7618 moveq #24,%d3 5cb9a: 4287 clrl %d7 5cb9c: 1e2a 0003 moveb %a2@(3),%d7
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
5cba0: 4281 clrl %d1 5cba2: 122a 0009 moveb %a2@(9),%d1
eino = rtems_rfs_dir_entry_ino (entry);
5cba6: e7aa lsll %d3,%d2 5cba8: 4840 swap %d0 5cbaa: 4240 clrw %d0
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
5cbac: 4283 clrl %d3 5cbae: 162a 0008 moveb %a2@(8),%d3
eino = rtems_rfs_dir_entry_ino (entry);
5cbb2: 8480 orl %d0,%d2 5cbb4: 4280 clrl %d0 5cbb6: 102a 0002 moveb %a2@(2),%d0
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
5cbba: e18b lsll #8,%d3
eino = rtems_rfs_dir_entry_ino (entry);
5cbbc: 8487 orl %d7,%d2 5cbbe: e188 lsll #8,%d0
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
5cbc0: 8681 orl %d1,%d3
eino = rtems_rfs_dir_entry_ino (entry);
5cbc2: 8480 orl %d0,%d2
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
5cbc4: 0c83 0000 ffff cmpil #65535,%d3
5cbca: 6698 bnes 5cb64 <rtems_rfs_dir_add_entry+0x154>
{
if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) <
(rtems_rfs_fs_block_size (fs) - offset))
5cbcc: 202e ff98 movel %fp@(-104),%d0 5cbd0: 9089 subl %a1,%d0
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
{
if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) <
5cbd2: b0ae ff94 cmpl %fp@(-108),%d0 5cbd6: 6300 feb4 blsw 5ca8c <rtems_rfs_dir_add_entry+0x7c>
(rtems_rfs_fs_block_size (fs) - offset))
{
uint32_t hash;
hash = rtems_rfs_dir_hash (name, length);
5cbda: 2f05 movel %d5,%sp@-
RTEMS_RFS_DIR_ENTRY_SIZE + length);
memcpy (entry + RTEMS_RFS_DIR_ENTRY_SIZE, name, length);
rtems_rfs_buffer_mark_dirty (&buffer);
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return 0;
5cbdc: 4282 clrl %d2
{
if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) <
(rtems_rfs_fs_block_size (fs) - offset))
{
uint32_t hash;
hash = rtems_rfs_dir_hash (name, length);
5cbde: 2f0c movel %a4,%sp@- 5cbe0: 4eb9 0006 224c jsr 6224c <rtems_rfs_dir_hash>
rtems_rfs_dir_set_entry_hash (entry, hash);
rtems_rfs_dir_set_entry_ino (entry, ino);
5cbe6: 2e2e 0018 movel %fp@(24),%d7
if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) <
(rtems_rfs_fs_block_size (fs) - offset))
{
uint32_t hash;
hash = rtems_rfs_dir_hash (name, length);
rtems_rfs_dir_set_entry_hash (entry, hash);
5cbea: 7218 moveq #24,%d1 5cbec: 2800 movel %d0,%d4 5cbee: e2ac lsrl %d1,%d4
rtems_rfs_dir_set_entry_ino (entry, ino);
5cbf0: e2af lsrl %d1,%d7
if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) <
(rtems_rfs_fs_block_size (fs) - offset))
{
uint32_t hash;
hash = rtems_rfs_dir_hash (name, length);
rtems_rfs_dir_set_entry_hash (entry, hash);
5cbf2: 2200 movel %d0,%d1 5cbf4: 2a44 moveal %d4,%a5 5cbf6: 2600 movel %d0,%d3 5cbf8: e08b lsrl #8,%d3 5cbfa: 2043 moveal %d3,%a0 5cbfc: 4241 clrw %d1 5cbfe: 4841 swap %d1
rtems_rfs_dir_set_entry_ino (entry, ino);
rtems_rfs_dir_set_entry_length (entry,
5cc00: 282e ff94 movel %fp@(-108),%d4
if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) <
(rtems_rfs_fs_block_size (fs) - offset))
{
uint32_t hash;
hash = rtems_rfs_dir_hash (name, length);
rtems_rfs_dir_set_entry_hash (entry, hash);
5cc04: 2241 moveal %d1,%a1
rtems_rfs_dir_set_entry_ino (entry, ino);
rtems_rfs_dir_set_entry_length (entry,
5cc06: e08c lsrl #8,%d4
if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) <
(rtems_rfs_fs_block_size (fs) - offset))
{
uint32_t hash;
hash = rtems_rfs_dir_hash (name, length);
rtems_rfs_dir_set_entry_hash (entry, hash);
5cc08: 320d movew %a5,%d1
rtems_rfs_dir_set_entry_ino (entry, ino);
rtems_rfs_dir_set_entry_length (entry,
5cc0a: 2d44 ff98 movel %d4,%fp@(-104)
(rtems_rfs_fs_block_size (fs) - offset))
{
uint32_t hash;
hash = rtems_rfs_dir_hash (name, length);
rtems_rfs_dir_set_entry_hash (entry, hash);
rtems_rfs_dir_set_entry_ino (entry, ino);
5cc0e: 282e 0018 movel %fp@(24),%d4
if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) <
(rtems_rfs_fs_block_size (fs) - offset))
{
uint32_t hash;
hash = rtems_rfs_dir_hash (name, length);
rtems_rfs_dir_set_entry_hash (entry, hash);
5cc12: 1541 0004 moveb %d1,%a2@(4)
rtems_rfs_dir_set_entry_ino (entry, ino);
5cc16: 262e 0018 movel %fp@(24),%d3 5cc1a: e08b lsrl #8,%d3
if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) <
(rtems_rfs_fs_block_size (fs) - offset))
{
uint32_t hash;
hash = rtems_rfs_dir_hash (name, length);
rtems_rfs_dir_set_entry_hash (entry, hash);
5cc1c: 3209 movew %a1,%d1
rtems_rfs_dir_set_entry_ino (entry, ino);
5cc1e: 4244 clrw %d4 5cc20: 4844 swap %d4
if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) <
(rtems_rfs_fs_block_size (fs) - offset))
{
uint32_t hash;
hash = rtems_rfs_dir_hash (name, length);
rtems_rfs_dir_set_entry_hash (entry, hash);
5cc22: 1540 0007 moveb %d0,%a2@(7) 5cc26: 1541 0005 moveb %d1,%a2@(5)
rtems_rfs_dir_set_entry_ino (entry, ino);
5cc2a: 1544 0001 moveb %d4,%a2@(1) 5cc2e: 1543 0002 moveb %d3,%a2@(2)
if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) <
(rtems_rfs_fs_block_size (fs) - offset))
{
uint32_t hash;
hash = rtems_rfs_dir_hash (name, length);
rtems_rfs_dir_set_entry_hash (entry, hash);
5cc32: 3208 movew %a0,%d1
rtems_rfs_dir_set_entry_ino (entry, ino);
5cc34: 162e 001b moveb %fp@(27),%d3
rtems_rfs_dir_set_entry_length (entry,
5cc38: 182e ff9b moveb %fp@(-101),%d4 5cc3c: 102e ff97 moveb %fp@(-105),%d0
if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) <
(rtems_rfs_fs_block_size (fs) - offset))
{
uint32_t hash;
hash = rtems_rfs_dir_hash (name, length);
rtems_rfs_dir_set_entry_hash (entry, hash);
5cc40: 1541 0006 moveb %d1,%a2@(6)
rtems_rfs_dir_set_entry_ino (entry, ino);
5cc44: 1543 0003 moveb %d3,%a2@(3) 5cc48: 1487 moveb %d7,%a2@
rtems_rfs_dir_set_entry_length (entry,
5cc4a: 1544 0008 moveb %d4,%a2@(8) 5cc4e: 1540 0009 moveb %d0,%a2@(9)
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
handle->dirty = false;
5cc52: 4203 clrb %d3
RTEMS_RFS_DIR_ENTRY_SIZE + length);
memcpy (entry + RTEMS_RFS_DIR_ENTRY_SIZE, name, length);
5cc54: 2f05 movel %d5,%sp@- 5cc56: 2f0c movel %a4,%sp@- 5cc58: 486a 000a pea %a2@(10) 5cc5c: 4eb9 0006 2df0 jsr 62df0 <memcpy>
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
5cc62: 486e fff2 pea %fp@(-14)
rtems_rfs_buffer_mark_dirty (&buffer);
5cc66: 7201 moveq #1,%d1 5cc68: 2f0b movel %a3,%sp@- 5cc6a: 1d41 fff2 moveb %d1,%fp@(-14) 5cc6e: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release>
handle->dirty = false;
5cc74: 1d43 fff2 moveb %d3,%fp@(-14)
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
5cc78: 2f06 movel %d6,%sp@-
handle->bnum = 0;
5cc7a: 42ae fff4 clrl %fp@(-12) 5cc7e: 2f0b movel %a3,%sp@-
handle->buffer = NULL;
5cc80: 42ae fff8 clrl %fp@(-8) 5cc84: 4eb9 0005 af84 jsr 5af84 <rtems_rfs_block_map_close>
return 0;
5cc8a: 4fef 0024 lea %sp@(36),%sp
}
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
5cc8e: 2002 movel %d2,%d0 5cc90: 4cee 3cfc ff68 moveml %fp@(-152),%d2-%d7/%a2-%a5 5cc96: 4e5e unlk %fp 5cc98: 4e75 rts
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
{
int c;
printf ("rtems-rfs: dir-add-entry: dir=%" PRId32 ", name=",
5cc9a: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 5cc9e: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 5cca2: 263c 0006 2fd4 movel #405460,%d3 <== NOT EXECUTED 5cca8: 4879 0007 3e01 pea 73e01 <CSWTCH.1+0x825> <== NOT EXECUTED 5ccae: 2043 moveal %d3,%a0 <== NOT EXECUTED 5ccb0: 4e90 jsr %a0@ <== NOT EXECUTED
rtems_rfs_inode_ino (dir));
for (c = 0; c < length; c++)
5ccb2: 508f addql #8,%sp <== NOT EXECUTED 5ccb4: 4a85 tstl %d5 <== NOT EXECUTED 5ccb6: 671e beqs 5ccd6 <rtems_rfs_dir_add_entry+0x2c6> <== NOT EXECUTED 5ccb8: 4280 clrl %d0 <== NOT EXECUTED 5ccba: 4282 clrl %d2 <== NOT EXECUTED 5ccbc: 45f9 0006 3014 lea 63014 <putchar>,%a2 <== NOT EXECUTED 5ccc2: 5282 addql #1,%d2 <== NOT EXECUTED
printf ("%c", name[c]);
5ccc4: 1034 0800 moveb %a4@(00000000,%d0:l),%d0 <== NOT EXECUTED 5ccc8: 49c0 extbl %d0 <== NOT EXECUTED 5ccca: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5cccc: 4e92 jsr %a2@ <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
{
int c;
printf ("rtems-rfs: dir-add-entry: dir=%" PRId32 ", name=",
rtems_rfs_inode_ino (dir));
for (c = 0; c < length; c++)
5ccce: 588f addql #4,%sp <== NOT EXECUTED 5ccd0: 2002 movel %d2,%d0 <== NOT EXECUTED 5ccd2: ba82 cmpl %d2,%d5 <== NOT EXECUTED 5ccd4: 66ec bnes 5ccc2 <rtems_rfs_dir_add_entry+0x2b2> <== NOT EXECUTED
printf ("%c", name[c]);
printf (", len=%zd\n", length);
5ccd6: 2f05 movel %d5,%sp@- <== NOT EXECUTED 5ccd8: 4879 0007 3e2a pea 73e2a <CSWTCH.1+0x84e> <== NOT EXECUTED 5ccde: 2043 moveal %d3,%a0 <== NOT EXECUTED
}
rc = rtems_rfs_block_map_open (fs, dir, &map);
5cce0: 2c0e movel %fp,%d6 <== NOT EXECUTED 5cce2: 0686 ffff ff9c addil #-100,%d6 <== NOT EXECUTED
int c;
printf ("rtems-rfs: dir-add-entry: dir=%" PRId32 ", name=",
rtems_rfs_inode_ino (dir));
for (c = 0; c < length; c++)
printf ("%c", name[c]);
printf (", len=%zd\n", length);
5cce8: 4e90 jsr %a0@ <== NOT EXECUTED 5ccea: 508f addql #8,%sp <== NOT EXECUTED
}
rc = rtems_rfs_block_map_open (fs, dir, &map);
5ccec: 2f06 movel %d6,%sp@- <== NOT EXECUTED 5ccee: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 5ccf2: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5ccf4: 4eb9 0005 adf2 jsr 5adf2 <rtems_rfs_block_map_open> <== NOT EXECUTED
if (rc > 0)
5ccfa: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
for (c = 0; c < length; c++)
printf ("%c", name[c]);
printf (", len=%zd\n", length);
}
rc = rtems_rfs_block_map_open (fs, dir, &map);
5ccfe: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
5cd00: 6e00 fd58 bgtw 5ca5a <rtems_rfs_dir_add_entry+0x4a> <== NOT EXECUTED 5cd04: 6000 fd60 braw 5ca66 <rtems_rfs_dir_add_entry+0x56> <== NOT EXECUTED
break;
}
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
5cd08: 2f3c 2000 0000 movel #536870912,%sp@- <== NOT EXECUTED 5cd0e: 42a7 clrl %sp@- <== NOT EXECUTED 5cd10: 4e95 jsr %a5@ <== NOT EXECUTED 5cd12: 508f addql #8,%sp <== NOT EXECUTED 5cd14: 4a00 tstb %d0 <== NOT EXECUTED 5cd16: 664e bnes 5cd66 <rtems_rfs_dir_add_entry+0x356> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
5cd18: 486e fff2 pea %fp@(-14) <== NOT EXECUTED
printf ("rtems-rfs: dir-add-entry: "
"bad length or ino for ino %" PRIu32 ": %u/%" PRId32 " @ %04x\n",
rtems_rfs_inode_ino (dir), elength, eino, offset);
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return EIO;
5cd1c: 7405 moveq #5,%d2 <== NOT EXECUTED 5cd1e: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5cd20: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
5cd26: 4200 clrb %d0 <== NOT EXECUTED 5cd28: 1d40 fff2 moveb %d0,%fp@(-14) <== NOT EXECUTED
offset += elength;
}
}
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
5cd2c: 2f06 movel %d6,%sp@- <== NOT EXECUTED
handle->bnum = 0;
5cd2e: 42ae fff4 clrl %fp@(-12) <== NOT EXECUTED 5cd32: 2f0b movel %a3,%sp@- <== NOT EXECUTED
handle->buffer = NULL;
5cd34: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED 5cd38: 4eb9 0005 af84 jsr 5af84 <rtems_rfs_block_map_close> <== NOT EXECUTED
return rc;
5cd3e: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
}
5cd42: 2002 movel %d2,%d0 5cd44: 4cee 3cfc ff68 moveml %fp@(-152),%d2-%d7/%a2-%a5 5cd4a: 4e5e unlk %fp 5cd4c: 4e75 rts
}
entry = rtems_rfs_buffer_data (&buffer);
if (!read)
memset (entry, 0xff, rtems_rfs_fs_block_size (fs));
5cd4e: 2f2b 0008 movel %a3@(8),%sp@- 5cd52: 4878 00ff pea ff <DBL_MANT_DIG+0xca> 5cd56: 2f0a movel %a2,%sp@- 5cd58: 4eb9 0006 2f48 jsr 62f48 <memset> 5cd5e: 4fef 000c lea %sp@(12),%sp 5cd62: 6000 fd9a braw 5cafe <rtems_rfs_dir_add_entry+0xee>
}
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
printf ("rtems-rfs: dir-add-entry: "
5cd66: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5cd68: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 5cd6c: 2f02 movel %d2,%sp@- <== NOT EXECUTED
"bad length or ino for ino %" PRIu32 ": %u/%" PRId32 " @ %04x\n",
rtems_rfs_inode_ino (dir), elength, eino, offset);
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return EIO;
5cd6e: 7405 moveq #5,%d2 <== NOT EXECUTED
}
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
printf ("rtems-rfs: dir-add-entry: "
5cd70: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5cd72: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 5cd76: 4879 0007 3f06 pea 73f06 <CSWTCH.1+0x92a> <== NOT EXECUTED 5cd7c: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5cd82: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
5cd86: 486e fff2 pea %fp@(-14) <== NOT EXECUTED 5cd8a: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5cd8c: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
5cd92: 4200 clrb %d0 <== NOT EXECUTED 5cd94: 1d40 fff2 moveb %d0,%fp@(-14) <== NOT EXECUTED 5cd98: 6092 bras 5cd2c <rtems_rfs_dir_add_entry+0x31c> <== NOT EXECUTED
* Locate the first block. If an error the block will be 0. If the map is
* empty which happens when creating a directory and adding the first entry
* the seek will return ENXIO. In this case we need to grow the directory.
*/
rc = rtems_rfs_block_map_find (fs, &map, &bpos, &block);
if (rc > 0)
5cd9a: 7001 moveq #1,%d0
while (true)
{
rtems_rfs_block_no block;
uint8_t* entry;
int offset;
bool read = true;
5cd9c: 7601 moveq #1,%d3 5cd9e: 6000 fd30 braw 5cad0 <rtems_rfs_dir_add_entry+0xc0>
5cda2: 2400 movel %d0,%d2 <== NOT EXECUTED
bpos.bno++;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, read);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
5cda4: 2f3c 2000 0000 movel #536870912,%sp@- <== NOT EXECUTED 5cdaa: 42a7 clrl %sp@- <== NOT EXECUTED 5cdac: 4e95 jsr %a5@ <== NOT EXECUTED 5cdae: 508f addql #8,%sp <== NOT EXECUTED 5cdb0: 4a00 tstb %d0 <== NOT EXECUTED 5cdb2: 662c bnes 5cde0 <rtems_rfs_dir_add_entry+0x3d0> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
5cdb4: 486e fff2 pea %fp@(-14) 5cdb8: 2f0b movel %a3,%sp@- 5cdba: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release>
handle->dirty = false;
5cdc0: 4201 clrb %d1 5cdc2: 1d41 fff2 moveb %d1,%fp@(-14)
offset += elength;
}
}
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
5cdc6: 2f06 movel %d6,%sp@-
handle->bnum = 0;
5cdc8: 42ae fff4 clrl %fp@(-12) 5cdcc: 2f0b movel %a3,%sp@-
handle->buffer = NULL;
5cdce: 42ae fff8 clrl %fp@(-8) 5cdd2: 4eb9 0005 af84 jsr 5af84 <rtems_rfs_block_map_close>
return rc;
5cdd8: 4fef 0010 lea %sp@(16),%sp 5cddc: 6000 ff64 braw 5cd42 <rtems_rfs_dir_add_entry+0x332>
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, read);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
printf ("rtems-rfs: dir-add-entry: "
5cde0: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5cde2: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED 5cde8: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 5cdec: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5cdee: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5cdf0: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 5cdf4: 4879 0007 3ebf pea 73ebf <CSWTCH.1+0x8e3> <== NOT EXECUTED 5cdfa: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5ce00: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
5ce04: 486e fff2 pea %fp@(-14) <== NOT EXECUTED 5ce08: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5ce0a: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
5ce10: 4201 clrb %d1 <== NOT EXECUTED 5ce12: 1d41 fff2 moveb %d1,%fp@(-14) <== NOT EXECUTED 5ce16: 60ae bras 5cdc6 <rtems_rfs_dir_add_entry+0x3b6> <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
{
if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) <
(rtems_rfs_fs_block_size (fs) - offset))
5ce18: 202e ff98 movel %fp@(-104),%d0
if (!read)
memset (entry, 0xff, rtems_rfs_fs_block_size (fs));
offset = 0;
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
5ce1c: 93c9 subal %a1,%a1
eino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
{
if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) <
(rtems_rfs_fs_block_size (fs) - offset))
5ce1e: 9089 subl %a1,%d0
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
{
if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) <
5ce20: b0ae ff94 cmpl %fp@(-108),%d0 5ce24: 6300 fc66 blsw 5ca8c <rtems_rfs_dir_add_entry+0x7c> 5ce28: 6000 fdb0 braw 5cbda <rtems_rfs_dir_add_entry+0x1ca>
5ce2c: 2400 movel %d0,%d2 <== NOT EXECUTED
rc = rtems_rfs_block_map_find (fs, &map, &bpos, &block);
if (rc > 0)
{
if (rc != ENXIO)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
5ce2e: 2f3c 2000 0000 movel #536870912,%sp@- <== NOT EXECUTED 5ce34: 42a7 clrl %sp@- <== NOT EXECUTED 5ce36: 4e95 jsr %a5@ <== NOT EXECUTED 5ce38: 508f addql #8,%sp <== NOT EXECUTED 5ce3a: 4a00 tstb %d0 <== NOT EXECUTED 5ce3c: 6700 ff76 beqw 5cdb4 <rtems_rfs_dir_add_entry+0x3a4> <== NOT EXECUTED
printf ("rtems-rfs: dir-add-entry: "
5ce40: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5ce42: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED 5ce48: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 5ce4c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5ce4e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5ce50: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 5ce54: 4879 0007 3e35 pea 73e35 <CSWTCH.1+0x859> <== NOT EXECUTED 5ce5a: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5ce60: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
5ce64: 486e fff2 pea %fp@(-14) <== NOT EXECUTED 5ce68: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5ce6a: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
5ce70: 4201 clrb %d1 <== NOT EXECUTED 5ce72: 1d41 fff2 moveb %d1,%fp@(-14) <== NOT EXECUTED 5ce76: 6000 ff4e braw 5cdc6 <rtems_rfs_dir_add_entry+0x3b6> <== NOT EXECUTED
5ce7a: 2400 movel %d0,%d2
* We have reached the end of the directory so add a block.
*/
rc = rtems_rfs_block_map_grow (fs, &map, 1, &block);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
5ce7c: 2f3c 2000 0000 movel #536870912,%sp@- 5ce82: 42a7 clrl %sp@- 5ce84: 4e95 jsr %a5@ 5ce86: 508f addql #8,%sp 5ce88: 4a00 tstb %d0 5ce8a: 6700 ff28 beqw 5cdb4 <rtems_rfs_dir_add_entry+0x3a4>
printf ("rtems-rfs: dir-add-entry: "
5ce8e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5ce90: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED 5ce96: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 5ce9a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5ce9c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5ce9e: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 5cea2: 4879 0007 3e7a pea 73e7a <CSWTCH.1+0x89e> <== NOT EXECUTED 5cea8: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5ceae: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
5ceb2: 486e fff2 pea %fp@(-14) <== NOT EXECUTED 5ceb6: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5ceb8: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
5cebe: 4201 clrb %d1 <== NOT EXECUTED 5cec0: 1d41 fff2 moveb %d1,%fp@(-14) <== NOT EXECUTED 5cec4: 6000 ff00 braw 5cdc6 <rtems_rfs_dir_add_entry+0x3b6> <== NOT EXECUTED
0005cec8 <rtems_rfs_dir_del_entry>:
int
rtems_rfs_dir_del_entry (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* dir,
rtems_rfs_ino ino,
uint32_t offset)
{
5cec8: 4e56 ff7c linkw %fp,#-132 5cecc: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
rtems_rfs_block_no block;
rtems_rfs_buffer_handle buffer;
bool search;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
5ced0: 2f3c 4000 0000 movel #1073741824,%sp@-
int
rtems_rfs_dir_del_entry (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* dir,
rtems_rfs_ino ino,
uint32_t offset)
{
5ced6: 266e 0008 moveal %fp@(8),%a3
rtems_rfs_block_no block;
rtems_rfs_buffer_handle buffer;
bool search;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
5ceda: 4bf9 0005 37c0 lea 537c0 <rtems_rfs_trace>,%a5 5cee0: 42a7 clrl %sp@-
int
rtems_rfs_dir_del_entry (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* dir,
rtems_rfs_ino ino,
uint32_t offset)
{
5cee2: 286e 000c moveal %fp@(12),%a4 5cee6: 2c2e 0010 movel %fp@(16),%d6
rtems_rfs_block_no block;
rtems_rfs_buffer_handle buffer;
bool search;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
5ceea: 4e95 jsr %a5@ 5ceec: 508f addql #8,%sp 5ceee: 4a00 tstb %d0
5cef0: 6622 bnes 5cf14 <rtems_rfs_dir_del_entry+0x4c> <== NEVER TAKEN
printf ("rtems-rfs: dir-del-entry: dir=%" PRId32 ", entry=%" PRId32 " offset=%" PRIu32 "\n",
rtems_rfs_inode_ino (dir), ino, offset);
rc = rtems_rfs_block_map_open (fs, dir, &map);
5cef2: 486e ffa8 pea %fp@(-88) 5cef6: 2f0c movel %a4,%sp@- 5cef8: 2f0b movel %a3,%sp@- 5cefa: 4eb9 0005 adf2 jsr 5adf2 <rtems_rfs_block_map_open>
if (rc > 0)
5cf00: 4fef 000c lea %sp@(12),%sp
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
printf ("rtems-rfs: dir-del-entry: dir=%" PRId32 ", entry=%" PRId32 " offset=%" PRIu32 "\n",
rtems_rfs_inode_ino (dir), ino, offset);
rc = rtems_rfs_block_map_open (fs, dir, &map);
5cf04: 2a00 movel %d0,%d5
if (rc > 0)
5cf06: 6f3c bles 5cf44 <rtems_rfs_dir_del_entry+0x7c> <== ALWAYS TAKEN
}
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
5cf08: 2005 movel %d5,%d0 <== NOT EXECUTED 5cf0a: 4cee 3cfc ff7c moveml %fp@(-132),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5cf10: 4e5e unlk %fp <== NOT EXECUTED 5cf12: 4e75 rts <== NOT EXECUTED
rtems_rfs_buffer_handle buffer;
bool search;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
printf ("rtems-rfs: dir-del-entry: dir=%" PRId32 ", entry=%" PRId32 " offset=%" PRIu32 "\n",
5cf14: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED 5cf18: 2f06 movel %d6,%sp@- <== NOT EXECUTED 5cf1a: 2f2c 0008 movel %a4@(8),%sp@- <== NOT EXECUTED 5cf1e: 4879 0007 3f4e pea 73f4e <CSWTCH.1+0x972> <== NOT EXECUTED 5cf24: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5cf2a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rtems_rfs_inode_ino (dir), ino, offset);
rc = rtems_rfs_block_map_open (fs, dir, &map);
5cf2e: 486e ffa8 pea %fp@(-88) <== NOT EXECUTED 5cf32: 2f0c movel %a4,%sp@- <== NOT EXECUTED 5cf34: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5cf36: 4eb9 0005 adf2 jsr 5adf2 <rtems_rfs_block_map_open> <== NOT EXECUTED
if (rc > 0)
5cf3c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
printf ("rtems-rfs: dir-del-entry: dir=%" PRId32 ", entry=%" PRId32 " offset=%" PRIu32 "\n",
rtems_rfs_inode_ino (dir), ino, offset);
rc = rtems_rfs_block_map_open (fs, dir, &map);
5cf40: 2a00 movel %d0,%d5 <== NOT EXECUTED
if (rc > 0)
5cf42: 6ec4 bgts 5cf08 <rtems_rfs_dir_del_entry+0x40> <== NOT EXECUTED
return rc;
rc = rtems_rfs_block_map_seek (fs, &map, offset, &block);
5cf44: 486e fffc pea %fp@(-4) 5cf48: 2f2e 0014 movel %fp@(20),%sp@- 5cf4c: 42a7 clrl %sp@- 5cf4e: 486e ffa8 pea %fp@(-88) 5cf52: 2f0b movel %a3,%sp@- 5cf54: 4eb9 0005 b2de jsr 5b2de <rtems_rfs_block_map_seek>
if (rc > 0)
5cf5a: 4fef 0014 lea %sp@(20),%sp
rc = rtems_rfs_block_map_open (fs, dir, &map);
if (rc > 0)
return rc;
rc = rtems_rfs_block_map_seek (fs, &map, offset, &block);
5cf5e: 2a00 movel %d0,%d5
if (rc > 0)
5cf60: 6f32 bles 5cf94 <rtems_rfs_dir_del_entry+0xcc> <== ALWAYS TAKEN
{
if (rc == ENXIO)
5cf62: 7006 moveq #6,%d0 <== NOT EXECUTED 5cf64: b085 cmpl %d5,%d0 <== NOT EXECUTED 5cf66: 671a beqs 5cf82 <rtems_rfs_dir_del_entry+0xba> <== NOT EXECUTED
rc = ENOENT;
rtems_rfs_block_map_close (fs, &map);
5cf68: 486e ffa8 pea %fp@(-88) <== NOT EXECUTED 5cf6c: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5cf6e: 4eb9 0005 af84 jsr 5af84 <rtems_rfs_block_map_close> <== NOT EXECUTED
return rc;
5cf74: 508f addql #8,%sp <== NOT EXECUTED
}
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
5cf76: 2005 movel %d5,%d0 <== NOT EXECUTED 5cf78: 4cee 3cfc ff7c moveml %fp@(-132),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5cf7e: 4e5e unlk %fp <== NOT EXECUTED 5cf80: 4e75 rts <== NOT EXECUTED
rc = rtems_rfs_block_map_seek (fs, &map, offset, &block);
if (rc > 0)
{
if (rc == ENXIO)
rc = ENOENT;
rtems_rfs_block_map_close (fs, &map);
5cf82: 486e ffa8 pea %fp@(-88) <== NOT EXECUTED
rc = rtems_rfs_block_map_seek (fs, &map, offset, &block);
if (rc > 0)
{
if (rc == ENXIO)
rc = ENOENT;
5cf86: 7a02 moveq #2,%d5 <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
5cf88: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5cf8a: 4eb9 0005 af84 jsr 5af84 <rtems_rfs_block_map_close> <== NOT EXECUTED
return rc;
5cf90: 508f addql #8,%sp <== NOT EXECUTED 5cf92: 60e2 bras 5cf76 <rtems_rfs_dir_del_entry+0xae> <== NOT EXECUTED
}
/*
* Only search if the offset is 0 else we are at that position.
*/
search = offset ? false : true;
5cf94: 4aae 0014 tstl %fp@(20) 5cf98: 57c7 seq %d7
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
5cf9a: 4201 clrb %d1
handle->bnum = 0;
5cf9c: 42ae fff4 clrl %fp@(-12) 5cfa0: 4487 negl %d7
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
5cfa2: 1d41 fff2 moveb %d1,%fp@(-14)
handle->bnum = 0; handle->buffer = NULL;
5cfa6: 42ae fff8 clrl %fp@(-8) 5cfaa: 2d4c ffa4 movel %a4,%fp@(-92)
while (rc == 0)
{
uint8_t* entry;
int eoffset;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
5cfae: 4878 0001 pea 1 <ADD> 5cfb2: 2f2e fffc movel %fp@(-4),%sp@- 5cfb6: 486e fff2 pea %fp@(-14) 5cfba: 2f0b movel %a3,%sp@- 5cfbc: 4eb9 0005 bd6e jsr 5bd6e <rtems_rfs_buffer_handle_request>
if (rc > 0)
5cfc2: 4fef 0010 lea %sp@(16),%sp
while (rc == 0)
{
uint8_t* entry;
int eoffset;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
5cfc6: 2840 moveal %d0,%a4
if (rc > 0)
5cfc8: 4a80 tstl %d0 5cfca: 6e00 02ea bgtw 5d2b6 <rtems_rfs_dir_del_entry+0x3ee>
/*
* If we are searching start at the beginning of the block. If not searching
* skip to the offset in the block.
*/
if (search)
5cfce: 226b 0008 moveal %a3@(8),%a1 5cfd2: 4a07 tstb %d7 5cfd4: 6700 014e beqw 5d124 <rtems_rfs_dir_del_entry+0x25c>
5cfd8: 4280 clrl %d0 <== NOT EXECUTED
eoffset = 0;
5cfda: 4284 clrl %d4 <== NOT EXECUTED
else
eoffset = offset % rtems_rfs_fs_block_size (fs);
entry = rtems_rfs_buffer_data (&buffer) + eoffset;
5cfdc: 246e fff8 moveal %fp@(-8),%a2
while (eoffset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
5cfe0: 41e9 fff6 lea %a1@(-10),%a0
if (search)
eoffset = 0;
else
eoffset = offset % rtems_rfs_fs_block_size (fs);
entry = rtems_rfs_buffer_data (&buffer) + eoffset;
5cfe4: 246a 001e moveal %a2@(30),%a2
while (eoffset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
5cfe8: b1c0 cmpal %d0,%a0 5cfea: 6300 00be blsw 5d0aa <rtems_rfs_dir_del_entry+0x1e2>
if (search)
eoffset = 0;
else
eoffset = offset % rtems_rfs_fs_block_size (fs);
entry = rtems_rfs_buffer_data (&buffer) + eoffset;
5cfee: d5c0 addal %d0,%a2
while (eoffset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
5cff0: 4283 clrl %d3 5cff2: 162a 0008 moveb %a2@(8),%d3 5cff6: 4280 clrl %d0 5cff8: 102a 0009 moveb %a2@(9),%d0 5cffc: e18b lsll #8,%d3
eino = rtems_rfs_dir_entry_ino (entry);
5cffe: 1212 moveb %a2@,%d1 5d000: 142a 0001 moveb %a2@(1),%d2
while (eoffset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
5d004: 8680 orl %d0,%d3
eino = rtems_rfs_dir_entry_ino (entry);
5d006: 102a 0002 moveb %a2@(2),%d0 5d00a: 1a2a 0003 moveb %a2@(3),%d5
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
5d00e: 0c83 0000 ffff cmpil #65535,%d3 5d014: 6700 0094 beqw 5d0aa <rtems_rfs_dir_del_entry+0x1e2>
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
5d018: 0282 0000 00ff andil #255,%d2 5d01e: 0280 0000 00ff andil #255,%d0 5d024: 4842 swap %d2 5d026: 4242 clrw %d2 5d028: e188 lsll #8,%d0 5d02a: 0285 0000 00ff andil #255,%d5 5d030: 8480 orl %d0,%d2 5d032: 7018 moveq #24,%d0 5d034: 8485 orl %d5,%d2 5d036: e1a9 lsll %d0,%d1 5d038: 8481 orl %d1,%d2
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
5d03a: 700a moveq #10,%d0 5d03c: b083 cmpl %d3,%d0 5d03e: 6c00 00a8 bgew 5d0e8 <rtems_rfs_dir_del_entry+0x220> 5d042: b6ab 0018 cmpl %a3@(24),%d3 5d046: 6400 00a0 bccw 5d0e8 <rtems_rfs_dir_del_entry+0x220> 5d04a: 4a82 tstl %d2 5d04c: 6700 009a beqw 5d0e8 <rtems_rfs_dir_del_entry+0x220> 5d050: b4ab 0010 cmpl %a3@(16),%d2 5d054: 6200 0092 bhiw 5d0e8 <rtems_rfs_dir_del_entry+0x220>
rtems_rfs_inode_ino (dir), elength, eino, block, eoffset);
rc = EIO;
break;
}
if (ino == rtems_rfs_dir_entry_ino (entry))
5d058: b486 cmpl %d6,%d2 5d05a: 6700 0102 beqw 5d15e <rtems_rfs_dir_del_entry+0x296>
{
rc = EIO;
break;
}
entry += elength;
5d05e: d5c3 addal %d3,%a2 <== NOT EXECUTED
eoffset += elength;
5d060: d883 addl %d3,%d4 <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return 0;
}
if (!search)
5d062: 4a07 tstb %d7 <== NOT EXECUTED 5d064: 6700 00b4 beqw 5d11a <rtems_rfs_dir_del_entry+0x252> <== NOT EXECUTED
else
eoffset = offset % rtems_rfs_fs_block_size (fs);
entry = rtems_rfs_buffer_data (&buffer) + eoffset;
while (eoffset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
5d068: b1c4 cmpal %d4,%a0 <== NOT EXECUTED 5d06a: 633e blss 5d0aa <rtems_rfs_dir_del_entry+0x1e2> <== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
5d06c: 4282 clrl %d2 <== NOT EXECUTED 5d06e: 4280 clrl %d0 <== NOT EXECUTED 5d070: 1412 moveb %a2@,%d2 <== NOT EXECUTED 5d072: 102a 0001 moveb %a2@(1),%d0 <== NOT EXECUTED 5d076: 7218 moveq #24,%d1 <== NOT EXECUTED
while (eoffset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
5d078: 4283 clrl %d3 <== NOT EXECUTED 5d07a: 162a 0008 moveb %a2@(8),%d3 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
5d07e: 4285 clrl %d5 <== NOT EXECUTED 5d080: 1a2a 0003 moveb %a2@(3),%d5 <== NOT EXECUTED 5d084: e3aa lsll %d1,%d2 <== NOT EXECUTED 5d086: 4840 swap %d0 <== NOT EXECUTED 5d088: 4240 clrw %d0 <== NOT EXECUTED
while (eoffset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
5d08a: 4281 clrl %d1 <== NOT EXECUTED 5d08c: 122a 0009 moveb %a2@(9),%d1 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
5d090: 8480 orl %d0,%d2 <== NOT EXECUTED 5d092: 4280 clrl %d0 <== NOT EXECUTED 5d094: 102a 0002 moveb %a2@(2),%d0 <== NOT EXECUTED
while (eoffset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
5d098: e18b lsll #8,%d3 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
5d09a: 8485 orl %d5,%d2 <== NOT EXECUTED 5d09c: e188 lsll #8,%d0 <== NOT EXECUTED
while (eoffset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
5d09e: 8681 orl %d1,%d3 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
5d0a0: 8480 orl %d0,%d2 <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
5d0a2: 0c83 0000 ffff cmpil #65535,%d3 <== NOT EXECUTED 5d0a8: 6690 bnes 5d03a <rtems_rfs_dir_del_entry+0x172> <== NOT EXECUTED
entry += elength;
eoffset += elength;
}
if (rc == 0)
5d0aa: 4a8c tstl %a4 <== NOT EXECUTED 5d0ac: 6700 0086 beqw 5d134 <rtems_rfs_dir_del_entry+0x26c> <== NOT EXECUTED 5d0b0: 2a0c movel %a4,%d5 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
5d0b2: 486e fff2 pea %fp@(-14) <== NOT EXECUTED 5d0b6: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5d0b8: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
rc = ENOENT;
}
}
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
5d0be: 486e ffa8 pea %fp@(-88) <== NOT EXECUTED
handle->dirty = false;
5d0c2: 4200 clrb %d0 <== NOT EXECUTED 5d0c4: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5d0c6: 1d40 fff2 moveb %d0,%fp@(-14) <== NOT EXECUTED
handle->bnum = 0;
5d0ca: 42ae fff4 clrl %fp@(-12) <== NOT EXECUTED
handle->buffer = NULL;
5d0ce: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED 5d0d2: 4eb9 0005 af84 jsr 5af84 <rtems_rfs_block_map_close> <== NOT EXECUTED
return rc;
5d0d8: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
}
5d0dc: 2005 movel %d5,%d0 5d0de: 4cee 3cfc ff7c moveml %fp@(-132),%d2-%d7/%a2-%a5 5d0e4: 4e5e unlk %fp 5d0e6: 4e75 rts
5d0e8: 286e ffa4 moveal %fp@(-92),%a4 <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
5d0ec: 2f3c 4000 0000 movel #1073741824,%sp@- <== NOT EXECUTED 5d0f2: 42a7 clrl %sp@- <== NOT EXECUTED 5d0f4: 4e95 jsr %a5@ <== NOT EXECUTED 5d0f6: 508f addql #8,%sp <== NOT EXECUTED 5d0f8: 4a00 tstb %d0 <== NOT EXECUTED 5d0fa: 671e beqs 5d11a <rtems_rfs_dir_del_entry+0x252> <== NOT EXECUTED
printf ("rtems-rfs: dir-del-entry: "
5d0fc: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5d0fe: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 5d102: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5d104: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5d106: 2f2c 0008 movel %a4@(8),%sp@- <== NOT EXECUTED 5d10a: 4879 0007 3fce pea 73fce <CSWTCH.1+0x9f2> <== NOT EXECUTED 5d110: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5d116: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
5d11a: 486e fff2 pea %fp@(-14) <== NOT EXECUTED
if (rc == 0)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
if (rc == ENXIO)
rc = ENOENT;
5d11e: 7a05 moveq #5,%d5 <== NOT EXECUTED 5d120: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5d122: 6094 bras 5d0b8 <rtems_rfs_dir_del_entry+0x1f0> <== NOT EXECUTED
* skip to the offset in the block.
*/
if (search)
eoffset = 0;
else
eoffset = offset % rtems_rfs_fs_block_size (fs);
5d124: 202e 0014 movel %fp@(20),%d0 5d128: 2209 movel %a1,%d1 5d12a: 4c41 0004 remul %d1,%d4,%d0 5d12e: 2004 movel %d4,%d0 5d130: 6000 feaa braw 5cfdc <rtems_rfs_dir_del_entry+0x114>
eoffset += elength;
}
if (rc == 0)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
5d134: 486e fffc pea %fp@(-4) <== NOT EXECUTED 5d138: 486e ffa8 pea %fp@(-88) <== NOT EXECUTED 5d13c: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5d13e: 4eb9 0005 b35c jsr 5b35c <rtems_rfs_block_map_next_block> <== NOT EXECUTED
if (rc == ENXIO)
5d144: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5d148: 7206 moveq #6,%d1 <== NOT EXECUTED
eoffset += elength;
}
if (rc == 0)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
5d14a: 2840 moveal %d0,%a4 <== NOT EXECUTED
if (rc == ENXIO)
5d14c: b280 cmpl %d0,%d1 <== NOT EXECUTED 5d14e: 6700 0160 beqw 5d2b0 <rtems_rfs_dir_del_entry+0x3e8> <== NOT EXECUTED
/*
* Only search if the offset is 0 else we are at that position.
*/
search = offset ? false : true;
while (rc == 0)
5d152: 4a80 tstl %d0 <== NOT EXECUTED 5d154: 6700 fe58 beqw 5cfae <rtems_rfs_dir_del_entry+0xe6> <== NOT EXECUTED 5d158: 2a0c movel %a4,%d5 <== NOT EXECUTED 5d15a: 6000 ff56 braw 5d0b2 <rtems_rfs_dir_del_entry+0x1ea> <== NOT EXECUTED
}
if (ino == rtems_rfs_dir_entry_ino (entry))
{
uint32_t remaining;
remaining = rtems_rfs_fs_block_size (fs) - (eoffset + elength);
5d15e: 2003 movel %d3,%d0 5d160: 2409 movel %a1,%d2 5d162: d084 addl %d4,%d0 5d164: 9480 subl %d0,%d2
memmove (entry, entry + elength, remaining);
5d166: 2f02 movel %d2,%sp@- 5d168: 4872 3800 pea %a2@(00000000,%d3:l) 5d16c: 286e ffa4 moveal %fp@(-92),%a4 5d170: 2f0a movel %a2,%sp@- 5d172: 4eb9 0006 2e60 jsr 62e60 <memmove>
memset (entry + remaining, 0xff, elength);
5d178: 2f03 movel %d3,%sp@- 5d17a: 4878 00ff pea ff <DBL_MANT_DIG+0xca> 5d17e: 4872 2800 pea %a2@(00000000,%d2:l)
* block and it is the last block in the map shrink the map.
*
* @note We could check again to see if the new end block in the map is
* also empty. This way we could clean up an empty directory.
*/
elength = rtems_rfs_dir_entry_length (entry);
5d182: 4282 clrl %d2
if (ino == rtems_rfs_dir_entry_ino (entry))
{
uint32_t remaining;
remaining = rtems_rfs_fs_block_size (fs) - (eoffset + elength);
memmove (entry, entry + elength, remaining);
memset (entry + remaining, 0xff, elength);
5d184: 4eb9 0006 2f48 jsr 62f48 <memset>
* block and it is the last block in the map shrink the map.
*
* @note We could check again to see if the new end block in the map is
* also empty. This way we could clean up an empty directory.
*/
elength = rtems_rfs_dir_entry_length (entry);
5d18a: 4280 clrl %d0 5d18c: 142a 0008 moveb %a2@(8),%d2 5d190: 102a 0009 moveb %a2@(9),%d0
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
5d194: 2f3c 4000 0000 movel #1073741824,%sp@-
* block and it is the last block in the map shrink the map.
*
* @note We could check again to see if the new end block in the map is
* also empty. This way we could clean up an empty directory.
*/
elength = rtems_rfs_dir_entry_length (entry);
5d19a: e18a lsll #8,%d2
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
5d19c: 42a7 clrl %sp@-
* block and it is the last block in the map shrink the map.
*
* @note We could check again to see if the new end block in the map is
* also empty. This way we could clean up an empty directory.
*/
elength = rtems_rfs_dir_entry_length (entry);
5d19e: 8480 orl %d0,%d2
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
5d1a0: 4e95 jsr %a5@ 5d1a2: 4fef 0020 lea %sp@(32),%sp 5d1a6: 4a00 tstb %d0
5d1a8: 6742 beqs 5d1ec <rtems_rfs_dir_del_entry+0x324> <== ALWAYS TAKEN
printf ("rtems-rfs: dir-del-entry: "
"last block free for ino %" PRIu32 ": elength=%i block=%" PRIu32
" offset=%d last=%s\n",
ino, elength, block, eoffset,
rtems_rfs_block_map_last (&map) ? "yes" : "no");
5d1aa: 202e ffb6 movel %fp@(-74),%d0 <== NOT EXECUTED 5d1ae: 206e ffae moveal %fp@(-82),%a0 <== NOT EXECUTED
* also empty. This way we could clean up an empty directory.
*/
elength = rtems_rfs_dir_entry_length (entry);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
printf ("rtems-rfs: dir-del-entry: "
5d1b2: 660a bnes 5d1be <rtems_rfs_dir_del_entry+0x2f6> <== NOT EXECUTED 5d1b4: 223c 0007 2dab movel #470443,%d1 <== NOT EXECUTED
"last block free for ino %" PRIu32 ": elength=%i block=%" PRIu32
" offset=%d last=%s\n",
ino, elength, block, eoffset,
rtems_rfs_block_map_last (&map) ? "yes" : "no");
5d1ba: 4a88 tstl %a0 <== NOT EXECUTED 5d1bc: 6712 beqs 5d1d0 <rtems_rfs_dir_del_entry+0x308> <== NOT EXECUTED 5d1be: 5388 subql #1,%a0 <== NOT EXECUTED
* also empty. This way we could clean up an empty directory.
*/
elength = rtems_rfs_dir_entry_length (entry);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
printf ("rtems-rfs: dir-del-entry: "
5d1c0: 223c 0007 319e movel #471454,%d1 <== NOT EXECUTED
"last block free for ino %" PRIu32 ": elength=%i block=%" PRIu32
" offset=%d last=%s\n",
ino, elength, block, eoffset,
rtems_rfs_block_map_last (&map) ? "yes" : "no");
5d1c6: b1c0 cmpal %d0,%a0 <== NOT EXECUTED 5d1c8: 6606 bnes 5d1d0 <rtems_rfs_dir_del_entry+0x308> <== NOT EXECUTED
* also empty. This way we could clean up an empty directory.
*/
elength = rtems_rfs_dir_entry_length (entry);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
printf ("rtems-rfs: dir-del-entry: "
5d1ca: 223c 0007 2dab movel #470443,%d1 <== NOT EXECUTED 5d1d0: 2f01 movel %d1,%sp@- <== NOT EXECUTED 5d1d2: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5d1d4: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 5d1d8: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5d1da: 2f06 movel %d6,%sp@- <== NOT EXECUTED 5d1dc: 4879 0007 401a pea 7401a <CSWTCH.1+0xa3e> <== NOT EXECUTED 5d1e2: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5d1e8: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
"last block free for ino %" PRIu32 ": elength=%i block=%" PRIu32
" offset=%d last=%s\n",
ino, elength, block, eoffset,
rtems_rfs_block_map_last (&map) ? "yes" : "no");
if ((elength == RTEMS_RFS_DIR_ENTRY_EMPTY) &&
5d1ec: 0c82 0000 ffff cmpil #65535,%d2
5d1f2: 6736 beqs 5d22a <rtems_rfs_dir_del_entry+0x362>
5d1f4: 486e fff2 pea %fp@(-14)
}
rtems_rfs_buffer_mark_dirty (&buffer);
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return 0;
5d1f8: 4285 clrl %d5
"block map shrink failed for ino %" PRIu32 ": %d: %s\n",
rtems_rfs_inode_ino (dir), rc, strerror (rc));
}
}
rtems_rfs_buffer_mark_dirty (&buffer);
5d1fa: 7201 moveq #1,%d1 5d1fc: 2f0b movel %a3,%sp@- 5d1fe: 1d41 fff2 moveb %d1,%fp@(-14) 5d202: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release>
rc = ENOENT;
}
}
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
5d208: 486e ffa8 pea %fp@(-88)
handle->dirty = false;
5d20c: 4200 clrb %d0 5d20e: 2f0b movel %a3,%sp@- 5d210: 1d40 fff2 moveb %d0,%fp@(-14)
handle->bnum = 0;
5d214: 42ae fff4 clrl %fp@(-12)
handle->buffer = NULL;
5d218: 42ae fff8 clrl %fp@(-8) 5d21c: 4eb9 0005 af84 jsr 5af84 <rtems_rfs_block_map_close>
return rc;
5d222: 4fef 0010 lea %sp@(16),%sp 5d226: 6000 feb4 braw 5d0dc <rtems_rfs_dir_del_entry+0x214>
"last block free for ino %" PRIu32 ": elength=%i block=%" PRIu32
" offset=%d last=%s\n",
ino, elength, block, eoffset,
rtems_rfs_block_map_last (&map) ? "yes" : "no");
if ((elength == RTEMS_RFS_DIR_ENTRY_EMPTY) &&
5d22a: 4a84 tstl %d4
5d22c: 66c6 bnes 5d1f4 <rtems_rfs_dir_del_entry+0x32c> <== ALWAYS TAKEN
(eoffset == 0) && rtems_rfs_block_map_last (&map))
5d22e: 202e ffb6 movel %fp@(-74),%d0 <== NOT EXECUTED 5d232: 222e ffae movel %fp@(-82),%d1 <== NOT EXECUTED 5d236: 4a80 tstl %d0 <== NOT EXECUTED 5d238: 665e bnes 5d298 <rtems_rfs_dir_del_entry+0x3d0> <== NOT EXECUTED 5d23a: 4a81 tstl %d1 <== NOT EXECUTED 5d23c: 665a bnes 5d298 <rtems_rfs_dir_del_entry+0x3d0> <== NOT EXECUTED
{
rc = rtems_rfs_block_map_shrink (fs, &map, 1);
5d23e: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 5d242: 486e ffa8 pea %fp@(-88) <== NOT EXECUTED 5d246: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5d248: 4eb9 0005 b72a jsr 5b72a <rtems_rfs_block_map_shrink> <== NOT EXECUTED
if (rc > 0)
5d24e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rtems_rfs_block_map_last (&map) ? "yes" : "no");
if ((elength == RTEMS_RFS_DIR_ENTRY_EMPTY) &&
(eoffset == 0) && rtems_rfs_block_map_last (&map))
{
rc = rtems_rfs_block_map_shrink (fs, &map, 1);
5d252: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
5d254: 6f9e bles 5d1f4 <rtems_rfs_dir_del_entry+0x32c> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
5d256: 2f3c 4000 0000 movel #1073741824,%sp@- <== NOT EXECUTED 5d25c: 42a7 clrl %sp@- <== NOT EXECUTED 5d25e: 4e95 jsr %a5@ <== NOT EXECUTED 5d260: 508f addql #8,%sp <== NOT EXECUTED 5d262: 4a00 tstb %d0 <== NOT EXECUTED 5d264: 678e beqs 5d1f4 <rtems_rfs_dir_del_entry+0x32c> <== NOT EXECUTED
printf ("rtems-rfs: dir-del-entry: "
5d266: 2f02 movel %d2,%sp@- <== NOT EXECUTED
}
rtems_rfs_buffer_mark_dirty (&buffer);
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return 0;
5d268: 4285 clrl %d5 <== NOT EXECUTED
{
rc = rtems_rfs_block_map_shrink (fs, &map, 1);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
printf ("rtems-rfs: dir-del-entry: "
5d26a: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED 5d270: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5d272: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5d274: 2f2c 0008 movel %a4@(8),%sp@- <== NOT EXECUTED 5d278: 4879 0007 4079 pea 74079 <CSWTCH.1+0xa9d> <== NOT EXECUTED 5d27e: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5d284: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
5d288: 486e fff2 pea %fp@(-14) <== NOT EXECUTED
"block map shrink failed for ino %" PRIu32 ": %d: %s\n",
rtems_rfs_inode_ino (dir), rc, strerror (rc));
}
}
rtems_rfs_buffer_mark_dirty (&buffer);
5d28c: 7201 moveq #1,%d1 <== NOT EXECUTED 5d28e: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5d290: 1d41 fff2 moveb %d1,%fp@(-14) <== NOT EXECUTED 5d294: 6000 ff6c braw 5d202 <rtems_rfs_dir_del_entry+0x33a> <== NOT EXECUTED
" offset=%d last=%s\n",
ino, elength, block, eoffset,
rtems_rfs_block_map_last (&map) ? "yes" : "no");
if ((elength == RTEMS_RFS_DIR_ENTRY_EMPTY) &&
(eoffset == 0) && rtems_rfs_block_map_last (&map))
5d298: 5381 subql #1,%d1 <== NOT EXECUTED 5d29a: b280 cmpl %d0,%d1 <== NOT EXECUTED 5d29c: 67a0 beqs 5d23e <rtems_rfs_dir_del_entry+0x376> <== NOT EXECUTED 5d29e: 486e fff2 pea %fp@(-14) <== NOT EXECUTED
}
rtems_rfs_buffer_mark_dirty (&buffer);
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return 0;
5d2a2: 4285 clrl %d5 <== NOT EXECUTED
"block map shrink failed for ino %" PRIu32 ": %d: %s\n",
rtems_rfs_inode_ino (dir), rc, strerror (rc));
}
}
rtems_rfs_buffer_mark_dirty (&buffer);
5d2a4: 7201 moveq #1,%d1 <== NOT EXECUTED 5d2a6: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5d2a8: 1d41 fff2 moveb %d1,%fp@(-14) <== NOT EXECUTED 5d2ac: 6000 ff54 braw 5d202 <rtems_rfs_dir_del_entry+0x33a> <== NOT EXECUTED
if (rc == 0)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
if (rc == ENXIO)
rc = ENOENT;
5d2b0: 7a02 moveq #2,%d5 <== NOT EXECUTED 5d2b2: 6000 fdfe braw 5d0b2 <rtems_rfs_dir_del_entry+0x1ea> <== NOT EXECUTED 5d2b6: 286e ffa4 moveal %fp@(-92),%a4 <== NOT EXECUTED 5d2ba: 2a00 movel %d0,%d5 <== NOT EXECUTED
int eoffset;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
5d2bc: 2f3c 4000 0000 movel #1073741824,%sp@- <== NOT EXECUTED 5d2c2: 42a7 clrl %sp@- <== NOT EXECUTED 5d2c4: 4e95 jsr %a5@ <== NOT EXECUTED 5d2c6: 508f addql #8,%sp <== NOT EXECUTED 5d2c8: 4a00 tstb %d0 <== NOT EXECUTED 5d2ca: 6700 fde6 beqw 5d0b2 <rtems_rfs_dir_del_entry+0x1ea> <== NOT EXECUTED
printf ("rtems-rfs: dir-del-entry: "
5d2ce: 2f05 movel %d5,%sp@- <== NOT EXECUTED 5d2d0: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED 5d2d6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5d2d8: 2f05 movel %d5,%sp@- <== NOT EXECUTED 5d2da: 2f2c 0008 movel %a4@(8),%sp@- <== NOT EXECUTED 5d2de: 4879 0007 3f87 pea 73f87 <CSWTCH.1+0x9ab> <== NOT EXECUTED 5d2e4: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5d2ea: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 5d2ee: 6000 fdc2 braw 5d0b2 <rtems_rfs_dir_del_entry+0x1ea> <== NOT EXECUTED
0005d6d2 <rtems_rfs_dir_empty>:
}
int
rtems_rfs_dir_empty (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* dir)
{
5d6d2: 4e56 ff80 linkw %fp,#-128 <== NOT EXECUTED 5d6d6: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED
rtems_rfs_buffer_handle buffer;
rtems_rfs_block_no block;
bool empty;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
5d6da: 2f3c 8000 0000 movel #-2147483648,%sp@- <== NOT EXECUTED
}
int
rtems_rfs_dir_empty (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* dir)
{
5d6e0: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
rtems_rfs_buffer_handle buffer;
rtems_rfs_block_no block;
bool empty;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
5d6e4: 47f9 0005 37c0 lea 537c0 <rtems_rfs_trace>,%a3 <== NOT EXECUTED 5d6ea: 42a7 clrl %sp@- <== NOT EXECUTED 5d6ec: 4e93 jsr %a3@ <== NOT EXECUTED 5d6ee: 508f addql #8,%sp <== NOT EXECUTED 5d6f0: 4a00 tstb %d0 <== NOT EXECUTED 5d6f2: 662a bnes 5d71e <rtems_rfs_dir_empty+0x4c> <== NOT EXECUTED
printf ("rtems-rfs: dir-empty: dir=%" PRId32 "\n", rtems_rfs_inode_ino (dir));
empty = true;
rc = rtems_rfs_block_map_open (fs, dir, &map);
5d6f4: 2c0e movel %fp,%d6 <== NOT EXECUTED 5d6f6: 0686 ffff ffa8 addil #-88,%d6 <== NOT EXECUTED 5d6fc: 2f06 movel %d6,%sp@- <== NOT EXECUTED 5d6fe: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 5d702: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5d704: 4eb9 0005 adf2 jsr 5adf2 <rtems_rfs_block_map_open> <== NOT EXECUTED
if (rc > 0)
5d70a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
printf ("rtems-rfs: dir-empty: dir=%" PRId32 "\n", rtems_rfs_inode_ino (dir));
empty = true;
rc = rtems_rfs_block_map_open (fs, dir, &map);
5d70e: 2a00 movel %d0,%d5 <== NOT EXECUTED
if (rc > 0)
5d710: 6f40 bles 5d752 <rtems_rfs_dir_empty+0x80> <== NOT EXECUTED
rc = ENOTEMPTY;
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
5d712: 2005 movel %d5,%d0 <== NOT EXECUTED 5d714: 4cee 3cfc ff80 moveml %fp@(-128),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5d71a: 4e5e unlk %fp <== NOT EXECUTED 5d71c: 4e75 rts <== NOT EXECUTED
rtems_rfs_block_no block;
bool empty;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
printf ("rtems-rfs: dir-empty: dir=%" PRId32 "\n", rtems_rfs_inode_ino (dir));
5d71e: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED
empty = true;
rc = rtems_rfs_block_map_open (fs, dir, &map);
5d722: 2c0e movel %fp,%d6 <== NOT EXECUTED 5d724: 0686 ffff ffa8 addil #-88,%d6 <== NOT EXECUTED
rtems_rfs_block_no block;
bool empty;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
printf ("rtems-rfs: dir-empty: dir=%" PRId32 "\n", rtems_rfs_inode_ino (dir));
5d72a: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 5d72e: 4879 0007 4199 pea 74199 <CSWTCH.1+0xbbd> <== NOT EXECUTED 5d734: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5d73a: 508f addql #8,%sp <== NOT EXECUTED
empty = true;
rc = rtems_rfs_block_map_open (fs, dir, &map);
5d73c: 2f06 movel %d6,%sp@- <== NOT EXECUTED 5d73e: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 5d742: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5d744: 4eb9 0005 adf2 jsr 5adf2 <rtems_rfs_block_map_open> <== NOT EXECUTED
if (rc > 0)
5d74a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
printf ("rtems-rfs: dir-empty: dir=%" PRId32 "\n", rtems_rfs_inode_ino (dir));
empty = true;
rc = rtems_rfs_block_map_open (fs, dir, &map);
5d74e: 2a00 movel %d0,%d5 <== NOT EXECUTED
if (rc > 0)
5d750: 6ec0 bgts 5d712 <rtems_rfs_dir_empty+0x40> <== NOT EXECUTED
return rc;
rc = rtems_rfs_block_map_seek (fs, &map, 0, &block);
5d752: 486e fffc pea %fp@(-4) <== NOT EXECUTED 5d756: 42a7 clrl %sp@- <== NOT EXECUTED 5d758: 42a7 clrl %sp@- <== NOT EXECUTED 5d75a: 2f06 movel %d6,%sp@- <== NOT EXECUTED 5d75c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5d75e: 4eb9 0005 b2de jsr 5b2de <rtems_rfs_block_map_seek> <== NOT EXECUTED
if (rc > 0)
5d764: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
rc = rtems_rfs_block_map_open (fs, dir, &map);
if (rc > 0)
return rc;
rc = rtems_rfs_block_map_seek (fs, &map, 0, &block);
5d768: 2a00 movel %d0,%d5 <== NOT EXECUTED
if (rc > 0)
5d76a: 6e00 0206 bgtw 5d972 <rtems_rfs_dir_empty+0x2a0> <== NOT EXECUTED
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
handle->bnum = 0;
5d76e: 42ae fff4 clrl %fp@(-12) <== NOT EXECUTED 5d772: 49f9 0005 bd6e lea 5bd6e <rtems_rfs_buffer_handle_request>,%a4<== NOT EXECUTED
handle->buffer = NULL;
5d778: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
5d77c: 4200 clrb %d0 <== NOT EXECUTED 5d77e: 1d40 fff2 moveb %d0,%fp@(-14) <== NOT EXECUTED
while (empty)
{
uint8_t* entry;
int offset;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
5d782: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 5d786: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 5d78a: 486e fff2 pea %fp@(-14) <== NOT EXECUTED 5d78e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5d790: 4e94 jsr %a4@ <== NOT EXECUTED
if (rc > 0)
5d792: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
while (empty)
{
uint8_t* entry;
int offset;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
5d796: 2a40 moveal %d0,%a5 <== NOT EXECUTED
if (rc > 0)
5d798: 4a80 tstl %d0 <== NOT EXECUTED 5d79a: 6e00 01ee bgtw 5d98a <rtems_rfs_dir_empty+0x2b8> <== NOT EXECUTED
break;
entry = rtems_rfs_buffer_data (&buffer);
5d79e: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED
offset = 0;
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
5d7a2: 226a 0008 moveal %a2@(8),%a1 <== NOT EXECUTED 5d7a6: 43e9 fff6 lea %a1@(-10),%a1 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
if (rc > 0)
break;
entry = rtems_rfs_buffer_data (&buffer);
5d7aa: 2068 001e moveal %a0@(30),%a0 <== NOT EXECUTED
offset = 0;
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
5d7ae: 4a89 tstl %a1 <== NOT EXECUTED 5d7b0: 6700 00de beqw 5d890 <rtems_rfs_dir_empty+0x1be> <== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
5d7b4: 4282 clrl %d2 <== NOT EXECUTED 5d7b6: 1428 0008 moveb %a0@(8),%d2 <== NOT EXECUTED 5d7ba: 4280 clrl %d0 <== NOT EXECUTED 5d7bc: 1028 0009 moveb %a0@(9),%d0 <== NOT EXECUTED 5d7c0: e18a lsll #8,%d2 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
5d7c2: 1210 moveb %a0@,%d1 <== NOT EXECUTED 5d7c4: 1628 0002 moveb %a0@(2),%d3 <== NOT EXECUTED
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
5d7c8: 8480 orl %d0,%d2 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
5d7ca: 1028 0001 moveb %a0@(1),%d0 <== NOT EXECUTED 5d7ce: 1a28 0003 moveb %a0@(3),%d5 <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
5d7d2: 0c82 0000 ffff cmpil #65535,%d2 <== NOT EXECUTED 5d7d8: 6700 00b6 beqw 5d890 <rtems_rfs_dir_empty+0x1be> <== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
5d7dc: 7e18 moveq #24,%d7 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
if (rc > 0)
break;
entry = rtems_rfs_buffer_data (&buffer);
offset = 0;
5d7de: 4284 clrl %d4 <== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
5d7e0: 0283 0000 00ff andil #255,%d3 <== NOT EXECUTED 5d7e6: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 5d7ec: 0285 0000 00ff andil #255,%d5 <== NOT EXECUTED 5d7f2: e18b lsll #8,%d3 <== NOT EXECUTED 5d7f4: 4840 swap %d0 <== NOT EXECUTED 5d7f6: 4240 clrw %d0 <== NOT EXECUTED 5d7f8: efa9 lsll %d7,%d1 <== NOT EXECUTED 5d7fa: 8680 orl %d0,%d3 <== NOT EXECUTED 5d7fc: 8685 orl %d5,%d3 <== NOT EXECUTED 5d7fe: 8681 orl %d1,%d3 <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
5d800: 7e0a moveq #10,%d7 <== NOT EXECUTED 5d802: be82 cmpl %d2,%d7 <== NOT EXECUTED 5d804: 6c00 0122 bgew 5d928 <rtems_rfs_dir_empty+0x256> <== NOT EXECUTED 5d808: b4aa 0018 cmpl %a2@(24),%d2 <== NOT EXECUTED 5d80c: 6400 011a bccw 5d928 <rtems_rfs_dir_empty+0x256> <== NOT EXECUTED 5d810: 4a83 tstl %d3 <== NOT EXECUTED 5d812: 6700 0114 beqw 5d928 <rtems_rfs_dir_empty+0x256> <== NOT EXECUTED 5d816: b6aa 0010 cmpl %a2@(16),%d3 <== NOT EXECUTED 5d81a: 6200 010c bhiw 5d928 <rtems_rfs_dir_empty+0x256> <== NOT EXECUTED
/*
* Ignore the current (.) and parent (..) entries. Anything else means
* the directory is not empty.
*/
if (((elength != (RTEMS_RFS_DIR_ENTRY_SIZE + 1)) ||
5d81e: 700b moveq #11,%d0 <== NOT EXECUTED 5d820: b082 cmpl %d2,%d0 <== NOT EXECUTED 5d822: 6700 00c4 beqw 5d8e8 <rtems_rfs_dir_empty+0x216> <== NOT EXECUTED
(entry[RTEMS_RFS_DIR_ENTRY_SIZE] != '.')) &&
5d826: 7e0c moveq #12,%d7 <== NOT EXECUTED 5d828: be82 cmpl %d2,%d7 <== NOT EXECUTED 5d82a: 6600 00ca bnew 5d8f6 <rtems_rfs_dir_empty+0x224> <== NOT EXECUTED
((elength != (RTEMS_RFS_DIR_ENTRY_SIZE + 2)) ||
5d82e: 4280 clrl %d0 <== NOT EXECUTED 5d830: 1028 000a moveb %a0@(10),%d0 <== NOT EXECUTED 5d834: 722e moveq #46,%d1 <== NOT EXECUTED 5d836: b280 cmpl %d0,%d1 <== NOT EXECUTED 5d838: 6600 00bc bnew 5d8f6 <rtems_rfs_dir_empty+0x224> <== NOT EXECUTED
(entry[RTEMS_RFS_DIR_ENTRY_SIZE] != '.') ||
5d83c: 4280 clrl %d0 <== NOT EXECUTED 5d83e: 1028 000b moveb %a0@(11),%d0 <== NOT EXECUTED 5d842: b280 cmpl %d0,%d1 <== NOT EXECUTED 5d844: 6600 00b0 bnew 5d8f6 <rtems_rfs_dir_empty+0x224> <== NOT EXECUTED
empty = false;
break;
}
entry += elength;
offset += elength;
5d848: d882 addl %d2,%d4 <== NOT EXECUTED
break;
entry = rtems_rfs_buffer_data (&buffer);
offset = 0;
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
5d84a: b3c4 cmpal %d4,%a1 <== NOT EXECUTED 5d84c: 6342 blss 5d890 <rtems_rfs_dir_empty+0x1be> <== NOT EXECUTED
{
empty = false;
break;
}
entry += elength;
5d84e: d1c2 addal %d2,%a0 <== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
5d850: 4283 clrl %d3 <== NOT EXECUTED 5d852: 4280 clrl %d0 <== NOT EXECUTED 5d854: 1610 moveb %a0@,%d3 <== NOT EXECUTED 5d856: 1028 0001 moveb %a0@(1),%d0 <== NOT EXECUTED 5d85a: 7218 moveq #24,%d1 <== NOT EXECUTED
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
5d85c: 4282 clrl %d2 <== NOT EXECUTED 5d85e: 1428 0008 moveb %a0@(8),%d2 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
5d862: 4285 clrl %d5 <== NOT EXECUTED 5d864: 1a28 0003 moveb %a0@(3),%d5 <== NOT EXECUTED 5d868: e3ab lsll %d1,%d3 <== NOT EXECUTED 5d86a: 4840 swap %d0 <== NOT EXECUTED 5d86c: 4240 clrw %d0 <== NOT EXECUTED
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
5d86e: 4281 clrl %d1 <== NOT EXECUTED 5d870: 1228 0009 moveb %a0@(9),%d1 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
5d874: 8680 orl %d0,%d3 <== NOT EXECUTED 5d876: 4280 clrl %d0 <== NOT EXECUTED 5d878: 1028 0002 moveb %a0@(2),%d0 <== NOT EXECUTED
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
5d87c: e18a lsll #8,%d2 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
5d87e: 8685 orl %d5,%d3 <== NOT EXECUTED 5d880: e188 lsll #8,%d0 <== NOT EXECUTED
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
5d882: 8481 orl %d1,%d2 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
5d884: 8680 orl %d0,%d3 <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
5d886: 0c82 0000 ffff cmpil #65535,%d2 <== NOT EXECUTED 5d88c: 6600 ff72 bnew 5d800 <rtems_rfs_dir_empty+0x12e> <== NOT EXECUTED
offset += elength;
}
if (empty)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
5d890: 486e fffc pea %fp@(-4) <== NOT EXECUTED 5d894: 2f06 movel %d6,%sp@- <== NOT EXECUTED 5d896: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5d898: 4eb9 0005 b35c jsr 5b35c <rtems_rfs_block_map_next_block> <== NOT EXECUTED
if (rc > 0)
5d89e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5d8a2: 4a80 tstl %d0 <== NOT EXECUTED 5d8a4: 6f00 fedc blew 5d782 <rtems_rfs_dir_empty+0xb0> <== NOT EXECUTED 5d8a8: 2a00 movel %d0,%d5 <== NOT EXECUTED
{
if (rc == ENXIO)
5d8aa: 7e06 moveq #6,%d7 <== NOT EXECUTED 5d8ac: be80 cmpl %d0,%d7 <== NOT EXECUTED 5d8ae: 56c0 sne %d0 <== NOT EXECUTED 5d8b0: 49c0 extbl %d0 <== NOT EXECUTED 5d8b2: ca80 andl %d0,%d5 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
5d8b4: 486e fff2 pea %fp@(-14) <== NOT EXECUTED 5d8b8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5d8ba: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
5d8c0: 4200 clrb %d0 <== NOT EXECUTED
if ((rc == 0) && !empty)
rc = ENOTEMPTY;
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
5d8c2: 2f06 movel %d6,%sp@- <== NOT EXECUTED 5d8c4: 1d40 fff2 moveb %d0,%fp@(-14) <== NOT EXECUTED 5d8c8: 2f0a movel %a2,%sp@- <== NOT EXECUTED
handle->bnum = 0;
5d8ca: 42ae fff4 clrl %fp@(-12) <== NOT EXECUTED
handle->buffer = NULL;
5d8ce: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED 5d8d2: 4eb9 0005 af84 jsr 5af84 <rtems_rfs_block_map_close> <== NOT EXECUTED
return rc;
5d8d8: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
}
5d8dc: 2005 movel %d5,%d0 <== NOT EXECUTED 5d8de: 4cee 3cfc ff80 moveml %fp@(-128),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5d8e4: 4e5e unlk %fp <== NOT EXECUTED 5d8e6: 4e75 rts <== NOT EXECUTED
/*
* Ignore the current (.) and parent (..) entries. Anything else means
* the directory is not empty.
*/
if (((elength != (RTEMS_RFS_DIR_ENTRY_SIZE + 1)) ||
5d8e8: 4280 clrl %d0 <== NOT EXECUTED 5d8ea: 1028 000a moveb %a0@(10),%d0 <== NOT EXECUTED 5d8ee: 722e moveq #46,%d1 <== NOT EXECUTED 5d8f0: b280 cmpl %d0,%d1 <== NOT EXECUTED 5d8f2: 6700 ff54 beqw 5d848 <rtems_rfs_dir_empty+0x176> <== NOT EXECUTED 5d8f6: 2a0d movel %a5,%d5 <== NOT EXECUTED
break;
}
}
}
if ((rc == 0) && !empty)
5d8f8: 66ba bnes 5d8b4 <rtems_rfs_dir_empty+0x1e2> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
5d8fa: 486e fff2 pea %fp@(-14) <== NOT EXECUTED
rc = ENOTEMPTY;
5d8fe: 1a3c 005a moveb #90,%d5 <== NOT EXECUTED 5d902: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5d904: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
5d90a: 4200 clrb %d0 <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
5d90c: 2f06 movel %d6,%sp@- <== NOT EXECUTED 5d90e: 1d40 fff2 moveb %d0,%fp@(-14) <== NOT EXECUTED 5d912: 2f0a movel %a2,%sp@- <== NOT EXECUTED
handle->bnum = 0;
5d914: 42ae fff4 clrl %fp@(-12) <== NOT EXECUTED
handle->buffer = NULL;
5d918: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED 5d91c: 4eb9 0005 af84 jsr 5af84 <rtems_rfs_block_map_close> <== NOT EXECUTED
return rc;
5d922: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5d926: 60b4 bras 5d8dc <rtems_rfs_dir_empty+0x20a> <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_EMPTY))
5d928: 42a7 clrl %sp@- <== NOT EXECUTED 5d92a: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 5d92e: 4e93 jsr %a3@ <== NOT EXECUTED 5d930: 508f addql #8,%sp <== NOT EXECUTED 5d932: 4a00 tstb %d0 <== NOT EXECUTED 5d934: 6700 ff5a beqw 5d890 <rtems_rfs_dir_empty+0x1be> <== NOT EXECUTED
printf ("rtems-rfs: dir-empty: "
5d938: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5d93a: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 5d93e: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5d940: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5d942: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 5d946: 4879 0007 41b8 pea 741b8 <CSWTCH.1+0xbdc> <== NOT EXECUTED 5d94c: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5d952: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
offset += elength;
}
if (empty)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
5d956: 486e fffc pea %fp@(-4) <== NOT EXECUTED 5d95a: 2f06 movel %d6,%sp@- <== NOT EXECUTED 5d95c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5d95e: 4eb9 0005 b35c jsr 5b35c <rtems_rfs_block_map_next_block> <== NOT EXECUTED
if (rc > 0)
5d964: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5d968: 4a80 tstl %d0 <== NOT EXECUTED 5d96a: 6f00 fe16 blew 5d782 <rtems_rfs_dir_empty+0xb0> <== NOT EXECUTED 5d96e: 6000 ff38 braw 5d8a8 <rtems_rfs_dir_empty+0x1d6> <== NOT EXECUTED
return rc;
rc = rtems_rfs_block_map_seek (fs, &map, 0, &block);
if (rc > 0)
{
rtems_rfs_block_map_close (fs, &map);
5d972: 2f06 movel %d6,%sp@- <== NOT EXECUTED 5d974: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5d976: 4eb9 0005 af84 jsr 5af84 <rtems_rfs_block_map_close> <== NOT EXECUTED
return rc;
5d97c: 508f addql #8,%sp <== NOT EXECUTED
rc = ENOTEMPTY;
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
5d97e: 2005 movel %d5,%d0 <== NOT EXECUTED 5d980: 4cee 3cfc ff80 moveml %fp@(-128),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5d986: 4e5e unlk %fp <== NOT EXECUTED 5d988: 4e75 rts <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
5d98a: 486e fff2 pea %fp@(-14) <== NOT EXECUTED 5d98e: 2a00 movel %d0,%d5 <== NOT EXECUTED 5d990: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5d992: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
5d998: 4200 clrb %d0 <== NOT EXECUTED
if ((rc == 0) && !empty)
rc = ENOTEMPTY;
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
5d99a: 2f06 movel %d6,%sp@- <== NOT EXECUTED 5d99c: 1d40 fff2 moveb %d0,%fp@(-14) <== NOT EXECUTED 5d9a0: 2f0a movel %a2,%sp@- <== NOT EXECUTED
handle->bnum = 0;
5d9a2: 42ae fff4 clrl %fp@(-12) <== NOT EXECUTED
handle->buffer = NULL;
5d9a6: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED 5d9aa: 4eb9 0005 af84 jsr 5af84 <rtems_rfs_block_map_close> <== NOT EXECUTED
return rc;
5d9b0: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5d9b4: 6000 ff26 braw 5d8dc <rtems_rfs_dir_empty+0x20a> <== NOT EXECUTED
0006224c <rtems_rfs_dir_hash>:
} else { /* need to read the key one byte at a time */
const uint8_t *k = (const uint8_t *)key;
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
while (length > 12)
6224c: 720c moveq #12,%d1
*/
#define initval (20010928)
uint32_t
rtems_rfs_dir_hash (const void *key, size_t length)
{
6224e: 4e56 ffe4 linkw %fp,#-28 62252: 226e 000c moveal %fp@(12),%a1
uint32_t a,b,c; /* internal state */
union { const void *ptr; size_t i; } u; /* needed for Mac Powerbook G4 */
/* Set up the internal state */
a = b = c = 0xdeadbeef + ((uint32_t)length) + initval;
62256: 2009 movel %a1,%d0 62258: 0680 dfdf 169f addil #-539027809,%d0
*/
#define initval (20010928)
uint32_t
rtems_rfs_dir_hash (const void *key, size_t length)
{
6225e: 48d7 04fc moveml %d2-%d7/%a2,%sp@ 62262: 206e 0008 moveal %fp@(8),%a0
} else { /* need to read the key one byte at a time */
const uint8_t *k = (const uint8_t *)key;
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
while (length > 12)
62266: b289 cmpl %a1,%d1 62268: 6400 0224 bccw 6248e <rtems_rfs_dir_hash+0x242> 6226c: 2200 movel %d0,%d1 6226e: 2600 movel %d0,%d3
b += k[4];
b += ((uint32_t)k[5])<<8;
b += ((uint32_t)k[6])<<16;
b += ((uint32_t)k[7])<<24;
c += k[8];
c += ((uint32_t)k[9])<<8;
62270: 4284 clrl %d4 62272: 1828 0009 moveb %a0@(9),%d4
a += ((uint32_t)k[3])<<24;
b += k[4];
b += ((uint32_t)k[5])<<8;
b += ((uint32_t)k[6])<<16;
b += ((uint32_t)k[7])<<24;
c += k[8];
62276: 4282 clrl %d2 62278: 1428 0008 moveb %a0@(8),%d2
c += ((uint32_t)k[9])<<8;
c += ((uint32_t)k[10])<<16;
6227c: 4287 clrl %d7
a += ((uint32_t)k[3])<<24;
b += k[4];
b += ((uint32_t)k[5])<<8;
b += ((uint32_t)k[6])<<16;
b += ((uint32_t)k[7])<<24;
c += k[8];
6227e: d082 addl %d2,%d0
c += ((uint32_t)k[9])<<8;
c += ((uint32_t)k[10])<<16;
62280: 1e28 000a moveb %a0@(10),%d7
c += ((uint32_t)k[11])<<24;
62284: 4285 clrl %d5 62286: 1a28 000b moveb %a0@(11),%d5
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
while (length > 12)
{
a += k[0];
a += ((uint32_t)k[1])<<8;
6228a: 1428 0001 moveb %a0@(1),%d2
a += ((uint32_t)k[2])<<16;
6228e: 4286 clrl %d6 62290: 1c28 0002 moveb %a0@(2),%d6
c += k[8];
c += ((uint32_t)k[9])<<8;
c += ((uint32_t)k[10])<<16;
c += ((uint32_t)k[11])<<24;
mix(a,b,c);
length -= 12;
62294: 43e9 fff4 lea %a1@(-12),%a1
b += k[4];
b += ((uint32_t)k[5])<<8;
b += ((uint32_t)k[6])<<16;
b += ((uint32_t)k[7])<<24;
c += k[8];
c += ((uint32_t)k[9])<<8;
62298: e18c lsll #8,%d4
c += ((uint32_t)k[10])<<16;
6229a: 4847 swap %d7 6229c: 4247 clrw %d7
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
while (length > 12)
{
a += k[0];
a += ((uint32_t)k[1])<<8;
6229e: e18a lsll #8,%d2
b += k[4];
b += ((uint32_t)k[5])<<8;
b += ((uint32_t)k[6])<<16;
b += ((uint32_t)k[7])<<24;
c += k[8];
c += ((uint32_t)k[9])<<8;
622a0: d880 addl %d0,%d4
const uint8_t *k = (const uint8_t *)key;
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
while (length > 12)
{
a += k[0];
622a2: 4280 clrl %d0 622a4: 1010 moveb %a0@,%d0
b += ((uint32_t)k[5])<<8;
b += ((uint32_t)k[6])<<16;
b += ((uint32_t)k[7])<<24;
c += k[8];
c += ((uint32_t)k[9])<<8;
c += ((uint32_t)k[10])<<16;
622a6: d887 addl %d7,%d4
const uint8_t *k = (const uint8_t *)key;
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
while (length > 12)
{
a += k[0];
622a8: 2440 moveal %d0,%a2
b += ((uint32_t)k[6])<<16;
b += ((uint32_t)k[7])<<24;
c += k[8];
c += ((uint32_t)k[9])<<8;
c += ((uint32_t)k[10])<<16;
c += ((uint32_t)k[11])<<24;
622aa: 7018 moveq #24,%d0
const uint8_t *k = (const uint8_t *)key;
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
while (length > 12)
{
a += k[0];
622ac: d68a addl %a2,%d3
a += ((uint32_t)k[1])<<8;
622ae: d483 addl %d3,%d2
a += ((uint32_t)k[2])<<16;
a += ((uint32_t)k[3])<<24;
622b0: 7618 moveq #24,%d3
b += k[4];
b += ((uint32_t)k[5])<<8;
622b2: 4287 clrl %d7 622b4: 1e28 0005 moveb %a0@(5),%d7
b += ((uint32_t)k[6])<<16;
b += ((uint32_t)k[7])<<24;
c += k[8];
c += ((uint32_t)k[9])<<8;
c += ((uint32_t)k[10])<<16;
c += ((uint32_t)k[11])<<24;
622b8: e1ad lsll %d0,%d5
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
while (length > 12)
{
a += k[0];
a += ((uint32_t)k[1])<<8;
a += ((uint32_t)k[2])<<16;
622ba: 4846 swap %d6 622bc: 4246 clrw %d6
a += ((uint32_t)k[3])<<24;
b += k[4];
b += ((uint32_t)k[5])<<8;
622be: e18f lsll #8,%d7
b += ((uint32_t)k[6])<<16;
b += ((uint32_t)k[7])<<24;
c += k[8];
c += ((uint32_t)k[9])<<8;
c += ((uint32_t)k[10])<<16;
c += ((uint32_t)k[11])<<24;
622c0: d885 addl %d5,%d4
mix(a,b,c);
622c2: 2004 movel %d4,%d0 622c4: 7a1c moveq #28,%d5 622c6: eaa8 lsrl %d5,%d0
while (length > 12)
{
a += k[0];
a += ((uint32_t)k[1])<<8;
a += ((uint32_t)k[2])<<16;
a += ((uint32_t)k[3])<<24;
622c8: 4285 clrl %d5 622ca: 1a28 0003 moveb %a0@(3),%d5
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
while (length > 12)
{
a += k[0];
a += ((uint32_t)k[1])<<8;
a += ((uint32_t)k[2])<<16;
622ce: d486 addl %d6,%d2
b += ((uint32_t)k[7])<<24;
c += k[8];
c += ((uint32_t)k[9])<<8;
c += ((uint32_t)k[10])<<16;
c += ((uint32_t)k[11])<<24;
mix(a,b,c);
622d0: 2c04 movel %d4,%d6
while (length > 12)
{
a += k[0];
a += ((uint32_t)k[1])<<8;
a += ((uint32_t)k[2])<<16;
a += ((uint32_t)k[3])<<24;
622d2: e7ad lsll %d3,%d5
b += k[4];
622d4: 4283 clrl %d3 622d6: 1628 0004 moveb %a0@(4),%d3
while (length > 12)
{
a += k[0];
a += ((uint32_t)k[1])<<8;
a += ((uint32_t)k[2])<<16;
a += ((uint32_t)k[3])<<24;
622da: d485 addl %d5,%d2
b += k[4];
622dc: d283 addl %d3,%d1
b += ((uint32_t)k[7])<<24;
c += k[8];
c += ((uint32_t)k[9])<<8;
c += ((uint32_t)k[10])<<16;
c += ((uint32_t)k[11])<<24;
mix(a,b,c);
622de: 9484 subl %d4,%d2
a += ((uint32_t)k[2])<<16;
a += ((uint32_t)k[3])<<24;
b += k[4];
b += ((uint32_t)k[5])<<8;
b += ((uint32_t)k[6])<<16;
b += ((uint32_t)k[7])<<24;
622e0: 1628 0007 moveb %a0@(7),%d3
a += ((uint32_t)k[1])<<8;
a += ((uint32_t)k[2])<<16;
a += ((uint32_t)k[3])<<24;
b += k[4];
b += ((uint32_t)k[5])<<8;
b += ((uint32_t)k[6])<<16;
622e4: 4285 clrl %d5 622e6: 1a28 0006 moveb %a0@(6),%d5
a += k[0];
a += ((uint32_t)k[1])<<8;
a += ((uint32_t)k[2])<<16;
a += ((uint32_t)k[3])<<24;
b += k[4];
b += ((uint32_t)k[5])<<8;
622ea: de81 addl %d1,%d7
b += ((uint32_t)k[7])<<24;
c += k[8];
c += ((uint32_t)k[9])<<8;
c += ((uint32_t)k[10])<<16;
c += ((uint32_t)k[11])<<24;
mix(a,b,c);
622ec: 721a moveq #26,%d1
length -= 12;
k += 12;
622ee: 41e8 000c lea %a0@(12),%a0
b += ((uint32_t)k[7])<<24;
c += k[8];
c += ((uint32_t)k[9])<<8;
c += ((uint32_t)k[10])<<16;
c += ((uint32_t)k[11])<<24;
mix(a,b,c);
622f2: e98e lsll #4,%d6
a += ((uint32_t)k[1])<<8;
a += ((uint32_t)k[2])<<16;
a += ((uint32_t)k[3])<<24;
b += k[4];
b += ((uint32_t)k[5])<<8;
b += ((uint32_t)k[6])<<16;
622f4: 4845 swap %d5 622f6: 4245 clrw %d5
b += ((uint32_t)k[7])<<24;
c += k[8];
c += ((uint32_t)k[9])<<8;
c += ((uint32_t)k[10])<<16;
c += ((uint32_t)k[11])<<24;
mix(a,b,c);
622f8: 8c80 orl %d0,%d6
a += ((uint32_t)k[2])<<16;
a += ((uint32_t)k[3])<<24;
b += k[4];
b += ((uint32_t)k[5])<<8;
b += ((uint32_t)k[6])<<16;
b += ((uint32_t)k[7])<<24;
622fa: 7018 moveq #24,%d0
a += ((uint32_t)k[1])<<8;
a += ((uint32_t)k[2])<<16;
a += ((uint32_t)k[3])<<24;
b += k[4];
b += ((uint32_t)k[5])<<8;
b += ((uint32_t)k[6])<<16;
622fc: da87 addl %d7,%d5
b += ((uint32_t)k[7])<<24;
c += k[8];
c += ((uint32_t)k[9])<<8;
c += ((uint32_t)k[10])<<16;
c += ((uint32_t)k[11])<<24;
mix(a,b,c);
622fe: bd82 eorl %d6,%d2
a += ((uint32_t)k[2])<<16;
a += ((uint32_t)k[3])<<24;
b += k[4];
b += ((uint32_t)k[5])<<8;
b += ((uint32_t)k[6])<<16;
b += ((uint32_t)k[7])<<24;
62300: e1ab lsll %d0,%d3
c += k[8];
c += ((uint32_t)k[9])<<8;
c += ((uint32_t)k[10])<<16;
c += ((uint32_t)k[11])<<24;
mix(a,b,c);
62302: 2002 movel %d2,%d0 62304: 2c02 movel %d2,%d6 62306: e2ae lsrl %d1,%d6
a += ((uint32_t)k[2])<<16;
a += ((uint32_t)k[3])<<24;
b += k[4];
b += ((uint32_t)k[5])<<8;
b += ((uint32_t)k[6])<<16;
b += ((uint32_t)k[7])<<24;
62308: d685 addl %d5,%d3
c += k[8];
c += ((uint32_t)k[9])<<8;
c += ((uint32_t)k[10])<<16;
c += ((uint32_t)k[11])<<24;
mix(a,b,c);
6230a: 2203 movel %d3,%d1 6230c: 9282 subl %d2,%d1 6230e: d883 addl %d3,%d4 62310: 7a18 moveq #24,%d5 62312: d484 addl %d4,%d2 62314: ed88 lsll #6,%d0 62316: 8086 orl %d6,%d0 62318: b380 eorl %d1,%d0 6231a: 2200 movel %d0,%d1 6231c: 2600 movel %d0,%d3 6231e: eaab lsrl %d5,%d3 62320: 9880 subl %d0,%d4 62322: d082 addl %d2,%d0 62324: 1a3c 000d moveb #13,%d5 62328: e189 lsll #8,%d1 6232a: 8283 orl %d3,%d1 6232c: b981 eorl %d4,%d1 6232e: 2601 movel %d1,%d3 62330: 9481 subl %d1,%d2 62332: 4843 swap %d3 62334: 2801 movel %d1,%d4 62336: d880 addl %d0,%d4 62338: b583 eorl %d2,%d3 6233a: 7413 moveq #19,%d2 6233c: 2203 movel %d3,%d1 6233e: 9083 subl %d3,%d0 62340: e5a9 lsll %d2,%d1 62342: 2403 movel %d3,%d2 62344: eaaa lsrl %d5,%d2 62346: 1a3c 001c moveb #28,%d5 6234a: d684 addl %d4,%d3 6234c: 8282 orl %d2,%d1 6234e: b181 eorl %d0,%d1 62350: 2001 movel %d1,%d0 62352: 2401 movel %d1,%d2 62354: eaaa lsrl %d5,%d2 62356: 9881 subl %d1,%d4 62358: d283 addl %d3,%d1 6235a: e988 lsll #4,%d0 6235c: 8082 orl %d2,%d0
} else { /* need to read the key one byte at a time */
const uint8_t *k = (const uint8_t *)key;
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
while (length > 12)
6235e: 740c moveq #12,%d2
b += ((uint32_t)k[7])<<24;
c += k[8];
c += ((uint32_t)k[9])<<8;
c += ((uint32_t)k[10])<<16;
c += ((uint32_t)k[11])<<24;
mix(a,b,c);
62360: b980 eorl %d4,%d0
} else { /* need to read the key one byte at a time */
const uint8_t *k = (const uint8_t *)key;
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
while (length > 12)
62362: b489 cmpl %a1,%d2 62364: 6500 ff0a bcsw 62270 <rtems_rfs_dir_hash+0x24>
length -= 12;
k += 12;
}
/*-------------------------------- last block: affect all 32 bits of (c) */
switch(length) /* all the case statements fall through */
62368: 780c moveq #12,%d4 6236a: b889 cmpl %a1,%d4 6236c: 6500 0118 bcsw 62486 <rtems_rfs_dir_hash+0x23a> 62370: 327b 9a06 moveaw %pc@(62378 <rtems_rfs_dir_hash+0x12c>,%a1:l:2),%a1 62374: 4efb 9802 jmp %pc@(62378 <rtems_rfs_dir_hash+0x12c>,%a1:l)
62378: 010e .short 0x010e <== NOT EXECUTED 6237a: 0090 0086 007a oril #8781946,%d0 <== NOT EXECUTED 62380: 006e .short 0x006e <== NOT EXECUTED 62382: 0066 .short 0x0066 <== NOT EXECUTED 62384: 005c .short 0x005c <== NOT EXECUTED 62386: 0050 .short 0x0050 <== NOT EXECUTED 62388: 0044 .short 0x0044 <== NOT EXECUTED 6238a: 003c .short 0x003c <== NOT EXECUTED 6238c: 0032 .short 0x0032 <== NOT EXECUTED 6238e: 0026 .short 0x0026 <== NOT EXECUTED 62390: 001a .short 0x001a <== NOT EXECUTED
{
case 12: c+=((uint32_t)k[11])<<24;
62392: 4282 clrl %d2 62394: 1428 000b moveb %a0@(11),%d2 62398: 7a18 moveq #24,%d5 6239a: ebaa lsll %d5,%d2 6239c: d082 addl %d2,%d0
case 11: c+=((uint32_t)k[10])<<16;
6239e: 4282 clrl %d2 623a0: 1428 000a moveb %a0@(10),%d2 623a4: 4842 swap %d2 623a6: 4242 clrw %d2 623a8: d082 addl %d2,%d0
case 10: c+=((uint32_t)k[9])<<8;
623aa: 4282 clrl %d2 623ac: 1428 0009 moveb %a0@(9),%d2 623b0: e18a lsll #8,%d2 623b2: d082 addl %d2,%d0
case 9 : c+=k[8];
623b4: 4282 clrl %d2 623b6: 1428 0008 moveb %a0@(8),%d2 623ba: d082 addl %d2,%d0
case 8 : b+=((uint32_t)k[7])<<24;
623bc: 4282 clrl %d2 623be: 1428 0007 moveb %a0@(7),%d2 623c2: 7818 moveq #24,%d4 623c4: e9aa lsll %d4,%d2 623c6: d282 addl %d2,%d1
case 7 : b+=((uint32_t)k[6])<<16;
623c8: 4282 clrl %d2 623ca: 1428 0006 moveb %a0@(6),%d2 623ce: 4842 swap %d2 623d0: 4242 clrw %d2 623d2: d282 addl %d2,%d1
case 6 : b+=((uint32_t)k[5])<<8;
623d4: 4282 clrl %d2 623d6: 1428 0005 moveb %a0@(5),%d2 623da: e18a lsll #8,%d2 623dc: d282 addl %d2,%d1
case 5 : b+=k[4];
623de: 4282 clrl %d2 623e0: 1428 0004 moveb %a0@(4),%d2 623e4: d282 addl %d2,%d1
case 4 : a+=((uint32_t)k[3])<<24;
623e6: 4282 clrl %d2 623e8: 1428 0003 moveb %a0@(3),%d2 623ec: 7a18 moveq #24,%d5 623ee: ebaa lsll %d5,%d2 623f0: d682 addl %d2,%d3
case 3 : a+=((uint32_t)k[2])<<16;
623f2: 4282 clrl %d2 623f4: 1428 0002 moveb %a0@(2),%d2 623f8: 4842 swap %d2 623fa: 4242 clrw %d2 623fc: d682 addl %d2,%d3
case 2 : a+=((uint32_t)k[1])<<8;
623fe: 4282 clrl %d2 62400: 1428 0001 moveb %a0@(1),%d2 62404: e18a lsll #8,%d2 62406: d682 addl %d2,%d3
break;
case 0 : return c;
}
}
final(a,b,c);
62408: 2801 movel %d1,%d4 6240a: 7412 moveq #18,%d2 6240c: e4ac lsrl %d2,%d4 6240e: 2a01 movel %d1,%d5 62410: 143c 000e moveb #14,%d2 62414: e5ad lsll %d2,%d5 62416: 2400 movel %d0,%d2
case 6 : b+=((uint32_t)k[5])<<8;
case 5 : b+=k[4];
case 4 : a+=((uint32_t)k[3])<<24;
case 3 : a+=((uint32_t)k[2])<<16;
case 2 : a+=((uint32_t)k[1])<<8;
case 1 : a+=k[0];
62418: 4280 clrl %d0 6241a: 1010 moveb %a0@,%d0 6241c: d680 addl %d0,%d3
break;
case 0 : return c;
}
}
final(a,b,c);
6241e: 8885 orl %d5,%d4 62420: b382 eorl %d1,%d2 62422: 7a15 moveq #21,%d5 62424: 9484 subl %d4,%d2 62426: 2802 movel %d2,%d4 62428: eaac lsrl %d5,%d4 6242a: 2002 movel %d2,%d0 6242c: 1a3c 000b moveb #11,%d5 62430: eba8 lsll %d5,%d0 62432: b583 eorl %d2,%d3 62434: 1a3c 0019 moveb #25,%d5 62438: 8084 orl %d4,%d0 6243a: 9680 subl %d0,%d3 6243c: 2003 movel %d3,%d0 6243e: 2803 movel %d3,%d4 62440: ee8c lsrl #7,%d4 62442: eba8 lsll %d5,%d0 62444: b781 eorl %d3,%d1 62446: 8084 orl %d4,%d0 62448: 9280 subl %d0,%d1 6244a: 2001 movel %d1,%d0 6244c: 4840 swap %d0 6244e: b382 eorl %d1,%d2 62450: 9480 subl %d0,%d2 62452: 701c moveq #28,%d0 62454: 2802 movel %d2,%d4 62456: e0ac lsrl %d0,%d4 62458: 2002 movel %d2,%d0 6245a: e988 lsll #4,%d0 6245c: b583 eorl %d2,%d3 6245e: 8084 orl %d4,%d0 62460: 7812 moveq #18,%d4 62462: 9680 subl %d0,%d3 62464: 2a03 movel %d3,%d5 62466: e8ad lsrl %d4,%d5 62468: 2803 movel %d3,%d4 6246a: 700e moveq #14,%d0 6246c: e1ac lsll %d0,%d4 6246e: 2003 movel %d3,%d0 62470: 8885 orl %d5,%d4 62472: b380 eorl %d1,%d0 62474: 9084 subl %d4,%d0 62476: 2200 movel %d0,%d1 62478: 7818 moveq #24,%d4 6247a: 2600 movel %d0,%d3 6247c: e08b lsrl #8,%d3 6247e: e9a9 lsll %d4,%d1 62480: b580 eorl %d2,%d0 62482: 8283 orl %d3,%d1 62484: 9081 subl %d1,%d0
return c; }
62486: 4cd7 04fc moveml %sp@,%d2-%d7/%a2 6248a: 4e5e unlk %fp 6248c: 4e75 rts
{
uint32_t a,b,c; /* internal state */
union { const void *ptr; size_t i; } u; /* needed for Mac Powerbook G4 */
/* Set up the internal state */
a = b = c = 0xdeadbeef + ((uint32_t)length) + initval;
6248e: 2200 movel %d0,%d1 62490: 2600 movel %d0,%d3 62492: 6000 fed4 braw 62368 <rtems_rfs_dir_hash+0x11c>
...
0005c46c <rtems_rfs_dir_lookup_ino>:
rtems_rfs_inode_handle* inode,
const char* name,
int length,
rtems_rfs_ino* ino,
uint32_t* offset)
{
5c46c: 4e56 ff7c linkw %fp,#-132 5c470: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
rtems_rfs_block_map map;
rtems_rfs_buffer_handle entries;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
5c474: 2f3c 0400 0000 movel #67108864,%sp@-
rtems_rfs_inode_handle* inode,
const char* name,
int length,
rtems_rfs_ino* ino,
uint32_t* offset)
{
5c47a: 246e 0008 moveal %fp@(8),%a2
rtems_rfs_block_map map;
rtems_rfs_buffer_handle entries;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
5c47e: 49f9 0005 37c0 lea 537c0 <rtems_rfs_trace>,%a4 5c484: 42a7 clrl %sp@-
rtems_rfs_inode_handle* inode,
const char* name,
int length,
rtems_rfs_ino* ino,
uint32_t* offset)
{
5c486: 2c2e 0014 movel %fp@(20),%d6 5c48a: 266e 0018 moveal %fp@(24),%a3
rtems_rfs_block_map map;
rtems_rfs_buffer_handle entries;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
5c48e: 4e94 jsr %a4@ 5c490: 508f addql #8,%sp 5c492: 4a00 tstb %d0
5c494: 6646 bnes 5c4dc <rtems_rfs_dir_lookup_ino+0x70> <== NEVER TAKEN
}
*ino = RTEMS_RFS_EMPTY_INO;
*offset = 0;
rc = rtems_rfs_block_map_open (fs, inode, &map);
5c496: 260e movel %fp,%d3 5c498: 0683 ffff ffa8 addil #-88,%d3 5c49e: 2f03 movel %d3,%sp@-
printf ("%c", name[c]);
printf (", len=%d\n", length);
}
*ino = RTEMS_RFS_EMPTY_INO;
*offset = 0;
5c4a0: 206e 001c moveal %fp@(28),%a0
for (c = 0; c < length; c++)
printf ("%c", name[c]);
printf (", len=%d\n", length);
}
*ino = RTEMS_RFS_EMPTY_INO;
5c4a4: 4293 clrl %a3@
*offset = 0;
rc = rtems_rfs_block_map_open (fs, inode, &map);
5c4a6: 2f2e 000c movel %fp@(12),%sp@-
printf ("%c", name[c]);
printf (", len=%d\n", length);
}
*ino = RTEMS_RFS_EMPTY_INO;
*offset = 0;
5c4aa: 4290 clrl %a0@
rc = rtems_rfs_block_map_open (fs, inode, &map);
5c4ac: 2f0a movel %a2,%sp@- 5c4ae: 4eb9 0005 adf2 jsr 5adf2 <rtems_rfs_block_map_open>
if (rc > 0)
5c4b4: 4fef 000c lea %sp@(12),%sp
}
*ino = RTEMS_RFS_EMPTY_INO;
*offset = 0;
rc = rtems_rfs_block_map_open (fs, inode, &map);
5c4b8: 2400 movel %d0,%d2
if (rc > 0)
5c4ba: 6f00 0092 blew 5c54e <rtems_rfs_dir_lookup_ino+0xe2>
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
5c4be: 2f3c 0400 0000 movel #67108864,%sp@- <== NOT EXECUTED 5c4c4: 42a7 clrl %sp@- <== NOT EXECUTED 5c4c6: 4e94 jsr %a4@ <== NOT EXECUTED 5c4c8: 508f addql #8,%sp <== NOT EXECUTED 5c4ca: 4a00 tstb %d0 <== NOT EXECUTED 5c4cc: 6600 0106 bnew 5c5d4 <rtems_rfs_dir_lookup_ino+0x168> <== NOT EXECUTED
}
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
5c4d0: 2002 movel %d2,%d0 <== NOT EXECUTED 5c4d2: 4cee 3cfc ff7c moveml %fp@(-132),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5c4d8: 4e5e unlk %fp <== NOT EXECUTED 5c4da: 4e75 rts <== NOT EXECUTED
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
{
int c;
printf ("rtems-rfs: dir-lookup-ino: lookup ino: root=%" PRId32 ", path=",
5c4dc: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 5c4e0: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 5c4e4: 283c 0006 2fd4 movel #405460,%d4 <== NOT EXECUTED 5c4ea: 4879 0007 3b59 pea 73b59 <CSWTCH.1+0x57d> <== NOT EXECUTED 5c4f0: 2044 moveal %d4,%a0 <== NOT EXECUTED 5c4f2: 4e90 jsr %a0@ <== NOT EXECUTED
inode->ino);
for (c = 0; c < length; c++)
5c4f4: 508f addql #8,%sp <== NOT EXECUTED 5c4f6: 4a86 tstl %d6 <== NOT EXECUTED 5c4f8: 6f1e bles 5c518 <rtems_rfs_dir_lookup_ino+0xac> <== NOT EXECUTED 5c4fa: 2a6e 0010 moveal %fp@(16),%a5 <== NOT EXECUTED 5c4fe: 4282 clrl %d2 <== NOT EXECUTED 5c500: 263c 0006 3014 movel #405524,%d3 <== NOT EXECUTED
printf ("%c", name[c]);
5c506: 2043 moveal %d3,%a0 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
{
int c;
printf ("rtems-rfs: dir-lookup-ino: lookup ino: root=%" PRId32 ", path=",
inode->ino);
for (c = 0; c < length; c++)
5c508: 5282 addql #1,%d2 <== NOT EXECUTED
printf ("%c", name[c]);
5c50a: 101d moveb %a5@+,%d0 <== NOT EXECUTED 5c50c: 49c0 extbl %d0 <== NOT EXECUTED 5c50e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5c510: 4e90 jsr %a0@ <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
{
int c;
printf ("rtems-rfs: dir-lookup-ino: lookup ino: root=%" PRId32 ", path=",
inode->ino);
for (c = 0; c < length; c++)
5c512: 588f addql #4,%sp <== NOT EXECUTED 5c514: bc82 cmpl %d2,%d6 <== NOT EXECUTED 5c516: 66ee bnes 5c506 <rtems_rfs_dir_lookup_ino+0x9a> <== NOT EXECUTED
printf ("%c", name[c]);
printf (", len=%d\n", length);
5c518: 2f06 movel %d6,%sp@- <== NOT EXECUTED 5c51a: 4879 0007 3b90 pea 73b90 <CSWTCH.1+0x5b4> <== NOT EXECUTED 5c520: 2044 moveal %d4,%a0 <== NOT EXECUTED
}
*ino = RTEMS_RFS_EMPTY_INO;
*offset = 0;
rc = rtems_rfs_block_map_open (fs, inode, &map);
5c522: 260e movel %fp,%d3 <== NOT EXECUTED 5c524: 0683 ffff ffa8 addil #-88,%d3 <== NOT EXECUTED
int c;
printf ("rtems-rfs: dir-lookup-ino: lookup ino: root=%" PRId32 ", path=",
inode->ino);
for (c = 0; c < length; c++)
printf ("%c", name[c]);
printf (", len=%d\n", length);
5c52a: 4e90 jsr %a0@ <== NOT EXECUTED 5c52c: 508f addql #8,%sp <== NOT EXECUTED
}
*ino = RTEMS_RFS_EMPTY_INO;
*offset = 0;
rc = rtems_rfs_block_map_open (fs, inode, &map);
5c52e: 2f03 movel %d3,%sp@- <== NOT EXECUTED
printf ("%c", name[c]);
printf (", len=%d\n", length);
}
*ino = RTEMS_RFS_EMPTY_INO;
*offset = 0;
5c530: 206e 001c moveal %fp@(28),%a0 <== NOT EXECUTED
for (c = 0; c < length; c++)
printf ("%c", name[c]);
printf (", len=%d\n", length);
}
*ino = RTEMS_RFS_EMPTY_INO;
5c534: 4293 clrl %a3@ <== NOT EXECUTED
*offset = 0;
rc = rtems_rfs_block_map_open (fs, inode, &map);
5c536: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
printf ("%c", name[c]);
printf (", len=%d\n", length);
}
*ino = RTEMS_RFS_EMPTY_INO;
*offset = 0;
5c53a: 4290 clrl %a0@ <== NOT EXECUTED
rc = rtems_rfs_block_map_open (fs, inode, &map);
5c53c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5c53e: 4eb9 0005 adf2 jsr 5adf2 <rtems_rfs_block_map_open> <== NOT EXECUTED
if (rc > 0)
5c544: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
}
*ino = RTEMS_RFS_EMPTY_INO;
*offset = 0;
rc = rtems_rfs_block_map_open (fs, inode, &map);
5c548: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
5c54a: 6e00 ff72 bgtw 5c4be <rtems_rfs_dir_lookup_ino+0x52> <== NOT EXECUTED
uint32_t hash;
/*
* Calculate the hash of the look up string.
*/
hash = rtems_rfs_dir_hash (name, length);
5c54e: 2f06 movel %d6,%sp@- 5c550: 2f2e 0010 movel %fp@(16),%sp@-
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
5c554: 4200 clrb %d0
handle->bnum = 0;
5c556: 42ae fff4 clrl %fp@(-12)
handle->buffer = NULL;
5c55a: 42ae fff8 clrl %fp@(-8)
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
5c55e: 1d40 fff2 moveb %d0,%fp@(-14) 5c562: 4eb9 0006 224c jsr 6224c <rtems_rfs_dir_hash>
/*
* Locate the first block. The map points to the start after open so just
* seek 0. If an error the block will be 0.
*/
rc = rtems_rfs_block_map_seek (fs, &map, 0, &block);
5c568: 486e fffc pea %fp@(-4)
uint32_t hash;
/*
* Calculate the hash of the look up string.
*/
hash = rtems_rfs_dir_hash (name, length);
5c56c: 2a00 movel %d0,%d5
/*
* Locate the first block. The map points to the start after open so just
* seek 0. If an error the block will be 0.
*/
rc = rtems_rfs_block_map_seek (fs, &map, 0, &block);
5c56e: 42a7 clrl %sp@- 5c570: 42a7 clrl %sp@- 5c572: 2f03 movel %d3,%sp@- 5c574: 2f0a movel %a2,%sp@- 5c576: 4eb9 0005 b2de jsr 5b2de <rtems_rfs_block_map_seek>
if (rc > 0)
5c57c: 4fef 001c lea %sp@(28),%sp
/*
* Locate the first block. The map points to the start after open so just
* seek 0. If an error the block will be 0.
*/
rc = rtems_rfs_block_map_seek (fs, &map, 0, &block);
5c580: 2400 movel %d0,%d2
if (rc > 0)
5c582: 6f00 025c blew 5c7e0 <rtems_rfs_dir_lookup_ino+0x374>
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
5c586: 2f3c 0400 0000 movel #67108864,%sp@- 5c58c: 42a7 clrl %sp@- 5c58e: 4e94 jsr %a4@ 5c590: 508f addql #8,%sp 5c592: 4a00 tstb %d0 5c594: 6600 030a bnew 5c8a0 <rtems_rfs_dir_lookup_ino+0x434>
printf ("rtems-rfs: dir-lookup-ino: block map find failed: %d: %s\n",
rc, strerror (rc));
if (rc == ENXIO)
5c598: 7206 moveq #6,%d1 5c59a: b282 cmpl %d2,%d1 5c59c: 6700 02ca beqw 5c868 <rtems_rfs_dir_lookup_ino+0x3fc>
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
5c5a0: 486e fff2 pea %fp@(-14) 5c5a4: 2f0a movel %a2,%sp@- 5c5a6: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release>
handle->dirty = false;
5c5ac: 4200 clrb %d0
rtems_rfs_inode_ino (inode), rc, strerror (rc));
}
}
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
5c5ae: 2f03 movel %d3,%sp@- 5c5b0: 1d40 fff2 moveb %d0,%fp@(-14) 5c5b4: 2f0a movel %a2,%sp@-
handle->bnum = 0;
5c5b6: 42ae fff4 clrl %fp@(-12)
handle->buffer = NULL;
5c5ba: 42ae fff8 clrl %fp@(-8) 5c5be: 4eb9 0005 af84 jsr 5af84 <rtems_rfs_block_map_close>
return rc;
5c5c4: 4fef 0010 lea %sp@(16),%sp
}
5c5c8: 2002 movel %d2,%d0 5c5ca: 4cee 3cfc ff7c moveml %fp@(-132),%d2-%d7/%a2-%a5 5c5d0: 4e5e unlk %fp 5c5d2: 4e75 rts
rc = rtems_rfs_block_map_open (fs, inode, &map);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
printf ("rtems-rfs: dir-lookup-ino: map open failed for ino %" PRIu32 ": %d: %s",
5c5d4: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5c5d6: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED 5c5dc: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 5c5e0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5c5e2: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5c5e4: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 5c5e8: 4879 0007 3b9a pea 73b9a <CSWTCH.1+0x5be> <== NOT EXECUTED 5c5ee: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5c5f4: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
}
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
5c5f8: 2002 movel %d2,%d0 <== NOT EXECUTED 5c5fa: 4cee 3cfc ff7c moveml %fp@(-132),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5c600: 4e5e unlk %fp <== NOT EXECUTED 5c602: 4e75 rts <== NOT EXECUTED
while ((rc == 0) && block)
{
uint8_t* entry;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
printf ("rtems-rfs: dir-lookup-ino: block read, ino=%" PRIu32 " bno=%" PRId32 "\n",
5c604: 2f2e ffb6 movel %fp@(-74),%sp@- <== NOT EXECUTED 5c608: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 5c60c: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 5c610: 4879 0007 3c13 pea 73c13 <CSWTCH.1+0x637> <== NOT EXECUTED 5c616: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5c61c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rtems_rfs_inode_ino (inode), map.bpos.bno);
rc = rtems_rfs_buffer_handle_request (fs, &entries, block, true);
5c620: 4878 0001 pea 1 <ADD> 5c624: 2f2e fffc movel %fp@(-4),%sp@- 5c628: 486e fff2 pea %fp@(-14) 5c62c: 2f0a movel %a2,%sp@- 5c62e: 4eb9 0005 bd6e jsr 5bd6e <rtems_rfs_buffer_handle_request>
if (rc > 0)
5c634: 4fef 0010 lea %sp@(16),%sp
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
printf ("rtems-rfs: dir-lookup-ino: block read, ino=%" PRIu32 " bno=%" PRId32 "\n",
rtems_rfs_inode_ino (inode), map.bpos.bno);
rc = rtems_rfs_buffer_handle_request (fs, &entries, block, true);
5c638: 2e00 movel %d0,%d7
if (rc > 0)
5c63a: 6e00 0300 bgtw 5c93c <rtems_rfs_dir_lookup_ino+0x4d0>
/*
* Search the block to see if the name matches. A hash of 0xffff or 0x0
* means the entry is empty.
*/
entry = rtems_rfs_buffer_data (&entries);
5c63e: 206e fff8 moveal %fp@(-8),%a0
map.bpos.boff = 0;
while (map.bpos.boff < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
5c642: 700a moveq #10,%d0
/*
* Search the block to see if the name matches. A hash of 0xffff or 0x0
* means the entry is empty.
*/
entry = rtems_rfs_buffer_data (&entries);
5c644: 2a68 001e moveal %a0@(30),%a5
map.bpos.boff = 0;
5c648: 42ae ffba clrl %fp@(-70)
while (map.bpos.boff < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
5c64c: b0aa 0008 cmpl %a2@(8),%d0 5c650: 6700 0136 beqw 5c788 <rtems_rfs_dir_lookup_ino+0x31c> 5c654: 2d42 ffa4 movel %d2,%fp@(-92)
uint32_t ehash;
int elength;
ehash = rtems_rfs_dir_entry_hash (entry);
elength = rtems_rfs_dir_entry_length (entry);
*ino = rtems_rfs_dir_entry_ino (entry);
5c658: 4280 clrl %d0 5c65a: 4284 clrl %d4 5c65c: 1015 moveb %a5@,%d0 5c65e: 182d 0001 moveb %a5@(1),%d4 5c662: 7218 moveq #24,%d1 5c664: 4282 clrl %d2 5c666: 142d 0003 moveb %a5@(3),%d2 5c66a: e3a8 lsll %d1,%d0 5c66c: 4844 swap %d4 5c66e: 4244 clrw %d4 5c670: 4281 clrl %d1 5c672: 122d 0002 moveb %a5@(2),%d1 5c676: 8084 orl %d4,%d0
{
uint32_t ehash;
int elength;
ehash = rtems_rfs_dir_entry_hash (entry);
elength = rtems_rfs_dir_entry_length (entry);
5c678: 4284 clrl %d4 5c67a: 182d 0008 moveb %a5@(8),%d4
*ino = rtems_rfs_dir_entry_ino (entry);
5c67e: 8082 orl %d2,%d0
{
uint32_t ehash;
int elength;
ehash = rtems_rfs_dir_entry_hash (entry);
elength = rtems_rfs_dir_entry_length (entry);
5c680: 142d 0009 moveb %a5@(9),%d2
*ino = rtems_rfs_dir_entry_ino (entry);
5c684: e189 lsll #8,%d1
{
uint32_t ehash;
int elength;
ehash = rtems_rfs_dir_entry_hash (entry);
elength = rtems_rfs_dir_entry_length (entry);
5c686: e18c lsll #8,%d4
*ino = rtems_rfs_dir_entry_ino (entry);
5c688: 8081 orl %d1,%d0
while (map.bpos.boff < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
uint32_t ehash;
int elength;
ehash = rtems_rfs_dir_entry_hash (entry);
5c68a: 122d 0004 moveb %a5@(4),%d1
elength = rtems_rfs_dir_entry_length (entry);
5c68e: 8882 orl %d2,%d4
while (map.bpos.boff < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
uint32_t ehash;
int elength;
ehash = rtems_rfs_dir_entry_hash (entry);
5c690: 7418 moveq #24,%d2 5c692: e5a9 lsll %d2,%d1 5c694: 4282 clrl %d2 5c696: 142d 0005 moveb %a5@(5),%d2 5c69a: 4842 swap %d2 5c69c: 4242 clrw %d2 5c69e: 2042 moveal %d2,%a0 5c6a0: 4282 clrl %d2 5c6a2: 142d 0006 moveb %a5@(6),%d2 5c6a6: 2242 moveal %d2,%a1 5c6a8: 2408 movel %a0,%d2 5c6aa: 8282 orl %d2,%d1 5c6ac: 2409 movel %a1,%d2 5c6ae: e18a lsll #8,%d2 5c6b0: 2242 moveal %d2,%a1 5c6b2: 142d 0007 moveb %a5@(7),%d2
elength = rtems_rfs_dir_entry_length (entry);
*ino = rtems_rfs_dir_entry_ino (entry);
5c6b6: 2680 movel %d0,%a3@
while (map.bpos.boff < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
uint32_t ehash;
int elength;
ehash = rtems_rfs_dir_entry_hash (entry);
5c6b8: 3042 moveaw %d2,%a0
elength = rtems_rfs_dir_entry_length (entry);
*ino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
5c6ba: 0c84 0000 ffff cmpil #65535,%d4 5c6c0: 6700 00c6 beqw 5c788 <rtems_rfs_dir_lookup_ino+0x31c>
break;
if (rtems_rfs_dir_entry_valid (fs, elength, *ino))
5c6c4: 740a moveq #10,%d2 5c6c6: b484 cmpl %d4,%d2 5c6c8: 6c00 013a bgew 5c804 <rtems_rfs_dir_lookup_ino+0x398> 5c6cc: b8aa 0018 cmpl %a2@(24),%d4 5c6d0: 6400 0132 bccw 5c804 <rtems_rfs_dir_lookup_ino+0x398> 5c6d4: 4a80 tstl %d0 5c6d6: 6700 012c beqw 5c804 <rtems_rfs_dir_lookup_ino+0x398> 5c6da: b0aa 0010 cmpl %a2@(16),%d0 5c6de: 6200 0124 bhiw 5c804 <rtems_rfs_dir_lookup_ino+0x398>
while (map.bpos.boff < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
{
uint32_t ehash;
int elength;
ehash = rtems_rfs_dir_entry_hash (entry);
5c6e2: 4280 clrl %d0 5c6e4: 3408 movew %a0,%d2 5c6e6: 1002 moveb %d2,%d0 5c6e8: 8280 orl %d0,%d1 5c6ea: 2009 movel %a1,%d0 5c6ec: 8280 orl %d0,%d1
rtems_rfs_inode_ino (inode), elength, *ino, map.bpos.boff);
rc = EIO;
break;
}
if (ehash == hash)
5c6ee: ba81 cmpl %d1,%d5
5c6f0: 667a bnes 5c76c <rtems_rfs_dir_lookup_ino+0x300>
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_CHECK))
5c6f2: 2f3c 0800 0000 movel #134217728,%sp@- 5c6f8: 42a7 clrl %sp@- 5c6fa: 4e94 jsr %a4@ 5c6fc: 508f addql #8,%sp 5c6fe: 4a00 tstb %d0
5c700: 6750 beqs 5c752 <rtems_rfs_dir_lookup_ino+0x2e6> <== ALWAYS TAKEN
printf ("rtems-rfs: dir-lookup-ino: "
"checking entry for ino %" PRId32 ": bno=%04" PRIx32 "/off=%04" PRIx32
" length:%d ino:%" PRId32 "\n",
rtems_rfs_inode_ino (inode), map.bpos.bno, map.bpos.boff,
elength, rtems_rfs_dir_entry_ino (entry));
5c702: 4281 clrl %d1 <== NOT EXECUTED 5c704: 122d 0001 moveb %a5@(1),%d1 <== NOT EXECUTED 5c708: 4280 clrl %d0 <== NOT EXECUTED 5c70a: 1015 moveb %a5@,%d0 <== NOT EXECUTED 5c70c: 7418 moveq #24,%d2 <== NOT EXECUTED 5c70e: 4841 swap %d1 <== NOT EXECUTED 5c710: 4241 clrw %d1 <== NOT EXECUTED 5c712: e5a8 lsll %d2,%d0 <== NOT EXECUTED 5c714: 2041 moveal %d1,%a0 <== NOT EXECUTED 5c716: 4281 clrl %d1 <== NOT EXECUTED 5c718: 122d 0003 moveb %a5@(3),%d1 <== NOT EXECUTED 5c71c: 2408 movel %a0,%d2 <== NOT EXECUTED 5c71e: 2241 moveal %d1,%a1 <== NOT EXECUTED 5c720: 122d 0002 moveb %a5@(2),%d1 <== NOT EXECUTED 5c724: 8082 orl %d2,%d0 <== NOT EXECUTED 5c726: 2409 movel %a1,%d2 <== NOT EXECUTED 5c728: e189 lsll #8,%d1 <== NOT EXECUTED 5c72a: 8082 orl %d2,%d0 <== NOT EXECUTED
}
if (ehash == hash)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_CHECK))
printf ("rtems-rfs: dir-lookup-ino: "
5c72c: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 5c730: 8081 orl %d1,%d0 <== NOT EXECUTED 5c732: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5c734: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5c736: 2f2e ffba movel %fp@(-70),%sp@- <== NOT EXECUTED 5c73a: 2f2e ffb6 movel %fp@(-74),%sp@- <== NOT EXECUTED 5c73e: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 5c742: 4879 0007 3cd7 pea 73cd7 <CSWTCH.1+0x6fb> <== NOT EXECUTED 5c748: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5c74e: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
"checking entry for ino %" PRId32 ": bno=%04" PRIx32 "/off=%04" PRIx32
" length:%d ino:%" PRId32 "\n",
rtems_rfs_inode_ino (inode), map.bpos.bno, map.bpos.boff,
elength, rtems_rfs_dir_entry_ino (entry));
if (memcmp (entry + RTEMS_RFS_DIR_ENTRY_SIZE, name, length) == 0)
5c752: 2f06 movel %d6,%sp@- 5c754: 2f2e 0010 movel %fp@(16),%sp@- 5c758: 486d 000a pea %a5@(10) 5c75c: 4eb9 0006 2d68 jsr 62d68 <memcmp> 5c762: 4fef 000c lea %sp@(12),%sp 5c766: 4a80 tstl %d0 5c768: 6700 015c beqw 5c8c6 <rtems_rfs_dir_lookup_ino+0x45a>
rtems_rfs_block_map_close (fs, &map);
return 0;
}
}
map.bpos.boff += elength;
5c76c: 2004 movel %d4,%d0 5c76e: d0ae ffba addl %fp@(-70),%d0
entry += elength;
5c772: dbc4 addal %d4,%a5
entry = rtems_rfs_buffer_data (&entries);
map.bpos.boff = 0;
while (map.bpos.boff < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
5c774: 222a 0008 movel %a2@(8),%d1 5c778: 0681 ffff fff6 addil #-10,%d1
rtems_rfs_block_map_close (fs, &map);
return 0;
}
}
map.bpos.boff += elength;
5c77e: 2d40 ffba movel %d0,%fp@(-70)
entry = rtems_rfs_buffer_data (&entries);
map.bpos.boff = 0;
while (map.bpos.boff < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
5c782: b081 cmpl %d1,%d0 5c784: 6500 fed2 bcsw 5c658 <rtems_rfs_dir_lookup_ino+0x1ec>
map.bpos.boff += elength;
entry += elength;
}
if (rc == 0)
5c788: 4a87 tstl %d7 5c78a: 6600 008a bnew 5c816 <rtems_rfs_dir_lookup_ino+0x3aa>
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
5c78e: 486e fffc pea %fp@(-4) 5c792: 2f03 movel %d3,%sp@- 5c794: 2f0a movel %a2,%sp@- 5c796: 4eb9 0005 b35c jsr 5b35c <rtems_rfs_block_map_next_block>
if ((rc > 0) && (rc != ENXIO))
5c79c: 4fef 000c lea %sp@(12),%sp
entry += elength;
}
if (rc == 0)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
5c7a0: 2400 movel %d0,%d2
if ((rc > 0) && (rc != ENXIO))
5c7a2: 6f3c bles 5c7e0 <rtems_rfs_dir_lookup_ino+0x374> <== NEVER TAKEN
5c7a4: 7206 moveq #6,%d1 5c7a6: b280 cmpl %d0,%d1 5c7a8: 6700 00ec beqw 5c896 <rtems_rfs_dir_lookup_ino+0x42a>
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
5c7ac: 2f3c 0400 0000 movel #67108864,%sp@- <== NOT EXECUTED 5c7b2: 42a7 clrl %sp@- <== NOT EXECUTED 5c7b4: 4e94 jsr %a4@ <== NOT EXECUTED 5c7b6: 508f addql #8,%sp <== NOT EXECUTED 5c7b8: 4a00 tstb %d0 <== NOT EXECUTED 5c7ba: 6724 beqs 5c7e0 <rtems_rfs_dir_lookup_ino+0x374> <== NOT EXECUTED
printf ("rtems-rfs: dir-lookup-ino: "
5c7bc: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5c7be: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED 5c7c4: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 5c7c8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5c7ca: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5c7cc: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 5c7d0: 4879 0007 3d7c pea 73d7c <CSWTCH.1+0x7a0> <== NOT EXECUTED 5c7d6: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5c7dc: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
while ((rc == 0) && block)
5c7e0: 4a82 tstl %d2 5c7e2: 6600 00b4 bnew 5c898 <rtems_rfs_dir_lookup_ino+0x42c> 5c7e6: 4aae fffc tstl %fp@(-4) 5c7ea: 6700 0190 beqw 5c97c <rtems_rfs_dir_lookup_ino+0x510>
{
uint8_t* entry;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
5c7ee: 2f3c 0400 0000 movel #67108864,%sp@- 5c7f4: 42a7 clrl %sp@- 5c7f6: 4e94 jsr %a4@ 5c7f8: 508f addql #8,%sp 5c7fa: 4a00 tstb %d0 5c7fc: 6700 fe22 beqw 5c620 <rtems_rfs_dir_lookup_ino+0x1b4>
5c800: 6000 fe02 braw 5c604 <rtems_rfs_dir_lookup_ino+0x198> <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
break;
if (rtems_rfs_dir_entry_valid (fs, elength, *ino))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
5c804: 2f3c 0400 0000 movel #67108864,%sp@- <== NOT EXECUTED 5c80a: 42a7 clrl %sp@- <== NOT EXECUTED 5c80c: 4e94 jsr %a4@ <== NOT EXECUTED 5c80e: 508f addql #8,%sp <== NOT EXECUTED 5c810: 4a00 tstb %d0 <== NOT EXECUTED 5c812: 6630 bnes 5c844 <rtems_rfs_dir_lookup_ino+0x3d8> <== NOT EXECUTED
printf ("rtems-rfs: dir-lookup-ino: "
"block map next block failed in ino %" PRIu32 ": %d: %s\n",
rtems_rfs_inode_ino (inode), rc, strerror (rc));
}
if (rc == ENXIO)
rc = ENOENT;
5c814: 7e05 moveq #5,%d7 <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
while ((rc == 0) && block)
5c816: 2407 movel %d7,%d2 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
5c818: 486e fff2 pea %fp@(-14) 5c81c: 2f0a movel %a2,%sp@- 5c81e: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release>
handle->dirty = false;
5c824: 4200 clrb %d0
rtems_rfs_inode_ino (inode), rc, strerror (rc));
}
}
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
5c826: 2f03 movel %d3,%sp@- 5c828: 1d40 fff2 moveb %d0,%fp@(-14) 5c82c: 2f0a movel %a2,%sp@-
handle->bnum = 0;
5c82e: 42ae fff4 clrl %fp@(-12)
handle->buffer = NULL;
5c832: 42ae fff8 clrl %fp@(-8) 5c836: 4eb9 0005 af84 jsr 5af84 <rtems_rfs_block_map_close>
return rc;
5c83c: 4fef 0010 lea %sp@(16),%sp 5c840: 6000 fd86 braw 5c5c8 <rtems_rfs_dir_lookup_ino+0x15c>
break;
if (rtems_rfs_dir_entry_valid (fs, elength, *ino))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
printf ("rtems-rfs: dir-lookup-ino: "
5c844: 2f2e ffba movel %fp@(-70),%sp@- <== NOT EXECUTED
printf ("rtems-rfs: dir-lookup-ino: "
"block map next block failed in ino %" PRIu32 ": %d: %s\n",
rtems_rfs_inode_ino (inode), rc, strerror (rc));
}
if (rc == ENXIO)
rc = ENOENT;
5c848: 7e05 moveq #5,%d7 <== NOT EXECUTED
break;
if (rtems_rfs_dir_entry_valid (fs, elength, *ino))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
printf ("rtems-rfs: dir-lookup-ino: "
5c84a: 2f13 movel %a3@,%sp@- <== NOT EXECUTED 5c84c: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 5c850: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5c852: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 5c856: 4879 0007 3c8d pea 73c8d <CSWTCH.1+0x6b1> <== NOT EXECUTED 5c85c: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5c862: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 5c866: 60ae bras 5c816 <rtems_rfs_dir_lookup_ino+0x3aa> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
5c868: 486e fff2 pea %fp@(-14)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
printf ("rtems-rfs: dir-lookup-ino: block map find failed: %d: %s\n",
rc, strerror (rc));
if (rc == ENXIO)
rc = ENOENT;
5c86c: 7402 moveq #2,%d2 5c86e: 2f0a movel %a2,%sp@- 5c870: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release>
handle->dirty = false;
5c876: 4200 clrb %d0
rtems_rfs_inode_ino (inode), rc, strerror (rc));
}
}
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
5c878: 2f03 movel %d3,%sp@- 5c87a: 1d40 fff2 moveb %d0,%fp@(-14) 5c87e: 2f0a movel %a2,%sp@-
handle->bnum = 0;
5c880: 42ae fff4 clrl %fp@(-12)
handle->buffer = NULL;
5c884: 42ae fff8 clrl %fp@(-8) 5c888: 4eb9 0005 af84 jsr 5af84 <rtems_rfs_block_map_close>
return rc;
5c88e: 4fef 0010 lea %sp@(16),%sp 5c892: 6000 fd34 braw 5c5c8 <rtems_rfs_dir_lookup_ino+0x15c>
printf ("rtems-rfs: dir-lookup-ino: "
"block map next block failed in ino %" PRIu32 ": %d: %s\n",
rtems_rfs_inode_ino (inode), rc, strerror (rc));
}
if (rc == ENXIO)
rc = ENOENT;
5c896: 7402 moveq #2,%d2
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
while ((rc == 0) && block)
5c898: 2e02 movel %d2,%d7 5c89a: 2407 movel %d7,%d2 5c89c: 6000 ff7a braw 5c818 <rtems_rfs_dir_lookup_ino+0x3ac>
*/
rc = rtems_rfs_block_map_seek (fs, &map, 0, &block);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
printf ("rtems-rfs: dir-lookup-ino: block map find failed: %d: %s\n",
5c8a0: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5c8a2: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED 5c8a8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5c8aa: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5c8ac: 4879 0007 3bd9 pea 73bd9 <CSWTCH.1+0x5fd> <== NOT EXECUTED 5c8b2: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5c8b8: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rc, strerror (rc));
if (rc == ENXIO)
5c8bc: 7206 moveq #6,%d1 <== NOT EXECUTED 5c8be: b282 cmpl %d2,%d1 <== NOT EXECUTED 5c8c0: 6600 fcde bnew 5c5a0 <rtems_rfs_dir_lookup_ino+0x134> <== NOT EXECUTED 5c8c4: 60a2 bras 5c868 <rtems_rfs_dir_lookup_ino+0x3fc> <== NOT EXECUTED
rtems_rfs_inode_ino (inode), map.bpos.bno, map.bpos.boff,
elength, rtems_rfs_dir_entry_ino (entry));
if (memcmp (entry + RTEMS_RFS_DIR_ENTRY_SIZE, name, length) == 0)
{
*offset = rtems_rfs_block_map_pos (fs, &map);
5c8c6: 486e ffb6 pea %fp@(-74) 5c8ca: 242e ffa4 movel %fp@(-92),%d2 5c8ce: 2f0a movel %a2,%sp@- 5c8d0: 4eb9 0005 acee jsr 5acee <rtems_rfs_block_get_pos> 5c8d6: 206e 001c moveal %fp@(28),%a0
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_FOUND))
5c8da: 2f3c 1000 0000 movel #268435456,%sp@- 5c8e0: 42a7 clrl %sp@-
rtems_rfs_inode_ino (inode), map.bpos.bno, map.bpos.boff,
elength, rtems_rfs_dir_entry_ino (entry));
if (memcmp (entry + RTEMS_RFS_DIR_ENTRY_SIZE, name, length) == 0)
{
*offset = rtems_rfs_block_map_pos (fs, &map);
5c8e2: 2081 movel %d1,%a0@
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_FOUND))
5c8e4: 4e94 jsr %a4@ 5c8e6: 4fef 0010 lea %sp@(16),%sp 5c8ea: 4a00 tstb %d0 5c8ec: 6700 fcb2 beqw 5c5a0 <rtems_rfs_dir_lookup_ino+0x134>
printf ("rtems-rfs: dir-lookup-ino: "
5c8f0: 206e 001c moveal %fp@(28),%a0 <== NOT EXECUTED 5c8f4: 2f10 movel %a0@,%sp@- <== NOT EXECUTED 5c8f6: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 5c8fa: 2f13 movel %a3@,%sp@- <== NOT EXECUTED 5c8fc: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 5c900: 4879 0007 3d35 pea 73d35 <CSWTCH.1+0x759> <== NOT EXECUTED 5c906: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5c90c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
5c910: 486e fff2 pea %fp@(-14) <== NOT EXECUTED 5c914: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5c916: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
5c91c: 4200 clrb %d0 <== NOT EXECUTED
rtems_rfs_inode_ino (inode), rc, strerror (rc));
}
}
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
5c91e: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5c920: 1d40 fff2 moveb %d0,%fp@(-14) <== NOT EXECUTED 5c924: 2f0a movel %a2,%sp@- <== NOT EXECUTED
handle->bnum = 0;
5c926: 42ae fff4 clrl %fp@(-12) <== NOT EXECUTED
handle->buffer = NULL;
5c92a: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED 5c92e: 4eb9 0005 af84 jsr 5af84 <rtems_rfs_block_map_close> <== NOT EXECUTED
return rc;
5c934: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5c938: 6000 fc8e braw 5c5c8 <rtems_rfs_dir_lookup_ino+0x15c> <== NOT EXECUTED
rtems_rfs_inode_ino (inode), map.bpos.bno);
rc = rtems_rfs_buffer_handle_request (fs, &entries, block, true);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
5c93c: 2f3c 0400 0000 movel #67108864,%sp@- <== NOT EXECUTED 5c942: 42a7 clrl %sp@- <== NOT EXECUTED 5c944: 4e94 jsr %a4@ <== NOT EXECUTED 5c946: 508f addql #8,%sp <== NOT EXECUTED 5c948: 4a00 tstb %d0 <== NOT EXECUTED 5c94a: 6700 feca beqw 5c816 <rtems_rfs_dir_lookup_ino+0x3aa> <== NOT EXECUTED
printf ("rtems-rfs: dir-lookup-ino: block read, ino=%" PRIu32 " block=%" PRId32 ": %d: %s\n",
5c94e: 2f07 movel %d7,%sp@- <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
while ((rc == 0) && block)
5c950: 2407 movel %d7,%d2 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &entries, block, true);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
printf ("rtems-rfs: dir-lookup-ino: block read, ino=%" PRIu32 " block=%" PRId32 ": %d: %s\n",
5c952: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED 5c958: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 5c95c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5c95e: 2f07 movel %d7,%sp@- <== NOT EXECUTED 5c960: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 5c964: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 5c968: 4879 0007 3c4b pea 73c4b <CSWTCH.1+0x66f> <== NOT EXECUTED 5c96e: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5c974: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 5c978: 6000 fe9e braw 5c818 <rtems_rfs_dir_lookup_ino+0x3ac> <== NOT EXECUTED
}
if ((rc == 0) && (block == 0))
{
rc = EIO;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
5c97c: 2f3c 0400 0000 movel #67108864,%sp@- <== NOT EXECUTED 5c982: 42a7 clrl %sp@- <== NOT EXECUTED 5c984: 4e94 jsr %a4@ <== NOT EXECUTED 5c986: 508f addql #8,%sp <== NOT EXECUTED 5c988: 4a00 tstb %d0 <== NOT EXECUTED 5c98a: 662e bnes 5c9ba <rtems_rfs_dir_lookup_ino+0x54e> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
5c98c: 486e fff2 pea %fp@(-14) <== NOT EXECUTED
}
}
if ((rc == 0) && (block == 0))
{
rc = EIO;
5c990: 7405 moveq #5,%d2 <== NOT EXECUTED 5c992: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5c994: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
5c99a: 4200 clrb %d0 <== NOT EXECUTED
rtems_rfs_inode_ino (inode), rc, strerror (rc));
}
}
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
5c99c: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5c99e: 1d40 fff2 moveb %d0,%fp@(-14) <== NOT EXECUTED 5c9a2: 2f0a movel %a2,%sp@- <== NOT EXECUTED
handle->bnum = 0;
5c9a4: 42ae fff4 clrl %fp@(-12) <== NOT EXECUTED
handle->buffer = NULL;
5c9a8: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED 5c9ac: 4eb9 0005 af84 jsr 5af84 <rtems_rfs_block_map_close> <== NOT EXECUTED
return rc;
5c9b2: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5c9b6: 6000 fc10 braw 5c5c8 <rtems_rfs_dir_lookup_ino+0x15c> <== NOT EXECUTED
if ((rc == 0) && (block == 0))
{
rc = EIO;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
printf ("rtems-rfs: dir-lookup-ino: block is 0 in ino %" PRIu32 ": %d: %s\n",
5c9ba: 4878 0005 pea 5 <COMPARE> <== NOT EXECUTED
}
}
if ((rc == 0) && (block == 0))
{
rc = EIO;
5c9be: 7405 moveq #5,%d2 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
printf ("rtems-rfs: dir-lookup-ino: block is 0 in ino %" PRIu32 ": %d: %s\n",
5c9c0: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED 5c9c6: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 5c9ca: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5c9cc: 4878 0005 pea 5 <COMPARE> <== NOT EXECUTED 5c9d0: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 5c9d4: 4879 0007 3dc7 pea 73dc7 <CSWTCH.1+0x7eb> <== NOT EXECUTED 5c9da: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5c9e0: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
5c9e4: 486e fff2 pea %fp@(-14) <== NOT EXECUTED 5c9e8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5c9ea: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
5c9f0: 4200 clrb %d0 <== NOT EXECUTED
rtems_rfs_inode_ino (inode), rc, strerror (rc));
}
}
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
5c9f2: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5c9f4: 1d40 fff2 moveb %d0,%fp@(-14) <== NOT EXECUTED 5c9f8: 2f0a movel %a2,%sp@- <== NOT EXECUTED
handle->bnum = 0;
5c9fa: 42ae fff4 clrl %fp@(-12) <== NOT EXECUTED
handle->buffer = NULL;
5c9fe: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED 5ca02: 4eb9 0005 af84 jsr 5af84 <rtems_rfs_block_map_close> <== NOT EXECUTED
return rc;
5ca08: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5ca0c: 6000 fbba braw 5c5c8 <rtems_rfs_dir_lookup_ino+0x15c> <== NOT EXECUTED
0005d2f2 <rtems_rfs_dir_read>:
rtems_rfs_dir_read (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* dir,
rtems_rfs_pos_rel offset,
struct dirent* dirent,
size_t* length)
{
5d2f2: 4e56 ff7c linkw %fp,#-132 <== NOT EXECUTED 5d2f6: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED
rtems_rfs_block_map map;
rtems_rfs_buffer_handle buffer;
rtems_rfs_block_no block;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
5d2fa: 2f3c 8000 0000 movel #-2147483648,%sp@- <== NOT EXECUTED
rtems_rfs_dir_read (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* dir,
rtems_rfs_pos_rel offset,
struct dirent* dirent,
size_t* length)
{
5d300: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
rtems_rfs_block_map map;
rtems_rfs_buffer_handle buffer;
rtems_rfs_block_no block;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
5d304: 49f9 0005 37c0 lea 537c0 <rtems_rfs_trace>,%a4 <== NOT EXECUTED 5d30a: 42a7 clrl %sp@- <== NOT EXECUTED
rtems_rfs_dir_read (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* dir,
rtems_rfs_pos_rel offset,
struct dirent* dirent,
size_t* length)
{
5d30c: 266e 001c moveal %fp@(28),%a3 <== NOT EXECUTED
rtems_rfs_block_map map;
rtems_rfs_buffer_handle buffer;
rtems_rfs_block_no block;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
5d310: 4e94 jsr %a4@ <== NOT EXECUTED 5d312: 508f addql #8,%sp <== NOT EXECUTED 5d314: 4a00 tstb %d0 <== NOT EXECUTED 5d316: 6600 00a2 bnew 5d3ba <rtems_rfs_dir_read+0xc8> <== NOT EXECUTED
printf ("rtems-rfs: dir-read: dir=%" PRId32 " offset=%" PRId64 "\n",
rtems_rfs_inode_ino (dir), offset);
*length = 0;
rc = rtems_rfs_block_map_open (fs, dir, &map);
5d31a: 240e movel %fp,%d2 <== NOT EXECUTED 5d31c: 0682 ffff ffa8 addil #-88,%d2 <== NOT EXECUTED 5d322: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5d324: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
printf ("rtems-rfs: dir-read: dir=%" PRId32 " offset=%" PRId64 "\n",
rtems_rfs_inode_ino (dir), offset);
*length = 0;
5d328: 4293 clrl %a3@ <== NOT EXECUTED
rc = rtems_rfs_block_map_open (fs, dir, &map);
5d32a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5d32c: 4eb9 0005 adf2 jsr 5adf2 <rtems_rfs_block_map_open> <== NOT EXECUTED
if (rc > 0)
5d332: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
printf ("rtems-rfs: dir-read: dir=%" PRId32 " offset=%" PRId64 "\n",
rtems_rfs_inode_ino (dir), offset);
*length = 0;
rc = rtems_rfs_block_map_open (fs, dir, &map);
5d336: 2800 movel %d0,%d4 <== NOT EXECUTED
if (rc > 0)
5d338: 6f0c bles 5d346 <rtems_rfs_dir_read+0x54> <== NOT EXECUTED
}
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
5d33a: 2004 movel %d4,%d0 <== NOT EXECUTED 5d33c: 4cee 3cfc ff7c moveml %fp@(-132),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5d342: 4e5e unlk %fp <== NOT EXECUTED 5d344: 4e75 rts <== NOT EXECUTED
rc = rtems_rfs_block_map_open (fs, dir, &map);
if (rc > 0)
return rc;
if (((rtems_rfs_fs_block_size (fs) -
(offset % rtems_rfs_fs_block_size (fs))) <= RTEMS_RFS_DIR_ENTRY_SIZE))
5d346: 2e2a 0008 movel %a2@(8),%d7 <== NOT EXECUTED 5d34a: 4286 clrl %d6 <== NOT EXECUTED 5d34c: 2f07 movel %d7,%sp@- <== NOT EXECUTED
rc = rtems_rfs_block_map_open (fs, dir, &map);
if (rc > 0)
return rc;
if (((rtems_rfs_fs_block_size (fs) -
5d34e: 2606 movel %d6,%d3 <== NOT EXECUTED 5d350: 2807 movel %d7,%d4 <== NOT EXECUTED
(offset % rtems_rfs_fs_block_size (fs))) <= RTEMS_RFS_DIR_ENTRY_SIZE))
5d352: 2f06 movel %d6,%sp@- <== NOT EXECUTED 5d354: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED 5d358: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 5d35c: 4eb9 0006 f2a8 jsr 6f2a8 <__moddi3> <== NOT EXECUTED 5d362: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rc = rtems_rfs_block_map_open (fs, dir, &map);
if (rc > 0)
return rc;
if (((rtems_rfs_fs_block_size (fs) -
5d366: 9881 subl %d1,%d4 <== NOT EXECUTED 5d368: 9780 subxl %d0,%d3 <== NOT EXECUTED 5d36a: 2003 movel %d3,%d0 <== NOT EXECUTED 5d36c: 2204 movel %d4,%d1 <== NOT EXECUTED 5d36e: 4283 clrl %d3 <== NOT EXECUTED 5d370: 780a moveq #10,%d4 <== NOT EXECUTED 5d372: 9881 subl %d1,%d4 <== NOT EXECUTED 5d374: 9780 subxl %d0,%d3 <== NOT EXECUTED 5d376: 6c00 0088 bgew 5d400 <rtems_rfs_dir_read+0x10e> <== NOT EXECUTED
(offset % rtems_rfs_fs_block_size (fs))) <= RTEMS_RFS_DIR_ENTRY_SIZE))
offset = (((offset / rtems_rfs_fs_block_size (fs)) + 1) *
rtems_rfs_fs_block_size (fs));
rc = rtems_rfs_block_map_seek (fs, &map, offset, &block);
5d37a: 486e fffc pea %fp@(-4) <== NOT EXECUTED 5d37e: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED 5d382: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 5d386: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5d388: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5d38a: 4eb9 0005 b2de jsr 5b2de <rtems_rfs_block_map_seek> <== NOT EXECUTED
if (rc > 0)
5d390: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
if (((rtems_rfs_fs_block_size (fs) -
(offset % rtems_rfs_fs_block_size (fs))) <= RTEMS_RFS_DIR_ENTRY_SIZE))
offset = (((offset / rtems_rfs_fs_block_size (fs)) + 1) *
rtems_rfs_fs_block_size (fs));
rc = rtems_rfs_block_map_seek (fs, &map, offset, &block);
5d394: 2800 movel %d0,%d4 <== NOT EXECUTED
if (rc > 0)
5d396: 6f00 00b6 blew 5d44e <rtems_rfs_dir_read+0x15c> <== NOT EXECUTED
{
if (rc == ENXIO)
5d39a: 7006 moveq #6,%d0 <== NOT EXECUTED 5d39c: b084 cmpl %d4,%d0 <== NOT EXECUTED 5d39e: 6700 009c beqw 5d43c <rtems_rfs_dir_read+0x14a> <== NOT EXECUTED
rc = ENOENT;
rtems_rfs_block_map_close (fs, &map);
5d3a2: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5d3a4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5d3a6: 4eb9 0005 af84 jsr 5af84 <rtems_rfs_block_map_close> <== NOT EXECUTED
return rc;
5d3ac: 508f addql #8,%sp <== NOT EXECUTED
}
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
5d3ae: 2004 movel %d4,%d0 <== NOT EXECUTED 5d3b0: 4cee 3cfc ff7c moveml %fp@(-132),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5d3b6: 4e5e unlk %fp <== NOT EXECUTED 5d3b8: 4e75 rts <== NOT EXECUTED
rtems_rfs_buffer_handle buffer;
rtems_rfs_block_no block;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
printf ("rtems-rfs: dir-read: dir=%" PRId32 " offset=%" PRId64 "\n",
5d3ba: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED
rtems_rfs_inode_ino (dir), offset);
*length = 0;
rc = rtems_rfs_block_map_open (fs, dir, &map);
5d3be: 240e movel %fp,%d2 <== NOT EXECUTED 5d3c0: 0682 ffff ffa8 addil #-88,%d2 <== NOT EXECUTED
rtems_rfs_buffer_handle buffer;
rtems_rfs_block_no block;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
printf ("rtems-rfs: dir-read: dir=%" PRId32 " offset=%" PRId64 "\n",
5d3c6: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 5d3ca: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 5d3ce: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 5d3d2: 4879 0007 40c0 pea 740c0 <CSWTCH.1+0xae4> <== NOT EXECUTED 5d3d8: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5d3de: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rtems_rfs_inode_ino (dir), offset);
*length = 0;
rc = rtems_rfs_block_map_open (fs, dir, &map);
5d3e2: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5d3e4: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
printf ("rtems-rfs: dir-read: dir=%" PRId32 " offset=%" PRId64 "\n",
rtems_rfs_inode_ino (dir), offset);
*length = 0;
5d3e8: 4293 clrl %a3@ <== NOT EXECUTED
rc = rtems_rfs_block_map_open (fs, dir, &map);
5d3ea: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5d3ec: 4eb9 0005 adf2 jsr 5adf2 <rtems_rfs_block_map_open> <== NOT EXECUTED
if (rc > 0)
5d3f2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
printf ("rtems-rfs: dir-read: dir=%" PRId32 " offset=%" PRId64 "\n",
rtems_rfs_inode_ino (dir), offset);
*length = 0;
rc = rtems_rfs_block_map_open (fs, dir, &map);
5d3f6: 2800 movel %d0,%d4 <== NOT EXECUTED
if (rc > 0)
5d3f8: 6e00 ff40 bgtw 5d33a <rtems_rfs_dir_read+0x48> <== NOT EXECUTED 5d3fc: 6000 ff48 braw 5d346 <rtems_rfs_dir_read+0x54> <== NOT EXECUTED
return rc;
if (((rtems_rfs_fs_block_size (fs) -
(offset % rtems_rfs_fs_block_size (fs))) <= RTEMS_RFS_DIR_ENTRY_SIZE))
offset = (((offset / rtems_rfs_fs_block_size (fs)) + 1) *
5d400: 2f07 movel %d7,%sp@- <== NOT EXECUTED 5d402: 4283 clrl %d3 <== NOT EXECUTED 5d404: 7801 moveq #1,%d4 <== NOT EXECUTED 5d406: 2f06 movel %d6,%sp@- <== NOT EXECUTED 5d408: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED 5d40c: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 5d410: 4eb9 0006 ee60 jsr 6ee60 <__divdi3> <== NOT EXECUTED 5d416: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5d41a: d881 addl %d1,%d4 <== NOT EXECUTED 5d41c: d780 addxl %d0,%d3 <== NOT EXECUTED 5d41e: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5d420: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5d422: 2f07 movel %d7,%sp@- <== NOT EXECUTED 5d424: 2f06 movel %d6,%sp@- <== NOT EXECUTED 5d426: 4eb9 0006 edf8 jsr 6edf8 <__muldi3> <== NOT EXECUTED 5d42c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5d430: 2d40 0010 movel %d0,%fp@(16) <== NOT EXECUTED 5d434: 2d41 0014 movel %d1,%fp@(20) <== NOT EXECUTED 5d438: 6000 ff40 braw 5d37a <rtems_rfs_dir_read+0x88> <== NOT EXECUTED
rc = rtems_rfs_block_map_seek (fs, &map, offset, &block);
if (rc > 0)
{
if (rc == ENXIO)
rc = ENOENT;
rtems_rfs_block_map_close (fs, &map);
5d43c: 2f02 movel %d2,%sp@- <== NOT EXECUTED
rc = rtems_rfs_block_map_seek (fs, &map, offset, &block);
if (rc > 0)
{
if (rc == ENXIO)
rc = ENOENT;
5d43e: 7802 moveq #2,%d4 <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
5d440: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5d442: 4eb9 0005 af84 jsr 5af84 <rtems_rfs_block_map_close> <== NOT EXECUTED
return rc;
5d448: 508f addql #8,%sp <== NOT EXECUTED 5d44a: 6000 ff62 braw 5d3ae <rtems_rfs_dir_read+0xbc> <== NOT EXECUTED
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
handle->bnum = 0;
5d44e: 42ae fff4 clrl %fp@(-12) <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
5d452: 4201 clrb %d1 <== NOT EXECUTED
handle->bnum = 0; handle->buffer = NULL;
5d454: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
5d458: 1d41 fff2 moveb %d1,%fp@(-14) <== NOT EXECUTED
uint8_t* entry;
rtems_rfs_ino eino;
int elength;
int remaining;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
5d45c: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 5d460: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 5d464: 486e fff2 pea %fp@(-14) <== NOT EXECUTED 5d468: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5d46a: 4eb9 0005 bd6e jsr 5bd6e <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
if (rc > 0)
5d470: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5d474: 4a80 tstl %d0 <== NOT EXECUTED 5d476: 6e00 0086 bgtw 5d4fe <rtems_rfs_dir_read+0x20c> <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
entry = rtems_rfs_buffer_data (&buffer);
5d47a: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED
entry += map.bpos.boff;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
5d47e: 4283 clrl %d3 <== NOT EXECUTED 5d480: 4284 clrl %d4 <== NOT EXECUTED 5d482: 7218 moveq #24,%d1 <== NOT EXECUTED
}
entry = rtems_rfs_buffer_data (&buffer);
entry += map.bpos.boff;
elength = rtems_rfs_dir_entry_length (entry);
5d484: 4285 clrl %d5 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
5d486: 4287 clrl %d7 <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
return rc;
}
entry = rtems_rfs_buffer_data (&buffer);
entry += map.bpos.boff;
5d488: 2c2e ffba movel %fp@(-70),%d6 <== NOT EXECUTED 5d48c: 2a68 001e moveal %a0@(30),%a5 <== NOT EXECUTED 5d490: dbc6 addal %d6,%a5 <== NOT EXECUTED
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
5d492: 1615 moveb %a5@,%d3 <== NOT EXECUTED 5d494: 182d 0001 moveb %a5@(1),%d4 <== NOT EXECUTED
}
entry = rtems_rfs_buffer_data (&buffer);
entry += map.bpos.boff;
elength = rtems_rfs_dir_entry_length (entry);
5d498: 1a2d 0008 moveb %a5@(8),%d5 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
5d49c: 1e2d 0003 moveb %a5@(3),%d7 <== NOT EXECUTED 5d4a0: e3ab lsll %d1,%d3 <== NOT EXECUTED 5d4a2: 4844 swap %d4 <== NOT EXECUTED 5d4a4: 4244 clrw %d4 <== NOT EXECUTED 5d4a6: 4281 clrl %d1 <== NOT EXECUTED 5d4a8: 122d 0002 moveb %a5@(2),%d1 <== NOT EXECUTED 5d4ac: 8684 orl %d4,%d3 <== NOT EXECUTED
}
entry = rtems_rfs_buffer_data (&buffer);
entry += map.bpos.boff;
elength = rtems_rfs_dir_entry_length (entry);
5d4ae: 4284 clrl %d4 <== NOT EXECUTED 5d4b0: 182d 0009 moveb %a5@(9),%d4 <== NOT EXECUTED 5d4b4: e18d lsll #8,%d5 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
5d4b6: 8687 orl %d7,%d3 <== NOT EXECUTED 5d4b8: e189 lsll #8,%d1 <== NOT EXECUTED
}
entry = rtems_rfs_buffer_data (&buffer);
entry += map.bpos.boff;
elength = rtems_rfs_dir_entry_length (entry);
5d4ba: 8a84 orl %d4,%d5 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
5d4bc: 8681 orl %d1,%d3 <== NOT EXECUTED
if (elength != RTEMS_RFS_DIR_ENTRY_EMPTY)
5d4be: 0c85 0000 ffff cmpil #65535,%d5 <== NOT EXECUTED 5d4c4: 6600 00cc bnew 5d592 <rtems_rfs_dir_read+0x2a0> <== NOT EXECUTED
printf ("rtems-rfs: dir-read: found off:%" PRIdoff_t " ino:%ld name=%s\n",
dirent->d_off, dirent->d_ino, dirent->d_name);
break;
}
*length += rtems_rfs_fs_block_size (fs) - map.bpos.boff;
5d4c8: 202a 0008 movel %a2@(8),%d0 <== NOT EXECUTED 5d4cc: 9086 subl %d6,%d0 <== NOT EXECUTED 5d4ce: d193 addl %d0,%a3@ <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
5d4d0: 2f3c 8000 0000 movel #-2147483648,%sp@- <== NOT EXECUTED 5d4d6: 42a7 clrl %sp@- <== NOT EXECUTED 5d4d8: 4e94 jsr %a4@ <== NOT EXECUTED 5d4da: 508f addql #8,%sp <== NOT EXECUTED 5d4dc: 4a00 tstb %d0 <== NOT EXECUTED 5d4de: 6654 bnes 5d534 <rtems_rfs_dir_read+0x242> <== NOT EXECUTED
printf ("rtems-rfs: dir-read: next block: off:%" PRId64 " length:%zd\n",
offset, *length);
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
5d4e0: 486e fffc pea %fp@(-4) <== NOT EXECUTED 5d4e4: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5d4e6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5d4e8: 4eb9 0005 b35c jsr 5b35c <rtems_rfs_block_map_next_block> <== NOT EXECUTED
if (rc == ENXIO)
5d4ee: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5d4f2: 7206 moveq #6,%d1 <== NOT EXECUTED 5d4f4: b280 cmpl %d0,%d1 <== NOT EXECUTED 5d4f6: 676e beqs 5d566 <rtems_rfs_dir_read+0x274> <== NOT EXECUTED
/*
* Look for an empty entry and if this is the last block that is the end of
* the directory.
*/
while (rc == 0)
5d4f8: 4a80 tstl %d0 <== NOT EXECUTED 5d4fa: 6700 ff60 beqw 5d45c <rtems_rfs_dir_read+0x16a> <== NOT EXECUTED 5d4fe: 2800 movel %d0,%d4 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
5d500: 486e fff2 pea %fp@(-14) <== NOT EXECUTED
handle->dirty = false;
5d504: 4203 clrb %d3 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
5d506: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5d508: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
5d50e: 1d43 fff2 moveb %d3,%fp@(-14) <== NOT EXECUTED
if (rc == ENXIO)
rc = ENOENT;
}
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
5d512: 2f02 movel %d2,%sp@- <== NOT EXECUTED
handle->bnum = 0;
5d514: 42ae fff4 clrl %fp@(-12) <== NOT EXECUTED 5d518: 2f0a movel %a2,%sp@- <== NOT EXECUTED
handle->buffer = NULL;
5d51a: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED 5d51e: 4eb9 0005 af84 jsr 5af84 <rtems_rfs_block_map_close> <== NOT EXECUTED
return rc;
5d524: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
}
5d528: 2004 movel %d4,%d0 <== NOT EXECUTED 5d52a: 4cee 3cfc ff7c moveml %fp@(-132),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5d530: 4e5e unlk %fp <== NOT EXECUTED 5d532: 4e75 rts <== NOT EXECUTED
}
*length += rtems_rfs_fs_block_size (fs) - map.bpos.boff;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
printf ("rtems-rfs: dir-read: next block: off:%" PRId64 " length:%zd\n",
5d534: 2f13 movel %a3@,%sp@- <== NOT EXECUTED 5d536: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED 5d53a: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 5d53e: 4879 0007 4163 pea 74163 <CSWTCH.1+0xb87> <== NOT EXECUTED 5d544: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5d54a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
offset, *length);
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
5d54e: 486e fffc pea %fp@(-4) <== NOT EXECUTED 5d552: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5d554: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5d556: 4eb9 0005 b35c jsr 5b35c <rtems_rfs_block_map_next_block> <== NOT EXECUTED
if (rc == ENXIO)
5d55c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5d560: 7206 moveq #6,%d1 <== NOT EXECUTED 5d562: b280 cmpl %d0,%d1 <== NOT EXECUTED 5d564: 6692 bnes 5d4f8 <rtems_rfs_dir_read+0x206> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
5d566: 486e fff2 pea %fp@(-14) <== NOT EXECUTED
rc = ENOENT;
5d56a: 7802 moveq #2,%d4 <== NOT EXECUTED
handle->dirty = false;
5d56c: 4203 clrb %d3 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
5d56e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5d570: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
5d576: 1d43 fff2 moveb %d3,%fp@(-14) <== NOT EXECUTED
}
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
5d57a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
handle->bnum = 0;
5d57c: 42ae fff4 clrl %fp@(-12) <== NOT EXECUTED 5d580: 2f0a movel %a2,%sp@- <== NOT EXECUTED
handle->buffer = NULL;
5d582: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED 5d586: 4eb9 0005 af84 jsr 5af84 <rtems_rfs_block_map_close> <== NOT EXECUTED
return rc;
5d58c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5d590: 6096 bras 5d528 <rtems_rfs_dir_read+0x236> <== NOT EXECUTED 5d592: 2800 movel %d0,%d4 <== NOT EXECUTED
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
if (elength != RTEMS_RFS_DIR_ENTRY_EMPTY)
{
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
5d594: 700a moveq #10,%d0 <== NOT EXECUTED 5d596: 2d4d ffa4 movel %a5,%fp@(-92) <== NOT EXECUTED 5d59a: b085 cmpl %d5,%d0 <== NOT EXECUTED 5d59c: 6c10 bges 5d5ae <rtems_rfs_dir_read+0x2bc> <== NOT EXECUTED 5d59e: baaa 0018 cmpl %a2@(24),%d5 <== NOT EXECUTED 5d5a2: 640a bccs 5d5ae <rtems_rfs_dir_read+0x2bc> <== NOT EXECUTED 5d5a4: 4a83 tstl %d3 <== NOT EXECUTED 5d5a6: 6706 beqs 5d5ae <rtems_rfs_dir_read+0x2bc> <== NOT EXECUTED 5d5a8: b6aa 0010 cmpl %a2@(16),%d3 <== NOT EXECUTED 5d5ac: 6318 blss 5d5c6 <rtems_rfs_dir_read+0x2d4> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
5d5ae: 2f3c 8000 0000 movel #-2147483648,%sp@- <== NOT EXECUTED 5d5b4: 42a7 clrl %sp@- <== NOT EXECUTED 5d5b6: 4e94 jsr %a4@ <== NOT EXECUTED 5d5b8: 508f addql #8,%sp <== NOT EXECUTED 5d5ba: 4a00 tstb %d0 <== NOT EXECUTED 5d5bc: 6600 00ee bnew 5d6ac <rtems_rfs_dir_read+0x3ba> <== NOT EXECUTED
printf ("rtems-rfs: dir-read: "
"bad length or ino for ino %" PRIu32 ": %u/%" PRId32 " @ %04" PRIx32 "\n",
rtems_rfs_inode_ino (dir), elength, eino, map.bpos.boff);
rc = EIO;
5d5c0: 7805 moveq #5,%d4 <== NOT EXECUTED 5d5c2: 6000 ff3c braw 5d500 <rtems_rfs_dir_read+0x20e> <== NOT EXECUTED
break;
}
memset (dirent, 0, sizeof (struct dirent));
5d5c6: 4878 0110 pea 110 <DBL_MANT_DIG+0xdb> <== NOT EXECUTED 5d5ca: 42a7 clrl %sp@- <== NOT EXECUTED 5d5cc: 2f2e 0018 movel %fp@(24),%sp@- <== NOT EXECUTED 5d5d0: 4eb9 0006 2f48 jsr 62f48 <memset> <== NOT EXECUTED
dirent->d_off = offset;
5d5d6: 2a6e 0018 moveal %fp@(24),%a5 <== NOT EXECUTED
dirent->d_reclen = sizeof (struct dirent);
*length += elength;
5d5da: 2005 movel %d5,%d0 <== NOT EXECUTED 5d5dc: d093 addl %a3@,%d0 <== NOT EXECUTED
remaining = rtems_rfs_fs_block_size (fs) - (map.bpos.boff + elength);
if (remaining <= RTEMS_RFS_DIR_ENTRY_SIZE)
5d5de: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
break;
}
memset (dirent, 0, sizeof (struct dirent));
dirent->d_off = offset;
dirent->d_reclen = sizeof (struct dirent);
5d5e2: 323c 0110 movew #272,%d1 <== NOT EXECUTED
rc = EIO;
break;
}
memset (dirent, 0, sizeof (struct dirent));
dirent->d_off = offset;
5d5e6: 206e 0010 moveal %fp@(16),%a0 <== NOT EXECUTED 5d5ea: 226e 0014 moveal %fp@(20),%a1 <== NOT EXECUTED
dirent->d_reclen = sizeof (struct dirent);
5d5ee: 3b41 000c movew %d1,%a5@(12) <== NOT EXECUTED
rc = EIO;
break;
}
memset (dirent, 0, sizeof (struct dirent));
dirent->d_off = offset;
5d5f2: 2b48 0004 movel %a0,%a5@(4) <== NOT EXECUTED 5d5f6: 2b49 0008 movel %a1,%a5@(8) <== NOT EXECUTED
*length += elength;
remaining = rtems_rfs_fs_block_size (fs) - (map.bpos.boff + elength);
if (remaining <= RTEMS_RFS_DIR_ENTRY_SIZE)
5d5fa: 720a moveq #10,%d1 <== NOT EXECUTED
memset (dirent, 0, sizeof (struct dirent));
dirent->d_off = offset;
dirent->d_reclen = sizeof (struct dirent);
*length += elength;
5d5fc: 2680 movel %d0,%a3@ <== NOT EXECUTED
remaining = rtems_rfs_fs_block_size (fs) - (map.bpos.boff + elength);
5d5fe: 262a 0008 movel %a2@(8),%d3 <== NOT EXECUTED 5d602: 9686 subl %d6,%d3 <== NOT EXECUTED 5d604: 2c03 movel %d3,%d6 <== NOT EXECUTED 5d606: 9c85 subl %d5,%d6 <== NOT EXECUTED
if (remaining <= RTEMS_RFS_DIR_ENTRY_SIZE)
5d608: b286 cmpl %d6,%d1 <== NOT EXECUTED 5d60a: 6d04 blts 5d610 <rtems_rfs_dir_read+0x31e> <== NOT EXECUTED
*length += remaining;
5d60c: dc80 addl %d0,%d6 <== NOT EXECUTED 5d60e: 2686 movel %d6,%a3@ <== NOT EXECUTED
elength -= RTEMS_RFS_DIR_ENTRY_SIZE;
5d610: 0685 ffff fff6 addil #-10,%d5 <== NOT EXECUTED 5d616: 0c85 0000 00ff cmpil #255,%d5 <== NOT EXECUTED 5d61c: 6f06 bles 5d624 <rtems_rfs_dir_read+0x332> <== NOT EXECUTED 5d61e: 2a3c 0000 00ff movel #255,%d5 <== NOT EXECUTED
if (elength > NAME_MAX)
elength = NAME_MAX;
memcpy (dirent->d_name, entry + RTEMS_RFS_DIR_ENTRY_SIZE, elength);
5d624: 206e ffa4 moveal %fp@(-92),%a0 <== NOT EXECUTED
dirent->d_ino = rtems_rfs_dir_entry_ino (entry);
5d628: 4286 clrl %d6 <== NOT EXECUTED 5d62a: 4287 clrl %d7 <== NOT EXECUTED
elength -= RTEMS_RFS_DIR_ENTRY_SIZE;
if (elength > NAME_MAX)
elength = NAME_MAX;
memcpy (dirent->d_name, entry + RTEMS_RFS_DIR_ENTRY_SIZE, elength);
5d62c: 2f05 movel %d5,%sp@- <== NOT EXECUTED 5d62e: 4868 000a pea %a0@(10) <== NOT EXECUTED 5d632: 262e 0018 movel %fp@(24),%d3 <== NOT EXECUTED 5d636: 0683 0000 0010 addil #16,%d3 <== NOT EXECUTED 5d63c: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5d63e: 4eb9 0006 2df0 jsr 62df0 <memcpy> <== NOT EXECUTED
dirent->d_ino = rtems_rfs_dir_entry_ino (entry);
5d644: 226e ffa4 moveal %fp@(-92),%a1 <== NOT EXECUTED 5d648: 4280 clrl %d0 <== NOT EXECUTED 5d64a: 1011 moveb %a1@,%d0 <== NOT EXECUTED 5d64c: 1c29 0001 moveb %a1@(1),%d6 <== NOT EXECUTED 5d650: 7218 moveq #24,%d1 <== NOT EXECUTED 5d652: 1e29 0003 moveb %a1@(3),%d7 <== NOT EXECUTED 5d656: e3a8 lsll %d1,%d0 <== NOT EXECUTED 5d658: 4846 swap %d6 <== NOT EXECUTED 5d65a: 4246 clrw %d6 <== NOT EXECUTED 5d65c: 4281 clrl %d1 <== NOT EXECUTED 5d65e: 1229 0002 moveb %a1@(2),%d1 <== NOT EXECUTED 5d662: 8086 orl %d6,%d0 <== NOT EXECUTED 5d664: e189 lsll #8,%d1 <== NOT EXECUTED
dirent->d_namlen = elength;
5d666: 206e 0018 moveal %fp@(24),%a0 <== NOT EXECUTED
if (elength > NAME_MAX)
elength = NAME_MAX;
memcpy (dirent->d_name, entry + RTEMS_RFS_DIR_ENTRY_SIZE, elength);
dirent->d_ino = rtems_rfs_dir_entry_ino (entry);
5d66a: 8087 orl %d7,%d0 <== NOT EXECUTED
dirent->d_namlen = elength;
5d66c: 3145 000e movew %d5,%a0@(14) <== NOT EXECUTED
if (elength > NAME_MAX)
elength = NAME_MAX;
memcpy (dirent->d_name, entry + RTEMS_RFS_DIR_ENTRY_SIZE, elength);
dirent->d_ino = rtems_rfs_dir_entry_ino (entry);
5d670: 8081 orl %d1,%d0 <== NOT EXECUTED 5d672: 2080 movel %d0,%a0@ <== NOT EXECUTED
dirent->d_namlen = elength;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
5d674: 2f3c 8000 0000 movel #-2147483648,%sp@- <== NOT EXECUTED 5d67a: 42a7 clrl %sp@- <== NOT EXECUTED 5d67c: 4e94 jsr %a4@ <== NOT EXECUTED 5d67e: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 5d682: 4a00 tstb %d0 <== NOT EXECUTED 5d684: 6700 fe7a beqw 5d500 <rtems_rfs_dir_read+0x20e> <== NOT EXECUTED
printf ("rtems-rfs: dir-read: found off:%" PRIdoff_t " ino:%ld name=%s\n",
5d688: 226e 0018 moveal %fp@(24),%a1 <== NOT EXECUTED 5d68c: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5d68e: 2f11 movel %a1@,%sp@- <== NOT EXECUTED 5d690: 2f29 0008 movel %a1@(8),%sp@- <== NOT EXECUTED 5d694: 2f29 0004 movel %a1@(4),%sp@- <== NOT EXECUTED 5d698: 4879 0007 412e pea 7412e <CSWTCH.1+0xb52> <== NOT EXECUTED 5d69e: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5d6a4: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 5d6a8: 6000 fe56 braw 5d500 <rtems_rfs_dir_read+0x20e> <== NOT EXECUTED
if (elength != RTEMS_RFS_DIR_ENTRY_EMPTY)
{
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
printf ("rtems-rfs: dir-read: "
5d6ac: 2f2e ffba movel %fp@(-70),%sp@- <== NOT EXECUTED
"bad length or ino for ino %" PRIu32 ": %u/%" PRId32 " @ %04" PRIx32 "\n",
rtems_rfs_inode_ino (dir), elength, eino, map.bpos.boff);
rc = EIO;
5d6b0: 7805 moveq #5,%d4 <== NOT EXECUTED
if (elength != RTEMS_RFS_DIR_ENTRY_EMPTY)
{
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
printf ("rtems-rfs: dir-read: "
5d6b2: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 5d6b6: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5d6b8: 2f05 movel %d5,%sp@- <== NOT EXECUTED 5d6ba: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 5d6be: 4879 0007 40ea pea 740ea <CSWTCH.1+0xb0e> <== NOT EXECUTED 5d6c4: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5d6ca: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 5d6ce: 6000 fe30 braw 5d500 <rtems_rfs_dir_read+0x20e> <== NOT EXECUTED
0005ddee <rtems_rfs_file_close>:
}
int
rtems_rfs_file_close (rtems_rfs_file_system* fs,
rtems_rfs_file_handle* handle)
{
5ddee: 4e56 ffe8 linkw %fp,#-24 5ddf2: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@
int rrc;
int rc;
rrc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
5ddf6: 42a7 clrl %sp@- 5ddf8: 4878 0010 pea 10 <INVALID_OPERATION> 5ddfc: 47f9 0005 37c0 lea 537c0 <rtems_rfs_trace>,%a3
}
int
rtems_rfs_file_close (rtems_rfs_file_system* fs,
rtems_rfs_file_handle* handle)
{
5de02: 262e 0008 movel %fp@(8),%d3 5de06: 246e 000c moveal %fp@(12),%a2
int rrc;
int rc;
rrc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
5de0a: 4e93 jsr %a3@ 5de0c: 508f addql #8,%sp 5de0e: 4a00 tstb %d0 5de10: 6600 01f4 bnew 5e006 <rtems_rfs_file_close+0x218>
printf ("rtems-rfs: file-close: entry: ino=%" PRId32 "\n",
handle->shared->inode.ino);
if (handle->shared->references > 0)
5de14: 206a 001a moveal %a2@(26),%a0 5de18: 2028 0008 movel %a0@(8),%d0
5de1c: 6f06 bles 5de24 <rtems_rfs_file_close+0x36> <== NEVER TAKEN
handle->shared->references--;
5de1e: 5380 subql #1,%d0 5de20: 2140 0008 movel %d0,%a0@(8)
if (handle->shared->references == 0)
5de24: 4a80 tstl %d0 5de26: 6600 01aa bnew 5dfd2 <rtems_rfs_file_close+0x1e4>
{
if (!rtems_rfs_inode_is_loaded (&handle->shared->inode))
5de2a: 2268 0018 moveal %a0@(24),%a1 5de2e: 4a89 tstl %a1 5de30: 6700 029c beqw 5e0ce <rtems_rfs_file_close+0x2e0>
if (rrc == 0)
{
/*
* @todo This could be clever and only update if different.
*/
rtems_rfs_inode_set_atime (&handle->shared->inode,
5de34: 2028 0084 movel %a0@(132),%d0 <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_atime (rtems_rfs_inode_handle* handle,
rtems_rfs_time atime)
{
rtems_rfs_write_u32 (&handle->node->atime, atime);
5de38: 7218 moveq #24,%d1 <== NOT EXECUTED 5de3a: 2400 movel %d0,%d2 <== NOT EXECUTED 5de3c: e2aa lsrl %d1,%d2 <== NOT EXECUTED 5de3e: 2200 movel %d0,%d1 <== NOT EXECUTED 5de40: e089 lsrl #8,%d1 <== NOT EXECUTED 5de42: 1342 0010 moveb %d2,%a1@(16) <== NOT EXECUTED 5de46: 2400 movel %d0,%d2 <== NOT EXECUTED 5de48: 2268 0018 moveal %a0@(24),%a1 <== NOT EXECUTED 5de4c: 4242 clrw %d2 <== NOT EXECUTED 5de4e: 4842 swap %d2 <== NOT EXECUTED 5de50: 1342 0011 moveb %d2,%a1@(17) <== NOT EXECUTED 5de54: 2268 0018 moveal %a0@(24),%a1 <== NOT EXECUTED 5de58: 1341 0012 moveb %d1,%a1@(18) <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_mtime (rtems_rfs_inode_handle* handle,
rtems_rfs_time mtime)
{
rtems_rfs_write_u32 (&handle->node->mtime, mtime);
5de5c: 7218 moveq #24,%d1 <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_atime (rtems_rfs_inode_handle* handle,
rtems_rfs_time atime)
{
rtems_rfs_write_u32 (&handle->node->atime, atime);
5de5e: 2268 0018 moveal %a0@(24),%a1 <== NOT EXECUTED 5de62: 1340 0013 moveb %d0,%a1@(19) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
5de66: 7001 moveq #1,%d0 <== NOT EXECUTED 5de68: 1140 001c moveb %d0,%a0@(28) <== NOT EXECUTED
handle->shared->atime);
rtems_rfs_inode_set_mtime (&handle->shared->inode,
handle->shared->mtime);
5de6c: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
/*
* @todo This could be clever and only update if different.
*/
rtems_rfs_inode_set_atime (&handle->shared->inode,
handle->shared->atime);
rtems_rfs_inode_set_mtime (&handle->shared->inode,
5de70: 2028 0088 movel %a0@(136),%d0 <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_mtime (rtems_rfs_inode_handle* handle,
rtems_rfs_time mtime)
{
rtems_rfs_write_u32 (&handle->node->mtime, mtime);
5de74: 2400 movel %d0,%d2 <== NOT EXECUTED 5de76: e2aa lsrl %d1,%d2 <== NOT EXECUTED 5de78: 2200 movel %d0,%d1 <== NOT EXECUTED 5de7a: e089 lsrl #8,%d1 <== NOT EXECUTED 5de7c: 2268 0018 moveal %a0@(24),%a1 <== NOT EXECUTED 5de80: 1342 0014 moveb %d2,%a1@(20) <== NOT EXECUTED 5de84: 2400 movel %d0,%d2 <== NOT EXECUTED 5de86: 2268 0018 moveal %a0@(24),%a1 <== NOT EXECUTED 5de8a: 4242 clrw %d2 <== NOT EXECUTED 5de8c: 4842 swap %d2 <== NOT EXECUTED 5de8e: 1342 0015 moveb %d2,%a1@(21) <== NOT EXECUTED 5de92: 2268 0018 moveal %a0@(24),%a1 <== NOT EXECUTED 5de96: 1341 0016 moveb %d1,%a1@(22) <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_ctime (rtems_rfs_inode_handle* handle,
rtems_rfs_time ctime)
{
rtems_rfs_write_u32 (&handle->node->ctime, ctime);
5de9a: 7218 moveq #24,%d1 <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_mtime (rtems_rfs_inode_handle* handle,
rtems_rfs_time mtime)
{
rtems_rfs_write_u32 (&handle->node->mtime, mtime);
5de9c: 2268 0018 moveal %a0@(24),%a1 <== NOT EXECUTED 5dea0: 1340 0017 moveb %d0,%a1@(23) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
5dea4: 7001 moveq #1,%d0 <== NOT EXECUTED 5dea6: 1140 001c moveb %d0,%a0@(28) <== NOT EXECUTED
handle->shared->mtime);
rtems_rfs_inode_set_ctime (&handle->shared->inode,
handle->shared->ctime);
5deaa: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
*/
rtems_rfs_inode_set_atime (&handle->shared->inode,
handle->shared->atime);
rtems_rfs_inode_set_mtime (&handle->shared->inode,
handle->shared->mtime);
rtems_rfs_inode_set_ctime (&handle->shared->inode,
5deae: 2028 008c movel %a0@(140),%d0 <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_ctime (rtems_rfs_inode_handle* handle,
rtems_rfs_time ctime)
{
rtems_rfs_write_u32 (&handle->node->ctime, ctime);
5deb2: 2400 movel %d0,%d2 <== NOT EXECUTED 5deb4: e2aa lsrl %d1,%d2 <== NOT EXECUTED 5deb6: 2200 movel %d0,%d1 <== NOT EXECUTED 5deb8: e089 lsrl #8,%d1 <== NOT EXECUTED 5deba: 2268 0018 moveal %a0@(24),%a1 <== NOT EXECUTED 5debe: 1342 0018 moveb %d2,%a1@(24) <== NOT EXECUTED 5dec2: 2400 movel %d0,%d2 <== NOT EXECUTED 5dec4: 2268 0018 moveal %a0@(24),%a1 <== NOT EXECUTED 5dec8: 4242 clrw %d2 <== NOT EXECUTED 5deca: 4842 swap %d2 <== NOT EXECUTED 5decc: 1342 0019 moveb %d2,%a1@(25) <== NOT EXECUTED 5ded0: 2268 0018 moveal %a0@(24),%a1 <== NOT EXECUTED 5ded4: 1341 001a moveb %d1,%a1@(26) <== NOT EXECUTED 5ded8: 2268 0018 moveal %a0@(24),%a1 <== NOT EXECUTED 5dedc: 1340 001b moveb %d0,%a1@(27) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
5dee0: 7001 moveq #1,%d0 <== NOT EXECUTED 5dee2: 1140 001c moveb %d0,%a0@(28) <== NOT EXECUTED
handle->shared->ctime);
if (!rtems_rfs_block_size_equal (&handle->shared->size,
5dee6: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED 5deea: 2028 007c movel %a0@(124),%d0 <== NOT EXECUTED 5deee: b0a8 0038 cmpl %a0@(56),%d0 <== NOT EXECUTED 5def2: 6700 01c8 beqw 5e0bc <rtems_rfs_file_close+0x2ce> <== NOT EXECUTED
5def6: 2228 0080 movel %a0@(128),%d1
*/
static inline void
rtems_rfs_block_map_set_size (rtems_rfs_block_map* map,
rtems_rfs_block_size* size)
{
rtems_rfs_block_copy_size (&map->size, size);
5defa: 2141 003c movel %d1,%a0@(60)
map->dirty = true;
5defe: 4282 clrl %d2 5df00: 7201 moveq #1,%d1
*/
static inline void
rtems_rfs_block_map_set_size (rtems_rfs_block_map* map,
rtems_rfs_block_size* size)
{
rtems_rfs_block_copy_size (&map->size, size);
5df02: 2140 0038 movel %d0,%a0@(56)
map->dirty = true;
5df06: 1141 0032 moveb %d1,%a0@(50)
&handle->shared->map.size))
rtems_rfs_block_map_set_size (&handle->shared->map,
&handle->shared->size);
}
rc = rtems_rfs_block_map_close (fs, &handle->shared->map);
5df0a: 4868 0032 pea %a0@(50) 5df0e: 2f03 movel %d3,%sp@- 5df10: 4eb9 0005 af84 jsr 5af84 <rtems_rfs_block_map_close>
if (rc > 0)
5df16: 508f addql #8,%sp
&handle->shared->map.size))
rtems_rfs_block_map_set_size (&handle->shared->map,
&handle->shared->size);
}
rc = rtems_rfs_block_map_close (fs, &handle->shared->map);
5df18: 2800 movel %d0,%d4
if (rc > 0)
5df1a: 6f16 bles 5df32 <rtems_rfs_file_close+0x144> <== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
5df1c: 42a7 clrl %sp@- <== NOT EXECUTED 5df1e: 4878 0010 pea 10 <INVALID_OPERATION> <== NOT EXECUTED 5df22: 4e93 jsr %a3@ <== NOT EXECUTED 5df24: 508f addql #8,%sp <== NOT EXECUTED 5df26: 4a00 tstb %d0 <== NOT EXECUTED 5df28: 6600 016a bnew 5e094 <rtems_rfs_file_close+0x2a6> <== NOT EXECUTED
printf ("rtems-rfs: file-close: map close error: ino=%" PRId32 ": %d: %s\n",
handle->shared->inode.ino, rc, strerror (rc));
if (rrc == 0)
5df2c: 4a82 tstl %d2 <== NOT EXECUTED 5df2e: 6602 bnes 5df32 <rtems_rfs_file_close+0x144> <== NOT EXECUTED 5df30: 2404 movel %d4,%d2 <== NOT EXECUTED
rrc = rc;
}
rc = rtems_rfs_inode_close (fs, &handle->shared->inode);
5df32: 206a 001a moveal %a2@(26),%a0 5df36: 41e8 000c lea %a0@(12),%a0 5df3a: 2f08 movel %a0,%sp@- 5df3c: 2f03 movel %d3,%sp@- 5df3e: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close>
if (rc > 0)
5df44: 508f addql #8,%sp
handle->shared->inode.ino, rc, strerror (rc));
if (rrc == 0)
rrc = rc;
}
rc = rtems_rfs_inode_close (fs, &handle->shared->inode);
5df46: 2800 movel %d0,%d4
if (rc > 0)
5df48: 6f00 0100 blew 5e04a <rtems_rfs_file_close+0x25c>
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
5df4c: 42a7 clrl %sp@- <== NOT EXECUTED 5df4e: 4878 0010 pea 10 <INVALID_OPERATION> <== NOT EXECUTED 5df52: 4e93 jsr %a3@ <== NOT EXECUTED 5df54: 508f addql #8,%sp <== NOT EXECUTED 5df56: 4a00 tstb %d0 <== NOT EXECUTED 5df58: 6600 00c6 bnew 5e020 <rtems_rfs_file_close+0x232> <== NOT EXECUTED
printf ("rtems-rfs: file-close: inode close error: ino=%" PRId32 ": %d: %s\n",
handle->shared->inode.ino, rc, strerror (rc));
if (rrc == 0)
5df5c: 4a82 tstl %d2 <== NOT EXECUTED 5df5e: 6600 00ea bnew 5e04a <rtems_rfs_file_close+0x25c> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
5df62: 2f2a 001a movel %a2@(26),%sp@- <== NOT EXECUTED
rrc = rc;
}
rtems_chain_extract (&handle->shared->link);
free (handle->shared);
5df66: 49f9 0004 680c lea 4680c <free>,%a4 <== NOT EXECUTED 5df6c: 2404 movel %d4,%d2 <== NOT EXECUTED 5df6e: 4eb9 0004 bb78 jsr 4bb78 <_Chain_Extract> <== NOT EXECUTED 5df74: 2f2a 001a movel %a2@(26),%sp@- <== NOT EXECUTED 5df78: 4e94 jsr %a4@ <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
5df7a: 486a 0004 pea %a2@(4) <== NOT EXECUTED 5df7e: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5df80: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false; handle->bnum = 0; handle->buffer = NULL;
5df86: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
handle->dirty = false;
5df8a: 4200 clrb %d0 <== NOT EXECUTED
handle->bnum = 0;
5df8c: 42aa 0006 clrl %a2@(6) <== NOT EXECUTED
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
handle->dirty = false;
5df90: 1540 0004 moveb %d0,%a2@(4) <== NOT EXECUTED
handle->bnum = 0; handle->buffer = NULL;
5df94: 42aa 000a clrl %a2@(10) <== NOT EXECUTED
if ((rrc == 0) && (rc > 0))
rrc = rc;
if (rrc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
5df98: 42a7 clrl %sp@- <== NOT EXECUTED 5df9a: 4878 0010 pea 10 <INVALID_OPERATION> <== NOT EXECUTED 5df9e: 4e93 jsr %a3@ <== NOT EXECUTED 5dfa0: 508f addql #8,%sp <== NOT EXECUTED 5dfa2: 4a00 tstb %d0 <== NOT EXECUTED 5dfa4: 671c beqs 5dfc2 <rtems_rfs_file_close+0x1d4> <== NOT EXECUTED
printf ("rtems-rfs: file-close: result: %d: %s\n", rrc, strerror (rrc));
5dfa6: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5dfa8: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED 5dfae: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5dfb0: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5dfb2: 4879 0007 436f pea 7436f <CSWTCH.1+0xd93> <== NOT EXECUTED 5dfb8: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5dfbe: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
}
free (handle);
5dfc2: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5dfc4: 4e94 jsr %a4@ <== NOT EXECUTED
return rrc;
}
5dfc6: 2002 movel %d2,%d0 <== NOT EXECUTED 5dfc8: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 <== NOT EXECUTED 5dfce: 4e5e unlk %fp <== NOT EXECUTED 5dfd0: 4e75 rts <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
5dfd2: 486a 0004 pea %a2@(4) <== NOT EXECUTED 5dfd6: 49f9 0004 680c lea 4680c <free>,%a4 <== NOT EXECUTED
rtems_rfs_file_handle* handle)
{
int rrc;
int rc;
rrc = 0;
5dfdc: 4282 clrl %d2 <== NOT EXECUTED 5dfde: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5dfe0: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false; handle->bnum = 0; handle->buffer = NULL;
5dfe6: 508f addql #8,%sp <== NOT EXECUTED
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
handle->dirty = false;
5dfe8: 4201 clrb %d1 <== NOT EXECUTED
handle->bnum = 0;
5dfea: 42aa 0006 clrl %a2@(6) <== NOT EXECUTED
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
handle->dirty = false;
5dfee: 1541 0004 moveb %d1,%a2@(4) <== NOT EXECUTED
handle->bnum = 0; handle->buffer = NULL;
5dff2: 42aa 000a clrl %a2@(10) <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
printf ("rtems-rfs: file-close: result: %d: %s\n", rrc, strerror (rrc));
}
free (handle);
5dff6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5dff8: 4e94 jsr %a4@ <== NOT EXECUTED
return rrc;
}
5dffa: 2002 movel %d2,%d0 <== NOT EXECUTED 5dffc: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 <== NOT EXECUTED 5e002: 4e5e unlk %fp <== NOT EXECUTED 5e004: 4e75 rts <== NOT EXECUTED
rrc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
printf ("rtems-rfs: file-close: entry: ino=%" PRId32 "\n",
handle->shared->inode.ino);
5e006: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
int rc;
rrc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
printf ("rtems-rfs: file-close: entry: ino=%" PRId32 "\n",
5e00a: 2f28 0014 movel %a0@(20),%sp@- <== NOT EXECUTED 5e00e: 4879 0007 42d4 pea 742d4 <CSWTCH.1+0xcf8> <== NOT EXECUTED 5e014: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5e01a: 508f addql #8,%sp <== NOT EXECUTED 5e01c: 6000 fdf6 braw 5de14 <rtems_rfs_file_close+0x26> <== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &handle->shared->inode);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
printf ("rtems-rfs: file-close: inode close error: ino=%" PRId32 ": %d: %s\n",
5e020: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5e022: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED
handle->shared->inode.ino, rc, strerror (rc));
5e028: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &handle->shared->inode);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
printf ("rtems-rfs: file-close: inode close error: ino=%" PRId32 ": %d: %s\n",
5e02c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5e02e: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5e030: 2f28 0014 movel %a0@(20),%sp@- <== NOT EXECUTED 5e034: 4879 0007 4334 pea 74334 <CSWTCH.1+0xd58> <== NOT EXECUTED 5e03a: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5e040: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
handle->shared->inode.ino, rc, strerror (rc));
if (rrc == 0)
5e044: 4a82 tstl %d2 <== NOT EXECUTED 5e046: 6700 ff1a beqw 5df62 <rtems_rfs_file_close+0x174> <== NOT EXECUTED
5e04a: 2f2a 001a movel %a2@(26),%sp@-
rrc = rc;
}
rtems_chain_extract (&handle->shared->link);
free (handle->shared);
5e04e: 49f9 0004 680c lea 4680c <free>,%a4 5e054: 4eb9 0004 bb78 jsr 4bb78 <_Chain_Extract> 5e05a: 2f2a 001a movel %a2@(26),%sp@- 5e05e: 4e94 jsr %a4@
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
5e060: 486a 0004 pea %a2@(4) 5e064: 2f03 movel %d3,%sp@- 5e066: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release>
rc = rtems_rfs_buffer_handle_close (fs, &handle->buffer);
if ((rrc == 0) && (rc > 0))
rrc = rc;
if (rrc > 0)
5e06c: 4fef 0010 lea %sp@(16),%sp
handle->dirty = false;
5e070: 4200 clrb %d0
handle->bnum = 0;
5e072: 42aa 0006 clrl %a2@(6)
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
handle->dirty = false;
5e076: 1540 0004 moveb %d0,%a2@(4)
handle->bnum = 0; handle->buffer = NULL;
5e07a: 42aa 000a clrl %a2@(10) 5e07e: 4a82 tstl %d2 5e080: 6e00 ff16 bgtw 5df98 <rtems_rfs_file_close+0x1aa>
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
printf ("rtems-rfs: file-close: result: %d: %s\n", rrc, strerror (rrc));
}
free (handle);
5e084: 2f0a movel %a2,%sp@- 5e086: 4e94 jsr %a4@
return rrc;
}
5e088: 2002 movel %d2,%d0 5e08a: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 5e090: 4e5e unlk %fp 5e092: 4e75 rts
rc = rtems_rfs_block_map_close (fs, &handle->shared->map);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
printf ("rtems-rfs: file-close: map close error: ino=%" PRId32 ": %d: %s\n",
5e094: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5e096: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED
handle->shared->inode.ino, rc, strerror (rc));
5e09c: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
rc = rtems_rfs_block_map_close (fs, &handle->shared->map);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
printf ("rtems-rfs: file-close: map close error: ino=%" PRId32 ": %d: %s\n",
5e0a0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5e0a2: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5e0a4: 2f28 0014 movel %a0@(20),%sp@- <== NOT EXECUTED 5e0a8: 4879 0007 42fb pea 742fb <CSWTCH.1+0xd1f> <== NOT EXECUTED 5e0ae: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5e0b4: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 5e0b8: 6000 fe72 braw 5df2c <rtems_rfs_file_close+0x13e> <== NOT EXECUTED
handle->shared->atime);
rtems_rfs_inode_set_mtime (&handle->shared->inode,
handle->shared->mtime);
rtems_rfs_inode_set_ctime (&handle->shared->inode,
handle->shared->ctime);
if (!rtems_rfs_block_size_equal (&handle->shared->size,
5e0bc: 2228 0080 movel %a0@(128),%d1 5e0c0: b2a8 003c cmpl %a0@(60),%d1 5e0c4: 6600 fe34 bnew 5defa <rtems_rfs_file_close+0x10c> 5e0c8: 4282 clrl %d2 5e0ca: 6000 fe3e braw 5df0a <rtems_rfs_file_close+0x11c>
handle->shared->references--;
if (handle->shared->references == 0)
{
if (!rtems_rfs_inode_is_loaded (&handle->shared->inode))
rrc = rtems_rfs_inode_load (fs, &handle->shared->inode);
5e0ce: 4868 000c pea %a0@(12) 5e0d2: 2f03 movel %d3,%sp@- 5e0d4: 4eb9 0005 0264 jsr 50264 <rtems_rfs_inode_load>
if (rrc == 0)
5e0da: 206a 001a moveal %a2@(26),%a0
handle->shared->references--;
if (handle->shared->references == 0)
{
if (!rtems_rfs_inode_is_loaded (&handle->shared->inode))
rrc = rtems_rfs_inode_load (fs, &handle->shared->inode);
5e0de: 2400 movel %d0,%d2
if (rrc == 0)
5e0e0: 508f addql #8,%sp 5e0e2: 6600 fe26 bnew 5df0a <rtems_rfs_file_close+0x11c>
{
/*
* @todo This could be clever and only update if different.
*/
rtems_rfs_inode_set_atime (&handle->shared->inode,
5e0e6: 2028 0084 movel %a0@(132),%d0
*/
static inline void
rtems_rfs_inode_set_atime (rtems_rfs_inode_handle* handle,
rtems_rfs_time atime)
{
rtems_rfs_write_u32 (&handle->node->atime, atime);
5e0ea: 7218 moveq #24,%d1 5e0ec: 2400 movel %d0,%d2 5e0ee: e2aa lsrl %d1,%d2 5e0f0: 2200 movel %d0,%d1 5e0f2: e089 lsrl #8,%d1
if (handle->shared->references == 0)
{
if (!rtems_rfs_inode_is_loaded (&handle->shared->inode))
rrc = rtems_rfs_inode_load (fs, &handle->shared->inode);
if (rrc == 0)
5e0f4: 2268 0018 moveal %a0@(24),%a1 5e0f8: 1342 0010 moveb %d2,%a1@(16) 5e0fc: 2400 movel %d0,%d2 5e0fe: 2268 0018 moveal %a0@(24),%a1 5e102: 4242 clrw %d2 5e104: 4842 swap %d2 5e106: 1342 0011 moveb %d2,%a1@(17) 5e10a: 2268 0018 moveal %a0@(24),%a1 5e10e: 1341 0012 moveb %d1,%a1@(18)
*/
static inline void
rtems_rfs_inode_set_mtime (rtems_rfs_inode_handle* handle,
rtems_rfs_time mtime)
{
rtems_rfs_write_u32 (&handle->node->mtime, mtime);
5e112: 7218 moveq #24,%d1
*/
static inline void
rtems_rfs_inode_set_atime (rtems_rfs_inode_handle* handle,
rtems_rfs_time atime)
{
rtems_rfs_write_u32 (&handle->node->atime, atime);
5e114: 2268 0018 moveal %a0@(24),%a1 5e118: 1340 0013 moveb %d0,%a1@(19)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
5e11c: 7001 moveq #1,%d0 5e11e: 1140 001c moveb %d0,%a0@(28)
* @todo This could be clever and only update if different.
*/
rtems_rfs_inode_set_atime (&handle->shared->inode,
handle->shared->atime);
rtems_rfs_inode_set_mtime (&handle->shared->inode,
handle->shared->mtime);
5e122: 206a 001a moveal %a2@(26),%a0
/*
* @todo This could be clever and only update if different.
*/
rtems_rfs_inode_set_atime (&handle->shared->inode,
handle->shared->atime);
rtems_rfs_inode_set_mtime (&handle->shared->inode,
5e126: 2028 0088 movel %a0@(136),%d0
*/
static inline void
rtems_rfs_inode_set_mtime (rtems_rfs_inode_handle* handle,
rtems_rfs_time mtime)
{
rtems_rfs_write_u32 (&handle->node->mtime, mtime);
5e12a: 2400 movel %d0,%d2 5e12c: e2aa lsrl %d1,%d2 5e12e: 2200 movel %d0,%d1 5e130: e089 lsrl #8,%d1 5e132: 2268 0018 moveal %a0@(24),%a1 5e136: 1342 0014 moveb %d2,%a1@(20) 5e13a: 2400 movel %d0,%d2 5e13c: 2268 0018 moveal %a0@(24),%a1 5e140: 4242 clrw %d2 5e142: 4842 swap %d2 5e144: 1342 0015 moveb %d2,%a1@(21) 5e148: 2268 0018 moveal %a0@(24),%a1 5e14c: 1341 0016 moveb %d1,%a1@(22)
*/
static inline void
rtems_rfs_inode_set_ctime (rtems_rfs_inode_handle* handle,
rtems_rfs_time ctime)
{
rtems_rfs_write_u32 (&handle->node->ctime, ctime);
5e150: 7218 moveq #24,%d1
*/
static inline void
rtems_rfs_inode_set_mtime (rtems_rfs_inode_handle* handle,
rtems_rfs_time mtime)
{
rtems_rfs_write_u32 (&handle->node->mtime, mtime);
5e152: 2268 0018 moveal %a0@(24),%a1 5e156: 1340 0017 moveb %d0,%a1@(23)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
5e15a: 7001 moveq #1,%d0 5e15c: 1140 001c moveb %d0,%a0@(28)
handle->shared->mtime);
rtems_rfs_inode_set_ctime (&handle->shared->inode,
handle->shared->ctime);
5e160: 206a 001a moveal %a2@(26),%a0
*/
rtems_rfs_inode_set_atime (&handle->shared->inode,
handle->shared->atime);
rtems_rfs_inode_set_mtime (&handle->shared->inode,
handle->shared->mtime);
rtems_rfs_inode_set_ctime (&handle->shared->inode,
5e164: 2028 008c movel %a0@(140),%d0
*/
static inline void
rtems_rfs_inode_set_ctime (rtems_rfs_inode_handle* handle,
rtems_rfs_time ctime)
{
rtems_rfs_write_u32 (&handle->node->ctime, ctime);
5e168: 2400 movel %d0,%d2 5e16a: e2aa lsrl %d1,%d2 5e16c: 2200 movel %d0,%d1 5e16e: e089 lsrl #8,%d1 5e170: 2268 0018 moveal %a0@(24),%a1 5e174: 1342 0018 moveb %d2,%a1@(24) 5e178: 2400 movel %d0,%d2 5e17a: 2268 0018 moveal %a0@(24),%a1 5e17e: 4242 clrw %d2 5e180: 4842 swap %d2 5e182: 1342 0019 moveb %d2,%a1@(25) 5e186: 2268 0018 moveal %a0@(24),%a1 5e18a: 1341 001a moveb %d1,%a1@(26) 5e18e: 2268 0018 moveal %a0@(24),%a1 5e192: 1340 001b moveb %d0,%a1@(27)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
5e196: 7001 moveq #1,%d0 5e198: 1140 001c moveb %d0,%a0@(28)
handle->shared->ctime);
if (!rtems_rfs_block_size_equal (&handle->shared->size,
5e19c: 206a 001a moveal %a2@(26),%a0 5e1a0: 2028 007c movel %a0@(124),%d0 5e1a4: b0a8 0038 cmpl %a0@(56),%d0 5e1a8: 6600 fd4c bnew 5def6 <rtems_rfs_file_close+0x108> 5e1ac: 6000 ff0e braw 5e0bc <rtems_rfs_file_close+0x2ce>
0005ea1a <rtems_rfs_file_get_shared>:
}
rtems_rfs_file_shared*
rtems_rfs_file_get_shared (rtems_rfs_file_system* fs,
rtems_rfs_ino ino)
{
5ea1a: 4e56 0000 linkw %fp,#0 5ea1e: 206e 0008 moveal %fp@(8),%a0
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Tail(the_chain));
5ea22: 2008 movel %a0,%d0 5ea24: 0680 0000 0074 addil #116,%d0 5ea2a: 222e 000c movel %fp@(12),%d1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
5ea2e: 2068 0070 moveal %a0@(112),%a0
rtems_chain_node* node; node = rtems_chain_first (&fs->file_shares); while (!rtems_chain_is_tail (&fs->file_shares, node))
5ea32: b088 cmpl %a0,%d0
5ea34: 670c beqs 5ea42 <rtems_rfs_file_get_shared+0x28> <== ALWAYS TAKEN
{
rtems_rfs_file_shared* shared;
shared = (rtems_rfs_file_shared*) node;
if (shared->inode.ino == ino)
5ea36: b2a8 0014 cmpl %a0@(20),%d1 <== NOT EXECUTED 5ea3a: 670c beqs 5ea48 <rtems_rfs_file_get_shared+0x2e> <== NOT EXECUTED
return shared;
node = rtems_chain_next (node);
}
return NULL;
}
5ea3c: 2050 moveal %a0@,%a0 <== NOT EXECUTED
rtems_rfs_file_get_shared (rtems_rfs_file_system* fs,
rtems_rfs_ino ino)
{
rtems_chain_node* node;
node = rtems_chain_first (&fs->file_shares);
while (!rtems_chain_is_tail (&fs->file_shares, node))
5ea3e: b088 cmpl %a0,%d0 <== NOT EXECUTED 5ea40: 66f4 bnes 5ea36 <rtems_rfs_file_get_shared+0x1c> <== NOT EXECUTED
shared = (rtems_rfs_file_shared*) node;
if (shared->inode.ino == ino)
return shared;
node = rtems_chain_next (node);
}
return NULL;
5ea42: 4280 clrl %d0
}
5ea44: 4e5e unlk %fp 5ea46: 4e75 rts
5ea48: 2008 movel %a0,%d0 <== NOT EXECUTED 5ea4a: 4e5e unlk %fp <== NOT EXECUTED
...
0005e39c <rtems_rfs_file_io_end>:
int
rtems_rfs_file_io_end (rtems_rfs_file_handle* handle,
size_t size,
bool read)
{
5e39c: 4e56 ffe4 linkw %fp,#-28 5e3a0: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@
bool atime;
bool mtime;
bool length;
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
5e3a4: 42a7 clrl %sp@- 5e3a6: 4878 0020 pea 20 <OPER2+0xc> 5e3aa: 47f9 0005 37c0 lea 537c0 <rtems_rfs_trace>,%a3
int
rtems_rfs_file_io_end (rtems_rfs_file_handle* handle,
size_t size,
bool read)
{
5e3b0: 246e 0008 moveal %fp@(8),%a2 5e3b4: 282e 000c movel %fp@(12),%d4 5e3b8: 162e 0013 moveb %fp@(19),%d3
bool atime;
bool mtime;
bool length;
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
5e3bc: 4e93 jsr %a3@ 5e3be: 508f addql #8,%sp 5e3c0: 4a00 tstb %d0
5e3c2: 6724 beqs 5e3e8 <rtems_rfs_file_io_end+0x4c> <== ALWAYS TAKEN
printf ("rtems-rfs: file-io: end: %s size=%zu\n",
5e3c4: 203c 0007 11ac movel #463276,%d0 <== NOT EXECUTED 5e3ca: 4a03 tstb %d3 <== NOT EXECUTED 5e3cc: 6706 beqs 5e3d4 <rtems_rfs_file_io_end+0x38> <== NOT EXECUTED 5e3ce: 203c 0007 320a movel #471562,%d0 <== NOT EXECUTED 5e3d4: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5e3d6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5e3d8: 4879 0007 4447 pea 74447 <CSWTCH.1+0xe6b> <== NOT EXECUTED 5e3de: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5e3e4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
read ? "read" : "write", size);
if (rtems_rfs_buffer_handle_has_block (&handle->buffer))
5e3e8: 4aaa 000a tstl %a2@(10)
5e3ec: 675c beqs 5e44a <rtems_rfs_file_io_end+0xae> <== NEVER TAKEN
{
if (!read)
5e3ee: 4a03 tstb %d3
5e3f0: 6606 bnes 5e3f8 <rtems_rfs_file_io_end+0x5c>
rtems_rfs_buffer_mark_dirty (rtems_rfs_file_buffer (handle));
5e3f2: 7001 moveq #1,%d0 5e3f4: 1540 0004 moveb %d0,%a2@(4)
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
5e3f8: 486a 0004 pea %a2@(4) 5e3fc: 206a 001a moveal %a2@(26),%a0 5e400: 2f28 0090 movel %a0@(144),%sp@- 5e404: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release>
rtems_rfs_file_buffer (handle));
if (rc > 0)
5e40a: 508f addql #8,%sp
if (rtems_rfs_buffer_handle_has_block (&handle->buffer))
{
if (!read)
rtems_rfs_buffer_mark_dirty (rtems_rfs_file_buffer (handle));
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
5e40c: 2400 movel %d0,%d2
rtems_rfs_file_buffer (handle));
if (rc > 0)
5e40e: 6f3c bles 5e44c <rtems_rfs_file_io_end+0xb0> <== ALWAYS TAKEN
{
printf (
5e410: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5e412: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED 5e418: 588f addql #4,%sp <== NOT EXECUTED 5e41a: 223c 0007 11ac movel #463276,%d1 <== NOT EXECUTED 5e420: 4a03 tstb %d3 <== NOT EXECUTED 5e422: 6600 0150 bnew 5e574 <rtems_rfs_file_io_end+0x1d8> <== NOT EXECUTED 5e426: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5e428: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5e42a: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5e42c: 2f01 movel %d1,%sp@- <== NOT EXECUTED 5e42e: 4879 0007 446f pea 7446f <CSWTCH.1+0xe93> <== NOT EXECUTED 5e434: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED
"rtems-rfs: file-io: end: error on release: %s size=%zu: %d: %s\n",
read ? "read" : "write", size, rc, strerror (rc));
return rc;
5e43a: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
handle->shared->size.offset =
rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle));
}
return rc;
}
5e43e: 2002 movel %d2,%d0 5e440: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 5e446: 4e5e unlk %fp 5e448: 4e75 rts
bool read)
{
bool atime;
bool mtime;
bool length;
int rc = 0;
5e44a: 4282 clrl %d2 <== NOT EXECUTED
* the size with the new length. The map holds the block count.
*/
handle->bpos.boff += size;
if (handle->bpos.boff >=
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))
5e44c: 206a 001a moveal %a2@(26),%a0
* increase the block number and adjust the offset. * * If we are the last block and the position is past the current size update * the size with the new length. The map holds the block count. */ handle->bpos.boff += size;
5e450: d8aa 0012 addl %a2@(18),%d4
if (handle->bpos.boff >=
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))
5e454: 2268 0090 moveal %a0@(144),%a1 5e458: 2029 0008 movel %a1@(8),%d0
* increase the block number and adjust the offset. * * If we are the last block and the position is past the current size update * the size with the new length. The map holds the block count. */ handle->bpos.boff += size;
5e45c: 2544 0012 movel %d4,%a2@(18)
if (handle->bpos.boff >=
5e460: b084 cmpl %d4,%d0
5e462: 620a bhis 5e46e <rtems_rfs_file_io_end+0xd2> <== ALWAYS TAKEN
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))
{
handle->bpos.bno++;
handle->bpos.boff -= rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
5e464: 9880 subl %d0,%d4 <== NOT EXECUTED
handle->bpos.boff += size;
if (handle->bpos.boff >=
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))
{
handle->bpos.bno++;
5e466: 52aa 000e addql #1,%a2@(14) <== NOT EXECUTED
handle->bpos.boff -= rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
5e46a: 2544 0012 movel %d4,%a2@(18) <== NOT EXECUTED
}
length = false;
mtime = false;
if (!read &&
5e46e: 4a03 tstb %d3 5e470: 6600 00be bnew 5e530 <rtems_rfs_file_io_end+0x194>
rtems_rfs_block_map_past_end (rtems_rfs_file_map (handle),
5e474: 202a 000e movel %a2@(14),%d0 5e478: 2228 0038 movel %a0@(56),%d1
}
length = false;
mtime = false;
if (!read &&
5e47c: 4a80 tstl %d0 5e47e: 6700 00a2 beqw 5e522 <rtems_rfs_file_io_end+0x186>
rtems_rfs_block_map_past_end (rtems_rfs_file_map (handle),
5e482: 4a81 tstl %d1 <== NOT EXECUTED 5e484: 6600 009c bnew 5e522 <rtems_rfs_file_io_end+0x186> <== NOT EXECUTED 5e488: 202a 0012 movel %a2@(18),%d0 <== NOT EXECUTED
static inline void
rtems_rfs_block_map_set_size_offset (rtems_rfs_block_map* map,
rtems_rfs_block_off offset)
{
map->size.offset = offset;
map->dirty = true;
5e48c: 7201 moveq #1,%d1 <== NOT EXECUTED
rtems_rfs_file_bpos (handle)))
{
rtems_rfs_block_map_set_size_offset (rtems_rfs_file_map (handle),
handle->bpos.boff);
length = true;
mtime = true;
5e48e: 7801 moveq #1,%d4 <== NOT EXECUTED
*/
static inline void
rtems_rfs_block_map_set_size_offset (rtems_rfs_block_map* map,
rtems_rfs_block_off offset)
{
map->size.offset = offset;
5e490: 2140 003c movel %d0,%a0@(60) <== NOT EXECUTED
map->dirty = true;
5e494: 1141 0032 moveb %d1,%a0@(50) <== NOT EXECUTED
}
atime = rtems_rfs_file_update_atime (handle);
5e498: 2012 movel %a2@,%d0 5e49a: 2a00 movel %d0,%d5 5e49c: 4685 notl %d5 5e49e: 7201 moveq #1,%d1 5e4a0: ca81 andl %d1,%d5
mtime = rtems_rfs_file_update_mtime (handle) && mtime;
5e4a2: 0800 0001 btst #1,%d0 5e4a6: 6600 009c bnew 5e544 <rtems_rfs_file_io_end+0x1a8> 5e4aa: 1c04 moveb %d4,%d6
length = rtems_rfs_file_update_length (handle) && length;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
5e4ac: 42a7 clrl %sp@- 5e4ae: 4878 0020 pea 20 <OPER2+0xc>
mtime = true;
}
atime = rtems_rfs_file_update_atime (handle);
mtime = rtems_rfs_file_update_mtime (handle) && mtime;
length = rtems_rfs_file_update_length (handle) && length;
5e4b2: 44c0 movew %d0,%ccr 5e4b4: 56c0 sne %d0 5e4b6: c880 andl %d0,%d4
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
5e4b8: 4e93 jsr %a3@ 5e4ba: 508f addql #8,%sp 5e4bc: 4a00 tstb %d0
5e4be: 6738 beqs 5e4f8 <rtems_rfs_file_io_end+0x15c> <== ALWAYS TAKEN
printf ("rtems-rfs: file-io: end: pos=%" PRIu32 ":%" PRIu32 " %c %c %c\n",
5e4c0: 4a04 tstb %d4 <== NOT EXECUTED 5e4c2: 6700 00d2 beqw 5e596 <rtems_rfs_file_io_end+0x1fa> <== NOT EXECUTED 5e4c6: 307c 004c moveaw #76,%a0 <== NOT EXECUTED 5e4ca: 4a06 tstb %d6 <== NOT EXECUTED 5e4cc: 6700 00d2 beqw 5e5a0 <rtems_rfs_file_io_end+0x204> <== NOT EXECUTED 5e4d0: 724d moveq #77,%d1 <== NOT EXECUTED 5e4d2: 4a05 tstb %d5 <== NOT EXECUTED 5e4d4: 6700 00d2 beqw 5e5a8 <rtems_rfs_file_io_end+0x20c> <== NOT EXECUTED 5e4d8: 2f08 movel %a0,%sp@- <== NOT EXECUTED 5e4da: 7041 moveq #65,%d0 <== NOT EXECUTED 5e4dc: 2f01 movel %d1,%sp@- <== NOT EXECUTED 5e4de: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5e4e0: 2f2a 0012 movel %a2@(18),%sp@- <== NOT EXECUTED 5e4e4: 2f2a 000e movel %a2@(14),%sp@- <== NOT EXECUTED 5e4e8: 4879 0007 44b1 pea 744b1 <CSWTCH.1+0xed5> <== NOT EXECUTED 5e4ee: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5e4f4: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
handle->bpos.bno, handle->bpos.boff,
atime ? 'A' : '-', mtime ? 'M' : '-', length ? 'L' : '-');
if (atime || mtime)
5e4f8: 4a05 tstb %d5
5e4fa: 664e bnes 5e54a <rtems_rfs_file_io_end+0x1ae> <== ALWAYS TAKEN
5e4fc: 4a06 tstb %d6 <== NOT EXECUTED 5e4fe: 664a bnes 5e54a <rtems_rfs_file_io_end+0x1ae> <== NOT EXECUTED
if (read && atime)
handle->shared->atime = now;
if (!read && mtime)
handle->shared->mtime = now;
}
if (length)
5e500: 4a04 tstb %d4 5e502: 6700 ff3a beqw 5e43e <rtems_rfs_file_io_end+0xa2>
{
handle->shared->size.count =
rtems_rfs_block_map_count (rtems_rfs_file_map (handle));
5e506: 206a 001a moveal %a2@(26),%a0
handle->shared->size.offset =
rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle));
}
return rc;
}
5e50a: 2002 movel %d2,%d0 5e50c: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3
if (!read && mtime)
handle->shared->mtime = now;
}
if (length)
{
handle->shared->size.count =
5e512: 2168 0038 007c movel %a0@(56),%a0@(124)
handle->shared->size.offset =
rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle));
}
return rc;
}
5e518: 4e5e unlk %fp
}
if (length)
{
handle->shared->size.count =
rtems_rfs_block_map_count (rtems_rfs_file_map (handle));
handle->shared->size.offset =
5e51a: 2168 003c 0080 movel %a0@(60),%a0@(128)
rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle));
}
return rc;
}
5e520: 4e75 rts
length = false;
mtime = false;
if (!read &&
rtems_rfs_block_map_past_end (rtems_rfs_file_map (handle),
5e522: b280 cmpl %d0,%d1 5e524: 6300 ff62 blsw 5e488 <rtems_rfs_file_io_end+0xec> 5e528: 5381 subql #1,%d1 5e52a: b280 cmpl %d0,%d1 5e52c: 6700 009e beqw 5e5cc <rtems_rfs_file_io_end+0x230>
handle->bpos.boff);
length = true;
mtime = true;
}
atime = rtems_rfs_file_update_atime (handle);
5e530: 2012 movel %a2@,%d0 5e532: 2a00 movel %d0,%d5 5e534: 4685 notl %d5 5e536: 7201 moveq #1,%d1
handle->bpos.bno++;
handle->bpos.boff -= rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
}
length = false;
mtime = false;
5e538: 4204 clrb %d4
handle->bpos.boff);
length = true;
mtime = true;
}
atime = rtems_rfs_file_update_atime (handle);
5e53a: ca81 andl %d1,%d5
mtime = rtems_rfs_file_update_mtime (handle) && mtime;
5e53c: 0800 0001 btst #1,%d0 5e540: 6700 ff68 beqw 5e4aa <rtems_rfs_file_io_end+0x10e>
5e544: 4206 clrb %d6 <== NOT EXECUTED 5e546: 6000 ff64 braw 5e4ac <rtems_rfs_file_io_end+0x110> <== NOT EXECUTED
handle->bpos.bno, handle->bpos.boff,
atime ? 'A' : '-', mtime ? 'M' : '-', length ? 'L' : '-');
if (atime || mtime)
{
time_t now = time (NULL);
5e54a: 42a7 clrl %sp@- 5e54c: 4eb9 0006 61f8 jsr 661f8 <time>
if (read && atime)
5e552: 588f addql #4,%sp 5e554: 4a03 tstb %d3
5e556: 670e beqs 5e566 <rtems_rfs_file_io_end+0x1ca>
5e558: 4a05 tstb %d5
5e55a: 67a4 beqs 5e500 <rtems_rfs_file_io_end+0x164> <== NEVER TAKEN
handle->shared->atime = now;
5e55c: 206a 001a moveal %a2@(26),%a0 5e560: 2140 0084 movel %d0,%a0@(132) 5e564: 609a bras 5e500 <rtems_rfs_file_io_end+0x164>
if (!read && mtime)
5e566: 4a06 tstb %d6
5e568: 6796 beqs 5e500 <rtems_rfs_file_io_end+0x164>
handle->shared->mtime = now;
5e56a: 206a 001a moveal %a2@(26),%a0 5e56e: 2140 0088 movel %d0,%a0@(136) 5e572: 608c bras 5e500 <rtems_rfs_file_io_end+0x164>
rtems_rfs_buffer_mark_dirty (rtems_rfs_file_buffer (handle));
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
rtems_rfs_file_buffer (handle));
if (rc > 0)
{
printf (
5e574: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5e576: 223c 0007 320a movel #471562,%d1 <== NOT EXECUTED 5e57c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5e57e: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5e580: 2f01 movel %d1,%sp@- <== NOT EXECUTED 5e582: 4879 0007 446f pea 7446f <CSWTCH.1+0xe93> <== NOT EXECUTED 5e588: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED
"rtems-rfs: file-io: end: error on release: %s size=%zu: %d: %s\n",
read ? "read" : "write", size, rc, strerror (rc));
return rc;
5e58e: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 5e592: 6000 feaa braw 5e43e <rtems_rfs_file_io_end+0xa2> <== NOT EXECUTED
atime = rtems_rfs_file_update_atime (handle);
mtime = rtems_rfs_file_update_mtime (handle) && mtime;
length = rtems_rfs_file_update_length (handle) && length;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-io: end: pos=%" PRIu32 ":%" PRIu32 " %c %c %c\n",
5e596: 307c 002d moveaw #45,%a0 <== NOT EXECUTED 5e59a: 4a06 tstb %d6 <== NOT EXECUTED 5e59c: 6600 ff32 bnew 5e4d0 <rtems_rfs_file_io_end+0x134> <== NOT EXECUTED 5e5a0: 722d moveq #45,%d1 <== NOT EXECUTED 5e5a2: 4a05 tstb %d5 <== NOT EXECUTED 5e5a4: 6600 ff32 bnew 5e4d8 <rtems_rfs_file_io_end+0x13c> <== NOT EXECUTED 5e5a8: 2f08 movel %a0,%sp@- <== NOT EXECUTED 5e5aa: 702d moveq #45,%d0 <== NOT EXECUTED 5e5ac: 2f01 movel %d1,%sp@- <== NOT EXECUTED 5e5ae: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5e5b0: 2f2a 0012 movel %a2@(18),%sp@- <== NOT EXECUTED 5e5b4: 2f2a 000e movel %a2@(14),%sp@- <== NOT EXECUTED 5e5b8: 4879 0007 44b1 pea 744b1 <CSWTCH.1+0xed5> <== NOT EXECUTED 5e5be: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5e5c4: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 5e5c8: 6000 ff2e braw 5e4f8 <rtems_rfs_file_io_end+0x15c> <== NOT EXECUTED
length = false;
mtime = false;
if (!read &&
rtems_rfs_block_map_past_end (rtems_rfs_file_map (handle),
5e5cc: 202a 0012 movel %a2@(18),%d0 5e5d0: b0a8 003c cmpl %a0@(60),%d0 5e5d4: 6300 ff5a blsw 5e530 <rtems_rfs_file_io_end+0x194>
*/
static inline void
rtems_rfs_block_map_set_size_offset (rtems_rfs_block_map* map,
rtems_rfs_block_off offset)
{
map->size.offset = offset;
5e5d8: 2140 003c movel %d0,%a0@(60)
map->dirty = true;
5e5dc: 7201 moveq #1,%d1
rtems_rfs_file_bpos (handle)))
{
rtems_rfs_block_map_set_size_offset (rtems_rfs_file_map (handle),
handle->bpos.boff);
length = true;
mtime = true;
5e5de: 7801 moveq #1,%d4 5e5e0: 1141 0032 moveb %d1,%a0@(50) 5e5e4: 6000 feb2 braw 5e498 <rtems_rfs_file_io_end+0xfc>
0005e5e8 <rtems_rfs_file_io_release>:
return rc;
}
int
rtems_rfs_file_io_release (rtems_rfs_file_handle* handle)
{
5e5e8: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 5e5ec: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
int rc = 0; if (rtems_rfs_buffer_handle_has_block (&handle->buffer))
5e5f0: 4aa8 000a tstl %a0@(10) <== NOT EXECUTED 5e5f4: 6718 beqs 5e60e <rtems_rfs_file_io_release+0x26> <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
5e5f6: 4868 0004 pea %a0@(4) <== NOT EXECUTED 5e5fa: 2068 001a moveal %a0@(26),%a0 <== NOT EXECUTED 5e5fe: 2f28 0090 movel %a0@(144),%sp@- <== NOT EXECUTED 5e602: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED 5e608: 508f addql #8,%sp <== NOT EXECUTED
rtems_rfs_file_buffer (handle));
return rc;
}
5e60a: 4e5e unlk %fp <== NOT EXECUTED 5e60c: 4e75 rts <== NOT EXECUTED
}
int
rtems_rfs_file_io_release (rtems_rfs_file_handle* handle)
{
int rc = 0;
5e60e: 4280 clrl %d0 <== NOT EXECUTED
if (rtems_rfs_buffer_handle_has_block (&handle->buffer))
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
rtems_rfs_file_buffer (handle));
return rc;
}
5e610: 4e5e unlk %fp <== NOT EXECUTED
0005e1b0 <rtems_rfs_file_io_start>:
int
rtems_rfs_file_io_start (rtems_rfs_file_handle* handle,
size_t* available,
bool read)
{
5e1b0: 4e56 ffe4 linkw %fp,#-28 5e1b4: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@
size_t size;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
5e1b8: 42a7 clrl %sp@- 5e1ba: 4878 0020 pea 20 <OPER2+0xc> 5e1be: 47f9 0005 37c0 lea 537c0 <rtems_rfs_trace>,%a3
int
rtems_rfs_file_io_start (rtems_rfs_file_handle* handle,
size_t* available,
bool read)
{
5e1c4: 246e 0008 moveal %fp@(8),%a2 5e1c8: 286e 000c moveal %fp@(12),%a4 5e1cc: 142e 0013 moveb %fp@(19),%d2
size_t size;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
5e1d0: 4e93 jsr %a3@ 5e1d2: 508f addql #8,%sp 5e1d4: 4a00 tstb %d0
5e1d6: 672e beqs 5e206 <rtems_rfs_file_io_start+0x56> <== ALWAYS TAKEN
printf ("rtems-rfs: file-io: start: %s pos=%" PRIu32 ":%" PRIu32 "\n",
5e1d8: 206a 0012 moveal %a2@(18),%a0 <== NOT EXECUTED 5e1dc: 222a 000e movel %a2@(14),%d1 <== NOT EXECUTED 5e1e0: 203c 0007 11ac movel #463276,%d0 <== NOT EXECUTED 5e1e6: 4a02 tstb %d2 <== NOT EXECUTED 5e1e8: 6706 beqs 5e1f0 <rtems_rfs_file_io_start+0x40> <== NOT EXECUTED 5e1ea: 203c 0007 320a movel #471562,%d0 <== NOT EXECUTED 5e1f0: 2f08 movel %a0,%sp@- <== NOT EXECUTED 5e1f2: 2f01 movel %d1,%sp@- <== NOT EXECUTED 5e1f4: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5e1f6: 4879 0007 4396 pea 74396 <CSWTCH.1+0xdba> <== NOT EXECUTED 5e1fc: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5e202: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
read ? "read" : "write", handle->bpos.bno, handle->bpos.boff);
if (!rtems_rfs_buffer_handle_has_block (&handle->buffer))
5e206: 4aaa 000a tstl %a2@(10) 5e20a: 6700 0086 beqw 5e292 <rtems_rfs_file_io_start+0xe2>
if (rc > 0)
return rc;
}
if (read
&& rtems_rfs_block_map_last (rtems_rfs_file_map (handle))
5e20e: 206a 001a moveal %a2@(26),%a0
block, request_read);
if (rc > 0)
return rc;
}
if (read
5e212: 4a02 tstb %d2
5e214: 673e beqs 5e254 <rtems_rfs_file_io_start+0xa4>
&& rtems_rfs_block_map_last (rtems_rfs_file_map (handle))
5e216: 2028 0040 movel %a0@(64),%d0 5e21a: 2228 0038 movel %a0@(56),%d1 5e21e: 4a80 tstl %d0
5e220: 662c bnes 5e24e <rtems_rfs_file_io_start+0x9e> <== NEVER TAKEN
5e222: 4a81 tstl %d1
5e224: 6628 bnes 5e24e <rtems_rfs_file_io_start+0x9e> <== ALWAYS TAKEN
&& rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle)))
5e226: 2428 003c movel %a0@(60),%d2
5e22a: 6728 beqs 5e254 <rtems_rfs_file_io_start+0xa4> <== NEVER TAKEN
size = rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle));
else
size = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
*available = size - rtems_rfs_file_block_offset (handle);
5e22c: 2002 movel %d2,%d0 5e22e: 90aa 0012 subl %a2@(18),%d0 5e232: 2880 movel %d0,%a4@
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
5e234: 42a7 clrl %sp@- 5e236: 4878 0020 pea 20 <OPER2+0xc> 5e23a: 4e93 jsr %a3@ 5e23c: 508f addql #8,%sp 5e23e: 4a00 tstb %d0
5e240: 6630 bnes 5e272 <rtems_rfs_file_io_start+0xc2> <== NEVER TAKEN
printf ("rtems-rfs: file-io: start: available=%zu (%zu)\n",
*available, size);
return 0;
5e242: 4280 clrl %d0
}
5e244: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 5e24a: 4e5e unlk %fp 5e24c: 4e75 rts
if (rc > 0)
return rc;
}
if (read
&& rtems_rfs_block_map_last (rtems_rfs_file_map (handle))
5e24e: 5381 subql #1,%d1 5e250: b280 cmpl %d0,%d1
5e252: 67d2 beqs 5e226 <rtems_rfs_file_io_start+0x76> <== ALWAYS TAKEN
&& rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle)))
size = rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle));
else
size = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
5e254: 2068 0090 moveal %a0@(144),%a0 5e258: 2428 0008 movel %a0@(8),%d2
*available = size - rtems_rfs_file_block_offset (handle);
5e25c: 2002 movel %d2,%d0 5e25e: 90aa 0012 subl %a2@(18),%d0 5e262: 2880 movel %d0,%a4@
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
5e264: 42a7 clrl %sp@- 5e266: 4878 0020 pea 20 <OPER2+0xc> 5e26a: 4e93 jsr %a3@ 5e26c: 508f addql #8,%sp 5e26e: 4a00 tstb %d0
5e270: 67d0 beqs 5e242 <rtems_rfs_file_io_start+0x92> <== ALWAYS TAKEN
printf ("rtems-rfs: file-io: start: available=%zu (%zu)\n",
5e272: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5e274: 2f14 movel %a4@,%sp@- <== NOT EXECUTED 5e276: 4879 0007 4417 pea 74417 <CSWTCH.1+0xe3b> <== NOT EXECUTED 5e27c: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5e282: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
*available, size);
return 0;
5e286: 4280 clrl %d0 <== NOT EXECUTED
}
5e288: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 <== NOT EXECUTED 5e28e: 4e5e unlk %fp <== NOT EXECUTED 5e290: 4e75 rts <== NOT EXECUTED
bool request_read;
int rc;
request_read = read;
rc = rtems_rfs_block_map_find (rtems_rfs_file_fs (handle),
5e292: 486e fffc pea %fp@(-4) 5e296: 486a 000e pea %a2@(14)
rtems_rfs_file_map (handle),
5e29a: 206a 001a moveal %a2@(26),%a0
bool request_read;
int rc;
request_read = read;
rc = rtems_rfs_block_map_find (rtems_rfs_file_fs (handle),
5e29e: 4868 0032 pea %a0@(50) 5e2a2: 2f28 0090 movel %a0@(144),%sp@- 5e2a6: 4eb9 0005 b1c2 jsr 5b1c2 <rtems_rfs_block_map_find>
rtems_rfs_file_map (handle),
rtems_rfs_file_bpos (handle),
&block);
if (rc > 0)
5e2ac: 4fef 0010 lea %sp@(16),%sp 5e2b0: 4a80 tstl %d0
5e2b2: 6f1a bles 5e2ce <rtems_rfs_file_io_start+0x11e> <== ALWAYS TAKEN
{
/*
* Has the read reached the EOF ?
*/
if (read && (rc == ENXIO))
5e2b4: 7206 moveq #6,%d1 <== NOT EXECUTED 5e2b6: 4a02 tstb %d2 <== NOT EXECUTED 5e2b8: 6700 0094 beqw 5e34e <rtems_rfs_file_io_start+0x19e> <== NOT EXECUTED 5e2bc: b280 cmpl %d0,%d1 <== NOT EXECUTED 5e2be: 6684 bnes 5e244 <rtems_rfs_file_io_start+0x94> <== NOT EXECUTED
{
*available = 0;
5e2c0: 4294 clrl %a4@ <== NOT EXECUTED
return 0;
5e2c2: 4280 clrl %d0 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-io: start: available=%zu (%zu)\n",
*available, size);
return 0;
}
5e2c4: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 <== NOT EXECUTED 5e2ca: 4e5e unlk %fp <== NOT EXECUTED 5e2cc: 4e75 rts <== NOT EXECUTED
/*
* If this is a write check if the write starts within a block or the
* amount of data is less than a block size. If it is read the block
* rather than getting a block to fill.
*/
if (!read &&
5e2ce: 4a02 tstb %d2
5e2d0: 6618 bnes 5e2ea <rtems_rfs_file_io_start+0x13a>
5e2d2: 4aaa 0012 tstl %a2@(18)
5e2d6: 6612 bnes 5e2ea <rtems_rfs_file_io_start+0x13a> <== NEVER TAKEN
(rtems_rfs_file_block_offset (handle) ||
(*available < rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))))
5e2d8: 206a 001a moveal %a2@(26),%a0 5e2dc: 2068 0090 moveal %a0@(144),%a0
* If this is a write check if the write starts within a block or the
* amount of data is less than a block size. If it is read the block
* rather than getting a block to fill.
*/
if (!read &&
(rtems_rfs_file_block_offset (handle) ||
5e2e0: 2068 0008 moveal %a0@(8),%a0 5e2e4: b1d4 cmpal %a4@,%a0 5e2e6: 6300 00ac blsw 5e394 <rtems_rfs_file_io_start+0x1e4> 5e2ea: 7601 moveq #1,%d3
(*available < rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))))
request_read = true;
5e2ec: 7801 moveq #1,%d4
}
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
5e2ee: 42a7 clrl %sp@- 5e2f0: 4878 0020 pea 20 <OPER2+0xc> 5e2f4: 4e93 jsr %a3@ 5e2f6: 508f addql #8,%sp 5e2f8: 4a00 tstb %d0
5e2fa: 6726 beqs 5e322 <rtems_rfs_file_io_start+0x172> <== ALWAYS TAKEN
printf ("rtems-rfs: file-io: start: block=%" PRIu32 " request-read=%s\n",
5e2fc: 203c 0007 2dab movel #470443,%d0 <== NOT EXECUTED 5e302: 4a04 tstb %d4 <== NOT EXECUTED 5e304: 6606 bnes 5e30c <rtems_rfs_file_io_start+0x15c> <== NOT EXECUTED 5e306: 203c 0007 319e movel #471454,%d0 <== NOT EXECUTED 5e30c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5e30e: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 5e312: 4879 0007 43e1 pea 743e1 <CSWTCH.1+0xe05> <== NOT EXECUTED 5e318: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5e31e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
block, request_read ? "yes" : "no");
rc = rtems_rfs_buffer_handle_request (rtems_rfs_file_fs (handle),
5e322: 2f03 movel %d3,%sp@- 5e324: 2f2e fffc movel %fp@(-4),%sp@- 5e328: 206a 001a moveal %a2@(26),%a0 5e32c: 486a 0004 pea %a2@(4) 5e330: 2f28 0090 movel %a0@(144),%sp@- 5e334: 4eb9 0005 bd6e jsr 5bd6e <rtems_rfs_buffer_handle_request>
rtems_rfs_file_buffer (handle),
block, request_read);
if (rc > 0)
5e33a: 4fef 0010 lea %sp@(16),%sp 5e33e: 4a80 tstl %d0 5e340: 6f00 fecc blew 5e20e <rtems_rfs_file_io_start+0x5e>
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-io: start: available=%zu (%zu)\n",
*available, size);
return 0;
}
5e344: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 <== NOT EXECUTED 5e34a: 4e5e unlk %fp <== NOT EXECUTED 5e34c: 4e75 rts <== NOT EXECUTED
{
*available = 0;
return 0;
}
if (rc != ENXIO)
5e34e: b280 cmpl %d0,%d1 <== NOT EXECUTED 5e350: 6600 fef2 bnew 5e244 <rtems_rfs_file_io_start+0x94> <== NOT EXECUTED
return rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
5e354: 42a7 clrl %sp@- <== NOT EXECUTED 5e356: 4878 0020 pea 20 <OPER2+0xc> <== NOT EXECUTED 5e35a: 4e93 jsr %a3@ <== NOT EXECUTED 5e35c: 508f addql #8,%sp <== NOT EXECUTED 5e35e: 4a00 tstb %d0 <== NOT EXECUTED 5e360: 670e beqs 5e370 <rtems_rfs_file_io_start+0x1c0> <== NOT EXECUTED
printf ("rtems-rfs: file-io: start: grow\n");
5e362: 4879 0007 43c1 pea 743c1 <CSWTCH.1+0xde5> <== NOT EXECUTED 5e368: 4eb9 0006 30ce jsr 630ce <puts> <== NOT EXECUTED 5e36e: 588f addql #4,%sp <== NOT EXECUTED
rc = rtems_rfs_block_map_grow (rtems_rfs_file_fs (handle),
5e370: 486e fffc pea %fp@(-4) <== NOT EXECUTED 5e374: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
rtems_rfs_file_map (handle),
5e378: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
return rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-io: start: grow\n");
rc = rtems_rfs_block_map_grow (rtems_rfs_file_fs (handle),
5e37c: 4868 0032 pea %a0@(50) <== NOT EXECUTED 5e380: 2f28 0090 movel %a0@(144),%sp@- <== NOT EXECUTED 5e384: 4eb9 0005 b38e jsr 5b38e <rtems_rfs_block_map_grow> <== NOT EXECUTED
rtems_rfs_file_map (handle),
1, &block);
if (rc > 0)
5e38a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5e38e: 4a80 tstl %d0 <== NOT EXECUTED 5e390: 6e00 feb2 bgtw 5e244 <rtems_rfs_file_io_start+0x94> <== NOT EXECUTED
* If this is a write check if the write starts within a block or the
* amount of data is less than a block size. If it is read the block
* rather than getting a block to fill.
*/
if (!read &&
(rtems_rfs_file_block_offset (handle) ||
5e394: 4283 clrl %d3 <== NOT EXECUTED 5e396: 4204 clrb %d4 <== NOT EXECUTED 5e398: 6000 ff54 braw 5e2ee <rtems_rfs_file_io_start+0x13e> <== NOT EXECUTED
0005d9b8 <rtems_rfs_file_open>:
int
rtems_rfs_file_open (rtems_rfs_file_system* fs,
rtems_rfs_ino ino,
uint32_t flags,
rtems_rfs_file_handle** file)
{
5d9b8: 4e56 ffd8 linkw %fp,#-40 5d9bc: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@
rtems_rfs_file_handle* handle;
rtems_rfs_file_shared* shared;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
5d9c0: 42a7 clrl %sp@- 5d9c2: 4878 0008 pea 8 <DIVIDE_BY_ZERO> 5d9c6: 4bf9 0005 37c0 lea 537c0 <rtems_rfs_trace>,%a5
int
rtems_rfs_file_open (rtems_rfs_file_system* fs,
rtems_rfs_ino ino,
uint32_t flags,
rtems_rfs_file_handle** file)
{
5d9cc: 262e 0008 movel %fp@(8),%d3 5d9d0: 242e 000c movel %fp@(12),%d2 5d9d4: 2c2e 0014 movel %fp@(20),%d6
rtems_rfs_file_handle* handle;
rtems_rfs_file_shared* shared;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
5d9d8: 4e95 jsr %a5@ 5d9da: 508f addql #8,%sp 5d9dc: 4a00 tstb %d0 5d9de: 6600 00fe bnew 5dade <rtems_rfs_file_open+0x126>
/* * Allocate a new handle and initialise it. Do this before we deal with the * shared node data so we do not have to be concerned with reference * counting. */ handle = malloc (sizeof (rtems_rfs_file_handle));
5d9e2: 4878 001e pea 1e <OPER2+0xa>
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
printf ("rtems-rfs: file-open: ino=%" PRId32 "\n", ino);
*file = NULL;
5d9e6: 2046 moveal %d6,%a0
/* * Allocate a new handle and initialise it. Do this before we deal with the * shared node data so we do not have to be concerned with reference * counting. */ handle = malloc (sizeof (rtems_rfs_file_handle));
5d9e8: 283c 0004 6f84 movel #290692,%d4 5d9ee: 2244 moveal %d4,%a1
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
printf ("rtems-rfs: file-open: ino=%" PRId32 "\n", ino);
*file = NULL;
5d9f0: 4290 clrl %a0@
/* * Allocate a new handle and initialise it. Do this before we deal with the * shared node data so we do not have to be concerned with reference * counting. */ handle = malloc (sizeof (rtems_rfs_file_handle));
5d9f2: 4e91 jsr %a1@
if (!handle)
5d9f4: 588f addql #4,%sp
/* * Allocate a new handle and initialise it. Do this before we deal with the * shared node data so we do not have to be concerned with reference * counting. */ handle = malloc (sizeof (rtems_rfs_file_handle));
5d9f6: 2640 moveal %d0,%a3
if (!handle)
5d9f8: 4a80 tstl %d0 5d9fa: 6700 010e beqw 5db0a <rtems_rfs_file_open+0x152>
return ENOMEM;
memset (handle, 0, sizeof (rtems_rfs_file_handle));
5d9fe: 2040 moveal %d0,%a0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
5da00: 2843 moveal %d3,%a4
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Tail(the_chain));
5da02: 2003 movel %d3,%d0 5da04: 0680 0000 0074 addil #116,%d0 5da0a: 4298 clrl %a0@+ 5da0c: 2248 moveal %a0,%a1 5da0e: 4299 clrl %a1@+ 5da10: 5889 addql #4,%a1 5da12: 4299 clrl %a1@+
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
5da14: 246c 0070 moveal %a4@(112),%a2 5da18: 4299 clrl %a1@+ 5da1a: 4299 clrl %a1@+ 5da1c: 4299 clrl %a1@+ 5da1e: 4251 clrw %a1@
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
handle->bnum = 0;
5da20: 42ab 0006 clrl %a3@(6)
handle->buffer = NULL;
5da24: 42ab 000a clrl %a3@(10)
rtems_rfs_file_get_shared (rtems_rfs_file_system* fs,
rtems_rfs_ino ino)
{
rtems_chain_node* node;
node = rtems_chain_first (&fs->file_shares);
while (!rtems_chain_is_tail (&fs->file_shares, node))
5da28: b08a cmpl %a2,%d0
5da2a: 670e beqs 5da3a <rtems_rfs_file_open+0x82> <== ALWAYS TAKEN
{
rtems_rfs_file_shared* shared;
shared = (rtems_rfs_file_shared*) node;
if (shared->inode.ino == ino)
5da2c: b4aa 0014 cmpl %a2@(20),%d2 <== NOT EXECUTED 5da30: 6700 00e6 beqw 5db18 <rtems_rfs_file_open+0x160> <== NOT EXECUTED
return shared;
node = rtems_chain_next (node);
}
return NULL;
}
5da34: 2452 moveal %a2@,%a2 <== NOT EXECUTED
rtems_rfs_file_get_shared (rtems_rfs_file_system* fs,
rtems_rfs_ino ino)
{
rtems_chain_node* node;
node = rtems_chain_first (&fs->file_shares);
while (!rtems_chain_is_tail (&fs->file_shares, node))
5da36: b08a cmpl %a2,%d0 <== NOT EXECUTED 5da38: 66f2 bnes 5da2c <rtems_rfs_file_open+0x74> <== NOT EXECUTED
{
/*
* None exists so create. Copy in the shared parts of the inode we hold in
* memory.
*/
shared = malloc (sizeof (rtems_rfs_file_shared));
5da3a: 4878 0094 pea 94 <DBL_MANT_DIG+0x5f> 5da3e: 2244 moveal %d4,%a1 5da40: 2d48 fffc movel %a0,%fp@(-4) 5da44: 4e91 jsr %a1@
if (!shared)
5da46: 206e fffc moveal %fp@(-4),%a0
{
/*
* None exists so create. Copy in the shared parts of the inode we hold in
* memory.
*/
shared = malloc (sizeof (rtems_rfs_file_shared));
5da4a: 2440 moveal %d0,%a2
if (!shared)
5da4c: 588f addql #4,%sp 5da4e: 4a80 tstl %d0 5da50: 6700 023c beqw 5dc8e <rtems_rfs_file_open+0x2d6>
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
free (handle);
return ENOMEM;
}
memset (shared, 0, sizeof (rtems_rfs_file_shared));
5da54: 4878 0094 pea 94 <DBL_MANT_DIG+0x5f>
rc = rtems_rfs_inode_open (fs, ino, &shared->inode, true);
5da58: 2a00 movel %d0,%d5 5da5a: 0685 0000 000c addil #12,%d5
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
free (handle);
return ENOMEM;
}
memset (shared, 0, sizeof (rtems_rfs_file_shared));
5da60: 42a7 clrl %sp@- 5da62: 2d48 fffc movel %a0,%fp@(-4) 5da66: 2f00 movel %d0,%sp@- 5da68: 4eb9 0006 2f48 jsr 62f48 <memset>
rc = rtems_rfs_inode_open (fs, ino, &shared->inode, true);
5da6e: 4878 0001 pea 1 <ADD> 5da72: 2f05 movel %d5,%sp@- 5da74: 2f02 movel %d2,%sp@- 5da76: 2f03 movel %d3,%sp@- 5da78: 4eb9 0005 0300 jsr 50300 <rtems_rfs_inode_open>
if (rc > 0)
5da7e: 206e fffc moveal %fp@(-4),%a0
return ENOMEM;
}
memset (shared, 0, sizeof (rtems_rfs_file_shared));
rc = rtems_rfs_inode_open (fs, ino, &shared->inode, true);
5da82: 2800 movel %d0,%d4
if (rc > 0)
5da84: 4fef 001c lea %sp@(28),%sp 5da88: 6f00 0130 blew 5dbba <rtems_rfs_file_open+0x202>
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
5da8c: 42a7 clrl %sp@- <== NOT EXECUTED 5da8e: 4878 0008 pea 8 <DIVIDE_BY_ZERO> <== NOT EXECUTED 5da92: 4e95 jsr %a5@ <== NOT EXECUTED 5da94: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 5da98: 508f addql #8,%sp <== NOT EXECUTED 5da9a: 4a00 tstb %d0 <== NOT EXECUTED 5da9c: 6600 00c6 bnew 5db64 <rtems_rfs_file_open+0x1ac> <== NOT EXECUTED
printf ("rtems-rfs: file-open: inode open failed: %d: %s\n",
rc, strerror (rc));
free (shared);
5daa0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5daa2: 45f9 0004 680c lea 4680c <free>,%a2 <== NOT EXECUTED 5daa8: 2d48 fffc movel %a0,%fp@(-4) <== NOT EXECUTED 5daac: 4e92 jsr %a2@ <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
5daae: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 5dab2: 2f08 movel %a0,%sp@- <== NOT EXECUTED 5dab4: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5dab6: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
5dabc: 4201 clrb %d1 <== NOT EXECUTED
handle->bnum = 0;
5dabe: 42ab 0006 clrl %a3@(6) <== NOT EXECUTED
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
handle->dirty = false;
5dac2: 1741 0004 moveb %d1,%a3@(4) <== NOT EXECUTED
handle->bnum = 0; handle->buffer = NULL;
5dac6: 42ab 000a clrl %a3@(10) <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
free (handle);
5daca: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5dacc: 4e92 jsr %a2@ <== NOT EXECUTED
return rc;
5dace: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
handle->shared = shared;
*file = handle;
return 0;
}
5dad2: 2004 movel %d4,%d0 <== NOT EXECUTED 5dad4: 4cee 3c7c ffd8 moveml %fp@(-40),%d2-%d6/%a2-%a5 <== NOT EXECUTED 5dada: 4e5e unlk %fp <== NOT EXECUTED 5dadc: 4e75 rts <== NOT EXECUTED
rtems_rfs_file_handle* handle;
rtems_rfs_file_shared* shared;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
printf ("rtems-rfs: file-open: ino=%" PRId32 "\n", ino);
5dade: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5dae0: 4879 0007 41fc pea 741fc <CSWTCH.1+0xc20> <== NOT EXECUTED
/* * Allocate a new handle and initialise it. Do this before we deal with the * shared node data so we do not have to be concerned with reference * counting. */ handle = malloc (sizeof (rtems_rfs_file_handle));
5dae6: 283c 0004 6f84 movel #290692,%d4 <== NOT EXECUTED
rtems_rfs_file_handle* handle;
rtems_rfs_file_shared* shared;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
printf ("rtems-rfs: file-open: ino=%" PRId32 "\n", ino);
5daec: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5daf2: 508f addql #8,%sp <== NOT EXECUTED
*file = NULL;
5daf4: 2046 moveal %d6,%a0 <== NOT EXECUTED
/* * Allocate a new handle and initialise it. Do this before we deal with the * shared node data so we do not have to be concerned with reference * counting. */ handle = malloc (sizeof (rtems_rfs_file_handle));
5daf6: 2244 moveal %d4,%a1 <== NOT EXECUTED 5daf8: 4878 001e pea 1e <OPER2+0xa> <== NOT EXECUTED
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
printf ("rtems-rfs: file-open: ino=%" PRId32 "\n", ino);
*file = NULL;
5dafc: 4290 clrl %a0@ <== NOT EXECUTED
/* * Allocate a new handle and initialise it. Do this before we deal with the * shared node data so we do not have to be concerned with reference * counting. */ handle = malloc (sizeof (rtems_rfs_file_handle));
5dafe: 4e91 jsr %a1@ <== NOT EXECUTED
if (!handle)
5db00: 588f addql #4,%sp <== NOT EXECUTED
/* * Allocate a new handle and initialise it. Do this before we deal with the * shared node data so we do not have to be concerned with reference * counting. */ handle = malloc (sizeof (rtems_rfs_file_handle));
5db02: 2640 moveal %d0,%a3 <== NOT EXECUTED
if (!handle)
5db04: 4a80 tstl %d0 <== NOT EXECUTED 5db06: 6600 fef6 bnew 5d9fe <rtems_rfs_file_open+0x46> <== NOT EXECUTED
return ENOMEM;
5db0a: 780c moveq #12,%d4 <== NOT EXECUTED
handle->shared = shared;
*file = handle;
return 0;
}
5db0c: 2004 movel %d4,%d0 <== NOT EXECUTED 5db0e: 4cee 3c7c ffd8 moveml %fp@(-40),%d2-%d6/%a2-%a5 <== NOT EXECUTED 5db14: 4e5e unlk %fp <== NOT EXECUTED 5db16: 4e75 rts <== NOT EXECUTED
* the reference count and return the pointer to the data.
*/
shared = rtems_rfs_file_get_shared (fs, ino);
if (shared)
{
shared->references++;
5db18: 52aa 0008 addql #1,%a2@(8) <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
5db1c: 42a7 clrl %sp@- <== NOT EXECUTED 5db1e: 4878 0008 pea 8 <DIVIDE_BY_ZERO> <== NOT EXECUTED 5db22: 4e95 jsr %a5@ <== NOT EXECUTED 5db24: 508f addql #8,%sp <== NOT EXECUTED 5db26: 4a00 tstb %d0 <== NOT EXECUTED 5db28: 661a bnes 5db44 <rtems_rfs_file_open+0x18c> <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
printf ("rtems-rfs: file-open: ino=%" PRId32 " share created\n", ino);
}
handle->flags = flags;
5db2a: 26ae 0010 movel %fp@(16),%a3@
handle->shared = shared;
*file = handle;
5db2e: 2246 moveal %d6,%a1
return 0;
5db30: 4284 clrl %d4
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
printf ("rtems-rfs: file-open: ino=%" PRId32 " share created\n", ino);
}
handle->flags = flags;
handle->shared = shared;
5db32: 274a 001a movel %a2,%a3@(26)
*file = handle;
5db36: 228b movel %a3,%a1@
return 0;
}
5db38: 2004 movel %d4,%d0 5db3a: 4cee 3c7c ffd8 moveml %fp@(-40),%d2-%d6/%a2-%a5 5db40: 4e5e unlk %fp 5db42: 4e75 rts
shared = rtems_rfs_file_get_shared (fs, ino);
if (shared)
{
shared->references++;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
printf ("rtems-rfs: file-open: ino=%" PRId32 " shared\n", ino);
5db44: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5db46: 4879 0007 421b pea 7421b <CSWTCH.1+0xc3f> <== NOT EXECUTED
handle->flags = flags;
handle->shared = shared;
*file = handle;
return 0;
5db4c: 4284 clrl %d4 <== NOT EXECUTED
shared = rtems_rfs_file_get_shared (fs, ino);
if (shared)
{
shared->references++;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
printf ("rtems-rfs: file-open: ino=%" PRId32 " shared\n", ino);
5db4e: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
printf ("rtems-rfs: file-open: ino=%" PRId32 " share created\n", ino);
}
handle->flags = flags;
5db54: 26ae 0010 movel %fp@(16),%a3@ <== NOT EXECUTED
handle->shared = shared;
*file = handle;
5db58: 2246 moveal %d6,%a1 <== NOT EXECUTED
shared = rtems_rfs_file_get_shared (fs, ino);
if (shared)
{
shared->references++;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
printf ("rtems-rfs: file-open: ino=%" PRId32 " shared\n", ino);
5db5a: 508f addql #8,%sp <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
printf ("rtems-rfs: file-open: ino=%" PRId32 " share created\n", ino);
}
handle->flags = flags;
handle->shared = shared;
5db5c: 274a 001a movel %a2,%a3@(26) <== NOT EXECUTED
*file = handle;
5db60: 228b movel %a3,%a1@ <== NOT EXECUTED 5db62: 60d4 bras 5db38 <rtems_rfs_file_open+0x180> <== NOT EXECUTED
rc = rtems_rfs_inode_open (fs, ino, &shared->inode, true);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
printf ("rtems-rfs: file-open: inode open failed: %d: %s\n",
5db64: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5db66: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED 5db6c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5db6e: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5db70: 4879 0007 4241 pea 74241 <CSWTCH.1+0xc65> <== NOT EXECUTED 5db76: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5db7c: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 5db80: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rc, strerror (rc));
free (shared);
5db84: 2d48 fffc movel %a0,%fp@(-4) <== NOT EXECUTED 5db88: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5db8a: 45f9 0004 680c lea 4680c <free>,%a2 <== NOT EXECUTED 5db90: 4e92 jsr %a2@ <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
5db92: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 5db96: 2f08 movel %a0,%sp@- <== NOT EXECUTED 5db98: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5db9a: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
5dba0: 4201 clrb %d1 <== NOT EXECUTED
handle->bnum = 0;
5dba2: 42ab 0006 clrl %a3@(6) <== NOT EXECUTED
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
handle->dirty = false;
5dba6: 1741 0004 moveb %d1,%a3@(4) <== NOT EXECUTED
handle->bnum = 0; handle->buffer = NULL;
5dbaa: 42ab 000a clrl %a3@(10) <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
free (handle);
5dbae: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5dbb0: 4e92 jsr %a2@ <== NOT EXECUTED
return rc;
5dbb2: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5dbb6: 6000 ff1a braw 5dad2 <rtems_rfs_file_open+0x11a> <== NOT EXECUTED
}
rc = rtems_rfs_block_map_open (fs, &shared->inode, &shared->map);
5dbba: 486a 0032 pea %a2@(50) 5dbbe: 2f05 movel %d5,%sp@- 5dbc0: 2d48 fffc movel %a0,%fp@(-4) 5dbc4: 2f03 movel %d3,%sp@- 5dbc6: 4eb9 0005 adf2 jsr 5adf2 <rtems_rfs_block_map_open>
if (rc > 0)
5dbcc: 4fef 000c lea %sp@(12),%sp
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
free (handle);
return rc;
}
rc = rtems_rfs_block_map_open (fs, &shared->inode, &shared->map);
5dbd0: 2800 movel %d0,%d4
if (rc > 0)
5dbd2: 6f00 00ec blew 5dcc0 <rtems_rfs_file_open+0x308>
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
5dbd6: 42a7 clrl %sp@- <== NOT EXECUTED 5dbd8: 4878 0008 pea 8 <DIVIDE_BY_ZERO> <== NOT EXECUTED 5dbdc: 4e95 jsr %a5@ <== NOT EXECUTED 5dbde: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 5dbe2: 508f addql #8,%sp <== NOT EXECUTED 5dbe4: 4a00 tstb %d0 <== NOT EXECUTED 5dbe6: 6648 bnes 5dc30 <rtems_rfs_file_open+0x278> <== NOT EXECUTED
printf ("rtems-rfs: file-open: block map open failed: %d: %s\n",
rc, strerror (rc));
rtems_rfs_inode_close (fs, &shared->inode);
5dbe8: 2f05 movel %d5,%sp@- <== NOT EXECUTED
free (shared);
5dbea: 49f9 0004 680c lea 4680c <free>,%a4 <== NOT EXECUTED
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
printf ("rtems-rfs: file-open: block map open failed: %d: %s\n",
rc, strerror (rc));
rtems_rfs_inode_close (fs, &shared->inode);
5dbf0: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5dbf2: 2d48 fffc movel %a0,%fp@(-4) <== NOT EXECUTED 5dbf6: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close> <== NOT EXECUTED
free (shared);
5dbfc: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5dbfe: 4e94 jsr %a4@ <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
5dc00: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 5dc04: 2f08 movel %a0,%sp@- <== NOT EXECUTED 5dc06: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5dc08: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
5dc0e: 4200 clrb %d0 <== NOT EXECUTED
handle->bnum = 0;
5dc10: 42ab 0006 clrl %a3@(6) <== NOT EXECUTED
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
handle->dirty = false;
5dc14: 1740 0004 moveb %d0,%a3@(4) <== NOT EXECUTED
handle->bnum = 0; handle->buffer = NULL;
5dc18: 42ab 000a clrl %a3@(10) <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
free (handle);
5dc1c: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5dc1e: 4e94 jsr %a4@ <== NOT EXECUTED
return rc;
5dc20: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
handle->shared = shared;
*file = handle;
return 0;
}
5dc24: 2004 movel %d4,%d0 <== NOT EXECUTED 5dc26: 4cee 3c7c ffd8 moveml %fp@(-40),%d2-%d6/%a2-%a5 <== NOT EXECUTED 5dc2c: 4e5e unlk %fp <== NOT EXECUTED 5dc2e: 4e75 rts <== NOT EXECUTED
rc = rtems_rfs_block_map_open (fs, &shared->inode, &shared->map);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
printf ("rtems-rfs: file-open: block map open failed: %d: %s\n",
5dc30: 2f04 movel %d4,%sp@- <== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_inode_close (fs, &shared->inode);
free (shared);
5dc32: 49f9 0004 680c lea 4680c <free>,%a4 <== NOT EXECUTED
rc = rtems_rfs_block_map_open (fs, &shared->inode, &shared->map);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
printf ("rtems-rfs: file-open: block map open failed: %d: %s\n",
5dc38: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED 5dc3e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5dc40: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5dc42: 4879 0007 4272 pea 74272 <CSWTCH.1+0xc96> <== NOT EXECUTED 5dc48: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5dc4e: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5dc52: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_inode_close (fs, &shared->inode);
5dc56: 2f05 movel %d5,%sp@- <== NOT EXECUTED 5dc58: 2d48 fffc movel %a0,%fp@(-4) <== NOT EXECUTED 5dc5c: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5dc5e: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close> <== NOT EXECUTED
free (shared);
5dc64: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5dc66: 4e94 jsr %a4@ <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
5dc68: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 5dc6c: 2f08 movel %a0,%sp@- <== NOT EXECUTED 5dc6e: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5dc70: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
5dc76: 4200 clrb %d0 <== NOT EXECUTED
handle->bnum = 0;
5dc78: 42ab 0006 clrl %a3@(6) <== NOT EXECUTED
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
handle->dirty = false;
5dc7c: 1740 0004 moveb %d0,%a3@(4) <== NOT EXECUTED
handle->bnum = 0; handle->buffer = NULL;
5dc80: 42ab 000a clrl %a3@(10) <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
free (handle);
5dc84: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5dc86: 4e94 jsr %a4@ <== NOT EXECUTED
return rc;
5dc88: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 5dc8c: 6096 bras 5dc24 <rtems_rfs_file_open+0x26c> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
5dc8e: 2f08 movel %a0,%sp@- <== NOT EXECUTED
shared = malloc (sizeof (rtems_rfs_file_shared));
if (!shared)
{
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
free (handle);
return ENOMEM;
5dc90: 780c moveq #12,%d4 <== NOT EXECUTED 5dc92: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5dc94: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
5dc9a: 4200 clrb %d0 <== NOT EXECUTED
handle->bnum = 0;
5dc9c: 42ab 0006 clrl %a3@(6) <== NOT EXECUTED
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
handle->dirty = false;
5dca0: 1740 0004 moveb %d0,%a3@(4) <== NOT EXECUTED
handle->bnum = 0; handle->buffer = NULL;
5dca4: 42ab 000a clrl %a3@(10) <== NOT EXECUTED
*/
shared = malloc (sizeof (rtems_rfs_file_shared));
if (!shared)
{
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
free (handle);
5dca8: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5dcaa: 4eb9 0004 680c jsr 4680c <free> <== NOT EXECUTED
return ENOMEM;
5dcb0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
handle->shared = shared;
*file = handle;
return 0;
}
5dcb4: 2004 movel %d4,%d0 <== NOT EXECUTED 5dcb6: 4cee 3c7c ffd8 moveml %fp@(-40),%d2-%d6/%a2-%a5 <== NOT EXECUTED 5dcbc: 4e5e unlk %fp <== NOT EXECUTED 5dcbe: 4e75 rts <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
free (handle);
return rc;
}
shared->references = 1;
5dcc0: 7201 moveq #1,%d1
* @return uint32_t The block count.
*/
static inline uint32_t
rtems_rfs_inode_get_block_count (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->block_count);
5dcc2: 4280 clrl %d0 5dcc4: 4284 clrl %d4
if (shared->inode.ino == ino)
return shared;
node = rtems_chain_next (node);
}
return NULL;
}
5dcc6: 206a 0018 moveal %a2@(24),%a0
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
free (handle);
return rc;
}
shared->references = 1;
5dcca: 2541 0008 movel %d1,%a2@(8) 5dcce: 1028 000c moveb %a0@(12),%d0 5dcd2: 123c 0018 moveb #24,%d1 5dcd6: 1828 000d moveb %a0@(13),%d4 5dcda: e3a8 lsll %d1,%d0 5dcdc: 4281 clrl %d1 5dcde: 1228 000f moveb %a0@(15),%d1 5dce2: 2241 moveal %d1,%a1 5dce4: 1228 000e moveb %a0@(14),%d1 5dce8: 4844 swap %d4 5dcea: 4244 clrw %d4 5dcec: e189 lsll #8,%d1 5dcee: 8084 orl %d4,%d0 5dcf0: 2809 movel %a1,%d4 5dcf2: 8084 orl %d4,%d0
* @return rtems_rfs_time The atime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_atime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->atime);
5dcf4: 4284 clrl %d4
* @return uint32_t The block count.
*/
static inline uint32_t
rtems_rfs_inode_get_block_count (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->block_count);
5dcf6: 8081 orl %d1,%d0
* @return uint32_t The block offset.
*/
static inline uint16_t
rtems_rfs_inode_get_block_offset (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->block_offset);
5dcf8: 4281 clrl %d1
* @return uint32_t The block count.
*/
static inline uint32_t
rtems_rfs_inode_get_block_count (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->block_count);
5dcfa: 2540 007c movel %d0,%a2@(124)
* @return uint32_t The block offset.
*/
static inline uint16_t
rtems_rfs_inode_get_block_offset (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->block_offset);
5dcfe: 4280 clrl %d0 5dd00: 1028 000a moveb %a0@(10),%d0 5dd04: 1228 000b moveb %a0@(11),%d1 5dd08: e188 lsll #8,%d0
shared->size.count = rtems_rfs_inode_get_block_count (&shared->inode);
shared->size.offset = rtems_rfs_inode_get_block_offset (&shared->inode);
5dd0a: 8081 orl %d1,%d0 5dd0c: 2540 0080 movel %d0,%a2@(128)
* @return rtems_rfs_time The atime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_atime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->atime);
5dd10: 1228 0013 moveb %a0@(19),%d1 5dd14: 4280 clrl %d0 5dd16: 1028 0010 moveb %a0@(16),%d0 5dd1a: 1828 0011 moveb %a0@(17),%d4 5dd1e: 2241 moveal %d1,%a1 5dd20: 7218 moveq #24,%d1 5dd22: 4844 swap %d4 5dd24: 4244 clrw %d4 5dd26: e3a8 lsll %d1,%d0 5dd28: 4281 clrl %d1 5dd2a: 1228 0012 moveb %a0@(18),%d1 5dd2e: 8084 orl %d4,%d0 5dd30: 2809 movel %a1,%d4 5dd32: e189 lsll #8,%d1 5dd34: 8084 orl %d4,%d0
* @return rtems_rfs_time The mtime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_mtime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->mtime);
5dd36: 4284 clrl %d4
* @return rtems_rfs_time The atime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_atime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->atime);
5dd38: 8081 orl %d1,%d0
* @return rtems_rfs_time The mtime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_mtime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->mtime);
5dd3a: 4281 clrl %d1
* @return rtems_rfs_time The atime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_atime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->atime);
5dd3c: 2540 0084 movel %d0,%a2@(132)
* @return rtems_rfs_time The mtime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_mtime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->mtime);
5dd40: 1228 0017 moveb %a0@(23),%d1 5dd44: 4280 clrl %d0 5dd46: 1028 0014 moveb %a0@(20),%d0 5dd4a: 1828 0015 moveb %a0@(21),%d4 5dd4e: 2241 moveal %d1,%a1 5dd50: 7218 moveq #24,%d1 5dd52: 4844 swap %d4 5dd54: 4244 clrw %d4 5dd56: e3a8 lsll %d1,%d0 5dd58: 4281 clrl %d1 5dd5a: 1228 0016 moveb %a0@(22),%d1 5dd5e: 8084 orl %d4,%d0 5dd60: 2809 movel %a1,%d4 5dd62: e189 lsll #8,%d1 5dd64: 8084 orl %d4,%d0
* @return rtems_rfs_time The ctime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_ctime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->ctime);
5dd66: 4284 clrl %d4
* @return rtems_rfs_time The mtime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_mtime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->mtime);
5dd68: 8081 orl %d1,%d0
* @return rtems_rfs_time The ctime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_ctime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->ctime);
5dd6a: 4281 clrl %d1
* @return rtems_rfs_time The mtime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_mtime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->mtime);
5dd6c: 2540 0088 movel %d0,%a2@(136)
* @return rtems_rfs_time The ctime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_ctime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->ctime);
5dd70: 1228 001b moveb %a0@(27),%d1 5dd74: 4280 clrl %d0 5dd76: 1028 0018 moveb %a0@(24),%d0 5dd7a: 1828 0019 moveb %a0@(25),%d4 5dd7e: 2241 moveal %d1,%a1 5dd80: 7218 moveq #24,%d1 5dd82: 4844 swap %d4 5dd84: 4244 clrw %d4 5dd86: e3a8 lsll %d1,%d0 5dd88: 4281 clrl %d1 5dd8a: 1228 001a moveb %a0@(26),%d1 5dd8e: 2043 moveal %d3,%a0 5dd90: 8084 orl %d4,%d0 5dd92: 2809 movel %a1,%d4 5dd94: e189 lsll #8,%d1 5dd96: 8084 orl %d4,%d0
shared->atime = rtems_rfs_inode_get_atime (&shared->inode);
shared->mtime = rtems_rfs_inode_get_mtime (&shared->inode);
shared->ctime = rtems_rfs_inode_get_ctime (&shared->inode);
shared->fs = fs;
5dd98: 2543 0090 movel %d3,%a2@(144) 5dd9c: 8081 orl %d1,%d0 5dd9e: 2540 008c movel %d0,%a2@(140) 5dda2: 2f0a movel %a2,%sp@- 5dda4: 4868 0070 pea %a0@(112) 5dda8: 4eb9 0004 bb40 jsr 4bb40 <_Chain_Append>
rtems_chain_append (&fs->file_shares, &shared->link);
rtems_rfs_inode_unload (fs, &shared->inode, false);
5ddae: 42a7 clrl %sp@- 5ddb0: 2f05 movel %d5,%sp@- 5ddb2: 2f03 movel %d3,%sp@- 5ddb4: 4eb9 0005 03d0 jsr 503d0 <rtems_rfs_inode_unload>
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
5ddba: 42a7 clrl %sp@- 5ddbc: 4878 0008 pea 8 <DIVIDE_BY_ZERO> 5ddc0: 4e95 jsr %a5@ 5ddc2: 4fef 001c lea %sp@(28),%sp 5ddc6: 4a00 tstb %d0 5ddc8: 6700 fd60 beqw 5db2a <rtems_rfs_file_open+0x172>
printf ("rtems-rfs: file-open: ino=%" PRId32 " share created\n", ino);
5ddcc: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5ddce: 4879 0007 42a7 pea 742a7 <CSWTCH.1+0xccb> <== NOT EXECUTED
handle->flags = flags;
handle->shared = shared;
*file = handle;
return 0;
5ddd4: 4284 clrl %d4 <== NOT EXECUTED
rtems_chain_append (&fs->file_shares, &shared->link);
rtems_rfs_inode_unload (fs, &shared->inode, false);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
printf ("rtems-rfs: file-open: ino=%" PRId32 " share created\n", ino);
5ddd6: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED
}
handle->flags = flags;
5dddc: 26ae 0010 movel %fp@(16),%a3@ <== NOT EXECUTED
handle->shared = shared;
*file = handle;
5dde0: 2246 moveal %d6,%a1 <== NOT EXECUTED
rtems_chain_append (&fs->file_shares, &shared->link);
rtems_rfs_inode_unload (fs, &shared->inode, false);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
printf ("rtems-rfs: file-open: ino=%" PRId32 " share created\n", ino);
5dde2: 508f addql #8,%sp <== NOT EXECUTED
}
handle->flags = flags;
handle->shared = shared;
5dde4: 274a 001a movel %a2,%a3@(26) <== NOT EXECUTED
*file = handle;
5dde8: 228b movel %a3,%a1@ <== NOT EXECUTED 5ddea: 6000 fd4c braw 5db38 <rtems_rfs_file_open+0x180> <== NOT EXECUTED
0005e614 <rtems_rfs_file_seek>:
int
rtems_rfs_file_seek (rtems_rfs_file_handle* handle,
rtems_rfs_pos pos,
rtems_rfs_pos* new_pos)
{
5e614: 4e56 ffec linkw %fp,#-20 5e618: 48d7 043c moveml %d2-%d5/%a2,%sp@
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
5e61c: 42a7 clrl %sp@- 5e61e: 4878 0020 pea 20 <OPER2+0xc>
int
rtems_rfs_file_seek (rtems_rfs_file_handle* handle,
rtems_rfs_pos pos,
rtems_rfs_pos* new_pos)
{
5e622: 246e 0008 moveal %fp@(8),%a2 5e626: 242e 000c movel %fp@(12),%d2 5e62a: 262e 0010 movel %fp@(16),%d3
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
5e62e: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> 5e634: 508f addql #8,%sp 5e636: 4a00 tstb %d0
5e638: 6664 bnes 5e69e <rtems_rfs_file_seek+0x8a> <== NEVER TAKEN
* file, this function does not itself extend the size of the file." * * This means the file needs to set the file size to the pos only when a * write occurs. */ if (pos < rtems_rfs_file_shared_get_size (rtems_rfs_file_fs (handle),
5e63a: 206a 001a moveal %a2@(26),%a0 5e63e: 4868 007c pea %a0@(124) 5e642: 2f28 0090 movel %a0@(144),%sp@- 5e646: 2802 movel %d2,%d4 5e648: 2a03 movel %d3,%d5 5e64a: 4eb9 0005 ad76 jsr 5ad76 <rtems_rfs_block_get_size> 5e650: 508f addql #8,%sp 5e652: 9a81 subl %d1,%d5 5e654: 9980 subxl %d0,%d4
5e656: 6516 bcss 5e66e <rtems_rfs_file_seek+0x5a> <== NEVER TAKEN
handle->shared))
rtems_rfs_file_set_bpos (handle, pos);
*new_pos = pos;
5e658: 206e 0014 moveal %fp@(20),%a0
return 0; }
5e65c: 4280 clrl %d0
*/
if (pos < rtems_rfs_file_shared_get_size (rtems_rfs_file_fs (handle),
handle->shared))
rtems_rfs_file_set_bpos (handle, pos);
*new_pos = pos;
5e65e: 2082 movel %d2,%a0@ 5e660: 2143 0004 movel %d3,%a0@(4)
return 0; }
5e664: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 5e66a: 4e5e unlk %fp 5e66c: 4e75 rts
* This means the file needs to set the file size to the pos only when a
* write occurs.
*/
if (pos < rtems_rfs_file_shared_get_size (rtems_rfs_file_fs (handle),
handle->shared))
rtems_rfs_file_set_bpos (handle, pos);
5e66e: 486a 000e pea %a2@(14) <== NOT EXECUTED 5e672: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED 5e676: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5e678: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5e67a: 2f28 0090 movel %a0@(144),%sp@- <== NOT EXECUTED 5e67e: 4eb9 0005 ac9c jsr 5ac9c <rtems_rfs_block_get_bpos> <== NOT EXECUTED
*new_pos = pos;
5e684: 206e 0014 moveal %fp@(20),%a0 <== NOT EXECUTED
* This means the file needs to set the file size to the pos only when a
* write occurs.
*/
if (pos < rtems_rfs_file_shared_get_size (rtems_rfs_file_fs (handle),
handle->shared))
rtems_rfs_file_set_bpos (handle, pos);
5e688: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
*new_pos = pos;
return 0;
}
5e68c: 4280 clrl %d0 <== NOT EXECUTED
*/
if (pos < rtems_rfs_file_shared_get_size (rtems_rfs_file_fs (handle),
handle->shared))
rtems_rfs_file_set_bpos (handle, pos);
*new_pos = pos;
5e68e: 2082 movel %d2,%a0@ <== NOT EXECUTED 5e690: 2143 0004 movel %d3,%a0@(4) <== NOT EXECUTED
return 0; }
5e694: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 <== NOT EXECUTED 5e69a: 4e5e unlk %fp <== NOT EXECUTED 5e69c: 4e75 rts <== NOT EXECUTED
rtems_rfs_file_seek (rtems_rfs_file_handle* handle,
rtems_rfs_pos pos,
rtems_rfs_pos* new_pos)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-seek: new=%" PRIu64 "\n", pos);
5e69e: 2f03 movel %d3,%sp@- <== NOT EXECUTED
* file, this function does not itself extend the size of the file." * * This means the file needs to set the file size to the pos only when a * write occurs. */ if (pos < rtems_rfs_file_shared_get_size (rtems_rfs_file_fs (handle),
5e6a0: 2802 movel %d2,%d4 <== NOT EXECUTED 5e6a2: 2a03 movel %d3,%d5 <== NOT EXECUTED
rtems_rfs_file_seek (rtems_rfs_file_handle* handle,
rtems_rfs_pos pos,
rtems_rfs_pos* new_pos)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-seek: new=%" PRIu64 "\n", pos);
5e6a4: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5e6a6: 4879 0007 44e2 pea 744e2 <CSWTCH.1+0xf06> <== NOT EXECUTED 5e6ac: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED
* file, this function does not itself extend the size of the file." * * This means the file needs to set the file size to the pos only when a * write occurs. */ if (pos < rtems_rfs_file_shared_get_size (rtems_rfs_file_fs (handle),
5e6b2: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
rtems_rfs_file_seek (rtems_rfs_file_handle* handle,
rtems_rfs_pos pos,
rtems_rfs_pos* new_pos)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-seek: new=%" PRIu64 "\n", pos);
5e6b6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5e6ba: 4868 007c pea %a0@(124) <== NOT EXECUTED 5e6be: 2f28 0090 movel %a0@(144),%sp@- <== NOT EXECUTED 5e6c2: 4eb9 0005 ad76 jsr 5ad76 <rtems_rfs_block_get_size> <== NOT EXECUTED
* file, this function does not itself extend the size of the file." * * This means the file needs to set the file size to the pos only when a * write occurs. */ if (pos < rtems_rfs_file_shared_get_size (rtems_rfs_file_fs (handle),
5e6c8: 508f addql #8,%sp <== NOT EXECUTED 5e6ca: 9a81 subl %d1,%d5 <== NOT EXECUTED 5e6cc: 9980 subxl %d0,%d4 <== NOT EXECUTED 5e6ce: 6488 bccs 5e658 <rtems_rfs_file_seek+0x44> <== NOT EXECUTED 5e6d0: 609c bras 5e66e <rtems_rfs_file_seek+0x5a> <== NOT EXECUTED
0005e6d2 <rtems_rfs_file_set_size>:
}
int
rtems_rfs_file_set_size (rtems_rfs_file_handle* handle,
rtems_rfs_pos new_size)
{
5e6d2: 4e56 ffa8 linkw %fp,#-88 5e6d6: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
rtems_rfs_block_map* map = rtems_rfs_file_map (handle);
rtems_rfs_pos size;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
5e6da: 42a7 clrl %sp@- 5e6dc: 4878 0020 pea 20 <OPER2+0xc>
}
int
rtems_rfs_file_set_size (rtems_rfs_file_handle* handle,
rtems_rfs_pos new_size)
{
5e6e0: 246e 0008 moveal %fp@(8),%a2
rtems_rfs_block_map* map = rtems_rfs_file_map (handle);
5e6e4: 266a 001a moveal %a2@(26),%a3 5e6e8: 240b movel %a3,%d2 5e6ea: 0682 0000 0032 addil #50,%d2
}
int
rtems_rfs_file_set_size (rtems_rfs_file_handle* handle,
rtems_rfs_pos new_size)
{
5e6f0: 282e 000c movel %fp@(12),%d4 5e6f4: 2a2e 0010 movel %fp@(16),%d5
rtems_rfs_block_map* map = rtems_rfs_file_map (handle);
rtems_rfs_pos size;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
5e6f8: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> 5e6fe: 508f addql #8,%sp 5e700: 4a00 tstb %d0 5e702: 6600 01c6 bnew 5e8ca <rtems_rfs_file_set_size+0x1f8>
/*
* Short cut for the common truncate on open call.
*/
if (new_size == 0)
{
rc = rtems_rfs_block_map_free_all (rtems_rfs_file_fs (handle), map);
5e706: 206a 001a moveal %a2@(26),%a0
printf ("rtems-rfs: file-set-size: size=%" PRIu64 "\n", new_size);
/*
* Short cut for the common truncate on open call.
*/
if (new_size == 0)
5e70a: 2004 movel %d4,%d0 5e70c: 8085 orl %d5,%d0
5e70e: 6620 bnes 5e730 <rtems_rfs_file_set_size+0x5e>
{
rc = rtems_rfs_block_map_free_all (rtems_rfs_file_fs (handle), map);
5e710: 2f02 movel %d2,%sp@- 5e712: 2f28 0090 movel %a0@(144),%sp@- 5e716: 4eb9 0005 b9f6 jsr 5b9f6 <rtems_rfs_block_map_free_all>
if (rc > 0)
5e71c: 508f addql #8,%sp
/*
* Short cut for the common truncate on open call.
*/
if (new_size == 0)
{
rc = rtems_rfs_block_map_free_all (rtems_rfs_file_fs (handle), map);
5e71e: 2200 movel %d0,%d1
if (rc > 0)
5e720: 6f00 01c0 blew 5e8e2 <rtems_rfs_file_set_size+0x210>
if (rtems_rfs_file_update_mtime (handle))
handle->shared->mtime = time (NULL);
return 0;
}
5e724: 2001 movel %d1,%d0 <== NOT EXECUTED 5e726: 4cee 3cfc ffa8 moveml %fp@(-88),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5e72c: 4e5e unlk %fp <== NOT EXECUTED 5e72e: 4e75 rts <== NOT EXECUTED
5e730: 4868 007c pea %a0@(124) 5e734: 2f28 0090 movel %a0@(144),%sp@-
size = rtems_rfs_file_size (handle);
/*
* If the file is same size do nothing else grow or shrink it ?
*/
if (size != new_size)
5e738: 2c04 movel %d4,%d6 5e73a: 2e05 movel %d5,%d7 5e73c: 4eb9 0005 ad76 jsr 5ad76 <rtems_rfs_block_get_size> 5e742: 508f addql #8,%sp 5e744: 9e81 subl %d1,%d7 5e746: 9d80 subxl %d0,%d6 5e748: 6700 0198 beqw 5e8e2 <rtems_rfs_file_set_size+0x210>
{
if (size < new_size)
5e74c: 2c04 movel %d4,%d6 5e74e: 2e05 movel %d5,%d7 5e750: 9e81 subl %d1,%d7 5e752: 9d80 subxl %d0,%d6 5e754: 6300 01b8 blsw 5e90e <rtems_rfs_file_set_size+0x23c>
rtems_rfs_pos count;
uint32_t length;
bool read_block;
count = new_size - size;
length = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
5e758: 2a6a 001a moveal %a2@(26),%a5 5e75c: 284d moveal %a5,%a4
*/
rtems_rfs_pos count;
uint32_t length;
bool read_block;
count = new_size - size;
5e75e: 2c04 movel %d4,%d6 5e760: 2e05 movel %d5,%d7
length = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
5e762: 206d 0090 moveal %a5@(144),%a0
*/
rtems_rfs_pos count;
uint32_t length;
bool read_block;
count = new_size - size;
5e766: 9e81 subl %d1,%d7 5e768: 9d80 subxl %d0,%d6
length = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
5e76a: 2628 0008 movel %a0@(8),%d3
*/
rtems_rfs_pos count;
uint32_t length;
bool read_block;
count = new_size - size;
5e76e: 2d46 ffe8 movel %d6,%fp@(-24) 5e772: 2d47 ffec movel %d7,%fp@(-20)
length = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
read_block = false;
while (count)
5e776: 8e86 orl %d6,%d7 5e778: 6700 016c beqw 5e8e6 <rtems_rfs_file_set_size+0x214> 5e77c: 2a0e movel %fp,%d5
}
/*
* Only read the block if the length is not the block size.
*/
rc = rtems_rfs_buffer_handle_request (rtems_rfs_file_fs (handle),
5e77e: 280a movel %a2,%d4 5e780: 5985 subql #4,%d5 5e782: 4bf9 0005 b1c2 lea 5b1c2 <rtems_rfs_block_map_find>,%a5 5e788: 5884 addql #4,%d4
count = new_size - size;
length = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
read_block = false;
while (count)
5e78a: 4201 clrb %d1 5e78c: 2d42 ffd2 movel %d2,%fp@(-46) 5e790: 1d41 ffd7 moveb %d1,%fp@(-41)
/*
* Get the block position for the current end of the file as seen by
* the map. If not found and the EOF grow the map then fill the block
* with 0.
*/
rtems_rfs_block_size_get_bpos (rtems_rfs_block_map_size (map), &bpos);
5e794: 202b 0038 movel %a3@(56),%d0 5e798: 222b 003c movel %a3@(60),%d1 5e79c: 2d40 fff0 movel %d0,%fp@(-16) 5e7a0: 2d41 fff4 movel %d1,%fp@(-12) 5e7a4: 42ae fff8 clrl %fp@(-8) 5e7a8: 4a81 tstl %d1
5e7aa: 6706 beqs 5e7b2 <rtems_rfs_file_set_size+0xe0>
5e7ac: 5380 subql #1,%d0 5e7ae: 2d40 fff0 movel %d0,%fp@(-16)
rc = rtems_rfs_block_map_find (rtems_rfs_file_fs (handle),
5e7b2: 2f05 movel %d5,%sp@- 5e7b4: 486e fff0 pea %fp@(-16) 5e7b8: 2f2e ffd2 movel %fp@(-46),%sp@- 5e7bc: 2f2c 0090 movel %a4@(144),%sp@- 5e7c0: 4e95 jsr %a5@
map, &bpos, &block);
if (rc > 0)
5e7c2: 4fef 0010 lea %sp@(16),%sp 5e7c6: 4a80 tstl %d0
5e7c8: 6f2a bles 5e7f4 <rtems_rfs_file_set_size+0x122>
{
/*
* Have we reached the EOF ?
*/
if (rc != ENXIO)
5e7ca: 7406 moveq #6,%d2 5e7cc: b480 cmpl %d0,%d2 5e7ce: 6600 0206 bnew 5e9d6 <rtems_rfs_file_set_size+0x304>
return rc;
rc = rtems_rfs_block_map_grow (rtems_rfs_file_fs (handle),
5e7d2: 2f05 movel %d5,%sp@- 5e7d4: 4878 0001 pea 1 <ADD> 5e7d8: 206a 001a moveal %a2@(26),%a0 5e7dc: 2f2e ffd2 movel %fp@(-46),%sp@- 5e7e0: 2f28 0090 movel %a0@(144),%sp@- 5e7e4: 4eb9 0005 b38e jsr 5b38e <rtems_rfs_block_map_grow>
map, 1, &block);
if (rc > 0)
5e7ea: 4fef 0010 lea %sp@(16),%sp 5e7ee: 4a80 tstl %d0 5e7f0: 6e00 01e4 bgtw 5e9d6 <rtems_rfs_file_set_size+0x304>
return rc;
}
if (count < (length - bpos.boff))
5e7f4: 202e fff4 movel %fp@(-12),%d0 5e7f8: 2203 movel %d3,%d1 5e7fa: 9280 subl %d0,%d1 5e7fc: 91c8 subal %a0,%a0 5e7fe: 2d41 ffe4 movel %d1,%fp@(-28) 5e802: 222e ffe8 movel %fp@(-24),%d1 5e806: 242e ffec movel %fp@(-20),%d2 5e80a: 2d48 ffe0 movel %a0,%fp@(-32) 5e80e: 2c2e ffe0 movel %fp@(-32),%d6 5e812: 2e2e ffe4 movel %fp@(-28),%d7 5e816: 9e82 subl %d2,%d7 5e818: 9d81 subxl %d1,%d6 5e81a: 6300 01de blsw 5e9fa <rtems_rfs_file_set_size+0x328>
{
length = count + bpos.boff;
5e81e: 262e ffec movel %fp@(-20),%d3 5e822: d680 addl %d0,%d3 5e824: 7001 moveq #1,%d0 5e826: 7401 moveq #1,%d2
read_block = true;
5e828: 7c01 moveq #1,%d6
*/
static inline void
rtems_rfs_block_map_set_size_offset (rtems_rfs_block_map* map,
rtems_rfs_block_off offset)
{
map->size.offset = offset;
5e82a: 2743 003c movel %d3,%a3@(60)
map->dirty = true;
5e82e: 1742 0032 moveb %d2,%a3@(50) 5e832: 1d46 ffd7 moveb %d6,%fp@(-41)
}
/*
* Only read the block if the length is not the block size.
*/
rc = rtems_rfs_buffer_handle_request (rtems_rfs_file_fs (handle),
5e836: 2f00 movel %d0,%sp@- 5e838: 2f2e fffc movel %fp@(-4),%sp@- 5e83c: 206a 001a moveal %a2@(26),%a0 5e840: 2f04 movel %d4,%sp@- 5e842: 2f28 0090 movel %a0@(144),%sp@- 5e846: 4eb9 0005 bd6e jsr 5bd6e <rtems_rfs_buffer_handle_request>
rtems_rfs_file_buffer (handle),
block, read_block);
if (rc > 0)
5e84c: 4fef 0010 lea %sp@(16),%sp 5e850: 4a80 tstl %d0 5e852: 6e00 0182 bgtw 5e9d6 <rtems_rfs_file_set_size+0x304>
return rc;
dst = rtems_rfs_buffer_data (&handle->buffer);
memset (dst + bpos.boff, 0, length - bpos.boff);
5e856: 202e fff4 movel %fp@(-12),%d0 5e85a: 2203 movel %d3,%d1 5e85c: 9280 subl %d0,%d1 5e85e: 2f01 movel %d1,%sp@-
rtems_rfs_file_buffer (handle),
block, read_block);
if (rc > 0)
return rc;
dst = rtems_rfs_buffer_data (&handle->buffer);
5e860: 206a 000a moveal %a2@(10),%a0
memset (dst + bpos.boff, 0, length - bpos.boff);
5e864: 42a7 clrl %sp@- 5e866: d0a8 001e addl %a0@(30),%d0 5e86a: 2f00 movel %d0,%sp@-
rtems_rfs_buffer_mark_dirty (rtems_rfs_file_buffer (handle));
5e86c: 7401 moveq #1,%d2
block, read_block);
if (rc > 0)
return rc;
dst = rtems_rfs_buffer_data (&handle->buffer);
memset (dst + bpos.boff, 0, length - bpos.boff);
5e86e: 4eb9 0006 2f48 jsr 62f48 <memset>
rtems_rfs_buffer_mark_dirty (rtems_rfs_file_buffer (handle));
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
5e874: 206a 001a moveal %a2@(26),%a0 5e878: 2f04 movel %d4,%sp@- 5e87a: 2f28 0090 movel %a0@(144),%sp@-
return rc;
dst = rtems_rfs_buffer_data (&handle->buffer);
memset (dst + bpos.boff, 0, length - bpos.boff);
rtems_rfs_buffer_mark_dirty (rtems_rfs_file_buffer (handle));
5e87e: 1542 0004 moveb %d2,%a2@(4)
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
5e882: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release>
rtems_rfs_file_buffer (handle));
if (rc > 0)
5e888: 4fef 0014 lea %sp@(20),%sp 5e88c: 4a80 tstl %d0 5e88e: 6e00 0146 bgtw 5e9d6 <rtems_rfs_file_set_size+0x304>
return rc;
count -= length - bpos.boff;
5e892: 2003 movel %d3,%d0 5e894: 90ae fff4 subl %fp@(-12),%d0 5e898: 91c8 subal %a0,%a0 5e89a: 2d40 ffdc movel %d0,%fp@(-36) 5e89e: 2d48 ffd8 movel %a0,%fp@(-40) 5e8a2: 2c2e ffd8 movel %fp@(-40),%d6 5e8a6: 2e2e ffdc movel %fp@(-36),%d7 5e8aa: 9fae ffec subl %d7,%fp@(-20) 5e8ae: 202e ffe8 movel %fp@(-24),%d0 5e8b2: 9186 subxl %d6,%d0 5e8b4: 2d40 ffe8 movel %d0,%fp@(-24)
count = new_size - size;
length = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
read_block = false;
while (count)
5e8b8: 222e ffe8 movel %fp@(-24),%d1 5e8bc: 82ae ffec orl %fp@(-20),%d1
5e8c0: 6720 beqs 5e8e2 <rtems_rfs_file_set_size+0x210>
5e8c2: 286a 001a moveal %a2@(26),%a4 5e8c6: 6000 fecc braw 5e794 <rtems_rfs_file_set_size+0xc2>
rtems_rfs_block_map* map = rtems_rfs_file_map (handle);
rtems_rfs_pos size;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-set-size: size=%" PRIu64 "\n", new_size);
5e8ca: 2f05 movel %d5,%sp@- <== NOT EXECUTED 5e8cc: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5e8ce: 4879 0007 4502 pea 74502 <CSWTCH.1+0xf26> <== NOT EXECUTED 5e8d4: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5e8da: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5e8de: 6000 fe26 braw 5e706 <rtems_rfs_file_set_size+0x34> <== NOT EXECUTED
count = new_size - size;
length = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
read_block = false;
while (count)
5e8e2: 2a6a 001a moveal %a2@(26),%a5
}
handle->shared->size.count = rtems_rfs_block_map_count (map);
handle->shared->size.offset = rtems_rfs_block_map_size_offset (map);
if (rtems_rfs_file_update_mtime (handle))
5e8e6: 7002 moveq #2,%d0
count = new_size - size;
length = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
read_block = false;
while (count)
5e8e8: 242b 0038 movel %a3@(56),%d2 5e8ec: 222b 003c movel %a3@(60),%d1
}
handle->shared->size.count = rtems_rfs_block_map_count (map);
handle->shared->size.offset = rtems_rfs_block_map_size_offset (map);
if (rtems_rfs_file_update_mtime (handle))
5e8f0: c092 andl %a2@,%d0
rtems_rfs_file_bpos (handle));
}
}
}
handle->shared->size.count = rtems_rfs_block_map_count (map);
5e8f2: 2b42 007c movel %d2,%a5@(124)
handle->shared->size.offset = rtems_rfs_block_map_size_offset (map);
5e8f6: 2b41 0080 movel %d1,%a5@(128)
if (rtems_rfs_file_update_mtime (handle))
5e8fa: 4a80 tstl %d0 5e8fc: 6700 00a6 beqw 5e9a4 <rtems_rfs_file_set_size+0x2d2>
handle->shared->mtime = time (NULL);
return 0;
5e900: 4281 clrl %d1 <== NOT EXECUTED
}
5e902: 2001 movel %d1,%d0 <== NOT EXECUTED 5e904: 4cee 3cfc ffa8 moveml %fp@(-88),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5e90a: 4e5e unlk %fp <== NOT EXECUTED 5e90c: 4e75 rts <== NOT EXECUTED
uint32_t offset;
blocks =
rtems_rfs_block_map_count (map) -
(((new_size - 1) /
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle))) + 1);
5e90e: 286a 001a moveal %a2@(26),%a4 <== NOT EXECUTED
rtems_rfs_block_no blocks;
uint32_t offset;
blocks =
rtems_rfs_block_map_count (map) -
(((new_size - 1) /
5e912: 91c8 subal %a0,%a0 <== NOT EXECUTED
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle))) + 1);
5e914: 2a6c 0090 moveal %a4@(144),%a5 <== NOT EXECUTED
rtems_rfs_block_no blocks;
uint32_t offset;
blocks =
rtems_rfs_block_map_count (map) -
(((new_size - 1) /
5e918: 242d 0008 movel %a5@(8),%d2 <== NOT EXECUTED 5e91c: 2d42 ffec movel %d2,%fp@(-20) <== NOT EXECUTED
*/
rtems_rfs_block_no blocks;
uint32_t offset;
blocks =
rtems_rfs_block_map_count (map) -
5e920: 242b 0038 movel %a3@(56),%d2 <== NOT EXECUTED
(((new_size - 1) /
5e924: 2f2e ffec movel %fp@(-20),%sp@- <== NOT EXECUTED 5e928: 70ff moveq #-1,%d0 <== NOT EXECUTED 5e92a: 72ff moveq #-1,%d1 <== NOT EXECUTED 5e92c: 2d48 ffe8 movel %a0,%fp@(-24) <== NOT EXECUTED 5e930: 2f2e ffe8 movel %fp@(-24),%sp@- <== NOT EXECUTED 5e934: d285 addl %d5,%d1 <== NOT EXECUTED 5e936: d184 addxl %d4,%d0 <== NOT EXECUTED 5e938: 2f01 movel %d1,%sp@- <== NOT EXECUTED 5e93a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5e93c: 4eb9 0006 f690 jsr 6f690 <__udivdi3> <== NOT EXECUTED 5e942: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
* Shrink
*/
rtems_rfs_block_no blocks;
uint32_t offset;
blocks =
5e946: 4681 notl %d1 <== NOT EXECUTED 5e948: d282 addl %d2,%d1 <== NOT EXECUTED
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle))) + 1);
offset =
new_size % rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
if (blocks)
5e94a: 6674 bnes 5e9c0 <rtems_rfs_file_set_size+0x2ee> <== NOT EXECUTED
rtems_rfs_block_map_count (map) -
(((new_size - 1) /
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle))) + 1);
offset =
new_size % rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
5e94c: 2f2e ffec movel %fp@(-20),%sp@- <== NOT EXECUTED 5e950: 2f2e ffe8 movel %fp@(-24),%sp@- <== NOT EXECUTED 5e954: 7601 moveq #1,%d3 <== NOT EXECUTED 5e956: 2f05 movel %d5,%sp@- <== NOT EXECUTED 5e958: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5e95a: 4eb9 0006 fabc jsr 6fabc <__umoddi3> <== NOT EXECUTED 5e960: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
*/
static inline void
rtems_rfs_block_map_set_size_offset (rtems_rfs_block_map* map,
rtems_rfs_block_off offset)
{
map->size.offset = offset;
5e964: 2741 003c movel %d1,%a3@(60) <== NOT EXECUTED
return rc;
}
rtems_rfs_block_map_set_size_offset (map, offset);
if (rtems_rfs_block_pos_past_end (rtems_rfs_file_bpos (handle),
5e968: 202a 000e movel %a2@(14),%d0 <== NOT EXECUTED
map->dirty = true;
5e96c: 1743 0032 moveb %d3,%a3@(50) <== NOT EXECUTED 5e970: 4a80 tstl %d0 <== NOT EXECUTED 5e972: 6770 beqs 5e9e4 <rtems_rfs_file_set_size+0x312> <== NOT EXECUTED 5e974: 4a82 tstl %d2 <== NOT EXECUTED 5e976: 666c bnes 5e9e4 <rtems_rfs_file_set_size+0x312> <== NOT EXECUTED
rtems_rfs_block_map_size (map)))
rtems_rfs_block_size_get_bpos (rtems_rfs_block_map_size (map),
5e978: 2542 000e movel %d2,%a2@(14) <== NOT EXECUTED 5e97c: 2541 0012 movel %d1,%a2@(18) <== NOT EXECUTED 5e980: 42aa 0016 clrl %a2@(22) <== NOT EXECUTED 5e984: 4a81 tstl %d1 <== NOT EXECUTED 5e986: 6708 beqs 5e990 <rtems_rfs_file_set_size+0x2be> <== NOT EXECUTED 5e988: 2c02 movel %d2,%d6 <== NOT EXECUTED 5e98a: 5386 subql #1,%d6 <== NOT EXECUTED 5e98c: 2546 000e movel %d6,%a2@(14) <== NOT EXECUTED 5e990: 2a4c moveal %a4,%a5 <== NOT EXECUTED
}
handle->shared->size.count = rtems_rfs_block_map_count (map);
handle->shared->size.offset = rtems_rfs_block_map_size_offset (map);
if (rtems_rfs_file_update_mtime (handle))
5e992: 7002 moveq #2,%d0 <== NOT EXECUTED 5e994: c092 andl %a2@,%d0 <== NOT EXECUTED
rtems_rfs_file_bpos (handle));
}
}
}
handle->shared->size.count = rtems_rfs_block_map_count (map);
5e996: 2b42 007c movel %d2,%a5@(124) <== NOT EXECUTED
handle->shared->size.offset = rtems_rfs_block_map_size_offset (map);
5e99a: 2b41 0080 movel %d1,%a5@(128) <== NOT EXECUTED
if (rtems_rfs_file_update_mtime (handle))
5e99e: 4a80 tstl %d0 <== NOT EXECUTED 5e9a0: 6600 ff5e bnew 5e900 <rtems_rfs_file_set_size+0x22e> <== NOT EXECUTED
handle->shared->mtime = time (NULL);
5e9a4: 42a7 clrl %sp@- 5e9a6: 4eb9 0006 61f8 jsr 661f8 <time> 5e9ac: 588f addql #4,%sp
return 0;
5e9ae: 4281 clrl %d1
handle->shared->size.count = rtems_rfs_block_map_count (map);
handle->shared->size.offset = rtems_rfs_block_map_size_offset (map);
if (rtems_rfs_file_update_mtime (handle))
handle->shared->mtime = time (NULL);
5e9b0: 2b40 0088 movel %d0,%a5@(136)
return 0;
}
5e9b4: 2001 movel %d1,%d0 5e9b6: 4cee 3cfc ffa8 moveml %fp@(-88),%d2-%d7/%a2-%a5 5e9bc: 4e5e unlk %fp 5e9be: 4e75 rts
new_size % rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
if (blocks)
{
int rc;
rc = rtems_rfs_block_map_shrink (rtems_rfs_file_fs (handle),
5e9c0: 2f01 movel %d1,%sp@- <== NOT EXECUTED 5e9c2: 486c 0032 pea %a4@(50) <== NOT EXECUTED 5e9c6: 2f0d movel %a5,%sp@- <== NOT EXECUTED 5e9c8: 4eb9 0005 b72a jsr 5b72a <rtems_rfs_block_map_shrink> <== NOT EXECUTED
rtems_rfs_file_map (handle),
blocks);
if (rc > 0)
5e9ce: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5e9d2: 4a80 tstl %d0 <== NOT EXECUTED 5e9d4: 6f38 bles 5ea0e <rtems_rfs_file_set_size+0x33c> <== NOT EXECUTED
5e9d6: 2200 movel %d0,%d1
if (rtems_rfs_file_update_mtime (handle))
handle->shared->mtime = time (NULL);
return 0;
}
5e9d8: 2001 movel %d1,%d0 5e9da: 4cee 3cfc ffa8 moveml %fp@(-88),%d2-%d7/%a2-%a5 5e9e0: 4e5e unlk %fp 5e9e2: 4e75 rts
return rc;
}
rtems_rfs_block_map_set_size_offset (map, offset);
if (rtems_rfs_block_pos_past_end (rtems_rfs_file_bpos (handle),
5e9e4: b480 cmpl %d0,%d2 <== NOT EXECUTED 5e9e6: 6390 blss 5e978 <rtems_rfs_file_set_size+0x2a6> <== NOT EXECUTED 5e9e8: 2042 moveal %d2,%a0 <== NOT EXECUTED 5e9ea: 5388 subql #1,%a0 <== NOT EXECUTED 5e9ec: b1c0 cmpal %d0,%a0 <== NOT EXECUTED 5e9ee: 66a0 bnes 5e990 <rtems_rfs_file_set_size+0x2be> <== NOT EXECUTED 5e9f0: b2aa 0012 cmpl %a2@(18),%d1 <== NOT EXECUTED 5e9f4: 6582 bcss 5e978 <rtems_rfs_file_set_size+0x2a6> <== NOT EXECUTED
rtems_rfs_block_map_size (map)))
rtems_rfs_block_size_get_bpos (rtems_rfs_block_map_size (map),
5e9f6: 2a4c moveal %a4,%a5 <== NOT EXECUTED 5e9f8: 6098 bras 5e992 <rtems_rfs_file_set_size+0x2c0> <== NOT EXECUTED
5e9fa: 4280 clrl %d0 5e9fc: 102e ffd7 moveb %fp@(-41),%d0 5ea00: 7e01 moveq #1,%d7
*/
static inline void
rtems_rfs_block_map_set_size_offset (rtems_rfs_block_map* map,
rtems_rfs_block_off offset)
{
map->size.offset = offset;
5ea02: 42ab 003c clrl %a3@(60)
map->dirty = true;
5ea06: 1747 0032 moveb %d7,%a3@(50) 5ea0a: 6000 fe2a braw 5e836 <rtems_rfs_file_set_size+0x164>
{
int rc;
rc = rtems_rfs_block_map_shrink (rtems_rfs_file_fs (handle),
rtems_rfs_file_map (handle),
blocks);
if (rc > 0)
5ea0e: 242b 0038 movel %a3@(56),%d2 <== NOT EXECUTED 5ea12: 286a 001a moveal %a2@(26),%a4 <== NOT EXECUTED 5ea16: 6000 ff34 braw 5e94c <rtems_rfs_file_set_size+0x27a> <== NOT EXECUTED
0004ec98 <rtems_rfs_format>:
return rc;
}
int
rtems_rfs_format (const char* name, const rtems_rfs_format_config* config)
{
4ec98: 4e56 fefc linkw %fp,#-260 4ec9c: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4eca0: 246e 000c moveal %fp@(12),%a2
rtems_rfs_file_system fs;
int group;
int rc;
if (config->verbose)
4eca4: 4a2a 0015 tstb %a2@(21) 4eca8: 6600 01d8 bnew 4ee82 <rtems_rfs_format+0x1ea>
printf ("rtems-rfs: format: %s\n", name);
memset (&fs, 0, sizeof (rtems_rfs_file_system));
4ecac: 4878 0080 pea 80 <DBL_MANT_DIG+0x4b> 4ecb0: 240e movel %fp,%d2 4ecb2: 0682 ffff ff30 addil #-208,%d2 4ecb8: 42a7 clrl %sp@- 4ecba: 2f02 movel %d2,%sp@- 4ecbc: 4eb9 0006 2f48 jsr 62f48 <memset>
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
4ecc2: 2042 moveal %d2,%a0 4ecc4: 41e8 0044 lea %a0@(68),%a0
rtems_chain_initialize_empty (&fs.buffers);
rtems_chain_initialize_empty (&fs.release);
rtems_chain_initialize_empty (&fs.release_modified);
rtems_chain_initialize_empty (&fs.file_shares);
fs.max_held_buffers = RTEMS_RFS_FS_MAX_HELD_BUFFERS;
4ecc8: 7005 moveq #5,%d0 4ecca: 2d48 ff70 movel %a0,%fp@(-144)
head->previous = NULL; tail->previous = head;
4ecce: 5988 subql #4,%a0 4ecd0: 2d48 ff78 movel %a0,%fp@(-136)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
4ecd4: 41ee ff84 lea %fp@(-124),%a0 4ecd8: 2d48 ff80 movel %a0,%fp@(-128)
head->previous = NULL; tail->previous = head;
4ecdc: 41ee ff80 lea %fp@(-128),%a0 4ece0: 2d48 ff88 movel %a0,%fp@(-120)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
4ece4: 41ee ff94 lea %fp@(-108),%a0 4ece8: 2d48 ff90 movel %a0,%fp@(-112)
head->previous = NULL; tail->previous = head;
4ecec: 41ee ff90 lea %fp@(-112),%a0 4ecf0: 2d48 ff98 movel %a0,%fp@(-104)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
4ecf4: 41ee ffa4 lea %fp@(-92),%a0
fs.flags = RTEMS_RFS_FS_NO_LOCAL_CACHE;
/*
* Open the buffer interface.
*/
rc = rtems_rfs_buffer_open (name, &fs);
4ecf8: 2f02 movel %d2,%sp@- 4ecfa: 2f2e 0008 movel %fp@(8),%sp@-
rtems_chain_initialize_empty (&fs.buffers);
rtems_chain_initialize_empty (&fs.release);
rtems_chain_initialize_empty (&fs.release_modified);
rtems_chain_initialize_empty (&fs.file_shares);
fs.max_held_buffers = RTEMS_RFS_FS_MAX_HELD_BUFFERS;
4ecfe: 2d40 ff6c movel %d0,%fp@(-148)
fs.release_count = 0;
fs.release_modified_count = 0;
fs.flags = RTEMS_RFS_FS_NO_LOCAL_CACHE;
4ed02: 103c 0002 moveb #2,%d0 4ed06: 2d48 ffa0 movel %a0,%fp@(-96)
head->previous = NULL; tail->previous = head;
4ed0a: 41ee ffa0 lea %fp@(-96),%a0 4ed0e: 2d40 ff30 movel %d0,%fp@(-208) 4ed12: 2d48 ffa8 movel %a0,%fp@(-88)
/*
* Open the buffer interface.
*/
rc = rtems_rfs_buffer_open (name, &fs);
4ed16: 4eb9 0005 c00e jsr 5c00e <rtems_rfs_buffer_open>
if (rc > 0)
4ed1c: 4fef 0014 lea %sp@(20),%sp
fs.flags = RTEMS_RFS_FS_NO_LOCAL_CACHE;
/*
* Open the buffer interface.
*/
rc = rtems_rfs_buffer_open (name, &fs);
4ed20: 2600 movel %d0,%d3
if (rc > 0)
4ed22: 6e00 0c08 bgtw 4f92c <rtems_rfs_format+0xc94>
}
/*
* Check the media.
*/
if (rtems_rfs_fs_media_block_size (&fs) == 0)
4ed26: 206e ff3c moveal %fp@(-196),%a0 4ed2a: 2228 0024 movel %a0@(36),%d1 4ed2e: 6700 0c40 beqw 4f970 <rtems_rfs_format+0xcd8>
static bool
rtems_rfs_check_config (rtems_rfs_file_system* fs,
const rtems_rfs_format_config* config)
{
fs->block_size = config->block_size;
4ed32: 2012 movel %a2@,%d0 4ed34: 2d40 ff38 movel %d0,%fp@(-200)
if (!fs->block_size)
4ed38: 6700 015e beqw 4ee98 <rtems_rfs_format+0x200>
if (fs->block_size > (4 * 1024))
fs->block_size = (4 * 1024);
}
if ((fs->block_size % rtems_rfs_fs_media_block_size (fs)) != 0)
4ed3c: 2800 movel %d0,%d4 4ed3e: 4c41 4003 remul %d1,%d3,%d4 4ed42: 4a83 tstl %d3 4ed44: 6600 01c6 bnew 4ef0c <rtems_rfs_format+0x274>
printf ("block size (%zd) is not a multiple of media block size (%" PRId32 ")\n",
fs->block_size, rtems_rfs_fs_media_block_size (fs));
return false;
}
fs->group_blocks = config->group_blocks;
4ed48: 222a 0004 movel %a2@(4),%d1
{
/*
* The number of blocks per group is defined by the number of bits in a
* block.
*/
fs->group_blocks = rtems_rfs_bitmap_numof_bits (fs->block_size);
4ed4c: e788 lsll #3,%d0
printf ("block size (%zd) is not a multiple of media block size (%" PRId32 ")\n",
fs->block_size, rtems_rfs_fs_media_block_size (fs));
return false;
}
fs->group_blocks = config->group_blocks;
4ed4e: 2d41 ff54 movel %d1,%fp@(-172)
if (!fs->group_blocks)
4ed52: 671e beqs 4ed72 <rtems_rfs_format+0xda> <== ALWAYS TAKEN
* block.
*/
fs->group_blocks = rtems_rfs_bitmap_numof_bits (fs->block_size);
}
if (fs->group_blocks > rtems_rfs_bitmap_numof_bits (fs->block_size))
4ed54: b081 cmpl %d1,%d0 <== NOT EXECUTED 4ed56: 641e bccs 4ed76 <rtems_rfs_format+0xde> <== NOT EXECUTED
{
printf ("group block count is higher than bits in block\n");
4ed58: 4879 0007 24a2 pea 724a2 <ramdisk_ops+0xc4> <== NOT EXECUTED 4ed5e: 4eb9 0006 30ce jsr 630ce <puts> <== NOT EXECUTED 4ed64: 588f addql #4,%sp <== NOT EXECUTED
/*
* Check the configuration data.
*/
if (!rtems_rfs_check_config (&fs, config))
return -1;
4ed66: 70ff moveq #-1,%d0 <== NOT EXECUTED
rc, strerror (rc));
return -1;
}
return 0;
}
4ed68: 4cee 3cfc fefc moveml %fp@(-260),%d2-%d7/%a2-%a5 4ed6e: 4e5e unlk %fp 4ed70: 4e75 rts
{
/*
* The number of blocks per group is defined by the number of bits in a
* block.
*/
fs->group_blocks = rtems_rfs_bitmap_numof_bits (fs->block_size);
4ed72: 2d40 ff54 movel %d0,%fp@(-172)
{
printf ("group block count is higher than bits in block\n");
return false;
}
fs->blocks = rtems_rfs_fs_media_size (fs) / fs->block_size;
4ed76: 2f02 movel %d2,%sp@- 4ed78: 49f9 0005 ea80 lea 5ea80 <rtems_rfs_fs_media_size>,%a4 4ed7e: 4e94 jsr %a4@ 4ed80: 262e ff38 movel %fp@(-200),%d3
* Return the number of bits that fit in the block size.
*/
static int
rtems_rfs_bits_per_block (rtems_rfs_file_system* fs)
{
return rtems_rfs_bitmap_numof_bits (rtems_rfs_fs_block_size (fs));
4ed84: 2803 movel %d3,%d4
{
printf ("group block count is higher than bits in block\n");
return false;
}
fs->blocks = rtems_rfs_fs_media_size (fs) / fs->block_size;
4ed86: 2f03 movel %d3,%sp@-
* Return the number of bits that fit in the block size.
*/
static int
rtems_rfs_bits_per_block (rtems_rfs_file_system* fs)
{
return rtems_rfs_bitmap_numof_bits (rtems_rfs_fs_block_size (fs));
4ed88: e78c lsll #3,%d4
{
printf ("group block count is higher than bits in block\n");
return false;
}
fs->blocks = rtems_rfs_fs_media_size (fs) / fs->block_size;
4ed8a: 42a7 clrl %sp@- 4ed8c: 2f01 movel %d1,%sp@- 4ed8e: 2f00 movel %d0,%sp@- 4ed90: 4eb9 0006 f690 jsr 6f690 <__udivdi3>
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
4ed96: 4fef 0014 lea %sp@(20),%sp
{
printf ("group block count is higher than bits in block\n");
return false;
}
fs->blocks = rtems_rfs_fs_media_size (fs) / fs->block_size;
4ed9a: 2d41 ff34 movel %d1,%fp@(-204)
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
4ed9e: 6700 0488 beqw 4f228 <rtems_rfs_format+0x590>
return 1;
return ((dividend - 1) / divisor) + 1;
4eda2: 2001 movel %d1,%d0 4eda4: 5380 subql #1,%d0 4eda6: 4c44 0000 remul %d4,%d0,%d0 4edaa: 5280 addql #1,%d0
* per block.
*/
fs->group_count = rtems_rfs_rup_quotient (rtems_rfs_fs_blocks (fs),
rtems_rfs_bits_per_block (fs));
fs->group_inodes = config->group_inodes;
4edac: 2a2a 0008 movel %a2@(8),%d5
/* * The bits per block sets the upper limit for the number of blocks in a * group. The disk will be divided into groups which are the number of bits * per block. */ fs->group_count = rtems_rfs_rup_quotient (rtems_rfs_fs_blocks (fs),
4edb0: 2d40 ff50 movel %d0,%fp@(-176)
rtems_rfs_bits_per_block (fs));
fs->group_inodes = config->group_inodes;
if (!fs->group_inodes)
4edb4: 4a85 tstl %d5 4edb6: 6700 042e beqw 4f1e6 <rtems_rfs_format+0x54e>
4edba: 2003 movel %d3,%d0 <== NOT EXECUTED 4edbc: 7c38 moveq #56,%d6 <== NOT EXECUTED 4edbe: 4c46 0000 remul %d6,%d0,%d0 <== NOT EXECUTED
}
/*
* Round up to fill a block because the minimum allocation unit is a block.
*/
fs->inodes_per_block = rtems_rfs_fs_block_size (fs) / RTEMS_RFS_INODE_SIZE;
4edc2: 2d40 ff5c movel %d0,%fp@(-164) <== NOT EXECUTED
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
return 1;
return ((dividend - 1) / divisor) + 1;
4edc6: 5385 subql #1,%d5 4edc8: 4c40 5005 remul %d0,%d5,%d5 4edcc: 5285 addql #1,%d5
* Round up to fill a block because the minimum allocation unit is a block.
*/
fs->inodes_per_block = rtems_rfs_fs_block_size (fs) / RTEMS_RFS_INODE_SIZE;
fs->group_inodes =
rtems_rfs_rup_quotient (fs->group_inodes,
fs->inodes_per_block) * fs->inodes_per_block;
4edce: 4c05 0800 mulsl %d5,%d0
/*
* Round up to fill a block because the minimum allocation unit is a block.
*/
fs->inodes_per_block = rtems_rfs_fs_block_size (fs) / RTEMS_RFS_INODE_SIZE;
fs->group_inodes =
4edd2: 2d40 ff58 movel %d0,%fp@(-168)
rtems_rfs_rup_quotient (fs->group_inodes,
fs->inodes_per_block) * fs->inodes_per_block;
if (fs->group_inodes > rtems_rfs_bitmap_numof_bits (fs->block_size))
4edd6: b084 cmpl %d4,%d0
4edd8: 6304 blss 4edde <rtems_rfs_format+0x146> <== ALWAYS TAKEN
fs->group_inodes = rtems_rfs_bitmap_numof_bits (fs->block_size);
4edda: 2d44 ff58 movel %d4,%fp@(-168) <== NOT EXECUTED
fs->max_name_length = config->max_name_length;
4edde: 202a 0010 movel %a2@(16),%d0 4ede2: 2d40 ff48 movel %d0,%fp@(-184)
if (!fs->max_name_length)
4ede6: 660a bnes 4edf2 <rtems_rfs_format+0x15a> <== NEVER TAKEN
{
fs->max_name_length = 512;
4ede8: 2e3c 0000 0200 movel #512,%d7 4edee: 2d47 ff48 movel %d7,%fp@(-184)
* Check the configuration data.
*/
if (!rtems_rfs_check_config (&fs, config))
return -1;
if (config->verbose)
4edf2: 4a2a 0015 tstb %a2@(21) 4edf6: 6600 0134 bnew 4ef2c <rtems_rfs_format+0x294>
printf ("rtems-rfs: format: groups = %u\n", fs.group_count);
printf ("rtems-rfs: format: group blocks = %zu\n", fs.group_blocks);
printf ("rtems-rfs: format: group inodes = %zu\n", fs.group_inodes);
}
rc = rtems_rfs_buffer_setblksize (&fs, rtems_rfs_fs_block_size (&fs));
4edfa: 2f03 movel %d3,%sp@- 4edfc: 2f02 movel %d2,%sp@- 4edfe: 4eb9 0005 c2ca jsr 5c2ca <rtems_rfs_buffer_setblksize>
if (rc > 0)
4ee04: 508f addql #8,%sp
printf ("rtems-rfs: format: groups = %u\n", fs.group_count);
printf ("rtems-rfs: format: group blocks = %zu\n", fs.group_blocks);
printf ("rtems-rfs: format: group inodes = %zu\n", fs.group_inodes);
}
rc = rtems_rfs_buffer_setblksize (&fs, rtems_rfs_fs_block_size (&fs));
4ee06: 2600 movel %d0,%d3
if (rc > 0)
4ee08: 6e00 08b2 bgtw 4f6bc <rtems_rfs_format+0xa24>
printf ("rtems-rfs: write-superblock: handle open failed: %d: %s\n",
rc, strerror (rc));
return false;
}
rc = rtems_rfs_buffer_handle_request (fs, &handle, 0, false);
4ee0c: 42a7 clrl %sp@- 4ee0e: 49ee ffee lea %fp@(-18),%a4 4ee12: 42a7 clrl %sp@-
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
4ee14: 4207 clrb %d7 4ee16: 2f0c movel %a4,%sp@- 4ee18: 1d47 ffee moveb %d7,%fp@(-18) 4ee1c: 2f02 movel %d2,%sp@-
handle->bnum = 0;
4ee1e: 42ae fff0 clrl %fp@(-16)
handle->buffer = NULL;
4ee22: 42ae fff4 clrl %fp@(-12) 4ee26: 4eb9 0005 bd6e jsr 5bd6e <rtems_rfs_buffer_handle_request>
if (rc > 0)
4ee2c: 4fef 0010 lea %sp@(16),%sp
printf ("rtems-rfs: write-superblock: handle open failed: %d: %s\n",
rc, strerror (rc));
return false;
}
rc = rtems_rfs_buffer_handle_request (fs, &handle, 0, false);
4ee30: 2600 movel %d0,%d3
if (rc > 0)
4ee32: 6f00 024c blew 4f080 <rtems_rfs_format+0x3e8>
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
4ee36: 2f0c movel %a4,%sp@- <== NOT EXECUTED 4ee38: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4ee3a: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
4ee40: 1d47 ffee moveb %d7,%fp@(-18) <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("rtems-rfs: write-superblock: request failed: %d: %s\n",
4ee44: 2f03 movel %d3,%sp@- <== NOT EXECUTED
handle->bnum = 0;
4ee46: 42ae fff0 clrl %fp@(-16) <== NOT EXECUTED
handle->buffer = NULL;
4ee4a: 42ae fff4 clrl %fp@(-12) <== NOT EXECUTED 4ee4e: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED 4ee54: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4ee56: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4ee58: 4879 0007 26cb pea 726cb <ramdisk_ops+0x2ed> <== NOT EXECUTED 4ee5e: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 4ee64: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
return -1;
}
if (!rtems_rfs_write_superblock (&fs))
{
printf ("rtems-rfs: format: superblock write failed\n");
4ee68: 4879 0007 273c pea 7273c <ramdisk_ops+0x35e> <== NOT EXECUTED 4ee6e: 4eb9 0006 30ce jsr 630ce <puts> <== NOT EXECUTED
return -1;
4ee74: 588f addql #4,%sp <== NOT EXECUTED 4ee76: 70ff moveq #-1,%d0 <== NOT EXECUTED
rc, strerror (rc));
return -1;
}
return 0;
}
4ee78: 4cee 3cfc fefc moveml %fp@(-260),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4ee7e: 4e5e unlk %fp <== NOT EXECUTED 4ee80: 4e75 rts <== NOT EXECUTED
rtems_rfs_file_system fs;
int group;
int rc;
if (config->verbose)
printf ("rtems-rfs: format: %s\n", name);
4ee82: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 4ee86: 4879 0007 23f6 pea 723f6 <ramdisk_ops+0x18> <== NOT EXECUTED 4ee8c: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 4ee92: 508f addql #8,%sp <== NOT EXECUTED 4ee94: 6000 fe16 braw 4ecac <rtems_rfs_format+0x14> <== NOT EXECUTED
const rtems_rfs_format_config* config)
{
fs->block_size = config->block_size;
if (!fs->block_size)
{
uint64_t total_size = rtems_rfs_fs_media_size (fs);
4ee98: 2f02 movel %d2,%sp@- <== NOT EXECUTED
if (total_size >= GIGS (1))
4ee9a: 4283 clrl %d3 <== NOT EXECUTED 4ee9c: 283c 000f ffff movel #1048575,%d4 <== NOT EXECUTED
const rtems_rfs_format_config* config)
{
fs->block_size = config->block_size;
if (!fs->block_size)
{
uint64_t total_size = rtems_rfs_fs_media_size (fs);
4eea2: 4eb9 0005 ea80 jsr 5ea80 <rtems_rfs_fs_media_size> <== NOT EXECUTED
if (total_size >= GIGS (1))
4eea8: 588f addql #4,%sp <== NOT EXECUTED 4eeaa: 9881 subl %d1,%d4 <== NOT EXECUTED 4eeac: 9780 subxl %d0,%d3 <== NOT EXECUTED 4eeae: 6400 037e bccw 4f22e <rtems_rfs_format+0x596> <== NOT EXECUTED
{
uint32_t gigs = (total_size + GIGS (1)) / GIGS (1);
4eeb2: 7c0c moveq #12,%d6 <== NOT EXECUTED 4eeb4: 7e14 moveq #20,%d7 <== NOT EXECUTED
int b;
for (b = 31; b > 0; b--)
4eeb6: 761f moveq #31,%d3 <== NOT EXECUTED
if ((gigs & (1 << b)) != 0)
4eeb8: 7801 moveq #1,%d4 <== NOT EXECUTED
{
uint64_t total_size = rtems_rfs_fs_media_size (fs);
if (total_size >= GIGS (1))
{
uint32_t gigs = (total_size + GIGS (1)) / GIGS (1);
4eeba: 4285 clrl %d5 <== NOT EXECUTED 4eebc: 0681 0010 0000 addil #1048576,%d1 <== NOT EXECUTED 4eec2: d185 addxl %d5,%d0 <== NOT EXECUTED 4eec4: 2a00 movel %d0,%d5 <== NOT EXECUTED 4eec6: 2001 movel %d1,%d0 <== NOT EXECUTED 4eec8: eea8 lsrl %d7,%d0 <== NOT EXECUTED 4eeca: edad lsll %d6,%d5 <== NOT EXECUTED 4eecc: 8a80 orl %d0,%d5 <== NOT EXECUTED
int b;
for (b = 31; b > 0; b--)
if ((gigs & (1 << b)) != 0)
4eece: 2004 movel %d4,%d0 <== NOT EXECUTED 4eed0: e7a8 lsll %d3,%d0 <== NOT EXECUTED
if (total_size >= GIGS (1))
{
uint32_t gigs = (total_size + GIGS (1)) / GIGS (1);
int b;
for (b = 31; b > 0; b--)
4eed2: 5383 subql #1,%d3 <== NOT EXECUTED
if ((gigs & (1 << b)) != 0)
4eed4: 2200 movel %d0,%d1 <== NOT EXECUTED 4eed6: c285 andl %d5,%d1 <== NOT EXECUTED 4eed8: 6606 bnes 4eee0 <rtems_rfs_format+0x248> <== NOT EXECUTED
if (total_size >= GIGS (1))
{
uint32_t gigs = (total_size + GIGS (1)) / GIGS (1);
int b;
for (b = 31; b > 0; b--)
4eeda: 4a83 tstl %d3 <== NOT EXECUTED 4eedc: 66f0 bnes 4eece <rtems_rfs_format+0x236> <== NOT EXECUTED 4eede: 7001 moveq #1,%d0 <== NOT EXECUTED
if ((gigs & (1 << b)) != 0)
break;
fs->block_size = 1 << b;
4eee0: 2d40 ff38 movel %d0,%fp@(-200) <== NOT EXECUTED
}
if (fs->block_size < 512)
4eee4: 0c80 0000 01ff cmpil #511,%d0 <== NOT EXECUTED 4eeea: 6200 0350 bhiw 4f23c <rtems_rfs_format+0x5a4> <== NOT EXECUTED
fs->block_size = 512;
4eeee: 203c 0000 0200 movel #512,%d0 <== NOT EXECUTED
if (fs->block_size > (4 * 1024))
fs->block_size = (4 * 1024);
}
if ((fs->block_size % rtems_rfs_fs_media_block_size (fs)) != 0)
4eef4: 2800 movel %d0,%d4 <== NOT EXECUTED
break;
fs->block_size = 1 << b;
}
if (fs->block_size < 512)
fs->block_size = 512;
4eef6: 206e ff3c moveal %fp@(-196),%a0 <== NOT EXECUTED 4eefa: 2d40 ff38 movel %d0,%fp@(-200) <== NOT EXECUTED 4eefe: 2228 0024 movel %a0@(36),%d1 <== NOT EXECUTED
if (fs->block_size > (4 * 1024))
fs->block_size = (4 * 1024);
}
if ((fs->block_size % rtems_rfs_fs_media_block_size (fs)) != 0)
4ef02: 4c41 4003 remul %d1,%d3,%d4 <== NOT EXECUTED 4ef06: 4a83 tstl %d3 <== NOT EXECUTED 4ef08: 6700 fe3e beqw 4ed48 <rtems_rfs_format+0xb0> <== NOT EXECUTED
{
printf ("block size (%zd) is not a multiple of media block size (%" PRId32 ")\n",
4ef0c: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4ef0e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4ef10: 4879 0007 2464 pea 72464 <ramdisk_ops+0x86> <== NOT EXECUTED 4ef16: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 4ef1c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
/*
* Check the configuration data.
*/
if (!rtems_rfs_check_config (&fs, config))
return -1;
4ef20: 70ff moveq #-1,%d0 <== NOT EXECUTED
rc, strerror (rc));
return -1;
}
return 0;
}
4ef22: 4cee 3cfc fefc moveml %fp@(-260),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4ef28: 4e5e unlk %fp <== NOT EXECUTED 4ef2a: 4e75 rts <== NOT EXECUTED
if (!rtems_rfs_check_config (&fs, config))
return -1;
if (config->verbose)
{
printf ("rtems-rfs: format: media size = %" PRIu64 "\n",
4ef2c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4ef2e: 47f9 0006 2fd4 lea 62fd4 <printf>,%a3 <== NOT EXECUTED 4ef34: 4e94 jsr %a4@ <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
4ef36: 3a7c 07d0 moveaw #2000,%a5 <== NOT EXECUTED
if (!rtems_rfs_check_config (&fs, config))
return -1;
if (config->verbose)
{
printf ("rtems-rfs: format: media size = %" PRIu64 "\n",
4ef3a: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4ef3c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4ef3e: 4879 0007 24d1 pea 724d1 <ramdisk_ops+0xf3> <== NOT EXECUTED 4ef44: 4e93 jsr %a3@ <== NOT EXECUTED
rtems_rfs_fs_media_size (&fs));
printf ("rtems-rfs: format: media blocks = %" PRIu32 "\n",
rtems_rfs_fs_media_blocks (&fs));
4ef46: 206e ff3c moveal %fp@(-196),%a0 <== NOT EXECUTED
if (config->verbose)
{
printf ("rtems-rfs: format: media size = %" PRIu64 "\n",
rtems_rfs_fs_media_size (&fs));
printf ("rtems-rfs: format: media blocks = %" PRIu32 "\n",
4ef4a: 2f28 001c movel %a0@(28),%sp@- <== NOT EXECUTED 4ef4e: 4879 0007 24f7 pea 724f7 <ramdisk_ops+0x119> <== NOT EXECUTED 4ef54: 4e93 jsr %a3@ <== NOT EXECUTED
rtems_rfs_fs_media_blocks (&fs));
printf ("rtems-rfs: format: media block size = %" PRIu32 "\n",
rtems_rfs_fs_media_block_size (&fs));
4ef56: 206e ff3c moveal %fp@(-196),%a0 <== NOT EXECUTED
{
printf ("rtems-rfs: format: media size = %" PRIu64 "\n",
rtems_rfs_fs_media_size (&fs));
printf ("rtems-rfs: format: media blocks = %" PRIu32 "\n",
rtems_rfs_fs_media_blocks (&fs));
printf ("rtems-rfs: format: media block size = %" PRIu32 "\n",
4ef5a: 2f28 0024 movel %a0@(36),%sp@- <== NOT EXECUTED 4ef5e: 4879 0007 251e pea 7251e <ramdisk_ops+0x140> <== NOT EXECUTED 4ef64: 4e93 jsr %a3@ <== NOT EXECUTED
rtems_rfs_fs_media_block_size (&fs));
printf ("rtems-rfs: format: size = %" PRIu64 "\n",
4ef66: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED 4ef6a: 2e82 movel %d2,%sp@ <== NOT EXECUTED 4ef6c: 4eb9 0005 ea50 jsr 5ea50 <rtems_rfs_fs_size> <== NOT EXECUTED 4ef72: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4ef74: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4ef76: 4879 0007 2549 pea 72549 <ramdisk_ops+0x16b> <== NOT EXECUTED 4ef7c: 4e93 jsr %a3@ <== NOT EXECUTED
rtems_rfs_fs_size (&fs));
printf ("rtems-rfs: format: blocks = %zu\n",
4ef7e: 2f2e ff34 movel %fp@(-204),%sp@- <== NOT EXECUTED 4ef82: 4879 0007 2569 pea 72569 <ramdisk_ops+0x18b> <== NOT EXECUTED 4ef88: 4e93 jsr %a3@ <== NOT EXECUTED
rtems_rfs_fs_blocks (&fs));
printf ("rtems-rfs: format: block size = %zu\n",
4ef8a: 2f2e ff38 movel %fp@(-200),%sp@- <== NOT EXECUTED 4ef8e: 4879 0007 258a pea 7258a <ramdisk_ops+0x1ac> <== NOT EXECUTED 4ef94: 4e93 jsr %a3@ <== NOT EXECUTED
rtems_rfs_fs_block_size (&fs));
printf ("rtems-rfs: format: bits per block = %u\n",
4ef96: 4fef 0020 lea %sp@(32),%sp <== NOT EXECUTED
* Return the number of bits that fit in the block size.
*/
static int
rtems_rfs_bits_per_block (rtems_rfs_file_system* fs)
{
return rtems_rfs_bitmap_numof_bits (rtems_rfs_fs_block_size (fs));
4ef9a: 2042 moveal %d2,%a0 <== NOT EXECUTED 4ef9c: 2028 0008 movel %a0@(8),%d0 <== NOT EXECUTED 4efa0: e788 lsll #3,%d0 <== NOT EXECUTED
rtems_rfs_fs_size (&fs));
printf ("rtems-rfs: format: blocks = %zu\n",
rtems_rfs_fs_blocks (&fs));
printf ("rtems-rfs: format: block size = %zu\n",
rtems_rfs_fs_block_size (&fs));
printf ("rtems-rfs: format: bits per block = %u\n",
4efa2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4efa4: 4879 0007 25af pea 725af <ramdisk_ops+0x1d1> <== NOT EXECUTED 4efaa: 4e93 jsr %a3@ <== NOT EXECUTED
rtems_rfs_bits_per_block (&fs));
printf ("rtems-rfs: format: inode size = %zu\n", RTEMS_RFS_INODE_SIZE);
4efac: 4878 0038 pea 38 <DBL_MANT_DIG+0x3> <== NOT EXECUTED 4efb0: 4879 0007 25d7 pea 725d7 <ramdisk_ops+0x1f9> <== NOT EXECUTED 4efb6: 4e93 jsr %a3@ <== NOT EXECUTED
static int
rtems_rfs_inode_overhead (rtems_rfs_file_system* fs)
{
int blocks;
int bits_per_block;
blocks = rtems_rfs_rup_quotient(fs->group_inodes * RTEMS_RFS_INODE_SIZE,
4efb8: 2a2e ff58 movel %fp@(-168),%d5 <== NOT EXECUTED 4efbc: 2205 movel %d5,%d1 <== NOT EXECUTED 4efbe: 2005 movel %d5,%d0 <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
4efc0: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
static int
rtems_rfs_inode_overhead (rtems_rfs_file_system* fs)
{
int blocks;
int bits_per_block;
blocks = rtems_rfs_rup_quotient(fs->group_inodes * RTEMS_RFS_INODE_SIZE,
4efc4: e789 lsll #3,%d1 <== NOT EXECUTED 4efc6: ed88 lsll #6,%d0 <== NOT EXECUTED 4efc8: 262e ff38 movel %fp@(-200),%d3 <== NOT EXECUTED 4efcc: 9081 subl %d1,%d0 <== NOT EXECUTED 4efce: 2d43 ff26 movel %d3,%fp@(-218) <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
4efd2: 4a80 tstl %d0 <== NOT EXECUTED 4efd4: 6600 028c bnew 4f262 <rtems_rfs_format+0x5ca> <== NOT EXECUTED
* Return the number of bits that fit in the block size.
*/
static int
rtems_rfs_bits_per_block (rtems_rfs_file_system* fs)
{
return rtems_rfs_bitmap_numof_bits (rtems_rfs_fs_block_size (fs));
4efd8: 222e ff26 movel %fp@(-218),%d1 <== NOT EXECUTED 4efdc: e789 lsll #3,%d1 <== NOT EXECUTED
rtems_rfs_fs_block_size (fs));
bits_per_block = rtems_rfs_bits_per_block (fs);
/*
* There could be more bits than blocks, eg 512K disk with 512 blocks.
*/
if (bits_per_block > (rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE))
4efde: 206e ff34 moveal %fp@(-204),%a0 <== NOT EXECUTED 4efe2: 5388 subql #1,%a0 <== NOT EXECUTED
* Return the number of bits that fit in the block size.
*/
static int
rtems_rfs_bits_per_block (rtems_rfs_file_system* fs)
{
return rtems_rfs_bitmap_numof_bits (rtems_rfs_fs_block_size (fs));
4efe4: 2d41 ff2c movel %d1,%fp@(-212) <== NOT EXECUTED
rtems_rfs_fs_block_size (fs));
bits_per_block = rtems_rfs_bits_per_block (fs);
/*
* There could be more bits than blocks, eg 512K disk with 512 blocks.
*/
if (bits_per_block > (rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE))
4efe8: b1c1 cmpal %d1,%a0 <== NOT EXECUTED 4efea: 6400 0270 bccw 4f25c <rtems_rfs_format+0x5c4> <== NOT EXECUTED
bits_per_block = rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE;
4efee: 2248 moveal %a0,%a1 <== NOT EXECUTED
return ((blocks + 1) * 100 * 10) / bits_per_block;
4eff0: 2809 movel %a1,%d4 <== NOT EXECUTED 4eff2: 2e0d movel %a5,%d7 <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
4eff4: 263c 0000 07d0 movel #2000,%d3 <== NOT EXECUTED
/*
* There could be more bits than blocks, eg 512K disk with 512 blocks.
*/
if (bits_per_block > (rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE))
bits_per_block = rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE;
return ((blocks + 1) * 100 * 10) / bits_per_block;
4effa: 4c44 7807 remsl %d4,%d7,%d7 <== NOT EXECUTED
printf ("rtems-rfs: format: block size = %zu\n",
rtems_rfs_fs_block_size (&fs));
printf ("rtems-rfs: format: bits per block = %u\n",
rtems_rfs_bits_per_block (&fs));
printf ("rtems-rfs: format: inode size = %zu\n", RTEMS_RFS_INODE_SIZE);
printf ("rtems-rfs: format: inodes = %zu (%d.%d%%)\n",
4effe: 780a moveq #10,%d4 <== NOT EXECUTED 4f000: 4c44 7806 remsl %d4,%d6,%d7 <== NOT EXECUTED 4f004: 2246 moveal %d6,%a1 <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
4f006: 4a80 tstl %d0 <== NOT EXECUTED 4f008: 6718 beqs 4f022 <rtems_rfs_format+0x38a> <== NOT EXECUTED
return 1;
return ((dividend - 1) / divisor) + 1;
4f00a: 2e2e ff26 movel %fp@(-218),%d7 <== NOT EXECUTED 4f00e: 5380 subql #1,%d0 <== NOT EXECUTED 4f010: 4c47 0000 remul %d7,%d0,%d0 <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
4f014: 2600 movel %d0,%d3 <== NOT EXECUTED 4f016: 5483 addql #2,%d3 <== NOT EXECUTED 4f018: 203c 0000 03e8 movel #1000,%d0 <== NOT EXECUTED 4f01e: 4c00 3800 mulsl %d0,%d3 <== NOT EXECUTED
rtems_rfs_fs_block_size (fs));
bits_per_block = rtems_rfs_bits_per_block (fs);
/*
* There could be more bits than blocks, eg 512K disk with 512 blocks.
*/
if (bits_per_block > (rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE))
4f022: b1c1 cmpal %d1,%a0 <== NOT EXECUTED 4f024: 6404 bccs 4f02a <rtems_rfs_format+0x392> <== NOT EXECUTED
bits_per_block = rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE;
4f026: 2d48 ff2c movel %a0,%fp@(-212) <== NOT EXECUTED
return ((blocks + 1) * 100 * 10) / bits_per_block;
4f02a: 222e ff2c movel %fp@(-212),%d1 <== NOT EXECUTED
printf ("rtems-rfs: format: block size = %zu\n",
rtems_rfs_fs_block_size (&fs));
printf ("rtems-rfs: format: bits per block = %u\n",
rtems_rfs_bits_per_block (&fs));
printf ("rtems-rfs: format: inode size = %zu\n", RTEMS_RFS_INODE_SIZE);
printf ("rtems-rfs: format: inodes = %zu (%d.%d%%)\n",
4f02e: 780a moveq #10,%d4 <== NOT EXECUTED
/*
* There could be more bits than blocks, eg 512K disk with 512 blocks.
*/
if (bits_per_block > (rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE))
bits_per_block = rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE;
return ((blocks + 1) * 100 * 10) / bits_per_block;
4f030: 4c41 3803 remsl %d1,%d3,%d3 <== NOT EXECUTED
printf ("rtems-rfs: format: block size = %zu\n",
rtems_rfs_fs_block_size (&fs));
printf ("rtems-rfs: format: bits per block = %u\n",
rtems_rfs_bits_per_block (&fs));
printf ("rtems-rfs: format: inode size = %zu\n", RTEMS_RFS_INODE_SIZE);
printf ("rtems-rfs: format: inodes = %zu (%d.%d%%)\n",
4f034: 2f09 movel %a1,%sp@- <== NOT EXECUTED 4f036: 2c2e ff50 movel %fp@(-176),%d6 <== NOT EXECUTED 4f03a: 4c05 6800 mulsl %d5,%d6 <== NOT EXECUTED 4f03e: 4c44 3803 remsl %d4,%d3,%d3 <== NOT EXECUTED 4f042: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4f044: 2f06 movel %d6,%sp@- <== NOT EXECUTED 4f046: 4879 0007 25fc pea 725fc <ramdisk_ops+0x21e> <== NOT EXECUTED 4f04c: 4e93 jsr %a3@ <== NOT EXECUTED
fs.group_inodes * fs.group_count,
rtems_rfs_inode_overhead (&fs) / 10,
rtems_rfs_inode_overhead (&fs) % 10);
printf ("rtems-rfs: format: groups = %u\n", fs.group_count);
4f04e: 2f2e ff50 movel %fp@(-176),%sp@- <== NOT EXECUTED 4f052: 4879 0007 2627 pea 72627 <ramdisk_ops+0x249> <== NOT EXECUTED 4f058: 4e93 jsr %a3@ <== NOT EXECUTED
printf ("rtems-rfs: format: group blocks = %zu\n", fs.group_blocks);
4f05a: 2f2e ff54 movel %fp@(-172),%sp@- <== NOT EXECUTED 4f05e: 4879 0007 2647 pea 72647 <ramdisk_ops+0x269> <== NOT EXECUTED 4f064: 4e93 jsr %a3@ <== NOT EXECUTED
printf ("rtems-rfs: format: group inodes = %zu\n", fs.group_inodes);
4f066: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED 4f06a: 2eae ff58 movel %fp@(-168),%sp@ <== NOT EXECUTED 4f06e: 4879 0007 266e pea 7266e <ramdisk_ops+0x290> <== NOT EXECUTED 4f074: 4e93 jsr %a3@ <== NOT EXECUTED 4f076: 262e ff38 movel %fp@(-200),%d3 <== NOT EXECUTED 4f07a: 508f addql #8,%sp <== NOT EXECUTED 4f07c: 6000 fd7c braw 4edfa <rtems_rfs_format+0x162> <== NOT EXECUTED
printf ("rtems-rfs: write-superblock: request failed: %d: %s\n",
rc, strerror (rc));
return false;
}
sb = rtems_rfs_buffer_data (&handle);
4f080: 206e fff4 moveal %fp@(-12),%a0
memset (sb, 0xff, rtems_rfs_fs_block_size (fs));
write_sb (RTEMS_RFS_SB_OFFSET_MAGIC, RTEMS_RFS_SB_MAGIC);
write_sb (RTEMS_RFS_SB_OFFSET_VERSION, RTEMS_RFS_VERSION);
write_sb (RTEMS_RFS_SB_OFFSET_BLOCKS, rtems_rfs_fs_blocks (fs));
4f084: 7a18 moveq #24,%d5
printf ("rtems-rfs: write-superblock: request failed: %d: %s\n",
rc, strerror (rc));
return false;
}
sb = rtems_rfs_buffer_data (&handle);
4f086: 2668 001e moveal %a0@(30),%a3
#define write_sb(_o, _d) rtems_rfs_write_u32(sb + (_o), _d)
memset (sb, 0xff, rtems_rfs_fs_block_size (fs));
4f08a: 2f2e ff38 movel %fp@(-200),%sp@- 4f08e: 4878 00ff pea ff <DBL_MANT_DIG+0xca>
write_sb (RTEMS_RFS_SB_OFFSET_MAGIC, RTEMS_RFS_SB_MAGIC);
write_sb (RTEMS_RFS_SB_OFFSET_VERSION, RTEMS_RFS_VERSION);
4f092: 4204 clrb %d4
sb = rtems_rfs_buffer_data (&handle);
#define write_sb(_o, _d) rtems_rfs_write_u32(sb + (_o), _d)
memset (sb, 0xff, rtems_rfs_fs_block_size (fs));
4f094: 2f0b movel %a3,%sp@-
write_sb (RTEMS_RFS_SB_OFFSET_MAGIC, RTEMS_RFS_SB_MAGIC);
4f096: 7601 moveq #1,%d3
sb = rtems_rfs_buffer_data (&handle);
#define write_sb(_o, _d) rtems_rfs_write_u32(sb + (_o), _d)
memset (sb, 0xff, rtems_rfs_fs_block_size (fs));
4f098: 4eb9 0006 2f48 jsr 62f48 <memset>
write_sb (RTEMS_RFS_SB_OFFSET_MAGIC, RTEMS_RFS_SB_MAGIC);
4f09e: 7009 moveq #9,%d0 4f0a0: 7220 moveq #32,%d1 4f0a2: 1743 0003 moveb %d3,%a3@(3) 4f0a6: 16bc 0028 moveb #40,%a3@ 4f0aa: 1741 0002 moveb %d1,%a3@(2) 4f0ae: 1740 0001 moveb %d0,%a3@(1)
write_sb (RTEMS_RFS_SB_OFFSET_VERSION, RTEMS_RFS_VERSION);
4f0b2: 1744 0004 moveb %d4,%a3@(4) 4f0b6: 1744 0005 moveb %d4,%a3@(5) 4f0ba: 1744 0006 moveb %d4,%a3@(6) 4f0be: 1744 0007 moveb %d4,%a3@(7)
write_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS, fs->bad_blocks); write_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH, fs->max_name_length); write_sb (RTEMS_RFS_SB_OFFSET_GROUPS, fs->group_count); write_sb (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS, fs->group_blocks); write_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES, fs->group_inodes); write_sb (RTEMS_RFS_SB_OFFSET_INODE_SIZE, RTEMS_RFS_INODE_SIZE);
4f0c2: 7c38 moveq #56,%d6
memset (sb, 0xff, rtems_rfs_fs_block_size (fs));
write_sb (RTEMS_RFS_SB_OFFSET_MAGIC, RTEMS_RFS_SB_MAGIC);
write_sb (RTEMS_RFS_SB_OFFSET_VERSION, RTEMS_RFS_VERSION);
write_sb (RTEMS_RFS_SB_OFFSET_BLOCKS, rtems_rfs_fs_blocks (fs));
4f0c4: 202e ff34 movel %fp@(-204),%d0 4f0c8: 2200 movel %d0,%d1 4f0ca: eaa9 lsrl %d5,%d1 4f0cc: 2600 movel %d0,%d3 4f0ce: e08b lsrl #8,%d3 4f0d0: 1741 000c moveb %d1,%a3@(12) 4f0d4: 2200 movel %d0,%d1
write_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE, rtems_rfs_fs_block_size (fs));
4f0d6: 176e ff38 0008 moveb %fp@(-200),%a3@(8)
memset (sb, 0xff, rtems_rfs_fs_block_size (fs));
write_sb (RTEMS_RFS_SB_OFFSET_MAGIC, RTEMS_RFS_SB_MAGIC);
write_sb (RTEMS_RFS_SB_OFFSET_VERSION, RTEMS_RFS_VERSION);
write_sb (RTEMS_RFS_SB_OFFSET_BLOCKS, rtems_rfs_fs_blocks (fs));
4f0dc: 4241 clrw %d1 4f0de: 4841 swap %d1 4f0e0: 1743 000e moveb %d3,%a3@(14)
write_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE, rtems_rfs_fs_block_size (fs));
4f0e4: 176e ff39 0009 moveb %fp@(-199),%a3@(9)
memset (sb, 0xff, rtems_rfs_fs_block_size (fs));
write_sb (RTEMS_RFS_SB_OFFSET_MAGIC, RTEMS_RFS_SB_MAGIC);
write_sb (RTEMS_RFS_SB_OFFSET_VERSION, RTEMS_RFS_VERSION);
write_sb (RTEMS_RFS_SB_OFFSET_BLOCKS, rtems_rfs_fs_blocks (fs));
4f0ea: 1741 000d moveb %d1,%a3@(13) 4f0ee: 1740 000f moveb %d0,%a3@(15)
write_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE, rtems_rfs_fs_block_size (fs));
4f0f2: 176e ff3a 000a moveb %fp@(-198),%a3@(10)
write_sb (RTEMS_RFS_SB_OFFSET_GROUPS, fs->group_count);
write_sb (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS, fs->group_blocks);
write_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES, fs->group_inodes);
write_sb (RTEMS_RFS_SB_OFFSET_INODE_SIZE, RTEMS_RFS_INODE_SIZE);
rtems_rfs_buffer_mark_dirty (&handle);
4f0f8: 7e01 moveq #1,%d7
memset (sb, 0xff, rtems_rfs_fs_block_size (fs));
write_sb (RTEMS_RFS_SB_OFFSET_MAGIC, RTEMS_RFS_SB_MAGIC);
write_sb (RTEMS_RFS_SB_OFFSET_VERSION, RTEMS_RFS_VERSION);
write_sb (RTEMS_RFS_SB_OFFSET_BLOCKS, rtems_rfs_fs_blocks (fs));
write_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE, rtems_rfs_fs_block_size (fs));
4f0fa: 176e ff3b 000b moveb %fp@(-197),%a3@(11)
write_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS, fs->bad_blocks);
4f100: 176e ff44 0010 moveb %fp@(-188),%a3@(16) 4f106: 176e ff45 0011 moveb %fp@(-187),%a3@(17) 4f10c: 176e ff46 0012 moveb %fp@(-186),%a3@(18) 4f112: 176e ff47 0013 moveb %fp@(-185),%a3@(19)
write_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH, fs->max_name_length);
4f118: 176e ff48 0014 moveb %fp@(-184),%a3@(20) 4f11e: 176e ff49 0015 moveb %fp@(-183),%a3@(21) 4f124: 176e ff4a 0016 moveb %fp@(-182),%a3@(22) 4f12a: 176e ff4b 0017 moveb %fp@(-181),%a3@(23)
write_sb (RTEMS_RFS_SB_OFFSET_GROUPS, fs->group_count);
4f130: 176e ff50 0018 moveb %fp@(-176),%a3@(24) 4f136: 176e ff51 0019 moveb %fp@(-175),%a3@(25) 4f13c: 176e ff52 001a moveb %fp@(-174),%a3@(26) 4f142: 176e ff53 001b moveb %fp@(-173),%a3@(27)
write_sb (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS, fs->group_blocks);
4f148: 176e ff54 001c moveb %fp@(-172),%a3@(28) 4f14e: 176e ff55 001d moveb %fp@(-171),%a3@(29) 4f154: 176e ff56 001e moveb %fp@(-170),%a3@(30) 4f15a: 176e ff57 001f moveb %fp@(-169),%a3@(31)
write_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES, fs->group_inodes);
4f160: 176e ff58 0020 moveb %fp@(-168),%a3@(32) 4f166: 176e ff59 0021 moveb %fp@(-167),%a3@(33) 4f16c: 176e ff5a 0022 moveb %fp@(-166),%a3@(34) 4f172: 176e ff5b 0023 moveb %fp@(-165),%a3@(35)
write_sb (RTEMS_RFS_SB_OFFSET_INODE_SIZE, RTEMS_RFS_INODE_SIZE);
4f178: 1744 0024 moveb %d4,%a3@(36) 4f17c: 1744 0025 moveb %d4,%a3@(37) 4f180: 1744 0026 moveb %d4,%a3@(38) 4f184: 1746 0027 moveb %d6,%a3@(39)
rtems_rfs_buffer_mark_dirty (&handle);
4f188: 1d47 ffee moveb %d7,%fp@(-18)
rc = rtems_rfs_buffer_handle_release (fs, &handle);
4f18c: 2f0c movel %a4,%sp@- 4f18e: 2f02 movel %d2,%sp@- 4f190: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release>
if (rc > 0)
4f196: 4fef 0014 lea %sp@(20),%sp
write_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES, fs->group_inodes);
write_sb (RTEMS_RFS_SB_OFFSET_INODE_SIZE, RTEMS_RFS_INODE_SIZE);
rtems_rfs_buffer_mark_dirty (&handle);
rc = rtems_rfs_buffer_handle_release (fs, &handle);
4f19a: 2600 movel %d0,%d3
if (rc > 0)
4f19c: 6f00 010e blew 4f2ac <rtems_rfs_format+0x614>
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
4f1a0: 2f0c movel %a4,%sp@- <== NOT EXECUTED 4f1a2: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4f1a4: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
4f1aa: 1d44 ffee moveb %d4,%fp@(-18) <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("rtems-rfs: write-superblock: buffer release failed: %d: %s\n",
4f1ae: 2f03 movel %d3,%sp@- <== NOT EXECUTED
handle->bnum = 0;
4f1b0: 42ae fff0 clrl %fp@(-16) <== NOT EXECUTED
handle->buffer = NULL;
4f1b4: 42ae fff4 clrl %fp@(-12) <== NOT EXECUTED 4f1b8: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED 4f1be: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4f1c0: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4f1c2: 4879 0007 2700 pea 72700 <ramdisk_ops+0x322> <== NOT EXECUTED 4f1c8: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 4f1ce: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
return -1;
}
if (!rtems_rfs_write_superblock (&fs))
{
printf ("rtems-rfs: format: superblock write failed\n");
4f1d2: 4879 0007 273c pea 7273c <ramdisk_ops+0x35e> <== NOT EXECUTED 4f1d8: 4eb9 0006 30ce jsr 630ce <puts> <== NOT EXECUTED
return -1;
4f1de: 588f addql #4,%sp <== NOT EXECUTED 4f1e0: 70ff moveq #-1,%d0 <== NOT EXECUTED 4f1e2: 6000 fc94 braw 4ee78 <rtems_rfs_format+0x1e0> <== NOT EXECUTED
int inode_overhead = RTEMS_RFS_INODE_OVERHEAD_PERCENTAGE;
/*
* The number of inodes per group is set as a percentage.
*/
if (config->inode_overhead)
4f1e6: 206a 000c moveal %a2@(12),%a0 4f1ea: 4a88 tstl %a0 4f1ec: 6700 00a6 beqw 4f294 <rtems_rfs_format+0x5fc>
4f1f0: 2a08 movel %a0,%d5 <== NOT EXECUTED
static int
rtems_rfs_inodes_from_percent (rtems_rfs_file_system* fs,
int percentage)
{
int blocks;
blocks = ((rtems_rfs_fs_blocks (fs) -
4f1f2: 5381 subql #1,%d1 <== NOT EXECUTED
RTEMS_RFS_SUPERBLOCK_SIZE) * percentage) / 100;
4f1f4: 4c05 1800 mulsl %d5,%d1 <== NOT EXECUTED 4f1f8: 7e64 moveq #100,%d7 <== NOT EXECUTED 4f1fa: 4c47 1001 remul %d7,%d1,%d1 <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
4f1fe: 6700 00a6 beqw 4f2a6 <rtems_rfs_format+0x60e> <== NOT EXECUTED
return 1;
return ((dividend - 1) / divisor) + 1;
4f202: 5381 subql #1,%d1 4f204: 4c40 1001 remul %d0,%d1,%d1 4f208: 2a01 movel %d1,%d5 4f20a: 5285 addql #1,%d5
{
int blocks;
blocks = ((rtems_rfs_fs_blocks (fs) -
RTEMS_RFS_SUPERBLOCK_SIZE) * percentage) / 100;
blocks = rtems_rfs_rup_quotient (blocks, fs->group_count);
return blocks * (rtems_rfs_fs_block_size (fs) / RTEMS_RFS_INODE_SIZE);
4f20c: 2003 movel %d3,%d0 4f20e: 7c38 moveq #56,%d6 4f210: 4c46 0000 remul %d6,%d0,%d0 4f214: 4c00 5800 mulsl %d0,%d5
}
/*
* Round up to fill a block because the minimum allocation unit is a block.
*/
fs->inodes_per_block = rtems_rfs_fs_block_size (fs) / RTEMS_RFS_INODE_SIZE;
4f218: 2d40 ff5c movel %d0,%fp@(-164)
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
4f21c: 4a85 tstl %d5 4f21e: 6600 fba6 bnew 4edc6 <rtems_rfs_format+0x12e>
4f222: 7a01 moveq #1,%d5 <== NOT EXECUTED 4f224: 6000 fba8 braw 4edce <rtems_rfs_format+0x136> <== NOT EXECUTED
return 1;
4f228: 7001 moveq #1,%d0 <== NOT EXECUTED 4f22a: 6000 fb80 braw 4edac <rtems_rfs_format+0x114> <== NOT EXECUTED
fs->block_size = config->block_size;
if (!fs->block_size)
{
uint64_t total_size = rtems_rfs_fs_media_size (fs);
if (total_size >= GIGS (1))
4f22e: 202e ff38 movel %fp@(-200),%d0 <== NOT EXECUTED
if ((gigs & (1 << b)) != 0)
break;
fs->block_size = 1 << b;
}
if (fs->block_size < 512)
4f232: 0c80 0000 01ff cmpil #511,%d0 <== NOT EXECUTED 4f238: 6300 fcb4 blsw 4eeee <rtems_rfs_format+0x256> <== NOT EXECUTED
fs->block_size = 512;
if (fs->block_size > (4 * 1024))
4f23c: 0c80 0000 1000 cmpil #4096,%d0 <== NOT EXECUTED 4f242: 6300 0802 blsw 4fa46 <rtems_rfs_format+0xdae> <== NOT EXECUTED
fs->block_size = (4 * 1024);
4f246: 206e ff3c moveal %fp@(-196),%a0 <== NOT EXECUTED 4f24a: 203c 0000 1000 movel #4096,%d0 <== NOT EXECUTED 4f250: 2228 0024 movel %a0@(36),%d1 <== NOT EXECUTED 4f254: 2d40 ff38 movel %d0,%fp@(-200) <== NOT EXECUTED 4f258: 6000 fae2 braw 4ed3c <rtems_rfs_format+0xa4> <== NOT EXECUTED
{
int blocks;
int bits_per_block;
blocks = rtems_rfs_rup_quotient(fs->group_inodes * RTEMS_RFS_INODE_SIZE,
rtems_rfs_fs_block_size (fs));
bits_per_block = rtems_rfs_bits_per_block (fs);
4f25c: 2241 moveal %d1,%a1 <== NOT EXECUTED 4f25e: 6000 fd90 braw 4eff0 <rtems_rfs_format+0x358> <== NOT EXECUTED
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
return 1;
return ((dividend - 1) / divisor) + 1;
4f262: 2800 movel %d0,%d4 <== NOT EXECUTED 4f264: 5384 subql #1,%d4 <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
4f266: 2c3c 0000 03e8 movel #1000,%d6 <== NOT EXECUTED
return 1;
return ((dividend - 1) / divisor) + 1;
4f26c: 4c43 4004 remul %d3,%d4,%d4 <== NOT EXECUTED
* Return the number of bits that fit in the block size.
*/
static int
rtems_rfs_bits_per_block (rtems_rfs_file_system* fs)
{
return rtems_rfs_bitmap_numof_bits (rtems_rfs_fs_block_size (fs));
4f270: 222e ff26 movel %fp@(-218),%d1 <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
4f274: 2a44 moveal %d4,%a5 <== NOT EXECUTED 4f276: 548d addql #2,%a5 <== NOT EXECUTED 4f278: 280d movel %a5,%d4 <== NOT EXECUTED 4f27a: 4c06 4800 mulsl %d6,%d4 <== NOT EXECUTED
* Return the number of bits that fit in the block size.
*/
static int
rtems_rfs_bits_per_block (rtems_rfs_file_system* fs)
{
return rtems_rfs_bitmap_numof_bits (rtems_rfs_fs_block_size (fs));
4f27e: e789 lsll #3,%d1 <== NOT EXECUTED
rtems_rfs_fs_block_size (fs));
bits_per_block = rtems_rfs_bits_per_block (fs);
/*
* There could be more bits than blocks, eg 512K disk with 512 blocks.
*/
if (bits_per_block > (rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE))
4f280: 206e ff34 moveal %fp@(-204),%a0 <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
4f284: 2a44 moveal %d4,%a5 <== NOT EXECUTED
rtems_rfs_fs_block_size (fs));
bits_per_block = rtems_rfs_bits_per_block (fs);
/*
* There could be more bits than blocks, eg 512K disk with 512 blocks.
*/
if (bits_per_block > (rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE))
4f286: 5388 subql #1,%a0 <== NOT EXECUTED
* Return the number of bits that fit in the block size.
*/
static int
rtems_rfs_bits_per_block (rtems_rfs_file_system* fs)
{
return rtems_rfs_bitmap_numof_bits (rtems_rfs_fs_block_size (fs));
4f288: 2d41 ff2c movel %d1,%fp@(-212) <== NOT EXECUTED
rtems_rfs_fs_block_size (fs));
bits_per_block = rtems_rfs_bits_per_block (fs);
/*
* There could be more bits than blocks, eg 512K disk with 512 blocks.
*/
if (bits_per_block > (rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE))
4f28c: b1c1 cmpal %d1,%a0 <== NOT EXECUTED 4f28e: 64cc bccs 4f25c <rtems_rfs_format+0x5c4> <== NOT EXECUTED 4f290: 6000 fd5c braw 4efee <rtems_rfs_format+0x356> <== NOT EXECUTED
int inode_overhead = RTEMS_RFS_INODE_OVERHEAD_PERCENTAGE;
/*
* The number of inodes per group is set as a percentage.
*/
if (config->inode_overhead)
4f294: 7a01 moveq #1,%d5
static int
rtems_rfs_inodes_from_percent (rtems_rfs_file_system* fs,
int percentage)
{
int blocks;
blocks = ((rtems_rfs_fs_blocks (fs) -
4f296: 5381 subql #1,%d1
RTEMS_RFS_SUPERBLOCK_SIZE) * percentage) / 100;
4f298: 4c05 1800 mulsl %d5,%d1 4f29c: 7e64 moveq #100,%d7 4f29e: 4c47 1001 remul %d7,%d1,%d1
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
4f2a2: 6600 ff5e bnew 4f202 <rtems_rfs_format+0x56a>
4f2a6: 7a01 moveq #1,%d5 <== NOT EXECUTED 4f2a8: 6000 ff62 braw 4f20c <rtems_rfs_format+0x574> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
4f2ac: 2f0c movel %a4,%sp@- 4f2ae: 2f02 movel %d2,%sp@- 4f2b0: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release>
{
printf ("rtems-rfs: format: superblock write failed\n");
return -1;
}
for (group = 0; group < fs.group_count; group++)
4f2b6: 508f addql #8,%sp
handle->dirty = false;
4f2b8: 4200 clrb %d0
handle->bnum = 0;
4f2ba: 42ae fff0 clrl %fp@(-16)
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
handle->dirty = false;
4f2be: 1d40 ffee moveb %d0,%fp@(-18)
handle->bnum = 0; handle->buffer = NULL;
4f2c2: 42ae fff4 clrl %fp@(-12) 4f2c6: 4aae ff50 tstl %fp@(-176) 4f2ca: 6f00 02dc blew 4f5a8 <rtems_rfs_format+0x910>
size_t group_size;
int blocks;
int b;
int rc;
group_base = rtems_rfs_fs_block (fs, group, 0);
4f2ce: 262e ff54 movel %fp@(-172),%d3
return -1;
}
for (group = 0; group < fs.group_count; group++)
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
4f2d2: 1a2a 0014 moveb %a2@(20),%d5 4f2d6: 182a 0015 moveb %a2@(21),%d4
int b;
int rc;
group_base = rtems_rfs_fs_block (fs, group, 0);
if (group_base > rtems_rfs_fs_blocks (fs))
4f2da: 202e ff34 movel %fp@(-204),%d0
return -1;
}
for (group = 0; group < fs.group_count; group++)
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
4f2de: 1d45 ff2b moveb %d5,%fp@(-213) 4f2e2: 3a44 moveaw %d4,%a5
int b;
int rc;
group_base = rtems_rfs_fs_block (fs, group, 0);
if (group_base > rtems_rfs_fs_blocks (fs))
4f2e4: 4a80 tstl %d0 4f2e6: 6700 069e beqw 4f986 <rtems_rfs_format+0xcee> 4f2ea: 4286 clrl %d6 4f2ec: 2a0e movel %fp,%d5 4f2ee: 7801 moveq #1,%d4 4f2f0: 4287 clrl %d7 4f2f2: 0685 ffff ffd6 addil #-42,%d5 4f2f8: 2d46 ff2c movel %d6,%fp@(-212) 4f2fc: 3c0d movew %a5,%d6 4f2fe: 1d46 ff26 moveb %d6,%fp@(-218)
/* * Be nice to strange sizes of disks. These are embedded systems after all * and nice numbers do not always work out. Let the last block pick up the * remainder of the blocks. */ if ((group_base + group_size) > rtems_rfs_fs_blocks (fs))
4f302: 2203 movel %d3,%d1 4f304: d284 addl %d4,%d1 4f306: b280 cmpl %d0,%d1
4f308: 6304 blss 4f30e <rtems_rfs_format+0x676> <== NEVER TAKEN
group_size = rtems_rfs_fs_blocks (fs) - group_base;
4f30a: 2600 movel %d0,%d3 4f30c: 9684 subl %d4,%d3
if (verbose)
4f30e: 4a2e ff26 tstb %fp@(-218) 4f312: 6600 00e2 bnew 4f3f6 <rtems_rfs_format+0x75e>
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
handle->bnum = 0;
4f316: 42ae fff0 clrl %fp@(-16)
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
4f31a: 4201 clrb %d1
handle->bnum = 0; handle->buffer = NULL;
4f31c: 42ae fff4 clrl %fp@(-12)
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
4f320: 1d41 ffee moveb %d1,%fp@(-18)
printf (", blocks");
/*
* Open the block bitmap using the new buffer.
*/
rc = rtems_rfs_bitmap_open (&bitmap, fs, &handle, group_size,
4f324: 2f04 movel %d4,%sp@- 4f326: 2f03 movel %d3,%sp@- 4f328: 2f0c movel %a4,%sp@- 4f32a: 2f02 movel %d2,%sp@- 4f32c: 2f05 movel %d5,%sp@- 4f32e: 4eb9 0005 a8fe jsr 5a8fe <rtems_rfs_bitmap_open>
group_base + RTEMS_RFS_GROUP_BLOCK_BITMAP_BLOCK);
if (rc > 0)
4f334: 4fef 0014 lea %sp@(20),%sp 4f338: 4a80 tstl %d0
4f33a: 6f48 bles 4f384 <rtems_rfs_format+0x6ec> <== ALWAYS TAKEN
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
4f33c: 2f0c movel %a4,%sp@- <== NOT EXECUTED 4f33e: 2c2e ff2c movel %fp@(-212),%d6 <== NOT EXECUTED 4f342: 2640 moveal %d0,%a3 <== NOT EXECUTED 4f344: 2f02 movel %d2,%sp@- <== NOT EXECUTED
handle->dirty = false;
4f346: 4203 clrb %d3 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
4f348: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
4f34e: 1d43 ffee moveb %d3,%fp@(-18) <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("\nrtems-rfs: write-group: group %3d: open block bitmap failed: %d: %s\n",
4f352: 2f0b movel %a3,%sp@- <== NOT EXECUTED
handle->bnum = 0;
4f354: 42ae fff0 clrl %fp@(-16) <== NOT EXECUTED
handle->buffer = NULL;
4f358: 42ae fff4 clrl %fp@(-12) <== NOT EXECUTED 4f35c: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED 4f362: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4f364: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4f366: 2f06 movel %d6,%sp@- <== NOT EXECUTED 4f368: 4879 0007 27df pea 727df <ramdisk_ops+0x401> <== NOT EXECUTED 4f36e: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 4f374: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED
}
for (group = 0; group < fs.group_count; group++)
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
return -1;
4f378: 70ff moveq #-1,%d0 <== NOT EXECUTED
rc, strerror (rc));
return -1;
}
return 0;
}
4f37a: 4cee 3cfc fefc moveml %fp@(-260),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4f380: 4e5e unlk %fp <== NOT EXECUTED 4f382: 4e75 rts <== NOT EXECUTED
/*
* Force the whole buffer to a known state. The bit map may not occupy the
* whole block.
*/
memset (rtems_rfs_buffer_data (&handle), 0xff, rtems_rfs_fs_block_size (fs));
4f384: 2f2e ff38 movel %fp@(-200),%sp@- 4f388: 206e fff4 moveal %fp@(-12),%a0 4f38c: 4878 00ff pea ff <DBL_MANT_DIG+0xca> 4f390: 2f28 001e movel %a0@(30),%sp@- 4f394: 4eb9 0006 2f48 jsr 62f48 <memset>
/*
* Clear the bitmap.
*/
rc = rtems_rfs_bitmap_map_clear_all (&bitmap);
4f39a: 2f05 movel %d5,%sp@- 4f39c: 4eb9 0005 a720 jsr 5a720 <rtems_rfs_bitmap_map_clear_all>
if (rc > 0)
4f3a2: 4fef 0010 lea %sp@(16),%sp 4f3a6: 4a80 tstl %d0 4f3a8: 6f00 0082 blew 4f42c <rtems_rfs_format+0x794>
{
rtems_rfs_bitmap_close (&bitmap);
4f3ac: 2f05 movel %d5,%sp@- <== NOT EXECUTED 4f3ae: 2c2e ff2c movel %fp@(-212),%d6 <== NOT EXECUTED 4f3b2: 2640 moveal %d0,%a3 <== NOT EXECUTED 4f3b4: 4eb9 0005 a962 jsr 5a962 <rtems_rfs_bitmap_close> <== NOT EXECUTED
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
handle->dirty = false;
4f3ba: 4204 clrb %d4 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
4f3bc: 2f0c movel %a4,%sp@- <== NOT EXECUTED 4f3be: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4f3c0: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
4f3c6: 1d44 ffee moveb %d4,%fp@(-18) <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("\nrtems-rfs: write-group: group %3d: block bitmap clear all failed: %d: %s\n",
4f3ca: 2f0b movel %a3,%sp@- <== NOT EXECUTED
handle->bnum = 0;
4f3cc: 42ae fff0 clrl %fp@(-16) <== NOT EXECUTED
handle->buffer = NULL;
4f3d0: 42ae fff4 clrl %fp@(-12) <== NOT EXECUTED 4f3d4: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED 4f3da: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4f3dc: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4f3de: 2f06 movel %d6,%sp@- <== NOT EXECUTED 4f3e0: 4879 0007 2825 pea 72825 <ramdisk_ops+0x447> <== NOT EXECUTED 4f3e6: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 4f3ec: 4fef 0020 lea %sp@(32),%sp <== NOT EXECUTED
}
for (group = 0; group < fs.group_count; group++)
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
return -1;
4f3f0: 70ff moveq #-1,%d0 <== NOT EXECUTED 4f3f2: 6000 f974 braw 4ed68 <rtems_rfs_format+0xd0> <== NOT EXECUTED
*/
if ((group_base + group_size) > rtems_rfs_fs_blocks (fs))
group_size = rtems_rfs_fs_blocks (fs) - group_base;
if (verbose)
printf ("\rrtems-rfs: format: group %3d: base = %" PRId32 ", size = %zd",
4f3f6: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4f3f8: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4f3fa: 2f2e ff2c movel %fp@(-212),%sp@- <== NOT EXECUTED 4f3fe: 4879 0007 27a0 pea 727a0 <ramdisk_ops+0x3c2> <== NOT EXECUTED 4f404: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED
rc, strerror (rc));
return false;
}
if (verbose)
printf (", blocks");
4f40a: 4879 0007 27d6 pea 727d6 <ramdisk_ops+0x3f8> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
4f410: 4200 clrb %d0 <== NOT EXECUTED
handle->bnum = 0;
4f412: 42ae fff0 clrl %fp@(-16) <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
4f416: 1d40 ffee moveb %d0,%fp@(-18) <== NOT EXECUTED
handle->bnum = 0; handle->buffer = NULL;
4f41a: 42ae fff4 clrl %fp@(-12) <== NOT EXECUTED 4f41e: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 4f424: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4f428: 6000 fefa braw 4f324 <rtems_rfs_format+0x68c> <== NOT EXECUTED
}
/*
* Forced allocation of the block bitmap.
*/
rtems_rfs_bitmap_map_set (&bitmap, RTEMS_RFS_GROUP_BLOCK_BITMAP_BLOCK);
4f42c: 42a7 clrl %sp@- 4f42e: 2f05 movel %d5,%sp@- 4f430: 4eb9 0005 a52c jsr 5a52c <rtems_rfs_bitmap_map_set>
/*
* Forced allocation of the inode bitmap.
*/
rtems_rfs_bitmap_map_set (&bitmap, RTEMS_RFS_GROUP_INODE_BITMAP_BLOCK);
4f436: 4878 0001 pea 1 <ADD> 4f43a: 2f05 movel %d5,%sp@- 4f43c: 4eb9 0005 a52c jsr 5a52c <rtems_rfs_bitmap_map_set>
/*
* Determine the number of inodes blocks in the group.
*/
blocks = rtems_rfs_rup_quotient (fs->group_inodes, fs->inodes_per_block);
4f442: 226e ff5c moveal %fp@(-164),%a1
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
4f446: 4fef 0010 lea %sp@(16),%sp
rtems_rfs_bitmap_map_set (&bitmap, RTEMS_RFS_GROUP_INODE_BITMAP_BLOCK);
/*
* Determine the number of inodes blocks in the group.
*/
blocks = rtems_rfs_rup_quotient (fs->group_inodes, fs->inodes_per_block);
4f44a: 202e ff58 movel %fp@(-168),%d0
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
4f44e: 6600 0138 bnew 4f588 <rtems_rfs_format+0x8f0>
return 1;
4f452: 3a7c 0001 moveaw #1,%a5 <== NOT EXECUTED 4f456: 97cb subal %a3,%a3 <== NOT EXECUTED 4f458: 1c2e ff26 moveb %fp@(-218),%d6 <== NOT EXECUTED
/*
* Forced allocation of the inode blocks which follow the block bitmap.
*/
for (b = 0; b < blocks; b++)
rtems_rfs_bitmap_map_set (&bitmap, b + RTEMS_RFS_GROUP_INODE_BLOCK);
4f45c: 486b 0002 pea %a3@(2)
blocks = rtems_rfs_rup_quotient (fs->group_inodes, fs->inodes_per_block);
/*
* Forced allocation of the inode blocks which follow the block bitmap.
*/
for (b = 0; b < blocks; b++)
4f460: 528b addql #1,%a3
rtems_rfs_bitmap_map_set (&bitmap, b + RTEMS_RFS_GROUP_INODE_BLOCK);
4f462: 2f05 movel %d5,%sp@- 4f464: 4eb9 0005 a52c jsr 5a52c <rtems_rfs_bitmap_map_set>
blocks = rtems_rfs_rup_quotient (fs->group_inodes, fs->inodes_per_block);
/*
* Forced allocation of the inode blocks which follow the block bitmap.
*/
for (b = 0; b < blocks; b++)
4f46a: 508f addql #8,%sp 4f46c: b7cd cmpal %a5,%a3
4f46e: 6dec blts 4f45c <rtems_rfs_format+0x7c4>
4f470: 1d46 ff26 moveb %d6,%fp@(-218)
rtems_rfs_bitmap_map_set (&bitmap, b + RTEMS_RFS_GROUP_INODE_BLOCK);
/*
* Close the block bitmap.
*/
rc = rtems_rfs_bitmap_close (&bitmap);
4f474: 2f05 movel %d5,%sp@- 4f476: 4eb9 0005 a962 jsr 5a962 <rtems_rfs_bitmap_close>
if (rc > 0)
4f47c: 588f addql #4,%sp 4f47e: 4a80 tstl %d0 4f480: 6e00 01b4 bgtw 4f636 <rtems_rfs_format+0x99e>
printf ("\nrtems-rfs: write-group: group %3d: close block bitmap failed: %d: %s\n",
group, rc, strerror (rc));
return false;
}
rtems_rfs_buffer_mark_dirty (&handle);
4f484: 7c01 moveq #1,%d6 4f486: 1d46 ffee moveb %d6,%fp@(-18)
if (verbose)
4f48a: 4a2e ff26 tstb %fp@(-218)
4f48e: 665e bnes 4f4ee <rtems_rfs_format+0x856> <== NEVER TAKEN
printf (", inodes");
/*
* Open the inode bitmap using the old buffer. Should release any changes.
*/
rc = rtems_rfs_bitmap_open (&bitmap, fs, &handle, group_size,
4f490: 2047 moveal %d7,%a0 4f492: 4868 0002 pea %a0@(2) 4f496: 2f03 movel %d3,%sp@- 4f498: 2f0c movel %a4,%sp@- 4f49a: 2f02 movel %d2,%sp@- 4f49c: 2f05 movel %d5,%sp@- 4f49e: 4eb9 0005 a8fe jsr 5a8fe <rtems_rfs_bitmap_open>
group_base + RTEMS_RFS_GROUP_INODE_BITMAP_BLOCK);
if (rc > 0)
4f4a4: 4fef 0014 lea %sp@(20),%sp 4f4a8: 4a80 tstl %d0
4f4aa: 6f6c bles 4f518 <rtems_rfs_format+0x880> <== ALWAYS TAKEN
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
4f4ac: 2f0c movel %a4,%sp@- <== NOT EXECUTED 4f4ae: 2c2e ff2c movel %fp@(-212),%d6 <== NOT EXECUTED 4f4b2: 2600 movel %d0,%d3 <== NOT EXECUTED 4f4b4: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4f4b6: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
4f4bc: 4200 clrb %d0 <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("\nrtems-rfs: write-group: group %3d: open inode bitmap failed: %d: %s\n",
4f4be: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4f4c0: 1d40 ffee moveb %d0,%fp@(-18) <== NOT EXECUTED
handle->bnum = 0;
4f4c4: 42ae fff0 clrl %fp@(-16) <== NOT EXECUTED
handle->buffer = NULL;
4f4c8: 42ae fff4 clrl %fp@(-12) <== NOT EXECUTED 4f4cc: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED 4f4d2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4f4d4: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4f4d6: 2f06 movel %d6,%sp@- <== NOT EXECUTED 4f4d8: 4879 0007 28c0 pea 728c0 <ramdisk_ops+0x4e2> <== NOT EXECUTED 4f4de: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 4f4e4: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED
}
for (group = 0; group < fs.group_count; group++)
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
return -1;
4f4e8: 70ff moveq #-1,%d0 <== NOT EXECUTED 4f4ea: 6000 f87c braw 4ed68 <rtems_rfs_format+0xd0> <== NOT EXECUTED
}
rtems_rfs_buffer_mark_dirty (&handle);
if (verbose)
printf (", inodes");
4f4ee: 4879 0007 28b7 pea 728b7 <ramdisk_ops+0x4d9> <== NOT EXECUTED 4f4f4: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 4f4fa: 588f addql #4,%sp <== NOT EXECUTED
/*
* Open the inode bitmap using the old buffer. Should release any changes.
*/
rc = rtems_rfs_bitmap_open (&bitmap, fs, &handle, group_size,
4f4fc: 2047 moveal %d7,%a0 <== NOT EXECUTED 4f4fe: 4868 0002 pea %a0@(2) <== NOT EXECUTED 4f502: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4f504: 2f0c movel %a4,%sp@- <== NOT EXECUTED 4f506: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4f508: 2f05 movel %d5,%sp@- <== NOT EXECUTED 4f50a: 4eb9 0005 a8fe jsr 5a8fe <rtems_rfs_bitmap_open> <== NOT EXECUTED
group_base + RTEMS_RFS_GROUP_INODE_BITMAP_BLOCK);
if (rc > 0)
4f510: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4f514: 4a80 tstl %d0 <== NOT EXECUTED 4f516: 6e94 bgts 4f4ac <rtems_rfs_format+0x814> <== NOT EXECUTED
/*
* Force the whole buffer to a known state. The bit map may not occupy the
* whole block.
*/
memset (rtems_rfs_buffer_data (&handle), 0x00, rtems_rfs_fs_block_size (fs));
4f518: 2f2e ff38 movel %fp@(-200),%sp@- 4f51c: 206e fff4 moveal %fp@(-12),%a0 4f520: 42a7 clrl %sp@- 4f522: 2f28 001e movel %a0@(30),%sp@- 4f526: 4eb9 0006 2f48 jsr 62f48 <memset>
/*
* Clear the inode bitmap.
*/
rc = rtems_rfs_bitmap_map_clear_all (&bitmap);
4f52c: 2f05 movel %d5,%sp@- 4f52e: 4eb9 0005 a720 jsr 5a720 <rtems_rfs_bitmap_map_clear_all>
if (rc > 0)
4f534: 4fef 0010 lea %sp@(16),%sp 4f538: 4a80 tstl %d0 4f53a: 6f00 021e blew 4f75a <rtems_rfs_format+0xac2>
{
rtems_rfs_bitmap_close (&bitmap);
4f53e: 2f05 movel %d5,%sp@- <== NOT EXECUTED 4f540: 2c2e ff2c movel %fp@(-212),%d6 <== NOT EXECUTED 4f544: 2600 movel %d0,%d3 <== NOT EXECUTED 4f546: 4eb9 0005 a962 jsr 5a962 <rtems_rfs_bitmap_close> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
4f54c: 2f0c movel %a4,%sp@- <== NOT EXECUTED 4f54e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4f550: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
4f556: 4201 clrb %d1 <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("\nrtems-rfs: write-group: group %3d: inode bitmap" \
4f558: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4f55a: 1d41 ffee moveb %d1,%fp@(-18) <== NOT EXECUTED
handle->bnum = 0;
4f55e: 42ae fff0 clrl %fp@(-16) <== NOT EXECUTED
handle->buffer = NULL;
4f562: 42ae fff4 clrl %fp@(-12) <== NOT EXECUTED 4f566: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED 4f56c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4f56e: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4f570: 2f06 movel %d6,%sp@- <== NOT EXECUTED 4f572: 4879 0007 2906 pea 72906 <ramdisk_ops+0x528> <== NOT EXECUTED 4f578: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 4f57e: 4fef 0020 lea %sp@(32),%sp <== NOT EXECUTED
}
for (group = 0; group < fs.group_count; group++)
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
return -1;
4f582: 70ff moveq #-1,%d0 <== NOT EXECUTED 4f584: 6000 f7e2 braw 4ed68 <rtems_rfs_format+0xd0> <== NOT EXECUTED
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
return 1;
return ((dividend - 1) / divisor) + 1;
4f588: 2a40 moveal %d0,%a5 4f58a: 538d subql #1,%a5 4f58c: 2c0d movel %a5,%d6 4f58e: 2009 movel %a1,%d0 4f590: 4c40 6006 remul %d0,%d6,%d6 4f594: 2a46 moveal %d6,%a5 4f596: 528d addql #1,%a5
blocks = rtems_rfs_rup_quotient (fs->group_inodes, fs->inodes_per_block);
/*
* Forced allocation of the inode blocks which follow the block bitmap.
*/
for (b = 0; b < blocks; b++)
4f598: 4a8d tstl %a5 4f59a: 6f00 fed8 blew 4f474 <rtems_rfs_format+0x7dc>
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
return 1;
4f59e: 97cb subal %a3,%a3 4f5a0: 1c2e ff26 moveb %fp@(-218),%d6 4f5a4: 6000 feb6 braw 4f45c <rtems_rfs_format+0x7c4>
for (group = 0; group < fs.group_count; group++)
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
return -1;
if (config->verbose)
4f5a8: 4a2a 0015 tstb %a2@(21)
4f5ac: 6678 bnes 4f626 <rtems_rfs_format+0x98e> <== NEVER TAKEN
printf ("\n");
rc = rtems_rfs_buffer_close (&fs);
4f5ae: 2f02 movel %d2,%sp@- 4f5b0: 4eb9 0005 c3d0 jsr 5c3d0 <rtems_rfs_buffer_close>
if (rc > 0)
4f5b6: 588f addql #4,%sp
return -1;
if (config->verbose)
printf ("\n");
rc = rtems_rfs_buffer_close (&fs);
4f5b8: 2400 movel %d0,%d2
if (rc > 0)
4f5ba: 6e00 0392 bgtw 4f94e <rtems_rfs_format+0xcb6>
int rc;
/*
* External API so returns -1.
*/
rc = rtems_rfs_fs_open (name, NULL, RTEMS_RFS_FS_FORCE_OPEN, &fs);
4f5be: 486e fff8 pea %fp@(-8) 4f5c2: 4878 0004 pea 4 <CONTEXT_ARG> 4f5c6: 42a7 clrl %sp@- 4f5c8: 2f2e 0008 movel %fp@(8),%sp@- 4f5cc: 4eb9 0005 eab4 jsr 5eab4 <rtems_rfs_fs_open>
if (rc < 0)
4f5d2: 4fef 0010 lea %sp@(16),%sp 4f5d6: 4a80 tstl %d0 4f5d8: 6d00 0408 bltw 4f9e2 <rtems_rfs_format+0xd4a>
printf ("rtems-rfs: format: file system open failed: %d: %s\n",
errno, strerror (errno));
return -1;
}
rc = rtems_rfs_inode_alloc (fs, RTEMS_RFS_ROOT_INO, &ino);
4f5dc: 486e fffc pea %fp@(-4) 4f5e0: 4878 0001 pea 1 <ADD> 4f5e4: 2f2e fff8 movel %fp@(-8),%sp@- 4f5e8: 4eb9 0005 0224 jsr 50224 <rtems_rfs_inode_alloc>
if (rc > 0)
4f5ee: 4fef 000c lea %sp@(12),%sp
printf ("rtems-rfs: format: file system open failed: %d: %s\n",
errno, strerror (errno));
return -1;
}
rc = rtems_rfs_inode_alloc (fs, RTEMS_RFS_ROOT_INO, &ino);
4f5f2: 2400 movel %d0,%d2
if (rc > 0)
4f5f4: 6e00 0082 bgtw 4f678 <rtems_rfs_format+0x9e0>
rc, strerror (rc));
rtems_rfs_fs_close (fs);
return rc;
}
if (ino != RTEMS_RFS_ROOT_INO)
4f5f8: 202e fffc movel %fp@(-4),%d0 4f5fc: 7201 moveq #1,%d1 4f5fe: b280 cmpl %d0,%d1 4f600: 6700 00dc beqw 4f6de <rtems_rfs_format+0xa46>
{
printf ("rtems-rfs: format: allocated inode not root ino: %" PRId32 "\n", ino);
4f604: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4f606: 4879 0007 2a76 pea 72a76 <ramdisk_ops+0x698> <== NOT EXECUTED 4f60c: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED
rtems_rfs_fs_close (fs);
4f612: 2f2e fff8 movel %fp@(-8),%sp@- <== NOT EXECUTED 4f616: 4eb9 0005 f35c jsr 5f35c <rtems_rfs_fs_close> <== NOT EXECUTED 4f61c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
printf ("rtems-rfs: format: writing root dir failed: %d: %s\n",
rc, strerror (rc));
return -1;
}
return 0;
4f620: 4280 clrl %d0 <== NOT EXECUTED 4f622: 6000 f744 braw 4ed68 <rtems_rfs_format+0xd0> <== NOT EXECUTED
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
return -1;
if (config->verbose)
printf ("\n");
4f626: 4878 000a pea a <LASTO> <== NOT EXECUTED 4f62a: 4eb9 0006 3014 jsr 63014 <putchar> <== NOT EXECUTED 4f630: 588f addql #4,%sp <== NOT EXECUTED 4f632: 6000 ff7a braw 4f5ae <rtems_rfs_format+0x916> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
4f636: 2f0c movel %a4,%sp@- <== NOT EXECUTED 4f638: 2c2e ff2c movel %fp@(-212),%d6 <== NOT EXECUTED 4f63c: 2640 moveal %d0,%a3 <== NOT EXECUTED 4f63e: 2f02 movel %d2,%sp@- <== NOT EXECUTED
handle->dirty = false;
4f640: 4203 clrb %d3 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
4f642: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
4f648: 1d43 ffee moveb %d3,%fp@(-18) <== NOT EXECUTED
*/
rc = rtems_rfs_bitmap_close (&bitmap);
if (rc > 0)
{
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("\nrtems-rfs: write-group: group %3d: close block bitmap failed: %d: %s\n",
4f64c: 2f0b movel %a3,%sp@- <== NOT EXECUTED
handle->bnum = 0;
4f64e: 42ae fff0 clrl %fp@(-16) <== NOT EXECUTED
handle->buffer = NULL;
4f652: 42ae fff4 clrl %fp@(-12) <== NOT EXECUTED 4f656: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED 4f65c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4f65e: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4f660: 2f06 movel %d6,%sp@- <== NOT EXECUTED 4f662: 4879 0007 2870 pea 72870 <ramdisk_ops+0x492> <== NOT EXECUTED 4f668: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 4f66e: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED
}
for (group = 0; group < fs.group_count; group++)
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
return -1;
4f672: 70ff moveq #-1,%d0 <== NOT EXECUTED 4f674: 6000 f6f2 braw 4ed68 <rtems_rfs_format+0xd0> <== NOT EXECUTED
}
rc = rtems_rfs_inode_alloc (fs, RTEMS_RFS_ROOT_INO, &ino);
if (rc > 0)
{
printf ("rtems-rfs: format: inode allocation failed: %d: %s\n",
4f678: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4f67a: 45f9 0006 3bf4 lea 63bf4 <strerror>,%a2 <== NOT EXECUTED 4f680: 4e92 jsr %a2@ <== NOT EXECUTED 4f682: 47f9 0006 2fd4 lea 62fd4 <printf>,%a3 <== NOT EXECUTED 4f688: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4f68a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4f68c: 4879 0007 2a42 pea 72a42 <ramdisk_ops+0x664> <== NOT EXECUTED 4f692: 4e93 jsr %a3@ <== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_fs_close (fs);
4f694: 2f2e fff8 movel %fp@(-8),%sp@- <== NOT EXECUTED 4f698: 4eb9 0005 f35c jsr 5f35c <rtems_rfs_fs_close> <== NOT EXECUTED 4f69e: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
}
rc = rtems_rfs_write_root_dir (name);
if (rc > 0)
{
printf ("rtems-rfs: format: writing root dir failed: %d: %s\n",
4f6a2: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4f6a4: 4e92 jsr %a2@ <== NOT EXECUTED 4f6a6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4f6a8: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4f6aa: 4879 0007 2ba3 pea 72ba3 <ramdisk_ops+0x7c5> <== NOT EXECUTED 4f6b0: 4e93 jsr %a3@ <== NOT EXECUTED
rc, strerror (rc));
return -1;
4f6b2: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4f6b6: 70ff moveq #-1,%d0 <== NOT EXECUTED 4f6b8: 6000 f6ae braw 4ed68 <rtems_rfs_format+0xd0> <== NOT EXECUTED
}
rc = rtems_rfs_buffer_setblksize (&fs, rtems_rfs_fs_block_size (&fs));
if (rc > 0)
{
printf ("rtems-rfs: format: setting block size failed: %d: %s\n",
4f6bc: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4f6be: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED 4f6c4: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4f6c6: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4f6c8: 4879 0007 2695 pea 72695 <ramdisk_ops+0x2b7> <== NOT EXECUTED 4f6ce: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED
rc, strerror (rc));
return -1;
4f6d4: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4f6d8: 70ff moveq #-1,%d0 <== NOT EXECUTED 4f6da: 6000 f68c braw 4ed68 <rtems_rfs_format+0xd0> <== NOT EXECUTED
printf ("rtems-rfs: format: allocated inode not root ino: %" PRId32 "\n", ino);
rtems_rfs_fs_close (fs);
return rc;
}
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
4f6de: 4878 0001 pea 1 <ADD> 4f6e2: 260e movel %fp,%d3 4f6e4: 0683 ffff ffb0 addil #-80,%d3 4f6ea: 2f03 movel %d3,%sp@- 4f6ec: 4878 0001 pea 1 <ADD> 4f6f0: 2f2e fff8 movel %fp@(-8),%sp@- 4f6f4: 4eb9 0005 0300 jsr 50300 <rtems_rfs_inode_open>
if (rc > 0)
4f6fa: 4fef 0010 lea %sp@(16),%sp
printf ("rtems-rfs: format: allocated inode not root ino: %" PRId32 "\n", ino);
rtems_rfs_fs_close (fs);
return rc;
}
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
4f6fe: 2400 movel %d0,%d2
if (rc > 0)
4f700: 6f00 016c blew 4f86e <rtems_rfs_format+0xbd6>
{
printf ("rtems-rfs: format: inode open failed: %d: %s\n",
4f704: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4f706: 45f9 0006 3bf4 lea 63bf4 <strerror>,%a2 <== NOT EXECUTED 4f70c: 4e92 jsr %a2@ <== NOT EXECUTED 4f70e: 47f9 0006 2fd4 lea 62fd4 <printf>,%a3 <== NOT EXECUTED 4f714: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4f716: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4f718: 4879 0007 2aac pea 72aac <ramdisk_ops+0x6ce> <== NOT EXECUTED 4f71e: 4e93 jsr %a3@ <== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_group_bitmap_free (fs, true, ino);
4f720: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 4f724: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 4f728: 2f2e fff8 movel %fp@(-8),%sp@- <== NOT EXECUTED 4f72c: 4eb9 0004 fffe jsr 4fffe <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
rtems_rfs_fs_close (fs);
4f732: 2f2e fff8 movel %fp@(-8),%sp@- <== NOT EXECUTED 4f736: 4eb9 0005 f35c jsr 5f35c <rtems_rfs_fs_close> <== NOT EXECUTED 4f73c: 4fef 0020 lea %sp@(32),%sp <== NOT EXECUTED
}
rc = rtems_rfs_write_root_dir (name);
if (rc > 0)
{
printf ("rtems-rfs: format: writing root dir failed: %d: %s\n",
4f740: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4f742: 4e92 jsr %a2@ <== NOT EXECUTED 4f744: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4f746: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4f748: 4879 0007 2ba3 pea 72ba3 <ramdisk_ops+0x7c5> <== NOT EXECUTED 4f74e: 4e93 jsr %a3@ <== NOT EXECUTED
rc, strerror (rc));
return -1;
4f750: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4f754: 70ff moveq #-1,%d0 <== NOT EXECUTED 4f756: 6000 f610 braw 4ed68 <rtems_rfs_format+0xd0> <== NOT EXECUTED
}
/*
* Close the inode bitmap.
*/
rc = rtems_rfs_bitmap_close (&bitmap);
4f75a: 2f05 movel %d5,%sp@- 4f75c: 4eb9 0005 a962 jsr 5a962 <rtems_rfs_bitmap_close>
if (rc > 0)
4f762: 588f addql #4,%sp 4f764: 4a80 tstl %d0 4f766: 6e00 00c4 bgtw 4f82c <rtems_rfs_format+0xb94>
printf ("\nrtems-rfs: write-group: group %3d: close inode" \
" bitmap failed: %d: %s\n", group, rc, strerror (rc));
return false;
}
rtems_rfs_buffer_mark_dirty (&handle);
4f76a: 7c01 moveq #1,%d6 4f76c: 1d46 ffee moveb %d6,%fp@(-18)
/*
* Initialise the inode tables if required to do so.
*/
if (initialise_inodes)
4f770: 4a2e ff2b tstb %fp@(-213)
4f774: 6748 beqs 4f7be <rtems_rfs_format+0xb26> <== ALWAYS TAKEN
{
for (b = 0; b < blocks; b++)
4f776: 4a8d tstl %a5 <== NOT EXECUTED 4f778: 6f44 bles 4f7be <rtems_rfs_format+0xb26> <== NOT EXECUTED 4f77a: 5484 addql #2,%d4 <== NOT EXECUTED
return rc;
}
int
rtems_rfs_format (const char* name, const rtems_rfs_format_config* config)
4f77c: 4bf5 4800 lea %a5@(00000000,%d4:l),%a5 <== NOT EXECUTED
*/
if (initialise_inodes)
{
for (b = 0; b < blocks; b++)
{
rc = rtems_rfs_buffer_handle_request (fs, &handle,
4f780: 42a7 clrl %sp@- <== NOT EXECUTED 4f782: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4f784: 2f0c movel %a4,%sp@- <== NOT EXECUTED 4f786: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4f788: 4eb9 0005 bd6e jsr 5bd6e <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
group_base + b + RTEMS_RFS_GROUP_INODE_BLOCK,
false);
if (rc > 0)
4f78e: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4f792: 4a80 tstl %d0 <== NOT EXECUTED 4f794: 6e00 0208 bgtw 4f99e <rtems_rfs_format+0xd06> <== NOT EXECUTED
/*
* Force the whole buffer to a known state. The bit map may not occupy the
* whole block.
*/
memset (rtems_rfs_buffer_data (&handle), 0xff, rtems_rfs_fs_block_size (fs));
4f798: 2f2e ff38 movel %fp@(-200),%sp@- <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle);
4f79c: 5284 addql #1,%d4 <== NOT EXECUTED
/*
* Force the whole buffer to a known state. The bit map may not occupy the
* whole block.
*/
memset (rtems_rfs_buffer_data (&handle), 0xff, rtems_rfs_fs_block_size (fs));
4f79e: 4878 00ff pea ff <DBL_MANT_DIG+0xca> <== NOT EXECUTED 4f7a2: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 4f7a6: 2f28 001e movel %a0@(30),%sp@- <== NOT EXECUTED 4f7aa: 4eb9 0006 2f48 jsr 62f48 <memset> <== NOT EXECUTED
/*
* Initialise the inode tables if required to do so.
*/
if (initialise_inodes)
{
for (b = 0; b < blocks; b++)
4f7b0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
* Force the whole buffer to a known state. The bit map may not occupy the
* whole block.
*/
memset (rtems_rfs_buffer_data (&handle), 0xff, rtems_rfs_fs_block_size (fs));
rtems_rfs_buffer_mark_dirty (&handle);
4f7b4: 7001 moveq #1,%d0 <== NOT EXECUTED 4f7b6: 1d40 ffee moveb %d0,%fp@(-18) <== NOT EXECUTED
/*
* Initialise the inode tables if required to do so.
*/
if (initialise_inodes)
{
for (b = 0; b < blocks; b++)
4f7ba: bbc4 cmpal %d4,%a5 <== NOT EXECUTED 4f7bc: 66c2 bnes 4f780 <rtems_rfs_format+0xae8> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
4f7be: 2f0c movel %a4,%sp@-
{
printf ("rtems-rfs: format: superblock write failed\n");
return -1;
}
for (group = 0; group < fs.group_count; group++)
4f7c0: 52ae ff2c addql #1,%fp@(-212) 4f7c4: 2f02 movel %d2,%sp@- 4f7c6: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release> 4f7cc: 262e ff2c movel %fp@(-212),%d3 4f7d0: 508f addql #8,%sp
handle->dirty = false;
4f7d2: 4201 clrb %d1
handle->bnum = 0;
4f7d4: 42ae fff0 clrl %fp@(-16)
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
handle->dirty = false;
4f7d8: 1d41 ffee moveb %d1,%fp@(-18)
handle->bnum = 0; handle->buffer = NULL;
4f7dc: 42ae fff4 clrl %fp@(-12) 4f7e0: b6ae ff50 cmpl %fp@(-176),%d3 4f7e4: 6c00 fdc2 bgew 4f5a8 <rtems_rfs_format+0x910>
size_t group_size;
int blocks;
int b;
int rc;
group_base = rtems_rfs_fs_block (fs, group, 0);
4f7e8: 262e ff54 movel %fp@(-172),%d3 <== NOT EXECUTED 4f7ec: 2e2e ff2c movel %fp@(-212),%d7 <== NOT EXECUTED 4f7f0: 4c03 7800 mulsl %d3,%d7 <== NOT EXECUTED
return -1;
}
for (group = 0; group < fs.group_count; group++)
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
4f7f4: 122a 0015 moveb %a2@(21),%d1 <== NOT EXECUTED 4f7f8: 1c2a 0014 moveb %a2@(20),%d6 <== NOT EXECUTED
size_t group_size;
int blocks;
int b;
int rc;
group_base = rtems_rfs_fs_block (fs, group, 0);
4f7fc: 2807 movel %d7,%d4 <== NOT EXECUTED 4f7fe: 5284 addql #1,%d4 <== NOT EXECUTED
if (group_base > rtems_rfs_fs_blocks (fs))
4f800: 202e ff34 movel %fp@(-204),%d0 <== NOT EXECUTED
return -1;
}
for (group = 0; group < fs.group_count; group++)
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
4f804: 1d41 ff26 moveb %d1,%fp@(-218) <== NOT EXECUTED 4f808: 1d46 ff2b moveb %d6,%fp@(-213) <== NOT EXECUTED
int b;
int rc;
group_base = rtems_rfs_fs_block (fs, group, 0);
if (group_base > rtems_rfs_fs_blocks (fs))
4f80c: b084 cmpl %d4,%d0 <== NOT EXECUTED 4f80e: 6400 faf2 bccw 4f302 <rtems_rfs_format+0x66a> <== NOT EXECUTED 4f812: 2c2e ff2c movel %fp@(-212),%d6 <== NOT EXECUTED
{
printf ("rtems-rfs: write-group: group %d base beyond disk limit\n",
4f816: 2f06 movel %d6,%sp@- <== NOT EXECUTED 4f818: 4879 0007 2767 pea 72767 <ramdisk_ops+0x389> <== NOT EXECUTED 4f81e: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 4f824: 508f addql #8,%sp <== NOT EXECUTED
}
for (group = 0; group < fs.group_count; group++)
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
return -1;
4f826: 70ff moveq #-1,%d0 <== NOT EXECUTED 4f828: 6000 f53e braw 4ed68 <rtems_rfs_format+0xd0> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
4f82c: 2f0c movel %a4,%sp@- <== NOT EXECUTED 4f82e: 2c2e ff2c movel %fp@(-212),%d6 <== NOT EXECUTED 4f832: 2600 movel %d0,%d3 <== NOT EXECUTED 4f834: 2f02 movel %d2,%sp@- <== NOT EXECUTED
handle->dirty = false;
4f836: 4204 clrb %d4 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
4f838: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
4f83e: 1d44 ffee moveb %d4,%fp@(-18) <== NOT EXECUTED
*/
rc = rtems_rfs_bitmap_close (&bitmap);
if (rc > 0)
{
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("\nrtems-rfs: write-group: group %3d: close inode" \
4f842: 2f03 movel %d3,%sp@- <== NOT EXECUTED
handle->bnum = 0;
4f844: 42ae fff0 clrl %fp@(-16) <== NOT EXECUTED
handle->buffer = NULL;
4f848: 42ae fff4 clrl %fp@(-12) <== NOT EXECUTED 4f84c: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED 4f852: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4f854: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4f856: 2f06 movel %d6,%sp@- <== NOT EXECUTED 4f858: 4879 0007 2951 pea 72951 <ramdisk_ops+0x573> <== NOT EXECUTED 4f85e: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 4f864: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED
}
for (group = 0; group < fs.group_count; group++)
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
return -1;
4f868: 70ff moveq #-1,%d0 <== NOT EXECUTED 4f86a: 6000 f4fc braw 4ed68 <rtems_rfs_format+0xd0> <== NOT EXECUTED
rtems_rfs_group_bitmap_free (fs, true, ino);
rtems_rfs_fs_close (fs);
return rc;
}
rc = rtems_rfs_inode_initialise (&inode, 0,
4f86e: 42a7 clrl %sp@- 4f870: 42a7 clrl %sp@- 4f872: 4878 41c9 pea 41c9 <D_MAX_EXP+0x39ca> 4f876: 42a7 clrl %sp@- 4f878: 2f03 movel %d3,%sp@- 4f87a: 4eb9 0005 0738 jsr 50738 <rtems_rfs_inode_initialise>
(RTEMS_RFS_S_IFDIR | RTEMS_RFS_S_IRWXU |
RTEMS_RFS_S_IXGRP | RTEMS_RFS_S_IXOTH),
0, 0);
if (rc > 0)
4f880: 4fef 0014 lea %sp@(20),%sp
rtems_rfs_group_bitmap_free (fs, true, ino);
rtems_rfs_fs_close (fs);
return rc;
}
rc = rtems_rfs_inode_initialise (&inode, 0,
4f884: 2400 movel %d0,%d2
(RTEMS_RFS_S_IFDIR | RTEMS_RFS_S_IRWXU |
RTEMS_RFS_S_IXGRP | RTEMS_RFS_S_IXOTH),
0, 0);
if (rc > 0)
4f886: 6f1c bles 4f8a4 <rtems_rfs_format+0xc0c> <== ALWAYS TAKEN
printf ("rtems-rfs: format: inode initialise failed: %d: %s\n",
4f888: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4f88a: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED 4f890: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4f892: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4f894: 4879 0007 2ada pea 72ada <ramdisk_ops+0x6fc> <== NOT EXECUTED 4f89a: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 4f8a0: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rc, strerror (rc));
rc = rtems_rfs_dir_add_entry (fs, &inode, ".", 1, ino);
4f8a4: 2f2e fffc movel %fp@(-4),%sp@- 4f8a8: 4878 0001 pea 1 <ADD> 4f8ac: 4879 0007 0ffa pea 70ffa <_rodata_start+0x1aa> 4f8b2: 2f03 movel %d3,%sp@- 4f8b4: 2f2e fff8 movel %fp@(-8),%sp@- 4f8b8: 4eb9 0005 ca10 jsr 5ca10 <rtems_rfs_dir_add_entry>
if (rc > 0)
4f8be: 4fef 0014 lea %sp@(20),%sp
0, 0);
if (rc > 0)
printf ("rtems-rfs: format: inode initialise failed: %d: %s\n",
rc, strerror (rc));
rc = rtems_rfs_dir_add_entry (fs, &inode, ".", 1, ino);
4f8c2: 2400 movel %d0,%d2
if (rc > 0)
4f8c4: 6f1c bles 4f8e2 <rtems_rfs_format+0xc4a> <== ALWAYS TAKEN
printf ("rtems-rfs: format: directory add failed: %d: %s\n",
4f8c6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4f8c8: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED 4f8ce: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4f8d0: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4f8d2: 4879 0007 2b0e pea 72b0e <ramdisk_ops+0x730> <== NOT EXECUTED 4f8d8: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 4f8de: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rc, strerror (rc));
rc = rtems_rfs_inode_close (fs, &inode);
4f8e2: 2f03 movel %d3,%sp@- 4f8e4: 2f2e fff8 movel %fp@(-8),%sp@- 4f8e8: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close>
if (rc > 0)
4f8ee: 508f addql #8,%sp
rc = rtems_rfs_dir_add_entry (fs, &inode, ".", 1, ino);
if (rc > 0)
printf ("rtems-rfs: format: directory add failed: %d: %s\n",
rc, strerror (rc));
rc = rtems_rfs_inode_close (fs, &inode);
4f8f0: 2400 movel %d0,%d2
if (rc > 0)
4f8f2: 6f1c bles 4f910 <rtems_rfs_format+0xc78> <== ALWAYS TAKEN
printf ("rtems-rfs: format: inode close failed: %d: %s\n",
4f8f4: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4f8f6: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED 4f8fc: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4f8fe: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4f900: 4879 0007 2b3f pea 72b3f <ramdisk_ops+0x761> <== NOT EXECUTED 4f906: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 4f90c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rc, strerror (rc));
rc = rtems_rfs_fs_close (fs);
4f910: 2f2e fff8 movel %fp@(-8),%sp@- 4f914: 4eb9 0005 f35c jsr 5f35c <rtems_rfs_fs_close>
if (rc < 0)
4f91a: 588f addql #4,%sp
rc = rtems_rfs_inode_close (fs, &inode);
if (rc > 0)
printf ("rtems-rfs: format: inode close failed: %d: %s\n",
rc, strerror (rc));
rc = rtems_rfs_fs_close (fs);
4f91c: 2400 movel %d0,%d2
if (rc < 0)
4f91e: 6d00 00f4 bltw 4fa14 <rtems_rfs_format+0xd7c>
rc, strerror (rc));
return -1;
}
rc = rtems_rfs_write_root_dir (name);
if (rc > 0)
4f922: 6600 012e bnew 4fa52 <rtems_rfs_format+0xdba>
printf ("rtems-rfs: format: writing root dir failed: %d: %s\n",
rc, strerror (rc));
return -1;
}
return 0;
4f926: 4280 clrl %d0 4f928: 6000 f43e braw 4ed68 <rtems_rfs_format+0xd0>
* Open the buffer interface.
*/
rc = rtems_rfs_buffer_open (name, &fs);
if (rc > 0)
{
printf ("rtems-rfs: format: buffer open failed: %d: %s\n",
4f92c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4f92e: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED 4f934: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4f936: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4f938: 4879 0007 240d pea 7240d <ramdisk_ops+0x2f> <== NOT EXECUTED 4f93e: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED
rc, strerror (rc));
return -1;
4f944: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4f948: 70ff moveq #-1,%d0 <== NOT EXECUTED 4f94a: 6000 f41c braw 4ed68 <rtems_rfs_format+0xd0> <== NOT EXECUTED
printf ("\n");
rc = rtems_rfs_buffer_close (&fs);
if (rc > 0)
{
printf ("rtems-rfs: format: buffer close failed: %d: %s\n",
4f94e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4f950: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED 4f956: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4f958: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4f95a: 4879 0007 29de pea 729de <ramdisk_ops+0x600> <== NOT EXECUTED 4f960: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED
rc, strerror (rc));
return -1;
4f966: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4f96a: 70ff moveq #-1,%d0 <== NOT EXECUTED 4f96c: 6000 f3fa braw 4ed68 <rtems_rfs_format+0xd0> <== NOT EXECUTED
/*
* Check the media.
*/
if (rtems_rfs_fs_media_block_size (&fs) == 0)
{
printf ("rtems-rfs: media block is invalid: %" PRIu32 "\n",
4f970: 42a7 clrl %sp@- <== NOT EXECUTED 4f972: 4879 0007 243c pea 7243c <ramdisk_ops+0x5e> <== NOT EXECUTED 4f978: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED
rtems_rfs_fs_media_block_size (&fs));
return -1;
4f97e: 508f addql #8,%sp <== NOT EXECUTED 4f980: 70ff moveq #-1,%d0 <== NOT EXECUTED 4f982: 6000 f3e4 braw 4ed68 <rtems_rfs_format+0xd0> <== NOT EXECUTED
int b;
int rc;
group_base = rtems_rfs_fs_block (fs, group, 0);
if (group_base > rtems_rfs_fs_blocks (fs))
4f986: 4286 clrl %d6 <== NOT EXECUTED
{
printf ("rtems-rfs: write-group: group %d base beyond disk limit\n",
4f988: 2f06 movel %d6,%sp@- <== NOT EXECUTED 4f98a: 4879 0007 2767 pea 72767 <ramdisk_ops+0x389> <== NOT EXECUTED 4f990: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 4f996: 508f addql #8,%sp <== NOT EXECUTED
}
for (group = 0; group < fs.group_count; group++)
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
return -1;
4f998: 70ff moveq #-1,%d0 <== NOT EXECUTED 4f99a: 6000 f3cc braw 4ed68 <rtems_rfs_format+0xd0> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
4f99e: 2f0c movel %a4,%sp@- <== NOT EXECUTED 4f9a0: 2c2e ff2c movel %fp@(-212),%d6 <== NOT EXECUTED 4f9a4: 2600 movel %d0,%d3 <== NOT EXECUTED 4f9a6: 2f02 movel %d2,%sp@- <== NOT EXECUTED
handle->dirty = false;
4f9a8: 4207 clrb %d7 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
4f9aa: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
4f9b0: 1d47 ffee moveb %d7,%fp@(-18) <== NOT EXECUTED
group_base + b + RTEMS_RFS_GROUP_INODE_BLOCK,
false);
if (rc > 0)
{
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("\nrtems-rfs: write-group: group %3d: block %" PRId32 " request failed: %d: %s\n",
4f9b4: 2f03 movel %d3,%sp@- <== NOT EXECUTED
handle->bnum = 0;
4f9b6: 42ae fff0 clrl %fp@(-16) <== NOT EXECUTED
handle->buffer = NULL;
4f9ba: 42ae fff4 clrl %fp@(-12) <== NOT EXECUTED 4f9be: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED 4f9c4: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4f9c6: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4f9c8: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4f9ca: 2f06 movel %d6,%sp@- <== NOT EXECUTED 4f9cc: 4879 0007 2998 pea 72998 <ramdisk_ops+0x5ba> <== NOT EXECUTED 4f9d2: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 4f9d8: 4fef 0020 lea %sp@(32),%sp <== NOT EXECUTED
}
for (group = 0; group < fs.group_count; group++)
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
return -1;
4f9dc: 70ff moveq #-1,%d0 <== NOT EXECUTED 4f9de: 6000 f388 braw 4ed68 <rtems_rfs_format+0xd0> <== NOT EXECUTED
*/
rc = rtems_rfs_fs_open (name, NULL, RTEMS_RFS_FS_FORCE_OPEN, &fs);
if (rc < 0)
{
printf ("rtems-rfs: format: file system open failed: %d: %s\n",
errno, strerror (errno));
4f9e2: 45f9 0006 2548 lea 62548 <__errno>,%a2 <== NOT EXECUTED 4f9e8: 4e92 jsr %a2@ <== NOT EXECUTED
* External API so returns -1.
*/
rc = rtems_rfs_fs_open (name, NULL, RTEMS_RFS_FS_FORCE_OPEN, &fs);
if (rc < 0)
{
printf ("rtems-rfs: format: file system open failed: %d: %s\n",
4f9ea: 2040 moveal %d0,%a0 <== NOT EXECUTED 4f9ec: 2f10 movel %a0@,%sp@- <== NOT EXECUTED 4f9ee: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED 4f9f4: 2400 movel %d0,%d2 <== NOT EXECUTED
errno, strerror (errno));
4f9f6: 4e92 jsr %a2@ <== NOT EXECUTED
* External API so returns -1.
*/
rc = rtems_rfs_fs_open (name, NULL, RTEMS_RFS_FS_FORCE_OPEN, &fs);
if (rc < 0)
{
printf ("rtems-rfs: format: file system open failed: %d: %s\n",
4f9f8: 2040 moveal %d0,%a0 <== NOT EXECUTED 4f9fa: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4f9fc: 2f10 movel %a0@,%sp@- <== NOT EXECUTED 4f9fe: 4879 0007 2a0e pea 72a0e <ramdisk_ops+0x630> <== NOT EXECUTED 4fa04: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 4fa0a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
printf ("rtems-rfs: format: writing root dir failed: %d: %s\n",
rc, strerror (rc));
return -1;
}
return 0;
4fa0e: 4280 clrl %d0 <== NOT EXECUTED 4fa10: 6000 f356 braw 4ed68 <rtems_rfs_format+0xd0> <== NOT EXECUTED
rc, strerror (rc));
rc = rtems_rfs_fs_close (fs);
if (rc < 0)
printf ("rtems-rfs: format: file system close failed: %d: %s\n",
errno, strerror (errno));
4fa14: 45f9 0006 2548 lea 62548 <__errno>,%a2 <== NOT EXECUTED 4fa1a: 4e92 jsr %a2@ <== NOT EXECUTED
printf ("rtems-rfs: format: inode close failed: %d: %s\n",
rc, strerror (rc));
rc = rtems_rfs_fs_close (fs);
if (rc < 0)
printf ("rtems-rfs: format: file system close failed: %d: %s\n",
4fa1c: 2040 moveal %d0,%a0 <== NOT EXECUTED 4fa1e: 2f10 movel %a0@,%sp@- <== NOT EXECUTED 4fa20: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED 4fa26: 2400 movel %d0,%d2 <== NOT EXECUTED
errno, strerror (errno));
4fa28: 4e92 jsr %a2@ <== NOT EXECUTED
printf ("rtems-rfs: format: inode close failed: %d: %s\n",
rc, strerror (rc));
rc = rtems_rfs_fs_close (fs);
if (rc < 0)
printf ("rtems-rfs: format: file system close failed: %d: %s\n",
4fa2a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4fa2c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4fa2e: 2f10 movel %a0@,%sp@- <== NOT EXECUTED 4fa30: 4879 0007 2b6e pea 72b6e <ramdisk_ops+0x790> <== NOT EXECUTED 4fa36: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 4fa3c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
printf ("rtems-rfs: format: writing root dir failed: %d: %s\n",
rc, strerror (rc));
return -1;
}
return 0;
4fa40: 4280 clrl %d0 <== NOT EXECUTED 4fa42: 6000 f324 braw 4ed68 <rtems_rfs_format+0xd0> <== NOT EXECUTED
}
if (fs->block_size < 512)
fs->block_size = 512;
if (fs->block_size > (4 * 1024))
4fa46: 206e ff3c moveal %fp@(-196),%a0 <== NOT EXECUTED 4fa4a: 2228 0024 movel %a0@(36),%d1 <== NOT EXECUTED 4fa4e: 6000 f2ec braw 4ed3c <rtems_rfs_format+0xa4> <== NOT EXECUTED 4fa52: 47f9 0006 2fd4 lea 62fd4 <printf>,%a3 <== NOT EXECUTED 4fa58: 45f9 0006 3bf4 lea 63bf4 <strerror>,%a2 <== NOT EXECUTED 4fa5e: 6000 fc42 braw 4f6a2 <rtems_rfs_format+0xa0a> <== NOT EXECUTED
...
0005f35c <rtems_rfs_fs_close>:
return 0;
}
int
rtems_rfs_fs_close (rtems_rfs_file_system* fs)
{
5f35c: 4e56 fff0 linkw %fp,#-16 5f360: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
int group;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_CLOSE))
5f364: 4878 0002 pea 2 <DOUBLE_FLOAT>
return 0;
}
int
rtems_rfs_fs_close (rtems_rfs_file_system* fs)
{
5f368: 246e 0008 moveal %fp@(8),%a2
int group;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_CLOSE))
5f36c: 42a7 clrl %sp@- 5f36e: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> 5f374: 508f addql #8,%sp 5f376: 4a00 tstb %d0
5f378: 6648 bnes 5f3c2 <rtems_rfs_fs_close+0x66> <== NEVER TAKEN
printf ("rtems-rfs: close\n");
for (group = 0; group < fs->group_count; group++)
5f37a: 4aaa 0020 tstl %a2@(32)
5f37e: 6f26 bles 5f3a6 <rtems_rfs_fs_close+0x4a> <== NEVER TAKEN
5f380: 4283 clrl %d3 5f382: 4282 clrl %d2 5f384: 47f9 0004 fcee lea 4fcee <rtems_rfs_group_close>,%a3
rtems_rfs_group_close (fs, &fs->groups[group]);
5f38a: 202a 001c movel %a2@(28),%d0 5f38e: d083 addl %d3,%d0
int group;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_CLOSE))
printf ("rtems-rfs: close\n");
for (group = 0; group < fs->group_count; group++)
5f390: 5282 addql #1,%d2 5f392: 0683 0000 004c addil #76,%d3
rtems_rfs_group_close (fs, &fs->groups[group]);
5f398: 2f00 movel %d0,%sp@- 5f39a: 2f0a movel %a2,%sp@- 5f39c: 4e93 jsr %a3@
int group;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_CLOSE))
printf ("rtems-rfs: close\n");
for (group = 0; group < fs->group_count; group++)
5f39e: 508f addql #8,%sp 5f3a0: b4aa 0020 cmpl %a2@(32),%d2
5f3a4: 6de4 blts 5f38a <rtems_rfs_fs_close+0x2e> <== NEVER TAKEN
rtems_rfs_group_close (fs, &fs->groups[group]);
rtems_rfs_buffer_close (fs);
5f3a6: 2f0a movel %a2,%sp@- 5f3a8: 4eb9 0005 c3d0 jsr 5c3d0 <rtems_rfs_buffer_close>
free (fs);
5f3ae: 2f0a movel %a2,%sp@- 5f3b0: 4eb9 0004 680c jsr 4680c <free>
return 0; }
5f3b6: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 5f3bc: 4280 clrl %d0 5f3be: 4e5e unlk %fp 5f3c0: 4e75 rts
rtems_rfs_fs_close (rtems_rfs_file_system* fs)
{
int group;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_CLOSE))
printf ("rtems-rfs: close\n");
5f3c2: 4879 0007 482e pea 7482e <CSWTCH.1+0x1252> <== NOT EXECUTED 5f3c8: 4eb9 0006 30ce jsr 630ce <puts> <== NOT EXECUTED 5f3ce: 588f addql #4,%sp <== NOT EXECUTED 5f3d0: 60a8 bras 5f37a <rtems_rfs_fs_close+0x1e> <== NOT EXECUTED
...
0005eab4 <rtems_rfs_fs_open>:
int
rtems_rfs_fs_open (const char* name,
void* user,
uint32_t flags,
rtems_rfs_file_system** fs)
{
5eab4: 4e56 ff98 linkw %fp,#-104 5eab8: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
size_t group_base;
rtems_rfs_inode_handle inode;
uint16_t mode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
5eabc: 4878 0001 pea 1 <ADD> 5eac0: 49f9 0005 37c0 lea 537c0 <rtems_rfs_trace>,%a4
int
rtems_rfs_fs_open (const char* name,
void* user,
uint32_t flags,
rtems_rfs_file_system** fs)
{
5eac6: 242e 0008 movel %fp@(8),%d2
size_t group_base;
rtems_rfs_inode_handle inode;
uint16_t mode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
5eaca: 42a7 clrl %sp@-
int
rtems_rfs_fs_open (const char* name,
void* user,
uint32_t flags,
rtems_rfs_file_system** fs)
{
5eacc: 246e 0014 moveal %fp@(20),%a2
size_t group_base;
rtems_rfs_inode_handle inode;
uint16_t mode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
5ead0: 4e94 jsr %a4@ 5ead2: 508f addql #8,%sp 5ead4: 4a00 tstb %d0 5ead6: 6600 019c bnew 5ec74 <rtems_rfs_fs_open+0x1c0>
printf ("rtems-rfs: open: %s\n", name);
*fs = malloc (sizeof (rtems_rfs_file_system));
5eada: 4878 0080 pea 80 <DBL_MANT_DIG+0x4b> 5eade: 4eb9 0004 6f84 jsr 46f84 <malloc>
if (!*fs)
5eae4: 588f addql #4,%sp
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: open: %s\n", name);
*fs = malloc (sizeof (rtems_rfs_file_system));
5eae6: 2480 movel %d0,%a2@
if (!*fs)
5eae8: 6700 0586 beqw 5f070 <rtems_rfs_fs_open+0x5bc>
printf ("rtems-rfs: open: no memory for file system data\n");
errno = ENOMEM;
return -1;
}
memset (*fs, 0, sizeof (rtems_rfs_file_system));
5eaec: 4878 0080 pea 80 <DBL_MANT_DIG+0x4b> 5eaf0: 42a7 clrl %sp@- 5eaf2: 2f00 movel %d0,%sp@- 5eaf4: 4eb9 0006 2f48 jsr 62f48 <memset>
(*fs)->user = user;
5eafa: 2052 moveal %a2@,%a0
rtems_chain_initialize_empty (&(*fs)->buffers);
rtems_chain_initialize_empty (&(*fs)->release);
rtems_chain_initialize_empty (&(*fs)->release_modified);
rtems_chain_initialize_empty (&(*fs)->file_shares);
(*fs)->max_held_buffers = RTEMS_RFS_FS_MAX_HELD_BUFFERS;
5eafc: 7005 moveq #5,%d0
return -1;
}
memset (*fs, 0, sizeof (rtems_rfs_file_system));
(*fs)->user = user;
5eafe: 216e 000c 007c movel %fp@(12),%a0@(124)
rtems_chain_initialize_empty (&(*fs)->buffers);
5eb04: 2052 moveal %a2@,%a0
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
5eb06: 43e8 0040 lea %a0@(64),%a1 5eb0a: 2149 0048 movel %a1,%a0@(72)
Chain_Node *tail = _Chain_Tail( the_chain );
5eb0e: 43e8 0044 lea %a0@(68),%a1
head->next = tail;
head->previous = NULL;
5eb12: 42a8 0044 clrl %a0@(68)
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
5eb16: 2149 0040 movel %a1,%a0@(64)
rtems_chain_initialize_empty (&(*fs)->release);
5eb1a: 2052 moveal %a2@,%a0
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
5eb1c: 43e8 0050 lea %a0@(80),%a1 5eb20: 2149 0058 movel %a1,%a0@(88)
Chain_Node *tail = _Chain_Tail( the_chain );
5eb24: 43e8 0054 lea %a0@(84),%a1
head->next = tail;
head->previous = NULL;
5eb28: 42a8 0054 clrl %a0@(84)
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
5eb2c: 2149 0050 movel %a1,%a0@(80)
rtems_chain_initialize_empty (&(*fs)->release_modified);
5eb30: 2052 moveal %a2@,%a0
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
5eb32: 43e8 0060 lea %a0@(96),%a1 5eb36: 2149 0068 movel %a1,%a0@(104)
Chain_Node *tail = _Chain_Tail( the_chain );
5eb3a: 43e8 0064 lea %a0@(100),%a1
head->next = tail;
head->previous = NULL;
5eb3e: 42a8 0064 clrl %a0@(100)
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
5eb42: 2149 0060 movel %a1,%a0@(96)
rtems_chain_initialize_empty (&(*fs)->file_shares);
5eb46: 2052 moveal %a2@,%a0 5eb48: 43e8 0074 lea %a0@(116),%a1 5eb4c: 2149 0070 movel %a1,%a0@(112)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
5eb50: 43e8 0070 lea %a0@(112),%a1
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
5eb54: 42a8 0074 clrl %a0@(116)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
5eb58: 2149 0078 movel %a1,%a0@(120)
(*fs)->max_held_buffers = RTEMS_RFS_FS_MAX_HELD_BUFFERS;
5eb5c: 2052 moveal %a2@,%a0
(*fs)->buffers_count = 0; (*fs)->release_count = 0; (*fs)->release_modified_count = 0; (*fs)->flags = flags;
5eb5e: 20ae 0010 movel %fp@(16),%a0@
rtems_chain_initialize_empty (&(*fs)->buffers);
rtems_chain_initialize_empty (&(*fs)->release);
rtems_chain_initialize_empty (&(*fs)->release_modified);
rtems_chain_initialize_empty (&(*fs)->file_shares);
(*fs)->max_held_buffers = RTEMS_RFS_FS_MAX_HELD_BUFFERS;
5eb62: 2140 003c movel %d0,%a0@(60)
(*fs)->buffers_count = 0;
5eb66: 42a8 004c clrl %a0@(76)
(*fs)->release_count = 0;
5eb6a: 42a8 005c clrl %a0@(92)
(*fs)->release_modified_count = 0;
5eb6e: 42a8 006c clrl %a0@(108)
group_base = 0;
/*
* Open the buffer interface.
*/
rc = rtems_rfs_buffer_open (name, *fs);
5eb72: 2f08 movel %a0,%sp@- 5eb74: 2f02 movel %d2,%sp@- 5eb76: 4eb9 0005 c00e jsr 5c00e <rtems_rfs_buffer_open>
if (rc > 0)
5eb7c: 4fef 0014 lea %sp@(20),%sp
group_base = 0;
/*
* Open the buffer interface.
*/
rc = rtems_rfs_buffer_open (name, *fs);
5eb80: 2400 movel %d0,%d2
if (rc > 0)
5eb82: 6e00 0286 bgtw 5ee0a <rtems_rfs_fs_open+0x356>
printf ("rtems-rfs: read-superblock: handle open failed: %d: %s\n",
rc, strerror (rc));
return rc;
}
rc = rtems_rfs_buffer_handle_request (fs, &handle, 0, true);
5eb86: 4878 0001 pea 1 <ADD>
rc, strerror (rc));
errno = rc;
return -1;
}
rc = rtems_rfs_fs_read_superblock (*fs);
5eb8a: 2a52 moveal %a2@,%a5
printf ("rtems-rfs: read-superblock: handle open failed: %d: %s\n",
rc, strerror (rc));
return rc;
}
rc = rtems_rfs_buffer_handle_request (fs, &handle, 0, true);
5eb8c: 42a7 clrl %sp@- 5eb8e: 486e fff6 pea %fp@(-10)
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
5eb92: 4201 clrb %d1 5eb94: 2f0d movel %a5,%sp@- 5eb96: 1d41 fff6 moveb %d1,%fp@(-10)
handle->bnum = 0;
5eb9a: 42ae fff8 clrl %fp@(-8)
handle->buffer = NULL;
5eb9e: 42ae fffc clrl %fp@(-4) 5eba2: 4eb9 0005 bd6e jsr 5bd6e <rtems_rfs_buffer_handle_request>
if (rc > 0)
5eba8: 4fef 0010 lea %sp@(16),%sp
printf ("rtems-rfs: read-superblock: handle open failed: %d: %s\n",
rc, strerror (rc));
return rc;
}
rc = rtems_rfs_buffer_handle_request (fs, &handle, 0, true);
5ebac: 2400 movel %d0,%d2
if (rc > 0)
5ebae: 6f48 bles 5ebf8 <rtems_rfs_fs_open+0x144> <== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
5ebb0: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 5ebb4: 42a7 clrl %sp@- <== NOT EXECUTED 5ebb6: 4e94 jsr %a4@ <== NOT EXECUTED 5ebb8: 508f addql #8,%sp <== NOT EXECUTED 5ebba: 4a00 tstb %d0 <== NOT EXECUTED 5ebbc: 6600 00ca bnew 5ec88 <rtems_rfs_fs_open+0x1d4> <== NOT EXECUTED
}
rc = rtems_rfs_fs_read_superblock (*fs);
if (rc > 0)
{
rtems_rfs_buffer_close (*fs);
5ebc0: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 5ebc2: 4eb9 0005 c3d0 jsr 5c3d0 <rtems_rfs_buffer_close> <== NOT EXECUTED
free (*fs);
5ebc8: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 5ebca: 4eb9 0004 680c jsr 4680c <free> <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
5ebd0: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 5ebd4: 42a7 clrl %sp@- <== NOT EXECUTED 5ebd6: 4e94 jsr %a4@ <== NOT EXECUTED 5ebd8: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5ebdc: 4a00 tstb %d0 <== NOT EXECUTED 5ebde: 6600 02a2 bnew 5ee82 <rtems_rfs_fs_open+0x3ce> <== NOT EXECUTED
{
rtems_rfs_buffer_close (*fs);
free (*fs);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: open: closing root inode: %d: %s\n", rc, strerror (rc));
errno = rc;
5ebe2: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 5ebe8: 2040 moveal %d0,%a0 <== NOT EXECUTED
return -1;
5ebea: 70ff moveq #-1,%d0 <== NOT EXECUTED
{
rtems_rfs_buffer_close (*fs);
free (*fs);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: open: closing root inode: %d: %s\n", rc, strerror (rc));
errno = rc;
5ebec: 2082 movel %d2,%a0@ <== NOT EXECUTED
return -1;
}
errno = 0;
return 0;
}
5ebee: 4cee 3cfc ff98 moveml %fp@(-104),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5ebf4: 4e5e unlk %fp <== NOT EXECUTED 5ebf6: 4e75 rts <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: request failed%d: %s\n",
rc, strerror (rc));
return rc;
}
sb = rtems_rfs_buffer_data (&handle);
5ebf8: 206e fffc moveal %fp@(-4),%a0
#define read_sb(_o) rtems_rfs_read_u32 (sb + (_o))
if (read_sb (RTEMS_RFS_SB_OFFSET_MAGIC) != RTEMS_RFS_SB_MAGIC)
5ebfc: 4280 clrl %d0 5ebfe: 4282 clrl %d2 5ec00: 7a18 moveq #24,%d5 5ec02: 4283 clrl %d3 5ec04: 4281 clrl %d1
printf ("rtems-rfs: read-superblock: request failed%d: %s\n",
rc, strerror (rc));
return rc;
}
sb = rtems_rfs_buffer_data (&handle);
5ec06: 2668 001e moveal %a0@(30),%a3
#define read_sb(_o) rtems_rfs_read_u32 (sb + (_o))
if (read_sb (RTEMS_RFS_SB_OFFSET_MAGIC) != RTEMS_RFS_SB_MAGIC)
5ec0a: 1013 moveb %a3@,%d0 5ec0c: 142b 0001 moveb %a3@(1),%d2 5ec10: 162b 0003 moveb %a3@(3),%d3 5ec14: 122b 0002 moveb %a3@(2),%d1 5ec18: eba8 lsll %d5,%d0 5ec1a: 4842 swap %d2 5ec1c: 4242 clrw %d2 5ec1e: e189 lsll #8,%d1 5ec20: 8082 orl %d2,%d0 5ec22: 8083 orl %d3,%d0 5ec24: 8081 orl %d1,%d0 5ec26: 0c80 2809 2001 cmpil #671686657,%d0 5ec2c: 6700 009a beqw 5ecc8 <rtems_rfs_fs_open+0x214>
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
5ec30: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 5ec34: 42a7 clrl %sp@- <== NOT EXECUTED 5ec36: 4e94 jsr %a4@ <== NOT EXECUTED 5ec38: 508f addql #8,%sp <== NOT EXECUTED 5ec3a: 4a00 tstb %d0 <== NOT EXECUTED 5ec3c: 666a bnes 5eca8 <rtems_rfs_fs_open+0x1f4> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
5ec3e: 486e fff6 pea %fp@(-10) <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: read-superblock: inode size mismatch: fs:%" PRId32 " target:%" PRId32 "\n",
read_sb (RTEMS_RFS_SB_OFFSET_VERSION), RTEMS_RFS_VERSION_MASK);
rtems_rfs_buffer_handle_close (fs, &handle);
return EIO;
5ec42: 7405 moveq #5,%d2 <== NOT EXECUTED 5ec44: 2f0d movel %a5,%sp@- <== NOT EXECUTED 5ec46: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED 5ec4c: 508f addql #8,%sp <== NOT EXECUTED
}
rc = rtems_rfs_fs_read_superblock (*fs);
if (rc > 0)
{
rtems_rfs_buffer_close (*fs);
5ec4e: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 5ec50: 4eb9 0005 c3d0 jsr 5c3d0 <rtems_rfs_buffer_close> <== NOT EXECUTED
free (*fs);
5ec56: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 5ec58: 4eb9 0004 680c jsr 4680c <free> <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
5ec5e: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 5ec62: 42a7 clrl %sp@- <== NOT EXECUTED 5ec64: 4e94 jsr %a4@ <== NOT EXECUTED 5ec66: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5ec6a: 4a00 tstb %d0 <== NOT EXECUTED 5ec6c: 6700 ff74 beqw 5ebe2 <rtems_rfs_fs_open+0x12e> <== NOT EXECUTED 5ec70: 6000 0210 braw 5ee82 <rtems_rfs_fs_open+0x3ce> <== NOT EXECUTED
rtems_rfs_inode_handle inode;
uint16_t mode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: open: %s\n", name);
5ec74: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5ec76: 4879 0007 4527 pea 74527 <CSWTCH.1+0xf4b> <== NOT EXECUTED 5ec7c: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5ec82: 508f addql #8,%sp <== NOT EXECUTED 5ec84: 6000 fe54 braw 5eada <rtems_rfs_fs_open+0x26> <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &handle, 0, true);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: read-superblock: request failed%d: %s\n",
5ec88: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5ec8a: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED 5ec90: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5ec92: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5ec94: 4879 0007 4599 pea 74599 <CSWTCH.1+0xfbd> <== NOT EXECUTED 5ec9a: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5eca0: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5eca4: 6000 ff1a braw 5ebc0 <rtems_rfs_fs_open+0x10c> <== NOT EXECUTED
#define read_sb(_o) rtems_rfs_read_u32 (sb + (_o))
if (read_sb (RTEMS_RFS_SB_OFFSET_MAGIC) != RTEMS_RFS_SB_MAGIC)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: read-superblock: invalid superblock, bad magic\n");
5eca8: 4879 0007 45cb pea 745cb <CSWTCH.1+0xfef> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: read-superblock: inode size mismatch: fs:%" PRId32 " target:%" PRId32 "\n",
read_sb (RTEMS_RFS_SB_OFFSET_VERSION), RTEMS_RFS_VERSION_MASK);
rtems_rfs_buffer_handle_close (fs, &handle);
return EIO;
5ecae: 7405 moveq #5,%d2 <== NOT EXECUTED
#define read_sb(_o) rtems_rfs_read_u32 (sb + (_o))
if (read_sb (RTEMS_RFS_SB_OFFSET_MAGIC) != RTEMS_RFS_SB_MAGIC)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: read-superblock: invalid superblock, bad magic\n");
5ecb0: 4eb9 0006 30ce jsr 630ce <puts> <== NOT EXECUTED 5ecb6: 588f addql #4,%sp <== NOT EXECUTED 5ecb8: 486e fff6 pea %fp@(-10) <== NOT EXECUTED 5ecbc: 2f0d movel %a5,%sp@- <== NOT EXECUTED 5ecbe: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED 5ecc4: 508f addql #8,%sp <== NOT EXECUTED 5ecc6: 6086 bras 5ec4e <rtems_rfs_fs_open+0x19a> <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle);
return EIO;
}
fs->blocks = read_sb (RTEMS_RFS_SB_OFFSET_BLOCKS);
5ecc8: 4280 clrl %d0 5ecca: 4282 clrl %d2 5eccc: 102b 000c moveb %a3@(12),%d0 5ecd0: 142b 000d moveb %a3@(13),%d2 5ecd4: 7e18 moveq #24,%d7 5ecd6: 4283 clrl %d3 5ecd8: 4281 clrl %d1 5ecda: 162b 000f moveb %a3@(15),%d3 5ecde: 122b 000e moveb %a3@(14),%d1
fs->block_size = read_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE);
5ece2: 4284 clrl %d4
uint64_t
rtems_rfs_fs_size (rtems_rfs_file_system* fs)
{
uint64_t blocks = rtems_rfs_fs_blocks (fs);
uint64_t block_size = rtems_rfs_fs_block_size (fs);
return blocks * block_size;
5ece4: 2c3c 0006 edf8 movel #454136,%d6 5ecea: 2046 moveal %d6,%a0
printf ("rtems-rfs: read-superblock: invalid superblock, bad magic\n");
rtems_rfs_buffer_handle_close (fs, &handle);
return EIO;
}
fs->blocks = read_sb (RTEMS_RFS_SB_OFFSET_BLOCKS);
5ecec: 4842 swap %d2 5ecee: 4242 clrw %d2 5ecf0: efa8 lsll %d7,%d0 5ecf2: e189 lsll #8,%d1
}
uint64_t
rtems_rfs_fs_media_size (rtems_rfs_file_system* fs)
{
uint64_t media_blocks = (uint64_t) rtems_rfs_fs_media_blocks (fs);
5ecf4: 2a2d 000c movel %a5@(12),%d5
printf ("rtems-rfs: read-superblock: invalid superblock, bad magic\n");
rtems_rfs_buffer_handle_close (fs, &handle);
return EIO;
}
fs->blocks = read_sb (RTEMS_RFS_SB_OFFSET_BLOCKS);
5ecf8: 8082 orl %d2,%d0
fs->block_size = read_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE);
5ecfa: 4282 clrl %d2
printf ("rtems-rfs: read-superblock: invalid superblock, bad magic\n");
rtems_rfs_buffer_handle_close (fs, &handle);
return EIO;
}
fs->blocks = read_sb (RTEMS_RFS_SB_OFFSET_BLOCKS);
5ecfc: 8083 orl %d3,%d0 5ecfe: 8081 orl %d1,%d0
fs->block_size = read_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE);
5ed00: 4281 clrl %d1
printf ("rtems-rfs: read-superblock: invalid superblock, bad magic\n");
rtems_rfs_buffer_handle_close (fs, &handle);
return EIO;
}
fs->blocks = read_sb (RTEMS_RFS_SB_OFFSET_BLOCKS);
5ed02: 2b40 0004 movel %d0,%a5@(4)
fs->block_size = read_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE);
5ed06: 182b 0008 moveb %a3@(8),%d4 5ed0a: 142b 0009 moveb %a3@(9),%d2 5ed0e: 162b 000b moveb %a3@(11),%d3 5ed12: 122b 000a moveb %a3@(10),%d1 5ed16: 4842 swap %d2 5ed18: 4242 clrw %d2 5ed1a: efac lsll %d7,%d4 5ed1c: e189 lsll #8,%d1 5ed1e: 8882 orl %d2,%d4 5ed20: 8883 orl %d3,%d4 5ed22: 8881 orl %d1,%d4 5ed24: 2b44 0008 movel %d4,%a5@(8)
uint64_t
rtems_rfs_fs_size (rtems_rfs_file_system* fs)
{
uint64_t blocks = rtems_rfs_fs_blocks (fs);
uint64_t block_size = rtems_rfs_fs_block_size (fs);
return blocks * block_size;
5ed28: 2f00 movel %d0,%sp@- 5ed2a: 42a7 clrl %sp@- 5ed2c: 2f04 movel %d4,%sp@- 5ed2e: 42a7 clrl %sp@- 5ed30: 4e90 jsr %a0@ 5ed32: 4fef 0010 lea %sp@(16),%sp
}
uint64_t
rtems_rfs_fs_media_size (rtems_rfs_file_system* fs)
{
uint64_t media_blocks = (uint64_t) rtems_rfs_fs_media_blocks (fs);
5ed36: 2245 moveal %d5,%a1 5ed38: 91c8 subal %a0,%a0 5ed3a: 2269 001c moveal %a1@(28),%a1 5ed3e: 2d49 ffc4 movel %a1,%fp@(-60)
uint64_t media_block_size = (uint64_t) rtems_rfs_fs_media_block_size (fs);
5ed42: 2245 moveal %d5,%a1 5ed44: 2a29 0024 movel %a1@(36),%d5
return media_blocks * media_block_size;
5ed48: 2246 moveal %d6,%a1 5ed4a: 2f2e ffc4 movel %fp@(-60),%sp@-
uint64_t
rtems_rfs_fs_size (rtems_rfs_file_system* fs)
{
uint64_t blocks = rtems_rfs_fs_blocks (fs);
uint64_t block_size = rtems_rfs_fs_block_size (fs);
return blocks * block_size;
5ed4e: 2400 movel %d0,%d2 5ed50: 2601 movel %d1,%d3
}
uint64_t
rtems_rfs_fs_media_size (rtems_rfs_file_system* fs)
{
uint64_t media_blocks = (uint64_t) rtems_rfs_fs_media_blocks (fs);
5ed52: 2d48 ffc0 movel %a0,%fp@(-64)
uint64_t media_block_size = (uint64_t) rtems_rfs_fs_media_block_size (fs); return media_blocks * media_block_size;
5ed56: 2f2e ffc0 movel %fp@(-64),%sp@-
uint64_t
rtems_rfs_fs_media_size (rtems_rfs_file_system* fs)
{
uint64_t media_blocks = (uint64_t) rtems_rfs_fs_media_blocks (fs);
uint64_t media_block_size = (uint64_t) rtems_rfs_fs_media_block_size (fs);
5ed5a: 2d45 ffcc movel %d5,%fp@(-52)
return media_blocks * media_block_size;
5ed5e: 2f2e ffcc movel %fp@(-52),%sp@-
}
fs->blocks = read_sb (RTEMS_RFS_SB_OFFSET_BLOCKS);
fs->block_size = read_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE);
if (rtems_rfs_fs_size(fs) > rtems_rfs_fs_media_size (fs))
5ed62: 2a02 movel %d2,%d5 5ed64: 2c03 movel %d3,%d6
uint64_t
rtems_rfs_fs_media_size (rtems_rfs_file_system* fs)
{
uint64_t media_blocks = (uint64_t) rtems_rfs_fs_media_blocks (fs);
uint64_t media_block_size = (uint64_t) rtems_rfs_fs_media_block_size (fs);
5ed66: 2d48 ffc8 movel %a0,%fp@(-56)
return media_blocks * media_block_size;
5ed6a: 2f2e ffc8 movel %fp@(-56),%sp@- 5ed6e: 4e91 jsr %a1@ 5ed70: 4fef 0010 lea %sp@(16),%sp
}
fs->blocks = read_sb (RTEMS_RFS_SB_OFFSET_BLOCKS);
fs->block_size = read_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE);
if (rtems_rfs_fs_size(fs) > rtems_rfs_fs_media_size (fs))
5ed74: 9c81 subl %d1,%d6 5ed76: 9b80 subxl %d0,%d5 5ed78: 6200 00d6 bhiw 5ee50 <rtems_rfs_fs_open+0x39c>
read_sb (RTEMS_RFS_SB_OFFSET_VERSION), RTEMS_RFS_VERSION_MASK);
rtems_rfs_buffer_handle_close (fs, &handle);
return EIO;
}
if (read_sb (RTEMS_RFS_SB_OFFSET_INODE_SIZE) != RTEMS_RFS_INODE_SIZE)
5ed7c: 4280 clrl %d0 5ed7e: 4281 clrl %d1 5ed80: 102b 0024 moveb %a3@(36),%d0 5ed84: 122b 0025 moveb %a3@(37),%d1 5ed88: 7c18 moveq #24,%d6 5ed8a: 4282 clrl %d2 5ed8c: 142b 0027 moveb %a3@(39),%d2 5ed90: 7e38 moveq #56,%d7 5ed92: 4841 swap %d1 5ed94: 4241 clrw %d1 5ed96: eda8 lsll %d6,%d0 5ed98: 8081 orl %d1,%d0 5ed9a: 4281 clrl %d1 5ed9c: 122b 0026 moveb %a3@(38),%d1 5eda0: 8082 orl %d2,%d0 5eda2: e189 lsll #8,%d1 5eda4: 8081 orl %d1,%d0 5eda6: be80 cmpl %d0,%d7 5eda8: 6700 0104 beqw 5eeae <rtems_rfs_fs_open+0x3fa>
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
5edac: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 5edb0: 42a7 clrl %sp@- <== NOT EXECUTED 5edb2: 4e94 jsr %a4@ <== NOT EXECUTED 5edb4: 508f addql #8,%sp <== NOT EXECUTED 5edb6: 4a00 tstb %d0 <== NOT EXECUTED 5edb8: 6700 fe84 beqw 5ec3e <rtems_rfs_fs_open+0x18a> <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: inode size mismatch: fs:%" PRId32 " target:%" PRId32 "\n",
5edbc: 42a7 clrl %sp@- <== NOT EXECUTED
read_sb (RTEMS_RFS_SB_OFFSET_VERSION), RTEMS_RFS_VERSION_MASK);
5edbe: 4280 clrl %d0 <== NOT EXECUTED 5edc0: 4282 clrl %d2 <== NOT EXECUTED 5edc2: 102b 0004 moveb %a3@(4),%d0 <== NOT EXECUTED 5edc6: 142b 0005 moveb %a3@(5),%d2 <== NOT EXECUTED 5edca: 4283 clrl %d3 <== NOT EXECUTED 5edcc: 4281 clrl %d1 <== NOT EXECUTED 5edce: 162b 0007 moveb %a3@(7),%d3 <== NOT EXECUTED 5edd2: 122b 0006 moveb %a3@(6),%d1 <== NOT EXECUTED 5edd6: 4842 swap %d2 <== NOT EXECUTED 5edd8: 4242 clrw %d2 <== NOT EXECUTED 5edda: eda8 lsll %d6,%d0 <== NOT EXECUTED 5eddc: e189 lsll #8,%d1 <== NOT EXECUTED 5edde: 8082 orl %d2,%d0 <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle);
return EIO;
5ede0: 7405 moveq #5,%d2 <== NOT EXECUTED
if (read_sb (RTEMS_RFS_SB_OFFSET_INODE_SIZE) != RTEMS_RFS_INODE_SIZE)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: read-superblock: inode size mismatch: fs:%" PRId32 " target:%" PRId32 "\n",
read_sb (RTEMS_RFS_SB_OFFSET_VERSION), RTEMS_RFS_VERSION_MASK);
5ede2: 8083 orl %d3,%d0 <== NOT EXECUTED
}
if (read_sb (RTEMS_RFS_SB_OFFSET_INODE_SIZE) != RTEMS_RFS_INODE_SIZE)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: read-superblock: inode size mismatch: fs:%" PRId32 " target:%" PRId32 "\n",
5ede4: 8081 orl %d1,%d0 <== NOT EXECUTED 5ede6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5ede8: 4879 0007 4645 pea 74645 <CSWTCH.1+0x1069> <== NOT EXECUTED 5edee: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5edf4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5edf8: 486e fff6 pea %fp@(-10) <== NOT EXECUTED 5edfc: 2f0d movel %a5,%sp@- <== NOT EXECUTED 5edfe: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED 5ee04: 508f addql #8,%sp <== NOT EXECUTED 5ee06: 6000 fe46 braw 5ec4e <rtems_rfs_fs_open+0x19a> <== NOT EXECUTED
* Open the buffer interface.
*/
rc = rtems_rfs_buffer_open (name, *fs);
if (rc > 0)
{
free (*fs);
5ee0a: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 5ee0c: 4eb9 0004 680c jsr 4680c <free> <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
5ee12: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 5ee16: 42a7 clrl %sp@- <== NOT EXECUTED 5ee18: 4e94 jsr %a4@ <== NOT EXECUTED 5ee1a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5ee1e: 4a00 tstb %d0 <== NOT EXECUTED 5ee20: 6700 fdc0 beqw 5ebe2 <rtems_rfs_fs_open+0x12e> <== NOT EXECUTED
printf ("rtems-rfs: open: buffer open failed: %d: %s\n",
5ee24: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5ee26: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED 5ee2c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5ee2e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5ee30: 4879 0007 456c pea 7456c <CSWTCH.1+0xf90> <== NOT EXECUTED 5ee36: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5ee3c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
{
rtems_rfs_buffer_close (*fs);
free (*fs);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: open: closing root inode: %d: %s\n", rc, strerror (rc));
errno = rc;
5ee40: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 5ee46: 2040 moveal %d0,%a0 <== NOT EXECUTED
return -1;
5ee48: 70ff moveq #-1,%d0 <== NOT EXECUTED
{
rtems_rfs_buffer_close (*fs);
free (*fs);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: open: closing root inode: %d: %s\n", rc, strerror (rc));
errno = rc;
5ee4a: 2082 movel %d2,%a0@ <== NOT EXECUTED 5ee4c: 6000 fda0 braw 5ebee <rtems_rfs_fs_open+0x13a> <== NOT EXECUTED
fs->blocks = read_sb (RTEMS_RFS_SB_OFFSET_BLOCKS);
fs->block_size = read_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE);
if (rtems_rfs_fs_size(fs) > rtems_rfs_fs_media_size (fs))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
5ee50: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 5ee54: 42a7 clrl %sp@- <== NOT EXECUTED 5ee56: 4e94 jsr %a4@ <== NOT EXECUTED 5ee58: 508f addql #8,%sp <== NOT EXECUTED 5ee5a: 4a00 tstb %d0 <== NOT EXECUTED 5ee5c: 6700 fde0 beqw 5ec3e <rtems_rfs_fs_open+0x18a> <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: invalid superblock block/size count\n");
5ee60: 4879 0007 4605 pea 74605 <CSWTCH.1+0x1029> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: read-superblock: inode size mismatch: fs:%" PRId32 " target:%" PRId32 "\n",
read_sb (RTEMS_RFS_SB_OFFSET_VERSION), RTEMS_RFS_VERSION_MASK);
rtems_rfs_buffer_handle_close (fs, &handle);
return EIO;
5ee66: 7405 moveq #5,%d2 <== NOT EXECUTED
fs->block_size = read_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE);
if (rtems_rfs_fs_size(fs) > rtems_rfs_fs_media_size (fs))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: read-superblock: invalid superblock block/size count\n");
5ee68: 4eb9 0006 30ce jsr 630ce <puts> <== NOT EXECUTED 5ee6e: 588f addql #4,%sp <== NOT EXECUTED 5ee70: 486e fff6 pea %fp@(-10) <== NOT EXECUTED 5ee74: 2f0d movel %a5,%sp@- <== NOT EXECUTED 5ee76: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED 5ee7c: 508f addql #8,%sp <== NOT EXECUTED 5ee7e: 6000 fdce braw 5ec4e <rtems_rfs_fs_open+0x19a> <== NOT EXECUTED
if (rc > 0)
{
rtems_rfs_buffer_close (*fs);
free (*fs);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: open: reading superblock: %d: %s\n",
5ee82: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5ee84: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED 5ee8a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5ee8c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5ee8e: 4879 0007 477e pea 7477e <CSWTCH.1+0x11a2> <== NOT EXECUTED 5ee94: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5ee9a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
{
rtems_rfs_buffer_close (*fs);
free (*fs);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: open: closing root inode: %d: %s\n", rc, strerror (rc));
errno = rc;
5ee9e: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 5eea4: 2040 moveal %d0,%a0 <== NOT EXECUTED
return -1;
5eea6: 70ff moveq #-1,%d0 <== NOT EXECUTED
{
rtems_rfs_buffer_close (*fs);
free (*fs);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: open: closing root inode: %d: %s\n", rc, strerror (rc));
errno = rc;
5eea8: 2082 movel %d2,%a0@ <== NOT EXECUTED 5eeaa: 6000 fd42 braw 5ebee <rtems_rfs_fs_open+0x13a> <== NOT EXECUTED
fs->group_count = read_sb (RTEMS_RFS_SB_OFFSET_GROUPS);
fs->group_blocks = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS);
fs->group_inodes = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES);
fs->blocks_per_block =
rtems_rfs_fs_block_size (fs) / sizeof (rtems_rfs_inode_block);
5eeae: 2604 movel %d4,%d3 5eeb0: e48b lsrl #2,%d3
fs->block_map_singly_blocks =
fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
fs->block_map_doubly_blocks =
fs->blocks_per_block * fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
5eeb2: 2003 movel %d3,%d0 5eeb4: 4c03 0800 mulsl %d3,%d0
read_sb (RTEMS_RFS_SB_OFFSET_VERSION), RTEMS_RFS_VERSION_MASK);
rtems_rfs_buffer_handle_close (fs, &handle);
return EIO;
}
fs->bad_blocks = read_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS);
5eeb8: 4282 clrl %d2 5eeba: 142b 0011 moveb %a3@(17),%d2 5eebe: 7218 moveq #24,%d1
rtems_rfs_fs_block_size (fs) / sizeof (rtems_rfs_inode_block);
fs->block_map_singly_blocks =
fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
fs->block_map_doubly_blocks =
fs->blocks_per_block * fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
5eec0: 2040 moveal %d0,%a0
read_sb (RTEMS_RFS_SB_OFFSET_VERSION), RTEMS_RFS_VERSION_MASK);
rtems_rfs_buffer_handle_close (fs, &handle);
return EIO;
}
fs->bad_blocks = read_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS);
5eec2: 4280 clrl %d0 5eec4: 102b 0010 moveb %a3@(16),%d0 5eec8: 4285 clrl %d5 5eeca: 1a2b 0013 moveb %a3@(19),%d5
fs->max_name_length = read_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH);
5eece: 7e18 moveq #24,%d7
fs->inodes = fs->group_count * fs->group_inodes;
fs->inodes_per_block = fs->block_size / RTEMS_RFS_INODE_SIZE;
if (fs->group_blocks >
rtems_rfs_bitmap_numof_bits (rtems_rfs_fs_block_size (fs)))
5eed0: 2c04 movel %d4,%d6
read_sb (RTEMS_RFS_SB_OFFSET_VERSION), RTEMS_RFS_VERSION_MASK);
rtems_rfs_buffer_handle_close (fs, &handle);
return EIO;
}
fs->bad_blocks = read_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS);
5eed2: e3a8 lsll %d1,%d0 5eed4: 4842 swap %d2 5eed6: 4242 clrw %d2 5eed8: 4281 clrl %d1 5eeda: 122b 0012 moveb %a3@(18),%d1 5eede: 8082 orl %d2,%d0 5eee0: e189 lsll #8,%d1
fs->max_name_length = read_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH);
5eee2: 4282 clrl %d2
read_sb (RTEMS_RFS_SB_OFFSET_VERSION), RTEMS_RFS_VERSION_MASK);
rtems_rfs_buffer_handle_close (fs, &handle);
return EIO;
}
fs->bad_blocks = read_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS);
5eee4: 8085 orl %d5,%d0
fs->blocks_per_block =
rtems_rfs_fs_block_size (fs) / sizeof (rtems_rfs_inode_block);
fs->block_map_singly_blocks =
fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
fs->block_map_doubly_blocks =
5eee6: 41f0 8c00 lea %a0@(00000000,%a0:l:4),%a0
fs->inodes = fs->group_count * fs->group_inodes;
fs->inodes_per_block = fs->block_size / RTEMS_RFS_INODE_SIZE;
if (fs->group_blocks >
rtems_rfs_bitmap_numof_bits (rtems_rfs_fs_block_size (fs)))
5eeea: e78e lsll #3,%d6
read_sb (RTEMS_RFS_SB_OFFSET_VERSION), RTEMS_RFS_VERSION_MASK);
rtems_rfs_buffer_handle_close (fs, &handle);
return EIO;
}
fs->bad_blocks = read_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS);
5eeec: 8081 orl %d1,%d0
fs->max_name_length = read_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH);
5eeee: 4281 clrl %d1
read_sb (RTEMS_RFS_SB_OFFSET_VERSION), RTEMS_RFS_VERSION_MASK);
rtems_rfs_buffer_handle_close (fs, &handle);
return EIO;
}
fs->bad_blocks = read_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS);
5eef0: 2b40 0014 movel %d0,%a5@(20)
fs->max_name_length = read_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH);
5eef4: 4280 clrl %d0 5eef6: 102b 0014 moveb %a3@(20),%d0 5eefa: 142b 0015 moveb %a3@(21),%d2 5eefe: 1a2b 0017 moveb %a3@(23),%d5 5ef02: 122b 0016 moveb %a3@(22),%d1 5ef06: efa8 lsll %d7,%d0 5ef08: 4842 swap %d2 5ef0a: 4242 clrw %d2 5ef0c: e189 lsll #8,%d1 5ef0e: 8082 orl %d2,%d0
fs->group_count = read_sb (RTEMS_RFS_SB_OFFSET_GROUPS);
5ef10: 4282 clrl %d2
rtems_rfs_buffer_handle_close (fs, &handle);
return EIO;
}
fs->bad_blocks = read_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS);
fs->max_name_length = read_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH);
5ef12: 8085 orl %d5,%d0 5ef14: 8081 orl %d1,%d0
fs->group_count = read_sb (RTEMS_RFS_SB_OFFSET_GROUPS);
5ef16: 4281 clrl %d1
rtems_rfs_buffer_handle_close (fs, &handle);
return EIO;
}
fs->bad_blocks = read_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS);
fs->max_name_length = read_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH);
5ef18: 2b40 0018 movel %d0,%a5@(24)
fs->group_count = read_sb (RTEMS_RFS_SB_OFFSET_GROUPS);
5ef1c: 142b 0018 moveb %a3@(24),%d2 5ef20: 122b 0019 moveb %a3@(25),%d1 5ef24: 4280 clrl %d0 5ef26: 1a2b 001b moveb %a3@(27),%d5 5ef2a: 102b 001a moveb %a3@(26),%d0 5ef2e: efaa lsll %d7,%d2 5ef30: 4841 swap %d1 5ef32: 4241 clrw %d1 5ef34: e188 lsll #8,%d0
fs->group_blocks = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS);
5ef36: 4287 clrl %d7
return EIO;
}
fs->bad_blocks = read_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS);
fs->max_name_length = read_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH);
fs->group_count = read_sb (RTEMS_RFS_SB_OFFSET_GROUPS);
5ef38: 8481 orl %d1,%d2
fs->group_blocks = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS);
5ef3a: 7218 moveq #24,%d1
return EIO;
}
fs->bad_blocks = read_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS);
fs->max_name_length = read_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH);
fs->group_count = read_sb (RTEMS_RFS_SB_OFFSET_GROUPS);
5ef3c: 8485 orl %d5,%d2 5ef3e: 8480 orl %d0,%d2
fs->group_blocks = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS);
5ef40: 4280 clrl %d0
return EIO;
}
fs->bad_blocks = read_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS);
fs->max_name_length = read_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH);
fs->group_count = read_sb (RTEMS_RFS_SB_OFFSET_GROUPS);
5ef42: 2b42 0020 movel %d2,%a5@(32)
fs->group_blocks = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS);
5ef46: 102b 001c moveb %a3@(28),%d0 5ef4a: 1a2b 001d moveb %a3@(29),%d5 5ef4e: 1e2b 001f moveb %a3@(31),%d7 5ef52: e3a8 lsll %d1,%d0 5ef54: 4845 swap %d5 5ef56: 4245 clrw %d5 5ef58: 4281 clrl %d1 5ef5a: 122b 001e moveb %a3@(30),%d1 5ef5e: 8085 orl %d5,%d0 5ef60: e189 lsll #8,%d1
fs->group_inodes = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES);
5ef62: 4285 clrl %d5
}
fs->bad_blocks = read_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS);
fs->max_name_length = read_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH);
fs->group_count = read_sb (RTEMS_RFS_SB_OFFSET_GROUPS);
fs->group_blocks = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS);
5ef64: 8087 orl %d7,%d0 5ef66: 8081 orl %d1,%d0
fs->group_inodes = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES);
5ef68: 4281 clrl %d1
}
fs->bad_blocks = read_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS);
fs->max_name_length = read_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH);
fs->group_count = read_sb (RTEMS_RFS_SB_OFFSET_GROUPS);
fs->group_blocks = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS);
5ef6a: 2b40 0024 movel %d0,%a5@(36)
fs->group_inodes = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES);
5ef6e: 1a2b 0023 moveb %a3@(35),%d5 5ef72: 122b 0020 moveb %a3@(32),%d1 5ef76: 1e2b 0021 moveb %a3@(33),%d7 5ef7a: 2245 moveal %d5,%a1 5ef7c: 7a18 moveq #24,%d5 5ef7e: 4847 swap %d7 5ef80: 4247 clrw %d7 5ef82: eba9 lsll %d5,%d1 5ef84: 4285 clrl %d5 5ef86: 1a2b 0022 moveb %a3@(34),%d5 5ef8a: 8287 orl %d7,%d1 5ef8c: 2e09 movel %a1,%d7
fs->blocks_per_block =
rtems_rfs_fs_block_size (fs) / sizeof (rtems_rfs_inode_block);
fs->block_map_singly_blocks =
5ef8e: 2243 moveal %d3,%a1
fs->bad_blocks = read_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS);
fs->max_name_length = read_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH);
fs->group_count = read_sb (RTEMS_RFS_SB_OFFSET_GROUPS);
fs->group_blocks = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS);
fs->group_inodes = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES);
5ef90: e18d lsll #8,%d5 5ef92: 8287 orl %d7,%d1
fs->blocks_per_block =
rtems_rfs_fs_block_size (fs) / sizeof (rtems_rfs_inode_block);
fs->block_map_singly_blocks =
5ef94: 43f1 3c00 lea %a1@(00000000,%d3:l:4),%a1
fs->max_name_length = read_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH);
fs->group_count = read_sb (RTEMS_RFS_SB_OFFSET_GROUPS);
fs->group_blocks = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS);
fs->group_inodes = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES);
fs->blocks_per_block =
5ef98: 2b43 0030 movel %d3,%a5@(48)
fs->block_map_doubly_blocks =
fs->blocks_per_block * fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
fs->inodes = fs->group_count * fs->group_inodes;
fs->inodes_per_block = fs->block_size / RTEMS_RFS_INODE_SIZE;
5ef9c: 7638 moveq #56,%d3
fs->bad_blocks = read_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS);
fs->max_name_length = read_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH);
fs->group_count = read_sb (RTEMS_RFS_SB_OFFSET_GROUPS);
fs->group_blocks = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS);
fs->group_inodes = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES);
5ef9e: 8285 orl %d5,%d1
fs->blocks_per_block =
rtems_rfs_fs_block_size (fs) / sizeof (rtems_rfs_inode_block);
fs->block_map_singly_blocks =
5efa0: 2b49 0034 movel %a1,%a5@(52)
fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
fs->block_map_doubly_blocks =
fs->blocks_per_block * fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
fs->inodes = fs->group_count * fs->group_inodes;
5efa4: 4c01 2800 mulsl %d1,%d2
fs->blocks_per_block =
rtems_rfs_fs_block_size (fs) / sizeof (rtems_rfs_inode_block);
fs->block_map_singly_blocks =
fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
fs->block_map_doubly_blocks =
5efa8: 2b48 0038 movel %a0,%a5@(56)
fs->blocks_per_block * fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
fs->inodes = fs->group_count * fs->group_inodes;
5efac: 2b42 0010 movel %d2,%a5@(16)
fs->inodes_per_block = fs->block_size / RTEMS_RFS_INODE_SIZE;
5efb0: 4c43 4004 remul %d3,%d4,%d4
fs->bad_blocks = read_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS);
fs->max_name_length = read_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH);
fs->group_count = read_sb (RTEMS_RFS_SB_OFFSET_GROUPS);
fs->group_blocks = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS);
fs->group_inodes = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES);
5efb4: 2b41 0028 movel %d1,%a5@(40)
fs->block_map_doubly_blocks =
fs->blocks_per_block * fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
fs->inodes = fs->group_count * fs->group_inodes;
fs->inodes_per_block = fs->block_size / RTEMS_RFS_INODE_SIZE;
5efb8: 2b44 002c movel %d4,%a5@(44)
if (fs->group_blocks >
5efbc: bc80 cmpl %d0,%d6
5efbe: 6432 bccs 5eff2 <rtems_rfs_fs_open+0x53e> <== ALWAYS TAKEN
5efc0: 486e fff6 pea %fp@(-10) <== NOT EXECUTED
handle->dirty = false;
5efc4: 4205 clrb %d5 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
5efc6: 2f0d movel %a5,%sp@- <== NOT EXECUTED 5efc8: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
rtems_rfs_bitmap_numof_bits (rtems_rfs_fs_block_size (fs)))
{
rtems_rfs_buffer_handle_close (fs, &handle);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
5efce: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
handle->dirty = false; handle->bnum = 0;
5efd2: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
handle->dirty = false;
5efd6: 1d45 fff6 moveb %d5,%fp@(-10) <== NOT EXECUTED 5efda: 42a7 clrl %sp@- <== NOT EXECUTED
handle->bnum = 0; handle->buffer = NULL;
5efdc: 42ae fffc clrl %fp@(-4) <== NOT EXECUTED 5efe0: 4e94 jsr %a4@ <== NOT EXECUTED 5efe2: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5efe6: 4a00 tstb %d0 <== NOT EXECUTED 5efe8: 6600 00ca bnew 5f0b4 <rtems_rfs_fs_open+0x600> <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: groups blocks larger than block bits\n");
return EIO;
5efec: 7405 moveq #5,%d2 <== NOT EXECUTED 5efee: 6000 fbd0 braw 5ebc0 <rtems_rfs_fs_open+0x10c> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
5eff2: 486e fff6 pea %fp@(-10) 5eff6: 2c3c 0005 bbc0 movel #375744,%d6 5effc: 2046 moveal %d6,%a0 5effe: 2f0d movel %a5,%sp@- 5f000: 4e90 jsr %a0@
rtems_rfs_buffer_handle_close (fs, &handle);
/*
* Change the block size to the value in the superblock.
*/
rc = rtems_rfs_buffer_setblksize (fs, rtems_rfs_fs_block_size (fs));
5f002: 2f2d 0008 movel %a5@(8),%sp@-
handle->dirty = false;
5f006: 4200 clrb %d0 5f008: 2f0d movel %a5,%sp@- 5f00a: 1d40 fff6 moveb %d0,%fp@(-10)
handle->bnum = 0;
5f00e: 42ae fff8 clrl %fp@(-8)
handle->buffer = NULL;
5f012: 42ae fffc clrl %fp@(-4) 5f016: 4eb9 0005 c2ca jsr 5c2ca <rtems_rfs_buffer_setblksize>
if (rc > 0)
5f01c: 4fef 0010 lea %sp@(16),%sp
rtems_rfs_buffer_handle_close (fs, &handle);
/*
* Change the block size to the value in the superblock.
*/
rc = rtems_rfs_buffer_setblksize (fs, rtems_rfs_fs_block_size (fs));
5f020: 2400 movel %d0,%d2
if (rc > 0)
5f022: 6f00 00a4 blew 5f0c8 <rtems_rfs_fs_open+0x614>
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
5f026: 486e fff6 pea %fp@(-10) <== NOT EXECUTED 5f02a: 2046 moveal %d6,%a0 <== NOT EXECUTED 5f02c: 2f0d movel %a5,%sp@- <== NOT EXECUTED 5f02e: 4e90 jsr %a0@ <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &handle);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
5f030: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
handle->dirty = false;
5f034: 4200 clrb %d0 <== NOT EXECUTED 5f036: 42a7 clrl %sp@- <== NOT EXECUTED 5f038: 1d40 fff6 moveb %d0,%fp@(-10) <== NOT EXECUTED
handle->bnum = 0;
5f03c: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED
handle->buffer = NULL;
5f040: 42ae fffc clrl %fp@(-4) <== NOT EXECUTED 5f044: 4e94 jsr %a4@ <== NOT EXECUTED 5f046: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5f04a: 4a00 tstb %d0 <== NOT EXECUTED 5f04c: 6700 fb72 beqw 5ebc0 <rtems_rfs_fs_open+0x10c> <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: invalid superblock block size%d: %s\n",
5f050: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5f052: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED 5f058: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5f05a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5f05c: 4879 0007 46ca pea 746ca <CSWTCH.1+0x10ee> <== NOT EXECUTED 5f062: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5f068: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5f06c: 6000 fb52 braw 5ebc0 <rtems_rfs_fs_open+0x10c> <== NOT EXECUTED
printf ("rtems-rfs: open: %s\n", name);
*fs = malloc (sizeof (rtems_rfs_file_system));
if (!*fs)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
5f070: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 5f074: 42a7 clrl %sp@- <== NOT EXECUTED 5f076: 4e94 jsr %a4@ <== NOT EXECUTED 5f078: 508f addql #8,%sp <== NOT EXECUTED 5f07a: 4a00 tstb %d0 <== NOT EXECUTED 5f07c: 6618 bnes 5f096 <rtems_rfs_fs_open+0x5e2> <== NOT EXECUTED
printf ("rtems-rfs: open: no memory for file system data\n");
errno = ENOMEM;
5f07e: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 5f084: 740c moveq #12,%d2 <== NOT EXECUTED 5f086: 2040 moveal %d0,%a0 <== NOT EXECUTED
return -1;
5f088: 70ff moveq #-1,%d0 <== NOT EXECUTED
*fs = malloc (sizeof (rtems_rfs_file_system));
if (!*fs)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: open: no memory for file system data\n");
errno = ENOMEM;
5f08a: 2082 movel %d2,%a0@ <== NOT EXECUTED
return -1;
}
errno = 0;
return 0;
}
5f08c: 4cee 3cfc ff98 moveml %fp@(-104),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5f092: 4e5e unlk %fp <== NOT EXECUTED 5f094: 4e75 rts <== NOT EXECUTED
*fs = malloc (sizeof (rtems_rfs_file_system));
if (!*fs)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: open: no memory for file system data\n");
5f096: 4879 0007 453c pea 7453c <CSWTCH.1+0xf60> <== NOT EXECUTED
errno = ENOMEM;
5f09c: 740c moveq #12,%d2 <== NOT EXECUTED
*fs = malloc (sizeof (rtems_rfs_file_system));
if (!*fs)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: open: no memory for file system data\n");
5f09e: 4eb9 0006 30ce jsr 630ce <puts> <== NOT EXECUTED 5f0a4: 588f addql #4,%sp <== NOT EXECUTED
errno = ENOMEM;
5f0a6: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 5f0ac: 2040 moveal %d0,%a0 <== NOT EXECUTED
return -1;
5f0ae: 70ff moveq #-1,%d0 <== NOT EXECUTED
*fs = malloc (sizeof (rtems_rfs_file_system));
if (!*fs)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: open: no memory for file system data\n");
errno = ENOMEM;
5f0b0: 2082 movel %d2,%a0@ <== NOT EXECUTED 5f0b2: 60d8 bras 5f08c <rtems_rfs_fs_open+0x5d8> <== NOT EXECUTED
if (fs->group_blocks >
rtems_rfs_bitmap_numof_bits (rtems_rfs_fs_block_size (fs)))
{
rtems_rfs_buffer_handle_close (fs, &handle);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: read-superblock: groups blocks larger than block bits\n");
5f0b4: 4879 0007 4689 pea 74689 <CSWTCH.1+0x10ad> <== NOT EXECUTED
return EIO;
5f0ba: 7405 moveq #5,%d2 <== NOT EXECUTED
if (fs->group_blocks >
rtems_rfs_bitmap_numof_bits (rtems_rfs_fs_block_size (fs)))
{
rtems_rfs_buffer_handle_close (fs, &handle);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: read-superblock: groups blocks larger than block bits\n");
5f0bc: 4eb9 0006 30ce jsr 630ce <puts> <== NOT EXECUTED 5f0c2: 588f addql #4,%sp <== NOT EXECUTED 5f0c4: 6000 fafa braw 5ebc0 <rtems_rfs_fs_open+0x10c> <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: invalid superblock block size%d: %s\n",
rc, strerror (rc));
return rc;
}
fs->groups = calloc (fs->group_count, sizeof (rtems_rfs_group));
5f0c8: 242d 0020 movel %a5@(32),%d2 5f0cc: 4878 004c pea 4c <DBL_MANT_DIG+0x17> 5f0d0: 2f02 movel %d2,%sp@- 5f0d2: 4eb9 0004 6090 jsr 46090 <calloc>
if (!fs->groups)
5f0d8: 508f addql #8,%sp
printf ("rtems-rfs: read-superblock: invalid superblock block size%d: %s\n",
rc, strerror (rc));
return rc;
}
fs->groups = calloc (fs->group_count, sizeof (rtems_rfs_group));
5f0da: 2040 moveal %d0,%a0 5f0dc: 2b40 001c movel %d0,%a5@(28)
if (!fs->groups)
5f0e0: 6700 0238 beqw 5f31a <rtems_rfs_fs_open+0x866>
/* * Perform each phase of group initialisation at the same time. This way we * know how far the initialisation has gone if an error occurs and we need to * close everything. */ for (group = 0; group < fs->group_count; group++)
5f0e4: 4a82 tstl %d2
5f0e6: 6f4a bles 5f132 <rtems_rfs_fs_open+0x67e> <== NEVER TAKEN
if (!fs->groups)
{
rtems_rfs_buffer_handle_close (fs, &handle);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: read-superblock: no memory for group table\n");
5f0e8: 222d 0024 movel %a5@(36),%d1
/* * Perform each phase of group initialisation at the same time. This way we * know how far the initialisation has gone if an error occurs and we need to * close everything. */ for (group = 0; group < fs->group_count; group++)
5f0ec: 4284 clrl %d4 5f0ee: 4283 clrl %d3 5f0f0: 47f9 0004 fa64 lea 4fa64 <rtems_rfs_group_open>,%a3
{
rc = rtems_rfs_group_open (fs,
5f0f6: 4870 4800 pea %a0@(00000000,%d4:l)
rtems_rfs_fs_block (fs, group, 0),
5f0fa: 2003 movel %d3,%d0 5f0fc: 4c01 0800 mulsl %d1,%d0
/* * Perform each phase of group initialisation at the same time. This way we * know how far the initialisation has gone if an error occurs and we need to * close everything. */ for (group = 0; group < fs->group_count; group++)
5f100: 0684 0000 004c addil #76,%d4
{
rc = rtems_rfs_group_open (fs,
5f106: 2f2d 0028 movel %a5@(40),%sp@- 5f10a: 2040 moveal %d0,%a0 5f10c: 2f01 movel %d1,%sp@- 5f10e: 4868 0001 pea %a0@(1) 5f112: 2f0d movel %a5,%sp@- 5f114: 4e93 jsr %a3@
rtems_rfs_fs_block (fs, group, 0),
fs->group_blocks,
fs->group_inodes,
&fs->groups[group]);
if (rc > 0)
5f116: 4fef 0014 lea %sp@(20),%sp 5f11a: 4a80 tstl %d0 5f11c: 6e00 0188 bgtw 5f2a6 <rtems_rfs_fs_open+0x7f2>
/* * Perform each phase of group initialisation at the same time. This way we * know how far the initialisation has gone if an error occurs and we need to * close everything. */ for (group = 0; group < fs->group_count; group++)
5f120: 5283 addql #1,%d3 5f122: b6ad 0020 cmpl %a5@(32),%d3
5f126: 6c0a bges 5f132 <rtems_rfs_fs_open+0x67e> <== ALWAYS TAKEN
5f128: 206d 001c moveal %a5@(28),%a0 <== NOT EXECUTED 5f12c: 222d 0024 movel %a5@(36),%d1 <== NOT EXECUTED 5f130: 60c4 bras 5f0f6 <rtems_rfs_fs_open+0x642> <== NOT EXECUTED
rc, strerror (rc));
errno = rc;
return -1;
}
rc = rtems_rfs_inode_open (*fs, RTEMS_RFS_ROOT_INO, &inode, true);
5f132: 4878 0001 pea 1 <ADD> 5f136: 47ee ffd0 lea %fp@(-48),%a3 5f13a: 2f0b movel %a3,%sp@- 5f13c: 4878 0001 pea 1 <ADD> 5f140: 2f12 movel %a2@,%sp@- 5f142: 4eb9 0005 0300 jsr 50300 <rtems_rfs_inode_open>
if (rc > 0)
5f148: 4fef 0010 lea %sp@(16),%sp
rc, strerror (rc));
errno = rc;
return -1;
}
rc = rtems_rfs_inode_open (*fs, RTEMS_RFS_ROOT_INO, &inode, true);
5f14c: 2400 movel %d0,%d2
if (rc > 0)
5f14e: 6e00 0108 bgtw 5f258 <rtems_rfs_fs_open+0x7a4>
rc, strerror (rc));
errno = rc;
return -1;
}
if (((*fs)->flags & RTEMS_RFS_FS_FORCE_OPEN) == 0)
5f152: 2052 moveal %a2@,%a0 5f154: 7004 moveq #4,%d0 5f156: c090 andl %a0@,%d0
5f158: 662a bnes 5f184 <rtems_rfs_fs_open+0x6d0>
{
mode = rtems_rfs_inode_get_mode (&inode);
5f15a: 226b 000c moveal %a3@(12),%a1
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
5f15e: 4280 clrl %d0 5f160: 1029 0002 moveb %a1@(2),%d0 5f164: 4281 clrl %d1 5f166: 1229 0003 moveb %a1@(3),%d1 5f16a: e188 lsll #8,%d0
if ((mode == 0xffff) || !RTEMS_RFS_S_ISDIR (mode))
5f16c: 8081 orl %d1,%d0 5f16e: 0c80 0000 ffff cmpil #65535,%d0
5f174: 6734 beqs 5f1aa <rtems_rfs_fs_open+0x6f6> <== NEVER TAKEN
5f176: 0280 0000 f000 andil #61440,%d0 5f17c: 0c80 0000 4000 cmpil #16384,%d0
5f182: 6626 bnes 5f1aa <rtems_rfs_fs_open+0x6f6> <== NEVER TAKEN
errno = EIO;
return -1;
}
}
rc = rtems_rfs_inode_close (*fs, &inode);
5f184: 2f0b movel %a3,%sp@- 5f186: 2f08 movel %a0,%sp@- 5f188: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close>
if (rc > 0)
5f18e: 508f addql #8,%sp
errno = EIO;
return -1;
}
}
rc = rtems_rfs_inode_close (*fs, &inode);
5f190: 2400 movel %d0,%d2
if (rc > 0)
5f192: 6e76 bgts 5f20a <rtems_rfs_fs_open+0x756> <== NEVER TAKEN
printf ("rtems-rfs: open: closing root inode: %d: %s\n", rc, strerror (rc));
errno = rc;
return -1;
}
errno = 0;
5f194: 4eb9 0006 2548 jsr 62548 <__errno> 5f19a: 2040 moveal %d0,%a0
return 0;
5f19c: 4280 clrl %d0
}
5f19e: 4cee 3cfc ff98 moveml %fp@(-104),%d2-%d7/%a2-%a5
printf ("rtems-rfs: open: closing root inode: %d: %s\n", rc, strerror (rc));
errno = rc;
return -1;
}
errno = 0;
5f1a4: 4290 clrl %a0@
return 0; }
5f1a6: 4e5e unlk %fp 5f1a8: 4e75 rts
{
mode = rtems_rfs_inode_get_mode (&inode);
if ((mode == 0xffff) || !RTEMS_RFS_S_ISDIR (mode))
{
rtems_rfs_inode_close (*fs, &inode);
5f1aa: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5f1ac: 2f08 movel %a0,%sp@- <== NOT EXECUTED 5f1ae: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_buffer_close (*fs);
5f1b4: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 5f1b6: 4eb9 0005 c3d0 jsr 5c3d0 <rtems_rfs_buffer_close> <== NOT EXECUTED
free (*fs);
5f1bc: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 5f1be: 4eb9 0004 680c jsr 4680c <free> <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
5f1c4: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 5f1c8: 42a7 clrl %sp@- <== NOT EXECUTED 5f1ca: 4e94 jsr %a4@ <== NOT EXECUTED 5f1cc: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 5f1d0: 4a00 tstb %d0 <== NOT EXECUTED 5f1d2: 6618 bnes 5f1ec <rtems_rfs_fs_open+0x738> <== NOT EXECUTED
printf ("rtems-rfs: open: invalid root inode mode\n");
errno = EIO;
5f1d4: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 5f1da: 7205 moveq #5,%d1 <== NOT EXECUTED 5f1dc: 2040 moveal %d0,%a0 <== NOT EXECUTED
return -1;
5f1de: 70ff moveq #-1,%d0 <== NOT EXECUTED
rtems_rfs_inode_close (*fs, &inode);
rtems_rfs_buffer_close (*fs);
free (*fs);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: open: invalid root inode mode\n");
errno = EIO;
5f1e0: 2081 movel %d1,%a0@ <== NOT EXECUTED
return -1;
}
errno = 0;
return 0;
}
5f1e2: 4cee 3cfc ff98 moveml %fp@(-104),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5f1e8: 4e5e unlk %fp <== NOT EXECUTED 5f1ea: 4e75 rts <== NOT EXECUTED
{
rtems_rfs_inode_close (*fs, &inode);
rtems_rfs_buffer_close (*fs);
free (*fs);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: open: invalid root inode mode\n");
5f1ec: 4879 0007 47d8 pea 747d8 <CSWTCH.1+0x11fc> <== NOT EXECUTED 5f1f2: 4eb9 0006 30ce jsr 630ce <puts> <== NOT EXECUTED 5f1f8: 588f addql #4,%sp <== NOT EXECUTED
errno = EIO;
5f1fa: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 5f200: 7205 moveq #5,%d1 <== NOT EXECUTED 5f202: 2040 moveal %d0,%a0 <== NOT EXECUTED
return -1;
5f204: 70ff moveq #-1,%d0 <== NOT EXECUTED
rtems_rfs_inode_close (*fs, &inode);
rtems_rfs_buffer_close (*fs);
free (*fs);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: open: invalid root inode mode\n");
errno = EIO;
5f206: 2081 movel %d1,%a0@ <== NOT EXECUTED 5f208: 60d8 bras 5f1e2 <rtems_rfs_fs_open+0x72e> <== NOT EXECUTED
}
rc = rtems_rfs_inode_close (*fs, &inode);
if (rc > 0)
{
rtems_rfs_buffer_close (*fs);
5f20a: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 5f20c: 4eb9 0005 c3d0 jsr 5c3d0 <rtems_rfs_buffer_close> <== NOT EXECUTED
free (*fs);
5f212: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 5f214: 4eb9 0004 680c jsr 4680c <free> <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
5f21a: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 5f21e: 42a7 clrl %sp@- <== NOT EXECUTED 5f220: 4e94 jsr %a4@ <== NOT EXECUTED 5f222: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5f226: 4a00 tstb %d0 <== NOT EXECUTED 5f228: 6700 f9b8 beqw 5ebe2 <rtems_rfs_fs_open+0x12e> <== NOT EXECUTED
printf ("rtems-rfs: open: closing root inode: %d: %s\n", rc, strerror (rc));
5f22c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5f22e: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED 5f234: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5f236: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5f238: 4879 0007 4801 pea 74801 <CSWTCH.1+0x1225> <== NOT EXECUTED 5f23e: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5f244: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
errno = rc;
5f248: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 5f24e: 2040 moveal %d0,%a0 <== NOT EXECUTED
return -1;
5f250: 70ff moveq #-1,%d0 <== NOT EXECUTED
{
rtems_rfs_buffer_close (*fs);
free (*fs);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: open: closing root inode: %d: %s\n", rc, strerror (rc));
errno = rc;
5f252: 2082 movel %d2,%a0@ <== NOT EXECUTED 5f254: 6000 f998 braw 5ebee <rtems_rfs_fs_open+0x13a> <== NOT EXECUTED
}
rc = rtems_rfs_inode_open (*fs, RTEMS_RFS_ROOT_INO, &inode, true);
if (rc > 0)
{
rtems_rfs_buffer_close (*fs);
5f258: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 5f25a: 4eb9 0005 c3d0 jsr 5c3d0 <rtems_rfs_buffer_close> <== NOT EXECUTED
free (*fs);
5f260: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 5f262: 4eb9 0004 680c jsr 4680c <free> <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
5f268: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 5f26c: 42a7 clrl %sp@- <== NOT EXECUTED 5f26e: 4e94 jsr %a4@ <== NOT EXECUTED 5f270: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5f274: 4a00 tstb %d0 <== NOT EXECUTED 5f276: 6700 f96a beqw 5ebe2 <rtems_rfs_fs_open+0x12e> <== NOT EXECUTED
printf ("rtems-rfs: open: reading root inode: %d: %s\n",
5f27a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5f27c: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED 5f282: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5f284: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5f286: 4879 0007 47ab pea 747ab <CSWTCH.1+0x11cf> <== NOT EXECUTED 5f28c: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5f292: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
{
rtems_rfs_buffer_close (*fs);
free (*fs);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: open: closing root inode: %d: %s\n", rc, strerror (rc));
errno = rc;
5f296: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 5f29c: 2040 moveal %d0,%a0 <== NOT EXECUTED
return -1;
5f29e: 70ff moveq #-1,%d0 <== NOT EXECUTED
{
rtems_rfs_buffer_close (*fs);
free (*fs);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: open: closing root inode: %d: %s\n", rc, strerror (rc));
errno = rc;
5f2a0: 2082 movel %d2,%a0@ <== NOT EXECUTED 5f2a2: 6000 f94a braw 5ebee <rtems_rfs_fs_open+0x13a> <== NOT EXECUTED 5f2a6: 2400 movel %d0,%d2 <== NOT EXECUTED
fs->group_inodes,
&fs->groups[group]);
if (rc > 0)
{
int g;
for (g = 0; g < group; g++)
5f2a8: 4a83 tstl %d3 <== NOT EXECUTED 5f2aa: 6724 beqs 5f2d0 <rtems_rfs_fs_open+0x81c> <== NOT EXECUTED 5f2ac: 4285 clrl %d5 <== NOT EXECUTED 5f2ae: 4284 clrl %d4 <== NOT EXECUTED 5f2b0: 47f9 0004 fcee lea 4fcee <rtems_rfs_group_close>,%a3 <== NOT EXECUTED
rtems_rfs_group_close (fs, &fs->groups[g]);
5f2b6: 226d 001c moveal %a5@(28),%a1 <== NOT EXECUTED 5f2ba: d3c5 addal %d5,%a1 <== NOT EXECUTED
fs->group_inodes,
&fs->groups[group]);
if (rc > 0)
{
int g;
for (g = 0; g < group; g++)
5f2bc: 5284 addql #1,%d4 <== NOT EXECUTED 5f2be: 0685 0000 004c addil #76,%d5 <== NOT EXECUTED
rtems_rfs_group_close (fs, &fs->groups[g]);
5f2c4: 2f09 movel %a1,%sp@- <== NOT EXECUTED 5f2c6: 2f0d movel %a5,%sp@- <== NOT EXECUTED 5f2c8: 4e93 jsr %a3@ <== NOT EXECUTED
fs->group_inodes,
&fs->groups[group]);
if (rc > 0)
{
int g;
for (g = 0; g < group; g++)
5f2ca: 508f addql #8,%sp <== NOT EXECUTED 5f2cc: b684 cmpl %d4,%d3 <== NOT EXECUTED 5f2ce: 66e6 bnes 5f2b6 <rtems_rfs_fs_open+0x802> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
5f2d0: 486e fff6 pea %fp@(-10) <== NOT EXECUTED 5f2d4: 2046 moveal %d6,%a0 <== NOT EXECUTED 5f2d6: 2f0d movel %a5,%sp@- <== NOT EXECUTED 5f2d8: 4e90 jsr %a0@ <== NOT EXECUTED
rtems_rfs_group_close (fs, &fs->groups[g]);
rtems_rfs_buffer_handle_close (fs, &handle);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
5f2da: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
handle->dirty = false;
5f2de: 4200 clrb %d0 <== NOT EXECUTED 5f2e0: 42a7 clrl %sp@- <== NOT EXECUTED 5f2e2: 1d40 fff6 moveb %d0,%fp@(-10) <== NOT EXECUTED
handle->bnum = 0;
5f2e6: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED
handle->buffer = NULL;
5f2ea: 42ae fffc clrl %fp@(-4) <== NOT EXECUTED 5f2ee: 4e94 jsr %a4@ <== NOT EXECUTED 5f2f0: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5f2f4: 4a00 tstb %d0 <== NOT EXECUTED 5f2f6: 6700 f8c8 beqw 5ebc0 <rtems_rfs_fs_open+0x10c> <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: no memory for group table%d: %s\n",
5f2fa: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5f2fc: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED 5f302: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5f304: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5f306: 4879 0007 4741 pea 74741 <CSWTCH.1+0x1165> <== NOT EXECUTED 5f30c: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5f312: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5f316: 6000 f8a8 braw 5ebc0 <rtems_rfs_fs_open+0x10c> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
5f31a: 486e fff6 pea %fp@(-10) <== NOT EXECUTED 5f31e: 2046 moveal %d6,%a0 <== NOT EXECUTED 5f320: 2f0d movel %a5,%sp@- <== NOT EXECUTED 5f322: 4e90 jsr %a0@ <== NOT EXECUTED
fs->groups = calloc (fs->group_count, sizeof (rtems_rfs_group));
if (!fs->groups)
{
rtems_rfs_buffer_handle_close (fs, &handle);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
5f324: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
handle->dirty = false;
5f328: 4200 clrb %d0 <== NOT EXECUTED 5f32a: 42a7 clrl %sp@- <== NOT EXECUTED 5f32c: 1d40 fff6 moveb %d0,%fp@(-10) <== NOT EXECUTED
handle->bnum = 0;
5f330: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED
handle->buffer = NULL;
5f334: 42ae fffc clrl %fp@(-4) <== NOT EXECUTED 5f338: 4e94 jsr %a4@ <== NOT EXECUTED 5f33a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5f33e: 4a00 tstb %d0 <== NOT EXECUTED 5f340: 6606 bnes 5f348 <rtems_rfs_fs_open+0x894> <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: no memory for group table\n");
return ENOMEM;
5f342: 740c moveq #12,%d2 <== NOT EXECUTED 5f344: 6000 f87a braw 5ebc0 <rtems_rfs_fs_open+0x10c> <== NOT EXECUTED
if (!fs->groups)
{
rtems_rfs_buffer_handle_close (fs, &handle);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: read-superblock: no memory for group table\n");
5f348: 4879 0007 470b pea 7470b <CSWTCH.1+0x112f> <== NOT EXECUTED
return ENOMEM;
5f34e: 740c moveq #12,%d2 <== NOT EXECUTED
if (!fs->groups)
{
rtems_rfs_buffer_handle_close (fs, &handle);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: read-superblock: no memory for group table\n");
5f350: 4eb9 0006 30ce jsr 630ce <puts> <== NOT EXECUTED 5f356: 588f addql #4,%sp <== NOT EXECUTED 5f358: 6000 f866 braw 5ebc0 <rtems_rfs_fs_open+0x10c> <== NOT EXECUTED
0005ea50 <rtems_rfs_fs_size>:
#include <rtems/rfs/rtems-rfs-trace.h>
uint64_t
rtems_rfs_fs_size (rtems_rfs_file_system* fs)
{
uint64_t blocks = rtems_rfs_fs_blocks (fs);
5ea50: 91c8 subal %a0,%a0 <== NOT EXECUTED
uint64_t block_size = rtems_rfs_fs_block_size (fs);
5ea52: 4280 clrl %d0 <== NOT EXECUTED
#include <rtems/rfs/rtems-rfs-inode.h>
#include <rtems/rfs/rtems-rfs-trace.h>
uint64_t
rtems_rfs_fs_size (rtems_rfs_file_system* fs)
{
5ea54: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 5ea58: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5ea5a: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
uint64_t blocks = rtems_rfs_fs_blocks (fs);
5ea5e: 226a 0004 moveal %a2@(4),%a1 <== NOT EXECUTED
uint64_t block_size = rtems_rfs_fs_block_size (fs);
5ea62: 222a 0008 movel %a2@(8),%d1 <== NOT EXECUTED
return blocks * block_size;
5ea66: 2f09 movel %a1,%sp@- <== NOT EXECUTED 5ea68: 2f08 movel %a0,%sp@- <== NOT EXECUTED 5ea6a: 2f01 movel %d1,%sp@- <== NOT EXECUTED 5ea6c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5ea6e: 4eb9 0006 edf8 jsr 6edf8 <__muldi3> <== NOT EXECUTED
}
5ea74: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
uint64_t
rtems_rfs_fs_size (rtems_rfs_file_system* fs)
{
uint64_t blocks = rtems_rfs_fs_blocks (fs);
uint64_t block_size = rtems_rfs_fs_block_size (fs);
return blocks * block_size;
5ea78: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
}
5ea7c: 4e5e unlk %fp <== NOT EXECUTED
0004fde2 <rtems_rfs_group_bitmap_alloc>:
int
rtems_rfs_group_bitmap_alloc (rtems_rfs_file_system* fs,
rtems_rfs_bitmap_bit goal,
bool inode,
rtems_rfs_bitmap_bit* result)
{
4fde2: 4e56 ffcc linkw %fp,#-52 4fde6: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4fdea: 1e2e 0013 moveb %fp@(19),%d7 4fdee: 246e 0008 moveal %fp@(8),%a2 4fdf2: 2c2e 000c movel %fp@(12),%d6
rtems_rfs_bitmap_bit bit;
int offset;
bool updown;
int direction;
if (inode)
4fdf6: 4a07 tstb %d7 4fdf8: 6700 010e beqw 4ff08 <rtems_rfs_group_bitmap_alloc+0x126>
{
size = fs->group_inodes;
4fdfc: 202a 0028 movel %a2@(40),%d0
* We can start at any location and we move out from that point in each
* direction. The offset grows until we find a free bit or we hit an end.
*/
group = group_start + (direction * offset);
if (offset)
bit = direction > 0 ? 0 : size - 1;
4fe00: 2200 movel %d0,%d1 4fe02: 5381 subql #1,%d1
int direction;
if (inode)
{
size = fs->group_inodes;
goal -= RTEMS_RFS_ROOT_INO;
4fe04: 5386 subql #1,%d6
group_start = goal / size;
bit = (rtems_rfs_bitmap_bit) (goal % size);
offset = 0;
updown = true;
direction = 1;
4fe06: 7401 moveq #1,%d2
else
size = fs->group_blocks;
group_start = goal / size;
bit = (rtems_rfs_bitmap_bit) (goal % size);
offset = 0;
4fe08: 4284 clrl %d4
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
else
bitmap = &fs->groups[group].block_bitmap;
rc = rtems_rfs_bitmap_map_alloc (bitmap, bit, &allocated, &bit);
4fe0a: 4bf9 0005 a7b0 lea 5a7b0 <rtems_rfs_bitmap_map_alloc>,%a5
* We can start at any location and we move out from that point in each
* direction. The offset grows until we find a free bit or we hit an end.
*/
group = group_start + (direction * offset);
if (offset)
bit = direction > 0 ? 0 : size - 1;
4fe10: 2d41 fff4 movel %d1,%fp@(-12)
}
else
size = fs->group_blocks;
group_start = goal / size;
bit = (rtems_rfs_bitmap_bit) (goal % size);
4fe14: 4c40 6001 remul %d0,%d1,%d6 4fe18: 4c40 6006 remul %d0,%d6,%d6
*/
while (true)
{
rtems_rfs_bitmap_control* bitmap;
int group;
bool allocated = false;
4fe1c: 4200 clrb %d0
size = fs->group_blocks;
group_start = goal / size;
bit = (rtems_rfs_bitmap_bit) (goal % size);
offset = 0;
updown = true;
4fe1e: 7a01 moveq #1,%d5
}
else
size = fs->group_blocks;
group_start = goal / size;
bit = (rtems_rfs_bitmap_bit) (goal % size);
4fe20: 2d41 fffa movel %d1,%fp@(-6)
/*
* We can start at any location and we move out from that point in each
* direction. The offset grows until we find a free bit or we hit an end.
*/
group = group_start + (direction * offset);
4fe24: 2606 movel %d6,%d3
*/
while (true)
{
rtems_rfs_bitmap_control* bitmap;
int group;
bool allocated = false;
4fe26: 1d40 ffff moveb %d0,%fp@(-1)
/*
* If we are still looking up and down and if the group is out of range we
* have reached one end. Stopping looking up and down and just move in the
* one direction one group at a time.
*/
if ((group < 0) || (group >= fs->group_count))
4fe2a: 4a83 tstl %d3
4fe2c: 6d6e blts 4fe9c <rtems_rfs_group_bitmap_alloc+0xba><== NEVER TAKEN
4fe2e: b6aa 0020 cmpl %a2@(32),%d3
4fe32: 6c68 bges 4fe9c <rtems_rfs_group_bitmap_alloc+0xba>
direction = direction > 0 ? -1 : 1;
updown = false;
continue;
}
if (inode)
4fe34: 4a07 tstb %d7 4fe36: 6700 00aa beqw 4fee2 <rtems_rfs_group_bitmap_alloc+0x100>
bitmap = &fs->groups[group].inode_bitmap;
4fe3a: 704c moveq #76,%d0 4fe3c: 4c03 0800 mulsl %d3,%d0 4fe40: 266a 001c moveal %a2@(28),%a3 4fe44: d7c0 addal %d0,%a3 4fe46: 2840 moveal %d0,%a4 4fe48: 47eb 002a lea %a3@(42),%a3
else
bitmap = &fs->groups[group].block_bitmap;
rc = rtems_rfs_bitmap_map_alloc (bitmap, bit, &allocated, &bit);
4fe4c: 486e fffa pea %fp@(-6) 4fe50: 486e ffff pea %fp@(-1) 4fe54: 2f2e fffa movel %fp@(-6),%sp@- 4fe58: 2f0b movel %a3,%sp@- 4fe5a: 4e95 jsr %a5@
if (rc > 0)
4fe5c: 4fef 0010 lea %sp@(16),%sp 4fe60: 4a80 tstl %d0
4fe62: 6e74 bgts 4fed8 <rtems_rfs_group_bitmap_alloc+0xf6><== NEVER TAKEN
return rc;
if (rtems_rfs_fs_release_bitmaps (fs))
4fe64: 7001 moveq #1,%d0 4fe66: c092 andl %a2@,%d0 4fe68: 6700 00ce beqw 4ff38 <rtems_rfs_group_bitmap_alloc+0x156>
rtems_rfs_bitmap_release_buffer (fs, bitmap);
if (allocated)
4fe6c: 4a2e ffff tstb %fp@(-1) 4fe70: 6600 00f0 bnew 4ff62 <rtems_rfs_group_bitmap_alloc+0x180>
printf ("rtems-rfs: group-bitmap-alloc: %s allocated: %" PRId32 "\n",
inode ? "inode" : "block", *result);
return 0;
}
if (updown)
4fe74: 4a05 tstb %d5
4fe76: 670a beqs 4fe82 <rtems_rfs_group_bitmap_alloc+0xa0><== NEVER TAKEN
direction = direction > 0 ? -1 : 1;
4fe78: 7001 moveq #1,%d0 4fe7a: b082 cmpl %d2,%d0 4fe7c: 57c2 seq %d2 4fe7e: 49c2 extbl %d2 4fe80: 8480 orl %d0,%d2
offset++;
4fe82: 5284 addql #1,%d4
/*
* We can start at any location and we move out from that point in each
* direction. The offset grows until we find a free bit or we hit an end.
*/
group = group_start + (direction * offset);
4fe84: 2602 movel %d2,%d3 4fe86: 4c04 3800 mulsl %d4,%d3
if (offset)
bit = direction > 0 ? 0 : size - 1;
4fe8a: 7201 moveq #1,%d1
/*
* We can start at any location and we move out from that point in each
* direction. The offset grows until we find a free bit or we hit an end.
*/
group = group_start + (direction * offset);
4fe8c: d686 addl %d6,%d3
if (offset)
bit = direction > 0 ? 0 : size - 1;
4fe8e: b282 cmpl %d2,%d1
4fe90: 666c bnes 4fefe <rtems_rfs_group_bitmap_alloc+0x11c><== ALWAYS TAKEN
4fe92: 4280 clrl %d0 4fe94: 2d40 fffa movel %d0,%fp@(-6)
/*
* If we are still looking up and down and if the group is out of range we
* have reached one end. Stopping looking up and down and just move in the
* one direction one group at a time.
*/
if ((group < 0) || (group >= fs->group_count))
4fe98: 4a83 tstl %d3
4fe9a: 6c92 bges 4fe2e <rtems_rfs_group_bitmap_alloc+0x4c>
{
if (!updown)
4fe9c: 4a05 tstb %d5
4fe9e: 6722 beqs 4fec2 <rtems_rfs_group_bitmap_alloc+0xe0>
break;
direction = direction > 0 ? -1 : 1;
4fea0: 7001 moveq #1,%d0 4fea2: b082 cmpl %d2,%d0 4fea4: 57c2 seq %d2
*/
while (true)
{
rtems_rfs_bitmap_control* bitmap;
int group;
bool allocated = false;
4fea6: 4201 clrb %d1
*/
if ((group < 0) || (group >= fs->group_count))
{
if (!updown)
break;
direction = direction > 0 ? -1 : 1;
4fea8: 49c2 extbl %d2 4feaa: 8480 orl %d0,%d2
*/
while (true)
{
rtems_rfs_bitmap_control* bitmap;
int group;
bool allocated = false;
4feac: 1d41 ffff moveb %d1,%fp@(-1)
/*
* We can start at any location and we move out from that point in each
* direction. The offset grows until we find a free bit or we hit an end.
*/
group = group_start + (direction * offset);
4feb0: 2602 movel %d2,%d3 4feb2: 4c04 3800 mulsl %d4,%d3 4feb6: d686 addl %d6,%d3
if (offset)
4feb8: 4a84 tstl %d4
4feba: 663a bnes 4fef6 <rtems_rfs_group_bitmap_alloc+0x114><== ALWAYS TAKEN
4febc: 4205 clrb %d5 <== NOT EXECUTED 4febe: 6000 ff6a braw 4fe2a <rtems_rfs_group_bitmap_alloc+0x48><== NOT EXECUTED
direction = direction > 0 ? -1 : 1;
offset++;
}
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
4fec2: 2f3c 0002 0000 movel #131072,%sp@- 4fec8: 42a7 clrl %sp@- 4feca: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> 4fed0: 508f addql #8,%sp 4fed2: 4a00 tstb %d0
4fed4: 6672 bnes 4ff48 <rtems_rfs_group_bitmap_alloc+0x166><== NEVER TAKEN
printf ("rtems-rfs: group-bitmap-alloc: no blocks available\n");
return ENOSPC;
4fed6: 701c moveq #28,%d0
}
4fed8: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4fede: 4e5e unlk %fp 4fee0: 4e75 rts
}
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
else
bitmap = &fs->groups[group].block_bitmap;
4fee2: 724c moveq #76,%d1 4fee4: 4c03 1800 mulsl %d3,%d1 4fee8: 266a 001c moveal %a2@(28),%a3 4feec: d7c1 addal %d1,%a3 4feee: 2841 moveal %d1,%a4 4fef0: 508b addql #8,%a3 4fef2: 6000 ff58 braw 4fe4c <rtems_rfs_group_bitmap_alloc+0x6a>
* We can start at any location and we move out from that point in each
* direction. The offset grows until we find a free bit or we hit an end.
*/
group = group_start + (direction * offset);
if (offset)
bit = direction > 0 ? 0 : size - 1;
4fef6: 7201 moveq #1,%d1
/*
* We can start at any location and we move out from that point in each
* direction. The offset grows until we find a free bit or we hit an end.
*/
group = group_start + (direction * offset);
if (offset)
4fef8: 4205 clrb %d5
bit = direction > 0 ? 0 : size - 1;
4fefa: b282 cmpl %d2,%d1
4fefc: 6794 beqs 4fe92 <rtems_rfs_group_bitmap_alloc+0xb0><== ALWAYS TAKEN
4fefe: 202e fff4 movel %fp@(-12),%d0 4ff02: 2d40 fffa movel %d0,%fp@(-6) 4ff06: 6090 bras 4fe98 <rtems_rfs_group_bitmap_alloc+0xb6>
{
size = fs->group_inodes;
goal -= RTEMS_RFS_ROOT_INO;
}
else
size = fs->group_blocks;
4ff08: 202a 0024 movel %a2@(36),%d0
* We can start at any location and we move out from that point in each
* direction. The offset grows until we find a free bit or we hit an end.
*/
group = group_start + (direction * offset);
if (offset)
bit = direction > 0 ? 0 : size - 1;
4ff0c: 2200 movel %d0,%d1 4ff0e: 5381 subql #1,%d1
group_start = goal / size;
bit = (rtems_rfs_bitmap_bit) (goal % size);
offset = 0;
updown = true;
direction = 1;
4ff10: 7401 moveq #1,%d2
else
size = fs->group_blocks;
group_start = goal / size;
bit = (rtems_rfs_bitmap_bit) (goal % size);
offset = 0;
4ff12: 4284 clrl %d4
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
else
bitmap = &fs->groups[group].block_bitmap;
rc = rtems_rfs_bitmap_map_alloc (bitmap, bit, &allocated, &bit);
4ff14: 4bf9 0005 a7b0 lea 5a7b0 <rtems_rfs_bitmap_map_alloc>,%a5
* We can start at any location and we move out from that point in each
* direction. The offset grows until we find a free bit or we hit an end.
*/
group = group_start + (direction * offset);
if (offset)
bit = direction > 0 ? 0 : size - 1;
4ff1a: 2d41 fff4 movel %d1,%fp@(-12)
}
else
size = fs->group_blocks;
group_start = goal / size;
bit = (rtems_rfs_bitmap_bit) (goal % size);
4ff1e: 4c40 6001 remul %d0,%d1,%d6 4ff22: 4c40 6006 remul %d0,%d6,%d6
*/
while (true)
{
rtems_rfs_bitmap_control* bitmap;
int group;
bool allocated = false;
4ff26: 4200 clrb %d0
size = fs->group_blocks;
group_start = goal / size;
bit = (rtems_rfs_bitmap_bit) (goal % size);
offset = 0;
updown = true;
4ff28: 7a01 moveq #1,%d5
}
else
size = fs->group_blocks;
group_start = goal / size;
bit = (rtems_rfs_bitmap_bit) (goal % size);
4ff2a: 2d41 fffa movel %d1,%fp@(-6)
/*
* We can start at any location and we move out from that point in each
* direction. The offset grows until we find a free bit or we hit an end.
*/
group = group_start + (direction * offset);
4ff2e: 2606 movel %d6,%d3
*/
while (true)
{
rtems_rfs_bitmap_control* bitmap;
int group;
bool allocated = false;
4ff30: 1d40 ffff moveb %d0,%fp@(-1) 4ff34: 6000 fef4 braw 4fe2a <rtems_rfs_group_bitmap_alloc+0x48>
rc = rtems_rfs_bitmap_map_alloc (bitmap, bit, &allocated, &bit);
if (rc > 0)
return rc;
if (rtems_rfs_fs_release_bitmaps (fs))
rtems_rfs_bitmap_release_buffer (fs, bitmap);
4ff38: 2f13 movel %a3@,%sp@- 4ff3a: 2f0a movel %a2,%sp@- 4ff3c: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release> 4ff42: 508f addql #8,%sp 4ff44: 6000 ff26 braw 4fe6c <rtems_rfs_group_bitmap_alloc+0x8a>
offset++;
}
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
printf ("rtems-rfs: group-bitmap-alloc: no blocks available\n");
4ff48: 4879 0007 2d20 pea 72d20 <ramdisk_ops+0x942> <== NOT EXECUTED 4ff4e: 4eb9 0006 30ce jsr 630ce <puts> <== NOT EXECUTED 4ff54: 588f addql #4,%sp <== NOT EXECUTED
return ENOSPC;
4ff56: 701c moveq #28,%d0 <== NOT EXECUTED
}
4ff58: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4ff5e: 4e5e unlk %fp <== NOT EXECUTED 4ff60: 4e75 rts <== NOT EXECUTED
if (rtems_rfs_fs_release_bitmaps (fs))
rtems_rfs_bitmap_release_buffer (fs, bitmap);
if (allocated)
{
if (inode)
4ff62: 4a07 tstb %d7
4ff64: 675a beqs 4ffc0 <rtems_rfs_group_bitmap_alloc+0x1de>
*result = rtems_rfs_group_inode (fs, group, bit);
4ff66: 45ea 0028 lea %a2@(40),%a2 4ff6a: 4c12 3800 mulsl %a2@,%d3 4ff6e: 206e fffa moveal %fp@(-6),%a0 4ff72: 5288 addql #1,%a0 4ff74: d1c3 addal %d3,%a0 4ff76: 226e 0014 moveal %fp@(20),%a1 4ff7a: 2288 movel %a0,%a1@
else
*result = rtems_rfs_group_block (&fs->groups[group], bit);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
4ff7c: 2f3c 0002 0000 movel #131072,%sp@- 4ff82: 42a7 clrl %sp@- 4ff84: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> 4ff8a: 508f addql #8,%sp 4ff8c: 4a00 tstb %d0
4ff8e: 6762 beqs 4fff2 <rtems_rfs_group_bitmap_alloc+0x210><== ALWAYS TAKEN
printf ("rtems-rfs: group-bitmap-alloc: %s allocated: %" PRId32 "\n",
4ff90: 206e 0014 moveal %fp@(20),%a0 <== NOT EXECUTED 4ff94: 2210 movel %a0@,%d1 <== NOT EXECUTED 4ff96: 203c 0007 24cb movel #468171,%d0 <== NOT EXECUTED 4ff9c: 4a07 tstb %d7 <== NOT EXECUTED 4ff9e: 6634 bnes 4ffd4 <rtems_rfs_group_bitmap_alloc+0x1f2><== NOT EXECUTED 4ffa0: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4ffa2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4ffa4: 4879 0007 2cee pea 72cee <ramdisk_ops+0x910> <== NOT EXECUTED 4ffaa: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 4ffb0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
inode ? "inode" : "block", *result);
return 0;
4ffb4: 4280 clrl %d0 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
printf ("rtems-rfs: group-bitmap-alloc: no blocks available\n");
return ENOSPC;
}
4ffb6: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4ffbc: 4e5e unlk %fp <== NOT EXECUTED 4ffbe: 4e75 rts <== NOT EXECUTED
if (allocated)
{
if (inode)
*result = rtems_rfs_group_inode (fs, group, bit);
else
*result = rtems_rfs_group_block (&fs->groups[group], bit);
4ffc0: 206a 001c moveal %a2@(28),%a0 4ffc4: 202e fffa movel %fp@(-6),%d0 4ffc8: d0b0 c800 addl %a0@(00000000,%a4:l),%d0 4ffcc: 226e 0014 moveal %fp@(20),%a1 4ffd0: 2280 movel %d0,%a1@ 4ffd2: 60a8 bras 4ff7c <rtems_rfs_group_bitmap_alloc+0x19a>
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
printf ("rtems-rfs: group-bitmap-alloc: %s allocated: %" PRId32 "\n",
4ffd4: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4ffd6: 203c 0007 2ce8 movel #470248,%d0 <== NOT EXECUTED 4ffdc: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4ffde: 4879 0007 2cee pea 72cee <ramdisk_ops+0x910> <== NOT EXECUTED 4ffe4: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 4ffea: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
inode ? "inode" : "block", *result);
return 0;
4ffee: 4280 clrl %d0 <== NOT EXECUTED 4fff0: 60c4 bras 4ffb6 <rtems_rfs_group_bitmap_alloc+0x1d4><== NOT EXECUTED
4fff2: 4280 clrl %d0
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
printf ("rtems-rfs: group-bitmap-alloc: no blocks available\n");
return ENOSPC;
}
4fff4: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5
4fffa: 4e5e unlk %fp <== NOT EXECUTED
0004fffe <rtems_rfs_group_bitmap_free>:
int
rtems_rfs_group_bitmap_free (rtems_rfs_file_system* fs,
bool inode,
rtems_rfs_bitmap_bit no)
{
4fffe: 4e56 fff4 linkw %fp,#-12 50002: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
unsigned int group;
rtems_rfs_bitmap_bit bit;
size_t size;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
50006: 2f3c 0002 0000 movel #131072,%sp@-
int
rtems_rfs_group_bitmap_free (rtems_rfs_file_system* fs,
bool inode,
rtems_rfs_bitmap_bit no)
{
5000c: 246e 0008 moveal %fp@(8),%a2
unsigned int group;
rtems_rfs_bitmap_bit bit;
size_t size;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
50010: 42a7 clrl %sp@-
int
rtems_rfs_group_bitmap_free (rtems_rfs_file_system* fs,
bool inode,
rtems_rfs_bitmap_bit no)
{
50012: 266e 0010 moveal %fp@(16),%a3 50016: 142e 000f moveb %fp@(15),%d2
unsigned int group;
rtems_rfs_bitmap_bit bit;
size_t size;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
5001a: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> 50020: 508f addql #8,%sp 50022: 4a00 tstb %d0
50024: 6724 beqs 5004a <rtems_rfs_group_bitmap_free+0x4c><== ALWAYS TAKEN
printf ("rtems-rfs: group-bitmap-free: %s free: %" PRId32 "\n",
50026: 203c 0007 24cb movel #468171,%d0 <== NOT EXECUTED 5002c: 4a02 tstb %d2 <== NOT EXECUTED 5002e: 6706 beqs 50036 <rtems_rfs_group_bitmap_free+0x38><== NOT EXECUTED 50030: 203c 0007 2ce8 movel #470248,%d0 <== NOT EXECUTED 50036: 2f0b movel %a3,%sp@- <== NOT EXECUTED 50038: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5003a: 4879 0007 2d53 pea 72d53 <ramdisk_ops+0x975> <== NOT EXECUTED 50040: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 50046: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
inode ? "inode" : "block", no);
if (inode)
{
no -= RTEMS_RFS_ROOT_INO;
5004a: 220b movel %a3,%d1 5004c: 5381 subql #1,%d1
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
printf ("rtems-rfs: group-bitmap-free: %s free: %" PRId32 "\n",
inode ? "inode" : "block", no);
if (inode)
5004e: 4a02 tstb %d2
50050: 673e beqs 50090 <rtems_rfs_group_bitmap_free+0x92><== NEVER TAKEN
group = no / size;
bit = (rtems_rfs_bitmap_bit) (no % size);
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
50052: 744c moveq #76,%d2
no -= RTEMS_RFS_SUPERBLOCK_SIZE;
size = fs->group_blocks;
}
group = no / size;
bit = (rtems_rfs_bitmap_bit) (no % size);
50054: 4c6a 1000 0028 remul %a2@(40),%d0,%d1 5005a: 4c6a 1001 0028 remul %a2@(40),%d1,%d1
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
50060: 266a 001c moveal %a2@(28),%a3 50064: 4c02 1800 mulsl %d2,%d1
else
bitmap = &fs->groups[group].block_bitmap;
rc = rtems_rfs_bitmap_map_clear (bitmap, bit);
50068: 2f00 movel %d0,%sp@-
group = no / size;
bit = (rtems_rfs_bitmap_bit) (no % size);
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
5006a: d7c1 addal %d1,%a3 5006c: 47eb 002a lea %a3@(42),%a3
else
bitmap = &fs->groups[group].block_bitmap;
rc = rtems_rfs_bitmap_map_clear (bitmap, bit);
50070: 2f0b movel %a3,%sp@- 50072: 4eb9 0005 a5c2 jsr 5a5c2 <rtems_rfs_bitmap_map_clear>
rtems_rfs_bitmap_release_buffer (fs, bitmap);
50078: 2f13 movel %a3@,%sp@-
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
else
bitmap = &fs->groups[group].block_bitmap;
rc = rtems_rfs_bitmap_map_clear (bitmap, bit);
5007a: 2400 movel %d0,%d2
rtems_rfs_bitmap_release_buffer (fs, bitmap);
5007c: 2f0a movel %a2,%sp@- 5007e: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release>
return rc;
}
50084: 2002 movel %d2,%d0 50086: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 5008c: 4e5e unlk %fp 5008e: 4e75 rts
bit = (rtems_rfs_bitmap_bit) (no % size);
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
else
bitmap = &fs->groups[group].block_bitmap;
50090: 744c moveq #76,%d2 <== NOT EXECUTED
no -= RTEMS_RFS_SUPERBLOCK_SIZE;
size = fs->group_blocks;
}
group = no / size;
bit = (rtems_rfs_bitmap_bit) (no % size);
50092: 4c6a 1000 0024 remul %a2@(36),%d0,%d1 <== NOT EXECUTED 50098: 4c6a 1001 0024 remul %a2@(36),%d1,%d1 <== NOT EXECUTED
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
else
bitmap = &fs->groups[group].block_bitmap;
5009e: 266a 001c moveal %a2@(28),%a3 <== NOT EXECUTED 500a2: 4c02 1800 mulsl %d2,%d1 <== NOT EXECUTED
rc = rtems_rfs_bitmap_map_clear (bitmap, bit);
500a6: 2f00 movel %d0,%sp@- <== NOT EXECUTED
bit = (rtems_rfs_bitmap_bit) (no % size);
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
else
bitmap = &fs->groups[group].block_bitmap;
500a8: d7c1 addal %d1,%a3 <== NOT EXECUTED 500aa: 508b addql #8,%a3 <== NOT EXECUTED
rc = rtems_rfs_bitmap_map_clear (bitmap, bit);
500ac: 2f0b movel %a3,%sp@- <== NOT EXECUTED 500ae: 4eb9 0005 a5c2 jsr 5a5c2 <rtems_rfs_bitmap_map_clear> <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, bitmap);
500b4: 2f13 movel %a3@,%sp@- <== NOT EXECUTED
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
else
bitmap = &fs->groups[group].block_bitmap;
rc = rtems_rfs_bitmap_map_clear (bitmap, bit);
500b6: 2400 movel %d0,%d2 <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, bitmap);
500b8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 500ba: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
return rc;
}
500c0: 2002 movel %d2,%d0 <== NOT EXECUTED 500c2: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 500c8: 4e5e unlk %fp <== NOT EXECUTED
000500cc <rtems_rfs_group_bitmap_test>:
int
rtems_rfs_group_bitmap_test (rtems_rfs_file_system* fs,
bool inode,
rtems_rfs_bitmap_bit no,
bool* state)
{
500cc: 4e56 fff0 linkw %fp,#-16 <== NOT EXECUTED 500d0: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ <== NOT EXECUTED
unsigned int group;
rtems_rfs_bitmap_bit bit;
size_t size;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
500d4: 2f3c 0002 0000 movel #131072,%sp@- <== NOT EXECUTED
int
rtems_rfs_group_bitmap_test (rtems_rfs_file_system* fs,
bool inode,
rtems_rfs_bitmap_bit no,
bool* state)
{
500da: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
unsigned int group;
rtems_rfs_bitmap_bit bit;
size_t size;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
500de: 42a7 clrl %sp@- <== NOT EXECUTED
int
rtems_rfs_group_bitmap_test (rtems_rfs_file_system* fs,
bool inode,
rtems_rfs_bitmap_bit no,
bool* state)
{
500e0: 242e 0010 movel %fp@(16),%d2 <== NOT EXECUTED 500e4: 162e 000f moveb %fp@(15),%d3 <== NOT EXECUTED
unsigned int group;
rtems_rfs_bitmap_bit bit;
size_t size;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
500e8: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 500ee: 508f addql #8,%sp <== NOT EXECUTED 500f0: 4a00 tstb %d0 <== NOT EXECUTED 500f2: 6724 beqs 50118 <rtems_rfs_group_bitmap_test+0x4c><== NOT EXECUTED
printf ("rtems-rfs: group-bitmap-test: %s test: %" PRId32 "\n",
500f4: 203c 0007 24cb movel #468171,%d0 <== NOT EXECUTED 500fa: 4a03 tstb %d3 <== NOT EXECUTED 500fc: 6706 beqs 50104 <rtems_rfs_group_bitmap_test+0x38><== NOT EXECUTED 500fe: 203c 0007 2ce8 movel #470248,%d0 <== NOT EXECUTED 50104: 2f02 movel %d2,%sp@- <== NOT EXECUTED 50106: 2f00 movel %d0,%sp@- <== NOT EXECUTED 50108: 4879 0007 2d7f pea 72d7f <ramdisk_ops+0x9a1> <== NOT EXECUTED 5010e: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 50114: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
inode ? "inode" : "block", no);
if (inode)
50118: 4a03 tstb %d3 <== NOT EXECUTED 5011a: 6718 beqs 50134 <rtems_rfs_group_bitmap_test+0x68><== NOT EXECUTED
{
if ((no < RTEMS_RFS_ROOT_INO) || (no > rtems_rfs_fs_inodes (fs)))
5011c: 4a82 tstl %d2 <== NOT EXECUTED 5011e: 6f06 bles 50126 <rtems_rfs_group_bitmap_test+0x5a><== NOT EXECUTED 50120: b4aa 0010 cmpl %a2@(16),%d2 <== NOT EXECUTED 50124: 6358 blss 5017e <rtems_rfs_group_bitmap_test+0xb2><== NOT EXECUTED
size = fs->group_inodes;
}
else
{
if (no >= rtems_rfs_fs_blocks (fs))
return EINVAL;
50126: 7416 moveq #22,%d2 <== NOT EXECUTED
rc = rtems_rfs_bitmap_map_test (bitmap, bit, state);
rtems_rfs_bitmap_release_buffer (fs, bitmap);
return rc;
}
50128: 2002 movel %d2,%d0 <== NOT EXECUTED 5012a: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED 50130: 4e5e unlk %fp <== NOT EXECUTED 50132: 4e75 rts <== NOT EXECUTED
no -= RTEMS_RFS_ROOT_INO;
size = fs->group_inodes;
}
else
{
if (no >= rtems_rfs_fs_blocks (fs))
50134: b4aa 0004 cmpl %a2@(4),%d2 <== NOT EXECUTED 50138: 64ec bccs 50126 <rtems_rfs_group_bitmap_test+0x5a><== NOT EXECUTED
bit = (rtems_rfs_bitmap_bit) (no % size);
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
else
bitmap = &fs->groups[group].block_bitmap;
5013a: 266a 001c moveal %a2@(28),%a3 <== NOT EXECUTED 5013e: 724c moveq #76,%d1 <== NOT EXECUTED
return EINVAL;
size = fs->group_blocks;
}
group = no / size;
bit = (rtems_rfs_bitmap_bit) (no % size);
50140: 4c6a 2000 0024 remul %a2@(36),%d0,%d2 <== NOT EXECUTED 50146: 4c6a 2002 0024 remul %a2@(36),%d2,%d2 <== NOT EXECUTED
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
else
bitmap = &fs->groups[group].block_bitmap;
rc = rtems_rfs_bitmap_map_test (bitmap, bit, state);
5014c: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED
bit = (rtems_rfs_bitmap_bit) (no % size);
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
else
bitmap = &fs->groups[group].block_bitmap;
50150: 4c01 2800 mulsl %d1,%d2 <== NOT EXECUTED
rc = rtems_rfs_bitmap_map_test (bitmap, bit, state);
50154: 2f00 movel %d0,%sp@- <== NOT EXECUTED
bit = (rtems_rfs_bitmap_bit) (no % size);
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
else
bitmap = &fs->groups[group].block_bitmap;
50156: d7c2 addal %d2,%a3 <== NOT EXECUTED 50158: 508b addql #8,%a3 <== NOT EXECUTED
rc = rtems_rfs_bitmap_map_test (bitmap, bit, state);
5015a: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5015c: 4eb9 0005 a644 jsr 5a644 <rtems_rfs_bitmap_map_test> <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, bitmap);
50162: 2f13 movel %a3@,%sp@- <== NOT EXECUTED
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
else
bitmap = &fs->groups[group].block_bitmap;
rc = rtems_rfs_bitmap_map_test (bitmap, bit, state);
50164: 2400 movel %d0,%d2 <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, bitmap);
50166: 2f0a movel %a2,%sp@- <== NOT EXECUTED 50168: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
return rc;
5016e: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
}
50172: 2002 movel %d2,%d0 <== NOT EXECUTED 50174: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED 5017a: 4e5e unlk %fp <== NOT EXECUTED 5017c: 4e75 rts <== NOT EXECUTED
if (inode)
{
if ((no < RTEMS_RFS_ROOT_INO) || (no > rtems_rfs_fs_inodes (fs)))
return EINVAL;
no -= RTEMS_RFS_ROOT_INO;
5017e: 5382 subql #1,%d2 <== NOT EXECUTED
group = no / size;
bit = (rtems_rfs_bitmap_bit) (no % size);
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
50180: 724c moveq #76,%d1 <== NOT EXECUTED 50182: 266a 001c moveal %a2@(28),%a3 <== NOT EXECUTED
return EINVAL;
size = fs->group_blocks;
}
group = no / size;
bit = (rtems_rfs_bitmap_bit) (no % size);
50186: 4c6a 2000 0028 remul %a2@(40),%d0,%d2 <== NOT EXECUTED 5018c: 4c6a 2002 0028 remul %a2@(40),%d2,%d2 <== NOT EXECUTED
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
else
bitmap = &fs->groups[group].block_bitmap;
rc = rtems_rfs_bitmap_map_test (bitmap, bit, state);
50192: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED
group = no / size;
bit = (rtems_rfs_bitmap_bit) (no % size);
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
50196: 4c01 2800 mulsl %d1,%d2 <== NOT EXECUTED
else
bitmap = &fs->groups[group].block_bitmap;
rc = rtems_rfs_bitmap_map_test (bitmap, bit, state);
5019a: 2f00 movel %d0,%sp@- <== NOT EXECUTED
group = no / size;
bit = (rtems_rfs_bitmap_bit) (no % size);
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
5019c: d7c2 addal %d2,%a3 <== NOT EXECUTED 5019e: 47eb 002a lea %a3@(42),%a3 <== NOT EXECUTED
else
bitmap = &fs->groups[group].block_bitmap;
rc = rtems_rfs_bitmap_map_test (bitmap, bit, state);
501a2: 2f0b movel %a3,%sp@- <== NOT EXECUTED 501a4: 4eb9 0005 a644 jsr 5a644 <rtems_rfs_bitmap_map_test> <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, bitmap);
501aa: 2f13 movel %a3@,%sp@- <== NOT EXECUTED
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
else
bitmap = &fs->groups[group].block_bitmap;
rc = rtems_rfs_bitmap_map_test (bitmap, bit, state);
501ac: 2400 movel %d0,%d2 <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, bitmap);
501ae: 2f0a movel %a2,%sp@- <== NOT EXECUTED 501b0: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
return rc;
501b6: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 501ba: 60b6 bras 50172 <rtems_rfs_group_bitmap_test+0xa6><== NOT EXECUTED
0004fcee <rtems_rfs_group_close>:
int
rtems_rfs_group_close (rtems_rfs_file_system* fs, rtems_rfs_group* group)
{
4fcee: 4e56 ffe8 linkw %fp,#-24 4fcf2: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@
int result = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_CLOSE))
4fcf6: 2f3c 0001 0000 movel #65536,%sp@-
return 0;
}
int
rtems_rfs_group_close (rtems_rfs_file_system* fs, rtems_rfs_group* group)
{
4fcfc: 242e 0008 movel %fp@(8),%d2
int result = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_CLOSE))
4fd00: 42a7 clrl %sp@-
return 0;
}
int
rtems_rfs_group_close (rtems_rfs_file_system* fs, rtems_rfs_group* group)
{
4fd02: 246e 000c moveal %fp@(12),%a2
int result = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_CLOSE))
4fd06: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> 4fd0c: 508f addql #8,%sp 4fd0e: 4a00 tstb %d0
4fd10: 665c bnes 4fd6e <rtems_rfs_group_close+0x80> <== NEVER TAKEN
/* * We need to close as much as possible and also return any error if one * occurs but this may result in one even more important error being lost but * we cannot OR the errors together so this is a reasonable compromise. */ rc = rtems_rfs_bitmap_close (&group->inode_bitmap);
4fd12: 486a 002a pea %a2@(42) 4fd16: 49f9 0005 a962 lea 5a962 <rtems_rfs_bitmap_close>,%a4
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
4fd1c: 47f9 0005 bbc0 lea 5bbc0 <rtems_rfs_buffer_handle_release>,%a3 4fd22: 4e94 jsr %a4@ 4fd24: 486a 0042 pea %a2@(66) 4fd28: 2800 movel %d0,%d4 4fd2a: 2f02 movel %d2,%sp@- 4fd2c: 4e93 jsr %a3@
if (rc > 0)
result = rc;
rc = rtems_rfs_buffer_handle_close (fs, &group->inode_bitmap_buffer);
if (rc > 0)
result = rc;
rc = rtems_rfs_bitmap_close (&group->block_bitmap);
4fd2e: 486a 0008 pea %a2@(8)
handle->dirty = false;
4fd32: 4200 clrb %d0
handle->bnum = 0;
4fd34: 42aa 0044 clrl %a2@(68)
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
handle->dirty = false;
4fd38: 1540 0042 moveb %d0,%a2@(66)
handle->bnum = 0; handle->buffer = NULL;
4fd3c: 42aa 0048 clrl %a2@(72) 4fd40: 4e94 jsr %a4@
if (rc > 0)
4fd42: 4fef 0010 lea %sp@(16),%sp 4fd46: 4a80 tstl %d0
4fd48: 6f6c bles 4fdb6 <rtems_rfs_group_close+0xc8> <== ALWAYS TAKEN
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
4fd4a: 486a 0020 pea %a2@(32) <== NOT EXECUTED 4fd4e: 2600 movel %d0,%d3 <== NOT EXECUTED 4fd50: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4fd52: 4e93 jsr %a3@ <== NOT EXECUTED
handle->dirty = false;
4fd54: 4200 clrb %d0 <== NOT EXECUTED 4fd56: 1540 0020 moveb %d0,%a2@(32) <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_close (fs, &group->block_bitmap_buffer);
if (rc > 0)
result = rc;
return result;
}
4fd5a: 2003 movel %d3,%d0 <== NOT EXECUTED
handle->bnum = 0;
4fd5c: 42aa 0022 clrl %a2@(34) <== NOT EXECUTED
handle->buffer = NULL;
4fd60: 42aa 0026 clrl %a2@(38) <== NOT EXECUTED 4fd64: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 <== NOT EXECUTED 4fd6a: 4e5e unlk %fp <== NOT EXECUTED 4fd6c: 4e75 rts <== NOT EXECUTED
{
int result = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_CLOSE))
printf ("rtems-rfs: group-close: base=%" PRId32 "\n", group->base);
4fd6e: 2f12 movel %a2@,%sp@- <== NOT EXECUTED
/* * We need to close as much as possible and also return any error if one * occurs but this may result in one even more important error being lost but * we cannot OR the errors together so this is a reasonable compromise. */ rc = rtems_rfs_bitmap_close (&group->inode_bitmap);
4fd70: 49f9 0005 a962 lea 5a962 <rtems_rfs_bitmap_close>,%a4 <== NOT EXECUTED
{
int result = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_CLOSE))
printf ("rtems-rfs: group-close: base=%" PRId32 "\n", group->base);
4fd76: 4879 0007 2cc6 pea 72cc6 <ramdisk_ops+0x8e8> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
4fd7c: 47f9 0005 bbc0 lea 5bbc0 <rtems_rfs_buffer_handle_release>,%a3<== NOT EXECUTED 4fd82: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 4fd88: 508f addql #8,%sp <== NOT EXECUTED
/* * We need to close as much as possible and also return any error if one * occurs but this may result in one even more important error being lost but * we cannot OR the errors together so this is a reasonable compromise. */ rc = rtems_rfs_bitmap_close (&group->inode_bitmap);
4fd8a: 486a 002a pea %a2@(42) <== NOT EXECUTED 4fd8e: 4e94 jsr %a4@ <== NOT EXECUTED 4fd90: 486a 0042 pea %a2@(66) <== NOT EXECUTED 4fd94: 2800 movel %d0,%d4 <== NOT EXECUTED 4fd96: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4fd98: 4e93 jsr %a3@ <== NOT EXECUTED
if (rc > 0)
result = rc;
rc = rtems_rfs_buffer_handle_close (fs, &group->inode_bitmap_buffer);
if (rc > 0)
result = rc;
rc = rtems_rfs_bitmap_close (&group->block_bitmap);
4fd9a: 486a 0008 pea %a2@(8) <== NOT EXECUTED
handle->dirty = false;
4fd9e: 4200 clrb %d0 <== NOT EXECUTED
handle->bnum = 0;
4fda0: 42aa 0044 clrl %a2@(68) <== NOT EXECUTED
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
handle->dirty = false;
4fda4: 1540 0042 moveb %d0,%a2@(66) <== NOT EXECUTED
handle->bnum = 0; handle->buffer = NULL;
4fda8: 42aa 0048 clrl %a2@(72) <== NOT EXECUTED 4fdac: 4e94 jsr %a4@ <== NOT EXECUTED
if (rc > 0)
4fdae: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4fdb2: 4a80 tstl %d0 <== NOT EXECUTED 4fdb4: 6e94 bgts 4fd4a <rtems_rfs_group_close+0x5c> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
4fdb6: 486a 0020 pea %a2@(32) 4fdba: 2604 movel %d4,%d3 4fdbc: 4683 notl %d3 4fdbe: 2f02 movel %d2,%sp@- 4fdc0: d683 addl %d3,%d3 4fdc2: 9783 subxl %d3,%d3 4fdc4: 4e93 jsr %a3@
handle->dirty = false;
4fdc6: 4200 clrb %d0 4fdc8: c684 andl %d4,%d3 4fdca: 1540 0020 moveb %d0,%a2@(32)
handle->bnum = 0;
4fdce: 42aa 0022 clrl %a2@(34)
rc = rtems_rfs_buffer_handle_close (fs, &group->block_bitmap_buffer);
if (rc > 0)
result = rc;
return result;
}
4fdd2: 2003 movel %d3,%d0
handle->buffer = NULL;
4fdd4: 42aa 0026 clrl %a2@(38) 4fdd8: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4
4fdde: 4e5e unlk %fp <== NOT EXECUTED
0004fa64 <rtems_rfs_group_open>:
rtems_rfs_group_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_block base,
size_t size,
size_t inodes,
rtems_rfs_group* group)
{
4fa64: 4e56 ffdc linkw %fp,#-36 4fa68: 222e 0014 movel %fp@(20),%d1 4fa6c: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 4fa70: 266e 0008 moveal %fp@(8),%a3 4fa74: 262e 000c movel %fp@(12),%d3 4fa78: 242e 0010 movel %fp@(16),%d2 4fa7c: 246e 0018 moveal %fp@(24),%a2
int rc;
if (base >= rtems_rfs_fs_blocks (fs))
4fa80: 202b 0004 movel %a3@(4),%d0 4fa84: b680 cmpl %d0,%d3 4fa86: 6400 01b2 bccw 4fc3a <rtems_rfs_group_open+0x1d6>
printf ("rtems-rfs: group-open: base outside file system range: %d: %s\n",
EIO, strerror (EIO));
return EIO;
}
if ((base + size) >= rtems_rfs_fs_blocks (fs))
4fa8a: 2042 moveal %d2,%a0 4fa8c: d1c3 addal %d3,%a0 4fa8e: b1c0 cmpal %d0,%a0
4fa90: 6504 bcss 4fa96 <rtems_rfs_group_open+0x32> <== NEVER TAKEN
size = rtems_rfs_fs_blocks (fs) - base;
4fa92: 2400 movel %d0,%d2 4fa94: 9483 subl %d3,%d2 4fa96: 2c02 movel %d2,%d6 4fa98: b282 cmpl %d2,%d1 4fa9a: 6500 008e bcsw 4fb2a <rtems_rfs_group_open+0xc6>
* the format configuration needs reviewing.
*/
if (inodes > size)
inodes = size;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
4fa9e: 49f9 0005 37c0 lea 537c0 <rtems_rfs_trace>,%a4 <== NOT EXECUTED 4faa4: 2f3c 0000 8000 movel #32768,%sp@- <== NOT EXECUTED 4faaa: 42a7 clrl %sp@- <== NOT EXECUTED 4faac: 4e94 jsr %a4@ <== NOT EXECUTED 4faae: 508f addql #8,%sp <== NOT EXECUTED 4fab0: 4a00 tstb %d0 <== NOT EXECUTED 4fab2: 6600 0090 bnew 4fb44 <rtems_rfs_group_open+0xe0> <== NOT EXECUTED
printf ("rtems-rfs: group-open: could not open block bitmap handle: %d: %s\n",
rc, strerror (rc));
return rc;
}
rc = rtems_rfs_bitmap_open (&group->block_bitmap, fs,
4fab6: 2f03 movel %d3,%sp@- 4fab8: 280a movel %a2,%d4 4faba: 0684 0000 0020 addil #32,%d4 4fac0: 2a0a movel %a2,%d5 4fac2: 5085 addql #8,%d5 4fac4: 4bf9 0005 a8fe lea 5a8fe <rtems_rfs_bitmap_open>,%a5 4faca: 2f02 movel %d2,%sp@-
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
4facc: 4200 clrb %d0 4face: 2f04 movel %d4,%sp@- 4fad0: 1540 0020 moveb %d0,%a2@(32) 4fad4: 2f0b movel %a3,%sp@-
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
printf ("rtems-rfs: group-open: base=%" PRId32 ", blocks=%zd inodes=%zd\n",
base, size, inodes);
group->base = base;
group->size = size;
4fad6: 2542 0004 movel %d2,%a2@(4)
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
printf ("rtems-rfs: group-open: base=%" PRId32 ", blocks=%zd inodes=%zd\n",
base, size, inodes);
group->base = base;
4fada: 2483 movel %d3,%a2@
handle->bnum = 0;
4fadc: 42aa 0022 clrl %a2@(34)
handle->buffer = NULL;
4fae0: 42aa 0026 clrl %a2@(38)
printf ("rtems-rfs: group-open: could not open block bitmap handle: %d: %s\n",
rc, strerror (rc));
return rc;
}
rc = rtems_rfs_bitmap_open (&group->block_bitmap, fs,
4fae4: 2f05 movel %d5,%sp@- 4fae6: 4e95 jsr %a5@
&group->block_bitmap_buffer, size,
group->base + RTEMS_RFS_GROUP_BLOCK_BITMAP_BLOCK);
if (rc > 0)
4fae8: 4fef 0014 lea %sp@(20),%sp
printf ("rtems-rfs: group-open: could not open block bitmap handle: %d: %s\n",
rc, strerror (rc));
return rc;
}
rc = rtems_rfs_bitmap_open (&group->block_bitmap, fs,
4faec: 2400 movel %d0,%d2
&group->block_bitmap_buffer, size,
group->base + RTEMS_RFS_GROUP_BLOCK_BITMAP_BLOCK);
if (rc > 0)
4faee: 6f00 00a6 blew 4fb96 <rtems_rfs_group_open+0x132>
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
4faf2: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4faf4: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4faf6: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
4fafc: 4200 clrb %d0 <== NOT EXECUTED
handle->bnum = 0;
4fafe: 42aa 0022 clrl %a2@(34) <== NOT EXECUTED
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
handle->dirty = false;
4fb02: 1540 0020 moveb %d0,%a2@(32) <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &group->block_bitmap_buffer);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
4fb06: 2f3c 0000 8000 movel #32768,%sp@- <== NOT EXECUTED 4fb0c: 42a7 clrl %sp@- <== NOT EXECUTED
handle->bnum = 0; handle->buffer = NULL;
4fb0e: 42aa 0026 clrl %a2@(38) <== NOT EXECUTED 4fb12: 4e94 jsr %a4@ <== NOT EXECUTED 4fb14: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4fb18: 4a00 tstb %d0 <== NOT EXECUTED 4fb1a: 6600 0140 bnew 4fc5c <rtems_rfs_group_open+0x1f8> <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, &group->block_bitmap);
rtems_rfs_bitmap_release_buffer (fs, &group->inode_bitmap);
}
return 0;
}
4fb1e: 2002 movel %d2,%d0 <== NOT EXECUTED 4fb20: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 <== NOT EXECUTED 4fb26: 4e5e unlk %fp <== NOT EXECUTED 4fb28: 4e75 rts <== NOT EXECUTED
EIO, strerror (EIO));
return EIO;
}
if ((base + size) >= rtems_rfs_fs_blocks (fs))
size = rtems_rfs_fs_blocks (fs) - base;
4fb2a: 2c01 movel %d1,%d6
* the format configuration needs reviewing.
*/
if (inodes > size)
inodes = size;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
4fb2c: 49f9 0005 37c0 lea 537c0 <rtems_rfs_trace>,%a4 4fb32: 2f3c 0000 8000 movel #32768,%sp@- 4fb38: 42a7 clrl %sp@- 4fb3a: 4e94 jsr %a4@ 4fb3c: 508f addql #8,%sp 4fb3e: 4a00 tstb %d0 4fb40: 6700 ff74 beqw 4fab6 <rtems_rfs_group_open+0x52>
printf ("rtems-rfs: group-open: base=%" PRId32 ", blocks=%zd inodes=%zd\n",
4fb44: 2f06 movel %d6,%sp@- <== NOT EXECUTED
printf ("rtems-rfs: group-open: could not open block bitmap handle: %d: %s\n",
rc, strerror (rc));
return rc;
}
rc = rtems_rfs_bitmap_open (&group->block_bitmap, fs,
4fb46: 280a movel %a2,%d4 <== NOT EXECUTED 4fb48: 0684 0000 0020 addil #32,%d4 <== NOT EXECUTED 4fb4e: 2a0a movel %a2,%d5 <== NOT EXECUTED 4fb50: 5085 addql #8,%d5 <== NOT EXECUTED 4fb52: 4bf9 0005 a8fe lea 5a8fe <rtems_rfs_bitmap_open>,%a5 <== NOT EXECUTED
*/
if (inodes > size)
inodes = size;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
printf ("rtems-rfs: group-open: base=%" PRId32 ", blocks=%zd inodes=%zd\n",
4fb58: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4fb5a: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4fb5c: 4879 0007 2c16 pea 72c16 <ramdisk_ops+0x838> <== NOT EXECUTED 4fb62: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 4fb68: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
printf ("rtems-rfs: group-open: could not open block bitmap handle: %d: %s\n",
rc, strerror (rc));
return rc;
}
rc = rtems_rfs_bitmap_open (&group->block_bitmap, fs,
4fb6c: 2f03 movel %d3,%sp@- <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
4fb6e: 4200 clrb %d0 <== NOT EXECUTED 4fb70: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4fb72: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4fb74: 1540 0020 moveb %d0,%a2@(32) <== NOT EXECUTED 4fb78: 2f0b movel %a3,%sp@- <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
printf ("rtems-rfs: group-open: base=%" PRId32 ", blocks=%zd inodes=%zd\n",
base, size, inodes);
group->base = base;
group->size = size;
4fb7a: 2542 0004 movel %d2,%a2@(4) <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
printf ("rtems-rfs: group-open: base=%" PRId32 ", blocks=%zd inodes=%zd\n",
base, size, inodes);
group->base = base;
4fb7e: 2483 movel %d3,%a2@ <== NOT EXECUTED
handle->bnum = 0;
4fb80: 42aa 0022 clrl %a2@(34) <== NOT EXECUTED
handle->buffer = NULL;
4fb84: 42aa 0026 clrl %a2@(38) <== NOT EXECUTED
printf ("rtems-rfs: group-open: could not open block bitmap handle: %d: %s\n",
rc, strerror (rc));
return rc;
}
rc = rtems_rfs_bitmap_open (&group->block_bitmap, fs,
4fb88: 2f05 movel %d5,%sp@- <== NOT EXECUTED 4fb8a: 4e95 jsr %a5@ <== NOT EXECUTED
&group->block_bitmap_buffer, size,
group->base + RTEMS_RFS_GROUP_BLOCK_BITMAP_BLOCK);
if (rc > 0)
4fb8c: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
printf ("rtems-rfs: group-open: could not open block bitmap handle: %d: %s\n",
rc, strerror (rc));
return rc;
}
rc = rtems_rfs_bitmap_open (&group->block_bitmap, fs,
4fb90: 2400 movel %d0,%d2 <== NOT EXECUTED
&group->block_bitmap_buffer, size,
group->base + RTEMS_RFS_GROUP_BLOCK_BITMAP_BLOCK);
if (rc > 0)
4fb92: 6e00 ff5e bgtw 4faf2 <rtems_rfs_group_open+0x8e> <== NOT EXECUTED
printf ("rtems-rfs: group-open: could not open inode bitmap handle: %d: %s\n",
rc, strerror (rc));
return rc;
}
rc = rtems_rfs_bitmap_open (&group->inode_bitmap, fs,
4fb96: 2012 movel %a2@,%d0 4fb98: 5280 addql #1,%d0 4fb9a: 260a movel %a2,%d3 4fb9c: 0683 0000 0042 addil #66,%d3 4fba2: 2f00 movel %d0,%sp@-
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
4fba4: 4200 clrb %d0 4fba6: 1540 0042 moveb %d0,%a2@(66) 4fbaa: 2f06 movel %d6,%sp@- 4fbac: 2f03 movel %d3,%sp@- 4fbae: 2f0b movel %a3,%sp@- 4fbb0: 486a 002a pea %a2@(42)
handle->bnum = 0;
4fbb4: 42aa 0044 clrl %a2@(68)
handle->buffer = NULL;
4fbb8: 42aa 0048 clrl %a2@(72) 4fbbc: 4e95 jsr %a5@
&group->inode_bitmap_buffer, inodes,
group->base + RTEMS_RFS_GROUP_INODE_BITMAP_BLOCK);
if (rc > 0)
4fbbe: 4fef 0014 lea %sp@(20),%sp
printf ("rtems-rfs: group-open: could not open inode bitmap handle: %d: %s\n",
rc, strerror (rc));
return rc;
}
rc = rtems_rfs_bitmap_open (&group->inode_bitmap, fs,
4fbc2: 2400 movel %d0,%d2
&group->inode_bitmap_buffer, inodes,
group->base + RTEMS_RFS_GROUP_INODE_BITMAP_BLOCK);
if (rc > 0)
4fbc4: 6f00 00be blew 4fc84 <rtems_rfs_group_open+0x220>
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
4fbc8: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4fbca: 4bf9 0005 bbc0 lea 5bbc0 <rtems_rfs_buffer_handle_release>,%a5<== NOT EXECUTED 4fbd0: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4fbd2: 4e95 jsr %a5@ <== NOT EXECUTED
handle->dirty = false;
4fbd4: 4200 clrb %d0 <== NOT EXECUTED 4fbd6: 1540 0042 moveb %d0,%a2@(66) <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &group->inode_bitmap_buffer);
rtems_rfs_bitmap_close (&group->block_bitmap);
4fbda: 2f05 movel %d5,%sp@- <== NOT EXECUTED
handle->bnum = 0;
4fbdc: 42aa 0044 clrl %a2@(68) <== NOT EXECUTED
handle->buffer = NULL;
4fbe0: 42aa 0048 clrl %a2@(72) <== NOT EXECUTED 4fbe4: 4eb9 0005 a962 jsr 5a962 <rtems_rfs_bitmap_close> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
4fbea: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4fbec: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4fbee: 4e95 jsr %a5@ <== NOT EXECUTED
handle->dirty = false;
4fbf0: 4200 clrb %d0 <== NOT EXECUTED
handle->bnum = 0;
4fbf2: 42aa 0022 clrl %a2@(34) <== NOT EXECUTED
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
handle->dirty = false;
4fbf6: 1540 0020 moveb %d0,%a2@(32) <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &group->block_bitmap_buffer);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
4fbfa: 2f3c 0000 8000 movel #32768,%sp@- <== NOT EXECUTED 4fc00: 42a7 clrl %sp@- <== NOT EXECUTED
handle->bnum = 0; handle->buffer = NULL;
4fc02: 42aa 0026 clrl %a2@(38) <== NOT EXECUTED 4fc06: 4e94 jsr %a4@ <== NOT EXECUTED 4fc08: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED 4fc0c: 4a00 tstb %d0 <== NOT EXECUTED 4fc0e: 6700 ff0e beqw 4fb1e <rtems_rfs_group_open+0xba> <== NOT EXECUTED
printf ("rtems-rfs: group-open: could not open inode bitmap: %d: %s\n",
4fc12: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4fc14: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED 4fc1a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4fc1c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4fc1e: 4879 0007 2c8a pea 72c8a <ramdisk_ops+0x8ac> <== NOT EXECUTED 4fc24: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 4fc2a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, &group->block_bitmap);
rtems_rfs_bitmap_release_buffer (fs, &group->inode_bitmap);
}
return 0;
}
4fc2e: 2002 movel %d2,%d0 <== NOT EXECUTED 4fc30: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 <== NOT EXECUTED 4fc36: 4e5e unlk %fp <== NOT EXECUTED 4fc38: 4e75 rts <== NOT EXECUTED
{
int rc;
if (base >= rtems_rfs_fs_blocks (fs))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
4fc3a: 2f3c 0000 8000 movel #32768,%sp@- <== NOT EXECUTED 4fc40: 42a7 clrl %sp@- <== NOT EXECUTED 4fc42: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 4fc48: 508f addql #8,%sp <== NOT EXECUTED 4fc4a: 4a00 tstb %d0 <== NOT EXECUTED 4fc4c: 664a bnes 4fc98 <rtems_rfs_group_open+0x234> <== NOT EXECUTED
printf ("rtems-rfs: group-open: base outside file system range: %d: %s\n",
EIO, strerror (EIO));
return EIO;
4fc4e: 7405 moveq #5,%d2 <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, &group->block_bitmap);
rtems_rfs_bitmap_release_buffer (fs, &group->inode_bitmap);
}
return 0;
}
4fc50: 2002 movel %d2,%d0 <== NOT EXECUTED 4fc52: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 <== NOT EXECUTED 4fc58: 4e5e unlk %fp <== NOT EXECUTED 4fc5a: 4e75 rts <== NOT EXECUTED
group->base + RTEMS_RFS_GROUP_BLOCK_BITMAP_BLOCK);
if (rc > 0)
{
rtems_rfs_buffer_handle_close (fs, &group->block_bitmap_buffer);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
printf ("rtems-rfs: group-open: could not open block bitmap: %d: %s\n",
4fc5c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4fc5e: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED 4fc64: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4fc66: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4fc68: 4879 0007 2c4e pea 72c4e <ramdisk_ops+0x870> <== NOT EXECUTED 4fc6e: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 4fc74: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, &group->block_bitmap);
rtems_rfs_bitmap_release_buffer (fs, &group->inode_bitmap);
}
return 0;
}
4fc78: 2002 movel %d2,%d0 <== NOT EXECUTED 4fc7a: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 <== NOT EXECUTED 4fc80: 4e5e unlk %fp <== NOT EXECUTED 4fc82: 4e75 rts <== NOT EXECUTED
printf ("rtems-rfs: group-open: could not open inode bitmap: %d: %s\n",
rc, strerror (rc));
return rc;
}
if (rtems_rfs_fs_release_bitmaps (fs))
4fc84: 7001 moveq #1,%d0 4fc86: c093 andl %a3@,%d0
4fc88: 673c beqs 4fcc6 <rtems_rfs_group_open+0x262> <== ALWAYS TAKEN
{
rtems_rfs_bitmap_release_buffer (fs, &group->block_bitmap);
rtems_rfs_bitmap_release_buffer (fs, &group->inode_bitmap);
}
return 0;
4fc8a: 4282 clrl %d2 <== NOT EXECUTED
}
4fc8c: 2002 movel %d2,%d0 <== NOT EXECUTED 4fc8e: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 <== NOT EXECUTED 4fc94: 4e5e unlk %fp <== NOT EXECUTED 4fc96: 4e75 rts <== NOT EXECUTED
int rc;
if (base >= rtems_rfs_fs_blocks (fs))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
printf ("rtems-rfs: group-open: base outside file system range: %d: %s\n",
4fc98: 4878 0005 pea 5 <COMPARE> <== NOT EXECUTED
EIO, strerror (EIO));
return EIO;
4fc9c: 7405 moveq #5,%d2 <== NOT EXECUTED
int rc;
if (base >= rtems_rfs_fs_blocks (fs))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
printf ("rtems-rfs: group-open: base outside file system range: %d: %s\n",
4fc9e: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED 4fca4: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4fca6: 4878 0005 pea 5 <COMPARE> <== NOT EXECUTED 4fcaa: 4879 0007 2bd7 pea 72bd7 <ramdisk_ops+0x7f9> <== NOT EXECUTED 4fcb0: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 4fcb6: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, &group->block_bitmap);
rtems_rfs_bitmap_release_buffer (fs, &group->inode_bitmap);
}
return 0;
}
4fcba: 2002 movel %d2,%d0 <== NOT EXECUTED 4fcbc: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 <== NOT EXECUTED 4fcc2: 4e5e unlk %fp <== NOT EXECUTED 4fcc4: 4e75 rts <== NOT EXECUTED
return rc;
}
if (rtems_rfs_fs_release_bitmaps (fs))
{
rtems_rfs_bitmap_release_buffer (fs, &group->block_bitmap);
4fcc6: 2f2a 0008 movel %a2@(8),%sp@- 4fcca: 49f9 0005 bbc0 lea 5bbc0 <rtems_rfs_buffer_handle_release>,%a4
rtems_rfs_bitmap_release_buffer (fs, &group->inode_bitmap);
}
return 0;
4fcd0: 4282 clrl %d2
return rc;
}
if (rtems_rfs_fs_release_bitmaps (fs))
{
rtems_rfs_bitmap_release_buffer (fs, &group->block_bitmap);
4fcd2: 2f0b movel %a3,%sp@- 4fcd4: 4e94 jsr %a4@
rtems_rfs_bitmap_release_buffer (fs, &group->inode_bitmap);
4fcd6: 2f2a 002a movel %a2@(42),%sp@- 4fcda: 2f0b movel %a3,%sp@- 4fcdc: 4e94 jsr %a4@ 4fcde: 4fef 0010 lea %sp@(16),%sp
}
return 0;
}
4fce2: 2002 movel %d2,%d0 4fce4: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5
4fcea: 4e5e unlk %fp <== NOT EXECUTED
000501bc <rtems_rfs_group_usage>:
int
rtems_rfs_group_usage (rtems_rfs_file_system* fs,
size_t* blocks,
size_t* inodes)
{
501bc: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 501c0: 226e 0010 moveal %fp@(16),%a1 <== NOT EXECUTED 501c4: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ <== NOT EXECUTED 501c8: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 501cc: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED
int g;
*blocks = 0;
501d0: 4292 clrl %a2@ <== NOT EXECUTED
*inodes = 0;
for (g = 0; g < fs->group_count; g++)
501d2: 242b 0020 movel %a3@(32),%d2 <== NOT EXECUTED
size_t* inodes)
{
int g;
*blocks = 0;
*inodes = 0;
501d6: 4291 clrl %a1@ <== NOT EXECUTED
for (g = 0; g < fs->group_count; g++)
501d8: 4a82 tstl %d2 <== NOT EXECUTED 501da: 6f2a bles 50206 <rtems_rfs_group_usage+0x4a> <== NOT EXECUTED
return rc;
}
int
rtems_rfs_group_usage (rtems_rfs_file_system* fs,
501dc: 206b 001c moveal %a3@(28),%a0 <== NOT EXECUTED
int g;
*blocks = 0;
*inodes = 0;
for (g = 0; g < fs->group_count; g++)
501e0: 4280 clrl %d0 <== NOT EXECUTED
return rc;
}
int
rtems_rfs_group_usage (rtems_rfs_file_system* fs,
501e2: 41e8 0014 lea %a0@(20),%a0 <== NOT EXECUTED
for (g = 0; g < fs->group_count; g++)
{
rtems_rfs_group* group = &fs->groups[g];
*blocks +=
rtems_rfs_bitmap_map_size(&group->block_bitmap) -
501e6: 2210 movel %a0@,%d1 <== NOT EXECUTED 501e8: d292 addl %a2@,%d1 <== NOT EXECUTED
int g;
*blocks = 0;
*inodes = 0;
for (g = 0; g < fs->group_count; g++)
501ea: 5280 addql #1,%d0 <== NOT EXECUTED
{
rtems_rfs_group* group = &fs->groups[g];
*blocks +=
501ec: 92a8 0004 subl %a0@(4),%d1 <== NOT EXECUTED 501f0: 2481 movel %d1,%a2@ <== NOT EXECUTED
rtems_rfs_bitmap_map_size(&group->block_bitmap) -
rtems_rfs_bitmap_map_free (&group->block_bitmap);
*inodes +=
rtems_rfs_bitmap_map_size (&group->inode_bitmap) -
501f2: 2228 0022 movel %a0@(34),%d1 <== NOT EXECUTED 501f6: d291 addl %a1@,%d1 <== NOT EXECUTED
{
rtems_rfs_group* group = &fs->groups[g];
*blocks +=
rtems_rfs_bitmap_map_size(&group->block_bitmap) -
rtems_rfs_bitmap_map_free (&group->block_bitmap);
*inodes +=
501f8: 92a8 0026 subl %a0@(38),%d1 <== NOT EXECUTED
int g;
*blocks = 0;
*inodes = 0;
for (g = 0; g < fs->group_count; g++)
501fc: 41e8 004c lea %a0@(76),%a0 <== NOT EXECUTED
{
rtems_rfs_group* group = &fs->groups[g];
*blocks +=
rtems_rfs_bitmap_map_size(&group->block_bitmap) -
rtems_rfs_bitmap_map_free (&group->block_bitmap);
*inodes +=
50200: 2281 movel %d1,%a1@ <== NOT EXECUTED
int g;
*blocks = 0;
*inodes = 0;
for (g = 0; g < fs->group_count; g++)
50202: b480 cmpl %d0,%d2 <== NOT EXECUTED 50204: 66e0 bnes 501e6 <rtems_rfs_group_usage+0x2a> <== NOT EXECUTED
*inodes +=
rtems_rfs_bitmap_map_size (&group->inode_bitmap) -
rtems_rfs_bitmap_map_free (&group->inode_bitmap);
}
if (*blocks > rtems_rfs_fs_blocks (fs))
50206: 202b 0004 movel %a3@(4),%d0 <== NOT EXECUTED 5020a: b092 cmpl %a2@,%d0 <== NOT EXECUTED 5020c: 6402 bccs 50210 <rtems_rfs_group_usage+0x54> <== NOT EXECUTED
*blocks = rtems_rfs_fs_blocks (fs);
5020e: 2480 movel %d0,%a2@ <== NOT EXECUTED
if (*inodes > rtems_rfs_fs_inodes (fs))
50210: 202b 0010 movel %a3@(16),%d0 <== NOT EXECUTED 50214: b091 cmpl %a1@,%d0 <== NOT EXECUTED 50216: 6402 bccs 5021a <rtems_rfs_group_usage+0x5e> <== NOT EXECUTED
*inodes = rtems_rfs_fs_inodes (fs);
50218: 2280 movel %d0,%a1@ <== NOT EXECUTED
return 0;
}
5021a: 4280 clrl %d0 <== NOT EXECUTED 5021c: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 <== NOT EXECUTED 50220: 4e5e unlk %fp <== NOT EXECUTED
000504d0 <rtems_rfs_inode_close>:
}
int
rtems_rfs_inode_close (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
504d0: 4e56 0000 linkw %fp,#0 504d4: 2f0b movel %a3,%sp@-
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CLOSE))
504d6: 47f9 0005 37c0 lea 537c0 <rtems_rfs_trace>,%a3
}
int
rtems_rfs_inode_close (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
504dc: 2f0a movel %a2,%sp@- 504de: 246e 000c moveal %fp@(12),%a2
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CLOSE))
504e2: 2f3c 0008 0000 movel #524288,%sp@- 504e8: 42a7 clrl %sp@- 504ea: 4e93 jsr %a3@ 504ec: 508f addql #8,%sp 504ee: 4a00 tstb %d0
504f0: 6640 bnes 50532 <rtems_rfs_inode_close+0x62> <== NEVER TAKEN
printf ("rtems-rfs: inode-close: ino: %" PRIu32 "\n", handle->ino);
rc = rtems_rfs_inode_unload (fs, handle, true);
504f2: 4878 0001 pea 1 <ADD> 504f6: 2f0a movel %a2,%sp@- 504f8: 2f2e 0008 movel %fp@(8),%sp@- 504fc: 4eb9 0005 03d0 jsr 503d0 <rtems_rfs_inode_unload>
if ((rc == 0) && (handle->loads > 0))
50502: 4fef 000c lea %sp@(12),%sp 50506: 4a80 tstl %d0
50508: 6618 bnes 50522 <rtems_rfs_inode_close+0x52> <== NEVER TAKEN
5050a: 4aaa 0022 tstl %a2@(34)
5050e: 6f12 bles 50522 <rtems_rfs_inode_close+0x52> <== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CLOSE))
50510: 2f3c 0008 0000 movel #524288,%sp@- <== NOT EXECUTED 50516: 42a7 clrl %sp@- <== NOT EXECUTED 50518: 4e93 jsr %a3@ <== NOT EXECUTED 5051a: 508f addql #8,%sp <== NOT EXECUTED 5051c: 4a00 tstb %d0 <== NOT EXECUTED 5051e: 6626 bnes 50546 <rtems_rfs_inode_close+0x76> <== NOT EXECUTED
printf ("rtems-rfs: inode-close: bad loads number: %d\n",
handle->loads);
rc = EIO;
50520: 7005 moveq #5,%d0 <== NOT EXECUTED
}
handle->ino = 0;
50522: 42aa 0008 clrl %a2@(8)
return rc; }
50526: 246e fff8 moveal %fp@(-8),%a2 5052a: 266e fffc moveal %fp@(-4),%a3 5052e: 4e5e unlk %fp 50530: 4e75 rts
rtems_rfs_inode_handle* handle)
{
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CLOSE))
printf ("rtems-rfs: inode-close: ino: %" PRIu32 "\n", handle->ino);
50532: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 50536: 4879 0007 2e38 pea 72e38 <ramdisk_ops+0xa5a> <== NOT EXECUTED 5053c: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 50542: 508f addql #8,%sp <== NOT EXECUTED 50544: 60ac bras 504f2 <rtems_rfs_inode_close+0x22> <== NOT EXECUTED
rc = rtems_rfs_inode_unload (fs, handle, true);
if ((rc == 0) && (handle->loads > 0))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CLOSE))
printf ("rtems-rfs: inode-close: bad loads number: %d\n",
50546: 2f2a 0022 movel %a2@(34),%sp@- <== NOT EXECUTED 5054a: 4879 0007 2e5a pea 72e5a <ramdisk_ops+0xa7c> <== NOT EXECUTED 50550: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED
rc = EIO;
}
handle->ino = 0;
return rc;
}
50556: 266e fffc moveal %fp@(-4),%a3 <== NOT EXECUTED
rc = rtems_rfs_inode_unload (fs, handle, true);
if ((rc == 0) && (handle->loads > 0))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CLOSE))
printf ("rtems-rfs: inode-close: bad loads number: %d\n",
5055a: 508f addql #8,%sp <== NOT EXECUTED
handle->loads);
rc = EIO;
5055c: 7005 moveq #5,%d0 <== NOT EXECUTED
}
handle->ino = 0;
5055e: 42aa 0008 clrl %a2@(8) <== NOT EXECUTED
return rc; }
50562: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 50566: 4e5e unlk %fp <== NOT EXECUTED
00050892 <rtems_rfs_inode_create>:
uint16_t mode,
uint16_t links,
uid_t uid,
gid_t gid,
rtems_rfs_ino* ino)
{
50892: 4e56 ff88 linkw %fp,#-120 50896: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
rtems_rfs_inode_handle parent_inode;
rtems_rfs_inode_handle inode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CREATE))
5089a: 2f3c 0040 0000 movel #4194304,%sp@-
uint16_t mode,
uint16_t links,
uid_t uid,
gid_t gid,
rtems_rfs_ino* ino)
{
508a0: 2c2e 000c movel %fp@(12),%d6
rtems_rfs_inode_handle parent_inode;
rtems_rfs_inode_handle inode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CREATE))
508a4: 42a7 clrl %sp@-
uint16_t mode,
uint16_t links,
uid_t uid,
gid_t gid,
rtems_rfs_ino* ino)
{
508a6: 246e 0010 moveal %fp@(16),%a2 508aa: 262e 0014 movel %fp@(20),%d3 508ae: 3a2e 001a movew %fp@(26),%d5 508b2: 3e2e 001e movew %fp@(30),%d7 508b6: 386e 0022 moveaw %fp@(34),%a4 508ba: 3a6e 0026 moveaw %fp@(38),%a5
rtems_rfs_inode_handle parent_inode;
rtems_rfs_inode_handle inode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CREATE))
508be: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> 508c4: 508f addql #8,%sp 508c6: 4a00 tstb %d0
508c8: 6644 bnes 5090e <rtems_rfs_inode_create+0x7c> <== NEVER TAKEN
508ca: 0285 0000 ffff andil #65535,%d5 508d0: 2805 movel %d5,%d4 508d2: 0284 0000 f000 andil #61440,%d4
}
/*
* The file type is field within the mode. Check we have a sane mode set.
*/
switch (mode & RTEMS_RFS_S_IFMT)
508d8: 0c84 0000 6000 cmpil #24576,%d4 508de: 6700 00f4 beqw 509d4 <rtems_rfs_inode_create+0x142> 508e2: 0c84 0000 6000 cmpil #24576,%d4 508e8: 6f00 0144 blew 50a2e <rtems_rfs_inode_create+0x19c> 508ec: 0c84 0000 8000 cmpil #32768,%d4 508f2: 6700 00e0 beqw 509d4 <rtems_rfs_inode_create+0x142> 508f6: 0c84 0000 a000 cmpil #40960,%d4 508fc: 6700 00d6 beqw 509d4 <rtems_rfs_inode_create+0x142>
case RTEMS_RFS_S_IFBLK:
case RTEMS_RFS_S_IFREG:
case RTEMS_RFS_S_IFLNK:
break;
default:
return EINVAL;
50900: 7416 moveq #22,%d2 <== NOT EXECUTED
rtems_rfs_inode_free (fs, *ino);
return rc;
}
return 0;
}
50902: 2002 movel %d2,%d0 <== NOT EXECUTED 50904: 4cee 3cfc ff88 moveml %fp@(-120),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5090a: 4e5e unlk %fp <== NOT EXECUTED 5090c: 4e75 rts <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CREATE))
{
const char* type = "unknown";
int c;
if (RTEMS_RFS_S_ISDIR (mode))
type = "dir";
5090e: 41f9 0007 1171 lea 71171 <_rodata_start+0x321>,%a0 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CREATE))
{
const char* type = "unknown";
int c;
if (RTEMS_RFS_S_ISDIR (mode))
50914: 0285 0000 ffff andil #65535,%d5 <== NOT EXECUTED
type = "dir";
5091a: 2d48 ffb0 movel %a0,%fp@(-80) <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CREATE))
{
const char* type = "unknown";
int c;
if (RTEMS_RFS_S_ISDIR (mode))
5091e: 2805 movel %d5,%d4 <== NOT EXECUTED 50920: 0284 0000 f000 andil #61440,%d4 <== NOT EXECUTED 50926: 0c84 0000 4000 cmpil #16384,%d4 <== NOT EXECUTED 5092c: 674a beqs 50978 <rtems_rfs_inode_create+0xe6> <== NOT EXECUTED
type = "dir";
else if (RTEMS_RFS_S_ISCHR (mode))
type = "char";
5092e: 41f9 0007 2eb4 lea 72eb4 <ramdisk_ops+0xad6>,%a0 <== NOT EXECUTED 50934: 2d48 ffb0 movel %a0,%fp@(-80) <== NOT EXECUTED
{
const char* type = "unknown";
int c;
if (RTEMS_RFS_S_ISDIR (mode))
type = "dir";
else if (RTEMS_RFS_S_ISCHR (mode))
50938: 0c84 0000 2000 cmpil #8192,%d4 <== NOT EXECUTED 5093e: 6738 beqs 50978 <rtems_rfs_inode_create+0xe6> <== NOT EXECUTED
type = "char";
else if (RTEMS_RFS_S_ISBLK (mode))
type = "block";
50940: 41f9 0007 24cb lea 724cb <ramdisk_ops+0xed>,%a0 <== NOT EXECUTED 50946: 2d48 ffb0 movel %a0,%fp@(-80) <== NOT EXECUTED
int c;
if (RTEMS_RFS_S_ISDIR (mode))
type = "dir";
else if (RTEMS_RFS_S_ISCHR (mode))
type = "char";
else if (RTEMS_RFS_S_ISBLK (mode))
5094a: 0c84 0000 6000 cmpil #24576,%d4 <== NOT EXECUTED 50950: 6726 beqs 50978 <rtems_rfs_inode_create+0xe6> <== NOT EXECUTED
type = "block";
else if (RTEMS_RFS_S_ISREG (mode))
type = "file";
50952: 41f9 0007 10e5 lea 710e5 <_rodata_start+0x295>,%a0 <== NOT EXECUTED 50958: 2d48 ffb0 movel %a0,%fp@(-80) <== NOT EXECUTED
type = "dir";
else if (RTEMS_RFS_S_ISCHR (mode))
type = "char";
else if (RTEMS_RFS_S_ISBLK (mode))
type = "block";
else if (RTEMS_RFS_S_ISREG (mode))
5095c: 0c84 0000 8000 cmpil #32768,%d4 <== NOT EXECUTED 50962: 6714 beqs 50978 <rtems_rfs_inode_create+0xe6> <== NOT EXECUTED
rtems_rfs_inode_handle inode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CREATE))
{
const char* type = "unknown";
50964: 41f9 0007 2eb9 lea 72eb9 <ramdisk_ops+0xadb>,%a0 <== NOT EXECUTED 5096a: 2d48 ffb0 movel %a0,%fp@(-80) <== NOT EXECUTED
type = "char";
else if (RTEMS_RFS_S_ISBLK (mode))
type = "block";
else if (RTEMS_RFS_S_ISREG (mode))
type = "file";
else if (RTEMS_RFS_S_ISLNK (mode))
5096e: 0c84 0000 a000 cmpil #40960,%d4 <== NOT EXECUTED 50974: 6700 00ce beqw 50a44 <rtems_rfs_inode_create+0x1b2> <== NOT EXECUTED
type = "link";
printf("rtems-rfs: inode-create: parent:%" PRIu32 " name:", parent);
50978: 2f06 movel %d6,%sp@- <== NOT EXECUTED 5097a: 4879 0007 2ec1 pea 72ec1 <ramdisk_ops+0xae3> <== NOT EXECUTED 50980: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED
for (c = 0; c < length; c++)
50986: 508f addql #8,%sp <== NOT EXECUTED 50988: 4a83 tstl %d3 <== NOT EXECUTED 5098a: 671e beqs 509aa <rtems_rfs_inode_create+0x118> <== NOT EXECUTED 5098c: 4280 clrl %d0 <== NOT EXECUTED 5098e: 4282 clrl %d2 <== NOT EXECUTED 50990: 47f9 0006 3014 lea 63014 <putchar>,%a3 <== NOT EXECUTED 50996: 5282 addql #1,%d2 <== NOT EXECUTED
printf ("%c", name[c]);
50998: 1032 0800 moveb %a2@(00000000,%d0:l),%d0 <== NOT EXECUTED 5099c: 49c0 extbl %d0 <== NOT EXECUTED 5099e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 509a0: 4e93 jsr %a3@ <== NOT EXECUTED
else if (RTEMS_RFS_S_ISREG (mode))
type = "file";
else if (RTEMS_RFS_S_ISLNK (mode))
type = "link";
printf("rtems-rfs: inode-create: parent:%" PRIu32 " name:", parent);
for (c = 0; c < length; c++)
509a2: 588f addql #4,%sp <== NOT EXECUTED 509a4: 2002 movel %d2,%d0 <== NOT EXECUTED 509a6: b682 cmpl %d2,%d3 <== NOT EXECUTED 509a8: 66ec bnes 50996 <rtems_rfs_inode_create+0x104> <== NOT EXECUTED
printf ("%c", name[c]);
printf (" type:%s mode:%04x (%03o)\n", type, mode, mode & ((1 << 10) - 1));
509aa: 2005 movel %d5,%d0 <== NOT EXECUTED 509ac: 0280 0000 03ff andil #1023,%d0 <== NOT EXECUTED 509b2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 509b4: 2f05 movel %d5,%sp@- <== NOT EXECUTED 509b6: 2f2e ffb0 movel %fp@(-80),%sp@- <== NOT EXECUTED 509ba: 4879 0007 2eeb pea 72eeb <ramdisk_ops+0xb0d> <== NOT EXECUTED 509c0: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 509c6: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
}
/*
* The file type is field within the mode. Check we have a sane mode set.
*/
switch (mode & RTEMS_RFS_S_IFMT)
509ca: 0c84 0000 6000 cmpil #24576,%d4 <== NOT EXECUTED 509d0: 6600 ff10 bnew 508e2 <rtems_rfs_inode_create+0x50> <== NOT EXECUTED
break;
default:
return EINVAL;
}
rc = rtems_rfs_inode_alloc (fs, parent, ino);
509d4: 2f2e 0028 movel %fp@(40),%sp@- 509d8: 2f06 movel %d6,%sp@- 509da: 2f2e 0008 movel %fp@(8),%sp@- 509de: 4eb9 0005 0224 jsr 50224 <rtems_rfs_inode_alloc>
if (rc > 0)
509e4: 4fef 000c lea %sp@(12),%sp
break;
default:
return EINVAL;
}
rc = rtems_rfs_inode_alloc (fs, parent, ino);
509e8: 2400 movel %d0,%d2
if (rc > 0)
509ea: 6e00 ff16 bgtw 50902 <rtems_rfs_inode_create+0x70>
return rc;
rc = rtems_rfs_inode_open (fs, *ino, &inode, true);
509ee: 4878 0001 pea 1 <ADD> 509f2: 47ee ffda lea %fp@(-38),%a3 509f6: 206e 0028 moveal %fp@(40),%a0 509fa: 2f0b movel %a3,%sp@- 509fc: 2f10 movel %a0@,%sp@- 509fe: 2f2e 0008 movel %fp@(8),%sp@- 50a02: 4eb9 0005 0300 jsr 50300 <rtems_rfs_inode_open>
if (rc > 0)
50a08: 4fef 0010 lea %sp@(16),%sp
rc = rtems_rfs_inode_alloc (fs, parent, ino);
if (rc > 0)
return rc;
rc = rtems_rfs_inode_open (fs, *ino, &inode, true);
50a0c: 2400 movel %d0,%d2
if (rc > 0)
50a0e: 6f58 bles 50a68 <rtems_rfs_inode_create+0x1d6> <== ALWAYS TAKEN
}
rc = rtems_rfs_inode_close (fs, &inode);
if (rc > 0)
{
rtems_rfs_inode_free (fs, *ino);
50a10: 206e 0028 moveal %fp@(40),%a0 <== NOT EXECUTED 50a14: 2f10 movel %a0@,%sp@- <== NOT EXECUTED 50a16: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 50a1a: 4eb9 0005 024a jsr 5024a <rtems_rfs_inode_free> <== NOT EXECUTED
return rc;
50a20: 508f addql #8,%sp <== NOT EXECUTED
}
return 0;
}
50a22: 2002 movel %d2,%d0 <== NOT EXECUTED 50a24: 4cee 3cfc ff88 moveml %fp@(-120),%d2-%d7/%a2-%a5 <== NOT EXECUTED 50a2a: 4e5e unlk %fp <== NOT EXECUTED 50a2c: 4e75 rts <== NOT EXECUTED
}
/*
* The file type is field within the mode. Check we have a sane mode set.
*/
switch (mode & RTEMS_RFS_S_IFMT)
50a2e: 0c84 0000 2000 cmpil #8192,%d4
50a34: 679e beqs 509d4 <rtems_rfs_inode_create+0x142> <== NEVER TAKEN
50a36: 0c84 0000 4000 cmpil #16384,%d4
50a3c: 6796 beqs 509d4 <rtems_rfs_inode_create+0x142> <== ALWAYS TAKEN
case RTEMS_RFS_S_IFBLK:
case RTEMS_RFS_S_IFREG:
case RTEMS_RFS_S_IFLNK:
break;
default:
return EINVAL;
50a3e: 7416 moveq #22,%d2 <== NOT EXECUTED 50a40: 6000 fec0 braw 50902 <rtems_rfs_inode_create+0x70> <== NOT EXECUTED
type = "block";
else if (RTEMS_RFS_S_ISREG (mode))
type = "file";
else if (RTEMS_RFS_S_ISLNK (mode))
type = "link";
printf("rtems-rfs: inode-create: parent:%" PRIu32 " name:", parent);
50a44: 2f06 movel %d6,%sp@- <== NOT EXECUTED
else if (RTEMS_RFS_S_ISBLK (mode))
type = "block";
else if (RTEMS_RFS_S_ISREG (mode))
type = "file";
else if (RTEMS_RFS_S_ISLNK (mode))
type = "link";
50a46: 41f9 0007 4e62 lea 74e62 <_global_impure_ptr+0x164>,%a0 <== NOT EXECUTED
printf("rtems-rfs: inode-create: parent:%" PRIu32 " name:", parent);
50a4c: 4879 0007 2ec1 pea 72ec1 <ramdisk_ops+0xae3> <== NOT EXECUTED
else if (RTEMS_RFS_S_ISBLK (mode))
type = "block";
else if (RTEMS_RFS_S_ISREG (mode))
type = "file";
else if (RTEMS_RFS_S_ISLNK (mode))
type = "link";
50a52: 2d48 ffb0 movel %a0,%fp@(-80) <== NOT EXECUTED
printf("rtems-rfs: inode-create: parent:%" PRIu32 " name:", parent);
50a56: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED
for (c = 0; c < length; c++)
50a5c: 508f addql #8,%sp <== NOT EXECUTED 50a5e: 4a83 tstl %d3 <== NOT EXECUTED 50a60: 6600 ff2a bnew 5098c <rtems_rfs_inode_create+0xfa> <== NOT EXECUTED 50a64: 6000 ff44 braw 509aa <rtems_rfs_inode_create+0x118> <== NOT EXECUTED
{
rtems_rfs_inode_free (fs, *ino);
return rc;
}
rc = rtems_rfs_inode_initialise (&inode, links, mode, uid, gid);
50a68: 3f0d movew %a5,%sp@- 50a6a: 4267 clrw %sp@- 50a6c: 3f0c movew %a4,%sp@- 50a6e: 4267 clrw %sp@- 50a70: 2f05 movel %d5,%sp@- 50a72: 3f07 movew %d7,%sp@- 50a74: 4267 clrw %sp@- 50a76: 2f0b movel %a3,%sp@- 50a78: 4eb9 0005 0738 jsr 50738 <rtems_rfs_inode_initialise>
if (rc > 0)
50a7e: 4fef 0014 lea %sp@(20),%sp
{
rtems_rfs_inode_free (fs, *ino);
return rc;
}
rc = rtems_rfs_inode_initialise (&inode, links, mode, uid, gid);
50a82: 2400 movel %d0,%d2
if (rc > 0)
50a84: 6e00 015e bgtw 50be4 <rtems_rfs_inode_create+0x352>
/* * Only handle the specifics of a directory. Let caller handle the others. * * The inode delete will free the inode. */ if (RTEMS_RFS_S_ISDIR (mode))
50a88: 0c84 0000 4000 cmpil #16384,%d4 50a8e: 6700 00ac beqw 50b3c <rtems_rfs_inode_create+0x2aa>
rtems_rfs_inode_close (fs, &inode);
return rc;
}
}
rc = rtems_rfs_inode_open (fs, parent, &parent_inode, true);
50a92: 4878 0001 pea 1 <ADD> 50a96: 49ee ffb4 lea %fp@(-76),%a4 50a9a: 2f0c movel %a4,%sp@- 50a9c: 2f06 movel %d6,%sp@- 50a9e: 2f2e 0008 movel %fp@(8),%sp@- 50aa2: 4eb9 0005 0300 jsr 50300 <rtems_rfs_inode_open>
if (rc > 0)
50aa8: 4fef 0010 lea %sp@(16),%sp
rtems_rfs_inode_close (fs, &inode);
return rc;
}
}
rc = rtems_rfs_inode_open (fs, parent, &parent_inode, true);
50aac: 2400 movel %d0,%d2
if (rc > 0)
50aae: 6f28 bles 50ad8 <rtems_rfs_inode_create+0x246> <== ALWAYS TAKEN
{
rtems_rfs_inode_delete (fs, &inode);
50ab0: 2f0b movel %a3,%sp@- 50ab2: 2f2e 0008 movel %fp@(8),%sp@- 50ab6: 4eb9 0005 056a jsr 5056a <rtems_rfs_inode_delete>
rtems_rfs_inode_close (fs, &inode);
50abc: 2f0b movel %a3,%sp@- 50abe: 2f2e 0008 movel %fp@(8),%sp@- 50ac2: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close>
return rc;
50ac8: 4fef 0010 lea %sp@(16),%sp
rtems_rfs_inode_free (fs, *ino);
return rc;
}
return 0;
}
50acc: 2002 movel %d2,%d0 50ace: 4cee 3cfc ff88 moveml %fp@(-120),%d2-%d7/%a2-%a5 50ad4: 4e5e unlk %fp 50ad6: 4e75 rts
rtems_rfs_inode_delete (fs, &inode);
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_dir_add_entry (fs, &parent_inode, name, length, *ino);
50ad8: 206e 0028 moveal %fp@(40),%a0 50adc: 2f10 movel %a0@,%sp@- 50ade: 2f03 movel %d3,%sp@- 50ae0: 2f0a movel %a2,%sp@- 50ae2: 2f0c movel %a4,%sp@- 50ae4: 2f2e 0008 movel %fp@(8),%sp@- 50ae8: 4eb9 0005 ca10 jsr 5ca10 <rtems_rfs_dir_add_entry>
if (rc > 0)
50aee: 4fef 0014 lea %sp@(20),%sp
rtems_rfs_inode_delete (fs, &inode);
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_dir_add_entry (fs, &parent_inode, name, length, *ino);
50af2: 2400 movel %d0,%d2
if (rc > 0)
50af4: 6e00 011a bgtw 50c10 <rtems_rfs_inode_create+0x37e>
/*
* If the node is a directory update the parent link count as the
* new directory has the '..' link that points to the parent.
*/
if (RTEMS_RFS_S_ISDIR (mode))
50af8: 0c84 0000 4000 cmpil #16384,%d4 50afe: 6700 00aa beqw 50baa <rtems_rfs_inode_create+0x318>
rtems_rfs_inode_set_links (&parent_inode,
rtems_rfs_inode_get_links (&parent_inode) + 1);
rc = rtems_rfs_inode_close (fs, &parent_inode);
50b02: 2f0c movel %a4,%sp@- 50b04: 2f2e 0008 movel %fp@(8),%sp@- 50b08: 45f9 0005 04d0 lea 504d0 <rtems_rfs_inode_close>,%a2 50b0e: 4e92 jsr %a2@
if (rc > 0)
50b10: 508f addql #8,%sp
*/
if (RTEMS_RFS_S_ISDIR (mode))
rtems_rfs_inode_set_links (&parent_inode,
rtems_rfs_inode_get_links (&parent_inode) + 1);
rc = rtems_rfs_inode_close (fs, &parent_inode);
50b12: 2400 movel %d0,%d2
if (rc > 0)
50b14: 6f00 012c blew 50c42 <rtems_rfs_inode_create+0x3b0>
{
rtems_rfs_inode_delete (fs, &inode);
50b18: 2f0b movel %a3,%sp@- <== NOT EXECUTED 50b1a: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 50b1e: 4eb9 0005 056a jsr 5056a <rtems_rfs_inode_delete> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
50b24: 2f0b movel %a3,%sp@- <== NOT EXECUTED 50b26: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 50b2a: 4e92 jsr %a2@ <== NOT EXECUTED
return rc;
50b2c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rtems_rfs_inode_free (fs, *ino);
return rc;
}
return 0;
}
50b30: 2002 movel %d2,%d0 <== NOT EXECUTED 50b32: 4cee 3cfc ff88 moveml %fp@(-120),%d2-%d7/%a2-%a5 <== NOT EXECUTED 50b38: 4e5e unlk %fp <== NOT EXECUTED 50b3a: 4e75 rts <== NOT EXECUTED
*
* The inode delete will free the inode.
*/
if (RTEMS_RFS_S_ISDIR (mode))
{
rc = rtems_rfs_dir_add_entry (fs, &inode, ".", 1, *ino);
50b3c: 206e 0028 moveal %fp@(40),%a0 50b40: 49f9 0005 ca10 lea 5ca10 <rtems_rfs_dir_add_entry>,%a4 50b46: 2f10 movel %a0@,%sp@- 50b48: 4878 0001 pea 1 <ADD> 50b4c: 4879 0007 0ffa pea 70ffa <_rodata_start+0x1aa> 50b52: 2f0b movel %a3,%sp@- 50b54: 2f2e 0008 movel %fp@(8),%sp@- 50b58: 4e94 jsr %a4@
if (rc == 0)
50b5a: 4fef 0014 lea %sp@(20),%sp
*
* The inode delete will free the inode.
*/
if (RTEMS_RFS_S_ISDIR (mode))
{
rc = rtems_rfs_dir_add_entry (fs, &inode, ".", 1, *ino);
50b5e: 2400 movel %d0,%d2
if (rc == 0)
50b60: 6728 beqs 50b8a <rtems_rfs_inode_create+0x2f8>
rc = rtems_rfs_dir_add_entry (fs, &inode, "..", 2, parent);
if (rc > 0)
50b62: 6e00 ff4c bgtw 50ab0 <rtems_rfs_inode_create+0x21e>
rtems_rfs_inode_close (fs, &inode);
return rc;
}
}
rc = rtems_rfs_inode_open (fs, parent, &parent_inode, true);
50b66: 4878 0001 pea 1 <ADD> 50b6a: 49ee ffb4 lea %fp@(-76),%a4 50b6e: 2f0c movel %a4,%sp@- 50b70: 2f06 movel %d6,%sp@- 50b72: 2f2e 0008 movel %fp@(8),%sp@- 50b76: 4eb9 0005 0300 jsr 50300 <rtems_rfs_inode_open>
if (rc > 0)
50b7c: 4fef 0010 lea %sp@(16),%sp
rtems_rfs_inode_close (fs, &inode);
return rc;
}
}
rc = rtems_rfs_inode_open (fs, parent, &parent_inode, true);
50b80: 2400 movel %d0,%d2
if (rc > 0)
50b82: 6e00 ff2c bgtw 50ab0 <rtems_rfs_inode_create+0x21e> 50b86: 6000 ff50 braw 50ad8 <rtems_rfs_inode_create+0x246>
*/
if (RTEMS_RFS_S_ISDIR (mode))
{
rc = rtems_rfs_dir_add_entry (fs, &inode, ".", 1, *ino);
if (rc == 0)
rc = rtems_rfs_dir_add_entry (fs, &inode, "..", 2, parent);
50b8a: 2f06 movel %d6,%sp@- 50b8c: 4878 0002 pea 2 <DOUBLE_FLOAT> 50b90: 4879 0007 0ff9 pea 70ff9 <_rodata_start+0x1a9> 50b96: 2f0b movel %a3,%sp@- 50b98: 2f2e 0008 movel %fp@(8),%sp@- 50b9c: 4e94 jsr %a4@ 50b9e: 4fef 0014 lea %sp@(20),%sp 50ba2: 2400 movel %d0,%d2
if (rc > 0)
50ba4: 6fc0 bles 50b66 <rtems_rfs_inode_create+0x2d4> <== ALWAYS TAKEN
50ba6: 6000 ff08 braw 50ab0 <rtems_rfs_inode_create+0x21e> <== NOT EXECUTED
* If the node is a directory update the parent link count as the
* new directory has the '..' link that points to the parent.
*/
if (RTEMS_RFS_S_ISDIR (mode))
rtems_rfs_inode_set_links (&parent_inode,
rtems_rfs_inode_get_links (&parent_inode) + 1);
50baa: 206c 000c moveal %a4@(12),%a0
*/
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
50bae: 4280 clrl %d0 50bb0: 1010 moveb %a0@,%d0 50bb2: 4281 clrl %d1 50bb4: 1228 0001 moveb %a0@(1),%d1 50bb8: e188 lsll #8,%d0 50bba: 8081 orl %d1,%d0
if (links == 0xffff)
50bbc: 3200 movew %d0,%d1
links = 0;
50bbe: 0c81 0000 ffff cmpil #65535,%d1 50bc4: 56c1 sne %d1 50bc6: 4881 extw %d1 50bc8: c081 andl %d1,%d0
/*
* If the node is a directory update the parent link count as the
* new directory has the '..' link that points to the parent.
*/
if (RTEMS_RFS_S_ISDIR (mode))
rtems_rfs_inode_set_links (&parent_inode,
50bca: 5280 addql #1,%d0
* @prarm links The links.
*/
static inline void
rtems_rfs_inode_set_links (rtems_rfs_inode_handle* handle, uint16_t links)
{
rtems_rfs_write_u16 (&handle->node->links, links);
50bcc: 2200 movel %d0,%d1 50bce: e089 lsrl #8,%d1 50bd0: 1081 moveb %d1,%a0@ 50bd2: 206c 000c moveal %a4@(12),%a0 50bd6: 1140 0001 moveb %d0,%a0@(1)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
50bda: 7001 moveq #1,%d0 50bdc: 1d40 ffc4 moveb %d0,%fp@(-60) 50be0: 6000 ff20 braw 50b02 <rtems_rfs_inode_create+0x270>
}
rc = rtems_rfs_inode_initialise (&inode, links, mode, uid, gid);
if (rc > 0)
{
rtems_rfs_inode_close (fs, &inode);
50be4: 2f0b movel %a3,%sp@- <== NOT EXECUTED 50be6: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 50bea: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_inode_free (fs, *ino);
50bf0: 206e 0028 moveal %fp@(40),%a0 <== NOT EXECUTED 50bf4: 2f10 movel %a0@,%sp@- <== NOT EXECUTED 50bf6: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 50bfa: 4eb9 0005 024a jsr 5024a <rtems_rfs_inode_free> <== NOT EXECUTED
return rc;
50c00: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rtems_rfs_inode_free (fs, *ino);
return rc;
}
return 0;
}
50c04: 2002 movel %d2,%d0 <== NOT EXECUTED 50c06: 4cee 3cfc ff88 moveml %fp@(-120),%d2-%d7/%a2-%a5 <== NOT EXECUTED 50c0c: 4e5e unlk %fp <== NOT EXECUTED 50c0e: 4e75 rts <== NOT EXECUTED
}
rc = rtems_rfs_dir_add_entry (fs, &parent_inode, name, length, *ino);
if (rc > 0)
{
rtems_rfs_inode_delete (fs, &inode);
50c10: 2f0b movel %a3,%sp@- <== NOT EXECUTED 50c12: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
50c16: 45f9 0005 04d0 lea 504d0 <rtems_rfs_inode_close>,%a2 <== NOT EXECUTED
}
rc = rtems_rfs_dir_add_entry (fs, &parent_inode, name, length, *ino);
if (rc > 0)
{
rtems_rfs_inode_delete (fs, &inode);
50c1c: 4eb9 0005 056a jsr 5056a <rtems_rfs_inode_delete> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
50c22: 2f0b movel %a3,%sp@- <== NOT EXECUTED 50c24: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 50c28: 4e92 jsr %a2@ <== NOT EXECUTED
rtems_rfs_inode_close (fs, &parent_inode);
50c2a: 2f0c movel %a4,%sp@- <== NOT EXECUTED 50c2c: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 50c30: 4e92 jsr %a2@ <== NOT EXECUTED
return rc;
50c32: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
rtems_rfs_inode_free (fs, *ino);
return rc;
}
return 0;
}
50c36: 2002 movel %d2,%d0 <== NOT EXECUTED 50c38: 4cee 3cfc ff88 moveml %fp@(-120),%d2-%d7/%a2-%a5 <== NOT EXECUTED 50c3e: 4e5e unlk %fp <== NOT EXECUTED 50c40: 4e75 rts <== NOT EXECUTED
rtems_rfs_inode_delete (fs, &inode);
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_inode_close (fs, &inode);
50c42: 2f0b movel %a3,%sp@- 50c44: 2f2e 0008 movel %fp@(8),%sp@- 50c48: 4e92 jsr %a2@
if (rc > 0)
50c4a: 508f addql #8,%sp
rtems_rfs_inode_delete (fs, &inode);
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_inode_close (fs, &inode);
50c4c: 2400 movel %d0,%d2
if (rc > 0)
50c4e: 6e00 fdc0 bgtw 50a10 <rtems_rfs_inode_create+0x17e>
{
rtems_rfs_inode_free (fs, *ino);
return rc;
}
return 0;
50c52: 4282 clrl %d2
}
50c54: 2002 movel %d2,%d0 50c56: 4cee 3cfc ff88 moveml %fp@(-120),%d2-%d7/%a2-%a5
50c5c: 4e5e unlk %fp <== NOT EXECUTED
0005056a <rtems_rfs_inode_delete>:
}
int
rtems_rfs_inode_delete (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
5056a: 4e56 ffa8 linkw %fp,#-88 5056e: 48d7 040c moveml %d2-%d3/%a2,%sp@
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_DELETE))
50572: 2f3c 0080 0000 movel #8388608,%sp@-
}
int
rtems_rfs_inode_delete (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
50578: 242e 0008 movel %fp@(8),%d2
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_DELETE))
5057c: 42a7 clrl %sp@-
}
int
rtems_rfs_inode_delete (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
5057e: 246e 000c moveal %fp@(12),%a2
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_DELETE))
50582: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> 50588: 508f addql #8,%sp 5058a: 4a00 tstb %d0
5058c: 6728 beqs 505b6 <rtems_rfs_inode_delete+0x4c> <== ALWAYS TAKEN
printf("rtems-rfs: inode-delete: ino:%" PRIu32 " loaded:%s\n",
5058e: 203c 0007 319e movel #471454,%d0 <== NOT EXECUTED 50594: 4aaa 000c tstl %a2@(12) <== NOT EXECUTED 50598: 6706 beqs 505a0 <rtems_rfs_inode_delete+0x36> <== NOT EXECUTED 5059a: 203c 0007 2dab movel #470443,%d0 <== NOT EXECUTED 505a0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 505a2: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 505a6: 4879 0007 2e88 pea 72e88 <ramdisk_ops+0xaaa> <== NOT EXECUTED 505ac: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 505b2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rtems_rfs_inode_ino (handle),
rtems_rfs_inode_is_loaded (handle) ? "yes" : "no");
if (rtems_rfs_inode_is_loaded (handle))
505b6: 4aaa 000c tstl %a2@(12)
505ba: 671c beqs 505d8 <rtems_rfs_inode_delete+0x6e> <== NEVER TAKEN
rtems_rfs_block_map map;
/*
* Free the ino number.
*/
rc = rtems_rfs_inode_free (fs, handle->ino);
505bc: 2f2a 0008 movel %a2@(8),%sp@- 505c0: 2f02 movel %d2,%sp@- 505c2: 4eb9 0005 024a jsr 5024a <rtems_rfs_inode_free>
if (rc > 0)
505c8: 508f addql #8,%sp 505ca: 4a80 tstl %d0
505cc: 6f16 bles 505e4 <rtems_rfs_inode_delete+0x7a> <== ALWAYS TAKEN
handle->loads = 0;
handle->node = NULL;
}
}
return rc;
}
505ce: 4cee 040c ffa8 moveml %fp@(-88),%d2-%d3/%a2 <== NOT EXECUTED 505d4: 4e5e unlk %fp <== NOT EXECUTED 505d6: 4e75 rts <== NOT EXECUTED
int
rtems_rfs_inode_delete (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
int rc = 0;
505d8: 4280 clrl %d0 <== NOT EXECUTED
handle->loads = 0;
handle->node = NULL;
}
}
return rc;
}
505da: 4cee 040c ffa8 moveml %fp@(-88),%d2-%d3/%a2 <== NOT EXECUTED 505e0: 4e5e unlk %fp <== NOT EXECUTED 505e2: 4e75 rts <== NOT EXECUTED
return rc;
/*
* Free the blocks the inode may have attached.
*/
rc = rtems_rfs_block_map_open (fs, handle, &map);
505e4: 260e movel %fp,%d3 505e6: 0683 ffff ffb6 addil #-74,%d3 505ec: 2f03 movel %d3,%sp@- 505ee: 2f0a movel %a2,%sp@- 505f0: 2f02 movel %d2,%sp@- 505f2: 4eb9 0005 adf2 jsr 5adf2 <rtems_rfs_block_map_open>
if (rc == 0)
505f8: 4fef 000c lea %sp@(12),%sp 505fc: 4a80 tstl %d0
505fe: 66ce bnes 505ce <rtems_rfs_inode_delete+0x64> <== NEVER TAKEN
{
int rrc;
rrc = rtems_rfs_block_map_free_all (fs, &map);
50600: 2f03 movel %d3,%sp@- 50602: 2f02 movel %d2,%sp@- 50604: 4eb9 0005 b9f6 jsr 5b9f6 <rtems_rfs_block_map_free_all>
rc = rtems_rfs_block_map_close (fs, &map);
5060a: 2f03 movel %d3,%sp@-
if (rc > 0)
rrc = rc;
memset (handle->node, 0xff, RTEMS_RFS_INODE_SIZE);
5060c: 76ff moveq #-1,%d3
rc = rtems_rfs_block_map_open (fs, handle, &map);
if (rc == 0)
{
int rrc;
rrc = rtems_rfs_block_map_free_all (fs, &map);
rc = rtems_rfs_block_map_close (fs, &map);
5060e: 2f02 movel %d2,%sp@- 50610: 4eb9 0005 af84 jsr 5af84 <rtems_rfs_block_map_close>
if (rc > 0)
rrc = rc;
memset (handle->node, 0xff, RTEMS_RFS_INODE_SIZE);
50616: 206a 000c moveal %a2@(12),%a0 5061a: 70ff moveq #-1,%d0 5061c: 72ff moveq #-1,%d1 5061e: 20c0 movel %d0,%a0@+ 50620: 70ff moveq #-1,%d0 50622: 20c1 movel %d1,%a0@+ 50624: 72ff moveq #-1,%d1 50626: 20c3 movel %d3,%a0@+ 50628: 76ff moveq #-1,%d3 5062a: 20c0 movel %d0,%a0@+ 5062c: 70ff moveq #-1,%d0 5062e: 20c1 movel %d1,%a0@+ 50630: 72ff moveq #-1,%d1 50632: 20c3 movel %d3,%a0@+ 50634: 76ff moveq #-1,%d3 50636: 20c0 movel %d0,%a0@+ 50638: 70ff moveq #-1,%d0 5063a: 20c1 movel %d1,%a0@+ 5063c: 72ff moveq #-1,%d1 5063e: 20c3 movel %d3,%a0@+ 50640: 76ff moveq #-1,%d3 50642: 20c0 movel %d0,%a0@+ 50644: 70ff moveq #-1,%d0 50646: 20c1 movel %d1,%a0@+ 50648: 72ff moveq #-1,%d1 5064a: 20c3 movel %d3,%a0@+ 5064c: 20c0 movel %d0,%a0@+
rtems_rfs_buffer_mark_dirty (&handle->buffer);
5064e: 7001 moveq #1,%d0
int rrc;
rrc = rtems_rfs_block_map_free_all (fs, &map);
rc = rtems_rfs_block_map_close (fs, &map);
if (rc > 0)
rrc = rc;
memset (handle->node, 0xff, RTEMS_RFS_INODE_SIZE);
50650: 2081 movel %d1,%a0@
/*
* Do the release here to avoid the ctime field being set on a
* close. Also if there loads is greater then one then other loads
* active. Forcing the loads count to 0.
*/
rc = rtems_rfs_buffer_handle_release (fs, &handle->buffer);
50652: 486a 0010 pea %a2@(16)
rrc = rtems_rfs_block_map_free_all (fs, &map);
rc = rtems_rfs_block_map_close (fs, &map);
if (rc > 0)
rrc = rc;
memset (handle->node, 0xff, RTEMS_RFS_INODE_SIZE);
rtems_rfs_buffer_mark_dirty (&handle->buffer);
50656: 1540 0010 moveb %d0,%a2@(16)
/*
* Do the release here to avoid the ctime field being set on a
* close. Also if there loads is greater then one then other loads
* active. Forcing the loads count to 0.
*/
rc = rtems_rfs_buffer_handle_release (fs, &handle->buffer);
5065a: 2f02 movel %d2,%sp@- 5065c: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release>
handle->loads = 0;
handle->node = NULL;
50662: 4fef 0018 lea %sp@(24),%sp
* Do the release here to avoid the ctime field being set on a
* close. Also if there loads is greater then one then other loads
* active. Forcing the loads count to 0.
*/
rc = rtems_rfs_buffer_handle_release (fs, &handle->buffer);
handle->loads = 0;
50666: 42aa 0022 clrl %a2@(34)
handle->node = NULL;
5066a: 42aa 000c clrl %a2@(12)
}
}
return rc;
}
5066e: 4cee 040c ffa8 moveml %fp@(-88),%d2-%d3/%a2
50674: 4e5e unlk %fp <== NOT EXECUTED
00050264 <rtems_rfs_inode_load>:
}
int
rtems_rfs_inode_load (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
50264: 4e56 0000 linkw %fp,#0 50268: 2f0a movel %a2,%sp@- 5026a: 246e 000c moveal %fp@(12),%a2
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_LOAD))
5026e: 2f3c 0010 0000 movel #1048576,%sp@- 50274: 42a7 clrl %sp@- 50276: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> 5027c: 508f addql #8,%sp 5027e: 4a00 tstb %d0
50280: 672c beqs 502ae <rtems_rfs_inode_load+0x4a> <== ALWAYS TAKEN
printf ("rtems-rfs: inode-load: ino=%" PRIu32 " loads=%i loaded=%s\n",
50282: 203c 0007 319e movel #471454,%d0 <== NOT EXECUTED 50288: 4aaa 000c tstl %a2@(12) <== NOT EXECUTED 5028c: 6706 beqs 50294 <rtems_rfs_inode_load+0x30> <== NOT EXECUTED 5028e: 203c 0007 2dab movel #470443,%d0 <== NOT EXECUTED 50294: 2f00 movel %d0,%sp@- <== NOT EXECUTED 50296: 2f2a 0022 movel %a2@(34),%sp@- <== NOT EXECUTED 5029a: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 5029e: 4879 0007 2daf pea 72daf <ramdisk_ops+0x9d1> <== NOT EXECUTED 502a4: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 502aa: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
/*
* An inode does not move so once loaded no need to do again.
*/
if (!rtems_rfs_inode_is_loaded (handle))
502ae: 4aaa 000c tstl %a2@(12)
502b2: 670e beqs 502c2 <rtems_rfs_inode_load+0x5e>
handle->node = rtems_rfs_buffer_data (&handle->buffer);
handle->node += handle->offset;
}
handle->loads++;
502b4: 52aa 0022 addql #1,%a2@(34)
return 0;
502b8: 4280 clrl %d0
}
502ba: 246e fffc moveal %fp@(-4),%a2 502be: 4e5e unlk %fp 502c0: 4e75 rts
if (!rtems_rfs_inode_is_loaded (handle))
{
int rc;
rc = rtems_rfs_buffer_handle_request (fs,&handle->buffer,
502c2: 4878 0001 pea 1 <ADD> 502c6: 2f2a 001a movel %a2@(26),%sp@- 502ca: 486a 0010 pea %a2@(16) 502ce: 2f2e 0008 movel %fp@(8),%sp@- 502d2: 4eb9 0005 bd6e jsr 5bd6e <rtems_rfs_buffer_handle_request>
handle->block, true);
if (rc > 0)
502d8: 4fef 0010 lea %sp@(16),%sp 502dc: 4a80 tstl %d0
502de: 6eda bgts 502ba <rtems_rfs_inode_load+0x56> <== NEVER TAKEN
return rc;
handle->node = rtems_rfs_buffer_data (&handle->buffer);
handle->node += handle->offset;
502e0: 202a 001e movel %a2@(30),%d0 502e4: 2200 movel %d0,%d1 502e6: ed88 lsll #6,%d0 502e8: e789 lsll #3,%d1
rc = rtems_rfs_buffer_handle_request (fs,&handle->buffer,
handle->block, true);
if (rc > 0)
return rc;
handle->node = rtems_rfs_buffer_data (&handle->buffer);
502ea: 206a 0016 moveal %a2@(22),%a0
handle->node += handle->offset;
502ee: 9081 subl %d1,%d0 502f0: d0a8 001e addl %a0@(30),%d0
}
handle->loads++;
502f4: 52aa 0022 addql #1,%a2@(34)
handle->block, true);
if (rc > 0)
return rc;
handle->node = rtems_rfs_buffer_data (&handle->buffer);
handle->node += handle->offset;
502f8: 2540 000c movel %d0,%a2@(12)
}
handle->loads++;
return 0;
502fc: 4280 clrl %d0 502fe: 60ba bras 502ba <rtems_rfs_inode_load+0x56>
00050300 <rtems_rfs_inode_open>:
int
rtems_rfs_inode_open (rtems_rfs_file_system* fs,
rtems_rfs_ino ino,
rtems_rfs_inode_handle* handle,
bool load)
{
50300: 4e56 fff0 linkw %fp,#-16 50304: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
int group;
int gino;
int index;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_OPEN))
50308: 2f3c 0004 0000 movel #262144,%sp@-
int
rtems_rfs_inode_open (rtems_rfs_file_system* fs,
rtems_rfs_ino ino,
rtems_rfs_inode_handle* handle,
bool load)
{
5030e: 246e 0008 moveal %fp@(8),%a2
int group;
int gino;
int index;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_OPEN))
50312: 42a7 clrl %sp@-
int
rtems_rfs_inode_open (rtems_rfs_file_system* fs,
rtems_rfs_ino ino,
rtems_rfs_inode_handle* handle,
bool load)
{
50314: 242e 000c movel %fp@(12),%d2 50318: 266e 0010 moveal %fp@(16),%a3 5031c: 162e 0017 moveb %fp@(23),%d3
int group;
int gino;
int index;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_OPEN))
50320: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> 50326: 508f addql #8,%sp 50328: 4a00 tstb %d0
5032a: 6676 bnes 503a2 <rtems_rfs_inode_open+0xa2> <== NEVER TAKEN
printf ("rtems-rfs: inode-open: ino: %" PRIu32 "\n", ino);
if (ino == RTEMS_RFS_EMPTY_INO)
5032c: 4a82 tstl %d2
5032e: 660c bnes 5033c <rtems_rfs_inode_open+0x3c> <== ALWAYS TAKEN
return EINVAL;
if ((ino - RTEMS_RFS_ROOT_INO) > rtems_rfs_fs_inodes (fs))
return EINVAL;
50330: 7016 moveq #22,%d0 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_open (fs, &handle->buffer);
if ((rc == 0) && load)
rc = rtems_rfs_inode_load (fs, handle);
return rc;
}
50332: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED 50338: 4e5e unlk %fp <== NOT EXECUTED 5033a: 4e75 rts <== NOT EXECUTED
printf ("rtems-rfs: inode-open: ino: %" PRIu32 "\n", ino);
if (ino == RTEMS_RFS_EMPTY_INO)
return EINVAL;
if ((ino - RTEMS_RFS_ROOT_INO) > rtems_rfs_fs_inodes (fs))
5033c: 2002 movel %d2,%d0 5033e: 5380 subql #1,%d0 50340: b0aa 0010 cmpl %a2@(16),%d0
50344: 62ea bhis 50330 <rtems_rfs_inode_open+0x30> <== NEVER TAKEN
group = gino / fs->group_inodes;
gino = gino % fs->group_inodes;
index = (gino / fs->inodes_per_block) + RTEMS_RFS_GROUP_INODE_BLOCK;
handle->offset = gino % fs->inodes_per_block;
handle->block = rtems_rfs_group_block (&fs->groups[group], index);
50346: 206a 001c moveal %a2@(28),%a0
handle->node = NULL;
handle->loads = 0;
gino = ino - RTEMS_RFS_ROOT_INO;
group = gino / fs->group_inodes;
gino = gino % fs->group_inodes;
5034a: 4c6a 0001 0028 remul %a2@(40),%d1,%d0 50350: 4c6a 0000 0028 remul %a2@(40),%d0,%d0
return EINVAL;
if ((ino - RTEMS_RFS_ROOT_INO) > rtems_rfs_fs_inodes (fs))
return EINVAL;
handle->ino = ino;
50356: 2742 0008 movel %d2,%a3@(8)
group = gino / fs->group_inodes;
gino = gino % fs->group_inodes;
index = (gino / fs->inodes_per_block) + RTEMS_RFS_GROUP_INODE_BLOCK;
handle->offset = gino % fs->inodes_per_block;
handle->block = rtems_rfs_group_block (&fs->groups[group], index);
5035a: 744c moveq #76,%d2 5035c: 4c02 0800 mulsl %d2,%d0
gino = ino - RTEMS_RFS_ROOT_INO;
group = gino / fs->group_inodes;
gino = gino % fs->group_inodes;
index = (gino / fs->inodes_per_block) + RTEMS_RFS_GROUP_INODE_BLOCK;
handle->offset = gino % fs->inodes_per_block;
50360: 4c6a 1002 002c remul %a2@(44),%d2,%d1 50366: 4c6a 1001 002c remul %a2@(44),%d1,%d1
if ((ino - RTEMS_RFS_ROOT_INO) > rtems_rfs_fs_inodes (fs))
return EINVAL;
handle->ino = ino;
handle->node = NULL;
5036c: 42ab 000c clrl %a3@(12)
handle->loads = 0;
gino = ino - RTEMS_RFS_ROOT_INO;
group = gino / fs->group_inodes;
gino = gino % fs->group_inodes;
index = (gino / fs->inodes_per_block) + RTEMS_RFS_GROUP_INODE_BLOCK;
50370: 2070 0800 moveal %a0@(00000000,%d0:l),%a0 50374: 5488 addql #2,%a0
handle->offset = gino % fs->inodes_per_block;
handle->block = rtems_rfs_group_block (&fs->groups[group], index);
50376: d1c1 addal %d1,%a0
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
50378: 4200 clrb %d0
gino = ino - RTEMS_RFS_ROOT_INO;
group = gino / fs->group_inodes;
gino = gino % fs->group_inodes;
index = (gino / fs->inodes_per_block) + RTEMS_RFS_GROUP_INODE_BLOCK;
handle->offset = gino % fs->inodes_per_block;
5037a: 2742 001e movel %d2,%a3@(30) 5037e: 1740 0010 moveb %d0,%a3@(16)
handle->block = rtems_rfs_group_block (&fs->groups[group], index);
50382: 2748 001a movel %a0,%a3@(26)
if ((ino - RTEMS_RFS_ROOT_INO) > rtems_rfs_fs_inodes (fs))
return EINVAL;
handle->ino = ino;
handle->node = NULL;
handle->loads = 0;
50386: 42ab 0022 clrl %a3@(34)
handle->bnum = 0;
5038a: 42ab 0012 clrl %a3@(18)
handle->buffer = NULL;
5038e: 42ab 0016 clrl %a3@(22)
handle->offset = gino % fs->inodes_per_block;
handle->block = rtems_rfs_group_block (&fs->groups[group], index);
rc = rtems_rfs_buffer_handle_open (fs, &handle->buffer);
if ((rc == 0) && load)
50392: 4a03 tstb %d3
50394: 6624 bnes 503ba <rtems_rfs_inode_open+0xba> <== ALWAYS TAKEN
index = (gino / fs->inodes_per_block) + RTEMS_RFS_GROUP_INODE_BLOCK;
handle->offset = gino % fs->inodes_per_block;
handle->block = rtems_rfs_group_block (&fs->groups[group], index);
rc = rtems_rfs_buffer_handle_open (fs, &handle->buffer);
50396: 4280 clrl %d0 <== NOT EXECUTED
if ((rc == 0) && load)
rc = rtems_rfs_inode_load (fs, handle);
return rc;
}
50398: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED 5039e: 4e5e unlk %fp <== NOT EXECUTED 503a0: 4e75 rts <== NOT EXECUTED
int gino;
int index;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_OPEN))
printf ("rtems-rfs: inode-open: ino: %" PRIu32 "\n", ino);
503a2: 2f02 movel %d2,%sp@- <== NOT EXECUTED 503a4: 4879 0007 2de2 pea 72de2 <ramdisk_ops+0xa04> <== NOT EXECUTED 503aa: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 503b0: 508f addql #8,%sp <== NOT EXECUTED
if (ino == RTEMS_RFS_EMPTY_INO)
503b2: 4a82 tstl %d2 <== NOT EXECUTED 503b4: 6700 ff7a beqw 50330 <rtems_rfs_inode_open+0x30> <== NOT EXECUTED 503b8: 6082 bras 5033c <rtems_rfs_inode_open+0x3c> <== NOT EXECUTED
handle->offset = gino % fs->inodes_per_block;
handle->block = rtems_rfs_group_block (&fs->groups[group], index);
rc = rtems_rfs_buffer_handle_open (fs, &handle->buffer);
if ((rc == 0) && load)
rc = rtems_rfs_inode_load (fs, handle);
503ba: 2d4b 000c movel %a3,%fp@(12) 503be: 2d4a 0008 movel %a2,%fp@(8)
return rc; }
503c2: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 503c8: 4e5e unlk %fp
handle->offset = gino % fs->inodes_per_block;
handle->block = rtems_rfs_group_block (&fs->groups[group], index);
rc = rtems_rfs_buffer_handle_open (fs, &handle->buffer);
if ((rc == 0) && load)
rc = rtems_rfs_inode_load (fs, handle);
503ca: 4ef9 0005 0264 jmp 50264 <rtems_rfs_inode_load>
00050678 <rtems_rfs_inode_time_stamp_now>:
int
rtems_rfs_inode_time_stamp_now (rtems_rfs_inode_handle* handle,
bool atime,
bool mtime)
{
50678: 4e56 fff4 linkw %fp,#-12 5067c: 48d7 040c moveml %d2-%d3/%a2,%sp@ 50680: 246e 0008 moveal %fp@(8),%a2 50684: 162e 000f moveb %fp@(15),%d3 50688: 142e 0013 moveb %fp@(19),%d2
time_t now; if (!rtems_rfs_inode_is_loaded (handle))
5068c: 4aaa 000c tstl %a2@(12) 50690: 6700 009a beqw 5072c <rtems_rfs_inode_time_stamp_now+0xb4>
return ENXIO;
now = time (NULL);
50694: 42a7 clrl %sp@- 50696: 4eb9 0006 61f8 jsr 661f8 <time>
if (atime)
5069c: 588f addql #4,%sp
bool mtime)
{
time_t now;
if (!rtems_rfs_inode_is_loaded (handle))
return ENXIO;
now = time (NULL);
5069e: 2200 movel %d0,%d1
if (atime)
506a0: 4a03 tstb %d3
506a2: 6736 beqs 506da <rtems_rfs_inode_time_stamp_now+0x62><== NEVER TAKEN
*/
static inline void
rtems_rfs_inode_set_atime (rtems_rfs_inode_handle* handle,
rtems_rfs_time atime)
{
rtems_rfs_write_u32 (&handle->node->atime, atime);
506a4: 2600 movel %d0,%d3 506a6: 7018 moveq #24,%d0 506a8: e0ab lsrl %d0,%d3 506aa: 2001 movel %d1,%d0 506ac: e088 lsrl #8,%d0 506ae: 206a 000c moveal %a2@(12),%a0 506b2: 1143 0010 moveb %d3,%a0@(16) 506b6: 2601 movel %d1,%d3 506b8: 206a 000c moveal %a2@(12),%a0 506bc: 4243 clrw %d3 506be: 4843 swap %d3 506c0: 1143 0011 moveb %d3,%a0@(17) 506c4: 206a 000c moveal %a2@(12),%a0 506c8: 1140 0012 moveb %d0,%a0@(18)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
506cc: 7001 moveq #1,%d0
*/
static inline void
rtems_rfs_inode_set_atime (rtems_rfs_inode_handle* handle,
rtems_rfs_time atime)
{
rtems_rfs_write_u32 (&handle->node->atime, atime);
506ce: 206a 000c moveal %a2@(12),%a0 506d2: 1141 0013 moveb %d1,%a0@(19)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
506d6: 1540 0010 moveb %d0,%a2@(16)
rtems_rfs_inode_set_atime (handle, now);
if (mtime)
506da: 4a02 tstb %d2
506dc: 6742 beqs 50720 <rtems_rfs_inode_time_stamp_now+0xa8><== NEVER TAKEN
*/
static inline void
rtems_rfs_inode_set_mtime (rtems_rfs_inode_handle* handle,
rtems_rfs_time mtime)
{
rtems_rfs_write_u32 (&handle->node->mtime, mtime);
506de: 206a 000c moveal %a2@(12),%a0 506e2: 2601 movel %d1,%d3 506e4: 7018 moveq #24,%d0 506e6: e0ab lsrl %d0,%d3 506e8: 2401 movel %d1,%d2 506ea: e08a lsrl #8,%d2
rtems_rfs_inode_set_mtime (handle, now);
return 0;
506ec: 4200 clrb %d0 506ee: 1143 0014 moveb %d3,%a0@(20) 506f2: 2601 movel %d1,%d3 506f4: 206a 000c moveal %a2@(12),%a0 506f8: 4243 clrw %d3 506fa: 4843 swap %d3 506fc: 1143 0015 moveb %d3,%a0@(21) 50700: 206a 000c moveal %a2@(12),%a0 50704: 1142 0016 moveb %d2,%a0@(22) 50708: 206a 000c moveal %a2@(12),%a0 5070c: 1141 0017 moveb %d1,%a0@(23)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
50710: 7201 moveq #1,%d1 50712: 1541 0010 moveb %d1,%a2@(16)
}
50716: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 5071c: 4e5e unlk %fp 5071e: 4e75 rts
now = time (NULL);
if (atime)
rtems_rfs_inode_set_atime (handle, now);
if (mtime)
rtems_rfs_inode_set_mtime (handle, now);
return 0;
50720: 4280 clrl %d0 <== NOT EXECUTED
}
50722: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 50728: 4e5e unlk %fp <== NOT EXECUTED 5072a: 4e75 rts <== NOT EXECUTED
bool atime,
bool mtime)
{
time_t now;
if (!rtems_rfs_inode_is_loaded (handle))
return ENXIO;
5072c: 7006 moveq #6,%d0 <== NOT EXECUTED
if (atime)
rtems_rfs_inode_set_atime (handle, now);
if (mtime)
rtems_rfs_inode_set_mtime (handle, now);
return 0;
}
5072e: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 50734: 4e5e unlk %fp <== NOT EXECUTED
000503d0 <rtems_rfs_inode_unload>:
int
rtems_rfs_inode_unload (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle,
bool update_ctime)
{
503d0: 4e56 0000 linkw %fp,#0 503d4: 2f0a movel %a2,%sp@- 503d6: 246e 000c moveal %fp@(12),%a2 503da: 2f02 movel %d2,%sp@- 503dc: 142e 0013 moveb %fp@(19),%d2
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_UNLOAD))
503e0: 2f3c 0020 0000 movel #2097152,%sp@- 503e6: 42a7 clrl %sp@- 503e8: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> 503ee: 508f addql #8,%sp 503f0: 4a00 tstb %d0
503f2: 672c beqs 50420 <rtems_rfs_inode_unload+0x50> <== ALWAYS TAKEN
printf ("rtems-rfs: inode-unload: ino=%" PRIu32 " loads=%i loaded=%s\n",
503f4: 203c 0007 319e movel #471454,%d0 <== NOT EXECUTED 503fa: 4aaa 000c tstl %a2@(12) <== NOT EXECUTED 503fe: 6706 beqs 50406 <rtems_rfs_inode_unload+0x36> <== NOT EXECUTED 50400: 203c 0007 2dab movel #470443,%d0 <== NOT EXECUTED 50406: 2f00 movel %d0,%sp@- <== NOT EXECUTED 50408: 2f2a 0022 movel %a2@(34),%sp@- <== NOT EXECUTED 5040c: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 50410: 4879 0007 2e03 pea 72e03 <ramdisk_ops+0xa25> <== NOT EXECUTED 50416: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5041c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
handle->ino, handle->loads,
rtems_rfs_inode_is_loaded (handle) ? "yes" : "no");
if (rtems_rfs_inode_is_loaded (handle))
50420: 4aaa 000c tstl %a2@(12)
50424: 671c beqs 50442 <rtems_rfs_inode_unload+0x72>
{
if (handle->loads == 0)
50426: 202a 0022 movel %a2@(34),%d0
5042a: 660e bnes 5043a <rtems_rfs_inode_unload+0x6a> <== ALWAYS TAKEN
handle->node = NULL;
}
}
return rc;
}
5042c: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED
rtems_rfs_inode_is_loaded (handle) ? "yes" : "no");
if (rtems_rfs_inode_is_loaded (handle))
{
if (handle->loads == 0)
return EIO;
50430: 7005 moveq #5,%d0 <== NOT EXECUTED
handle->node = NULL;
}
}
return rc;
}
50432: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 50436: 4e5e unlk %fp <== NOT EXECUTED 50438: 4e75 rts <== NOT EXECUTED
if (rtems_rfs_inode_is_loaded (handle))
{
if (handle->loads == 0)
return EIO;
handle->loads--;
5043a: 5380 subql #1,%d0 5043c: 2540 0022 movel %d0,%a2@(34)
if (handle->loads == 0)
50440: 670e beqs 50450 <rtems_rfs_inode_unload+0x80>
handle->node = NULL;
}
}
return rc;
}
50442: 242e fff8 movel %fp@(-8),%d2
int
rtems_rfs_inode_unload (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle,
bool update_ctime)
{
int rc = 0;
50446: 4280 clrl %d0
handle->node = NULL;
}
}
return rc;
}
50448: 246e fffc moveal %fp@(-4),%a2 5044c: 4e5e unlk %fp 5044e: 4e75 rts
if (handle->loads == 0)
{
/*
* If the buffer is dirty it will be release. Also set the ctime.
*/
if (rtems_rfs_buffer_dirty (&handle->buffer) && update_ctime)
50450: 4a2a 0010 tstb %a2@(16)
50454: 6704 beqs 5045a <rtems_rfs_inode_unload+0x8a>
50456: 4a02 tstb %d2
50458: 6620 bnes 5047a <rtems_rfs_inode_unload+0xaa> <== ALWAYS TAKEN
rtems_rfs_inode_set_ctime (handle, time (NULL));
rc = rtems_rfs_buffer_handle_release (fs, &handle->buffer);
5045a: 486a 0010 pea %a2@(16) 5045e: 2f2e 0008 movel %fp@(8),%sp@- 50462: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release>
handle->node = NULL;
50468: 508f addql #8,%sp 5046a: 42aa 000c clrl %a2@(12)
}
}
return rc;
}
5046e: 242e fff8 movel %fp@(-8),%d2 50472: 246e fffc moveal %fp@(-4),%a2 50476: 4e5e unlk %fp 50478: 4e75 rts
{
/*
* If the buffer is dirty it will be release. Also set the ctime.
*/
if (rtems_rfs_buffer_dirty (&handle->buffer) && update_ctime)
rtems_rfs_inode_set_ctime (handle, time (NULL));
5047a: 42a7 clrl %sp@- 5047c: 4eb9 0006 61f8 jsr 661f8 <time>
*/
static inline void
rtems_rfs_inode_set_ctime (rtems_rfs_inode_handle* handle,
rtems_rfs_time ctime)
{
rtems_rfs_write_u32 (&handle->node->ctime, ctime);
50482: 206a 000c moveal %a2@(12),%a0 50486: 2400 movel %d0,%d2 50488: 7218 moveq #24,%d1 5048a: e2aa lsrl %d1,%d2 5048c: 2200 movel %d0,%d1 5048e: e089 lsrl #8,%d1
rtems_rfs_buffer_mark_dirty (&handle->buffer);
50490: 588f addql #4,%sp
*/
static inline void
rtems_rfs_inode_set_ctime (rtems_rfs_inode_handle* handle,
rtems_rfs_time ctime)
{
rtems_rfs_write_u32 (&handle->node->ctime, ctime);
50492: 1142 0018 moveb %d2,%a0@(24) 50496: 2400 movel %d0,%d2 50498: 206a 000c moveal %a2@(12),%a0 5049c: 4242 clrw %d2 5049e: 4842 swap %d2 504a0: 1142 0019 moveb %d2,%a0@(25) 504a4: 206a 000c moveal %a2@(12),%a0 504a8: 1141 001a moveb %d1,%a0@(26) 504ac: 206a 000c moveal %a2@(12),%a0 504b0: 1140 001b moveb %d0,%a0@(27)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
504b4: 7001 moveq #1,%d0 504b6: 1540 0010 moveb %d0,%a2@(16)
rc = rtems_rfs_buffer_handle_release (fs, &handle->buffer);
504ba: 486a 0010 pea %a2@(16) 504be: 2f2e 0008 movel %fp@(8),%sp@- 504c2: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release>
handle->node = NULL;
504c8: 508f addql #8,%sp 504ca: 42aa 000c clrl %a2@(12) 504ce: 609e bras 5046e <rtems_rfs_inode_unload+0x9e>
0005f3d4 <rtems_rfs_link>:
const char* name,
int length,
rtems_rfs_ino parent,
rtems_rfs_ino target,
bool link_dir)
{
5f3d4: 4e56 ff8c linkw %fp,#-116 5f3d8: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
rtems_rfs_inode_handle parent_inode;
rtems_rfs_inode_handle target_inode;
uint16_t links;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_LINK))
5f3dc: 2f3c 0100 0000 movel #16777216,%sp@-
const char* name,
int length,
rtems_rfs_ino parent,
rtems_rfs_ino target,
bool link_dir)
{
5f3e2: 282e 0008 movel %fp@(8),%d4
rtems_rfs_inode_handle parent_inode;
rtems_rfs_inode_handle target_inode;
uint16_t links;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_LINK))
5f3e6: 42a7 clrl %sp@-
const char* name,
int length,
rtems_rfs_ino parent,
rtems_rfs_ino target,
bool link_dir)
{
5f3e8: 286e 000c moveal %fp@(12),%a4 5f3ec: 262e 0010 movel %fp@(16),%d3 5f3f0: 2e2e 0014 movel %fp@(20),%d7 5f3f4: 2a2e 0018 movel %fp@(24),%d5 5f3f8: 1c2e 001f moveb %fp@(31),%d6
rtems_rfs_inode_handle parent_inode;
rtems_rfs_inode_handle target_inode;
uint16_t links;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_LINK))
5f3fc: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> 5f402: 508f addql #8,%sp 5f404: 4a00 tstb %d0 5f406: 6600 00ee bnew 5f4f6 <rtems_rfs_link+0x122>
for (c = 0; c < length; c++)
printf ("%c", name[c]);
printf ("(%" PRIu32 ")\n", target);
}
rc = rtems_rfs_inode_open (fs, target, &target_inode, true);
5f40a: 4878 0001 pea 1 <ADD> 5f40e: 45ee ffda lea %fp@(-38),%a2 5f412: 47f9 0005 0300 lea 50300 <rtems_rfs_inode_open>,%a3 5f418: 2f0a movel %a2,%sp@- 5f41a: 2f05 movel %d5,%sp@- 5f41c: 2f04 movel %d4,%sp@- 5f41e: 4e93 jsr %a3@
if (rc)
5f420: 4fef 0010 lea %sp@(16),%sp
for (c = 0; c < length; c++)
printf ("%c", name[c]);
printf ("(%" PRIu32 ")\n", target);
}
rc = rtems_rfs_inode_open (fs, target, &target_inode, true);
5f424: 2400 movel %d0,%d2
if (rc)
5f426: 6600 00c2 bnew 5f4ea <rtems_rfs_link+0x116>
/*
* If the target inode is a directory and we cannot link directories
* return a not supported error code.
*/
if (!link_dir && S_ISDIR (rtems_rfs_inode_get_mode (&target_inode)))
5f42a: 4a06 tstb %d6
5f42c: 661c bnes 5f44a <rtems_rfs_link+0x76> <== NEVER TAKEN
5f42e: 206a 000c moveal %a2@(12),%a0 5f432: 4280 clrl %d0 5f434: 1028 0002 moveb %a0@(2),%d0 5f438: e188 lsll #8,%d0 5f43a: 0280 0000 f000 andil #61440,%d0 5f440: 0c80 0000 4000 cmpil #16384,%d0 5f446: 6700 0128 beqw 5f570 <rtems_rfs_link+0x19c>
{
rtems_rfs_inode_close (fs, &target_inode);
return ENOTSUP;
}
rc = rtems_rfs_inode_open (fs, parent, &parent_inode, true);
5f44a: 4878 0001 pea 1 <ADD> 5f44e: 2c0e movel %fp,%d6 5f450: 0686 ffff ffb4 addil #-76,%d6 5f456: 2f06 movel %d6,%sp@- 5f458: 2f07 movel %d7,%sp@- 5f45a: 2f04 movel %d4,%sp@- 5f45c: 4e93 jsr %a3@
if (rc)
5f45e: 4fef 0010 lea %sp@(16),%sp
{
rtems_rfs_inode_close (fs, &target_inode);
return ENOTSUP;
}
rc = rtems_rfs_inode_open (fs, parent, &parent_inode, true);
5f462: 2400 movel %d0,%d2
if (rc)
5f464: 6600 00f2 bnew 5f558 <rtems_rfs_link+0x184>
{
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_dir_add_entry (fs, &parent_inode, name, length, target);
5f468: 2f05 movel %d5,%sp@- 5f46a: 2f03 movel %d3,%sp@- 5f46c: 2f0c movel %a4,%sp@- 5f46e: 2f06 movel %d6,%sp@- 5f470: 2f04 movel %d4,%sp@- 5f472: 4eb9 0005 ca10 jsr 5ca10 <rtems_rfs_dir_add_entry>
if (rc > 0)
5f478: 4fef 0014 lea %sp@(20),%sp
{
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_dir_add_entry (fs, &parent_inode, name, length, target);
5f47c: 2400 movel %d0,%d2
if (rc > 0)
5f47e: 6e00 00b6 bgtw 5f536 <rtems_rfs_link+0x162>
rtems_rfs_inode_close (fs, &parent_inode);
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
links = rtems_rfs_inode_get_links (&target_inode) + 1;
5f482: 206a 000c moveal %a2@(12),%a0
*/
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
5f486: 4280 clrl %d0 5f488: 1010 moveb %a0@,%d0 5f48a: 4281 clrl %d1 5f48c: 1228 0001 moveb %a0@(1),%d1 5f490: e188 lsll #8,%d0 5f492: 8081 orl %d1,%d0
if (links == 0xffff)
5f494: 0c80 0000 ffff cmpil #65535,%d0 5f49a: 6700 00f0 beqw 5f58c <rtems_rfs_link+0x1b8> 5f49e: 5280 addql #1,%d0 5f4a0: 4281 clrl %d1 5f4a2: 3200 movew %d0,%d1 5f4a4: e089 lsrl #8,%d1
* @prarm links The links.
*/
static inline void
rtems_rfs_inode_set_links (rtems_rfs_inode_handle* handle, uint16_t links)
{
rtems_rfs_write_u16 (&handle->node->links, links);
5f4a6: 1081 moveb %d1,%a0@ 5f4a8: 206a 000c moveal %a2@(12),%a0 5f4ac: 1140 0001 moveb %d0,%a0@(1)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
5f4b0: 7001 moveq #1,%d0
rtems_rfs_inode_set_links (&target_inode, links);
rc = rtems_rfs_inode_time_stamp_now (&parent_inode, true, true);
5f4b2: 4878 0001 pea 1 <ADD> 5f4b6: 4878 0001 pea 1 <ADD> 5f4ba: 1d40 ffea moveb %d0,%fp@(-22) 5f4be: 2f06 movel %d6,%sp@- 5f4c0: 4eb9 0005 0678 jsr 50678 <rtems_rfs_inode_time_stamp_now>
if (rc > 0)
5f4c6: 4fef 000c lea %sp@(12),%sp
}
links = rtems_rfs_inode_get_links (&target_inode) + 1;
rtems_rfs_inode_set_links (&target_inode, links);
rc = rtems_rfs_inode_time_stamp_now (&parent_inode, true, true);
5f4ca: 2400 movel %d0,%d2
if (rc > 0)
5f4cc: 6e68 bgts 5f536 <rtems_rfs_link+0x162> <== NEVER TAKEN
rtems_rfs_inode_close (fs, &parent_inode);
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_inode_close (fs, &parent_inode);
5f4ce: 2f06 movel %d6,%sp@- 5f4d0: 47f9 0005 04d0 lea 504d0 <rtems_rfs_inode_close>,%a3 5f4d6: 2f04 movel %d4,%sp@- 5f4d8: 4e93 jsr %a3@
if (rc > 0)
5f4da: 508f addql #8,%sp
rtems_rfs_inode_close (fs, &parent_inode);
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_inode_close (fs, &parent_inode);
5f4dc: 2400 movel %d0,%d2
if (rc > 0)
5f4de: 6f00 00b4 blew 5f594 <rtems_rfs_link+0x1c0>
{
rtems_rfs_inode_close (fs, &target_inode);
5f4e2: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5f4e4: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5f4e6: 4e93 jsr %a3@ <== NOT EXECUTED
return rc;
5f4e8: 508f addql #8,%sp <== NOT EXECUTED
}
rc = rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
5f4ea: 2002 movel %d2,%d0 <== NOT EXECUTED 5f4ec: 4cee 3cfc ff8c moveml %fp@(-116),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5f4f2: 4e5e unlk %fp <== NOT EXECUTED 5f4f4: 4e75 rts <== NOT EXECUTED
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_LINK))
{
int c;
printf ("rtems-rfs: link: parent(%" PRIu32 ") -> ", parent);
5f4f6: 2f07 movel %d7,%sp@- <== NOT EXECUTED 5f4f8: 4879 0007 483f pea 7483f <CSWTCH.1+0x1263> <== NOT EXECUTED 5f4fe: 4bf9 0006 2fd4 lea 62fd4 <printf>,%a5 <== NOT EXECUTED 5f504: 4e95 jsr %a5@ <== NOT EXECUTED
for (c = 0; c < length; c++)
5f506: 508f addql #8,%sp <== NOT EXECUTED 5f508: 4a83 tstl %d3 <== NOT EXECUTED 5f50a: 6f1a bles 5f526 <rtems_rfs_link+0x152> <== NOT EXECUTED 5f50c: 244c moveal %a4,%a2 <== NOT EXECUTED 5f50e: 4282 clrl %d2 <== NOT EXECUTED 5f510: 47f9 0006 3014 lea 63014 <putchar>,%a3 <== NOT EXECUTED 5f516: 5282 addql #1,%d2 <== NOT EXECUTED
printf ("%c", name[c]);
5f518: 101a moveb %a2@+,%d0 <== NOT EXECUTED 5f51a: 49c0 extbl %d0 <== NOT EXECUTED 5f51c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5f51e: 4e93 jsr %a3@ <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_LINK))
{
int c;
printf ("rtems-rfs: link: parent(%" PRIu32 ") -> ", parent);
for (c = 0; c < length; c++)
5f520: 588f addql #4,%sp <== NOT EXECUTED 5f522: b682 cmpl %d2,%d3 <== NOT EXECUTED 5f524: 66f0 bnes 5f516 <rtems_rfs_link+0x142> <== NOT EXECUTED
printf ("%c", name[c]);
printf ("(%" PRIu32 ")\n", target);
5f526: 2f05 movel %d5,%sp@- <== NOT EXECUTED 5f528: 4879 0007 4884 pea 74884 <CSWTCH.1+0x12a8> <== NOT EXECUTED 5f52e: 4e95 jsr %a5@ <== NOT EXECUTED 5f530: 508f addql #8,%sp <== NOT EXECUTED 5f532: 6000 fed6 braw 5f40a <rtems_rfs_link+0x36> <== NOT EXECUTED
rtems_rfs_inode_set_links (&target_inode, links);
rc = rtems_rfs_inode_time_stamp_now (&parent_inode, true, true);
if (rc > 0)
{
rtems_rfs_inode_close (fs, &parent_inode);
5f536: 2f06 movel %d6,%sp@- <== NOT EXECUTED 5f538: 47f9 0005 04d0 lea 504d0 <rtems_rfs_inode_close>,%a3 <== NOT EXECUTED 5f53e: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5f540: 4e93 jsr %a3@ <== NOT EXECUTED
rtems_rfs_inode_close (fs, &target_inode);
5f542: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5f544: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5f546: 4e93 jsr %a3@ <== NOT EXECUTED
return rc;
5f548: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
}
rc = rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
5f54c: 2002 movel %d2,%d0 <== NOT EXECUTED 5f54e: 4cee 3cfc ff8c moveml %fp@(-116),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5f554: 4e5e unlk %fp <== NOT EXECUTED 5f556: 4e75 rts <== NOT EXECUTED
}
rc = rtems_rfs_inode_open (fs, parent, &parent_inode, true);
if (rc)
{
rtems_rfs_inode_close (fs, &target_inode);
5f558: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5f55a: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5f55c: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close> <== NOT EXECUTED
return rc;
5f562: 508f addql #8,%sp <== NOT EXECUTED
}
rc = rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
5f564: 2002 movel %d2,%d0 <== NOT EXECUTED 5f566: 4cee 3cfc ff8c moveml %fp@(-116),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5f56c: 4e5e unlk %fp <== NOT EXECUTED 5f56e: 4e75 rts <== NOT EXECUTED
* If the target inode is a directory and we cannot link directories
* return a not supported error code.
*/
if (!link_dir && S_ISDIR (rtems_rfs_inode_get_mode (&target_inode)))
{
rtems_rfs_inode_close (fs, &target_inode);
5f570: 2f0a movel %a2,%sp@- <== NOT EXECUTED
return ENOTSUP;
5f572: 143c ff86 moveb #-122,%d2 <== NOT EXECUTED
* If the target inode is a directory and we cannot link directories
* return a not supported error code.
*/
if (!link_dir && S_ISDIR (rtems_rfs_inode_get_mode (&target_inode)))
{
rtems_rfs_inode_close (fs, &target_inode);
5f576: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5f578: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close> <== NOT EXECUTED
return ENOTSUP;
5f57e: 508f addql #8,%sp <== NOT EXECUTED
}
rc = rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
5f580: 2002 movel %d2,%d0 <== NOT EXECUTED 5f582: 4cee 3cfc ff8c moveml %fp@(-116),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5f588: 4e5e unlk %fp <== NOT EXECUTED 5f58a: 4e75 rts <== NOT EXECUTED
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
if (links == 0xffff)
5f58c: 7001 moveq #1,%d0 <== NOT EXECUTED 5f58e: 4201 clrb %d1 <== NOT EXECUTED 5f590: 6000 ff14 braw 5f4a6 <rtems_rfs_link+0xd2> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_inode_close (fs, &target_inode);
5f594: 2f0a movel %a2,%sp@- 5f596: 2f04 movel %d4,%sp@- 5f598: 4e93 jsr %a3@
return rc;
5f59a: 508f addql #8,%sp
{
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_inode_close (fs, &target_inode);
5f59c: 2400 movel %d0,%d2
return rc;
}
5f59e: 2002 movel %d2,%d0 5f5a0: 4cee 3cfc ff8c moveml %fp@(-116),%d2-%d7/%a2-%a5
5f5a6: 4e5e unlk %fp <== NOT EXECUTED
0005fee8 <rtems_rfs_mutex_create>:
RTEMS_NO_INHERIT_PRIORITY | RTEMS_NO_PRIORITY_CEILING | RTEMS_LOCAL)
#endif
int
rtems_rfs_mutex_create (rtems_rfs_mutex* mutex)
{
5fee8: 4e56 0000 linkw %fp,#0 5feec: 2f02 movel %d2,%sp@-
#if __rtems__
rtems_status_code sc;
sc = rtems_semaphore_create (rtems_build_name ('R', 'F', 'S', 'm'),
5feee: 2f2e 0008 movel %fp@(8),%sp@- 5fef2: 42a7 clrl %sp@- 5fef4: 4878 0024 pea 24 <OPER2+0x10> 5fef8: 4878 0001 pea 1 <ADD> 5fefc: 2f3c 5246 536d movel #1380340589,%sp@- 5ff02: 4eb9 0004 ac80 jsr 4ac80 <rtems_semaphore_create>
1, RTEMS_RFS_MUTEX_ATTRIBS, 0,
mutex);
if (sc != RTEMS_SUCCESSFUL)
5ff08: 4fef 0014 lea %sp@(20),%sp
int
rtems_rfs_mutex_create (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc;
sc = rtems_semaphore_create (rtems_build_name ('R', 'F', 'S', 'm'),
5ff0c: 2400 movel %d0,%d2
1, RTEMS_RFS_MUTEX_ATTRIBS, 0,
mutex);
if (sc != RTEMS_SUCCESSFUL)
5ff0e: 660a bnes 5ff1a <rtems_rfs_mutex_create+0x32> <== NEVER TAKEN
rtems_status_text (sc));
return EIO;
}
#endif
return 0;
}
5ff10: 242e fffc movel %fp@(-4),%d2
printf ("rtems-rfs: mutex: open failed: %s\n",
rtems_status_text (sc));
return EIO;
}
#endif
return 0;
5ff14: 4280 clrl %d0
}
5ff16: 4e5e unlk %fp 5ff18: 4e75 rts
sc = rtems_semaphore_create (rtems_build_name ('R', 'F', 'S', 'm'),
1, RTEMS_RFS_MUTEX_ATTRIBS, 0,
mutex);
if (sc != RTEMS_SUCCESSFUL)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
5ff1a: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 5ff1e: 42a7 clrl %sp@- <== NOT EXECUTED 5ff20: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 5ff26: 508f addql #8,%sp <== NOT EXECUTED 5ff28: 4a00 tstb %d0 <== NOT EXECUTED 5ff2a: 660a bnes 5ff36 <rtems_rfs_mutex_create+0x4e> <== NOT EXECUTED
rtems_status_text (sc));
return EIO;
}
#endif
return 0;
}
5ff2c: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
printf ("rtems-rfs: mutex: open failed: %s\n",
rtems_status_text (sc));
return EIO;
5ff30: 7005 moveq #5,%d0 <== NOT EXECUTED
} #endif return 0; }
5ff32: 4e5e unlk %fp <== NOT EXECUTED 5ff34: 4e75 rts <== NOT EXECUTED
1, RTEMS_RFS_MUTEX_ATTRIBS, 0,
mutex);
if (sc != RTEMS_SUCCESSFUL)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
printf ("rtems-rfs: mutex: open failed: %s\n",
5ff36: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5ff38: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 5ff3e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5ff40: 4879 0007 4a5d pea 74a5d <CSWTCH.1+0x1481> <== NOT EXECUTED 5ff46: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED
rtems_status_text (sc));
return EIO;
}
#endif
return 0;
}
5ff4c: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED
1, RTEMS_RFS_MUTEX_ATTRIBS, 0,
mutex);
if (sc != RTEMS_SUCCESSFUL)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
printf ("rtems-rfs: mutex: open failed: %s\n",
5ff50: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rtems_status_text (sc));
return EIO;
5ff54: 7005 moveq #5,%d0 <== NOT EXECUTED
} #endif return 0; }
5ff56: 4e5e unlk %fp <== NOT EXECUTED
0005ff5a <rtems_rfs_mutex_destroy>:
int
rtems_rfs_mutex_destroy (rtems_rfs_mutex* mutex)
{
5ff5a: 4e56 0000 linkw %fp,#0 5ff5e: 206e 0008 moveal %fp@(8),%a0 5ff62: 2f02 movel %d2,%sp@-
#if __rtems__ rtems_status_code sc; sc = rtems_semaphore_delete (*mutex);
5ff64: 2f10 movel %a0@,%sp@- 5ff66: 4eb9 0004 ae48 jsr 4ae48 <rtems_semaphore_delete>
if (sc != RTEMS_SUCCESSFUL)
5ff6c: 588f addql #4,%sp
int
rtems_rfs_mutex_destroy (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc;
sc = rtems_semaphore_delete (*mutex);
5ff6e: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL)
5ff70: 660a bnes 5ff7c <rtems_rfs_mutex_destroy+0x22> <== NEVER TAKEN
rtems_status_text (sc));
return EIO;
}
#endif
return 0;
}
5ff72: 242e fffc movel %fp@(-4),%d2
printf ("rtems-rfs: mutex: close failed: %s\n",
rtems_status_text (sc));
return EIO;
}
#endif
return 0;
5ff76: 4280 clrl %d0
}
5ff78: 4e5e unlk %fp 5ff7a: 4e75 rts
#if __rtems__
rtems_status_code sc;
sc = rtems_semaphore_delete (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
5ff7c: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 5ff80: 42a7 clrl %sp@- <== NOT EXECUTED 5ff82: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 5ff88: 508f addql #8,%sp <== NOT EXECUTED 5ff8a: 4a00 tstb %d0 <== NOT EXECUTED 5ff8c: 660a bnes 5ff98 <rtems_rfs_mutex_destroy+0x3e> <== NOT EXECUTED
rtems_status_text (sc));
return EIO;
}
#endif
return 0;
}
5ff8e: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
printf ("rtems-rfs: mutex: close failed: %s\n",
rtems_status_text (sc));
return EIO;
5ff92: 7005 moveq #5,%d0 <== NOT EXECUTED
} #endif return 0; }
5ff94: 4e5e unlk %fp <== NOT EXECUTED 5ff96: 4e75 rts <== NOT EXECUTED
rtems_status_code sc;
sc = rtems_semaphore_delete (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
printf ("rtems-rfs: mutex: close failed: %s\n",
5ff98: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5ff9a: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 5ffa0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5ffa2: 4879 0007 4a80 pea 74a80 <CSWTCH.1+0x14a4> <== NOT EXECUTED 5ffa8: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED
rtems_status_text (sc));
return EIO;
}
#endif
return 0;
}
5ffae: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED
rtems_status_code sc;
sc = rtems_semaphore_delete (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
printf ("rtems-rfs: mutex: close failed: %s\n",
5ffb2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rtems_status_text (sc));
return EIO;
5ffb6: 7005 moveq #5,%d0 <== NOT EXECUTED
} #endif return 0; }
5ffb8: 4e5e unlk %fp <== NOT EXECUTED
0005ba14 <rtems_rfs_release_chain>:
static int
rtems_rfs_release_chain (rtems_chain_control* chain,
uint32_t* count,
bool modified)
{
5ba14: 4e56 ffe4 linkw %fp,#-28 5ba18: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@
rtems_rfs_buffer* buffer;
int rrc = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
5ba1c: 4878 0080 pea 80 <DBL_MANT_DIG+0x4b>
static int
rtems_rfs_release_chain (rtems_chain_control* chain,
uint32_t* count,
bool modified)
{
5ba20: 246e 0008 moveal %fp@(8),%a2
rtems_rfs_buffer* buffer;
int rrc = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
5ba24: 42a7 clrl %sp@-
static int
rtems_rfs_release_chain (rtems_chain_control* chain,
uint32_t* count,
bool modified)
{
5ba26: 266e 000c moveal %fp@(12),%a3 5ba2a: 182e 0013 moveb %fp@(19),%d4
rtems_rfs_buffer* buffer;
int rrc = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
5ba2e: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> 5ba34: 508f addql #8,%sp 5ba36: 4a00 tstb %d0
5ba38: 664c bnes 5ba86 <rtems_rfs_release_chain+0x72> <== NEVER TAKEN
5ba3a: 260a movel %a2,%d3
(*count)--;
buffer->user = (void*) 0;
rc = rtems_rfs_buffer_io_release (buffer, modified);
if ((rc > 0) && (rrc == 0))
5ba3c: 4282 clrl %d2 5ba3e: 5883 addql #4,%d3
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
5ba40: 4bf9 0004 bba0 lea 4bba0 <_Chain_Get>,%a5
buffer = (rtems_rfs_buffer*) rtems_chain_get (chain);
(*count)--;
buffer->user = (void*) 0;
rc = rtems_rfs_buffer_io_release (buffer, modified);
5ba46: 49f9 0006 21d2 lea 621d2 <rtems_rfs_buffer_bdbuf_release>,%a4 5ba4c: 0284 0000 00ff andil #255,%d4
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("rtems-rfs: release-chain: count=%" PRIu32 "\n", *count);
while (!rtems_chain_is_empty (chain))
5ba52: b692 cmpl %a2@,%d3
5ba54: 6724 beqs 5ba7a <rtems_rfs_release_chain+0x66>
5ba56: 2f0a movel %a2,%sp@- 5ba58: 4e95 jsr %a5@
{
buffer = (rtems_rfs_buffer*) rtems_chain_get (chain);
(*count)--;
5ba5a: 5393 subql #1,%a3@
buffer->user = (void*) 0;
5ba5c: 2040 moveal %d0,%a0 5ba5e: 42a8 0036 clrl %a0@(54)
rc = rtems_rfs_buffer_io_release (buffer, modified);
5ba62: 2f04 movel %d4,%sp@- 5ba64: 2f00 movel %d0,%sp@- 5ba66: 4e94 jsr %a4@
if ((rc > 0) && (rrc == 0))
5ba68: 4fef 000c lea %sp@(12),%sp 5ba6c: 4a80 tstl %d0
5ba6e: 6fe2 bles 5ba52 <rtems_rfs_release_chain+0x3e> <== ALWAYS TAKEN
5ba70: 4a82 tstl %d2 <== NOT EXECUTED 5ba72: 66de bnes 5ba52 <rtems_rfs_release_chain+0x3e> <== NOT EXECUTED 5ba74: 2400 movel %d0,%d2 <== NOT EXECUTED
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("rtems-rfs: release-chain: count=%" PRIu32 "\n", *count);
while (!rtems_chain_is_empty (chain))
5ba76: b692 cmpl %a2@,%d3 <== NOT EXECUTED 5ba78: 66dc bnes 5ba56 <rtems_rfs_release_chain+0x42> <== NOT EXECUTED
rc = rtems_rfs_buffer_io_release (buffer, modified);
if ((rc > 0) && (rrc == 0))
rrc = rc;
}
return rrc;
}
5ba7a: 2002 movel %d2,%d0 5ba7c: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 5ba82: 4e5e unlk %fp 5ba84: 4e75 rts
rtems_rfs_buffer* buffer;
int rrc = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("rtems-rfs: release-chain: count=%" PRIu32 "\n", *count);
5ba86: 2f13 movel %a3@,%sp@- <== NOT EXECUTED 5ba88: 260a movel %a2,%d3 <== NOT EXECUTED 5ba8a: 4879 0007 36d9 pea 736d9 <CSWTCH.1+0xfd> <== NOT EXECUTED
(*count)--;
buffer->user = (void*) 0;
rc = rtems_rfs_buffer_io_release (buffer, modified);
if ((rc > 0) && (rrc == 0))
5ba90: 4282 clrl %d2 <== NOT EXECUTED 5ba92: 5883 addql #4,%d3 <== NOT EXECUTED 5ba94: 4bf9 0004 bba0 lea 4bba0 <_Chain_Get>,%a5 <== NOT EXECUTED
buffer = (rtems_rfs_buffer*) rtems_chain_get (chain);
(*count)--;
buffer->user = (void*) 0;
rc = rtems_rfs_buffer_io_release (buffer, modified);
5ba9a: 49f9 0006 21d2 lea 621d2 <rtems_rfs_buffer_bdbuf_release>,%a4<== NOT EXECUTED
rtems_rfs_buffer* buffer;
int rrc = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("rtems-rfs: release-chain: count=%" PRIu32 "\n", *count);
5baa0: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5baa6: 508f addql #8,%sp <== NOT EXECUTED
buffer = (rtems_rfs_buffer*) rtems_chain_get (chain);
(*count)--;
buffer->user = (void*) 0;
rc = rtems_rfs_buffer_io_release (buffer, modified);
5baa8: 0284 0000 00ff andil #255,%d4 <== NOT EXECUTED 5baae: 60a2 bras 5ba52 <rtems_rfs_release_chain+0x3e> <== NOT EXECUTED
0005200e <rtems_rfs_rtems_chown>:
static int
rtems_rfs_rtems_chown (rtems_filesystem_location_info_t *pathloc,
uid_t owner,
gid_t group)
{
5200e: 4e56 ffc0 linkw %fp,#-64 52012: 206e 0008 moveal %fp@(8),%a0
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
52016: 2268 0010 moveal %a0@(16),%a1
static int
rtems_rfs_rtems_chown (rtems_filesystem_location_info_t *pathloc,
uid_t owner,
gid_t group)
{
5201a: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
5201e: 2469 0034 moveal %a1@(52),%a2
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
52022: 42a7 clrl %sp@-
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
52024: 2610 movel %a0@,%d3 52026: 42a7 clrl %sp@-
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
return rtems_rfs_rtems_error ("shutdown: close", rc);
}
52028: 206a 007c moveal %a2@(124),%a0 5202c: 2f10 movel %a0@,%sp@-
static int
rtems_rfs_rtems_chown (rtems_filesystem_location_info_t *pathloc,
uid_t owner,
gid_t group)
{
5202e: 382e 000e movew %fp@(14),%d4 52032: 3a2e 0012 movew %fp@(18),%d5 52036: 4eb9 0004 af20 jsr 4af20 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
5203c: 4fef 000c lea %sp@(12),%sp
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
52040: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL)
52042: 664c bnes 52090 <rtems_rfs_rtems_chown+0x82> <== NEVER TAKEN
printf ("rtems-rfs-rtems: chown: in: ino:%" PRId32 " uid:%d gid:%d\n",
ino, owner, group);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
52044: 4878 0001 pea 1 <ADD> 52048: 486e ffda pea %fp@(-38) 5204c: 2f03 movel %d3,%sp@- 5204e: 2f0a movel %a2,%sp@- 52050: 4eb9 0005 0300 jsr 50300 <rtems_rfs_inode_open>
if (rc > 0)
52056: 4fef 0010 lea %sp@(16),%sp
printf ("rtems-rfs-rtems: chown: in: ino:%" PRId32 " uid:%d gid:%d\n",
ino, owner, group);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
5205a: 2400 movel %d0,%d2
if (rc > 0)
5205c: 6f78 bles 520d6 <rtems_rfs_rtems_chown+0xc8> <== ALWAYS TAKEN
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
5205e: 266a 007c moveal %a2@(124),%a3 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
52062: 2f0a movel %a2,%sp@- <== NOT EXECUTED 52064: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
5206a: 2f13 movel %a3@,%sp@- <== NOT EXECUTED 5206c: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
52072: 508f addql #8,%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
52074: 2600 movel %d0,%d3 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
52076: 6600 00fa bnew 52172 <rtems_rfs_rtems_chown+0x164> <== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
if (rc)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("chown: closing inode", rc);
5207a: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 52080: 2040 moveal %d0,%a0 <== NOT EXECUTED 52082: 70ff moveq #-1,%d0 <== NOT EXECUTED 52084: 2082 movel %d2,%a0@ <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
52086: 4cee 0c3c ffc0 moveml %fp@(-64),%d2-%d5/%a2-%a3 <== NOT EXECUTED 5208c: 4e5e unlk %fp <== NOT EXECUTED 5208e: 4e75 rts <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
52090: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 52094: 42a7 clrl %sp@- <== NOT EXECUTED 52096: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 5209c: 508f addql #8,%sp <== NOT EXECUTED 5209e: 4a00 tstb %d0 <== NOT EXECUTED 520a0: 67a2 beqs 52044 <rtems_rfs_rtems_chown+0x36> <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
520a2: 2f02 movel %d2,%sp@- <== NOT EXECUTED 520a4: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 520aa: 2f00 movel %d0,%sp@- <== NOT EXECUTED 520ac: 4879 0007 2f06 pea 72f06 <ramdisk_ops+0xb28> <== NOT EXECUTED 520b2: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 520b8: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
printf ("rtems-rfs-rtems: chown: in: ino:%" PRId32 " uid:%d gid:%d\n",
ino, owner, group);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
520bc: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 520c0: 486e ffda pea %fp@(-38) <== NOT EXECUTED 520c4: 2f03 movel %d3,%sp@- <== NOT EXECUTED 520c6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 520c8: 4eb9 0005 0300 jsr 50300 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc > 0)
520ce: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
printf ("rtems-rfs-rtems: chown: in: ino:%" PRId32 " uid:%d gid:%d\n",
ino, owner, group);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
520d2: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
520d4: 6e88 bgts 5205e <rtems_rfs_rtems_chown+0x50> <== NOT EXECUTED
/*
* Verify I am the owner of the node or the super user.
*/
#if defined (RTEMS_POSIX_API)
uid = geteuid();
520d6: 4eb9 0005 7818 jsr 57818 <geteuid>
if ((uid != rtems_rfs_inode_get_uid (&inode)) && (uid != 0))
520dc: 206e ffe6 moveal %fp@(-26),%a0
* @return uint16_t The user id (uid).
*/
static inline uint16_t
rtems_rfs_inode_get_uid (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->owner) & 0xffff;
520e0: 4281 clrl %d1 520e2: 1228 0006 moveb %a0@(6),%d1 520e6: 4283 clrl %d3 520e8: 1628 0007 moveb %a0@(7),%d3 520ec: 4282 clrl %d2 520ee: e189 lsll #8,%d1 520f0: 3400 movew %d0,%d2 520f2: 8283 orl %d3,%d1 520f4: b282 cmpl %d2,%d1
520f6: 6706 beqs 520fe <rtems_rfs_rtems_chown+0xf0> <== ALWAYS TAKEN
520f8: 4a40 tstw %d0 <== NOT EXECUTED 520fa: 6600 00ec bnew 521e8 <rtems_rfs_rtems_chown+0x1da> <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_uid_gid (rtems_rfs_inode_handle* handle,
uint16_t uid, uint16_t gid)
{
rtems_rfs_write_u32 (&handle->node->owner, (((uint32_t) gid) << 16) | uid);
520fe: 4280 clrl %d0 52100: 4845 swap %d5 52102: 4245 clrw %d5 52104: 3004 movew %d4,%d0 52106: 8a80 orl %d0,%d5 52108: 7018 moveq #24,%d0 5210a: 2205 movel %d5,%d1 5210c: e0a9 lsrl %d0,%d1 5210e: 2005 movel %d5,%d0 52110: e088 lsrl #8,%d0 52112: 1141 0004 moveb %d1,%a0@(4) 52116: 4245 clrw %d5 52118: 4845 swap %d5 5211a: 206e ffe6 moveal %fp@(-26),%a0 5211e: 1145 0005 moveb %d5,%a0@(5) 52122: 206e ffe6 moveal %fp@(-26),%a0 52126: 1140 0006 moveb %d0,%a0@(6)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
5212a: 7001 moveq #1,%d0
*/
static inline void
rtems_rfs_inode_set_uid_gid (rtems_rfs_inode_handle* handle,
uint16_t uid, uint16_t gid)
{
rtems_rfs_write_u32 (&handle->node->owner, (((uint32_t) gid) << 16) | uid);
5212c: 206e ffe6 moveal %fp@(-26),%a0 52130: 1144 0007 moveb %d4,%a0@(7)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
52134: 1d40 ffea moveb %d0,%fp@(-22)
}
#endif
rtems_rfs_inode_set_uid_gid (&inode, owner, group);
rc = rtems_rfs_inode_close (fs, &inode);
52138: 486e ffda pea %fp@(-38) 5213c: 2f0a movel %a2,%sp@- 5213e: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close>
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
52144: 266a 007c moveal %a2@(124),%a3 52148: 2400 movel %d0,%d2
if (rc)
5214a: 508f addql #8,%sp 5214c: 6600 ff14 bnew 52062 <rtems_rfs_rtems_chown+0x54>
rtems_rfs_buffers_release (fs);
52150: 2f0a movel %a2,%sp@- 52152: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release>
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
52158: 2f13 movel %a3@,%sp@- 5215a: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL)
52160: 508f addql #8,%sp
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
52162: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL)
52164: 664a bnes 521b0 <rtems_rfs_rtems_chown+0x1a2> <== NEVER TAKEN
return rtems_rfs_rtems_error ("chown: closing inode", rc);
}
rtems_rfs_rtems_unlock (fs);
return 0;
52166: 4280 clrl %d0
}
52168: 4cee 0c3c ffc0 moveml %fp@(-64),%d2-%d5/%a2-%a3 5216e: 4e5e unlk %fp 52170: 4e75 rts
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
52172: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 52176: 42a7 clrl %sp@- <== NOT EXECUTED 52178: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 5217e: 508f addql #8,%sp <== NOT EXECUTED 52180: 4a00 tstb %d0 <== NOT EXECUTED 52182: 6700 fef6 beqw 5207a <rtems_rfs_rtems_chown+0x6c> <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
52186: 2f03 movel %d3,%sp@- <== NOT EXECUTED 52188: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 5218e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 52190: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 52196: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5219c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
if (rc)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("chown: closing inode", rc);
521a0: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 521a6: 2040 moveal %d0,%a0 <== NOT EXECUTED 521a8: 70ff moveq #-1,%d0 <== NOT EXECUTED 521aa: 2082 movel %d2,%a0@ <== NOT EXECUTED 521ac: 6000 fed8 braw 52086 <rtems_rfs_rtems_chown+0x78> <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
521b0: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 521b4: 42a7 clrl %sp@- <== NOT EXECUTED 521b6: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 521bc: 508f addql #8,%sp <== NOT EXECUTED 521be: 4a00 tstb %d0 <== NOT EXECUTED 521c0: 67a4 beqs 52166 <rtems_rfs_rtems_chown+0x158> <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
521c2: 2f02 movel %d2,%sp@- <== NOT EXECUTED 521c4: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 521ca: 2f00 movel %d0,%sp@- <== NOT EXECUTED 521cc: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 521d2: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 521d8: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
521dc: 4280 clrl %d0 <== NOT EXECUTED
}
521de: 4cee 0c3c ffc0 moveml %fp@(-64),%d2-%d5/%a2-%a3 <== NOT EXECUTED 521e4: 4e5e unlk %fp <== NOT EXECUTED 521e6: 4e75 rts <== NOT EXECUTED
#if defined (RTEMS_POSIX_API)
uid = geteuid();
if ((uid != rtems_rfs_inode_get_uid (&inode)) && (uid != 0))
{
rtems_rfs_inode_close (fs, &inode);
521e8: 486e ffda pea %fp@(-38) <== NOT EXECUTED 521ec: 2f0a movel %a2,%sp@- <== NOT EXECUTED 521ee: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
521f4: 266a 007c moveal %a2@(124),%a3 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
521f8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 521fa: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
52200: 2f13 movel %a3@,%sp@- <== NOT EXECUTED 52202: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
52208: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
5220c: 2400 movel %d0,%d2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
5220e: 6618 bnes 52228 <rtems_rfs_rtems_chown+0x21a> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("chown: not able", EPERM);
52210: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 52216: 7401 moveq #1,%d2 <== NOT EXECUTED 52218: 2040 moveal %d0,%a0 <== NOT EXECUTED 5221a: 70ff moveq #-1,%d0 <== NOT EXECUTED 5221c: 2082 movel %d2,%a0@ <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
5221e: 4cee 0c3c ffc0 moveml %fp@(-64),%d2-%d5/%a2-%a3 <== NOT EXECUTED 52224: 4e5e unlk %fp <== NOT EXECUTED 52226: 4e75 rts <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
52228: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 5222c: 42a7 clrl %sp@- <== NOT EXECUTED 5222e: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 52234: 508f addql #8,%sp <== NOT EXECUTED 52236: 4a00 tstb %d0 <== NOT EXECUTED 52238: 67d6 beqs 52210 <rtems_rfs_rtems_chown+0x202> <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
5223a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
if ((uid != rtems_rfs_inode_get_uid (&inode)) && (uid != 0))
{
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("chown: not able", EPERM);
5223c: 7401 moveq #1,%d2 <== NOT EXECUTED 5223e: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 52244: 2f00 movel %d0,%sp@- <== NOT EXECUTED 52246: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 5224c: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 52252: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 52256: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 5225c: 2040 moveal %d0,%a0 <== NOT EXECUTED 5225e: 70ff moveq #-1,%d0 <== NOT EXECUTED 52260: 2082 movel %d2,%a0@ <== NOT EXECUTED 52262: 60ba bras 5221e <rtems_rfs_rtems_chown+0x210> <== NOT EXECUTED
00060102 <rtems_rfs_rtems_device_close>:
* @return int
*/
static int
rtems_rfs_rtems_device_close (rtems_libio_t* iop)
{
60102: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 60106: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
args.iop = iop;
args.flags = 0;
args.mode = 0;
status = rtems_io_close (major, minor, (void *) &args);
6010a: 486e fff4 pea %fp@(-12) <== NOT EXECUTED
rtems_status_code status;
int major;
int minor;
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
6010e: 2228 0034 movel %a0@(52),%d1 <== NOT EXECUTED
rtems_libio_open_close_args_t args;
rtems_status_code status;
int major;
int minor;
major = (int) iop->data0;
60112: 2028 0030 movel %a0@(48),%d0 <== NOT EXECUTED
args.iop = iop;
args.flags = 0;
args.mode = 0;
status = rtems_io_close (major, minor, (void *) &args);
60116: 2f01 movel %d1,%sp@- <== NOT EXECUTED
int minor;
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
args.iop = iop;
60118: 2d48 fff4 movel %a0,%fp@(-12) <== NOT EXECUTED
args.flags = 0;
args.mode = 0;
status = rtems_io_close (major, minor, (void *) &args);
6011c: 2f00 movel %d0,%sp@- <== NOT EXECUTED
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
args.iop = iop;
args.flags = 0;
6011e: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED
args.mode = 0;
60122: 42ae fffc clrl %fp@(-4) <== NOT EXECUTED
status = rtems_io_close (major, minor, (void *) &args);
60126: 4eb9 0006 1e88 jsr 61e88 <rtems_io_close> <== NOT EXECUTED
return rtems_deviceio_errno (status);
6012c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 6012e: 4eb9 0006 1420 jsr 61420 <rtems_deviceio_errno> <== NOT EXECUTED
}
60134: 4e5e unlk %fp <== NOT EXECUTED
0005ffcc <rtems_rfs_rtems_device_ftruncate>:
static int
rtems_rfs_rtems_device_ftruncate (rtems_libio_t* iop, rtems_off64_t length)
{
return 0;
}
5ffcc: 4280 clrl %d0 <== NOT EXECUTED
* @return int
*/
static int
rtems_rfs_rtems_device_ftruncate (rtems_libio_t* iop, rtems_off64_t length)
{
5ffce: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
return 0; }
5ffd2: 4e5e unlk %fp <== NOT EXECUTED
0005ffd6 <rtems_rfs_rtems_device_ioctl>:
static int
rtems_rfs_rtems_device_ioctl (rtems_libio_t* iop,
uint32_t command,
void* buffer)
{
5ffd6: 4e56 fff0 linkw %fp,#-16 <== NOT EXECUTED 5ffda: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
args.iop = iop;
args.command = command;
args.buffer = buffer;
status = rtems_io_control (major, minor, (void *) &args);
5ffde: 486e fff0 pea %fp@(-16) <== NOT EXECUTED
rtems_status_code status;
int major;
int minor;
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
5ffe2: 2228 0034 movel %a0@(52),%d1 <== NOT EXECUTED
rtems_libio_ioctl_args_t args;
rtems_status_code status;
int major;
int minor;
major = (int) iop->data0;
5ffe6: 2028 0030 movel %a0@(48),%d0 <== NOT EXECUTED
args.iop = iop;
args.command = command;
args.buffer = buffer;
status = rtems_io_control (major, minor, (void *) &args);
5ffea: 2f01 movel %d1,%sp@- <== NOT EXECUTED
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
args.iop = iop;
args.command = command;
5ffec: 2d6e 000c fff4 movel %fp@(12),%fp@(-12) <== NOT EXECUTED
args.buffer = buffer;
5fff2: 2d6e 0010 fff8 movel %fp@(16),%fp@(-8) <== NOT EXECUTED
status = rtems_io_control (major, minor, (void *) &args);
5fff8: 2f00 movel %d0,%sp@- <== NOT EXECUTED
int minor;
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
args.iop = iop;
5fffa: 2d48 fff0 movel %a0,%fp@(-16) <== NOT EXECUTED
args.command = command;
args.buffer = buffer;
status = rtems_io_control (major, minor, (void *) &args);
5fffe: 4eb9 0006 1ed0 jsr 61ed0 <rtems_io_control> <== NOT EXECUTED
if (status)
60004: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 60008: 4a80 tstl %d0 <== NOT EXECUTED 6000a: 6608 bnes 60014 <rtems_rfs_rtems_device_ioctl+0x3e><== NOT EXECUTED
return rtems_deviceio_errno (status);
return args.ioctl_return;
6000c: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED
}
60010: 4e5e unlk %fp <== NOT EXECUTED 60012: 4e75 rts <== NOT EXECUTED
args.command = command;
args.buffer = buffer;
status = rtems_io_control (major, minor, (void *) &args);
if (status)
return rtems_deviceio_errno (status);
60014: 2f00 movel %d0,%sp@- <== NOT EXECUTED 60016: 4eb9 0006 1420 jsr 61420 <rtems_deviceio_errno> <== NOT EXECUTED 6001c: 588f addql #4,%sp <== NOT EXECUTED
return args.ioctl_return;
}
6001e: 4e5e unlk %fp <== NOT EXECUTED
0005ffbc <rtems_rfs_rtems_device_lseek>:
static rtems_off64_t
rtems_rfs_rtems_device_lseek (rtems_libio_t* iop,
rtems_off64_t offset,
int whence)
{
5ffbc: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
return offset; }
5ffc0: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED 5ffc4: 222e 0010 movel %fp@(16),%d1 <== NOT EXECUTED 5ffc8: 4e5e unlk %fp <== NOT EXECUTED
00060138 <rtems_rfs_rtems_device_open>:
static int
rtems_rfs_rtems_device_open ( rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode)
{
60138: 4e56 ffa0 linkw %fp,#-96 <== NOT EXECUTED 6013c: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED 60140: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED
rtems_libio_open_close_args_t args; rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
60144: 206b 0028 moveal %a3@(40),%a0 <== NOT EXECUTED 60148: 2468 0034 moveal %a0@(52),%a2 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
6014c: 42a7 clrl %sp@- <== NOT EXECUTED 6014e: 42a7 clrl %sp@- <== NOT EXECUTED
.fpathconf_h = rtems_filesystem_default_fpathconf, .fsync_h = rtems_filesystem_default_fsync, .fdatasync_h = rtems_filesystem_default_fdatasync, .fcntl_h = rtems_filesystem_default_fcntl, .rmnod_h = rtems_rfs_rtems_rmnod };
60150: 206a 007c moveal %a2@(124),%a0 <== NOT EXECUTED 60154: 2f10 movel %a0@,%sp@- <== NOT EXECUTED
uint32_t flag,
uint32_t mode)
{
rtems_libio_open_close_args_t args;
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
rtems_rfs_ino ino = rtems_rfs_rtems_get_iop_ino (iop);
60156: 262b 0018 movel %a3@(24),%d3 <== NOT EXECUTED 6015a: 4eb9 0004 af20 jsr 4af20 <rtems_semaphore_obtain> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
60160: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
60164: 2400 movel %d0,%d2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
60166: 6600 0088 bnew 601f0 <rtems_rfs_rtems_device_open+0xb8><== NOT EXECUTED
rtems_status_code status;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
6016a: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 6016e: 486e ffce pea %fp@(-50) <== NOT EXECUTED 60172: 2f03 movel %d3,%sp@- <== NOT EXECUTED 60174: 2f0a movel %a2,%sp@- <== NOT EXECUTED 60176: 4eb9 0005 0300 jsr 50300 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc > 0)
6017c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rtems_status_code status;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
60180: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
60182: 6f00 00b6 blew 6023a <rtems_rfs_rtems_device_open+0x102><== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
60186: 266a 007c moveal %a2@(124),%a3 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
6018a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 6018c: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
60192: 2f13 movel %a3@,%sp@- <== NOT EXECUTED 60194: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
6019a: 508f addql #8,%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
6019c: 2600 movel %d0,%d3 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
6019e: 6616 bnes 601b6 <rtems_rfs_rtems_device_open+0x7e><== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
if (rc > 0)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("device_open: closing inode", rc);
601a0: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 601a6: 2040 moveal %d0,%a0 <== NOT EXECUTED 601a8: 70ff moveq #-1,%d0 <== NOT EXECUTED 601aa: 2082 movel %d2,%a0@ <== NOT EXECUTED
args.mode = mode;
status = rtems_io_open (major, minor, (void *) &args);
return rtems_deviceio_errno (status);
}
601ac: 4cee 3cfc ffa0 moveml %fp@(-96),%d2-%d7/%a2-%a5 <== NOT EXECUTED 601b2: 4e5e unlk %fp <== NOT EXECUTED 601b4: 4e75 rts <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
601b6: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 601ba: 42a7 clrl %sp@- <== NOT EXECUTED 601bc: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 601c2: 508f addql #8,%sp <== NOT EXECUTED 601c4: 4a00 tstb %d0 <== NOT EXECUTED 601c6: 67d8 beqs 601a0 <rtems_rfs_rtems_device_open+0x68><== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
601c8: 2f03 movel %d3,%sp@- <== NOT EXECUTED 601ca: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 601d0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 601d2: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 601d8: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 601de: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
if (rc > 0)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("device_open: closing inode", rc);
601e2: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 601e8: 2040 moveal %d0,%a0 <== NOT EXECUTED 601ea: 70ff moveq #-1,%d0 <== NOT EXECUTED 601ec: 2082 movel %d2,%a0@ <== NOT EXECUTED 601ee: 60bc bras 601ac <rtems_rfs_rtems_device_open+0x74><== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
601f0: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 601f4: 42a7 clrl %sp@- <== NOT EXECUTED 601f6: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 601fc: 508f addql #8,%sp <== NOT EXECUTED 601fe: 4a00 tstb %d0 <== NOT EXECUTED 60200: 6700 ff68 beqw 6016a <rtems_rfs_rtems_device_open+0x32><== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
60204: 2f02 movel %d2,%sp@- <== NOT EXECUTED 60206: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 6020c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 6020e: 4879 0007 2f06 pea 72f06 <ramdisk_ops+0xb28> <== NOT EXECUTED 60214: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 6021a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rtems_status_code status;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
6021e: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 60222: 486e ffce pea %fp@(-50) <== NOT EXECUTED 60226: 2f03 movel %d3,%sp@- <== NOT EXECUTED 60228: 2f0a movel %a2,%sp@- <== NOT EXECUTED 6022a: 4eb9 0005 0300 jsr 50300 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc > 0)
60230: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rtems_status_code status;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
60234: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
60236: 6e00 ff4e bgtw 60186 <rtems_rfs_rtems_device_open+0x4e><== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("device_open: opening inode", rc);
}
major = rtems_rfs_inode_get_block (&inode, 0);
6023a: 206e ffda moveal %fp@(-38),%a0 <== NOT EXECUTED
* @return uint32_t The block number.
*/
static inline uint32_t
rtems_rfs_inode_get_block (rtems_rfs_inode_handle* handle, int block)
{
return rtems_rfs_read_u32 (&handle->node->data.blocks[block]);
6023e: 1628 0020 moveb %a0@(32),%d3 <== NOT EXECUTED 60242: 1428 001e moveb %a0@(30),%d2 <== NOT EXECUTED 60246: 3843 moveaw %d3,%a4 <== NOT EXECUTED 60248: 1028 001d moveb %a0@(29),%d0 <== NOT EXECUTED 6024c: 1e28 001c moveb %a0@(28),%d7 <== NOT EXECUTED 60250: 1828 001f moveb %a0@(31),%d4 <== NOT EXECUTED 60254: 1628 0021 moveb %a0@(33),%d3 <== NOT EXECUTED 60258: 1a28 0022 moveb %a0@(34),%d5 <== NOT EXECUTED 6025c: 1c28 0023 moveb %a0@(35),%d6 <== NOT EXECUTED
minor = rtems_rfs_inode_get_block (&inode, 1);
rc = rtems_rfs_inode_close (fs, &inode);
60260: 486e ffce pea %fp@(-50) <== NOT EXECUTED 60264: 1d42 ffca moveb %d2,%fp@(-54) <== NOT EXECUTED 60268: 2f0a movel %a2,%sp@- <== NOT EXECUTED 6026a: 3a40 moveaw %d0,%a5 <== NOT EXECUTED 6026c: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc > 0)
60272: 508f addql #8,%sp <== NOT EXECUTED
}
major = rtems_rfs_inode_get_block (&inode, 0);
minor = rtems_rfs_inode_get_block (&inode, 1);
rc = rtems_rfs_inode_close (fs, &inode);
60274: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
60276: 6e00 ff0e bgtw 60186 <rtems_rfs_rtems_device_open+0x4e><== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
6027a: 242a 007c movel %a2@(124),%d2 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
6027e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 60280: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
60286: 2042 moveal %d2,%a0 <== NOT EXECUTED 60288: 2f10 movel %a0@,%sp@- <== NOT EXECUTED 6028a: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
60290: 508f addql #8,%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
60292: 2400 movel %d0,%d2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
60294: 667e bnes 60314 <rtems_rfs_rtems_device_open+0x1dc><== NOT EXECUTED 60296: 4282 clrl %d2 <== NOT EXECUTED 60298: 4281 clrl %d1 <== NOT EXECUTED 6029a: 1403 moveb %d3,%d2 <== NOT EXECUTED 6029c: 7618 moveq #24,%d3 <== NOT EXECUTED
args.iop = iop;
args.flags = iop->flags;
args.mode = mode;
status = rtems_io_open (major, minor, (void *) &args);
6029e: 486e fff4 pea %fp@(-12) <== NOT EXECUTED
iop->data0 = major;
iop->data1 = (void*)((intptr_t) minor);
args.iop = iop;
args.flags = iop->flags;
602a2: 2d6b 0014 fff8 movel %a3@(20),%fp@(-8) <== NOT EXECUTED
args.mode = mode;
602a8: 2d6e 0014 fffc movel %fp@(20),%fp@(-4) <== NOT EXECUTED 602ae: 300d movew %a5,%d0 <== NOT EXECUTED 602b0: 4842 swap %d2 <== NOT EXECUTED 602b2: 4242 clrw %d2 <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
iop->data0 = major;
iop->data1 = (void*)((intptr_t) minor);
args.iop = iop;
602b4: 2d4b fff4 movel %a3,%fp@(-12) <== NOT EXECUTED 602b8: 1200 moveb %d0,%d1 <== NOT EXECUTED 602ba: 200c movel %a4,%d0 <== NOT EXECUTED 602bc: e7a8 lsll %d3,%d0 <== NOT EXECUTED 602be: 0286 0000 00ff andil #255,%d6 <== NOT EXECUTED 602c4: 8082 orl %d2,%d0 <== NOT EXECUTED 602c6: 0285 0000 00ff andil #255,%d5 <== NOT EXECUTED 602cc: 4841 swap %d1 <== NOT EXECUTED 602ce: 4241 clrw %d1 <== NOT EXECUTED 602d0: e7af lsll %d3,%d7 <== NOT EXECUTED 602d2: 4283 clrl %d3 <== NOT EXECUTED 602d4: 162e ffca moveb %fp@(-54),%d3 <== NOT EXECUTED 602d8: 8086 orl %d6,%d0 <== NOT EXECUTED 602da: e18d lsll #8,%d5 <== NOT EXECUTED 602dc: 8e81 orl %d1,%d7 <== NOT EXECUTED 602de: 0284 0000 00ff andil #255,%d4 <== NOT EXECUTED 602e4: 8085 orl %d5,%d0 <== NOT EXECUTED 602e6: 8e84 orl %d4,%d7 <== NOT EXECUTED
args.flags = iop->flags;
args.mode = mode;
status = rtems_io_open (major, minor, (void *) &args);
602e8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 602ea: e18b lsll #8,%d3 <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
iop->data0 = major;
iop->data1 = (void*)((intptr_t) minor);
602ec: 2740 0034 movel %d0,%a3@(52) <== NOT EXECUTED 602f0: 8e83 orl %d3,%d7 <== NOT EXECUTED
args.iop = iop;
args.flags = iop->flags;
args.mode = mode;
status = rtems_io_open (major, minor, (void *) &args);
602f2: 2f07 movel %d7,%sp@- <== NOT EXECUTED
return rtems_rfs_rtems_error ("device_open: closing inode", rc);
}
rtems_rfs_rtems_unlock (fs);
iop->data0 = major;
602f4: 2747 0030 movel %d7,%a3@(48) <== NOT EXECUTED
args.iop = iop;
args.flags = iop->flags;
args.mode = mode;
status = rtems_io_open (major, minor, (void *) &args);
602f8: 4eb9 0006 1f18 jsr 61f18 <rtems_io_open> <== NOT EXECUTED
return rtems_deviceio_errno (status);
602fe: 2f00 movel %d0,%sp@- <== NOT EXECUTED 60300: 4eb9 0006 1420 jsr 61420 <rtems_deviceio_errno> <== NOT EXECUTED 60306: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
}
6030a: 4cee 3cfc ffa0 moveml %fp@(-96),%d2-%d7/%a2-%a5 <== NOT EXECUTED 60310: 4e5e unlk %fp <== NOT EXECUTED 60312: 4e75 rts <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
60314: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 60318: 42a7 clrl %sp@- <== NOT EXECUTED 6031a: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 60320: 508f addql #8,%sp <== NOT EXECUTED 60322: 4a00 tstb %d0 <== NOT EXECUTED 60324: 6700 ff70 beqw 60296 <rtems_rfs_rtems_device_open+0x15e><== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
60328: 2f02 movel %d2,%sp@- <== NOT EXECUTED 6032a: 4282 clrl %d2 <== NOT EXECUTED 6032c: 1403 moveb %d3,%d2 <== NOT EXECUTED 6032e: 7618 moveq #24,%d3 <== NOT EXECUTED 60330: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 60336: 4842 swap %d2 <== NOT EXECUTED 60338: 4242 clrw %d2 <== NOT EXECUTED 6033a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 6033c: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 60342: 0286 0000 00ff andil #255,%d6 <== NOT EXECUTED 60348: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 6034e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 60352: 4281 clrl %d1 <== NOT EXECUTED
args.iop = iop;
args.flags = iop->flags;
args.mode = mode;
status = rtems_io_open (major, minor, (void *) &args);
60354: 486e fff4 pea %fp@(-12) <== NOT EXECUTED
iop->data0 = major;
iop->data1 = (void*)((intptr_t) minor);
args.iop = iop;
args.flags = iop->flags;
60358: 2d6b 0014 fff8 movel %a3@(20),%fp@(-8) <== NOT EXECUTED
args.mode = mode;
6035e: 2d6e 0014 fffc movel %fp@(20),%fp@(-4) <== NOT EXECUTED 60364: 300d movew %a5,%d0 <== NOT EXECUTED 60366: 0285 0000 00ff andil #255,%d5 <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
iop->data0 = major;
iop->data1 = (void*)((intptr_t) minor);
args.iop = iop;
6036c: 2d4b fff4 movel %a3,%fp@(-12) <== NOT EXECUTED 60370: 1200 moveb %d0,%d1 <== NOT EXECUTED 60372: 200c movel %a4,%d0 <== NOT EXECUTED 60374: e7a8 lsll %d3,%d0 <== NOT EXECUTED 60376: 4841 swap %d1 <== NOT EXECUTED 60378: 4241 clrw %d1 <== NOT EXECUTED 6037a: 8082 orl %d2,%d0 <== NOT EXECUTED 6037c: e7af lsll %d3,%d7 <== NOT EXECUTED 6037e: 4283 clrl %d3 <== NOT EXECUTED 60380: 162e ffca moveb %fp@(-54),%d3 <== NOT EXECUTED 60384: 8086 orl %d6,%d0 <== NOT EXECUTED 60386: e18d lsll #8,%d5 <== NOT EXECUTED 60388: 8e81 orl %d1,%d7 <== NOT EXECUTED 6038a: 0284 0000 00ff andil #255,%d4 <== NOT EXECUTED 60390: 8085 orl %d5,%d0 <== NOT EXECUTED 60392: 8e84 orl %d4,%d7 <== NOT EXECUTED
args.flags = iop->flags;
args.mode = mode;
status = rtems_io_open (major, minor, (void *) &args);
60394: 2f00 movel %d0,%sp@- <== NOT EXECUTED 60396: e18b lsll #8,%d3 <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
iop->data0 = major;
iop->data1 = (void*)((intptr_t) minor);
60398: 2740 0034 movel %d0,%a3@(52) <== NOT EXECUTED 6039c: 8e83 orl %d3,%d7 <== NOT EXECUTED
args.iop = iop;
args.flags = iop->flags;
args.mode = mode;
status = rtems_io_open (major, minor, (void *) &args);
6039e: 2f07 movel %d7,%sp@- <== NOT EXECUTED
return rtems_rfs_rtems_error ("device_open: closing inode", rc);
}
rtems_rfs_rtems_unlock (fs);
iop->data0 = major;
603a0: 2747 0030 movel %d7,%a3@(48) <== NOT EXECUTED
args.iop = iop;
args.flags = iop->flags;
args.mode = mode;
status = rtems_io_open (major, minor, (void *) &args);
603a4: 4eb9 0006 1f18 jsr 61f18 <rtems_io_open> <== NOT EXECUTED
return rtems_deviceio_errno (status);
603aa: 2f00 movel %d0,%sp@- <== NOT EXECUTED 603ac: 4eb9 0006 1420 jsr 61420 <rtems_deviceio_errno> <== NOT EXECUTED 603b2: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 603b6: 6000 ff52 braw 6030a <rtems_rfs_rtems_device_open+0x1d2><== NOT EXECUTED
...
00060092 <rtems_rfs_rtems_device_read>:
* @return ssize_t
*/
static ssize_t
rtems_rfs_rtems_device_read (rtems_libio_t* iop, void* buffer, size_t count)
{
60092: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 60096: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 6009a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read (major, minor, (void *) &args);
6009c: 486e ffe4 pea %fp@(-28) <== NOT EXECUTED
rtems_status_code status;
int major;
int minor;
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
600a0: 2228 0034 movel %a0@(52),%d1 <== NOT EXECUTED
rtems_libio_rw_args_t args;
rtems_status_code status;
int major;
int minor;
major = (int) iop->data0;
600a4: 2028 0030 movel %a0@(48),%d0 <== NOT EXECUTED
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read (major, minor, (void *) &args);
600a8: 2f01 movel %d1,%sp@- <== NOT EXECUTED
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
600aa: 2d68 0014 fff8 movel %a0@(20),%fp@(-8) <== NOT EXECUTED
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
600b0: 2d6e 000c fff0 movel %fp@(12),%fp@(-16) <== NOT EXECUTED
args.count = count;
600b6: 2d6e 0010 fff4 movel %fp@(16),%fp@(-12) <== NOT EXECUTED
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
args.iop = iop;
args.offset = iop->offset;
600bc: 2228 000c movel %a0@(12),%d1 <== NOT EXECUTED 600c0: 2428 0010 movel %a0@(16),%d2 <== NOT EXECUTED
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read (major, minor, (void *) &args);
600c4: 2f00 movel %d0,%sp@- <== NOT EXECUTED
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
args.iop = iop;
args.offset = iop->offset;
600c6: 2d41 ffe8 movel %d1,%fp@(-24) <== NOT EXECUTED 600ca: 2d42 ffec movel %d2,%fp@(-20) <== NOT EXECUTED
int minor;
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
args.iop = iop;
600ce: 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;
600d2: 42ae fffc clrl %fp@(-4) <== NOT EXECUTED
status = rtems_io_read (major, minor, (void *) &args);
600d6: 4eb9 0006 1f60 jsr 61f60 <rtems_io_read> <== NOT EXECUTED
if (status)
600dc: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 600e0: 4a80 tstl %d0 <== NOT EXECUTED 600e2: 660c bnes 600f0 <rtems_rfs_rtems_device_read+0x5e><== NOT EXECUTED
return rtems_deviceio_errno (status);
return (ssize_t) args.bytes_moved;
600e4: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED
}
600e8: 242e ffe0 movel %fp@(-32),%d2 <== NOT EXECUTED 600ec: 4e5e unlk %fp <== NOT EXECUTED 600ee: 4e75 rts <== NOT EXECUTED
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read (major, minor, (void *) &args);
if (status)
return rtems_deviceio_errno (status);
600f0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 600f2: 4eb9 0006 1420 jsr 61420 <rtems_deviceio_errno> <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
}
600f8: 242e ffe0 movel %fp@(-32),%d2 <== NOT EXECUTED
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read (major, minor, (void *) &args);
if (status)
return rtems_deviceio_errno (status);
600fc: 588f addql #4,%sp <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
}
600fe: 4e5e unlk %fp <== NOT EXECUTED
00060022 <rtems_rfs_rtems_device_write>:
static ssize_t
rtems_rfs_rtems_device_write (rtems_libio_t* iop,
const void* buffer,
size_t count)
{
60022: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 60026: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 6002a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_write (major, minor, (void *) &args);
6002c: 486e ffe4 pea %fp@(-28) <== NOT EXECUTED
rtems_status_code status;
int major;
int minor;
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
60030: 2228 0034 movel %a0@(52),%d1 <== NOT EXECUTED
rtems_libio_rw_args_t args;
rtems_status_code status;
int major;
int minor;
major = (int) iop->data0;
60034: 2028 0030 movel %a0@(48),%d0 <== NOT EXECUTED
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_write (major, minor, (void *) &args);
60038: 2f01 movel %d1,%sp@- <== NOT EXECUTED
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
6003a: 2d68 0014 fff8 movel %a0@(20),%fp@(-8) <== NOT EXECUTED
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
60040: 2d6e 000c fff0 movel %fp@(12),%fp@(-16) <== NOT EXECUTED
args.count = count;
60046: 2d6e 0010 fff4 movel %fp@(16),%fp@(-12) <== NOT EXECUTED
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
args.iop = iop;
args.offset = iop->offset;
6004c: 2228 000c movel %a0@(12),%d1 <== NOT EXECUTED 60050: 2428 0010 movel %a0@(16),%d2 <== NOT EXECUTED
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_write (major, minor, (void *) &args);
60054: 2f00 movel %d0,%sp@- <== NOT EXECUTED
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
args.iop = iop;
args.offset = iop->offset;
60056: 2d41 ffe8 movel %d1,%fp@(-24) <== NOT EXECUTED 6005a: 2d42 ffec movel %d2,%fp@(-20) <== NOT EXECUTED
int minor;
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
args.iop = iop;
6005e: 2d48 ffe4 movel %a0,%fp@(-28) <== NOT EXECUTED
args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0;
60062: 42ae fffc clrl %fp@(-4) <== NOT EXECUTED
status = rtems_io_write (major, minor, (void *) &args);
60066: 4eb9 0006 1fa8 jsr 61fa8 <rtems_io_write> <== NOT EXECUTED
if (status)
6006c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 60070: 4a80 tstl %d0 <== NOT EXECUTED 60072: 660c bnes 60080 <rtems_rfs_rtems_device_write+0x5e><== NOT EXECUTED
return rtems_deviceio_errno (status);
return (ssize_t) args.bytes_moved;
60074: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED
}
60078: 242e ffe0 movel %fp@(-32),%d2 <== NOT EXECUTED 6007c: 4e5e unlk %fp <== NOT EXECUTED 6007e: 4e75 rts <== NOT EXECUTED
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_write (major, minor, (void *) &args);
if (status)
return rtems_deviceio_errno (status);
60080: 2f00 movel %d0,%sp@- <== NOT EXECUTED 60082: 4eb9 0006 1420 jsr 61420 <rtems_deviceio_errno> <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
}
60088: 242e ffe0 movel %fp@(-32),%d2 <== NOT EXECUTED
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_write (major, minor, (void *) &args);
if (status)
return rtems_deviceio_errno (status);
6008c: 588f addql #4,%sp <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
}
6008e: 4e5e unlk %fp <== NOT EXECUTED
000603c6 <rtems_rfs_rtems_dir_lseek>:
static rtems_off64_t
rtems_rfs_rtems_dir_lseek (rtems_libio_t* iop,
rtems_off64_t offset,
int whence)
{
switch (whence)
603c6: 7001 moveq #1,%d0 <== NOT EXECUTED
*/
static rtems_off64_t
rtems_rfs_rtems_dir_lseek (rtems_libio_t* iop,
rtems_off64_t offset,
int whence)
{
603c8: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
switch (whence)
603cc: b0ae 0014 cmpl %fp@(20),%d0 <== NOT EXECUTED 603d0: 6414 bccs 603e6 <rtems_rfs_rtems_dir_lseek+0x20> <== NOT EXECUTED
break;
case SEEK_END: /* Movement past the end of the directory via lseek */
/* is not a permitted operation */
default:
return rtems_rfs_rtems_error ("dir_lseek: bad whence", EINVAL);
603d2: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED
break;
}
return 0;
}
603d8: 4e5e unlk %fp <== NOT EXECUTED
break;
case SEEK_END: /* Movement past the end of the directory via lseek */
/* is not a permitted operation */
default:
return rtems_rfs_rtems_error ("dir_lseek: bad whence", EINVAL);
603da: 2040 moveal %d0,%a0 <== NOT EXECUTED 603dc: 7016 moveq #22,%d0 <== NOT EXECUTED 603de: 2080 movel %d0,%a0@ <== NOT EXECUTED 603e0: 70ff moveq #-1,%d0 <== NOT EXECUTED 603e2: 72ff moveq #-1,%d1 <== NOT EXECUTED
break;
}
return 0;
}
603e4: 4e75 rts <== NOT EXECUTED 603e6: 4e5e unlk %fp <== NOT EXECUTED
/* is not a permitted operation */
default:
return rtems_rfs_rtems_error ("dir_lseek: bad whence", EINVAL);
break;
}
return 0;
603e8: 4280 clrl %d0 <== NOT EXECUTED 603ea: 4281 clrl %d1 <== NOT EXECUTED
}
000607dc <rtems_rfs_rtems_dir_open>:
static int
rtems_rfs_rtems_dir_open (rtems_libio_t* iop,
const char* pathname,
uint32_t flag,
uint32_t mode)
{
607dc: 4e56 ffc4 linkw %fp,#-60 607e0: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 607e4: 266e 0008 moveal %fp@(8),%a3
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
607e8: 206b 0028 moveal %a3@(40),%a0 607ec: 2468 0034 moveal %a0@(52),%a2
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
607f0: 42a7 clrl %sp@-
rtems_rfs_ino ino = rtems_rfs_rtems_get_iop_ino (iop);
607f2: 262b 0018 movel %a3@(24),%d3 607f6: 42a7 clrl %sp@-
.fpathconf_h = rtems_filesystem_default_fpathconf, .fsync_h = rtems_filesystem_default_fsync, .fdatasync_h = rtems_rfs_rtems_fdatasync, .fcntl_h = rtems_filesystem_default_fcntl, .rmnod_h = rtems_rfs_rtems_dir_rmnod };
607f8: 206a 007c moveal %a2@(124),%a0 607fc: 2f10 movel %a0@,%sp@- 607fe: 4eb9 0004 af20 jsr 4af20 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
60804: 4fef 000c lea %sp@(12),%sp
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
60808: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL)
6080a: 667a bnes 60886 <rtems_rfs_rtems_dir_open+0xaa> <== NEVER TAKEN
rtems_rfs_inode_handle inode;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
6080c: 4878 0001 pea 1 <ADD> 60810: 49ee ffda lea %fp@(-38),%a4 60814: 2f0c movel %a4,%sp@- 60816: 2f03 movel %d3,%sp@- 60818: 2f0a movel %a2,%sp@- 6081a: 4eb9 0005 0300 jsr 50300 <rtems_rfs_inode_open>
if (rc)
60820: 4fef 0010 lea %sp@(16),%sp
rtems_rfs_inode_handle inode;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
60824: 2400 movel %d0,%d2
if (rc)
60826: 6600 00aa bnew 608d2 <rtems_rfs_rtems_dir_open+0xf6>
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("dir_open: opening inode", rc);
}
if (!RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)))
6082a: 206c 000c moveal %a4@(12),%a0
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
6082e: 4280 clrl %d0 60830: 1028 0002 moveb %a0@(2),%d0 60834: e188 lsll #8,%d0 60836: 0280 0000 f000 andil #61440,%d0 6083c: 0c80 0000 4000 cmpil #16384,%d0 60842: 6600 0132 bnew 60976 <rtems_rfs_rtems_dir_open+0x19a>
return rtems_rfs_rtems_error ("dir_open: not dir", ENOTDIR);
}
iop->offset = 0;
rtems_rfs_inode_close (fs, &inode);
60846: 2f0c movel %a4,%sp@-
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("dir_open: not dir", ENOTDIR);
}
iop->offset = 0;
60848: 4280 clrl %d0 6084a: 4281 clrl %d1 6084c: 2740 000c movel %d0,%a3@(12) 60850: 2741 0010 movel %d1,%a3@(16)
rtems_rfs_inode_close (fs, &inode);
60854: 2f0a movel %a2,%sp@- 60856: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close>
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
6085c: 266a 007c moveal %a2@(124),%a3
rtems_rfs_buffers_release (fs);
60860: 2f0a movel %a2,%sp@- 60862: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release>
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
60868: 2f13 movel %a3@,%sp@- 6086a: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL)
60870: 4fef 0010 lea %sp@(16),%sp
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
60874: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL)
60876: 6600 008a bnew 60902 <rtems_rfs_rtems_dir_open+0x126>
rtems_rfs_rtems_unlock (fs); return 0;
6087a: 4280 clrl %d0
}
6087c: 4cee 1c0c ffc4 moveml %fp@(-60),%d2-%d3/%a2-%a4 60882: 4e5e unlk %fp 60884: 4e75 rts
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
60886: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 6088a: 42a7 clrl %sp@- <== NOT EXECUTED 6088c: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 60892: 508f addql #8,%sp <== NOT EXECUTED 60894: 4a00 tstb %d0 <== NOT EXECUTED 60896: 6700 ff74 beqw 6080c <rtems_rfs_rtems_dir_open+0x30> <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
6089a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
rtems_rfs_inode_handle inode;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
6089c: 49ee ffda lea %fp@(-38),%a4 <== NOT EXECUTED 608a0: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 608a6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 608a8: 4879 0007 2f06 pea 72f06 <ramdisk_ops+0xb28> <== NOT EXECUTED 608ae: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 608b4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 608b8: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 608bc: 2f0c movel %a4,%sp@- <== NOT EXECUTED 608be: 2f03 movel %d3,%sp@- <== NOT EXECUTED 608c0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 608c2: 4eb9 0005 0300 jsr 50300 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc)
608c8: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rtems_rfs_inode_handle inode;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
608cc: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc)
608ce: 6700 ff5a beqw 6082a <rtems_rfs_rtems_dir_open+0x4e> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
608d2: 266a 007c moveal %a2@(124),%a3 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
608d6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 608d8: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
608de: 2f13 movel %a3@,%sp@- <== NOT EXECUTED 608e0: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
608e6: 508f addql #8,%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
608e8: 2600 movel %d0,%d3 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
608ea: 6650 bnes 6093c <rtems_rfs_rtems_dir_open+0x160> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("dir_open: opening inode", rc);
608ec: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 608f2: 2040 moveal %d0,%a0 <== NOT EXECUTED 608f4: 70ff moveq #-1,%d0 <== NOT EXECUTED 608f6: 2082 movel %d2,%a0@ <== NOT EXECUTED
iop->offset = 0;
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return 0;
}
608f8: 4cee 1c0c ffc4 moveml %fp@(-60),%d2-%d3/%a2-%a4 <== NOT EXECUTED 608fe: 4e5e unlk %fp <== NOT EXECUTED 60900: 4e75 rts <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
60902: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 60906: 42a7 clrl %sp@- <== NOT EXECUTED 60908: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 6090e: 508f addql #8,%sp <== NOT EXECUTED 60910: 4a00 tstb %d0 <== NOT EXECUTED 60912: 6700 ff66 beqw 6087a <rtems_rfs_rtems_dir_open+0x9e> <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
60916: 2f02 movel %d2,%sp@- <== NOT EXECUTED 60918: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 6091e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 60920: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 60926: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 6092c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
iop->offset = 0;
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return 0;
60930: 4280 clrl %d0 <== NOT EXECUTED
}
60932: 4cee 1c0c ffc4 moveml %fp@(-60),%d2-%d3/%a2-%a4 <== NOT EXECUTED 60938: 4e5e unlk %fp <== NOT EXECUTED 6093a: 4e75 rts <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
6093c: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 60940: 42a7 clrl %sp@- <== NOT EXECUTED 60942: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 60948: 508f addql #8,%sp <== NOT EXECUTED 6094a: 4a00 tstb %d0 <== NOT EXECUTED 6094c: 679e beqs 608ec <rtems_rfs_rtems_dir_open+0x110> <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
6094e: 2f03 movel %d3,%sp@- <== NOT EXECUTED 60950: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 60956: 2f00 movel %d0,%sp@- <== NOT EXECUTED 60958: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 6095e: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 60964: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
if (rc)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("dir_open: opening inode", rc);
60968: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 6096e: 2040 moveal %d0,%a0 <== NOT EXECUTED 60970: 70ff moveq #-1,%d0 <== NOT EXECUTED 60972: 2082 movel %d2,%a0@ <== NOT EXECUTED 60974: 6082 bras 608f8 <rtems_rfs_rtems_dir_open+0x11c> <== NOT EXECUTED
}
if (!RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)))
{
rtems_rfs_inode_close (fs, &inode);
60976: 2f0c movel %a4,%sp@- <== NOT EXECUTED 60978: 2f0a movel %a2,%sp@- <== NOT EXECUTED 6097a: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
60980: 266a 007c moveal %a2@(124),%a3 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
60984: 2f0a movel %a2,%sp@- <== NOT EXECUTED 60986: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
6098c: 2f13 movel %a3@,%sp@- <== NOT EXECUTED 6098e: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
60994: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
60998: 2400 movel %d0,%d2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
6099a: 6618 bnes 609b4 <rtems_rfs_rtems_dir_open+0x1d8> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("dir_open: not dir", ENOTDIR);
6099c: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 609a2: 7414 moveq #20,%d2 <== NOT EXECUTED 609a4: 2040 moveal %d0,%a0 <== NOT EXECUTED 609a6: 70ff moveq #-1,%d0 <== NOT EXECUTED 609a8: 2082 movel %d2,%a0@ <== NOT EXECUTED
iop->offset = 0;
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return 0;
}
609aa: 4cee 1c0c ffc4 moveml %fp@(-60),%d2-%d3/%a2-%a4 <== NOT EXECUTED 609b0: 4e5e unlk %fp <== NOT EXECUTED 609b2: 4e75 rts <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
609b4: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 609b8: 42a7 clrl %sp@- <== NOT EXECUTED 609ba: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 609c0: 508f addql #8,%sp <== NOT EXECUTED 609c2: 4a00 tstb %d0 <== NOT EXECUTED 609c4: 67d6 beqs 6099c <rtems_rfs_rtems_dir_open+0x1c0> <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
609c6: 2f02 movel %d2,%sp@- <== NOT EXECUTED
if (!RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)))
{
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("dir_open: not dir", ENOTDIR);
609c8: 7414 moveq #20,%d2 <== NOT EXECUTED 609ca: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 609d0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 609d2: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 609d8: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 609de: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 609e2: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 609e8: 2040 moveal %d0,%a0 <== NOT EXECUTED 609ea: 70ff moveq #-1,%d0 <== NOT EXECUTED 609ec: 2082 movel %d2,%a0@ <== NOT EXECUTED 609ee: 60ba bras 609aa <rtems_rfs_rtems_dir_open+0x1ce> <== NOT EXECUTED
0006057e <rtems_rfs_rtems_dir_read>:
*/
static ssize_t
rtems_rfs_rtems_dir_read (rtems_libio_t* iop,
void* buffer,
size_t count)
{
6057e: 4e56 ffa8 linkw %fp,#-88 <== NOT EXECUTED 60582: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED 60586: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
6058a: 206a 0028 moveal %a2@(40),%a0 <== NOT EXECUTED 6058e: 2668 0034 moveal %a0@(52),%a3 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
60592: 42a7 clrl %sp@- <== NOT EXECUTED
*/
static ssize_t
rtems_rfs_rtems_dir_read (rtems_libio_t* iop,
void* buffer,
size_t count)
{
60594: 286e 000c moveal %fp@(12),%a4 <== NOT EXECUTED 60598: 42a7 clrl %sp@- <== NOT EXECUTED
.fpathconf_h = rtems_filesystem_default_fpathconf, .fsync_h = rtems_filesystem_default_fsync, .fdatasync_h = rtems_rfs_rtems_fdatasync, .fcntl_h = rtems_filesystem_default_fcntl, .rmnod_h = rtems_rfs_rtems_dir_rmnod };
6059a: 206b 007c moveal %a3@(124),%a0 <== NOT EXECUTED 6059e: 2f10 movel %a0@,%sp@- <== NOT EXECUTED
*/
static ssize_t
rtems_rfs_rtems_dir_read (rtems_libio_t* iop,
void* buffer,
size_t count)
{
605a0: 242e 0010 movel %fp@(16),%d2 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo); rtems_rfs_ino ino = rtems_rfs_rtems_get_iop_ino (iop);
605a4: 2a2a 0018 movel %a2@(24),%d5 <== NOT EXECUTED 605a8: 4eb9 0004 af20 jsr 4af20 <rtems_semaphore_obtain> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
605ae: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
605b2: 2800 movel %d0,%d4 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
605b4: 6600 00c6 bnew 6067c <rtems_rfs_rtems_dir_read+0xfe> <== NOT EXECUTED
count = count / sizeof (struct dirent);
dirent = buffer;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
605b8: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 605bc: 2e0e movel %fp,%d7 <== NOT EXECUTED 605be: 0687 ffff ffd6 addil #-42,%d7 <== NOT EXECUTED 605c4: 2f07 movel %d7,%sp@- <== NOT EXECUTED 605c6: 2f05 movel %d5,%sp@- <== NOT EXECUTED 605c8: 2f0b movel %a3,%sp@- <== NOT EXECUTED 605ca: 4eb9 0005 0300 jsr 50300 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc)
605d0: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
count = count / sizeof (struct dirent);
dirent = buffer;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
605d4: 2a00 movel %d0,%d5 <== NOT EXECUTED
if (rc)
605d6: 6600 00f4 bnew 606cc <rtems_rfs_rtems_dir_read+0x14e> <== NOT EXECUTED
struct dirent* dirent;
ssize_t bytes_transferred;
int d;
int rc;
count = count / sizeof (struct dirent);
605da: 223c 0000 0110 movel #272,%d1 <== NOT EXECUTED 605e0: 4c41 2002 remul %d1,%d2,%d2 <== NOT EXECUTED 605e4: 2d42 ffd0 movel %d2,%fp@(-48) <== NOT EXECUTED
return rtems_rfs_rtems_error ("dir_read: read inode", rc);
}
bytes_transferred = 0;
for (d = 0; d < count; d++, dirent++)
605e8: 6700 01c4 beqw 607ae <rtems_rfs_rtems_dir_read+0x230> <== NOT EXECUTED
* exisiting file, the remaining entries will be placed in the buffer and the * returned value will be equal to -m actual- times the size of a directory * entry. */ static ssize_t rtems_rfs_rtems_dir_read (rtems_libio_t* iop,
605ec: 4285 clrl %d5 <== NOT EXECUTED 605ee: 4284 clrl %d4 <== NOT EXECUTED 605f0: 4bf9 0005 d2f2 lea 5d2f2 <rtems_rfs_dir_read>,%a5 <== NOT EXECUTED
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
if (rc)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("dir_read: read inode", rc);
605f6: 242a 000c movel %a2@(12),%d2 <== NOT EXECUTED 605fa: 262a 0010 movel %a2@(16),%d3 <== NOT EXECUTED
bytes_transferred = 0;
for (d = 0; d < count; d++, dirent++)
{
size_t size;
rc = rtems_rfs_dir_read (fs, &inode, iop->offset, dirent, &size);
605fe: 486e fffc pea %fp@(-4) <== NOT EXECUTED 60602: 4874 4800 pea %a4@(00000000,%d4:l) <== NOT EXECUTED
return rtems_rfs_rtems_error ("dir_read: read inode", rc);
}
bytes_transferred = 0;
for (d = 0; d < count; d++, dirent++)
60606: 5285 addql #1,%d5 <== NOT EXECUTED
{
size_t size;
rc = rtems_rfs_dir_read (fs, &inode, iop->offset, dirent, &size);
60608: 2f03 movel %d3,%sp@- <== NOT EXECUTED 6060a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 6060c: 2f07 movel %d7,%sp@- <== NOT EXECUTED 6060e: 2f0b movel %a3,%sp@- <== NOT EXECUTED 60610: 4e95 jsr %a5@ <== NOT EXECUTED
if (rc == ENOENT)
60612: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
bytes_transferred = 0;
for (d = 0; d < count; d++, dirent++)
{
size_t size;
rc = rtems_rfs_dir_read (fs, &inode, iop->offset, dirent, &size);
60616: 2c00 movel %d0,%d6 <== NOT EXECUTED
if (rc == ENOENT)
60618: 7002 moveq #2,%d0 <== NOT EXECUTED 6061a: b086 cmpl %d6,%d0 <== NOT EXECUTED 6061c: 672a beqs 60648 <rtems_rfs_rtems_dir_read+0xca> <== NOT EXECUTED
* exisiting file, the remaining entries will be placed in the buffer and the * returned value will be equal to -m actual- times the size of a directory * entry. */ static ssize_t rtems_rfs_rtems_dir_read (rtems_libio_t* iop,
6061e: 0684 0000 0110 addil #272,%d4 <== NOT EXECUTED
if (rc == ENOENT)
{
rc = 0;
break;
}
if (rc > 0)
60624: 4a86 tstl %d6 <== NOT EXECUTED 60626: 6e00 0112 bgtw 6073a <rtems_rfs_rtems_dir_read+0x1bc> <== NOT EXECUTED
{
bytes_transferred = rtems_rfs_rtems_error ("dir_read: dir read", rc);
break;
}
iop->offset += size;
6062a: 262e fffc movel %fp@(-4),%d3 <== NOT EXECUTED 6062e: 4282 clrl %d2 <== NOT EXECUTED 60630: 202a 000c movel %a2@(12),%d0 <== NOT EXECUTED 60634: d6aa 0010 addl %a2@(16),%d3 <== NOT EXECUTED 60638: d580 addxl %d0,%d2 <== NOT EXECUTED 6063a: 2542 000c movel %d2,%a2@(12) <== NOT EXECUTED 6063e: 2543 0010 movel %d3,%a2@(16) <== NOT EXECUTED
return rtems_rfs_rtems_error ("dir_read: read inode", rc);
}
bytes_transferred = 0;
for (d = 0; d < count; d++, dirent++)
60642: baae ffd0 cmpl %fp@(-48),%d5 <== NOT EXECUTED 60646: 66b6 bnes 605fe <rtems_rfs_rtems_dir_read+0x80> <== NOT EXECUTED
}
iop->offset += size;
bytes_transferred += sizeof (struct dirent);
}
rtems_rfs_inode_close (fs, &inode);
60648: 2f07 movel %d7,%sp@- <== NOT EXECUTED 6064a: 2f0b movel %a3,%sp@- <== NOT EXECUTED 6064c: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close> <== NOT EXECUTED 60652: 246b 007c moveal %a3@(124),%a2 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
60656: 2f0b movel %a3,%sp@- <== NOT EXECUTED 60658: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
6065e: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 60660: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
60666: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
6066a: 2400 movel %d0,%d2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
6066c: 6600 0092 bnew 60700 <rtems_rfs_rtems_dir_read+0x182> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return bytes_transferred;
}
60670: 2004 movel %d4,%d0 <== NOT EXECUTED 60672: 4cee 3cfc ffa8 moveml %fp@(-88),%d2-%d7/%a2-%a5 <== NOT EXECUTED 60678: 4e5e unlk %fp <== NOT EXECUTED 6067a: 4e75 rts <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
6067c: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 60680: 42a7 clrl %sp@- <== NOT EXECUTED 60682: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 60688: 508f addql #8,%sp <== NOT EXECUTED 6068a: 4a00 tstb %d0 <== NOT EXECUTED 6068c: 6700 ff2a beqw 605b8 <rtems_rfs_rtems_dir_read+0x3a> <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
60690: 2f04 movel %d4,%sp@- <== NOT EXECUTED
count = count / sizeof (struct dirent);
dirent = buffer;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
60692: 2e0e movel %fp,%d7 <== NOT EXECUTED 60694: 0687 ffff ffd6 addil #-42,%d7 <== NOT EXECUTED 6069a: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 606a0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 606a2: 4879 0007 2f06 pea 72f06 <ramdisk_ops+0xb28> <== NOT EXECUTED 606a8: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 606ae: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 606b2: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 606b6: 2f07 movel %d7,%sp@- <== NOT EXECUTED 606b8: 2f05 movel %d5,%sp@- <== NOT EXECUTED 606ba: 2f0b movel %a3,%sp@- <== NOT EXECUTED 606bc: 4eb9 0005 0300 jsr 50300 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc)
606c2: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
count = count / sizeof (struct dirent);
dirent = buffer;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
606c6: 2a00 movel %d0,%d5 <== NOT EXECUTED
if (rc)
606c8: 6700 ff10 beqw 605da <rtems_rfs_rtems_dir_read+0x5c> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
606cc: 246b 007c moveal %a3@(124),%a2 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
606d0: 2f0b movel %a3,%sp@- <== NOT EXECUTED 606d2: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
606d8: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 606da: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
606e0: 508f addql #8,%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
606e2: 2400 movel %d0,%d2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
606e4: 6600 008a bnew 60770 <rtems_rfs_rtems_dir_read+0x1f2> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("dir_read: read inode", rc);
606e8: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 606ee: 78ff moveq #-1,%d4 <== NOT EXECUTED 606f0: 2040 moveal %d0,%a0 <== NOT EXECUTED 606f2: 2085 movel %d5,%a0@ <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return bytes_transferred;
}
606f4: 2004 movel %d4,%d0 <== NOT EXECUTED 606f6: 4cee 3cfc ffa8 moveml %fp@(-88),%d2-%d7/%a2-%a5 <== NOT EXECUTED 606fc: 4e5e unlk %fp <== NOT EXECUTED 606fe: 4e75 rts <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
60700: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 60704: 42a7 clrl %sp@- <== NOT EXECUTED 60706: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 6070c: 508f addql #8,%sp <== NOT EXECUTED 6070e: 4a00 tstb %d0 <== NOT EXECUTED 60710: 6700 ff5e beqw 60670 <rtems_rfs_rtems_dir_read+0xf2> <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
60714: 2f02 movel %d2,%sp@- <== NOT EXECUTED 60716: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 6071c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 6071e: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 60724: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 6072a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 6072e: 2004 movel %d4,%d0 <== NOT EXECUTED 60730: 4cee 3cfc ffa8 moveml %fp@(-88),%d2-%d7/%a2-%a5 <== NOT EXECUTED 60736: 4e5e unlk %fp <== NOT EXECUTED 60738: 4e75 rts <== NOT EXECUTED
rc = 0;
break;
}
if (rc > 0)
{
bytes_transferred = rtems_rfs_rtems_error ("dir_read: dir read", rc);
6073a: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 60740: 78ff moveq #-1,%d4 <== NOT EXECUTED 60742: 2040 moveal %d0,%a0 <== NOT EXECUTED 60744: 2086 movel %d6,%a0@ <== NOT EXECUTED
}
iop->offset += size;
bytes_transferred += sizeof (struct dirent);
}
rtems_rfs_inode_close (fs, &inode);
60746: 2f07 movel %d7,%sp@- <== NOT EXECUTED 60748: 2f0b movel %a3,%sp@- <== NOT EXECUTED 6074a: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
60750: 246b 007c moveal %a3@(124),%a2 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
60754: 2f0b movel %a3,%sp@- <== NOT EXECUTED 60756: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
6075c: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 6075e: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
60764: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
60768: 2400 movel %d0,%d2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
6076a: 6700 ff04 beqw 60670 <rtems_rfs_rtems_dir_read+0xf2> <== NOT EXECUTED 6076e: 6090 bras 60700 <rtems_rfs_rtems_dir_read+0x182> <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
60770: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 60774: 42a7 clrl %sp@- <== NOT EXECUTED 60776: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 6077c: 508f addql #8,%sp <== NOT EXECUTED 6077e: 4a00 tstb %d0 <== NOT EXECUTED 60780: 6700 ff66 beqw 606e8 <rtems_rfs_rtems_dir_read+0x16a> <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
60784: 2f02 movel %d2,%sp@- <== NOT EXECUTED
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
if (rc)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("dir_read: read inode", rc);
60786: 78ff moveq #-1,%d4 <== NOT EXECUTED 60788: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 6078e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 60790: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 60796: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 6079c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 607a0: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 607a6: 2040 moveal %d0,%a0 <== NOT EXECUTED 607a8: 2085 movel %d5,%a0@ <== NOT EXECUTED 607aa: 6000 ff48 braw 606f4 <rtems_rfs_rtems_dir_read+0x176> <== NOT EXECUTED
}
iop->offset += size;
bytes_transferred += sizeof (struct dirent);
}
rtems_rfs_inode_close (fs, &inode);
607ae: 2f07 movel %d7,%sp@- <== NOT EXECUTED
return rtems_rfs_rtems_error ("dir_read: read inode", rc);
}
bytes_transferred = 0;
for (d = 0; d < count; d++, dirent++)
607b0: 4284 clrl %d4 <== NOT EXECUTED
}
iop->offset += size;
bytes_transferred += sizeof (struct dirent);
}
rtems_rfs_inode_close (fs, &inode);
607b2: 2f0b movel %a3,%sp@- <== NOT EXECUTED 607b4: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
607ba: 246b 007c moveal %a3@(124),%a2 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
607be: 2f0b movel %a3,%sp@- <== NOT EXECUTED 607c0: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
607c6: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 607c8: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
607ce: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
607d2: 2400 movel %d0,%d2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
607d4: 6700 fe9a beqw 60670 <rtems_rfs_rtems_dir_read+0xf2> <== NOT EXECUTED 607d8: 6000 ff26 braw 60700 <rtems_rfs_rtems_dir_read+0x182> <== NOT EXECUTED
000603ee <rtems_rfs_rtems_dir_rmnod>:
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_DIR_RMNOD))
printf ("rtems-rfs: dir-rmnod: parent:%" PRId32 " doff:%" PRIu32 ", ino:%" PRId32 "\n",
parent, doff, ino);
if (ino == RTEMS_RFS_ROOT_INO)
603ee: 7001 moveq #1,%d0 <== NOT EXECUTED
}
static int
rtems_rfs_rtems_dir_rmnod (rtems_filesystem_location_info_t* parent_pathloc,
rtems_filesystem_location_info_t* pathloc)
{
603f0: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED 603f4: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 603f8: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc); rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parent_pathloc);
603fc: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
static int
rtems_rfs_rtems_dir_rmnod (rtems_filesystem_location_info_t* parent_pathloc,
rtems_filesystem_location_info_t* pathloc)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
60400: 2268 0010 moveal %a0@(16),%a1 <== NOT EXECUTED
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parent_pathloc);
60404: 2812 movel %a2@,%d4 <== NOT EXECUTED
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
60406: 2410 movel %a0@,%d2 <== NOT EXECUTED
static int
rtems_rfs_rtems_dir_rmnod (rtems_filesystem_location_info_t* parent_pathloc,
rtems_filesystem_location_info_t* pathloc)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
60408: 2469 0034 moveal %a1@(52),%a2 <== NOT EXECUTED
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parent_pathloc); rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc); uint32_t doff = rtems_rfs_rtems_get_pathloc_doff (pathloc);
6040c: 2a28 0004 movel %a0@(4),%d5 <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_DIR_RMNOD))
printf ("rtems-rfs: dir-rmnod: parent:%" PRId32 " doff:%" PRIu32 ", ino:%" PRId32 "\n",
parent, doff, ino);
if (ino == RTEMS_RFS_ROOT_INO)
60410: b082 cmpl %d2,%d0 <== NOT EXECUTED 60412: 6700 0152 beqw 60566 <rtems_rfs_rtems_dir_rmnod+0x178><== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
60416: 42a7 clrl %sp@- <== NOT EXECUTED 60418: 42a7 clrl %sp@- <== NOT EXECUTED
.fpathconf_h = rtems_filesystem_default_fpathconf, .fsync_h = rtems_filesystem_default_fsync, .fdatasync_h = rtems_rfs_rtems_fdatasync, .fcntl_h = rtems_filesystem_default_fcntl, .rmnod_h = rtems_rfs_rtems_dir_rmnod };
6041a: 206a 007c moveal %a2@(124),%a0 <== NOT EXECUTED 6041e: 2f10 movel %a0@,%sp@- <== NOT EXECUTED 60420: 4eb9 0004 af20 jsr 4af20 <rtems_semaphore_obtain> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
60426: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
6042a: 2600 movel %d0,%d3 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
6042c: 6670 bnes 6049e <rtems_rfs_rtems_dir_rmnod+0xb0> <== NOT EXECUTED
if (ino == RTEMS_RFS_ROOT_INO)
return rtems_rfs_rtems_error ("dir_rmnod: root inode", EBUSY);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_unlink (fs, parent, ino, doff, rtems_rfs_unlink_dir_if_empty);
6042e: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 60432: 2f05 movel %d5,%sp@- <== NOT EXECUTED 60434: 2f02 movel %d2,%sp@- <== NOT EXECUTED 60436: 2f04 movel %d4,%sp@- <== NOT EXECUTED 60438: 2f0a movel %a2,%sp@- <== NOT EXECUTED 6043a: 4eb9 0005 f5aa jsr 5f5aa <rtems_rfs_unlink> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
60440: 266a 007c moveal %a2@(124),%a3 <== NOT EXECUTED 60444: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc)
60446: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 6044a: 672e beqs 6047a <rtems_rfs_rtems_dir_rmnod+0x8c> <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
6044c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 6044e: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
60454: 2f13 movel %a3@,%sp@- <== NOT EXECUTED 60456: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
6045c: 508f addql #8,%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
6045e: 2600 movel %d0,%d3 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
60460: 6600 008c bnew 604ee <rtems_rfs_rtems_dir_rmnod+0x100><== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("dir_rmnod: unlinking", rc);
60464: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 6046a: 2040 moveal %d0,%a0 <== NOT EXECUTED 6046c: 70ff moveq #-1,%d0 <== NOT EXECUTED 6046e: 2082 movel %d2,%a0@ <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
60470: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 <== NOT EXECUTED 60476: 4e5e unlk %fp <== NOT EXECUTED 60478: 4e75 rts <== NOT EXECUTED 6047a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 6047c: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
60482: 2f13 movel %a3@,%sp@- <== NOT EXECUTED 60484: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
6048a: 508f addql #8,%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
6048c: 2400 movel %d0,%d2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
6048e: 6600 009c bnew 6052c <rtems_rfs_rtems_dir_rmnod+0x13e><== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("dir_rmnod: unlinking", rc);
}
rtems_rfs_rtems_unlock (fs);
return 0;
60492: 4280 clrl %d0 <== NOT EXECUTED
}
60494: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 <== NOT EXECUTED 6049a: 4e5e unlk %fp <== NOT EXECUTED 6049c: 4e75 rts <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
6049e: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 604a2: 42a7 clrl %sp@- <== NOT EXECUTED 604a4: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 604aa: 508f addql #8,%sp <== NOT EXECUTED 604ac: 4a00 tstb %d0 <== NOT EXECUTED 604ae: 6700 ff7e beqw 6042e <rtems_rfs_rtems_dir_rmnod+0x40> <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
604b2: 2f03 movel %d3,%sp@- <== NOT EXECUTED 604b4: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 604ba: 2f00 movel %d0,%sp@- <== NOT EXECUTED 604bc: 4879 0007 2f06 pea 72f06 <ramdisk_ops+0xb28> <== NOT EXECUTED 604c2: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 604c8: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
if (ino == RTEMS_RFS_ROOT_INO)
return rtems_rfs_rtems_error ("dir_rmnod: root inode", EBUSY);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_unlink (fs, parent, ino, doff, rtems_rfs_unlink_dir_if_empty);
604cc: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 604d0: 2f05 movel %d5,%sp@- <== NOT EXECUTED 604d2: 2f02 movel %d2,%sp@- <== NOT EXECUTED 604d4: 2f04 movel %d4,%sp@- <== NOT EXECUTED 604d6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 604d8: 4eb9 0005 f5aa jsr 5f5aa <rtems_rfs_unlink> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
604de: 266a 007c moveal %a2@(124),%a3 <== NOT EXECUTED 604e2: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc)
604e4: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 604e8: 6790 beqs 6047a <rtems_rfs_rtems_dir_rmnod+0x8c> <== NOT EXECUTED 604ea: 6000 ff60 braw 6044c <rtems_rfs_rtems_dir_rmnod+0x5e> <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
604ee: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 604f2: 42a7 clrl %sp@- <== NOT EXECUTED 604f4: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 604fa: 508f addql #8,%sp <== NOT EXECUTED 604fc: 4a00 tstb %d0 <== NOT EXECUTED 604fe: 6700 ff64 beqw 60464 <rtems_rfs_rtems_dir_rmnod+0x76> <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
60502: 2f03 movel %d3,%sp@- <== NOT EXECUTED 60504: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 6050a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 6050c: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 60512: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 60518: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("dir_rmnod: unlinking", rc);
6051c: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 60522: 2040 moveal %d0,%a0 <== NOT EXECUTED 60524: 70ff moveq #-1,%d0 <== NOT EXECUTED 60526: 2082 movel %d2,%a0@ <== NOT EXECUTED 60528: 6000 ff46 braw 60470 <rtems_rfs_rtems_dir_rmnod+0x82> <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
6052c: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 60530: 42a7 clrl %sp@- <== NOT EXECUTED 60532: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 60538: 508f addql #8,%sp <== NOT EXECUTED 6053a: 4a00 tstb %d0 <== NOT EXECUTED 6053c: 6700 ff54 beqw 60492 <rtems_rfs_rtems_dir_rmnod+0xa4> <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
60540: 2f02 movel %d2,%sp@- <== NOT EXECUTED 60542: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 60548: 2f00 movel %d0,%sp@- <== NOT EXECUTED 6054a: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 60550: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 60556: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
6055a: 4280 clrl %d0 <== NOT EXECUTED
}
6055c: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 <== NOT EXECUTED 60562: 4e5e unlk %fp <== NOT EXECUTED 60564: 4e75 rts <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_DIR_RMNOD))
printf ("rtems-rfs: dir-rmnod: parent:%" PRId32 " doff:%" PRIu32 ", ino:%" PRId32 "\n",
parent, doff, ino);
if (ino == RTEMS_RFS_ROOT_INO)
return rtems_rfs_rtems_error ("dir_rmnod: root inode", EBUSY);
60566: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 6056c: 7210 moveq #16,%d1 <== NOT EXECUTED 6056e: 2040 moveal %d0,%a0 <== NOT EXECUTED 60570: 70ff moveq #-1,%d0 <== NOT EXECUTED
return rtems_rfs_rtems_error ("dir_rmnod: unlinking", rc);
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
60572: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_DIR_RMNOD))
printf ("rtems-rfs: dir-rmnod: parent:%" PRId32 " doff:%" PRIu32 ", ino:%" PRId32 "\n",
parent, doff, ino);
if (ino == RTEMS_RFS_ROOT_INO)
return rtems_rfs_rtems_error ("dir_rmnod: root inode", EBUSY);
60578: 2081 movel %d1,%a0@ <== NOT EXECUTED
return rtems_rfs_rtems_error ("dir_rmnod: unlinking", rc);
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
6057a: 4e5e unlk %fp <== NOT EXECUTED
00052552 <rtems_rfs_rtems_eval_for_make>:
*/
static int
rtems_rfs_rtems_eval_for_make (const char* path,
rtems_filesystem_location_info_t* pathloc,
const char** name)
{
52552: 4e56 ffa0 linkw %fp,#-96
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
52556: 226e 000c moveal %fp@(12),%a1 5255a: 2069 0010 moveal %a1@(16),%a0
rtems_rfs_inode_handle inode; rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
5255e: 2d51 fff4 movel %a1@,%fp@(-12)
*/
static int
rtems_rfs_rtems_eval_for_make (const char* path,
rtems_filesystem_location_info_t* pathloc,
const char** name)
{
52562: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
52566: 2868 0034 moveal %a0@(52),%a4
int rc;
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_FOR_MAKE))
printf ("rtems-rfs-rtems: eval-for-make: path:%s ino:%" PRId32 "\n", path, ino);
*name = path + strlen (path);
5256a: 2c3c 0006 3c10 movel #408592,%d6 52570: 2046 moveal %d6,%a0
while (*name != path)
{
(*name)--;
if (rtems_filesystem_is_separator (**name))
52572: 45f9 0004 821c lea 4821c <rtems_filesystem_is_separator>,%a2
*/
static int
rtems_rfs_rtems_eval_for_make (const char* path,
rtems_filesystem_location_info_t* pathloc,
const char** name)
{
52578: 262e 0008 movel %fp@(8),%d3
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc); rtems_rfs_inode_handle inode; rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc); rtems_rfs_ino node_ino; uint32_t doff = 0;
5257c: 42ae fffc clrl %fp@(-4)
*/
static int
rtems_rfs_rtems_eval_for_make (const char* path,
rtems_filesystem_location_info_t* pathloc,
const char** name)
{
52580: 2a2e 0010 movel %fp@(16),%d5 52584: 2645 moveal %d5,%a3
int rc;
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_FOR_MAKE))
printf ("rtems-rfs-rtems: eval-for-make: path:%s ino:%" PRId32 "\n", path, ino);
*name = path + strlen (path);
52586: 2f03 movel %d3,%sp@- 52588: 4e90 jsr %a0@ 5258a: 588f addql #4,%sp 5258c: 2043 moveal %d3,%a0 5258e: d1c0 addal %d0,%a0 52590: 2245 moveal %d5,%a1 52592: 2288 movel %a0,%a1@
while (*name != path)
52594: b1c3 cmpal %d3,%a0
52596: 671e beqs 525b6 <rtems_rfs_rtems_eval_for_make+0x64><== NEVER TAKEN
{
(*name)--;
52598: 2008 movel %a0,%d0 5259a: 5380 subql #1,%d0 5259c: 2680 movel %d0,%a3@
if (rtems_filesystem_is_separator (**name))
5259e: 1228 ffff moveb %a0@(-1),%d1 525a2: 49c1 extbl %d1 525a4: 2f01 movel %d1,%sp@- 525a6: 4e92 jsr %a2@ 525a8: 588f addql #4,%sp 525aa: 4a80 tstl %d0 525ac: 6600 013c bnew 526ea <rtems_rfs_rtems_eval_for_make+0x198>
{
(*name)++;
break;
525b0: 2053 moveal %a3@,%a0
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_FOR_MAKE))
printf ("rtems-rfs-rtems: eval-for-make: path:%s ino:%" PRId32 "\n", path, ino);
*name = path + strlen (path);
while (*name != path)
525b2: b1c3 cmpal %d3,%a0
525b4: 66e2 bnes 52598 <rtems_rfs_rtems_eval_for_make+0x46>
}
/*
* Eat any separators at start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, strlen(path));
525b6: 2f03 movel %d3,%sp@- 525b8: 2046 moveal %d6,%a0 525ba: 2a0b movel %a3,%d5 525bc: 2e3c 0004 6676 movel #288374,%d7 525c2: 4e90 jsr %a0@ 525c4: 2247 moveal %d7,%a1 525c6: 2e80 movel %d0,%sp@ 525c8: 2f03 movel %d3,%sp@- 525ca: 4e91 jsr %a1@
path += stripped;
525cc: d680 addl %d0,%d3
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
525ce: 42a7 clrl %sp@- 525d0: 42a7 clrl %sp@-
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
return rtems_rfs_rtems_error ("shutdown: close", rc);
}
525d2: 206c 007c moveal %a4@(124),%a0 525d6: 2f10 movel %a0@,%sp@- 525d8: 4eb9 0004 af20 jsr 4af20 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
525de: 4fef 0014 lea %sp@(20),%sp
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
525e2: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL)
525e4: 6600 02e2 bnew 528c8 <rtems_rfs_rtems_eval_for_make+0x376> 525e8: 280e movel %fp,%d4 525ea: 243c 0005 0300 movel #328448,%d2 525f0: 0684 ffff ffce addil #-50,%d4 525f6: 4bf9 0004 821c lea 4821c <rtems_filesystem_is_separator>,%a5
else
{
/*
* Read the inode so we know it exists and what type it is.
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode,
525fc: 2d45 ffc8 movel %d5,%fp@(-56) 52600: 2a02 movel %d2,%d5
while (true)
{
/*
* Open and load the inode.
*/
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
52602: 4878 0001 pea 1 <ADD> 52606: 2045 moveal %d5,%a0 52608: 2f04 movel %d4,%sp@- 5260a: 2f2e fff4 movel %fp@(-12),%sp@- 5260e: 2f0c movel %a4,%sp@- 52610: 4e90 jsr %a0@
if (rc > 0)
52612: 4fef 0010 lea %sp@(16),%sp 52616: 4a80 tstl %d0 52618: 6e00 0414 bgtw 52a2e <rtems_rfs_rtems_eval_for_make+0x4dc>
}
/*
* If a directory the execute bit must be set for us to enter.
*/
if (RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)) &&
5261c: 2244 moveal %d4,%a1
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
5261e: 4280 clrl %d0 52620: 2069 000c moveal %a1@(12),%a0 52624: 1028 0002 moveb %a0@(2),%d0 52628: e188 lsll #8,%d0 5262a: 0280 0000 f000 andil #61440,%d0 52630: 0c80 0000 4000 cmpil #16384,%d0 52636: 6700 00ea beqw 52722 <rtems_rfs_rtems_eval_for_make+0x1d0>
}
/*
* Is this the end of the pathname we where given ?
*/
if (path == *name)
5263a: 226e ffc8 moveal %fp@(-56),%a1 5263e: b691 cmpl %a1@,%d3 52640: 6700 0144 beqw 52786 <rtems_rfs_rtems_eval_for_make+0x234> 52644: 2443 moveal %d3,%a2
node_len = 0;
while (!rtems_filesystem_is_separator(*path) &&
(*path != '\0') &&
(node_len < (rtems_rfs_fs_max_name (fs) - 1)))
{
node_len++;
52646: 264a moveal %a2,%a3
}
/*
* Is this the end of the pathname we where given ?
*/
if (path == *name)
52648: 4282 clrl %d2
/*
* Extract the node name we will look for this time around.
*/
node = path;
node_len = 0;
while (!rtems_filesystem_is_separator(*path) &&
5264a: 1012 moveb %a2@,%d0 5264c: 528a addql #1,%a2 5264e: 49c0 extbl %d0 52650: 2f00 movel %d0,%sp@- 52652: 4e95 jsr %a5@ 52654: 588f addql #4,%sp 52656: 4a80 tstl %d0
52658: 6622 bnes 5267c <rtems_rfs_rtems_eval_for_make+0x12a><== NEVER TAKEN
5265a: 4a13 tstb %a3@
5265c: 671e beqs 5267c <rtems_rfs_rtems_eval_for_make+0x12a><== NEVER TAKEN
(*path != '\0') &&
(node_len < (rtems_rfs_fs_max_name (fs) - 1)))
5265e: 202c 0018 movel %a4@(24),%d0 52662: 5380 subql #1,%d0
* Extract the node name we will look for this time around.
*/
node = path;
node_len = 0;
while (!rtems_filesystem_is_separator(*path) &&
(*path != '\0') &&
52664: b082 cmpl %d2,%d0
52666: 6314 blss 5267c <rtems_rfs_rtems_eval_for_make+0x12a><== NEVER TAKEN
(node_len < (rtems_rfs_fs_max_name (fs) - 1)))
{
node_len++;
52668: 264a moveal %a2,%a3 5266a: 5282 addql #1,%d2
/*
* Extract the node name we will look for this time around.
*/
node = path;
node_len = 0;
while (!rtems_filesystem_is_separator(*path) &&
5266c: 1012 moveb %a2@,%d0 5266e: 528a addql #1,%a2 52670: 49c0 extbl %d0 52672: 2f00 movel %d0,%sp@- 52674: 4e95 jsr %a5@ 52676: 588f addql #4,%sp 52678: 4a80 tstl %d0
5267a: 67de beqs 5265a <rtems_rfs_rtems_eval_for_make+0x108>
}
/*
* Eat any separators at start of the new path.
*/
stripped = rtems_filesystem_prefix_separators (path, strlen (path));
5267c: 2f0b movel %a3,%sp@- 5267e: 2046 moveal %d6,%a0 52680: 4e90 jsr %a0@ 52682: 2247 moveal %d7,%a1 52684: 2e80 movel %d0,%sp@ 52686: 2f0b movel %a3,%sp@- 52688: 4e91 jsr %a1@
/*
* If the node is the current directory and there is more path to come move
* on it else we are at the inode we want.
*/
if (rtems_rfs_current_dir (node))
5268a: 508f addql #8,%sp 5268c: 2043 moveal %d3,%a0
/*
* Eat any separators at start of the new path.
*/
stripped = rtems_filesystem_prefix_separators (path, strlen (path));
path += stripped;
5268e: d7c0 addal %d0,%a3
/*
* If the node is the current directory and there is more path to come move
* on it else we are at the inode we want.
*/
if (rtems_rfs_current_dir (node))
52690: 702e moveq #46,%d0 52692: 1210 moveb %a0@,%d1 52694: 49c1 extbl %d1 52696: b081 cmpl %d1,%d0 52698: 6700 00de beqw 52778 <rtems_rfs_rtems_eval_for_make+0x226>
/*
* If the node is a parent we must move up one directory. If the location
* is on another file system we have a crossmount so we call that file
* system to handle the remainder of the path.
*/
if (rtems_rfs_parent_dir (path))
5269c: 722e moveq #46,%d1 5269e: 1013 moveb %a3@,%d0 526a0: 49c0 extbl %d0 526a2: b280 cmpl %d0,%d1
526a4: 660c bnes 526b2 <rtems_rfs_rtems_eval_for_make+0x160><== ALWAYS TAKEN
526a6: 102b 0001 moveb %a3@(1),%d0 <== NOT EXECUTED 526aa: 49c0 extbl %d0 <== NOT EXECUTED 526ac: b280 cmpl %d0,%d1 <== NOT EXECUTED 526ae: 6700 0180 beqw 52830 <rtems_rfs_rtems_eval_for_make+0x2de><== NOT EXECUTED
else
{
/*
* Read the inode so we know it exists and what type it is.
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode,
526b2: 486e fffc pea %fp@(-4) 526b6: 486e fff4 pea %fp@(-12) 526ba: 2f02 movel %d2,%sp@- 526bc: 2f03 movel %d3,%sp@- 526be: 2f04 movel %d4,%sp@- 526c0: 2f0c movel %a4,%sp@- 526c2: 4eb9 0005 c46c jsr 5c46c <rtems_rfs_dir_lookup_ino>
node, node_len - stripped, &ino, &doff);
if (rc > 0)
526c8: 4fef 0018 lea %sp@(24),%sp 526cc: 4a80 tstl %d0 526ce: 6e00 03ba bgtw 52a8a <rtems_rfs_rtems_eval_for_make+0x538>
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_FOR_MAKE))
printf("rtems-rfs-rtems: eval-for-make: down: path:%s ino:%" PRId32 "\n",
node, ino);
}
rc = rtems_rfs_inode_close (fs, &inode);
526d2: 2f04 movel %d4,%sp@- 526d4: 2f0c movel %a4,%sp@- 526d6: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close>
if (rc > 0)
526dc: 508f addql #8,%sp 526de: 4a80 tstl %d0 526e0: 6e00 034c bgtw 52a2e <rtems_rfs_rtems_eval_for_make+0x4dc>
/*
* Eat any separators at start of the new path.
*/
stripped = rtems_filesystem_prefix_separators (path, strlen (path));
path += stripped;
526e4: 260b movel %a3,%d3 526e6: 6000 ff1a braw 52602 <rtems_rfs_rtems_eval_for_make+0xb0>
while (*name != path)
{
(*name)--;
if (rtems_filesystem_is_separator (**name))
{
(*name)++;
526ea: 5293 addql #1,%a3@
}
/*
* Eat any separators at start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, strlen(path));
526ec: 2046 moveal %d6,%a0 526ee: 2e3c 0004 6676 movel #288374,%d7 526f4: 2a0b movel %a3,%d5 526f6: 2f03 movel %d3,%sp@- 526f8: 4e90 jsr %a0@ 526fa: 2247 moveal %d7,%a1 526fc: 2e80 movel %d0,%sp@ 526fe: 2f03 movel %d3,%sp@- 52700: 4e91 jsr %a1@
path += stripped;
52702: d680 addl %d0,%d3
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
52704: 42a7 clrl %sp@- 52706: 42a7 clrl %sp@-
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
return rtems_rfs_rtems_error ("shutdown: close", rc);
}
52708: 206c 007c moveal %a4@(124),%a0 5270c: 2f10 movel %a0@,%sp@- 5270e: 4eb9 0004 af20 jsr 4af20 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
52714: 4fef 0014 lea %sp@(20),%sp
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
52718: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL)
5271a: 6700 fecc beqw 525e8 <rtems_rfs_rtems_eval_for_make+0x96>
5271e: 6000 01a8 braw 528c8 <rtems_rfs_rtems_eval_for_make+0x376><== NOT EXECUTED
/*
* If a directory the execute bit must be set for us to enter.
*/
if (RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)) &&
!rtems_rfs_rtems_eval_perms (&inode, RTEMS_LIBIO_PERMS_SEARCH))
52722: 4878 0001 pea 1 <ADD> 52726: 2f04 movel %d4,%sp@- 52728: 4eb9 0005 361c jsr 5361c <rtems_rfs_rtems_eval_perms>
}
/*
* If a directory the execute bit must be set for us to enter.
*/
if (RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)) &&
5272e: 508f addql #8,%sp 52730: 4a00 tstb %d0 52732: 6600 ff06 bnew 5263a <rtems_rfs_rtems_eval_for_make+0xe8>
!rtems_rfs_rtems_eval_perms (&inode, RTEMS_LIBIO_PERMS_SEARCH))
{
rtems_rfs_inode_close (fs, &inode);
52736: 2f04 movel %d4,%sp@- <== NOT EXECUTED 52738: 2f0c movel %a4,%sp@- <== NOT EXECUTED 5273a: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
52740: 246c 007c moveal %a4@(124),%a2 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
52744: 2f0c movel %a4,%sp@- <== NOT EXECUTED 52746: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
5274c: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 5274e: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
52754: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
52758: 2400 movel %d0,%d2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
5275a: 6600 03de bnew 52b3a <rtems_rfs_rtems_eval_for_make+0x5e8><== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_for_make: eval perms", EACCES);
5275e: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 52764: 7e0d moveq #13,%d7 <== NOT EXECUTED 52766: 76ff moveq #-1,%d3 <== NOT EXECUTED 52768: 2040 moveal %d0,%a0 <== NOT EXECUTED 5276a: 2087 movel %d7,%a0@ <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return rc;
}
5276c: 2003 movel %d3,%d0 5276e: 4cee 3cfc ffa0 moveml %fp@(-96),%d2-%d7/%a2-%a5 52774: 4e5e unlk %fp 52776: 4e75 rts
/*
* If the node is the current directory and there is more path to come move
* on it else we are at the inode we want.
*/
if (rtems_rfs_current_dir (node))
52778: 1028 0001 moveb %a0@(1),%d0 <== NOT EXECUTED 5277c: 6600 0196 bnew 52914 <rtems_rfs_rtems_eval_for_make+0x3c2><== NOT EXECUTED
{
if (*path)
52780: 4a13 tstb %a3@ <== NOT EXECUTED 52782: 6600 01a4 bnew 52928 <rtems_rfs_rtems_eval_for_make+0x3d6><== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_for_make: closing node", rc);
}
}
if (!RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)))
52786: 2244 moveal %d4,%a1 52788: 4280 clrl %d0 5278a: 2069 000c moveal %a1@(12),%a0 5278e: 1028 0002 moveb %a0@(2),%d0 52792: e188 lsll #8,%d0 52794: 2a2e ffc8 movel %fp@(-56),%d5 52798: 0280 0000 f000 andil #61440,%d0 5279e: 0c80 0000 4000 cmpil #16384,%d0 527a4: 6600 0318 bnew 52abe <rtems_rfs_rtems_eval_for_make+0x56c>
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_for_make: not dir", ENOTDIR);
}
if (!rtems_rfs_rtems_eval_perms (&inode, RTEMS_LIBIO_PERMS_WX))
527a8: 4878 0003 pea 3 <DIVIDE> 527ac: 2f04 movel %d4,%sp@- 527ae: 4eb9 0005 361c jsr 5361c <rtems_rfs_rtems_eval_perms> 527b4: 508f addql #8,%sp 527b6: 4a00 tstb %d0 527b8: 6700 03c0 beqw 52b7a <rtems_rfs_rtems_eval_for_make+0x628>
}
/*
* Make sure the name does not already exists in the directory.
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode, *name, strlen (*name),
527bc: 2045 moveal %d5,%a0 527be: 2246 moveal %d6,%a1 527c0: 2410 movel %a0@,%d2 527c2: 2f02 movel %d2,%sp@- 527c4: 4e91 jsr %a1@ 527c6: 588f addql #4,%sp 527c8: 486e fffc pea %fp@(-4) 527cc: 486e fff8 pea %fp@(-8) 527d0: 2f00 movel %d0,%sp@- 527d2: 2f02 movel %d2,%sp@- 527d4: 2f04 movel %d4,%sp@- 527d6: 2f0c movel %a4,%sp@- 527d8: 4eb9 0005 c46c jsr 5c46c <rtems_rfs_dir_lookup_ino>
&node_ino, &doff);
if (rc == 0)
527de: 4fef 0018 lea %sp@(24),%sp
}
/*
* Make sure the name does not already exists in the directory.
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode, *name, strlen (*name),
527e2: 2400 movel %d0,%d2
&node_ino, &doff);
if (rc == 0)
527e4: 6700 0410 beqw 52bf6 <rtems_rfs_rtems_eval_for_make+0x6a4>
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_for_make: found name", EEXIST);
}
if (rc != ENOENT)
527e8: 7002 moveq #2,%d0 527ea: b082 cmpl %d2,%d0 527ec: 6700 018a beqw 52978 <rtems_rfs_rtems_eval_for_make+0x426>
{
rtems_rfs_inode_close (fs, &inode);
527f0: 2f04 movel %d4,%sp@- <== NOT EXECUTED 527f2: 2f0c movel %a4,%sp@- <== NOT EXECUTED 527f4: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
527fa: 246c 007c moveal %a4@(124),%a2 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
527fe: 2f0c movel %a4,%sp@- <== NOT EXECUTED 52800: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
52806: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 52808: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
5280e: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
52812: 2600 movel %d0,%d3 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
52814: 6600 0124 bnew 5293a <rtems_rfs_rtems_eval_for_make+0x3e8><== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_for_make: look up", rc);
52818: 4eb9 0006 2548 jsr 62548 <__errno> 5281e: 76ff moveq #-1,%d3 52820: 2040 moveal %d0,%a0 52822: 2082 movel %d2,%a0@
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return rc;
}
52824: 2003 movel %d3,%d0 52826: 4cee 3cfc ffa0 moveml %fp@(-96),%d2-%d7/%a2-%a5 5282c: 4e5e unlk %fp 5282e: 4e75 rts
/*
* If the node is a parent we must move up one directory. If the location
* is on another file system we have a crossmount so we call that file
* system to handle the remainder of the path.
*/
if (rtems_rfs_parent_dir (path))
52830: 102b 0002 moveb %a3@(2),%d0 <== NOT EXECUTED 52834: 6600 01c8 bnew 529fe <rtems_rfs_rtems_eval_for_make+0x4ac><== NOT EXECUTED
{
/*
* If we are at the root inode of the file system we have a crossmount
* path.
*/
if (ino == RTEMS_RFS_ROOT_INO)
52838: 7001 moveq #1,%d0 <== NOT EXECUTED 5283a: b0ae fff4 cmpl %fp@(-12),%d0 <== NOT EXECUTED 5283e: 6700 0432 beqw 52c72 <rtems_rfs_rtems_eval_for_make+0x720><== NOT EXECUTED
/*
* If not a directory give and up return. We cannot change dir from a
* regular file or device node.
*/
if (!RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)))
52842: 2244 moveal %d4,%a1 <== NOT EXECUTED 52844: 4280 clrl %d0 <== NOT EXECUTED 52846: 2069 000c moveal %a1@(12),%a0 <== NOT EXECUTED 5284a: 1028 0002 moveb %a0@(2),%d0 <== NOT EXECUTED 5284e: e188 lsll #8,%d0 <== NOT EXECUTED 52850: 0280 0000 f000 andil #61440,%d0 <== NOT EXECUTED 52856: 0c80 0000 4000 cmpil #16384,%d0 <== NOT EXECUTED 5285c: 6600 04ec bnew 52d4a <rtems_rfs_rtems_eval_for_make+0x7f8><== NOT EXECUTED
}
/*
* We need to find the parent of this node.
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode, "..", 2, &ino, &doff);
52860: 486e fffc pea %fp@(-4) <== NOT EXECUTED 52864: 486e fff4 pea %fp@(-12) <== NOT EXECUTED 52868: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED 5286c: 4879 0007 0ff9 pea 70ff9 <_rodata_start+0x1a9> <== NOT EXECUTED 52872: 2f04 movel %d4,%sp@- <== NOT EXECUTED 52874: 2f0c movel %a4,%sp@- <== NOT EXECUTED 52876: 4eb9 0005 c46c jsr 5c46c <rtems_rfs_dir_lookup_ino> <== NOT EXECUTED
if (rc > 0)
5287c: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 52880: 4a80 tstl %d0 <== NOT EXECUTED 52882: 6f00 fe4e blew 526d2 <rtems_rfs_rtems_eval_for_make+0x180><== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
52886: 2f04 movel %d4,%sp@- <== NOT EXECUTED 52888: 2400 movel %d0,%d2 <== NOT EXECUTED 5288a: 2f0c movel %a4,%sp@- <== NOT EXECUTED 5288c: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
52892: 246c 007c moveal %a4@(124),%a2 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
52896: 2f0c movel %a4,%sp@- <== NOT EXECUTED 52898: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
5289e: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 528a0: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
528a6: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
528aa: 2600 movel %d0,%d3 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
528ac: 6600 019e bnew 52a4c <rtems_rfs_rtems_eval_for_make+0x4fa><== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
if (rc > 0)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_for_make: closing node", rc);
528b0: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 528b6: 76ff moveq #-1,%d3 <== NOT EXECUTED 528b8: 2240 moveal %d0,%a1 <== NOT EXECUTED 528ba: 2282 movel %d2,%a1@ <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return rc;
}
528bc: 2003 movel %d3,%d0 <== NOT EXECUTED 528be: 4cee 3cfc ffa0 moveml %fp@(-96),%d2-%d7/%a2-%a5 <== NOT EXECUTED 528c4: 4e5e unlk %fp <== NOT EXECUTED 528c6: 4e75 rts <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
528c8: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 528cc: 42a7 clrl %sp@- <== NOT EXECUTED 528ce: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 528d4: 508f addql #8,%sp <== NOT EXECUTED 528d6: 4a00 tstb %d0 <== NOT EXECUTED 528d8: 6700 fd0e beqw 525e8 <rtems_rfs_rtems_eval_for_make+0x96><== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
528dc: 2f02 movel %d2,%sp@- <== NOT EXECUTED 528de: 280e movel %fp,%d4 <== NOT EXECUTED 528e0: 0684 ffff ffce addil #-50,%d4 <== NOT EXECUTED 528e6: 4bf9 0004 821c lea 4821c <rtems_filesystem_is_separator>,%a5<== NOT EXECUTED 528ec: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 528f2: 243c 0005 0300 movel #328448,%d2 <== NOT EXECUTED 528f8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 528fa: 4879 0007 2f06 pea 72f06 <ramdisk_ops+0xb28> <== NOT EXECUTED 52900: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 52906: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
else
{
/*
* Read the inode so we know it exists and what type it is.
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode,
5290a: 2d45 ffc8 movel %d5,%fp@(-56) <== NOT EXECUTED 5290e: 2a02 movel %d2,%d5 <== NOT EXECUTED 52910: 6000 fcf0 braw 52602 <rtems_rfs_rtems_eval_for_make+0xb0><== NOT EXECUTED
/*
* If the node is the current directory and there is more path to come move
* on it else we are at the inode we want.
*/
if (rtems_rfs_current_dir (node))
52914: 49c0 extbl %d0 <== NOT EXECUTED 52916: 2f00 movel %d0,%sp@- <== NOT EXECUTED 52918: 4e95 jsr %a5@ <== NOT EXECUTED 5291a: 588f addql #4,%sp <== NOT EXECUTED 5291c: 4a80 tstl %d0 <== NOT EXECUTED 5291e: 6700 fd7c beqw 5269c <rtems_rfs_rtems_eval_for_make+0x14a><== NOT EXECUTED
{
if (*path)
52922: 4a13 tstb %a3@ <== NOT EXECUTED 52924: 6700 fe60 beqw 52786 <rtems_rfs_rtems_eval_for_make+0x234><== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
52928: 2f04 movel %d4,%sp@- <== NOT EXECUTED
/*
* Eat any separators at start of the new path.
*/
stripped = rtems_filesystem_prefix_separators (path, strlen (path));
path += stripped;
5292a: 260b movel %a3,%d3 <== NOT EXECUTED
*/
if (rtems_rfs_current_dir (node))
{
if (*path)
{
rtems_rfs_inode_close (fs, &inode);
5292c: 2f0c movel %a4,%sp@- <== NOT EXECUTED 5292e: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close> <== NOT EXECUTED
continue;
52934: 508f addql #8,%sp <== NOT EXECUTED 52936: 6000 fcca braw 52602 <rtems_rfs_rtems_eval_for_make+0xb0><== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
5293a: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 5293e: 42a7 clrl %sp@- <== NOT EXECUTED 52940: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 52946: 508f addql #8,%sp <== NOT EXECUTED 52948: 4a00 tstb %d0 <== NOT EXECUTED 5294a: 6700 fecc beqw 52818 <rtems_rfs_rtems_eval_for_make+0x2c6><== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
5294e: 2f03 movel %d3,%sp@- <== NOT EXECUTED
if (rc != ENOENT)
{
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_for_make: look up", rc);
52950: 76ff moveq #-1,%d3 <== NOT EXECUTED 52952: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 52958: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5295a: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 52960: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 52966: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5296a: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 52970: 2040 moveal %d0,%a0 <== NOT EXECUTED 52972: 2082 movel %d2,%a0@ <== NOT EXECUTED 52974: 6000 feae braw 52824 <rtems_rfs_rtems_eval_for_make+0x2d2><== NOT EXECUTED
/*
* Set the parent ino in the path location.
*/
rtems_rfs_rtems_set_pathloc_ino (pathloc, ino);
52978: 226e 000c moveal %fp@(12),%a1
rtems_rfs_rtems_set_pathloc_doff (pathloc, doff);
5297c: 41ee fffc lea %fp@(-4),%a0
rc = rtems_rfs_rtems_set_handlers (pathloc, &inode) ? 0 : EIO;
52980: 2f04 movel %d4,%sp@-
/*
* Set the parent ino in the path location.
*/
rtems_rfs_rtems_set_pathloc_ino (pathloc, ino);
52982: 22ae fff4 movel %fp@(-12),%a1@
rtems_rfs_rtems_set_pathloc_doff (pathloc, doff);
52986: 2350 0004 movel %a0@,%a1@(4)
rc = rtems_rfs_rtems_set_handlers (pathloc, &inode) ? 0 : EIO;
5298a: 2f09 movel %a1,%sp@- 5298c: 4eb9 0005 36fc jsr 536fc <rtems_rfs_rtems_set_handlers> 52992: 508f addql #8,%sp 52994: 4a00 tstb %d0 52996: 6700 0120 beqw 52ab8 <rtems_rfs_rtems_eval_for_make+0x566> 5299a: 4283 clrl %d3
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_FOR_MAKE))
printf("rtems-rfs-rtems: eval-for-make: parent ino:%" PRId32 " name:%s\n",
ino, *name);
rtems_rfs_inode_close (fs, &inode);
5299c: 2f04 movel %d4,%sp@- 5299e: 2f0c movel %a4,%sp@- 529a0: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close>
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
529a6: 246c 007c moveal %a4@(124),%a2
rtems_rfs_buffers_release (fs);
529aa: 2f0c movel %a4,%sp@- 529ac: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release>
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
529b2: 2f12 movel %a2@,%sp@- 529b4: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL)
529ba: 4fef 0010 lea %sp@(16),%sp
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
529be: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL)
529c0: 6700 fdaa beqw 5276c <rtems_rfs_rtems_eval_for_make+0x21a>
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
529c4: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 529c8: 42a7 clrl %sp@- <== NOT EXECUTED 529ca: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 529d0: 508f addql #8,%sp <== NOT EXECUTED 529d2: 4a00 tstb %d0 <== NOT EXECUTED 529d4: 6700 fd96 beqw 5276c <rtems_rfs_rtems_eval_for_make+0x21a><== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
529d8: 2f02 movel %d2,%sp@- <== NOT EXECUTED 529da: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 529e0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 529e2: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 529e8: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 529ee: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rc;
}
529f2: 2003 movel %d3,%d0 <== NOT EXECUTED 529f4: 4cee 3cfc ffa0 moveml %fp@(-96),%d2-%d7/%a2-%a5 <== NOT EXECUTED 529fa: 4e5e unlk %fp <== NOT EXECUTED 529fc: 4e75 rts <== NOT EXECUTED
/*
* If the node is a parent we must move up one directory. If the location
* is on another file system we have a crossmount so we call that file
* system to handle the remainder of the path.
*/
if (rtems_rfs_parent_dir (path))
529fe: 49c0 extbl %d0 <== NOT EXECUTED 52a00: 2f00 movel %d0,%sp@- <== NOT EXECUTED 52a02: 4e95 jsr %a5@ <== NOT EXECUTED 52a04: 588f addql #4,%sp <== NOT EXECUTED 52a06: 4a80 tstl %d0 <== NOT EXECUTED 52a08: 6600 fe2e bnew 52838 <rtems_rfs_rtems_eval_for_make+0x2e6><== NOT EXECUTED
else
{
/*
* Read the inode so we know it exists and what type it is.
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode,
52a0c: 486e fffc pea %fp@(-4) <== NOT EXECUTED 52a10: 486e fff4 pea %fp@(-12) <== NOT EXECUTED 52a14: 2f02 movel %d2,%sp@- <== NOT EXECUTED 52a16: 2f03 movel %d3,%sp@- <== NOT EXECUTED 52a18: 2f04 movel %d4,%sp@- <== NOT EXECUTED 52a1a: 2f0c movel %a4,%sp@- <== NOT EXECUTED 52a1c: 4eb9 0005 c46c jsr 5c46c <rtems_rfs_dir_lookup_ino> <== NOT EXECUTED
node, node_len - stripped, &ino, &doff);
if (rc > 0)
52a22: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 52a26: 4a80 tstl %d0 <== NOT EXECUTED 52a28: 6f00 fca8 blew 526d2 <rtems_rfs_rtems_eval_for_make+0x180><== NOT EXECUTED 52a2c: 605c bras 52a8a <rtems_rfs_rtems_eval_for_make+0x538><== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
52a2e: 246c 007c moveal %a4@(124),%a2 <== NOT EXECUTED 52a32: 2400 movel %d0,%d2 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
52a34: 2f0c movel %a4,%sp@- <== NOT EXECUTED 52a36: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
52a3c: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 52a3e: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
52a44: 508f addql #8,%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
52a46: 2600 movel %d0,%d3 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
52a48: 6700 fe66 beqw 528b0 <rtems_rfs_rtems_eval_for_make+0x35e><== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
52a4c: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 52a50: 42a7 clrl %sp@- <== NOT EXECUTED 52a52: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 52a58: 508f addql #8,%sp <== NOT EXECUTED 52a5a: 4a00 tstb %d0 <== NOT EXECUTED 52a5c: 6700 fe52 beqw 528b0 <rtems_rfs_rtems_eval_for_make+0x35e><== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
52a60: 2f03 movel %d3,%sp@- <== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
if (rc > 0)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_for_make: closing node", rc);
52a62: 76ff moveq #-1,%d3 <== NOT EXECUTED 52a64: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 52a6a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 52a6c: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 52a72: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 52a78: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 52a7c: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 52a82: 2240 moveal %d0,%a1 <== NOT EXECUTED 52a84: 2282 movel %d2,%a1@ <== NOT EXECUTED 52a86: 6000 fe34 braw 528bc <rtems_rfs_rtems_eval_for_make+0x36a><== NOT EXECUTED
return rtems_rfs_rtems_error ("eval_for_make: found name", EEXIST);
}
if (rc != ENOENT)
{
rtems_rfs_inode_close (fs, &inode);
52a8a: 2f04 movel %d4,%sp@- 52a8c: 2400 movel %d0,%d2 52a8e: 2f0c movel %a4,%sp@- 52a90: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close>
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
52a96: 246c 007c moveal %a4@(124),%a2
rtems_rfs_buffers_release (fs);
52a9a: 2f0c movel %a4,%sp@- 52a9c: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release>
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
52aa2: 2f12 movel %a2@,%sp@- 52aa4: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL)
52aaa: 4fef 0010 lea %sp@(16),%sp
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
52aae: 2600 movel %d0,%d3
if (sc != RTEMS_SUCCESSFUL)
52ab0: 6700 fd66 beqw 52818 <rtems_rfs_rtems_eval_for_make+0x2c6>
52ab4: 6000 fe84 braw 5293a <rtems_rfs_rtems_eval_for_make+0x3e8><== NOT EXECUTED
*/
rtems_rfs_rtems_set_pathloc_ino (pathloc, ino);
rtems_rfs_rtems_set_pathloc_doff (pathloc, doff);
rc = rtems_rfs_rtems_set_handlers (pathloc, &inode) ? 0 : EIO;
52ab8: 7605 moveq #5,%d3 <== NOT EXECUTED 52aba: 6000 fee0 braw 5299c <rtems_rfs_rtems_eval_for_make+0x44a><== NOT EXECUTED
}
}
if (!RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)))
{
rtems_rfs_inode_close (fs, &inode);
52abe: 2f04 movel %d4,%sp@- 52ac0: 2f0c movel %a4,%sp@- 52ac2: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close>
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
52ac8: 246c 007c moveal %a4@(124),%a2
rtems_rfs_buffers_release (fs);
52acc: 2f0c movel %a4,%sp@- 52ace: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release>
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
52ad4: 2f12 movel %a2@,%sp@- 52ad6: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL)
52adc: 4fef 0010 lea %sp@(16),%sp
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
52ae0: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL)
52ae2: 661a bnes 52afe <rtems_rfs_rtems_eval_for_make+0x5ac><== NEVER TAKEN
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_for_make: not dir", ENOTDIR);
52ae4: 4eb9 0006 2548 jsr 62548 <__errno> 52aea: 7c14 moveq #20,%d6 52aec: 76ff moveq #-1,%d3 52aee: 2040 moveal %d0,%a0 52af0: 2086 movel %d6,%a0@
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return rc;
}
52af2: 2003 movel %d3,%d0 52af4: 4cee 3cfc ffa0 moveml %fp@(-96),%d2-%d7/%a2-%a5 52afa: 4e5e unlk %fp 52afc: 4e75 rts
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
52afe: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 52b02: 42a7 clrl %sp@- <== NOT EXECUTED 52b04: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 52b0a: 508f addql #8,%sp <== NOT EXECUTED 52b0c: 4a00 tstb %d0 <== NOT EXECUTED 52b0e: 67d4 beqs 52ae4 <rtems_rfs_rtems_eval_for_make+0x592><== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
52b10: 2f02 movel %d2,%sp@- <== NOT EXECUTED
if (!RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)))
{
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_for_make: not dir", ENOTDIR);
52b12: 7c14 moveq #20,%d6 <== NOT EXECUTED 52b14: 76ff moveq #-1,%d3 <== NOT EXECUTED 52b16: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 52b1c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 52b1e: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 52b24: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 52b2a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 52b2e: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 52b34: 2040 moveal %d0,%a0 <== NOT EXECUTED 52b36: 2086 movel %d6,%a0@ <== NOT EXECUTED 52b38: 60b8 bras 52af2 <rtems_rfs_rtems_eval_for_make+0x5a0><== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
52b3a: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 52b3e: 42a7 clrl %sp@- <== NOT EXECUTED 52b40: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 52b46: 508f addql #8,%sp <== NOT EXECUTED 52b48: 4a00 tstb %d0 <== NOT EXECUTED 52b4a: 6700 fc12 beqw 5275e <rtems_rfs_rtems_eval_for_make+0x20c><== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
52b4e: 2f02 movel %d2,%sp@- <== NOT EXECUTED
if (RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)) &&
!rtems_rfs_rtems_eval_perms (&inode, RTEMS_LIBIO_PERMS_SEARCH))
{
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_for_make: eval perms", EACCES);
52b50: 7e0d moveq #13,%d7 <== NOT EXECUTED 52b52: 76ff moveq #-1,%d3 <== NOT EXECUTED 52b54: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 52b5a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 52b5c: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 52b62: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 52b68: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 52b6c: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 52b72: 2040 moveal %d0,%a0 <== NOT EXECUTED 52b74: 2087 movel %d7,%a0@ <== NOT EXECUTED 52b76: 6000 fbf4 braw 5276c <rtems_rfs_rtems_eval_for_make+0x21a><== NOT EXECUTED
return rtems_rfs_rtems_error ("eval_for_make: not dir", ENOTDIR);
}
if (!rtems_rfs_rtems_eval_perms (&inode, RTEMS_LIBIO_PERMS_WX))
{
rtems_rfs_inode_close (fs, &inode);
52b7a: 2f04 movel %d4,%sp@- <== NOT EXECUTED 52b7c: 2f0c movel %a4,%sp@- <== NOT EXECUTED 52b7e: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
52b84: 246c 007c moveal %a4@(124),%a2 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
52b88: 2f0c movel %a4,%sp@- <== NOT EXECUTED 52b8a: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
52b90: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 52b92: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
52b98: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
52b9c: 2400 movel %d0,%d2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
52b9e: 661a bnes 52bba <rtems_rfs_rtems_eval_for_make+0x668><== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_for_make: cannot write", EACCES);
52ba0: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 52ba6: 7a0d moveq #13,%d5 <== NOT EXECUTED 52ba8: 76ff moveq #-1,%d3 <== NOT EXECUTED 52baa: 2240 moveal %d0,%a1 <== NOT EXECUTED 52bac: 2285 movel %d5,%a1@ <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return rc;
}
52bae: 2003 movel %d3,%d0 <== NOT EXECUTED 52bb0: 4cee 3cfc ffa0 moveml %fp@(-96),%d2-%d7/%a2-%a5 <== NOT EXECUTED 52bb6: 4e5e unlk %fp <== NOT EXECUTED 52bb8: 4e75 rts <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
52bba: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 52bbe: 42a7 clrl %sp@- <== NOT EXECUTED 52bc0: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 52bc6: 508f addql #8,%sp <== NOT EXECUTED 52bc8: 4a00 tstb %d0 <== NOT EXECUTED 52bca: 67d4 beqs 52ba0 <rtems_rfs_rtems_eval_for_make+0x64e><== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
52bcc: 2f02 movel %d2,%sp@- <== NOT EXECUTED
if (!rtems_rfs_rtems_eval_perms (&inode, RTEMS_LIBIO_PERMS_WX))
{
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_for_make: cannot write", EACCES);
52bce: 7a0d moveq #13,%d5 <== NOT EXECUTED 52bd0: 76ff moveq #-1,%d3 <== NOT EXECUTED 52bd2: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 52bd8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 52bda: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 52be0: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 52be6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 52bea: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 52bf0: 2240 moveal %d0,%a1 <== NOT EXECUTED 52bf2: 2285 movel %d5,%a1@ <== NOT EXECUTED 52bf4: 60b8 bras 52bae <rtems_rfs_rtems_eval_for_make+0x65c><== NOT EXECUTED
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode, *name, strlen (*name),
&node_ino, &doff);
if (rc == 0)
{
rtems_rfs_inode_close (fs, &inode);
52bf6: 2f04 movel %d4,%sp@- 52bf8: 2f0c movel %a4,%sp@- 52bfa: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close>
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
52c00: 246c 007c moveal %a4@(124),%a2
rtems_rfs_buffers_release (fs);
52c04: 2f0c movel %a4,%sp@- 52c06: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release>
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
52c0c: 2f12 movel %a2@,%sp@- 52c0e: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL)
52c14: 4fef 0010 lea %sp@(16),%sp
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
52c18: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL)
52c1a: 661a bnes 52c36 <rtems_rfs_rtems_eval_for_make+0x6e4><== NEVER TAKEN
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_for_make: found name", EEXIST);
52c1c: 4eb9 0006 2548 jsr 62548 <__errno> 52c22: 7811 moveq #17,%d4 52c24: 76ff moveq #-1,%d3 52c26: 2040 moveal %d0,%a0 52c28: 2084 movel %d4,%a0@
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return rc;
}
52c2a: 2003 movel %d3,%d0 52c2c: 4cee 3cfc ffa0 moveml %fp@(-96),%d2-%d7/%a2-%a5 52c32: 4e5e unlk %fp 52c34: 4e75 rts
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
52c36: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 52c3a: 42a7 clrl %sp@- <== NOT EXECUTED 52c3c: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 52c42: 508f addql #8,%sp <== NOT EXECUTED 52c44: 4a00 tstb %d0 <== NOT EXECUTED 52c46: 67d4 beqs 52c1c <rtems_rfs_rtems_eval_for_make+0x6ca><== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
52c48: 2f02 movel %d2,%sp@- <== NOT EXECUTED
&node_ino, &doff);
if (rc == 0)
{
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_for_make: found name", EEXIST);
52c4a: 7811 moveq #17,%d4 <== NOT EXECUTED 52c4c: 76ff moveq #-1,%d3 <== NOT EXECUTED 52c4e: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 52c54: 2f00 movel %d0,%sp@- <== NOT EXECUTED 52c56: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 52c5c: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 52c62: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 52c66: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 52c6c: 2040 moveal %d0,%a0 <== NOT EXECUTED 52c6e: 2084 movel %d4,%a0@ <== NOT EXECUTED 52c70: 60b8 bras 52c2a <rtems_rfs_rtems_eval_for_make+0x6d8><== NOT EXECUTED
{
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_FOR_MAKE))
printf("rtems-rfs-rtems: eval-for-make: crossmount: path:%s\n",
path - node_len);
rtems_rfs_inode_close (fs, &inode);
52c72: 2f04 movel %d4,%sp@- <== NOT EXECUTED 52c74: 2a2e ffc8 movel %fp@(-56),%d5 <== NOT EXECUTED 52c78: 2f0c movel %a4,%sp@- <== NOT EXECUTED 52c7a: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
52c80: 246c 007c moveal %a4@(124),%a2 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
52c84: 2f0c movel %a4,%sp@- <== NOT EXECUTED 52c86: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
52c8c: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 52c8e: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
52c94: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
52c98: 2400 movel %d0,%d2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
52c9a: 6646 bnes 52ce2 <rtems_rfs_rtems_eval_for_make+0x790><== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
*pathloc = pathloc->mt_entry->mt_point_node;
52c9c: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 52ca0: 2268 0010 moveal %a0@(16),%a1 <== NOT EXECUTED 52ca4: 20e9 0008 movel %a1@(8),%a0@+ <== NOT EXECUTED 52ca8: 20e9 000c movel %a1@(12),%a0@+ <== NOT EXECUTED 52cac: 20e9 0010 movel %a1@(16),%a0@+ <== NOT EXECUTED 52cb0: 20e9 0014 movel %a1@(20),%a0@+ <== NOT EXECUTED 52cb4: 20a9 0018 movel %a1@(24),%a0@ <== NOT EXECUTED
return (*pathloc->ops->evalformake_h)(path + 2, pathloc, name);
52cb8: 226e 000c moveal %fp@(12),%a1 <== NOT EXECUTED 52cbc: 2069 000c moveal %a1@(12),%a0 <== NOT EXECUTED 52cc0: 2f05 movel %d5,%sp@- <== NOT EXECUTED 52cc2: 2f09 movel %a1,%sp@- <== NOT EXECUTED 52cc4: 486b 0002 pea %a3@(2) <== NOT EXECUTED 52cc8: 2028 0004 movel %a0@(4),%d0 <== NOT EXECUTED 52ccc: 2040 moveal %d0,%a0 <== NOT EXECUTED 52cce: 4e90 jsr %a0@ <== NOT EXECUTED 52cd0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 52cd4: 2600 movel %d0,%d3 <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return rc;
}
52cd6: 2003 movel %d3,%d0 <== NOT EXECUTED 52cd8: 4cee 3cfc ffa0 moveml %fp@(-96),%d2-%d7/%a2-%a5 <== NOT EXECUTED 52cde: 4e5e unlk %fp <== NOT EXECUTED 52ce0: 4e75 rts <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
52ce2: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 52ce6: 42a7 clrl %sp@- <== NOT EXECUTED 52ce8: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 52cee: 508f addql #8,%sp <== NOT EXECUTED 52cf0: 4a00 tstb %d0 <== NOT EXECUTED 52cf2: 67a8 beqs 52c9c <rtems_rfs_rtems_eval_for_make+0x74a><== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
52cf4: 2f02 movel %d2,%sp@- <== NOT EXECUTED 52cf6: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 52cfc: 2f00 movel %d0,%sp@- <== NOT EXECUTED 52cfe: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 52d04: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED
printf("rtems-rfs-rtems: eval-for-make: crossmount: path:%s\n",
path - node_len);
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
*pathloc = pathloc->mt_entry->mt_point_node;
52d0a: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 52d0e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 52d12: 2268 0010 moveal %a0@(16),%a1 <== NOT EXECUTED 52d16: 20e9 0008 movel %a1@(8),%a0@+ <== NOT EXECUTED 52d1a: 20e9 000c movel %a1@(12),%a0@+ <== NOT EXECUTED 52d1e: 20e9 0010 movel %a1@(16),%a0@+ <== NOT EXECUTED 52d22: 20e9 0014 movel %a1@(20),%a0@+ <== NOT EXECUTED 52d26: 20a9 0018 movel %a1@(24),%a0@ <== NOT EXECUTED
return (*pathloc->ops->evalformake_h)(path + 2, pathloc, name);
52d2a: 226e 000c moveal %fp@(12),%a1 <== NOT EXECUTED 52d2e: 2069 000c moveal %a1@(12),%a0 <== NOT EXECUTED 52d32: 2f05 movel %d5,%sp@- <== NOT EXECUTED 52d34: 2f09 movel %a1,%sp@- <== NOT EXECUTED 52d36: 486b 0002 pea %a3@(2) <== NOT EXECUTED 52d3a: 2028 0004 movel %a0@(4),%d0 <== NOT EXECUTED 52d3e: 2040 moveal %d0,%a0 <== NOT EXECUTED 52d40: 4e90 jsr %a0@ <== NOT EXECUTED 52d42: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 52d46: 2600 movel %d0,%d3 <== NOT EXECUTED 52d48: 608c bras 52cd6 <rtems_rfs_rtems_eval_for_make+0x784><== NOT EXECUTED
* If not a directory give and up return. We cannot change dir from a
* regular file or device node.
*/
if (!RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)))
{
rtems_rfs_inode_close (fs, &inode);
52d4a: 2f04 movel %d4,%sp@- <== NOT EXECUTED 52d4c: 2f0c movel %a4,%sp@- <== NOT EXECUTED 52d4e: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
52d54: 246c 007c moveal %a4@(124),%a2 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
52d58: 2f0c movel %a4,%sp@- <== NOT EXECUTED 52d5a: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
52d60: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 52d62: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
52d68: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
52d6c: 2400 movel %d0,%d2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
52d6e: 661c bnes 52d8c <rtems_rfs_rtems_eval_for_make+0x83a><== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_for_make: not dir", ENOTSUP);
52d70: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 52d76: 76ff moveq #-1,%d3 <== NOT EXECUTED 52d78: 2040 moveal %d0,%a0 <== NOT EXECUTED 52d7a: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return rc;
}
52d80: 2003 movel %d3,%d0 <== NOT EXECUTED 52d82: 4cee 3cfc ffa0 moveml %fp@(-96),%d2-%d7/%a2-%a5 <== NOT EXECUTED 52d88: 4e5e unlk %fp <== NOT EXECUTED 52d8a: 4e75 rts <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
52d8c: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 52d90: 42a7 clrl %sp@- <== NOT EXECUTED 52d92: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 52d98: 508f addql #8,%sp <== NOT EXECUTED 52d9a: 4a00 tstb %d0 <== NOT EXECUTED 52d9c: 67d2 beqs 52d70 <rtems_rfs_rtems_eval_for_make+0x81e><== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
52d9e: 2f02 movel %d2,%sp@- <== NOT EXECUTED
*/
if (!RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)))
{
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_for_make: not dir", ENOTSUP);
52da0: 76ff moveq #-1,%d3 <== NOT EXECUTED 52da2: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 52da8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 52daa: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 52db0: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 52db6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 52dba: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 52dc0: 2040 moveal %d0,%a0 <== NOT EXECUTED 52dc2: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 52dc8: 60b6 bras 52d80 <rtems_rfs_rtems_eval_for_make+0x82e><== NOT EXECUTED
00052dca <rtems_rfs_rtems_eval_path>:
static int
rtems_rfs_rtems_eval_path (const char* path,
size_t pathlen,
int flags,
rtems_filesystem_location_info_t* pathloc)
{
52dca: 4e56 ffa4 linkw %fp,#-92 52dce: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 52dd2: 2e2e 0014 movel %fp@(20),%d7
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
52dd6: 2247 moveal %d7,%a1
path, pathlen, ino);
/*
* Eat any separators at the start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, pathlen);
52dd8: 2c3c 0004 6676 movel #288374,%d6
rtems_rfs_rtems_eval_path (const char* path,
size_t pathlen,
int flags,
rtems_filesystem_location_info_t* pathloc)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
52dde: 2069 0010 moveal %a1@(16),%a0
static int
rtems_rfs_rtems_eval_path (const char* path,
size_t pathlen,
int flags,
rtems_filesystem_location_info_t* pathloc)
{
52de2: 266e 000c moveal %fp@(12),%a3
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
52de6: 2a68 0034 moveal %a0@(52),%a5
path, pathlen, ino);
/*
* Eat any separators at the start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, pathlen);
52dea: 2046 moveal %d6,%a0 52dec: 2f0b movel %a3,%sp@-
int flags,
rtems_filesystem_location_info_t* pathloc)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
rtems_rfs_inode_handle inode;
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
52dee: 2d51 fff8 movel %a1@,%fp@(-8)
static int
rtems_rfs_rtems_eval_path (const char* path,
size_t pathlen,
int flags,
rtems_filesystem_location_info_t* pathloc)
{
52df2: 242e 0008 movel %fp@(8),%d2
/*
* Eat any separators at the start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, pathlen);
path += stripped;
52df6: 2802 movel %d2,%d4
path, pathlen, ino);
/*
* Eat any separators at the start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, pathlen);
52df8: 2f02 movel %d2,%sp@-
rtems_filesystem_location_info_t* pathloc)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
rtems_rfs_inode_handle inode;
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
uint32_t doff = 0;
52dfa: 42ae fffc clrl %fp@(-4)
path, pathlen, ino);
/*
* Eat any separators at the start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, pathlen);
52dfe: 4e90 jsr %a0@
path += stripped; pathlen -= stripped;
52e00: 97c0 subal %d0,%a3
/*
* Eat any separators at the start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, pathlen);
path += stripped;
52e02: d880 addl %d0,%d4
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
52e04: 42a7 clrl %sp@- 52e06: 42a7 clrl %sp@-
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
return rtems_rfs_rtems_error ("shutdown: close", rc);
}
52e08: 206d 007c moveal %a5@(124),%a0 52e0c: 2f10 movel %a0@,%sp@- 52e0e: 4eb9 0004 af20 jsr 4af20 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
52e14: 4fef 0014 lea %sp@(20),%sp
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
52e18: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL)
52e1a: 6600 02c8 bnew 530e4 <rtems_rfs_rtems_eval_path+0x31a> 52e1e: 43f9 0005 0300 lea 50300 <rtems_rfs_inode_open>,%a1 52e24: 2a0e movel %fp,%d5 52e26: 0685 ffff ffd2 addil #-46,%d5 52e2c: 263c 0004 821c movel #295452,%d3 52e32: 2d49 ffcc movel %a1,%fp@(-52)
while (true)
{
/*
* Open and load the inode.
*/
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
52e36: 4878 0001 pea 1 <ADD> 52e3a: 206e ffcc moveal %fp@(-52),%a0 52e3e: 2f05 movel %d5,%sp@- 52e40: 2f2e fff8 movel %fp@(-8),%sp@- 52e44: 2f0d movel %a5,%sp@- 52e46: 4e90 jsr %a0@
if (rc > 0)
52e48: 4fef 0010 lea %sp@(16),%sp 52e4c: 4a80 tstl %d0 52e4e: 6e00 0336 bgtw 53186 <rtems_rfs_rtems_eval_path+0x3bc>
}
/*
* Is this the end of the pathname we where given ?
*/
if ((*path == '\0') || (pathlen == 0))
52e52: 2044 moveal %d4,%a0 52e54: 1010 moveb %a0@,%d0 52e56: 6700 00fe beqw 52f56 <rtems_rfs_rtems_eval_path+0x18c> 52e5a: 4a8b tstl %a3 52e5c: 6700 00f8 beqw 52f56 <rtems_rfs_rtems_eval_path+0x18c>
break;
/*
* If a directory the execute bit must be set for us to enter.
*/
if (RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)) &&
52e60: 2245 moveal %d5,%a1 52e62: 4281 clrl %d1 52e64: 2069 000c moveal %a1@(12),%a0 52e68: 1228 0002 moveb %a0@(2),%d1 52e6c: e189 lsll #8,%d1 52e6e: 0281 0000 f000 andil #61440,%d1 52e74: 0c81 0000 4000 cmpil #16384,%d1 52e7a: 6700 00a8 beqw 52f24 <rtems_rfs_rtems_eval_path+0x15a>
* @param pathlen * @param flags * @param pathloc */ static int rtems_rfs_rtems_eval_path (const char* path,
52e7e: 2844 moveal %d4,%a4 52e80: 528c addql #1,%a4
break;
/*
* If a directory the execute bit must be set for us to enter.
*/
if (RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)) &&
52e82: 2044 moveal %d4,%a0
* @param pathlen * @param flags * @param pathloc */ static int rtems_rfs_rtems_eval_path (const char* path,
52e84: 4282 clrl %d2
/*
* Extract the node name we will look for this time around.
*/
node = path;
node_len = 0;
while (!rtems_filesystem_is_separator (*path) &&
52e86: 49c0 extbl %d0
(*path != '\0') && pathlen &&
((node_len + 1) < rtems_rfs_fs_max_name (fs)))
{
path++;
pathlen--;
52e88: 2448 moveal %a0,%a2
/*
* Extract the node name we will look for this time around.
*/
node = path;
node_len = 0;
while (!rtems_filesystem_is_separator (*path) &&
52e8a: 2043 moveal %d3,%a0 52e8c: 2f00 movel %d0,%sp@- 52e8e: 4e90 jsr %a0@ 52e90: 588f addql #4,%sp
(*path != '\0') && pathlen &&
((node_len + 1) < rtems_rfs_fs_max_name (fs)))
52e92: 2202 movel %d2,%d1
/*
* Extract the node name we will look for this time around.
*/
node = path;
node_len = 0;
while (!rtems_filesystem_is_separator (*path) &&
52e94: 41ea 0001 lea %a2@(1),%a0
(*path != '\0') && pathlen &&
((node_len + 1) < rtems_rfs_fs_max_name (fs)))
52e98: 5281 addql #1,%d1
/*
* Extract the node name we will look for this time around.
*/
node = path;
node_len = 0;
while (!rtems_filesystem_is_separator (*path) &&
52e9a: 4a80 tstl %d0
52e9c: 662e bnes 52ecc <rtems_rfs_rtems_eval_path+0x102><== NEVER TAKEN
52e9e: 4a12 tstb %a2@
52ea0: 672a beqs 52ecc <rtems_rfs_rtems_eval_path+0x102><== NEVER TAKEN
(*path != '\0') && pathlen &&
52ea2: 4a8b tstl %a3 52ea4: 6700 0102 beqw 52fa8 <rtems_rfs_rtems_eval_path+0x1de> 52ea8: b2ad 0018 cmpl %a5@(24),%d1
52eac: 641e bccs 52ecc <rtems_rfs_rtems_eval_path+0x102><== NEVER TAKEN
((node_len + 1) < rtems_rfs_fs_max_name (fs)))
{
path++;
pathlen--;
52eae: 2448 moveal %a0,%a2
* @param pathlen * @param flags * @param pathloc */ static int rtems_rfs_rtems_eval_path (const char* path,
52eb0: 2401 movel %d1,%d2
/*
* Extract the node name we will look for this time around.
*/
node = path;
node_len = 0;
while (!rtems_filesystem_is_separator (*path) &&
52eb2: 2043 moveal %d3,%a0
(*path != '\0') && pathlen &&
((node_len + 1) < rtems_rfs_fs_max_name (fs)))
{
path++;
pathlen--;
52eb4: 538b subql #1,%a3 52eb6: 101c moveb %a4@+,%d0
/*
* Extract the node name we will look for this time around.
*/
node = path;
node_len = 0;
while (!rtems_filesystem_is_separator (*path) &&
52eb8: 49c0 extbl %d0 52eba: 2f00 movel %d0,%sp@- 52ebc: 4e90 jsr %a0@ 52ebe: 588f addql #4,%sp
(*path != '\0') && pathlen &&
((node_len + 1) < rtems_rfs_fs_max_name (fs)))
52ec0: 2202 movel %d2,%d1
/*
* Extract the node name we will look for this time around.
*/
node = path;
node_len = 0;
while (!rtems_filesystem_is_separator (*path) &&
52ec2: 41ea 0001 lea %a2@(1),%a0
(*path != '\0') && pathlen &&
((node_len + 1) < rtems_rfs_fs_max_name (fs)))
52ec6: 5281 addql #1,%d1
/*
* Extract the node name we will look for this time around.
*/
node = path;
node_len = 0;
while (!rtems_filesystem_is_separator (*path) &&
52ec8: 4a80 tstl %d0
52eca: 67d2 beqs 52e9e <rtems_rfs_rtems_eval_path+0xd4>
(*path != '\0') && pathlen &&
52ecc: 200b movel %a3,%d0
}
/*
* Eat any separators at start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, pathlen);
52ece: 2246 moveal %d6,%a1 52ed0: 2f00 movel %d0,%sp@- 52ed2: 2f0a movel %a2,%sp@- 52ed4: 4e91 jsr %a1@
/*
* If the node is the current directory and there is more path to come move
* on it else we are at the inode we want.
*/
if (rtems_rfs_current_dir (node))
52ed6: 508f addql #8,%sp 52ed8: 2044 moveal %d4,%a0
* Eat any separators at start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, pathlen);
path += stripped;
pathlen -= stripped;
node_len += stripped;
52eda: 2840 moveal %d0,%a4
/*
* Eat any separators at start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, pathlen);
path += stripped;
pathlen -= stripped;
52edc: 97c0 subal %d0,%a3
/*
* Eat any separators at start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, pathlen);
path += stripped;
52ede: d5c0 addal %d0,%a2
pathlen -= stripped;
node_len += stripped;
52ee0: d9c2 addal %d2,%a4
/*
* If the node is the current directory and there is more path to come move
* on it else we are at the inode we want.
*/
if (rtems_rfs_current_dir (node))
52ee2: 722e moveq #46,%d1 52ee4: 1010 moveb %a0@,%d0 52ee6: 49c0 extbl %d0 52ee8: b280 cmpl %d0,%d1
52eea: 675c beqs 52f48 <rtems_rfs_rtems_eval_path+0x17e>
/*
* Look up the node name in this directory. If found drop through, close
* the current inode and let the loop open the inode so the mode can be
* read and handlers set.
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode,
52eec: 486e fffc pea %fp@(-4) 52ef0: 486e fff8 pea %fp@(-8) 52ef4: 2f02 movel %d2,%sp@- 52ef6: 2f04 movel %d4,%sp@- 52ef8: 2f05 movel %d5,%sp@- 52efa: 2f0d movel %a5,%sp@- 52efc: 4eb9 0005 c46c jsr 5c46c <rtems_rfs_dir_lookup_ino>
node, node_len - stripped, &ino, &doff);
if (rc > 0)
52f02: 4fef 0018 lea %sp@(24),%sp 52f06: 4a80 tstl %d0 52f08: 6e00 023a bgtw 53144 <rtems_rfs_rtems_eval_path+0x37a>
}
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_PATH))
printf("rtems-rfs-rtems: eval-path: down: path:%s ino:%" PRId32 "\n", node, ino);
}
rc = rtems_rfs_inode_close (fs, &inode);
52f0c: 2f05 movel %d5,%sp@- 52f0e: 2f0d movel %a5,%sp@- 52f10: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close>
if (rc > 0)
52f16: 508f addql #8,%sp 52f18: 4a80 tstl %d0 52f1a: 6e00 0174 bgtw 53090 <rtems_rfs_rtems_eval_path+0x2c6>
/*
* Eat any separators at start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, pathlen);
path += stripped;
52f1e: 280a movel %a2,%d4 52f20: 6000 ff14 braw 52e36 <rtems_rfs_rtems_eval_path+0x6c>
/*
* If a directory the execute bit must be set for us to enter.
*/
if (RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)) &&
!rtems_rfs_rtems_eval_perms (&inode, RTEMS_LIBIO_PERMS_SEARCH))
52f24: 4878 0001 pea 1 <ADD> 52f28: 2f05 movel %d5,%sp@- 52f2a: 4eb9 0005 361c jsr 5361c <rtems_rfs_rtems_eval_perms>
break;
/*
* If a directory the execute bit must be set for us to enter.
*/
if (RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)) &&
52f30: 508f addql #8,%sp 52f32: 4a00 tstb %d0 52f34: 6700 03f6 beqw 5332c <rtems_rfs_rtems_eval_path+0x562> 52f38: 2044 moveal %d4,%a0
* @param pathlen * @param flags * @param pathloc */ static int rtems_rfs_rtems_eval_path (const char* path,
52f3a: 2844 moveal %d4,%a4 52f3c: 528c addql #1,%a4 52f3e: 4282 clrl %d2
break;
/*
* If a directory the execute bit must be set for us to enter.
*/
if (RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)) &&
52f40: 1010 moveb %a0@,%d0 52f42: 2044 moveal %d4,%a0 52f44: 6000 ff40 braw 52e86 <rtems_rfs_rtems_eval_path+0xbc>
/*
* If the node is the current directory and there is more path to come move
* on it else we are at the inode we want.
*/
if (rtems_rfs_current_dir (node))
52f48: 1028 0001 moveb %a0@(1),%d0 52f4c: 6600 00e0 bnew 5302e <rtems_rfs_rtems_eval_path+0x264>
{
if (*path)
52f50: 4a12 tstb %a2@ 52f52: 6600 017e bnew 530d2 <rtems_rfs_rtems_eval_path+0x308>
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_path: closing node", rc);
}
}
rtems_rfs_rtems_set_pathloc_ino (pathloc, ino);
52f56: 2047 moveal %d7,%a0
rtems_rfs_rtems_set_pathloc_doff (pathloc, doff);
52f58: 43ee fffc lea %fp@(-4),%a1
rc = rtems_rfs_rtems_set_handlers (pathloc, &inode) ? 0 : EIO;
52f5c: 2f05 movel %d5,%sp@-
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_path: closing node", rc);
}
}
rtems_rfs_rtems_set_pathloc_ino (pathloc, ino);
52f5e: 20ae fff8 movel %fp@(-8),%a0@
rtems_rfs_rtems_set_pathloc_doff (pathloc, doff);
52f62: 2151 0004 movel %a1@,%a0@(4)
rc = rtems_rfs_rtems_set_handlers (pathloc, &inode) ? 0 : EIO;
52f66: 2f07 movel %d7,%sp@- 52f68: 4eb9 0005 36fc jsr 536fc <rtems_rfs_rtems_set_handlers> 52f6e: 508f addql #8,%sp 52f70: 4a00 tstb %d0
52f72: 675a beqs 52fce <rtems_rfs_rtems_eval_path+0x204><== NEVER TAKEN
rtems_rfs_inode_close (fs, &inode);
52f74: 2f05 movel %d5,%sp@-
}
rtems_rfs_rtems_set_pathloc_ino (pathloc, ino);
rtems_rfs_rtems_set_pathloc_doff (pathloc, doff);
rc = rtems_rfs_rtems_set_handlers (pathloc, &inode) ? 0 : EIO;
52f76: 4283 clrl %d3
rtems_rfs_inode_close (fs, &inode);
52f78: 2f0d movel %a5,%sp@- 52f7a: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close>
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
52f80: 246d 007c moveal %a5@(124),%a2
rtems_rfs_buffers_release (fs);
52f84: 2f0d movel %a5,%sp@- 52f86: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release>
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
52f8c: 2f12 movel %a2@,%sp@- 52f8e: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL)
52f94: 4fef 0010 lea %sp@(16),%sp
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
52f98: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL)
52f9a: 665a bnes 52ff6 <rtems_rfs_rtems_eval_path+0x22c><== NEVER TAKEN
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_PATH))
printf("rtems-rfs-rtems: eval-path: ino:%" PRId32 "\n", ino);
return rc;
}
52f9c: 2003 movel %d3,%d0 52f9e: 4cee 3cfc ffa4 moveml %fp@(-92),%d2-%d7/%a2-%a5 52fa4: 4e5e unlk %fp 52fa6: 4e75 rts
* Extract the node name we will look for this time around.
*/
node = path;
node_len = 0;
while (!rtems_filesystem_is_separator (*path) &&
(*path != '\0') && pathlen &&
52fa8: 4280 clrl %d0 <== NOT EXECUTED
}
/*
* Eat any separators at start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, pathlen);
52faa: 2246 moveal %d6,%a1 <== NOT EXECUTED 52fac: 2f00 movel %d0,%sp@- <== NOT EXECUTED 52fae: 2f0a movel %a2,%sp@- <== NOT EXECUTED 52fb0: 4e91 jsr %a1@ <== NOT EXECUTED
/*
* If the node is the current directory and there is more path to come move
* on it else we are at the inode we want.
*/
if (rtems_rfs_current_dir (node))
52fb2: 508f addql #8,%sp <== NOT EXECUTED 52fb4: 2044 moveal %d4,%a0 <== NOT EXECUTED
* Eat any separators at start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, pathlen);
path += stripped;
pathlen -= stripped;
node_len += stripped;
52fb6: 2840 moveal %d0,%a4 <== NOT EXECUTED
/*
* Eat any separators at start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, pathlen);
path += stripped;
pathlen -= stripped;
52fb8: 97c0 subal %d0,%a3 <== NOT EXECUTED
/*
* Eat any separators at start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, pathlen);
path += stripped;
52fba: d5c0 addal %d0,%a2 <== NOT EXECUTED
pathlen -= stripped;
node_len += stripped;
52fbc: d9c2 addal %d2,%a4 <== NOT EXECUTED
/*
* If the node is the current directory and there is more path to come move
* on it else we are at the inode we want.
*/
if (rtems_rfs_current_dir (node))
52fbe: 722e moveq #46,%d1 <== NOT EXECUTED 52fc0: 1010 moveb %a0@,%d0 <== NOT EXECUTED 52fc2: 49c0 extbl %d0 <== NOT EXECUTED 52fc4: b280 cmpl %d0,%d1 <== NOT EXECUTED 52fc6: 6600 ff24 bnew 52eec <rtems_rfs_rtems_eval_path+0x122><== NOT EXECUTED 52fca: 6000 ff7c braw 52f48 <rtems_rfs_rtems_eval_path+0x17e><== NOT EXECUTED
rtems_rfs_rtems_set_pathloc_ino (pathloc, ino);
rtems_rfs_rtems_set_pathloc_doff (pathloc, doff);
rc = rtems_rfs_rtems_set_handlers (pathloc, &inode) ? 0 : EIO;
rtems_rfs_inode_close (fs, &inode);
52fce: 2f05 movel %d5,%sp@- <== NOT EXECUTED
}
rtems_rfs_rtems_set_pathloc_ino (pathloc, ino);
rtems_rfs_rtems_set_pathloc_doff (pathloc, doff);
rc = rtems_rfs_rtems_set_handlers (pathloc, &inode) ? 0 : EIO;
52fd0: 7605 moveq #5,%d3 <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
52fd2: 2f0d movel %a5,%sp@- <== NOT EXECUTED 52fd4: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
52fda: 246d 007c moveal %a5@(124),%a2 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
52fde: 2f0d movel %a5,%sp@- <== NOT EXECUTED 52fe0: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
52fe6: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 52fe8: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
52fee: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
52ff2: 2400 movel %d0,%d2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
52ff4: 67a6 beqs 52f9c <rtems_rfs_rtems_eval_path+0x1d2><== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
52ff6: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 52ffa: 42a7 clrl %sp@- <== NOT EXECUTED 52ffc: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 53002: 508f addql #8,%sp <== NOT EXECUTED 53004: 4a00 tstb %d0 <== NOT EXECUTED 53006: 6794 beqs 52f9c <rtems_rfs_rtems_eval_path+0x1d2><== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
53008: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5300a: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 53010: 2f00 movel %d0,%sp@- <== NOT EXECUTED 53012: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 53018: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5301e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_PATH))
printf("rtems-rfs-rtems: eval-path: ino:%" PRId32 "\n", ino);
return rc;
}
53022: 2003 movel %d3,%d0 <== NOT EXECUTED 53024: 4cee 3cfc ffa4 moveml %fp@(-92),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5302a: 4e5e unlk %fp <== NOT EXECUTED 5302c: 4e75 rts <== NOT EXECUTED
/*
* If the node is the current directory and there is more path to come move
* on it else we are at the inode we want.
*/
if (rtems_rfs_current_dir (node))
5302e: 49c0 extbl %d0 53030: 2043 moveal %d3,%a0 53032: 2f00 movel %d0,%sp@- 53034: 4e90 jsr %a0@ 53036: 588f addql #4,%sp 53038: 4a80 tstl %d0 5303a: 6600 ff14 bnew 52f50 <rtems_rfs_rtems_eval_path+0x186>
/*
* If the node is a parent we must move up one directory. If the location
* is on another file system we have a crossmount so we call that file
* system to handle the remainder of the path.
*/
if (rtems_rfs_parent_dir (node))
5303e: 2244 moveal %d4,%a1 53040: 722e moveq #46,%d1 53042: 1011 moveb %a1@,%d0 53044: 49c0 extbl %d0 53046: b280 cmpl %d0,%d1 53048: 6600 fea2 bnew 52eec <rtems_rfs_rtems_eval_path+0x122> 5304c: 1029 0001 moveb %a1@(1),%d0 53050: 49c0 extbl %d0 53052: b280 cmpl %d0,%d1 53054: 6600 fe96 bnew 52eec <rtems_rfs_rtems_eval_path+0x122> 53058: 1029 0002 moveb %a1@(2),%d0 5305c: 6600 00b6 bnew 53114 <rtems_rfs_rtems_eval_path+0x34a>
{
/*
* If we are at root inode of the file system we have a crossmount path.
*/
if (ino == RTEMS_RFS_ROOT_INO)
53060: 7001 moveq #1,%d0 53062: b0ae fff8 cmpl %fp@(-8),%d0 53066: 6700 01ee beqw 53256 <rtems_rfs_rtems_eval_path+0x48c>
}
/*
* We need to find the parent of this node.
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode, "..", 2, &ino, &doff);
5306a: 486e fffc pea %fp@(-4) 5306e: 486e fff8 pea %fp@(-8) 53072: 4878 0002 pea 2 <DOUBLE_FLOAT> 53076: 4879 0007 0ff9 pea 70ff9 <_rodata_start+0x1a9> 5307c: 2f05 movel %d5,%sp@- 5307e: 2f0d movel %a5,%sp@- 53080: 4eb9 0005 c46c jsr 5c46c <rtems_rfs_dir_lookup_ino>
if (rc > 0)
53086: 4fef 0018 lea %sp@(24),%sp 5308a: 4a80 tstl %d0 5308c: 6f00 fe7e blew 52f0c <rtems_rfs_rtems_eval_path+0x142>
}
rc = rtems_rfs_inode_close (fs, &inode);
if (rc > 0)
{
rtems_rfs_inode_close (fs, &inode);
53090: 2f05 movel %d5,%sp@- <== NOT EXECUTED 53092: 2400 movel %d0,%d2 <== NOT EXECUTED 53094: 2f0d movel %a5,%sp@- <== NOT EXECUTED 53096: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
5309c: 246d 007c moveal %a5@(124),%a2 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
530a0: 2f0d movel %a5,%sp@- <== NOT EXECUTED 530a2: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
530a8: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 530aa: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
530b0: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
530b4: 2600 movel %d0,%d3 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
530b6: 6600 00ec bnew 531a4 <rtems_rfs_rtems_eval_path+0x3da><== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_path: closing node", rc);
530ba: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 530c0: 76ff moveq #-1,%d3 <== NOT EXECUTED 530c2: 2240 moveal %d0,%a1 <== NOT EXECUTED 530c4: 2282 movel %d2,%a1@ <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_PATH))
printf("rtems-rfs-rtems: eval-path: ino:%" PRId32 "\n", ino);
return rc;
}
530c6: 2003 movel %d3,%d0 <== NOT EXECUTED 530c8: 4cee 3cfc ffa4 moveml %fp@(-92),%d2-%d7/%a2-%a5 <== NOT EXECUTED 530ce: 4e5e unlk %fp <== NOT EXECUTED 530d0: 4e75 rts <== NOT EXECUTED
*/
if (rtems_rfs_current_dir (node))
{
if (*path)
{
rtems_rfs_inode_close (fs, &inode);
530d2: 2f05 movel %d5,%sp@- <== NOT EXECUTED
/*
* Eat any separators at start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, pathlen);
path += stripped;
530d4: 280a movel %a2,%d4 <== NOT EXECUTED
*/
if (rtems_rfs_current_dir (node))
{
if (*path)
{
rtems_rfs_inode_close (fs, &inode);
530d6: 2f0d movel %a5,%sp@- <== NOT EXECUTED 530d8: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close> <== NOT EXECUTED
continue;
530de: 508f addql #8,%sp <== NOT EXECUTED 530e0: 6000 fd54 braw 52e36 <rtems_rfs_rtems_eval_path+0x6c> <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
530e4: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 530e8: 42a7 clrl %sp@- <== NOT EXECUTED 530ea: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 530f0: 508f addql #8,%sp <== NOT EXECUTED 530f2: 4a00 tstb %d0 <== NOT EXECUTED 530f4: 6600 00ec bnew 531e2 <rtems_rfs_rtems_eval_path+0x418><== NOT EXECUTED 530f8: 41f9 0005 0300 lea 50300 <rtems_rfs_inode_open>,%a0 <== NOT EXECUTED 530fe: 2a0e movel %fp,%d5 <== NOT EXECUTED 53100: 0685 ffff ffd2 addil #-46,%d5 <== NOT EXECUTED 53106: 263c 0004 821c movel #295452,%d3 <== NOT EXECUTED 5310c: 2d48 ffcc movel %a0,%fp@(-52) <== NOT EXECUTED 53110: 6000 fd24 braw 52e36 <rtems_rfs_rtems_eval_path+0x6c> <== NOT EXECUTED
/*
* If the node is a parent we must move up one directory. If the location
* is on another file system we have a crossmount so we call that file
* system to handle the remainder of the path.
*/
if (rtems_rfs_parent_dir (node))
53114: 49c0 extbl %d0 <== NOT EXECUTED 53116: 2043 moveal %d3,%a0 <== NOT EXECUTED 53118: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5311a: 4e90 jsr %a0@ <== NOT EXECUTED 5311c: 588f addql #4,%sp <== NOT EXECUTED 5311e: 4a80 tstl %d0 <== NOT EXECUTED 53120: 6600 ff3e bnew 53060 <rtems_rfs_rtems_eval_path+0x296><== NOT EXECUTED
/*
* Look up the node name in this directory. If found drop through, close
* the current inode and let the loop open the inode so the mode can be
* read and handlers set.
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode,
53124: 486e fffc pea %fp@(-4) <== NOT EXECUTED 53128: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 5312c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5312e: 2f04 movel %d4,%sp@- <== NOT EXECUTED 53130: 2f05 movel %d5,%sp@- <== NOT EXECUTED 53132: 2f0d movel %a5,%sp@- <== NOT EXECUTED 53134: 4eb9 0005 c46c jsr 5c46c <rtems_rfs_dir_lookup_ino> <== NOT EXECUTED
node, node_len - stripped, &ino, &doff);
if (rc > 0)
5313a: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 5313e: 4a80 tstl %d0 <== NOT EXECUTED 53140: 6f00 fdca blew 52f0c <rtems_rfs_rtems_eval_path+0x142><== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
53144: 2f05 movel %d5,%sp@- 53146: 2400 movel %d0,%d2 53148: 2f0d movel %a5,%sp@- 5314a: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close>
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
53150: 246d 007c moveal %a5@(124),%a2
rtems_rfs_buffers_release (fs);
53154: 2f0d movel %a5,%sp@- 53156: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release>
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
5315c: 2f12 movel %a2@,%sp@- 5315e: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL)
53164: 4fef 0010 lea %sp@(16),%sp
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
53168: 2600 movel %d0,%d3
if (sc != RTEMS_SUCCESSFUL)
5316a: 6600 00ac bnew 53218 <rtems_rfs_rtems_eval_path+0x44e>
rtems_rfs_rtems_unlock (fs);
return ((errno = rc) == 0) ? 0 : -1;
5316e: 4eb9 0006 2548 jsr 62548 <__errno> 53174: 76ff moveq #-1,%d3 53176: 2040 moveal %d0,%a0 53178: 2082 movel %d2,%a0@
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_PATH))
printf("rtems-rfs-rtems: eval-path: ino:%" PRId32 "\n", ino);
return rc;
}
5317a: 2003 movel %d3,%d0 5317c: 4cee 3cfc ffa4 moveml %fp@(-92),%d2-%d7/%a2-%a5 53182: 4e5e unlk %fp 53184: 4e75 rts
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
53186: 246d 007c moveal %a5@(124),%a2 <== NOT EXECUTED 5318a: 2400 movel %d0,%d2 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
5318c: 2f0d movel %a5,%sp@- <== NOT EXECUTED 5318e: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
53194: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 53196: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
5319c: 508f addql #8,%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
5319e: 2600 movel %d0,%d3 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
531a0: 6700 ff18 beqw 530ba <rtems_rfs_rtems_eval_path+0x2f0><== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
531a4: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 531a8: 42a7 clrl %sp@- <== NOT EXECUTED 531aa: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 531b0: 508f addql #8,%sp <== NOT EXECUTED 531b2: 4a00 tstb %d0 <== NOT EXECUTED 531b4: 6700 ff04 beqw 530ba <rtems_rfs_rtems_eval_path+0x2f0><== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
531b8: 2f03 movel %d3,%sp@- <== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
if (rc > 0)
{
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_path: closing node", rc);
531ba: 76ff moveq #-1,%d3 <== NOT EXECUTED 531bc: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 531c2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 531c4: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 531ca: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 531d0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 531d4: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 531da: 2240 moveal %d0,%a1 <== NOT EXECUTED 531dc: 2282 movel %d2,%a1@ <== NOT EXECUTED 531de: 6000 fee6 braw 530c6 <rtems_rfs_rtems_eval_path+0x2fc><== NOT EXECUTED
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
printf ("rtems-rfs: mutex: obtain failed: %s\n",
531e2: 2f02 movel %d2,%sp@- <== NOT EXECUTED 531e4: 2a0e movel %fp,%d5 <== NOT EXECUTED 531e6: 0685 ffff ffd2 addil #-46,%d5 <== NOT EXECUTED 531ec: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 531f2: 263c 0004 821c movel #295452,%d3 <== NOT EXECUTED 531f8: 43f9 0005 0300 lea 50300 <rtems_rfs_inode_open>,%a1 <== NOT EXECUTED 531fe: 2f00 movel %d0,%sp@- <== NOT EXECUTED 53200: 4879 0007 2f06 pea 72f06 <ramdisk_ops+0xb28> <== NOT EXECUTED 53206: 2d49 ffcc movel %a1,%fp@(-52) <== NOT EXECUTED 5320a: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 53210: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 53214: 6000 fc20 braw 52e36 <rtems_rfs_rtems_eval_path+0x6c> <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
53218: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 5321c: 42a7 clrl %sp@- <== NOT EXECUTED 5321e: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 53224: 508f addql #8,%sp <== NOT EXECUTED 53226: 4a00 tstb %d0 <== NOT EXECUTED 53228: 6700 ff44 beqw 5316e <rtems_rfs_rtems_eval_path+0x3a4><== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
5322c: 2f03 movel %d3,%sp@- <== NOT EXECUTED
node, node_len - stripped, &ino, &doff);
if (rc > 0)
{
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return ((errno = rc) == 0) ? 0 : -1;
5322e: 76ff moveq #-1,%d3 <== NOT EXECUTED 53230: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 53236: 2f00 movel %d0,%sp@- <== NOT EXECUTED 53238: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 5323e: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 53244: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 53248: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 5324e: 2040 moveal %d0,%a0 <== NOT EXECUTED 53250: 2082 movel %d2,%a0@ <== NOT EXECUTED 53252: 6000 ff26 braw 5317a <rtems_rfs_rtems_eval_path+0x3b0><== NOT EXECUTED
if (ino == RTEMS_RFS_ROOT_INO)
{
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_PATH))
printf("rtems-rfs-rtems: eval-path: crossmount: path:%s (%zd)\n",
path - node_len, pathlen + node_len);
rtems_rfs_inode_close (fs, &inode);
53256: 2f05 movel %d5,%sp@- 53258: 2f0d movel %a5,%sp@- 5325a: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close>
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
53260: 242d 007c movel %a5@(124),%d2
rtems_rfs_buffers_release (fs);
53264: 2f0d movel %a5,%sp@- 53266: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release>
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
5326c: 2042 moveal %d2,%a0 5326e: 2f10 movel %a0@,%sp@- 53270: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL)
53276: 4fef 0010 lea %sp@(16),%sp
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
5327a: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL)
5327c: 6646 bnes 532c4 <rtems_rfs_rtems_eval_path+0x4fa><== NEVER TAKEN
rtems_rfs_rtems_unlock (fs);
*pathloc = pathloc->mt_entry->mt_point_node;
5327e: 2047 moveal %d7,%a0
return (*pathloc->ops->evalpath_h)(path - node_len, pathlen + node_len,
53280: 95cc subal %a4,%a2
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_PATH))
printf("rtems-rfs-rtems: eval-path: crossmount: path:%s (%zd)\n",
path - node_len, pathlen + node_len);
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
*pathloc = pathloc->mt_entry->mt_point_node;
53282: 2268 0010 moveal %a0@(16),%a1 53286: 20e9 0008 movel %a1@(8),%a0@+ 5328a: 20e9 000c movel %a1@(12),%a0@+ 5328e: 20e9 0010 movel %a1@(16),%a0@+ 53292: 20e9 0014 movel %a1@(20),%a0@+ 53296: 20a9 0018 movel %a1@(24),%a0@
return (*pathloc->ops->evalpath_h)(path - node_len, pathlen + node_len,
5329a: 2247 moveal %d7,%a1 5329c: 2069 000c moveal %a1@(12),%a0 532a0: 2f07 movel %d7,%sp@- 532a2: 2f2e 0010 movel %fp@(16),%sp@- 532a6: 4873 c800 pea %a3@(00000000,%a4:l) 532aa: 2f0a movel %a2,%sp@- 532ac: 2010 movel %a0@,%d0 532ae: 2040 moveal %d0,%a0 532b0: 4e90 jsr %a0@ 532b2: 4fef 0010 lea %sp@(16),%sp 532b6: 2600 movel %d0,%d3
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_PATH))
printf("rtems-rfs-rtems: eval-path: ino:%" PRId32 "\n", ino);
return rc;
}
532b8: 2003 movel %d3,%d0 532ba: 4cee 3cfc ffa4 moveml %fp@(-92),%d2-%d7/%a2-%a5 532c0: 4e5e unlk %fp 532c2: 4e75 rts
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
532c4: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 532c8: 42a7 clrl %sp@- <== NOT EXECUTED 532ca: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 532d0: 508f addql #8,%sp <== NOT EXECUTED 532d2: 4a00 tstb %d0 <== NOT EXECUTED 532d4: 67a8 beqs 5327e <rtems_rfs_rtems_eval_path+0x4b4><== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
532d6: 2f02 movel %d2,%sp@- <== NOT EXECUTED
printf("rtems-rfs-rtems: eval-path: crossmount: path:%s (%zd)\n",
path - node_len, pathlen + node_len);
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
*pathloc = pathloc->mt_entry->mt_point_node;
return (*pathloc->ops->evalpath_h)(path - node_len, pathlen + node_len,
532d8: 95cc subal %a4,%a2 <== NOT EXECUTED 532da: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 532e0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 532e2: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 532e8: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 532ee: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_PATH))
printf("rtems-rfs-rtems: eval-path: crossmount: path:%s (%zd)\n",
path - node_len, pathlen + node_len);
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
*pathloc = pathloc->mt_entry->mt_point_node;
532f2: 2047 moveal %d7,%a0 <== NOT EXECUTED 532f4: 2268 0010 moveal %a0@(16),%a1 <== NOT EXECUTED 532f8: 20e9 0008 movel %a1@(8),%a0@+ <== NOT EXECUTED 532fc: 20e9 000c movel %a1@(12),%a0@+ <== NOT EXECUTED 53300: 20e9 0010 movel %a1@(16),%a0@+ <== NOT EXECUTED 53304: 20e9 0014 movel %a1@(20),%a0@+ <== NOT EXECUTED 53308: 20a9 0018 movel %a1@(24),%a0@ <== NOT EXECUTED
return (*pathloc->ops->evalpath_h)(path - node_len, pathlen + node_len,
5330c: 2247 moveal %d7,%a1 <== NOT EXECUTED 5330e: 2069 000c moveal %a1@(12),%a0 <== NOT EXECUTED 53312: 2f07 movel %d7,%sp@- <== NOT EXECUTED 53314: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 53318: 4873 c800 pea %a3@(00000000,%a4:l) <== NOT EXECUTED 5331c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5331e: 2010 movel %a0@,%d0 <== NOT EXECUTED 53320: 2040 moveal %d0,%a0 <== NOT EXECUTED 53322: 4e90 jsr %a0@ <== NOT EXECUTED 53324: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 53328: 2600 movel %d0,%d3 <== NOT EXECUTED 5332a: 608c bras 532b8 <rtems_rfs_rtems_eval_path+0x4ee><== NOT EXECUTED
* If a directory the execute bit must be set for us to enter.
*/
if (RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)) &&
!rtems_rfs_rtems_eval_perms (&inode, RTEMS_LIBIO_PERMS_SEARCH))
{
rtems_rfs_inode_close (fs, &inode);
5332c: 2f05 movel %d5,%sp@- <== NOT EXECUTED 5332e: 2f0d movel %a5,%sp@- <== NOT EXECUTED 53330: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
53336: 246d 007c moveal %a5@(124),%a2 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
5333a: 2f0d movel %a5,%sp@- <== NOT EXECUTED 5333c: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
53342: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 53344: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
5334a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
5334e: 2400 movel %d0,%d2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
53350: 661a bnes 5336c <rtems_rfs_rtems_eval_path+0x5a2><== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_path: eval perms", EACCES);
53352: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 53358: 76ff moveq #-1,%d3 <== NOT EXECUTED 5335a: 2240 moveal %d0,%a1 <== NOT EXECUTED 5335c: 700d moveq #13,%d0 <== NOT EXECUTED 5335e: 2280 movel %d0,%a1@ <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_PATH))
printf("rtems-rfs-rtems: eval-path: ino:%" PRId32 "\n", ino);
return rc;
}
53360: 2003 movel %d3,%d0 <== NOT EXECUTED 53362: 4cee 3cfc ffa4 moveml %fp@(-92),%d2-%d7/%a2-%a5 <== NOT EXECUTED 53368: 4e5e unlk %fp <== NOT EXECUTED 5336a: 4e75 rts <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
5336c: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 53370: 42a7 clrl %sp@- <== NOT EXECUTED 53372: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 53378: 508f addql #8,%sp <== NOT EXECUTED 5337a: 4a00 tstb %d0 <== NOT EXECUTED 5337c: 67d4 beqs 53352 <rtems_rfs_rtems_eval_path+0x588><== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
5337e: 2f02 movel %d2,%sp@- <== NOT EXECUTED
if (RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)) &&
!rtems_rfs_rtems_eval_perms (&inode, RTEMS_LIBIO_PERMS_SEARCH))
{
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("eval_path: eval perms", EACCES);
53380: 76ff moveq #-1,%d3 <== NOT EXECUTED 53382: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 53388: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5338a: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 53390: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 53396: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5339a: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 533a0: 2240 moveal %d0,%a1 <== NOT EXECUTED 533a2: 700d moveq #13,%d0 <== NOT EXECUTED 533a4: 2280 movel %d0,%a1@ <== NOT EXECUTED 533a6: 60b8 bras 53360 <rtems_rfs_rtems_eval_path+0x596><== NOT EXECUTED
0005361c <rtems_rfs_rtems_eval_perms>:
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
5361c: 4280 clrl %d0
#include "rtems-rfs-rtems.h"
bool
rtems_rfs_rtems_eval_perms (rtems_rfs_inode_handle* inode, int flags)
{
5361e: 4e56 ffe0 linkw %fp,#-32 53622: 206e 0008 moveal %fp@(8),%a0 53626: 48d7 0cfc moveml %d2-%d7/%a2-%a3,%sp@
{
/*
* Mapping matches RTEMS so no need to change.
*/
return imode;
}
5362a: 2068 000c moveal %a0@(12),%a0 5362e: 1028 0002 moveb %a0@(2),%d0 53632: 4284 clrl %d4 53634: 1828 0003 moveb %a0@(3),%d4 53638: e188 lsll #8,%d0
* @return uint16_t The user id (uid).
*/
static inline uint16_t
rtems_rfs_inode_get_uid (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->owner) & 0xffff;
5363a: 1228 0006 moveb %a0@(6),%d1
#include "rtems-rfs-rtems.h"
bool
rtems_rfs_rtems_eval_perms (rtems_rfs_inode_handle* inode, int flags)
{
5363e: 242e 000c movel %fp@(12),%d2
* @return uint16_t The group id (gid).
*/
static inline uint16_t
rtems_rfs_inode_get_gid (rtems_rfs_inode_handle* handle)
{
return (rtems_rfs_read_u32 (&handle->node->owner) >> 16) & 0xffff;
53642: 1628 0005 moveb %a0@(5),%d3
* @return uint16_t The user id (uid).
*/
static inline uint16_t
rtems_rfs_inode_get_uid (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->owner) & 0xffff;
53646: 3441 moveaw %d1,%a2 53648: 1e28 0007 moveb %a0@(7),%d7
* @return uint16_t The group id (gid).
*/
static inline uint16_t
rtems_rfs_inode_get_gid (rtems_rfs_inode_handle* handle)
{
return (rtems_rfs_read_u32 (&handle->node->owner) >> 16) & 0xffff;
5364c: 1a28 0004 moveb %a0@(4),%d5
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
53650: 8880 orl %d0,%d4
uid = rtems_rfs_inode_get_uid (inode);
gid = rtems_rfs_inode_get_gid (inode);
mode = rtems_rfs_inode_get_mode (inode);
#if defined (RTEMS_POSIX_API)
st_uid = geteuid ();
53652: 4eb9 0005 7818 jsr 57818 <geteuid>
* @return uint16_t The group id (gid).
*/
static inline uint16_t
rtems_rfs_inode_get_gid (rtems_rfs_inode_handle* handle)
{
return (rtems_rfs_read_u32 (&handle->node->owner) >> 16) & 0xffff;
53658: 3643 moveaw %d3,%a3 5365a: 3600 movew %d0,%d3
st_gid = getegid ();
5365c: 4eb9 0005 7804 jsr 57804 <getegid>
/*
* Check if I am owner or a group member or someone else.
*/
flags_to_test = flags;
if ((st_uid == 0) || (st_uid == uid))
53662: 4a43 tstw %d3
53664: 6750 beqs 536b6 <rtems_rfs_rtems_eval_perms+0x9a><== ALWAYS TAKEN
* @return uint16_t The user id (uid).
*/
static inline uint16_t
rtems_rfs_inode_get_uid (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->owner) & 0xffff;
53666: 4281 clrl %d1 <== NOT EXECUTED 53668: 3c0a movew %a2,%d6 <== NOT EXECUTED 5366a: 0287 0000 00ff andil #255,%d7 <== NOT EXECUTED 53670: 0283 0000 ffff andil #65535,%d3 <== NOT EXECUTED 53676: 1206 moveb %d6,%d1 <== NOT EXECUTED 53678: e189 lsll #8,%d1 <== NOT EXECUTED 5367a: 8287 orl %d7,%d1 <== NOT EXECUTED 5367c: b283 cmpl %d3,%d1 <== NOT EXECUTED 5367e: 6756 beqs 536d6 <rtems_rfs_rtems_eval_perms+0xba><== NOT EXECUTED
* @return uint16_t The group id (gid).
*/
static inline uint16_t
rtems_rfs_inode_get_gid (rtems_rfs_inode_handle* handle)
{
return (rtems_rfs_read_u32 (&handle->node->owner) >> 16) & 0xffff;
53680: 4286 clrl %d6 <== NOT EXECUTED
#endif
/*
* Check if I am owner or a group member or someone else.
*/
flags_to_test = flags;
53682: 2202 movel %d2,%d1 <== NOT EXECUTED 53684: 360b movew %a3,%d3 <== NOT EXECUTED
if ((st_uid == 0) || (st_uid == uid))
flags_to_test |= flags << 6;
if ((st_uid == 0) || (st_gid == gid))
53686: 0280 0000 ffff andil #65535,%d0 <== NOT EXECUTED 5368c: 1c03 moveb %d3,%d6 <== NOT EXECUTED 5368e: 7618 moveq #24,%d3 <== NOT EXECUTED 53690: 4846 swap %d6 <== NOT EXECUTED 53692: 4246 clrw %d6 <== NOT EXECUTED 53694: e7ad lsll %d3,%d5 <== NOT EXECUTED 53696: 8a86 orl %d6,%d5 <== NOT EXECUTED 53698: 4245 clrw %d5 <== NOT EXECUTED 5369a: 4845 swap %d5 <== NOT EXECUTED 5369c: ba80 cmpl %d0,%d5 <== NOT EXECUTED 5369e: 671c beqs 536bc <rtems_rfs_rtems_eval_perms+0xa0><== NOT EXECUTED
/*
* If all of the flags are set we have permission
* to do this.
*/
if ((flags_to_test & (mode & 0777)) != 0)
536a0: 0284 0000 01ff andil #511,%d4 <== NOT EXECUTED 536a6: c881 andl %d1,%d4 <== NOT EXECUTED
#include <stdlib.h>
#include "rtems-rfs-rtems.h"
bool
rtems_rfs_rtems_eval_perms (rtems_rfs_inode_handle* inode, int flags)
536a8: 56c0 sne %d0 <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_PERMS))
printf("rtems-rfs: eval-perms: perms failed\n");
return false;
}
536aa: 4cee 0cfc ffe0 moveml %fp@(-32),%d2-%d7/%a2-%a3 <== NOT EXECUTED 536b0: 4e5e unlk %fp <== NOT EXECUTED 536b2: 4480 negl %d0 <== NOT EXECUTED 536b4: 4e75 rts <== NOT EXECUTED
* Check if I am owner or a group member or someone else.
*/
flags_to_test = flags;
if ((st_uid == 0) || (st_uid == uid))
flags_to_test |= flags << 6;
536b6: 2202 movel %d2,%d1 536b8: ed89 lsll #6,%d1 536ba: 8282 orl %d2,%d1
if ((st_uid == 0) || (st_gid == gid))
flags_to_test |= flags << 3;
536bc: e78a lsll #3,%d2
/*
* If all of the flags are set we have permission
* to do this.
*/
if ((flags_to_test & (mode & 0777)) != 0)
536be: 0284 0000 01ff andil #511,%d4
flags_to_test = flags;
if ((st_uid == 0) || (st_uid == uid))
flags_to_test |= flags << 6;
if ((st_uid == 0) || (st_gid == gid))
flags_to_test |= flags << 3;
536c4: 8282 orl %d2,%d1
/*
* If all of the flags are set we have permission
* to do this.
*/
if ((flags_to_test & (mode & 0777)) != 0)
536c6: c881 andl %d1,%d4
#include <stdlib.h>
#include "rtems-rfs-rtems.h"
bool
rtems_rfs_rtems_eval_perms (rtems_rfs_inode_handle* inode, int flags)
536c8: 56c0 sne %d0
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_PERMS))
printf("rtems-rfs: eval-perms: perms failed\n");
return false;
}
536ca: 4cee 0cfc ffe0 moveml %fp@(-32),%d2-%d7/%a2-%a3 536d0: 4e5e unlk %fp 536d2: 4480 negl %d0 536d4: 4e75 rts
536d6: 4286 clrl %d6 <== NOT EXECUTED
* Check if I am owner or a group member or someone else.
*/
flags_to_test = flags;
if ((st_uid == 0) || (st_uid == uid))
flags_to_test |= flags << 6;
536d8: 2202 movel %d2,%d1 <== NOT EXECUTED 536da: 360b movew %a3,%d3 <== NOT EXECUTED 536dc: ed89 lsll #6,%d1 <== NOT EXECUTED
if ((st_uid == 0) || (st_gid == gid))
536de: 0280 0000 ffff andil #65535,%d0 <== NOT EXECUTED 536e4: 1c03 moveb %d3,%d6 <== NOT EXECUTED 536e6: 7618 moveq #24,%d3 <== NOT EXECUTED 536e8: 4846 swap %d6 <== NOT EXECUTED 536ea: 4246 clrw %d6 <== NOT EXECUTED 536ec: e7ad lsll %d3,%d5 <== NOT EXECUTED
* Check if I am owner or a group member or someone else.
*/
flags_to_test = flags;
if ((st_uid == 0) || (st_uid == uid))
flags_to_test |= flags << 6;
536ee: 8282 orl %d2,%d1 <== NOT EXECUTED 536f0: 8a86 orl %d6,%d5 <== NOT EXECUTED
if ((st_uid == 0) || (st_gid == gid))
536f2: 4245 clrw %d5 <== NOT EXECUTED 536f4: 4845 swap %d5 <== NOT EXECUTED 536f6: ba80 cmpl %d0,%d5 <== NOT EXECUTED 536f8: 66a6 bnes 536a0 <rtems_rfs_rtems_eval_perms+0x84><== NOT EXECUTED 536fa: 60c0 bras 536bc <rtems_rfs_rtems_eval_perms+0xa0><== NOT EXECUTED
000533a8 <rtems_rfs_rtems_fchmod>:
}
int
rtems_rfs_rtems_fchmod (rtems_filesystem_location_info_t* pathloc,
mode_t mode)
{
533a8: 4e56 ffc4 linkw %fp,#-60 <== NOT EXECUTED 533ac: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
533b0: 2268 0010 moveal %a0@(16),%a1 <== NOT EXECUTED
}
int
rtems_rfs_rtems_fchmod (rtems_filesystem_location_info_t* pathloc,
mode_t mode)
{
533b4: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
533b8: 2469 0034 moveal %a1@(52),%a2 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
533bc: 42a7 clrl %sp@- <== NOT EXECUTED 533be: 42a7 clrl %sp@- <== NOT EXECUTED
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
return rtems_rfs_rtems_error ("shutdown: close", rc);
}
533c0: 226a 007c moveal %a2@(124),%a1 <== NOT EXECUTED 533c4: 2f11 movel %a1@,%sp@- <== NOT EXECUTED
int
rtems_rfs_rtems_fchmod (rtems_filesystem_location_info_t* pathloc,
mode_t mode)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
533c6: 2610 movel %a0@,%d3 <== NOT EXECUTED 533c8: 4eb9 0004 af20 jsr 4af20 <rtems_semaphore_obtain> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
533ce: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
533d2: 2400 movel %d0,%d2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
533d4: 6600 00e2 bnew 534b8 <rtems_rfs_rtems_fchmod+0x110> <== NOT EXECUTED
printf ("rtems-rfs-rtems: fchmod: in: ino:%" PRId32 " mode:%06" PRIomode_t "\n",
ino, mode);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
533d8: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 533dc: 486e ffda pea %fp@(-38) <== NOT EXECUTED 533e0: 2f03 movel %d3,%sp@- <== NOT EXECUTED 533e2: 2f0a movel %a2,%sp@- <== NOT EXECUTED 533e4: 4eb9 0005 0300 jsr 50300 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc)
533ea: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
printf ("rtems-rfs-rtems: fchmod: in: ino:%" PRId32 " mode:%06" PRIomode_t "\n",
ino, mode);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
533ee: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc)
533f0: 6732 beqs 53424 <rtems_rfs_rtems_fchmod+0x7c> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
533f2: 266a 007c moveal %a2@(124),%a3 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
533f6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 533f8: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
533fe: 2f13 movel %a3@,%sp@- <== NOT EXECUTED 53400: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
53406: 508f addql #8,%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
53408: 2600 movel %d0,%d3 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
5340a: 6600 00de bnew 534ea <rtems_rfs_rtems_fchmod+0x142> <== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
if (rc > 0)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("fchmod: closing inode", rc);
5340e: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 53414: 2040 moveal %d0,%a0 <== NOT EXECUTED 53416: 70ff moveq #-1,%d0 <== NOT EXECUTED 53418: 2082 movel %d2,%a0@ <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
5341a: 4cee 0c1c ffc4 moveml %fp@(-60),%d2-%d4/%a2-%a3 <== NOT EXECUTED 53420: 4e5e unlk %fp <== NOT EXECUTED 53422: 4e75 rts <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("fchmod: opening inode", rc);
}
imode = rtems_rfs_inode_get_mode (&inode);
53424: 206e ffe6 moveal %fp@(-26),%a0 <== NOT EXECUTED
* @return uint16_t The user id (uid).
*/
static inline uint16_t
rtems_rfs_inode_get_uid (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->owner) & 0xffff;
53428: 4284 clrl %d4 <== NOT EXECUTED
* Verify I am the owner of the node or the super user.
*/
#if defined (RTEMS_POSIX_API)
uid = geteuid();
if ((uid != rtems_rfs_inode_get_uid (&inode)) && (uid != 0))
5342a: 4283 clrl %d3 <== NOT EXECUTED
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
5342c: 1428 0002 moveb %a0@(2),%d2 <== NOT EXECUTED
/*
* Verify I am the owner of the node or the super user.
*/
#if defined (RTEMS_POSIX_API)
uid = geteuid();
53430: 4eb9 0005 7818 jsr 57818 <geteuid> <== NOT EXECUTED
if ((uid != rtems_rfs_inode_get_uid (&inode)) && (uid != 0))
53436: 206e ffe6 moveal %fp@(-26),%a0 <== NOT EXECUTED
* @return uint16_t The user id (uid).
*/
static inline uint16_t
rtems_rfs_inode_get_uid (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->owner) & 0xffff;
5343a: 4281 clrl %d1 <== NOT EXECUTED 5343c: 1228 0006 moveb %a0@(6),%d1 <== NOT EXECUTED 53440: 1828 0007 moveb %a0@(7),%d4 <== NOT EXECUTED 53444: e189 lsll #8,%d1 <== NOT EXECUTED 53446: 3600 movew %d0,%d3 <== NOT EXECUTED 53448: 8284 orl %d4,%d1 <== NOT EXECUTED 5344a: b283 cmpl %d3,%d1 <== NOT EXECUTED 5344c: 6706 beqs 53454 <rtems_rfs_rtems_fchmod+0xac> <== NOT EXECUTED 5344e: 4a40 tstw %d0 <== NOT EXECUTED 53450: 6600 0110 bnew 53562 <rtems_rfs_rtems_fchmod+0x1ba> <== NOT EXECUTED
return rtems_rfs_rtems_error ("fchmod: checking uid", EPERM);
}
#endif
imode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
imode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
53454: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
53458: e18a lsll #8,%d2 <== NOT EXECUTED 5345a: 0280 0000 0fff andil #4095,%d0 <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("fchmod: checking uid", EPERM);
}
#endif
imode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
53460: 0282 0000 f000 andil #61440,%d2 <== NOT EXECUTED
imode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
53466: 8480 orl %d0,%d2 <== NOT EXECUTED
* @prarm mode The mode.
*/
static inline void
rtems_rfs_inode_set_mode (rtems_rfs_inode_handle* handle, uint16_t mode)
{
rtems_rfs_write_u16 (&handle->node->mode, mode);
53468: 2002 movel %d2,%d0 <== NOT EXECUTED 5346a: e088 lsrl #8,%d0 <== NOT EXECUTED 5346c: 1140 0002 moveb %d0,%a0@(2) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
53470: 7001 moveq #1,%d0 <== NOT EXECUTED
* @prarm mode The mode.
*/
static inline void
rtems_rfs_inode_set_mode (rtems_rfs_inode_handle* handle, uint16_t mode)
{
rtems_rfs_write_u16 (&handle->node->mode, mode);
53472: 206e ffe6 moveal %fp@(-26),%a0 <== NOT EXECUTED 53476: 1142 0003 moveb %d2,%a0@(3) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
5347a: 1d40 ffea moveb %d0,%fp@(-22) <== NOT EXECUTED
rtems_rfs_inode_set_mode (&inode, imode);
rc = rtems_rfs_inode_close (fs, &inode);
5347e: 486e ffda pea %fp@(-38) <== NOT EXECUTED 53482: 2f0a movel %a2,%sp@- <== NOT EXECUTED 53484: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
5348a: 266a 007c moveal %a2@(124),%a3 <== NOT EXECUTED 5348e: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
53490: 508f addql #8,%sp <== NOT EXECUTED 53492: 6e00 ff62 bgtw 533f6 <rtems_rfs_rtems_fchmod+0x4e> <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
53496: 2f0a movel %a2,%sp@- <== NOT EXECUTED 53498: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
5349e: 2f13 movel %a3@,%sp@- <== NOT EXECUTED 534a0: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
534a6: 508f addql #8,%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
534a8: 2400 movel %d0,%d2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
534aa: 667c bnes 53528 <rtems_rfs_rtems_fchmod+0x180> <== NOT EXECUTED
return rtems_rfs_rtems_error ("fchmod: closing inode", rc);
}
rtems_rfs_rtems_unlock (fs);
return 0;
534ac: 4280 clrl %d0 <== NOT EXECUTED
}
534ae: 4cee 0c1c ffc4 moveml %fp@(-60),%d2-%d4/%a2-%a3 <== NOT EXECUTED 534b4: 4e5e unlk %fp <== NOT EXECUTED 534b6: 4e75 rts <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
534b8: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 534bc: 42a7 clrl %sp@- <== NOT EXECUTED 534be: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 534c4: 508f addql #8,%sp <== NOT EXECUTED 534c6: 4a00 tstb %d0 <== NOT EXECUTED 534c8: 6700 ff0e beqw 533d8 <rtems_rfs_rtems_fchmod+0x30> <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
534cc: 2f02 movel %d2,%sp@- <== NOT EXECUTED 534ce: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 534d4: 2f00 movel %d0,%sp@- <== NOT EXECUTED 534d6: 4879 0007 2f06 pea 72f06 <ramdisk_ops+0xb28> <== NOT EXECUTED 534dc: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 534e2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 534e6: 6000 fef0 braw 533d8 <rtems_rfs_rtems_fchmod+0x30> <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
534ea: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 534ee: 42a7 clrl %sp@- <== NOT EXECUTED 534f0: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 534f6: 508f addql #8,%sp <== NOT EXECUTED 534f8: 4a00 tstb %d0 <== NOT EXECUTED 534fa: 6700 ff12 beqw 5340e <rtems_rfs_rtems_fchmod+0x66> <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
534fe: 2f03 movel %d3,%sp@- <== NOT EXECUTED 53500: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 53506: 2f00 movel %d0,%sp@- <== NOT EXECUTED 53508: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 5350e: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 53514: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
if (rc > 0)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("fchmod: closing inode", rc);
53518: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 5351e: 2040 moveal %d0,%a0 <== NOT EXECUTED 53520: 70ff moveq #-1,%d0 <== NOT EXECUTED 53522: 2082 movel %d2,%a0@ <== NOT EXECUTED 53524: 6000 fef4 braw 5341a <rtems_rfs_rtems_fchmod+0x72> <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
53528: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 5352c: 42a7 clrl %sp@- <== NOT EXECUTED 5352e: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 53534: 508f addql #8,%sp <== NOT EXECUTED 53536: 4a00 tstb %d0 <== NOT EXECUTED 53538: 6700 ff72 beqw 534ac <rtems_rfs_rtems_fchmod+0x104> <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
5353c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5353e: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 53544: 2f00 movel %d0,%sp@- <== NOT EXECUTED 53546: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 5354c: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 53552: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
53556: 4280 clrl %d0 <== NOT EXECUTED
}
53558: 4cee 0c1c ffc4 moveml %fp@(-60),%d2-%d4/%a2-%a3 <== NOT EXECUTED 5355e: 4e5e unlk %fp <== NOT EXECUTED 53560: 4e75 rts <== NOT EXECUTED
#if defined (RTEMS_POSIX_API)
uid = geteuid();
if ((uid != rtems_rfs_inode_get_uid (&inode)) && (uid != 0))
{
rtems_rfs_inode_close (fs, &inode);
53562: 486e ffda pea %fp@(-38) <== NOT EXECUTED 53566: 2f0a movel %a2,%sp@- <== NOT EXECUTED 53568: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
5356e: 266a 007c moveal %a2@(124),%a3 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
53572: 2f0a movel %a2,%sp@- <== NOT EXECUTED 53574: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
5357a: 2f13 movel %a3@,%sp@- <== NOT EXECUTED 5357c: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
53582: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
53586: 2400 movel %d0,%d2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
53588: 6618 bnes 535a2 <rtems_rfs_rtems_fchmod+0x1fa> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("fchmod: checking uid", EPERM);
5358a: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 53590: 7201 moveq #1,%d1 <== NOT EXECUTED 53592: 2040 moveal %d0,%a0 <== NOT EXECUTED 53594: 70ff moveq #-1,%d0 <== NOT EXECUTED 53596: 2081 movel %d1,%a0@ <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
53598: 4cee 0c1c ffc4 moveml %fp@(-60),%d2-%d4/%a2-%a3 <== NOT EXECUTED 5359e: 4e5e unlk %fp <== NOT EXECUTED 535a0: 4e75 rts <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
535a2: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 535a6: 42a7 clrl %sp@- <== NOT EXECUTED 535a8: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 535ae: 508f addql #8,%sp <== NOT EXECUTED 535b0: 4a00 tstb %d0 <== NOT EXECUTED 535b2: 67d6 beqs 5358a <rtems_rfs_rtems_fchmod+0x1e2> <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
535b4: 2f02 movel %d2,%sp@- <== NOT EXECUTED 535b6: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 535bc: 2f00 movel %d0,%sp@- <== NOT EXECUTED 535be: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 535c4: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 535ca: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
if ((uid != rtems_rfs_inode_get_uid (&inode)) && (uid != 0))
{
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("fchmod: checking uid", EPERM);
535ce: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 535d4: 7201 moveq #1,%d1 <== NOT EXECUTED 535d6: 2040 moveal %d0,%a0 <== NOT EXECUTED 535d8: 70ff moveq #-1,%d0 <== NOT EXECUTED 535da: 2081 movel %d1,%a0@ <== NOT EXECUTED 535dc: 60ba bras 53598 <rtems_rfs_rtems_fchmod+0x1f0> <== NOT EXECUTED
000535de <rtems_rfs_rtems_fdatasync>:
* @param iop
* @return int
*/
int
rtems_rfs_rtems_fdatasync (rtems_libio_t* iop)
{
535de: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 535e2: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
int rc;
rc = rtems_rfs_buffer_sync (rtems_rfs_rtems_pathloc_dev (&iop->pathinfo));
535e6: 2068 0028 moveal %a0@(40),%a0 <== NOT EXECUTED
* @param iop
* @return int
*/
int
rtems_rfs_rtems_fdatasync (rtems_libio_t* iop)
{
535ea: 2f02 movel %d2,%sp@- <== NOT EXECUTED
int rc;
rc = rtems_rfs_buffer_sync (rtems_rfs_rtems_pathloc_dev (&iop->pathinfo));
535ec: 2f28 0034 movel %a0@(52),%sp@- <== NOT EXECUTED 535f0: 4eb9 0005 c17e jsr 5c17e <rtems_rfs_buffer_sync> <== NOT EXECUTED
if (rc)
535f6: 588f addql #4,%sp <== NOT EXECUTED
int
rtems_rfs_rtems_fdatasync (rtems_libio_t* iop)
{
int rc;
rc = rtems_rfs_buffer_sync (rtems_rfs_rtems_pathloc_dev (&iop->pathinfo));
535f8: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc)
535fa: 660a bnes 53606 <rtems_rfs_rtems_fdatasync+0x28> <== NOT EXECUTED
return rtems_rfs_rtems_error ("fdatasync: sync", rc);
return 0;
}
535fc: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED
rc = rtems_rfs_buffer_sync (rtems_rfs_rtems_pathloc_dev (&iop->pathinfo));
if (rc)
return rtems_rfs_rtems_error ("fdatasync: sync", rc);
return 0;
53600: 4280 clrl %d0 <== NOT EXECUTED
}
53602: 4e5e unlk %fp <== NOT EXECUTED 53604: 4e75 rts <== NOT EXECUTED
{
int rc;
rc = rtems_rfs_buffer_sync (rtems_rfs_rtems_pathloc_dev (&iop->pathinfo));
if (rc)
return rtems_rfs_rtems_error ("fdatasync: sync", rc);
53606: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 5360c: 2040 moveal %d0,%a0 <== NOT EXECUTED 5360e: 70ff moveq #-1,%d0 <== NOT EXECUTED 53610: 2082 movel %d2,%a0@ <== NOT EXECUTED
return 0;
}
53612: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 53616: 4e5e unlk %fp <== NOT EXECUTED
...
00060d7c <rtems_rfs_rtems_file_close>:
* @param iop
* @return int
*/
static int
rtems_rfs_rtems_file_close (rtems_libio_t* iop)
{
60d7c: 4e56 fff4 linkw %fp,#-12 60d80: 206e 0008 moveal %fp@(8),%a0 60d84: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
rtems_rfs_file_handle* file = rtems_rfs_rtems_get_iop_file_handle (iop);
60d88: 2668 001c moveal %a0@(28),%a3
rtems_rfs_file_system* fs = rtems_rfs_file_fs (file);
60d8c: 206b 001a moveal %a3@(26),%a0 60d90: 2468 0090 moveal %a0@(144),%a2
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
60d94: 42a7 clrl %sp@- 60d96: 42a7 clrl %sp@-
.fpathconf_h = rtems_filesystem_default_fpathconf, .fsync_h = rtems_rfs_rtems_fdatasync, .fdatasync_h = rtems_rfs_rtems_fdatasync, .fcntl_h = rtems_filesystem_default_fcntl, .rmnod_h = rtems_rfs_rtems_rmnod };
60d98: 206a 007c moveal %a2@(124),%a0 60d9c: 2f10 movel %a0@,%sp@- 60d9e: 4eb9 0004 af20 jsr 4af20 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
60da4: 4fef 000c lea %sp@(12),%sp
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
60da8: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL)
60daa: 667c bnes 60e28 <rtems_rfs_rtems_file_close+0xac><== NEVER TAKEN
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_CLOSE))
printf("rtems-rfs: file-close: handle:%p\n", file);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_file_close (fs, file);
60dac: 2f0b movel %a3,%sp@- 60dae: 2f0a movel %a2,%sp@- 60db0: 4eb9 0005 ddee jsr 5ddee <rtems_rfs_file_close>
if (rc > 0)
60db6: 508f addql #8,%sp
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_CLOSE))
printf("rtems-rfs: file-close: handle:%p\n", file);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_file_close (fs, file);
60db8: 2400 movel %d0,%d2
if (rc > 0)
60dba: 6f0c bles 60dc8 <rtems_rfs_rtems_file_close+0x4c><== ALWAYS TAKEN
rc = rtems_rfs_rtems_error ("file-close: file close", rc);
60dbc: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 60dc2: 2040 moveal %d0,%a0 <== NOT EXECUTED 60dc4: 2082 movel %d2,%a0@ <== NOT EXECUTED 60dc6: 74ff moveq #-1,%d2 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
60dc8: 266a 007c moveal %a2@(124),%a3
rtems_rfs_buffers_release (fs);
60dcc: 2f0a movel %a2,%sp@- 60dce: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release>
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
60dd4: 2f13 movel %a3@,%sp@- 60dd6: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL)
60ddc: 508f addql #8,%sp
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
60dde: 2440 moveal %d0,%a2
if (sc != RTEMS_SUCCESSFUL)
60de0: 4a80 tstl %d0
60de2: 660c bnes 60df0 <rtems_rfs_rtems_file_close+0x74><== NEVER TAKEN
rtems_rfs_rtems_unlock (fs);
return rc;
}
60de4: 2002 movel %d2,%d0 60de6: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 60dec: 4e5e unlk %fp 60dee: 4e75 rts
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
60df0: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 60df4: 42a7 clrl %sp@- <== NOT EXECUTED 60df6: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 60dfc: 508f addql #8,%sp <== NOT EXECUTED 60dfe: 4a00 tstb %d0 <== NOT EXECUTED 60e00: 67e2 beqs 60de4 <rtems_rfs_rtems_file_close+0x68><== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
60e02: 2f0a movel %a2,%sp@- <== NOT EXECUTED 60e04: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 60e0a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 60e0c: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 60e12: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 60e18: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 60e1c: 2002 movel %d2,%d0 <== NOT EXECUTED 60e1e: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 60e24: 4e5e unlk %fp <== NOT EXECUTED 60e26: 4e75 rts <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
60e28: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 60e2c: 42a7 clrl %sp@- <== NOT EXECUTED 60e2e: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 60e34: 508f addql #8,%sp <== NOT EXECUTED 60e36: 4a00 tstb %d0 <== NOT EXECUTED 60e38: 6700 ff72 beqw 60dac <rtems_rfs_rtems_file_close+0x30><== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
60e3c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 60e3e: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 60e44: 2f00 movel %d0,%sp@- <== NOT EXECUTED 60e46: 4879 0007 2f06 pea 72f06 <ramdisk_ops+0xb28> <== NOT EXECUTED 60e4c: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 60e52: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 60e56: 6000 ff54 braw 60dac <rtems_rfs_rtems_file_close+0x30><== NOT EXECUTED
00060c0e <rtems_rfs_rtems_file_ftruncate>:
* @return int
*/
static int
rtems_rfs_rtems_file_ftruncate (rtems_libio_t* iop,
rtems_off64_t length)
{
60c0e: 4e56 fff4 linkw %fp,#-12 60c12: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 60c16: 266e 0008 moveal %fp@(8),%a3
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
60c1a: 42a7 clrl %sp@-
rtems_rfs_file_handle* file = rtems_rfs_rtems_get_iop_file_handle (iop);
60c1c: 246b 001c moveal %a3@(28),%a2 60c20: 42a7 clrl %sp@-
int rc;
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_FTRUNC))
printf("rtems-rfs: file-ftrunc: handle:%p length:%Ld\n", file, length);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
60c22: 206a 001a moveal %a2@(26),%a0
.fpathconf_h = rtems_filesystem_default_fpathconf, .fsync_h = rtems_rfs_rtems_fdatasync, .fdatasync_h = rtems_rfs_rtems_fdatasync, .fcntl_h = rtems_filesystem_default_fcntl, .rmnod_h = rtems_rfs_rtems_rmnod };
60c26: 2068 0090 moveal %a0@(144),%a0 60c2a: 2068 007c moveal %a0@(124),%a0 60c2e: 2f10 movel %a0@,%sp@- 60c30: 4eb9 0004 af20 jsr 4af20 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
60c36: 4fef 000c lea %sp@(12),%sp
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
60c3a: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL)
60c3c: 6600 00f2 bnew 60d30 <rtems_rfs_rtems_file_ftruncate+0x122>
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_FTRUNC))
printf("rtems-rfs: file-ftrunc: handle:%p length:%Ld\n", file, length);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
rc = rtems_rfs_file_set_size (file, length);
60c40: 2f2e 0010 movel %fp@(16),%sp@- 60c44: 2f2e 000c movel %fp@(12),%sp@- 60c48: 2f0a movel %a2,%sp@- 60c4a: 4eb9 0005 e6d2 jsr 5e6d2 <rtems_rfs_file_set_size>
if (rc)
60c50: 4fef 000c lea %sp@(12),%sp
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_FTRUNC))
printf("rtems-rfs: file-ftrunc: handle:%p length:%Ld\n", file, length);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
rc = rtems_rfs_file_set_size (file, length);
60c54: 2400 movel %d0,%d2
if (rc)
60c56: 6600 0086 bnew 60cde <rtems_rfs_rtems_file_ftruncate+0xd0>
rc = rtems_rfs_rtems_error ("file_ftruncate: set size", rc);
iop->size = rtems_rfs_file_size (file);
60c5a: 206a 001a moveal %a2@(26),%a0 60c5e: 4868 007c pea %a0@(124) 60c62: 2f28 0090 movel %a0@(144),%sp@- 60c66: 4eb9 0005 ad76 jsr 5ad76 <rtems_rfs_block_get_size>
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
60c6c: 206a 001a moveal %a2@(26),%a0 60c70: 2068 0090 moveal %a0@(144),%a0
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
60c74: 2468 007c moveal %a0@(124),%a2
rc = rtems_rfs_file_set_size (file, length);
if (rc)
rc = rtems_rfs_rtems_error ("file_ftruncate: set size", rc);
iop->size = rtems_rfs_file_size (file);
60c78: 2740 0004 movel %d0,%a3@(4) 60c7c: 2741 0008 movel %d1,%a3@(8)
rtems_rfs_buffers_release (fs);
60c80: 2f08 movel %a0,%sp@- 60c82: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release>
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
60c88: 2f12 movel %a2@,%sp@- 60c8a: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL)
60c90: 4fef 0010 lea %sp@(16),%sp
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
60c94: 2440 moveal %d0,%a2
if (sc != RTEMS_SUCCESSFUL)
60c96: 4a80 tstl %d0
60c98: 660c bnes 60ca6 <rtems_rfs_rtems_file_ftruncate+0x98><== NEVER TAKEN
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
return rc;
}
60c9a: 2002 movel %d2,%d0 60c9c: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 60ca2: 4e5e unlk %fp 60ca4: 4e75 rts
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
60ca6: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 60caa: 42a7 clrl %sp@- <== NOT EXECUTED 60cac: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 60cb2: 508f addql #8,%sp <== NOT EXECUTED 60cb4: 4a00 tstb %d0 <== NOT EXECUTED 60cb6: 67e2 beqs 60c9a <rtems_rfs_rtems_file_ftruncate+0x8c><== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
60cb8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 60cba: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 60cc0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 60cc2: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 60cc8: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 60cce: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 60cd2: 2002 movel %d2,%d0 <== NOT EXECUTED 60cd4: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 60cda: 4e5e unlk %fp <== NOT EXECUTED 60cdc: 4e75 rts <== NOT EXECUTED
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
rc = rtems_rfs_file_set_size (file, length);
if (rc)
rc = rtems_rfs_rtems_error ("file_ftruncate: set size", rc);
60cde: 4eb9 0006 2548 jsr 62548 <__errno> 60ce4: 2040 moveal %d0,%a0 60ce6: 2082 movel %d2,%a0@
iop->size = rtems_rfs_file_size (file);
60ce8: 206a 001a moveal %a2@(26),%a0 60cec: 4868 007c pea %a0@(124)
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
rc = rtems_rfs_file_set_size (file, length);
if (rc)
rc = rtems_rfs_rtems_error ("file_ftruncate: set size", rc);
60cf0: 74ff moveq #-1,%d2 60cf2: 2f28 0090 movel %a0@(144),%sp@- 60cf6: 4eb9 0005 ad76 jsr 5ad76 <rtems_rfs_block_get_size>
iop->size = rtems_rfs_file_size (file);
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
60cfc: 206a 001a moveal %a2@(26),%a0 60d00: 2068 0090 moveal %a0@(144),%a0
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
60d04: 2468 007c moveal %a0@(124),%a2
rc = rtems_rfs_file_set_size (file, length);
if (rc)
rc = rtems_rfs_rtems_error ("file_ftruncate: set size", rc);
iop->size = rtems_rfs_file_size (file);
60d08: 2740 0004 movel %d0,%a3@(4) 60d0c: 2741 0008 movel %d1,%a3@(8)
rtems_rfs_buffers_release (fs);
60d10: 2f08 movel %a0,%sp@- 60d12: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release>
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
60d18: 2f12 movel %a2@,%sp@- 60d1a: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL)
60d20: 4fef 0010 lea %sp@(16),%sp
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
60d24: 2440 moveal %d0,%a2
if (sc != RTEMS_SUCCESSFUL)
60d26: 4a80 tstl %d0 60d28: 6700 ff70 beqw 60c9a <rtems_rfs_rtems_file_ftruncate+0x8c>
60d2c: 6000 ff78 braw 60ca6 <rtems_rfs_rtems_file_ftruncate+0x98><== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
60d30: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 60d34: 42a7 clrl %sp@- <== NOT EXECUTED 60d36: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 60d3c: 508f addql #8,%sp <== NOT EXECUTED 60d3e: 4a00 tstb %d0 <== NOT EXECUTED 60d40: 6700 fefe beqw 60c40 <rtems_rfs_rtems_file_ftruncate+0x32><== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
60d44: 2f02 movel %d2,%sp@- <== NOT EXECUTED 60d46: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 60d4c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 60d4e: 4879 0007 2f06 pea 72f06 <ramdisk_ops+0xb28> <== NOT EXECUTED 60d54: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 60d5a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_FTRUNC))
printf("rtems-rfs: file-ftrunc: handle:%p length:%Ld\n", file, length);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
rc = rtems_rfs_file_set_size (file, length);
60d5e: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 60d62: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 60d66: 2f0a movel %a2,%sp@- <== NOT EXECUTED 60d68: 4eb9 0005 e6d2 jsr 5e6d2 <rtems_rfs_file_set_size> <== NOT EXECUTED
if (rc)
60d6e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_FTRUNC))
printf("rtems-rfs: file-ftrunc: handle:%p length:%Ld\n", file, length);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
rc = rtems_rfs_file_set_size (file, length);
60d72: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc)
60d74: 6700 fee4 beqw 60c5a <rtems_rfs_rtems_file_ftruncate+0x4c><== NOT EXECUTED 60d78: 6000 ff64 braw 60cde <rtems_rfs_rtems_file_ftruncate+0xd0><== NOT EXECUTED
000609f0 <rtems_rfs_rtems_file_ioctl>:
static int
rtems_rfs_rtems_file_ioctl (rtems_libio_t* iop, uint32_t command, void* buffer)
{
return 0;
}
609f0: 4280 clrl %d0 <== NOT EXECUTED
* @param buffer
*/
static int
rtems_rfs_rtems_file_ioctl (rtems_libio_t* iop, uint32_t command, void* buffer)
{
609f2: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
return 0; }
609f6: 4e5e unlk %fp <== NOT EXECUTED
0006111a <rtems_rfs_rtems_file_lseek>:
*/
static rtems_off64_t
rtems_rfs_rtems_file_lseek (rtems_libio_t* iop,
rtems_off64_t offset,
int whence)
{
6111a: 4e56 ffec linkw %fp,#-20 6111e: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 61122: 266e 0008 moveal %fp@(8),%a3
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
61126: 42a7 clrl %sp@-
rtems_rfs_file_handle* file = rtems_rfs_rtems_get_iop_file_handle (iop);
61128: 246b 001c moveal %a3@(28),%a2 6112c: 42a7 clrl %sp@-
int rc;
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_LSEEK))
printf("rtems-rfs: file-lseek: handle:%p offset:%Ld\n", file, offset);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
6112e: 206a 001a moveal %a2@(26),%a0
.fpathconf_h = rtems_filesystem_default_fpathconf, .fsync_h = rtems_rfs_rtems_fdatasync, .fdatasync_h = rtems_rfs_rtems_fdatasync, .fcntl_h = rtems_filesystem_default_fcntl, .rmnod_h = rtems_rfs_rtems_rmnod };
61132: 2068 0090 moveal %a0@(144),%a0 61136: 2068 007c moveal %a0@(124),%a0 6113a: 2f10 movel %a0@,%sp@- 6113c: 4eb9 0004 af20 jsr 4af20 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
61142: 4fef 000c lea %sp@(12),%sp
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
61146: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL)
61148: 6600 008c bnew 611d6 <rtems_rfs_rtems_file_lseek+0xbc>
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_LSEEK))
printf("rtems-rfs: file-lseek: handle:%p offset:%Ld\n", file, offset);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
6114c: 204e moveal %fp,%a0 6114e: 202b 000c movel %a3@(12),%d0 61152: 222b 0010 movel %a3@(16),%d1 61156: 2101 movel %d1,%a0@- 61158: 2100 movel %d0,%a0@-
rc = rtems_rfs_file_seek (file, pos, &pos);
6115a: 2f08 movel %a0,%sp@- 6115c: 2f01 movel %d1,%sp@- 6115e: 2f00 movel %d0,%sp@- 61160: 2f0a movel %a2,%sp@- 61162: 4eb9 0005 e614 jsr 5e614 <rtems_rfs_file_seek>
if (rc)
{
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
61168: 206a 001a moveal %a2@(26),%a0
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
rc = rtems_rfs_file_seek (file, pos, &pos);
6116c: 2400 movel %d0,%d2
if (rc)
6116e: 4fef 0010 lea %sp@(16),%sp
{
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
61172: 2068 0090 moveal %a0@(144),%a0
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
61176: 2468 007c moveal %a0@(124),%a2
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
rc = rtems_rfs_file_seek (file, pos, &pos);
if (rc)
6117a: 6732 beqs 611ae <rtems_rfs_rtems_file_lseek+0x94><== ALWAYS TAKEN
rtems_rfs_buffers_release (fs);
6117c: 2f08 movel %a0,%sp@- <== NOT EXECUTED 6117e: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
61184: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 61186: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
6118c: 508f addql #8,%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
6118e: 2440 moveal %d0,%a2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
61190: 4a80 tstl %d0 <== NOT EXECUTED 61192: 6600 00aa bnew 6123e <rtems_rfs_rtems_file_lseek+0x124><== NOT EXECUTED
{
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
return rtems_rfs_rtems_error ("file_lseek: lseek", rc);
61196: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 6119c: 2040 moveal %d0,%a0 <== NOT EXECUTED 6119e: 70ff moveq #-1,%d0 <== NOT EXECUTED 611a0: 72ff moveq #-1,%d1 <== NOT EXECUTED 611a2: 2082 movel %d2,%a0@ <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
return iop->offset;
}
611a4: 4cee 0c04 ffec moveml %fp@(-20),%d2/%a2-%a3 <== NOT EXECUTED 611aa: 4e5e unlk %fp <== NOT EXECUTED 611ac: 4e75 rts <== NOT EXECUTED
611ae: 2f08 movel %a0,%sp@- 611b0: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release>
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
611b6: 2f12 movel %a2@,%sp@- 611b8: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL)
611be: 508f addql #8,%sp
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
611c0: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL)
611c2: 6644 bnes 61208 <rtems_rfs_rtems_file_lseek+0xee><== NEVER TAKEN
return rtems_rfs_rtems_error ("file_lseek: lseek", rc);
}
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
return iop->offset;
611c4: 202b 000c movel %a3@(12),%d0 611c8: 222b 0010 movel %a3@(16),%d1
}
611cc: 4cee 0c04 ffec moveml %fp@(-20),%d2/%a2-%a3 611d2: 4e5e unlk %fp 611d4: 4e75 rts
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
611d6: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 611da: 42a7 clrl %sp@- <== NOT EXECUTED 611dc: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 611e2: 508f addql #8,%sp <== NOT EXECUTED 611e4: 4a00 tstb %d0 <== NOT EXECUTED 611e6: 6700 ff64 beqw 6114c <rtems_rfs_rtems_file_lseek+0x32><== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
611ea: 2f02 movel %d2,%sp@- <== NOT EXECUTED 611ec: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 611f2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 611f4: 4879 0007 2f06 pea 72f06 <ramdisk_ops+0xb28> <== NOT EXECUTED 611fa: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 61200: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 61204: 6000 ff46 braw 6114c <rtems_rfs_rtems_file_lseek+0x32><== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
61208: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 6120c: 42a7 clrl %sp@- <== NOT EXECUTED 6120e: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 61214: 508f addql #8,%sp <== NOT EXECUTED 61216: 4a00 tstb %d0 <== NOT EXECUTED 61218: 67aa beqs 611c4 <rtems_rfs_rtems_file_lseek+0xaa><== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
6121a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 6121c: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 61222: 2f00 movel %d0,%sp@- <== NOT EXECUTED 61224: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 6122a: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 61230: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
return rtems_rfs_rtems_error ("file_lseek: lseek", rc);
}
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
return iop->offset;
61234: 202b 000c movel %a3@(12),%d0 <== NOT EXECUTED 61238: 222b 0010 movel %a3@(16),%d1 <== NOT EXECUTED 6123c: 608e bras 611cc <rtems_rfs_rtems_file_lseek+0xb2><== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
6123e: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 61242: 42a7 clrl %sp@- <== NOT EXECUTED 61244: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 6124a: 508f addql #8,%sp <== NOT EXECUTED 6124c: 4a00 tstb %d0 <== NOT EXECUTED 6124e: 6700 ff46 beqw 61196 <rtems_rfs_rtems_file_lseek+0x7c><== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
61252: 2f0a movel %a2,%sp@- <== NOT EXECUTED 61254: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 6125a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 6125c: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 61262: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 61268: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rc = rtems_rfs_file_seek (file, pos, &pos);
if (rc)
{
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
return rtems_rfs_rtems_error ("file_lseek: lseek", rc);
6126c: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 61272: 2040 moveal %d0,%a0 <== NOT EXECUTED 61274: 2082 movel %d2,%a0@ <== NOT EXECUTED 61276: 70ff moveq #-1,%d0 <== NOT EXECUTED 61278: 72ff moveq #-1,%d1 <== NOT EXECUTED 6127a: 6000 ff28 braw 611a4 <rtems_rfs_rtems_file_lseek+0x8a><== NOT EXECUTED
0006127e <rtems_rfs_rtems_file_open>:
static int
rtems_rfs_rtems_file_open (rtems_libio_t* iop,
const char* pathname,
uint32_t flag,
uint32_t mode)
{
6127e: 4e56 fff0 linkw %fp,#-16 61282: 48d7 1c00 moveml %a2-%a4,%sp@ 61286: 266e 0008 moveal %fp@(8),%a3
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
6128a: 206b 0028 moveal %a3@(40),%a0 6128e: 2468 0034 moveal %a0@(52),%a2
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
61292: 42a7 clrl %sp@- 61294: 42a7 clrl %sp@-
.fpathconf_h = rtems_filesystem_default_fpathconf, .fsync_h = rtems_rfs_rtems_fdatasync, .fdatasync_h = rtems_rfs_rtems_fdatasync, .fcntl_h = rtems_filesystem_default_fcntl, .rmnod_h = rtems_rfs_rtems_rmnod };
61296: 206a 007c moveal %a2@(124),%a0 6129a: 2f10 movel %a0@,%sp@- 6129c: 4eb9 0004 af20 jsr 4af20 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
612a2: 4fef 000c lea %sp@(12),%sp
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
612a6: 2840 moveal %d0,%a4
if (sc != RTEMS_SUCCESSFUL)
612a8: 4a80 tstl %d0
612aa: 6650 bnes 612fc <rtems_rfs_rtems_file_open+0x7e> <== NEVER TAKEN
rtems_rfs_rtems_lock (fs);
ino = rtems_rfs_rtems_get_iop_ino (iop);
rc = rtems_rfs_file_open (fs, ino, flags, &file);
612ac: 486e fffc pea %fp@(-4) 612b0: 42a7 clrl %sp@- 612b2: 2f2b 0018 movel %a3@(24),%sp@- 612b6: 2f0a movel %a2,%sp@- 612b8: 4eb9 0005 d9b8 jsr 5d9b8 <rtems_rfs_file_open>
if (rc > 0)
612be: 4fef 0010 lea %sp@(16),%sp
rtems_rfs_rtems_lock (fs);
ino = rtems_rfs_rtems_get_iop_ino (iop);
rc = rtems_rfs_file_open (fs, ino, flags, &file);
612c2: 2840 moveal %d0,%a4
if (rc > 0)
612c4: 4a80 tstl %d0
612c6: 6f7c bles 61344 <rtems_rfs_rtems_file_open+0xc6> <== ALWAYS TAKEN
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
612c8: 266a 007c moveal %a2@(124),%a3 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
612cc: 2f0a movel %a2,%sp@- <== NOT EXECUTED 612ce: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
612d4: 2f13 movel %a3@,%sp@- <== NOT EXECUTED 612d6: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
612dc: 508f addql #8,%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
612de: 2440 moveal %d0,%a2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
612e0: 4a80 tstl %d0 <== NOT EXECUTED 612e2: 6600 00ae bnew 61392 <rtems_rfs_rtems_file_open+0x114><== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("file-open: open", rc);
612e6: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 612ec: 2040 moveal %d0,%a0 <== NOT EXECUTED 612ee: 70ff moveq #-1,%d0 <== NOT EXECUTED 612f0: 208c movel %a4,%a0@ <== NOT EXECUTED
iop->size = rtems_rfs_file_size (file);
rtems_rfs_rtems_set_iop_file_handle (iop, file);
rtems_rfs_rtems_unlock (fs);
return 0;
}
612f2: 4cee 1c00 fff0 moveml %fp@(-16),%a2-%a4 <== NOT EXECUTED 612f8: 4e5e unlk %fp <== NOT EXECUTED 612fa: 4e75 rts <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
612fc: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 61300: 42a7 clrl %sp@- <== NOT EXECUTED 61302: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 61308: 508f addql #8,%sp <== NOT EXECUTED 6130a: 4a00 tstb %d0 <== NOT EXECUTED 6130c: 679e beqs 612ac <rtems_rfs_rtems_file_open+0x2e> <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
6130e: 2f0c movel %a4,%sp@- <== NOT EXECUTED 61310: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 61316: 2f00 movel %d0,%sp@- <== NOT EXECUTED 61318: 4879 0007 2f06 pea 72f06 <ramdisk_ops+0xb28> <== NOT EXECUTED 6131e: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 61324: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rtems_rfs_rtems_lock (fs);
ino = rtems_rfs_rtems_get_iop_ino (iop);
rc = rtems_rfs_file_open (fs, ino, flags, &file);
61328: 486e fffc pea %fp@(-4) <== NOT EXECUTED 6132c: 42a7 clrl %sp@- <== NOT EXECUTED 6132e: 2f2b 0018 movel %a3@(24),%sp@- <== NOT EXECUTED 61332: 2f0a movel %a2,%sp@- <== NOT EXECUTED 61334: 4eb9 0005 d9b8 jsr 5d9b8 <rtems_rfs_file_open> <== NOT EXECUTED
if (rc > 0)
6133a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rtems_rfs_rtems_lock (fs);
ino = rtems_rfs_rtems_get_iop_ino (iop);
rc = rtems_rfs_file_open (fs, ino, flags, &file);
6133e: 2840 moveal %d0,%a4 <== NOT EXECUTED
if (rc > 0)
61340: 4a80 tstl %d0 <== NOT EXECUTED 61342: 6e84 bgts 612c8 <rtems_rfs_rtems_file_open+0x4a> <== NOT EXECUTED
}
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_OPEN))
printf("rtems-rfs: file-open: handle:%p\n", file);
iop->size = rtems_rfs_file_size (file);
61344: 206e fffc moveal %fp@(-4),%a0 61348: 2068 001a moveal %a0@(26),%a0 6134c: 4868 007c pea %a0@(124) 61350: 2f28 0090 movel %a0@(144),%sp@- 61354: 4eb9 0005 ad76 jsr 5ad76 <rtems_rfs_block_get_size>
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
6135a: 286a 007c moveal %a2@(124),%a4
rtems_rfs_rtems_set_iop_file_handle (iop, file);
6135e: 276e fffc 001c movel %fp@(-4),%a3@(28)
}
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_OPEN))
printf("rtems-rfs: file-open: handle:%p\n", file);
iop->size = rtems_rfs_file_size (file);
61364: 2740 0004 movel %d0,%a3@(4) 61368: 2741 0008 movel %d1,%a3@(8)
rtems_rfs_buffers_release (fs);
6136c: 2f0a movel %a2,%sp@- 6136e: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release>
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
61374: 2f14 movel %a4@,%sp@- 61376: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL)
6137c: 4fef 0010 lea %sp@(16),%sp
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
61380: 2440 moveal %d0,%a2
if (sc != RTEMS_SUCCESSFUL)
61382: 4a80 tstl %d0
61384: 664a bnes 613d0 <rtems_rfs_rtems_file_open+0x152><== NEVER TAKEN
rtems_rfs_rtems_set_iop_file_handle (iop, file);
rtems_rfs_rtems_unlock (fs);
return 0;
61386: 4280 clrl %d0
}
61388: 4cee 1c00 fff0 moveml %fp@(-16),%a2-%a4 6138e: 4e5e unlk %fp 61390: 4e75 rts
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
61392: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 61396: 42a7 clrl %sp@- <== NOT EXECUTED 61398: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 6139e: 508f addql #8,%sp <== NOT EXECUTED 613a0: 4a00 tstb %d0 <== NOT EXECUTED 613a2: 6700 ff42 beqw 612e6 <rtems_rfs_rtems_file_open+0x68> <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
613a6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 613a8: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 613ae: 2f00 movel %d0,%sp@- <== NOT EXECUTED 613b0: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 613b6: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 613bc: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rc = rtems_rfs_file_open (fs, ino, flags, &file);
if (rc > 0)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("file-open: open", rc);
613c0: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 613c6: 2040 moveal %d0,%a0 <== NOT EXECUTED 613c8: 70ff moveq #-1,%d0 <== NOT EXECUTED 613ca: 208c movel %a4,%a0@ <== NOT EXECUTED 613cc: 6000 ff24 braw 612f2 <rtems_rfs_rtems_file_open+0x74> <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
613d0: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 613d4: 42a7 clrl %sp@- <== NOT EXECUTED 613d6: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 613dc: 508f addql #8,%sp <== NOT EXECUTED 613de: 4a00 tstb %d0 <== NOT EXECUTED 613e0: 67a4 beqs 61386 <rtems_rfs_rtems_file_open+0x108><== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
613e2: 2f0a movel %a2,%sp@- <== NOT EXECUTED 613e4: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 613ea: 2f00 movel %d0,%sp@- <== NOT EXECUTED 613ec: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 613f2: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 613f8: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
iop->size = rtems_rfs_file_size (file);
rtems_rfs_rtems_set_iop_file_handle (iop, file);
rtems_rfs_rtems_unlock (fs);
return 0;
613fc: 4280 clrl %d0 <== NOT EXECUTED
}
613fe: 4cee 1c00 fff0 moveml %fp@(-16),%a2-%a4 <== NOT EXECUTED 61404: 4e5e unlk %fp <== NOT EXECUTED
000609fa <rtems_rfs_rtems_file_read>:
*/
static ssize_t
rtems_rfs_rtems_file_read (rtems_libio_t* iop,
void* buffer,
size_t count)
{
609fa: 4e56 ffd8 linkw %fp,#-40 609fe: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 60a02: 266e 0008 moveal %fp@(8),%a3
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
60a06: 42a7 clrl %sp@-
rtems_rfs_file_handle* file = rtems_rfs_rtems_get_iop_file_handle (iop);
60a08: 246b 001c moveal %a3@(28),%a2 60a0c: 42a7 clrl %sp@-
int rc;
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_READ))
printf("rtems-rfs: file-read: handle:%p count:%zd\n", file, count);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
60a0e: 206a 001a moveal %a2@(26),%a0
.fpathconf_h = rtems_filesystem_default_fpathconf, .fsync_h = rtems_rfs_rtems_fdatasync, .fdatasync_h = rtems_rfs_rtems_fdatasync, .fcntl_h = rtems_filesystem_default_fcntl, .rmnod_h = rtems_rfs_rtems_rmnod };
60a12: 2068 0090 moveal %a0@(144),%a0 60a16: 2068 007c moveal %a0@(124),%a0 60a1a: 2f10 movel %a0@,%sp@-
*/
static ssize_t
rtems_rfs_rtems_file_read (rtems_libio_t* iop,
void* buffer,
size_t count)
{
60a1c: 282e 0010 movel %fp@(16),%d4 60a20: 4eb9 0004 af20 jsr 4af20 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
60a26: 4fef 000c lea %sp@(12),%sp
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
60a2a: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL)
60a2c: 6600 0160 bnew 60b8e <rtems_rfs_rtems_file_read+0x194>
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
if (pos < rtems_rfs_file_size (file))
60a30: 206a 001a moveal %a2@(26),%a0 60a34: 4868 007c pea %a0@(124) 60a38: 2f28 0090 movel %a0@(144),%sp@-
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_READ))
printf("rtems-rfs: file-read: handle:%p count:%zd\n", file, count);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
60a3c: 242b 000c movel %a3@(12),%d2 60a40: 262b 0010 movel %a3@(16),%d3 60a44: 4eb9 0005 ad76 jsr 5ad76 <rtems_rfs_block_get_size>
if (pos < rtems_rfs_file_size (file))
60a4a: 508f addql #8,%sp 60a4c: 2a02 movel %d2,%d5 60a4e: 2c03 movel %d3,%d6 60a50: 9c81 subl %d1,%d6 60a52: 9b80 subxl %d0,%d5 60a54: 6400 018e bccw 60be4 <rtems_rfs_rtems_file_read+0x1ea>
{
while (count)
60a58: 4a84 tstl %d4 60a5a: 6700 0188 beqw 60be4 <rtems_rfs_rtems_file_read+0x1ea> 60a5e: 2c0e movel %fp,%d6 60a60: 4285 clrl %d5 60a62: 5986 subql #4,%d6 60a64: 47f9 0005 e1b0 lea 5e1b0 <rtems_rfs_file_io_start>,%a3
break;
if (size > count)
size = count;
memcpy (data, rtems_rfs_file_data (file), size);
60a6a: 4bf9 0006 2df0 lea 62df0 <memcpy>,%a5
data += size;
count -= size;
read += size;
rc = rtems_rfs_file_io_end (file, size, true);
60a70: 49f9 0005 e39c lea 5e39c <rtems_rfs_file_io_end>,%a4
pos = iop->offset;
if (pos < rtems_rfs_file_size (file))
{
while (count)
60a76: 262e 000c movel %fp@(12),%d3
{
size_t size;
rc = rtems_rfs_file_io_start (file, &size, true);
60a7a: 4878 0001 pea 1 <ADD> 60a7e: 2f06 movel %d6,%sp@- 60a80: 2f0a movel %a2,%sp@- 60a82: 4e93 jsr %a3@
if (rc > 0)
60a84: 4fef 000c lea %sp@(12),%sp
{
while (count)
{
size_t size;
rc = rtems_rfs_file_io_start (file, &size, true);
60a88: 2400 movel %d0,%d2
if (rc > 0)
60a8a: 6e00 009c bgtw 60b28 <rtems_rfs_rtems_file_read+0x12e>
{
read = rtems_rfs_rtems_error ("file-read: read: io-start", rc);
break;
}
if (size == 0)
60a8e: 242e fffc movel %fp@(-4),%d2
60a92: 6734 beqs 60ac8 <rtems_rfs_rtems_file_read+0xce> <== NEVER TAKEN
break;
if (size > count)
60a94: b882 cmpl %d2,%d4
60a96: 655e bcss 60af6 <rtems_rfs_rtems_file_read+0xfc> <== NEVER TAKEN
size = count;
memcpy (data, rtems_rfs_file_data (file), size);
60a98: 206a 000a moveal %a2@(10),%a0
}
if (size == 0)
break;
if (size > count)
60a9c: 9882 subl %d2,%d4
memcpy (data, rtems_rfs_file_data (file), size);
data += size;
count -= size;
read += size;
60a9e: da82 addl %d2,%d5
break;
if (size > count)
size = count;
memcpy (data, rtems_rfs_file_data (file), size);
60aa0: 2f02 movel %d2,%sp@- 60aa2: 2068 001e moveal %a0@(30),%a0 60aa6: d1ea 0012 addal %a2@(18),%a0 60aaa: 2f08 movel %a0,%sp@- 60aac: 2f03 movel %d3,%sp@-
data += size;
60aae: d682 addl %d2,%d3
break;
if (size > count)
size = count;
memcpy (data, rtems_rfs_file_data (file), size);
60ab0: 4e95 jsr %a5@
data += size;
count -= size;
read += size;
rc = rtems_rfs_file_io_end (file, size, true);
60ab2: 4878 0001 pea 1 <ADD> 60ab6: 2f02 movel %d2,%sp@- 60ab8: 2f0a movel %a2,%sp@- 60aba: 4e94 jsr %a4@
if (rc > 0)
60abc: 4fef 0018 lea %sp@(24),%sp
data += size;
count -= size;
read += size;
rc = rtems_rfs_file_io_end (file, size, true);
60ac0: 2400 movel %d0,%d2
if (rc > 0)
60ac2: 6e64 bgts 60b28 <rtems_rfs_rtems_file_read+0x12e><== NEVER TAKEN
pos = iop->offset;
if (pos < rtems_rfs_file_size (file))
{
while (count)
60ac4: 4a84 tstl %d4
60ac6: 66b2 bnes 60a7a <rtems_rfs_rtems_file_read+0x80> <== NEVER TAKEN
break;
}
}
}
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
60ac8: 206a 001a moveal %a2@(26),%a0 60acc: 2068 0090 moveal %a0@(144),%a0
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
60ad0: 2468 007c moveal %a0@(124),%a2
rtems_rfs_buffers_release (fs);
60ad4: 2f08 movel %a0,%sp@- 60ad6: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release>
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
60adc: 2f12 movel %a2@,%sp@- 60ade: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL)
60ae4: 508f addql #8,%sp
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
60ae6: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL)
60ae8: 666c bnes 60b56 <rtems_rfs_rtems_file_read+0x15c><== NEVER TAKEN
return read;
}
60aea: 2005 movel %d5,%d0 60aec: 4cee 3c7c ffd8 moveml %fp@(-40),%d2-%d6/%a2-%a5 60af2: 4e5e unlk %fp 60af4: 4e75 rts
break;
if (size > count)
size = count;
memcpy (data, rtems_rfs_file_data (file), size);
60af6: 206a 000a moveal %a2@(10),%a0 <== NOT EXECUTED
if (size == 0)
break;
if (size > count)
size = count;
60afa: 2404 movel %d4,%d2 <== NOT EXECUTED
memcpy (data, rtems_rfs_file_data (file), size);
data += size;
count -= size;
read += size;
60afc: da82 addl %d2,%d5 <== NOT EXECUTED
break;
if (size > count)
size = count;
memcpy (data, rtems_rfs_file_data (file), size);
60afe: 2f02 movel %d2,%sp@- <== NOT EXECUTED 60b00: 2068 001e moveal %a0@(30),%a0 <== NOT EXECUTED 60b04: d1ea 0012 addal %a2@(18),%a0 <== NOT EXECUTED 60b08: 2f08 movel %a0,%sp@- <== NOT EXECUTED
if (size == 0)
break;
if (size > count)
size = count;
60b0a: 2d44 fffc movel %d4,%fp@(-4) <== NOT EXECUTED 60b0e: 4284 clrl %d4 <== NOT EXECUTED
memcpy (data, rtems_rfs_file_data (file), size);
60b10: 2f03 movel %d3,%sp@- <== NOT EXECUTED
data += size;
60b12: d682 addl %d2,%d3 <== NOT EXECUTED
break;
if (size > count)
size = count;
memcpy (data, rtems_rfs_file_data (file), size);
60b14: 4e95 jsr %a5@ <== NOT EXECUTED
data += size;
count -= size;
read += size;
rc = rtems_rfs_file_io_end (file, size, true);
60b16: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 60b1a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 60b1c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 60b1e: 4e94 jsr %a4@ <== NOT EXECUTED
if (rc > 0)
60b20: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
data += size;
count -= size;
read += size;
rc = rtems_rfs_file_io_end (file, size, true);
60b24: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
60b26: 6f9c bles 60ac4 <rtems_rfs_rtems_file_read+0xca> <== NOT EXECUTED
{
read = rtems_rfs_rtems_error ("file-read: read: io-end", rc);
60b28: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 60b2e: 7aff moveq #-1,%d5 <== NOT EXECUTED 60b30: 2040 moveal %d0,%a0 <== NOT EXECUTED 60b32: 2082 movel %d2,%a0@ <== NOT EXECUTED
break;
}
}
}
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
60b34: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED 60b38: 2068 0090 moveal %a0@(144),%a0 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
60b3c: 2468 007c moveal %a0@(124),%a2 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
60b40: 2f08 movel %a0,%sp@- <== NOT EXECUTED 60b42: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
60b48: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 60b4a: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
60b50: 508f addql #8,%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
60b52: 2400 movel %d0,%d2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
60b54: 6794 beqs 60aea <rtems_rfs_rtems_file_read+0xf0> <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
60b56: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 60b5a: 42a7 clrl %sp@- <== NOT EXECUTED 60b5c: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 60b62: 508f addql #8,%sp <== NOT EXECUTED 60b64: 4a00 tstb %d0 <== NOT EXECUTED 60b66: 6782 beqs 60aea <rtems_rfs_rtems_file_read+0xf0> <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
60b68: 2f02 movel %d2,%sp@- <== NOT EXECUTED 60b6a: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 60b70: 2f00 movel %d0,%sp@- <== NOT EXECUTED 60b72: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 60b78: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 60b7e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
return read;
}
60b82: 2005 movel %d5,%d0 <== NOT EXECUTED 60b84: 4cee 3c7c ffd8 moveml %fp@(-40),%d2-%d6/%a2-%a5 <== NOT EXECUTED 60b8a: 4e5e unlk %fp <== NOT EXECUTED 60b8c: 4e75 rts <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
60b8e: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 60b92: 42a7 clrl %sp@- <== NOT EXECUTED 60b94: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 60b9a: 508f addql #8,%sp <== NOT EXECUTED 60b9c: 4a00 tstb %d0 <== NOT EXECUTED 60b9e: 6700 fe90 beqw 60a30 <rtems_rfs_rtems_file_read+0x36> <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
60ba2: 2f02 movel %d2,%sp@- <== NOT EXECUTED 60ba4: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 60baa: 2f00 movel %d0,%sp@- <== NOT EXECUTED 60bac: 4879 0007 2f06 pea 72f06 <ramdisk_ops+0xb28> <== NOT EXECUTED 60bb2: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
if (pos < rtems_rfs_file_size (file))
60bb8: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED 60bbc: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 60bc0: 4868 007c pea %a0@(124) <== NOT EXECUTED 60bc4: 2f28 0090 movel %a0@(144),%sp@- <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_READ))
printf("rtems-rfs: file-read: handle:%p count:%zd\n", file, count);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
60bc8: 242b 000c movel %a3@(12),%d2 <== NOT EXECUTED 60bcc: 262b 0010 movel %a3@(16),%d3 <== NOT EXECUTED 60bd0: 4eb9 0005 ad76 jsr 5ad76 <rtems_rfs_block_get_size> <== NOT EXECUTED
if (pos < rtems_rfs_file_size (file))
60bd6: 508f addql #8,%sp <== NOT EXECUTED 60bd8: 2a02 movel %d2,%d5 <== NOT EXECUTED 60bda: 2c03 movel %d3,%d6 <== NOT EXECUTED 60bdc: 9c81 subl %d1,%d6 <== NOT EXECUTED 60bde: 9b80 subxl %d0,%d5 <== NOT EXECUTED 60be0: 6500 fe76 bcsw 60a58 <rtems_rfs_rtems_file_read+0x5e> <== NOT EXECUTED
break;
}
}
}
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
60be4: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
pos = iop->offset;
if (pos < rtems_rfs_file_size (file))
{
while (count)
60be8: 4285 clrl %d5 <== NOT EXECUTED
break;
}
}
}
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
60bea: 2068 0090 moveal %a0@(144),%a0 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
60bee: 2468 007c moveal %a0@(124),%a2 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
60bf2: 2f08 movel %a0,%sp@- <== NOT EXECUTED 60bf4: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
60bfa: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 60bfc: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
60c02: 508f addql #8,%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
60c04: 2400 movel %d0,%d2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
60c06: 6700 fee2 beqw 60aea <rtems_rfs_rtems_file_read+0xf0> <== NOT EXECUTED 60c0a: 6000 ff4a braw 60b56 <rtems_rfs_rtems_file_read+0x15c><== NOT EXECUTED
00060e5a <rtems_rfs_rtems_file_write>:
*/
static ssize_t
rtems_rfs_rtems_file_write (rtems_libio_t* iop,
const void* buffer,
size_t count)
{
60e5a: 4e56 ffd4 linkw %fp,#-44 60e5e: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 60e62: 266e 0008 moveal %fp@(8),%a3
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
60e66: 42a7 clrl %sp@-
rtems_rfs_file_handle* file = rtems_rfs_rtems_get_iop_file_handle (iop);
60e68: 246b 001c moveal %a3@(28),%a2 60e6c: 42a7 clrl %sp@-
int rc;
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_WRITE))
printf("rtems-rfs: file-write: handle:%p count:%zd\n", file, count);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
60e6e: 206a 001a moveal %a2@(26),%a0
.fpathconf_h = rtems_filesystem_default_fpathconf, .fsync_h = rtems_rfs_rtems_fdatasync, .fdatasync_h = rtems_rfs_rtems_fdatasync, .fcntl_h = rtems_filesystem_default_fcntl, .rmnod_h = rtems_rfs_rtems_rmnod };
60e72: 2068 0090 moveal %a0@(144),%a0 60e76: 2068 007c moveal %a0@(124),%a0 60e7a: 2f10 movel %a0@,%sp@-
*/
static ssize_t
rtems_rfs_rtems_file_write (rtems_libio_t* iop,
const void* buffer,
size_t count)
{
60e7c: 282e 0010 movel %fp@(16),%d4 60e80: 4eb9 0004 af20 jsr 4af20 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
60e86: 4fef 000c lea %sp@(12),%sp
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
60e8a: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL)
60e8c: 6600 016a bnew 60ff8 <rtems_rfs_rtems_file_write+0x19e>
* size of file we are still past the end of the file as positions number
* from 0. For a specific position we need a file that has a length of one
* more.
*/
if (pos >= rtems_rfs_file_size (file))
60e90: 206a 001a moveal %a2@(26),%a0 60e94: 4868 007c pea %a0@(124) 60e98: 49f9 0005 ad76 lea 5ad76 <rtems_rfs_block_get_size>,%a4 60e9e: 2f28 0090 movel %a0@(144),%sp@-
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_WRITE))
printf("rtems-rfs: file-write: handle:%p count:%zd\n", file, count);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
60ea2: 242b 000c movel %a3@(12),%d2 60ea6: 262b 0010 movel %a3@(16),%d3 60eaa: 4e94 jsr %a4@
* size of file we are still past the end of the file as positions number
* from 0. For a specific position we need a file that has a length of one
* more.
*/
if (pos >= rtems_rfs_file_size (file))
60eac: 508f addql #8,%sp 60eae: 2a02 movel %d2,%d5 60eb0: 2c03 movel %d3,%d6 60eb2: 9c81 subl %d1,%d6 60eb4: 9b80 subxl %d0,%d5
60eb6: 651e bcss 60ed6 <rtems_rfs_rtems_file_write+0x7c>
{
rc = rtems_rfs_file_set_size (file, pos + 1);
60eb8: 4280 clrl %d0 60eba: 7201 moveq #1,%d1 60ebc: d283 addl %d3,%d1 60ebe: d182 addxl %d2,%d0 60ec0: 2f01 movel %d1,%sp@- 60ec2: 2f00 movel %d0,%sp@- 60ec4: 2f0a movel %a2,%sp@- 60ec6: 4eb9 0005 e6d2 jsr 5e6d2 <rtems_rfs_file_set_size>
if (rc)
60ecc: 4fef 000c lea %sp@(12),%sp
* more.
*/
if (pos >= rtems_rfs_file_size (file))
{
rc = rtems_rfs_file_set_size (file, pos + 1);
60ed0: 2a00 movel %d0,%d5
if (rc)
60ed2: 6600 0190 bnew 61064 <rtems_rfs_rtems_file_write+0x20a>
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
return rtems_rfs_rtems_error ("file-write: write extend", rc);
}
}
rtems_rfs_file_set_bpos (file, pos);
60ed6: 486a 000e pea %a2@(14) 60eda: 2f03 movel %d3,%sp@- 60edc: 2f02 movel %d2,%sp@- 60ede: 206a 001a moveal %a2@(26),%a0 60ee2: 2f28 0090 movel %a0@(144),%sp@- 60ee6: 4eb9 0005 ac9c jsr 5ac9c <rtems_rfs_block_get_bpos>
while (count)
60eec: 4fef 0010 lea %sp@(16),%sp 60ef0: 4a84 tstl %d4 60ef2: 6700 01e4 beqw 610d8 <rtems_rfs_rtems_file_write+0x27e> 60ef6: 2c0e movel %fp,%d6 60ef8: 4282 clrl %d2 60efa: 5986 subql #4,%d6 60efc: 4bf9 0005 e1b0 lea 5e1b0 <rtems_rfs_file_io_start>,%a5
data += size;
count -= size;
write += size;
rc = rtems_rfs_file_io_end (file, size, false);
60f02: 2e3c 0005 e39c movel #385948,%d7
}
}
rtems_rfs_file_set_bpos (file, pos);
while (count)
60f08: 262e 000c movel %fp@(12),%d3
{
size_t size = count;
rc = rtems_rfs_file_io_start (file, &size, false);
60f0c: 42a7 clrl %sp@- 60f0e: 2f06 movel %d6,%sp@-
rtems_rfs_file_set_bpos (file, pos);
while (count)
{
size_t size = count;
60f10: 2d44 fffc movel %d4,%fp@(-4)
rc = rtems_rfs_file_io_start (file, &size, false);
60f14: 2f0a movel %a2,%sp@- 60f16: 4e95 jsr %a5@
if (rc)
60f18: 4fef 000c lea %sp@(12),%sp
while (count)
{
size_t size = count;
rc = rtems_rfs_file_io_start (file, &size, false);
60f1c: 2a00 movel %d0,%d5
if (rc)
60f1e: 6600 0090 bnew 60fb0 <rtems_rfs_rtems_file_write+0x156>
{
write = rtems_rfs_rtems_error ("file-write: write open", rc);
break;
}
if (size > count)
60f22: 202e fffc movel %fp@(-4),%d0 60f26: b880 cmpl %d0,%d4
60f28: 6406 bccs 60f30 <rtems_rfs_rtems_file_write+0xd6><== NEVER TAKEN
size = count;
60f2a: 2d44 fffc movel %d4,%fp@(-4) 60f2e: 2004 movel %d4,%d0
memcpy (rtems_rfs_file_data (file), data, size);
60f30: 206a 000a moveal %a2@(10),%a0 60f34: 2f00 movel %d0,%sp@- 60f36: 2f03 movel %d3,%sp@- 60f38: 2068 001e moveal %a0@(30),%a0 60f3c: d1ea 0012 addal %a2@(18),%a0 60f40: 2f08 movel %a0,%sp@- 60f42: 4eb9 0006 2df0 jsr 62df0 <memcpy>
data += size;
60f48: 202e fffc movel %fp@(-4),%d0
count -= size;
write += size;
rc = rtems_rfs_file_io_end (file, size, false);
60f4c: 2047 moveal %d7,%a0
if (size > count)
size = count;
memcpy (rtems_rfs_file_data (file), data, size);
data += size;
60f4e: d680 addl %d0,%d3
count -= size;
60f50: 9880 subl %d0,%d4
write += size;
60f52: d480 addl %d0,%d2
rc = rtems_rfs_file_io_end (file, size, false);
60f54: 42a7 clrl %sp@- 60f56: 2f00 movel %d0,%sp@- 60f58: 2f0a movel %a2,%sp@- 60f5a: 4e90 jsr %a0@
if (rc)
60f5c: 4fef 0018 lea %sp@(24),%sp
data += size;
count -= size;
write += size;
rc = rtems_rfs_file_io_end (file, size, false);
60f60: 2a00 movel %d0,%d5
if (rc)
60f62: 664c bnes 60fb0 <rtems_rfs_rtems_file_write+0x156><== NEVER TAKEN
}
}
rtems_rfs_file_set_bpos (file, pos);
while (count)
60f64: 4a84 tstl %d4
60f66: 66a4 bnes 60f0c <rtems_rfs_rtems_file_write+0xb2><== NEVER TAKEN
write = rtems_rfs_rtems_error ("file-write: write close", rc);
break;
}
}
iop->size = rtems_rfs_file_size (file);
60f68: 206a 001a moveal %a2@(26),%a0 60f6c: 4868 007c pea %a0@(124) 60f70: 2f28 0090 movel %a0@(144),%sp@- 60f74: 4e94 jsr %a4@
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
60f76: 206a 001a moveal %a2@(26),%a0 60f7a: 2068 0090 moveal %a0@(144),%a0
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
60f7e: 2468 007c moveal %a0@(124),%a2
write = rtems_rfs_rtems_error ("file-write: write close", rc);
break;
}
}
iop->size = rtems_rfs_file_size (file);
60f82: 2740 0004 movel %d0,%a3@(4) 60f86: 2741 0008 movel %d1,%a3@(8)
rtems_rfs_buffers_release (fs);
60f8a: 2f08 movel %a0,%sp@- 60f8c: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release>
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
60f92: 2f12 movel %a2@,%sp@- 60f94: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL)
60f9a: 4fef 0010 lea %sp@(16),%sp
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
60f9e: 2600 movel %d0,%d3
if (sc != RTEMS_SUCCESSFUL)
60fa0: 6600 0088 bnew 6102a <rtems_rfs_rtems_file_write+0x1d0>
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
return write;
}
60fa4: 2002 movel %d2,%d0 60fa6: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 60fac: 4e5e unlk %fp 60fae: 4e75 rts
write += size;
rc = rtems_rfs_file_io_end (file, size, false);
if (rc)
{
write = rtems_rfs_rtems_error ("file-write: write close", rc);
60fb0: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 60fb6: 74ff moveq #-1,%d2 <== NOT EXECUTED 60fb8: 2040 moveal %d0,%a0 <== NOT EXECUTED 60fba: 2085 movel %d5,%a0@ <== NOT EXECUTED
break;
}
}
iop->size = rtems_rfs_file_size (file);
60fbc: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED 60fc0: 4868 007c pea %a0@(124) <== NOT EXECUTED 60fc4: 2f28 0090 movel %a0@(144),%sp@- <== NOT EXECUTED 60fc8: 4e94 jsr %a4@ <== NOT EXECUTED
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
60fca: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED 60fce: 2068 0090 moveal %a0@(144),%a0 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
60fd2: 2468 007c moveal %a0@(124),%a2 <== NOT EXECUTED
write = rtems_rfs_rtems_error ("file-write: write close", rc);
break;
}
}
iop->size = rtems_rfs_file_size (file);
60fd6: 2740 0004 movel %d0,%a3@(4) <== NOT EXECUTED 60fda: 2741 0008 movel %d1,%a3@(8) <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
60fde: 2f08 movel %a0,%sp@- <== NOT EXECUTED 60fe0: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
60fe6: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 60fe8: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
60fee: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
60ff2: 2600 movel %d0,%d3 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
60ff4: 67ae beqs 60fa4 <rtems_rfs_rtems_file_write+0x14a><== NOT EXECUTED 60ff6: 6032 bras 6102a <rtems_rfs_rtems_file_write+0x1d0><== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
60ff8: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 60ffc: 42a7 clrl %sp@- <== NOT EXECUTED 60ffe: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 61004: 508f addql #8,%sp <== NOT EXECUTED 61006: 4a00 tstb %d0 <== NOT EXECUTED 61008: 6700 fe86 beqw 60e90 <rtems_rfs_rtems_file_write+0x36><== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
6100c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 6100e: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 61014: 2f00 movel %d0,%sp@- <== NOT EXECUTED 61016: 4879 0007 2f06 pea 72f06 <ramdisk_ops+0xb28> <== NOT EXECUTED 6101c: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 61022: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 61026: 6000 fe68 braw 60e90 <rtems_rfs_rtems_file_write+0x36><== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
6102a: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 6102e: 42a7 clrl %sp@- <== NOT EXECUTED 61030: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 61036: 508f addql #8,%sp <== NOT EXECUTED 61038: 4a00 tstb %d0 <== NOT EXECUTED 6103a: 6700 ff68 beqw 60fa4 <rtems_rfs_rtems_file_write+0x14a><== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
6103e: 2f03 movel %d3,%sp@- <== NOT EXECUTED 61040: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 61046: 2f00 movel %d0,%sp@- <== NOT EXECUTED 61048: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 6104e: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 61054: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
return write;
}
61058: 2002 movel %d2,%d0 <== NOT EXECUTED 6105a: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 61060: 4e5e unlk %fp <== NOT EXECUTED 61062: 4e75 rts <== NOT EXECUTED
if (pos >= rtems_rfs_file_size (file))
{
rc = rtems_rfs_file_set_size (file, pos + 1);
if (rc)
{
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
61064: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED 61068: 2068 0090 moveal %a0@(144),%a0 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
6106c: 2468 007c moveal %a0@(124),%a2 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
61070: 2f08 movel %a0,%sp@- <== NOT EXECUTED 61072: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
61078: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 6107a: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
61080: 508f addql #8,%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
61082: 2400 movel %d0,%d2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
61084: 6618 bnes 6109e <rtems_rfs_rtems_file_write+0x244><== NOT EXECUTED
return rtems_rfs_rtems_error ("file-write: write extend", rc);
61086: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 6108c: 74ff moveq #-1,%d2 <== NOT EXECUTED 6108e: 2040 moveal %d0,%a0 <== NOT EXECUTED 61090: 2085 movel %d5,%a0@ <== NOT EXECUTED
iop->size = rtems_rfs_file_size (file);
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
return write;
}
61092: 2002 movel %d2,%d0 <== NOT EXECUTED 61094: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 6109a: 4e5e unlk %fp <== NOT EXECUTED 6109c: 4e75 rts <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
6109e: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 610a2: 42a7 clrl %sp@- <== NOT EXECUTED 610a4: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 610aa: 508f addql #8,%sp <== NOT EXECUTED 610ac: 4a00 tstb %d0 <== NOT EXECUTED 610ae: 67d6 beqs 61086 <rtems_rfs_rtems_file_write+0x22c><== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
610b0: 2f02 movel %d2,%sp@- <== NOT EXECUTED
{
rc = rtems_rfs_file_set_size (file, pos + 1);
if (rc)
{
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
return rtems_rfs_rtems_error ("file-write: write extend", rc);
610b2: 74ff moveq #-1,%d2 <== NOT EXECUTED 610b4: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 610ba: 2f00 movel %d0,%sp@- <== NOT EXECUTED 610bc: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 610c2: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 610c8: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 610cc: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 610d2: 2040 moveal %d0,%a0 <== NOT EXECUTED 610d4: 2085 movel %d5,%a0@ <== NOT EXECUTED 610d6: 60ba bras 61092 <rtems_rfs_rtems_file_write+0x238><== NOT EXECUTED
write = rtems_rfs_rtems_error ("file-write: write close", rc);
break;
}
}
iop->size = rtems_rfs_file_size (file);
610d8: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED 610dc: 4868 007c pea %a0@(124) <== NOT EXECUTED
size_t count)
{
rtems_rfs_file_handle* file = rtems_rfs_rtems_get_iop_file_handle (iop);
rtems_rfs_pos pos;
const uint8_t* data = buffer;
ssize_t write = 0;
610e0: 4282 clrl %d2 <== NOT EXECUTED 610e2: 2f28 0090 movel %a0@(144),%sp@- <== NOT EXECUTED 610e6: 4e94 jsr %a4@ <== NOT EXECUTED
}
}
iop->size = rtems_rfs_file_size (file);
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
610e8: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED 610ec: 2068 0090 moveal %a0@(144),%a0 <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
610f0: 2468 007c moveal %a0@(124),%a2 <== NOT EXECUTED
write = rtems_rfs_rtems_error ("file-write: write close", rc);
break;
}
}
iop->size = rtems_rfs_file_size (file);
610f4: 2740 0004 movel %d0,%a3@(4) <== NOT EXECUTED 610f8: 2741 0008 movel %d1,%a3@(8) <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
610fc: 2f08 movel %a0,%sp@- <== NOT EXECUTED 610fe: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
61104: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 61106: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
6110c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
61110: 2600 movel %d0,%d3 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
61112: 6700 fe90 beqw 60fa4 <rtems_rfs_rtems_file_write+0x14a><== NOT EXECUTED 61116: 6000 ff12 braw 6102a <rtems_rfs_rtems_file_write+0x1d0><== NOT EXECUTED
000517ee <rtems_rfs_rtems_fstat>:
}
int
rtems_rfs_rtems_fstat (rtems_filesystem_location_info_t* pathloc,
struct stat* buf)
{
517ee: 4e56 ffb4 linkw %fp,#-76 517f2: 206e 0008 moveal %fp@(8),%a0
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
517f6: 2268 0010 moveal %a0@(16),%a1
}
int
rtems_rfs_rtems_fstat (rtems_filesystem_location_info_t* pathloc,
struct stat* buf)
{
517fa: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
517fe: 2669 0034 moveal %a1@(52),%a3
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
51802: 42a7 clrl %sp@-
}
int
rtems_rfs_rtems_fstat (rtems_filesystem_location_info_t* pathloc,
struct stat* buf)
{
51804: 246e 000c moveal %fp@(12),%a2 51808: 42a7 clrl %sp@-
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
return rtems_rfs_rtems_error ("shutdown: close", rc);
}
5180a: 226b 007c moveal %a3@(124),%a1 5180e: 2f11 movel %a1@,%sp@-
int
rtems_rfs_rtems_fstat (rtems_filesystem_location_info_t* pathloc,
struct stat* buf)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
51810: 2610 movel %a0@,%d3 51812: 4eb9 0004 af20 jsr 4af20 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
51818: 4fef 000c lea %sp@(12),%sp
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
5181c: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL)
5181e: 6600 0166 bnew 51986 <rtems_rfs_rtems_fstat+0x198>
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_STAT))
printf ("rtems-rfs-rtems: stat: in: ino:%" PRId32 "\n", ino);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
51822: 4878 0001 pea 1 <ADD> 51826: 49ee ffda lea %fp@(-38),%a4 5182a: 2f0c movel %a4,%sp@- 5182c: 2f03 movel %d3,%sp@- 5182e: 2f0b movel %a3,%sp@- 51830: 4eb9 0005 0300 jsr 50300 <rtems_rfs_inode_open>
if (rc)
51836: 4fef 0010 lea %sp@(16),%sp
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_STAT))
printf ("rtems-rfs-rtems: stat: in: ino:%" PRId32 "\n", ino);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
5183a: 2400 movel %d0,%d2
if (rc)
5183c: 6600 0194 bnew 519d2 <rtems_rfs_rtems_fstat+0x1e4>
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("stat: opening inode", rc);
}
mode = rtems_rfs_inode_get_mode (&inode);
51840: 206c 000c moveal %a4@(12),%a0
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
51844: 4280 clrl %d0 51846: 1028 0002 moveb %a0@(2),%d0 5184a: 4281 clrl %d1 5184c: 1228 0003 moveb %a0@(3),%d1 51850: e188 lsll #8,%d0
if (RTEMS_RFS_S_ISCHR (mode) || RTEMS_RFS_S_ISBLK (mode))
51852: 8081 orl %d1,%d0 51854: 2200 movel %d0,%d1 51856: 0281 0000 f000 andil #61440,%d1 5185c: 0c81 0000 2000 cmpil #8192,%d1 51862: 6700 01f4 beqw 51a58 <rtems_rfs_rtems_fstat+0x26a> 51866: 0c81 0000 6000 cmpil #24576,%d1 5186c: 6700 01ea beqw 51a58 <rtems_rfs_rtems_fstat+0x26a>
buf->st_rdev =
rtems_filesystem_make_dev_t (rtems_rfs_inode_get_block (&inode, 0),
rtems_rfs_inode_get_block (&inode, 1));
}
buf->st_dev = rtems_rfs_fs_device (fs);
51870: 206b 000c moveal %a3@(12),%a0 51874: 2210 movel %a0@,%d1 51876: 2428 0004 movel %a0@(4),%d2
buf->st_ino = rtems_rfs_inode_ino (&inode);
5187a: 256e ffe2 0008 movel %fp@(-30),%a2@(8)
buf->st_rdev =
rtems_filesystem_make_dev_t (rtems_rfs_inode_get_block (&inode, 0),
rtems_rfs_inode_get_block (&inode, 1));
}
buf->st_dev = rtems_rfs_fs_device (fs);
51880: 2481 movel %d1,%a2@ 51882: 2542 0004 movel %d2,%a2@(4)
* @return uint16_t The group id (gid).
*/
static inline uint16_t
rtems_rfs_inode_get_gid (rtems_rfs_inode_handle* handle)
{
return (rtems_rfs_read_u32 (&handle->node->owner) >> 16) & 0xffff;
51886: 7418 moveq #24,%d2
buf->st_ino = rtems_rfs_inode_ino (&inode); buf->st_mode = rtems_rfs_rtems_mode (mode);
51888: 2f00 movel %d0,%sp@- 5188a: 4eb9 0005 37b2 jsr 537b2 <rtems_rfs_rtems_mode>
buf->st_nlink = rtems_rfs_inode_get_links (&inode);
51890: 206c 000c moveal %a4@(12),%a0
*/
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
51894: 4281 clrl %d1
rtems_rfs_inode_get_block (&inode, 1));
}
buf->st_dev = rtems_rfs_fs_device (fs);
buf->st_ino = rtems_rfs_inode_ino (&inode);
buf->st_mode = rtems_rfs_rtems_mode (mode);
51896: 2540 000c movel %d0,%a2@(12) 5189a: 4280 clrl %d0 5189c: 1010 moveb %a0@,%d0 5189e: 1228 0001 moveb %a0@(1),%d1 518a2: e188 lsll #8,%d0 518a4: 8081 orl %d1,%d0
if (links == 0xffff)
518a6: 3200 movew %d0,%d1
links = 0;
518a8: 0c81 0000 ffff cmpil #65535,%d1 518ae: 56c1 sne %d1 518b0: 4881 extw %d1 518b2: c081 andl %d1,%d0
* @return uint16_t The user id (uid).
*/
static inline uint16_t
rtems_rfs_inode_get_uid (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->owner) & 0xffff;
518b4: 4281 clrl %d1
buf->st_nlink = rtems_rfs_inode_get_links (&inode);
518b6: 3540 0010 movew %d0,%a2@(16) 518ba: 4280 clrl %d0 518bc: 1028 0006 moveb %a0@(6),%d0 518c0: 1228 0007 moveb %a0@(7),%d1 518c4: e188 lsll #8,%d0 518c6: 8081 orl %d1,%d0
buf->st_uid = rtems_rfs_inode_get_uid (&inode);
518c8: 3540 0012 movew %d0,%a2@(18)
* @return uint16_t The group id (gid).
*/
static inline uint16_t
rtems_rfs_inode_get_gid (rtems_rfs_inode_handle* handle)
{
return (rtems_rfs_read_u32 (&handle->node->owner) >> 16) & 0xffff;
518cc: 4280 clrl %d0 518ce: 1028 0004 moveb %a0@(4),%d0 518d2: 1228 0005 moveb %a0@(5),%d1 518d6: e5a8 lsll %d2,%d0 518d8: 4841 swap %d1 518da: 4241 clrw %d1
/*
* Need to check is the ino is an open file. If so we take the values from
* the open file rather than the inode.
*/
shared = rtems_rfs_file_get_shared (fs, rtems_rfs_inode_ino (&inode));
518dc: 2eae ffe2 movel %fp@(-30),%sp@ 518e0: 8081 orl %d1,%d0 518e2: 2f0b movel %a3,%sp@- 518e4: 4240 clrw %d0 518e6: 4840 swap %d0 518e8: 3540 0014 movew %d0,%a2@(20) 518ec: 4eb9 0005 ea1a jsr 5ea1a <rtems_rfs_file_get_shared>
if (shared)
518f2: 508f addql #8,%sp
/*
* Need to check is the ino is an open file. If so we take the values from
* the open file rather than the inode.
*/
shared = rtems_rfs_file_get_shared (fs, rtems_rfs_inode_ino (&inode));
518f4: 2040 moveal %d0,%a0
if (shared)
518f6: 4a80 tstl %d0 518f8: 6700 0242 beqw 51b3c <rtems_rfs_rtems_fstat+0x34e>
buf->st_atime = rtems_rfs_file_shared_get_atime (shared);
buf->st_mtime = rtems_rfs_file_shared_get_mtime (shared);
buf->st_ctime = rtems_rfs_file_shared_get_ctime (shared);
buf->st_blocks = rtems_rfs_file_shared_get_block_count (shared);
if (S_ISLNK (buf->st_mode))
518fc: 202a 000c movel %a2@(12),%d0 <== NOT EXECUTED
*/
shared = rtems_rfs_file_get_shared (fs, rtems_rfs_inode_ino (&inode));
if (shared)
{
buf->st_atime = rtems_rfs_file_shared_get_atime (shared);
51900: 2568 0084 0026 movel %a0@(132),%a2@(38) <== NOT EXECUTED
buf->st_mtime = rtems_rfs_file_shared_get_mtime (shared);
51906: 2568 0088 002e movel %a0@(136),%a2@(46) <== NOT EXECUTED
buf->st_ctime = rtems_rfs_file_shared_get_ctime (shared);
5190c: 2568 008c 0036 movel %a0@(140),%a2@(54) <== NOT EXECUTED
buf->st_blocks = rtems_rfs_file_shared_get_block_count (shared);
51912: 2568 007c 0042 movel %a0@(124),%a2@(66) <== NOT EXECUTED
if (S_ISLNK (buf->st_mode))
51918: 0280 0000 f000 andil #61440,%d0 <== NOT EXECUTED 5191e: 0c80 0000 a000 cmpil #40960,%d0 <== NOT EXECUTED 51924: 6700 0104 beqw 51a2a <rtems_rfs_rtems_fstat+0x23c> <== NOT EXECUTED
*/
static inline rtems_rfs_pos
rtems_rfs_file_shared_get_size (rtems_rfs_file_system* fs,
rtems_rfs_file_shared* shared)
{
return rtems_rfs_block_get_size (fs, &shared->size);
51928: 4868 007c pea %a0@(124) <== NOT EXECUTED 5192c: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5192e: 4eb9 0005 ad76 jsr 5ad76 <rtems_rfs_block_get_size> <== NOT EXECUTED
buf->st_size = rtems_rfs_inode_get_block_offset (&inode);
else
buf->st_size = rtems_rfs_inode_get_size (fs, &inode);
}
buf->st_blksize = rtems_rfs_fs_block_size (fs);
51934: 256b 0008 003e movel %a3@(8),%a2@(62) <== NOT EXECUTED
buf->st_blocks = rtems_rfs_file_shared_get_block_count (shared);
if (S_ISLNK (buf->st_mode))
buf->st_size = rtems_rfs_file_shared_get_block_offset (shared);
else
buf->st_size = rtems_rfs_file_shared_get_size (fs, shared);
5193a: 508f addql #8,%sp <== NOT EXECUTED 5193c: 2540 001e movel %d0,%a2@(30) <== NOT EXECUTED 51940: 2541 0022 movel %d1,%a2@(34) <== NOT EXECUTED
buf->st_size = rtems_rfs_inode_get_size (fs, &inode);
}
buf->st_blksize = rtems_rfs_fs_block_size (fs);
rc = rtems_rfs_inode_close (fs, &inode);
51944: 2f0c movel %a4,%sp@- <== NOT EXECUTED 51946: 2f0b movel %a3,%sp@- <== NOT EXECUTED 51948: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
5194e: 246b 007c moveal %a3@(124),%a2 <== NOT EXECUTED 51952: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
51954: 508f addql #8,%sp <== NOT EXECUTED 51956: 6f00 02de blew 51c36 <rtems_rfs_rtems_fstat+0x448> <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
5195a: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5195c: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
51962: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 51964: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
5196a: 508f addql #8,%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
5196c: 2600 movel %d0,%d3 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
5196e: 667c bnes 519ec <rtems_rfs_rtems_fstat+0x1fe> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("stat: closing inode", rc);
51970: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 51976: 2040 moveal %d0,%a0 <== NOT EXECUTED 51978: 70ff moveq #-1,%d0 <== NOT EXECUTED 5197a: 2082 movel %d2,%a0@ <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
5197c: 4cee 1cfc ffb4 moveml %fp@(-76),%d2-%d7/%a2-%a4 <== NOT EXECUTED 51982: 4e5e unlk %fp <== NOT EXECUTED 51984: 4e75 rts <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
51986: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 5198a: 42a7 clrl %sp@- <== NOT EXECUTED 5198c: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 51992: 508f addql #8,%sp <== NOT EXECUTED 51994: 4a00 tstb %d0 <== NOT EXECUTED 51996: 6700 fe8a beqw 51822 <rtems_rfs_rtems_fstat+0x34> <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
5199a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_STAT))
printf ("rtems-rfs-rtems: stat: in: ino:%" PRId32 "\n", ino);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
5199c: 49ee ffda lea %fp@(-38),%a4 <== NOT EXECUTED 519a0: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 519a6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 519a8: 4879 0007 2f06 pea 72f06 <ramdisk_ops+0xb28> <== NOT EXECUTED 519ae: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 519b4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 519b8: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 519bc: 2f0c movel %a4,%sp@- <== NOT EXECUTED 519be: 2f03 movel %d3,%sp@- <== NOT EXECUTED 519c0: 2f0b movel %a3,%sp@- <== NOT EXECUTED 519c2: 4eb9 0005 0300 jsr 50300 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc)
519c8: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_STAT))
printf ("rtems-rfs-rtems: stat: in: ino:%" PRId32 "\n", ino);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
519cc: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc)
519ce: 6700 fe70 beqw 51840 <rtems_rfs_rtems_fstat+0x52> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
519d2: 246b 007c moveal %a3@(124),%a2 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
519d6: 2f0b movel %a3,%sp@- <== NOT EXECUTED 519d8: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
519de: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 519e0: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
519e6: 508f addql #8,%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
519e8: 2600 movel %d0,%d3 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
519ea: 6784 beqs 51970 <rtems_rfs_rtems_fstat+0x182> <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
519ec: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 519f0: 42a7 clrl %sp@- <== NOT EXECUTED 519f2: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 519f8: 508f addql #8,%sp <== NOT EXECUTED 519fa: 4a00 tstb %d0 <== NOT EXECUTED 519fc: 6700 ff72 beqw 51970 <rtems_rfs_rtems_fstat+0x182> <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
51a00: 2f03 movel %d3,%sp@- <== NOT EXECUTED 51a02: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 51a08: 2f00 movel %d0,%sp@- <== NOT EXECUTED 51a0a: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 51a10: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 51a16: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
if (rc > 0)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("stat: closing inode", rc);
51a1a: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 51a20: 2040 moveal %d0,%a0 <== NOT EXECUTED 51a22: 70ff moveq #-1,%d0 <== NOT EXECUTED 51a24: 2082 movel %d2,%a0@ <== NOT EXECUTED 51a26: 6000 ff54 braw 5197c <rtems_rfs_rtems_fstat+0x18e> <== NOT EXECUTED
buf->st_mtime = rtems_rfs_file_shared_get_mtime (shared);
buf->st_ctime = rtems_rfs_file_shared_get_ctime (shared);
buf->st_blocks = rtems_rfs_file_shared_get_block_count (shared);
if (S_ISLNK (buf->st_mode))
buf->st_size = rtems_rfs_file_shared_get_block_offset (shared);
51a2a: 4280 clrl %d0 <== NOT EXECUTED 51a2c: 3028 0082 movew %a0@(130),%d0 <== NOT EXECUTED
buf->st_size = rtems_rfs_inode_get_block_offset (&inode);
else
buf->st_size = rtems_rfs_inode_get_size (fs, &inode);
}
buf->st_blksize = rtems_rfs_fs_block_size (fs);
51a30: 256b 0008 003e movel %a3@(8),%a2@(62) <== NOT EXECUTED
buf->st_mtime = rtems_rfs_file_shared_get_mtime (shared);
buf->st_ctime = rtems_rfs_file_shared_get_ctime (shared);
buf->st_blocks = rtems_rfs_file_shared_get_block_count (shared);
if (S_ISLNK (buf->st_mode))
buf->st_size = rtems_rfs_file_shared_get_block_offset (shared);
51a36: 42aa 001e clrl %a2@(30) <== NOT EXECUTED 51a3a: 2540 0022 movel %d0,%a2@(34) <== NOT EXECUTED
buf->st_size = rtems_rfs_inode_get_size (fs, &inode);
}
buf->st_blksize = rtems_rfs_fs_block_size (fs);
rc = rtems_rfs_inode_close (fs, &inode);
51a3e: 2f0c movel %a4,%sp@- <== NOT EXECUTED 51a40: 2f0b movel %a3,%sp@- <== NOT EXECUTED 51a42: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
51a48: 246b 007c moveal %a3@(124),%a2 <== NOT EXECUTED 51a4c: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
51a4e: 508f addql #8,%sp <== NOT EXECUTED 51a50: 6e00 ff08 bgtw 5195a <rtems_rfs_rtems_fstat+0x16c> <== NOT EXECUTED 51a54: 6000 01e0 braw 51c36 <rtems_rfs_rtems_fstat+0x448> <== NOT EXECUTED
* @return uint32_t The block number.
*/
static inline uint32_t
rtems_rfs_inode_get_block (rtems_rfs_inode_handle* handle, int block)
{
return rtems_rfs_read_u32 (&handle->node->data.blocks[block]);
51a58: 4282 clrl %d2 <== NOT EXECUTED 51a5a: 4281 clrl %d1 <== NOT EXECUTED 51a5c: 1428 0020 moveb %a0@(32),%d2 <== NOT EXECUTED 51a60: 1228 001c moveb %a0@(28),%d1 <== NOT EXECUTED 51a64: 7618 moveq #24,%d3 <== NOT EXECUTED 51a66: 4286 clrl %d6 <== NOT EXECUTED 51a68: 4285 clrl %d5 <== NOT EXECUTED 51a6a: 1c28 0021 moveb %a0@(33),%d6 <== NOT EXECUTED 51a6e: 1a28 001d moveb %a0@(29),%d5 <== NOT EXECUTED 51a72: 4284 clrl %d4 <== NOT EXECUTED 51a74: 4287 clrl %d7 <== NOT EXECUTED 51a76: 1828 0022 moveb %a0@(34),%d4 <== NOT EXECUTED 51a7a: 1e28 001f moveb %a0@(31),%d7 <== NOT EXECUTED 51a7e: e7aa lsll %d3,%d2 <== NOT EXECUTED 51a80: e7a9 lsll %d3,%d1 <== NOT EXECUTED 51a82: 4283 clrl %d3 <== NOT EXECUTED 51a84: 1628 0023 moveb %a0@(35),%d3 <== NOT EXECUTED 51a88: 2243 moveal %d3,%a1 <== NOT EXECUTED 51a8a: 1628 001e moveb %a0@(30),%d3 <== NOT EXECUTED 51a8e: 4845 swap %d5 <== NOT EXECUTED 51a90: 4245 clrw %d5 <== NOT EXECUTED 51a92: 4846 swap %d6 <== NOT EXECUTED 51a94: 4246 clrw %d6 <== NOT EXECUTED 51a96: e18c lsll #8,%d4 <== NOT EXECUTED 51a98: 8285 orl %d5,%d1 <== NOT EXECUTED 51a9a: 2a09 movel %a1,%d5 <== NOT EXECUTED 51a9c: 8486 orl %d6,%d2 <== NOT EXECUTED 51a9e: 8287 orl %d7,%d1 <== NOT EXECUTED 51aa0: e18b lsll #8,%d3 <== NOT EXECUTED
buf->st_rdev =
rtems_filesystem_make_dev_t (rtems_rfs_inode_get_block (&inode, 0),
rtems_rfs_inode_get_block (&inode, 1));
}
buf->st_dev = rtems_rfs_fs_device (fs);
51aa2: 206b 000c moveal %a3@(12),%a0 <== NOT EXECUTED 51aa6: 8485 orl %d5,%d2 <== NOT EXECUTED
mode = rtems_rfs_inode_get_mode (&inode);
if (RTEMS_RFS_S_ISCHR (mode) || RTEMS_RFS_S_ISBLK (mode))
{
buf->st_rdev =
51aa8: 8283 orl %d3,%d1 <== NOT EXECUTED 51aaa: 8484 orl %d4,%d2 <== NOT EXECUTED 51aac: 2541 0016 movel %d1,%a2@(22) <== NOT EXECUTED 51ab0: 2542 001a movel %d2,%a2@(26) <== NOT EXECUTED
rtems_filesystem_make_dev_t (rtems_rfs_inode_get_block (&inode, 0),
rtems_rfs_inode_get_block (&inode, 1));
}
buf->st_dev = rtems_rfs_fs_device (fs);
51ab4: 2210 movel %a0@,%d1 <== NOT EXECUTED 51ab6: 2428 0004 movel %a0@(4),%d2 <== NOT EXECUTED
buf->st_ino = rtems_rfs_inode_ino (&inode);
51aba: 256e ffe2 0008 movel %fp@(-30),%a2@(8) <== NOT EXECUTED
buf->st_rdev =
rtems_filesystem_make_dev_t (rtems_rfs_inode_get_block (&inode, 0),
rtems_rfs_inode_get_block (&inode, 1));
}
buf->st_dev = rtems_rfs_fs_device (fs);
51ac0: 2481 movel %d1,%a2@ <== NOT EXECUTED 51ac2: 2542 0004 movel %d2,%a2@(4) <== NOT EXECUTED
* @return uint16_t The group id (gid).
*/
static inline uint16_t
rtems_rfs_inode_get_gid (rtems_rfs_inode_handle* handle)
{
return (rtems_rfs_read_u32 (&handle->node->owner) >> 16) & 0xffff;
51ac6: 7418 moveq #24,%d2 <== NOT EXECUTED
buf->st_ino = rtems_rfs_inode_ino (&inode); buf->st_mode = rtems_rfs_rtems_mode (mode);
51ac8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 51aca: 4eb9 0005 37b2 jsr 537b2 <rtems_rfs_rtems_mode> <== NOT EXECUTED
buf->st_nlink = rtems_rfs_inode_get_links (&inode);
51ad0: 206c 000c moveal %a4@(12),%a0 <== NOT EXECUTED
*/
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
51ad4: 4281 clrl %d1 <== NOT EXECUTED
rtems_rfs_inode_get_block (&inode, 1));
}
buf->st_dev = rtems_rfs_fs_device (fs);
buf->st_ino = rtems_rfs_inode_ino (&inode);
buf->st_mode = rtems_rfs_rtems_mode (mode);
51ad6: 2540 000c movel %d0,%a2@(12) <== NOT EXECUTED 51ada: 4280 clrl %d0 <== NOT EXECUTED 51adc: 1010 moveb %a0@,%d0 <== NOT EXECUTED 51ade: 1228 0001 moveb %a0@(1),%d1 <== NOT EXECUTED 51ae2: e188 lsll #8,%d0 <== NOT EXECUTED 51ae4: 8081 orl %d1,%d0 <== NOT EXECUTED
if (links == 0xffff)
51ae6: 3200 movew %d0,%d1 <== NOT EXECUTED
links = 0;
51ae8: 0c81 0000 ffff cmpil #65535,%d1 <== NOT EXECUTED 51aee: 56c1 sne %d1 <== NOT EXECUTED 51af0: 4881 extw %d1 <== NOT EXECUTED 51af2: c081 andl %d1,%d0 <== NOT EXECUTED
* @return uint16_t The user id (uid).
*/
static inline uint16_t
rtems_rfs_inode_get_uid (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->owner) & 0xffff;
51af4: 4281 clrl %d1 <== NOT EXECUTED
buf->st_nlink = rtems_rfs_inode_get_links (&inode);
51af6: 3540 0010 movew %d0,%a2@(16) <== NOT EXECUTED 51afa: 4280 clrl %d0 <== NOT EXECUTED 51afc: 1028 0006 moveb %a0@(6),%d0 <== NOT EXECUTED 51b00: 1228 0007 moveb %a0@(7),%d1 <== NOT EXECUTED 51b04: e188 lsll #8,%d0 <== NOT EXECUTED 51b06: 8081 orl %d1,%d0 <== NOT EXECUTED
buf->st_uid = rtems_rfs_inode_get_uid (&inode);
51b08: 3540 0012 movew %d0,%a2@(18) <== NOT EXECUTED
* @return uint16_t The group id (gid).
*/
static inline uint16_t
rtems_rfs_inode_get_gid (rtems_rfs_inode_handle* handle)
{
return (rtems_rfs_read_u32 (&handle->node->owner) >> 16) & 0xffff;
51b0c: 4280 clrl %d0 <== NOT EXECUTED 51b0e: 1028 0004 moveb %a0@(4),%d0 <== NOT EXECUTED 51b12: 1228 0005 moveb %a0@(5),%d1 <== NOT EXECUTED 51b16: e5a8 lsll %d2,%d0 <== NOT EXECUTED 51b18: 4841 swap %d1 <== NOT EXECUTED 51b1a: 4241 clrw %d1 <== NOT EXECUTED
/*
* Need to check is the ino is an open file. If so we take the values from
* the open file rather than the inode.
*/
shared = rtems_rfs_file_get_shared (fs, rtems_rfs_inode_ino (&inode));
51b1c: 2eae ffe2 movel %fp@(-30),%sp@ <== NOT EXECUTED 51b20: 8081 orl %d1,%d0 <== NOT EXECUTED 51b22: 2f0b movel %a3,%sp@- <== NOT EXECUTED 51b24: 4240 clrw %d0 <== NOT EXECUTED 51b26: 4840 swap %d0 <== NOT EXECUTED 51b28: 3540 0014 movew %d0,%a2@(20) <== NOT EXECUTED 51b2c: 4eb9 0005 ea1a jsr 5ea1a <rtems_rfs_file_get_shared> <== NOT EXECUTED
if (shared)
51b32: 508f addql #8,%sp <== NOT EXECUTED
/*
* Need to check is the ino is an open file. If so we take the values from
* the open file rather than the inode.
*/
shared = rtems_rfs_file_get_shared (fs, rtems_rfs_inode_ino (&inode));
51b34: 2040 moveal %d0,%a0 <== NOT EXECUTED
if (shared)
51b36: 4a80 tstl %d0 <== NOT EXECUTED 51b38: 6600 fdc2 bnew 518fc <rtems_rfs_rtems_fstat+0x10e> <== NOT EXECUTED
else
buf->st_size = rtems_rfs_file_shared_get_size (fs, shared);
}
else
{
buf->st_atime = rtems_rfs_inode_get_atime (&inode);
51b3c: 206c 000c moveal %a4@(12),%a0
* @return rtems_rfs_time The atime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_atime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->atime);
51b40: 4280 clrl %d0 51b42: 4282 clrl %d2 51b44: 1028 0010 moveb %a0@(16),%d0 51b48: 1428 0011 moveb %a0@(17),%d2 51b4c: 7618 moveq #24,%d3 51b4e: 4281 clrl %d1 51b50: 1228 0012 moveb %a0@(18),%d1
* @return rtems_rfs_time The mtime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_mtime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->mtime);
51b54: 7a18 moveq #24,%d5 51b56: 4284 clrl %d4
* @return rtems_rfs_time The atime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_atime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->atime);
51b58: e7a8 lsll %d3,%d0 51b5a: 4842 swap %d2 51b5c: 4242 clrw %d2 51b5e: 4283 clrl %d3 51b60: 1628 0013 moveb %a0@(19),%d3 51b64: 8082 orl %d2,%d0 51b66: e189 lsll #8,%d1
* @return rtems_rfs_time The mtime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_mtime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->mtime);
51b68: 4282 clrl %d2
* @return rtems_rfs_time The atime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_atime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->atime);
51b6a: 8083 orl %d3,%d0
buf->st_mtime = rtems_rfs_inode_get_mtime (&inode);
buf->st_ctime = rtems_rfs_inode_get_ctime (&inode);
buf->st_blocks = rtems_rfs_inode_get_block_count (&inode);
if (S_ISLNK (buf->st_mode))
51b6c: 262a 000c movel %a2@(12),%d3 51b70: 8081 orl %d1,%d0
* @return rtems_rfs_time The mtime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_mtime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->mtime);
51b72: 4281 clrl %d1
* @return rtems_rfs_time The atime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_atime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->atime);
51b74: 2540 0026 movel %d0,%a2@(38)
* @return rtems_rfs_time The mtime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_mtime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->mtime);
51b78: 4280 clrl %d0 51b7a: 1028 0014 moveb %a0@(20),%d0 51b7e: 1428 0015 moveb %a0@(21),%d2 51b82: 1828 0017 moveb %a0@(23),%d4 51b86: 1228 0016 moveb %a0@(22),%d1 51b8a: 4842 swap %d2 51b8c: 4242 clrw %d2 51b8e: eba8 lsll %d5,%d0 51b90: e189 lsll #8,%d1 51b92: 0283 0000 f000 andil #61440,%d3 51b98: 8082 orl %d2,%d0
* @return rtems_rfs_time The ctime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_ctime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->ctime);
51b9a: 4282 clrl %d2
* @return rtems_rfs_time The mtime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_mtime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->mtime);
51b9c: 8084 orl %d4,%d0 51b9e: 8081 orl %d1,%d0
* @return rtems_rfs_time The ctime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_ctime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->ctime);
51ba0: 4281 clrl %d1
* @return rtems_rfs_time The mtime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_mtime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->mtime);
51ba2: 2540 002e movel %d0,%a2@(46)
* @return rtems_rfs_time The ctime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_ctime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->ctime);
51ba6: 4280 clrl %d0 51ba8: 1028 0018 moveb %a0@(24),%d0 51bac: 1428 0019 moveb %a0@(25),%d2 51bb0: 1828 001b moveb %a0@(27),%d4 51bb4: 1228 001a moveb %a0@(26),%d1 51bb8: 4842 swap %d2 51bba: 4242 clrw %d2 51bbc: eba8 lsll %d5,%d0 51bbe: e189 lsll #8,%d1 51bc0: 8082 orl %d2,%d0
* @return uint32_t The block count.
*/
static inline uint32_t
rtems_rfs_inode_get_block_count (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->block_count);
51bc2: 4282 clrl %d2
* @return rtems_rfs_time The ctime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_ctime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->ctime);
51bc4: 8084 orl %d4,%d0 51bc6: 8081 orl %d1,%d0
* @return uint32_t The block count.
*/
static inline uint32_t
rtems_rfs_inode_get_block_count (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->block_count);
51bc8: 4281 clrl %d1
* @return rtems_rfs_time The ctime.
*/
static inline rtems_rfs_time
rtems_rfs_inode_get_ctime (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->ctime);
51bca: 2540 0036 movel %d0,%a2@(54)
* @return uint32_t The block count.
*/
static inline uint32_t
rtems_rfs_inode_get_block_count (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->block_count);
51bce: 4280 clrl %d0 51bd0: 1028 000c moveb %a0@(12),%d0 51bd4: 1428 000d moveb %a0@(13),%d2 51bd8: 1828 000f moveb %a0@(15),%d4 51bdc: 1228 000e moveb %a0@(14),%d1 51be0: eba8 lsll %d5,%d0 51be2: 4842 swap %d2 51be4: 4242 clrw %d2 51be6: e189 lsll #8,%d1 51be8: 8082 orl %d2,%d0 51bea: 8084 orl %d4,%d0 51bec: 8081 orl %d1,%d0 51bee: 2540 0042 movel %d0,%a2@(66) 51bf2: 0c83 0000 a000 cmpil #40960,%d3 51bf8: 6600 0096 bnew 51c90 <rtems_rfs_rtems_fstat+0x4a2>
* @return uint32_t The block offset.
*/
static inline uint16_t
rtems_rfs_inode_get_block_offset (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->block_offset);
51bfc: 4280 clrl %d0 51bfe: 1028 000a moveb %a0@(10),%d0 51c02: 4281 clrl %d1 51c04: 1228 000b moveb %a0@(11),%d1 51c08: e188 lsll #8,%d0
buf->st_size = rtems_rfs_inode_get_block_offset (&inode);
else
buf->st_size = rtems_rfs_inode_get_size (fs, &inode);
}
buf->st_blksize = rtems_rfs_fs_block_size (fs);
51c0a: 256b 0008 003e movel %a3@(8),%a2@(62)
buf->st_mtime = rtems_rfs_inode_get_mtime (&inode);
buf->st_ctime = rtems_rfs_inode_get_ctime (&inode);
buf->st_blocks = rtems_rfs_inode_get_block_count (&inode);
if (S_ISLNK (buf->st_mode))
buf->st_size = rtems_rfs_inode_get_block_offset (&inode);
51c10: 8081 orl %d1,%d0 51c12: 42aa 001e clrl %a2@(30) 51c16: 0280 0000 ffff andil #65535,%d0 51c1c: 2540 0022 movel %d0,%a2@(34)
buf->st_size = rtems_rfs_inode_get_size (fs, &inode);
}
buf->st_blksize = rtems_rfs_fs_block_size (fs);
rc = rtems_rfs_inode_close (fs, &inode);
51c20: 2f0c movel %a4,%sp@- 51c22: 2f0b movel %a3,%sp@- 51c24: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close> 51c2a: 246b 007c moveal %a3@(124),%a2 51c2e: 2400 movel %d0,%d2
if (rc > 0)
51c30: 508f addql #8,%sp 51c32: 6e00 fd26 bgtw 5195a <rtems_rfs_rtems_fstat+0x16c>
rtems_rfs_buffers_release (fs);
51c36: 2f0b movel %a3,%sp@- 51c38: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release>
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
51c3e: 2f12 movel %a2@,%sp@- 51c40: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL)
51c46: 508f addql #8,%sp
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
51c48: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL)
51c4a: 660c bnes 51c58 <rtems_rfs_rtems_fstat+0x46a> <== NEVER TAKEN
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("stat: closing inode", rc);
}
rtems_rfs_rtems_unlock (fs);
return 0;
51c4c: 4280 clrl %d0
}
51c4e: 4cee 1cfc ffb4 moveml %fp@(-76),%d2-%d7/%a2-%a4 51c54: 4e5e unlk %fp 51c56: 4e75 rts
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
51c58: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 51c5c: 42a7 clrl %sp@- <== NOT EXECUTED 51c5e: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 51c64: 508f addql #8,%sp <== NOT EXECUTED 51c66: 4a00 tstb %d0 <== NOT EXECUTED 51c68: 67e2 beqs 51c4c <rtems_rfs_rtems_fstat+0x45e> <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
51c6a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 51c6c: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 51c72: 2f00 movel %d0,%sp@- <== NOT EXECUTED 51c74: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 51c7a: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 51c80: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("stat: closing inode", rc);
}
rtems_rfs_rtems_unlock (fs);
return 0;
51c84: 4280 clrl %d0 <== NOT EXECUTED
}
51c86: 4cee 1cfc ffb4 moveml %fp@(-76),%d2-%d7/%a2-%a4 <== NOT EXECUTED 51c8c: 4e5e unlk %fp <== NOT EXECUTED 51c8e: 4e75 rts <== NOT EXECUTED
buf->st_blocks = rtems_rfs_inode_get_block_count (&inode);
if (S_ISLNK (buf->st_mode))
buf->st_size = rtems_rfs_inode_get_block_offset (&inode);
else
buf->st_size = rtems_rfs_inode_get_size (fs, &inode);
51c90: 2f0c movel %a4,%sp@- 51c92: 2f0b movel %a3,%sp@- 51c94: 4eb9 0005 0c60 jsr 50c60 <rtems_rfs_inode_get_size>
}
buf->st_blksize = rtems_rfs_fs_block_size (fs);
51c9a: 256b 0008 003e movel %a3@(8),%a2@(62)
buf->st_blocks = rtems_rfs_inode_get_block_count (&inode);
if (S_ISLNK (buf->st_mode))
buf->st_size = rtems_rfs_inode_get_block_offset (&inode);
else
buf->st_size = rtems_rfs_inode_get_size (fs, &inode);
51ca0: 508f addql #8,%sp 51ca2: 2540 001e movel %d0,%a2@(30) 51ca6: 2541 0022 movel %d1,%a2@(34)
}
buf->st_blksize = rtems_rfs_fs_block_size (fs);
rc = rtems_rfs_inode_close (fs, &inode);
51caa: 2f0c movel %a4,%sp@- 51cac: 2f0b movel %a3,%sp@- 51cae: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close>
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
51cb4: 246b 007c moveal %a3@(124),%a2 51cb8: 2400 movel %d0,%d2
if (rc > 0)
51cba: 508f addql #8,%sp 51cbc: 6e00 fc9c bgtw 5195a <rtems_rfs_rtems_fstat+0x16c> 51cc0: 6000 ff74 braw 51c36 <rtems_rfs_rtems_fstat+0x448>
00051e7c <rtems_rfs_rtems_initialise>:
*/
int
rtems_rfs_rtems_initialise (rtems_filesystem_mount_table_entry_t* mt_entry,
const void* data)
{
51e7c: 4e56 fff0 linkw %fp,#-16 51e80: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
rtems_rfs_rtems_private* rtems;
rtems_rfs_file_system* fs;
int rc;
rtems = malloc (sizeof (rtems_rfs_rtems_private));
51e84: 4878 0004 pea 4 <CONTEXT_ARG>
*/
int
rtems_rfs_rtems_initialise (rtems_filesystem_mount_table_entry_t* mt_entry,
const void* data)
{
51e88: 266e 0008 moveal %fp@(8),%a3
rtems_rfs_rtems_private* rtems;
rtems_rfs_file_system* fs;
int rc;
rtems = malloc (sizeof (rtems_rfs_rtems_private));
51e8c: 4eb9 0004 6f84 jsr 46f84 <malloc>
if (!rtems)
51e92: 588f addql #4,%sp
{
rtems_rfs_rtems_private* rtems;
rtems_rfs_file_system* fs;
int rc;
rtems = malloc (sizeof (rtems_rfs_rtems_private));
51e94: 2440 moveal %d0,%a2
if (!rtems)
51e96: 4a80 tstl %d0 51e98: 6700 015c beqw 51ff6 <rtems_rfs_rtems_initialise+0x17a>
return rtems_rfs_rtems_error ("initialise: local data", ENOMEM);
memset (rtems, 0, sizeof (rtems_rfs_rtems_private));
51e9c: 4292 clrl %a2@
rc = rtems_rfs_mutex_create (&rtems->access);
51e9e: 2f00 movel %d0,%sp@- 51ea0: 4eb9 0005 fee8 jsr 5fee8 <rtems_rfs_mutex_create>
if (rc > 0)
51ea6: 588f addql #4,%sp
if (!rtems)
return rtems_rfs_rtems_error ("initialise: local data", ENOMEM);
memset (rtems, 0, sizeof (rtems_rfs_rtems_private));
rc = rtems_rfs_mutex_create (&rtems->access);
51ea8: 2400 movel %d0,%d2
if (rc > 0)
51eaa: 6f20 bles 51ecc <rtems_rfs_rtems_initialise+0x50><== ALWAYS TAKEN
}
rc = rtems_rfs_fs_open (mt_entry->dev, rtems, 0, &fs);
if (rc)
{
free (rtems);
51eac: 2f0a movel %a2,%sp@- <== NOT EXECUTED 51eae: 4eb9 0004 680c jsr 4680c <free> <== NOT EXECUTED
return rtems_rfs_rtems_error ("initialise: open", rc);
51eb4: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 51eba: 588f addql #4,%sp <== NOT EXECUTED 51ebc: 2040 moveal %d0,%a0 <== NOT EXECUTED 51ebe: 70ff moveq #-1,%d0 <== NOT EXECUTED 51ec0: 2082 movel %d2,%a0@ <== NOT EXECUTED
mt_entry->mt_fs_root.ops = &rtems_rfs_ops;
rtems_rfs_rtems_unlock (fs);
return 0;
}
51ec2: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 <== NOT EXECUTED 51ec8: 4e5e unlk %fp <== NOT EXECUTED 51eca: 4e75 rts <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
51ecc: 42a7 clrl %sp@- 51ece: 42a7 clrl %sp@- 51ed0: 2f12 movel %a2@,%sp@- 51ed2: 4eb9 0004 af20 jsr 4af20 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
51ed8: 4fef 000c lea %sp@(12),%sp
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
51edc: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL)
51ede: 6664 bnes 51f44 <rtems_rfs_rtems_initialise+0xc8><== NEVER TAKEN
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
return rtems_rfs_rtems_error ("initialise: cannot lock access mutex", rc);
}
rc = rtems_rfs_fs_open (mt_entry->dev, rtems, 0, &fs);
51ee0: 486e fffc pea %fp@(-4) 51ee4: 42a7 clrl %sp@- 51ee6: 2f0a movel %a2,%sp@- 51ee8: 2f2b 0070 movel %a3@(112),%sp@- 51eec: 4eb9 0005 eab4 jsr 5eab4 <rtems_rfs_fs_open>
if (rc)
51ef2: 4fef 0010 lea %sp@(16),%sp
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
return rtems_rfs_rtems_error ("initialise: cannot lock access mutex", rc);
}
rc = rtems_rfs_fs_open (mt_entry->dev, rtems, 0, &fs);
51ef6: 2400 movel %d0,%d2
if (rc)
51ef8: 66b2 bnes 51eac <rtems_rfs_rtems_initialise+0x30><== NEVER TAKEN
{
free (rtems);
return rtems_rfs_rtems_error ("initialise: open", rc);
}
mt_entry->fs_info = fs;
51efa: 206e fffc moveal %fp@(-4),%a0
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
51efe: 2468 007c moveal %a0@(124),%a2
mt_entry->mt_fs_root.node_access = (void*) RTEMS_RFS_ROOT_INO;
mt_entry->mt_fs_root.handlers = &rtems_rfs_rtems_dir_handlers;
51f02: 203c 0007 4adc movel #477916,%d0 51f08: 2740 0024 movel %d0,%a3@(36)
mt_entry->mt_fs_root.ops = &rtems_rfs_ops;
51f0c: 203c 0007 2f52 movel #470866,%d0 51f12: 2740 0028 movel %d0,%a3@(40)
return rtems_rfs_rtems_error ("initialise: open", rc);
}
mt_entry->fs_info = fs;
mt_entry->mt_fs_root.node_access = (void*) RTEMS_RFS_ROOT_INO;
51f16: 7001 moveq #1,%d0
rtems_rfs_buffers_release (fs);
51f18: 2f08 movel %a0,%sp@-
{
free (rtems);
return rtems_rfs_rtems_error ("initialise: open", rc);
}
mt_entry->fs_info = fs;
51f1a: 2748 0034 movel %a0,%a3@(52)
mt_entry->mt_fs_root.node_access = (void*) RTEMS_RFS_ROOT_INO;
51f1e: 2740 001c movel %d0,%a3@(28) 51f22: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release>
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
51f28: 2f12 movel %a2@,%sp@- 51f2a: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL)
51f30: 508f addql #8,%sp
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
51f32: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL)
51f34: 6600 0086 bnew 51fbc <rtems_rfs_rtems_initialise+0x140>
mt_entry->mt_fs_root.handlers = &rtems_rfs_rtems_dir_handlers;
mt_entry->mt_fs_root.ops = &rtems_rfs_ops;
rtems_rfs_rtems_unlock (fs);
return 0;
51f38: 4280 clrl %d0
}
51f3a: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 51f40: 4e5e unlk %fp 51f42: 4e75 rts
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
51f44: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 51f48: 42a7 clrl %sp@- <== NOT EXECUTED 51f4a: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 51f50: 508f addql #8,%sp <== NOT EXECUTED 51f52: 4a00 tstb %d0 <== NOT EXECUTED 51f54: 662a bnes 51f80 <rtems_rfs_rtems_initialise+0x104><== NOT EXECUTED
}
rc = rtems_rfs_mutex_lock (&rtems->access);
if (rc > 0)
{
rtems_rfs_mutex_destroy (&rtems->access);
51f56: 2f0a movel %a2,%sp@- <== NOT EXECUTED
free (rtems);
return rtems_rfs_rtems_error ("initialise: cannot lock access mutex", rc);
51f58: 7405 moveq #5,%d2 <== NOT EXECUTED
}
rc = rtems_rfs_mutex_lock (&rtems->access);
if (rc > 0)
{
rtems_rfs_mutex_destroy (&rtems->access);
51f5a: 4eb9 0005 ff5a jsr 5ff5a <rtems_rfs_mutex_destroy> <== NOT EXECUTED
free (rtems);
51f60: 2f0a movel %a2,%sp@- <== NOT EXECUTED 51f62: 4eb9 0004 680c jsr 4680c <free> <== NOT EXECUTED
return rtems_rfs_rtems_error ("initialise: cannot lock access mutex", rc);
51f68: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 51f6e: 508f addql #8,%sp <== NOT EXECUTED 51f70: 2040 moveal %d0,%a0 <== NOT EXECUTED 51f72: 70ff moveq #-1,%d0 <== NOT EXECUTED 51f74: 2082 movel %d2,%a0@ <== NOT EXECUTED
mt_entry->mt_fs_root.ops = &rtems_rfs_ops;
rtems_rfs_rtems_unlock (fs);
return 0;
}
51f76: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 <== NOT EXECUTED 51f7c: 4e5e unlk %fp <== NOT EXECUTED 51f7e: 4e75 rts <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
51f80: 2f02 movel %d2,%sp@- <== NOT EXECUTED
rc = rtems_rfs_mutex_lock (&rtems->access);
if (rc > 0)
{
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
return rtems_rfs_rtems_error ("initialise: cannot lock access mutex", rc);
51f82: 7405 moveq #5,%d2 <== NOT EXECUTED 51f84: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 51f8a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 51f8c: 4879 0007 2f06 pea 72f06 <ramdisk_ops+0xb28> <== NOT EXECUTED 51f92: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 51f98: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
}
rc = rtems_rfs_mutex_lock (&rtems->access);
if (rc > 0)
{
rtems_rfs_mutex_destroy (&rtems->access);
51f9c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 51f9e: 4eb9 0005 ff5a jsr 5ff5a <rtems_rfs_mutex_destroy> <== NOT EXECUTED
free (rtems);
51fa4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 51fa6: 4eb9 0004 680c jsr 4680c <free> <== NOT EXECUTED
return rtems_rfs_rtems_error ("initialise: cannot lock access mutex", rc);
51fac: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 51fb2: 508f addql #8,%sp <== NOT EXECUTED 51fb4: 2040 moveal %d0,%a0 <== NOT EXECUTED 51fb6: 70ff moveq #-1,%d0 <== NOT EXECUTED 51fb8: 2082 movel %d2,%a0@ <== NOT EXECUTED 51fba: 60ba bras 51f76 <rtems_rfs_rtems_initialise+0xfa><== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
51fbc: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 51fc0: 42a7 clrl %sp@- <== NOT EXECUTED 51fc2: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 51fc8: 508f addql #8,%sp <== NOT EXECUTED 51fca: 4a00 tstb %d0 <== NOT EXECUTED 51fcc: 6700 ff6a beqw 51f38 <rtems_rfs_rtems_initialise+0xbc><== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
51fd0: 2f02 movel %d2,%sp@- <== NOT EXECUTED 51fd2: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 51fd8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 51fda: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 51fe0: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 51fe6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
mt_entry->mt_fs_root.handlers = &rtems_rfs_rtems_dir_handlers;
mt_entry->mt_fs_root.ops = &rtems_rfs_ops;
rtems_rfs_rtems_unlock (fs);
return 0;
51fea: 4280 clrl %d0 <== NOT EXECUTED
}
51fec: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 <== NOT EXECUTED 51ff2: 4e5e unlk %fp <== NOT EXECUTED 51ff4: 4e75 rts <== NOT EXECUTED
rtems_rfs_file_system* fs;
int rc;
rtems = malloc (sizeof (rtems_rfs_rtems_private));
if (!rtems)
return rtems_rfs_rtems_error ("initialise: local data", ENOMEM);
51ff6: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 51ffc: 720c moveq #12,%d1 <== NOT EXECUTED 51ffe: 2040 moveal %d0,%a0 <== NOT EXECUTED 52000: 70ff moveq #-1,%d0 <== NOT EXECUTED
mt_entry->mt_fs_root.ops = &rtems_rfs_ops;
rtems_rfs_rtems_unlock (fs);
return 0;
}
52002: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 <== NOT EXECUTED
rtems_rfs_file_system* fs;
int rc;
rtems = malloc (sizeof (rtems_rfs_rtems_private));
if (!rtems)
return rtems_rfs_rtems_error ("initialise: local data", ENOMEM);
52008: 2081 movel %d1,%a0@ <== NOT EXECUTED
mt_entry->mt_fs_root.ops = &rtems_rfs_ops;
rtems_rfs_rtems_unlock (fs);
return 0;
}
5200a: 4e5e unlk %fp <== NOT EXECUTED
00050ef2 <rtems_rfs_rtems_link>:
*/
static int
rtems_rfs_rtems_link (rtems_filesystem_location_info_t* to_loc,
rtems_filesystem_location_info_t* parent_loc,
const char* name)
{
50ef2: 4e56 ffe8 linkw %fp,#-24 50ef6: 206e 0008 moveal %fp@(8),%a0
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (to_loc);
50efa: 2268 0010 moveal %a0@(16),%a1
*/
static int
rtems_rfs_rtems_link (rtems_filesystem_location_info_t* to_loc,
rtems_filesystem_location_info_t* parent_loc,
const char* name)
{
50efe: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (to_loc);
50f02: 2469 0034 moveal %a1@(52),%a2
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
50f06: 42a7 clrl %sp@-
*/
static int
rtems_rfs_rtems_link (rtems_filesystem_location_info_t* to_loc,
rtems_filesystem_location_info_t* parent_loc,
const char* name)
{
50f08: 242e 0010 movel %fp@(16),%d2 50f0c: 42a7 clrl %sp@-
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
return rtems_rfs_rtems_error ("shutdown: close", rc);
}
50f0e: 226a 007c moveal %a2@(124),%a1 50f12: 2f11 movel %a1@,%sp@-
rtems_rfs_rtems_link (rtems_filesystem_location_info_t* to_loc,
rtems_filesystem_location_info_t* parent_loc,
const char* name)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (to_loc);
rtems_rfs_ino target = rtems_rfs_rtems_get_pathloc_ino (to_loc);
50f14: 2a10 movel %a0@,%d5
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parent_loc);
50f16: 206e 000c moveal %fp@(12),%a0 50f1a: 2810 movel %a0@,%d4 50f1c: 4eb9 0004 af20 jsr 4af20 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
50f22: 4fef 000c lea %sp@(12),%sp
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
50f26: 2600 movel %d0,%d3
if (sc != RTEMS_SUCCESSFUL)
50f28: 6676 bnes 50fa0 <rtems_rfs_rtems_link+0xae> <== NEVER TAKEN
printf ("rtems-rfs-rtems: link: in: parent:%" PRId32 " target:%" PRId32 "\n",
parent, target);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_link (fs, name, strlen (name), parent, target, false);
50f2a: 2f02 movel %d2,%sp@- 50f2c: 4eb9 0006 3c10 jsr 63c10 <strlen> 50f32: 4297 clrl %sp@ 50f34: 2f05 movel %d5,%sp@- 50f36: 2f04 movel %d4,%sp@- 50f38: 2f00 movel %d0,%sp@- 50f3a: 2f02 movel %d2,%sp@- 50f3c: 2f0a movel %a2,%sp@- 50f3e: 4eb9 0005 f3d4 jsr 5f3d4 <rtems_rfs_link>
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
50f44: 266a 007c moveal %a2@(124),%a3 50f48: 2400 movel %d0,%d2
if (rc)
50f4a: 4fef 0018 lea %sp@(24),%sp
50f4e: 672e beqs 50f7e <rtems_rfs_rtems_link+0x8c> <== ALWAYS TAKEN
rtems_rfs_buffers_release (fs);
50f50: 2f0a movel %a2,%sp@- <== NOT EXECUTED 50f52: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
50f58: 2f13 movel %a3@,%sp@- <== NOT EXECUTED 50f5a: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
50f60: 508f addql #8,%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
50f62: 2600 movel %d0,%d3 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
50f64: 6600 00a4 bnew 5100a <rtems_rfs_rtems_link+0x118> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("link: linking", rc);
50f68: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 50f6e: 2040 moveal %d0,%a0 <== NOT EXECUTED 50f70: 70ff moveq #-1,%d0 <== NOT EXECUTED 50f72: 2082 movel %d2,%a0@ <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
50f74: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 <== NOT EXECUTED 50f7a: 4e5e unlk %fp <== NOT EXECUTED 50f7c: 4e75 rts <== NOT EXECUTED
50f7e: 2f0a movel %a2,%sp@- 50f80: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release>
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
50f86: 2f13 movel %a3@,%sp@- 50f88: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL)
50f8e: 508f addql #8,%sp
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
50f90: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL)
50f92: 663e bnes 50fd2 <rtems_rfs_rtems_link+0xe0> <== NEVER TAKEN
return rtems_rfs_rtems_error ("link: linking", rc);
}
rtems_rfs_rtems_unlock (fs);
return 0;
50f94: 4280 clrl %d0
}
50f96: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 50f9c: 4e5e unlk %fp 50f9e: 4e75 rts
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
50fa0: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 50fa4: 42a7 clrl %sp@- <== NOT EXECUTED 50fa6: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 50fac: 508f addql #8,%sp <== NOT EXECUTED 50fae: 4a00 tstb %d0 <== NOT EXECUTED 50fb0: 6700 ff78 beqw 50f2a <rtems_rfs_rtems_link+0x38> <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
50fb4: 2f03 movel %d3,%sp@- <== NOT EXECUTED 50fb6: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 50fbc: 2f00 movel %d0,%sp@- <== NOT EXECUTED 50fbe: 4879 0007 2f06 pea 72f06 <ramdisk_ops+0xb28> <== NOT EXECUTED 50fc4: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 50fca: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 50fce: 6000 ff5a braw 50f2a <rtems_rfs_rtems_link+0x38> <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
50fd2: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 50fd6: 42a7 clrl %sp@- <== NOT EXECUTED 50fd8: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 50fde: 508f addql #8,%sp <== NOT EXECUTED 50fe0: 4a00 tstb %d0 <== NOT EXECUTED 50fe2: 67b0 beqs 50f94 <rtems_rfs_rtems_link+0xa2> <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
50fe4: 2f02 movel %d2,%sp@- <== NOT EXECUTED 50fe6: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 50fec: 2f00 movel %d0,%sp@- <== NOT EXECUTED 50fee: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 50ff4: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 50ffa: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
return rtems_rfs_rtems_error ("link: linking", rc);
}
rtems_rfs_rtems_unlock (fs);
return 0;
50ffe: 4280 clrl %d0 <== NOT EXECUTED
}
51000: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 <== NOT EXECUTED 51006: 4e5e unlk %fp <== NOT EXECUTED 51008: 4e75 rts <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
5100a: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 5100e: 42a7 clrl %sp@- <== NOT EXECUTED 51010: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 51016: 508f addql #8,%sp <== NOT EXECUTED 51018: 4a00 tstb %d0 <== NOT EXECUTED 5101a: 6700 ff4c beqw 50f68 <rtems_rfs_rtems_link+0x76> <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
5101e: 2f03 movel %d3,%sp@- <== NOT EXECUTED 51020: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 51026: 2f00 movel %d0,%sp@- <== NOT EXECUTED 51028: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 5102e: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 51034: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rc = rtems_rfs_link (fs, name, strlen (name), parent, target, false);
if (rc)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("link: linking", rc);
51038: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 5103e: 2040 moveal %d0,%a0 <== NOT EXECUTED 51040: 70ff moveq #-1,%d0 <== NOT EXECUTED 51042: 2082 movel %d2,%a0@ <== NOT EXECUTED 51044: 6000 ff2e braw 50f74 <rtems_rfs_rtems_link+0x82> <== NOT EXECUTED
00052264 <rtems_rfs_rtems_mknod>:
static int
rtems_rfs_rtems_mknod (const char *name,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc)
{
52264: 4e56 ffb0 linkw %fp,#-80 52268: 206e 0018 moveal %fp@(24),%a0
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
5226c: 2268 0010 moveal %a0@(16),%a1
static int
rtems_rfs_rtems_mknod (const char *name,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc)
{
52270: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
52274: 2469 0034 moveal %a1@(52),%a2
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (pathloc);
52278: 2a10 movel %a0@,%d5
static int
rtems_rfs_rtems_mknod (const char *name,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc)
{
5227a: 242e 0008 movel %fp@(8),%d2 5227e: 262e 000c movel %fp@(12),%d3 52282: 286e 0010 moveal %fp@(16),%a4 52286: 266e 0014 moveal %fp@(20),%a3
uid_t uid;
gid_t gid;
int rc;
#if defined(RTEMS_POSIX_API)
uid = geteuid ();
5228a: 4eb9 0005 7818 jsr 57818 <geteuid> 52290: 3c00 movew %d0,%d6
gid = getegid ();
52292: 4eb9 0005 7804 jsr 57804 <getegid>
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
52298: 42a7 clrl %sp@- 5229a: 3e00 movew %d0,%d7 5229c: 42a7 clrl %sp@-
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
return rtems_rfs_rtems_error ("shutdown: close", rc);
}
5229e: 206a 007c moveal %a2@(124),%a0 522a2: 2f10 movel %a0@,%sp@- 522a4: 4eb9 0004 af20 jsr 4af20 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
522aa: 4fef 000c lea %sp@(12),%sp
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
522ae: 2800 movel %d0,%d4
if (sc != RTEMS_SUCCESSFUL)
522b0: 6672 bnes 52324 <rtems_rfs_rtems_mknod+0xc0> <== NEVER TAKEN
#endif
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_create (fs, parent, name, strlen (name),
rtems_rfs_rtems_imode (mode),
522b2: 2f03 movel %d3,%sp@- 522b4: 4eb9 0005 37a6 jsr 537a6 <rtems_rfs_rtems_imode>
gid = 0;
#endif
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_create (fs, parent, name, strlen (name),
522ba: 2f02 movel %d2,%sp@-
rtems_rfs_rtems_imode (mode),
522bc: 3800 movew %d0,%d4
gid = 0;
#endif
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_create (fs, parent, name, strlen (name),
522be: 4eb9 0006 3c10 jsr 63c10 <strlen> 522c4: 588f addql #4,%sp 522c6: 486e fffc pea %fp@(-4) 522ca: 3f07 movew %d7,%sp@- 522cc: 4267 clrw %sp@- 522ce: 3f06 movew %d6,%sp@- 522d0: 4267 clrw %sp@- 522d2: 4878 0001 pea 1 <ADD> 522d6: 3f04 movew %d4,%sp@- 522d8: 4267 clrw %sp@- 522da: 2f00 movel %d0,%sp@- 522dc: 2f02 movel %d2,%sp@- 522de: 2f05 movel %d5,%sp@- 522e0: 2f0a movel %a2,%sp@- 522e2: 4eb9 0005 0892 jsr 50892 <rtems_rfs_inode_create>
rtems_rfs_rtems_imode (mode),
1, uid, gid, &ino);
if (rc > 0)
522e8: 4fef 0028 lea %sp@(40),%sp
gid = 0;
#endif
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_create (fs, parent, name, strlen (name),
522ec: 2400 movel %d0,%d2
rtems_rfs_rtems_imode (mode),
1, uid, gid, &ino);
if (rc > 0)
522ee: 6f00 00e2 blew 523d2 <rtems_rfs_rtems_mknod+0x16e>
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
522f2: 266a 007c moveal %a2@(124),%a3
rtems_rfs_buffers_release (fs);
522f6: 2f0a movel %a2,%sp@- 522f8: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release>
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
522fe: 2f13 movel %a3@,%sp@- 52300: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL)
52306: 508f addql #8,%sp
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
52308: 2600 movel %d0,%d3
if (sc != RTEMS_SUCCESSFUL)
5230a: 6600 0088 bnew 52394 <rtems_rfs_rtems_mknod+0x130>
rc = rtems_rfs_inode_close (fs, &inode);
if (rc > 0)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("mknod: closing inode", rc);
5230e: 4eb9 0006 2548 jsr 62548 <__errno> 52314: 2040 moveal %d0,%a0 52316: 70ff moveq #-1,%d0 52318: 2082 movel %d2,%a0@
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
5231a: 4cee 1cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a4 52320: 4e5e unlk %fp 52322: 4e75 rts
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
52324: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 52328: 42a7 clrl %sp@- <== NOT EXECUTED 5232a: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 52330: 508f addql #8,%sp <== NOT EXECUTED 52332: 4a00 tstb %d0 <== NOT EXECUTED 52334: 6700 ff7c beqw 522b2 <rtems_rfs_rtems_mknod+0x4e> <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
52338: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5233a: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 52340: 2f00 movel %d0,%sp@- <== NOT EXECUTED 52342: 4879 0007 2f06 pea 72f06 <ramdisk_ops+0xb28> <== NOT EXECUTED 52348: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5234e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
#endif
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_create (fs, parent, name, strlen (name),
rtems_rfs_rtems_imode (mode),
52352: 2f03 movel %d3,%sp@- <== NOT EXECUTED 52354: 4eb9 0005 37a6 jsr 537a6 <rtems_rfs_rtems_imode> <== NOT EXECUTED
gid = 0;
#endif
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_create (fs, parent, name, strlen (name),
5235a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
rtems_rfs_rtems_imode (mode),
5235c: 3800 movew %d0,%d4 <== NOT EXECUTED
gid = 0;
#endif
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_create (fs, parent, name, strlen (name),
5235e: 4eb9 0006 3c10 jsr 63c10 <strlen> <== NOT EXECUTED 52364: 588f addql #4,%sp <== NOT EXECUTED 52366: 486e fffc pea %fp@(-4) <== NOT EXECUTED 5236a: 3f07 movew %d7,%sp@- <== NOT EXECUTED 5236c: 4267 clrw %sp@- <== NOT EXECUTED 5236e: 3f06 movew %d6,%sp@- <== NOT EXECUTED 52370: 4267 clrw %sp@- <== NOT EXECUTED 52372: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 52376: 3f04 movew %d4,%sp@- <== NOT EXECUTED 52378: 4267 clrw %sp@- <== NOT EXECUTED 5237a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5237c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5237e: 2f05 movel %d5,%sp@- <== NOT EXECUTED 52380: 2f0a movel %a2,%sp@- <== NOT EXECUTED 52382: 4eb9 0005 0892 jsr 50892 <rtems_rfs_inode_create> <== NOT EXECUTED
rtems_rfs_rtems_imode (mode),
1, uid, gid, &ino);
if (rc > 0)
52388: 4fef 0028 lea %sp@(40),%sp <== NOT EXECUTED
gid = 0;
#endif
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_create (fs, parent, name, strlen (name),
5238c: 2400 movel %d0,%d2 <== NOT EXECUTED
rtems_rfs_rtems_imode (mode),
1, uid, gid, &ino);
if (rc > 0)
5238e: 6e00 ff62 bgtw 522f2 <rtems_rfs_rtems_mknod+0x8e> <== NOT EXECUTED 52392: 603e bras 523d2 <rtems_rfs_rtems_mknod+0x16e> <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
52394: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 52398: 42a7 clrl %sp@- <== NOT EXECUTED 5239a: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 523a0: 508f addql #8,%sp <== NOT EXECUTED 523a2: 4a00 tstb %d0 <== NOT EXECUTED 523a4: 6700 ff68 beqw 5230e <rtems_rfs_rtems_mknod+0xaa> <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
523a8: 2f03 movel %d3,%sp@- <== NOT EXECUTED 523aa: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 523b0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 523b2: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 523b8: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 523be: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
if (rc > 0)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("mknod: closing inode", rc);
523c2: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 523c8: 2040 moveal %d0,%a0 <== NOT EXECUTED 523ca: 70ff moveq #-1,%d0 <== NOT EXECUTED 523cc: 2082 movel %d2,%a0@ <== NOT EXECUTED 523ce: 6000 ff4a braw 5231a <rtems_rfs_rtems_mknod+0xb6> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("mknod: inode create", rc);
}
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
523d2: 4878 0001 pea 1 <ADD> 523d6: 486e ffd6 pea %fp@(-42) 523da: 2f2e fffc movel %fp@(-4),%sp@- 523de: 2f0a movel %a2,%sp@- 523e0: 4eb9 0005 0300 jsr 50300 <rtems_rfs_inode_open>
if (rc > 0)
523e6: 4fef 0010 lea %sp@(16),%sp
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("mknod: inode create", rc);
}
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
523ea: 2400 movel %d0,%d2
if (rc > 0)
523ec: 6e00 ff04 bgtw 522f2 <rtems_rfs_rtems_mknod+0x8e>
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("mknod: inode open", rc);
}
if (S_ISDIR(mode) || S_ISREG(mode))
523f0: 0283 0000 f000 andil #61440,%d3 523f6: 0c83 0000 4000 cmpil #16384,%d3
523fc: 6766 beqs 52464 <rtems_rfs_rtems_mknod+0x200>
523fe: 0c83 0000 8000 cmpil #32768,%d3
52404: 675e beqs 52464 <rtems_rfs_rtems_mknod+0x200> <== ALWAYS TAKEN
{
}
else if (S_ISCHR (mode) || S_ISBLK (mode))
52406: 0c83 0000 2000 cmpil #8192,%d3 <== NOT EXECUTED 5240c: 670a beqs 52418 <rtems_rfs_rtems_mknod+0x1b4> <== NOT EXECUTED 5240e: 0c83 0000 6000 cmpil #24576,%d3 <== NOT EXECUTED 52414: 6600 00c0 bnew 524d6 <rtems_rfs_rtems_mknod+0x272> <== NOT EXECUTED
* @param bno The block number.
*/
static inline void
rtems_rfs_inode_set_block (rtems_rfs_inode_handle* handle, int block, uint32_t bno)
{
rtems_rfs_write_u32 (&handle->node->data.blocks[block], bno);
52418: 206e ffe2 moveal %fp@(-30),%a0 <== NOT EXECUTED 5241c: 260c movel %a4,%d3 <== NOT EXECUTED 5241e: e08b lsrl #8,%d3 <== NOT EXECUTED 52420: 7018 moveq #24,%d0 <== NOT EXECUTED 52422: 2a0c movel %a4,%d5 <== NOT EXECUTED 52424: 240b movel %a3,%d2 <== NOT EXECUTED 52426: e0ad lsrl %d0,%d5 <== NOT EXECUTED 52428: e0aa lsrl %d0,%d2 <== NOT EXECUTED 5242a: 200b movel %a3,%d0 <== NOT EXECUTED 5242c: e088 lsrl #8,%d0 <== NOT EXECUTED 5242e: 280c movel %a4,%d4 <== NOT EXECUTED 52430: 220b movel %a3,%d1 <== NOT EXECUTED 52432: 1143 001e moveb %d3,%a0@(30) <== NOT EXECUTED 52436: 360c movew %a4,%d3 <== NOT EXECUTED 52438: 1140 0022 moveb %d0,%a0@(34) <== NOT EXECUTED 5243c: 4244 clrw %d4 <== NOT EXECUTED 5243e: 4844 swap %d4 <== NOT EXECUTED 52440: 1143 001f moveb %d3,%a0@(31) <== NOT EXECUTED 52444: 4241 clrw %d1 <== NOT EXECUTED 52446: 4841 swap %d1 <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
52448: 7601 moveq #1,%d3 <== NOT EXECUTED
* @param bno The block number.
*/
static inline void
rtems_rfs_inode_set_block (rtems_rfs_inode_handle* handle, int block, uint32_t bno)
{
rtems_rfs_write_u32 (&handle->node->data.blocks[block], bno);
5244a: 300b movew %a3,%d0 <== NOT EXECUTED 5244c: 1145 001c moveb %d5,%a0@(28) <== NOT EXECUTED 52450: 1144 001d moveb %d4,%a0@(29) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
52454: 1d43 ffe6 moveb %d3,%fp@(-26) <== NOT EXECUTED
* @param bno The block number.
*/
static inline void
rtems_rfs_inode_set_block (rtems_rfs_inode_handle* handle, int block, uint32_t bno)
{
rtems_rfs_write_u32 (&handle->node->data.blocks[block], bno);
52458: 1142 0020 moveb %d2,%a0@(32) <== NOT EXECUTED 5245c: 1141 0021 moveb %d1,%a0@(33) <== NOT EXECUTED 52460: 1140 0023 moveb %d0,%a0@(35) <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("mknod: bad mode", EINVAL);
}
rc = rtems_rfs_inode_close (fs, &inode);
52464: 486e ffd6 pea %fp@(-42) 52468: 2f0a movel %a2,%sp@- 5246a: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close>
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
52470: 266a 007c moveal %a2@(124),%a3 52474: 2400 movel %d0,%d2
if (rc > 0)
52476: 508f addql #8,%sp 52478: 6e00 fe7c bgtw 522f6 <rtems_rfs_rtems_mknod+0x92>
rtems_rfs_buffers_release (fs);
5247c: 2f0a movel %a2,%sp@- 5247e: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release>
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
52484: 2f13 movel %a3@,%sp@- 52486: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL)
5248c: 508f addql #8,%sp
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
5248e: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL)
52490: 660c bnes 5249e <rtems_rfs_rtems_mknod+0x23a> <== NEVER TAKEN
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("mknod: closing inode", rc);
}
rtems_rfs_rtems_unlock (fs);
return 0;
52492: 4280 clrl %d0
}
52494: 4cee 1cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a4 5249a: 4e5e unlk %fp 5249c: 4e75 rts
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
5249e: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 524a2: 42a7 clrl %sp@- <== NOT EXECUTED 524a4: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 524aa: 508f addql #8,%sp <== NOT EXECUTED 524ac: 4a00 tstb %d0 <== NOT EXECUTED 524ae: 67e2 beqs 52492 <rtems_rfs_rtems_mknod+0x22e> <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
524b0: 2f02 movel %d2,%sp@- <== NOT EXECUTED 524b2: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 524b8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 524ba: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 524c0: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 524c6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("mknod: closing inode", rc);
}
rtems_rfs_rtems_unlock (fs);
return 0;
524ca: 4280 clrl %d0 <== NOT EXECUTED
}
524cc: 4cee 1cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a4 <== NOT EXECUTED 524d2: 4e5e unlk %fp <== NOT EXECUTED 524d4: 4e75 rts <== NOT EXECUTED
rtems_rfs_inode_set_block (&inode, 0, major);
rtems_rfs_inode_set_block (&inode, 1, minor);
}
else
{
rtems_rfs_inode_close (fs, &inode);
524d6: 486e ffd6 pea %fp@(-42) <== NOT EXECUTED 524da: 2f0a movel %a2,%sp@- <== NOT EXECUTED 524dc: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
524e2: 266a 007c moveal %a2@(124),%a3 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
524e6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 524e8: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
524ee: 2f13 movel %a3@,%sp@- <== NOT EXECUTED 524f0: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
524f6: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
524fa: 2400 movel %d0,%d2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
524fc: 6618 bnes 52516 <rtems_rfs_rtems_mknod+0x2b2> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("mknod: bad mode", EINVAL);
524fe: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 52504: 7616 moveq #22,%d3 <== NOT EXECUTED 52506: 2040 moveal %d0,%a0 <== NOT EXECUTED 52508: 70ff moveq #-1,%d0 <== NOT EXECUTED 5250a: 2083 movel %d3,%a0@ <== NOT EXECUTED
return rtems_rfs_rtems_error ("mknod: closing inode", rc);
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
5250c: 4cee 1cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a4 <== NOT EXECUTED 52512: 4e5e unlk %fp <== NOT EXECUTED 52514: 4e75 rts <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
52516: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 5251a: 42a7 clrl %sp@- <== NOT EXECUTED 5251c: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 52522: 508f addql #8,%sp <== NOT EXECUTED 52524: 4a00 tstb %d0 <== NOT EXECUTED 52526: 67d6 beqs 524fe <rtems_rfs_rtems_mknod+0x29a> <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
52528: 2f02 movel %d2,%sp@- <== NOT EXECUTED
}
else
{
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("mknod: bad mode", EINVAL);
5252a: 7616 moveq #22,%d3 <== NOT EXECUTED 5252c: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 52532: 2f00 movel %d0,%sp@- <== NOT EXECUTED 52534: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 5253a: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 52540: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 52544: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 5254a: 2040 moveal %d0,%a0 <== NOT EXECUTED 5254c: 70ff moveq #-1,%d0 <== NOT EXECUTED 5254e: 2083 movel %d3,%a0@ <== NOT EXECUTED 52550: 60ba bras 5250c <rtems_rfs_rtems_mknod+0x2a8> <== NOT EXECUTED
00051cc4 <rtems_rfs_rtems_node_type>:
* @return rtems_filesystem_node_types_t
*/
static rtems_filesystem_node_types_t
rtems_rfs_rtems_node_type (rtems_filesystem_location_info_t* pathloc)
{
51cc4: 4e56 ffc8 linkw %fp,#-56 51cc8: 206e 0008 moveal %fp@(8),%a0
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
51ccc: 2268 0010 moveal %a0@(16),%a1
* @return rtems_filesystem_node_types_t
*/
static rtems_filesystem_node_types_t
rtems_rfs_rtems_node_type (rtems_filesystem_location_info_t* pathloc)
{
51cd0: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
51cd4: 2469 0034 moveal %a1@(52),%a2
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
51cd8: 42a7 clrl %sp@-
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
51cda: 2610 movel %a0@,%d3 51cdc: 42a7 clrl %sp@-
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
return rtems_rfs_rtems_error ("shutdown: close", rc);
}
51cde: 206a 007c moveal %a2@(124),%a0 51ce2: 2f10 movel %a0@,%sp@- 51ce4: 4eb9 0004 af20 jsr 4af20 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
51cea: 4fef 000c lea %sp@(12),%sp
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
51cee: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL)
51cf0: 664e bnes 51d40 <rtems_rfs_rtems_node_type+0x7c> <== NEVER TAKEN
uint16_t mode;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
51cf2: 4878 0001 pea 1 <ADD> 51cf6: 486e ffda pea %fp@(-38) 51cfa: 2f03 movel %d3,%sp@- 51cfc: 2f0a movel %a2,%sp@- 51cfe: 4eb9 0005 0300 jsr 50300 <rtems_rfs_inode_open>
if (rc > 0)
51d04: 4fef 0010 lea %sp@(16),%sp
uint16_t mode;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
51d08: 2400 movel %d0,%d2
if (rc > 0)
51d0a: 6f7a bles 51d86 <rtems_rfs_rtems_node_type+0xc2> <== ALWAYS TAKEN
51d0c: 266a 007c moveal %a2@(124),%a3 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
51d10: 2f0a movel %a2,%sp@- <== NOT EXECUTED 51d12: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
51d18: 2f13 movel %a3@,%sp@- <== NOT EXECUTED 51d1a: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
51d20: 508f addql #8,%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
51d22: 2600 movel %d0,%d3 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
51d24: 6600 0106 bnew 51e2c <rtems_rfs_rtems_node_type+0x168><== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
if (rc > 0)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("node_type: closing inode", rc);
51d28: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 51d2e: 76ff moveq #-1,%d3 <== NOT EXECUTED 51d30: 2040 moveal %d0,%a0 <== NOT EXECUTED 51d32: 2082 movel %d2,%a0@ <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return type;
}
51d34: 2003 movel %d3,%d0 51d36: 4cee 0c0c ffc8 moveml %fp@(-56),%d2-%d3/%a2-%a3 51d3c: 4e5e unlk %fp 51d3e: 4e75 rts
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
51d40: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 51d44: 42a7 clrl %sp@- <== NOT EXECUTED 51d46: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 51d4c: 508f addql #8,%sp <== NOT EXECUTED 51d4e: 4a00 tstb %d0 <== NOT EXECUTED 51d50: 67a0 beqs 51cf2 <rtems_rfs_rtems_node_type+0x2e> <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
51d52: 2f02 movel %d2,%sp@- <== NOT EXECUTED 51d54: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 51d5a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 51d5c: 4879 0007 2f06 pea 72f06 <ramdisk_ops+0xb28> <== NOT EXECUTED 51d62: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 51d68: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
uint16_t mode;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
51d6c: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 51d70: 486e ffda pea %fp@(-38) <== NOT EXECUTED 51d74: 2f03 movel %d3,%sp@- <== NOT EXECUTED 51d76: 2f0a movel %a2,%sp@- <== NOT EXECUTED 51d78: 4eb9 0005 0300 jsr 50300 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc > 0)
51d7e: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
uint16_t mode;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
51d82: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
51d84: 6e86 bgts 51d0c <rtems_rfs_rtems_node_type+0x48> <== NOT EXECUTED
* system. All directory entries are links to an inode. A link such as a HARD * link is actually the normal path to a regular file, directory, device * etc's inode. Links to inodes can be considered "the real" one, yet they * are all links. */ mode = rtems_rfs_inode_get_mode (&inode);
51d86: 206e ffe6 moveal %fp@(-26),%a0
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
51d8a: 4280 clrl %d0 51d8c: 1028 0002 moveb %a0@(2),%d0 51d90: e188 lsll #8,%d0
if (RTEMS_RFS_S_ISDIR (mode))
51d92: 0280 0000 f000 andil #61440,%d0 51d98: 0c80 0000 4000 cmpil #16384,%d0 51d9e: 6700 00d0 beqw 51e70 <rtems_rfs_rtems_node_type+0x1ac>
type = RTEMS_FILESYSTEM_DIRECTORY;
else if (RTEMS_RFS_S_ISLNK (mode))
51da2: 0c80 0000 a000 cmpil #40960,%d0 51da8: 6700 00cc beqw 51e76 <rtems_rfs_rtems_node_type+0x1b2>
type = RTEMS_FILESYSTEM_SYM_LINK;
else if (RTEMS_RFS_S_ISBLK (mode) || RTEMS_RFS_S_ISCHR (mode))
51dac: 0c80 0000 6000 cmpil #24576,%d0 51db2: 6700 00b6 beqw 51e6a <rtems_rfs_rtems_node_type+0x1a6> 51db6: 0c80 0000 2000 cmpil #8192,%d0 51dbc: 6700 00ac beqw 51e6a <rtems_rfs_rtems_node_type+0x1a6>
type = RTEMS_FILESYSTEM_DEVICE;
else
type = RTEMS_FILESYSTEM_MEMORY_FILE;
51dc0: 7605 moveq #5,%d3
rc = rtems_rfs_inode_close (fs, &inode);
51dc2: 486e ffda pea %fp@(-38) 51dc6: 2f0a movel %a2,%sp@- 51dc8: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close>
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
51dce: 266a 007c moveal %a2@(124),%a3 51dd2: 2400 movel %d0,%d2
if (rc > 0)
51dd4: 508f addql #8,%sp 51dd6: 6e00 ff38 bgtw 51d10 <rtems_rfs_rtems_node_type+0x4c>
rtems_rfs_buffers_release (fs);
51dda: 2f0a movel %a2,%sp@- 51ddc: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release>
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
51de2: 2f13 movel %a3@,%sp@- 51de4: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL)
51dea: 508f addql #8,%sp
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
51dec: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL)
51dee: 6700 ff44 beqw 51d34 <rtems_rfs_rtems_node_type+0x70>
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
51df2: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 51df6: 42a7 clrl %sp@- <== NOT EXECUTED 51df8: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 51dfe: 508f addql #8,%sp <== NOT EXECUTED 51e00: 4a00 tstb %d0 <== NOT EXECUTED 51e02: 6700 ff30 beqw 51d34 <rtems_rfs_rtems_node_type+0x70> <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
51e06: 2f02 movel %d2,%sp@- <== NOT EXECUTED 51e08: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 51e0e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 51e10: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 51e16: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 51e1c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return type;
}
51e20: 2003 movel %d3,%d0 <== NOT EXECUTED 51e22: 4cee 0c0c ffc8 moveml %fp@(-56),%d2-%d3/%a2-%a3 <== NOT EXECUTED 51e28: 4e5e unlk %fp <== NOT EXECUTED 51e2a: 4e75 rts <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
51e2c: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 51e30: 42a7 clrl %sp@- <== NOT EXECUTED 51e32: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 51e38: 508f addql #8,%sp <== NOT EXECUTED 51e3a: 4a00 tstb %d0 <== NOT EXECUTED 51e3c: 6700 feea beqw 51d28 <rtems_rfs_rtems_node_type+0x64> <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
51e40: 2f03 movel %d3,%sp@- <== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
if (rc > 0)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("node_type: closing inode", rc);
51e42: 76ff moveq #-1,%d3 <== NOT EXECUTED 51e44: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 51e4a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 51e4c: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 51e52: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 51e58: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 51e5c: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 51e62: 2040 moveal %d0,%a0 <== NOT EXECUTED 51e64: 2082 movel %d2,%a0@ <== NOT EXECUTED 51e66: 6000 fecc braw 51d34 <rtems_rfs_rtems_node_type+0x70> <== NOT EXECUTED
if (RTEMS_RFS_S_ISDIR (mode))
type = RTEMS_FILESYSTEM_DIRECTORY;
else if (RTEMS_RFS_S_ISLNK (mode))
type = RTEMS_FILESYSTEM_SYM_LINK;
else if (RTEMS_RFS_S_ISBLK (mode) || RTEMS_RFS_S_ISCHR (mode))
type = RTEMS_FILESYSTEM_DEVICE;
51e6a: 7602 moveq #2,%d3 <== NOT EXECUTED 51e6c: 6000 ff54 braw 51dc2 <rtems_rfs_rtems_node_type+0xfe> <== NOT EXECUTED
* etc's inode. Links to inodes can be considered "the real" one, yet they
* are all links.
*/
mode = rtems_rfs_inode_get_mode (&inode);
if (RTEMS_RFS_S_ISDIR (mode))
type = RTEMS_FILESYSTEM_DIRECTORY;
51e70: 7601 moveq #1,%d3 51e72: 6000 ff4e braw 51dc2 <rtems_rfs_rtems_node_type+0xfe>
else if (RTEMS_RFS_S_ISLNK (mode))
type = RTEMS_FILESYSTEM_SYM_LINK;
51e76: 7604 moveq #4,%d3 51e78: 6000 ff48 braw 51dc2 <rtems_rfs_rtems_node_type+0xfe>
00051192 <rtems_rfs_rtems_readlink>:
static ssize_t
rtems_rfs_rtems_readlink (rtems_filesystem_location_info_t* pathloc,
char* buf,
size_t bufsize)
{
51192: 4e56 ffec linkw %fp,#-20 51196: 206e 0008 moveal %fp@(8),%a0
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
5119a: 2268 0010 moveal %a0@(16),%a1
static ssize_t
rtems_rfs_rtems_readlink (rtems_filesystem_location_info_t* pathloc,
char* buf,
size_t bufsize)
{
5119e: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
511a2: 2469 0034 moveal %a1@(52),%a2
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
511a6: 42a7 clrl %sp@- 511a8: 42a7 clrl %sp@-
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
return rtems_rfs_rtems_error ("shutdown: close", rc);
}
511aa: 226a 007c moveal %a2@(124),%a1 511ae: 2f11 movel %a1@,%sp@-
rtems_rfs_rtems_readlink (rtems_filesystem_location_info_t* pathloc,
char* buf,
size_t bufsize)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
511b0: 2610 movel %a0@,%d3 511b2: 4eb9 0004 af20 jsr 4af20 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
511b8: 4fef 000c lea %sp@(12),%sp
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
511bc: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL)
511be: 6674 bnes 51234 <rtems_rfs_rtems_readlink+0xa2> <== NEVER TAKEN
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_READLINK))
printf ("rtems-rfs-rtems: readlink: in: ino:%" PRId32 "\n", ino);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_symlink_read (fs, ino, buf, bufsize, &length);
511c0: 486e fffc pea %fp@(-4) 511c4: 2f2e 0010 movel %fp@(16),%sp@- 511c8: 2f2e 000c movel %fp@(12),%sp@- 511cc: 2f03 movel %d3,%sp@- 511ce: 2f0a movel %a2,%sp@- 511d0: 4eb9 0005 fcc2 jsr 5fcc2 <rtems_rfs_symlink_read>
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
511d6: 266a 007c moveal %a2@(124),%a3 511da: 2400 movel %d0,%d2
if (rc)
511dc: 4fef 0014 lea %sp@(20),%sp
511e0: 672e beqs 51210 <rtems_rfs_rtems_readlink+0x7e> rtems_rfs_buffers_release (fs);
511e2: 2f0a movel %a2,%sp@- 511e4: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release>
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
511ea: 2f13 movel %a3@,%sp@- 511ec: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL)
511f2: 508f addql #8,%sp
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
511f4: 2600 movel %d0,%d3
if (sc != RTEMS_SUCCESSFUL)
511f6: 6600 00a0 bnew 51298 <rtems_rfs_rtems_readlink+0x106>
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("readlink: reading link", rc);
511fa: 4eb9 0006 2548 jsr 62548 <__errno> 51200: 2040 moveal %d0,%a0 51202: 70ff moveq #-1,%d0 51204: 2082 movel %d2,%a0@
}
rtems_rfs_rtems_unlock (fs);
return (int) length;
}
51206: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 5120c: 4e5e unlk %fp 5120e: 4e75 rts 51210: 2f0a movel %a2,%sp@- 51212: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release>
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
51218: 2f13 movel %a3@,%sp@- 5121a: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL)
51220: 508f addql #8,%sp
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
51222: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL)
51224: 6640 bnes 51266 <rtems_rfs_rtems_readlink+0xd4> <== NEVER TAKEN
return rtems_rfs_rtems_error ("readlink: reading link", rc);
}
rtems_rfs_rtems_unlock (fs);
return (int) length;
51226: 202e fffc movel %fp@(-4),%d0
}
5122a: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 51230: 4e5e unlk %fp 51232: 4e75 rts
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
51234: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 51238: 42a7 clrl %sp@- <== NOT EXECUTED 5123a: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 51240: 508f addql #8,%sp <== NOT EXECUTED 51242: 4a00 tstb %d0 <== NOT EXECUTED 51244: 6700 ff7a beqw 511c0 <rtems_rfs_rtems_readlink+0x2e> <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
51248: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5124a: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 51250: 2f00 movel %d0,%sp@- <== NOT EXECUTED 51252: 4879 0007 2f06 pea 72f06 <ramdisk_ops+0xb28> <== NOT EXECUTED 51258: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5125e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 51262: 6000 ff5c braw 511c0 <rtems_rfs_rtems_readlink+0x2e> <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
51266: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 5126a: 42a7 clrl %sp@- <== NOT EXECUTED 5126c: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 51272: 508f addql #8,%sp <== NOT EXECUTED 51274: 4a00 tstb %d0 <== NOT EXECUTED 51276: 67ae beqs 51226 <rtems_rfs_rtems_readlink+0x94> <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
51278: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5127a: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 51280: 2f00 movel %d0,%sp@- <== NOT EXECUTED 51282: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 51288: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED
return rtems_rfs_rtems_error ("readlink: reading link", rc);
}
rtems_rfs_rtems_unlock (fs);
return (int) length;
5128e: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED 51292: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 51296: 6092 bras 5122a <rtems_rfs_rtems_readlink+0x98> <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
51298: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 5129c: 42a7 clrl %sp@- <== NOT EXECUTED 5129e: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 512a4: 508f addql #8,%sp <== NOT EXECUTED 512a6: 4a00 tstb %d0 <== NOT EXECUTED 512a8: 6700 ff50 beqw 511fa <rtems_rfs_rtems_readlink+0x68> <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
512ac: 2f03 movel %d3,%sp@- <== NOT EXECUTED 512ae: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 512b4: 2f00 movel %d0,%sp@- <== NOT EXECUTED 512b6: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 512bc: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 512c2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rc = rtems_rfs_symlink_read (fs, ino, buf, bufsize, &length);
if (rc)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("readlink: reading link", rc);
512c6: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 512cc: 2040 moveal %d0,%a0 <== NOT EXECUTED 512ce: 70ff moveq #-1,%d0 <== NOT EXECUTED 512d0: 2082 movel %d2,%a0@ <== NOT EXECUTED 512d2: 6000 ff32 braw 51206 <rtems_rfs_rtems_readlink+0x74> <== NOT EXECUTED
0005144e <rtems_rfs_rtems_rename>:
static int
rtems_rfs_rtems_rename(rtems_filesystem_location_info_t* old_parent_loc,
rtems_filesystem_location_info_t* old_loc,
rtems_filesystem_location_info_t* new_parent_loc,
const char* new_name)
{
5144e: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED 51452: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (old_loc);
51456: 2268 0010 moveal %a0@(16),%a1 <== NOT EXECUTED
static int
rtems_rfs_rtems_rename(rtems_filesystem_location_info_t* old_parent_loc,
rtems_filesystem_location_info_t* old_loc,
rtems_filesystem_location_info_t* new_parent_loc,
const char* new_name)
{
5145a: 48d7 0cfc moveml %d2-%d7/%a2-%a3,%sp@ <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (old_loc);
5145e: 2469 0034 moveal %a1@(52),%a2 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
51462: 42a7 clrl %sp@- <== NOT EXECUTED
static int
rtems_rfs_rtems_rename(rtems_filesystem_location_info_t* old_parent_loc,
rtems_filesystem_location_info_t* old_loc,
rtems_filesystem_location_info_t* new_parent_loc,
const char* new_name)
{
51464: 242e 0014 movel %fp@(20),%d2 <== NOT EXECUTED 51468: 42a7 clrl %sp@- <== NOT EXECUTED
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
return rtems_rfs_rtems_error ("shutdown: close", rc);
}
5146a: 226a 007c moveal %a2@(124),%a1 <== NOT EXECUTED 5146e: 2f11 movel %a1@,%sp@- <== NOT EXECUTED
rtems_rfs_ino new_parent;
rtems_rfs_ino ino;
uint32_t doff;
int rc;
old_parent = rtems_rfs_rtems_get_pathloc_ino (old_parent_loc);
51470: 226e 0008 moveal %fp@(8),%a1 <== NOT EXECUTED 51474: 2c11 movel %a1@,%d6 <== NOT EXECUTED
new_parent = rtems_rfs_rtems_get_pathloc_ino (new_parent_loc);
51476: 226e 0010 moveal %fp@(16),%a1 <== NOT EXECUTED
ino = rtems_rfs_rtems_get_pathloc_ino (old_loc);
5147a: 2610 movel %a0@,%d3 <== NOT EXECUTED
rtems_rfs_ino ino;
uint32_t doff;
int rc;
old_parent = rtems_rfs_rtems_get_pathloc_ino (old_parent_loc);
new_parent = rtems_rfs_rtems_get_pathloc_ino (new_parent_loc);
5147c: 2a11 movel %a1@,%d5 <== NOT EXECUTED
ino = rtems_rfs_rtems_get_pathloc_ino (old_loc);
doff = rtems_rfs_rtems_get_pathloc_doff (old_loc);
5147e: 2e28 0004 movel %a0@(4),%d7 <== NOT EXECUTED 51482: 4eb9 0004 af20 jsr 4af20 <rtems_semaphore_obtain> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
51488: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
5148c: 2800 movel %d0,%d4 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
5148e: 6600 0098 bnew 51528 <rtems_rfs_rtems_rename+0xda> <== NOT EXECUTED
/*
* Link to the inode before unlinking so the inode is not erased when
* unlinked.
*/
rc = rtems_rfs_link (fs, new_name, strlen (new_name), new_parent, ino, true);
51492: 2f02 movel %d2,%sp@- <== NOT EXECUTED 51494: 4eb9 0006 3c10 jsr 63c10 <strlen> <== NOT EXECUTED 5149a: 7201 moveq #1,%d1 <== NOT EXECUTED 5149c: 2e81 movel %d1,%sp@ <== NOT EXECUTED 5149e: 2f03 movel %d3,%sp@- <== NOT EXECUTED 514a0: 2f05 movel %d5,%sp@- <== NOT EXECUTED 514a2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 514a4: 2f02 movel %d2,%sp@- <== NOT EXECUTED 514a6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 514a8: 4eb9 0005 f3d4 jsr 5f3d4 <rtems_rfs_link> <== NOT EXECUTED
if (rc)
514ae: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
/*
* Link to the inode before unlinking so the inode is not erased when
* unlinked.
*/
rc = rtems_rfs_link (fs, new_name, strlen (new_name), new_parent, ino, true);
514b2: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc)
514b4: 6732 beqs 514e8 <rtems_rfs_rtems_rename+0x9a> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
514b6: 266a 007c moveal %a2@(124),%a3 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
514ba: 2f0a movel %a2,%sp@- <== NOT EXECUTED 514bc: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
514c2: 2f13 movel %a3@,%sp@- <== NOT EXECUTED 514c4: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
514ca: 508f addql #8,%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
514cc: 2600 movel %d0,%d3 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
514ce: 6600 008a bnew 5155a <rtems_rfs_rtems_rename+0x10c> <== NOT EXECUTED
rc = rtems_rfs_unlink (fs, old_parent, ino, doff,
rtems_rfs_unlink_dir_allowed);
if (rc)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("rename: unlinking", rc);
514d2: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 514d8: 2040 moveal %d0,%a0 <== NOT EXECUTED 514da: 70ff moveq #-1,%d0 <== NOT EXECUTED 514dc: 2082 movel %d2,%a0@ <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
514de: 4cee 0cfc ffe0 moveml %fp@(-32),%d2-%d7/%a2-%a3 <== NOT EXECUTED 514e4: 4e5e unlk %fp <== NOT EXECUTED 514e6: 4e75 rts <== NOT EXECUTED
/*
* Unlink all inodes even directories with the dir option as false because a
* directory may not be empty.
*/
rc = rtems_rfs_unlink (fs, old_parent, ino, doff,
514e8: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED 514ec: 2f07 movel %d7,%sp@- <== NOT EXECUTED 514ee: 2f03 movel %d3,%sp@- <== NOT EXECUTED 514f0: 2f06 movel %d6,%sp@- <== NOT EXECUTED 514f2: 2f0a movel %a2,%sp@- <== NOT EXECUTED 514f4: 4eb9 0005 f5aa jsr 5f5aa <rtems_rfs_unlink> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
514fa: 266a 007c moveal %a2@(124),%a3 <== NOT EXECUTED 514fe: 2400 movel %d0,%d2 <== NOT EXECUTED
rtems_rfs_unlink_dir_allowed);
if (rc)
51500: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 51504: 66b4 bnes 514ba <rtems_rfs_rtems_rename+0x6c> <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
51506: 2f0a movel %a2,%sp@- <== NOT EXECUTED 51508: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
5150e: 2f13 movel %a3@,%sp@- <== NOT EXECUTED 51510: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
51516: 508f addql #8,%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
51518: 2400 movel %d0,%d2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
5151a: 667c bnes 51598 <rtems_rfs_rtems_rename+0x14a> <== NOT EXECUTED
return rtems_rfs_rtems_error ("rename: unlinking", rc);
}
rtems_rfs_rtems_unlock (fs);
return 0;
5151c: 4280 clrl %d0 <== NOT EXECUTED
}
5151e: 4cee 0cfc ffe0 moveml %fp@(-32),%d2-%d7/%a2-%a3 <== NOT EXECUTED 51524: 4e5e unlk %fp <== NOT EXECUTED 51526: 4e75 rts <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
51528: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 5152c: 42a7 clrl %sp@- <== NOT EXECUTED 5152e: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 51534: 508f addql #8,%sp <== NOT EXECUTED 51536: 4a00 tstb %d0 <== NOT EXECUTED 51538: 6700 ff58 beqw 51492 <rtems_rfs_rtems_rename+0x44> <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
5153c: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5153e: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 51544: 2f00 movel %d0,%sp@- <== NOT EXECUTED 51546: 4879 0007 2f06 pea 72f06 <ramdisk_ops+0xb28> <== NOT EXECUTED 5154c: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 51552: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 51556: 6000 ff3a braw 51492 <rtems_rfs_rtems_rename+0x44> <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
5155a: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 5155e: 42a7 clrl %sp@- <== NOT EXECUTED 51560: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 51566: 508f addql #8,%sp <== NOT EXECUTED 51568: 4a00 tstb %d0 <== NOT EXECUTED 5156a: 6700 ff66 beqw 514d2 <rtems_rfs_rtems_rename+0x84> <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
5156e: 2f03 movel %d3,%sp@- <== NOT EXECUTED 51570: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 51576: 2f00 movel %d0,%sp@- <== NOT EXECUTED 51578: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 5157e: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 51584: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rc = rtems_rfs_unlink (fs, old_parent, ino, doff,
rtems_rfs_unlink_dir_allowed);
if (rc)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("rename: unlinking", rc);
51588: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 5158e: 2040 moveal %d0,%a0 <== NOT EXECUTED 51590: 70ff moveq #-1,%d0 <== NOT EXECUTED 51592: 2082 movel %d2,%a0@ <== NOT EXECUTED 51594: 6000 ff48 braw 514de <rtems_rfs_rtems_rename+0x90> <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
51598: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 5159c: 42a7 clrl %sp@- <== NOT EXECUTED 5159e: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 515a4: 508f addql #8,%sp <== NOT EXECUTED 515a6: 4a00 tstb %d0 <== NOT EXECUTED 515a8: 6700 ff72 beqw 5151c <rtems_rfs_rtems_rename+0xce> <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
515ac: 2f02 movel %d2,%sp@- <== NOT EXECUTED 515ae: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 515b4: 2f00 movel %d0,%sp@- <== NOT EXECUTED 515b6: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 515bc: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 515c2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
515c6: 4280 clrl %d0 <== NOT EXECUTED
}
515c8: 4cee 0cfc ffe0 moveml %fp@(-32),%d2-%d7/%a2-%a3 <== NOT EXECUTED 515ce: 4e5e unlk %fp <== NOT EXECUTED
00051048 <rtems_rfs_rtems_rmnod>:
* @return int
*/
int
rtems_rfs_rtems_rmnod (rtems_filesystem_location_info_t* parent_pathloc,
rtems_filesystem_location_info_t* pathloc)
{
51048: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED 5104c: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
51050: 2268 0010 moveal %a0@(16),%a1 <== NOT EXECUTED
* @return int
*/
int
rtems_rfs_rtems_rmnod (rtems_filesystem_location_info_t* parent_pathloc,
rtems_filesystem_location_info_t* pathloc)
{
51054: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
51058: 2469 0034 moveal %a1@(52),%a2 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
5105c: 42a7 clrl %sp@- <== NOT EXECUTED 5105e: 42a7 clrl %sp@- <== NOT EXECUTED
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
return rtems_rfs_rtems_error ("shutdown: close", rc);
}
51060: 226a 007c moveal %a2@(124),%a1 <== NOT EXECUTED 51064: 2f11 movel %a1@,%sp@- <== NOT EXECUTED
int
rtems_rfs_rtems_rmnod (rtems_filesystem_location_info_t* parent_pathloc,
rtems_filesystem_location_info_t* pathloc)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parent_pathloc);
51066: 226e 0008 moveal %fp@(8),%a1 <== NOT EXECUTED
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
5106a: 2810 movel %a0@,%d4 <== NOT EXECUTED
int
rtems_rfs_rtems_rmnod (rtems_filesystem_location_info_t* parent_pathloc,
rtems_filesystem_location_info_t* pathloc)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parent_pathloc);
5106c: 2611 movel %a1@,%d3 <== NOT EXECUTED
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc); uint32_t doff = rtems_rfs_rtems_get_pathloc_doff (pathloc);
5106e: 2a28 0004 movel %a0@(4),%d5 <== NOT EXECUTED 51072: 4eb9 0004 af20 jsr 4af20 <rtems_semaphore_obtain> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
51078: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
5107c: 2400 movel %d0,%d2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
5107e: 666c bnes 510ec <rtems_rfs_rtems_rmnod+0xa4> <== NOT EXECUTED
printf ("rtems-rfs: rmnod: parent:%" PRId32 " doff:%" PRIu32 ", ino:%" PRId32 "\n",
parent, doff, ino);
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_unlink (fs, parent, ino, doff, rtems_rfs_unlink_dir_denied);
51080: 42a7 clrl %sp@- <== NOT EXECUTED 51082: 2f05 movel %d5,%sp@- <== NOT EXECUTED 51084: 2f04 movel %d4,%sp@- <== NOT EXECUTED 51086: 2f03 movel %d3,%sp@- <== NOT EXECUTED 51088: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5108a: 4eb9 0005 f5aa jsr 5f5aa <rtems_rfs_unlink> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
51090: 266a 007c moveal %a2@(124),%a3 <== NOT EXECUTED 51094: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc)
51096: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 5109a: 672e beqs 510ca <rtems_rfs_rtems_rmnod+0x82> <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
5109c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5109e: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
510a4: 2f13 movel %a3@,%sp@- <== NOT EXECUTED 510a6: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
510ac: 508f addql #8,%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
510ae: 2600 movel %d0,%d3 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
510b0: 6600 00a2 bnew 51154 <rtems_rfs_rtems_rmnod+0x10c> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("rmnod: unlinking", rc);
510b4: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 510ba: 2040 moveal %d0,%a0 <== NOT EXECUTED 510bc: 70ff moveq #-1,%d0 <== NOT EXECUTED 510be: 2082 movel %d2,%a0@ <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
510c0: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 <== NOT EXECUTED 510c6: 4e5e unlk %fp <== NOT EXECUTED 510c8: 4e75 rts <== NOT EXECUTED 510ca: 2f0a movel %a2,%sp@- <== NOT EXECUTED 510cc: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
510d2: 2f13 movel %a3@,%sp@- <== NOT EXECUTED 510d4: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
510da: 508f addql #8,%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
510dc: 2400 movel %d0,%d2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
510de: 663c bnes 5111c <rtems_rfs_rtems_rmnod+0xd4> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("rmnod: unlinking", rc);
}
rtems_rfs_rtems_unlock (fs);
return 0;
510e0: 4280 clrl %d0 <== NOT EXECUTED
}
510e2: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 <== NOT EXECUTED 510e8: 4e5e unlk %fp <== NOT EXECUTED 510ea: 4e75 rts <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
510ec: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 510f0: 42a7 clrl %sp@- <== NOT EXECUTED 510f2: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 510f8: 508f addql #8,%sp <== NOT EXECUTED 510fa: 4a00 tstb %d0 <== NOT EXECUTED 510fc: 6782 beqs 51080 <rtems_rfs_rtems_rmnod+0x38> <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
510fe: 2f02 movel %d2,%sp@- <== NOT EXECUTED 51100: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 51106: 2f00 movel %d0,%sp@- <== NOT EXECUTED 51108: 4879 0007 2f06 pea 72f06 <ramdisk_ops+0xb28> <== NOT EXECUTED 5110e: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 51114: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 51118: 6000 ff66 braw 51080 <rtems_rfs_rtems_rmnod+0x38> <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
5111c: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 51120: 42a7 clrl %sp@- <== NOT EXECUTED 51122: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 51128: 508f addql #8,%sp <== NOT EXECUTED 5112a: 4a00 tstb %d0 <== NOT EXECUTED 5112c: 67b2 beqs 510e0 <rtems_rfs_rtems_rmnod+0x98> <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
5112e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 51130: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 51136: 2f00 movel %d0,%sp@- <== NOT EXECUTED 51138: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 5113e: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 51144: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("rmnod: unlinking", rc);
}
rtems_rfs_rtems_unlock (fs);
return 0;
51148: 4280 clrl %d0 <== NOT EXECUTED
}
5114a: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 <== NOT EXECUTED 51150: 4e5e unlk %fp <== NOT EXECUTED 51152: 4e75 rts <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
51154: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 51158: 42a7 clrl %sp@- <== NOT EXECUTED 5115a: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 51160: 508f addql #8,%sp <== NOT EXECUTED 51162: 4a00 tstb %d0 <== NOT EXECUTED 51164: 6700 ff4e beqw 510b4 <rtems_rfs_rtems_rmnod+0x6c> <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
51168: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5116a: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 51170: 2f00 movel %d0,%sp@- <== NOT EXECUTED 51172: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 51178: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5117e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rc = rtems_rfs_unlink (fs, parent, ino, doff, rtems_rfs_unlink_dir_denied);
if (rc)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("rmnod: unlinking", rc);
51182: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 51188: 2040 moveal %d0,%a0 <== NOT EXECUTED 5118a: 70ff moveq #-1,%d0 <== NOT EXECUTED 5118c: 2082 movel %d2,%a0@ <== NOT EXECUTED 5118e: 6000 ff30 braw 510c0 <rtems_rfs_rtems_rmnod+0x78> <== NOT EXECUTED
000536fc <rtems_rfs_rtems_set_handlers>:
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
536fc: 4280 clrl %d0 536fe: 4281 clrl %d1
*/
bool
rtems_rfs_rtems_set_handlers (rtems_filesystem_location_info_t* loc,
rtems_rfs_inode_handle* inode)
{
53700: 4e56 0000 linkw %fp,#0 53704: 206e 000c moveal %fp@(12),%a0
{
/*
* Mapping matches RTEMS so no need to change.
*/
return imode;
}
53708: 2068 000c moveal %a0@(12),%a0 5370c: 1028 0002 moveb %a0@(2),%d0 53710: 1228 0003 moveb %a0@(3),%d1 53714: e188 lsll #8,%d0
*/
bool
rtems_rfs_rtems_set_handlers (rtems_filesystem_location_info_t* loc,
rtems_rfs_inode_handle* inode)
{
53716: 206e 0008 moveal %fp@(8),%a0
uint16_t mode = rtems_rfs_inode_get_mode (inode); loc->handlers = NULL; if (RTEMS_RFS_S_ISDIR (mode))
5371a: 8081 orl %d1,%d0
bool
rtems_rfs_rtems_set_handlers (rtems_filesystem_location_info_t* loc,
rtems_rfs_inode_handle* inode)
{
uint16_t mode = rtems_rfs_inode_get_mode (inode);
loc->handlers = NULL;
5371c: 42a8 0008 clrl %a0@(8)
if (RTEMS_RFS_S_ISDIR (mode))
53720: 2200 movel %d0,%d1 53722: 0281 0000 f000 andil #61440,%d1 53728: 0c81 0000 4000 cmpil #16384,%d1
5372e: 6756 beqs 53786 <rtems_rfs_rtems_set_handlers+0x8a>
loc->handlers = rtems_rfs_rtems_handlers (dir);
else if (RTEMS_RFS_S_ISCHR (mode) || RTEMS_RFS_S_ISBLK(mode))
53730: 0c81 0000 2000 cmpil #8192,%d1
53736: 672e beqs 53766 <rtems_rfs_rtems_set_handlers+0x6a><== NEVER TAKEN
53738: 0c81 0000 6000 cmpil #24576,%d1
5373e: 6726 beqs 53766 <rtems_rfs_rtems_set_handlers+0x6a><== NEVER TAKEN
loc->handlers = rtems_rfs_rtems_handlers (device);
else if (RTEMS_RFS_S_ISLNK (mode))
53740: 0c81 0000 a000 cmpil #40960,%d1
53746: 672e beqs 53776 <rtems_rfs_rtems_set_handlers+0x7a>
loc->handlers = rtems_rfs_rtems_handlers (link);
else if (RTEMS_RFS_S_ISREG (mode))
53748: 0c81 0000 8000 cmpil #32768,%d1
5374e: 6746 beqs 53796 <rtems_rfs_rtems_set_handlers+0x9a><== ALWAYS TAKEN
loc->handlers = rtems_rfs_rtems_handlers (file);
else
{
printf ("rtems-rfs: mode type unknown: %04x\n", mode);
53750: 2f00 movel %d0,%sp@- <== NOT EXECUTED 53752: 4879 0007 2fd2 pea 72fd2 <rtems_rfs_rtems_link_handlers+0x38><== NOT EXECUTED 53758: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED
return false;
5375e: 508f addql #8,%sp <== NOT EXECUTED
} return true; }
53760: 4e5e unlk %fp <== NOT EXECUTED
else if (RTEMS_RFS_S_ISREG (mode))
loc->handlers = rtems_rfs_rtems_handlers (file);
else
{
printf ("rtems-rfs: mode type unknown: %04x\n", mode);
return false;
53762: 4200 clrb %d0 <== NOT EXECUTED
} return true; }
53764: 4e75 rts <== NOT EXECUTED 53766: 4e5e unlk %fp <== NOT EXECUTED
uint16_t mode = rtems_rfs_inode_get_mode (inode);
loc->handlers = NULL;
if (RTEMS_RFS_S_ISDIR (mode))
loc->handlers = rtems_rfs_rtems_handlers (dir);
else if (RTEMS_RFS_S_ISCHR (mode) || RTEMS_RFS_S_ISBLK(mode))
loc->handlers = rtems_rfs_rtems_handlers (device);
53768: 203c 0007 4aa4 movel #477860,%d0 <== NOT EXECUTED 5376e: 2140 0008 movel %d0,%a0@(8) <== NOT EXECUTED
else
{
printf ("rtems-rfs: mode type unknown: %04x\n", mode);
return false;
}
return true;
53772: 7001 moveq #1,%d0 <== NOT EXECUTED
}
53774: 4e75 rts <== NOT EXECUTED
53776: 4e5e unlk %fp
if (RTEMS_RFS_S_ISDIR (mode))
loc->handlers = rtems_rfs_rtems_handlers (dir);
else if (RTEMS_RFS_S_ISCHR (mode) || RTEMS_RFS_S_ISBLK(mode))
loc->handlers = rtems_rfs_rtems_handlers (device);
else if (RTEMS_RFS_S_ISLNK (mode))
loc->handlers = rtems_rfs_rtems_handlers (link);
53778: 203c 0007 2f9a movel #470938,%d0 5377e: 2140 0008 movel %d0,%a0@(8)
else
{
printf ("rtems-rfs: mode type unknown: %04x\n", mode);
return false;
}
return true;
53782: 7001 moveq #1,%d0
}
53784: 4e75 rts 53786: 4e5e unlk %fp
rtems_rfs_inode_handle* inode)
{
uint16_t mode = rtems_rfs_inode_get_mode (inode);
loc->handlers = NULL;
if (RTEMS_RFS_S_ISDIR (mode))
loc->handlers = rtems_rfs_rtems_handlers (dir);
53788: 203c 0007 4adc movel #477916,%d0 5378e: 2140 0008 movel %d0,%a0@(8)
else
{
printf ("rtems-rfs: mode type unknown: %04x\n", mode);
return false;
}
return true;
53792: 7001 moveq #1,%d0
}
53794: 4e75 rts 53796: 4e5e unlk %fp
else if (RTEMS_RFS_S_ISCHR (mode) || RTEMS_RFS_S_ISBLK(mode))
loc->handlers = rtems_rfs_rtems_handlers (device);
else if (RTEMS_RFS_S_ISLNK (mode))
loc->handlers = rtems_rfs_rtems_handlers (link);
else if (RTEMS_RFS_S_ISREG (mode))
loc->handlers = rtems_rfs_rtems_handlers (file);
53798: 203c 0007 4b14 movel #477972,%d0 5379e: 2140 0008 movel %d0,%a0@(8)
else
{
printf ("rtems-rfs: mode type unknown: %04x\n", mode);
return false;
}
return true;
537a2: 7001 moveq #1,%d0 <== NOT EXECUTED
}
00050cc8 <rtems_rfs_rtems_statvfs>:
* @return int
*/
static int
rtems_rfs_rtems_statvfs (rtems_filesystem_location_info_t* pathloc,
struct statvfs* sb)
{
50cc8: 4e56 ffec linkw %fp,#-20 <== NOT EXECUTED 50ccc: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
50cd0: 2068 0010 moveal %a0@(16),%a0 <== NOT EXECUTED
* @return int
*/
static int
rtems_rfs_rtems_statvfs (rtems_filesystem_location_info_t* pathloc,
struct statvfs* sb)
{
50cd4: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
50cd8: 2668 0034 moveal %a0@(52),%a3 <== NOT EXECUTED
size_t blocks;
size_t inodes;
rtems_rfs_group_usage (fs, &blocks, &inodes);
50cdc: 486e fffc pea %fp@(-4) <== NOT EXECUTED 50ce0: 486e fff8 pea %fp@(-8) <== NOT EXECUTED
* @return int
*/
static int
rtems_rfs_rtems_statvfs (rtems_filesystem_location_info_t* pathloc,
struct statvfs* sb)
{
50ce4: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
size_t blocks;
size_t inodes;
rtems_rfs_group_usage (fs, &blocks, &inodes);
50ce8: 2f0b movel %a3,%sp@- <== NOT EXECUTED 50cea: 4eb9 0005 01bc jsr 501bc <rtems_rfs_group_usage> <== NOT EXECUTED
sb->f_bsize = rtems_rfs_fs_block_size (fs);
sb->f_frsize = rtems_rfs_fs_media_block_size (fs);
50cf0: 206b 000c moveal %a3@(12),%a0 <== NOT EXECUTED
sb->f_fsid = RTEMS_RFS_SB_MAGIC;
sb->f_flag = rtems_rfs_fs_flags (fs);
sb->f_namemax = rtems_rfs_fs_max_name (fs);
return 0;
}
50cf4: 4280 clrl %d0 <== NOT EXECUTED
rtems_rfs_group_usage (fs, &blocks, &inodes);
sb->f_bsize = rtems_rfs_fs_block_size (fs);
sb->f_frsize = rtems_rfs_fs_media_block_size (fs);
sb->f_blocks = rtems_rfs_fs_media_blocks (fs);
sb->f_bfree = rtems_rfs_fs_blocks (fs) - blocks;
50cf6: 226b 0004 moveal %a3@(4),%a1 <== NOT EXECUTED 50cfa: 93ee fff8 subal %fp@(-8),%a1 <== NOT EXECUTED
rtems_rfs_group_usage (fs, &blocks, &inodes);
sb->f_bsize = rtems_rfs_fs_block_size (fs);
sb->f_frsize = rtems_rfs_fs_media_block_size (fs);
sb->f_blocks = rtems_rfs_fs_media_blocks (fs);
50cfe: 2428 001c movel %a0@(28),%d2 <== NOT EXECUTED
size_t blocks;
size_t inodes;
rtems_rfs_group_usage (fs, &blocks, &inodes);
sb->f_bsize = rtems_rfs_fs_block_size (fs);
50d02: 24ab 0008 movel %a3@(8),%a2@ <== NOT EXECUTED
sb->f_frsize = rtems_rfs_fs_media_block_size (fs);
50d06: 2568 0024 0004 movel %a0@(36),%a2@(4) <== NOT EXECUTED
sb->f_blocks = rtems_rfs_fs_media_blocks (fs); sb->f_bfree = rtems_rfs_fs_blocks (fs) - blocks; sb->f_bavail = sb->f_bfree; sb->f_files = rtems_rfs_fs_inodes (fs);
50d0c: 206b 0010 moveal %a3@(16),%a0 <== NOT EXECUTED
sb->f_ffree = rtems_rfs_fs_inodes (fs) - inodes;
50d10: 2208 movel %a0,%d1 <== NOT EXECUTED 50d12: 92ae fffc subl %fp@(-4),%d1 <== NOT EXECUTED
sb->f_favail = sb->f_ffree; sb->f_fsid = RTEMS_RFS_SB_MAGIC; sb->f_flag = rtems_rfs_fs_flags (fs);
50d16: 2553 0030 movel %a3@,%a2@(48) <== NOT EXECUTED
sb->f_namemax = rtems_rfs_fs_max_name (fs);
50d1a: 256b 0018 0034 movel %a3@(24),%a2@(52) <== NOT EXECUTED
sb->f_frsize = rtems_rfs_fs_media_block_size (fs); sb->f_blocks = rtems_rfs_fs_media_blocks (fs); sb->f_bfree = rtems_rfs_fs_blocks (fs) - blocks; sb->f_bavail = sb->f_bfree; sb->f_files = rtems_rfs_fs_inodes (fs); sb->f_ffree = rtems_rfs_fs_inodes (fs) - inodes;
50d20: 2541 0024 movel %d1,%a2@(36) <== NOT EXECUTED
sb->f_favail = sb->f_ffree;
50d24: 2541 0028 movel %d1,%a2@(40) <== NOT EXECUTED
sb->f_fsid = RTEMS_RFS_SB_MAGIC;
50d28: 223c 2809 2001 movel #671686657,%d1 <== NOT EXECUTED
rtems_rfs_group_usage (fs, &blocks, &inodes);
sb->f_bsize = rtems_rfs_fs_block_size (fs);
sb->f_frsize = rtems_rfs_fs_media_block_size (fs);
sb->f_blocks = rtems_rfs_fs_media_blocks (fs);
50d2e: 2542 000c movel %d2,%a2@(12) <== NOT EXECUTED 50d32: 42aa 0008 clrl %a2@(8) <== NOT EXECUTED
sb->f_bfree = rtems_rfs_fs_blocks (fs) - blocks;
50d36: 42aa 0010 clrl %a2@(16) <== NOT EXECUTED 50d3a: 2549 0014 movel %a1,%a2@(20) <== NOT EXECUTED
sb->f_bavail = sb->f_bfree;
50d3e: 42aa 0018 clrl %a2@(24) <== NOT EXECUTED 50d42: 2549 001c movel %a1,%a2@(28) <== NOT EXECUTED
sb->f_files = rtems_rfs_fs_inodes (fs);
50d46: 2548 0020 movel %a0,%a2@(32) <== NOT EXECUTED
sb->f_ffree = rtems_rfs_fs_inodes (fs) - inodes; sb->f_favail = sb->f_ffree; sb->f_fsid = RTEMS_RFS_SB_MAGIC;
50d4a: 2541 002c movel %d1,%a2@(44) <== NOT EXECUTED
sb->f_flag = rtems_rfs_fs_flags (fs);
sb->f_namemax = rtems_rfs_fs_max_name (fs);
return 0;
}
50d4e: 4cee 0c04 ffec moveml %fp@(-20),%d2/%a2-%a3 <== NOT EXECUTED 50d54: 4e5e unlk %fp <== NOT EXECUTED
000512d6 <rtems_rfs_rtems_symlink>:
static int
rtems_rfs_rtems_symlink (rtems_filesystem_location_info_t* parent_loc,
const char* link_name,
const char* node_name)
{
512d6: 4e56 ffe0 linkw %fp,#-32 512da: 206e 0008 moveal %fp@(8),%a0
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (parent_loc);
512de: 2268 0010 moveal %a0@(16),%a1
static int
rtems_rfs_rtems_symlink (rtems_filesystem_location_info_t* parent_loc,
const char* link_name,
const char* node_name)
{
512e2: 48d7 0cfc moveml %d2-%d7/%a2-%a3,%sp@
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (parent_loc);
512e6: 2469 0034 moveal %a1@(52),%a2
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parent_loc);
512ea: 2e10 movel %a0@,%d7
static int
rtems_rfs_rtems_symlink (rtems_filesystem_location_info_t* parent_loc,
const char* link_name,
const char* node_name)
{
512ec: 262e 000c movel %fp@(12),%d3 512f0: 242e 0010 movel %fp@(16),%d2
uid_t uid;
gid_t gid;
int rc;
#if defined(RTEMS_POSIX_API)
uid = geteuid ();
512f4: 4eb9 0005 7818 jsr 57818 <geteuid> 512fa: 3a00 movew %d0,%d5
gid = getegid ();
512fc: 4eb9 0005 7804 jsr 57804 <getegid>
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
51302: 42a7 clrl %sp@- 51304: 3c00 movew %d0,%d6 51306: 42a7 clrl %sp@-
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
return rtems_rfs_rtems_error ("shutdown: close", rc);
}
51308: 206a 007c moveal %a2@(124),%a0 5130c: 2f10 movel %a0@,%sp@- 5130e: 4eb9 0004 af20 jsr 4af20 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
51314: 4fef 000c lea %sp@(12),%sp
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
51318: 2640 moveal %d0,%a3
if (sc != RTEMS_SUCCESSFUL)
5131a: 4a80 tstl %d0 5131c: 6600 0088 bnew 513a6 <rtems_rfs_rtems_symlink+0xd0>
#endif
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_symlink (fs, node_name, strlen (node_name),
link_name, strlen (link_name),
51320: 2f03 movel %d3,%sp@- 51322: 47f9 0006 3c10 lea 63c10 <strlen>,%a3 51328: 4e93 jsr %a3@ 5132a: 2800 movel %d0,%d4
gid = 0;
#endif
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_symlink (fs, node_name, strlen (node_name),
5132c: 2e82 movel %d2,%sp@ 5132e: 4e93 jsr %a3@ 51330: 2e87 movel %d7,%sp@ 51332: 3f06 movew %d6,%sp@- 51334: 4267 clrw %sp@- 51336: 3f05 movew %d5,%sp@- 51338: 4267 clrw %sp@- 5133a: 2f04 movel %d4,%sp@- 5133c: 2f03 movel %d3,%sp@- 5133e: 2f00 movel %d0,%sp@- 51340: 2f02 movel %d2,%sp@- 51342: 2f0a movel %a2,%sp@- 51344: 4eb9 0005 fa0c jsr 5fa0c <rtems_rfs_symlink>
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
5134a: 266a 007c moveal %a2@(124),%a3 5134e: 2400 movel %d0,%d2
link_name, strlen (link_name),
uid, gid, parent);
if (rc)
51350: 4fef 0020 lea %sp@(32),%sp
51354: 672e beqs 51384 <rtems_rfs_rtems_symlink+0xae> <== ALWAYS TAKEN
rtems_rfs_buffers_release (fs);
51356: 2f0a movel %a2,%sp@- <== NOT EXECUTED 51358: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
5135e: 2f13 movel %a3@,%sp@- <== NOT EXECUTED 51360: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
51366: 508f addql #8,%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
51368: 2600 movel %d0,%d3 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
5136a: 6600 00a4 bnew 51410 <rtems_rfs_rtems_symlink+0x13a> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("symlink: linking", rc);
5136e: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 51374: 2040 moveal %d0,%a0 <== NOT EXECUTED 51376: 70ff moveq #-1,%d0 <== NOT EXECUTED 51378: 2082 movel %d2,%a0@ <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
5137a: 4cee 0cfc ffe0 moveml %fp@(-32),%d2-%d7/%a2-%a3 <== NOT EXECUTED 51380: 4e5e unlk %fp <== NOT EXECUTED 51382: 4e75 rts <== NOT EXECUTED
51384: 2f0a movel %a2,%sp@- 51386: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release>
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
5138c: 2f13 movel %a3@,%sp@- 5138e: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL)
51394: 508f addql #8,%sp
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
51396: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL)
51398: 663e bnes 513d8 <rtems_rfs_rtems_symlink+0x102> <== NEVER TAKEN
return rtems_rfs_rtems_error ("symlink: linking", rc);
}
rtems_rfs_rtems_unlock (fs);
return 0;
5139a: 4280 clrl %d0
}
5139c: 4cee 0cfc ffe0 moveml %fp@(-32),%d2-%d7/%a2-%a3 513a2: 4e5e unlk %fp 513a4: 4e75 rts
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
513a6: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 513aa: 42a7 clrl %sp@- <== NOT EXECUTED 513ac: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 513b2: 508f addql #8,%sp <== NOT EXECUTED 513b4: 4a00 tstb %d0 <== NOT EXECUTED 513b6: 6700 ff68 beqw 51320 <rtems_rfs_rtems_symlink+0x4a> <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
513ba: 2f0b movel %a3,%sp@- <== NOT EXECUTED 513bc: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 513c2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 513c4: 4879 0007 2f06 pea 72f06 <ramdisk_ops+0xb28> <== NOT EXECUTED 513ca: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 513d0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 513d4: 6000 ff4a braw 51320 <rtems_rfs_rtems_symlink+0x4a> <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
513d8: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 513dc: 42a7 clrl %sp@- <== NOT EXECUTED 513de: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 513e4: 508f addql #8,%sp <== NOT EXECUTED 513e6: 4a00 tstb %d0 <== NOT EXECUTED 513e8: 67b0 beqs 5139a <rtems_rfs_rtems_symlink+0xc4> <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
513ea: 2f02 movel %d2,%sp@- <== NOT EXECUTED 513ec: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 513f2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 513f4: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 513fa: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 51400: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
return rtems_rfs_rtems_error ("symlink: linking", rc);
}
rtems_rfs_rtems_unlock (fs);
return 0;
51404: 4280 clrl %d0 <== NOT EXECUTED
}
51406: 4cee 0cfc ffe0 moveml %fp@(-32),%d2-%d7/%a2-%a3 <== NOT EXECUTED 5140c: 4e5e unlk %fp <== NOT EXECUTED 5140e: 4e75 rts <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
51410: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 51414: 42a7 clrl %sp@- <== NOT EXECUTED 51416: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 5141c: 508f addql #8,%sp <== NOT EXECUTED 5141e: 4a00 tstb %d0 <== NOT EXECUTED 51420: 6700 ff4c beqw 5136e <rtems_rfs_rtems_symlink+0x98> <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
51424: 2f03 movel %d3,%sp@- <== NOT EXECUTED 51426: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 5142c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5142e: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 51434: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5143a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
link_name, strlen (link_name),
uid, gid, parent);
if (rc)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("symlink: linking", rc);
5143e: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 51444: 2040 moveal %d0,%a0 <== NOT EXECUTED 51446: 70ff moveq #-1,%d0 <== NOT EXECUTED 51448: 2082 movel %d2,%a0@ <== NOT EXECUTED 5144a: 6000 ff2e braw 5137a <rtems_rfs_rtems_symlink+0xa4> <== NOT EXECUTED
00050da8 <rtems_rfs_rtems_unlink>:
*/
static int
rtems_rfs_rtems_unlink (rtems_filesystem_location_info_t* parent_loc,
rtems_filesystem_location_info_t* loc)
{
50da8: 4e56 ffe8 linkw %fp,#-24 50dac: 226e 0008 moveal %fp@(8),%a1
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (parent_loc);
50db0: 2069 0010 moveal %a1@(16),%a0
*/
static int
rtems_rfs_rtems_unlink (rtems_filesystem_location_info_t* parent_loc,
rtems_filesystem_location_info_t* loc)
{
50db4: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (parent_loc);
50db8: 2468 0034 moveal %a0@(52),%a2
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
50dbc: 42a7 clrl %sp@-
*/
static int
rtems_rfs_rtems_unlink (rtems_filesystem_location_info_t* parent_loc,
rtems_filesystem_location_info_t* loc)
{
50dbe: 206e 000c moveal %fp@(12),%a0 50dc2: 42a7 clrl %sp@-
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
return rtems_rfs_rtems_error ("shutdown: close", rc);
}
50dc4: 266a 007c moveal %a2@(124),%a3 50dc8: 2f13 movel %a3@,%sp@-
static int
rtems_rfs_rtems_unlink (rtems_filesystem_location_info_t* parent_loc,
rtems_filesystem_location_info_t* loc)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (parent_loc);
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parent_loc);
50dca: 2611 movel %a1@,%d3
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (loc);
50dcc: 2810 movel %a0@,%d4
uint32_t doff = rtems_rfs_rtems_get_pathloc_doff (loc);
50dce: 2a28 0004 movel %a0@(4),%d5 50dd2: 4eb9 0004 af20 jsr 4af20 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
50dd8: 4fef 000c lea %sp@(12),%sp
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
50ddc: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL)
50dde: 666c bnes 50e4c <rtems_rfs_rtems_unlink+0xa4> <== NEVER TAKEN
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_UNLINK))
printf("rtems-rfs-rtems: unlink: parent:%" PRId32 " doff:%" PRIu32 " ino:%" PRId32 "\n",
parent, doff, ino);
rc = rtems_rfs_unlink (fs, parent, ino, doff, rtems_rfs_unlink_dir_denied);
50de0: 42a7 clrl %sp@- 50de2: 2f05 movel %d5,%sp@- 50de4: 2f04 movel %d4,%sp@- 50de6: 2f03 movel %d3,%sp@- 50de8: 2f0a movel %a2,%sp@- 50dea: 4eb9 0005 f5aa jsr 5f5aa <rtems_rfs_unlink>
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
50df0: 266a 007c moveal %a2@(124),%a3 50df4: 2400 movel %d0,%d2
if (rc)
50df6: 4fef 0014 lea %sp@(20),%sp
50dfa: 672e beqs 50e2a <rtems_rfs_rtems_unlink+0x82> <== ALWAYS TAKEN
rtems_rfs_buffers_release (fs);
50dfc: 2f0a movel %a2,%sp@- <== NOT EXECUTED 50dfe: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
50e04: 2f13 movel %a3@,%sp@- <== NOT EXECUTED 50e06: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
50e0c: 508f addql #8,%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
50e0e: 2600 movel %d0,%d3 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
50e10: 6600 00a2 bnew 50eb4 <rtems_rfs_rtems_unlink+0x10c> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("unlink: unlink inode", rc);
50e14: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 50e1a: 2040 moveal %d0,%a0 <== NOT EXECUTED 50e1c: 70ff moveq #-1,%d0 <== NOT EXECUTED 50e1e: 2082 movel %d2,%a0@ <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
50e20: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 <== NOT EXECUTED 50e26: 4e5e unlk %fp <== NOT EXECUTED 50e28: 4e75 rts <== NOT EXECUTED
50e2a: 2f0a movel %a2,%sp@- 50e2c: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release>
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
50e32: 2f13 movel %a3@,%sp@- 50e34: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL)
50e3a: 508f addql #8,%sp
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
50e3c: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL)
50e3e: 663c bnes 50e7c <rtems_rfs_rtems_unlink+0xd4> <== NEVER TAKEN
return rtems_rfs_rtems_error ("unlink: unlink inode", rc);
}
rtems_rfs_rtems_unlock (fs);
return 0;
50e40: 4280 clrl %d0
}
50e42: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 50e48: 4e5e unlk %fp 50e4a: 4e75 rts
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
50e4c: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 50e50: 42a7 clrl %sp@- <== NOT EXECUTED 50e52: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 50e58: 508f addql #8,%sp <== NOT EXECUTED 50e5a: 4a00 tstb %d0 <== NOT EXECUTED 50e5c: 6782 beqs 50de0 <rtems_rfs_rtems_unlink+0x38> <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
50e5e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 50e60: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 50e66: 2f00 movel %d0,%sp@- <== NOT EXECUTED 50e68: 4879 0007 2f06 pea 72f06 <ramdisk_ops+0xb28> <== NOT EXECUTED 50e6e: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 50e74: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 50e78: 6000 ff66 braw 50de0 <rtems_rfs_rtems_unlink+0x38> <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
50e7c: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 50e80: 42a7 clrl %sp@- <== NOT EXECUTED 50e82: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 50e88: 508f addql #8,%sp <== NOT EXECUTED 50e8a: 4a00 tstb %d0 <== NOT EXECUTED 50e8c: 67b2 beqs 50e40 <rtems_rfs_rtems_unlink+0x98> <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
50e8e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 50e90: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 50e96: 2f00 movel %d0,%sp@- <== NOT EXECUTED 50e98: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 50e9e: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 50ea4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
return rtems_rfs_rtems_error ("unlink: unlink inode", rc);
}
rtems_rfs_rtems_unlock (fs);
return 0;
50ea8: 4280 clrl %d0 <== NOT EXECUTED
}
50eaa: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 <== NOT EXECUTED 50eb0: 4e5e unlk %fp <== NOT EXECUTED 50eb2: 4e75 rts <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
50eb4: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 50eb8: 42a7 clrl %sp@- <== NOT EXECUTED 50eba: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 50ec0: 508f addql #8,%sp <== NOT EXECUTED 50ec2: 4a00 tstb %d0 <== NOT EXECUTED 50ec4: 6700 ff4e beqw 50e14 <rtems_rfs_rtems_unlink+0x6c> <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
50ec8: 2f03 movel %d3,%sp@- <== NOT EXECUTED 50eca: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 50ed0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 50ed2: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 50ed8: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 50ede: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rc = rtems_rfs_unlink (fs, parent, ino, doff, rtems_rfs_unlink_dir_denied);
if (rc)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("unlink: unlink inode", rc);
50ee2: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 50ee8: 2040 moveal %d0,%a0 <== NOT EXECUTED 50eea: 70ff moveq #-1,%d0 <== NOT EXECUTED 50eec: 2082 movel %d2,%a0@ <== NOT EXECUTED 50eee: 6000 ff30 braw 50e20 <rtems_rfs_rtems_unlink+0x78> <== NOT EXECUTED
000515d2 <rtems_rfs_rtems_utime>:
static int
rtems_rfs_rtems_utime(rtems_filesystem_location_info_t* pathloc,
time_t atime,
time_t mtime)
{
515d2: 4e56 ffb8 linkw %fp,#-72 <== NOT EXECUTED 515d6: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
515da: 2268 0010 moveal %a0@(16),%a1 <== NOT EXECUTED
static int
rtems_rfs_rtems_utime(rtems_filesystem_location_info_t* pathloc,
time_t atime,
time_t mtime)
{
515de: 48d7 0cfc moveml %d2-%d7/%a2-%a3,%sp@ <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
515e2: 2469 0034 moveal %a1@(52),%a2 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
515e6: 42a7 clrl %sp@- <== NOT EXECUTED
static int
rtems_rfs_rtems_utime(rtems_filesystem_location_info_t* pathloc,
time_t atime,
time_t mtime)
{
515e8: 262e 000c movel %fp@(12),%d3 <== NOT EXECUTED 515ec: 42a7 clrl %sp@- <== NOT EXECUTED
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
return rtems_rfs_rtems_error ("shutdown: close", rc);
}
515ee: 226a 007c moveal %a2@(124),%a1 <== NOT EXECUTED 515f2: 2f11 movel %a1@,%sp@- <== NOT EXECUTED
static int
rtems_rfs_rtems_utime(rtems_filesystem_location_info_t* pathloc,
time_t atime,
time_t mtime)
{
515f4: 242e 0010 movel %fp@(16),%d2 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc); rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
515f8: 2a10 movel %a0@,%d5 <== NOT EXECUTED 515fa: 4eb9 0004 af20 jsr 4af20 <rtems_semaphore_obtain> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
51600: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
51604: 2800 movel %d0,%d4 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
51606: 6600 00da bnew 516e2 <rtems_rfs_rtems_utime+0x110> <== NOT EXECUTED
rtems_rfs_inode_handle inode;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
5160a: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 5160e: 47ee ffda lea %fp@(-38),%a3 <== NOT EXECUTED 51612: 2f0b movel %a3,%sp@- <== NOT EXECUTED 51614: 2f05 movel %d5,%sp@- <== NOT EXECUTED 51616: 2f0a movel %a2,%sp@- <== NOT EXECUTED 51618: 4eb9 0005 0300 jsr 50300 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc)
5161e: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rtems_rfs_inode_handle inode;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
51622: 2800 movel %d0,%d4 <== NOT EXECUTED
if (rc)
51624: 6732 beqs 51658 <rtems_rfs_rtems_utime+0x86> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
51626: 266a 007c moveal %a2@(124),%a3 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
5162a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5162c: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
51632: 2f13 movel %a3@,%sp@- <== NOT EXECUTED 51634: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
5163a: 508f addql #8,%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
5163c: 2400 movel %d0,%d2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
5163e: 6600 00f8 bnew 51738 <rtems_rfs_rtems_utime+0x166> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("utime: read inode", rc);
51642: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 51648: 2040 moveal %d0,%a0 <== NOT EXECUTED 5164a: 70ff moveq #-1,%d0 <== NOT EXECUTED 5164c: 2084 movel %d4,%a0@ <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
5164e: 4cee 0cfc ffb8 moveml %fp@(-72),%d2-%d7/%a2-%a3 <== NOT EXECUTED 51654: 4e5e unlk %fp <== NOT EXECUTED 51656: 4e75 rts <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_atime (rtems_rfs_inode_handle* handle,
rtems_rfs_time atime)
{
rtems_rfs_write_u32 (&handle->node->atime, atime);
51658: 7018 moveq #24,%d0 <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_mtime (rtems_rfs_inode_handle* handle,
rtems_rfs_time mtime)
{
rtems_rfs_write_u32 (&handle->node->mtime, mtime);
5165a: 2802 movel %d2,%d4 <== NOT EXECUTED 5165c: 2202 movel %d2,%d1 <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_atime (rtems_rfs_inode_handle* handle,
rtems_rfs_time atime)
{
rtems_rfs_write_u32 (&handle->node->atime, atime);
5165e: 2e03 movel %d3,%d7 <== NOT EXECUTED 51660: 2c03 movel %d3,%d6 <== NOT EXECUTED 51662: e0af lsrl %d0,%d7 <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_mtime (rtems_rfs_inode_handle* handle,
rtems_rfs_time mtime)
{
rtems_rfs_write_u32 (&handle->node->mtime, mtime);
51664: e0ac lsrl %d0,%d4 <== NOT EXECUTED 51666: 2002 movel %d2,%d0 <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_atime (rtems_rfs_inode_handle* handle,
rtems_rfs_time atime)
{
rtems_rfs_write_u32 (&handle->node->atime, atime);
51668: 2a03 movel %d3,%d5 <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_mtime (rtems_rfs_inode_handle* handle,
rtems_rfs_time mtime)
{
rtems_rfs_write_u32 (&handle->node->mtime, mtime);
5166a: e088 lsrl #8,%d0 <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_atime (rtems_rfs_inode_handle* handle,
rtems_rfs_time atime)
{
rtems_rfs_write_u32 (&handle->node->atime, atime);
5166c: e08d lsrl #8,%d5 <== NOT EXECUTED 5166e: 206b 000c moveal %a3@(12),%a0 <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_mtime (rtems_rfs_inode_handle* handle,
rtems_rfs_time mtime)
{
rtems_rfs_write_u32 (&handle->node->mtime, mtime);
51672: 4241 clrw %d1 <== NOT EXECUTED 51674: 4841 swap %d1 <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_atime (rtems_rfs_inode_handle* handle,
rtems_rfs_time atime)
{
rtems_rfs_write_u32 (&handle->node->atime, atime);
51676: 4246 clrw %d6 <== NOT EXECUTED 51678: 4846 swap %d6 <== NOT EXECUTED 5167a: 1147 0010 moveb %d7,%a0@(16) <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_mtime (rtems_rfs_inode_handle* handle,
rtems_rfs_time mtime)
{
rtems_rfs_write_u32 (&handle->node->mtime, mtime);
5167e: 1140 0016 moveb %d0,%a0@(22) <== NOT EXECUTED 51682: 1142 0017 moveb %d2,%a0@(23) <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_atime (rtems_rfs_inode_handle* handle,
rtems_rfs_time atime)
{
rtems_rfs_write_u32 (&handle->node->atime, atime);
51686: 1146 0011 moveb %d6,%a0@(17) <== NOT EXECUTED 5168a: 1145 0012 moveb %d5,%a0@(18) <== NOT EXECUTED 5168e: 1143 0013 moveb %d3,%a0@(19) <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_mtime (rtems_rfs_inode_handle* handle,
rtems_rfs_time mtime)
{
rtems_rfs_write_u32 (&handle->node->mtime, mtime);
51692: 1144 0014 moveb %d4,%a0@(20) <== NOT EXECUTED 51696: 1141 0015 moveb %d1,%a0@(21) <== NOT EXECUTED
}
rtems_rfs_inode_set_atime (&inode, atime);
rtems_rfs_inode_set_mtime (&inode, mtime);
rc = rtems_rfs_inode_close (fs, &inode);
5169a: 2f0b movel %a3,%sp@- <== NOT EXECUTED
static inline void
rtems_rfs_inode_set_atime (rtems_rfs_inode_handle* handle,
rtems_rfs_time atime)
{
rtems_rfs_write_u32 (&handle->node->atime, atime);
rtems_rfs_buffer_mark_dirty (&handle->buffer);
5169c: 7001 moveq #1,%d0 <== NOT EXECUTED 5169e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 516a0: 1d40 ffea moveb %d0,%fp@(-22) <== NOT EXECUTED 516a4: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close> <== NOT EXECUTED
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
516aa: 266a 007c moveal %a2@(124),%a3 <== NOT EXECUTED 516ae: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc)
516b0: 508f addql #8,%sp <== NOT EXECUTED 516b2: 6760 beqs 51714 <rtems_rfs_rtems_utime+0x142> <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
516b4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 516b6: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
516bc: 2f13 movel %a3@,%sp@- <== NOT EXECUTED 516be: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
516c4: 508f addql #8,%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
516c6: 2600 movel %d0,%d3 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
516c8: 6600 00ac bnew 51776 <rtems_rfs_rtems_utime+0x1a4> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("utime: closing inode", rc);
516cc: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 516d2: 2040 moveal %d0,%a0 <== NOT EXECUTED 516d4: 70ff moveq #-1,%d0 <== NOT EXECUTED 516d6: 2082 movel %d2,%a0@ <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
}
516d8: 4cee 0cfc ffb8 moveml %fp@(-72),%d2-%d7/%a2-%a3 <== NOT EXECUTED 516de: 4e5e unlk %fp <== NOT EXECUTED 516e0: 4e75 rts <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
516e2: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 516e6: 42a7 clrl %sp@- <== NOT EXECUTED 516e8: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 516ee: 508f addql #8,%sp <== NOT EXECUTED 516f0: 4a00 tstb %d0 <== NOT EXECUTED 516f2: 6700 ff16 beqw 5160a <rtems_rfs_rtems_utime+0x38> <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
516f6: 2f04 movel %d4,%sp@- <== NOT EXECUTED 516f8: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 516fe: 2f00 movel %d0,%sp@- <== NOT EXECUTED 51700: 4879 0007 2f06 pea 72f06 <ramdisk_ops+0xb28> <== NOT EXECUTED 51706: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5170c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 51710: 6000 fef8 braw 5160a <rtems_rfs_rtems_utime+0x38> <== NOT EXECUTED 51714: 2f0a movel %a2,%sp@- <== NOT EXECUTED 51716: 4eb9 0005 c248 jsr 5c248 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
5171c: 2f13 movel %a3@,%sp@- <== NOT EXECUTED 5171e: 4eb9 0004 b070 jsr 4b070 <rtems_semaphore_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
51724: 508f addql #8,%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
51726: 2400 movel %d0,%d2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
51728: 6600 008a bnew 517b4 <rtems_rfs_rtems_utime+0x1e2> <== NOT EXECUTED
return rtems_rfs_rtems_error ("utime: closing inode", rc);
}
rtems_rfs_rtems_unlock (fs);
return 0;
5172c: 4280 clrl %d0 <== NOT EXECUTED
}
5172e: 4cee 0cfc ffb8 moveml %fp@(-72),%d2-%d7/%a2-%a3 <== NOT EXECUTED 51734: 4e5e unlk %fp <== NOT EXECUTED 51736: 4e75 rts <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
51738: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 5173c: 42a7 clrl %sp@- <== NOT EXECUTED 5173e: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 51744: 508f addql #8,%sp <== NOT EXECUTED 51746: 4a00 tstb %d0 <== NOT EXECUTED 51748: 6700 fef8 beqw 51642 <rtems_rfs_rtems_utime+0x70> <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
5174c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5174e: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 51754: 2f00 movel %d0,%sp@- <== NOT EXECUTED 51756: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 5175c: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 51762: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
if (rc)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("utime: read inode", rc);
51766: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 5176c: 2040 moveal %d0,%a0 <== NOT EXECUTED 5176e: 70ff moveq #-1,%d0 <== NOT EXECUTED 51770: 2084 movel %d4,%a0@ <== NOT EXECUTED 51772: 6000 feda braw 5164e <rtems_rfs_rtems_utime+0x7c> <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
51776: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 5177a: 42a7 clrl %sp@- <== NOT EXECUTED 5177c: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 51782: 508f addql #8,%sp <== NOT EXECUTED 51784: 4a00 tstb %d0 <== NOT EXECUTED 51786: 6700 ff44 beqw 516cc <rtems_rfs_rtems_utime+0xfa> <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
5178a: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5178c: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 51792: 2f00 movel %d0,%sp@- <== NOT EXECUTED 51794: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 5179a: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 517a0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
if (rc)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("utime: closing inode", rc);
517a4: 4eb9 0006 2548 jsr 62548 <__errno> <== NOT EXECUTED 517aa: 2040 moveal %d0,%a0 <== NOT EXECUTED 517ac: 70ff moveq #-1,%d0 <== NOT EXECUTED 517ae: 2082 movel %d2,%a0@ <== NOT EXECUTED 517b0: 6000 ff26 braw 516d8 <rtems_rfs_rtems_utime+0x106> <== NOT EXECUTED
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
if (sc != RTEMS_SUCCESSFUL)
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
517b4: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED 517b8: 42a7 clrl %sp@- <== NOT EXECUTED 517ba: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> <== NOT EXECUTED 517c0: 508f addql #8,%sp <== NOT EXECUTED 517c2: 4a00 tstb %d0 <== NOT EXECUTED 517c4: 6700 ff66 beqw 5172c <rtems_rfs_rtems_utime+0x15a> <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
517c8: 2f02 movel %d2,%sp@- <== NOT EXECUTED 517ca: 4eb9 0004 6318 jsr 46318 <rtems_status_text> <== NOT EXECUTED 517d0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 517d2: 4879 0007 2f2b pea 72f2b <ramdisk_ops+0xb4d> <== NOT EXECUTED 517d8: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 517de: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
return 0;
517e2: 4280 clrl %d0 <== NOT EXECUTED
}
517e4: 4cee 0cfc ffb8 moveml %fp@(-72),%d2-%d7/%a2-%a3 <== NOT EXECUTED 517ea: 4e5e unlk %fp <== NOT EXECUTED
0004ec70 <rtems_rfs_rup_quotient>:
* Return a rounded up integer quotient given a dividend and divisor. That is:
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
4ec70: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 4ec74: 202e 0008 movel %fp@(8),%d0 <== NOT EXECUTED 4ec78: 222e 000c movel %fp@(12),%d1 <== NOT EXECUTED 4ec7c: 2f02 movel %d2,%sp@- <== NOT EXECUTED
if (dividend == 0)
4ec7e: 4a80 tstl %d0 <== NOT EXECUTED 4ec80: 670e beqs 4ec90 <rtems_rfs_rup_quotient+0x20> <== NOT EXECUTED
return 1;
return ((dividend - 1) / divisor) + 1;
4ec82: 5380 subql #1,%d0 <== NOT EXECUTED 4ec84: 4c41 0000 remul %d1,%d0,%d0 <== NOT EXECUTED
}
4ec88: 241f movel %sp@+,%d2 <== NOT EXECUTED
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
return 1;
return ((dividend - 1) / divisor) + 1;
4ec8a: 5280 addql #1,%d0 <== NOT EXECUTED
}
4ec8c: 4e5e unlk %fp <== NOT EXECUTED 4ec8e: 4e75 rts <== NOT EXECUTED 4ec90: 241f movel %sp@+,%d2 <== NOT EXECUTED
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
return 1;
4ec92: 7001 moveq #1,%d0 <== NOT EXECUTED
return ((dividend - 1) / divisor) + 1; }
4ec94: 4e5e unlk %fp <== NOT EXECUTED
0005bab0 <rtems_rfs_scan_chain>:
*/
static rtems_rfs_buffer*
rtems_rfs_scan_chain (rtems_chain_control* chain,
uint32_t* count,
rtems_rfs_buffer_block block)
{
5bab0: 4e56 ffe8 linkw %fp,#-24 5bab4: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 5bab8: 286e 0008 moveal %fp@(8),%a4
rtems_rfs_buffer* buffer;
rtems_chain_node* node;
node = rtems_chain_last (chain);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
5babc: 47f9 0005 37c0 lea 537c0 <rtems_rfs_trace>,%a3
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last(
Chain_Control *the_chain
)
{
return _Chain_Tail( the_chain )->previous;
5bac2: 246c 0008 moveal %a4@(8),%a2 5bac6: 4878 0080 pea 80 <DBL_MANT_DIG+0x4b>
*/
static rtems_rfs_buffer*
rtems_rfs_scan_chain (rtems_chain_control* chain,
uint32_t* count,
rtems_rfs_buffer_block block)
{
5baca: 262e 000c movel %fp@(12),%d3
rtems_rfs_buffer* buffer;
rtems_chain_node* node;
node = rtems_chain_last (chain);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
5bace: 42a7 clrl %sp@-
*/
static rtems_rfs_buffer*
rtems_rfs_scan_chain (rtems_chain_control* chain,
uint32_t* count,
rtems_rfs_buffer_block block)
{
5bad0: 242e 0010 movel %fp@(16),%d2
rtems_rfs_buffer* buffer;
rtems_chain_node* node;
node = rtems_chain_last (chain);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
5bad4: 4e93 jsr %a3@ 5bad6: 508f addql #8,%sp 5bad8: 4a00 tstb %d0 5bada: 6600 0086 bnew 5bb62 <rtems_rfs_scan_chain+0xb2>
printf ("rtems-rfs: buffer-scan: count=%" PRIu32 ", block=%" PRIu32 ": ", *count, block);
while (!rtems_chain_is_head (chain, node))
5bade: b9ca cmpal %a2,%a4
5bae0: 6722 beqs 5bb04 <rtems_rfs_scan_chain+0x54> <== NEVER TAKEN
{
buffer = (rtems_rfs_buffer*) node;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("%" PRIuPTR " ", ((intptr_t) buffer->user));
5bae2: 4bf9 0006 2fd4 lea 62fd4 <printf>,%a5
while (!rtems_chain_is_head (chain, node))
{
buffer = (rtems_rfs_buffer*) node;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
5bae8: 4878 0080 pea 80 <DBL_MANT_DIG+0x4b> 5baec: 42a7 clrl %sp@- 5baee: 4e93 jsr %a3@ 5baf0: 508f addql #8,%sp 5baf2: 4a00 tstb %d0
5baf4: 662a bnes 5bb20 <rtems_rfs_scan_chain+0x70> <== NEVER TAKEN
printf ("%" PRIuPTR " ", ((intptr_t) buffer->user));
if (((rtems_rfs_buffer_block) ((intptr_t)(buffer->user))) == block)
5baf6: b4aa 0036 cmpl %a2@(54),%d2
5bafa: 6738 beqs 5bb34 <rtems_rfs_scan_chain+0x84>
true);
if ((rc > 0) && (rrc == 0))
rrc = rc;
return rrc;
}
5bafc: 246a 0004 moveal %a2@(4),%a2
node = rtems_chain_last (chain);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("rtems-rfs: buffer-scan: count=%" PRIu32 ", block=%" PRIu32 ": ", *count, block);
while (!rtems_chain_is_head (chain, node))
5bb00: b9ca cmpal %a2,%a4
5bb02: 66e4 bnes 5bae8 <rtems_rfs_scan_chain+0x38>
return buffer;
}
node = rtems_chain_previous (node);
}
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
5bb04: 4878 0080 pea 80 <DBL_MANT_DIG+0x4b> 5bb08: 42a7 clrl %sp@- 5bb0a: 4e93 jsr %a3@ 5bb0c: 508f addql #8,%sp 5bb0e: 4a00 tstb %d0 5bb10: 6600 0094 bnew 5bba6 <rtems_rfs_scan_chain+0xf6>
printf (": not found\n");
return NULL;
5bb14: 4280 clrl %d0
}
5bb16: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 5bb1c: 4e5e unlk %fp 5bb1e: 4e75 rts
while (!rtems_chain_is_head (chain, node))
{
buffer = (rtems_rfs_buffer*) node;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("%" PRIuPTR " ", ((intptr_t) buffer->user));
5bb20: 2f2a 0036 movel %a2@(54),%sp@- <== NOT EXECUTED 5bb24: 4879 0007 372d pea 7372d <CSWTCH.1+0x151> <== NOT EXECUTED 5bb2a: 4e95 jsr %a5@ <== NOT EXECUTED 5bb2c: 508f addql #8,%sp <== NOT EXECUTED
if (((rtems_rfs_buffer_block) ((intptr_t)(buffer->user))) == block)
5bb2e: b4aa 0036 cmpl %a2@(54),%d2 <== NOT EXECUTED 5bb32: 66c8 bnes 5bafc <rtems_rfs_scan_chain+0x4c> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
5bb34: 4878 0080 pea 80 <DBL_MANT_DIG+0x4b> 5bb38: 42a7 clrl %sp@- 5bb3a: 4e93 jsr %a3@ 5bb3c: 508f addql #8,%sp 5bb3e: 4a00 tstb %d0
5bb40: 663a bnes 5bb7c <rtems_rfs_scan_chain+0xcc> <== NEVER TAKEN
printf (": found block=%" PRIuPTR "\n",
((intptr_t)(buffer->user)));
(*count)--;
5bb42: 2043 moveal %d3,%a0 5bb44: 5390 subql #1,%a0@
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
5bb46: 2f0a movel %a2,%sp@- 5bb48: 4eb9 0004 bb78 jsr 4bb78 <_Chain_Extract>
rtems_chain_extract (node);
rtems_chain_set_off_chain (node);
return buffer;
5bb4e: 588f addql #4,%sp 5bb50: 200a movel %a2,%d0
*/
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain(
Chain_Node *node
)
{
node->next = node->previous = NULL;
5bb52: 42aa 0004 clrl %a2@(4) 5bb56: 4292 clrl %a2@
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf (": not found\n");
return NULL;
}
5bb58: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 5bb5e: 4e5e unlk %fp 5bb60: 4e75 rts
rtems_chain_node* node;
node = rtems_chain_last (chain);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("rtems-rfs: buffer-scan: count=%" PRIu32 ", block=%" PRIu32 ": ", *count, block);
5bb62: 2043 moveal %d3,%a0 <== NOT EXECUTED 5bb64: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5bb66: 2f10 movel %a0@,%sp@- <== NOT EXECUTED 5bb68: 4879 0007 36fe pea 736fe <CSWTCH.1+0x122> <== NOT EXECUTED 5bb6e: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5bb74: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5bb78: 6000 ff64 braw 5bade <rtems_rfs_scan_chain+0x2e> <== NOT EXECUTED
printf ("%" PRIuPTR " ", ((intptr_t) buffer->user));
if (((rtems_rfs_buffer_block) ((intptr_t)(buffer->user))) == block)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf (": found block=%" PRIuPTR "\n",
5bb7c: 2f2a 0036 movel %a2@(54),%sp@- <== NOT EXECUTED 5bb80: 4879 0007 3732 pea 73732 <CSWTCH.1+0x156> <== NOT EXECUTED 5bb86: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5bb8c: 508f addql #8,%sp <== NOT EXECUTED
((intptr_t)(buffer->user)));
(*count)--;
5bb8e: 2043 moveal %d3,%a0 <== NOT EXECUTED 5bb90: 5390 subql #1,%a0@ <== NOT EXECUTED 5bb92: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5bb94: 4eb9 0004 bb78 jsr 4bb78 <_Chain_Extract> <== NOT EXECUTED
rtems_chain_extract (node);
rtems_chain_set_off_chain (node);
return buffer;
5bb9a: 588f addql #4,%sp <== NOT EXECUTED 5bb9c: 200a movel %a2,%d0 <== NOT EXECUTED 5bb9e: 42aa 0004 clrl %a2@(4) <== NOT EXECUTED 5bba2: 4292 clrl %a2@ <== NOT EXECUTED 5bba4: 60b2 bras 5bb58 <rtems_rfs_scan_chain+0xa8> <== NOT EXECUTED
}
node = rtems_chain_previous (node);
}
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf (": not found\n");
5bba6: 4879 0007 3745 pea 73745 <CSWTCH.1+0x169> <== NOT EXECUTED 5bbac: 4eb9 0006 30ce jsr 630ce <puts> <== NOT EXECUTED 5bbb2: 588f addql #4,%sp <== NOT EXECUTED
return NULL;
5bbb4: 4280 clrl %d0 <== NOT EXECUTED
}
5bbb6: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 <== NOT EXECUTED 5bbbc: 4e5e unlk %fp <== NOT EXECUTED
0005a2ba <rtems_rfs_search_map_for_clear_bit.constprop.1>:
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
5a2ba: 4e56 ffc4 linkw %fp,#-60
rtems_rfs_bitmap_element* map_bits;
int map_index;
int map_offset;
int rc;
*found = false;
5a2be: 206e 0010 moveal %fp@(16),%a0
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
5a2c2: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
*found = false;
/*
* Load the bitmap.
*/
rc = rtems_rfs_bitmap_load_map (control, &map);
5a2c6: 486e fffc pea %fp@(-4)
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
5a2ca: 242e 0014 movel %fp@(20),%d2
rtems_rfs_bitmap_element* map_bits;
int map_index;
int map_offset;
int rc;
*found = false;
5a2ce: 4210 clrb %a0@
/*
* Load the bitmap.
*/
rc = rtems_rfs_bitmap_load_map (control, &map);
5a2d0: 2f2e 0008 movel %fp@(8),%sp@- 5a2d4: 4eba ff8e jsr %pc@(5a264 <rtems_rfs_bitmap_load_map>)
if (rc > 0)
5a2d8: 508f addql #8,%sp 5a2da: 4a80 tstl %d0
5a2dc: 6f0a bles 5a2e8 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x2e><== ALWAYS TAKEN
}
while (((direction < 0) && (test_bit >= end_bit))
|| ((direction > 0) && (test_bit <= end_bit)));
return 0;
}
5a2de: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5a2e4: 4e5e unlk %fp <== NOT EXECUTED 5a2e6: 4e75 rts <== NOT EXECUTED
/*
* Calculate the bit we are testing plus the end point we search over.
*/
test_bit = *bit;
end_bit = test_bit + (window * direction);
5a2e8: 2002 movel %d2,%d0 5a2ea: 760b moveq #11,%d3
return rc;
/*
* Calculate the bit we are testing plus the end point we search over.
*/
test_bit = *bit;
5a2ec: 226e 000c moveal %fp@(12),%a1
end_bit = test_bit + (window * direction);
5a2f0: e7a8 lsll %d3,%d0
return rc;
/*
* Calculate the bit we are testing plus the end point we search over.
*/
test_bit = *bit;
5a2f2: 2211 movel %a1@,%d1
end_bit = test_bit + (window * direction);
5a2f4: 2040 moveal %d0,%a0 5a2f6: d1c1 addal %d1,%a0
if (end_bit < 0)
5a2f8: 4a88 tstl %a0 5a2fa: 6d00 0180 bltw 5a47c <rtems_rfs_search_map_for_clear_bit.constprop.1+0x1c2>
end_bit = 0;
else if (end_bit >= control->size)
5a2fe: 226e 0008 moveal %fp@(8),%a1 5a302: 2029 000c movel %a1@(12),%d0 5a306: b088 cmpl %a0,%d0
5a308: 6204 bhis 5a30e <rtems_rfs_search_map_for_clear_bit.constprop.1+0x54><== NEVER TAKEN
end_bit = control->size - 1;
5a30a: 2040 moveal %d0,%a0 5a30c: 5388 subql #1,%a0
map_index = rtems_rfs_bitmap_map_index (test_bit);
5a30e: 2001 movel %d1,%d0 5a310: ea80 asrl #5,%d0 5a312: 2640 moveal %d0,%a3
map_offset = rtems_rfs_bitmap_map_offset (test_bit); search_index = rtems_rfs_bitmap_map_index (map_index);
5a314: 700a moveq #10,%d0 5a316: 2601 movel %d1,%d3 5a318: e0a3 asrl %d0,%d3
search_offset = rtems_rfs_bitmap_map_offset (map_index);
5a31a: 2e0b movel %a3,%d7
search_bits = &control->search_bits[search_index];
map_bits = &map[map_index];
5a31c: 280b movel %a3,%d4
end_bit = 0;
else if (end_bit >= control->size)
end_bit = control->size - 1;
map_index = rtems_rfs_bitmap_map_index (test_bit);
map_offset = rtems_rfs_bitmap_map_offset (test_bit);
5a31e: 103c 001f moveb #31,%d0
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
5a322: 7a01 moveq #1,%d5
map_index = rtems_rfs_bitmap_map_index (test_bit);
map_offset = rtems_rfs_bitmap_map_offset (test_bit);
search_index = rtems_rfs_bitmap_map_index (map_index);
search_offset = rtems_rfs_bitmap_map_offset (map_index);
search_bits = &control->search_bits[search_index];
5a324: 226e 0008 moveal %fp@(8),%a1 5a328: e58b lsll #2,%d3 5a32a: 2469 0014 moveal %a1@(20),%a2 5a32e: d5c3 addal %d3,%a2
end_bit = control->size - 1;
map_index = rtems_rfs_bitmap_map_index (test_bit);
map_offset = rtems_rfs_bitmap_map_offset (test_bit);
search_index = rtems_rfs_bitmap_map_index (map_index);
search_offset = rtems_rfs_bitmap_map_offset (map_index);
5a330: 761f moveq #31,%d3 5a332: ce83 andl %d3,%d7
map_offset += direction;
test_bit += direction;
}
}
map_bits += direction;
5a334: 2602 movel %d2,%d3 5a336: e58b lsll #2,%d3
map_offset = rtems_rfs_bitmap_map_offset (test_bit);
search_index = rtems_rfs_bitmap_map_index (map_index);
search_offset = rtems_rfs_bitmap_map_offset (map_index);
search_bits = &control->search_bits[search_index];
map_bits = &map[map_index];
5a338: e58c lsll #2,%d4
map_index = rtems_rfs_bitmap_map_index (test_bit);
map_offset = rtems_rfs_bitmap_map_offset (test_bit);
search_index = rtems_rfs_bitmap_map_index (map_index);
search_offset = rtems_rfs_bitmap_map_offset (map_index);
search_bits = &control->search_bits[search_index];
5a33a: 2d4a fff0 movel %a2,%fp@(-16)
map_bits = &map[map_index];
5a33e: 246e fffc moveal %fp@(-4),%a2 5a342: d5c4 addal %d4,%a2
map_offset += direction;
test_bit += direction;
}
}
map_bits += direction;
5a344: 2d43 ffec movel %d3,%fp@(-20)
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
5a348: 2602 movel %d2,%d3 5a34a: eb8b lsll #5,%d3
end_bit = 0;
else if (end_bit >= control->size)
end_bit = control->size - 1;
map_index = rtems_rfs_bitmap_map_index (test_bit);
map_offset = rtems_rfs_bitmap_map_offset (test_bit);
5a34c: c081 andl %d1,%d0
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
5a34e: 2d43 fff4 movel %d3,%fp@(-12)
/*
* If any bit is clear find that bit and then search the map element. If
* all bits are set there are no map bits so move to the next search
* element.
*/
if (!rtems_rfs_bitmap_match (*search_bits, RTEMS_RFS_BITMAP_ELEMENT_SET))
5a352: 226e fff0 moveal %fp@(-16),%a1 5a356: 2d51 fff8 movel %a1@,%fp@(-8)
5a35a: 6764 beqs 5a3c0 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x106><== NEVER TAKEN
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
5a35c: 43f3 2800 lea %a3@(00000000,%d2:l),%a1 5a360: 2609 movel %a1,%d3 5a362: eb8b lsll #5,%d3 5a364: 2243 moveal %d3,%a1 5a366: 49e9 001f lea %a1@(31),%a4
* all bits are set there are no map bits so move to the next search
* element.
*/
if (!rtems_rfs_bitmap_match (*search_bits, RTEMS_RFS_BITMAP_ELEMENT_SET))
{
while ((search_offset >= 0)
5a36a: 761f moveq #31,%d3 5a36c: b687 cmpl %d7,%d3
5a36e: 6570 bcss 5a3e0 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x126><== NEVER TAKEN
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
5a370: 2605 movel %d5,%d3 5a372: efab lsll %d7,%d3 5a374: 2a43 moveal %d3,%a5 5a376: c6ae fff8 andl %fp@(-8),%d3
if (!rtems_rfs_bitmap_match (*search_bits, RTEMS_RFS_BITMAP_ELEMENT_SET))
{
while ((search_offset >= 0)
&& (search_offset < rtems_rfs_bitmap_element_bits ()))
{
if (!rtems_rfs_bitmap_test (*search_bits, search_offset))
5a37a: 6722 beqs 5a39e <rtems_rfs_search_map_for_clear_bit.constprop.1+0xe4>
{
/*
* Find the clear bit in the map. Update the search map and map if
* found. We may find none are spare if searching up from the seed.
*/
while ((map_offset >= 0)
5a37c: 761f moveq #31,%d3 5a37e: b680 cmpl %d0,%d3
5a380: 651c bcss 5a39e <rtems_rfs_search_map_for_clear_bit.constprop.1+0xe4><== NEVER TAKEN
&& (map_offset < rtems_rfs_bitmap_element_bits ()))
{
if (!rtems_rfs_bitmap_test (*map_bits, map_offset))
5a382: 2c12 movel %a2@,%d6
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
5a384: 2605 movel %d5,%d3 5a386: e1ab lsll %d0,%d3 5a388: 2803 movel %d3,%d4 5a38a: c886 andl %d6,%d4
* found. We may find none are spare if searching up from the seed.
*/
while ((map_offset >= 0)
&& (map_offset < rtems_rfs_bitmap_element_bits ()))
{
if (!rtems_rfs_bitmap_test (*map_bits, map_offset))
5a38c: 6600 008c bnew 5a41a <rtems_rfs_search_map_for_clear_bit.constprop.1+0x160>
*found = true;
rtems_rfs_buffer_mark_dirty (control->buffer);
return 0;
}
if (test_bit == end_bit)
5a390: b288 cmpl %a0,%d1
5a392: 670a beqs 5a39e <rtems_rfs_search_map_for_clear_bit.constprop.1+0xe4>
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
5a394: d082 addl %d2,%d0 5a396: d282 addl %d2,%d1
{
/*
* Find the clear bit in the map. Update the search map and map if
* found. We may find none are spare if searching up from the seed.
*/
while ((map_offset >= 0)
5a398: 761f moveq #31,%d3 5a39a: b680 cmpl %d0,%d3
5a39c: 64e6 bccs 5a384 <rtems_rfs_search_map_for_clear_bit.constprop.1+0xca><== ALWAYS TAKEN
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
5a39e: 47f3 2800 lea %a3@(00000000,%d2:l),%a3
map_offset += direction;
test_bit += direction;
}
}
map_bits += direction;
5a3a2: d5ee ffec addal %fp@(-20),%a2
map_index += direction;
map_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
5a3a6: 4a82 tstl %d2
5a3a8: 6f54 bles 5a3fe <rtems_rfs_search_map_for_clear_bit.constprop.1+0x144>
test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset;
5a3aa: 2209 movel %a1,%d1
search_offset += direction;
if (((direction < 0) && (test_bit <= end_bit))
|| ((direction > 0) && (test_bit >= end_bit)))
5a3ac: b3c8 cmpal %a0,%a1 5a3ae: 6c00 0130 bgew 5a4e0 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x226>
test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset;
search_offset += direction;
if (((direction < 0) && (test_bit <= end_bit))
5a3b2: d9ee fff4 addal %fp@(-12),%a4 5a3b6: d3ee fff4 addal %fp@(-12),%a1
}
}
map_bits += direction;
map_index += direction;
map_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
5a3ba: 4280 clrl %d0
test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset;
search_offset += direction;
if (((direction < 0) && (test_bit <= end_bit))
5a3bc: de82 addl %d2,%d7 5a3be: 60aa bras 5a36a <rtems_rfs_search_map_for_clear_bit.constprop.1+0xb0>
*
* Align test_bit either up or down depending on the direction to next 32
* bit boundary.
*/
rtems_rfs_bitmap_bit bits_skipped;
test_bit &= ~((1 << RTEMS_RFS_ELEMENT_BITS_POWER_2) - 1);
5a3c0: 70e0 moveq #-32,%d0 <== NOT EXECUTED 5a3c2: c280 andl %d0,%d1 <== NOT EXECUTED
if (direction > 0)
5a3c4: 4a82 tstl %d2 <== NOT EXECUTED 5a3c6: 6f00 009a blew 5a462 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x1a8><== NOT EXECUTED
{
bits_skipped = rtems_rfs_bitmap_element_bits () - search_offset;
5a3ca: 7620 moveq #32,%d3 <== NOT EXECUTED 5a3cc: 9687 subl %d7,%d3 <== NOT EXECUTED
test_bit += bits_skipped * rtems_rfs_bitmap_element_bits ();
5a3ce: 2803 movel %d3,%d4 <== NOT EXECUTED
* adds 1. Remember the logic is for subtraction.
*/
test_bit -= ((bits_skipped - 1) * rtems_rfs_bitmap_element_bits ()) + 1;
map_offset = rtems_rfs_bitmap_element_bits () - 1;
}
map_bits += direction * bits_skipped;
5a3d0: 4c02 3800 mulsl %d2,%d3 <== NOT EXECUTED
test_bit &= ~((1 << RTEMS_RFS_ELEMENT_BITS_POWER_2) - 1);
if (direction > 0)
{
bits_skipped = rtems_rfs_bitmap_element_bits () - search_offset;
test_bit += bits_skipped * rtems_rfs_bitmap_element_bits ();
map_offset = 0;
5a3d4: 4280 clrl %d0 <== NOT EXECUTED
rtems_rfs_bitmap_bit bits_skipped;
test_bit &= ~((1 << RTEMS_RFS_ELEMENT_BITS_POWER_2) - 1);
if (direction > 0)
{
bits_skipped = rtems_rfs_bitmap_element_bits () - search_offset;
test_bit += bits_skipped * rtems_rfs_bitmap_element_bits ();
5a3d6: eb8c lsll #5,%d4 <== NOT EXECUTED
* adds 1. Remember the logic is for subtraction.
*/
test_bit -= ((bits_skipped - 1) * rtems_rfs_bitmap_element_bits ()) + 1;
map_offset = rtems_rfs_bitmap_element_bits () - 1;
}
map_bits += direction * bits_skipped;
5a3d8: 45f2 3c00 lea %a2@(00000000,%d3:l:4),%a2 <== NOT EXECUTED
map_index += direction * bits_skipped;
5a3dc: d7c3 addal %d3,%a3 <== NOT EXECUTED
rtems_rfs_bitmap_bit bits_skipped;
test_bit &= ~((1 << RTEMS_RFS_ELEMENT_BITS_POWER_2) - 1);
if (direction > 0)
{
bits_skipped = rtems_rfs_bitmap_element_bits () - search_offset;
test_bit += bits_skipped * rtems_rfs_bitmap_element_bits ();
5a3de: d284 addl %d4,%d1 <== NOT EXECUTED
}
map_bits += direction * bits_skipped;
map_index += direction * bits_skipped;
}
search_bits += direction;
5a3e0: 262e ffec movel %fp@(-20),%d3 <== NOT EXECUTED 5a3e4: d7ae fff0 addl %d3,%fp@(-16) <== NOT EXECUTED
search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
5a3e8: 4a82 tstl %d2 <== NOT EXECUTED 5a3ea: 6f68 bles 5a454 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x19a><== NOT EXECUTED
}
while (((direction < 0) && (test_bit >= end_bit))
|| ((direction > 0) && (test_bit <= end_bit)));
5a3ec: 4a82 tstl %d2 5a3ee: 6f00 00d6 blew 5a4c6 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x20c> 5a3f2: b288 cmpl %a0,%d1 5a3f4: 6e00 00d0 bgtw 5a4c6 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x20c>
5a3f8: 4287 clrl %d7 <== NOT EXECUTED 5a3fa: 6000 ff56 braw 5a352 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x98><== NOT EXECUTED
map_bits += direction;
map_index += direction;
map_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset;
5a3fe: 220c movel %a4,%d1
search_offset += direction;
if (((direction < 0) && (test_bit <= end_bit))
5a400: 4a82 tstl %d2
5a402: 6706 beqs 5a40a <rtems_rfs_search_map_for_clear_bit.constprop.1+0x150><== NEVER TAKEN
5a404: b9c8 cmpal %a0,%a4 5a406: 6f00 00ca blew 5a4d2 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x218>
5a40a: d9ee fff4 addal %fp@(-12),%a4 <== NOT EXECUTED 5a40e: d3ee fff4 addal %fp@(-12),%a1 <== NOT EXECUTED
}
}
map_bits += direction;
map_index += direction;
map_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
5a412: 701f moveq #31,%d0 <== NOT EXECUTED
test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset;
search_offset += direction;
if (((direction < 0) && (test_bit <= end_bit))
5a414: de82 addl %d2,%d7 <== NOT EXECUTED 5a416: 6000 ff52 braw 5a36a <rtems_rfs_search_map_for_clear_bit.constprop.1+0xb0><== NOT EXECUTED
*/
static rtems_rfs_bitmap_element
rtems_rfs_bitmap_set (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_element bits)
{
return RTEMS_RFS_BITMAP_SET_BITS (target, bits);
5a41a: 4683 notl %d3 5a41c: c686 andl %d6,%d3
while ((map_offset >= 0)
&& (map_offset < rtems_rfs_bitmap_element_bits ()))
{
if (!rtems_rfs_bitmap_test (*map_bits, map_offset))
{
*map_bits = rtems_rfs_bitmap_set (*map_bits, 1 << map_offset);
5a41e: 2483 movel %d3,%a2@
if (rtems_rfs_bitmap_match(*map_bits,
5a420: 660a bnes 5a42c <rtems_rfs_search_map_for_clear_bit.constprop.1+0x172>
*/
static rtems_rfs_bitmap_element
rtems_rfs_bitmap_set (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_element bits)
{
return RTEMS_RFS_BITMAP_SET_BITS (target, bits);
5a422: 200d movel %a5,%d0 5a424: 4680 notl %d0 5a426: 206e fff0 moveal %fp@(-16),%a0 5a42a: c190 andl %d0,%a0@
*map_bits = rtems_rfs_bitmap_set (*map_bits, 1 << map_offset);
if (rtems_rfs_bitmap_match(*map_bits,
RTEMS_RFS_BITMAP_ELEMENT_SET))
*search_bits = rtems_rfs_bitmap_set (*search_bits,
1 << search_offset);
control->free--;
5a42c: 226e 0008 moveal %fp@(8),%a1 5a430: 53a9 0010 subql #1,%a1@(16)
*bit = test_bit;
*found = true;
rtems_rfs_buffer_mark_dirty (control->buffer);
return 0;
5a434: 4280 clrl %d0
*search_bits = rtems_rfs_bitmap_set (*search_bits,
1 << search_offset);
control->free--;
*bit = test_bit;
*found = true;
rtems_rfs_buffer_mark_dirty (control->buffer);
5a436: 2051 moveal %a1@,%a0
if (rtems_rfs_bitmap_match(*map_bits,
RTEMS_RFS_BITMAP_ELEMENT_SET))
*search_bits = rtems_rfs_bitmap_set (*search_bits,
1 << search_offset);
control->free--;
*bit = test_bit;
5a438: 246e 000c moveal %fp@(12),%a2
*found = true;
5a43c: 226e 0010 moveal %fp@(16),%a1
if (rtems_rfs_bitmap_match(*map_bits,
RTEMS_RFS_BITMAP_ELEMENT_SET))
*search_bits = rtems_rfs_bitmap_set (*search_bits,
1 << search_offset);
control->free--;
*bit = test_bit;
5a440: 2481 movel %d1,%a2@
*found = true;
5a442: 12bc 0001 moveb #1,%a1@
}
while (((direction < 0) && (test_bit >= end_bit))
|| ((direction > 0) && (test_bit <= end_bit)));
return 0;
}
5a446: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5
*search_bits = rtems_rfs_bitmap_set (*search_bits,
1 << search_offset);
control->free--;
*bit = test_bit;
*found = true;
rtems_rfs_buffer_mark_dirty (control->buffer);
5a44c: 10bc 0001 moveb #1,%a0@
}
while (((direction < 0) && (test_bit >= end_bit))
|| ((direction > 0) && (test_bit <= end_bit)));
return 0;
}
5a450: 4e5e unlk %fp 5a452: 4e75 rts
search_bits += direction;
search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
}
while (((direction < 0) && (test_bit >= end_bit))
|| ((direction > 0) && (test_bit <= end_bit)));
5a454: 4a82 tstl %d2 <== NOT EXECUTED 5a456: 676e beqs 5a4c6 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x20c><== NOT EXECUTED
}
search_bits += direction;
search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
}
while (((direction < 0) && (test_bit >= end_bit))
5a458: b288 cmpl %a0,%d1
5a45a: 6d6a blts 5a4c6 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x20c><== ALWAYS TAKEN
5a45c: 7e1f moveq #31,%d7 <== NOT EXECUTED 5a45e: 6000 fef2 braw 5a352 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x98><== NOT EXECUTED
test_bit += bits_skipped * rtems_rfs_bitmap_element_bits ();
map_offset = 0;
}
else
{
bits_skipped = search_offset + 1;
5a462: 2607 movel %d7,%d3 <== NOT EXECUTED 5a464: 5283 addql #1,%d3 <== NOT EXECUTED
* adds 1. Remember the logic is for subtraction.
*/
test_bit -= ((bits_skipped - 1) * rtems_rfs_bitmap_element_bits ()) + 1;
map_offset = rtems_rfs_bitmap_element_bits () - 1;
}
map_bits += direction * bits_skipped;
5a466: 4c02 3800 mulsl %d2,%d3 <== NOT EXECUTED
/*
* Need to remove 1 for the rounding up. The above rounds down and
* adds 1. Remember the logic is for subtraction.
*/
test_bit -= ((bits_skipped - 1) * rtems_rfs_bitmap_element_bits ()) + 1;
map_offset = rtems_rfs_bitmap_element_bits () - 1;
5a46a: 701f moveq #31,%d0 <== NOT EXECUTED
bits_skipped = search_offset + 1;
/*
* Need to remove 1 for the rounding up. The above rounds down and
* adds 1. Remember the logic is for subtraction.
*/
test_bit -= ((bits_skipped - 1) * rtems_rfs_bitmap_element_bits ()) + 1;
5a46c: eb8f lsll #5,%d7 <== NOT EXECUTED
map_offset = rtems_rfs_bitmap_element_bits () - 1;
}
map_bits += direction * bits_skipped;
map_index += direction * bits_skipped;
5a46e: d7c3 addal %d3,%a3 <== NOT EXECUTED
bits_skipped = search_offset + 1;
/*
* Need to remove 1 for the rounding up. The above rounds down and
* adds 1. Remember the logic is for subtraction.
*/
test_bit -= ((bits_skipped - 1) * rtems_rfs_bitmap_element_bits ()) + 1;
5a470: 4687 notl %d7 <== NOT EXECUTED 5a472: d287 addl %d7,%d1 <== NOT EXECUTED
map_offset = rtems_rfs_bitmap_element_bits () - 1;
}
map_bits += direction * bits_skipped;
5a474: 45f2 3c00 lea %a2@(00000000,%d3:l:4),%a2 <== NOT EXECUTED 5a478: 6000 ff66 braw 5a3e0 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x126><== NOT EXECUTED
if (end_bit < 0)
end_bit = 0;
else if (end_bit >= control->size)
end_bit = control->size - 1;
map_index = rtems_rfs_bitmap_map_index (test_bit);
5a47c: 2001 movel %d1,%d0 5a47e: ea80 asrl #5,%d0 5a480: 2640 moveal %d0,%a3
map_offset = rtems_rfs_bitmap_map_offset (test_bit); search_index = rtems_rfs_bitmap_map_index (map_index);
5a482: 700a moveq #10,%d0 5a484: 2601 movel %d1,%d3 5a486: e0a3 asrl %d0,%d3
search_offset = rtems_rfs_bitmap_map_offset (map_index);
5a488: 2e0b movel %a3,%d7
search_bits = &control->search_bits[search_index];
map_bits = &map[map_index];
5a48a: 280b movel %a3,%d4
end_bit = 0;
else if (end_bit >= control->size)
end_bit = control->size - 1;
map_index = rtems_rfs_bitmap_map_index (test_bit);
map_offset = rtems_rfs_bitmap_map_offset (test_bit);
5a48c: 103c 001f moveb #31,%d0
*/
test_bit = *bit;
end_bit = test_bit + (window * direction);
if (end_bit < 0)
end_bit = 0;
5a490: 91c8 subal %a0,%a0
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
5a492: 7a01 moveq #1,%d5
map_index = rtems_rfs_bitmap_map_index (test_bit);
map_offset = rtems_rfs_bitmap_map_offset (test_bit);
search_index = rtems_rfs_bitmap_map_index (map_index);
search_offset = rtems_rfs_bitmap_map_offset (map_index);
search_bits = &control->search_bits[search_index];
5a494: 226e 0008 moveal %fp@(8),%a1 5a498: e58b lsll #2,%d3 5a49a: 2469 0014 moveal %a1@(20),%a2 5a49e: d5c3 addal %d3,%a2
end_bit = control->size - 1;
map_index = rtems_rfs_bitmap_map_index (test_bit);
map_offset = rtems_rfs_bitmap_map_offset (test_bit);
search_index = rtems_rfs_bitmap_map_index (map_index);
search_offset = rtems_rfs_bitmap_map_offset (map_index);
5a4a0: 761f moveq #31,%d3 5a4a2: ce83 andl %d3,%d7
map_offset += direction;
test_bit += direction;
}
}
map_bits += direction;
5a4a4: 2602 movel %d2,%d3 5a4a6: e58b lsll #2,%d3
map_offset = rtems_rfs_bitmap_map_offset (test_bit);
search_index = rtems_rfs_bitmap_map_index (map_index);
search_offset = rtems_rfs_bitmap_map_offset (map_index);
search_bits = &control->search_bits[search_index];
map_bits = &map[map_index];
5a4a8: e58c lsll #2,%d4
map_index = rtems_rfs_bitmap_map_index (test_bit);
map_offset = rtems_rfs_bitmap_map_offset (test_bit);
search_index = rtems_rfs_bitmap_map_index (map_index);
search_offset = rtems_rfs_bitmap_map_offset (map_index);
search_bits = &control->search_bits[search_index];
5a4aa: 2d4a fff0 movel %a2,%fp@(-16)
map_bits = &map[map_index];
5a4ae: 246e fffc moveal %fp@(-4),%a2 5a4b2: d5c4 addal %d4,%a2
map_offset += direction;
test_bit += direction;
}
}
map_bits += direction;
5a4b4: 2d43 ffec movel %d3,%fp@(-20)
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
5a4b8: 2602 movel %d2,%d3 5a4ba: eb8b lsll #5,%d3
end_bit = 0;
else if (end_bit >= control->size)
end_bit = control->size - 1;
map_index = rtems_rfs_bitmap_map_index (test_bit);
map_offset = rtems_rfs_bitmap_map_offset (test_bit);
5a4bc: c081 andl %d1,%d0
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
5a4be: 2d43 fff4 movel %d3,%fp@(-12) 5a4c2: 6000 fe8e braw 5a352 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x98>
search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
}
while (((direction < 0) && (test_bit >= end_bit))
|| ((direction > 0) && (test_bit <= end_bit)));
return 0;
5a4c6: 4280 clrl %d0
}
5a4c8: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 5a4ce: 4e5e unlk %fp 5a4d0: 4e75 rts
}
map_bits += direction * bits_skipped;
map_index += direction * bits_skipped;
}
search_bits += direction;
5a4d2: 202e ffec movel %fp@(-20),%d0 5a4d6: d1ae fff0 addl %d0,%fp@(-16)
}
}
map_bits += direction;
map_index += direction;
map_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
5a4da: 701f moveq #31,%d0 5a4dc: 6000 ff7a braw 5a458 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x19e>
}
map_bits += direction * bits_skipped;
map_index += direction * bits_skipped;
}
search_bits += direction;
5a4e0: 262e ffec movel %fp@(-20),%d3 5a4e4: d7ae fff0 addl %d3,%fp@(-16)
}
}
map_bits += direction;
map_index += direction;
map_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
5a4e8: 4280 clrl %d0 5a4ea: 6000 ff00 braw 5a3ec <rtems_rfs_search_map_for_clear_bit.constprop.1+0x132>
0005fa0c <rtems_rfs_symlink>:
const char* link,
int link_length,
uid_t uid,
gid_t gid,
rtems_rfs_ino parent)
{
5fa0c: 4e56 ff54 linkw %fp,#-172 5fa10: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
rtems_rfs_inode_handle inode;
rtems_rfs_ino ino;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK))
5fa14: 42a7 clrl %sp@- 5fa16: 4878 0002 pea 2 <DOUBLE_FLOAT>
const char* link,
int link_length,
uid_t uid,
gid_t gid,
rtems_rfs_ino parent)
{
5fa1a: 286e 0008 moveal %fp@(8),%a4 5fa1e: 2a2e 000c movel %fp@(12),%d5 5fa22: 282e 0010 movel %fp@(16),%d4 5fa26: 262e 0018 movel %fp@(24),%d3 5fa2a: 2c2e 0024 movel %fp@(36),%d6 5fa2e: 3e2e 001e movew %fp@(30),%d7 5fa32: 3a6e 0022 moveaw %fp@(34),%a5
rtems_rfs_inode_handle inode;
rtems_rfs_ino ino;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK))
5fa36: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> 5fa3c: 508f addql #8,%sp 5fa3e: 4a00 tstb %d0
5fa40: 6614 bnes 5fa56 <rtems_rfs_symlink+0x4a> <== NEVER TAKEN
printf (" link:");
for (c = 0; c < link_length; c++)
printf ("%c", link[c]);
}
if (link_length >= rtems_rfs_fs_block_size (fs))
5fa42: b6ac 0008 cmpl %a4@(8),%d3
5fa46: 657e bcss 5fac6 <rtems_rfs_symlink+0xba> <== ALWAYS TAKEN
return ENAMETOOLONG;
5fa48: 745b moveq #91,%d2 <== NOT EXECUTED
rtems_rfs_inode_set_block_offset (&inode, link_length);
rc = rtems_rfs_inode_close (fs, &inode);
return rc;
}
5fa4a: 2002 movel %d2,%d0 <== NOT EXECUTED 5fa4c: 4cee 3cfc ff54 moveml %fp@(-172),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5fa52: 4e5e unlk %fp <== NOT EXECUTED 5fa54: 4e75 rts <== NOT EXECUTED
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK))
{
int c;
printf ("rtems-rfs: symlink: parent:%" PRIu32 " name:", parent);
5fa56: 2f06 movel %d6,%sp@- <== NOT EXECUTED 5fa58: 4879 0007 4a0e pea 74a0e <CSWTCH.1+0x1432> <== NOT EXECUTED 5fa5e: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED
for (c = 0; c < length; c++)
5fa64: 508f addql #8,%sp <== NOT EXECUTED 5fa66: 4a84 tstl %d4 <== NOT EXECUTED 5fa68: 6f1a bles 5fa84 <rtems_rfs_symlink+0x78> <== NOT EXECUTED 5fa6a: 2645 moveal %d5,%a3 <== NOT EXECUTED 5fa6c: 4282 clrl %d2 <== NOT EXECUTED 5fa6e: 45f9 0006 3014 lea 63014 <putchar>,%a2 <== NOT EXECUTED 5fa74: 5282 addql #1,%d2 <== NOT EXECUTED
printf ("%c", name[c]);
5fa76: 101b moveb %a3@+,%d0 <== NOT EXECUTED 5fa78: 49c0 extbl %d0 <== NOT EXECUTED 5fa7a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5fa7c: 4e92 jsr %a2@ <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK))
{
int c;
printf ("rtems-rfs: symlink: parent:%" PRIu32 " name:", parent);
for (c = 0; c < length; c++)
5fa7e: 588f addql #4,%sp <== NOT EXECUTED 5fa80: b882 cmpl %d2,%d4 <== NOT EXECUTED 5fa82: 66f0 bnes 5fa74 <rtems_rfs_symlink+0x68> <== NOT EXECUTED
printf ("%c", name[c]);
printf (" link:");
5fa84: 4879 0007 4a33 pea 74a33 <CSWTCH.1+0x1457> <== NOT EXECUTED 5fa8a: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED
for (c = 0; c < link_length; c++)
5fa90: 588f addql #4,%sp <== NOT EXECUTED 5fa92: 4a83 tstl %d3 <== NOT EXECUTED 5fa94: 6fac bles 5fa42 <rtems_rfs_symlink+0x36> <== NOT EXECUTED 5fa96: 266e 0014 moveal %fp@(20),%a3 <== NOT EXECUTED 5fa9a: 4282 clrl %d2 <== NOT EXECUTED 5fa9c: 45f9 0006 3014 lea 63014 <putchar>,%a2 <== NOT EXECUTED 5faa2: 5282 addql #1,%d2 <== NOT EXECUTED
printf ("%c", link[c]);
5faa4: 101b moveb %a3@+,%d0 <== NOT EXECUTED 5faa6: 49c0 extbl %d0 <== NOT EXECUTED 5faa8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5faaa: 4e92 jsr %a2@ <== NOT EXECUTED
int c;
printf ("rtems-rfs: symlink: parent:%" PRIu32 " name:", parent);
for (c = 0; c < length; c++)
printf ("%c", name[c]);
printf (" link:");
for (c = 0; c < link_length; c++)
5faac: 588f addql #4,%sp <== NOT EXECUTED 5faae: b682 cmpl %d2,%d3 <== NOT EXECUTED 5fab0: 6790 beqs 5fa42 <rtems_rfs_symlink+0x36> <== NOT EXECUTED 5fab2: 5282 addql #1,%d2 <== NOT EXECUTED
printf ("%c", link[c]);
5fab4: 101b moveb %a3@+,%d0 <== NOT EXECUTED 5fab6: 49c0 extbl %d0 <== NOT EXECUTED 5fab8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5faba: 4e92 jsr %a2@ <== NOT EXECUTED
int c;
printf ("rtems-rfs: symlink: parent:%" PRIu32 " name:", parent);
for (c = 0; c < length; c++)
printf ("%c", name[c]);
printf (" link:");
for (c = 0; c < link_length; c++)
5fabc: 588f addql #4,%sp <== NOT EXECUTED 5fabe: b682 cmpl %d2,%d3 <== NOT EXECUTED 5fac0: 66e0 bnes 5faa2 <rtems_rfs_symlink+0x96> <== NOT EXECUTED 5fac2: 6000 ff7e braw 5fa42 <rtems_rfs_symlink+0x36> <== NOT EXECUTED
}
if (link_length >= rtems_rfs_fs_block_size (fs))
return ENAMETOOLONG;
rc = rtems_rfs_inode_create (fs, parent, name, strlen (name),
5fac6: 2f05 movel %d5,%sp@- 5fac8: 4eb9 0006 3c10 jsr 63c10 <strlen> 5face: 588f addql #4,%sp 5fad0: 486e fff8 pea %fp@(-8) 5fad4: 3f0d movew %a5,%sp@- 5fad6: 4267 clrw %sp@- 5fad8: 3f07 movew %d7,%sp@- 5fada: 4267 clrw %sp@- 5fadc: 4878 0001 pea 1 <ADD> 5fae0: 2f3c 0000 a1ff movel #41471,%sp@- 5fae6: 2f00 movel %d0,%sp@- 5fae8: 2f05 movel %d5,%sp@- 5faea: 2f06 movel %d6,%sp@- 5faec: 2f0c movel %a4,%sp@- 5faee: 4eb9 0005 0892 jsr 50892 <rtems_rfs_inode_create>
RTEMS_RFS_S_SYMLINK,
1, uid, gid, &ino);
if (rc > 0)
5faf4: 4fef 0024 lea %sp@(36),%sp
}
if (link_length >= rtems_rfs_fs_block_size (fs))
return ENAMETOOLONG;
rc = rtems_rfs_inode_create (fs, parent, name, strlen (name),
5faf8: 2400 movel %d0,%d2
RTEMS_RFS_S_SYMLINK,
1, uid, gid, &ino);
if (rc > 0)
5fafa: 6e00 ff4e bgtw 5fa4a <rtems_rfs_symlink+0x3e>
return rc;
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
5fafe: 4878 0001 pea 1 <ADD> 5fb02: 45ee ffc8 lea %fp@(-56),%a2 5fb06: 2f0a movel %a2,%sp@- 5fb08: 2f2e fff8 movel %fp@(-8),%sp@- 5fb0c: 2f0c movel %a4,%sp@- 5fb0e: 4eb9 0005 0300 jsr 50300 <rtems_rfs_inode_open>
if (rc > 0)
5fb14: 4fef 0010 lea %sp@(16),%sp
RTEMS_RFS_S_SYMLINK,
1, uid, gid, &ino);
if (rc > 0)
return rc;
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
5fb18: 2400 movel %d0,%d2
if (rc > 0)
5fb1a: 6e00 ff2e bgtw 5fa4a <rtems_rfs_symlink+0x3e>
/* * If the link length is less than the length of data union in the inode * place the link into the data area else allocate a block and write the link * to that. */ if (link_length < RTEMS_RFS_INODE_DATA_NAME_SIZE)
5fb1e: 7013 moveq #19,%d0 5fb20: b083 cmpl %d3,%d0
5fb22: 657e bcss 5fba2 <rtems_rfs_symlink+0x196> <== NEVER TAKEN
{
memset (inode.node->data.name, 0, RTEMS_RFS_INODE_DATA_NAME_SIZE);
5fb24: 202e ffd4 movel %fp@(-44),%d0 5fb28: 0680 0000 001c addil #28,%d0 5fb2e: 2040 moveal %d0,%a0 5fb30: 4298 clrl %a0@+ 5fb32: 4298 clrl %a0@+ 5fb34: 4298 clrl %a0@+ 5fb36: 4298 clrl %a0@+ 5fb38: 4290 clrl %a0@
memcpy (inode.node->data.name, link, link_length);
5fb3a: 2f03 movel %d3,%sp@- 5fb3c: 2f2e 0014 movel %fp@(20),%sp@- 5fb40: 2f00 movel %d0,%sp@- 5fb42: 4eb9 0006 2df0 jsr 62df0 <memcpy>
* @param block_count The block count.
*/
static inline void
rtems_rfs_inode_set_block_count (rtems_rfs_inode_handle* handle, uint32_t block_count)
{
rtems_rfs_write_u32 (&handle->node->block_count, block_count);
5fb48: 206a 000c moveal %a2@(12),%a0
rtems_rfs_buffer_mark_dirty (&handle->buffer);
5fb4c: 4fef 000c lea %sp@(12),%sp
* @param block_count The block count.
*/
static inline void
rtems_rfs_inode_set_block_count (rtems_rfs_inode_handle* handle, uint32_t block_count)
{
rtems_rfs_write_u32 (&handle->node->block_count, block_count);
5fb50: 4200 clrb %d0 5fb52: 1140 000c moveb %d0,%a0@(12) 5fb56: 206a 000c moveal %a2@(12),%a0 5fb5a: 1140 000d moveb %d0,%a0@(13) 5fb5e: 206a 000c moveal %a2@(12),%a0 5fb62: 1140 000e moveb %d0,%a0@(14) 5fb66: 206a 000c moveal %a2@(12),%a0 5fb6a: 1140 000f moveb %d0,%a0@(15)
*/
static inline void
rtems_rfs_inode_set_block_offset (rtems_rfs_inode_handle* handle,
uint16_t block_offset)
{
rtems_rfs_write_u16 (&handle->node->block_offset, block_offset);
5fb6e: 2003 movel %d3,%d0 5fb70: e088 lsrl #8,%d0 5fb72: 206a 000c moveal %a2@(12),%a0 5fb76: 1140 000a moveb %d0,%a0@(10)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
5fb7a: 7001 moveq #1,%d0
*/
static inline void
rtems_rfs_inode_set_block_offset (rtems_rfs_inode_handle* handle,
uint16_t block_offset)
{
rtems_rfs_write_u16 (&handle->node->block_offset, block_offset);
5fb7c: 206a 000c moveal %a2@(12),%a0 5fb80: 1143 000b moveb %d3,%a0@(11)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
5fb84: 1d40 ffd8 moveb %d0,%fp@(-40)
}
}
rtems_rfs_inode_set_block_offset (&inode, link_length);
rc = rtems_rfs_inode_close (fs, &inode);
5fb88: 2f0a movel %a2,%sp@- 5fb8a: 2f0c movel %a4,%sp@- 5fb8c: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close>
return rc;
5fb92: 508f addql #8,%sp
}
}
rtems_rfs_inode_set_block_offset (&inode, link_length);
rc = rtems_rfs_inode_close (fs, &inode);
5fb94: 2400 movel %d0,%d2
return rc;
}
5fb96: 2002 movel %d2,%d0 5fb98: 4cee 3cfc ff54 moveml %fp@(-172),%d2-%d7/%a2-%a5 5fb9e: 4e5e unlk %fp 5fba0: 4e75 rts
rtems_rfs_block_map map;
rtems_rfs_block_no block;
rtems_rfs_buffer_handle buffer;
uint8_t* data;
rc = rtems_rfs_block_map_open (fs, &inode, &map);
5fba2: 280e movel %fp,%d4 <== NOT EXECUTED 5fba4: 0684 ffff ff7e addil #-130,%d4 <== NOT EXECUTED 5fbaa: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5fbac: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5fbae: 2f0c movel %a4,%sp@- <== NOT EXECUTED 5fbb0: 4eb9 0005 adf2 jsr 5adf2 <rtems_rfs_block_map_open> <== NOT EXECUTED
if (rc > 0)
5fbb6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rtems_rfs_block_map map;
rtems_rfs_block_no block;
rtems_rfs_buffer_handle buffer;
uint8_t* data;
rc = rtems_rfs_block_map_open (fs, &inode, &map);
5fbba: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
5fbbc: 6f18 bles 5fbd6 <rtems_rfs_symlink+0x1ca> <== NOT EXECUTED
}
rc = rtems_rfs_block_map_close (fs, &map);
if (rc > 0)
{
rtems_rfs_inode_close (fs, &inode);
5fbbe: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5fbc0: 2f0c movel %a4,%sp@- <== NOT EXECUTED 5fbc2: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close> <== NOT EXECUTED
return rc;
5fbc8: 508f addql #8,%sp <== NOT EXECUTED
rtems_rfs_inode_set_block_offset (&inode, link_length);
rc = rtems_rfs_inode_close (fs, &inode);
return rc;
}
5fbca: 2002 movel %d2,%d0 <== NOT EXECUTED 5fbcc: 4cee 3cfc ff54 moveml %fp@(-172),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5fbd2: 4e5e unlk %fp <== NOT EXECUTED 5fbd4: 4e75 rts <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_block_map_grow (fs, &map, 1, &block);
5fbd6: 486e fffc pea %fp@(-4) <== NOT EXECUTED 5fbda: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 5fbde: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5fbe0: 2f0c movel %a4,%sp@- <== NOT EXECUTED 5fbe2: 4eb9 0005 b38e jsr 5b38e <rtems_rfs_block_map_grow> <== NOT EXECUTED
if (rc > 0)
5fbe8: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_block_map_grow (fs, &map, 1, &block);
5fbec: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
5fbee: 6f24 bles 5fc14 <rtems_rfs_symlink+0x208> <== NOT EXECUTED
}
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, false);
if (rc > 0)
{
rtems_rfs_block_map_close (fs, &map);
5fbf0: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5fbf2: 2f0c movel %a4,%sp@- <== NOT EXECUTED 5fbf4: 4eb9 0005 af84 jsr 5af84 <rtems_rfs_block_map_close> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
5fbfa: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5fbfc: 2f0c movel %a4,%sp@- <== NOT EXECUTED 5fbfe: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close> <== NOT EXECUTED
return rc;
5fc04: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rtems_rfs_inode_set_block_offset (&inode, link_length);
rc = rtems_rfs_inode_close (fs, &inode);
return rc;
}
5fc08: 2002 movel %d2,%d0 <== NOT EXECUTED 5fc0a: 4cee 3cfc ff54 moveml %fp@(-172),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5fc10: 4e5e unlk %fp <== NOT EXECUTED 5fc12: 4e75 rts <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, false);
5fc14: 42a7 clrl %sp@- <== NOT EXECUTED 5fc16: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 5fc1a: 2a0e movel %fp,%d5 <== NOT EXECUTED 5fc1c: 0685 ffff ffee addil #-18,%d5 <== NOT EXECUTED 5fc22: 2f05 movel %d5,%sp@- <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
5fc24: 4200 clrb %d0 <== NOT EXECUTED 5fc26: 2f0c movel %a4,%sp@- <== NOT EXECUTED 5fc28: 1d40 ffee moveb %d0,%fp@(-18) <== NOT EXECUTED
handle->bnum = 0;
5fc2c: 42ae fff0 clrl %fp@(-16) <== NOT EXECUTED
handle->buffer = NULL;
5fc30: 42ae fff4 clrl %fp@(-12) <== NOT EXECUTED 5fc34: 4eb9 0005 bd6e jsr 5bd6e <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
if (rc > 0)
5fc3a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, false);
5fc3e: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
5fc40: 6eae bgts 5fbf0 <rtems_rfs_symlink+0x1e4> <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
rtems_rfs_inode_close (fs, &inode);
return rc;
}
data = rtems_rfs_buffer_data (&buffer);
5fc42: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 5fc46: 2428 001e movel %a0@(30),%d2 <== NOT EXECUTED
memset (data, 0xff, rtems_rfs_fs_block_size (fs));
5fc4a: 2f2c 0008 movel %a4@(8),%sp@- <== NOT EXECUTED 5fc4e: 4878 00ff pea ff <DBL_MANT_DIG+0xca> <== NOT EXECUTED 5fc52: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5fc54: 4eb9 0006 2f48 jsr 62f48 <memset> <== NOT EXECUTED
memcpy (data, link, link_length);
5fc5a: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5fc5c: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED 5fc60: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5fc62: 4eb9 0006 2df0 jsr 62df0 <memcpy> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
5fc68: 2f05 movel %d5,%sp@- <== NOT EXECUTED 5fc6a: 2f0c movel %a4,%sp@- <== NOT EXECUTED 5fc6c: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_block_map_close (fs, &map);
5fc72: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED 5fc76: 2e84 movel %d4,%sp@ <== NOT EXECUTED
handle->dirty = false;
5fc78: 4200 clrb %d0 <== NOT EXECUTED 5fc7a: 2f0c movel %a4,%sp@- <== NOT EXECUTED 5fc7c: 1d40 ffee moveb %d0,%fp@(-18) <== NOT EXECUTED
handle->bnum = 0;
5fc80: 42ae fff0 clrl %fp@(-16) <== NOT EXECUTED
handle->buffer = NULL;
5fc84: 42ae fff4 clrl %fp@(-12) <== NOT EXECUTED 5fc88: 4eb9 0005 af84 jsr 5af84 <rtems_rfs_block_map_close> <== NOT EXECUTED
if (rc > 0)
5fc8e: 508f addql #8,%sp <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_block_map_close (fs, &map);
5fc90: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
5fc92: 6e00 ff2a bgtw 5fbbe <rtems_rfs_symlink+0x1b2> <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_block_offset (rtems_rfs_inode_handle* handle,
uint16_t block_offset)
{
rtems_rfs_write_u16 (&handle->node->block_offset, block_offset);
5fc96: 206a 000c moveal %a2@(12),%a0 <== NOT EXECUTED 5fc9a: 2003 movel %d3,%d0 <== NOT EXECUTED 5fc9c: e088 lsrl #8,%d0 <== NOT EXECUTED 5fc9e: 1140 000a moveb %d0,%a0@(10) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
5fca2: 7001 moveq #1,%d0 <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_block_offset (rtems_rfs_inode_handle* handle,
uint16_t block_offset)
{
rtems_rfs_write_u16 (&handle->node->block_offset, block_offset);
5fca4: 206a 000c moveal %a2@(12),%a0 <== NOT EXECUTED 5fca8: 1143 000b moveb %d3,%a0@(11) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
5fcac: 1d40 ffd8 moveb %d0,%fp@(-40) <== NOT EXECUTED
}
}
rtems_rfs_inode_set_block_offset (&inode, link_length);
rc = rtems_rfs_inode_close (fs, &inode);
5fcb0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5fcb2: 2f0c movel %a4,%sp@- <== NOT EXECUTED 5fcb4: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close> <== NOT EXECUTED
return rc;
5fcba: 508f addql #8,%sp <== NOT EXECUTED
}
}
rtems_rfs_inode_set_block_offset (&inode, link_length);
rc = rtems_rfs_inode_close (fs, &inode);
5fcbc: 2400 movel %d0,%d2 <== NOT EXECUTED 5fcbe: 6000 fed6 braw 5fb96 <rtems_rfs_symlink+0x18a> <== NOT EXECUTED
0005fcc2 <rtems_rfs_symlink_read>:
rtems_rfs_symlink_read (rtems_rfs_file_system* fs,
rtems_rfs_ino link,
char* path,
size_t size,
size_t* length)
{
5fcc2: 4e56 ff70 linkw %fp,#-144 5fcc6: 48d7 041c moveml %d2-%d4/%a2,%sp@
rtems_rfs_inode_handle inode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK_READ))
5fcca: 42a7 clrl %sp@- 5fccc: 4878 0004 pea 4 <CONTEXT_ARG>
rtems_rfs_symlink_read (rtems_rfs_file_system* fs,
rtems_rfs_ino link,
char* path,
size_t size,
size_t* length)
{
5fcd0: 262e 0008 movel %fp@(8),%d3 5fcd4: 242e 000c movel %fp@(12),%d2
rtems_rfs_inode_handle inode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK_READ))
5fcd8: 4eb9 0005 37c0 jsr 537c0 <rtems_rfs_trace> 5fcde: 508f addql #8,%sp 5fce0: 4a00 tstb %d0
5fce2: 6652 bnes 5fd36 <rtems_rfs_symlink_read+0x74> <== NEVER TAKEN
printf ("rtems-rfs: symlink-read: link:%" PRIu32 "\n", link);
rc = rtems_rfs_inode_open (fs, link, &inode, true);
5fce4: 4878 0001 pea 1 <ADD> 5fce8: 45ee ffcc lea %fp@(-52),%a2 5fcec: 2f0a movel %a2,%sp@- 5fcee: 2f02 movel %d2,%sp@- 5fcf0: 2f03 movel %d3,%sp@- 5fcf2: 4eb9 0005 0300 jsr 50300 <rtems_rfs_inode_open>
if (rc)
5fcf8: 4fef 0010 lea %sp@(16),%sp
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK_READ))
printf ("rtems-rfs: symlink-read: link:%" PRIu32 "\n", link);
rc = rtems_rfs_inode_open (fs, link, &inode, true);
5fcfc: 2400 movel %d0,%d2
if (rc)
5fcfe: 662a bnes 5fd2a <rtems_rfs_symlink_read+0x68> <== NEVER TAKEN
return rc;
if (!RTEMS_RFS_S_ISLNK (rtems_rfs_inode_get_mode (&inode)))
5fd00: 206a 000c moveal %a2@(12),%a0
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
5fd04: 4280 clrl %d0 5fd06: 1028 0002 moveb %a0@(2),%d0 5fd0a: e188 lsll #8,%d0 5fd0c: 0280 0000 f000 andil #61440,%d0 5fd12: 0c80 0000 a000 cmpil #40960,%d0
5fd18: 672e beqs 5fd48 <rtems_rfs_symlink_read+0x86> <== ALWAYS TAKEN
{
rtems_rfs_inode_close (fs, &inode);
5fd1a: 2f0a movel %a2,%sp@- <== NOT EXECUTED
return EINVAL;
5fd1c: 143c 0016 moveb #22,%d2 <== NOT EXECUTED
if (rc)
return rc;
if (!RTEMS_RFS_S_ISLNK (rtems_rfs_inode_get_mode (&inode)))
{
rtems_rfs_inode_close (fs, &inode);
5fd20: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5fd22: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close> <== NOT EXECUTED
return EINVAL;
5fd28: 508f addql #8,%sp <== NOT EXECUTED
path[*length] = '\0';
rc = rtems_rfs_inode_close (fs, &inode);
return rc;
}
5fd2a: 2002 movel %d2,%d0 <== NOT EXECUTED 5fd2c: 4cee 041c ff70 moveml %fp@(-144),%d2-%d4/%a2 <== NOT EXECUTED 5fd32: 4e5e unlk %fp <== NOT EXECUTED 5fd34: 4e75 rts <== NOT EXECUTED
{
rtems_rfs_inode_handle inode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK_READ))
printf ("rtems-rfs: symlink-read: link:%" PRIu32 "\n", link);
5fd36: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5fd38: 4879 0007 4a3a pea 74a3a <CSWTCH.1+0x145e> <== NOT EXECUTED 5fd3e: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5fd44: 508f addql #8,%sp <== NOT EXECUTED 5fd46: 609c bras 5fce4 <rtems_rfs_symlink_read+0x22> <== NOT EXECUTED
* @return uint32_t The block offset.
*/
static inline uint16_t
rtems_rfs_inode_get_block_offset (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->block_offset);
5fd48: 4280 clrl %d0 5fd4a: 1028 000a moveb %a0@(10),%d0 5fd4e: 4281 clrl %d1 5fd50: 1228 000b moveb %a0@(11),%d1 5fd54: e188 lsll #8,%d0
{
rtems_rfs_inode_close (fs, &inode);
return EINVAL;
}
*length = rtems_rfs_inode_get_block_offset (&inode);
5fd56: 226e 0018 moveal %fp@(24),%a1 5fd5a: 8081 orl %d1,%d0 5fd5c: 2280 movel %d0,%a1@
if (size < *length)
5fd5e: b0ae 0014 cmpl %fp@(20),%d0
5fd62: 6268 bhis 5fdcc <rtems_rfs_symlink_read+0x10a>
* @return uint32_t The block count.
*/
static inline uint32_t
rtems_rfs_inode_get_block_count (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u32 (&handle->node->block_count);
5fd64: 4281 clrl %d1 5fd66: 4282 clrl %d2 5fd68: 1228 000c moveb %a0@(12),%d1 5fd6c: 1428 000d moveb %a0@(13),%d2 5fd70: 7818 moveq #24,%d4 5fd72: 4842 swap %d2 5fd74: 4242 clrw %d2 5fd76: e9a9 lsll %d4,%d1 5fd78: 4284 clrl %d4 5fd7a: 1828 000f moveb %a0@(15),%d4 5fd7e: 8282 orl %d2,%d1 5fd80: 4282 clrl %d2 5fd82: 1428 000e moveb %a0@(14),%d2 5fd86: 8284 orl %d4,%d1 5fd88: e18a lsll #8,%d2 5fd8a: 8282 orl %d2,%d1
{
rtems_rfs_inode_close (fs, &inode);
return EINVAL;
}
if (rtems_rfs_inode_get_block_count (&inode) == 0)
5fd8c: 6658 bnes 5fde6 <rtems_rfs_symlink_read+0x124> <== NEVER TAKEN
{
memcpy (path, inode.node->data.name, *length);
5fd8e: 2f00 movel %d0,%sp@- 5fd90: 4868 001c pea %a0@(28) 5fd94: 2f2e 0010 movel %fp@(16),%sp@- 5fd98: 4eb9 0006 2df0 jsr 62df0 <memcpy>
rtems_rfs_inode_close (fs, &inode);
return rc;
}
}
path[*length] = '\0';
5fd9e: 206e 0018 moveal %fp@(24),%a0
return EINVAL;
}
if (rtems_rfs_inode_get_block_count (&inode) == 0)
{
memcpy (path, inode.node->data.name, *length);
5fda2: 4fef 000c lea %sp@(12),%sp
rtems_rfs_inode_close (fs, &inode);
return rc;
}
}
path[*length] = '\0';
5fda6: 2010 movel %a0@,%d0 5fda8: 4201 clrb %d1 5fdaa: 206e 0010 moveal %fp@(16),%a0
rc = rtems_rfs_inode_close (fs, &inode);
5fdae: 2f0a movel %a2,%sp@-
rtems_rfs_inode_close (fs, &inode);
return rc;
}
}
path[*length] = '\0';
5fdb0: 1181 0800 moveb %d1,%a0@(00000000,%d0:l)
rc = rtems_rfs_inode_close (fs, &inode);
5fdb4: 2f03 movel %d3,%sp@- 5fdb6: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close>
return rc;
5fdbc: 508f addql #8,%sp
}
}
path[*length] = '\0';
rc = rtems_rfs_inode_close (fs, &inode);
5fdbe: 2400 movel %d0,%d2
return rc;
}
5fdc0: 2002 movel %d2,%d0 5fdc2: 4cee 041c ff70 moveml %fp@(-144),%d2-%d4/%a2 5fdc8: 4e5e unlk %fp 5fdca: 4e75 rts
*length = rtems_rfs_inode_get_block_offset (&inode);
if (size < *length)
{
rtems_rfs_inode_close (fs, &inode);
5fdcc: 2f0a movel %a2,%sp@-
return EINVAL;
5fdce: 7416 moveq #22,%d2
*length = rtems_rfs_inode_get_block_offset (&inode);
if (size < *length)
{
rtems_rfs_inode_close (fs, &inode);
5fdd0: 2f03 movel %d3,%sp@- 5fdd2: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close>
return EINVAL;
5fdd8: 508f addql #8,%sp
path[*length] = '\0';
rc = rtems_rfs_inode_close (fs, &inode);
return rc;
}
5fdda: 2002 movel %d2,%d0 5fddc: 4cee 041c ff70 moveml %fp@(-144),%d2-%d4/%a2 5fde2: 4e5e unlk %fp 5fde4: 4e75 rts
rtems_rfs_block_map map;
rtems_rfs_block_no block;
rtems_rfs_buffer_handle buffer;
char* data;
rc = rtems_rfs_block_map_open (fs, &inode, &map);
5fde6: 280e movel %fp,%d4 <== NOT EXECUTED 5fde8: 0684 ffff ff82 addil #-126,%d4 <== NOT EXECUTED 5fdee: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5fdf0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5fdf2: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5fdf4: 4eb9 0005 adf2 jsr 5adf2 <rtems_rfs_block_map_open> <== NOT EXECUTED
if (rc > 0)
5fdfa: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rtems_rfs_block_map map;
rtems_rfs_block_no block;
rtems_rfs_buffer_handle buffer;
char* data;
rc = rtems_rfs_block_map_open (fs, &inode, &map);
5fdfe: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
5fe00: 6f18 bles 5fe1a <rtems_rfs_symlink_read+0x158> <== NOT EXECUTED
}
rc = rtems_rfs_block_map_close (fs, &map);
if (rc > 0)
{
rtems_rfs_inode_close (fs, &inode);
5fe02: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5fe04: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5fe06: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close> <== NOT EXECUTED
return rc;
5fe0c: 508f addql #8,%sp <== NOT EXECUTED
path[*length] = '\0';
rc = rtems_rfs_inode_close (fs, &inode);
return rc;
}
5fe0e: 2002 movel %d2,%d0 <== NOT EXECUTED 5fe10: 4cee 041c ff70 moveml %fp@(-144),%d2-%d4/%a2 <== NOT EXECUTED 5fe16: 4e5e unlk %fp <== NOT EXECUTED 5fe18: 4e75 rts <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_block_map_seek (fs, &map, 0, &block);
5fe1a: 486e fffc pea %fp@(-4) <== NOT EXECUTED 5fe1e: 42a7 clrl %sp@- <== NOT EXECUTED 5fe20: 42a7 clrl %sp@- <== NOT EXECUTED 5fe22: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5fe24: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5fe26: 4eb9 0005 b2de jsr 5b2de <rtems_rfs_block_map_seek> <== NOT EXECUTED
if (rc > 0)
5fe2c: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_block_map_seek (fs, &map, 0, &block);
5fe30: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
5fe32: 6f24 bles 5fe58 <rtems_rfs_symlink_read+0x196> <== NOT EXECUTED
}
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, false);
if (rc > 0)
{
rtems_rfs_block_map_close (fs, &map);
5fe34: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5fe36: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5fe38: 4eb9 0005 af84 jsr 5af84 <rtems_rfs_block_map_close> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
5fe3e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5fe40: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5fe42: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close> <== NOT EXECUTED
return rc;
5fe48: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
path[*length] = '\0';
rc = rtems_rfs_inode_close (fs, &inode);
return rc;
}
5fe4c: 2002 movel %d2,%d0 <== NOT EXECUTED 5fe4e: 4cee 041c ff70 moveml %fp@(-144),%d2-%d4/%a2 <== NOT EXECUTED 5fe54: 4e5e unlk %fp <== NOT EXECUTED 5fe56: 4e75 rts <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, false);
5fe58: 42a7 clrl %sp@- <== NOT EXECUTED 5fe5a: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 5fe5e: 486e fff2 pea %fp@(-14) <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
5fe62: 4200 clrb %d0 <== NOT EXECUTED 5fe64: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5fe66: 1d40 fff2 moveb %d0,%fp@(-14) <== NOT EXECUTED
handle->bnum = 0;
5fe6a: 42ae fff4 clrl %fp@(-12) <== NOT EXECUTED
handle->buffer = NULL;
5fe6e: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED 5fe72: 4eb9 0005 bd6e jsr 5bd6e <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
if (rc > 0)
5fe78: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, false);
5fe7c: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
5fe7e: 6eb4 bgts 5fe34 <rtems_rfs_symlink_read+0x172> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
return rc;
}
data = rtems_rfs_buffer_data (&buffer);
memcpy (path, data, *length);
5fe80: 206e 0018 moveal %fp@(24),%a0 <== NOT EXECUTED 5fe84: 2f10 movel %a0@,%sp@- <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
rtems_rfs_inode_close (fs, &inode);
return rc;
}
data = rtems_rfs_buffer_data (&buffer);
5fe86: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED
memcpy (path, data, *length);
5fe8a: 2f28 001e movel %a0@(30),%sp@- <== NOT EXECUTED 5fe8e: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 5fe92: 4eb9 0006 2df0 jsr 62df0 <memcpy> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
5fe98: 486e fff2 pea %fp@(-14) <== NOT EXECUTED 5fe9c: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5fe9e: 4eb9 0005 bbc0 jsr 5bbc0 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
5fea4: 4200 clrb %d0 <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_block_map_close (fs, &map);
5fea6: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5fea8: 1d40 fff2 moveb %d0,%fp@(-14) <== NOT EXECUTED 5feac: 2f03 movel %d3,%sp@- <== NOT EXECUTED
handle->bnum = 0;
5feae: 42ae fff4 clrl %fp@(-12) <== NOT EXECUTED
handle->buffer = NULL;
5feb2: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED 5feb6: 4eb9 0005 af84 jsr 5af84 <rtems_rfs_block_map_close> <== NOT EXECUTED
if (rc > 0)
5febc: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_block_map_close (fs, &map);
5fec0: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
5fec2: 6e00 ff3e bgtw 5fe02 <rtems_rfs_symlink_read+0x140> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
return rc;
}
}
path[*length] = '\0';
5fec6: 206e 0018 moveal %fp@(24),%a0 <== NOT EXECUTED 5feca: 2010 movel %a0@,%d0 <== NOT EXECUTED 5fecc: 4201 clrb %d1 <== NOT EXECUTED 5fece: 206e 0010 moveal %fp@(16),%a0 <== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
5fed2: 2f0a movel %a2,%sp@- <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
return rc;
}
}
path[*length] = '\0';
5fed4: 1181 0800 moveb %d1,%a0@(00000000,%d0:l) <== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
5fed8: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5feda: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close> <== NOT EXECUTED
return rc;
5fee0: 508f addql #8,%sp <== NOT EXECUTED
}
}
path[*length] = '\0';
rc = rtems_rfs_inode_close (fs, &inode);
5fee2: 2400 movel %d0,%d2 <== NOT EXECUTED 5fee4: 6000 feda braw 5fdc0 <rtems_rfs_symlink_read+0xfe> <== NOT EXECUTED
00053816 <rtems_rfs_trace_clear_mask>:
rtems_rfs_trace_mask
rtems_rfs_trace_clear_mask (rtems_rfs_trace_mask mask)
{
53816: 4e56 fff0 linkw %fp,#-16 <== NOT EXECUTED 5381a: 48d7 003c moveml %d2-%d5,%sp@ <== NOT EXECUTED
rtems_rfs_trace_mask state = rtems_rfs_trace_flags; rtems_rfs_trace_flags &= ~mask;
5381e: 2a2e 0008 movel %fp@(8),%d5 <== NOT EXECUTED 53822: 4685 notl %d5 <== NOT EXECUTED 53824: 282e 000c movel %fp@(12),%d4 <== NOT EXECUTED 53828: 4684 notl %d4 <== NOT EXECUTED
}
rtems_rfs_trace_mask
rtems_rfs_trace_clear_mask (rtems_rfs_trace_mask mask)
{
rtems_rfs_trace_mask state = rtems_rfs_trace_flags;
5382a: 2639 0007 66cc movel 766cc <rtems_rfs_trace_flags>,%d3 <== NOT EXECUTED
rtems_rfs_trace_flags &= ~mask; return state; }
53830: 2003 movel %d3,%d0 <== NOT EXECUTED
}
rtems_rfs_trace_mask
rtems_rfs_trace_clear_mask (rtems_rfs_trace_mask mask)
{
rtems_rfs_trace_mask state = rtems_rfs_trace_flags;
53832: 2439 0007 66d0 movel 766d0 <rtems_rfs_trace_flags+0x4>,%d2 <== NOT EXECUTED
rtems_rfs_trace_flags &= ~mask; return state; }
53838: 2202 movel %d2,%d1 <== NOT EXECUTED
rtems_rfs_trace_mask
rtems_rfs_trace_clear_mask (rtems_rfs_trace_mask mask)
{
rtems_rfs_trace_mask state = rtems_rfs_trace_flags;
rtems_rfs_trace_flags &= ~mask;
5383a: ca83 andl %d3,%d5 <== NOT EXECUTED 5383c: c882 andl %d2,%d4 <== NOT EXECUTED 5383e: 23c5 0007 66cc movel %d5,766cc <rtems_rfs_trace_flags> <== NOT EXECUTED 53844: 23c4 0007 66d0 movel %d4,766d0 <rtems_rfs_trace_flags+0x4> <== NOT EXECUTED
return state; }
5384a: 4cd7 003c moveml %sp@,%d2-%d5 <== NOT EXECUTED 5384e: 4e5e unlk %fp <== NOT EXECUTED
000537e2 <rtems_rfs_trace_set_mask>:
rtems_rfs_trace_mask
rtems_rfs_trace_set_mask (rtems_rfs_trace_mask mask)
{
537e2: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 537e6: 2f03 movel %d3,%sp@- <== NOT EXECUTED
rtems_rfs_trace_mask state = rtems_rfs_trace_flags;
537e8: 2639 0007 66cc movel 766cc <rtems_rfs_trace_flags>,%d3 <== NOT EXECUTED
rtems_rfs_trace_flags |= mask; return state; }
537ee: 2003 movel %d3,%d0 <== NOT EXECUTED
return result;
}
rtems_rfs_trace_mask
rtems_rfs_trace_set_mask (rtems_rfs_trace_mask mask)
{
537f0: 2f02 movel %d2,%sp@- <== NOT EXECUTED
rtems_rfs_trace_mask state = rtems_rfs_trace_flags;
537f2: 2439 0007 66d0 movel 766d0 <rtems_rfs_trace_flags+0x4>,%d2 <== NOT EXECUTED
rtems_rfs_trace_flags |= mask; return state; }
537f8: 2202 movel %d2,%d1 <== NOT EXECUTED
rtems_rfs_trace_mask
rtems_rfs_trace_set_mask (rtems_rfs_trace_mask mask)
{
rtems_rfs_trace_mask state = rtems_rfs_trace_flags;
rtems_rfs_trace_flags |= mask;
537fa: 84ae 000c orl %fp@(12),%d2 <== NOT EXECUTED 537fe: 86ae 0008 orl %fp@(8),%d3 <== NOT EXECUTED 53802: 23c2 0007 66d0 movel %d2,766d0 <rtems_rfs_trace_flags+0x4> <== NOT EXECUTED
return state; }
53808: 241f movel %sp@+,%d2 <== NOT EXECUTED
rtems_rfs_trace_mask
rtems_rfs_trace_set_mask (rtems_rfs_trace_mask mask)
{
rtems_rfs_trace_mask state = rtems_rfs_trace_flags;
rtems_rfs_trace_flags |= mask;
5380a: 23c3 0007 66cc movel %d3,766cc <rtems_rfs_trace_flags> <== NOT EXECUTED
return state; }
53810: 261f movel %sp@+,%d3 <== NOT EXECUTED 53812: 4e5e unlk %fp <== NOT EXECUTED
00053852 <rtems_rfs_trace_shell_command>:
int
rtems_rfs_trace_shell_command (int argc, char *argv[])
{
53852: 4e56 ff30 linkw %fp,#-208 <== NOT EXECUTED 53856: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED
const char* table[] =
5385a: 4878 0098 pea 98 <DBL_MANT_DIG+0x63> <== NOT EXECUTED 5385e: 4879 0007 322c pea 7322c <rtems_rfs_rtems_link_handlers+0x292><== NOT EXECUTED 53864: 486e ff68 pea %fp@(-152) <== NOT EXECUTED 53868: 4eb9 0006 2df0 jsr 62df0 <memcpy> <== NOT EXECUTED
rtems_rfs_trace_mask clear_value = 0;
bool set = true;
int arg;
int t;
for (arg = 1; arg < argc; arg++)
5386e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 53872: 7001 moveq #1,%d0 <== NOT EXECUTED 53874: b0ae 0008 cmpl %fp@(8),%d0 <== NOT EXECUTED 53878: 6c00 0126 bgew 539a0 <rtems_rfs_trace_shell_command+0x14e><== NOT EXECUTED
{
if (argv[arg][0] == '-')
5387c: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 53880: 722d moveq #45,%d1 <== NOT EXECUTED 53882: 2468 0004 moveal %a0@(4),%a2 <== NOT EXECUTED 53886: 1012 moveb %a2@,%d0 <== NOT EXECUTED 53888: 49c0 extbl %d0 <== NOT EXECUTED 5388a: b280 cmpl %d0,%d1 <== NOT EXECUTED 5388c: 6700 0098 beqw 53926 <rtems_rfs_trace_shell_command+0xd4><== NOT EXECUTED
rtems_rfs_trace_flags &= ~mask;
return state;
}
int
rtems_rfs_trace_shell_command (int argc, char *argv[])
53890: 2a6e 000c moveal %fp@(12),%a5 <== NOT EXECUTED 53894: 49f9 0006 365c lea 6365c <strcmp>,%a4 <== NOT EXECUTED 5389a: 508d addql #8,%a5 <== NOT EXECUTED
rtems_rfs_trace_mask clear_value = 0;
bool set = true;
int arg;
int t;
for (arg = 1; arg < argc; arg++)
5389c: 7601 moveq #1,%d3 <== NOT EXECUTED
"file-close",
"file-io"
};
rtems_rfs_trace_mask set_value = 0;
rtems_rfs_trace_mask clear_value = 0;
5389e: 4280 clrl %d0 <== NOT EXECUTED 538a0: 4281 clrl %d1 <== NOT EXECUTED
for (t = 0; t < (sizeof (table) / sizeof (const char*)); t++)
printf (" %s\n", table[t]);
return 0;
default:
printf ("error: unknown option\n");
return 1;
538a2: 2839 0007 66cc movel 766cc <rtems_rfs_trace_flags>,%d4 <== NOT EXECUTED 538a8: 2a39 0007 66d0 movel 766d0 <rtems_rfs_trace_flags+0x4>,%d5 <== NOT EXECUTED
"file-io"
};
rtems_rfs_trace_mask set_value = 0;
rtems_rfs_trace_mask clear_value = 0;
bool set = true;
538ae: 7c01 moveq #1,%d6 <== NOT EXECUTED
"file-close",
"file-io"
};
rtems_rfs_trace_mask set_value = 0;
rtems_rfs_trace_mask clear_value = 0;
538b0: 2d40 ff60 movel %d0,%fp@(-160) <== NOT EXECUTED 538b4: 2d41 ff64 movel %d1,%fp@(-156) <== NOT EXECUTED
"file-open",
"file-close",
"file-io"
};
rtems_rfs_trace_mask set_value = 0;
538b8: 2d40 ff58 movel %d0,%fp@(-168) <== NOT EXECUTED 538bc: 2d41 ff5c movel %d1,%fp@(-164) <== NOT EXECUTED
return 1;
}
}
else
{
if (strcmp (argv[arg], "set") == 0)
538c0: 4879 0007 1a3e pea 71a3e <rtems_filesystem_table+0x4dc> <== NOT EXECUTED 538c6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 538c8: 4e94 jsr %a4@ <== NOT EXECUTED 538ca: 508f addql #8,%sp <== NOT EXECUTED 538cc: 4a80 tstl %d0 <== NOT EXECUTED 538ce: 6602 bnes 538d2 <rtems_rfs_trace_shell_command+0x80><== NOT EXECUTED
set = true;
538d0: 7c01 moveq #1,%d6 <== NOT EXECUTED
if (strcmp (argv[arg], "clear") == 0)
538d2: 4879 0007 305d pea 7305d <rtems_rfs_rtems_link_handlers+0xc3><== NOT EXECUTED 538d8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 538da: 4e94 jsr %a4@ <== NOT EXECUTED 538dc: 508f addql #8,%sp <== NOT EXECUTED 538de: 4a80 tstl %d0 <== NOT EXECUTED 538e0: 6676 bnes 53958 <rtems_rfs_trace_shell_command+0x106><== NOT EXECUTED 538e2: 242e ff58 movel %fp@(-168),%d2 <== NOT EXECUTED 538e6: 2e2e ff5c movel %fp@(-164),%d7 <== NOT EXECUTED 538ea: 8484 orl %d4,%d2 <== NOT EXECUTED 538ec: 8e85 orl %d5,%d7 <== NOT EXECUTED 538ee: 222e ff60 movel %fp@(-160),%d1 <== NOT EXECUTED 538f2: 2802 movel %d2,%d4 <== NOT EXECUTED 538f4: 4681 notl %d1 <== NOT EXECUTED 538f6: 2a07 movel %d7,%d5 <== NOT EXECUTED 538f8: 202e ff64 movel %fp@(-156),%d0 <== NOT EXECUTED 538fc: 4680 notl %d0 <== NOT EXECUTED
set = false;
538fe: 4206 clrb %d6 <== NOT EXECUTED
}
else
{
if (strcmp (argv[arg], "set") == 0)
set = true;
if (strcmp (argv[arg], "clear") == 0)
53900: c881 andl %d1,%d4 <== NOT EXECUTED 53902: ca80 andl %d0,%d5 <== NOT EXECUTED
rtems_rfs_trace_mask clear_value = 0;
bool set = true;
int arg;
int t;
for (arg = 1; arg < argc; arg++)
53904: 5283 addql #1,%d3 <== NOT EXECUTED
}
}
}
rtems_rfs_trace_flags |= set_value;
rtems_rfs_trace_flags &= ~clear_value;
53906: 23c4 0007 66cc movel %d4,766cc <rtems_rfs_trace_flags> <== NOT EXECUTED 5390c: 23c5 0007 66d0 movel %d5,766d0 <rtems_rfs_trace_flags+0x4> <== NOT EXECUTED
rtems_rfs_trace_mask clear_value = 0;
bool set = true;
int arg;
int t;
for (arg = 1; arg < argc; arg++)
53912: b6ae 0008 cmpl %fp@(8),%d3 <== NOT EXECUTED 53916: 6700 0088 beqw 539a0 <rtems_rfs_trace_shell_command+0x14e><== NOT EXECUTED
{
if (argv[arg][0] == '-')
5391a: 245d moveal %a5@+,%a2 <== NOT EXECUTED 5391c: 722d moveq #45,%d1 <== NOT EXECUTED 5391e: 1012 moveb %a2@,%d0 <== NOT EXECUTED 53920: 49c0 extbl %d0 <== NOT EXECUTED 53922: b280 cmpl %d0,%d1 <== NOT EXECUTED 53924: 669a bnes 538c0 <rtems_rfs_trace_shell_command+0x6e><== NOT EXECUTED
{
switch (argv[arg][1])
53926: 7268 moveq #104,%d1 <== NOT EXECUTED 53928: 102a 0001 moveb %a2@(1),%d0 <== NOT EXECUTED 5392c: 49c0 extbl %d0 <== NOT EXECUTED 5392e: b280 cmpl %d0,%d1 <== NOT EXECUTED 53930: 6700 0136 beqw 53a68 <rtems_rfs_trace_shell_command+0x216><== NOT EXECUTED 53934: 123c 006c moveb #108,%d1 <== NOT EXECUTED 53938: b280 cmpl %d0,%d1 <== NOT EXECUTED 5393a: 6700 014c beqw 53a88 <rtems_rfs_trace_shell_command+0x236><== NOT EXECUTED
printf ("%s: valid flags to set or clear are:\n", argv[0]);
for (t = 0; t < (sizeof (table) / sizeof (const char*)); t++)
printf (" %s\n", table[t]);
return 0;
default:
printf ("error: unknown option\n");
5393e: 4879 0007 3047 pea 73047 <rtems_rfs_rtems_link_handlers+0xad><== NOT EXECUTED 53944: 4eb9 0006 30ce jsr 630ce <puts> <== NOT EXECUTED
return 1;
5394a: 588f addql #4,%sp <== NOT EXECUTED 5394c: 7001 moveq #1,%d0 <== NOT EXECUTED
rtems_rfs_trace_flags &= ~clear_value;
}
}
return 0;
}
5394e: 4cee 3cfc ff30 moveml %fp@(-208),%d2-%d7/%a2-%a5 <== NOT EXECUTED 53954: 4e5e unlk %fp <== NOT EXECUTED 53956: 4e75 rts <== NOT EXECUTED
{
if (strcmp (argv[arg], "set") == 0)
set = true;
if (strcmp (argv[arg], "clear") == 0)
set = false;
else if (strcmp (argv[arg], "all") == 0)
53958: 4879 0007 4d52 pea 74d52 <_global_impure_ptr+0x54> <== NOT EXECUTED 5395e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 53960: 4eb9 0006 365c jsr 6365c <strcmp> <== NOT EXECUTED 53966: 508f addql #8,%sp <== NOT EXECUTED 53968: 4a80 tstl %d0 <== NOT EXECUTED 5396a: 6640 bnes 539ac <rtems_rfs_trace_shell_command+0x15a><== NOT EXECUTED
{
if (set)
5396c: 4a06 tstb %d6 <== NOT EXECUTED 5396e: 6700 00b4 beqw 53a24 <rtems_rfs_trace_shell_command+0x1d2><== NOT EXECUTED 53972: 282e ff60 movel %fp@(-160),%d4 <== NOT EXECUTED 53976: 4684 notl %d4 <== NOT EXECUTED
rtems_rfs_trace_mask clear_value = 0;
bool set = true;
int arg;
int t;
for (arg = 1; arg < argc; arg++)
53978: 5283 addql #1,%d3 <== NOT EXECUTED
set = true;
if (strcmp (argv[arg], "clear") == 0)
set = false;
else if (strcmp (argv[arg], "all") == 0)
{
if (set)
5397a: 2a2e ff64 movel %fp@(-156),%d5 <== NOT EXECUTED 5397e: 4685 notl %d5 <== NOT EXECUTED
set_value = RTEMS_RFS_TRACE_ALL;
53980: 70ff moveq #-1,%d0 <== NOT EXECUTED 53982: 72ff moveq #-1,%d1 <== NOT EXECUTED
}
}
}
rtems_rfs_trace_flags |= set_value;
rtems_rfs_trace_flags &= ~clear_value;
53984: 23c4 0007 66cc movel %d4,766cc <rtems_rfs_trace_flags> <== NOT EXECUTED 5398a: 23c5 0007 66d0 movel %d5,766d0 <rtems_rfs_trace_flags+0x4> <== NOT EXECUTED
if (strcmp (argv[arg], "clear") == 0)
set = false;
else if (strcmp (argv[arg], "all") == 0)
{
if (set)
set_value = RTEMS_RFS_TRACE_ALL;
53990: 2d40 ff58 movel %d0,%fp@(-168) <== NOT EXECUTED 53994: 2d41 ff5c movel %d1,%fp@(-164) <== NOT EXECUTED
rtems_rfs_trace_mask clear_value = 0;
bool set = true;
int arg;
int t;
for (arg = 1; arg < argc; arg++)
53998: b6ae 0008 cmpl %fp@(8),%d3 <== NOT EXECUTED 5399c: 6600 ff7c bnew 5391a <rtems_rfs_trace_shell_command+0xc8><== NOT EXECUTED
rtems_rfs_trace_flags |= set_value;
rtems_rfs_trace_flags &= ~clear_value;
}
}
return 0;
539a0: 4280 clrl %d0 <== NOT EXECUTED
}
539a2: 4cee 3cfc ff30 moveml %fp@(-208),%d2-%d7/%a2-%a5 <== NOT EXECUTED 539a8: 4e5e unlk %fp <== NOT EXECUTED 539aa: 4e75 rts <== NOT EXECUTED
set = true;
if (strcmp (argv[arg], "clear") == 0)
set = false;
else if (strcmp (argv[arg], "all") == 0)
{
if (set)
539ac: 47ee ff68 lea %fp@(-152),%a3 <== NOT EXECUTED
{
if (strcmp (argv[arg], "set") == 0)
set = true;
if (strcmp (argv[arg], "clear") == 0)
set = false;
else if (strcmp (argv[arg], "all") == 0)
539b0: 4282 clrl %d2 <== NOT EXECUTED
}
else
{
for (t = 0; t < (sizeof (table) / sizeof (const char*)); t++)
{
if (strcmp (argv[arg], table[t]) == 0)
539b2: 2f1b movel %a3@+,%sp@- <== NOT EXECUTED 539b4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 539b6: 4e94 jsr %a4@ <== NOT EXECUTED 539b8: 508f addql #8,%sp <== NOT EXECUTED 539ba: 4a80 tstl %d0 <== NOT EXECUTED 539bc: 672c beqs 539ea <rtems_rfs_trace_shell_command+0x198><== NOT EXECUTED
else
clear_value = RTEMS_RFS_TRACE_ALL;
}
else
{
for (t = 0; t < (sizeof (table) / sizeof (const char*)); t++)
539be: 5282 addql #1,%d2 <== NOT EXECUTED 539c0: 7026 moveq #38,%d0 <== NOT EXECUTED 539c2: b082 cmpl %d2,%d0 <== NOT EXECUTED 539c4: 66ec bnes 539b2 <rtems_rfs_trace_shell_command+0x160><== NOT EXECUTED 539c6: 242e ff58 movel %fp@(-168),%d2 <== NOT EXECUTED 539ca: 2e2e ff5c movel %fp@(-164),%d7 <== NOT EXECUTED 539ce: 222e ff60 movel %fp@(-160),%d1 <== NOT EXECUTED 539d2: 4681 notl %d1 <== NOT EXECUTED 539d4: 202e ff64 movel %fp@(-156),%d0 <== NOT EXECUTED 539d8: 4680 notl %d0 <== NOT EXECUTED 539da: 8484 orl %d4,%d2 <== NOT EXECUTED 539dc: 8e85 orl %d5,%d7 <== NOT EXECUTED 539de: 2801 movel %d1,%d4 <== NOT EXECUTED 539e0: 2a00 movel %d0,%d5 <== NOT EXECUTED 539e2: c882 andl %d2,%d4 <== NOT EXECUTED 539e4: ca87 andl %d7,%d5 <== NOT EXECUTED 539e6: 6000 ff1c braw 53904 <rtems_rfs_trace_shell_command+0xb2><== NOT EXECUTED
{
if (strcmp (argv[arg], table[t]) == 0)
{
if (set)
539ea: 4a06 tstb %d6 <== NOT EXECUTED 539ec: 674a beqs 53a38 <rtems_rfs_trace_shell_command+0x1e6><== NOT EXECUTED
set_value = 1 << t;
539ee: 222e ff64 movel %fp@(-156),%d1 <== NOT EXECUTED 539f2: 103c 0001 moveb #1,%d0 <== NOT EXECUTED 539f6: 4681 notl %d1 <== NOT EXECUTED 539f8: 2041 moveal %d1,%a0 <== NOT EXECUTED 539fa: e5a8 lsll %d2,%d0 <== NOT EXECUTED 539fc: 2e2e ff60 movel %fp@(-160),%d7 <== NOT EXECUTED 53a00: 4687 notl %d7 <== NOT EXECUTED 53a02: 2d40 ff5c movel %d0,%fp@(-164) <== NOT EXECUTED 53a06: 5bc1 smi %d1 <== NOT EXECUTED 53a08: 49c1 extbl %d1 <== NOT EXECUTED 53a0a: 2d41 ff58 movel %d1,%fp@(-168) <== NOT EXECUTED 53a0e: 2200 movel %d0,%d1 <== NOT EXECUTED 53a10: 202e ff58 movel %fp@(-168),%d0 <== NOT EXECUTED 53a14: 8084 orl %d4,%d0 <== NOT EXECUTED 53a16: 8285 orl %d5,%d1 <== NOT EXECUTED 53a18: 2a08 movel %a0,%d5 <== NOT EXECUTED 53a1a: 2800 movel %d0,%d4 <== NOT EXECUTED 53a1c: ca81 andl %d1,%d5 <== NOT EXECUTED 53a1e: c887 andl %d7,%d4 <== NOT EXECUTED 53a20: 6000 fee2 braw 53904 <rtems_rfs_trace_shell_command+0xb2><== NOT EXECUTED
else if (strcmp (argv[arg], "all") == 0)
{
if (set)
set_value = RTEMS_RFS_TRACE_ALL;
else
clear_value = RTEMS_RFS_TRACE_ALL;
53a24: 70ff moveq #-1,%d0 <== NOT EXECUTED 53a26: 72ff moveq #-1,%d1 <== NOT EXECUTED
set = true;
if (strcmp (argv[arg], "clear") == 0)
set = false;
else if (strcmp (argv[arg], "all") == 0)
{
if (set)
53a28: 4284 clrl %d4 <== NOT EXECUTED 53a2a: 4285 clrl %d5 <== NOT EXECUTED
set_value = RTEMS_RFS_TRACE_ALL;
else
clear_value = RTEMS_RFS_TRACE_ALL;
53a2c: 2d40 ff60 movel %d0,%fp@(-160) <== NOT EXECUTED 53a30: 2d41 ff64 movel %d1,%fp@(-156) <== NOT EXECUTED 53a34: 6000 fece braw 53904 <rtems_rfs_trace_shell_command+0xb2><== NOT EXECUTED
if (strcmp (argv[arg], table[t]) == 0)
{
if (set)
set_value = 1 << t;
else
clear_value = 1 << t;
53a38: 7001 moveq #1,%d0 <== NOT EXECUTED 53a3a: e5a8 lsll %d2,%d0 <== NOT EXECUTED 53a3c: 242e ff58 movel %fp@(-168),%d2 <== NOT EXECUTED 53a40: 2d40 ff64 movel %d0,%fp@(-156) <== NOT EXECUTED 53a44: 5bc1 smi %d1 <== NOT EXECUTED 53a46: 49c1 extbl %d1 <== NOT EXECUTED 53a48: 2d41 ff60 movel %d1,%fp@(-160) <== NOT EXECUTED 53a4c: 2e2e ff5c movel %fp@(-164),%d7 <== NOT EXECUTED 53a50: 4680 notl %d0 <== NOT EXECUTED 53a52: 222e ff60 movel %fp@(-160),%d1 <== NOT EXECUTED 53a56: 4681 notl %d1 <== NOT EXECUTED 53a58: 8484 orl %d4,%d2 <== NOT EXECUTED 53a5a: 8e85 orl %d5,%d7 <== NOT EXECUTED 53a5c: 2801 movel %d1,%d4 <== NOT EXECUTED 53a5e: 2a00 movel %d0,%d5 <== NOT EXECUTED 53a60: c882 andl %d2,%d4 <== NOT EXECUTED 53a62: ca87 andl %d7,%d5 <== NOT EXECUTED 53a64: 6000 fe9e braw 53904 <rtems_rfs_trace_shell_command+0xb2><== NOT EXECUTED
if (argv[arg][0] == '-')
{
switch (argv[arg][1])
{
case 'h':
printf ("usage: %s [-hl] [set/clear] [flags]\n", argv[0]);
53a68: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 53a6c: 2f10 movel %a0@,%sp@- <== NOT EXECUTED 53a6e: 4879 0007 2ff6 pea 72ff6 <rtems_rfs_rtems_link_handlers+0x5c><== NOT EXECUTED 53a74: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED
return 0;
53a7a: 508f addql #8,%sp <== NOT EXECUTED 53a7c: 4280 clrl %d0 <== NOT EXECUTED
rtems_rfs_trace_flags &= ~clear_value;
}
}
return 0;
}
53a7e: 4cee 3cfc ff30 moveml %fp@(-208),%d2-%d7/%a2-%a5 <== NOT EXECUTED 53a84: 4e5e unlk %fp <== NOT EXECUTED 53a86: 4e75 rts <== NOT EXECUTED
{
case 'h':
printf ("usage: %s [-hl] [set/clear] [flags]\n", argv[0]);
return 0;
case 'l':
printf ("%s: valid flags to set or clear are:\n", argv[0]);
53a88: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 53a8c: 47f9 0006 2fd4 lea 62fd4 <printf>,%a3 <== NOT EXECUTED 53a92: 45ee ff68 lea %fp@(-152),%a2 <== NOT EXECUTED
rtems_rfs_trace_flags &= ~mask;
return state;
}
int
rtems_rfs_trace_shell_command (int argc, char *argv[])
53a96: 240e movel %fp,%d2 <== NOT EXECUTED
{
case 'h':
printf ("usage: %s [-hl] [set/clear] [flags]\n", argv[0]);
return 0;
case 'l':
printf ("%s: valid flags to set or clear are:\n", argv[0]);
53a98: 2f10 movel %a0@,%sp@- <== NOT EXECUTED 53a9a: 4879 0007 301b pea 7301b <rtems_rfs_rtems_link_handlers+0x81><== NOT EXECUTED 53aa0: 4e93 jsr %a3@ <== NOT EXECUTED
rtems_rfs_trace_flags &= ~mask;
return state;
}
int
rtems_rfs_trace_shell_command (int argc, char *argv[])
53aa2: 508f addql #8,%sp <== NOT EXECUTED
printf ("usage: %s [-hl] [set/clear] [flags]\n", argv[0]);
return 0;
case 'l':
printf ("%s: valid flags to set or clear are:\n", argv[0]);
for (t = 0; t < (sizeof (table) / sizeof (const char*)); t++)
printf (" %s\n", table[t]);
53aa4: 2f1a movel %a2@+,%sp@- <== NOT EXECUTED 53aa6: 4879 0007 3041 pea 73041 <rtems_rfs_rtems_link_handlers+0xa7><== NOT EXECUTED 53aac: 4e93 jsr %a3@ <== NOT EXECUTED
case 'h':
printf ("usage: %s [-hl] [set/clear] [flags]\n", argv[0]);
return 0;
case 'l':
printf ("%s: valid flags to set or clear are:\n", argv[0]);
for (t = 0; t < (sizeof (table) / sizeof (const char*)); t++)
53aae: 508f addql #8,%sp <== NOT EXECUTED 53ab0: b48a cmpl %a2,%d2 <== NOT EXECUTED 53ab2: 6700 feec beqw 539a0 <rtems_rfs_trace_shell_command+0x14e><== NOT EXECUTED
printf (" %s\n", table[t]);
53ab6: 2f1a movel %a2@+,%sp@- <== NOT EXECUTED 53ab8: 4879 0007 3041 pea 73041 <rtems_rfs_rtems_link_handlers+0xa7><== NOT EXECUTED 53abe: 4e93 jsr %a3@ <== NOT EXECUTED
case 'h':
printf ("usage: %s [-hl] [set/clear] [flags]\n", argv[0]);
return 0;
case 'l':
printf ("%s: valid flags to set or clear are:\n", argv[0]);
for (t = 0; t < (sizeof (table) / sizeof (const char*)); t++)
53ac0: 508f addql #8,%sp <== NOT EXECUTED 53ac2: b48a cmpl %a2,%d2 <== NOT EXECUTED 53ac4: 66de bnes 53aa4 <rtems_rfs_trace_shell_command+0x252><== NOT EXECUTED 53ac6: 6000 fed8 braw 539a0 <rtems_rfs_trace_shell_command+0x14e><== NOT EXECUTED
...
0005f5aa <rtems_rfs_unlink>:
rtems_rfs_unlink (rtems_rfs_file_system* fs,
rtems_rfs_ino parent,
rtems_rfs_ino target,
uint32_t doff,
rtems_rfs_unlink_dir dir_mode)
{
5f5aa: 4e56 ff8c linkw %fp,#-116 5f5ae: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
rtems_rfs_inode_handle target_inode;
uint16_t links;
bool dir;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
5f5b2: 2f3c 0200 0000 movel #33554432,%sp@-
rtems_rfs_unlink (rtems_rfs_file_system* fs,
rtems_rfs_ino parent,
rtems_rfs_ino target,
uint32_t doff,
rtems_rfs_unlink_dir dir_mode)
{
5f5b8: 262e 0008 movel %fp@(8),%d3
rtems_rfs_inode_handle target_inode;
uint16_t links;
bool dir;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
5f5bc: 47f9 0005 37c0 lea 537c0 <rtems_rfs_trace>,%a3 5f5c2: 42a7 clrl %sp@-
rtems_rfs_unlink (rtems_rfs_file_system* fs,
rtems_rfs_ino parent,
rtems_rfs_ino target,
uint32_t doff,
rtems_rfs_unlink_dir dir_mode)
{
5f5c4: 2a2e 000c movel %fp@(12),%d5 5f5c8: 282e 0010 movel %fp@(16),%d4 5f5cc: 2c2e 0018 movel %fp@(24),%d6
rtems_rfs_inode_handle target_inode;
uint16_t links;
bool dir;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
5f5d0: 4e93 jsr %a3@ 5f5d2: 508f addql #8,%sp 5f5d4: 4a00 tstb %d0
5f5d6: 666e bnes 5f646 <rtems_rfs_unlink+0x9c> <== NEVER TAKEN
printf ("rtems-rfs: unlink: parent(%" PRIu32 ") -X-> (%" PRIu32 ")\n", parent, target);
rc = rtems_rfs_inode_open (fs, target, &target_inode, true);
5f5d8: 4878 0001 pea 1 <ADD> 5f5dc: 45ee ffda lea %fp@(-38),%a2 5f5e0: 49f9 0005 0300 lea 50300 <rtems_rfs_inode_open>,%a4 5f5e6: 2f0a movel %a2,%sp@- 5f5e8: 2f04 movel %d4,%sp@- 5f5ea: 2f03 movel %d3,%sp@- 5f5ec: 4e94 jsr %a4@
if (rc)
5f5ee: 4fef 0010 lea %sp@(16),%sp
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: unlink: parent(%" PRIu32 ") -X-> (%" PRIu32 ")\n", parent, target);
rc = rtems_rfs_inode_open (fs, target, &target_inode, true);
5f5f2: 2400 movel %d0,%d2
if (rc)
5f5f4: 6644 bnes 5f63a <rtems_rfs_unlink+0x90> <== NEVER TAKEN
/*
* If a directory process the unlink mode.
*/
dir = RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&target_inode));
5f5f6: 206a 000c moveal %a2@(12),%a0
* @return uint16_t The mode.
*/
static inline uint16_t
rtems_rfs_inode_get_mode (rtems_rfs_inode_handle* handle)
{
return rtems_rfs_read_u16 (&handle->node->mode);
5f5fa: 4280 clrl %d0 5f5fc: 1028 0002 moveb %a0@(2),%d0 5f600: e188 lsll #8,%d0 5f602: 0280 0000 f000 andil #61440,%d0 5f608: 0c80 0000 4000 cmpil #16384,%d0 5f60e: 57c7 seq %d7 5f610: 4487 negl %d7
if (dir)
5f612: 4a07 tstb %d7
5f614: 6750 beqs 5f666 <rtems_rfs_unlink+0xbc> <== ALWAYS TAKEN
{
switch (dir_mode)
5f616: 4a86 tstl %d6 <== NOT EXECUTED 5f618: 6644 bnes 5f65e <rtems_rfs_unlink+0xb4> <== NOT EXECUTED
{
case rtems_rfs_unlink_dir_denied:
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
5f61a: 2f3c 0200 0000 movel #33554432,%sp@- <== NOT EXECUTED 5f620: 42a7 clrl %sp@- <== NOT EXECUTED 5f622: 4e93 jsr %a3@ <== NOT EXECUTED 5f624: 508f addql #8,%sp <== NOT EXECUTED 5f626: 4a00 tstb %d0 <== NOT EXECUTED 5f628: 6600 0142 bnew 5f76c <rtems_rfs_unlink+0x1c2> <== NOT EXECUTED
printf ("rtems-rfs: link is a directory\n");
rtems_rfs_inode_close (fs, &target_inode);
5f62c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
return EISDIR;
5f62e: 7415 moveq #21,%d2 <== NOT EXECUTED
switch (dir_mode)
{
case rtems_rfs_unlink_dir_denied:
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: link is a directory\n");
rtems_rfs_inode_close (fs, &target_inode);
5f630: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5f632: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close> <== NOT EXECUTED
return EISDIR;
5f638: 508f addql #8,%sp <== NOT EXECUTED
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: link: target inode-close failed: %d: %s\n",
rc, strerror (rc));
return rc;
}
5f63a: 2002 movel %d2,%d0 5f63c: 4cee 3cfc ff8c moveml %fp@(-116),%d2-%d7/%a2-%a5 5f642: 4e5e unlk %fp 5f644: 4e75 rts
uint16_t links;
bool dir;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: unlink: parent(%" PRIu32 ") -X-> (%" PRIu32 ")\n", parent, target);
5f646: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5f648: 2f05 movel %d5,%sp@- <== NOT EXECUTED 5f64a: 4879 0007 4860 pea 74860 <CSWTCH.1+0x1284> <== NOT EXECUTED 5f650: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5f656: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5f65a: 6000 ff7c braw 5f5d8 <rtems_rfs_unlink+0x2e> <== NOT EXECUTED
*/
dir = RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&target_inode));
if (dir)
{
switch (dir_mode)
5f65e: 7001 moveq #1,%d0 <== NOT EXECUTED 5f660: b086 cmpl %d6,%d0 <== NOT EXECUTED 5f662: 6700 00ba beqw 5f71e <rtems_rfs_unlink+0x174> <== NOT EXECUTED
default:
break;
}
}
rc = rtems_rfs_inode_open (fs, parent, &parent_inode, true);
5f666: 4878 0001 pea 1 <ADD> 5f66a: 4bee ffb4 lea %fp@(-76),%a5 5f66e: 2f0d movel %a5,%sp@- 5f670: 2f05 movel %d5,%sp@- 5f672: 2f03 movel %d3,%sp@- 5f674: 4e94 jsr %a4@
if (rc)
5f676: 4fef 0010 lea %sp@(16),%sp
default:
break;
}
}
rc = rtems_rfs_inode_open (fs, parent, &parent_inode, true);
5f67a: 2400 movel %d0,%d2
if (rc)
5f67c: 664e bnes 5f6cc <rtems_rfs_unlink+0x122> <== NEVER TAKEN
rc, strerror (rc));
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_dir_del_entry (fs, &parent_inode, target, doff);
5f67e: 2f2e 0014 movel %fp@(20),%sp@- 5f682: 2f04 movel %d4,%sp@- 5f684: 2f0d movel %a5,%sp@- 5f686: 2f03 movel %d3,%sp@- 5f688: 4eb9 0005 cec8 jsr 5cec8 <rtems_rfs_dir_del_entry>
if (rc > 0)
5f68e: 4fef 0010 lea %sp@(16),%sp
rc, strerror (rc));
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_dir_del_entry (fs, &parent_inode, target, doff);
5f692: 2400 movel %d0,%d2
if (rc > 0)
5f694: 6f00 00f6 blew 5f78c <rtems_rfs_unlink+0x1e2>
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
5f698: 2f3c 0200 0000 movel #33554432,%sp@- <== NOT EXECUTED 5f69e: 42a7 clrl %sp@- <== NOT EXECUTED 5f6a0: 4e93 jsr %a3@ <== NOT EXECUTED 5f6a2: 508f addql #8,%sp <== NOT EXECUTED 5f6a4: 4a00 tstb %d0 <== NOT EXECUTED 5f6a6: 6600 019a bnew 5f842 <rtems_rfs_unlink+0x298> <== NOT EXECUTED
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: link: inode-time-stamp failed: %d: %s\n",
rc, strerror (rc));
rtems_rfs_inode_close (fs, &parent_inode);
5f6aa: 2f0d movel %a5,%sp@- <== NOT EXECUTED 5f6ac: 47f9 0005 04d0 lea 504d0 <rtems_rfs_inode_close>,%a3 <== NOT EXECUTED 5f6b2: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5f6b4: 4e93 jsr %a3@ <== NOT EXECUTED
rtems_rfs_inode_close (fs, &target_inode);
5f6b6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5f6b8: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5f6ba: 4e93 jsr %a3@ <== NOT EXECUTED
return rc;
5f6bc: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: link: target inode-close failed: %d: %s\n",
rc, strerror (rc));
return rc;
}
5f6c0: 2002 movel %d2,%d0 <== NOT EXECUTED 5f6c2: 4cee 3cfc ff8c moveml %fp@(-116),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5f6c8: 4e5e unlk %fp <== NOT EXECUTED 5f6ca: 4e75 rts <== NOT EXECUTED
}
rc = rtems_rfs_inode_open (fs, parent, &parent_inode, true);
if (rc)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
5f6cc: 2f3c 0200 0000 movel #33554432,%sp@- <== NOT EXECUTED 5f6d2: 42a7 clrl %sp@- <== NOT EXECUTED 5f6d4: 4e93 jsr %a3@ <== NOT EXECUTED 5f6d6: 508f addql #8,%sp <== NOT EXECUTED 5f6d8: 4a00 tstb %d0 <== NOT EXECUTED 5f6da: 6618 bnes 5f6f4 <rtems_rfs_unlink+0x14a> <== NOT EXECUTED
printf ("rtems-rfs: link: inode-open failed: %d: %s\n",
rc, strerror (rc));
rtems_rfs_inode_close (fs, &target_inode);
5f6dc: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5f6de: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5f6e0: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close> <== NOT EXECUTED
return rc;
5f6e6: 508f addql #8,%sp <== NOT EXECUTED
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: link: target inode-close failed: %d: %s\n",
rc, strerror (rc));
return rc;
}
5f6e8: 2002 movel %d2,%d0 <== NOT EXECUTED 5f6ea: 4cee 3cfc ff8c moveml %fp@(-116),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5f6f0: 4e5e unlk %fp <== NOT EXECUTED 5f6f2: 4e75 rts <== NOT EXECUTED
rc = rtems_rfs_inode_open (fs, parent, &parent_inode, true);
if (rc)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: link: inode-open failed: %d: %s\n",
5f6f4: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5f6f6: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED 5f6fc: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5f6fe: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5f700: 4879 0007 48c8 pea 748c8 <CSWTCH.1+0x12ec> <== NOT EXECUTED 5f706: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5f70c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_inode_close (fs, &target_inode);
5f710: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5f712: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5f714: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close> <== NOT EXECUTED
return rc;
5f71a: 508f addql #8,%sp <== NOT EXECUTED 5f71c: 60ca bras 5f6e8 <rtems_rfs_unlink+0x13e> <== NOT EXECUTED
printf ("rtems-rfs: link is a directory\n");
rtems_rfs_inode_close (fs, &target_inode);
return EISDIR;
case rtems_rfs_unlink_dir_if_empty:
rc = rtems_rfs_dir_empty (fs, &target_inode);
5f71e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5f720: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5f722: 4eb9 0005 d6d2 jsr 5d6d2 <rtems_rfs_dir_empty> <== NOT EXECUTED
if (rc > 0)
5f728: 508f addql #8,%sp <== NOT EXECUTED
printf ("rtems-rfs: link is a directory\n");
rtems_rfs_inode_close (fs, &target_inode);
return EISDIR;
case rtems_rfs_unlink_dir_if_empty:
rc = rtems_rfs_dir_empty (fs, &target_inode);
5f72a: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
5f72c: 6f00 ff38 blew 5f666 <rtems_rfs_unlink+0xbc> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
5f730: 2f3c 0200 0000 movel #33554432,%sp@- <== NOT EXECUTED 5f736: 42a7 clrl %sp@- <== NOT EXECUTED 5f738: 4e93 jsr %a3@ <== NOT EXECUTED 5f73a: 508f addql #8,%sp <== NOT EXECUTED 5f73c: 4a00 tstb %d0 <== NOT EXECUTED 5f73e: 679c beqs 5f6dc <rtems_rfs_unlink+0x132> <== NOT EXECUTED
printf ("rtems-rfs: dir-empty: %d: %s\n", rc, strerror (rc));
5f740: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5f742: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED 5f748: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5f74a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5f74c: 4879 0007 48aa pea 748aa <CSWTCH.1+0x12ce> <== NOT EXECUTED 5f752: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5f758: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
if (rc)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: link: inode-open failed: %d: %s\n",
rc, strerror (rc));
rtems_rfs_inode_close (fs, &target_inode);
5f75c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5f75e: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5f760: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close> <== NOT EXECUTED
return rc;
5f766: 508f addql #8,%sp <== NOT EXECUTED 5f768: 6000 ff7e braw 5f6e8 <rtems_rfs_unlink+0x13e> <== NOT EXECUTED
{
switch (dir_mode)
{
case rtems_rfs_unlink_dir_denied:
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: link is a directory\n");
5f76c: 4879 0007 488b pea 7488b <CSWTCH.1+0x12af> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &target_inode);
return EISDIR;
5f772: 7415 moveq #21,%d2 <== NOT EXECUTED
{
switch (dir_mode)
{
case rtems_rfs_unlink_dir_denied:
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: link is a directory\n");
5f774: 4eb9 0006 30ce jsr 630ce <puts> <== NOT EXECUTED 5f77a: 588f addql #4,%sp <== NOT EXECUTED
rtems_rfs_inode_close (fs, &target_inode);
5f77c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5f77e: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5f780: 4eb9 0005 04d0 jsr 504d0 <rtems_rfs_inode_close> <== NOT EXECUTED
return EISDIR;
5f786: 508f addql #8,%sp <== NOT EXECUTED 5f788: 6000 feb0 braw 5f63a <rtems_rfs_unlink+0x90> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &parent_inode);
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
links = rtems_rfs_inode_get_links (&target_inode);
5f78c: 206a 000c moveal %a2@(12),%a0
*/
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
5f790: 4280 clrl %d0 5f792: 1010 moveb %a0@,%d0 5f794: 4285 clrl %d5 5f796: 1a28 0001 moveb %a0@(1),%d5
if (links == 0xffff)
5f79a: 4282 clrl %d2
*/
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
5f79c: e188 lsll #8,%d0 5f79e: 8a80 orl %d0,%d5
if (links == 0xffff)
5f7a0: 3405 movew %d5,%d2 5f7a2: 0c82 0000 ffff cmpil #65535,%d2 5f7a8: 6700 00e6 beqw 5f890 <rtems_rfs_unlink+0x2e6>
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
5f7ac: 2f3c 0200 0000 movel #33554432,%sp@- 5f7b2: 42a7 clrl %sp@- 5f7b4: 4e93 jsr %a3@ 5f7b6: 508f addql #8,%sp 5f7b8: 4a00 tstb %d0 5f7ba: 6600 00bc bnew 5f878 <rtems_rfs_unlink+0x2ce>
printf ("rtems-rfs: unlink: target:%" PRIu32 " links:%u\n", target, links);
if (links > 1)
5f7be: 7801 moveq #1,%d4 5f7c0: b882 cmpl %d2,%d4 5f7c2: 6400 0142 bccw 5f906 <rtems_rfs_unlink+0x35c>
{
links--;
5f7c6: 5385 subql #1,%d5
* @prarm links The links.
*/
static inline void
rtems_rfs_inode_set_links (rtems_rfs_inode_handle* handle, uint16_t links)
{
rtems_rfs_write_u16 (&handle->node->links, links);
5f7c8: 2005 movel %d5,%d0 5f7ca: e088 lsrl #8,%d0 5f7cc: 206a 000c moveal %a2@(12),%a0 5f7d0: 1080 moveb %d0,%a0@
rtems_rfs_buffer_mark_dirty (&handle->buffer);
5f7d2: 7001 moveq #1,%d0
* @prarm links The links.
*/
static inline void
rtems_rfs_inode_set_links (rtems_rfs_inode_handle* handle, uint16_t links)
{
rtems_rfs_write_u16 (&handle->node->links, links);
5f7d4: 206a 000c moveal %a2@(12),%a0 5f7d8: 1145 0001 moveb %d5,%a0@(1)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
5f7dc: 1d40 ffea moveb %d0,%fp@(-22)
links--;
rtems_rfs_inode_set_links (&parent_inode, links);
}
}
rc = rtems_rfs_inode_time_stamp_now (&parent_inode, true, true);
5f7e0: 4878 0001 pea 1 <ADD> 5f7e4: 4878 0001 pea 1 <ADD> 5f7e8: 2f0d movel %a5,%sp@- 5f7ea: 4eb9 0005 0678 jsr 50678 <rtems_rfs_inode_time_stamp_now>
if (rc > 0)
5f7f0: 4fef 000c lea %sp@(12),%sp
links--;
rtems_rfs_inode_set_links (&parent_inode, links);
}
}
rc = rtems_rfs_inode_time_stamp_now (&parent_inode, true, true);
5f7f4: 2400 movel %d0,%d2
if (rc > 0)
5f7f6: 6f00 00b0 blew 5f8a8 <rtems_rfs_unlink+0x2fe>
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
5f7fa: 2f3c 0200 0000 movel #33554432,%sp@- <== NOT EXECUTED 5f800: 42a7 clrl %sp@- <== NOT EXECUTED 5f802: 4e93 jsr %a3@ <== NOT EXECUTED 5f804: 508f addql #8,%sp <== NOT EXECUTED 5f806: 4a00 tstb %d0 <== NOT EXECUTED 5f808: 6700 fea0 beqw 5f6aa <rtems_rfs_unlink+0x100> <== NOT EXECUTED
printf ("rtems-rfs: link: inode-time-stamp failed: %d: %s\n",
5f80c: 2f02 movel %d2,%sp@- <== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_inode_close (fs, &parent_inode);
5f80e: 47f9 0005 04d0 lea 504d0 <rtems_rfs_inode_close>,%a3 <== NOT EXECUTED
rc = rtems_rfs_inode_time_stamp_now (&parent_inode, true, true);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: link: inode-time-stamp failed: %d: %s\n",
5f814: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED 5f81a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5f81c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5f81e: 4879 0007 4974 pea 74974 <CSWTCH.1+0x1398> <== NOT EXECUTED 5f824: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5f82a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_inode_close (fs, &parent_inode);
5f82e: 2f0d movel %a5,%sp@- <== NOT EXECUTED 5f830: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5f832: 4e93 jsr %a3@ <== NOT EXECUTED
rtems_rfs_inode_close (fs, &target_inode);
5f834: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5f836: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5f838: 4e93 jsr %a3@ <== NOT EXECUTED
return rc;
5f83a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5f83e: 6000 fe80 braw 5f6c0 <rtems_rfs_unlink+0x116> <== NOT EXECUTED
rc = rtems_rfs_dir_del_entry (fs, &parent_inode, target, doff);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: unlink: dir-del failed: %d: %s\n",
5f842: 2f02 movel %d2,%sp@- <== NOT EXECUTED
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: link: inode-time-stamp failed: %d: %s\n",
rc, strerror (rc));
rtems_rfs_inode_close (fs, &parent_inode);
5f844: 47f9 0005 04d0 lea 504d0 <rtems_rfs_inode_close>,%a3 <== NOT EXECUTED
rc = rtems_rfs_dir_del_entry (fs, &parent_inode, target, doff);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: unlink: dir-del failed: %d: %s\n",
5f84a: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED 5f850: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5f852: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5f854: 4879 0007 48f4 pea 748f4 <CSWTCH.1+0x1318> <== NOT EXECUTED 5f85a: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5f860: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: link: inode-time-stamp failed: %d: %s\n",
rc, strerror (rc));
rtems_rfs_inode_close (fs, &parent_inode);
5f864: 2f0d movel %a5,%sp@- <== NOT EXECUTED 5f866: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5f868: 4e93 jsr %a3@ <== NOT EXECUTED
rtems_rfs_inode_close (fs, &target_inode);
5f86a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5f86c: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5f86e: 4e93 jsr %a3@ <== NOT EXECUTED
return rc;
5f870: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5f874: 6000 fe4a braw 5f6c0 <rtems_rfs_unlink+0x116> <== NOT EXECUTED
}
links = rtems_rfs_inode_get_links (&target_inode);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: unlink: target:%" PRIu32 " links:%u\n", target, links);
5f878: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5f87a: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5f87c: 4879 0007 491f pea 7491f <CSWTCH.1+0x1343> <== NOT EXECUTED 5f882: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5f888: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5f88c: 6000 ff30 braw 5f7be <rtems_rfs_unlink+0x214> <== NOT EXECUTED
return rc;
}
links = rtems_rfs_inode_get_links (&target_inode);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
5f890: 2f3c 0200 0000 movel #33554432,%sp@- <== NOT EXECUTED 5f896: 4242 clrw %d2 <== NOT EXECUTED 5f898: 42a7 clrl %sp@- <== NOT EXECUTED
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
if (links == 0xffff)
links = 0;
5f89a: 4245 clrw %d5 <== NOT EXECUTED 5f89c: 4e93 jsr %a3@ <== NOT EXECUTED 5f89e: 508f addql #8,%sp <== NOT EXECUTED 5f8a0: 4a00 tstb %d0 <== NOT EXECUTED 5f8a2: 6700 ff1a beqw 5f7be <rtems_rfs_unlink+0x214> <== NOT EXECUTED 5f8a6: 60d0 bras 5f878 <rtems_rfs_unlink+0x2ce> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &parent_inode);
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_inode_close (fs, &parent_inode);
5f8a8: 2f0d movel %a5,%sp@- 5f8aa: 49f9 0005 04d0 lea 504d0 <rtems_rfs_inode_close>,%a4 5f8b0: 2f03 movel %d3,%sp@- 5f8b2: 4e94 jsr %a4@
if (rc > 0)
5f8b4: 508f addql #8,%sp
rtems_rfs_inode_close (fs, &parent_inode);
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_inode_close (fs, &parent_inode);
5f8b6: 2400 movel %d0,%d2
if (rc > 0)
5f8b8: 6f00 00a6 blew 5f960 <rtems_rfs_unlink+0x3b6>
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
5f8bc: 2f3c 0200 0000 movel #33554432,%sp@- <== NOT EXECUTED 5f8c2: 42a7 clrl %sp@- <== NOT EXECUTED 5f8c4: 4e93 jsr %a3@ <== NOT EXECUTED 5f8c6: 508f addql #8,%sp <== NOT EXECUTED 5f8c8: 4a00 tstb %d0 <== NOT EXECUTED 5f8ca: 6614 bnes 5f8e0 <rtems_rfs_unlink+0x336> <== NOT EXECUTED
printf ("rtems-rfs: link: parent inode-close failed: %d: %s\n",
rc, strerror (rc));
rtems_rfs_inode_close (fs, &target_inode);
5f8cc: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5f8ce: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5f8d0: 4e94 jsr %a4@ <== NOT EXECUTED
return rc;
5f8d2: 508f addql #8,%sp <== NOT EXECUTED
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: link: target inode-close failed: %d: %s\n",
rc, strerror (rc));
return rc;
}
5f8d4: 2002 movel %d2,%d0 <== NOT EXECUTED 5f8d6: 4cee 3cfc ff8c moveml %fp@(-116),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5f8dc: 4e5e unlk %fp <== NOT EXECUTED 5f8de: 4e75 rts <== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &parent_inode);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: link: parent inode-close failed: %d: %s\n",
5f8e0: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5f8e2: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED 5f8e8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5f8ea: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5f8ec: 4879 0007 49a6 pea 749a6 <CSWTCH.1+0x13ca> <== NOT EXECUTED 5f8f2: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5f8f8: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_inode_close (fs, &target_inode);
5f8fc: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5f8fe: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5f900: 4e94 jsr %a4@ <== NOT EXECUTED
return rc;
5f902: 508f addql #8,%sp <== NOT EXECUTED 5f904: 60ce bras 5f8d4 <rtems_rfs_unlink+0x32a> <== NOT EXECUTED
else
{
/*
* Erasing the inode releases all blocks attached to it.
*/
rc = rtems_rfs_inode_delete (fs, &target_inode);
5f906: 2f0a movel %a2,%sp@- 5f908: 2f03 movel %d3,%sp@- 5f90a: 4eb9 0005 056a jsr 5056a <rtems_rfs_inode_delete>
if (rc > 0)
5f910: 508f addql #8,%sp
else
{
/*
* Erasing the inode releases all blocks attached to it.
*/
rc = rtems_rfs_inode_delete (fs, &target_inode);
5f912: 2400 movel %d0,%d2
if (rc > 0)
5f914: 6f00 0092 blew 5f9a8 <rtems_rfs_unlink+0x3fe>
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
5f918: 2f3c 0200 0000 movel #33554432,%sp@- <== NOT EXECUTED 5f91e: 42a7 clrl %sp@- <== NOT EXECUTED 5f920: 4e93 jsr %a3@ <== NOT EXECUTED 5f922: 508f addql #8,%sp <== NOT EXECUTED 5f924: 4a00 tstb %d0 <== NOT EXECUTED 5f926: 6700 fd82 beqw 5f6aa <rtems_rfs_unlink+0x100> <== NOT EXECUTED
printf ("rtems-rfs: unlink: inode-del failed: %d: %s\n",
5f92a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: link: inode-time-stamp failed: %d: %s\n",
rc, strerror (rc));
rtems_rfs_inode_close (fs, &parent_inode);
5f92c: 47f9 0005 04d0 lea 504d0 <rtems_rfs_inode_close>,%a3 <== NOT EXECUTED
*/
rc = rtems_rfs_inode_delete (fs, &target_inode);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: unlink: inode-del failed: %d: %s\n",
5f932: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED 5f938: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5f93a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5f93c: 4879 0007 4947 pea 74947 <CSWTCH.1+0x136b> <== NOT EXECUTED 5f942: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5f948: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: link: inode-time-stamp failed: %d: %s\n",
rc, strerror (rc));
rtems_rfs_inode_close (fs, &parent_inode);
5f94c: 2f0d movel %a5,%sp@- <== NOT EXECUTED 5f94e: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5f950: 4e93 jsr %a3@ <== NOT EXECUTED
rtems_rfs_inode_close (fs, &target_inode);
5f952: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5f954: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5f956: 4e93 jsr %a3@ <== NOT EXECUTED
return rc;
5f958: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5f95c: 6000 fd62 braw 5f6c0 <rtems_rfs_unlink+0x116> <== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_inode_close (fs, &target_inode);
5f960: 2f0a movel %a2,%sp@- 5f962: 2f03 movel %d3,%sp@- 5f964: 4e94 jsr %a4@
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
5f966: 508f addql #8,%sp
rc, strerror (rc));
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_inode_close (fs, &target_inode);
5f968: 2400 movel %d0,%d2
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
5f96a: 6f00 fcce blew 5f63a <rtems_rfs_unlink+0x90>
5f96e: 2f3c 0200 0000 movel #33554432,%sp@- <== NOT EXECUTED 5f974: 42a7 clrl %sp@- <== NOT EXECUTED 5f976: 4e93 jsr %a3@ <== NOT EXECUTED 5f978: 508f addql #8,%sp <== NOT EXECUTED 5f97a: 4a00 tstb %d0 <== NOT EXECUTED 5f97c: 6700 fcbc beqw 5f63a <rtems_rfs_unlink+0x90> <== NOT EXECUTED
printf ("rtems-rfs: link: target inode-close failed: %d: %s\n",
5f980: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5f982: 4eb9 0006 3bf4 jsr 63bf4 <strerror> <== NOT EXECUTED 5f988: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5f98a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5f98c: 4879 0007 49da pea 749da <CSWTCH.1+0x13fe> <== NOT EXECUTED 5f992: 4eb9 0006 2fd4 jsr 62fd4 <printf> <== NOT EXECUTED 5f998: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rc, strerror (rc));
return rc;
}
5f99c: 2002 movel %d2,%d0 <== NOT EXECUTED 5f99e: 4cee 3cfc ff8c moveml %fp@(-116),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5f9a4: 4e5e unlk %fp <== NOT EXECUTED 5f9a6: 4e75 rts <== NOT EXECUTED
rtems_rfs_inode_close (fs, &parent_inode);
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
if (dir)
5f9a8: 4a07 tstb %d7 5f9aa: 6700 fe34 beqw 5f7e0 <rtems_rfs_unlink+0x236>
{
links = rtems_rfs_inode_get_links (&parent_inode);
5f9ae: 206d 000c moveal %a5@(12),%a0 <== NOT EXECUTED
*/
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
5f9b2: 4280 clrl %d0 <== NOT EXECUTED 5f9b4: 1010 moveb %a0@,%d0 <== NOT EXECUTED 5f9b6: 4281 clrl %d1 <== NOT EXECUTED 5f9b8: 1228 0001 moveb %a0@(1),%d1 <== NOT EXECUTED
if (links == 0xffff)
5f9bc: 4282 clrl %d2 <== NOT EXECUTED
*/
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
5f9be: e188 lsll #8,%d0 <== NOT EXECUTED 5f9c0: 8081 orl %d1,%d0 <== NOT EXECUTED
if (links == 0xffff)
5f9c2: 3400 movew %d0,%d2 <== NOT EXECUTED
*/
static inline uint16_t
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
5f9c4: 3200 movew %d0,%d1 <== NOT EXECUTED
if (links == 0xffff)
5f9c6: 0c82 0000 ffff cmpil #65535,%d2 <== NOT EXECUTED 5f9cc: 6724 beqs 5f9f2 <rtems_rfs_unlink+0x448> <== NOT EXECUTED
if (links > 1)
5f9ce: 7801 moveq #1,%d4 <== NOT EXECUTED 5f9d0: b882 cmpl %d2,%d4 <== NOT EXECUTED 5f9d2: 6408 bccs 5f9dc <rtems_rfs_unlink+0x432> <== NOT EXECUTED
links--;
5f9d4: 2200 movel %d0,%d1 <== NOT EXECUTED 5f9d6: 5381 subql #1,%d1 <== NOT EXECUTED 5f9d8: 4282 clrl %d2 <== NOT EXECUTED 5f9da: 3401 movew %d1,%d2 <== NOT EXECUTED
* @prarm links The links.
*/
static inline void
rtems_rfs_inode_set_links (rtems_rfs_inode_handle* handle, uint16_t links)
{
rtems_rfs_write_u16 (&handle->node->links, links);
5f9dc: e08a lsrl #8,%d2 <== NOT EXECUTED 5f9de: 1082 moveb %d2,%a0@ <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
5f9e0: 7001 moveq #1,%d0 <== NOT EXECUTED
* @prarm links The links.
*/
static inline void
rtems_rfs_inode_set_links (rtems_rfs_inode_handle* handle, uint16_t links)
{
rtems_rfs_write_u16 (&handle->node->links, links);
5f9e2: 206d 000c moveal %a5@(12),%a0 <== NOT EXECUTED 5f9e6: 1141 0001 moveb %d1,%a0@(1) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
5f9ea: 1d40 ffc4 moveb %d0,%fp@(-60) <== NOT EXECUTED 5f9ee: 6000 fdf0 braw 5f7e0 <rtems_rfs_unlink+0x236> <== NOT EXECUTED 5f9f2: 4282 clrl %d2 <== NOT EXECUTED
* @prarm links The links.
*/
static inline void
rtems_rfs_inode_set_links (rtems_rfs_inode_handle* handle, uint16_t links)
{
rtems_rfs_write_u16 (&handle->node->links, links);
5f9f4: e08a lsrl #8,%d2 <== NOT EXECUTED 5f9f6: 1082 moveb %d2,%a0@ <== NOT EXECUTED
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
if (links == 0xffff)
links = 0;
5f9f8: 4241 clrw %d1 <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_links (rtems_rfs_inode_handle* handle, uint16_t links)
{
rtems_rfs_write_u16 (&handle->node->links, links);
rtems_rfs_buffer_mark_dirty (&handle->buffer);
5f9fa: 7001 moveq #1,%d0 <== NOT EXECUTED
* @prarm links The links.
*/
static inline void
rtems_rfs_inode_set_links (rtems_rfs_inode_handle* handle, uint16_t links)
{
rtems_rfs_write_u16 (&handle->node->links, links);
5f9fc: 206d 000c moveal %a5@(12),%a0 <== NOT EXECUTED 5fa00: 1141 0001 moveb %d1,%a0@(1) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
5fa04: 1d40 ffc4 moveb %d0,%fp@(-60) <== NOT EXECUTED 5fa08: 6000 fdd6 braw 5f7e0 <rtems_rfs_unlink+0x236> <== NOT EXECUTED
000469f4 <rtems_semaphore_delete>:
#endif
rtems_status_code rtems_semaphore_delete(
rtems_id id
)
{
469f4: 4e56 fffc linkw %fp,#-4 469f8: 2f0a movel %a2,%sp@-
RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Semaphore_Control *)
469fa: 486e fffc pea %fp@(-4) 469fe: 2f2e 0008 movel %fp@(8),%sp@- 46a02: 4879 0006 0f8c pea 60f8c <_Semaphore_Information> 46a08: 4eb9 0004 8450 jsr 48450 <_Objects_Get>
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
46a0e: 4fef 000c lea %sp@(12),%sp 46a12: 2440 moveal %d0,%a2 46a14: 4aae fffc tstl %fp@(-4)
46a18: 6624 bnes 46a3e <rtems_semaphore_delete+0x4a>
46a1a: 7030 moveq #48,%d0 46a1c: c0aa 0010 andl %a2@(16),%d0
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
46a20: 6726 beqs 46a48 <rtems_semaphore_delete+0x54>
if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) &&
46a22: 4aaa 0062 tstl %a2@(98)
46a26: 6664 bnes 46a8c <rtems_semaphore_delete+0x98>
46a28: 7220 moveq #32,%d1 46a2a: b280 cmpl %d0,%d1
46a2c: 675e beqs 46a8c <rtems_semaphore_delete+0x98>
!_Attributes_Is_simple_binary_semaphore(
the_semaphore->attribute_set ) ) {
_Thread_Enable_dispatch();
46a2e: 4eb9 0004 9218 jsr 49218 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
46a34: 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;
46a38: 700c moveq #12,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
46a3a: 4e5e unlk %fp 46a3c: 4e75 rts 46a3e: 246e fff8 moveal %fp@(-8),%a2
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
46a42: 7004 moveq #4,%d0
}
46a44: 4e5e unlk %fp 46a46: 4e75 rts
&the_semaphore->Core_control.mutex,
SEMAPHORE_MP_OBJECT_WAS_DELETED,
CORE_MUTEX_WAS_DELETED
);
} else {
_CORE_semaphore_Flush(
46a48: 4878 0002 pea 2 <DOUBLE_FLOAT> 46a4c: 42a7 clrl %sp@- 46a4e: 486a 0014 pea %a2@(20) 46a52: 4eb9 0004 7958 jsr 47958 <_CORE_semaphore_Flush> 46a58: 4fef 000c lea %sp@(12),%sp
SEMAPHORE_MP_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_WAS_DELETED
);
}
_Objects_Close( &_Semaphore_Information, &the_semaphore->Object );
46a5c: 2f0a movel %a2,%sp@- 46a5e: 4879 0006 0f8c pea 60f8c <_Semaphore_Information> 46a64: 4eb9 0004 801c jsr 4801c <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _Semaphore_Free (
Semaphore_Control *the_semaphore
)
{
_Objects_Free( &_Semaphore_Information, &the_semaphore->Object );
46a6a: 2f0a movel %a2,%sp@- 46a6c: 4879 0006 0f8c pea 60f8c <_Semaphore_Information> 46a72: 4eb9 0004 82dc jsr 482dc <_Objects_Free>
0, /* Not used */
0 /* Not used */
);
}
#endif
_Thread_Enable_dispatch();
46a78: 4eb9 0004 9218 jsr 49218 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
46a7e: 4fef 0010 lea %sp@(16),%sp 46a82: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
46a84: 246e fff8 moveal %fp@(-8),%a2 46a88: 4e5e unlk %fp 46a8a: 4e75 rts
!_Attributes_Is_simple_binary_semaphore(
the_semaphore->attribute_set ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
_CORE_mutex_Flush(
46a8c: 4878 0004 pea 4 <CONTEXT_ARG> 46a90: 42a7 clrl %sp@- 46a92: 486a 0014 pea %a2@(20) 46a96: 4eb9 0004 7610 jsr 47610 <_CORE_mutex_Flush> 46a9c: 4fef 000c lea %sp@(12),%sp
SEMAPHORE_MP_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_WAS_DELETED
);
}
_Objects_Close( &_Semaphore_Information, &the_semaphore->Object );
46aa0: 2f0a movel %a2,%sp@- 46aa2: 4879 0006 0f8c pea 60f8c <_Semaphore_Information> 46aa8: 4eb9 0004 801c jsr 4801c <_Objects_Close> 46aae: 2f0a movel %a2,%sp@- 46ab0: 4879 0006 0f8c pea 60f8c <_Semaphore_Information> 46ab6: 4eb9 0004 82dc jsr 482dc <_Objects_Free>
0, /* Not used */
0 /* Not used */
);
}
#endif
_Thread_Enable_dispatch();
46abc: 4eb9 0004 9218 jsr 49218 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
46ac2: 4fef 0010 lea %sp@(16),%sp 46ac6: 4280 clrl %d0 46ac8: 60ba bras 46a84 <rtems_semaphore_delete+0x90>
...
000507c0 <rtems_semaphore_flush>:
#endif
rtems_status_code rtems_semaphore_flush(
rtems_id id
)
{
507c0: 4e56 fffc linkw %fp,#-4 507c4: 486e fffc pea %fp@(-4) 507c8: 2f2e 0008 movel %fp@(8),%sp@- 507cc: 4879 0006 4e24 pea 64e24 <_Semaphore_Information> 507d2: 4eb9 0004 97b0 jsr 497b0 <_Objects_Get>
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
507d8: 4fef 000c lea %sp@(12),%sp 507dc: 4aae fffc tstl %fp@(-4)
507e0: 662a bnes 5080c <rtems_semaphore_flush+0x4c>
507e2: 7230 moveq #48,%d1 507e4: 2040 moveal %d0,%a0 507e6: c2a8 0010 andl %a0@(16),%d1
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
507ea: 6726 beqs 50812 <rtems_semaphore_flush+0x52>
_CORE_mutex_Flush(
507ec: 4878 0001 pea 1 <ADD> 507f0: 42a7 clrl %sp@- 507f2: 4868 0014 pea %a0@(20) 507f6: 4eb9 0004 8970 jsr 48970 <_CORE_mutex_Flush> 507fc: 4fef 000c lea %sp@(12),%sp
&the_semaphore->Core_control.semaphore,
SEND_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT
);
}
_Thread_Enable_dispatch();
50800: 4eb9 0004 a580 jsr 4a580 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
50806: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
50808: 4e5e unlk %fp 5080a: 4e75 rts
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
5080c: 7004 moveq #4,%d0
}
5080e: 4e5e unlk %fp 50810: 4e75 rts
&the_semaphore->Core_control.mutex,
SEND_OBJECT_WAS_DELETED,
CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT
);
} else {
_CORE_semaphore_Flush(
50812: 4878 0001 pea 1 <ADD> 50816: 2040 moveal %d0,%a0 50818: 42a7 clrl %sp@- 5081a: 4868 0014 pea %a0@(20) 5081e: 4eb9 0004 8cb8 jsr 48cb8 <_CORE_semaphore_Flush> 50824: 4fef 000c lea %sp@(12),%sp
&the_semaphore->Core_control.semaphore,
SEND_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT
);
}
_Thread_Enable_dispatch();
50828: 4eb9 0004 a580 jsr 4a580 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
5082e: 4280 clrl %d0 50830: 60d6 bras 50808 <rtems_semaphore_flush+0x48>
...
000471c8 <rtems_shutdown_executive>:
void rtems_shutdown_executive(
uint32_t result
)
{
if ( _System_state_Is_up( _System_state_Get() ) ) {
471c8: 7003 moveq #3,%d0
*/
void rtems_shutdown_executive(
uint32_t result
)
{
471ca: 4e56 0000 linkw %fp,#0
if ( _System_state_Is_up( _System_state_Get() ) ) {
471ce: b0b9 0006 118c cmpl 6118c <_System_state_Current>,%d0
471d4: 6710 beqs 471e6 <rtems_shutdown_executive+0x1e>
****** AND THEN TO BOOT_CARD() ******
*******************************************************************
*******************************************************************
*******************************************************************/
}
_Internal_error_Occurred(
471d6: 4878 0014 pea 14 <OPER2> 471da: 4878 0001 pea 1 <ADD> 471de: 42a7 clrl %sp@- 471e0: 4eb9 0004 7ec8 jsr 47ec8 <_Internal_error_Occurred>
if ( _System_state_Is_up( _System_state_Get() ) ) {
#if defined(RTEMS_SMP)
_SMP_Request_other_cores_to_shutdown();
#endif
_Per_CPU_Information[0].idle->Wait.return_code = result;
471e6: 2079 0006 14b2 moveal 614b2 <_Per_CPU_Information+0x14>,%a0 471ec: 103c 0004 moveb #4,%d0 471f0: 216e 0008 0034 movel %fp@(8),%a0@(52)
* if we were running within the same context, it would work. * * And we will not return to this thread, so there is no point of * saving the context. */ _Context_Restart_self( &_Thread_BSP_context );
471f6: 4879 0006 1014 pea 61014 <_Thread_BSP_context> 471fc: 23c0 0006 118c movel %d0,6118c <_System_state_Current> 47202: 4eb9 0004 a362 jsr 4a362 <_CPU_Context_Restart_self>
47208: 588f addql #4,%sp <== NOT EXECUTED
****** AND THEN TO BOOT_CARD() ******
*******************************************************************
*******************************************************************
*******************************************************************/
}
_Internal_error_Occurred(
4720a: 4878 0014 pea 14 <OPER2> <== NOT EXECUTED 4720e: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 47212: 42a7 clrl %sp@- <== NOT EXECUTED 47214: 4eb9 0004 7ec8 jsr 47ec8 <_Internal_error_Occurred> <== NOT EXECUTED
...
00056580 <rtems_signal_send>:
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
56580: 4e56 fffc linkw %fp,#-4 56584: 2f03 movel %d3,%sp@- 56586: 2f02 movel %d2,%sp@- 56588: 242e 000c movel %fp@(12),%d2
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
5658c: 660e bnes 5659c <rtems_signal_send+0x1c>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
5658e: 242e fff4 movel %fp@(-12),%d2
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
56592: 700a moveq #10,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
56594: 262e fff8 movel %fp@(-8),%d3 56598: 4e5e unlk %fp 5659a: 4e75 rts
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
5659c: 486e fffc pea %fp@(-4) 565a0: 2f2e 0008 movel %fp@(8),%sp@- 565a4: 4eb9 0005 ad2c jsr 5ad2c <_Thread_Get>
switch ( location ) {
565aa: 508f addql #8,%sp 565ac: 4aae fffc tstl %fp@(-4)
565b0: 6648 bnes 565fa <rtems_signal_send+0x7a>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
565b2: 2240 moveal %d0,%a1 565b4: 2069 00fe moveal %a1@(254),%a0
asr = &api->Signal;
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
565b8: 4aa8 000a tstl %a0@(10)
565bc: 674a beqs 56608 <rtems_signal_send+0x88>
if ( asr->is_enabled ) {
565be: 4a28 0008 tstb %a0@(8)
565c2: 676a beqs 5662e <rtems_signal_send+0xae>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
565c4: 223c 0000 0700 movel #1792,%d1 565ca: 40c3 movew %sr,%d3 565cc: 8283 orl %d3,%d1 565ce: 46c1 movew %d1,%sr
*signal_set |= signals;
565d0: 85a8 0012 orl %d2,%a0@(18)
_ISR_Enable( _level );
565d4: 46c3 movew %d3,%sr
_ASR_Post_signals( signal_set, &asr->signals_posted );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
565d6: 4ab9 0007 e1b2 tstl 7e1b2 <_Per_CPU_Information+0x8>
565dc: 6708 beqs 565e6 <rtems_signal_send+0x66>
565de: b0b9 0007 e1b6 cmpl 7e1b6 <_Per_CPU_Information+0xc>,%d0
565e4: 6736 beqs 5661c <rtems_signal_send+0x9c> <== ALWAYS TAKEN
_Thread_Dispatch_necessary = true;
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
565e6: 4eb9 0005 ad04 jsr 5ad04 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
565ec: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
565ee: 242e fff4 movel %fp@(-12),%d2 565f2: 262e fff8 movel %fp@(-8),%d3 565f6: 4e5e unlk %fp 565f8: 4e75 rts 565fa: 242e fff4 movel %fp@(-12),%d2
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
565fe: 7004 moveq #4,%d0
}
56600: 262e fff8 movel %fp@(-8),%d3 56604: 4e5e unlk %fp 56606: 4e75 rts
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
56608: 4eb9 0005 ad04 jsr 5ad04 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
5660e: 242e fff4 movel %fp@(-12),%d2
}
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
return RTEMS_NOT_DEFINED;
56612: 700b moveq #11,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
56614: 262e fff8 movel %fp@(-8),%d3 56618: 4e5e unlk %fp 5661a: 4e75 rts
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 ) )
_Thread_Dispatch_necessary = true;
5661c: 7001 moveq #1,%d0 5661e: 13c0 0007 e1c2 moveb %d0,7e1c2 <_Per_CPU_Information+0x18>
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
56624: 4eb9 0005 ad04 jsr 5ad04 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
5662a: 4280 clrl %d0 5662c: 60c0 bras 565ee <rtems_signal_send+0x6e>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
5662e: 203c 0000 0700 movel #1792,%d0 56634: 40c1 movew %sr,%d1 56636: 8081 orl %d1,%d0 56638: 46c0 movew %d0,%sr
*signal_set |= signals;
5663a: 85a8 0016 orl %d2,%a0@(22)
_ISR_Enable( _level );
5663e: 46c1 movew %d1,%sr
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
56640: 4eb9 0005 ad04 jsr 5ad04 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
56646: 4280 clrl %d0 56648: 60a4 bras 565ee <rtems_signal_send+0x6e>
...
00042d8c <rtems_stack_checker_begin_extension>:
* rtems_stack_checker_Begin_extension
*/
void rtems_stack_checker_begin_extension(
Thread_Control *the_thread
)
{
42d8c: 4e56 0000 linkw %fp,#0 42d90: 206e 0008 moveal %fp@(8),%a0
Stack_check_Control *the_pattern;
if ( the_thread->Object.id == 0 ) /* skip system tasks */
42d94: 4aa8 0008 tstl %a0@(8)
42d98: 672c beqs 42dc6 <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;
42d9a: 2068 00b6 moveal %a0@(182),%a0 42d9e: 43f9 0006 3d34 lea 63d34 <Stack_check_Pattern>,%a1 42da4: 2151 0008 movel %a1@,%a0@(8) 42da8: 43f9 0006 3d38 lea 63d38 <Stack_check_Pattern+0x4>,%a1 42dae: 2151 000c movel %a1@,%a0@(12) 42db2: 43f9 0006 3d3c lea 63d3c <Stack_check_Pattern+0x8>,%a1 42db8: 2151 0010 movel %a1@,%a0@(16) 42dbc: 43f9 0006 3d40 lea 63d40 <Stack_check_Pattern+0xc>,%a1 42dc2: 2151 0014 movel %a1@,%a0@(20)
}
42dc6: 4e5e unlk %fp <== NOT EXECUTED
00042d58 <rtems_stack_checker_create_extension>:
*/
bool rtems_stack_checker_create_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *the_thread
)
{
42d58: 4e56 0000 linkw %fp,#0 42d5c: 2f0a movel %a2,%sp@- 42d5e: 246e 000c moveal %fp@(12),%a2
Stack_check_Initialize();
42d62: 4eb9 0004 2cde jsr 42cde <Stack_check_Initialize>
if (the_thread)
42d68: 4a8a tstl %a2
42d6a: 6716 beqs 42d82 <rtems_stack_checker_create_extension+0x2a><== NEVER TAKEN
Stack_check_Dope_stack(&the_thread->Start.Initial_stack);
42d6c: 2f2a 00b2 movel %a2@(178),%sp@- 42d70: 4878 00a5 pea a5 <DBL_MANT_DIG+0x70> 42d74: 2f2a 00b6 movel %a2@(182),%sp@- 42d78: 4eb9 0005 2458 jsr 52458 <memset> 42d7e: 4fef 000c lea %sp@(12),%sp
return true;
}
42d82: 246e fffc moveal %fp@(-4),%a2 42d86: 4e5e unlk %fp
42d88: 7001 moveq #1,%d0 <== NOT EXECUTED
00042efa <rtems_stack_checker_is_blown>:
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
42efa: 4e56 0000 linkw %fp,#0
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
42efe: 2279 0006 4372 moveal 64372 <_Per_CPU_Information+0xc>,%a1
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
42f04: 2069 00b6 moveal %a1@(182),%a0
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
42f08: 2f02 movel %d2,%sp@-
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
42f0a: b1ce cmpal %fp,%a0
42f0c: 6248 bhis 42f56 <rtems_stack_checker_is_blown+0x5c><== NEVER TAKEN
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
42f0e: 2008 movel %a0,%d0 42f10: d0a9 00b2 addl %a1@(178),%d0
}
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
42f14: b08e cmpl %fp,%d0 42f16: 54c2 scc %d2 42f18: 4482 negl %d2
/*
* The stack checker must be initialized before the pattern is there
* to check.
*/
if ( Stack_check_Initialized ) {
42f1a: 4ab9 0006 3528 tstl 63528 <Stack_check_Initialized>
42f20: 6730 beqs 42f52 <rtems_stack_checker_is_blown+0x58><== NEVER TAKEN
pattern_ok = (!memcmp(
42f22: 4878 0010 pea 10 <INVALID_OPERATION> 42f26: 4879 0006 3d34 pea 63d34 <Stack_check_Pattern> 42f2c: 4868 0008 pea %a0@(8) 42f30: 4eb9 0005 2360 jsr 52360 <memcmp> 42f36: 4fef 000c lea %sp@(12),%sp 42f3a: 4a80 tstl %d0 42f3c: 57c0 seq %d0 42f3e: 4480 negl %d0
/*
* Let's report as much as we can.
*/
if ( !sp_ok || !pattern_ok ) {
42f40: 4a02 tstb %d2
42f42: 6716 beqs 42f5a <rtems_stack_checker_is_blown+0x60><== NEVER TAKEN
42f44: 4a00 tstb %d0
42f46: 6712 beqs 42f5a <rtems_stack_checker_is_blown+0x60><== NEVER TAKEN
/*
* The Stack Pointer and the Pattern Area are OK so return false.
*/
return false;
}
42f48: 242e fffc movel %fp@(-4),%d2 42f4c: 4e5e unlk %fp 42f4e: 4200 clrb %d0 42f50: 4e75 rts
*/
bool rtems_stack_checker_is_blown( void )
{
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
bool sp_ok;
bool pattern_ok = true;
42f52: 7001 moveq #1,%d0 <== NOT EXECUTED 42f54: 60ea bras 42f40 <rtems_stack_checker_is_blown+0x46><== NOT EXECUTED
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
return false;
42f56: 4202 clrb %d2 <== NOT EXECUTED 42f58: 60c0 bras 42f1a <rtems_stack_checker_is_blown+0x20><== NOT EXECUTED
/*
* Let's report as much as we can.
*/
if ( !sp_ok || !pattern_ok ) {
Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
42f5a: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 42f60: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42f62: 2f39 0006 4372 movel 64372 <_Per_CPU_Information+0xc>,%sp@-<== NOT EXECUTED 42f68: 4eb9 0004 2dca jsr 42dca <Stack_check_report_blown_task> <== NOT EXECUTED
00042fd4 <rtems_stack_checker_report_usage>:
void rtems_stack_checker_report_usage( void )
{
42fd4: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin );
42fd8: 4879 0004 4f50 pea 44f50 <printk_plugin> <== NOT EXECUTED 42fde: 42a7 clrl %sp@- <== NOT EXECUTED 42fe0: 4eb9 0004 2f6e jsr 42f6e <rtems_stack_checker_report_usage_with_plugin><== NOT EXECUTED 42fe6: 508f addql #8,%sp <== NOT EXECUTED
}
42fe8: 4e5e unlk %fp <== NOT EXECUTED
00042f6e <rtems_stack_checker_report_usage_with_plugin>:
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
42f6e: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 42f72: 2f0a movel %a2,%sp@- <== NOT EXECUTED 42f74: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 42f78: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42f7a: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED
if ( !print )
42f7e: 4a8a tstl %a2 <== NOT EXECUTED 42f80: 6746 beqs 42fc8 <rtems_stack_checker_report_usage_with_plugin+0x5a><== NOT EXECUTED
return;
print_context = context;
print_handler = print;
(*print)( context, "Stack usage by thread\n");
42f82: 4879 0006 0fad pea 60fad <map.6435+0x12d> <== NOT EXECUTED
)
{
if ( !print )
return;
print_context = context;
42f88: 23c2 0006 3530 movel %d2,63530 <print_context> <== NOT EXECUTED
print_handler = print;
(*print)( context, "Stack usage by thread\n");
42f8e: 2f02 movel %d2,%sp@- <== NOT EXECUTED
{
if ( !print )
return;
print_context = context;
print_handler = print;
42f90: 23ca 0006 352c movel %a2,6352c <print_handler> <== NOT EXECUTED
(*print)( context, "Stack usage by thread\n");
42f96: 4e92 jsr %a2@ <== NOT EXECUTED
(*print)( context,
42f98: 4879 0006 0fc4 pea 60fc4 <map.6435+0x144> <== NOT EXECUTED 42f9e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42fa0: 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 );
42fa2: 4879 0004 2b58 pea 42b58 <Stack_check_Dump_threads_usage> <== NOT EXECUTED 42fa8: 4eb9 0004 aaf8 jsr 4aaf8 <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);
42fae: 4878 ffff pea ffffffff <LESS> <== NOT EXECUTED 42fb2: 4eb9 0004 2b58 jsr 42b58 <Stack_check_Dump_threads_usage> <== NOT EXECUTED
#endif
print_context = NULL;
print_handler = NULL;
42fb8: 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;
42fbc: 42b9 0006 3530 clrl 63530 <print_context> <== NOT EXECUTED
print_handler = NULL;
42fc2: 42b9 0006 352c clrl 6352c <print_handler> <== NOT EXECUTED
}
42fc8: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 42fcc: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 42fd0: 4e5e unlk %fp <== NOT EXECUTED
00042e7a <rtems_stack_checker_switch_extension>:
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
42e7a: 4e56 0000 linkw %fp,#0 42e7e: 2f0a movel %a2,%sp@- 42e80: 246e 0008 moveal %fp@(8),%a2
Stack_Control *the_stack = &running->Start.Initial_stack;
void *pattern;
bool sp_ok;
bool pattern_ok = true;
pattern = Stack_check_Get_pattern_area(the_stack);
42e84: 222a 00b6 movel %a2@(182),%d1 42e88: 5081 addql #8,%d1
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
42e8a: 202a 00b6 movel %a2@(182),%d0 42e8e: b08e cmpl %fp,%d0
42e90: 622a bhis 42ebc <rtems_stack_checker_switch_extension+0x42><== NEVER TAKEN
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
42e92: d0aa 00b2 addl %a2@(178),%d0 42e96: b08e cmpl %fp,%d0
42e98: 6522 bcss 42ebc <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,
42e9a: 4878 0010 pea 10 <INVALID_OPERATION> 42e9e: 4879 0006 3d34 pea 63d34 <Stack_check_Pattern> 42ea4: 2f01 movel %d1,%sp@- 42ea6: 4eb9 0005 2360 jsr 52360 <memcmp> 42eac: 4fef 000c lea %sp@(12),%sp
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
42eb0: 4a80 tstl %d0
42eb2: 6634 bnes 42ee8 <rtems_stack_checker_switch_extension+0x6e><== NEVER TAKEN
Stack_check_report_blown_task( running, pattern_ok );
}
}
42eb4: 246e fffc moveal %fp@(-4),%a2 42eb8: 4e5e unlk %fp 42eba: 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,
42ebc: 4878 0010 pea 10 <INVALID_OPERATION> <== NOT EXECUTED 42ec0: 4879 0006 3d34 pea 63d34 <Stack_check_Pattern> <== NOT EXECUTED 42ec6: 2f01 movel %d1,%sp@- <== NOT EXECUTED 42ec8: 4eb9 0005 2360 jsr 52360 <memcmp> <== NOT EXECUTED 42ece: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 42ed2: 4a80 tstl %d0 <== NOT EXECUTED 42ed4: 57c0 seq %d0 <== NOT EXECUTED 42ed6: 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 );
42ed8: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 42ede: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42ee0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 42ee2: 4eb9 0004 2dca jsr 42dca <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 ) {
42ee8: 4200 clrb %d0 <== NOT EXECUTED
Stack_check_report_blown_task( running, pattern_ok );
42eea: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 42ef0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42ef2: 2f0a movel %a2,%sp@- <== NOT EXECUTED 42ef4: 4eb9 0004 2dca jsr 42dca <Stack_check_report_blown_task> <== NOT EXECUTED
0004de48 <rtems_string_to_double>:
rtems_status_code rtems_string_to_double (
const char *s,
double *n,
char **endptr
)
{
4de48: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 4de4c: 48d7 1c34 moveml %d2/%d4-%d5/%a2-%a4,%sp@ <== NOT EXECUTED 4de50: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED 4de54: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 4de58: 266e 0010 moveal %fp@(16),%a3 <== NOT EXECUTED
double result;
char *end;
if ( !n )
4de5c: 4a8a tstl %a2 <== NOT EXECUTED 4de5e: 675e beqs 4debe <rtems_string_to_double+0x76> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
errno = 0;
4de60: 49f9 0005 118c lea 5118c <__errno>,%a4 <== NOT EXECUTED 4de66: 4e94 jsr %a4@ <== NOT EXECUTED
*n = 0;
4de68: 4281 clrl %d1 <== NOT EXECUTED
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
4de6a: 2040 moveal %d0,%a0 <== NOT EXECUTED
*n = 0;
4de6c: 4280 clrl %d0 <== NOT EXECUTED
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
4de6e: 4290 clrl %a0@ <== NOT EXECUTED
*n = 0;
result = strtod( s, &end );
4de70: 486e fffc pea %fp@(-4) <== NOT EXECUTED
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
4de74: 2480 movel %d0,%a2@ <== NOT EXECUTED 4de76: 2541 0004 movel %d1,%a2@(4) <== NOT EXECUTED
result = strtod( s, &end );
4de7a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4de7c: 4eb9 0005 3d30 jsr 53d30 <strtod> <== NOT EXECUTED
if ( endptr )
4de82: 508f addql #8,%sp <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtod( s, &end );
4de84: 2800 movel %d0,%d4 <== NOT EXECUTED 4de86: 2a01 movel %d1,%d5 <== NOT EXECUTED
if ( endptr )
*endptr = end;
4de88: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED
errno = 0;
*n = 0;
result = strtod( s, &end );
if ( endptr )
4de8c: 4a8b tstl %a3 <== NOT EXECUTED 4de8e: 6702 beqs 4de92 <rtems_string_to_double+0x4a> <== NOT EXECUTED
*endptr = end;
4de90: 2680 movel %d0,%a3@ <== NOT EXECUTED
if ( end == s )
4de92: b082 cmpl %d2,%d0 <== NOT EXECUTED 4de94: 671c beqs 4deb2 <rtems_string_to_double+0x6a> <== NOT EXECUTED
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4de96: 4e94 jsr %a4@ <== NOT EXECUTED 4de98: 7222 moveq #34,%d1 <== NOT EXECUTED 4de9a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4de9c: b290 cmpl %a0@,%d1 <== NOT EXECUTED 4de9e: 672a beqs 4deca <rtems_string_to_double+0x82> <== NOT EXECUTED
(( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL )))
return RTEMS_INVALID_NUMBER;
*n = result;
4dea0: 2484 movel %d4,%a2@ <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
4dea2: 4280 clrl %d0 <== NOT EXECUTED
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL )))
return RTEMS_INVALID_NUMBER;
*n = result;
4dea4: 2545 0004 movel %d5,%a2@(4) <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
4dea8: 4cee 1c34 ffe4 moveml %fp@(-28),%d2/%d4-%d5/%a2-%a4 <== NOT EXECUTED 4deae: 4e5e unlk %fp <== NOT EXECUTED 4deb0: 4e75 rts <== NOT EXECUTED
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
4deb2: 700b moveq #11,%d0 <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
4deb4: 4cee 1c34 ffe4 moveml %fp@(-28),%d2/%d4-%d5/%a2-%a4 <== NOT EXECUTED 4deba: 4e5e unlk %fp <== NOT EXECUTED 4debc: 4e75 rts <== NOT EXECUTED
{
double result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
4debe: 7009 moveq #9,%d0 <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
4dec0: 4cee 1c34 ffe4 moveml %fp@(-28),%d2/%d4-%d5/%a2-%a4 <== NOT EXECUTED 4dec6: 4e5e unlk %fp <== NOT EXECUTED 4dec8: 4e75 rts <== NOT EXECUTED
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4deca: 42a7 clrl %sp@- <== NOT EXECUTED 4decc: 42a7 clrl %sp@- <== NOT EXECUTED 4dece: 2f05 movel %d5,%sp@- <== NOT EXECUTED 4ded0: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4ded2: 4eb9 0004 3478 jsr 43478 <__eqdf2> <== NOT EXECUTED 4ded8: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4dedc: 4a80 tstl %d0 <== NOT EXECUTED 4dede: 660c bnes 4deec <rtems_string_to_double+0xa4> <== NOT EXECUTED
(( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL )))
return RTEMS_INVALID_NUMBER;
4dee0: 700a moveq #10,%d0 <== NOT EXECUTED
*n = result;
return RTEMS_SUCCESSFUL;
}
4dee2: 4cee 1c34 ffe4 moveml %fp@(-28),%d2/%d4-%d5/%a2-%a4 <== NOT EXECUTED 4dee8: 4e5e unlk %fp <== NOT EXECUTED 4deea: 4e75 rts <== NOT EXECUTED
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL )))
4deec: 4878 ffff pea ffffffff <LESS> <== NOT EXECUTED 4def0: 2f3c 7fef ffff movel #2146435071,%sp@- <== NOT EXECUTED 4def6: 2f05 movel %d5,%sp@- <== NOT EXECUTED 4def8: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4defa: 4eb9 0005 f6c0 jsr 5f6c0 <__gtdf2> <== NOT EXECUTED 4df00: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4df04: 4a80 tstl %d0 <== NOT EXECUTED 4df06: 6ed8 bgts 4dee0 <rtems_string_to_double+0x98> <== NOT EXECUTED 4df08: 4878 ffff pea ffffffff <LESS> <== NOT EXECUTED 4df0c: 2f3c ffef ffff movel #-1048577,%sp@- <== NOT EXECUTED 4df12: 2f05 movel %d5,%sp@- <== NOT EXECUTED 4df14: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4df16: 4eb9 0005 f708 jsr 5f708 <__ltdf2> <== NOT EXECUTED 4df1c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4df20: 4a80 tstl %d0 <== NOT EXECUTED 4df22: 6c00 ff7c bgew 4dea0 <rtems_string_to_double+0x58> <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
4df26: 700a moveq #10,%d0 <== NOT EXECUTED 4df28: 60b8 bras 4dee2 <rtems_string_to_double+0x9a> <== NOT EXECUTED
...
0004df2c <rtems_string_to_float>:
rtems_status_code rtems_string_to_float (
const char *s,
float *n,
char **endptr
)
{
4df2c: 4e56 ffe8 linkw %fp,#-24 4df30: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4df34: 242e 0008 movel %fp@(8),%d2 4df38: 246e 000c moveal %fp@(12),%a2 4df3c: 266e 0010 moveal %fp@(16),%a3
float result;
char *end;
if ( !n )
4df40: 4a8a tstl %a2
4df42: 6754 beqs 4df98 <rtems_string_to_float+0x6c>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4df44: 49f9 0005 118c lea 5118c <__errno>,%a4 4df4a: 4e94 jsr %a4@ 4df4c: 2040 moveal %d0,%a0 4df4e: 4290 clrl %a0@
*n = 0;
result = strtof( s, &end );
4df50: 486e fffc pea %fp@(-4)
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
4df54: 24bc 0000 0000 movel #0,%a2@
result = strtof( s, &end );
4df5a: 2f02 movel %d2,%sp@- 4df5c: 4eb9 0005 3d50 jsr 53d50 <strtof>
if ( endptr )
4df62: 508f addql #8,%sp
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtof( s, &end );
4df64: 2600 movel %d0,%d3
if ( endptr )
*endptr = end;
4df66: 202e fffc movel %fp@(-4),%d0
errno = 0;
*n = 0;
result = strtof( s, &end );
if ( endptr )
4df6a: 4a8b tstl %a3
4df6c: 6702 beqs 4df70 <rtems_string_to_float+0x44>
*endptr = end;
4df6e: 2680 movel %d0,%a3@
if ( end == s )
4df70: b082 cmpl %d2,%d0
4df72: 6718 beqs 4df8c <rtems_string_to_float+0x60>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4df74: 4e94 jsr %a4@ 4df76: 7222 moveq #34,%d1 4df78: 2040 moveal %d0,%a0 4df7a: b290 cmpl %a0@,%d1
4df7c: 6726 beqs 4dfa4 <rtems_string_to_float+0x78>
(( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF )))
return RTEMS_INVALID_NUMBER;
*n = result;
4df7e: 2483 movel %d3,%a2@
return RTEMS_SUCCESSFUL;
4df80: 4280 clrl %d0
}
4df82: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4df88: 4e5e unlk %fp 4df8a: 4e75 rts
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
4df8c: 700b moveq #11,%d0
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
4df8e: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4df94: 4e5e unlk %fp 4df96: 4e75 rts
{
float result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
4df98: 7009 moveq #9,%d0
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
4df9a: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4dfa0: 4e5e unlk %fp 4dfa2: 4e75 rts
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4dfa4: 2f3c 0000 0000 movel #0,%sp@- 4dfaa: 2f03 movel %d3,%sp@- 4dfac: 4eb9 0004 349c jsr 4349c <__eqsf2> 4dfb2: 508f addql #8,%sp 4dfb4: 4a80 tstl %d0
4dfb6: 660c bnes 4dfc4 <rtems_string_to_float+0x98> <== ALWAYS TAKEN
(( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF )))
return RTEMS_INVALID_NUMBER;
4dfb8: 700a moveq #10,%d0 <== NOT EXECUTED
*n = result;
return RTEMS_SUCCESSFUL;
}
4dfba: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 <== NOT EXECUTED 4dfc0: 4e5e unlk %fp <== NOT EXECUTED 4dfc2: 4e75 rts <== NOT EXECUTED
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF )))
4dfc4: 2f3c 7f7f ffff movel #2139095039,%sp@- 4dfca: 2f03 movel %d3,%sp@- 4dfcc: 4eb9 0005 f750 jsr 5f750 <__gtsf2> 4dfd2: 508f addql #8,%sp 4dfd4: 4a80 tstl %d0
4dfd6: 6ee0 bgts 4dfb8 <rtems_string_to_float+0x8c> <== NEVER TAKEN
4dfd8: 2f3c ff7f ffff movel #-8388609,%sp@- 4dfde: 2f03 movel %d3,%sp@- 4dfe0: 4eb9 0005 f76c jsr 5f76c <__ltsf2> 4dfe6: 508f addql #8,%sp 4dfe8: 4a80 tstl %d0
4dfea: 6c92 bges 4df7e <rtems_string_to_float+0x52> <== ALWAYS TAKEN
return RTEMS_INVALID_NUMBER;
4dfec: 700a moveq #10,%d0 <== NOT EXECUTED 4dfee: 60ca bras 4dfba <rtems_string_to_float+0x8e> <== NOT EXECUTED
0004dff0 <rtems_string_to_int>:
const char *s,
int *n,
char **endptr,
int base
)
{
4dff0: 4e56 ffe8 linkw %fp,#-24 4dff4: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4dff8: 242e 0008 movel %fp@(8),%d2 4dffc: 246e 000c moveal %fp@(12),%a2 4e000: 266e 0010 moveal %fp@(16),%a3
long result;
char *end;
if ( !n )
4e004: 4a8a tstl %a2
4e006: 6756 beqs 4e05e <rtems_string_to_int+0x6e>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4e008: 49f9 0005 118c lea 5118c <__errno>,%a4 4e00e: 4e94 jsr %a4@ 4e010: 2040 moveal %d0,%a0 4e012: 4290 clrl %a0@
*n = 0;
result = strtol( s, &end, base );
4e014: 2f2e 0014 movel %fp@(20),%sp@- 4e018: 486e fffc pea %fp@(-4)
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
4e01c: 4292 clrl %a2@
result = strtol( s, &end, base );
4e01e: 2f02 movel %d2,%sp@- 4e020: 4eb9 0005 3f20 jsr 53f20 <strtol>
if ( endptr )
4e026: 4fef 000c lea %sp@(12),%sp
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtol( s, &end, base );
4e02a: 2600 movel %d0,%d3
if ( endptr )
*endptr = end;
4e02c: 202e fffc movel %fp@(-4),%d0
errno = 0;
*n = 0;
result = strtol( s, &end, base );
if ( endptr )
4e030: 4a8b tstl %a3
4e032: 6702 beqs 4e036 <rtems_string_to_int+0x46>
*endptr = end;
4e034: 2680 movel %d0,%a3@
if ( end == s )
4e036: b082 cmpl %d2,%d0
4e038: 6718 beqs 4e052 <rtems_string_to_int+0x62>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4e03a: 4e94 jsr %a4@ 4e03c: 7222 moveq #34,%d1 4e03e: 2040 moveal %d0,%a0 4e040: b290 cmpl %a0@,%d1
4e042: 6726 beqs 4e06a <rtems_string_to_int+0x7a>
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
4e044: 2483 movel %d3,%a2@
return RTEMS_SUCCESSFUL;
4e046: 4280 clrl %d0
}
4e048: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4e04e: 4e5e unlk %fp 4e050: 4e75 rts
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
4e052: 700b moveq #11,%d0
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
4e054: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4e05a: 4e5e unlk %fp 4e05c: 4e75 rts
{
long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
4e05e: 7009 moveq #9,%d0
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
4e060: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4e066: 4e5e unlk %fp 4e068: 4e75 rts
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4e06a: 4a83 tstl %d3
4e06c: 660c bnes 4e07a <rtems_string_to_int+0x8a> <== ALWAYS TAKEN
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
return RTEMS_INVALID_NUMBER;
4e06e: 700a moveq #10,%d0
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
4e070: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4e076: 4e5e unlk %fp 4e078: 4e75 rts
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
4e07a: 0c83 7fff ffff cmpil #2147483647,%d3
4e080: 67ec beqs 4e06e <rtems_string_to_int+0x7e>
4e082: 0c83 8000 0000 cmpil #-2147483648,%d3
4e088: 67e4 beqs 4e06e <rtems_string_to_int+0x7e> <== ALWAYS TAKEN
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
4e08a: 2483 movel %d3,%a2@ <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
4e08c: 4280 clrl %d0 <== NOT EXECUTED 4e08e: 60b8 bras 4e048 <rtems_string_to_int+0x58> <== NOT EXECUTED
0004e150 <rtems_string_to_long>:
const char *s,
long *n,
char **endptr,
int base
)
{
4e150: 4e56 ffe8 linkw %fp,#-24 4e154: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4e158: 242e 0008 movel %fp@(8),%d2 4e15c: 246e 000c moveal %fp@(12),%a2 4e160: 266e 0010 moveal %fp@(16),%a3
long result;
char *end;
if ( !n )
4e164: 4a8a tstl %a2
4e166: 6756 beqs 4e1be <rtems_string_to_long+0x6e>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4e168: 49f9 0005 118c lea 5118c <__errno>,%a4 4e16e: 4e94 jsr %a4@ 4e170: 2040 moveal %d0,%a0 4e172: 4290 clrl %a0@
*n = 0;
result = strtol( s, &end, base );
4e174: 2f2e 0014 movel %fp@(20),%sp@- 4e178: 486e fffc pea %fp@(-4)
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
4e17c: 4292 clrl %a2@
result = strtol( s, &end, base );
4e17e: 2f02 movel %d2,%sp@- 4e180: 4eb9 0005 3f20 jsr 53f20 <strtol>
if ( endptr )
4e186: 4fef 000c lea %sp@(12),%sp
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtol( s, &end, base );
4e18a: 2600 movel %d0,%d3
if ( endptr )
*endptr = end;
4e18c: 202e fffc movel %fp@(-4),%d0
errno = 0;
*n = 0;
result = strtol( s, &end, base );
if ( endptr )
4e190: 4a8b tstl %a3
4e192: 6702 beqs 4e196 <rtems_string_to_long+0x46>
*endptr = end;
4e194: 2680 movel %d0,%a3@
if ( end == s )
4e196: b082 cmpl %d2,%d0
4e198: 6718 beqs 4e1b2 <rtems_string_to_long+0x62>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4e19a: 4e94 jsr %a4@ 4e19c: 7222 moveq #34,%d1 4e19e: 2040 moveal %d0,%a0 4e1a0: b290 cmpl %a0@,%d1
4e1a2: 6726 beqs 4e1ca <rtems_string_to_long+0x7a>
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
return RTEMS_INVALID_NUMBER;
*n = result;
4e1a4: 2483 movel %d3,%a2@
return RTEMS_SUCCESSFUL;
4e1a6: 4280 clrl %d0
}
4e1a8: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4e1ae: 4e5e unlk %fp 4e1b0: 4e75 rts
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
4e1b2: 700b moveq #11,%d0
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
4e1b4: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4e1ba: 4e5e unlk %fp 4e1bc: 4e75 rts
{
long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
4e1be: 7009 moveq #9,%d0
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
4e1c0: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4e1c6: 4e5e unlk %fp 4e1c8: 4e75 rts
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4e1ca: 4a83 tstl %d3
4e1cc: 660c bnes 4e1da <rtems_string_to_long+0x8a> <== ALWAYS TAKEN
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
return RTEMS_INVALID_NUMBER;
4e1ce: 700a moveq #10,%d0
*n = result;
return RTEMS_SUCCESSFUL;
}
4e1d0: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4e1d6: 4e5e unlk %fp 4e1d8: 4e75 rts
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
4e1da: 0c83 7fff ffff cmpil #2147483647,%d3
4e1e0: 67ec beqs 4e1ce <rtems_string_to_long+0x7e>
4e1e2: 0c83 8000 0000 cmpil #-2147483648,%d3
4e1e8: 67e4 beqs 4e1ce <rtems_string_to_long+0x7e> <== ALWAYS TAKEN
return RTEMS_INVALID_NUMBER;
*n = result;
4e1ea: 2483 movel %d3,%a2@ <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
4e1ec: 4280 clrl %d0 <== NOT EXECUTED 4e1ee: 60b8 bras 4e1a8 <rtems_string_to_long+0x58> <== NOT EXECUTED
0004e090 <rtems_string_to_long_long>:
const char *s,
long long *n,
char **endptr,
int base
)
{
4e090: 4e56 ffe4 linkw %fp,#-28 4e094: 48d7 1c34 moveml %d2/%d4-%d5/%a2-%a4,%sp@ 4e098: 242e 0008 movel %fp@(8),%d2 4e09c: 246e 000c moveal %fp@(12),%a2 4e0a0: 266e 0010 moveal %fp@(16),%a3
long long result;
char *end;
if ( !n )
4e0a4: 4a8a tstl %a2
4e0a6: 6764 beqs 4e10c <rtems_string_to_long_long+0x7c>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4e0a8: 49f9 0005 118c lea 5118c <__errno>,%a4 4e0ae: 4e94 jsr %a4@ 4e0b0: 2040 moveal %d0,%a0
*n = 0;
4e0b2: 4280 clrl %d0 4e0b4: 4281 clrl %d1
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
4e0b6: 4290 clrl %a0@
*n = 0;
4e0b8: 2480 movel %d0,%a2@ 4e0ba: 2541 0004 movel %d1,%a2@(4)
result = strtoll( s, &end, base );
4e0be: 2f2e 0014 movel %fp@(20),%sp@- 4e0c2: 486e fffc pea %fp@(-4) 4e0c6: 2f02 movel %d2,%sp@- 4e0c8: 4eb9 0005 3f40 jsr 53f40 <strtoll>
if ( endptr )
4e0ce: 4fef 000c lea %sp@(12),%sp
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtoll( s, &end, base );
4e0d2: 2800 movel %d0,%d4 4e0d4: 2a01 movel %d1,%d5
if ( endptr )
*endptr = end;
4e0d6: 202e fffc movel %fp@(-4),%d0
errno = 0;
*n = 0;
result = strtoll( s, &end, base );
if ( endptr )
4e0da: 4a8b tstl %a3
4e0dc: 6702 beqs 4e0e0 <rtems_string_to_long_long+0x50>
*endptr = end;
4e0de: 2680 movel %d0,%a3@
if ( end == s )
4e0e0: b082 cmpl %d2,%d0
4e0e2: 671c beqs 4e100 <rtems_string_to_long_long+0x70>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4e0e4: 4e94 jsr %a4@ 4e0e6: 7222 moveq #34,%d1 4e0e8: 2040 moveal %d0,%a0 4e0ea: b290 cmpl %a0@,%d1
4e0ec: 672a beqs 4e118 <rtems_string_to_long_long+0x88>
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
4e0ee: 4280 clrl %d0
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
return RTEMS_INVALID_NUMBER;
*n = result;
4e0f0: 2484 movel %d4,%a2@ 4e0f2: 2545 0004 movel %d5,%a2@(4)
return RTEMS_SUCCESSFUL;
}
4e0f6: 4cee 1c34 ffe4 moveml %fp@(-28),%d2/%d4-%d5/%a2-%a4 4e0fc: 4e5e unlk %fp 4e0fe: 4e75 rts
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
4e100: 700b moveq #11,%d0
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
4e102: 4cee 1c34 ffe4 moveml %fp@(-28),%d2/%d4-%d5/%a2-%a4 4e108: 4e5e unlk %fp 4e10a: 4e75 rts
{
long long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
4e10c: 7009 moveq #9,%d0
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
4e10e: 4cee 1c34 ffe4 moveml %fp@(-28),%d2/%d4-%d5/%a2-%a4 4e114: 4e5e unlk %fp 4e116: 4e75 rts
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4e118: 2004 movel %d4,%d0 4e11a: 8085 orl %d5,%d0
4e11c: 660c bnes 4e12a <rtems_string_to_long_long+0x9a> <== ALWAYS TAKEN
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
return RTEMS_INVALID_NUMBER;
4e11e: 700a moveq #10,%d0
*n = result;
return RTEMS_SUCCESSFUL;
}
4e120: 4cee 1c34 ffe4 moveml %fp@(-28),%d2/%d4-%d5/%a2-%a4 4e126: 4e5e unlk %fp 4e128: 4e75 rts
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
4e12a: 203c 7fff ffff movel #2147483647,%d0 4e130: 72ff moveq #-1,%d1 4e132: 9285 subl %d5,%d1 4e134: 9184 subxl %d4,%d0
4e136: 67e6 beqs 4e11e <rtems_string_to_long_long+0x8e>
4e138: 203c 8000 0000 movel #-2147483648,%d0 4e13e: 4281 clrl %d1 4e140: 9285 subl %d5,%d1 4e142: 9184 subxl %d4,%d0
4e144: 67d8 beqs 4e11e <rtems_string_to_long_long+0x8e> <== ALWAYS TAKEN
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
4e146: 4280 clrl %d0 <== NOT EXECUTED
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
return RTEMS_INVALID_NUMBER;
*n = result;
4e148: 2484 movel %d4,%a2@ <== NOT EXECUTED 4e14a: 2545 0004 movel %d5,%a2@(4) <== NOT EXECUTED 4e14e: 60a6 bras 4e0f6 <rtems_string_to_long_long+0x66> <== NOT EXECUTED
0004e20c <rtems_string_to_unsigned_char>:
const char *s,
unsigned char *n,
char **endptr,
int base
)
{
4e20c: 4e56 ffe8 linkw %fp,#-24 4e210: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4e214: 242e 0008 movel %fp@(8),%d2 4e218: 246e 000c moveal %fp@(12),%a2 4e21c: 266e 0010 moveal %fp@(16),%a3
unsigned long result;
char *end;
if ( !n )
4e220: 4a8a tstl %a2
4e222: 675e beqs 4e282 <rtems_string_to_unsigned_char+0x76>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4e224: 49f9 0005 118c lea 5118c <__errno>,%a4 4e22a: 4e94 jsr %a4@ 4e22c: 2040 moveal %d0,%a0 4e22e: 4290 clrl %a0@
*n = 0;
4e230: 4212 clrb %a2@
result = strtoul( s, &end, base );
4e232: 2f2e 0014 movel %fp@(20),%sp@- 4e236: 486e fffc pea %fp@(-4) 4e23a: 2f02 movel %d2,%sp@- 4e23c: 4eb9 0005 437e jsr 5437e <strtoul>
if ( endptr )
4e242: 4fef 000c lea %sp@(12),%sp
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtoul( s, &end, base );
4e246: 2600 movel %d0,%d3
if ( endptr )
*endptr = end;
4e248: 202e fffc movel %fp@(-4),%d0
errno = 0;
*n = 0;
result = strtoul( s, &end, base );
if ( endptr )
4e24c: 4a8b tstl %a3
4e24e: 6702 beqs 4e252 <rtems_string_to_unsigned_char+0x46>
*endptr = end;
4e250: 2680 movel %d0,%a3@
if ( end == s )
4e252: b082 cmpl %d2,%d0
4e254: 6720 beqs 4e276 <rtems_string_to_unsigned_char+0x6a>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4e256: 4e94 jsr %a4@ 4e258: 7222 moveq #34,%d1 4e25a: 2040 moveal %d0,%a0 4e25c: b290 cmpl %a0@,%d1
4e25e: 6742 beqs 4e2a2 <rtems_string_to_unsigned_char+0x96>
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
#if (UCHAR_MAX < ULONG_MAX)
if ( result > UCHAR_MAX ) {
4e260: 0c83 0000 00ff cmpil #255,%d3
4e266: 6226 bhis 4e28e <rtems_string_to_unsigned_char+0x82>
}
#endif
*n = result;
return RTEMS_SUCCESSFUL;
4e268: 4280 clrl %d0
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
4e26a: 1483 moveb %d3,%a2@
return RTEMS_SUCCESSFUL;
}
4e26c: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4e272: 4e5e unlk %fp 4e274: 4e75 rts
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
4e276: 700b moveq #11,%d0
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
4e278: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4e27e: 4e5e unlk %fp 4e280: 4e75 rts
{
unsigned long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
4e282: 7009 moveq #9,%d0
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
4e284: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4e28a: 4e5e unlk %fp 4e28c: 4e75 rts
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
#if (UCHAR_MAX < ULONG_MAX)
if ( result > UCHAR_MAX ) {
errno = ERANGE;
4e28e: 4e94 jsr %a4@ 4e290: 7222 moveq #34,%d1 4e292: 2040 moveal %d0,%a0
return RTEMS_INVALID_NUMBER;
4e294: 700a moveq #10,%d0
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
4e296: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
#if (UCHAR_MAX < ULONG_MAX)
if ( result > UCHAR_MAX ) {
errno = ERANGE;
4e29c: 2081 movel %d1,%a0@
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
4e29e: 4e5e unlk %fp 4e2a0: 4e75 rts
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == ULONG_MAX )))
4e2a2: 2003 movel %d3,%d0 4e2a4: 5380 subql #1,%d0
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4e2a6: 72fd moveq #-3,%d1 4e2a8: b280 cmpl %d0,%d1
4e2aa: 64b4 bccs 4e260 <rtems_string_to_unsigned_char+0x54><== NEVER TAKEN
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
4e2ac: 700a moveq #10,%d0
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
4e2ae: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4
4e2b4: 4e5e unlk %fp <== NOT EXECUTED
0004e2b8 <rtems_string_to_unsigned_int>:
const char *s,
unsigned int *n,
char **endptr,
int base
)
{
4e2b8: 4e56 ffe8 linkw %fp,#-24 4e2bc: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4e2c0: 242e 0008 movel %fp@(8),%d2 4e2c4: 246e 000c moveal %fp@(12),%a2 4e2c8: 266e 0010 moveal %fp@(16),%a3
unsigned long result;
char *end;
if ( !n )
4e2cc: 4a8a tstl %a2
4e2ce: 6756 beqs 4e326 <rtems_string_to_unsigned_int+0x6e>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4e2d0: 49f9 0005 118c lea 5118c <__errno>,%a4 4e2d6: 4e94 jsr %a4@ 4e2d8: 2040 moveal %d0,%a0 4e2da: 4290 clrl %a0@
*n = 0;
result = strtoul( s, &end, base );
4e2dc: 2f2e 0014 movel %fp@(20),%sp@- 4e2e0: 486e fffc pea %fp@(-4)
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
4e2e4: 4292 clrl %a2@
result = strtoul( s, &end, base );
4e2e6: 2f02 movel %d2,%sp@- 4e2e8: 4eb9 0005 437e jsr 5437e <strtoul>
if ( endptr )
4e2ee: 4fef 000c lea %sp@(12),%sp
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtoul( s, &end, base );
4e2f2: 2600 movel %d0,%d3
if ( endptr )
*endptr = end;
4e2f4: 202e fffc movel %fp@(-4),%d0
errno = 0;
*n = 0;
result = strtoul( s, &end, base );
if ( endptr )
4e2f8: 4a8b tstl %a3
4e2fa: 6702 beqs 4e2fe <rtems_string_to_unsigned_int+0x46>
*endptr = end;
4e2fc: 2680 movel %d0,%a3@
if ( end == s )
4e2fe: b082 cmpl %d2,%d0
4e300: 6718 beqs 4e31a <rtems_string_to_unsigned_int+0x62>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4e302: 4e94 jsr %a4@ 4e304: 7222 moveq #34,%d1 4e306: 2040 moveal %d0,%a0 4e308: b290 cmpl %a0@,%d1
4e30a: 6726 beqs 4e332 <rtems_string_to_unsigned_int+0x7a>
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
4e30c: 2483 movel %d3,%a2@
return RTEMS_SUCCESSFUL;
4e30e: 4280 clrl %d0
}
4e310: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4e316: 4e5e unlk %fp 4e318: 4e75 rts
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
4e31a: 700b moveq #11,%d0
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
4e31c: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4e322: 4e5e unlk %fp 4e324: 4e75 rts
{
unsigned long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
4e326: 7009 moveq #9,%d0
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
4e328: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4e32e: 4e5e unlk %fp 4e330: 4e75 rts
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == ULONG_MAX )))
4e332: 2003 movel %d3,%d0 4e334: 5380 subql #1,%d0
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4e336: 72fd moveq #-3,%d1 4e338: b280 cmpl %d0,%d1
4e33a: 64d0 bccs 4e30c <rtems_string_to_unsigned_int+0x54><== NEVER TAKEN
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
4e33c: 700a moveq #10,%d0
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
4e33e: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4
4e344: 4e5e unlk %fp <== NOT EXECUTED
0004e3f0 <rtems_string_to_unsigned_long>:
const char *s,
unsigned long *n,
char **endptr,
int base
)
{
4e3f0: 4e56 ffe8 linkw %fp,#-24 4e3f4: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4e3f8: 242e 0008 movel %fp@(8),%d2 4e3fc: 246e 000c moveal %fp@(12),%a2 4e400: 266e 0010 moveal %fp@(16),%a3
unsigned long result;
char *end;
if ( !n )
4e404: 4a8a tstl %a2
4e406: 6756 beqs 4e45e <rtems_string_to_unsigned_long+0x6e>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4e408: 49f9 0005 118c lea 5118c <__errno>,%a4 4e40e: 4e94 jsr %a4@ 4e410: 2040 moveal %d0,%a0 4e412: 4290 clrl %a0@
*n = 0;
result = strtoul( s, &end, base );
4e414: 2f2e 0014 movel %fp@(20),%sp@- 4e418: 486e fffc pea %fp@(-4)
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
4e41c: 4292 clrl %a2@
result = strtoul( s, &end, base );
4e41e: 2f02 movel %d2,%sp@- 4e420: 4eb9 0005 437e jsr 5437e <strtoul>
if ( endptr )
4e426: 4fef 000c lea %sp@(12),%sp
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtoul( s, &end, base );
4e42a: 2600 movel %d0,%d3
if ( endptr )
*endptr = end;
4e42c: 202e fffc movel %fp@(-4),%d0
errno = 0;
*n = 0;
result = strtoul( s, &end, base );
if ( endptr )
4e430: 4a8b tstl %a3
4e432: 6702 beqs 4e436 <rtems_string_to_unsigned_long+0x46>
*endptr = end;
4e434: 2680 movel %d0,%a3@
if ( end == s )
4e436: b082 cmpl %d2,%d0
4e438: 6718 beqs 4e452 <rtems_string_to_unsigned_long+0x62>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4e43a: 4e94 jsr %a4@ 4e43c: 7222 moveq #34,%d1 4e43e: 2040 moveal %d0,%a0 4e440: b290 cmpl %a0@,%d1
4e442: 6726 beqs 4e46a <rtems_string_to_unsigned_long+0x7a>
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
*n = result;
4e444: 2483 movel %d3,%a2@
return RTEMS_SUCCESSFUL;
4e446: 4280 clrl %d0
}
4e448: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4e44e: 4e5e unlk %fp 4e450: 4e75 rts
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
4e452: 700b moveq #11,%d0
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
4e454: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4e45a: 4e5e unlk %fp 4e45c: 4e75 rts
{
unsigned long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
4e45e: 7009 moveq #9,%d0
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
4e460: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4e466: 4e5e unlk %fp 4e468: 4e75 rts
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == ULONG_MAX )))
4e46a: 2003 movel %d3,%d0 4e46c: 5380 subql #1,%d0
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4e46e: 72fd moveq #-3,%d1 4e470: b280 cmpl %d0,%d1
4e472: 64d0 bccs 4e444 <rtems_string_to_unsigned_long+0x54><== NEVER TAKEN
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
4e474: 700a moveq #10,%d0
*n = result;
return RTEMS_SUCCESSFUL;
}
4e476: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4
4e47c: 4e5e unlk %fp <== NOT EXECUTED
0004e348 <rtems_string_to_unsigned_long_long>:
const char *s,
unsigned long long *n,
char **endptr,
int base
)
{
4e348: 4e56 ffe0 linkw %fp,#-32 4e34c: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 4e350: 242e 0008 movel %fp@(8),%d2 4e354: 246e 000c moveal %fp@(12),%a2 4e358: 266e 0010 moveal %fp@(16),%a3
unsigned long long result;
char *end;
if ( !n )
4e35c: 4a8a tstl %a2
4e35e: 6764 beqs 4e3c4 <rtems_string_to_unsigned_long_long+0x7c>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4e360: 49f9 0005 118c lea 5118c <__errno>,%a4 4e366: 4e94 jsr %a4@ 4e368: 2040 moveal %d0,%a0
*n = 0;
4e36a: 4280 clrl %d0 4e36c: 4281 clrl %d1
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
4e36e: 4290 clrl %a0@
*n = 0;
4e370: 2480 movel %d0,%a2@ 4e372: 2541 0004 movel %d1,%a2@(4)
result = strtoull( s, &end, base );
4e376: 2f2e 0014 movel %fp@(20),%sp@- 4e37a: 486e fffc pea %fp@(-4) 4e37e: 2f02 movel %d2,%sp@- 4e380: 4eb9 0005 43a0 jsr 543a0 <strtoull>
if ( endptr )
4e386: 4fef 000c lea %sp@(12),%sp
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtoull( s, &end, base );
4e38a: 2800 movel %d0,%d4 4e38c: 2a01 movel %d1,%d5
if ( endptr )
*endptr = end;
4e38e: 202e fffc movel %fp@(-4),%d0
errno = 0;
*n = 0;
result = strtoull( s, &end, base );
if ( endptr )
4e392: 4a8b tstl %a3
4e394: 6702 beqs 4e398 <rtems_string_to_unsigned_long_long+0x50>
*endptr = end;
4e396: 2680 movel %d0,%a3@
if ( end == s )
4e398: b082 cmpl %d2,%d0
4e39a: 671c beqs 4e3b8 <rtems_string_to_unsigned_long_long+0x70>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4e39c: 4e94 jsr %a4@ 4e39e: 7222 moveq #34,%d1 4e3a0: 2040 moveal %d0,%a0 4e3a2: b290 cmpl %a0@,%d1
4e3a4: 672a beqs 4e3d0 <rtems_string_to_unsigned_long_long+0x88>
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
4e3a6: 4280 clrl %d0
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
return RTEMS_INVALID_NUMBER;
*n = result;
4e3a8: 2484 movel %d4,%a2@ 4e3aa: 2545 0004 movel %d5,%a2@(4)
return RTEMS_SUCCESSFUL;
}
4e3ae: 4cee 1c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a4 4e3b4: 4e5e unlk %fp 4e3b6: 4e75 rts
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
4e3b8: 700b moveq #11,%d0
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
4e3ba: 4cee 1c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a4 4e3c0: 4e5e unlk %fp 4e3c2: 4e75 rts
{
unsigned long long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
4e3c4: 7009 moveq #9,%d0
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
4e3c6: 4cee 1c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a4 4e3cc: 4e5e unlk %fp 4e3ce: 4e75 rts
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
4e3d0: 70ff moveq #-1,%d0 4e3d2: 72ff moveq #-1,%d1
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4e3d4: 74ff moveq #-1,%d2 4e3d6: 76fd moveq #-3,%d3
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
4e3d8: d285 addl %d5,%d1 4e3da: d184 addxl %d4,%d0
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4e3dc: 9681 subl %d1,%d3 4e3de: 9580 subxl %d0,%d2
4e3e0: 64c4 bccs 4e3a6 <rtems_string_to_unsigned_long_long+0x5e><== NEVER TAKEN
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
return RTEMS_INVALID_NUMBER;
4e3e2: 700a moveq #10,%d0
*n = result;
return RTEMS_SUCCESSFUL;
}
4e3e4: 4cee 1c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a4 4e3ea: 4e5e unlk %fp
...
00042b8c <rtems_tarfs_load>:
int rtems_tarfs_load(
char *mountpoint,
uint8_t *tar_image,
size_t tar_size
)
{
42b8c: 4e56 fe44 linkw %fp,#-444 42b90: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
int offset;
unsigned long nblocks;
IMFS_jnode_t *node;
int status;
status = rtems_filesystem_evaluate_path(
42b94: 2f2e 0008 movel %fp@(8),%sp@-
int rtems_tarfs_load(
char *mountpoint,
uint8_t *tar_image,
size_t tar_size
)
{
42b98: 2a2e 000c movel %fp@(12),%d5
int offset;
unsigned long nblocks;
IMFS_jnode_t *node;
int status;
status = rtems_filesystem_evaluate_path(
42b9c: 4eb9 0005 3a8c jsr 53a8c <strlen>
int rtems_tarfs_load(
char *mountpoint,
uint8_t *tar_image,
size_t tar_size
)
{
42ba2: 2c2e 0010 movel %fp@(16),%d6
int offset;
unsigned long nblocks;
IMFS_jnode_t *node;
int status;
status = rtems_filesystem_evaluate_path(
42ba6: 4297 clrl %sp@ 42ba8: 486e ffd4 pea %fp@(-44) 42bac: 42a7 clrl %sp@- 42bae: 2f00 movel %d0,%sp@- 42bb0: 2f2e 0008 movel %fp@(8),%sp@- 42bb4: 4eb9 0004 371c jsr 4371c <rtems_filesystem_evaluate_path>
strlen(mountpoint),
0,
&root_loc,
0
);
if (status != 0)
42bba: 4fef 0014 lea %sp@(20),%sp
int offset;
unsigned long nblocks;
IMFS_jnode_t *node;
int status;
status = rtems_filesystem_evaluate_path(
42bbe: 2d40 fe6c movel %d0,%fp@(-404)
strlen(mountpoint),
0,
&root_loc,
0
);
if (status != 0)
42bc2: 6600 01ce bnew 42d92 <rtems_tarfs_load+0x206>
return -1;
if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops)
42bc6: 202e ffe0 movel %fp@(-32),%d0 42bca: 0c80 0006 33c2 cmpil #406466,%d0
42bd0: 670a beqs 42bdc <rtems_tarfs_load+0x50>
42bd2: 0c80 0006 3c16 cmpil #408598,%d0 42bd8: 6600 01a4 bnew 42d7e <rtems_tarfs_load+0x1f2> 42bdc: 95ca subal %a2,%a2
hdr_ptr = (char *) &tar_image[offset];
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
42bde: 280e movel %fp,%d4
/*
* Create an IMFS node structure pointing to tar image memory.
*/
offset = 0;
while (1) {
if (offset + 512 > tar_size)
42be0: 240a movel %a2,%d2
hdr_ptr = (char *) &tar_image[offset];
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
42be2: 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);
42be8: 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)
42bec: 0682 0000 0200 addil #512,%d2 42bf2: bc82 cmpl %d2,%d6 42bf4: 6500 0098 bcsw 42c8e <rtems_tarfs_load+0x102>
/*
* Read a header.
*/
hdr_ptr = (char *) &tar_image[offset];
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
42bf8: 4878 0005 pea 5 <COMPARE>
break;
/*
* Read a header.
*/
hdr_ptr = (char *) &tar_image[offset];
42bfc: 45f2 5800 lea %a2@(00000000,%d5:l),%a2
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
42c00: 4879 0006 340a pea 6340a <IMFS_ops+0x48> 42c06: 486a 0101 pea %a2@(257) 42c0a: 4eb9 0005 3aa8 jsr 53aa8 <strncmp> 42c10: 4fef 000c lea %sp@(12),%sp 42c14: 4a80 tstl %d0
42c16: 6676 bnes 42c8e <rtems_tarfs_load+0x102>
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
42c18: 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);
42c1c: 47f9 0004 ae74 lea 4ae74 <_rtems_octal2ulong>,%a3
hdr_ptr = (char *) &tar_image[offset];
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
42c22: 2f0a movel %a2,%sp@- 42c24: 2f04 movel %d4,%sp@- 42c26: 4eb9 0005 3b84 jsr 53b84 <strncpy>
filename[MAX_NAME_FIELD_SIZE] = '\0';
linkflag = hdr_ptr[156];
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
42c2c: 4878 0008 pea 8 <DIVIDE_BY_ZERO> 42c30: 486a 0064 pea %a2@(100)
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
filename[MAX_NAME_FIELD_SIZE] = '\0';
42c34: 4200 clrb %d0
linkflag = hdr_ptr[156];
42c36: 162a 009c moveb %a2@(156),%d3
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
filename[MAX_NAME_FIELD_SIZE] = '\0';
42c3a: 1d40 ffd3 moveb %d0,%fp@(-45)
linkflag = hdr_ptr[156];
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
42c3e: 4e93 jsr %a3@
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
42c40: 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);
42c44: 2840 moveal %d0,%a4
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
42c46: 486a 007c pea %a2@(124) 42c4a: 4e93 jsr %a3@
hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8);
42c4c: 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);
42c50: 2e00 movel %d0,%d7
hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8);
42c52: 486a 0094 pea %a2@(148) 42c56: 4e93 jsr %a3@
if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum)
42c58: 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);
42c5c: 2640 moveal %d0,%a3
if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum)
42c5e: 2e8a movel %a2,%sp@ 42c60: 4eb9 0004 b3a2 jsr 4b3a2 <_rtems_tar_header_checksum> 42c66: 588f addql #4,%sp 42c68: b7c0 cmpal %d0,%a3
42c6a: 6622 bnes 42c8e <rtems_tarfs_load+0x102> <== 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) {
42c6c: 7235 moveq #53,%d1 42c6e: 0283 0000 00ff andil #255,%d3 42c74: b283 cmpl %d3,%d1
42c76: 676c beqs 42ce4 <rtems_tarfs_load+0x158>
* 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) {
42c78: 7030 moveq #48,%d0 42c7a: b083 cmpl %d3,%d0
42c7c: 671e beqs 42c9c <rtems_tarfs_load+0x110>
0
);
if (status != 0)
return -1;
if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops)
42c7e: 2442 moveal %d2,%a2
/*
* Create an IMFS node structure pointing to tar image memory.
*/
offset = 0;
while (1) {
if (offset + 512 > tar_size)
42c80: 240a movel %a2,%d2 42c82: 0682 0000 0200 addil #512,%d2 42c88: bc82 cmpl %d2,%d6 42c8a: 6400 ff6c bccw 42bf8 <rtems_tarfs_load+0x6c>
nblocks = (((file_size) + 511) & ~511) / 512;
offset += 512 * nblocks;
}
}
return status;
}
42c8e: 202e fe6c movel %fp@(-404),%d0 42c92: 4cee 3cfc fe44 moveml %fp@(-444),%d2-%d7/%a2-%a5 42c98: 4e5e unlk %fp 42c9a: 4e75 rts
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
42c9c: 486e fffc pea %fp@(-4) 42ca0: 486e ffe8 pea %fp@(-24)
* should not have this path.
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
42ca4: 2d6e ffd4 ffe8 movel %fp@(-44),%fp@(-24) 42caa: 2d6e ffd8 ffec movel %fp@(-40),%fp@(-20) 42cb0: 2d6e ffdc fff0 movel %fp@(-36),%fp@(-16) 42cb6: 2d6e ffe0 fff4 movel %fp@(-32),%fp@(-12) 42cbc: 2d6e ffe4 fff8 movel %fp@(-28),%fp@(-8)
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
42cc2: 2f04 movel %d4,%sp@- 42cc4: 4eb9 0004 be0a jsr 4be0a <IMFS_evaluate_for_make> 42cca: 4fef 000c lea %sp@(12),%sp 42cce: 4a80 tstl %d0
42cd0: 6762 beqs 42d34 <rtems_tarfs_load+0x1a8> <== ALWAYS TAKEN
);
node->info.linearfile.size = file_size;
node->info.linearfile.direct = &tar_image[offset];
}
nblocks = (((file_size) + 511) & ~511) / 512;
42cd2: 0687 0000 01ff addil #511,%d7 <== NOT EXECUTED
offset += 512 * nblocks;
42cd8: 0287 ffff fe00 andil #-512,%d7 <== NOT EXECUTED 42cde: d487 addl %d7,%d2 <== NOT EXECUTED
0
);
if (status != 0)
return -1;
if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops)
42ce0: 2442 moveal %d2,%a2 42ce2: 609c bras 42c80 <rtems_tarfs_load+0xf4>
* - 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);
42ce4: 2f2e 0008 movel %fp@(8),%sp@-
if (full_filename[strlen(full_filename)-1] != '/')
42ce8: 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);
42cea: 2f0d movel %a5,%sp@- 42cec: 4eb9 0005 3584 jsr 53584 <strcpy>
if (full_filename[strlen(full_filename)-1] != '/')
42cf2: 2f0d movel %a5,%sp@- 42cf4: 4eb9 0005 3a8c jsr 53a8c <strlen> 42cfa: 4fef 000c lea %sp@(12),%sp 42cfe: 41f6 0800 lea %fp@(00000000,%d0:l),%a0 42d02: 1228 fe6f moveb %a0@(-401),%d1 42d06: 49c1 extbl %d1 42d08: b681 cmpl %d1,%d3
42d0a: 6708 beqs 42d14 <rtems_tarfs_load+0x188> <== ALWAYS TAKEN
strcat(full_filename, "/");
42d0c: 323c 2f00 movew #12032,%d1 <== NOT EXECUTED 42d10: 3b81 0800 movew %d1,%a5@(00000000,%d0:l) <== NOT EXECUTED
strcat(full_filename, filename);
42d14: 2f04 movel %d4,%sp@-
0
);
if (status != 0)
return -1;
if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops)
42d16: 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);
42d18: 2f0d movel %a5,%sp@- 42d1a: 4eb9 0005 3464 jsr 53464 <strcat>
mkdir(full_filename, S_IRWXU | S_IRWXG | S_IRWXO);
42d20: 4878 01ff pea 1ff <DBL_MANT_DIG+0x1ca> 42d24: 2f0d movel %a5,%sp@- 42d26: 4eb9 0004 4050 jsr 44050 <mkdir> 42d2c: 4fef 0010 lea %sp@(16),%sp 42d30: 6000 ff4e braw 42c80 <rtems_tarfs_load+0xf4>
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,
42d34: 200c movel %a4,%d0 42d36: 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(
42d3c: 42a7 clrl %sp@- 42d3e: 08c0 000f bset #15,%d0 42d42: 2f00 movel %d0,%sp@- 42d44: 2f2e fffc movel %fp@(-4),%sp@- 42d48: 4878 0006 pea 6 <EXTENDSFDF> 42d4c: 486e ffe8 pea %fp@(-24) 42d50: 4eb9 0004 b5ba jsr 4b5ba <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];
42d56: 4fef 0014 lea %sp@(20),%sp 42d5a: 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(
42d5c: 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];
42d5e: 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;
42d60: 2147 0050 movel %d7,%a0@(80)
node->info.linearfile.direct = &tar_image[offset];
}
nblocks = (((file_size) + 511) & ~511) / 512;
42d64: 0687 0000 01ff addil #511,%d7
offset += 512 * nblocks;
42d6a: 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];
42d70: 2141 0054 movel %d1,%a0@(84)
}
nblocks = (((file_size) + 511) & ~511) / 512;
offset += 512 * nblocks;
42d74: 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;
42d76: 42a8 004c clrl %a0@(76) 42d7a: 6000 ff64 braw 42ce0 <rtems_tarfs_load+0x154>
);
if (status != 0)
return -1;
if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops)
return -1;
42d7e: 72ff moveq #-1,%d1 42d80: 2d41 fe6c movel %d1,%fp@(-404)
nblocks = (((file_size) + 511) & ~511) / 512;
offset += 512 * nblocks;
}
}
return status;
}
42d84: 202e fe6c movel %fp@(-404),%d0 42d88: 4cee 3cfc fe44 moveml %fp@(-444),%d2-%d7/%a2-%a5 42d8e: 4e5e unlk %fp 42d90: 4e75 rts
0,
&root_loc,
0
);
if (status != 0)
return -1;
42d92: 76ff moveq #-1,%d3 42d94: 2d43 fe6c movel %d3,%fp@(-404)
nblocks = (((file_size) + 511) & ~511) / 512;
offset += 512 * nblocks;
}
}
return status;
}
42d98: 202e fe6c movel %fp@(-404),%d0 42d9c: 4cee 3cfc fe44 moveml %fp@(-444),%d2-%d7/%a2-%a5 42da2: 4e5e unlk %fp
...
00046e1c <rtems_task_delete>:
*/
rtems_status_code rtems_task_delete(
rtems_id id
)
{
46e1c: 4e56 fffc linkw %fp,#-4 46e20: 2f0b movel %a3,%sp@- 46e22: 2f0a movel %a2,%sp@-
register Thread_Control *the_thread;
Objects_Locations location;
Objects_Information *the_information;
_RTEMS_Lock_allocator();
46e24: 2f39 0006 10e8 movel 610e8 <_RTEMS_Allocator_Mutex>,%sp@- 46e2a: 4eb9 0004 74dc jsr 474dc <_API_Mutex_Lock>
the_thread = _Thread_Get( id, &location );
46e30: 486e fffc pea %fp@(-4) 46e34: 2f2e 0008 movel %fp@(8),%sp@- 46e38: 4eb9 0004 9240 jsr 49240 <_Thread_Get>
switch ( location ) {
46e3e: 4fef 000c lea %sp@(12),%sp
Objects_Locations location;
Objects_Information *the_information;
_RTEMS_Lock_allocator();
the_thread = _Thread_Get( id, &location );
46e42: 2440 moveal %d0,%a2
switch ( location ) {
46e44: 4aae fffc tstl %fp@(-4)
46e48: 664a bnes 46e94 <rtems_task_delete+0x78> <== NEVER TAKEN
case OBJECTS_LOCAL:
the_information = _Objects_Get_information_id( the_thread->Object.id );
46e4a: 2f2a 0008 movel %a2@(8),%sp@- 46e4e: 47f9 0004 8360 lea 48360 <_Objects_Get_information_id>,%a3 46e54: 4e93 jsr %a3@
0 /* Not used */
);
}
#endif
_Thread_Close( the_information, the_thread );
46e56: 2f0a movel %a2,%sp@- 46e58: 2f00 movel %d0,%sp@- 46e5a: 4eb9 0004 8e78 jsr 48e78 <_Thread_Close> 46e60: 2f2a 0008 movel %a2@(8),%sp@- 46e64: 4e93 jsr %a3@ 46e66: 2f0a movel %a2,%sp@- 46e68: 2f00 movel %d0,%sp@- 46e6a: 4eb9 0004 82dc jsr 482dc <_Objects_Free>
_RTEMS_tasks_Free( the_thread );
_RTEMS_Unlock_allocator();
46e70: 2f39 0006 10e8 movel 610e8 <_RTEMS_Allocator_Mutex>,%sp@- 46e76: 4eb9 0004 753c jsr 4753c <_API_Mutex_Unlock>
_Thread_Enable_dispatch();
46e7c: 4eb9 0004 9218 jsr 49218 <_Thread_Enable_dispatch>
break;
}
_RTEMS_Unlock_allocator();
return RTEMS_INVALID_ID;
}
46e82: 246e fff4 moveal %fp@(-12),%a2
_RTEMS_tasks_Free( the_thread );
_RTEMS_Unlock_allocator();
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
46e86: 4fef 001c lea %sp@(28),%sp 46e8a: 4280 clrl %d0
break;
}
_RTEMS_Unlock_allocator();
return RTEMS_INVALID_ID;
}
46e8c: 266e fff8 moveal %fp@(-8),%a3 46e90: 4e5e unlk %fp 46e92: 4e75 rts
case OBJECTS_ERROR:
break;
}
_RTEMS_Unlock_allocator();
46e94: 2f39 0006 10e8 movel 610e8 <_RTEMS_Allocator_Mutex>,%sp@- 46e9a: 4eb9 0004 753c jsr 4753c <_API_Mutex_Unlock>
return RTEMS_INVALID_ID; }
46ea0: 246e fff4 moveal %fp@(-12),%a2
case OBJECTS_ERROR:
break;
}
_RTEMS_Unlock_allocator();
return RTEMS_INVALID_ID;
46ea4: 588f addql #4,%sp 46ea6: 7004 moveq #4,%d0
}
46ea8: 266e fff8 moveal %fp@(-8),%a3
46eac: 4e5e unlk %fp <== NOT EXECUTED
0004eb40 <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
4eb40: 4e56 ffe4 linkw %fp,#-28 4eb44: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 4eb48: 2a2e 0008 movel %fp@(8),%d5 4eb4c: 242e 000c movel %fp@(12),%d2 4eb50: 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 )
4eb54: 4a8c tstl %a4 4eb56: 6700 0148 beqw 4eca0 <rtems_task_mode+0x160>
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
4eb5a: 2479 0006 14aa moveal 614aa <_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;
4eb60: 4a2a 0074 tstb %a2@(116) 4eb64: 57c3 seq %d3
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
4eb66: 266a 00fe moveal %a2@(254),%a3
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
4eb6a: 49c3 extbl %d3 4eb6c: 0283 0000 0100 andil #256,%d3
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
4eb72: 4aaa 007a tstl %a2@(122) 4eb76: 6600 00cc bnew 4ec44 <rtems_task_mode+0x104>
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
4eb7a: 4a2b 0008 tstb %a3@(8) 4eb7e: 57c4 seq %d4
old_mode |= _ISR_Get_level();
4eb80: 4eb9 0004 a408 jsr 4a408 <_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;
4eb86: 49c4 extbl %d4 4eb88: 0284 0000 0400 andil #1024,%d4 4eb8e: 8084 orl %d4,%d0
old_mode |= _ISR_Get_level();
4eb90: 8083 orl %d3,%d0 4eb92: 2880 movel %d0,%a4@
*previous_mode_set = old_mode;
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
4eb94: 0802 0008 btst #8,%d2
4eb98: 670c beqs 4eba6 <rtems_task_mode+0x66>
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
4eb9a: 0805 0008 btst #8,%d5 4eb9e: 57c0 seq %d0 4eba0: 4480 negl %d0 4eba2: 1540 0074 moveb %d0,%a2@(116)
if ( mask & RTEMS_TIMESLICE_MASK ) {
4eba6: 0802 0009 btst #9,%d2
4ebaa: 6718 beqs 4ebc4 <rtems_task_mode+0x84>
if ( _Modes_Is_timeslice(mode_set) ) {
4ebac: 0805 0009 btst #9,%d5 4ebb0: 6700 00fa beqw 4ecac <rtems_task_mode+0x16c>
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
4ebb4: 7001 moveq #1,%d0
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
4ebb6: 41f9 0006 1000 lea 61000 <_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;
4ebbc: 2540 007a movel %d0,%a2@(122)
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
4ebc0: 2550 0076 movel %a0@,%a2@(118)
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
4ebc4: 7007 moveq #7,%d0 4ebc6: c082 andl %d2,%d0
4ebc8: 6712 beqs 4ebdc <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 ) );
4ebca: 40c0 movew %sr,%d0
*/
RTEMS_INLINE_ROUTINE ISR_Level _Modes_Get_interrupt_level (
Modes_Control mode_set
)
{
return ( mode_set & RTEMS_INTERRUPT_MASK );
4ebcc: 7207 moveq #7,%d1 4ebce: 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 ) );
4ebd0: 0280 0000 f8ff andil #63743,%d0 4ebd6: e189 lsll #8,%d1 4ebd8: 8081 orl %d1,%d0 4ebda: 46c0 movew %d0,%sr
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
4ebdc: 0802 000a btst #10,%d2
4ebe0: 6754 beqs 4ec36 <rtems_task_mode+0xf6>
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
4ebe2: 4282 clrl %d2 4ebe4: 142b 0008 moveb %a3@(8),%d2 4ebe8: 4280 clrl %d0
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
4ebea: 0805 000a btst #10,%d5 4ebee: 57c1 seq %d1 4ebf0: 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 ) {
4ebf2: 1001 moveb %d1,%d0 4ebf4: b082 cmpl %d2,%d0
4ebf6: 673e beqs 4ec36 <rtems_task_mode+0xf6>
)
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
4ebf8: 203c 0000 0700 movel #1792,%d0
asr->is_enabled = is_asr_enabled;
4ebfe: 1741 0008 moveb %d1,%a3@(8) 4ec02: 40c1 movew %sr,%d1 4ec04: 8081 orl %d1,%d0 4ec06: 46c0 movew %d0,%sr
_signals = information->signals_pending;
4ec08: 202b 0016 movel %a3@(22),%d0
information->signals_pending = information->signals_posted;
4ec0c: 276b 0012 0016 movel %a3@(18),%a3@(22)
information->signals_posted = _signals;
4ec12: 2740 0012 movel %d0,%a3@(18)
_ISR_Enable( _level );
4ec16: 46c1 movew %d1,%sr
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
4ec18: 4aab 0012 tstl %a3@(18) 4ec1c: 56c0 sne %d0
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
4ec1e: 7203 moveq #3,%d1
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
4ec20: 4480 negl %d0
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
4ec22: b2b9 0006 118c cmpl 6118c <_System_state_Current>,%d1
4ec28: 6744 beqs 4ec6e <rtems_task_mode+0x12e> <== ALWAYS TAKEN
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
4ec2a: 4280 clrl %d0
}
4ec2c: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4ec32: 4e5e unlk %fp 4ec34: 4e75 rts
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
4ec36: 7203 moveq #3,%d1
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
4ec38: 4200 clrb %d0
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
4ec3a: b2b9 0006 118c cmpl 6118c <_System_state_Current>,%d1
4ec40: 66e8 bnes 4ec2a <rtems_task_mode+0xea>
4ec42: 602a bras 4ec6e <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;
4ec44: 4a2b 0008 tstb %a3@(8) 4ec48: 57c4 seq %d4
old_mode |= _ISR_Get_level();
4ec4a: 4eb9 0004 a408 jsr 4a408 <_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;
4ec50: 49c4 extbl %d4 4ec52: 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;
4ec58: 08c3 0009 bset #9,%d3
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
4ec5c: 8084 orl %d4,%d0
old_mode |= _ISR_Get_level();
4ec5e: 8083 orl %d3,%d0 4ec60: 2880 movel %d0,%a4@
*previous_mode_set = old_mode;
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
4ec62: 0802 0008 btst #8,%d2 4ec66: 6700 ff3e beqw 4eba6 <rtems_task_mode+0x66> 4ec6a: 6000 ff2e braw 4eb9a <rtems_task_mode+0x5a>
bool are_signals_pending
)
{
Thread_Control *executing;
executing = _Thread_Executing;
4ec6e: 2079 0006 14aa moveal 614aa <_Per_CPU_Information+0xc>,%a0
if ( are_signals_pending ||
4ec74: 4a00 tstb %d0
4ec76: 660e bnes 4ec86 <rtems_task_mode+0x146>
4ec78: b1f9 0006 14ae cmpal 614ae <_Per_CPU_Information+0x10>,%a0
4ec7e: 67aa beqs 4ec2a <rtems_task_mode+0xea>
(!_Thread_Is_heir( executing ) && executing->is_preemptible) ) {
4ec80: 4a28 0074 tstb %a0@(116)
4ec84: 67a4 beqs 4ec2a <rtems_task_mode+0xea> <== NEVER TAKEN
_Thread_Dispatch_necessary = true;
4ec86: 7001 moveq #1,%d0 4ec88: 13c0 0006 14b6 moveb %d0,614b6 <_Per_CPU_Information+0x18>
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
4ec8e: 4eb9 0004 909c jsr 4909c <_Thread_Dispatch>
}
return RTEMS_SUCCESSFUL;
}
4ec94: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4
if ( _System_state_Is_up( _System_state_Get() ) ) {
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
4ec9a: 4280 clrl %d0
}
4ec9c: 4e5e unlk %fp 4ec9e: 4e75 rts
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
4eca0: 7009 moveq #9,%d0
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
}
4eca2: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4eca8: 4e5e unlk %fp 4ecaa: 4e75 rts
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
4ecac: 7007 moveq #7,%d0 4ecae: 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;
4ecb0: 42aa 007a clrl %a2@(122)
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
4ecb4: 4a80 tstl %d0 4ecb6: 6700 ff24 beqw 4ebdc <rtems_task_mode+0x9c> 4ecba: 6000 ff0e braw 4ebca <rtems_task_mode+0x8a>
...
0004b07c <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
4b07c: 4e56 fffc linkw %fp,#-4 4b080: 2f0a movel %a2,%sp@- 4b082: 246e 0010 moveal %fp@(16),%a2 4b086: 2f02 movel %d2,%sp@- 4b088: 242e 000c movel %fp@(12),%d2
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
4b08c: 670c beqs 4b09a <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 ) );
4b08e: 4280 clrl %d0 4b090: 1039 0006 36ba moveb 636ba <rtems_maximum_priority>,%d0
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
4b096: b082 cmpl %d2,%d0
4b098: 6574 bcss 4b10e <rtems_task_set_priority+0x92>
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
4b09a: 4a8a tstl %a2
4b09c: 6754 beqs 4b0f2 <rtems_task_set_priority+0x76>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
4b09e: 486e fffc pea %fp@(-4) 4b0a2: 2f2e 0008 movel %fp@(8),%sp@- 4b0a6: 4eb9 0004 d57c jsr 4d57c <_Thread_Get>
switch ( location ) {
4b0ac: 508f addql #8,%sp 4b0ae: 4aae fffc tstl %fp@(-4)
4b0b2: 664c bnes 4b100 <rtems_task_set_priority+0x84>
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
4b0b4: 2040 moveal %d0,%a0 4b0b6: 24a8 0014 movel %a0@(20),%a2@
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
4b0ba: 4a82 tstl %d2
4b0bc: 6720 beqs 4b0de <rtems_task_set_priority+0x62>
the_thread->real_priority = new_priority;
4b0be: 2142 0018 movel %d2,%a0@(24)
if ( the_thread->resource_count == 0 ||
4b0c2: 4aa8 001c tstl %a0@(28)
4b0c6: 6706 beqs 4b0ce <rtems_task_set_priority+0x52>
4b0c8: b4a8 0014 cmpl %a0@(20),%d2
4b0cc: 6410 bccs 4b0de <rtems_task_set_priority+0x62> <== ALWAYS TAKEN
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, false );
4b0ce: 42a7 clrl %sp@- 4b0d0: 2f02 movel %d2,%sp@- 4b0d2: 2f00 movel %d0,%sp@- 4b0d4: 4eb9 0004 d074 jsr 4d074 <_Thread_Change_priority> 4b0da: 4fef 000c lea %sp@(12),%sp
}
_Thread_Enable_dispatch();
4b0de: 4eb9 0004 d554 jsr 4d554 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4b0e4: 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;
4b0e8: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4b0ea: 246e fff8 moveal %fp@(-8),%a2 4b0ee: 4e5e unlk %fp 4b0f0: 4e75 rts 4b0f2: 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;
4b0f6: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4b0f8: 246e fff8 moveal %fp@(-8),%a2 4b0fc: 4e5e unlk %fp 4b0fe: 4e75 rts 4b100: 242e fff4 movel %fp@(-12),%d2
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
4b104: 7004 moveq #4,%d0
}
4b106: 246e fff8 moveal %fp@(-8),%a2 4b10a: 4e5e unlk %fp 4b10c: 4e75 rts 4b10e: 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;
4b112: 7013 moveq #19,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4b114: 246e fff8 moveal %fp@(-8),%a2
4b118: 4e5e unlk %fp <== NOT EXECUTED
00047c48 <rtems_task_variable_delete>:
rtems_status_code rtems_task_variable_delete(
rtems_id tid,
void **ptr
)
{
47c48: 4e56 fffc linkw %fp,#-4 47c4c: 2f02 movel %d2,%sp@- 47c4e: 242e 000c movel %fp@(12),%d2
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
47c52: 6740 beqs 47c94 <rtems_task_variable_delete+0x4c>
return RTEMS_INVALID_ADDRESS;
prev = NULL;
the_thread = _Thread_Get (tid, &location);
47c54: 486e fffc pea %fp@(-4) 47c58: 2f2e 0008 movel %fp@(8),%sp@- 47c5c: 4eb9 0004 9f34 jsr 49f34 <_Thread_Get>
switch (location) {
47c62: 508f addql #8,%sp 47c64: 4aae fffc tstl %fp@(-4)
47c68: 6620 bnes 47c8a <rtems_task_variable_delete+0x42>
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
47c6a: 2040 moveal %d0,%a0 47c6c: 2268 010a moveal %a0@(266),%a1
while (tvp) {
47c70: 4a89 tstl %a1
47c72: 672a beqs 47c9e <rtems_task_variable_delete+0x56>
if (tvp->ptr == ptr) {
47c74: b4a9 0004 cmpl %a1@(4),%d2
47c78: 6752 beqs 47ccc <rtems_task_variable_delete+0x84>
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
47c7a: 2051 moveal %a1@,%a0
the_thread = _Thread_Get (tid, &location);
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
47c7c: 4a88 tstl %a0
47c7e: 671e beqs 47c9e <rtems_task_variable_delete+0x56><== NEVER TAKEN
if (tvp->ptr == ptr) {
47c80: b4a8 0004 cmpl %a0@(4),%d2
47c84: 6728 beqs 47cae <rtems_task_variable_delete+0x66>
47c86: 2248 moveal %a0,%a1 47c88: 60f0 bras 47c7a <rtems_task_variable_delete+0x32>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47c8a: 242e fff8 movel %fp@(-8),%d2
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
47c8e: 7004 moveq #4,%d0
}
47c90: 4e5e unlk %fp 47c92: 4e75 rts 47c94: 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;
47c98: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47c9a: 4e5e unlk %fp 47c9c: 4e75 rts
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
47c9e: 4eb9 0004 9f0c jsr 49f0c <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47ca4: 242e fff8 movel %fp@(-8),%d2
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
return RTEMS_INVALID_ADDRESS;
47ca8: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47caa: 4e5e unlk %fp 47cac: 4e75 rts
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
47cae: 2290 movel %a0@,%a1@
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
47cb0: 2f08 movel %a0,%sp@- 47cb2: 2f00 movel %d0,%sp@- 47cb4: 4eb9 0004 7d78 jsr 47d78 <_RTEMS_Tasks_Invoke_task_variable_dtor>
_Thread_Enable_dispatch();
47cba: 4eb9 0004 9f0c jsr 49f0c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
47cc0: 508f addql #8,%sp 47cc2: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47cc4: 242e fff8 movel %fp@(-8),%d2 47cc8: 4e5e unlk %fp 47cca: 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;
47ccc: 2040 moveal %d0,%a0 47cce: 2151 010a movel %a1@,%a0@(266) 47cd2: 2049 moveal %a1,%a0
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
47cd4: 2f08 movel %a0,%sp@- 47cd6: 2f00 movel %d0,%sp@- 47cd8: 4eb9 0004 7d78 jsr 47d78 <_RTEMS_Tasks_Invoke_task_variable_dtor>
_Thread_Enable_dispatch();
47cde: 4eb9 0004 9f0c jsr 49f0c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
47ce4: 508f addql #8,%sp 47ce6: 4280 clrl %d0 47ce8: 60da bras 47cc4 <rtems_task_variable_delete+0x7c>
...
00047cec <rtems_task_variable_get>:
rtems_status_code rtems_task_variable_get(
rtems_id tid,
void **ptr,
void **result
)
{
47cec: 4e56 fffc linkw %fp,#-4 47cf0: 2f0a movel %a2,%sp@- 47cf2: 246e 0010 moveal %fp@(16),%a2 47cf6: 2f02 movel %d2,%sp@- 47cf8: 242e 000c movel %fp@(12),%d2
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp;
if ( !ptr )
47cfc: 6744 beqs 47d42 <rtems_task_variable_get+0x56>
return RTEMS_INVALID_ADDRESS;
if ( !result )
47cfe: 4a8a tstl %a2
47d00: 6740 beqs 47d42 <rtems_task_variable_get+0x56>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
47d02: 486e fffc pea %fp@(-4) 47d06: 2f2e 0008 movel %fp@(8),%sp@- 47d0a: 4eb9 0004 9f34 jsr 49f34 <_Thread_Get>
switch (location) {
47d10: 508f addql #8,%sp 47d12: 4aae fffc tstl %fp@(-4)
47d16: 6638 bnes 47d50 <rtems_task_variable_get+0x64>
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
47d18: 2240 moveal %d0,%a1 47d1a: 2069 010a moveal %a1@(266),%a0
while (tvp) {
47d1e: 4a88 tstl %a0
47d20: 670c beqs 47d2e <rtems_task_variable_get+0x42>
if (tvp->ptr == ptr) {
47d22: b4a8 0004 cmpl %a0@(4),%d2
47d26: 6736 beqs 47d5e <rtems_task_variable_get+0x72>
*/
*result = tvp->tval;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
47d28: 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) {
47d2a: 4a88 tstl %a0
47d2c: 66f4 bnes 47d22 <rtems_task_variable_get+0x36> <== ALWAYS TAKEN
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
47d2e: 4eb9 0004 9f0c jsr 49f0c <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47d34: 242e fff4 movel %fp@(-12),%d2
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
return RTEMS_INVALID_ADDRESS;
47d38: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47d3a: 246e fff8 moveal %fp@(-8),%a2 47d3e: 4e5e unlk %fp 47d40: 4e75 rts 47d42: 242e fff4 movel %fp@(-12),%d2
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
if ( !result )
return RTEMS_INVALID_ADDRESS;
47d46: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47d48: 246e fff8 moveal %fp@(-8),%a2 47d4c: 4e5e unlk %fp 47d4e: 4e75 rts 47d50: 242e fff4 movel %fp@(-12),%d2
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
47d54: 7004 moveq #4,%d0
}
47d56: 246e fff8 moveal %fp@(-8),%a2 47d5a: 4e5e unlk %fp 47d5c: 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;
47d5e: 24a8 000c movel %a0@(12),%a2@
_Thread_Enable_dispatch();
47d62: 4eb9 0004 9f0c jsr 49f0c <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47d68: 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;
47d6c: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47d6e: 246e fff8 moveal %fp@(-8),%a2 47d72: 4e5e unlk %fp
...
00045adc <rtems_termios_baud_to_index>:
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
45adc: 7209 moveq #9,%d1
#include <rtems/termiostypes.h>
int rtems_termios_baud_to_index(
rtems_termios_baud_t termios_baud
)
{
45ade: 4e56 0000 linkw %fp,#0 45ae2: 202e 0008 movel %fp@(8),%d0
int baud_index;
switch (termios_baud) {
45ae6: b280 cmpl %d0,%d1 45ae8: 6700 010a beqw 45bf4 <rtems_termios_baud_to_index+0x118>
45aec: 6c32 bges 45b20 <rtems_termios_baud_to_index+0x44>
45aee: 720e moveq #14,%d1 45af0: b280 cmpl %d0,%d1 45af2: 6700 00d6 beqw 45bca <rtems_termios_baud_to_index+0xee>
45af6: 6c56 bges 45b4e <rtems_termios_baud_to_index+0x72>
45af8: 0c80 0000 1002 cmpil #4098,%d0 45afe: 6700 00e2 beqw 45be2 <rtems_termios_baud_to_index+0x106> 45b02: 6f00 0098 blew 45b9c <rtems_termios_baud_to_index+0xc0> 45b06: 0c80 0000 1003 cmpil #4099,%d0 45b0c: 6700 00b6 beqw 45bc4 <rtems_termios_baud_to_index+0xe8> 45b10: 0c80 0000 1004 cmpil #4100,%d0 45b16: 6700 009a beqw 45bb2 <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;
45b1a: 70ff moveq #-1,%d0
}
return baud_index;
}
45b1c: 4e5e unlk %fp 45b1e: 4e75 rts
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
45b20: 123c 0004 moveb #4,%d1 45b24: b280 cmpl %d0,%d1 45b26: 6700 00d2 beqw 45bfa <rtems_termios_baud_to_index+0x11e>
45b2a: 6d46 blts 45b72 <rtems_termios_baud_to_index+0x96>
45b2c: 123c 0001 moveb #1,%d1 45b30: b280 cmpl %d0,%d1 45b32: 6700 00a2 beqw 45bd6 <rtems_termios_baud_to_index+0xfa> 45b36: 6c00 00c8 bgew 45c00 <rtems_termios_baud_to_index+0x124> 45b3a: 7202 moveq #2,%d1 45b3c: b280 cmpl %d0,%d1
45b3e: 677e beqs 45bbe <rtems_termios_baud_to_index+0xe2>
45b40: 123c 0003 moveb #3,%d1 45b44: b280 cmpl %d0,%d1
45b46: 66d2 bnes 45b1a <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;
45b48: 7003 moveq #3,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45b4a: 4e5e unlk %fp 45b4c: 4e75 rts
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
45b4e: 123c 000b moveb #11,%d1 45b52: b280 cmpl %d0,%d1 45b54: 6700 0086 beqw 45bdc <rtems_termios_baud_to_index+0x100>
45b58: 6e3c bgts 45b96 <rtems_termios_baud_to_index+0xba>
45b5a: 123c 000c moveb #12,%d1 45b5e: b280 cmpl %d0,%d1 45b60: 6700 008c beqw 45bee <rtems_termios_baud_to_index+0x112> 45b64: 123c 000d moveb #13,%d1 45b68: b280 cmpl %d0,%d1
45b6a: 66ae bnes 45b1a <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;
45b6c: 700d moveq #13,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45b6e: 4e5e unlk %fp 45b70: 4e75 rts
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
45b72: 7206 moveq #6,%d1 45b74: b280 cmpl %d0,%d1
45b76: 6758 beqs 45bd0 <rtems_termios_baud_to_index+0xf4> 45b78: 6e16 bgts 45b90 <rtems_termios_baud_to_index+0xb4>
45b7a: 123c 0007 moveb #7,%d1 45b7e: b280 cmpl %d0,%d1
45b80: 6766 beqs 45be8 <rtems_termios_baud_to_index+0x10c>
45b82: 123c 0008 moveb #8,%d1 45b86: b280 cmpl %d0,%d1
45b88: 6690 bnes 45b1a <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;
45b8a: 7008 moveq #8,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45b8c: 4e5e unlk %fp 45b8e: 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;
45b90: 7005 moveq #5,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45b92: 4e5e unlk %fp 45b94: 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;
45b96: 700a moveq #10,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45b98: 4e5e unlk %fp 45b9a: 4e75 rts
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
45b9c: 720f moveq #15,%d1 45b9e: b280 cmpl %d0,%d1
45ba0: 6716 beqs 45bb8 <rtems_termios_baud_to_index+0xdc>
45ba2: 0c80 0000 1001 cmpil #4097,%d0 45ba8: 6600 ff70 bnew 45b1a <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;
45bac: 7010 moveq #16,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45bae: 4e5e unlk %fp 45bb0: 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;
45bb2: 7013 moveq #19,%d0
default: baud_index = -1; break;
}
return baud_index;
}
45bb4: 4e5e unlk %fp 45bb6: 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;
45bb8: 700f moveq #15,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45bba: 4e5e unlk %fp 45bbc: 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;
45bbe: 7002 moveq #2,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45bc0: 4e5e unlk %fp 45bc2: 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;
45bc4: 7012 moveq #18,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45bc6: 4e5e unlk %fp 45bc8: 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;
45bca: 700e moveq #14,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45bcc: 4e5e unlk %fp 45bce: 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;
45bd0: 7006 moveq #6,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45bd2: 4e5e unlk %fp 45bd4: 4e75 rts
{
int baud_index;
switch (termios_baud) {
case B0: baud_index = 0; break;
case B50: baud_index = 1; break;
45bd6: 7001 moveq #1,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45bd8: 4e5e unlk %fp 45bda: 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;
45bdc: 700b moveq #11,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45bde: 4e5e unlk %fp 45be0: 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;
45be2: 7011 moveq #17,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45be4: 4e5e unlk %fp 45be6: 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;
45be8: 7007 moveq #7,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45bea: 4e5e unlk %fp 45bec: 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;
45bee: 700c moveq #12,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45bf0: 4e5e unlk %fp 45bf2: 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;
45bf4: 7009 moveq #9,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45bf6: 4e5e unlk %fp 45bf8: 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;
45bfa: 7004 moveq #4,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45bfc: 4e5e unlk %fp 45bfe: 4e75 rts
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
45c00: 4a80 tstl %d0 45c02: 6600 ff16 bnew 45b1a <rtems_termios_baud_to_index+0x3e>
case B0: baud_index = 0; break;
45c06: 4280 clrl %d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45c08: 4e5e unlk %fp <== NOT EXECUTED
00044768 <rtems_termios_close>:
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
44768: 4e56 fff4 linkw %fp,#-12 4476c: 48d7 1c00 moveml %a2-%a4,%sp@ 44770: 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(
44774: 49f9 0004 6acc lea 46acc <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;
4477a: 2053 moveal %a3@,%a0 4477c: 2468 0034 moveal %a0@(52),%a2
rtems_status_code sc;
sc = rtems_semaphore_obtain(
44780: 42a7 clrl %sp@- 44782: 42a7 clrl %sp@- 44784: 2f39 0006 0f38 movel 60f38 <rtems_termios_ttyMutex>,%sp@- 4478a: 4e94 jsr %a4@
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
4478c: 4fef 000c lea %sp@(12),%sp 44790: 4a80 tstl %d0 44792: 6600 011c bnew 448b0 <rtems_termios_close+0x148>
rtems_fatal_error_occurred (sc);
if (--tty->refcount == 0) {
44796: 202a 0008 movel %a2@(8),%d0 4479a: 5380 subql #1,%d0 4479c: 2540 0008 movel %d0,%a2@(8) 447a0: 6600 00a4 bnew 44846 <rtems_termios_close+0xde>
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
447a4: 202a 00cc movel %a2@(204),%d0 447a8: eb88 lsll #5,%d0 447aa: 0680 0006 0700 addil #395008,%d0 447b0: 2240 moveal %d0,%a1 447b2: 2051 moveal %a1@,%a0 447b4: 4a88 tstl %a0 447b6: 6700 0128 beqw 448e0 <rtems_termios_close+0x178>
/*
* call discipline-specific close
*/
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
447ba: 2f0a movel %a2,%sp@- 447bc: 4e90 jsr %a0@ 447be: 588f addql #4,%sp
}
drainOutput (tty);
rtems_semaphore_release (tty->osem);
}
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
447c0: 7002 moveq #2,%d0 447c2: b0aa 00b4 cmpl %a2@(180),%d0 447c6: 6700 00c0 beqw 44888 <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)
447ca: 206a 009c moveal %a2@(156),%a0 447ce: 4a88 tstl %a0
447d0: 6710 beqs 447e2 <rtems_termios_close+0x7a>
(*tty->device.lastClose)(tty->major, tty->minor, arg);
447d2: 2f0b movel %a3,%sp@- 447d4: 2f2a 0010 movel %a2@(16),%sp@- 447d8: 2f2a 000c movel %a2@(12),%sp@- 447dc: 4e90 jsr %a0@ 447de: 4fef 000c lea %sp@(12),%sp
if (tty->forw == NULL) {
447e2: 2052 moveal %a2@,%a0 447e4: 4a88 tstl %a0 447e6: 6700 00e2 beqw 448ca <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;
447ea: 216a 0004 0004 movel %a2@(4),%a0@(4) 447f0: 226a 0004 moveal %a2@(4),%a1
}
if (tty->back == NULL) {
447f4: 4a89 tstl %a1 447f6: 6700 00c0 beqw 448b8 <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;
447fa: 2288 movel %a0,%a1@ <== NOT EXECUTED
}
rtems_semaphore_delete (tty->isem);
447fc: 2f2a 0014 movel %a2@(20),%sp@- 44800: 47f9 0004 69f4 lea 469f4 <rtems_semaphore_delete>,%a3 44806: 4e93 jsr %a3@
rtems_semaphore_delete (tty->osem);
44808: 2f2a 0018 movel %a2@(24),%sp@- 4480c: 4e93 jsr %a3@
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
4480e: 2f2a 008c movel %a2@(140),%sp@- 44812: 4e93 jsr %a3@
if ((tty->device.pollRead == NULL) ||
44814: 4fef 000c lea %sp@(12),%sp 44818: 4aaa 00a0 tstl %a2@(160)
4481c: 6740 beqs 4485e <rtems_termios_close+0xf6>
4481e: 7002 moveq #2,%d0 44820: b0aa 00b4 cmpl %a2@(180),%d0
44824: 6738 beqs 4485e <rtems_termios_close+0xf6> <== NEVER TAKEN
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
rtems_semaphore_delete (tty->rawInBuf.Semaphore);
free (tty->rawInBuf.theBuf);
44826: 2f2a 0058 movel %a2@(88),%sp@- 4482a: 47f9 0004 32dc lea 432dc <free>,%a3 44830: 4e93 jsr %a3@
free (tty->rawOutBuf.theBuf);
44832: 2f2a 007c movel %a2@(124),%sp@- 44836: 4e93 jsr %a3@
free (tty->cbuf);
44838: 2f2a 001c movel %a2@(28),%sp@- 4483c: 4e93 jsr %a3@
free (tty);
4483e: 2f0a movel %a2,%sp@- 44840: 4e93 jsr %a3@ 44842: 4fef 0010 lea %sp@(16),%sp
} rtems_semaphore_release (rtems_termios_ttyMutex);
44846: 2f39 0006 0f38 movel 60f38 <rtems_termios_ttyMutex>,%sp@- 4484c: 4eb9 0004 6c1c jsr 46c1c <rtems_semaphore_release>
return RTEMS_SUCCESSFUL; }
44852: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4 44858: 4280 clrl %d0 4485a: 4e5e unlk %fp 4485c: 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);
4485e: 2f2a 0068 movel %a2@(104),%sp@- 44862: 4e93 jsr %a3@ 44864: 588f addql #4,%sp
free (tty->rawInBuf.theBuf);
44866: 47f9 0004 32dc lea 432dc <free>,%a3 4486c: 2f2a 0058 movel %a2@(88),%sp@- 44870: 4e93 jsr %a3@
free (tty->rawOutBuf.theBuf);
44872: 2f2a 007c movel %a2@(124),%sp@- 44876: 4e93 jsr %a3@
free (tty->cbuf);
44878: 2f2a 001c movel %a2@(28),%sp@- 4487c: 4e93 jsr %a3@
free (tty);
4487e: 2f0a movel %a2,%sp@- 44880: 4e93 jsr %a3@ 44882: 4fef 0010 lea %sp@(16),%sp 44886: 60be bras 44846 <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 );
44888: 4878 0001 pea 1 <ADD> 4488c: 49f9 0004 65c0 lea 465c0 <rtems_event_send>,%a4 44892: 2f2a 00c4 movel %a2@(196),%sp@- 44896: 4e94 jsr %a4@
if (sc != RTEMS_SUCCESSFUL)
44898: 508f addql #8,%sp 4489a: 4a80 tstl %d0
4489c: 6612 bnes 448b0 <rtems_termios_close+0x148> <== NEVER TAKEN
rtems_fatal_error_occurred (sc);
sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT );
4489e: 4878 0001 pea 1 <ADD> 448a2: 2f2a 00c8 movel %a2@(200),%sp@- 448a6: 4e94 jsr %a4@
if (sc != RTEMS_SUCCESSFUL)
448a8: 508f addql #8,%sp 448aa: 4a80 tstl %d0 448ac: 6700 ff1c beqw 447ca <rtems_termios_close+0x62>
rtems_fatal_error_occurred (sc);
448b0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 448b2: 4eb9 0004 724c jsr 4724c <rtems_fatal_error_occurred> <== NOT EXECUTED
} else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
rtems_termios_ttyHead = tty->forw;
448b8: 23c8 0006 0f40 movel %a0,60f40 <rtems_termios_ttyHead>
if ( rtems_termios_ttyHead != NULL ) {
448be: 6700 ff3c beqw 447fc <rtems_termios_close+0x94>
rtems_termios_ttyHead->back = NULL;
448c2: 42a8 0004 clrl %a0@(4) 448c6: 6000 ff34 braw 447fc <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;
448ca: 226a 0004 moveal %a2@(4),%a1 448ce: 23c9 0006 0f3c movel %a1,60f3c <rtems_termios_ttyTail>
if ( rtems_termios_ttyTail != NULL ) {
448d4: 67e2 beqs 448b8 <rtems_termios_close+0x150> <== ALWAYS TAKEN
rtems_termios_ttyTail->forw = NULL;
448d6: 4291 clrl %a1@ <== NOT EXECUTED 448d8: 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;
448da: 2288 movel %a0,%a1@ <== NOT EXECUTED 448dc: 6000 ff1e braw 447fc <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);
448e0: 42a7 clrl %sp@- 448e2: 42a7 clrl %sp@- 448e4: 2f2a 0018 movel %a2@(24),%sp@- 448e8: 4e94 jsr %a4@
if (sc != RTEMS_SUCCESSFUL) {
448ea: 4fef 000c lea %sp@(12),%sp 448ee: 4a80 tstl %d0
448f0: 66be bnes 448b0 <rtems_termios_close+0x148> <== NEVER TAKEN
drainOutput (struct rtems_termios_tty *tty)
{
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
448f2: 4aaa 00b4 tstl %a2@(180)
448f6: 661a bnes 44912 <rtems_termios_close+0x1aa>
sc = rtems_semaphore_obtain(tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
rtems_fatal_error_occurred (sc);
}
drainOutput (tty);
rtems_semaphore_release (tty->osem);
448f8: 2f2a 0018 movel %a2@(24),%sp@- 448fc: 4eb9 0004 6c1c jsr 46c1c <rtems_semaphore_release> 44902: 588f addql #4,%sp
}
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
44904: 7002 moveq #2,%d0 44906: b0aa 00b4 cmpl %a2@(180),%d0 4490a: 6600 febe bnew 447ca <rtems_termios_close+0x62> 4490e: 6000 ff78 braw 44888 <rtems_termios_close+0x120>
drainOutput (struct rtems_termios_tty *tty)
{
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
44912: 2f0a movel %a2,%sp@- 44914: 4eba f9ae jsr %pc@(442c4 <drainOutput.part.0>) 44918: 588f addql #4,%sp
sc = rtems_semaphore_obtain(tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
rtems_fatal_error_occurred (sc);
}
drainOutput (tty);
rtems_semaphore_release (tty->osem);
4491a: 2f2a 0018 movel %a2@(24),%sp@- 4491e: 4eb9 0004 6c1c jsr 46c1c <rtems_semaphore_release> 44924: 588f addql #4,%sp 44926: 60dc bras 44904 <rtems_termios_close+0x19c>
00045f66 <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)
{
45f66: 4e56 0000 linkw %fp,#0
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
45f6a: 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)
{
45f6e: 206e 0008 moveal %fp@(8),%a0
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
45f72: d1a8 0090 addl %d0,%a0@(144)
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
45f76: 7002 moveq #2,%d0 45f78: b0a8 00b4 cmpl %a0@(180),%d0
45f7c: 672a beqs 45fa8 <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 ) {
45f7e: 7005 moveq #5,%d0 45f80: b0a8 00cc cmpl %a0@(204),%d0
45f84: 670c beqs 45f92 <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);
45f86: 2d48 0008 movel %a0,%fp@(8)
}
45f8a: 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);
45f8c: 4ef9 0004 5cb2 jmp 45cb2 <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) {
45f92: 2279 0006 07b0 moveal 607b0 <rtems_termios_linesw+0xb4>,%a1 45f98: 4a89 tstl %a1
45f9a: 6706 beqs 45fa2 <rtems_termios_dequeue_characters+0x3c><== NEVER TAKEN
rtems_termios_linesw[tty->t_line].l_start(tty);
45f9c: 2f08 movel %a0,%sp@- 45f9e: 4e91 jsr %a1@ 45fa0: 588f addql #4,%sp
}
return 0; /* nothing to output in IRQ... */
}
return rtems_termios_refill_transmitter(tty);
}
45fa2: 4280 clrl %d0 45fa4: 4e5e unlk %fp 45fa6: 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);
45fa8: 4878 0002 pea 2 <DOUBLE_FLOAT> 45fac: 2f28 00c8 movel %a0@(200),%sp@- 45fb0: 4eb9 0004 65c0 jsr 465c0 <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
45fb6: 508f addql #8,%sp 45fb8: 4a80 tstl %d0
45fba: 67e6 beqs 45fa2 <rtems_termios_dequeue_characters+0x3c><== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
45fbc: 2f00 movel %d0,%sp@- <== NOT EXECUTED 45fbe: 4eb9 0004 724c jsr 4724c <rtems_fatal_error_occurred> <== NOT EXECUTED
0004595c <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, const char *buf, int len)
{
4595c: 4e56 ffcc linkw %fp,#-52 45960: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 45964: 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) {
45968: 202a 00cc movel %a2@(204),%d0 4596c: 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, const char *buf, int len)
{
4596e: 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) {
45972: 0680 0006 070c addil #395020,%d0 45978: 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, const char *buf, int len)
{
4597a: 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) {
4597e: 2051 moveal %a1@,%a0 45980: 4a88 tstl %a0
45982: 6774 beqs 459f8 <rtems_termios_enqueue_raw_characters+0x9c>
while (len--) {
45984: 4a82 tstl %d2
45986: 6734 beqs 459bc <rtems_termios_enqueue_raw_characters+0x60><== NEVER TAKEN
c = *buf++;
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
45988: 2f0a movel %a2,%sp@- 4598a: 5382 subql #1,%d2 4598c: 1c1b moveb %a3@+,%d6 4598e: 49c6 extbl %d6 45990: 2f06 movel %d6,%sp@- 45992: 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--) {
45994: 508f addql #8,%sp 45996: 4a82 tstl %d2
45998: 6722 beqs 459bc <rtems_termios_enqueue_raw_characters+0x60>
4599a: 202a 00cc movel %a2@(204),%d0
c = *buf++;
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
4599e: 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--) {
459a0: eb88 lsll #5,%d0 459a2: 0680 0006 070c addil #395020,%d0 459a8: 2240 moveal %d0,%a1 459aa: 2051 moveal %a1@,%a0
c = *buf++;
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
459ac: 2f0a movel %a2,%sp@- 459ae: 1c1b moveb %a3@+,%d6 459b0: 49c6 extbl %d6 459b2: 2f06 movel %d6,%sp@- 459b4: 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--) {
459b6: 508f addql #8,%sp 459b8: 4a82 tstl %d2
459ba: 66de bnes 4599a <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 )) {
459bc: 4aaa 00e4 tstl %a2@(228)
459c0: 6628 bnes 459ea <rtems_termios_enqueue_raw_characters+0x8e><== NEVER TAKEN
459c2: 206a 00dc moveal %a2@(220),%a0 459c6: 4a88 tstl %a0
459c8: 6720 beqs 459ea <rtems_termios_enqueue_raw_characters+0x8e>
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
459ca: 2f2a 00e0 movel %a2@(224),%sp@-
tty->tty_rcvwakeup = 1;
}
return 0;
459ce: 4284 clrl %d4
/*
* 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);
459d0: 486a 0030 pea %a2@(48) 459d4: 4e90 jsr %a0@
tty->tty_rcvwakeup = 1;
459d6: 508f addql #8,%sp 459d8: 7001 moveq #1,%d0 459da: 2540 00e4 movel %d0,%a2@(228)
}
tty->rawInBufDropped += dropped;
rtems_semaphore_release (tty->rawInBuf.Semaphore);
return dropped;
}
459de: 2004 movel %d4,%d0 459e0: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 459e6: 4e5e unlk %fp 459e8: 4e75 rts
*/
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;
459ea: 4284 clrl %d4
}
tty->rawInBufDropped += dropped;
rtems_semaphore_release (tty->rawInBuf.Semaphore);
return dropped;
}
459ec: 2004 movel %d4,%d0 459ee: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 459f4: 4e5e unlk %fp 459f6: 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,
459f8: 41ea 004a lea %a2@(74),%a0
* NOTE: This routine runs in the context of the * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, const char *buf, int len)
459fc: 2a0b movel %a3,%d5 459fe: da82 addl %d2,%d5 45a00: 4284 clrl %d4
}
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);
45a02: 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);
45a06: 4bea 0030 lea %a2@(48),%a5
* NOTE: This routine runs in the context of the * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, const char *buf, int len)
45a0a: 4201 clrb %d1
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,
45a0c: 2d48 fffc movel %a0,%fp@(-4)
* NOTE: This routine runs in the context of the * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, const char *buf, int len)
45a10: 1d41 fff7 moveb %d1,%fp@(-9)
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
45a14: ba8b cmpl %a3,%d5 45a16: 6700 00e8 beqw 45b00 <rtems_termios_enqueue_raw_characters+0x1a4>
c = *buf++;
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
45a1a: 202a 00b8 movel %a2@(184),%d0
}
return 0;
}
while (len--) {
c = *buf++;
45a1e: 161b moveb %a3@+,%d3
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
45a20: 0800 0009 btst #9,%d0
45a24: 671c beqs 45a42 <rtems_termios_enqueue_raw_characters+0xe6>
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
45a26: 4281 clrl %d1 45a28: 122a 004a moveb %a2@(74),%d1 45a2c: 1003 moveb %d3,%d0 45a2e: 49c0 extbl %d0 45a30: b280 cmpl %d0,%d1 45a32: 6700 014c beqw 45b80 <rtems_termios_enqueue_raw_characters+0x224>
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
}
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
45a36: 4281 clrl %d1 45a38: 122a 0049 moveb %a2@(73),%d1 45a3c: b280 cmpl %d0,%d1 45a3e: 6700 00dc beqw 45b1c <rtems_termios_enqueue_raw_characters+0x1c0>
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
flow_rcv = true;
}
}
if (flow_rcv) {
45a42: 4a2e fff7 tstb %fp@(-9) 45a46: 6600 00e6 bnew 45b2e <rtems_termios_enqueue_raw_characters+0x1d2>
}
/* reenable interrupts */
rtems_interrupt_enable(level);
}
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
45a4a: 2e2a 0060 movel %a2@(96),%d7 45a4e: 5287 addql #1,%d7
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
45a50: 200c movel %a4,%d0
}
/* reenable interrupts */
rtems_interrupt_enable(level);
}
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
45a52: 222a 0064 movel %a2@(100),%d1 45a56: 4c41 7002 remul %d1,%d2,%d7
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
45a5a: 40c7 movew %sr,%d7 45a5c: 8087 orl %d7,%d0 45a5e: 46c0 movew %d0,%sr
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
45a60: 222a 005c movel %a2@(92),%d1 45a64: 202a 0064 movel %a2@(100),%d0 45a68: 9081 subl %d1,%d0 45a6a: 2240 moveal %d0,%a1 45a6c: d3c2 addal %d2,%a1
% tty->rawInBuf.Size) > tty->highwater) &&
45a6e: 2209 movel %a1,%d1 45a70: 202a 0064 movel %a2@(100),%d0 45a74: 4c40 1006 remul %d0,%d6,%d1 45a78: 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)
45a7c: bcaa 00c0 cmpl %a2@(192),%d6
45a80: 633e blss 45ac0 <rtems_termios_enqueue_raw_characters+0x164><== ALWAYS TAKEN
% tty->rawInBuf.Size) > tty->highwater) &&
!(tty->flow_ctrl & FL_IREQXOF)) {
45a82: 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) &&
45a86: 0800 0000 btst #0,%d0 <== NOT EXECUTED 45a8a: 6634 bnes 45ac0 <rtems_termios_enqueue_raw_characters+0x164><== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
45a8c: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 45a90: 7201 moveq #1,%d1 <== NOT EXECUTED 45a92: 8081 orl %d1,%d0 <== NOT EXECUTED 45a94: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
45a98: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 45a9c: 0280 0000 0402 andil #1026,%d0 <== NOT EXECUTED 45aa2: 0c80 0000 0400 cmpil #1024,%d0 <== NOT EXECUTED 45aa8: 6700 0110 beqw 45bba <rtems_termios_enqueue_raw_characters+0x25e><== 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) ) {
45aac: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 45ab0: 0280 0000 0104 andil #260,%d0 <== NOT EXECUTED 45ab6: 0c80 0000 0100 cmpil #256,%d0 <== NOT EXECUTED 45abc: 6700 0134 beqw 45bf2 <rtems_termios_enqueue_raw_characters+0x296><== NOT EXECUTED
}
}
}
/* reenable interrupts */
rtems_interrupt_enable(level);
45ac0: 46c7 movew %d7,%sr
if (newTail == tty->rawInBuf.Head) {
45ac2: 202a 005c movel %a2@(92),%d0 45ac6: b480 cmpl %d0,%d2 45ac8: 6700 00d4 beqw 45b9e <rtems_termios_enqueue_raw_characters+0x242>
dropped++;
} else {
tty->rawInBuf.theBuf[newTail] = c;
45acc: 206a 0058 moveal %a2@(88),%a0 45ad0: 1183 2800 moveb %d3,%a0@(00000000,%d2:l)
tty->rawInBuf.Tail = newTail;
45ad4: 2542 0060 movel %d2,%a2@(96)
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
45ad8: 4aaa 00e4 tstl %a2@(228) 45adc: 6600 ff36 bnew 45a14 <rtems_termios_enqueue_raw_characters+0xb8> 45ae0: 206a 00dc moveal %a2@(220),%a0 45ae4: 4a88 tstl %a0 45ae6: 6700 ff2c beqw 45a14 <rtems_termios_enqueue_raw_characters+0xb8>
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
45aea: 2f2a 00e0 movel %a2@(224),%sp@- <== NOT EXECUTED 45aee: 2f0d movel %a5,%sp@- <== NOT EXECUTED 45af0: 4e90 jsr %a0@ <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
45af2: 508f addql #8,%sp <== NOT EXECUTED 45af4: 7201 moveq #1,%d1 <== NOT EXECUTED 45af6: 2541 00e4 movel %d1,%a2@(228) <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
45afa: ba8b cmpl %a3,%d5 <== NOT EXECUTED 45afc: 6600 ff1c bnew 45a1a <rtems_termios_enqueue_raw_characters+0xbe><== NOT EXECUTED
}
}
}
tty->rawInBufDropped += dropped;
rtems_semaphore_release (tty->rawInBuf.Semaphore);
45b00: 2f2a 0068 movel %a2@(104),%sp@-
}
}
}
}
tty->rawInBufDropped += dropped;
45b04: d9aa 0078 addl %d4,%a2@(120)
rtems_semaphore_release (tty->rawInBuf.Semaphore);
45b08: 4eb9 0004 6c1c jsr 46c1c <rtems_semaphore_release>
return dropped;
45b0e: 588f addql #4,%sp
}
45b10: 2004 movel %d4,%d0 45b12: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 45b18: 4e5e unlk %fp 45b1a: 4e75 rts
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
45b1c: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 45b20: 72ef moveq #-17,%d1 <== NOT EXECUTED 45b22: 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, const char *buf, int len)
{
45b24: 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;
45b26: 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, const char *buf, int len)
{
45b2a: 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) {
45b2e: 202a 00b8 movel %a2@(184),%d0 45b32: 7c30 moveq #48,%d6 45b34: 7220 moveq #32,%d1 45b36: c086 andl %d6,%d0 45b38: b280 cmpl %d0,%d1 45b3a: 6600 fed8 bnew 45a14 <rtems_termios_enqueue_raw_characters+0xb8>
/* disable interrupts */
rtems_interrupt_disable(level);
45b3e: 200c movel %a4,%d0 <== NOT EXECUTED 45b40: 40c2 movew %sr,%d2 <== NOT EXECUTED 45b42: 8082 orl %d2,%d0 <== NOT EXECUTED 45b44: 46c0 movew %d0,%sr <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
45b46: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 45b4a: 7cdf moveq #-33,%d6 <== NOT EXECUTED 45b4c: c086 andl %d6,%d0 <== NOT EXECUTED 45b4e: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
45b52: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 45b56: 6606 bnes 45b5e <rtems_termios_enqueue_raw_characters+0x202><== 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);
45b58: 46c2 movew %d2,%sr <== NOT EXECUTED 45b5a: 6000 feb8 braw 45a14 <rtems_termios_enqueue_raw_characters+0xb8><== 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)(
45b5e: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
45b62: 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)(
45b66: d0aa 007c addl %a2@(124),%d0 <== NOT EXECUTED 45b6a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 45b6c: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 45b70: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 45b74: 4e90 jsr %a0@ <== NOT EXECUTED 45b76: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
}
/* reenable interrupts */
rtems_interrupt_enable(level);
45b7a: 46c2 movew %d2,%sr <== NOT EXECUTED 45b7c: 6000 fe96 braw 45a14 <rtems_termios_enqueue_raw_characters+0xb8><== 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]) {
45b80: 4281 clrl %d1 45b82: 122a 0049 moveb %a2@(73),%d1 45b86: b280 cmpl %d0,%d1
45b88: 671a beqs 45ba4 <rtems_termios_enqueue_raw_characters+0x248><== NEVER TAKEN
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
45b8a: 202a 00b8 movel %a2@(184),%d0 45b8e: 7c10 moveq #16,%d6 45b90: 8086 orl %d6,%d0
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, const char *buf, int len)
{
45b92: 7c01 moveq #1,%d6
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
45b94: 2540 00b8 movel %d0,%a2@(184)
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, const char *buf, int len)
{
45b98: 1d46 fff7 moveb %d6,%fp@(-9) 45b9c: 6090 bras 45b2e <rtems_termios_enqueue_raw_characters+0x1d2>
/* reenable interrupts */
rtems_interrupt_enable(level);
if (newTail == tty->rawInBuf.Head) {
dropped++;
45b9e: 5284 addql #1,%d4 <== NOT EXECUTED 45ba0: 6000 fe72 braw 45a14 <rtems_termios_enqueue_raw_characters+0xb8><== 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;
45ba4: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 45ba8: 7210 moveq #16,%d1 <== NOT EXECUTED 45baa: 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, const char *buf, int len)
{
45bac: 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;
45bae: 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, const char *buf, int len)
{
45bb2: 1d46 fff7 moveb %d6,%fp@(-9) <== NOT EXECUTED 45bb6: 6000 ff76 braw 45b2e <rtems_termios_enqueue_raw_characters+0x1d2><== 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) ||
45bba: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 45bbe: 0800 0005 btst #5,%d0 <== NOT EXECUTED 45bc2: 6608 bnes 45bcc <rtems_termios_enqueue_raw_characters+0x270><== NOT EXECUTED 45bc4: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 45bc8: 6600 fef6 bnew 45ac0 <rtems_termios_enqueue_raw_characters+0x164><== 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,
45bcc: 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;
45bd0: 7c02 moveq #2,%d6 <== NOT EXECUTED 45bd2: 222a 00b8 movel %a2@(184),%d1 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
45bd6: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 45bda: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 45bde: 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;
45be2: 8286 orl %d6,%d1 <== NOT EXECUTED 45be4: 2541 00b8 movel %d1,%a2@(184) <== NOT EXECUTED
(*tty->device.write)(tty->minor,
45be8: 4e90 jsr %a0@ <== NOT EXECUTED 45bea: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 45bee: 6000 fed0 braw 45ac0 <rtems_termios_enqueue_raw_characters+0x164><== 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;
45bf2: 222a 00b8 movel %a2@(184),%d1 <== NOT EXECUTED 45bf6: 303c 0004 movew #4,%d0 <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
45bfa: 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;
45bfe: 8280 orl %d0,%d1 <== NOT EXECUTED 45c00: 2541 00b8 movel %d1,%a2@(184) <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
45c04: 4a88 tstl %a0 <== NOT EXECUTED 45c06: 6700 feb8 beqw 45ac0 <rtems_termios_enqueue_raw_characters+0x164><== NOT EXECUTED
tty->device.stopRemoteTx(tty->minor);
45c0a: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 45c0e: 4e90 jsr %a0@ <== NOT EXECUTED 45c10: 588f addql #4,%sp <== NOT EXECUTED 45c12: 6000 feac braw 45ac0 <rtems_termios_enqueue_raw_characters+0x164><== NOT EXECUTED
00044950 <rtems_termios_ioctl>:
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
44950: 4e56 ffec linkw %fp,#-20 44954: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 44958: 266e 0008 moveal %fp@(8),%a3
rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1;
4495c: 2053 moveal %a3@,%a0 4495e: 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);
44962: 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;
44964: 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);
44968: 42a7 clrl %sp@- 4496a: 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;
4496e: 42ab 000c clrl %a3@(12)
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
44972: 4eb9 0004 6acc jsr 46acc <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
44978: 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);
4497c: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL) {
4497e: 662c bnes 449ac <rtems_termios_ioctl+0x5c> <== NEVER TAKEN
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
44980: 202b 0004 movel %a3@(4),%d0 44984: 7204 moveq #4,%d1 44986: b280 cmpl %d0,%d1
44988: 6774 beqs 449fe <rtems_termios_ioctl+0xae> 4498a: 6530 bcss 449bc <rtems_termios_ioctl+0x6c>
4498c: 7602 moveq #2,%d3 4498e: b680 cmpl %d0,%d3 44990: 6700 00b6 beqw 44a48 <rtems_termios_ioctl+0xf8> 44994: 6400 0228 bccw 44bbe <rtems_termios_ioctl+0x26e>
drainOutput (struct rtems_termios_tty *tty)
{
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
44998: 4aaa 00b4 tstl %a2@(180) 4499c: 6600 02f4 bnew 44c92 <rtems_termios_ioctl+0x342>
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
}
break;
}
rtems_semaphore_release (tty->osem);
449a0: 2f2a 0018 movel %a2@(24),%sp@- 449a4: 4eb9 0004 6c1c jsr 46c1c <rtems_semaphore_release>
args->ioctl_return = sc; return sc;
449aa: 588f addql #4,%sp
}
449ac: 2002 movel %d2,%d0
}
break;
}
rtems_semaphore_release (tty->osem);
args->ioctl_return = sc;
449ae: 2742 000c movel %d2,%a3@(12)
return sc; }
449b2: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 449b8: 4e5e unlk %fp 449ba: 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) {
449bc: 0c80 4004 667f cmpil #1074030207,%d0
449c2: 6756 beqs 44a1a <rtems_termios_ioctl+0xca> <== NEVER TAKEN
449c4: 6200 023a bhiw 44c00 <rtems_termios_ioctl+0x2b0> 449c8: 7605 moveq #5,%d3 449ca: b680 cmpl %d0,%d3 449cc: 6700 01d2 beqw 44ba0 <rtems_termios_ioctl+0x250>
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
449d0: 202a 00cc movel %a2@(204),%d0 449d4: eb88 lsll #5,%d0 449d6: 0680 0006 0714 addil #395028,%d0 449dc: 2240 moveal %d0,%a1 449de: 2051 moveal %a1@,%a0 449e0: 4a88 tstl %a0 449e2: 6700 029c beqw 44c80 <rtems_termios_ioctl+0x330>
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
449e6: 2f0b movel %a3,%sp@- 449e8: 2f0a movel %a2,%sp@- 449ea: 4e90 jsr %a0@ 449ec: 508f addql #8,%sp 449ee: 2400 movel %d0,%d2
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
}
break;
}
rtems_semaphore_release (tty->osem);
449f0: 2f2a 0018 movel %a2@(24),%sp@- 449f4: 4eb9 0004 6c1c jsr 46c1c <rtems_semaphore_release>
args->ioctl_return = sc; return sc;
449fa: 588f addql #4,%sp 449fc: 60ae bras 449ac <rtems_termios_ioctl+0x5c>
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
break;
case RTEMS_IO_RCVWAKEUP:
tty->tty_rcv = *wakeup;
449fe: 2014 movel %a4@,%d0 44a00: 222c 0004 movel %a4@(4),%d1 44a04: 2540 00dc movel %d0,%a2@(220) 44a08: 2541 00e0 movel %d1,%a2@(224)
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
}
break;
}
rtems_semaphore_release (tty->osem);
44a0c: 2f2a 0018 movel %a2@(24),%sp@- 44a10: 4eb9 0004 6c1c jsr 46c1c <rtems_semaphore_release>
args->ioctl_return = sc; return sc;
44a16: 588f addql #4,%sp 44a18: 6092 bras 449ac <rtems_termios_ioctl+0x5c>
case TIOCGETD:
*(int*)(args->buffer)=tty->t_line;
break;
#endif
case FIONREAD: {
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
44a1a: 202a 0060 movel %a2@(96),%d0 <== NOT EXECUTED 44a1e: 222a 005c movel %a2@(92),%d1 <== NOT EXECUTED 44a22: 9081 subl %d1,%d0 <== NOT EXECUTED
if ( rawnc < 0 )
44a24: 6b00 02c6 bmiw 44cec <rtems_termios_ioctl+0x39c> <== NOT EXECUTED
rawnc += tty->rawInBuf.Size;
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
44a28: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 44a2c: 92aa 0024 subl %a2@(36),%d1 <== NOT EXECUTED 44a30: d280 addl %d0,%d1 <== NOT EXECUTED 44a32: 206b 0008 moveal %a3@(8),%a0 <== NOT EXECUTED 44a36: 2081 movel %d1,%a0@ <== NOT EXECUTED
}
break;
}
rtems_semaphore_release (tty->osem);
44a38: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 44a3c: 4eb9 0004 6c1c jsr 46c1c <rtems_semaphore_release> <== NOT EXECUTED
args->ioctl_return = sc; return sc;
44a42: 588f addql #4,%sp <== NOT EXECUTED 44a44: 6000 ff66 braw 449ac <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;
44a48: 206b 0008 moveal %a3@(8),%a0 44a4c: 49ea 0030 lea %a2@(48),%a4 44a50: 2898 movel %a0@+,%a4@ 44a52: 2558 0034 movel %a0@+,%a2@(52) 44a56: 2558 0038 movel %a0@+,%a2@(56) 44a5a: 2558 003c movel %a0@+,%a2@(60) 44a5e: 2558 0040 movel %a0@+,%a2@(64) 44a62: 2558 0044 movel %a0@+,%a2@(68) 44a66: 2558 0048 movel %a0@+,%a2@(72) 44a6a: 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) &&
44a6e: 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;
44a72: 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) &&
44a76: 0800 0009 btst #9,%d0
44a7a: 6746 beqs 44ac2 <rtems_termios_ioctl+0x172>
!(tty->termios.c_iflag & IXON)) {
44a7c: 202a 0030 movel %a2@(48),%d0 44a80: 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) &&
44a86: 663a bnes 44ac2 <rtems_termios_ioctl+0x172>
!(tty->termios.c_iflag & IXON)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF);
44a88: 202a 00b8 movel %a2@(184),%d0 44a8c: 0280 ffff fdef andil #-529,%d0 44a92: 2540 00b8 movel %d0,%a2@(184)
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
44a96: 202a 00b8 movel %a2@(184),%d0 44a9a: 0800 0005 btst #5,%d0
44a9e: 6722 beqs 44ac2 <rtems_termios_ioctl+0x172> <== ALWAYS TAKEN
/* disable interrupts */
rtems_interrupt_disable(level);
44aa0: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED 44aa6: 40c3 movew %sr,%d3 <== NOT EXECUTED 44aa8: 8083 orl %d3,%d0 <== NOT EXECUTED 44aaa: 46c0 movew %d0,%sr <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
44aac: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44ab0: 72df moveq #-33,%d1 <== NOT EXECUTED 44ab2: c081 andl %d1,%d0 <== NOT EXECUTED 44ab4: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
44ab8: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 44abc: 6600 0264 bnew 44d22 <rtems_termios_ioctl+0x3d2> <== 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);
44ac0: 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)) {
44ac2: 202a 00b8 movel %a2@(184),%d0 44ac6: 0800 000a btst #10,%d0
44aca: 6724 beqs 44af0 <rtems_termios_ioctl+0x1a0>
44acc: 202a 0030 movel %a2@(48),%d0 44ad0: 0280 0000 1000 andil #4096,%d0
44ad6: 6618 bnes 44af0 <rtems_termios_ioctl+0x1a0> <== NEVER TAKEN
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXOF);
44ad8: 202a 00b8 movel %a2@(184),%d0
/* FIXME: what happens, if we had sent XOFF but not yet XON? */
tty->flow_ctrl &= ~(FL_ISNTXOF);
44adc: 76fd moveq #-3,%d3
}
}
/* 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);
44ade: 0880 000a bclr #10,%d0 44ae2: 2540 00b8 movel %d0,%a2@(184)
/* FIXME: what happens, if we had sent XOFF but not yet XON? */
tty->flow_ctrl &= ~(FL_ISNTXOF);
44ae6: 202a 00b8 movel %a2@(184),%d0 44aea: c083 andl %d3,%d0 44aec: 2540 00b8 movel %d0,%a2@(184)
}
/* check for incoming RTS/CTS flow control switched off */
if (( tty->flow_ctrl & FL_MDRTS) && !(tty->termios.c_cflag & CRTSCTS)) {
44af0: 202a 00b8 movel %a2@(184),%d0 44af4: 222a 0038 movel %a2@(56),%d1 44af8: 0800 0008 btst #8,%d0
44afc: 673a beqs 44b38 <rtems_termios_ioctl+0x1e8> <== ALWAYS TAKEN
44afe: 4a81 tstl %d1 <== NOT EXECUTED 44b00: 6d00 0204 bltw 44d06 <rtems_termios_ioctl+0x3b6> <== NOT EXECUTED
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDRTS);
44b04: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44b08: 0880 0008 bclr #8,%d0 <== NOT EXECUTED 44b0c: 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)) {
44b10: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44b14: 44c0 movew %d0,%ccr <== NOT EXECUTED 44b16: 6614 bnes 44b2c <rtems_termios_ioctl+0x1dc> <== NOT EXECUTED 44b18: 206a 00b0 moveal %a2@(176),%a0 <== NOT EXECUTED 44b1c: 4a88 tstl %a0 <== NOT EXECUTED 44b1e: 670c beqs 44b2c <rtems_termios_ioctl+0x1dc> <== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
44b20: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 44b24: 4e90 jsr %a0@ <== NOT EXECUTED 44b26: 222a 0038 movel %a2@(56),%d1 <== NOT EXECUTED 44b2a: 588f addql #4,%sp <== NOT EXECUTED
}
tty->flow_ctrl &= ~(FL_IRTSOFF);
44b2c: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44b30: 76fb moveq #-5,%d3 <== NOT EXECUTED 44b32: c083 andl %d3,%d0 <== NOT EXECUTED 44b34: 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) {
44b38: 4a81 tstl %d1 44b3a: 6d00 01ca bltw 44d06 <rtems_termios_ioctl+0x3b6>
tty->flow_ctrl |= FL_MDRTS;
}
/* check for incoming XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXOFF) {
44b3e: 202a 0030 movel %a2@(48),%d0 44b42: 0800 000c btst #12,%d0
44b46: 670c beqs 44b54 <rtems_termios_ioctl+0x204>
tty->flow_ctrl |= FL_MDXOF;
44b48: 222a 00b8 movel %a2@(184),%d1 44b4c: 08c1 000a bset #10,%d1 44b50: 2541 00b8 movel %d1,%a2@(184)
}
/* check for outgoing XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXON) {
44b54: 0800 000a btst #10,%d0
44b58: 670c beqs 44b66 <rtems_termios_ioctl+0x216>
tty->flow_ctrl |= FL_MDXON;
44b5a: 202a 00b8 movel %a2@(184),%d0 44b5e: 08c0 0009 bset #9,%d0 44b62: 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) {
44b66: 7002 moveq #2,%d0 44b68: c0aa 003c andl %a2@(60),%d0 44b6c: 6700 013c beqw 44caa <rtems_termios_ioctl+0x35a>
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
} else {
if (tty->termios.c_cc[VMIN]) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
44b70: 42aa 006c clrl %a2@(108)
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
44b74: 42aa 0070 clrl %a2@(112)
} else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
}
}
}
if (tty->device.setAttributes)
44b78: 206a 00a8 moveal %a2@(168),%a0
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
} else {
if (tty->termios.c_cc[VMIN]) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
44b7c: 42aa 0074 clrl %a2@(116)
} else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
}
}
}
if (tty->device.setAttributes)
44b80: 4a88 tstl %a0 44b82: 6700 fe1c beqw 449a0 <rtems_termios_ioctl+0x50>
(*tty->device.setAttributes)(tty->minor, &tty->termios);
44b86: 2f0c movel %a4,%sp@- 44b88: 2f2a 0010 movel %a2@(16),%sp@- 44b8c: 4e90 jsr %a0@ 44b8e: 508f addql #8,%sp
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
}
break;
}
rtems_semaphore_release (tty->osem);
44b90: 2f2a 0018 movel %a2@(24),%sp@- 44b94: 4eb9 0004 6c1c jsr 46c1c <rtems_semaphore_release>
args->ioctl_return = sc; return sc;
44b9a: 588f addql #4,%sp 44b9c: 6000 fe0e braw 449ac <rtems_termios_ioctl+0x5c>
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
break;
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
44ba0: 2014 movel %a4@,%d0 44ba2: 222c 0004 movel %a4@(4),%d1 44ba6: 2540 00d4 movel %d0,%a2@(212) 44baa: 2541 00d8 movel %d1,%a2@(216)
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
}
break;
}
rtems_semaphore_release (tty->osem);
44bae: 2f2a 0018 movel %a2@(24),%sp@- 44bb2: 4eb9 0004 6c1c jsr 46c1c <rtems_semaphore_release>
args->ioctl_return = sc; return sc;
44bb8: 588f addql #4,%sp 44bba: 6000 fdf0 braw 449ac <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) {
44bbe: 123c 0001 moveb #1,%d1 44bc2: b280 cmpl %d0,%d1 44bc4: 6600 fe0a bnew 449d0 <rtems_termios_ioctl+0x80>
sc = RTEMS_INVALID_NUMBER;
}
break;
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
44bc8: 206b 0008 moveal %a3@(8),%a0 44bcc: 20ea 0030 movel %a2@(48),%a0@+ 44bd0: 20ea 0034 movel %a2@(52),%a0@+ 44bd4: 20ea 0038 movel %a2@(56),%a0@+ 44bd8: 20ea 003c movel %a2@(60),%a0@+ 44bdc: 20ea 0040 movel %a2@(64),%a0@+ 44be0: 20ea 0044 movel %a2@(68),%a0@+ 44be4: 20ea 0048 movel %a2@(72),%a0@+ 44be8: 20ea 004c movel %a2@(76),%a0@+ 44bec: 20aa 0050 movel %a2@(80),%a0@
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
}
break;
}
rtems_semaphore_release (tty->osem);
44bf0: 2f2a 0018 movel %a2@(24),%sp@- 44bf4: 4eb9 0004 6c1c jsr 46c1c <rtems_semaphore_release>
args->ioctl_return = sc; return sc;
44bfa: 588f addql #4,%sp 44bfc: 6000 fdae braw 449ac <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) {
44c00: 0c80 4004 741a cmpil #1074033690,%d0
44c06: 6760 beqs 44c68 <rtems_termios_ioctl+0x318> <== NEVER TAKEN
44c08: 0c80 8004 741b cmpil #-2147191781,%d0 44c0e: 6600 fdc0 bnew 449d0 <rtems_termios_ioctl+0x80>
#if 1 /* FIXME */
case TIOCSETD:
/*
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
44c12: 202a 00cc movel %a2@(204),%d0 44c16: eb88 lsll #5,%d0 44c18: 0680 0006 0700 addil #395008,%d0 44c1e: 2240 moveal %d0,%a1 44c20: 2051 moveal %a1@,%a0 44c22: 4a88 tstl %a0
44c24: 6708 beqs 44c2e <rtems_termios_ioctl+0x2de>
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
44c26: 2f0a movel %a2,%sp@- 44c28: 4e90 jsr %a0@ 44c2a: 588f addql #4,%sp 44c2c: 2400 movel %d0,%d2
}
tty->t_line=*(int*)(args->buffer);
44c2e: 206b 0008 moveal %a3@(8),%a0 44c32: 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) {
44c34: 2200 movel %d0,%d1 44c36: 41f9 0006 06fc lea 606fc <rtems_termios_linesw>,%a0 44c3c: 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);
44c3e: 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) {
44c42: 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 */
44c46: 42aa 00d0 clrl %a2@(208)
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
44c4a: 4a88 tstl %a0 44c4c: 6700 fd52 beqw 449a0 <rtems_termios_ioctl+0x50>
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
44c50: 2f0a movel %a2,%sp@- 44c52: 4e90 jsr %a0@ 44c54: 588f addql #4,%sp 44c56: 2400 movel %d0,%d2
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
}
break;
}
rtems_semaphore_release (tty->osem);
44c58: 2f2a 0018 movel %a2@(24),%sp@- 44c5c: 4eb9 0004 6c1c jsr 46c1c <rtems_semaphore_release>
args->ioctl_return = sc; return sc;
44c62: 588f addql #4,%sp 44c64: 6000 fd46 braw 449ac <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;
44c68: 206b 0008 moveal %a3@(8),%a0 44c6c: 20aa 00cc movel %a2@(204),%a0@
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
}
break;
}
rtems_semaphore_release (tty->osem);
44c70: 2f2a 0018 movel %a2@(24),%sp@- 44c74: 4eb9 0004 6c1c jsr 46c1c <rtems_semaphore_release>
args->ioctl_return = sc; return sc;
44c7a: 588f addql #4,%sp 44c7c: 6000 fd2e braw 449ac <rtems_termios_ioctl+0x5c>
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
}
break;
}
rtems_semaphore_release (tty->osem);
44c80: 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;
44c84: 740a moveq #10,%d2 <== NOT EXECUTED
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
}
break;
}
rtems_semaphore_release (tty->osem);
44c86: 4eb9 0004 6c1c jsr 46c1c <rtems_semaphore_release> <== NOT EXECUTED
args->ioctl_return = sc; return sc;
44c8c: 588f addql #4,%sp <== NOT EXECUTED 44c8e: 6000 fd1c braw 449ac <rtems_termios_ioctl+0x5c> <== NOT EXECUTED
drainOutput (struct rtems_termios_tty *tty)
{
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
44c92: 2f0a movel %a2,%sp@- 44c94: 4eba f62e jsr %pc@(442c4 <drainOutput.part.0>) 44c98: 588f addql #4,%sp
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
}
break;
}
rtems_semaphore_release (tty->osem);
44c9a: 2f2a 0018 movel %a2@(24),%sp@- 44c9e: 4eb9 0004 6c1c jsr 46c1c <rtems_semaphore_release>
args->ioctl_return = sc; return sc;
44ca4: 588f addql #4,%sp 44ca6: 6000 fd04 braw 449ac <rtems_termios_ioctl+0x5c>
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] *
44caa: 4283 clrl %d3 44cac: 162a 0046 moveb %a2@(70),%d3
rtems_clock_get_ticks_per_second() / 10;
44cb0: 4eb9 0004 6394 jsr 46394 <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] *
44cb6: 4c03 0800 mulsl %d3,%d0
rtems_clock_get_ticks_per_second() / 10;
44cba: 760a moveq #10,%d3 44cbc: 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] *
44cc0: 2540 0054 movel %d0,%a2@(84)
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
44cc4: 4a2a 0046 tstb %a2@(70)
44cc8: 677a beqs 44d44 <rtems_termios_ioctl+0x3f4>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
44cca: 42aa 006c clrl %a2@(108)
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
44cce: 2540 0070 movel %d0,%a2@(112)
if (tty->termios.c_cc[VMIN])
44cd2: 4a2a 0047 tstb %a2@(71) 44cd6: 6600 fea0 bnew 44b78 <rtems_termios_ioctl+0x228>
} else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
}
}
}
if (tty->device.setAttributes)
44cda: 206a 00a8 moveal %a2@(168),%a0
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
if (tty->termios.c_cc[VMIN])
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
44cde: 2540 0074 movel %d0,%a2@(116)
} else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
}
}
}
if (tty->device.setAttributes)
44ce2: 4a88 tstl %a0 44ce4: 6600 fea0 bnew 44b86 <rtems_termios_ioctl+0x236>
44ce8: 6000 fcb6 braw 449a0 <rtems_termios_ioctl+0x50> <== NOT EXECUTED
break;
#endif
case FIONREAD: {
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
if ( rawnc < 0 )
rawnc += tty->rawInBuf.Size;
44cec: 222a 0064 movel %a2@(100),%d1 <== NOT EXECUTED 44cf0: d081 addl %d1,%d0 <== NOT EXECUTED
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
44cf2: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 44cf6: 92aa 0024 subl %a2@(36),%d1 <== NOT EXECUTED 44cfa: d280 addl %d0,%d1 <== NOT EXECUTED 44cfc: 206b 0008 moveal %a3@(8),%a0 <== NOT EXECUTED 44d00: 2081 movel %d1,%a0@ <== NOT EXECUTED 44d02: 6000 fd34 braw 44a38 <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;
44d06: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44d0a: 08c0 0008 bset #8,%d0 <== NOT EXECUTED 44d0e: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
}
/* check for incoming XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXOFF) {
44d12: 202a 0030 movel %a2@(48),%d0 <== NOT EXECUTED 44d16: 0800 000c btst #12,%d0 <== NOT EXECUTED 44d1a: 6700 fe38 beqw 44b54 <rtems_termios_ioctl+0x204> <== NOT EXECUTED 44d1e: 6000 fe28 braw 44b48 <rtems_termios_ioctl+0x1f8> <== 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);
44d22: 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)(
44d26: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 44d2a: d0aa 007c addl %a2@(124),%d0 <== NOT EXECUTED 44d2e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44d30: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 44d34: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 44d38: 4e90 jsr %a0@ <== NOT EXECUTED 44d3a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
}
/* reenable interrupts */
rtems_interrupt_enable(level);
44d3e: 46c3 movew %d3,%sr <== NOT EXECUTED 44d40: 6000 fd80 braw 44ac2 <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]) {
44d44: 4a2a 0047 tstb %a2@(71) 44d48: 6600 fe26 bnew 44b70 <rtems_termios_ioctl+0x220>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
44d4c: 7001 moveq #1,%d0
}
}
}
if (tty->device.setAttributes)
44d4e: 206a 00a8 moveal %a2@(168),%a0
if (tty->termios.c_cc[VMIN]) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
44d52: 2540 006c movel %d0,%a2@(108)
}
}
}
if (tty->device.setAttributes)
44d56: 4a88 tstl %a0 44d58: 6600 fe2c bnew 44b86 <rtems_termios_ioctl+0x236>
44d5c: 6000 fc42 braw 449a0 <rtems_termios_ioctl+0x50> <== NOT EXECUTED
00044332 <rtems_termios_open>:
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
44332: 4e56 ffdc linkw %fp,#-36 44336: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
4433a: 42a7 clrl %sp@-
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
4433c: 242e 0008 movel %fp@(8),%d2
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
44340: 42a7 clrl %sp@- 44342: 2f39 0006 0f38 movel 60f38 <rtems_termios_ttyMutex>,%sp@-
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
44348: 262e 000c movel %fp@(12),%d3 4434c: 266e 0010 moveal %fp@(16),%a3
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
44350: 4eb9 0004 6acc jsr 46acc <rtems_semaphore_obtain>
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
44356: 4fef 000c lea %sp@(12),%sp
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
4435a: 2800 movel %d0,%d4
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
4435c: 6600 0276 bnew 445d4 <rtems_termios_open+0x2a2>
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
44360: 2879 0006 0f40 moveal 60f40 <rtems_termios_ttyHead>,%a4 44366: 4a8c tstl %a4
44368: 6710 beqs 4437a <rtems_termios_open+0x48>
4436a: 244c moveal %a4,%a2
if ((tty->major == major) && (tty->minor == minor))
4436c: b4aa 000c cmpl %a2@(12),%d2 44370: 6700 026e beqw 445e0 <rtems_termios_open+0x2ae>
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) {
44374: 2452 moveal %a2@,%a2 44376: 4a8a tstl %a2
44378: 66f2 bnes 4436c <rtems_termios_open+0x3a> <== NEVER TAKEN
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
4437a: 4878 00e8 pea e8 <DBL_MANT_DIG+0xb3> 4437e: 4878 0001 pea 1 <ADD> 44382: 4eb9 0004 2ec8 jsr 42ec8 <calloc>
if (tty == NULL) {
44388: 508f addql #8,%sp
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
4438a: 2440 moveal %d0,%a2
if (tty == NULL) {
4438c: 4a80 tstl %d0 4438e: 6700 033c beqw 446cc <rtems_termios_open+0x39a>
return RTEMS_NO_MEMORY;
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
44392: 41f9 0005 f8c0 lea 5f8c0 <rtems_termios_raw_input_size>,%a0
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
44398: 4bf9 0004 360c lea 4360c <malloc>,%a5
return RTEMS_NO_MEMORY;
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
4439e: 2550 0064 movel %a0@,%a2@(100)
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
443a2: 202a 0064 movel %a2@(100),%d0 443a6: 2f00 movel %d0,%sp@- 443a8: 4e95 jsr %a5@
if (tty->rawInBuf.theBuf == NULL) {
443aa: 588f addql #4,%sp
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
443ac: 2a00 movel %d0,%d5 443ae: 2540 0058 movel %d0,%a2@(88)
if (tty->rawInBuf.theBuf == NULL) {
443b2: 6700 0334 beqw 446e8 <rtems_termios_open+0x3b6>
return RTEMS_NO_MEMORY;
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
443b6: 41f9 0005 f8c4 lea 5f8c4 <rtems_termios_raw_output_size>,%a0 443bc: 2550 0088 movel %a0@,%a2@(136)
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
443c0: 202a 0088 movel %a2@(136),%d0 443c4: 2f00 movel %d0,%sp@- 443c6: 4e95 jsr %a5@
if (tty->rawOutBuf.theBuf == NULL) {
443c8: 588f addql #4,%sp
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
443ca: 2c00 movel %d0,%d6 443cc: 2540 007c movel %d0,%a2@(124)
if (tty->rawOutBuf.theBuf == NULL) {
443d0: 6700 033a beqw 4470c <rtems_termios_open+0x3da>
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
443d4: 2f39 0005 f8c8 movel 5f8c8 <rtems_termios_cbufsize>,%sp@- 443da: 4e95 jsr %a5@
if (tty->cbuf == NULL) {
443dc: 588f addql #4,%sp
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
443de: 2540 001c movel %d0,%a2@(28)
if (tty->cbuf == NULL) {
443e2: 6700 0354 beqw 44738 <rtems_termios_open+0x406>
return RTEMS_NO_MEMORY;
}
/*
* Initialize wakeup callbacks
*/
tty->tty_snd.sw_pfn = NULL;
443e6: 42aa 00d4 clrl %a2@(212)
tty->tty_snd.sw_arg = NULL;
443ea: 42aa 00d8 clrl %a2@(216)
tty->tty_rcv.sw_pfn = NULL;
443ee: 42aa 00dc clrl %a2@(220)
tty->tty_rcv.sw_arg = NULL;
443f2: 42aa 00e0 clrl %a2@(224)
tty->tty_rcvwakeup = 0;
443f6: 42aa 00e4 clrl %a2@(228)
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
443fa: 248c movel %a4,%a2@
tty->back = NULL;
443fc: 42aa 0004 clrl %a2@(4)
if (rtems_termios_ttyHead != NULL)
44400: 4a8c tstl %a4
44402: 6704 beqs 44408 <rtems_termios_open+0xd6>
rtems_termios_ttyHead->back = tty;
44404: 294a 0004 movel %a2,%a4@(4)
rtems_termios_ttyHead = tty;
44408: 23ca 0006 0f40 movel %a2,60f40 <rtems_termios_ttyHead>
if (rtems_termios_ttyTail == NULL)
4440e: 4ab9 0006 0f3c tstl 60f3c <rtems_termios_ttyTail> 44414: 6700 02ac beqw 446c2 <rtems_termios_open+0x390>
rtems_termios_ttyTail = tty;
tty->minor = minor;
44418: 2543 0010 movel %d3,%a2@(16)
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
4441c: 49f9 0004 682c lea 4682c <rtems_semaphore_create>,%a4
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
rtems_termios_ttyTail = tty;
tty->minor = minor;
tty->major = major;
44422: 2542 000c movel %d2,%a2@(12)
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
44426: 486a 0014 pea %a2@(20)
rtems_build_name ('T', 'R', 'i', c),
4442a: 1039 0005 f8cc moveb 5f8cc <c.6381>,%d0
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
44430: 42a7 clrl %sp@- 44432: 4878 0054 pea 54 <DBL_MANT_DIG+0x1f>
rtems_build_name ('T', 'R', 'i', c),
44436: 49c0 extbl %d0
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
44438: 4878 0001 pea 1 <ADD> 4443c: 0080 5452 6900 oril #1414686976,%d0 44442: 2f00 movel %d0,%sp@- 44444: 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)
44446: 4fef 0014 lea %sp@(20),%sp 4444a: 4a80 tstl %d0 4444c: 6600 020a bnew 44658 <rtems_termios_open+0x326>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
44450: 486a 0018 pea %a2@(24)
rtems_build_name ('T', 'R', 'o', c),
44454: 1039 0005 f8cc moveb 5f8cc <c.6381>,%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 (
4445a: 42a7 clrl %sp@- 4445c: 4878 0054 pea 54 <DBL_MANT_DIG+0x1f>
rtems_build_name ('T', 'R', 'o', c),
44460: 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 (
44462: 4878 0001 pea 1 <ADD> 44466: 0080 5452 6f00 oril #1414688512,%d0 4446c: 2f00 movel %d0,%sp@- 4446e: 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)
44470: 4fef 0014 lea %sp@(20),%sp 44474: 4a80 tstl %d0 44476: 6600 01e0 bnew 44658 <rtems_termios_open+0x326>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
4447a: 486a 008c pea %a2@(140)
rtems_build_name ('T', 'R', 'x', c),
4447e: 1039 0005 f8cc moveb 5f8cc <c.6381>,%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 (
44484: 42a7 clrl %sp@- 44486: 4878 0020 pea 20 <OPER2+0xc>
rtems_build_name ('T', 'R', 'x', c),
4448a: 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 (
4448c: 0080 5452 7800 oril #1414690816,%d0 44492: 42a7 clrl %sp@- 44494: 2f00 movel %d0,%sp@- 44496: 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)
44498: 4fef 0014 lea %sp@(20),%sp 4449c: 4a80 tstl %d0 4449e: 6600 01b8 bnew 44658 <rtems_termios_open+0x326>
tty->rawOutBufState = rob_idle;
/*
* Set callbacks
*/
tty->device = *callbacks;
444a2: 226e 0014 moveal %fp@(20),%a1 444a6: 41ea 0098 lea %a2@(152),%a0
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
444aa: 7002 moveq #2,%d0
tty->rawOutBufState = rob_idle;
/*
* Set callbacks
*/
tty->device = *callbacks;
444ac: 20d9 movel %a1@+,%a0@+ 444ae: 20d9 movel %a1@+,%a0@+ 444b0: 20d9 movel %a1@+,%a0@+ 444b2: 20d9 movel %a1@+,%a0@+ 444b4: 20d9 movel %a1@+,%a0@+ 444b6: 20d9 movel %a1@+,%a0@+ 444b8: 20d9 movel %a1@+,%a0@+ 444ba: 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;
444bc: 42aa 0094 clrl %a2@(148)
tty->device = *callbacks;
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
444c0: b0aa 00b4 cmpl %a2@(180),%d0 444c4: 6700 019a beqw 44660 <rtems_termios_open+0x32e>
&tty->rxTaskId);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
444c8: 4aaa 00a0 tstl %a2@(160) 444cc: 6700 0162 beqw 44630 <rtems_termios_open+0x2fe> 444d0: 7202 moveq #2,%d1 444d2: b2aa 00b4 cmpl %a2@(180),%d1 444d6: 6700 0158 beqw 44630 <rtems_termios_open+0x2fe>
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;
444da: 42aa 00b8 clrl %a2@(184)
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
444de: 222a 0064 movel %a2@(100),%d1
tty->highwater = tty->rawInBuf.Size * 3/4;
444e2: 206a 0064 moveal %a2@(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;
444e6: 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';
444e8: 7c03 moveq #3,%d6
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
444ea: 1039 0005 f8cc moveb 5f8cc <c.6381>,%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;
444f0: 2541 00bc movel %d1,%a2@(188)
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
444f4: 49c0 extbl %d0 444f6: 2a00 movel %d0,%d5 444f8: 2240 moveal %d0,%a1 444fa: 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';
444fc: 1546 0041 moveb %d6,%a2@(65)
tty->termios.c_cc[VQUIT] = '\034';
44500: 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;
44502: 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';
44506: 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';
44508: 1546 0042 moveb %d6,%a2@(66)
tty->termios.c_cc[VERASE] = '\177';
4450c: 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;
4450e: 2008 movel %a0,%d0 44510: e488 lsrl #2,%d0
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
44512: 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';
44516: 1546 0043 moveb %d6,%a2@(67)
tty->termios.c_cc[VKILL] = '\025';
4451a: 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;
4451c: 2540 00c0 movel %d0,%a2@(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';
44520: 1546 0044 moveb %d6,%a2@(68)
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
44524: 2548 0030 movel %a0,%a2@(48)
tty->termios.c_cc[VINTR] = '\003';
tty->termios.c_cc[VQUIT] = '\034';
tty->termios.c_cc[VERASE] = '\177';
tty->termios.c_cc[VKILL] = '\025';
tty->termios.c_cc[VEOF] = '\004';
44528: 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';
4452a: 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';
4452c: 1546 0045 moveb %d6,%a2@(69)
tty->termios.c_cc[VEOL] = '\000';
tty->termios.c_cc[VEOL2] = '\000';
tty->termios.c_cc[VSTART] = '\021';
44530: 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';
44532: 1541 004c moveb %d1,%a2@(76)
tty->termios.c_cc[VEOL2] = '\000';
44536: 1541 0051 moveb %d1,%a2@(81)
tty->termios.c_cc[VSTART] = '\021';
4453a: 1546 0049 moveb %d6,%a2@(73)
tty->termios.c_cc[VSTOP] = '\023';
tty->termios.c_cc[VSUSP] = '\032';
4453e: 721a moveq #26,%d1
tty->termios.c_cc[VREPRINT] = '\022';
44540: 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';
44542: 1540 004a moveb %d0,%a2@(74)
tty->termios.c_cc[VSUSP] = '\032';
tty->termios.c_cc[VREPRINT] = '\022';
tty->termios.c_cc[VDISCARD] = '\017';
44546: 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';
44548: 1541 004b moveb %d1,%a2@(75)
tty->termios.c_cc[VREPRINT] = '\022';
4454c: 1546 004d moveb %d6,%a2@(77)
tty->termios.c_cc[VDISCARD] = '\017';
tty->termios.c_cc[VWERASE] = '\027';
44550: 7217 moveq #23,%d1
tty->termios.c_cc[VLNEXT] = '\026';
44552: 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';
44554: 1540 004e moveb %d0,%a2@(78)
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
44558: 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';
4455e: 1541 004f moveb %d1,%a2@(79)
tty->termios.c_cc[VLNEXT] = '\026';
44562: 1546 0050 moveb %d6,%a2@(80)
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
44566: 2540 0034 movel %d0,%a2@(52)
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
4456a: 223c 0000 08bd movel #2237,%d1 44570: 2541 0038 movel %d1,%a2@(56)
tty->termios.c_lflag =
44574: 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')
4457a: 303c 007a movew #122,%d0 4457e: 13c5 0005 f8cc moveb %d5,5f8cc <c.6381>
* 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 =
44584: 2546 003c movel %d6,%a2@(60)
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
44588: b089 cmpl %a1,%d0
4458a: 6608 bnes 44594 <rtems_termios_open+0x262>
c = 'a';
4458c: 7261 moveq #97,%d1 4458e: 13c1 0005 f8cc moveb %d1,5f8cc <c.6381>
}
args->iop->data1 = tty;
if (!tty->refcount++) {
44594: 202a 0008 movel %a2@(8),%d0 44598: 2c00 movel %d0,%d6 4459a: 5286 addql #1,%d6
*/
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
4459c: 2053 moveal %a3@,%a0 4459e: 214a 0034 movel %a2,%a0@(52)
if (!tty->refcount++) {
445a2: 2546 0008 movel %d6,%a2@(8) 445a6: 4a80 tstl %d0
445a8: 661c bnes 445c6 <rtems_termios_open+0x294>
if (tty->device.firstOpen)
445aa: 206a 0098 moveal %a2@(152),%a0 445ae: 4a88 tstl %a0
445b0: 670c beqs 445be <rtems_termios_open+0x28c>
(*tty->device.firstOpen)(major, minor, arg);
445b2: 2f0b movel %a3,%sp@- 445b4: 2f03 movel %d3,%sp@- 445b6: 2f02 movel %d2,%sp@- 445b8: 4e90 jsr %a0@ 445ba: 4fef 000c lea %sp@(12),%sp
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
445be: 7002 moveq #2,%d0 445c0: b0aa 00b4 cmpl %a2@(180),%d0
445c4: 672c beqs 445f2 <rtems_termios_open+0x2c0>
tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
445c6: 2f39 0006 0f38 movel 60f38 <rtems_termios_ttyMutex>,%sp@- 445cc: 4eb9 0004 6c1c jsr 46c1c <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
445d2: 588f addql #4,%sp
}
445d4: 2004 movel %d4,%d0 445d6: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 445dc: 4e5e unlk %fp 445de: 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))
445e0: b6aa 0010 cmpl %a2@(16),%d3
445e4: 67ae beqs 44594 <rtems_termios_open+0x262> <== 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) {
445e6: 2452 moveal %a2@,%a2 <== NOT EXECUTED 445e8: 4a8a tstl %a2 <== NOT EXECUTED 445ea: 6600 fd80 bnew 4436c <rtems_termios_open+0x3a> <== NOT EXECUTED 445ee: 6000 fd8a braw 4437a <rtems_termios_open+0x48> <== NOT EXECUTED
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_start(
445f2: 2f0a movel %a2,%sp@- 445f4: 487a 1620 pea %pc@(45c16 <rtems_termios_rxdaemon>) 445f8: 47f9 0004 6f88 lea 46f88 <rtems_task_start>,%a3 445fe: 2f2a 00c4 movel %a2@(196),%sp@- 44602: 4e93 jsr %a3@
tty->rxTaskId, rtems_termios_rxdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
44604: 4fef 000c lea %sp@(12),%sp 44608: 4a80 tstl %d0
4460a: 664c bnes 44658 <rtems_termios_open+0x326> <== NEVER TAKEN
rtems_fatal_error_occurred (sc);
sc = rtems_task_start(
4460c: 2f0a movel %a2,%sp@- 4460e: 487a 18d4 pea %pc@(45ee4 <rtems_termios_txdaemon>) 44612: 2f2a 00c8 movel %a2@(200),%sp@- 44616: 4e93 jsr %a3@
tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
44618: 4fef 000c lea %sp@(12),%sp 4461c: 4a80 tstl %d0
4461e: 6638 bnes 44658 <rtems_termios_open+0x326> <== NEVER TAKEN
rtems_fatal_error_occurred (sc);
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
44620: 2f39 0006 0f38 movel 60f38 <rtems_termios_ttyMutex>,%sp@- 44626: 4eb9 0004 6c1c jsr 46c1c <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
4462c: 588f addql #4,%sp 4462e: 60a4 bras 445d4 <rtems_termios_open+0x2a2>
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
44630: 486a 0068 pea %a2@(104)
rtems_build_name ('T', 'R', 'r', c),
44634: 1039 0005 f8cc moveb 5f8cc <c.6381>,%d0
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
4463a: 42a7 clrl %sp@- 4463c: 4878 0024 pea 24 <OPER2+0x10>
rtems_build_name ('T', 'R', 'r', c),
44640: 49c0 extbl %d0
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
44642: 0080 5452 7200 oril #1414689280,%d0 44648: 42a7 clrl %sp@- 4464a: 2f00 movel %d0,%sp@- 4464c: 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)
4464e: 4fef 0014 lea %sp@(20),%sp 44652: 4a80 tstl %d0 44654: 6700 fe84 beqw 444da <rtems_termios_open+0x1a8>
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);
44658: 2f00 movel %d0,%sp@- 4465a: 4eb9 0004 724c jsr 4724c <rtems_fatal_error_occurred>
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_create (
44660: 486a 00c8 pea %a2@(200) 44664: 4bf9 0004 6cd8 lea 46cd8 <rtems_task_create>,%a5
rtems_build_name ('T', 'x', 'T', c),
4466a: 1039 0005 f8cc moveb 5f8cc <c.6381>,%d0
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_create (
44670: 42a7 clrl %sp@- 44672: 4878 0500 pea 500 <DBL_MAX_EXP+0xff>
rtems_build_name ('T', 'x', 'T', c),
44676: 49c0 extbl %d0
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_create (
44678: 4878 0400 pea 400 <D_BIAS+0x2> 4467c: 4878 000a pea a <LASTO> 44680: 0080 5478 5400 oril #1417171968,%d0 44686: 2f00 movel %d0,%sp@- 44688: 4e95 jsr %a5@
TERMIOS_TXTASK_STACKSIZE,
RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE |
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->txTaskId);
if (sc != RTEMS_SUCCESSFUL)
4468a: 4fef 0018 lea %sp@(24),%sp 4468e: 4a80 tstl %d0
44690: 66c6 bnes 44658 <rtems_termios_open+0x326> <== NEVER TAKEN
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
44692: 486a 00c4 pea %a2@(196)
rtems_build_name ('R', 'x', 'T', c),
44696: 1039 0005 f8cc moveb 5f8cc <c.6381>,%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 (
4469c: 42a7 clrl %sp@- 4469e: 4878 0500 pea 500 <DBL_MAX_EXP+0xff>
rtems_build_name ('R', 'x', 'T', c),
446a2: 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 (
446a4: 4878 0400 pea 400 <D_BIAS+0x2> 446a8: 4878 0009 pea 9 <DIVIDE_BY_ZERO+0x1> 446ac: 0080 5278 5400 oril #1383617536,%d0 446b2: 2f00 movel %d0,%sp@- 446b4: 4e95 jsr %a5@
TERMIOS_RXTASK_STACKSIZE,
RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE |
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->rxTaskId);
if (sc != RTEMS_SUCCESSFUL)
446b6: 4fef 0018 lea %sp@(24),%sp 446ba: 4a80 tstl %d0 446bc: 6700 fe0a beqw 444c8 <rtems_termios_open+0x196>
446c0: 6096 bras 44658 <rtems_termios_open+0x326> <== 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;
446c2: 23ca 0006 0f3c movel %a2,60f3c <rtems_termios_ttyTail> 446c8: 6000 fd4e braw 44418 <rtems_termios_open+0xe6>
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
if (tty == NULL) {
rtems_semaphore_release (rtems_termios_ttyMutex);
446cc: 2f39 0006 0f38 movel 60f38 <rtems_termios_ttyMutex>,%sp@-
return RTEMS_NO_MEMORY;
446d2: 781a moveq #26,%d4
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
if (tty == NULL) {
rtems_semaphore_release (rtems_termios_ttyMutex);
446d4: 4eb9 0004 6c1c jsr 46c1c <rtems_semaphore_release>
return RTEMS_NO_MEMORY;
446da: 588f addql #4,%sp
rtems_fatal_error_occurred (sc);
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
return RTEMS_SUCCESSFUL;
}
446dc: 2004 movel %d4,%d0 446de: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 446e4: 4e5e unlk %fp 446e6: 4e75 rts
* 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);
446e8: 2f0a movel %a2,%sp@-
rtems_semaphore_release (rtems_termios_ttyMutex);
return RTEMS_NO_MEMORY;
446ea: 781a moveq #26,%d4
* 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);
446ec: 4eb9 0004 32dc jsr 432dc <free>
rtems_semaphore_release (rtems_termios_ttyMutex);
446f2: 2f39 0006 0f38 movel 60f38 <rtems_termios_ttyMutex>,%sp@- 446f8: 4eb9 0004 6c1c jsr 46c1c <rtems_semaphore_release>
return RTEMS_NO_MEMORY;
446fe: 508f addql #8,%sp
rtems_fatal_error_occurred (sc);
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
return RTEMS_SUCCESSFUL;
}
44700: 2004 movel %d4,%d0 44702: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 44708: 4e5e unlk %fp 4470a: 4e75 rts
* 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));
4470c: 2f05 movel %d5,%sp@- <== NOT EXECUTED 4470e: 47f9 0004 32dc lea 432dc <free>,%a3 <== NOT EXECUTED
free(tty);
rtems_semaphore_release (rtems_termios_ttyMutex);
return RTEMS_NO_MEMORY;
44714: 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));
44716: 4e93 jsr %a3@ <== NOT EXECUTED
free(tty);
44718: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4471a: 4e93 jsr %a3@ <== NOT EXECUTED
rtems_semaphore_release (rtems_termios_ttyMutex);
4471c: 2f39 0006 0f38 movel 60f38 <rtems_termios_ttyMutex>,%sp@- <== NOT EXECUTED 44722: 4eb9 0004 6c1c jsr 46c1c <rtems_semaphore_release> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
44728: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
return RTEMS_SUCCESSFUL;
}
4472c: 2004 movel %d4,%d0 <== NOT EXECUTED 4472e: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 <== NOT EXECUTED 44734: 4e5e unlk %fp <== NOT EXECUTED 44736: 4e75 rts <== NOT EXECUTED
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
if (tty->cbuf == NULL) {
free((void *)(tty->rawOutBuf.theBuf));
44738: 2f06 movel %d6,%sp@- 4473a: 47f9 0004 32dc lea 432dc <free>,%a3
free((void *)(tty->rawInBuf.theBuf));
free(tty);
rtems_semaphore_release (rtems_termios_ttyMutex);
return RTEMS_NO_MEMORY;
44740: 781a moveq #26,%d4
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
if (tty->cbuf == NULL) {
free((void *)(tty->rawOutBuf.theBuf));
44742: 4e93 jsr %a3@
free((void *)(tty->rawInBuf.theBuf));
44744: 2f05 movel %d5,%sp@- 44746: 4e93 jsr %a3@
free(tty);
44748: 2f0a movel %a2,%sp@- 4474a: 4e93 jsr %a3@
rtems_semaphore_release (rtems_termios_ttyMutex);
4474c: 2f39 0006 0f38 movel 60f38 <rtems_termios_ttyMutex>,%sp@- 44752: 4eb9 0004 6c1c jsr 46c1c <rtems_semaphore_release>
return RTEMS_NO_MEMORY;
44758: 4fef 0010 lea %sp@(16),%sp
rtems_fatal_error_occurred (sc);
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
return RTEMS_SUCCESSFUL;
}
4475c: 2004 movel %d4,%d0 4475e: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5
44764: 4e5e unlk %fp <== NOT EXECUTED
00044d60 <rtems_termios_puts>:
* Send characters to device-specific code
*/
void
rtems_termios_puts (
const void *_buf, int len, struct rtems_termios_tty *tty)
{
44d60: 4e56 ffdc linkw %fp,#-36 44d64: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@ 44d68: 286e 0008 moveal %fp@(8),%a4 44d6c: 242e 000c movel %fp@(12),%d2 44d70: 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) {
44d74: 4aaa 00b4 tstl %a2@(180) 44d78: 6700 00c6 beqw 44e40 <rtems_termios_puts+0xe0>
(*tty->device.write)(tty->minor, buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
44d7c: 2c2a 0080 movel %a2@(128),%d6
while (len) {
44d80: 4a82 tstl %d2 44d82: 6700 008e beqw 44e12 <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);
44d86: 2a3c 0000 0700 movel #1792,%d5 44d8c: 47f9 0004 6acc lea 46acc <rtems_semaphore_obtain>,%a3
* len -= ncopy
*
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
44d92: 222a 0088 movel %a2@(136),%d1 44d96: 5286 addql #1,%d6
rtems_interrupt_disable (level);
44d98: 2005 movel %d5,%d0
* len -= ncopy
*
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
44d9a: 4c41 6007 remul %d1,%d7,%d6 44d9e: 2c07 movel %d7,%d6
rtems_interrupt_disable (level);
44da0: 40c3 movew %sr,%d3 44da2: 8083 orl %d3,%d0 44da4: 46c0 movew %d0,%sr
while (newHead == tty->rawOutBuf.Tail) {
44da6: 282a 0084 movel %a2@(132),%d4 44daa: be84 cmpl %d4,%d7
44dac: 662c bnes 44dda <rtems_termios_puts+0x7a>
tty->rawOutBufState = rob_wait;
44dae: 7002 moveq #2,%d0 44db0: 2540 0094 movel %d0,%a2@(148)
rtems_interrupt_enable (level);
44db4: 46c3 movew %d3,%sr
sc = rtems_semaphore_obtain(
44db6: 42a7 clrl %sp@- 44db8: 42a7 clrl %sp@- 44dba: 2f2a 008c movel %a2@(140),%sp@- 44dbe: 4e93 jsr %a3@
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
44dc0: 4fef 000c lea %sp@(12),%sp 44dc4: 4a80 tstl %d0 44dc6: 6600 0094 bnew 44e5c <rtems_termios_puts+0xfc>
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
44dca: 2005 movel %d5,%d0 44dcc: 40c3 movew %sr,%d3 44dce: 8083 orl %d3,%d0 44dd0: 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) {
44dd2: 202a 0084 movel %a2@(132),%d0 44dd6: b880 cmpl %d0,%d4
44dd8: 67d4 beqs 44dae <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++;
44dda: 202a 0080 movel %a2@(128),%d0 44dde: 206a 007c moveal %a2@(124),%a0 44de2: 119c 0800 moveb %a4@+,%a0@(00000000,%d0:l)
tty->rawOutBuf.Head = newHead;
44de6: 2547 0080 movel %d7,%a2@(128)
if (tty->rawOutBufState == rob_idle) {
44dea: 4aaa 0094 tstl %a2@(148)
44dee: 661c bnes 44e0c <rtems_termios_puts+0xac>
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
44df0: 202a 00b8 movel %a2@(184),%d0 44df4: 0800 0004 btst #4,%d0
44df8: 6722 beqs 44e1c <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;
44dfa: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44dfe: 7220 moveq #32,%d1 <== NOT EXECUTED 44e00: 8081 orl %d1,%d0 <== NOT EXECUTED 44e02: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
}
tty->rawOutBufState = rob_busy;
44e06: 7001 moveq #1,%d0 <== NOT EXECUTED 44e08: 2540 0094 movel %d0,%a2@(148) <== NOT EXECUTED
}
rtems_interrupt_enable (level);
44e0c: 46c3 movew %d3,%sr
len--;
44e0e: 5382 subql #1,%d2
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
while (len) {
44e10: 6680 bnes 44d92 <rtems_termios_puts+0x32>
tty->rawOutBufState = rob_busy;
}
rtems_interrupt_enable (level);
len--;
}
}
44e12: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 44e18: 4e5e unlk %fp 44e1a: 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,
44e1c: 4878 0001 pea 1 <ADD>
(char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
44e20: 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,
44e24: d0aa 007c addl %a2@(124),%d0 44e28: 2f00 movel %d0,%sp@- 44e2a: 2f2a 0010 movel %a2@(16),%sp@- 44e2e: 206a 00a4 moveal %a2@(164),%a0 44e32: 4e90 jsr %a0@ 44e34: 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;
44e38: 7001 moveq #1,%d0 44e3a: 2540 0094 movel %d0,%a2@(148) 44e3e: 60cc bras 44e0c <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, buf, len);
44e40: 226a 00a4 moveal %a2@(164),%a1 44e44: 2d6a 0010 0008 movel %a2@(16),%fp@(8) 44e4a: 2d42 0010 movel %d2,%fp@(16) 44e4e: 2d4c 000c movel %a4,%fp@(12)
tty->rawOutBufState = rob_busy;
}
rtems_interrupt_enable (level);
len--;
}
}
44e52: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 44e58: 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, buf, len);
44e5a: 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);
44e5c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44e5e: 4eb9 0004 724c jsr 4724c <rtems_fatal_error_occurred> <== NOT EXECUTED
000455fa <rtems_termios_read>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
455fa: 4e56 ffd4 linkw %fp,#-44 455fe: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 45602: 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);
45606: 2c3c 0004 6acc movel #289484,%d6
rtems_status_code
rtems_termios_read (void *arg)
{
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
4560c: 2055 moveal %a5@,%a0 4560e: 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);
45612: 2046 moveal %d6,%a0 45614: 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;
45616: 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);
4561a: 42a7 clrl %sp@- 4561c: 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;
45620: 286d 000c moveal %a5@(12),%a4
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
45624: 4e90 jsr %a0@
if (sc != RTEMS_SUCCESSFUL)
45626: 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);
4562a: 2a00 movel %d0,%d5
if (sc != RTEMS_SUCCESSFUL)
4562c: 662e bnes 4565c <rtems_termios_read+0x62> <== NEVER TAKEN
return sc;
if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
4562e: 202a 00cc movel %a2@(204),%d0 45632: eb88 lsll #5,%d0 45634: 0680 0006 0704 addil #395012,%d0 4563a: 2240 moveal %d0,%a1 4563c: 2051 moveal %a1@,%a0 4563e: 4a88 tstl %a0
45640: 6726 beqs 45668 <rtems_termios_read+0x6e>
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
45642: 2f0d movel %a5,%sp@- 45644: 2f0a movel %a2,%sp@- 45646: 4e90 jsr %a0@ 45648: 2a00 movel %d0,%d5
tty->tty_rcvwakeup = 0;
4564a: 42aa 00e4 clrl %a2@(228)
rtems_semaphore_release (tty->isem);
4564e: 2f2a 0014 movel %a2@(20),%sp@- 45652: 4eb9 0004 6c1c jsr 46c1c <rtems_semaphore_release>
return sc;
45658: 4fef 000c lea %sp@(12),%sp
} args->bytes_moved = args->count - count; tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; }
4565c: 2005 movel %d5,%d0 4565e: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 45664: 4e5e unlk %fp 45666: 4e75 rts
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
45668: 202a 0020 movel %a2@(32),%d0 4566c: b0aa 0024 cmpl %a2@(36),%d0
45670: 674e beqs 456c0 <rtems_termios_read+0xc6> <== ALWAYS TAKEN
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
45672: 4a84 tstl %d4
45674: 6724 beqs 4569a <rtems_termios_read+0xa0> <== NEVER TAKEN
45676: 202a 0024 movel %a2@(36),%d0 4567a: b0aa 0020 cmpl %a2@(32),%d0
4567e: 6c1a bges 4569a <rtems_termios_read+0xa0> <== NEVER TAKEN
*buffer++ = tty->cbuf[tty->cindex++];
45680: 206a 001c moveal %a2@(28),%a0
count--;
45684: 5384 subql #1,%d4
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
*buffer++ = tty->cbuf[tty->cindex++];
45686: 18f0 0800 moveb %a0@(00000000,%d0:l),%a4@+ 4568a: 5280 addql #1,%d0 4568c: 2540 0024 movel %d0,%a2@(36)
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
45690: 4a84 tstl %d4
45692: 6706 beqs 4569a <rtems_termios_read+0xa0>
45694: b0aa 0020 cmpl %a2@(32),%d0
45698: 6de6 blts 45680 <rtems_termios_read+0x86>
*buffer++ = tty->cbuf[tty->cindex++];
count--;
}
args->bytes_moved = args->count - count;
4569a: 202d 0010 movel %a5@(16),%d0 4569e: 9084 subl %d4,%d0 456a0: 2b40 0018 movel %d0,%a5@(24)
tty->tty_rcvwakeup = 0;
456a4: 42aa 00e4 clrl %a2@(228)
rtems_semaphore_release (tty->isem);
456a8: 2f2a 0014 movel %a2@(20),%sp@- 456ac: 4eb9 0004 6c1c jsr 46c1c <rtems_semaphore_release>
return sc;
456b2: 588f addql #4,%sp
}
456b4: 2005 movel %d5,%d0 456b6: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 456bc: 4e5e unlk %fp 456be: 4e75 rts
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
tty->read_start_column = tty->column;
if (tty->device.pollRead != NULL &&
456c0: 206a 00a0 moveal %a2@(160),%a0
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
tty->read_start_column = tty->column;
456c4: 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;
456ca: 42aa 0020 clrl %a2@(32) 456ce: 42aa 0024 clrl %a2@(36)
tty->read_start_column = tty->column;
if (tty->device.pollRead != NULL &&
456d2: 4a88 tstl %a0
456d4: 6708 beqs 456de <rtems_termios_read+0xe4>
456d6: 4aaa 00b4 tstl %a2@(180) 456da: 6700 0162 beqw 4583e <rtems_termios_read+0x244>
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)(
456de: 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;
456e2: 7401 moveq #1,%d2 456e4: 47fa fdca lea %pc@(454b0 <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;
456e8: 262a 0074 movel %a2@(116),%d3
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)(
456ec: 2d48 fffc movel %a0,%fp@(-4)
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
456f0: 222a 005c movel %a2@(92),%d1 456f4: 202a 0060 movel %a2@(96),%d0 456f8: b081 cmpl %d1,%d0 456fa: 6700 00cc beqw 457c8 <rtems_termios_read+0x1ce>
(tty->ccount < (CBUFSIZE-1))) {
456fe: 2039 0005 f8c8 movel 5f8c8 <rtems_termios_cbufsize>,%d0 45704: 5380 subql #1,%d0
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
45706: b0aa 0020 cmpl %a2@(32),%d0 4570a: 6f00 00bc blew 457c8 <rtems_termios_read+0x1ce>
(tty->ccount < (CBUFSIZE-1))) {
unsigned char c;
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
4570e: 262a 005c movel %a2@(92),%d3 45712: 5283 addql #1,%d3 45714: 202a 0064 movel %a2@(100),%d0
c = tty->rawInBuf.theBuf[newHead];
45718: 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;
4571c: 4c40 3001 remul %d0,%d1,%d3
c = tty->rawInBuf.theBuf[newHead];
45720: 1630 1800 moveb %a0@(00000000,%d1:l),%d3
tty->rawInBuf.Head = newHead;
45724: 2541 005c movel %d1,%a2@(92)
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
45728: 202a 0060 movel %a2@(96),%d0 4572c: 206a 0064 moveal %a2@(100),%a0 45730: d088 addl %a0,%d0 45732: 9081 subl %d1,%d0
% tty->rawInBuf.Size)
45734: 222a 0064 movel %a2@(100),%d1 45738: 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)
4573c: beaa 00bc cmpl %a2@(188),%d7
45740: 6446 bccs 45788 <rtems_termios_read+0x18e> <== NEVER TAKEN
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
45742: 202a 00b8 movel %a2@(184),%d0 45746: 72fe moveq #-2,%d1 45748: c081 andl %d1,%d0 4574a: 2540 00b8 movel %d0,%a2@(184)
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
4574e: 202a 00b8 movel %a2@(184),%d0 45752: 0280 0000 0202 andil #514,%d0 45758: 0c80 0000 0202 cmpil #514,%d0 4575e: 6700 008a beqw 457ea <rtems_termios_read+0x1f0>
&& ((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) {
45762: 202a 00b8 movel %a2@(184),%d0 45766: 0800 0008 btst #8,%d0
4576a: 671c beqs 45788 <rtems_termios_read+0x18e> <== ALWAYS TAKEN
tty->flow_ctrl &= ~FL_IRTSOFF;
4576c: 222a 00b8 movel %a2@(184),%d1 <== NOT EXECUTED 45770: 7efb moveq #-5,%d7 <== NOT EXECUTED 45772: c287 andl %d7,%d1 <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
45774: 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;
45778: 2541 00b8 movel %d1,%a2@(184) <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
4577c: 4a88 tstl %a0 <== NOT EXECUTED 4577e: 6708 beqs 45788 <rtems_termios_read+0x18e> <== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
45780: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 45784: 4e90 jsr %a0@ <== NOT EXECUTED 45786: 588f addql #4,%sp <== NOT EXECUTED
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
45788: 7002 moveq #2,%d0 4578a: c0aa 003c andl %a2@(60),%d0 4578e: 6700 008c beqw 4581c <rtems_termios_read+0x222>
if (siproc (c, tty))
45792: 2f0a movel %a2,%sp@- 45794: 0283 0000 00ff andil #255,%d3 4579a: 2f03 movel %d3,%sp@- 4579c: 4e93 jsr %a3@ 4579e: 508f addql #8,%sp
wait = 0;
457a0: 4a80 tstl %d0 457a2: 57c0 seq %d0 457a4: 49c0 extbl %d0 457a6: c480 andl %d0,%d2
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
457a8: 222a 005c movel %a2@(92),%d1
} else {
siproc (c, tty);
if (tty->ccount >= tty->termios.c_cc[VMIN])
wait = 0;
}
timeout = tty->rawInBufSemaphoreTimeout;
457ac: 262a 0070 movel %a2@(112),%d3
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
457b0: 202a 0060 movel %a2@(96),%d0 457b4: b081 cmpl %d1,%d0
457b6: 6710 beqs 457c8 <rtems_termios_read+0x1ce>
(tty->ccount < (CBUFSIZE-1))) {
457b8: 2039 0005 f8c8 movel 5f8c8 <rtems_termios_cbufsize>,%d0 457be: 5380 subql #1,%d0
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
457c0: b0aa 0020 cmpl %a2@(32),%d0 457c4: 6e00 ff48 bgtw 4570e <rtems_termios_read+0x114>
}
/*
* Wait for characters
*/
if ( wait ) {
457c8: 4a82 tstl %d2 457ca: 6700 fea6 beqw 45672 <rtems_termios_read+0x78>
sc = rtems_semaphore_obtain(
457ce: 2f03 movel %d3,%sp@- 457d0: 2f2a 006c movel %a2@(108),%sp@- 457d4: 2046 moveal %d6,%a0 457d6: 2f2a 0068 movel %a2@(104),%sp@- 457da: 4e90 jsr %a0@
tty->rawInBuf.Semaphore, tty->rawInBufSemaphoreOptions, timeout);
if (sc != RTEMS_SUCCESSFUL)
457dc: 4fef 000c lea %sp@(12),%sp 457e0: 4a80 tstl %d0 457e2: 6700 ff0c beqw 456f0 <rtems_termios_read+0xf6>
457e6: 6000 fe8a braw 45672 <rtems_termios_read+0x78> <== NOT EXECUTED
< 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)
457ea: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 457ee: 670c beqs 457fc <rtems_termios_read+0x202> <== NOT EXECUTED
|| (tty->flow_ctrl & FL_OSTOP))) {
457f0: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 457f4: 0800 0005 btst #5,%d0 <== NOT EXECUTED 457f8: 6700 ff68 beqw 45762 <rtems_termios_read+0x168> <== NOT EXECUTED
/* XON should be sent now... */
(*tty->device.write)(
457fc: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 45800: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 45804: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 45808: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 4580c: 4e90 jsr %a0@ <== NOT EXECUTED 4580e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
45812: 7002 moveq #2,%d0 <== NOT EXECUTED 45814: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 45818: 6600 ff78 bnew 45792 <rtems_termios_read+0x198> <== NOT EXECUTED
if (siproc (c, tty))
wait = 0;
} else {
siproc (c, tty);
4581c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4581e: 0283 0000 00ff andil #255,%d3 <== NOT EXECUTED 45824: 2f03 movel %d3,%sp@- <== NOT EXECUTED 45826: 4e93 jsr %a3@ <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
45828: 508f addql #8,%sp <== NOT EXECUTED 4582a: 4280 clrl %d0 <== NOT EXECUTED 4582c: 102a 0047 moveb %a2@(71),%d0 <== NOT EXECUTED
wait = 0;
45830: b0aa 0020 cmpl %a2@(32),%d0 <== NOT EXECUTED 45834: 5ec0 sgt %d0 <== NOT EXECUTED 45836: 49c0 extbl %d0 <== NOT EXECUTED 45838: c480 andl %d0,%d2 <== NOT EXECUTED 4583a: 6000 ff6c braw 457a8 <rtems_termios_read+0x1ae> <== NOT EXECUTED
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
4583e: 7002 moveq #2,%d0 45840: c0aa 003c andl %a2@(60),%d0
45844: 6740 beqs 45886 <rtems_termios_read+0x28c>
45846: 47fa fc68 lea %pc@(454b0 <siproc>),%a3
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
rtems_task_wake_after (1);
4584a: 243c 0004 7048 movel #290888,%d2
{
int n;
if (tty->termios.c_lflag & ICANON) {
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
45850: 2f2a 0010 movel %a2@(16),%sp@- 45854: 4e90 jsr %a0@
if (n < 0) {
45856: 588f addql #4,%sp 45858: 4a80 tstl %d0
4585a: 6d1a blts 45876 <rtems_termios_read+0x27c>
rtems_task_wake_after (1);
} else {
if (siproc (n, tty))
4585c: 2f0a movel %a2,%sp@- 4585e: 0280 0000 00ff andil #255,%d0 45864: 2f00 movel %d0,%sp@- 45866: 4e93 jsr %a3@ 45868: 508f addql #8,%sp 4586a: 4a80 tstl %d0 4586c: 6600 fe04 bnew 45672 <rtems_termios_read+0x78>
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
45870: 206a 00a0 moveal %a2@(160),%a0 45874: 60da bras 45850 <rtems_termios_read+0x256>
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
rtems_task_wake_after (1);
45876: 4878 0001 pea 1 <ADD> 4587a: 2042 moveal %d2,%a0 4587c: 4e90 jsr %a0@
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
4587e: 206a 00a0 moveal %a2@(160),%a0
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
rtems_task_wake_after (1);
45882: 588f addql #4,%sp 45884: 60ca bras 45850 <rtems_termios_read+0x256>
break;
}
}
rtems_task_wake_after (1);
} else {
siproc (n, tty);
45886: 47fa fc28 lea %pc@(454b0 <siproc>),%a3
}
}
} else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
4588a: 263c 0004 63ac movel #287660,%d3
now = rtems_clock_get_ticks_since_boot();
if ((now - then) > tty->vtimeTicks) {
break;
}
}
rtems_task_wake_after (1);
45890: 243c 0004 7048 movel #290888,%d2
}
}
} else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
45896: 2243 moveal %d3,%a1 45898: 4e91 jsr %a1@ 4589a: 2c00 movel %d0,%d6
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
4589c: 2f2a 0010 movel %a2@(16),%sp@- 458a0: 206a 00a0 moveal %a2@(160),%a0 458a4: 4e90 jsr %a0@
if (n < 0) {
458a6: 588f addql #4,%sp 458a8: 4a80 tstl %d0
458aa: 6d38 blts 458e4 <rtems_termios_read+0x2ea> <== NEVER TAKEN
break;
}
}
rtems_task_wake_after (1);
} else {
siproc (n, tty);
458ac: 2f0a movel %a2,%sp@- 458ae: 0280 0000 00ff andil #255,%d0 458b4: 2f00 movel %d0,%sp@- 458b6: 4e93 jsr %a3@
if (tty->ccount >= tty->termios.c_cc[VMIN])
458b8: 508f addql #8,%sp 458ba: 4281 clrl %d1 458bc: 102a 0047 moveb %a2@(71),%d0 458c0: 1200 moveb %d0,%d1 458c2: b2aa 0020 cmpl %a2@(32),%d1 458c6: 6f00 fdaa blew 45672 <rtems_termios_read+0x78>
break;
if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
458ca: 4a00 tstb %d0
458cc: 67ce beqs 4589c <rtems_termios_read+0x2a2> <== NEVER TAKEN
458ce: 4a2a 0046 tstb %a2@(70)
458d2: 66c2 bnes 45896 <rtems_termios_read+0x29c>
} else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
458d4: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 458d8: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED 458dc: 4e90 jsr %a0@ <== NOT EXECUTED
if (n < 0) {
458de: 588f addql #4,%sp <== NOT EXECUTED 458e0: 4a80 tstl %d0 <== NOT EXECUTED 458e2: 6cc8 bges 458ac <rtems_termios_read+0x2b2> <== NOT EXECUTED
if (tty->termios.c_cc[VMIN]) {
458e4: 4a2a 0047 tstb %a2@(71)
458e8: 6732 beqs 4591c <rtems_termios_read+0x322> <== NEVER TAKEN
if (tty->termios.c_cc[VTIME] && tty->ccount) {
458ea: 4a2a 0046 tstb %a2@(70)
458ee: 6706 beqs 458f6 <rtems_termios_read+0x2fc> <== NEVER TAKEN
458f0: 4aaa 0020 tstl %a2@(32)
458f4: 660c bnes 45902 <rtems_termios_read+0x308>
now = rtems_clock_get_ticks_since_boot();
if ((now - then) > tty->vtimeTicks) {
break;
}
}
rtems_task_wake_after (1);
458f6: 4878 0001 pea 1 <ADD> 458fa: 2042 moveal %d2,%a0 458fc: 4e90 jsr %a0@ 458fe: 588f addql #4,%sp 45900: 609a bras 4589c <rtems_termios_read+0x2a2>
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();
45902: 2043 moveal %d3,%a0 45904: 4e90 jsr %a0@
if ((now - then) > tty->vtimeTicks) {
45906: 9086 subl %d6,%d0 45908: b0aa 0054 cmpl %a2@(84),%d0 4590c: 6200 fd64 bhiw 45672 <rtems_termios_read+0x78>
now = rtems_clock_get_ticks_since_boot();
if ((now - then) > tty->vtimeTicks) {
break;
}
}
rtems_task_wake_after (1);
45910: 4878 0001 pea 1 <ADD> 45914: 2042 moveal %d2,%a0 45916: 4e90 jsr %a0@ 45918: 588f addql #4,%sp 4591a: 6080 bras 4589c <rtems_termios_read+0x2a2>
if ((now - then) > tty->vtimeTicks) {
break;
}
}
} else {
if (!tty->termios.c_cc[VTIME])
4591c: 4a2a 0046 tstb %a2@(70) <== NOT EXECUTED 45920: 6700 fd50 beqw 45672 <rtems_termios_read+0x78> <== NOT EXECUTED
break;
now = rtems_clock_get_ticks_since_boot();
45924: 2243 moveal %d3,%a1 <== NOT EXECUTED 45926: 4e91 jsr %a1@ <== NOT EXECUTED
if ((now - then) > tty->vtimeTicks) {
45928: 9086 subl %d6,%d0 <== NOT EXECUTED 4592a: b0aa 0054 cmpl %a2@(84),%d0 <== NOT EXECUTED 4592e: 6200 fd42 bhiw 45672 <rtems_termios_read+0x78> <== NOT EXECUTED
break;
}
}
rtems_task_wake_after (1);
45932: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 45936: 2042 moveal %d2,%a0 <== NOT EXECUTED 45938: 4e90 jsr %a0@ <== NOT EXECUTED 4593a: 588f addql #4,%sp <== NOT EXECUTED 4593c: 6000 ff5e braw 4589c <rtems_termios_read+0x2a2> <== NOT EXECUTED
00045cb2 <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)
{
45cb2: 4e56 fff4 linkw %fp,#-12 45cb6: 48d7 040c moveml %d2-%d3/%a2,%sp@ 45cba: 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))
45cbe: 202a 00b8 movel %a2@(184),%d0 45cc2: 0280 0000 0403 andil #1027,%d0 45cc8: 0c80 0000 0401 cmpil #1025,%d0 45cce: 6700 0140 beqw 45e10 <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) {
45cd2: 202a 00b8 movel %a2@(184),%d0 45cd6: 7603 moveq #3,%d3 45cd8: 7202 moveq #2,%d1 45cda: c083 andl %d3,%d0 45cdc: b280 cmpl %d0,%d1 45cde: 6700 0172 beqw 45e52 <rtems_termios_refill_transmitter+0x1a0>
tty->flow_ctrl &= ~FL_ISNTXOF;
rtems_interrupt_enable(level);
nToSend = 1;
} else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
45ce2: 222a 0080 movel %a2@(128),%d1 45ce6: 202a 0084 movel %a2@(132),%d0 45cea: b081 cmpl %d1,%d0 45cec: 6700 009a beqw 45d88 <rtems_termios_refill_transmitter+0xd6>
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
return 0;
}
rtems_interrupt_disable(level);
45cf0: 203c 0000 0700 movel #1792,%d0 45cf6: 40c2 movew %sr,%d2 45cf8: 8082 orl %d2,%d0 45cfa: 46c0 movew %d0,%sr
len = tty->t_dqlen;
45cfc: 222a 0090 movel %a2@(144),%d1
tty->t_dqlen = 0;
45d00: 42aa 0090 clrl %a2@(144)
rtems_interrupt_enable(level);
45d04: 46c2 movew %d2,%sr
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
45d06: 202a 0084 movel %a2@(132),%d0 45d0a: d280 addl %d0,%d1 45d0c: 202a 0088 movel %a2@(136),%d0 45d10: 4c40 1002 remul %d0,%d2,%d1
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
45d14: 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;
45d16: 2542 0084 movel %d2,%a2@(132)
if (tty->rawOutBufState == rob_wait) {
45d1a: b0aa 0094 cmpl %a2@(148),%d0 45d1e: 6700 00d8 beqw 45df8 <rtems_termios_refill_transmitter+0x146>
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
if (newTail == tty->rawOutBuf.Head) {
45d22: 202a 0080 movel %a2@(128),%d0 45d26: b480 cmpl %d0,%d2
45d28: 6776 beqs 45da0 <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))
45d2a: 202a 00b8 movel %a2@(184),%d0 45d2e: 0280 0000 0210 andil #528,%d0 45d34: 0c80 0000 0210 cmpil #528,%d0 45d3a: 6700 015a beqw 45e96 <rtems_termios_refill_transmitter+0x1e4>
nToSend = 0;
} else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
45d3e: 202a 0080 movel %a2@(128),%d0 45d42: b082 cmpl %d2,%d0
45d44: 647c bccs 45dc2 <rtems_termios_refill_transmitter+0x110>
nToSend = tty->rawOutBuf.Size - newTail;
45d46: 262a 0088 movel %a2@(136),%d3 45d4a: 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)) {
45d4c: 202a 00b8 movel %a2@(184),%d0 45d50: 0280 0000 0600 andil #1536,%d0
45d56: 667c bnes 45dd4 <rtems_termios_refill_transmitter+0x122><== NEVER TAKEN
45d58: 2003 movel %d3,%d0
nToSend = 1;
}
tty->rawOutBufState = rob_busy; /*apm*/
45d5a: 7201 moveq #1,%d1
(*tty->device.write)(
45d5c: 2f00 movel %d0,%sp@- 45d5e: 202a 007c movel %a2@(124),%d0 45d62: d082 addl %d2,%d0 45d64: 2f00 movel %d0,%sp@- 45d66: 2f2a 0010 movel %a2@(16),%sp@- 45d6a: 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*/
45d6e: 2541 0094 movel %d1,%a2@(148)
(*tty->device.write)(
45d72: 4e90 jsr %a0@ 45d74: 4fef 000c lea %sp@(12),%sp
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
45d78: 2542 0084 movel %d2,%a2@(132)
} return nToSend; }
45d7c: 2003 movel %d3,%d0 45d7e: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 45d84: 4e5e unlk %fp 45d86: 4e75 rts
} else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
/*
* buffer was empty
*/
if (tty->rawOutBufState == rob_wait) {
45d88: 7602 moveq #2,%d3 45d8a: b6aa 0094 cmpl %a2@(148),%d3 45d8e: 6700 0130 beqw 45ec0 <rtems_termios_refill_transmitter+0x20e>
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
return 0;
45d92: 4283 clrl %d3
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
45d94: 2003 movel %d3,%d0 45d96: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 45d9c: 4e5e unlk %fp 45d9e: 4e75 rts
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
45da0: 206a 00d4 moveal %a2@(212),%a0
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
45da4: 42aa 0094 clrl %a2@(148)
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
45da8: 4a88 tstl %a0 45daa: 6700 012e beqw 45eda <rtems_termios_refill_transmitter+0x228>
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
45dae: 2f2a 00d8 movel %a2@(216),%sp@- <== NOT EXECUTED
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
nToSend = 0;
45db2: 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);
45db4: 486a 0030 pea %a2@(48) <== NOT EXECUTED 45db8: 4e90 jsr %a0@ <== NOT EXECUTED 45dba: 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*/
45dbc: 2542 0084 movel %d2,%a2@(132) <== NOT EXECUTED 45dc0: 60ba bras 45d7c <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;
45dc2: 262a 0080 movel %a2@(128),%d3 45dc6: 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)) {
45dc8: 202a 00b8 movel %a2@(184),%d0 45dcc: 0280 0000 0600 andil #1536,%d0
45dd2: 6784 beqs 45d58 <rtems_termios_refill_transmitter+0xa6>
45dd4: 7001 moveq #1,%d0
nToSend = 1;
}
tty->rawOutBufState = rob_busy; /*apm*/
45dd6: 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;
45dd8: 7601 moveq #1,%d3
}
tty->rawOutBufState = rob_busy; /*apm*/
(*tty->device.write)(
45dda: 2f00 movel %d0,%sp@- 45ddc: 202a 007c movel %a2@(124),%d0 45de0: d082 addl %d2,%d0 45de2: 2f00 movel %d0,%sp@- 45de4: 2f2a 0010 movel %a2@(16),%sp@- 45de8: 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*/
45dec: 2541 0094 movel %d1,%a2@(148)
(*tty->device.write)(
45df0: 4e90 jsr %a0@ 45df2: 4fef 000c lea %sp@(12),%sp 45df6: 6080 bras 45d78 <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);
45df8: 2f2a 008c movel %a2@(140),%sp@- 45dfc: 4eb9 0004 6c1c jsr 46c1c <rtems_semaphore_release>
}
if (newTail == tty->rawOutBuf.Head) {
45e02: 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);
45e06: 588f addql #4,%sp
}
if (newTail == tty->rawOutBuf.Head) {
45e08: b480 cmpl %d0,%d2 45e0a: 6600 ff1e bnew 45d2a <rtems_termios_refill_transmitter+0x78> 45e0e: 6090 bras 45da0 <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);
45e10: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 45e14: 486a 004a pea %a2@(74) <== NOT EXECUTED 45e18: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 45e1c: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 45e20: 4e90 jsr %a0@ <== NOT EXECUTED
rtems_interrupt_disable(level);
45e22: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED 45e28: 40c1 movew %sr,%d1 <== NOT EXECUTED 45e2a: 8081 orl %d1,%d0 <== NOT EXECUTED 45e2c: 46c0 movew %d0,%sr <== NOT EXECUTED
tty->t_dqlen--;
tty->flow_ctrl |= FL_ISNTXOF;
45e2e: 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--;
45e30: 53aa 0090 subql #1,%a2@(144) <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
45e34: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 45e38: 8082 orl %d2,%d0 <== NOT EXECUTED 45e3a: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
rtems_interrupt_enable(level);
45e3e: 46c1 movew %d1,%sr <== NOT EXECUTED
nToSend = 1;
45e40: 7601 moveq #1,%d3 <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
45e42: 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);
45e44: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
45e48: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 45e4e: 4e5e unlk %fp <== NOT EXECUTED 45e50: 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);
45e52: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 45e56: 486a 0049 pea %a2@(73) <== NOT EXECUTED 45e5a: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 45e5e: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 45e62: 4e90 jsr %a0@ <== NOT EXECUTED
rtems_interrupt_disable(level);
45e64: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED 45e6a: 40c1 movew %sr,%d1 <== NOT EXECUTED 45e6c: 8081 orl %d1,%d0 <== NOT EXECUTED 45e6e: 46c0 movew %d0,%sr <== NOT EXECUTED
tty->t_dqlen--;
tty->flow_ctrl &= ~FL_ISNTXOF;
45e70: 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--;
45e72: 53aa 0090 subql #1,%a2@(144) <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
45e76: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 45e7a: c082 andl %d2,%d0 <== NOT EXECUTED 45e7c: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
rtems_interrupt_enable(level);
45e80: 46c1 movew %d1,%sr <== NOT EXECUTED
nToSend = 1;
45e82: 163c 0001 moveb #1,%d3 <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
45e86: 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);
45e88: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
45e8c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 45e92: 4e5e unlk %fp <== NOT EXECUTED 45e94: 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);
45e96: 303c 0700 movew #1792,%d0 <== NOT EXECUTED 45e9a: 40c1 movew %sr,%d1 <== NOT EXECUTED 45e9c: 8081 orl %d1,%d0 <== NOT EXECUTED 45e9e: 46c0 movew %d0,%sr <== NOT EXECUTED
tty->flow_ctrl |= FL_OSTOP;
45ea0: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 45ea4: 7620 moveq #32,%d3 <== NOT EXECUTED 45ea6: 8083 orl %d3,%d0 <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
45ea8: 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;
45eac: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
45eb0: 2543 0094 movel %d3,%a2@(148) <== NOT EXECUTED
rtems_interrupt_enable(level);
45eb4: 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*/
45eb6: 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;
45eba: 4203 clrb %d3 <== NOT EXECUTED 45ebc: 6000 febe braw 45d7c <rtems_termios_refill_transmitter+0xca><== NOT EXECUTED
*/
if (tty->rawOutBufState == rob_wait) {
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
45ec0: 2f2a 008c movel %a2@(140),%sp@- <== NOT EXECUTED
}
return 0;
45ec4: 4203 clrb %d3 <== NOT EXECUTED
*/
if (tty->rawOutBufState == rob_wait) {
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
45ec6: 4eb9 0004 6c1c jsr 46c1c <rtems_semaphore_release> <== NOT EXECUTED 45ecc: 588f addql #4,%sp <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
45ece: 2003 movel %d3,%d0 <== NOT EXECUTED 45ed0: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 45ed6: 4e5e unlk %fp <== NOT EXECUTED 45ed8: 4e75 rts <== NOT EXECUTED
}
tty->rawOutBufState = rob_busy; /*apm*/
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
45eda: 2542 0084 movel %d2,%a2@(132)
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
nToSend = 0;
45ede: 4283 clrl %d3 45ee0: 6000 fe9a braw 45d7c <rtems_termios_refill_transmitter+0xca>
00045c16 <rtems_termios_rxdaemon>:
/*
* this task actually processes any receive events
*/
static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument)
{
45c16: 4e56 ffe0 linkw %fp,#-32 45c1a: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 45c1e: 240e movel %fp,%d2 45c20: 260e movel %fp,%d3 45c22: 5d82 subql #6,%d2 45c24: 47f9 0004 6414 lea 46414 <rtems_event_receive>,%a3 45c2a: 49f9 0004 6e1c lea 46e1c <rtems_task_delete>,%a4 45c30: 5383 subql #1,%d3 45c32: 4bf9 0004 595c lea 4595c <rtems_termios_enqueue_raw_characters>,%a5 45c38: 246e 0008 moveal %fp@(8),%a2
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
45c3c: 2f02 movel %d2,%sp@- 45c3e: 42a7 clrl %sp@- 45c40: 4878 0002 pea 2 <DOUBLE_FLOAT> 45c44: 4878 0003 pea 3 <DIVIDE> 45c48: 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) {
45c4a: 4fef 0010 lea %sp@(16),%sp 45c4e: 7001 moveq #1,%d0 45c50: c0ae fffa andl %fp@(-6),%d0
45c54: 663e bnes 45c94 <rtems_termios_rxdaemon+0x7e> <== NEVER TAKEN
}
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
45c56: 2f2a 0010 movel %a2@(16),%sp@- 45c5a: 206a 00a0 moveal %a2@(160),%a0 45c5e: 4e90 jsr %a0@
if (c != EOF) {
45c60: 588f addql #4,%sp 45c62: 72ff moveq #-1,%d1 45c64: b280 cmpl %d0,%d1
45c66: 67d4 beqs 45c3c <rtems_termios_rxdaemon+0x26> <== NEVER TAKEN
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
rtems_termios_enqueue_raw_characters ( tty,&c_buf,1);
45c68: 4878 0001 pea 1 <ADD>
c = tty->device.pollRead(tty->minor);
if (c != EOF) {
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
45c6c: 1d40 ffff moveb %d0,%fp@(-1)
rtems_termios_enqueue_raw_characters ( tty,&c_buf,1);
45c70: 2f03 movel %d3,%sp@- 45c72: 2f0a movel %a2,%sp@- 45c74: 4e95 jsr %a5@ 45c76: 4fef 000c lea %sp@(12),%sp
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
45c7a: 2f02 movel %d2,%sp@- 45c7c: 42a7 clrl %sp@- 45c7e: 4878 0002 pea 2 <DOUBLE_FLOAT> 45c82: 4878 0003 pea 3 <DIVIDE> 45c86: 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) {
45c88: 4fef 0010 lea %sp@(16),%sp 45c8c: 7001 moveq #1,%d0 45c8e: c0ae fffa andl %fp@(-6),%d0
45c92: 67c2 beqs 45c56 <rtems_termios_rxdaemon+0x40> <== ALWAYS TAKEN
tty->rxTaskId = 0;
45c94: 42aa 00c4 clrl %a2@(196) <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
45c98: 42a7 clrl %sp@- <== NOT EXECUTED 45c9a: 4e94 jsr %a4@ <== NOT EXECUTED 45c9c: 588f addql #4,%sp <== NOT EXECUTED
}
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
45c9e: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 45ca2: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED 45ca6: 4e90 jsr %a0@ <== NOT EXECUTED
if (c != EOF) {
45ca8: 588f addql #4,%sp <== NOT EXECUTED 45caa: 72ff moveq #-1,%d1 <== NOT EXECUTED 45cac: b280 cmpl %d0,%d1 <== NOT EXECUTED 45cae: 678c beqs 45c3c <rtems_termios_rxdaemon+0x26> <== NOT EXECUTED 45cb0: 60b6 bras 45c68 <rtems_termios_rxdaemon+0x52> <== NOT EXECUTED
00045ee4 <rtems_termios_txdaemon>:
/*
* this task actually processes any transmit events
*/
static rtems_task rtems_termios_txdaemon(rtems_task_argument argument)
{
45ee4: 4e56 ffe8 linkw %fp,#-24 45ee8: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 45eec: 240e movel %fp,%d2 45eee: 5982 subql #4,%d2 45ef0: 49f9 0004 6414 lea 46414 <rtems_event_receive>,%a4 45ef6: 4bf9 0004 6e1c lea 46e1c <rtems_task_delete>,%a5 45efc: 47f9 0004 5cb2 lea 45cb2 <rtems_termios_refill_transmitter>,%a3
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
45f02: 2f02 movel %d2,%sp@-
/*
* this task actually processes any transmit events
*/
static rtems_task rtems_termios_txdaemon(rtems_task_argument argument)
{
45f04: 246e 0008 moveal %fp@(8),%a2
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
45f08: 42a7 clrl %sp@- 45f0a: 4878 0002 pea 2 <DOUBLE_FLOAT> 45f0e: 4878 0003 pea 3 <DIVIDE> 45f12: 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) {
45f14: 4fef 0010 lea %sp@(16),%sp 45f18: 7001 moveq #1,%d0 45f1a: c0ae fffc andl %fp@(-4),%d0
45f1e: 663a bnes 45f5a <rtems_termios_txdaemon+0x76> <== NEVER TAKEN
}
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
45f20: 202a 00cc movel %a2@(204),%d0 45f24: eb88 lsll #5,%d0 45f26: 0680 0006 0710 addil #395024,%d0 45f2c: 2240 moveal %d0,%a1 45f2e: 2051 moveal %a1@,%a0 45f30: 4a88 tstl %a0
45f32: 6706 beqs 45f3a <rtems_termios_txdaemon+0x56> <== ALWAYS TAKEN
rtems_termios_linesw[tty->t_line].l_start(tty);
45f34: 2f0a movel %a2,%sp@- <== NOT EXECUTED 45f36: 4e90 jsr %a0@ <== NOT EXECUTED 45f38: 588f addql #4,%sp <== NOT EXECUTED
}
/*
* try to push further characters to device
*/
rtems_termios_refill_transmitter(tty);
45f3a: 2f0a movel %a2,%sp@- 45f3c: 4e93 jsr %a3@
}
45f3e: 588f addql #4,%sp
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
45f40: 2f02 movel %d2,%sp@- 45f42: 42a7 clrl %sp@- 45f44: 4878 0002 pea 2 <DOUBLE_FLOAT> 45f48: 4878 0003 pea 3 <DIVIDE> 45f4c: 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) {
45f4e: 4fef 0010 lea %sp@(16),%sp 45f52: 7001 moveq #1,%d0 45f54: c0ae fffc andl %fp@(-4),%d0
45f58: 67c6 beqs 45f20 <rtems_termios_txdaemon+0x3c> <== ALWAYS TAKEN
tty->txTaskId = 0;
45f5a: 42aa 00c8 clrl %a2@(200) <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
45f5e: 42a7 clrl %sp@- <== NOT EXECUTED 45f60: 4e95 jsr %a5@ <== NOT EXECUTED 45f62: 588f addql #4,%sp <== NOT EXECUTED 45f64: 60ba bras 45f20 <rtems_termios_txdaemon+0x3c> <== NOT EXECUTED
00045524 <rtems_termios_write>:
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
45524: 4e56 ffe8 linkw %fp,#-24 45528: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4552c: 266e 0008 moveal %fp@(8),%a3
rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1;
45530: 2053 moveal %a3@,%a0 45532: 2468 0034 moveal %a0@(52),%a2
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
45536: 42a7 clrl %sp@- 45538: 42a7 clrl %sp@- 4553a: 2f2a 0018 movel %a2@(24),%sp@- 4553e: 4eb9 0004 6acc jsr 46acc <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
45544: 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);
45548: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL)
4554a: 662a bnes 45576 <rtems_termios_write+0x52> <== NEVER TAKEN
return sc;
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
4554c: 202a 00cc movel %a2@(204),%d0 45550: eb88 lsll #5,%d0 45552: 0680 0006 0708 addil #395016,%d0 45558: 2240 moveal %d0,%a1 4555a: 2051 moveal %a1@,%a0 4555c: 4a88 tstl %a0
4555e: 6722 beqs 45582 <rtems_termios_write+0x5e>
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
45560: 2f0b movel %a3,%sp@- 45562: 2f0a movel %a2,%sp@- 45564: 4e90 jsr %a0@
rtems_semaphore_release (tty->osem);
45566: 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);
4556a: 2400 movel %d0,%d2
rtems_semaphore_release (tty->osem);
4556c: 4eb9 0004 6c1c jsr 46c1c <rtems_semaphore_release>
return sc;
45572: 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;
}
45576: 2002 movel %d2,%d0 45578: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4557e: 4e5e unlk %fp 45580: 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) {
45582: 7001 moveq #1,%d0 45584: c0aa 0034 andl %a2@(52),%d0
45588: 6740 beqs 455ca <rtems_termios_write+0xa6> <== NEVER TAKEN
uint32_t count = args->count;
4558a: 262b 0010 movel %a3@(16),%d3
char *buffer = args->buffer;
4558e: 286b 000c moveal %a3@(12),%a4
while (count--)
45592: 675e beqs 455f2 <rtems_termios_write+0xce> <== NEVER TAKEN
45594: 4bfa f8ce lea %pc@(44e64 <oproc>),%a5
oproc (*buffer++, tty);
45598: 4280 clrl %d0 4559a: 101c moveb %a4@+,%d0 4559c: 5383 subql #1,%d3 4559e: 2f0a movel %a2,%sp@- 455a0: 2f00 movel %d0,%sp@- 455a2: 4e95 jsr %a5@
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
455a4: 508f addql #8,%sp 455a6: 4a83 tstl %d3
455a8: 66ee bnes 45598 <rtems_termios_write+0x74>
455aa: 202b 0010 movel %a3@(16),%d0
oproc (*buffer++, tty);
args->bytes_moved = args->count;
455ae: 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);
455b2: 2f2a 0018 movel %a2@(24),%sp@- 455b6: 4eb9 0004 6c1c jsr 46c1c <rtems_semaphore_release>
return sc;
455bc: 588f addql #4,%sp
}
455be: 2002 movel %d2,%d0 455c0: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 455c6: 4e5e unlk %fp 455c8: 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);
455ca: 2f0a movel %a2,%sp@- <== NOT EXECUTED 455cc: 2f2b 0010 movel %a3@(16),%sp@- <== NOT EXECUTED 455d0: 2f2b 000c movel %a3@(12),%sp@- <== NOT EXECUTED 455d4: 4eb9 0004 4d60 jsr 44d60 <rtems_termios_puts> <== NOT EXECUTED
args->bytes_moved = args->count;
455da: 276b 0010 0018 movel %a3@(16),%a3@(24) <== NOT EXECUTED 455e0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
} rtems_semaphore_release (tty->osem);
455e4: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 455e8: 4eb9 0004 6c1c jsr 46c1c <rtems_semaphore_release> <== NOT EXECUTED
return sc;
455ee: 588f addql #4,%sp <== NOT EXECUTED 455f0: 60cc bras 455be <rtems_termios_write+0x9a> <== NOT EXECUTED
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
455f2: 4280 clrl %d0 <== NOT EXECUTED
oproc (*buffer++, tty);
args->bytes_moved = args->count;
455f4: 2740 0018 movel %d0,%a3@(24) <== NOT EXECUTED 455f8: 60b8 bras 455b2 <rtems_termios_write+0x8e> <== NOT EXECUTED
00056f68 <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
rtems_id id
)
{
56f68: 4e56 fffc linkw %fp,#-4
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
56f6c: 486e fffc pea %fp@(-4) 56f70: 2f2e 0008 movel %fp@(8),%sp@- 56f74: 4879 0007 e5ce pea 7e5ce <_Timer_Information> 56f7a: 4eb9 0005 9f3c jsr 59f3c <_Objects_Get>
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
56f80: 4fef 000c lea %sp@(12),%sp 56f84: 4aae fffc tstl %fp@(-4)
56f88: 6622 bnes 56fac <rtems_timer_cancel+0x44>
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
56f8a: 7204 moveq #4,%d1 56f8c: 2040 moveal %d0,%a0 56f8e: b2a8 0038 cmpl %a0@(56),%d1
56f92: 670c beqs 56fa0 <rtems_timer_cancel+0x38> <== NEVER TAKEN
(void) _Watchdog_Remove( &the_timer->Ticker );
56f94: 4868 0010 pea %a0@(16) 56f98: 4eb9 0005 bea4 jsr 5bea4 <_Watchdog_Remove> 56f9e: 588f addql #4,%sp
_Thread_Enable_dispatch();
56fa0: 4eb9 0005 ad04 jsr 5ad04 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
56fa6: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
56fa8: 4e5e unlk %fp 56faa: 4e75 rts
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
56fac: 7004 moveq #4,%d0
}
56fae: 4e5e unlk %fp
...
00047090 <rtems_timer_create>:
rtems_status_code rtems_timer_create(
rtems_name name,
rtems_id *id
)
{
47090: 4e56 fff4 linkw %fp,#-12 47094: 48d7 040c moveml %d2-%d3/%a2,%sp@ 47098: 242e 0008 movel %fp@(8),%d2 4709c: 246e 000c moveal %fp@(12),%a2
Timer_Control *the_timer;
if ( !rtems_is_name_valid( name ) )
470a0: 660c bnes 470ae <rtems_timer_create+0x1e>
return RTEMS_INVALID_NAME;
470a2: 7003 moveq #3,%d0
);
*id = the_timer->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
470a4: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 470aa: 4e5e unlk %fp 470ac: 4e75 rts
Timer_Control *the_timer;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
470ae: 4a8a tstl %a2
470b0: 6768 beqs 4711a <rtems_timer_create+0x8a> <== NEVER TAKEN
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
470b2: 2039 0006 110a movel 6110a <_Thread_Dispatch_disable_level>,%d0 470b8: 5280 addql #1,%d0 470ba: 23c0 0006 110a movel %d0,6110a <_Thread_Dispatch_disable_level>
return _Thread_Dispatch_disable_level;
470c0: 2039 0006 110a movel 6110a <_Thread_Dispatch_disable_level>,%d0
* This function allocates a timer control block from
* the inactive chain of free timer control blocks.
*/
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Allocate( void )
{
return (Timer_Control *) _Objects_Allocate( &_Timer_Information );
470c6: 4879 0006 194c pea 6194c <_Timer_Information> 470cc: 4eb9 0004 80c0 jsr 480c0 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* to prevent deletion */
the_timer = _Timer_Allocate();
if ( !the_timer ) {
470d2: 588f addql #4,%sp 470d4: 2040 moveal %d0,%a0 470d6: 4a80 tstl %d0
470d8: 674c beqs 47126 <rtems_timer_create+0x96> <== NEVER TAKEN
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
470da: 2028 0008 movel %a0@(8),%d0
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
470de: 4281 clrl %d1
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_timer->the_class = TIMER_DORMANT;
470e0: 7604 moveq #4,%d3 470e2: 2279 0006 1964 moveal 61964 <_Timer_Information+0x18>,%a1 470e8: 3200 movew %d0,%d1 470ea: 2143 0038 movel %d3,%a0@(56)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
470ee: 42a8 0018 clrl %a0@(24)
the_watchdog->routine = routine;
470f2: 42a8 002c clrl %a0@(44)
the_watchdog->id = id;
470f6: 42a8 0030 clrl %a0@(48)
the_watchdog->user_data = user_data;
470fa: 42a8 0034 clrl %a0@(52) 470fe: 2388 1c00 movel %a0,%a1@(00000000,%d1:l:4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
47102: 2142 000c movel %d2,%a0@(12)
&_Timer_Information,
&the_timer->Object,
(Objects_Name) name
);
*id = the_timer->Object.id;
47106: 2480 movel %d0,%a2@
_Thread_Enable_dispatch();
47108: 4eb9 0004 92cc jsr 492cc <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL; }
4710e: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
(Objects_Name) name
);
*id = the_timer->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
47114: 4280 clrl %d0
}
47116: 4e5e unlk %fp 47118: 4e75 rts
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
return RTEMS_INVALID_ADDRESS;
4711a: 7009 moveq #9,%d0
);
*id = the_timer->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
4711c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 47122: 4e5e unlk %fp 47124: 4e75 rts
_Thread_Disable_dispatch(); /* to prevent deletion */
the_timer = _Timer_Allocate();
if ( !the_timer ) {
_Thread_Enable_dispatch();
47126: 4eb9 0004 92cc jsr 492cc <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
4712c: 7005 moveq #5,%d0
);
*id = the_timer->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
4712e: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
47134: 4e5e unlk %fp <== NOT EXECUTED
00057324 <rtems_timer_reset>:
*/
rtems_status_code rtems_timer_reset(
rtems_id id
)
{
57324: 4e56 fff0 linkw %fp,#-16 57328: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 5732c: 486e fffc pea %fp@(-4) 57330: 2f2e 0008 movel %fp@(8),%sp@- 57334: 4879 0007 e5ce pea 7e5ce <_Timer_Information> 5733a: 4eb9 0005 9f3c jsr 59f3c <_Objects_Get>
Timer_Control *the_timer;
Objects_Locations location;
rtems_status_code status = RTEMS_SUCCESSFUL;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
57340: 4fef 000c lea %sp@(12),%sp 57344: 2440 moveal %d0,%a2 57346: 4aae fffc tstl %fp@(-4)
5734a: 6620 bnes 5736c <rtems_timer_reset+0x48>
case OBJECTS_LOCAL:
if ( the_timer->the_class == TIMER_INTERVAL ) {
5734c: 202a 0038 movel %a2@(56),%d0
57350: 6728 beqs 5737a <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 ) {
57352: 7201 moveq #1,%d1 57354: b280 cmpl %d0,%d1
57356: 674a beqs 573a2 <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;
57358: 740b moveq #11,%d2
}
_Thread_Enable_dispatch();
5735a: 4eb9 0005 ad04 jsr 5ad04 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
57360: 2002 movel %d2,%d0 57362: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 57368: 4e5e unlk %fp 5736a: 4e75 rts
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
5736c: 7404 moveq #4,%d2
}
5736e: 2002 movel %d2,%d0 57370: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 57376: 4e5e unlk %fp 57378: 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 );
5737a: 45ea 0010 lea %a2@(16),%a2
rtems_id id
)
{
Timer_Control *the_timer;
Objects_Locations location;
rtems_status_code status = RTEMS_SUCCESSFUL;
5737e: 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 );
57380: 2f0a movel %a2,%sp@- 57382: 4eb9 0005 bea4 jsr 5bea4 <_Watchdog_Remove>
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
57388: 2f0a movel %a2,%sp@- 5738a: 4879 0007 de04 pea 7de04 <_Watchdog_Ticks_chain> 57390: 4eb9 0005 bd5c jsr 5bd5c <_Watchdog_Insert> 57396: 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();
5739a: 4eb9 0005 ad04 jsr 5ad04 <_Thread_Enable_dispatch> 573a0: 60be bras 57360 <rtems_timer_reset+0x3c>
if ( !timer_server ) {
_Thread_Enable_dispatch();
return RTEMS_INCORRECT_STATE;
}
#endif
_Watchdog_Remove( &the_timer->Ticker );
573a2: 486a 0010 pea %a2@(16)
rtems_id id
)
{
Timer_Control *the_timer;
Objects_Locations location;
rtems_status_code status = RTEMS_SUCCESSFUL;
573a6: 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;
573a8: 2679 0007 e608 moveal 7e608 <_Timer_server>,%a3
if ( !timer_server ) {
_Thread_Enable_dispatch();
return RTEMS_INCORRECT_STATE;
}
#endif
_Watchdog_Remove( &the_timer->Ticker );
573ae: 4eb9 0005 bea4 jsr 5bea4 <_Watchdog_Remove>
(*timer_server->schedule_operation)( timer_server, the_timer );
573b4: 2f0a movel %a2,%sp@- 573b6: 2f0b movel %a3,%sp@- 573b8: 206b 0004 moveal %a3@(4),%a0 573bc: 4e90 jsr %a0@ 573be: 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();
573c2: 4eb9 0005 ad04 jsr 5ad04 <_Thread_Enable_dispatch> 573c8: 6096 bras 57360 <rtems_timer_reset+0x3c>
...
000574b4 <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
574b4: 4e56 fff0 linkw %fp,#-16 574b8: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server;
574bc: 2479 0007 e608 moveal 7e608 <_Timer_server>,%a2
if ( !timer_server )
574c2: 4a8a tstl %a2
574c4: 6736 beqs 574fc <rtems_timer_server_fire_when+0x48>
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
574c6: 4a39 0007 dd5c tstb 7dd5c <_TOD_Is_set>
574cc: 660c bnes 574da <rtems_timer_server_fire_when+0x26><== ALWAYS TAKEN
return RTEMS_NOT_DEFINED;
574ce: 700b moveq #11,%d0 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
574d0: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 <== NOT EXECUTED 574d6: 4e5e unlk %fp <== NOT EXECUTED 574d8: 4e75 rts <== NOT EXECUTED
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !routine )
574da: 4aae 0010 tstl %fp@(16)
574de: 6728 beqs 57508 <rtems_timer_server_fire_when+0x54>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
574e0: 2f2e 000c movel %fp@(12),%sp@- 574e4: 4eb9 0005 40cc jsr 540cc <_TOD_Validate> 574ea: 588f addql #4,%sp 574ec: 4a00 tstb %d0
574ee: 6624 bnes 57514 <rtems_timer_server_fire_when+0x60>
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
574f0: 7014 moveq #20,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
574f2: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 574f8: 4e5e unlk %fp 574fa: 4e75 rts
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
574fc: 700e moveq #14,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
574fe: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 57504: 4e5e unlk %fp 57506: 4e75 rts
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
57508: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
5750a: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 57510: 4e5e unlk %fp 57512: 4e75 rts
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
57514: 2f2e 000c movel %fp@(12),%sp@- 57518: 4eb9 0005 3fc4 jsr 53fc4 <_TOD_To_seconds>
if ( seconds <= _TOD_Seconds_since_epoch() )
5751e: 588f addql #4,%sp
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
57520: 2400 movel %d0,%d2
if ( seconds <= _TOD_Seconds_since_epoch() )
57522: b0b9 0007 ddd6 cmpl 7ddd6 <_TOD_Now>,%d0
57528: 63c6 blss 574f0 <rtems_timer_server_fire_when+0x3c>
5752a: 486e fffc pea %fp@(-4) 5752e: 2f2e 0008 movel %fp@(8),%sp@- 57532: 4879 0007 e5ce pea 7e5ce <_Timer_Information> 57538: 4eb9 0005 9f3c jsr 59f3c <_Objects_Get>
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
5753e: 4fef 000c lea %sp@(12),%sp 57542: 2640 moveal %d0,%a3 57544: 4aae fffc tstl %fp@(-4)
57548: 6654 bnes 5759e <rtems_timer_server_fire_when+0xea>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
5754a: 486b 0010 pea %a3@(16) 5754e: 4eb9 0005 bea4 jsr 5bea4 <_Watchdog_Remove>
the_watchdog->user_data = user_data;
57554: 276e 0014 0034 movel %fp@(20),%a3@(52)
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
5755a: 7003 moveq #3,%d0
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
5755c: 94b9 0007 ddd6 subl 7ddd6 <_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;
57562: 2740 0038 movel %d0,%a3@(56)
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
57566: 202e 0010 movel %fp@(16),%d0 5756a: 2740 002c movel %d0,%a3@(44)
the_watchdog->id = id;
5756e: 202e 0008 movel %fp@(8),%d0
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
57572: 2742 001c movel %d2,%a3@(28) 57576: 2740 0030 movel %d0,%a3@(48)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
5757a: 42ab 0018 clrl %a3@(24)
(*timer_server->schedule_operation)( timer_server, the_timer );
5757e: 2f0b movel %a3,%sp@- 57580: 2f0a movel %a2,%sp@- 57582: 206a 0004 moveal %a2@(4),%a0 57586: 4e90 jsr %a0@
_Thread_Enable_dispatch();
57588: 4eb9 0005 ad04 jsr 5ad04 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
5758e: 4fef 000c lea %sp@(12),%sp 57592: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
57594: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 5759a: 4e5e unlk %fp 5759c: 4e75 rts
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
5759e: 7004 moveq #4,%d0
}
575a0: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 575a6: 4e5e unlk %fp
...
00042f2c <rtems_verror>:
static int rtems_verror(
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
42f2c: 4e56 ffe8 linkw %fp,#-24 42f30: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ 42f34: 242e 0008 movel %fp@(8),%d2
int local_errno = 0;
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC) {
42f38: 0802 001d btst #29,%d2
42f3c: 6736 beqs 42f74 <rtems_verror+0x48>
if (rtems_panic_in_progress++)
42f3e: 2239 0006 0ef0 movel 60ef0 <rtems_panic_in_progress>,%d1 42f44: 2001 movel %d1,%d0 42f46: 5280 addql #1,%d0 42f48: 23c0 0006 0ef0 movel %d0,60ef0 <rtems_panic_in_progress> 42f4e: 4a81 tstl %d1
42f50: 671a beqs 42f6c <rtems_verror+0x40> <== ALWAYS TAKEN
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
42f52: 2039 0006 1048 movel 61048 <_Thread_Dispatch_disable_level>,%d0<== NOT EXECUTED 42f58: 5280 addql #1,%d0 <== NOT EXECUTED 42f5a: 23c0 0006 1048 movel %d0,61048 <_Thread_Dispatch_disable_level><== NOT EXECUTED
return _Thread_Dispatch_disable_level;
42f60: 2039 0006 1048 movel 61048 <_Thread_Dispatch_disable_level>,%d0<== NOT EXECUTED
void _Thread_Disable_dispatch( void );
#else
RTEMS_INLINE_ROUTINE void _Thread_Disable_dispatch( void )
{
_Thread_Dispatch_increment_disable_level();
RTEMS_COMPILER_MEMORY_BARRIER();
42f66: 2039 0006 0ef0 movel 60ef0 <rtems_panic_in_progress>,%d0 <== NOT EXECUTED
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
42f6c: 7202 moveq #2,%d1 42f6e: b280 cmpl %d0,%d1 42f70: 6d00 00b6 bltw 43028 <rtems_verror+0xfc>
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
42f74: 2079 0005 f998 moveal 5f998 <_impure_ptr>,%a0 42f7a: 45f9 0004 f424 lea 4f424 <fflush>,%a2
status = error_flag & ~RTEMS_ERROR_MASK;
42f80: 2802 movel %d2,%d4
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
42f82: 2f28 0008 movel %a0@(8),%sp@-
status = error_flag & ~RTEMS_ERROR_MASK;
42f86: 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 */
42f8c: 4e92 jsr %a2@
status = error_flag & ~RTEMS_ERROR_MASK;
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
42f8e: 588f addql #4,%sp 42f90: 0802 001e btst #30,%d2 42f94: 6600 00ca bnew 43060 <rtems_verror+0x134>
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
42f98: 2f2e 0010 movel %fp@(16),%sp@-
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
int local_errno = 0;
42f9c: 4283 clrl %d3 42f9e: 47f9 0004 f7c6 lea 4f7c6 <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);
42fa4: 2f2e 000c movel %fp@(12),%sp@- 42fa8: 2079 0005 f998 moveal 5f998 <_impure_ptr>,%a0 42fae: 2f28 000c movel %a0@(12),%sp@- 42fb2: 4eb9 0005 60f0 jsr 560f0 <vfprintf>
if (status)
42fb8: 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);
42fbc: 2400 movel %d0,%d2
if (status)
42fbe: 4a84 tstl %d4
42fc0: 6674 bnes 43036 <rtems_verror+0x10a>
chars_written +=
fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno) {
42fc2: 4a83 tstl %d3
42fc4: 6732 beqs 42ff8 <rtems_verror+0xcc>
if ((local_errno > 0) && *strerror(local_errno))
42fc6: 4a83 tstl %d3
42fc8: 6f14 bles 42fde <rtems_verror+0xb2>
42fca: 2f03 movel %d3,%sp@- 42fcc: 49f9 0005 03e8 lea 503e8 <strerror>,%a4 42fd2: 4e94 jsr %a4@ 42fd4: 588f addql #4,%sp 42fd6: 2040 moveal %d0,%a0 42fd8: 4a10 tstb %a0@ 42fda: 6600 00ba bnew 43096 <rtems_verror+0x16a>
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
42fde: 2f03 movel %d3,%sp@- 42fe0: 4879 0005 e28a pea 5e28a <IMFS_ops+0x6a> 42fe6: 2079 0005 f998 moveal 5f998 <_impure_ptr>,%a0 42fec: 2f28 000c movel %a0@(12),%sp@- 42ff0: 4e93 jsr %a3@ 42ff2: 4fef 000c lea %sp@(12),%sp 42ff6: d480 addl %d0,%d2
}
chars_written += fprintf(stderr, "\n");
42ff8: 4879 0005 de8f pea 5de8f <rtems_filesystem_table+0x3d7> 42ffe: 2079 0005 f998 moveal 5f998 <_impure_ptr>,%a0 43004: 2f28 000c movel %a0@(12),%sp@- 43008: 4e93 jsr %a3@
(void) fflush(stderr);
4300a: 2079 0005 f998 moveal 5f998 <_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");
43010: d480 addl %d0,%d2
(void) fflush(stderr);
43012: 2f28 000c movel %a0@(12),%sp@- 43016: 4e92 jsr %a2@
return chars_written;
43018: 4fef 000c lea %sp@(12),%sp
}
4301c: 2002 movel %d2,%d0 4301e: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 43024: 4e5e unlk %fp 43026: 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;
43028: 4282 clrl %d2 <== NOT EXECUTED
chars_written += fprintf(stderr, "\n");
(void) fflush(stderr);
return chars_written;
}
4302a: 2002 movel %d2,%d0 <== NOT EXECUTED 4302c: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 <== NOT EXECUTED 43032: 4e5e unlk %fp <== NOT EXECUTED 43034: 4e75 rts <== NOT EXECUTED
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written +=
fprintf(stderr, " (status: %s)", rtems_status_text(status));
43036: 2f04 movel %d4,%sp@- 43038: 4eb9 0004 2f14 jsr 42f14 <rtems_status_text> 4303e: 2079 0005 f998 moveal 5f998 <_impure_ptr>,%a0 43044: 2f00 movel %d0,%sp@- 43046: 4879 0005 e26f pea 5e26f <IMFS_ops+0x4f> 4304c: 2f28 000c movel %a0@(12),%sp@- 43050: 4e93 jsr %a3@
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written +=
43052: 4fef 0010 lea %sp@(16),%sp 43056: d480 addl %d0,%d2
fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno) {
43058: 4a83 tstl %d3
4305a: 679c beqs 42ff8 <rtems_verror+0xcc>
4305c: 6000 ff68 braw 42fc6 <rtems_verror+0x9a>
(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;
43060: 4eb9 0004 f098 jsr 4f098 <__errno> 43066: 47f9 0004 f7c6 lea 4f7c6 <fprintf>,%a3 4306c: 2040 moveal %d0,%a0 4306e: 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);
43070: 2f2e 0010 movel %fp@(16),%sp@- 43074: 2079 0005 f998 moveal 5f998 <_impure_ptr>,%a0 4307a: 2f2e 000c movel %fp@(12),%sp@- 4307e: 2f28 000c movel %a0@(12),%sp@- 43082: 4eb9 0005 60f0 jsr 560f0 <vfprintf>
if (status)
43088: 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);
4308c: 2400 movel %d0,%d2
if (status)
4308e: 4a84 tstl %d4 43090: 6700 ff30 beqw 42fc2 <rtems_verror+0x96> 43094: 60a0 bras 43036 <rtems_verror+0x10a>
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));
43096: 2f03 movel %d3,%sp@- 43098: 4e94 jsr %a4@ 4309a: 2079 0005 f998 moveal 5f998 <_impure_ptr>,%a0 430a0: 2f00 movel %d0,%sp@- 430a2: 4879 0005 e27d pea 5e27d <IMFS_ops+0x5d> 430a8: 2f28 000c movel %a0@(12),%sp@- 430ac: 4e93 jsr %a3@ 430ae: 4fef 0010 lea %sp@(16),%sp 430b2: d480 addl %d0,%d2
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
}
chars_written += fprintf(stderr, "\n");
430b4: 4879 0005 de8f pea 5de8f <rtems_filesystem_table+0x3d7> 430ba: 2079 0005 f998 moveal 5f998 <_impure_ptr>,%a0 430c0: 2f28 000c movel %a0@(12),%sp@- 430c4: 4e93 jsr %a3@
(void) fflush(stderr);
430c6: 2079 0005 f998 moveal 5f998 <_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");
430cc: d480 addl %d0,%d2
(void) fflush(stderr);
430ce: 2f28 000c movel %a0@(12),%sp@- 430d2: 4e92 jsr %a2@
return chars_written;
430d4: 4fef 000c lea %sp@(12),%sp 430d8: 6000 ff42 braw 4301c <rtems_verror+0xf0>
00043764 <scanInt>:
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
43764: 4e56 ffe4 linkw %fp,#-28 43768: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 4376c: 246e 0008 moveal %fp@(8),%a2
int c; unsigned int i = 0; unsigned int limit = INT_MAX; int sign = 0;
43770: 4284 clrl %d4
static int
scanInt(FILE *fp, int *val)
{
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
43772: 263c 7fff ffff movel #2147483647,%d3
*/
static int
scanInt(FILE *fp, int *val)
{
int c;
unsigned int i = 0;
43778: 4282 clrl %d2
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
4377a: 47f9 0005 12dc lea 512dc <__srget_r>,%a3 43780: 202a 0004 movel %a2@(4),%d0 43784: 5380 subql #1,%d0 43786: 2540 0004 movel %d0,%a2@(4)
4378a: 6d62 blts 437ee <scanInt+0x8a> <== NEVER TAKEN
4378c: 2052 moveal %a2@,%a0 4378e: 4280 clrl %d0 43790: 1010 moveb %a0@,%d0 43792: 5288 addql #1,%a0
if (c == ':')
43794: 723a moveq #58,%d1
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
43796: 2488 movel %a0,%a2@
if (c == ':')
43798: b280 cmpl %d0,%d1
4379a: 6764 beqs 43800 <scanInt+0x9c>
break;
if (sign == 0) {
4379c: 4a84 tstl %d4
4379e: 660a bnes 437aa <scanInt+0x46>
if (c == '-') {
437a0: 7c2d moveq #45,%d6 437a2: bc80 cmpl %d0,%d6 437a4: 6700 0084 beqw 4382a <scanInt+0xc6>
sign = -1;
limit++;
continue;
}
sign = 1;
437a8: 7801 moveq #1,%d4
}
if (!isdigit(c))
437aa: 2079 0006 1154 moveal 61154 <__ctype_ptr__>,%a0 437b0: 1230 0801 moveb %a0@(00000001,%d0:l),%d1 437b4: 49c1 extbl %d1 437b6: 44c1 movew %d1,%ccr
437b8: 6664 bnes 4381e <scanInt+0xba>
return 0;
d = c - '0';
if ((i > (limit / 10))
437ba: 2203 movel %d3,%d1 437bc: 7c0a moveq #10,%d6 437be: 4c46 1005 remul %d6,%d5,%d1 437c2: 4c46 1001 remul %d6,%d1,%d1 437c6: b282 cmpl %d2,%d1
437c8: 6554 bcss 4381e <scanInt+0xba>
}
sign = 1;
}
if (!isdigit(c))
return 0;
d = c - '0';
437ca: 0680 ffff ffd0 addil #-48,%d0
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
437d0: b282 cmpl %d2,%d1
437d2: 6746 beqs 4381a <scanInt+0xb6>
return 0;
i = i * 10 + d;
437d4: 2202 movel %d2,%d1 437d6: e789 lsll #3,%d1 437d8: 2241 moveal %d1,%a1 437da: 41f1 2a00 lea %a1@(00000000,%d2:l:2),%a0 437de: 2400 movel %d0,%d2
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
437e0: 202a 0004 movel %a2@(4),%d0 437e4: 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;
437e6: d488 addl %a0,%d2
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
437e8: 2540 0004 movel %d0,%a2@(4)
437ec: 6c9e bges 4378c <scanInt+0x28> <== ALWAYS TAKEN
437ee: 2f0a movel %a2,%sp@- <== NOT EXECUTED 437f0: 2f39 0006 1158 movel 61158 <_impure_ptr>,%sp@- <== NOT EXECUTED 437f6: 4e93 jsr %a3@ <== NOT EXECUTED 437f8: 508f addql #8,%sp <== NOT EXECUTED
if (c == ':')
437fa: 723a moveq #58,%d1 <== NOT EXECUTED 437fc: b280 cmpl %d0,%d1 <== NOT EXECUTED 437fe: 669c bnes 4379c <scanInt+0x38> <== NOT EXECUTED
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
i = i * 10 + d;
}
if (sign == 0)
43800: 4a84 tstl %d4
43802: 671a beqs 4381e <scanInt+0xba> <== NEVER TAKEN
return 0;
*val = i * sign;
43804: 4c02 4800 mulsl %d2,%d4
return 1;
43808: 7001 moveq #1,%d0
return 0;
i = i * 10 + d;
}
if (sign == 0)
return 0;
*val = i * sign;
4380a: 206e 000c moveal %fp@(12),%a0 4380e: 2084 movel %d4,%a0@
return 1; }
43810: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 43816: 4e5e unlk %fp 43818: 4e75 rts
}
if (!isdigit(c))
return 0;
d = c - '0';
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
4381a: ba80 cmpl %d0,%d5
4381c: 64b6 bccs 437d4 <scanInt+0x70> <== NEVER TAKEN
return 0;
i = i * 10 + d;
}
if (sign == 0)
return 0;
4381e: 4280 clrl %d0
*val = i * sign; return 1; }
43820: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 43826: 4e5e unlk %fp 43828: 4e75 rts
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
sign = -1;
limit++;
4382a: 5283 addql #1,%d3
c = getc(fp);
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
sign = -1;
4382c: 78ff moveq #-1,%d4
limit++;
continue;
4382e: 6000 ff50 braw 43780 <scanInt+0x1c>
00043832 <scanString>:
/*
* Extract a string value from the database
*/
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
43832: 4e56 ffec linkw %fp,#-20
int c;
*name = *bufp;
43836: 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)
{
4383a: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 4383e: 266e 0010 moveal %fp@(16),%a3
int c;
*name = *bufp;
for (;;) {
c = getc(fp);
43842: 4bf9 0005 12dc lea 512dc <__srget_r>,%a5
/*
* Extract a string value from the database
*/
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
43848: 246e 0008 moveal %fp@(8),%a2
int c;
*name = *bufp;
4384c: 2093 movel %a3@,%a0@
for (;;) {
c = getc(fp);
4384e: 202a 0004 movel %a2@(4),%d0 43852: 5380 subql #1,%d0
/*
* Extract a string value from the database
*/
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
43854: 286e 0014 moveal %fp@(20),%a4 43858: 242e 0018 movel %fp@(24),%d2
int c;
*name = *bufp;
for (;;) {
c = getc(fp);
4385c: 2540 0004 movel %d0,%a2@(4)
43860: 6d36 blts 43898 <scanString+0x66>
43862: 2052 moveal %a2@,%a0 43864: 4280 clrl %d0 43866: 1010 moveb %a0@,%d0 43868: 5288 addql #1,%a0
if (c == ':') {
4386a: 723a moveq #58,%d1
{
int c;
*name = *bufp;
for (;;) {
c = getc(fp);
4386c: 2488 movel %a0,%a2@
if (c == ':') {
4386e: b280 cmpl %d0,%d1
43870: 6738 beqs 438aa <scanString+0x78>
if (nlFlag)
return 0;
break;
}
if (c == '\n') {
43872: 720a moveq #10,%d1 43874: b280 cmpl %d0,%d1
43876: 674a beqs 438c2 <scanString+0x90>
if (!nlFlag)
return 0;
break;
}
if (c == EOF)
43878: 72ff moveq #-1,%d1 4387a: b280 cmpl %d0,%d1
4387c: 6748 beqs 438c6 <scanString+0x94>
return 0;
if (*nleft < 2)
4387e: 7201 moveq #1,%d1 43880: b294 cmpl %a4@,%d1
43882: 6442 bccs 438c6 <scanString+0x94>
return 0;
**bufp = c;
43884: 2053 moveal %a3@,%a0 43886: 1080 moveb %d0,%a0@
++(*bufp);
43888: 5293 addql #1,%a3@
--(*nleft);
4388a: 5394 subql #1,%a4@
{
int c;
*name = *bufp;
for (;;) {
c = getc(fp);
4388c: 202a 0004 movel %a2@(4),%d0 43890: 5380 subql #1,%d0 43892: 2540 0004 movel %d0,%a2@(4)
43896: 6cca bges 43862 <scanString+0x30>
43898: 2f0a movel %a2,%sp@- 4389a: 2f39 0006 1158 movel 61158 <_impure_ptr>,%sp@- 438a0: 4e95 jsr %a5@ 438a2: 508f addql #8,%sp
if (c == ':') {
438a4: 723a moveq #58,%d1 438a6: b280 cmpl %d0,%d1
438a8: 66c8 bnes 43872 <scanString+0x40> <== ALWAYS TAKEN
if (nlFlag)
438aa: 4a82 tstl %d2
438ac: 6618 bnes 438c6 <scanString+0x94>
return 0;
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
438ae: 2053 moveal %a3@,%a0
++(*bufp); --(*nleft); return 1;
438b0: 7001 moveq #1,%d0
return 0;
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
438b2: 4210 clrb %a0@
++(*bufp);
438b4: 5293 addql #1,%a3@
--(*nleft);
438b6: 5394 subql #1,%a4@
return 1; }
438b8: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 438be: 4e5e unlk %fp 438c0: 4e75 rts
if (nlFlag)
return 0;
break;
}
if (c == '\n') {
if (!nlFlag)
438c2: 4a82 tstl %d2
438c4: 66e8 bnes 438ae <scanString+0x7c>
break;
}
if (c == EOF)
return 0;
if (*nleft < 2)
return 0;
438c6: 4280 clrl %d0
} **bufp = '\0'; ++(*bufp); --(*nleft); return 1; }
438c8: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5
438ce: 4e5e unlk %fp <== NOT EXECUTED
000438d2 <scangr>:
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
438d2: 4e56 ffe8 linkw %fp,#-24 438d6: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
438da: 42a7 clrl %sp@- 438dc: 486e 0014 pea %fp@(20) 438e0: 47fa ff50 lea %pc@(43832 <scanString>),%a3 438e4: 486e 0010 pea %fp@(16)
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
438e8: 246e 000c moveal %fp@(12),%a2 438ec: 242e 0008 movel %fp@(8),%d2
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
438f0: 2f0a movel %a2,%sp@- 438f2: 2f02 movel %d2,%sp@- 438f4: 4e93 jsr %a3@ 438f6: 4fef 0014 lea %sp@(20),%sp 438fa: 4a80 tstl %d0
438fc: 660c bnes 4390a <scangr+0x38>
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
return 0;
438fe: 4280 clrl %d0
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
return 1;
}
43900: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 43906: 4e5e unlk %fp 43908: 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)
4390a: 42a7 clrl %sp@- 4390c: 486e 0014 pea %fp@(20) 43910: 486e 0010 pea %fp@(16) 43914: 486a 0004 pea %a2@(4) 43918: 2f02 movel %d2,%sp@- 4391a: 4e93 jsr %a3@ 4391c: 4fef 0014 lea %sp@(20),%sp 43920: 4a80 tstl %d0
43922: 67da beqs 438fe <scangr+0x2c> <== NEVER TAKEN
|| !scanInt(fp, &grgid)
43924: 486e fff8 pea %fp@(-8) 43928: 2f02 movel %d2,%sp@- 4392a: 4eba fe38 jsr %pc@(43764 <scanInt>) 4392e: 508f addql #8,%sp 43930: 4a80 tstl %d0
43932: 67ca beqs 438fe <scangr+0x2c> <== NEVER TAKEN
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
43934: 4878 0001 pea 1 <ADD> 43938: 486e 0014 pea %fp@(20) 4393c: 486e 0010 pea %fp@(16) 43940: 486e fffc pea %fp@(-4) 43944: 2f02 movel %d2,%sp@- 43946: 4e93 jsr %a3@ 43948: 4fef 0014 lea %sp@(20),%sp 4394c: 4a80 tstl %d0
4394e: 67ae beqs 438fe <scangr+0x2c> <== NEVER TAKEN
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
43950: 226e fffc moveal %fp@(-4),%a1
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &grgid)
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
return 0;
grp->gr_gid = grgid;
43954: 356e fffa 0008 movew %fp@(-6),%a2@(8)
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
4395a: 1011 moveb %a1@,%d0 4395c: 6700 0084 beqw 439e2 <scangr+0x110>
}
/*
* Extract a single group record from the database
*/
static int scangr(
43960: 41e9 0001 lea %a1@(1),%a0
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
43964: 7201 moveq #1,%d1
if(*cp == ',')
43966: 49c0 extbl %d0 43968: 742c moveq #44,%d2 4396a: b480 cmpl %d0,%d2
4396c: 675e beqs 439cc <scangr+0xfa>
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
4396e: 1018 moveb %a0@+,%d0
43970: 66f4 bnes 43966 <scangr+0x94>
43972: e589 lsll #2,%d1 43974: 0681 0000 0013 addil #19,%d1
}
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
4397a: b2ae 0014 cmpl %fp@(20),%d1 4397e: 6200 ff7e bhiw 438fe <scangr+0x2c>
return 0;
grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
43982: 202e 0010 movel %fp@(16),%d0 43986: 76f0 moveq #-16,%d3 43988: 0680 0000 000f addil #15,%d0 4398e: c083 andl %d3,%d0 43990: 2540 000a movel %d0,%a2@(10)
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
43994: 2040 moveal %d0,%a0 43996: 2089 movel %a1,%a0@
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
43998: 206e fffc moveal %fp@(-4),%a0 4399c: 1010 moveb %a0@,%d0
4399e: 6746 beqs 439e6 <scangr+0x114> <== NEVER TAKEN
}
/*
* Extract a single group record from the database
*/
static int scangr(
439a0: 2208 movel %a0,%d1 439a2: 5281 addql #1,%d1 439a4: 2041 moveal %d1,%a0
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
439a6: 7401 moveq #1,%d2
if(*cp == ',') {
439a8: 49c0 extbl %d0 439aa: 762c moveq #44,%d3 439ac: b680 cmpl %d0,%d3
439ae: 6720 beqs 439d0 <scangr+0xfe>
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
439b0: 5281 addql #1,%d1 439b2: 1018 moveb %a0@+,%d0
439b4: 66f2 bnes 439a8 <scangr+0xd6>
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
439b6: 206a 000a moveal %a2@(10),%a0
return 1;
439ba: 7001 moveq #1,%d0
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
439bc: e58a lsll #2,%d2
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
439be: 42b0 2800 clrl %a0@(00000000,%d2:l)
return 1; }
439c2: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 439c8: 4e5e unlk %fp 439ca: 4e75 rts
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
if(*cp == ',')
memcount++;
439cc: 5281 addql #1,%d1 439ce: 609e bras 4396e <scangr+0x9c>
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
if(*cp == ',') {
*cp = '\0';
439d0: 4200 clrb %d0 439d2: 1140 ffff moveb %d0,%a0@(-1)
grp->gr_mem[memcount++] = cp + 1;
439d6: 226a 000a moveal %a2@(10),%a1 439da: 2381 2c00 movel %d1,%a1@(00000000,%d2:l:4) 439de: 5282 addql #1,%d2 439e0: 60ce bras 439b0 <scangr+0xde>
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
439e2: 7217 moveq #23,%d1 <== NOT EXECUTED 439e4: 6094 bras 4397a <scangr+0xa8> <== NOT EXECUTED
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
439e6: 206a 000a moveal %a2@(10),%a0 <== NOT EXECUTED
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
439ea: 7404 moveq #4,%d2 <== NOT EXECUTED
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
return 1;
439ec: 7001 moveq #1,%d0 <== NOT EXECUTED
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
439ee: 42b0 2800 clrl %a0@(00000000,%d2:l) <== NOT EXECUTED 439f2: 60ce bras 439c2 <scangr+0xf0> <== NOT EXECUTED
000439f4 <scanpw>:
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
439f4: 4e56 ffe8 linkw %fp,#-24 439f8: 48d7 1c04 moveml %d2/%a2-%a4,%sp@
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
439fc: 42a7 clrl %sp@- 439fe: 486e 0014 pea %fp@(20) 43a02: 47fa fe2e lea %pc@(43832 <scanString>),%a3 43a06: 486e 0010 pea %fp@(16)
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
43a0a: 246e 000c moveal %fp@(12),%a2 43a0e: 242e 0008 movel %fp@(8),%d2
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
43a12: 2f0a movel %a2,%sp@- 43a14: 2f02 movel %d2,%sp@- 43a16: 4e93 jsr %a3@ 43a18: 4fef 0014 lea %sp@(20),%sp 43a1c: 4a80 tstl %d0
43a1e: 660c bnes 43a2c <scanpw+0x38>
|| !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;
43a20: 4280 clrl %d0
pwd->pw_uid = pwuid; pwd->pw_gid = pwgid; return 1; }
43a22: 4cee 1c04 ffe8 moveml %fp@(-24),%d2/%a2-%a4 43a28: 4e5e unlk %fp 43a2a: 4e75 rts
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
43a2c: 42a7 clrl %sp@- 43a2e: 486e 0014 pea %fp@(20) 43a32: 486e 0010 pea %fp@(16) 43a36: 486a 0004 pea %a2@(4) 43a3a: 2f02 movel %d2,%sp@- 43a3c: 4e93 jsr %a3@ 43a3e: 4fef 0014 lea %sp@(20),%sp 43a42: 4a80 tstl %d0
43a44: 67da beqs 43a20 <scanpw+0x2c> <== NEVER TAKEN
|| !scanInt(fp, &pwuid)
43a46: 486e fff8 pea %fp@(-8) 43a4a: 49fa fd18 lea %pc@(43764 <scanInt>),%a4 43a4e: 2f02 movel %d2,%sp@- 43a50: 4e94 jsr %a4@ 43a52: 508f addql #8,%sp 43a54: 4a80 tstl %d0
43a56: 67c8 beqs 43a20 <scanpw+0x2c> || !scanInt(fp, &pwgid)
43a58: 486e fffc pea %fp@(-4) 43a5c: 2f02 movel %d2,%sp@- 43a5e: 4e94 jsr %a4@ 43a60: 508f addql #8,%sp 43a62: 4a80 tstl %d0
43a64: 67ba beqs 43a20 <scanpw+0x2c> || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
43a66: 42a7 clrl %sp@- 43a68: 486e 0014 pea %fp@(20) 43a6c: 486e 0010 pea %fp@(16) 43a70: 486a 000c pea %a2@(12) 43a74: 2f02 movel %d2,%sp@- 43a76: 4e93 jsr %a3@ 43a78: 4fef 0014 lea %sp@(20),%sp 43a7c: 4a80 tstl %d0
43a7e: 67a0 beqs 43a20 <scanpw+0x2c> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0)
43a80: 42a7 clrl %sp@- 43a82: 486e 0014 pea %fp@(20) 43a86: 486e 0010 pea %fp@(16) 43a8a: 486a 0010 pea %a2@(16) 43a8e: 2f02 movel %d2,%sp@- 43a90: 4e93 jsr %a3@ 43a92: 4fef 0014 lea %sp@(20),%sp 43a96: 4a80 tstl %d0
43a98: 6786 beqs 43a20 <scanpw+0x2c> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
43a9a: 42a7 clrl %sp@- 43a9c: 486e 0014 pea %fp@(20) 43aa0: 486e 0010 pea %fp@(16) 43aa4: 486a 0014 pea %a2@(20) 43aa8: 2f02 movel %d2,%sp@- 43aaa: 4e93 jsr %a3@ 43aac: 4fef 0014 lea %sp@(20),%sp 43ab0: 4a80 tstl %d0 43ab2: 6700 ff6c beqw 43a20 <scanpw+0x2c>
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
43ab6: 4878 0001 pea 1 <ADD> 43aba: 486e 0014 pea %fp@(20) 43abe: 486e 0010 pea %fp@(16) 43ac2: 486a 0018 pea %a2@(24) 43ac6: 2f02 movel %d2,%sp@- 43ac8: 4e93 jsr %a3@ 43aca: 4fef 0014 lea %sp@(20),%sp 43ace: 4a80 tstl %d0 43ad0: 6700 ff4e beqw 43a20 <scanpw+0x2c>
return 0;
pwd->pw_uid = pwuid;
pwd->pw_gid = pwgid;
return 1;
43ad4: 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;
43ad6: 356e fffa 0008 movew %fp@(-6),%a2@(8)
pwd->pw_gid = pwgid;
43adc: 356e fffe 000a movew %fp@(-2),%a2@(10)
return 1; }
43ae2: 4cee 1c04 ffe8 moveml %fp@(-24),%d2/%a2-%a4
43ae8: 4e5e unlk %fp <== NOT EXECUTED
000473ac <sched_get_priority_max>:
int sched_get_priority_max(
int policy
)
{
switch ( policy ) {
473ac: 7004 moveq #4,%d0
#include <rtems/posix/priority.h>
int sched_get_priority_max(
int policy
)
{
473ae: 4e56 0000 linkw %fp,#0 473b2: 222e 0008 movel %fp@(8),%d1
switch ( policy ) {
473b6: b081 cmpl %d1,%d0
473b8: 6412 bccs 473cc <sched_get_priority_max+0x20>
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
473ba: 4eb9 0004 fd54 jsr 4fd54 <__errno> 473c0: 7216 moveq #22,%d1 473c2: 2040 moveal %d0,%a0 473c4: 70ff moveq #-1,%d0
}
return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
}
473c6: 4e5e unlk %fp
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
473c8: 2081 movel %d1,%a0@
}
return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
}
473ca: 4e75 rts
int sched_get_priority_max(
int policy
)
{
switch ( policy ) {
473cc: 103c 0001 moveb #1,%d0 473d0: e3a8 lsll %d1,%d0 473d2: 7217 moveq #23,%d1 473d4: c081 andl %d1,%d0
473d6: 67e2 beqs 473ba <sched_get_priority_max+0xe> <== NEVER TAKEN
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
473d8: 4280 clrl %d0 473da: 1039 0006 076a moveb 6076a <rtems_maximum_priority>,%d0
}
473e0: 4e5e unlk %fp
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
473e2: 5380 subql #1,%d0
}
...
000473e8 <sched_get_priority_min>:
int sched_get_priority_min(
int policy
)
{
switch ( policy ) {
473e8: 7004 moveq #4,%d0
#include <rtems/posix/priority.h>
int sched_get_priority_min(
int policy
)
{
473ea: 4e56 0000 linkw %fp,#0 473ee: 222e 0008 movel %fp@(8),%d1
switch ( policy ) {
473f2: b081 cmpl %d1,%d0
473f4: 6412 bccs 47408 <sched_get_priority_min+0x20> <== NEVER TAKEN
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
473f6: 4eb9 0004 fd54 jsr 4fd54 <__errno> 473fc: 7216 moveq #22,%d1 473fe: 2040 moveal %d0,%a0 47400: 70ff moveq #-1,%d0
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
}
47402: 4e5e unlk %fp
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
47404: 2081 movel %d1,%a0@
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
}
47406: 4e75 rts
int sched_get_priority_min(
int policy
)
{
switch ( policy ) {
47408: 103c 0001 moveb #1,%d0 4740c: e3a8 lsll %d1,%d0 4740e: 7217 moveq #23,%d1 47410: c081 andl %d1,%d0
47412: 67e2 beqs 473f6 <sched_get_priority_min+0xe> <== NEVER TAKEN
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
47414: 7001 moveq #1,%d0
}
47416: 4e5e unlk %fp
...
0004741c <sched_rr_get_interval>:
int sched_rr_get_interval(
pid_t pid,
struct timespec *interval
)
{
4741c: 4e56 0000 linkw %fp,#0 47420: 2f03 movel %d3,%sp@- 47422: 262e 0008 movel %fp@(8),%d3 47426: 2f02 movel %d2,%sp@- 47428: 242e 000c movel %fp@(12),%d2
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
4742c: 4a83 tstl %d3
4742e: 6622 bnes 47452 <sched_rr_get_interval+0x36> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ESRCH );
if ( !interval )
47430: 4a82 tstl %d2
47432: 6742 beqs 47476 <sched_rr_get_interval+0x5a>
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval );
47434: 2f02 movel %d2,%sp@- 47436: 2f39 0006 20c0 movel 620c0 <_Thread_Ticks_per_timeslice>,%sp@- 4743c: 4eb9 0004 ae5c jsr 4ae5c <_Timespec_From_ticks>
return 0; }
47442: 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;
47446: 508f addql #8,%sp 47448: 4280 clrl %d0
}
4744a: 262e fffc movel %fp@(-4),%d3 4744e: 4e5e unlk %fp 47450: 4e75 rts
{
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
47452: 4eb9 0004 39dc jsr 439dc <getpid> 47458: b680 cmpl %d0,%d3
4745a: 67d4 beqs 47430 <sched_rr_get_interval+0x14>
rtems_set_errno_and_return_minus_one( ESRCH );
4745c: 4eb9 0004 fd54 jsr 4fd54 <__errno> 47462: 7403 moveq #3,%d2 47464: 2040 moveal %d0,%a0 47466: 70ff moveq #-1,%d0 47468: 2082 movel %d2,%a0@
if ( !interval )
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval );
return 0;
}
4746a: 242e fff8 movel %fp@(-8),%d2 4746e: 262e fffc movel %fp@(-4),%d3 47472: 4e5e unlk %fp 47474: 4e75 rts
if ( pid && pid != getpid() )
rtems_set_errno_and_return_minus_one( ESRCH );
if ( !interval )
rtems_set_errno_and_return_minus_one( EINVAL );
47476: 4eb9 0004 fd54 jsr 4fd54 <__errno>
_Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval );
return 0;
}
4747c: 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 );
47480: 2040 moveal %d0,%a0 47482: 7216 moveq #22,%d1 47484: 70ff moveq #-1,%d0
_Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval );
return 0;
}
47486: 262e fffc movel %fp@(-4),%d3 4748a: 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 );
4748c: 2081 movel %d1,%a0@ <== NOT EXECUTED
_Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval );
return 0;
}
00049868 <sem_open>:
int oflag,
...
/* mode_t mode, */
/* unsigned int value */
)
{
49868: 4e56 ffdc linkw %fp,#-36
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
4986c: 2039 0006 61a4 movel 661a4 <_Thread_Dispatch_disable_level>,%d0 49872: 5280 addql #1,%d0 49874: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 49878: 23c0 0006 61a4 movel %d0,661a4 <_Thread_Dispatch_disable_level> 4987e: 2a2e 0008 movel %fp@(8),%d5 49882: 262e 000c movel %fp@(12),%d3
return _Thread_Dispatch_disable_level;
49886: 2039 0006 61a4 movel 661a4 <_Thread_Dispatch_disable_level>,%d0
POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
4988c: 2803 movel %d3,%d4 4988e: 0284 0000 0200 andil #512,%d4 49894: 6600 0086 bnew 4991c <sem_open+0xb4>
/* unsigned int value */
)
{
va_list arg;
mode_t mode;
unsigned int value = 0;
49898: 97cb subal %a3,%a3
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 );
4989a: 45ee fff4 lea %fp@(-12),%a2 4989e: 2f0a movel %a2,%sp@- 498a0: 2f05 movel %d5,%sp@- 498a2: 4eb9 0005 0388 jsr 50388 <_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 ) {
498a8: 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 );
498aa: 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 ) {
498ac: 6726 beqs 498d4 <sem_open+0x6c>
/*
* 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) ) ) {
498ae: 7002 moveq #2,%d0 498b0: b082 cmpl %d2,%d0
498b2: 6604 bnes 498b8 <sem_open+0x50> <== NEVER TAKEN
498b4: 4a84 tstl %d4
498b6: 666c bnes 49924 <sem_open+0xbc>
_Thread_Enable_dispatch();
498b8: 4eb9 0004 c91c jsr 4c91c <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( status, sem_t * );
498be: 4eb9 0005 3140 jsr 53140 <__errno> 498c4: 2040 moveal %d0,%a0 498c6: 70ff moveq #-1,%d0 498c8: 2082 movel %d2,%a0@
id = &the_semaphore->Semaphore_id;
#else
id = (sem_t *)&the_semaphore->Object.id;
#endif
return id;
}
498ca: 4cee 0c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a3 498d0: 4e5e unlk %fp 498d2: 4e75 rts
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
498d4: 0283 0000 0a00 andil #2560,%d3 498da: 0c83 0000 0a00 cmpil #2560,%d3
498e0: 6770 beqs 49952 <sem_open+0xea>
498e2: 486e fffc pea %fp@(-4)
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();
498e6: 47f9 0004 c91c lea 4c91c <_Thread_Enable_dispatch>,%a3 498ec: 2f12 movel %a2@,%sp@- 498ee: 4879 0006 63b2 pea 663b2 <_POSIX_Semaphore_Information> 498f4: 4eb9 0004 bb4c jsr 4bb4c <_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;
498fa: 2040 moveal %d0,%a0 498fc: 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 );
49900: 2d40 fff8 movel %d0,%fp@(-8)
the_semaphore->open_count += 1;
_Thread_Enable_dispatch();
49904: 4e93 jsr %a3@
_Thread_Enable_dispatch();
49906: 4e93 jsr %a3@
goto return_id;
49908: 4fef 000c lea %sp@(12),%sp
the_semaphore->Semaphore_id = the_semaphore->Object.id;
id = &the_semaphore->Semaphore_id;
#else
id = (sem_t *)&the_semaphore->Object.id;
#endif
return id;
4990c: 202e fff8 movel %fp@(-8),%d0 49910: 5080 addql #8,%d0
}
49912: 4cee 0c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a3 49918: 4e5e unlk %fp 4991a: 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 );
4991c: 266e 0014 moveal %fp@(20),%a3 49920: 6000 ff78 braw 4989a <sem_open+0x32>
/*
* 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(
49924: 486e fff8 pea %fp@(-8) 49928: 2f0b movel %a3,%sp@- 4992a: 42a7 clrl %sp@- 4992c: 2f05 movel %d5,%sp@- 4992e: 4eb9 0005 01cc jsr 501cc <_POSIX_Semaphore_Create_support> 49934: 2400 movel %d0,%d2
/*
* errno was set by Create_support, so don't set it again.
*/
_Thread_Enable_dispatch();
49936: 4eb9 0004 c91c jsr 4c91c <_Thread_Enable_dispatch>
if ( status == -1 )
4993c: 4fef 0010 lea %sp@(16),%sp 49940: 70ff moveq #-1,%d0 49942: b082 cmpl %d2,%d0
49944: 66c6 bnes 4990c <sem_open+0xa4>
return SEM_FAILED;
49946: 70ff moveq #-1,%d0
id = &the_semaphore->Semaphore_id;
#else
id = (sem_t *)&the_semaphore->Object.id;
#endif
return id;
}
49948: 4cee 0c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a3 4994e: 4e5e unlk %fp 49950: 4e75 rts
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
_Thread_Enable_dispatch();
49952: 4eb9 0004 c91c jsr 4c91c <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
49958: 4eb9 0005 3140 jsr 53140 <__errno> 4995e: 7211 moveq #17,%d1 49960: 2040 moveal %d0,%a0 49962: 70ff moveq #-1,%d0
id = &the_semaphore->Semaphore_id;
#else
id = (sem_t *)&the_semaphore->Object.id;
#endif
return id;
}
49964: 4cee 0c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a3
* 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 * );
4996a: 2081 movel %d1,%a0@
id = &the_semaphore->Semaphore_id;
#else
id = (sem_t *)&the_semaphore->Object.id;
#endif
return id;
}
4996c: 4e5e unlk %fp <== NOT EXECUTED
000499c8 <sem_timedwait>:
int sem_timedwait(
sem_t *sem,
const struct timespec *abstime
)
{
499c8: 4e56 fffc linkw %fp,#-4 499cc: 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 );
499ce: 486e fffc pea %fp@(-4) 499d2: 2f2e 000c movel %fp@(12),%sp@-
int sem_timedwait(
sem_t *sem,
const struct timespec *abstime
)
{
499d6: 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 );
499da: 4eb9 0004 f7fc jsr 4f7fc <_POSIX_Absolute_timeout_to_ticks>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
499e0: 508f addql #8,%sp 499e2: 7203 moveq #3,%d1 499e4: b280 cmpl %d0,%d1
499e6: 671a beqs 49a02 <sem_timedwait+0x3a> <== ALWAYS TAKEN
do_wait = false;
lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
499e8: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 499ec: 42a7 clrl %sp@- <== NOT EXECUTED 499ee: 2f02 movel %d2,%sp@- <== NOT EXECUTED 499f0: 4eb9 0005 03fc jsr 503fc <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED
lock_status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
rtems_set_errno_and_return_minus_one( ETIMEDOUT );
}
return lock_status;
}
499f6: 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 );
499fa: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
lock_status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
rtems_set_errno_and_return_minus_one( ETIMEDOUT );
}
return lock_status;
}
499fe: 4e5e unlk %fp <== NOT EXECUTED 49a00: 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 );
49a02: 2f2e fffc movel %fp@(-4),%sp@- 49a06: 4878 0001 pea 1 <ADD> 49a0a: 2f02 movel %d2,%sp@- 49a0c: 4eb9 0005 03fc jsr 503fc <_POSIX_Semaphore_Wait_support>
lock_status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
rtems_set_errno_and_return_minus_one( ETIMEDOUT );
}
return lock_status;
}
49a12: 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 );
49a16: 4fef 000c lea %sp@(12),%sp
lock_status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
rtems_set_errno_and_return_minus_one( ETIMEDOUT );
}
return lock_status;
}
49a1a: 4e5e unlk %fp
...
000470a4 <sigaction>:
int sigaction(
int sig,
const struct sigaction *act,
struct sigaction *oact
)
{
470a4: 4e56 fff4 linkw %fp,#-12 470a8: 226e 0010 moveal %fp@(16),%a1 470ac: 48d7 040c moveml %d2-%d3/%a2,%sp@ 470b0: 242e 0008 movel %fp@(8),%d2 470b4: 246e 000c moveal %fp@(12),%a2
ISR_Level level;
if ( oact )
470b8: 4a89 tstl %a1
470ba: 6718 beqs 470d4 <sigaction+0x30>
*oact = _POSIX_signals_Vectors[ sig ];
470bc: 2202 movel %d2,%d1 470be: 2002 movel %d2,%d0 470c0: e989 lsll #4,%d1 470c2: e588 lsll #2,%d0 470c4: 2041 moveal %d1,%a0 470c6: 91c0 subal %d0,%a0 470c8: d1fc 0006 30f4 addal #405748,%a0 470ce: 22d8 movel %a0@+,%a1@+ 470d0: 22d8 movel %a0@+,%a1@+ 470d2: 2290 movel %a0@,%a1@
if ( !sig )
470d4: 4a82 tstl %d2 470d6: 6700 0088 beqw 47160 <sigaction+0xbc>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
470da: 2002 movel %d2,%d0 470dc: 5380 subql #1,%d0
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
470de: 721f moveq #31,%d1 470e0: b280 cmpl %d0,%d1
470e2: 657c bcss 47160 <sigaction+0xbc>
*
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
470e4: 7009 moveq #9,%d0 470e6: b082 cmpl %d2,%d0
470e8: 6776 beqs 47160 <sigaction+0xbc>
/*
* Evaluate the new action structure and set the global signal vector
* appropriately.
*/
if ( act ) {
470ea: 4a8a tstl %a2
470ec: 6766 beqs 47154 <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 );
470ee: 203c 0000 0700 movel #1792,%d0 470f4: 40c3 movew %sr,%d3 470f6: 8083 orl %d3,%d0 470f8: 46c0 movew %d0,%sr
if ( act->sa_handler == SIG_DFL ) {
470fa: 4aaa 0008 tstl %a2@(8)
470fe: 6730 beqs 47130 <sigaction+0x8c>
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
} else {
_POSIX_signals_Clear_process_signals( sig );
47100: 2f02 movel %d2,%sp@- 47102: 4eb9 0004 d1c8 jsr 4d1c8 <_POSIX_signals_Clear_process_signals>
_POSIX_signals_Vectors[ sig ] = *act;
47108: 588f addql #4,%sp 4710a: 2002 movel %d2,%d0 4710c: 224a moveal %a2,%a1 4710e: e98a lsll #4,%d2 47110: e588 lsll #2,%d0 47112: 2042 moveal %d2,%a0 47114: 91c0 subal %d0,%a0 47116: d1fc 0006 30f4 addal #405748,%a0 4711c: 20d9 movel %a1@+,%a0@+ 4711e: 20d9 movel %a1@+,%a0@+ 47120: 2091 movel %a1@,%a0@
}
_ISR_Enable( level );
47122: 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;
47124: 4280 clrl %d0
}
47126: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4712c: 4e5e unlk %fp 4712e: 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 ];
47130: 2002 movel %d2,%d0 47132: e98a lsll #4,%d2 47134: e588 lsll #2,%d0 47136: 9480 subl %d0,%d2 47138: 2242 moveal %d2,%a1 4713a: 2042 moveal %d2,%a0 4713c: d3fc 0006 063a addal #394810,%a1 47142: d1fc 0006 30f4 addal #405748,%a0 47148: 20d9 movel %a1@+,%a0@+ 4714a: 20d9 movel %a1@+,%a0@+ 4714c: 2091 movel %a1@,%a0@
} else {
_POSIX_signals_Clear_process_signals( sig );
_POSIX_signals_Vectors[ sig ] = *act;
}
_ISR_Enable( level );
4714e: 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;
47150: 4280 clrl %d0 47152: 60d2 bras 47126 <sigaction+0x82>
47154: 4280 clrl %d0 <== NOT EXECUTED
}
47156: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 4715c: 4e5e unlk %fp <== NOT EXECUTED 4715e: 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 );
47160: 4eb9 0004 ffa8 jsr 4ffa8 <__errno> 47166: 7216 moveq #22,%d1 47168: 2040 moveal %d0,%a0 4716a: 70ff moveq #-1,%d0
* + If we are now ignoring a signal that was previously pending,
* we clear the pending signal indicator.
*/
return 0;
}
4716c: 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 );
47172: 2081 movel %d1,%a0@
* + If we are now ignoring a signal that was previously pending,
* we clear the pending signal indicator.
*/
return 0;
}
47174: 4e5e unlk %fp <== NOT EXECUTED
00049a50 <sigwait>:
int sigwait(
const sigset_t *set,
int *sig
)
{
49a50: 4e56 0000 linkw %fp,#0 49a54: 2f0a movel %a2,%sp@- 49a56: 246e 000c moveal %fp@(12),%a2
int status;
status = sigtimedwait( set, NULL, NULL );
49a5a: 42a7 clrl %sp@- 49a5c: 42a7 clrl %sp@- 49a5e: 2f2e 0008 movel %fp@(8),%sp@- 49a62: 4eb9 0004 9834 jsr 49834 <sigtimedwait>
if ( status != -1 ) {
49a68: 4fef 000c lea %sp@(12),%sp 49a6c: 72ff moveq #-1,%d1 49a6e: b280 cmpl %d0,%d1
49a70: 6710 beqs 49a82 <sigwait+0x32>
if ( sig )
49a72: 4a8a tstl %a2
49a74: 671e beqs 49a94 <sigwait+0x44> <== NEVER TAKEN
*sig = status;
49a76: 2480 movel %d0,%a2@
return 0;
}
return errno;
}
49a78: 246e fffc moveal %fp@(-4),%a2
status = sigtimedwait( set, NULL, NULL );
if ( status != -1 ) {
if ( sig )
*sig = status;
return 0;
49a7c: 4280 clrl %d0
}
return errno;
}
49a7e: 4e5e unlk %fp 49a80: 4e75 rts
if ( sig )
*sig = status;
return 0;
}
return errno;
49a82: 4eb9 0005 25fc jsr 525fc <__errno>
}
49a88: 246e fffc moveal %fp@(-4),%a2
if ( sig )
*sig = status;
return 0;
}
return errno;
49a8c: 2040 moveal %d0,%a0
}
49a8e: 4e5e unlk %fp
if ( sig )
*sig = status;
return 0;
}
return errno;
49a90: 2010 movel %a0@,%d0
}
49a92: 4e75 rts
49a94: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
status = sigtimedwait( set, NULL, NULL );
if ( status != -1 ) {
if ( sig )
*sig = status;
return 0;
49a98: 4280 clrl %d0 <== NOT EXECUTED
}
return errno;
}
49a9a: 4e5e unlk %fp <== NOT EXECUTED
...
000454b0 <siproc>:
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
454b0: 4e56 0000 linkw %fp,#0 454b4: 2f0a movel %a2,%sp@- 454b6: 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)) {
454ba: 202a 003c movel %a2@(60),%d0 454be: 0280 0000 0e78 andil #3704,%d0
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
454c4: 2f02 movel %d2,%sp@- 454c6: 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)) {
454ca: 4a80 tstl %d0
454cc: 661c bnes 454ea <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);
454ce: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED
} return i; }
454d2: 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);
454d6: 0282 0000 00ff andil #255,%d2 <== NOT EXECUTED 454dc: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED
} return i; }
454e0: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 454e4: 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);
454e6: 6000 fdd0 braw 452b8 <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);
454ea: 42a7 clrl %sp@-
*/
c_buf = c;
rtems_termios_enqueue_raw_characters ( tty,&c_buf,1);
}
}
}
454ec: 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);
454f2: 42a7 clrl %sp@- 454f4: 2f2a 0018 movel %a2@(24),%sp@- 454f8: 4eb9 0004 6acc jsr 46acc <rtems_semaphore_obtain>
i = iproc (c, tty);
454fe: 2f0a movel %a2,%sp@- 45500: 2f02 movel %d2,%sp@- 45502: 4eba fdb4 jsr %pc@(452b8 <iproc>)
rtems_semaphore_release (tty->osem);
45506: 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);
4550a: 2400 movel %d0,%d2
rtems_semaphore_release (tty->osem);
4550c: 4eb9 0004 6c1c jsr 46c1c <rtems_semaphore_release>
}
else {
i = iproc (c, tty);
}
return i;
}
45512: 246e fffc moveal %fp@(-4),%a2 45516: 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);
45518: 4fef 0018 lea %sp@(24),%sp
}
else {
i = iproc (c, tty);
}
return i;
}
4551c: 242e fff8 movel %fp@(-8),%d2
45520: 4e5e unlk %fp <== NOT EXECUTED
00046d90 <statvfs>:
#include <sys/statvfs.h>
int
statvfs (const char *path, struct statvfs *sb)
{
46d90: 4e56 ffdc linkw %fp,#-36 46d94: 48d7 001c moveml %d2-%d4,%sp@ 46d98: 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 ) )
46d9c: 260e movel %fp,%d3 46d9e: 0683 ffff ffec addil #-20,%d3 46da4: 2f02 movel %d2,%sp@-
#include <sys/statvfs.h>
int
statvfs (const char *path, struct statvfs *sb)
{
46da6: 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 ) )
46daa: 4eb9 0005 3e8c jsr 53e8c <strlen> 46db0: 7201 moveq #1,%d1 46db2: 2e81 movel %d1,%sp@ 46db4: 2f03 movel %d3,%sp@- 46db6: 42a7 clrl %sp@- 46db8: 2f00 movel %d0,%sp@- 46dba: 2f02 movel %d2,%sp@- 46dbc: 4eb9 0004 57ac jsr 457ac <rtems_filesystem_evaluate_path> 46dc2: 4fef 0014 lea %sp@(20),%sp 46dc6: 4a80 tstl %d0
46dc8: 6650 bnes 46e1a <statvfs+0x8a> <== NEVER TAKEN
return -1;
mt_entry = loc.mt_entry;
fs_mount_root = &mt_entry->mt_fs_root;
memset (sb, 0, sizeof (struct statvfs));
46dca: 2044 moveal %d4,%a0 46dcc: 4298 clrl %a0@+
*/
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) )
return -1;
mt_entry = loc.mt_entry;
46dce: 226e fffc moveal %fp@(-4),%a1
fs_mount_root = &mt_entry->mt_fs_root;
memset (sb, 0, sizeof (struct statvfs));
46dd2: 4298 clrl %a0@+ 46dd4: 4298 clrl %a0@+ 46dd6: 4298 clrl %a0@+ 46dd8: 4298 clrl %a0@+ 46dda: 4298 clrl %a0@+ 46ddc: 4298 clrl %a0@+ 46dde: 4298 clrl %a0@+ 46de0: 4298 clrl %a0@+ 46de2: 4298 clrl %a0@+ 46de4: 4298 clrl %a0@+ 46de6: 4298 clrl %a0@+ 46de8: 4298 clrl %a0@+ 46dea: 4290 clrl %a0@
result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb );
46dec: 2069 0028 moveal %a1@(40),%a0 46df0: 2f04 movel %d4,%sp@- 46df2: 4869 001c pea %a1@(28) 46df6: 2068 0044 moveal %a0@(68),%a0 46dfa: 4e90 jsr %a0@
rtems_filesystem_freenode( &loc );
46dfc: 2f03 movel %d3,%sp@- 46dfe: 2d40 ffe8 movel %d0,%fp@(-24) 46e02: 4eb9 0004 5890 jsr 45890 <rtems_filesystem_freenode>
return result;
46e08: 202e ffe8 movel %fp@(-24),%d0 46e0c: 4fef 000c lea %sp@(12),%sp
}
46e10: 4cee 001c ffdc moveml %fp@(-36),%d2-%d4 46e16: 4e5e unlk %fp 46e18: 4e75 rts
* The node for the directory that the fileystem is mounted on.
* The mount entry that is being refered to.
*/
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) )
return -1;
46e1a: 70ff moveq #-1,%d0 <== NOT EXECUTED
result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb );
rtems_filesystem_freenode( &loc );
return result;
}
46e1c: 4cee 001c ffdc moveml %fp@(-36),%d2-%d4 <== NOT EXECUTED 46e22: 4e5e unlk %fp <== NOT EXECUTED
...
00045484 <sync_per_thread>:
fdatasync(fn);
}
/* iterate over all FILE *'s for this thread */
static void sync_per_thread(Thread_Control *t)
{
45484: 4e56 0000 linkw %fp,#0 45488: 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;
4548c: 2028 00fa movel %a0@(250),%d0
fdatasync(fn);
}
/* iterate over all FILE *'s for this thread */
static void sync_per_thread(Thread_Control *t)
{
45490: 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 ) {
45492: 4a80 tstl %d0
45494: 6728 beqs 454be <sync_per_thread+0x3a> <== NEVER TAKEN
current_reent = _Thread_Executing->libc_reent;
45496: 2279 0006 2eca moveal 62eca <_Per_CPU_Information+0xc>,%a1 4549c: 2429 00fa movel %a1@(250),%d2
_Thread_Executing->libc_reent = this_reent;
454a0: 2340 00fa movel %d0,%a1@(250)
_fwalk (t->libc_reent, sync_wrapper);
454a4: 487a 0020 pea %pc@(454c6 <sync_wrapper>) 454a8: 2f28 00fa movel %a0@(250),%sp@- 454ac: 4eb9 0005 0f28 jsr 50f28 <_fwalk>
_Thread_Executing->libc_reent = current_reent;
454b2: 2079 0006 2eca moveal 62eca <_Per_CPU_Information+0xc>,%a0 454b8: 508f addql #8,%sp 454ba: 2142 00fa movel %d2,%a0@(250)
} }
454be: 242e fffc movel %fp@(-4),%d2
454c2: 4e5e unlk %fp <== NOT EXECUTED
0004cd0c <tcsetattr>:
int tcsetattr(
int fd,
int opt,
struct termios *tp
)
{
4cd0c: 4e56 0000 linkw %fp,#0 4cd10: 202e 000c movel %fp@(12),%d0 4cd14: 2f03 movel %d3,%sp@- 4cd16: 262e 0010 movel %fp@(16),%d3 4cd1a: 2f02 movel %d2,%sp@- 4cd1c: 242e 0008 movel %fp@(8),%d2
switch (opt) {
4cd20: 4a80 tstl %d0
4cd22: 6738 beqs 4cd5c <tcsetattr+0x50>
4cd24: 7201 moveq #1,%d1 4cd26: b280 cmpl %d0,%d1
4cd28: 671c beqs 4cd46 <tcsetattr+0x3a>
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
4cd2a: 4eb9 0005 0bd8 jsr 50bd8 <__errno> 4cd30: 2040 moveal %d0,%a0 4cd32: 20bc 0000 0086 movel #134,%a0@
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
}
}
4cd38: 242e fff8 movel %fp@(-8),%d2 4cd3c: 70ff moveq #-1,%d0 4cd3e: 262e fffc movel %fp@(-4),%d3 4cd42: 4e5e unlk %fp 4cd44: 4e75 rts
switch (opt) {
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
case TCSADRAIN:
if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0)
4cd46: 42a7 clrl %sp@- 4cd48: 4878 0003 pea 3 <DIVIDE> 4cd4c: 2f02 movel %d2,%sp@- 4cd4e: 4eb9 0004 c968 jsr 4c968 <ioctl> 4cd54: 4fef 000c lea %sp@(12),%sp 4cd58: 4a80 tstl %d0
4cd5a: 6ddc blts 4cd38 <tcsetattr+0x2c> <== NEVER TAKEN
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
4cd5c: 2d43 0010 movel %d3,%fp@(16) 4cd60: 7002 moveq #2,%d0 4cd62: 2d42 0008 movel %d2,%fp@(8)
} }
4cd66: 242e fff8 movel %fp@(-8),%d2 4cd6a: 262e fffc movel %fp@(-4),%d3
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
4cd6e: 2d40 000c movel %d0,%fp@(12)
} }
4cd72: 4e5e unlk %fp
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
4cd74: 4ef9 0004 c968 jmp 4c968 <ioctl>
...
0004666a <ualarm>:
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
4666a: 4e56 ffe8 linkw %fp,#-24 4666e: 48d7 041c moveml %d2-%d4/%a2,%sp@ 46672: 242e 0008 movel %fp@(8),%d2
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
46676: 4ab9 0006 2f18 tstl 62f18 <_POSIX_signals_Ualarm_timer+0x1c> 4667c: 6700 0086 beqw 46704 <ualarm+0x9a>
_Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL );
} else {
Watchdog_States state;
state = _Watchdog_Remove( the_timer );
46680: 4879 0006 2efc pea 62efc <_POSIX_signals_Ualarm_timer> 46686: 4eb9 0004 a5b4 jsr 4a5b4 <_Watchdog_Remove>
if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) {
4668c: 588f addql #4,%sp 4668e: 7201 moveq #1,%d1 46690: 5580 subql #2,%d0 46692: b280 cmpl %d0,%d1 46694: 6400 0098 bccw 4672e <ualarm+0xc4>
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
useconds_t remaining = 0;
46698: 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 ) {
4669a: 4a82 tstl %d2 <== NOT EXECUTED 4669c: 660c bnes 466aa <ualarm+0x40> <== NOT EXECUTED
_Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) );
}
return remaining;
}
4669e: 2003 movel %d3,%d0 466a0: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 466a6: 4e5e unlk %fp 466a8: 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 );
466aa: 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;
466ac: 223c 000f 4240 movel #1000000,%d1
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
ticks = _Timespec_To_ticks( &tp );
466b2: 5184 subql #8,%d4 466b4: 45f9 0004 a0c4 lea 4a0c4 <_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;
466ba: 4c41 2000 remul %d1,%d0,%d2 466be: 4c41 2002 remul %d1,%d2,%d2
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
466c2: 223c 0000 03e8 movel #1000,%d1 466c8: 4c00 1800 mulsl %d0,%d1
ticks = _Timespec_To_ticks( &tp );
466cc: 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;
466ce: 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;
466d2: 2d42 fff8 movel %d2,%fp@(-8)
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
ticks = _Timespec_To_ticks( &tp );
466d6: 4e92 jsr %a2@
if ( ticks == 0 )
ticks = 1;
_Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) );
466d8: 2f04 movel %d4,%sp@- 466da: 4e92 jsr %a2@
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
466dc: 4879 0006 2efc pea 62efc <_POSIX_signals_Ualarm_timer> 466e2: 4879 0006 27a0 pea 627a0 <_Watchdog_Ticks_chain>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
466e8: 23c0 0006 2f08 movel %d0,62f08 <_POSIX_signals_Ualarm_timer+0xc>
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
466ee: 4eb9 0004 a46c jsr 4a46c <_Watchdog_Insert> 466f4: 4fef 0010 lea %sp@(16),%sp
}
return remaining;
}
466f8: 2003 movel %d3,%d0 466fa: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 46700: 4e5e unlk %fp 46702: 4e75 rts
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
46704: 42b9 0006 2f04 clrl 62f04 <_POSIX_signals_Ualarm_timer+0x8>
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
useconds_t remaining = 0;
4670a: 4283 clrl %d3
the_watchdog->routine = routine;
4670c: 203c 0004 6628 movel #288296,%d0
the_watchdog->id = id;
46712: 42b9 0006 2f1c clrl 62f1c <_POSIX_signals_Ualarm_timer+0x20>
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
46718: 23c0 0006 2f18 movel %d0,62f18 <_POSIX_signals_Ualarm_timer+0x1c>
the_watchdog->id = id; the_watchdog->user_data = user_data;
4671e: 42b9 0006 2f20 clrl 62f20 <_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 ) {
46724: 4a82 tstl %d2 46726: 6700 ff76 beqw 4669e <ualarm+0x34> 4672a: 6000 ff7e braw 466aa <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);
4672e: 2039 0006 2f10 movel 62f10 <_POSIX_signals_Ualarm_timer+0x14>,%d0 46734: d0b9 0006 2f08 addl 62f08 <_POSIX_signals_Ualarm_timer+0xc>,%d0
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
4673a: 486e fff8 pea %fp@(-8) 4673e: 90b9 0006 2f14 subl 62f14 <_POSIX_signals_Ualarm_timer+0x18>,%d0
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
46744: 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 );
4674a: 2f00 movel %d0,%sp@- 4674c: 4eb9 0004 a034 jsr 4a034 <_Timespec_From_ticks>
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
46752: 202e fff8 movel %fp@(-8),%d0 46756: 4c04 0800 mulsl %d4,%d0
remaining += tp.tv_nsec / 1000;
4675a: 283c 0000 03e8 movel #1000,%d4 46760: 508f addql #8,%sp 46762: 262e fffc movel %fp@(-4),%d3 46766: 4c44 3803 remsl %d4,%d3,%d3 4676a: 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 ) {
4676c: 4a82 tstl %d2 4676e: 6700 ff2e beqw 4669e <ualarm+0x34>
46772: 6000 ff36 braw 466aa <ualarm+0x40> <== NOT EXECUTED
...
00046fc4 <unlink>:
#include <rtems/seterr.h>
int unlink(
const char *path
)
{
46fc4: 4e56 ffbc linkw %fp,#-68 46fc8: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 46fcc: 242e 0008 movel %fp@(8),%d2
/*
* Get the node to be unlinked. Find the parent path first.
*/
parentpathlen = rtems_filesystem_dirname ( path );
46fd0: 2f02 movel %d2,%sp@- 46fd2: 4eb9 0004 40fc jsr 440fc <rtems_filesystem_dirname>
if ( parentpathlen == 0 )
46fd8: 588f addql #4,%sp 46fda: 4a80 tstl %d0 46fdc: 6600 0088 bnew 47066 <unlink+0xa2>
rtems_filesystem_get_start_loc( path, &i, &parentloc );
46fe0: 45ee ffd4 lea %fp@(-44),%a2 46fe4: 4283 clrl %d3
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
name = path + parentpathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
46fe6: 47f9 0005 44f0 lea 544f0 <strlen>,%a3
*/
parentpathlen = rtems_filesystem_dirname ( path );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( path, &i, &parentloc );
46fec: 2f0a movel %a2,%sp@- 46fee: 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;
46ff2: 4204 clrb %d4
*/
parentpathlen = rtems_filesystem_dirname ( path );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( path, &i, &parentloc );
46ff4: 2f02 movel %d2,%sp@-
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
name = path + parentpathlen;
46ff6: d483 addl %d3,%d2
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
46ff8: 260e movel %fp,%d3 46ffa: 0683 ffff ffe8 addil #-24,%d3
*/
parentpathlen = rtems_filesystem_dirname ( path );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( path, &i, &parentloc );
47000: 4eb9 0004 51b0 jsr 451b0 <rtems_filesystem_get_start_loc>
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
47006: 2d52 ffe8 movel %a2@,%fp@(-24)
*/
parentpathlen = rtems_filesystem_dirname ( path );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( path, &i, &parentloc );
4700a: 4fef 000c lea %sp@(12),%sp
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
4700e: 2d6e ffd8 ffec movel %fp@(-40),%fp@(-20) 47014: 2d6e ffdc fff0 movel %fp@(-36),%fp@(-16) 4701a: 2d6e ffe0 fff4 movel %fp@(-32),%fp@(-12) 47020: 2d6e ffe4 fff8 movel %fp@(-28),%fp@(-8)
name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) );
47026: 2f02 movel %d2,%sp@- 47028: 4e93 jsr %a3@ 4702a: 2e80 movel %d0,%sp@ 4702c: 2f02 movel %d2,%sp@- 4702e: 4eb9 0004 413e jsr 4413e <rtems_filesystem_prefix_separators> 47034: d480 addl %d0,%d2
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
47036: 2f02 movel %d2,%sp@- 47038: 4e93 jsr %a3@ 4703a: 4297 clrl %sp@ 4703c: 2f03 movel %d3,%sp@- 4703e: 42a7 clrl %sp@- 47040: 2f00 movel %d0,%sp@- 47042: 2f02 movel %d2,%sp@- 47044: 4eb9 0004 4040 jsr 44040 <rtems_filesystem_evaluate_relative_path>
0, &loc, false );
if ( result != 0 ) {
4704a: 4fef 001c lea %sp@(28),%sp 4704e: 4a80 tstl %d0 47050: 6700 0090 beqw 470e2 <unlink+0x11e>
if ( free_parentloc )
47054: 4a04 tstb %d4 47056: 6600 00dc bnew 47134 <unlink+0x170>
rtems_filesystem_freenode( &parentloc );
return -1;
4705a: 70ff moveq #-1,%d0
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return result;
}
4705c: 4cee 0c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a3 47062: 4e5e unlk %fp 47064: 4e75 rts
parentpathlen = rtems_filesystem_dirname ( path );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( path, &i, &parentloc );
else {
result = rtems_filesystem_evaluate_path( path, parentpathlen,
47066: 42a7 clrl %sp@- 47068: 45ee ffd4 lea %fp@(-44),%a2 4706c: 2600 movel %d0,%d3 4706e: 2f0a movel %a2,%sp@- 47070: 4878 0002 pea 2 <DOUBLE_FLOAT> 47074: 2f00 movel %d0,%sp@- 47076: 2f02 movel %d2,%sp@- 47078: 4eb9 0004 40b0 jsr 440b0 <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
4707e: 4fef 0014 lea %sp@(20),%sp 47082: 4a80 tstl %d0
47084: 66d4 bnes 4705a <unlink+0x96> <== NEVER TAKEN
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
47086: 2d52 ffe8 movel %a2@,%fp@(-24)
name = path + parentpathlen;
4708a: d483 addl %d3,%d2
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
4708c: 47f9 0005 44f0 lea 544f0 <strlen>,%a3
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
47092: 260e movel %fp,%d3 47094: 0683 ffff ffe8 addil #-24,%d3
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
4709a: 2d6e ffd8 ffec movel %fp@(-40),%fp@(-20) 470a0: 2d6e ffdc fff0 movel %fp@(-36),%fp@(-16) 470a6: 2d6e ffe0 fff4 movel %fp@(-32),%fp@(-12) 470ac: 2d6e ffe4 fff8 movel %fp@(-28),%fp@(-8)
name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) );
470b2: 2f02 movel %d2,%sp@-
&parentloc,
false );
if ( result != 0 )
return -1;
free_parentloc = true;
470b4: 7801 moveq #1,%d4
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
name = path + parentpathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
470b6: 4e93 jsr %a3@ 470b8: 2e80 movel %d0,%sp@ 470ba: 2f02 movel %d2,%sp@- 470bc: 4eb9 0004 413e jsr 4413e <rtems_filesystem_prefix_separators> 470c2: d480 addl %d0,%d2
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
470c4: 2f02 movel %d2,%sp@- 470c6: 4e93 jsr %a3@ 470c8: 4297 clrl %sp@ 470ca: 2f03 movel %d3,%sp@- 470cc: 42a7 clrl %sp@- 470ce: 2f00 movel %d0,%sp@- 470d0: 2f02 movel %d2,%sp@- 470d2: 4eb9 0004 4040 jsr 44040 <rtems_filesystem_evaluate_relative_path>
0, &loc, false );
if ( result != 0 ) {
470d8: 4fef 001c lea %sp@(28),%sp 470dc: 4a80 tstl %d0 470de: 6600 ff74 bnew 47054 <unlink+0x90>
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return -1;
}
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
470e2: 206e fff4 moveal %fp@(-12),%a0 470e6: 2f03 movel %d3,%sp@- 470e8: 2068 0010 moveal %a0@(16),%a0 470ec: 4e90 jsr %a0@ 470ee: 588f addql #4,%sp 470f0: 7201 moveq #1,%d1 470f2: b280 cmpl %d0,%d1
470f4: 675c beqs 47152 <unlink+0x18e>
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( EISDIR );
}
result = (*loc.ops->unlink_h)( &parentloc, &loc );
470f6: 2f03 movel %d3,%sp@- 470f8: 206e fff4 moveal %fp@(-12),%a0 470fc: 2f0a movel %a2,%sp@- 470fe: 2068 000c moveal %a0@(12),%a0
rtems_filesystem_freenode( &loc );
47102: 47f9 0004 4194 lea 44194 <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 );
47108: 4e90 jsr %a0@
rtems_filesystem_freenode( &loc );
4710a: 2f03 movel %d3,%sp@- 4710c: 2d40 ffd0 movel %d0,%fp@(-48) 47110: 4e93 jsr %a3@
if ( free_parentloc )
47112: 202e ffd0 movel %fp@(-48),%d0 47116: 4fef 000c lea %sp@(12),%sp 4711a: 4a04 tstb %d4 4711c: 6700 ff3e beqw 4705c <unlink+0x98>
rtems_filesystem_freenode( &parentloc );
47120: 2f0a movel %a2,%sp@- 47122: 4e93 jsr %a3@ 47124: 202e ffd0 movel %fp@(-48),%d0 47128: 588f addql #4,%sp
return result;
}
4712a: 4cee 0c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a3 47130: 4e5e unlk %fp 47132: 4e75 rts
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return -1;
47134: 70ff moveq #-1,%d0
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
47136: 2f0a movel %a2,%sp@- 47138: 2d40 ffd0 movel %d0,%fp@(-48) 4713c: 4eb9 0004 4194 jsr 44194 <rtems_filesystem_freenode> 47142: 202e ffd0 movel %fp@(-48),%d0 47146: 588f addql #4,%sp
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return result;
}
47148: 4cee 0c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a3 4714e: 4e5e unlk %fp 47150: 4e75 rts
rtems_filesystem_freenode( &parentloc );
return -1;
}
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_filesystem_freenode( &loc );
47152: 2f03 movel %d3,%sp@- 47154: 47f9 0004 4194 lea 44194 <rtems_filesystem_freenode>,%a3 4715a: 4e93 jsr %a3@
if ( free_parentloc )
4715c: 588f addql #4,%sp 4715e: 4a04 tstb %d4
47160: 6618 bnes 4717a <unlink+0x1b6>
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( EISDIR );
47162: 4eb9 0005 3184 jsr 53184 <__errno> 47168: 7215 moveq #21,%d1 4716a: 2040 moveal %d0,%a0 4716c: 70ff moveq #-1,%d0 4716e: 2081 movel %d1,%a0@
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return result;
}
47170: 4cee 0c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a3 47176: 4e5e unlk %fp 47178: 4e75 rts
}
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
4717a: 2f0a movel %a2,%sp@- 4717c: 4e93 jsr %a3@ 4717e: 588f addql #4,%sp
rtems_set_errno_and_return_minus_one( EISDIR );
47180: 4eb9 0005 3184 jsr 53184 <__errno> 47186: 7215 moveq #21,%d1 47188: 2040 moveal %d0,%a0 4718a: 70ff moveq #-1,%d0 4718c: 2081 movel %d1,%a0@ 4718e: 60e0 bras 47170 <unlink+0x1ac>
0004a214 <unmount>:
*/
int unmount(
const char *path
)
{
4a214: 4e56 ffe0 linkw %fp,#-32 4a218: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 4a21c: 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 ) )
4a220: 240e movel %fp,%d2 4a222: 0682 ffff ffec addil #-20,%d2 4a228: 2f0a movel %a2,%sp@- 4a22a: 4eb9 0005 f084 jsr 5f084 <strlen> 4a230: 7201 moveq #1,%d1 4a232: 2e81 movel %d1,%sp@ 4a234: 2f02 movel %d2,%sp@- 4a236: 42a7 clrl %sp@- 4a238: 2f00 movel %d0,%sp@- 4a23a: 2f0a movel %a2,%sp@- 4a23c: 4eb9 0004 65e8 jsr 465e8 <rtems_filesystem_evaluate_path> 4a242: 4fef 0014 lea %sp@(20),%sp 4a246: 4a80 tstl %d0 4a248: 6600 008a bnew 4a2d4 <unmount+0xc0>
return -1;
mt_entry = loc.mt_entry;
4a24c: 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 ){
4a250: 202e ffec movel %fp@(-20),%d0 4a254: b0aa 001c cmpl %a2@(28),%d0 4a258: 6600 00c8 bnew 4a322 <unmount+0x10e>
/*
* Free the loc node and just use the nodes from the mt_entry .
*/
rtems_filesystem_freenode( &loc );
4a25c: 2f02 movel %d2,%sp@- 4a25e: 47f9 0004 67f8 lea 467f8 <rtems_filesystem_freenode>,%a3 4a264: 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 )
4a266: 2079 0006 eb00 moveal 6eb00 <rtems_current_user_env>,%a0 4a26c: 588f addql #4,%sp 4a26e: b5e8 0014 cmpal %a0@(20),%a2 4a272: 6700 00d8 beqw 4a34c <unmount+0x138>
/*
* Verify there are no file systems below the path specified
*/
if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point,
4a276: 2f2a 002c movel %a2@(44),%sp@- 4a27a: 487a ff80 pea %pc@(4a1fc <is_fs_below_mount_point>) 4a27e: 4eb9 0004 7154 jsr 47154 <rtems_filesystem_mount_iterate> 4a284: 508f addql #8,%sp 4a286: 4a00 tstb %d0 4a288: 6600 00c2 bnew 4a34c <unmount+0x138>
* 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 )
4a28c: 2f0a movel %a2,%sp@- 4a28e: 4eb9 0004 6bae jsr 46bae <rtems_libio_is_open_files_in_fs> 4a294: 588f addql #4,%sp 4a296: 7201 moveq #1,%d1 4a298: b280 cmpl %d0,%d1 4a29a: 6700 00b0 beqw 4a34c <unmount+0x138>
* 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 )
4a29e: 206a 0014 moveal %a2@(20),%a0 4a2a2: 2f0a movel %a2,%sp@- 4a2a4: 2068 0028 moveal %a0@(40),%a0 4a2a8: 4e90 jsr %a0@ 4a2aa: 588f addql #4,%sp 4a2ac: 4a80 tstl %d0
4a2ae: 6624 bnes 4a2d4 <unmount+0xc0> <== NEVER TAKEN
* NOTE: Fatal error is called in a case which should never happen
* This was response was questionable but the best we could
* come up with.
*/
if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){
4a2b0: 206a 0028 moveal %a2@(40),%a0 4a2b4: 2f0a movel %a2,%sp@- 4a2b6: 2068 002c moveal %a0@(44),%a0 4a2ba: 4e90 jsr %a0@ 4a2bc: 588f addql #4,%sp 4a2be: 4a80 tstl %d0
4a2c0: 671e beqs 4a2e0 <unmount+0xcc> <== ALWAYS TAKEN
if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 )
4a2c2: 206a 0014 moveal %a2@(20),%a0 <== NOT EXECUTED 4a2c6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4a2c8: 2068 0020 moveal %a0@(32),%a0 <== NOT EXECUTED 4a2cc: 4e90 jsr %a0@ <== NOT EXECUTED 4a2ce: 588f addql #4,%sp <== NOT EXECUTED 4a2d0: 4a80 tstl %d0 <== NOT EXECUTED 4a2d2: 6670 bnes 4a344 <unmount+0x130> <== NOT EXECUTED
rtems_fatal_error_occurred( 0 );
return -1;
4a2d4: 70ff moveq #-1,%d0
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
4a2d6: 4cee 0c04 ffe0 moveml %fp@(-32),%d2/%a2-%a3 4a2dc: 4e5e unlk %fp 4a2de: 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 );
4a2e0: 42a7 clrl %sp@- 4a2e2: 42a7 clrl %sp@- 4a2e4: 2f39 0007 0250 movel 70250 <rtems_libio_semaphore>,%sp@- 4a2ea: 4eb9 0004 af20 jsr 4af20 <rtems_semaphore_obtain>
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
4a2f0: 2f0a movel %a2,%sp@- 4a2f2: 4eb9 0004 bb78 jsr 4bb78 <_Chain_Extract>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
4a2f8: 2f39 0007 0250 movel 70250 <rtems_libio_semaphore>,%sp@- 4a2fe: 4eb9 0004 b070 jsr 4b070 <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 );
4a304: 486a 0008 pea %a2@(8) 4a308: 4e93 jsr %a3@
free( mt_entry );
4a30a: 2f0a movel %a2,%sp@- 4a30c: 4eb9 0004 680c jsr 4680c <free>
return 0;
4a312: 4fef 001c lea %sp@(28),%sp 4a316: 4280 clrl %d0
}
4a318: 4cee 0c04 ffe0 moveml %fp@(-32),%d2/%a2-%a3 4a31e: 4e5e unlk %fp 4a320: 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 );
4a322: 2f02 movel %d2,%sp@-
rtems_set_errno_and_return_minus_one( EACCES );
4a324: 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 );
4a326: 4eb9 0004 67f8 jsr 467f8 <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( EACCES );
4a32c: 4eb9 0005 d92c jsr 5d92c <__errno> 4a332: 588f addql #4,%sp 4a334: 2040 moveal %d0,%a0 4a336: 70ff moveq #-1,%d0 4a338: 2082 movel %d2,%a0@
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
4a33a: 4cee 0c04 ffe0 moveml %fp@(-32),%d2/%a2-%a3 4a340: 4e5e unlk %fp 4a342: 4e75 rts
* come up with.
*/
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 );
4a344: 42a7 clrl %sp@- <== NOT EXECUTED 4a346: 4eb9 0004 b7b8 jsr 4b7b8 <rtems_fatal_error_occurred> <== NOT EXECUTED
* 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 );
4a34c: 4eb9 0005 d92c jsr 5d92c <__errno> 4a352: 7210 moveq #16,%d1 4a354: 2040 moveal %d0,%a0 4a356: 70ff moveq #-1,%d0
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
4a358: 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 );
4a35e: 2081 movel %d1,%a0@
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
4a360: 4e5e unlk %fp <== NOT EXECUTED
00045fc4 <vprintk>:
*/
void vprintk(
const char *fmt,
va_list ap
)
{
45fc4: 4e56 ffc4 linkw %fp,#-60 45fc8: 206e 0008 moveal %fp@(8),%a0 45fcc: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
for (; *fmt != '\0'; fmt++) {
45fd0: 1010 moveb %a0@,%d0
45fd2: 672e beqs 46002 <vprintk+0x3e> <== NEVER TAKEN
* console is not yet initialized or in ISR's. * * Arguments: * as in printf: fmt - format string, ... - unnamed arguments. */ void vprintk(
45fd4: 2c0e movel %fp,%d6 45fd6: 0686 ffff ffec addil #-20,%d6 45fdc: 47f9 0005 e7d1 lea 5e7d1 <rtems_filesystem_default_pathconf+0xb5>,%a3
bool minus = false;
bool sign = false;
char lead = ' ';
char c;
if (*fmt != '%') {
45fe2: 49c0 extbl %d0 45fe4: 7225 moveq #37,%d1 45fe6: b280 cmpl %d0,%d1
45fe8: 6722 beqs 4600c <vprintk+0x48>
BSP_output_char(*fmt);
continue;
45fea: 2448 moveal %a0,%a2
bool sign = false;
char lead = ' ';
char c;
if (*fmt != '%') {
BSP_output_char(*fmt);
45fec: 2f00 movel %d0,%sp@- 45fee: 2079 0005 f7b0 moveal 5f7b0 <BSP_output_char>,%a0 45ff4: 4e90 jsr %a0@
continue;
45ff6: 588f addql #4,%sp
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
45ff8: 41ea 0001 lea %a2@(1),%a0 45ffc: 102a 0001 moveb %a2@(1),%d0
46000: 66e0 bnes 45fe2 <vprintk+0x1e>
sign,
width,
lead
);
}
}
46002: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 46008: 4e5e unlk %fp 4600a: 4e75 rts
if (*fmt != '%') {
BSP_output_char(*fmt);
continue;
}
fmt++;
if (*fmt == '0' ) {
4600c: 7830 moveq #48,%d4 4600e: 1028 0001 moveb %a0@(1),%d0 46012: 1600 moveb %d0,%d3 46014: 49c3 extbl %d3 46016: b883 cmpl %d3,%d4 46018: 6700 0254 beqw 4626e <vprintk+0x2aa>
if (*fmt != '%') {
BSP_output_char(*fmt);
continue;
}
fmt++;
4601c: 45e8 0001 lea %a0@(1),%a2
unsigned base = 0;
unsigned width = 0;
bool lflag = false;
bool minus = false;
bool sign = false;
char lead = ' ';
46020: 7a20 moveq #32,%d5
fmt++;
if (*fmt == '0' ) {
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
46022: 722d moveq #45,%d1 46024: b283 cmpl %d3,%d1 46026: 6700 0220 beqw 46248 <vprintk+0x284>
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
4602a: 0680 ffff ffd0 addil #-48,%d0 46030: 7809 moveq #9,%d4 46032: 0280 0000 00ff andil #255,%d0
{
for (; *fmt != '\0'; fmt++) {
unsigned base = 0;
unsigned width = 0;
bool lflag = false;
bool minus = false;
46038: 4207 clrb %d7
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
4603a: b880 cmpl %d0,%d4 4603c: 6500 022a bcsw 46268 <vprintk+0x2a4>
* console is not yet initialized or in ISR's. * * Arguments: * as in printf: fmt - format string, ... - unnamed arguments. */ void vprintk(
46040: 220a movel %a2,%d1 46042: 5281 addql #1,%d1 46044: 2041 moveal %d1,%a0 46046: 4282 clrl %d2 46048: 3845 moveaw %d5,%a4
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
width *= 10;
4604a: 2a02 movel %d2,%d5
width += ((unsigned) *fmt - '0');
fmt++;
4604c: 2441 moveal %d1,%a2 4604e: 5281 addql #1,%d1
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
width *= 10;
46050: e78d lsll #3,%d5
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
46052: 1018 moveb %a0@+,%d0
width *= 10;
46054: 2245 moveal %d5,%a1
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
46056: 2800 movel %d0,%d4 46058: 0684 ffff ffd0 addil #-48,%d4 4605e: 7a09 moveq #9,%d5
width *= 10;
46060: 43f1 2a00 lea %a1@(00000000,%d2:l:2),%a1
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
46064: 0284 0000 00ff andil #255,%d4
width *= 10;
width += ((unsigned) *fmt - '0');
4606a: 43f1 38d0 lea %a1@(ffffffd0,%d3:l),%a1 4606e: 1600 moveb %d0,%d3 46070: 2409 movel %a1,%d2 46072: 49c3 extbl %d3
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
46074: ba84 cmpl %d4,%d5
46076: 64d2 bccs 4604a <vprintk+0x86>
46078: 1600 moveb %d0,%d3 4607a: 3a0c movew %a4,%d5 4607c: 49c3 extbl %d3
width *= 10;
width += ((unsigned) *fmt - '0');
fmt++;
}
if ((c = *fmt) == 'l') {
4607e: 706c moveq #108,%d0 46080: b083 cmpl %d3,%d0 46082: 6700 0184 beqw 46208 <vprintk+0x244>
lflag = true;
c = *++fmt;
}
if ( c == 'c' ) {
46086: 7263 moveq #99,%d1
)
{
for (; *fmt != '\0'; fmt++) {
unsigned base = 0;
unsigned width = 0;
bool lflag = false;
46088: 4200 clrb %d0
if ((c = *fmt) == 'l') {
lflag = true;
c = *++fmt;
}
if ( c == 'c' ) {
4608a: b283 cmpl %d3,%d1 4608c: 6700 018e beqw 4621c <vprintk+0x258>
/* 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' ) {
46090: 7273 moveq #115,%d1 46092: b283 cmpl %d3,%d1 46094: 6700 01ea beqw 46280 <vprintk+0x2bc>
continue;
}
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
46098: 726f moveq #111,%d1 4609a: b283 cmpl %d3,%d1 4609c: 6700 015a beqw 461f8 <vprintk+0x234> 460a0: 784f moveq #79,%d4 460a2: b883 cmpl %d3,%d4 460a4: 6700 0152 beqw 461f8 <vprintk+0x234>
base = 8; sign = false;
} else if ( c == 'i' || c == 'I' ||
460a8: 123c 0069 moveb #105,%d1 460ac: b283 cmpl %d3,%d1
460ae: 6764 beqs 46114 <vprintk+0x150>
460b0: 183c 0049 moveb #73,%d4 460b4: b883 cmpl %d3,%d4
460b6: 675c beqs 46114 <vprintk+0x150>
460b8: 123c 0064 moveb #100,%d1 460bc: b283 cmpl %d3,%d1
460be: 6754 beqs 46114 <vprintk+0x150>
c == 'd' || c == 'D' ) {
460c0: 183c 0044 moveb #68,%d4 460c4: b883 cmpl %d3,%d4
460c6: 674c beqs 46114 <vprintk+0x150>
base = 10; sign = true;
} else if ( c == 'u' || c == 'U' ) {
460c8: 123c 0075 moveb #117,%d1 460cc: b283 cmpl %d3,%d1 460ce: 6700 028c beqw 4635c <vprintk+0x398> 460d2: 183c 0055 moveb #85,%d4 460d6: b883 cmpl %d3,%d4 460d8: 6700 0282 beqw 4635c <vprintk+0x398>
base = 10; sign = false;
} else if ( c == 'x' || c == 'X' ) {
460dc: 123c 0078 moveb #120,%d1 460e0: b283 cmpl %d3,%d1 460e2: 6700 029c beqw 46380 <vprintk+0x3bc> 460e6: 183c 0058 moveb #88,%d4 460ea: b883 cmpl %d3,%d4 460ec: 6700 0292 beqw 46380 <vprintk+0x3bc>
base = 16; sign = false;
} else if ( c == 'p' ) {
460f0: 7070 moveq #112,%d0 460f2: b083 cmpl %d3,%d0 460f4: 6700 00ea beqw 461e0 <vprintk+0x21c>
base = 16; sign = false; lflag = true;
} else {
BSP_output_char(c);
460f8: 2f03 movel %d3,%sp@- 460fa: 2079 0005 f7b0 moveal 5f7b0 <BSP_output_char>,%a0 46100: 4e90 jsr %a0@
continue;
46102: 588f addql #4,%sp
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
46104: 41ea 0001 lea %a2@(1),%a0 46108: 102a 0001 moveb %a2@(1),%d0 4610c: 6600 fed4 bnew 45fe2 <vprintk+0x1e>
46110: 6000 fef0 braw 46002 <vprintk+0x3e> <== NOT EXECUTED
} else {
BSP_output_char(c);
continue;
}
printNum(
46114: 49c5 extbl %d5
/* 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;
46116: 760a moveq #10,%d3
} else {
BSP_output_char(c);
continue;
}
printNum(
46118: 2a45 moveal %d5,%a5
/* 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;
4611a: 7201 moveq #1,%d1
} else {
BSP_output_char(c);
continue;
}
printNum(
4611c: 4a00 tstb %d0 4611e: 6600 00c8 bnew 461e8 <vprintk+0x224> 46122: 226e 000c moveal %fp@(12),%a1 46126: 2811 movel %a1@,%d4
lflag ? va_arg(ap, long) : (long) va_arg(ap, int),
46128: 5889 addql #4,%a1 4612a: 2d49 000c movel %a1,%fp@(12)
unsigned long unsigned_num;
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
4612e: 4a01 tstb %d1
46130: 6706 beqs 46138 <vprintk+0x174>
46132: 4a84 tstl %d4 46134: 6d00 01ee bltw 46324 <vprintk+0x360>
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
46138: 2004 movel %d4,%d0 4613a: 4c43 0000 remul %d3,%d0,%d0 4613e: 6700 0206 beqw 46346 <vprintk+0x382> 46142: 2842 moveal %d2,%a4 46144: 2200 movel %d0,%d1 46146: 2246 moveal %d6,%a1
if (maxwidth) maxwidth--;
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
46148: 91c8 subal %a0,%a0
while ((n = unsigned_num / base) > 0) {
toPrint[count++] = (char) (unsigned_num - (n * base));
4614a: 5288 addql #1,%a0
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
4614c: 1e03 moveb %d3,%d7
toPrint[count++] = (char) (unsigned_num - (n * base));
4614e: 3a00 movew %d0,%d5
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
46150: 4c43 1001 remul %d3,%d1,%d1
toPrint[count++] = (char) (unsigned_num - (n * base));
46154: cbc7 mulsw %d7,%d5 46156: 2404 movel %d4,%d2
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
46158: 2800 movel %d0,%d4
toPrint[count++] = (char) (unsigned_num - (n * base));
4615a: 9485 subl %d5,%d2 4615c: 12c2 moveb %d2,%a1@+
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
4615e: 4a81 tstl %d1
46160: 671a beqs 4617c <vprintk+0x1b8>
46162: 2001 movel %d1,%d0 46164: 2200 movel %d0,%d1
toPrint[count++] = (char) (unsigned_num - (n * base));
46166: 5288 addql #1,%a0 46168: 3a00 movew %d0,%d5
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
4616a: 4c43 1001 remul %d3,%d1,%d1
toPrint[count++] = (char) (unsigned_num - (n * base));
4616e: cbc7 mulsw %d7,%d5 46170: 2404 movel %d4,%d2
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
46172: 2800 movel %d0,%d4
toPrint[count++] = (char) (unsigned_num - (n * base));
46174: 9485 subl %d5,%d2 46176: 12c2 moveb %d2,%a1@+
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
46178: 4a81 tstl %d1
4617a: 66e6 bnes 46162 <vprintk+0x19e>
4617c: 240c movel %a4,%d2 4617e: 49e8 0001 lea %a0@(1),%a4
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
46182: 1d80 88ec moveb %d0,%fp@(ffffffec,%a0:l)
for (n=maxwidth ; n > count; n-- )
46186: b48c cmpl %a4,%d2
46188: 6312 blss 4619c <vprintk+0x1d8>
BSP_output_char(lead);
4618a: 2f0d movel %a5,%sp@- 4618c: 2079 0005 f7b0 moveal 5f7b0 <BSP_output_char>,%a0
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
46192: 5382 subql #1,%d2
BSP_output_char(lead);
46194: 4e90 jsr %a0@
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
46196: 588f addql #4,%sp 46198: b48c cmpl %a4,%d2
4619a: 62ee bhis 4618a <vprintk+0x1c6>
BSP_output_char(lead);
for (n = 0; n < count; n++) {
4619c: 4a8c tstl %a4 4619e: 6700 fe58 beqw 45ff8 <vprintk+0x34>
* console is not yet initialized or in ISR's. * * Arguments: * as in printf: fmt - format string, ... - unnamed arguments. */ void vprintk(
461a2: 49f4 6800 lea %a4@(00000000,%d6:l),%a4
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)])]);
461a6: 2079 0005 f7b0 moveal 5f7b0 <BSP_output_char>,%a0 461ac: 1024 moveb %a4@-,%d0 461ae: 49c0 extbl %d0 461b0: 1033 0800 moveb %a3@(00000000,%d0:l),%d0 461b4: 49c0 extbl %d0 461b6: 2f00 movel %d0,%sp@- 461b8: 4e90 jsr %a0@
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
461ba: 588f addql #4,%sp 461bc: bc8c cmpl %a4,%d6 461be: 6700 fe38 beqw 45ff8 <vprintk+0x34>
BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
461c2: 2079 0005 f7b0 moveal 5f7b0 <BSP_output_char>,%a0 461c8: 1024 moveb %a4@-,%d0 461ca: 49c0 extbl %d0 461cc: 1033 0800 moveb %a3@(00000000,%d0:l),%d0 461d0: 49c0 extbl %d0 461d2: 2f00 movel %d0,%sp@- 461d4: 4e90 jsr %a0@
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
461d6: 588f addql #4,%sp 461d8: bc8c cmpl %a4,%d6
461da: 66ca bnes 461a6 <vprintk+0x1e2>
461dc: 6000 fe1a braw 45ff8 <vprintk+0x34>
} else {
BSP_output_char(c);
continue;
}
printNum(
461e0: 49c5 extbl %d5 461e2: 2a45 moveal %d5,%a5
} 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;
461e4: 7610 moveq #16,%d3 461e6: 4201 clrb %d1
} else {
BSP_output_char(c);
continue;
}
printNum(
461e8: 206e 000c moveal %fp@(12),%a0 461ec: 2810 movel %a0@,%d4
lflag ? va_arg(ap, long) : (long) va_arg(ap, int),
461ee: 5888 addql #4,%a0 461f0: 2d48 000c movel %a0,%fp@(12) 461f4: 6000 ff38 braw 4612e <vprintk+0x16a>
} else {
BSP_output_char(c);
continue;
}
printNum(
461f8: 49c5 extbl %d5
continue;
}
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
base = 8; sign = false;
461fa: 7608 moveq #8,%d3
} else {
BSP_output_char(c);
continue;
}
printNum(
461fc: 2a45 moveal %d5,%a5
continue;
}
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
base = 8; sign = false;
461fe: 4201 clrb %d1
} else {
BSP_output_char(c);
continue;
}
printNum(
46200: 4a00 tstb %d0 46202: 6700 ff1e beqw 46122 <vprintk+0x15e>
46206: 60e0 bras 461e8 <vprintk+0x224> <== NOT EXECUTED
if ((c = *fmt) == 'l') {
lflag = true;
c = *++fmt;
}
if ( c == 'c' ) {
46208: 7263 moveq #99,%d1
fmt++;
}
if ((c = *fmt) == 'l') {
lflag = true;
c = *++fmt;
4620a: 102a 0001 moveb %a2@(1),%d0 4620e: 528a addql #1,%a2 46210: 1600 moveb %d0,%d3
width += ((unsigned) *fmt - '0');
fmt++;
}
if ((c = *fmt) == 'l') {
lflag = true;
46212: 7001 moveq #1,%d0 46214: 49c3 extbl %d3
c = *++fmt;
}
if ( c == 'c' ) {
46216: b283 cmpl %d3,%d1 46218: 6600 fe76 bnew 46090 <vprintk+0xcc>
/* need a cast here since va_arg() only takes fully promoted types */
char chr = (char) va_arg(ap, int);
4621c: 206e 000c moveal %fp@(12),%a0 46220: 2010 movel %a0@,%d0
BSP_output_char(chr);
46222: 49c0 extbl %d0 46224: 2f00 movel %d0,%sp@-
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);
46226: 2008 movel %a0,%d0 46228: 5880 addql #4,%d0
BSP_output_char(chr);
4622a: 2079 0005 f7b0 moveal 5f7b0 <BSP_output_char>,%a0
lflag = true;
c = *++fmt;
}
if ( c == 'c' ) {
/* need a cast here since va_arg() only takes fully promoted types */
char chr = (char) va_arg(ap, int);
46230: 2d40 000c movel %d0,%fp@(12)
BSP_output_char(chr);
46234: 4e90 jsr %a0@
continue;
46236: 588f addql #4,%sp
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
46238: 41ea 0001 lea %a2@(1),%a0 4623c: 102a 0001 moveb %a2@(1),%d0 46240: 6600 fda0 bnew 45fe2 <vprintk+0x1e>
46244: 6000 fdbc braw 46002 <vprintk+0x3e> <== NOT EXECUTED
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
46248: 7809 moveq #9,%d4
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
minus = true;
fmt++;
4624a: 102a 0001 moveb %a2@(1),%d0 4624e: 528a addql #1,%a2 46250: 1600 moveb %d0,%d3
}
while (*fmt >= '0' && *fmt <= '9' ) {
46252: 0680 ffff ffd0 addil #-48,%d0 46258: 0280 0000 00ff andil #255,%d0 4625e: 49c3 extbl %d3
if (*fmt == '0' ) {
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
minus = true;
46260: 7e01 moveq #1,%d7
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
46262: b880 cmpl %d0,%d4 46264: 6400 fdda bccw 46040 <vprintk+0x7c> 46268: 4282 clrl %d2 4626a: 6000 fe12 braw 4607e <vprintk+0xba>
continue;
}
fmt++;
if (*fmt == '0' ) {
lead = '0';
fmt++;
4626e: 45e8 0002 lea %a0@(2),%a2 46272: 1028 0002 moveb %a0@(2),%d0
BSP_output_char(*fmt);
continue;
}
fmt++;
if (*fmt == '0' ) {
lead = '0';
46276: 7a30 moveq #48,%d5 46278: 1600 moveb %d0,%d3 4627a: 49c3 extbl %d3 4627c: 6000 fda4 braw 46022 <vprintk+0x5e>
}
if ( c == 's' ) {
unsigned i, len;
char *s, *str;
str = va_arg(ap, char *);
46280: 206e 000c moveal %fp@(12),%a0 46284: 2a08 movel %a0,%d5 46286: 5885 addql #4,%d5 46288: 2850 moveal %a0@,%a4
if ( str == NULL ) {
4628a: 4a8c tstl %a4 4628c: 6700 00e0 beqw 4636e <vprintk+0x3aa>
str = "";
}
/* calculate length of string */
for ( len=0, s=str ; *s ; len++, s++ )
46290: 4a14 tstb %a4@ 46292: 6700 00e6 beqw 4637a <vprintk+0x3b6>
* console is not yet initialized or in ISR's. * * Arguments: * as in printf: fmt - format string, ... - unnamed arguments. */ void vprintk(
46296: 41ec 0001 lea %a4@(1),%a0
if ( str == NULL ) {
str = "";
}
/* calculate length of string */
for ( len=0, s=str ; *s ; len++, s++ )
4629a: 4283 clrl %d3 4629c: 5283 addql #1,%d3 4629e: 4a18 tstb %a0@+
462a0: 66fa bnes 4629c <vprintk+0x2d8>
;
/* leading spaces */
if ( !minus )
462a2: 4a07 tstb %d7
462a4: 661a bnes 462c0 <vprintk+0x2fc>
for ( i=len ; i<width ; i++ )
462a6: b483 cmpl %d3,%d2
462a8: 6316 blss 462c0 <vprintk+0x2fc>
462aa: 2803 movel %d3,%d4
BSP_output_char(' ');
462ac: 4878 0020 pea 20 <OPER2+0xc>
for ( len=0, s=str ; *s ; len++, s++ )
;
/* leading spaces */
if ( !minus )
for ( i=len ; i<width ; i++ )
462b0: 5284 addql #1,%d4
BSP_output_char(' ');
462b2: 2079 0005 f7b0 moveal 5f7b0 <BSP_output_char>,%a0 462b8: 4e90 jsr %a0@
for ( len=0, s=str ; *s ; len++, s++ )
;
/* leading spaces */
if ( !minus )
for ( i=len ; i<width ; i++ )
462ba: 588f addql #4,%sp 462bc: b484 cmpl %d4,%d2
462be: 62ec bhis 462ac <vprintk+0x2e8>
BSP_output_char(' ');
/* no width option */
if (width == 0) {
462c0: 4a82 tstl %d2
462c2: 6606 bnes 462ca <vprintk+0x306>
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
462c4: 4a83 tstl %d3
462c6: 672c beqs 462f4 <vprintk+0x330>
462c8: 2403 movel %d3,%d2 462ca: 1014 moveb %a4@,%d0
462cc: 6726 beqs 462f4 <vprintk+0x330> <== NEVER TAKEN
BSP_output_char(*str);
462ce: 49c0 extbl %d0
if (width == 0) {
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
462d0: 528c addql #1,%a4
BSP_output_char(*str);
462d2: 2f00 movel %d0,%sp@- 462d4: 2079 0005 f7b0 moveal 5f7b0 <BSP_output_char>,%a0 462da: 4e90 jsr %a0@ 462dc: 588f addql #4,%sp
if (width == 0) {
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
462de: 101c moveb %a4@+,%d0
462e0: 6712 beqs 462f4 <vprintk+0x330>
BSP_output_char(*str);
462e2: 49c0 extbl %d0 462e4: 2079 0005 f7b0 moveal 5f7b0 <BSP_output_char>,%a0 462ea: 2f00 movel %d0,%sp@- 462ec: 4e90 jsr %a0@ 462ee: 588f addql #4,%sp
if (width == 0) {
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
462f0: 101c moveb %a4@+,%d0
462f2: 66ee bnes 462e2 <vprintk+0x31e>
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
462f4: 4a07 tstb %d7
462f6: 6718 beqs 46310 <vprintk+0x34c>
for ( i=len ; i<width ; i++ )
462f8: b483 cmpl %d3,%d2
462fa: 6314 blss 46310 <vprintk+0x34c>
BSP_output_char(' ');
462fc: 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++ )
46300: 5283 addql #1,%d3
BSP_output_char(' ');
46302: 2079 0005 f7b0 moveal 5f7b0 <BSP_output_char>,%a0 46308: 4e90 jsr %a0@
for ( i=0 ; i<width && *str ; str++ )
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
for ( i=len ; i<width ; i++ )
4630a: 588f addql #4,%sp 4630c: b483 cmpl %d3,%d2
4630e: 62ec bhis 462fc <vprintk+0x338>
}
if ( c == 's' ) {
unsigned i, len;
char *s, *str;
str = va_arg(ap, char *);
46310: 2d45 000c movel %d5,%fp@(12)
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
46314: 41ea 0001 lea %a2@(1),%a0 46318: 102a 0001 moveb %a2@(1),%d0 4631c: 6600 fcc4 bnew 45fe2 <vprintk+0x1e>
46320: 6000 fce0 braw 46002 <vprintk+0x3e> <== NOT EXECUTED
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
BSP_output_char('-');
46324: 4878 002d pea 2d <OPER2+0x19>
unsigned_num = (unsigned long) -num;
46328: 4484 negl %d4
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
BSP_output_char('-');
4632a: 2079 0005 f7b0 moveal 5f7b0 <BSP_output_char>,%a0 46330: 4e90 jsr %a0@
unsigned_num = (unsigned long) -num;
if (maxwidth) maxwidth--;
46332: 588f addql #4,%sp 46334: 4a82 tstl %d2 46336: 6700 fe00 beqw 46138 <vprintk+0x174>
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
4633a: 2004 movel %d4,%d0
char toPrint[20];
if ( sign && (num < 0) ) {
BSP_output_char('-');
unsigned_num = (unsigned long) -num;
if (maxwidth) maxwidth--;
4633c: 5382 subql #1,%d2
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
4633e: 4c43 0000 remul %d3,%d0,%d0 46342: 6600 fdfe bnew 46142 <vprintk+0x17e> 46346: 2004 movel %d4,%d0
if (maxwidth) maxwidth--;
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
46348: 91c8 subal %a0,%a0
while ((n = unsigned_num / base) > 0) {
4634a: 387c 0001 moveaw #1,%a4
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
4634e: 1d80 88ec moveb %d0,%fp@(ffffffec,%a0:l)
for (n=maxwidth ; n > count; n-- )
46352: b48c cmpl %a4,%d2 46354: 6200 fe34 bhiw 4618a <vprintk+0x1c6> 46358: 6000 fe42 braw 4619c <vprintk+0x1d8>
} else {
BSP_output_char(c);
continue;
}
printNum(
4635c: 49c5 extbl %d5
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;
4635e: 760a moveq #10,%d3
} else {
BSP_output_char(c);
continue;
}
printNum(
46360: 2a45 moveal %d5,%a5
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;
46362: 4201 clrb %d1
} else {
BSP_output_char(c);
continue;
}
printNum(
46364: 4a00 tstb %d0 46366: 6700 fdba beqw 46122 <vprintk+0x15e> 4636a: 6000 fe7c braw 461e8 <vprintk+0x224>
char *s, *str;
str = va_arg(ap, char *);
if ( str == NULL ) {
str = "";
4636e: 49f9 0005 e7d0 lea 5e7d0 <rtems_filesystem_default_pathconf+0xb4>,%a4
}
/* calculate length of string */
for ( len=0, s=str ; *s ; len++, s++ )
46374: 4a14 tstb %a4@ 46376: 6600 ff1e bnew 46296 <vprintk+0x2d2> 4637a: 4283 clrl %d3 4637c: 6000 ff24 braw 462a2 <vprintk+0x2de>
} else {
BSP_output_char(c);
continue;
}
printNum(
46380: 49c5 extbl %d5
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;
46382: 7610 moveq #16,%d3
} else {
BSP_output_char(c);
continue;
}
printNum(
46384: 2a45 moveal %d5,%a5
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;
46386: 4201 clrb %d1
} else {
BSP_output_char(c);
continue;
}
printNum(
46388: 4a00 tstb %d0 4638a: 6700 fd96 beqw 46122 <vprintk+0x15e> 4638e: 6000 fe58 braw 461e8 <vprintk+0x224>
...
0005cf74 <write>:
ssize_t write(
int fd,
const void *buffer,
size_t count
)
{
5cf74: 4e56 fff4 linkw %fp,#-12 5cf78: 202e 0008 movel %fp@(8),%d0 5cf7c: 222e 000c movel %fp@(12),%d1 5cf80: 206e 0010 moveal %fp@(16),%a0 5cf84: 48d7 040c moveml %d2-%d3/%a2,%sp@
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
5cf88: b0b9 0005 f792 cmpl 5f792 <rtems_libio_number_iops>,%d0
5cf8e: 6468 bccs 5cff8 <write+0x84> iop = rtems_libio_iop( fd );
5cf90: 2400 movel %d0,%d2 5cf92: ed88 lsll #6,%d0 5cf94: e78a lsll #3,%d2 5cf96: 2479 0006 0ef4 moveal 60ef4 <rtems_libio_iops>,%a2 5cf9c: 9082 subl %d2,%d0 5cf9e: d5c0 addal %d0,%a2
rtems_libio_check_is_open( iop );
5cfa0: 202a 0014 movel %a2@(20),%d0 5cfa4: 0800 0008 btst #8,%d0
5cfa8: 674e beqs 5cff8 <write+0x84> rtems_libio_check_buffer( buffer );
5cfaa: 4a81 tstl %d1
5cfac: 6762 beqs 5d010 <write+0x9c> <== NEVER TAKEN
rtems_libio_check_count( count );
5cfae: 4a88 tstl %a0
5cfb0: 673a beqs 5cfec <write+0x78> rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
5cfb2: 44c0 movew %d0,%ccr
5cfb4: 6642 bnes 5cff8 <write+0x84>
/*
* Now process the write() request.
*/
rc = (*iop->pathinfo.handlers->write_h)( iop, buffer, count );
5cfb6: 226a 0020 moveal %a2@(32),%a1 5cfba: 2f08 movel %a0,%sp@- 5cfbc: 2f01 movel %d1,%sp@- 5cfbe: 2f0a movel %a2,%sp@- 5cfc0: 2069 000c moveal %a1@(12),%a0 5cfc4: 4e90 jsr %a0@
if ( rc > 0 )
5cfc6: 4fef 000c lea %sp@(12),%sp 5cfca: 4a80 tstl %d0
5cfcc: 6f14 bles 5cfe2 <write+0x6e>
iop->offset += rc;
5cfce: 2600 movel %d0,%d3 5cfd0: 5bc2 smi %d2 5cfd2: 49c2 extbl %d2 5cfd4: d7aa 0010 addl %d3,%a2@(16) 5cfd8: 222a 000c movel %a2@(12),%d1 5cfdc: d382 addxl %d2,%d1 5cfde: 2541 000c movel %d1,%a2@(12)
return rc;
}
5cfe2: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 5cfe8: 4e5e unlk %fp 5cfea: 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 );
5cfec: 4280 clrl %d0
if ( rc > 0 )
iop->offset += rc;
return rc;
}
5cfee: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 5cff4: 4e5e unlk %fp 5cff6: 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_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
5cff8: 4eb9 0004 f098 jsr 4f098 <__errno> 5cffe: 7209 moveq #9,%d1 5d000: 2040 moveal %d0,%a0 5d002: 70ff moveq #-1,%d0
if ( rc > 0 )
iop->offset += rc;
return rc;
}
5d004: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
5d00a: 2081 movel %d1,%a0@
if ( rc > 0 )
iop->offset += rc;
return rc;
}
5d00c: 4e5e unlk %fp 5d00e: 4e75 rts
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_buffer( buffer );
5d010: 4eb9 0004 f098 jsr 4f098 <__errno> <== NOT EXECUTED 5d016: 7416 moveq #22,%d2 <== NOT EXECUTED 5d018: 2040 moveal %d0,%a0 <== NOT EXECUTED 5d01a: 70ff moveq #-1,%d0 <== NOT EXECUTED 5d01c: 2082 movel %d2,%a0@ <== NOT EXECUTED
if ( rc > 0 )
iop->offset += rc;
return rc;
}
5d01e: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 5d024: 4e5e unlk %fp <== NOT EXECUTED
000474fc <writev>:
ssize_t writev(
int fd,
const struct iovec *iov,
int iovcnt
)
{
474fc: 4e56 ffe4 linkw %fp,#-28 47500: 202e 0008 movel %fp@(8),%d0 47504: 48d7 0cdc moveml %d2-%d4/%d6-%d7/%a2-%a3,%sp@ 47508: 246e 000c moveal %fp@(12),%a2 4750c: 242e 0010 movel %fp@(16),%d2
int bytes;
rtems_libio_t *iop;
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
47510: b0b9 0006 0212 cmpl 60212 <rtems_libio_number_iops>,%d0 47516: 6400 00e2 bccw 475fa <writev+0xfe>
iop = rtems_libio_iop( fd );
4751a: 2200 movel %d0,%d1 4751c: ed88 lsll #6,%d0 4751e: e789 lsll #3,%d1 47520: 2679 0006 1974 moveal 61974 <rtems_libio_iops>,%a3 47526: 9081 subl %d1,%d0 47528: d7c0 addal %d0,%a3
rtems_libio_check_is_open( iop );
4752a: 202b 0014 movel %a3@(20),%d0 4752e: 0800 0008 btst #8,%d0 47532: 6700 00c6 beqw 475fa <writev+0xfe>
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
47536: 44c0 movew %d0,%ccr 47538: 6600 00c0 bnew 475fa <writev+0xfe>
/*
* Argument validation on IO vector
*/
if ( !iov )
4753c: 4a8a tstl %a2
4753e: 6736 beqs 47576 <writev+0x7a>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
47540: 4a82 tstl %d2
47542: 6f32 bles 47576 <writev+0x7a>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
47544: 0c82 0000 0400 cmpil #1024,%d2
4754a: 6e2a bgts 47576 <writev+0x7a> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
4754c: 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 )
4754e: 4280 clrl %d0 47550: 4281 clrl %d1 47552: 7601 moveq #1,%d3
/*
* iov[v].iov_len cannot be less than 0 because size_t is unsigned.
* So we only check for zero.
*/
if ( iov[v].iov_base == 0 )
47554: 4a90 tstl %a0@
47556: 671e beqs 47576 <writev+0x7a> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
47558: 2268 0004 moveal %a0@(4),%a1
all_zeros = false;
4755c: 4a89 tstl %a1 4755e: 57c4 seq %d4
/* check for wrap */
old = total;
total += iov[v].iov_len;
47560: d3c1 addal %d1,%a1
* 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++ ) {
47562: 5280 addql #1,%d0 47564: 5088 addql #8,%a0
*/
if ( iov[v].iov_base == 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
all_zeros = false;
47566: c684 andl %d4,%d3
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
47568: b3c1 cmpal %d1,%a1
4756a: 6d0a blts 47576 <writev+0x7a>
* 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++ ) {
4756c: b480 cmpl %d0,%d2
4756e: 6720 beqs 47590 <writev+0x94>
47570: 2209 movel %a1,%d1
/*
* iov[v].iov_len cannot be less than 0 because size_t is unsigned.
* So we only check for zero.
*/
if ( iov[v].iov_base == 0 )
47572: 4a90 tstl %a0@
47574: 66e2 bnes 47558 <writev+0x5c>
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
rtems_set_errno_and_return_minus_one( EINVAL );
47576: 4eb9 0004 fe28 jsr 4fe28 <__errno> 4757c: 78ff moveq #-1,%d4 4757e: 2040 moveal %d0,%a0 47580: 7016 moveq #22,%d0 47582: 2080 movel %d0,%a0@
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
47584: 2004 movel %d4,%d0 47586: 4cee 0cdc ffe4 moveml %fp@(-28),%d2-%d4/%d6-%d7/%a2-%a3 4758c: 4e5e unlk %fp 4758e: 4e75 rts
}
/*
* A writev with all zeros is supposed to have no effect per OpenGroup.
*/
if ( all_zeros == true ) {
47590: 4a03 tstb %d3
47592: 6658 bnes 475ec <writev+0xf0>
#include <sys/uio.h>
#include <rtems/libio_.h>
#include <rtems/seterr.h>
ssize_t writev(
47594: 588a addql #4,%a2 47596: 4283 clrl %d3 47598: 4284 clrl %d4
}
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
4759a: 5283 addql #1,%d3
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
4759c: 2012 movel %a2@,%d0
4759e: 660e bnes 475ae <writev+0xb2> <== ALWAYS TAKEN
}
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
475a0: 508a addql #8,%a2 <== NOT EXECUTED 475a2: b483 cmpl %d3,%d2 <== NOT EXECUTED 475a4: 67de beqs 47584 <writev+0x88> <== NOT EXECUTED
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
475a6: 2012 movel %a2@,%d0
}
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
475a8: 5283 addql #1,%d3
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
475aa: 4a80 tstl %d0
475ac: 67f2 beqs 475a0 <writev+0xa4> <== NEVER TAKEN
continue;
bytes = (*iop->pathinfo.handlers->write_h)(
475ae: 206b 0020 moveal %a3@(32),%a0 475b2: 2f00 movel %d0,%sp@- 475b4: 2f2a fffc movel %a2@(-4),%sp@- 475b8: 2f0b movel %a3,%sp@- 475ba: 2068 000c moveal %a0@(12),%a0 475be: 4e90 jsr %a0@
iop,
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
475c0: 4fef 000c lea %sp@(12),%sp 475c4: 4a80 tstl %d0
475c6: 6d4c blts 47614 <writev+0x118> <== NEVER TAKEN
return -1;
if ( bytes > 0 ) {
475c8: 6716 beqs 475e0 <writev+0xe4> <== NEVER TAKEN
iop->offset += bytes;
total += bytes;
475ca: d880 addl %d0,%d4
if ( bytes < 0 )
return -1;
if ( bytes > 0 ) {
iop->offset += bytes;
475cc: 2e00 movel %d0,%d7 475ce: 5bc6 smi %d6 475d0: 49c6 extbl %d6 475d2: dfab 0010 addl %d7,%a3@(16) 475d6: 222b 000c movel %a3@(12),%d1 475da: d386 addxl %d6,%d1 475dc: 2741 000c movel %d1,%a3@(12)
total += bytes;
}
if (bytes != iov[ v ].iov_len)
475e0: b092 cmpl %a2@,%d0
475e2: 66a0 bnes 47584 <writev+0x88> <== NEVER TAKEN
}
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
475e4: 508a addql #8,%a2 475e6: b483 cmpl %d3,%d2
475e8: 66bc bnes 475a6 <writev+0xaa>
475ea: 6098 bras 47584 <writev+0x88>
/*
* A writev with all zeros is supposed to have no effect per OpenGroup.
*/
if ( all_zeros == true ) {
return 0;
475ec: 4284 clrl %d4
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
475ee: 2004 movel %d4,%d0 475f0: 4cee 0cdc ffe4 moveml %fp@(-28),%d2-%d4/%d6-%d7/%a2-%a3 475f6: 4e5e unlk %fp 475f8: 4e75 rts
bool all_zeros;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
475fa: 4eb9 0004 fe28 jsr 4fe28 <__errno> 47600: 78ff moveq #-1,%d4 47602: 7209 moveq #9,%d1 47604: 2040 moveal %d0,%a0
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
47606: 2004 movel %d4,%d0 47608: 4cee 0cdc ffe4 moveml %fp@(-28),%d2-%d4/%d6-%d7/%a2-%a3
bool all_zeros;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
4760e: 2081 movel %d1,%a0@
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
47610: 4e5e unlk %fp 47612: 4e75 rts
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
return -1;
47614: 78ff moveq #-1,%d4 <== NOT EXECUTED
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
47616: 2004 movel %d4,%d0 <== NOT EXECUTED 47618: 4cee 0cdc ffe4 moveml %fp@(-28),%d2-%d4/%d6-%d7/%a2-%a3 <== NOT EXECUTED 4761e: 4e5e unlk %fp <== NOT EXECUTED
...