RTEMS 4.11Annotated Report
Thu Jan 27 21:15:48 2011
a000cdd4 <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 ) {
a000cdd4: e5902000 ldr r2, [r0]
)
{
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
a000cdd8: e5903010 ldr r3, [r0, #16]
switch( node->type ) {
a000cddc: e592204c ldr r2, [r2, #76] ; 0x4c
)
{
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
a000cde0: e5933034 ldr r3, [r3, #52] ; 0x34
switch( node->type ) {
a000cde4: e2422001 sub r2, r2, #1
a000cde8: e3520006 cmp r2, #6
a000cdec: 979ff102 ldrls pc, [pc, r2, lsl #2]
a000cdf0: ea000010 b a000ce38 <IMFS_Set_handlers+0x64> <== NOT EXECUTED
a000cdf4: a000ce10 .word 0xa000ce10 <== NOT EXECUTED
a000cdf8: a000ce18 .word 0xa000ce18 <== NOT EXECUTED
a000cdfc: a000ce20 .word 0xa000ce20 <== NOT EXECUTED
a000ce00: a000ce20 .word 0xa000ce20 <== NOT EXECUTED
a000ce04: a000ce28 .word 0xa000ce28 <== NOT EXECUTED
a000ce08: a000ce28 .word 0xa000ce28 <== NOT EXECUTED
a000ce0c: a000ce30 .word 0xa000ce30 <== NOT EXECUTED
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
a000ce10: e593300c ldr r3, [r3, #12]
a000ce14: ea000006 b a000ce34 <IMFS_Set_handlers+0x60>
break;
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
a000ce18: e59f3020 ldr r3, [pc, #32] ; a000ce40 <IMFS_Set_handlers+0x6c>
a000ce1c: ea000004 b a000ce34 <IMFS_Set_handlers+0x60>
break;
case IMFS_SYM_LINK:
case IMFS_HARD_LINK:
loc->handlers = &IMFS_link_handlers;
a000ce20: e59f301c ldr r3, [pc, #28] ; a000ce44 <IMFS_Set_handlers+0x70>
a000ce24: ea000002 b a000ce34 <IMFS_Set_handlers+0x60>
break;
case IMFS_LINEAR_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
a000ce28: e5933008 ldr r3, [r3, #8]
a000ce2c: ea000000 b a000ce34 <IMFS_Set_handlers+0x60>
break;
case IMFS_FIFO:
loc->handlers = fs_info->fifo_handlers;
a000ce30: e5933010 ldr r3, [r3, #16]
a000ce34: e5803008 str r3, [r0, #8]
break;
}
return 0;
}
a000ce38: e3a00000 mov r0, #0
a000ce3c: e12fff1e bx lr
a000cbb4 <IMFS_chown>:
int IMFS_chown(
rtems_filesystem_location_info_t *pathloc, /* IN */
uid_t owner, /* IN */
gid_t group /* IN */
)
{
a000cbb4: e92d4013 push {r0, r1, r4, lr} <== NOT EXECUTED
IMFS_jnode_t *jnode;
#if defined(RTEMS_POSIX_API)
uid_t st_uid;
#endif
jnode = (IMFS_jnode_t *) pathloc->node_access;
a000cbb8: e5904000 ldr r4, [r0] <== NOT EXECUTED
#endif
jnode->st_uid = owner;
jnode->st_gid = group;
IMFS_update_ctime( jnode );
a000cbbc: e1a0000d mov r0, sp <== NOT EXECUTED
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
rtems_set_errno_and_return_minus_one( EPERM );
#endif
jnode->st_uid = owner;
a000cbc0: e1c413bc strh r1, [r4, #60] ; 0x3c <== NOT EXECUTED
jnode->st_gid = group;
a000cbc4: e1c423be strh r2, [r4, #62] ; 0x3e <== NOT EXECUTED
IMFS_update_ctime( jnode );
a000cbc8: e3a01000 mov r1, #0 <== NOT EXECUTED
a000cbcc: ebffe5b3 bl a00062a0 <gettimeofday> <== NOT EXECUTED
a000cbd0: e59d3000 ldr r3, [sp] <== NOT EXECUTED
return 0;
}
a000cbd4: e3a00000 mov r0, #0 <== NOT EXECUTED
#endif
jnode->st_uid = owner;
jnode->st_gid = group;
IMFS_update_ctime( jnode );
a000cbd8: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED
return 0;
}
a000cbdc: e8bd801c pop {r2, r3, r4, pc} <== NOT EXECUTED
a000ced4 <IMFS_eval_path>:
const char *pathname, /* IN */
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
a000ced4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
char token[ IMFS_NAME_MAX + 1 ];
rtems_filesystem_location_info_t newloc;
IMFS_jnode_t *node;
int result;
if ( !rtems_libio_is_valid_perms( flags ) ) {
a000ced8: e3d27007 bics r7, r2, #7
const char *pathname, /* IN */
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
a000cedc: e24dd040 sub sp, sp, #64 ; 0x40
a000cee0: e58d0000 str r0, [sp]
a000cee4: e1a06001 mov r6, r1
a000cee8: e1a08002 mov r8, r2
a000ceec: e1a04003 mov r4, r3
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
a000cef0: 05935000 ldreq r5, [r3]
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
int i = 0;
int len;
IMFS_token_types type = IMFS_CURRENT_DIR;
a000cef4: 03a09001 moveq r9, #1
* 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 );
a000cef8: 028da004 addeq sl, sp, #4
char token[ IMFS_NAME_MAX + 1 ];
rtems_filesystem_location_info_t newloc;
IMFS_jnode_t *node;
int result;
if ( !rtems_libio_is_valid_perms( flags ) ) {
a000cefc: 0a000057 beq a000d060 <IMFS_eval_path+0x18c>
rtems_set_errno_and_return_minus_one( EIO );
a000cf00: eb000cdd bl a001027c <__errno> <== NOT EXECUTED
a000cf04: e3a03005 mov r3, #5 <== NOT EXECUTED
a000cf08: ea00007e b a000d108 <IMFS_eval_path+0x234> <== NOT EXECUTED
* 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 );
a000cf0c: e59d2000 ldr r2, [sp]
a000cf10: e28d303c add r3, sp, #60 ; 0x3c
a000cf14: e1a01006 mov r1, r6
a000cf18: e0820007 add r0, r2, r7
a000cf1c: e1a0200a mov r2, sl
a000cf20: eb0001ae bl a000d5e0 <IMFS_get_token>
pathnamelen -= len;
i += len;
if ( !pathloc->node_access )
a000cf24: e5943000 ldr r3, [r4]
* 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 );
a000cf28: e1a09000 mov r9, r0
pathnamelen -= len;
a000cf2c: e59db03c ldr fp, [sp, #60] ; 0x3c
i += len;
if ( !pathloc->node_access )
a000cf30: e3530000 cmp r3, #0
a000cf34: 0a000041 beq a000d040 <IMFS_eval_path+0x16c>
rtems_set_errno_and_return_minus_one( ENOENT );
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
a000cf38: e3500000 cmp r0, #0
a000cf3c: 0a000006 beq a000cf5c <IMFS_eval_path+0x88>
if ( node->type == IMFS_DIRECTORY )
a000cf40: e595104c ldr r1, [r5, #76] ; 0x4c
a000cf44: e3510001 cmp r1, #1
a000cf48: 1a000003 bne a000cf5c <IMFS_eval_path+0x88>
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
a000cf4c: e1a00004 mov r0, r4
a000cf50: ebffffbc bl a000ce48 <IMFS_evaluate_permission>
a000cf54: e3500000 cmp r0, #0
a000cf58: 0a000068 beq a000d100 <IMFS_eval_path+0x22c>
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
switch( type ) {
a000cf5c: e3590003 cmp r9, #3
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
pathnamelen -= len;
a000cf60: e06b6006 rsb r6, fp, r6
i += len;
a000cf64: e087700b add r7, r7, fp
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
a000cf68: e5945000 ldr r5, [r4]
switch( type ) {
a000cf6c: 0a000014 beq a000cfc4 <IMFS_eval_path+0xf0>
a000cf70: e3590004 cmp r9, #4
a000cf74: 0a000036 beq a000d054 <IMFS_eval_path+0x180>
a000cf78: e3590002 cmp r9, #2
a000cf7c: 1a000037 bne a000d060 <IMFS_eval_path+0x18c>
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
a000cf80: e59fc194 ldr ip, [pc, #404] ; a000d11c <IMFS_eval_path+0x248>
a000cf84: e59c3000 ldr r3, [ip]
a000cf88: e5933018 ldr r3, [r3, #24]
a000cf8c: e1550003 cmp r5, r3
a000cf90: 0a000032 beq a000d060 <IMFS_eval_path+0x18c>
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
pathloc->mt_entry->mt_fs_root.node_access) {
a000cf94: e594e010 ldr lr, [r4, #16]
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
a000cf98: e59e301c ldr r3, [lr, #28]
a000cf9c: e1550003 cmp r5, r3
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
newloc = pathloc->mt_entry->mt_point_node;
a000cfa0: 028dc028 addeq ip, sp, #40 ; 0x28
a000cfa4: 028ee008 addeq lr, lr, #8
a000cfa8: 0a000037 beq a000d08c <IMFS_eval_path+0x1b8>
pathnamelen+len,
flags,pathloc);
}
} else {
if ( !node->Parent )
a000cfac: e5955008 ldr r5, [r5, #8]
a000cfb0: e3550000 cmp r5, #0
a000cfb4: 1a000024 bne a000d04c <IMFS_eval_path+0x178>
rtems_set_errno_and_return_minus_one( ENOENT );
a000cfb8: eb000caf bl a001027c <__errno> <== NOT EXECUTED
a000cfbc: e5809000 str r9, [r0] <== NOT EXECUTED
a000cfc0: ea000051 b a000d10c <IMFS_eval_path+0x238> <== NOT EXECUTED
case IMFS_NAME:
/*
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
a000cfc4: e595304c ldr r3, [r5, #76] ; 0x4c
a000cfc8: e3530003 cmp r3, #3
a000cfcc: 1a000004 bne a000cfe4 <IMFS_eval_path+0x110>
IMFS_evaluate_hard_link( pathloc, 0 );
a000cfd0: e1a00004 mov r0, r4 <== NOT EXECUTED
a000cfd4: e3a01000 mov r1, #0 <== NOT EXECUTED
a000cfd8: ebffffaa bl a000ce88 <IMFS_evaluate_hard_link> <== NOT EXECUTED
node = pathloc->node_access;
a000cfdc: e5945000 ldr r5, [r4] <== NOT EXECUTED
a000cfe0: ea000008 b a000d008 <IMFS_eval_path+0x134> <== NOT EXECUTED
* It would be a design error if we evaluated the link and
* was broken.
*/
IMFS_assert( node );
} else if ( node->type == IMFS_SYM_LINK ) {
a000cfe4: e3530004 cmp r3, #4
a000cfe8: 1a000006 bne a000d008 <IMFS_eval_path+0x134>
result = IMFS_evaluate_sym_link( pathloc, 0 );
a000cfec: e1a00004 mov r0, r4 <== NOT EXECUTED
a000cff0: e3a01000 mov r1, #0 <== NOT EXECUTED
a000cff4: eb000049 bl a000d120 <IMFS_evaluate_sym_link> <== NOT EXECUTED
/*
* In contrast to a hard link, it is possible to have a broken
* symbolic link.
*/
node = pathloc->node_access;
if ( result == -1 )
a000cff8: e3700001 cmn r0, #1 <== NOT EXECUTED
* was broken.
*/
IMFS_assert( node );
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
a000cffc: e1a0b000 mov fp, r0 <== NOT EXECUTED
/*
* In contrast to a hard link, it is possible to have a broken
* symbolic link.
*/
node = pathloc->node_access;
a000d000: e5945000 ldr r5, [r4] <== NOT EXECUTED
if ( result == -1 )
a000d004: 0a000041 beq a000d110 <IMFS_eval_path+0x23c> <== NOT EXECUTED
}
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
a000d008: e595304c ldr r3, [r5, #76] ; 0x4c
a000d00c: e3530001 cmp r3, #1
a000d010: 0a000002 beq a000d020 <IMFS_eval_path+0x14c>
rtems_set_errno_and_return_minus_one( ENOTDIR );
a000d014: eb000c98 bl a001027c <__errno> <== NOT EXECUTED
a000d018: e3a03014 mov r3, #20 <== NOT EXECUTED
a000d01c: ea000039 b a000d108 <IMFS_eval_path+0x234> <== NOT EXECUTED
/*
* If we are at a node that is a mount point. Set loc to the
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
a000d020: e595e05c ldr lr, [r5, #92] ; 0x5c
a000d024: e35e0000 cmp lr, #0
a000d028: 1a000015 bne a000d084 <IMFS_eval_path+0x1b0>
}
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
a000d02c: e1a00005 mov r0, r5
a000d030: e1a0100a mov r1, sl
a000d034: eb000149 bl a000d560 <IMFS_find_match_in_dir>
if ( !node )
a000d038: e2505000 subs r5, r0, #0
a000d03c: 1a000002 bne a000d04c <IMFS_eval_path+0x178>
rtems_set_errno_and_return_minus_one( ENOENT );
a000d040: eb000c8d bl a001027c <__errno>
a000d044: e3a03002 mov r3, #2
a000d048: ea00002e b a000d108 <IMFS_eval_path+0x234>
/*
* Set the node access to the point we have found.
*/
pathloc->node_access = node;
a000d04c: e5845000 str r5, [r4]
a000d050: ea000002 b a000d060 <IMFS_eval_path+0x18c>
case IMFS_NO_MORE_PATH:
case IMFS_CURRENT_DIR:
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
a000d054: eb000c88 bl a001027c <__errno> <== NOT EXECUTED
a000d058: e3a0305b mov r3, #91 ; 0x5b <== NOT EXECUTED
a000d05c: ea000029 b a000d108 <IMFS_eval_path+0x234> <== NOT EXECUTED
/*
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
a000d060: e3590004 cmp r9, #4
a000d064: 13590000 cmpne r9, #0
a000d068: 1affffa7 bne a000cf0c <IMFS_eval_path+0x38>
* 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 ) {
a000d06c: e595304c ldr r3, [r5, #76] ; 0x4c
a000d070: e3530001 cmp r3, #1
a000d074: 1a000019 bne a000d0e0 <IMFS_eval_path+0x20c>
if ( node->info.directory.mt_fs != NULL ) {
a000d078: e595e05c ldr lr, [r5, #92] ; 0x5c
a000d07c: e35e0000 cmp lr, #0
a000d080: 0a000016 beq a000d0e0 <IMFS_eval_path+0x20c>
newloc = node->info.directory.mt_fs->mt_fs_root;
a000d084: e28dc028 add ip, sp, #40 ; 0x28
a000d088: e28ee01c add lr, lr, #28
a000d08c: e8be000f ldm lr!, {r0, r1, r2, r3}
a000d090: e8ac000f stmia ip!, {r0, r1, r2, r3}
a000d094: e59ee000 ldr lr, [lr]
a000d098: e58ce000 str lr, [ip]
*pathloc = newloc;
a000d09c: e28dc028 add ip, sp, #40 ; 0x28
a000d0a0: e8bc000f ldm ip!, {r0, r1, r2, r3}
a000d0a4: e1a0c004 mov ip, r4
a000d0a8: e8ac000f stmia ip!, {r0, r1, r2, r3}
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
a000d0ac: e59d103c ldr r1, [sp, #60] ; 0x3c
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
a000d0b0: e58ce000 str lr, [ip]
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
a000d0b4: e594300c ldr r3, [r4, #12]
a000d0b8: e59d2000 ldr r2, [sp]
a000d0bc: e0610007 rsb r0, r1, r7
a000d0c0: e593c000 ldr ip, [r3]
a000d0c4: e0820000 add r0, r2, r0
a000d0c8: e0861001 add r1, r6, r1
a000d0cc: e1a02008 mov r2, r8
a000d0d0: e1a03004 mov r3, r4
a000d0d4: e12fff3c blx ip
a000d0d8: e1a0b000 mov fp, r0
a000d0dc: ea00000b b a000d110 <IMFS_eval_path+0x23c>
flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
a000d0e0: e1a00004 mov r0, r4
a000d0e4: ebffff3a bl a000cdd4 <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
a000d0e8: e1a01008 mov r1, r8
flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
a000d0ec: e1a0b000 mov fp, r0
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
a000d0f0: e1a00004 mov r0, r4
a000d0f4: ebffff53 bl a000ce48 <IMFS_evaluate_permission>
a000d0f8: e3500000 cmp r0, #0
a000d0fc: 1a000003 bne a000d110 <IMFS_eval_path+0x23c>
rtems_set_errno_and_return_minus_one( EACCES );
a000d100: eb000c5d bl a001027c <__errno> <== NOT EXECUTED
a000d104: e3a0300d mov r3, #13 <== NOT EXECUTED
a000d108: e5803000 str r3, [r0]
a000d10c: e3e0b000 mvn fp, #0
return result;
}
a000d110: e1a0000b mov r0, fp
a000d114: e28dd040 add sp, sp, #64 ; 0x40
a000d118: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
a000d25c <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 */
)
{
a000d25c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
a000d260: e24dd03c sub sp, sp, #60 ; 0x3c
a000d264: e1a07000 mov r7, r0
a000d268: e1a04001 mov r4, r1
a000d26c: e1a0a002 mov sl, r2
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
a000d270: e5916000 ldr r6, [r1]
/*
* Get the path length.
*/
pathlen = strlen( path );
a000d274: eb000fea bl a0011224 <strlen>
const char *path, /* IN */
rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
const char **name /* OUT */
)
{
int i = 0;
a000d278: e3a05000 mov r5, #0
node = pathloc->node_access;
/*
* Get the path length.
*/
pathlen = strlen( path );
a000d27c: e1a08000 mov r8, r0
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
a000d280: e1a01008 mov r1, r8
a000d284: e28d3038 add r3, sp, #56 ; 0x38
a000d288: e0870005 add r0, r7, r5
a000d28c: e1a0200d mov r2, sp
a000d290: eb0000d2 bl a000d5e0 <IMFS_get_token>
pathlen -= len;
i += len;
if ( !pathloc->node_access )
a000d294: e5943000 ldr r3, [r4]
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
a000d298: e59db038 ldr fp, [sp, #56] ; 0x38
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
a000d29c: e1a09000 mov r9, r0
pathlen -= len;
i += len;
if ( !pathloc->node_access )
a000d2a0: e3530000 cmp r3, #0
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
a000d2a4: e06b8008 rsb r8, fp, r8
i += len;
if ( !pathloc->node_access )
a000d2a8: 0a000060 beq a000d430 <IMFS_evaluate_for_make+0x1d4>
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
a000d2ac: e3500000 cmp r0, #0
a000d2b0: 0a000006 beq a000d2d0 <IMFS_evaluate_for_make+0x74>
if ( node->type == IMFS_DIRECTORY )
a000d2b4: e596104c ldr r1, [r6, #76] ; 0x4c
a000d2b8: e3510001 cmp r1, #1
a000d2bc: 1a000003 bne a000d2d0 <IMFS_evaluate_for_make+0x74>
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
a000d2c0: e1a00004 mov r0, r4
a000d2c4: ebfffedf bl a000ce48 <IMFS_evaluate_permission>
a000d2c8: e3500000 cmp r0, #0
a000d2cc: 0a00006c beq a000d484 <IMFS_evaluate_for_make+0x228>
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
a000d2d0: e5943000 ldr r3, [r4]
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
i += len;
a000d2d4: e085500b add r5, r5, fp
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
a000d2d8: e1a06003 mov r6, r3
switch( type ) {
a000d2dc: e3590004 cmp r9, #4
a000d2e0: 979ff109 ldrls pc, [pc, r9, lsl #2]
a000d2e4: eaffffe5 b a000d280 <IMFS_evaluate_for_make+0x24> <== NOT EXECUTED
a000d2e8: a000d3f4 .word 0xa000d3f4 <== NOT EXECUTED
a000d2ec: a000d280 .word 0xa000d280 <== NOT EXECUTED
a000d2f0: a000d2fc .word 0xa000d2fc <== NOT EXECUTED
a000d2f4: a000d338 .word 0xa000d338 <== NOT EXECUTED
a000d2f8: a000d400 .word 0xa000d400 <== NOT EXECUTED
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
a000d2fc: e59f119c ldr r1, [pc, #412] ; a000d4a0 <IMFS_evaluate_for_make+0x244>
a000d300: e5912000 ldr r2, [r1]
a000d304: e5922018 ldr r2, [r2, #24]
a000d308: e1530002 cmp r3, r2
a000d30c: 0affffdb beq a000d280 <IMFS_evaluate_for_make+0x24>
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){
a000d310: e594e010 ldr lr, [r4, #16]
a000d314: e59e201c ldr r2, [lr, #28]
a000d318: e1530002 cmp r3, r2
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
newloc = pathloc->mt_entry->mt_point_node;
a000d31c: 028dc024 addeq ip, sp, #36 ; 0x24
a000d320: 028ee008 addeq lr, lr, #8
a000d324: 0a000019 beq a000d390 <IMFS_evaluate_for_make+0x134>
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
}
} else {
if ( !node->Parent )
a000d328: e5936008 ldr r6, [r3, #8]
a000d32c: e3560000 cmp r6, #0
a000d330: 1a00002d bne a000d3ec <IMFS_evaluate_for_make+0x190>
a000d334: ea00003d b a000d430 <IMFS_evaluate_for_make+0x1d4> <== NOT EXECUTED
pathloc->node_access = node;
break;
case IMFS_NAME:
if ( node->type == IMFS_HARD_LINK ) {
a000d338: e593304c ldr r3, [r3, #76] ; 0x4c
a000d33c: e3530003 cmp r3, #3
a000d340: 0a000001 beq a000d34c <IMFS_evaluate_for_make+0xf0>
result = IMFS_evaluate_link( pathloc, 0 );
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
a000d344: e3530004 cmp r3, #4
a000d348: 1a000005 bne a000d364 <IMFS_evaluate_for_make+0x108>
result = IMFS_evaluate_link( pathloc, 0 );
a000d34c: e1a00004 mov r0, r4 <== NOT EXECUTED
a000d350: e3a01000 mov r1, #0 <== NOT EXECUTED
a000d354: ebffff93 bl a000d1a8 <IMFS_evaluate_link> <== NOT EXECUTED
if ( result == -1 )
a000d358: e3700001 cmn r0, #1 <== NOT EXECUTED
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_link( pathloc, 0 );
a000d35c: e1a06000 mov r6, r0 <== NOT EXECUTED
if ( result == -1 )
a000d360: 0a00004b beq a000d494 <IMFS_evaluate_for_make+0x238> <== NOT EXECUTED
return -1;
}
node = pathloc->node_access;
a000d364: e5940000 ldr r0, [r4]
if ( !node )
a000d368: e3500000 cmp r0, #0
a000d36c: 0a00003c beq a000d464 <IMFS_evaluate_for_make+0x208>
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
a000d370: e590304c ldr r3, [r0, #76] ; 0x4c
a000d374: e3530001 cmp r3, #1
a000d378: 1a000039 bne a000d464 <IMFS_evaluate_for_make+0x208>
/*
* If we are at a node that is a mount point. Set loc to the
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
a000d37c: e590e05c ldr lr, [r0, #92] ; 0x5c
a000d380: e35e0000 cmp lr, #0
a000d384: 0a000014 beq a000d3dc <IMFS_evaluate_for_make+0x180>
newloc = node->info.directory.mt_fs->mt_fs_root;
a000d388: e28dc024 add ip, sp, #36 ; 0x24
a000d38c: e28ee01c add lr, lr, #28
a000d390: e8be000f ldm lr!, {r0, r1, r2, r3}
a000d394: e8ac000f stmia ip!, {r0, r1, r2, r3}
a000d398: e59ee000 ldr lr, [lr]
a000d39c: e58ce000 str lr, [ip]
*pathloc = newloc;
a000d3a0: e28dc024 add ip, sp, #36 ; 0x24
a000d3a4: e8bc000f ldm ip!, {r0, r1, r2, r3}
a000d3a8: e1a0c004 mov ip, r4
a000d3ac: e8ac000f stmia ip!, {r0, r1, r2, r3}
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
a000d3b0: e59d2038 ldr r2, [sp, #56] ; 0x38
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
a000d3b4: e58ce000 str lr, [ip]
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
a000d3b8: e594300c ldr r3, [r4, #12]
a000d3bc: e0625005 rsb r5, r2, r5
a000d3c0: e0870005 add r0, r7, r5
a000d3c4: e5933004 ldr r3, [r3, #4]
a000d3c8: e1a01004 mov r1, r4
a000d3cc: e1a0200a mov r2, sl
a000d3d0: e12fff33 blx r3
a000d3d4: e1a06000 mov r6, r0
a000d3d8: ea00002d b a000d494 <IMFS_evaluate_for_make+0x238>
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
a000d3dc: e1a0100d mov r1, sp
a000d3e0: eb00005e bl a000d560 <IMFS_find_match_in_dir>
/*
* If there is no node we have found the name of the node we
* wish to create.
*/
if ( ! node )
a000d3e4: e2506000 subs r6, r0, #0
a000d3e8: 0a000007 beq a000d40c <IMFS_evaluate_for_make+0x1b0>
done = true;
else
pathloc->node_access = node;
a000d3ec: e5846000 str r6, [r4]
a000d3f0: eaffffa2 b a000d280 <IMFS_evaluate_for_make+0x24>
break;
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
a000d3f4: eb000ba0 bl a001027c <__errno>
a000d3f8: e3a03011 mov r3, #17
a000d3fc: ea000022 b a000d48c <IMFS_evaluate_for_make+0x230>
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
a000d400: eb000b9d bl a001027c <__errno> <== NOT EXECUTED
a000d404: e3a0305b mov r3, #91 ; 0x5b <== NOT EXECUTED
a000d408: ea00001f b a000d48c <IMFS_evaluate_for_make+0x230> <== NOT EXECUTED
case IMFS_CURRENT_DIR:
break;
}
}
*name = &path[ i - len ];
a000d40c: e59d3038 ldr r3, [sp, #56] ; 0x38
a000d410: e0633005 rsb r3, r3, r5
a000d414: e0873003 add r3, r7, r3
a000d418: e58a3000 str r3, [sl]
* pathloc is returned with a pointer to the parent of the new node.
* name is returned with a pointer to the first character in the
* new node name. The parent node is verified to be a directory.
*/
int IMFS_evaluate_for_make(
a000d41c: e0875005 add r5, r7, r5
/*
* 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++) {
a000d420: ea000005 b a000d43c <IMFS_evaluate_for_make+0x1e0>
if ( !IMFS_is_separator( path[ i ] ) )
a000d424: ebffe6f6 bl a0007004 <rtems_filesystem_is_separator> <== NOT EXECUTED
a000d428: e3500000 cmp r0, #0 <== NOT EXECUTED
a000d42c: 1a000002 bne a000d43c <IMFS_evaluate_for_make+0x1e0> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOENT );
a000d430: eb000b91 bl a001027c <__errno> <== NOT EXECUTED
a000d434: e3a03002 mov r3, #2 <== NOT EXECUTED
a000d438: ea000013 b a000d48c <IMFS_evaluate_for_make+0x230> <== NOT EXECUTED
/*
* 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++) {
a000d43c: e4d50001 ldrb r0, [r5], #1
a000d440: e3500000 cmp r0, #0
a000d444: 1afffff6 bne a000d424 <IMFS_evaluate_for_make+0x1c8>
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
a000d448: e1a00004 mov r0, r4
a000d44c: ebfffe60 bl a000cdd4 <IMFS_Set_handlers>
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
a000d450: e5943000 ldr r3, [r4]
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
a000d454: e1a06000 mov r6, r0
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
a000d458: e593304c ldr r3, [r3, #76] ; 0x4c
a000d45c: e3530001 cmp r3, #1
a000d460: 0a000002 beq a000d470 <IMFS_evaluate_for_make+0x214>
rtems_set_errno_and_return_minus_one( ENOTDIR );
a000d464: eb000b84 bl a001027c <__errno> <== NOT EXECUTED
a000d468: e3a03014 mov r3, #20 <== NOT EXECUTED
a000d46c: ea000006 b a000d48c <IMFS_evaluate_for_make+0x230> <== NOT EXECUTED
/*
* We must have Write and execute permission on the returned node.
*/
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
a000d470: e1a00004 mov r0, r4
a000d474: e3a01003 mov r1, #3
a000d478: ebfffe72 bl a000ce48 <IMFS_evaluate_permission>
a000d47c: e3500000 cmp r0, #0
a000d480: 1a000003 bne a000d494 <IMFS_evaluate_for_make+0x238>
rtems_set_errno_and_return_minus_one( EACCES );
a000d484: eb000b7c bl a001027c <__errno>
a000d488: e3a0300d mov r3, #13
a000d48c: e5803000 str r3, [r0]
a000d490: e3e06000 mvn r6, #0
return result;
}
a000d494: e1a00006 mov r0, r6
a000d498: e28dd03c add sp, sp, #60 ; 0x3c
a000d49c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
a000ce88 <IMFS_evaluate_hard_link>:
int IMFS_evaluate_hard_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
a000ce88: e92d4030 push {r4, r5, lr}
IMFS_assert( jnode->type == IMFS_HARD_LINK );
/*
* Set the hard link value and the handlers.
*/
node->node_access = jnode->info.hard_link.link_node;
a000ce8c: e5903000 ldr r3, [r0]
int IMFS_evaluate_hard_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
a000ce90: e1a04000 mov r4, r0
a000ce94: e1a05001 mov r5, r1
IMFS_assert( jnode->type == IMFS_HARD_LINK );
/*
* Set the hard link value and the handlers.
*/
node->node_access = jnode->info.hard_link.link_node;
a000ce98: e5933050 ldr r3, [r3, #80] ; 0x50
a000ce9c: e5803000 str r3, [r0]
IMFS_Set_handlers( node );
a000cea0: ebffffcb bl a000cdd4 <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
a000cea4: e1a00004 mov r0, r4
a000cea8: e1a01005 mov r1, r5
a000ceac: ebffffe5 bl a000ce48 <IMFS_evaluate_permission>
a000ceb0: e3500000 cmp r0, #0
a000ceb4: 1a000004 bne a000cecc <IMFS_evaluate_hard_link+0x44>
rtems_set_errno_and_return_minus_one( EACCES );
a000ceb8: eb000cef bl a001027c <__errno> <== NOT EXECUTED
a000cebc: e3a0300d mov r3, #13 <== NOT EXECUTED
a000cec0: e5803000 str r3, [r0] <== NOT EXECUTED
a000cec4: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000cec8: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
return result;
a000cecc: e3a00000 mov r0, #0
}
a000ced0: e8bd8030 pop {r4, r5, pc}
a000d1a8 <IMFS_evaluate_link>:
*/
int IMFS_evaluate_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
a000d1a8: e92d40f0 push {r4, r5, r6, r7, lr}
/*
* Increment and check the link counter.
*/
rtems_filesystem_link_counts ++;
a000d1ac: e59f70a4 ldr r7, [pc, #164] ; a000d258 <IMFS_evaluate_link+0xb0>
*/
int IMFS_evaluate_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
a000d1b0: e1a04000 mov r4, r0
a000d1b4: e1a05001 mov r5, r1
/*
* Increment and check the link counter.
*/
rtems_filesystem_link_counts ++;
a000d1b8: e5973000 ldr r3, [r7]
{
IMFS_jnode_t *jnode;
int result = 0;
do {
jnode = node->node_access;
a000d1bc: e5946000 ldr r6, [r4]
/*
* Increment and check the link counter.
*/
rtems_filesystem_link_counts ++;
a000d1c0: e1d323b0 ldrh r2, [r3, #48] ; 0x30
a000d1c4: e2822001 add r2, r2, #1
a000d1c8: e1a02802 lsl r2, r2, #16
a000d1cc: e1a02822 lsr r2, r2, #16
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
a000d1d0: e3520005 cmp r2, #5
/*
* Increment and check the link counter.
*/
rtems_filesystem_link_counts ++;
a000d1d4: e1c323b0 strh r2, [r3, #48] ; 0x30
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
a000d1d8: 9a000006 bls a000d1f8 <IMFS_evaluate_link+0x50>
rtems_filesystem_link_counts = 0;
a000d1dc: e3a02000 mov r2, #0 <== NOT EXECUTED
a000d1e0: e1c323b0 strh r2, [r3, #48] ; 0x30 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ELOOP );
a000d1e4: eb000c24 bl a001027c <__errno> <== NOT EXECUTED
a000d1e8: e3a0305c mov r3, #92 ; 0x5c <== NOT EXECUTED
a000d1ec: e5803000 str r3, [r0] <== NOT EXECUTED
a000d1f0: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000d1f4: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
/*
* Follow the Link node.
*/
if ( jnode->type == IMFS_HARD_LINK )
a000d1f8: e596304c ldr r3, [r6, #76] ; 0x4c
a000d1fc: e3530003 cmp r3, #3
a000d200: 1a000003 bne a000d214 <IMFS_evaluate_link+0x6c>
result = IMFS_evaluate_hard_link( node, flags );
a000d204: e1a00004 mov r0, r4
a000d208: e1a01005 mov r1, r5
a000d20c: ebffff1d bl a000ce88 <IMFS_evaluate_hard_link>
a000d210: ea000004 b a000d228 <IMFS_evaluate_link+0x80>
else if (jnode->type == IMFS_SYM_LINK )
a000d214: e3530004 cmp r3, #4
a000d218: 1a000004 bne a000d230 <IMFS_evaluate_link+0x88>
result = IMFS_evaluate_sym_link( node, flags );
a000d21c: e1a00004 mov r0, r4
a000d220: e1a01005 mov r1, r5
a000d224: ebffffbd bl a000d120 <IMFS_evaluate_sym_link>
} while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
( jnode->type == IMFS_HARD_LINK ) ) );
a000d228: e3500000 cmp r0, #0
a000d22c: 1a000004 bne a000d244 <IMFS_evaluate_link+0x9c>
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 ) ||
a000d230: e596304c ldr r3, [r6, #76] ; 0x4c
a000d234: e2433003 sub r3, r3, #3
a000d238: e3530001 cmp r3, #1
a000d23c: 9affffdd bls a000d1b8 <IMFS_evaluate_link+0x10>
a000d240: e3a00000 mov r0, #0
/*
* Clear link counter.
*/
rtems_filesystem_link_counts = 0;
a000d244: e59f300c ldr r3, [pc, #12] ; a000d258 <IMFS_evaluate_link+0xb0>
a000d248: e3a02000 mov r2, #0
a000d24c: e5933000 ldr r3, [r3]
a000d250: e1c323b0 strh r2, [r3, #48] ; 0x30
return result;
}
a000d254: e8bd80f0 pop {r4, r5, r6, r7, pc}
a000ce48 <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 ) )
a000ce48: e3d13007 bics r3, r1, #7
*/
int IMFS_evaluate_permission(
rtems_filesystem_location_info_t *node,
int flags
)
{
a000ce4c: e52de004 push {lr} ; (str lr, [sp, #-4]!)
uid_t st_uid;
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
a000ce50: 0a000004 beq a000ce68 <IMFS_evaluate_permission+0x20>
rtems_set_errno_and_return_minus_one( EPERM );
a000ce54: eb000d08 bl a001027c <__errno> <== NOT EXECUTED
a000ce58: e3a03001 mov r3, #1 <== NOT EXECUTED
a000ce5c: e5803000 str r3, [r0] <== NOT EXECUTED
a000ce60: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000ce64: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
a000ce68: e5903000 ldr r3, [r0]
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
flags_to_test <<= 6;
a000ce6c: e1a01301 lsl r1, r1, #6
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
a000ce70: e5930030 ldr r0, [r3, #48] ; 0x30
a000ce74: e0010000 and r0, r1, r0
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 );
a000ce78: e1500001 cmp r0, r1
a000ce7c: 13a00000 movne r0, #0
a000ce80: 03a00001 moveq r0, #1
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
return 1;
return 0;
}
a000ce84: e49df004 pop {pc} ; (ldr pc, [sp], #4)
a000d120 <IMFS_evaluate_sym_link>:
int IMFS_evaluate_sym_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
a000d120: e92d4071 push {r0, r4, r5, r6, lr}
IMFS_jnode_t *jnode = node->node_access;
a000d124: e5906000 ldr r6, [r0]
int IMFS_evaluate_sym_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
a000d128: e1a04000 mov r4, r0
a000d12c: e1a05001 mov r5, r1
/*
* Move the node_access to either the symbolic links parent or
* root depending on the symbolic links path.
*/
node->node_access = jnode->Parent;
a000d130: e5963008 ldr r3, [r6, #8]
rtems_filesystem_get_sym_start_loc(
a000d134: e1a0100d mov r1, sp
a000d138: e1a02004 mov r2, r4
/*
* Move the node_access to either the symbolic links parent or
* root depending on the symbolic links path.
*/
node->node_access = jnode->Parent;
a000d13c: e5803000 str r3, [r0]
rtems_filesystem_get_sym_start_loc(
a000d140: e5960050 ldr r0, [r6, #80] ; 0x50
a000d144: eb000343 bl a000de58 <rtems_filesystem_get_sym_start_loc>
);
/*
* Use eval path to evaluate the path of the symbolic link.
*/
result = IMFS_eval_path(
a000d148: e59d3000 ldr r3, [sp]
a000d14c: e5966050 ldr r6, [r6, #80] ; 0x50
a000d150: e0866003 add r6, r6, r3
a000d154: e1a00006 mov r0, r6
a000d158: eb001031 bl a0011224 <strlen>
a000d15c: e1a02005 mov r2, r5
a000d160: e1a01000 mov r1, r0
a000d164: e1a03004 mov r3, r4
a000d168: e1a00006 mov r0, r6
a000d16c: ebffff58 bl a000ced4 <IMFS_eval_path>
a000d170: e1a06000 mov r6, r0
strlen( &jnode->info.sym_link.name[i] ),
flags,
node
);
IMFS_Set_handlers( node );
a000d174: e1a00004 mov r0, r4
a000d178: ebffff15 bl a000cdd4 <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
a000d17c: e1a00004 mov r0, r4
a000d180: e1a01005 mov r1, r5
a000d184: ebffff2f bl a000ce48 <IMFS_evaluate_permission>
a000d188: e3500000 cmp r0, #0
a000d18c: 1a000003 bne a000d1a0 <IMFS_evaluate_sym_link+0x80>
rtems_set_errno_and_return_minus_one( EACCES );
a000d190: eb000c39 bl a001027c <__errno> <== NOT EXECUTED
a000d194: e3a0300d mov r3, #13 <== NOT EXECUTED
a000d198: e5803000 str r3, [r0] <== NOT EXECUTED
a000d19c: e3e06000 mvn r6, #0 <== NOT EXECUTED
return result;
}
a000d1a0: e1a00006 mov r0, r6
a000d1a4: e8bd8078 pop {r3, r4, r5, r6, pc}
a000fd30 <IMFS_fchmod>:
int IMFS_fchmod(
rtems_filesystem_location_info_t *loc,
mode_t mode
)
{
a000fd30: e92d4013 push {r0, r1, r4, lr} <== NOT EXECUTED
IMFS_jnode_t *jnode;
#if defined(RTEMS_POSIX_API)
uid_t st_uid;
#endif
jnode = loc->node_access;
a000fd34: e5904000 ldr r4, [r0] <== NOT EXECUTED
/*
* Change only the RWX permissions on the jnode to mode.
*/
jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
a000fd38: e1a01a01 lsl r1, r1, #20 <== NOT EXECUTED
IMFS_update_ctime( jnode );
a000fd3c: e1a0000d mov r0, sp <== NOT EXECUTED
/*
* Change only the RWX permissions on the jnode to mode.
*/
jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
a000fd40: e5943030 ldr r3, [r4, #48] ; 0x30 <== NOT EXECUTED
a000fd44: e3c33eff bic r3, r3, #4080 ; 0xff0 <== NOT EXECUTED
a000fd48: e3c3300f bic r3, r3, #15 <== NOT EXECUTED
jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
a000fd4c: e1833a21 orr r3, r3, r1, lsr #20 <== NOT EXECUTED
a000fd50: e5843030 str r3, [r4, #48] ; 0x30 <== NOT EXECUTED
IMFS_update_ctime( jnode );
a000fd54: e3a01000 mov r1, #0 <== NOT EXECUTED
a000fd58: ebffd950 bl a00062a0 <gettimeofday> <== NOT EXECUTED
a000fd5c: e59d3000 ldr r3, [sp] <== NOT EXECUTED
return 0;
}
a000fd60: e3a00000 mov r0, #0 <== NOT EXECUTED
*/
jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
IMFS_update_ctime( jnode );
a000fd64: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED
return 0;
}
a000fd68: e8bd801c pop {r2, r3, r4, pc} <== NOT EXECUTED
a000fd6c <IMFS_fdatasync>:
int IMFS_fdatasync(
rtems_libio_t *iop
)
{
return 0;
}
a000fd6c: e3a00000 mov r0, #0 <== NOT EXECUTED
a000fd70: e12fff1e bx lr <== NOT EXECUTED
a0006cf8 <IMFS_fifo_ioctl>:
void *buffer
)
{
int err;
if (command == FIONBIO) {
a0006cf8: e59fc06c ldr ip, [pc, #108] ; a0006d6c <IMFS_fifo_ioctl+0x74>
int IMFS_fifo_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
a0006cfc: e92d4010 push {r4, lr}
int err;
if (command == FIONBIO) {
a0006d00: e151000c cmp r1, ip
int IMFS_fifo_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
a0006d04: e1a03000 mov r3, r0
int err;
if (command == FIONBIO) {
a0006d08: 1a00000a bne a0006d38 <IMFS_fifo_ioctl+0x40>
if (buffer == NULL)
a0006d0c: e3520000 cmp r2, #0
a0006d10: 0a00000e beq a0006d50 <IMFS_fifo_ioctl+0x58>
err = -EFAULT;
else {
if (*(int *)buffer)
a0006d14: e5924000 ldr r4, [r2]
a0006d18: e5932014 ldr r2, [r3, #20]
a0006d1c: e3540000 cmp r4, #0
iop->flags |= LIBIO_FLAGS_NO_DELAY;
a0006d20: 13822001 orrne r2, r2, #1
else
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
a0006d24: 03c22001 biceq r2, r2, #1
if (command == FIONBIO) {
if (buffer == NULL)
err = -EFAULT;
else {
if (*(int *)buffer)
iop->flags |= LIBIO_FLAGS_NO_DELAY;
a0006d28: 15832014 strne r2, [r3, #20]
else
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
return 0;
a0006d2c: 13a04000 movne r4, #0
err = -EFAULT;
else {
if (*(int *)buffer)
iop->flags |= LIBIO_FLAGS_NO_DELAY;
else
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
a0006d30: 05832014 streq r2, [r3, #20]
a0006d34: ea00000a b a0006d64 <IMFS_fifo_ioctl+0x6c>
return 0;
}
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
a0006d38: e5930018 ldr r0, [r3, #24] <== NOT EXECUTED
a0006d3c: e5900050 ldr r0, [r0, #80] ; 0x50 <== NOT EXECUTED
a0006d40: eb002478 bl a000ff28 <pipe_ioctl> <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
a0006d44: e2504000 subs r4, r0, #0 <== NOT EXECUTED
a0006d48: aa000005 bge a0006d64 <IMFS_fifo_ioctl+0x6c> <== NOT EXECUTED
a0006d4c: ea000000 b a0006d54 <IMFS_fifo_ioctl+0x5c> <== NOT EXECUTED
{
int err;
if (command == FIONBIO) {
if (buffer == NULL)
err = -EFAULT;
a0006d50: e3e0400d mvn r4, #13
}
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
IMFS_FIFO_RETURN(err);
a0006d54: eb002c7e bl a0011f54 <__errno>
a0006d58: e2644000 rsb r4, r4, #0
a0006d5c: e5804000 str r4, [r0]
a0006d60: e3e04000 mvn r4, #0
}
a0006d64: e1a00004 mov r0, r4
a0006d68: e8bd8010 pop {r4, pc}
a0006e50 <IMFS_fifo_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
a0006e50: e1a01000 mov r1, r0
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
int err = fifo_open(&JNODE2PIPE(jnode), iop);
a0006e54: e5900018 ldr r0, [r0, #24]
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
a0006e58: e92d4010 push {r4, lr}
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
int err = fifo_open(&JNODE2PIPE(jnode), iop);
a0006e5c: e2800050 add r0, r0, #80 ; 0x50
a0006e60: eb00227b bl a000f854 <fifo_open>
IMFS_FIFO_RETURN(err);
a0006e64: e2504000 subs r4, r0, #0
a0006e68: aa000003 bge a0006e7c <IMFS_fifo_open+0x2c>
a0006e6c: eb002c38 bl a0011f54 <__errno> <== NOT EXECUTED
a0006e70: e2644000 rsb r4, r4, #0 <== NOT EXECUTED
a0006e74: e5804000 str r4, [r0] <== NOT EXECUTED
a0006e78: e3e04000 mvn r4, #0 <== NOT EXECUTED
}
a0006e7c: e1a00004 mov r0, r4
a0006e80: e8bd8010 pop {r4, pc}
a0006dc8 <IMFS_fifo_read>:
ssize_t IMFS_fifo_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
a0006dc8: e92d4033 push {r0, r1, r4, r5, lr}
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
a0006dcc: e5904018 ldr r4, [r0, #24]
ssize_t IMFS_fifo_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
a0006dd0: e1a03000 mov r3, r0
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop);
a0006dd4: e5940050 ldr r0, [r4, #80] ; 0x50
a0006dd8: eb00238a bl a000fc08 <pipe_read>
if (err > 0)
a0006ddc: e2505000 subs r5, r0, #0
a0006de0: da000005 ble a0006dfc <IMFS_fifo_read+0x34>
IMFS_update_atime(jnode);
a0006de4: e1a0000d mov r0, sp <== NOT EXECUTED
a0006de8: e3a01000 mov r1, #0 <== NOT EXECUTED
a0006dec: eb0003d6 bl a0007d4c <gettimeofday> <== NOT EXECUTED
a0006df0: e59d3000 ldr r3, [sp] <== NOT EXECUTED
a0006df4: e5843040 str r3, [r4, #64] ; 0x40 <== NOT EXECUTED
a0006df8: ea000005 b a0006e14 <IMFS_fifo_read+0x4c> <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
a0006dfc: 0a000004 beq a0006e14 <IMFS_fifo_read+0x4c>
a0006e00: eb002c53 bl a0011f54 <__errno>
a0006e04: e2655000 rsb r5, r5, #0 <== NOT EXECUTED
a0006e08: e5805000 str r5, [r0] <== NOT EXECUTED
a0006e0c: e3e00000 mvn r0, #0 <== NOT EXECUTED
a0006e10: ea000000 b a0006e18 <IMFS_fifo_read+0x50> <== NOT EXECUTED
a0006e14: e1a00005 mov r0, r5
}
a0006e18: e8bd803c pop {r2, r3, r4, r5, pc}
a0006d70 <IMFS_fifo_write>:
ssize_t IMFS_fifo_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
a0006d70: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
a0006d74: e5904018 ldr r4, [r0, #24] <== NOT EXECUTED
ssize_t IMFS_fifo_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
a0006d78: e1a03000 mov r3, r0 <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
a0006d7c: e5940050 ldr r0, [r4, #80] ; 0x50 <== NOT EXECUTED
a0006d80: eb002400 bl a000fd88 <pipe_write> <== NOT EXECUTED
if (err > 0) {
a0006d84: e2505000 subs r5, r0, #0 <== NOT EXECUTED
a0006d88: da000006 ble a0006da8 <IMFS_fifo_write+0x38> <== NOT EXECUTED
IMFS_mtime_ctime_update(jnode);
a0006d8c: e1a0000d mov r0, sp <== NOT EXECUTED
a0006d90: e3a01000 mov r1, #0 <== NOT EXECUTED
a0006d94: eb0003ec bl a0007d4c <gettimeofday> <== NOT EXECUTED
a0006d98: e59d3000 ldr r3, [sp] <== NOT EXECUTED
a0006d9c: e5843044 str r3, [r4, #68] ; 0x44 <== NOT EXECUTED
a0006da0: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED
a0006da4: ea000005 b a0006dc0 <IMFS_fifo_write+0x50> <== NOT EXECUTED
}
IMFS_FIFO_RETURN(err);
a0006da8: 0a000004 beq a0006dc0 <IMFS_fifo_write+0x50> <== NOT EXECUTED
a0006dac: eb002c68 bl a0011f54 <__errno> <== NOT EXECUTED
a0006db0: e2655000 rsb r5, r5, #0 <== NOT EXECUTED
a0006db4: e5805000 str r5, [r0] <== NOT EXECUTED
a0006db8: e3e00000 mvn r0, #0 <== NOT EXECUTED
a0006dbc: ea000000 b a0006dc4 <IMFS_fifo_write+0x54> <== NOT EXECUTED
a0006dc0: e1a00005 mov r0, r5 <== NOT EXECUTED
}
a0006dc4: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED
a000d4a4 <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
)
{
a000d4a4: e92d4070 push {r4, r5, r6, lr}
/*
* 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;
a000d4a8: e1a0c000 mov ip, r0
a000d4ac: e5bc401c ldr r4, [ip, #28]!
((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next))
int IMFS_fsunmount(
rtems_filesystem_mount_table_entry_t *temp_mt_entry
)
{
a000d4b0: e24dd014 sub sp, sp, #20
* 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;
a000d4b4: e1a0e00d mov lr, sp
((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next))
int IMFS_fsunmount(
rtems_filesystem_mount_table_entry_t *temp_mt_entry
)
{
a000d4b8: e1a05000 mov r5, r0
* 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;
a000d4bc: e8bc000f ldm ip!, {r0, r1, r2, r3}
a000d4c0: e8ae000f stmia lr!, {r0, r1, r2, r3}
a000d4c4: e59c3000 ldr r3, [ip]
a000d4c8: e58e3000 str r3, [lr]
/*
* Set this to null to indicate that it is being unmounted.
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
a000d4cc: e3a03000 mov r3, #0
a000d4d0: e585301c str r3, [r5, #28]
do {
next = jnode->Parent;
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
a000d4d4: e1a0500d mov r5, sp
a000d4d8: e1a0000d mov r0, sp
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
do {
next = jnode->Parent;
a000d4dc: e5946008 ldr r6, [r4, #8]
loc.node_access = (void *)jnode;
a000d4e0: e58d4000 str r4, [sp]
IMFS_Set_handlers( &loc );
a000d4e4: ebfffe3a bl a000cdd4 <IMFS_Set_handlers>
if ( jnode->type != IMFS_DIRECTORY ) {
a000d4e8: e594304c ldr r3, [r4, #76] ; 0x4c
a000d4ec: e3530001 cmp r3, #1
a000d4f0: 1a000003 bne a000d504 <IMFS_fsunmount+0x60>
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
a000d4f4: e5942050 ldr r2, [r4, #80] ; 0x50
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
a000d4f8: e2843054 add r3, r4, #84 ; 0x54
a000d4fc: e1520003 cmp r2, r3
a000d500: 1a000005 bne a000d51c <IMFS_fsunmount+0x78>
result = IMFS_unlink( NULL, &loc );
a000d504: e3a00000 mov r0, #0
a000d508: e1a0100d mov r1, sp
a000d50c: ebffe1ff bl a0005d10 <IMFS_unlink>
if (result != 0)
a000d510: e3500000 cmp r0, #0
a000d514: 1a00000c bne a000d54c <IMFS_fsunmount+0xa8>
return -1;
jnode = next;
a000d518: e1a04006 mov r4, r6
}
if ( jnode != NULL ) {
a000d51c: e3540000 cmp r4, #0
a000d520: 0a00000b beq a000d554 <IMFS_fsunmount+0xb0>
if ( jnode->type == IMFS_DIRECTORY ) {
a000d524: e594304c ldr r3, [r4, #76] ; 0x4c
a000d528: e3530001 cmp r3, #1
a000d52c: 1affffe9 bne a000d4d8 <IMFS_fsunmount+0x34>
}
}
} while (jnode != NULL);
return 0;
}
a000d530: e5943050 ldr r3, [r4, #80] ; 0x50
a000d534: e2842054 add r2, r4, #84 ; 0x54
return -1;
jnode = next;
}
if ( jnode != NULL ) {
if ( jnode->type == IMFS_DIRECTORY ) {
if ( jnode_has_children( jnode ) )
a000d538: e1530002 cmp r3, r2
a000d53c: 0affffe5 beq a000d4d8 <IMFS_fsunmount+0x34>
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
a000d540: e2534000 subs r4, r3, #0
a000d544: 1affffe3 bne a000d4d8 <IMFS_fsunmount+0x34>
a000d548: ea000001 b a000d554 <IMFS_fsunmount+0xb0> <== NOT EXECUTED
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
a000d54c: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000d550: ea000000 b a000d558 <IMFS_fsunmount+0xb4> <== NOT EXECUTED
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
return 0;
a000d554: e1a00004 mov r0, r4
}
a000d558: e28dd014 add sp, sp, #20
a000d55c: e8bd8070 pop {r4, r5, r6, pc}
a000d5e0 <IMFS_get_token>:
const char *path,
int pathlen,
char *token,
int *token_len
)
{
a000d5e0: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
a000d5e4: e1a05001 mov r5, r1
a000d5e8: e1a04002 mov r4, r2
a000d5ec: e1a0a003 mov sl, r3
register char c;
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
a000d5f0: e5d07000 ldrb r7, [r0]
a000d5f4: e1a08000 mov r8, r0
int pathlen,
char *token,
int *token_len
)
{
register int i = 0;
a000d5f8: e3a06000 mov r6, #0
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) {
a000d5fc: ea000004 b a000d614 <IMFS_get_token+0x34>
token[i] = c;
if ( i == IMFS_NAME_MAX )
a000d600: e3560020 cmp r6, #32
* 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;
a000d604: e7c47006 strb r7, [r4, r6]
if ( i == IMFS_NAME_MAX )
a000d608: 0a000025 beq a000d6a4 <IMFS_get_token+0xc4>
return IMFS_INVALID_TOKEN;
if ( !IMFS_is_valid_name_char(c) )
type = IMFS_INVALID_TOKEN;
c = path [++i];
a000d60c: e5f87001 ldrb r7, [r8, #1]!
a000d610: e2866001 add r6, r6, #1
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) {
a000d614: e1a00007 mov r0, r7
a000d618: ebffe679 bl a0007004 <rtems_filesystem_is_separator>
a000d61c: e3500000 cmp r0, #0
a000d620: 1a000001 bne a000d62c <IMFS_get_token+0x4c>
a000d624: e1560005 cmp r6, r5
a000d628: bafffff4 blt a000d600 <IMFS_get_token+0x20>
/*
* Copy a seperator into token.
*/
if ( i == 0 ) {
a000d62c: e3560000 cmp r6, #0
a000d630: 1a000005 bne a000d64c <IMFS_get_token+0x6c>
token[i] = c;
if ( (token[i] != '\0') && pathlen ) {
a000d634: e3570000 cmp r7, #0
a000d638: 13550000 cmpne r5, #0
i++;
type = IMFS_CURRENT_DIR;
a000d63c: 13a06001 movne r6, #1
/*
* Copy a seperator into token.
*/
if ( i == 0 ) {
token[i] = c;
a000d640: e5c47000 strb r7, [r4]
if ( (token[i] != '\0') && pathlen ) {
i++;
a000d644: e1a00006 mov r0, r6
a000d648: ea000005 b a000d664 <IMFS_get_token+0x84>
type = IMFS_CURRENT_DIR;
} else {
type = IMFS_NO_MORE_PATH;
}
} else if (token[ i-1 ] != '\0') {
a000d64c: e0843006 add r3, r4, r6
a000d650: e5533001 ldrb r3, [r3, #-1]
char *token,
int *token_len
)
{
register int i = 0;
IMFS_token_types type = IMFS_NAME;
a000d654: e3a00003 mov r0, #3
i++;
type = IMFS_CURRENT_DIR;
} else {
type = IMFS_NO_MORE_PATH;
}
} else if (token[ i-1 ] != '\0') {
a000d658: e3530000 cmp r3, #0
token[i] = '\0';
a000d65c: 13a03000 movne r3, #0
a000d660: 17c43006 strbne r3, [r4, r6]
/*
* If we copied something that was not a seperator see if
* it was a special name.
*/
if ( type == IMFS_NAME ) {
a000d664: e3500003 cmp r0, #3
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
a000d668: e58a6000 str r6, [sl]
/*
* If we copied something that was not a seperator see if
* it was a special name.
*/
if ( type == IMFS_NAME ) {
a000d66c: 1a00000e bne a000d6ac <IMFS_get_token+0xcc>
if ( strcmp( token, "..") == 0 )
a000d670: e1a00004 mov r0, r4
a000d674: e59f1034 ldr r1, [pc, #52] ; a000d6b0 <IMFS_get_token+0xd0>
a000d678: eb000e0d bl a0010eb4 <strcmp>
a000d67c: e3500000 cmp r0, #0
type = IMFS_UP_DIR;
a000d680: 03a00002 moveq r0, #2
* If we copied something that was not a seperator see if
* it was a special name.
*/
if ( type == IMFS_NAME ) {
if ( strcmp( token, "..") == 0 )
a000d684: 0a000008 beq a000d6ac <IMFS_get_token+0xcc>
type = IMFS_UP_DIR;
else if ( strcmp( token, "." ) == 0 )
a000d688: e1a00004 mov r0, r4
a000d68c: e59f1020 ldr r1, [pc, #32] ; a000d6b4 <IMFS_get_token+0xd4>
a000d690: eb000e07 bl a0010eb4 <strcmp>
type = IMFS_CURRENT_DIR;
a000d694: e3500000 cmp r0, #0
a000d698: 13a00003 movne r0, #3
a000d69c: 03a00001 moveq r0, #1
a000d6a0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) {
token[i] = c;
if ( i == IMFS_NAME_MAX )
return IMFS_INVALID_TOKEN;
a000d6a4: e3a00004 mov r0, #4 <== NOT EXECUTED
a000d6a8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
else if ( strcmp( token, "." ) == 0 )
type = IMFS_CURRENT_DIR;
}
return type;
}
a000d6ac: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
a0005954 <IMFS_initialize_support>:
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
)
{
a0005954: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
a0005958: e1a07003 mov r7, r3
IMFS_jnode_t *jnode;
/*
* determine/check value for imfs_memfile_bytes_per_block
*/
IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block,
a000595c: e59f30d0 ldr r3, [pc, #208] ; a0005a34 <IMFS_initialize_support+0xe0>
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
)
{
a0005960: e1a0a001 mov sl, r1
a0005964: e1a08002 mov r8, r2
IMFS_jnode_t *jnode;
/*
* determine/check value for imfs_memfile_bytes_per_block
*/
IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block,
a0005968: e5933000 ldr r3, [r3]
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
)
{
a000596c: e1a04000 mov r4, r0
IMFS_jnode_t *jnode;
/*
* determine/check value for imfs_memfile_bytes_per_block
*/
IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block,
a0005970: e3a01006 mov r1, #6
int bit_mask;
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
a0005974: e3a02010 mov r2, #16
if (bit_mask == requested_bytes_per_block) {
a0005978: e1520003 cmp r2, r3
a000597c: 0a000004 beq a0005994 <IMFS_initialize_support+0x40>
is_valid = true;
break;
}
if(bit_mask > requested_bytes_per_block)
a0005980: ca000002 bgt a0005990 <IMFS_initialize_support+0x3c>
int bit_mask;
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
a0005984: e2511001 subs r1, r1, #1
a0005988: e1a02082 lsl r2, r2, #1
a000598c: 1afffff9 bne a0005978 <IMFS_initialize_support+0x24>
if(bit_mask > requested_bytes_per_block)
break;
}
*dest_bytes_per_block = ((is_valid)
? requested_bytes_per_block
: default_bytes_per_block);
a0005990: e3a03080 mov r3, #128 ; 0x80
break;
}
if(bit_mask > requested_bytes_per_block)
break;
}
*dest_bytes_per_block = ((is_valid)
a0005994: e59f609c ldr r6, [pc, #156] ; a0005a38 <IMFS_initialize_support+0xe4>
a0005998: e5863000 str r3, [r6]
/*
* 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();
a000599c: eb001cfc bl a000cd94 <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;
a00059a0: e59fe094 ldr lr, [pc, #148] ; a0005a3c <IMFS_initialize_support+0xe8>
a00059a4: e284c038 add ip, r4, #56 ; 0x38
/*
* 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();
a00059a8: e584001c str r0, [r4, #28]
a00059ac: e1a05000 mov r5, r0
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;
a00059b0: e8be000f ldm lr!, {r0, r1, r2, r3}
a00059b4: e8ac000f stmia ip!, {r0, r1, r2, r3}
a00059b8: e8be000f ldm lr!, {r0, r1, r2, r3}
a00059bc: e8ac000f stmia ip!, {r0, r1, r2, r3}
a00059c0: e89e000f ldm lr, {r0, r1, r2, r3}
* 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();
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
a00059c4: e5847024 str r7, [r4, #36] ; 0x24
temp_mt_entry->mt_fs_root.ops = op_table;
temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
a00059c8: e88c000f stm ip, {r0, r1, r2, r3}
*
* 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;
a00059cc: e584a028 str sl, [r4, #40] ; 0x28
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 ) );
a00059d0: e3a00001 mov r0, #1
a00059d4: e3a01014 mov r1, #20
a00059d8: eb000196 bl a0006038 <calloc>
if ( !fs_info ) {
a00059dc: e3500000 cmp r0, #0
a00059e0: 1a000006 bne a0005a00 <IMFS_initialize_support+0xac>
free(temp_mt_entry->mt_fs_root.node_access);
a00059e4: e1a00005 mov r0, r5 <== NOT EXECUTED
a00059e8: eb0001f7 bl a00061cc <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
a00059ec: eb002a22 bl a001027c <__errno> <== NOT EXECUTED
a00059f0: e3a0300c mov r3, #12 <== NOT EXECUTED
a00059f4: e5803000 str r3, [r0] <== NOT EXECUTED
a00059f8: e3e00000 mvn r0, #0 <== NOT EXECUTED
a00059fc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
a0005a00: e5963004 ldr r3, [r6, #4]
fs_info->ino_count = 1;
fs_info->memfile_handlers = memfile_handlers;
fs_info->directory_handlers = directory_handlers;
fs_info->fifo_handlers = fifo_handlers;
a0005a04: e59d201c ldr r2, [sp, #28]
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
if ( !fs_info ) {
free(temp_mt_entry->mt_fs_root.node_access);
rtems_set_errno_and_return_minus_one(ENOMEM);
}
temp_mt_entry->fs_info = fs_info;
a0005a08: e5840034 str r0, [r4, #52] ; 0x34
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
a0005a0c: e5803000 str r3, [r0]
a0005a10: e2833001 add r3, r3, #1
a0005a14: e5863004 str r3, [r6, #4]
fs_info->ino_count = 1;
a0005a18: e3a03001 mov r3, #1
a0005a1c: e9800108 stmib r0, {r3, r8}
fs_info->memfile_handlers = memfile_handlers;
fs_info->directory_handlers = directory_handlers;
a0005a20: e580700c str r7, [r0, #12]
fs_info->fifo_handlers = fifo_handlers;
a0005a24: e5802010 str r2, [r0, #16]
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
a0005a28: e5853038 str r3, [r5, #56] ; 0x38
return 0;
a0005a2c: e3a00000 mov r0, #0
}
a0005a30: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
a0005a40 <IMFS_link>:
int IMFS_link(
rtems_filesystem_location_info_t *to_loc, /* IN */
rtems_filesystem_location_info_t *parent_loc, /* IN */
const char *token /* IN */
)
{
a0005a40: e92d4070 push {r4, r5, r6, lr}
int i;
/*
* Verify this node can be linked to.
*/
info.hard_link.link_node = to_loc->node_access;
a0005a44: e5903000 ldr r3, [r0]
int IMFS_link(
rtems_filesystem_location_info_t *to_loc, /* IN */
rtems_filesystem_location_info_t *parent_loc, /* IN */
const char *token /* IN */
)
{
a0005a48: e24dd048 sub sp, sp, #72 ; 0x48
a0005a4c: e1a05001 mov r5, r1
int i;
/*
* Verify this node can be linked to.
*/
info.hard_link.link_node = to_loc->node_access;
a0005a50: e58d3028 str r3, [sp, #40] ; 0x28
if ( info.hard_link.link_node->st_nlink >= LINK_MAX )
a0005a54: e1d333b4 ldrh r3, [r3, #52] ; 0x34
int IMFS_link(
rtems_filesystem_location_info_t *to_loc, /* IN */
rtems_filesystem_location_info_t *parent_loc, /* IN */
const char *token /* IN */
)
{
a0005a58: e1a06002 mov r6, r2
/*
* Verify this node can be linked to.
*/
info.hard_link.link_node = to_loc->node_access;
if ( info.hard_link.link_node->st_nlink >= LINK_MAX )
a0005a5c: e3530007 cmp r3, #7
a0005a60: 9a000002 bls a0005a70 <IMFS_link+0x30>
rtems_set_errno_and_return_minus_one( EMLINK );
a0005a64: eb002a04 bl a001027c <__errno> <== NOT EXECUTED
a0005a68: e3a0301f mov r3, #31 <== NOT EXECUTED
a0005a6c: ea000012 b a0005abc <IMFS_link+0x7c> <== NOT EXECUTED
/*
* Remove any separators at the end of the string.
*/
IMFS_get_token( token, strlen( token ), new_name, &i );
a0005a70: e1a00002 mov r0, r2
a0005a74: eb002dea bl a0011224 <strlen>
a0005a78: e28d4004 add r4, sp, #4
a0005a7c: e1a01000 mov r1, r0
a0005a80: e1a02004 mov r2, r4
a0005a84: e28d3044 add r3, sp, #68 ; 0x44
a0005a88: e1a00006 mov r0, r6
a0005a8c: eb001ed3 bl a000d5e0 <IMFS_get_token>
new_node = IMFS_create_node(
parent_loc,
IMFS_HARD_LINK,
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
a0005a90: e28d3028 add r3, sp, #40 ; 0x28
* 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(
a0005a94: e58d3000 str r3, [sp]
a0005a98: e1a00005 mov r0, r5
a0005a9c: e3a01003 mov r1, #3
a0005aa0: e1a02004 mov r2, r4
a0005aa4: e59f3050 ldr r3, [pc, #80] ; a0005afc <IMFS_link+0xbc>
a0005aa8: eb001c69 bl a000cc54 <IMFS_create_node>
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if ( !new_node )
a0005aac: e3500000 cmp r0, #0
a0005ab0: 1a000004 bne a0005ac8 <IMFS_link+0x88>
rtems_set_errno_and_return_minus_one( ENOMEM );
a0005ab4: eb0029f0 bl a001027c <__errno> <== NOT EXECUTED
a0005ab8: e3a0300c mov r3, #12 <== NOT EXECUTED
a0005abc: e5803000 str r3, [r0] <== NOT EXECUTED
a0005ac0: e3e00000 mvn r0, #0 <== NOT EXECUTED
a0005ac4: ea00000a b a0005af4 <IMFS_link+0xb4> <== NOT EXECUTED
/*
* Increment the link count of the node being pointed to.
*/
info.hard_link.link_node->st_nlink++;
a0005ac8: e59d3028 ldr r3, [sp, #40] ; 0x28
IMFS_update_ctime( info.hard_link.link_node );
a0005acc: e28d003c add r0, sp, #60 ; 0x3c
a0005ad0: e3a01000 mov r1, #0
rtems_set_errno_and_return_minus_one( ENOMEM );
/*
* Increment the link count of the node being pointed to.
*/
info.hard_link.link_node->st_nlink++;
a0005ad4: e1d323b4 ldrh r2, [r3, #52] ; 0x34
a0005ad8: e2822001 add r2, r2, #1
a0005adc: e1c323b4 strh r2, [r3, #52] ; 0x34
IMFS_update_ctime( info.hard_link.link_node );
a0005ae0: eb0001ee bl a00062a0 <gettimeofday>
a0005ae4: e59d203c ldr r2, [sp, #60] ; 0x3c
a0005ae8: e59d3028 ldr r3, [sp, #40] ; 0x28
return 0;
a0005aec: e3a00000 mov r0, #0
/*
* Increment the link count of the node being pointed to.
*/
info.hard_link.link_node->st_nlink++;
IMFS_update_ctime( info.hard_link.link_node );
a0005af0: e5832048 str r2, [r3, #72] ; 0x48
return 0;
}
a0005af4: e28dd048 add sp, sp, #72 ; 0x48
a0005af8: e8bd8070 pop {r4, r5, r6, pc}
a000f1e4 <IMFS_memfile_addblock>:
*/
MEMFILE_STATIC int IMFS_memfile_addblock(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
a000f1e4: e92d4030 push {r4, r5, lr}
IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE );
/*
* Obtain the pointer for the specified block number
*/
block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 );
a000f1e8: e3a02001 mov r2, #1
a000f1ec: ebffff00 bl a000edf4 <IMFS_memfile_get_block_pointer>
if ( *block_entry_ptr )
a000f1f0: e5904000 ldr r4, [r0]
IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE );
/*
* Obtain the pointer for the specified block number
*/
block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 );
a000f1f4: e1a05000 mov r5, r0
if ( *block_entry_ptr )
a000f1f8: e3540000 cmp r4, #0
a000f1fc: 1a000005 bne a000f218 <IMFS_memfile_addblock+0x34>
return 0;
/*
* There is no memory for this block number so allocate it.
*/
memory = memfile_alloc_block();
a000f200: ebfffeee bl a000edc0 <memfile_alloc_block>
if ( !memory )
a000f204: e3500000 cmp r0, #0
a000f208: 0a000004 beq a000f220 <IMFS_memfile_addblock+0x3c>
return 1;
*block_entry_ptr = memory;
a000f20c: e5850000 str r0, [r5]
return 0;
a000f210: e1a00004 mov r0, r4
a000f214: e8bd8030 pop {r4, r5, pc}
/*
* Obtain the pointer for the specified block number
*/
block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 );
if ( *block_entry_ptr )
return 0;
a000f218: e3a00000 mov r0, #0
a000f21c: e8bd8030 pop {r4, r5, pc}
/*
* There is no memory for this block number so allocate it.
*/
memory = memfile_alloc_block();
if ( !memory )
return 1;
a000f220: e3a00001 mov r0, #1 <== NOT EXECUTED
*block_entry_ptr = memory;
return 0;
}
a000f224: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
a000f3d8 <IMFS_memfile_extend>:
IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE );
/*
* Verify new file size is supported
*/
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
a000f3d8: e59f3110 ldr r3, [pc, #272] ; a000f4f0 <IMFS_memfile_extend+0x118>
*/
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
a000f3dc: e92d4df1 push {r0, r4, r5, r6, r7, r8, sl, fp, lr}
IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE );
/*
* Verify new file size is supported
*/
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
a000f3e0: e593b000 ldr fp, [r3]
*/
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
a000f3e4: e1a05002 mov r5, r2
a000f3e8: e1a04000 mov r4, r0
IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE );
/*
* Verify new file size is supported
*/
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
a000f3ec: e1a0312b lsr r3, fp, #2
a000f3f0: e2832001 add r2, r3, #1
a000f3f4: e0020293 mul r2, r3, r2
*/
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
a000f3f8: e1a06001 mov r6, r1
IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE );
/*
* Verify new file size is supported
*/
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
a000f3fc: e2822001 add r2, r2, #1
a000f400: e0030392 mul r3, r2, r3
a000f404: e3a02000 mov r2, #0
a000f408: e2433001 sub r3, r3, #1
a000f40c: e1520005 cmp r2, r5
a000f410: e003039b mul r3, fp, r3
a000f414: ca000005 bgt a000f430 <IMFS_memfile_extend+0x58>
a000f418: 1a000001 bne a000f424 <IMFS_memfile_extend+0x4c>
a000f41c: e1530001 cmp r3, r1
a000f420: 8a000002 bhi a000f430 <IMFS_memfile_extend+0x58>
rtems_set_errno_and_return_minus_one( EINVAL );
a000f424: eb000394 bl a001027c <__errno>
a000f428: e3a03016 mov r3, #22
a000f42c: ea000025 b a000f4c8 <IMFS_memfile_extend+0xf0>
/*
* Verify new file size is actually larger than current size
*/
if ( new_length <= the_jnode->info.file.size )
a000f430: e5948054 ldr r8, [r4, #84] ; 0x54
a000f434: e5947050 ldr r7, [r4, #80] ; 0x50
a000f438: e1550008 cmp r5, r8
a000f43c: ca000002 bgt a000f44c <IMFS_memfile_extend+0x74>
a000f440: 1a000028 bne a000f4e8 <IMFS_memfile_extend+0x110>
a000f444: e1560007 cmp r6, r7
a000f448: 9a000026 bls a000f4e8 <IMFS_memfile_extend+0x110>
return 0;
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
a000f44c: e1a0cfcb asr ip, fp, #31
a000f450: e1a0300c mov r3, ip
a000f454: e1a0200b mov r2, fp
a000f458: e1a00006 mov r0, r6
a000f45c: e1a01005 mov r1, r5
a000f460: e58dc000 str ip, [sp]
a000f464: eb001213 bl a0013cb8 <__divdi3>
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
a000f468: e59dc000 ldr ip, [sp]
a000f46c: e1a01008 mov r1, r8
return 0;
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
a000f470: e1a0a000 mov sl, r0
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
a000f474: e1a0200b mov r2, fp
a000f478: e1a00007 mov r0, r7
a000f47c: e1a0300c mov r3, ip
a000f480: eb00120c bl a0013cb8 <__divdi3>
a000f484: e1a08000 mov r8, r0
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
a000f488: e1a07000 mov r7, r0
a000f48c: ea000011 b a000f4d8 <IMFS_memfile_extend+0x100>
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
a000f490: e1a00004 mov r0, r4
a000f494: e1a01007 mov r1, r7
a000f498: ebffff51 bl a000f1e4 <IMFS_memfile_addblock>
a000f49c: e3500000 cmp r0, #0
a000f4a0: 0a00000b beq a000f4d4 <IMFS_memfile_extend+0xfc>
a000f4a4: ea000003 b a000f4b8 <IMFS_memfile_extend+0xe0> <== NOT EXECUTED
for ( ; block>=old_blocks ; block-- ) {
IMFS_memfile_remove_block( the_jnode, block );
a000f4a8: e1a01007 mov r1, r7 <== NOT EXECUTED
a000f4ac: e1a00004 mov r0, r4 <== NOT EXECUTED
a000f4b0: ebffffbe bl a000f3b0 <IMFS_memfile_remove_block> <== NOT EXECUTED
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
for ( ; block>=old_blocks ; block-- ) {
a000f4b4: e2477001 sub r7, r7, #1 <== NOT EXECUTED
a000f4b8: e1570008 cmp r7, r8 <== NOT EXECUTED
a000f4bc: 2afffff9 bcs a000f4a8 <IMFS_memfile_extend+0xd0> <== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block );
}
rtems_set_errno_and_return_minus_one( ENOSPC );
a000f4c0: eb00036d bl a001027c <__errno> <== NOT EXECUTED
a000f4c4: e3a0301c mov r3, #28 <== NOT EXECUTED
a000f4c8: e5803000 str r3, [r0]
a000f4cc: e3e00000 mvn r0, #0
a000f4d0: ea000005 b a000f4ec <IMFS_memfile_extend+0x114>
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++ ) {
a000f4d4: e2877001 add r7, r7, #1
a000f4d8: e157000a cmp r7, sl
a000f4dc: 9affffeb bls a000f490 <IMFS_memfile_extend+0xb8>
}
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
a000f4e0: e5846050 str r6, [r4, #80] ; 0x50
a000f4e4: e5845054 str r5, [r4, #84] ; 0x54
/*
* Verify new file size is actually larger than current size
*/
if ( new_length <= the_jnode->info.file.size )
return 0;
a000f4e8: e3a00000 mov r0, #0
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
return 0;
}
a000f4ec: e8bd8df8 pop {r3, r4, r5, r6, r7, r8, sl, fp, pc}
a000edf4 <IMFS_memfile_get_block_pointer>:
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
a000edf4: e59f31e4 ldr r3, [pc, #484] ; a000efe0 <IMFS_memfile_get_block_pointer+0x1ec>
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
a000edf8: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
a000edfc: e5935000 ldr r5, [r3]
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
a000ee00: e1a04000 mov r4, r0
a000ee04: e1a06001 mov r6, r1
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
a000ee08: e1a05125 lsr r5, r5, #2
a000ee0c: e2453001 sub r3, r5, #1
a000ee10: e1510003 cmp r1, r3
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
a000ee14: e1a08002 mov r8, r2
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
a000ee18: 8a00000e bhi a000ee58 <IMFS_memfile_get_block_pointer+0x64>
p = info->indirect;
if ( malloc_it ) {
a000ee1c: e3520000 cmp r2, #0
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
p = info->indirect;
a000ee20: e5900058 ldr r0, [r0, #88] ; 0x58
if ( malloc_it ) {
a000ee24: 0a000007 beq a000ee48 <IMFS_memfile_get_block_pointer+0x54>
if ( !p ) {
a000ee28: e3500000 cmp r0, #0
a000ee2c: 1a000003 bne a000ee40 <IMFS_memfile_get_block_pointer+0x4c>
p = memfile_alloc_block();
a000ee30: ebffffe2 bl a000edc0 <memfile_alloc_block>
if ( !p )
a000ee34: e3500000 cmp r0, #0
a000ee38: 0a000067 beq a000efdc <IMFS_memfile_get_block_pointer+0x1e8>
return 0;
info->indirect = p;
a000ee3c: e5840058 str r0, [r4, #88] ; 0x58
}
return &info->indirect[ my_block ];
a000ee40: e5940058 ldr r0, [r4, #88] ; 0x58
a000ee44: ea000001 b a000ee50 <IMFS_memfile_get_block_pointer+0x5c>
}
if ( !p )
a000ee48: e3500000 cmp r0, #0
a000ee4c: 0a000062 beq a000efdc <IMFS_memfile_get_block_pointer+0x1e8>
return 0;
return &info->indirect[ my_block ];
a000ee50: e0800106 add r0, r0, r6, lsl #2
a000ee54: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
/*
* Is the block number in the doubly indirect portion?
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
a000ee58: e2853001 add r3, r5, #1
a000ee5c: e0030395 mul r3, r5, r3
a000ee60: e2432001 sub r2, r3, #1
a000ee64: e1510002 cmp r1, r2
a000ee68: 8a000021 bhi a000eef4 <IMFS_memfile_get_block_pointer+0x100>
my_block -= FIRST_DOUBLY_INDIRECT;
a000ee6c: e0656001 rsb r6, r5, r1
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
a000ee70: e1a00006 mov r0, r6
a000ee74: e1a01005 mov r1, r5
a000ee78: eb00135a bl a0013be8 <__umodsi3>
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
a000ee7c: e1a01005 mov r1, r5
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
my_block -= FIRST_DOUBLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
a000ee80: e1a07000 mov r7, r0
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
a000ee84: e1a00006 mov r0, r6
a000ee88: eb0012be bl a0013988 <__aeabi_uidiv>
p = info->doubly_indirect;
if ( malloc_it ) {
a000ee8c: e3580000 cmp r8, #0
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
my_block -= FIRST_DOUBLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
a000ee90: e1a05000 mov r5, r0
p = info->doubly_indirect;
a000ee94: e594005c ldr r0, [r4, #92] ; 0x5c
if ( malloc_it ) {
a000ee98: 0a00000e beq a000eed8 <IMFS_memfile_get_block_pointer+0xe4>
if ( !p ) {
a000ee9c: e3500000 cmp r0, #0
a000eea0: 1a000003 bne a000eeb4 <IMFS_memfile_get_block_pointer+0xc0>
p = memfile_alloc_block();
a000eea4: ebffffc5 bl a000edc0 <memfile_alloc_block>
if ( !p )
a000eea8: e3500000 cmp r0, #0
a000eeac: 0a00004a beq a000efdc <IMFS_memfile_get_block_pointer+0x1e8>
return 0;
info->doubly_indirect = p;
a000eeb0: e584005c str r0, [r4, #92] ; 0x5c
}
p1 = (block_p *)p[ doubly ];
a000eeb4: e0804105 add r4, r0, r5, lsl #2
a000eeb8: e7900105 ldr r0, [r0, r5, lsl #2]
if ( !p1 ) {
a000eebc: e3500000 cmp r0, #0
a000eec0: 1a000009 bne a000eeec <IMFS_memfile_get_block_pointer+0xf8>
p1 = memfile_alloc_block();
a000eec4: ebffffbd bl a000edc0 <memfile_alloc_block>
if ( !p1 )
a000eec8: e3500000 cmp r0, #0
return 0;
p[ doubly ] = (block_p) p1;
a000eecc: 15840000 strne r0, [r4]
}
p1 = (block_p *)p[ doubly ];
if ( !p1 ) {
p1 = memfile_alloc_block();
if ( !p1 )
a000eed0: 1a000005 bne a000eeec <IMFS_memfile_get_block_pointer+0xf8>
a000eed4: ea000040 b a000efdc <IMFS_memfile_get_block_pointer+0x1e8> <== NOT EXECUTED
}
return (block_p *)&p1[ singly ];
}
if ( !p )
a000eed8: e3500000 cmp r0, #0
a000eedc: 0a00003e beq a000efdc <IMFS_memfile_get_block_pointer+0x1e8>
return 0;
p = (block_p *)p[ doubly ];
a000eee0: e7900105 ldr r0, [r0, r5, lsl #2]
if ( !p )
a000eee4: e3500000 cmp r0, #0
a000eee8: 0a00003b beq a000efdc <IMFS_memfile_get_block_pointer+0x1e8>
return 0;
return (block_p *)&p[ singly ];
a000eeec: e0800107 add r0, r0, r7, lsl #2
a000eef0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
}
/*
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
a000eef4: e2832001 add r2, r3, #1
a000eef8: e0020295 mul r2, r5, r2
a000eefc: e2422001 sub r2, r2, #1
a000ef00: e1510002 cmp r1, r2
a000ef04: 8a000033 bhi a000efd8 <IMFS_memfile_get_block_pointer+0x1e4>
my_block -= FIRST_TRIPLY_INDIRECT;
a000ef08: e0636001 rsb r6, r3, r1
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
a000ef0c: e1a00006 mov r0, r6
a000ef10: e1a01005 mov r1, r5
a000ef14: eb001333 bl a0013be8 <__umodsi3>
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
a000ef18: e1a01005 mov r1, r5
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
my_block -= FIRST_TRIPLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
a000ef1c: e1a0a000 mov sl, r0
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
a000ef20: e1a00006 mov r0, r6
a000ef24: eb001297 bl a0013988 <__aeabi_uidiv>
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
a000ef28: e1a01005 mov r1, r5
*/
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;
a000ef2c: e1a06000 mov r6, r0
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
a000ef30: eb001294 bl a0013988 <__aeabi_uidiv>
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
a000ef34: e1a01005 mov r1, r5
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;
a000ef38: e1a07000 mov r7, r0
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
a000ef3c: e1a00006 mov r0, r6
a000ef40: eb001328 bl a0013be8 <__umodsi3>
p = info->triply_indirect;
if ( malloc_it ) {
a000ef44: e3580000 cmp r8, #0
my_block -= FIRST_TRIPLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
a000ef48: e1a05000 mov r5, r0
p = info->triply_indirect;
a000ef4c: e5940060 ldr r0, [r4, #96] ; 0x60
if ( malloc_it ) {
a000ef50: 0a000016 beq a000efb0 <IMFS_memfile_get_block_pointer+0x1bc>
if ( !p ) {
a000ef54: e3500000 cmp r0, #0
a000ef58: 1a000003 bne a000ef6c <IMFS_memfile_get_block_pointer+0x178>
p = memfile_alloc_block();
a000ef5c: ebffff97 bl a000edc0 <memfile_alloc_block>
if ( !p )
a000ef60: e3500000 cmp r0, #0
a000ef64: 0a00001c beq a000efdc <IMFS_memfile_get_block_pointer+0x1e8>
return 0;
info->triply_indirect = p;
a000ef68: e5840060 str r0, [r4, #96] ; 0x60
}
p1 = (block_p *) p[ triply ];
a000ef6c: e0804107 add r4, r0, r7, lsl #2
a000ef70: e7900107 ldr r0, [r0, r7, lsl #2]
if ( !p1 ) {
a000ef74: e3500000 cmp r0, #0
a000ef78: 1a000003 bne a000ef8c <IMFS_memfile_get_block_pointer+0x198>
p1 = memfile_alloc_block();
a000ef7c: ebffff8f bl a000edc0 <memfile_alloc_block>
if ( !p1 )
a000ef80: e3500000 cmp r0, #0
a000ef84: 0a000014 beq a000efdc <IMFS_memfile_get_block_pointer+0x1e8>
return 0;
p[ triply ] = (block_p) p1;
a000ef88: e5840000 str r0, [r4]
}
p2 = (block_p *)p1[ doubly ];
a000ef8c: e0804105 add r4, r0, r5, lsl #2
a000ef90: e7900105 ldr r0, [r0, r5, lsl #2]
if ( !p2 ) {
a000ef94: e3500000 cmp r0, #0
a000ef98: 1a00000c bne a000efd0 <IMFS_memfile_get_block_pointer+0x1dc>
p2 = memfile_alloc_block();
a000ef9c: ebffff87 bl a000edc0 <memfile_alloc_block>
if ( !p2 )
a000efa0: e3500000 cmp r0, #0
return 0;
p1[ doubly ] = (block_p) p2;
a000efa4: 15840000 strne r0, [r4]
}
p2 = (block_p *)p1[ doubly ];
if ( !p2 ) {
p2 = memfile_alloc_block();
if ( !p2 )
a000efa8: 1a000008 bne a000efd0 <IMFS_memfile_get_block_pointer+0x1dc>
a000efac: ea00000a b a000efdc <IMFS_memfile_get_block_pointer+0x1e8> <== NOT EXECUTED
p1[ doubly ] = (block_p) p2;
}
return (block_p *)&p2[ singly ];
}
if ( !p )
a000efb0: e3500000 cmp r0, #0
a000efb4: 0a000008 beq a000efdc <IMFS_memfile_get_block_pointer+0x1e8>
return 0;
p1 = (block_p *) p[ triply ];
a000efb8: e7900107 ldr r0, [r0, r7, lsl #2]
if ( !p1 )
a000efbc: e3500000 cmp r0, #0
a000efc0: 0a000005 beq a000efdc <IMFS_memfile_get_block_pointer+0x1e8>
return 0;
p2 = (block_p *)p1[ doubly ];
a000efc4: e7900105 ldr r0, [r0, r5, lsl #2]
if ( !p2 )
a000efc8: e3500000 cmp r0, #0
a000efcc: 0a000002 beq a000efdc <IMFS_memfile_get_block_pointer+0x1e8>
return 0;
return (block_p *)&p2[ singly ];
a000efd0: e080010a add r0, r0, sl, lsl #2
a000efd4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
}
/*
* This means the requested block number is out of range.
*/
return 0;
a000efd8: e3a00000 mov r0, #0 <== NOT EXECUTED
}
a000efdc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
a000f298 <IMFS_memfile_remove>:
* is better to stick to simple, easy to understand algorithms.
*/
int IMFS_memfile_remove(
IMFS_jnode_t *the_jnode
)
{
a000f298: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
/*
* 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;
a000f29c: e59f3108 ldr r3, [pc, #264] ; a000f3ac <IMFS_memfile_remove+0x114>
* is better to stick to simple, easy to understand algorithms.
*/
int IMFS_memfile_remove(
IMFS_jnode_t *the_jnode
)
{
a000f2a0: e1a04000 mov r4, r0
/*
* 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;
a000f2a4: e5935000 ldr r5, [r3]
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
if ( info->indirect ) {
a000f2a8: e5903058 ldr r3, [r0, #88] ; 0x58
/*
* 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;
a000f2ac: e1a05125 lsr r5, r5, #2
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
if ( info->indirect ) {
a000f2b0: e3530000 cmp r3, #0
a000f2b4: 0a000002 beq a000f2c4 <IMFS_memfile_remove+0x2c>
memfile_free_blocks_in_table( &info->indirect, to_free );
a000f2b8: e2800058 add r0, r0, #88 ; 0x58 <== NOT EXECUTED
a000f2bc: e1a01005 mov r1, r5 <== NOT EXECUTED
a000f2c0: ebffffe0 bl a000f248 <memfile_free_blocks_in_table> <== NOT EXECUTED
}
if ( info->doubly_indirect ) {
a000f2c4: e594305c ldr r3, [r4, #92] ; 0x5c
a000f2c8: e3530000 cmp r3, #0
a000f2cc: 13a06000 movne r6, #0
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
a000f2d0: 159f70d4 ldrne r7, [pc, #212] ; a000f3ac <IMFS_memfile_remove+0x114>
if ( info->indirect ) {
memfile_free_blocks_in_table( &info->indirect, to_free );
}
if ( info->doubly_indirect ) {
a000f2d4: 1a000009 bne a000f300 <IMFS_memfile_remove+0x68>
a000f2d8: ea00000e b a000f318 <IMFS_memfile_remove+0x80>
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
if ( info->doubly_indirect[i] ) {
a000f2dc: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED
a000f2e0: e1a00106 lsl r0, r6, #2 <== NOT EXECUTED
a000f2e4: e7932106 ldr r2, [r3, r6, lsl #2] <== NOT EXECUTED
a000f2e8: e3520000 cmp r2, #0 <== NOT EXECUTED
a000f2ec: 0a000002 beq a000f2fc <IMFS_memfile_remove+0x64> <== NOT EXECUTED
memfile_free_blocks_in_table(
a000f2f0: e0830000 add r0, r3, r0 <== NOT EXECUTED
a000f2f4: e1a01005 mov r1, r5 <== NOT EXECUTED
a000f2f8: ebffffd2 bl a000f248 <memfile_free_blocks_in_table> <== NOT EXECUTED
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++ ) {
a000f2fc: e2866001 add r6, r6, #1 <== NOT EXECUTED
a000f300: e5973000 ldr r3, [r7] <== NOT EXECUTED
a000f304: e1560123 cmp r6, r3, lsr #2 <== NOT EXECUTED
a000f308: 3afffff3 bcc a000f2dc <IMFS_memfile_remove+0x44> <== NOT EXECUTED
if ( info->doubly_indirect[i] ) {
memfile_free_blocks_in_table(
(block_p **)&info->doubly_indirect[i], to_free );
}
}
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
a000f30c: e284005c add r0, r4, #92 ; 0x5c <== NOT EXECUTED
a000f310: e1a01005 mov r1, r5 <== NOT EXECUTED
a000f314: ebffffcb bl a000f248 <memfile_free_blocks_in_table> <== NOT EXECUTED
}
if ( info->triply_indirect ) {
a000f318: e5943060 ldr r3, [r4, #96] ; 0x60
a000f31c: e3530000 cmp r3, #0
a000f320: 13a06000 movne r6, #0
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
a000f324: 159fa080 ldrne sl, [pc, #128] ; a000f3ac <IMFS_memfile_remove+0x114>
}
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
}
if ( info->triply_indirect ) {
a000f328: 1a000017 bne a000f38c <IMFS_memfile_remove+0xf4>
a000f32c: ea00001c b a000f3a4 <IMFS_memfile_remove+0x10c>
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
a000f330: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED
}
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
}
if ( info->triply_indirect ) {
a000f334: e1a09106 lsl r9, r6, #2 <== NOT EXECUTED
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
a000f338: e7938106 ldr r8, [r3, r6, lsl #2] <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
a000f33c: e3580000 cmp r8, #0 <== NOT EXECUTED
a000f340: 0a000014 beq a000f398 <IMFS_memfile_remove+0x100> <== NOT EXECUTED
* 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(
a000f344: e2488004 sub r8, r8, #4 <== NOT EXECUTED
a000f348: e3a07000 mov r7, #0 <== NOT EXECUTED
a000f34c: ea000006 b a000f36c <IMFS_memfile_remove+0xd4> <== NOT EXECUTED
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++ ) {
if ( p[j] ) {
a000f350: e5b83004 ldr r3, [r8, #4]! <== NOT EXECUTED
a000f354: e3530000 cmp r3, #0 <== NOT EXECUTED
a000f358: 0a000002 beq a000f368 <IMFS_memfile_remove+0xd0> <== NOT EXECUTED
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
a000f35c: e1a00008 mov r0, r8 <== NOT EXECUTED
a000f360: e1a01005 mov r1, r5 <== NOT EXECUTED
a000f364: ebffffb7 bl a000f248 <memfile_free_blocks_in_table> <== NOT EXECUTED
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
if ( !p ) /* ensure we have a valid pointer */
break;
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
a000f368: e2877001 add r7, r7, #1 <== NOT EXECUTED
a000f36c: e59a3000 ldr r3, [sl] <== NOT EXECUTED
a000f370: e1570123 cmp r7, r3, lsr #2 <== NOT EXECUTED
a000f374: 3afffff5 bcc a000f350 <IMFS_memfile_remove+0xb8> <== NOT EXECUTED
if ( p[j] ) {
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
}
}
memfile_free_blocks_in_table(
a000f378: e5940060 ldr r0, [r4, #96] ; 0x60 <== NOT EXECUTED
a000f37c: e1a01005 mov r1, r5 <== NOT EXECUTED
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
a000f380: e2866001 add r6, r6, #1 <== NOT EXECUTED
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
if ( p[j] ) {
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
}
}
memfile_free_blocks_in_table(
a000f384: e0800009 add r0, r0, r9 <== NOT EXECUTED
a000f388: ebffffae bl a000f248 <memfile_free_blocks_in_table> <== NOT EXECUTED
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
a000f38c: e59a3000 ldr r3, [sl] <== NOT EXECUTED
a000f390: e1560123 cmp r6, r3, lsr #2 <== NOT EXECUTED
a000f394: 3affffe5 bcc a000f330 <IMFS_memfile_remove+0x98> <== NOT EXECUTED
}
}
memfile_free_blocks_in_table(
(block_p **)&info->triply_indirect[i], to_free );
}
memfile_free_blocks_in_table(
a000f398: e2840060 add r0, r4, #96 ; 0x60 <== NOT EXECUTED
a000f39c: e1a01005 mov r1, r5 <== NOT EXECUTED
a000f3a0: ebffffa8 bl a000f248 <memfile_free_blocks_in_table> <== NOT EXECUTED
(block_p **)&info->triply_indirect, to_free );
}
return 0;
}
a000f3a4: e3a00000 mov r0, #0
a000f3a8: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
a000f3b0 <IMFS_memfile_remove_block>:
*/
MEMFILE_STATIC int IMFS_memfile_remove_block(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
a000f3b0: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
block_p *block_ptr;
block_p ptr;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
a000f3b4: e3a02000 mov r2, #0 <== NOT EXECUTED
a000f3b8: ebfffe8d bl a000edf4 <IMFS_memfile_get_block_pointer> <== NOT EXECUTED
IMFS_assert( block_ptr );
ptr = *block_ptr;
*block_ptr = 0;
a000f3bc: e3a02000 mov r2, #0 <== NOT EXECUTED
)
{
block_p *block_ptr;
block_p ptr;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
a000f3c0: e1a03000 mov r3, r0 <== NOT EXECUTED
IMFS_assert( block_ptr );
ptr = *block_ptr;
a000f3c4: e5900000 ldr r0, [r0] <== NOT EXECUTED
*block_ptr = 0;
a000f3c8: e5832000 str r2, [r3] <== NOT EXECUTED
memfile_free_block( ptr );
a000f3cc: ebffff95 bl a000f228 <memfile_free_block> <== NOT EXECUTED
return 1;
}
a000f3d0: e3a00001 mov r0, #1 <== NOT EXECUTED
a000f3d4: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a000f4f4 <IMFS_memfile_write>:
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
a000f4f4: e92d4ff7 push {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr}
a000f4f8: e1a06003 mov r6, r3
* 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 ) {
a000f4fc: e5903054 ldr r3, [r0, #84] ; 0x54
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
a000f500: e59d8030 ldr r8, [sp, #48] ; 0x30
a000f504: e1a07001 mov r7, r1
* 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 ) {
a000f508: e3530000 cmp r3, #0
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
a000f50c: e1a04000 mov r4, r0
a000f510: e1a0a002 mov sl, r2
/*
* 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;
a000f514: e0881001 add r1, r8, r1
if ( last_byte > the_jnode->info.file.size ) {
a000f518: ba000003 blt a000f52c <IMFS_memfile_write+0x38>
a000f51c: 1a00000c bne a000f554 <IMFS_memfile_write+0x60>
a000f520: e5903050 ldr r3, [r0, #80] ; 0x50
a000f524: e1530001 cmp r3, r1
a000f528: 2a000009 bcs a000f554 <IMFS_memfile_write+0x60>
status = IMFS_memfile_extend( the_jnode, last_byte );
a000f52c: e1a00004 mov r0, r4
a000f530: e3a02000 mov r2, #0
a000f534: ebffffa7 bl a000f3d8 <IMFS_memfile_extend>
if ( status )
a000f538: e3500000 cmp r0, #0
a000f53c: 0a000004 beq a000f554 <IMFS_memfile_write+0x60>
rtems_set_errno_and_return_minus_one( ENOSPC );
a000f540: eb00034d bl a001027c <__errno>
a000f544: e3a0301c mov r3, #28
a000f548: e5803000 str r3, [r0]
a000f54c: e3e05000 mvn r5, #0
a000f550: ea00004d b a000f68c <IMFS_memfile_write+0x198>
*/
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
a000f554: e59f3138 ldr r3, [pc, #312] ; a000f694 <IMFS_memfile_write+0x1a0>
a000f558: e1a00007 mov r0, r7
a000f55c: e1a0100a mov r1, sl
a000f560: e5939000 ldr r9, [r3]
a000f564: e1a0b009 mov fp, r9
a000f568: e1a0cfcb asr ip, fp, #31
a000f56c: e1a0300c mov r3, ip
a000f570: e1a0200b mov r2, fp
a000f574: e58dc000 str ip, [sp]
a000f578: eb0012fb bl a001416c <__moddi3>
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
a000f57c: e59dc000 ldr ip, [sp]
*/
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
a000f580: e1a05000 mov r5, r0
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
a000f584: e1a0100a mov r1, sl
a000f588: e1a00007 mov r0, r7
a000f58c: e1a0200b mov r2, fp
a000f590: e1a0300c mov r3, ip
a000f594: eb0011c7 bl a0013cb8 <__divdi3>
if ( start_offset ) {
a000f598: e3550000 cmp r5, #0
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
a000f59c: e1a07000 mov r7, r0
if ( start_offset ) {
a000f5a0: 0a000012 beq a000f5f0 <IMFS_memfile_write+0xfc>
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 );
a000f5a4: e1a00004 mov r0, r4 <== NOT EXECUTED
a000f5a8: e1a01007 mov r1, r7 <== NOT EXECUTED
a000f5ac: e3a02000 mov r2, #0 <== NOT EXECUTED
a000f5b0: ebfffe0f bl a000edf4 <IMFS_memfile_get_block_pointer> <== NOT EXECUTED
if ( !block_ptr )
a000f5b4: e3500000 cmp r0, #0 <== NOT EXECUTED
return copied;
a000f5b8: 01a05000 moveq r5, r0 <== NOT EXECUTED
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
a000f5bc: 0a000032 beq a000f68c <IMFS_memfile_write+0x198> <== NOT EXECUTED
block,
to_copy,
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
a000f5c0: e5900000 ldr r0, [r0] <== NOT EXECUTED
* 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;
a000f5c4: e065a009 rsb sl, r5, r9 <== NOT EXECUTED
a000f5c8: e15a0008 cmp sl, r8 <== NOT EXECUTED
a000f5cc: 21a0a008 movcs sl, r8 <== NOT EXECUTED
block,
to_copy,
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
a000f5d0: e0800005 add r0, r0, r5 <== NOT EXECUTED
a000f5d4: e1a01006 mov r1, r6 <== NOT EXECUTED
a000f5d8: e1a0200a mov r2, sl <== NOT EXECUTED
a000f5dc: eb000554 bl a0010b34 <memcpy> <== NOT EXECUTED
src += to_copy;
a000f5e0: e086600a add r6, r6, sl <== NOT EXECUTED
block++;
a000f5e4: e2877001 add r7, r7, #1 <== NOT EXECUTED
my_length -= to_copy;
a000f5e8: e06a8008 rsb r8, sl, r8 <== NOT EXECUTED
copied += to_copy;
a000f5ec: e1a0500a mov r5, sl <== NOT EXECUTED
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
a000f5f0: e59f909c ldr r9, [pc, #156] ; a000f694 <IMFS_memfile_write+0x1a0>
a000f5f4: e599a000 ldr sl, [r9]
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
a000f5f8: ea00000d b a000f634 <IMFS_memfile_write+0x140>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
a000f5fc: e1a00004 mov r0, r4
a000f600: e1a01007 mov r1, r7
a000f604: e3a02000 mov r2, #0
a000f608: ebfffdf9 bl a000edf4 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
a000f60c: e3500000 cmp r0, #0
a000f610: 0a00001d beq a000f68c <IMFS_memfile_write+0x198>
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 );
a000f614: e1a01006 mov r1, r6
a000f618: e5900000 ldr r0, [r0]
a000f61c: e1a0200a mov r2, sl
a000f620: eb000543 bl a0010b34 <memcpy>
src += to_copy;
a000f624: e086600a add r6, r6, sl
block++;
a000f628: e2877001 add r7, r7, #1
my_length -= to_copy;
a000f62c: e06a8008 rsb r8, sl, r8
* 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(
a000f630: e085500a add r5, r5, sl
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
a000f634: e5993000 ldr r3, [r9]
a000f638: e1580003 cmp r8, r3
a000f63c: 2affffee bcs a000f5fc <IMFS_memfile_write+0x108>
* 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 ) {
a000f640: e3580000 cmp r8, #0
a000f644: 0a00000a beq a000f674 <IMFS_memfile_write+0x180>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
a000f648: e1a00004 mov r0, r4
a000f64c: e1a01007 mov r1, r7
a000f650: e3a02000 mov r2, #0
a000f654: ebfffde6 bl a000edf4 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
a000f658: e3500000 cmp r0, #0
a000f65c: 0a00000a beq a000f68c <IMFS_memfile_write+0x198>
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 );
a000f660: e5900000 ldr r0, [r0]
a000f664: e1a01006 mov r1, r6
a000f668: e1a02008 mov r2, r8
a000f66c: eb000530 bl a0010b34 <memcpy>
my_length = 0;
copied += to_copy;
a000f670: e0855008 add r5, r5, r8
}
IMFS_mtime_ctime_update( the_jnode );
a000f674: e28d0004 add r0, sp, #4
a000f678: e3a01000 mov r1, #0
a000f67c: ebffdb07 bl a00062a0 <gettimeofday>
a000f680: e59d3004 ldr r3, [sp, #4]
a000f684: e5843044 str r3, [r4, #68] ; 0x44
a000f688: e5843048 str r3, [r4, #72] ; 0x48
return copied;
}
a000f68c: e1a00005 mov r0, r5
a000f690: e8bd8ffe pop {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
a0005bac <IMFS_mount>:
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
a0005bac: e5903008 ldr r3, [r0, #8]
#include <rtems/seterr.h>
int IMFS_mount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
a0005bb0: e52de004 push {lr} ; (str lr, [sp, #-4]!)
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
a0005bb4: e593204c ldr r2, [r3, #76] ; 0x4c
a0005bb8: e3520001 cmp r2, #1
a0005bbc: 0a000004 beq a0005bd4 <IMFS_mount+0x28>
rtems_set_errno_and_return_minus_one( ENOTDIR );
a0005bc0: eb0029ad bl a001027c <__errno> <== NOT EXECUTED
a0005bc4: e3a03014 mov r3, #20 <== NOT EXECUTED
a0005bc8: e5803000 str r3, [r0] <== NOT EXECUTED
a0005bcc: e3e00000 mvn r0, #0 <== NOT EXECUTED
a0005bd0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
/*
* Set mt_fs pointer to point to the mount table entry for
* the mounted file system.
*/
node->info.directory.mt_fs = mt_entry;
a0005bd4: e583005c str r0, [r3, #92] ; 0x5c
return 0;
a0005bd8: e3a00000 mov r0, #0
}
a0005bdc: e49df004 pop {pc} ; (ldr pc, [sp], #4)
a0008538 <IMFS_print_jnode>:
* This routine prints the contents of the specified jnode.
*/
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
a0008538: e92d4030 push {r4, r5, lr}
IMFS_assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
a000853c: e59f50e0 ldr r5, [pc, #224] ; a0008624 <IMFS_print_jnode+0xec>
* This routine prints the contents of the specified jnode.
*/
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
a0008540: e1a04000 mov r4, r0
IMFS_assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
a0008544: e280000c add r0, r0, #12
a0008548: e5953000 ldr r3, [r5]
a000854c: e5931008 ldr r1, [r3, #8]
a0008550: eb00312a bl a0014a00 <fputs>
switch( the_jnode->type ) {
a0008554: e594204c ldr r2, [r4, #76] ; 0x4c
a0008558: e2423001 sub r3, r2, #1
a000855c: e3530006 cmp r3, #6
a0008560: 979ff103 ldrls pc, [pc, r3, lsl #2]
a0008564: ea000026 b a0008604 <IMFS_print_jnode+0xcc>
a0008568: a0008584 .word 0xa0008584
a000856c: a0008598 .word 0xa0008598
a0008570: a00085e4 .word 0xa00085e4
a0008574: a00085e4 .word 0xa00085e4
a0008578: a00085cc .word 0xa00085cc
a000857c: a00085b0 .word 0xa00085b0
a0008580: a00085f0 .word 0xa00085f0
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
a0008584: e5953000 ldr r3, [r5]
a0008588: e3a0002f mov r0, #47 ; 0x2f
a000858c: e5931008 ldr r1, [r3, #8]
a0008590: eb0030e5 bl a001492c <fputc>
break;
a0008594: ea00001f b a0008618 <IMFS_print_jnode+0xe0>
case IMFS_DEVICE:
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
a0008598: e5953000 ldr r3, [r5]
a000859c: e59f1084 ldr r1, [pc, #132] ; a0008628 <IMFS_print_jnode+0xf0>
a00085a0: e5942050 ldr r2, [r4, #80] ; 0x50
a00085a4: e5930008 ldr r0, [r3, #8]
a00085a8: e5943054 ldr r3, [r4, #84] ; 0x54
a00085ac: ea000004 b a00085c4 <IMFS_print_jnode+0x8c>
the_jnode->info.device.major, the_jnode->info.device.minor );
break;
case IMFS_LINEAR_FILE:
fprintf(stdout, " (file %" PRId32 " %p)",
a00085b0: e5953000 ldr r3, [r5]
a00085b4: e59f1070 ldr r1, [pc, #112] ; a000862c <IMFS_print_jnode+0xf4>
a00085b8: e5942050 ldr r2, [r4, #80] ; 0x50
a00085bc: e5930008 ldr r0, [r3, #8]
a00085c0: e5943058 ldr r3, [r4, #88] ; 0x58
a00085c4: eb0030b8 bl a00148ac <fprintf>
(uint32_t)the_jnode->info.linearfile.size,
the_jnode->info.linearfile.direct
);
break;
a00085c8: ea000012 b a0008618 <IMFS_print_jnode+0xe0>
the_jnode->info.file.indirect,
the_jnode->info.file.doubly_indirect,
the_jnode->info.file.triply_indirect
);
#else
fprintf(stdout, " (file %" PRId32 ")",
a00085cc: e5953000 ldr r3, [r5] <== NOT EXECUTED
a00085d0: e59f1058 ldr r1, [pc, #88] ; a0008630 <IMFS_print_jnode+0xf8><== NOT EXECUTED
a00085d4: e5942050 ldr r2, [r4, #80] ; 0x50 <== NOT EXECUTED
a00085d8: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED
a00085dc: eb0030b2 bl a00148ac <fprintf> <== NOT EXECUTED
(uint32_t)the_jnode->info.file.size );
#endif
break;
a00085e0: ea00000c b a0008618 <IMFS_print_jnode+0xe0> <== NOT EXECUTED
case IMFS_HARD_LINK:
fprintf(stdout, " links not printed\n" );
return;
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
a00085e4: e5953000 ldr r3, [r5] <== NOT EXECUTED
a00085e8: e59f0044 ldr r0, [pc, #68] ; a0008634 <IMFS_print_jnode+0xfc><== NOT EXECUTED
a00085ec: ea000001 b a00085f8 <IMFS_print_jnode+0xc0> <== NOT EXECUTED
return;
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
a00085f0: e5953000 ldr r3, [r5] <== NOT EXECUTED
a00085f4: e59f003c ldr r0, [pc, #60] ; a0008638 <IMFS_print_jnode+0x100><== NOT EXECUTED
a00085f8: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
}
a00085fc: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
return;
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
a0008600: ea0030fe b a0014a00 <fputs> <== NOT EXECUTED
return;
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
a0008604: e5953000 ldr r3, [r5] <== NOT EXECUTED
a0008608: e59f102c ldr r1, [pc, #44] ; a000863c <IMFS_print_jnode+0x104><== NOT EXECUTED
a000860c: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED
return;
}
puts("");
}
a0008610: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
return;
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
a0008614: ea0030a4 b a00148ac <fprintf> <== NOT EXECUTED
return;
}
puts("");
a0008618: e59f0020 ldr r0, [pc, #32] ; a0008640 <IMFS_print_jnode+0x108>
}
a000861c: e8bd4030 pop {r4, r5, lr}
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
a0008620: ea0037d0 b a0016568 <puts>
a0005bec <IMFS_readlink>:
)
{
IMFS_jnode_t *node;
ssize_t i;
node = loc->node_access;
a0005bec: e590c000 ldr ip, [r0] <== NOT EXECUTED
IMFS_assert( node->type == IMFS_SYM_LINK );
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
a0005bf0: e3a00000 mov r0, #0 <== NOT EXECUTED
a0005bf4: ea000001 b a0005c00 <IMFS_readlink+0x14> <== NOT EXECUTED
buf[i] = node->info.sym_link.name[i];
a0005bf8: e7c13000 strb r3, [r1, r0] <== NOT EXECUTED
node = loc->node_access;
IMFS_assert( node->type == IMFS_SYM_LINK );
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
a0005bfc: e2800001 add r0, r0, #1 <== NOT EXECUTED
a0005c00: e1500002 cmp r0, r2 <== NOT EXECUTED
a0005c04: 212fff1e bxcs lr <== NOT EXECUTED
a0005c08: e59c3050 ldr r3, [ip, #80] ; 0x50 <== NOT EXECUTED
a0005c0c: e7d33000 ldrb r3, [r3, r0] <== NOT EXECUTED
a0005c10: e3530000 cmp r3, #0 <== NOT EXECUTED
a0005c14: 1afffff7 bne a0005bf8 <IMFS_readlink+0xc> <== NOT EXECUTED
buf[i] = node->info.sym_link.name[i];
return i;
}
a0005c18: e12fff1e bx lr <== NOT EXECUTED
a0005c1c <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 */
)
{
a0005c1c: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED
IMFS_jnode_t *the_jnode;
IMFS_jnode_t *new_parent;
the_jnode = old_loc->node_access;
a0005c20: e5914000 ldr r4, [r1] <== NOT EXECUTED
rtems_filesystem_location_info_t *old_parent_loc, /* IN */
rtems_filesystem_location_info_t *old_loc, /* IN */
rtems_filesystem_location_info_t *new_parent_loc, /* IN */
const char *new_name /* IN */
)
{
a0005c24: e1a05002 mov r5, r2 <== NOT EXECUTED
IMFS_jnode_t *the_jnode;
IMFS_jnode_t *new_parent;
the_jnode = old_loc->node_access;
strncpy( the_jnode->name, new_name, IMFS_NAME_MAX );
a0005c28: e1a01003 mov r1, r3 <== NOT EXECUTED
a0005c2c: e284000c add r0, r4, #12 <== NOT EXECUTED
a0005c30: e3a02020 mov r2, #32 <== NOT EXECUTED
a0005c34: eb002d92 bl a0011284 <strncpy> <== NOT EXECUTED
if ( the_jnode->Parent != NULL )
a0005c38: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
a0005c3c: e3530000 cmp r3, #0 <== NOT EXECUTED
a0005c40: 0a000001 beq a0005c4c <IMFS_rename+0x30> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
a0005c44: e1a00004 mov r0, r4 <== NOT EXECUTED
a0005c48: eb001035 bl a0009d24 <_Chain_Extract> <== NOT EXECUTED
rtems_chain_extract( (rtems_chain_node *) the_jnode );
new_parent = new_parent_loc->node_access;
a0005c4c: e5950000 ldr r0, [r5] <== 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 );
a0005c50: e1a01004 mov r1, r4 <== NOT EXECUTED
the_jnode->Parent = new_parent;
a0005c54: e5840008 str r0, [r4, #8] <== NOT EXECUTED
a0005c58: e2800050 add r0, r0, #80 ; 0x50 <== NOT EXECUTED
a0005c5c: eb001025 bl a0009cf8 <_Chain_Append> <== NOT EXECUTED
rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node );
/*
* Update the time.
*/
IMFS_update_ctime( the_jnode );
a0005c60: e1a0000d mov r0, sp <== NOT EXECUTED
a0005c64: e3a01000 mov r1, #0 <== NOT EXECUTED
a0005c68: eb00018c bl a00062a0 <gettimeofday> <== NOT EXECUTED
a0005c6c: e59d3000 ldr r3, [sp] <== NOT EXECUTED
return 0;
}
a0005c70: e3a00000 mov r0, #0 <== NOT EXECUTED
rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node );
/*
* Update the time.
*/
IMFS_update_ctime( the_jnode );
a0005c74: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED
return 0;
}
a0005c78: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED
a000d78c <IMFS_stat>:
{
IMFS_fs_info_t *fs_info;
IMFS_jnode_t *the_jnode;
IMFS_device_t *io;
the_jnode = loc->node_access;
a000d78c: e5903000 ldr r3, [r0]
int IMFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
a000d790: e92d4800 push {fp, lr}
IMFS_device_t *io;
the_jnode = loc->node_access;
switch ( the_jnode->type ) {
a000d794: e593204c ldr r2, [r3, #76] ; 0x4c
a000d798: e2422002 sub r2, r2, #2
a000d79c: e3520005 cmp r2, #5
a000d7a0: 979ff102 ldrls pc, [pc, r2, lsl #2]
a000d7a4: ea000012 b a000d7f4 <IMFS_stat+0x68> <== NOT EXECUTED
a000d7a8: a000d7c0 .word 0xa000d7c0 <== NOT EXECUTED
a000d7ac: a000d7f4 .word 0xa000d7f4 <== NOT EXECUTED
a000d7b0: a000d7e0 .word 0xa000d7e0 <== NOT EXECUTED
a000d7b4: a000d7d4 .word 0xa000d7d4 <== NOT EXECUTED
a000d7b8: a000d7d4 .word 0xa000d7d4 <== NOT EXECUTED
a000d7bc: a000d7e0 .word 0xa000d7e0 <== NOT EXECUTED
case IMFS_DEVICE:
io = &the_jnode->info.device;
buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
a000d7c0: e5932054 ldr r2, [r3, #84] ; 0x54
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
a000d7c4: e593c050 ldr ip, [r3, #80] ; 0x50
a000d7c8: e581201c str r2, [r1, #28]
a000d7cc: e581c018 str ip, [r1, #24]
break;
a000d7d0: ea00000c b a000d808 <IMFS_stat+0x7c>
case IMFS_LINEAR_FILE:
case IMFS_MEMORY_FILE:
buf->st_size = the_jnode->info.file.size;
a000d7d4: e283c050 add ip, r3, #80 ; 0x50
a000d7d8: e89c1800 ldm ip, {fp, ip}
a000d7dc: ea000001 b a000d7e8 <IMFS_stat+0x5c>
case IMFS_SYM_LINK:
buf->st_size = 0;
break;
case IMFS_FIFO:
buf->st_size = 0;
a000d7e0: e3a0b000 mov fp, #0 <== NOT EXECUTED
a000d7e4: e3a0c000 mov ip, #0 <== NOT EXECUTED
a000d7e8: e581b020 str fp, [r1, #32]
a000d7ec: e581c024 str ip, [r1, #36] ; 0x24
break;
a000d7f0: ea000004 b a000d808 <IMFS_stat+0x7c>
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
a000d7f4: eb000aa0 bl a001027c <__errno> <== NOT EXECUTED
a000d7f8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
a000d7fc: e5803000 str r3, [r0] <== NOT EXECUTED
a000d800: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000d804: e8bd8800 pop {fp, pc} <== 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;
a000d808: e5902010 ldr r2, [r0, #16]
a000d80c: e59f0054 ldr r0, [pc, #84] ; a000d868 <IMFS_stat+0xdc>
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
a000d810: e5922034 ldr r2, [r2, #52] ; 0x34
a000d814: e5922000 ldr r2, [r2]
/*
* 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 =
a000d818: e5810000 str r0, [r1]
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
return 0;
a000d81c: e3a00000 mov r0, #0
/*
* 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 =
a000d820: e5812004 str r2, [r1, #4]
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
a000d824: e5932030 ldr r2, [r3, #48] ; 0x30
a000d828: e581200c str r2, [r1, #12]
buf->st_nlink = the_jnode->st_nlink;
a000d82c: e1d323b4 ldrh r2, [r3, #52] ; 0x34
a000d830: e1c121b0 strh r2, [r1, #16]
buf->st_ino = the_jnode->st_ino;
a000d834: e5932038 ldr r2, [r3, #56] ; 0x38
a000d838: e5812008 str r2, [r1, #8]
buf->st_uid = the_jnode->st_uid;
a000d83c: e1d323bc ldrh r2, [r3, #60] ; 0x3c
a000d840: e1c121b2 strh r2, [r1, #18]
buf->st_gid = the_jnode->st_gid;
a000d844: e1d323be ldrh r2, [r3, #62] ; 0x3e
a000d848: e1c121b4 strh r2, [r1, #20]
buf->st_atime = the_jnode->stat_atime;
a000d84c: e5932040 ldr r2, [r3, #64] ; 0x40
a000d850: e5812028 str r2, [r1, #40] ; 0x28
buf->st_mtime = the_jnode->stat_mtime;
a000d854: e5932044 ldr r2, [r3, #68] ; 0x44
buf->st_ctime = the_jnode->stat_ctime;
a000d858: e5933048 ldr r3, [r3, #72] ; 0x48
buf->st_ino = the_jnode->st_ino;
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
a000d85c: e5812030 str r2, [r1, #48] ; 0x30
buf->st_ctime = the_jnode->stat_ctime;
a000d860: e5813038 str r3, [r1, #56] ; 0x38
return 0;
}
a000d864: e8bd8800 pop {fp, pc}
a0005c7c <IMFS_symlink>:
int IMFS_symlink(
rtems_filesystem_location_info_t *parent_loc,
const char *link_name,
const char *node_name
)
{
a0005c7c: e92d40f0 push {r4, r5, r6, r7, lr}
a0005c80: e1a05000 mov r5, r0
a0005c84: e24dd040 sub sp, sp, #64 ; 0x40
int i;
/*
* Remove any separators at the end of the string.
*/
IMFS_get_token( node_name, strlen( node_name ), new_name, &i );
a0005c88: e1a00002 mov r0, r2
int IMFS_symlink(
rtems_filesystem_location_info_t *parent_loc,
const char *link_name,
const char *node_name
)
{
a0005c8c: e1a06001 mov r6, r1
a0005c90: e1a07002 mov r7, r2
int i;
/*
* Remove any separators at the end of the string.
*/
IMFS_get_token( node_name, strlen( node_name ), new_name, &i );
a0005c94: eb002d62 bl a0011224 <strlen>
a0005c98: e28d4004 add r4, sp, #4
a0005c9c: e1a01000 mov r1, r0
a0005ca0: e1a02004 mov r2, r4
a0005ca4: e28d303c add r3, sp, #60 ; 0x3c
a0005ca8: e1a00007 mov r0, r7
a0005cac: eb001e4b bl a000d5e0 <IMFS_get_token>
/*
* Duplicate link name
*/
info.sym_link.name = strdup(link_name);
a0005cb0: e1a00006 mov r0, r6
a0005cb4: eb002d46 bl a00111d4 <strdup>
if (info.sym_link.name == NULL) {
a0005cb8: e3500000 cmp r0, #0
IMFS_get_token( node_name, strlen( node_name ), new_name, &i );
/*
* Duplicate link name
*/
info.sym_link.name = strdup(link_name);
a0005cbc: e58d0028 str r0, [sp, #40] ; 0x28
if (info.sym_link.name == NULL) {
a0005cc0: 0a00000b beq a0005cf4 <IMFS_symlink+0x78>
new_node = IMFS_create_node(
parent_loc,
IMFS_SYM_LINK,
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
a0005cc4: e28d3028 add r3, sp, #40 ; 0x28
* 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(
a0005cc8: e58d3000 str r3, [sp]
a0005ccc: e1a00005 mov r0, r5
a0005cd0: e3a01004 mov r1, #4
a0005cd4: e1a02004 mov r2, r4
a0005cd8: e59f302c ldr r3, [pc, #44] ; a0005d0c <IMFS_symlink+0x90>
a0005cdc: eb001bdc bl a000cc54 <IMFS_create_node>
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if (new_node == NULL) {
a0005ce0: e3500000 cmp r0, #0
free(info.sym_link.name);
rtems_set_errno_and_return_minus_one(ENOMEM);
}
return 0;
a0005ce4: 13a00000 movne r0, #0
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if (new_node == NULL) {
a0005ce8: 1a000005 bne a0005d04 <IMFS_symlink+0x88>
free(info.sym_link.name);
a0005cec: e59d0028 ldr r0, [sp, #40] ; 0x28 <== NOT EXECUTED
a0005cf0: eb000135 bl a00061cc <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
a0005cf4: eb002960 bl a001027c <__errno> <== NOT EXECUTED
a0005cf8: e3a0300c mov r3, #12 <== NOT EXECUTED
a0005cfc: e5803000 str r3, [r0] <== NOT EXECUTED
a0005d00: e3e00000 mvn r0, #0 <== NOT EXECUTED
}
return 0;
}
a0005d04: e28dd040 add sp, sp, #64 ; 0x40
a0005d08: e8bd80f0 pop {r4, r5, r6, r7, pc}
a0005d10 <IMFS_unlink>:
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
a0005d10: e92d40f0 push {r4, r5, r6, r7, lr}
IMFS_jnode_t *node;
rtems_filesystem_location_info_t the_link;
int result = 0;
node = loc->node_access;
a0005d14: e5915000 ldr r5, [r1]
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
a0005d18: e24dd01c sub sp, sp, #28
a0005d1c: e1a06000 mov r6, r0
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
a0005d20: e595304c ldr r3, [r5, #76] ; 0x4c
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
a0005d24: e1a04001 mov r4, r1
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
a0005d28: e3530003 cmp r3, #3
a0005d2c: 1a000024 bne a0005dc4 <IMFS_unlink+0xb4>
if ( !node->info.hard_link.link_node )
a0005d30: e595e050 ldr lr, [r5, #80] ; 0x50 <== NOT EXECUTED
a0005d34: e35e0000 cmp lr, #0 <== NOT EXECUTED
a0005d38: 1a000003 bne a0005d4c <IMFS_unlink+0x3c> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
a0005d3c: eb00294e bl a001027c <__errno> <== NOT EXECUTED
a0005d40: e3a03016 mov r3, #22 <== NOT EXECUTED
a0005d44: e5803000 str r3, [r0] <== NOT EXECUTED
a0005d48: ea000023 b a0005ddc <IMFS_unlink+0xcc> <== NOT EXECUTED
the_link = *loc;
a0005d4c: e1a0c00d mov ip, sp <== NOT EXECUTED
a0005d50: e1a07001 mov r7, r1 <== NOT EXECUTED
a0005d54: e8b7000f ldm r7!, {r0, r1, r2, r3} <== NOT EXECUTED
a0005d58: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED
a0005d5c: e5973000 ldr r3, [r7] <== NOT EXECUTED
the_link.node_access = node->info.hard_link.link_node;
a0005d60: e28d701c add r7, sp, #28 <== NOT EXECUTED
a0005d64: e527e01c str lr, [r7, #-28]! <== NOT EXECUTED
IMFS_Set_handlers( &the_link );
a0005d68: e1a0000d mov r0, sp <== NOT EXECUTED
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
rtems_set_errno_and_return_minus_one( EINVAL );
the_link = *loc;
a0005d6c: e58c3000 str r3, [ip] <== NOT EXECUTED
the_link.node_access = node->info.hard_link.link_node;
IMFS_Set_handlers( &the_link );
a0005d70: eb001c17 bl a000cdd4 <IMFS_Set_handlers> <== NOT EXECUTED
/*
* 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)
a0005d74: e5953050 ldr r3, [r5, #80] ; 0x50 <== NOT EXECUTED
a0005d78: e1d323b4 ldrh r2, [r3, #52] ; 0x34 <== NOT EXECUTED
a0005d7c: e3520001 cmp r2, #1 <== NOT EXECUTED
a0005d80: 1a000007 bne a0005da4 <IMFS_unlink+0x94> <== NOT EXECUTED
{
result = (*the_link.handlers->rmnod_h)( parentloc, &the_link );
a0005d84: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
a0005d88: e1a00006 mov r0, r6 <== NOT EXECUTED
a0005d8c: e1a0100d mov r1, sp <== NOT EXECUTED
a0005d90: e5933034 ldr r3, [r3, #52] ; 0x34 <== NOT EXECUTED
a0005d94: e12fff33 blx r3 <== NOT EXECUTED
if ( result != 0 )
a0005d98: e3500000 cmp r0, #0 <== NOT EXECUTED
a0005d9c: 0a000008 beq a0005dc4 <IMFS_unlink+0xb4> <== NOT EXECUTED
a0005da0: ea00000d b a0005ddc <IMFS_unlink+0xcc> <== NOT EXECUTED
return -1;
}
else
{
node->info.hard_link.link_node->st_nlink --;
a0005da4: e2422001 sub r2, r2, #1 <== NOT EXECUTED
a0005da8: e1c323b4 strh r2, [r3, #52] ; 0x34 <== NOT EXECUTED
IMFS_update_ctime( node->info.hard_link.link_node );
a0005dac: e28d0014 add r0, sp, #20 <== NOT EXECUTED
a0005db0: e3a01000 mov r1, #0 <== NOT EXECUTED
a0005db4: eb000139 bl a00062a0 <gettimeofday> <== NOT EXECUTED
a0005db8: e5953050 ldr r3, [r5, #80] ; 0x50 <== NOT EXECUTED
a0005dbc: e59d2014 ldr r2, [sp, #20] <== NOT EXECUTED
a0005dc0: e5832048 str r2, [r3, #72] ; 0x48 <== NOT EXECUTED
/*
* Now actually free the node we were asked to free.
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
a0005dc4: e5943008 ldr r3, [r4, #8]
a0005dc8: e1a00006 mov r0, r6
a0005dcc: e1a01004 mov r1, r4
a0005dd0: e5933034 ldr r3, [r3, #52] ; 0x34
a0005dd4: e12fff33 blx r3
return result;
a0005dd8: ea000000 b a0005de0 <IMFS_unlink+0xd0>
if ( node->info.hard_link.link_node->st_nlink == 1)
{
result = (*the_link.handlers->rmnod_h)( parentloc, &the_link );
if ( result != 0 )
return -1;
a0005ddc: e3e00000 mvn r0, #0 <== NOT EXECUTED
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
return result;
}
a0005de0: e28dd01c add sp, sp, #28
a0005de4: e8bd80f0 pop {r4, r5, r6, r7, pc}
a0005de8 <IMFS_unmount>:
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
a0005de8: e5903008 ldr r3, [r0, #8]
#include <rtems/seterr.h>
int IMFS_unmount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
a0005dec: e52de004 push {lr} ; (str lr, [sp, #-4]!)
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
a0005df0: e593204c ldr r2, [r3, #76] ; 0x4c
a0005df4: e3520001 cmp r2, #1
a0005df8: 0a000002 beq a0005e08 <IMFS_unmount+0x20>
rtems_set_errno_and_return_minus_one( ENOTDIR );
a0005dfc: eb00291e bl a001027c <__errno> <== NOT EXECUTED
a0005e00: e3a03014 mov r3, #20 <== NOT EXECUTED
a0005e04: ea000004 b a0005e1c <IMFS_unmount+0x34> <== NOT EXECUTED
/*
* Did the node indicate that there was a directory mounted here?
*/
if ( node->info.directory.mt_fs == NULL )
a0005e08: e593205c ldr r2, [r3, #92] ; 0x5c
a0005e0c: e3520000 cmp r2, #0
a0005e10: 1a000004 bne a0005e28 <IMFS_unmount+0x40>
rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */
a0005e14: eb002918 bl a001027c <__errno> <== NOT EXECUTED
a0005e18: e3a03016 mov r3, #22 <== NOT EXECUTED
a0005e1c: e5803000 str r3, [r0] <== NOT EXECUTED
a0005e20: e3e00000 mvn r0, #0 <== NOT EXECUTED
a0005e24: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
/*
* Set the mt_fs pointer to indicate that there is no longer
* a file system mounted to this point.
*/
node->info.directory.mt_fs = NULL;
a0005e28: e3a00000 mov r0, #0
a0005e2c: e583005c str r0, [r3, #92] ; 0x5c
return 0;
}
a0005e30: e49df004 pop {pc} ; (ldr pc, [sp], #4)
a0005e34 <IMFS_utime>:
int IMFS_utime(
rtems_filesystem_location_info_t *pathloc, /* IN */
time_t actime, /* IN */
time_t modtime /* IN */
)
{
a0005e34: e92d4010 push {r4, lr} <== NOT EXECUTED
IMFS_jnode_t *the_jnode;
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
a0005e38: e5904000 ldr r4, [r0] <== NOT EXECUTED
the_jnode->stat_atime = actime;
the_jnode->stat_mtime = modtime;
the_jnode->stat_ctime = time( NULL );
a0005e3c: e3a00000 mov r0, #0 <== NOT EXECUTED
{
IMFS_jnode_t *the_jnode;
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
the_jnode->stat_atime = actime;
a0005e40: e5841040 str r1, [r4, #64] ; 0x40 <== NOT EXECUTED
the_jnode->stat_mtime = modtime;
a0005e44: e5842044 str r2, [r4, #68] ; 0x44 <== NOT EXECUTED
the_jnode->stat_ctime = time( NULL );
a0005e48: eb002d48 bl a0011370 <time> <== NOT EXECUTED
a0005e4c: e5840048 str r0, [r4, #72] ; 0x48 <== NOT EXECUTED
return 0;
}
a0005e50: e3a00000 mov r0, #0 <== NOT EXECUTED
a0005e54: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a0005680 <Stack_check_Dump_threads_usage>:
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
a0005680: e92d4fff push {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, lr}<== NOT EXECUTED
{
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
low = Stack_check_usable_stack_start(stack);
a0005684: e59030b8 ldr r3, [r0, #184] ; 0xb8 <== NOT EXECUTED
size = Stack_check_usable_stack_size(stack);
a0005688: e59070b4 ldr r7, [r0, #180] ; 0xb4 <== NOT EXECUTED
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
a000568c: e1a05000 mov r5, r0 <== NOT EXECUTED
{
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
low = Stack_check_usable_stack_start(stack);
a0005690: e2832010 add r2, r3, #16 <== NOT EXECUTED
size = Stack_check_usable_stack_size(stack);
a0005694: e2477010 sub r7, r7, #16 <== 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++)
a0005698: e3c71003 bic r1, r7, #3 <== NOT EXECUTED
current = 0;
} else
#endif
{
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
a000569c: e590b0e4 ldr fp, [r0, #228] ; 0xe4 <== NOT EXECUTED
/*
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
a00056a0: e2820010 add r0, r2, #16 <== NOT EXECUTED
for (ebase = base + length; base < ebase; base++)
a00056a4: e0800001 add r0, r0, r1 <== 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(
a00056a8: e2833020 add r3, r3, #32 <== NOT EXECUTED
* match pattern
*/
base += PATTERN_SIZE_WORDS;
for (ebase = base + length; base < ebase; base++)
if (*base != U32_PATTERN)
a00056ac: e59f10bc ldr r1, [pc, #188] ; a0005770 <Stack_check_Dump_threads_usage+0xf0><== NOT EXECUTED
a00056b0: ea000002 b a00056c0 <Stack_check_Dump_threads_usage+0x40> <== NOT EXECUTED
a00056b4: e493c004 ldr ip, [r3], #4 <== NOT EXECUTED
a00056b8: e15c0001 cmp ip, r1 <== NOT EXECUTED
a00056bc: 1a000004 bne a00056d4 <Stack_check_Dump_threads_usage+0x54><== 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++)
a00056c0: e1530000 cmp r3, r0 <== NOT EXECUTED
if (*base != U32_PATTERN)
a00056c4: e1a06003 mov r6, r3 <== 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++)
a00056c8: 3afffff9 bcc a00056b4 <Stack_check_Dump_threads_usage+0x34><== 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;
a00056cc: e3a06000 mov r6, #0 <== NOT EXECUTED
a00056d0: ea000002 b a00056e0 <Stack_check_Dump_threads_usage+0x60> <== 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 )
a00056d4: e3560000 cmp r6, #0 <== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark );
a00056d8: 10822007 addne r2, r2, r7 <== NOT EXECUTED
a00056dc: 10666002 rsbne r6, r6, r2 <== NOT EXECUTED
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if ( the_thread )
#endif
{
(*print_handler)(
a00056e0: e5958008 ldr r8, [r5, #8] <== NOT EXECUTED
a00056e4: e59f4088 ldr r4, [pc, #136] ; a0005774 <Stack_check_Dump_threads_usage+0xf4><== NOT EXECUTED
a00056e8: e3a01005 mov r1, #5 <== NOT EXECUTED
a00056ec: e28d2008 add r2, sp, #8 <== NOT EXECUTED
a00056f0: e1a00008 mov r0, r8 <== NOT EXECUTED
a00056f4: e8940600 ldm r4, {r9, sl} <== NOT EXECUTED
a00056f8: eb000edc bl a0009270 <rtems_object_get_name> <== NOT EXECUTED
a00056fc: e59f1074 ldr r1, [pc, #116] ; a0005778 <Stack_check_Dump_threads_usage+0xf8><== NOT EXECUTED
a0005700: e1a03000 mov r3, r0 <== NOT EXECUTED
a0005704: e1a02008 mov r2, r8 <== NOT EXECUTED
a0005708: e1a0000a mov r0, sl <== NOT EXECUTED
a000570c: e12fff39 blx r9 <== NOT EXECUTED
(*print_handler)(
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
a0005710: e59530b4 ldr r3, [r5, #180] ; 0xb4 <== NOT EXECUTED
a0005714: e59520b8 ldr r2, [r5, #184] ; 0xb8 <== NOT EXECUTED
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
#endif
(*print_handler)(
a0005718: e58db000 str fp, [sp] <== NOT EXECUTED
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
a000571c: e2433001 sub r3, r3, #1 <== NOT EXECUTED
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
#endif
(*print_handler)(
a0005720: e0823003 add r3, r2, r3 <== NOT EXECUTED
a0005724: e58d7004 str r7, [sp, #4] <== NOT EXECUTED
a0005728: e594c000 ldr ip, [r4] <== NOT EXECUTED
a000572c: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED
a0005730: e59f1044 ldr r1, [pc, #68] ; a000577c <Stack_check_Dump_threads_usage+0xfc><== NOT EXECUTED
a0005734: e12fff3c blx ip <== NOT EXECUTED
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
a0005738: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
a000573c: e3530000 cmp r3, #0 <== NOT EXECUTED
a0005740: 1a000004 bne a0005758 <Stack_check_Dump_threads_usage+0xd8><== NOT EXECUTED
(*print_handler)( print_context, "Unavailable\n" );
a0005744: e5943000 ldr r3, [r4] <== NOT EXECUTED
a0005748: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED
a000574c: e59f102c ldr r1, [pc, #44] ; a0005780 <Stack_check_Dump_threads_usage+0x100><== NOT EXECUTED
a0005750: e12fff33 blx r3 <== NOT EXECUTED
a0005754: ea000004 b a000576c <Stack_check_Dump_threads_usage+0xec> <== NOT EXECUTED
} else {
(*print_handler)( print_context, "%8" PRId32 "\n", used );
a0005758: e5943000 ldr r3, [r4] <== NOT EXECUTED
a000575c: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED
a0005760: e59f101c ldr r1, [pc, #28] ; a0005784 <Stack_check_Dump_threads_usage+0x104><== NOT EXECUTED
a0005764: e1a02006 mov r2, r6 <== NOT EXECUTED
a0005768: e12fff33 blx r3 <== NOT EXECUTED
}
}
a000576c: e8bd8fff pop {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}<== NOT EXECUTED
a0005830 <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)
{
a0005830: e92d40ff push {r0, r1, r2, r3, r4, r5, r6, r7, lr} <== NOT EXECUTED
a0005834: e1a06000 mov r6, r0 <== NOT EXECUTED
Stack_Control *stack = &running->Start.Initial_stack;
void *pattern_area = Stack_check_Get_pattern(stack);
a0005838: e59040b8 ldr r4, [r0, #184] ; 0xb8 <== NOT EXECUTED
char name[32];
printk("BLOWN STACK!!!\n");
a000583c: e59f007c ldr r0, [pc, #124] ; a00058c0 <Stack_check_report_blown_task+0x90><== 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)
{
a0005840: e20150ff and r5, r1, #255 ; 0xff <== NOT EXECUTED
Stack_Control *stack = &running->Start.Initial_stack;
void *pattern_area = Stack_check_Get_pattern(stack);
char name[32];
printk("BLOWN STACK!!!\n");
a0005844: eb000611 bl a0007090 <printk> <== NOT EXECUTED
printk("task control block: 0x%08" PRIxPTR "\n", running);
a0005848: e59f0074 ldr r0, [pc, #116] ; a00058c4 <Stack_check_report_blown_task+0x94><== NOT EXECUTED
a000584c: e1a01006 mov r1, r6 <== NOT EXECUTED
a0005850: eb00060e bl a0007090 <printk> <== NOT EXECUTED
printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id);
a0005854: e59f006c ldr r0, [pc, #108] ; a00058c8 <Stack_check_report_blown_task+0x98><== NOT EXECUTED
a0005858: e5961008 ldr r1, [r6, #8] <== NOT EXECUTED
a000585c: eb00060b bl a0007090 <printk> <== NOT EXECUTED
printk(
a0005860: e59f0064 ldr r0, [pc, #100] ; a00058cc <Stack_check_report_blown_task+0x9c><== NOT EXECUTED
a0005864: e596100c ldr r1, [r6, #12] <== NOT EXECUTED
a0005868: eb000608 bl a0007090 <printk> <== NOT EXECUTED
"task name: 0x%08" PRIx32 "\n",
running->Object.name.name_u32
);
printk(
a000586c: e1a0200d mov r2, sp <== NOT EXECUTED
a0005870: e3a01020 mov r1, #32 <== NOT EXECUTED
a0005874: e5960008 ldr r0, [r6, #8] <== NOT EXECUTED
a0005878: eb000e7c bl a0009270 <rtems_object_get_name> <== NOT EXECUTED
a000587c: e1a01000 mov r1, r0 <== NOT EXECUTED
a0005880: e59f0048 ldr r0, [pc, #72] ; a00058d0 <Stack_check_report_blown_task+0xa0><== NOT EXECUTED
a0005884: eb000601 bl a0007090 <printk> <== 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)
a0005888: e59620b8 ldr r2, [r6, #184] ; 0xb8 <== NOT EXECUTED
a000588c: e59610b4 ldr r1, [r6, #180] ; 0xb4 <== NOT EXECUTED
);
printk(
"task name string: %s\n",
rtems_object_get_name(running->Object.id, sizeof(name), name)
);
printk(
a0005890: e59f003c ldr r0, [pc, #60] ; a00058d4 <Stack_check_report_blown_task+0xa4><== NOT EXECUTED
a0005894: e0823001 add r3, r2, r1 <== NOT EXECUTED
a0005898: eb0005fc bl a0007090 <printk> <== 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) {
a000589c: e3550000 cmp r5, #0 <== NOT EXECUTED
a00058a0: 1a000004 bne a00058b8 <Stack_check_report_blown_task+0x88> <== NOT EXECUTED
printk(
a00058a4: e59f002c ldr r0, [pc, #44] ; a00058d8 <Stack_check_report_blown_task+0xa8><== NOT EXECUTED
a00058a8: e3a01010 mov r1, #16 <== NOT EXECUTED
a00058ac: e2842008 add r2, r4, #8 <== NOT EXECUTED
a00058b0: e2843018 add r3, r4, #24 <== NOT EXECUTED
a00058b4: eb0005f5 bl a0007090 <printk> <== NOT EXECUTED
rtems_configuration_get_user_multiprocessing_table()->node
);
}
#endif
rtems_fatal_error_occurred(0x81);
a00058b8: e3a00081 mov r0, #129 ; 0x81 <== NOT EXECUTED
a00058bc: eb001080 bl a0009ac4 <rtems_fatal_error_occurred> <== NOT EXECUTED
a000f294 <TOD_MICROSECONDS_TO_TICKS>:
uint32_t TOD_MICROSECONDS_TO_TICKS(
uint32_t microseconds
)
{
return (microseconds / rtems_configuration_get_microseconds_per_tick());
a000f294: e59f300c ldr r3, [pc, #12] ; a000f2a8 <TOD_MICROSECONDS_TO_TICKS+0x14><== NOT EXECUTED
#include <rtems/score/tod.h>
uint32_t TOD_MICROSECONDS_TO_TICKS(
uint32_t microseconds
)
{
a000f298: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
return (microseconds / rtems_configuration_get_microseconds_per_tick());
a000f29c: e593100c ldr r1, [r3, #12] <== NOT EXECUTED
a000f2a0: eb004c9f bl a0022524 <__aeabi_uidiv> <== NOT EXECUTED
}
a000f2a4: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a000f658 <TOD_TICKS_PER_SECOND_method>:
#include <rtems/config.h>
#include <rtems/score/tod.h>
uint32_t TOD_TICKS_PER_SECOND_method(void)
{
return (TOD_MICROSECONDS_PER_SECOND /
a000f658: e59f3010 ldr r3, [pc, #16] ; a000f670 <TOD_TICKS_PER_SECOND_method+0x18><== NOT EXECUTED
#include <rtems/system.h>
#include <rtems/config.h>
#include <rtems/score/tod.h>
uint32_t TOD_TICKS_PER_SECOND_method(void)
{
a000f65c: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
return (TOD_MICROSECONDS_PER_SECOND /
a000f660: e593100c ldr r1, [r3, #12] <== NOT EXECUTED
a000f664: e59f0008 ldr r0, [pc, #8] ; a000f674 <TOD_TICKS_PER_SECOND_method+0x1c><== NOT EXECUTED
a000f668: eb0031f6 bl a001be48 <__aeabi_uidiv> <== NOT EXECUTED
rtems_configuration_get_microseconds_per_tick());
}
a000f66c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a00190c0 <_CORE_message_queue_Broadcast>:
{
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
a00190c0: e590304c ldr r3, [r0, #76] ; 0x4c
Objects_Id id __attribute__((unused)),
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)),
#endif
uint32_t *count
)
{
a00190c4: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
a00190c8: e1520003 cmp r2, r3
Objects_Id id __attribute__((unused)),
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)),
#endif
uint32_t *count
)
{
a00190cc: e1a06000 mov r6, r0
a00190d0: e1a0a001 mov sl, r1
a00190d4: e1a07002 mov r7, r2
a00190d8: e59d8020 ldr r8, [sp, #32]
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
a00190dc: 8a000013 bhi a0019130 <_CORE_message_queue_Broadcast+0x70>
* NOTE: This check is critical because threads can block on
* send and receive and this ensures that we are broadcasting
* the message to threads waiting to receive -- not to send.
*/
if ( the_message_queue->number_of_pending_messages != 0 ) {
a00190e0: e5905048 ldr r5, [r0, #72] ; 0x48
a00190e4: e3550000 cmp r5, #0
a00190e8: 0a000009 beq a0019114 <_CORE_message_queue_Broadcast+0x54>
*count = 0;
a00190ec: e3a00000 mov r0, #0
a00190f0: e5880000 str r0, [r8]
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
a00190f4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
a00190f8: e594002c ldr r0, [r4, #44] ; 0x2c
a00190fc: e1a0100a mov r1, sl
a0019100: e1a02007 mov r2, r7
a0019104: eb001e64 bl a0020a9c <memcpy>
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
a0019108: e5943028 ldr r3, [r4, #40] ; 0x28
*/
number_broadcasted = 0;
while ((the_thread =
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
waitp = &the_thread->Wait;
number_broadcasted += 1;
a001910c: e2855001 add r5, r5, #1
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
a0019110: e5837000 str r7, [r3]
/*
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
a0019114: e1a00006 mov r0, r6
a0019118: eb000a58 bl a001ba80 <_Thread_queue_Dequeue>
a001911c: e2504000 subs r4, r0, #0
a0019120: 1afffff4 bne a00190f8 <_CORE_message_queue_Broadcast+0x38>
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_message_queue_mp_support) ( the_thread, id );
#endif
}
*count = number_broadcasted;
a0019124: e5885000 str r5, [r8]
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
a0019128: e1a00004 mov r0, r4
a001912c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
return CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE;
a0019130: e3a00001 mov r0, #1 <== NOT EXECUTED
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
a0019134: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
a001218c <_CORE_message_queue_Initialize>:
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Attributes *the_message_queue_attributes,
uint32_t maximum_pending_messages,
size_t maximum_message_size
)
{
a001218c: e92d40f0 push {r4, r5, r6, r7, lr}
/*
* 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)) {
a0012190: e3130003 tst r3, #3
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
)
{
a0012194: e1a04000 mov r4, r0
size_t message_buffering_required;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
the_message_queue->number_of_pending_messages = 0;
a0012198: e3a00000 mov r0, #0
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
)
{
a001219c: e1a06002 mov r6, r2
size_t message_buffering_required;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
a00121a0: e5842044 str r2, [r4, #68] ; 0x44
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
)
{
a00121a4: e1a05001 mov r5, r1
size_t message_buffering_required;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
the_message_queue->number_of_pending_messages = 0;
a00121a8: e5840048 str r0, [r4, #72] ; 0x48
the_message_queue->maximum_message_size = maximum_message_size;
a00121ac: e584304c str r3, [r4, #76] ; 0x4c
/*
* 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)) {
a00121b0: 01a02003 moveq r2, r3
a00121b4: 0a000003 beq a00121c8 <_CORE_message_queue_Initialize+0x3c>
allocated_message_size += sizeof(uint32_t);
a00121b8: e2832004 add r2, r3, #4
allocated_message_size &= ~(sizeof(uint32_t) - 1);
a00121bc: e3c22003 bic r2, r2, #3
}
if (allocated_message_size < maximum_message_size)
a00121c0: e1520003 cmp r2, r3
a00121c4: 3a00001e bcc a0012244 <_CORE_message_queue_Initialize+0xb8>
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
message_buffering_required = (size_t) maximum_pending_messages *
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
a00121c8: e2827010 add r7, r2, #16
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
message_buffering_required = (size_t) maximum_pending_messages *
a00121cc: e0000796 mul r0, r6, r7
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
if (message_buffering_required < allocated_message_size)
a00121d0: e1500002 cmp r0, r2
a00121d4: 3a000018 bcc a001223c <_CORE_message_queue_Initialize+0xb0>
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
_Workspace_Allocate( message_buffering_required );
a00121d8: eb000b02 bl a0014de8 <_Workspace_Allocate>
if (the_message_queue->message_buffers == 0)
a00121dc: e3500000 cmp r0, #0
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
_Workspace_Allocate( message_buffering_required );
a00121e0: e1a01000 mov r1, r0
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
a00121e4: e584005c str r0, [r4, #92] ; 0x5c
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
a00121e8: 0a000015 beq a0012244 <_CORE_message_queue_Initialize+0xb8>
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
a00121ec: e2840060 add r0, r4, #96 ; 0x60
a00121f0: e1a02006 mov r2, r6
a00121f4: e1a03007 mov r3, r7
a00121f8: eb00123f bl a0016afc <_Chain_Initialize>
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 );
a00121fc: e2843054 add r3, r4, #84 ; 0x54
head->next = tail;
a0012200: e5843050 str r3, [r4, #80] ; 0x50
head->previous = NULL;
a0012204: e3a03000 mov r3, #0
a0012208: e5843054 str r3, [r4, #84] ; 0x54
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
a001220c: e2843050 add r3, r4, #80 ; 0x50
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
tail->previous = head;
a0012210: e5843058 str r3, [r4, #88] ; 0x58
allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
);
_Chain_Initialize_empty( &the_message_queue->Pending_messages );
_Thread_queue_Initialize(
a0012214: e5951000 ldr r1, [r5]
a0012218: e1a00004 mov r0, r4
a001221c: e3a02080 mov r2, #128 ; 0x80
a0012220: e3510001 cmp r1, #1
a0012224: 13a01000 movne r1, #0
a0012228: 03a01001 moveq r1, #1
a001222c: e3a03006 mov r3, #6
a0012230: eb000884 bl a0014448 <_Thread_queue_Initialize>
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
a0012234: e3a00001 mov r0, #1
a0012238: e8bd80f0 pop {r4, r5, r6, r7, pc}
*/
message_buffering_required = (size_t) maximum_pending_messages *
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
if (message_buffering_required < allocated_message_size)
return false;
a001223c: e3a00000 mov r0, #0 <== NOT EXECUTED
a0012240: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
}
a0012244: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
a0012334 <_CORE_message_queue_Submit>:
)
{
CORE_message_queue_Buffer_control *the_message;
Thread_Control *the_thread;
if ( size > the_message_queue->maximum_message_size ) {
a0012334: e590304c ldr r3, [r0, #76] ; 0x4c
#endif
CORE_message_queue_Submit_types submit_type,
bool wait,
Watchdog_Interval timeout
)
{
a0012338: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
CORE_message_queue_Buffer_control *the_message;
Thread_Control *the_thread;
if ( size > the_message_queue->maximum_message_size ) {
a001233c: e1520003 cmp r2, r3
#endif
CORE_message_queue_Submit_types submit_type,
bool wait,
Watchdog_Interval timeout
)
{
a0012340: e1a04000 mov r4, r0
a0012344: e1a0a001 mov sl, r1
a0012348: e1a05002 mov r5, r2
a001234c: e59d7020 ldr r7, [sp, #32]
CORE_message_queue_Buffer_control *the_message;
Thread_Control *the_thread;
if ( size > the_message_queue->maximum_message_size ) {
a0012350: 8a000020 bhi a00123d8 <_CORE_message_queue_Submit+0xa4>
}
/*
* Is there a thread currently waiting on this message queue?
*/
if ( the_message_queue->number_of_pending_messages == 0 ) {
a0012354: e5908048 ldr r8, [r0, #72] ; 0x48
a0012358: e3580000 cmp r8, #0
a001235c: 1a00000b bne a0012390 <_CORE_message_queue_Submit+0x5c>
the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue );
a0012360: eb00073a bl a0014050 <_Thread_queue_Dequeue>
if ( the_thread ) {
a0012364: e2506000 subs r6, r0, #0
a0012368: 0a000008 beq a0012390 <_CORE_message_queue_Submit+0x5c>
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
a001236c: e596002c ldr r0, [r6, #44] ; 0x2c
a0012370: e1a0100a mov r1, sl
a0012374: e1a02005 mov r2, r5
a0012378: eb001bc7 bl a001929c <memcpy>
_CORE_message_queue_Copy_buffer(
buffer,
the_thread->Wait.return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
a001237c: e5963028 ldr r3, [r6, #40] ; 0x28
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_message_queue_mp_support) ( the_thread, id );
#endif
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
a0012380: e1a00008 mov r0, r8
_CORE_message_queue_Copy_buffer(
buffer,
the_thread->Wait.return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
a0012384: e5835000 str r5, [r3]
the_thread->Wait.count = (uint32_t) submit_type;
a0012388: e5867024 str r7, [r6, #36] ; 0x24
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_message_queue_mp_support) ( the_thread, id );
#endif
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
a001238c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
/*
* No one waiting on the message queue at this time, so attempt to
* queue the message up for a future receive.
*/
if ( the_message_queue->number_of_pending_messages <
a0012390: e5942048 ldr r2, [r4, #72] ; 0x48
a0012394: e5943044 ldr r3, [r4, #68] ; 0x44
a0012398: e1520003 cmp r2, r3
a001239c: 2a00000f bcs a00123e0 <_CORE_message_queue_Submit+0xac>
_CORE_message_queue_Allocate_message_buffer (
CORE_message_queue_Control *the_message_queue
)
{
return (CORE_message_queue_Buffer_control *)
_Chain_Get( &the_message_queue->Inactive_messages );
a00123a0: e2840060 add r0, r4, #96 ; 0x60
a00123a4: ebffff61 bl a0012130 <_Chain_Get>
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
a00123a8: e1a0100a mov r1, sl
_CORE_message_queue_Allocate_message_buffer (
CORE_message_queue_Control *the_message_queue
)
{
return (CORE_message_queue_Buffer_control *)
_Chain_Get( &the_message_queue->Inactive_messages );
a00123ac: e1a06000 mov r6, r0
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
a00123b0: e1a02005 mov r2, r5
a00123b4: e280000c add r0, r0, #12
a00123b8: eb001bb7 bl a001929c <memcpy>
size
);
the_message->Contents.size = size;
_CORE_message_queue_Set_message_priority( the_message, submit_type );
_CORE_message_queue_Insert_message(
a00123bc: e1a00004 mov r0, r4
_CORE_message_queue_Copy_buffer(
buffer,
the_message->Contents.buffer,
size
);
the_message->Contents.size = size;
a00123c0: e5865008 str r5, [r6, #8]
_CORE_message_queue_Set_message_priority( the_message, submit_type );
_CORE_message_queue_Insert_message(
a00123c4: e1a01006 mov r1, r6
a00123c8: e1a02007 mov r2, r7
a00123cc: eb0011da bl a0016b3c <_CORE_message_queue_Insert_message>
the_message_queue,
the_message,
submit_type
);
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
a00123d0: e3a00000 mov r0, #0
a00123d4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
{
CORE_message_queue_Buffer_control *the_message;
Thread_Control *the_thread;
if ( size > the_message_queue->maximum_message_size ) {
return CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE;
a00123d8: e3a00001 mov r0, #1 <== NOT EXECUTED
a00123dc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
);
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
#if !defined(RTEMS_SCORE_COREMSG_ENABLE_BLOCKING_SEND)
return CORE_MESSAGE_QUEUE_STATUS_TOO_MANY;
a00123e0: e3a00002 mov r0, #2 <== NOT EXECUTED
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
a00123e4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
a000e428 <_CORE_mutex_Seize_interrupt_trylock>:
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
a000e428: e59f212c ldr r2, [pc, #300] ; a000e55c <_CORE_mutex_Seize_interrupt_trylock+0x134>
#if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__)
int _CORE_mutex_Seize_interrupt_trylock(
CORE_mutex_Control *the_mutex,
ISR_Level *level_p
)
{
a000e42c: e1a03000 mov r3, r0
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
a000e430: e593c050 ldr ip, [r3, #80] ; 0x50
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
a000e434: e5922004 ldr r2, [r2, #4]
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
a000e438: e3a00000 mov r0, #0
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
a000e43c: e15c0000 cmp ip, r0
a000e440: e92d4010 push {r4, lr}
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
a000e444: e5820034 str r0, [r2, #52] ; 0x34
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
a000e448: 0a00002c beq a000e500 <_CORE_mutex_Seize_interrupt_trylock+0xd8>
the_mutex->lock = CORE_MUTEX_LOCKED;
a000e44c: e5830050 str r0, [r3, #80] ; 0x50
the_mutex->holder = executing;
the_mutex->holder_id = executing->Object.id;
a000e450: e5920008 ldr r0, [r2, #8]
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
the_mutex->lock = CORE_MUTEX_LOCKED;
the_mutex->holder = executing;
a000e454: e583205c str r2, [r3, #92] ; 0x5c
the_mutex->holder_id = executing->Object.id;
a000e458: e5830060 str r0, [r3, #96] ; 0x60
the_mutex->nest_count = 1;
a000e45c: e3a00001 mov r0, #1
a000e460: e5830054 str r0, [r3, #84] ; 0x54
return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p );
}
a000e464: e5930048 ldr r0, [r3, #72] ; 0x48
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
a000e468: e3500002 cmp r0, #2
a000e46c: 0a000001 beq a000e478 <_CORE_mutex_Seize_interrupt_trylock+0x50>
a000e470: e3500003 cmp r0, #3
a000e474: 1a000004 bne a000e48c <_CORE_mutex_Seize_interrupt_trylock+0x64>
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
a000e478: e592c01c ldr ip, [r2, #28]
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
a000e47c: e3500003 cmp r0, #3
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
a000e480: e28c4001 add r4, ip, #1
a000e484: e582401c str r4, [r2, #28]
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
a000e488: 0a000000 beq a000e490 <_CORE_mutex_Seize_interrupt_trylock+0x68>
_ISR_Enable( *level_p );
a000e48c: ea00002a b a000e53c <_CORE_mutex_Seize_interrupt_trylock+0x114>
*/
{
Priority_Control ceiling;
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
a000e490: e593004c ldr r0, [r3, #76] ; 0x4c
current = executing->current_priority;
a000e494: e5924014 ldr r4, [r2, #20]
if ( current == ceiling ) {
a000e498: e1540000 cmp r4, r0
a000e49c: 1a000000 bne a000e4a4 <_CORE_mutex_Seize_interrupt_trylock+0x7c>
_ISR_Enable( *level_p );
a000e4a0: ea000025 b a000e53c <_CORE_mutex_Seize_interrupt_trylock+0x114>
return 0;
}
if ( current > ceiling ) {
a000e4a4: 9a00000b bls a000e4d8 <_CORE_mutex_Seize_interrupt_trylock+0xb0>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a000e4a8: e59f20b0 ldr r2, [pc, #176] ; a000e560 <_CORE_mutex_Seize_interrupt_trylock+0x138>
a000e4ac: e5920000 ldr r0, [r2]
a000e4b0: e2800001 add r0, r0, #1
a000e4b4: e5820000 str r0, [r2]
a000e4b8: e5912000 ldr r2, [r1]
a000e4bc: e129f002 msr CPSR_fc, r2
_Thread_Disable_dispatch();
_ISR_Enable( *level_p );
_Thread_Change_priority(
a000e4c0: e3a02000 mov r2, #0
a000e4c4: e593005c ldr r0, [r3, #92] ; 0x5c
a000e4c8: e593104c ldr r1, [r3, #76] ; 0x4c
a000e4cc: ebfff32d bl a000b188 <_Thread_Change_priority>
the_mutex->holder,
the_mutex->Attributes.priority_ceiling,
false
);
_Thread_Enable_dispatch();
a000e4d0: ebfff452 bl a000b620 <_Thread_Enable_dispatch>
a000e4d4: ea00001a b a000e544 <_CORE_mutex_Seize_interrupt_trylock+0x11c>
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
a000e4d8: e3a00006 mov r0, #6
a000e4dc: e5820034 str r0, [r2, #52] ; 0x34
the_mutex->lock = CORE_MUTEX_UNLOCKED;
a000e4e0: e3a00001 mov r0, #1
a000e4e4: e5830050 str r0, [r3, #80] ; 0x50
the_mutex->nest_count = 0; /* undo locking above */
a000e4e8: e3a00000 mov r0, #0
a000e4ec: e5830054 str r0, [r3, #84] ; 0x54
executing->resource_count--; /* undo locking above */
a000e4f0: e582c01c str ip, [r2, #28]
a000e4f4: e5913000 ldr r3, [r1]
a000e4f8: e129f003 msr CPSR_fc, r3
a000e4fc: e8bd8010 pop {r4, pc}
/*
* At this point, we know the mutex was not available. If this thread
* is the thread that has locked the mutex, let's see if we are allowed
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
a000e500: e593005c ldr r0, [r3, #92] ; 0x5c
a000e504: e1500002 cmp r0, r2
a000e508: 1a00000f bne a000e54c <_CORE_mutex_Seize_interrupt_trylock+0x124>
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
a000e50c: e5932040 ldr r2, [r3, #64] ; 0x40
a000e510: e3520000 cmp r2, #0
a000e514: 0a000002 beq a000e524 <_CORE_mutex_Seize_interrupt_trylock+0xfc>
a000e518: e3520001 cmp r2, #1
a000e51c: 1a00000c bne a000e554 <_CORE_mutex_Seize_interrupt_trylock+0x12c>
a000e520: ea000003 b a000e534 <_CORE_mutex_Seize_interrupt_trylock+0x10c><== NOT EXECUTED
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
a000e524: e5932054 ldr r2, [r3, #84] ; 0x54
a000e528: e2822001 add r2, r2, #1
a000e52c: e5832054 str r2, [r3, #84] ; 0x54
_ISR_Enable( *level_p );
a000e530: ea000001 b a000e53c <_CORE_mutex_Seize_interrupt_trylock+0x114>
return 0;
case CORE_MUTEX_NESTING_IS_ERROR:
executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED;
a000e534: e3a03002 mov r3, #2 <== NOT EXECUTED
a000e538: e5803034 str r3, [r0, #52] ; 0x34 <== NOT EXECUTED
a000e53c: e5913000 ldr r3, [r1]
a000e540: e129f003 msr CPSR_fc, r3
_ISR_Enable( *level_p );
return 0;
a000e544: e3a00000 mov r0, #0
a000e548: e8bd8010 pop {r4, pc}
/*
* The mutex is not available and the caller must deal with the possibility
* of blocking.
*/
return 1;
a000e54c: e3a00001 mov r0, #1
a000e550: e8bd8010 pop {r4, pc}
a000e554: e3a00001 mov r0, #1
a000e558: e8bd8010 pop {r4, pc}
a0009f68 <_CORE_mutex_Surrender>:
#else
Objects_Id id __attribute__((unused)),
CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused))
#endif
)
{
a0009f68: e92d4030 push {r4, r5, lr}
a0009f6c: e1a04000 mov r4, r0
* allowed when the mutex in quetion is FIFO or simple Priority
* discipline. But Priority Ceiling or Priority Inheritance mutexes
* must be released by the thread which acquired them.
*/
if ( the_mutex->Attributes.only_owner_release ) {
a0009f70: e5d43044 ldrb r3, [r4, #68] ; 0x44
)
{
Thread_Control *the_thread;
Thread_Control *holder;
holder = the_mutex->holder;
a0009f74: e590005c ldr r0, [r0, #92] ; 0x5c
* allowed when the mutex in quetion is FIFO or simple Priority
* discipline. But Priority Ceiling or Priority Inheritance mutexes
* must be released by the thread which acquired them.
*/
if ( the_mutex->Attributes.only_owner_release ) {
a0009f78: e3530000 cmp r3, #0
a0009f7c: 0a000004 beq a0009f94 <_CORE_mutex_Surrender+0x2c>
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
a0009f80: e59f30f4 ldr r3, [pc, #244] ; a000a07c <_CORE_mutex_Surrender+0x114>
if ( !_Thread_Is_executing( holder ) )
a0009f84: e5933004 ldr r3, [r3, #4]
a0009f88: e1500003 cmp r0, r3
return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE;
a0009f8c: 13a05003 movne r5, #3
* discipline. But Priority Ceiling or Priority Inheritance mutexes
* must be released by the thread which acquired them.
*/
if ( the_mutex->Attributes.only_owner_release ) {
if ( !_Thread_Is_executing( holder ) )
a0009f90: 1a000037 bne a000a074 <_CORE_mutex_Surrender+0x10c>
return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE;
}
/* XXX already unlocked -- not right status */
if ( !the_mutex->nest_count )
a0009f94: e5945054 ldr r5, [r4, #84] ; 0x54
a0009f98: e3550000 cmp r5, #0
a0009f9c: 0a000034 beq a000a074 <_CORE_mutex_Surrender+0x10c>
return CORE_MUTEX_STATUS_SUCCESSFUL;
the_mutex->nest_count--;
a0009fa0: e2455001 sub r5, r5, #1
if ( the_mutex->nest_count != 0 ) {
a0009fa4: e3550000 cmp r5, #0
/* XXX already unlocked -- not right status */
if ( !the_mutex->nest_count )
return CORE_MUTEX_STATUS_SUCCESSFUL;
the_mutex->nest_count--;
a0009fa8: e5845054 str r5, [r4, #84] ; 0x54
/* Currently no API exercises this behavior. */
break;
}
#else
/* must be CORE_MUTEX_NESTING_ACQUIRES or we wouldn't be here */
return CORE_MUTEX_STATUS_SUCCESSFUL;
a0009fac: 13a05000 movne r5, #0
if ( !the_mutex->nest_count )
return CORE_MUTEX_STATUS_SUCCESSFUL;
the_mutex->nest_count--;
if ( the_mutex->nest_count != 0 ) {
a0009fb0: 1a00002f bne a000a074 <_CORE_mutex_Surrender+0x10c>
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
a0009fb4: e5943048 ldr r3, [r4, #72] ; 0x48
/*
* Formally release the mutex before possibly transferring it to a
* blocked thread.
*/
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
a0009fb8: e3530002 cmp r3, #2
a0009fbc: 0a000001 beq a0009fc8 <_CORE_mutex_Surrender+0x60>
a0009fc0: e3530003 cmp r3, #3
a0009fc4: 1a00000a bne a0009ff4 <_CORE_mutex_Surrender+0x8c>
_CORE_mutex_Pop_priority( the_mutex, holder );
if ( pop_status != CORE_MUTEX_STATUS_SUCCESSFUL )
return pop_status;
holder->resource_count--;
a0009fc8: e590301c ldr r3, [r0, #28]
a0009fcc: e2433001 sub r3, r3, #1
/*
* Whether or not someone is waiting for the mutex, an
* inherited priority must be lowered if this is the last
* mutex (i.e. resource) this task has.
*/
if ( holder->resource_count == 0 &&
a0009fd0: e3530000 cmp r3, #0
_CORE_mutex_Pop_priority( the_mutex, holder );
if ( pop_status != CORE_MUTEX_STATUS_SUCCESSFUL )
return pop_status;
holder->resource_count--;
a0009fd4: e580301c str r3, [r0, #28]
/*
* Whether or not someone is waiting for the mutex, an
* inherited priority must be lowered if this is the last
* mutex (i.e. resource) this task has.
*/
if ( holder->resource_count == 0 &&
a0009fd8: 1a000005 bne a0009ff4 <_CORE_mutex_Surrender+0x8c>
holder->real_priority != holder->current_priority ) {
a0009fdc: e5901018 ldr r1, [r0, #24]
/*
* Whether or not someone is waiting for the mutex, an
* inherited priority must be lowered if this is the last
* mutex (i.e. resource) this task has.
*/
if ( holder->resource_count == 0 &&
a0009fe0: e5903014 ldr r3, [r0, #20]
a0009fe4: e1510003 cmp r1, r3
a0009fe8: 0a000001 beq a0009ff4 <_CORE_mutex_Surrender+0x8c>
holder->real_priority != holder->current_priority ) {
_Thread_Change_priority( holder, holder->real_priority, true );
a0009fec: e3a02001 mov r2, #1
a0009ff0: eb000464 bl a000b188 <_Thread_Change_priority>
}
}
the_mutex->holder = NULL;
a0009ff4: e3a05000 mov r5, #0
a0009ff8: e584505c str r5, [r4, #92] ; 0x5c
the_mutex->holder_id = 0;
a0009ffc: e5845060 str r5, [r4, #96] ; 0x60
/*
* Now we check if another thread was waiting for this mutex. If so,
* transfer the mutex to that thread.
*/
if ( ( the_thread = _Thread_queue_Dequeue( &the_mutex->Wait_queue ) ) ) {
a000a000: e1a00004 mov r0, r4
a000a004: eb00064f bl a000b948 <_Thread_queue_Dequeue>
a000a008: e2503000 subs r3, r0, #0
}
break;
}
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
a000a00c: 03a02001 moveq r2, #1
a000a010: 05842050 streq r2, [r4, #80] ; 0x50
return CORE_MUTEX_STATUS_SUCCESSFUL;
a000a014: 01a05003 moveq r5, r3
/*
* Now we check if another thread was waiting for this mutex. If so,
* transfer the mutex to that thread.
*/
if ( ( the_thread = _Thread_queue_Dequeue( &the_mutex->Wait_queue ) ) ) {
a000a018: 0a000015 beq a000a074 <_CORE_mutex_Surrender+0x10c>
} else
#endif
{
the_mutex->holder = the_thread;
the_mutex->holder_id = the_thread->Object.id;
a000a01c: e5932008 ldr r2, [r3, #8]
} else
#endif
{
the_mutex->holder = the_thread;
a000a020: e584305c str r3, [r4, #92] ; 0x5c
the_mutex->holder_id = the_thread->Object.id;
a000a024: e5842060 str r2, [r4, #96] ; 0x60
the_mutex->nest_count = 1;
a000a028: e3a02001 mov r2, #1
a000a02c: e5842054 str r2, [r4, #84] ; 0x54
switch ( the_mutex->Attributes.discipline ) {
a000a030: e5942048 ldr r2, [r4, #72] ; 0x48
a000a034: e3520002 cmp r2, #2
case CORE_MUTEX_DISCIPLINES_FIFO:
case CORE_MUTEX_DISCIPLINES_PRIORITY:
break;
case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT:
_CORE_mutex_Push_priority( the_mutex, the_thread );
the_thread->resource_count++;
a000a038: 0593201c ldreq r2, [r3, #28]
a000a03c: 02822001 addeq r2, r2, #1
a000a040: 0583201c streq r2, [r3, #28]
the_mutex->holder = the_thread;
the_mutex->holder_id = the_thread->Object.id;
the_mutex->nest_count = 1;
switch ( the_mutex->Attributes.discipline ) {
a000a044: 0a00000a beq a000a074 <_CORE_mutex_Surrender+0x10c>
a000a048: e3520003 cmp r2, #3 <== NOT EXECUTED
a000a04c: 1a000008 bne a000a074 <_CORE_mutex_Surrender+0x10c> <== NOT EXECUTED
_CORE_mutex_Push_priority( the_mutex, the_thread );
the_thread->resource_count++;
break;
case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING:
_CORE_mutex_Push_priority( the_mutex, the_thread );
the_thread->resource_count++;
a000a050: e593201c ldr r2, [r3, #28] <== NOT EXECUTED
if (the_mutex->Attributes.priority_ceiling <
a000a054: e594104c ldr r1, [r4, #76] ; 0x4c <== NOT EXECUTED
_CORE_mutex_Push_priority( the_mutex, the_thread );
the_thread->resource_count++;
break;
case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING:
_CORE_mutex_Push_priority( the_mutex, the_thread );
the_thread->resource_count++;
a000a058: e2822001 add r2, r2, #1 <== NOT EXECUTED
a000a05c: e583201c str r2, [r3, #28] <== NOT EXECUTED
if (the_mutex->Attributes.priority_ceiling <
a000a060: e5933014 ldr r3, [r3, #20] <== NOT EXECUTED
a000a064: e1510003 cmp r1, r3 <== NOT EXECUTED
a000a068: 2a000001 bcs a000a074 <_CORE_mutex_Surrender+0x10c> <== NOT EXECUTED
the_thread->current_priority){
_Thread_Change_priority(
a000a06c: e1a02005 mov r2, r5 <== NOT EXECUTED
a000a070: eb000444 bl a000b188 <_Thread_Change_priority> <== NOT EXECUTED
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
a000a074: e1a00005 mov r0, r5
a000a078: e8bd8030 pop {r4, r5, pc}
a0008e88 <_Event_Seize>:
rtems_event_set pending_events;
ISR_Level level;
RTEMS_API_Control *api;
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
a0008e88: e59fc0f8 ldr ip, [pc, #248] ; a0008f88 <_Event_Seize+0x100>
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
a0008e8c: e92d40f0 push {r4, r5, r6, r7, lr}
rtems_event_set pending_events;
ISR_Level level;
RTEMS_API_Control *api;
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
a0008e90: e59c4004 ldr r4, [ip, #4]
executing->Wait.return_code = RTEMS_SUCCESSFUL;
a0008e94: e3a0c000 mov ip, #0
a0008e98: e584c034 str ip, [r4, #52] ; 0x34
api = executing->API_Extensions[ THREAD_API_RTEMS ];
a0008e9c: e59470f4 ldr r7, [r4, #244] ; 0xf4
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a0008ea0: e10f5000 mrs r5, CPSR
a0008ea4: e385c080 orr ip, r5, #128 ; 0x80
a0008ea8: e129f00c msr CPSR_fc, ip
_ISR_Disable( level );
pending_events = api->pending_events;
a0008eac: e5976000 ldr r6, [r7]
seized_events = _Event_sets_Get( pending_events, event_in );
if ( !_Event_sets_Is_empty( seized_events ) &&
a0008eb0: e010c006 ands ip, r0, r6
a0008eb4: 0a000007 beq a0008ed8 <_Event_Seize+0x50>
a0008eb8: e15c0000 cmp ip, r0
a0008ebc: 0a000001 beq a0008ec8 <_Event_Seize+0x40>
(seized_events == event_in || _Options_Is_any( option_set )) ) {
a0008ec0: e3110002 tst r1, #2 <== NOT EXECUTED
a0008ec4: 0a000003 beq a0008ed8 <_Event_Seize+0x50> <== NOT EXECUTED
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) );
a0008ec8: e1c6600c bic r6, r6, ip
api->pending_events =
a0008ecc: e5876000 str r6, [r7]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a0008ed0: e129f005 msr CPSR_fc, r5
a0008ed4: ea000004 b a0008eec <_Event_Seize+0x64>
_ISR_Enable( level );
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
a0008ed8: e3110001 tst r1, #1
a0008edc: 0a000004 beq a0008ef4 <_Event_Seize+0x6c>
a0008ee0: e129f005 msr CPSR_fc, r5
_ISR_Enable( level );
executing->Wait.return_code = RTEMS_UNSATISFIED;
a0008ee4: e3a0200d mov r2, #13
a0008ee8: e5842034 str r2, [r4, #52] ; 0x34
*event_out = seized_events;
a0008eec: e583c000 str ip, [r3]
return;
a0008ef0: e8bd80f0 pop {r4, r5, r6, r7, pc}
* NOTE: Since interrupts are disabled, this isn't that much of an
* issue but better safe than sorry.
*/
executing->Wait.option = (uint32_t) option_set;
executing->Wait.count = (uint32_t) event_in;
executing->Wait.return_argument = event_out;
a0008ef4: e5843028 str r3, [r4, #40] ; 0x28
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
a0008ef8: e59f308c ldr r3, [pc, #140] ; a0008f8c <_Event_Seize+0x104>
* set properly when we are marked as in the event critical section.
*
* NOTE: Since interrupts are disabled, this isn't that much of an
* issue but better safe than sorry.
*/
executing->Wait.option = (uint32_t) option_set;
a0008efc: e5841030 str r1, [r4, #48] ; 0x30
executing->Wait.count = (uint32_t) event_in;
executing->Wait.return_argument = event_out;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
a0008f00: e3a01001 mov r1, #1
*
* NOTE: Since interrupts are disabled, this isn't that much of an
* issue but better safe than sorry.
*/
executing->Wait.option = (uint32_t) option_set;
executing->Wait.count = (uint32_t) event_in;
a0008f04: e5840024 str r0, [r4, #36] ; 0x24
executing->Wait.return_argument = event_out;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
a0008f08: e5831000 str r1, [r3]
a0008f0c: e129f005 msr CPSR_fc, r5
_ISR_Enable( level );
if ( ticks ) {
a0008f10: e3520000 cmp r2, #0
a0008f14: 0a00000a beq a0008f44 <_Event_Seize+0xbc>
_Watchdog_Initialize(
a0008f18: e5941008 ldr r1, [r4, #8]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
a0008f1c: e59f006c ldr r0, [pc, #108] ; a0008f90 <_Event_Seize+0x108>
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a0008f20: e3a03000 mov r3, #0
the_watchdog->routine = routine;
the_watchdog->id = id;
a0008f24: e5841068 str r1, [r4, #104] ; 0x68
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
a0008f28: e5840064 str r0, [r4, #100] ; 0x64
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a0008f2c: e5843050 str r3, [r4, #80] ; 0x50
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
a0008f30: e584306c str r3, [r4, #108] ; 0x6c
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
a0008f34: e5842054 str r2, [r4, #84] ; 0x54
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a0008f38: e59f0054 ldr r0, [pc, #84] ; a0008f94 <_Event_Seize+0x10c>
a0008f3c: e2841048 add r1, r4, #72 ; 0x48
a0008f40: eb000d28 bl a000c3e8 <_Watchdog_Insert>
NULL
);
_Watchdog_Insert_ticks( &executing->Timer, ticks );
}
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
a0008f44: e1a00004 mov r0, r4
a0008f48: e3a01c01 mov r1, #256 ; 0x100
a0008f4c: eb000bc3 bl a000be60 <_Thread_Set_state>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a0008f50: e10f2000 mrs r2, CPSR
a0008f54: e3823080 orr r3, r2, #128 ; 0x80
a0008f58: e129f003 msr CPSR_fc, r3
_ISR_Disable( level );
sync_state = _Event_Sync_state;
a0008f5c: e59f3028 ldr r3, [pc, #40] ; a0008f8c <_Event_Seize+0x104>
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
a0008f60: e3a01000 mov r1, #0
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
_ISR_Disable( level );
sync_state = _Event_Sync_state;
a0008f64: e5930000 ldr r0, [r3]
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
a0008f68: e5831000 str r1, [r3]
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
a0008f6c: e3500001 cmp r0, #1
a0008f70: 1a000001 bne a0008f7c <_Event_Seize+0xf4>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a0008f74: e129f002 msr CPSR_fc, r2
a0008f78: e8bd80f0 pop {r4, r5, r6, r7, pc}
* An interrupt completed the thread's blocking request.
* The blocking thread was satisfied by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
_Thread_blocking_operation_Cancel( sync_state, executing, level );
a0008f7c: e1a01004 mov r1, r4 <== NOT EXECUTED
}
a0008f80: e8bd40f0 pop {r4, r5, r6, r7, lr} <== NOT EXECUTED
* An interrupt completed the thread's blocking request.
* The blocking thread was satisfied by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
_Thread_blocking_operation_Cancel( sync_state, executing, level );
a0008f84: ea00086c b a000b13c <_Thread_blocking_operation_Cancel> <== NOT EXECUTED
a0008fe8 <_Event_Surrender>:
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
a0008fe8: e92d40f0 push {r4, r5, r6, r7, lr}
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 ];
a0008fec: e590c0f4 ldr ip, [r0, #244] ; 0xf4
option_set = (rtems_option) the_thread->Wait.option;
a0008ff0: e5905030 ldr r5, [r0, #48] ; 0x30
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
a0008ff4: e1a04000 mov r4, r0
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a0008ff8: e10f3000 mrs r3, CPSR
a0008ffc: e3832080 orr r2, r3, #128 ; 0x80
a0009000: e129f002 msr CPSR_fc, r2
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
option_set = (rtems_option) the_thread->Wait.option;
_ISR_Disable( level );
pending_events = api->pending_events;
a0009004: e59c1000 ldr r1, [ip]
event_condition = (rtems_event_set) the_thread->Wait.count;
a0009008: e5900024 ldr r0, [r0, #36] ; 0x24
seized_events = _Event_sets_Get( pending_events, event_condition );
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
a000900c: e0102001 ands r2, r0, r1
a0009010: 1a000000 bne a0009018 <_Event_Surrender+0x30>
_ISR_Enable( level );
a0009014: ea000039 b a0009100 <_Event_Surrender+0x118>
/*
* 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() &&
a0009018: e59f60e8 ldr r6, [pc, #232] ; a0009108 <_Event_Surrender+0x120>
a000901c: e5967000 ldr r7, [r6]
a0009020: e3570000 cmp r7, #0
a0009024: 0a000017 beq a0009088 <_Event_Surrender+0xa0>
a0009028: e5966004 ldr r6, [r6, #4] <== NOT EXECUTED
a000902c: e1540006 cmp r4, r6 <== NOT EXECUTED
a0009030: 1a000014 bne a0009088 <_Event_Surrender+0xa0> <== NOT EXECUTED
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
a0009034: e59f60d0 ldr r6, [pc, #208] ; a000910c <_Event_Surrender+0x124><== NOT EXECUTED
a0009038: e5967000 ldr r7, [r6] <== NOT EXECUTED
/*
* 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 ) &&
a000903c: e3570002 cmp r7, #2 <== NOT EXECUTED
a0009040: 0a000002 beq a0009050 <_Event_Surrender+0x68> <== NOT EXECUTED
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
a0009044: e5966000 ldr r6, [r6] <== NOT EXECUTED
* 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) ||
a0009048: e3560001 cmp r6, #1 <== NOT EXECUTED
a000904c: 1a00000d bne a0009088 <_Event_Surrender+0xa0> <== NOT EXECUTED
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
a0009050: e1520000 cmp r2, r0 <== NOT EXECUTED
a0009054: 0a000001 beq a0009060 <_Event_Surrender+0x78> <== NOT EXECUTED
a0009058: e3150002 tst r5, #2 <== NOT EXECUTED
a000905c: 0a000008 beq a0009084 <_Event_Surrender+0x9c> <== NOT EXECUTED
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) );
a0009060: e1c11002 bic r1, r1, r2 <== NOT EXECUTED
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
a0009064: e58c1000 str r1, [ip] <== NOT EXECUTED
the_thread->Wait.count = 0;
a0009068: e3a01000 mov r1, #0 <== NOT EXECUTED
a000906c: e5841024 str r1, [r4, #36] ; 0x24 <== NOT EXECUTED
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
a0009070: e5941028 ldr r1, [r4, #40] ; 0x28 <== NOT EXECUTED
a0009074: e5812000 str r2, [r1] <== NOT EXECUTED
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
a0009078: e59f208c ldr r2, [pc, #140] ; a000910c <_Event_Surrender+0x124><== NOT EXECUTED
a000907c: e3a01003 mov r1, #3 <== NOT EXECUTED
a0009080: e5821000 str r1, [r2] <== NOT EXECUTED
}
_ISR_Enable( level );
a0009084: ea00001d b a0009100 <_Event_Surrender+0x118> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_event (
States_Control the_states
)
{
return (the_states & STATES_WAITING_FOR_EVENT);
a0009088: e5946010 ldr r6, [r4, #16]
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
a000908c: e3160c01 tst r6, #256 ; 0x100
a0009090: 0a00001a beq a0009100 <_Event_Surrender+0x118>
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
a0009094: e1520000 cmp r2, r0
a0009098: 0a000001 beq a00090a4 <_Event_Surrender+0xbc>
a000909c: e3150002 tst r5, #2 <== NOT EXECUTED
a00090a0: 0a000016 beq a0009100 <_Event_Surrender+0x118> <== NOT EXECUTED
a00090a4: e1c11002 bic r1, r1, r2
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
a00090a8: e58c1000 str r1, [ip]
the_thread->Wait.count = 0;
a00090ac: e3a01000 mov r1, #0
a00090b0: e5841024 str r1, [r4, #36] ; 0x24
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
a00090b4: e5941028 ldr r1, [r4, #40] ; 0x28
a00090b8: e5812000 str r2, [r1]
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
a00090bc: e10f2000 mrs r2, CPSR
a00090c0: e129f003 msr CPSR_fc, r3
a00090c4: e129f002 msr CPSR_fc, r2
_ISR_Flash( level );
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
a00090c8: e5942050 ldr r2, [r4, #80] ; 0x50
a00090cc: e3520002 cmp r2, #2
a00090d0: 0a000001 beq a00090dc <_Event_Surrender+0xf4>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a00090d4: e129f003 msr CPSR_fc, r3
a00090d8: ea000004 b a00090f0 <_Event_Surrender+0x108>
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
a00090dc: e3a02003 mov r2, #3
a00090e0: e5842050 str r2, [r4, #80] ; 0x50
a00090e4: e129f003 msr CPSR_fc, r3
_ISR_Enable( level );
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
(void) _Watchdog_Remove( &the_thread->Timer );
a00090e8: e2840048 add r0, r4, #72 ; 0x48
a00090ec: eb000d15 bl a000c548 <_Watchdog_Remove>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
a00090f0: e59f1018 ldr r1, [pc, #24] ; a0009110 <_Event_Surrender+0x128>
a00090f4: e1a00004 mov r0, r4
}
return;
}
}
_ISR_Enable( level );
}
a00090f8: e8bd40f0 pop {r4, r5, r6, r7, lr}
a00090fc: ea00087c b a000b2f4 <_Thread_Clear_state>
a0009100: e129f003 msr CPSR_fc, r3
a0009104: e8bd80f0 pop {r4, r5, r6, r7, pc}
a0009114 <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
a0009114: e92d4001 push {r0, lr} <== NOT EXECUTED
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
a0009118: e1a0100d mov r1, sp <== NOT EXECUTED
a000911c: eb000948 bl a000b644 <_Thread_Get> <== NOT EXECUTED
switch ( location ) {
a0009120: e59d3000 ldr r3, [sp] <== NOT EXECUTED
a0009124: e3530000 cmp r3, #0 <== NOT EXECUTED
a0009128: 1a000015 bne a0009184 <_Event_Timeout+0x70> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000912c: e10f2000 mrs r2, CPSR <== NOT EXECUTED
a0009130: e3821080 orr r1, r2, #128 ; 0x80 <== NOT EXECUTED
a0009134: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED
_ISR_Enable( level );
return;
}
#endif
the_thread->Wait.count = 0;
a0009138: e5803024 str r3, [r0, #36] ; 0x24 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
a000913c: e59f3044 ldr r3, [pc, #68] ; a0009188 <_Event_Timeout+0x74><== NOT EXECUTED
if ( _Thread_Is_executing( the_thread ) ) {
a0009140: e5933004 ldr r3, [r3, #4] <== NOT EXECUTED
a0009144: e1500003 cmp r0, r3 <== NOT EXECUTED
a0009148: 1a000004 bne a0009160 <_Event_Timeout+0x4c> <== NOT EXECUTED
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
a000914c: e59f3038 ldr r3, [pc, #56] ; a000918c <_Event_Timeout+0x78><== NOT EXECUTED
a0009150: e5931000 ldr r1, [r3] <== NOT EXECUTED
a0009154: e3510001 cmp r1, #1 <== NOT EXECUTED
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
a0009158: 02811001 addeq r1, r1, #1 <== NOT EXECUTED
a000915c: 05831000 streq r1, [r3] <== NOT EXECUTED
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
a0009160: e3a03006 mov r3, #6 <== NOT EXECUTED
a0009164: e5803034 str r3, [r0, #52] ; 0x34 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a0009168: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
a000916c: e59f101c ldr r1, [pc, #28] ; a0009190 <_Event_Timeout+0x7c><== NOT EXECUTED
a0009170: eb00085f bl a000b2f4 <_Thread_Clear_state> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
a0009174: e59f3018 ldr r3, [pc, #24] ; a0009194 <_Event_Timeout+0x80><== NOT EXECUTED
a0009178: e5932000 ldr r2, [r3] <== NOT EXECUTED
a000917c: e2422001 sub r2, r2, #1 <== NOT EXECUTED
a0009180: e5832000 str r2, [r3] <== NOT EXECUTED
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
a0009184: e8bd8008 pop {r3, pc} <== NOT EXECUTED
a000e5c0 <_Heap_Allocate_aligned_with_boundary>:
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
a000e5c0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
a000e5c4: e1a08002 mov r8, r2
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;
a000e5c8: e5902010 ldr r2, [r0, #16]
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
a000e5cc: e24dd01c sub sp, sp, #28
a000e5d0: e1a0b003 mov fp, r3
Heap_Block *block = NULL;
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
bool search_again = false;
if ( block_size_floor < alloc_size ) {
a000e5d4: e2913004 adds r3, r1, #4
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
a000e5d8: e1a05000 mov r5, r0
a000e5dc: e1a06001 mov r6, r1
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;
a000e5e0: e58d2000 str r2, [sp]
Heap_Block *block = NULL;
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
bool search_again = false;
if ( block_size_floor < alloc_size ) {
a000e5e4: e58d300c str r3, [sp, #12]
a000e5e8: 2a00006a bcs a000e798 <_Heap_Allocate_aligned_with_boundary+0x1d8>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
a000e5ec: e35b0000 cmp fp, #0
a000e5f0: 0a000003 beq a000e604 <_Heap_Allocate_aligned_with_boundary+0x44>
if ( boundary < alloc_size ) {
a000e5f4: e15b0001 cmp fp, r1 <== NOT EXECUTED
a000e5f8: 3a000066 bcc a000e798 <_Heap_Allocate_aligned_with_boundary+0x1d8><== NOT EXECUTED
return NULL;
}
if ( alignment == 0 ) {
alignment = page_size;
a000e5fc: e3580000 cmp r8, #0 <== NOT EXECUTED
a000e600: 01a08002 moveq r8, r2 <== NOT EXECUTED
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
a000e604: e59d2000 ldr r2, [sp]
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
a000e608: e2663004 rsb r3, r6, #4
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
a000e60c: e595a008 ldr sl, [r5, #8]
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
a000e610: e2822007 add r2, r2, #7
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
a000e614: e3a07000 mov r7, #0
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
a000e618: e58d2014 str r2, [sp, #20]
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
a000e61c: e58d3018 str r3, [sp, #24]
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
a000e620: ea000048 b a000e748 <_Heap_Allocate_aligned_with_boundary+0x188>
/*
* 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 ) {
a000e624: e59a4004 ldr r4, [sl, #4]
a000e628: e59d200c ldr r2, [sp, #12]
a000e62c: e1540002 cmp r4, r2
a000e630: 9a00003f bls a000e734 <_Heap_Allocate_aligned_with_boundary+0x174>
a000e634: e28a3008 add r3, sl, #8
if ( alignment == 0 ) {
a000e638: e3580000 cmp r8, #0
a000e63c: e58d3008 str r3, [sp, #8]
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
a000e640: 01a04003 moveq r4, r3
a000e644: 0a00003b beq a000e738 <_Heap_Allocate_aligned_with_boundary+0x178>
uintptr_t alignment,
uintptr_t boundary
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
a000e648: e5952014 ldr r2, [r5, #20]
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
a000e64c: e59d3014 ldr r3, [sp, #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;
a000e650: e3c44001 bic r4, r4, #1
uintptr_t alignment,
uintptr_t boundary
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
a000e654: e58d2004 str r2, [sp, #4]
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
a000e658: e0629003 rsb r9, r2, r3
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
uintptr_t alloc_begin = alloc_end - alloc_size;
a000e65c: e59d2018 ldr r2, [sp, #24]
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;
a000e660: e08a4004 add r4, sl, r4
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
a000e664: e0899004 add r9, r9, r4
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
uintptr_t alloc_begin = alloc_end - alloc_size;
a000e668: e0824004 add r4, r2, r4
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a000e66c: e1a00004 mov r0, r4
a000e670: e1a01008 mov r1, r8
a000e674: eb00155b bl a0013be8 <__umodsi3>
a000e678: e0604004 rsb r4, r0, r4
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 ) {
a000e67c: e1540009 cmp r4, r9
a000e680: 9a000003 bls a000e694 <_Heap_Allocate_aligned_with_boundary+0xd4>
a000e684: e1a00009 mov r0, r9 <== NOT EXECUTED
a000e688: e1a01008 mov r1, r8 <== NOT EXECUTED
a000e68c: eb001555 bl a0013be8 <__umodsi3> <== NOT EXECUTED
a000e690: e0604009 rsb r4, r0, r9 <== NOT EXECUTED
}
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
a000e694: e35b0000 cmp fp, #0
a000e698: 0a000014 beq a000e6f0 <_Heap_Allocate_aligned_with_boundary+0x130>
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
a000e69c: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
/* 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;
a000e6a0: e0849006 add r9, r4, r6 <== NOT EXECUTED
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
a000e6a4: e0833006 add r3, r3, r6 <== NOT EXECUTED
a000e6a8: e58d3010 str r3, [sp, #16] <== NOT EXECUTED
a000e6ac: ea000008 b a000e6d4 <_Heap_Allocate_aligned_with_boundary+0x114><== NOT EXECUTED
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
if ( boundary_line < boundary_floor ) {
a000e6b0: e59d2010 ldr r2, [sp, #16] <== NOT EXECUTED
a000e6b4: e1500002 cmp r0, r2 <== NOT EXECUTED
a000e6b8: 3a00001d bcc a000e734 <_Heap_Allocate_aligned_with_boundary+0x174><== NOT EXECUTED
return 0;
}
alloc_begin = boundary_line - alloc_size;
a000e6bc: e0664000 rsb r4, r6, r0 <== NOT EXECUTED
a000e6c0: e1a00004 mov r0, r4 <== NOT EXECUTED
a000e6c4: e1a01008 mov r1, r8 <== NOT EXECUTED
a000e6c8: eb001546 bl a0013be8 <__umodsi3> <== NOT EXECUTED
a000e6cc: e0604004 rsb r4, r0, r4 <== NOT EXECUTED
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
a000e6d0: e0849006 add r9, r4, r6 <== NOT EXECUTED
a000e6d4: e1a00009 mov r0, r9 <== NOT EXECUTED
a000e6d8: e1a0100b mov r1, fp <== NOT EXECUTED
a000e6dc: eb001541 bl a0013be8 <__umodsi3> <== NOT EXECUTED
a000e6e0: e0600009 rsb r0, r0, r9 <== NOT EXECUTED
/* 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 ) {
a000e6e4: e1500009 cmp r0, r9 <== NOT EXECUTED
a000e6e8: 31540000 cmpcc r4, r0 <== NOT EXECUTED
a000e6ec: 3affffef bcc a000e6b0 <_Heap_Allocate_aligned_with_boundary+0xf0><== 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 ) {
a000e6f0: e59d3008 ldr r3, [sp, #8]
a000e6f4: e1540003 cmp r4, r3
a000e6f8: 3a00000d bcc a000e734 <_Heap_Allocate_aligned_with_boundary+0x174>
a000e6fc: e1a00004 mov r0, r4
a000e700: e59d1000 ldr r1, [sp]
a000e704: eb001537 bl a0013be8 <__umodsi3>
a000e708: e3e09007 mvn r9, #7
a000e70c: e06a9009 rsb r9, sl, r9
if ( free_size >= min_block_size || free_size == 0 ) {
return alloc_begin;
}
}
return 0;
a000e710: e59d2004 ldr r2, [sp, #4]
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
a000e714: e0899004 add r9, r9, r4
if ( alloc_begin >= alloc_begin_floor ) {
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;
if ( free_size >= min_block_size || free_size == 0 ) {
a000e718: e0603009 rsb r3, r0, r9
return alloc_begin;
}
}
return 0;
a000e71c: e1590000 cmp r9, r0
a000e720: 11530002 cmpne r3, r2
a000e724: 33a09000 movcc r9, #0
a000e728: 23a09001 movcs r9, #1
a000e72c: 31a04009 movcc r4, r9
a000e730: ea000000 b a000e738 <_Heap_Allocate_aligned_with_boundary+0x178>
a000e734: e3a04000 mov r4, #0
}
/* Statistics */
++search_count;
if ( alloc_begin != 0 ) {
a000e738: e3540000 cmp r4, #0
);
}
}
/* Statistics */
++search_count;
a000e73c: e2877001 add r7, r7, #1
if ( alloc_begin != 0 ) {
a000e740: 1a000004 bne a000e758 <_Heap_Allocate_aligned_with_boundary+0x198>
break;
}
block = block->next;
a000e744: e59aa008 ldr sl, [sl, #8]
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
a000e748: e15a0005 cmp sl, r5
a000e74c: 1affffb4 bne a000e624 <_Heap_Allocate_aligned_with_boundary+0x64>
a000e750: e3a04000 mov r4, #0
a000e754: ea00000a b a000e784 <_Heap_Allocate_aligned_with_boundary+0x1c4>
search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin );
} while ( search_again );
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
a000e758: e5953048 ldr r3, [r5, #72] ; 0x48
stats->searches += search_count;
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
a000e75c: e1a00005 mov r0, r5
a000e760: e1a0100a mov r1, sl
search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin );
} while ( search_again );
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
a000e764: e2833001 add r3, r3, #1
a000e768: e5853048 str r3, [r5, #72] ; 0x48
stats->searches += search_count;
a000e76c: e595304c ldr r3, [r5, #76] ; 0x4c
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
a000e770: e1a02004 mov r2, r4
} while ( search_again );
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
stats->searches += search_count;
a000e774: e0833007 add r3, r3, r7
a000e778: e585304c str r3, [r5, #76] ; 0x4c
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
a000e77c: e1a03006 mov r3, r6
a000e780: ebffef52 bl a000a4d0 <_Heap_Block_allocate>
boundary
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
a000e784: e5953044 ldr r3, [r5, #68] ; 0x44
stats->max_search = search_count;
}
return (void *) alloc_begin;
a000e788: e1a00004 mov r0, r4
boundary
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
a000e78c: e1530007 cmp r3, r7
stats->max_search = search_count;
a000e790: 35857044 strcc r7, [r5, #68] ; 0x44
}
return (void *) alloc_begin;
a000e794: ea000000 b a000e79c <_Heap_Allocate_aligned_with_boundary+0x1dc>
return NULL;
}
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
return NULL;
a000e798: e3a00000 mov r0, #0
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
a000e79c: e28dd01c add sp, sp, #28
a000e7a0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
a000a4d0 <_Heap_Block_allocate>:
Heap_Control *heap,
Heap_Block *block,
uintptr_t alloc_begin,
uintptr_t alloc_size
)
{
a000a4d0: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
}
_Heap_Protection_block_initialize( heap, block );
return block;
}
a000a4d4: e591a004 ldr sl, [r1, #4]
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
a000a4d8: e2426008 sub r6, r2, #8
Heap_Control *heap,
Heap_Block *block,
uintptr_t alloc_begin,
uintptr_t alloc_size
)
{
a000a4dc: e1a04001 mov r4, r1
a000a4e0: e1a07003 mov r7, r3
Heap_Statistics *const stats = &heap->stats;
uintptr_t const alloc_area_begin = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_area_offset = alloc_begin - alloc_area_begin;
a000a4e4: e0613006 rsb r3, r1, r6
- 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;
a000a4e8: e3ca1001 bic r1, sl, #1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
a000a4ec: e0849001 add r9, r4, r1
Heap_Control *heap,
Heap_Block *block,
uintptr_t alloc_begin,
uintptr_t alloc_size
)
{
a000a4f0: e1a05000 mov r5, r0
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;
a000a4f4: e5990004 ldr r0, [r9, #4]
Heap_Block *free_list_anchor = NULL;
_HAssert( alloc_area_begin <= alloc_begin );
if ( _Heap_Is_free( block ) ) {
a000a4f8: e3100001 tst r0, #1
/* Statistics */
--stats->free_blocks;
++stats->used_blocks;
stats->free_size -= _Heap_Block_size( block );
} else {
free_list_anchor = _Heap_Free_list_head( heap );
a000a4fc: 11a08005 movne r8, r5
Heap_Block *free_list_anchor = NULL;
_HAssert( alloc_area_begin <= alloc_begin );
if ( _Heap_Is_free( block ) ) {
a000a500: 1a00000c bne a000a538 <_Heap_Block_allocate+0x68>
return _Heap_Free_list_tail(heap)->prev;
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
a000a504: e5940008 ldr r0, [r4, #8]
free_list_anchor = block->prev;
a000a508: e594800c ldr r8, [r4, #12]
Heap_Block *prev = block->prev;
prev->next = next;
a000a50c: e5880008 str r0, [r8, #8]
next->prev = prev;
a000a510: e580800c str r8, [r0, #12]
_Heap_Free_list_remove( block );
/* Statistics */
--stats->free_blocks;
a000a514: e5950038 ldr r0, [r5, #56] ; 0x38
a000a518: e2400001 sub r0, r0, #1
a000a51c: e5850038 str r0, [r5, #56] ; 0x38
++stats->used_blocks;
a000a520: e5950040 ldr r0, [r5, #64] ; 0x40
a000a524: e2800001 add r0, r0, #1
a000a528: e5850040 str r0, [r5, #64] ; 0x40
stats->free_size -= _Heap_Block_size( block );
a000a52c: e5950030 ldr r0, [r5, #48] ; 0x30
a000a530: e0611000 rsb r1, r1, r0
a000a534: e5851030 str r1, [r5, #48] ; 0x30
} else {
free_list_anchor = _Heap_Free_list_head( heap );
}
if ( alloc_area_offset < heap->page_size ) {
a000a538: e5951010 ldr r1, [r5, #16]
a000a53c: e1530001 cmp r3, r1
a000a540: 2a000005 bcs a000a55c <_Heap_Block_allocate+0x8c>
Heap_Block *block,
Heap_Block *free_list_anchor,
uintptr_t alloc_size
)
{
_Heap_Block_split( heap, block, free_list_anchor, alloc_size );
a000a544: e1a00005 mov r0, r5
a000a548: e1a01004 mov r1, r4
a000a54c: e1a02008 mov r2, r8
a000a550: e0833007 add r3, r3, r7
a000a554: ebffff2e bl a000a214 <_Heap_Block_split>
a000a558: ea000021 b a000a5e4 <_Heap_Block_allocate+0x114>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a000a55c: e1a00002 mov r0, r2
a000a560: eb0025a0 bl a0013be8 <__umodsi3>
_HAssert( block_size >= heap->min_block_size );
_HAssert( new_block_size >= heap->min_block_size );
/* Statistics */
stats->free_size += block_size;
a000a564: e5952030 ldr r2, [r5, #48] ; 0x30
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
a000a568: e0606006 rsb r6, r0, r6
_Heap_Block_of_alloc_area( alloc_begin, heap->page_size );
uintptr_t const new_block_begin = (uintptr_t) new_block;
uintptr_t const new_block_size = block_end - new_block_begin;
block_end = new_block_begin;
block_size = block_end - block_begin;
a000a56c: e0643006 rsb r3, r4, r6
_HAssert( block_size >= heap->min_block_size );
_HAssert( new_block_size >= heap->min_block_size );
/* Statistics */
stats->free_size += block_size;
a000a570: e0822003 add r2, r2, r3
if ( _Heap_Is_prev_used( block ) ) {
a000a574: e31a0001 tst sl, #1
uintptr_t block_end = block_begin + block_size;
Heap_Block *const new_block =
_Heap_Block_of_alloc_area( alloc_begin, heap->page_size );
uintptr_t const new_block_begin = (uintptr_t) new_block;
uintptr_t const new_block_size = block_end - new_block_begin;
a000a578: e0669009 rsb r9, r6, r9
_HAssert( block_size >= heap->min_block_size );
_HAssert( new_block_size >= heap->min_block_size );
/* Statistics */
stats->free_size += block_size;
a000a57c: e5852030 str r2, [r5, #48] ; 0x30
if ( _Heap_Is_prev_used( block ) ) {
a000a580: 0a000009 beq a000a5ac <_Heap_Block_allocate+0xdc>
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
a000a584: e5982008 ldr r2, [r8, #8]
new_block->next = next;
new_block->prev = block_before;
a000a588: e584800c str r8, [r4, #12]
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
new_block->next = next;
a000a58c: e5842008 str r2, [r4, #8]
new_block->prev = block_before;
block_before->next = new_block;
next->prev = new_block;
a000a590: e582400c str r4, [r2, #12]
_Heap_Free_list_insert_after( free_list_anchor, block );
free_list_anchor = block;
/* Statistics */
++stats->free_blocks;
a000a594: e5952038 ldr r2, [r5, #56] ; 0x38
{
Heap_Block *next = block_before->next;
new_block->next = next;
new_block->prev = block_before;
block_before->next = new_block;
a000a598: e5884008 str r4, [r8, #8]
a000a59c: e2822001 add r2, r2, #1
a000a5a0: e5852038 str r2, [r5, #56] ; 0x38
a000a5a4: e1a02004 mov r2, r4
a000a5a8: ea000005 b a000a5c4 <_Heap_Block_allocate+0xf4>
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Prev_block(
const Heap_Block *block
)
{
return (Heap_Block *) ((uintptr_t) block - block->prev_size);
a000a5ac: e5942000 ldr r2, [r4] <== NOT EXECUTED
a000a5b0: e0624004 rsb r4, r2, r4 <== NOT EXECUTED
- 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;
a000a5b4: e5942004 ldr r2, [r4, #4] <== NOT EXECUTED
a000a5b8: e3c22001 bic r2, r2, #1 <== NOT EXECUTED
} else {
Heap_Block *const prev_block = _Heap_Prev_block( block );
uintptr_t const prev_block_size = _Heap_Block_size( prev_block );
block = prev_block;
block_size += prev_block_size;
a000a5bc: e0833002 add r3, r3, r2 <== NOT EXECUTED
a000a5c0: e1a02008 mov r2, r8 <== NOT EXECUTED
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
a000a5c4: e3831001 orr r1, r3, #1
a000a5c8: e5841004 str r1, [r4, #4]
new_block->prev_size = block_size;
a000a5cc: e8860208 stm r6, {r3, r9}
new_block->size_and_flag = new_block_size;
_Heap_Block_split( heap, new_block, free_list_anchor, alloc_size );
a000a5d0: e1a00005 mov r0, r5
a000a5d4: e1a01006 mov r1, r6
a000a5d8: e1a03007 mov r3, r7
a000a5dc: ebffff0c bl a000a214 <_Heap_Block_split>
a000a5e0: e1a04006 mov r4, r6
alloc_size
);
}
/* Statistics */
if ( stats->min_free_size > stats->free_size ) {
a000a5e4: e5953030 ldr r3, [r5, #48] ; 0x30
a000a5e8: e5952034 ldr r2, [r5, #52] ; 0x34
}
_Heap_Protection_block_initialize( heap, block );
return block;
}
a000a5ec: e1a00004 mov r0, r4
alloc_size
);
}
/* Statistics */
if ( stats->min_free_size > stats->free_size ) {
a000a5f0: e1520003 cmp r2, r3
stats->min_free_size = stats->free_size;
a000a5f4: 85853034 strhi r3, [r5, #52] ; 0x34
}
_Heap_Protection_block_initialize( heap, block );
return block;
}
a000a5f8: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
a000a214 <_Heap_Block_split>:
Heap_Control *heap,
Heap_Block *block,
Heap_Block *free_list_anchor,
uintptr_t alloc_size
)
{
a000a214: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
Heap_Statistics *const stats = &heap->stats;
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
a000a218: e5908014 ldr r8, [r0, #20]
uintptr_t alloc_size
)
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const page_size = heap->page_size;
a000a21c: e590a010 ldr sl, [r0, #16]
Heap_Control *heap,
Heap_Block *block,
Heap_Block *free_list_anchor,
uintptr_t alloc_size
)
{
a000a220: e1a05001 mov r5, r1
Heap_Statistics *const stats = &heap->stats;
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
uintptr_t const min_alloc_size = min_block_size - HEAP_BLOCK_HEADER_SIZE;
a000a224: e248b008 sub fp, r8, #8
return heap->stats.size;
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Max( uintptr_t a, uintptr_t b )
{
return a > b ? a : b;
a000a228: e153000b cmp r3, fp
a000a22c: 21a0b003 movcs fp, r3
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const used_size =
a000a230: e28bb008 add fp, fp, #8
}
_Heap_Protection_block_initialize( heap, block );
return block;
}
a000a234: e5919004 ldr r9, [r1, #4]
Heap_Control *heap,
Heap_Block *block,
Heap_Block *free_list_anchor,
uintptr_t alloc_size
)
{
a000a238: e1a04000 mov r4, r0
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
a000a23c: e1a0100a mov r1, sl
a000a240: e1a0000b mov r0, fp
a000a244: e1a06002 mov r6, r2
a000a248: eb002666 bl a0013be8 <__umodsi3>
- 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;
a000a24c: e3c97001 bic r7, r9, #1
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
if ( remainder != 0 ) {
a000a250: e3500000 cmp r0, #0
uintptr_t const used_size =
_Heap_Max( alloc_size, min_alloc_size ) + HEAP_BLOCK_HEADER_SIZE;
uintptr_t const used_block_size = _Heap_Align_up( used_size, page_size );
uintptr_t const free_size = block_size + HEAP_ALLOC_BONUS - used_size;
a000a254: e2872004 add r2, r7, #4
return value - remainder + alignment;
a000a258: 108ba00a addne sl, fp, sl
} else {
return value;
a000a25c: 01a0a00b moveq sl, fp
uintptr_t const free_size_limit = min_block_size + HEAP_ALLOC_BONUS;
a000a260: e2888004 add r8, r8, #4
uintptr_t const used_size =
_Heap_Max( alloc_size, min_alloc_size ) + HEAP_BLOCK_HEADER_SIZE;
uintptr_t const used_block_size = _Heap_Align_up( used_size, page_size );
uintptr_t const free_size = block_size + HEAP_ALLOC_BONUS - used_size;
a000a264: e06bb002 rsb fp, fp, r2
)
{
uintptr_t remainder = value % alignment;
if ( remainder != 0 ) {
return value - remainder + alignment;
a000a268: 1060a00a rsbne sl, r0, sl
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
a000a26c: e0853007 add r3, r5, r7
Heap_Block *next_block = _Heap_Block_at( block, block_size );
_HAssert( used_size <= block_size + HEAP_ALLOC_BONUS );
_HAssert( used_size + free_size == block_size + HEAP_ALLOC_BONUS );
if ( free_size >= free_size_limit ) {
a000a270: e15b0008 cmp fp, r8
next_block->prev_size = free_block_size;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
_Heap_Protection_block_initialize( heap, free_block );
} else {
next_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
a000a274: 35932004 ldrcc r2, [r3, #4]
a000a278: 33822001 orrcc r2, r2, #1
Heap_Block *next_block = _Heap_Block_at( block, block_size );
_HAssert( used_size <= block_size + HEAP_ALLOC_BONUS );
_HAssert( used_size + free_size == block_size + HEAP_ALLOC_BONUS );
if ( free_size >= free_size_limit ) {
a000a27c: 3a000023 bcc a000a310 <_Heap_Block_split+0xfc>
_HAssert( used_block_size + free_block_size == block_size );
_Heap_Block_set_size( block, used_block_size );
/* Statistics */
stats->free_size += free_block_size;
a000a280: e5941030 ldr r1, [r4, #48] ; 0x30
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;
a000a284: e2099001 and r9, r9, #1
_HAssert( used_size <= block_size + HEAP_ALLOC_BONUS );
_HAssert( used_size + free_size == block_size + HEAP_ALLOC_BONUS );
if ( free_size >= free_size_limit ) {
Heap_Block *const free_block = _Heap_Block_at( block, used_block_size );
uintptr_t free_block_size = block_size - used_block_size;
a000a288: e06a7007 rsb r7, sl, r7
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
a000a28c: e08a2005 add r2, sl, r5
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
block->size_and_flag = size | flag;
a000a290: e18aa009 orr sl, sl, r9
a000a294: e585a004 str sl, [r5, #4]
_HAssert( used_block_size + free_block_size == block_size );
_Heap_Block_set_size( block, used_block_size );
/* Statistics */
stats->free_size += free_block_size;
a000a298: e0811007 add r1, r1, r7
a000a29c: e5841030 str r1, [r4, #48] ; 0x30
- 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;
a000a2a0: e5931004 ldr r1, [r3, #4]
a000a2a4: e3c11001 bic r1, r1, #1
}
_Heap_Protection_block_initialize( heap, block );
return block;
}
a000a2a8: e0830001 add r0, r3, r1
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;
a000a2ac: e5900004 ldr r0, [r0, #4]
_Heap_Block_set_size( block, used_block_size );
/* Statistics */
stats->free_size += free_block_size;
if ( _Heap_Is_used( next_block ) ) {
a000a2b0: e3100001 tst r0, #1
a000a2b4: 0a000008 beq a000a2dc <_Heap_Block_split+0xc8>
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
a000a2b8: e5961008 ldr r1, [r6, #8]
new_block->next = next;
new_block->prev = block_before;
a000a2bc: e582600c str r6, [r2, #12]
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
new_block->next = next;
a000a2c0: e5821008 str r1, [r2, #8]
new_block->prev = block_before;
block_before->next = new_block;
next->prev = new_block;
a000a2c4: e581200c str r2, [r1, #12]
_Heap_Free_list_insert_after( free_list_anchor, free_block );
/* Statistics */
++stats->free_blocks;
a000a2c8: e5941038 ldr r1, [r4, #56] ; 0x38
{
Heap_Block *next = block_before->next;
new_block->next = next;
new_block->prev = block_before;
block_before->next = new_block;
a000a2cc: e5862008 str r2, [r6, #8]
a000a2d0: e2811001 add r1, r1, #1
a000a2d4: e5841038 str r1, [r4, #56] ; 0x38
a000a2d8: ea000007 b a000a2fc <_Heap_Block_split+0xe8>
RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace(
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *next = old_block->next;
a000a2dc: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED
Heap_Block *prev = old_block->prev;
a000a2e0: e593300c ldr r3, [r3, #12] <== NOT EXECUTED
} else {
uintptr_t const next_block_size = _Heap_Block_size( next_block );
_Heap_Free_list_replace( next_block, free_block );
free_block_size += next_block_size;
a000a2e4: e0877001 add r7, r7, r1 <== NOT EXECUTED
new_block->next = next;
a000a2e8: e5820008 str r0, [r2, #8] <== NOT EXECUTED
new_block->prev = prev;
a000a2ec: e582300c str r3, [r2, #12] <== NOT EXECUTED
next->prev = new_block;
prev->next = new_block;
a000a2f0: e5832008 str r2, [r3, #8] <== NOT EXECUTED
Heap_Block *prev = old_block->prev;
new_block->next = next;
new_block->prev = prev;
next->prev = new_block;
a000a2f4: e580200c str r2, [r0, #12] <== NOT EXECUTED
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
a000a2f8: e0873002 add r3, r7, r2 <== NOT EXECUTED
next_block = _Heap_Block_at( free_block, free_block_size );
}
free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED;
a000a2fc: e3871001 orr r1, r7, #1
a000a300: e5821004 str r1, [r2, #4]
next_block->prev_size = free_block_size;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
a000a304: e5932004 ldr r2, [r3, #4]
next_block = _Heap_Block_at( free_block, free_block_size );
}
free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED;
next_block->prev_size = free_block_size;
a000a308: e5837000 str r7, [r3]
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
a000a30c: e3c22001 bic r2, r2, #1
_Heap_Protection_block_initialize( heap, free_block );
} else {
next_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
a000a310: e5832004 str r2, [r3, #4]
a000a314: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
a000eadc <_Heap_Extend>:
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
a000eadc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
a000eae0: e1a05001 mov r5, r1
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const first_block = heap->first_block;
a000eae4: e5901020 ldr r1, [r0, #32]
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
a000eae8: e24dd028 sub sp, sp, #40 ; 0x28
a000eaec: e58d3018 str r3, [sp, #24]
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const first_block = heap->first_block;
a000eaf0: e58d1010 str r1, [sp, #16]
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;
a000eaf4: e5903010 ldr r3, [r0, #16]
uintptr_t const min_block_size = heap->min_block_size;
uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr;
uintptr_t const extend_area_end = extend_area_begin + extend_area_size;
uintptr_t const free_size = stats->free_size;
a000eaf8: e5901030 ldr r1, [r0, #48] ; 0x30
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;
a000eafc: e3a08000 mov r8, #0
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 ) {
a000eb00: e0956002 adds r6, r5, r2
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
a000eb04: e1a04000 mov r4, r0
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;
a000eb08: e58d3014 str r3, [sp, #20]
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;
a000eb0c: e58d8024 str r8, [sp, #36] ; 0x24
Heap_Block *extend_last_block = NULL;
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
a000eb10: e5903014 ldr r3, [r0, #20]
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;
Heap_Block *extend_last_block = NULL;
a000eb14: e58d8020 str r8, [sp, #32]
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr;
uintptr_t const extend_area_end = extend_area_begin + extend_area_size;
uintptr_t const free_size = stats->free_size;
a000eb18: e58d101c str r1, [sp, #28]
uintptr_t extend_first_block_size = 0;
uintptr_t extended_size = 0;
bool extend_area_ok = false;
if ( extend_area_end < extend_area_begin ) {
return false;
a000eb1c: 21a00008 movcs r0, r8
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 ) {
a000eb20: 2a00009e bcs a000eda0 <_Heap_Extend+0x2c4>
return false;
}
extend_area_ok = _Heap_Get_first_and_last_block(
a000eb24: e28d1024 add r1, sp, #36 ; 0x24
a000eb28: e58d1000 str r1, [sp]
a000eb2c: e28d1020 add r1, sp, #32
a000eb30: e58d1004 str r1, [sp, #4]
a000eb34: e1a00005 mov r0, r5
a000eb38: e1a01002 mov r1, r2
a000eb3c: e59d2014 ldr r2, [sp, #20]
a000eb40: ebffeecc bl a000a678 <_Heap_Get_first_and_last_block>
page_size,
min_block_size,
&extend_first_block,
&extend_last_block
);
if (!extend_area_ok ) {
a000eb44: e3500000 cmp r0, #0
a000eb48: 0a000094 beq a000eda0 <_Heap_Extend+0x2c4>
a000eb4c: e59da010 ldr sl, [sp, #16]
a000eb50: e1a07008 mov r7, r8
a000eb54: e1a09008 mov r9, r8
return false;
}
do {
uintptr_t const sub_area_begin = (start_block != first_block) ?
(uintptr_t) start_block : heap->area_begin;
a000eb58: e5941018 ldr r1, [r4, #24]
a000eb5c: e1a03008 mov r3, r8
a000eb60: e1a0c004 mov ip, r4
a000eb64: ea000000 b a000eb6c <_Heap_Extend+0x90>
a000eb68: e1a0100a mov r1, sl <== NOT EXECUTED
uintptr_t const sub_area_end = start_block->prev_size;
a000eb6c: e59a4000 ldr r4, [sl]
Heap_Block *const end_block =
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
a000eb70: e1560001 cmp r6, r1
a000eb74: 93a00000 movls r0, #0
a000eb78: 83a00001 movhi r0, #1
a000eb7c: e1550004 cmp r5, r4
a000eb80: 23a00000 movcs r0, #0
a000eb84: e3500000 cmp r0, #0
a000eb88: 1a000083 bne a000ed9c <_Heap_Extend+0x2c0>
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
}
if ( extend_area_end == sub_area_begin ) {
a000eb8c: e1560001 cmp r6, r1
a000eb90: 01a0300a moveq r3, sl
a000eb94: 0a000001 beq a000eba0 <_Heap_Extend+0xc4>
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
a000eb98: e1560004 cmp r6, r4
a000eb9c: 31a0900a movcc r9, sl
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a000eba0: e1a00004 mov r0, r4
a000eba4: e59d1014 ldr r1, [sp, #20]
a000eba8: e58d300c str r3, [sp, #12]
a000ebac: e58dc008 str ip, [sp, #8]
a000ebb0: eb001562 bl a0014140 <__umodsi3>
a000ebb4: e244b008 sub fp, r4, #8
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
a000ebb8: e1540005 cmp r4, r5
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
a000ebbc: e060000b rsb r0, r0, fp
a000ebc0: e59d300c ldr r3, [sp, #12]
a000ebc4: e59dc008 ldr ip, [sp, #8]
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 )
a000ebc8: 01a07000 moveq r7, r0
start_block->prev_size = extend_area_end;
a000ebcc: 058a6000 streq r6, [sl]
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
a000ebd0: 0a000000 beq a000ebd8 <_Heap_Extend+0xfc>
a000ebd4: 31a08000 movcc r8, r0
- 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;
a000ebd8: e590a004 ldr sl, [r0, #4]
} 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 );
a000ebdc: e59d2010 ldr r2, [sp, #16]
a000ebe0: e3caa001 bic sl, sl, #1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
a000ebe4: e080a00a add sl, r0, sl
a000ebe8: e15a0002 cmp sl, r2
a000ebec: 1affffdd bne a000eb68 <_Heap_Extend+0x8c>
a000ebf0: e1a02009 mov r2, r9
a000ebf4: e1a09003 mov r9, r3
if ( extend_area_begin < heap->area_begin ) {
a000ebf8: e59c3018 ldr r3, [ip, #24]
a000ebfc: e1a0400c mov r4, ip
a000ec00: e1550003 cmp r5, r3
heap->area_begin = extend_area_begin;
a000ec04: 358c5018 strcc r5, [ip, #24]
}
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
if ( extend_area_begin < heap->area_begin ) {
a000ec08: 3a000002 bcc a000ec18 <_Heap_Extend+0x13c>
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
a000ec0c: e59c301c ldr r3, [ip, #28] <== NOT EXECUTED
a000ec10: e1530006 cmp r3, r6 <== NOT EXECUTED
heap->area_end = extend_area_end;
a000ec14: 358c601c strcc r6, [ip, #28] <== NOT EXECUTED
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
a000ec18: e59d1024 ldr r1, [sp, #36] ; 0x24
a000ec1c: e59d3020 ldr r3, [sp, #32]
extend_first_block->prev_size = extend_area_end;
a000ec20: e5816000 str r6, [r1]
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
a000ec24: e0610003 rsb r0, r1, r3
(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;
a000ec28: e380c001 orr ip, r0, #1
_Heap_Protection_block_initialize( heap, extend_first_block );
extend_last_block->prev_size = extend_first_block_size;
a000ec2c: e5830000 str r0, [r3]
extend_last_block->size_and_flag = 0;
a000ec30: e3a00000 mov r0, #0
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 =
a000ec34: e581c004 str ip, [r1, #4]
extend_first_block_size | HEAP_PREV_BLOCK_USED;
_Heap_Protection_block_initialize( heap, extend_first_block );
extend_last_block->prev_size = extend_first_block_size;
extend_last_block->size_and_flag = 0;
a000ec38: e5830004 str r0, [r3, #4]
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
a000ec3c: e5940020 ldr r0, [r4, #32]
a000ec40: e1500001 cmp r0, r1
heap->first_block = extend_first_block;
a000ec44: 85841020 strhi r1, [r4, #32]
extend_last_block->prev_size = extend_first_block_size;
extend_last_block->size_and_flag = 0;
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
a000ec48: 8a000002 bhi a000ec58 <_Heap_Extend+0x17c>
heap->first_block = extend_first_block;
} else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) {
a000ec4c: e5941024 ldr r1, [r4, #36] ; 0x24 <== NOT EXECUTED
a000ec50: e1510003 cmp r1, r3 <== NOT EXECUTED
heap->last_block = extend_last_block;
a000ec54: 35843024 strcc r3, [r4, #36] ; 0x24 <== NOT EXECUTED
}
if ( merge_below_block != NULL ) {
a000ec58: e3590000 cmp r9, #0
a000ec5c: 0a000010 beq a000eca4 <_Heap_Extend+0x1c8>
Heap_Control *heap,
uintptr_t extend_area_begin,
Heap_Block *first_block
)
{
uintptr_t const page_size = heap->page_size;
a000ec60: e594a010 ldr sl, [r4, #16] <== NOT EXECUTED
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
a000ec64: e2855008 add r5, r5, #8 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
a000ec68: e1a00005 mov r0, r5 <== NOT EXECUTED
a000ec6c: e1a0100a mov r1, sl <== NOT EXECUTED
a000ec70: eb001532 bl a0014140 <__umodsi3> <== NOT EXECUTED
if ( remainder != 0 ) {
a000ec74: e3500000 cmp r0, #0 <== NOT EXECUTED
return value - remainder + alignment;
a000ec78: 1085500a addne r5, r5, sl <== NOT EXECUTED
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;
a000ec7c: e5993000 ldr r3, [r9] <== NOT EXECUTED
a000ec80: 10605005 rsbne r5, r0, r5 <== NOT EXECUTED
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
uintptr_t const new_first_block_begin =
a000ec84: e2451008 sub r1, r5, #8 <== NOT EXECUTED
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;
a000ec88: e5053008 str r3, [r5, #-8] <== NOT EXECUTED
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
uintptr_t const new_first_block_begin =
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 =
a000ec8c: e0613009 rsb r3, r1, r9 <== NOT EXECUTED
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;
a000ec90: e3833001 orr r3, r3, #1 <== NOT EXECUTED
a000ec94: e5053004 str r3, [r5, #-4] <== NOT EXECUTED
_Heap_Free_block( heap, new_first_block );
a000ec98: e1a00004 mov r0, r4 <== NOT EXECUTED
a000ec9c: ebffff86 bl a000eabc <_Heap_Free_block> <== NOT EXECUTED
a000eca0: ea000004 b a000ecb8 <_Heap_Extend+0x1dc> <== NOT EXECUTED
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 ) {
a000eca4: e3520000 cmp r2, #0
_Heap_Link_below(
a000eca8: 159d3020 ldrne r3, [sp, #32]
{
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;
a000ecac: 10632002 rsbne r2, r3, r2
a000ecb0: 13822001 orrne r2, r2, #1
)
{
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const link_begin = (uintptr_t) link;
last_block->size_and_flag =
a000ecb4: 15832004 strne r2, [r3, #4]
link_below_block,
extend_last_block
);
}
if ( merge_above_block != NULL ) {
a000ecb8: e3570000 cmp r7, #0
a000ecbc: 0a000012 beq a000ed0c <_Heap_Extend+0x230>
)
{
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,
a000ecc0: e2466008 sub r6, r6, #8 <== NOT EXECUTED
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(
a000ecc4: e0676006 rsb r6, r7, r6 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a000ecc8: e5941010 ldr r1, [r4, #16] <== NOT EXECUTED
a000eccc: e1a00006 mov r0, r6 <== NOT EXECUTED
a000ecd0: eb00151a bl a0014140 <__umodsi3> <== NOT EXECUTED
);
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)
a000ecd4: e5972004 ldr r2, [r7, #4] <== NOT EXECUTED
a000ecd8: e0606006 rsb r6, r0, r6 <== NOT EXECUTED
page_size
);
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
a000ecdc: e0863007 add r3, r6, r7 <== NOT EXECUTED
(last_block->size_and_flag - last_block_new_size)
a000ece0: e0662002 rsb r2, r6, r2 <== NOT EXECUTED
| HEAP_PREV_BLOCK_USED;
a000ece4: e3822001 orr r2, r2, #1 <== NOT EXECUTED
page_size
);
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
a000ece8: e5832004 str r2, [r3, #4] <== NOT EXECUTED
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;
a000ecec: e5973004 ldr r3, [r7, #4] <== NOT EXECUTED
(last_block->size_and_flag - last_block_new_size)
| HEAP_PREV_BLOCK_USED;
_Heap_Block_set_size( last_block, last_block_new_size );
_Heap_Free_block( heap, last_block );
a000ecf0: e1a00004 mov r0, r4 <== NOT EXECUTED
a000ecf4: e1a01007 mov r1, r7 <== NOT EXECUTED
a000ecf8: e2033001 and r3, r3, #1 <== NOT EXECUTED
block->size_and_flag = size | flag;
a000ecfc: e1866003 orr r6, r6, r3 <== NOT EXECUTED
a000ed00: e5876004 str r6, [r7, #4] <== NOT EXECUTED
a000ed04: ebffff6c bl a000eabc <_Heap_Free_block> <== NOT EXECUTED
a000ed08: ea00000b b a000ed3c <_Heap_Extend+0x260> <== NOT EXECUTED
);
}
if ( merge_above_block != NULL ) {
_Heap_Merge_above( heap, merge_above_block, extend_area_end );
} else if ( link_above_block != NULL ) {
a000ed0c: e3580000 cmp r8, #0
a000ed10: 0a000009 beq a000ed3c <_Heap_Extend+0x260>
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;
a000ed14: e5982004 ldr r2, [r8, #4] <== NOT EXECUTED
)
{
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 );
a000ed18: e59d1024 ldr r1, [sp, #36] ; 0x24 <== NOT EXECUTED
}
if ( merge_above_block != NULL ) {
_Heap_Merge_above( heap, merge_above_block, extend_area_end );
} else if ( link_above_block != NULL ) {
_Heap_Link_above(
a000ed1c: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED
a000ed20: e2022001 and r2, r2, #1 <== NOT EXECUTED
)
{
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 );
a000ed24: e0681001 rsb r1, r8, r1 <== NOT EXECUTED
block->size_and_flag = size | flag;
a000ed28: e1812002 orr r2, r1, r2 <== NOT EXECUTED
a000ed2c: e5882004 str r2, [r8, #4] <== NOT EXECUTED
last_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
a000ed30: e5932004 ldr r2, [r3, #4] <== NOT EXECUTED
a000ed34: e3822001 orr r2, r2, #1 <== NOT EXECUTED
a000ed38: e5832004 str r2, [r3, #4] <== NOT EXECUTED
extend_first_block,
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
a000ed3c: e3570000 cmp r7, #0
a000ed40: 03590000 cmpeq r9, #0
a000ed44: 1a000002 bne a000ed54 <_Heap_Extend+0x278>
_Heap_Free_block( heap, extend_first_block );
a000ed48: e1a00004 mov r0, r4
a000ed4c: e59d1024 ldr r1, [sp, #36] ; 0x24
a000ed50: ebffff59 bl a000eabc <_Heap_Free_block>
*/
RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap )
{
_Heap_Block_set_size(
heap->last_block,
(uintptr_t) heap->first_block - (uintptr_t) heap->last_block
a000ed54: e5943024 ldr r3, [r4, #36] ; 0x24
* 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(
a000ed58: e5941020 ldr r1, [r4, #32]
stats->size += extended_size;
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
a000ed5c: e3a00001 mov r0, #1
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;
a000ed60: e5932004 ldr r2, [r3, #4]
* 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(
a000ed64: e0631001 rsb r1, r3, r1
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;
a000ed68: e2022001 and r2, r2, #1
block->size_and_flag = size | flag;
a000ed6c: e1812002 orr r2, r1, r2
a000ed70: e5832004 str r2, [r3, #4]
_Heap_Free_block( heap, extend_first_block );
}
_Heap_Set_last_block_size( heap );
extended_size = stats->free_size - free_size;
a000ed74: e59d101c ldr r1, [sp, #28]
a000ed78: e5943030 ldr r3, [r4, #48] ; 0x30
/* Statistics */
stats->size += extended_size;
a000ed7c: e594202c ldr r2, [r4, #44] ; 0x2c
_Heap_Free_block( heap, extend_first_block );
}
_Heap_Set_last_block_size( heap );
extended_size = stats->free_size - free_size;
a000ed80: e0613003 rsb r3, r1, r3
/* Statistics */
stats->size += extended_size;
a000ed84: e0822003 add r2, r2, r3
a000ed88: e584202c str r2, [r4, #44] ; 0x2c
if ( extended_size_ptr != NULL )
a000ed8c: e59d2018 ldr r2, [sp, #24]
a000ed90: e3520000 cmp r2, #0
*extended_size_ptr = extended_size;
a000ed94: 15823000 strne r3, [r2]
a000ed98: ea000000 b a000eda0 <_Heap_Extend+0x2c4>
_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;
a000ed9c: e3a00000 mov r0, #0 <== NOT EXECUTED
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
a000eda0: e28dd028 add sp, sp, #40 ; 0x28
a000eda4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
a00156a0 <_Heap_Resize_block>:
void *alloc_begin_ptr,
uintptr_t new_alloc_size,
uintptr_t *old_size,
uintptr_t *new_size
)
{
a00156a0: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
a00156a4: e1a04000 mov r4, r0
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a00156a8: e241a008 sub sl, r1, #8
a00156ac: e1a00001 mov r0, r1
a00156b0: e1a05001 mov r5, r1
a00156b4: e5941010 ldr r1, [r4, #16]
a00156b8: e1a08003 mov r8, r3
a00156bc: e1a07002 mov r7, r2
a00156c0: ebfff948 bl a0013be8 <__umodsi3>
a00156c4: e59d601c ldr r6, [sp, #28]
uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr;
Heap_Block *const block = _Heap_Block_of_alloc_area( alloc_begin, page_size );
*old_size = 0;
a00156c8: e3a03000 mov r3, #0
a00156cc: e5883000 str r3, [r8]
*new_size = 0;
a00156d0: e5863000 str r3, [r6]
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;
a00156d4: e5943020 ldr r3, [r4, #32]
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
a00156d8: e060100a rsb r1, r0, sl
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;
a00156dc: e1530001 cmp r3, r1
a00156e0: 8a000039 bhi a00157cc <_Heap_Resize_block+0x12c>
a00156e4: e5943024 ldr r3, [r4, #36] ; 0x24
a00156e8: e1530001 cmp r3, r1
a00156ec: 3a000038 bcc a00157d4 <_Heap_Resize_block+0x134>
- 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;
a00156f0: e5913004 ldr r3, [r1, #4]
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t block_size = _Heap_Block_size( block );
uintptr_t block_end = block_begin + block_size;
uintptr_t alloc_size = block_end - alloc_begin + HEAP_ALLOC_BONUS;
a00156f4: e265c004 rsb ip, r5, #4
a00156f8: e3c33001 bic r3, r3, #1
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t block_size = _Heap_Block_size( block );
uintptr_t block_end = block_begin + block_size;
a00156fc: e0812003 add r2, r1, r3
a0015700: e5920004 ldr r0, [r2, #4]
uintptr_t alloc_size = block_end - alloc_begin + HEAP_ALLOC_BONUS;
a0015704: e08cc002 add ip, ip, r2
a0015708: e3c00001 bic r0, r0, #1
new_size
);
} else {
return HEAP_RESIZE_FATAL_ERROR;
}
}
a001570c: e082a000 add sl, r2, r0
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;
a0015710: e59aa004 ldr sl, [sl, #4]
bool next_block_is_free = _Heap_Is_free( next_block );;
_HAssert( _Heap_Is_block_in_heap( heap, next_block ) );
_HAssert( _Heap_Is_prev_used( next_block ) );
*old_size = alloc_size;
a0015714: e588c000 str ip, [r8]
RTEMS_INLINE_ROUTINE bool _Heap_Is_free(
const Heap_Block *block
)
{
return !_Heap_Is_used( block );
a0015718: e31a0001 tst sl, #1
a001571c: 13a0a000 movne sl, #0
a0015720: 03a0a001 moveq sl, #1
if ( next_block_is_free ) {
a0015724: e35a0000 cmp sl, #0
block_size += next_block_size;
alloc_size += next_block_size;
a0015728: 108cc000 addne ip, ip, r0
_HAssert( _Heap_Is_prev_used( next_block ) );
*old_size = alloc_size;
if ( next_block_is_free ) {
block_size += next_block_size;
a001572c: 10833000 addne r3, r3, r0
alloc_size += next_block_size;
}
if ( new_alloc_size > alloc_size ) {
a0015730: e157000c cmp r7, ip
a0015734: 8a000022 bhi a00157c4 <_Heap_Resize_block+0x124>
return HEAP_RESIZE_UNSATISFIED;
}
if ( next_block_is_free ) {
a0015738: e35a0000 cmp sl, #0
a001573c: 0a000011 beq a0015788 <_Heap_Resize_block+0xe8>
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;
a0015740: e591c004 ldr ip, [r1, #4] <== NOT EXECUTED
a0015744: e20cc001 and ip, ip, #1 <== NOT EXECUTED
block->size_and_flag = size | flag;
a0015748: e183c00c orr ip, r3, ip <== NOT EXECUTED
a001574c: e581c004 str ip, [r1, #4] <== NOT EXECUTED
return _Heap_Free_list_tail(heap)->prev;
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
a0015750: e592c008 ldr ip, [r2, #8] <== NOT EXECUTED
Heap_Block *prev = block->prev;
a0015754: e592200c ldr r2, [r2, #12] <== NOT EXECUTED
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
a0015758: e0833001 add r3, r3, r1 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
a001575c: e582c008 str ip, [r2, #8] <== NOT EXECUTED
next->prev = prev;
a0015760: e58c200c str r2, [ip, #12] <== NOT EXECUTED
_Heap_Block_set_size( block, block_size );
_Heap_Free_list_remove( next_block );
next_block = _Heap_Block_at( block, block_size );
next_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
a0015764: e5932004 ldr r2, [r3, #4] <== NOT EXECUTED
a0015768: e3822001 orr r2, r2, #1 <== NOT EXECUTED
a001576c: e5832004 str r2, [r3, #4] <== NOT EXECUTED
/* Statistics */
--stats->free_blocks;
a0015770: e5943038 ldr r3, [r4, #56] ; 0x38 <== NOT EXECUTED
a0015774: e2433001 sub r3, r3, #1 <== NOT EXECUTED
a0015778: e5843038 str r3, [r4, #56] ; 0x38 <== NOT EXECUTED
stats->free_size -= next_block_size;
a001577c: e5943030 ldr r3, [r4, #48] ; 0x30 <== NOT EXECUTED
a0015780: e0600003 rsb r0, r0, r3 <== NOT EXECUTED
a0015784: e5840030 str r0, [r4, #48] ; 0x30 <== NOT EXECUTED
}
block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size );
a0015788: e1a02005 mov r2, r5
a001578c: e1a03007 mov r3, r7
a0015790: e1a00004 mov r0, r4
a0015794: ebffd34d bl a000a4d0 <_Heap_Block_allocate>
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
a0015798: e5903004 ldr r3, [r0, #4]
a001579c: e3c33001 bic r3, r3, #1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
a00157a0: e2833004 add r3, r3, #4
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
*new_size = (uintptr_t) next_block - alloc_begin + HEAP_ALLOC_BONUS;
a00157a4: e0655003 rsb r5, r5, r3
a00157a8: e0800005 add r0, r0, r5
a00157ac: e5860000 str r0, [r6]
/* Statistics */
++stats->resizes;
a00157b0: e5943054 ldr r3, [r4, #84] ; 0x54
return HEAP_RESIZE_SUCCESSFUL;
a00157b4: e3a00000 mov r0, #0
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
*new_size = (uintptr_t) next_block - alloc_begin + HEAP_ALLOC_BONUS;
/* Statistics */
++stats->resizes;
a00157b8: e2833001 add r3, r3, #1
a00157bc: e5843054 str r3, [r4, #84] ; 0x54
a00157c0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
block_size += next_block_size;
alloc_size += next_block_size;
}
if ( new_alloc_size > alloc_size ) {
return HEAP_RESIZE_UNSATISFIED;
a00157c4: e3a00001 mov r0, #1
*new_size = 0;
_Heap_Protection_block_check( heap, block );
if ( _Heap_Is_block_in_heap( heap, block ) ) {
return _Heap_Resize_block_checked(
a00157c8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
new_alloc_size,
old_size,
new_size
);
} else {
return HEAP_RESIZE_FATAL_ERROR;
a00157cc: e3a00002 mov r0, #2 <== NOT EXECUTED
a00157d0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
a00157d4: e3a00002 mov r0, #2 <== NOT EXECUTED
}
}
a00157d8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
a000b1dc <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
a000b1dc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
a000b1e0: e5903014 ldr r3, [r0, #20]
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
a000b1e4: e24dd030 sub sp, sp, #48 ; 0x30
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;
a000b1e8: e59f44c8 ldr r4, [pc, #1224] ; a000b6b8 <_Heap_Walk+0x4dc>
int source,
bool dump
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
a000b1ec: e58d3024 str r3, [sp, #36] ; 0x24
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
a000b1f0: e5903024 ldr r3, [r0, #36] ; 0x24
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
a000b1f4: e31200ff tst r2, #255 ; 0xff
bool dump
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const first_block = heap->first_block;
a000b1f8: e590c020 ldr ip, [r0, #32]
Heap_Block *const last_block = heap->last_block;
a000b1fc: e58d3028 str r3, [sp, #40] ; 0x28
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
a000b200: e59f34b4 ldr r3, [pc, #1204] ; a000b6bc <_Heap_Walk+0x4e0>
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
a000b204: e1a06000 mov r6, r0
a000b208: e1a05001 mov r5, r1
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;
a000b20c: 11a04003 movne r4, r3
if ( !_System_state_Is_up( _System_state_Get() ) ) {
a000b210: e59f34a8 ldr r3, [pc, #1192] ; a000b6c0 <_Heap_Walk+0x4e4>
Heap_Control *heap,
int source,
bool dump
)
{
uintptr_t const page_size = heap->page_size;
a000b214: e5909010 ldr r9, [r0, #16]
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const first_block = heap->first_block;
a000b218: e58dc020 str ip, [sp, #32]
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;
if ( !_System_state_Is_up( _System_state_Get() ) ) {
a000b21c: e5933000 ldr r3, [r3]
a000b220: e3530003 cmp r3, #3
a000b224: 1a000118 bne a000b68c <_Heap_Walk+0x4b0>
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)(
a000b228: e59dc024 ldr ip, [sp, #36] ; 0x24
a000b22c: e59d2020 ldr r2, [sp, #32]
a000b230: e58dc000 str ip, [sp]
a000b234: e5903018 ldr r3, [r0, #24]
a000b238: e58d3004 str r3, [sp, #4]
a000b23c: e590301c ldr r3, [r0, #28]
a000b240: e58d200c str r2, [sp, #12]
a000b244: e59f2478 ldr r2, [pc, #1144] ; a000b6c4 <_Heap_Walk+0x4e8>
a000b248: e58d3008 str r3, [sp, #8]
a000b24c: e59d3028 ldr r3, [sp, #40] ; 0x28
a000b250: e58d3010 str r3, [sp, #16]
a000b254: e5903008 ldr r3, [r0, #8]
a000b258: e58d3014 str r3, [sp, #20]
a000b25c: e590300c ldr r3, [r0, #12]
a000b260: e1a00001 mov r0, r1
a000b264: e3a01000 mov r1, #0
a000b268: e58d3018 str r3, [sp, #24]
a000b26c: e1a03009 mov r3, r9
a000b270: e12fff34 blx r4
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
a000b274: e3590000 cmp r9, #0
a000b278: 1a000005 bne a000b294 <_Heap_Walk+0xb8>
(*printer)( source, true, "page size is zero\n" );
a000b27c: e1a00005 mov r0, r5
a000b280: e3a01001 mov r1, #1
a000b284: e59f243c ldr r2, [pc, #1084] ; a000b6c8 <_Heap_Walk+0x4ec>
a000b288: e12fff34 blx r4
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a000b28c: e1a08009 mov r8, r9
a000b290: ea0000fe b a000b690 <_Heap_Walk+0x4b4>
(*printer)( source, true, "page size is zero\n" );
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
a000b294: e2198007 ands r8, r9, #7
(*printer)(
a000b298: 11a00005 movne r0, r5
a000b29c: 13a01001 movne r1, #1
a000b2a0: 159f2424 ldrne r2, [pc, #1060] ; a000b6cc <_Heap_Walk+0x4f0>
a000b2a4: 11a03009 movne r3, r9
a000b2a8: 1a0000ff bne a000b6ac <_Heap_Walk+0x4d0>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
a000b2ac: e59d0024 ldr r0, [sp, #36] ; 0x24
a000b2b0: e1a01009 mov r1, r9
a000b2b4: ebffe756 bl a0005014 <__umodsi3>
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
a000b2b8: e250b000 subs fp, r0, #0
a000b2bc: 0a000005 beq a000b2d8 <_Heap_Walk+0xfc>
(*printer)(
a000b2c0: e1a00005 mov r0, r5
a000b2c4: e3a01001 mov r1, #1
a000b2c8: e59f2400 ldr r2, [pc, #1024] ; a000b6d0 <_Heap_Walk+0x4f4>
a000b2cc: e59d3024 ldr r3, [sp, #36] ; 0x24
a000b2d0: e12fff34 blx r4
a000b2d4: ea0000ed b a000b690 <_Heap_Walk+0x4b4>
a000b2d8: e59dc020 ldr ip, [sp, #32]
a000b2dc: e1a01009 mov r1, r9
a000b2e0: e28c0008 add r0, ip, #8
a000b2e4: ebffe74a bl a0005014 <__umodsi3>
);
return false;
}
if (
a000b2e8: e250a000 subs sl, r0, #0
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
a000b2ec: 11a00005 movne r0, r5
a000b2f0: 13a01001 movne r1, #1
a000b2f4: 159f23d8 ldrne r2, [pc, #984] ; a000b6d4 <_Heap_Walk+0x4f8>
a000b2f8: 159d3020 ldrne r3, [sp, #32]
a000b2fc: 1a0000c3 bne a000b610 <_Heap_Walk+0x434>
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;
a000b300: e59d2020 ldr r2, [sp, #32]
a000b304: e5928004 ldr r8, [r2, #4]
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
a000b308: e2188001 ands r8, r8, #1
(*printer)(
a000b30c: 01a00005 moveq r0, r5
a000b310: 03a01001 moveq r1, #1
a000b314: 059f23bc ldreq r2, [pc, #956] ; a000b6d8 <_Heap_Walk+0x4fc>
a000b318: 0a000009 beq a000b344 <_Heap_Walk+0x168>
- 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;
a000b31c: e59d3028 ldr r3, [sp, #40] ; 0x28
a000b320: e5937004 ldr r7, [r3, #4]
a000b324: e3c77001 bic r7, r7, #1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
a000b328: e0837007 add r7, r3, r7
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;
a000b32c: e5978004 ldr r8, [r7, #4]
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
a000b330: e2188001 ands r8, r8, #1
a000b334: 1a000004 bne a000b34c <_Heap_Walk+0x170>
(*printer)(
a000b338: e59f239c ldr r2, [pc, #924] ; a000b6dc <_Heap_Walk+0x500> <== NOT EXECUTED
a000b33c: e1a00005 mov r0, r5 <== NOT EXECUTED
a000b340: e3a01001 mov r1, #1 <== NOT EXECUTED
a000b344: e12fff34 blx r4 <== NOT EXECUTED
a000b348: ea0000d0 b a000b690 <_Heap_Walk+0x4b4> <== NOT EXECUTED
);
return false;
}
if (
a000b34c: e59dc020 ldr ip, [sp, #32]
a000b350: e157000c cmp r7, ip
a000b354: 0a000005 beq a000b370 <_Heap_Walk+0x194>
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
a000b358: e1a00005 mov r0, r5 <== NOT EXECUTED
a000b35c: e3a01001 mov r1, #1 <== NOT EXECUTED
a000b360: e59f2378 ldr r2, [pc, #888] ; a000b6e0 <_Heap_Walk+0x504> <== NOT EXECUTED
a000b364: e12fff34 blx r4 <== NOT EXECUTED
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a000b368: e1a0800a mov r8, sl <== NOT EXECUTED
a000b36c: ea0000c7 b a000b690 <_Heap_Walk+0x4b4> <== NOT EXECUTED
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
a000b370: e596b010 ldr fp, [r6, #16]
block = next_block;
} while ( block != first_block );
return true;
}
a000b374: e5968008 ldr r8, [r6, #8]
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
a000b378: e1a0a006 mov sl, r6
a000b37c: ea000032 b a000b44c <_Heap_Walk+0x270>
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;
a000b380: e5963020 ldr r3, [r6, #32]
a000b384: e1530008 cmp r3, r8
a000b388: 83a0c000 movhi ip, #0
a000b38c: 8a000003 bhi a000b3a0 <_Heap_Walk+0x1c4>
a000b390: e596c024 ldr ip, [r6, #36] ; 0x24
a000b394: e15c0008 cmp ip, r8
a000b398: 33a0c000 movcc ip, #0
a000b39c: 23a0c001 movcs ip, #1
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
if ( !_Heap_Is_block_in_heap( heap, free_block ) ) {
a000b3a0: e21cc0ff ands ip, ip, #255 ; 0xff
(*printer)(
a000b3a4: 01a00005 moveq r0, r5
a000b3a8: 03a01001 moveq r1, #1
a000b3ac: 059f2330 ldreq r2, [pc, #816] ; a000b6e4 <_Heap_Walk+0x508>
a000b3b0: 0a000012 beq a000b400 <_Heap_Walk+0x224>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
a000b3b4: e2880008 add r0, r8, #8
a000b3b8: e1a0100b mov r1, fp
a000b3bc: ebffe714 bl a0005014 <__umodsi3>
);
return false;
}
if (
a000b3c0: e250c000 subs ip, r0, #0
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
a000b3c4: 11a00005 movne r0, r5
a000b3c8: 13a01001 movne r1, #1
a000b3cc: 159f2314 ldrne r2, [pc, #788] ; a000b6e8 <_Heap_Walk+0x50c>
a000b3d0: 11a03008 movne r3, r8
a000b3d4: 1a0000b4 bne a000b6ac <_Heap_Walk+0x4d0>
- 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;
a000b3d8: e5983004 ldr r3, [r8, #4]
a000b3dc: e3c33001 bic r3, r3, #1
block = next_block;
} while ( block != first_block );
return true;
}
a000b3e0: e0883003 add r3, r8, r3
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;
a000b3e4: e5933004 ldr r3, [r3, #4]
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
a000b3e8: e2133001 ands r3, r3, #1
a000b3ec: e58d302c str r3, [sp, #44] ; 0x2c
a000b3f0: 0a000008 beq a000b418 <_Heap_Walk+0x23c>
(*printer)(
a000b3f4: e59f22f0 ldr r2, [pc, #752] ; a000b6ec <_Heap_Walk+0x510> <== NOT EXECUTED
a000b3f8: e1a00005 mov r0, r5 <== NOT EXECUTED
a000b3fc: e3a01001 mov r1, #1 <== NOT EXECUTED
a000b400: e1a03008 mov r3, r8 <== NOT EXECUTED
a000b404: e58dc01c str ip, [sp, #28] <== NOT EXECUTED
a000b408: e12fff34 blx r4 <== NOT EXECUTED
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a000b40c: e59dc01c ldr ip, [sp, #28] <== NOT EXECUTED
a000b410: e1a0800c mov r8, ip <== NOT EXECUTED
a000b414: ea00009d b a000b690 <_Heap_Walk+0x4b4> <== NOT EXECUTED
);
return false;
}
if ( free_block->prev != prev_block ) {
a000b418: e598300c ldr r3, [r8, #12]
a000b41c: e153000a cmp r3, sl
a000b420: 0a000007 beq a000b444 <_Heap_Walk+0x268>
(*printer)(
a000b424: e58d3000 str r3, [sp] <== NOT EXECUTED
a000b428: e1a00005 mov r0, r5 <== NOT EXECUTED
a000b42c: e1a03008 mov r3, r8 <== NOT EXECUTED
a000b430: e3a01001 mov r1, #1 <== NOT EXECUTED
a000b434: e59f22b4 ldr r2, [pc, #692] ; a000b6f0 <_Heap_Walk+0x514> <== NOT EXECUTED
a000b438: e12fff34 blx r4 <== NOT EXECUTED
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a000b43c: e59d802c ldr r8, [sp, #44] ; 0x2c <== NOT EXECUTED
a000b440: ea000092 b a000b690 <_Heap_Walk+0x4b4> <== NOT EXECUTED
return false;
}
prev_block = free_block;
free_block = free_block->next;
a000b444: e1a0a008 mov sl, r8
a000b448: e5988008 ldr r8, [r8, #8]
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 ) {
a000b44c: e1580006 cmp r8, r6
a000b450: 1affffca bne a000b380 <_Heap_Walk+0x1a4>
a000b454: ea000000 b a000b45c <_Heap_Walk+0x280>
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
a000b458: e1a07008 mov r7, r8
return true;
}
a000b45c: e5973004 ldr r3, [r7, #4]
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;
a000b460: e5962020 ldr r2, [r6, #32]
- 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;
a000b464: e3c3a001 bic sl, r3, #1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
a000b468: e087800a add r8, r7, sl
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;
a000b46c: e1520008 cmp r2, r8
a000b470: 83a0b000 movhi fp, #0
a000b474: 8a000003 bhi a000b488 <_Heap_Walk+0x2ac>
a000b478: e596b024 ldr fp, [r6, #36] ; 0x24
a000b47c: e15b0008 cmp fp, r8
a000b480: 33a0b000 movcc fp, #0
a000b484: 23a0b001 movcs fp, #1
bool const prev_used = _Heap_Is_prev_used( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
bool const is_not_last_block = block != last_block;
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
a000b488: e21bb0ff ands fp, fp, #255 ; 0xff
a000b48c: 1a000006 bne a000b4ac <_Heap_Walk+0x2d0>
(*printer)(
a000b490: e58d8000 str r8, [sp] <== NOT EXECUTED
a000b494: e1a00005 mov r0, r5 <== NOT EXECUTED
a000b498: e3a01001 mov r1, #1 <== NOT EXECUTED
a000b49c: e59f2250 ldr r2, [pc, #592] ; a000b6f4 <_Heap_Walk+0x518> <== NOT EXECUTED
a000b4a0: e1a03007 mov r3, r7 <== NOT EXECUTED
a000b4a4: e12fff34 blx r4 <== NOT EXECUTED
a000b4a8: ea000059 b a000b614 <_Heap_Walk+0x438> <== NOT EXECUTED
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;
a000b4ac: e59d2028 ldr r2, [sp, #40] ; 0x28
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
a000b4b0: e1a0000a mov r0, sl
a000b4b4: e1a01009 mov r1, r9
a000b4b8: e057b002 subs fp, r7, r2
a000b4bc: 13a0b001 movne fp, #1
a000b4c0: e58d301c str r3, [sp, #28]
a000b4c4: ebffe6d2 bl a0005014 <__umodsi3>
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
a000b4c8: e3500000 cmp r0, #0
a000b4cc: e59d301c ldr r3, [sp, #28]
a000b4d0: 0a000005 beq a000b4ec <_Heap_Walk+0x310>
a000b4d4: e35b0000 cmp fp, #0 <== NOT EXECUTED
(*printer)(
a000b4d8: 158da000 strne sl, [sp] <== NOT EXECUTED
a000b4dc: 11a00005 movne r0, r5 <== NOT EXECUTED
a000b4e0: 13a01001 movne r1, #1 <== NOT EXECUTED
a000b4e4: 159f220c ldrne r2, [pc, #524] ; a000b6f8 <_Heap_Walk+0x51c><== NOT EXECUTED
a000b4e8: 1a000013 bne a000b53c <_Heap_Walk+0x360> <== NOT EXECUTED
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
a000b4ec: e59dc024 ldr ip, [sp, #36] ; 0x24
a000b4f0: e15a000c cmp sl, ip
a000b4f4: 2a000008 bcs a000b51c <_Heap_Walk+0x340>
a000b4f8: e35b0000 cmp fp, #0 <== NOT EXECUTED
a000b4fc: 0a000006 beq a000b51c <_Heap_Walk+0x340> <== NOT EXECUTED
(*printer)(
a000b500: e88d1400 stm sp, {sl, ip} <== NOT EXECUTED
a000b504: e1a00005 mov r0, r5 <== NOT EXECUTED
a000b508: e3a01001 mov r1, #1 <== NOT EXECUTED
a000b50c: e59f21e8 ldr r2, [pc, #488] ; a000b6fc <_Heap_Walk+0x520> <== NOT EXECUTED
a000b510: e1a03007 mov r3, r7 <== NOT EXECUTED
a000b514: e12fff34 blx r4 <== NOT EXECUTED
a000b518: ea000064 b a000b6b0 <_Heap_Walk+0x4d4> <== NOT EXECUTED
);
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
a000b51c: e1580007 cmp r8, r7
a000b520: 8a000008 bhi a000b548 <_Heap_Walk+0x36c>
a000b524: e35b0000 cmp fp, #0
a000b528: 0a000006 beq a000b548 <_Heap_Walk+0x36c>
(*printer)(
a000b52c: e59f21cc ldr r2, [pc, #460] ; a000b700 <_Heap_Walk+0x524> <== NOT EXECUTED
a000b530: e58d8000 str r8, [sp] <== NOT EXECUTED
a000b534: e1a00005 mov r0, r5 <== NOT EXECUTED
a000b538: e3a01001 mov r1, #1 <== NOT EXECUTED
a000b53c: e1a03007 mov r3, r7 <== NOT EXECUTED
a000b540: e12fff34 blx r4 <== NOT EXECUTED
a000b544: ea000059 b a000b6b0 <_Heap_Walk+0x4d4> <== NOT EXECUTED
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;
a000b548: e203b001 and fp, r3, #1
a000b54c: e5983004 ldr r3, [r8, #4]
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
a000b550: e3130001 tst r3, #1
a000b554: 1a000038 bne a000b63c <_Heap_Walk+0x460>
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 ?
a000b558: e597200c ldr r2, [r7, #12]
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)(
a000b55c: e5963008 ldr r3, [r6, #8]
block = next_block;
} while ( block != first_block );
return true;
}
a000b560: e596100c ldr r1, [r6, #12]
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)(
a000b564: e1520003 cmp r2, r3
a000b568: 059f0194 ldreq r0, [pc, #404] ; a000b704 <_Heap_Walk+0x528>
a000b56c: 0a000003 beq a000b580 <_Heap_Walk+0x3a4>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
a000b570: e59f3190 ldr r3, [pc, #400] ; a000b708 <_Heap_Walk+0x52c>
a000b574: e1520006 cmp r2, r6
a000b578: e59f018c ldr r0, [pc, #396] ; a000b70c <_Heap_Walk+0x530>
a000b57c: 01a00003 moveq r0, r3
block->next,
block->next == last_free_block ?
a000b580: e5973008 ldr r3, [r7, #8]
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
a000b584: e1530001 cmp r3, r1
a000b588: 059f1180 ldreq r1, [pc, #384] ; a000b710 <_Heap_Walk+0x534>
a000b58c: 0a000003 beq a000b5a0 <_Heap_Walk+0x3c4>
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
a000b590: e59fc17c ldr ip, [pc, #380] ; a000b714 <_Heap_Walk+0x538>
a000b594: e1530006 cmp r3, r6
a000b598: e59f116c ldr r1, [pc, #364] ; a000b70c <_Heap_Walk+0x530>
a000b59c: 01a0100c moveq r1, ip
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)(
a000b5a0: e58d2004 str r2, [sp, #4]
a000b5a4: e58d0008 str r0, [sp, #8]
a000b5a8: e58d300c str r3, [sp, #12]
a000b5ac: e58d1010 str r1, [sp, #16]
a000b5b0: e1a03007 mov r3, r7
a000b5b4: e58da000 str sl, [sp]
a000b5b8: e1a00005 mov r0, r5
a000b5bc: e3a01000 mov r1, #0
a000b5c0: e59f2150 ldr r2, [pc, #336] ; a000b718 <_Heap_Walk+0x53c>
a000b5c4: e12fff34 blx r4
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
a000b5c8: e5983000 ldr r3, [r8]
a000b5cc: e15a0003 cmp sl, r3
a000b5d0: 0a000008 beq a000b5f8 <_Heap_Walk+0x41c>
(*printer)(
a000b5d4: e58d3004 str r3, [sp, #4] <== NOT EXECUTED
a000b5d8: e58da000 str sl, [sp] <== NOT EXECUTED
a000b5dc: e58d8008 str r8, [sp, #8] <== NOT EXECUTED
a000b5e0: e1a00005 mov r0, r5 <== NOT EXECUTED
a000b5e4: e3a01001 mov r1, #1 <== NOT EXECUTED
a000b5e8: e59f212c ldr r2, [pc, #300] ; a000b71c <_Heap_Walk+0x540> <== NOT EXECUTED
a000b5ec: e1a03007 mov r3, r7 <== NOT EXECUTED
a000b5f0: e12fff34 blx r4 <== NOT EXECUTED
a000b5f4: ea00002d b a000b6b0 <_Heap_Walk+0x4d4> <== NOT EXECUTED
);
return false;
}
if ( !prev_used ) {
a000b5f8: e35b0000 cmp fp, #0
a000b5fc: 1a000006 bne a000b61c <_Heap_Walk+0x440>
(*printer)(
a000b600: e59f2118 ldr r2, [pc, #280] ; a000b720 <_Heap_Walk+0x544> <== NOT EXECUTED
a000b604: e1a00005 mov r0, r5 <== NOT EXECUTED
a000b608: e3a01001 mov r1, #1 <== NOT EXECUTED
a000b60c: e1a03007 mov r3, r7 <== NOT EXECUTED
a000b610: e12fff34 blx r4 <== NOT EXECUTED
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
a000b614: e1a0800b mov r8, fp <== NOT EXECUTED
a000b618: ea00001c b a000b690 <_Heap_Walk+0x4b4> <== NOT EXECUTED
block = next_block;
} while ( block != first_block );
return true;
}
a000b61c: e5963008 ldr r3, [r6, #8]
a000b620: ea000002 b a000b630 <_Heap_Walk+0x454>
{
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *free_block = _Heap_Free_list_first( heap );
while ( free_block != free_list_tail ) {
if ( free_block == block ) {
a000b624: e1530007 cmp r3, r7
a000b628: 0a000014 beq a000b680 <_Heap_Walk+0x4a4>
return true;
}
free_block = free_block->next;
a000b62c: e5933008 ldr r3, [r3, #8]
)
{
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 ) {
a000b630: e1530006 cmp r3, r6
a000b634: 1afffffa bne a000b624 <_Heap_Walk+0x448>
a000b638: ea000017 b a000b69c <_Heap_Walk+0x4c0> <== NOT EXECUTED
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
a000b63c: e35b0000 cmp fp, #0
a000b640: 0a000006 beq a000b660 <_Heap_Walk+0x484>
(*printer)(
a000b644: e58da000 str sl, [sp]
a000b648: e1a00005 mov r0, r5
a000b64c: e3a01000 mov r1, #0
a000b650: e59f20cc ldr r2, [pc, #204] ; a000b724 <_Heap_Walk+0x548>
a000b654: e1a03007 mov r3, r7
a000b658: e12fff34 blx r4
a000b65c: ea000007 b a000b680 <_Heap_Walk+0x4a4>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
a000b660: e58da000 str sl, [sp]
a000b664: e5973000 ldr r3, [r7]
a000b668: e1a00005 mov r0, r5
a000b66c: e1a0100b mov r1, fp
a000b670: e58d3004 str r3, [sp, #4]
a000b674: e59f20ac ldr r2, [pc, #172] ; a000b728 <_Heap_Walk+0x54c>
a000b678: e1a03007 mov r3, r7
a000b67c: e12fff34 blx r4
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
a000b680: e59d2020 ldr r2, [sp, #32]
a000b684: e1580002 cmp r8, r2
a000b688: 1affff72 bne a000b458 <_Heap_Walk+0x27c>
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
a000b68c: e3a08001 mov r8, #1
block = next_block;
} while ( block != first_block );
return true;
}
a000b690: e1a00008 mov r0, r8
a000b694: e28dd030 add sp, sp, #48 ; 0x30
a000b698: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
a000b69c: e59f2088 ldr r2, [pc, #136] ; a000b72c <_Heap_Walk+0x550> <== NOT EXECUTED
a000b6a0: e1a00005 mov r0, r5 <== NOT EXECUTED
a000b6a4: e3a01001 mov r1, #1 <== NOT EXECUTED
a000b6a8: e1a03007 mov r3, r7 <== NOT EXECUTED
a000b6ac: e12fff34 blx r4
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
a000b6b0: e3a08000 mov r8, #0
a000b6b4: eafffff5 b a000b690 <_Heap_Walk+0x4b4>
a000b198 <_Heap_Walk_print>:
static void _Heap_Walk_print( int source, bool error, const char *fmt, ... )
{
a000b198: e92d000c push {r2, r3} <== NOT EXECUTED
a000b19c: e92d4001 push {r0, lr} <== NOT EXECUTED
a000b1a0: e1a03000 mov r3, r0 <== NOT EXECUTED
va_list ap;
if ( error ) {
a000b1a4: e31100ff tst r1, #255 ; 0xff <== NOT EXECUTED
printk( "FAIL[%d]: ", source );
a000b1a8: 159f0024 ldrne r0, [pc, #36] ; a000b1d4 <_Heap_Walk_print+0x3c><== NOT EXECUTED
} else {
printk( "PASS[%d]: ", source );
a000b1ac: 059f0024 ldreq r0, [pc, #36] ; a000b1d8 <_Heap_Walk_print+0x40><== NOT EXECUTED
a000b1b0: e1a01003 mov r1, r3 <== NOT EXECUTED
a000b1b4: ebfff179 bl a00077a0 <printk> <== NOT EXECUTED
}
va_start( ap, fmt );
a000b1b8: e28d100c add r1, sp, #12 <== NOT EXECUTED
vprintk( fmt, ap );
a000b1bc: e59d0008 ldr r0, [sp, #8] <== NOT EXECUTED
printk( "FAIL[%d]: ", source );
} else {
printk( "PASS[%d]: ", source );
}
va_start( ap, fmt );
a000b1c0: e58d1000 str r1, [sp] <== NOT EXECUTED
vprintk( fmt, ap );
a000b1c4: ebfff842 bl a00092d4 <vprintk> <== NOT EXECUTED
va_end( ap );
}
a000b1c8: e8bd4008 pop {r3, lr} <== NOT EXECUTED
a000b1cc: e28dd008 add sp, sp, #8 <== NOT EXECUTED
a000b1d0: e12fff1e bx lr <== NOT EXECUTED
a000a5fc <_Internal_error_Occurred>:
bool is_internal,
Internal_errors_t the_error
)
{
_Internal_errors_What_happened.the_source = the_source;
a000a5fc: e59f3038 ldr r3, [pc, #56] ; a000a63c <_Internal_error_Occurred+0x40>
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
a000a600: e20110ff and r1, r1, #255 ; 0xff
a000a604: e52de004 push {lr} ; (str lr, [sp, #-4]!)
_Internal_errors_What_happened.the_source = the_source;
a000a608: e5830000 str r0, [r3]
_Internal_errors_What_happened.is_internal = is_internal;
a000a60c: e5c31004 strb r1, [r3, #4]
_Internal_errors_What_happened.the_error = the_error;
a000a610: e5832008 str r2, [r3, #8]
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
a000a614: e1a04002 mov r4, r2
_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 );
a000a618: eb000717 bl a000c27c <_User_extensions_Fatal>
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
a000a61c: e59f301c ldr r3, [pc, #28] ; a000a640 <_Internal_error_Occurred+0x44><== NOT EXECUTED
a000a620: e3a02005 mov r2, #5 <== NOT EXECUTED
a000a624: e5832000 str r2, [r3] <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000a628: e10f2000 mrs r2, CPSR <== NOT EXECUTED
a000a62c: e3823080 orr r3, r2, #128 ; 0x80 <== NOT EXECUTED
a000a630: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
a000a634: e1a00004 mov r0, r4 <== NOT EXECUTED
a000a638: eafffffe b a000a638 <_Internal_error_Occurred+0x3c> <== NOT EXECUTED
a000aa08 <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint16_t the_class
)
{
a000aa08: e1a01801 lsl r1, r1, #16
a000aa0c: e92d4030 push {r4, r5, lr}
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
a000aa10: e1b05821 lsrs r5, r1, #16
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint16_t the_class
)
{
a000aa14: e1a04000 mov r4, r0
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
a000aa18: 0a000010 beq a000aa60 <_Objects_Get_information+0x58>
/*
* 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 );
a000aa1c: eb000fd9 bl a000e988 <_Objects_API_maximum_class>
if ( the_class_api_maximum == 0 )
a000aa20: e3500000 cmp r0, #0
a000aa24: 0a00000f beq a000aa68 <_Objects_Get_information+0x60>
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
a000aa28: e1550000 cmp r5, r0
return NULL;
a000aa2c: 83a00000 movhi r0, #0
*/
the_class_api_maximum = _Objects_API_maximum_class( the_api );
if ( the_class_api_maximum == 0 )
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
a000aa30: 8a00000c bhi a000aa68 <_Objects_Get_information+0x60>
return NULL;
if ( !_Objects_Information_table[ the_api ] )
a000aa34: e59f3030 ldr r3, [pc, #48] ; a000aa6c <_Objects_Get_information+0x64>
a000aa38: e7930104 ldr r0, [r3, r4, lsl #2]
a000aa3c: e3500000 cmp r0, #0
a000aa40: 0a000008 beq a000aa68 <_Objects_Get_information+0x60>
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
a000aa44: e7900105 ldr r0, [r0, r5, lsl #2]
if ( !info )
a000aa48: e3500000 cmp r0, #0
a000aa4c: 0a000005 beq a000aa68 <_Objects_Get_information+0x60>
* In a multprocessing configuration, we may access remote objects.
* Thus we may have 0 local instances and still have a valid object
* pointer.
*/
#if !defined(RTEMS_MULTIPROCESSING)
if ( info->maximum == 0 )
a000aa50: e1d031b0 ldrh r3, [r0, #16]
return NULL;
a000aa54: e3530000 cmp r3, #0
a000aa58: 03a00000 moveq r0, #0
a000aa5c: e8bd8030 pop {r4, r5, pc}
{
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
return NULL;
a000aa60: e1a00005 mov r0, r5 <== NOT EXECUTED
a000aa64: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
if ( info->maximum == 0 )
return NULL;
#endif
return info;
}
a000aa68: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
a000aa70 <_Objects_Get_isr_disable>:
{
Objects_Control *the_object;
uint32_t index;
ISR_Level level;
index = id - information->minimum_id + 1;
a000aa70: e590c008 ldr ip, [r0, #8]
Objects_Information *information,
Objects_Id id,
Objects_Locations *location,
ISR_Level *level_p
)
{
a000aa74: e92d4010 push {r4, lr}
Objects_Control *the_object;
uint32_t index;
ISR_Level level;
index = id - information->minimum_id + 1;
a000aa78: e26cc001 rsb ip, ip, #1
a000aa7c: e08c1001 add r1, ip, r1
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000aa80: e10f4000 mrs r4, CPSR
a000aa84: e384c080 orr ip, r4, #128 ; 0x80
a000aa88: e129f00c msr CPSR_fc, ip
_ISR_Disable( level );
if ( information->maximum >= index ) {
a000aa8c: e1d0c1b0 ldrh ip, [r0, #16]
a000aa90: e15c0001 cmp ip, r1
a000aa94: 3a00000b bcc a000aac8 <_Objects_Get_isr_disable+0x58>
if ( (the_object = information->local_table[ index ]) != NULL ) {
a000aa98: e590001c ldr r0, [r0, #28]
a000aa9c: e7900101 ldr r0, [r0, r1, lsl #2]
a000aaa0: e3500000 cmp r0, #0
a000aaa4: 0a000003 beq a000aab8 <_Objects_Get_isr_disable+0x48>
*location = OBJECTS_LOCAL;
a000aaa8: e3a01000 mov r1, #0
a000aaac: e5821000 str r1, [r2]
*level_p = level;
a000aab0: e5834000 str r4, [r3]
return the_object;
a000aab4: e8bd8010 pop {r4, pc}
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000aab8: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED
}
_ISR_Enable( level );
*location = OBJECTS_ERROR;
a000aabc: e3a03001 mov r3, #1 <== NOT EXECUTED
a000aac0: e5823000 str r3, [r2] <== NOT EXECUTED
return NULL;
a000aac4: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a000aac8: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED
}
_ISR_Enable( level );
*location = OBJECTS_ERROR;
a000aacc: e3a03001 mov r3, #1 <== NOT EXECUTED
a000aad0: e5823000 str r3, [r2] <== NOT EXECUTED
#if defined(RTEMS_MULTIPROCESSING)
_Objects_MP_Is_remote( information, id, location, &the_object );
return the_object;
#else
return NULL;
a000aad4: e3a00000 mov r0, #0 <== NOT EXECUTED
#endif
}
a000aad8: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a000c518 <_Objects_Get_name_as_string>:
char *_Objects_Get_name_as_string(
Objects_Id id,
size_t length,
char *name
)
{
a000c518: e92d4077 push {r0, r1, r2, r4, r5, r6, lr} <== NOT EXECUTED
char lname[5];
Objects_Control *the_object;
Objects_Locations location;
Objects_Id tmpId;
if ( length == 0 )
a000c51c: e2515000 subs r5, r1, #0 <== NOT EXECUTED
char *_Objects_Get_name_as_string(
Objects_Id id,
size_t length,
char *name
)
{
a000c520: e1a04002 mov r4, r2 <== NOT EXECUTED
Objects_Control *the_object;
Objects_Locations location;
Objects_Id tmpId;
if ( length == 0 )
return NULL;
a000c524: 01a04005 moveq r4, r5 <== NOT EXECUTED
char lname[5];
Objects_Control *the_object;
Objects_Locations location;
Objects_Id tmpId;
if ( length == 0 )
a000c528: 0a00002e beq a000c5e8 <_Objects_Get_name_as_string+0xd0> <== NOT EXECUTED
return NULL;
if ( name == NULL )
a000c52c: e3540000 cmp r4, #0 <== NOT EXECUTED
a000c530: 0a00002c beq a000c5e8 <_Objects_Get_name_as_string+0xd0> <== NOT EXECUTED
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
a000c534: e3500000 cmp r0, #0 <== NOT EXECUTED
a000c538: 059f30b0 ldreq r3, [pc, #176] ; a000c5f0 <_Objects_Get_name_as_string+0xd8><== NOT EXECUTED
a000c53c: 11a06000 movne r6, r0 <== NOT EXECUTED
a000c540: 05933004 ldreq r3, [r3, #4] <== NOT EXECUTED
a000c544: 05936008 ldreq r6, [r3, #8] <== NOT EXECUTED
information = _Objects_Get_information_id( tmpId );
a000c548: e1a00006 mov r0, r6 <== NOT EXECUTED
a000c54c: ebffffb7 bl a000c430 <_Objects_Get_information_id> <== NOT EXECUTED
if ( !information )
a000c550: e2503000 subs r3, r0, #0 <== NOT EXECUTED
return NULL;
a000c554: 01a04003 moveq r4, r3 <== NOT EXECUTED
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
information = _Objects_Get_information_id( tmpId );
if ( !information )
a000c558: 0a000022 beq a000c5e8 <_Objects_Get_name_as_string+0xd0> <== NOT EXECUTED
return NULL;
the_object = _Objects_Get( information, tmpId, &location );
a000c55c: e1a01006 mov r1, r6 <== NOT EXECUTED
a000c560: e28d2008 add r2, sp, #8 <== NOT EXECUTED
a000c564: eb000023 bl a000c5f8 <_Objects_Get> <== NOT EXECUTED
switch ( location ) {
a000c568: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
a000c56c: e3530000 cmp r3, #0 <== NOT EXECUTED
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE:
/* not supported */
#endif
case OBJECTS_ERROR:
return NULL;
a000c570: 13a04000 movne r4, #0 <== NOT EXECUTED
information = _Objects_Get_information_id( tmpId );
if ( !information )
return NULL;
the_object = _Objects_Get( information, tmpId, &location );
switch ( location ) {
a000c574: 1a00001b bne a000c5e8 <_Objects_Get_name_as_string+0xd0> <== NOT EXECUTED
if ( information->is_string ) {
s = the_object->name.name_p;
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
a000c578: e590200c ldr r2, [r0, #12] <== NOT EXECUTED
lname[ 0 ] = (u32_name >> 24) & 0xff;
lname[ 1 ] = (u32_name >> 16) & 0xff;
lname[ 2 ] = (u32_name >> 8) & 0xff;
lname[ 3 ] = (u32_name >> 0) & 0xff;
lname[ 4 ] = '\0';
a000c57c: e5cd3004 strb r3, [sp, #4] <== NOT EXECUTED
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
a000c580: e2455001 sub r5, r5, #1 <== NOT EXECUTED
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
a000c584: e1a01c22 lsr r1, r2, #24 <== NOT EXECUTED
a000c588: e5cd1000 strb r1, [sp] <== NOT EXECUTED
lname[ 1 ] = (u32_name >> 16) & 0xff;
a000c58c: e1a01822 lsr r1, r2, #16 <== NOT EXECUTED
a000c590: e5cd1001 strb r1, [sp, #1] <== NOT EXECUTED
lname[ 2 ] = (u32_name >> 8) & 0xff;
a000c594: e1a01422 lsr r1, r2, #8 <== NOT EXECUTED
lname[ 3 ] = (u32_name >> 0) & 0xff;
a000c598: e5cd2003 strb r2, [sp, #3] <== NOT EXECUTED
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
lname[ 1 ] = (u32_name >> 16) & 0xff;
lname[ 2 ] = (u32_name >> 8) & 0xff;
a000c59c: e5cd1002 strb r1, [sp, #2] <== NOT EXECUTED
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
a000c5a0: e1a02004 mov r2, r4 <== NOT EXECUTED
*d = (isprint((unsigned char)*s)) ? *s : '*';
a000c5a4: e59f0048 ldr r0, [pc, #72] ; a000c5f4 <_Objects_Get_name_as_string+0xdc><== NOT EXECUTED
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
a000c5a8: ea000006 b a000c5c8 <_Objects_Get_name_as_string+0xb0> <== NOT EXECUTED
*d = (isprint((unsigned char)*s)) ? *s : '*';
a000c5ac: e590c000 ldr ip, [r0] <== NOT EXECUTED
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
a000c5b0: e2833001 add r3, r3, #1 <== NOT EXECUTED
*d = (isprint((unsigned char)*s)) ? *s : '*';
a000c5b4: e08cc001 add ip, ip, r1 <== NOT EXECUTED
a000c5b8: e5dcc001 ldrb ip, [ip, #1] <== NOT EXECUTED
a000c5bc: e31c0097 tst ip, #151 ; 0x97 <== NOT EXECUTED
a000c5c0: 03a0102a moveq r1, #42 ; 0x2a <== NOT EXECUTED
a000c5c4: e4c21001 strb r1, [r2], #1 <== NOT EXECUTED
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
a000c5c8: e1530005 cmp r3, r5 <== NOT EXECUTED
a000c5cc: 2a000002 bcs a000c5dc <_Objects_Get_name_as_string+0xc4> <== NOT EXECUTED
a000c5d0: e7dd1003 ldrb r1, [sp, r3] <== NOT EXECUTED
a000c5d4: e3510000 cmp r1, #0 <== NOT EXECUTED
a000c5d8: 1afffff3 bne a000c5ac <_Objects_Get_name_as_string+0x94> <== NOT EXECUTED
*d = (isprint((unsigned char)*s)) ? *s : '*';
}
}
*d = '\0';
a000c5dc: e3a03000 mov r3, #0 <== NOT EXECUTED
a000c5e0: e5c23000 strb r3, [r2] <== NOT EXECUTED
_Thread_Enable_dispatch();
a000c5e4: eb0002b0 bl a000d0ac <_Thread_Enable_dispatch> <== NOT EXECUTED
return name;
}
return NULL; /* unreachable path */
}
a000c5e8: e1a00004 mov r0, r4 <== NOT EXECUTED
a000c5ec: e8bd807e pop {r1, r2, r3, r4, r5, r6, pc} <== NOT EXECUTED
a001abd4 <_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;
a001abd4: e5903008 ldr r3, [r0, #8]
a001abd8: e2633001 rsb r3, r3, #1
a001abdc: e0833001 add r3, r3, r1
if ( information->maximum >= index ) {
a001abe0: e1d011b0 ldrh r1, [r0, #16]
a001abe4: e1510003 cmp r1, r3
a001abe8: 3a000005 bcc a001ac04 <_Objects_Get_no_protection+0x30>
if ( (the_object = information->local_table[ index ]) != NULL ) {
a001abec: e590101c ldr r1, [r0, #28]
a001abf0: e7910103 ldr r0, [r1, r3, lsl #2]
a001abf4: e3500000 cmp r0, #0
*location = OBJECTS_LOCAL;
a001abf8: 13a03000 movne r3, #0
a001abfc: 15823000 strne r3, [r2]
* by a value between 1 and maximum.
*/
index = id - information->minimum_id + 1;
if ( information->maximum >= index ) {
if ( (the_object = information->local_table[ index ]) != NULL ) {
a001ac00: 112fff1e bxne lr
/*
* This isn't supported or required yet for Global objects so
* if it isn't local, we don't find it.
*/
*location = OBJECTS_ERROR;
a001ac04: e3a03001 mov r3, #1
a001ac08: e5823000 str r3, [r2]
return NULL;
a001ac0c: e3a00000 mov r0, #0
}
a001ac10: e12fff1e bx lr <== NOT EXECUTED
a000c040 <_Objects_Id_to_name>:
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
a000c040: e92d4011 push {r0, r4, lr}
a000c044: e1a04001 mov r4, r1
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
a000c048: e2501000 subs r1, r0, #0
a000c04c: 059f306c ldreq r3, [pc, #108] ; a000c0c0 <_Objects_Id_to_name+0x80>
a000c050: 05933004 ldreq r3, [r3, #4]
a000c054: 05931008 ldreq r1, [r3, #8]
a000c058: e1a03c21 lsr r3, r1, #24
a000c05c: e2033007 and r3, r3, #7
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
a000c060: e2432001 sub r2, r3, #1
a000c064: e3520002 cmp r2, #2
a000c068: 8a00000d bhi a000c0a4 <_Objects_Id_to_name+0x64>
a000c06c: ea00000e b a000c0ac <_Objects_Id_to_name+0x6c>
*/
RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class(
Objects_Id id
)
{
return (uint32_t)
a000c070: e1a02da1 lsr r2, r1, #27
if ( !_Objects_Information_table[ the_api ] )
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
a000c074: e7930102 ldr r0, [r3, r2, lsl #2]
if ( !information )
a000c078: e3500000 cmp r0, #0
a000c07c: 0a000008 beq a000c0a4 <_Objects_Id_to_name+0x64>
#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 );
a000c080: e1a0200d mov r2, sp
a000c084: ebffffd3 bl a000bfd8 <_Objects_Get>
if ( !the_object )
a000c088: e3500000 cmp r0, #0
a000c08c: 0a000004 beq a000c0a4 <_Objects_Id_to_name+0x64>
return OBJECTS_INVALID_ID;
*name = the_object->name;
a000c090: e590300c ldr r3, [r0, #12]
a000c094: e5843000 str r3, [r4]
_Thread_Enable_dispatch();
a000c098: eb0002c1 bl a000cba4 <_Thread_Enable_dispatch>
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
a000c09c: e3a00000 mov r0, #0 <== NOT EXECUTED
a000c0a0: ea000000 b a000c0a8 <_Objects_Id_to_name+0x68> <== NOT EXECUTED
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
return OBJECTS_INVALID_ID;
a000c0a4: e3a00003 mov r0, #3
return OBJECTS_INVALID_ID;
*name = the_object->name;
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
}
a000c0a8: e8bd8018 pop {r3, r4, pc}
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
a000c0ac: e59f2010 ldr r2, [pc, #16] ; a000c0c4 <_Objects_Id_to_name+0x84>
a000c0b0: e7923103 ldr r3, [r2, r3, lsl #2]
a000c0b4: e3530000 cmp r3, #0
a000c0b8: 1affffec bne a000c070 <_Objects_Id_to_name+0x30>
a000c0bc: eafffff8 b a000c0a4 <_Objects_Id_to_name+0x64>
a000ac28 <_Objects_Name_to_id_u32>:
Objects_Name name_for_mp;
#endif
/* ASSERT: information->is_string == false */
if ( !id )
a000ac28: e3530000 cmp r3, #0
Objects_Information *information,
uint32_t name,
uint32_t node,
Objects_Id *id
)
{
a000ac2c: e92d4030 push {r4, r5, lr}
Objects_Name name_for_mp;
#endif
/* ASSERT: information->is_string == false */
if ( !id )
a000ac30: 0a00001a beq a000aca0 <_Objects_Name_to_id_u32+0x78>
return OBJECTS_INVALID_ADDRESS;
if ( name == 0 )
a000ac34: e3510000 cmp r1, #0
a000ac38: 0a00001a beq a000aca8 <_Objects_Name_to_id_u32+0x80>
return OBJECTS_INVALID_NAME;
search_local_node = false;
if ( information->maximum != 0 &&
a000ac3c: e1d041b0 ldrh r4, [r0, #16]
a000ac40: e3540000 cmp r4, #0
a000ac44: 0a000019 beq a000acb0 <_Objects_Name_to_id_u32+0x88>
a000ac48: e3720106 cmn r2, #-2147483647 ; 0x80000001
a000ac4c: 13520000 cmpne r2, #0
a000ac50: 03a02001 moveq r2, #1
a000ac54: 0a00000e beq a000ac94 <_Objects_Name_to_id_u32+0x6c>
(node == OBJECTS_SEARCH_ALL_NODES ||
node == OBJECTS_SEARCH_LOCAL_NODE ||
a000ac58: e3520001 cmp r2, #1
a000ac5c: 1a000011 bne a000aca8 <_Objects_Name_to_id_u32+0x80>
a000ac60: ea00000b b a000ac94 <_Objects_Name_to_id_u32+0x6c>
))
search_local_node = true;
if ( search_local_node ) {
for ( index = 1; index <= information->maximum; index++ ) {
the_object = information->local_table[ index ];
a000ac64: e590c01c ldr ip, [r0, #28]
a000ac68: e79cc102 ldr ip, [ip, r2, lsl #2]
if ( !the_object )
a000ac6c: e35c0000 cmp ip, #0
a000ac70: 0a000006 beq a000ac90 <_Objects_Name_to_id_u32+0x68>
continue;
if ( name == the_object->name.name_u32 ) {
a000ac74: e59c500c ldr r5, [ip, #12]
a000ac78: e1510005 cmp r1, r5
a000ac7c: 1a000003 bne a000ac90 <_Objects_Name_to_id_u32+0x68>
*id = the_object->id;
a000ac80: e59c2008 ldr r2, [ip, #8]
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
a000ac84: e3a00000 mov r0, #0
the_object = information->local_table[ index ];
if ( !the_object )
continue;
if ( name == the_object->name.name_u32 ) {
*id = the_object->id;
a000ac88: e5832000 str r2, [r3]
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
a000ac8c: e8bd8030 pop {r4, r5, pc}
_Objects_Is_local_node( node )
))
search_local_node = true;
if ( search_local_node ) {
for ( index = 1; index <= information->maximum; index++ ) {
a000ac90: e2822001 add r2, r2, #1
a000ac94: e1520004 cmp r2, r4
a000ac98: 9afffff1 bls a000ac64 <_Objects_Name_to_id_u32+0x3c>
a000ac9c: ea000001 b a000aca8 <_Objects_Name_to_id_u32+0x80> <== NOT EXECUTED
#endif
/* ASSERT: information->is_string == false */
if ( !id )
return OBJECTS_INVALID_ADDRESS;
a000aca0: e3a00002 mov r0, #2 <== NOT EXECUTED
a000aca4: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
if ( name == 0 )
return OBJECTS_INVALID_NAME;
a000aca8: e3a00001 mov r0, #1 <== NOT EXECUTED
a000acac: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
return OBJECTS_INVALID_NAME;
name_for_mp.name_u32 = name;
return _Objects_MP_Global_name_search( information, name_for_mp, node, id );
#else
return OBJECTS_INVALID_NAME;
a000acb0: e3a00001 mov r0, #1 <== NOT EXECUTED
#endif
}
a000acb4: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
a000cee0 <_Objects_Set_name>:
bool _Objects_Set_name(
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
a000cee0: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
a000cee4: e1a04001 mov r4, r1 <== NOT EXECUTED
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
a000cee8: e1d013b8 ldrh r1, [r0, #56] ; 0x38 <== NOT EXECUTED
a000ceec: e1a00002 mov r0, r2 <== NOT EXECUTED
bool _Objects_Set_name(
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
a000cef0: e1a05002 mov r5, r2 <== NOT EXECUTED
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
a000cef4: eb001bbb bl a0013de8 <strnlen> <== NOT EXECUTED
d[length] = '\0';
the_object->name.name_p = d;
} else
#endif
{
the_object->name.name_u32 = _Objects_Build_name(
a000cef8: e3500001 cmp r0, #1 <== NOT EXECUTED
a000cefc: 85d53001 ldrbhi r3, [r5, #1] <== NOT EXECUTED
a000cf00: e5d52000 ldrb r2, [r5] <== NOT EXECUTED
a000cf04: 93a03602 movls r3, #2097152 ; 0x200000 <== NOT EXECUTED
a000cf08: 81a03803 lslhi r3, r3, #16 <== NOT EXECUTED
a000cf0c: e1a02c02 lsl r2, r2, #24 <== NOT EXECUTED
a000cf10: e3500002 cmp r0, #2 <== NOT EXECUTED
a000cf14: e1832002 orr r2, r3, r2 <== NOT EXECUTED
a000cf18: 85d53002 ldrbhi r3, [r5, #2] <== NOT EXECUTED
a000cf1c: 93a03a02 movls r3, #8192 ; 0x2000 <== NOT EXECUTED
a000cf20: 81a03403 lslhi r3, r3, #8 <== NOT EXECUTED
a000cf24: e3500003 cmp r0, #3 <== NOT EXECUTED
a000cf28: e1822003 orr r2, r2, r3 <== NOT EXECUTED
a000cf2c: 85d53003 ldrbhi r3, [r5, #3] <== NOT EXECUTED
a000cf30: 93a03020 movls r3, #32 <== NOT EXECUTED
);
}
return true;
}
a000cf34: e3a00001 mov r0, #1 <== NOT EXECUTED
d[length] = '\0';
the_object->name.name_p = d;
} else
#endif
{
the_object->name.name_u32 = _Objects_Build_name(
a000cf38: e1823003 orr r3, r2, r3 <== NOT EXECUTED
a000cf3c: e584300c str r3, [r4, #12] <== NOT EXECUTED
);
}
return true;
}
a000cf40: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
a000b490 <_Protected_heap_Get_information>:
bool _Protected_heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
a000b490: e92d4070 push {r4, r5, r6, lr}
if ( !the_heap )
a000b494: e2506000 subs r6, r0, #0
bool _Protected_heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
a000b498: e1a05001 mov r5, r1
if ( !the_heap )
a000b49c: 0a00000b beq a000b4d0 <_Protected_heap_Get_information+0x40>
return false;
if ( !the_info )
a000b4a0: e3510000 cmp r1, #0
a000b4a4: 0a00000b beq a000b4d8 <_Protected_heap_Get_information+0x48>
return false;
_RTEMS_Lock_allocator();
a000b4a8: e59f4030 ldr r4, [pc, #48] ; a000b4e0 <_Protected_heap_Get_information+0x50>
a000b4ac: e5940000 ldr r0, [r4]
a000b4b0: ebfffbb4 bl a000a388 <_API_Mutex_Lock>
_Heap_Get_information( the_heap, the_info );
a000b4b4: e1a00006 mov r0, r6
a000b4b8: e1a01005 mov r1, r5
a000b4bc: eb000fa7 bl a000f360 <_Heap_Get_information>
_RTEMS_Unlock_allocator();
a000b4c0: e5940000 ldr r0, [r4]
a000b4c4: ebfffbc8 bl a000a3ec <_API_Mutex_Unlock>
return true;
a000b4c8: e3a00001 mov r0, #1
a000b4cc: e8bd8070 pop {r4, r5, r6, pc}
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
if ( !the_heap )
return false;
a000b4d0: e1a00006 mov r0, r6
a000b4d4: e8bd8070 pop {r4, r5, r6, pc}
if ( !the_info )
return false;
a000b4d8: e1a00001 mov r0, r1
_RTEMS_Lock_allocator();
_Heap_Get_information( the_heap, the_info );
_RTEMS_Unlock_allocator();
return true;
}
a000b4dc: e8bd8070 pop {r4, r5, r6, pc}
a000ff00 <_Protected_heap_Walk>:
* then it is forbidden to lock a mutex. But since we are inside
* a critical section, it should be safe to walk it unlocked.
*
* NOTE: Dispatching is also disabled during initialization.
*/
if ( !_Thread_Dispatch_disable_level ) {
a000ff00: e59f3054 ldr r3, [pc, #84] ; a000ff5c <_Protected_heap_Walk+0x5c><== NOT EXECUTED
bool _Protected_heap_Walk(
Heap_Control *the_heap,
int source,
bool do_dump
)
{
a000ff04: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
* then it is forbidden to lock a mutex. But since we are inside
* a critical section, it should be safe to walk it unlocked.
*
* NOTE: Dispatching is also disabled during initialization.
*/
if ( !_Thread_Dispatch_disable_level ) {
a000ff08: e5933000 ldr r3, [r3] <== NOT EXECUTED
bool _Protected_heap_Walk(
Heap_Control *the_heap,
int source,
bool do_dump
)
{
a000ff0c: e1a06000 mov r6, r0 <== NOT EXECUTED
a000ff10: e1a05001 mov r5, r1 <== NOT EXECUTED
* then it is forbidden to lock a mutex. But since we are inside
* a critical section, it should be safe to walk it unlocked.
*
* NOTE: Dispatching is also disabled during initialization.
*/
if ( !_Thread_Dispatch_disable_level ) {
a000ff14: e3530000 cmp r3, #0 <== NOT EXECUTED
bool _Protected_heap_Walk(
Heap_Control *the_heap,
int source,
bool do_dump
)
{
a000ff18: e20270ff and r7, r2, #255 ; 0xff <== NOT EXECUTED
* then it is forbidden to lock a mutex. But since we are inside
* a critical section, it should be safe to walk it unlocked.
*
* NOTE: Dispatching is also disabled during initialization.
*/
if ( !_Thread_Dispatch_disable_level ) {
a000ff1c: 1a00000b bne a000ff50 <_Protected_heap_Walk+0x50> <== NOT EXECUTED
_RTEMS_Lock_allocator();
a000ff20: e59f4038 ldr r4, [pc, #56] ; a000ff60 <_Protected_heap_Walk+0x60><== NOT EXECUTED
a000ff24: e5940000 ldr r0, [r4] <== NOT EXECUTED
a000ff28: ebfff868 bl a000e0d0 <_API_Mutex_Lock> <== NOT EXECUTED
status = _Heap_Walk( the_heap, source, do_dump );
a000ff2c: e1a01005 mov r1, r5 <== NOT EXECUTED
a000ff30: e1a02007 mov r2, r7 <== NOT EXECUTED
a000ff34: e1a00006 mov r0, r6 <== NOT EXECUTED
a000ff38: ebfffc3f bl a000f03c <_Heap_Walk> <== NOT EXECUTED
a000ff3c: e1a05000 mov r5, r0 <== NOT EXECUTED
_RTEMS_Unlock_allocator();
a000ff40: e5940000 ldr r0, [r4] <== NOT EXECUTED
a000ff44: ebfff87a bl a000e134 <_API_Mutex_Unlock> <== NOT EXECUTED
} else {
status = _Heap_Walk( the_heap, source, do_dump );
}
return status;
}
a000ff48: e1a00005 mov r0, r5 <== NOT EXECUTED
a000ff4c: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
if ( !_Thread_Dispatch_disable_level ) {
_RTEMS_Lock_allocator();
status = _Heap_Walk( the_heap, source, do_dump );
_RTEMS_Unlock_allocator();
} else {
status = _Heap_Walk( the_heap, source, do_dump );
a000ff50: e1a02007 mov r2, r7 <== NOT EXECUTED
}
return status;
}
a000ff54: e8bd40f0 pop {r4, r5, r6, r7, lr} <== NOT EXECUTED
if ( !_Thread_Dispatch_disable_level ) {
_RTEMS_Lock_allocator();
status = _Heap_Walk( the_heap, source, do_dump );
_RTEMS_Unlock_allocator();
} else {
status = _Heap_Walk( the_heap, source, do_dump );
a000ff58: eafffc37 b a000f03c <_Heap_Walk> <== NOT EXECUTED
a000e2f8 <_RTEMS_Tasks_Invoke_task_variable_dtor>:
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
a000e2f8: e59f203c ldr r2, [pc, #60] ; a000e33c <_RTEMS_Tasks_Invoke_task_variable_dtor+0x44><== NOT EXECUTED
)
{
void (*dtor)(void *);
void *value;
dtor = tvp->dtor;
a000e2fc: e5913010 ldr r3, [r1, #16] <== NOT EXECUTED
void _RTEMS_Tasks_Invoke_task_variable_dtor(
Thread_Control *the_thread,
rtems_task_variable_t *tvp
)
{
a000e300: e92d4010 push {r4, lr} <== NOT EXECUTED
void (*dtor)(void *);
void *value;
dtor = tvp->dtor;
if (_Thread_Is_executing(the_thread)) {
a000e304: e5922004 ldr r2, [r2, #4] <== NOT EXECUTED
void _RTEMS_Tasks_Invoke_task_variable_dtor(
Thread_Control *the_thread,
rtems_task_variable_t *tvp
)
{
a000e308: e1a04001 mov r4, r1 <== NOT EXECUTED
void (*dtor)(void *);
void *value;
dtor = tvp->dtor;
if (_Thread_Is_executing(the_thread)) {
a000e30c: e1520000 cmp r2, r0 <== NOT EXECUTED
value = *tvp->ptr;
a000e310: 05912004 ldreq r2, [r1, #4] <== NOT EXECUTED
*tvp->ptr = tvp->gval;
a000e314: 05911008 ldreq r1, [r1, #8] <== NOT EXECUTED
} else {
value = tvp->tval;
a000e318: 1594000c ldrne r0, [r4, #12] <== NOT EXECUTED
void (*dtor)(void *);
void *value;
dtor = tvp->dtor;
if (_Thread_Is_executing(the_thread)) {
value = *tvp->ptr;
a000e31c: 05920000 ldreq r0, [r2] <== NOT EXECUTED
*tvp->ptr = tvp->gval;
a000e320: 05821000 streq r1, [r2] <== NOT EXECUTED
} else {
value = tvp->tval;
}
if ( dtor )
a000e324: e3530000 cmp r3, #0 <== NOT EXECUTED
a000e328: 0a000000 beq a000e330 <_RTEMS_Tasks_Invoke_task_variable_dtor+0x38><== NOT EXECUTED
(*dtor)(value);
a000e32c: e12fff33 blx r3 <== NOT EXECUTED
_Workspace_Free(tvp);
a000e330: e1a00004 mov r0, r4 <== NOT EXECUTED
}
a000e334: e8bd4010 pop {r4, lr} <== NOT EXECUTED
}
if ( dtor )
(*dtor)(value);
_Workspace_Free(tvp);
a000e338: eafff8ee b a000c6f8 <_Workspace_Free> <== NOT EXECUTED
a000e1d0 <_RTEMS_tasks_Delete_extension>:
/*
* Free per task variable memory
*/
tvp = deleted->task_variables;
deleted->task_variables = NULL;
a000e1d0: e3a03000 mov r3, #0
void _RTEMS_tasks_Delete_extension(
Thread_Control *executing,
Thread_Control *deleted
)
{
a000e1d4: e92d4070 push {r4, r5, r6, lr}
/*
* Free per task variable memory
*/
tvp = deleted->task_variables;
a000e1d8: e5916100 ldr r6, [r1, #256] ; 0x100
void _RTEMS_tasks_Delete_extension(
Thread_Control *executing,
Thread_Control *deleted
)
{
a000e1dc: e1a04001 mov r4, r1
/*
* Free per task variable memory
*/
tvp = deleted->task_variables;
deleted->task_variables = NULL;
a000e1e0: e5813100 str r3, [r1, #256] ; 0x100
while (tvp) {
a000e1e4: ea000004 b a000e1fc <_RTEMS_tasks_Delete_extension+0x2c>
next = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp );
a000e1e8: e1a01006 mov r1, r6 <== NOT EXECUTED
a000e1ec: e1a00004 mov r0, r4 <== NOT EXECUTED
*/
tvp = deleted->task_variables;
deleted->task_variables = NULL;
while (tvp) {
next = (rtems_task_variable_t *)tvp->next;
a000e1f0: e5965000 ldr r5, [r6] <== NOT EXECUTED
_RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp );
a000e1f4: eb00003f bl a000e2f8 <_RTEMS_Tasks_Invoke_task_variable_dtor><== NOT EXECUTED
tvp = next;
a000e1f8: e1a06005 mov r6, r5 <== NOT EXECUTED
* Free per task variable memory
*/
tvp = deleted->task_variables;
deleted->task_variables = NULL;
while (tvp) {
a000e1fc: e3560000 cmp r6, #0
a000e200: 1afffff8 bne a000e1e8 <_RTEMS_tasks_Delete_extension+0x18>
/*
* Free API specific memory
*/
(void) _Workspace_Free( deleted->API_Extensions[ THREAD_API_RTEMS ] );
a000e204: e59400f4 ldr r0, [r4, #244] ; 0xf4
a000e208: ebfff93a bl a000c6f8 <_Workspace_Free>
deleted->API_Extensions[ THREAD_API_RTEMS ] = NULL;
a000e20c: e58460f4 str r6, [r4, #244] ; 0xf4
}
a000e210: e8bd8070 pop {r4, r5, r6, pc}
a000e0d8 <_RTEMS_tasks_Switch_extension>:
/*
* Per Task Variables
*/
tvp = executing->task_variables;
a000e0d8: e5903100 ldr r3, [r0, #256] ; 0x100
while (tvp) {
a000e0dc: ea000005 b a000e0f8 <_RTEMS_tasks_Switch_extension+0x20>
tvp->tval = *tvp->ptr;
a000e0e0: e5932004 ldr r2, [r3, #4] <== NOT EXECUTED
a000e0e4: e5920000 ldr r0, [r2] <== NOT EXECUTED
a000e0e8: e583000c str r0, [r3, #12] <== NOT EXECUTED
*tvp->ptr = tvp->gval;
a000e0ec: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED
tvp = (rtems_task_variable_t *)tvp->next;
a000e0f0: e5933000 ldr r3, [r3] <== NOT EXECUTED
*/
tvp = executing->task_variables;
while (tvp) {
tvp->tval = *tvp->ptr;
*tvp->ptr = tvp->gval;
a000e0f4: e5820000 str r0, [r2] <== NOT EXECUTED
/*
* Per Task Variables
*/
tvp = executing->task_variables;
while (tvp) {
a000e0f8: e3530000 cmp r3, #0
a000e0fc: 1afffff7 bne a000e0e0 <_RTEMS_tasks_Switch_extension+0x8>
tvp->tval = *tvp->ptr;
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
a000e100: e5913100 ldr r3, [r1, #256] ; 0x100
while (tvp) {
a000e104: ea000005 b a000e120 <_RTEMS_tasks_Switch_extension+0x48>
tvp->gval = *tvp->ptr;
a000e108: e5932004 ldr r2, [r3, #4] <== NOT EXECUTED
a000e10c: e5921000 ldr r1, [r2] <== NOT EXECUTED
a000e110: e5831008 str r1, [r3, #8] <== NOT EXECUTED
*tvp->ptr = tvp->tval;
a000e114: e593100c ldr r1, [r3, #12] <== NOT EXECUTED
tvp = (rtems_task_variable_t *)tvp->next;
a000e118: e5933000 ldr r3, [r3] <== NOT EXECUTED
}
tvp = heir->task_variables;
while (tvp) {
tvp->gval = *tvp->ptr;
*tvp->ptr = tvp->tval;
a000e11c: e5821000 str r1, [r2] <== NOT EXECUTED
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
while (tvp) {
a000e120: e3530000 cmp r3, #0
a000e124: 1afffff7 bne a000e108 <_RTEMS_tasks_Switch_extension+0x30>
tvp->gval = *tvp->ptr;
*tvp->ptr = tvp->tval;
tvp = (rtems_task_variable_t *)tvp->next;
}
}
a000e128: e12fff1e bx lr
a000a8b8 <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
a000a8b8: e92d4011 push {r0, r4, lr} <== NOT EXECUTED
a000a8bc: e1a01000 mov r1, r0 <== NOT EXECUTED
a000a8c0: e1a0200d mov r2, sp <== NOT EXECUTED
a000a8c4: e59f0088 ldr r0, [pc, #136] ; a000a954 <_Rate_monotonic_Timeout+0x9c><== NOT EXECUTED
a000a8c8: eb00072a bl a000c578 <_Objects_Get> <== NOT EXECUTED
/*
* 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 ) {
a000a8cc: e59d3000 ldr r3, [sp] <== NOT EXECUTED
a000a8d0: e1a04000 mov r4, r0 <== NOT EXECUTED
a000a8d4: e3530000 cmp r3, #0 <== NOT EXECUTED
a000a8d8: 1a00001c bne a000a950 <_Rate_monotonic_Timeout+0x98> <== NOT EXECUTED
case OBJECTS_LOCAL:
the_thread = the_period->owner;
a000a8dc: e5900040 ldr r0, [r0, #64] ; 0x40 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_period (
States_Control the_states
)
{
return (the_states & STATES_WAITING_FOR_PERIOD);
a000a8e0: e5903010 ldr r3, [r0, #16] <== NOT EXECUTED
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
a000a8e4: e3130901 tst r3, #16384 ; 0x4000 <== NOT EXECUTED
a000a8e8: 0a000006 beq a000a908 <_Rate_monotonic_Timeout+0x50> <== NOT EXECUTED
a000a8ec: e5902020 ldr r2, [r0, #32] <== NOT EXECUTED
a000a8f0: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
a000a8f4: e1520003 cmp r2, r3 <== NOT EXECUTED
a000a8f8: 1a000002 bne a000a908 <_Rate_monotonic_Timeout+0x50> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
a000a8fc: e59f1054 ldr r1, [pc, #84] ; a000a958 <_Rate_monotonic_Timeout+0xa0><== NOT EXECUTED
a000a900: eb000922 bl a000cd90 <_Thread_Clear_state> <== NOT EXECUTED
a000a904: ea000006 b a000a924 <_Rate_monotonic_Timeout+0x6c> <== NOT EXECUTED
_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 ) {
a000a908: e5943038 ldr r3, [r4, #56] ; 0x38 <== NOT EXECUTED
a000a90c: e3530001 cmp r3, #1 <== NOT EXECUTED
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else
the_period->state = RATE_MONOTONIC_EXPIRED;
a000a910: 13a03004 movne r3, #4 <== NOT EXECUTED
a000a914: 15843038 strne r3, [r4, #56] ; 0x38 <== NOT EXECUTED
_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 ) {
a000a918: 1a000008 bne a000a940 <_Rate_monotonic_Timeout+0x88> <== NOT EXECUTED
the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING;
a000a91c: e2833002 add r3, r3, #2 <== NOT EXECUTED
a000a920: e5843038 str r3, [r4, #56] ; 0x38 <== NOT EXECUTED
_Rate_monotonic_Initiate_statistics( the_period );
a000a924: e1a00004 mov r0, r4 <== NOT EXECUTED
a000a928: ebfffe82 bl a000a338 <_Rate_monotonic_Initiate_statistics> <== NOT EXECUTED
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
a000a92c: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a000a930: e59f0024 ldr r0, [pc, #36] ; a000a95c <_Rate_monotonic_Timeout+0xa4><== NOT EXECUTED
a000a934: e2841010 add r1, r4, #16 <== NOT EXECUTED
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
a000a938: e584301c str r3, [r4, #28] <== NOT EXECUTED
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a000a93c: eb000d9e bl a000dfbc <_Watchdog_Insert> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
a000a940: e59f3018 ldr r3, [pc, #24] ; a000a960 <_Rate_monotonic_Timeout+0xa8><== NOT EXECUTED
a000a944: e5932000 ldr r2, [r3] <== NOT EXECUTED
a000a948: e2422001 sub r2, r2, #1 <== NOT EXECUTED
a000a94c: e5832000 str r2, [r3] <== NOT EXECUTED
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
a000a950: e8bd8018 pop {r3, r4, pc} <== NOT EXECUTED
a000a538 <_TOD_Get_uptime_as_timespec>:
*/
void _TOD_Get_uptime_as_timespec(
struct timespec *uptime
)
{
a000a538: e92d4013 push {r0, r1, r4, lr} <== NOT EXECUTED
a000a53c: e1a04000 mov r4, r0 <== NOT EXECUTED
Timestamp_Control uptime_ts;
/* assume time checked for NULL by caller */
_TOD_Get_uptime( &uptime_ts );
a000a540: e1a0000d mov r0, sp <== NOT EXECUTED
a000a544: eb001127 bl a000e9e8 <_TOD_Get_uptime> <== NOT EXECUTED
_Timestamp_To_timespec( &uptime_ts, uptime );
a000a548: e89d000c ldm sp, {r2, r3} <== NOT EXECUTED
a000a54c: e884000c stm r4, {r2, r3} <== NOT EXECUTED
}
a000a550: e8bd801c pop {r2, r3, r4, pc} <== NOT EXECUTED
a000a198 <_TOD_Tickle_ticks>:
*
* Output parameters: NONE
*/
void _TOD_Tickle_ticks( void )
{
a000a198: e92d4013 push {r0, r1, r4, lr}
Timestamp_Control tick;
uint32_t seconds;
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
a000a19c: e3a03000 mov r3, #0
a000a1a0: e58d3000 str r3, [sp]
a000a1a4: e59f3054 ldr r3, [pc, #84] ; a000a200 <_TOD_Tickle_ticks+0x68>
a000a1a8: e3a02ffa mov r2, #1000 ; 0x3e8
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
/* Update the timespec format uptime */
_Timestamp_Add_to( &_TOD_Uptime, &tick );
a000a1ac: e1a0100d mov r1, sp
{
Timestamp_Control tick;
uint32_t seconds;
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
a000a1b0: e593300c ldr r3, [r3, #12]
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
/* Update the timespec format uptime */
_Timestamp_Add_to( &_TOD_Uptime, &tick );
a000a1b4: e59f0048 ldr r0, [pc, #72] ; a000a204 <_TOD_Tickle_ticks+0x6c>
{
Timestamp_Control tick;
uint32_t seconds;
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
a000a1b8: e0030392 mul r3, r2, r3
a000a1bc: e58d3004 str r3, [sp, #4]
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
a000a1c0: e59f3040 ldr r3, [pc, #64] ; a000a208 <_TOD_Tickle_ticks+0x70>
a000a1c4: e5932000 ldr r2, [r3]
a000a1c8: e2822001 add r2, r2, #1
a000a1cc: e5832000 str r2, [r3]
/* Update the timespec format uptime */
_Timestamp_Add_to( &_TOD_Uptime, &tick );
a000a1d0: eb0007b8 bl a000c0b8 <_Timespec_Add_to>
/* we do not care how much the uptime changed */
/* Update the timespec format TOD */
seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick );
a000a1d4: e59f0030 ldr r0, [pc, #48] ; a000a20c <_TOD_Tickle_ticks+0x74>
a000a1d8: e1a0100d mov r1, sp
a000a1dc: eb0007b5 bl a000c0b8 <_Timespec_Add_to>
a000a1e0: e1a04000 mov r4, r0
while ( seconds ) {
a000a1e4: ea000002 b a000a1f4 <_TOD_Tickle_ticks+0x5c>
*/
RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void )
{
_Watchdog_Tickle( &_Watchdog_Seconds_chain );
a000a1e8: e59f0020 ldr r0, [pc, #32] ; a000a210 <_TOD_Tickle_ticks+0x78><== NOT EXECUTED
a000a1ec: eb0008fe bl a000c5ec <_Watchdog_Tickle> <== NOT EXECUTED
_Watchdog_Tickle_seconds();
seconds--;
a000a1f0: e2444001 sub r4, r4, #1 <== NOT EXECUTED
_Timestamp_Add_to( &_TOD_Uptime, &tick );
/* we do not care how much the uptime changed */
/* Update the timespec format TOD */
seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick );
while ( seconds ) {
a000a1f4: e3540000 cmp r4, #0
a000a1f8: 1afffffa bne a000a1e8 <_TOD_Tickle_ticks+0x50>
_Watchdog_Tickle_seconds();
seconds--;
}
}
a000a1fc: e8bd801c pop {r2, r3, r4, pc}
a000a3d0 <_TOD_Validate>:
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
a000a3d0: e59f30b4 ldr r3, [pc, #180] ; a000a48c <_TOD_Validate+0xbc>
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
a000a3d4: e92d4010 push {r4, lr}
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) ||
a000a3d8: e2504000 subs r4, r0, #0
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
a000a3dc: e593100c ldr r1, [r3, #12]
if ((!the_tod) ||
a000a3e0: 0a000021 beq a000a46c <_TOD_Validate+0x9c>
)
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
a000a3e4: e59f00a4 ldr r0, [pc, #164] ; a000a490 <_TOD_Validate+0xc0>
a000a3e8: eb004474 bl a001b5c0 <__aeabi_uidiv>
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
a000a3ec: e5943018 ldr r3, [r4, #24]
a000a3f0: e1530000 cmp r3, r0
a000a3f4: 2a000020 bcs a000a47c <_TOD_Validate+0xac>
(the_tod->ticks >= ticks_per_second) ||
a000a3f8: e5943014 ldr r3, [r4, #20]
a000a3fc: e353003b cmp r3, #59 ; 0x3b
a000a400: 8a00001d bhi a000a47c <_TOD_Validate+0xac>
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
a000a404: e5943010 ldr r3, [r4, #16]
a000a408: e353003b cmp r3, #59 ; 0x3b
a000a40c: 8a00001a bhi a000a47c <_TOD_Validate+0xac>
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
a000a410: e594300c ldr r3, [r4, #12]
a000a414: e3530017 cmp r3, #23
a000a418: 8a000017 bhi a000a47c <_TOD_Validate+0xac>
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
a000a41c: e5943004 ldr r3, [r4, #4]
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) ||
a000a420: e3530000 cmp r3, #0
a000a424: 0a000012 beq a000a474 <_TOD_Validate+0xa4>
(the_tod->month == 0) ||
a000a428: e353000c cmp r3, #12
a000a42c: 8a000012 bhi a000a47c <_TOD_Validate+0xac>
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
a000a430: e5942000 ldr r2, [r4]
(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) ||
a000a434: e59f1058 ldr r1, [pc, #88] ; a000a494 <_TOD_Validate+0xc4>
a000a438: e1520001 cmp r2, r1
a000a43c: 9a000010 bls a000a484 <_TOD_Validate+0xb4>
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
a000a440: e5940008 ldr r0, [r4, #8]
(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) ||
a000a444: e3500000 cmp r0, #0
a000a448: 0a00000e beq a000a488 <_TOD_Validate+0xb8>
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
a000a44c: e3120003 tst r2, #3
a000a450: e59f2040 ldr r2, [pc, #64] ; a000a498 <_TOD_Validate+0xc8>
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
a000a454: 0283300d addeq r3, r3, #13
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
a000a458: e7924103 ldr r4, [r2, r3, lsl #2]
* false - if the the_tod is invalid
*
* NOTE: This routine only works for leap-years through 2099.
*/
bool _TOD_Validate(
a000a45c: e1500004 cmp r0, r4
a000a460: 83a00000 movhi r0, #0
a000a464: 93a00001 movls r0, #1
a000a468: e8bd8010 pop {r4, pc}
(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;
a000a46c: e1a00004 mov r0, r4 <== NOT EXECUTED
a000a470: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a000a474: e1a00003 mov r0, r3 <== NOT EXECUTED
a000a478: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a000a47c: e3a00000 mov r0, #0 <== NOT EXECUTED
a000a480: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a000a484: e3a00000 mov r0, #0 <== NOT EXECUTED
if ( the_tod->day > days_in_month )
return false;
return true;
}
a000a488: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a000b340 <_Thread_Close>:
RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id(
Objects_Information *information,
Objects_Control *the_object
)
{
_Objects_Set_local_object(
a000b340: e1d120b8 ldrh r2, [r1, #8]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000b344: e590301c ldr r3, [r0, #28]
void _Thread_Close(
Objects_Information *information,
Thread_Control *the_thread
)
{
a000b348: e92d4070 push {r4, r5, r6, lr}
a000b34c: e1a04001 mov r4, r1
a000b350: e3a01000 mov r1, #0
a000b354: e7831102 str r1, [r3, r2, lsl #2]
a000b358: e1a05000 mov r5, r0
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
a000b35c: e59f6094 ldr r6, [pc, #148] ; a000b3f8 <_Thread_Close+0xb8>
* disappear and set a transient state on it. So we temporarily
* unnest dispatching.
*/
_Thread_Unnest_dispatch();
_User_extensions_Thread_delete( the_thread );
a000b360: e1a00004 mov r0, r4
a000b364: e5963000 ldr r3, [r6]
a000b368: e2433001 sub r3, r3, #1
a000b36c: e5863000 str r3, [r6]
a000b370: eb0003e9 bl a000c31c <_User_extensions_Thread_delete>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a000b374: e5963000 ldr r3, [r6]
a000b378: e2833001 add r3, r3, #1
a000b37c: e5863000 str r3, [r6]
/*
* 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 );
a000b380: e1a00005 mov r0, r5
a000b384: e1a01004 mov r1, r4
a000b388: ebfffcd4 bl a000a6e0 <_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 );
a000b38c: e1a00004 mov r0, r4
a000b390: e3a01001 mov r1, #1
a000b394: eb0002b1 bl a000be60 <_Thread_Set_state>
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
a000b398: e1a00004 mov r0, r4
a000b39c: eb000251 bl a000bce8 <_Thread_queue_Extract_with_proxy>
a000b3a0: e3500000 cmp r0, #0
a000b3a4: 1a000004 bne a000b3bc <_Thread_Close+0x7c>
if ( _Watchdog_Is_active( &the_thread->Timer ) )
a000b3a8: e5943050 ldr r3, [r4, #80] ; 0x50
a000b3ac: e3530002 cmp r3, #2
a000b3b0: 1a000001 bne a000b3bc <_Thread_Close+0x7c>
(void) _Watchdog_Remove( &the_thread->Timer );
a000b3b4: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED
a000b3b8: eb000462 bl a000c548 <_Watchdog_Remove> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Scheduler_Thread_scheduler_free(
Scheduler_Control *the_scheduler,
Thread_Control *the_thread
)
{
return the_scheduler->Operations.scheduler_free( the_scheduler, the_thread );
a000b3bc: e59f0038 ldr r0, [pc, #56] ; a000b3fc <_Thread_Close+0xbc>
a000b3c0: e1a01004 mov r1, r4
a000b3c4: e5903018 ldr r3, [r0, #24]
a000b3c8: e12fff33 blx r3
/*
* Free the rest of the memory associated with this task
* and set the associated pointers to NULL for safety.
*/
_Thread_Stack_Free( the_thread );
a000b3cc: e1a00004 mov r0, r4
a000b3d0: eb0002f0 bl a000bf98 <_Thread_Stack_Free>
the_thread->Start.stack = NULL;
if ( the_thread->extensions )
a000b3d4: e59400fc ldr r0, [r4, #252] ; 0xfc
/*
* 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;
a000b3d8: e3a03000 mov r3, #0
a000b3dc: e58430bc str r3, [r4, #188] ; 0xbc
if ( the_thread->extensions )
a000b3e0: e1500003 cmp r0, r3
a000b3e4: 0a000000 beq a000b3ec <_Thread_Close+0xac>
(void) _Workspace_Free( the_thread->extensions );
a000b3e8: eb0004c2 bl a000c6f8 <_Workspace_Free>
the_thread->extensions = NULL;
a000b3ec: e3a03000 mov r3, #0
a000b3f0: e58430fc str r3, [r4, #252] ; 0xfc
}
a000b3f4: e8bd8070 pop {r4, r5, r6, pc}
a000b644 <_Thread_Get>:
*/
Thread_Control *_Thread_Get (
Objects_Id id,
Objects_Locations *location
)
{
a000b644: e1a02001 mov r2, r1
uint32_t the_class;
Objects_Information **api_information;
Objects_Information *information;
Thread_Control *tp = (Thread_Control *) 0;
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
a000b648: e2501000 subs r1, r0, #0
a000b64c: 1a000007 bne a000b670 <_Thread_Get+0x2c>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a000b650: e59f3074 ldr r3, [pc, #116] ; a000b6cc <_Thread_Get+0x88>
a000b654: e5930000 ldr r0, [r3]
a000b658: e2800001 add r0, r0, #1
a000b65c: e5830000 str r0, [r3]
_Thread_Disable_dispatch();
*location = OBJECTS_LOCAL;
tp = _Thread_Executing;
a000b660: e59f3068 ldr r3, [pc, #104] ; a000b6d0 <_Thread_Get+0x8c>
Objects_Information *information;
Thread_Control *tp = (Thread_Control *) 0;
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
_Thread_Disable_dispatch();
*location = OBJECTS_LOCAL;
a000b664: e5821000 str r1, [r2]
tp = _Thread_Executing;
a000b668: e5930004 ldr r0, [r3, #4]
goto done;
a000b66c: e12fff1e bx lr
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
a000b670: e1a00c21 lsr r0, r1, #24
a000b674: e2000007 and r0, r0, #7
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
a000b678: e2403001 sub r3, r0, #1
a000b67c: e3530002 cmp r3, #2
a000b680: 9a00000d bls a000b6bc <_Thread_Get+0x78>
goto done;
}
the_class = _Objects_Get_class( id );
if ( the_class != 1 ) { /* threads are always first class :) */
*location = OBJECTS_ERROR;
a000b684: e3a03001 mov r3, #1
a000b688: e5823000 str r3, [r2]
{
uint32_t the_api;
uint32_t the_class;
Objects_Information **api_information;
Objects_Information *information;
Thread_Control *tp = (Thread_Control *) 0;
a000b68c: e3a00000 mov r0, #0
}
the_class = _Objects_Get_class( id );
if ( the_class != 1 ) { /* threads are always first class :) */
*location = OBJECTS_ERROR;
goto done;
a000b690: e12fff1e bx lr
}
api_information = _Objects_Information_table[ the_api ];
a000b694: e59fc038 ldr ip, [pc, #56] ; a000b6d4 <_Thread_Get+0x90>
a000b698: e79c0100 ldr r0, [ip, r0, lsl #2]
/*
* There is no way for this to happen if POSIX is enabled.
*/
#if !defined(RTEMS_POSIX_API)
if ( !api_information ) {
a000b69c: e3500000 cmp r0, #0
a000b6a0: 0a000002 beq a000b6b0 <_Thread_Get+0x6c>
*location = OBJECTS_ERROR;
goto done;
}
#endif
information = api_information[ the_class ];
a000b6a4: e5900004 ldr r0, [r0, #4]
if ( !information ) {
a000b6a8: e3500000 cmp r0, #0
a000b6ac: 1a000001 bne a000b6b8 <_Thread_Get+0x74>
*location = OBJECTS_ERROR;
a000b6b0: e5823000 str r3, [r2] <== NOT EXECUTED
goto done;
a000b6b4: e12fff1e bx lr <== NOT EXECUTED
}
tp = (Thread_Control *) _Objects_Get( information, id, location );
a000b6b8: eafffd07 b a000aadc <_Objects_Get>
*/
RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class(
Objects_Id id
)
{
return (uint32_t)
a000b6bc: e1a03da1 lsr r3, r1, #27
*location = OBJECTS_ERROR;
goto done;
}
the_class = _Objects_Get_class( id );
if ( the_class != 1 ) { /* threads are always first class :) */
a000b6c0: e3530001 cmp r3, #1
a000b6c4: 0afffff2 beq a000b694 <_Thread_Get+0x50>
a000b6c8: eaffffed b a000b684 <_Thread_Get+0x40> <== NOT EXECUTED
a000b6d8 <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
a000b6d8: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
a000b6dc: e3a06000 mov r6, #0
a000b6e0: e58160f4 str r6, [r1, #244] ; 0xf4
a000b6e4: e58160f8 str r6, [r1, #248] ; 0xf8
extensions_area = NULL;
the_thread->libc_reent = NULL;
a000b6e8: e58160f0 str r6, [r1, #240] ; 0xf0
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
a000b6ec: e1a05000 mov r5, r0
a000b6f0: e1a04001 mov r4, r1
/*
* Allocate and Initialize the stack for this thread.
*/
#if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
a000b6f4: e1a00001 mov r0, r1
a000b6f8: e1a01003 mov r1, r3
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
a000b6fc: e1a07003 mov r7, r3
a000b700: e59da024 ldr sl, [sp, #36] ; 0x24
a000b704: e5dd8028 ldrb r8, [sp, #40] ; 0x28
/*
* Allocate and Initialize the stack for this thread.
*/
#if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
a000b708: eb00020b bl a000bf3c <_Thread_Stack_Allocate>
if ( !actual_stack_size || actual_stack_size < stack_size )
a000b70c: e1500006 cmp r0, r6
a000b710: 13a03000 movne r3, #0
a000b714: 03a03001 moveq r3, #1
a000b718: e1500007 cmp r0, r7
a000b71c: 21a07003 movcs r7, r3
a000b720: 33837001 orrcc r7, r3, #1
a000b724: e1570006 cmp r7, r6
a000b728: 1a000058 bne a000b890 <_Thread_Initialize+0x1b8>
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
a000b72c: e59430bc ldr r3, [r4, #188] ; 0xbc
the_stack->size = size;
a000b730: e58400b4 str r0, [r4, #180] ; 0xb4
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a000b734: e5847050 str r7, [r4, #80] ; 0x50
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
a000b738: e58430b8 str r3, [r4, #184] ; 0xb8
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
a000b73c: e59f315c ldr r3, [pc, #348] ; a000b8a0 <_Thread_Initialize+0x1c8>
the_watchdog->routine = routine;
a000b740: e5847064 str r7, [r4, #100] ; 0x64
the_watchdog->id = id;
a000b744: e5847068 str r7, [r4, #104] ; 0x68
a000b748: e5936000 ldr r6, [r3]
the_watchdog->user_data = user_data;
a000b74c: e584706c str r7, [r4, #108] ; 0x6c
a000b750: e3560000 cmp r6, #0
a000b754: 0a000004 beq a000b76c <_Thread_Initialize+0x94>
extensions_area = _Workspace_Allocate(
a000b758: e2866001 add r6, r6, #1
a000b75c: e1a00106 lsl r0, r6, #2
a000b760: eb0003de bl a000c6e0 <_Workspace_Allocate>
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
a000b764: e2506000 subs r6, r0, #0
a000b768: 0a00002f beq a000b82c <_Thread_Initialize+0x154>
* if they are linked to the thread. An extension user may
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
a000b76c: e3560000 cmp r6, #0
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
a000b770: e58460fc str r6, [r4, #252] ; 0xfc
* if they are linked to the thread. An extension user may
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
a000b774: 0a000009 beq a000b7a0 <_Thread_Initialize+0xc8>
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
a000b778: e59f3120 ldr r3, [pc, #288] ; a000b8a0 <_Thread_Initialize+0x1c8>
a000b77c: e1a02006 mov r2, r6
a000b780: e5930000 ldr r0, [r3]
a000b784: e3a03000 mov r3, #0
the_thread->extensions[i] = NULL;
a000b788: e1a01003 mov r1, r3
a000b78c: ea000001 b a000b798 <_Thread_Initialize+0xc0>
a000b790: e4821004 str r1, [r2], #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++ )
a000b794: e2833001 add r3, r3, #1
a000b798: e1530000 cmp r3, r0
a000b79c: 9afffffb bls a000b790 <_Thread_Initialize+0xb8>
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
a000b7a0: e59d302c ldr r3, [sp, #44] ; 0x2c
Scheduler_Control *the_scheduler,
Thread_Control *the_thread
)
{
return
the_scheduler->Operations.scheduler_allocate( the_scheduler, the_thread );
a000b7a4: e59f00f8 ldr r0, [pc, #248] ; a000b8a4 <_Thread_Initialize+0x1cc>
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
the_thread->Wait.queue = NULL;
a000b7a8: e3a07000 mov r7, #0
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
a000b7ac: e58430a4 str r3, [r4, #164] ; 0xa4
the_thread->Start.budget_callout = budget_callout;
a000b7b0: e59d3030 ldr r3, [sp, #48] ; 0x30
#endif
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
a000b7b4: e3a09001 mov r9, #1
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
a000b7b8: e5c480a0 strb r8, [r4, #160] ; 0xa0
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
a000b7bc: e58430a8 str r3, [r4, #168] ; 0xa8
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
a000b7c0: e59d3034 ldr r3, [sp, #52] ; 0x34
the_thread->current_state = STATES_DORMANT;
a000b7c4: e5849010 str r9, [r4, #16]
the_thread->Wait.queue = NULL;
a000b7c8: e5847044 str r7, [r4, #68] ; 0x44
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
a000b7cc: e58430ac str r3, [r4, #172] ; 0xac
the_thread->current_state = STATES_DORMANT;
the_thread->Wait.queue = NULL;
the_thread->resource_count = 0;
a000b7d0: e584701c str r7, [r4, #28]
the_thread->real_priority = priority;
a000b7d4: e584a018 str sl, [r4, #24]
the_thread->Start.initial_priority = priority;
a000b7d8: e584a0b0 str sl, [r4, #176] ; 0xb0
RTEMS_INLINE_ROUTINE void* _Scheduler_Thread_scheduler_allocate(
Scheduler_Control *the_scheduler,
Thread_Control *the_thread
)
{
return
a000b7dc: e5903014 ldr r3, [r0, #20]
a000b7e0: e1a01004 mov r1, r4
a000b7e4: e12fff33 blx r3
sched =_Scheduler_Thread_scheduler_allocate( &_Scheduler, the_thread );
if ( !sched )
a000b7e8: e2508000 subs r8, r0, #0
a000b7ec: 0a00000f beq a000b830 <_Thread_Initialize+0x158>
goto failed;
_Thread_Set_priority( the_thread, priority );
a000b7f0: e1a00004 mov r0, r4
a000b7f4: e1a0100a mov r1, sl
a000b7f8: eb00018f bl a000be3c <_Thread_Set_priority>
_Thread_Stack_Free( the_thread );
return false;
}
a000b7fc: e595301c ldr r3, [r5, #28]
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
a000b800: e1d420b8 ldrh r2, [r4, #8]
/*
* Initialize the CPU usage statistics
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Set_to_zero( &the_thread->cpu_time_used );
a000b804: e5847084 str r7, [r4, #132] ; 0x84
a000b808: e5847088 str r7, [r4, #136] ; 0x88
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000b80c: e7834102 str r4, [r3, r2, lsl #2]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
a000b810: e59d3038 ldr r3, [sp, #56] ; 0x38
* 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 );
a000b814: e1a00004 mov r0, r4
a000b818: e584300c str r3, [r4, #12]
a000b81c: eb0002a9 bl a000c2c8 <_User_extensions_Thread_create>
if ( extension_status )
a000b820: e1500007 cmp r0, r7
a000b824: 0a000001 beq a000b830 <_Thread_Initialize+0x158>
a000b828: ea00001a b a000b898 <_Thread_Initialize+0x1c0>
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;
a000b82c: e1a08006 mov r8, r6
extension_status = _User_extensions_Thread_create( the_thread );
if ( extension_status )
return true;
failed:
if ( the_thread->libc_reent )
a000b830: e59400f0 ldr r0, [r4, #240] ; 0xf0
a000b834: e3500000 cmp r0, #0
a000b838: 0a000000 beq a000b840 <_Thread_Initialize+0x168>
_Workspace_Free( the_thread->libc_reent );
a000b83c: eb0003ad bl a000c6f8 <_Workspace_Free>
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
a000b840: e59400f4 ldr r0, [r4, #244] ; 0xf4
a000b844: e3500000 cmp r0, #0
a000b848: 0a000000 beq a000b850 <_Thread_Initialize+0x178>
_Workspace_Free( the_thread->API_Extensions[i] );
a000b84c: eb0003a9 bl a000c6f8 <_Workspace_Free>
failed:
if ( the_thread->libc_reent )
_Workspace_Free( the_thread->libc_reent );
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
a000b850: e59400f8 ldr r0, [r4, #248] ; 0xf8
a000b854: e3500000 cmp r0, #0
a000b858: 0a000000 beq a000b860 <_Thread_Initialize+0x188>
_Workspace_Free( the_thread->API_Extensions[i] );
a000b85c: eb0003a5 bl a000c6f8 <_Workspace_Free> <== NOT EXECUTED
if ( extensions_area )
a000b860: e3560000 cmp r6, #0
a000b864: 0a000001 beq a000b870 <_Thread_Initialize+0x198>
(void) _Workspace_Free( extensions_area );
a000b868: e1a00006 mov r0, r6
a000b86c: eb0003a1 bl a000c6f8 <_Workspace_Free>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( fp_area )
(void) _Workspace_Free( fp_area );
#endif
if ( sched )
a000b870: e3580000 cmp r8, #0
a000b874: 0a000001 beq a000b880 <_Thread_Initialize+0x1a8>
(void) _Workspace_Free( sched );
a000b878: e1a00008 mov r0, r8
a000b87c: eb00039d bl a000c6f8 <_Workspace_Free>
_Thread_Stack_Free( the_thread );
a000b880: e1a00004 mov r0, r4
a000b884: eb0001c3 bl a000bf98 <_Thread_Stack_Free>
return false;
a000b888: e3a00000 mov r0, #0
a000b88c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
* Allocate and Initialize the stack for this thread.
*/
#if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
if ( !actual_stack_size || actual_stack_size < stack_size )
return false; /* stack allocation failed */
a000b890: e1a00006 mov r0, r6
a000b894: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
* Mutex provides sufficient protection to let the user extensions
* run safely.
*/
extension_status = _User_extensions_Thread_create( the_thread );
if ( extension_status )
return true;
a000b898: e1a00009 mov r0, r9
_Thread_Stack_Free( the_thread );
return false;
}
a000b89c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
a000fb3c <_Thread_Reset>:
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
the_thread->resource_count = 0;
a000fb3c: e3a03000 mov r3, #0
void _Thread_Reset(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
a000fb40: e92d4010 push {r4, lr}
the_thread->resource_count = 0;
a000fb44: e580301c str r3, [r0, #28]
the_thread->is_preemptible = the_thread->Start.is_preemptible;
a000fb48: e5d030a0 ldrb r3, [r0, #160] ; 0xa0
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
the_thread->budget_callout = the_thread->Start.budget_callout;
the_thread->Start.pointer_argument = pointer_argument;
a000fb4c: e5801098 str r1, [r0, #152] ; 0x98
the_thread->Start.numeric_argument = numeric_argument;
a000fb50: e580209c str r2, [r0, #156] ; 0x9c
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
the_thread->resource_count = 0;
the_thread->is_preemptible = the_thread->Start.is_preemptible;
a000fb54: e5c03074 strb r3, [r0, #116] ; 0x74
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
a000fb58: e59030a4 ldr r3, [r0, #164] ; 0xa4
void _Thread_Reset(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
a000fb5c: e1a04000 mov r4, r0
the_thread->resource_count = 0;
the_thread->is_preemptible = the_thread->Start.is_preemptible;
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
a000fb60: e580307c str r3, [r0, #124] ; 0x7c
the_thread->budget_callout = the_thread->Start.budget_callout;
a000fb64: e59030a8 ldr r3, [r0, #168] ; 0xa8
a000fb68: e5803080 str r3, [r0, #128] ; 0x80
the_thread->Start.pointer_argument = pointer_argument;
the_thread->Start.numeric_argument = numeric_argument;
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
a000fb6c: ebfff389 bl a000c998 <_Thread_queue_Extract_with_proxy>
a000fb70: e3500000 cmp r0, #0
a000fb74: 1a000004 bne a000fb8c <_Thread_Reset+0x50>
if ( _Watchdog_Is_active( &the_thread->Timer ) )
a000fb78: e5943050 ldr r3, [r4, #80] ; 0x50
a000fb7c: e3530002 cmp r3, #2
a000fb80: 1a000001 bne a000fb8c <_Thread_Reset+0x50>
(void) _Watchdog_Remove( &the_thread->Timer );
a000fb84: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED
a000fb88: ebfff5c9 bl a000d2b4 <_Watchdog_Remove> <== NOT EXECUTED
}
if ( the_thread->current_priority != the_thread->Start.initial_priority ) {
a000fb8c: e59410b0 ldr r1, [r4, #176] ; 0xb0
a000fb90: e5943014 ldr r3, [r4, #20]
a000fb94: e1530001 cmp r3, r1
a000fb98: 0a000003 beq a000fbac <_Thread_Reset+0x70>
the_thread->real_priority = the_thread->Start.initial_priority;
_Thread_Set_priority( the_thread, the_thread->Start.initial_priority );
a000fb9c: e1a00004 mov r0, r4
if ( _Watchdog_Is_active( &the_thread->Timer ) )
(void) _Watchdog_Remove( &the_thread->Timer );
}
if ( the_thread->current_priority != the_thread->Start.initial_priority ) {
the_thread->real_priority = the_thread->Start.initial_priority;
a000fba0: e5841018 str r1, [r4, #24]
_Thread_Set_priority( the_thread, the_thread->Start.initial_priority );
}
}
a000fba4: e8bd4010 pop {r4, lr}
(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 );
a000fba8: eafff3ec b a000cb60 <_Thread_Set_priority>
a000fbac: e8bd8010 pop {r4, pc}
a000c000 <_Thread_Start>:
*/
RTEMS_INLINE_ROUTINE bool _States_Is_dormant (
States_Control the_states
)
{
return (the_states & STATES_DORMANT);
a000c000: e590c010 ldr ip, [r0, #16]
Thread_Start_types the_prototype,
void *entry_point,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
a000c004: e92d4010 push {r4, lr}
if ( _States_Is_dormant( the_thread->current_state ) ) {
a000c008: e21cc001 ands ip, ip, #1
Thread_Start_types the_prototype,
void *entry_point,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
a000c00c: e1a04000 mov r4, r0
if ( _States_Is_dormant( the_thread->current_state ) ) {
a000c010: 0a00000b beq a000c044 <_Thread_Start+0x44>
the_thread->Start.entry_point = (Thread_Entry) entry_point;
the_thread->Start.prototype = the_prototype;
the_thread->Start.pointer_argument = pointer_argument;
a000c014: e5803098 str r3, [r0, #152] ; 0x98
the_thread->Start.numeric_argument = numeric_argument;
a000c018: e59d3008 ldr r3, [sp, #8]
Thread_Entry_numeric_type numeric_argument
)
{
if ( _States_Is_dormant( the_thread->current_state ) ) {
the_thread->Start.entry_point = (Thread_Entry) entry_point;
a000c01c: e5802090 str r2, [r0, #144] ; 0x90
the_thread->Start.prototype = the_prototype;
a000c020: e5801094 str r1, [r0, #148] ; 0x94
the_thread->Start.pointer_argument = pointer_argument;
the_thread->Start.numeric_argument = numeric_argument;
a000c024: e580309c str r3, [r0, #156] ; 0x9c
_Thread_Load_environment( the_thread );
a000c028: eb000aa1 bl a000eab4 <_Thread_Load_environment>
_Thread_Ready( the_thread );
a000c02c: e1a00004 mov r0, r4
a000c030: eb000b37 bl a000ed14 <_Thread_Ready>
_User_extensions_Thread_start( the_thread );
a000c034: e1a00004 mov r0, r4
a000c038: eb0000c9 bl a000c364 <_User_extensions_Thread_start>
return true;
a000c03c: e3a00001 mov r0, #1
a000c040: e8bd8010 pop {r4, pc}
}
return false;
a000c044: e1a0000c mov r0, ip <== NOT EXECUTED
}
a000c048: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a000f32c <_Thread_Suspend>:
*/
void _Thread_Suspend(
Thread_Control *the_thread
)
{
a000f32c: e92d4010 push {r4, lr}
a000f330: e1a01000 mov r1, r0
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000f334: e10f4000 mrs r4, CPSR
a000f338: e3843080 orr r3, r4, #128 ; 0x80
a000f33c: e129f003 msr CPSR_fc, r3
ISR_Level level;
_ISR_Disable( level );
if ( !_States_Is_ready( the_thread->current_state ) ) {
a000f340: e5903010 ldr r3, [r0, #16]
a000f344: e3530000 cmp r3, #0
a000f348: 0a000002 beq a000f358 <_Thread_Suspend+0x2c>
RTEMS_INLINE_ROUTINE States_Control _States_Set (
States_Control states_to_set,
States_Control current_state
)
{
return (current_state | states_to_set);
a000f34c: e3833002 orr r3, r3, #2 <== NOT EXECUTED
the_thread->current_state =
a000f350: e5803010 str r3, [r0, #16] <== NOT EXECUTED
_States_Set( STATES_SUSPENDED, the_thread->current_state );
_ISR_Enable( level );
a000f354: ea000004 b a000f36c <_Thread_Suspend+0x40> <== NOT EXECUTED
return;
}
the_thread->current_state = STATES_SUSPENDED;
a000f358: e3a03002 mov r3, #2
a000f35c: e5803010 str r3, [r0, #16]
a000f360: e59f000c ldr r0, [pc, #12] ; a000f374 <_Thread_Suspend+0x48>
a000f364: e590300c ldr r3, [r0, #12]
a000f368: e12fff33 blx r3
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000f36c: e129f004 msr CPSR_fc, r4
a000f370: e8bd8010 pop {r4, pc}
a000c04c <_Thread_Tickle_timeslice>:
void _Thread_Tickle_timeslice( void )
{
Thread_Control *executing;
executing = _Thread_Executing;
a000c04c: e59f3058 ldr r3, [pc, #88] ; a000c0ac <_Thread_Tickle_timeslice+0x60>
*
* Output parameters: NONE
*/
void _Thread_Tickle_timeslice( void )
{
a000c050: e92d4010 push {r4, lr}
Thread_Control *executing;
executing = _Thread_Executing;
a000c054: e5934004 ldr r4, [r3, #4]
/*
* If the thread is not preemptible or is not ready, then
* just return.
*/
if ( !executing->is_preemptible )
a000c058: e5d43074 ldrb r3, [r4, #116] ; 0x74
a000c05c: e3530000 cmp r3, #0
a000c060: 0a000010 beq a000c0a8 <_Thread_Tickle_timeslice+0x5c>
return;
if ( !_States_Is_ready( executing->current_state ) )
a000c064: e5943010 ldr r3, [r4, #16]
a000c068: e3530000 cmp r3, #0
a000c06c: 1a00000d bne a000c0a8 <_Thread_Tickle_timeslice+0x5c>
/*
* The cpu budget algorithm determines what happens next.
*/
switch ( executing->budget_algorithm ) {
a000c070: e594307c ldr r3, [r4, #124] ; 0x7c
a000c074: e3530001 cmp r3, #1
a000c078: 1a00000a bne a000c0a8 <_Thread_Tickle_timeslice+0x5c>
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 ) {
a000c07c: e5943078 ldr r3, [r4, #120] ; 0x78 <== NOT EXECUTED
a000c080: e2433001 sub r3, r3, #1 <== NOT EXECUTED
a000c084: e3530000 cmp r3, #0 <== NOT EXECUTED
a000c088: e5843078 str r3, [r4, #120] ; 0x78 <== NOT EXECUTED
a000c08c: ca000005 bgt a000c0a8 <_Thread_Tickle_timeslice+0x5c> <== NOT EXECUTED
* always operates on the scheduler that 'owns' the currently executing
* thread.
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Yield( void )
{
_Scheduler.Operations.yield( &_Scheduler );
a000c090: e59f0018 ldr r0, [pc, #24] ; a000c0b0 <_Thread_Tickle_timeslice+0x64><== NOT EXECUTED
a000c094: e5903008 ldr r3, [r0, #8] <== NOT EXECUTED
a000c098: e12fff33 blx r3 <== NOT EXECUTED
* 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;
a000c09c: e59f3010 ldr r3, [pc, #16] ; a000c0b4 <_Thread_Tickle_timeslice+0x68><== NOT EXECUTED
a000c0a0: e5933000 ldr r3, [r3] <== NOT EXECUTED
a000c0a4: e5843078 str r3, [r4, #120] ; 0x78 <== NOT EXECUTED
a000c0a8: e8bd8010 pop {r4, pc}
a000b13c <_Thread_blocking_operation_Cancel>:
#endif
/*
* The thread is not waiting on anything after this completes.
*/
the_thread->Wait.queue = NULL;
a000b13c: e3a03000 mov r3, #0 <== NOT EXECUTED
Thread_blocking_operation_States sync_state __attribute__((unused)),
#endif
Thread_Control *the_thread,
ISR_Level level
)
{
a000b140: e92d4010 push {r4, lr} <== NOT EXECUTED
#endif
/*
* The thread is not waiting on anything after this completes.
*/
the_thread->Wait.queue = NULL;
a000b144: e5813044 str r3, [r1, #68] ; 0x44 <== NOT EXECUTED
/*
* 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 ) ) {
a000b148: e5913050 ldr r3, [r1, #80] ; 0x50 <== NOT EXECUTED
Thread_blocking_operation_States sync_state __attribute__((unused)),
#endif
Thread_Control *the_thread,
ISR_Level level
)
{
a000b14c: e1a04001 mov r4, r1 <== NOT EXECUTED
/*
* 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 ) ) {
a000b150: e3530002 cmp r3, #2 <== NOT EXECUTED
a000b154: 1a000005 bne a000b170 <_Thread_blocking_operation_Cancel+0x34><== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
a000b158: e2833001 add r3, r3, #1 <== NOT EXECUTED
a000b15c: e5813050 str r3, [r1, #80] ; 0x50 <== NOT EXECUTED
a000b160: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
(void) _Watchdog_Remove( &the_thread->Timer );
a000b164: e2810048 add r0, r1, #72 ; 0x48 <== NOT EXECUTED
a000b168: eb0004f6 bl a000c548 <_Watchdog_Remove> <== NOT EXECUTED
a000b16c: ea000000 b a000b174 <_Thread_blocking_operation_Cancel+0x38><== NOT EXECUTED
a000b170: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
a000b174: e59f1008 ldr r1, [pc, #8] ; a000b184 <_Thread_blocking_operation_Cancel+0x48><== NOT EXECUTED
a000b178: e1a00004 mov r0, r4 <== NOT EXECUTED
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
a000b17c: e8bd4010 pop {r4, lr} <== NOT EXECUTED
a000b180: ea00005b b a000b2f4 <_Thread_Clear_state> <== NOT EXECUTED
a000eb00 <_Thread_queue_Dequeue_fifo>:
*/
Thread_Control *_Thread_queue_Dequeue_fifo(
Thread_queue_Control *the_thread_queue
)
{
a000eb00: e92d4030 push {r4, r5, lr}
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000eb04: e10f3000 mrs r3, CPSR
a000eb08: e3832080 orr r2, r3, #128 ; 0x80
a000eb0c: e129f002 msr CPSR_fc, r2
return the_thread;
}
_ISR_Enable( level );
return NULL;
}
a000eb10: e1a02000 mov r2, r0
a000eb14: e4925004 ldr r5, [r2], #4
{
ISR_Level level;
Thread_Control *the_thread;
_ISR_Disable( level );
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) {
a000eb18: e1550002 cmp r5, r2
a000eb1c: 0a000013 beq a000eb70 <_Thread_queue_Dequeue_fifo+0x70>
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
a000eb20: e5952000 ldr r2, [r5]
the_thread = (Thread_Control *)
a000eb24: e1a04005 mov r4, r5
head->next = new_first;
a000eb28: e5802000 str r2, [r0]
new_first->previous = head;
a000eb2c: e5820004 str r0, [r2, #4]
_Chain_Get_first_unprotected( &the_thread_queue->Queues.Fifo );
the_thread->Wait.queue = NULL;
a000eb30: e3a02000 mov r2, #0
a000eb34: e5852044 str r2, [r5, #68] ; 0x44
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
a000eb38: e5952050 ldr r2, [r5, #80] ; 0x50
a000eb3c: e3520002 cmp r2, #2
a000eb40: 0a000001 beq a000eb4c <_Thread_queue_Dequeue_fifo+0x4c>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000eb44: e129f003 msr CPSR_fc, r3
a000eb48: ea000004 b a000eb60 <_Thread_queue_Dequeue_fifo+0x60>
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
a000eb4c: e3a02003 mov r2, #3 <== NOT EXECUTED
a000eb50: e5852050 str r2, [r5, #80] ; 0x50 <== NOT EXECUTED
a000eb54: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
_ISR_Enable( level );
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
(void) _Watchdog_Remove( &the_thread->Timer );
a000eb58: e2850048 add r0, r5, #72 ; 0x48 <== NOT EXECUTED
a000eb5c: ebfff679 bl a000c548 <_Watchdog_Remove> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
a000eb60: e1a00005 mov r0, r5
a000eb64: e59f1014 ldr r1, [pc, #20] ; a000eb80 <_Thread_queue_Dequeue_fifo+0x80>
a000eb68: ebfff1e1 bl a000b2f4 <_Thread_Clear_state>
a000eb6c: ea000001 b a000eb78 <_Thread_queue_Dequeue_fifo+0x78>
a000eb70: e129f003 msr CPSR_fc, r3
return the_thread;
}
_ISR_Enable( level );
return NULL;
a000eb74: e3a04000 mov r4, #0
}
a000eb78: e1a00004 mov r0, r4
a000eb7c: e8bd8030 pop {r4, r5, pc}
a000b9ac <_Thread_queue_Dequeue_priority>:
*/
Thread_Control *_Thread_queue_Dequeue_priority(
Thread_queue_Control *the_thread_queue
)
{
a000b9ac: e92d4030 push {r4, r5, lr}
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000b9b0: e10f1000 mrs r1, CPSR
a000b9b4: e3813080 orr r3, r1, #128 ; 0x80
a000b9b8: e129f003 msr CPSR_fc, r3
Chain_Node *new_second_node;
Chain_Node *last_node;
Chain_Node *next_node;
Chain_Node *previous_node;
_ISR_Disable( level );
a000b9bc: e3a02000 mov r2, #0
for( index=0 ;
a000b9c0: e1a03002 mov r3, r2
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
a000b9c4: e3a0c00c mov ip, #12
a000b9c8: e004039c mul r4, ip, r3
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
return( the_thread );
}
a000b9cc: e7905002 ldr r5, [r0, r2]
a000b9d0: e2844004 add r4, r4, #4
a000b9d4: e0804004 add r4, r0, r4
_ISR_Disable( level );
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) {
a000b9d8: e1550004 cmp r5, r4
a000b9dc: 0a000009 beq a000ba08 <_Thread_queue_Dequeue_priority+0x5c>
*/
_ISR_Enable( level );
return NULL;
dequeue:
the_thread->Wait.queue = NULL;
a000b9e0: e3a03000 mov r3, #0
a000b9e4: e5853044 str r3, [r5, #68] ; 0x44
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
return( the_thread );
}
a000b9e8: e5953038 ldr r3, [r5, #56] ; 0x38
a000b9ec: e285c03c add ip, r5, #60 ; 0x3c
_ISR_Disable( level );
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) {
the_thread = (Thread_Control *) _Chain_First(
a000b9f0: e1a04005 mov r4, r5
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 ) ) {
a000b9f4: e153000c cmp r3, ip
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;
a000b9f8: e5952000 ldr r2, [r5]
previous_node = the_thread->Object.Node.previous;
a000b9fc: e5950004 ldr r0, [r5, #4]
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
a000ba00: 1a000007 bne a000ba24 <_Thread_queue_Dequeue_priority+0x78>
a000ba04: ea000017 b a000ba68 <_Thread_queue_Dequeue_priority+0xbc>
Chain_Node *previous_node;
_ISR_Disable( level );
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
a000ba08: e2833001 add r3, r3, #1
Chain_Node *last_node;
Chain_Node *next_node;
Chain_Node *previous_node;
_ISR_Disable( level );
for( index=0 ;
a000ba0c: e3530004 cmp r3, #4
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
a000ba10: e282200c add r2, r2, #12
Chain_Node *last_node;
Chain_Node *next_node;
Chain_Node *previous_node;
_ISR_Disable( level );
for( index=0 ;
a000ba14: 1affffeb bne a000b9c8 <_Thread_queue_Dequeue_priority+0x1c>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000ba18: e129f001 msr CPSR_fc, r1
/*
* We did not find a thread to unblock.
*/
_ISR_Enable( level );
return NULL;
a000ba1c: e3a04000 mov r4, #0
a000ba20: ea00001f b a000baa4 <_Thread_queue_Dequeue_priority+0xf8>
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
return( the_thread );
}
a000ba24: e595c040 ldr ip, [r5, #64] ; 0x40 <== NOT EXECUTED
next_node = the_thread->Object.Node.next;
previous_node = the_thread->Object.Node.previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
last_node = _Chain_Last( &the_thread->Wait.Block2n );
new_second_node = new_first_node->next;
a000ba28: e593e000 ldr lr, [r3] <== NOT EXECUTED
previous_node->next = new_first_node;
next_node->previous = new_first_node;
a000ba2c: e5823004 str r3, [r2, #4] <== NOT EXECUTED
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;
a000ba30: e5803000 str r3, [r0] <== NOT EXECUTED
next_node->previous = new_first_node;
new_first_node->next = next_node;
new_first_node->previous = previous_node;
a000ba34: e5830004 str r0, [r3, #4] <== NOT EXECUTED
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;
a000ba38: e5832000 str r2, [r3] <== NOT EXECUTED
new_first_node->previous = previous_node;
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
a000ba3c: e5950038 ldr r0, [r5, #56] ; 0x38 <== NOT EXECUTED
a000ba40: e5952040 ldr r2, [r5, #64] ; 0x40 <== NOT EXECUTED
a000ba44: e1500002 cmp r0, r2 <== NOT EXECUTED
a000ba48: 0a000008 beq a000ba70 <_Thread_queue_Dequeue_priority+0xc4><== NOT EXECUTED
/* > two threads on 2-n */
head = _Chain_Head( &new_first_thread->Wait.Block2n );
a000ba4c: e2832038 add r2, r3, #56 ; 0x38 <== NOT EXECUTED
tail = _Chain_Tail( &new_first_thread->Wait.Block2n );
new_second_node->previous = head;
head->next = new_second_node;
a000ba50: e583e038 str lr, [r3, #56] ; 0x38 <== NOT EXECUTED
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 );
new_second_node->previous = head;
a000ba54: e58e2004 str r2, [lr, #4] <== NOT EXECUTED
head->next = new_second_node;
tail->previous = last_node;
a000ba58: e583c040 str ip, [r3, #64] ; 0x40 <== NOT EXECUTED
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 );
a000ba5c: e283303c add r3, r3, #60 ; 0x3c <== NOT EXECUTED
new_second_node->previous = head;
head->next = new_second_node;
tail->previous = last_node;
last_node->next = tail;
a000ba60: e58c3000 str r3, [ip] <== NOT EXECUTED
a000ba64: ea000001 b a000ba70 <_Thread_queue_Dequeue_priority+0xc4> <== NOT EXECUTED
}
} else {
previous_node->next = next_node;
a000ba68: e5802000 str r2, [r0]
next_node->previous = previous_node;
a000ba6c: e5820004 str r0, [r2, #4]
}
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
a000ba70: e5953050 ldr r3, [r5, #80] ; 0x50
a000ba74: e3530002 cmp r3, #2
a000ba78: 0a000001 beq a000ba84 <_Thread_queue_Dequeue_priority+0xd8>
a000ba7c: e129f001 msr CPSR_fc, r1
a000ba80: ea000004 b a000ba98 <_Thread_queue_Dequeue_priority+0xec>
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
a000ba84: e3a03003 mov r3, #3 <== NOT EXECUTED
a000ba88: e5853050 str r3, [r5, #80] ; 0x50 <== NOT EXECUTED
a000ba8c: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED
_ISR_Enable( level );
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
(void) _Watchdog_Remove( &the_thread->Timer );
a000ba90: e2850048 add r0, r5, #72 ; 0x48 <== NOT EXECUTED
a000ba94: eb0002ab bl a000c548 <_Watchdog_Remove> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
a000ba98: e1a00005 mov r0, r5
a000ba9c: e59f1008 ldr r1, [pc, #8] ; a000baac <_Thread_queue_Dequeue_priority+0x100>
a000baa0: ebfffe13 bl a000b2f4 <_Thread_Clear_state>
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
return( the_thread );
}
a000baa4: e1a00004 mov r0, r4
a000baa8: e8bd8030 pop {r4, r5, pc}
a000eb84 <_Thread_queue_Enqueue_fifo>:
Thread_blocking_operation_States _Thread_queue_Enqueue_fifo (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
a000eb84: e92d4010 push {r4, lr}
a000eb88: e1a03000 mov r3, r0
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000eb8c: e10fc000 mrs ip, CPSR
a000eb90: e38c0080 orr r0, ip, #128 ; 0x80
a000eb94: e129f000 msr CPSR_fc, r0
Thread_blocking_operation_States sync_state;
ISR_Level level;
_ISR_Disable( level );
sync_state = the_thread_queue->sync_state;
a000eb98: e5930030 ldr r0, [r3, #48] ; 0x30
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
a000eb9c: e3a04000 mov r4, #0
a000eba0: e5834030 str r4, [r3, #48] ; 0x30
if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) {
a000eba4: e3500001 cmp r0, #1
a000eba8: 1a000008 bne a000ebd0 <_Thread_queue_Enqueue_fifo+0x4c>
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
a000ebac: e5932008 ldr r2, [r3, #8]
RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
a000ebb0: e2834004 add r4, r3, #4
Chain_Node *old_last = tail->previous;
the_node->next = tail;
tail->previous = the_node;
a000ebb4: e5831008 str r1, [r3, #8]
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
the_node->next = tail;
a000ebb8: e5814000 str r4, [r1]
tail->previous = the_node;
old_last->next = the_node;
the_node->previous = old_last;
a000ebbc: e5812004 str r2, [r1, #4]
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
the_node->next = tail;
tail->previous = the_node;
old_last->next = the_node;
a000ebc0: e5821000 str r1, [r2]
_Chain_Append_unprotected(
&the_thread_queue->Queues.Fifo,
&the_thread->Object.Node
);
the_thread->Wait.queue = the_thread_queue;
a000ebc4: e5813044 str r3, [r1, #68] ; 0x44
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000ebc8: e129f00c msr CPSR_fc, ip
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
a000ebcc: e8bd8010 pop {r4, pc}
* 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;
a000ebd0: e582c000 str ip, [r2] <== NOT EXECUTED
return sync_state;
}
a000ebd4: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a000bb50 <_Thread_queue_Enqueue_priority>:
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
a000bb50: e591c014 ldr ip, [r1, #20]
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 );
a000bb54: e281303c add r3, r1, #60 ; 0x3c
head->next = tail;
a000bb58: e5813038 str r3, [r1, #56] ; 0x38
head->previous = NULL;
a000bb5c: e3a03000 mov r3, #0
a000bb60: e581303c str r3, [r1, #60] ; 0x3c
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
block_state = the_thread_queue->state;
if ( _Thread_queue_Is_reverse_search( priority ) )
a000bb64: e31c0020 tst ip, #32
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
a000bb68: e2813038 add r3, r1, #56 ; 0x38
Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
a000bb6c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
tail->previous = head;
a000bb70: e5813040 str r3, [r1, #64] ; 0x40
_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 ];
block_state = the_thread_queue->state;
a000bb74: e5907038 ldr r7, [r0, #56] ; 0x38
RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number (
Priority_Control the_priority
)
{
return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER);
a000bb78: e1a0332c lsr r3, ip, #6
if ( _Thread_queue_Is_reverse_search( priority ) )
a000bb7c: 1a000026 bne a000bc1c <_Thread_queue_Enqueue_priority+0xcc>
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
a000bb80: e3a0600c mov r6, #12
a000bb84: e0030396 mul r3, r6, r3
a000bb88: e0808003 add r8, r0, r3
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Tail(the_chain));
a000bb8c: e2833004 add r3, r3, #4
a000bb90: e0806003 add r6, r0, r3
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000bb94: e10f4000 mrs r4, CPSR
a000bb98: e3843080 orr r3, r4, #128 ; 0x80
a000bb9c: e129f003 msr CPSR_fc, r3
if ( _Thread_queue_Is_reverse_search( priority ) )
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
a000bba0: e3e05000 mvn r5, #0
_ISR_Disable( level );
search_thread = (Thread_Control *) _Chain_First( header );
a000bba4: e5983000 ldr r3, [r8]
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
a000bba8: ea00000b b a000bbdc <_Thread_queue_Enqueue_priority+0x8c>
search_priority = search_thread->current_priority;
a000bbac: e5935014 ldr r5, [r3, #20]
if ( priority <= search_priority )
a000bbb0: e15c0005 cmp ip, r5
a000bbb4: 9a00000a bls a000bbe4 <_Thread_queue_Enqueue_priority+0x94>
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
a000bbb8: e10fa000 mrs sl, CPSR
a000bbbc: e129f004 msr CPSR_fc, r4
a000bbc0: e129f00a msr CPSR_fc, sl
RTEMS_INLINE_ROUTINE bool _States_Are_set (
States_Control the_states,
States_Control mask
)
{
return ( (the_states & mask) != STATES_READY);
a000bbc4: e593a010 ldr sl, [r3, #16]
search_priority = search_thread->current_priority;
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
a000bbc8: e117000a tst r7, sl
a000bbcc: 1a000001 bne a000bbd8 <_Thread_queue_Enqueue_priority+0x88>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000bbd0: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED
a000bbd4: eaffffee b a000bb94 <_Thread_queue_Enqueue_priority+0x44> <== NOT EXECUTED
_ISR_Enable( level );
goto restart_forward_search;
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
a000bbd8: e5933000 ldr r3, [r3]
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 ) ) {
a000bbdc: e1530006 cmp r3, r6
a000bbe0: 1afffff1 bne a000bbac <_Thread_queue_Enqueue_priority+0x5c>
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
a000bbe4: e5906030 ldr r6, [r0, #48] ; 0x30
a000bbe8: e3560001 cmp r6, #1
a000bbec: 1a000039 bne a000bcd8 <_Thread_queue_Enqueue_priority+0x188>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
a000bbf0: e3a02000 mov r2, #0
if ( priority == search_priority )
a000bbf4: e15c0005 cmp ip, r5
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
a000bbf8: e5802030 str r2, [r0, #48] ; 0x30
if ( priority == search_priority )
a000bbfc: 0a00002b beq a000bcb0 <_Thread_queue_Enqueue_priority+0x160>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
a000bc00: e5932004 ldr r2, [r3, #4]
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
a000bc04: e5813000 str r3, [r1]
the_node->previous = previous_node;
a000bc08: e5812004 str r2, [r1, #4]
previous_node->next = the_node;
a000bc0c: e5821000 str r1, [r2]
search_node->previous = the_node;
a000bc10: e5831004 str r1, [r3, #4]
the_thread->Wait.queue = the_thread_queue;
a000bc14: e5810044 str r0, [r1, #68] ; 0x44
_ISR_Enable( level );
a000bc18: ea00002b b a000bccc <_Thread_queue_Enqueue_priority+0x17c>
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
a000bc1c: e3a0600c mov r6, #12
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
a000bc20: e59f80bc ldr r8, [pc, #188] ; a000bce4 <_Thread_queue_Enqueue_priority+0x194>
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
a000bc24: e0260693 mla r6, r3, r6, r0
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
a000bc28: e5d85000 ldrb r5, [r8]
a000bc2c: e2855001 add r5, r5, #1
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000bc30: e10f4000 mrs r4, CPSR
a000bc34: e3843080 orr r3, r4, #128 ; 0x80
a000bc38: e129f003 msr CPSR_fc, r3
_ISR_Disable( level );
search_thread = (Thread_Control *) _Chain_Last( header );
a000bc3c: e5963008 ldr r3, [r6, #8]
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
a000bc40: ea00000b b a000bc74 <_Thread_queue_Enqueue_priority+0x124>
search_priority = search_thread->current_priority;
a000bc44: e5935014 ldr r5, [r3, #20]
if ( priority >= search_priority )
a000bc48: e15c0005 cmp ip, r5
a000bc4c: 2a00000a bcs a000bc7c <_Thread_queue_Enqueue_priority+0x12c>
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
a000bc50: e10fa000 mrs sl, CPSR <== NOT EXECUTED
a000bc54: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED
a000bc58: e129f00a msr CPSR_fc, sl <== NOT EXECUTED
a000bc5c: e593a010 ldr sl, [r3, #16] <== NOT EXECUTED
search_priority = search_thread->current_priority;
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
a000bc60: e117000a tst r7, sl <== NOT EXECUTED
a000bc64: 1a000001 bne a000bc70 <_Thread_queue_Enqueue_priority+0x120><== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000bc68: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED
a000bc6c: eaffffed b a000bc28 <_Thread_queue_Enqueue_priority+0xd8> <== NOT EXECUTED
_ISR_Enable( level );
goto restart_reverse_search;
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
a000bc70: e5933004 ldr r3, [r3, #4] <== NOT EXECUTED
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 ) ) {
a000bc74: e1530006 cmp r3, r6
a000bc78: 1afffff1 bne a000bc44 <_Thread_queue_Enqueue_priority+0xf4>
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
a000bc7c: e5906030 ldr r6, [r0, #48] ; 0x30
a000bc80: e3560001 cmp r6, #1
a000bc84: 1a000013 bne a000bcd8 <_Thread_queue_Enqueue_priority+0x188>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
a000bc88: e3a02000 mov r2, #0
if ( priority == search_priority )
a000bc8c: e15c0005 cmp ip, r5
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
a000bc90: e5802030 str r2, [r0, #48] ; 0x30
if ( priority == search_priority )
a000bc94: 0a000005 beq a000bcb0 <_Thread_queue_Enqueue_priority+0x160>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
a000bc98: e5932000 ldr r2, [r3]
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
a000bc9c: e881000c stm r1, {r2, r3}
search_node->next = the_node;
next_node->previous = the_node;
a000bca0: e5821004 str r1, [r2, #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;
a000bca4: e5831000 str r1, [r3]
next_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
a000bca8: e5810044 str r0, [r1, #68] ; 0x44
_ISR_Enable( level );
a000bcac: ea000006 b a000bccc <_Thread_queue_Enqueue_priority+0x17c>
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;
a000bcb0: e5932040 ldr r2, [r3, #64] ; 0x40 <== NOT EXECUTED
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 );
a000bcb4: e283c03c add ip, r3, #60 ; 0x3c <== NOT EXECUTED
previous_node = search_node->previous;
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
a000bcb8: e581c000 str ip, [r1] <== NOT EXECUTED
the_node->previous = previous_node;
a000bcbc: e5812004 str r2, [r1, #4] <== NOT EXECUTED
previous_node->next = the_node;
a000bcc0: e5821000 str r1, [r2] <== NOT EXECUTED
search_node->previous = the_node;
a000bcc4: e5831040 str r1, [r3, #64] ; 0x40 <== NOT EXECUTED
the_thread->Wait.queue = the_thread_queue;
a000bcc8: e5810044 str r0, [r1, #68] ; 0x44 <== NOT EXECUTED
a000bccc: e129f004 msr CPSR_fc, r4
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
a000bcd0: e3a00001 mov r0, #1
a000bcd4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
* 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;
a000bcd8: e5824000 str r4, [r2] <== NOT EXECUTED
return the_thread_queue->sync_state;
a000bcdc: e5900030 ldr r0, [r0, #48] ; 0x30 <== NOT EXECUTED
}
a000bce0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
a000bab0 <_Thread_queue_Enqueue_with_handler>:
Thread_queue_Control *,
Thread_Control *,
ISR_Level *
);
the_thread = _Thread_Executing;
a000bab0: e59f3088 ldr r3, [pc, #136] ; a000bb40 <_Thread_queue_Enqueue_with_handler+0x90>
void _Thread_queue_Enqueue_with_handler(
Thread_queue_Control *the_thread_queue,
Watchdog_Interval timeout,
Thread_queue_Timeout_callout handler
)
{
a000bab4: e92d40f1 push {r0, r4, r5, r6, r7, lr}
Thread_queue_Control *,
Thread_Control *,
ISR_Level *
);
the_thread = _Thread_Executing;
a000bab8: e5934004 ldr r4, [r3, #4]
void _Thread_queue_Enqueue_with_handler(
Thread_queue_Control *the_thread_queue,
Watchdog_Interval timeout,
Thread_queue_Timeout_callout handler
)
{
a000babc: e1a05000 mov r5, r0
a000bac0: e1a06001 mov r6, r1
else
#endif
/*
* Set the blocking state for this thread queue in the thread.
*/
_Thread_Set_state( the_thread, the_thread_queue->state );
a000bac4: e1a00004 mov r0, r4
a000bac8: e5951038 ldr r1, [r5, #56] ; 0x38
void _Thread_queue_Enqueue_with_handler(
Thread_queue_Control *the_thread_queue,
Watchdog_Interval timeout,
Thread_queue_Timeout_callout handler
)
{
a000bacc: e1a07002 mov r7, r2
else
#endif
/*
* Set the blocking state for this thread queue in the thread.
*/
_Thread_Set_state( the_thread, the_thread_queue->state );
a000bad0: eb0000e2 bl a000be60 <_Thread_Set_state>
/*
* If the thread wants to timeout, then schedule its timer.
*/
if ( timeout ) {
a000bad4: e3560000 cmp r6, #0
a000bad8: 0a000009 beq a000bb04 <_Thread_queue_Enqueue_with_handler+0x54>
_Watchdog_Initialize(
a000badc: e5942008 ldr r2, [r4, #8]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a000bae0: e3a03000 mov r3, #0
a000bae4: e5843050 str r3, [r4, #80] ; 0x50
the_watchdog->routine = routine;
a000bae8: e5847064 str r7, [r4, #100] ; 0x64
the_watchdog->id = id;
a000baec: e5842068 str r2, [r4, #104] ; 0x68
the_watchdog->user_data = user_data;
a000baf0: e584306c str r3, [r4, #108] ; 0x6c
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
a000baf4: e5846054 str r6, [r4, #84] ; 0x54
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a000baf8: e59f0044 ldr r0, [pc, #68] ; a000bb44 <_Thread_queue_Enqueue_with_handler+0x94>
a000bafc: e2841048 add r1, r4, #72 ; 0x48
a000bb00: eb000238 bl a000c3e8 <_Watchdog_Insert>
}
/*
* Now enqueue the thread per the discipline for this thread queue.
*/
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
a000bb04: e5951034 ldr r1, [r5, #52] ; 0x34
enqueue_p = _Thread_queue_Enqueue_priority;
a000bb08: e59f2038 ldr r2, [pc, #56] ; a000bb48 <_Thread_queue_Enqueue_with_handler+0x98>
a000bb0c: e59f3038 ldr r3, [pc, #56] ; a000bb4c <_Thread_queue_Enqueue_with_handler+0x9c>
a000bb10: e3510001 cmp r1, #1
a000bb14: 01a03002 moveq r3, r2
else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
enqueue_p = _Thread_queue_Enqueue_fifo;
sync_state = (*enqueue_p)( the_thread_queue, the_thread, &level );
a000bb18: e1a00005 mov r0, r5
a000bb1c: e1a01004 mov r1, r4
a000bb20: e1a0200d mov r2, sp
a000bb24: e12fff33 blx r3
if ( sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
a000bb28: e3500001 cmp r0, #1
a000bb2c: 0a000002 beq a000bb3c <_Thread_queue_Enqueue_with_handler+0x8c>
_Thread_blocking_operation_Cancel( sync_state, the_thread, level );
a000bb30: e1a01004 mov r1, r4 <== NOT EXECUTED
a000bb34: e59d2000 ldr r2, [sp] <== NOT EXECUTED
a000bb38: ebfffd7f bl a000b13c <_Thread_blocking_operation_Cancel> <== NOT EXECUTED
}
a000bb3c: e8bd80f8 pop {r3, r4, r5, r6, r7, pc}
a00101b4 <_Thread_queue_Extract_fifo>:
void _Thread_queue_Extract_fifo(
Thread_queue_Control *the_thread_queue __attribute__((unused)),
Thread_Control *the_thread
)
{
a00101b4: e92d4010 push {r4, lr}
a00101b8: e1a04001 mov r4, r1
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a00101bc: e10f3000 mrs r3, CPSR
a00101c0: e3832080 orr r2, r3, #128 ; 0x80
a00101c4: e129f002 msr CPSR_fc, r2
a00101c8: e59f2060 ldr r2, [pc, #96] ; a0010230 <_Thread_queue_Extract_fifo+0x7c>
a00101cc: e5911010 ldr r1, [r1, #16]
a00101d0: e0012002 and r2, r1, r2
ISR_Level level;
_ISR_Disable( level );
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
a00101d4: e3520000 cmp r2, #0
a00101d8: 1a000001 bne a00101e4 <_Thread_queue_Extract_fifo+0x30>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a00101dc: e129f003 msr CPSR_fc, r3
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
a00101e0: e8bd8010 pop {r4, pc}
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
a00101e4: e8940006 ldm r4, {r1, r2}
next->previous = previous;
a00101e8: e5812004 str r2, [r1, #4]
previous->next = next;
a00101ec: e5821000 str r1, [r2]
return;
}
_Chain_Extract_unprotected( &the_thread->Object.Node );
the_thread->Wait.queue = NULL;
a00101f0: e3a02000 mov r2, #0
a00101f4: e5842044 str r2, [r4, #68] ; 0x44
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
a00101f8: e5942050 ldr r2, [r4, #80] ; 0x50
a00101fc: e3520002 cmp r2, #2
a0010200: 0a000001 beq a001020c <_Thread_queue_Extract_fifo+0x58>
a0010204: e129f003 msr CPSR_fc, r3
a0010208: ea000004 b a0010220 <_Thread_queue_Extract_fifo+0x6c>
a001020c: e3a02003 mov r2, #3 <== NOT EXECUTED
a0010210: e5842050 str r2, [r4, #80] ; 0x50 <== NOT EXECUTED
a0010214: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
_ISR_Enable( level );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
(void) _Watchdog_Remove( &the_thread->Timer );
a0010218: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED
a001021c: ebfff0c9 bl a000c548 <_Watchdog_Remove> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
a0010220: e59f100c ldr r1, [pc, #12] ; a0010234 <_Thread_queue_Extract_fifo+0x80>
a0010224: e1a00004 mov r0, r4
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
a0010228: e8bd4010 pop {r4, lr}
a001022c: eaffec30 b a000b2f4 <_Thread_Clear_state>
a000ebf0 <_Thread_queue_Extract_priority_helper>:
void _Thread_queue_Extract_priority_helper(
Thread_queue_Control *the_thread_queue __attribute__((unused)),
Thread_Control *the_thread,
bool requeuing
)
{
a000ebf0: e92d4070 push {r4, r5, r6, lr}
a000ebf4: e20220ff and r2, r2, #255 ; 0xff
a000ebf8: e1a04001 mov r4, r1
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000ebfc: e10f1000 mrs r1, CPSR
a000ec00: e3813080 orr r3, r1, #128 ; 0x80
a000ec04: e129f003 msr CPSR_fc, r3
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue (
States_Control the_states
)
{
return (the_states & STATES_WAITING_ON_THREAD_QUEUE);
a000ec08: e59f30b0 ldr r3, [pc, #176] ; a000ecc0 <_Thread_queue_Extract_priority_helper+0xd0>
a000ec0c: e5940010 ldr r0, [r4, #16]
a000ec10: e0003003 and r3, r0, r3
Chain_Node *new_second_node;
Chain_Node *last_node;
the_node = (Chain_Node *) the_thread;
_ISR_Disable( level );
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
a000ec14: e3530000 cmp r3, #0
a000ec18: 1a000000 bne a000ec20 <_Thread_queue_Extract_priority_helper+0x30>
_ISR_Enable( level );
a000ec1c: ea000017 b a000ec80 <_Thread_queue_Extract_priority_helper+0x90>
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
a000ec20: e5943038 ldr r3, [r4, #56] ; 0x38
/*
* The thread was actually waiting on a thread queue so let's remove it.
*/
next_node = the_node->next;
a000ec24: e8941001 ldm r4, {r0, ip}
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
a000ec28: e284503c add r5, r4, #60 ; 0x3c
previous_node = the_node->previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
a000ec2c: e1530005 cmp r3, r5
head->next = new_second_node;
tail->previous = last_node;
last_node->next = tail;
}
} else {
previous_node->next = next_node;
a000ec30: 058c0000 streq r0, [ip]
next_node->previous = previous_node;
a000ec34: 0580c004 streq ip, [r0, #4]
*/
next_node = the_node->next;
previous_node = the_node->previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
a000ec38: 0a00000e beq a000ec78 <_Thread_queue_Extract_priority_helper+0x88>
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
a000ec3c: e5945040 ldr r5, [r4, #64] ; 0x40 <== NOT EXECUTED
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
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;
a000ec40: e5936000 ldr r6, [r3] <== NOT EXECUTED
previous_node->next = new_first_node;
next_node->previous = new_first_node;
a000ec44: e5803004 str r3, [r0, #4] <== NOT EXECUTED
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;
a000ec48: e58c3000 str r3, [ip] <== NOT EXECUTED
next_node->previous = new_first_node;
new_first_node->next = next_node;
new_first_node->previous = previous_node;
a000ec4c: e8831001 stm r3, {r0, ip} <== NOT EXECUTED
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
a000ec50: e594c038 ldr ip, [r4, #56] ; 0x38 <== NOT EXECUTED
a000ec54: e5940040 ldr r0, [r4, #64] ; 0x40 <== NOT EXECUTED
a000ec58: e15c0000 cmp ip, r0 <== NOT EXECUTED
a000ec5c: 0a000005 beq a000ec78 <_Thread_queue_Extract_priority_helper+0x88><== NOT EXECUTED
/* > two threads on 2-n */
head = _Chain_Head( &new_first_thread->Wait.Block2n );
a000ec60: e2830038 add r0, r3, #56 ; 0x38 <== NOT EXECUTED
tail = _Chain_Tail( &new_first_thread->Wait.Block2n );
new_second_node->previous = head;
head->next = new_second_node;
a000ec64: e5836038 str r6, [r3, #56] ; 0x38 <== NOT EXECUTED
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 );
new_second_node->previous = head;
a000ec68: e5860004 str r0, [r6, #4] <== NOT EXECUTED
head->next = new_second_node;
tail->previous = last_node;
a000ec6c: e5835040 str r5, [r3, #64] ; 0x40 <== NOT EXECUTED
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 );
a000ec70: e283303c add r3, r3, #60 ; 0x3c <== NOT EXECUTED
new_second_node->previous = head;
head->next = new_second_node;
tail->previous = last_node;
last_node->next = tail;
a000ec74: e5853000 str r3, [r5] <== NOT EXECUTED
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
a000ec78: e3520000 cmp r2, #0
a000ec7c: 0a000001 beq a000ec88 <_Thread_queue_Extract_priority_helper+0x98>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000ec80: e129f001 msr CPSR_fc, r1
a000ec84: e8bd8070 pop {r4, r5, r6, pc}
_ISR_Enable( level );
return;
}
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
a000ec88: e5943050 ldr r3, [r4, #80] ; 0x50 <== NOT EXECUTED
a000ec8c: e3530002 cmp r3, #2 <== NOT EXECUTED
a000ec90: 0a000001 beq a000ec9c <_Thread_queue_Extract_priority_helper+0xac><== NOT EXECUTED
a000ec94: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED
a000ec98: ea000004 b a000ecb0 <_Thread_queue_Extract_priority_helper+0xc0><== NOT EXECUTED
a000ec9c: e3a03003 mov r3, #3 <== NOT EXECUTED
a000eca0: e5843050 str r3, [r4, #80] ; 0x50 <== NOT EXECUTED
a000eca4: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED
_ISR_Enable( level );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
(void) _Watchdog_Remove( &the_thread->Timer );
a000eca8: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED
a000ecac: ebfff625 bl a000c548 <_Watchdog_Remove> <== NOT EXECUTED
a000ecb0: e59f100c ldr r1, [pc, #12] ; a000ecc4 <_Thread_queue_Extract_priority_helper+0xd4><== NOT EXECUTED
a000ecb4: e1a00004 mov r0, r4 <== NOT EXECUTED
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
a000ecb8: e8bd4070 pop {r4, r5, r6, lr} <== NOT EXECUTED
a000ecbc: eafff18c b a000b2f4 <_Thread_Clear_state> <== NOT EXECUTED
a001edac <_Thread_queue_First_priority>:
*/
Thread_Control *_Thread_queue_First_priority (
Thread_queue_Control *the_thread_queue
)
{
a001edac: e92d4010 push {r4, lr} <== NOT EXECUTED
a001edb0: e3a02000 mov r2, #0 <== NOT EXECUTED
uint32_t index;
for( index=0 ;
a001edb4: e1a03002 mov r3, r2 <== NOT EXECUTED
a001edb8: e3a0c00c mov ip, #12 <== NOT EXECUTED
a001edbc: e004039c mul r4, ip, r3 <== NOT EXECUTED
return (Thread_Control *) _Chain_First(
&the_thread_queue->Queues.Priority[ index ]
);
}
return NULL;
}
a001edc0: e7901002 ldr r1, [r0, r2] <== NOT EXECUTED
a001edc4: e2844004 add r4, r4, #4 <== NOT EXECUTED
a001edc8: e0804004 add r4, r0, r4 <== NOT EXECUTED
uint32_t index;
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) )
a001edcc: e1510004 cmp r1, r4 <== NOT EXECUTED
a001edd0: 0a000001 beq a001eddc <_Thread_queue_First_priority+0x30> <== NOT EXECUTED
return (Thread_Control *) _Chain_First(
a001edd4: e1a00001 mov r0, r1 <== NOT EXECUTED
a001edd8: e8bd8010 pop {r4, pc} <== NOT EXECUTED
{
uint32_t index;
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
a001eddc: e2833001 add r3, r3, #1 <== NOT EXECUTED
Thread_queue_Control *the_thread_queue
)
{
uint32_t index;
for( index=0 ;
a001ede0: e3530004 cmp r3, #4 <== NOT EXECUTED
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
a001ede4: e282200c add r2, r2, #12 <== NOT EXECUTED
Thread_queue_Control *the_thread_queue
)
{
uint32_t index;
for( index=0 ;
a001ede8: 1afffff3 bne a001edbc <_Thread_queue_First_priority+0x10> <== NOT EXECUTED
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) )
return (Thread_Control *) _Chain_First(
&the_thread_queue->Queues.Priority[ index ]
);
}
return NULL;
a001edec: e3a00000 mov r0, #0 <== NOT EXECUTED
}
a001edf0: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a000ecc8 <_Thread_queue_Process_timeout>:
#include <rtems/score/tqdata.h>
void _Thread_queue_Process_timeout(
Thread_Control *the_thread
)
{
a000ecc8: e1a01000 mov r1, r0 <== NOT EXECUTED
Thread_queue_Control *the_thread_queue = the_thread->Wait.queue;
a000eccc: e5900044 ldr r0, [r0, #68] ; 0x44 <== NOT EXECUTED
* If it is not satisfied, then it is "nothing happened" and
* this is the "timeout" transition. After a request is satisfied,
* a timeout is not allowed to occur.
*/
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED &&
a000ecd0: e5903030 ldr r3, [r0, #48] ; 0x30 <== NOT EXECUTED
a000ecd4: e3530000 cmp r3, #0 <== NOT EXECUTED
a000ecd8: 0a000009 beq a000ed04 <_Thread_queue_Process_timeout+0x3c> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
a000ecdc: e59f202c ldr r2, [pc, #44] ; a000ed10 <_Thread_queue_Process_timeout+0x48><== NOT EXECUTED
a000ece0: e5922004 ldr r2, [r2, #4] <== NOT EXECUTED
a000ece4: e1510002 cmp r1, r2 <== NOT EXECUTED
a000ece8: 1a000005 bne a000ed04 <_Thread_queue_Process_timeout+0x3c> <== NOT EXECUTED
_Thread_Is_executing( the_thread ) ) {
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) {
a000ecec: e3530003 cmp r3, #3 <== NOT EXECUTED
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
a000ecf0: 1590303c ldrne r3, [r0, #60] ; 0x3c <== NOT EXECUTED
a000ecf4: 15813034 strne r3, [r1, #52] ; 0x34 <== NOT EXECUTED
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
a000ecf8: 13a03002 movne r3, #2 <== NOT EXECUTED
a000ecfc: 15803030 strne r3, [r0, #48] ; 0x30 <== NOT EXECUTED
a000ed00: e12fff1e bx lr <== NOT EXECUTED
}
} else {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
a000ed04: e590303c ldr r3, [r0, #60] ; 0x3c <== NOT EXECUTED
a000ed08: e5813034 str r3, [r1, #52] ; 0x34 <== NOT EXECUTED
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
a000ed0c: eaffffb1 b a000ebd8 <_Thread_queue_Extract> <== NOT EXECUTED
a000be08 <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
a000be08: e92d4001 push {r0, lr} <== NOT EXECUTED
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
a000be0c: e1a0100d mov r1, sp <== NOT EXECUTED
a000be10: ebfffe0b bl a000b644 <_Thread_Get> <== NOT EXECUTED
switch ( location ) {
a000be14: e59d3000 ldr r3, [sp] <== NOT EXECUTED
a000be18: e3530000 cmp r3, #0 <== NOT EXECUTED
a000be1c: 1a000004 bne a000be34 <_Thread_queue_Timeout+0x2c> <== NOT EXECUTED
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
a000be20: eb000ba8 bl a000ecc8 <_Thread_queue_Process_timeout> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
a000be24: e59f300c ldr r3, [pc, #12] ; a000be38 <_Thread_queue_Timeout+0x30><== NOT EXECUTED
a000be28: e5932000 ldr r2, [r3] <== NOT EXECUTED
a000be2c: e2422001 sub r2, r2, #1 <== NOT EXECUTED
a000be30: e5832000 str r2, [r3] <== NOT EXECUTED
_Thread_Unnest_dispatch();
break;
}
}
a000be34: e8bd8008 pop {r3, pc} <== NOT EXECUTED
a0018574 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
a0018574: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
a0018578: e24dd01c sub sp, sp, #28
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
a001857c: e28db010 add fp, sp, #16
a0018580: e28d6004 add r6, sp, #4
a0018584: e28b2004 add r2, fp, #4
head->previous = NULL;
a0018588: e3a03000 mov r3, #0
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
a001858c: e2868004 add r8, r6, #4
a0018590: e1a04000 mov r4, r0
a0018594: e58d2010 str r2, [sp, #16]
head->previous = NULL;
a0018598: e58d3014 str r3, [sp, #20]
tail->previous = head;
a001859c: e58db018 str fp, [sp, #24]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
a00185a0: e58d8004 str r8, [sp, #4]
head->previous = NULL;
a00185a4: e58d3008 str r3, [sp, #8]
tail->previous = head;
a00185a8: e58d600c str r6, [sp, #12]
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_tail(
const Chain_Control *the_chain
)
{
return &the_chain->Tail.Node;
a00185ac: e58d2000 str r2, [sp]
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
a00185b0: e59f9160 ldr r9, [pc, #352] ; a0018718 <_Timer_server_Body+0x1a4>
Chain_Control *tmp;
/*
* 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;
a00185b4: e584b078 str fp, [r4, #120] ; 0x78
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
a00185b8: e284a030 add sl, r4, #48 ; 0x30
/*
* 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 );
a00185bc: e2847068 add r7, r4, #104 ; 0x68
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
a00185c0: e59f2154 ldr r2, [pc, #340] ; a001871c <_Timer_server_Body+0x1a8>
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
a00185c4: e1a0000a mov r0, sl
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
a00185c8: e5923000 ldr r3, [r2]
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
a00185cc: e594103c ldr r1, [r4, #60] ; 0x3c
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
a00185d0: e1a02006 mov r2, r6
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
a00185d4: e584303c str r3, [r4, #60] ; 0x3c
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
a00185d8: e0611003 rsb r1, r1, r3
a00185dc: eb001067 bl a001c780 <_Watchdog_Adjust_to_chain>
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
a00185e0: e5995000 ldr r5, [r9]
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
a00185e4: e5942074 ldr r2, [r4, #116] ; 0x74
/*
* 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 ) {
a00185e8: e1550002 cmp r5, r2
a00185ec: 9a000004 bls a0018604 <_Timer_server_Body+0x90>
/*
* 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 );
a00185f0: e0621005 rsb r1, r2, r5
a00185f4: e1a00007 mov r0, r7
a00185f8: e1a02006 mov r2, r6
a00185fc: eb00105f bl a001c780 <_Watchdog_Adjust_to_chain>
a0018600: ea000004 b a0018618 <_Timer_server_Body+0xa4>
} else if ( snapshot < last_snapshot ) {
a0018604: 2a000003 bcs a0018618 <_Timer_server_Body+0xa4>
/*
* 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 );
a0018608: e1a00007 mov r0, r7 <== NOT EXECUTED
a001860c: e3a01001 mov r1, #1 <== NOT EXECUTED
a0018610: e0652002 rsb r2, r5, r2 <== NOT EXECUTED
a0018614: eb001031 bl a001c6e0 <_Watchdog_Adjust> <== NOT EXECUTED
}
watchdogs->last_snapshot = snapshot;
a0018618: e5845074 str r5, [r4, #116] ; 0x74
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
a001861c: e5940078 ldr r0, [r4, #120] ; 0x78
a0018620: eb000289 bl a001904c <_Chain_Get>
if ( timer == NULL ) {
a0018624: e2505000 subs r5, r0, #0
a0018628: 0a000009 beq a0018654 <_Timer_server_Body+0xe0>
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
a001862c: e5953038 ldr r3, [r5, #56] ; 0x38 <== NOT EXECUTED
a0018630: e3530001 cmp r3, #1 <== NOT EXECUTED
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
a0018634: 01a0000a moveq r0, sl <== NOT EXECUTED
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
a0018638: 0a000002 beq a0018648 <_Timer_server_Body+0xd4> <== NOT EXECUTED
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
a001863c: e3530003 cmp r3, #3 <== NOT EXECUTED
a0018640: 1afffff5 bne a001861c <_Timer_server_Body+0xa8> <== NOT EXECUTED
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
a0018644: e1a00007 mov r0, r7 <== NOT EXECUTED
a0018648: e2851010 add r1, r5, #16 <== NOT EXECUTED
a001864c: eb001076 bl a001c82c <_Watchdog_Insert> <== NOT EXECUTED
a0018650: eafffff1 b a001861c <_Timer_server_Body+0xa8> <== 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 );
a0018654: ebffff94 bl a00184ac <arm_interrupt_disable>
tmp = ts->insert_chain;
a0018658: e5943078 ldr r3, [r4, #120] ; 0x78
if ( _Chain_Is_empty( insert_chain ) ) {
a001865c: e59d2000 ldr r2, [sp]
a0018660: e59d3010 ldr r3, [sp, #16]
a0018664: e1530002 cmp r3, r2
ts->insert_chain = NULL;
a0018668: 05845078 streq r5, [r4, #120] ; 0x78
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
tmp = ts->insert_chain;
if ( _Chain_Is_empty( insert_chain ) ) {
a001866c: 13a05001 movne r5, #1
a0018670: e129f000 msr CPSR_fc, r0
* 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;
while ( do_loop ) {
a0018674: e3550000 cmp r5, #0
a0018678: 1affffd0 bne a00185c0 <_Timer_server_Body+0x4c>
_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 ) ) {
a001867c: e59d3004 ldr r3, [sp, #4]
a0018680: e1530008 cmp r3, r8
a0018684: 0a000012 beq a00186d4 <_Timer_server_Body+0x160>
/*
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
a0018688: ebffff87 bl a00184ac <arm_interrupt_disable>
initialized = false;
}
#endif
return status;
}
a001868c: e59d2004 ldr r2, [sp, #4]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
a0018690: e1520008 cmp r2, r8
a0018694: 0a00000c beq a00186cc <_Timer_server_Body+0x158>
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
a0018698: e5923000 ldr r3, [r2]
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
a001869c: e3520000 cmp r2, #0
head->next = new_first;
a00186a0: e58d3004 str r3, [sp, #4]
new_first->previous = head;
a00186a4: e5836004 str r6, [r3, #4]
a00186a8: 0a000007 beq a00186cc <_Timer_server_Body+0x158>
watchdog->state = WATCHDOG_INACTIVE;
a00186ac: e3a03000 mov r3, #0
a00186b0: e5823008 str r3, [r2, #8]
a00186b4: e129f000 msr CPSR_fc, r0
/*
* 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 );
a00186b8: e592301c ldr r3, [r2, #28]
a00186bc: e5920020 ldr r0, [r2, #32]
a00186c0: e5921024 ldr r1, [r2, #36] ; 0x24
a00186c4: e12fff33 blx r3
}
a00186c8: eaffffee b a0018688 <_Timer_server_Body+0x114>
a00186cc: e129f000 msr CPSR_fc, r0
a00186d0: eaffffb6 b a00185b0 <_Timer_server_Body+0x3c>
} else {
ts->active = false;
a00186d4: e5c4507c strb r5, [r4, #124] ; 0x7c
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
a00186d8: ebffff77 bl a00184bc <_Thread_Disable_dispatch>
_Thread_Set_state( ts->thread, STATES_DELAYING );
a00186dc: e3a01008 mov r1, #8
a00186e0: e5940000 ldr r0, [r4]
a00186e4: eb000e5a bl a001c054 <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
a00186e8: e1a00004 mov r0, r4
a00186ec: ebffff78 bl a00184d4 <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
a00186f0: e1a00004 mov r0, r4
a00186f4: ebffff8a bl a0018524 <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
a00186f8: eb000c16 bl a001b758 <_Thread_Enable_dispatch>
ts->active = true;
a00186fc: e3a03001 mov r3, #1
a0018700: e5c4307c strb r3, [r4, #124] ; 0x7c
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
a0018704: e2840008 add r0, r4, #8
a0018708: eb00109f bl a001c98c <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
a001870c: e2840040 add r0, r4, #64 ; 0x40
a0018710: eb00109d bl a001c98c <_Watchdog_Remove>
a0018714: eaffffa5 b a00185b0 <_Timer_server_Body+0x3c>
a0018720 <_Timer_server_Schedule_operation_method>:
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
a0018720: e92d4070 push {r4, r5, r6, lr}
if ( ts->insert_chain == NULL ) {
a0018724: e5906078 ldr r6, [r0, #120] ; 0x78
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
a0018728: e1a04000 mov r4, r0
a001872c: e1a05001 mov r5, r1
if ( ts->insert_chain == NULL ) {
a0018730: e3560000 cmp r6, #0
a0018734: 1a00003a bne a0018824 <_Timer_server_Schedule_operation_method+0x104>
* is the reference point for the delta chain. Thus if we do not update the
* reference point we have to add DT to the initial delta of the watchdog
* being inserted. This could result in an integer overflow.
*/
_Thread_Disable_dispatch();
a0018738: ebffff5f bl a00184bc <_Thread_Disable_dispatch>
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
a001873c: e5953038 ldr r3, [r5, #56] ; 0x38
a0018740: e3530001 cmp r3, #1
a0018744: 1a000017 bne a00187a8 <_Timer_server_Schedule_operation_method+0x88>
/*
* We have to advance the last known ticks value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
a0018748: ebffff57 bl a00184ac <arm_interrupt_disable>
snapshot = _Watchdog_Ticks_since_boot;
a001874c: e59f30dc ldr r3, [pc, #220] ; a0018830 <_Timer_server_Schedule_operation_method+0x110>
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
a0018750: e284c034 add ip, r4, #52 ; 0x34
a0018754: e5932000 ldr r2, [r3]
initialized = false;
}
#endif
return status;
}
a0018758: e5943030 ldr r3, [r4, #48] ; 0x30
* We have to advance the last known ticks value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
snapshot = _Watchdog_Ticks_since_boot;
last_snapshot = ts->Interval_watchdogs.last_snapshot;
a001875c: e594103c ldr r1, [r4, #60] ; 0x3c
if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) {
a0018760: e153000c cmp r3, ip
a0018764: 0a000004 beq a001877c <_Timer_server_Schedule_operation_method+0x5c>
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
delta_interval = first_watchdog->delta_interval;
a0018768: e593c010 ldr ip, [r3, #16]
first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain );
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
a001876c: e0611002 rsb r1, r1, r2
delta_interval = first_watchdog->delta_interval;
if (delta_interval > delta) {
a0018770: e15c0001 cmp ip, r1
delta_interval -= delta;
a0018774: 8061600c rsbhi r6, r1, ip
} else {
delta_interval = 0;
}
first_watchdog->delta_interval = delta_interval;
a0018778: e5836010 str r6, [r3, #16]
}
ts->Interval_watchdogs.last_snapshot = snapshot;
a001877c: e584203c str r2, [r4, #60] ; 0x3c
a0018780: e129f000 msr CPSR_fc, r0
_ISR_Enable( level );
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
a0018784: e2840030 add r0, r4, #48 ; 0x30
a0018788: e2851010 add r1, r5, #16
a001878c: eb001026 bl a001c82c <_Watchdog_Insert>
if ( !ts->active ) {
a0018790: e5d4307c ldrb r3, [r4, #124] ; 0x7c
a0018794: e3530000 cmp r3, #0
a0018798: 1a00001f bne a001881c <_Timer_server_Schedule_operation_method+0xfc>
_Timer_server_Reset_interval_system_watchdog( ts );
a001879c: e1a00004 mov r0, r4
a00187a0: ebffff4b bl a00184d4 <_Timer_server_Reset_interval_system_watchdog>
a00187a4: ea00001c b a001881c <_Timer_server_Schedule_operation_method+0xfc>
}
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
a00187a8: e3530003 cmp r3, #3
a00187ac: 1a00001a bne a001881c <_Timer_server_Schedule_operation_method+0xfc>
/*
* We have to advance the last known seconds value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
a00187b0: ebffff3d bl a00184ac <arm_interrupt_disable>
initialized = false;
}
#endif
return status;
}
a00187b4: e5942068 ldr r2, [r4, #104] ; 0x68
/*
* We have to advance the last known seconds value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
a00187b8: e59f3074 ldr r3, [pc, #116] ; a0018834 <_Timer_server_Schedule_operation_method+0x114>
a00187bc: e284c06c add ip, r4, #108 ; 0x6c
last_snapshot = ts->TOD_watchdogs.last_snapshot;
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
a00187c0: e152000c cmp r2, ip
/*
* We have to advance the last known seconds value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
a00187c4: e5933000 ldr r3, [r3]
last_snapshot = ts->TOD_watchdogs.last_snapshot;
a00187c8: e5941074 ldr r1, [r4, #116] ; 0x74
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
a00187cc: 0a000008 beq a00187f4 <_Timer_server_Schedule_operation_method+0xd4>
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
a00187d0: e592c010 ldr ip, [r2, #16] <== NOT EXECUTED
if ( snapshot > last_snapshot ) {
a00187d4: e1530001 cmp r3, r1 <== NOT EXECUTED
}
} else {
/*
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
a00187d8: 908c6001 addls r6, ip, r1 <== NOT EXECUTED
delta_interval += delta;
a00187dc: 90636006 rsbls r6, r3, r6 <== NOT EXECUTED
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
last_snapshot = ts->TOD_watchdogs.last_snapshot;
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
if ( snapshot > last_snapshot ) {
a00187e0: 9a000002 bls a00187f0 <_Timer_server_Schedule_operation_method+0xd0><== NOT EXECUTED
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
a00187e4: e0611003 rsb r1, r1, r3 <== NOT EXECUTED
if (delta_interval > delta) {
a00187e8: e15c0001 cmp ip, r1 <== NOT EXECUTED
delta_interval -= delta;
a00187ec: 8061600c rsbhi r6, r1, ip <== NOT EXECUTED
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
delta_interval += delta;
}
first_watchdog->delta_interval = delta_interval;
a00187f0: e5826010 str r6, [r2, #16] <== NOT EXECUTED
}
ts->TOD_watchdogs.last_snapshot = snapshot;
a00187f4: e5843074 str r3, [r4, #116] ; 0x74
a00187f8: e129f000 msr CPSR_fc, r0
_ISR_Enable( level );
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
a00187fc: e2840068 add r0, r4, #104 ; 0x68
a0018800: e2851010 add r1, r5, #16
a0018804: eb001008 bl a001c82c <_Watchdog_Insert>
if ( !ts->active ) {
a0018808: e5d4307c ldrb r3, [r4, #124] ; 0x7c
a001880c: e3530000 cmp r3, #0
a0018810: 1a000001 bne a001881c <_Timer_server_Schedule_operation_method+0xfc>
_Timer_server_Reset_tod_system_watchdog( ts );
a0018814: e1a00004 mov r0, r4
a0018818: ebffff41 bl a0018524 <_Timer_server_Reset_tod_system_watchdog>
* 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 );
}
}
a001881c: e8bd4070 pop {r4, r5, r6, lr}
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
a0018820: ea000bcc b a001b758 <_Thread_Enable_dispatch>
* server is not preemptible, so we must be in interrupt context here. No
* thread dispatch will happen until the timer server finishes its
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
a0018824: e5900078 ldr r0, [r0, #120] ; 0x78 <== NOT EXECUTED
}
}
a0018828: e8bd4070 pop {r4, r5, r6, lr} <== 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 );
a001882c: ea0001f3 b a0019000 <_Chain_Append> <== NOT EXECUTED
a000c0b8 <_Timespec_Add_to>:
uint32_t _Timespec_Add_to(
struct timespec *time,
const struct timespec *add
)
{
a000c0b8: e1a03000 mov r3, r0
uint32_t seconds = add->tv_sec;
/* Add the basics */
time->tv_sec += add->tv_sec;
a000c0bc: e5932000 ldr r2, [r3]
uint32_t _Timespec_Add_to(
struct timespec *time,
const struct timespec *add
)
{
uint32_t seconds = add->tv_sec;
a000c0c0: e5910000 ldr r0, [r1]
/* Add the basics */
time->tv_sec += add->tv_sec;
time->tv_nsec += add->tv_nsec;
a000c0c4: e593c004 ldr ip, [r3, #4]
)
{
uint32_t seconds = add->tv_sec;
/* Add the basics */
time->tv_sec += add->tv_sec;
a000c0c8: e0822000 add r2, r2, r0
a000c0cc: e5832000 str r2, [r3]
time->tv_nsec += add->tv_nsec;
a000c0d0: e5912004 ldr r2, [r1, #4]
a000c0d4: e08c2002 add r2, ip, r2
a000c0d8: e5832004 str r2, [r3, #4]
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
a000c0dc: e59fc02c ldr ip, [pc, #44] ; a000c110 <_Timespec_Add_to+0x58>
a000c0e0: ea000006 b a000c100 <_Timespec_Add_to+0x48>
time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
a000c0e4: e59f2028 ldr r2, [pc, #40] ; a000c114 <_Timespec_Add_to+0x5c><== NOT EXECUTED
time->tv_sec++;
seconds++;
a000c0e8: e2800001 add r0, r0, #1 <== NOT EXECUTED
time->tv_sec += add->tv_sec;
time->tv_nsec += add->tv_nsec;
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
a000c0ec: e0812002 add r2, r1, r2 <== NOT EXECUTED
a000c0f0: e5832004 str r2, [r3, #4] <== NOT EXECUTED
time->tv_sec++;
a000c0f4: e5932000 ldr r2, [r3] <== NOT EXECUTED
a000c0f8: e2822001 add r2, r2, #1 <== NOT EXECUTED
a000c0fc: e5832000 str r2, [r3] <== NOT EXECUTED
/* Add the basics */
time->tv_sec += add->tv_sec;
time->tv_nsec += add->tv_nsec;
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
a000c100: e5931004 ldr r1, [r3, #4]
a000c104: e151000c cmp r1, ip
a000c108: 8afffff5 bhi a000c0e4 <_Timespec_Add_to+0x2c>
time->tv_sec++;
seconds++;
}
return seconds;
}
a000c10c: e12fff1e bx lr
a000dc38 <_Timespec_Divide>:
const struct timespec *lhs,
const struct timespec *rhs,
uint32_t *ival_percentage,
uint32_t *fval_percentage
)
{
a000dc38: e92d40f0 push {r4, r5, r6, r7, lr}
a000dc3c: e1a05002 mov r5, r2
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
left += lhs->tv_nsec;
right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
right += rhs->tv_nsec;
a000dc40: e5912004 ldr r2, [r1, #4]
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
left += lhs->tv_nsec;
right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
a000dc44: e5917000 ldr r7, [r1]
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
a000dc48: e590c000 ldr ip, [r0]
left += lhs->tv_nsec;
a000dc4c: e5906004 ldr r6, [r0, #4]
right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
a000dc50: e59f0068 ldr r0, [pc, #104] ; a000dcc0 <_Timespec_Divide+0x88>
const struct timespec *lhs,
const struct timespec *rhs,
uint32_t *ival_percentage,
uint32_t *fval_percentage
)
{
a000dc54: e1a04003 mov r4, r3
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
left += lhs->tv_nsec;
right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
right += rhs->tv_nsec;
a000dc58: e1a03fc2 asr r3, r2, #31
a000dc5c: e0e32790 smlal r2, r3, r0, r7
if ( right == 0 ) {
a000dc60: e1921003 orrs r1, r2, r3
a000dc64: 1a000002 bne a000dc74 <_Timespec_Divide+0x3c>
*ival_percentage = 0;
a000dc68: e5851000 str r1, [r5]
*fval_percentage = 0;
a000dc6c: e5841000 str r1, [r4]
return;
a000dc70: e8bd80f0 pop {r4, r5, r6, r7, pc}
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
left += lhs->tv_nsec;
a000dc74: e1a07fc6 asr r7, r6, #31 <== NOT EXECUTED
a000dc78: e0e76c90 smlal r6, r7, r0, ip <== NOT EXECUTED
* Put it back in the timespec result.
*
* TODO: Rounding on the last digit of the fval.
*/
answer = (left * 100000) / right;
a000dc7c: e59fc040 ldr ip, [pc, #64] ; a000dcc4 <_Timespec_Divide+0x8c><== NOT EXECUTED
a000dc80: e0810c96 umull r0, r1, r6, ip <== NOT EXECUTED
a000dc84: e021179c mla r1, ip, r7, r1 <== NOT EXECUTED
a000dc88: eb003c3b bl a001cd7c <__udivdi3> <== NOT EXECUTED
*ival_percentage = answer / 1000;
a000dc8c: e3a02ffa mov r2, #1000 ; 0x3e8 <== NOT EXECUTED
a000dc90: e3a03000 mov r3, #0 <== NOT EXECUTED
* Put it back in the timespec result.
*
* TODO: Rounding on the last digit of the fval.
*/
answer = (left * 100000) / right;
a000dc94: e1a07000 mov r7, r0 <== NOT EXECUTED
a000dc98: e1a06001 mov r6, r1 <== NOT EXECUTED
*ival_percentage = answer / 1000;
a000dc9c: eb003c36 bl a001cd7c <__udivdi3> <== NOT EXECUTED
*fval_percentage = answer % 1000;
a000dca0: e1a01006 mov r1, r6 <== NOT EXECUTED
* TODO: Rounding on the last digit of the fval.
*/
answer = (left * 100000) / right;
*ival_percentage = answer / 1000;
a000dca4: e5850000 str r0, [r5] <== NOT EXECUTED
*fval_percentage = answer % 1000;
a000dca8: e3a02ffa mov r2, #1000 ; 0x3e8 <== NOT EXECUTED
a000dcac: e1a00007 mov r0, r7 <== NOT EXECUTED
a000dcb0: e3a03000 mov r3, #0 <== NOT EXECUTED
a000dcb4: eb003d42 bl a001d1c4 <__umoddi3> <== NOT EXECUTED
a000dcb8: e5840000 str r0, [r4] <== NOT EXECUTED
a000dcbc: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
a000dc00 <_Timespec_Divide_by_integer>:
void _Timespec_Divide_by_integer(
const struct timespec *time,
uint32_t iterations,
struct timespec *result
)
{
a000dc00: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
t = time->tv_sec;
t *= TOD_NANOSECONDS_PER_SECOND;
a000dc04: e59fc06c ldr ip, [pc, #108] ; a000dc78 <_Timespec_Divide_by_integer+0x78><== NOT EXECUTED
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
t = time->tv_sec;
a000dc08: e590e000 ldr lr, [r0] <== NOT EXECUTED
void _Timespec_Divide_by_integer(
const struct timespec *time,
uint32_t iterations,
struct timespec *result
)
{
a000dc0c: e1a03001 mov r3, r1 <== NOT EXECUTED
a000dc10: e1a04002 mov r4, r2 <== NOT EXECUTED
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
t = time->tv_sec;
t *= TOD_NANOSECONDS_PER_SECOND;
a000dc14: e0821c9e umull r1, r2, lr, ip <== NOT EXECUTED
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
t = time->tv_sec;
a000dc18: e1a0500e mov r5, lr <== NOT EXECUTED
a000dc1c: e1a06fc5 asr r6, r5, #31 <== NOT EXECUTED
t *= TOD_NANOSECONDS_PER_SECOND;
t += time->tv_nsec;
a000dc20: e5900004 ldr r0, [r0, #4] <== NOT EXECUTED
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
t = time->tv_sec;
t *= TOD_NANOSECONDS_PER_SECOND;
a000dc24: e022269c mla r2, ip, r6, r2 <== NOT EXECUTED
/*
* Divide to get nanoseconds per iteration
*/
t /= iterations;
a000dc28: e0915000 adds r5, r1, r0 <== NOT EXECUTED
a000dc2c: e0a26fc0 adc r6, r2, r0, asr #31 <== NOT EXECUTED
a000dc30: e1a01006 mov r1, r6 <== NOT EXECUTED
a000dc34: e1a02003 mov r2, r3 <== NOT EXECUTED
a000dc38: e1a00005 mov r0, r5 <== NOT EXECUTED
a000dc3c: e3a03000 mov r3, #0 <== NOT EXECUTED
a000dc40: eb003a7a bl a001c630 <__udivdi3> <== NOT EXECUTED
/*
* Put it back in the timespec result
*/
result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND;
a000dc44: e59f202c ldr r2, [pc, #44] ; a000dc78 <_Timespec_Divide_by_integer+0x78><== NOT EXECUTED
a000dc48: e3a03000 mov r3, #0 <== NOT EXECUTED
/*
* Divide to get nanoseconds per iteration
*/
t /= iterations;
a000dc4c: e1a06000 mov r6, r0 <== NOT EXECUTED
a000dc50: e1a05001 mov r5, r1 <== NOT EXECUTED
/*
* Put it back in the timespec result
*/
result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND;
a000dc54: eb003a75 bl a001c630 <__udivdi3> <== NOT EXECUTED
result->tv_nsec = t % TOD_NANOSECONDS_PER_SECOND;
a000dc58: e1a01005 mov r1, r5 <== NOT EXECUTED
/*
* Put it back in the timespec result
*/
result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND;
a000dc5c: e5840000 str r0, [r4] <== NOT EXECUTED
result->tv_nsec = t % TOD_NANOSECONDS_PER_SECOND;
a000dc60: e59f2010 ldr r2, [pc, #16] ; a000dc78 <_Timespec_Divide_by_integer+0x78><== NOT EXECUTED
a000dc64: e1a00006 mov r0, r6 <== NOT EXECUTED
a000dc68: e3a03000 mov r3, #0 <== NOT EXECUTED
a000dc6c: eb003b81 bl a001ca78 <__umoddi3> <== NOT EXECUTED
a000dc70: e5840004 str r0, [r4, #4] <== NOT EXECUTED
}
a000dc74: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
a000d034 <_Timespec_From_ticks>:
struct timespec *time
)
{
uint32_t usecs;
usecs = ticks * rtems_configuration_get_microseconds_per_tick();
a000d034: e59f3038 ldr r3, [pc, #56] ; a000d074 <_Timespec_From_ticks+0x40><== NOT EXECUTED
void _Timespec_From_ticks(
uint32_t ticks,
struct timespec *time
)
{
a000d038: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
uint32_t usecs;
usecs = ticks * rtems_configuration_get_microseconds_per_tick();
a000d03c: e593500c ldr r5, [r3, #12] <== NOT EXECUTED
void _Timespec_From_ticks(
uint32_t ticks,
struct timespec *time
)
{
a000d040: e1a04001 mov r4, r1 <== NOT EXECUTED
uint32_t usecs;
usecs = ticks * rtems_configuration_get_microseconds_per_tick();
time->tv_sec = usecs / TOD_MICROSECONDS_PER_SECOND;
a000d044: e59f102c ldr r1, [pc, #44] ; a000d078 <_Timespec_From_ticks+0x44><== NOT EXECUTED
struct timespec *time
)
{
uint32_t usecs;
usecs = ticks * rtems_configuration_get_microseconds_per_tick();
a000d048: e0050590 mul r5, r0, r5 <== NOT EXECUTED
time->tv_sec = usecs / TOD_MICROSECONDS_PER_SECOND;
a000d04c: e1a00005 mov r0, r5 <== NOT EXECUTED
a000d050: eb003b7c bl a001be48 <__aeabi_uidiv> <== NOT EXECUTED
time->tv_nsec = (usecs % TOD_MICROSECONDS_PER_SECOND) *
a000d054: e59f101c ldr r1, [pc, #28] ; a000d078 <_Timespec_From_ticks+0x44><== NOT EXECUTED
{
uint32_t usecs;
usecs = ticks * rtems_configuration_get_microseconds_per_tick();
time->tv_sec = usecs / TOD_MICROSECONDS_PER_SECOND;
a000d058: e5840000 str r0, [r4] <== NOT EXECUTED
time->tv_nsec = (usecs % TOD_MICROSECONDS_PER_SECOND) *
a000d05c: e1a00005 mov r0, r5 <== NOT EXECUTED
a000d060: eb003c10 bl a001c0a8 <__umodsi3> <== NOT EXECUTED
a000d064: e3a03ffa mov r3, #1000 ; 0x3e8 <== NOT EXECUTED
a000d068: e0030390 mul r3, r0, r3 <== NOT EXECUTED
a000d06c: e5843004 str r3, [r4, #4] <== NOT EXECUTED
TOD_NANOSECONDS_PER_MICROSECOND;
}
a000d070: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
a000dc7c <_Timespec_Greater_than>:
bool _Timespec_Greater_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec > rhs->tv_sec )
a000dc7c: e5902000 ldr r2, [r0]
a000dc80: e5913000 ldr r3, [r1]
a000dc84: e1520003 cmp r2, r3
return true;
a000dc88: c3a00001 movgt r0, #1
bool _Timespec_Greater_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec > rhs->tv_sec )
a000dc8c: c12fff1e bxgt lr
return true;
if ( lhs->tv_sec < rhs->tv_sec )
a000dc90: ba000005 blt a000dcac <_Timespec_Greater_than+0x30>
#include <rtems/system.h>
#include <rtems/score/timespec.h>
#include <rtems/score/tod.h>
bool _Timespec_Greater_than(
a000dc94: e5900004 ldr r0, [r0, #4]
a000dc98: e5913004 ldr r3, [r1, #4]
a000dc9c: e1500003 cmp r0, r3
a000dca0: d3a00000 movle r0, #0
a000dca4: c3a00001 movgt r0, #1
a000dca8: e12fff1e bx lr
{
if ( lhs->tv_sec > rhs->tv_sec )
return true;
if ( lhs->tv_sec < rhs->tv_sec )
return false;
a000dcac: e3a00000 mov r0, #0
/* ASSERT: lhs->tv_sec == rhs->tv_sec */
if ( lhs->tv_nsec > rhs->tv_nsec )
return true;
return false;
}
a000dcb0: e12fff1e bx lr
a000d07c <_Timespec_Is_valid>:
bool _Timespec_Is_valid(
const struct timespec *time
)
{
if ( !time )
a000d07c: e3500000 cmp r0, #0 <== NOT EXECUTED
a000d080: 012fff1e bxeq lr <== NOT EXECUTED
return false;
if ( time->tv_sec < 0 )
a000d084: e5903000 ldr r3, [r0] <== NOT EXECUTED
a000d088: e3530000 cmp r3, #0 <== NOT EXECUTED
return false;
a000d08c: b3a00000 movlt r0, #0 <== NOT EXECUTED
)
{
if ( !time )
return false;
if ( time->tv_sec < 0 )
a000d090: b12fff1e bxlt lr <== NOT EXECUTED
return false;
if ( time->tv_nsec < 0 )
a000d094: e5903004 ldr r3, [r0, #4] <== NOT EXECUTED
a000d098: e3530000 cmp r3, #0 <== NOT EXECUTED
a000d09c: ba000004 blt a000d0b4 <_Timespec_Is_valid+0x38> <== NOT EXECUTED
#include <rtems/system.h>
#include <rtems/score/timespec.h>
#include <rtems/score/tod.h>
bool _Timespec_Is_valid(
a000d0a0: e59f0014 ldr r0, [pc, #20] ; a000d0bc <_Timespec_Is_valid+0x40><== NOT EXECUTED
a000d0a4: e1530000 cmp r3, r0 <== NOT EXECUTED
a000d0a8: 83a00000 movhi r0, #0 <== NOT EXECUTED
a000d0ac: 93a00001 movls r0, #1 <== NOT EXECUTED
a000d0b0: e12fff1e bx lr <== NOT EXECUTED
if ( time->tv_sec < 0 )
return false;
if ( time->tv_nsec < 0 )
return false;
a000d0b4: e3a00000 mov r0, #0 <== NOT EXECUTED
if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND )
return false;
return true;
}
a000d0b8: e12fff1e bx lr <== NOT EXECUTED
a000dcb4 <_Timespec_Less_than>:
bool _Timespec_Less_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec < rhs->tv_sec )
a000dcb4: e5902000 ldr r2, [r0]
a000dcb8: e5913000 ldr r3, [r1]
a000dcbc: e1520003 cmp r2, r3
return true;
a000dcc0: b3a00001 movlt r0, #1
bool _Timespec_Less_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec < rhs->tv_sec )
a000dcc4: b12fff1e bxlt lr
return true;
if ( lhs->tv_sec > rhs->tv_sec )
a000dcc8: ca000005 bgt a000dce4 <_Timespec_Less_than+0x30>
#include <rtems/system.h>
#include <rtems/score/timespec.h>
#include <rtems/score/tod.h>
bool _Timespec_Less_than(
a000dccc: e5900004 ldr r0, [r0, #4]
a000dcd0: e5913004 ldr r3, [r1, #4]
a000dcd4: e1500003 cmp r0, r3
a000dcd8: a3a00000 movge r0, #0
a000dcdc: b3a00001 movlt r0, #1
a000dce0: e12fff1e bx lr
{
if ( lhs->tv_sec < rhs->tv_sec )
return true;
if ( lhs->tv_sec > rhs->tv_sec )
return false;
a000dce4: e3a00000 mov r0, #0
/* ASSERT: lhs->tv_sec == rhs->tv_sec */
if ( lhs->tv_nsec < rhs->tv_nsec )
return true;
return false;
}
a000dce8: e12fff1e bx lr
a000d108 <_Timespec_To_ticks>:
*/
uint32_t _Timespec_To_ticks(
const struct timespec *time
)
{
a000d108: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
uint32_t ticks;
if ( (time->tv_sec == 0) && (time->tv_nsec == 0) )
a000d10c: e5906000 ldr r6, [r0] <== NOT EXECUTED
*/
uint32_t _Timespec_To_ticks(
const struct timespec *time
)
{
a000d110: e1a05000 mov r5, r0 <== NOT EXECUTED
uint32_t ticks;
if ( (time->tv_sec == 0) && (time->tv_nsec == 0) )
a000d114: e3560000 cmp r6, #0 <== NOT EXECUTED
a000d118: 1a000002 bne a000d128 <_Timespec_To_ticks+0x20> <== NOT EXECUTED
a000d11c: e5900004 ldr r0, [r0, #4] <== NOT EXECUTED
a000d120: e3500000 cmp r0, #0 <== NOT EXECUTED
a000d124: 0a000009 beq a000d150 <_Timespec_To_ticks+0x48> <== NOT EXECUTED
return 0;
ticks = time->tv_sec * TOD_TICKS_PER_SECOND;
a000d128: eb00094a bl a000f658 <TOD_TICKS_PER_SECOND_method> <== NOT EXECUTED
ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick();
a000d12c: e59f3020 ldr r3, [pc, #32] ; a000d154 <_Timespec_To_ticks+0x4c><== NOT EXECUTED
a000d130: e3a01ffa mov r1, #1000 ; 0x3e8 <== NOT EXECUTED
uint32_t ticks;
if ( (time->tv_sec == 0) && (time->tv_nsec == 0) )
return 0;
ticks = time->tv_sec * TOD_TICKS_PER_SECOND;
a000d134: e0040096 mul r4, r6, r0 <== NOT EXECUTED
ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick();
a000d138: e593300c ldr r3, [r3, #12] <== NOT EXECUTED
a000d13c: e5950004 ldr r0, [r5, #4] <== NOT EXECUTED
a000d140: e0010193 mul r1, r3, r1 <== NOT EXECUTED
a000d144: eb003b3f bl a001be48 <__aeabi_uidiv> <== NOT EXECUTED
if (ticks)
a000d148: e0940000 adds r0, r4, r0 <== NOT EXECUTED
return ticks;
return 1;
a000d14c: 03a00001 moveq r0, #1 <== NOT EXECUTED
}
a000d150: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
a000c27c <_User_extensions_Fatal>:
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
a000c27c: e92d41f0 push {r4, r5, r6, r7, r8, lr}
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
a000c280: e59f503c ldr r5, [pc, #60] ; a000c2c4 <_User_extensions_Fatal+0x48>
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
a000c284: e1a08000 mov r8, r0
a000c288: e1a07002 mov r7, r2
a000c28c: e20160ff and r6, r1, #255 ; 0xff
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
a000c290: e5954008 ldr r4, [r5, #8]
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
a000c294: ea000007 b a000c2b8 <_User_extensions_Fatal+0x3c>
!_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 )
a000c298: e5943030 ldr r3, [r4, #48] ; 0x30
a000c29c: e3530000 cmp r3, #0
a000c2a0: 0a000003 beq a000c2b4 <_User_extensions_Fatal+0x38>
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
a000c2a4: e1a00008 mov r0, r8
a000c2a8: e1a01006 mov r1, r6
a000c2ac: e1a02007 mov r2, r7
a000c2b0: e12fff33 blx r3
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 ) {
a000c2b4: e5944004 ldr r4, [r4, #4]
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
a000c2b8: e1540005 cmp r4, r5
a000c2bc: 1afffff5 bne a000c298 <_User_extensions_Fatal+0x1c>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
a000c2c0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
a000d9a8 <_User_extensions_Remove_set>:
#include <rtems/score/userext.h>
void _User_extensions_Remove_set (
User_extensions_Control *the_extension
)
{
a000d9a8: e92d4010 push {r4, lr}
a000d9ac: e1a04000 mov r4, r0
_Chain_Extract( &the_extension->Node );
a000d9b0: ebfff694 bl a000b408 <_Chain_Extract>
/*
* If a switch handler is present, remove it.
*/
if ( the_extension->Callouts.thread_switch != NULL )
a000d9b4: e5943024 ldr r3, [r4, #36] ; 0x24
a000d9b8: e3530000 cmp r3, #0
a000d9bc: 0a000002 beq a000d9cc <_User_extensions_Remove_set+0x24>
_Chain_Extract( &the_extension->Switch.Node );
a000d9c0: e2840008 add r0, r4, #8 <== NOT EXECUTED
}
a000d9c4: e8bd4010 pop {r4, lr} <== NOT EXECUTED
/*
* If a switch handler is present, remove it.
*/
if ( the_extension->Callouts.thread_switch != NULL )
_Chain_Extract( &the_extension->Switch.Node );
a000d9c8: eafff68e b a000b408 <_Chain_Extract> <== NOT EXECUTED
a000d9cc: e8bd8010 pop {r4, pc}
a000c240 <_User_extensions_Thread_exitted>:
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
a000c240: e92d4070 push {r4, r5, r6, lr}
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
a000c244: e59f502c ldr r5, [pc, #44] ; a000c278 <_User_extensions_Thread_exitted+0x38>
}
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
a000c248: e1a06000 mov r6, r0
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
a000c24c: e5954008 ldr r4, [r5, #8]
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
a000c250: ea000005 b a000c26c <_User_extensions_Thread_exitted+0x2c>
!_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 )
a000c254: e594302c ldr r3, [r4, #44] ; 0x2c
a000c258: e3530000 cmp r3, #0
a000c25c: 0a000001 beq a000c268 <_User_extensions_Thread_exitted+0x28>
(*the_extension->Callouts.thread_exitted)( executing );
a000c260: e1a00006 mov r0, r6 <== NOT EXECUTED
a000c264: e12fff33 blx r3 <== NOT EXECUTED
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 ) {
a000c268: e5944004 ldr r4, [r4, #4]
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
a000c26c: e1540005 cmp r4, r5
a000c270: 1afffff7 bne a000c254 <_User_extensions_Thread_exitted+0x14>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_exitted != NULL )
(*the_extension->Callouts.thread_exitted)( executing );
}
}
a000c274: e8bd8070 pop {r4, r5, r6, pc}
a000dfd8 <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
a000dfd8: e92d41f0 push {r4, r5, r6, r7, r8, lr}
a000dfdc: e1a04000 mov r4, r0
a000dfe0: e1a05002 mov r5, r2
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000dfe4: e10f3000 mrs r3, CPSR
a000dfe8: e3832080 orr r2, r3, #128 ; 0x80
a000dfec: e129f002 msr CPSR_fc, r2
}
}
_ISR_Enable( level );
}
a000dff0: e1a06000 mov r6, r0
a000dff4: e4962004 ldr r2, [r6], #4
* hence the compiler must not assume *header to remain
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
a000dff8: e1520006 cmp r2, r6
a000dffc: 0a00001b beq a000e070 <_Watchdog_Adjust+0x98>
switch ( direction ) {
a000e000: e3510000 cmp r1, #0
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
a000e004: 03a08001 moveq r8, #1
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
a000e008: 0a000016 beq a000e068 <_Watchdog_Adjust+0x90>
a000e00c: e3510001 cmp r1, #1 <== NOT EXECUTED
a000e010: 1a000016 bne a000e070 <_Watchdog_Adjust+0x98> <== NOT EXECUTED
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
a000e014: e5921010 ldr r1, [r2, #16] <== NOT EXECUTED
a000e018: e0815005 add r5, r1, r5 <== NOT EXECUTED
a000e01c: ea000004 b a000e034 <_Watchdog_Adjust+0x5c> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) _Chain_First( header ) );
a000e020: e5942000 ldr r2, [r4]
break;
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
a000e024: e5927010 ldr r7, [r2, #16]
a000e028: e1550007 cmp r5, r7
a000e02c: 2a000002 bcs a000e03c <_Watchdog_Adjust+0x64>
_Watchdog_First( header )->delta_interval -= units;
a000e030: e0655007 rsb r5, r5, r7 <== NOT EXECUTED
a000e034: e5825010 str r5, [r2, #16] <== NOT EXECUTED
break;
a000e038: ea00000c b a000e070 <_Watchdog_Adjust+0x98> <== NOT EXECUTED
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
a000e03c: e5828010 str r8, [r2, #16]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000e040: e129f003 msr CPSR_fc, r3
_ISR_Enable( level );
_Watchdog_Tickle( header );
a000e044: e1a00004 mov r0, r4
a000e048: eb00008b bl a000e27c <_Watchdog_Tickle>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000e04c: e10f3000 mrs r3, CPSR
a000e050: e3832080 orr r2, r3, #128 ; 0x80
a000e054: e129f002 msr CPSR_fc, r2
_ISR_Disable( level );
if ( _Chain_Is_empty( header ) )
a000e058: e5942000 ldr r2, [r4]
a000e05c: e1520006 cmp r2, r6
a000e060: 0a000002 beq a000e070 <_Watchdog_Adjust+0x98>
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
a000e064: e0675005 rsb r5, r7, r5 <== NOT EXECUTED
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
a000e068: e3550000 cmp r5, #0
a000e06c: 1affffeb bne a000e020 <_Watchdog_Adjust+0x48>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000e070: e129f003 msr CPSR_fc, r3
}
}
_ISR_Enable( level );
}
a000e074: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
a001c780 <_Watchdog_Adjust_to_chain>:
{
Watchdog_Interval units = units_arg;
ISR_Level level;
Watchdog_Control *first;
if ( units <= 0 ) {
a001c780: e3510000 cmp r1, #0
Chain_Control *header,
Watchdog_Interval units_arg,
Chain_Control *to_fire
)
{
a001c784: e92d41f0 push {r4, r5, r6, r7, r8, lr}
Watchdog_Interval units = units_arg;
ISR_Level level;
Watchdog_Control *first;
if ( units <= 0 ) {
a001c788: 0a000026 beq a001c828 <_Watchdog_Adjust_to_chain+0xa8>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a001c78c: e10f5000 mrs r5, CPSR
a001c790: e3853080 orr r3, r5, #128 ; 0x80
a001c794: e129f003 msr CPSR_fc, r3
/*
* The first set happens in less than units, so take all of them
* off the chain and adjust units to reflect this.
*/
units -= first->delta_interval;
first->delta_interval = 0;
a001c798: e3a08000 mov r8, #0
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
a001c79c: e2806004 add r6, r0, #4
RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
a001c7a0: e2827004 add r7, r2, #4
a001c7a4: ea000001 b a001c7b0 <_Watchdog_Adjust_to_chain+0x30>
}
_ISR_Disable( level );
while ( 1 ) {
if ( units <= 0 ) {
a001c7a8: e3510000 cmp r1, #0
a001c7ac: 0a00001c beq a001c824 <_Watchdog_Adjust_to_chain+0xa4>
break;
}
}
_ISR_Enable( level );
}
a001c7b0: e590c000 ldr ip, [r0]
while ( 1 ) {
if ( units <= 0 ) {
break;
}
if ( _Chain_Is_empty( header ) ) {
a001c7b4: e15c0006 cmp ip, r6
a001c7b8: 0a000019 beq a001c824 <_Watchdog_Adjust_to_chain+0xa4>
/*
* If it is longer than "units" until the first element on the chain
* fires, then bump it and quit.
*/
if ( units < first->delta_interval ) {
a001c7bc: e59c4010 ldr r4, [ip, #16]
a001c7c0: e1a0300c mov r3, ip
a001c7c4: e1510004 cmp r1, r4
first->delta_interval -= units;
a001c7c8: 30611004 rsbcc r1, r1, r4
a001c7cc: 358c1010 strcc r1, [ip, #16]
break;
a001c7d0: 3a000013 bcc a001c824 <_Watchdog_Adjust_to_chain+0xa4>
/*
* The first set happens in less than units, so take all of them
* off the chain and adjust units to reflect this.
*/
units -= first->delta_interval;
a001c7d4: e0641001 rsb r1, r4, r1
first->delta_interval = 0;
a001c7d8: e58c8010 str r8, [ip, #16]
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
a001c7dc: e8931010 ldm r3, {r4, ip}
next->previous = previous;
a001c7e0: e584c004 str ip, [r4, #4]
previous->next = next;
a001c7e4: e58c4000 str r4, [ip]
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
a001c7e8: e592c008 ldr ip, [r2, #8]
the_node->next = tail;
a001c7ec: e5837000 str r7, [r3]
tail->previous = the_node;
a001c7f0: e5823008 str r3, [r2, #8]
old_last->next = the_node;
a001c7f4: e58c3000 str r3, [ip]
the_node->previous = old_last;
a001c7f8: e583c004 str ip, [r3, #4]
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
a001c7fc: e10f3000 mrs r3, CPSR
a001c800: e129f005 msr CPSR_fc, r5
a001c804: e129f003 msr CPSR_fc, r3
break;
}
}
_ISR_Enable( level );
}
a001c808: e5903000 ldr r3, [r0]
_Chain_Extract_unprotected( &first->Node );
_Chain_Append_unprotected( to_fire, &first->Node );
_ISR_Flash( level );
if ( _Chain_Is_empty( header ) )
a001c80c: e1530006 cmp r3, r6
a001c810: 0affffe4 beq a001c7a8 <_Watchdog_Adjust_to_chain+0x28>
break;
first = _Watchdog_First( header );
if ( first->delta_interval != 0 )
a001c814: e593c010 ldr ip, [r3, #16] <== NOT EXECUTED
a001c818: e35c0000 cmp ip, #0 <== NOT EXECUTED
a001c81c: 0affffee beq a001c7dc <_Watchdog_Adjust_to_chain+0x5c> <== NOT EXECUTED
a001c820: eaffffe0 b a001c7a8 <_Watchdog_Adjust_to_chain+0x28> <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a001c824: e129f005 msr CPSR_fc, r5
a001c828: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
a000c3e8 <_Watchdog_Insert>:
Watchdog_Control *after;
uint32_t insert_isr_nest_level;
Watchdog_Interval delta_interval;
insert_isr_nest_level = _ISR_Nest_level;
a000c3e8: e59f30f4 ldr r3, [pc, #244] ; a000c4e4 <_Watchdog_Insert+0xfc>
void _Watchdog_Insert(
Chain_Control *header,
Watchdog_Control *the_watchdog
)
{
a000c3ec: e92d41f0 push {r4, r5, r6, r7, r8, lr}
Watchdog_Control *after;
uint32_t insert_isr_nest_level;
Watchdog_Interval delta_interval;
insert_isr_nest_level = _ISR_Nest_level;
a000c3f0: e5934000 ldr r4, [r3]
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000c3f4: e10fc000 mrs ip, CPSR
a000c3f8: e38c3080 orr r3, ip, #128 ; 0x80
a000c3fc: e129f003 msr CPSR_fc, r3
/*
* 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 ) {
a000c400: e5913008 ldr r3, [r1, #8]
a000c404: e3530000 cmp r3, #0
a000c408: 0a000000 beq a000c410 <_Watchdog_Insert+0x28>
_ISR_Enable( level );
a000c40c: ea000032 b a000c4dc <_Watchdog_Insert+0xf4> <== NOT EXECUTED
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
a000c410: e3a03001 mov r3, #1
a000c414: e5813008 str r3, [r1, #8]
_Watchdog_Sync_count++;
a000c418: e59f30c8 ldr r3, [pc, #200] ; a000c4e8 <_Watchdog_Insert+0x100>
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
a000c41c: e59f60c8 ldr r6, [pc, #200] ; a000c4ec <_Watchdog_Insert+0x104>
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
_Watchdog_Sync_count++;
a000c420: e5932000 ldr r2, [r3]
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
a000c424: e1a07006 mov r7, r6
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
_Watchdog_Sync_count++;
a000c428: e2822001 add r2, r2, #1
a000c42c: e5832000 str r2, [r3]
restart:
delta_interval = the_watchdog->initial;
a000c430: e591200c ldr r2, [r1, #12]
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) _Chain_First( header ) );
a000c434: e5903000 ldr r3, [r0]
for ( after = _Watchdog_First( header ) ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
a000c438: e3520000 cmp r2, #0
a000c43c: 0a000014 beq a000c494 <_Watchdog_Insert+0xac>
a000c440: e5935000 ldr r5, [r3]
a000c444: e3550000 cmp r5, #0
a000c448: 0a000011 beq a000c494 <_Watchdog_Insert+0xac>
break;
if ( delta_interval < after->delta_interval ) {
a000c44c: e5935010 ldr r5, [r3, #16]
a000c450: e1520005 cmp r2, r5
after->delta_interval -= delta_interval;
a000c454: 30625005 rsbcc r5, r2, r5
a000c458: 35835010 strcc r5, [r3, #16]
break;
a000c45c: 3a00000c bcc a000c494 <_Watchdog_Insert+0xac>
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
a000c460: e10f8000 mrs r8, CPSR
a000c464: e129f00c msr CPSR_fc, ip
a000c468: e129f008 msr CPSR_fc, r8
delta_interval -= after->delta_interval;
_ISR_Flash( level );
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
a000c46c: e5918008 ldr r8, [r1, #8]
a000c470: e3580001 cmp r8, #1
a000c474: 1a000012 bne a000c4c4 <_Watchdog_Insert+0xdc>
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
a000c478: e5968000 ldr r8, [r6]
a000c47c: e1580004 cmp r8, r4
_Watchdog_Sync_level = insert_isr_nest_level;
a000c480: 85874000 strhi r4, [r7]
goto restart;
a000c484: 8affffe9 bhi a000c430 <_Watchdog_Insert+0x48>
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
break;
}
delta_interval -= after->delta_interval;
a000c488: e0652002 rsb r2, r5, r2
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
_Watchdog_Sync_count--;
_ISR_Enable( level );
}
a000c48c: e5933000 ldr r3, [r3]
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
_Watchdog_Sync_level = insert_isr_nest_level;
goto restart;
}
}
a000c490: eaffffe8 b a000c438 <_Watchdog_Insert+0x50>
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
a000c494: e5933004 ldr r3, [r3, #4]
RTEMS_INLINE_ROUTINE void _Watchdog_Activate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_ACTIVE;
a000c498: e3a00002 mov r0, #2
}
}
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
a000c49c: e5812010 str r2, [r1, #16]
a000c4a0: e5810008 str r0, [r1, #8]
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
a000c4a4: e5932000 ldr r2, [r3]
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
a000c4a8: e5813004 str r3, [r1, #4]
before_node = after_node->next;
after_node->next = the_node;
a000c4ac: e5831000 str r1, [r3]
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
a000c4b0: e59f3038 ldr r3, [pc, #56] ; a000c4f0 <_Watchdog_Insert+0x108>
the_node->next = before_node;
before_node->previous = the_node;
a000c4b4: e5821004 str r1, [r2, #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;
a000c4b8: e5812000 str r2, [r1]
a000c4bc: e5933000 ldr r3, [r3]
a000c4c0: e5813014 str r3, [r1, #20]
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
a000c4c4: e59f3020 ldr r3, [pc, #32] ; a000c4ec <_Watchdog_Insert+0x104>
a000c4c8: e5834000 str r4, [r3]
_Watchdog_Sync_count--;
a000c4cc: e59f3014 ldr r3, [pc, #20] ; a000c4e8 <_Watchdog_Insert+0x100>
a000c4d0: e5932000 ldr r2, [r3]
a000c4d4: e2422001 sub r2, r2, #1
a000c4d8: e5832000 str r2, [r3]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000c4dc: e129f00c msr CPSR_fc, ip
a000c4e0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
a000dae8 <_Watchdog_Report>:
void _Watchdog_Report(
const char *name,
Watchdog_Control *watch
)
{
a000dae8: e92d401f push {r0, r1, r2, r3, r4, lr} <== NOT EXECUTED
a000daec: e1a03001 mov r3, r1 <== NOT EXECUTED
printk(
a000daf0: e2501000 subs r1, r0, #0 <== NOT EXECUTED
a000daf4: e593000c ldr r0, [r3, #12] <== NOT EXECUTED
a000daf8: e58d3004 str r3, [sp, #4] <== NOT EXECUTED
a000dafc: 059f1034 ldreq r1, [pc, #52] ; a000db38 <_Watchdog_Report+0x50><== NOT EXECUTED
a000db00: e58d0000 str r0, [sp] <== NOT EXECUTED
a000db04: e593001c ldr r0, [r3, #28] <== NOT EXECUTED
a000db08: 01a02001 moveq r2, r1 <== NOT EXECUTED
a000db0c: 159f2028 ldrne r2, [pc, #40] ; a000db3c <_Watchdog_Report+0x54><== NOT EXECUTED
a000db10: e58d0008 str r0, [sp, #8] <== NOT EXECUTED
a000db14: e5930020 ldr r0, [r3, #32] <== NOT EXECUTED
a000db18: e58d000c str r0, [sp, #12] <== NOT EXECUTED
a000db1c: e5930024 ldr r0, [r3, #36] ; 0x24 <== NOT EXECUTED
a000db20: e58d0010 str r0, [sp, #16] <== NOT EXECUTED
a000db24: e5933010 ldr r3, [r3, #16] <== NOT EXECUTED
a000db28: e59f0010 ldr r0, [pc, #16] ; a000db40 <_Watchdog_Report+0x58><== NOT EXECUTED
a000db2c: ebffe868 bl a0007cd4 <printk> <== NOT EXECUTED
watch,
watch->routine,
watch->id,
watch->user_data
);
}
a000db30: e28dd014 add sp, sp, #20 <== NOT EXECUTED
a000db34: e8bd8000 pop {pc} <== NOT EXECUTED
a000da70 <_Watchdog_Report_chain>:
void _Watchdog_Report_chain(
const char *name,
Chain_Control *header
)
{
a000da70: e92d40f0 push {r4, r5, r6, r7, lr}
a000da74: e1a04000 mov r4, r0
a000da78: e1a05001 mov r5, r1
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000da7c: e10f6000 mrs r6, CPSR
a000da80: e3863080 orr r3, r6, #128 ; 0x80
a000da84: e129f003 msr CPSR_fc, r3
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
a000da88: e59f004c ldr r0, [pc, #76] ; a000dadc <_Watchdog_Report_chain+0x6c>
a000da8c: e1a02005 mov r2, r5
a000da90: e1a01004 mov r1, r4
a000da94: ebffe88e bl a0007cd4 <printk>
printk( "== end of %s \n", name );
} else {
printk( "Chain is empty\n" );
}
_ISR_Enable( level );
}
a000da98: e4957004 ldr r7, [r5], #4
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
a000da9c: e1570005 cmp r7, r5
a000daa0: 0a000009 beq a000dacc <_Watchdog_Report_chain+0x5c>
node != _Chain_Tail(header) ;
node = node->next )
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
a000daa4: e1a01007 mov r1, r7 <== NOT EXECUTED
a000daa8: e3a00000 mov r0, #0 <== NOT EXECUTED
a000daac: eb00000d bl a000dae8 <_Watchdog_Report> <== NOT EXECUTED
_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 )
a000dab0: e5977000 ldr r7, [r7] <== NOT EXECUTED
Chain_Node *node;
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = _Chain_First( header ) ;
a000dab4: e1570005 cmp r7, r5 <== NOT EXECUTED
a000dab8: 1afffff9 bne a000daa4 <_Watchdog_Report_chain+0x34> <== NOT EXECUTED
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
a000dabc: e59f001c ldr r0, [pc, #28] ; a000dae0 <_Watchdog_Report_chain+0x70><== NOT EXECUTED
a000dac0: e1a01004 mov r1, r4 <== NOT EXECUTED
a000dac4: ebffe882 bl a0007cd4 <printk> <== NOT EXECUTED
a000dac8: ea000001 b a000dad4 <_Watchdog_Report_chain+0x64> <== NOT EXECUTED
} else {
printk( "Chain is empty\n" );
a000dacc: e59f0010 ldr r0, [pc, #16] ; a000dae4 <_Watchdog_Report_chain+0x74>
a000dad0: ebffe87f bl a0007cd4 <printk>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000dad4: e129f006 msr CPSR_fc, r6
}
_ISR_Enable( level );
}
a000dad8: e8bd80f0 pop {r4, r5, r6, r7, pc}
a000c5ec <_Watchdog_Tickle>:
*/
void _Watchdog_Tickle(
Chain_Control *header
)
{
a000c5ec: e92d40f0 push {r4, r5, r6, r7, lr}
a000c5f0: e1a05000 mov r5, r0
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000c5f4: e10f7000 mrs r7, CPSR
a000c5f8: e3873080 orr r3, r7, #128 ; 0x80
a000c5fc: e129f003 msr CPSR_fc, r3
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
leave:
_ISR_Enable(level);
}
a000c600: e1a04000 mov r4, r0
a000c604: e4943004 ldr r3, [r4], #4
* volatile data - till, 2003/7
*/
_ISR_Disable( level );
if ( _Chain_Is_empty( header ) )
a000c608: e1530004 cmp r3, r4
a000c60c: 0a000019 beq a000c678 <_Watchdog_Tickle+0x8c>
* 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) {
a000c610: e5932010 ldr r2, [r3, #16]
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) _Chain_First( header ) );
a000c614: e1a06003 mov r6, r3
a000c618: e3520000 cmp r2, #0
a000c61c: 0a000003 beq a000c630 <_Watchdog_Tickle+0x44>
the_watchdog->delta_interval--;
a000c620: e2422001 sub r2, r2, #1
a000c624: e5832010 str r2, [r3, #16]
if ( the_watchdog->delta_interval != 0 )
a000c628: e3520000 cmp r2, #0
a000c62c: 1a000011 bne a000c678 <_Watchdog_Tickle+0x8c>
goto leave;
}
do {
watchdog_state = _Watchdog_Remove( the_watchdog );
a000c630: e1a00006 mov r0, r6
a000c634: ebffffc3 bl a000c548 <_Watchdog_Remove>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000c638: e129f007 msr CPSR_fc, r7
_ISR_Enable( level );
switch( watchdog_state ) {
a000c63c: e3500002 cmp r0, #2
a000c640: 1a000003 bne a000c654 <_Watchdog_Tickle+0x68>
case WATCHDOG_ACTIVE:
(*the_watchdog->routine)(
a000c644: e596301c ldr r3, [r6, #28]
a000c648: e5960020 ldr r0, [r6, #32]
a000c64c: e5961024 ldr r1, [r6, #36] ; 0x24
a000c650: e12fff33 blx r3
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000c654: e10f7000 mrs r7, CPSR
a000c658: e3873080 orr r3, r7, #128 ; 0x80
a000c65c: e129f003 msr CPSR_fc, r3
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
leave:
_ISR_Enable(level);
}
a000c660: e5956000 ldr r6, [r5]
_ISR_Disable( level );
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
a000c664: e1560004 cmp r6, r4
a000c668: 0a000002 beq a000c678 <_Watchdog_Tickle+0x8c>
}
_ISR_Disable( level );
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
a000c66c: e5963010 ldr r3, [r6, #16] <== NOT EXECUTED
a000c670: e3530000 cmp r3, #0 <== NOT EXECUTED
a000c674: eaffffec b a000c62c <_Watchdog_Tickle+0x40> <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000c678: e129f007 msr CPSR_fc, r7
(the_watchdog->delta_interval == 0) );
leave:
_ISR_Enable(level);
}
a000c67c: e8bd80f0 pop {r4, r5, r6, r7, pc}
a0024740 <__kill>:
#endif
int __kill( pid_t pid, int sig )
{
return 0;
}
a0024740: e3a00000 mov r0, #0 <== NOT EXECUTED
a0024744: e12fff1e bx lr <== NOT EXECUTED
a0007aa0 <_chown_helper>:
const char *path,
uid_t owner,
gid_t group,
int follow_link
)
{
a0007aa0: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
a0007aa4: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED
a0007aa8: e1a02802 lsl r2, r2, #16 <== NOT EXECUTED
a0007aac: e24dd018 sub sp, sp, #24 <== NOT EXECUTED
a0007ab0: e1a08003 mov r8, r3 <== NOT EXECUTED
a0007ab4: e1a05822 lsr r5, r2, #16 <== NOT EXECUTED
a0007ab8: e1a07000 mov r7, r0 <== NOT EXECUTED
a0007abc: e1a06821 lsr r6, r1, #16 <== NOT EXECUTED
rtems_filesystem_location_info_t loc;
int result;
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, follow_link ) )
a0007ac0: eb002fb3 bl a0013994 <strlen> <== NOT EXECUTED
a0007ac4: e28d4004 add r4, sp, #4 <== NOT EXECUTED
a0007ac8: e1a01000 mov r1, r0 <== NOT EXECUTED
a0007acc: e3a02000 mov r2, #0 <== NOT EXECUTED
a0007ad0: e1a00007 mov r0, r7 <== NOT EXECUTED
a0007ad4: e1a03004 mov r3, r4 <== NOT EXECUTED
a0007ad8: e58d8000 str r8, [sp] <== NOT EXECUTED
a0007adc: eb000030 bl a0007ba4 <rtems_filesystem_evaluate_path> <== NOT EXECUTED
a0007ae0: e3500000 cmp r0, #0 <== NOT EXECUTED
return -1;
a0007ae4: 13e05000 mvnne r5, #0 <== NOT EXECUTED
)
{
rtems_filesystem_location_info_t loc;
int result;
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, follow_link ) )
a0007ae8: 1a000008 bne a0007b10 <_chown_helper+0x70> <== NOT EXECUTED
return -1;
result = (*loc.ops->chown_h)( &loc, owner, group );
a0007aec: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
a0007af0: e1a02005 mov r2, r5 <== NOT EXECUTED
a0007af4: e1a00004 mov r0, r4 <== NOT EXECUTED
a0007af8: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED
a0007afc: e1a01006 mov r1, r6 <== NOT EXECUTED
a0007b00: e12fff33 blx r3 <== NOT EXECUTED
a0007b04: e1a05000 mov r5, r0 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
a0007b08: e1a00004 mov r0, r4 <== NOT EXECUTED
a0007b0c: eb000054 bl a0007c64 <rtems_filesystem_freenode> <== NOT EXECUTED
return result;
}
a0007b10: e1a00005 mov r0, r5 <== NOT EXECUTED
a0007b14: e28dd018 add sp, sp, #24 <== NOT EXECUTED
a0007b18: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
a0006304 <_gettimeofday>:
int _gettimeofday(
struct timeval *tp,
struct timezone *tzp
)
{
return gettimeofday( tp, tzp );
a0006304: eaffffe5 b a00062a0 <gettimeofday> <== NOT EXECUTED
a0009850 <_link_r>:
struct _reent *ptr __attribute__((unused)),
const char *existing,
const char *new
)
{
return link( existing, new );
a0009850: e1a00001 mov r0, r1 <== NOT EXECUTED
a0009854: e1a01002 mov r1, r2 <== NOT EXECUTED
a0009858: eaffffc0 b a0009760 <link> <== NOT EXECUTED
a0015278 <_lseek_r>:
int fd,
off_t offset,
int whence
)
{
return lseek( fd, offset, whence );
a0015278: e1a00001 mov r0, r1 <== NOT EXECUTED
a001527c: e1a01002 mov r1, r2 <== NOT EXECUTED
a0015280: e1a02003 mov r2, r3 <== NOT EXECUTED
a0015284: e59d3000 ldr r3, [sp] <== NOT EXECUTED
a0015288: eaffffc1 b a0015194 <lseek> <== NOT EXECUTED
a0008264 <_lstat_r>:
struct _reent *ptr __attribute__((unused)),
const char *path,
struct stat *buf
)
{
return _STAT_NAME( path, buf );
a0008264: e1a00001 mov r0, r1 <== NOT EXECUTED
a0008268: e1a01002 mov r1, r2 <== NOT EXECUTED
a000826c: eaffffd9 b a00081d8 <lstat> <== NOT EXECUTED
a00153dc <_realloc_r>:
struct _reent *ignored __attribute__((unused)),
void *ptr,
size_t size
)
{
return realloc( ptr, size );
a00153dc: e1a00001 mov r0, r1 <== NOT EXECUTED
a00153e0: e1a01002 mov r1, r2 <== NOT EXECUTED
a00153e4: ea000012 b a0015434 <realloc> <== NOT EXECUTED
a000a5ec <_rename_r>:
int _rename_r(
struct _reent *ptr __attribute__((unused)),
const char *old,
const char *new
)
{
a000a5ec: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
/*
* Get the parent node of the old path to be renamed. Find the parent path.
*/
old_parent_pathlen = rtems_filesystem_dirname ( old );
a000a5f0: e1a00001 mov r0, r1 <== NOT EXECUTED
int _rename_r(
struct _reent *ptr __attribute__((unused)),
const char *old,
const char *new
)
{
a000a5f4: e24dd048 sub sp, sp, #72 ; 0x48 <== NOT EXECUTED
a000a5f8: e1a04001 mov r4, r1 <== NOT EXECUTED
a000a5fc: e1a07002 mov r7, r2 <== NOT EXECUTED
/*
* Get the parent node of the old path to be renamed. Find the parent path.
*/
old_parent_pathlen = rtems_filesystem_dirname ( old );
a000a600: ebfffaa6 bl a00090a0 <rtems_filesystem_dirname> <== NOT EXECUTED
if ( old_parent_pathlen == 0 )
a000a604: e2506000 subs r6, r0, #0 <== NOT EXECUTED
a000a608: e28d3018 add r3, sp, #24 <== NOT EXECUTED
a000a60c: 1a000005 bne a000a628 <_rename_r+0x3c> <== NOT EXECUTED
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
a000a610: e1a00004 mov r0, r4 <== NOT EXECUTED
a000a614: e28d1044 add r1, sp, #68 ; 0x44 <== NOT EXECUTED
a000a618: e1a02003 mov r2, r3 <== NOT EXECUTED
a000a61c: eb0000e1 bl a000a9a8 <rtems_filesystem_get_start_loc> <== NOT EXECUTED
rtems_filesystem_location_info_t old_parent_loc;
rtems_filesystem_location_info_t new_parent_loc;
int i;
int result;
const char *name;
bool free_old_parentloc = false;
a000a620: e1a05006 mov r5, r6 <== NOT EXECUTED
a000a624: ea000008 b a000a64c <_rename_r+0x60> <== NOT EXECUTED
old_parent_pathlen = rtems_filesystem_dirname ( old );
if ( old_parent_pathlen == 0 )
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
else {
result = rtems_filesystem_evaluate_path( old, old_parent_pathlen,
a000a628: e3a02000 mov r2, #0 <== NOT EXECUTED
a000a62c: e58d2000 str r2, [sp] <== NOT EXECUTED
a000a630: e1a00004 mov r0, r4 <== NOT EXECUTED
a000a634: e1a01006 mov r1, r6 <== NOT EXECUTED
a000a638: e2822002 add r2, r2, #2 <== NOT EXECUTED
a000a63c: ebfffa84 bl a0009054 <rtems_filesystem_evaluate_path> <== NOT EXECUTED
RTEMS_LIBIO_PERMS_WRITE,
&old_parent_loc,
false );
if ( result != 0 )
a000a640: e3500000 cmp r0, #0 <== NOT EXECUTED
a000a644: 1a000057 bne a000a7a8 <_rename_r+0x1bc> <== NOT EXECUTED
return -1;
free_old_parentloc = true;
a000a648: e3a05001 mov r5, #1 <== NOT EXECUTED
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
a000a64c: e28dc02c add ip, sp, #44 ; 0x2c <== NOT EXECUTED
a000a650: e28de018 add lr, sp, #24 <== NOT EXECUTED
a000a654: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED
a000a658: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED
a000a65c: e59e3000 ldr r3, [lr] <== NOT EXECUTED
name = old + old_parent_pathlen;
a000a660: e0844006 add r4, r4, r6 <== NOT EXECUTED
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
a000a664: e1a00004 mov r0, r4 <== NOT EXECUTED
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
a000a668: e58c3000 str r3, [ip] <== NOT EXECUTED
name = old + old_parent_pathlen;
a000a66c: e58d4040 str r4, [sp, #64] ; 0x40 <== NOT EXECUTED
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
a000a670: eb0032cd bl a00171ac <strlen> <== NOT EXECUTED
a000a674: e1a01000 mov r1, r0 <== NOT EXECUTED
a000a678: e1a00004 mov r0, r4 <== NOT EXECUTED
a000a67c: ebfffa95 bl a00090d8 <rtems_filesystem_prefix_separators> <== NOT EXECUTED
a000a680: e0844000 add r4, r4, r0 <== NOT EXECUTED
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
a000a684: e1a00004 mov r0, r4 <== NOT EXECUTED
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
name = old + old_parent_pathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
a000a688: e58d4040 str r4, [sp, #64] ; 0x40 <== NOT EXECUTED
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
a000a68c: eb0032c6 bl a00171ac <strlen> <== NOT EXECUTED
a000a690: e28d602c add r6, sp, #44 ; 0x2c <== NOT EXECUTED
a000a694: e1a01000 mov r1, r0 <== NOT EXECUTED
a000a698: e3a02000 mov r2, #0 <== NOT EXECUTED
a000a69c: e1a00004 mov r0, r4 <== NOT EXECUTED
a000a6a0: e1a03006 mov r3, r6 <== NOT EXECUTED
a000a6a4: e58d2000 str r2, [sp] <== NOT EXECUTED
a000a6a8: ebfffa4d bl a0008fe4 <rtems_filesystem_evaluate_relative_path><== NOT EXECUTED
0, &old_loc, false );
if ( result != 0 ) {
a000a6ac: e3500000 cmp r0, #0 <== NOT EXECUTED
a000a6b0: 0a000003 beq a000a6c4 <_rename_r+0xd8> <== NOT EXECUTED
if ( free_old_parentloc )
a000a6b4: e3550000 cmp r5, #0 <== NOT EXECUTED
rtems_filesystem_freenode( &old_parent_loc );
a000a6b8: 128d0018 addne r0, sp, #24 <== NOT EXECUTED
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &old_loc, false );
if ( result != 0 ) {
if ( free_old_parentloc )
a000a6bc: 0a000039 beq a000a7a8 <_rename_r+0x1bc> <== NOT EXECUTED
a000a6c0: ea000014 b a000a718 <_rename_r+0x12c> <== NOT EXECUTED
/*
* Get the parent of the new node we are renaming to.
*/
rtems_filesystem_get_start_loc( new, &i, &new_parent_loc );
a000a6c4: e28d4004 add r4, sp, #4 <== NOT EXECUTED
a000a6c8: e1a00007 mov r0, r7 <== NOT EXECUTED
a000a6cc: e28d1044 add r1, sp, #68 ; 0x44 <== NOT EXECUTED
a000a6d0: e1a02004 mov r2, r4 <== NOT EXECUTED
a000a6d4: eb0000b3 bl a000a9a8 <rtems_filesystem_get_start_loc> <== NOT EXECUTED
result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name );
a000a6d8: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
a000a6dc: e59d0044 ldr r0, [sp, #68] ; 0x44 <== NOT EXECUTED
a000a6e0: e1a01004 mov r1, r4 <== NOT EXECUTED
a000a6e4: e5933004 ldr r3, [r3, #4] <== NOT EXECUTED
a000a6e8: e0870000 add r0, r7, r0 <== NOT EXECUTED
a000a6ec: e28d2040 add r2, sp, #64 ; 0x40 <== NOT EXECUTED
a000a6f0: e12fff33 blx r3 <== NOT EXECUTED
if ( result != 0 ) {
a000a6f4: e3500000 cmp r0, #0 <== NOT EXECUTED
a000a6f8: 0a000008 beq a000a720 <_rename_r+0x134> <== NOT EXECUTED
rtems_filesystem_freenode( &new_parent_loc );
a000a6fc: e1a00004 mov r0, r4 <== NOT EXECUTED
a000a700: ebfffaf8 bl a00092e8 <rtems_filesystem_freenode> <== NOT EXECUTED
if ( free_old_parentloc )
a000a704: e3550000 cmp r5, #0 <== NOT EXECUTED
a000a708: 0a000001 beq a000a714 <_rename_r+0x128> <== NOT EXECUTED
rtems_filesystem_freenode( &old_parent_loc );
a000a70c: e28d0018 add r0, sp, #24 <== NOT EXECUTED
a000a710: ebfffaf4 bl a00092e8 <rtems_filesystem_freenode> <== NOT EXECUTED
rtems_filesystem_freenode( &old_loc );
a000a714: e28d002c add r0, sp, #44 ; 0x2c <== NOT EXECUTED
a000a718: ebfffaf2 bl a00092e8 <rtems_filesystem_freenode> <== NOT EXECUTED
a000a71c: ea000021 b a000a7a8 <_rename_r+0x1bc> <== NOT EXECUTED
/*
* Check to see if the caller is trying to rename across file system
* boundaries.
*/
if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) {
a000a720: e59d3014 ldr r3, [sp, #20] <== NOT EXECUTED
a000a724: e59d2028 ldr r2, [sp, #40] ; 0x28 <== NOT EXECUTED
a000a728: e1520003 cmp r2, r3 <== NOT EXECUTED
a000a72c: 0a00000b beq a000a760 <_rename_r+0x174> <== NOT EXECUTED
rtems_filesystem_freenode( &new_parent_loc );
a000a730: e1a00004 mov r0, r4 <== NOT EXECUTED
a000a734: ebfffaeb bl a00092e8 <rtems_filesystem_freenode> <== NOT EXECUTED
if ( free_old_parentloc )
a000a738: e3550000 cmp r5, #0 <== NOT EXECUTED
a000a73c: 0a000001 beq a000a748 <_rename_r+0x15c> <== NOT EXECUTED
rtems_filesystem_freenode( &old_parent_loc );
a000a740: e28d0018 add r0, sp, #24 <== NOT EXECUTED
a000a744: ebfffae7 bl a00092e8 <rtems_filesystem_freenode> <== NOT EXECUTED
rtems_filesystem_freenode( &old_loc );
a000a748: e28d002c add r0, sp, #44 ; 0x2c <== NOT EXECUTED
a000a74c: ebfffae5 bl a00092e8 <rtems_filesystem_freenode> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EXDEV );
a000a750: eb0025ca bl a0013e80 <__errno> <== NOT EXECUTED
a000a754: e3a03012 mov r3, #18 <== NOT EXECUTED
a000a758: e5803000 str r3, [r0] <== NOT EXECUTED
a000a75c: ea000011 b a000a7a8 <_rename_r+0x1bc> <== NOT EXECUTED
}
result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name );
a000a760: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
a000a764: e28d7018 add r7, sp, #24 <== NOT EXECUTED
a000a768: e1a01006 mov r1, r6 <== NOT EXECUTED
a000a76c: e593c040 ldr ip, [r3, #64] ; 0x40 <== NOT EXECUTED
a000a770: e1a02004 mov r2, r4 <== NOT EXECUTED
a000a774: e59d3040 ldr r3, [sp, #64] ; 0x40 <== NOT EXECUTED
a000a778: e1a00007 mov r0, r7 <== NOT EXECUTED
a000a77c: e12fff3c blx ip <== NOT EXECUTED
a000a780: e1a06000 mov r6, r0 <== NOT EXECUTED
rtems_filesystem_freenode( &new_parent_loc );
a000a784: e1a00004 mov r0, r4 <== NOT EXECUTED
a000a788: ebfffad6 bl a00092e8 <rtems_filesystem_freenode> <== NOT EXECUTED
if ( free_old_parentloc )
a000a78c: e3550000 cmp r5, #0 <== NOT EXECUTED
a000a790: 0a000001 beq a000a79c <_rename_r+0x1b0> <== NOT EXECUTED
rtems_filesystem_freenode( &old_parent_loc );
a000a794: e1a00007 mov r0, r7 <== NOT EXECUTED
a000a798: ebfffad2 bl a00092e8 <rtems_filesystem_freenode> <== NOT EXECUTED
rtems_filesystem_freenode( &old_loc );
a000a79c: e28d002c add r0, sp, #44 ; 0x2c <== NOT EXECUTED
a000a7a0: ebfffad0 bl a00092e8 <rtems_filesystem_freenode> <== NOT EXECUTED
return result;
a000a7a4: ea000000 b a000a7ac <_rename_r+0x1c0> <== NOT EXECUTED
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &old_loc, false );
if ( result != 0 ) {
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
return -1;
a000a7a8: e3e06000 mvn r6, #0 <== NOT EXECUTED
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
return result;
}
a000a7ac: e1a00006 mov r0, r6 <== NOT EXECUTED
a000a7b0: e28dd048 add sp, sp, #72 ; 0x48 <== NOT EXECUTED
a000a7b4: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
a00070e8 <_stat_r>:
struct _reent *ptr __attribute__((unused)),
const char *path,
struct stat *buf
)
{
return _STAT_NAME( path, buf );
a00070e8: e1a00001 mov r0, r1 <== NOT EXECUTED
a00070ec: e1a01002 mov r1, r2 <== NOT EXECUTED
a00070f0: eaffffd8 b a0007058 <stat> <== NOT EXECUTED
a0008d30 <_times>:
#endif
clock_t _times(
struct tms *ptms
)
{
a0008d30: e92d407f push {r0, r1, r2, r3, r4, r5, r6, lr}
rtems_interval ticks;
if ( !ptms )
a0008d34: e2504000 subs r4, r0, #0
a0008d38: 1a000004 bne a0008d50 <_times+0x20>
rtems_set_errno_and_return_minus_one( EFAULT );
a0008d3c: eb001e03 bl a0010550 <__errno>
a0008d40: e3a0300e mov r3, #14
a0008d44: e5803000 str r3, [r0]
a0008d48: e3e00000 mvn r0, #0
a0008d4c: ea00001a b a0008dbc <_times+0x8c>
/*
* This call does not depend on TOD being initialized and can't fail.
*/
ticks = rtems_clock_get_ticks_since_boot();
a0008d50: eb0000e3 bl a00090e4 <rtems_clock_get_ticks_since_boot>
{
Timestamp_Control per_tick;
uint32_t ticks;
uint32_t fractional_ticks;
_Timestamp_Set(
a0008d54: e59f3068 ldr r3, [pc, #104] ; a0008dc4 <_times+0x94> <== NOT EXECUTED
/*
* This call does not depend on TOD being initialized and can't fail.
*/
ticks = rtems_clock_get_ticks_since_boot();
a0008d58: e1a05000 mov r5, r0 <== NOT EXECUTED
{
Timestamp_Control per_tick;
uint32_t ticks;
uint32_t fractional_ticks;
_Timestamp_Set(
a0008d5c: e59f1064 ldr r1, [pc, #100] ; a0008dc8 <_times+0x98> <== NOT EXECUTED
a0008d60: e593600c ldr r6, [r3, #12] <== NOT EXECUTED
a0008d64: e1a00006 mov r0, r6 <== NOT EXECUTED
a0008d68: eb002b90 bl a0013bb0 <__aeabi_uidiv> <== NOT EXECUTED
a0008d6c: e58d0000 str r0, [sp] <== NOT EXECUTED
a0008d70: e3a00ffa mov r0, #1000 ; 0x3e8 <== NOT EXECUTED
a0008d74: e59f1050 ldr r1, [pc, #80] ; a0008dcc <_times+0x9c> <== NOT EXECUTED
a0008d78: e0000096 mul r0, r6, r0 <== NOT EXECUTED
a0008d7c: eb002c23 bl a0013e10 <__umodsi3> <== NOT EXECUTED
TOD_MICROSECONDS_PER_SECOND,
(rtems_configuration_get_nanoseconds_per_tick() %
TOD_NANOSECONDS_PER_SECOND)
);
_Timestamp_Divide(
a0008d80: e59f3048 ldr r3, [pc, #72] ; a0008dd0 <_times+0xa0> <== NOT EXECUTED
{
Timestamp_Control per_tick;
uint32_t ticks;
uint32_t fractional_ticks;
_Timestamp_Set(
a0008d84: e58d0004 str r0, [sp, #4] <== NOT EXECUTED
TOD_MICROSECONDS_PER_SECOND,
(rtems_configuration_get_nanoseconds_per_tick() %
TOD_NANOSECONDS_PER_SECOND)
);
_Timestamp_Divide(
a0008d88: e1a0100d mov r1, sp <== NOT EXECUTED
a0008d8c: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED
a0008d90: e28d200c add r2, sp, #12 <== NOT EXECUTED
a0008d94: e28d3008 add r3, sp, #8 <== NOT EXECUTED
a0008d98: e2800084 add r0, r0, #132 ; 0x84 <== NOT EXECUTED
a0008d9c: eb000d6e bl a000c35c <_Timespec_Divide> <== NOT EXECUTED
&_Thread_Executing->cpu_time_used,
&per_tick,
&ticks,
&fractional_ticks
);
ptms->tms_utime = ticks;
a0008da0: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
}
#else
ptms->tms_utime = _Thread_Executing->cpu_time_used;
#endif
ptms->tms_stime = ticks;
a0008da4: e5845004 str r5, [r4, #4] <== NOT EXECUTED
ptms->tms_cutime = 0;
ptms->tms_cstime = 0;
return ticks;
a0008da8: e1a00005 mov r0, r5 <== NOT EXECUTED
&_Thread_Executing->cpu_time_used,
&per_tick,
&ticks,
&fractional_ticks
);
ptms->tms_utime = ticks;
a0008dac: e5843000 str r3, [r4] <== NOT EXECUTED
}
#else
ptms->tms_utime = _Thread_Executing->cpu_time_used;
#endif
ptms->tms_stime = ticks;
ptms->tms_cutime = 0;
a0008db0: e3a03000 mov r3, #0 <== NOT EXECUTED
a0008db4: e5843008 str r3, [r4, #8] <== NOT EXECUTED
ptms->tms_cstime = 0;
a0008db8: e584300c str r3, [r4, #12] <== NOT EXECUTED
return ticks;
}
a0008dbc: e28dd010 add sp, sp, #16
a0008dc0: e8bd8070 pop {r4, r5, r6, pc}
a0009bac <_unlink_r>:
int _unlink_r(
struct _reent *ptr __attribute__((unused)),
const char *path
)
{
return unlink( path );
a0009bac: e1a00001 mov r0, r1 <== NOT EXECUTED
a0009bb0: eaffffa8 b a0009a58 <unlink> <== NOT EXECUTED
a0008120 <access>:
int access(
const char *path,
int amode
)
{
a0008120: e92d4010 push {r4, lr} <== NOT EXECUTED
a0008124: e24dd048 sub sp, sp, #72 ; 0x48 <== NOT EXECUTED
a0008128: e1a04001 mov r4, r1 <== NOT EXECUTED
struct stat statbuf;
if ( stat(path, &statbuf) )
a000812c: e1a0100d mov r1, sp <== NOT EXECUTED
a0008130: eb0005bb bl a0009824 <stat> <== NOT EXECUTED
a0008134: e3500000 cmp r0, #0 <== NOT EXECUTED
a0008138: 1a000010 bne a0008180 <access+0x60> <== NOT EXECUTED
return -1;
if ( amode & R_OK ) {
a000813c: e3140004 tst r4, #4 <== NOT EXECUTED
a0008140: 0a000002 beq a0008150 <access+0x30> <== NOT EXECUTED
if (!( statbuf.st_mode & S_IREAD ))
a0008144: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
a0008148: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED
a000814c: 0a00000b beq a0008180 <access+0x60> <== NOT EXECUTED
return -1;
}
if ( amode & W_OK ) {
a0008150: e3140002 tst r4, #2 <== NOT EXECUTED
a0008154: 0a000002 beq a0008164 <access+0x44> <== NOT EXECUTED
if ( !( statbuf.st_mode & S_IWRITE ) )
a0008158: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
a000815c: e3130080 tst r3, #128 ; 0x80 <== NOT EXECUTED
a0008160: 0a000006 beq a0008180 <access+0x60> <== NOT EXECUTED
return -1;
}
if ( amode & X_OK ) {
a0008164: e2140001 ands r0, r4, #1 <== NOT EXECUTED
a0008168: 0a000005 beq a0008184 <access+0x64> <== NOT EXECUTED
if ( !( statbuf.st_mode & S_IEXEC ) )
a000816c: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
a0008170: e3130040 tst r3, #64 ; 0x40 <== NOT EXECUTED
return -1;
}
return 0;
a0008174: 03e00000 mvneq r0, #0 <== NOT EXECUTED
a0008178: 13a00000 movne r0, #0 <== NOT EXECUTED
a000817c: ea000000 b a0008184 <access+0x64> <== NOT EXECUTED
return -1;
}
if ( amode & W_OK ) {
if ( !( statbuf.st_mode & S_IWRITE ) )
return -1;
a0008180: e3e00000 mvn r0, #0 <== NOT EXECUTED
if ( !( statbuf.st_mode & S_IEXEC ) )
return -1;
}
return 0;
}
a0008184: e28dd048 add sp, sp, #72 ; 0x48 <== NOT EXECUTED
a0008188: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a000771c <cfgetispeed>:
speed_t cfgetispeed(
const struct termios *tp
)
{
return (tp->c_cflag / (CIBAUD / CBAUD)) & CBAUD;
a000771c: e1d030ba ldrh r3, [r0, #10] <== NOT EXECUTED
}
a0007720: e59f0004 ldr r0, [pc, #4] ; a000772c <cfgetispeed+0x10> <== NOT EXECUTED
a0007724: e0030000 and r0, r3, r0 <== NOT EXECUTED
a0007728: e12fff1e bx lr <== NOT EXECUTED
a0007730 <cfgetospeed>:
speed_t cfgetospeed(
const struct termios *tp
)
{
return tp->c_cflag & CBAUD;
a0007730: e5903008 ldr r3, [r0, #8] <== NOT EXECUTED
}
a0007734: e59f0004 ldr r0, [pc, #4] ; a0007740 <cfgetospeed+0x10> <== NOT EXECUTED
a0007738: e0030000 and r0, r3, r0 <== NOT EXECUTED
a000773c: e12fff1e bx lr <== NOT EXECUTED
a0007744 <cfsetispeed>:
int cfsetispeed(
struct termios *tp,
speed_t speed
)
{
if ( speed & ~CBAUD )
a0007744: e3c13a01 bic r3, r1, #4096 ; 0x1000 <== NOT EXECUTED
a0007748: e3d3300f bics r3, r3, #15 <== NOT EXECUTED
int cfsetispeed(
struct termios *tp,
speed_t speed
)
{
a000774c: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
if ( speed & ~CBAUD )
a0007750: 0a000004 beq a0007768 <cfsetispeed+0x24> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
a0007754: eb002a6b bl a0012108 <__errno> <== NOT EXECUTED
a0007758: e3a03016 mov r3, #22 <== NOT EXECUTED
a000775c: e5803000 str r3, [r0] <== NOT EXECUTED
a0007760: e3e00000 mvn r0, #0 <== NOT EXECUTED
a0007764: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
tp->c_cflag = (tp->c_cflag & ~CIBAUD) | (speed * (CIBAUD / CBAUD));
a0007768: e5902008 ldr r2, [r0, #8] <== NOT EXECUTED
a000776c: e3c22201 bic r2, r2, #268435456 ; 0x10000000 <== NOT EXECUTED
a0007770: e3c2280f bic r2, r2, #983040 ; 0xf0000 <== NOT EXECUTED
a0007774: e1821801 orr r1, r2, r1, lsl #16 <== NOT EXECUTED
a0007778: e5801008 str r1, [r0, #8] <== NOT EXECUTED
return 0;
a000777c: e1a00003 mov r0, r3 <== NOT EXECUTED
}
a0007780: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a0007784 <cfsetospeed>:
int cfsetospeed(
struct termios *tp,
speed_t speed
)
{
if ( speed & ~CBAUD )
a0007784: e3c13a01 bic r3, r1, #4096 ; 0x1000 <== NOT EXECUTED
a0007788: e3d3300f bics r3, r3, #15 <== NOT EXECUTED
int cfsetospeed(
struct termios *tp,
speed_t speed
)
{
a000778c: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
if ( speed & ~CBAUD )
a0007790: 0a000004 beq a00077a8 <cfsetospeed+0x24> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
a0007794: eb002a5b bl a0012108 <__errno> <== NOT EXECUTED
a0007798: e3a03016 mov r3, #22 <== NOT EXECUTED
a000779c: e5803000 str r3, [r0] <== NOT EXECUTED
a00077a0: e3e00000 mvn r0, #0 <== NOT EXECUTED
a00077a4: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
tp->c_cflag = (tp->c_cflag & ~CBAUD) | speed;
a00077a8: e5902008 ldr r2, [r0, #8] <== NOT EXECUTED
a00077ac: e3c22a01 bic r2, r2, #4096 ; 0x1000 <== NOT EXECUTED
a00077b0: e3c2200f bic r2, r2, #15 <== NOT EXECUTED
a00077b4: e1811002 orr r1, r1, r2 <== NOT EXECUTED
a00077b8: e5801008 str r1, [r0, #8] <== NOT EXECUTED
return 0;
a00077bc: e1a00003 mov r0, r3 <== NOT EXECUTED
}
a00077c0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a0007a34 <chmod>:
int chmod(
const char *path,
mode_t mode
)
{
a0007a34: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
a0007a38: e24dd018 sub sp, sp, #24 <== NOT EXECUTED
a0007a3c: e1a05001 mov r5, r1 <== NOT EXECUTED
a0007a40: e1a06000 mov r6, r0 <== NOT EXECUTED
int status;
rtems_filesystem_location_info_t loc;
int result;
status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true );
a0007a44: eb002fd2 bl a0013994 <strlen> <== NOT EXECUTED
a0007a48: e28d4004 add r4, sp, #4 <== NOT EXECUTED
a0007a4c: e3a03001 mov r3, #1 <== NOT EXECUTED
a0007a50: e1a01000 mov r1, r0 <== NOT EXECUTED
a0007a54: e58d3000 str r3, [sp] <== NOT EXECUTED
a0007a58: e1a00006 mov r0, r6 <== NOT EXECUTED
a0007a5c: e3a02000 mov r2, #0 <== NOT EXECUTED
a0007a60: e1a03004 mov r3, r4 <== NOT EXECUTED
a0007a64: eb00004e bl a0007ba4 <rtems_filesystem_evaluate_path> <== NOT EXECUTED
if ( status != 0 )
a0007a68: e3500000 cmp r0, #0 <== NOT EXECUTED
return -1;
a0007a6c: 13e05000 mvnne r5, #0 <== NOT EXECUTED
int status;
rtems_filesystem_location_info_t loc;
int result;
status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true );
if ( status != 0 )
a0007a70: 1a000007 bne a0007a94 <chmod+0x60> <== NOT EXECUTED
return -1;
result = (*loc.handlers->fchmod_h)( &loc, mode );
a0007a74: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
a0007a78: e1a01005 mov r1, r5 <== NOT EXECUTED
a0007a7c: e1a00004 mov r0, r4 <== NOT EXECUTED
a0007a80: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
a0007a84: e12fff33 blx r3 <== NOT EXECUTED
a0007a88: e1a05000 mov r5, r0 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
a0007a8c: e1a00004 mov r0, r4 <== NOT EXECUTED
a0007a90: eb000073 bl a0007c64 <rtems_filesystem_freenode> <== NOT EXECUTED
return result;
}
a0007a94: e1a00005 mov r0, r5 <== NOT EXECUTED
a0007a98: e28dd018 add sp, sp, #24 <== NOT EXECUTED
a0007a9c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
a0007b1c <chown>:
int chown(
const char *path,
uid_t owner,
gid_t group
)
{
a0007b1c: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED
a0007b20: e1a02802 lsl r2, r2, #16 <== NOT EXECUTED
return _chown_helper( path, owner, group, true );
a0007b24: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED
a0007b28: e1a02822 lsr r2, r2, #16 <== NOT EXECUTED
a0007b2c: e3a03001 mov r3, #1 <== NOT EXECUTED
a0007b30: eaffffda b a0007aa0 <_chown_helper> <== NOT EXECUTED
a000cafc <devFS_evaluate_path>:
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
a000cafc: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
int i;
rtems_device_name_t *device_name_table;
/* see if 'flags' is valid */
if ( !rtems_libio_is_valid_perms( flags ) )
a000cb00: e3d27007 bics r7, r2, #7
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
a000cb04: e1a09000 mov r9, r0
a000cb08: e1a04001 mov r4, r1
a000cb0c: e1a05003 mov r5, r3
int i;
rtems_device_name_t *device_name_table;
/* see if 'flags' is valid */
if ( !rtems_libio_is_valid_perms( flags ) )
a000cb10: 0a000002 beq a000cb20 <devFS_evaluate_path+0x24>
rtems_set_errno_and_return_minus_one( EPERM );
a000cb14: eb00066e bl a000e4d4 <__errno> <== NOT EXECUTED
a000cb18: e3a03001 mov r3, #1 <== NOT EXECUTED
a000cb1c: ea000005 b a000cb38 <devFS_evaluate_path+0x3c> <== NOT EXECUTED
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
a000cb20: e5936000 ldr r6, [r3]
if (!device_name_table)
a000cb24: e3560000 cmp r6, #0
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
a000cb28: 159fa094 ldrne sl, [pc, #148] ; a000cbc4 <devFS_evaluate_path+0xc8>
if ( !rtems_libio_is_valid_perms( flags ) )
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)
a000cb2c: 1a00001c bne a000cba4 <devFS_evaluate_path+0xa8>
rtems_set_errno_and_return_minus_one( EFAULT );
a000cb30: eb000667 bl a000e4d4 <__errno>
a000cb34: e3a0300e mov r3, #14
a000cb38: e5803000 str r3, [r0]
a000cb3c: e3e00000 mvn r0, #0
a000cb40: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
for (i = 0; i < rtems_device_table_size; i++) {
if (!device_name_table[i].device_name)
a000cb44: e5968000 ldr r8, [r6]
a000cb48: e3580000 cmp r8, #0
a000cb4c: 0a000012 beq a000cb9c <devFS_evaluate_path+0xa0>
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
a000cb50: e1a00009 mov r0, r9
a000cb54: e1a01008 mov r1, r8
a000cb58: e1a02004 mov r2, r4
a000cb5c: eb0009e3 bl a000f2f0 <strncmp>
a000cb60: e3500000 cmp r0, #0
a000cb64: 1a00000c bne a000cb9c <devFS_evaluate_path+0xa0>
continue;
if (device_name_table[i].device_name[pathnamelen] != '\0')
a000cb68: e7d80004 ldrb r0, [r8, r4]
a000cb6c: e3500000 cmp r0, #0
a000cb70: 1a000009 bne a000cb9c <devFS_evaluate_path+0xa0>
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
pathloc->handlers = &devFS_file_handlers;
a000cb74: e59f304c ldr r3, [pc, #76] ; a000cbc8 <devFS_evaluate_path+0xcc>
if (device_name_table[i].device_name[pathnamelen] != '\0')
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
a000cb78: e5856000 str r6, [r5]
pathloc->handlers = &devFS_file_handlers;
a000cb7c: e5853008 str r3, [r5, #8]
pathloc->ops = &devFS_ops;
a000cb80: e59f3044 ldr r3, [pc, #68] ; a000cbcc <devFS_evaluate_path+0xd0>
a000cb84: e585300c str r3, [r5, #12]
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
a000cb88: e59f3040 ldr r3, [pc, #64] ; a000cbd0 <devFS_evaluate_path+0xd4>
a000cb8c: e5933000 ldr r3, [r3]
a000cb90: e5933028 ldr r3, [r3, #40] ; 0x28
a000cb94: e5853010 str r3, [r5, #16]
return 0;
a000cb98: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
/* 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++) {
a000cb9c: e2877001 add r7, r7, #1
a000cba0: e2866014 add r6, r6, #20
a000cba4: e59a3000 ldr r3, [sl]
a000cba8: e1570003 cmp r7, r3
a000cbac: 3affffe4 bcc a000cb44 <devFS_evaluate_path+0x48>
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
return 0;
}
/* no such file or directory */
rtems_set_errno_and_return_minus_one( ENOENT );
a000cbb0: eb000647 bl a000e4d4 <__errno>
a000cbb4: e3a03002 mov r3, #2
a000cbb8: e5803000 str r3, [r0]
a000cbbc: e3e00000 mvn r0, #0
}
a000cbc0: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
a0005c1c <devFS_ioctl>:
int devFS_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
a0005c1c: e92d400f push {r0, r1, r2, r3, lr}
rtems_libio_ioctl_args_t args;
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->pathinfo.node_access;
a0005c20: e5903018 ldr r3, [r0, #24]
args.iop = iop;
a0005c24: e88d0007 stm sp, {r0, r1, r2}
args.command = command;
args.buffer = buffer;
status = rtems_io_control(
a0005c28: e5930008 ldr r0, [r3, #8]
a0005c2c: e593100c ldr r1, [r3, #12]
a0005c30: e1a0200d mov r2, sp
a0005c34: eb000f00 bl a000983c <rtems_io_control>
np->major,
np->minor,
(void *) &args
);
if ( status )
a0005c38: e3500000 cmp r0, #0
return rtems_deviceio_errno(status);
return args.ioctl_return;
a0005c3c: 059d000c ldreq r0, [sp, #12]
np->major,
np->minor,
(void *) &args
);
if ( status )
a0005c40: 0a000000 beq a0005c48 <devFS_ioctl+0x2c>
return rtems_deviceio_errno(status);
a0005c44: eb001be5 bl a000cbe0 <rtems_deviceio_errno> <== NOT EXECUTED
return args.ioctl_return;
}
a0005c48: e28dd010 add sp, sp, #16
a0005c4c: e8bd8000 pop {pc}
a0005a68 <devFS_mknod>:
const char *path,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
a0005a68: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr}
a0005a6c: e58d2000 str r2, [sp]
a0005a70: e1a09003 mov r9, r3
* condition and do not create the '/dev' and the 'path'
* actually passed in is 'dev', not '/dev'. Just return 0 to
* indicate we are OK.
*/
if ((path[0] == 'd') && (path[1] == 'e') &&
a0005a74: e5d03000 ldrb r3, [r0]
const char *path,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
a0005a78: e1a04000 mov r4, r0
a0005a7c: e1a05001 mov r5, r1
* condition and do not create the '/dev' and the 'path'
* actually passed in is 'dev', not '/dev'. Just return 0 to
* indicate we are OK.
*/
if ((path[0] == 'd') && (path[1] == 'e') &&
a0005a80: e3530064 cmp r3, #100 ; 0x64
a0005a84: 1a000008 bne a0005aac <devFS_mknod+0x44>
a0005a88: e5d03001 ldrb r3, [r0, #1]
a0005a8c: e3530065 cmp r3, #101 ; 0x65
a0005a90: 1a000005 bne a0005aac <devFS_mknod+0x44>
a0005a94: e5d03002 ldrb r3, [r0, #2]
a0005a98: e3530076 cmp r3, #118 ; 0x76
a0005a9c: 1a000002 bne a0005aac <devFS_mknod+0x44>
(path[2] == 'v') && (path[3] == '\0'))
a0005aa0: e5d00003 ldrb r0, [r0, #3]
a0005aa4: e3500000 cmp r0, #0
a0005aa8: 0a000039 beq a0005b94 <devFS_mknod+0x12c>
return 0;
/* must be a character device or a block device */
if (!S_ISBLK(mode) && !S_ISCHR(mode))
a0005aac: e205aa0f and sl, r5, #61440 ; 0xf000
a0005ab0: e35a0a02 cmp sl, #8192 ; 0x2000
a0005ab4: 135a0a06 cmpne sl, #24576 ; 0x6000
a0005ab8: 03a0a000 moveq sl, #0
a0005abc: 13a0a001 movne sl, #1
a0005ac0: 0a000002 beq a0005ad0 <devFS_mknod+0x68>
rtems_set_errno_and_return_minus_one( EINVAL );
a0005ac4: eb002282 bl a000e4d4 <__errno>
a0005ac8: e3a03016 mov r3, #22
a0005acc: ea000008 b a0005af4 <devFS_mknod+0x8c>
else
rtems_filesystem_split_dev_t(dev, major, minor);
/* Find an empty slot in device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
a0005ad0: e59d3028 ldr r3, [sp, #40] ; 0x28
a0005ad4: e5936000 ldr r6, [r3]
if (!device_name_table)
a0005ad8: e3560000 cmp r6, #0
a0005adc: 13e07000 mvnne r7, #0
a0005ae0: 11a0800a movne r8, sl
rtems_set_errno_and_return_minus_one( EFAULT );
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
a0005ae4: 159fb0ac ldrne fp, [pc, #172] ; a0005b98 <devFS_mknod+0x130>
a0005ae8: 1a000011 bne a0005b34 <devFS_mknod+0xcc>
rtems_filesystem_split_dev_t(dev, major, minor);
/* Find an empty slot in device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
a0005aec: eb002278 bl a000e4d4 <__errno>
a0005af0: e3a0300e mov r3, #14
a0005af4: e5803000 str r3, [r0]
a0005af8: e3e00000 mvn r0, #0
a0005afc: ea000024 b a0005b94 <devFS_mknod+0x12c>
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
if (device_name_table[i].device_name == NULL)
a0005b00: e796100a ldr r1, [r6, sl]
a0005b04: e3510000 cmp r1, #0
a0005b08: 0a000006 beq a0005b28 <devFS_mknod+0xc0>
slot = i;
else
if (strcmp(path, device_name_table[i].device_name) == 0)
a0005b0c: e1a00004 mov r0, r4
a0005b10: eb002552 bl a000f060 <strcmp>
a0005b14: e3500000 cmp r0, #0
a0005b18: 1a000003 bne a0005b2c <devFS_mknod+0xc4>
rtems_set_errno_and_return_minus_one( EEXIST );
a0005b1c: eb00226c bl a000e4d4 <__errno> <== NOT EXECUTED
a0005b20: e3a03011 mov r3, #17 <== NOT EXECUTED
a0005b24: eafffff2 b a0005af4 <devFS_mknod+0x8c> <== NOT EXECUTED
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
if (device_name_table[i].device_name == NULL)
slot = i;
a0005b28: e1a07008 mov r7, r8
/* Find an empty slot in device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
a0005b2c: e2888001 add r8, r8, #1
a0005b30: e28aa014 add sl, sl, #20
a0005b34: e59b3000 ldr r3, [fp]
a0005b38: e1580003 cmp r8, r3
a0005b3c: 3affffef bcc a0005b00 <devFS_mknod+0x98>
else
if (strcmp(path, device_name_table[i].device_name) == 0)
rtems_set_errno_and_return_minus_one( EEXIST );
}
if (slot == -1)
a0005b40: e3770001 cmn r7, #1
a0005b44: 1a000004 bne a0005b5c <devFS_mknod+0xf4>
rtems_set_errno_and_return_minus_one( ENOMEM );
a0005b48: eb002261 bl a000e4d4 <__errno> <== NOT EXECUTED
a0005b4c: e3a0300c mov r3, #12 <== NOT EXECUTED
a0005b50: e5803000 str r3, [r0] <== NOT EXECUTED
a0005b54: e1a00007 mov r0, r7 <== NOT EXECUTED
a0005b58: ea00000d b a0005b94 <devFS_mknod+0x12c> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a0005b5c: e10fa000 mrs sl, CPSR
a0005b60: e38a3080 orr r3, sl, #128 ; 0x80
a0005b64: e129f003 msr CPSR_fc, r3
_ISR_Disable(level);
device_name_table[slot].device_name = (char *)path;
a0005b68: e3a03014 mov r3, #20
a0005b6c: e0070793 mul r7, r3, r7
device_name_table[slot].device_name_length = strlen(path);
a0005b70: e1a00004 mov r0, r4
if (slot == -1)
rtems_set_errno_and_return_minus_one( ENOMEM );
_ISR_Disable(level);
device_name_table[slot].device_name = (char *)path;
a0005b74: e7864007 str r4, [r6, r7]
device_name_table[slot].device_name_length = strlen(path);
a0005b78: eb0025c4 bl a000f290 <strlen>
device_name_table[slot].major = major;
a0005b7c: e59d3000 ldr r3, [sp]
if (slot == -1)
rtems_set_errno_and_return_minus_one( ENOMEM );
_ISR_Disable(level);
device_name_table[slot].device_name = (char *)path;
a0005b80: e0868007 add r8, r6, r7
device_name_table[slot].device_name_length = strlen(path);
a0005b84: e9880209 stmib r8, {r0, r3, r9}
device_name_table[slot].major = major;
device_name_table[slot].minor = minor;
device_name_table[slot].mode = mode;
a0005b88: e5885010 str r5, [r8, #16]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a0005b8c: e129f00a msr CPSR_fc, sl
_ISR_Enable(level);
return 0;
a0005b90: e3a00000 mov r0, #0
}
a0005b94: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
a0005c80 <devFS_read>:
ssize_t devFS_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
a0005c80: e92d487f push {r0, r1, r2, r3, r4, r5, r6, fp, lr}
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->pathinfo.node_access;
args.iop = iop;
args.offset = iop->offset;
a0005c84: e280c00c add ip, r0, #12
a0005c88: e89c1800 ldm ip, {fp, ip}
args.buffer = buffer;
args.count = count;
a0005c8c: e58d2010 str r2, [sp, #16]
args.flags = iop->flags;
a0005c90: e5902014 ldr r2, [r0, #20]
{
rtems_libio_rw_args_t args;
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->pathinfo.node_access;
a0005c94: e5903018 ldr r3, [r0, #24]
args.iop = iop;
a0005c98: e58d0000 str r0, [sp]
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
a0005c9c: e58d2014 str r2, [sp, #20]
args.bytes_moved = 0;
a0005ca0: e3a02000 mov r2, #0
np = (rtems_device_name_t *)iop->pathinfo.node_access;
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
a0005ca4: e58d100c str r1, [sp, #12]
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
a0005ca8: e58d2018 str r2, [sp, #24]
status = rtems_io_read(
a0005cac: e5930008 ldr r0, [r3, #8]
a0005cb0: e593100c ldr r1, [r3, #12]
a0005cb4: e1a0200d mov r2, sp
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->pathinfo.node_access;
args.iop = iop;
args.offset = iop->offset;
a0005cb8: e98d1800 stmib sp, {fp, ip}
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read(
a0005cbc: eb000f3c bl a00099b4 <rtems_io_read>
np->major,
np->minor,
(void *) &args
);
if ( status )
a0005cc0: e3500000 cmp r0, #0
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
a0005cc4: 059d0018 ldreq r0, [sp, #24]
np->major,
np->minor,
(void *) &args
);
if ( status )
a0005cc8: 0a000000 beq a0005cd0 <devFS_read+0x50>
return rtems_deviceio_errno(status);
a0005ccc: eb001bc3 bl a000cbe0 <rtems_deviceio_errno> <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
}
a0005cd0: e28dd01c add sp, sp, #28
a0005cd4: e8bd8800 pop {fp, pc}
a000fa60 <device_ftruncate>:
rtems_libio_t *iop,
rtems_off64_t length
)
{
return 0;
}
a000fa60: e3a00000 mov r0, #0 <== NOT EXECUTED
a000fa64: e12fff1e bx lr <== NOT EXECUTED
a000fa20 <device_ioctl>:
int device_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
a000fa20: e92d400f push {r0, r1, r2, r3, lr}
args.iop = iop;
args.command = command;
args.buffer = buffer;
the_jnode = iop->pathinfo.node_access;
a000fa24: e5903018 ldr r3, [r0, #24]
{
rtems_libio_ioctl_args_t args;
rtems_status_code status;
IMFS_jnode_t *the_jnode;
args.iop = iop;
a000fa28: e88d0007 stm sp, {r0, r1, r2}
args.command = command;
args.buffer = buffer;
the_jnode = iop->pathinfo.node_access;
status = rtems_io_control(
a000fa2c: e5930050 ldr r0, [r3, #80] ; 0x50
a000fa30: e5931054 ldr r1, [r3, #84] ; 0x54
a000fa34: e1a0200d mov r2, sp
a000fa38: eb00016b bl a000ffec <rtems_io_control>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
a000fa3c: e3500000 cmp r0, #0
return rtems_deviceio_errno(status);
return args.ioctl_return;
a000fa40: 059d000c ldreq r0, [sp, #12]
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
a000fa44: 0a000000 beq a000fa4c <device_ioctl+0x2c>
return rtems_deviceio_errno(status);
a000fa48: eb0001fa bl a0010238 <rtems_deviceio_errno> <== NOT EXECUTED
return args.ioctl_return;
}
a000fa4c: e28dd010 add sp, sp, #16
a000fa50: e8bd8000 pop {pc}
a0007078 <drainOutput>:
drainOutput (struct rtems_termios_tty *tty)
{
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
a0007078: e59030b4 ldr r3, [r0, #180] ; 0xb4
/*
* Drain output queue
*/
static void
drainOutput (struct rtems_termios_tty *tty)
{
a000707c: e92d4030 push {r4, r5, lr}
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
a0007080: e3530000 cmp r3, #0
/*
* Drain output queue
*/
static void
drainOutput (struct rtems_termios_tty *tty)
{
a0007084: e1a04000 mov r4, r0
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
a0007088: 0a000011 beq a00070d4 <drainOutput+0x5c>
rtems_interrupt_disable (level);
a000708c: ebfffff5 bl a0007068 <arm_interrupt_disable> <== NOT EXECUTED
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
tty->rawOutBufState = rob_wait;
a0007090: e3a05002 mov r5, #2 <== NOT EXECUTED
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
rtems_interrupt_disable (level);
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
a0007094: ea000009 b a00070c0 <drainOutput+0x48> <== NOT EXECUTED
tty->rawOutBufState = rob_wait;
a0007098: e5845094 str r5, [r4, #148] ; 0x94 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000709c: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain(
a00070a0: e3a01000 mov r1, #0 <== NOT EXECUTED
a00070a4: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED
a00070a8: e1a02001 mov r2, r1 <== NOT EXECUTED
a00070ac: eb0008cb bl a00093e0 <rtems_semaphore_obtain> <== NOT EXECUTED
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
a00070b0: e3500000 cmp r0, #0 <== NOT EXECUTED
a00070b4: 0a000000 beq a00070bc <drainOutput+0x44> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
a00070b8: eb000a62 bl a0009a48 <rtems_fatal_error_occurred> <== NOT EXECUTED
rtems_interrupt_disable (level);
a00070bc: ebffffe9 bl a0007068 <arm_interrupt_disable> <== NOT EXECUTED
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
rtems_interrupt_disable (level);
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
a00070c0: e5942084 ldr r2, [r4, #132] ; 0x84 <== NOT EXECUTED
a00070c4: e5943080 ldr r3, [r4, #128] ; 0x80 <== NOT EXECUTED
a00070c8: e1520003 cmp r2, r3 <== NOT EXECUTED
a00070cc: 1afffff1 bne a0007098 <drainOutput+0x20> <== NOT EXECUTED
a00070d0: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED
a00070d4: e8bd8030 pop {r4, r5, pc}
a0007cc0 <echo>:
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
if ((tty->termios.c_lflag & ECHOCTL) &&
a0007cc0: e591303c ldr r3, [r1, #60] ; 0x3c <== NOT EXECUTED
/*
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
a0007cc4: e92d4011 push {r0, r4, lr} <== NOT EXECUTED
if ((tty->termios.c_lflag & ECHOCTL) &&
a0007cc8: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED
/*
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
a0007ccc: e1a04001 mov r4, r1 <== NOT EXECUTED
if ((tty->termios.c_lflag & ECHOCTL) &&
a0007cd0: 0a000019 beq a0007d3c <echo+0x7c> <== NOT EXECUTED
iscntrl(c) && (c != '\t') && (c != '\n')) {
a0007cd4: e59f306c ldr r3, [pc, #108] ; a0007d48 <echo+0x88> <== NOT EXECUTED
a0007cd8: e5933000 ldr r3, [r3] <== NOT EXECUTED
a0007cdc: e0833000 add r3, r3, r0 <== NOT EXECUTED
a0007ce0: e5d33001 ldrb r3, [r3, #1] <== NOT EXECUTED
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
if ((tty->termios.c_lflag & ECHOCTL) &&
a0007ce4: e3130020 tst r3, #32 <== NOT EXECUTED
a0007ce8: 03a03000 moveq r3, #0 <== NOT EXECUTED
a0007cec: 13a03001 movne r3, #1 <== NOT EXECUTED
iscntrl(c) && (c != '\t') && (c != '\n')) {
a0007cf0: e3500009 cmp r0, #9 <== NOT EXECUTED
a0007cf4: 03a03000 moveq r3, #0 <== NOT EXECUTED
a0007cf8: 12033001 andne r3, r3, #1 <== NOT EXECUTED
a0007cfc: e3530000 cmp r3, #0 <== NOT EXECUTED
a0007d00: 0a00000d beq a0007d3c <echo+0x7c> <== NOT EXECUTED
a0007d04: e350000a cmp r0, #10 <== NOT EXECUTED
a0007d08: 0a00000b beq a0007d3c <echo+0x7c> <== NOT EXECUTED
char echobuf[2];
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
a0007d0c: e2200040 eor r0, r0, #64 ; 0x40 <== NOT EXECUTED
{
if ((tty->termios.c_lflag & ECHOCTL) &&
iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
a0007d10: e3a0305e mov r3, #94 ; 0x5e <== NOT EXECUTED
echobuf[1] = c ^ 0x40;
a0007d14: e5cd0001 strb r0, [sp, #1] <== NOT EXECUTED
rtems_termios_puts (echobuf, 2, tty);
a0007d18: e3a01002 mov r1, #2 <== NOT EXECUTED
a0007d1c: e1a0000d mov r0, sp <== NOT EXECUTED
a0007d20: e1a02004 mov r2, r4 <== NOT EXECUTED
{
if ((tty->termios.c_lflag & ECHOCTL) &&
iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
a0007d24: e5cd3000 strb r3, [sp] <== NOT EXECUTED
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
a0007d28: ebffff4f bl a0007a6c <rtems_termios_puts> <== NOT EXECUTED
tty->column += 2;
a0007d2c: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED
a0007d30: e2833002 add r3, r3, #2 <== NOT EXECUTED
a0007d34: e5843028 str r3, [r4, #40] ; 0x28 <== NOT EXECUTED
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
if ((tty->termios.c_lflag & ECHOCTL) &&
iscntrl(c) && (c != '\t') && (c != '\n')) {
a0007d38: ea000001 b a0007d44 <echo+0x84> <== NOT EXECUTED
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
tty->column += 2;
} else {
oproc (c, tty);
a0007d3c: e1a01004 mov r1, r4 <== NOT EXECUTED
a0007d40: ebffff8a bl a0007b70 <oproc> <== NOT EXECUTED
}
}
a0007d44: e8bd8018 pop {r3, r4, pc} <== NOT EXECUTED
a0007228 <endgrent>:
void endgrent(void)
{
if (group_fp != NULL)
a0007228: e59f300c ldr r3, [pc, #12] ; a000723c <endgrent+0x14> <== NOT EXECUTED
a000722c: e59301c4 ldr r0, [r3, #452] ; 0x1c4 <== NOT EXECUTED
a0007230: e3500000 cmp r0, #0 <== NOT EXECUTED
a0007234: 012fff1e bxeq lr <== NOT EXECUTED
fclose(group_fp);
a0007238: ea002828 b a00112e0 <fclose> <== NOT EXECUTED
a00070d4 <endpwent>:
void endpwent(void)
{
if (passwd_fp != NULL)
a00070d4: e59f300c ldr r3, [pc, #12] ; a00070e8 <endpwent+0x14> <== NOT EXECUTED
a00070d8: e59300e8 ldr r0, [r3, #232] ; 0xe8 <== NOT EXECUTED
a00070dc: e3500000 cmp r0, #0 <== NOT EXECUTED
a00070e0: 012fff1e bxeq lr <== NOT EXECUTED
fclose(passwd_fp);
a00070e4: ea00287d b a00112e0 <fclose> <== NOT EXECUTED
a0007d4c <erase>:
* FIXME: Some of the tests should check for IEXTEN, too.
*/
static void
erase (struct rtems_termios_tty *tty, int lineFlag)
{
if (tty->ccount == 0)
a0007d4c: e5903020 ldr r3, [r0, #32] <== NOT EXECUTED
* 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)
{
a0007d50: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
if (tty->ccount == 0)
a0007d54: e3530000 cmp r3, #0 <== NOT EXECUTED
* 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)
{
a0007d58: e1a04000 mov r4, r0 <== NOT EXECUTED
a0007d5c: e1a07001 mov r7, r1 <== NOT EXECUTED
if (tty->ccount == 0)
a0007d60: 0a000067 beq a0007f04 <erase+0x1b8> <== NOT EXECUTED
return;
if (lineFlag) {
a0007d64: e3510000 cmp r1, #0 <== NOT EXECUTED
a0007d68: 0a000061 beq a0007ef4 <erase+0x1a8> <== NOT EXECUTED
if (!(tty->termios.c_lflag & ECHO)) {
a0007d6c: e590303c ldr r3, [r0, #60] ; 0x3c <== NOT EXECUTED
a0007d70: e2132008 ands r2, r3, #8 <== NOT EXECUTED
a0007d74: 1a000001 bne a0007d80 <erase+0x34> <== NOT EXECUTED
tty->ccount = 0;
a0007d78: e5802020 str r2, [r0, #32] <== NOT EXECUTED
return;
a0007d7c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
}
if (!(tty->termios.c_lflag & ECHOE)) {
a0007d80: e2133010 ands r3, r3, #16 <== NOT EXECUTED
a0007d84: 1a00005a bne a0007ef4 <erase+0x1a8> <== NOT EXECUTED
tty->ccount = 0;
a0007d88: e5803020 str r3, [r0, #32] <== NOT EXECUTED
echo (tty->termios.c_cc[VKILL], tty);
a0007d8c: e1a01004 mov r1, r4 <== NOT EXECUTED
a0007d90: e5d00044 ldrb r0, [r0, #68] ; 0x44 <== NOT EXECUTED
a0007d94: ebffffc9 bl a0007cc0 <echo> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
a0007d98: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED
a0007d9c: e3130020 tst r3, #32 <== NOT EXECUTED
echo ('\n', tty);
a0007da0: 13a0000a movne r0, #10 <== NOT EXECUTED
return;
}
if (!(tty->termios.c_lflag & ECHOE)) {
tty->ccount = 0;
echo (tty->termios.c_cc[VKILL], tty);
if (tty->termios.c_lflag & ECHOK)
a0007da4: 0a000056 beq a0007f04 <erase+0x1b8> <== NOT EXECUTED
a0007da8: ea00000b b a0007ddc <erase+0x90> <== NOT EXECUTED
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
if (tty->termios.c_lflag & ECHO) {
a0007dac: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
a0007db0: e594001c ldr r0, [r4, #28] <== NOT EXECUTED
a0007db4: e2411001 sub r1, r1, #1 <== NOT EXECUTED
a0007db8: e5841020 str r1, [r4, #32] <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) {
a0007dbc: e3130008 tst r3, #8 <== NOT EXECUTED
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
a0007dc0: e7d05001 ldrb r5, [r0, r1] <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) {
a0007dc4: 0a000047 beq a0007ee8 <erase+0x19c> <== NOT EXECUTED
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
a0007dc8: e3570000 cmp r7, #0 <== NOT EXECUTED
a0007dcc: 1a000005 bne a0007de8 <erase+0x9c> <== NOT EXECUTED
a0007dd0: e3130010 tst r3, #16 <== NOT EXECUTED
a0007dd4: 1a000003 bne a0007de8 <erase+0x9c> <== NOT EXECUTED
echo (tty->termios.c_cc[VERASE], tty);
a0007dd8: e5d40043 ldrb r0, [r4, #67] ; 0x43 <== NOT EXECUTED
a0007ddc: e1a01004 mov r1, r4 <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
a0007de0: e8bd41f0 pop {r4, r5, r6, r7, r8, lr} <== 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);
a0007de4: eaffffb5 b a0007cc0 <echo> <== NOT EXECUTED
} else if (c == '\t') {
a0007de8: e3550009 cmp r5, #9 <== NOT EXECUTED
a0007dec: 1a00001f bne a0007e70 <erase+0x124> <== NOT EXECUTED
int col = tty->read_start_column;
a0007df0: e594502c ldr r5, [r4, #44] ; 0x2c <== NOT EXECUTED
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
} else if (iscntrl (c)) {
a0007df4: e5968000 ldr r8, [r6] <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) {
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
echo (tty->termios.c_cc[VERASE], tty);
} else if (c == '\t') {
int col = tty->read_start_column;
int i = 0;
a0007df8: e3a02000 mov r2, #0 <== NOT EXECUTED
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)
a0007dfc: e2033c02 and r3, r3, #512 ; 0x200 <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
a0007e00: ea00000c b a0007e38 <erase+0xec> <== NOT EXECUTED
c = tty->cbuf[i++];
a0007e04: e7d0c002 ldrb ip, [r0, r2] <== NOT EXECUTED
a0007e08: e2822001 add r2, r2, #1 <== NOT EXECUTED
if (c == '\t') {
a0007e0c: e35c0009 cmp ip, #9 <== NOT EXECUTED
col = (col | 7) + 1;
a0007e10: 03855007 orreq r5, r5, #7 <== NOT EXECUTED
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
a0007e14: 0a000006 beq a0007e34 <erase+0xe8> <== NOT EXECUTED
col = (col | 7) + 1;
} else if (iscntrl (c)) {
a0007e18: e088c00c add ip, r8, ip <== NOT EXECUTED
a0007e1c: e5dcc001 ldrb ip, [ip, #1] <== NOT EXECUTED
a0007e20: e31c0020 tst ip, #32 <== NOT EXECUTED
a0007e24: 0a000002 beq a0007e34 <erase+0xe8> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOCTL)
a0007e28: e3530000 cmp r3, #0 <== NOT EXECUTED
col += 2;
a0007e2c: 12855002 addne r5, r5, #2 <== NOT EXECUTED
a0007e30: ea000000 b a0007e38 <erase+0xec> <== NOT EXECUTED
} else {
col++;
a0007e34: e2855001 add r5, r5, #1 <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
a0007e38: e1520001 cmp r2, r1 <== NOT EXECUTED
a0007e3c: 1afffff0 bne a0007e04 <erase+0xb8> <== NOT EXECUTED
a0007e40: ea000006 b a0007e60 <erase+0x114> <== NOT EXECUTED
/*
* Back up over the tab
*/
while (tty->column > col) {
rtems_termios_puts ("\b", 1, tty);
a0007e44: e59f00bc ldr r0, [pc, #188] ; a0007f08 <erase+0x1bc> <== NOT EXECUTED
a0007e48: e3a01001 mov r1, #1 <== NOT EXECUTED
a0007e4c: e1a02004 mov r2, r4 <== NOT EXECUTED
a0007e50: ebffff05 bl a0007a6c <rtems_termios_puts> <== NOT EXECUTED
tty->column--;
a0007e54: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED
a0007e58: e2433001 sub r3, r3, #1 <== NOT EXECUTED
a0007e5c: e5843028 str r3, [r4, #40] ; 0x28 <== NOT EXECUTED
}
/*
* Back up over the tab
*/
while (tty->column > col) {
a0007e60: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED
a0007e64: e1530005 cmp r3, r5 <== NOT EXECUTED
a0007e68: cafffff5 bgt a0007e44 <erase+0xf8> <== NOT EXECUTED
a0007e6c: ea00001d b a0007ee8 <erase+0x19c> <== NOT EXECUTED
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
a0007e70: e5962000 ldr r2, [r6] <== NOT EXECUTED
a0007e74: e2855001 add r5, r5, #1 <== NOT EXECUTED
a0007e78: e7d22005 ldrb r2, [r2, r5] <== NOT EXECUTED
a0007e7c: e3120020 tst r2, #32 <== NOT EXECUTED
a0007e80: 0a000009 beq a0007eac <erase+0x160> <== NOT EXECUTED
a0007e84: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED
a0007e88: 0a000007 beq a0007eac <erase+0x160> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
a0007e8c: e59f0078 ldr r0, [pc, #120] ; a0007f0c <erase+0x1c0> <== NOT EXECUTED
a0007e90: e3a01003 mov r1, #3 <== NOT EXECUTED
a0007e94: e1a02004 mov r2, r4 <== NOT EXECUTED
a0007e98: ebfffef3 bl a0007a6c <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
a0007e9c: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED
a0007ea0: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->column--;
a0007ea4: 12433001 subne r3, r3, #1 <== NOT EXECUTED
a0007ea8: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
a0007eac: e5963000 ldr r3, [r6] <== NOT EXECUTED
a0007eb0: e7d33005 ldrb r3, [r3, r5] <== NOT EXECUTED
a0007eb4: e3130020 tst r3, #32 <== NOT EXECUTED
a0007eb8: 0a000002 beq a0007ec8 <erase+0x17c> <== NOT EXECUTED
a0007ebc: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED
a0007ec0: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED
a0007ec4: 0a000007 beq a0007ee8 <erase+0x19c> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
a0007ec8: e59f003c ldr r0, [pc, #60] ; a0007f0c <erase+0x1c0> <== NOT EXECUTED
a0007ecc: e3a01003 mov r1, #3 <== NOT EXECUTED
a0007ed0: e1a02004 mov r2, r4 <== NOT EXECUTED
a0007ed4: ebfffee4 bl a0007a6c <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
a0007ed8: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED
a0007edc: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->column--;
a0007ee0: 12433001 subne r3, r3, #1 <== NOT EXECUTED
a0007ee4: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED
}
}
}
if (!lineFlag)
a0007ee8: e3570000 cmp r7, #0 <== NOT EXECUTED
a0007eec: 1a000001 bne a0007ef8 <erase+0x1ac> <== NOT EXECUTED
a0007ef0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
a0007ef4: e59f6014 ldr r6, [pc, #20] ; a0007f10 <erase+0x1c4> <== NOT EXECUTED
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
a0007ef8: e5941020 ldr r1, [r4, #32] <== NOT EXECUTED
a0007efc: e3510000 cmp r1, #0 <== NOT EXECUTED
a0007f00: 1affffa9 bne a0007dac <erase+0x60> <== NOT EXECUTED
a0007f04: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
a0006f50 <fchdir>:
)
{
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc, saved;
rtems_libio_check_fd( fd );
a0006f50: e59f3124 ldr r3, [pc, #292] ; a000707c <fchdir+0x12c>
#include <rtems/seterr.h>
int fchdir(
int fd
)
{
a0006f54: e92d40f0 push {r4, r5, r6, r7, lr}
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc, saved;
rtems_libio_check_fd( fd );
a0006f58: e5933000 ldr r3, [r3]
#include <rtems/seterr.h>
int fchdir(
int fd
)
{
a0006f5c: e24dd02c sub sp, sp, #44 ; 0x2c
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc, saved;
rtems_libio_check_fd( fd );
a0006f60: e1500003 cmp r0, r3
a0006f64: 2a000006 bcs a0006f84 <fchdir+0x34>
iop = rtems_libio_iop( fd );
a0006f68: e59f3110 ldr r3, [pc, #272] ; a0007080 <fchdir+0x130>
a0006f6c: e3a04038 mov r4, #56 ; 0x38
a0006f70: e5933000 ldr r3, [r3]
a0006f74: e0243490 mla r4, r0, r4, r3
rtems_libio_check_is_open(iop);
a0006f78: e5943014 ldr r3, [r4, #20]
a0006f7c: e3130c01 tst r3, #256 ; 0x100
a0006f80: 1a000002 bne a0006f90 <fchdir+0x40>
a0006f84: eb0028ff bl a0011388 <__errno>
a0006f88: e3a03009 mov r3, #9
a0006f8c: ea00000e b a0006fcc <fchdir+0x7c>
/*
* Now process the fchmod().
*/
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
a0006f90: e3130002 tst r3, #2 <== NOT EXECUTED
a0006f94: 1a000002 bne a0006fa4 <fchdir+0x54> <== NOT EXECUTED
a0006f98: eb0028fa bl a0011388 <__errno> <== NOT EXECUTED
a0006f9c: e3a03016 mov r3, #22 <== NOT EXECUTED
a0006fa0: ea000009 b a0006fcc <fchdir+0x7c> <== NOT EXECUTED
/*
* Verify you can change directory into this node.
*/
if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) !=
a0006fa4: e5943024 ldr r3, [r4, #36] ; 0x24 <== NOT EXECUTED
a0006fa8: e2844018 add r4, r4, #24 <== NOT EXECUTED
a0006fac: e1a00004 mov r0, r4 <== NOT EXECUTED
a0006fb0: e5933010 ldr r3, [r3, #16] <== NOT EXECUTED
a0006fb4: e12fff33 blx r3 <== NOT EXECUTED
a0006fb8: e3500001 cmp r0, #1 <== NOT EXECUTED
a0006fbc: e1a06000 mov r6, r0 <== NOT EXECUTED
a0006fc0: 0a000003 beq a0006fd4 <fchdir+0x84> <== NOT EXECUTED
RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_set_errno_and_return_minus_one( ENOTDIR );
a0006fc4: eb0028ef bl a0011388 <__errno> <== NOT EXECUTED
a0006fc8: e3a03014 mov r3, #20 <== NOT EXECUTED
a0006fcc: e5803000 str r3, [r0]
a0006fd0: ea00001d b a000704c <fchdir+0xfc>
* but note the race condition. Threads who
* share their rtems_filesystem_current better
* be synchronized!
*/
saved = rtems_filesystem_current;
a0006fd4: e59f50a8 ldr r5, [pc, #168] ; a0007084 <fchdir+0x134> <== NOT EXECUTED
a0006fd8: e28de004 add lr, sp, #4 <== NOT EXECUTED
a0006fdc: e5957000 ldr r7, [r5] <== NOT EXECUTED
a0006fe0: e287c004 add ip, r7, #4 <== NOT EXECUTED
a0006fe4: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED
a0006fe8: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED
a0006fec: e59c3000 ldr r3, [ip] <== NOT EXECUTED
a0006ff0: e58e3000 str r3, [lr] <== NOT EXECUTED
rtems_filesystem_current = iop->pathinfo;
a0006ff4: e287e004 add lr, r7, #4 <== NOT EXECUTED
a0006ff8: e8b4000f ldm r4!, {r0, r1, r2, r3} <== NOT EXECUTED
a0006ffc: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED
a0007000: e5943000 ldr r3, [r4] <== NOT EXECUTED
/* clone the current node */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
a0007004: e28d4018 add r4, sp, #24 <== NOT EXECUTED
a0007008: e3a02000 mov r2, #0 <== NOT EXECUTED
* share their rtems_filesystem_current better
* be synchronized!
*/
saved = rtems_filesystem_current;
rtems_filesystem_current = iop->pathinfo;
a000700c: e58c3000 str r3, [ip] <== NOT EXECUTED
/* clone the current node */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
a0007010: e1a01006 mov r1, r6 <== NOT EXECUTED
a0007014: e59f006c ldr r0, [pc, #108] ; a0007088 <fchdir+0x138> <== NOT EXECUTED
a0007018: e1a03004 mov r3, r4 <== NOT EXECUTED
a000701c: e58d2000 str r2, [sp] <== NOT EXECUTED
a0007020: ebffff9a bl a0006e90 <rtems_filesystem_evaluate_path> <== NOT EXECUTED
a0007024: e2506000 subs r6, r0, #0 <== NOT EXECUTED
a0007028: e28d0004 add r0, sp, #4 <== NOT EXECUTED
a000702c: 0a000008 beq a0007054 <fchdir+0x104> <== NOT EXECUTED
/* cloning failed; restore original and bail out */
rtems_filesystem_current = saved;
a0007030: e595c000 ldr ip, [r5] <== NOT EXECUTED
a0007034: e1a04000 mov r4, r0 <== NOT EXECUTED
a0007038: e8b4000f ldm r4!, {r0, r1, r2, r3} <== NOT EXECUTED
a000703c: e28cc004 add ip, ip, #4 <== NOT EXECUTED
a0007040: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED
a0007044: e5943000 ldr r3, [r4] <== NOT EXECUTED
a0007048: e58c3000 str r3, [ip] <== NOT EXECUTED
return -1;
a000704c: e3e00000 mvn r0, #0
a0007050: ea000007 b a0007074 <fchdir+0x124>
}
/* release the old one */
rtems_filesystem_freenode( &saved );
a0007054: eb00004a bl a0007184 <rtems_filesystem_freenode> <== NOT EXECUTED
rtems_filesystem_current = loc;
a0007058: e8b4000f ldm r4!, {r0, r1, r2, r3} <== NOT EXECUTED
a000705c: e595c000 ldr ip, [r5] <== NOT EXECUTED
a0007060: e28cc004 add ip, ip, #4 <== NOT EXECUTED
a0007064: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED
a0007068: e5943000 ldr r3, [r4] <== NOT EXECUTED
return 0;
a000706c: e1a00006 mov r0, r6 <== NOT EXECUTED
return -1;
}
/* release the old one */
rtems_filesystem_freenode( &saved );
rtems_filesystem_current = loc;
a0007070: e58c3000 str r3, [ip] <== NOT EXECUTED
return 0;
}
a0007074: e28dd02c add sp, sp, #44 ; 0x2c
a0007078: e8bd80f0 pop {r4, r5, r6, r7, pc}
a000708c <fchmod>:
mode_t mode
)
{
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
a000708c: e59f3064 ldr r3, [pc, #100] ; a00070f8 <fchmod+0x6c> <== NOT EXECUTED
int fchmod(
int fd,
mode_t mode
)
{
a0007090: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
a0007094: e5933000 ldr r3, [r3] <== NOT EXECUTED
a0007098: e1500003 cmp r0, r3 <== NOT EXECUTED
a000709c: 2a000006 bcs a00070bc <fchmod+0x30> <== NOT EXECUTED
iop = rtems_libio_iop( fd );
a00070a0: e59f3054 ldr r3, [pc, #84] ; a00070fc <fchmod+0x70> <== NOT EXECUTED
a00070a4: e3a02038 mov r2, #56 ; 0x38 <== NOT EXECUTED
a00070a8: e5933000 ldr r3, [r3] <== NOT EXECUTED
a00070ac: e0203092 mla r0, r2, r0, r3 <== NOT EXECUTED
rtems_libio_check_is_open(iop);
a00070b0: e5903014 ldr r3, [r0, #20] <== NOT EXECUTED
a00070b4: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED
a00070b8: 1a000002 bne a00070c8 <fchmod+0x3c> <== NOT EXECUTED
a00070bc: eb0028b1 bl a0011388 <__errno> <== NOT EXECUTED
a00070c0: e3a03009 mov r3, #9 <== NOT EXECUTED
a00070c4: ea000003 b a00070d8 <fchmod+0x4c> <== NOT EXECUTED
/*
* Now process the fchmod().
*/
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
a00070c8: e3130004 tst r3, #4 <== NOT EXECUTED
a00070cc: 1a000004 bne a00070e4 <fchmod+0x58> <== NOT EXECUTED
a00070d0: eb0028ac bl a0011388 <__errno> <== NOT EXECUTED
a00070d4: e3a03016 mov r3, #22 <== NOT EXECUTED
a00070d8: e5803000 str r3, [r0] <== NOT EXECUTED
a00070dc: e3e00000 mvn r0, #0 <== NOT EXECUTED
a00070e0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode );
a00070e4: e5903020 ldr r3, [r0, #32] <== NOT EXECUTED
a00070e8: e2800018 add r0, r0, #24 <== NOT EXECUTED
a00070ec: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
a00070f0: e12fff33 blx r3 <== NOT EXECUTED
}
a00070f4: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a0007100 <fchown>:
gid_t group
)
{
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
a0007100: e59f3074 ldr r3, [pc, #116] ; a000717c <fchown+0x7c> <== NOT EXECUTED
int fchown(
int fd,
uid_t owner,
gid_t group
)
{
a0007104: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED
a0007108: e1a02802 lsl r2, r2, #16 <== NOT EXECUTED
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
a000710c: e5933000 ldr r3, [r3] <== NOT EXECUTED
int fchown(
int fd,
uid_t owner,
gid_t group
)
{
a0007110: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
a0007114: e1500003 cmp r0, r3 <== NOT EXECUTED
int fchown(
int fd,
uid_t owner,
gid_t group
)
{
a0007118: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED
a000711c: e1a02822 lsr r2, r2, #16 <== NOT EXECUTED
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
a0007120: 2a000006 bcs a0007140 <fchown+0x40> <== NOT EXECUTED
iop = rtems_libio_iop( fd );
a0007124: e59f3054 ldr r3, [pc, #84] ; a0007180 <fchown+0x80> <== NOT EXECUTED
a0007128: e3a0c038 mov ip, #56 ; 0x38 <== NOT EXECUTED
a000712c: e5933000 ldr r3, [r3] <== NOT EXECUTED
a0007130: e020309c mla r0, ip, r0, r3 <== NOT EXECUTED
rtems_libio_check_is_open(iop);
a0007134: e5903014 ldr r3, [r0, #20] <== NOT EXECUTED
a0007138: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED
a000713c: 1a000002 bne a000714c <fchown+0x4c> <== NOT EXECUTED
a0007140: eb002890 bl a0011388 <__errno> <== NOT EXECUTED
a0007144: e3a03009 mov r3, #9 <== NOT EXECUTED
a0007148: ea000003 b a000715c <fchown+0x5c> <== NOT EXECUTED
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
a000714c: e3130004 tst r3, #4 <== NOT EXECUTED
a0007150: 1a000004 bne a0007168 <fchown+0x68> <== NOT EXECUTED
a0007154: eb00288b bl a0011388 <__errno> <== NOT EXECUTED
a0007158: e3a03016 mov r3, #22 <== NOT EXECUTED
a000715c: e5803000 str r3, [r0] <== NOT EXECUTED
a0007160: e3e00000 mvn r0, #0 <== NOT EXECUTED
a0007164: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group );
a0007168: e5903024 ldr r3, [r0, #36] ; 0x24 <== NOT EXECUTED
a000716c: e2800018 add r0, r0, #24 <== NOT EXECUTED
a0007170: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED
a0007174: e12fff33 blx r3 <== NOT EXECUTED
}
a0007178: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a0006ad0 <fcntl>:
int fcntl(
int fd,
int cmd,
...
)
{
a0006ad0: e92d000e push {r1, r2, r3}
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
a0006ad4: e59f21a8 ldr r2, [pc, #424] ; a0006c84 <fcntl+0x1b4>
int fcntl(
int fd,
int cmd,
...
)
{
a0006ad8: e92d40f1 push {r0, r4, r5, r6, r7, lr}
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
a0006adc: e5921000 ldr r1, [r2]
...
)
{
int ret;
va_list ap;
va_start( ap, cmd );
a0006ae0: e28d301c add r3, sp, #28
int fcntl(
int fd,
int cmd,
...
)
{
a0006ae4: e59d7018 ldr r7, [sp, #24]
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
a0006ae8: e1500001 cmp r0, r1
...
)
{
int ret;
va_list ap;
va_start( ap, cmd );
a0006aec: e58d3000 str r3, [sp]
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
a0006af0: 2a000006 bcs a0006b10 <fcntl+0x40>
iop = rtems_libio_iop( fd );
a0006af4: e59f218c ldr r2, [pc, #396] ; a0006c88 <fcntl+0x1b8>
a0006af8: e3a04038 mov r4, #56 ; 0x38
a0006afc: e5922000 ldr r2, [r2]
a0006b00: e0242490 mla r4, r0, r4, r2
rtems_libio_check_is_open(iop);
a0006b04: e5940014 ldr r0, [r4, #20]
a0006b08: e3100c01 tst r0, #256 ; 0x100
a0006b0c: 1a000002 bne a0006b1c <fcntl+0x4c>
a0006b10: eb0029bb bl a0011204 <__errno>
a0006b14: e3a03009 mov r3, #9
a0006b18: ea000047 b a0006c3c <fcntl+0x16c>
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
a0006b1c: e3570009 cmp r7, #9
a0006b20: 979ff107 ldrls pc, [pc, r7, lsl #2]
a0006b24: ea000042 b a0006c34 <fcntl+0x164>
a0006b28: a0006b50 .word 0xa0006b50
a0006b2c: a0006bc0 .word 0xa0006bc0
a0006b30: a0006bd0 .word 0xa0006bd0
a0006b34: a0006bf0 .word 0xa0006bf0
a0006b38: a0006bfc .word 0xa0006bfc
a0006b3c: a0006c28 .word 0xa0006c28
a0006b40: a0006c28 .word 0xa0006c28
a0006b44: a0006c28 .word 0xa0006c28
a0006b48: a0006c28 .word 0xa0006c28
a0006b4c: a0006c28 .word 0xa0006c28
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
a0006b50: e5933000 ldr r3, [r3]
if ( fd2 )
a0006b54: e3530000 cmp r3, #0
a0006b58: 0a000004 beq a0006b70 <fcntl+0xa0>
diop = rtems_libio_iop( fd2 );
a0006b5c: e1530001 cmp r3, r1
a0006b60: 33a06038 movcc r6, #56 ; 0x38
a0006b64: 30262693 mlacc r6, r3, r6, r2
a0006b68: 3a000005 bcc a0006b84 <fcntl+0xb4>
a0006b6c: ea000003 b a0006b80 <fcntl+0xb0> <== NOT EXECUTED
else {
/* allocate a file control block */
diop = rtems_libio_allocate();
a0006b70: eb00019c bl a00071e8 <rtems_libio_allocate>
if ( diop == 0 ) {
a0006b74: e2506000 subs r6, r0, #0
a0006b78: 1a000001 bne a0006b84 <fcntl+0xb4>
a0006b7c: ea00003b b a0006c70 <fcntl+0x1a0> <== NOT EXECUTED
switch ( cmd ) {
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
if ( fd2 )
diop = rtems_libio_iop( fd2 );
a0006b80: e3a06000 mov r6, #0 <== NOT EXECUTED
ret = -1;
break;
}
}
diop->flags = iop->flags;
a0006b84: e5943014 ldr r3, [r4, #20]
diop->pathinfo = iop->pathinfo;
a0006b88: e286c018 add ip, r6, #24
a0006b8c: e2845018 add r5, r4, #24
ret = -1;
break;
}
}
diop->flags = iop->flags;
a0006b90: e5863014 str r3, [r6, #20]
diop->pathinfo = iop->pathinfo;
a0006b94: e8b5000f ldm r5!, {r0, r1, r2, r3}
a0006b98: e8ac000f stmia ip!, {r0, r1, r2, r3}
a0006b9c: e5953000 ldr r3, [r5]
a0006ba0: e58c3000 str r3, [ip]
ret = (int) (diop - rtems_libio_iops);
a0006ba4: e59f30dc ldr r3, [pc, #220] ; a0006c88 <fcntl+0x1b8>
a0006ba8: e5933000 ldr r3, [r3]
a0006bac: e0636006 rsb r6, r3, r6
a0006bb0: e59f30d4 ldr r3, [pc, #212] ; a0006c8c <fcntl+0x1bc>
a0006bb4: e1a061c6 asr r6, r6, #3
a0006bb8: e0060693 mul r6, r3, r6
a0006bbc: ea000020 b a0006c44 <fcntl+0x174>
break;
case F_GETFD: /* get f_flags */
ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0);
a0006bc0: e3100b02 tst r0, #2048 ; 0x800
a0006bc4: 03a06000 moveq r6, #0
a0006bc8: 13a06001 movne r6, #1
a0006bcc: ea00001e b a0006c4c <fcntl+0x17c>
* 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 ) )
a0006bd0: e5936000 ldr r6, [r3]
a0006bd4: e3560000 cmp r6, #0
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
a0006bd8: 13800b02 orrne r0, r0, #2048 ; 0x800
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
a0006bdc: 03c00b02 biceq r0, r0, #2048 ; 0x800
* processes, then we can ignore this one except to make
* F_GETFD work.
*/
if ( va_arg( ap, int ) )
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
a0006be0: 15840014 strne r0, [r4, #20]
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
a0006be4: 05840014 streq r0, [r4, #20]
* 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 ) )
a0006be8: 0a000017 beq a0006c4c <fcntl+0x17c>
a0006bec: ea00000b b a0006c20 <fcntl+0x150>
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
break;
case F_GETFL: /* more flags (cloexec) */
ret = rtems_libio_to_fcntl_flags( iop->flags );
a0006bf0: eb00016a bl a00071a0 <rtems_libio_to_fcntl_flags>
a0006bf4: e1a06000 mov r6, r0
a0006bf8: ea000011 b a0006c44 <fcntl+0x174>
break;
case F_SETFL:
flags = rtems_libio_fcntl_flags( va_arg( ap, int ) );
a0006bfc: e5930000 ldr r0, [r3]
a0006c00: eb000159 bl a000716c <rtems_libio_fcntl_flags>
/*
* XXX If we are turning on append, should we seek to the end?
*/
iop->flags = (iop->flags & ~mask) | (flags & mask);
a0006c04: e5942014 ldr r2, [r4, #20]
a0006c08: e59f3080 ldr r3, [pc, #128] ; a0006c90 <fcntl+0x1c0>
a0006c0c: e3c22c02 bic r2, r2, #512 ; 0x200
a0006c10: e0003003 and r3, r0, r3
a0006c14: e3c22001 bic r2, r2, #1
a0006c18: e1833002 orr r3, r3, r2
a0006c1c: e5843014 str r3, [r4, #20]
rtems_libio_t *iop;
rtems_libio_t *diop;
int fd2;
int flags;
int mask;
int ret = 0;
a0006c20: e3a06000 mov r6, #0
a0006c24: ea000008 b a0006c4c <fcntl+0x17c>
errno = ENOTSUP;
ret = -1;
break;
case F_GETOWN: /* for sockets. */
errno = ENOTSUP;
a0006c28: eb002975 bl a0011204 <__errno>
a0006c2c: e3a03086 mov r3, #134 ; 0x86
a0006c30: ea000001 b a0006c3c <fcntl+0x16c>
ret = -1;
break;
default:
errno = EINVAL;
a0006c34: eb002972 bl a0011204 <__errno>
a0006c38: e3a03016 mov r3, #22
a0006c3c: e5803000 str r3, [r0]
a0006c40: ea00000a b a0006c70 <fcntl+0x1a0>
/*
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
a0006c44: e3560000 cmp r6, #0
a0006c48: ba000009 blt a0006c74 <fcntl+0x1a4>
int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop );
a0006c4c: e5943020 ldr r3, [r4, #32]
a0006c50: e1a01004 mov r1, r4
a0006c54: e1a00007 mov r0, r7
a0006c58: e5933030 ldr r3, [r3, #48] ; 0x30
a0006c5c: e12fff33 blx r3
if (err) {
a0006c60: e2504000 subs r4, r0, #0
a0006c64: 0a000002 beq a0006c74 <fcntl+0x1a4>
errno = err;
a0006c68: eb002965 bl a0011204 <__errno> <== NOT EXECUTED
a0006c6c: e5804000 str r4, [r0] <== NOT EXECUTED
ret = -1;
a0006c70: e3e06000 mvn r6, #0
va_list ap;
va_start( ap, cmd );
ret = vfcntl(fd,cmd,ap);
va_end(ap);
return ret;
}
a0006c74: e1a00006 mov r0, r6
a0006c78: e8bd40f8 pop {r3, r4, r5, r6, r7, lr}
a0006c7c: e28dd00c add sp, sp, #12
a0006c80: e12fff1e bx lr
a0006ca4 <fdatasync>:
int fd
)
{
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
a0006ca4: e59f3060 ldr r3, [pc, #96] ; a0006d0c <fdatasync+0x68>
#include <rtems/seterr.h>
int fdatasync(
int fd
)
{
a0006ca8: e52de004 push {lr} ; (str lr, [sp, #-4]!)
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
a0006cac: e5933000 ldr r3, [r3]
a0006cb0: e1500003 cmp r0, r3
a0006cb4: 2a000006 bcs a0006cd4 <fdatasync+0x30>
iop = rtems_libio_iop( fd );
a0006cb8: e59f3050 ldr r3, [pc, #80] ; a0006d10 <fdatasync+0x6c>
a0006cbc: e3a02038 mov r2, #56 ; 0x38
a0006cc0: e5933000 ldr r3, [r3]
a0006cc4: e0203092 mla r0, r2, r0, r3
rtems_libio_check_is_open(iop);
a0006cc8: e5903014 ldr r3, [r0, #20]
a0006ccc: e3130c01 tst r3, #256 ; 0x100
a0006cd0: 1a000002 bne a0006ce0 <fdatasync+0x3c>
a0006cd4: eb00294a bl a0011204 <__errno>
a0006cd8: e3a03009 mov r3, #9
a0006cdc: ea000003 b a0006cf0 <fdatasync+0x4c>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
a0006ce0: e3130004 tst r3, #4
a0006ce4: 1a000004 bne a0006cfc <fdatasync+0x58> <== NOT EXECUTED
a0006ce8: eb002945 bl a0011204 <__errno> <== NOT EXECUTED
a0006cec: e3a03016 mov r3, #22 <== NOT EXECUTED
a0006cf0: e5803000 str r3, [r0]
a0006cf4: e3e00000 mvn r0, #0
a0006cf8: e49df004 pop {pc} ; (ldr pc, [sp], #4)
/*
* Now process the fdatasync().
*/
return (*iop->pathinfo.handlers->fdatasync_h)( iop );
a0006cfc: e5903020 ldr r3, [r0, #32] <== NOT EXECUTED
a0006d00: e593302c ldr r3, [r3, #44] ; 0x2c <== NOT EXECUTED
a0006d04: e12fff33 blx r3 <== NOT EXECUTED
}
a0006d08: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a000f854 <fifo_open>:
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
a000f854: e92d45f3 push {r0, r1, r4, r5, r6, r7, r8, sl, lr}
static rtems_status_code pipe_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
a000f858: e59f538c ldr r5, [pc, #908] ; a000fbec <fifo_open+0x398>
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
a000f85c: e1a08000 mov r8, r0
a000f860: e1a07001 mov r7, r1
static rtems_status_code pipe_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
a000f864: e5954000 ldr r4, [r5]
a000f868: e3540000 cmp r4, #0
a000f86c: 1a000012 bne a000f8bc <fifo_open+0x68>
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 );
a000f870: e59f3378 ldr r3, [pc, #888] ; a000fbf0 <fifo_open+0x39c>
a000f874: e1a01004 mov r1, r4
a000f878: e1a02004 mov r2, r4
a000f87c: e5930000 ldr r0, [r3]
a000f880: ebffeec3 bl a000b394 <rtems_semaphore_obtain>
rtems_libio_lock();
if (pipe_semaphore == RTEMS_ID_NONE) {
a000f884: e5953000 ldr r3, [r5]
a000f888: e3530000 cmp r3, #0
a000f88c: 1a000005 bne a000f8a8 <fifo_open+0x54>
sc = rtems_semaphore_create(
a000f890: e59f035c ldr r0, [pc, #860] ; a000fbf4 <fifo_open+0x3a0>
a000f894: e3a01001 mov r1, #1
a000f898: e3a02054 mov r2, #84 ; 0x54
a000f89c: e58d5000 str r5, [sp]
a000f8a0: ebffee29 bl a000b14c <rtems_semaphore_create>
a000f8a4: e1a04000 mov r4, r0
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
a000f8a8: e59f3340 ldr r3, [pc, #832] ; a000fbf0 <fifo_open+0x39c>
a000f8ac: e5930000 ldr r0, [r3]
a000f8b0: ebffeefd bl a000b4ac <rtems_semaphore_release>
}
rtems_libio_unlock();
}
if (sc == RTEMS_SUCCESSFUL) {
a000f8b4: e3540000 cmp r4, #0
a000f8b8: 1a000006 bne a000f8d8 <fifo_open+0x84>
sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
a000f8bc: e59f3328 ldr r3, [pc, #808] ; a000fbec <fifo_open+0x398>
a000f8c0: e3a01000 mov r1, #0
a000f8c4: e1a02001 mov r2, r1
a000f8c8: e5930000 ldr r0, [r3]
a000f8cc: ebffeeb0 bl a000b394 <rtems_semaphore_obtain>
}
if (sc == RTEMS_SUCCESSFUL) {
a000f8d0: e2505000 subs r5, r0, #0
a000f8d4: 0a000000 beq a000f8dc <fifo_open+0x88>
return 0;
} else {
return -ENOMEM;
a000f8d8: e3e0500b mvn r5, #11 <== NOT EXECUTED
{
pipe_control_t *pipe;
int err = 0;
err = pipe_lock();
if (err)
a000f8dc: e2556000 subs r6, r5, #0
a000f8e0: 1a0000bf bne a000fbe4 <fifo_open+0x390>
return err;
pipe = *pipep;
a000f8e4: e5984000 ldr r4, [r8]
if (pipe == NULL) {
a000f8e8: e3540000 cmp r4, #0
a000f8ec: 1a00003c bne a000f9e4 <fifo_open+0x190>
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
a000f8f0: e3a00034 mov r0, #52 ; 0x34
a000f8f4: ebffe2c2 bl a0008404 <malloc>
if (pipe == NULL)
a000f8f8: e250a000 subs sl, r0, #0
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
a000f8fc: e1a04000 mov r4, r0
if (pipe == NULL)
a000f900: 0a000035 beq a000f9dc <fifo_open+0x188>
return err;
memset(pipe, 0, sizeof(pipe_control_t));
a000f904: e1a01005 mov r1, r5
a000f908: e3a02034 mov r2, #52 ; 0x34
a000f90c: eb000e0c bl a0013144 <memset>
pipe->Size = PIPE_BUF;
a000f910: e3a00c02 mov r0, #512 ; 0x200
a000f914: e5840004 str r0, [r4, #4]
pipe->Buffer = malloc(pipe->Size);
a000f918: ebffe2b9 bl a0008404 <malloc>
if (! pipe->Buffer)
a000f91c: e3500000 cmp r0, #0
if (pipe == NULL)
return err;
memset(pipe, 0, sizeof(pipe_control_t));
pipe->Size = PIPE_BUF;
pipe->Buffer = malloc(pipe->Size);
a000f920: e5840000 str r0, [r4]
if (! pipe->Buffer)
a000f924: 0a00002a beq a000f9d4 <fifo_open+0x180>
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
rtems_build_name ('P', 'I', 'r', c),
a000f928: e59f62c8 ldr r6, [pc, #712] ; a000fbf8 <fifo_open+0x3a4>
if (! pipe->Buffer)
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
a000f92c: e59f02c8 ldr r0, [pc, #712] ; a000fbfc <fifo_open+0x3a8>
a000f930: e1a01005 mov r1, r5
rtems_build_name ('P', 'I', 'r', c),
a000f934: e5d63000 ldrb r3, [r6]
if (! pipe->Buffer)
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
a000f938: e1a02005 mov r2, r5
a000f93c: e1830000 orr r0, r3, r0
a000f940: e284302c add r3, r4, #44 ; 0x2c
a000f944: eb0003e5 bl a00108e0 <rtems_barrier_create>
a000f948: e3500000 cmp r0, #0
a000f94c: 1a00001e bne a000f9cc <fifo_open+0x178>
rtems_build_name ('P', 'I', 'r', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->readBarrier) != RTEMS_SUCCESSFUL)
goto err_rbar;
if (rtems_barrier_create(
rtems_build_name ('P', 'I', 'w', c),
a000f950: e5d63000 ldrb r3, [r6]
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(
a000f954: e59f02a4 ldr r0, [pc, #676] ; a000fc00 <fifo_open+0x3ac>
a000f958: e1a01005 mov r1, r5
a000f95c: e1a02005 mov r2, r5
a000f960: e1830000 orr r0, r3, r0
a000f964: e2843030 add r3, r4, #48 ; 0x30
a000f968: eb0003dc bl a00108e0 <rtems_barrier_create>
a000f96c: e3500000 cmp r0, #0
a000f970: 1a000013 bne a000f9c4 <fifo_open+0x170>
rtems_build_name ('P', 'I', 'w', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->writeBarrier) != RTEMS_SUCCESSFUL)
goto err_wbar;
if (rtems_semaphore_create(
rtems_build_name ('P', 'I', 's', c), 1,
a000f974: e5d63000 ldrb r3, [r6]
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(
a000f978: e59f0284 ldr r0, [pc, #644] ; a000fc04 <fifo_open+0x3b0>
a000f97c: e2842028 add r2, r4, #40 ; 0x28
a000f980: e58d2000 str r2, [sp]
a000f984: e1830000 orr r0, r3, r0
a000f988: e3a01001 mov r1, #1
a000f98c: e3a02010 mov r2, #16
a000f990: e1a03005 mov r3, r5
a000f994: ebffedec bl a000b14c <rtems_semaphore_create>
a000f998: e3500000 cmp r0, #0
a000f99c: 1a000006 bne a000f9bc <fifo_open+0x168>
#ifdef RTEMS_POSIX_API
pipe_interruptible(pipe);
#endif
*pipep = pipe;
if (c ++ == 'z')
a000f9a0: e5d63000 ldrb r3, [r6]
a000f9a4: e353007a cmp r3, #122 ; 0x7a
a000f9a8: e2832001 add r2, r3, #1
c = 'a';
a000f9ac: 03a03061 moveq r3, #97 ; 0x61
#ifdef RTEMS_POSIX_API
pipe_interruptible(pipe);
#endif
*pipep = pipe;
if (c ++ == 'z')
a000f9b0: e5c62000 strb r2, [r6]
c = 'a';
a000f9b4: 05c63000 strbeq r3, [r6]
a000f9b8: ea000009 b a000f9e4 <fifo_open+0x190>
return 0;
err_sem:
rtems_barrier_delete(pipe->writeBarrier);
a000f9bc: e59a0030 ldr r0, [sl, #48] ; 0x30 <== NOT EXECUTED
a000f9c0: eb0003f6 bl a00109a0 <rtems_barrier_delete> <== NOT EXECUTED
err_wbar:
rtems_barrier_delete(pipe->readBarrier);
a000f9c4: e59a002c ldr r0, [sl, #44] ; 0x2c <== NOT EXECUTED
a000f9c8: eb0003f4 bl a00109a0 <rtems_barrier_delete> <== NOT EXECUTED
err_rbar:
free(pipe->Buffer);
a000f9cc: e59a0000 ldr r0, [sl] <== NOT EXECUTED
a000f9d0: ebffe0a8 bl a0007c78 <free> <== NOT EXECUTED
err_buf:
free(pipe);
a000f9d4: e1a0000a mov r0, sl <== NOT EXECUTED
a000f9d8: ebffe0a6 bl a0007c78 <free> <== NOT EXECUTED
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
err = -EINTR;
a000f9dc: e3e0600b mvn r6, #11 <== NOT EXECUTED
a000f9e0: ea00000e b a000fa20 <fifo_open+0x1cc> <== NOT EXECUTED
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
a000f9e4: e3a01000 mov r1, #0
a000f9e8: e5940028 ldr r0, [r4, #40] ; 0x28
a000f9ec: e1a02001 mov r2, r1
a000f9f0: ebffee67 bl a000b394 <rtems_semaphore_obtain>
err = -EINTR;
if (*pipep == NULL) {
a000f9f4: e5983000 ldr r3, [r8]
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
err = -EINTR;
a000f9f8: e3500000 cmp r0, #0
a000f9fc: 03a06000 moveq r6, #0
a000fa00: 13e06003 mvnne r6, #3
if (*pipep == NULL) {
a000fa04: e3530000 cmp r3, #0
a000fa08: 1a000004 bne a000fa20 <fifo_open+0x1cc>
if (err)
a000fa0c: e3560000 cmp r6, #0
pipe_free(pipe);
else
*pipep = pipe;
a000fa10: 05884000 streq r4, [r8]
if (! PIPE_LOCK(pipe))
err = -EINTR;
if (*pipep == NULL) {
if (err)
a000fa14: 0a000001 beq a000fa20 <fifo_open+0x1cc>
pipe_free(pipe);
a000fa18: e1a00004 mov r0, r4 <== NOT EXECUTED
a000fa1c: ebffff53 bl a000f770 <pipe_free> <== NOT EXECUTED
else
*pipep = pipe;
}
out:
pipe_unlock();
a000fa20: ebffff4e bl a000f760 <pipe_unlock>
pipe_control_t *pipe;
unsigned int prevCounter;
int err;
err = pipe_new(pipep);
if (err)
a000fa24: e3560000 cmp r6, #0
a000fa28: 1a00006d bne a000fbe4 <fifo_open+0x390>
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
a000fa2c: e5973014 ldr r3, [r7, #20]
int err;
err = pipe_new(pipep);
if (err)
return err;
pipe = *pipep;
a000fa30: e5984000 ldr r4, [r8]
switch (LIBIO_ACCMODE(iop)) {
a000fa34: e2033006 and r3, r3, #6
a000fa38: e3530004 cmp r3, #4
a000fa3c: 0a000025 beq a000fad8 <fifo_open+0x284>
a000fa40: e3530006 cmp r3, #6
a000fa44: 0a000049 beq a000fb70 <fifo_open+0x31c>
a000fa48: e3530002 cmp r3, #2
a000fa4c: 1a00005d bne a000fbc8 <fifo_open+0x374>
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
a000fa50: e5943020 ldr r3, [r4, #32]
a000fa54: e2833001 add r3, r3, #1
a000fa58: e5843020 str r3, [r4, #32]
if (pipe->Readers ++ == 0)
a000fa5c: e5943010 ldr r3, [r4, #16]
a000fa60: e2832001 add r2, r3, #1
a000fa64: e3530000 cmp r3, #0
a000fa68: e5842010 str r2, [r4, #16]
a000fa6c: 1a000002 bne a000fa7c <fifo_open+0x228>
PIPE_WAKEUPWRITERS(pipe);
a000fa70: e5940030 ldr r0, [r4, #48] ; 0x30
a000fa74: e28d1004 add r1, sp, #4
a000fa78: eb0003f0 bl a0010a40 <rtems_barrier_release>
if (pipe->Writers == 0) {
a000fa7c: e5943014 ldr r3, [r4, #20]
a000fa80: e3530000 cmp r3, #0
a000fa84: 1a00004f bne a000fbc8 <fifo_open+0x374>
/* Not an error */
if (LIBIO_NODELAY(iop))
a000fa88: e5973014 ldr r3, [r7, #20]
a000fa8c: e3130001 tst r3, #1
a000fa90: 1a00004c bne a000fbc8 <fifo_open+0x374>
break;
prevCounter = pipe->writerCounter;
a000fa94: e5945024 ldr r5, [r4, #36] ; 0x24 <== NOT EXECUTED
err = -EINTR;
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
a000fa98: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
a000fa9c: ebffee82 bl a000b4ac <rtems_semaphore_release> <== NOT EXECUTED
if (! PIPE_READWAIT(pipe))
a000faa0: e3a01000 mov r1, #0 <== NOT EXECUTED
a000faa4: e594002c ldr r0, [r4, #44] ; 0x2c <== NOT EXECUTED
a000faa8: eb0003fa bl a0010a98 <rtems_barrier_wait> <== NOT EXECUTED
a000faac: e2501000 subs r1, r0, #0 <== NOT EXECUTED
a000fab0: 1a000047 bne a000fbd4 <fifo_open+0x380> <== NOT EXECUTED
goto out_error;
if (! PIPE_LOCK(pipe))
a000fab4: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
a000fab8: e1a02001 mov r2, r1 <== NOT EXECUTED
a000fabc: ebffee34 bl a000b394 <rtems_semaphore_obtain> <== NOT EXECUTED
a000fac0: e3500000 cmp r0, #0 <== NOT EXECUTED
a000fac4: 1a000042 bne a000fbd4 <fifo_open+0x380> <== NOT EXECUTED
goto out_error;
} while (prevCounter == pipe->writerCounter);
a000fac8: e5943024 ldr r3, [r4, #36] ; 0x24 <== NOT EXECUTED
a000facc: e1550003 cmp r5, r3 <== NOT EXECUTED
a000fad0: 0afffff0 beq a000fa98 <fifo_open+0x244> <== NOT EXECUTED
a000fad4: ea00003b b a000fbc8 <fifo_open+0x374> <== NOT EXECUTED
}
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
a000fad8: e5943024 ldr r3, [r4, #36] ; 0x24
a000fadc: e2833001 add r3, r3, #1
a000fae0: e5843024 str r3, [r4, #36] ; 0x24
if (pipe->Writers ++ == 0)
a000fae4: e5943014 ldr r3, [r4, #20]
a000fae8: e2832001 add r2, r3, #1
a000faec: e3530000 cmp r3, #0
a000faf0: e5842014 str r2, [r4, #20]
a000faf4: 1a000002 bne a000fb04 <fifo_open+0x2b0>
PIPE_WAKEUPREADERS(pipe);
a000faf8: e594002c ldr r0, [r4, #44] ; 0x2c
a000fafc: e28d1004 add r1, sp, #4
a000fb00: eb0003ce bl a0010a40 <rtems_barrier_release>
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
a000fb04: e5943010 ldr r3, [r4, #16]
a000fb08: e3530000 cmp r3, #0
a000fb0c: 1a00002d bne a000fbc8 <fifo_open+0x374>
a000fb10: e5973014 ldr r3, [r7, #20]
a000fb14: e3130001 tst r3, #1
err = -ENXIO;
goto out_error;
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
a000fb18: 05945020 ldreq r5, [r4, #32]
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
a000fb1c: 0a000003 beq a000fb30 <fifo_open+0x2dc>
PIPE_UNLOCK(pipe);
a000fb20: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
a000fb24: ebffee60 bl a000b4ac <rtems_semaphore_release> <== NOT EXECUTED
err = -ENXIO;
a000fb28: e3e06005 mvn r6, #5 <== NOT EXECUTED
goto out_error;
a000fb2c: ea000029 b a000fbd8 <fifo_open+0x384> <== NOT EXECUTED
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
a000fb30: e5940028 ldr r0, [r4, #40] ; 0x28
a000fb34: ebffee5c bl a000b4ac <rtems_semaphore_release>
if (! PIPE_WRITEWAIT(pipe))
a000fb38: e3a01000 mov r1, #0
a000fb3c: e5940030 ldr r0, [r4, #48] ; 0x30
a000fb40: eb0003d4 bl a0010a98 <rtems_barrier_wait>
a000fb44: e2501000 subs r1, r0, #0 <== NOT EXECUTED
a000fb48: 1a000021 bne a000fbd4 <fifo_open+0x380> <== NOT EXECUTED
goto out_error;
if (! PIPE_LOCK(pipe))
a000fb4c: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
a000fb50: e1a02001 mov r2, r1 <== NOT EXECUTED
a000fb54: ebffee0e bl a000b394 <rtems_semaphore_obtain> <== NOT EXECUTED
a000fb58: e3500000 cmp r0, #0 <== NOT EXECUTED
a000fb5c: 1a00001c bne a000fbd4 <fifo_open+0x380> <== NOT EXECUTED
goto out_error;
} while (prevCounter == pipe->readerCounter);
a000fb60: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED
a000fb64: e1550003 cmp r5, r3 <== NOT EXECUTED
a000fb68: 0afffff0 beq a000fb30 <fifo_open+0x2dc> <== NOT EXECUTED
a000fb6c: ea000015 b a000fbc8 <fifo_open+0x374> <== NOT EXECUTED
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
a000fb70: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED
a000fb74: e2833001 add r3, r3, #1 <== NOT EXECUTED
a000fb78: e5843020 str r3, [r4, #32] <== NOT EXECUTED
if (pipe->Readers ++ == 0)
a000fb7c: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED
a000fb80: e2832001 add r2, r3, #1 <== NOT EXECUTED
a000fb84: e3530000 cmp r3, #0 <== NOT EXECUTED
a000fb88: e5842010 str r2, [r4, #16] <== NOT EXECUTED
a000fb8c: 1a000002 bne a000fb9c <fifo_open+0x348> <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
a000fb90: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED
a000fb94: e28d1004 add r1, sp, #4 <== NOT EXECUTED
a000fb98: eb0003a8 bl a0010a40 <rtems_barrier_release> <== NOT EXECUTED
pipe->writerCounter ++;
a000fb9c: e5943024 ldr r3, [r4, #36] ; 0x24 <== NOT EXECUTED
a000fba0: e2833001 add r3, r3, #1 <== NOT EXECUTED
a000fba4: e5843024 str r3, [r4, #36] ; 0x24 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
a000fba8: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED
a000fbac: e2832001 add r2, r3, #1 <== NOT EXECUTED
a000fbb0: e3530000 cmp r3, #0 <== NOT EXECUTED
a000fbb4: e5842014 str r2, [r4, #20] <== NOT EXECUTED
a000fbb8: 1a000002 bne a000fbc8 <fifo_open+0x374> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
a000fbbc: e594002c ldr r0, [r4, #44] ; 0x2c <== NOT EXECUTED
a000fbc0: e28d1004 add r1, sp, #4 <== NOT EXECUTED
a000fbc4: eb00039d bl a0010a40 <rtems_barrier_release> <== NOT EXECUTED
break;
}
PIPE_UNLOCK(pipe);
a000fbc8: e5940028 ldr r0, [r4, #40] ; 0x28
a000fbcc: ebffee36 bl a000b4ac <rtems_semaphore_release>
return 0;
a000fbd0: ea000003 b a000fbe4 <fifo_open+0x390>
goto out_error;
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
a000fbd4: e3e06003 mvn r6, #3 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
out_error:
pipe_release(pipep, iop);
a000fbd8: e1a00008 mov r0, r8 <== NOT EXECUTED
a000fbdc: e1a01007 mov r1, r7 <== NOT EXECUTED
a000fbe0: ebfffeef bl a000f7a4 <pipe_release> <== NOT EXECUTED
return err;
}
a000fbe4: e1a00006 mov r0, r6
a000fbe8: e8bd85fc pop {r2, r3, r4, r5, r6, r7, r8, sl, pc}
a0006d14 <fpathconf>:
{
long return_value;
rtems_libio_t *iop;
rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
a0006d14: e59f3104 ldr r3, [pc, #260] ; a0006e20 <fpathconf+0x10c> <== NOT EXECUTED
long fpathconf(
int fd,
int name
)
{
a0006d18: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
long return_value;
rtems_libio_t *iop;
rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
a0006d1c: e5933000 ldr r3, [r3] <== NOT EXECUTED
a0006d20: e1500003 cmp r0, r3 <== NOT EXECUTED
a0006d24: 2a000006 bcs a0006d44 <fpathconf+0x30> <== NOT EXECUTED
iop = rtems_libio_iop(fd);
a0006d28: e59f30f4 ldr r3, [pc, #244] ; a0006e24 <fpathconf+0x110> <== NOT EXECUTED
a0006d2c: e3a02038 mov r2, #56 ; 0x38 <== NOT EXECUTED
a0006d30: e5933000 ldr r3, [r3] <== NOT EXECUTED
a0006d34: e0203092 mla r0, r2, r0, r3 <== NOT EXECUTED
rtems_libio_check_is_open(iop);
a0006d38: e5903014 ldr r3, [r0, #20] <== NOT EXECUTED
a0006d3c: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED
a0006d40: 1a000002 bne a0006d50 <fpathconf+0x3c> <== NOT EXECUTED
a0006d44: eb00292e bl a0011204 <__errno> <== NOT EXECUTED
a0006d48: e3a03009 mov r3, #9 <== NOT EXECUTED
a0006d4c: ea000003 b a0006d60 <fpathconf+0x4c> <== NOT EXECUTED
rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ);
a0006d50: e3130002 tst r3, #2 <== NOT EXECUTED
a0006d54: 1a000004 bne a0006d6c <fpathconf+0x58> <== NOT EXECUTED
a0006d58: eb002929 bl a0011204 <__errno> <== NOT EXECUTED
a0006d5c: e3a03016 mov r3, #22 <== NOT EXECUTED
a0006d60: e5803000 str r3, [r0] <== NOT EXECUTED
a0006d64: e3e00000 mvn r0, #0 <== NOT EXECUTED
a0006d68: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
/*
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
a0006d6c: e5903028 ldr r3, [r0, #40] ; 0x28 <== NOT EXECUTED
switch ( name ) {
a0006d70: e351000b cmp r1, #11 <== NOT EXECUTED
a0006d74: 979ff101 ldrls pc, [pc, r1, lsl #2] <== NOT EXECUTED
a0006d78: ea000023 b a0006e0c <fpathconf+0xf8> <== NOT EXECUTED
a0006d7c: a0006dac .word 0xa0006dac <== NOT EXECUTED
a0006d80: a0006db4 .word 0xa0006db4 <== NOT EXECUTED
a0006d84: a0006dbc .word 0xa0006dbc <== NOT EXECUTED
a0006d88: a0006dc4 .word 0xa0006dc4 <== NOT EXECUTED
a0006d8c: a0006dcc .word 0xa0006dcc <== NOT EXECUTED
a0006d90: a0006dd4 .word 0xa0006dd4 <== NOT EXECUTED
a0006d94: a0006ddc .word 0xa0006ddc <== NOT EXECUTED
a0006d98: a0006de4 .word 0xa0006de4 <== NOT EXECUTED
a0006d9c: a0006dec .word 0xa0006dec <== NOT EXECUTED
a0006da0: a0006df4 .word 0xa0006df4 <== NOT EXECUTED
a0006da4: a0006dfc .word 0xa0006dfc <== NOT EXECUTED
a0006da8: a0006e04 .word 0xa0006e04 <== NOT EXECUTED
case _PC_LINK_MAX:
return_value = the_limits->link_max;
a0006dac: e5930038 ldr r0, [r3, #56] ; 0x38 <== NOT EXECUTED
break;
a0006db0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
case _PC_MAX_CANON:
return_value = the_limits->max_canon;
a0006db4: e593003c ldr r0, [r3, #60] ; 0x3c <== NOT EXECUTED
break;
a0006db8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
case _PC_MAX_INPUT:
return_value = the_limits->max_input;
a0006dbc: e5930040 ldr r0, [r3, #64] ; 0x40 <== NOT EXECUTED
break;
a0006dc0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
case _PC_NAME_MAX:
return_value = the_limits->name_max;
a0006dc4: e5930044 ldr r0, [r3, #68] ; 0x44 <== NOT EXECUTED
break;
a0006dc8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
case _PC_PATH_MAX:
return_value = the_limits->path_max;
a0006dcc: e5930048 ldr r0, [r3, #72] ; 0x48 <== NOT EXECUTED
break;
a0006dd0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
case _PC_PIPE_BUF:
return_value = the_limits->pipe_buf;
a0006dd4: e593004c ldr r0, [r3, #76] ; 0x4c <== NOT EXECUTED
break;
a0006dd8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
case _PC_CHOWN_RESTRICTED:
return_value = the_limits->posix_chown_restrictions;
a0006ddc: e5930054 ldr r0, [r3, #84] ; 0x54 <== NOT EXECUTED
break;
a0006de0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
case _PC_NO_TRUNC:
return_value = the_limits->posix_no_trunc;
a0006de4: e5930058 ldr r0, [r3, #88] ; 0x58 <== NOT EXECUTED
break;
a0006de8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
case _PC_VDISABLE:
return_value = the_limits->posix_vdisable;
a0006dec: e5930064 ldr r0, [r3, #100] ; 0x64 <== NOT EXECUTED
break;
a0006df0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
case _PC_ASYNC_IO:
return_value = the_limits->posix_async_io;
a0006df4: e5930050 ldr r0, [r3, #80] ; 0x50 <== NOT EXECUTED
break;
a0006df8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
a0006dfc: e593005c ldr r0, [r3, #92] ; 0x5c <== NOT EXECUTED
break;
a0006e00: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
a0006e04: e5930060 ldr r0, [r3, #96] ; 0x60 <== NOT EXECUTED
break;
a0006e08: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
default:
rtems_set_errno_and_return_minus_one( EINVAL );
a0006e0c: eb0028fc bl a0011204 <__errno> <== NOT EXECUTED
a0006e10: e3a03016 mov r3, #22 <== NOT EXECUTED
a0006e14: e5803000 str r3, [r0] <== NOT EXECUTED
a0006e18: e3e00000 mvn r0, #0 <== NOT EXECUTED
break;
}
return return_value;
}
a0006e1c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a00061cc <free>:
void free(
void *ptr
)
{
MSBUMP(free_calls, 1);
a00061cc: e59f3090 ldr r3, [pc, #144] ; a0006264 <free+0x98>
#include <stdlib.h>
void free(
void *ptr
)
{
a00061d0: e92d4030 push {r4, r5, lr}
MSBUMP(free_calls, 1);
a00061d4: e593200c ldr r2, [r3, #12]
if ( !ptr )
a00061d8: e2504000 subs r4, r0, #0
void free(
void *ptr
)
{
MSBUMP(free_calls, 1);
a00061dc: e2822001 add r2, r2, #1
a00061e0: e583200c str r2, [r3, #12]
if ( !ptr )
a00061e4: 0a00001d beq a0006260 <free+0x94>
return;
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
a00061e8: e59f3078 ldr r3, [pc, #120] ; a0006268 <free+0x9c>
a00061ec: e5933000 ldr r3, [r3]
a00061f0: e3530003 cmp r3, #3
a00061f4: 1a000005 bne a0006210 <free+0x44>
!malloc_is_system_state_OK() ) {
a00061f8: eb000074 bl a00063d0 <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()) &&
a00061fc: e3500000 cmp r0, #0
a0006200: 1a000002 bne a0006210 <free+0x44>
!malloc_is_system_state_OK() ) {
malloc_deferred_free(ptr);
a0006204: e1a00004 mov r0, r4 <== NOT EXECUTED
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
a0006208: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
!malloc_is_system_state_OK() ) {
malloc_deferred_free(ptr);
a000620c: ea00008c b a0006444 <malloc_deferred_free> <== NOT EXECUTED
}
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
a0006210: e59f3054 ldr r3, [pc, #84] ; a000626c <free+0xa0>
a0006214: e5933000 ldr r3, [r3]
a0006218: e3530000 cmp r3, #0
a000621c: 0a000002 beq a000622c <free+0x60>
(*rtems_malloc_statistics_helpers->at_free)(ptr);
a0006220: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED
a0006224: e1a00004 mov r0, r4 <== NOT EXECUTED
a0006228: e12fff33 blx r3 <== NOT EXECUTED
if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) {
a000622c: e59f503c ldr r5, [pc, #60] ; a0006270 <free+0xa4>
a0006230: e1a01004 mov r1, r4
a0006234: e5950000 ldr r0, [r5]
a0006238: eb0012df bl a000adbc <_Protected_heap_Free>
a000623c: e3500000 cmp r0, #0
a0006240: 1a000006 bne a0006260 <free+0x94>
printk( "Program heap: free of bad pointer %p -- range %p - %p \n",
ptr,
RTEMS_Malloc_Heap->area_begin,
a0006244: e5953000 ldr r3, [r5]
*/
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",
a0006248: e59f0024 ldr r0, [pc, #36] ; a0006274 <free+0xa8>
a000624c: e1a01004 mov r1, r4
a0006250: e5932018 ldr r2, [r3, #24]
a0006254: e593301c ldr r3, [r3, #28]
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
a0006258: e8bd4030 pop {r4, r5, lr}
*/
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",
a000625c: ea000345 b a0006f78 <printk>
a0006260: e8bd8030 pop {r4, r5, pc}
a00074ac <free_user_env>:
static void
free_user_env(void *venv)
{
rtems_user_env_t *env = (rtems_user_env_t*) venv ;
if (env != &rtems_global_user_env
a00074ac: e59f302c ldr r3, [pc, #44] ; a00074e0 <free_user_env+0x34> <== NOT EXECUTED
* NOTE: this must be called with
* thread dispatching disabled!
*/
static void
free_user_env(void *venv)
{
a00074b0: e92d4010 push {r4, lr} <== NOT EXECUTED
rtems_user_env_t *env = (rtems_user_env_t*) venv ;
if (env != &rtems_global_user_env
a00074b4: e1500003 cmp r0, r3 <== NOT EXECUTED
* NOTE: this must be called with
* thread dispatching disabled!
*/
static void
free_user_env(void *venv)
{
a00074b8: e1a04000 mov r4, r0 <== NOT EXECUTED
rtems_user_env_t *env = (rtems_user_env_t*) venv ;
if (env != &rtems_global_user_env
a00074bc: 0a000006 beq a00074dc <free_user_env+0x30> <== NOT EXECUTED
#ifdef HAVE_USERENV_REFCNT
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
a00074c0: e2800004 add r0, r0, #4 <== NOT EXECUTED
a00074c4: ebfffbdf bl a0006448 <rtems_filesystem_freenode> <== NOT EXECUTED
rtems_filesystem_freenode( &env->root_directory);
a00074c8: e2840018 add r0, r4, #24 <== NOT EXECUTED
a00074cc: ebfffbdd bl a0006448 <rtems_filesystem_freenode> <== NOT EXECUTED
free(env);
a00074d0: e1a00004 mov r0, r4 <== NOT EXECUTED
}
}
a00074d4: e8bd4010 pop {r4, lr} <== NOT EXECUTED
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
rtems_filesystem_freenode( &env->root_directory);
free(env);
a00074d8: eafffbdf b a000645c <free> <== NOT EXECUTED
a00074dc: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a00150f8 <fstat>:
int fstat(
int fd,
struct stat *sbuf
)
{
a00150f8: e92d4030 push {r4, r5, lr}
rtems_libio_t *iop;
/*
* Check to see if we were passed a valid pointer.
*/
if ( !sbuf )
a00150fc: e2515000 subs r5, r1, #0
a0015100: 1a000002 bne a0015110 <fstat+0x18>
rtems_set_errno_and_return_minus_one( EFAULT );
a0015104: ebffec5c bl a001027c <__errno> <== NOT EXECUTED
a0015108: e3a0300e mov r3, #14 <== NOT EXECUTED
a001510c: ea00000c b a0015144 <fstat+0x4c> <== NOT EXECUTED
/*
* Now process the stat() request.
*/
iop = rtems_libio_iop( fd );
a0015110: e59f3060 ldr r3, [pc, #96] ; a0015178 <fstat+0x80>
a0015114: e5933000 ldr r3, [r3]
a0015118: e1500003 cmp r0, r3
a001511c: 2a000006 bcs a001513c <fstat+0x44>
a0015120: e59f3054 ldr r3, [pc, #84] ; a001517c <fstat+0x84>
a0015124: e3a04038 mov r4, #56 ; 0x38
a0015128: e5933000 ldr r3, [r3]
a001512c: e0243490 mla r4, r0, r4, r3
rtems_libio_check_fd( fd );
rtems_libio_check_is_open(iop);
a0015130: e5943014 ldr r3, [r4, #20]
a0015134: e3130c01 tst r3, #256 ; 0x100
a0015138: 1a000004 bne a0015150 <fstat+0x58>
a001513c: ebffec4e bl a001027c <__errno>
a0015140: e3a03009 mov r3, #9
a0015144: e5803000 str r3, [r0]
a0015148: e3e00000 mvn r0, #0
a001514c: e8bd8030 pop {r4, r5, pc}
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
a0015150: e1a00005 mov r0, r5
a0015154: e3a01000 mov r1, #0
a0015158: e3a02048 mov r2, #72 ; 0x48
a001515c: ebffeeab bl a0010c10 <memset>
return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf );
a0015160: e5943020 ldr r3, [r4, #32]
a0015164: e2840018 add r0, r4, #24
a0015168: e1a01005 mov r1, r5
a001516c: e5933018 ldr r3, [r3, #24]
a0015170: e12fff33 blx r3
}
a0015174: e8bd8030 pop {r4, r5, pc}
a0006f7c <fsync>:
int fd
)
{
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
a0006f7c: e59f3060 ldr r3, [pc, #96] ; a0006fe4 <fsync+0x68> <== NOT EXECUTED
#include <rtems/seterr.h>
int fsync(
int fd
)
{
a0006f80: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
a0006f84: e5933000 ldr r3, [r3] <== NOT EXECUTED
a0006f88: e1500003 cmp r0, r3 <== NOT EXECUTED
a0006f8c: 2a000006 bcs a0006fac <fsync+0x30> <== NOT EXECUTED
iop = rtems_libio_iop( fd );
a0006f90: e59f3050 ldr r3, [pc, #80] ; a0006fe8 <fsync+0x6c> <== NOT EXECUTED
a0006f94: e3a02038 mov r2, #56 ; 0x38 <== NOT EXECUTED
a0006f98: e5933000 ldr r3, [r3] <== NOT EXECUTED
a0006f9c: e0203092 mla r0, r2, r0, r3 <== NOT EXECUTED
rtems_libio_check_is_open(iop);
a0006fa0: e5903014 ldr r3, [r0, #20] <== NOT EXECUTED
a0006fa4: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED
a0006fa8: 1a000002 bne a0006fb8 <fsync+0x3c> <== NOT EXECUTED
a0006fac: eb002894 bl a0011204 <__errno> <== NOT EXECUTED
a0006fb0: e3a03009 mov r3, #9 <== NOT EXECUTED
a0006fb4: ea000003 b a0006fc8 <fsync+0x4c> <== NOT EXECUTED
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
a0006fb8: e3130004 tst r3, #4 <== NOT EXECUTED
a0006fbc: 1a000004 bne a0006fd4 <fsync+0x58> <== NOT EXECUTED
a0006fc0: eb00288f bl a0011204 <__errno> <== NOT EXECUTED
a0006fc4: e3a03016 mov r3, #22 <== NOT EXECUTED
a0006fc8: e5803000 str r3, [r0] <== NOT EXECUTED
a0006fcc: e3e00000 mvn r0, #0 <== NOT EXECUTED
a0006fd0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
/*
* Now process the fsync().
*/
return (*iop->pathinfo.handlers->fsync_h)( iop );
a0006fd4: e5903020 ldr r3, [r0, #32] <== NOT EXECUTED
a0006fd8: e5933028 ldr r3, [r3, #40] ; 0x28 <== NOT EXECUTED
a0006fdc: e12fff33 blx r3 <== NOT EXECUTED
}
a0006fe0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a000d8ec <ftruncate>:
)
{
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
a000d8ec: e59f30bc ldr r3, [pc, #188] ; a000d9b0 <ftruncate+0xc4>
int ftruncate(
int fd,
off_t length
)
{
a000d8f0: e92d4070 push {r4, r5, r6, lr}
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
a000d8f4: e5933000 ldr r3, [r3]
int ftruncate(
int fd,
off_t length
)
{
a000d8f8: e24dd014 sub sp, sp, #20
a000d8fc: e1a05001 mov r5, r1
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
a000d900: e1500003 cmp r0, r3
int ftruncate(
int fd,
off_t length
)
{
a000d904: e1a06002 mov r6, r2
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
a000d908: 2a000006 bcs a000d928 <ftruncate+0x3c>
iop = rtems_libio_iop( fd );
a000d90c: e59f30a0 ldr r3, [pc, #160] ; a000d9b4 <ftruncate+0xc8>
a000d910: e3a04038 mov r4, #56 ; 0x38
a000d914: e5933000 ldr r3, [r3]
a000d918: e0243490 mla r4, r0, r4, r3
rtems_libio_check_is_open(iop);
a000d91c: e5943014 ldr r3, [r4, #20]
a000d920: e3130c01 tst r3, #256 ; 0x100
a000d924: 1a000002 bne a000d934 <ftruncate+0x48>
a000d928: eb000a53 bl a001027c <__errno>
a000d92c: e3a03009 mov r3, #9
a000d930: ea000013 b a000d984 <ftruncate+0x98>
/*
* Make sure we are not working on a directory
*/
loc = iop->pathinfo;
a000d934: e1a0c00d mov ip, sp
a000d938: e284e018 add lr, r4, #24
a000d93c: e8be000f ldm lr!, {r0, r1, r2, r3}
a000d940: e8ac000f stmia ip!, {r0, r1, r2, r3}
a000d944: e59e3000 ldr r3, [lr]
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
a000d948: e1a0000d mov r0, sp
/*
* Make sure we are not working on a directory
*/
loc = iop->pathinfo;
a000d94c: e58c3000 str r3, [ip]
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
a000d950: e59d300c ldr r3, [sp, #12]
a000d954: e5933010 ldr r3, [r3, #16]
a000d958: e12fff33 blx r3
a000d95c: e3500001 cmp r0, #1
a000d960: 1a000002 bne a000d970 <ftruncate+0x84>
rtems_set_errno_and_return_minus_one( EISDIR );
a000d964: eb000a44 bl a001027c <__errno> <== NOT EXECUTED
a000d968: e3a03015 mov r3, #21 <== NOT EXECUTED
a000d96c: ea000004 b a000d984 <ftruncate+0x98> <== NOT EXECUTED
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
a000d970: e5943014 ldr r3, [r4, #20]
a000d974: e3130004 tst r3, #4
a000d978: 1a000004 bne a000d990 <ftruncate+0xa4>
a000d97c: eb000a3e bl a001027c <__errno> <== NOT EXECUTED
a000d980: e3a03016 mov r3, #22 <== NOT EXECUTED
a000d984: e5803000 str r3, [r0]
a000d988: e3e00000 mvn r0, #0
a000d98c: ea000005 b a000d9a8 <ftruncate+0xbc>
return (*iop->pathinfo.handlers->ftruncate_h)( iop, length );
a000d990: e5943020 ldr r3, [r4, #32]
a000d994: e1a00004 mov r0, r4
a000d998: e1a01005 mov r1, r5
a000d99c: e5933020 ldr r3, [r3, #32]
a000d9a0: e1a02006 mov r2, r6
a000d9a4: e12fff33 blx r3
}
a000d9a8: e28dd014 add sp, sp, #20
a000d9ac: e8bd8070 pop {r4, r5, r6, pc}
a0006df0 <getgr_r>:
struct group *grp,
char *buffer,
size_t bufsize,
struct group **result
)
{
a0006df0: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED
a0006df4: e59da01c ldr sl, [sp, #28] <== NOT EXECUTED
a0006df8: e1a06000 mov r6, r0 <== NOT EXECUTED
a0006dfc: e1a07001 mov r7, r1 <== NOT EXECUTED
a0006e00: e1a04002 mov r4, r2 <== NOT EXECUTED
a0006e04: e1a08003 mov r8, r3 <== NOT EXECUTED
FILE *fp;
int match;
init_etc_passwd_group();
a0006e08: ebffffc5 bl a0006d24 <init_etc_passwd_group> <== NOT EXECUTED
if ((fp = fopen("/etc/group", "r")) == NULL)
a0006e0c: e59f00a8 ldr r0, [pc, #168] ; a0006ebc <getgr_r+0xcc> <== NOT EXECUTED
a0006e10: e59f10a8 ldr r1, [pc, #168] ; a0006ec0 <getgr_r+0xd0> <== NOT EXECUTED
a0006e14: eb002b08 bl a0011a3c <fopen> <== NOT EXECUTED
a0006e18: e2505000 subs r5, r0, #0 <== NOT EXECUTED
a0006e1c: 1a000004 bne a0006e34 <getgr_r+0x44> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
a0006e20: eb0028e0 bl a00111a8 <__errno> <== NOT EXECUTED
a0006e24: e3a03016 mov r3, #22 <== NOT EXECUTED
a0006e28: e5803000 str r3, [r0] <== NOT EXECUTED
a0006e2c: e3e00000 mvn r0, #0 <== NOT EXECUTED
a0006e30: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
for(;;) {
if (!scangr(fp, grp, buffer, bufsize))
a0006e34: e1a00005 mov r0, r5 <== NOT EXECUTED
a0006e38: e1a01004 mov r1, r4 <== NOT EXECUTED
a0006e3c: e1a02008 mov r2, r8 <== NOT EXECUTED
a0006e40: e1a0300a mov r3, sl <== NOT EXECUTED
a0006e44: ebffff25 bl a0006ae0 <scangr> <== NOT EXECUTED
a0006e48: e3500000 cmp r0, #0 <== NOT EXECUTED
a0006e4c: 0a000013 beq a0006ea0 <getgr_r+0xb0> <== NOT EXECUTED
goto error_einval;
if (name) {
a0006e50: e3560000 cmp r6, #0 <== NOT EXECUTED
a0006e54: 0a000005 beq a0006e70 <getgr_r+0x80> <== NOT EXECUTED
match = (strcmp(grp->gr_name, name) == 0);
a0006e58: e5940000 ldr r0, [r4] <== NOT EXECUTED
a0006e5c: e1a01006 mov r1, r6 <== NOT EXECUTED
a0006e60: eb003046 bl a0012f80 <strcmp> <== NOT EXECUTED
a0006e64: e2700001 rsbs r0, r0, #1 <== NOT EXECUTED
a0006e68: 33a00000 movcc r0, #0 <== NOT EXECUTED
a0006e6c: ea000003 b a0006e80 <getgr_r+0x90> <== NOT EXECUTED
} else {
match = (grp->gr_gid == gid);
a0006e70: e1d400b8 ldrh r0, [r4, #8] <== NOT EXECUTED
a0006e74: e1500007 cmp r0, r7 <== NOT EXECUTED
a0006e78: 13a00000 movne r0, #0 <== NOT EXECUTED
a0006e7c: 03a00001 moveq r0, #1 <== NOT EXECUTED
}
if (match) {
a0006e80: e3500000 cmp r0, #0 <== NOT EXECUTED
a0006e84: 0affffea beq a0006e34 <getgr_r+0x44> <== NOT EXECUTED
fclose(fp);
a0006e88: e1a00005 mov r0, r5 <== NOT EXECUTED
a0006e8c: eb002913 bl a00112e0 <fclose> <== NOT EXECUTED
*result = grp;
a0006e90: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED
return 0;
a0006e94: e3a00000 mov r0, #0 <== NOT EXECUTED
match = (grp->gr_gid == gid);
}
if (match) {
fclose(fp);
*result = grp;
a0006e98: e5834000 str r4, [r3] <== NOT EXECUTED
return 0;
a0006e9c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
}
}
error_einval:
fclose(fp);
a0006ea0: e1a00005 mov r0, r5 <== NOT EXECUTED
a0006ea4: eb00290d bl a00112e0 <fclose> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
a0006ea8: eb0028be bl a00111a8 <__errno> <== NOT EXECUTED
a0006eac: e3a03016 mov r3, #22 <== NOT EXECUTED
a0006eb0: e5803000 str r3, [r0] <== NOT EXECUTED
a0006eb4: e3e00000 mvn r0, #0 <== NOT EXECUTED
}
a0006eb8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
a00071b4 <getgrent>:
struct group *getgrent(void)
{
a00071b4: e92d4010 push {r4, lr}
if (group_fp == NULL)
a00071b8: e59f4024 ldr r4, [pc, #36] ; a00071e4 <getgrent+0x30>
a00071bc: e59401c4 ldr r0, [r4, #452] ; 0x1c4
a00071c0: e3500000 cmp r0, #0
a00071c4: 0a000005 beq a00071e0 <getgrent+0x2c>
return NULL;
if (!scangr(group_fp, &grent, grbuf, sizeof grbuf))
a00071c8: e28410ec add r1, r4, #236 ; 0xec <== NOT EXECUTED
a00071cc: e28420fc add r2, r4, #252 ; 0xfc <== NOT EXECUTED
a00071d0: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED
a00071d4: ebfffe41 bl a0006ae0 <scangr> <== NOT EXECUTED
return NULL;
a00071d8: e3500000 cmp r0, #0 <== NOT EXECUTED
a00071dc: 128400ec addne r0, r4, #236 ; 0xec <== NOT EXECUTED
return &grent;
}
a00071e0: e8bd8010 pop {r4, pc}
a000717c <getgrgid>:
struct group *getgrgid(
gid_t gid
)
{
a000717c: e92d4003 push {r0, r1, lr} <== NOT EXECUTED
struct group *p;
if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p))
a0007180: e59f1028 ldr r1, [pc, #40] ; a00071b0 <getgrgid+0x34> <== NOT EXECUTED
}
struct group *getgrgid(
gid_t gid
)
{
a0007184: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED
struct group *p;
if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p))
a0007188: e28d3004 add r3, sp, #4 <== NOT EXECUTED
a000718c: e58d3000 str r3, [sp] <== NOT EXECUTED
a0007190: e2812010 add r2, r1, #16 <== NOT EXECUTED
a0007194: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED
a0007198: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED
a000719c: ebffffe9 bl a0007148 <getgrgid_r> <== NOT EXECUTED
a00071a0: e3500000 cmp r0, #0 <== NOT EXECUTED
return NULL;
return p;
a00071a4: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED
)
{
struct group *p;
if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p))
return NULL;
a00071a8: 13a00000 movne r0, #0 <== NOT EXECUTED
return p;
}
a00071ac: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED
a0007148 <getgrgid_r>:
struct group *grp,
char *buffer,
size_t bufsize,
struct group **result
)
{
a0007148: e92d4003 push {r0, r1, lr} <== NOT EXECUTED
return getgr_r(NULL, gid, grp, buffer, bufsize, result);
a000714c: e58d3000 str r3, [sp] <== NOT EXECUTED
a0007150: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
struct group *grp,
char *buffer,
size_t bufsize,
struct group **result
)
{
a0007154: e1a0e001 mov lr, r1 <== NOT EXECUTED
a0007158: e1a01800 lsl r1, r0, #16 <== NOT EXECUTED
a000715c: e1a0c002 mov ip, r2 <== NOT EXECUTED
return getgr_r(NULL, gid, grp, buffer, bufsize, result);
a0007160: e58d3004 str r3, [sp, #4] <== NOT EXECUTED
a0007164: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED
a0007168: e1a0200e mov r2, lr <== NOT EXECUTED
a000716c: e1a0300c mov r3, ip <== NOT EXECUTED
a0007170: e3a00000 mov r0, #0 <== NOT EXECUTED
a0007174: ebffff1d bl a0006df0 <getgr_r> <== NOT EXECUTED
}
a0007178: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED
a0007118 <getgrnam>:
struct group *getgrnam(
const char *name
)
{
a0007118: e92d4003 push {r0, r1, lr} <== NOT EXECUTED
struct group *p;
if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p))
a000711c: e59f1020 ldr r1, [pc, #32] ; a0007144 <getgrnam+0x2c> <== NOT EXECUTED
a0007120: e28d3004 add r3, sp, #4 <== NOT EXECUTED
a0007124: e58d3000 str r3, [sp] <== NOT EXECUTED
a0007128: e2812010 add r2, r1, #16 <== NOT EXECUTED
a000712c: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED
a0007130: ebffffed bl a00070ec <getgrnam_r> <== NOT EXECUTED
a0007134: e3500000 cmp r0, #0 <== NOT EXECUTED
return NULL;
return p;
a0007138: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED
)
{
struct group *p;
if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p))
return NULL;
a000713c: 13a00000 movne r0, #0 <== NOT EXECUTED
return p;
}
a0007140: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED
a00070ec <getgrnam_r>:
struct group *grp,
char *buffer,
size_t bufsize,
struct group **result
)
{
a00070ec: e92d4003 push {r0, r1, lr} <== NOT EXECUTED
return getgr_r(name, 0, grp, buffer, bufsize, result);
a00070f0: e58d3000 str r3, [sp] <== NOT EXECUTED
a00070f4: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
struct group *grp,
char *buffer,
size_t bufsize,
struct group **result
)
{
a00070f8: e1a0e001 mov lr, r1 <== NOT EXECUTED
a00070fc: e1a0c002 mov ip, r2 <== NOT EXECUTED
return getgr_r(name, 0, grp, buffer, bufsize, result);
a0007100: e58d3004 str r3, [sp, #4] <== NOT EXECUTED
a0007104: e3a01000 mov r1, #0 <== NOT EXECUTED
a0007108: e1a0200e mov r2, lr <== NOT EXECUTED
a000710c: e1a0300c mov r3, ip <== NOT EXECUTED
a0007110: ebffff36 bl a0006df0 <getgr_r> <== NOT EXECUTED
}
a0007114: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED
a0006850 <getgroups>:
int gidsetsize __attribute__((unused)),
gid_t grouplist[] __attribute__((unused))
)
{
return 0; /* no supplemental group ids */
}
a0006850: e3a00000 mov r0, #0 <== NOT EXECUTED
a0006854: e12fff1e bx lr <== NOT EXECUTED
a00068a8 <getlogin>:
* 4.2.4 Get User Name, P1003.1b-1993, p. 87
*
* NOTE: P1003.1c/D10, p. 49 adds getlogin_r().
*/
char *getlogin( void )
{
a00068a8: e92d4010 push {r4, lr} <== NOT EXECUTED
(void) getlogin_r( _POSIX_types_Getlogin_buffer, LOGIN_NAME_MAX );
a00068ac: e59f4018 ldr r4, [pc, #24] ; a00068cc <getlogin+0x24> <== NOT EXECUTED
a00068b0: e3a01009 mov r1, #9 <== NOT EXECUTED
a00068b4: e5940000 ldr r0, [r4] <== NOT EXECUTED
a00068b8: e280003a add r0, r0, #58 ; 0x3a <== NOT EXECUTED
a00068bc: ebffffe5 bl a0006858 <getlogin_r> <== NOT EXECUTED
return _POSIX_types_Getlogin_buffer;
a00068c0: e5940000 ldr r0, [r4] <== NOT EXECUTED
}
a00068c4: e280003a add r0, r0, #58 ; 0x3a <== NOT EXECUTED
a00068c8: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a0006858 <getlogin_r>:
*/
int getlogin_r(
char *name,
size_t namesize
)
{
a0006858: e92d4010 push {r4, lr} <== NOT EXECUTED
struct passwd *pw;
char *pname;
if ( !name )
a000685c: e2504000 subs r4, r0, #0 <== NOT EXECUTED
a0006860: 0a00000b beq a0006894 <getlogin_r+0x3c> <== NOT EXECUTED
return EFAULT;
if ( namesize < LOGIN_NAME_MAX )
a0006864: e3510008 cmp r1, #8 <== NOT EXECUTED
a0006868: 9a00000b bls a000689c <getlogin_r+0x44> <== NOT EXECUTED
return ERANGE;
/* Set the pointer to a default name */
pname = "";
pw = getpwuid(getuid());
a000686c: eb00028d bl a00072a8 <getuid> <== NOT EXECUTED
a0006870: eb0001ec bl a0007028 <getpwuid> <== NOT EXECUTED
if ( pw )
a0006874: e3500000 cmp r0, #0 <== NOT EXECUTED
pname = pw->pw_name;
a0006878: 15901000 ldrne r1, [r0] <== NOT EXECUTED
if ( namesize < LOGIN_NAME_MAX )
return ERANGE;
/* Set the pointer to a default name */
pname = "";
a000687c: 059f1020 ldreq r1, [pc, #32] ; a00068a4 <getlogin_r+0x4c> <== NOT EXECUTED
pw = getpwuid(getuid());
if ( pw )
pname = pw->pw_name;
strncpy( name, pname, LOGIN_NAME_MAX );
a0006880: e1a00004 mov r0, r4 <== NOT EXECUTED
a0006884: e3a02009 mov r2, #9 <== NOT EXECUTED
a0006888: eb0032b0 bl a0013350 <strncpy> <== NOT EXECUTED
return 0;
a000688c: e3a00000 mov r0, #0 <== NOT EXECUTED
a0006890: e8bd8010 pop {r4, pc} <== NOT EXECUTED
{
struct passwd *pw;
char *pname;
if ( !name )
return EFAULT;
a0006894: e3a0000e mov r0, #14 <== NOT EXECUTED
a0006898: e8bd8010 pop {r4, pc} <== NOT EXECUTED
if ( namesize < LOGIN_NAME_MAX )
return ERANGE;
a000689c: e3a00022 mov r0, #34 ; 0x22 <== NOT EXECUTED
if ( pw )
pname = pw->pw_name;
strncpy( name, pname, LOGIN_NAME_MAX );
return 0;
}
a00068a0: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a00068d0 <getpgrp>:
* This always succeeds and returns the process group id. For rtems,
* this will always be the local node;
*/
return _Objects_Local_node;
}
a00068d0: e3a00001 mov r0, #1 <== NOT EXECUTED
a00068d4: e12fff1e bx lr <== NOT EXECUTED
a0006ec4 <getpw_r>:
struct passwd *pwd,
char *buffer,
size_t bufsize,
struct passwd **result
)
{
a0006ec4: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED
a0006ec8: e59da01c ldr sl, [sp, #28] <== NOT EXECUTED
a0006ecc: e1a06000 mov r6, r0 <== NOT EXECUTED
a0006ed0: e1a07001 mov r7, r1 <== NOT EXECUTED
a0006ed4: e1a04002 mov r4, r2 <== NOT EXECUTED
a0006ed8: e1a08003 mov r8, r3 <== NOT EXECUTED
FILE *fp;
int match;
init_etc_passwd_group();
a0006edc: ebffff90 bl a0006d24 <init_etc_passwd_group> <== NOT EXECUTED
if ((fp = fopen("/etc/passwd", "r")) == NULL)
a0006ee0: e59f00a8 ldr r0, [pc, #168] ; a0006f90 <getpw_r+0xcc> <== NOT EXECUTED
a0006ee4: e59f10a8 ldr r1, [pc, #168] ; a0006f94 <getpw_r+0xd0> <== NOT EXECUTED
a0006ee8: eb002ad3 bl a0011a3c <fopen> <== NOT EXECUTED
a0006eec: e2505000 subs r5, r0, #0 <== NOT EXECUTED
a0006ef0: 1a000004 bne a0006f08 <getpw_r+0x44> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
a0006ef4: eb0028ab bl a00111a8 <__errno> <== NOT EXECUTED
a0006ef8: e3a03016 mov r3, #22 <== NOT EXECUTED
a0006efc: e5803000 str r3, [r0] <== NOT EXECUTED
a0006f00: e3e00000 mvn r0, #0 <== NOT EXECUTED
a0006f04: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
for(;;) {
if (!scanpw(fp, pwd, buffer, bufsize))
a0006f08: e1a00005 mov r0, r5 <== NOT EXECUTED
a0006f0c: e1a01004 mov r1, r4 <== NOT EXECUTED
a0006f10: e1a02008 mov r2, r8 <== NOT EXECUTED
a0006f14: e1a0300a mov r3, sl <== NOT EXECUTED
a0006f18: ebffff39 bl a0006c04 <scanpw> <== NOT EXECUTED
a0006f1c: e3500000 cmp r0, #0 <== NOT EXECUTED
a0006f20: 0a000013 beq a0006f74 <getpw_r+0xb0> <== NOT EXECUTED
goto error_einval;
if (name) {
a0006f24: e3560000 cmp r6, #0 <== NOT EXECUTED
a0006f28: 0a000005 beq a0006f44 <getpw_r+0x80> <== NOT EXECUTED
match = (strcmp(pwd->pw_name, name) == 0);
a0006f2c: e5940000 ldr r0, [r4] <== NOT EXECUTED
a0006f30: e1a01006 mov r1, r6 <== NOT EXECUTED
a0006f34: eb003011 bl a0012f80 <strcmp> <== NOT EXECUTED
a0006f38: e2700001 rsbs r0, r0, #1 <== NOT EXECUTED
a0006f3c: 33a00000 movcc r0, #0 <== NOT EXECUTED
a0006f40: ea000003 b a0006f54 <getpw_r+0x90> <== NOT EXECUTED
} else {
match = (pwd->pw_uid == uid);
a0006f44: e1d400b8 ldrh r0, [r4, #8] <== NOT EXECUTED
a0006f48: e1500007 cmp r0, r7 <== NOT EXECUTED
a0006f4c: 13a00000 movne r0, #0 <== NOT EXECUTED
a0006f50: 03a00001 moveq r0, #1 <== NOT EXECUTED
}
if (match) {
a0006f54: e3500000 cmp r0, #0 <== NOT EXECUTED
a0006f58: 0affffea beq a0006f08 <getpw_r+0x44> <== NOT EXECUTED
fclose(fp);
a0006f5c: e1a00005 mov r0, r5 <== NOT EXECUTED
a0006f60: eb0028de bl a00112e0 <fclose> <== NOT EXECUTED
*result = pwd;
a0006f64: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED
return 0;
a0006f68: e3a00000 mov r0, #0 <== NOT EXECUTED
match = (pwd->pw_uid == uid);
}
if (match) {
fclose(fp);
*result = pwd;
a0006f6c: e5834000 str r4, [r3] <== NOT EXECUTED
return 0;
a0006f70: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
}
}
error_einval:
fclose(fp);
a0006f74: e1a00005 mov r0, r5 <== NOT EXECUTED
a0006f78: eb0028d8 bl a00112e0 <fclose> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
a0006f7c: eb002889 bl a00111a8 <__errno> <== NOT EXECUTED
a0006f80: e3a03016 mov r3, #22 <== NOT EXECUTED
a0006f84: e5803000 str r3, [r0] <== NOT EXECUTED
a0006f88: e3e00000 mvn r0, #0 <== NOT EXECUTED
}
a0006f8c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
a0006fc4 <getpwnam>:
struct passwd *getpwnam(
const char *name
)
{
a0006fc4: e92d4003 push {r0, r1, lr} <== NOT EXECUTED
struct passwd *p;
if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p))
a0006fc8: e59f1020 ldr r1, [pc, #32] ; a0006ff0 <getpwnam+0x2c> <== NOT EXECUTED
a0006fcc: e28d3004 add r3, sp, #4 <== NOT EXECUTED
a0006fd0: e58d3000 str r3, [sp] <== NOT EXECUTED
a0006fd4: e281201c add r2, r1, #28 <== NOT EXECUTED
a0006fd8: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED
a0006fdc: ebffffed bl a0006f98 <getpwnam_r> <== NOT EXECUTED
a0006fe0: e3500000 cmp r0, #0 <== NOT EXECUTED
return NULL;
return p;
a0006fe4: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED
)
{
struct passwd *p;
if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p))
return NULL;
a0006fe8: 13a00000 movne r0, #0 <== NOT EXECUTED
return p;
}
a0006fec: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED
a0006f98 <getpwnam_r>:
struct passwd *pwd,
char *buffer,
size_t bufsize,
struct passwd **result
)
{
a0006f98: e92d4003 push {r0, r1, lr} <== NOT EXECUTED
return getpw_r(name, 0, pwd, buffer, bufsize, result);
a0006f9c: e58d3000 str r3, [sp] <== NOT EXECUTED
a0006fa0: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
struct passwd *pwd,
char *buffer,
size_t bufsize,
struct passwd **result
)
{
a0006fa4: e1a0e001 mov lr, r1 <== NOT EXECUTED
a0006fa8: e1a0c002 mov ip, r2 <== NOT EXECUTED
return getpw_r(name, 0, pwd, buffer, bufsize, result);
a0006fac: e58d3004 str r3, [sp, #4] <== NOT EXECUTED
a0006fb0: e3a01000 mov r1, #0 <== NOT EXECUTED
a0006fb4: e1a0200e mov r2, lr <== NOT EXECUTED
a0006fb8: e1a0300c mov r3, ip <== NOT EXECUTED
a0006fbc: ebffffc0 bl a0006ec4 <getpw_r> <== NOT EXECUTED
}
a0006fc0: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED
a0007028 <getpwuid>:
struct passwd *getpwuid(
uid_t uid
)
{
a0007028: e92d4003 push {r0, r1, lr} <== NOT EXECUTED
struct passwd *p;
if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p))
a000702c: e59f1028 ldr r1, [pc, #40] ; a000705c <getpwuid+0x34> <== NOT EXECUTED
}
struct passwd *getpwuid(
uid_t uid
)
{
a0007030: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED
struct passwd *p;
if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p))
a0007034: e28d3004 add r3, sp, #4 <== NOT EXECUTED
a0007038: e58d3000 str r3, [sp] <== NOT EXECUTED
a000703c: e281201c add r2, r1, #28 <== NOT EXECUTED
a0007040: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED
a0007044: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED
a0007048: ebffffe9 bl a0006ff4 <getpwuid_r> <== NOT EXECUTED
a000704c: e3500000 cmp r0, #0 <== NOT EXECUTED
return NULL;
return p;
a0007050: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED
)
{
struct passwd *p;
if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p))
return NULL;
a0007054: 13a00000 movne r0, #0 <== NOT EXECUTED
return p;
}
a0007058: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED
a0006ff4 <getpwuid_r>:
struct passwd *pwd,
char *buffer,
size_t bufsize,
struct passwd **result
)
{
a0006ff4: e92d4003 push {r0, r1, lr} <== NOT EXECUTED
return getpw_r(NULL, uid, pwd, buffer, bufsize, result);
a0006ff8: e58d3000 str r3, [sp] <== NOT EXECUTED
a0006ffc: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
struct passwd *pwd,
char *buffer,
size_t bufsize,
struct passwd **result
)
{
a0007000: e1a0e001 mov lr, r1 <== NOT EXECUTED
a0007004: e1a01800 lsl r1, r0, #16 <== NOT EXECUTED
a0007008: e1a0c002 mov ip, r2 <== NOT EXECUTED
return getpw_r(NULL, uid, pwd, buffer, bufsize, result);
a000700c: e58d3004 str r3, [sp, #4] <== NOT EXECUTED
a0007010: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED
a0007014: e1a0200e mov r2, lr <== NOT EXECUTED
a0007018: e1a0300c mov r3, ip <== NOT EXECUTED
a000701c: e3a00000 mov r0, #0 <== NOT EXECUTED
a0007020: ebffffa7 bl a0006ec4 <getpw_r> <== NOT EXECUTED
}
a0007024: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED
a0006548 <getrusage>:
#include <rtems.h>
#include <rtems/seterr.h>
int getrusage(int who, struct rusage *usage)
{
a0006548: e92d4073 push {r0, r1, r4, r5, r6, lr}
struct timespec uptime;
struct timeval rtime;
if ( !usage )
a000654c: e2515000 subs r5, r1, #0
#include <rtems.h>
#include <rtems/seterr.h>
int getrusage(int who, struct rusage *usage)
{
a0006550: e1a04000 mov r4, r0
struct timespec uptime;
struct timeval rtime;
if ( !usage )
a0006554: 1a000002 bne a0006564 <getrusage+0x1c>
rtems_set_errno_and_return_minus_one( EFAULT );
a0006558: eb0027e4 bl a00104f0 <__errno>
a000655c: e3a0300e mov r3, #14
a0006560: ea000015 b a00065bc <getrusage+0x74>
* RTEMS only has a single process so there are no children.
* The single process has been running since the system
* was booted and since there is no distinction between system
* and user time, we will just report the uptime.
*/
if (who == RUSAGE_SELF) {
a0006564: e3500000 cmp r0, #0
a0006568: 1a00000a bne a0006598 <getrusage+0x50>
rtems_clock_get_uptime( &uptime );
a000656c: e1a0000d mov r0, sp <== NOT EXECUTED
a0006570: eb000adc bl a00090e8 <rtems_clock_get_uptime> <== NOT EXECUTED
rtime.tv_sec = uptime.tv_sec;
rtime.tv_usec = uptime.tv_nsec / 1000;
a0006574: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED
a0006578: e3a01ffa mov r1, #1000 ; 0x3e8 <== NOT EXECUTED
a000657c: eb0035b9 bl a0013c68 <__aeabi_idiv> <== NOT EXECUTED
* and user time, we will just report the uptime.
*/
if (who == RUSAGE_SELF) {
rtems_clock_get_uptime( &uptime );
rtime.tv_sec = uptime.tv_sec;
a0006580: e59d6000 ldr r6, [sp] <== NOT EXECUTED
rtime.tv_usec = uptime.tv_nsec / 1000;
a0006584: e5850004 str r0, [r5, #4] <== NOT EXECUTED
a0006588: e585000c str r0, [r5, #12] <== NOT EXECUTED
a000658c: e5856000 str r6, [r5] <== NOT EXECUTED
a0006590: e5856008 str r6, [r5, #8] <== NOT EXECUTED
a0006594: ea000004 b a00065ac <getrusage+0x64> <== NOT EXECUTED
usage->ru_stime = rtime;
return 0;
}
if (who == RUSAGE_CHILDREN) {
a0006598: e3700001 cmn r0, #1
a000659c: 1a000004 bne a00065b4 <getrusage+0x6c>
rtems_set_errno_and_return_minus_one( ENOSYS );
a00065a0: eb0027d2 bl a00104f0 <__errno>
a00065a4: e3a03058 mov r3, #88 ; 0x58
a00065a8: e5803000 str r3, [r0]
a00065ac: e1a00004 mov r0, r4
a00065b0: ea000003 b a00065c4 <getrusage+0x7c>
}
rtems_set_errno_and_return_minus_one( EINVAL );
a00065b4: eb0027cd bl a00104f0 <__errno>
a00065b8: e3a03016 mov r3, #22
a00065bc: e5803000 str r3, [r0]
a00065c0: e3e00000 mvn r0, #0
}
a00065c4: e8bd807c pop {r2, r3, r4, r5, r6, pc}
a00062a0 <gettimeofday>:
*/
int gettimeofday(
struct timeval *tp,
void * __tz __attribute__((unused))
)
{
a00062a0: e92d4033 push {r0, r1, r4, r5, lr}
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp )
a00062a4: e2504000 subs r4, r0, #0
a00062a8: 1a000004 bne a00062c0 <gettimeofday+0x20>
rtems_set_errno_and_return_minus_one( EFAULT );
a00062ac: eb0027f2 bl a001027c <__errno> <== NOT EXECUTED
a00062b0: e3a0300e mov r3, #14 <== NOT EXECUTED
a00062b4: e5803000 str r3, [r0] <== NOT EXECUTED
a00062b8: e3e00000 mvn r0, #0 <== NOT EXECUTED
a00062bc: ea00000c b a00062f4 <gettimeofday+0x54> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a00062c0: e10f5000 mrs r5, CPSR
a00062c4: e3853080 orr r3, r5, #128 ; 0x80
a00062c8: e129f003 msr CPSR_fc, r3
ISR_Level level;
struct timespec now;
suseconds_t useconds;
_ISR_Disable(level);
_TOD_Get( &now );
a00062cc: e1a0000d mov r0, sp
a00062d0: eb000f8a bl a000a100 <_TOD_Get>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a00062d4: e129f005 msr CPSR_fc, r5
_ISR_Enable(level);
useconds = (suseconds_t)now.tv_nsec;
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
time->tv_sec = now.tv_sec;
a00062d8: e59d3000 ldr r3, [sp]
_ISR_Disable(level);
_TOD_Get( &now );
_ISR_Enable(level);
useconds = (suseconds_t)now.tv_nsec;
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
a00062dc: e59d0004 ldr r0, [sp, #4]
a00062e0: e3a01ffa mov r1, #1000 ; 0x3e8
time->tv_sec = now.tv_sec;
a00062e4: e5843000 str r3, [r4]
_ISR_Disable(level);
_TOD_Get( &now );
_ISR_Enable(level);
useconds = (suseconds_t)now.tv_nsec;
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
a00062e8: eb0035ec bl a0013aa0 <__aeabi_idiv>
time->tv_sec = now.tv_sec;
time->tv_usec = useconds;
a00062ec: e5840004 str r0, [r4, #4]
* Timezone information ignored by the OS proper. Per email
* with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X
* do it. This puts us in good company.
*/
return 0;
a00062f0: e3a00000 mov r0, #0
}
a00062f4: e8bd803c pop {r2, r3, r4, r5, pc}
a000fa68 <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 )
a000fa68: e5903018 ldr r3, [r0, #24]
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
a000fa6c: e92d4010 push {r4, lr}
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 )
a000fa70: e593304c ldr r3, [r3, #76] ; 0x4c
a000fa74: e3530001 cmp r3, #1
a000fa78: 1a000005 bne a000fa94 <imfs_dir_open+0x2c>
return -1; /* It wasn't a directory --> return error */
iop->offset = 0;
a000fa7c: e3a03000 mov r3, #0
a000fa80: e3a04000 mov r4, #0
a000fa84: e580300c str r3, [r0, #12]
a000fa88: e5804010 str r4, [r0, #16]
return 0;
a000fa8c: e3a00000 mov r0, #0
a000fa90: e8bd8010 pop {r4, pc}
/* 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 */
a000fa94: e3e00000 mvn r0, #0 <== NOT EXECUTED
iop->offset = 0;
return 0;
}
a000fa98: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a000fcc4 <imfs_dir_rmnod>:
int imfs_dir_rmnod(
rtems_filesystem_location_info_t *parent_pathloc, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
a000fcc4: e92d4030 push {r4, r5, lr}
IMFS_jnode_t *the_jnode;
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
a000fcc8: e5914000 ldr r4, [r1]
/*
* You cannot remove a node that still has children
*/
if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) )
a000fccc: e5942050 ldr r2, [r4, #80] ; 0x50
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
a000fcd0: e2843054 add r3, r4, #84 ; 0x54
a000fcd4: e1520003 cmp r2, r3
a000fcd8: 0a000002 beq a000fce8 <imfs_dir_rmnod+0x24>
rtems_set_errno_and_return_minus_one( ENOTEMPTY );
a000fcdc: eb000166 bl a001027c <__errno> <== NOT EXECUTED
a000fce0: e3a0305a mov r3, #90 ; 0x5a <== NOT EXECUTED
a000fce4: ea000008 b a000fd0c <imfs_dir_rmnod+0x48> <== NOT EXECUTED
/*
* You cannot remove the file system root node.
*/
if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access )
a000fce8: e5913010 ldr r3, [r1, #16]
a000fcec: e593301c ldr r3, [r3, #28]
a000fcf0: e1530004 cmp r3, r4
a000fcf4: 0a000002 beq a000fd04 <imfs_dir_rmnod+0x40>
/*
* You cannot remove a mountpoint.
*/
if ( the_jnode->info.directory.mt_fs != NULL )
a000fcf8: e594505c ldr r5, [r4, #92] ; 0x5c
a000fcfc: e3550000 cmp r5, #0
a000fd00: 0a000004 beq a000fd18 <imfs_dir_rmnod+0x54>
rtems_set_errno_and_return_minus_one( EBUSY );
a000fd04: eb00015c bl a001027c <__errno> <== NOT EXECUTED
a000fd08: e3a03010 mov r3, #16 <== NOT EXECUTED
a000fd0c: e5803000 str r3, [r0] <== NOT EXECUTED
a000fd10: e3e00000 mvn r0, #0 <== NOT EXECUTED
a000fd14: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
IMFS_create_orphan( the_jnode );
a000fd18: e1a00004 mov r0, r4
a000fd1c: ebfff665 bl a000d6b8 <IMFS_create_orphan>
IMFS_check_node_remove( the_jnode );
a000fd20: e1a00004 mov r0, r4
a000fd24: ebfff674 bl a000d6fc <IMFS_check_node_remove>
return 0;
a000fd28: e1a00005 mov r0, r5
}
a000fd2c: e8bd8030 pop {r4, r5, pc}
a0007f14 <iproc>:
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
if (tty->termios.c_iflag & ISTRIP)
a0007f14: e5913030 ldr r3, [r1, #48] ; 0x30 <== NOT EXECUTED
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
a0007f18: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
if (tty->termios.c_iflag & ISTRIP)
a0007f1c: e3130020 tst r3, #32 <== NOT EXECUTED
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
a0007f20: e20050ff and r5, r0, #255 ; 0xff <== NOT EXECUTED
if (tty->termios.c_iflag & ISTRIP)
c &= 0x7f;
a0007f24: 1200507f andne r5, r0, #127 ; 0x7f <== NOT EXECUTED
if (tty->termios.c_iflag & IUCLC)
a0007f28: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
a0007f2c: e1a04001 mov r4, r1 <== NOT EXECUTED
if (tty->termios.c_iflag & ISTRIP)
c &= 0x7f;
if (tty->termios.c_iflag & IUCLC)
a0007f30: 0a000007 beq a0007f54 <iproc+0x40> <== NOT EXECUTED
c = tolower (c);
a0007f34: e59f2170 ldr r2, [pc, #368] ; a00080ac <iproc+0x198> <== NOT EXECUTED
a0007f38: e5922000 ldr r2, [r2] <== NOT EXECUTED
a0007f3c: e0822005 add r2, r2, r5 <== NOT EXECUTED
a0007f40: e5d22001 ldrb r2, [r2, #1] <== NOT EXECUTED
a0007f44: e2022003 and r2, r2, #3 <== NOT EXECUTED
a0007f48: e3520001 cmp r2, #1 <== NOT EXECUTED
a0007f4c: 02855020 addeq r5, r5, #32 <== NOT EXECUTED
a0007f50: e20550ff and r5, r5, #255 ; 0xff <== NOT EXECUTED
if (c == '\r') {
a0007f54: e355000d cmp r5, #13 <== NOT EXECUTED
a0007f58: 1a000005 bne a0007f74 <iproc+0x60> <== NOT EXECUTED
if (tty->termios.c_iflag & IGNCR)
a0007f5c: e3130080 tst r3, #128 ; 0x80 <== NOT EXECUTED
a0007f60: 1a00004b bne a0008094 <iproc+0x180> <== NOT EXECUTED
return 0;
if (tty->termios.c_iflag & ICRNL)
c = '\n';
a0007f64: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED
a0007f68: 03a0500d moveq r5, #13 <== NOT EXECUTED
a0007f6c: 13a0500a movne r5, #10 <== NOT EXECUTED
a0007f70: ea000007 b a0007f94 <iproc+0x80> <== NOT EXECUTED
} else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
a0007f74: e355000a cmp r5, #10 <== NOT EXECUTED
a0007f78: 1a000003 bne a0007f8c <iproc+0x78> <== NOT EXECUTED
c = '\r';
a0007f7c: e3130040 tst r3, #64 ; 0x40 <== NOT EXECUTED
a0007f80: 03a0500a moveq r5, #10 <== NOT EXECUTED
a0007f84: 13a0500d movne r5, #13 <== NOT EXECUTED
a0007f88: ea000001 b a0007f94 <iproc+0x80> <== NOT EXECUTED
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
a0007f8c: e3550000 cmp r5, #0 <== NOT EXECUTED
a0007f90: 0a00002e beq a0008050 <iproc+0x13c> <== NOT EXECUTED
a0007f94: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED
a0007f98: e3130002 tst r3, #2 <== NOT EXECUTED
a0007f9c: 0a00002b beq a0008050 <iproc+0x13c> <== NOT EXECUTED
if (c == tty->termios.c_cc[VERASE]) {
a0007fa0: e5d42043 ldrb r2, [r4, #67] ; 0x43 <== NOT EXECUTED
a0007fa4: e1520005 cmp r2, r5 <== NOT EXECUTED
erase (tty, 0);
a0007fa8: 01a00004 moveq r0, r4 <== NOT EXECUTED
a0007fac: 03a01000 moveq r1, #0 <== NOT EXECUTED
} else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
if (c == tty->termios.c_cc[VERASE]) {
a0007fb0: 0a000004 beq a0007fc8 <iproc+0xb4> <== NOT EXECUTED
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
a0007fb4: e5d42044 ldrb r2, [r4, #68] ; 0x44 <== NOT EXECUTED
a0007fb8: e1520005 cmp r2, r5 <== NOT EXECUTED
a0007fbc: 1a000003 bne a0007fd0 <iproc+0xbc> <== NOT EXECUTED
erase (tty, 1);
a0007fc0: e1a00004 mov r0, r4 <== NOT EXECUTED
a0007fc4: e3a01001 mov r1, #1 <== NOT EXECUTED
a0007fc8: ebffff5f bl a0007d4c <erase> <== NOT EXECUTED
a0007fcc: ea000030 b a0008094 <iproc+0x180> <== NOT EXECUTED
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
a0007fd0: e5d42045 ldrb r2, [r4, #69] ; 0x45 <== NOT EXECUTED
a0007fd4: e1520005 cmp r2, r5 <== NOT EXECUTED
a0007fd8: 0a00002f beq a000809c <iproc+0x188> <== NOT EXECUTED
return 1;
} else if (c == '\n') {
a0007fdc: e355000a cmp r5, #10 <== NOT EXECUTED
a0007fe0: 1a000009 bne a000800c <iproc+0xf8> <== NOT EXECUTED
if (tty->termios.c_lflag & (ECHO | ECHONL))
a0007fe4: e3130048 tst r3, #72 ; 0x48 <== NOT EXECUTED
a0007fe8: 0a000002 beq a0007ff8 <iproc+0xe4> <== NOT EXECUTED
echo (c, tty);
a0007fec: e1a00005 mov r0, r5 <== NOT EXECUTED
a0007ff0: e1a01004 mov r1, r4 <== NOT EXECUTED
a0007ff4: ebffff31 bl a0007cc0 <echo> <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
a0007ff8: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED
a0007ffc: e594201c ldr r2, [r4, #28] <== NOT EXECUTED
a0008000: e3a0100a mov r1, #10 <== NOT EXECUTED
a0008004: e7c21003 strb r1, [r2, r3] <== NOT EXECUTED
a0008008: ea00000d b a0008044 <iproc+0x130> <== NOT EXECUTED
return 1;
} else if ((c == tty->termios.c_cc[VEOL]) ||
a000800c: e5d4204c ldrb r2, [r4, #76] ; 0x4c <== NOT EXECUTED
a0008010: e1520005 cmp r2, r5 <== NOT EXECUTED
a0008014: 0a000002 beq a0008024 <iproc+0x110> <== NOT EXECUTED
a0008018: e5d42051 ldrb r2, [r4, #81] ; 0x51 <== NOT EXECUTED
a000801c: e1520005 cmp r2, r5 <== NOT EXECUTED
a0008020: 1a00000a bne a0008050 <iproc+0x13c> <== NOT EXECUTED
(c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
a0008024: e3130008 tst r3, #8 <== NOT EXECUTED
a0008028: 0a000002 beq a0008038 <iproc+0x124> <== NOT EXECUTED
echo (c, tty);
a000802c: e1a00005 mov r0, r5 <== NOT EXECUTED
a0008030: e1a01004 mov r1, r4 <== NOT EXECUTED
a0008034: ebffff21 bl a0007cc0 <echo> <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
a0008038: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED
a000803c: e594201c ldr r2, [r4, #28] <== NOT EXECUTED
a0008040: e7c25003 strb r5, [r2, r3] <== NOT EXECUTED
a0008044: e2833001 add r3, r3, #1 <== NOT EXECUTED
a0008048: e5843020 str r3, [r4, #32] <== NOT EXECUTED
a000804c: ea000012 b a000809c <iproc+0x188> <== NOT EXECUTED
}
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
a0008050: e59f3058 ldr r3, [pc, #88] ; a00080b0 <iproc+0x19c> <== NOT EXECUTED
a0008054: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED
a0008058: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED
a000805c: e2433001 sub r3, r3, #1 <== NOT EXECUTED
a0008060: e1520003 cmp r2, r3 <== NOT EXECUTED
a0008064: aa00000e bge a00080a4 <iproc+0x190> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO)
a0008068: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED
a000806c: e3130008 tst r3, #8 <== NOT EXECUTED
a0008070: 0a000002 beq a0008080 <iproc+0x16c> <== NOT EXECUTED
echo (c, tty);
a0008074: e1a00005 mov r0, r5 <== NOT EXECUTED
a0008078: e1a01004 mov r1, r4 <== NOT EXECUTED
a000807c: ebffff0f bl a0007cc0 <echo> <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
a0008080: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED
a0008084: e594201c ldr r2, [r4, #28] <== NOT EXECUTED
a0008088: e7c25003 strb r5, [r2, r3] <== NOT EXECUTED
a000808c: e2833001 add r3, r3, #1 <== NOT EXECUTED
a0008090: e5843020 str r3, [r4, #32] <== NOT EXECUTED
if (tty->termios.c_iflag & IUCLC)
c = tolower (c);
if (c == '\r') {
if (tty->termios.c_iflag & IGNCR)
return 0;
a0008094: e3a00000 mov r0, #0 <== NOT EXECUTED
a0008098: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
else if (c == tty->termios.c_cc[VKILL]) {
erase (tty, 1);
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
a000809c: e3a00001 mov r0, #1 <== NOT EXECUTED
a00080a0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
if (tty->ccount < (CBUFSIZE-1)) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
}
return 0;
a00080a4: e3a00000 mov r0, #0 <== NOT EXECUTED
}
a00080a8: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
a0024730 <kill>:
#if !defined(RTEMS_POSIX_API)
int kill( pid_t pid, int sig )
{
return 0;
}
a0024730: e3a00000 mov r0, #0 <== NOT EXECUTED
a0024734: e12fff1e bx lr <== NOT EXECUTED
a00087dc <lchown>:
int lchown(
const char *path,
uid_t owner,
gid_t group
)
{
a00087dc: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED
a00087e0: e1a02802 lsl r2, r2, #16 <== NOT EXECUTED
return _chown_helper( path, owner, group, false );
a00087e4: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED
a00087e8: e1a02822 lsr r2, r2, #16 <== NOT EXECUTED
a00087ec: e3a03000 mov r3, #0 <== NOT EXECUTED
a00087f0: eaffff05 b a000840c <_chown_helper> <== NOT EXECUTED
a0015294 <libc_wrapup>:
/*
* In case RTEMS is already down, don't do this. It could be
* dangerous.
*/
if (!_System_state_Is_up(_System_state_Get()))
a0015294: e59f3060 ldr r3, [pc, #96] ; a00152fc <libc_wrapup+0x68>
extern void _wrapup_reent(struct _reent *);
extern void _reclaim_reent(struct _reent *);
void libc_wrapup(void)
{
a0015298: e92d4030 push {r4, r5, lr}
/*
* In case RTEMS is already down, don't do this. It could be
* dangerous.
*/
if (!_System_state_Is_up(_System_state_Get()))
a001529c: e5933000 ldr r3, [r3]
a00152a0: e3530003 cmp r3, #3
a00152a4: 1a000013 bne a00152f8 <libc_wrapup+0x64>
/*
* This was already done if the user called exit() directly .
_wrapup_reent(0);
*/
if (_REENT != _global_impure_ptr) {
a00152a8: e59f3050 ldr r3, [pc, #80] ; a0015300 <libc_wrapup+0x6c>
a00152ac: e59f5050 ldr r5, [pc, #80] ; a0015304 <libc_wrapup+0x70>
a00152b0: e5934000 ldr r4, [r3]
a00152b4: e5953000 ldr r3, [r5]
a00152b8: e1530004 cmp r3, r4
a00152bc: 0a000002 beq a00152cc <libc_wrapup+0x38>
_wrapup_reent(_global_impure_ptr);
a00152c0: e1a00004 mov r0, r4
a00152c4: eb0001b4 bl a001599c <_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;
a00152c8: e5854000 str r4, [r5]
*
* Should this be changed to do *all* file streams?
* _fwalk (_REENT, fclose);
*/
fclose (stdin);
a00152cc: e59f4030 ldr r4, [pc, #48] ; a0015304 <libc_wrapup+0x70>
a00152d0: e5943000 ldr r3, [r4]
a00152d4: e5930004 ldr r0, [r3, #4]
a00152d8: ebffec35 bl a00103b4 <fclose>
fclose (stdout);
a00152dc: e5943000 ldr r3, [r4]
a00152e0: e5930008 ldr r0, [r3, #8]
a00152e4: ebffec32 bl a00103b4 <fclose>
fclose (stderr);
a00152e8: e5943000 ldr r3, [r4]
a00152ec: e593000c ldr r0, [r3, #12]
}
a00152f0: e8bd4030 pop {r4, r5, lr}
* _fwalk (_REENT, fclose);
*/
fclose (stdin);
fclose (stdout);
fclose (stderr);
a00152f4: eaffec2e b a00103b4 <fclose>
a00152f8: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
a0009760 <link>:
int link(
const char *existing,
const char *new
)
{
a0009760: e92d4070 push {r4, r5, r6, lr}
a0009764: e24dd034 sub sp, sp, #52 ; 0x34
a0009768: e1a06000 mov r6, r0
a000976c: e1a05001 mov r5, r1
/*
* Get the node we are linking to.
*/
result = rtems_filesystem_evaluate_path( existing, strlen( existing ),
a0009770: eb00368d bl a00171ac <strlen>
a0009774: e28d4018 add r4, sp, #24
a0009778: e3a03001 mov r3, #1
a000977c: e1a01000 mov r1, r0
a0009780: e58d3000 str r3, [sp]
a0009784: e1a00006 mov r0, r6
a0009788: e3a02000 mov r2, #0
a000978c: e1a03004 mov r3, r4
a0009790: ebfffe2f bl a0009054 <rtems_filesystem_evaluate_path>
0, &existing_loc, true );
if ( result != 0 )
a0009794: e3500000 cmp r0, #0
a0009798: 1a000028 bne a0009840 <link+0xe0>
/*
* Get the parent of the node we are creating.
*/
rtems_filesystem_get_start_loc( new, &i, &parent_loc );
a000979c: e28d6004 add r6, sp, #4
a00097a0: e1a00005 mov r0, r5
a00097a4: e28d1030 add r1, sp, #48 ; 0x30
a00097a8: e1a02006 mov r2, r6
a00097ac: eb00047d bl a000a9a8 <rtems_filesystem_get_start_loc>
result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start );
a00097b0: e59d3010 ldr r3, [sp, #16]
a00097b4: e59d0030 ldr r0, [sp, #48] ; 0x30
a00097b8: e1a01006 mov r1, r6
a00097bc: e5933004 ldr r3, [r3, #4]
a00097c0: e0850000 add r0, r5, r0
a00097c4: e28d202c add r2, sp, #44 ; 0x2c
a00097c8: e12fff33 blx r3
if ( result != 0 ) {
a00097cc: e3500000 cmp r0, #0
a00097d0: 0a000002 beq a00097e0 <link+0x80>
rtems_filesystem_freenode( &existing_loc );
a00097d4: e1a00004 mov r0, r4
a00097d8: ebfffec2 bl a00092e8 <rtems_filesystem_freenode> <== NOT EXECUTED
a00097dc: ea000017 b a0009840 <link+0xe0> <== NOT EXECUTED
/*
* Check to see if the caller is trying to link across file system
* boundaries.
*/
if ( parent_loc.mt_entry != existing_loc.mt_entry ) {
a00097e0: e59d3028 ldr r3, [sp, #40] ; 0x28
a00097e4: e59d2014 ldr r2, [sp, #20]
a00097e8: e1520003 cmp r2, r3
a00097ec: 0a000007 beq a0009810 <link+0xb0>
rtems_filesystem_freenode( &existing_loc );
a00097f0: e1a00004 mov r0, r4
a00097f4: ebfffebb bl a00092e8 <rtems_filesystem_freenode>
rtems_filesystem_freenode( &parent_loc );
a00097f8: e1a00006 mov r0, r6
a00097fc: ebfffeb9 bl a00092e8 <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( EXDEV );
a0009800: eb00299e bl a0013e80 <__errno>
a0009804: e3a03012 mov r3, #18
a0009808: e5803000 str r3, [r0]
a000980c: ea00000b b a0009840 <link+0xe0>
}
result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start );
a0009810: e59d3010 ldr r3, [sp, #16]
a0009814: e1a01006 mov r1, r6
a0009818: e59d202c ldr r2, [sp, #44] ; 0x2c
a000981c: e5933008 ldr r3, [r3, #8]
a0009820: e1a00004 mov r0, r4
a0009824: e12fff33 blx r3
a0009828: e1a05000 mov r5, r0
rtems_filesystem_freenode( &existing_loc );
a000982c: e1a00004 mov r0, r4
a0009830: ebfffeac bl a00092e8 <rtems_filesystem_freenode>
rtems_filesystem_freenode( &parent_loc );
a0009834: e1a00006 mov r0, r6
a0009838: ebfffeaa bl a00092e8 <rtems_filesystem_freenode>
return result;
a000983c: ea000000 b a0009844 <link+0xe4>
*/
result = rtems_filesystem_evaluate_path( existing, strlen( existing ),
0, &existing_loc, true );
if ( result != 0 )
return -1;
a0009840: e3e05000 mvn r5, #0
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
return result;
}
a0009844: e1a00005 mov r0, r5
a0009848: e28dd034 add sp, sp, #52 ; 0x34
a000984c: e8bd8070 pop {r4, r5, r6, pc}
a0015194 <lseek>:
{
rtems_libio_t *iop;
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
a0015194: e59fc0d4 ldr ip, [pc, #212] ; a0015270 <lseek+0xdc>
off_t lseek(
int fd,
off_t offset,
int whence
)
{
a0015198: e92d4870 push {r4, r5, r6, fp, lr}
rtems_libio_t *iop;
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
a001519c: e59cc000 ldr ip, [ip]
a00151a0: e150000c cmp r0, ip
a00151a4: 2a000006 bcs a00151c4 <lseek+0x30>
iop = rtems_libio_iop( fd );
a00151a8: e59fc0c4 ldr ip, [pc, #196] ; a0015274 <lseek+0xe0>
a00151ac: e3a04038 mov r4, #56 ; 0x38
a00151b0: e59cc000 ldr ip, [ip]
a00151b4: e024c490 mla r4, r0, r4, ip
rtems_libio_check_is_open(iop);
a00151b8: e5940014 ldr r0, [r4, #20]
a00151bc: e3100c01 tst r0, #256 ; 0x100
a00151c0: 1a000002 bne a00151d0 <lseek+0x3c>
a00151c4: ebffec2c bl a001027c <__errno> <== NOT EXECUTED
a00151c8: e3a03009 mov r3, #9 <== NOT EXECUTED
a00151cc: ea000015 b a0015228 <lseek+0x94> <== NOT EXECUTED
/*
* Now process the lseek().
*/
old_offset = iop->offset;
switch ( whence ) {
a00151d0: e3530001 cmp r3, #1
/*
* Now process the lseek().
*/
old_offset = iop->offset;
a00151d4: e284600c add r6, r4, #12
a00151d8: e8960060 ldm r6, {r5, r6}
switch ( whence ) {
a00151dc: 0a000006 beq a00151fc <lseek+0x68>
a00151e0: e3530002 cmp r3, #2
a00151e4: 0a000007 beq a0015208 <lseek+0x74>
a00151e8: e3530000 cmp r3, #0
a00151ec: 1a00000b bne a0015220 <lseek+0x8c>
case SEEK_SET:
iop->offset = offset;
a00151f0: e584100c str r1, [r4, #12]
a00151f4: e5842010 str r2, [r4, #16]
break;
a00151f8: ea00000e b a0015238 <lseek+0xa4>
case SEEK_CUR:
iop->offset += offset;
a00151fc: e091b005 adds fp, r1, r5
a0015200: e0a2c006 adc ip, r2, r6
a0015204: ea000002 b a0015214 <lseek+0x80>
break;
case SEEK_END:
iop->offset = iop->size + offset;
a0015208: e9941800 ldmib r4, {fp, ip}
a001520c: e09bb001 adds fp, fp, r1
a0015210: e0acc002 adc ip, ip, r2
a0015214: e584b00c str fp, [r4, #12]
a0015218: e584c010 str ip, [r4, #16]
break;
a001521c: ea000005 b a0015238 <lseek+0xa4>
default:
rtems_set_errno_and_return_minus_one( EINVAL );
a0015220: ebffec15 bl a001027c <__errno>
a0015224: e3a03016 mov r3, #22
a0015228: e5803000 str r3, [r0]
a001522c: e3e02000 mvn r2, #0
a0015230: e3e03000 mvn r3, #0
a0015234: ea00000a b a0015264 <lseek+0xd0>
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence );
a0015238: e5940020 ldr r0, [r4, #32]
a001523c: e590c014 ldr ip, [r0, #20]
a0015240: e1a00004 mov r0, r4
a0015244: e12fff3c blx ip
if ( status == (off_t) -1 )
a0015248: e3700001 cmn r0, #1
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence );
a001524c: e1a02000 mov r2, r0
a0015250: e1a03001 mov r3, r1
if ( status == (off_t) -1 )
a0015254: 1a000002 bne a0015264 <lseek+0xd0>
a0015258: e3710001 cmn r1, #1
iop->offset = old_offset;
a001525c: 0584500c streq r5, [r4, #12]
a0015260: 05846010 streq r6, [r4, #16]
/*
* So if the operation failed, we have to restore iop->offset.
*/
return status;
}
a0015264: e1a00002 mov r0, r2
a0015268: e1a01003 mov r1, r3
a001526c: e8bd8870 pop {r4, r5, r6, fp, pc}
a00081d8 <lstat>:
int _STAT_NAME(
const char *path,
struct stat *buf
)
{
a00081d8: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
a00081dc: e2515000 subs r5, r1, #0 <== NOT EXECUTED
int _STAT_NAME(
const char *path,
struct stat *buf
)
{
a00081e0: e24dd018 sub sp, sp, #24 <== NOT EXECUTED
a00081e4: e1a06000 mov r6, r0 <== NOT EXECUTED
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
a00081e8: 1a000003 bne a00081fc <lstat+0x24> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EFAULT );
a00081ec: eb002758 bl a0011f54 <__errno> <== NOT EXECUTED
a00081f0: e3a0300e mov r3, #14 <== NOT EXECUTED
a00081f4: e5803000 str r3, [r0] <== NOT EXECUTED
a00081f8: ea000015 b a0008254 <lstat+0x7c> <== NOT EXECUTED
status = rtems_filesystem_evaluate_path( path, strlen( path ),
a00081fc: eb002de4 bl a0013994 <strlen> <== NOT EXECUTED
a0008200: e28d4004 add r4, sp, #4 <== NOT EXECUTED
a0008204: e1a01000 mov r1, r0 <== NOT EXECUTED
a0008208: e3a02000 mov r2, #0 <== NOT EXECUTED
a000820c: e1a00006 mov r0, r6 <== NOT EXECUTED
a0008210: e1a03004 mov r3, r4 <== NOT EXECUTED
a0008214: e58d2000 str r2, [sp] <== NOT EXECUTED
a0008218: ebfffe61 bl a0007ba4 <rtems_filesystem_evaluate_path> <== NOT EXECUTED
0, &loc, _STAT_FOLLOW_LINKS );
if ( status != 0 )
a000821c: e2501000 subs r1, r0, #0 <== NOT EXECUTED
a0008220: 1a00000b bne a0008254 <lstat+0x7c> <== NOT EXECUTED
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( buf, 0, sizeof(struct stat) );
a0008224: e3a02048 mov r2, #72 ; 0x48 <== NOT EXECUTED
a0008228: e1a00005 mov r0, r5 <== NOT EXECUTED
a000822c: eb002bc4 bl a0013144 <memset> <== NOT EXECUTED
status = (*loc.handlers->fstat_h)( &loc, buf );
a0008230: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
a0008234: e1a01005 mov r1, r5 <== NOT EXECUTED
a0008238: e1a00004 mov r0, r4 <== NOT EXECUTED
a000823c: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED
a0008240: e12fff33 blx r3 <== NOT EXECUTED
a0008244: e1a05000 mov r5, r0 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
a0008248: e1a00004 mov r0, r4 <== NOT EXECUTED
a000824c: ebfffe84 bl a0007c64 <rtems_filesystem_freenode> <== NOT EXECUTED
return status;
a0008250: ea000000 b a0008258 <lstat+0x80> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EFAULT );
status = rtems_filesystem_evaluate_path( path, strlen( path ),
0, &loc, _STAT_FOLLOW_LINKS );
if ( status != 0 )
return -1;
a0008254: e3e05000 mvn r5, #0 <== NOT EXECUTED
status = (*loc.handlers->fstat_h)( &loc, buf );
rtems_filesystem_freenode( &loc );
return status;
}
a0008258: e1a00005 mov r0, r5 <== NOT EXECUTED
a000825c: e28dd018 add sp, sp, #24 <== NOT EXECUTED
a0008260: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
a0006444 <malloc_deferred_free>:
void malloc_deferred_free(
void *pointer
)
{
a0006444: e1a01000 mov r1, r0 <== 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 );
a0006448: e59f0000 ldr r0, [pc, #0] ; a0006450 <malloc_deferred_free+0xc><== NOT EXECUTED
a000644c: ea000e29 b a0009cf8 <_Chain_Append> <== NOT EXECUTED
a0006420 <malloc_deferred_frees_process>:
void malloc_deferred_frees_process(void)
{
a0006420: e52de004 push {lr} ; (str lr, [sp, #-4]!)
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)
a0006424: ea000000 b a000642c <malloc_deferred_frees_process+0xc>
free(to_be_freed);
a0006428: ebffff67 bl a00061cc <free> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
a000642c: e59f000c ldr r0, [pc, #12] ; a0006440 <malloc_deferred_frees_process+0x20>
a0006430: eb000e43 bl a0009d44 <_Chain_Get>
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)
a0006434: e3500000 cmp r0, #0
a0006438: 1afffffa bne a0006428 <malloc_deferred_frees_process+0x8>
free(to_be_freed);
}
a000643c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
a000a0a8 <malloc_info>:
int malloc_info(
Heap_Information_block *the_info
)
{
if ( !the_info )
a000a0a8: e2501000 subs r1, r0, #0 <== NOT EXECUTED
*/
int malloc_info(
Heap_Information_block *the_info
)
{
a000a0ac: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
if ( !the_info )
a000a0b0: 0a000004 beq a000a0c8 <malloc_info+0x20> <== NOT EXECUTED
return -1;
_Protected_heap_Get_information( RTEMS_Malloc_Heap, the_info );
a000a0b4: e59f3014 ldr r3, [pc, #20] ; a000a0d0 <malloc_info+0x28> <== NOT EXECUTED
a000a0b8: e5930000 ldr r0, [r3] <== NOT EXECUTED
a000a0bc: eb001763 bl a000fe50 <_Protected_heap_Get_information> <== NOT EXECUTED
return 0;
a000a0c0: e3a00000 mov r0, #0 <== NOT EXECUTED
a000a0c4: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
int malloc_info(
Heap_Information_block *the_info
)
{
if ( !the_info )
return -1;
a000a0c8: e3e00000 mvn r0, #0 <== NOT EXECUTED
_Protected_heap_Get_information( RTEMS_Malloc_Heap, the_info );
return 0;
}
a000a0cc: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a00063d0 <malloc_is_system_state_OK>:
rtems_chain_control RTEMS_Malloc_GC_list;
bool malloc_is_system_state_OK(void)
{
if ( _Thread_Dispatch_disable_level > 0 )
a00063d0: e59f3024 ldr r3, [pc, #36] ; a00063fc <malloc_is_system_state_OK+0x2c>
a00063d4: e5933000 ldr r3, [r3]
a00063d8: e3530000 cmp r3, #0
a00063dc: 1a000004 bne a00063f4 <malloc_is_system_state_OK+0x24>
return false;
if ( _ISR_Nest_level > 0 )
a00063e0: e59f3018 ldr r3, [pc, #24] ; a0006400 <malloc_is_system_state_OK+0x30>
#include "malloc_p.h"
rtems_chain_control RTEMS_Malloc_GC_list;
bool malloc_is_system_state_OK(void)
a00063e4: e5930000 ldr r0, [r3]
a00063e8: e2700001 rsbs r0, r0, #1
a00063ec: 33a00000 movcc r0, #0
a00063f0: e12fff1e bx lr
{
if ( _Thread_Dispatch_disable_level > 0 )
return false;
a00063f4: e3a00000 mov r0, #0 <== NOT EXECUTED
if ( _ISR_Nest_level > 0 )
return false;
return true;
}
a00063f8: e12fff1e bx lr <== NOT EXECUTED
a000a2b8 <malloc_report_statistics>:
#ifdef RTEMS_NEWLIB
#include "malloc_p.h"
void malloc_report_statistics(void)
{
malloc_report_statistics_with_plugin( NULL, printk_plugin );
a000a2b8: e59f1004 ldr r1, [pc, #4] ; a000a2c4 <malloc_report_statistics+0xc><== NOT EXECUTED
a000a2bc: e3a00000 mov r0, #0 <== NOT EXECUTED
a000a2c0: ea000000 b a000a2c8 <malloc_report_statistics_with_plugin> <== NOT EXECUTED
a000a2c8 <malloc_report_statistics_with_plugin>:
void malloc_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
a000a2c8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
rtems_malloc_statistics_t *s;
uintmax_t allocated;
s = &rtems_malloc_statistics;
allocated = s->lifetime_allocated - s->lifetime_freed;
a000a2cc: e59f40e8 ldr r4, [pc, #232] ; a000a3bc <malloc_report_statistics_with_plugin+0xf4><== NOT EXECUTED
void malloc_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
a000a2d0: e1a08000 mov r8, r0 <== NOT EXECUTED
"max:%"PRIu32"k (%"PRIu32"%%)"
" lifetime:%"PRIu32"k freed:%"PRIu32"k\n",
s->space_available / 1024,
allocated / 1024,
/* avoid float! */
(allocated * 100) / s->space_available,
a000a2d4: e3a07064 mov r7, #100 ; 0x64 <== NOT EXECUTED
void malloc_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
a000a2d8: e1a0a001 mov sl, r1 <== NOT EXECUTED
rtems_malloc_statistics_t *s;
uintmax_t allocated;
s = &rtems_malloc_statistics;
allocated = s->lifetime_allocated - s->lifetime_freed;
a000a2dc: e284301c add r3, r4, #28 <== NOT EXECUTED
a000a2e0: e893000c ldm r3, {r2, r3} <== NOT EXECUTED
a000a2e4: e2841024 add r1, r4, #36 ; 0x24 <== NOT EXECUTED
a000a2e8: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED
a000a2ec: e0522000 subs r2, r2, r0 <== NOT EXECUTED
a000a2f0: e0c33001 sbc r3, r3, r1 <== NOT EXECUTED
context,
"Malloc statistics\n"
" avail:%"PRIu32"k allocated:%"PRIu32"k (%"PRId32"%%) "
"max:%"PRIu32"k (%"PRIu32"%%)"
" lifetime:%"PRIu32"k freed:%"PRIu32"k\n",
s->space_available / 1024,
a000a2f4: e5946000 ldr r6, [r4] <== NOT EXECUTED
allocated / 1024,
/* avoid float! */
(allocated * 100) / s->space_available,
a000a2f8: e0810792 umull r0, r1, r2, r7 <== NOT EXECUTED
s = &rtems_malloc_statistics;
allocated = s->lifetime_allocated - s->lifetime_freed;
(*print)(
a000a2fc: e1a05522 lsr r5, r2, #10 <== NOT EXECUTED
void malloc_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
a000a300: e24dd020 sub sp, sp, #32 <== NOT EXECUTED
s = &rtems_malloc_statistics;
allocated = s->lifetime_allocated - s->lifetime_freed;
(*print)(
a000a304: e1a0c526 lsr ip, r6, #10 <== NOT EXECUTED
a000a308: e1a02006 mov r2, r6 <== NOT EXECUTED
a000a30c: e1855b03 orr r5, r5, r3, lsl #22 <== NOT EXECUTED
a000a310: e1a0b523 lsr fp, r3, #10 <== NOT EXECUTED
"max:%"PRIu32"k (%"PRIu32"%%)"
" lifetime:%"PRIu32"k freed:%"PRIu32"k\n",
s->space_available / 1024,
allocated / 1024,
/* avoid float! */
(allocated * 100) / s->space_available,
a000a314: e0211397 mla r1, r7, r3, r1 <== NOT EXECUTED
s = &rtems_malloc_statistics;
allocated = s->lifetime_allocated - s->lifetime_freed;
(*print)(
a000a318: e3a03000 mov r3, #0 <== NOT EXECUTED
a000a31c: e58dc01c str ip, [sp, #28] <== NOT EXECUTED
a000a320: eb005609 bl a001fb4c <__udivdi3> <== NOT EXECUTED
" lifetime:%"PRIu32"k freed:%"PRIu32"k\n",
s->space_available / 1024,
allocated / 1024,
/* avoid float! */
(allocated * 100) / s->space_available,
s->max_depth / 1024,
a000a324: e5949018 ldr r9, [r4, #24] <== NOT EXECUTED
s = &rtems_malloc_statistics;
allocated = s->lifetime_allocated - s->lifetime_freed;
(*print)(
a000a328: e98d0003 stmib sp, {r0, r1} <== NOT EXECUTED
a000a32c: e1a03529 lsr r3, r9, #10 <== NOT EXECUTED
a000a330: e1a01006 mov r1, r6 <== NOT EXECUTED
a000a334: e0000997 mul r0, r7, r9 <== NOT EXECUTED
a000a338: e58d300c str r3, [sp, #12] <== NOT EXECUTED
a000a33c: ebfff492 bl a000758c <__aeabi_uidiv> <== NOT EXECUTED
allocated / 1024,
/* avoid float! */
(allocated * 100) / s->space_available,
s->max_depth / 1024,
(s->max_depth * 100) / s->space_available,
(uint32_t) (s->lifetime_allocated / 1024),
a000a340: e594101c ldr r1, [r4, #28] <== NOT EXECUTED
a000a344: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED
s = &rtems_malloc_statistics;
allocated = s->lifetime_allocated - s->lifetime_freed;
(*print)(
a000a348: e58d0010 str r0, [sp, #16] <== NOT EXECUTED
/* avoid float! */
(allocated * 100) / s->space_available,
s->max_depth / 1024,
(s->max_depth * 100) / s->space_available,
(uint32_t) (s->lifetime_allocated / 1024),
(uint32_t) (s->lifetime_freed / 1024)
a000a34c: e5940024 ldr r0, [r4, #36] ; 0x24 <== NOT EXECUTED
allocated / 1024,
/* avoid float! */
(allocated * 100) / s->space_available,
s->max_depth / 1024,
(s->max_depth * 100) / s->space_available,
(uint32_t) (s->lifetime_allocated / 1024),
a000a350: e1a03521 lsr r3, r1, #10 <== NOT EXECUTED
(uint32_t) (s->lifetime_freed / 1024)
a000a354: e5941028 ldr r1, [r4, #40] ; 0x28 <== NOT EXECUTED
allocated / 1024,
/* avoid float! */
(allocated * 100) / s->space_available,
s->max_depth / 1024,
(s->max_depth * 100) / s->space_available,
(uint32_t) (s->lifetime_allocated / 1024),
a000a358: e1833b02 orr r3, r3, r2, lsl #22 <== NOT EXECUTED
s = &rtems_malloc_statistics;
allocated = s->lifetime_allocated - s->lifetime_freed;
(*print)(
a000a35c: e59dc01c ldr ip, [sp, #28] <== NOT EXECUTED
a000a360: e58d3014 str r3, [sp, #20] <== NOT EXECUTED
/* avoid float! */
(allocated * 100) / s->space_available,
s->max_depth / 1024,
(s->max_depth * 100) / s->space_available,
(uint32_t) (s->lifetime_allocated / 1024),
(uint32_t) (s->lifetime_freed / 1024)
a000a364: e1a03520 lsr r3, r0, #10 <== NOT EXECUTED
a000a368: e1833b01 orr r3, r3, r1, lsl #22 <== NOT EXECUTED
s = &rtems_malloc_statistics;
allocated = s->lifetime_allocated - s->lifetime_freed;
(*print)(
a000a36c: e58d3018 str r3, [sp, #24] <== NOT EXECUTED
a000a370: e1a0200c mov r2, ip <== NOT EXECUTED
a000a374: e1a03005 mov r3, r5 <== NOT EXECUTED
a000a378: e1a00008 mov r0, r8 <== NOT EXECUTED
a000a37c: e59f103c ldr r1, [pc, #60] ; a000a3c0 <malloc_report_statistics_with_plugin+0xf8><== NOT EXECUTED
a000a380: e58db000 str fp, [sp] <== NOT EXECUTED
a000a384: e12fff3a blx sl <== NOT EXECUTED
s->max_depth / 1024,
(s->max_depth * 100) / s->space_available,
(uint32_t) (s->lifetime_allocated / 1024),
(uint32_t) (s->lifetime_freed / 1024)
);
(*print)(
a000a388: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
a000a38c: e1a00008 mov r0, r8 <== NOT EXECUTED
a000a390: e59f102c ldr r1, [pc, #44] ; a000a3c4 <malloc_report_statistics_with_plugin+0xfc><== NOT EXECUTED
a000a394: e58d3000 str r3, [sp] <== NOT EXECUTED
a000a398: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED
a000a39c: e5942004 ldr r2, [r4, #4] <== NOT EXECUTED
a000a3a0: e58d3004 str r3, [sp, #4] <== NOT EXECUTED
a000a3a4: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED
a000a3a8: e58d3008 str r3, [sp, #8] <== NOT EXECUTED
a000a3ac: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
a000a3b0: e12fff3a blx sl <== NOT EXECUTED
s->memalign_calls,
s->free_calls,
s->realloc_calls,
s->calloc_calls
);
}
a000a3b4: e28dd020 add sp, sp, #32 <== NOT EXECUTED
a000a3b8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
a00068f4 <malloc_sbrk_extend_and_allocate>:
* 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;
a00068f4: e59f30a0 ldr r3, [pc, #160] ; a000699c <malloc_sbrk_extend_and_allocate+0xa8>
}
void *malloc_sbrk_extend_and_allocate(
size_t size
)
{
a00068f8: e92d40f0 push {r4, r5, r6, r7, lr}
* 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;
a00068fc: e5934000 ldr r4, [r3]
}
void *malloc_sbrk_extend_and_allocate(
size_t size
)
{
a0006900: e1a05000 mov r5, r0
* in "page" amounts.
*/
sbrk_amount = RTEMS_Malloc_Sbrk_amount;
if ( sbrk_amount == 0 )
a0006904: e3540000 cmp r4, #0
a0006908: 0a00001f beq a000698c <malloc_sbrk_extend_and_allocate+0x98>
return (void *) 0;
the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount);
a000690c: e1a01004 mov r1, r4
a0006910: e0800004 add r0, r0, r4
a0006914: eb003571 bl a0013ee0 <__aeabi_uidiv>
a0006918: e0040490 mul r4, r0, r4
starting_address = (void *) sbrk(the_size);
a000691c: e1a00004 mov r0, r4
a0006920: ebfff86b bl a0004ad4 <sbrk>
if ( starting_address == (void*) -1 )
a0006924: e3700001 cmn r0, #1
if ( sbrk_amount == 0 )
return (void *) 0;
the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount);
starting_address = (void *) sbrk(the_size);
a0006928: e1a01000 mov r1, r0
if ( starting_address == (void*) -1 )
a000692c: 0a000018 beq a0006994 <malloc_sbrk_extend_and_allocate+0xa0>
return (void *) 0;
if ( !_Protected_heap_Extend(
a0006930: e59f6068 ldr r6, [pc, #104] ; a00069a0 <malloc_sbrk_extend_and_allocate+0xac>
a0006934: e1a02004 mov r2, r4
a0006938: e5960000 ldr r0, [r6]
a000693c: eb0011d2 bl a000b08c <_Protected_heap_Extend>
a0006940: e2507000 subs r7, r0, #0
a0006944: 1a000006 bne a0006964 <malloc_sbrk_extend_and_allocate+0x70>
RTEMS_Malloc_Heap, starting_address, the_size) ) {
sbrk(-the_size);
a0006948: e2640000 rsb r0, r4, #0
a000694c: ebfff860 bl a0004ad4 <sbrk>
errno = ENOMEM;
a0006950: eb0027ca bl a0010880 <__errno>
a0006954: e3a0300c mov r3, #12
a0006958: e5803000 str r3, [r0]
return (void *) 0;
a000695c: e1a00007 mov r0, r7
a0006960: e8bd80f0 pop {r4, r5, r6, r7, pc}
}
MSBUMP(space_available, the_size);
a0006964: e59f3038 ldr r3, [pc, #56] ; a00069a4 <malloc_sbrk_extend_and_allocate+0xb0>
a0006968: e5960000 ldr r0, [r6]
a000696c: e1a01005 mov r1, r5
a0006970: e5932000 ldr r2, [r3]
a0006974: e0844002 add r4, r4, r2
a0006978: e3a02000 mov r2, #0
a000697c: e5834000 str r4, [r3]
a0006980: e1a03002 mov r3, r2
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
return return_this;
}
a0006984: e8bd40f0 pop {r4, r5, r6, r7, lr}
a0006988: ea0011ac b a000b040 <_Protected_heap_Allocate_aligned_with_boundary>
*/
sbrk_amount = RTEMS_Malloc_Sbrk_amount;
if ( sbrk_amount == 0 )
return (void *) 0;
a000698c: e1a00004 mov r0, r4 <== NOT EXECUTED
a0006990: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount);
starting_address = (void *) sbrk(the_size);
if ( starting_address == (void*) -1 )
return (void *) 0;
a0006994: e3a00000 mov r0, #0
MSBUMP(space_available, the_size);
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
return return_this;
}
a0006998: e8bd80f0 pop {r4, r5, r6, r7, pc}
a00069a8 <malloc_sbrk_initialize>:
)
{
uintptr_t old_address;
uintptr_t uaddress;
RTEMS_Malloc_Sbrk_amount = length;
a00069a8: e59f3034 ldr r3, [pc, #52] ; a00069e4 <malloc_sbrk_initialize+0x3c>
* 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) {
a00069ac: e3500000 cmp r0, #0
void *malloc_sbrk_initialize(
void *starting_address,
size_t length
)
{
a00069b0: e52de004 push {lr} ; (str lr, [sp, #-4]!)
uintptr_t old_address;
uintptr_t uaddress;
RTEMS_Malloc_Sbrk_amount = length;
a00069b4: e5831000 str r1, [r3]
* 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) {
a00069b8: 149df004 popne {pc} ; (ldrne pc, [sp], #4)
uaddress = (uintptr_t)sbrk(length);
a00069bc: e1a00001 mov r0, r1
a00069c0: ebfff843 bl a0004ad4 <sbrk>
if (uaddress == (uintptr_t) -1) {
a00069c4: e3700001 cmn r0, #1
a00069c8: 1a000001 bne a00069d4 <malloc_sbrk_initialize+0x2c>
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
a00069cc: e280001b add r0, r0, #27
a00069d0: eb000cf4 bl a0009da8 <rtems_fatal_error_occurred>
/* DOES NOT RETURN!!! */
}
if (uaddress & (CPU_HEAP_ALIGNMENT-1)) {
a00069d4: e3100007 tst r0, #7 <== NOT EXECUTED
old_address = uaddress;
uaddress = (uaddress + CPU_HEAP_ALIGNMENT) & ~(CPU_HEAP_ALIGNMENT-1);
a00069d8: 12800008 addne r0, r0, #8 <== NOT EXECUTED
a00069dc: 13c00007 bicne r0, r0, #7 <== NOT EXECUTED
}
starting_address = (void *)uaddress;
}
return starting_address;
}
a00069e0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a00069e8 <malloc_set_heap_pointer>:
void malloc_set_heap_pointer(
Heap_Control *new_heap
)
{
RTEMS_Malloc_Heap = new_heap;
a00069e8: e59f3004 ldr r3, [pc, #4] ; a00069f4 <malloc_set_heap_pointer+0xc><== NOT EXECUTED
a00069ec: e5830000 str r0, [r3] <== NOT EXECUTED
}
a00069f0: e12fff1e bx lr <== NOT EXECUTED
a000a48c <malloc_walk>:
#include <stdlib.h>
void malloc_walk(size_t source, size_t printf_enabled)
{
_Protected_heap_Walk( RTEMS_Malloc_Heap, (int) source, printf_enabled );
a000a48c: e2512000 subs r2, r1, #0 <== NOT EXECUTED
a000a490: 13a02001 movne r2, #1 <== NOT EXECUTED
a000a494: e59f100c ldr r1, [pc, #12] ; a000a4a8 <malloc_walk+0x1c> <== NOT EXECUTED
#include "malloc_p.h"
#include <stdlib.h>
void malloc_walk(size_t source, size_t printf_enabled)
{
a000a498: e1a03000 mov r3, r0 <== NOT EXECUTED
_Protected_heap_Walk( RTEMS_Malloc_Heap, (int) source, printf_enabled );
a000a49c: e5910000 ldr r0, [r1] <== NOT EXECUTED
a000a4a0: e1a01003 mov r1, r3 <== NOT EXECUTED
a000a4a4: ea001695 b a000ff00 <_Protected_heap_Walk> <== NOT EXECUTED
a000f228 <memfile_free_block>:
* Free a block from an in-memory file.
*/
void memfile_free_block(
void *memory
)
{
a000f228: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
free(memory);
a000f22c: ebffdbe6 bl a00061cc <free> <== NOT EXECUTED
memfile_blocks_allocated--;
a000f230: e59f300c ldr r3, [pc, #12] ; a000f244 <memfile_free_block+0x1c><== NOT EXECUTED
a000f234: e5932000 ldr r2, [r3] <== NOT EXECUTED
a000f238: e2422001 sub r2, r2, #1 <== NOT EXECUTED
a000f23c: e5832000 str r2, [r3] <== NOT EXECUTED
}
a000f240: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a000f248 <memfile_free_blocks_in_table>:
*/
void memfile_free_blocks_in_table(
block_p **block_table,
int entries
)
{
a000f248: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
/*
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
a000f24c: e3a05000 mov r5, #0 <== NOT EXECUTED
*/
void memfile_free_blocks_in_table(
block_p **block_table,
int entries
)
{
a000f250: e1a04000 mov r4, r0 <== NOT EXECUTED
a000f254: e1a08001 mov r8, r1 <== NOT EXECUTED
/*
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
a000f258: e5906000 ldr r6, [r0] <== NOT EXECUTED
if ( b[i] ) {
memfile_free_block( b[i] );
b[i] = 0;
a000f25c: e1a07005 mov r7, r5 <== NOT EXECUTED
/*
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
a000f260: ea000005 b a000f27c <memfile_free_blocks_in_table+0x34> <== NOT EXECUTED
if ( b[i] ) {
a000f264: e4960004 ldr r0, [r6], #4 <== NOT EXECUTED
a000f268: e3500000 cmp r0, #0 <== NOT EXECUTED
a000f26c: 0a000001 beq a000f278 <memfile_free_blocks_in_table+0x30> <== NOT EXECUTED
memfile_free_block( b[i] );
a000f270: ebffffec bl a000f228 <memfile_free_block> <== NOT EXECUTED
b[i] = 0;
a000f274: e5067004 str r7, [r6, #-4] <== NOT EXECUTED
/*
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
a000f278: e2855001 add r5, r5, #1 <== NOT EXECUTED
a000f27c: e1550008 cmp r5, r8 <== NOT EXECUTED
a000f280: bafffff7 blt a000f264 <memfile_free_blocks_in_table+0x1c> <== NOT EXECUTED
/*
* Now that all the blocks in the block table are free, we can
* free the block table itself.
*/
memfile_free_block( *block_table );
a000f284: e5940000 ldr r0, [r4] <== NOT EXECUTED
a000f288: ebffffe6 bl a000f228 <memfile_free_block> <== NOT EXECUTED
*block_table = 0;
a000f28c: e3a03000 mov r3, #0 <== NOT EXECUTED
a000f290: e5843000 str r3, [r4] <== NOT EXECUTED
}
a000f294: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
a000f770 <memfile_ftruncate>:
*/
int memfile_ftruncate(
rtems_libio_t *iop,
rtems_off64_t length
)
{
a000f770: e92d4013 push {r0, r1, r4, lr}
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
a000f774: e5904018 ldr r4, [r0, #24]
* POSIX 1003.1b does not specify what happens if you truncate a file
* and the new length is greater than the current size. We treat this
* as an extend operation.
*/
if ( length > the_jnode->info.file.size )
a000f778: e5943054 ldr r3, [r4, #84] ; 0x54
a000f77c: e1530002 cmp r3, r2
a000f780: ba000003 blt a000f794 <memfile_ftruncate+0x24>
a000f784: 1a000005 bne a000f7a0 <memfile_ftruncate+0x30>
a000f788: e5943050 ldr r3, [r4, #80] ; 0x50
a000f78c: e1530001 cmp r3, r1
a000f790: 2a000002 bcs a000f7a0 <memfile_ftruncate+0x30>
return IMFS_memfile_extend( the_jnode, length );
a000f794: e1a00004 mov r0, r4 <== NOT EXECUTED
a000f798: ebffff0e bl a000f3d8 <IMFS_memfile_extend> <== NOT EXECUTED
a000f79c: ea000008 b a000f7c4 <memfile_ftruncate+0x54> <== NOT EXECUTED
/*
* The in-memory files do not currently reclaim memory until the file is
* deleted. So we leave the previously allocated blocks in place for
* future use and just set the length.
*/
the_jnode->info.file.size = length;
a000f7a0: e5841050 str r1, [r4, #80] ; 0x50
a000f7a4: e5842054 str r2, [r4, #84] ; 0x54
iop->size = the_jnode->info.file.size;
a000f7a8: e9800006 stmib r0, {r1, r2}
IMFS_update_atime( the_jnode );
a000f7ac: e3a01000 mov r1, #0
a000f7b0: e1a0000d mov r0, sp
a000f7b4: ebffdab9 bl a00062a0 <gettimeofday>
a000f7b8: e59d3000 ldr r3, [sp]
return 0;
a000f7bc: e3a00000 mov r0, #0
* future use and just set the length.
*/
the_jnode->info.file.size = length;
iop->size = the_jnode->info.file.size;
IMFS_update_atime( the_jnode );
a000f7c0: e5843040 str r3, [r4, #64] ; 0x40
return 0;
}
a000f7c4: e8bd801c pop {r2, r3, r4, pc}
a000edb8 <memfile_ioctl>:
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
return 0;
}
a000edb8: e3a00000 mov r0, #0 <== NOT EXECUTED
a000edbc: e12fff1e bx lr <== NOT EXECUTED
a000f7c8 <memfile_lseek>:
rtems_off64_t memfile_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
a000f7c8: e92d4030 push {r4, r5, lr}
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
a000f7cc: e5905018 ldr r5, [r0, #24]
rtems_off64_t memfile_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
a000f7d0: e1a04000 mov r4, r0
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
if (the_jnode->type == IMFS_LINEAR_FILE) {
a000f7d4: e595304c ldr r3, [r5, #76] ; 0x4c
a000f7d8: e3530006 cmp r3, #6
a000f7dc: 1a00000b bne a000f810 <memfile_lseek+0x48>
if (iop->offset > the_jnode->info.linearfile.size)
a000f7e0: e5953054 ldr r3, [r5, #84] ; 0x54
a000f7e4: e5901010 ldr r1, [r0, #16]
a000f7e8: e5952050 ldr r2, [r5, #80] ; 0x50
a000f7ec: e1510003 cmp r1, r3
a000f7f0: ca000003 bgt a000f804 <memfile_lseek+0x3c>
a000f7f4: 1a000014 bne a000f84c <memfile_lseek+0x84>
a000f7f8: e590100c ldr r1, [r0, #12]
a000f7fc: e1510002 cmp r1, r2
a000f800: 9a000011 bls a000f84c <memfile_lseek+0x84>
iop->offset = the_jnode->info.linearfile.size;
a000f804: e584200c str r2, [r4, #12] <== NOT EXECUTED
a000f808: e5843010 str r3, [r4, #16] <== NOT EXECUTED
a000f80c: ea00000e b a000f84c <memfile_lseek+0x84> <== NOT EXECUTED
}
else { /* Must be a block file (IMFS_MEMORY_FILE). */
if (IMFS_memfile_extend( the_jnode, iop->offset ))
a000f810: e1a00005 mov r0, r5
a000f814: e284200c add r2, r4, #12
a000f818: e8920006 ldm r2, {r1, r2}
a000f81c: ebfffeed bl a000f3d8 <IMFS_memfile_extend>
a000f820: e3500000 cmp r0, #0
a000f824: 0a000005 beq a000f840 <memfile_lseek+0x78>
rtems_set_errno_and_return_minus_one( ENOSPC );
a000f828: eb000293 bl a001027c <__errno> <== NOT EXECUTED
a000f82c: e3a0301c mov r3, #28 <== NOT EXECUTED
a000f830: e5803000 str r3, [r0] <== NOT EXECUTED
a000f834: e3e04000 mvn r4, #0 <== NOT EXECUTED
a000f838: e3e03000 mvn r3, #0 <== NOT EXECUTED
a000f83c: ea000004 b a000f854 <memfile_lseek+0x8c> <== NOT EXECUTED
iop->size = the_jnode->info.file.size;
a000f840: e2853050 add r3, r5, #80 ; 0x50
a000f844: e893000c ldm r3, {r2, r3}
a000f848: e984000c stmib r4, {r2, r3}
}
return iop->offset;
a000f84c: e284400c add r4, r4, #12
a000f850: e8940018 ldm r4, {r3, r4}
}
a000f854: e1a00003 mov r0, r3
a000f858: e1a01004 mov r1, r4
a000f85c: e8bd8030 pop {r4, r5, pc}
a000f6d4 <memfile_open>:
the_jnode = iop->pathinfo.node_access;
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
a000f6d4: e5903014 ldr r3, [r0, #20]
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
a000f6d8: e92d4031 push {r0, r4, r5, lr}
the_jnode = iop->pathinfo.node_access;
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
a000f6dc: e3130f81 tst r3, #516 ; 0x204
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
a000f6e0: e1a05000 mov r5, r0
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
a000f6e4: e5904018 ldr r4, [r0, #24]
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
a000f6e8: 0a000015 beq a000f744 <memfile_open+0x70>
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
a000f6ec: e594304c ldr r3, [r4, #76] ; 0x4c
a000f6f0: e3530006 cmp r3, #6
a000f6f4: 1a000012 bne a000f744 <memfile_open+0x70>
uint32_t count = the_jnode->info.linearfile.size;
a000f6f8: e594c050 ldr ip, [r4, #80] ; 0x50 <== NOT EXECUTED
const unsigned char *buffer = the_jnode->info.linearfile.direct;
the_jnode->type = IMFS_MEMORY_FILE;
the_jnode->info.file.size = 0;
the_jnode->info.file.indirect = 0;
a000f6fc: e3a00000 mov r0, #0 <== 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;
a000f700: e3a02005 mov r2, #5 <== NOT EXECUTED
a000f704: e584204c str r2, [r4, #76] ; 0x4c <== NOT EXECUTED
the_jnode->info.file.size = 0;
a000f708: e3a01000 mov r1, #0 <== NOT EXECUTED
a000f70c: e3a02000 mov r2, #0 <== NOT EXECUTED
the_jnode->info.file.indirect = 0;
the_jnode->info.file.doubly_indirect = 0;
the_jnode->info.file.triply_indirect = 0;
if ((count != 0)
a000f710: e15c0000 cmp ip, r0 <== 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;
a000f714: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED
the_jnode->type = IMFS_MEMORY_FILE;
the_jnode->info.file.size = 0;
a000f718: e5841050 str r1, [r4, #80] ; 0x50 <== NOT EXECUTED
a000f71c: e5842054 str r2, [r4, #84] ; 0x54 <== NOT EXECUTED
the_jnode->info.file.indirect = 0;
a000f720: e5840058 str r0, [r4, #88] ; 0x58 <== NOT EXECUTED
the_jnode->info.file.doubly_indirect = 0;
a000f724: e584005c str r0, [r4, #92] ; 0x5c <== NOT EXECUTED
the_jnode->info.file.triply_indirect = 0;
a000f728: e5840060 str r0, [r4, #96] ; 0x60 <== NOT EXECUTED
if ((count != 0)
a000f72c: 0a000004 beq a000f744 <memfile_open+0x70> <== NOT EXECUTED
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
a000f730: e1a00004 mov r0, r4 <== NOT EXECUTED
a000f734: e58dc000 str ip, [sp] <== NOT EXECUTED
a000f738: ebffff6d bl a000f4f4 <IMFS_memfile_write> <== NOT EXECUTED
a000f73c: e3700001 cmn r0, #1 <== NOT EXECUTED
a000f740: 0a000009 beq a000f76c <memfile_open+0x98> <== NOT EXECUTED
return -1;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
a000f744: e5953014 ldr r3, [r5, #20]
a000f748: e3130c02 tst r3, #512 ; 0x200
iop->offset = the_jnode->info.file.size;
a000f74c: 12843050 addne r3, r4, #80 ; 0x50
a000f750: 1893000c ldmne r3, {r2, r3}
a000f754: 1585200c strne r2, [r5, #12]
a000f758: 15853010 strne r3, [r5, #16]
iop->size = the_jnode->info.file.size;
a000f75c: e2844050 add r4, r4, #80 ; 0x50
a000f760: e8940018 ldm r4, {r3, r4}
a000f764: e9850018 stmib r5, {r3, r4}
return 0;
a000f768: e3a00000 mov r0, #0
}
a000f76c: e8bd8038 pop {r3, r4, r5, pc}
a0006648 <mknod>:
int mknod(
const char *pathname,
mode_t mode,
dev_t dev
)
{
a0006648: e92d41f0 push {r4, r5, r6, r7, r8, lr}
rtems_filesystem_location_info_t temp_loc;
int i;
const char *name_start;
int result;
if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) )
a000664c: e3110a0f tst r1, #61440 ; 0xf000
int mknod(
const char *pathname,
mode_t mode,
dev_t dev
)
{
a0006650: e24dd020 sub sp, sp, #32
a0006654: e1a06000 mov r6, r0
a0006658: e1a05001 mov r5, r1
a000665c: e1a07002 mov r7, r2
a0006660: e1a08003 mov r8, r3
rtems_filesystem_location_info_t temp_loc;
int i;
const char *name_start;
int result;
if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) )
a0006664: 1a000003 bne a0006678 <mknod+0x30>
rtems_set_errno_and_return_minus_one( EINVAL );
a0006668: eb002703 bl a001027c <__errno> <== NOT EXECUTED
a000666c: e3a03016 mov r3, #22 <== NOT EXECUTED
a0006670: e5803000 str r3, [r0] <== NOT EXECUTED
a0006674: ea000018 b a00066dc <mknod+0x94> <== NOT EXECUTED
rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
a0006678: e28d4004 add r4, sp, #4
a000667c: e28d101c add r1, sp, #28
a0006680: e1a02004 mov r2, r4
a0006684: eb000244 bl a0006f9c <rtems_filesystem_get_start_loc>
result = (*temp_loc.ops->evalformake_h)(
a0006688: e59d3010 ldr r3, [sp, #16]
a000668c: e59d001c ldr r0, [sp, #28]
a0006690: e1a01004 mov r1, r4
a0006694: e5933004 ldr r3, [r3, #4]
a0006698: e0860000 add r0, r6, r0
a000669c: e28d2018 add r2, sp, #24
a00066a0: e12fff33 blx r3
&pathname[i],
&temp_loc,
&name_start
);
if ( result != 0 )
a00066a4: e3500000 cmp r0, #0
a00066a8: 1a00000b bne a00066dc <mknod+0x94>
return -1;
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
a00066ac: e59d3010 ldr r3, [sp, #16]
a00066b0: e58d4000 str r4, [sp]
a00066b4: e1a01005 mov r1, r5
a00066b8: e593c014 ldr ip, [r3, #20]
a00066bc: e59d0018 ldr r0, [sp, #24]
a00066c0: e1a02007 mov r2, r7
a00066c4: e1a03008 mov r3, r8
a00066c8: e12fff3c blx ip
a00066cc: e1a05000 mov r5, r0
rtems_filesystem_freenode( &temp_loc );
a00066d0: e1a00004 mov r0, r4
a00066d4: ebfffeb7 bl a00061b8 <rtems_filesystem_freenode>
return result;
a00066d8: ea000000 b a00066e0 <mknod+0x98>
&pathname[i],
&temp_loc,
&name_start
);
if ( result != 0 )
return -1;
a00066dc: e3e05000 mvn r5, #0
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
rtems_filesystem_freenode( &temp_loc );
return result;
}
a00066e0: e1a00005 mov r0, r5
a00066e4: e28dd020 add sp, sp, #32
a00066e8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
a000677c <mount>:
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
a000677c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
a0006780: e3530001 cmp r3, #1
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
a0006784: e24dd02c sub sp, sp, #44 ; 0x2c
a0006788: e1a06000 mov r6, r0
a000678c: e1a0b001 mov fp, r1
a0006790: e1a0a002 mov sl, r2
a0006794: e58d300c str r3, [sp, #12]
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
a0006798: 8a000004 bhi a00067b0 <mount+0x34>
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* Get mount handler
*/
mount_h = rtems_filesystem_get_mount_handler( filesystemtype );
a000679c: e1a00002 mov r0, r2
a00067a0: eb001d56 bl a000dd00 <rtems_filesystem_get_mount_handler>
if ( !mount_h )
a00067a4: e3500000 cmp r0, #0
a00067a8: e58d0014 str r0, [sp, #20]
a00067ac: 1a000002 bne a00067bc <mount+0x40>
rtems_set_errno_and_return_minus_one( EINVAL );
a00067b0: eb0026b1 bl a001027c <__errno>
a00067b4: e3a03016 mov r3, #22
a00067b8: ea00003b b a00068ac <mount+0x130>
const char *target_or_null,
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
a00067bc: e59f3260 ldr r3, [pc, #608] ; a0006a24 <mount+0x2a8>
{
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;
a00067c0: e25b5000 subs r5, fp, #0
a00067c4: 13a05001 movne r5, #1
const char *target_or_null,
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
a00067c8: e3550000 cmp r5, #0
a00067cc: 11a0300b movne r3, fp
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
a00067d0: e1a0000a mov r0, sl
const char *target_or_null,
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
a00067d4: e58d3004 str r3, [sp, #4]
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
a00067d8: eb002a91 bl a0011224 <strlen>
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
a00067dc: e3560000 cmp r6, #0
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;
a00067e0: e2809001 add r9, r0, #1
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
a00067e4: 01a07006 moveq r7, r6
a00067e8: 0a000002 beq a00067f8 <mount+0x7c>
a00067ec: e1a00006 mov r0, r6
a00067f0: eb002a8b bl a0011224 <strlen>
a00067f4: e2807001 add r7, r0, #1
size_t target_size = strlen( target ) + 1;
a00067f8: e59d0004 ldr r0, [sp, #4]
a00067fc: eb002a88 bl a0011224 <strlen>
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_size;
a0006800: e2891074 add r1, r9, #116 ; 0x74
{
const char *target = target_or_null != NULL ? target_or_null : "/";
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
size_t target_size = strlen( target ) + 1;
a0006804: e2803001 add r3, r0, #1
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_size;
a0006808: e0811007 add r1, r1, r7
{
const char *target = target_or_null != NULL ? target_or_null : "/";
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
size_t target_size = strlen( target ) + 1;
a000680c: e58d0010 str r0, [sp, #16]
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 );
a0006810: e0811003 add r1, r1, r3
a0006814: e3a00001 mov r0, #1
{
const char *target = target_or_null != NULL ? target_or_null : "/";
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
size_t target_size = strlen( target ) + 1;
a0006818: e58d3008 str r3, [sp, #8]
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 );
a000681c: ebfffe05 bl a0006038 <calloc>
if ( mt_entry != NULL ) {
a0006820: e2504000 subs r4, r0, #0
a0006824: 0a00001e beq a00068a4 <mount+0x128>
char *str = (char *) mt_entry + sizeof( *mt_entry );
a0006828: e2848074 add r8, r4, #116 ; 0x74
memcpy( str, filesystemtype, filesystemtype_size );
a000682c: e1a00008 mov r0, r8
a0006830: e1a0100a mov r1, sl
a0006834: e1a02009 mov r2, r9
a0006838: eb0028bd bl a0010b34 <memcpy>
mt_entry->type = str;
a000683c: e584806c str r8, [r4, #108] ; 0x6c
str += filesystemtype_size;
a0006840: e0888009 add r8, r8, r9
memcpy( str, source_or_null, source_size );
a0006844: e1a00008 mov r0, r8
a0006848: e1a01006 mov r1, r6
a000684c: e1a02007 mov r2, r7
a0006850: eb0028b7 bl a0010b34 <memcpy>
mt_entry->dev = str;
a0006854: e5848070 str r8, [r4, #112] ; 0x70
str += source_size;
a0006858: e0888007 add r8, r8, r7
memcpy( str, target, target_size );
a000685c: e99d0006 ldmib sp, {r1, r2}
a0006860: e1a00008 mov r0, r8
a0006864: eb0028b2 bl a0010b34 <memcpy>
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
mt_entry->mt_fs_root.mt_entry = mt_entry;
mt_entry->options = options;
a0006868: e59d300c ldr r3, [sp, #12]
mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf;
a000686c: e59fe1b4 ldr lr, [pc, #436] ; a0006a28 <mount+0x2ac>
a0006870: e284c038 add ip, r4, #56 ; 0x38
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
mt_entry->mt_fs_root.mt_entry = mt_entry;
mt_entry->options = options;
a0006874: e5843030 str r3, [r4, #48] ; 0x30
mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf;
a0006878: e8be000f ldm lr!, {r0, r1, r2, r3}
a000687c: e8ac000f stmia ip!, {r0, r1, r2, r3}
a0006880: e8be000f ldm lr!, {r0, r1, r2, r3}
a0006884: e8ac000f stmia ip!, {r0, r1, r2, r3}
a0006888: e89e000f ldm lr, {r0, r1, r2, r3}
/*
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
a000688c: e3550000 cmp r5, #0
memcpy( str, source_or_null, source_size );
mt_entry->dev = str;
str += source_size;
memcpy( str, target, target_size );
mt_entry->target = str;
a0006890: e5848068 str r8, [r4, #104] ; 0x68
&target_length
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
mt_entry->mt_fs_root.mt_entry = mt_entry;
a0006894: e584402c str r4, [r4, #44] ; 0x2c
mt_entry->options = options;
mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf;
a0006898: e88c000f stm ip, {r0, r1, r2, r3}
/*
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
a000689c: 0a00002e beq a000695c <mount+0x1e0>
a00068a0: ea000003 b a00068b4 <mount+0x138>
target,
filesystemtype,
&target_length
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
a00068a4: eb002674 bl a001027c <__errno> <== NOT EXECUTED
a00068a8: e3a0300c mov r3, #12 <== NOT EXECUTED
a00068ac: e5803000 str r3, [r0]
a00068b0: ea000058 b a0006a18 <mount+0x29c>
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
if ( rtems_filesystem_evaluate_path(
a00068b4: e3a03001 mov r3, #1
a00068b8: e28d6018 add r6, sp, #24
a00068bc: e58d3000 str r3, [sp]
a00068c0: e1a0000b mov r0, fp
a00068c4: e59d1010 ldr r1, [sp, #16]
a00068c8: e3a02007 mov r2, #7
a00068cc: e1a03006 mov r3, r6
a00068d0: ebfffe08 bl a00060f8 <rtems_filesystem_evaluate_path>
a00068d4: e3700001 cmn r0, #1
a00068d8: 0a000047 beq a00069fc <mount+0x280>
/*
* Test to see if it is a directory
*/
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
a00068dc: e59d3024 ldr r3, [sp, #36] ; 0x24
a00068e0: e1a00006 mov r0, r6
a00068e4: e5933010 ldr r3, [r3, #16]
a00068e8: e12fff33 blx r3
a00068ec: e3500001 cmp r0, #1
a00068f0: 0a000002 beq a0006900 <mount+0x184>
errno = ENOTDIR;
a00068f4: eb002660 bl a001027c <__errno>
a00068f8: e3a03014 mov r3, #20
a00068fc: ea000006 b a000691c <mount+0x1a0>
/*
* You can only mount one file system onto a single mount point.
*/
if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) {
a0006900: e59f0124 ldr r0, [pc, #292] ; a0006a2c <mount+0x2b0>
a0006904: e59d1018 ldr r1, [sp, #24]
a0006908: ebffff86 bl a0006728 <rtems_filesystem_mount_iterate>
a000690c: e3500000 cmp r0, #0
a0006910: 0a000003 beq a0006924 <mount+0x1a8>
errno = EBUSY;
a0006914: eb002658 bl a001027c <__errno>
a0006918: e3a03010 mov r3, #16
a000691c: e5803000 str r3, [r0]
goto cleanup_and_bail;
a0006920: ea000036 b a0006a00 <mount+0x284>
* 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;
a0006924: e59d3018 ldr r3, [sp, #24]
mt_entry->mt_point_node.handlers = loc.handlers;
mt_entry->mt_point_node.ops = loc.ops;
mt_entry->mt_point_node.mt_entry = loc.mt_entry;
a0006928: e59d2028 ldr r2, [sp, #40] ; 0x28
/*
* 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 ) ) {
a000692c: e1a00004 mov r0, r4
* 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;
a0006930: e5843008 str r3, [r4, #8]
mt_entry->mt_point_node.handlers = loc.handlers;
a0006934: e59d3020 ldr r3, [sp, #32]
mt_entry->mt_point_node.ops = loc.ops;
mt_entry->mt_point_node.mt_entry = loc.mt_entry;
a0006938: e5842018 str r2, [r4, #24]
* until the system is unmounted. It may be needed to correctly
* traverse the tree.
*/
mt_entry->mt_point_node.node_access = loc.node_access;
mt_entry->mt_point_node.handlers = loc.handlers;
a000693c: e5843010 str r3, [r4, #16]
mt_entry->mt_point_node.ops = loc.ops;
a0006940: e59d3024 ldr r3, [sp, #36] ; 0x24
a0006944: e5843014 str r3, [r4, #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 ) ) {
a0006948: e5933020 ldr r3, [r3, #32]
a000694c: e12fff33 blx r3
a0006950: e3500000 cmp r0, #0
a0006954: 0a00000b beq a0006988 <mount+0x20c>
a0006958: ea000028 b a0006a00 <mount+0x284> <== NOT EXECUTED
stop = (*routine)( mt_entry, routine_arg );
}
rtems_libio_unlock();
return stop;
}
a000695c: e59f30cc ldr r3, [pc, #204] ; a0006a30 <mount+0x2b4>
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_tail(
const Chain_Control *the_chain
)
{
return &the_chain->Tail.Node;
a0006960: e2832004 add r2, r3, #4
}
} else {
/*
* Do we already have a base file system ?
*/
if ( !rtems_chain_is_empty( &mount_chain ) ) {
a0006964: e5933000 ldr r3, [r3]
a0006968: e1530002 cmp r3, r2
)
{
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;
a000696c: 01a06005 moveq r6, r5
}
} else {
/*
* Do we already have a base file system ?
*/
if ( !rtems_chain_is_empty( &mount_chain ) ) {
a0006970: 0a000004 beq a0006988 <mount+0x20c>
errno = EINVAL;
a0006974: eb002640 bl a001027c <__errno> <== NOT EXECUTED
a0006978: e3a03016 mov r3, #22 <== NOT EXECUTED
a000697c: e5803000 str r3, [r0] <== NOT EXECUTED
)
{
rtems_filesystem_fsmount_me_t mount_h = NULL;
rtems_filesystem_location_info_t loc;
rtems_filesystem_mount_table_entry_t *mt_entry = NULL;
rtems_filesystem_location_info_t *loc_to_free = NULL;
a0006980: e1a06005 mov r6, r5 <== NOT EXECUTED
/*
* Do we already have a base file system ?
*/
if ( !rtems_chain_is_empty( &mount_chain ) ) {
errno = EINVAL;
goto cleanup_and_bail;
a0006984: ea00001d b a0006a00 <mount+0x284> <== NOT EXECUTED
* 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 ) ) {
a0006988: e1a00004 mov r0, r4
a000698c: e59d1050 ldr r1, [sp, #80] ; 0x50
a0006990: e59d3014 ldr r3, [sp, #20]
a0006994: e12fff33 blx r3
a0006998: e2507000 subs r7, r0, #0
a000699c: 0a000004 beq a00069b4 <mount+0x238>
/*
* Try to undo the mount operation
*/
loc.ops->unmount_h( mt_entry );
a00069a0: e59d3024 ldr r3, [sp, #36] ; 0x24
a00069a4: e1a00004 mov r0, r4
a00069a8: e5933028 ldr r3, [r3, #40] ; 0x28
a00069ac: e12fff33 blx r3
goto cleanup_and_bail;
a00069b0: ea000012 b a0006a00 <mount+0x284>
}
/*
* Add the mount table entry to the mount table chain
*/
rtems_libio_lock();
a00069b4: ebffff51 bl a0006700 <rtems_libio_lock>
a00069b8: e59f0070 ldr r0, [pc, #112] ; a0006a30 <mount+0x2b4>
a00069bc: e1a01004 mov r1, r4
a00069c0: eb000ccc bl a0009cf8 <_Chain_Append>
rtems_chain_append( &mount_chain, &mt_entry->Node );
rtems_libio_unlock();
a00069c4: ebffff53 bl a0006718 <rtems_libio_unlock>
if ( !has_target )
a00069c8: e3550000 cmp r5, #0
rtems_filesystem_root = mt_entry->mt_fs_root;
return 0;
a00069cc: 11a00007 movne r0, r7
*/
rtems_libio_lock();
rtems_chain_append( &mount_chain, &mt_entry->Node );
rtems_libio_unlock();
if ( !has_target )
a00069d0: 1a000011 bne a0006a1c <mount+0x2a0>
rtems_filesystem_root = mt_entry->mt_fs_root;
a00069d4: e59f3058 ldr r3, [pc, #88] ; a0006a34 <mount+0x2b8>
a00069d8: e284401c add r4, r4, #28
a00069dc: e593c000 ldr ip, [r3]
a00069e0: e8b4000f ldm r4!, {r0, r1, r2, r3}
a00069e4: e28cc018 add ip, ip, #24
a00069e8: e8ac000f stmia ip!, {r0, r1, r2, r3}
a00069ec: e5943000 ldr r3, [r4]
return 0;
a00069f0: e1a00005 mov r0, r5
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;
a00069f4: e58c3000 str r3, [ip]
a00069f8: ea000007 b a0006a1c <mount+0x2a0>
)
{
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;
a00069fc: e3a06000 mov r6, #0 <== NOT EXECUTED
return 0;
cleanup_and_bail:
free( mt_entry );
a0006a00: e1a00004 mov r0, r4
a0006a04: ebfffdf0 bl a00061cc <free>
if ( loc_to_free )
a0006a08: e3560000 cmp r6, #0
a0006a0c: 0a000001 beq a0006a18 <mount+0x29c>
rtems_filesystem_freenode( loc_to_free );
a0006a10: e1a00006 mov r0, r6
a0006a14: ebfffde7 bl a00061b8 <rtems_filesystem_freenode>
return -1;
a0006a18: e3e00000 mvn r0, #0
}
a0006a1c: e28dd02c add sp, sp, #44 ; 0x2c
a0006a20: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
a0006a3c <newlib_free_buffers>:
*/
int newlib_free_buffers(
FILE *fp
)
{
a0006a3c: e92d4010 push {r4, lr}
a0006a40: e1a04000 mov r4, r0
switch ( fileno(fp) ) {
a0006a44: eb00270f bl a0010688 <fileno>
a0006a48: e3500002 cmp r0, #2
a0006a4c: 8a00000b bhi a0006a80 <newlib_free_buffers+0x44>
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
a0006a50: e1d430bc ldrh r3, [r4, #12]
a0006a54: e3130080 tst r3, #128 ; 0x80
a0006a58: 0a00000a beq a0006a88 <newlib_free_buffers+0x4c>
free( fp->_bf._base );
a0006a5c: e5940010 ldr r0, [r4, #16]
a0006a60: ebfffdd9 bl a00061cc <free> <== NOT EXECUTED
fp->_flags &= ~__SMBF;
a0006a64: e1d430bc ldrh r3, [r4, #12] <== NOT EXECUTED
a0006a68: e3c33080 bic r3, r3, #128 ; 0x80 <== NOT EXECUTED
a0006a6c: e1c430bc strh r3, [r4, #12] <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
a0006a70: e3a03000 mov r3, #0 <== NOT EXECUTED
a0006a74: e5843000 str r3, [r4] <== NOT EXECUTED
a0006a78: e5843010 str r3, [r4, #16] <== NOT EXECUTED
a0006a7c: ea000001 b a0006a88 <newlib_free_buffers+0x4c> <== NOT EXECUTED
}
break;
default:
fclose(fp);
a0006a80: e1a00004 mov r0, r4 <== NOT EXECUTED
a0006a84: eb00264a bl a00103b4 <fclose> <== NOT EXECUTED
}
return 0;
}
a0006a88: e3a00000 mov r0, #0
a0006a8c: e8bd8010 pop {r4, pc}
a0006d20 <open>:
int open(
const char *pathname,
int flags,
...
)
{
a0006d20: e92d000e push {r1, r2, r3}
a0006d24: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
a0006d28: e24dd01c sub sp, sp, #28
a0006d2c: e59d503c ldr r5, [sp, #60] ; 0x3c
a0006d30: e1a06000 mov r6, r0
if ( ( status & _FWRITE ) == _FWRITE )
eval_flags |= RTEMS_LIBIO_PERMS_WRITE;
va_start(ap, flags);
mode = va_arg( ap, int );
a0006d34: e59d9040 ldr r9, [sp, #64] ; 0x40
/*
* Set the Evaluation flags
*/
eval_flags = 0;
status = flags + 1;
a0006d38: e2853001 add r3, r5, #1
if ( ( status & _FREAD ) == _FREAD )
eval_flags |= RTEMS_LIBIO_PERMS_READ;
a0006d3c: e213a001 ands sl, r3, #1
a0006d40: 13a0a004 movne sl, #4
if ( ( status & _FWRITE ) == _FWRITE )
a0006d44: e3130002 tst r3, #2
eval_flags |= RTEMS_LIBIO_PERMS_WRITE;
va_start(ap, flags);
mode = va_arg( ap, int );
a0006d48: e28d3044 add r3, sp, #68 ; 0x44
eval_flags = 0;
status = flags + 1;
if ( ( status & _FREAD ) == _FREAD )
eval_flags |= RTEMS_LIBIO_PERMS_READ;
if ( ( status & _FWRITE ) == _FWRITE )
eval_flags |= RTEMS_LIBIO_PERMS_WRITE;
a0006d4c: 138aa002 orrne sl, sl, #2
va_start(ap, flags);
mode = va_arg( ap, int );
a0006d50: e58d3018 str r3, [sp, #24]
* 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();
a0006d54: eb001b40 bl a000da5c <rtems_libio_allocate>
if ( iop == 0 ) {
a0006d58: e2504000 subs r4, r0, #0
a0006d5c: 0a000063 beq a0006ef0 <open+0x1d0>
}
/*
* See if the file exists.
*/
status = rtems_filesystem_evaluate_path(
a0006d60: e1a00006 mov r0, r6
a0006d64: eb00292e bl a0011224 <strlen>
a0006d68: e28d7004 add r7, sp, #4
a0006d6c: e1a01000 mov r1, r0
a0006d70: e3a08001 mov r8, #1
a0006d74: e1a00006 mov r0, r6
a0006d78: e1a0200a mov r2, sl
a0006d7c: e1a03007 mov r3, r7
a0006d80: e58d8000 str r8, [sp]
a0006d84: ebfffcdb bl a00060f8 <rtems_filesystem_evaluate_path>
pathname, strlen( pathname ), eval_flags, &loc, true );
if ( status == -1 ) {
a0006d88: e3700001 cmn r0, #1
a0006d8c: 1a00001f bne a0006e10 <open+0xf0>
if ( errno != ENOENT ) {
a0006d90: eb002539 bl a001027c <__errno>
a0006d94: e5903000 ldr r3, [r0]
a0006d98: e3530002 cmp r3, #2
a0006d9c: 1a00000a bne a0006dcc <open+0xac>
rc = errno;
goto done;
}
/* If the file does not exist and we are not trying to create it--> error */
if ( !(flags & O_CREAT) ) {
a0006da0: e215ac02 ands sl, r5, #512 ; 0x200
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;
a0006da4: 01a0700a moveq r7, sl
goto done;
}
/* If the file does not exist and we are not trying to create it--> error */
if ( !(flags & O_CREAT) ) {
rc = ENOENT;
a0006da8: 01a05003 moveq r5, r3
rc = errno;
goto done;
}
/* If the file does not exist and we are not trying to create it--> error */
if ( !(flags & O_CREAT) ) {
a0006dac: 0a000055 beq a0006f08 <open+0x1e8>
rc = ENOENT;
goto done;
}
/* Create the node for the new regular file */
rc = mknod( pathname, S_IFREG | mode, 0LL );
a0006db0: e1a00006 mov r0, r6
a0006db4: e3891902 orr r1, r9, #32768 ; 0x8000
a0006db8: e3a02000 mov r2, #0
a0006dbc: e3a03000 mov r3, #0
a0006dc0: ebfffe20 bl a0006648 <mknod>
if ( rc ) {
a0006dc4: e250a000 subs sl, r0, #0
a0006dc8: 0a000003 beq a0006ddc <open+0xbc>
rc = errno;
a0006dcc: eb00252a bl a001027c <__errno>
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;
a0006dd0: e3a07000 mov r7, #0
}
/* Create the node for the new regular file */
rc = mknod( pathname, S_IFREG | mode, 0LL );
if ( rc ) {
rc = errno;
a0006dd4: e5905000 ldr r5, [r0]
goto done;
a0006dd8: ea000048 b a0006f00 <open+0x1e0>
/*
* 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(
a0006ddc: e1a00006 mov r0, r6
a0006de0: eb00290f bl a0011224 <strlen>
a0006de4: e1a03007 mov r3, r7
a0006de8: e1a01000 mov r1, r0
a0006dec: e1a0200a mov r2, sl
a0006df0: e1a00006 mov r0, r6
a0006df4: e58d8000 str r8, [sp]
a0006df8: ebfffcbe bl a00060f8 <rtems_filesystem_evaluate_path>
pathname, strlen( pathname ), 0x0, &loc, true );
if ( status != 0 ) { /* The file did not exist */
a0006dfc: e3500000 cmp r0, #0
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;
a0006e00: 11a0700a movne r7, sl
* 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;
a0006e04: 13a0500d movne r5, #13
* "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(
pathname, strlen( pathname ), 0x0, &loc, true );
if ( status != 0 ) { /* The file did not exist */
a0006e08: 1a00003e bne a0006f08 <open+0x1e8>
a0006e0c: ea000002 b a0006e1c <open+0xfc>
rc = EACCES;
goto done;
}
} else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) {
a0006e10: e2053c0a and r3, r5, #2560 ; 0xa00
a0006e14: e3530c0a cmp r3, #2560 ; 0xa00
a0006e18: 0a000036 beq a0006ef8 <open+0x1d8>
/*
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->flags |= rtems_libio_fcntl_flags( flags );
a0006e1c: e1a00005 mov r0, r5
a0006e20: e5947014 ldr r7, [r4, #20]
a0006e24: eb001aed bl a000d9e0 <rtems_libio_fcntl_flags>
iop->pathinfo = loc;
a0006e28: e284c018 add ip, r4, #24
/*
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->flags |= rtems_libio_fcntl_flags( flags );
a0006e2c: e1800007 orr r0, r0, r7
iop->pathinfo = loc;
a0006e30: e28de004 add lr, sp, #4
/*
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->flags |= rtems_libio_fcntl_flags( flags );
a0006e34: e5840014 str r0, [r4, #20]
iop->pathinfo = loc;
a0006e38: e8be000f ldm lr!, {r0, r1, r2, r3}
a0006e3c: e8ac000f stmia ip!, {r0, r1, r2, r3}
a0006e40: e59e3000 ldr r3, [lr]
rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode );
a0006e44: e1a00004 mov r0, r4
a0006e48: e1a01006 mov r1, r6
/*
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->flags |= rtems_libio_fcntl_flags( flags );
iop->pathinfo = loc;
a0006e4c: e58c3000 str r3, [ip]
rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode );
a0006e50: e5943020 ldr r3, [r4, #32]
a0006e54: e1a02005 mov r2, r5
a0006e58: e593c000 ldr ip, [r3]
a0006e5c: e1a03009 mov r3, r9
a0006e60: e12fff3c blx ip
if ( rc ) {
a0006e64: e3500000 cmp r0, #0
a0006e68: 0a000003 beq a0006e7c <open+0x15c>
rc = errno;
a0006e6c: eb002502 bl a001027c <__errno> <== NOT EXECUTED
rc = EEXIST;
loc_to_free = &loc;
goto done;
}
loc_to_free = &loc;
a0006e70: e28d7004 add r7, sp, #4 <== 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;
a0006e74: e5905000 ldr r5, [r0] <== NOT EXECUTED
goto done;
a0006e78: ea000020 b a0006f00 <open+0x1e0> <== NOT EXECUTED
}
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
a0006e7c: e3150b01 tst r5, #1024 ; 0x400
a0006e80: 0a00002c beq a0006f38 <open+0x218>
rc = ftruncate( iop - rtems_libio_iops, 0 );
a0006e84: e59f30d4 ldr r3, [pc, #212] ; a0006f60 <open+0x240>
a0006e88: e59f00d4 ldr r0, [pc, #212] ; a0006f64 <open+0x244>
a0006e8c: e3a01000 mov r1, #0
a0006e90: e5933000 ldr r3, [r3]
a0006e94: e3a02000 mov r2, #0
a0006e98: e0633004 rsb r3, r3, r4
a0006e9c: e1a031c3 asr r3, r3, #3
a0006ea0: e0000093 mul r0, r3, r0
a0006ea4: eb001a90 bl a000d8ec <ftruncate>
if ( rc ) {
a0006ea8: e2505000 subs r5, r0, #0
a0006eac: 0a000021 beq a0006f38 <open+0x218>
if(errno) rc = errno;
a0006eb0: eb0024f1 bl a001027c <__errno> <== NOT EXECUTED
a0006eb4: e5903000 ldr r3, [r0] <== NOT EXECUTED
a0006eb8: e3530000 cmp r3, #0 <== NOT EXECUTED
a0006ebc: 0a000001 beq a0006ec8 <open+0x1a8> <== NOT EXECUTED
a0006ec0: eb0024ed bl a001027c <__errno> <== NOT EXECUTED
a0006ec4: e5905000 ldr r5, [r0] <== NOT EXECUTED
close( iop - rtems_libio_iops );
a0006ec8: e59f3090 ldr r3, [pc, #144] ; a0006f60 <open+0x240> <== NOT EXECUTED
a0006ecc: e59f0090 ldr r0, [pc, #144] ; a0006f64 <open+0x244> <== NOT EXECUTED
a0006ed0: e5933000 ldr r3, [r3] <== NOT EXECUTED
a0006ed4: e0634004 rsb r4, r3, r4 <== NOT EXECUTED
a0006ed8: e1a041c4 asr r4, r4, #3 <== NOT EXECUTED
a0006edc: e0000094 mul r0, r4, r0 <== NOT EXECUTED
/* those are released by close(): */
iop = 0;
loc_to_free = NULL;
a0006ee0: e3a04000 mov r4, #0 <== 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 );
a0006ee4: eb001a60 bl a000d86c <close> <== NOT EXECUTED
/* those are released by close(): */
iop = 0;
a0006ee8: e1a07004 mov r7, r4 <== NOT EXECUTED
a0006eec: ea000003 b a0006f00 <open+0x1e0> <== NOT EXECUTED
*/
/* allocate a file control block */
iop = rtems_libio_allocate();
if ( iop == 0 ) {
rc = ENFILE;
a0006ef0: e3a05017 mov r5, #23
a0006ef4: ea00000b b a0006f28 <open+0x208>
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;
a0006ef8: e3a05011 mov r5, #17 <== NOT EXECUTED
a0006efc: ea000001 b a0006f08 <open+0x1e8> <== NOT EXECUTED
* Single exit and clean up path.
*/
done:
va_end(ap);
if ( rc ) {
a0006f00: e3550000 cmp r5, #0
a0006f04: 0a00000b beq a0006f38 <open+0x218>
if ( iop )
a0006f08: e3540000 cmp r4, #0
a0006f0c: 0a000001 beq a0006f18 <open+0x1f8>
rtems_libio_free( iop );
a0006f10: e1a00004 mov r0, r4
a0006f14: eb001af8 bl a000dafc <rtems_libio_free>
if ( loc_to_free )
a0006f18: e3570000 cmp r7, #0
a0006f1c: 0a000001 beq a0006f28 <open+0x208>
rtems_filesystem_freenode( loc_to_free );
a0006f20: e1a00007 mov r0, r7 <== NOT EXECUTED
a0006f24: ebfffca3 bl a00061b8 <rtems_filesystem_freenode> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( rc );
a0006f28: eb0024d3 bl a001027c <__errno>
a0006f2c: e5805000 str r5, [r0]
a0006f30: e3e00000 mvn r0, #0
a0006f34: ea000005 b a0006f50 <open+0x230>
}
return iop - rtems_libio_iops;
a0006f38: e59f3020 ldr r3, [pc, #32] ; a0006f60 <open+0x240>
a0006f3c: e5930000 ldr r0, [r3]
a0006f40: e0604004 rsb r4, r0, r4
a0006f44: e59f0018 ldr r0, [pc, #24] ; a0006f64 <open+0x244>
a0006f48: e1a041c4 asr r4, r4, #3
a0006f4c: e0000094 mul r0, r4, r0
}
a0006f50: e28dd01c add sp, sp, #28
a0006f54: e8bd47f0 pop {r4, r5, r6, r7, r8, r9, sl, lr}
a0006f58: e28dd00c add sp, sp, #12
a0006f5c: e12fff1e bx lr
a0007b70 <oproc>:
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
a0007b70: e92d4011 push {r0, r4, lr}
a0007b74: e5cd0000 strb r0, [sp]
int i;
if (tty->termios.c_oflag & OPOST) {
a0007b78: e5913034 ldr r3, [r1, #52] ; 0x34
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
a0007b7c: e1a04001 mov r4, r1
int i;
if (tty->termios.c_oflag & OPOST) {
a0007b80: e3130001 tst r3, #1
a0007b84: 0a000045 beq a0007ca0 <oproc+0x130>
switch (c) {
a0007b88: e5dd2000 ldrb r2, [sp]
a0007b8c: e2421008 sub r1, r2, #8
a0007b90: e3510005 cmp r1, #5
a0007b94: 979ff101 ldrls pc, [pc, r1, lsl #2]
a0007b98: ea00002c b a0007c50 <oproc+0xe0>
a0007b9c: a0007c3c .word 0xa0007c3c
a0007ba0: a0007c14 .word 0xa0007c14
a0007ba4: a0007bb4 .word 0xa0007bb4
a0007ba8: a0007c50 .word 0xa0007c50
a0007bac: a0007c50 .word 0xa0007c50
a0007bb0: a0007bdc .word 0xa0007bdc
case '\n':
if (tty->termios.c_oflag & ONLRET)
a0007bb4: e3130020 tst r3, #32
tty->column = 0;
a0007bb8: 13a02000 movne r2, #0
a0007bbc: 15842028 strne r2, [r4, #40] ; 0x28
if (tty->termios.c_oflag & ONLCR) {
a0007bc0: e3130004 tst r3, #4
a0007bc4: 0a000035 beq a0007ca0 <oproc+0x130>
rtems_termios_puts ("\r", 1, tty);
a0007bc8: e59f00e4 ldr r0, [pc, #228] ; a0007cb4 <oproc+0x144>
a0007bcc: e3a01001 mov r1, #1
a0007bd0: e1a02004 mov r2, r4
a0007bd4: ebffffa4 bl a0007a6c <rtems_termios_puts>
a0007bd8: ea00000b b a0007c0c <oproc+0x9c>
tty->column = 0;
}
break;
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
a0007bdc: e3130010 tst r3, #16 <== NOT EXECUTED
a0007be0: 0a000002 beq a0007bf0 <oproc+0x80> <== NOT EXECUTED
a0007be4: e5942028 ldr r2, [r4, #40] ; 0x28 <== NOT EXECUTED
a0007be8: e3520000 cmp r2, #0 <== NOT EXECUTED
a0007bec: 0a00002f beq a0007cb0 <oproc+0x140> <== NOT EXECUTED
return;
if (tty->termios.c_oflag & OCRNL) {
a0007bf0: e2132008 ands r2, r3, #8 <== NOT EXECUTED
c = '\n';
if (tty->termios.c_oflag & ONLRET)
tty->column = 0;
break;
}
tty->column = 0;
a0007bf4: 05842028 streq r2, [r4, #40] ; 0x28 <== NOT EXECUTED
break;
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
return;
if (tty->termios.c_oflag & OCRNL) {
a0007bf8: 0a000028 beq a0007ca0 <oproc+0x130> <== NOT EXECUTED
c = '\n';
a0007bfc: e3a0200a mov r2, #10 <== NOT EXECUTED
if (tty->termios.c_oflag & ONLRET)
a0007c00: e3130020 tst r3, #32 <== NOT EXECUTED
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
return;
if (tty->termios.c_oflag & OCRNL) {
c = '\n';
a0007c04: e5cd2000 strb r2, [sp] <== NOT EXECUTED
if (tty->termios.c_oflag & ONLRET)
a0007c08: 0a000024 beq a0007ca0 <oproc+0x130> <== NOT EXECUTED
tty->column = 0;
a0007c0c: e3a03000 mov r3, #0
a0007c10: ea000021 b a0007c9c <oproc+0x12c>
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
a0007c14: e5942028 ldr r2, [r4, #40] ; 0x28
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
a0007c18: e2033b06 and r3, r3, #6144 ; 0x1800
a0007c1c: e3530b06 cmp r3, #6144 ; 0x1800
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
a0007c20: e2021007 and r1, r2, #7
a0007c24: e2611008 rsb r1, r1, #8
a0007c28: e0813002 add r3, r1, r2
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
tty->column += i;
a0007c2c: 05843028 streq r3, [r4, #40] ; 0x28
rtems_termios_puts ( " ", i, tty);
a0007c30: 059f0080 ldreq r0, [pc, #128] ; a0007cb8 <oproc+0x148>
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
a0007c34: 1a000018 bne a0007c9c <oproc+0x12c>
a0007c38: ea00001a b a0007ca8 <oproc+0x138>
}
tty->column += i;
break;
case '\b':
if (tty->column > 0)
a0007c3c: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED
a0007c40: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->column--;
a0007c44: c2433001 subgt r3, r3, #1 <== NOT EXECUTED
}
tty->column += i;
break;
case '\b':
if (tty->column > 0)
a0007c48: ca000013 bgt a0007c9c <oproc+0x12c> <== NOT EXECUTED
a0007c4c: ea000013 b a0007ca0 <oproc+0x130> <== NOT EXECUTED
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
a0007c50: e3130002 tst r3, #2
a0007c54: 0a000007 beq a0007c78 <oproc+0x108>
c = toupper(c);
a0007c58: e59f305c ldr r3, [pc, #92] ; a0007cbc <oproc+0x14c> <== NOT EXECUTED
a0007c5c: e5933000 ldr r3, [r3] <== NOT EXECUTED
a0007c60: e0833002 add r3, r3, r2 <== NOT EXECUTED
a0007c64: e5d33001 ldrb r3, [r3, #1] <== NOT EXECUTED
a0007c68: e2033003 and r3, r3, #3 <== NOT EXECUTED
a0007c6c: e3530002 cmp r3, #2 <== NOT EXECUTED
a0007c70: 02422020 subeq r2, r2, #32 <== NOT EXECUTED
a0007c74: e5cd2000 strb r2, [sp] <== NOT EXECUTED
if (!iscntrl(c))
a0007c78: e59f203c ldr r2, [pc, #60] ; a0007cbc <oproc+0x14c>
a0007c7c: e5dd3000 ldrb r3, [sp]
a0007c80: e5922000 ldr r2, [r2]
a0007c84: e0823003 add r3, r2, r3
a0007c88: e5d33001 ldrb r3, [r3, #1]
a0007c8c: e3130020 tst r3, #32
a0007c90: 1a000002 bne a0007ca0 <oproc+0x130>
tty->column++;
a0007c94: e5943028 ldr r3, [r4, #40] ; 0x28
a0007c98: e2833001 add r3, r3, #1
a0007c9c: e5843028 str r3, [r4, #40] ; 0x28
break;
}
}
rtems_termios_puts (&c, 1, tty);
a0007ca0: e1a0000d mov r0, sp
a0007ca4: e3a01001 mov r1, #1
a0007ca8: e1a02004 mov r2, r4
a0007cac: ebffff6e bl a0007a6c <rtems_termios_puts>
}
a0007cb0: e8bd8018 pop {r3, r4, pc}
a0008044 <pathconf>:
long pathconf(
const char *path,
int name
)
{
a0008044: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
a0008048: e1a05001 mov r5, r1 <== NOT EXECUTED
int status;
int fd;
fd = open( path, O_RDONLY );
a000804c: e3a01000 mov r1, #0 <== NOT EXECUTED
a0008050: ebffff65 bl a0007dec <open> <== NOT EXECUTED
if ( fd == -1 )
a0008054: e3700001 cmn r0, #1 <== NOT EXECUTED
)
{
int status;
int fd;
fd = open( path, O_RDONLY );
a0008058: e1a04000 mov r4, r0 <== NOT EXECUTED
if ( fd == -1 )
a000805c: 0a000006 beq a000807c <pathconf+0x38> <== NOT EXECUTED
return -1;
status = fpathconf( fd, name );
a0008060: e1a01005 mov r1, r5 <== NOT EXECUTED
a0008064: ebfffb2a bl a0006d14 <fpathconf> <== NOT EXECUTED
a0008068: e1a05000 mov r5, r0 <== NOT EXECUTED
(void) close( fd );
a000806c: e1a00004 mov r0, r4 <== NOT EXECUTED
a0008070: ebfffa13 bl a00068c4 <close> <== NOT EXECUTED
return status;
a0008074: e1a00005 mov r0, r5 <== NOT EXECUTED
a0008078: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
}
a000807c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
a000ea68 <pipe_create>:
* Called by pipe() to create an anonymous pipe.
*/
int pipe_create(
int filsdes[2]
)
{
a000ea68: e92d407f push {r0, r1, r2, r3, r4, r5, r6, lr}
a000ea6c: e1a05000 mov r5, r0
rtems_libio_t *iop;
int err = 0;
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
a000ea70: e59f1100 ldr r1, [pc, #256] ; a000eb78 <pipe_create+0x110>
a000ea74: e59f0100 ldr r0, [pc, #256] ; a000eb7c <pipe_create+0x114>
a000ea78: eb00052e bl a000ff38 <rtems_mkdir>
a000ea7c: e3500000 cmp r0, #0
a000ea80: 1a000039 bne a000eb6c <pipe_create+0x104>
return -1;
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
a000ea84: e59f30f4 ldr r3, [pc, #244] ; a000eb80 <pipe_create+0x118>
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
a000ea88: e28d000a add r0, sp, #10
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
return -1;
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
a000ea8c: e1a0400d mov r4, sp
a000ea90: e58d3000 str r3, [sp]
a000ea94: e59f30e8 ldr r3, [pc, #232] ; a000eb84 <pipe_create+0x11c>
a000ea98: e58d3004 str r3, [sp, #4]
a000ea9c: e59f30e4 ldr r3, [pc, #228] ; a000eb88 <pipe_create+0x120>
a000eaa0: e1cd30b8 strh r3, [sp, #8]
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
a000eaa4: e59f30e0 ldr r3, [pc, #224] ; a000eb8c <pipe_create+0x124>
a000eaa8: e1d320b0 ldrh r2, [r3]
a000eaac: e2821001 add r1, r2, #1
a000eab0: e1c310b0 strh r1, [r3]
a000eab4: e59f10d4 ldr r1, [pc, #212] ; a000eb90 <pipe_create+0x128>
a000eab8: eb000e0d bl a00122f4 <sprintf>
/* Try creating FIFO file until find an available file name */
while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) {
a000eabc: e1a0000d mov r0, sp
a000eac0: e3a01d06 mov r1, #384 ; 0x180
a000eac4: eb000487 bl a000fce8 <mkfifo>
a000eac8: e2506000 subs r6, r0, #0
a000eacc: 0a000001 beq a000ead8 <pipe_create+0x70>
if (errno != EEXIST){
a000ead0: eb000b48 bl a00117f8 <__errno>
a000ead4: ea000024 b a000eb6c <pipe_create+0x104>
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);
a000ead8: e1a0000d mov r0, sp
a000eadc: e3a01901 mov r1, #16384 ; 0x4000
a000eae0: ebffe56b bl a0008094 <open>
if (filsdes[0] < 0) {
a000eae4: e3500000 cmp r0, #0
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);
a000eae8: e5850000 str r0, [r5]
if (filsdes[0] < 0) {
a000eaec: aa000002 bge a000eafc <pipe_create+0x94>
err = errno;
a000eaf0: eb000b40 bl a00117f8 <__errno> <== NOT EXECUTED
a000eaf4: e5906000 ldr r6, [r0] <== NOT EXECUTED
a000eaf8: ea000014 b a000eb50 <pipe_create+0xe8> <== NOT EXECUTED
the file node will be deleted after it is closed by all. */
unlink(fifopath);
}
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
a000eafc: e59f3090 ldr r3, [pc, #144] ; a000eb94 <pipe_create+0x12c>
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
filsdes[1] = open(fifopath, O_WRONLY);
a000eb00: e3a01001 mov r1, #1
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]);
a000eb04: e5933000 ldr r3, [r3]
a000eb08: e1500003 cmp r0, r3
a000eb0c: 359f3084 ldrcc r3, [pc, #132] ; a000eb98 <pipe_create+0x130>
a000eb10: 33a06038 movcc r6, #56 ; 0x38
a000eb14: 35933000 ldrcc r3, [r3]
a000eb18: 30263690 mlacc r6, r0, r6, r3
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
filsdes[1] = open(fifopath, O_WRONLY);
a000eb1c: e1a0000d mov r0, sp
unlink(fifopath);
}
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
a000eb20: e5963014 ldr r3, [r6, #20]
a000eb24: e3c33001 bic r3, r3, #1
a000eb28: e5863014 str r3, [r6, #20]
filsdes[1] = open(fifopath, O_WRONLY);
a000eb2c: ebffe558 bl a0008094 <open>
if (filsdes[1] < 0) {
a000eb30: e3500000 cmp r0, #0
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);
a000eb34: e5850004 str r0, [r5, #4]
int pipe_create(
int filsdes[2]
)
{
rtems_libio_t *iop;
int err = 0;
a000eb38: a3a06000 movge r6, #0
iop = rtems_libio_iop(filsdes[0]);
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
filsdes[1] = open(fifopath, O_WRONLY);
if (filsdes[1] < 0) {
a000eb3c: aa000003 bge a000eb50 <pipe_create+0xe8>
err = errno;
a000eb40: eb000b2c bl a00117f8 <__errno> <== NOT EXECUTED
a000eb44: e5906000 ldr r6, [r0] <== NOT EXECUTED
close(filsdes[0]);
a000eb48: e5950000 ldr r0, [r5] <== NOT EXECUTED
a000eb4c: ebffe16a bl a00070fc <close> <== NOT EXECUTED
}
unlink(fifopath);
a000eb50: e1a0000d mov r0, sp
a000eb54: ebffeccf bl a0009e98 <unlink>
}
if(err != 0)
a000eb58: e3560000 cmp r6, #0
rtems_set_errno_and_return_minus_one(err);
return 0;
a000eb5c: 01a00006 moveq r0, r6
err = errno;
close(filsdes[0]);
}
unlink(fifopath);
}
if(err != 0)
a000eb60: 0a000002 beq a000eb70 <pipe_create+0x108>
rtems_set_errno_and_return_minus_one(err);
a000eb64: eb000b23 bl a00117f8 <__errno> <== NOT EXECUTED
a000eb68: e5806000 str r6, [r0] <== NOT EXECUTED
a000eb6c: e3e00000 mvn r0, #0
return 0;
}
a000eb70: e28dd010 add sp, sp, #16
a000eb74: e8bd8070 pop {r4, r5, r6, pc}
a000ff28 <pipe_ioctl>:
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
if (cmd == FIONREAD) {
a000ff28: e59f3060 ldr r3, [pc, #96] ; a000ff90 <pipe_ioctl+0x68> <== NOT EXECUTED
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
a000ff2c: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
if (cmd == FIONREAD) {
a000ff30: e1510003 cmp r1, r3 <== NOT EXECUTED
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
a000ff34: e1a04000 mov r4, r0 <== NOT EXECUTED
a000ff38: e1a05002 mov r5, r2 <== NOT EXECUTED
if (cmd == FIONREAD) {
a000ff3c: 1a00000d bne a000ff78 <pipe_ioctl+0x50> <== NOT EXECUTED
if (buffer == NULL)
a000ff40: e3520000 cmp r2, #0 <== NOT EXECUTED
a000ff44: 0a00000d beq a000ff80 <pipe_ioctl+0x58> <== NOT EXECUTED
return -EFAULT;
if (! PIPE_LOCK(pipe))
a000ff48: e3a01000 mov r1, #0 <== NOT EXECUTED
a000ff4c: e5900028 ldr r0, [r0, #40] ; 0x28 <== NOT EXECUTED
a000ff50: e1a02001 mov r2, r1 <== NOT EXECUTED
a000ff54: ebffed0e bl a000b394 <rtems_semaphore_obtain> <== NOT EXECUTED
a000ff58: e2506000 subs r6, r0, #0 <== NOT EXECUTED
a000ff5c: 1a000009 bne a000ff88 <pipe_ioctl+0x60> <== NOT EXECUTED
return -EINTR;
/* Return length of pipe */
*(unsigned int *)buffer = pipe->Length;
a000ff60: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
PIPE_UNLOCK(pipe);
a000ff64: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
if (! PIPE_LOCK(pipe))
return -EINTR;
/* Return length of pipe */
*(unsigned int *)buffer = pipe->Length;
a000ff68: e5853000 str r3, [r5] <== NOT EXECUTED
PIPE_UNLOCK(pipe);
a000ff6c: ebffed4e bl a000b4ac <rtems_semaphore_release> <== NOT EXECUTED
return 0;
a000ff70: e1a00006 mov r0, r6 <== NOT EXECUTED
a000ff74: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
}
return -EINVAL;
a000ff78: e3e00015 mvn r0, #21 <== NOT EXECUTED
a000ff7c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
rtems_libio_t *iop
)
{
if (cmd == FIONREAD) {
if (buffer == NULL)
return -EFAULT;
a000ff80: e3e0000d mvn r0, #13 <== NOT EXECUTED
a000ff84: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
if (! PIPE_LOCK(pipe))
return -EINTR;
a000ff88: e3e00003 mvn r0, #3 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
}
return -EINVAL;
}
a000ff8c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
a000fc08 <pipe_read>:
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
a000fc08: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr}
a000fc0c: e1a09001 mov r9, r1
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
a000fc10: e3a01000 mov r1, #0
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
a000fc14: e1a04000 mov r4, r0
a000fc18: e1a05002 mov r5, r2
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
a000fc1c: e5900028 ldr r0, [r0, #40] ; 0x28
a000fc20: e1a02001 mov r2, r1
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
a000fc24: e1a0a003 mov sl, r3
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
a000fc28: ebffedd9 bl a000b394 <rtems_semaphore_obtain>
a000fc2c: e2506000 subs r6, r0, #0
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
pipe->Start = 0;
if (pipe->waitingWriters > 0)
PIPE_WAKEUPWRITERS(pipe);
a000fc30: 01a0b00d moveq fp, sp
rtems_libio_t *iop
)
{
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
a000fc34: 0a000044 beq a000fd4c <pipe_read+0x144>
a000fc38: ea000050 b a000fd80 <pipe_read+0x178> <== NOT EXECUTED
return -EINTR;
while (read < count) {
while (PIPE_EMPTY(pipe)) {
/* Not an error */
if (pipe->Writers == 0)
a000fc3c: e5947014 ldr r7, [r4, #20]
a000fc40: e3570000 cmp r7, #0
a000fc44: 0a000045 beq a000fd60 <pipe_read+0x158>
goto out_locked;
if (LIBIO_NODELAY(iop)) {
a000fc48: e59a8014 ldr r8, [sl, #20] <== NOT EXECUTED
a000fc4c: e2188001 ands r8, r8, #1 <== NOT EXECUTED
a000fc50: 1a000041 bne a000fd5c <pipe_read+0x154> <== NOT EXECUTED
ret = -EAGAIN;
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
a000fc54: e5943018 ldr r3, [r4, #24] <== NOT EXECUTED
PIPE_UNLOCK(pipe);
a000fc58: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
ret = -EAGAIN;
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
a000fc5c: e2833001 add r3, r3, #1 <== NOT EXECUTED
a000fc60: e5843018 str r3, [r4, #24] <== NOT EXECUTED
PIPE_UNLOCK(pipe);
a000fc64: ebffee10 bl a000b4ac <rtems_semaphore_release> <== NOT EXECUTED
if (! PIPE_READWAIT(pipe))
a000fc68: e1a01008 mov r1, r8 <== NOT EXECUTED
a000fc6c: e594002c ldr r0, [r4, #44] ; 0x2c <== NOT EXECUTED
a000fc70: eb000388 bl a0010a98 <rtems_barrier_wait> <== NOT EXECUTED
a000fc74: e3500000 cmp r0, #0 <== NOT EXECUTED
a000fc78: 01a07000 moveq r7, r0 <== NOT EXECUTED
a000fc7c: 13e07003 mvnne r7, #3 <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
a000fc80: e1a01008 mov r1, r8 <== NOT EXECUTED
a000fc84: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
a000fc88: e1a02008 mov r2, r8 <== NOT EXECUTED
a000fc8c: ebffedc0 bl a000b394 <rtems_semaphore_obtain> <== NOT EXECUTED
a000fc90: e3500000 cmp r0, #0 <== NOT EXECUTED
a000fc94: 1a000034 bne a000fd6c <pipe_read+0x164> <== NOT EXECUTED
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
a000fc98: e5943018 ldr r3, [r4, #24] <== NOT EXECUTED
if (ret != 0)
a000fc9c: e3570000 cmp r7, #0 <== NOT EXECUTED
if (! PIPE_LOCK(pipe)) {
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
a000fca0: e2433001 sub r3, r3, #1 <== NOT EXECUTED
a000fca4: e5843018 str r3, [r4, #24] <== NOT EXECUTED
if (ret != 0)
a000fca8: 1a00002c bne a000fd60 <pipe_read+0x158> <== NOT EXECUTED
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
while (PIPE_EMPTY(pipe)) {
a000fcac: e594300c ldr r3, [r4, #12]
a000fcb0: e3530000 cmp r3, #0
a000fcb4: 0affffe0 beq a000fc3c <pipe_read+0x34>
if (ret != 0)
goto out_locked;
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
a000fcb8: e0667005 rsb r7, r6, r5 <== NOT EXECUTED
a000fcbc: e1530007 cmp r3, r7 <== NOT EXECUTED
a000fcc0: 31a07003 movcc r7, r3 <== NOT EXECUTED
chunk1 = pipe->Size - pipe->Start;
a000fcc4: e5948004 ldr r8, [r4, #4] <== NOT EXECUTED
a000fcc8: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
a000fccc: e5941000 ldr r1, [r4] <== NOT EXECUTED
a000fcd0: e0890006 add r0, r9, r6 <== NOT EXECUTED
a000fcd4: e0638008 rsb r8, r3, r8 <== NOT EXECUTED
if (chunk > chunk1) {
a000fcd8: e1570008 cmp r7, r8 <== NOT EXECUTED
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
a000fcdc: d0811003 addle r1, r1, r3 <== NOT EXECUTED
a000fce0: d1a02007 movle r2, r7 <== NOT EXECUTED
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
chunk1 = pipe->Size - pipe->Start;
if (chunk > chunk1) {
a000fce4: da000006 ble a000fd04 <pipe_read+0xfc> <== NOT EXECUTED
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
a000fce8: e0811003 add r1, r1, r3 <== NOT EXECUTED
a000fcec: e1a02008 mov r2, r8 <== NOT EXECUTED
a000fcf0: eb000c97 bl a0012f54 <memcpy> <== NOT EXECUTED
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
a000fcf4: e5941000 ldr r1, [r4] <== NOT EXECUTED
a000fcf8: e0860008 add r0, r6, r8 <== NOT EXECUTED
a000fcfc: e0890000 add r0, r9, r0 <== NOT EXECUTED
a000fd00: e0682007 rsb r2, r8, r7 <== NOT EXECUTED
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
a000fd04: eb000c92 bl a0012f54 <memcpy> <== NOT EXECUTED
pipe->Start += chunk;
a000fd08: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED
pipe->Start %= pipe->Size;
a000fd0c: e5941004 ldr r1, [r4, #4] <== NOT EXECUTED
a000fd10: e0870000 add r0, r7, r0 <== NOT EXECUTED
a000fd14: eb003bef bl a001ecd8 <__umodsi3> <== NOT EXECUTED
pipe->Length -= chunk;
a000fd18: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
pipe->Start += chunk;
pipe->Start %= pipe->Size;
a000fd1c: e5840008 str r0, [r4, #8] <== NOT EXECUTED
pipe->Length -= chunk;
a000fd20: e0673003 rsb r3, r7, r3 <== NOT EXECUTED
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
a000fd24: e3530000 cmp r3, #0 <== NOT EXECUTED
pipe->Start = 0;
a000fd28: 05843008 streq r3, [r4, #8] <== NOT EXECUTED
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
pipe->Start += chunk;
pipe->Start %= pipe->Size;
pipe->Length -= chunk;
a000fd2c: e584300c str r3, [r4, #12] <== NOT EXECUTED
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
pipe->Start = 0;
if (pipe->waitingWriters > 0)
a000fd30: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
a000fd34: e3530000 cmp r3, #0 <== NOT EXECUTED
a000fd38: 0a000002 beq a000fd48 <pipe_read+0x140> <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
a000fd3c: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED
a000fd40: e1a0100d mov r1, sp <== NOT EXECUTED
a000fd44: eb00033d bl a0010a40 <rtems_barrier_release> <== NOT EXECUTED
read += chunk;
a000fd48: e0866007 add r6, r6, r7 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
a000fd4c: e1560005 cmp r6, r5
a000fd50: 3affffd5 bcc a000fcac <pipe_read+0xa4>
a000fd54: e3a07000 mov r7, #0 <== NOT EXECUTED
a000fd58: ea000000 b a000fd60 <pipe_read+0x158> <== NOT EXECUTED
/* Not an error */
if (pipe->Writers == 0)
goto out_locked;
if (LIBIO_NODELAY(iop)) {
ret = -EAGAIN;
a000fd5c: e3e0700a mvn r7, #10 <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
a000fd60: e5940028 ldr r0, [r4, #40] ; 0x28
a000fd64: ebffedd0 bl a000b4ac <rtems_semaphore_release>
a000fd68: ea000000 b a000fd70 <pipe_read+0x168>
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
/* WARN waitingReaders not restored! */
ret = -EINTR;
a000fd6c: e3e07003 mvn r7, #3 <== NOT EXECUTED
out_locked:
PIPE_UNLOCK(pipe);
out_nolock:
if (read > 0)
a000fd70: e3560000 cmp r6, #0
a000fd74: c1a00006 movgt r0, r6
a000fd78: d1a00007 movle r0, r7
a000fd7c: ea000000 b a000fd84 <pipe_read+0x17c>
)
{
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
a000fd80: e3e00003 mvn r0, #3 <== NOT EXECUTED
out_nolock:
if (read > 0)
return read;
return ret;
}
a000fd84: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
a000f7a4 <pipe_release>:
/* WARN pipe not released! */
if (!PIPE_LOCK(pipe))
rtems_fatal_error_occurred(0xdeadbeef);
#endif
mode = LIBIO_ACCMODE(iop);
a000f7a4: e5913014 ldr r3, [r1, #20]
*/
void pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
a000f7a8: e92d40f1 push {r0, r4, r5, r6, r7, lr}
pipe_control_t *pipe = *pipep;
a000f7ac: e5904000 ldr r4, [r0]
if (!PIPE_LOCK(pipe))
rtems_fatal_error_occurred(0xdeadbeef);
#endif
mode = LIBIO_ACCMODE(iop);
if (mode & LIBIO_FLAGS_READ)
a000f7b0: e3130002 tst r3, #2
/* WARN pipe not released! */
if (!PIPE_LOCK(pipe))
rtems_fatal_error_occurred(0xdeadbeef);
#endif
mode = LIBIO_ACCMODE(iop);
a000f7b4: e2036006 and r6, r3, #6
if (mode & LIBIO_FLAGS_READ)
pipe->Readers --;
a000f7b8: 15943010 ldrne r3, [r4, #16]
*/
void pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
a000f7bc: e1a05000 mov r5, r0
if (mode & LIBIO_FLAGS_READ)
pipe->Readers --;
if (mode & LIBIO_FLAGS_WRITE)
pipe->Writers --;
PIPE_UNLOCK(pipe);
a000f7c0: e5940028 ldr r0, [r4, #40] ; 0x28
rtems_fatal_error_occurred(0xdeadbeef);
#endif
mode = LIBIO_ACCMODE(iop);
if (mode & LIBIO_FLAGS_READ)
pipe->Readers --;
a000f7c4: 12433001 subne r3, r3, #1
a000f7c8: 15843010 strne r3, [r4, #16]
if (mode & LIBIO_FLAGS_WRITE)
a000f7cc: e3160004 tst r6, #4
pipe->Writers --;
a000f7d0: 15943014 ldrne r3, [r4, #20]
a000f7d4: 12433001 subne r3, r3, #1
a000f7d8: 15843014 strne r3, [r4, #20]
PIPE_UNLOCK(pipe);
a000f7dc: ebffef32 bl a000b4ac <rtems_semaphore_release>
if (pipe->Readers == 0 && pipe->Writers == 0) {
a000f7e0: e5943010 ldr r3, [r4, #16]
a000f7e4: e3530000 cmp r3, #0
a000f7e8: 1a000006 bne a000f808 <pipe_release+0x64>
a000f7ec: e5947014 ldr r7, [r4, #20]
a000f7f0: e3570000 cmp r7, #0
a000f7f4: 1a000003 bne a000f808 <pipe_release+0x64>
#if 0
/* To delete an anonymous pipe file when all users closed it */
if (pipe->Anonymous)
delfile = TRUE;
#endif
pipe_free(pipe);
a000f7f8: e1a00004 mov r0, r4
a000f7fc: ebffffdb bl a000f770 <pipe_free>
*pipep = NULL;
a000f800: e5857000 str r7, [r5]
a000f804: ea000010 b a000f84c <pipe_release+0xa8>
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
a000f808: e2562004 subs r2, r6, #4
a000f80c: 13a02001 movne r2, #1
a000f810: e3530000 cmp r3, #0
a000f814: 13a02000 movne r2, #0
a000f818: e3520000 cmp r2, #0
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
a000f81c: 15940030 ldrne r0, [r4, #48] ; 0x30
delfile = TRUE;
#endif
pipe_free(pipe);
*pipep = NULL;
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
a000f820: 1a000007 bne a000f844 <pipe_release+0xa0>
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ)
a000f824: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED
a000f828: e2566002 subs r6, r6, #2 <== NOT EXECUTED
a000f82c: 13a06001 movne r6, #1 <== NOT EXECUTED
a000f830: e3530000 cmp r3, #0 <== NOT EXECUTED
a000f834: 13a06000 movne r6, #0 <== NOT EXECUTED
a000f838: e3560000 cmp r6, #0 <== NOT EXECUTED
a000f83c: 0a000002 beq a000f84c <pipe_release+0xa8> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
a000f840: e594002c ldr r0, [r4, #44] ; 0x2c <== NOT EXECUTED
a000f844: e1a0100d mov r1, sp
a000f848: eb00047c bl a0010a40 <rtems_barrier_release>
pipe_unlock();
a000f84c: ebffffc3 bl a000f760 <pipe_unlock>
iop->flags &= ~LIBIO_FLAGS_OPEN;
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return;
#endif
}
a000f850: e8bd80f8 pop {r3, r4, r5, r6, r7, pc}
a000fd88 <pipe_write>:
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
a000fd88: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
a000fd8c: e2527000 subs r7, r2, #0 <== NOT EXECUTED
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
a000fd90: e1a04000 mov r4, r0 <== NOT EXECUTED
a000fd94: e1a0b001 mov fp, r1 <== NOT EXECUTED
a000fd98: e1a08003 mov r8, r3 <== NOT EXECUTED
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
return 0;
a000fd9c: 01a00007 moveq r0, r7 <== NOT EXECUTED
)
{
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
a000fda0: 0a00005f beq a000ff24 <pipe_write+0x19c> <== NOT EXECUTED
return 0;
if (! PIPE_LOCK(pipe))
a000fda4: e3a01000 mov r1, #0 <== NOT EXECUTED
a000fda8: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
a000fdac: e1a02001 mov r2, r1 <== NOT EXECUTED
a000fdb0: ebffed77 bl a000b394 <rtems_semaphore_obtain> <== NOT EXECUTED
a000fdb4: e3500000 cmp r0, #0 <== NOT EXECUTED
return -EINTR;
a000fdb8: 13e00003 mvnne r0, #3 <== NOT EXECUTED
/* Write nothing */
if (count == 0)
return 0;
if (! PIPE_LOCK(pipe))
a000fdbc: 1a000058 bne a000ff24 <pipe_write+0x19c> <== NOT EXECUTED
return -EINTR;
if (pipe->Readers == 0) {
a000fdc0: e5945010 ldr r5, [r4, #16] <== NOT EXECUTED
a000fdc4: e3550000 cmp r5, #0 <== NOT EXECUTED
a000fdc8: 0a00004d beq a000ff04 <pipe_write+0x17c> <== NOT EXECUTED
ret = -EPIPE;
goto out_locked;
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
a000fdcc: e5949004 ldr r9, [r4, #4] <== NOT EXECUTED
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
ret = -EINTR;
a000fdd0: e1a05000 mov r5, r0 <== NOT EXECUTED
ret = -EPIPE;
goto out_locked;
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
a000fdd4: e1570009 cmp r7, r9 <== NOT EXECUTED
a000fdd8: 91a09007 movls r9, r7 <== NOT EXECUTED
a000fddc: 83a09001 movhi r9, #1 <== NOT EXECUTED
a000fde0: ea000041 b a000feec <pipe_write+0x164> <== NOT EXECUTED
while (written < count) {
while (PIPE_SPACE(pipe) < chunk) {
if (LIBIO_NODELAY(iop)) {
a000fde4: e598a014 ldr sl, [r8, #20] <== NOT EXECUTED
a000fde8: e21aa001 ands sl, sl, #1 <== NOT EXECUTED
a000fdec: 1a000042 bne a000fefc <pipe_write+0x174> <== NOT EXECUTED
ret = -EAGAIN;
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
a000fdf0: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
PIPE_UNLOCK(pipe);
a000fdf4: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
ret = -EAGAIN;
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
a000fdf8: e2833001 add r3, r3, #1 <== NOT EXECUTED
a000fdfc: e584301c str r3, [r4, #28] <== NOT EXECUTED
PIPE_UNLOCK(pipe);
a000fe00: ebffeda9 bl a000b4ac <rtems_semaphore_release> <== NOT EXECUTED
if (! PIPE_WRITEWAIT(pipe))
a000fe04: e1a0100a mov r1, sl <== NOT EXECUTED
a000fe08: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED
a000fe0c: eb000321 bl a0010a98 <rtems_barrier_wait> <== NOT EXECUTED
a000fe10: e3500000 cmp r0, #0 <== NOT EXECUTED
a000fe14: 01a06000 moveq r6, r0 <== NOT EXECUTED
a000fe18: 13e06003 mvnne r6, #3 <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
a000fe1c: e1a0100a mov r1, sl <== NOT EXECUTED
a000fe20: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
a000fe24: e1a0200a mov r2, sl <== NOT EXECUTED
a000fe28: ebffed59 bl a000b394 <rtems_semaphore_obtain> <== NOT EXECUTED
a000fe2c: e3500000 cmp r0, #0 <== NOT EXECUTED
a000fe30: 1a000037 bne a000ff14 <pipe_write+0x18c> <== NOT EXECUTED
/* WARN waitingWriters not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingWriters --;
a000fe34: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
if (ret != 0)
a000fe38: e3560000 cmp r6, #0 <== NOT EXECUTED
if (! PIPE_LOCK(pipe)) {
/* WARN waitingWriters not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingWriters --;
a000fe3c: e2433001 sub r3, r3, #1 <== NOT EXECUTED
a000fe40: e584301c str r3, [r4, #28] <== NOT EXECUTED
if (ret != 0)
a000fe44: 1a00002f bne a000ff08 <pipe_write+0x180> <== NOT EXECUTED
goto out_locked;
if (pipe->Readers == 0) {
a000fe48: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED
a000fe4c: e3530000 cmp r3, #0 <== NOT EXECUTED
a000fe50: 0a00002b beq a000ff04 <pipe_write+0x17c> <== NOT EXECUTED
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
while (PIPE_SPACE(pipe) < chunk) {
a000fe54: e594a004 ldr sl, [r4, #4] <== NOT EXECUTED
a000fe58: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
a000fe5c: e063200a rsb r2, r3, sl <== NOT EXECUTED
a000fe60: e1520009 cmp r2, r9 <== NOT EXECUTED
a000fe64: 3affffde bcc a000fde4 <pipe_write+0x5c> <== NOT EXECUTED
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
chunk1 = pipe->Size - PIPE_WSTART(pipe);
a000fe68: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED
a000fe6c: e1a0100a mov r1, sl <== NOT EXECUTED
ret = -EPIPE;
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
a000fe70: e0656007 rsb r6, r5, r7 <== NOT EXECUTED
chunk1 = pipe->Size - PIPE_WSTART(pipe);
a000fe74: e0830000 add r0, r3, r0 <== NOT EXECUTED
ret = -EPIPE;
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
a000fe78: e1520006 cmp r2, r6 <== NOT EXECUTED
a000fe7c: 31a06002 movcc r6, r2 <== NOT EXECUTED
chunk1 = pipe->Size - PIPE_WSTART(pipe);
a000fe80: eb003b94 bl a001ecd8 <__umodsi3> <== NOT EXECUTED
a000fe84: e5943000 ldr r3, [r4] <== NOT EXECUTED
a000fe88: e060a00a rsb sl, r0, sl <== NOT EXECUTED
if (chunk > chunk1) {
a000fe8c: e156000a cmp r6, sl <== NOT EXECUTED
a000fe90: e08b1005 add r1, fp, r5 <== NOT EXECUTED
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);
a000fe94: d0830000 addle r0, r3, r0 <== NOT EXECUTED
a000fe98: d1a02006 movle r2, r6 <== NOT EXECUTED
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
chunk1 = pipe->Size - PIPE_WSTART(pipe);
if (chunk > chunk1) {
a000fe9c: da000006 ble a000febc <pipe_write+0x134> <== NOT EXECUTED
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
a000fea0: e1a0200a mov r2, sl <== NOT EXECUTED
a000fea4: e0830000 add r0, r3, r0 <== NOT EXECUTED
a000fea8: eb000c29 bl a0012f54 <memcpy> <== NOT EXECUTED
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
a000feac: e5940000 ldr r0, [r4] <== NOT EXECUTED
a000feb0: e08a1005 add r1, sl, r5 <== NOT EXECUTED
a000feb4: e08b1001 add r1, fp, r1 <== NOT EXECUTED
a000feb8: e06a2006 rsb r2, sl, r6 <== NOT EXECUTED
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
a000febc: eb000c24 bl a0012f54 <memcpy> <== NOT EXECUTED
pipe->Length += chunk;
a000fec0: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
a000fec4: e0833006 add r3, r3, r6 <== NOT EXECUTED
a000fec8: e584300c str r3, [r4, #12] <== NOT EXECUTED
if (pipe->waitingReaders > 0)
a000fecc: e5943018 ldr r3, [r4, #24] <== NOT EXECUTED
a000fed0: e3530000 cmp r3, #0 <== NOT EXECUTED
a000fed4: 0a000002 beq a000fee4 <pipe_write+0x15c> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
a000fed8: e594002c ldr r0, [r4, #44] ; 0x2c <== NOT EXECUTED
a000fedc: e1a0100d mov r1, sp <== NOT EXECUTED
a000fee0: eb0002d6 bl a0010a40 <rtems_barrier_release> <== NOT EXECUTED
written += chunk;
a000fee4: e0855006 add r5, r5, r6 <== NOT EXECUTED
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
a000fee8: e3a09001 mov r9, #1 <== NOT EXECUTED
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
a000feec: e1550007 cmp r5, r7 <== NOT EXECUTED
a000fef0: 3affffd7 bcc a000fe54 <pipe_write+0xcc> <== NOT EXECUTED
a000fef4: e3a06000 mov r6, #0 <== NOT EXECUTED
a000fef8: ea000002 b a000ff08 <pipe_write+0x180> <== NOT EXECUTED
while (PIPE_SPACE(pipe) < chunk) {
if (LIBIO_NODELAY(iop)) {
ret = -EAGAIN;
a000fefc: e3e0600a mvn r6, #10 <== NOT EXECUTED
a000ff00: ea000000 b a000ff08 <pipe_write+0x180> <== NOT EXECUTED
pipe->waitingWriters --;
if (ret != 0)
goto out_locked;
if (pipe->Readers == 0) {
ret = -EPIPE;
a000ff04: e3e0601f mvn r6, #31 <== NOT EXECUTED
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
a000ff08: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
a000ff0c: ebffed66 bl a000b4ac <rtems_semaphore_release> <== NOT EXECUTED
a000ff10: ea000000 b a000ff18 <pipe_write+0x190> <== NOT EXECUTED
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
/* WARN waitingWriters not restored! */
ret = -EINTR;
a000ff14: e3e06003 mvn r6, #3 <== NOT EXECUTED
/* Signal SIGPIPE */
if (ret == -EPIPE)
kill(getpid(), SIGPIPE);
#endif
if (written > 0)
a000ff18: e3550000 cmp r5, #0 <== NOT EXECUTED
a000ff1c: c1a00005 movgt r0, r5 <== NOT EXECUTED
a000ff20: d1a00006 movle r0, r6 <== NOT EXECUTED
return written;
return ret;
}
a000ff24: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
a000ae78 <posix_memalign>:
)
{
/*
* Update call statistics
*/
MSBUMP(memalign_calls, 1);
a000ae78: e59fc040 ldr ip, [pc, #64] ; a000aec0 <posix_memalign+0x48><== NOT EXECUTED
int posix_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
a000ae7c: e92d4010 push {r4, lr} <== NOT EXECUTED
/*
* Update call statistics
*/
MSBUMP(memalign_calls, 1);
a000ae80: e59c4008 ldr r4, [ip, #8] <== NOT EXECUTED
a000ae84: e2844001 add r4, r4, #1 <== NOT EXECUTED
a000ae88: e58c4008 str r4, [ip, #8] <== NOT EXECUTED
if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *)))
a000ae8c: e241c001 sub ip, r1, #1 <== NOT EXECUTED
a000ae90: e11c0001 tst ip, r1 <== NOT EXECUTED
a000ae94: 03a0c000 moveq ip, #0 <== NOT EXECUTED
a000ae98: 13a0c001 movne ip, #1 <== NOT EXECUTED
a000ae9c: e3510003 cmp r1, #3 <== NOT EXECUTED
a000aea0: 81a0300c movhi r3, ip <== NOT EXECUTED
a000aea4: 938c3001 orrls r3, ip, #1 <== NOT EXECUTED
a000aea8: e3530000 cmp r3, #0 <== NOT EXECUTED
a000aeac: 1a000001 bne a000aeb8 <posix_memalign+0x40> <== NOT EXECUTED
/*
* rtems_memalign does all of the error checking work EXCEPT
* for adding restrictionso on the alignment.
*/
return rtems_memalign( pointer, alignment, size );
}
a000aeb0: e8bd4010 pop {r4, lr} <== NOT EXECUTED
/*
* rtems_memalign does all of the error checking work EXCEPT
* for adding restrictionso on the alignment.
*/
return rtems_memalign( pointer, alignment, size );
a000aeb4: ea000078 b a000b09c <rtems_memalign> <== NOT EXECUTED
}
a000aeb8: e3a00016 mov r0, #22 <== NOT EXECUTED
a000aebc: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a000831c <printk_plugin>:
int printk_plugin(
void *ignored __attribute__((unused)),
const char *format,
...
)
{
a000831c: e92d000e push {r1, r2, r3} <== NOT EXECUTED
a0008320: e92d4001 push {r0, lr} <== NOT EXECUTED
va_list arg_pointer;
va_start (arg_pointer, format);
vprintk( format, arg_pointer );
a0008324: e59d0008 ldr r0, [sp, #8] <== NOT EXECUTED
...
)
{
va_list arg_pointer;
va_start (arg_pointer, format);
a0008328: e28d100c add r1, sp, #12 <== NOT EXECUTED
a000832c: e58d1000 str r1, [sp] <== NOT EXECUTED
vprintk( format, arg_pointer );
a0008330: eb0006c7 bl a0009e54 <vprintk> <== NOT EXECUTED
va_end(arg_pointer); /* clean up when done */
return 0;
}
a0008334: e3a00000 mov r0, #0 <== NOT EXECUTED
a0008338: e8bd4008 pop {r3, lr} <== NOT EXECUTED
a000833c: e28dd00c add sp, sp, #12 <== NOT EXECUTED
a0008340: e12fff1e bx lr <== NOT EXECUTED
a0015320 <read>:
ssize_t read(
int fd,
void *buffer,
size_t count
)
{
a0015320: e92d4030 push {r4, r5, lr}
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
a0015324: e59f4098 ldr r4, [pc, #152] ; a00153c4 <read+0xa4>
a0015328: e5944000 ldr r4, [r4]
a001532c: e1500004 cmp r0, r4
a0015330: 2a000006 bcs a0015350 <read+0x30>
iop = rtems_libio_iop( fd );
a0015334: e59f408c ldr r4, [pc, #140] ; a00153c8 <read+0xa8>
a0015338: e3a05038 mov r5, #56 ; 0x38
a001533c: e5944000 ldr r4, [r4]
a0015340: e0244095 mla r4, r5, r0, r4
rtems_libio_check_is_open( iop );
a0015344: e5940014 ldr r0, [r4, #20]
a0015348: e3100c01 tst r0, #256 ; 0x100
a001534c: 1a000002 bne a001535c <read+0x3c>
a0015350: ebffebc9 bl a001027c <__errno>
a0015354: e3a03009 mov r3, #9
a0015358: ea000007 b a001537c <read+0x5c>
rtems_libio_check_buffer( buffer );
a001535c: e3510000 cmp r1, #0
a0015360: 0a000003 beq a0015374 <read+0x54>
rtems_libio_check_count( count );
a0015364: e3520000 cmp r2, #0
a0015368: 0a000013 beq a00153bc <read+0x9c>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
a001536c: e3100002 tst r0, #2
a0015370: 1a000004 bne a0015388 <read+0x68>
a0015374: ebffebc0 bl a001027c <__errno> <== NOT EXECUTED
a0015378: e3a03016 mov r3, #22 <== NOT EXECUTED
a001537c: e5803000 str r3, [r0]
a0015380: e3e00000 mvn r0, #0
a0015384: e8bd8030 pop {r4, r5, pc}
/*
* Now process the read().
*/
rc = (*iop->pathinfo.handlers->read_h)( iop, buffer, count );
a0015388: e5943020 ldr r3, [r4, #32]
a001538c: e1a00004 mov r0, r4
a0015390: e5933008 ldr r3, [r3, #8]
a0015394: e12fff33 blx r3
if ( rc > 0 )
a0015398: e3500000 cmp r0, #0
a001539c: da000007 ble a00153c0 <read+0xa0>
iop->offset += rc;
a00153a0: e284300c add r3, r4, #12
a00153a4: e893000c ldm r3, {r2, r3}
a00153a8: e0922000 adds r2, r2, r0
a00153ac: e0a33fc0 adc r3, r3, r0, asr #31
a00153b0: e584200c str r2, [r4, #12]
a00153b4: e5843010 str r3, [r4, #16]
a00153b8: e8bd8030 pop {r4, r5, pc}
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 );
a00153bc: e1a00002 mov r0, r2
if ( rc > 0 )
iop->offset += rc;
return rc;
}
a00153c0: e8bd8030 pop {r4, r5, pc}
a000961c <readlink>:
ssize_t readlink(
const char *pathname,
char *buf,
size_t bufsize
)
{
a000961c: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
a0009620: e2516000 subs r6, r1, #0 <== NOT EXECUTED
ssize_t readlink(
const char *pathname,
char *buf,
size_t bufsize
)
{
a0009624: e24dd018 sub sp, sp, #24 <== NOT EXECUTED
a0009628: e1a07000 mov r7, r0 <== NOT EXECUTED
a000962c: e1a05002 mov r5, r2 <== NOT EXECUTED
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
a0009630: 1a000002 bne a0009640 <readlink+0x24> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EFAULT );
a0009634: eb0026fc bl a001322c <__errno> <== NOT EXECUTED
a0009638: e3a0300e mov r3, #14 <== NOT EXECUTED
a000963c: ea000013 b a0009690 <readlink+0x74> <== NOT EXECUTED
result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ),
a0009640: eb002e6f bl a0015004 <strlen> <== NOT EXECUTED
a0009644: e28d4004 add r4, sp, #4 <== NOT EXECUTED
a0009648: e1a01000 mov r1, r0 <== NOT EXECUTED
a000964c: e3a02000 mov r2, #0 <== NOT EXECUTED
a0009650: e1a00007 mov r0, r7 <== NOT EXECUTED
a0009654: e1a03004 mov r3, r4 <== NOT EXECUTED
a0009658: e58d2000 str r2, [sp] <== NOT EXECUTED
a000965c: ebfffbab bl a0008510 <rtems_filesystem_evaluate_path> <== NOT EXECUTED
0, &loc, false );
if ( result != 0 )
a0009660: e3500000 cmp r0, #0 <== NOT EXECUTED
a0009664: 1a000016 bne a00096c4 <readlink+0xa8> <== NOT EXECUTED
return -1;
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
a0009668: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
a000966c: e1a00004 mov r0, r4 <== NOT EXECUTED
a0009670: e5933010 ldr r3, [r3, #16] <== NOT EXECUTED
a0009674: e12fff33 blx r3 <== NOT EXECUTED
a0009678: e3500004 cmp r0, #4 <== NOT EXECUTED
a000967c: 0a000005 beq a0009698 <readlink+0x7c> <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
a0009680: e1a00004 mov r0, r4 <== NOT EXECUTED
a0009684: ebfffbd1 bl a00085d0 <rtems_filesystem_freenode> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
a0009688: eb0026e7 bl a001322c <__errno> <== NOT EXECUTED
a000968c: e3a03016 mov r3, #22 <== NOT EXECUTED
a0009690: e5803000 str r3, [r0] <== NOT EXECUTED
a0009694: ea00000a b a00096c4 <readlink+0xa8> <== NOT EXECUTED
}
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
a0009698: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
a000969c: e1a02005 mov r2, r5 <== NOT EXECUTED
a00096a0: e1a01006 mov r1, r6 <== NOT EXECUTED
a00096a4: e593303c ldr r3, [r3, #60] ; 0x3c <== NOT EXECUTED
a00096a8: e1a00004 mov r0, r4 <== NOT EXECUTED
a00096ac: e12fff33 blx r3 <== NOT EXECUTED
a00096b0: e1a05000 mov r5, r0 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
a00096b4: e1a00004 mov r0, r4 <== NOT EXECUTED
a00096b8: ebfffbc4 bl a00085d0 <rtems_filesystem_freenode> <== NOT EXECUTED
return result;
a00096bc: e1a00005 mov r0, r5 <== NOT EXECUTED
a00096c0: ea000000 b a00096c8 <readlink+0xac> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EFAULT );
result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ),
0, &loc, false );
if ( result != 0 )
return -1;
a00096c4: e3e00000 mvn r0, #0 <== NOT EXECUTED
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
rtems_filesystem_freenode( &loc );
return result;
}
a00096c8: e28dd018 add sp, sp, #24 <== NOT EXECUTED
a00096cc: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
a0008074 <readv>:
int v;
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
a0008074: e59f3134 ldr r3, [pc, #308] ; a00081b0 <readv+0x13c>
ssize_t readv(
int fd,
const struct iovec *iov,
int iovcnt
)
{
a0008078: e92d41f0 push {r4, r5, r6, r7, r8, lr}
int v;
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
a000807c: e5933000 ldr r3, [r3]
ssize_t readv(
int fd,
const struct iovec *iov,
int iovcnt
)
{
a0008080: e1a08002 mov r8, r2
int v;
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
a0008084: e1500003 cmp r0, r3
a0008088: 2a000006 bcs a00080a8 <readv+0x34>
iop = rtems_libio_iop( fd );
a000808c: e59f3120 ldr r3, [pc, #288] ; a00081b4 <readv+0x140>
a0008090: e3a06038 mov r6, #56 ; 0x38
a0008094: e5933000 ldr r3, [r3]
a0008098: e0263690 mla r6, r0, r6, r3
rtems_libio_check_is_open( iop );
a000809c: e5963014 ldr r3, [r6, #20]
a00080a0: e3130c01 tst r3, #256 ; 0x100
a00080a4: 1a000002 bne a00080b4 <readv+0x40>
a00080a8: eb002457 bl a001120c <__errno>
a00080ac: e3a03009 mov r3, #9
a00080b0: ea000017 b a0008114 <readv+0xa0> <== NOT EXECUTED
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
a00080b4: e3130002 tst r3, #2
a00080b8: 0a000013 beq a000810c <readv+0x98>
/*
* Argument validation on IO vector
*/
if ( !iov )
a00080bc: e3510000 cmp r1, #0
a00080c0: 0a000011 beq a000810c <readv+0x98>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
a00080c4: e3520000 cmp r2, #0
a00080c8: da00000f ble a000810c <readv+0x98>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
a00080cc: e3520b01 cmp r2, #1024 ; 0x400 <== NOT EXECUTED
a00080d0: ca00000d bgt a000810c <readv+0x98> <== NOT EXECUTED
a00080d4: e3a03000 mov r3, #0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
a00080d8: e1a05001 mov r5, r1 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
a00080dc: e1a02001 mov r2, r1 <== NOT EXECUTED
a00080e0: e3a07001 mov r7, #1 <== NOT EXECUTED
a00080e4: e1a01003 mov r1, r3 <== NOT EXECUTED
a00080e8: ea000000 b a00080f0 <readv+0x7c> <== NOT EXECUTED
if ( iov[v].iov_base == 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
a00080ec: e1a0100c mov r1, ip <== NOT EXECUTED
/*
* 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 )
a00080f0: e5920000 ldr r0, [r2] <== NOT EXECUTED
a00080f4: e3500000 cmp r0, #0 <== NOT EXECUTED
a00080f8: 0a000003 beq a000810c <readv+0x98> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
a00080fc: e5920004 ldr r0, [r2, #4] <== NOT EXECUTED
a0008100: e081c000 add ip, r1, r0 <== NOT EXECUTED
if ( total < old )
a0008104: e15c0001 cmp ip, r1 <== NOT EXECUTED
a0008108: aa000003 bge a000811c <readv+0xa8> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
a000810c: eb00243e bl a001120c <__errno>
a0008110: e3a03016 mov r3, #22
a0008114: e5803000 str r3, [r0]
a0008118: ea000021 b a00081a4 <readv+0x130>
if ( iov[v].iov_len )
all_zeros = false;
a000811c: e3500000 cmp r0, #0
* 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++ ) {
a0008120: e2833001 add r3, r3, #1
total += iov[v].iov_len;
if ( total < old )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
all_zeros = false;
a0008124: 13a07000 movne r7, #0
* 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++ ) {
a0008128: e1530008 cmp r3, r8
a000812c: e2822008 add r2, r2, #8 <== NOT EXECUTED
a0008130: baffffed blt a00080ec <readv+0x78> <== NOT EXECUTED
/*
* 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 ) {
a0008134: e3570000 cmp r7, #0 <== NOT EXECUTED
return 0;
a0008138: 13a04000 movne r4, #0 <== NOT EXECUTED
/*
* 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 ) {
a000813c: 1a000019 bne a00081a8 <readv+0x134> <== NOT EXECUTED
a0008140: e1a04007 mov r4, r7 <== NOT EXECUTED
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
bytes = (*iop->pathinfo.handlers->read_h)(
a0008144: e5963020 ldr r3, [r6, #32] <== NOT EXECUTED
a0008148: e1a00006 mov r0, r6 <== NOT EXECUTED
a000814c: e5951000 ldr r1, [r5] <== NOT EXECUTED
a0008150: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED
a0008154: e5952004 ldr r2, [r5, #4] <== NOT EXECUTED
a0008158: e12fff33 blx r3 <== NOT EXECUTED
iop,
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
a000815c: e3500000 cmp r0, #0 <== NOT EXECUTED
a0008160: ba00000f blt a00081a4 <readv+0x130> <== NOT EXECUTED
return -1;
if ( bytes > 0 ) {
a0008164: 0a000006 beq a0008184 <readv+0x110> <== NOT EXECUTED
iop->offset += bytes;
a0008168: e286300c add r3, r6, #12 <== NOT EXECUTED
a000816c: e893000c ldm r3, {r2, r3} <== NOT EXECUTED
a0008170: e0922000 adds r2, r2, r0 <== NOT EXECUTED
a0008174: e0a33fc0 adc r3, r3, r0, asr #31 <== NOT EXECUTED
a0008178: e586200c str r2, [r6, #12] <== NOT EXECUTED
a000817c: e5863010 str r3, [r6, #16] <== NOT EXECUTED
total += bytes;
a0008180: e0844000 add r4, r4, r0 <== NOT EXECUTED
}
if (bytes != iov[ v ].iov_len)
a0008184: e5953004 ldr r3, [r5, #4] <== NOT EXECUTED
a0008188: e1500003 cmp r0, r3 <== NOT EXECUTED
a000818c: 1a000005 bne a00081a8 <readv+0x134> <== NOT EXECUTED
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
a0008190: e2877001 add r7, r7, #1 <== NOT EXECUTED
a0008194: e1570008 cmp r7, r8 <== NOT EXECUTED
a0008198: e2855008 add r5, r5, #8 <== NOT EXECUTED
a000819c: baffffe8 blt a0008144 <readv+0xd0> <== NOT EXECUTED
a00081a0: ea000000 b a00081a8 <readv+0x134> <== NOT EXECUTED
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
return -1;
a00081a4: e3e04000 mvn r4, #0
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
a00081a8: e1a00004 mov r0, r4
a00081ac: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
a0015434 <realloc>:
)
{
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
a0015434: e59f310c ldr r3, [pc, #268] ; a0015548 <realloc+0x114>
void *realloc(
void *ptr,
size_t size
)
{
a0015438: e92d40f1 push {r0, r4, r5, r6, r7, lr}
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
a001543c: e5932010 ldr r2, [r3, #16]
void *realloc(
void *ptr,
size_t size
)
{
a0015440: e1a04000 mov r4, r0
a0015444: e1a05001 mov r5, r1
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
a0015448: e2822001 add r2, r2, #1
a001544c: e5832010 str r2, [r3, #16]
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
a0015450: e59f30f4 ldr r3, [pc, #244] ; a001554c <realloc+0x118>
a0015454: e5933000 ldr r3, [r3]
a0015458: e3530003 cmp r3, #3
a001545c: 1a000009 bne a0015488 <realloc+0x54>
if (_Thread_Dispatch_disable_level > 0)
a0015460: e59f30e8 ldr r3, [pc, #232] ; a0015550 <realloc+0x11c>
a0015464: e5933000 ldr r3, [r3]
a0015468: e3530000 cmp r3, #0
return (void *) 0;
a001546c: 13a04000 movne r4, #0
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
if (_Thread_Dispatch_disable_level > 0)
a0015470: 1a000032 bne a0015540 <realloc+0x10c>
return (void *) 0;
if (_ISR_Nest_level > 0)
a0015474: e59f20d8 ldr r2, [pc, #216] ; a0015554 <realloc+0x120>
a0015478: e5922000 ldr r2, [r2]
a001547c: e3520000 cmp r2, #0
return (void *) 0;
a0015480: 11a04003 movne r4, r3
if (_System_state_Is_up(_System_state_Get())) {
if (_Thread_Dispatch_disable_level > 0)
return (void *) 0;
if (_ISR_Nest_level > 0)
a0015484: 1a00002d bne a0015540 <realloc+0x10c>
}
/*
* Continue with realloc().
*/
if ( !ptr )
a0015488: e3540000 cmp r4, #0
a001548c: 1a000003 bne a00154a0 <realloc+0x6c>
return malloc( size );
a0015490: e1a00005 mov r0, r5
a0015494: ebffc42a bl a0006544 <malloc>
a0015498: e1a04000 mov r4, r0
a001549c: ea000027 b a0015540 <realloc+0x10c>
if ( !size ) {
a00154a0: e3550000 cmp r5, #0
a00154a4: 1a000003 bne a00154b8 <realloc+0x84>
free( ptr );
a00154a8: e1a00004 mov r0, r4 <== NOT EXECUTED
a00154ac: ebffc346 bl a00061cc <free> <== NOT EXECUTED
return (void *) 0;
a00154b0: e1a04005 mov r4, r5 <== NOT EXECUTED
a00154b4: ea000021 b a0015540 <realloc+0x10c> <== NOT EXECUTED
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
a00154b8: e59f6098 ldr r6, [pc, #152] ; a0015558 <realloc+0x124>
a00154bc: e1a01004 mov r1, r4
a00154c0: e1a0200d mov r2, sp
a00154c4: e5960000 ldr r0, [r6]
a00154c8: eb00004e bl a0015608 <_Protected_heap_Get_block_size>
a00154cc: e2507000 subs r7, r0, #0
a00154d0: 1a000004 bne a00154e8 <realloc+0xb4>
errno = EINVAL;
a00154d4: ebffeb68 bl a001027c <__errno> <== NOT EXECUTED
a00154d8: e3a03016 mov r3, #22 <== NOT EXECUTED
a00154dc: e5803000 str r3, [r0] <== NOT EXECUTED
return (void *) 0;
a00154e0: e1a04007 mov r4, r7 <== NOT EXECUTED
a00154e4: ea000015 b a0015540 <realloc+0x10c> <== NOT EXECUTED
}
/*
* Now resize it.
*/
if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, size ) ) {
a00154e8: e5960000 ldr r0, [r6]
a00154ec: e1a01004 mov r1, r4
a00154f0: e1a02005 mov r2, r5
a00154f4: eb000054 bl a001564c <_Protected_heap_Resize_block>
a00154f8: e3500000 cmp r0, #0
a00154fc: 1a00000f bne a0015540 <realloc+0x10c>
* 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 );
a0015500: e1a00005 mov r0, r5
a0015504: ebffc40e bl a0006544 <malloc>
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
a0015508: e59f3038 ldr r3, [pc, #56] ; a0015548 <realloc+0x114>
if ( !new_area ) {
a001550c: e2506000 subs r6, r0, #0
* and the C Standard.
*/
new_area = malloc( size );
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
a0015510: e5932004 ldr r2, [r3, #4]
a0015514: e2422001 sub r2, r2, #1
a0015518: e5832004 str r2, [r3, #4]
if ( !new_area ) {
a001551c: 0a000006 beq a001553c <realloc+0x108>
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
a0015520: e59d2000 ldr r2, [sp] <== NOT EXECUTED
a0015524: e1a01004 mov r1, r4 <== NOT EXECUTED
a0015528: e1550002 cmp r5, r2 <== NOT EXECUTED
a001552c: 31a02005 movcc r2, r5 <== NOT EXECUTED
a0015530: ebffed7f bl a0010b34 <memcpy> <== NOT EXECUTED
free( ptr );
a0015534: e1a00004 mov r0, r4 <== NOT EXECUTED
a0015538: ebffc323 bl a00061cc <free> <== NOT EXECUTED
new_area = malloc( size );
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
if ( !new_area ) {
return (void *) 0;
a001553c: e1a04006 mov r4, r6
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
a0015540: e1a00004 mov r0, r4
a0015544: e8bd80f8 pop {r3, r4, r5, r6, r7, pc}
a0007408 <rmdir>:
#include <rtems/seterr.h>
int rmdir(
const char *pathname
)
{
a0007408: e92d40f0 push {r4, r5, r6, r7, lr}
a000740c: e24dd030 sub sp, sp, #48 ; 0x30
a0007410: e1a06000 mov r6, r0
/*
* Get the parent node of the node we wish to remove. Find the parent path.
*/
parentpathlen = rtems_filesystem_dirname ( pathname );
a0007414: ebfffc65 bl a00065b0 <rtems_filesystem_dirname>
if ( parentpathlen == 0 )
a0007418: e2504000 subs r4, r0, #0
a000741c: e28d3018 add r3, sp, #24
a0007420: 1a000005 bne a000743c <rmdir+0x34>
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
a0007424: e1a00006 mov r0, r6
a0007428: e28d102c add r1, sp, #44 ; 0x2c
a000742c: e1a02003 mov r2, r3
a0007430: eb000049 bl a000755c <rtems_filesystem_get_start_loc>
const char *name;
rtems_filesystem_location_info_t parentloc;
rtems_filesystem_location_info_t loc;
int i;
int result;
bool free_parentloc = false;
a0007434: e1a05004 mov r5, r4
a0007438: ea000008 b a0007460 <rmdir+0x58>
parentpathlen = rtems_filesystem_dirname ( pathname );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
else {
result = rtems_filesystem_evaluate_path(pathname, parentpathlen,
a000743c: e3a02000 mov r2, #0
a0007440: e58d2000 str r2, [sp]
a0007444: e1a00006 mov r0, r6
a0007448: e1a01004 mov r1, r4
a000744c: e2822002 add r2, r2, #2
a0007450: ebfffc43 bl a0006564 <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
a0007454: e3500000 cmp r0, #0
a0007458: 1a00003b bne a000754c <rmdir+0x144>
return -1;
free_parentloc = true;
a000745c: e3a05001 mov r5, #1
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
a0007460: e28dc004 add ip, sp, #4
a0007464: e28de018 add lr, sp, #24
a0007468: e8be000f ldm lr!, {r0, r1, r2, r3}
a000746c: e8ac000f stmia ip!, {r0, r1, r2, r3}
a0007470: e59e3000 ldr r3, [lr]
name = pathname + parentpathlen;
a0007474: e0864004 add r4, r6, r4
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
a0007478: e1a00004 mov r0, r4
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
a000747c: e58c3000 str r3, [ip]
name = pathname + parentpathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
a0007480: eb002939 bl a001196c <strlen>
a0007484: e1a01000 mov r1, r0
a0007488: e1a00004 mov r0, r4
a000748c: ebfffc55 bl a00065e8 <rtems_filesystem_prefix_separators>
a0007490: e0846000 add r6, r4, r0
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
a0007494: e1a00006 mov r0, r6
a0007498: eb002933 bl a001196c <strlen>
a000749c: e28d4004 add r4, sp, #4
a00074a0: e1a01000 mov r1, r0
a00074a4: e3a02000 mov r2, #0
a00074a8: e1a00006 mov r0, r6
a00074ac: e1a03004 mov r3, r4
a00074b0: e58d2000 str r2, [sp]
a00074b4: ebfffc0e bl a00064f4 <rtems_filesystem_evaluate_relative_path>
0, &loc, false );
if ( result != 0 ) {
a00074b8: e3500000 cmp r0, #0
a00074bc: 0a000004 beq a00074d4 <rmdir+0xcc>
if ( free_parentloc )
a00074c0: e3550000 cmp r5, #0
a00074c4: 0a000020 beq a000754c <rmdir+0x144> <== NOT EXECUTED
rtems_filesystem_freenode( &parentloc );
a00074c8: e28d0018 add r0, sp, #24 <== NOT EXECUTED
a00074cc: ebfffc54 bl a0006624 <rtems_filesystem_freenode> <== NOT EXECUTED
a00074d0: ea00001d b a000754c <rmdir+0x144> <== NOT EXECUTED
}
/*
* Verify you can remove this node as a directory.
*/
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
a00074d4: e59d3010 ldr r3, [sp, #16]
a00074d8: e1a00004 mov r0, r4
a00074dc: e5933010 ldr r3, [r3, #16]
a00074e0: e12fff33 blx r3
a00074e4: e3500001 cmp r0, #1
a00074e8: 0a000009 beq a0007514 <rmdir+0x10c>
rtems_filesystem_freenode( &loc );
a00074ec: e1a00004 mov r0, r4 <== NOT EXECUTED
a00074f0: ebfffc4b bl a0006624 <rtems_filesystem_freenode> <== NOT EXECUTED
if ( free_parentloc )
a00074f4: e3550000 cmp r5, #0 <== NOT EXECUTED
a00074f8: 0a000001 beq a0007504 <rmdir+0xfc> <== NOT EXECUTED
rtems_filesystem_freenode( &parentloc );
a00074fc: e28d0018 add r0, sp, #24 <== NOT EXECUTED
a0007500: ebfffc47 bl a0006624 <rtems_filesystem_freenode> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTDIR );
a0007504: eb002559 bl a0010a70 <__errno> <== NOT EXECUTED
a0007508: e3a03014 mov r3, #20 <== NOT EXECUTED
a000750c: e5803000 str r3, [r0] <== NOT EXECUTED
a0007510: ea00000d b a000754c <rmdir+0x144> <== NOT EXECUTED
/*
* Use the filesystems rmnod to remove the node.
*/
result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
a0007514: e59d300c ldr r3, [sp, #12]
a0007518: e28d6018 add r6, sp, #24
a000751c: e1a01004 mov r1, r4
a0007520: e5933034 ldr r3, [r3, #52] ; 0x34
a0007524: e1a00006 mov r0, r6
a0007528: e12fff33 blx r3
a000752c: e1a07000 mov r7, r0
rtems_filesystem_freenode( &loc );
a0007530: e1a00004 mov r0, r4
a0007534: ebfffc3a bl a0006624 <rtems_filesystem_freenode>
if ( free_parentloc )
a0007538: e3550000 cmp r5, #0
a000753c: 0a000003 beq a0007550 <rmdir+0x148>
rtems_filesystem_freenode( &parentloc );
a0007540: e1a00006 mov r0, r6
a0007544: ebfffc36 bl a0006624 <rtems_filesystem_freenode>
a0007548: ea000000 b a0007550 <rmdir+0x148>
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return -1;
a000754c: e3e07000 mvn r7, #0 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return result;
}
a0007550: e1a00007 mov r0, r7
a0007554: e28dd030 add sp, sp, #48 ; 0x30
a0007558: e8bd80f0 pop {r4, r5, r6, r7, pc}
a00150c8 <rtems_assoc_name_bad>:
sprintf(bad_buffer, "< %" PRId32 "[0x%" PRIx32 " ] >", bad_value, bad_value);
#else
static char bad_buffer[40] = "<assocnamebad.c: : BAD NAME>";
#endif
return bad_buffer;
}
a00150c8: e59f0000 ldr r0, [pc, #0] ; a00150d0 <rtems_assoc_name_bad+0x8><== NOT EXECUTED
a00150cc: e12fff1e bx lr <== NOT EXECUTED
a001290c <rtems_assoc_name_by_local>:
const char *rtems_assoc_name_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
a001290c: e92d4010 push {r4, lr}
a0012910: e1a04001 mov r4, r1
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_local(ap, local_value);
a0012914: eb000006 bl a0012934 <rtems_assoc_ptr_by_local>
if (nap)
a0012918: e3500000 cmp r0, #0
a001291c: 0a000001 beq a0012928 <rtems_assoc_name_by_local+0x1c>
return nap->name;
return rtems_assoc_name_bad(local_value);
}
a0012920: e5900000 ldr r0, [r0]
a0012924: e8bd8010 pop {r4, pc}
nap = rtems_assoc_ptr_by_local(ap, local_value);
if (nap)
return nap->name;
return rtems_assoc_name_bad(local_value);
a0012928: e1a00004 mov r0, r4
}
a001292c: e8bd4010 pop {r4, lr} <== NOT EXECUTED
nap = rtems_assoc_ptr_by_local(ap, local_value);
if (nap)
return nap->name;
return rtems_assoc_name_bad(local_value);
a0012930: ea0009e4 b a00150c8 <rtems_assoc_name_bad> <== NOT EXECUTED
a0006b34 <rtems_assoc_name_by_local_bitfield>:
char *buffer
)
{
uint32_t b;
*buffer = 0;
a0006b34: e3a03000 mov r3, #0 <== NOT EXECUTED
char *rtems_assoc_name_by_local_bitfield(
const rtems_assoc_t *ap,
uint32_t value,
char *buffer
)
{
a0006b38: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
uint32_t b;
*buffer = 0;
a0006b3c: e5c23000 strb r3, [r2] <== NOT EXECUTED
char *rtems_assoc_name_by_local_bitfield(
const rtems_assoc_t *ap,
uint32_t value,
char *buffer
)
{
a0006b40: e1a05000 mov r5, r0 <== NOT EXECUTED
a0006b44: e1a04001 mov r4, r1 <== NOT EXECUTED
a0006b48: e1a06002 mov r6, r2 <== NOT EXECUTED
uint32_t b;
*buffer = 0;
a0006b4c: e3a08020 mov r8, #32 <== NOT EXECUTED
for (b = 1; b; b <<= 1) {
a0006b50: e3a07001 mov r7, #1 <== NOT EXECUTED
if (b & value) {
a0006b54: e1170004 tst r7, r4 <== NOT EXECUTED
a0006b58: 0a00000b beq a0006b8c <rtems_assoc_name_by_local_bitfield+0x58><== NOT EXECUTED
if (*buffer)
a0006b5c: e5d63000 ldrb r3, [r6] <== NOT EXECUTED
a0006b60: e3530000 cmp r3, #0 <== NOT EXECUTED
a0006b64: 0a000002 beq a0006b74 <rtems_assoc_name_by_local_bitfield+0x40><== NOT EXECUTED
strcat(buffer, " ");
a0006b68: e1a00006 mov r0, r6 <== NOT EXECUTED
a0006b6c: e59f102c ldr r1, [pc, #44] ; a0006ba0 <rtems_assoc_name_by_local_bitfield+0x6c><== NOT EXECUTED
a0006b70: eb002bf1 bl a0011b3c <strcat> <== NOT EXECUTED
strcat(buffer, rtems_assoc_name_by_local(ap, b));
a0006b74: e1a01007 mov r1, r7 <== NOT EXECUTED
a0006b78: e1a00005 mov r0, r5 <== NOT EXECUTED
a0006b7c: eb000008 bl a0006ba4 <rtems_assoc_name_by_local> <== NOT EXECUTED
a0006b80: e1a01000 mov r1, r0 <== NOT EXECUTED
a0006b84: e1a00006 mov r0, r6 <== NOT EXECUTED
a0006b88: eb002beb bl a0011b3c <strcat> <== NOT EXECUTED
{
uint32_t b;
*buffer = 0;
for (b = 1; b; b <<= 1) {
a0006b8c: e2588001 subs r8, r8, #1 <== NOT EXECUTED
a0006b90: e1a07087 lsl r7, r7, #1 <== NOT EXECUTED
a0006b94: 1affffee bne a0006b54 <rtems_assoc_name_by_local_bitfield+0x20><== NOT EXECUTED
strcat(buffer, rtems_assoc_name_by_local(ap, b));
}
}
return buffer;
}
a0006b98: e1a00006 mov r0, r6 <== NOT EXECUTED
a0006b9c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
a0006c3c <rtems_assoc_name_by_remote>:
const char *rtems_assoc_name_by_remote(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
a0006c3c: e92d4010 push {r4, lr} <== NOT EXECUTED
a0006c40: e1a04001 mov r4, r1 <== NOT EXECUTED
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_remote(ap, remote_value);
a0006c44: eb000038 bl a0006d2c <rtems_assoc_ptr_by_remote> <== NOT EXECUTED
if (nap)
a0006c48: e3500000 cmp r0, #0 <== NOT EXECUTED
a0006c4c: 0a000001 beq a0006c58 <rtems_assoc_name_by_remote+0x1c> <== NOT EXECUTED
return nap->name;
return rtems_assoc_name_bad(remote_value);
}
a0006c50: e5900000 ldr r0, [r0] <== NOT EXECUTED
a0006c54: e8bd8010 pop {r4, pc} <== NOT EXECUTED
nap = rtems_assoc_ptr_by_remote(ap, remote_value);
if (nap)
return nap->name;
return rtems_assoc_name_bad(remote_value);
a0006c58: e1a00004 mov r0, r4 <== NOT EXECUTED
}
a0006c5c: e8bd4010 pop {r4, lr} <== NOT EXECUTED
nap = rtems_assoc_ptr_by_remote(ap, remote_value);
if (nap)
return nap->name;
return rtems_assoc_name_bad(remote_value);
a0006c60: ea001e79 b a000e64c <rtems_assoc_name_bad> <== NOT EXECUTED
a0006bcc <rtems_assoc_name_by_remote_bitfield>:
char *buffer
)
{
uint32_t b;
*buffer = 0;
a0006bcc: e3a03000 mov r3, #0 <== NOT EXECUTED
char *rtems_assoc_name_by_remote_bitfield(
const rtems_assoc_t *ap,
uint32_t value,
char *buffer
)
{
a0006bd0: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
uint32_t b;
*buffer = 0;
a0006bd4: e5c23000 strb r3, [r2] <== NOT EXECUTED
char *rtems_assoc_name_by_remote_bitfield(
const rtems_assoc_t *ap,
uint32_t value,
char *buffer
)
{
a0006bd8: e1a05000 mov r5, r0 <== NOT EXECUTED
a0006bdc: e1a04001 mov r4, r1 <== NOT EXECUTED
a0006be0: e1a06002 mov r6, r2 <== NOT EXECUTED
uint32_t b;
*buffer = 0;
a0006be4: e3a08020 mov r8, #32 <== NOT EXECUTED
for (b = 1; b; b <<= 1) {
a0006be8: e3a07001 mov r7, #1 <== NOT EXECUTED
if (b & value) {
a0006bec: e1170004 tst r7, r4 <== NOT EXECUTED
a0006bf0: 0a00000b beq a0006c24 <rtems_assoc_name_by_remote_bitfield+0x58><== NOT EXECUTED
if (*buffer)
a0006bf4: e5d63000 ldrb r3, [r6] <== NOT EXECUTED
a0006bf8: e3530000 cmp r3, #0 <== NOT EXECUTED
a0006bfc: 0a000002 beq a0006c0c <rtems_assoc_name_by_remote_bitfield+0x40><== NOT EXECUTED
strcat(buffer, " ");
a0006c00: e1a00006 mov r0, r6 <== NOT EXECUTED
a0006c04: e59f102c ldr r1, [pc, #44] ; a0006c38 <rtems_assoc_name_by_remote_bitfield+0x6c><== NOT EXECUTED
a0006c08: eb002bcb bl a0011b3c <strcat> <== NOT EXECUTED
strcat(buffer, rtems_assoc_name_by_remote(ap, b));
a0006c0c: e1a01007 mov r1, r7 <== NOT EXECUTED
a0006c10: e1a00005 mov r0, r5 <== NOT EXECUTED
a0006c14: eb000008 bl a0006c3c <rtems_assoc_name_by_remote> <== NOT EXECUTED
a0006c18: e1a01000 mov r1, r0 <== NOT EXECUTED
a0006c1c: e1a00006 mov r0, r6 <== NOT EXECUTED
a0006c20: eb002bc5 bl a0011b3c <strcat> <== NOT EXECUTED
{
uint32_t b;
*buffer = 0;
for (b = 1; b; b <<= 1) {
a0006c24: e2588001 subs r8, r8, #1 <== NOT EXECUTED
a0006c28: e1a07087 lsl r7, r7, #1 <== NOT EXECUTED
a0006c2c: 1affffee bne a0006bec <rtems_assoc_name_by_remote_bitfield+0x20><== NOT EXECUTED
strcat(buffer, rtems_assoc_name_by_remote(ap, b));
}
}
return buffer;
}
a0006c30: e1a00006 mov r0, r6 <== NOT EXECUTED
a0006c34: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
a0012934 <rtems_assoc_ptr_by_local>:
const rtems_assoc_t *rtems_assoc_ptr_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
a0012934: e92d4030 push {r4, r5, lr}
a0012938: e1a04000 mov r4, r0
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
a001293c: e5900000 ldr r0, [r0]
const rtems_assoc_t *rtems_assoc_ptr_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
a0012940: e1a05001 mov r5, r1
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
a0012944: e3500000 cmp r0, #0
a0012948: 0a00000a beq a0012978 <rtems_assoc_ptr_by_local+0x44>
a001294c: e59f103c ldr r1, [pc, #60] ; a0012990 <rtems_assoc_ptr_by_local+0x5c>
a0012950: eb000eb9 bl a001643c <strcmp>
a0012954: e3500000 cmp r0, #0
default_ap = ap++;
a0012958: 01a00004 moveq r0, r4
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;
a001295c: 13a00000 movne r0, #0
if (rtems_assoc_is_default(ap))
a0012960: 1a000004 bne a0012978 <rtems_assoc_ptr_by_local+0x44>
a0012964: ea000002 b a0012974 <rtems_assoc_ptr_by_local+0x40>
default_ap = ap++;
for ( ; ap->name; ap++)
if (ap->local_value == local_value)
a0012968: e5943004 ldr r3, [r4, #4]
a001296c: e1530005 cmp r3, r5
a0012970: 0a000004 beq a0012988 <rtems_assoc_ptr_by_local+0x54>
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
a0012974: e284400c add r4, r4, #12
a0012978: e5943000 ldr r3, [r4]
a001297c: e3530000 cmp r3, #0
a0012980: 1afffff8 bne a0012968 <rtems_assoc_ptr_by_local+0x34>
if (ap->local_value == local_value)
return ap;
return default_ap;
a0012984: e1a04000 mov r4, r0
}
a0012988: e1a00004 mov r0, r4
a001298c: e8bd8030 pop {r4, r5, pc}
a0006cc4 <rtems_assoc_ptr_by_name>:
const rtems_assoc_t *rtems_assoc_ptr_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
a0006cc4: e92d4070 push {r4, r5, r6, lr}
a0006cc8: e1a04000 mov r4, r0
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
a0006ccc: e5900000 ldr r0, [r0]
const rtems_assoc_t *rtems_assoc_ptr_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
a0006cd0: e1a06001 mov r6, r1
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
a0006cd4: e3500000 cmp r0, #0
const rtems_assoc_t *rtems_assoc_ptr_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
const rtems_assoc_t *default_ap = 0;
a0006cd8: 01a05000 moveq r5, r0
if (rtems_assoc_is_default(ap))
a0006cdc: 0a00000b beq a0006d10 <rtems_assoc_ptr_by_name+0x4c>
a0006ce0: e59f1040 ldr r1, [pc, #64] ; a0006d28 <rtems_assoc_ptr_by_name+0x64>
a0006ce4: eb002bbf bl a0011be8 <strcmp>
a0006ce8: e3500000 cmp r0, #0
default_ap = ap++;
a0006cec: 01a05004 moveq r5, r4
const rtems_assoc_t *rtems_assoc_ptr_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
const rtems_assoc_t *default_ap = 0;
a0006cf0: 13a05000 movne r5, #0
if (rtems_assoc_is_default(ap))
a0006cf4: 1a000005 bne a0006d10 <rtems_assoc_ptr_by_name+0x4c>
a0006cf8: ea000003 b a0006d0c <rtems_assoc_ptr_by_name+0x48> <== NOT EXECUTED
default_ap = ap++;
for ( ; ap->name; ap++)
if (strcmp(ap->name, name) == 0)
a0006cfc: e1a01006 mov r1, r6
a0006d00: eb002bb8 bl a0011be8 <strcmp>
a0006d04: e3500000 cmp r0, #0
a0006d08: 0a000004 beq a0006d20 <rtems_assoc_ptr_by_name+0x5c>
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
a0006d0c: e284400c add r4, r4, #12
a0006d10: e5940000 ldr r0, [r4]
a0006d14: e3500000 cmp r0, #0
a0006d18: 1afffff7 bne a0006cfc <rtems_assoc_ptr_by_name+0x38>
if (strcmp(ap->name, name) == 0)
return ap;
return default_ap;
a0006d1c: e1a04005 mov r4, r5
}
a0006d20: e1a00004 mov r0, r4
a0006d24: e8bd8070 pop {r4, r5, r6, pc}
a000fdcc <rtems_assoc_ptr_by_remote>:
const rtems_assoc_t *rtems_assoc_ptr_by_remote(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
a000fdcc: e92d4030 push {r4, r5, lr}
a000fdd0: e1a04000 mov r4, r0
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
a000fdd4: e5900000 ldr r0, [r0]
const rtems_assoc_t *rtems_assoc_ptr_by_remote(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
a000fdd8: e1a05001 mov r5, r1
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
a000fddc: e3500000 cmp r0, #0
a000fde0: 0a00000a beq a000fe10 <rtems_assoc_ptr_by_remote+0x44>
a000fde4: e59f103c ldr r1, [pc, #60] ; a000fe28 <rtems_assoc_ptr_by_remote+0x5c>
a000fde8: eb000431 bl a0010eb4 <strcmp>
a000fdec: e3500000 cmp r0, #0
default_ap = ap++;
a000fdf0: 01a00004 moveq r0, r4
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;
a000fdf4: 13a00000 movne r0, #0
if (rtems_assoc_is_default(ap))
a000fdf8: 1a000004 bne a000fe10 <rtems_assoc_ptr_by_remote+0x44>
a000fdfc: ea000002 b a000fe0c <rtems_assoc_ptr_by_remote+0x40> <== NOT EXECUTED
default_ap = ap++;
for ( ; ap->name; ap++)
if (ap->remote_value == remote_value)
a000fe00: e5943008 ldr r3, [r4, #8]
a000fe04: e1530005 cmp r3, r5
a000fe08: 0a000004 beq a000fe20 <rtems_assoc_ptr_by_remote+0x54>
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
a000fe0c: e284400c add r4, r4, #12
a000fe10: e5943000 ldr r3, [r4]
a000fe14: e3530000 cmp r3, #0
a000fe18: 1afffff8 bne a000fe00 <rtems_assoc_ptr_by_remote+0x34>
if (ap->remote_value == remote_value)
return ap;
return default_ap;
a000fe1c: e1a04000 mov r4, r0
}
a000fe20: e1a00004 mov r0, r4
a000fe24: e8bd8030 pop {r4, r5, pc}
a0006dd0 <rtems_assoc_remote_by_local>:
uint32_t rtems_assoc_remote_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
a0006dd0: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_local(ap, local_value);
a0006dd4: ebffffa2 bl a0006c64 <rtems_assoc_ptr_by_local> <== NOT EXECUTED
if (nap)
a0006dd8: e3500000 cmp r0, #0 <== NOT EXECUTED
return nap->remote_value;
a0006ddc: 15900008 ldrne r0, [r0, #8] <== NOT EXECUTED
return 0;
}
a0006de0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a0006d8c <rtems_assoc_remote_by_local_bitfield>:
uint32_t rtems_assoc_remote_by_local_bitfield(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
a0006d8c: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
a0006d90: e1a08000 mov r8, r0 <== NOT EXECUTED
a0006d94: e1a07001 mov r7, r1 <== NOT EXECUTED
a0006d98: e3a06020 mov r6, #32 <== NOT EXECUTED
uint32_t b;
uint32_t remote_value = 0;
a0006d9c: e3a05000 mov r5, #0 <== NOT EXECUTED
for (b = 1; b; b <<= 1)
a0006da0: e3a04001 mov r4, #1 <== NOT EXECUTED
if (b & local_value)
a0006da4: e1140007 tst r4, r7 <== NOT EXECUTED
a0006da8: 0a000003 beq a0006dbc <rtems_assoc_remote_by_local_bitfield+0x30><== NOT EXECUTED
remote_value |= rtems_assoc_remote_by_local(ap, b);
a0006dac: e1a00008 mov r0, r8 <== NOT EXECUTED
a0006db0: e1a01004 mov r1, r4 <== NOT EXECUTED
a0006db4: eb000005 bl a0006dd0 <rtems_assoc_remote_by_local> <== NOT EXECUTED
a0006db8: e1855000 orr r5, r5, r0 <== NOT EXECUTED
)
{
uint32_t b;
uint32_t remote_value = 0;
for (b = 1; b; b <<= 1)
a0006dbc: e2566001 subs r6, r6, #1 <== NOT EXECUTED
a0006dc0: e1a04084 lsl r4, r4, #1 <== NOT EXECUTED
a0006dc4: 1afffff6 bne a0006da4 <rtems_assoc_remote_by_local_bitfield+0x18><== NOT EXECUTED
if (b & local_value)
remote_value |= rtems_assoc_remote_by_local(ap, b);
return remote_value;
}
a0006dc8: e1a00005 mov r0, r5 <== NOT EXECUTED
a0006dcc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
a0006de4 <rtems_assoc_remote_by_name>:
uint32_t rtems_assoc_remote_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
a0006de4: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_name(ap, name);
a0006de8: ebffffb5 bl a0006cc4 <rtems_assoc_ptr_by_name> <== NOT EXECUTED
if (nap)
a0006dec: e3500000 cmp r0, #0 <== NOT EXECUTED
return nap->remote_value;
a0006df0: 15900008 ldrne r0, [r0, #8] <== NOT EXECUTED
return 0;
}
a0006df4: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a000b00c <rtems_build_id>:
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
a000b00c: e1a00c00 lsl r0, r0, #24 <== NOT EXECUTED
a000b010: e1800d81 orr r0, r0, r1, lsl #27 <== NOT EXECUTED
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
a000b014: e1800003 orr r0, r0, r3 <== NOT EXECUTED
uint32_t node,
uint32_t index
)
{
return _Objects_Build_id( api, class, node, index );
}
a000b018: e1800802 orr r0, r0, r2, lsl #16 <== NOT EXECUTED
a000b01c: e12fff1e bx lr <== NOT EXECUTED
a000b020 <rtems_build_name>:
char C1,
char C2,
char C3,
char C4
)
{
a000b020: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED
return _Objects_Build_name( C1, C2, C3, C4 );
a000b024: e20118ff and r1, r1, #16711680 ; 0xff0000 <== NOT EXECUTED
char C1,
char C2,
char C3,
char C4
)
{
a000b028: e1a02402 lsl r2, r2, #8 <== NOT EXECUTED
return _Objects_Build_name( C1, C2, C3, C4 );
a000b02c: e1810c00 orr r0, r1, r0, lsl #24 <== NOT EXECUTED
a000b030: e2022cff and r2, r2, #65280 ; 0xff00 <== NOT EXECUTED
char C1,
char C2,
char C3,
char C4
)
{
a000b034: e20330ff and r3, r3, #255 ; 0xff <== NOT EXECUTED
return _Objects_Build_name( C1, C2, C3, C4 );
a000b038: e1800002 orr r0, r0, r2 <== NOT EXECUTED
}
a000b03c: e1800003 orr r0, r0, r3 <== NOT EXECUTED
a000b040: e12fff1e bx lr <== NOT EXECUTED
a000a0b0 <rtems_chain_append_with_notification>:
rtems_chain_control *chain,
rtems_chain_node *node,
rtems_id task,
rtems_event_set events
)
{
a000a0b0: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
a000a0b4: e1a04002 mov r4, r2 <== NOT EXECUTED
a000a0b8: e1a05003 mov r5, r3 <== NOT EXECUTED
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 );
a000a0bc: eb000127 bl a000a560 <_Chain_Append_with_empty_check> <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_append_with_empty_check( chain, node );
if ( was_empty ) {
a000a0c0: e3500000 cmp r0, #0 <== NOT EXECUTED
a000a0c4: 0a000003 beq a000a0d8 <rtems_chain_append_with_notification+0x28><== NOT EXECUTED
sc = rtems_event_send( task, events );
a000a0c8: e1a00004 mov r0, r4 <== NOT EXECUTED
a000a0cc: e1a01005 mov r1, r5 <== NOT EXECUTED
}
return sc;
}
a000a0d0: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED
{
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 );
a000a0d4: eafffda5 b a0009770 <rtems_event_send> <== NOT EXECUTED
}
return sc;
}
a000a0d8: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
a000a0dc <rtems_chain_get_with_notification>:
rtems_chain_control *chain,
rtems_id task,
rtems_event_set events,
rtems_chain_node **node
)
{
a000a0dc: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
a000a0e0: e1a04001 mov r4, r1 <== NOT EXECUTED
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 );
a000a0e4: e1a01003 mov r1, r3 <== NOT EXECUTED
a000a0e8: e1a05002 mov r5, r2 <== NOT EXECUTED
a000a0ec: eb00013f bl a000a5f0 <_Chain_Get_with_empty_check> <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool is_empty = rtems_chain_get_with_empty_check( chain, node );
if ( is_empty ) {
a000a0f0: e3500000 cmp r0, #0 <== NOT EXECUTED
a000a0f4: 0a000003 beq a000a108 <rtems_chain_get_with_notification+0x2c><== NOT EXECUTED
sc = rtems_event_send( task, events );
a000a0f8: e1a00004 mov r0, r4 <== NOT EXECUTED
a000a0fc: e1a01005 mov r1, r5 <== NOT EXECUTED
}
return sc;
}
a000a100: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED
{
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 );
a000a104: eafffd99 b a0009770 <rtems_event_send> <== NOT EXECUTED
}
return sc;
}
a000a108: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
a000a10c <rtems_chain_get_with_wait>:
rtems_chain_control *chain,
rtems_event_set events,
rtems_interval timeout,
rtems_chain_node **node_ptr
)
{
a000a10c: e92d45f1 push {r0, r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED
a000a110: e1a07000 mov r7, r0 <== NOT EXECUTED
a000a114: e1a06001 mov r6, r1 <== NOT EXECUTED
a000a118: e1a05002 mov r5, r2 <== NOT EXECUTED
a000a11c: e1a0a003 mov sl, r3 <== NOT EXECUTED
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
) {
rtems_event_set out;
sc = rtems_event_receive(
a000a120: e1a0800d mov r8, sp <== NOT EXECUTED
a000a124: ea000006 b a000a144 <rtems_chain_get_with_wait+0x38> <== NOT EXECUTED
a000a128: e1a00006 mov r0, r6 <== NOT EXECUTED
a000a12c: e1a01004 mov r1, r4 <== NOT EXECUTED
a000a130: e1a02005 mov r2, r5 <== NOT EXECUTED
a000a134: e1a0300d mov r3, sp <== NOT EXECUTED
a000a138: ebfffd30 bl a0009600 <rtems_event_receive> <== NOT EXECUTED
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
a000a13c: e3500000 cmp r0, #0 <== NOT EXECUTED
a000a140: 1a000004 bne a000a158 <rtems_chain_get_with_wait+0x4c> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
a000a144: e1a00007 mov r0, r7 <== NOT EXECUTED
a000a148: eb00013c bl a000a640 <_Chain_Get> <== NOT EXECUTED
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
a000a14c: e2504000 subs r4, r0, #0 <== NOT EXECUTED
a000a150: 0afffff4 beq a000a128 <rtems_chain_get_with_wait+0x1c> <== NOT EXECUTED
a000a154: e3a00000 mov r0, #0 <== NOT EXECUTED
timeout,
&out
);
}
*node_ptr = node;
a000a158: e58a4000 str r4, [sl] <== NOT EXECUTED
return sc;
}
a000a15c: e8bd85f8 pop {r3, r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
a000a160 <rtems_chain_prepend_with_notification>:
rtems_chain_control *chain,
rtems_chain_node *node,
rtems_id task,
rtems_event_set events
)
{
a000a160: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
a000a164: e1a04002 mov r4, r2 <== NOT EXECUTED
a000a168: e1a05003 mov r5, r3 <== NOT EXECUTED
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 );
a000a16c: eb00014a bl a000a69c <_Chain_Prepend_with_empty_check> <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_prepend_with_empty_check( chain, node );
if (was_empty) {
a000a170: e3500000 cmp r0, #0 <== NOT EXECUTED
a000a174: 0a000003 beq a000a188 <rtems_chain_prepend_with_notification+0x28><== NOT EXECUTED
sc = rtems_event_send( task, events );
a000a178: e1a00004 mov r0, r4 <== NOT EXECUTED
a000a17c: e1a01005 mov r1, r5 <== NOT EXECUTED
}
return sc;
}
a000a180: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED
{
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 );
a000a184: eafffd79 b a0009770 <rtems_event_send> <== NOT EXECUTED
}
return sc;
}
a000a188: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
a001525c <rtems_clock_get>:
rtems_status_code rtems_clock_get(
rtems_clock_get_options option,
void *time_buffer
)
{
a001525c: e92d4010 push {r4, lr}
if ( !time_buffer )
a0015260: e2514000 subs r4, r1, #0
a0015264: 0a000018 beq a00152cc <rtems_clock_get+0x70>
return RTEMS_INVALID_ADDRESS;
if ( option == RTEMS_CLOCK_GET_TOD )
a0015268: e3500000 cmp r0, #0
a001526c: 1a000002 bne a001527c <rtems_clock_get+0x20>
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
a0015270: e1a00004 mov r0, r4
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
return RTEMS_INVALID_NUMBER;
}
a0015274: e8bd4010 pop {r4, lr}
{
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
if ( option == RTEMS_CLOCK_GET_TOD )
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
a0015278: ea000031 b a0015344 <rtems_clock_get_tod>
if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH )
a001527c: e3500001 cmp r0, #1
a0015280: 1a000002 bne a0015290 <rtems_clock_get+0x34>
return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer);
a0015284: e1a00004 mov r0, r4
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
return RTEMS_INVALID_NUMBER;
}
a0015288: e8bd4010 pop {r4, lr}
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);
a001528c: ea000012 b a00152dc <rtems_clock_get_seconds_since_epoch>
if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) {
a0015290: e3500002 cmp r0, #2
a0015294: 1a000001 bne a00152a0 <rtems_clock_get+0x44>
rtems_interval *interval = (rtems_interval *)time_buffer;
*interval = rtems_clock_get_ticks_since_boot();
a0015298: eb000025 bl a0015334 <rtems_clock_get_ticks_since_boot>
a001529c: ea000002 b a00152ac <rtems_clock_get+0x50>
return RTEMS_SUCCESSFUL;
}
if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) {
a00152a0: e3500003 cmp r0, #3
a00152a4: 1a000003 bne a00152b8 <rtems_clock_get+0x5c>
rtems_interval *interval = (rtems_interval *)time_buffer;
*interval = rtems_clock_get_ticks_per_second();
a00152a8: eb000019 bl a0015314 <rtems_clock_get_ticks_per_second>
a00152ac: e5840000 str r0, [r4]
return RTEMS_SUCCESSFUL;
a00152b0: e3a00000 mov r0, #0
a00152b4: e8bd8010 pop {r4, pc}
}
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
a00152b8: e3500004 cmp r0, #4 <== NOT EXECUTED
a00152bc: 1a000004 bne a00152d4 <rtems_clock_get+0x78> <== NOT EXECUTED
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
a00152c0: e1a00004 mov r0, r4 <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
}
a00152c4: e8bd4010 pop {r4, lr} <== NOT EXECUTED
*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 );
a00152c8: ea00004f b a001540c <rtems_clock_get_tod_timeval> <== NOT EXECUTED
rtems_clock_get_options option,
void *time_buffer
)
{
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
a00152cc: e3a00009 mov r0, #9 <== NOT EXECUTED
a00152d0: e8bd8010 pop {r4, pc} <== NOT EXECUTED
}
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
return RTEMS_INVALID_NUMBER;
a00152d4: e3a0000a mov r0, #10 <== NOT EXECUTED
}
a00152d8: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a001540c <rtems_clock_get_tod_timeval>:
#include <rtems/score/watchdog.h>
rtems_status_code rtems_clock_get_tod_timeval(
struct timeval *time
)
{
a001540c: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED
if ( !time )
a0015410: e2504000 subs r4, r0, #0 <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
a0015414: 03a00009 moveq r0, #9 <== NOT EXECUTED
rtems_status_code rtems_clock_get_tod_timeval(
struct timeval *time
)
{
if ( !time )
a0015418: 0a000011 beq a0015464 <rtems_clock_get_tod_timeval+0x58> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Is_set )
a001541c: e59f3044 ldr r3, [pc, #68] ; a0015468 <rtems_clock_get_tod_timeval+0x5c><== NOT EXECUTED
a0015420: e5d33000 ldrb r3, [r3] <== NOT EXECUTED
a0015424: e3530000 cmp r3, #0 <== NOT EXECUTED
return RTEMS_NOT_DEFINED;
a0015428: 03a0000b moveq r0, #11 <== NOT EXECUTED
)
{
if ( !time )
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Is_set )
a001542c: 0a00000c beq a0015464 <rtems_clock_get_tod_timeval+0x58> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a0015430: e10f5000 mrs r5, CPSR <== NOT EXECUTED
a0015434: e3853080 orr r3, r5, #128 ; 0x80 <== NOT EXECUTED
a0015438: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
ISR_Level level;
struct timespec now;
suseconds_t useconds;
_ISR_Disable(level);
_TOD_Get( &now );
a001543c: e1a0000d mov r0, sp <== NOT EXECUTED
a0015440: eb0010dd bl a00197bc <_TOD_Get> <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a0015444: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED
_ISR_Enable(level);
useconds = (suseconds_t)now.tv_nsec;
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
time->tv_sec = now.tv_sec;
a0015448: e59d3000 ldr r3, [sp] <== NOT EXECUTED
_ISR_Disable(level);
_TOD_Get( &now );
_ISR_Enable(level);
useconds = (suseconds_t)now.tv_nsec;
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
a001544c: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED
a0015450: e3a01ffa mov r1, #1000 ; 0x3e8 <== NOT EXECUTED
time->tv_sec = now.tv_sec;
a0015454: e5843000 str r3, [r4] <== NOT EXECUTED
_ISR_Disable(level);
_TOD_Get( &now );
_ISR_Enable(level);
useconds = (suseconds_t)now.tv_nsec;
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
a0015458: eb00616f bl a002da1c <__aeabi_idiv> <== NOT EXECUTED
time->tv_sec = now.tv_sec;
time->tv_usec = useconds;
a001545c: e5840004 str r0, [r4, #4] <== NOT EXECUTED
return RTEMS_NOT_DEFINED;
_TOD_Get_timeval( time );
return RTEMS_SUCCESSFUL;
a0015460: e3a00000 mov r0, #0 <== NOT EXECUTED
}
a0015464: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED
a0009010 <rtems_clock_get_uptime>:
*/
rtems_status_code rtems_clock_get_uptime(
struct timespec *uptime
)
{
if ( !uptime )
a0009010: e3500000 cmp r0, #0 <== NOT EXECUTED
* error code - if unsuccessful
*/
rtems_status_code rtems_clock_get_uptime(
struct timespec *uptime
)
{
a0009014: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
if ( !uptime )
a0009018: 0a000002 beq a0009028 <rtems_clock_get_uptime+0x18> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
_TOD_Get_uptime_as_timespec( uptime );
a000901c: eb000545 bl a000a538 <_TOD_Get_uptime_as_timespec> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a0009020: e3a00000 mov r0, #0 <== NOT EXECUTED
a0009024: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
rtems_status_code rtems_clock_get_uptime(
struct timespec *uptime
)
{
if ( !uptime )
return RTEMS_INVALID_ADDRESS;
a0009028: e3a00009 mov r0, #9 <== NOT EXECUTED
_TOD_Get_uptime_as_timespec( uptime );
return RTEMS_SUCCESSFUL;
}
a000902c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a0008ddc <rtems_clock_tick>:
*
* NOTE: This routine only works for leap-years through 2099.
*/
rtems_status_code rtems_clock_tick( void )
{
a0008ddc: e52de004 push {lr} ; (str lr, [sp, #-4]!)
_TOD_Tickle_ticks();
a0008de0: eb0004ec bl a000a198 <_TOD_Tickle_ticks>
*/
RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_ticks( void )
{
_Watchdog_Tickle( &_Watchdog_Ticks_chain );
a0008de4: e59f0030 ldr r0, [pc, #48] ; a0008e1c <rtems_clock_tick+0x40>
a0008de8: eb000dff bl a000c5ec <_Watchdog_Tickle>
_Watchdog_Tickle_ticks();
_Thread_Tickle_timeslice();
a0008dec: eb000c96 bl a000c04c <_Thread_Tickle_timeslice>
* otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_context_switch_necessary( void )
{
return ( _Thread_Dispatch_necessary );
a0008df0: e59f3028 ldr r3, [pc, #40] ; a0008e20 <rtems_clock_tick+0x44>
a0008df4: e5d33010 ldrb r3, [r3, #16]
if ( _Thread_Is_context_switch_necessary() &&
a0008df8: e3530000 cmp r3, #0
a0008dfc: 0a000004 beq a0008e14 <rtems_clock_tick+0x38>
* otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_dispatching_enabled( void )
{
return ( _Thread_Dispatch_disable_level == 0 );
a0008e00: e59f301c ldr r3, [pc, #28] ; a0008e24 <rtems_clock_tick+0x48><== NOT EXECUTED
a0008e04: e5933000 ldr r3, [r3] <== NOT EXECUTED
a0008e08: e3530000 cmp r3, #0 <== NOT EXECUTED
a0008e0c: 1a000000 bne a0008e14 <rtems_clock_tick+0x38> <== NOT EXECUTED
_Thread_Is_dispatching_enabled() )
_Thread_Dispatch();
a0008e10: eb0009be bl a000b510 <_Thread_Dispatch> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
a0008e14: e3a00000 mov r0, #0
a0008e18: e49df004 pop {pc} ; (ldr pc, [sp], #4)
a00069ac <rtems_cpu_usage_report>:
void rtems_cpu_usage_report( void )
{
rtems_cpu_usage_report_with_plugin( NULL, printk_plugin );
a00069ac: e59f1004 ldr r1, [pc, #4] ; a00069b8 <rtems_cpu_usage_report+0xc><== NOT EXECUTED
a00069b0: e3a00000 mov r0, #0 <== NOT EXECUTED
a00069b4: eaffff94 b a000680c <rtems_cpu_usage_report_with_plugin> <== NOT EXECUTED
a000680c <rtems_cpu_usage_report_with_plugin>:
void rtems_cpu_usage_report_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
a000680c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
Timestamp_Control uptime, total, ran, last_context_switch;
#else
uint32_t total_units = 0;
#endif
if ( !print )
a0006810: e251a000 subs sl, r1, #0 <== NOT EXECUTED
void rtems_cpu_usage_report_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
a0006814: e24dd048 sub sp, sp, #72 ; 0x48 <== NOT EXECUTED
a0006818: e1a08000 mov r8, r0 <== NOT EXECUTED
Timestamp_Control uptime, total, ran, last_context_switch;
#else
uint32_t total_units = 0;
#endif
if ( !print )
a000681c: 0a000057 beq a0006980 <rtems_cpu_usage_report_with_plugin+0x174><== NOT EXECUTED
* When not using nanosecond CPU usage resolution, we have to count
* the number of "ticks" we gave credit for to give the user a rough
* guideline as to what each number means proportionally.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
last_context_switch = _Thread_Time_of_last_context_switch;
a0006820: e59f3160 ldr r3, [pc, #352] ; a0006988 <rtems_cpu_usage_report_with_plugin+0x17c><== NOT EXECUTED
_TOD_Get_uptime( &uptime );
a0006824: e28d5038 add r5, sp, #56 ; 0x38 <== NOT EXECUTED
a0006828: e1a00005 mov r0, r5 <== NOT EXECUTED
* When not using nanosecond CPU usage resolution, we have to count
* the number of "ticks" we gave credit for to give the user a rough
* guideline as to what each number means proportionally.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
last_context_switch = _Thread_Time_of_last_context_switch;
a000682c: e8930018 ldm r3, {r3, r4} <== NOT EXECUTED
a0006830: e58d3020 str r3, [sp, #32] <== NOT EXECUTED
a0006834: e58d4024 str r4, [sp, #36] ; 0x24 <== NOT EXECUTED
_TOD_Get_uptime( &uptime );
_Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total );
a0006838: e28d4030 add r4, sp, #48 ; 0x30 <== NOT EXECUTED
* the number of "ticks" we gave credit for to give the user a rough
* guideline as to what each number means proportionally.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
last_context_switch = _Thread_Time_of_last_context_switch;
_TOD_Get_uptime( &uptime );
a000683c: eb001485 bl a000ba58 <_TOD_Get_uptime> <== NOT EXECUTED
_Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total );
a0006840: e1a01005 mov r1, r5 <== NOT EXECUTED
a0006844: e59f0140 ldr r0, [pc, #320] ; a000698c <rtems_cpu_usage_report_with_plugin+0x180><== NOT EXECUTED
a0006848: e1a02004 mov r2, r4 <== NOT EXECUTED
a000684c: eb001d1d bl a000dcc8 <_Timespec_Subtract> <== NOT EXECUTED
}
}
}
#endif
(*print)(
a0006850: e1a00008 mov r0, r8 <== NOT EXECUTED
a0006854: e59f1134 ldr r1, [pc, #308] ; a0006990 <rtems_cpu_usage_report_with_plugin+0x184><== NOT EXECUTED
a0006858: e12fff3a blx sl <== NOT EXECUTED
a000685c: e59f5130 ldr r5, [pc, #304] ; a0006994 <rtems_cpu_usage_report_with_plugin+0x188><== NOT EXECUTED
the_thread = (Thread_Control *)information->local_table[ i ];
if ( !the_thread )
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
a0006860: e28db008 add fp, sp, #8 <== NOT EXECUTED
"------------+----------------------------------------+---------------+---------\n"
);
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
#if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG)
if ( !_Objects_Information_table[ api_index ] )
a0006864: e5b53004 ldr r3, [r5, #4]! <== NOT EXECUTED
a0006868: e3530000 cmp r3, #0 <== NOT EXECUTED
a000686c: 0a000038 beq a0006954 <rtems_cpu_usage_report_with_plugin+0x148><== NOT EXECUTED
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
a0006870: e5936004 ldr r6, [r3, #4] <== NOT EXECUTED
if ( information ) {
a0006874: e3560000 cmp r6, #0 <== NOT EXECUTED
a0006878: 13a07001 movne r7, #1 <== NOT EXECUTED
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
Timestamp_Control used;
_Timestamp_Subtract( &last_context_switch, &uptime, &used );
a000687c: 128d9018 addne r9, sp, #24 <== NOT EXECUTED
if ( !_Objects_Information_table[ api_index ] )
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
a0006880: 1a000030 bne a0006948 <rtems_cpu_usage_report_with_plugin+0x13c><== NOT EXECUTED
a0006884: ea000032 b a0006954 <rtems_cpu_usage_report_with_plugin+0x148><== NOT EXECUTED
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
a0006888: e596301c ldr r3, [r6, #28] <== NOT EXECUTED
a000688c: e7934107 ldr r4, [r3, r7, lsl #2] <== NOT EXECUTED
if ( !the_thread )
a0006890: e3540000 cmp r4, #0 <== NOT EXECUTED
a0006894: 0a00002a beq a0006944 <rtems_cpu_usage_report_with_plugin+0x138><== NOT EXECUTED
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
a0006898: e3a0100d mov r1, #13 <== NOT EXECUTED
a000689c: e1a0200b mov r2, fp <== NOT EXECUTED
a00068a0: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED
a00068a4: eb000fd8 bl a000a80c <rtems_object_get_name> <== NOT EXECUTED
(*print)(
a00068a8: e5942008 ldr r2, [r4, #8] <== NOT EXECUTED
a00068ac: e1a0300b mov r3, fp <== NOT EXECUTED
a00068b0: e1a00008 mov r0, r8 <== NOT EXECUTED
a00068b4: e59f10dc ldr r1, [pc, #220] ; a0006998 <rtems_cpu_usage_report_with_plugin+0x18c><== NOT EXECUTED
a00068b8: e12fff3a blx sl <== NOT EXECUTED
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
/*
* If this is the currently executing thread, account for time
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
a00068bc: e2843084 add r3, r4, #132 ; 0x84 <== NOT EXECUTED
a00068c0: e893000c ldm r3, {r2, r3} <== NOT EXECUTED
a00068c4: e58d2028 str r2, [sp, #40] ; 0x28 <== NOT EXECUTED
a00068c8: e58d302c str r3, [sp, #44] ; 0x2c <== NOT EXECUTED
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
a00068cc: e59f20c8 ldr r2, [pc, #200] ; a000699c <rtems_cpu_usage_report_with_plugin+0x190><== NOT EXECUTED
a00068d0: e5923004 ldr r3, [r2, #4] <== NOT EXECUTED
a00068d4: e5932008 ldr r2, [r3, #8] <== NOT EXECUTED
a00068d8: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
a00068dc: e1520003 cmp r2, r3 <== NOT EXECUTED
a00068e0: 1a000006 bne a0006900 <rtems_cpu_usage_report_with_plugin+0xf4><== NOT EXECUTED
Timestamp_Control used;
_Timestamp_Subtract( &last_context_switch, &uptime, &used );
a00068e4: e28d0020 add r0, sp, #32 <== NOT EXECUTED
a00068e8: e28d1038 add r1, sp, #56 ; 0x38 <== NOT EXECUTED
a00068ec: e1a02009 mov r2, r9 <== NOT EXECUTED
a00068f0: eb001cf4 bl a000dcc8 <_Timespec_Subtract> <== NOT EXECUTED
_Timestamp_Add_to( &ran, &used );
a00068f4: e28d0028 add r0, sp, #40 ; 0x28 <== NOT EXECUTED
a00068f8: e1a01009 mov r1, r9 <== NOT EXECUTED
a00068fc: eb001cb5 bl a000dbd8 <_Timespec_Add_to> <== NOT EXECUTED
};
_Timestamp_Divide( &ran, &total, &ival, &fval );
a0006900: e28d2044 add r2, sp, #68 ; 0x44 <== NOT EXECUTED
a0006904: e28d3040 add r3, sp, #64 ; 0x40 <== NOT EXECUTED
a0006908: e28d0028 add r0, sp, #40 ; 0x28 <== NOT EXECUTED
a000690c: e28d1030 add r1, sp, #48 ; 0x30 <== NOT EXECUTED
a0006910: eb001cc8 bl a000dc38 <_Timespec_Divide> <== NOT EXECUTED
/*
* Print the information
*/
(*print)( context,
a0006914: e3a01ffa mov r1, #1000 ; 0x3e8 <== NOT EXECUTED
a0006918: e59d002c ldr r0, [sp, #44] ; 0x2c <== NOT EXECUTED
a000691c: eb005327 bl a001b5c0 <__aeabi_uidiv> <== NOT EXECUTED
a0006920: e59d2044 ldr r2, [sp, #68] ; 0x44 <== NOT EXECUTED
a0006924: e1a03000 mov r3, r0 <== NOT EXECUTED
a0006928: e59f1070 ldr r1, [pc, #112] ; a00069a0 <rtems_cpu_usage_report_with_plugin+0x194><== NOT EXECUTED
a000692c: e58d2000 str r2, [sp] <== NOT EXECUTED
a0006930: e59d2040 ldr r2, [sp, #64] ; 0x40 <== NOT EXECUTED
a0006934: e1a00008 mov r0, r8 <== NOT EXECUTED
a0006938: e58d2004 str r2, [sp, #4] <== NOT EXECUTED
a000693c: e59d2028 ldr r2, [sp, #40] ; 0x28 <== NOT EXECUTED
a0006940: e12fff3a blx sl <== NOT EXECUTED
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
a0006944: e2877001 add r7, r7, #1 <== NOT EXECUTED
a0006948: e1d631b0 ldrh r3, [r6, #16] <== NOT EXECUTED
a000694c: e1570003 cmp r7, r3 <== NOT EXECUTED
a0006950: 9affffcc bls a0006888 <rtems_cpu_usage_report_with_plugin+0x7c><== NOT EXECUTED
" ID | NAME | TICKS | PERCENT\n"
#endif
"------------+----------------------------------------+---------------+---------\n"
);
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
a0006954: e59f3048 ldr r3, [pc, #72] ; a00069a4 <rtems_cpu_usage_report_with_plugin+0x198><== NOT EXECUTED
a0006958: e1550003 cmp r5, r3 <== NOT EXECUTED
a000695c: 1affffc0 bne a0006864 <rtems_cpu_usage_report_with_plugin+0x58><== NOT EXECUTED
}
}
}
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)(
a0006960: e3a01ffa mov r1, #1000 ; 0x3e8 <== NOT EXECUTED
a0006964: e59d0034 ldr r0, [sp, #52] ; 0x34 <== NOT EXECUTED
a0006968: eb005314 bl a001b5c0 <__aeabi_uidiv> <== NOT EXECUTED
a000696c: e59f1034 ldr r1, [pc, #52] ; a00069a8 <rtems_cpu_usage_report_with_plugin+0x19c><== NOT EXECUTED
a0006970: e1a03000 mov r3, r0 <== NOT EXECUTED
a0006974: e59d2030 ldr r2, [sp, #48] ; 0x30 <== NOT EXECUTED
a0006978: e1a00008 mov r0, r8 <== NOT EXECUTED
a000697c: e12fff3a blx sl <== NOT EXECUTED
"-------------------------------------------------------------------------------\n",
_Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset,
total_units
);
#endif
}
a0006980: e28dd048 add sp, sp, #72 ; 0x48 <== NOT EXECUTED
a0006984: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
a000a8cc <rtems_error>:
int rtems_error(
rtems_error_code_t error_flag,
const char *printf_format,
...
)
{
a000a8cc: e92d000e push {r1, r2, r3}
a000a8d0: e92d4011 push {r0, r4, lr}
va_list arglist;
int chars_written;
va_start(arglist, printf_format);
chars_written = rtems_verror(error_flag, printf_format, arglist);
a000a8d4: e59d100c ldr r1, [sp, #12]
int rtems_error(
rtems_error_code_t error_flag,
const char *printf_format,
...
)
{
a000a8d8: e1a04000 mov r4, r0
va_list arglist;
int chars_written;
va_start(arglist, printf_format);
a000a8dc: e28d2010 add r2, sp, #16
a000a8e0: e58d2000 str r2, [sp]
chars_written = rtems_verror(error_flag, printf_format, arglist);
a000a8e4: ebffff9e bl a000a764 <rtems_verror>
va_end(arglist);
if (error_flag & RTEMS_ERROR_PANIC) {
a000a8e8: e2143202 ands r3, r4, #536870912 ; 0x20000000
a000a8ec: 0a000005 beq a000a908 <rtems_error+0x3c>
rtems_error(0, "fatal error, exiting");
a000a8f0: e59f1034 ldr r1, [pc, #52] ; a000a92c <rtems_error+0x60> <== NOT EXECUTED
a000a8f4: e3a00000 mov r0, #0 <== NOT EXECUTED
a000a8f8: ebfffff3 bl a000a8cc <rtems_error> <== NOT EXECUTED
_exit(errno);
a000a8fc: eb002aca bl a001542c <__errno> <== NOT EXECUTED
a000a900: e5900000 ldr r0, [r0] <== NOT EXECUTED
a000a904: eb0002a1 bl a000b390 <_exit> <== NOT EXECUTED
}
if (error_flag & RTEMS_ERROR_ABORT) {
a000a908: e3140201 tst r4, #268435456 ; 0x10000000
a000a90c: 0a000003 beq a000a920 <rtems_error+0x54>
rtems_error(0, "fatal error, aborting");
a000a910: e1a00003 mov r0, r3
a000a914: e59f1014 ldr r1, [pc, #20] ; a000a930 <rtems_error+0x64>
a000a918: ebffffeb bl a000a8cc <rtems_error>
abort();
a000a91c: eb002ab8 bl a0015404 <abort>
}
return chars_written;
}
a000a920: e8bd4018 pop {r3, r4, lr}
a000a924: e28dd00c add sp, sp, #12
a000a928: e12fff1e bx lr
a0008e28 <rtems_event_receive>:
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
a0008e28: e92d4070 push {r4, r5, r6, lr}
RTEMS_API_Control *api;
if ( !event_out )
a0008e2c: e2535000 subs r5, r3, #0
a0008e30: 0a000010 beq a0008e78 <rtems_event_receive+0x50>
return RTEMS_INVALID_ADDRESS;
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
a0008e34: e59f4044 ldr r4, [pc, #68] ; a0008e80 <rtems_event_receive+0x58>
if ( _Event_sets_Is_empty( event_in ) ) {
a0008e38: e3500000 cmp r0, #0
RTEMS_API_Control *api;
if ( !event_out )
return RTEMS_INVALID_ADDRESS;
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
a0008e3c: e5946004 ldr r6, [r4, #4]
a0008e40: e59660f4 ldr r6, [r6, #244] ; 0xf4
if ( _Event_sets_Is_empty( event_in ) ) {
a0008e44: 1a000002 bne a0008e54 <rtems_event_receive+0x2c>
*event_out = api->pending_events;
a0008e48: e5963000 ldr r3, [r6]
a0008e4c: e5853000 str r3, [r5]
return RTEMS_SUCCESSFUL;
a0008e50: e8bd8070 pop {r4, r5, r6, pc}
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a0008e54: e59fc028 ldr ip, [pc, #40] ; a0008e84 <rtems_event_receive+0x5c>
a0008e58: e59ce000 ldr lr, [ip]
a0008e5c: e28ee001 add lr, lr, #1
a0008e60: e58ce000 str lr, [ip]
}
_Thread_Disable_dispatch();
_Event_Seize( event_in, option_set, ticks, event_out );
a0008e64: eb000007 bl a0008e88 <_Event_Seize>
_Thread_Enable_dispatch();
a0008e68: eb0009ec bl a000b620 <_Thread_Enable_dispatch>
return( _Thread_Executing->Wait.return_code );
a0008e6c: e5943004 ldr r3, [r4, #4]
a0008e70: e5930034 ldr r0, [r3, #52] ; 0x34
a0008e74: e8bd8070 pop {r4, r5, r6, pc}
)
{
RTEMS_API_Control *api;
if ( !event_out )
return RTEMS_INVALID_ADDRESS;
a0008e78: e3a00009 mov r0, #9 <== NOT EXECUTED
_Thread_Disable_dispatch();
_Event_Seize( event_in, option_set, ticks, event_out );
_Thread_Enable_dispatch();
return( _Thread_Executing->Wait.return_code );
}
a0008e7c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
a000bbfc <rtems_extension_ident>:
rtems_status_code rtems_extension_ident(
rtems_name name,
rtems_id *id
)
{
a000bbfc: e1a02000 mov r2, r0 <== NOT EXECUTED
a000bc00: e1a03001 mov r3, r1 <== NOT EXECUTED
a000bc04: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
Objects_Name_or_id_lookup_errors status;
status = _Objects_Name_to_id_u32(
a000bc08: e1a01002 mov r1, r2 <== NOT EXECUTED
a000bc0c: e59f0010 ldr r0, [pc, #16] ; a000bc24 <rtems_extension_ident+0x28><== NOT EXECUTED
a000bc10: e3e02102 mvn r2, #-2147483648 ; 0x80000000 <== NOT EXECUTED
a000bc14: eb00048c bl a000ce4c <_Objects_Name_to_id_u32> <== NOT EXECUTED
OBJECTS_SEARCH_LOCAL_NODE,
id
);
return _Status_Object_name_errors_to_status[ status ];
}
a000bc18: e59f3008 ldr r3, [pc, #8] ; a000bc28 <rtems_extension_ident+0x2c><== NOT EXECUTED
a000bc1c: e7930100 ldr r0, [r3, r0, lsl #2] <== NOT EXECUTED
a000bc20: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a0005f28 <rtems_filesystem_initialize>:
* configuration is a single instantiation of the IMFS or miniIMFS with
* a single "/dev" directory in it.
*/
void rtems_filesystem_initialize( void )
{
a0005f28: e92d40f0 push {r4, r5, r6, r7, lr}
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
a0005f2c: e59f60e0 ldr r6, [pc, #224] ; a0006014 <rtems_filesystem_initialize+0xec>
a0005f30: e3a02012 mov r2, #18
* configuration is a single instantiation of the IMFS or miniIMFS with
* a single "/dev" directory in it.
*/
void rtems_filesystem_initialize( void )
{
a0005f34: e24dd018 sub sp, sp, #24
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
a0005f38: e5963000 ldr r3, [r6]
a0005f3c: e583202c str r2, [r3, #44] ; 0x2c
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
a0005f40: e59f30d0 ldr r3, [pc, #208] ; a0006018 <rtems_filesystem_initialize+0xf0>
a0005f44: e5933000 ldr r3, [r3]
a0005f48: e3530000 cmp r3, #0
rtems_fatal_error_occurred( 0xABCD0001 );
a0005f4c: 059f00c8 ldreq r0, [pc, #200] ; a000601c <rtems_filesystem_initialize+0xf4>
rtems_filesystem_umask = 022;
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
a0005f50: 0a00000a beq a0005f80 <rtems_filesystem_initialize+0x58>
rtems_fatal_error_occurred( 0xABCD0001 );
mt = &rtems_filesystem_mount_table[0];
a0005f54: e59f30c4 ldr r3, [pc, #196] ; a0006020 <rtems_filesystem_initialize+0xf8>
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
a0005f58: e3a05000 mov r5, #0
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
rtems_fatal_error_occurred( 0xABCD0001 );
mt = &rtems_filesystem_mount_table[0];
a0005f5c: e5933000 ldr r3, [r3]
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
a0005f60: e58d5000 str r5, [sp]
a0005f64: e5930008 ldr r0, [r3, #8]
a0005f68: e593100c ldr r1, [r3, #12]
a0005f6c: e893000c ldm r3, {r2, r3}
a0005f70: eb000201 bl a000677c <mount>
if ( status == -1 )
a0005f74: e3700001 cmn r0, #1
a0005f78: 1a000001 bne a0005f84 <rtems_filesystem_initialize+0x5c>
rtems_fatal_error_occurred( 0xABCD0002 );
a0005f7c: e59f00a0 ldr r0, [pc, #160] ; a0006024 <rtems_filesystem_initialize+0xfc><== NOT EXECUTED
a0005f80: eb000eb0 bl a0009a48 <rtems_fatal_error_occurred> <== NOT EXECUTED
rtems_filesystem_link_counts = 0;
a0005f84: e5963000 ldr r3, [r6]
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
a0005f88: e28d4004 add r4, sp, #4
a0005f8c: e3a01001 mov r1, #1
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;
a0005f90: e1c353b0 strh r5, [r3, #48] ; 0x30
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
a0005f94: e1a02005 mov r2, r5
a0005f98: e1a03004 mov r3, r4
a0005f9c: e59f0084 ldr r0, [pc, #132] ; a0006028 <rtems_filesystem_initialize+0x100>
a0005fa0: e58d5000 str r5, [sp]
a0005fa4: eb000053 bl a00060f8 <rtems_filesystem_evaluate_path>
rtems_filesystem_root = loc;
a0005fa8: e596c000 ldr ip, [r6]
a0005fac: e1a07004 mov r7, r4
a0005fb0: e8b7000f ldm r7!, {r0, r1, r2, r3}
a0005fb4: e28cc018 add ip, ip, #24
a0005fb8: e8ac000f stmia ip!, {r0, r1, r2, r3}
a0005fbc: e5973000 ldr r3, [r7]
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
a0005fc0: e3a01001 mov r1, #1
a0005fc4: e1a02005 mov r2, r5
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
a0005fc8: e58c3000 str r3, [ip]
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
a0005fcc: e59f0054 ldr r0, [pc, #84] ; a0006028 <rtems_filesystem_initialize+0x100>
a0005fd0: e1a03004 mov r3, r4
a0005fd4: e58d5000 str r5, [sp]
a0005fd8: eb000046 bl a00060f8 <rtems_filesystem_evaluate_path>
rtems_filesystem_current = loc;
a0005fdc: e8b4000f ldm r4!, {r0, r1, r2, r3}
a0005fe0: e596c000 ldr ip, [r6]
a0005fe4: e28cc004 add ip, ip, #4
a0005fe8: e8ac000f stmia ip!, {r0, r1, r2, r3}
a0005fec: e5973000 ldr r3, [r7]
*
* 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);
a0005ff0: e59f0034 ldr r0, [pc, #52] ; a000602c <rtems_filesystem_initialize+0x104>
a0005ff4: e59f1034 ldr r1, [pc, #52] ; a0006030 <rtems_filesystem_initialize+0x108>
/* 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;
a0005ff8: e58c3000 str r3, [ip]
*
* 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);
a0005ffc: eb00018d bl a0006638 <mkdir>
if ( status != 0 )
a0006000: e3500000 cmp r0, #0
rtems_fatal_error_occurred( 0xABCD0003 );
a0006004: 159f0028 ldrne r0, [pc, #40] ; a0006034 <rtems_filesystem_initialize+0x10c>
* 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);
if ( status != 0 )
a0006008: 1affffdc bne a0005f80 <rtems_filesystem_initialize+0x58>
* 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.
*/
}
a000600c: e28dd018 add sp, sp, #24
a0006010: e8bd80f0 pop {r4, r5, r6, r7, pc}
a0006d68 <rtems_gxx_getspecific>:
void *rtems_gxx_getspecific(__gthread_key_t key)
{
a0006d68: e92d4031 push {r0, r4, r5, lr}
a0006d6c: e1a04000 mov r4, r0
rtems_status_code status;
void *p= 0;
a0006d70: e3a05000 mov r5, #0
a0006d74: e28d2004 add r2, sp, #4
a0006d78: e5225004 str r5, [r2, #-4]!
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_get( RTEMS_SELF, (void **)key, &p );
a0006d7c: e1a00005 mov r0, r5
a0006d80: e1a01004 mov r1, r4
a0006d84: e1a0200d mov r2, sp
a0006d88: eb000e38 bl a000a670 <rtems_task_variable_get>
if ( status == RTEMS_SUCCESSFUL ) {
a0006d8c: e1500005 cmp r0, r5
/* We do not have to do this, but what the heck ! */
p= key->val;
a0006d90: 05943000 ldreq r3, [r4]
a0006d94: 058d3000 streq r3, [sp]
rtems_status_code status;
void *p= 0;
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_get( RTEMS_SELF, (void **)key, &p );
if ( status == RTEMS_SUCCESSFUL ) {
a0006d98: 0a00000a beq a0006dc8 <rtems_gxx_getspecific+0x60>
p= key->val;
} else {
/* fisrt time, always set to zero, it is unknown the value that the others
* threads are using at the moment of this call
*/
status = rtems_task_variable_add( RTEMS_SELF, (void **)key, key->dtor );
a0006d9c: e1a00005 mov r0, r5
a0006da0: e1a01004 mov r1, r4
a0006da4: e5942004 ldr r2, [r4, #4]
a0006da8: eb000de8 bl a000a550 <rtems_task_variable_add>
if ( status != RTEMS_SUCCESSFUL ) {
a0006dac: e3500000 cmp r0, #0
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_GXX_KEY_ADD_FAILED
);
}
key->val = (void *)0;
a0006db0: 05840000 streq r0, [r4]
} else {
/* fisrt time, always set to zero, it is unknown the value that the others
* threads are using at the moment of this call
*/
status = rtems_task_variable_add( RTEMS_SELF, (void **)key, key->dtor );
if ( status != RTEMS_SUCCESSFUL ) {
a0006db4: 0a000003 beq a0006dc8 <rtems_gxx_getspecific+0x60>
_Internal_error_Occurred(
a0006db8: e1a00005 mov r0, r5
a0006dbc: e3a01001 mov r1, #1
a0006dc0: e3a02015 mov r2, #21
a0006dc4: eb0011b2 bl a000b494 <_Internal_error_Occurred>
p,
rtems_task_self()
);
#endif
return p;
}
a0006dc8: e59d0000 ldr r0, [sp] <== NOT EXECUTED
a0006dcc: e8bd8038 pop {r3, r4, r5, pc} <== NOT EXECUTED
a0006cdc <rtems_gxx_key_create>:
int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *))
{
a0006cdc: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
a0006ce0: e1a06000 mov r6, r0 <== NOT EXECUTED
* 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 ) );
a0006ce4: e3a00008 mov r0, #8 <== NOT EXECUTED
}
return 0;
}
int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *))
{
a0006ce8: e1a05001 mov r5, r1 <== NOT EXECUTED
* 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 ) );
a0006cec: eb000100 bl a00070f4 <malloc> <== NOT EXECUTED
a0006cf0: e1a04000 mov r4, r0 <== NOT EXECUTED
*key = new_key;
a0006cf4: e5860000 str r0, [r6] <== NOT EXECUTED
"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 );
a0006cf8: e1a01004 mov r1, r4 <== NOT EXECUTED
* 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;
a0006cfc: e3a00000 mov r0, #0 <== NOT EXECUTED
"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 );
a0006d00: e1a02005 mov r2, r5 <== NOT EXECUTED
* 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;
a0006d04: e8840021 stm r4, {r0, r5} <== NOT EXECUTED
"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 );
a0006d08: eb000e10 bl a000a550 <rtems_task_variable_add> <== NOT EXECUTED
if ( status == RTEMS_SUCCESSFUL )
a0006d0c: e3500000 cmp r0, #0 <== NOT EXECUTED
a0006d10: 0a000002 beq a0006d20 <rtems_gxx_key_create+0x44> <== NOT EXECUTED
return 0;
free( new_key );
a0006d14: e1a00004 mov r0, r4 <== NOT EXECUTED
a0006d18: ebffff89 bl a0006b44 <free> <== NOT EXECUTED
return -1;
a0006d1c: e3e00000 mvn r0, #0 <== NOT EXECUTED
}
a0006d20: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
a0006d34 <rtems_gxx_key_delete>:
int rtems_gxx_key_delete (__gthread_key_t key)
{
a0006d34: e92d4010 push {r4, lr} <== NOT EXECUTED
a0006d38: e1a04000 mov r4, r0 <== NOT EXECUTED
#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 );
a0006d3c: e1a01004 mov r1, r4 <== NOT EXECUTED
a0006d40: e3a00000 mov r0, #0 <== NOT EXECUTED
a0006d44: eb000e2b bl a000a5f8 <rtems_task_variable_delete> <== NOT EXECUTED
if ( status == RTEMS_SUCCESSFUL ) {
a0006d48: e3500000 cmp r0, #0 <== NOT EXECUTED
a0006d4c: 1a000003 bne a0006d60 <rtems_gxx_key_delete+0x2c> <== NOT EXECUTED
/* Hmm - hopefully all tasks using this key have gone away... */
if ( key ) free( *(void **)key );
a0006d50: e3540000 cmp r4, #0 <== NOT EXECUTED
a0006d54: 0a000001 beq a0006d60 <rtems_gxx_key_delete+0x2c> <== NOT EXECUTED
a0006d58: e5940000 ldr r0, [r4] <== NOT EXECUTED
a0006d5c: ebffff78 bl a0006b44 <free> <== NOT EXECUTED
return 0;
}
key = NULL;
return 0;
}
a0006d60: e3a00000 mov r0, #0 <== NOT EXECUTED
a0006d64: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a0006d24 <rtems_gxx_key_dtor>:
{
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: dtor key=%x, ptr=%x\n", key, ptr );
#endif
key->val = 0;
a0006d24: e3a03000 mov r3, #0 <== NOT EXECUTED
a0006d28: e5803000 str r3, [r0] <== NOT EXECUTED
return 0;
}
a0006d2c: e1a00003 mov r0, r3 <== NOT EXECUTED
a0006d30: e12fff1e bx lr <== NOT EXECUTED
a0006e58 <rtems_gxx_mutex_destroy>:
int rtems_gxx_mutex_destroy (__gthread_mutex_t *mutex)
{
a0006e58: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: destroy mutex=%X\n", *mutex );
#endif
status = rtems_semaphore_delete(*(rtems_id *)mutex);
a0006e5c: e5900000 ldr r0, [r0] <== NOT EXECUTED
a0006e60: eb000c23 bl a0009ef4 <rtems_semaphore_delete> <== NOT EXECUTED
if ( status == RTEMS_SUCCESSFUL )
a0006e64: e3500000 cmp r0, #0 <== NOT EXECUTED
return 0;
return -1;
}
a0006e68: 13e00000 mvnne r0, #0 <== NOT EXECUTED
a0006e6c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a0006c80 <rtems_gxx_once>:
{
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: once=%x, func=%x\n", *once, func );
#endif
if ( *(volatile __gthread_once_t *)once == 0 ) {
a0006c80: e5903000 ldr r3, [r0] <== NOT EXECUTED
/* 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))
{
a0006c84: e92d4071 push {r0, r4, r5, r6, lr} <== NOT EXECUTED
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: once=%x, func=%x\n", *once, func );
#endif
if ( *(volatile __gthread_once_t *)once == 0 ) {
a0006c88: e3530000 cmp r3, #0 <== NOT EXECUTED
/* 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))
{
a0006c8c: e1a04000 mov r4, r0 <== NOT EXECUTED
a0006c90: e1a06001 mov r6, r1 <== NOT EXECUTED
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: once=%x, func=%x\n", *once, func );
#endif
if ( *(volatile __gthread_once_t *)once == 0 ) {
a0006c94: 1a00000e bne a0006cd4 <rtems_gxx_once+0x54> <== NOT EXECUTED
rtems_mode saveMode;
__gthread_once_t o;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
a0006c98: e3a00c01 mov r0, #256 ; 0x100 <== NOT EXECUTED
a0006c9c: e1a01000 mov r1, r0 <== NOT EXECUTED
a0006ca0: e1a0200d mov r2, sp <== NOT EXECUTED
a0006ca4: eb000db6 bl a000a384 <rtems_task_mode> <== NOT EXECUTED
if ( (o = *(volatile __gthread_once_t *)once) == 0 ) {
a0006ca8: e5945000 ldr r5, [r4] <== NOT EXECUTED
*(volatile __gthread_once_t *)once = 1;
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
a0006cac: e59d0000 ldr r0, [sp] <== NOT EXECUTED
a0006cb0: e3a01c01 mov r1, #256 ; 0x100 <== NOT EXECUTED
if ( *(volatile __gthread_once_t *)once == 0 ) {
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 ) {
a0006cb4: e3550000 cmp r5, #0 <== NOT EXECUTED
*(volatile __gthread_once_t *)once = 1;
a0006cb8: 03a03001 moveq r3, #1 <== NOT EXECUTED
a0006cbc: 05843000 streq r3, [r4] <== NOT EXECUTED
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
a0006cc0: e1a0200d mov r2, sp <== NOT EXECUTED
a0006cc4: eb000dae bl a000a384 <rtems_task_mode> <== NOT EXECUTED
if ( o == 0 )
a0006cc8: e3550000 cmp r5, #0 <== NOT EXECUTED
a0006ccc: 1a000000 bne a0006cd4 <rtems_gxx_once+0x54> <== NOT EXECUTED
(*func)();
a0006cd0: e12fff36 blx r6 <== NOT EXECUTED
}
return 0;
}
a0006cd4: e3a00000 mov r0, #0 <== NOT EXECUTED
a0006cd8: e8bd8078 pop {r3, r4, r5, r6, pc} <== NOT EXECUTED
a0006eac <rtems_gxx_recursive_mutex_lock>:
}
int rtems_gxx_recursive_mutex_lock(__gthread_recursive_mutex_t *mutex)
{
return rtems_gxx_mutex_lock(mutex);
a0006eac: eaffffe1 b a0006e38 <rtems_gxx_mutex_lock> <== NOT EXECUTED
a0006eb4 <rtems_gxx_recursive_mutex_unlock>:
}
int rtems_gxx_recursive_mutex_unlock(__gthread_recursive_mutex_t *mutex)
{
return rtems_gxx_mutex_unlock(mutex);
a0006eb4: eafffff5 b a0006e90 <rtems_gxx_mutex_unlock> <== NOT EXECUTED
a0006dd0 <rtems_gxx_setspecific>:
int rtems_gxx_setspecific(__gthread_key_t key, const void *ptr)
{
a0006dd0: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
a0006dd4: e1a04000 mov r4, r0 <== NOT EXECUTED
a0006dd8: e1a05001 mov r5, r1 <== NOT EXECUTED
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 );
a0006ddc: e5942004 ldr r2, [r4, #4] <== NOT EXECUTED
a0006de0: e1a01004 mov r1, r4 <== NOT EXECUTED
a0006de4: e3a00000 mov r0, #0 <== NOT EXECUTED
a0006de8: eb000dd8 bl a000a550 <rtems_task_variable_add> <== NOT EXECUTED
if ( status == RTEMS_SUCCESSFUL ) {
a0006dec: e3500000 cmp r0, #0 <== NOT EXECUTED
/* now let's set the proper value */
key->val = (void *)ptr;
a0006df0: 05845000 streq r5, [r4] <== NOT EXECUTED
return 0;
}
return -1;
a0006df4: 13e00000 mvnne r0, #0 <== NOT EXECUTED
}
a0006df8: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
a000b044 <rtems_heap_allocate_aligned_with_boundary>:
size_t size,
uintptr_t alignment,
uintptr_t boundary
)
{
if (
a000b044: e59f3048 ldr r3, [pc, #72] ; a000b094 <rtems_heap_allocate_aligned_with_boundary+0x50><== NOT EXECUTED
void *rtems_heap_allocate_aligned_with_boundary(
size_t size,
uintptr_t alignment,
uintptr_t boundary
)
{
a000b048: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
if (
a000b04c: e5933000 ldr r3, [r3] <== NOT EXECUTED
void *rtems_heap_allocate_aligned_with_boundary(
size_t size,
uintptr_t alignment,
uintptr_t boundary
)
{
a000b050: e1a06000 mov r6, r0 <== NOT EXECUTED
a000b054: e1a05001 mov r5, r1 <== NOT EXECUTED
if (
a000b058: e3530003 cmp r3, #3 <== NOT EXECUTED
void *rtems_heap_allocate_aligned_with_boundary(
size_t size,
uintptr_t alignment,
uintptr_t boundary
)
{
a000b05c: e1a04002 mov r4, r2 <== NOT EXECUTED
if (
a000b060: 1a000002 bne a000b070 <rtems_heap_allocate_aligned_with_boundary+0x2c><== NOT EXECUTED
_System_state_Is_up( _System_state_Get() )
&& !malloc_is_system_state_OK()
a000b064: ebfffbe6 bl a000a004 <malloc_is_system_state_OK> <== NOT EXECUTED
a000b068: e3500000 cmp r0, #0 <== NOT EXECUTED
a000b06c: 0a000007 beq a000b090 <rtems_heap_allocate_aligned_with_boundary+0x4c><== NOT EXECUTED
) {
return NULL;
}
malloc_deferred_frees_process();
a000b070: ebfffbf7 bl a000a054 <malloc_deferred_frees_process> <== NOT EXECUTED
/* FIXME: Statistics, boundary checks */
return _Protected_heap_Allocate_aligned_with_boundary(
a000b074: e59f301c ldr r3, [pc, #28] ; a000b098 <rtems_heap_allocate_aligned_with_boundary+0x54><== NOT EXECUTED
a000b078: e1a01006 mov r1, r6 <== NOT EXECUTED
a000b07c: e1a02005 mov r2, r5 <== NOT EXECUTED
a000b080: e5930000 ldr r0, [r3] <== NOT EXECUTED
a000b084: e1a03004 mov r3, r4 <== NOT EXECUTED
RTEMS_Malloc_Heap,
size,
alignment,
boundary
);
}
a000b088: e8bd4070 pop {r4, r5, r6, lr} <== NOT EXECUTED
malloc_deferred_frees_process();
/* FIXME: Statistics, boundary checks */
return _Protected_heap_Allocate_aligned_with_boundary(
a000b08c: ea00131c b a000fd04 <_Protected_heap_Allocate_aligned_with_boundary><== NOT EXECUTED
RTEMS_Malloc_Heap,
size,
alignment,
boundary
);
}
a000b090: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
a000a244 <rtems_interrupt_disable>:
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000a244: e10f0000 mrs r0, CPSR <== NOT EXECUTED
a000a248: e3803080 orr r3, r0, #128 ; 0x80 <== NOT EXECUTED
a000a24c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
rtems_interrupt_level previous_level;
_ISR_Disable( previous_level );
return previous_level;
}
a000a250: e12fff1e bx lr <== NOT EXECUTED
a000a254 <rtems_interrupt_enable>:
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000a254: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED
void rtems_interrupt_enable(
rtems_interrupt_level previous_level
)
{
_ISR_Enable( previous_level );
}
a000a258: e12fff1e bx lr <== NOT EXECUTED
a000a25c <rtems_interrupt_flash>:
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
a000a25c: e10f3000 mrs r3, CPSR <== NOT EXECUTED
a000a260: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED
a000a264: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
void rtems_interrupt_flash(
rtems_interrupt_level previous_level
)
{
_ISR_Flash( previous_level );
}
a000a268: e12fff1e bx lr <== NOT EXECUTED
a000a26c <rtems_interrupt_is_in_progress>:
#undef rtems_interrupt_is_in_progress
bool rtems_interrupt_is_in_progress( void )
{
return _ISR_Is_in_progress();
a000a26c: e59f300c ldr r3, [pc, #12] ; a000a280 <rtems_interrupt_is_in_progress+0x14><== NOT EXECUTED
a000a270: e5930000 ldr r0, [r3] <== NOT EXECUTED
}
a000a274: e2500000 subs r0, r0, #0 <== NOT EXECUTED
a000a278: 13a00001 movne r0, #1 <== NOT EXECUTED
a000a27c: e12fff1e bx lr <== NOT EXECUTED
a0009c68 <rtems_interrupt_level_attribute>:
rtems_attribute rtems_interrupt_level_attribute(
uint32_t level
)
{
return RTEMS_INTERRUPT_LEVEL(level);
}
a0009c68: e2000080 and r0, r0, #128 ; 0x80 <== NOT EXECUTED
a0009c6c: e12fff1e bx lr <== NOT EXECUTED
a000ff98 <rtems_io_close>:
void *argument
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a000ff98: e59fc044 ldr ip, [pc, #68] ; a000ffe4 <rtems_io_close+0x4c>
rtems_status_code rtems_io_close(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
a000ff9c: e92d4010 push {r4, lr}
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a000ffa0: e59cc000 ldr ip, [ip]
rtems_status_code rtems_io_close(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
a000ffa4: e1a03000 mov r3, r0
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a000ffa8: e150000c cmp r0, ip
a000ffac: 2a000008 bcs a000ffd4 <rtems_io_close+0x3c>
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].close_entry;
a000ffb0: e59fc030 ldr ip, [pc, #48] ; a000ffe8 <rtems_io_close+0x50>
a000ffb4: e3a04018 mov r4, #24
a000ffb8: e59cc000 ldr ip, [ip]
a000ffbc: e023c394 mla r3, r4, r3, ip
a000ffc0: e5933008 ldr r3, [r3, #8]
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
a000ffc4: e3530000 cmp r3, #0
a000ffc8: 0a000003 beq a000ffdc <rtems_io_close+0x44>
a000ffcc: e12fff33 blx r3
a000ffd0: e8bd8010 pop {r4, pc}
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
a000ffd4: e3a0000a mov r0, #10 <== NOT EXECUTED
a000ffd8: e8bd8010 pop {r4, pc} <== NOT EXECUTED
callout = _IO_Driver_address_table[major].close_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
a000ffdc: e1a00003 mov r0, r3
}
a000ffe0: e8bd8010 pop {r4, pc}
a000ffec <rtems_io_control>:
void *argument
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a000ffec: e59fc044 ldr ip, [pc, #68] ; a0010038 <rtems_io_control+0x4c>
rtems_status_code rtems_io_control(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
a000fff0: e92d4010 push {r4, lr}
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a000fff4: e59cc000 ldr ip, [ip]
rtems_status_code rtems_io_control(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
a000fff8: e1a03000 mov r3, r0
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a000fffc: e150000c cmp r0, ip
a0010000: 2a000008 bcs a0010028 <rtems_io_control+0x3c>
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].control_entry;
a0010004: e59fc030 ldr ip, [pc, #48] ; a001003c <rtems_io_control+0x50>
a0010008: e3a04018 mov r4, #24
a001000c: e59cc000 ldr ip, [ip]
a0010010: e023c394 mla r3, r4, r3, ip
a0010014: e5933014 ldr r3, [r3, #20]
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
a0010018: e3530000 cmp r3, #0
a001001c: 0a000003 beq a0010030 <rtems_io_control+0x44>
a0010020: e12fff33 blx r3
a0010024: e8bd8010 pop {r4, pc}
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
a0010028: e3a0000a mov r0, #10 <== NOT EXECUTED
a001002c: e8bd8010 pop {r4, pc} <== NOT EXECUTED
callout = _IO_Driver_address_table[major].control_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
a0010030: e1a00003 mov r0, r3 <== NOT EXECUTED
}
a0010034: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a000e394 <rtems_io_initialize>:
void *argument
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a000e394: e59fc044 ldr ip, [pc, #68] ; a000e3e0 <rtems_io_initialize+0x4c>
rtems_status_code rtems_io_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
a000e398: e92d4010 push {r4, lr}
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a000e39c: e59cc000 ldr ip, [ip]
rtems_status_code rtems_io_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
a000e3a0: e1a03000 mov r3, r0
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a000e3a4: e150000c cmp r0, ip
a000e3a8: 2a000008 bcs a000e3d0 <rtems_io_initialize+0x3c>
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].initialization_entry;
a000e3ac: e59fc030 ldr ip, [pc, #48] ; a000e3e4 <rtems_io_initialize+0x50>
a000e3b0: e3a04018 mov r4, #24
a000e3b4: e0030394 mul r3, r4, r3
a000e3b8: e59cc000 ldr ip, [ip]
a000e3bc: e79c3003 ldr r3, [ip, r3]
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
a000e3c0: e3530000 cmp r3, #0
a000e3c4: 0a000003 beq a000e3d8 <rtems_io_initialize+0x44>
a000e3c8: e12fff33 blx r3
a000e3cc: e8bd8010 pop {r4, pc}
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
a000e3d0: e3a0000a mov r0, #10 <== NOT EXECUTED
a000e3d4: e8bd8010 pop {r4, pc} <== NOT EXECUTED
callout = _IO_Driver_address_table[major].initialization_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
a000e3d8: e1a00003 mov r0, r3
}
a000e3dc: e8bd8010 pop {r4, pc}
a0005e84 <rtems_io_lookup_name>:
rtems_status_code rtems_io_lookup_name(
const char *name,
rtems_driver_name_t *device_info
)
{
a0005e84: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
a0005e88: e24dd018 sub sp, sp, #24 <== NOT EXECUTED
a0005e8c: e1a06000 mov r6, r0 <== NOT EXECUTED
a0005e90: e1a05001 mov r5, r1 <== NOT EXECUTED
IMFS_jnode_t *the_jnode;
rtems_filesystem_location_info_t loc;
int result;
rtems_filesystem_node_types_t node_type;
result = rtems_filesystem_evaluate_path(
a0005e94: eb002ce2 bl a0011224 <strlen> <== NOT EXECUTED
a0005e98: e28d4004 add r4, sp, #4 <== NOT EXECUTED
a0005e9c: e3a03001 mov r3, #1 <== NOT EXECUTED
a0005ea0: e1a01000 mov r1, r0 <== NOT EXECUTED
a0005ea4: e58d3000 str r3, [sp] <== NOT EXECUTED
a0005ea8: e3a02000 mov r2, #0 <== NOT EXECUTED
a0005eac: e1a03004 mov r3, r4 <== NOT EXECUTED
a0005eb0: e1a00006 mov r0, r6 <== NOT EXECUTED
a0005eb4: eb00008f bl a00060f8 <rtems_filesystem_evaluate_path> <== NOT EXECUTED
name, strlen( name ), 0x00, &loc, true );
the_jnode = loc.node_access;
node_type = (*loc.ops->node_type_h)( &loc );
a0005eb8: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
IMFS_jnode_t *the_jnode;
rtems_filesystem_location_info_t loc;
int result;
rtems_filesystem_node_types_t node_type;
result = rtems_filesystem_evaluate_path(
a0005ebc: e1a08000 mov r8, r0 <== NOT EXECUTED
name, strlen( name ), 0x00, &loc, true );
the_jnode = loc.node_access;
node_type = (*loc.ops->node_type_h)( &loc );
a0005ec0: e1a00004 mov r0, r4 <== NOT EXECUTED
a0005ec4: e5933010 ldr r3, [r3, #16] <== NOT EXECUTED
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;
a0005ec8: e59d7004 ldr r7, [sp, #4] <== NOT EXECUTED
node_type = (*loc.ops->node_type_h)( &loc );
a0005ecc: e12fff33 blx r3 <== NOT EXECUTED
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
a0005ed0: e3580000 cmp r8, #0 <== NOT EXECUTED
a0005ed4: 03500002 cmpeq r0, #2 <== NOT EXECUTED
a0005ed8: 03a08000 moveq r8, #0 <== NOT EXECUTED
a0005edc: 13a08001 movne r8, #1 <== NOT EXECUTED
a0005ee0: 0a000003 beq a0005ef4 <rtems_io_lookup_name+0x70> <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
a0005ee4: e1a00004 mov r0, r4 <== NOT EXECUTED
a0005ee8: eb0000b2 bl a00061b8 <rtems_filesystem_freenode> <== NOT EXECUTED
return RTEMS_UNSATISFIED;
a0005eec: e3a0000d mov r0, #13 <== NOT EXECUTED
a0005ef0: ea00000a b a0005f20 <rtems_io_lookup_name+0x9c> <== NOT EXECUTED
}
device_info->device_name = (char *) name;
a0005ef4: e5856000 str r6, [r5] <== NOT EXECUTED
device_info->device_name_length = strlen( name );
a0005ef8: e1a00006 mov r0, r6 <== NOT EXECUTED
a0005efc: eb002cc8 bl a0011224 <strlen> <== NOT EXECUTED
a0005f00: e5850004 str r0, [r5, #4] <== NOT EXECUTED
device_info->major = the_jnode->info.device.major;
a0005f04: e5973050 ldr r3, [r7, #80] ; 0x50 <== NOT EXECUTED
device_info->minor = the_jnode->info.device.minor;
rtems_filesystem_freenode( &loc );
a0005f08: e1a00004 mov r0, r4 <== NOT EXECUTED
return RTEMS_UNSATISFIED;
}
device_info->device_name = (char *) name;
device_info->device_name_length = strlen( name );
device_info->major = the_jnode->info.device.major;
a0005f0c: e5853008 str r3, [r5, #8] <== NOT EXECUTED
device_info->minor = the_jnode->info.device.minor;
a0005f10: e5973054 ldr r3, [r7, #84] ; 0x54 <== NOT EXECUTED
a0005f14: e585300c str r3, [r5, #12] <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
a0005f18: eb0000a6 bl a00061b8 <rtems_filesystem_freenode> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a0005f1c: e1a00008 mov r0, r8 <== NOT EXECUTED
}
a0005f20: e28dd018 add sp, sp, #24 <== NOT EXECUTED
a0005f24: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
a0010040 <rtems_io_open>:
void *argument
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a0010040: e59fc044 ldr ip, [pc, #68] ; a001008c <rtems_io_open+0x4c>
rtems_status_code rtems_io_open(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
a0010044: e92d4010 push {r4, lr}
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a0010048: e59cc000 ldr ip, [ip]
rtems_status_code rtems_io_open(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
a001004c: e1a03000 mov r3, r0
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a0010050: e150000c cmp r0, ip
a0010054: 2a000008 bcs a001007c <rtems_io_open+0x3c>
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].open_entry;
a0010058: e59fc030 ldr ip, [pc, #48] ; a0010090 <rtems_io_open+0x50>
a001005c: e3a04018 mov r4, #24
a0010060: e59cc000 ldr ip, [ip]
a0010064: e023c394 mla r3, r4, r3, ip
a0010068: e5933004 ldr r3, [r3, #4]
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
a001006c: e3530000 cmp r3, #0
a0010070: 0a000003 beq a0010084 <rtems_io_open+0x44>
a0010074: e12fff33 blx r3
a0010078: e8bd8010 pop {r4, pc}
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
a001007c: e3a0000a mov r0, #10 <== NOT EXECUTED
a0010080: e8bd8010 pop {r4, pc} <== NOT EXECUTED
callout = _IO_Driver_address_table[major].open_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
a0010084: e1a00003 mov r0, r3
}
a0010088: e8bd8010 pop {r4, pc}
a0010094 <rtems_io_read>:
void *argument
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a0010094: e59fc044 ldr ip, [pc, #68] ; a00100e0 <rtems_io_read+0x4c>
rtems_status_code rtems_io_read(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
a0010098: e92d4010 push {r4, lr}
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a001009c: e59cc000 ldr ip, [ip]
rtems_status_code rtems_io_read(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
a00100a0: e1a03000 mov r3, r0
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a00100a4: e150000c cmp r0, ip
a00100a8: 2a000008 bcs a00100d0 <rtems_io_read+0x3c>
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].read_entry;
a00100ac: e59fc030 ldr ip, [pc, #48] ; a00100e4 <rtems_io_read+0x50>
a00100b0: e3a04018 mov r4, #24
a00100b4: e59cc000 ldr ip, [ip]
a00100b8: e023c394 mla r3, r4, r3, ip
a00100bc: e593300c ldr r3, [r3, #12]
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
a00100c0: e3530000 cmp r3, #0
a00100c4: 0a000003 beq a00100d8 <rtems_io_read+0x44>
a00100c8: e12fff33 blx r3
a00100cc: e8bd8010 pop {r4, pc}
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
a00100d0: e3a0000a mov r0, #10 <== NOT EXECUTED
a00100d4: e8bd8010 pop {r4, pc} <== NOT EXECUTED
callout = _IO_Driver_address_table[major].read_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
a00100d8: e1a00003 mov r0, r3
}
a00100dc: e8bd8010 pop {r4, pc}
a000ab6c <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
)
{
a000ab6c: e92d4010 push {r4, lr}
a000ab70: e1a04000 mov r4, r0
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
a000ab74: e59f015c ldr r0, [pc, #348] ; a000acd8 <rtems_io_register_driver+0x16c>
rtems_device_major_number major,
const rtems_driver_address_table *driver_table,
rtems_device_major_number *registered_major
)
{
rtems_device_major_number major_limit = _IO_Number_of_drivers;
a000ab78: e59f315c ldr r3, [pc, #348] ; a000acdc <rtems_io_register_driver+0x170>
if ( rtems_interrupt_is_in_progress() )
a000ab7c: e5900000 ldr r0, [r0]
rtems_device_major_number major,
const rtems_driver_address_table *driver_table,
rtems_device_major_number *registered_major
)
{
rtems_device_major_number major_limit = _IO_Number_of_drivers;
a000ab80: e5933000 ldr r3, [r3]
if ( rtems_interrupt_is_in_progress() )
a000ab84: e3500000 cmp r0, #0
a000ab88: 1a000043 bne a000ac9c <rtems_io_register_driver+0x130>
return RTEMS_CALLED_FROM_ISR;
if ( registered_major == NULL )
a000ab8c: e3520000 cmp r2, #0
a000ab90: 0a000043 beq a000aca4 <rtems_io_register_driver+0x138>
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
if ( driver_table == NULL )
a000ab94: e3510000 cmp r1, #0
if ( registered_major == NULL )
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
a000ab98: e5823000 str r3, [r2]
if ( driver_table == NULL )
a000ab9c: 0a000040 beq a000aca4 <rtems_io_register_driver+0x138>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
a000aba0: e5910000 ldr r0, [r1]
a000aba4: e3500000 cmp r0, #0
a000aba8: 1a000041 bne a000acb4 <rtems_io_register_driver+0x148>
a000abac: e5910004 ldr r0, [r1, #4]
a000abb0: e3500000 cmp r0, #0
a000abb4: 1a00003e bne a000acb4 <rtems_io_register_driver+0x148>
a000abb8: ea000039 b a000aca4 <rtems_io_register_driver+0x138> <== NOT EXECUTED
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a000abbc: e59f311c ldr r3, [pc, #284] ; a000ace0 <rtems_io_register_driver+0x174>
a000abc0: e5930000 ldr r0, [r3]
a000abc4: e2800001 add r0, r0, #1
a000abc8: e5830000 str r0, [r3]
if ( major >= major_limit )
return RTEMS_INVALID_NUMBER;
_Thread_Disable_dispatch();
if ( major == 0 ) {
a000abcc: e3540000 cmp r4, #0
a000abd0: e59f010c ldr r0, [pc, #268] ; a000ace4 <rtems_io_register_driver+0x178>
a000abd4: 1a000010 bne a000ac1c <rtems_io_register_driver+0xb0>
static rtems_status_code rtems_io_obtain_major_number(
rtems_device_major_number *major
)
{
rtems_device_major_number n = _IO_Number_of_drivers;
a000abd8: e59f30fc ldr r3, [pc, #252] ; a000acdc <rtems_io_register_driver+0x170>
a000abdc: e593c000 ldr ip, [r3]
a000abe0: e5903000 ldr r3, [r0]
a000abe4: ea000006 b a000ac04 <rtems_io_register_driver+0x98>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
a000abe8: e5930000 ldr r0, [r3]
a000abec: e3500000 cmp r0, #0
a000abf0: 1a000032 bne a000acc0 <rtems_io_register_driver+0x154>
a000abf4: e5930004 ldr r0, [r3, #4]
a000abf8: e3500000 cmp r0, #0
a000abfc: 1a00002f bne a000acc0 <rtems_io_register_driver+0x154>
a000ac00: ea000001 b a000ac0c <rtems_io_register_driver+0xa0>
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 ) {
a000ac04: e154000c cmp r4, ip
a000ac08: 3afffff6 bcc a000abe8 <rtems_io_register_driver+0x7c>
}
/* Assigns invalid value in case of failure */
*major = m;
if ( m != n )
a000ac0c: e154000c cmp r4, ip
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
a000ac10: e5824000 str r4, [r2]
if ( m != n )
a000ac14: 1a000011 bne a000ac60 <rtems_io_register_driver+0xf4>
a000ac18: ea00002b b a000accc <rtems_io_register_driver+0x160>
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
a000ac1c: e3a03018 mov r3, #24
a000ac20: e0030394 mul r3, r4, r3
a000ac24: e5900000 ldr r0, [r0]
a000ac28: e080c003 add ip, r0, r3
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
a000ac2c: e7903003 ldr r3, [r0, r3]
a000ac30: e3530000 cmp r3, #0
a000ac34: 13a03000 movne r3, #0
a000ac38: 1a000002 bne a000ac48 <rtems_io_register_driver+0xdc>
return RTEMS_SUCCESSFUL;
return RTEMS_TOO_MANY;
}
rtems_status_code rtems_io_register_driver(
a000ac3c: e59c3004 ldr r3, [ip, #4]
a000ac40: e2733001 rsbs r3, r3, #1
a000ac44: 33a03000 movcc r3, #0
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
if ( !rtems_io_is_empty_table( table ) ) {
a000ac48: e3530000 cmp r3, #0
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
*registered_major = major;
a000ac4c: 15824000 strne r4, [r2]
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
if ( !rtems_io_is_empty_table( table ) ) {
a000ac50: 1a000002 bne a000ac60 <rtems_io_register_driver+0xf4>
_Thread_Enable_dispatch();
a000ac54: eb0006e1 bl a000c7e0 <_Thread_Enable_dispatch>
return RTEMS_RESOURCE_IN_USE;
a000ac58: e3a0000c mov r0, #12
a000ac5c: e8bd8010 pop {r4, pc}
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
a000ac60: e59f307c ldr r3, [pc, #124] ; a000ace4 <rtems_io_register_driver+0x178>
a000ac64: e3a0c018 mov ip, #24
a000ac68: e1a0e001 mov lr, r1
a000ac6c: e5933000 ldr r3, [r3]
a000ac70: e02c3c94 mla ip, r4, ip, r3
a000ac74: e8be000f ldm lr!, {r0, r1, r2, r3}
a000ac78: e8ac000f stmia ip!, {r0, r1, r2, r3}
a000ac7c: e89e0003 ldm lr, {r0, r1}
a000ac80: e88c0003 stm ip, {r0, r1}
_Thread_Enable_dispatch();
a000ac84: eb0006d5 bl a000c7e0 <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
a000ac88: e3a01000 mov r1, #0
a000ac8c: e1a00004 mov r0, r4
a000ac90: e1a02001 mov r2, r1
}
a000ac94: e8bd4010 pop {r4, lr}
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
a000ac98: ea001cb4 b a0011f70 <rtems_io_initialize>
)
{
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
return RTEMS_CALLED_FROM_ISR;
a000ac9c: e3a00012 mov r0, #18 <== NOT EXECUTED
a000aca0: e8bd8010 pop {r4, pc} <== NOT EXECUTED
if ( driver_table == NULL )
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
a000aca4: e3a00009 mov r0, #9 <== NOT EXECUTED
a000aca8: e8bd8010 pop {r4, pc} <== NOT EXECUTED
if ( major >= major_limit )
return RTEMS_INVALID_NUMBER;
a000acac: e3a0000a mov r0, #10 <== NOT EXECUTED
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
a000acb0: e8bd8010 pop {r4, pc} <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
a000acb4: e1540003 cmp r4, r3
a000acb8: 3affffbf bcc a000abbc <rtems_io_register_driver+0x50>
a000acbc: eafffffa b a000acac <rtems_io_register_driver+0x140> <== NOT EXECUTED
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 ) {
a000acc0: e2844001 add r4, r4, #1
a000acc4: e2833018 add r3, r3, #24
a000acc8: eaffffcd b a000ac04 <rtems_io_register_driver+0x98>
if ( major == 0 ) {
rtems_status_code sc = rtems_io_obtain_major_number( registered_major );
if ( sc != RTEMS_SUCCESSFUL ) {
_Thread_Enable_dispatch();
a000accc: eb0006c3 bl a000c7e0 <_Thread_Enable_dispatch>
*major = m;
if ( m != n )
return RTEMS_SUCCESSFUL;
return RTEMS_TOO_MANY;
a000acd0: e3a00005 mov r0, #5
if ( major == 0 ) {
rtems_status_code sc = rtems_io_obtain_major_number( registered_major );
if ( sc != RTEMS_SUCCESSFUL ) {
_Thread_Enable_dispatch();
return sc;
a000acd4: e8bd8010 pop {r4, pc}
a000ace8 <rtems_io_unregister_driver>:
rtems_status_code rtems_io_unregister_driver(
rtems_device_major_number major
)
{
if ( rtems_interrupt_is_in_progress() )
a000ace8: e59f3060 ldr r3, [pc, #96] ; a000ad50 <rtems_io_unregister_driver+0x68>
*/
rtems_status_code rtems_io_unregister_driver(
rtems_device_major_number major
)
{
a000acec: e92d4010 push {r4, lr}
if ( rtems_interrupt_is_in_progress() )
a000acf0: e5934000 ldr r4, [r3]
a000acf4: e3540000 cmp r4, #0
a000acf8: 1a000010 bne a000ad40 <rtems_io_unregister_driver+0x58>
return RTEMS_CALLED_FROM_ISR;
if ( major < _IO_Number_of_drivers ) {
a000acfc: e59f3050 ldr r3, [pc, #80] ; a000ad54 <rtems_io_unregister_driver+0x6c>
a000ad00: e5933000 ldr r3, [r3]
a000ad04: e1500003 cmp r0, r3
a000ad08: 2a00000e bcs a000ad48 <rtems_io_unregister_driver+0x60>
a000ad0c: e59f3044 ldr r3, [pc, #68] ; a000ad58 <rtems_io_unregister_driver+0x70>
a000ad10: e5932000 ldr r2, [r3]
a000ad14: e2822001 add r2, r2, #1
a000ad18: e5832000 str r2, [r3]
_Thread_Disable_dispatch();
memset(
a000ad1c: e59f3038 ldr r3, [pc, #56] ; a000ad5c <rtems_io_unregister_driver+0x74>
&_IO_Driver_address_table[major],
a000ad20: e3a02018 mov r2, #24
if ( rtems_interrupt_is_in_progress() )
return RTEMS_CALLED_FROM_ISR;
if ( major < _IO_Number_of_drivers ) {
_Thread_Disable_dispatch();
memset(
a000ad24: e1a01004 mov r1, r4
a000ad28: e5933000 ldr r3, [r3]
a000ad2c: e0203092 mla r0, r2, r0, r3
a000ad30: eb0026cc bl a0014868 <memset>
&_IO_Driver_address_table[major],
0,
sizeof( rtems_driver_address_table )
);
_Thread_Enable_dispatch();
a000ad34: eb0006a9 bl a000c7e0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000ad38: e1a00004 mov r0, r4
a000ad3c: e8bd8010 pop {r4, pc}
rtems_status_code rtems_io_unregister_driver(
rtems_device_major_number major
)
{
if ( rtems_interrupt_is_in_progress() )
return RTEMS_CALLED_FROM_ISR;
a000ad40: e3a00012 mov r0, #18
a000ad44: e8bd8010 pop {r4, pc}
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
return RTEMS_UNSATISFIED;
a000ad48: e3a0000d mov r0, #13
}
a000ad4c: e8bd8010 pop {r4, pc}
a00100e8 <rtems_io_write>:
void *argument
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a00100e8: e59fc044 ldr ip, [pc, #68] ; a0010134 <rtems_io_write+0x4c>
rtems_status_code rtems_io_write(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
a00100ec: e92d4010 push {r4, lr}
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a00100f0: e59cc000 ldr ip, [ip]
rtems_status_code rtems_io_write(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
a00100f4: e1a03000 mov r3, r0
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a00100f8: e150000c cmp r0, ip
a00100fc: 2a000008 bcs a0010124 <rtems_io_write+0x3c>
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].write_entry;
a0010100: e59fc030 ldr ip, [pc, #48] ; a0010138 <rtems_io_write+0x50>
a0010104: e3a04018 mov r4, #24
a0010108: e59cc000 ldr ip, [ip]
a001010c: e023c394 mla r3, r4, r3, ip
a0010110: e5933010 ldr r3, [r3, #16]
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
a0010114: e3530000 cmp r3, #0
a0010118: 0a000003 beq a001012c <rtems_io_write+0x44>
a001011c: e12fff33 blx r3
a0010120: e8bd8010 pop {r4, pc}
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
a0010124: e3a0000a mov r0, #10 <== NOT EXECUTED
a0010128: e8bd8010 pop {r4, pc} <== NOT EXECUTED
callout = _IO_Driver_address_table[major].write_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
a001012c: e1a00003 mov r0, r3
}
a0010130: e8bd8010 pop {r4, pc}
a0007608 <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)
{
a0007608: e92d4071 push {r0, r4, r5, r6, lr} <== NOT EXECUTED
a000760c: e1a06000 mov r6, r0 <== NOT EXECUTED
rtems_id current_task_id;
/*
* get current task id
*/
current_task_id = rtems_task_self();
a0007610: eb000a30 bl a0009ed8 <rtems_task_self> <== 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 )
a0007614: e1560000 cmp r6, r0 <== NOT EXECUTED
rtems_id current_task_id;
/*
* get current task id
*/
current_task_id = rtems_task_self();
a0007618: e1a04000 mov r4, r0 <== 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;
a000761c: 03a06000 moveq r6, #0 <== 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 )
a0007620: 0a00000e beq a0007660 <rtems_libio_share_private_env+0x58> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
/*
* Try to get the requested user environment
*/
sc = rtems_task_variable_get(
a0007624: e59f503c ldr r5, [pc, #60] ; a0007668 <rtems_libio_share_private_env+0x60><== NOT EXECUTED
a0007628: e1a00006 mov r0, r6 <== NOT EXECUTED
a000762c: e1a0200d mov r2, sp <== NOT EXECUTED
a0007630: e1a01005 mov r1, r5 <== NOT EXECUTED
a0007634: eb000a6e bl a0009ff4 <rtems_task_variable_get> <== NOT EXECUTED
(void*)&shared_user_env );
/*
* If it was not successful, return the error code
*/
if (sc != RTEMS_SUCCESSFUL)
a0007638: e2506000 subs r6, r0, #0 <== NOT EXECUTED
a000763c: 1a000007 bne a0007660 <rtems_libio_share_private_env+0x58> <== NOT EXECUTED
* 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) {
a0007640: e5950000 ldr r0, [r5] <== NOT EXECUTED
a0007644: e5903000 ldr r3, [r0] <== NOT EXECUTED
a0007648: e1530004 cmp r3, r4 <== NOT EXECUTED
a000764c: 1a000000 bne a0007654 <rtems_libio_share_private_env+0x4c> <== NOT EXECUTED
rtems_user_env_t *tmp = rtems_current_user_env;
free_user_env( tmp );
a0007650: ebffff95 bl a00074ac <free_user_env> <== NOT EXECUTED
}
/* the current_user_env is the same pointer that remote env */
rtems_current_user_env = shared_user_env;
a0007654: e59d2000 ldr r2, [sp] <== NOT EXECUTED
a0007658: e59f3008 ldr r3, [pc, #8] ; a0007668 <rtems_libio_share_private_env+0x60><== NOT EXECUTED
a000765c: e5832000 str r2, [r3] <== NOT EXECUTED
#ifdef HAVE_USERENV_REFCNT
rtems_current_user_env->refcnt++;
#endif
return RTEMS_SUCCESSFUL;
}
a0007660: e1a00006 mov r0, r6 <== NOT EXECUTED
a0007664: e8bd8078 pop {r3, r4, r5, r6, pc} <== NOT EXECUTED
a000da14 <rtems_libio_to_fcntl_flags>:
uint32_t flags
)
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
a000da14: e2003006 and r3, r0, #6
a000da18: e3530006 cmp r3, #6
fcntl_flags |= O_RDWR;
a000da1c: 03a03002 moveq r3, #2
uint32_t flags
)
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
a000da20: 0a000005 beq a000da3c <rtems_libio_to_fcntl_flags+0x28>
fcntl_flags |= O_RDWR;
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
a000da24: e3100002 tst r0, #2
fcntl_flags |= O_RDONLY;
a000da28: 13a03000 movne r3, #0
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
fcntl_flags |= O_RDWR;
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
a000da2c: 1a000002 bne a000da3c <rtems_libio_to_fcntl_flags+0x28>
)
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
fcntl_flags |= O_RDWR;
a000da30: e3100004 tst r0, #4 <== NOT EXECUTED
a000da34: 03a03000 moveq r3, #0 <== NOT EXECUTED
a000da38: 13a03001 movne r3, #1 <== NOT EXECUTED
fcntl_flags |= O_RDONLY;
} else if ( (flags & LIBIO_FLAGS_WRITE) == LIBIO_FLAGS_WRITE) {
fcntl_flags |= O_WRONLY;
}
if ( (flags & LIBIO_FLAGS_NO_DELAY) == LIBIO_FLAGS_NO_DELAY ) {
a000da3c: e3100001 tst r0, #1
fcntl_flags |= O_NONBLOCK;
a000da40: 13833901 orrne r3, r3, #16384 ; 0x4000
}
if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) {
a000da44: e3100c02 tst r0, #512 ; 0x200
fcntl_flags |= O_APPEND;
a000da48: 13833008 orrne r3, r3, #8
}
if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) {
a000da4c: e3100b01 tst r0, #1024 ; 0x400
fcntl_flags |= O_CREAT;
a000da50: 13833c02 orrne r3, r3, #512 ; 0x200
}
return fcntl_flags;
}
a000da54: e1a00003 mov r0, r3
a000da58: e12fff1e bx lr
a000a3c8 <rtems_malloc_statistics_at_free>:
* size and thus we skip updating the statistics.
*/
static void rtems_malloc_statistics_at_free(
void *pointer
)
{
a000a3c8: e92d4001 push {r0, lr} <== NOT EXECUTED
uintptr_t size;
if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) {
a000a3cc: e59f3038 ldr r3, [pc, #56] ; a000a40c <rtems_malloc_statistics_at_free+0x44><== NOT EXECUTED
* size and thus we skip updating the statistics.
*/
static void rtems_malloc_statistics_at_free(
void *pointer
)
{
a000a3d0: e1a01000 mov r1, r0 <== NOT EXECUTED
uintptr_t size;
if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) {
a000a3d4: e1a0200d mov r2, sp <== NOT EXECUTED
a000a3d8: e5930000 ldr r0, [r3] <== NOT EXECUTED
a000a3dc: eb00167c bl a000fdd4 <_Protected_heap_Get_block_size> <== NOT EXECUTED
a000a3e0: e3500000 cmp r0, #0 <== NOT EXECUTED
a000a3e4: 0a000007 beq a000a408 <rtems_malloc_statistics_at_free+0x40><== NOT EXECUTED
MSBUMP(lifetime_freed, size);
a000a3e8: e59f3020 ldr r3, [pc, #32] ; a000a410 <rtems_malloc_statistics_at_free+0x48><== NOT EXECUTED
a000a3ec: e59d0000 ldr r0, [sp] <== NOT EXECUTED
a000a3f0: e2832024 add r2, r3, #36 ; 0x24 <== NOT EXECUTED
a000a3f4: e8920006 ldm r2, {r1, r2} <== NOT EXECUTED
a000a3f8: e0911000 adds r1, r1, r0 <== NOT EXECUTED
a000a3fc: e2a22000 adc r2, r2, #0 <== NOT EXECUTED
a000a400: e5831024 str r1, [r3, #36] ; 0x24 <== NOT EXECUTED
a000a404: e5832028 str r2, [r3, #40] ; 0x28 <== NOT EXECUTED
}
}
a000a408: e8bd8008 pop {r3, pc} <== NOT EXECUTED
a00117b8 <rtems_memalign>:
int rtems_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
a00117b8: e92d4070 push {r4, r5, r6, lr}
void *return_this;
/*
* Parameter error checks
*/
if ( !pointer )
a00117bc: e2504000 subs r4, r0, #0
int rtems_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
a00117c0: e1a05001 mov r5, r1
a00117c4: e1a06002 mov r6, r2
void *return_this;
/*
* Parameter error checks
*/
if ( !pointer )
a00117c8: 0a00001b beq a001183c <rtems_memalign+0x84>
return EINVAL;
*pointer = NULL;
a00117cc: e3a03000 mov r3, #0
a00117d0: e5843000 str r3, [r4]
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
a00117d4: e59f3070 ldr r3, [pc, #112] ; a001184c <rtems_memalign+0x94>
a00117d8: e5933000 ldr r3, [r3]
a00117dc: e3530003 cmp r3, #3
a00117e0: 1a000002 bne a00117f0 <rtems_memalign+0x38>
!malloc_is_system_state_OK() )
a00117e4: ebffd69a bl a0007254 <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()) &&
a00117e8: e3500000 cmp r0, #0
a00117ec: 0a000012 beq a001183c <rtems_memalign+0x84>
return EINVAL;
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
a00117f0: ebffd6ab bl a00072a4 <malloc_deferred_frees_process>
Heap_Control *heap,
uintptr_t size,
uintptr_t alignment
)
{
return
a00117f4: e59f3054 ldr r3, [pc, #84] ; a0011850 <rtems_memalign+0x98>
a00117f8: e1a02005 mov r2, r5
a00117fc: e1a01006 mov r1, r6
a0011800: e5930000 ldr r0, [r3]
a0011804: e3a03000 mov r3, #0
a0011808: ebffe9a2 bl a000be98 <_Protected_heap_Allocate_aligned_with_boundary>
return_this = _Protected_heap_Allocate_aligned(
RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
a001180c: e2505000 subs r5, r0, #0
a0011810: 0a00000b beq a0011844 <rtems_memalign+0x8c>
return ENOMEM;
/*
* If configured, update the more involved statistics
*/
if ( rtems_malloc_statistics_helpers )
a0011814: e59f3038 ldr r3, [pc, #56] ; a0011854 <rtems_memalign+0x9c>
a0011818: e5933000 ldr r3, [r3]
a001181c: e3530000 cmp r3, #0
a0011820: 0a000002 beq a0011830 <rtems_memalign+0x78>
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
a0011824: e5933004 ldr r3, [r3, #4]
a0011828: e1a00004 mov r0, r4 <== NOT EXECUTED
a001182c: e12fff33 blx r3 <== NOT EXECUTED
*pointer = return_this;
a0011830: e5845000 str r5, [r4]
return 0;
a0011834: e3a00000 mov r0, #0
a0011838: e8bd8070 pop {r4, r5, r6, pc}
/*
* 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;
a001183c: e3a00016 mov r0, #22 <== NOT EXECUTED
a0011840: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
return ENOMEM;
a0011844: e3a0000c mov r0, #12 <== NOT EXECUTED
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
*pointer = return_this;
return 0;
}
a0011848: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
a0015c34 <rtems_message_queue_broadcast>:
rtems_id id,
const void *buffer,
size_t size,
uint32_t *count
)
{
a0015c34: e92d40f7 push {r0, r1, r2, r4, r5, r6, r7, lr}
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status core_status;
if ( !buffer )
a0015c38: e2517000 subs r7, r1, #0
rtems_id id,
const void *buffer,
size_t size,
uint32_t *count
)
{
a0015c3c: e1a04000 mov r4, r0
a0015c40: e1a05002 mov r5, r2
a0015c44: e1a06003 mov r6, r3
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status core_status;
if ( !buffer )
a0015c48: 0a000015 beq a0015ca4 <rtems_message_queue_broadcast+0x70>
return RTEMS_INVALID_ADDRESS;
if ( !count )
a0015c4c: e3530000 cmp r3, #0
a0015c50: 0a000013 beq a0015ca4 <rtems_message_queue_broadcast+0x70>
Objects_Id id,
Objects_Locations *location
)
{
return (Message_queue_Control *)
_Objects_Get( &_Message_queue_Information, id, location );
a0015c54: e59f0050 ldr r0, [pc, #80] ; a0015cac <rtems_message_queue_broadcast+0x78>
a0015c58: e1a01004 mov r1, r4
a0015c5c: e28d2008 add r2, sp, #8
a0015c60: eb0013eb bl a001ac14 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
a0015c64: e59d3008 ldr r3, [sp, #8]
a0015c68: e3530000 cmp r3, #0
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a0015c6c: 13a00004 movne r0, #4
if ( !count )
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
a0015c70: 1a00000c bne a0015ca8 <rtems_message_queue_broadcast+0x74>
case OBJECTS_LOCAL:
core_status = _CORE_message_queue_Broadcast(
a0015c74: e58d3000 str r3, [sp]
a0015c78: e1a01007 mov r1, r7
a0015c7c: e1a03004 mov r3, r4
a0015c80: e1a02005 mov r2, r5
a0015c84: e2800014 add r0, r0, #20
a0015c88: e58d6004 str r6, [sp, #4]
a0015c8c: eb000d0b bl a00190c0 <_CORE_message_queue_Broadcast>
a0015c90: e1a04000 mov r4, r0
NULL,
#endif
count
);
_Thread_Enable_dispatch();
a0015c94: eb0016af bl a001b758 <_Thread_Enable_dispatch>
return
a0015c98: e1a00004 mov r0, r4
a0015c9c: eb0000cc bl a0015fd4 <_Message_queue_Translate_core_message_queue_return_code>
a0015ca0: ea000000 b a0015ca8 <rtems_message_queue_broadcast+0x74>
if ( !buffer )
return RTEMS_INVALID_ADDRESS;
if ( !count )
return RTEMS_INVALID_ADDRESS;
a0015ca4: e3a00009 mov r0, #9
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a0015ca8: e8bd80fe pop {r1, r2, r3, r4, r5, r6, r7, pc}
a0010fc4 <rtems_message_queue_create>:
uint32_t count,
size_t max_message_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
a0010fc4: e92d45f1 push {r0, r4, r5, r6, r7, r8, sl, lr}
CORE_message_queue_Attributes the_msgq_attributes;
#if defined(RTEMS_MULTIPROCESSING)
bool is_global;
#endif
if ( !rtems_is_name_valid( name ) )
a0010fc8: e2507000 subs r7, r0, #0
uint32_t count,
size_t max_message_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
a0010fcc: e1a06001 mov r6, r1
a0010fd0: e1a05002 mov r5, r2
a0010fd4: e1a0a003 mov sl, r3
a0010fd8: e59d8020 ldr r8, [sp, #32]
#if defined(RTEMS_MULTIPROCESSING)
bool is_global;
#endif
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
a0010fdc: 03a00003 moveq r0, #3
CORE_message_queue_Attributes the_msgq_attributes;
#if defined(RTEMS_MULTIPROCESSING)
bool is_global;
#endif
if ( !rtems_is_name_valid( name ) )
a0010fe0: 0a00002d beq a001109c <rtems_message_queue_create+0xd8>
return RTEMS_INVALID_NAME;
if ( !id )
a0010fe4: e3580000 cmp r8, #0
return RTEMS_INVALID_ADDRESS;
a0010fe8: 03a00009 moveq r0, #9
#endif
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
a0010fec: 0a00002a beq a001109c <rtems_message_queue_create+0xd8>
if ( (is_global = _Attributes_Is_global( attribute_set ) ) &&
!_System_state_Is_multiprocessing )
return RTEMS_MP_NOT_CONFIGURED;
#endif
if ( count == 0 )
a0010ff0: e3510000 cmp r1, #0
return RTEMS_INVALID_NUMBER;
a0010ff4: 03a0000a moveq r0, #10
if ( (is_global = _Attributes_Is_global( attribute_set ) ) &&
!_System_state_Is_multiprocessing )
return RTEMS_MP_NOT_CONFIGURED;
#endif
if ( count == 0 )
a0010ff8: 0a000027 beq a001109c <rtems_message_queue_create+0xd8>
return RTEMS_INVALID_NUMBER;
if ( max_message_size == 0 )
a0010ffc: e3520000 cmp r2, #0
return RTEMS_INVALID_SIZE;
a0011000: 03a00008 moveq r0, #8
#endif
if ( count == 0 )
return RTEMS_INVALID_NUMBER;
if ( max_message_size == 0 )
a0011004: 0a000024 beq a001109c <rtems_message_queue_create+0xd8>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a0011008: e59f3090 ldr r3, [pc, #144] ; a00110a0 <rtems_message_queue_create+0xdc>
a001100c: e5932000 ldr r2, [r3]
a0011010: e2822001 add r2, r2, #1
a0011014: e5832000 str r2, [r3]
#endif
#endif
_Thread_Disable_dispatch(); /* protects object pointer */
the_message_queue = _Message_queue_Allocate();
a0011018: eb001598 bl a0016680 <_Message_queue_Allocate>
if ( !the_message_queue ) {
a001101c: e2504000 subs r4, r0, #0
a0011020: 1a000002 bne a0011030 <rtems_message_queue_create+0x6c>
_Thread_Enable_dispatch();
a0011024: eb000b3f bl a0013d28 <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
a0011028: e3a00005 mov r0, #5 <== NOT EXECUTED
a001102c: ea00001a b a001109c <rtems_message_queue_create+0xd8> <== NOT EXECUTED
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_message_queue->attribute_set = attribute_set;
a0011030: e584a010 str sl, [r4, #16]
if (_Attributes_Is_priority( attribute_set ) )
a0011034: e21aa004 ands sl, sl, #4
the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY;
a0011038: 13a03001 movne r3, #1
a001103c: 158d3000 strne r3, [sp]
else
the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO;
if ( ! _CORE_message_queue_Initialize(
a0011040: e2840014 add r0, r4, #20
a0011044: e1a0100d mov r1, sp
a0011048: e1a02006 mov r2, r6
a001104c: e1a03005 mov r3, r5
the_message_queue->attribute_set = attribute_set;
if (_Attributes_Is_priority( attribute_set ) )
the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY;
else
the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO;
a0011050: 058da000 streq sl, [sp]
if ( ! _CORE_message_queue_Initialize(
a0011054: eb00044c bl a001218c <_CORE_message_queue_Initialize>
a0011058: e3500000 cmp r0, #0
a001105c: 1a000005 bne a0011078 <rtems_message_queue_create+0xb4>
*/
RTEMS_INLINE_ROUTINE void _Message_queue_Free (
Message_queue_Control *the_message_queue
)
{
_Objects_Free( &_Message_queue_Information, &the_message_queue->Object );
a0011060: e59f003c ldr r0, [pc, #60] ; a00110a4 <rtems_message_queue_create+0xe0>
a0011064: e1a01004 mov r1, r4
a0011068: eb0007df bl a0012fec <_Objects_Free> <== NOT EXECUTED
_Objects_MP_Close(
&_Message_queue_Information, the_message_queue->Object.id);
#endif
_Message_queue_Free( the_message_queue );
_Thread_Enable_dispatch();
a001106c: eb000b2d bl a0013d28 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_UNSATISFIED;
a0011070: e3a0000d mov r0, #13 <== NOT EXECUTED
a0011074: ea000008 b a001109c <rtems_message_queue_create+0xd8> <== NOT EXECUTED
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a0011078: e59f2024 ldr r2, [pc, #36] ; a00110a4 <rtems_message_queue_create+0xe0>
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
a001107c: e5943008 ldr r3, [r4, #8]
a0011080: e1d410b8 ldrh r1, [r4, #8]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a0011084: e592201c ldr r2, [r2, #28]
a0011088: e7824101 str r4, [r2, r1, lsl #2]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
a001108c: e584700c str r7, [r4, #12]
&_Message_queue_Information,
&the_message_queue->Object,
(Objects_Name) name
);
*id = the_message_queue->Object.id;
a0011090: e5883000 str r3, [r8]
name,
0
);
#endif
_Thread_Enable_dispatch();
a0011094: eb000b23 bl a0013d28 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a0011098: e3a00000 mov r0, #0
}
a001109c: e8bd85f8 pop {r3, r4, r5, r6, r7, r8, sl, pc}
a0015e44 <rtems_message_queue_get_number_pending>:
rtems_status_code rtems_message_queue_get_number_pending(
rtems_id id,
uint32_t *count
)
{
a0015e44: e92d4031 push {r0, r4, r5, lr} <== NOT EXECUTED
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
a0015e48: e2514000 subs r4, r1, #0 <== NOT EXECUTED
rtems_status_code rtems_message_queue_get_number_pending(
rtems_id id,
uint32_t *count
)
{
a0015e4c: e1a03000 mov r3, r0 <== NOT EXECUTED
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
return RTEMS_INVALID_ADDRESS;
a0015e50: 03a00009 moveq r0, #9 <== NOT EXECUTED
)
{
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
a0015e54: 0a00000b beq a0015e88 <rtems_message_queue_get_number_pending+0x44><== NOT EXECUTED
a0015e58: e59f002c ldr r0, [pc, #44] ; a0015e8c <rtems_message_queue_get_number_pending+0x48><== NOT EXECUTED
a0015e5c: e1a01003 mov r1, r3 <== NOT EXECUTED
a0015e60: e1a0200d mov r2, sp <== NOT EXECUTED
a0015e64: eb00136a bl a001ac14 <_Objects_Get> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
a0015e68: e59d5000 ldr r5, [sp] <== NOT EXECUTED
a0015e6c: e3550000 cmp r5, #0 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a0015e70: 13a00004 movne r0, #4 <== NOT EXECUTED
if ( !count )
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
a0015e74: 1a000003 bne a0015e88 <rtems_message_queue_get_number_pending+0x44><== NOT EXECUTED
case OBJECTS_LOCAL:
*count = the_message_queue->message_queue.number_of_pending_messages;
a0015e78: e590305c ldr r3, [r0, #92] ; 0x5c <== NOT EXECUTED
a0015e7c: e5843000 str r3, [r4] <== NOT EXECUTED
_Thread_Enable_dispatch();
a0015e80: eb001634 bl a001b758 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a0015e84: e1a00005 mov r0, r5 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a0015e88: e8bd8038 pop {r3, r4, r5, pc} <== NOT EXECUTED
a00110dc <rtems_message_queue_receive>:
void *buffer,
size_t *size,
rtems_option option_set,
rtems_interval timeout
)
{
a00110dc: e92d4077 push {r0, r1, r2, r4, r5, r6, lr}
register Message_queue_Control *the_message_queue;
Objects_Locations location;
bool wait;
if ( !buffer )
a00110e0: e2515000 subs r5, r1, #0
void *buffer,
size_t *size,
rtems_option option_set,
rtems_interval timeout
)
{
a00110e4: e1a0c000 mov ip, r0
a00110e8: e1a04002 mov r4, r2
a00110ec: e1a06003 mov r6, r3
register Message_queue_Control *the_message_queue;
Objects_Locations location;
bool wait;
if ( !buffer )
a00110f0: 0a00001a beq a0011160 <rtems_message_queue_receive+0x84>
return RTEMS_INVALID_ADDRESS;
if ( !size )
a00110f4: e3520000 cmp r2, #0
a00110f8: 0a000018 beq a0011160 <rtems_message_queue_receive+0x84>
Objects_Id id,
Objects_Locations *location
)
{
return (Message_queue_Control *)
_Objects_Get( &_Message_queue_Information, id, location );
a00110fc: e28d2008 add r2, sp, #8
a0011100: e59f0060 ldr r0, [pc, #96] ; a0011168 <rtems_message_queue_receive+0x8c>
a0011104: e1a0100c mov r1, ip
a0011108: eb00080f bl a001314c <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
a001110c: e59d2008 ldr r2, [sp, #8]
a0011110: e1a03000 mov r3, r0
a0011114: e3520000 cmp r2, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a0011118: 13a00004 movne r0, #4
if ( !size )
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
a001111c: 1a000010 bne a0011164 <rtems_message_queue_receive+0x88>
if ( _Options_Is_no_wait( option_set ) )
wait = false;
else
wait = true;
_CORE_message_queue_Seize(
a0011120: e59d201c ldr r2, [sp, #28]
*/
RTEMS_INLINE_ROUTINE bool _Options_Is_no_wait (
rtems_option option_set
)
{
return (option_set & RTEMS_NO_WAIT) ? true : false;
a0011124: e2066001 and r6, r6, #1
a0011128: e2266001 eor r6, r6, #1
a001112c: e58d2004 str r2, [sp, #4]
a0011130: e58d6000 str r6, [sp]
a0011134: e2830014 add r0, r3, #20
a0011138: e5931008 ldr r1, [r3, #8]
a001113c: e1a02005 mov r2, r5
a0011140: e1a03004 mov r3, r4
a0011144: eb00043f bl a0012248 <_CORE_message_queue_Seize>
buffer,
size,
wait,
timeout
);
_Thread_Enable_dispatch();
a0011148: eb000af6 bl a0013d28 <_Thread_Enable_dispatch>
return _Message_queue_Translate_core_message_queue_return_code(
_Thread_Executing->Wait.return_code
a001114c: e59f3018 ldr r3, [pc, #24] ; a001116c <rtems_message_queue_receive+0x90>
a0011150: e5933004 ldr r3, [r3, #4]
size,
wait,
timeout
);
_Thread_Enable_dispatch();
return _Message_queue_Translate_core_message_queue_return_code(
a0011154: e5930034 ldr r0, [r3, #52] ; 0x34
a0011158: eb000023 bl a00111ec <_Message_queue_Translate_core_message_queue_return_code>
a001115c: ea000000 b a0011164 <rtems_message_queue_receive+0x88>
if ( !buffer )
return RTEMS_INVALID_ADDRESS;
if ( !size )
return RTEMS_INVALID_ADDRESS;
a0011160: e3a00009 mov r0, #9 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a0011164: e8bd807e pop {r1, r2, r3, r4, r5, r6, pc}
a000b044 <rtems_object_api_maximum_class>:
int rtems_object_api_maximum_class(
int api
)
{
return _Objects_API_maximum_class(api);
a000b044: ea0005f2 b a000c814 <_Objects_API_maximum_class> <== NOT EXECUTED
a000b048 <rtems_object_api_minimum_class>:
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
a000b048: e2400001 sub r0, r0, #1 <== NOT EXECUTED
uint32_t api
)
{
if ( _Objects_Is_api_valid( api ) )
return 1;
return -1;
a000b04c: e3500003 cmp r0, #3 <== NOT EXECUTED
}
a000b050: 33a00001 movcc r0, #1 <== NOT EXECUTED
a000b054: 23e00000 mvncs r0, #0 <== NOT EXECUTED
a000b058: e12fff1e bx lr <== NOT EXECUTED
a000b05c <rtems_object_get_api_class_name>:
)
{
const rtems_assoc_t *api_assoc;
const rtems_assoc_t *class_assoc;
if ( the_api == OBJECTS_INTERNAL_API )
a000b05c: e3500001 cmp r0, #1 <== NOT EXECUTED
const char *rtems_object_get_api_class_name(
int the_api,
int the_class
)
{
a000b060: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
const rtems_assoc_t *api_assoc;
const rtems_assoc_t *class_assoc;
if ( the_api == OBJECTS_INTERNAL_API )
a000b064: 0a000003 beq a000b078 <rtems_object_get_api_class_name+0x1c><== NOT EXECUTED
api_assoc = rtems_object_api_internal_assoc;
else if ( the_api == OBJECTS_CLASSIC_API )
a000b068: e3500002 cmp r0, #2 <== NOT EXECUTED
api_assoc = rtems_object_api_classic_assoc;
a000b06c: 059f002c ldreq r0, [pc, #44] ; a000b0a0 <rtems_object_get_api_class_name+0x44><== NOT EXECUTED
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;
else if ( the_api == OBJECTS_CLASSIC_API )
a000b070: 1a000006 bne a000b090 <rtems_object_get_api_class_name+0x34><== NOT EXECUTED
a000b074: ea000000 b a000b07c <rtems_object_get_api_class_name+0x20> <== NOT EXECUTED
{
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;
a000b078: e59f0024 ldr r0, [pc, #36] ; a000b0a4 <rtems_object_get_api_class_name+0x48><== NOT EXECUTED
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 );
a000b07c: eb0012a7 bl a000fb20 <rtems_assoc_ptr_by_local> <== NOT EXECUTED
if ( class_assoc )
a000b080: e3500000 cmp r0, #0 <== NOT EXECUTED
return class_assoc->name;
a000b084: 15900000 ldrne r0, [r0] <== NOT EXECUTED
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 )
a000b088: 149df004 popne {pc} ; (ldrne pc, [sp], #4) <== NOT EXECUTED
a000b08c: ea000001 b a000b098 <rtems_object_get_api_class_name+0x3c> <== NOT EXECUTED
#ifdef RTEMS_POSIX_API
else if ( the_api == OBJECTS_POSIX_API )
api_assoc = rtems_object_api_posix_assoc;
#endif
else
return "BAD API";
a000b090: e59f0010 ldr r0, [pc, #16] ; a000b0a8 <rtems_object_get_api_class_name+0x4c><== NOT EXECUTED
a000b094: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class );
if ( class_assoc )
return class_assoc->name;
return "BAD CLASS";
a000b098: e59f000c ldr r0, [pc, #12] ; a000b0ac <rtems_object_get_api_class_name+0x50><== NOT EXECUTED
}
a000b09c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a000b0b0 <rtems_object_get_api_name>:
};
const char *rtems_object_get_api_name(
int api
)
{
a000b0b0: e1a01000 mov r1, r0 <== NOT EXECUTED
a000b0b4: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
const rtems_assoc_t *api_assoc;
api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api );
a000b0b8: e59f0010 ldr r0, [pc, #16] ; a000b0d0 <rtems_object_get_api_name+0x20><== NOT EXECUTED
a000b0bc: eb001297 bl a000fb20 <rtems_assoc_ptr_by_local> <== NOT EXECUTED
if ( api_assoc )
a000b0c0: e3500000 cmp r0, #0 <== NOT EXECUTED
return api_assoc->name;
a000b0c4: 15900000 ldrne r0, [r0] <== NOT EXECUTED
return "BAD CLASS";
a000b0c8: 059f0004 ldreq r0, [pc, #4] ; a000b0d4 <rtems_object_get_api_name+0x24><== NOT EXECUTED
}
a000b0cc: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a000b108 <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
)
{
a000b108: e92d4010 push {r4, lr} <== NOT EXECUTED
int i;
/*
* Validate parameters and look up information structure.
*/
if ( !info )
a000b10c: e2524000 subs r4, r2, #0 <== NOT EXECUTED
a000b110: 0a000019 beq a000b17c <rtems_object_get_class_information+0x74><== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
a000b114: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED
a000b118: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED
a000b11c: eb00068d bl a000cb58 <_Objects_Get_information> <== NOT EXECUTED
if ( !obj_info )
a000b120: e3500000 cmp r0, #0 <== NOT EXECUTED
a000b124: 0a000016 beq a000b184 <rtems_object_get_class_information+0x7c><== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
a000b128: e5903008 ldr r3, [r0, #8] <== NOT EXECUTED
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
a000b12c: e1d011b0 ldrh r1, [r0, #16] <== NOT EXECUTED
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
a000b130: e3a02000 mov r2, #0 <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
a000b134: e5843000 str r3, [r4] <== NOT EXECUTED
info->maximum_id = obj_info->maximum_id;
a000b138: e590300c ldr r3, [r0, #12] <== NOT EXECUTED
a000b13c: e5843004 str r3, [r4, #4] <== NOT EXECUTED
info->auto_extend = obj_info->auto_extend;
a000b140: e5d03012 ldrb r3, [r0, #18] <== NOT EXECUTED
info->maximum = obj_info->maximum;
a000b144: e5841008 str r1, [r4, #8] <== NOT EXECUTED
/*
* 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;
a000b148: e5c4300c strb r3, [r4, #12] <== NOT EXECUTED
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
a000b14c: e3a03001 mov r3, #1 <== NOT EXECUTED
a000b150: ea000004 b a000b168 <rtems_object_get_class_information+0x60><== NOT EXECUTED
if ( !obj_info->local_table[i] )
a000b154: e590c01c ldr ip, [r0, #28] <== NOT EXECUTED
a000b158: e79cc103 ldr ip, [ip, r3, lsl #2] <== NOT EXECUTED
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++ )
a000b15c: e2833001 add r3, r3, #1 <== NOT EXECUTED
if ( !obj_info->local_table[i] )
a000b160: e35c0000 cmp ip, #0 <== NOT EXECUTED
unallocated++;
a000b164: 02822001 addeq r2, r2, #1 <== NOT EXECUTED
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++ )
a000b168: e1530001 cmp r3, r1 <== NOT EXECUTED
a000b16c: 9afffff8 bls a000b154 <rtems_object_get_class_information+0x4c><== NOT EXECUTED
if ( !obj_info->local_table[i] )
unallocated++;
info->unallocated = unallocated;
a000b170: e5842010 str r2, [r4, #16] <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a000b174: e3a00000 mov r0, #0 <== NOT EXECUTED
a000b178: e8bd8010 pop {r4, pc} <== NOT EXECUTED
/*
* Validate parameters and look up information structure.
*/
if ( !info )
return RTEMS_INVALID_ADDRESS;
a000b17c: e3a00009 mov r0, #9 <== NOT EXECUTED
a000b180: e8bd8010 pop {r4, pc} <== NOT EXECUTED
obj_info = _Objects_Get_information( the_api, the_class );
if ( !obj_info )
return RTEMS_INVALID_NUMBER;
a000b184: e3a0000a mov r0, #10 <== NOT EXECUTED
unallocated++;
info->unallocated = unallocated;
return RTEMS_SUCCESSFUL;
}
a000b188: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a000a80c <rtems_object_get_name>:
Objects_Id id,
size_t length,
char *name
)
{
return _Objects_Get_name_as_string( id, length, name );
a000a80c: ea000741 b a000c518 <_Objects_Get_name_as_string> <== NOT EXECUTED
a000b190 <rtems_object_id_api_maximum>:
#undef rtems_object_id_api_maximum
int rtems_object_id_api_maximum(void)
{
return OBJECTS_APIS_LAST;
}
a000b190: e3a00003 mov r0, #3 <== NOT EXECUTED
a000b194: e12fff1e bx lr <== NOT EXECUTED
a000b198 <rtems_object_id_api_minimum>:
#undef rtems_object_id_api_minimum
int rtems_object_id_api_minimum(void)
{
return OBJECTS_INTERNAL_API;
}
a000b198: e3a00001 mov r0, #1 <== NOT EXECUTED
a000b19c: e12fff1e bx lr <== NOT EXECUTED
a000b1a0 <rtems_object_id_get_api>:
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
a000b1a0: e1a00c20 lsr r0, r0, #24 <== NOT EXECUTED
int rtems_object_id_get_api(
rtems_id id
)
{
return _Objects_Get_API( id );
}
a000b1a4: e2000007 and r0, r0, #7 <== NOT EXECUTED
a000b1a8: e12fff1e bx lr <== NOT EXECUTED
a000b1ac <rtems_object_id_get_class>:
int rtems_object_id_get_class(
rtems_id id
)
{
return _Objects_Get_class( id );
}
a000b1ac: e1a00da0 lsr r0, r0, #27 <== NOT EXECUTED
a000b1b0: e12fff1e bx lr <== NOT EXECUTED
a000b1b4 <rtems_object_id_get_index>:
#undef rtems_object_id_get_index
int rtems_object_id_get_index(
rtems_id id
)
{
return _Objects_Get_index( id );
a000b1b4: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED
}
a000b1b8: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED
a000b1bc: e12fff1e bx lr <== NOT EXECUTED
a000b1c0 <rtems_object_id_get_node>:
* be a single processor system.
*/
#if defined(RTEMS_USE_16_BIT_OBJECT)
return 1;
#else
return (id >> OBJECTS_NODE_START_BIT) & OBJECTS_NODE_VALID_BITS;
a000b1c0: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED
int rtems_object_id_get_node(
rtems_id id
)
{
return _Objects_Get_node( id );
}
a000b1c4: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED
a000b1c8: e12fff1e bx lr <== NOT EXECUTED
a000b1cc <rtems_object_set_name>:
*/
rtems_status_code rtems_object_set_name(
rtems_id id,
const char *name
)
{
a000b1cc: e92d4071 push {r0, r4, r5, r6, lr} <== NOT EXECUTED
Objects_Information *information;
Objects_Locations location;
Objects_Control *the_object;
Objects_Id tmpId;
if ( !name )
a000b1d0: e2515000 subs r5, r1, #0 <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
a000b1d4: 03a00009 moveq r0, #9 <== NOT EXECUTED
Objects_Information *information;
Objects_Locations location;
Objects_Control *the_object;
Objects_Id tmpId;
if ( !name )
a000b1d8: 0a000016 beq a000b238 <rtems_object_set_name+0x6c> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
a000b1dc: e3500000 cmp r0, #0 <== NOT EXECUTED
a000b1e0: 059f3054 ldreq r3, [pc, #84] ; a000b23c <rtems_object_set_name+0x70><== NOT EXECUTED
a000b1e4: 11a04000 movne r4, r0 <== NOT EXECUTED
a000b1e8: 05933004 ldreq r3, [r3, #4] <== NOT EXECUTED
a000b1ec: 05934008 ldreq r4, [r3, #8] <== NOT EXECUTED
information = _Objects_Get_information_id( tmpId );
a000b1f0: e1a00004 mov r0, r4 <== NOT EXECUTED
a000b1f4: eb000652 bl a000cb44 <_Objects_Get_information_id> <== NOT EXECUTED
if ( !information )
a000b1f8: e2506000 subs r6, r0, #0 <== NOT EXECUTED
a000b1fc: 0a00000c beq a000b234 <rtems_object_set_name+0x68> <== NOT EXECUTED
return RTEMS_INVALID_ID;
the_object = _Objects_Get( information, tmpId, &location );
a000b200: e1a01004 mov r1, r4 <== NOT EXECUTED
a000b204: e1a0200d mov r2, sp <== NOT EXECUTED
a000b208: eb0006bf bl a000cd0c <_Objects_Get> <== NOT EXECUTED
switch ( location ) {
a000b20c: e59d4000 ldr r4, [sp] <== NOT EXECUTED
information = _Objects_Get_information_id( tmpId );
if ( !information )
return RTEMS_INVALID_ID;
the_object = _Objects_Get( information, tmpId, &location );
a000b210: e1a01000 mov r1, r0 <== NOT EXECUTED
switch ( location ) {
a000b214: e3540000 cmp r4, #0 <== NOT EXECUTED
a000b218: 1a000005 bne a000b234 <rtems_object_set_name+0x68> <== NOT EXECUTED
case OBJECTS_LOCAL:
_Objects_Set_name( information, the_object, name );
a000b21c: e1a02005 mov r2, r5 <== NOT EXECUTED
a000b220: e1a00006 mov r0, r6 <== NOT EXECUTED
a000b224: eb00072d bl a000cee0 <_Objects_Set_name> <== NOT EXECUTED
_Thread_Enable_dispatch();
a000b228: eb00099f bl a000d8ac <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a000b22c: e1a00004 mov r0, r4 <== NOT EXECUTED
a000b230: ea000000 b a000b238 <rtems_object_set_name+0x6c> <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a000b234: e3a00004 mov r0, #4 <== NOT EXECUTED
}
a000b238: e8bd8078 pop {r3, r4, r5, r6, pc} <== NOT EXECUTED
a0016060 <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
a0016060: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
a0016064: e2508000 subs r8, r0, #0
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
a0016068: e1a05001 mov r5, r1
a001606c: e1a09002 mov r9, r2
a0016070: e1a0a003 mov sl, r3
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
a0016074: 0a000032 beq a0016144 <rtems_partition_create+0xe4>
return RTEMS_INVALID_NAME;
if ( !starting_address )
a0016078: e3510000 cmp r1, #0
a001607c: 0a000032 beq a001614c <rtems_partition_create+0xec>
return RTEMS_INVALID_ADDRESS;
if ( !id )
a0016080: e59d2028 ldr r2, [sp, #40] ; 0x28
a0016084: e3520000 cmp r2, #0
a0016088: 0a00002f beq a001614c <rtems_partition_create+0xec>
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
a001608c: e3590000 cmp r9, #0
a0016090: 13530000 cmpne r3, #0
a0016094: 0a00002e beq a0016154 <rtems_partition_create+0xf4>
a0016098: e1590003 cmp r9, r3
a001609c: 3a00002c bcc a0016154 <rtems_partition_create+0xf4>
a00160a0: e3130007 tst r3, #7
a00160a4: 1a00002a bne a0016154 <rtems_partition_create+0xf4>
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
a00160a8: e2116007 ands r6, r1, #7
a00160ac: 1a00002a bne a001615c <rtems_partition_create+0xfc>
a00160b0: e59f30ac ldr r3, [pc, #172] ; a0016164 <rtems_partition_create+0x104>
a00160b4: e5932000 ldr r2, [r3]
a00160b8: e2822001 add r2, r2, #1
a00160bc: e5832000 str r2, [r3]
* 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 );
a00160c0: e59f70a0 ldr r7, [pc, #160] ; a0016168 <rtems_partition_create+0x108>
a00160c4: e1a00007 mov r0, r7
a00160c8: eb0011a0 bl a001a750 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
a00160cc: e2504000 subs r4, r0, #0
a00160d0: 1a000002 bne a00160e0 <rtems_partition_create+0x80>
_Thread_Enable_dispatch();
a00160d4: eb00159f bl a001b758 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_TOO_MANY;
a00160d8: e3a00005 mov r0, #5 <== NOT EXECUTED
a00160dc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
#endif
the_partition->starting_address = starting_address;
the_partition->length = length;
the_partition->buffer_size = buffer_size;
the_partition->attribute_set = attribute_set;
a00160e0: e59d3024 ldr r3, [sp, #36] ; 0x24
the_partition->number_of_used_blocks = 0;
_Chain_Initialize( &the_partition->Memory, starting_address,
a00160e4: e1a0100a mov r1, sl
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
a00160e8: e5845010 str r5, [r4, #16]
the_partition->length = length;
the_partition->buffer_size = buffer_size;
the_partition->attribute_set = attribute_set;
a00160ec: e584301c str r3, [r4, #28]
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
the_partition->length = length;
a00160f0: e5849014 str r9, [r4, #20]
the_partition->buffer_size = buffer_size;
a00160f4: e584a018 str sl, [r4, #24]
the_partition->attribute_set = attribute_set;
the_partition->number_of_used_blocks = 0;
a00160f8: e5846020 str r6, [r4, #32]
_Chain_Initialize( &the_partition->Memory, starting_address,
a00160fc: e1a00009 mov r0, r9
a0016100: eb005dff bl a002d904 <__aeabi_uidiv>
a0016104: e284b024 add fp, r4, #36 ; 0x24
a0016108: e1a02000 mov r2, r0
a001610c: e1a01005 mov r1, r5
a0016110: e1a0000b mov r0, fp
a0016114: e1a0300a mov r3, sl
a0016118: eb000bd8 bl a0019080 <_Chain_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a001611c: e597201c ldr r2, [r7, #28]
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
a0016120: e1d410b8 ldrh r1, [r4, #8]
a0016124: e5943008 ldr r3, [r4, #8]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a0016128: e7824101 str r4, [r2, r1, lsl #2]
&_Partition_Information,
&the_partition->Object,
(Objects_Name) name
);
*id = the_partition->Object.id;
a001612c: e59d2028 ldr r2, [sp, #40] ; 0x28
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
a0016130: e584800c str r8, [r4, #12]
a0016134: e5823000 str r3, [r2]
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
a0016138: eb001586 bl a001b758 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a001613c: e1a00006 mov r0, r6
a0016140: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
)
{
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
a0016144: e3a00003 mov r0, #3 <== NOT EXECUTED
a0016148: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
if ( !starting_address )
return RTEMS_INVALID_ADDRESS;
if ( !id )
return RTEMS_INVALID_ADDRESS;
a001614c: e3a00009 mov r0, #9 <== NOT EXECUTED
a0016150: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
a0016154: e3a00008 mov r0, #8 <== NOT EXECUTED
a0016158: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
if ( !_Addresses_Is_aligned( starting_address ) )
return RTEMS_INVALID_ADDRESS;
a001615c: e3a00009 mov r0, #9 <== NOT EXECUTED
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
a0016160: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
a001616c <rtems_partition_delete>:
*/
rtems_status_code rtems_partition_delete(
rtems_id id
)
{
a001616c: e92d4031 push {r0, r4, r5, lr}
a0016170: e1a01000 mov r1, r0
Objects_Id id,
Objects_Locations *location
)
{
return (Partition_Control *)
_Objects_Get( &_Partition_Information, id, location );
a0016174: e1a0200d mov r2, sp
a0016178: e59f0050 ldr r0, [pc, #80] ; a00161d0 <rtems_partition_delete+0x64>
a001617c: eb0012a4 bl a001ac14 <_Objects_Get>
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
a0016180: e59d3000 ldr r3, [sp]
a0016184: e1a04000 mov r4, r0
a0016188: e3530000 cmp r3, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a001618c: 13a00004 movne r0, #4
{
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
a0016190: 1a00000d bne a00161cc <rtems_partition_delete+0x60>
case OBJECTS_LOCAL:
if ( the_partition->number_of_used_blocks == 0 ) {
a0016194: e5945020 ldr r5, [r4, #32]
a0016198: e3550000 cmp r5, #0
a001619c: 1a000008 bne a00161c4 <rtems_partition_delete+0x58>
_Objects_Close( &_Partition_Information, &the_partition->Object );
a00161a0: e59f0028 ldr r0, [pc, #40] ; a00161d0 <rtems_partition_delete+0x64>
a00161a4: e1a01004 mov r1, r4
a00161a8: eb00118a bl a001a7d8 <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _Partition_Free (
Partition_Control *the_partition
)
{
_Objects_Free( &_Partition_Information, &the_partition->Object );
a00161ac: e59f001c ldr r0, [pc, #28] ; a00161d0 <rtems_partition_delete+0x64>
a00161b0: e1a01004 mov r1, r4
a00161b4: eb00122e bl a001aa74 <_Objects_Free>
0 /* Not used */
);
}
#endif
_Thread_Enable_dispatch();
a00161b8: eb001566 bl a001b758 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a00161bc: e1a00005 mov r0, r5
a00161c0: ea000001 b a00161cc <rtems_partition_delete+0x60>
}
_Thread_Enable_dispatch();
a00161c4: eb001563 bl a001b758 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_RESOURCE_IN_USE;
a00161c8: e3a0000c mov r0, #12 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a00161cc: e8bd8038 pop {r3, r4, r5, pc}
a001627c <rtems_partition_return_buffer>:
rtems_status_code rtems_partition_return_buffer(
rtems_id id,
void *buffer
)
{
a001627c: e92d4071 push {r0, r4, r5, r6, lr}
a0016280: e1a03000 mov r3, r0
a0016284: e1a04001 mov r4, r1
Objects_Id id,
Objects_Locations *location
)
{
return (Partition_Control *)
_Objects_Get( &_Partition_Information, id, location );
a0016288: e59f0088 ldr r0, [pc, #136] ; a0016318 <rtems_partition_return_buffer+0x9c>
a001628c: e1a01003 mov r1, r3
a0016290: e1a0200d mov r2, sp
a0016294: eb00125e bl a001ac14 <_Objects_Get>
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
a0016298: e59d3000 ldr r3, [sp]
a001629c: e1a05000 mov r5, r0
a00162a0: e3530000 cmp r3, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a00162a4: 13a00004 movne r0, #4
{
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
a00162a8: 1a000016 bne a0016308 <rtems_partition_return_buffer+0x8c>
)
{
void *starting;
void *ending;
starting = the_partition->starting_address;
a00162ac: e5950010 ldr r0, [r5, #16]
a00162b0: e5953014 ldr r3, [r5, #20]
a00162b4: e0803003 add r3, r0, r3
const void *address,
const void *base,
const void *limit
)
{
return (address >= base && address <= limit);
a00162b8: e1540003 cmp r4, r3
a00162bc: 83a03000 movhi r3, #0
a00162c0: 93a03001 movls r3, #1
a00162c4: e1540000 cmp r4, r0
a00162c8: 33a03000 movcc r3, #0
ending = _Addresses_Add_offset( starting, the_partition->length );
return (
_Addresses_Is_in_range( the_buffer, starting, ending ) &&
a00162cc: e3530000 cmp r3, #0
a00162d0: 0a00000d beq a001630c <rtems_partition_return_buffer+0x90>
offset = (uint32_t) _Addresses_Subtract(
the_buffer,
the_partition->starting_address
);
return ((offset % the_partition->buffer_size) == 0);
a00162d4: e0600004 rsb r0, r0, r4
a00162d8: e5951018 ldr r1, [r5, #24]
a00162dc: eb005e20 bl a002db64 <__umodsi3>
starting = the_partition->starting_address;
ending = _Addresses_Add_offset( starting, the_partition->length );
return (
_Addresses_Is_in_range( the_buffer, starting, ending ) &&
a00162e0: e2506000 subs r6, r0, #0
a00162e4: 1a000008 bne a001630c <rtems_partition_return_buffer+0x90>
RTEMS_INLINE_ROUTINE void _Partition_Free_buffer (
Partition_Control *the_partition,
Chain_Node *the_buffer
)
{
_Chain_Append( &the_partition->Memory, the_buffer );
a00162e8: e2850024 add r0, r5, #36 ; 0x24
a00162ec: e1a01004 mov r1, r4
a00162f0: eb000b42 bl a0019000 <_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;
a00162f4: e5953020 ldr r3, [r5, #32]
a00162f8: e2433001 sub r3, r3, #1
a00162fc: e5853020 str r3, [r5, #32]
_Thread_Enable_dispatch();
a0016300: eb001514 bl a001b758 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a0016304: e1a00006 mov r0, r6
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a0016308: e8bd8078 pop {r3, r4, r5, r6, pc}
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
a001630c: eb001511 bl a001b758 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
a0016310: e3a00009 mov r0, #9 <== NOT EXECUTED
a0016314: eafffffb b a0016308 <rtems_partition_return_buffer+0x8c> <== NOT EXECUTED
a00156c0 <rtems_port_create>:
void *internal_start,
void *external_start,
uint32_t length,
rtems_id *id
)
{
a00156c0: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
register Dual_ported_memory_Control *the_port;
if ( !rtems_is_name_valid( name ) )
a00156c4: e250a000 subs sl, r0, #0
void *internal_start,
void *external_start,
uint32_t length,
rtems_id *id
)
{
a00156c8: e1a04001 mov r4, r1
a00156cc: e1a05002 mov r5, r2
a00156d0: e1a09003 mov r9, r3
a00156d4: e59d6020 ldr r6, [sp, #32]
register Dual_ported_memory_Control *the_port;
if ( !rtems_is_name_valid( name ) )
a00156d8: 0a00001d beq a0015754 <rtems_port_create+0x94>
return RTEMS_INVALID_NAME;
if ( !id )
a00156dc: e3560000 cmp r6, #0
a00156e0: 0a00001d beq a001575c <rtems_port_create+0x9c>
* id - port id
* RTEMS_SUCCESSFUL - if successful
* error code - if unsuccessful
*/
rtems_status_code rtems_port_create(
a00156e4: e1828001 orr r8, r2, r1
return RTEMS_INVALID_NAME;
if ( !id )
return RTEMS_INVALID_ADDRESS;
if ( !_Addresses_Is_aligned( internal_start ) ||
a00156e8: e2188007 ands r8, r8, #7
a00156ec: 1a00001c bne a0015764 <rtems_port_create+0xa4>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a00156f0: e59f3074 ldr r3, [pc, #116] ; a001576c <rtems_port_create+0xac>
a00156f4: e5932000 ldr r2, [r3]
a00156f8: e2822001 add r2, r2, #1
a00156fc: e5832000 str r2, [r3]
*/
RTEMS_INLINE_ROUTINE Dual_ported_memory_Control
*_Dual_ported_memory_Allocate ( void )
{
return (Dual_ported_memory_Control *)
_Objects_Allocate( &_Dual_ported_memory_Information );
a0015700: e59f7068 ldr r7, [pc, #104] ; a0015770 <rtems_port_create+0xb0>
a0015704: e1a00007 mov r0, r7
a0015708: eb001410 bl a001a750 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* to prevent deletion */
the_port = _Dual_ported_memory_Allocate();
if ( !the_port ) {
a001570c: e3500000 cmp r0, #0
a0015710: 1a000002 bne a0015720 <rtems_port_create+0x60>
_Thread_Enable_dispatch();
a0015714: eb00180f bl a001b758 <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
a0015718: e3a00005 mov r0, #5
a001571c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
a0015720: e5903008 ldr r3, [r0, #8]
a0015724: e1d010b8 ldrh r1, [r0, #8]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a0015728: e597201c ldr r2, [r7, #28]
}
the_port->internal_base = internal_start;
the_port->external_base = external_start;
the_port->length = length - 1;
a001572c: e2499001 sub r9, r9, #1
if ( !the_port ) {
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_port->internal_base = internal_start;
a0015730: e5804010 str r4, [r0, #16]
the_port->external_base = external_start;
a0015734: e5805014 str r5, [r0, #20]
the_port->length = length - 1;
a0015738: e5809018 str r9, [r0, #24]
a001573c: e7820101 str r0, [r2, r1, lsl #2]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
a0015740: e580a00c str sl, [r0, #12]
&_Dual_ported_memory_Information,
&the_port->Object,
(Objects_Name) name
);
*id = the_port->Object.id;
a0015744: e5863000 str r3, [r6]
_Thread_Enable_dispatch();
a0015748: eb001802 bl a001b758 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a001574c: e1a00008 mov r0, r8
a0015750: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
)
{
register Dual_ported_memory_Control *the_port;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
a0015754: e3a00003 mov r0, #3
a0015758: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
if ( !id )
return RTEMS_INVALID_ADDRESS;
a001575c: e3a00009 mov r0, #9
a0015760: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
if ( !_Addresses_Is_aligned( internal_start ) ||
!_Addresses_Is_aligned( external_start ) )
return RTEMS_INVALID_ADDRESS;
a0015764: e3a00009 mov r0, #9 <== NOT EXECUTED
);
*id = the_port->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
a0015768: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
a001631c <rtems_rate_monotonic_cancel>:
*/
rtems_status_code rtems_rate_monotonic_cancel(
rtems_id id
)
{
a001631c: e92d4031 push {r0, r4, r5, lr}
a0016320: e1a01000 mov r1, r0
Objects_Id id,
Objects_Locations *location
)
{
return (Rate_monotonic_Control *)
_Objects_Get( &_Rate_monotonic_Information, id, location );
a0016324: e1a0200d mov r2, sp
a0016328: e59f004c ldr r0, [pc, #76] ; a001637c <rtems_rate_monotonic_cancel+0x60>
a001632c: eb001238 bl a001ac14 <_Objects_Get>
Rate_monotonic_Control *the_period;
Objects_Locations location;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
a0016330: e59d4000 ldr r4, [sp]
a0016334: e1a05000 mov r5, r0
a0016338: e3540000 cmp r4, #0
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a001633c: 13a00004 movne r0, #4
{
Rate_monotonic_Control *the_period;
Objects_Locations location;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
a0016340: 1a00000c bne a0016378 <rtems_rate_monotonic_cancel+0x5c>
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
a0016344: e59f3034 ldr r3, [pc, #52] ; a0016380 <rtems_rate_monotonic_cancel+0x64>
a0016348: e5952040 ldr r2, [r5, #64] ; 0x40
a001634c: e5933004 ldr r3, [r3, #4]
a0016350: e1520003 cmp r2, r3
a0016354: 0a000002 beq a0016364 <rtems_rate_monotonic_cancel+0x48>
_Thread_Enable_dispatch();
a0016358: eb0014fe bl a001b758 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_NOT_OWNER_OF_RESOURCE;
a001635c: e3a00017 mov r0, #23 <== NOT EXECUTED
a0016360: ea000004 b a0016378 <rtems_rate_monotonic_cancel+0x5c> <== NOT EXECUTED
}
(void) _Watchdog_Remove( &the_period->Timer );
a0016364: e2850010 add r0, r5, #16
a0016368: eb001987 bl a001c98c <_Watchdog_Remove>
the_period->state = RATE_MONOTONIC_INACTIVE;
a001636c: e5854038 str r4, [r5, #56] ; 0x38
_Thread_Enable_dispatch();
a0016370: eb0014f8 bl a001b758 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a0016374: e1a00004 mov r0, r4
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a0016378: e8bd8038 pop {r3, r4, r5, pc}
a000a180 <rtems_rate_monotonic_create>:
rtems_status_code rtems_rate_monotonic_create(
rtems_name name,
rtems_id *id
)
{
a000a180: e92d41f0 push {r4, r5, r6, r7, r8, lr}
Rate_monotonic_Control *the_period;
if ( !rtems_is_name_valid( name ) )
a000a184: e2508000 subs r8, r0, #0
rtems_status_code rtems_rate_monotonic_create(
rtems_name name,
rtems_id *id
)
{
a000a188: e1a06001 mov r6, r1
Rate_monotonic_Control *the_period;
if ( !rtems_is_name_valid( name ) )
a000a18c: 0a000028 beq a000a234 <rtems_rate_monotonic_create+0xb4>
return RTEMS_INVALID_NAME;
if ( !id )
a000a190: e3510000 cmp r1, #0
a000a194: 0a000028 beq a000a23c <rtems_rate_monotonic_create+0xbc>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a000a198: e59f30a4 ldr r3, [pc, #164] ; a000a244 <rtems_rate_monotonic_create+0xc4>
a000a19c: e5932000 ldr r2, [r3]
a000a1a0: e2822001 add r2, r2, #1
a000a1a4: e5832000 str r2, [r3]
* the inactive chain of free period control blocks.
*/
RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Allocate( void )
{
return (Rate_monotonic_Control *)
_Objects_Allocate( &_Rate_monotonic_Information );
a000a1a8: e59f7098 ldr r7, [pc, #152] ; a000a248 <rtems_rate_monotonic_create+0xc8>
a000a1ac: e1a00007 mov r0, r7
a000a1b0: eb000797 bl a000c014 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* to prevent deletion */
the_period = _Rate_monotonic_Allocate();
if ( !the_period ) {
a000a1b4: e2504000 subs r4, r0, #0
a000a1b8: 1a000002 bne a000a1c8 <rtems_rate_monotonic_create+0x48>
_Thread_Enable_dispatch();
a000a1bc: eb000bbe bl a000d0bc <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_TOO_MANY;
a000a1c0: e3a00005 mov r0, #5 <== NOT EXECUTED
a000a1c4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
}
the_period->owner = _Thread_Executing;
a000a1c8: e59f307c ldr r3, [pc, #124] ; a000a24c <rtems_rate_monotonic_create+0xcc>
the_period->state = RATE_MONOTONIC_INACTIVE;
a000a1cc: e3a05000 mov r5, #0
_Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL );
_Rate_monotonic_Reset_statistics( the_period );
a000a1d0: e1a01005 mov r1, r5
if ( !the_period ) {
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_period->owner = _Thread_Executing;
a000a1d4: e5933004 ldr r3, [r3, #4]
the_period->state = RATE_MONOTONIC_INACTIVE;
_Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL );
_Rate_monotonic_Reset_statistics( the_period );
a000a1d8: e3a02038 mov r2, #56 ; 0x38
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_period->owner = _Thread_Executing;
the_period->state = RATE_MONOTONIC_INACTIVE;
a000a1dc: e5845038 str r5, [r4, #56] ; 0x38
if ( !the_period ) {
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_period->owner = _Thread_Executing;
a000a1e0: e5843040 str r3, [r4, #64] ; 0x40
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a000a1e4: e5845018 str r5, [r4, #24]
the_watchdog->routine = routine;
a000a1e8: e584502c str r5, [r4, #44] ; 0x2c
the_watchdog->id = id;
a000a1ec: e5845030 str r5, [r4, #48] ; 0x30
the_watchdog->user_data = user_data;
a000a1f0: e5845034 str r5, [r4, #52] ; 0x34
the_period->state = RATE_MONOTONIC_INACTIVE;
_Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL );
_Rate_monotonic_Reset_statistics( the_period );
a000a1f4: e2840054 add r0, r4, #84 ; 0x54
a000a1f8: eb0021b1 bl a00128c4 <memset>
a000a1fc: e3e03102 mvn r3, #-2147483648 ; 0x80000000
a000a200: e584305c str r3, [r4, #92] ; 0x5c
a000a204: e5843060 str r3, [r4, #96] ; 0x60
a000a208: e5843074 str r3, [r4, #116] ; 0x74
a000a20c: e5843078 str r3, [r4, #120] ; 0x78
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000a210: e597201c ldr r2, [r7, #28]
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
a000a214: e5943008 ldr r3, [r4, #8]
a000a218: e1d410b8 ldrh r1, [r4, #8]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000a21c: e7824101 str r4, [r2, r1, lsl #2]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
a000a220: e584800c str r8, [r4, #12]
&_Rate_monotonic_Information,
&the_period->Object,
(Objects_Name) name
);
*id = the_period->Object.id;
a000a224: e5863000 str r3, [r6]
_Thread_Enable_dispatch();
a000a228: eb000ba3 bl a000d0bc <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000a22c: e1a00005 mov r0, r5
a000a230: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
)
{
Rate_monotonic_Control *the_period;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
a000a234: e3a00003 mov r0, #3 <== NOT EXECUTED
a000a238: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
if ( !id )
return RTEMS_INVALID_ADDRESS;
a000a23c: e3a00009 mov r0, #9 <== NOT EXECUTED
);
*id = the_period->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
a000a240: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
a000fc3c <rtems_rate_monotonic_get_statistics>:
rtems_status_code rtems_rate_monotonic_get_statistics(
rtems_id id,
rtems_rate_monotonic_period_statistics *statistics
)
{
a000fc3c: e92d4031 push {r0, r4, r5, lr} <== NOT EXECUTED
Objects_Locations location;
Rate_monotonic_Control *the_period;
rtems_rate_monotonic_period_statistics *dst;
Rate_monotonic_Statistics *src;
if ( !statistics )
a000fc40: e2514000 subs r4, r1, #0 <== NOT EXECUTED
rtems_status_code rtems_rate_monotonic_get_statistics(
rtems_id id,
rtems_rate_monotonic_period_statistics *statistics
)
{
a000fc44: e1a03000 mov r3, r0 <== NOT EXECUTED
Rate_monotonic_Control *the_period;
rtems_rate_monotonic_period_statistics *dst;
Rate_monotonic_Statistics *src;
if ( !statistics )
return RTEMS_INVALID_ADDRESS;
a000fc48: 03a00009 moveq r0, #9 <== NOT EXECUTED
Objects_Locations location;
Rate_monotonic_Control *the_period;
rtems_rate_monotonic_period_statistics *dst;
Rate_monotonic_Statistics *src;
if ( !statistics )
a000fc4c: 0a000025 beq a000fce8 <rtems_rate_monotonic_get_statistics+0xac><== NOT EXECUTED
a000fc50: e59f0094 ldr r0, [pc, #148] ; a000fcec <rtems_rate_monotonic_get_statistics+0xb0><== NOT EXECUTED
a000fc54: e1a01003 mov r1, r3 <== NOT EXECUTED
a000fc58: e1a0200d mov r2, sp <== NOT EXECUTED
a000fc5c: ebfff245 bl a000c578 <_Objects_Get> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
a000fc60: e59d5000 ldr r5, [sp] <== NOT EXECUTED
a000fc64: e3550000 cmp r5, #0 <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a000fc68: 13a00004 movne r0, #4 <== NOT EXECUTED
if ( !statistics )
return RTEMS_INVALID_ADDRESS;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
a000fc6c: 1a00001d bne a000fce8 <rtems_rate_monotonic_get_statistics+0xac><== NOT EXECUTED
case OBJECTS_LOCAL:
dst = statistics;
src = &the_period->Statistics;
dst->count = src->count;
a000fc70: e5903054 ldr r3, [r0, #84] ; 0x54 <== NOT EXECUTED
a000fc74: e5843000 str r3, [r4] <== NOT EXECUTED
dst->missed_count = src->missed_count;
a000fc78: e5903058 ldr r3, [r0, #88] ; 0x58 <== NOT EXECUTED
a000fc7c: e5843004 str r3, [r4, #4] <== NOT EXECUTED
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_To_timespec( &src->min_cpu_time, &dst->min_cpu_time );
a000fc80: e280305c add r3, r0, #92 ; 0x5c <== NOT EXECUTED
a000fc84: e893000c ldm r3, {r2, r3} <== NOT EXECUTED
a000fc88: e5842008 str r2, [r4, #8] <== NOT EXECUTED
a000fc8c: e584300c str r3, [r4, #12] <== NOT EXECUTED
_Timestamp_To_timespec( &src->max_cpu_time, &dst->max_cpu_time );
a000fc90: e2803064 add r3, r0, #100 ; 0x64 <== NOT EXECUTED
a000fc94: e893000c ldm r3, {r2, r3} <== NOT EXECUTED
a000fc98: e5842010 str r2, [r4, #16] <== NOT EXECUTED
a000fc9c: e5843014 str r3, [r4, #20] <== NOT EXECUTED
_Timestamp_To_timespec( &src->total_cpu_time, &dst->total_cpu_time );
a000fca0: e280306c add r3, r0, #108 ; 0x6c <== NOT EXECUTED
a000fca4: e893000c ldm r3, {r2, r3} <== NOT EXECUTED
a000fca8: e5842018 str r2, [r4, #24] <== NOT EXECUTED
a000fcac: e584301c str r3, [r4, #28] <== NOT EXECUTED
_Timestamp_To_timespec( &src->min_wall_time, &dst->min_wall_time );
a000fcb0: e2803074 add r3, r0, #116 ; 0x74 <== NOT EXECUTED
a000fcb4: e893000c ldm r3, {r2, r3} <== NOT EXECUTED
a000fcb8: e5842020 str r2, [r4, #32] <== NOT EXECUTED
a000fcbc: e5843024 str r3, [r4, #36] ; 0x24 <== NOT EXECUTED
_Timestamp_To_timespec( &src->max_wall_time, &dst->max_wall_time );
a000fcc0: e280307c add r3, r0, #124 ; 0x7c <== NOT EXECUTED
a000fcc4: e893000c ldm r3, {r2, r3} <== NOT EXECUTED
a000fcc8: e5842028 str r2, [r4, #40] ; 0x28 <== NOT EXECUTED
a000fccc: e584302c str r3, [r4, #44] ; 0x2c <== NOT EXECUTED
_Timestamp_To_timespec( &src->total_wall_time, &dst->total_wall_time );
a000fcd0: e2803084 add r3, r0, #132 ; 0x84 <== NOT EXECUTED
a000fcd4: e893000c ldm r3, {r2, r3} <== NOT EXECUTED
a000fcd8: e5842030 str r2, [r4, #48] ; 0x30 <== NOT EXECUTED
a000fcdc: e5843034 str r3, [r4, #52] ; 0x34 <== NOT EXECUTED
dst->min_wall_time = src->min_wall_time;
dst->max_wall_time = src->max_wall_time;
dst->total_wall_time = src->total_wall_time;
#endif
_Thread_Enable_dispatch();
a000fce0: ebfff4f5 bl a000d0bc <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a000fce4: e1a00005 mov r0, r5 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a000fce8: e8bd8038 pop {r3, r4, r5, pc} <== NOT EXECUTED
a000fcf0 <rtems_rate_monotonic_get_status>:
rtems_status_code rtems_rate_monotonic_get_status(
rtems_id id,
rtems_rate_monotonic_period_status *status
)
{
a000fcf0: e92d4010 push {r4, lr}
Objects_Locations location;
Rate_monotonic_Period_time_t since_last_period;
Rate_monotonic_Control *the_period;
bool valid_status;
if ( !status )
a000fcf4: e2514000 subs r4, r1, #0
rtems_status_code rtems_rate_monotonic_get_status(
rtems_id id,
rtems_rate_monotonic_period_status *status
)
{
a000fcf8: e1a03000 mov r3, r0
a000fcfc: e24dd014 sub sp, sp, #20
Rate_monotonic_Period_time_t since_last_period;
Rate_monotonic_Control *the_period;
bool valid_status;
if ( !status )
return RTEMS_INVALID_ADDRESS;
a000fd00: 03a00009 moveq r0, #9
Objects_Locations location;
Rate_monotonic_Period_time_t since_last_period;
Rate_monotonic_Control *the_period;
bool valid_status;
if ( !status )
a000fd04: 0a000023 beq a000fd98 <rtems_rate_monotonic_get_status+0xa8>
a000fd08: e1a01003 mov r1, r3
a000fd0c: e28d2010 add r2, sp, #16
a000fd10: e59f0088 ldr r0, [pc, #136] ; a000fda0 <rtems_rate_monotonic_get_status+0xb0>
a000fd14: ebfff217 bl a000c578 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
a000fd18: e59d2010 ldr r2, [sp, #16]
a000fd1c: e1a03000 mov r3, r0
a000fd20: e3520000 cmp r2, #0
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a000fd24: 13a00004 movne r0, #4
if ( !status )
return RTEMS_INVALID_ADDRESS;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
a000fd28: 1a00001a bne a000fd98 <rtems_rate_monotonic_get_status+0xa8>
case OBJECTS_LOCAL:
status->owner = the_period->owner->Object.id;
a000fd2c: e5932040 ldr r2, [r3, #64] ; 0x40
status->state = the_period->state;
a000fd30: e5933038 ldr r3, [r3, #56] ; 0x38
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
status->owner = the_period->owner->Object.id;
a000fd34: e5922008 ldr r2, [r2, #8]
status->state = the_period->state;
/*
* If the period is inactive, there is no information.
*/
if ( status->state == RATE_MONOTONIC_INACTIVE ) {
a000fd38: e3530000 cmp r3, #0
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
status->owner = the_period->owner->Object.id;
status->state = the_period->state;
a000fd3c: e884000c stm r4, {r2, r3}
/*
* If the period is inactive, there is no information.
*/
if ( status->state == RATE_MONOTONIC_INACTIVE ) {
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timespec_Set_to_zero( &status->since_last_period );
a000fd40: 05843008 streq r3, [r4, #8]
a000fd44: 0584300c streq r3, [r4, #12]
_Timespec_Set_to_zero( &status->executed_since_last_period );
a000fd48: 05843010 streq r3, [r4, #16]
a000fd4c: 05843014 streq r3, [r4, #20]
a000fd50: 0a00000e beq a000fd90 <rtems_rate_monotonic_get_status+0xa0>
} else {
/*
* Grab the current status.
*/
valid_status =
a000fd54: e1a0100d mov r1, sp <== NOT EXECUTED
a000fd58: e28d2008 add r2, sp, #8 <== NOT EXECUTED
a000fd5c: ebffe947 bl a000a280 <_Rate_monotonic_Get_status> <== NOT EXECUTED
_Rate_monotonic_Get_status(
the_period, &since_last_period, &executed
);
if (!valid_status) {
a000fd60: e3500000 cmp r0, #0 <== NOT EXECUTED
a000fd64: 1a000002 bne a000fd74 <rtems_rate_monotonic_get_status+0x84><== NOT EXECUTED
_Thread_Enable_dispatch();
a000fd68: ebfff4d3 bl a000d0bc <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_NOT_DEFINED;
a000fd6c: e3a0000b mov r0, #11 <== NOT EXECUTED
a000fd70: ea000008 b a000fd98 <rtems_rate_monotonic_get_status+0xa8> <== NOT EXECUTED
}
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_To_timespec(
a000fd74: e89d000c ldm sp, {r2, r3} <== NOT EXECUTED
a000fd78: e5842008 str r2, [r4, #8] <== NOT EXECUTED
a000fd7c: e584300c str r3, [r4, #12] <== NOT EXECUTED
&since_last_period, &status->since_last_period
);
_Timestamp_To_timespec(
a000fd80: e28d3008 add r3, sp, #8 <== NOT EXECUTED
a000fd84: e893000c ldm r3, {r2, r3} <== NOT EXECUTED
a000fd88: e5842010 str r2, [r4, #16] <== NOT EXECUTED
a000fd8c: e5843014 str r3, [r4, #20] <== NOT EXECUTED
status->since_last_period = since_last_period;
status->executed_since_last_period = executed;
#endif
}
_Thread_Enable_dispatch();
a000fd90: ebfff4c9 bl a000d0bc <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000fd94: e3a00000 mov r0, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a000fd98: e28dd014 add sp, sp, #20
a000fd9c: e8bd8010 pop {r4, pc}
a000a484 <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
a000a484: e92d40f1 push {r0, r4, r5, r6, r7, lr}
a000a488: e1a05000 mov r5, r0
a000a48c: e1a04001 mov r4, r1
Objects_Id id,
Objects_Locations *location
)
{
return (Rate_monotonic_Control *)
_Objects_Get( &_Rate_monotonic_Information, id, location );
a000a490: e59f0170 ldr r0, [pc, #368] ; a000a608 <rtems_rate_monotonic_period+0x184>
a000a494: e1a01005 mov r1, r5
a000a498: e1a0200d mov r2, sp
a000a49c: eb000835 bl a000c578 <_Objects_Get>
rtems_rate_monotonic_period_states local_state;
ISR_Level level;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
a000a4a0: e59d3000 ldr r3, [sp]
a000a4a4: e1a06000 mov r6, r0
a000a4a8: e3530000 cmp r3, #0
a000a4ac: 1a000052 bne a000a5fc <rtems_rate_monotonic_period+0x178>
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
a000a4b0: e59f3154 ldr r3, [pc, #340] ; a000a60c <rtems_rate_monotonic_period+0x188>
a000a4b4: e5902040 ldr r2, [r0, #64] ; 0x40
a000a4b8: e5933004 ldr r3, [r3, #4]
a000a4bc: e1520003 cmp r2, r3
a000a4c0: 0a000002 beq a000a4d0 <rtems_rate_monotonic_period+0x4c>
_Thread_Enable_dispatch();
a000a4c4: eb000afc bl a000d0bc <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_NOT_OWNER_OF_RESOURCE;
a000a4c8: e3a04017 mov r4, #23 <== NOT EXECUTED
a000a4cc: ea00004b b a000a600 <rtems_rate_monotonic_period+0x17c> <== NOT EXECUTED
}
if ( length == RTEMS_PERIOD_STATUS ) {
a000a4d0: e3540000 cmp r4, #0
a000a4d4: 1a000005 bne a000a4f0 <rtems_rate_monotonic_period+0x6c>
switch ( the_period->state ) {
a000a4d8: e5903038 ldr r3, [r0, #56] ; 0x38
a000a4dc: e3530004 cmp r3, #4
a000a4e0: 959f2128 ldrls r2, [pc, #296] ; a000a610 <rtems_rate_monotonic_period+0x18c>
a000a4e4: 97924103 ldrls r4, [r2, r3, lsl #2]
case RATE_MONOTONIC_ACTIVE:
default: /* unreached -- only to remove warnings */
return_value = RTEMS_SUCCESSFUL;
break;
}
_Thread_Enable_dispatch();
a000a4e8: eb000af3 bl a000d0bc <_Thread_Enable_dispatch>
return( return_value );
a000a4ec: ea000043 b a000a600 <rtems_rate_monotonic_period+0x17c>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000a4f0: e10f7000 mrs r7, CPSR
a000a4f4: e3873080 orr r3, r7, #128 ; 0x80
a000a4f8: e129f003 msr CPSR_fc, r3
}
_ISR_Disable( level );
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
a000a4fc: e5903038 ldr r3, [r0, #56] ; 0x38
a000a500: e3530000 cmp r3, #0
a000a504: 1a000011 bne a000a550 <rtems_rate_monotonic_period+0xcc>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000a508: e129f007 msr CPSR_fc, r7
_ISR_Enable( level );
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
a000a50c: ebffff89 bl a000a338 <_Rate_monotonic_Initiate_statistics>
the_period->state = RATE_MONOTONIC_ACTIVE;
a000a510: e3a03002 mov r3, #2
a000a514: e5863038 str r3, [r6, #56] ; 0x38
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
a000a518: e59f30f4 ldr r3, [pc, #244] ; a000a614 <rtems_rate_monotonic_period+0x190>
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a000a51c: e3a07000 mov r7, #0
_Rate_monotonic_Timeout,
id,
NULL
);
the_period->next_length = length;
a000a520: e586403c str r4, [r6, #60] ; 0x3c
the_watchdog->routine = routine;
a000a524: e586302c str r3, [r6, #44] ; 0x2c
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
a000a528: e586401c str r4, [r6, #28]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a000a52c: e59f00e4 ldr r0, [pc, #228] ; a000a618 <rtems_rate_monotonic_period+0x194>
a000a530: e2861010 add r1, r6, #16
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a000a534: e5867018 str r7, [r6, #24]
the_watchdog->routine = routine;
the_watchdog->id = id;
a000a538: e5865030 str r5, [r6, #48] ; 0x30
the_watchdog->user_data = user_data;
a000a53c: e5867034 str r7, [r6, #52] ; 0x34
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a000a540: eb000e9d bl a000dfbc <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
a000a544: e1a04007 mov r4, r7
);
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
a000a548: eb000adb bl a000d0bc <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000a54c: ea00002b b a000a600 <rtems_rate_monotonic_period+0x17c>
}
if ( the_period->state == RATE_MONOTONIC_ACTIVE ) {
a000a550: e3530002 cmp r3, #2
a000a554: 1a00001a bne a000a5c4 <rtems_rate_monotonic_period+0x140>
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
a000a558: ebffff93 bl a000a3ac <_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;
a000a55c: e3a03001 mov r3, #1
a000a560: e5863038 str r3, [r6, #56] ; 0x38
the_period->next_length = length;
a000a564: e586403c str r4, [r6, #60] ; 0x3c
a000a568: e129f007 msr CPSR_fc, r7
_ISR_Enable( level );
_Thread_Executing->Wait.id = the_period->Object.id;
a000a56c: e59f3098 ldr r3, [pc, #152] ; a000a60c <rtems_rate_monotonic_period+0x188>
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
a000a570: e3a01901 mov r1, #16384 ; 0x4000
the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING;
the_period->next_length = length;
_ISR_Enable( level );
_Thread_Executing->Wait.id = the_period->Object.id;
a000a574: e5930004 ldr r0, [r3, #4]
a000a578: e5963008 ldr r3, [r6, #8]
a000a57c: e5803020 str r3, [r0, #32]
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
a000a580: eb000cdd bl a000d8fc <_Thread_Set_state>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000a584: e10f2000 mrs r2, CPSR
a000a588: e3823080 orr r3, r2, #128 ; 0x80
a000a58c: e129f003 msr CPSR_fc, r3
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
local_state = the_period->state;
the_period->state = RATE_MONOTONIC_ACTIVE;
a000a590: e3a01002 mov r1, #2
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
local_state = the_period->state;
a000a594: e5963038 ldr r3, [r6, #56] ; 0x38
the_period->state = RATE_MONOTONIC_ACTIVE;
a000a598: e5861038 str r1, [r6, #56] ; 0x38
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000a59c: e129f002 msr CPSR_fc, r2
/*
* 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 )
a000a5a0: e3530003 cmp r3, #3
a000a5a4: 1a000003 bne a000a5b8 <rtems_rate_monotonic_period+0x134>
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
a000a5a8: e59f305c ldr r3, [pc, #92] ; a000a60c <rtems_rate_monotonic_period+0x188><== NOT EXECUTED
a000a5ac: e3a01901 mov r1, #16384 ; 0x4000 <== NOT EXECUTED
a000a5b0: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED
a000a5b4: eb0009f5 bl a000cd90 <_Thread_Clear_state> <== NOT EXECUTED
_Thread_Enable_dispatch();
a000a5b8: eb000abf bl a000d0bc <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000a5bc: e3a04000 mov r4, #0 <== NOT EXECUTED
a000a5c0: ea00000e b a000a600 <rtems_rate_monotonic_period+0x17c> <== NOT EXECUTED
}
if ( the_period->state == RATE_MONOTONIC_EXPIRED ) {
a000a5c4: e3530004 cmp r3, #4 <== NOT EXECUTED
a000a5c8: 1a00000b bne a000a5fc <rtems_rate_monotonic_period+0x178> <== NOT EXECUTED
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
a000a5cc: ebffff76 bl a000a3ac <_Rate_monotonic_Update_statistics> <== NOT EXECUTED
a000a5d0: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED
_ISR_Enable( level );
the_period->state = RATE_MONOTONIC_ACTIVE;
a000a5d4: e3a03002 mov r3, #2 <== NOT EXECUTED
a000a5d8: e5863038 str r3, [r6, #56] ; 0x38 <== NOT EXECUTED
the_period->next_length = length;
a000a5dc: e586403c str r4, [r6, #60] ; 0x3c <== NOT EXECUTED
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
a000a5e0: e586401c str r4, [r6, #28] <== NOT EXECUTED
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a000a5e4: e59f002c ldr r0, [pc, #44] ; a000a618 <rtems_rate_monotonic_period+0x194><== NOT EXECUTED
a000a5e8: e2861010 add r1, r6, #16 <== NOT EXECUTED
a000a5ec: eb000e72 bl a000dfbc <_Watchdog_Insert> <== NOT EXECUTED
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_TIMEOUT;
a000a5f0: e3a04006 mov r4, #6 <== NOT EXECUTED
the_period->state = RATE_MONOTONIC_ACTIVE;
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
a000a5f4: eb000ab0 bl a000d0bc <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_TIMEOUT;
a000a5f8: ea000000 b a000a600 <rtems_rate_monotonic_period+0x17c> <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a000a5fc: e3a04004 mov r4, #4 <== NOT EXECUTED
}
a000a600: e1a00004 mov r0, r4
a000a604: e8bd80f8 pop {r3, r4, r5, r6, r7, pc}
a000a804 <rtems_rate_monotonic_report_statistics>:
void rtems_rate_monotonic_report_statistics( void )
{
rtems_rate_monotonic_report_statistics_with_plugin( NULL, printk_plugin );
a000a804: e59f1004 ldr r1, [pc, #4] ; a000a810 <rtems_rate_monotonic_report_statistics+0xc><== NOT EXECUTED
a000a808: e3a00000 mov r0, #0 <== NOT EXECUTED
a000a80c: eaffff82 b a000a61c <rtems_rate_monotonic_report_statistics_with_plugin><== NOT EXECUTED
a000a61c <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
a000a61c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
rtems_id id;
rtems_rate_monotonic_period_statistics the_stats;
rtems_rate_monotonic_period_status the_status;
char name[5];
if ( !print )
a000a620: e2514000 subs r4, r1, #0 <== NOT EXECUTED
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
a000a624: e24dd078 sub sp, sp, #120 ; 0x78 <== NOT EXECUTED
a000a628: e1a05000 mov r5, r0 <== NOT EXECUTED
rtems_id id;
rtems_rate_monotonic_period_statistics the_stats;
rtems_rate_monotonic_period_status the_status;
char name[5];
if ( !print )
a000a62c: 0a000068 beq a000a7d4 <rtems_rate_monotonic_report_statistics_with_plugin+0x1b8><== NOT EXECUTED
return;
(*print)( context, "Period information by period\n" );
a000a630: e59f11a4 ldr r1, [pc, #420] ; a000a7dc <rtems_rate_monotonic_report_statistics_with_plugin+0x1c0><== NOT EXECUTED
a000a634: e12fff34 blx r4 <== NOT EXECUTED
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
a000a638: e59f11a0 ldr r1, [pc, #416] ; a000a7e0 <rtems_rate_monotonic_report_statistics_with_plugin+0x1c4><== NOT EXECUTED
a000a63c: e1a00005 mov r0, r5 <== NOT EXECUTED
a000a640: e12fff34 blx r4 <== NOT EXECUTED
(*print)( context, "--- Wall times are in seconds ---\n" );
a000a644: e59f1198 ldr r1, [pc, #408] ; a000a7e4 <rtems_rate_monotonic_report_statistics_with_plugin+0x1c8><== NOT EXECUTED
a000a648: e1a00005 mov r0, r5 <== NOT EXECUTED
a000a64c: e12fff34 blx r4 <== NOT EXECUTED
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
a000a650: e59f1190 ldr r1, [pc, #400] ; a000a7e8 <rtems_rate_monotonic_report_statistics_with_plugin+0x1cc><== NOT EXECUTED
a000a654: e1a00005 mov r0, r5 <== NOT EXECUTED
a000a658: e12fff34 blx r4 <== NOT EXECUTED
* 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 );
a000a65c: e28d7018 add r7, sp, #24 <== NOT EXECUTED
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
a000a660: e1a00005 mov r0, r5 <== NOT EXECUTED
a000a664: e59f1180 ldr r1, [pc, #384] ; a000a7ec <rtems_rate_monotonic_report_statistics_with_plugin+0x1d0><== NOT EXECUTED
/*
* 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 ;
a000a668: e59f8180 ldr r8, [pc, #384] ; a000a7f0 <rtems_rate_monotonic_report_statistics_with_plugin+0x1d4><== NOT EXECUTED
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
a000a66c: e12fff34 blx r4 <== NOT EXECUTED
{
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
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;
a000a670: e2873018 add r3, r7, #24 <== NOT EXECUTED
a000a674: e58d3010 str r3, [sp, #16] <== NOT EXECUTED
{
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
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;
a000a678: e2873030 add r3, r7, #48 ; 0x30 <== NOT EXECUTED
/*
* 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 ;
a000a67c: e5986008 ldr r6, [r8, #8] <== NOT EXECUTED
continue;
#else
(void) rtems_rate_monotonic_get_status( id, &the_status );
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
a000a680: e28da070 add sl, sp, #112 ; 0x70 <== 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 );
a000a684: e28d9068 add r9, sp, #104 ; 0x68 <== NOT EXECUTED
{
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
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;
a000a688: e58d3014 str r3, [sp, #20] <== NOT EXECUTED
/*
* 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 ;
a000a68c: ea00004d b a000a7c8 <rtems_rate_monotonic_report_statistics_with_plugin+0x1ac><== NOT EXECUTED
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
a000a690: e1a00006 mov r0, r6 <== NOT EXECUTED
a000a694: e1a01007 mov r1, r7 <== NOT EXECUTED
a000a698: eb001567 bl a000fc3c <rtems_rate_monotonic_get_statistics> <== NOT EXECUTED
if ( status != RTEMS_SUCCESSFUL )
a000a69c: e3500000 cmp r0, #0 <== NOT EXECUTED
a000a6a0: 1a000047 bne a000a7c4 <rtems_rate_monotonic_report_statistics_with_plugin+0x1a8><== NOT EXECUTED
#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 );
a000a6a4: e28d1050 add r1, sp, #80 ; 0x50 <== NOT EXECUTED
a000a6a8: e1a00006 mov r0, r6 <== NOT EXECUTED
a000a6ac: eb00158f bl a000fcf0 <rtems_rate_monotonic_get_status> <== NOT EXECUTED
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
a000a6b0: e3a01005 mov r1, #5 <== NOT EXECUTED
a000a6b4: e1a0200a mov r2, sl <== NOT EXECUTED
a000a6b8: e59d0050 ldr r0, [sp, #80] ; 0x50 <== NOT EXECUTED
a000a6bc: eb0000a8 bl a000a964 <rtems_object_get_name> <== NOT EXECUTED
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
a000a6c0: e59d3018 ldr r3, [sp, #24] <== NOT EXECUTED
a000a6c4: e59f1128 ldr r1, [pc, #296] ; a000a7f4 <rtems_rate_monotonic_report_statistics_with_plugin+0x1d8><== NOT EXECUTED
a000a6c8: e1a00005 mov r0, r5 <== NOT EXECUTED
a000a6cc: e58d3000 str r3, [sp] <== NOT EXECUTED
a000a6d0: e59d301c ldr r3, [sp, #28] <== NOT EXECUTED
a000a6d4: e1a02006 mov r2, r6 <== NOT EXECUTED
a000a6d8: e58d3004 str r3, [sp, #4] <== NOT EXECUTED
a000a6dc: e1a0300a mov r3, sl <== NOT EXECUTED
a000a6e0: e12fff34 blx r4 <== NOT EXECUTED
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
a000a6e4: e59d1018 ldr r1, [sp, #24] <== NOT EXECUTED
a000a6e8: e3510000 cmp r1, #0 <== NOT EXECUTED
a000a6ec: 1a000003 bne a000a700 <rtems_rate_monotonic_report_statistics_with_plugin+0xe4><== NOT EXECUTED
(*print)( context, "\n" );
a000a6f0: e1a00005 mov r0, r5 <== NOT EXECUTED
a000a6f4: e59f10fc ldr r1, [pc, #252] ; a000a7f8 <rtems_rate_monotonic_report_statistics_with_plugin+0x1dc><== NOT EXECUTED
a000a6f8: e12fff34 blx r4 <== NOT EXECUTED
continue;
a000a6fc: ea000030 b a000a7c4 <rtems_rate_monotonic_report_statistics_with_plugin+0x1a8><== 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 );
a000a700: e1a02009 mov r2, r9 <== NOT EXECUTED
a000a704: e59d0010 ldr r0, [sp, #16] <== NOT EXECUTED
a000a708: eb000d3c bl a000dc00 <_Timespec_Divide_by_integer> <== NOT EXECUTED
(*print)( context,
a000a70c: e59d0024 ldr r0, [sp, #36] ; 0x24 <== NOT EXECUTED
a000a710: e3a01ffa mov r1, #1000 ; 0x3e8 <== NOT EXECUTED
a000a714: eb004255 bl a001b070 <__aeabi_idiv> <== NOT EXECUTED
a000a718: e59d3028 ldr r3, [sp, #40] ; 0x28 <== NOT EXECUTED
a000a71c: e1a0b000 mov fp, r0 <== NOT EXECUTED
a000a720: e3a01ffa mov r1, #1000 ; 0x3e8 <== NOT EXECUTED
a000a724: e59d002c ldr r0, [sp, #44] ; 0x2c <== NOT EXECUTED
a000a728: e58d3000 str r3, [sp] <== NOT EXECUTED
a000a72c: eb00424f bl a001b070 <__aeabi_idiv> <== NOT EXECUTED
a000a730: e59d3068 ldr r3, [sp, #104] ; 0x68 <== NOT EXECUTED
a000a734: e58d0004 str r0, [sp, #4] <== NOT EXECUTED
a000a738: e3a01ffa mov r1, #1000 ; 0x3e8 <== NOT EXECUTED
a000a73c: e59d006c ldr r0, [sp, #108] ; 0x6c <== NOT EXECUTED
a000a740: e58d3008 str r3, [sp, #8] <== NOT EXECUTED
a000a744: eb004249 bl a001b070 <__aeabi_idiv> <== NOT EXECUTED
a000a748: e1a0300b mov r3, fp <== NOT EXECUTED
a000a74c: e58d000c str r0, [sp, #12] <== NOT EXECUTED
a000a750: e59f10a4 ldr r1, [pc, #164] ; a000a7fc <rtems_rate_monotonic_report_statistics_with_plugin+0x1e0><== NOT EXECUTED
a000a754: e59d2020 ldr r2, [sp, #32] <== NOT EXECUTED
a000a758: e1a00005 mov r0, r5 <== NOT EXECUTED
a000a75c: e12fff34 blx r4 <== NOT EXECUTED
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);
a000a760: e1a02009 mov r2, r9 <== NOT EXECUTED
a000a764: e59d0014 ldr r0, [sp, #20] <== NOT EXECUTED
a000a768: e59d1018 ldr r1, [sp, #24] <== NOT EXECUTED
a000a76c: eb000d23 bl a000dc00 <_Timespec_Divide_by_integer> <== NOT EXECUTED
(*print)( context,
a000a770: e3a01ffa mov r1, #1000 ; 0x3e8 <== NOT EXECUTED
a000a774: e59d003c ldr r0, [sp, #60] ; 0x3c <== NOT EXECUTED
a000a778: eb00423c bl a001b070 <__aeabi_idiv> <== NOT EXECUTED
a000a77c: e59d3040 ldr r3, [sp, #64] ; 0x40 <== NOT EXECUTED
a000a780: e1a0b000 mov fp, r0 <== NOT EXECUTED
a000a784: e3a01ffa mov r1, #1000 ; 0x3e8 <== NOT EXECUTED
a000a788: e59d0044 ldr r0, [sp, #68] ; 0x44 <== NOT EXECUTED
a000a78c: e58d3000 str r3, [sp] <== NOT EXECUTED
a000a790: eb004236 bl a001b070 <__aeabi_idiv> <== NOT EXECUTED
a000a794: e59d3068 ldr r3, [sp, #104] ; 0x68 <== NOT EXECUTED
a000a798: e58d0004 str r0, [sp, #4] <== NOT EXECUTED
a000a79c: e3a01ffa mov r1, #1000 ; 0x3e8 <== NOT EXECUTED
a000a7a0: e59d006c ldr r0, [sp, #108] ; 0x6c <== NOT EXECUTED
a000a7a4: e58d3008 str r3, [sp, #8] <== NOT EXECUTED
a000a7a8: eb004230 bl a001b070 <__aeabi_idiv> <== NOT EXECUTED
a000a7ac: e59f104c ldr r1, [pc, #76] ; a000a800 <rtems_rate_monotonic_report_statistics_with_plugin+0x1e4><== NOT EXECUTED
a000a7b0: e58d000c str r0, [sp, #12] <== NOT EXECUTED
a000a7b4: e59d2038 ldr r2, [sp, #56] ; 0x38 <== NOT EXECUTED
a000a7b8: e1a00005 mov r0, r5 <== NOT EXECUTED
a000a7bc: e1a0300b mov r3, fp <== NOT EXECUTED
a000a7c0: e12fff34 blx r4 <== NOT EXECUTED
* 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++ ) {
a000a7c4: e2866001 add r6, r6, #1 <== NOT EXECUTED
/*
* 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 ;
a000a7c8: e598300c ldr r3, [r8, #12] <== NOT EXECUTED
a000a7cc: e1560003 cmp r6, r3 <== NOT EXECUTED
a000a7d0: 9affffae bls a000a690 <rtems_rate_monotonic_report_statistics_with_plugin+0x74><== NOT EXECUTED
the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall
);
#endif
}
}
}
a000a7d4: e28dd078 add sp, sp, #120 ; 0x78 <== NOT EXECUTED
a000a7d8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
a000a814 <rtems_rate_monotonic_reset_all_statistics>:
a000a814: e59f3038 ldr r3, [pc, #56] ; a000a854 <rtems_rate_monotonic_reset_all_statistics+0x40><== NOT EXECUTED
/*
* rtems_rate_monotonic_reset_all_statistics
*/
void rtems_rate_monotonic_reset_all_statistics( void )
{
a000a818: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
a000a81c: e5932000 ldr r2, [r3] <== NOT EXECUTED
a000a820: e2822001 add r2, r2, #1 <== NOT EXECUTED
a000a824: e5832000 str r2, [r3] <== NOT EXECUTED
/*
* 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 ;
a000a828: e59f5028 ldr r5, [pc, #40] ; a000a858 <rtems_rate_monotonic_reset_all_statistics+0x44><== NOT EXECUTED
a000a82c: e5954008 ldr r4, [r5, #8] <== NOT EXECUTED
a000a830: ea000002 b a000a840 <rtems_rate_monotonic_reset_all_statistics+0x2c><== NOT EXECUTED
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
(void) rtems_rate_monotonic_reset_statistics( id );
a000a834: e1a00004 mov r0, r4 <== NOT EXECUTED
a000a838: eb000007 bl a000a85c <rtems_rate_monotonic_reset_statistics><== NOT EXECUTED
* 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++ ) {
a000a83c: e2844001 add r4, r4, #1 <== NOT EXECUTED
/*
* 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 ;
a000a840: e595300c ldr r3, [r5, #12] <== NOT EXECUTED
a000a844: e1540003 cmp r4, r3 <== NOT EXECUTED
a000a848: 9afffff9 bls a000a834 <rtems_rate_monotonic_reset_all_statistics+0x20><== NOT EXECUTED
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
}
a000a84c: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED
}
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
a000a850: ea000a19 b a000d0bc <_Thread_Enable_dispatch> <== NOT EXECUTED
a000a85c <rtems_rate_monotonic_reset_statistics>:
*/
rtems_status_code rtems_rate_monotonic_reset_statistics(
rtems_id id
)
{
a000a85c: e92d4031 push {r0, r4, r5, lr} <== NOT EXECUTED
a000a860: e1a01000 mov r1, r0 <== NOT EXECUTED
a000a864: e1a0200d mov r2, sp <== NOT EXECUTED
a000a868: e59f0044 ldr r0, [pc, #68] ; a000a8b4 <rtems_rate_monotonic_reset_statistics+0x58><== NOT EXECUTED
a000a86c: eb000741 bl a000c578 <_Objects_Get> <== NOT EXECUTED
Objects_Locations location;
Rate_monotonic_Control *the_period;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
a000a870: e59d5000 ldr r5, [sp] <== NOT EXECUTED
a000a874: e1a04000 mov r4, r0 <== NOT EXECUTED
a000a878: e3550000 cmp r5, #0 <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a000a87c: 13a00004 movne r0, #4 <== NOT EXECUTED
{
Objects_Locations location;
Rate_monotonic_Control *the_period;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
a000a880: 1a00000a bne a000a8b0 <rtems_rate_monotonic_reset_statistics+0x54><== NOT EXECUTED
case OBJECTS_LOCAL:
_Rate_monotonic_Reset_statistics( the_period );
a000a884: e1a01005 mov r1, r5 <== NOT EXECUTED
a000a888: e3a02038 mov r2, #56 ; 0x38 <== NOT EXECUTED
a000a88c: e2840054 add r0, r4, #84 ; 0x54 <== NOT EXECUTED
a000a890: eb00200b bl a00128c4 <memset> <== NOT EXECUTED
a000a894: e3e03102 mvn r3, #-2147483648 ; 0x80000000 <== NOT EXECUTED
a000a898: e584305c str r3, [r4, #92] ; 0x5c <== NOT EXECUTED
a000a89c: e5843060 str r3, [r4, #96] ; 0x60 <== NOT EXECUTED
a000a8a0: e5843074 str r3, [r4, #116] ; 0x74 <== NOT EXECUTED
a000a8a4: e5843078 str r3, [r4, #120] ; 0x78 <== NOT EXECUTED
_Thread_Enable_dispatch();
a000a8a8: eb000a03 bl a000d0bc <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a000a8ac: e1a00005 mov r0, r5 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a000a8b0: e8bd8038 pop {r3, r4, r5, pc} <== NOT EXECUTED
a0016a90 <rtems_region_create>:
uintptr_t length,
uintptr_t page_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
a0016a90: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
rtems_status_code return_status;
Region_Control *the_region;
if ( !rtems_is_name_valid( name ) )
a0016a94: e2509000 subs r9, r0, #0
uintptr_t length,
uintptr_t page_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
a0016a98: e1a06001 mov r6, r1
a0016a9c: e1a07002 mov r7, r2
a0016aa0: e1a08003 mov r8, r3
a0016aa4: e59da024 ldr sl, [sp, #36] ; 0x24
a0016aa8: e59db028 ldr fp, [sp, #40] ; 0x28
rtems_status_code return_status;
Region_Control *the_region;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
a0016aac: 03a06003 moveq r6, #3
)
{
rtems_status_code return_status;
Region_Control *the_region;
if ( !rtems_is_name_valid( name ) )
a0016ab0: 0a000031 beq a0016b7c <rtems_region_create+0xec>
return RTEMS_INVALID_NAME;
if ( !starting_address )
a0016ab4: e3560000 cmp r6, #0
a0016ab8: 0a00002e beq a0016b78 <rtems_region_create+0xe8>
return RTEMS_INVALID_ADDRESS;
if ( !id )
a0016abc: e35b0000 cmp fp, #0
a0016ac0: 0a00002c beq a0016b78 <rtems_region_create+0xe8>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
a0016ac4: e59f30b8 ldr r3, [pc, #184] ; a0016b84 <rtems_region_create+0xf4>
* This function allocates a region control block from
* the inactive chain of free region control blocks.
*/
RTEMS_INLINE_ROUTINE Region_Control *_Region_Allocate( void )
{
return (Region_Control *) _Objects_Allocate( &_Region_Information );
a0016ac8: e59f50b8 ldr r5, [pc, #184] ; a0016b88 <rtems_region_create+0xf8>
a0016acc: e5930000 ldr r0, [r3]
a0016ad0: eb000924 bl a0018f68 <_API_Mutex_Lock>
a0016ad4: e1a00005 mov r0, r5
a0016ad8: eb000f1c bl a001a750 <_Objects_Allocate>
the_region = _Region_Allocate();
if ( !the_region )
a0016adc: e2504000 subs r4, r0, #0
return_status = RTEMS_TOO_MANY;
a0016ae0: 03a06005 moveq r6, #5
_RTEMS_Lock_allocator(); /* to prevent deletion */
the_region = _Region_Allocate();
if ( !the_region )
a0016ae4: 0a00001f beq a0016b68 <rtems_region_create+0xd8>
return_status = RTEMS_TOO_MANY;
else {
the_region->maximum_segment_size = _Heap_Initialize(
a0016ae8: e2840068 add r0, r4, #104 ; 0x68
a0016aec: e1a01006 mov r1, r6
a0016af0: e1a02007 mov r2, r7
a0016af4: e1a03008 mov r3, r8
a0016af8: eb000df5 bl a001a2d4 <_Heap_Initialize>
&the_region->Memory, starting_address, length, page_size
);
if ( !the_region->maximum_segment_size ) {
a0016afc: e3500000 cmp r0, #0
if ( !the_region )
return_status = RTEMS_TOO_MANY;
else {
the_region->maximum_segment_size = _Heap_Initialize(
a0016b00: e584005c str r0, [r4, #92] ; 0x5c
&the_region->Memory, starting_address, length, page_size
);
if ( !the_region->maximum_segment_size ) {
a0016b04: 1a000004 bne a0016b1c <rtems_region_create+0x8c>
*/
RTEMS_INLINE_ROUTINE void _Region_Free (
Region_Control *the_region
)
{
_Objects_Free( &_Region_Information, &the_region->Object );
a0016b08: e1a00005 mov r0, r5 <== NOT EXECUTED
a0016b0c: e1a01004 mov r1, r4 <== NOT EXECUTED
a0016b10: eb000fd7 bl a001aa74 <_Objects_Free> <== NOT EXECUTED
_Region_Free( the_region );
return_status = RTEMS_INVALID_SIZE;
a0016b14: e3a06008 mov r6, #8 <== NOT EXECUTED
a0016b18: ea000012 b a0016b68 <rtems_region_create+0xd8> <== NOT EXECUTED
}
else {
the_region->starting_address = starting_address;
a0016b1c: e5846050 str r6, [r4, #80] ; 0x50
the_region->length = length;
the_region->page_size = page_size;
the_region->attribute_set = attribute_set;
the_region->number_of_used_blocks = 0;
_Thread_queue_Initialize(
a0016b20: e31a0004 tst sl, #4
the_region->starting_address = starting_address;
the_region->length = length;
the_region->page_size = page_size;
the_region->attribute_set = attribute_set;
the_region->number_of_used_blocks = 0;
a0016b24: e3a06000 mov r6, #0
_Thread_queue_Initialize(
a0016b28: 03a01000 moveq r1, #0
a0016b2c: 13a01001 movne r1, #1
a0016b30: e3a02040 mov r2, #64 ; 0x40
a0016b34: e3a03006 mov r3, #6
}
else {
the_region->starting_address = starting_address;
the_region->length = length;
a0016b38: e5847054 str r7, [r4, #84] ; 0x54
the_region->page_size = page_size;
a0016b3c: e5848058 str r8, [r4, #88] ; 0x58
the_region->attribute_set = attribute_set;
a0016b40: e584a060 str sl, [r4, #96] ; 0x60
the_region->number_of_used_blocks = 0;
a0016b44: e5846064 str r6, [r4, #100] ; 0x64
_Thread_queue_Initialize(
a0016b48: e2840010 add r0, r4, #16
a0016b4c: eb0014c9 bl a001be78 <_Thread_queue_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a0016b50: e595201c ldr r2, [r5, #28]
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
a0016b54: e5943008 ldr r3, [r4, #8]
a0016b58: e1d410b8 ldrh r1, [r4, #8]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a0016b5c: e7824101 str r4, [r2, r1, lsl #2]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
a0016b60: e584900c str r9, [r4, #12]
&_Region_Information,
&the_region->Object,
(Objects_Name) name
);
*id = the_region->Object.id;
a0016b64: e58b3000 str r3, [fp]
return_status = RTEMS_SUCCESSFUL;
}
}
_RTEMS_Unlock_allocator();
a0016b68: e59f3014 ldr r3, [pc, #20] ; a0016b84 <rtems_region_create+0xf4>
a0016b6c: e5930000 ldr r0, [r3]
a0016b70: eb000915 bl a0018fcc <_API_Mutex_Unlock>
return return_status;
a0016b74: ea000000 b a0016b7c <rtems_region_create+0xec>
if ( !starting_address )
return RTEMS_INVALID_ADDRESS;
if ( !id )
return RTEMS_INVALID_ADDRESS;
a0016b78: e3a06009 mov r6, #9 <== NOT EXECUTED
}
}
_RTEMS_Unlock_allocator();
return return_status;
}
a0016b7c: e1a00006 mov r0, r6
a0016b80: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
a0016c08 <rtems_region_extend>:
rtems_status_code rtems_region_extend(
rtems_id id,
void *starting_address,
uintptr_t length
)
{
a0016c08: e92d40f3 push {r0, r1, r4, r5, r6, r7, lr} <== NOT EXECUTED
bool extend_ok;
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
if ( !starting_address )
a0016c0c: e2517000 subs r7, r1, #0 <== NOT EXECUTED
rtems_status_code rtems_region_extend(
rtems_id id,
void *starting_address,
uintptr_t length
)
{
a0016c10: e1a04000 mov r4, r0 <== NOT EXECUTED
a0016c14: e1a06002 mov r6, r2 <== NOT EXECUTED
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
if ( !starting_address )
return RTEMS_INVALID_ADDRESS;
a0016c18: 03a05009 moveq r5, #9 <== NOT EXECUTED
bool extend_ok;
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
if ( !starting_address )
a0016c1c: 0a00001d beq a0016c98 <rtems_region_extend+0x90> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
a0016c20: e59f3078 ldr r3, [pc, #120] ; a0016ca0 <rtems_region_extend+0x98><== NOT EXECUTED
a0016c24: e5930000 ldr r0, [r3] <== NOT EXECUTED
a0016c28: eb0008ce bl a0018f68 <_API_Mutex_Lock> <== NOT EXECUTED
Objects_Id id,
Objects_Locations *location
)
{
return (Region_Control *)
_Objects_Get_no_protection( &_Region_Information, id, location );
a0016c2c: e1a01004 mov r1, r4 <== NOT EXECUTED
a0016c30: e59f006c ldr r0, [pc, #108] ; a0016ca4 <rtems_region_extend+0x9c><== NOT EXECUTED
a0016c34: e1a0200d mov r2, sp <== NOT EXECUTED
a0016c38: eb000fe5 bl a001abd4 <_Objects_Get_no_protection> <== NOT EXECUTED
the_region = _Region_Get( id, &location );
switch ( location ) {
a0016c3c: e59d5000 ldr r5, [sp] <== NOT EXECUTED
a0016c40: e1a04000 mov r4, r0 <== NOT EXECUTED
a0016c44: e3550000 cmp r5, #0 <== NOT EXECUTED
break;
#endif
case OBJECTS_ERROR:
default:
return_status = RTEMS_INVALID_ID;
a0016c48: 13a05004 movne r5, #4 <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
the_region = _Region_Get( id, &location );
switch ( location ) {
a0016c4c: 1a00000e bne a0016c8c <rtems_region_extend+0x84> <== NOT EXECUTED
case OBJECTS_LOCAL:
extend_ok = _Heap_Extend(
a0016c50: e2800068 add r0, r0, #104 ; 0x68 <== NOT EXECUTED
a0016c54: e1a01007 mov r1, r7 <== NOT EXECUTED
a0016c58: e1a02006 mov r2, r6 <== NOT EXECUTED
a0016c5c: e28d3004 add r3, sp, #4 <== NOT EXECUTED
a0016c60: eb000bd8 bl a0019bc8 <_Heap_Extend> <== NOT EXECUTED
starting_address,
length,
&amount_extended
);
if ( extend_ok ) {
a0016c64: e3500000 cmp r0, #0 <== NOT EXECUTED
the_region->length += amount_extended;
the_region->maximum_segment_size += amount_extended;
return_status = RTEMS_SUCCESSFUL;
} else {
return_status = RTEMS_INVALID_ADDRESS;
a0016c68: 03a05009 moveq r5, #9 <== NOT EXECUTED
starting_address,
length,
&amount_extended
);
if ( extend_ok ) {
a0016c6c: 0a000006 beq a0016c8c <rtems_region_extend+0x84> <== NOT EXECUTED
the_region->length += amount_extended;
a0016c70: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED
a0016c74: e5942054 ldr r2, [r4, #84] ; 0x54 <== NOT EXECUTED
a0016c78: e0822003 add r2, r2, r3 <== NOT EXECUTED
a0016c7c: e5842054 str r2, [r4, #84] ; 0x54 <== NOT EXECUTED
the_region->maximum_segment_size += amount_extended;
a0016c80: e594205c ldr r2, [r4, #92] ; 0x5c <== NOT EXECUTED
a0016c84: e0823003 add r3, r2, r3 <== NOT EXECUTED
a0016c88: e584305c str r3, [r4, #92] ; 0x5c <== NOT EXECUTED
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
a0016c8c: e59f300c ldr r3, [pc, #12] ; a0016ca0 <rtems_region_extend+0x98><== NOT EXECUTED
a0016c90: e5930000 ldr r0, [r3] <== NOT EXECUTED
a0016c94: eb0008cc bl a0018fcc <_API_Mutex_Unlock> <== NOT EXECUTED
return return_status;
}
a0016c98: e1a00005 mov r0, r5 <== NOT EXECUTED
a0016c9c: e8bd80fc pop {r2, r3, r4, r5, r6, r7, pc} <== NOT EXECUTED
a0016ca8 <rtems_region_get_free_information>:
rtems_status_code rtems_region_get_free_information(
rtems_id id,
Heap_Information_block *the_info
)
{
a0016ca8: e92d4031 push {r0, r4, r5, lr} <== NOT EXECUTED
Objects_Locations location;
rtems_status_code return_status;
register Region_Control *the_region;
if ( !the_info )
a0016cac: e2514000 subs r4, r1, #0 <== NOT EXECUTED
rtems_status_code rtems_region_get_free_information(
rtems_id id,
Heap_Information_block *the_info
)
{
a0016cb0: e1a05000 mov r5, r0 <== NOT EXECUTED
Objects_Locations location;
rtems_status_code return_status;
register Region_Control *the_region;
if ( !the_info )
return RTEMS_INVALID_ADDRESS;
a0016cb4: 03a05009 moveq r5, #9 <== NOT EXECUTED
{
Objects_Locations location;
rtems_status_code return_status;
register Region_Control *the_region;
if ( !the_info )
a0016cb8: 0a000013 beq a0016d0c <rtems_region_get_free_information+0x64><== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
a0016cbc: e59f3050 ldr r3, [pc, #80] ; a0016d14 <rtems_region_get_free_information+0x6c><== NOT EXECUTED
a0016cc0: e5930000 ldr r0, [r3] <== NOT EXECUTED
a0016cc4: eb0008a7 bl a0018f68 <_API_Mutex_Lock> <== NOT EXECUTED
a0016cc8: e1a01005 mov r1, r5 <== NOT EXECUTED
a0016ccc: e59f0044 ldr r0, [pc, #68] ; a0016d18 <rtems_region_get_free_information+0x70><== NOT EXECUTED
a0016cd0: e1a0200d mov r2, sp <== NOT EXECUTED
a0016cd4: eb000fbe bl a001abd4 <_Objects_Get_no_protection> <== NOT EXECUTED
the_region = _Region_Get( id, &location );
switch ( location ) {
a0016cd8: e59d5000 ldr r5, [sp] <== NOT EXECUTED
a0016cdc: e3550000 cmp r5, #0 <== NOT EXECUTED
break;
#endif
case OBJECTS_ERROR:
default:
return_status = RTEMS_INVALID_ID;
a0016ce0: 13a05004 movne r5, #4 <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
the_region = _Region_Get( id, &location );
switch ( location ) {
a0016ce4: 1a000005 bne a0016d00 <rtems_region_get_free_information+0x58><== NOT EXECUTED
case OBJECTS_LOCAL:
the_info->Used.number = 0;
a0016ce8: e584500c str r5, [r4, #12] <== NOT EXECUTED
the_info->Used.total = 0;
a0016cec: e5845014 str r5, [r4, #20] <== NOT EXECUTED
the_info->Used.largest = 0;
a0016cf0: e5845010 str r5, [r4, #16] <== NOT EXECUTED
_Heap_Get_free_information( &the_region->Memory, &the_info->Free );
a0016cf4: e2800068 add r0, r0, #104 ; 0x68 <== NOT EXECUTED
a0016cf8: e1a01004 mov r1, r4 <== NOT EXECUTED
a0016cfc: eb000cdd bl a001a078 <_Heap_Get_free_information> <== NOT EXECUTED
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
a0016d00: e59f300c ldr r3, [pc, #12] ; a0016d14 <rtems_region_get_free_information+0x6c><== NOT EXECUTED
a0016d04: e5930000 ldr r0, [r3] <== NOT EXECUTED
a0016d08: eb0008af bl a0018fcc <_API_Mutex_Unlock> <== NOT EXECUTED
return return_status;
}
a0016d0c: e1a00005 mov r0, r5 <== NOT EXECUTED
a0016d10: e8bd8038 pop {r3, r4, r5, pc} <== NOT EXECUTED
a0016d1c <rtems_region_get_information>:
rtems_status_code rtems_region_get_information(
rtems_id id,
Heap_Information_block *the_info
)
{
a0016d1c: e92d4031 push {r0, r4, r5, lr} <== NOT EXECUTED
Objects_Locations location;
rtems_status_code return_status;
register Region_Control *the_region;
if ( !the_info )
a0016d20: e2514000 subs r4, r1, #0 <== NOT EXECUTED
rtems_status_code rtems_region_get_information(
rtems_id id,
Heap_Information_block *the_info
)
{
a0016d24: e1a05000 mov r5, r0 <== NOT EXECUTED
Objects_Locations location;
rtems_status_code return_status;
register Region_Control *the_region;
if ( !the_info )
return RTEMS_INVALID_ADDRESS;
a0016d28: 03a05009 moveq r5, #9 <== NOT EXECUTED
{
Objects_Locations location;
rtems_status_code return_status;
register Region_Control *the_region;
if ( !the_info )
a0016d2c: 0a000010 beq a0016d74 <rtems_region_get_information+0x58> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
a0016d30: e59f3044 ldr r3, [pc, #68] ; a0016d7c <rtems_region_get_information+0x60><== NOT EXECUTED
a0016d34: e5930000 ldr r0, [r3] <== NOT EXECUTED
a0016d38: eb00088a bl a0018f68 <_API_Mutex_Lock> <== NOT EXECUTED
a0016d3c: e1a01005 mov r1, r5 <== NOT EXECUTED
a0016d40: e59f0038 ldr r0, [pc, #56] ; a0016d80 <rtems_region_get_information+0x64><== NOT EXECUTED
a0016d44: e1a0200d mov r2, sp <== NOT EXECUTED
a0016d48: eb000fa1 bl a001abd4 <_Objects_Get_no_protection> <== NOT EXECUTED
the_region = _Region_Get( id, &location );
switch ( location ) {
a0016d4c: e59d5000 ldr r5, [sp] <== NOT EXECUTED
a0016d50: e3550000 cmp r5, #0 <== NOT EXECUTED
break;
#endif
case OBJECTS_ERROR:
default:
return_status = RTEMS_INVALID_ID;
a0016d54: 13a05004 movne r5, #4 <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
the_region = _Region_Get( id, &location );
switch ( location ) {
a0016d58: 1a000002 bne a0016d68 <rtems_region_get_information+0x4c> <== NOT EXECUTED
case OBJECTS_LOCAL:
_Heap_Get_information( &the_region->Memory, the_info );
a0016d5c: e2800068 add r0, r0, #104 ; 0x68 <== NOT EXECUTED
a0016d60: e1a01004 mov r1, r4 <== NOT EXECUTED
a0016d64: eb000cd7 bl a001a0c8 <_Heap_Get_information> <== NOT EXECUTED
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
a0016d68: e59f300c ldr r3, [pc, #12] ; a0016d7c <rtems_region_get_information+0x60><== NOT EXECUTED
a0016d6c: e5930000 ldr r0, [r3] <== NOT EXECUTED
a0016d70: eb000895 bl a0018fcc <_API_Mutex_Unlock> <== NOT EXECUTED
return return_status;
}
a0016d74: e1a00005 mov r0, r5 <== NOT EXECUTED
a0016d78: e8bd8038 pop {r3, r4, r5, pc} <== NOT EXECUTED
a0016eb0 <rtems_region_get_segment_size>:
rtems_status_code rtems_region_get_segment_size(
rtems_id id,
void *segment,
uintptr_t *size
)
{
a0016eb0: e92d4071 push {r0, r4, r5, r6, lr}
Objects_Locations location;
rtems_status_code return_status = RTEMS_SUCCESSFUL;
register Region_Control *the_region;
if ( !segment )
a0016eb4: e2515000 subs r5, r1, #0
rtems_status_code rtems_region_get_segment_size(
rtems_id id,
void *segment,
uintptr_t *size
)
{
a0016eb8: e1a06000 mov r6, r0
a0016ebc: e1a04002 mov r4, r2
Objects_Locations location;
rtems_status_code return_status = RTEMS_SUCCESSFUL;
register Region_Control *the_region;
if ( !segment )
a0016ec0: 0a000019 beq a0016f2c <rtems_region_get_segment_size+0x7c>
return RTEMS_INVALID_ADDRESS;
if ( !size )
a0016ec4: e3520000 cmp r2, #0
a0016ec8: 0a000017 beq a0016f2c <rtems_region_get_segment_size+0x7c>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
a0016ecc: e59f3064 ldr r3, [pc, #100] ; a0016f38 <rtems_region_get_segment_size+0x88>
a0016ed0: e5930000 ldr r0, [r3]
a0016ed4: eb000823 bl a0018f68 <_API_Mutex_Lock>
a0016ed8: e59f005c ldr r0, [pc, #92] ; a0016f3c <rtems_region_get_segment_size+0x8c>
a0016edc: e1a01006 mov r1, r6
a0016ee0: e1a0200d mov r2, sp
a0016ee4: eb000f3a bl a001abd4 <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
a0016ee8: e59d3000 ldr r3, [sp]
a0016eec: e3530000 cmp r3, #0
a0016ef0: 0a000002 beq a0016f00 <rtems_region_get_segment_size+0x50>
void *segment,
uintptr_t *size
)
{
Objects_Locations location;
rtems_status_code return_status = RTEMS_SUCCESSFUL;
a0016ef4: e3530001 cmp r3, #1 <== NOT EXECUTED
a0016ef8: 03a04004 moveq r4, #4 <== NOT EXECUTED
a0016efc: ea000005 b a0016f18 <rtems_region_get_segment_size+0x68> <== NOT EXECUTED
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) )
a0016f00: e1a02004 mov r2, r4
a0016f04: e2800068 add r0, r0, #104 ; 0x68
a0016f08: e1a01005 mov r1, r5
a0016f0c: eb000dd2 bl a001a65c <_Heap_Size_of_alloc_area>
void *segment,
uintptr_t *size
)
{
Objects_Locations location;
rtems_status_code return_status = RTEMS_SUCCESSFUL;
a0016f10: e3500000 cmp r0, #0
a0016f14: 03a04009 moveq r4, #9
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
a0016f18: e59f3018 ldr r3, [pc, #24] ; a0016f38 <rtems_region_get_segment_size+0x88>
void *segment,
uintptr_t *size
)
{
Objects_Locations location;
rtems_status_code return_status = RTEMS_SUCCESSFUL;
a0016f1c: 13a04000 movne r4, #0
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
a0016f20: e5930000 ldr r0, [r3]
a0016f24: eb000828 bl a0018fcc <_API_Mutex_Unlock>
return return_status;
a0016f28: ea000000 b a0016f30 <rtems_region_get_segment_size+0x80>
if ( !segment )
return RTEMS_INVALID_ADDRESS;
if ( !size )
return RTEMS_INVALID_ADDRESS;
a0016f2c: e3a04009 mov r4, #9 <== NOT EXECUTED
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
a0016f30: e1a00004 mov r0, r4
a0016f34: e8bd8078 pop {r3, r4, r5, r6, pc}
a0016f70 <rtems_region_resize_segment>:
rtems_id id,
void *segment,
uintptr_t size,
uintptr_t *old_size
)
{
a0016f70: e92d41ff push {r0, r1, r2, r3, r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
uintptr_t osize;
rtems_status_code return_status;
Heap_Resize_status status;
register Region_Control *the_region;
if ( !old_size )
a0016f74: e2538000 subs r8, r3, #0 <== NOT EXECUTED
rtems_id id,
void *segment,
uintptr_t size,
uintptr_t *old_size
)
{
a0016f78: e1a05000 mov r5, r0 <== NOT EXECUTED
a0016f7c: e1a07001 mov r7, r1 <== NOT EXECUTED
a0016f80: e1a06002 mov r6, r2 <== NOT EXECUTED
rtems_status_code return_status;
Heap_Resize_status status;
register Region_Control *the_region;
if ( !old_size )
return RTEMS_INVALID_ADDRESS;
a0016f84: 03a00009 moveq r0, #9 <== NOT EXECUTED
uintptr_t osize;
rtems_status_code return_status;
Heap_Resize_status status;
register Region_Control *the_region;
if ( !old_size )
a0016f88: 0a000022 beq a0017018 <rtems_region_resize_segment+0xa8> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
a0016f8c: e59f408c ldr r4, [pc, #140] ; a0017020 <rtems_region_resize_segment+0xb0><== NOT EXECUTED
a0016f90: e5940000 ldr r0, [r4] <== NOT EXECUTED
a0016f94: eb0007f3 bl a0018f68 <_API_Mutex_Lock> <== NOT EXECUTED
a0016f98: e1a01005 mov r1, r5 <== NOT EXECUTED
a0016f9c: e59f0080 ldr r0, [pc, #128] ; a0017024 <rtems_region_resize_segment+0xb4><== NOT EXECUTED
a0016fa0: e28d2008 add r2, sp, #8 <== NOT EXECUTED
a0016fa4: eb000f0a bl a001abd4 <_Objects_Get_no_protection> <== NOT EXECUTED
the_region = _Region_Get( id, &location );
switch ( location ) {
a0016fa8: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
a0016fac: e1a05000 mov r5, r0 <== NOT EXECUTED
a0016fb0: e3530000 cmp r3, #0 <== NOT EXECUTED
a0016fb4: 1a000014 bne a001700c <rtems_region_resize_segment+0x9c> <== NOT EXECUTED
case OBJECTS_LOCAL:
_Region_Debug_Walk( the_region, 7 );
status = _Heap_Resize_block(
a0016fb8: e28d300c add r3, sp, #12 <== NOT EXECUTED
a0016fbc: e58d3000 str r3, [sp] <== NOT EXECUTED
a0016fc0: e1a02006 mov r2, r6 <== NOT EXECUTED
a0016fc4: e28d3004 add r3, sp, #4 <== NOT EXECUTED
a0016fc8: e2800068 add r0, r0, #104 ; 0x68 <== NOT EXECUTED
a0016fcc: e1a01007 mov r1, r7 <== NOT EXECUTED
a0016fd0: eb000d52 bl a001a520 <_Heap_Resize_block> <== NOT EXECUTED
segment,
(uint32_t) size,
&osize,
&avail_size
);
*old_size = (uint32_t) osize;
a0016fd4: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED
_Region_Debug_Walk( the_region, 8 );
if ( status == HEAP_RESIZE_SUCCESSFUL )
a0016fd8: e2506000 subs r6, r0, #0 <== NOT EXECUTED
segment,
(uint32_t) size,
&osize,
&avail_size
);
*old_size = (uint32_t) osize;
a0016fdc: e5883000 str r3, [r8] <== NOT EXECUTED
_Region_Debug_Walk( the_region, 8 );
if ( status == HEAP_RESIZE_SUCCESSFUL )
a0016fe0: 1a000003 bne a0016ff4 <rtems_region_resize_segment+0x84> <== NOT EXECUTED
_Region_Process_queue( the_region ); /* unlocks allocator */
a0016fe4: e1a00005 mov r0, r5 <== NOT EXECUTED
a0016fe8: eb001d48 bl a001e510 <_Region_Process_queue> <== NOT EXECUTED
else
_RTEMS_Unlock_allocator();
if (status == HEAP_RESIZE_SUCCESSFUL)
return RTEMS_SUCCESSFUL;
a0016fec: e1a00006 mov r0, r6 <== NOT EXECUTED
a0016ff0: ea000008 b a0017018 <rtems_region_resize_segment+0xa8> <== NOT EXECUTED
_Region_Debug_Walk( the_region, 8 );
if ( status == HEAP_RESIZE_SUCCESSFUL )
_Region_Process_queue( the_region ); /* unlocks allocator */
else
_RTEMS_Unlock_allocator();
a0016ff4: e5940000 ldr r0, [r4] <== NOT EXECUTED
a0016ff8: eb0007f3 bl a0018fcc <_API_Mutex_Unlock> <== NOT EXECUTED
if (status == HEAP_RESIZE_SUCCESSFUL)
return RTEMS_SUCCESSFUL;
if (status == HEAP_RESIZE_UNSATISFIED)
return RTEMS_UNSATISFIED;
a0016ffc: e3560001 cmp r6, #1 <== NOT EXECUTED
a0017000: 13a00009 movne r0, #9 <== NOT EXECUTED
a0017004: 03a0000d moveq r0, #13 <== NOT EXECUTED
a0017008: ea000002 b a0017018 <rtems_region_resize_segment+0xa8> <== NOT EXECUTED
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
a001700c: e5940000 ldr r0, [r4] <== NOT EXECUTED
a0017010: eb0007ed bl a0018fcc <_API_Mutex_Unlock> <== NOT EXECUTED
return return_status;
a0017014: e3a00004 mov r0, #4 <== NOT EXECUTED
}
a0017018: e28dd010 add sp, sp, #16 <== NOT EXECUTED
a001701c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
a0017028 <rtems_region_return_segment>:
rtems_status_code rtems_region_return_segment(
rtems_id id,
void *segment
)
{
a0017028: e92d4071 push {r0, r4, r5, r6, lr}
uint32_t size;
#endif
int status;
register Region_Control *the_region;
_RTEMS_Lock_allocator();
a001702c: e59f3074 ldr r3, [pc, #116] ; a00170a8 <rtems_region_return_segment+0x80>
rtems_status_code rtems_region_return_segment(
rtems_id id,
void *segment
)
{
a0017030: e1a05000 mov r5, r0
a0017034: e1a04001 mov r4, r1
uint32_t size;
#endif
int status;
register Region_Control *the_region;
_RTEMS_Lock_allocator();
a0017038: e5930000 ldr r0, [r3]
a001703c: eb0007c9 bl a0018f68 <_API_Mutex_Lock>
a0017040: e1a01005 mov r1, r5
a0017044: e59f0060 ldr r0, [pc, #96] ; a00170ac <rtems_region_return_segment+0x84>
a0017048: e1a0200d mov r2, sp
a001704c: eb000ee0 bl a001abd4 <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
a0017050: e59d6000 ldr r6, [sp]
a0017054: e1a05000 mov r5, r0
a0017058: e3560000 cmp r6, #0
break;
#endif
case OBJECTS_ERROR:
default:
return_status = RTEMS_INVALID_ID;
a001705c: 13a06004 movne r6, #4
register Region_Control *the_region;
_RTEMS_Lock_allocator();
the_region = _Region_Get( id, &location );
switch ( location ) {
a0017060: 1a00000b bne a0017094 <rtems_region_return_segment+0x6c>
RTEMS_INLINE_ROUTINE bool _Region_Free_segment (
Region_Control *the_region,
void *the_segment
)
{
return _Heap_Free( &the_region->Memory, the_segment );
a0017064: e2800068 add r0, r0, #104 ; 0x68
a0017068: e1a01004 mov r1, r4
a001706c: eb000b88 bl a0019e94 <_Heap_Free>
#endif
status = _Region_Free_segment( the_region, segment );
_Region_Debug_Walk( the_region, 4 );
if ( !status )
a0017070: e3500000 cmp r0, #0
return_status = RTEMS_INVALID_ADDRESS;
a0017074: 03a06009 moveq r6, #9
#endif
status = _Region_Free_segment( the_region, segment );
_Region_Debug_Walk( the_region, 4 );
if ( !status )
a0017078: 0a000005 beq a0017094 <rtems_region_return_segment+0x6c>
return_status = RTEMS_INVALID_ADDRESS;
else {
the_region->number_of_used_blocks -= 1;
a001707c: e5953064 ldr r3, [r5, #100] ; 0x64
_Region_Process_queue(the_region); /* unlocks allocator */
a0017080: e1a00005 mov r0, r5
_Region_Debug_Walk( the_region, 4 );
if ( !status )
return_status = RTEMS_INVALID_ADDRESS;
else {
the_region->number_of_used_blocks -= 1;
a0017084: e2433001 sub r3, r3, #1
a0017088: e5853064 str r3, [r5, #100] ; 0x64
_Region_Process_queue(the_region); /* unlocks allocator */
a001708c: eb001d1f bl a001e510 <_Region_Process_queue>
return RTEMS_SUCCESSFUL;
a0017090: ea000002 b a00170a0 <rtems_region_return_segment+0x78>
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
a0017094: e59f300c ldr r3, [pc, #12] ; a00170a8 <rtems_region_return_segment+0x80><== NOT EXECUTED
a0017098: e5930000 ldr r0, [r3] <== NOT EXECUTED
a001709c: eb0007ca bl a0018fcc <_API_Mutex_Unlock> <== NOT EXECUTED
return return_status;
}
a00170a0: e1a00006 mov r0, r6
a00170a4: e8bd8078 pop {r3, r4, r5, r6, pc}
a0009198 <rtems_semaphore_create>:
uint32_t count,
rtems_attribute attribute_set,
rtems_task_priority priority_ceiling,
rtems_id *id
)
{
a0009198: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
register Semaphore_Control *the_semaphore;
CORE_mutex_Attributes the_mutex_attr;
CORE_semaphore_Attributes the_semaphore_attr;
CORE_mutex_Status mutex_status;
if ( !rtems_is_name_valid( name ) )
a000919c: e2507000 subs r7, r0, #0
uint32_t count,
rtems_attribute attribute_set,
rtems_task_priority priority_ceiling,
rtems_id *id
)
{
a00091a0: e24dd018 sub sp, sp, #24
a00091a4: e1a04001 mov r4, r1
a00091a8: e1a08002 mov r8, r2
a00091ac: e1a09003 mov r9, r3
a00091b0: e59d6038 ldr r6, [sp, #56] ; 0x38
CORE_mutex_Attributes the_mutex_attr;
CORE_semaphore_Attributes the_semaphore_attr;
CORE_mutex_Status mutex_status;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
a00091b4: 03a00003 moveq r0, #3
register Semaphore_Control *the_semaphore;
CORE_mutex_Attributes the_mutex_attr;
CORE_semaphore_Attributes the_semaphore_attr;
CORE_mutex_Status mutex_status;
if ( !rtems_is_name_valid( name ) )
a00091b8: 0a00005d beq a0009334 <rtems_semaphore_create+0x19c>
return RTEMS_INVALID_NAME;
if ( !id )
a00091bc: e3560000 cmp r6, #0
return RTEMS_INVALID_ADDRESS;
a00091c0: 03a00009 moveq r0, #9
CORE_mutex_Status mutex_status;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
a00091c4: 0a00005a beq a0009334 <rtems_semaphore_create+0x19c>
return RTEMS_NOT_DEFINED;
} else
#endif
if ( _Attributes_Is_inherit_priority( attribute_set ) ||
a00091c8: e21230c0 ands r3, r2, #192 ; 0xc0
a00091cc: 0a000006 beq a00091ec <rtems_semaphore_create+0x54>
*/
RTEMS_INLINE_ROUTINE bool _Attributes_Is_binary_semaphore(
rtems_attribute attribute_set
)
{
return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_BINARY_SEMAPHORE);
a00091d0: e2022030 and r2, r2, #48 ; 0x30
_Attributes_Is_priority_ceiling( attribute_set ) ) {
if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) &&
a00091d4: e3520010 cmp r2, #16
a00091d8: 1a000054 bne a0009330 <rtems_semaphore_create+0x198>
a00091dc: e3180004 tst r8, #4
a00091e0: 0a000052 beq a0009330 <rtems_semaphore_create+0x198>
_Attributes_Is_priority( attribute_set ) ) )
return RTEMS_NOT_DEFINED;
}
if ( _Attributes_Is_inherit_priority( attribute_set ) &&
a00091e4: e35300c0 cmp r3, #192 ; 0xc0
a00091e8: 0a000050 beq a0009330 <rtems_semaphore_create+0x198>
_Attributes_Is_priority_ceiling( attribute_set ) )
return RTEMS_NOT_DEFINED;
if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) )
a00091ec: e218a030 ands sl, r8, #48 ; 0x30
a00091f0: 0a000002 beq a0009200 <rtems_semaphore_create+0x68>
a00091f4: e3540001 cmp r4, #1
return RTEMS_INVALID_NUMBER;
a00091f8: 83a0000a movhi r0, #10
if ( _Attributes_Is_inherit_priority( attribute_set ) &&
_Attributes_Is_priority_ceiling( attribute_set ) )
return RTEMS_NOT_DEFINED;
if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) )
a00091fc: 8a00004c bhi a0009334 <rtems_semaphore_create+0x19c>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a0009200: e59f3134 ldr r3, [pc, #308] ; a000933c <rtems_semaphore_create+0x1a4>
a0009204: e5932000 ldr r2, [r3]
a0009208: e2822001 add r2, r2, #1
a000920c: e5832000 str r2, [r3]
* This function allocates a semaphore control block from
* the inactive chain of free semaphore control blocks.
*/
RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Allocate( void )
{
return (Semaphore_Control *) _Objects_Allocate( &_Semaphore_Information );
a0009210: e59f0128 ldr r0, [pc, #296] ; a0009340 <rtems_semaphore_create+0x1a8>
a0009214: eb00050f bl a000a658 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_semaphore = _Semaphore_Allocate();
if ( !the_semaphore ) {
a0009218: e2505000 subs r5, r0, #0
a000921c: 1a000002 bne a000922c <rtems_semaphore_create+0x94>
_Thread_Enable_dispatch();
a0009220: eb0008fe bl a000b620 <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
a0009224: e3a00005 mov r0, #5
a0009228: ea000041 b a0009334 <rtems_semaphore_create+0x19c>
the_semaphore->attribute_set = attribute_set;
/*
* Initialize it as a counting semaphore.
*/
if ( _Attributes_Is_counting_semaphore( attribute_set ) ) {
a000922c: e35a0000 cmp sl, #0
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_semaphore->attribute_set = attribute_set;
a0009230: e5858010 str r8, [r5, #16]
a0009234: e2083004 and r3, r8, #4
/*
* Initialize it as a counting semaphore.
*/
if ( _Attributes_Is_counting_semaphore( attribute_set ) ) {
a0009238: 1a00000d bne a0009274 <rtems_semaphore_create+0xdc>
/*
* This effectively disables limit checking.
*/
the_semaphore_attr.maximum_count = 0xFFFFFFFF;
if ( _Attributes_Is_priority( attribute_set ) )
a000923c: e3530000 cmp r3, #0
the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY;
a0009240: 13a03001 movne r3, #1
*/
if ( _Attributes_Is_counting_semaphore( attribute_set ) ) {
/*
* This effectively disables limit checking.
*/
the_semaphore_attr.maximum_count = 0xFFFFFFFF;
a0009244: e3e02000 mvn r2, #0
a0009248: e58d2010 str r2, [sp, #16]
if ( _Attributes_Is_priority( attribute_set ) )
the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY;
a000924c: 158d3014 strne r3, [sp, #20]
* The following are just to make Purify happy.
*/
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM;
_CORE_semaphore_Initialize(
a0009250: e2850014 add r0, r5, #20
the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO;
/*
* The following are just to make Purify happy.
*/
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
a0009254: e3a03000 mov r3, #0
the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM;
_CORE_semaphore_Initialize(
a0009258: e28d1010 add r1, sp, #16
a000925c: e1a02004 mov r2, r4
the_semaphore_attr.maximum_count = 0xFFFFFFFF;
if ( _Attributes_Is_priority( attribute_set ) )
the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY;
else
the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO;
a0009260: 058da014 streq sl, [sp, #20]
/*
* The following are just to make Purify happy.
*/
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
a0009264: e58d3000 str r3, [sp]
the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM;
a0009268: e58d300c str r3, [sp, #12]
_CORE_semaphore_Initialize(
a000926c: eb000384 bl a000a084 <_CORE_semaphore_Initialize>
a0009270: ea000024 b a0009308 <rtems_semaphore_create+0x170>
} else {
/*
* It is either simple binary semaphore or a more powerful mutex
* style binary semaphore. This is the mutex style.
*/
if ( _Attributes_Is_priority( attribute_set ) )
a0009274: e3530000 cmp r3, #0
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY;
a0009278: 13a03001 movne r3, #1
else
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
a000927c: e35a0010 cmp sl, #16
* style binary semaphore. This is the mutex style.
*/
if ( _Attributes_Is_priority( attribute_set ) )
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY;
else
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
a0009280: e58d3008 str r3, [sp, #8]
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
the_mutex_attr.only_owner_release = true;
}
}
} else /* must be simple binary semaphore */ {
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS;
a0009284: 13a03002 movne r3, #2
a0009288: 158d3000 strne r3, [sp]
the_mutex_attr.only_owner_release = false;
a000928c: 13a03000 movne r3, #0
if ( _Attributes_Is_priority( attribute_set ) )
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY;
else
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
a0009290: 1a00000d bne a00092cc <rtems_semaphore_create+0x134>
the_mutex_attr.priority_ceiling = priority_ceiling;
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
a0009294: e3a03000 mov r3, #0
a0009298: e58d3000 str r3, [sp]
the_mutex_attr.only_owner_release = false;
a000929c: e5cd3004 strb r3, [sp, #4]
if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) {
a00092a0: e59d3008 ldr r3, [sp, #8]
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY;
else
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
the_mutex_attr.priority_ceiling = priority_ceiling;
a00092a4: e58d900c str r9, [sp, #12]
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
the_mutex_attr.only_owner_release = false;
if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) {
a00092a8: e3530001 cmp r3, #1
a00092ac: 1a000007 bne a00092d0 <rtems_semaphore_create+0x138>
if ( _Attributes_Is_inherit_priority( attribute_set ) ) {
a00092b0: e3180040 tst r8, #64 ; 0x40
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
a00092b4: 13a02002 movne r2, #2
the_mutex_attr.priority_ceiling = priority_ceiling;
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
the_mutex_attr.only_owner_release = false;
if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) {
if ( _Attributes_Is_inherit_priority( attribute_set ) ) {
a00092b8: 1a000002 bne a00092c8 <rtems_semaphore_create+0x130>
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
the_mutex_attr.only_owner_release = true;
} else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) {
a00092bc: e3180080 tst r8, #128 ; 0x80
a00092c0: 0a000002 beq a00092d0 <rtems_semaphore_create+0x138>
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
a00092c4: e3a02003 mov r2, #3
a00092c8: e58d2008 str r2, [sp, #8]
the_mutex_attr.only_owner_release = true;
}
}
} else /* must be simple binary semaphore */ {
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS;
the_mutex_attr.only_owner_release = false;
a00092cc: e5cd3004 strb r3, [sp, #4]
}
mutex_status = _CORE_mutex_Initialize(
a00092d0: e3540001 cmp r4, #1
a00092d4: 13a02000 movne r2, #0
a00092d8: 03a02001 moveq r2, #1
a00092dc: e2850014 add r0, r5, #20
a00092e0: e1a0100d mov r1, sp
a00092e4: eb0002a4 bl a0009d7c <_CORE_mutex_Initialize>
&the_semaphore->Core_control.mutex,
&the_mutex_attr,
(count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED
);
if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) {
a00092e8: e3500006 cmp r0, #6
a00092ec: 1a000005 bne a0009308 <rtems_semaphore_create+0x170>
*/
RTEMS_INLINE_ROUTINE void _Semaphore_Free (
Semaphore_Control *the_semaphore
)
{
_Objects_Free( &_Semaphore_Information, &the_semaphore->Object );
a00092f0: e59f0048 ldr r0, [pc, #72] ; a0009340 <rtems_semaphore_create+0x1a8>
a00092f4: e1a01005 mov r1, r5
a00092f8: eb00059f bl a000a97c <_Objects_Free>
_Semaphore_Free( the_semaphore );
_Thread_Enable_dispatch();
a00092fc: eb0008c7 bl a000b620 <_Thread_Enable_dispatch>
return RTEMS_INVALID_PRIORITY;
a0009300: e3a00013 mov r0, #19
a0009304: ea00000a b a0009334 <rtems_semaphore_create+0x19c>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a0009308: e59f2030 ldr r2, [pc, #48] ; a0009340 <rtems_semaphore_create+0x1a8>
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
a000930c: e5953008 ldr r3, [r5, #8]
a0009310: e1d510b8 ldrh r1, [r5, #8]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a0009314: e592201c ldr r2, [r2, #28]
a0009318: e7825101 str r5, [r2, r1, lsl #2]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
a000931c: e585700c str r7, [r5, #12]
&_Semaphore_Information,
&the_semaphore->Object,
(Objects_Name) name
);
*id = the_semaphore->Object.id;
a0009320: e5863000 str r3, [r6]
the_semaphore->Object.id,
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
a0009324: eb0008bd bl a000b620 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a0009328: e3a00000 mov r0, #0
a000932c: ea000000 b a0009334 <rtems_semaphore_create+0x19c>
}
if ( _Attributes_Is_inherit_priority( attribute_set ) &&
_Attributes_Is_priority_ceiling( attribute_set ) )
return RTEMS_NOT_DEFINED;
a0009330: e3a0000b mov r0, #11 <== NOT EXECUTED
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
a0009334: e28dd018 add sp, sp, #24
a0009338: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
a0009344 <rtems_semaphore_delete>:
#endif
rtems_status_code rtems_semaphore_delete(
rtems_id id
)
{
a0009344: e92d4011 push {r0, r4, lr}
a0009348: e1a01000 mov r1, r0
Objects_Id id,
Objects_Locations *location
)
{
return (Semaphore_Control *)
_Objects_Get( &_Semaphore_Information, id, location );
a000934c: e1a0200d mov r2, sp
a0009350: e59f0084 ldr r0, [pc, #132] ; a00093dc <rtems_semaphore_delete+0x98>
a0009354: eb0005e0 bl a000aadc <_Objects_Get>
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
a0009358: e59d3000 ldr r3, [sp]
a000935c: e1a04000 mov r4, r0
a0009360: e3530000 cmp r3, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a0009364: 13a00004 movne r0, #4
{
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
a0009368: 1a00001a bne a00093d8 <rtems_semaphore_delete+0x94>
*/
RTEMS_INLINE_ROUTINE bool _Attributes_Is_counting_semaphore(
rtems_attribute attribute_set
)
{
return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_COUNTING_SEMAPHORE);
a000936c: e5941010 ldr r1, [r4, #16]
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
a0009370: e2111030 ands r1, r1, #48 ; 0x30
a0009374: 0a00000c beq a00093ac <rtems_semaphore_delete+0x68>
if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) &&
a0009378: e5943064 ldr r3, [r4, #100] ; 0x64
a000937c: e3530000 cmp r3, #0
a0009380: 1a000004 bne a0009398 <rtems_semaphore_delete+0x54>
a0009384: e3510020 cmp r1, #32
a0009388: 0a000002 beq a0009398 <rtems_semaphore_delete+0x54>
!_Attributes_Is_simple_binary_semaphore(
the_semaphore->attribute_set ) ) {
_Thread_Enable_dispatch();
a000938c: eb0008a3 bl a000b620 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_RESOURCE_IN_USE;
a0009390: e3a0000c mov r0, #12 <== NOT EXECUTED
a0009394: ea00000f b a00093d8 <rtems_semaphore_delete+0x94> <== NOT EXECUTED
}
_CORE_mutex_Flush(
a0009398: e2840014 add r0, r4, #20
a000939c: e3a01000 mov r1, #0
a00093a0: e3a02004 mov r2, #4
a00093a4: eb000273 bl a0009d78 <_CORE_mutex_Flush>
a00093a8: ea000002 b a00093b8 <rtems_semaphore_delete+0x74>
&the_semaphore->Core_control.mutex,
SEMAPHORE_MP_OBJECT_WAS_DELETED,
CORE_MUTEX_WAS_DELETED
);
} else {
_CORE_semaphore_Flush(
a00093ac: e2840014 add r0, r4, #20
a00093b0: e3a02002 mov r2, #2
a00093b4: eb000331 bl a000a080 <_CORE_semaphore_Flush>
SEMAPHORE_MP_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_WAS_DELETED
);
}
_Objects_Close( &_Semaphore_Information, &the_semaphore->Object );
a00093b8: e59f001c ldr r0, [pc, #28] ; a00093dc <rtems_semaphore_delete+0x98>
a00093bc: e1a01004 mov r1, r4
a00093c0: eb0004c6 bl a000a6e0 <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _Semaphore_Free (
Semaphore_Control *the_semaphore
)
{
_Objects_Free( &_Semaphore_Information, &the_semaphore->Object );
a00093c4: e59f0010 ldr r0, [pc, #16] ; a00093dc <rtems_semaphore_delete+0x98>
a00093c8: e1a01004 mov r1, r4
a00093cc: eb00056a bl a000a97c <_Objects_Free>
0, /* Not used */
0 /* Not used */
);
}
#endif
_Thread_Enable_dispatch();
a00093d0: eb000892 bl a000b620 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a00093d4: e3a00000 mov r0, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a00093d8: e8bd8018 pop {r3, r4, pc}
a0011a84 <rtems_semaphore_flush>:
#endif
rtems_status_code rtems_semaphore_flush(
rtems_id id
)
{
a0011a84: e92d4001 push {r0, lr}
a0011a88: e1a01000 mov r1, r0
a0011a8c: e1a0200d mov r2, sp
a0011a90: e59f0044 ldr r0, [pc, #68] ; a0011adc <rtems_semaphore_flush+0x58>
a0011a94: ebffe87e bl a000bc94 <_Objects_Get>
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
a0011a98: e59d3000 ldr r3, [sp]
a0011a9c: e3530000 cmp r3, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a0011aa0: 13a00004 movne r0, #4
{
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
a0011aa4: 1a00000b bne a0011ad8 <rtems_semaphore_flush+0x54>
*/
RTEMS_INLINE_ROUTINE bool _Attributes_Is_counting_semaphore(
rtems_attribute attribute_set
)
{
return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_COUNTING_SEMAPHORE);
a0011aa8: e5901010 ldr r1, [r0, #16]
a0011aac: e2800014 add r0, r0, #20
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
a0011ab0: e2111030 ands r1, r1, #48 ; 0x30
a0011ab4: 0a000003 beq a0011ac8 <rtems_semaphore_flush+0x44>
_CORE_mutex_Flush(
a0011ab8: e1a01003 mov r1, r3
a0011abc: e3a02001 mov r2, #1
a0011ac0: ebffe539 bl a000afac <_CORE_mutex_Flush>
a0011ac4: ea000001 b a0011ad0 <rtems_semaphore_flush+0x4c>
&the_semaphore->Core_control.mutex,
SEND_OBJECT_WAS_DELETED,
CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT
);
} else {
_CORE_semaphore_Flush(
a0011ac8: e3a02001 mov r2, #1 <== NOT EXECUTED
a0011acc: ebffe5f8 bl a000b2b4 <_CORE_semaphore_Flush> <== NOT EXECUTED
&the_semaphore->Core_control.semaphore,
SEND_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT
);
}
_Thread_Enable_dispatch();
a0011ad0: ebffeb42 bl a000c7e0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a0011ad4: e3a00000 mov r0, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a0011ad8: e8bd8008 pop {r3, pc}
a00093e0 <rtems_semaphore_obtain>:
rtems_status_code rtems_semaphore_obtain(
rtems_id id,
rtems_option option_set,
rtems_interval timeout
)
{
a00093e0: e92d40f7 push {r0, r1, r2, r4, r5, r6, r7, lr}
a00093e4: e1a04000 mov r4, r0
Objects_Locations *location,
ISR_Level *level
)
{
return (Semaphore_Control *)
_Objects_Get_isr_disable( &_Semaphore_Information, id, location, level );
a00093e8: e28d3004 add r3, sp, #4
a00093ec: e1a06001 mov r6, r1
a00093f0: e1a05002 mov r5, r2
a00093f4: e59f00ec ldr r0, [pc, #236] ; a00094e8 <rtems_semaphore_obtain+0x108>
a00093f8: e1a01004 mov r1, r4
a00093fc: e28d2008 add r2, sp, #8
a0009400: eb00059a bl a000aa70 <_Objects_Get_isr_disable>
register Semaphore_Control *the_semaphore;
Objects_Locations location;
ISR_Level level;
the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level );
switch ( location ) {
a0009404: e59d3008 ldr r3, [sp, #8]
a0009408: e3530000 cmp r3, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a000940c: 13a00004 movne r0, #4
register Semaphore_Control *the_semaphore;
Objects_Locations location;
ISR_Level level;
the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level );
switch ( location ) {
a0009410: 1a000033 bne a00094e4 <rtems_semaphore_obtain+0x104>
a0009414: e5903010 ldr r3, [r0, #16]
a0009418: e59f70cc ldr r7, [pc, #204] ; a00094ec <rtems_semaphore_obtain+0x10c>
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
a000941c: e2132030 ands r2, r3, #48 ; 0x30
a0009420: 0a00000b beq a0009454 <rtems_semaphore_obtain+0x74>
_CORE_mutex_Seize(
a0009424: e59d3004 ldr r3, [sp, #4]
*/
RTEMS_INLINE_ROUTINE bool _Options_Is_no_wait (
rtems_option option_set
)
{
return (option_set & RTEMS_NO_WAIT) ? true : false;
a0009428: e2062001 and r2, r6, #1
a000942c: e2800014 add r0, r0, #20
a0009430: e58d3000 str r3, [sp]
a0009434: e1a01004 mov r1, r4
a0009438: e1a03005 mov r3, r5
a000943c: e2222001 eor r2, r2, #1
a0009440: eb000295 bl a0009e9c <_CORE_mutex_Seize>
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
level
);
return _Semaphore_Translate_core_mutex_return_code(
_Thread_Executing->Wait.return_code );
a0009444: e5973004 ldr r3, [r7, #4]
id,
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
level
);
return _Semaphore_Translate_core_mutex_return_code(
a0009448: e5930034 ldr r0, [r3, #52] ; 0x34
a000944c: eb000047 bl a0009570 <_Semaphore_Translate_core_mutex_return_code>
a0009450: ea000023 b a00094e4 <rtems_semaphore_obtain+0x104>
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
a0009454: e5973004 ldr r3, [r7, #4]
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
a0009458: e5832034 str r2, [r3, #52] ; 0x34
if ( the_semaphore->count != 0 ) {
a000945c: e590205c ldr r2, [r0, #92] ; 0x5c
a0009460: e3520000 cmp r2, #0
a0009464: 0a000004 beq a000947c <rtems_semaphore_obtain+0x9c>
the_semaphore->count -= 1;
a0009468: e2422001 sub r2, r2, #1
a000946c: e580205c str r2, [r0, #92] ; 0x5c
a0009470: e59d3004 ldr r3, [sp, #4]
a0009474: e129f003 msr CPSR_fc, r3
a0009478: ea000015 b a00094d4 <rtems_semaphore_obtain+0xf4>
_ISR_Enable( *level_p );
return;
}
if ( !wait ) {
a000947c: e3160001 tst r6, #1
a0009480: 0a000004 beq a0009498 <rtems_semaphore_obtain+0xb8>
a0009484: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED
a0009488: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
_ISR_Enable( *level_p );
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT;
a000948c: e3a02001 mov r2, #1 <== NOT EXECUTED
a0009490: e5832034 str r2, [r3, #52] ; 0x34 <== NOT EXECUTED
a0009494: ea00000e b a00094d4 <rtems_semaphore_obtain+0xf4> <== NOT EXECUTED
a0009498: e59f2050 ldr r2, [pc, #80] ; a00094f0 <rtems_semaphore_obtain+0x110>
a000949c: e5921000 ldr r1, [r2]
a00094a0: e2811001 add r1, r1, #1
a00094a4: e5821000 str r1, [r2]
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;
a00094a8: e3a02001 mov r2, #1
a00094ac: e5802044 str r2, [r0, #68] ; 0x44
return;
}
_Thread_Disable_dispatch();
_Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue );
executing->Wait.queue = &the_semaphore->Wait_queue;
a00094b0: e2800014 add r0, r0, #20
a00094b4: e5830044 str r0, [r3, #68] ; 0x44
executing->Wait.id = id;
a00094b8: e5834020 str r4, [r3, #32]
a00094bc: e59d3004 ldr r3, [sp, #4]
a00094c0: e129f003 msr CPSR_fc, r3
_ISR_Enable( *level_p );
_Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout );
a00094c4: e59f2028 ldr r2, [pc, #40] ; a00094f4 <rtems_semaphore_obtain+0x114>
a00094c8: e1a01005 mov r1, r5
a00094cc: eb000977 bl a000bab0 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
a00094d0: eb000852 bl a000b620 <_Thread_Enable_dispatch>
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
&level
);
return _Semaphore_Translate_core_semaphore_return_code(
_Thread_Executing->Wait.return_code );
a00094d4: e59f3010 ldr r3, [pc, #16] ; a00094ec <rtems_semaphore_obtain+0x10c>
a00094d8: e5933004 ldr r3, [r3, #4]
id,
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
&level
);
return _Semaphore_Translate_core_semaphore_return_code(
a00094dc: e5930034 ldr r0, [r3, #52] ; 0x34
a00094e0: eb000026 bl a0009580 <_Semaphore_Translate_core_semaphore_return_code>
break;
}
return RTEMS_INVALID_ID;
}
a00094e4: e8bd80fe pop {r1, r2, r3, r4, r5, r6, r7, pc}
a001753c <rtems_signal_send>:
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
a001753c: e92d4011 push {r0, r4, lr}
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
a0017540: e2514000 subs r4, r1, #0
return RTEMS_INVALID_NUMBER;
a0017544: 03a0000a moveq r0, #10
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
a0017548: 0a000028 beq a00175f0 <rtems_signal_send+0xb4>
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
a001754c: e1a0100d mov r1, sp
a0017550: eb001089 bl a001b77c <_Thread_Get>
switch ( location ) {
a0017554: e59d3000 ldr r3, [sp]
a0017558: e3530000 cmp r3, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a001755c: 13a00004 movne r0, #4
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
switch ( location ) {
a0017560: 1a000022 bne a00175f0 <rtems_signal_send+0xb4>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
a0017564: e59030f4 ldr r3, [r0, #244] ; 0xf4
asr = &api->Signal;
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
a0017568: e593200c ldr r2, [r3, #12]
a001756c: e3520000 cmp r2, #0
a0017570: 0a00001c beq a00175e8 <rtems_signal_send+0xac>
if ( asr->is_enabled ) {
a0017574: e5d32008 ldrb r2, [r3, #8]
a0017578: e3520000 cmp r2, #0
a001757c: 0a00000f beq a00175c0 <rtems_signal_send+0x84>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a0017580: e10f2000 mrs r2, CPSR
a0017584: e3821080 orr r1, r2, #128 ; 0x80
a0017588: e129f001 msr CPSR_fc, r1
)
{
ISR_Level _level;
_ISR_Disable( _level );
*signal_set |= signals;
a001758c: e5931014 ldr r1, [r3, #20]
a0017590: e1814004 orr r4, r1, r4
a0017594: e5834014 str r4, [r3, #20]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a0017598: e129f002 msr CPSR_fc, r2
_ASR_Post_signals( signal_set, &asr->signals_posted );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
a001759c: e59f3050 ldr r3, [pc, #80] ; a00175f4 <rtems_signal_send+0xb8>
a00175a0: e5932000 ldr r2, [r3]
a00175a4: e3520000 cmp r2, #0
a00175a8: 0a00000b beq a00175dc <rtems_signal_send+0xa0>
a00175ac: e5932004 ldr r2, [r3, #4] <== NOT EXECUTED
a00175b0: e1500002 cmp r0, r2 <== NOT EXECUTED
_Thread_Dispatch_necessary = true;
a00175b4: 03a02001 moveq r2, #1 <== NOT EXECUTED
a00175b8: 05c32010 strbeq r2, [r3, #16] <== NOT EXECUTED
a00175bc: ea000006 b a00175dc <rtems_signal_send+0xa0> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a00175c0: e10f2000 mrs r2, CPSR <== NOT EXECUTED
a00175c4: e3821080 orr r1, r2, #128 ; 0x80 <== NOT EXECUTED
a00175c8: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED
a00175cc: e5931018 ldr r1, [r3, #24] <== NOT EXECUTED
a00175d0: e1814004 orr r4, r1, r4 <== NOT EXECUTED
a00175d4: e5834018 str r4, [r3, #24] <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a00175d8: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
a00175dc: eb00105d bl a001b758 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a00175e0: e3a00000 mov r0, #0
a00175e4: ea000001 b a00175f0 <rtems_signal_send+0xb4>
}
_Thread_Enable_dispatch();
a00175e8: eb00105a bl a001b758 <_Thread_Enable_dispatch>
return RTEMS_NOT_DEFINED;
a00175ec: e3a0000b mov r0, #11
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a00175f0: e8bd8018 pop {r3, r4, pc}
a0005944 <rtems_stack_checker_is_blown>:
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
a0005944: e59f307c ldr r3, [pc, #124] ; a00059c8 <rtems_stack_checker_is_blown+0x84>
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
a0005948: e92d4810 push {r4, fp, lr}
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
a000594c: e5933004 ldr r3, [r3, #4]
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
a0005950: e28db008 add fp, sp, #8
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
a0005954: e59300b8 ldr r0, [r3, #184] ; 0xb8
a0005958: e15b0000 cmp fp, r0
return false;
a000595c: 33a04000 movcc r4, #0
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
a0005960: 3a000004 bcc a0005978 <rtems_stack_checker_is_blown+0x34>
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
a0005964: e59340b4 ldr r4, [r3, #180] ; 0xb4
a0005968: e0804004 add r4, r0, r4
}
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
a000596c: e15b0004 cmp fp, r4
a0005970: 83a04000 movhi r4, #0
a0005974: 93a04001 movls r4, #1
/*
* The stack checker must be initialized before the pattern is there
* to check.
*/
if ( Stack_check_Initialized ) {
a0005978: e59f304c ldr r3, [pc, #76] ; a00059cc <rtems_stack_checker_is_blown+0x88>
a000597c: e5933008 ldr r3, [r3, #8]
a0005980: e3530000 cmp r3, #0
*/
bool rtems_stack_checker_is_blown( void )
{
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
bool sp_ok;
bool pattern_ok = true;
a0005984: 03a01001 moveq r1, #1
/*
* The stack checker must be initialized before the pattern is there
* to check.
*/
if ( Stack_check_Initialized ) {
a0005988: 0a000005 beq a00059a4 <rtems_stack_checker_is_blown+0x60>
pattern_ok = (!memcmp(
a000598c: e59f103c ldr r1, [pc, #60] ; a00059d0 <rtems_stack_checker_is_blown+0x8c>
a0005990: e2800008 add r0, r0, #8
a0005994: e3a02010 mov r2, #16
a0005998: eb002c4e bl a0010ad8 <memcmp>
a000599c: e2701001 rsbs r1, r0, #1
a00059a0: 33a01000 movcc r1, #0
/*
* Let's report as much as we can.
*/
if ( !sp_ok || !pattern_ok ) {
a00059a4: e3540000 cmp r4, #0
a00059a8: 0a000001 beq a00059b4 <rtems_stack_checker_is_blown+0x70>
a00059ac: e3510000 cmp r1, #0
a00059b0: 1a000002 bne a00059c0 <rtems_stack_checker_is_blown+0x7c>
Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
a00059b4: e59f300c ldr r3, [pc, #12] ; a00059c8 <rtems_stack_checker_is_blown+0x84><== NOT EXECUTED
a00059b8: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED
a00059bc: ebffff9b bl a0005830 <Stack_check_report_blown_task> <== NOT EXECUTED
/*
* The Stack Pointer and the Pattern Area are OK so return false.
*/
return false;
}
a00059c0: e3a00000 mov r0, #0
a00059c4: e8bd8810 pop {r4, fp, pc}
a0005a2c <rtems_stack_checker_report_usage>:
}
void rtems_stack_checker_report_usage( void )
{
rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin );
a0005a2c: e59f1004 ldr r1, [pc, #4] ; a0005a38 <rtems_stack_checker_report_usage+0xc><== NOT EXECUTED
a0005a30: e3a00000 mov r0, #0 <== NOT EXECUTED
a0005a34: eaffffe6 b a00059d4 <rtems_stack_checker_report_usage_with_plugin><== NOT EXECUTED
a00059d4 <rtems_stack_checker_report_usage_with_plugin>:
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
a00059d4: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
if ( !print )
a00059d8: e2515000 subs r5, r1, #0 <== NOT EXECUTED
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
a00059dc: e1a06000 mov r6, r0 <== NOT EXECUTED
if ( !print )
a00059e0: 0a00000c beq a0005a18 <rtems_stack_checker_report_usage_with_plugin+0x44><== NOT EXECUTED
return;
print_context = context;
a00059e4: e59f4030 ldr r4, [pc, #48] ; a0005a1c <rtems_stack_checker_report_usage_with_plugin+0x48><== NOT EXECUTED
print_handler = print;
(*print)( context, "Stack usage by thread\n");
a00059e8: e59f1030 ldr r1, [pc, #48] ; a0005a20 <rtems_stack_checker_report_usage_with_plugin+0x4c><== NOT EXECUTED
)
{
if ( !print )
return;
print_context = context;
a00059ec: e5840004 str r0, [r4, #4] <== NOT EXECUTED
print_handler = print;
a00059f0: e5845000 str r5, [r4] <== NOT EXECUTED
(*print)( context, "Stack usage by thread\n");
a00059f4: e12fff35 blx r5 <== NOT EXECUTED
(*print)( context,
a00059f8: e59f1024 ldr r1, [pc, #36] ; a0005a24 <rtems_stack_checker_report_usage_with_plugin+0x50><== NOT EXECUTED
a00059fc: e1a00006 mov r0, r6 <== NOT EXECUTED
a0005a00: e12fff35 blx r5 <== 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 );
a0005a04: e59f001c ldr r0, [pc, #28] ; a0005a28 <rtems_stack_checker_report_usage_with_plugin+0x54><== NOT EXECUTED
a0005a08: eb001312 bl a000a658 <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);
#endif
print_context = NULL;
a0005a0c: e3a03000 mov r3, #0 <== NOT EXECUTED
a0005a10: e5843004 str r3, [r4, #4] <== NOT EXECUTED
print_handler = NULL;
a0005a14: e5843000 str r3, [r4] <== NOT EXECUTED
a0005a18: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
a00058dc <rtems_stack_checker_switch_extension>:
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
a00058dc: e92d4830 push {r4, r5, fp, lr}
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);
a00058e0: e59030b8 ldr r3, [r0, #184] ; 0xb8
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
a00058e4: e28db00c add fp, sp, #12
a00058e8: e1a04000 mov r4, r0
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
a00058ec: e15b0003 cmp fp, r3
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);
a00058f0: e2830008 add r0, r3, #8
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
return false;
a00058f4: 33a05000 movcc r5, #0
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
a00058f8: 3a000004 bcc a0005910 <rtems_stack_checker_switch_extension+0x34>
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
a00058fc: e59450b4 ldr r5, [r4, #180] ; 0xb4
a0005900: e0835005 add r5, r3, r5
}
/*
* rtems_stack_checker_switch_extension
*/
void rtems_stack_checker_switch_extension(
a0005904: e15b0005 cmp fp, r5
a0005908: 83a05000 movhi r5, #0
a000590c: 93a05001 movls r5, #1
/*
* 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,
a0005910: e59f1028 ldr r1, [pc, #40] ; a0005940 <rtems_stack_checker_switch_extension+0x64>
a0005914: e3a02010 mov r2, #16
a0005918: eb002c6e bl a0010ad8 <memcmp>
a000591c: e2701001 rsbs r1, r0, #1
a0005920: 33a01000 movcc r1, #0
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
a0005924: e3550000 cmp r5, #0
a0005928: 0a000001 beq a0005934 <rtems_stack_checker_switch_extension+0x58>
a000592c: e3510000 cmp r1, #0
a0005930: 1a000001 bne a000593c <rtems_stack_checker_switch_extension+0x60>
Stack_check_report_blown_task( running, pattern_ok );
a0005934: e1a00004 mov r0, r4 <== NOT EXECUTED
a0005938: ebffffbc bl a0005830 <Stack_check_report_blown_task> <== NOT EXECUTED
a000593c: e8bd8830 pop {r4, r5, fp, pc}
a000f5b4 <rtems_string_to_pointer>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
a000f5b4: e92d40f1 push {r0, r4, r5, r6, r7, lr}
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
a000f5b8: e2514000 subs r4, r1, #0
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
a000f5bc: e1a05000 mov r5, r0
a000f5c0: e1a06002 mov r6, r2
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
a000f5c4: 03a00009 moveq r0, #9
)
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
a000f5c8: 0a000018 beq a000f630 <rtems_string_to_pointer+0x7c>
return RTEMS_INVALID_ADDRESS;
errno = 0;
a000f5cc: eb0007ab bl a0011480 <__errno>
a000f5d0: e3a03000 mov r3, #0
a000f5d4: e5803000 str r3, [r0]
*n = 0;
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
a000f5d8: e1a0100d mov r1, sp
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
a000f5dc: e5843000 str r3, [r4]
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
a000f5e0: e1a00005 mov r0, r5
a000f5e4: e3a02010 mov r2, #16
a000f5e8: eb0014d3 bl a001493c <strtoul>
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
a000f5ec: e3560000 cmp r6, #0
*endptr = end;
a000f5f0: 159d3000 ldrne r3, [sp]
*n = 0;
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
a000f5f4: e1a07000 mov r7, r0
result = STRING_TO_METHOD( s, &end, base );
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
*endptr = end;
a000f5f8: 15863000 strne r3, [r6]
/* nothing was converted */
if ( end == s )
a000f5fc: e59d3000 ldr r3, [sp]
a000f600: e1530005 cmp r3, r5
return RTEMS_NOT_DEFINED;
a000f604: 03a0000b moveq r0, #11
/* If the user wants the end pointer back, then return it. */
if ( endptr )
*endptr = end;
/* nothing was converted */
if ( end == s )
a000f608: 0a000008 beq a000f630 <rtems_string_to_pointer+0x7c>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
a000f60c: e3770001 cmn r7, #1
a000f610: 1a000004 bne a000f628 <rtems_string_to_pointer+0x74>
a000f614: eb000799 bl a0011480 <__errno> <== NOT EXECUTED
a000f618: e5903000 ldr r3, [r0] <== NOT EXECUTED
a000f61c: e3530022 cmp r3, #34 ; 0x22 <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
a000f620: 03a0000a moveq r0, #10 <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
a000f624: 0a000001 beq a000f630 <rtems_string_to_pointer+0x7c> <== NOT EXECUTED
if ( (result == STRING_TO_MIN) && (errno == ERANGE))
return RTEMS_INVALID_NUMBER;
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
a000f628: e5847000 str r7, [r4]
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
a000f62c: e3a00000 mov r0, #0
}
a000f630: e8bd80f8 pop {r3, r4, r5, r6, r7, pc}
a0005d04 <rtems_tarfs_load>:
int rtems_tarfs_load(
char *mountpoint,
uint8_t *tar_image,
size_t tar_size
)
{
a0005d04: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
a0005d08: e24ddf6b sub sp, sp, #428 ; 0x1ac
a0005d0c: e58d1010 str r1, [sp, #16]
a0005d10: e58d2018 str r2, [sp, #24]
a0005d14: e58d000c str r0, [sp, #12]
int offset;
unsigned long nblocks;
IMFS_jnode_t *node;
int status;
status = rtems_filesystem_evaluate_path(
a0005d18: eb003abf bl a001481c <strlen>
a0005d1c: e3a02000 mov r2, #0
a0005d20: e1a01000 mov r1, r0
a0005d24: e28d3f65 add r3, sp, #404 ; 0x194
a0005d28: e59d000c ldr r0, [sp, #12]
a0005d2c: e58d2000 str r2, [sp]
a0005d30: eb00029e bl a00067b0 <rtems_filesystem_evaluate_path>
strlen(mountpoint),
0,
&root_loc,
0
);
if (status != 0)
a0005d34: e2504000 subs r4, r0, #0
a0005d38: 1a00006d bne a0005ef4 <rtems_tarfs_load+0x1f0>
return -1;
if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops)
a0005d3c: e59d31a0 ldr r3, [sp, #416] ; 0x1a0
a0005d40: e59f21c4 ldr r2, [pc, #452] ; a0005f0c <rtems_tarfs_load+0x208>
a0005d44: e1530002 cmp r3, r2
a0005d48: 0a000005 beq a0005d64 <rtems_tarfs_load+0x60>
a0005d4c: e59f21bc ldr r2, [pc, #444] ; a0005f10 <rtems_tarfs_load+0x20c>
a0005d50: e1530002 cmp r3, r2
a0005d54: 1a000066 bne a0005ef4 <rtems_tarfs_load+0x1f0>
a0005d58: ea000001 b a0005d64 <rtems_tarfs_load+0x60> <== NOT EXECUTED
a0005d5c: e1a08004 mov r8, r4
a0005d60: ea000006 b a0005d80 <rtems_tarfs_load+0x7c>
* should not have this path.
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
a0005d64: e28d2f65 add r2, sp, #404 ; 0x194
0
);
if (status != 0)
return -1;
if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops)
a0005d68: e1a08004 mov r8, r4
hdr_ptr = (char *) &tar_image[offset];
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
a0005d6c: e28d7f47 add r7, sp, #284 ; 0x11c
* should not have this path.
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
a0005d70: e28d9d06 add r9, sp, #384 ; 0x180
a0005d74: e58d2004 str r2, [sp, #4]
* - 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);
a0005d78: e28d501c add r5, sp, #28
a0005d7c: e1a0a004 mov sl, r4
/*
* Create an IMFS node structure pointing to tar image memory.
*/
offset = 0;
while (1) {
if (offset + 512 > tar_size)
a0005d80: e59d3018 ldr r3, [sp, #24]
a0005d84: e2884c02 add r4, r8, #512 ; 0x200
a0005d88: e1540003 cmp r4, r3
a0005d8c: 8a00005a bhi a0005efc <rtems_tarfs_load+0x1f8>
break;
/*
* Read a header.
*/
hdr_ptr = (char *) &tar_image[offset];
a0005d90: e59de010 ldr lr, [sp, #16]
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
a0005d94: e59f1178 ldr r1, [pc, #376] ; a0005f14 <rtems_tarfs_load+0x210>
a0005d98: e3a02005 mov r2, #5
break;
/*
* Read a header.
*/
hdr_ptr = (char *) &tar_image[offset];
a0005d9c: e08e8008 add r8, lr, r8
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
a0005da0: e2880c01 add r0, r8, #256 ; 0x100
a0005da4: e2800001 add r0, r0, #1
a0005da8: eb003ab3 bl a001487c <strncmp>
a0005dac: e2506000 subs r6, r0, #0
a0005db0: 1a000051 bne a0005efc <rtems_tarfs_load+0x1f8>
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
a0005db4: e3a02063 mov r2, #99 ; 0x63
a0005db8: e1a01008 mov r1, r8
a0005dbc: e1a00007 mov r0, r7
a0005dc0: eb003b0e bl a0014a00 <strncpy>
filename[MAX_NAME_FIELD_SIZE] = '\0';
a0005dc4: e5cd617f strb r6, [sp, #383] ; 0x17f
linkflag = hdr_ptr[156];
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
a0005dc8: e3a01008 mov r1, #8
a0005dcc: e2880064 add r0, r8, #100 ; 0x64
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
filename[MAX_NAME_FIELD_SIZE] = '\0';
linkflag = hdr_ptr[156];
a0005dd0: e5d8609c ldrb r6, [r8, #156] ; 0x9c
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
a0005dd4: eb001d79 bl a000d3c0 <_rtems_octal2ulong>
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
a0005dd8: e3a0100c mov r1, #12
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);
a0005ddc: e58d0014 str r0, [sp, #20]
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
a0005de0: e288007c add r0, r8, #124 ; 0x7c
a0005de4: eb001d75 bl a000d3c0 <_rtems_octal2ulong>
hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8);
a0005de8: e3a01008 mov r1, #8
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);
a0005dec: e1a0b000 mov fp, r0
hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8);
a0005df0: e2880094 add r0, r8, #148 ; 0x94
a0005df4: eb001d71 bl a000d3c0 <_rtems_octal2ulong>
a0005df8: e1a03000 mov r3, r0
if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum)
a0005dfc: e1a00008 mov r0, r8
a0005e00: e58d3008 str r3, [sp, #8]
a0005e04: eb001d7b bl a000d3f8 <_rtems_tar_header_checksum>
a0005e08: e59d3008 ldr r3, [sp, #8]
a0005e0c: e1500003 cmp r0, r3
a0005e10: 1a000039 bne a0005efc <rtems_tarfs_load+0x1f8>
* 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) {
a0005e14: e3560035 cmp r6, #53 ; 0x35
a0005e18: 1a000013 bne a0005e6c <rtems_tarfs_load+0x168>
strcpy(full_filename, mountpoint);
a0005e1c: e59d100c ldr r1, [sp, #12]
a0005e20: e1a00005 mov r0, r5
a0005e24: eb0038b8 bl a001410c <strcpy>
if (full_filename[strlen(full_filename)-1] != '/')
a0005e28: e1a00005 mov r0, r5
a0005e2c: eb003a7a bl a001481c <strlen>
a0005e30: e28d2f6b add r2, sp, #428 ; 0x1ac
a0005e34: e0820000 add r0, r2, r0
a0005e38: e5503191 ldrb r3, [r0, #-401] ; 0x191
a0005e3c: e353002f cmp r3, #47 ; 0x2f
a0005e40: 0a000002 beq a0005e50 <rtems_tarfs_load+0x14c>
strcat(full_filename, "/");
a0005e44: e1a00005 mov r0, r5 <== NOT EXECUTED
a0005e48: e59f10c8 ldr r1, [pc, #200] ; a0005f18 <rtems_tarfs_load+0x214><== NOT EXECUTED
a0005e4c: eb0037f7 bl a0013e30 <strcat> <== NOT EXECUTED
strcat(full_filename, filename);
a0005e50: e1a01007 mov r1, r7
a0005e54: e1a00005 mov r0, r5
a0005e58: eb0037f4 bl a0013e30 <strcat>
mkdir(full_filename, S_IRWXU | S_IRWXG | S_IRWXO);
a0005e5c: e1a00005 mov r0, r5
a0005e60: e59f10b4 ldr r1, [pc, #180] ; a0005f1c <rtems_tarfs_load+0x218>
a0005e64: eb000477 bl a0007048 <mkdir>
a0005e68: eaffffbb b a0005d5c <rtems_tarfs_load+0x58>
* 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) {
a0005e6c: e3560030 cmp r6, #48 ; 0x30
a0005e70: 1affffb9 bne a0005d5c <rtems_tarfs_load+0x58>
const char *name;
loc = root_loc;
a0005e74: e59dc004 ldr ip, [sp, #4]
a0005e78: e1a0e009 mov lr, r9
a0005e7c: e8bc000f ldm ip!, {r0, r1, r2, r3}
a0005e80: e8ae000f stmia lr!, {r0, r1, r2, r3}
a0005e84: e59c2000 ldr r2, [ip]
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
a0005e88: e1a00007 mov r0, r7
a0005e8c: e1a01009 mov r1, r9
* should not have this path.
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
a0005e90: e58e2000 str r2, [lr]
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
a0005e94: e28d2f6a add r2, sp, #424 ; 0x1a8
a0005e98: eb002021 bl a000df24 <IMFS_evaluate_for_make>
a0005e9c: e2506000 subs r6, r0, #0
a0005ea0: 1a00000d bne a0005edc <rtems_tarfs_load+0x1d8>
node = IMFS_create_node(
&loc,
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
a0005ea4: e59d2014 ldr r2, [sp, #20]
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
node = IMFS_create_node(
a0005ea8: e1a00009 mov r0, r9
a0005eac: e3a01006 mov r1, #6
&loc,
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
a0005eb0: e1a03b82 lsl r3, r2, #23
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
node = IMFS_create_node(
a0005eb4: e59d21a8 ldr r2, [sp, #424] ; 0x1a8
&loc,
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
a0005eb8: e1a03ba3 lsr r3, r3, #23
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
node = IMFS_create_node(
a0005ebc: e3833902 orr r3, r3, #32768 ; 0x8000
a0005ec0: e58d6000 str r6, [sp]
a0005ec4: eb001e94 bl a000d91c <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];
a0005ec8: e59d2010 ldr r2, [sp, #16]
&loc,
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
NULL
);
node->info.linearfile.size = file_size;
a0005ecc: e580b050 str fp, [r0, #80] ; 0x50
a0005ed0: e5806054 str r6, [r0, #84] ; 0x54
node->info.linearfile.direct = &tar_image[offset];
a0005ed4: e0823004 add r3, r2, r4
a0005ed8: e5803058 str r3, [r0, #88] ; 0x58
}
nblocks = (((file_size) + 511) & ~511) / 512;
a0005edc: e28bbf7f add fp, fp, #508 ; 0x1fc
a0005ee0: e28bb003 add fp, fp, #3
offset += 512 * nblocks;
a0005ee4: e3cbbf7f bic fp, fp, #508 ; 0x1fc
a0005ee8: e3cbb003 bic fp, fp, #3
a0005eec: e08b4004 add r4, fp, r4
a0005ef0: eaffff99 b a0005d5c <rtems_tarfs_load+0x58>
);
if (status != 0)
return -1;
if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops)
return -1;
a0005ef4: e3e04000 mvn r4, #0
a0005ef8: ea000000 b a0005f00 <rtems_tarfs_load+0x1fc>
a0005efc: e1a0400a mov r4, sl
nblocks = (((file_size) + 511) & ~511) / 512;
offset += 512 * nblocks;
}
}
return status;
}
a0005f00: e1a00004 mov r0, r4
a0005f04: e28ddf6b add sp, sp, #428 ; 0x1ac
a0005f08: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
a000b5e0 <rtems_task_get_note>:
rtems_status_code rtems_task_get_note(
rtems_id id,
uint32_t notepad,
uint32_t *note
)
{
a000b5e0: e92d4071 push {r0, r4, r5, r6, lr}
a000b5e4: e1a05002 mov r5, r2
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
a000b5e8: e59f209c ldr r2, [pc, #156] ; a000b68c <rtems_task_get_note+0xac>
rtems_status_code rtems_task_get_note(
rtems_id id,
uint32_t notepad,
uint32_t *note
)
{
a000b5ec: e1a03000 mov r3, r0
a000b5f0: e1a04001 mov r4, r1
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
a000b5f4: e5d22004 ldrb r2, [r2, #4]
a000b5f8: e3520000 cmp r2, #0
return RTEMS_NOT_CONFIGURED;
a000b5fc: 03a00016 moveq r0, #22
{
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
a000b600: 0a000020 beq a000b688 <rtems_task_get_note+0xa8>
return RTEMS_NOT_CONFIGURED;
if ( !note )
a000b604: e3550000 cmp r5, #0
return RTEMS_INVALID_ADDRESS;
a000b608: 03a00009 moveq r0, #9
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
return RTEMS_NOT_CONFIGURED;
if ( !note )
a000b60c: 0a00001d beq a000b688 <rtems_task_get_note+0xa8>
/*
* NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would
* be checking an unsigned number for being negative.
*/
if ( notepad > RTEMS_NOTEPAD_LAST )
a000b610: e351000f cmp r1, #15
return RTEMS_INVALID_NUMBER;
a000b614: 83a0000a movhi r0, #10
/*
* NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would
* be checking an unsigned number for being negative.
*/
if ( notepad > RTEMS_NOTEPAD_LAST )
a000b618: 8a00001a bhi a000b688 <rtems_task_get_note+0xa8>
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
a000b61c: e3530000 cmp r3, #0
a000b620: 0a000004 beq a000b638 <rtems_task_get_note+0x58>
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
a000b624: e59f2064 ldr r2, [pc, #100] ; a000b690 <rtems_task_get_note+0xb0>
a000b628: e5922004 ldr r2, [r2, #4]
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
a000b62c: e5922008 ldr r2, [r2, #8]
a000b630: e1530002 cmp r3, r2
a000b634: 1a000007 bne a000b658 <rtems_task_get_note+0x78>
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
a000b638: e59f3050 ldr r3, [pc, #80] ; a000b690 <rtems_task_get_note+0xb0><== NOT EXECUTED
*note = api->Notepads[ notepad ];
a000b63c: e2844008 add r4, r4, #8 <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a000b640: e3a00000 mov r0, #0 <== NOT EXECUTED
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
a000b644: e5933004 ldr r3, [r3, #4] <== NOT EXECUTED
*note = api->Notepads[ notepad ];
a000b648: e59330f4 ldr r3, [r3, #244] ; 0xf4 <== NOT EXECUTED
a000b64c: e7933104 ldr r3, [r3, r4, lsl #2] <== NOT EXECUTED
a000b650: e5853000 str r3, [r5] <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a000b654: ea00000b b a000b688 <rtems_task_get_note+0xa8> <== NOT EXECUTED
}
the_thread = _Thread_Get( id, &location );
a000b658: e1a0100d mov r1, sp
a000b65c: eb000881 bl a000d868 <_Thread_Get>
switch ( location ) {
a000b660: e59d6000 ldr r6, [sp]
a000b664: e3560000 cmp r6, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a000b668: 13a00004 movne r0, #4
*note = api->Notepads[ notepad ];
return RTEMS_SUCCESSFUL;
}
the_thread = _Thread_Get( id, &location );
switch ( location ) {
a000b66c: 1a000005 bne a000b688 <rtems_task_get_note+0xa8>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
*note = api->Notepads[ notepad ];
a000b670: e59030f4 ldr r3, [r0, #244] ; 0xf4
a000b674: e2844008 add r4, r4, #8
a000b678: e7933104 ldr r3, [r3, r4, lsl #2]
a000b67c: e5853000 str r3, [r5]
_Thread_Enable_dispatch();
a000b680: eb00086f bl a000d844 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000b684: e1a00006 mov r0, r6
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a000b688: e8bd8078 pop {r3, r4, r5, r6, pc}
a0009754 <rtems_task_ident>:
rtems_id *id
)
{
Objects_Name_or_id_lookup_errors status;
if ( !id )
a0009754: e2523000 subs r3, r2, #0
rtems_status_code rtems_task_ident(
rtems_name name,
uint32_t node,
rtems_id *id
)
{
a0009758: e92d4010 push {r4, lr}
a000975c: e1a0c000 mov ip, r0
a0009760: e1a04001 mov r4, r1
Objects_Name_or_id_lookup_errors status;
if ( !id )
a0009764: 0a00000d beq a00097a0 <rtems_task_ident+0x4c>
return RTEMS_INVALID_ADDRESS;
if ( name == OBJECTS_ID_OF_SELF ) {
a0009768: e3500000 cmp r0, #0
a000976c: 1a000004 bne a0009784 <rtems_task_ident+0x30>
*id = _Thread_Executing->Object.id;
a0009770: e59f2030 ldr r2, [pc, #48] ; a00097a8 <rtems_task_ident+0x54>
a0009774: e5922004 ldr r2, [r2, #4]
a0009778: e5922008 ldr r2, [r2, #8]
a000977c: e5832000 str r2, [r3]
return RTEMS_SUCCESSFUL;
a0009780: e8bd8010 pop {r4, pc}
}
status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id );
a0009784: e59f0020 ldr r0, [pc, #32] ; a00097ac <rtems_task_ident+0x58>
a0009788: e1a0100c mov r1, ip
a000978c: e1a02004 mov r2, r4
a0009790: eb000524 bl a000ac28 <_Objects_Name_to_id_u32>
return _Status_Object_name_errors_to_status[ status ];
a0009794: e59f3014 ldr r3, [pc, #20] ; a00097b0 <rtems_task_ident+0x5c>
a0009798: e7930100 ldr r0, [r3, r0, lsl #2]
a000979c: e8bd8010 pop {r4, pc}
)
{
Objects_Name_or_id_lookup_errors status;
if ( !id )
return RTEMS_INVALID_ADDRESS;
a00097a0: e3a00009 mov r0, #9 <== NOT EXECUTED
}
status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id );
return _Status_Object_name_errors_to_status[ status ];
}
a00097a4: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a001794c <rtems_task_is_suspended>:
*/
rtems_status_code rtems_task_is_suspended(
rtems_id id
)
{
a001794c: e92d4011 push {r0, r4, lr}
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
a0017950: e1a0100d mov r1, sp
a0017954: eb000f88 bl a001b77c <_Thread_Get>
switch ( location ) {
a0017958: e59d3000 ldr r3, [sp]
a001795c: e3530000 cmp r3, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a0017960: 13a00004 movne r0, #4
{
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
switch ( location ) {
a0017964: 1a000007 bne a0017988 <rtems_task_is_suspended+0x3c>
*/
RTEMS_INLINE_ROUTINE bool _States_Is_suspended (
States_Control the_states
)
{
return (the_states & STATES_SUSPENDED);
a0017968: e5904010 ldr r4, [r0, #16]
case OBJECTS_LOCAL:
if ( !_States_Is_suspended( the_thread->current_state ) ) {
a001796c: e2144002 ands r4, r4, #2 <== NOT EXECUTED
a0017970: 1a000002 bne a0017980 <rtems_task_is_suspended+0x34> <== NOT EXECUTED
_Thread_Enable_dispatch();
a0017974: eb000f77 bl a001b758 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a0017978: e1a00004 mov r0, r4 <== NOT EXECUTED
a001797c: ea000001 b a0017988 <rtems_task_is_suspended+0x3c> <== NOT EXECUTED
}
_Thread_Enable_dispatch();
a0017980: eb000f74 bl a001b758 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_ALREADY_SUSPENDED;
a0017984: e3a0000f mov r0, #15 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a0017988: e8bd8018 pop {r3, r4, pc}
a000fe2c <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
a000fe2c: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
a000fe30: e252a000 subs sl, r2, #0
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
a000fe34: e1a04000 mov r4, r0
a000fe38: e1a05001 mov r5, r1
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
a000fe3c: 0a00004f beq a000ff80 <rtems_task_mode+0x154>
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
a000fe40: e59f3144 ldr r3, [pc, #324] ; a000ff8c <rtems_task_mode+0x160>
a000fe44: e5937004 ldr r7, [r3, #4]
api = executing->API_Extensions[ THREAD_API_RTEMS ];
a000fe48: e59760f4 ldr r6, [r7, #244] ; 0xf4
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
a000fe4c: e5d78074 ldrb r8, [r7, #116] ; 0x74
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
a000fe50: e597307c ldr r3, [r7, #124] ; 0x7c
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
a000fe54: e5d69008 ldrb r9, [r6, #8]
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
a000fe58: e3580000 cmp r8, #0
a000fe5c: 03a08c01 moveq r8, #256 ; 0x100
a000fe60: 13a08000 movne r8, #0
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
a000fe64: e3530000 cmp r3, #0
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
a000fe68: 13888c02 orrne r8, r8, #512 ; 0x200
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
a000fe6c: e3590000 cmp r9, #0
a000fe70: 03a09b01 moveq r9, #1024 ; 0x400
a000fe74: 13a09000 movne r9, #0
old_mode |= _ISR_Get_level();
a000fe78: ebfff314 bl a000cad0 <_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;
a000fe7c: e1899000 orr r9, r9, r0
old_mode |= _ISR_Get_level();
a000fe80: e1898008 orr r8, r9, r8
*previous_mode_set = old_mode;
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
a000fe84: e3150c01 tst r5, #256 ; 0x100
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
old_mode |= _ISR_Get_level();
*previous_mode_set = old_mode;
a000fe88: e58a8000 str r8, [sl]
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
a000fe8c: 0a000003 beq a000fea0 <rtems_task_mode+0x74>
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
a000fe90: e3140c01 tst r4, #256 ; 0x100
a000fe94: 13a03000 movne r3, #0
a000fe98: 03a03001 moveq r3, #1
a000fe9c: e5c73074 strb r3, [r7, #116] ; 0x74
if ( mask & RTEMS_TIMESLICE_MASK ) {
a000fea0: e3150c02 tst r5, #512 ; 0x200
a000fea4: 0a000006 beq a000fec4 <rtems_task_mode+0x98>
if ( _Modes_Is_timeslice(mode_set) ) {
a000fea8: e2143c02 ands r3, r4, #512 ; 0x200
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
a000feac: 13a03001 movne r3, #1
a000feb0: 1587307c strne r3, [r7, #124] ; 0x7c
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
a000feb4: 159f30d4 ldrne r3, [pc, #212] ; a000ff90 <rtems_task_mode+0x164>
} else
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
a000feb8: 0587307c streq r3, [r7, #124] ; 0x7c
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;
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
a000febc: 15933000 ldrne r3, [r3]
a000fec0: 15873078 strne r3, [r7, #120] ; 0x78
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
a000fec4: e3150080 tst r5, #128 ; 0x80
a000fec8: 0a000001 beq a000fed4 <rtems_task_mode+0xa8>
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
a000fecc: e2040080 and r0, r4, #128 ; 0x80
a000fed0: ebfff2f9 bl a000cabc <_CPU_ISR_Set_level>
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
a000fed4: e2150b01 ands r0, r5, #1024 ; 0x400
a000fed8: 0a000013 beq a000ff2c <rtems_task_mode+0x100>
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
a000fedc: e5d62008 ldrb r2, [r6, #8]
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
a000fee0: e3140b01 tst r4, #1024 ; 0x400
a000fee4: 13a03000 movne r3, #0
a000fee8: 03a03001 moveq r3, #1
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 ) {
a000feec: e1520003 cmp r2, r3
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
a000fef0: 03a00000 moveq r0, #0
if ( mask & RTEMS_ASR_MASK ) {
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
a000fef4: 0a00000c beq a000ff2c <rtems_task_mode+0x100>
asr->is_enabled = is_asr_enabled;
a000fef8: e5c63008 strb r3, [r6, #8]
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000fefc: e10f3000 mrs r3, CPSR
a000ff00: e3832080 orr r2, r3, #128 ; 0x80
a000ff04: e129f002 msr CPSR_fc, r2
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
_signals = information->signals_pending;
a000ff08: e5962018 ldr r2, [r6, #24]
information->signals_pending = information->signals_posted;
a000ff0c: e5961014 ldr r1, [r6, #20]
information->signals_posted = _signals;
a000ff10: e5862014 str r2, [r6, #20]
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
_signals = information->signals_pending;
information->signals_pending = information->signals_posted;
a000ff14: e5861018 str r1, [r6, #24]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000ff18: e129f003 msr CPSR_fc, r3
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
a000ff1c: e5960014 ldr r0, [r6, #20]
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
a000ff20: e3500000 cmp r0, #0
a000ff24: 13a00001 movne r0, #1
a000ff28: 03a00000 moveq r0, #0
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
a000ff2c: e59f3060 ldr r3, [pc, #96] ; a000ff94 <rtems_task_mode+0x168>
a000ff30: e5933000 ldr r3, [r3]
a000ff34: e3530003 cmp r3, #3
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
a000ff38: 13a00000 movne r0, #0
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
a000ff3c: 1a000011 bne a000ff88 <rtems_task_mode+0x15c>
bool are_signals_pending
)
{
Thread_Control *executing;
executing = _Thread_Executing;
a000ff40: e59f2044 ldr r2, [pc, #68] ; a000ff8c <rtems_task_mode+0x160>
if ( are_signals_pending ||
a000ff44: e3500000 cmp r0, #0
bool are_signals_pending
)
{
Thread_Control *executing;
executing = _Thread_Executing;
a000ff48: e5923004 ldr r3, [r2, #4]
if ( are_signals_pending ||
a000ff4c: 1a000005 bne a000ff68 <rtems_task_mode+0x13c>
a000ff50: e5922008 ldr r2, [r2, #8]
a000ff54: e1530002 cmp r3, r2
a000ff58: 0a00000a beq a000ff88 <rtems_task_mode+0x15c>
(!_Thread_Is_heir( executing ) && executing->is_preemptible) ) {
a000ff5c: e5d33074 ldrb r3, [r3, #116] ; 0x74
a000ff60: e3530000 cmp r3, #0
a000ff64: 0a000007 beq a000ff88 <rtems_task_mode+0x15c>
_Thread_Dispatch_necessary = true;
a000ff68: e59f301c ldr r3, [pc, #28] ; a000ff8c <rtems_task_mode+0x160>
a000ff6c: e3a02001 mov r2, #1
a000ff70: e5c32010 strb r2, [r3, #16]
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
a000ff74: ebffed65 bl a000b510 <_Thread_Dispatch>
}
return RTEMS_SUCCESSFUL;
a000ff78: e3a00000 mov r0, #0
a000ff7c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
a000ff80: e3a00009 mov r0, #9 <== NOT EXECUTED
a000ff84: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
}
a000ff88: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
a000c914 <rtems_task_resume>:
*/
rtems_status_code rtems_task_resume(
rtems_id id
)
{
a000c914: e92d4011 push {r0, r4, lr}
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
a000c918: e1a0100d mov r1, sp
a000c91c: eb000797 bl a000e780 <_Thread_Get>
switch ( location ) {
a000c920: e59d4000 ldr r4, [sp]
)
{
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
a000c924: e1a03000 mov r3, r0
switch ( location ) {
a000c928: e3540000 cmp r4, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a000c92c: 13a00004 movne r0, #4
{
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
switch ( location ) {
a000c930: 1a000009 bne a000c95c <rtems_task_resume+0x48>
*/
RTEMS_INLINE_ROUTINE bool _States_Is_suspended (
States_Control the_states
)
{
return (the_states & STATES_SUSPENDED);
a000c934: e5933010 ldr r3, [r3, #16]
case OBJECTS_LOCAL:
if ( _States_Is_suspended( the_thread->current_state ) ) {
a000c938: e3130002 tst r3, #2
a000c93c: 0a000004 beq a000c954 <rtems_task_resume+0x40>
_Thread_Resume( the_thread, true );
a000c940: e3a01001 mov r1, #1
a000c944: eb00098b bl a000ef78 <_Thread_Resume>
_Thread_Enable_dispatch();
a000c948: eb000783 bl a000e75c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000c94c: e1a00004 mov r0, r4
a000c950: ea000001 b a000c95c <rtems_task_resume+0x48>
}
_Thread_Enable_dispatch();
a000c954: eb000780 bl a000e75c <_Thread_Enable_dispatch>
return RTEMS_INCORRECT_STATE;
a000c958: e3a0000e mov r0, #14
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a000c95c: e8bd8018 pop {r3, r4, pc}
a000b774 <rtems_task_set_note>:
rtems_status_code rtems_task_set_note(
rtems_id id,
uint32_t notepad,
uint32_t note
)
{
a000b774: e92d4071 push {r0, r4, r5, r6, lr}
a000b778: e1a05002 mov r5, r2
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
a000b77c: e59f2088 ldr r2, [pc, #136] ; a000b80c <rtems_task_set_note+0x98>
rtems_status_code rtems_task_set_note(
rtems_id id,
uint32_t notepad,
uint32_t note
)
{
a000b780: e1a03000 mov r3, r0
a000b784: e1a04001 mov r4, r1
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
a000b788: e5d22004 ldrb r2, [r2, #4]
a000b78c: e3520000 cmp r2, #0
return RTEMS_NOT_CONFIGURED;
a000b790: 03a00016 moveq r0, #22
{
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
a000b794: 0a00001b beq a000b808 <rtems_task_set_note+0x94>
/*
* NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would
* be checking an unsigned number for being negative.
*/
if ( notepad > RTEMS_NOTEPAD_LAST )
a000b798: e351000f cmp r1, #15
return RTEMS_INVALID_NUMBER;
a000b79c: 83a0000a movhi r0, #10
/*
* NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would
* be checking an unsigned number for being negative.
*/
if ( notepad > RTEMS_NOTEPAD_LAST )
a000b7a0: 8a000018 bhi a000b808 <rtems_task_set_note+0x94>
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
a000b7a4: e3530000 cmp r3, #0
a000b7a8: 0a000004 beq a000b7c0 <rtems_task_set_note+0x4c>
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
a000b7ac: e59f205c ldr r2, [pc, #92] ; a000b810 <rtems_task_set_note+0x9c>
a000b7b0: e5922004 ldr r2, [r2, #4]
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
a000b7b4: e5922008 ldr r2, [r2, #8]
a000b7b8: e1530002 cmp r3, r2
a000b7bc: 1a000006 bne a000b7dc <rtems_task_set_note+0x68>
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
a000b7c0: e59f3048 ldr r3, [pc, #72] ; a000b810 <rtems_task_set_note+0x9c><== NOT EXECUTED
api->Notepads[ notepad ] = note;
a000b7c4: e2844008 add r4, r4, #8 <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a000b7c8: e3a00000 mov r0, #0 <== NOT EXECUTED
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
a000b7cc: e5933004 ldr r3, [r3, #4] <== NOT EXECUTED
api->Notepads[ notepad ] = note;
a000b7d0: e59330f4 ldr r3, [r3, #244] ; 0xf4 <== NOT EXECUTED
a000b7d4: e7835104 str r5, [r3, r4, lsl #2] <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a000b7d8: ea00000a b a000b808 <rtems_task_set_note+0x94> <== NOT EXECUTED
}
the_thread = _Thread_Get( id, &location );
a000b7dc: e1a0100d mov r1, sp
a000b7e0: eb000820 bl a000d868 <_Thread_Get>
switch ( location ) {
a000b7e4: e59d6000 ldr r6, [sp]
a000b7e8: e3560000 cmp r6, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a000b7ec: 13a00004 movne r0, #4
api->Notepads[ notepad ] = note;
return RTEMS_SUCCESSFUL;
}
the_thread = _Thread_Get( id, &location );
switch ( location ) {
a000b7f0: 1a000004 bne a000b808 <rtems_task_set_note+0x94>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
api->Notepads[ notepad ] = note;
a000b7f4: e59030f4 ldr r3, [r0, #244] ; 0xf4
a000b7f8: e2844008 add r4, r4, #8
a000b7fc: e7835104 str r5, [r3, r4, lsl #2]
_Thread_Enable_dispatch();
a000b800: eb00080f bl a000d844 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000b804: e1a00006 mov r0, r6
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a000b808: e8bd8078 pop {r3, r4, r5, r6, pc}
a000d9c4 <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
a000d9c4: e92d4031 push {r0, r4, r5, lr}
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
a000d9c8: e2514000 subs r4, r1, #0
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
a000d9cc: e1a05002 mov r5, r2
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
a000d9d0: 0a000004 beq a000d9e8 <rtems_task_set_priority+0x24>
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 ) );
a000d9d4: e59f3074 ldr r3, [pc, #116] ; a000da50 <rtems_task_set_priority+0x8c>
a000d9d8: e5d33000 ldrb r3, [r3]
a000d9dc: e1540003 cmp r4, r3
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
a000d9e0: 83a00013 movhi r0, #19
)
{
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
a000d9e4: 8a000018 bhi a000da4c <rtems_task_set_priority+0x88>
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
a000d9e8: e3550000 cmp r5, #0
return RTEMS_INVALID_ADDRESS;
a000d9ec: 03a00009 moveq r0, #9
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
a000d9f0: 0a000015 beq a000da4c <rtems_task_set_priority+0x88>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
a000d9f4: e1a0100d mov r1, sp
a000d9f8: eb000816 bl a000fa58 <_Thread_Get>
switch ( location ) {
a000d9fc: e59d3000 ldr r3, [sp]
a000da00: e3530000 cmp r3, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a000da04: 13a00004 movne r0, #4
if ( !old_priority )
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
switch ( location ) {
a000da08: 1a00000f bne a000da4c <rtems_task_set_priority+0x88>
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
a000da0c: e5903014 ldr r3, [r0, #20]
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
a000da10: e3540000 cmp r4, #0
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
a000da14: e5853000 str r3, [r5]
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
a000da18: 0a000009 beq a000da44 <rtems_task_set_priority+0x80>
the_thread->real_priority = new_priority;
if ( the_thread->resource_count == 0 ||
a000da1c: e590301c ldr r3, [r0, #28]
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
the_thread->real_priority = new_priority;
a000da20: e5804018 str r4, [r0, #24]
if ( the_thread->resource_count == 0 ||
a000da24: e3530000 cmp r3, #0
a000da28: 0a000002 beq a000da38 <rtems_task_set_priority+0x74>
a000da2c: e5903014 ldr r3, [r0, #20]
a000da30: e1530004 cmp r3, r4 <== NOT EXECUTED
a000da34: 9a000002 bls a000da44 <rtems_task_set_priority+0x80> <== NOT EXECUTED
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, false );
a000da38: e1a01004 mov r1, r4
a000da3c: e3a02000 mov r2, #0
a000da40: eb0006d5 bl a000f59c <_Thread_Change_priority>
}
_Thread_Enable_dispatch();
a000da44: eb0007fa bl a000fa34 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000da48: e3a00000 mov r0, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a000da4c: e8bd8038 pop {r3, r4, r5, pc}
a0009834 <rtems_task_start>:
rtems_status_code rtems_task_start(
rtems_id id,
rtems_task_entry entry_point,
rtems_task_argument argument
)
{
a0009834: e92d4073 push {r0, r1, r4, r5, r6, lr}
register Thread_Control *the_thread;
Objects_Locations location;
if ( entry_point == NULL )
a0009838: e2515000 subs r5, r1, #0
rtems_status_code rtems_task_start(
rtems_id id,
rtems_task_entry entry_point,
rtems_task_argument argument
)
{
a000983c: e1a06002 mov r6, r2
register Thread_Control *the_thread;
Objects_Locations location;
if ( entry_point == NULL )
return RTEMS_INVALID_ADDRESS;
a0009840: 03a00009 moveq r0, #9
)
{
register Thread_Control *the_thread;
Objects_Locations location;
if ( entry_point == NULL )
a0009844: 0a000011 beq a0009890 <rtems_task_start+0x5c>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
a0009848: e28d1004 add r1, sp, #4
a000984c: eb00077c bl a000b644 <_Thread_Get>
switch ( location ) {
a0009850: e59d4004 ldr r4, [sp, #4]
a0009854: e3540000 cmp r4, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a0009858: 13a00004 movne r0, #4
if ( entry_point == NULL )
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
switch ( location ) {
a000985c: 1a00000b bne a0009890 <rtems_task_start+0x5c>
case OBJECTS_LOCAL:
if ( _Thread_Start(
a0009860: e1a01004 mov r1, r4
a0009864: e1a02005 mov r2, r5
a0009868: e1a03004 mov r3, r4
a000986c: e58d6000 str r6, [sp]
a0009870: eb0009e2 bl a000c000 <_Thread_Start>
a0009874: e3500000 cmp r0, #0
a0009878: 0a000002 beq a0009888 <rtems_task_start+0x54>
the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) {
_Thread_Enable_dispatch();
a000987c: eb000767 bl a000b620 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a0009880: e1a00004 mov r0, r4
a0009884: ea000001 b a0009890 <rtems_task_start+0x5c>
}
_Thread_Enable_dispatch();
a0009888: eb000764 bl a000b620 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_INCORRECT_STATE;
a000988c: e3a0000e mov r0, #14 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a0009890: e8bd807c pop {r2, r3, r4, r5, r6, pc}
a000cb78 <rtems_task_suspend>:
*/
rtems_status_code rtems_task_suspend(
rtems_id id
)
{
a000cb78: e92d4011 push {r0, r4, lr}
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
a000cb7c: e1a0100d mov r1, sp
a000cb80: eb000767 bl a000e924 <_Thread_Get>
switch ( location ) {
a000cb84: e59d2000 ldr r2, [sp]
)
{
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
a000cb88: e1a03000 mov r3, r0
switch ( location ) {
a000cb8c: e3520000 cmp r2, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a000cb90: 13a00004 movne r0, #4
{
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
switch ( location ) {
a000cb94: 1a000008 bne a000cbbc <rtems_task_suspend+0x44>
*/
RTEMS_INLINE_ROUTINE bool _States_Is_suspended (
States_Control the_states
)
{
return (the_states & STATES_SUSPENDED);
a000cb98: e5934010 ldr r4, [r3, #16]
case OBJECTS_LOCAL:
if ( !_States_Is_suspended( the_thread->current_state ) ) {
a000cb9c: e2144002 ands r4, r4, #2
a000cba0: 1a000003 bne a000cbb4 <rtems_task_suspend+0x3c>
_Thread_Suspend( the_thread );
a000cba4: eb0009e0 bl a000f32c <_Thread_Suspend>
_Thread_Enable_dispatch();
a000cba8: eb000754 bl a000e900 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000cbac: e1a00004 mov r0, r4
a000cbb0: ea000001 b a000cbbc <rtems_task_suspend+0x44>
}
_Thread_Enable_dispatch();
a000cbb4: eb000751 bl a000e900 <_Thread_Enable_dispatch>
return RTEMS_ALREADY_SUSPENDED;
a000cbb8: e3a0000f mov r0, #15
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a000cbbc: e8bd8018 pop {r3, r4, pc}
a000a550 <rtems_task_variable_add>:
rtems_status_code rtems_task_variable_add(
rtems_id tid,
void **ptr,
void (*dtor)(void *)
)
{
a000a550: e92d40f1 push {r0, r4, r5, r6, r7, lr}
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *new;
if ( !ptr )
a000a554: e2514000 subs r4, r1, #0
rtems_status_code rtems_task_variable_add(
rtems_id tid,
void **ptr,
void (*dtor)(void *)
)
{
a000a558: e1a05002 mov r5, r2
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *new;
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
a000a55c: 03a00009 moveq r0, #9
{
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *new;
if ( !ptr )
a000a560: 0a000023 beq a000a5f4 <rtems_task_variable_add+0xa4>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
a000a564: e1a0100d mov r1, sp
a000a568: eb0007b7 bl a000c44c <_Thread_Get>
switch (location) {
a000a56c: e59d3000 ldr r3, [sp]
rtems_task_variable_t *tvp, *new;
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
a000a570: e1a07000 mov r7, r0
switch (location) {
a000a574: e3530000 cmp r3, #0
case OBJECTS_LOCAL:
/*
* Figure out if the variable is already in this task's list.
*/
tvp = the_thread->task_variables;
a000a578: 05906100 ldreq r6, [r0, #256] ; 0x100
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
switch (location) {
a000a57c: 0a000008 beq a000a5a4 <rtems_task_variable_add+0x54>
a000a580: ea00001a b a000a5f0 <rtems_task_variable_add+0xa0>
/*
* Figure out if the variable is already in this task's list.
*/
tvp = the_thread->task_variables;
while (tvp) {
if (tvp->ptr == ptr) {
a000a584: e5963004 ldr r3, [r6, #4] <== NOT EXECUTED
a000a588: e1530004 cmp r3, r4 <== NOT EXECUTED
a000a58c: 1a000003 bne a000a5a0 <rtems_task_variable_add+0x50> <== NOT EXECUTED
tvp->dtor = dtor;
a000a590: e5865010 str r5, [r6, #16] <== NOT EXECUTED
_Thread_Enable_dispatch();
a000a594: eb0007a3 bl a000c428 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a000a598: e3a00000 mov r0, #0 <== NOT EXECUTED
a000a59c: ea000014 b a000a5f4 <rtems_task_variable_add+0xa4> <== NOT EXECUTED
}
tvp = (rtems_task_variable_t *)tvp->next;
a000a5a0: e5966000 ldr r6, [r6] <== NOT EXECUTED
case OBJECTS_LOCAL:
/*
* Figure out if the variable is already in this task's list.
*/
tvp = the_thread->task_variables;
while (tvp) {
a000a5a4: e3560000 cmp r6, #0
a000a5a8: 1afffff5 bne a000a584 <rtems_task_variable_add+0x34>
/*
* Now allocate memory for this task variable.
*/
new = (rtems_task_variable_t *)
_Workspace_Allocate(sizeof(rtems_task_variable_t));
a000a5ac: e3a00014 mov r0, #20
a000a5b0: eb000bcc bl a000d4e8 <_Workspace_Allocate>
if (new == NULL) {
a000a5b4: e3500000 cmp r0, #0
a000a5b8: 1a000002 bne a000a5c8 <rtems_task_variable_add+0x78>
_Thread_Enable_dispatch();
a000a5bc: eb000799 bl a000c428 <_Thread_Enable_dispatch>
return RTEMS_NO_MEMORY;
a000a5c0: e3a0001a mov r0, #26
a000a5c4: ea00000a b a000a5f4 <rtems_task_variable_add+0xa4>
}
new->gval = *ptr;
a000a5c8: e5943000 ldr r3, [r4]
new->ptr = ptr;
a000a5cc: e5804004 str r4, [r0, #4]
new->dtor = dtor;
a000a5d0: e5805010 str r5, [r0, #16]
_Workspace_Allocate(sizeof(rtems_task_variable_t));
if (new == NULL) {
_Thread_Enable_dispatch();
return RTEMS_NO_MEMORY;
}
new->gval = *ptr;
a000a5d4: e5803008 str r3, [r0, #8]
new->ptr = ptr;
new->dtor = dtor;
new->next = (struct rtems_task_variable_tt *)the_thread->task_variables;
a000a5d8: e5973100 ldr r3, [r7, #256] ; 0x100
a000a5dc: e5803000 str r3, [r0]
the_thread->task_variables = new;
a000a5e0: e5870100 str r0, [r7, #256] ; 0x100
_Thread_Enable_dispatch();
a000a5e4: eb00078f bl a000c428 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000a5e8: e1a00006 mov r0, r6
a000a5ec: ea000000 b a000a5f4 <rtems_task_variable_add+0xa4>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a000a5f0: e3a00004 mov r0, #4
}
a000a5f4: e8bd80f8 pop {r3, r4, r5, r6, r7, pc}
a000a5f8 <rtems_task_variable_delete>:
rtems_status_code rtems_task_variable_delete(
rtems_id tid,
void **ptr
)
{
a000a5f8: e92d4011 push {r0, r4, lr} <== NOT EXECUTED
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
a000a5fc: e2514000 subs r4, r1, #0 <== NOT EXECUTED
a000a600: 0a000016 beq a000a660 <rtems_task_variable_delete+0x68> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
prev = NULL;
the_thread = _Thread_Get (tid, &location);
a000a604: e1a0100d mov r1, sp <== NOT EXECUTED
a000a608: eb00078f bl a000c44c <_Thread_Get> <== NOT EXECUTED
switch (location) {
a000a60c: e59d3000 ldr r3, [sp] <== NOT EXECUTED
a000a610: e3530000 cmp r3, #0 <== NOT EXECUTED
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
a000a614: 05901100 ldreq r1, [r0, #256] ; 0x100 <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
prev = NULL;
the_thread = _Thread_Get (tid, &location);
switch (location) {
a000a618: 0a00000d beq a000a654 <rtems_task_variable_delete+0x5c> <== NOT EXECUTED
a000a61c: ea000011 b a000a668 <rtems_task_variable_delete+0x70> <== NOT EXECUTED
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
if (tvp->ptr == ptr) {
a000a620: e5912004 ldr r2, [r1, #4] <== NOT EXECUTED
a000a624: e1520004 cmp r2, r4 <== NOT EXECUTED
a000a628: 1a000007 bne a000a64c <rtems_task_variable_delete+0x54> <== NOT EXECUTED
a000a62c: e5912000 ldr r2, [r1] <== NOT EXECUTED
if (prev)
a000a630: e3530000 cmp r3, #0 <== NOT EXECUTED
prev->next = tvp->next;
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
a000a634: 05802100 streq r2, [r0, #256] ; 0x100 <== NOT EXECUTED
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
a000a638: 15832000 strne r2, [r3] <== NOT EXECUTED
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
a000a63c: eb000028 bl a000a6e4 <_RTEMS_Tasks_Invoke_task_variable_dtor><== NOT EXECUTED
_Thread_Enable_dispatch();
a000a640: eb000778 bl a000c428 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a000a644: e3a00000 mov r0, #0 <== NOT EXECUTED
a000a648: ea000007 b a000a66c <rtems_task_variable_delete+0x74> <== NOT EXECUTED
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
a000a64c: e1a03001 mov r3, r1 <== NOT EXECUTED
a000a650: e5911000 ldr r1, [r1] <== NOT EXECUTED
the_thread = _Thread_Get (tid, &location);
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
a000a654: e3510000 cmp r1, #0 <== NOT EXECUTED
a000a658: 1afffff0 bne a000a620 <rtems_task_variable_delete+0x28> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
a000a65c: eb000771 bl a000c428 <_Thread_Enable_dispatch> <== NOT EXECUTED
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
a000a660: e3a00009 mov r0, #9 <== NOT EXECUTED
a000a664: ea000000 b a000a66c <rtems_task_variable_delete+0x74> <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a000a668: e3a00004 mov r0, #4 <== NOT EXECUTED
}
a000a66c: e8bd8018 pop {r3, r4, pc} <== NOT EXECUTED
a000a670 <rtems_task_variable_get>:
rtems_status_code rtems_task_variable_get(
rtems_id tid,
void **ptr,
void **result
)
{
a000a670: e92d4031 push {r0, r4, r5, lr}
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp;
if ( !ptr )
a000a674: e2515000 subs r5, r1, #0
rtems_status_code rtems_task_variable_get(
rtems_id tid,
void **ptr,
void **result
)
{
a000a678: e1a04002 mov r4, r2
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp;
if ( !ptr )
a000a67c: 0a000014 beq a000a6d4 <rtems_task_variable_get+0x64>
return RTEMS_INVALID_ADDRESS;
if ( !result )
a000a680: e3520000 cmp r2, #0
a000a684: 0a000012 beq a000a6d4 <rtems_task_variable_get+0x64>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
a000a688: e1a0100d mov r1, sp
a000a68c: eb00076e bl a000c44c <_Thread_Get>
switch (location) {
a000a690: e59d3000 ldr r3, [sp]
a000a694: e3530000 cmp r3, #0
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
a000a698: 05903100 ldreq r3, [r0, #256] ; 0x100
if ( !result )
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
switch (location) {
a000a69c: 0a000009 beq a000a6c8 <rtems_task_variable_get+0x58>
a000a6a0: ea00000d b a000a6dc <rtems_task_variable_get+0x6c>
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
while (tvp) {
if (tvp->ptr == ptr) {
a000a6a4: e5932004 ldr r2, [r3, #4] <== NOT EXECUTED
a000a6a8: e1520005 cmp r2, r5 <== NOT EXECUTED
a000a6ac: 1a000004 bne a000a6c4 <rtems_task_variable_get+0x54> <== NOT EXECUTED
/*
* Should this return the current (i.e not the
* saved) value if `tid' is the current task?
*/
*result = tvp->tval;
a000a6b0: e593300c ldr r3, [r3, #12] <== NOT EXECUTED
a000a6b4: e5843000 str r3, [r4] <== NOT EXECUTED
_Thread_Enable_dispatch();
a000a6b8: eb00075a bl a000c428 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a000a6bc: e3a00000 mov r0, #0 <== NOT EXECUTED
a000a6c0: ea000006 b a000a6e0 <rtems_task_variable_get+0x70> <== NOT EXECUTED
}
tvp = (rtems_task_variable_t *)tvp->next;
a000a6c4: e5933000 ldr r3, [r3] <== NOT EXECUTED
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
while (tvp) {
a000a6c8: e3530000 cmp r3, #0 <== NOT EXECUTED
a000a6cc: 1afffff4 bne a000a6a4 <rtems_task_variable_get+0x34> <== NOT EXECUTED
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
a000a6d0: eb000754 bl a000c428 <_Thread_Enable_dispatch> <== NOT EXECUTED
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
if ( !result )
return RTEMS_INVALID_ADDRESS;
a000a6d4: e3a00009 mov r0, #9
a000a6d8: ea000000 b a000a6e0 <rtems_task_variable_get+0x70>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a000a6dc: e3a00004 mov r0, #4
}
a000a6e0: e8bd8038 pop {r3, r4, r5, pc}
a000aad4 <rtems_task_wake_when>:
rtems_time_of_day *time_buffer
)
{
Watchdog_Interval seconds;
if ( !_TOD_Is_set )
a000aad4: e59f30c8 ldr r3, [pc, #200] ; a000aba4 <rtems_task_wake_when+0xd0>
*/
rtems_status_code rtems_task_wake_when(
rtems_time_of_day *time_buffer
)
{
a000aad8: e92d40f0 push {r4, r5, r6, r7, lr}
Watchdog_Interval seconds;
if ( !_TOD_Is_set )
a000aadc: e5d33000 ldrb r3, [r3]
*/
rtems_status_code rtems_task_wake_when(
rtems_time_of_day *time_buffer
)
{
a000aae0: e1a05000 mov r5, r0
Watchdog_Interval seconds;
if ( !_TOD_Is_set )
a000aae4: e3530000 cmp r3, #0
a000aae8: 0a000025 beq a000ab84 <rtems_task_wake_when+0xb0>
return RTEMS_NOT_DEFINED;
if ( !time_buffer )
a000aaec: e3500000 cmp r0, #0
a000aaf0: 0a000025 beq a000ab8c <rtems_task_wake_when+0xb8>
return RTEMS_INVALID_ADDRESS;
time_buffer->ticks = 0;
a000aaf4: e3a04000 mov r4, #0
a000aaf8: e5804018 str r4, [r0, #24]
if ( !_TOD_Validate( time_buffer ) )
a000aafc: ebfffd1a bl a0009f6c <_TOD_Validate>
a000ab00: e1500004 cmp r0, r4
a000ab04: 0a000022 beq a000ab94 <rtems_task_wake_when+0xc0>
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( time_buffer );
a000ab08: e1a00005 mov r0, r5
a000ab0c: ebfffcf3 bl a0009ee0 <_TOD_To_seconds>
if ( seconds <= _TOD_Seconds_since_epoch() )
a000ab10: e59f6090 ldr r6, [pc, #144] ; a000aba8 <rtems_task_wake_when+0xd4>
time_buffer->ticks = 0;
if ( !_TOD_Validate( time_buffer ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( time_buffer );
a000ab14: e1a05000 mov r5, r0
if ( seconds <= _TOD_Seconds_since_epoch() )
a000ab18: e5963000 ldr r3, [r6]
a000ab1c: e1500003 cmp r0, r3
a000ab20: 9a00001d bls a000ab9c <rtems_task_wake_when+0xc8>
a000ab24: e59f3080 ldr r3, [pc, #128] ; a000abac <rtems_task_wake_when+0xd8>
a000ab28: e5932000 ldr r2, [r3]
a000ab2c: e2822001 add r2, r2, #1
a000ab30: e5832000 str r2, [r3]
return RTEMS_INVALID_CLOCK;
_Thread_Disable_dispatch();
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME );
a000ab34: e59f7074 ldr r7, [pc, #116] ; a000abb0 <rtems_task_wake_when+0xdc>
a000ab38: e3a01010 mov r1, #16
a000ab3c: e5970004 ldr r0, [r7, #4]
a000ab40: eb000976 bl a000d120 <_Thread_Set_state>
_Watchdog_Initialize(
&_Thread_Executing->Timer,
a000ab44: e5971004 ldr r1, [r7, #4]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
a000ab48: e59f2064 ldr r2, [pc, #100] ; a000abb4 <rtems_task_wake_when+0xe0>
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
a000ab4c: e59f0064 ldr r0, [pc, #100] ; a000abb8 <rtems_task_wake_when+0xe4>
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
_Thread_Disable_dispatch();
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME );
_Watchdog_Initialize(
a000ab50: e5913008 ldr r3, [r1, #8]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
a000ab54: e5812064 str r2, [r1, #100] ; 0x64
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a000ab58: e5814050 str r4, [r1, #80] ; 0x50
the_watchdog->routine = routine;
the_watchdog->id = id;
a000ab5c: e5813068 str r3, [r1, #104] ; 0x68
&_Thread_Executing->Timer,
_Thread_Delay_ended,
_Thread_Executing->Object.id,
NULL
);
_Watchdog_Insert_seconds(
a000ab60: e5963000 ldr r3, [r6]
the_watchdog->user_data = user_data;
a000ab64: e581406c str r4, [r1, #108] ; 0x6c
a000ab68: e0635005 rsb r5, r3, r5
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
a000ab6c: e5815054 str r5, [r1, #84] ; 0x54
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
a000ab70: e2811048 add r1, r1, #72 ; 0x48
a000ab74: eb000af3 bl a000d748 <_Watchdog_Insert>
&_Thread_Executing->Timer,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
a000ab78: eb000758 bl a000c8e0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000ab7c: e1a00004 mov r0, r4 <== NOT EXECUTED
a000ab80: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
)
{
Watchdog_Interval seconds;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
a000ab84: e3a0000b mov r0, #11 <== NOT EXECUTED
a000ab88: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
a000ab8c: e3a00009 mov r0, #9 <== NOT EXECUTED
a000ab90: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
time_buffer->ticks = 0;
if ( !_TOD_Validate( time_buffer ) )
return RTEMS_INVALID_CLOCK;
a000ab94: e3a00014 mov r0, #20 <== NOT EXECUTED
a000ab98: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
seconds = _TOD_To_seconds( time_buffer );
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
a000ab9c: e3a00014 mov r0, #20 <== NOT EXECUTED
&_Thread_Executing->Timer,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
a000aba0: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
a0008d70 <rtems_termios_baud_to_index>:
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
a0008d70: e3500009 cmp r0, #9
a0008d74: 012fff1e bxeq lr
a0008d78: ca000016 bgt a0008dd8 <rtems_termios_baud_to_index+0x68>
a0008d7c: e3500004 cmp r0, #4
a0008d80: 012fff1e bxeq lr
a0008d84: ca00000a bgt a0008db4 <rtems_termios_baud_to_index+0x44>
a0008d88: e3500001 cmp r0, #1
a0008d8c: 012fff1e bxeq lr
a0008d90: ca000002 bgt a0008da0 <rtems_termios_baud_to_index+0x30>
a0008d94: e3500000 cmp r0, #0
a0008d98: 012fff1e bxeq lr
a0008d9c: ea000030 b a0008e64 <rtems_termios_baud_to_index+0xf4>
a0008da0: e3500002 cmp r0, #2
a0008da4: 012fff1e bxeq lr
a0008da8: e3500003 cmp r0, #3
a0008dac: 1a00002c bne a0008e64 <rtems_termios_baud_to_index+0xf4>
a0008db0: e12fff1e bx lr
a0008db4: e3500006 cmp r0, #6 <== NOT EXECUTED
a0008db8: 012fff1e bxeq lr <== NOT EXECUTED
case B0: baud_index = 0; break;
case B50: baud_index = 1; break;
case B75: baud_index = 2; break;
case B110: baud_index = 3; break;
case B134: baud_index = 4; break;
case B150: baud_index = 5; break;
a0008dbc: b3a00005 movlt r0, #5 <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
a0008dc0: b12fff1e bxlt lr <== NOT EXECUTED
a0008dc4: e3500007 cmp r0, #7 <== NOT EXECUTED
a0008dc8: 012fff1e bxeq lr <== NOT EXECUTED
a0008dcc: e3500008 cmp r0, #8 <== NOT EXECUTED
a0008dd0: 1a000023 bne a0008e64 <rtems_termios_baud_to_index+0xf4> <== NOT EXECUTED
a0008dd4: e12fff1e bx lr <== NOT EXECUTED
a0008dd8: e350000e cmp r0, #14 <== NOT EXECUTED
a0008ddc: 012fff1e bxeq lr <== NOT EXECUTED
a0008de0: ca000008 bgt a0008e08 <rtems_termios_baud_to_index+0x98> <== NOT EXECUTED
a0008de4: e350000b cmp r0, #11 <== NOT EXECUTED
a0008de8: 012fff1e bxeq lr <== NOT EXECUTED
case B150: baud_index = 5; break;
case B200: baud_index = 6; break;
case B300: baud_index = 7; break;
case B600: baud_index = 8; break;
case B1200: baud_index = 9; break;
case B1800: baud_index = 10; break;
a0008dec: b3a0000a movlt r0, #10 <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
a0008df0: b12fff1e bxlt lr <== NOT EXECUTED
a0008df4: e350000c cmp r0, #12 <== NOT EXECUTED
a0008df8: 012fff1e bxeq lr <== NOT EXECUTED
a0008dfc: e350000d cmp r0, #13 <== NOT EXECUTED
a0008e00: 1a000017 bne a0008e64 <rtems_termios_baud_to_index+0xf4> <== NOT EXECUTED
a0008e04: e12fff1e bx lr <== NOT EXECUTED
a0008e08: e59f305c ldr r3, [pc, #92] ; a0008e6c <rtems_termios_baud_to_index+0xfc><== NOT EXECUTED
a0008e0c: e1500003 cmp r0, r3 <== NOT EXECUTED
case B4800: baud_index = 12; break;
case B9600: baud_index = 13; break;
case B19200: baud_index = 14; break;
case B38400: baud_index = 15; break;
case B57600: baud_index = 16; break;
case B115200: baud_index = 17; break;
a0008e10: 03a00011 moveq r0, #17 <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
a0008e14: 012fff1e bxeq lr <== NOT EXECUTED
a0008e18: ca000005 bgt a0008e34 <rtems_termios_baud_to_index+0xc4> <== NOT EXECUTED
a0008e1c: e350000f cmp r0, #15 <== NOT EXECUTED
a0008e20: 012fff1e bxeq lr <== NOT EXECUTED
a0008e24: e2433001 sub r3, r3, #1 <== NOT EXECUTED
a0008e28: e1500003 cmp r0, r3 <== NOT EXECUTED
a0008e2c: 1a00000c bne a0008e64 <rtems_termios_baud_to_index+0xf4> <== NOT EXECUTED
a0008e30: ea000007 b a0008e54 <rtems_termios_baud_to_index+0xe4> <== NOT EXECUTED
a0008e34: e59f3034 ldr r3, [pc, #52] ; a0008e70 <rtems_termios_baud_to_index+0x100><== NOT EXECUTED
a0008e38: e1500003 cmp r0, r3 <== NOT EXECUTED
case B9600: baud_index = 13; break;
case B19200: baud_index = 14; break;
case B38400: baud_index = 15; break;
case B57600: baud_index = 16; break;
case B115200: baud_index = 17; break;
case B230400: baud_index = 18; break;
a0008e3c: 03a00012 moveq r0, #18 <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
a0008e40: 012fff1e bxeq lr <== NOT EXECUTED
a0008e44: e2833001 add r3, r3, #1 <== NOT EXECUTED
a0008e48: e1500003 cmp r0, r3 <== NOT EXECUTED
a0008e4c: 1a000004 bne a0008e64 <rtems_termios_baud_to_index+0xf4> <== NOT EXECUTED
a0008e50: ea000001 b a0008e5c <rtems_termios_baud_to_index+0xec> <== NOT EXECUTED
case B2400: baud_index = 11; break;
case B4800: baud_index = 12; break;
case B9600: baud_index = 13; break;
case B19200: baud_index = 14; break;
case B38400: baud_index = 15; break;
case B57600: baud_index = 16; break;
a0008e54: e3a00010 mov r0, #16 <== NOT EXECUTED
a0008e58: e12fff1e bx lr <== NOT EXECUTED
case B115200: baud_index = 17; break;
case B230400: baud_index = 18; break;
case B460800: baud_index = 19; break;
a0008e5c: e3a00013 mov r0, #19 <== NOT EXECUTED
a0008e60: e12fff1e bx lr <== NOT EXECUTED
default: baud_index = -1; break;
a0008e64: e3e00000 mvn r0, #0
}
return baud_index;
}
a0008e68: e12fff1e bx lr
a0008e74 <rtems_termios_baud_to_number>:
extern rtems_assoc_t termios_assoc_table[];
int32_t rtems_termios_baud_to_number(
int termios_baud
)
{
a0008e74: e92d4010 push {r4, lr} <== NOT EXECUTED
a0008e78: e1a04000 mov r4, r0 <== NOT EXECUTED
int baud;
baud = rtems_assoc_local_by_remote( termios_assoc_table, termios_baud );
a0008e7c: e1a01004 mov r1, r4 <== NOT EXECUTED
a0008e80: e59f001c ldr r0, [pc, #28] ; a0008ea4 <rtems_termios_baud_to_number+0x30><== NOT EXECUTED
a0008e84: eb001a83 bl a000f898 <rtems_assoc_local_by_remote> <== NOT EXECUTED
if ( baud == 0 && termios_baud != 0 )
a0008e88: e2703001 rsbs r3, r0, #1 <== NOT EXECUTED
a0008e8c: 33a03000 movcc r3, #0 <== NOT EXECUTED
a0008e90: e3540000 cmp r4, #0 <== NOT EXECUTED
a0008e94: 03a03000 moveq r3, #0 <== NOT EXECUTED
a0008e98: e3530000 cmp r3, #0 <== NOT EXECUTED
return -1;
return baud;
}
a0008e9c: 13e00000 mvnne r0, #0 <== NOT EXECUTED
a0008ea0: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a000752c <rtems_termios_close>:
rtems_status_code
rtems_termios_close (void *arg)
{
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
a000752c: e5903000 ldr r3, [r0]
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
a0007530: e92d4030 push {r4, r5, lr}
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
a0007534: e5934034 ldr r4, [r3, #52] ; 0x34
rtems_status_code sc;
sc = rtems_semaphore_obtain(
a0007538: e59f3178 ldr r3, [pc, #376] ; a00076b8 <rtems_termios_close+0x18c>
a000753c: e3a01000 mov r1, #0
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
a0007540: e1a05000 mov r5, r0
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
rtems_status_code sc;
sc = rtems_semaphore_obtain(
a0007544: e1a02001 mov r2, r1
a0007548: e5930000 ldr r0, [r3]
a000754c: eb0007a3 bl a00093e0 <rtems_semaphore_obtain>
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
a0007550: e3500000 cmp r0, #0
a0007554: 1a000023 bne a00075e8 <rtems_termios_close+0xbc>
rtems_fatal_error_occurred (sc);
if (--tty->refcount == 0) {
a0007558: e5943008 ldr r3, [r4, #8]
a000755c: e2433001 sub r3, r3, #1
a0007560: e3530000 cmp r3, #0
a0007564: e5843008 str r3, [r4, #8]
a0007568: 1a00004d bne a00076a4 <rtems_termios_close+0x178>
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
a000756c: e59420cc ldr r2, [r4, #204] ; 0xcc
a0007570: e59f3144 ldr r3, [pc, #324] ; a00076bc <rtems_termios_close+0x190>
a0007574: e0833282 add r3, r3, r2, lsl #5
a0007578: e5931004 ldr r1, [r3, #4]
a000757c: e3510000 cmp r1, #0
a0007580: 0a000002 beq a0007590 <rtems_termios_close+0x64>
/*
* call discipline-specific close
*/
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
a0007584: e1a00004 mov r0, r4
a0007588: e12fff31 blx r1 <== NOT EXECUTED
a000758c: ea000008 b a00075b4 <rtems_termios_close+0x88> <== NOT EXECUTED
} else {
/*
* default: just flush output buffer
*/
sc = rtems_semaphore_obtain(tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
a0007590: e5940018 ldr r0, [r4, #24]
a0007594: e1a02001 mov r2, r1
a0007598: eb000790 bl a00093e0 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
a000759c: e3500000 cmp r0, #0
a00075a0: 1a000010 bne a00075e8 <rtems_termios_close+0xbc>
rtems_fatal_error_occurred (sc);
}
drainOutput (tty);
a00075a4: e1a00004 mov r0, r4
a00075a8: ebfffeb2 bl a0007078 <drainOutput>
rtems_semaphore_release (tty->osem);
a00075ac: e5940018 ldr r0, [r4, #24]
a00075b0: eb0007d0 bl a00094f8 <rtems_semaphore_release>
}
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
a00075b4: e59430b4 ldr r3, [r4, #180] ; 0xb4
a00075b8: e3530002 cmp r3, #2
a00075bc: 1a00000a bne a00075ec <rtems_termios_close+0xc0>
/*
* send "terminate" to I/O tasks
*/
sc = rtems_event_send( tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT );
a00075c0: e59400c4 ldr r0, [r4, #196] ; 0xc4 <== NOT EXECUTED
a00075c4: e3a01001 mov r1, #1 <== NOT EXECUTED
a00075c8: eb000672 bl a0008f98 <rtems_event_send> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
a00075cc: e3500000 cmp r0, #0 <== NOT EXECUTED
a00075d0: 1a000004 bne a00075e8 <rtems_termios_close+0xbc> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT );
a00075d4: e59400c8 ldr r0, [r4, #200] ; 0xc8 <== NOT EXECUTED
a00075d8: e3a01001 mov r1, #1 <== NOT EXECUTED
a00075dc: eb00066d bl a0008f98 <rtems_event_send> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
a00075e0: e3500000 cmp r0, #0 <== NOT EXECUTED
a00075e4: 0a000000 beq a00075ec <rtems_termios_close+0xc0> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
a00075e8: eb000916 bl a0009a48 <rtems_fatal_error_occurred> <== NOT EXECUTED
}
if (tty->device.lastClose)
a00075ec: e594309c ldr r3, [r4, #156] ; 0x9c
a00075f0: e3530000 cmp r3, #0
a00075f4: 0a000003 beq a0007608 <rtems_termios_close+0xdc>
(*tty->device.lastClose)(tty->major, tty->minor, arg);
a00075f8: e594000c ldr r0, [r4, #12]
a00075fc: e5941010 ldr r1, [r4, #16]
a0007600: e1a02005 mov r2, r5
a0007604: e12fff33 blx r3
if (tty->forw == NULL) {
a0007608: e894000c ldm r4, {r2, r3}
a000760c: e3520000 cmp r2, #0
rtems_termios_ttyTail = tty->back;
if ( rtems_termios_ttyTail != NULL ) {
rtems_termios_ttyTail->forw = NULL;
}
} else {
tty->forw->back = tty->back;
a0007610: 15823004 strne r3, [r2, #4]
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
if (tty->device.lastClose)
(*tty->device.lastClose)(tty->major, tty->minor, arg);
if (tty->forw == NULL) {
a0007614: 1a000003 bne a0007628 <rtems_termios_close+0xfc>
rtems_termios_ttyTail = tty->back;
a0007618: e59f10a0 ldr r1, [pc, #160] ; a00076c0 <rtems_termios_close+0x194>
if ( rtems_termios_ttyTail != NULL ) {
a000761c: e3530000 cmp r3, #0
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;
a0007620: e5813000 str r3, [r1]
if ( rtems_termios_ttyTail != NULL ) {
rtems_termios_ttyTail->forw = NULL;
a0007624: 15832000 strne r2, [r3]
}
} else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
a0007628: e5942004 ldr r2, [r4, #4]
a000762c: e5943000 ldr r3, [r4]
a0007630: e3520000 cmp r2, #0
rtems_termios_ttyHead = tty->forw;
if ( rtems_termios_ttyHead != NULL ) {
rtems_termios_ttyHead->back = NULL;
}
} else {
tty->back->forw = tty->forw;
a0007634: 15823000 strne r3, [r2]
}
} else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
a0007638: 1a000003 bne a000764c <rtems_termios_close+0x120>
rtems_termios_ttyHead = tty->forw;
a000763c: e59f1080 ldr r1, [pc, #128] ; a00076c4 <rtems_termios_close+0x198>
if ( rtems_termios_ttyHead != NULL ) {
a0007640: e3530000 cmp r3, #0
rtems_termios_ttyHead->back = NULL;
a0007644: 15832004 strne r2, [r3, #4]
} else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
rtems_termios_ttyHead = tty->forw;
a0007648: e5813000 str r3, [r1]
}
} else {
tty->back->forw = tty->forw;
}
rtems_semaphore_delete (tty->isem);
a000764c: e5940014 ldr r0, [r4, #20]
a0007650: eb00073b bl a0009344 <rtems_semaphore_delete>
rtems_semaphore_delete (tty->osem);
a0007654: e5940018 ldr r0, [r4, #24]
a0007658: eb000739 bl a0009344 <rtems_semaphore_delete>
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
a000765c: e594008c ldr r0, [r4, #140] ; 0x8c
a0007660: eb000737 bl a0009344 <rtems_semaphore_delete>
if ((tty->device.pollRead == NULL) ||
a0007664: e59430a0 ldr r3, [r4, #160] ; 0xa0
a0007668: e3530000 cmp r3, #0
a000766c: 0a000002 beq a000767c <rtems_termios_close+0x150>
a0007670: e59430b4 ldr r3, [r4, #180] ; 0xb4
a0007674: e3530002 cmp r3, #2
a0007678: 1a000001 bne a0007684 <rtems_termios_close+0x158>
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
rtems_semaphore_delete (tty->rawInBuf.Semaphore);
a000767c: e5940068 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED
a0007680: eb00072f bl a0009344 <rtems_semaphore_delete> <== NOT EXECUTED
free (tty->rawInBuf.theBuf);
a0007684: e5940058 ldr r0, [r4, #88] ; 0x58
a0007688: ebfffacf bl a00061cc <free>
free (tty->rawOutBuf.theBuf);
a000768c: e594007c ldr r0, [r4, #124] ; 0x7c
a0007690: ebfffacd bl a00061cc <free>
free (tty->cbuf);
a0007694: e594001c ldr r0, [r4, #28]
a0007698: ebfffacb bl a00061cc <free>
free (tty);
a000769c: e1a00004 mov r0, r4
a00076a0: ebfffac9 bl a00061cc <free>
}
rtems_semaphore_release (rtems_termios_ttyMutex);
a00076a4: e59f300c ldr r3, [pc, #12] ; a00076b8 <rtems_termios_close+0x18c>
a00076a8: e5930000 ldr r0, [r3]
a00076ac: eb000791 bl a00094f8 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
}
a00076b0: e3a00000 mov r0, #0
a00076b4: e8bd8030 pop {r4, r5, pc}
a0008a40 <rtems_termios_dequeue_characters>:
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
a0008a40: e5902090 ldr r2, [r0, #144] ; 0x90 <== NOT EXECUTED
* for each transmitted character.
* It returns number of characters left to transmit
*/
int
rtems_termios_dequeue_characters (void *ttyp, int len)
{
a0008a44: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
a0008a48: e0822001 add r2, r2, r1 <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
a0008a4c: e59010b4 ldr r1, [r0, #180] ; 0xb4 <== NOT EXECUTED
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
a0008a50: e5802090 str r2, [r0, #144] ; 0x90 <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
a0008a54: e3510002 cmp r1, #2 <== NOT EXECUTED
a0008a58: 1a000004 bne a0008a70 <rtems_termios_dequeue_characters+0x30><== NOT EXECUTED
/*
* send wake up to transmitter task
*/
sc = rtems_event_send(tty->txTaskId, TERMIOS_TX_START_EVENT);
a0008a5c: e59000c8 ldr r0, [r0, #200] ; 0xc8 <== NOT EXECUTED
a0008a60: eb00014c bl a0008f98 <rtems_event_send> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
a0008a64: e2503000 subs r3, r0, #0 <== NOT EXECUTED
a0008a68: 0a00000c beq a0008aa0 <rtems_termios_dequeue_characters+0x60><== NOT EXECUTED
rtems_fatal_error_occurred (sc);
a0008a6c: eb0003f5 bl a0009a48 <rtems_fatal_error_occurred> <== NOT EXECUTED
return 0; /* nothing to output in IRQ... */
}
if (tty->t_line == PPPDISC ) {
a0008a70: e59030cc ldr r3, [r0, #204] ; 0xcc <== NOT EXECUTED
a0008a74: e3530005 cmp r3, #5 <== NOT EXECUTED
a0008a78: 1a000006 bne a0008a98 <rtems_termios_dequeue_characters+0x58><== NOT EXECUTED
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
a0008a7c: e59f3024 ldr r3, [pc, #36] ; a0008aa8 <rtems_termios_dequeue_characters+0x68><== NOT EXECUTED
a0008a80: e59330b4 ldr r3, [r3, #180] ; 0xb4 <== NOT EXECUTED
a0008a84: e3530000 cmp r3, #0 <== NOT EXECUTED
a0008a88: 0a000004 beq a0008aa0 <rtems_termios_dequeue_characters+0x60><== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_start(tty);
a0008a8c: e12fff33 blx r3 <== NOT EXECUTED
}
return 0; /* nothing to output in IRQ... */
a0008a90: e3a03000 mov r3, #0 <== NOT EXECUTED
a0008a94: ea000001 b a0008aa0 <rtems_termios_dequeue_characters+0x60><== NOT EXECUTED
}
return rtems_termios_refill_transmitter(tty);
}
a0008a98: e49de004 pop {lr} ; (ldr lr, [sp], #4) <== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_start(tty);
}
return 0; /* nothing to output in IRQ... */
}
return rtems_termios_refill_transmitter(tty);
a0008a9c: eaffff5a b a000880c <rtems_termios_refill_transmitter> <== NOT EXECUTED
}
a0008aa0: e1a00003 mov r0, r3 <== NOT EXECUTED
a0008aa4: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a000850c <rtems_termios_enqueue_raw_characters>:
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len)
{
a000850c: e92d4ff3 push {r0, r1, r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
char c;
int dropped = 0;
bool flow_rcv = false; /* true, if flow control char received */
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
a0008510: e59030cc ldr r3, [r0, #204] ; 0xcc <== NOT EXECUTED
a0008514: e59f7280 ldr r7, [pc, #640] ; a000879c <rtems_termios_enqueue_raw_characters+0x290><== NOT EXECUTED
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len)
{
a0008518: e1a04000 mov r4, r0 <== NOT EXECUTED
a000851c: e1a06001 mov r6, r1 <== NOT EXECUTED
char c;
int dropped = 0;
bool flow_rcv = false; /* true, if flow control char received */
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
a0008520: e0873283 add r3, r7, r3, lsl #5 <== NOT EXECUTED
a0008524: e5939010 ldr r9, [r3, #16] <== NOT EXECUTED
a0008528: e3590000 cmp r9, #0 <== NOT EXECUTED
a000852c: 11a05002 movne r5, r2 <== NOT EXECUTED
a0008530: 1a00000d bne a000856c <rtems_termios_enqueue_raw_characters+0x60><== NOT EXECUTED
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
a0008534: e2803030 add r3, r0, #48 ; 0x30 <== NOT EXECUTED
a0008538: e58d3000 str r3, [sp] <== NOT EXECUTED
if ((tty->flow_ctrl & FL_OSTOP) ||
(tty->rawOutBufState == rob_idle)) {
/* if tx is stopped due to XOFF or out of data */
/* call write function here */
tty->flow_ctrl |= FL_ISNTXOF;
(*tty->device.write)(tty->minor,
a000853c: e280304a add r3, r0, #74 ; 0x4a <== NOT EXECUTED
char c;
int dropped = 0;
bool flow_rcv = false; /* true, if flow control char received */
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
a0008540: e1a0a002 mov sl, r2 <== NOT EXECUTED
a0008544: e1a05009 mov r5, r9 <== NOT EXECUTED
if ((tty->flow_ctrl & FL_OSTOP) ||
(tty->rawOutBufState == rob_idle)) {
/* if tx is stopped due to XOFF or out of data */
/* call write function here */
tty->flow_ctrl |= FL_ISNTXOF;
(*tty->device.write)(tty->minor,
a0008548: e58d3004 str r3, [sp, #4] <== NOT EXECUTED
a000854c: ea000089 b a0008778 <rtems_termios_enqueue_raw_characters+0x26c><== NOT EXECUTED
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
while (len--) {
c = *buf++;
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
a0008550: e59430cc ldr r3, [r4, #204] ; 0xcc <== NOT EXECUTED
a0008554: e4d60001 ldrb r0, [r6], #1 <== NOT EXECUTED
a0008558: e1a01004 mov r1, r4 <== NOT EXECUTED
a000855c: e0873283 add r3, r7, r3, lsl #5 <== NOT EXECUTED
a0008560: e5933010 ldr r3, [r3, #16] <== NOT EXECUTED
a0008564: e12fff33 blx r3 <== NOT EXECUTED
a0008568: e2455001 sub r5, r5, #1 <== NOT EXECUTED
int dropped = 0;
bool flow_rcv = false; /* true, if flow control char received */
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
while (len--) {
a000856c: e3550000 cmp r5, #0 <== NOT EXECUTED
a0008570: 1afffff6 bne a0008550 <rtems_termios_enqueue_raw_characters+0x44><== NOT EXECUTED
}
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
a0008574: e59430e4 ldr r3, [r4, #228] ; 0xe4 <== NOT EXECUTED
a0008578: e3530000 cmp r3, #0 <== NOT EXECUTED
a000857c: 1a000084 bne a0008794 <rtems_termios_enqueue_raw_characters+0x288><== NOT EXECUTED
a0008580: e59430dc ldr r3, [r4, #220] ; 0xdc <== NOT EXECUTED
a0008584: e3530000 cmp r3, #0 <== NOT EXECUTED
a0008588: 0a000081 beq a0008794 <rtems_termios_enqueue_raw_characters+0x288><== NOT EXECUTED
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
a000858c: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED
a0008590: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED
a0008594: e12fff33 blx r3 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
a0008598: e3a03001 mov r3, #1 <== NOT EXECUTED
a000859c: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED
a00085a0: ea00007b b a0008794 <rtems_termios_enqueue_raw_characters+0x288><== NOT EXECUTED
while (len--) {
c = *buf++;
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
a00085a4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
}
return 0;
}
while (len--) {
c = *buf++;
a00085a8: e4d68001 ldrb r8, [r6], #1 <== NOT EXECUTED
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
a00085ac: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED
a00085b0: 0a00000f beq a00085f4 <rtems_termios_enqueue_raw_characters+0xe8><== NOT EXECUTED
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
a00085b4: e5d4204a ldrb r2, [r4, #74] ; 0x4a <== NOT EXECUTED
a00085b8: e5d43049 ldrb r3, [r4, #73] ; 0x49 <== NOT EXECUTED
a00085bc: e1520008 cmp r2, r8 <== NOT EXECUTED
a00085c0: 1a000007 bne a00085e4 <rtems_termios_enqueue_raw_characters+0xd8><== NOT EXECUTED
if (c == tty->termios.c_cc[VSTART]) {
a00085c4: e1530002 cmp r3, r2 <== NOT EXECUTED
/* received VSTOP and VSTART==VSTOP? */
/* then toggle "stop output" status */
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
a00085c8: 059430b8 ldreq r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
a00085cc: 159430b8 ldrne r3, [r4, #184] ; 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;
a00085d0: 02233010 eoreq r3, r3, #16 <== NOT EXECUTED
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
a00085d4: 13833010 orrne r3, r3, #16 <== NOT EXECUTED
a00085d8: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len)
{
a00085dc: e3a09001 mov r9, #1 <== NOT EXECUTED
a00085e0: ea000005 b a00085fc <rtems_termios_enqueue_raw_characters+0xf0><== NOT EXECUTED
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
}
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
a00085e4: e1530008 cmp r3, r8 <== NOT EXECUTED
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
a00085e8: 059430b8 ldreq r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
a00085ec: 03c33010 biceq r3, r3, #16 <== NOT EXECUTED
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
}
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
a00085f0: 0afffff8 beq a00085d8 <rtems_termios_enqueue_raw_characters+0xcc><== NOT EXECUTED
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
flow_rcv = true;
}
}
if (flow_rcv) {
a00085f4: e3590000 cmp r9, #0 <== NOT EXECUTED
a00085f8: 0a000014 beq a0008650 <rtems_termios_enqueue_raw_characters+0x144><== NOT EXECUTED
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
a00085fc: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
a0008600: e2033030 and r3, r3, #48 ; 0x30 <== NOT EXECUTED
a0008604: e3530020 cmp r3, #32 <== NOT EXECUTED
a0008608: 1a000059 bne a0008774 <rtems_termios_enqueue_raw_characters+0x268><== NOT EXECUTED
/* disable interrupts */
rtems_interrupt_disable(level);
a000860c: ebfffa95 bl a0007068 <arm_interrupt_disable> <== NOT EXECUTED
a0008610: e1a07000 mov r7, r0 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
a0008614: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
a0008618: e3c33020 bic r3, r3, #32 <== NOT EXECUTED
a000861c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
a0008620: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED
a0008624: e3530000 cmp r3, #0 <== NOT EXECUTED
a0008628: 0a000006 beq a0008648 <rtems_termios_enqueue_raw_characters+0x13c><== NOT EXECUTED
/* if chars available, call write function... */
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
a000862c: e5942084 ldr r2, [r4, #132] ; 0x84 <== 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)(
a0008630: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED
a0008634: e59430a4 ldr r3, [r4, #164] ; 0xa4 <== NOT EXECUTED
a0008638: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
a000863c: e0811002 add r1, r1, r2 <== NOT EXECUTED
a0008640: e3a02001 mov r2, #1 <== NOT EXECUTED
a0008644: e12fff33 blx r3 <== NOT EXECUTED
a0008648: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED
a000864c: ea000048 b a0008774 <rtems_termios_enqueue_raw_characters+0x268><== NOT EXECUTED
}
/* reenable interrupts */
rtems_interrupt_enable(level);
}
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
a0008650: e5940060 ldr r0, [r4, #96] ; 0x60 <== NOT EXECUTED
a0008654: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED
a0008658: e2800001 add r0, r0, #1 <== NOT EXECUTED
a000865c: eb002d61 bl a0013be8 <__umodsi3> <== NOT EXECUTED
a0008660: e1a07000 mov r7, r0 <== NOT EXECUTED
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
a0008664: ebfffa7f bl a0007068 <arm_interrupt_disable> <== NOT EXECUTED
a0008668: e1a0b000 mov fp, r0 <== NOT EXECUTED
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
a000866c: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED
a0008670: e5940064 ldr r0, [r4, #100] ; 0x64 <== NOT EXECUTED
% tty->rawInBuf.Size) > tty->highwater) &&
a0008674: e5941064 ldr r1, [r4, #100] ; 0x64 <== 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)
a0008678: e0630000 rsb r0, r3, r0 <== NOT EXECUTED
% tty->rawInBuf.Size) > tty->highwater) &&
a000867c: e0800007 add r0, r0, r7 <== NOT EXECUTED
a0008680: eb002d58 bl a0013be8 <__umodsi3> <== 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)
a0008684: e59430c0 ldr r3, [r4, #192] ; 0xc0 <== NOT EXECUTED
a0008688: e1500003 cmp r0, r3 <== NOT EXECUTED
a000868c: 9a000025 bls a0008728 <rtems_termios_enqueue_raw_characters+0x21c><== NOT EXECUTED
% tty->rawInBuf.Size) > tty->highwater) &&
!(tty->flow_ctrl & FL_IREQXOF)) {
a0008690: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== 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) &&
a0008694: e3130001 tst r3, #1 <== NOT EXECUTED
a0008698: 1a000022 bne a0008728 <rtems_termios_enqueue_raw_characters+0x21c><== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
a000869c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
a00086a0: e3833001 orr r3, r3, #1 <== NOT EXECUTED
a00086a4: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
a00086a8: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
a00086ac: e59f30ec ldr r3, [pc, #236] ; a00087a0 <rtems_termios_enqueue_raw_characters+0x294><== NOT EXECUTED
a00086b0: e0023003 and r3, r2, r3 <== NOT EXECUTED
a00086b4: e3530b01 cmp r3, #1024 ; 0x400 <== NOT EXECUTED
a00086b8: 1a00000e bne a00086f8 <rtems_termios_enqueue_raw_characters+0x1ec><== NOT EXECUTED
== (FL_MDXOF ) ) {
if ((tty->flow_ctrl & FL_OSTOP) ||
a00086bc: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
a00086c0: e3130020 tst r3, #32 <== NOT EXECUTED
a00086c4: 1a000002 bne a00086d4 <rtems_termios_enqueue_raw_characters+0x1c8><== NOT EXECUTED
a00086c8: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED
a00086cc: e3530000 cmp r3, #0 <== NOT EXECUTED
a00086d0: 1a000014 bne a0008728 <rtems_termios_enqueue_raw_characters+0x21c><== 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;
a00086d4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
a00086d8: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
a00086dc: e59d1004 ldr r1, [sp, #4] <== 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;
a00086e0: e3833002 orr r3, r3, #2 <== NOT EXECUTED
a00086e4: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
a00086e8: e3a02001 mov r2, #1 <== NOT EXECUTED
a00086ec: e59430a4 ldr r3, [r4, #164] ; 0xa4 <== NOT EXECUTED
a00086f0: e12fff33 blx r3 <== NOT EXECUTED
a00086f4: ea00000b b a0008728 <rtems_termios_enqueue_raw_characters+0x21c><== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTOP]), 1);
}
} else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) {
a00086f8: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
a00086fc: e2033f41 and r3, r3, #260 ; 0x104 <== NOT EXECUTED
a0008700: e3530c01 cmp r3, #256 ; 0x100 <== NOT EXECUTED
a0008704: 1a000007 bne a0008728 <rtems_termios_enqueue_raw_characters+0x21c><== NOT EXECUTED
tty->flow_ctrl |= FL_IRTSOFF;
a0008708: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
a000870c: e3833004 orr r3, r3, #4 <== NOT EXECUTED
a0008710: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
a0008714: e59430ac ldr r3, [r4, #172] ; 0xac <== NOT EXECUTED
a0008718: e3530000 cmp r3, #0 <== NOT EXECUTED
a000871c: 0a000001 beq a0008728 <rtems_termios_enqueue_raw_characters+0x21c><== NOT EXECUTED
tty->device.stopRemoteTx(tty->minor);
a0008720: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
a0008724: e12fff33 blx r3 <== NOT EXECUTED
a0008728: e129f00b msr CPSR_fc, fp <== NOT EXECUTED
}
/* reenable interrupts */
rtems_interrupt_enable(level);
if (newTail == tty->rawInBuf.Head) {
a000872c: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED
a0008730: e1570003 cmp r7, r3 <== NOT EXECUTED
dropped++;
a0008734: 02855001 addeq r5, r5, #1 <== NOT EXECUTED
}
/* reenable interrupts */
rtems_interrupt_enable(level);
if (newTail == tty->rawInBuf.Head) {
a0008738: 0a00000d beq a0008774 <rtems_termios_enqueue_raw_characters+0x268><== NOT EXECUTED
dropped++;
} else {
tty->rawInBuf.theBuf[newTail] = c;
a000873c: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED
a0008740: e7c38007 strb r8, [r3, r7] <== NOT EXECUTED
tty->rawInBuf.Tail = newTail;
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
a0008744: e59430e4 ldr r3, [r4, #228] ; 0xe4 <== NOT EXECUTED
if (newTail == tty->rawInBuf.Head) {
dropped++;
} else {
tty->rawInBuf.theBuf[newTail] = c;
tty->rawInBuf.Tail = newTail;
a0008748: e5847060 str r7, [r4, #96] ; 0x60 <== NOT EXECUTED
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
a000874c: e3530000 cmp r3, #0 <== NOT EXECUTED
a0008750: 1a000007 bne a0008774 <rtems_termios_enqueue_raw_characters+0x268><== NOT EXECUTED
a0008754: e59430dc ldr r3, [r4, #220] ; 0xdc <== NOT EXECUTED
a0008758: e3530000 cmp r3, #0 <== NOT EXECUTED
a000875c: 0a000004 beq a0008774 <rtems_termios_enqueue_raw_characters+0x268><== NOT EXECUTED
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
a0008760: e59d0000 ldr r0, [sp] <== NOT EXECUTED
a0008764: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED
a0008768: e12fff33 blx r3 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
a000876c: e3a03001 mov r3, #1 <== NOT EXECUTED
a0008770: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED
a0008774: e24aa001 sub sl, sl, #1 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
a0008778: e35a0000 cmp sl, #0 <== NOT EXECUTED
a000877c: 1affff88 bne a00085a4 <rtems_termios_enqueue_raw_characters+0x98><== NOT EXECUTED
}
}
}
}
tty->rawInBufDropped += dropped;
a0008780: e5943078 ldr r3, [r4, #120] ; 0x78 <== NOT EXECUTED
rtems_semaphore_release (tty->rawInBuf.Semaphore);
a0008784: e5940068 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED
}
}
}
}
tty->rawInBufDropped += dropped;
a0008788: e0833005 add r3, r3, r5 <== NOT EXECUTED
a000878c: e5843078 str r3, [r4, #120] ; 0x78 <== NOT EXECUTED
rtems_semaphore_release (tty->rawInBuf.Semaphore);
a0008790: eb000358 bl a00094f8 <rtems_semaphore_release> <== NOT EXECUTED
return dropped;
}
a0008794: e1a00005 mov r0, r5 <== NOT EXECUTED
a0008798: e8bd8ffc pop {r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
a00076e0 <rtems_termios_ioctl>:
rtems_status_code
rtems_termios_ioctl (void *arg)
{
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
a00076e0: e5903000 ldr r3, [r0]
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
a00076e4: e92d41f0 push {r4, r5, r6, r7, r8, lr}
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
a00076e8: e5934034 ldr r4, [r3, #52] ; 0x34
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
rtems_status_code sc;
args->ioctl_return = 0;
a00076ec: e3a01000 mov r1, #0
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;
a00076f0: e5907008 ldr r7, [r0, #8]
rtems_status_code sc;
args->ioctl_return = 0;
a00076f4: e580100c str r1, [r0, #12]
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
a00076f8: e1a05000 mov r5, r0
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);
a00076fc: e1a02001 mov r2, r1
a0007700: e5940018 ldr r0, [r4, #24]
a0007704: eb000735 bl a00093e0 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
a0007708: e2506000 subs r6, r0, #0
a000770c: 1a0000d0 bne a0007a54 <rtems_termios_ioctl+0x374>
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
a0007710: e5953004 ldr r3, [r5, #4]
a0007714: e3530004 cmp r3, #4
a0007718: 0a0000a6 beq a00079b8 <rtems_termios_ioctl+0x2d8>
a000771c: 8a000005 bhi a0007738 <rtems_termios_ioctl+0x58>
a0007720: e3530002 cmp r3, #2
a0007724: 0a000028 beq a00077cc <rtems_termios_ioctl+0xec>
a0007728: 8a00009b bhi a000799c <rtems_termios_ioctl+0x2bc>
a000772c: e3530001 cmp r3, #1
a0007730: 1a000010 bne a0007778 <rtems_termios_ioctl+0x98>
a0007734: ea00001a b a00077a4 <rtems_termios_ioctl+0xc4>
a0007738: e59f2320 ldr r2, [pc, #800] ; a0007a60 <rtems_termios_ioctl+0x380>
a000773c: e1530002 cmp r3, r2
a0007740: 0a0000b6 beq a0007a20 <rtems_termios_ioctl+0x340>
a0007744: 8a000002 bhi a0007754 <rtems_termios_ioctl+0x74>
a0007748: e3530005 cmp r3, #5
a000774c: 1a000009 bne a0007778 <rtems_termios_ioctl+0x98>
a0007750: ea000094 b a00079a8 <rtems_termios_ioctl+0x2c8>
a0007754: e59f2308 ldr r2, [pc, #776] ; a0007a64 <rtems_termios_ioctl+0x384>
a0007758: e1530002 cmp r3, r2
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;
a000775c: 05953008 ldreq r3, [r5, #8]
a0007760: 059420cc ldreq r2, [r4, #204] ; 0xcc
a0007764: 05832000 streq r2, [r3]
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
a0007768: 0a0000b7 beq a0007a4c <rtems_termios_ioctl+0x36c>
a000776c: e2822105 add r2, r2, #1073741825 ; 0x40000001
a0007770: e1530002 cmp r3, r2
a0007774: 0a000093 beq a00079c8 <rtems_termios_ioctl+0x2e8>
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
a0007778: e59420cc ldr r2, [r4, #204] ; 0xcc <== NOT EXECUTED
a000777c: e59f32e4 ldr r3, [pc, #740] ; a0007a68 <rtems_termios_ioctl+0x388><== NOT EXECUTED
a0007780: e0833282 add r3, r3, r2, lsl #5 <== NOT EXECUTED
a0007784: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED
a0007788: e3530000 cmp r3, #0 <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
}
else {
sc = RTEMS_INVALID_NUMBER;
a000778c: 03a0600a moveq r6, #10 <== NOT EXECUTED
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
a0007790: 0a0000ad beq a0007a4c <rtems_termios_ioctl+0x36c> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
a0007794: e1a00004 mov r0, r4 <== NOT EXECUTED
a0007798: e1a01005 mov r1, r5 <== NOT EXECUTED
a000779c: e12fff33 blx r3 <== NOT EXECUTED
a00077a0: ea00009c b a0007a18 <rtems_termios_ioctl+0x338> <== NOT EXECUTED
sc = RTEMS_INVALID_NUMBER;
}
break;
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
a00077a4: e5957008 ldr r7, [r5, #8]
a00077a8: e284c030 add ip, r4, #48 ; 0x30
a00077ac: e8bc000f ldm ip!, {r0, r1, r2, r3}
a00077b0: e1a0e007 mov lr, r7
a00077b4: e8ae000f stmia lr!, {r0, r1, r2, r3}
a00077b8: e8bc000f ldm ip!, {r0, r1, r2, r3}
a00077bc: e8ae000f stmia lr!, {r0, r1, r2, r3}
a00077c0: e59c3000 ldr r3, [ip]
a00077c4: e58e3000 str r3, [lr]
break;
a00077c8: ea00009f b a0007a4c <rtems_termios_ioctl+0x36c>
case RTEMS_IO_SET_ATTRIBUTES:
tty->termios = *(struct termios *)args->buffer;
a00077cc: e595e008 ldr lr, [r5, #8]
a00077d0: e284c030 add ip, r4, #48 ; 0x30
a00077d4: e8be000f ldm lr!, {r0, r1, r2, r3}
a00077d8: e8ac000f stmia ip!, {r0, r1, r2, r3}
a00077dc: e8be000f ldm lr!, {r0, r1, r2, r3}
a00077e0: e8ac000f stmia ip!, {r0, r1, r2, r3}
a00077e4: e59e3000 ldr r3, [lr]
a00077e8: e58c3000 str r3, [ip]
/*
* check for flow control options to be switched off
*/
/* check for outgoing XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXON) &&
a00077ec: e59430b8 ldr r3, [r4, #184] ; 0xb8
a00077f0: e3130c02 tst r3, #512 ; 0x200
a00077f4: 0a000018 beq a000785c <rtems_termios_ioctl+0x17c>
!(tty->termios.c_iflag & IXON)) {
a00077f8: e5943030 ldr r3, [r4, #48] ; 0x30
/*
* check for flow control options to be switched off
*/
/* check for outgoing XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXON) &&
a00077fc: e3130b01 tst r3, #1024 ; 0x400
a0007800: 1a000015 bne a000785c <rtems_termios_ioctl+0x17c>
!(tty->termios.c_iflag & IXON)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF);
a0007804: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
a0007808: e3c33e21 bic r3, r3, #528 ; 0x210 <== NOT EXECUTED
a000780c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
a0007810: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
a0007814: e3130020 tst r3, #32 <== NOT EXECUTED
a0007818: 0a00000f beq a000785c <rtems_termios_ioctl+0x17c> <== NOT EXECUTED
/* disable interrupts */
rtems_interrupt_disable(level);
a000781c: ebfffe11 bl a0007068 <arm_interrupt_disable> <== NOT EXECUTED
a0007820: e1a07000 mov r7, r0 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
a0007824: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
a0007828: e3c33020 bic r3, r3, #32 <== NOT EXECUTED
a000782c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
a0007830: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED
a0007834: e3530000 cmp r3, #0 <== NOT EXECUTED
a0007838: 0a000006 beq a0007858 <rtems_termios_ioctl+0x178> <== NOT EXECUTED
/* if chars available, call write function... */
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
a000783c: e5942084 ldr r2, [r4, #132] ; 0x84 <== 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)(
a0007840: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED
a0007844: e59430a4 ldr r3, [r4, #164] ; 0xa4 <== NOT EXECUTED
a0007848: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
a000784c: e0811002 add r1, r1, r2 <== NOT EXECUTED
a0007850: e3a02001 mov r2, #1 <== NOT EXECUTED
a0007854: e12fff33 blx r3 <== NOT EXECUTED
a0007858: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED
/* reenable interrupts */
rtems_interrupt_enable(level);
}
}
/* check for incoming XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXOF) && !(tty->termios.c_iflag & IXOFF)) {
a000785c: e59430b8 ldr r3, [r4, #184] ; 0xb8
a0007860: e3130b01 tst r3, #1024 ; 0x400
a0007864: 0a000008 beq a000788c <rtems_termios_ioctl+0x1ac>
a0007868: e5943030 ldr r3, [r4, #48] ; 0x30 <== NOT EXECUTED
a000786c: e3130a01 tst r3, #4096 ; 0x1000 <== NOT EXECUTED
a0007870: 1a000005 bne a000788c <rtems_termios_ioctl+0x1ac> <== NOT EXECUTED
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXOF);
a0007874: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
a0007878: e3c33b01 bic r3, r3, #1024 ; 0x400 <== NOT EXECUTED
a000787c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* FIXME: what happens, if we had sent XOFF but not yet XON? */
tty->flow_ctrl &= ~(FL_ISNTXOF);
a0007880: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
a0007884: e3c33002 bic r3, r3, #2 <== NOT EXECUTED
a0007888: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
}
/* check for incoming RTS/CTS flow control switched off */
if (( tty->flow_ctrl & FL_MDRTS) && !(tty->termios.c_cflag & CRTSCTS)) {
a000788c: e59430b8 ldr r3, [r4, #184] ; 0xb8
a0007890: e3130c01 tst r3, #256 ; 0x100
a0007894: 0a000010 beq a00078dc <rtems_termios_ioctl+0x1fc>
a0007898: e5943038 ldr r3, [r4, #56] ; 0x38 <== NOT EXECUTED
a000789c: e3530000 cmp r3, #0 <== NOT EXECUTED
a00078a0: ba00000d blt a00078dc <rtems_termios_ioctl+0x1fc> <== NOT EXECUTED
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDRTS);
a00078a4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
a00078a8: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED
a00078ac: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* restart remote Tx, if it was stopped */
if ((tty->flow_ctrl & FL_IRTSOFF) && (tty->device.startRemoteTx != NULL)) {
a00078b0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
a00078b4: e3130004 tst r3, #4 <== NOT EXECUTED
a00078b8: 0a000004 beq a00078d0 <rtems_termios_ioctl+0x1f0> <== NOT EXECUTED
a00078bc: e59430b0 ldr r3, [r4, #176] ; 0xb0 <== NOT EXECUTED
a00078c0: e3530000 cmp r3, #0 <== NOT EXECUTED
a00078c4: 0a000001 beq a00078d0 <rtems_termios_ioctl+0x1f0> <== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
a00078c8: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
a00078cc: e12fff33 blx r3 <== NOT EXECUTED
}
tty->flow_ctrl &= ~(FL_IRTSOFF);
a00078d0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
a00078d4: e3c33004 bic r3, r3, #4 <== NOT EXECUTED
a00078d8: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/*
* check for flow control options to be switched on
*/
/* check for incoming RTS/CTS flow control switched on */
if (tty->termios.c_cflag & CRTSCTS) {
a00078dc: e5943038 ldr r3, [r4, #56] ; 0x38
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) {
a00078e0: e594703c ldr r7, [r4, #60] ; 0x3c
/*
* check for flow control options to be switched on
*/
/* check for incoming RTS/CTS flow control switched on */
if (tty->termios.c_cflag & CRTSCTS) {
a00078e4: e3530000 cmp r3, #0
tty->flow_ctrl |= FL_MDRTS;
a00078e8: b59430b8 ldrlt r3, [r4, #184] ; 0xb8
a00078ec: b3833c01 orrlt r3, r3, #256 ; 0x100
a00078f0: b58430b8 strlt r3, [r4, #184] ; 0xb8
}
/* check for incoming XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXOFF) {
a00078f4: e5943030 ldr r3, [r4, #48] ; 0x30
a00078f8: e3130a01 tst r3, #4096 ; 0x1000
tty->flow_ctrl |= FL_MDXOF;
a00078fc: 159420b8 ldrne r2, [r4, #184] ; 0xb8
a0007900: 13822b01 orrne r2, r2, #1024 ; 0x400
a0007904: 158420b8 strne r2, [r4, #184] ; 0xb8
}
/* check for outgoing XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXON) {
a0007908: e3130b01 tst r3, #1024 ; 0x400
tty->flow_ctrl |= FL_MDXON;
a000790c: 159430b8 ldrne r3, [r4, #184] ; 0xb8
a0007910: 13833c02 orrne r3, r3, #512 ; 0x200
a0007914: 158430b8 strne r3, [r4, #184] ; 0xb8
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) {
a0007918: e2177002 ands r7, r7, #2
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
a000791c: 13a03000 movne r3, #0
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) {
a0007920: 1a000013 bne a0007974 <rtems_termios_ioctl+0x294>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
a0007924: e5d48046 ldrb r8, [r4, #70] ; 0x46
rtems_clock_get_ticks_per_second() / 10;
a0007928: eb000518 bl a0008d90 <rtems_clock_get_ticks_per_second>
a000792c: e3a0100a mov r1, #10
a0007930: e0000098 mul r0, r8, r0
a0007934: eb003013 bl a0013988 <__aeabi_uidiv>
if (tty->termios.c_cc[VTIME]) {
a0007938: e5d43046 ldrb r3, [r4, #70] ; 0x46
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] *
a000793c: e5840054 str r0, [r4, #84] ; 0x54
a0007940: e5d42047 ldrb r2, [r4, #71] ; 0x47
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
a0007944: e3530000 cmp r3, #0
a0007948: 0a000005 beq a0007964 <rtems_termios_ioctl+0x284>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
if (tty->termios.c_cc[VMIN])
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
a000794c: e3520000 cmp r2, #0
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
a0007950: e5840070 str r0, [r4, #112] ; 0x70
if (tty->termios.c_cc[VMIN])
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
a0007954: 13a00000 movne r0, #0
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
a0007958: e584706c str r7, [r4, #108] ; 0x6c
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
if (tty->termios.c_cc[VMIN])
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
a000795c: e5840074 str r0, [r4, #116] ; 0x74
a0007960: ea000006 b a0007980 <rtems_termios_ioctl+0x2a0>
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
} else {
if (tty->termios.c_cc[VMIN]) {
a0007964: e3520000 cmp r2, #0
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
a0007968: 03a03001 moveq r3, #1
a000796c: 0584306c streq r3, [r4, #108] ; 0x6c
if (tty->termios.c_cc[VMIN])
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
} else {
if (tty->termios.c_cc[VMIN]) {
a0007970: 0a000002 beq a0007980 <rtems_termios_ioctl+0x2a0>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
a0007974: e584306c str r3, [r4, #108] ; 0x6c
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
a0007978: e5843070 str r3, [r4, #112] ; 0x70
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
a000797c: e5843074 str r3, [r4, #116] ; 0x74
} else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
}
}
}
if (tty->device.setAttributes)
a0007980: e59430a8 ldr r3, [r4, #168] ; 0xa8
a0007984: e3530000 cmp r3, #0
a0007988: 0a00002f beq a0007a4c <rtems_termios_ioctl+0x36c>
(*tty->device.setAttributes)(tty->minor, &tty->termios);
a000798c: e5940010 ldr r0, [r4, #16]
a0007990: e2841030 add r1, r4, #48 ; 0x30
a0007994: e12fff33 blx r3
a0007998: ea00002b b a0007a4c <rtems_termios_ioctl+0x36c>
break;
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
a000799c: e1a00004 mov r0, r4
a00079a0: ebfffdb4 bl a0007078 <drainOutput>
break;
a00079a4: ea000028 b a0007a4c <rtems_termios_ioctl+0x36c>
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
a00079a8: e897000c ldm r7, {r2, r3}
a00079ac: e58420d4 str r2, [r4, #212] ; 0xd4
a00079b0: e58430d8 str r3, [r4, #216] ; 0xd8
break;
a00079b4: ea000024 b a0007a4c <rtems_termios_ioctl+0x36c>
case RTEMS_IO_RCVWAKEUP:
tty->tty_rcv = *wakeup;
a00079b8: e897000c ldm r7, {r2, r3}
a00079bc: e58420dc str r2, [r4, #220] ; 0xdc
a00079c0: e58430e0 str r3, [r4, #224] ; 0xe0
break;
a00079c4: ea000020 b a0007a4c <rtems_termios_ioctl+0x36c>
#if 1 /* FIXME */
case TIOCSETD:
/*
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
a00079c8: e59420cc ldr r2, [r4, #204] ; 0xcc
a00079cc: e59f3094 ldr r3, [pc, #148] ; a0007a68 <rtems_termios_ioctl+0x388>
a00079d0: e0833282 add r3, r3, r2, lsl #5
a00079d4: e5933004 ldr r3, [r3, #4]
a00079d8: e3530000 cmp r3, #0
a00079dc: 0a000002 beq a00079ec <rtems_termios_ioctl+0x30c>
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
a00079e0: e1a00004 mov r0, r4
a00079e4: e12fff33 blx r3
a00079e8: e1a06000 mov r6, r0
}
tty->t_line=*(int*)(args->buffer);
a00079ec: e5953008 ldr r3, [r5, #8]
tty->t_sc = NULL; /* ensure that no more valid data */
a00079f0: e3a02000 mov r2, #0
* 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);
a00079f4: e5933000 ldr r3, [r3]
tty->t_sc = NULL; /* ensure that no more valid data */
a00079f8: e58420d0 str r2, [r4, #208] ; 0xd0
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
a00079fc: e59f2064 ldr r2, [pc, #100] ; a0007a68 <rtems_termios_ioctl+0x388>
* 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);
a0007a00: e58430cc str r3, [r4, #204] ; 0xcc
tty->t_sc = NULL; /* ensure that no more valid data */
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
a0007a04: e7923283 ldr r3, [r2, r3, lsl #5]
a0007a08: e3530000 cmp r3, #0
a0007a0c: 0a00000e beq a0007a4c <rtems_termios_ioctl+0x36c>
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
a0007a10: e1a00004 mov r0, r4
a0007a14: e12fff33 blx r3
a0007a18: e1a06000 mov r6, r0
a0007a1c: ea00000a b a0007a4c <rtems_termios_ioctl+0x36c>
case TIOCGETD:
*(int*)(args->buffer)=tty->t_line;
break;
#endif
case FIONREAD: {
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
a0007a20: e5942060 ldr r2, [r4, #96] ; 0x60 <== NOT EXECUTED
a0007a24: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED
if ( rawnc < 0 )
rawnc += tty->rawInBuf.Size;
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
a0007a28: e5940020 ldr r0, [r4, #32] <== NOT EXECUTED
a0007a2c: e5941024 ldr r1, [r4, #36] ; 0x24 <== NOT EXECUTED
*(int*)(args->buffer)=tty->t_line;
break;
#endif
case FIONREAD: {
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
if ( rawnc < 0 )
a0007a30: e0523003 subs r3, r2, r3 <== NOT EXECUTED
rawnc += tty->rawInBuf.Size;
a0007a34: 45942064 ldrmi r2, [r4, #100] ; 0x64 <== NOT EXECUTED
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
a0007a38: e0611000 rsb r1, r1, r0 <== NOT EXECUTED
break;
#endif
case FIONREAD: {
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
if ( rawnc < 0 )
rawnc += tty->rawInBuf.Size;
a0007a3c: 40833002 addmi r3, r3, r2 <== NOT EXECUTED
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
a0007a40: e5952008 ldr r2, [r5, #8] <== NOT EXECUTED
a0007a44: e0813003 add r3, r1, r3 <== NOT EXECUTED
a0007a48: e5823000 str r3, [r2] <== NOT EXECUTED
}
break;
}
rtems_semaphore_release (tty->osem);
a0007a4c: e5940018 ldr r0, [r4, #24]
a0007a50: eb0006a8 bl a00094f8 <rtems_semaphore_release>
args->ioctl_return = sc;
a0007a54: e585600c str r6, [r5, #12]
return sc;
}
a0007a58: e1a00006 mov r0, r6
a0007a5c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
a0008ee8 <rtems_termios_number_to_baud>:
extern rtems_assoc_t termios_assoc_table[];
int rtems_termios_number_to_baud(
int32_t baud
)
{
a0008ee8: e92d4010 push {r4, lr} <== NOT EXECUTED
a0008eec: e1a04000 mov r4, r0 <== NOT EXECUTED
int termios_baud;
termios_baud = rtems_assoc_remote_by_local( termios_assoc_table, baud );
a0008ef0: e1a01004 mov r1, r4 <== NOT EXECUTED
a0008ef4: e59f001c ldr r0, [pc, #28] ; a0008f18 <rtems_termios_number_to_baud+0x30><== NOT EXECUTED
a0008ef8: eb001aa5 bl a000f994 <rtems_assoc_remote_by_local> <== NOT EXECUTED
if ( termios_baud == 0 && baud != 0 )
a0008efc: e2703001 rsbs r3, r0, #1 <== NOT EXECUTED
a0008f00: 33a03000 movcc r3, #0 <== NOT EXECUTED
a0008f04: e3540000 cmp r4, #0 <== NOT EXECUTED
a0008f08: 03a03000 moveq r3, #0 <== NOT EXECUTED
a0008f0c: e3530000 cmp r3, #0 <== NOT EXECUTED
return -1;
return termios_baud;
}
a0008f10: 13e00000 mvnne r0, #0 <== NOT EXECUTED
a0008f14: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a00070d8 <rtems_termios_open>:
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
a00070d8: e92d4fff push {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, lr}
a00070dc: e58d300c str r3, [sp, #12]
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
a00070e0: e59f3404 ldr r3, [pc, #1028] ; a00074ec <rtems_termios_open+0x414>
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
a00070e4: e1a0a001 mov sl, r1
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
a00070e8: e3a01000 mov r1, #0
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
a00070ec: e1a09000 mov r9, r0
a00070f0: e1a08002 mov r8, r2
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
a00070f4: e5930000 ldr r0, [r3]
a00070f8: e1a02001 mov r2, r1
a00070fc: eb0008b7 bl a00093e0 <rtems_semaphore_obtain>
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
a0007100: e2506000 subs r6, r0, #0
a0007104: 1a0000ee bne a00074c4 <rtems_termios_open+0x3ec>
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
a0007108: e59f33e0 ldr r3, [pc, #992] ; a00074f0 <rtems_termios_open+0x418>
a000710c: e5937000 ldr r7, [r3]
a0007110: e1a05007 mov r5, r7
a0007114: ea000006 b a0007134 <rtems_termios_open+0x5c>
if ((tty->major == major) && (tty->minor == minor))
a0007118: e595300c ldr r3, [r5, #12]
a000711c: e1530009 cmp r3, r9
a0007120: 1a000002 bne a0007130 <rtems_termios_open+0x58>
a0007124: e5953010 ldr r3, [r5, #16]
a0007128: e153000a cmp r3, sl
a000712c: 0a0000c3 beq a0007440 <rtems_termios_open+0x368>
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) {
a0007130: e5955000 ldr r5, [r5]
a0007134: e3550000 cmp r5, #0
a0007138: 1afffff6 bne a0007118 <rtems_termios_open+0x40>
a000713c: ea0000e3 b a00074d0 <rtems_termios_open+0x3f8>
return RTEMS_NO_MEMORY;
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
a0007140: e59f23ac ldr r2, [pc, #940] ; a00074f4 <rtems_termios_open+0x41c>
a0007144: e5923000 ldr r3, [r2]
a0007148: e5853064 str r3, [r5, #100] ; 0x64
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
a000714c: e5950064 ldr r0, [r5, #100] ; 0x64
a0007150: e58d2008 str r2, [sp, #8]
a0007154: ebfffcfa bl a0006544 <malloc>
if (tty->rawInBuf.theBuf == NULL) {
a0007158: e3500000 cmp r0, #0
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
a000715c: e1a0b000 mov fp, r0
a0007160: e5850058 str r0, [r5, #88] ; 0x58
if (tty->rawInBuf.theBuf == NULL) {
a0007164: e59d2008 ldr r2, [sp, #8]
a0007168: 1a000006 bne a0007188 <rtems_termios_open+0xb0>
free(tty);
a000716c: e1a00005 mov r0, r5 <== NOT EXECUTED
a0007170: ebfffc15 bl a00061cc <free> <== NOT EXECUTED
rtems_semaphore_release (rtems_termios_ttyMutex);
a0007174: e59f3370 ldr r3, [pc, #880] ; a00074ec <rtems_termios_open+0x414><== NOT EXECUTED
return RTEMS_NO_MEMORY;
a0007178: e3a0601a mov r6, #26 <== NOT EXECUTED
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
if (tty->rawInBuf.theBuf == NULL) {
free(tty);
rtems_semaphore_release (rtems_termios_ttyMutex);
a000717c: e5930000 ldr r0, [r3] <== NOT EXECUTED
a0007180: eb0008dc bl a00094f8 <rtems_semaphore_release> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
a0007184: ea0000ce b a00074c4 <rtems_termios_open+0x3ec> <== NOT EXECUTED
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
a0007188: e5923004 ldr r3, [r2, #4]
a000718c: e5853088 str r3, [r5, #136] ; 0x88
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
a0007190: e5950088 ldr r0, [r5, #136] ; 0x88
a0007194: e58d2008 str r2, [sp, #8]
a0007198: ebfffce9 bl a0006544 <malloc>
if (tty->rawOutBuf.theBuf == NULL) {
a000719c: e3500000 cmp r0, #0
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
a00071a0: e1a03000 mov r3, r0
a00071a4: e585007c str r0, [r5, #124] ; 0x7c
if (tty->rawOutBuf.theBuf == NULL) {
a00071a8: e59d2008 ldr r2, [sp, #8]
a00071ac: 0a000008 beq a00071d4 <rtems_termios_open+0xfc>
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
a00071b0: e5920008 ldr r0, [r2, #8]
a00071b4: e58d3008 str r3, [sp, #8]
a00071b8: ebfffce1 bl a0006544 <malloc>
if (tty->cbuf == NULL) {
a00071bc: e3500000 cmp r0, #0
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
a00071c0: e585001c str r0, [r5, #28]
if (tty->cbuf == NULL) {
a00071c4: e59d3008 ldr r3, [sp, #8]
a00071c8: 1a000004 bne a00071e0 <rtems_termios_open+0x108>
free((void *)(tty->rawOutBuf.theBuf));
a00071cc: e1a00003 mov r0, r3 <== NOT EXECUTED
a00071d0: ebfffbfd bl a00061cc <free> <== NOT EXECUTED
free((void *)(tty->rawInBuf.theBuf));
a00071d4: e1a0000b mov r0, fp <== NOT EXECUTED
a00071d8: ebfffbfb bl a00061cc <free> <== NOT EXECUTED
a00071dc: eaffffe2 b a000716c <rtems_termios_open+0x94> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
}
/*
* Initialize wakeup callbacks
*/
tty->tty_snd.sw_pfn = NULL;
a00071e0: e3a03000 mov r3, #0
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
a00071e4: e5853004 str r3, [r5, #4]
if (rtems_termios_ttyHead != NULL)
a00071e8: e1570003 cmp r7, r3
return RTEMS_NO_MEMORY;
}
/*
* Initialize wakeup callbacks
*/
tty->tty_snd.sw_pfn = NULL;
a00071ec: e58530d4 str r3, [r5, #212] ; 0xd4
tty->tty_snd.sw_arg = NULL;
a00071f0: e58530d8 str r3, [r5, #216] ; 0xd8
tty->tty_rcv.sw_pfn = NULL;
a00071f4: e58530dc str r3, [r5, #220] ; 0xdc
tty->tty_rcv.sw_arg = NULL;
a00071f8: e58530e0 str r3, [r5, #224] ; 0xe0
tty->tty_rcvwakeup = 0;
a00071fc: e58530e4 str r3, [r5, #228] ; 0xe4
*/
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
a0007200: e59f32e8 ldr r3, [pc, #744] ; a00074f0 <rtems_termios_open+0x418>
* link tty
*/
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
rtems_termios_ttyHead->back = tty;
a0007204: 15875004 strne r5, [r7, #4]
tty->tty_rcvwakeup = 0;
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
a0007208: e5857000 str r7, [r5]
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
a000720c: e5834000 str r4, [r3]
if (rtems_termios_ttyTail == NULL)
a0007210: e59f32e0 ldr r3, [pc, #736] ; a00074f8 <rtems_termios_open+0x420>
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'i', c),
a0007214: e59f72d8 ldr r7, [pc, #728] ; a00074f4 <rtems_termios_open+0x41c>
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
a0007218: e59f02dc ldr r0, [pc, #732] ; a00074fc <rtems_termios_open+0x424>
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
a000721c: e5932000 ldr r2, [r3]
rtems_termios_ttyTail = tty;
tty->minor = minor;
a0007220: e584a010 str sl, [r4, #16]
tty->major = major;
a0007224: e584900c str r9, [r4, #12]
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
a0007228: e3520000 cmp r2, #0
rtems_termios_ttyTail = tty;
a000722c: 05834000 streq r4, [r3]
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'i', c),
a0007230: e5d7300c ldrb r3, [r7, #12]
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
a0007234: e2842014 add r2, r4, #20
a0007238: e58d2000 str r2, [sp]
a000723c: e1830000 orr r0, r3, r0
a0007240: e3a01001 mov r1, #1
a0007244: e3a03000 mov r3, #0
a0007248: e3a02054 mov r2, #84 ; 0x54
a000724c: eb0007d1 bl a0009198 <rtems_semaphore_create>
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)
a0007250: e2503000 subs r3, r0, #0
a0007254: 1a000096 bne a00074b4 <rtems_termios_open+0x3dc>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'o', c),
a0007258: e5d7200c ldrb r2, [r7, #12]
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 (
a000725c: e59f029c ldr r0, [pc, #668] ; a0007500 <rtems_termios_open+0x428>
a0007260: e2841018 add r1, r4, #24
a0007264: e58d1000 str r1, [sp]
a0007268: e1820000 orr r0, r2, r0
a000726c: e3a01001 mov r1, #1
a0007270: e3a02054 mov r2, #84 ; 0x54
a0007274: eb0007c7 bl a0009198 <rtems_semaphore_create>
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)
a0007278: e2501000 subs r1, r0, #0
a000727c: 1a00008c bne a00074b4 <rtems_termios_open+0x3dc>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'x', c),
a0007280: e5d7300c ldrb r3, [r7, #12]
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 (
a0007284: e59f0278 ldr r0, [pc, #632] ; a0007504 <rtems_termios_open+0x42c>
a0007288: e284208c add r2, r4, #140 ; 0x8c
a000728c: e58d2000 str r2, [sp]
a0007290: e1830000 orr r0, r3, r0
a0007294: e3a02020 mov r2, #32
a0007298: e1a03001 mov r3, r1
a000729c: eb0007bd bl a0009198 <rtems_semaphore_create>
rtems_build_name ('T', 'R', 'x', c),
0,
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO,
RTEMS_NO_PRIORITY,
&tty->rawOutBuf.Semaphore);
if (sc != RTEMS_SUCCESSFUL)
a00072a0: e250b000 subs fp, r0, #0
a00072a4: 1a000082 bne a00074b4 <rtems_termios_open+0x3dc>
tty->rawOutBufState = rob_idle;
/*
* Set callbacks
*/
tty->device = *callbacks;
a00072a8: e59de00c ldr lr, [sp, #12]
a00072ac: e284c098 add ip, r4, #152 ; 0x98
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;
a00072b0: e584b094 str fp, [r4, #148] ; 0x94
/*
* Set callbacks
*/
tty->device = *callbacks;
a00072b4: e8be000f ldm lr!, {r0, r1, r2, r3}
a00072b8: e8ac000f stmia ip!, {r0, r1, r2, r3}
a00072bc: e89e000f ldm lr, {r0, r1, r2, r3}
a00072c0: e88c000f stm ip, {r0, r1, r2, r3}
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
a00072c4: e59430b4 ldr r3, [r4, #180] ; 0xb4
a00072c8: e3530002 cmp r3, #2
a00072cc: 1a000017 bne a0007330 <rtems_termios_open+0x258>
sc = rtems_task_create (
rtems_build_name ('T', 'x', 'T', c),
a00072d0: e5d7300c ldrb r3, [r7, #12]
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_create (
a00072d4: e59f022c ldr r0, [pc, #556] ; a0007508 <rtems_termios_open+0x430>
a00072d8: e28420c8 add r2, r4, #200 ; 0xc8
a00072dc: e58d2004 str r2, [sp, #4]
a00072e0: e1830000 orr r0, r3, r0
a00072e4: e3a02b01 mov r2, #1024 ; 0x400
a00072e8: e3a0100a mov r1, #10
a00072ec: e3a03c05 mov r3, #1280 ; 0x500
a00072f0: e58db000 str fp, [sp]
a00072f4: eb0008a6 bl a0009594 <rtems_task_create>
TERMIOS_TXTASK_STACKSIZE,
RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE |
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->txTaskId);
if (sc != RTEMS_SUCCESSFUL)
a00072f8: e2502000 subs r2, r0, #0
a00072fc: 1a00006c bne a00074b4 <rtems_termios_open+0x3dc>
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
rtems_build_name ('R', 'x', 'T', c),
a0007300: e5d7300c ldrb r3, [r7, #12]
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->txTaskId);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
a0007304: e59f0200 ldr r0, [pc, #512] ; a000750c <rtems_termios_open+0x434>
a0007308: e58d2000 str r2, [sp]
a000730c: e28420c4 add r2, r4, #196 ; 0xc4
a0007310: e58d2004 str r2, [sp, #4]
a0007314: e1830000 orr r0, r3, r0
a0007318: e3a01009 mov r1, #9
a000731c: e3a02b01 mov r2, #1024 ; 0x400
a0007320: e3a03c05 mov r3, #1280 ; 0x500
a0007324: eb00089a bl a0009594 <rtems_task_create>
TERMIOS_RXTASK_STACKSIZE,
RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE |
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->rxTaskId);
if (sc != RTEMS_SUCCESSFUL)
a0007328: e3500000 cmp r0, #0
a000732c: 1a000060 bne a00074b4 <rtems_termios_open+0x3dc>
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
a0007330: e59430a0 ldr r3, [r4, #160] ; 0xa0
a0007334: e3530000 cmp r3, #0
a0007338: 0a000002 beq a0007348 <rtems_termios_open+0x270>
a000733c: e59430b4 ldr r3, [r4, #180] ; 0xb4
a0007340: e3530002 cmp r3, #2
a0007344: 1a00000b bne a0007378 <rtems_termios_open+0x2a0>
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'r', c),
a0007348: e59f31a4 ldr r3, [pc, #420] ; a00074f4 <rtems_termios_open+0x41c>
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
a000734c: e59f01bc ldr r0, [pc, #444] ; a0007510 <rtems_termios_open+0x438>
a0007350: e2842068 add r2, r4, #104 ; 0x68
rtems_build_name ('T', 'R', 'r', c),
a0007354: e5d3300c ldrb r3, [r3, #12]
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
a0007358: e3a01000 mov r1, #0
a000735c: e58d2000 str r2, [sp]
a0007360: e1830000 orr r0, r3, r0
a0007364: e3a02024 mov r2, #36 ; 0x24
a0007368: e1a03001 mov r3, r1
a000736c: eb000789 bl a0009198 <rtems_semaphore_create>
rtems_build_name ('T', 'R', 'r', c),
0,
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->rawInBuf.Semaphore);
if (sc != RTEMS_SUCCESSFUL)
a0007370: e3500000 cmp r0, #0
a0007374: 1a00004e bne a00074b4 <rtems_termios_open+0x3dc>
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
a0007378: e59f3194 ldr r3, [pc, #404] ; a0007514 <rtems_termios_open+0x43c>
tty->termios.c_cc[VERASE] = '\177';
tty->termios.c_cc[VKILL] = '\025';
tty->termios.c_cc[VEOF] = '\004';
tty->termios.c_cc[VEOL] = '\000';
tty->termios.c_cc[VEOL2] = '\000';
tty->termios.c_cc[VSTART] = '\021';
a000737c: e3a02011 mov r2, #17
a0007380: e5c42049 strb r2, [r4, #73] ; 0x49
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
a0007384: e5843030 str r3, [r4, #48] ; 0x30
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
a0007388: e59f3188 ldr r3, [pc, #392] ; a0007518 <rtems_termios_open+0x440>
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';
a000738c: e2822002 add r2, r2, #2
a0007390: e5c4204a strb r2, [r4, #74] ; 0x4a
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
a0007394: e5843034 str r3, [r4, #52] ; 0x34
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
a0007398: e59f317c ldr r3, [pc, #380] ; a000751c <rtems_termios_open+0x444>
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';
a000739c: e2822007 add r2, r2, #7
a00073a0: e5c4204b strb r2, [r4, #75] ; 0x4b
/*
* 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;
a00073a4: e5843038 str r3, [r4, #56] ; 0x38
tty->termios.c_lflag =
a00073a8: e59f3170 ldr r3, [pc, #368] ; a0007520 <rtems_termios_open+0x448>
tty->termios.c_cc[VEOL] = '\000';
tty->termios.c_cc[VEOL2] = '\000';
tty->termios.c_cc[VSTART] = '\021';
tty->termios.c_cc[VSTOP] = '\023';
tty->termios.c_cc[VSUSP] = '\032';
tty->termios.c_cc[VREPRINT] = '\022';
a00073ac: e3a02012 mov r2, #18
a00073b0: e5c4204d strb r2, [r4, #77] ; 0x4d
* 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 =
a00073b4: e584303c str r3, [r4, #60] ; 0x3c
ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
a00073b8: e3a03003 mov r3, #3
a00073bc: e5c43041 strb r3, [r4, #65] ; 0x41
tty->termios.c_cc[VQUIT] = '\034';
a00073c0: e2833019 add r3, r3, #25
a00073c4: e5c43042 strb r3, [r4, #66] ; 0x42
tty->termios.c_cc[VERASE] = '\177';
a00073c8: e2833063 add r3, r3, #99 ; 0x63
a00073cc: e5c43043 strb r3, [r4, #67] ; 0x43
tty->termios.c_cc[VKILL] = '\025';
a00073d0: e3a03015 mov r3, #21
a00073d4: e5c43044 strb r3, [r4, #68] ; 0x44
tty->termios.c_cc[VEOF] = '\004';
a00073d8: e3a03004 mov r3, #4
a00073dc: e5c43045 strb r3, [r4, #69] ; 0x45
tty->termios.c_cc[VEOL] = '\000';
a00073e0: e3a03000 mov r3, #0
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;
a00073e4: e58430b8 str r3, [r4, #184] ; 0xb8
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';
a00073e8: e5c4304c strb r3, [r4, #76] ; 0x4c
tty->termios.c_cc[VEOL2] = '\000';
a00073ec: e5c43051 strb r3, [r4, #81] ; 0x51
/* 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;
a00073f0: e5943064 ldr r3, [r4, #100] ; 0x64
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';
a00073f4: e3a0200f mov r2, #15
a00073f8: e5c4204e strb r2, [r4, #78] ; 0x4e
/* 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;
a00073fc: e1a030a3 lsr r3, r3, #1
a0007400: e58430bc str r3, [r4, #188] ; 0xbc
tty->highwater = tty->rawInBuf.Size * 3/4;
a0007404: e5943064 ldr r3, [r4, #100] ; 0x64
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';
a0007408: e2822008 add r2, r2, #8
a000740c: e5c4204f strb r2, [r4, #79] ; 0x4f
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;
a0007410: e0833083 add r3, r3, r3, lsl #1
tty->termios.c_cc[VSTOP] = '\023';
tty->termios.c_cc[VSUSP] = '\032';
tty->termios.c_cc[VREPRINT] = '\022';
tty->termios.c_cc[VDISCARD] = '\017';
tty->termios.c_cc[VWERASE] = '\027';
tty->termios.c_cc[VLNEXT] = '\026';
a0007414: e3a02016 mov r2, #22
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;
a0007418: e1a03123 lsr r3, r3, #2
a000741c: e58430c0 str r3, [r4, #192] ; 0xc0
/*
* Bump name characer
*/
if (c++ == 'z')
a0007420: e59f30cc ldr r3, [pc, #204] ; a00074f4 <rtems_termios_open+0x41c>
tty->termios.c_cc[VSTOP] = '\023';
tty->termios.c_cc[VSUSP] = '\032';
tty->termios.c_cc[VREPRINT] = '\022';
tty->termios.c_cc[VDISCARD] = '\017';
tty->termios.c_cc[VWERASE] = '\027';
tty->termios.c_cc[VLNEXT] = '\026';
a0007424: e5c42050 strb r2, [r4, #80] ; 0x50
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
a0007428: e5d3200c ldrb r2, [r3, #12]
a000742c: e352007a cmp r2, #122 ; 0x7a
a0007430: e2821001 add r1, r2, #1
c = 'a';
a0007434: 03a02061 moveq r2, #97 ; 0x61
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
a0007438: e5c3100c strb r1, [r3, #12]
c = 'a';
a000743c: 05c3200c strbeq r2, [r3, #12]
}
args->iop->data1 = tty;
a0007440: e5983000 ldr r3, [r8]
a0007444: e5835034 str r5, [r3, #52] ; 0x34
if (!tty->refcount++) {
a0007448: e5953008 ldr r3, [r5, #8]
a000744c: e2832001 add r2, r3, #1
a0007450: e3530000 cmp r3, #0
a0007454: e5852008 str r2, [r5, #8]
a0007458: 1a000016 bne a00074b8 <rtems_termios_open+0x3e0>
if (tty->device.firstOpen)
a000745c: e5953098 ldr r3, [r5, #152] ; 0x98
a0007460: e3530000 cmp r3, #0
a0007464: 0a000003 beq a0007478 <rtems_termios_open+0x3a0>
(*tty->device.firstOpen)(major, minor, arg);
a0007468: e1a00009 mov r0, r9
a000746c: e1a0100a mov r1, sl
a0007470: e1a02008 mov r2, r8
a0007474: e12fff33 blx r3
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
a0007478: e59530b4 ldr r3, [r5, #180] ; 0xb4
a000747c: e3530002 cmp r3, #2
a0007480: 1a00000c bne a00074b8 <rtems_termios_open+0x3e0>
sc = rtems_task_start(
a0007484: e59500c4 ldr r0, [r5, #196] ; 0xc4
a0007488: e59f1094 ldr r1, [pc, #148] ; a0007524 <rtems_termios_open+0x44c>
a000748c: e1a02005 mov r2, r5
a0007490: eb0008e7 bl a0009834 <rtems_task_start>
tty->rxTaskId, rtems_termios_rxdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
a0007494: e3500000 cmp r0, #0
a0007498: 1a000005 bne a00074b4 <rtems_termios_open+0x3dc>
rtems_fatal_error_occurred (sc);
sc = rtems_task_start(
a000749c: e59500c8 ldr r0, [r5, #200] ; 0xc8
a00074a0: e59f1080 ldr r1, [pc, #128] ; a0007528 <rtems_termios_open+0x450>
a00074a4: e1a02005 mov r2, r5
a00074a8: eb0008e1 bl a0009834 <rtems_task_start>
tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
a00074ac: e3500000 cmp r0, #0
a00074b0: 0a000000 beq a00074b8 <rtems_termios_open+0x3e0>
rtems_fatal_error_occurred (sc);
a00074b4: eb000963 bl a0009a48 <rtems_fatal_error_occurred>
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
a00074b8: e59f302c ldr r3, [pc, #44] ; a00074ec <rtems_termios_open+0x414>
a00074bc: e5930000 ldr r0, [r3]
a00074c0: eb00080c bl a00094f8 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
}
a00074c4: e1a00006 mov r0, r6
a00074c8: e28dd010 add sp, sp, #16
a00074cc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
a00074d0: e3a00001 mov r0, #1
a00074d4: e3a010e8 mov r1, #232 ; 0xe8
a00074d8: ebfffad6 bl a0006038 <calloc>
if (tty == NULL) {
a00074dc: e2504000 subs r4, r0, #0
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
a00074e0: e1a05000 mov r5, r0
if (tty == NULL) {
a00074e4: 1affff15 bne a0007140 <rtems_termios_open+0x68>
a00074e8: eaffff21 b a0007174 <rtems_termios_open+0x9c> <== NOT EXECUTED
a0007a6c <rtems_termios_puts>:
* Send characters to device-specific code
*/
void
rtems_termios_puts (
const void *_buf, int len, struct rtems_termios_tty *tty)
{
a0007a6c: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
a0007a70: e1a04002 mov r4, r2
const unsigned char *buf = _buf;
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
a0007a74: e59220b4 ldr r2, [r2, #180] ; 0xb4
* Send characters to device-specific code
*/
void
rtems_termios_puts (
const void *_buf, int len, struct rtems_termios_tty *tty)
{
a0007a78: e1a03000 mov r3, r0
a0007a7c: e1a06001 mov r6, r1
const unsigned char *buf = _buf;
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
a0007a80: e3520000 cmp r2, #0
*/
void
rtems_termios_puts (
const void *_buf, int len, struct rtems_termios_tty *tty)
{
const unsigned char *buf = _buf;
a0007a84: e1a08000 mov r8, r0
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
a0007a88: 15945080 ldrne r5, [r4, #128] ; 0x80
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
rtems_interrupt_disable (level);
while (newHead == tty->rawOutBuf.Tail) {
tty->rawOutBufState = rob_wait;
a0007a8c: 13a0a002 movne sl, #2
(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;
a0007a90: 13a09001 movne r9, #1
const unsigned char *buf = _buf;
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
a0007a94: 1a000032 bne a0007b64 <rtems_termios_puts+0xf8>
(*tty->device.write)(tty->minor, (void *)buf, len);
a0007a98: e594c0a4 ldr ip, [r4, #164] ; 0xa4
a0007a9c: e5940010 ldr r0, [r4, #16]
a0007aa0: e1a01003 mov r1, r3
a0007aa4: e1a02006 mov r2, r6
a0007aa8: e12fff3c blx ip
return;
a0007aac: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
* len -= ncopy
*
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
a0007ab0: e5941088 ldr r1, [r4, #136] ; 0x88
a0007ab4: e2850001 add r0, r5, #1
a0007ab8: eb00304a bl a0013be8 <__umodsi3>
a0007abc: e1a05000 mov r5, r0
rtems_interrupt_disable (level);
a0007ac0: ebfffd68 bl a0007068 <arm_interrupt_disable>
a0007ac4: e1a07000 mov r7, r0
while (newHead == tty->rawOutBuf.Tail) {
a0007ac8: ea00000a b a0007af8 <rtems_termios_puts+0x8c>
tty->rawOutBufState = rob_wait;
a0007acc: e584a094 str sl, [r4, #148] ; 0x94 <== NOT EXECUTED
a0007ad0: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain(
a0007ad4: e3a01000 mov r1, #0 <== NOT EXECUTED
a0007ad8: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED
a0007adc: e1a02001 mov r2, r1 <== NOT EXECUTED
a0007ae0: eb00063e bl a00093e0 <rtems_semaphore_obtain> <== NOT EXECUTED
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
a0007ae4: e3500000 cmp r0, #0 <== NOT EXECUTED
a0007ae8: 0a000000 beq a0007af0 <rtems_termios_puts+0x84> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
a0007aec: eb0007d5 bl a0009a48 <rtems_fatal_error_occurred> <== NOT EXECUTED
rtems_interrupt_disable (level);
a0007af0: ebfffd5c bl a0007068 <arm_interrupt_disable> <== NOT EXECUTED
a0007af4: e1a07000 mov r7, r0 <== NOT EXECUTED
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
rtems_interrupt_disable (level);
while (newHead == tty->rawOutBuf.Tail) {
a0007af8: e5943084 ldr r3, [r4, #132] ; 0x84
a0007afc: e1550003 cmp r5, r3
a0007b00: 0afffff1 beq a0007acc <rtems_termios_puts+0x60>
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++;
a0007b04: e5943080 ldr r3, [r4, #128] ; 0x80
a0007b08: e4d81001 ldrb r1, [r8], #1
a0007b0c: e594207c ldr r2, [r4, #124] ; 0x7c
a0007b10: e7c21003 strb r1, [r2, r3]
tty->rawOutBuf.Head = newHead;
if (tty->rawOutBufState == rob_idle) {
a0007b14: e5943094 ldr r3, [r4, #148] ; 0x94
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
tty->rawOutBuf.Head = newHead;
a0007b18: e5845080 str r5, [r4, #128] ; 0x80
if (tty->rawOutBufState == rob_idle) {
a0007b1c: e3530000 cmp r3, #0
a0007b20: 1a00000d bne a0007b5c <rtems_termios_puts+0xf0>
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
a0007b24: e59430b8 ldr r3, [r4, #184] ; 0xb8
a0007b28: e3130010 tst r3, #16
(*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;
a0007b2c: 159430b8 ldrne r3, [r4, #184] ; 0xb8
a0007b30: 13833020 orrne r3, r3, #32
a0007b34: 158430b8 strne r3, [r4, #184] ; 0xb8
}
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)) {
a0007b38: 1a000006 bne a0007b58 <rtems_termios_puts+0xec>
(*tty->device.write)(tty->minor,
(char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
a0007b3c: e5942084 ldr r2, [r4, #132] ; 0x84
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,
a0007b40: e594107c ldr r1, [r4, #124] ; 0x7c
a0007b44: e59430a4 ldr r3, [r4, #164] ; 0xa4
a0007b48: e5940010 ldr r0, [r4, #16]
a0007b4c: e0811002 add r1, r1, r2
a0007b50: e3a02001 mov r2, #1
a0007b54: e12fff33 blx r3
(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;
a0007b58: e5849094 str r9, [r4, #148] ; 0x94
a0007b5c: e129f007 msr CPSR_fc, r7
}
rtems_interrupt_enable (level);
len--;
a0007b60: e2466001 sub r6, r6, #1
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
while (len) {
a0007b64: e3560000 cmp r6, #0
a0007b68: 1affffd0 bne a0007ab0 <rtems_termios_puts+0x44>
a0007b6c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
a00081c4 <rtems_termios_read>:
rtems_status_code
rtems_termios_read (void *arg)
{
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
a00081c4: e5903000 ldr r3, [r0] <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
a00081c8: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
a00081cc: e5934034 ldr r4, [r3, #52] ; 0x34 <== NOT EXECUTED
uint32_t count = args->count;
char *buffer = args->buffer;
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
a00081d0: e3a01000 mov r1, #0 <== NOT EXECUTED
rtems_status_code
rtems_termios_read (void *arg)
{
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
uint32_t count = args->count;
a00081d4: e5908010 ldr r8, [r0, #16] <== NOT EXECUTED
char *buffer = args->buffer;
a00081d8: e590b00c ldr fp, [r0, #12] <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
a00081dc: e1a05000 mov r5, r0 <== NOT EXECUTED
struct rtems_termios_tty *tty = args->iop->data1;
uint32_t count = args->count;
char *buffer = args->buffer;
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
a00081e0: e1a02001 mov r2, r1 <== NOT EXECUTED
a00081e4: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED
a00081e8: eb00047c bl a00093e0 <rtems_semaphore_obtain> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
a00081ec: e2507000 subs r7, r0, #0 <== NOT EXECUTED
a00081f0: 1a0000bd bne a00084ec <rtems_termios_read+0x328> <== NOT EXECUTED
return sc;
if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
a00081f4: e59420cc ldr r2, [r4, #204] ; 0xcc <== NOT EXECUTED
a00081f8: e59f32f4 ldr r3, [pc, #756] ; a00084f4 <rtems_termios_read+0x330><== NOT EXECUTED
a00081fc: e0833282 add r3, r3, r2, lsl #5 <== NOT EXECUTED
a0008200: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED
a0008204: e3530000 cmp r3, #0 <== NOT EXECUTED
a0008208: 0a000004 beq a0008220 <rtems_termios_read+0x5c> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
a000820c: e1a00004 mov r0, r4 <== NOT EXECUTED
a0008210: e1a01005 mov r1, r5 <== NOT EXECUTED
a0008214: e12fff33 blx r3 <== NOT EXECUTED
a0008218: e1a07000 mov r7, r0 <== NOT EXECUTED
a000821c: ea0000ae b a00084dc <rtems_termios_read+0x318> <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
a0008220: e5942024 ldr r2, [r4, #36] ; 0x24 <== NOT EXECUTED
a0008224: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED
a0008228: e1520003 cmp r2, r3 <== NOT EXECUTED
a000822c: 1a0000a1 bne a00084b8 <rtems_termios_read+0x2f4> <== NOT EXECUTED
tty->cindex = tty->ccount = 0;
tty->read_start_column = tty->column;
a0008230: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
a0008234: e5847020 str r7, [r4, #32] <== NOT EXECUTED
a0008238: e5847024 str r7, [r4, #36] ; 0x24 <== NOT EXECUTED
tty->read_start_column = tty->column;
a000823c: e584302c str r3, [r4, #44] ; 0x2c <== NOT EXECUTED
if (tty->device.pollRead != NULL &&
a0008240: e59430a0 ldr r3, [r4, #160] ; 0xa0 <== NOT EXECUTED
a0008244: e3530000 cmp r3, #0 <== NOT EXECUTED
a0008248: 0a00003b beq a000833c <rtems_termios_read+0x178> <== NOT EXECUTED
a000824c: e59430b4 ldr r3, [r4, #180] ; 0xb4 <== NOT EXECUTED
a0008250: e3530000 cmp r3, #0 <== NOT EXECUTED
a0008254: 1a000038 bne a000833c <rtems_termios_read+0x178> <== NOT EXECUTED
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
a0008258: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED
a000825c: e3130002 tst r3, #2 <== NOT EXECUTED
a0008260: 0a00000d beq a000829c <rtems_termios_read+0xd8> <== NOT EXECUTED
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
a0008264: e59430a0 ldr r3, [r4, #160] ; 0xa0 <== NOT EXECUTED
a0008268: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
a000826c: e12fff33 blx r3 <== NOT EXECUTED
if (n < 0) {
a0008270: e3500000 cmp r0, #0 <== NOT EXECUTED
a0008274: aa000002 bge a0008284 <rtems_termios_read+0xc0> <== NOT EXECUTED
rtems_task_wake_after (1);
a0008278: e3a00001 mov r0, #1 <== NOT EXECUTED
a000827c: eb000584 bl a0009894 <rtems_task_wake_after> <== NOT EXECUTED
a0008280: eafffff7 b a0008264 <rtems_termios_read+0xa0> <== NOT EXECUTED
} else {
if (siproc (n, tty))
a0008284: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED
a0008288: e1a01004 mov r1, r4 <== NOT EXECUTED
a000828c: ebffff88 bl a00080b4 <siproc> <== NOT EXECUTED
a0008290: e3500000 cmp r0, #0 <== NOT EXECUTED
a0008294: 0afffff2 beq a0008264 <rtems_termios_read+0xa0> <== NOT EXECUTED
a0008298: ea000086 b a00084b8 <rtems_termios_read+0x2f4> <== NOT EXECUTED
}
}
} else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
a000829c: eb0002c3 bl a0008db0 <rtems_clock_get_ticks_since_boot> <== NOT EXECUTED
a00082a0: e1a06000 mov r6, r0 <== NOT EXECUTED
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
a00082a4: e59430a0 ldr r3, [r4, #160] ; 0xa0 <== NOT EXECUTED
a00082a8: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
a00082ac: e12fff33 blx r3 <== NOT EXECUTED
if (n < 0) {
a00082b0: e3500000 cmp r0, #0 <== NOT EXECUTED
a00082b4: aa000013 bge a0008308 <rtems_termios_read+0x144> <== NOT EXECUTED
if (tty->termios.c_cc[VMIN]) {
a00082b8: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED
a00082bc: e3530000 cmp r3, #0 <== NOT EXECUTED
a00082c0: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED
a00082c4: 0a000005 beq a00082e0 <rtems_termios_read+0x11c> <== NOT EXECUTED
if (tty->termios.c_cc[VTIME] && tty->ccount) {
a00082c8: e3530000 cmp r3, #0 <== NOT EXECUTED
a00082cc: 0a00000a beq a00082fc <rtems_termios_read+0x138> <== NOT EXECUTED
a00082d0: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED
a00082d4: e3530000 cmp r3, #0 <== NOT EXECUTED
a00082d8: 0a000007 beq a00082fc <rtems_termios_read+0x138> <== NOT EXECUTED
a00082dc: ea000001 b a00082e8 <rtems_termios_read+0x124> <== NOT EXECUTED
if ((now - then) > tty->vtimeTicks) {
break;
}
}
} else {
if (!tty->termios.c_cc[VTIME])
a00082e0: e3530000 cmp r3, #0 <== NOT EXECUTED
a00082e4: 0a000073 beq a00084b8 <rtems_termios_read+0x2f4> <== NOT EXECUTED
break;
now = rtems_clock_get_ticks_since_boot();
a00082e8: eb0002b0 bl a0008db0 <rtems_clock_get_ticks_since_boot> <== NOT EXECUTED
if ((now - then) > tty->vtimeTicks) {
a00082ec: e5943054 ldr r3, [r4, #84] ; 0x54 <== NOT EXECUTED
a00082f0: e0660000 rsb r0, r6, r0 <== NOT EXECUTED
a00082f4: e1500003 cmp r0, r3 <== NOT EXECUTED
a00082f8: 8a00006e bhi a00084b8 <rtems_termios_read+0x2f4> <== NOT EXECUTED
break;
}
}
rtems_task_wake_after (1);
a00082fc: e3a00001 mov r0, #1 <== NOT EXECUTED
a0008300: eb000563 bl a0009894 <rtems_task_wake_after> <== NOT EXECUTED
a0008304: eaffffe6 b a00082a4 <rtems_termios_read+0xe0> <== NOT EXECUTED
} else {
siproc (n, tty);
a0008308: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED
a000830c: e1a01004 mov r1, r4 <== NOT EXECUTED
a0008310: ebffff67 bl a00080b4 <siproc> <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
a0008314: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED
a0008318: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED
a000831c: e1520003 cmp r2, r3 <== NOT EXECUTED
a0008320: aa000064 bge a00084b8 <rtems_termios_read+0x2f4> <== NOT EXECUTED
break;
if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
a0008324: e3530000 cmp r3, #0 <== NOT EXECUTED
a0008328: 0affffdd beq a00082a4 <rtems_termios_read+0xe0> <== NOT EXECUTED
a000832c: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED
a0008330: e3530000 cmp r3, #0 <== NOT EXECUTED
a0008334: 0affffda beq a00082a4 <rtems_termios_read+0xe0> <== NOT EXECUTED
a0008338: eaffffd7 b a000829c <rtems_termios_read+0xd8> <== NOT EXECUTED
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
|| (tty->flow_ctrl & FL_OSTOP))) {
/* XON should be sent now... */
(*tty->device.write)(
a000833c: e2842049 add r2, r4, #73 ; 0x49 <== NOT EXECUTED
* Fill the input buffer from the raw input queue
*/
static rtems_status_code
fillBufferQueue (struct rtems_termios_tty *tty)
{
rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout;
a0008340: e594a074 ldr sl, [r4, #116] ; 0x74 <== NOT EXECUTED
rtems_status_code sc;
int wait = (int)1;
a0008344: e3a06001 mov r6, #1 <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
(tty->ccount < (CBUFSIZE-1))) {
a0008348: e59f91a8 ldr r9, [pc, #424] ; a00084f8 <rtems_termios_read+0x334><== NOT EXECUTED
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
|| (tty->flow_ctrl & FL_OSTOP))) {
/* XON should be sent now... */
(*tty->device.write)(
a000834c: e58d2000 str r2, [sp] <== NOT EXECUTED
a0008350: ea000040 b a0008458 <rtems_termios_read+0x294> <== NOT EXECUTED
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
(tty->ccount < (CBUFSIZE-1))) {
unsigned char c;
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
a0008354: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED
a0008358: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED
a000835c: e2800001 add r0, r0, #1 <== NOT EXECUTED
a0008360: eb002e20 bl a0013be8 <__umodsi3> <== NOT EXECUTED
c = tty->rawInBuf.theBuf[newHead];
a0008364: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED
a0008368: e7d3a000 ldrb sl, [r3, r0] <== NOT EXECUTED
tty->rawInBuf.Head = newHead;
a000836c: e584005c str r0, [r4, #92] ; 0x5c <== NOT EXECUTED
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
a0008370: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED
a0008374: e5942064 ldr r2, [r4, #100] ; 0x64 <== NOT EXECUTED
% tty->rawInBuf.Size)
a0008378: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED
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)
a000837c: e0823003 add r3, r2, r3 <== NOT EXECUTED
% tty->rawInBuf.Size)
a0008380: e0600003 rsb r0, r0, r3 <== NOT EXECUTED
a0008384: eb002e17 bl a0013be8 <__umodsi3> <== NOT EXECUTED
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)
a0008388: e59430bc ldr r3, [r4, #188] ; 0xbc <== NOT EXECUTED
a000838c: e1500003 cmp r0, r3 <== NOT EXECUTED
a0008390: 2a00001f bcs a0008414 <rtems_termios_read+0x250> <== NOT EXECUTED
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
a0008394: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
a0008398: e3c33001 bic r3, r3, #1 <== NOT EXECUTED
a000839c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
a00083a0: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
a00083a4: e59f3150 ldr r3, [pc, #336] ; a00084fc <rtems_termios_read+0x338><== NOT EXECUTED
a00083a8: e0023003 and r3, r2, r3 <== NOT EXECUTED
a00083ac: e59f2148 ldr r2, [pc, #328] ; a00084fc <rtems_termios_read+0x338><== NOT EXECUTED
a00083b0: e1530002 cmp r3, r2 <== NOT EXECUTED
a00083b4: 1a00000b bne a00083e8 <rtems_termios_read+0x224> <== NOT EXECUTED
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
a00083b8: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED
a00083bc: e3530000 cmp r3, #0 <== NOT EXECUTED
a00083c0: 0a000002 beq a00083d0 <rtems_termios_read+0x20c> <== NOT EXECUTED
|| (tty->flow_ctrl & FL_OSTOP))) {
a00083c4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
a00083c8: e3130020 tst r3, #32 <== NOT EXECUTED
a00083cc: 0a000005 beq a00083e8 <rtems_termios_read+0x224> <== NOT EXECUTED
/* XON should be sent now... */
(*tty->device.write)(
a00083d0: e59430a4 ldr r3, [r4, #164] ; 0xa4 <== NOT EXECUTED
a00083d4: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
a00083d8: e59d1000 ldr r1, [sp] <== NOT EXECUTED
a00083dc: e3a02001 mov r2, #1 <== NOT EXECUTED
a00083e0: e12fff33 blx r3 <== NOT EXECUTED
a00083e4: ea00000a b a0008414 <rtems_termios_read+0x250> <== NOT EXECUTED
tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
} else if (tty->flow_ctrl & FL_MDRTS) {
a00083e8: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
a00083ec: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED
a00083f0: 0a000007 beq a0008414 <rtems_termios_read+0x250> <== NOT EXECUTED
tty->flow_ctrl &= ~FL_IRTSOFF;
a00083f4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
a00083f8: e3c33004 bic r3, r3, #4 <== NOT EXECUTED
a00083fc: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
a0008400: e59430b0 ldr r3, [r4, #176] ; 0xb0 <== NOT EXECUTED
a0008404: e3530000 cmp r3, #0 <== NOT EXECUTED
a0008408: 0a000001 beq a0008414 <rtems_termios_read+0x250> <== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
a000840c: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
a0008410: e12fff33 blx r3 <== NOT EXECUTED
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
a0008414: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED
a0008418: e3130002 tst r3, #2 <== NOT EXECUTED
a000841c: 0a000005 beq a0008438 <rtems_termios_read+0x274> <== NOT EXECUTED
if (siproc (c, tty))
a0008420: e1a0000a mov r0, sl <== NOT EXECUTED
a0008424: e1a01004 mov r1, r4 <== NOT EXECUTED
a0008428: ebffff21 bl a00080b4 <siproc> <== NOT EXECUTED
wait = 0;
a000842c: e3500000 cmp r0, #0 <== NOT EXECUTED
a0008430: 13a06000 movne r6, #0 <== NOT EXECUTED
a0008434: ea000006 b a0008454 <rtems_termios_read+0x290> <== NOT EXECUTED
} else {
siproc (c, tty);
a0008438: e1a0000a mov r0, sl <== NOT EXECUTED
a000843c: e1a01004 mov r1, r4 <== NOT EXECUTED
a0008440: ebffff1b bl a00080b4 <siproc> <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
a0008444: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED
a0008448: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED
wait = 0;
a000844c: e1520003 cmp r2, r3 <== NOT EXECUTED
a0008450: a3a06000 movge r6, #0 <== NOT EXECUTED
}
timeout = tty->rawInBufSemaphoreTimeout;
a0008454: e594a070 ldr sl, [r4, #112] ; 0x70 <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
a0008458: e594205c ldr r2, [r4, #92] ; 0x5c <== NOT EXECUTED
a000845c: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED
a0008460: e1520003 cmp r2, r3 <== NOT EXECUTED
a0008464: 0a000004 beq a000847c <rtems_termios_read+0x2b8> <== NOT EXECUTED
(tty->ccount < (CBUFSIZE-1))) {
a0008468: e5993008 ldr r3, [r9, #8] <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
a000846c: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED
(tty->ccount < (CBUFSIZE-1))) {
a0008470: e2433001 sub r3, r3, #1 <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
a0008474: e1520003 cmp r2, r3 <== NOT EXECUTED
a0008478: baffffb5 blt a0008354 <rtems_termios_read+0x190> <== NOT EXECUTED
}
/*
* Wait for characters
*/
if ( wait ) {
a000847c: e3560000 cmp r6, #0 <== NOT EXECUTED
a0008480: 0a00000c beq a00084b8 <rtems_termios_read+0x2f4> <== NOT EXECUTED
sc = rtems_semaphore_obtain(
a0008484: e5940068 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED
a0008488: e594106c ldr r1, [r4, #108] ; 0x6c <== NOT EXECUTED
a000848c: e1a0200a mov r2, sl <== NOT EXECUTED
a0008490: eb0003d2 bl a00093e0 <rtems_semaphore_obtain> <== NOT EXECUTED
tty->rawInBuf.Semaphore, tty->rawInBufSemaphoreOptions, timeout);
if (sc != RTEMS_SUCCESSFUL)
a0008494: e3500000 cmp r0, #0 <== NOT EXECUTED
a0008498: 0affffee beq a0008458 <rtems_termios_read+0x294> <== NOT EXECUTED
a000849c: ea000005 b a00084b8 <rtems_termios_read+0x2f4> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
*buffer++ = tty->cbuf[tty->cindex++];
a00084a0: e594201c ldr r2, [r4, #28] <== NOT EXECUTED
count--;
a00084a4: e2488001 sub r8, r8, #1 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
*buffer++ = tty->cbuf[tty->cindex++];
a00084a8: e7d22003 ldrb r2, [r2, r3] <== NOT EXECUTED
a00084ac: e2833001 add r3, r3, #1 <== NOT EXECUTED
a00084b0: e4cb2001 strb r2, [fp], #1 <== NOT EXECUTED
a00084b4: e5843024 str r3, [r4, #36] ; 0x24 <== NOT EXECUTED
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
a00084b8: e3580000 cmp r8, #0 <== NOT EXECUTED
a00084bc: 0a000003 beq a00084d0 <rtems_termios_read+0x30c> <== NOT EXECUTED
a00084c0: e5943024 ldr r3, [r4, #36] ; 0x24 <== NOT EXECUTED
a00084c4: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED
a00084c8: e1530002 cmp r3, r2 <== NOT EXECUTED
a00084cc: bafffff3 blt a00084a0 <rtems_termios_read+0x2dc> <== NOT EXECUTED
*buffer++ = tty->cbuf[tty->cindex++];
count--;
}
args->bytes_moved = args->count - count;
a00084d0: e5953010 ldr r3, [r5, #16] <== NOT EXECUTED
a00084d4: e0688003 rsb r8, r8, r3 <== NOT EXECUTED
a00084d8: e5858018 str r8, [r5, #24] <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
a00084dc: e3a03000 mov r3, #0 <== NOT EXECUTED
a00084e0: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED
rtems_semaphore_release (tty->isem);
a00084e4: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED
a00084e8: eb000402 bl a00094f8 <rtems_semaphore_release> <== NOT EXECUTED
return sc;
}
a00084ec: e1a00007 mov r0, r7 <== NOT EXECUTED
a00084f0: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
a000880c <rtems_termios_refill_transmitter>:
int nToSend;
rtems_interrupt_level level;
int len;
/* check for XOF/XON to send */
if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF))
a000880c: e59020b8 ldr r2, [r0, #184] ; 0xb8 <== NOT EXECUTED
a0008810: e59f31b8 ldr r3, [pc, #440] ; a00089d0 <rtems_termios_refill_transmitter+0x1c4><== NOT EXECUTED
* 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)
{
a0008814: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
int nToSend;
rtems_interrupt_level level;
int len;
/* check for XOF/XON to send */
if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF))
a0008818: e0023003 and r3, r2, r3 <== NOT EXECUTED
a000881c: e59f21b0 ldr r2, [pc, #432] ; a00089d4 <rtems_termios_refill_transmitter+0x1c8><== NOT EXECUTED
* 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)
{
a0008820: e1a04000 mov r4, r0 <== NOT EXECUTED
int nToSend;
rtems_interrupt_level level;
int len;
/* check for XOF/XON to send */
if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF))
a0008824: e1530002 cmp r3, r2 <== NOT EXECUTED
a0008828: 1a00000c bne a0008860 <rtems_termios_refill_transmitter+0x54><== NOT EXECUTED
== (FL_MDXOF | FL_IREQXOF)) {
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1);
a000882c: e59030a4 ldr r3, [r0, #164] ; 0xa4 <== NOT EXECUTED
a0008830: e284104a add r1, r4, #74 ; 0x4a <== NOT EXECUTED
a0008834: e2422b01 sub r2, r2, #1024 ; 0x400 <== NOT EXECUTED
a0008838: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED
a000883c: e12fff33 blx r3 <== NOT EXECUTED
rtems_interrupt_disable(level);
a0008840: ebfffa08 bl a0007068 <arm_interrupt_disable> <== NOT EXECUTED
tty->t_dqlen--;
a0008844: e5943090 ldr r3, [r4, #144] ; 0x90 <== NOT EXECUTED
a0008848: e2433001 sub r3, r3, #1 <== NOT EXECUTED
a000884c: e5843090 str r3, [r4, #144] ; 0x90 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
a0008850: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
a0008854: e3833002 orr r3, r3, #2 <== NOT EXECUTED
a0008858: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
rtems_interrupt_enable(level);
a000885c: ea00000f b a00088a0 <rtems_termios_refill_transmitter+0x94><== NOT EXECUTED
nToSend = 1;
} else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) == FL_ISNTXOF) {
a0008860: e59030b8 ldr r3, [r0, #184] ; 0xb8 <== NOT EXECUTED
a0008864: e2033003 and r3, r3, #3 <== NOT EXECUTED
a0008868: e3530002 cmp r3, #2 <== NOT EXECUTED
a000886c: 1a00000e bne a00088ac <rtems_termios_refill_transmitter+0xa0><== 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);
a0008870: e59030a4 ldr r3, [r0, #164] ; 0xa4 <== NOT EXECUTED
a0008874: e2841049 add r1, r4, #73 ; 0x49 <== NOT EXECUTED
a0008878: e3a02001 mov r2, #1 <== NOT EXECUTED
a000887c: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED
a0008880: e12fff33 blx r3 <== NOT EXECUTED
rtems_interrupt_disable(level);
a0008884: ebfff9f7 bl a0007068 <arm_interrupt_disable> <== NOT EXECUTED
tty->t_dqlen--;
a0008888: e5943090 ldr r3, [r4, #144] ; 0x90 <== NOT EXECUTED
a000888c: e2433001 sub r3, r3, #1 <== NOT EXECUTED
a0008890: e5843090 str r3, [r4, #144] ; 0x90 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
a0008894: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
a0008898: e3c33002 bic r3, r3, #2 <== NOT EXECUTED
a000889c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
a00088a0: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED
rtems_interrupt_enable(level);
nToSend = 1;
a00088a4: e3a05001 mov r5, #1 <== NOT EXECUTED
a00088a8: ea000046 b a00089c8 <rtems_termios_refill_transmitter+0x1bc><== NOT EXECUTED
} else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
a00088ac: e5902080 ldr r2, [r0, #128] ; 0x80 <== NOT EXECUTED
a00088b0: e5903084 ldr r3, [r0, #132] ; 0x84 <== NOT EXECUTED
a00088b4: e1520003 cmp r2, r3 <== NOT EXECUTED
a00088b8: 1a000005 bne a00088d4 <rtems_termios_refill_transmitter+0xc8><== NOT EXECUTED
/*
* buffer was empty
*/
if (tty->rawOutBufState == rob_wait) {
a00088bc: e5903094 ldr r3, [r0, #148] ; 0x94 <== NOT EXECUTED
a00088c0: e3530002 cmp r3, #2 <== NOT EXECUTED
a00088c4: 1a00003e bne a00089c4 <rtems_termios_refill_transmitter+0x1b8><== NOT EXECUTED
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
a00088c8: e590008c ldr r0, [r0, #140] ; 0x8c <== NOT EXECUTED
a00088cc: eb000309 bl a00094f8 <rtems_semaphore_release> <== NOT EXECUTED
a00088d0: ea00003b b a00089c4 <rtems_termios_refill_transmitter+0x1b8><== NOT EXECUTED
}
return 0;
}
rtems_interrupt_disable(level);
a00088d4: ebfff9e3 bl a0007068 <arm_interrupt_disable> <== NOT EXECUTED
len = tty->t_dqlen;
tty->t_dqlen = 0;
a00088d8: e3a03000 mov r3, #0 <== NOT EXECUTED
}
return 0;
}
rtems_interrupt_disable(level);
len = tty->t_dqlen;
a00088dc: e5942090 ldr r2, [r4, #144] ; 0x90 <== NOT EXECUTED
tty->t_dqlen = 0;
a00088e0: e5843090 str r3, [r4, #144] ; 0x90 <== NOT EXECUTED
a00088e4: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED
rtems_interrupt_enable(level);
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
a00088e8: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED
a00088ec: e5941088 ldr r1, [r4, #136] ; 0x88 <== NOT EXECUTED
a00088f0: e0820003 add r0, r2, r3 <== NOT EXECUTED
a00088f4: eb002cbb bl a0013be8 <__umodsi3> <== NOT EXECUTED
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
a00088f8: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED
rtems_interrupt_disable(level);
len = tty->t_dqlen;
tty->t_dqlen = 0;
rtems_interrupt_enable(level);
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
a00088fc: e1a06000 mov r6, r0 <== NOT EXECUTED
tty->rawOutBuf.Tail = newTail;
a0008900: e5840084 str r0, [r4, #132] ; 0x84 <== NOT EXECUTED
if (tty->rawOutBufState == rob_wait) {
a0008904: e3530002 cmp r3, #2 <== NOT EXECUTED
a0008908: 1a000001 bne a0008914 <rtems_termios_refill_transmitter+0x108><== NOT EXECUTED
/*
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
a000890c: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED
a0008910: eb0002f8 bl a00094f8 <rtems_semaphore_release> <== NOT EXECUTED
}
if (newTail == tty->rawOutBuf.Head) {
a0008914: e5943080 ldr r3, [r4, #128] ; 0x80 <== NOT EXECUTED
a0008918: e1560003 cmp r6, r3 <== NOT EXECUTED
a000891c: 1a000009 bne a0008948 <rtems_termios_refill_transmitter+0x13c><== NOT EXECUTED
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
a0008920: e59430d4 ldr r3, [r4, #212] ; 0xd4 <== NOT EXECUTED
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
a0008924: e3a05000 mov r5, #0 <== NOT EXECUTED
a0008928: e5845094 str r5, [r4, #148] ; 0x94 <== NOT EXECUTED
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
a000892c: e1530005 cmp r3, r5 <== NOT EXECUTED
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
nToSend = 0;
a0008930: 01a05003 moveq r5, r3 <== NOT EXECUTED
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
a0008934: 0a000020 beq a00089bc <rtems_termios_refill_transmitter+0x1b0><== NOT EXECUTED
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
a0008938: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED
a000893c: e59410d8 ldr r1, [r4, #216] ; 0xd8 <== NOT EXECUTED
a0008940: e12fff33 blx r3 <== NOT EXECUTED
a0008944: ea00001c b a00089bc <rtems_termios_refill_transmitter+0x1b0><== NOT EXECUTED
}
}
/* check, whether output should stop due to received XOFF */
else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
a0008948: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
a000894c: e2033e21 and r3, r3, #528 ; 0x210 <== NOT EXECUTED
a0008950: e3530e21 cmp r3, #528 ; 0x210 <== NOT EXECUTED
a0008954: 1a000008 bne a000897c <rtems_termios_refill_transmitter+0x170><== NOT EXECUTED
== (FL_MDXON | FL_ORCVXOF)) {
/* Buffer not empty, but output stops due to XOFF */
/* set flag, that output has been stopped */
rtems_interrupt_disable(level);
a0008958: ebfff9c2 bl a0007068 <arm_interrupt_disable> <== NOT EXECUTED
tty->flow_ctrl |= FL_OSTOP;
a000895c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
a0008960: e3833020 orr r3, r3, #32 <== NOT EXECUTED
a0008964: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
a0008968: e3a03001 mov r3, #1 <== NOT EXECUTED
a000896c: e5843094 str r3, [r4, #148] ; 0x94 <== NOT EXECUTED
a0008970: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED
rtems_interrupt_enable(level);
nToSend = 0;
a0008974: e3a05000 mov r5, #0 <== NOT EXECUTED
a0008978: ea00000f b a00089bc <rtems_termios_refill_transmitter+0x1b0><== NOT EXECUTED
} else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
a000897c: e5943080 ldr r3, [r4, #128] ; 0x80 <== NOT EXECUTED
/* for outgoing flow control */
if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) {
nToSend = 1;
}
tty->rawOutBufState = rob_busy; /*apm*/
(*tty->device.write)(
a0008980: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED
a0008984: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
nToSend = 0;
} else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
a0008988: e1560003 cmp r6, r3 <== NOT EXECUTED
nToSend = tty->rawOutBuf.Size - newTail;
a000898c: 85945088 ldrhi r5, [r4, #136] ; 0x88 <== NOT EXECUTED
else
nToSend = tty->rawOutBuf.Head - newTail;
a0008990: 95945080 ldrls r5, [r4, #128] ; 0x80 <== NOT EXECUTED
/* 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)) {
a0008994: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
nToSend = 1;
}
tty->rawOutBufState = rob_busy; /*apm*/
(*tty->device.write)(
a0008998: e0811006 add r1, r1, r6 <== NOT EXECUTED
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
nToSend = tty->rawOutBuf.Size - newTail;
else
nToSend = tty->rawOutBuf.Head - newTail;
a000899c: e0665005 rsb r5, r6, r5 <== NOT EXECUTED
/* 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)) {
a00089a0: e3130c06 tst r3, #1536 ; 0x600 <== NOT EXECUTED
nToSend = 1;
a00089a4: 13a05001 movne r5, #1 <== NOT EXECUTED
}
tty->rawOutBufState = rob_busy; /*apm*/
a00089a8: e3a03001 mov r3, #1 <== NOT EXECUTED
a00089ac: e5843094 str r3, [r4, #148] ; 0x94 <== NOT EXECUTED
(*tty->device.write)(
a00089b0: e1a02005 mov r2, r5 <== NOT EXECUTED
a00089b4: e59430a4 ldr r3, [r4, #164] ; 0xa4 <== NOT EXECUTED
a00089b8: e12fff33 blx r3 <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
a00089bc: e5846084 str r6, [r4, #132] ; 0x84 <== NOT EXECUTED
a00089c0: ea000000 b a00089c8 <rtems_termios_refill_transmitter+0x1bc><== NOT EXECUTED
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
return 0;
a00089c4: e3a05000 mov r5, #0 <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
a00089c8: e1a00005 mov r0, r5 <== NOT EXECUTED
a00089cc: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
a00087a4 <rtems_termios_rxdaemon>:
/*
* this task actually processes any receive events
*/
static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument)
{
a00087a4: e92d40f3 push {r0, r1, r4, r5, r6, r7, lr}
a00087a8: e1a04000 mov r4, r0
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
a00087ac: e3a05000 mov r5, #0
if (c != EOF) {
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
rtems_termios_enqueue_raw_characters ( tty,&c_buf,1);
a00087b0: e28d6007 add r6, sp, #7
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
a00087b4: e1a0300d mov r3, sp
a00087b8: e3a00003 mov r0, #3
a00087bc: e3a01002 mov r1, #2
a00087c0: e3a02000 mov r2, #0
a00087c4: eb000197 bl a0008e28 <rtems_event_receive>
(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) {
a00087c8: e59d3000 ldr r3, [sp] <== NOT EXECUTED
a00087cc: e3130001 tst r3, #1 <== NOT EXECUTED
a00087d0: 0a000002 beq a00087e0 <rtems_termios_rxdaemon+0x3c> <== NOT EXECUTED
tty->rxTaskId = 0;
a00087d4: e58450c4 str r5, [r4, #196] ; 0xc4 <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
a00087d8: e1a00005 mov r0, r5 <== NOT EXECUTED
a00087dc: eb0003be bl a00096dc <rtems_task_delete> <== NOT EXECUTED
}
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
a00087e0: e59430a0 ldr r3, [r4, #160] ; 0xa0 <== NOT EXECUTED
a00087e4: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
a00087e8: e12fff33 blx r3 <== NOT EXECUTED
if (c != EOF) {
a00087ec: e3700001 cmn r0, #1 <== NOT EXECUTED
a00087f0: 0affffef beq a00087b4 <rtems_termios_rxdaemon+0x10> <== NOT EXECUTED
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
a00087f4: e5cd0007 strb r0, [sp, #7] <== NOT EXECUTED
rtems_termios_enqueue_raw_characters ( tty,&c_buf,1);
a00087f8: e1a01006 mov r1, r6 <== NOT EXECUTED
a00087fc: e1a00004 mov r0, r4 <== NOT EXECUTED
a0008800: e3a02001 mov r2, #1 <== NOT EXECUTED
a0008804: ebffff40 bl a000850c <rtems_termios_enqueue_raw_characters><== NOT EXECUTED
a0008808: eaffffe9 b a00087b4 <rtems_termios_rxdaemon+0x10> <== NOT EXECUTED
a0008500 <rtems_termios_rxirq_occured>:
void rtems_termios_rxirq_occured(struct rtems_termios_tty *tty)
{
/*
* send event to rx daemon task
*/
rtems_event_send(tty->rxTaskId,TERMIOS_RX_PROC_EVENT);
a0008500: e59000c4 ldr r0, [r0, #196] ; 0xc4 <== NOT EXECUTED
a0008504: e3a01002 mov r1, #2 <== NOT EXECUTED
a0008508: ea0002a2 b a0008f98 <rtems_event_send> <== NOT EXECUTED
a000a960 <rtems_termios_set_initial_baud>:
int rtems_termios_set_initial_baud(
struct rtems_termios_tty *ttyp,
int32_t baud
)
{
a000a960: e92d4010 push {r4, lr} <== NOT EXECUTED
a000a964: e1a04000 mov r4, r0 <== NOT EXECUTED
int cflags_baud;
cflags_baud = rtems_termios_number_to_baud(baud);
a000a968: e1a00001 mov r0, r1 <== NOT EXECUTED
a000a96c: ebfff95d bl a0008ee8 <rtems_termios_number_to_baud> <== NOT EXECUTED
if ( cflags_baud == -1 )
a000a970: e3700001 cmn r0, #1 <== NOT EXECUTED
a000a974: 0a000005 beq a000a990 <rtems_termios_set_initial_baud+0x30><== NOT EXECUTED
return -1;
ttyp->termios.c_cflag = (ttyp->termios.c_cflag & ~CBAUD) | cflags_baud;
a000a978: e5943038 ldr r3, [r4, #56] ; 0x38 <== NOT EXECUTED
a000a97c: e3c33a01 bic r3, r3, #4096 ; 0x1000 <== NOT EXECUTED
a000a980: e3c3300f bic r3, r3, #15 <== NOT EXECUTED
a000a984: e1800003 orr r0, r0, r3 <== NOT EXECUTED
a000a988: e5840038 str r0, [r4, #56] ; 0x38 <== NOT EXECUTED
return 0;
a000a98c: e3a00000 mov r0, #0 <== NOT EXECUTED
}
a000a990: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a00089d8 <rtems_termios_txdaemon>:
/*
* this task actually processes any transmit events
*/
static rtems_task rtems_termios_txdaemon(rtems_task_argument argument)
{
a00089d8: e92d40f1 push {r0, r4, r5, r6, r7, lr}
}
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
a00089dc: e59f6058 ldr r6, [pc, #88] ; a0008a3c <rtems_termios_txdaemon+0x64>
/*
* this task actually processes any transmit events
*/
static rtems_task rtems_termios_txdaemon(rtems_task_argument argument)
{
a00089e0: e1a04000 mov r4, r0
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
a00089e4: e3a05000 mov r5, #0
a00089e8: e1a0300d mov r3, sp
a00089ec: e3a00003 mov r0, #3
a00089f0: e3a01002 mov r1, #2
a00089f4: e3a02000 mov r2, #0
a00089f8: eb00010a bl a0008e28 <rtems_event_receive>
(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) {
a00089fc: e59d3000 ldr r3, [sp] <== NOT EXECUTED
a0008a00: e3130001 tst r3, #1 <== NOT EXECUTED
a0008a04: 0a000002 beq a0008a14 <rtems_termios_txdaemon+0x3c> <== NOT EXECUTED
tty->txTaskId = 0;
a0008a08: e58450c8 str r5, [r4, #200] ; 0xc8 <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
a0008a0c: e1a00005 mov r0, r5 <== NOT EXECUTED
a0008a10: eb000331 bl a00096dc <rtems_task_delete> <== NOT EXECUTED
}
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
a0008a14: e59430cc ldr r3, [r4, #204] ; 0xcc <== NOT EXECUTED
a0008a18: e0863283 add r3, r6, r3, lsl #5 <== NOT EXECUTED
a0008a1c: e5933014 ldr r3, [r3, #20] <== NOT EXECUTED
a0008a20: e3530000 cmp r3, #0 <== NOT EXECUTED
a0008a24: 0a000001 beq a0008a30 <rtems_termios_txdaemon+0x58> <== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_start(tty);
a0008a28: e1a00004 mov r0, r4 <== NOT EXECUTED
a0008a2c: e12fff33 blx r3 <== NOT EXECUTED
}
/*
* try to push further characters to device
*/
rtems_termios_refill_transmitter(tty);
a0008a30: e1a00004 mov r0, r4 <== NOT EXECUTED
a0008a34: ebffff74 bl a000880c <rtems_termios_refill_transmitter> <== NOT EXECUTED
}
a0008a38: eaffffea b a00089e8 <rtems_termios_txdaemon+0x10> <== NOT EXECUTED
a0008110 <rtems_termios_write>:
rtems_status_code
rtems_termios_write (void *arg)
{
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
a0008110: e5903000 ldr r3, [r0]
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
a0008114: e92d41f0 push {r4, r5, r6, r7, r8, lr}
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
a0008118: e5935034 ldr r5, [r3, #52] ; 0x34
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
a000811c: e3a01000 mov r1, #0
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
a0008120: e1a04000 mov r4, r0
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);
a0008124: e1a02001 mov r2, r1
a0008128: e5950018 ldr r0, [r5, #24]
a000812c: eb0004ab bl a00093e0 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
a0008130: e2506000 subs r6, r0, #0
a0008134: 1a00001f bne a00081b8 <rtems_termios_write+0xa8>
return sc;
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
a0008138: e59520cc ldr r2, [r5, #204] ; 0xcc
a000813c: e59f307c ldr r3, [pc, #124] ; a00081c0 <rtems_termios_write+0xb0>
a0008140: e0833282 add r3, r3, r2, lsl #5
a0008144: e593300c ldr r3, [r3, #12]
a0008148: e3530000 cmp r3, #0
a000814c: 0a000004 beq a0008164 <rtems_termios_write+0x54>
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
a0008150: e1a00005 mov r0, r5
a0008154: e1a01004 mov r1, r4
a0008158: e12fff33 blx r3
a000815c: e1a06000 mov r6, r0 <== NOT EXECUTED
a0008160: ea000012 b a00081b0 <rtems_termios_write+0xa0> <== NOT EXECUTED
rtems_semaphore_release (tty->osem);
return sc;
}
if (tty->termios.c_oflag & OPOST) {
a0008164: e5953034 ldr r3, [r5, #52] ; 0x34
a0008168: e3130001 tst r3, #1
uint32_t count = args->count;
a000816c: 15947010 ldrne r7, [r4, #16]
char *buffer = args->buffer;
a0008170: 1594800c ldrne r8, [r4, #12]
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) {
a0008174: 1a000004 bne a000818c <rtems_termios_write+0x7c>
a0008178: ea000006 b a0008198 <rtems_termios_write+0x88> <== NOT EXECUTED
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
oproc (*buffer++, tty);
a000817c: e4d80001 ldrb r0, [r8], #1
a0008180: e1a01005 mov r1, r5
a0008184: ebfffe79 bl a0007b70 <oproc>
a0008188: e2477001 sub r7, r7, #1
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
a000818c: e3570000 cmp r7, #0
a0008190: 1afffff9 bne a000817c <rtems_termios_write+0x6c>
a0008194: ea000003 b a00081a8 <rtems_termios_write+0x98>
oproc (*buffer++, tty);
args->bytes_moved = args->count;
} else {
rtems_termios_puts (args->buffer, args->count, tty);
a0008198: e594000c ldr r0, [r4, #12] <== NOT EXECUTED
a000819c: e5941010 ldr r1, [r4, #16] <== NOT EXECUTED
a00081a0: e1a02005 mov r2, r5 <== NOT EXECUTED
a00081a4: ebfffe30 bl a0007a6c <rtems_termios_puts> <== NOT EXECUTED
args->bytes_moved = args->count;
a00081a8: e5943010 ldr r3, [r4, #16]
a00081ac: e5843018 str r3, [r4, #24]
}
rtems_semaphore_release (tty->osem);
a00081b0: e5950018 ldr r0, [r5, #24]
a00081b4: eb0004cf bl a00094f8 <rtems_semaphore_release>
return sc;
}
a00081b8: e1a00006 mov r0, r6
a00081bc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
a0009d78 <rtems_timer_create>:
rtems_status_code rtems_timer_create(
rtems_name name,
rtems_id *id
)
{
a0009d78: e92d40f0 push {r4, r5, r6, r7, lr}
Timer_Control *the_timer;
if ( !rtems_is_name_valid( name ) )
a0009d7c: e2506000 subs r6, r0, #0
rtems_status_code rtems_timer_create(
rtems_name name,
rtems_id *id
)
{
a0009d80: e1a04001 mov r4, r1
Timer_Control *the_timer;
if ( !rtems_is_name_valid( name ) )
a0009d84: 0a00001d beq a0009e00 <rtems_timer_create+0x88>
return RTEMS_INVALID_NAME;
if ( !id )
a0009d88: e3510000 cmp r1, #0
a0009d8c: 0a00001d beq a0009e08 <rtems_timer_create+0x90>
a0009d90: e59f3078 ldr r3, [pc, #120] ; a0009e10 <rtems_timer_create+0x98>
a0009d94: e5932000 ldr r2, [r3]
a0009d98: e2822001 add r2, r2, #1
a0009d9c: e5832000 str r2, [r3]
* 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 );
a0009da0: e59f506c ldr r5, [pc, #108] ; a0009e14 <rtems_timer_create+0x9c>
a0009da4: e1a00005 mov r0, r5
a0009da8: eb0003a3 bl a000ac3c <_Objects_Allocate>
_Thread_Disable_dispatch(); /* to prevent deletion */
the_timer = _Timer_Allocate();
if ( !the_timer ) {
a0009dac: e3500000 cmp r0, #0
a0009db0: 1a000002 bne a0009dc0 <rtems_timer_create+0x48>
_Thread_Enable_dispatch();
a0009db4: eb00076e bl a000bb74 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_TOO_MANY;
a0009db8: e3a00005 mov r0, #5 <== NOT EXECUTED
a0009dbc: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
}
the_timer->the_class = TIMER_DORMANT;
a0009dc0: e3a03004 mov r3, #4
a0009dc4: e5803038 str r3, [r0, #56] ; 0x38
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
a0009dc8: e1d010b8 ldrh r1, [r0, #8]
a0009dcc: e5903008 ldr r3, [r0, #8]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a0009dd0: e595201c ldr r2, [r5, #28]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a0009dd4: e3a07000 mov r7, #0
a0009dd8: e5807018 str r7, [r0, #24]
the_watchdog->routine = routine;
a0009ddc: e580702c str r7, [r0, #44] ; 0x2c
the_watchdog->id = id;
a0009de0: e5807030 str r7, [r0, #48] ; 0x30
the_watchdog->user_data = user_data;
a0009de4: e5807034 str r7, [r0, #52] ; 0x34
a0009de8: e7820101 str r0, [r2, r1, lsl #2]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
a0009dec: e580600c str r6, [r0, #12]
&_Timer_Information,
&the_timer->Object,
(Objects_Name) name
);
*id = the_timer->Object.id;
a0009df0: e5843000 str r3, [r4]
_Thread_Enable_dispatch();
a0009df4: eb00075e bl a000bb74 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a0009df8: e1a00007 mov r0, r7
a0009dfc: e8bd80f0 pop {r4, r5, r6, r7, pc}
)
{
Timer_Control *the_timer;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
a0009e00: e3a00003 mov r0, #3
a0009e04: e8bd80f0 pop {r4, r5, r6, r7, pc}
if ( !id )
return RTEMS_INVALID_ADDRESS;
a0009e08: e3a00009 mov r0, #9
);
*id = the_timer->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
a0009e0c: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
a0009e18 <rtems_timer_fire_after>:
rtems_id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
a0009e18: e92d45f1 push {r0, r4, r5, r6, r7, r8, sl, lr}
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( ticks == 0 )
a0009e1c: e2516000 subs r6, r1, #0
rtems_id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
a0009e20: e1a04000 mov r4, r0
a0009e24: e1a05002 mov r5, r2
a0009e28: e1a07003 mov r7, r3
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( ticks == 0 )
return RTEMS_INVALID_NUMBER;
a0009e2c: 03a0000a moveq r0, #10
{
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( ticks == 0 )
a0009e30: 0a000022 beq a0009ec0 <rtems_timer_fire_after+0xa8>
return RTEMS_INVALID_NUMBER;
if ( !routine )
a0009e34: e3520000 cmp r2, #0
return RTEMS_INVALID_ADDRESS;
a0009e38: 03a00009 moveq r0, #9
ISR_Level level;
if ( ticks == 0 )
return RTEMS_INVALID_NUMBER;
if ( !routine )
a0009e3c: 0a00001f beq a0009ec0 <rtems_timer_fire_after+0xa8>
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
_Objects_Get( &_Timer_Information, id, location );
a0009e40: e59f007c ldr r0, [pc, #124] ; a0009ec4 <rtems_timer_fire_after+0xac>
a0009e44: e1a01004 mov r1, r4
a0009e48: e1a0200d mov r2, sp
a0009e4c: eb00049b bl a000b0c0 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
a0009e50: e59d3000 ldr r3, [sp]
a0009e54: e1a08000 mov r8, r0
a0009e58: e3530000 cmp r3, #0
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a0009e5c: 13a00004 movne r0, #4
if ( !routine )
return RTEMS_INVALID_ADDRESS;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
a0009e60: 1a000016 bne a0009ec0 <rtems_timer_fire_after+0xa8>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
a0009e64: e288a010 add sl, r8, #16
a0009e68: e1a0000a mov r0, sl
a0009e6c: eb000b0a bl a000ca9c <_Watchdog_Remove>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a0009e70: e10f2000 mrs r2, CPSR
a0009e74: e3823080 orr r3, r2, #128 ; 0x80
a0009e78: e129f003 msr CPSR_fc, r3
/*
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) {
a0009e7c: e5983018 ldr r3, [r8, #24]
a0009e80: e3530000 cmp r3, #0
a0009e84: 0a000001 beq a0009e90 <rtems_timer_fire_after+0x78>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a0009e88: e129f002 msr CPSR_fc, r2
a0009e8c: ea000009 b a0009eb8 <rtems_timer_fire_after+0xa0> <== NOT EXECUTED
/*
* OK. Now we now the timer was not rescheduled by an interrupt
* so we can atomically initialize it as in use.
*/
the_timer->the_class = TIMER_INTERVAL;
a0009e90: e5883038 str r3, [r8, #56] ; 0x38
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a0009e94: e5883018 str r3, [r8, #24]
the_watchdog->routine = routine;
a0009e98: e588502c str r5, [r8, #44] ; 0x2c
the_watchdog->id = id;
a0009e9c: e5884030 str r4, [r8, #48] ; 0x30
the_watchdog->user_data = user_data;
a0009ea0: e5887034 str r7, [r8, #52] ; 0x34
a0009ea4: e129f002 msr CPSR_fc, r2
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a0009ea8: e59f0018 ldr r0, [pc, #24] ; a0009ec8 <rtems_timer_fire_after+0xb0>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
a0009eac: e588601c str r6, [r8, #28]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a0009eb0: e1a0100a mov r1, sl
a0009eb4: eb000aa0 bl a000c93c <_Watchdog_Insert>
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
_ISR_Enable( level );
_Watchdog_Insert_ticks( &the_timer->Ticker, ticks );
_Thread_Enable_dispatch();
a0009eb8: eb00072d bl a000bb74 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a0009ebc: e3a00000 mov r0, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a0009ec0: e8bd85f8 pop {r3, r4, r5, r6, r7, r8, sl, pc}
a00180d4 <rtems_timer_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
a00180d4: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr}
a00180d8: e1a08003 mov r8, r3
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_TOD_Is_set )
a00180dc: e59f30c4 ldr r3, [pc, #196] ; a00181a8 <rtems_timer_fire_when+0xd4>
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
a00180e0: e1a04000 mov r4, r0
a00180e4: e1a06001 mov r6, r1
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_TOD_Is_set )
a00180e8: e5d33000 ldrb r3, [r3]
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
a00180ec: e1a05002 mov r5, r2
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_TOD_Is_set )
a00180f0: e3530000 cmp r3, #0
return RTEMS_NOT_DEFINED;
a00180f4: 03a0000b moveq r0, #11
{
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_TOD_Is_set )
a00180f8: 0a000029 beq a00181a4 <rtems_timer_fire_when+0xd0>
return RTEMS_NOT_DEFINED;
if ( !_TOD_Validate( wall_time ) )
a00180fc: e1a00001 mov r0, r1
a0018100: ebfff53b bl a00155f4 <_TOD_Validate>
a0018104: e3500000 cmp r0, #0
a0018108: 0a000024 beq a00181a0 <rtems_timer_fire_when+0xcc>
return RTEMS_INVALID_CLOCK;
if ( !routine )
a001810c: e3550000 cmp r5, #0
return RTEMS_INVALID_ADDRESS;
a0018110: 03a00009 moveq r0, #9
return RTEMS_NOT_DEFINED;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
if ( !routine )
a0018114: 0a000022 beq a00181a4 <rtems_timer_fire_when+0xd0>
return RTEMS_INVALID_ADDRESS;
seconds = _TOD_To_seconds( wall_time );
a0018118: e1a00006 mov r0, r6
a001811c: ebfff511 bl a0015568 <_TOD_To_seconds>
if ( seconds <= _TOD_Seconds_since_epoch() )
a0018120: e59f7084 ldr r7, [pc, #132] ; a00181ac <rtems_timer_fire_when+0xd8>
return RTEMS_INVALID_CLOCK;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
seconds = _TOD_To_seconds( wall_time );
a0018124: e1a06000 mov r6, r0
if ( seconds <= _TOD_Seconds_since_epoch() )
a0018128: e5973000 ldr r3, [r7]
a001812c: e1500003 cmp r0, r3
a0018130: 9a00001a bls a00181a0 <rtems_timer_fire_when+0xcc>
a0018134: e59f0074 ldr r0, [pc, #116] ; a00181b0 <rtems_timer_fire_when+0xdc>
a0018138: e1a01004 mov r1, r4
a001813c: e1a0200d mov r2, sp
a0018140: eb000ab3 bl a001ac14 <_Objects_Get>
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
a0018144: e59da000 ldr sl, [sp]
a0018148: e1a09000 mov r9, r0
a001814c: e35a0000 cmp sl, #0
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a0018150: 13a00004 movne r0, #4
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
a0018154: 1a000012 bne a00181a4 <rtems_timer_fire_when+0xd0>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
a0018158: e289b010 add fp, r9, #16
a001815c: e1a0000b mov r0, fp
a0018160: eb001209 bl a001c98c <_Watchdog_Remove>
the_timer->the_class = TIMER_TIME_OF_DAY;
a0018164: e3a03002 mov r3, #2
a0018168: e5893038 str r3, [r9, #56] ; 0x38
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
_Watchdog_Insert_seconds(
a001816c: e5973000 ldr r3, [r7]
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
a0018170: e59f003c ldr r0, [pc, #60] ; a00181b4 <rtems_timer_fire_when+0xe0>
a0018174: e1a0100b mov r1, fp
a0018178: e0636006 rsb r6, r3, r6
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a001817c: e589a018 str sl, [r9, #24]
the_watchdog->routine = routine;
a0018180: e589502c str r5, [r9, #44] ; 0x2c
the_watchdog->id = id;
a0018184: e5894030 str r4, [r9, #48] ; 0x30
the_watchdog->user_data = user_data;
a0018188: e5898034 str r8, [r9, #52] ; 0x34
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
a001818c: e589601c str r6, [r9, #28]
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
a0018190: eb0011a5 bl a001c82c <_Watchdog_Insert>
&the_timer->Ticker,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
a0018194: eb000d6f bl a001b758 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a0018198: e1a0000a mov r0, sl
a001819c: ea000000 b a00181a4 <rtems_timer_fire_when+0xd0>
if ( !routine )
return RTEMS_INVALID_ADDRESS;
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
a00181a0: e3a00014 mov r0, #20 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a00181a4: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
a00181b8 <rtems_timer_get_information>:
rtems_status_code rtems_timer_get_information(
rtems_id id,
rtems_timer_information *the_info
)
{
a00181b8: e92d4031 push {r0, r4, r5, lr} <== NOT EXECUTED
Timer_Control *the_timer;
Objects_Locations location;
if ( !the_info )
a00181bc: e2514000 subs r4, r1, #0 <== NOT EXECUTED
rtems_status_code rtems_timer_get_information(
rtems_id id,
rtems_timer_information *the_info
)
{
a00181c0: e1a03000 mov r3, r0 <== NOT EXECUTED
Timer_Control *the_timer;
Objects_Locations location;
if ( !the_info )
return RTEMS_INVALID_ADDRESS;
a00181c4: 03a00009 moveq r0, #9 <== NOT EXECUTED
)
{
Timer_Control *the_timer;
Objects_Locations location;
if ( !the_info )
a00181c8: 0a000011 beq a0018214 <rtems_timer_get_information+0x5c> <== NOT EXECUTED
a00181cc: e59f0044 ldr r0, [pc, #68] ; a0018218 <rtems_timer_get_information+0x60><== NOT EXECUTED
a00181d0: e1a01003 mov r1, r3 <== NOT EXECUTED
a00181d4: e1a0200d mov r2, sp <== NOT EXECUTED
a00181d8: eb000a8d bl a001ac14 <_Objects_Get> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
a00181dc: e59d5000 ldr r5, [sp] <== NOT EXECUTED
a00181e0: e3550000 cmp r5, #0 <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a00181e4: 13a00004 movne r0, #4 <== NOT EXECUTED
if ( !the_info )
return RTEMS_INVALID_ADDRESS;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
a00181e8: 1a000009 bne a0018214 <rtems_timer_get_information+0x5c> <== NOT EXECUTED
case OBJECTS_LOCAL:
the_info->the_class = the_timer->the_class;
a00181ec: e5903038 ldr r3, [r0, #56] ; 0x38 <== NOT EXECUTED
a00181f0: e5843000 str r3, [r4] <== NOT EXECUTED
the_info->initial = the_timer->Ticker.initial;
a00181f4: e590301c ldr r3, [r0, #28] <== NOT EXECUTED
a00181f8: e5843004 str r3, [r4, #4] <== NOT EXECUTED
the_info->start_time = the_timer->Ticker.start_time;
a00181fc: e5903024 ldr r3, [r0, #36] ; 0x24 <== NOT EXECUTED
a0018200: e5843008 str r3, [r4, #8] <== NOT EXECUTED
the_info->stop_time = the_timer->Ticker.stop_time;
a0018204: e5903028 ldr r3, [r0, #40] ; 0x28 <== NOT EXECUTED
a0018208: e584300c str r3, [r4, #12] <== NOT EXECUTED
_Thread_Enable_dispatch();
a001820c: eb000d51 bl a001b758 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a0018210: e1a00005 mov r0, r5 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a0018214: e8bd8038 pop {r3, r4, r5, pc} <== NOT EXECUTED
a001824c <rtems_timer_reset>:
*/
rtems_status_code rtems_timer_reset(
rtems_id id
)
{
a001824c: e92d4071 push {r0, r4, r5, r6, lr}
a0018250: e1a01000 mov r1, r0
a0018254: e1a0200d mov r2, sp
a0018258: e59f0078 ldr r0, [pc, #120] ; a00182d8 <rtems_timer_reset+0x8c>
a001825c: eb000a6c bl a001ac14 <_Objects_Get>
Timer_Control *the_timer;
Objects_Locations location;
rtems_status_code status = RTEMS_SUCCESSFUL;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
a0018260: e59d5000 ldr r5, [sp]
a0018264: e1a06000 mov r6, r0
a0018268: e3550000 cmp r5, #0
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a001826c: 13a04004 movne r4, #4
Timer_Control *the_timer;
Objects_Locations location;
rtems_status_code status = RTEMS_SUCCESSFUL;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
a0018270: 1a000016 bne a00182d0 <rtems_timer_reset+0x84>
case OBJECTS_LOCAL:
if ( the_timer->the_class == TIMER_INTERVAL ) {
a0018274: e5904038 ldr r4, [r0, #56] ; 0x38
a0018278: e3540000 cmp r4, #0
a001827c: 1a000006 bne a001829c <rtems_timer_reset+0x50>
_Watchdog_Remove( &the_timer->Ticker );
a0018280: e2806010 add r6, r0, #16
a0018284: e1a00006 mov r0, r6
a0018288: eb0011bf bl a001c98c <_Watchdog_Remove>
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
a001828c: e59f0048 ldr r0, [pc, #72] ; a00182dc <rtems_timer_reset+0x90>
a0018290: e1a01006 mov r1, r6
a0018294: eb001164 bl a001c82c <_Watchdog_Insert>
a0018298: ea00000b b a00182cc <rtems_timer_reset+0x80>
} else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
a001829c: e3540001 cmp r4, #1 <== NOT EXECUTED
/*
* 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;
a00182a0: 13a0400b movne r4, #11 <== NOT EXECUTED
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 ) {
a00182a4: 1a000008 bne a00182cc <rtems_timer_reset+0x80> <== NOT EXECUTED
Timer_server_Control *timer_server = _Timer_server;
a00182a8: e59f3030 ldr r3, [pc, #48] ; a00182e0 <rtems_timer_reset+0x94><== NOT EXECUTED
if ( !timer_server ) {
_Thread_Enable_dispatch();
return RTEMS_INCORRECT_STATE;
}
#endif
_Watchdog_Remove( &the_timer->Ticker );
a00182ac: e2800010 add r0, r0, #16 <== NOT EXECUTED
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;
a00182b0: e5934000 ldr r4, [r3] <== NOT EXECUTED
if ( !timer_server ) {
_Thread_Enable_dispatch();
return RTEMS_INCORRECT_STATE;
}
#endif
_Watchdog_Remove( &the_timer->Ticker );
a00182b4: eb0011b4 bl a001c98c <_Watchdog_Remove> <== NOT EXECUTED
(*timer_server->schedule_operation)( timer_server, the_timer );
a00182b8: e5943004 ldr r3, [r4, #4] <== NOT EXECUTED
a00182bc: e1a00004 mov r0, r4 <== NOT EXECUTED
a00182c0: e1a01006 mov r1, r6 <== NOT EXECUTED
a00182c4: e12fff33 blx r3 <== NOT EXECUTED
rtems_id id
)
{
Timer_Control *the_timer;
Objects_Locations location;
rtems_status_code status = RTEMS_SUCCESSFUL;
a00182c8: e1a04005 mov r4, r5 <== NOT EXECUTED
* 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();
a00182cc: eb000d21 bl a001b758 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a00182d0: e1a00004 mov r0, r4
a00182d4: e8bd8078 pop {r3, r4, r5, r6, pc}
a00182e4 <rtems_timer_server_fire_after>:
rtems_id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
a00182e4: e92d45f1 push {r0, r4, r5, r6, r7, r8, sl, lr}
a00182e8: e1a08003 mov r8, r3
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
Timer_server_Control *timer_server = _Timer_server;
a00182ec: e59f30b8 ldr r3, [pc, #184] ; a00183ac <rtems_timer_server_fire_after+0xc8>
rtems_id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
a00182f0: e1a05000 mov r5, r0
a00182f4: e1a04001 mov r4, r1
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
Timer_server_Control *timer_server = _Timer_server;
a00182f8: e5937000 ldr r7, [r3]
rtems_id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
a00182fc: e1a06002 mov r6, r2
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
a0018300: e3570000 cmp r7, #0
return RTEMS_INCORRECT_STATE;
a0018304: 03a0000e moveq r0, #14
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
a0018308: 0a000026 beq a00183a8 <rtems_timer_server_fire_after+0xc4>
return RTEMS_INCORRECT_STATE;
if ( !routine )
a001830c: e3520000 cmp r2, #0
return RTEMS_INVALID_ADDRESS;
a0018310: 03a00009 moveq r0, #9
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
if ( !routine )
a0018314: 0a000023 beq a00183a8 <rtems_timer_server_fire_after+0xc4>
return RTEMS_INVALID_ADDRESS;
if ( ticks == 0 )
a0018318: e3510000 cmp r1, #0
return RTEMS_INVALID_NUMBER;
a001831c: 03a0000a moveq r0, #10
return RTEMS_INCORRECT_STATE;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
if ( ticks == 0 )
a0018320: 0a000020 beq a00183a8 <rtems_timer_server_fire_after+0xc4>
a0018324: e59f0084 ldr r0, [pc, #132] ; a00183b0 <rtems_timer_server_fire_after+0xcc>
a0018328: e1a01005 mov r1, r5
a001832c: e1a0200d mov r2, sp
a0018330: eb000a37 bl a001ac14 <_Objects_Get>
return RTEMS_INVALID_NUMBER;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
a0018334: e59d3000 ldr r3, [sp]
a0018338: e1a0a000 mov sl, r0
a001833c: e3530000 cmp r3, #0
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a0018340: 13a00004 movne r0, #4
if ( ticks == 0 )
return RTEMS_INVALID_NUMBER;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
a0018344: 1a000017 bne a00183a8 <rtems_timer_server_fire_after+0xc4>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
a0018348: e28a0010 add r0, sl, #16
a001834c: eb00118e bl a001c98c <_Watchdog_Remove>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a0018350: e10f3000 mrs r3, CPSR
a0018354: e3832080 orr r2, r3, #128 ; 0x80
a0018358: e129f002 msr CPSR_fc, r2
/*
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) {
a001835c: e59a2018 ldr r2, [sl, #24]
a0018360: e3520000 cmp r2, #0
a0018364: 0a000001 beq a0018370 <rtems_timer_server_fire_after+0x8c>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a0018368: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
a001836c: ea00000b b a00183a0 <rtems_timer_server_fire_after+0xbc> <== NOT EXECUTED
/*
* OK. Now we now the timer was not rescheduled by an interrupt
* so we can atomically initialize it as in use.
*/
the_timer->the_class = TIMER_INTERVAL_ON_TASK;
a0018370: e3a01001 mov r1, #1
a0018374: e58a1038 str r1, [sl, #56] ; 0x38
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a0018378: e58a2018 str r2, [sl, #24]
the_watchdog->routine = routine;
a001837c: e58a602c str r6, [sl, #44] ; 0x2c
the_watchdog->id = id;
a0018380: e58a5030 str r5, [sl, #48] ; 0x30
the_watchdog->user_data = user_data;
a0018384: e58a8034 str r8, [sl, #52] ; 0x34
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = ticks;
a0018388: e58a401c str r4, [sl, #28]
a001838c: e129f003 msr CPSR_fc, r3
_ISR_Enable( level );
(*timer_server->schedule_operation)( timer_server, the_timer );
a0018390: e5973004 ldr r3, [r7, #4]
a0018394: e1a00007 mov r0, r7
a0018398: e1a0100a mov r1, sl
a001839c: e12fff33 blx r3
_Thread_Enable_dispatch();
a00183a0: eb000cec bl a001b758 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a00183a4: e3a00000 mov r0, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a00183a8: e8bd85f8 pop {r3, r4, r5, r6, r7, r8, sl, pc}
a00183b4 <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
a00183b4: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr}
a00183b8: e1a0a003 mov sl, r3
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
a00183bc: e59f30d8 ldr r3, [pc, #216] ; a001849c <rtems_timer_server_fire_when+0xe8>
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
a00183c0: e1a04000 mov r4, r0
a00183c4: e1a07001 mov r7, r1
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
a00183c8: e5936000 ldr r6, [r3]
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
a00183cc: e1a05002 mov r5, r2
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
a00183d0: e3560000 cmp r6, #0
return RTEMS_INCORRECT_STATE;
a00183d4: 03a0000e moveq r0, #14
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
a00183d8: 0a00002e beq a0018498 <rtems_timer_server_fire_when+0xe4>
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
a00183dc: e59f30bc ldr r3, [pc, #188] ; a00184a0 <rtems_timer_server_fire_when+0xec>
a00183e0: e5d33000 ldrb r3, [r3]
a00183e4: e3530000 cmp r3, #0
return RTEMS_NOT_DEFINED;
a00183e8: 03a0000b moveq r0, #11
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
a00183ec: 0a000029 beq a0018498 <rtems_timer_server_fire_when+0xe4>
return RTEMS_NOT_DEFINED;
if ( !routine )
a00183f0: e3520000 cmp r2, #0
return RTEMS_INVALID_ADDRESS;
a00183f4: 03a00009 moveq r0, #9
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !routine )
a00183f8: 0a000026 beq a0018498 <rtems_timer_server_fire_when+0xe4>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
a00183fc: e1a00001 mov r0, r1
a0018400: ebfff47b bl a00155f4 <_TOD_Validate>
a0018404: e3500000 cmp r0, #0
a0018408: 0a000021 beq a0018494 <rtems_timer_server_fire_when+0xe0>
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
a001840c: e1a00007 mov r0, r7
a0018410: ebfff454 bl a0015568 <_TOD_To_seconds>
if ( seconds <= _TOD_Seconds_since_epoch() )
a0018414: e59f8088 ldr r8, [pc, #136] ; a00184a4 <rtems_timer_server_fire_when+0xf0>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
a0018418: e1a07000 mov r7, r0
if ( seconds <= _TOD_Seconds_since_epoch() )
a001841c: e5983000 ldr r3, [r8]
a0018420: e1500003 cmp r0, r3
a0018424: 9a00001a bls a0018494 <rtems_timer_server_fire_when+0xe0>
a0018428: e59f0078 ldr r0, [pc, #120] ; a00184a8 <rtems_timer_server_fire_when+0xf4>
a001842c: e1a01004 mov r1, r4
a0018430: e1a0200d mov r2, sp
a0018434: eb0009f6 bl a001ac14 <_Objects_Get>
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
a0018438: e59d9000 ldr r9, [sp]
a001843c: e1a0b000 mov fp, r0
a0018440: e3590000 cmp r9, #0
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a0018444: 13a00004 movne r0, #4
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
a0018448: 1a000012 bne a0018498 <rtems_timer_server_fire_when+0xe4>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
a001844c: e28b0010 add r0, fp, #16
a0018450: eb00114d bl a001c98c <_Watchdog_Remove>
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
a0018454: e3a03003 mov r3, #3
a0018458: e58b3038 str r3, [fp, #56] ; 0x38
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
a001845c: e5983000 ldr r3, [r8]
(*timer_server->schedule_operation)( timer_server, the_timer );
a0018460: e1a00006 mov r0, r6
a0018464: e1a0100b mov r1, fp
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
a0018468: e0637007 rsb r7, r3, r7
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a001846c: e58b9018 str r9, [fp, #24]
(*timer_server->schedule_operation)( timer_server, the_timer );
a0018470: e5963004 ldr r3, [r6, #4]
the_watchdog->routine = routine;
a0018474: e58b502c str r5, [fp, #44] ; 0x2c
the_watchdog->id = id;
a0018478: e58b4030 str r4, [fp, #48] ; 0x30
the_watchdog->user_data = user_data;
a001847c: e58ba034 str sl, [fp, #52] ; 0x34
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
a0018480: e58b701c str r7, [fp, #28]
(*timer_server->schedule_operation)( timer_server, the_timer );
a0018484: e12fff33 blx r3
_Thread_Enable_dispatch();
a0018488: eb000cb2 bl a001b758 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a001848c: e1a00009 mov r0, r9
a0018490: ea000000 b a0018498 <rtems_timer_server_fire_when+0xe4>
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
a0018494: e3a00014 mov r0, #20 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a0018498: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
a000a764 <rtems_verror>:
{
int local_errno = 0;
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC) {
a000a764: e3100202 tst r0, #536870912 ; 0x20000000
static int rtems_verror(
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
a000a768: e92d41f0 push {r4, r5, r6, r7, r8, lr}
a000a76c: e1a05000 mov r5, r0
a000a770: e1a08001 mov r8, r1
a000a774: e1a04002 mov r4, r2
int local_errno = 0;
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC) {
a000a778: 0a00000e beq a000a7b8 <rtems_verror+0x54>
if (rtems_panic_in_progress++)
a000a77c: e59f212c ldr r2, [pc, #300] ; a000a8b0 <rtems_verror+0x14c>
a000a780: e5923000 ldr r3, [r2]
a000a784: e2831001 add r1, r3, #1
a000a788: e3530000 cmp r3, #0
a000a78c: e5821000 str r1, [r2]
a000a790: 0a000003 beq a000a7a4 <rtems_verror+0x40>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a000a794: e59f3118 ldr r3, [pc, #280] ; a000a8b4 <rtems_verror+0x150><== NOT EXECUTED
a000a798: e5932000 ldr r2, [r3] <== NOT EXECUTED
a000a79c: e2822001 add r2, r2, #1 <== NOT EXECUTED
a000a7a0: e5832000 str r2, [r3] <== NOT EXECUTED
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
a000a7a4: e59f3104 ldr r3, [pc, #260] ; a000a8b0 <rtems_verror+0x14c>
a000a7a8: e5933000 ldr r3, [r3]
a000a7ac: e3530002 cmp r3, #2
return 0;
a000a7b0: c3a04000 movgt r4, #0
if (error_flag & RTEMS_ERROR_PANIC) {
if (rtems_panic_in_progress++)
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
a000a7b4: ca00003b bgt a000a8a8 <rtems_verror+0x144>
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
a000a7b8: e59f30f8 ldr r3, [pc, #248] ; a000a8b8 <rtems_verror+0x154>
status = error_flag & ~RTEMS_ERROR_MASK;
a000a7bc: e3c56207 bic r6, r5, #1879048192 ; 0x70000000
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
a000a7c0: e5933000 ldr r3, [r3]
a000a7c4: e5930008 ldr r0, [r3, #8]
a000a7c8: eb002c0e bl a0015808 <fflush>
status = error_flag & ~RTEMS_ERROR_MASK;
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
a000a7cc: e2155101 ands r5, r5, #1073741824 ; 0x40000000
a000a7d0: 0a000001 beq a000a7dc <rtems_verror+0x78>
local_errno = errno;
a000a7d4: eb002b14 bl a001542c <__errno>
a000a7d8: e5905000 ldr r5, [r0]
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
a000a7dc: e59f70d4 ldr r7, [pc, #212] ; a000a8b8 <rtems_verror+0x154>
a000a7e0: e1a02004 mov r2, r4
a000a7e4: e1a01008 mov r1, r8
a000a7e8: e5973000 ldr r3, [r7]
a000a7ec: e593000c ldr r0, [r3, #12]
a000a7f0: eb004741 bl a001c4fc <vfprintf>
if (status)
a000a7f4: e3560000 cmp r6, #0
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
a000a7f8: e1a04000 mov r4, r0
if (status)
a000a7fc: 0a000008 beq a000a824 <rtems_verror+0xc0>
chars_written +=
fprintf(stderr, " (status: %s)", rtems_status_text(status));
a000a800: e5973000 ldr r3, [r7]
a000a804: e1a00006 mov r0, r6
a000a808: e593700c ldr r7, [r3, #12]
a000a80c: ebffffd0 bl a000a754 <rtems_status_text>
a000a810: e59f10a4 ldr r1, [pc, #164] ; a000a8bc <rtems_verror+0x158>
a000a814: e1a02000 mov r2, r0
a000a818: e1a00007 mov r0, r7
a000a81c: eb002cdf bl a0015ba0 <fprintf>
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written +=
a000a820: e0844000 add r4, r4, r0
fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno) {
a000a824: e3550000 cmp r5, #0
a000a828: 0a000015 beq a000a884 <rtems_verror+0x120>
if ((local_errno > 0) && *strerror(local_errno))
a000a82c: da00000d ble a000a868 <rtems_verror+0x104>
a000a830: e1a00005 mov r0, r5
a000a834: eb002fdc bl a00167ac <strerror>
a000a838: e5d03000 ldrb r3, [r0]
a000a83c: e3530000 cmp r3, #0
a000a840: 0a000008 beq a000a868 <rtems_verror+0x104>
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
a000a844: e59f306c ldr r3, [pc, #108] ; a000a8b8 <rtems_verror+0x154>
a000a848: e1a00005 mov r0, r5
a000a84c: e5933000 ldr r3, [r3]
a000a850: e593600c ldr r6, [r3, #12]
a000a854: eb002fd4 bl a00167ac <strerror>
a000a858: e59f1060 ldr r1, [pc, #96] ; a000a8c0 <rtems_verror+0x15c>
a000a85c: e1a02000 mov r2, r0
a000a860: e1a00006 mov r0, r6
a000a864: ea000004 b a000a87c <rtems_verror+0x118>
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
a000a868: e59f3048 ldr r3, [pc, #72] ; a000a8b8 <rtems_verror+0x154>
a000a86c: e59f1050 ldr r1, [pc, #80] ; a000a8c4 <rtems_verror+0x160>
a000a870: e1a02005 mov r2, r5
a000a874: e5933000 ldr r3, [r3]
a000a878: e593000c ldr r0, [r3, #12]
a000a87c: eb002cc7 bl a0015ba0 <fprintf>
a000a880: e0844000 add r4, r4, r0
}
chars_written += fprintf(stderr, "\n");
a000a884: e59f502c ldr r5, [pc, #44] ; a000a8b8 <rtems_verror+0x154>
a000a888: e59f1038 ldr r1, [pc, #56] ; a000a8c8 <rtems_verror+0x164>
a000a88c: e5953000 ldr r3, [r5]
a000a890: e593000c ldr r0, [r3, #12]
a000a894: eb002cc1 bl a0015ba0 <fprintf>
(void) fflush(stderr);
a000a898: e5953000 ldr r3, [r5]
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
}
chars_written += fprintf(stderr, "\n");
a000a89c: e0804004 add r4, r0, r4
(void) fflush(stderr);
a000a8a0: e593000c ldr r0, [r3, #12]
a000a8a4: eb002bd7 bl a0015808 <fflush>
return chars_written;
}
a000a8a8: e1a00004 mov r0, r4
a000a8ac: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
a00068fc <scanInt>:
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
a00068fc: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr}
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
a0006900: e59fb0dc ldr fp, [pc, #220] ; a00069e4 <scanInt+0xe8>
limit++;
continue;
}
sign = 1;
}
if (!isdigit(c))
a0006904: e59f90dc ldr r9, [pc, #220] ; a00069e8 <scanInt+0xec>
scanInt(FILE *fp, int *val)
{
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
int sign = 0;
a0006908: e3a04000 mov r4, #0
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
a000690c: e1a05000 mov r5, r0
a0006910: e58d1000 str r1, [sp]
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
a0006914: e3e08102 mvn r8, #-2147483648 ; 0x80000000
*/
static int
scanInt(FILE *fp, int *val)
{
int c;
unsigned int i = 0;
a0006918: e1a07004 mov r7, r4
sign = 1;
}
if (!isdigit(c))
return 0;
d = c - '0';
if ((i > (limit / 10))
a000691c: e3a0a00a mov sl, #10
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
a0006920: e5953004 ldr r3, [r5, #4]
a0006924: e2433001 sub r3, r3, #1
a0006928: e3530000 cmp r3, #0
a000692c: e5853004 str r3, [r5, #4]
a0006930: a5953000 ldrge r3, [r5]
a0006934: a4d36001 ldrbge r6, [r3], #1
a0006938: a5853000 strge r3, [r5]
a000693c: aa000003 bge a0006950 <scanInt+0x54>
a0006940: e59b0000 ldr r0, [fp] <== NOT EXECUTED
a0006944: e1a01005 mov r1, r5 <== NOT EXECUTED
a0006948: eb003134 bl a0012e20 <__srget_r> <== NOT EXECUTED
a000694c: e1a06000 mov r6, r0 <== NOT EXECUTED
if (c == ':')
a0006950: e356003a cmp r6, #58 ; 0x3a
a0006954: 0a000019 beq a00069c0 <scanInt+0xc4>
break;
if (sign == 0) {
a0006958: e3540000 cmp r4, #0
a000695c: 1a000004 bne a0006974 <scanInt+0x78>
if (c == '-') {
a0006960: e356002d cmp r6, #45 ; 0x2d
sign = -1;
limit++;
a0006964: 02888001 addeq r8, r8, #1
c = getc(fp);
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
sign = -1;
a0006968: 03e04000 mvneq r4, #0
for (;;) {
c = getc(fp);
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
a000696c: 0affffeb beq a0006920 <scanInt+0x24>
sign = -1;
limit++;
continue;
}
sign = 1;
a0006970: e3a04001 mov r4, #1
}
if (!isdigit(c))
a0006974: e5993000 ldr r3, [r9]
a0006978: e0833006 add r3, r3, r6
a000697c: e5d30001 ldrb r0, [r3, #1]
a0006980: e2100004 ands r0, r0, #4
a0006984: 0a000015 beq a00069e0 <scanInt+0xe4>
return 0;
d = c - '0';
if ((i > (limit / 10))
a0006988: e1a00008 mov r0, r8
a000698c: e3a0100a mov r1, #10
a0006990: eb003a51 bl a00152dc <__aeabi_uidiv>
a0006994: e1570000 cmp r7, r0
a0006998: 8a00000f bhi a00069dc <scanInt+0xe0>
}
sign = 1;
}
if (!isdigit(c))
return 0;
d = c - '0';
a000699c: e2466030 sub r6, r6, #48 ; 0x30
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
a00069a0: 1a000004 bne a00069b8 <scanInt+0xbc>
a00069a4: e1a00008 mov r0, r8 <== NOT EXECUTED
a00069a8: e3a0100a mov r1, #10 <== NOT EXECUTED
a00069ac: eb003ae2 bl a001553c <__umodsi3> <== NOT EXECUTED
a00069b0: e1560000 cmp r6, r0 <== NOT EXECUTED
a00069b4: 8a000008 bhi a00069dc <scanInt+0xe0> <== NOT EXECUTED
return 0;
i = i * 10 + d;
a00069b8: e027679a mla r7, sl, r7, r6
a00069bc: eaffffd7 b a0006920 <scanInt+0x24>
}
if (sign == 0)
a00069c0: e3540000 cmp r4, #0
return 0;
a00069c4: 01a00004 moveq r0, r4
*val = i * sign;
a00069c8: 10040497 mulne r4, r7, r4
a00069cc: 159d3000 ldrne r3, [sp]
return 1;
a00069d0: 13a00001 movne r0, #1
return 0;
i = i * 10 + d;
}
if (sign == 0)
return 0;
*val = i * sign;
a00069d4: 15834000 strne r4, [r3]
return 1;
a00069d8: ea000000 b a00069e0 <scanInt+0xe4>
if (!isdigit(c))
return 0;
d = c - '0';
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
a00069dc: e3a00000 mov r0, #0 <== NOT EXECUTED
}
if (sign == 0)
return 0;
*val = i * sign;
return 1;
}
a00069e0: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
a00069ec <scanString>:
/*
* Extract a string value from the database
*/
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
a00069ec: e92d41f0 push {r4, r5, r6, r7, r8, lr}
a00069f0: e1a06003 mov r6, r3
int c;
*name = *bufp;
a00069f4: e5923000 ldr r3, [r2]
for (;;) {
c = getc(fp);
a00069f8: e59f80dc ldr r8, [pc, #220] ; a0006adc <scanString+0xf0>
/*
* Extract a string value from the database
*/
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
a00069fc: e59d7018 ldr r7, [sp, #24]
a0006a00: e1a04000 mov r4, r0
a0006a04: e1a05002 mov r5, r2
int c;
*name = *bufp;
a0006a08: e5813000 str r3, [r1]
for (;;) {
c = getc(fp);
a0006a0c: e5943004 ldr r3, [r4, #4]
a0006a10: e2433001 sub r3, r3, #1
a0006a14: e3530000 cmp r3, #0
a0006a18: e5843004 str r3, [r4, #4]
a0006a1c: a5943000 ldrge r3, [r4]
a0006a20: a4d30001 ldrbge r0, [r3], #1
a0006a24: a5843000 strge r3, [r4]
a0006a28: aa000002 bge a0006a38 <scanString+0x4c>
a0006a2c: e5980000 ldr r0, [r8]
a0006a30: e1a01004 mov r1, r4
a0006a34: eb0030f9 bl a0012e20 <__srget_r>
if (c == ':') {
a0006a38: e350003a cmp r0, #58 ; 0x3a
a0006a3c: 1a000002 bne a0006a4c <scanString+0x60>
if (nlFlag)
a0006a40: e3570000 cmp r7, #0
a0006a44: 0a000013 beq a0006a98 <scanString+0xac>
a0006a48: ea00001f b a0006acc <scanString+0xe0> <== NOT EXECUTED
return 0;
break;
}
if (c == '\n') {
a0006a4c: e350000a cmp r0, #10
a0006a50: 1a000002 bne a0006a60 <scanString+0x74>
if (!nlFlag)
a0006a54: e3570000 cmp r7, #0
a0006a58: 1a00000e bne a0006a98 <scanString+0xac>
a0006a5c: ea000018 b a0006ac4 <scanString+0xd8> <== NOT EXECUTED
return 0;
break;
}
if (c == EOF)
a0006a60: e3700001 cmn r0, #1
a0006a64: 0a000018 beq a0006acc <scanString+0xe0>
return 0;
if (*nleft < 2)
a0006a68: e5963000 ldr r3, [r6]
a0006a6c: e3530001 cmp r3, #1
a0006a70: 9a000017 bls a0006ad4 <scanString+0xe8>
return 0;
**bufp = c;
a0006a74: e5953000 ldr r3, [r5]
a0006a78: e5c30000 strb r0, [r3]
++(*bufp);
a0006a7c: e5953000 ldr r3, [r5]
a0006a80: e2833001 add r3, r3, #1
a0006a84: e5853000 str r3, [r5]
--(*nleft);
a0006a88: e5963000 ldr r3, [r6]
a0006a8c: e2433001 sub r3, r3, #1
a0006a90: e5863000 str r3, [r6]
}
a0006a94: eaffffdc b a0006a0c <scanString+0x20>
**bufp = '\0';
a0006a98: e5953000 ldr r3, [r5]
a0006a9c: e3a02000 mov r2, #0
++(*bufp);
--(*nleft);
return 1;
a0006aa0: e3a00001 mov r0, #1
return 0;
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
a0006aa4: e5c32000 strb r2, [r3]
++(*bufp);
a0006aa8: e5953000 ldr r3, [r5]
a0006aac: e2833001 add r3, r3, #1
a0006ab0: e5853000 str r3, [r5]
--(*nleft);
a0006ab4: e5963000 ldr r3, [r6]
a0006ab8: e2433001 sub r3, r3, #1
a0006abc: e5863000 str r3, [r6]
return 1;
a0006ac0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
return 0;
break;
}
if (c == '\n') {
if (!nlFlag)
return 0;
a0006ac4: e1a00007 mov r0, r7 <== NOT EXECUTED
a0006ac8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
break;
}
if (c == EOF)
return 0;
a0006acc: e3a00000 mov r0, #0 <== NOT EXECUTED
a0006ad0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
if (*nleft < 2)
return 0;
a0006ad4: e3a00000 mov r0, #0 <== NOT EXECUTED
}
**bufp = '\0';
++(*bufp);
--(*nleft);
return 1;
}
a0006ad8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
a0006ae0 <scangr>:
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
a0006ae0: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
a0006ae4: e24dd014 sub sp, sp, #20 <== NOT EXECUTED
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
a0006ae8: e28d6008 add r6, sp, #8 <== NOT EXECUTED
a0006aec: e28d5004 add r5, sp, #4 <== NOT EXECUTED
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
a0006af0: e58d2008 str r2, [sp, #8] <== NOT EXECUTED
a0006af4: e58d3004 str r3, [sp, #4] <== NOT EXECUTED
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
a0006af8: e3a08000 mov r8, #0 <== NOT EXECUTED
a0006afc: e1a02006 mov r2, r6 <== NOT EXECUTED
a0006b00: e1a03005 mov r3, r5 <== NOT EXECUTED
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
a0006b04: e1a07000 mov r7, r0 <== NOT EXECUTED
a0006b08: e1a04001 mov r4, r1 <== NOT EXECUTED
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
a0006b0c: e58d8000 str r8, [sp] <== NOT EXECUTED
a0006b10: ebffffb5 bl a00069ec <scanString> <== NOT EXECUTED
a0006b14: e3500000 cmp r0, #0 <== NOT EXECUTED
a0006b18: 0a000037 beq a0006bfc <scangr+0x11c> <== NOT EXECUTED
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
a0006b1c: e1a00007 mov r0, r7 <== NOT EXECUTED
a0006b20: e2841004 add r1, r4, #4 <== NOT EXECUTED
a0006b24: e1a02006 mov r2, r6 <== NOT EXECUTED
a0006b28: e1a03005 mov r3, r5 <== NOT EXECUTED
a0006b2c: e58d8000 str r8, [sp] <== NOT EXECUTED
a0006b30: ebffffad bl a00069ec <scanString> <== NOT EXECUTED
a0006b34: e3500000 cmp r0, #0 <== NOT EXECUTED
a0006b38: 0a00002f beq a0006bfc <scangr+0x11c> <== NOT EXECUTED
|| !scanInt(fp, &grgid)
a0006b3c: e1a00007 mov r0, r7 <== NOT EXECUTED
a0006b40: e28d1010 add r1, sp, #16 <== NOT EXECUTED
a0006b44: ebffff6c bl a00068fc <scanInt> <== NOT EXECUTED
a0006b48: e3500000 cmp r0, #0 <== NOT EXECUTED
a0006b4c: 0a00002a beq a0006bfc <scangr+0x11c> <== NOT EXECUTED
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
a0006b50: e2888001 add r8, r8, #1 <== NOT EXECUTED
a0006b54: e1a00007 mov r0, r7 <== NOT EXECUTED
a0006b58: e28d100c add r1, sp, #12 <== NOT EXECUTED
a0006b5c: e1a02006 mov r2, r6 <== NOT EXECUTED
a0006b60: e1a03005 mov r3, r5 <== NOT EXECUTED
a0006b64: e58d8000 str r8, [sp] <== NOT EXECUTED
a0006b68: ebffff9f bl a00069ec <scanString> <== NOT EXECUTED
a0006b6c: e3500000 cmp r0, #0 <== NOT EXECUTED
a0006b70: 0a000021 beq a0006bfc <scangr+0x11c> <== NOT EXECUTED
return 0;
grp->gr_gid = grgid;
a0006b74: e1dd31b0 ldrh r3, [sp, #16] <== NOT EXECUTED
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
a0006b78: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED
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;
a0006b7c: e1c430b8 strh r3, [r4, #8] <== NOT EXECUTED
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
a0006b80: e1a03002 mov r3, r2 <== NOT EXECUTED
a0006b84: ea000001 b a0006b90 <scangr+0xb0> <== NOT EXECUTED
if(*cp == ',')
a0006b88: e350002c cmp r0, #44 ; 0x2c <== NOT EXECUTED
memcount++;
a0006b8c: 02888001 addeq r8, r8, #1 <== NOT EXECUTED
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
a0006b90: e4d30001 ldrb r0, [r3], #1 <== NOT EXECUTED
a0006b94: e3500000 cmp r0, #0 <== NOT EXECUTED
a0006b98: 1afffffa bne a0006b88 <scangr+0xa8> <== NOT EXECUTED
}
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
a0006b9c: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED
a0006ba0: e1a08108 lsl r8, r8, #2 <== NOT EXECUTED
a0006ba4: e2888013 add r8, r8, #19 <== NOT EXECUTED
a0006ba8: e1530008 cmp r3, r8 <== NOT EXECUTED
a0006bac: 3a000012 bcc a0006bfc <scangr+0x11c> <== NOT EXECUTED
return 0;
grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
a0006bb0: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
a0006bb4: e283300f add r3, r3, #15 <== NOT EXECUTED
a0006bb8: e3c3300f bic r3, r3, #15 <== NOT EXECUTED
a0006bbc: e584300c str r3, [r4, #12] <== NOT EXECUTED
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
a0006bc0: e5832000 str r2, [r3] <== NOT EXECUTED
a0006bc4: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
a0006bc8: e3a03001 mov r3, #1 <== NOT EXECUTED
a0006bcc: ea000004 b a0006be4 <scangr+0x104> <== NOT EXECUTED
if(*cp == ',') {
a0006bd0: e351002c cmp r1, #44 ; 0x2c <== NOT EXECUTED
*cp = '\0';
a0006bd4: 05420001 strbeq r0, [r2, #-1] <== NOT EXECUTED
grp->gr_mem[memcount++] = cp + 1;
a0006bd8: 0594100c ldreq r1, [r4, #12] <== NOT EXECUTED
a0006bdc: 07812103 streq r2, [r1, r3, lsl #2] <== NOT EXECUTED
a0006be0: 02833001 addeq r3, r3, #1 <== NOT EXECUTED
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
a0006be4: e4d21001 ldrb r1, [r2], #1 <== NOT EXECUTED
a0006be8: e3510000 cmp r1, #0 <== NOT EXECUTED
a0006bec: 1afffff7 bne a0006bd0 <scangr+0xf0> <== NOT EXECUTED
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
a0006bf0: e594200c ldr r2, [r4, #12] <== NOT EXECUTED
return 1;
a0006bf4: e3a00001 mov r0, #1 <== NOT EXECUTED
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
a0006bf8: e7821103 str r1, [r2, r3, lsl #2] <== NOT EXECUTED
return 1;
}
a0006bfc: e28dd014 add sp, sp, #20 <== NOT EXECUTED
a0006c00: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
a0008e6c <seteuid>:
#include <rtems/userenv.h>
int seteuid( uid_t euid )
{
_POSIX_types_Euid = euid;
a0008e6c: e59f300c ldr r3, [pc, #12] ; a0008e80 <seteuid+0x14> <== NOT EXECUTED
a0008e70: e5933000 ldr r3, [r3] <== NOT EXECUTED
a0008e74: e1c303b6 strh r0, [r3, #54] ; 0x36 <== NOT EXECUTED
return 0;
}
a0008e78: e3a00000 mov r0, #0 <== NOT EXECUTED
a0008e7c: e12fff1e bx lr <== NOT EXECUTED
a00080b4 <siproc>:
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
a00080b4: e591203c ldr r2, [r1, #60] ; 0x3c <== NOT EXECUTED
a00080b8: e59f304c ldr r3, [pc, #76] ; a000810c <siproc+0x58> <== NOT EXECUTED
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
a00080bc: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
a00080c0: e0023003 and r3, r2, r3 <== NOT EXECUTED
a00080c4: e3530000 cmp r3, #0 <== NOT EXECUTED
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
a00080c8: e1a04001 mov r4, r1 <== NOT EXECUTED
a00080cc: e1a05000 mov r5, r0 <== NOT EXECUTED
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
a00080d0: 0a00000b beq a0008104 <siproc+0x50> <== NOT EXECUTED
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
a00080d4: e5910018 ldr r0, [r1, #24] <== NOT EXECUTED
a00080d8: e3a01000 mov r1, #0 <== NOT EXECUTED
a00080dc: e1a02001 mov r2, r1 <== NOT EXECUTED
a00080e0: eb0004be bl a00093e0 <rtems_semaphore_obtain> <== NOT EXECUTED
i = iproc (c, tty);
a00080e4: e1a01004 mov r1, r4 <== NOT EXECUTED
a00080e8: e1a00005 mov r0, r5 <== NOT EXECUTED
a00080ec: ebffff88 bl a0007f14 <iproc> <== NOT EXECUTED
a00080f0: e1a05000 mov r5, r0 <== NOT EXECUTED
rtems_semaphore_release (tty->osem);
a00080f4: e5940018 ldr r0, [r4, #24] <== NOT EXECUTED
a00080f8: eb0004fe bl a00094f8 <rtems_semaphore_release> <== NOT EXECUTED
}
else {
i = iproc (c, tty);
}
return i;
}
a00080fc: e1a00005 mov r0, r5 <== NOT EXECUTED
a0008100: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
a0008104: e8bd4030 pop {r4, r5, lr} <== 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);
a0008108: eaffff81 b a0007f14 <iproc> <== NOT EXECUTED
a00071d0 <sleep>:
#if !defined(RTEMS_POSIX_API)
unsigned int sleep(
unsigned int seconds
)
{
a00071d0: e92d4010 push {r4, lr}
a00071d4: e1a04000 mov r4, r0
rtems_status_code status;
rtems_interval ticks_per_second;
ticks_per_second = rtems_clock_get_ticks_per_second() * seconds;
a00071d8: eb000780 bl a0008fe0 <rtems_clock_get_ticks_per_second>
status = rtems_task_wake_after( ticks_per_second );
a00071dc: e0000094 mul r0, r4, r0
a00071e0: eb000aa2 bl a0009c70 <rtems_task_wake_after>
* Returns the "unslept" amount of time. In RTEMS signals are not
* interruptable, so tasks really sleep all of the requested time.
*/
return 0;
}
a00071e4: e3a00000 mov r0, #0
a00071e8: e8bd8010 pop {r4, pc}
a0007058 <stat>:
int _STAT_NAME(
const char *path,
struct stat *buf
)
{
a0007058: e92d4070 push {r4, r5, r6, lr}
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
a000705c: e2515000 subs r5, r1, #0
int _STAT_NAME(
const char *path,
struct stat *buf
)
{
a0007060: e24dd018 sub sp, sp, #24
a0007064: e1a06000 mov r6, r0
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
a0007068: 1a000003 bne a000707c <stat+0x24>
rtems_set_errno_and_return_minus_one( EFAULT );
a000706c: eb001dde bl a000e7ec <__errno>
a0007070: e3a0300e mov r3, #14
a0007074: e5803000 str r3, [r0]
a0007078: ea000016 b a00070d8 <stat+0x80> <== NOT EXECUTED
status = rtems_filesystem_evaluate_path( path, strlen( path ),
a000707c: eb002149 bl a000f5a8 <strlen>
a0007080: e28d4004 add r4, sp, #4
a0007084: e3a03001 mov r3, #1
a0007088: e1a01000 mov r1, r0
a000708c: e58d3000 str r3, [sp]
a0007090: e1a00006 mov r0, r6
a0007094: e3a02000 mov r2, #0
a0007098: e1a03004 mov r3, r4
a000709c: ebfffc5a bl a000620c <rtems_filesystem_evaluate_path>
0, &loc, _STAT_FOLLOW_LINKS );
if ( status != 0 )
a00070a0: e2501000 subs r1, r0, #0
a00070a4: 1a00000b bne a00070d8 <stat+0x80>
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( buf, 0, sizeof(struct stat) );
a00070a8: e3a02048 mov r2, #72 ; 0x48
a00070ac: e1a00005 mov r0, r5
a00070b0: eb002032 bl a000f180 <memset>
status = (*loc.handlers->fstat_h)( &loc, buf );
a00070b4: e59d300c ldr r3, [sp, #12]
a00070b8: e1a01005 mov r1, r5
a00070bc: e1a00004 mov r0, r4
a00070c0: e5933018 ldr r3, [r3, #24]
a00070c4: e12fff33 blx r3
a00070c8: e1a05000 mov r5, r0
rtems_filesystem_freenode( &loc );
a00070cc: e1a00004 mov r0, r4
a00070d0: ebfffc7d bl a00062cc <rtems_filesystem_freenode>
return status;
a00070d4: ea000000 b a00070dc <stat+0x84>
rtems_set_errno_and_return_minus_one( EFAULT );
status = rtems_filesystem_evaluate_path( path, strlen( path ),
0, &loc, _STAT_FOLLOW_LINKS );
if ( status != 0 )
return -1;
a00070d8: e3e05000 mvn r5, #0
status = (*loc.handlers->fstat_h)( &loc, buf );
rtems_filesystem_freenode( &loc );
return status;
}
a00070dc: e1a00005 mov r0, r5
a00070e0: e28dd018 add sp, sp, #24
a00070e4: e8bd8070 pop {r4, r5, r6, pc}
a00098c0 <statvfs>:
#include <sys/statvfs.h>
int
statvfs (const char *path, struct statvfs *sb)
{
a00098c0: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
a00098c4: e24dd018 sub sp, sp, #24 <== NOT EXECUTED
a00098c8: e1a05001 mov r5, r1 <== NOT EXECUTED
a00098cc: e1a06000 mov r6, r0 <== NOT EXECUTED
* 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 ) )
a00098d0: eb002dcb bl a0015004 <strlen> <== NOT EXECUTED
a00098d4: e28d4004 add r4, sp, #4 <== NOT EXECUTED
a00098d8: e3a03001 mov r3, #1 <== NOT EXECUTED
a00098dc: e1a01000 mov r1, r0 <== NOT EXECUTED
a00098e0: e58d3000 str r3, [sp] <== NOT EXECUTED
a00098e4: e1a00006 mov r0, r6 <== NOT EXECUTED
a00098e8: e3a02000 mov r2, #0 <== NOT EXECUTED
a00098ec: e1a03004 mov r3, r4 <== NOT EXECUTED
a00098f0: ebfffb06 bl a0008510 <rtems_filesystem_evaluate_path> <== NOT EXECUTED
a00098f4: e2501000 subs r1, r0, #0 <== NOT EXECUTED
return -1;
a00098f8: 13e05000 mvnne r5, #0 <== NOT EXECUTED
* 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 ) )
a00098fc: 1a00000b bne a0009930 <statvfs+0x70> <== NOT EXECUTED
return -1;
mt_entry = loc.mt_entry;
a0009900: e59d6014 ldr r6, [sp, #20] <== NOT EXECUTED
fs_mount_root = &mt_entry->mt_fs_root;
memset (sb, 0, sizeof (struct statvfs));
a0009904: e1a00005 mov r0, r5 <== NOT EXECUTED
a0009908: e3a02038 mov r2, #56 ; 0x38 <== NOT EXECUTED
a000990c: eb0028b4 bl a0013be4 <memset> <== NOT EXECUTED
result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb );
a0009910: e5963028 ldr r3, [r6, #40] ; 0x28 <== NOT EXECUTED
a0009914: e1a01005 mov r1, r5 <== NOT EXECUTED
a0009918: e286001c add r0, r6, #28 <== NOT EXECUTED
a000991c: e5933044 ldr r3, [r3, #68] ; 0x44 <== NOT EXECUTED
a0009920: e12fff33 blx r3 <== NOT EXECUTED
a0009924: e1a05000 mov r5, r0 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
a0009928: e1a00004 mov r0, r4 <== NOT EXECUTED
a000992c: ebfffb27 bl a00085d0 <rtems_filesystem_freenode> <== NOT EXECUTED
return result;
}
a0009930: e1a00005 mov r0, r5 <== NOT EXECUTED
a0009934: e28dd018 add sp, sp, #24 <== NOT EXECUTED
a0009938: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
a0008228 <sync>:
{
/*
* Walk the one used initially by RTEMS.
*/
_fwalk(_global_impure_ptr, sync_wrapper);
a0008228: e59f3018 ldr r3, [pc, #24] ; a0008248 <sync+0x20> <== NOT EXECUTED
* We have to extern it here.
*/
extern struct _reent * const _global_impure_ptr __ATTRIBUTE_IMPURE_PTR__;
void sync(void)
{
a000822c: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
/*
* Walk the one used initially by RTEMS.
*/
_fwalk(_global_impure_ptr, sync_wrapper);
a0008230: e5930000 ldr r0, [r3] <== NOT EXECUTED
a0008234: e59f1010 ldr r1, [pc, #16] ; a000824c <sync+0x24> <== NOT EXECUTED
a0008238: eb0027d8 bl a00121a0 <_fwalk> <== NOT EXECUTED
*/
/*
* Now walk all the per-thread reentrancy structures.
*/
rtems_iterate_over_all_threads(sync_per_thread);
a000823c: e59f000c ldr r0, [pc, #12] ; a0008250 <sync+0x28> <== NOT EXECUTED
}
a0008240: e49de004 pop {lr} ; (ldr lr, [sp], #4) <== NOT EXECUTED
*/
/*
* Now walk all the per-thread reentrancy structures.
*/
rtems_iterate_over_all_threads(sync_per_thread);
a0008244: ea000da7 b a000b8e8 <rtems_iterate_over_all_threads> <== NOT EXECUTED
a00081cc <sync_per_thread>:
/*
* The sync_wrapper() function will operate on the current thread's
* reent structure so we will temporarily use that.
*/
this_reent = t->libc_reent;
a00081cc: e59030f0 ldr r3, [r0, #240] ; 0xf0 <== NOT EXECUTED
fdatasync(fn);
}
/* iterate over all FILE *'s for this thread */
static void sync_per_thread(Thread_Control *t)
{
a00081d0: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
/*
* 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 ) {
a00081d4: e3530000 cmp r3, #0 <== NOT EXECUTED
a00081d8: 0a000008 beq a0008200 <sync_per_thread+0x34> <== NOT EXECUTED
current_reent = _Thread_Executing->libc_reent;
a00081dc: e59f4020 ldr r4, [pc, #32] ; a0008204 <sync_per_thread+0x38><== NOT EXECUTED
_Thread_Executing->libc_reent = this_reent;
_fwalk (t->libc_reent, sync_wrapper);
a00081e0: e59f1020 ldr r1, [pc, #32] ; a0008208 <sync_per_thread+0x3c><== NOT EXECUTED
* The sync_wrapper() function will operate on the current thread's
* reent structure so we will temporarily use that.
*/
this_reent = t->libc_reent;
if ( this_reent ) {
current_reent = _Thread_Executing->libc_reent;
a00081e4: e5942004 ldr r2, [r4, #4] <== NOT EXECUTED
a00081e8: e59250f0 ldr r5, [r2, #240] ; 0xf0 <== NOT EXECUTED
_Thread_Executing->libc_reent = this_reent;
a00081ec: e58230f0 str r3, [r2, #240] ; 0xf0 <== NOT EXECUTED
_fwalk (t->libc_reent, sync_wrapper);
a00081f0: e59000f0 ldr r0, [r0, #240] ; 0xf0 <== NOT EXECUTED
a00081f4: eb0027e9 bl a00121a0 <_fwalk> <== NOT EXECUTED
_Thread_Executing->libc_reent = current_reent;
a00081f8: e5943004 ldr r3, [r4, #4] <== NOT EXECUTED
a00081fc: e58350f0 str r5, [r3, #240] ; 0xf0 <== NOT EXECUTED
a0008200: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
a000820c <sync_wrapper>:
/* XXX check standards -- Linux version appears to be void */
void _fwalk(struct _reent *, void *);
static void sync_wrapper(FILE *f)
{
a000820c: e92d4010 push {r4, lr} <== NOT EXECUTED
int fn = fileno(f);
a0008210: eb0024fe bl a0011610 <fileno> <== NOT EXECUTED
a0008214: e1a04000 mov r4, r0 <== NOT EXECUTED
/*
* We are explicitly NOT checking the return values as it does not
* matter if they succeed. We are just making a best faith attempt
* at both and trusting that we were passed a good FILE pointer.
*/
fsync(fn);
a0008218: ebfffb57 bl a0006f7c <fsync> <== NOT EXECUTED
fdatasync(fn);
a000821c: e1a00004 mov r0, r4 <== NOT EXECUTED
}
a0008220: e8bd4010 pop {r4, lr} <== NOT EXECUTED
* We are explicitly NOT checking the return values as it does not
* matter if they succeed. We are just making a best faith attempt
* at both and trusting that we were passed a good FILE pointer.
*/
fsync(fn);
fdatasync(fn);
a0008224: eafffa9e b a0006ca4 <fdatasync> <== NOT EXECUTED
a0008d14 <tcsetattr>:
int fd,
int opt,
struct termios *tp
)
{
switch (opt) {
a0008d14: e3510000 cmp r1, #0
int tcsetattr(
int fd,
int opt,
struct termios *tp
)
{
a0008d18: e92d4030 push {r4, r5, lr}
a0008d1c: e1a05000 mov r5, r0
a0008d20: e1a04002 mov r4, r2
switch (opt) {
a0008d24: 0a00000a beq a0008d54 <tcsetattr+0x40>
a0008d28: e3510001 cmp r1, #1
a0008d2c: 0a000003 beq a0008d40 <tcsetattr+0x2c>
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
a0008d30: eb0024f4 bl a0012108 <__errno>
a0008d34: e3a03086 mov r3, #134 ; 0x86
a0008d38: e5803000 str r3, [r0]
a0008d3c: ea000009 b a0008d68 <tcsetattr+0x54>
case TCSADRAIN:
if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0)
a0008d40: e3a01003 mov r1, #3
a0008d44: e3a02000 mov r2, #0
a0008d48: eb001b49 bl a000fa74 <ioctl>
a0008d4c: e3500000 cmp r0, #0
a0008d50: ba000004 blt a0008d68 <tcsetattr+0x54>
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
a0008d54: e1a00005 mov r0, r5
a0008d58: e3a01002 mov r1, #2
a0008d5c: e1a02004 mov r2, r4
}
}
a0008d60: e8bd4030 pop {r4, r5, lr}
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
a0008d64: ea001b42 b a000fa74 <ioctl>
}
}
a0008d68: e3e00000 mvn r0, #0
a0008d6c: e8bd8030 pop {r4, r5, pc}
a000c4c4 <truncate>:
int truncate(
const char *path,
off_t length
)
{
a000c4c4: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
a000c4c8: e1a05001 mov r5, r1 <== NOT EXECUTED
int status;
int fd;
fd = open( path, O_WRONLY );
a000c4cc: e3a01001 mov r1, #1 <== NOT EXECUTED
int truncate(
const char *path,
off_t length
)
{
a000c4d0: e1a06002 mov r6, r2 <== NOT EXECUTED
int status;
int fd;
fd = open( path, O_WRONLY );
a000c4d4: ebfff776 bl a000a2b4 <open> <== NOT EXECUTED
if ( fd == -1 )
a000c4d8: e3700001 cmn r0, #1 <== NOT EXECUTED
)
{
int status;
int fd;
fd = open( path, O_WRONLY );
a000c4dc: e1a04000 mov r4, r0 <== NOT EXECUTED
if ( fd == -1 )
return -1;
a000c4e0: 01a05000 moveq r5, r0 <== NOT EXECUTED
{
int status;
int fd;
fd = open( path, O_WRONLY );
if ( fd == -1 )
a000c4e4: 0a000005 beq a000c500 <truncate+0x3c> <== NOT EXECUTED
return -1;
status = ftruncate( fd, length );
a000c4e8: e1a01005 mov r1, r5 <== NOT EXECUTED
a000c4ec: e1a02006 mov r2, r6 <== NOT EXECUTED
a000c4f0: eb0014a2 bl a0011780 <ftruncate> <== NOT EXECUTED
a000c4f4: e1a05000 mov r5, r0 <== NOT EXECUTED
(void) close( fd );
a000c4f8: e1a00004 mov r0, r4 <== NOT EXECUTED
a000c4fc: ebfff298 bl a0008f64 <close> <== NOT EXECUTED
return status;
}
a000c500: e1a00005 mov r0, r5 <== NOT EXECUTED
a000c504: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
a0009a58 <unlink>:
#include <rtems/seterr.h>
int unlink(
const char *path
)
{
a0009a58: e92d40f0 push {r4, r5, r6, r7, lr}
a0009a5c: e24dd030 sub sp, sp, #48 ; 0x30
a0009a60: e1a06000 mov r6, r0
/*
* Get the node to be unlinked. Find the parent path first.
*/
parentpathlen = rtems_filesystem_dirname ( path );
a0009a64: ebfff557 bl a0006fc8 <rtems_filesystem_dirname>
if ( parentpathlen == 0 )
a0009a68: e2504000 subs r4, r0, #0
a0009a6c: e28d3018 add r3, sp, #24
a0009a70: 1a000005 bne a0009a8c <unlink+0x34>
rtems_filesystem_get_start_loc( path, &i, &parentloc );
a0009a74: e1a00006 mov r0, r6 <== NOT EXECUTED
a0009a78: e28d102c add r1, sp, #44 ; 0x2c <== NOT EXECUTED
a0009a7c: e1a02003 mov r2, r3 <== NOT EXECUTED
a0009a80: ebfff930 bl a0007f48 <rtems_filesystem_get_start_loc> <== NOT EXECUTED
const char *name;
rtems_filesystem_location_info_t parentloc;
rtems_filesystem_location_info_t loc;
int i;
int result;
bool free_parentloc = false;
a0009a84: e1a05004 mov r5, r4 <== NOT EXECUTED
a0009a88: ea000008 b a0009ab0 <unlink+0x58> <== NOT EXECUTED
parentpathlen = rtems_filesystem_dirname ( path );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( path, &i, &parentloc );
else {
result = rtems_filesystem_evaluate_path( path, parentpathlen,
a0009a8c: e3a02000 mov r2, #0
a0009a90: e58d2000 str r2, [sp]
a0009a94: e1a00006 mov r0, r6
a0009a98: e1a01004 mov r1, r4
a0009a9c: e2822002 add r2, r2, #2
a0009aa0: ebfff535 bl a0006f7c <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
a0009aa4: e3500000 cmp r0, #0
a0009aa8: 1a00003b bne a0009b9c <unlink+0x144>
return -1;
free_parentloc = true;
a0009aac: e3a05001 mov r5, #1
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
a0009ab0: e28dc004 add ip, sp, #4
a0009ab4: e28de018 add lr, sp, #24
a0009ab8: e8be000f ldm lr!, {r0, r1, r2, r3}
a0009abc: e8ac000f stmia ip!, {r0, r1, r2, r3}
a0009ac0: e59e3000 ldr r3, [lr]
name = path + parentpathlen;
a0009ac4: e0864004 add r4, r6, r4
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
a0009ac8: e1a00004 mov r0, r4
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
a0009acc: e58c3000 str r3, [ip]
name = path + parentpathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
a0009ad0: eb002cbe bl a0014dd0 <strlen>
a0009ad4: e1a01000 mov r1, r0
a0009ad8: e1a00004 mov r0, r4
a0009adc: ebfff547 bl a0007000 <rtems_filesystem_prefix_separators>
a0009ae0: e0846000 add r6, r4, r0
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
a0009ae4: e1a00006 mov r0, r6
a0009ae8: eb002cb8 bl a0014dd0 <strlen>
a0009aec: e28d4004 add r4, sp, #4
a0009af0: e1a01000 mov r1, r0
a0009af4: e3a02000 mov r2, #0
a0009af8: e1a00006 mov r0, r6
a0009afc: e1a03004 mov r3, r4
a0009b00: e58d2000 str r2, [sp]
a0009b04: ebfff500 bl a0006f0c <rtems_filesystem_evaluate_relative_path>
0, &loc, false );
if ( result != 0 ) {
a0009b08: e3500000 cmp r0, #0
a0009b0c: 0a000004 beq a0009b24 <unlink+0xcc>
if ( free_parentloc )
a0009b10: e3550000 cmp r5, #0 <== NOT EXECUTED
a0009b14: 0a000020 beq a0009b9c <unlink+0x144> <== NOT EXECUTED
rtems_filesystem_freenode( &parentloc );
a0009b18: e28d0018 add r0, sp, #24 <== NOT EXECUTED
a0009b1c: ebfff546 bl a000703c <rtems_filesystem_freenode> <== NOT EXECUTED
a0009b20: ea00001d b a0009b9c <unlink+0x144> <== NOT EXECUTED
return -1;
}
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
a0009b24: e59d3010 ldr r3, [sp, #16]
a0009b28: e1a00004 mov r0, r4
a0009b2c: e5933010 ldr r3, [r3, #16]
a0009b30: e12fff33 blx r3
a0009b34: e3500001 cmp r0, #1
a0009b38: 1a000009 bne a0009b64 <unlink+0x10c>
rtems_filesystem_freenode( &loc );
a0009b3c: e1a00004 mov r0, r4 <== NOT EXECUTED
a0009b40: ebfff53d bl a000703c <rtems_filesystem_freenode> <== NOT EXECUTED
if ( free_parentloc )
a0009b44: e3550000 cmp r5, #0 <== NOT EXECUTED
a0009b48: 0a000001 beq a0009b54 <unlink+0xfc> <== NOT EXECUTED
rtems_filesystem_freenode( &parentloc );
a0009b4c: e28d0018 add r0, sp, #24 <== NOT EXECUTED
a0009b50: ebfff539 bl a000703c <rtems_filesystem_freenode> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EISDIR );
a0009b54: eb0028de bl a0013ed4 <__errno> <== NOT EXECUTED
a0009b58: e3a03015 mov r3, #21 <== NOT EXECUTED
a0009b5c: e5803000 str r3, [r0] <== NOT EXECUTED
a0009b60: ea00000d b a0009b9c <unlink+0x144> <== NOT EXECUTED
}
result = (*loc.ops->unlink_h)( &parentloc, &loc );
a0009b64: e59d3010 ldr r3, [sp, #16]
a0009b68: e28d6018 add r6, sp, #24
a0009b6c: e1a01004 mov r1, r4
a0009b70: e593300c ldr r3, [r3, #12]
a0009b74: e1a00006 mov r0, r6
a0009b78: e12fff33 blx r3
a0009b7c: e1a07000 mov r7, r0
rtems_filesystem_freenode( &loc );
a0009b80: e1a00004 mov r0, r4
a0009b84: ebfff52c bl a000703c <rtems_filesystem_freenode>
if ( free_parentloc )
a0009b88: e3550000 cmp r5, #0
a0009b8c: 0a000003 beq a0009ba0 <unlink+0x148>
rtems_filesystem_freenode( &parentloc );
a0009b90: e1a00006 mov r0, r6
a0009b94: ebfff528 bl a000703c <rtems_filesystem_freenode>
a0009b98: ea000000 b a0009ba0 <unlink+0x148>
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return -1;
a0009b9c: e3e07000 mvn r7, #0 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return result;
}
a0009ba0: e1a00007 mov r0, r7
a0009ba4: e28dd030 add sp, sp, #48 ; 0x30
a0009ba8: e8bd80f0 pop {r4, r5, r6, r7, pc}
a0009cec <unmount>:
*/
int unmount(
const char *path
)
{
a0009cec: e92d4070 push {r4, r5, r6, lr}
a0009cf0: e24dd018 sub sp, sp, #24
a0009cf4: e1a05000 mov r5, r0
* 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 ) )
a0009cf8: eb00225f bl a001267c <strlen>
a0009cfc: e28d4004 add r4, sp, #4
a0009d00: e3a03001 mov r3, #1
a0009d04: e1a01000 mov r1, r0
a0009d08: e58d3000 str r3, [sp]
a0009d0c: e1a00005 mov r0, r5
a0009d10: e3a02000 mov r2, #0
a0009d14: e1a03004 mov r3, r4
a0009d18: ebfff464 bl a0006eb0 <rtems_filesystem_evaluate_path>
a0009d1c: e3500000 cmp r0, #0
a0009d20: 1a000040 bne a0009e28 <unmount+0x13c>
return -1;
mt_entry = loc.mt_entry;
a0009d24: e59d5014 ldr r5, [sp, #20]
/*
* Verify this is the root node for the file system to be unmounted.
*/
if ( fs_root_loc->node_access != loc.node_access ){
a0009d28: e59d3004 ldr r3, [sp, #4]
a0009d2c: e595201c ldr r2, [r5, #28]
a0009d30: e1520003 cmp r2, r3
a0009d34: 0a000004 beq a0009d4c <unmount+0x60>
rtems_filesystem_freenode( &loc );
a0009d38: e1a00004 mov r0, r4
a0009d3c: ebfff48b bl a0006f70 <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( EACCES );
a0009d40: eb001cd5 bl a001109c <__errno>
a0009d44: e3a0300d mov r3, #13
a0009d48: ea000011 b a0009d94 <unmount+0xa8>
/*
* Free the loc node and just use the nodes from the mt_entry .
*/
rtems_filesystem_freenode( &loc );
a0009d4c: e1a00004 mov r0, r4
a0009d50: ebfff486 bl a0006f70 <rtems_filesystem_freenode>
* 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 )
a0009d54: e59f30d8 ldr r3, [pc, #216] ; a0009e34 <unmount+0x148>
a0009d58: e5933000 ldr r3, [r3]
a0009d5c: e5933014 ldr r3, [r3, #20]
a0009d60: e1530005 cmp r3, r5
a0009d64: 0a000008 beq a0009d8c <unmount+0xa0>
/*
* Verify there are no file systems below the path specified
*/
if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point,
a0009d68: e59f00c8 ldr r0, [pc, #200] ; a0009e38 <unmount+0x14c>
a0009d6c: e595102c ldr r1, [r5, #44] ; 0x2c
a0009d70: ebfff6b1 bl a000783c <rtems_filesystem_mount_iterate>
a0009d74: e3500000 cmp r0, #0
a0009d78: 1a000003 bne a0009d8c <unmount+0xa0>
* 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 )
a0009d7c: e1a00005 mov r0, r5
a0009d80: ebfff562 bl a0007310 <rtems_libio_is_open_files_in_fs>
a0009d84: e3500001 cmp r0, #1
a0009d88: 1a000003 bne a0009d9c <unmount+0xb0>
rtems_set_errno_and_return_minus_one( EBUSY );
a0009d8c: eb001cc2 bl a001109c <__errno>
a0009d90: e3a03010 mov r3, #16
a0009d94: e5803000 str r3, [r0]
a0009d98: ea000022 b a0009e28 <unmount+0x13c>
* 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 )
a0009d9c: e5953014 ldr r3, [r5, #20]
a0009da0: e1a00005 mov r0, r5
a0009da4: e5933028 ldr r3, [r3, #40] ; 0x28
a0009da8: e12fff33 blx r3
a0009dac: e2506000 subs r6, r0, #0
a0009db0: 1a00001c bne a0009e28 <unmount+0x13c>
* 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){
a0009db4: e5953028 ldr r3, [r5, #40] ; 0x28
a0009db8: e1a00005 mov r0, r5
a0009dbc: e593302c ldr r3, [r3, #44] ; 0x2c
a0009dc0: e12fff33 blx r3
a0009dc4: e2504000 subs r4, r0, #0
a0009dc8: 0a000007 beq a0009dec <unmount+0x100>
if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 )
a0009dcc: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED
a0009dd0: e1a00005 mov r0, r5 <== NOT EXECUTED
a0009dd4: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
a0009dd8: e12fff33 blx r3 <== NOT EXECUTED
a0009ddc: e3500000 cmp r0, #0 <== NOT EXECUTED
a0009de0: 0a000010 beq a0009e28 <unmount+0x13c> <== NOT EXECUTED
rtems_fatal_error_occurred( 0 );
a0009de4: e1a00006 mov r0, r6 <== NOT EXECUTED
a0009de8: eb0003c9 bl a000ad14 <rtems_fatal_error_occurred> <== NOT EXECUTED
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
a0009dec: e59f6048 ldr r6, [pc, #72] ; a0009e3c <unmount+0x150>
a0009df0: e1a01004 mov r1, r4
a0009df4: e1a02004 mov r2, r4
a0009df8: e5960000 ldr r0, [r6]
a0009dfc: eb000242 bl a000a70c <rtems_semaphore_obtain>
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
a0009e00: e1a00005 mov r0, r5
a0009e04: eb000479 bl a000aff0 <_Chain_Extract>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
a0009e08: e5960000 ldr r0, [r6]
a0009e0c: eb000284 bl a000a824 <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 );
a0009e10: e2850008 add r0, r5, #8
a0009e14: ebfff455 bl a0006f70 <rtems_filesystem_freenode>
free( mt_entry );
a0009e18: e1a00005 mov r0, r5
a0009e1c: ebfff458 bl a0006f84 <free>
return 0;
a0009e20: e1a00004 mov r0, r4
a0009e24: ea000000 b a0009e2c <unmount+0x140>
*/
if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){
if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 )
rtems_fatal_error_occurred( 0 );
return -1;
a0009e28: e3e00000 mvn r0, #0
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
a0009e2c: e28dd018 add sp, sp, #24
a0009e30: e8bd8070 pop {r4, r5, r6, pc}
a0009cf4 <utime>:
int utime(
const char *path,
const struct utimbuf *times
)
{
a0009cf4: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
a0009cf8: e24dd020 sub sp, sp, #32 <== NOT EXECUTED
a0009cfc: e1a04001 mov r4, r1 <== NOT EXECUTED
a0009d00: e1a05000 mov r5, r0 <== NOT EXECUTED
rtems_filesystem_location_info_t temp_loc;
int result;
struct utimbuf now;
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) )
a0009d04: eb002451 bl a0012e50 <strlen> <== NOT EXECUTED
a0009d08: e3a03001 mov r3, #1 <== NOT EXECUTED
a0009d0c: e1a01000 mov r1, r0 <== NOT EXECUTED
a0009d10: e58d3000 str r3, [sp] <== NOT EXECUTED
a0009d14: e1a00005 mov r0, r5 <== NOT EXECUTED
a0009d18: e3a02000 mov r2, #0 <== NOT EXECUTED
a0009d1c: e28d3004 add r3, sp, #4 <== NOT EXECUTED
a0009d20: ebfff33a bl a0006a10 <rtems_filesystem_evaluate_path> <== NOT EXECUTED
a0009d24: e3500000 cmp r0, #0 <== NOT EXECUTED
return -1;
a0009d28: 13e04000 mvnne r4, #0 <== NOT EXECUTED
{
rtems_filesystem_location_info_t temp_loc;
int result;
struct utimbuf now;
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) )
a0009d2c: 1a00000e bne a0009d6c <utime+0x78> <== NOT EXECUTED
return -1;
if ( times == NULL ) {
a0009d30: e3540000 cmp r4, #0 <== NOT EXECUTED
a0009d34: 1a000003 bne a0009d48 <utime+0x54> <== NOT EXECUTED
now.actime = now.modtime = time( NULL );
a0009d38: eb002497 bl a0012f9c <time> <== NOT EXECUTED
a0009d3c: e28d4020 add r4, sp, #32 <== NOT EXECUTED
a0009d40: e58d001c str r0, [sp, #28] <== NOT EXECUTED
a0009d44: e5240008 str r0, [r4, #-8]! <== NOT EXECUTED
times = &now;
}
result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime );
a0009d48: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
a0009d4c: e28d5004 add r5, sp, #4 <== NOT EXECUTED
a0009d50: e8940006 ldm r4, {r1, r2} <== NOT EXECUTED
a0009d54: e5933030 ldr r3, [r3, #48] ; 0x30 <== NOT EXECUTED
a0009d58: e1a00005 mov r0, r5 <== NOT EXECUTED
a0009d5c: e12fff33 blx r3 <== NOT EXECUTED
a0009d60: e1a04000 mov r4, r0 <== NOT EXECUTED
rtems_filesystem_freenode( &temp_loc );
a0009d64: e1a00005 mov r0, r5 <== NOT EXECUTED
a0009d68: ebfff42e bl a0006e28 <rtems_filesystem_freenode> <== NOT EXECUTED
return result;
}
a0009d6c: e1a00004 mov r0, r4 <== NOT EXECUTED
a0009d70: e28dd020 add sp, sp, #32 <== NOT EXECUTED
a0009d74: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
a0009d78 <utimes>:
int utimes(
const char *path,
const struct timeval times[2]
)
{
a0009d78: e92d4003 push {r0, r1, lr} <== NOT EXECUTED
struct utimbuf timeinsecs;
if ( times == NULL )
a0009d7c: e2513000 subs r3, r1, #0 <== NOT EXECUTED
return utime( path, NULL );
timeinsecs.actime = (time_t) times[0].tv_sec;
a0009d80: 15932000 ldrne r2, [r3] <== NOT EXECUTED
timeinsecs.modtime = (time_t) times[1].tv_sec;
a0009d84: 15933008 ldrne r3, [r3, #8] <== NOT EXECUTED
return utime( path, &timeinsecs );
a0009d88: 11a0100d movne r1, sp <== NOT EXECUTED
struct utimbuf timeinsecs;
if ( times == NULL )
return utime( path, NULL );
timeinsecs.actime = (time_t) times[0].tv_sec;
a0009d8c: 158d2000 strne r2, [sp] <== NOT EXECUTED
timeinsecs.modtime = (time_t) times[1].tv_sec;
a0009d90: 158d3004 strne r3, [sp, #4] <== NOT EXECUTED
return utime( path, &timeinsecs );
a0009d94: ebffffd6 bl a0009cf4 <utime> <== NOT EXECUTED
}
a0009d98: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED
a001555c <write>:
ssize_t write(
int fd,
const void *buffer,
size_t count
)
{
a001555c: e92d4030 push {r4, r5, lr}
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
a0015560: e59f4098 ldr r4, [pc, #152] ; a0015600 <write+0xa4>
a0015564: e5944000 ldr r4, [r4]
a0015568: e1500004 cmp r0, r4
a001556c: 2a000006 bcs a001558c <write+0x30>
iop = rtems_libio_iop( fd );
a0015570: e59f408c ldr r4, [pc, #140] ; a0015604 <write+0xa8>
a0015574: e3a05038 mov r5, #56 ; 0x38
a0015578: e5944000 ldr r4, [r4]
a001557c: e0244095 mla r4, r5, r0, r4
rtems_libio_check_is_open( iop );
a0015580: e5940014 ldr r0, [r4, #20]
a0015584: e3100c01 tst r0, #256 ; 0x100
a0015588: 1a000002 bne a0015598 <write+0x3c>
a001558c: ebffeb3a bl a001027c <__errno> <== NOT EXECUTED
a0015590: e3a03009 mov r3, #9 <== NOT EXECUTED
a0015594: ea000007 b a00155b8 <write+0x5c> <== NOT EXECUTED
rtems_libio_check_buffer( buffer );
a0015598: e3510000 cmp r1, #0
a001559c: 0a000003 beq a00155b0 <write+0x54>
rtems_libio_check_count( count );
a00155a0: e3520000 cmp r2, #0
a00155a4: 0a000013 beq a00155f8 <write+0x9c>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
a00155a8: e3100004 tst r0, #4
a00155ac: 1a000004 bne a00155c4 <write+0x68>
a00155b0: ebffeb31 bl a001027c <__errno> <== NOT EXECUTED
a00155b4: e3a03016 mov r3, #22 <== NOT EXECUTED
a00155b8: e5803000 str r3, [r0] <== NOT EXECUTED
a00155bc: e3e00000 mvn r0, #0 <== NOT EXECUTED
a00155c0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
/*
* Now process the write() request.
*/
rc = (*iop->pathinfo.handlers->write_h)( iop, buffer, count );
a00155c4: e5943020 ldr r3, [r4, #32]
a00155c8: e1a00004 mov r0, r4
a00155cc: e593300c ldr r3, [r3, #12]
a00155d0: e12fff33 blx r3
if ( rc > 0 )
a00155d4: e3500000 cmp r0, #0
a00155d8: da000007 ble a00155fc <write+0xa0>
iop->offset += rc;
a00155dc: e284300c add r3, r4, #12
a00155e0: e893000c ldm r3, {r2, r3}
a00155e4: e0922000 adds r2, r2, r0
a00155e8: e0a33fc0 adc r3, r3, r0, asr #31
a00155ec: e584200c str r2, [r4, #12]
a00155f0: e5843010 str r3, [r4, #16]
a00155f4: e8bd8030 pop {r4, r5, pc}
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 );
a00155f8: e1a00002 mov r0, r2 <== NOT EXECUTED
if ( rc > 0 )
iop->offset += rc;
return rc;
}
a00155fc: e8bd8030 pop {r4, r5, pc}
a000a058 <writev>:
int bytes;
rtems_libio_t *iop;
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
a000a058: e59f3150 ldr r3, [pc, #336] ; a000a1b0 <writev+0x158>
ssize_t writev(
int fd,
const struct iovec *iov,
int iovcnt
)
{
a000a05c: e92d41f0 push {r4, r5, r6, r7, r8, lr}
int bytes;
rtems_libio_t *iop;
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
a000a060: e5933000 ldr r3, [r3]
ssize_t writev(
int fd,
const struct iovec *iov,
int iovcnt
)
{
a000a064: e1a08002 mov r8, r2
int bytes;
rtems_libio_t *iop;
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
a000a068: e1500003 cmp r0, r3
a000a06c: 2a000006 bcs a000a08c <writev+0x34>
iop = rtems_libio_iop( fd );
a000a070: e59f313c ldr r3, [pc, #316] ; a000a1b4 <writev+0x15c>
a000a074: e3a06038 mov r6, #56 ; 0x38
a000a078: e5933000 ldr r3, [r3]
a000a07c: e0263690 mla r6, r0, r6, r3
rtems_libio_check_is_open( iop );
a000a080: e5963014 ldr r3, [r6, #20]
a000a084: e3130c01 tst r3, #256 ; 0x100
a000a088: 1a000002 bne a000a098 <writev+0x40>
a000a08c: eb001c5e bl a001120c <__errno>
a000a090: e3a03009 mov r3, #9
a000a094: ea00001f b a000a118 <writev+0xc0>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
a000a098: e3130004 tst r3, #4
a000a09c: 0a00001b beq a000a110 <writev+0xb8>
/*
* Argument validation on IO vector
*/
if ( !iov )
a000a0a0: e3510000 cmp r1, #0
a000a0a4: 0a000019 beq a000a110 <writev+0xb8>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
a000a0a8: e3520000 cmp r2, #0
a000a0ac: da000017 ble a000a110 <writev+0xb8>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
a000a0b0: e3520b01 cmp r2, #1024 ; 0x400
a000a0b4: ca000015 bgt a000a110 <writev+0xb8> <== NOT EXECUTED
a000a0b8: e3a03000 mov r3, #0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
a000a0bc: e1a05001 mov r5, r1 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
a000a0c0: e1a02001 mov r2, r1 <== NOT EXECUTED
a000a0c4: e3a07001 mov r7, #1 <== NOT EXECUTED
a000a0c8: e1a04003 mov r4, r3 <== NOT EXECUTED
all_zeros = false;
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
a000a0cc: e59f00e4 ldr r0, [pc, #228] ; a000a1b8 <writev+0x160> <== NOT EXECUTED
a000a0d0: ea000000 b a000a0d8 <writev+0x80> <== NOT EXECUTED
if ( iov[v].iov_len )
all_zeros = false;
/* check for wrap */
old = total;
total += iov[v].iov_len;
a000a0d4: e1a04001 mov r4, r1 <== NOT EXECUTED
/*
* 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 )
a000a0d8: e5921000 ldr r1, [r2] <== NOT EXECUTED
a000a0dc: e3510000 cmp r1, #0 <== NOT EXECUTED
a000a0e0: 0a00000a beq a000a110 <writev+0xb8> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
a000a0e4: e5921004 ldr r1, [r2, #4] <== NOT EXECUTED
all_zeros = false;
a000a0e8: e3510000 cmp r1, #0 <== NOT EXECUTED
/* check for wrap */
old = total;
total += iov[v].iov_len;
a000a0ec: e0841001 add r1, r4, r1 <== NOT EXECUTED
*/
if ( iov[v].iov_base == 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
all_zeros = false;
a000a0f0: 13a07000 movne r7, #0 <== NOT EXECUTED
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
a000a0f4: e1510004 cmp r1, r4 <== NOT EXECUTED
a000a0f8: a3a04000 movge r4, #0 <== NOT EXECUTED
a000a0fc: b3a04001 movlt r4, #1 <== NOT EXECUTED
a000a100: e1510000 cmp r1, r0 <== NOT EXECUTED
a000a104: c3844001 orrgt r4, r4, #1 <== NOT EXECUTED
a000a108: e3540000 cmp r4, #0 <== NOT EXECUTED
a000a10c: 0a000003 beq a000a120 <writev+0xc8> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
a000a110: eb001c3d bl a001120c <__errno>
a000a114: e3a03016 mov r3, #22
a000a118: e5803000 str r3, [r0]
a000a11c: ea000020 b a000a1a4 <writev+0x14c>
* 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++ ) {
a000a120: e2833001 add r3, r3, #1
a000a124: e1530008 cmp r3, r8 <== NOT EXECUTED
a000a128: e2822008 add r2, r2, #8 <== NOT EXECUTED
a000a12c: baffffe8 blt a000a0d4 <writev+0x7c> <== NOT EXECUTED
}
/*
* A writev with all zeros is supposed to have no effect per OpenGroup.
*/
if ( all_zeros == true ) {
a000a130: e3570000 cmp r7, #0 <== NOT EXECUTED
a000a134: 1a00001b bne a000a1a8 <writev+0x150> <== NOT EXECUTED
a000a138: e1a04007 mov r4, r7 <== NOT EXECUTED
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
a000a13c: e5952004 ldr r2, [r5, #4] <== NOT EXECUTED
a000a140: e3520000 cmp r2, #0 <== NOT EXECUTED
a000a144: 0a000011 beq a000a190 <writev+0x138> <== NOT EXECUTED
continue;
bytes = (*iop->pathinfo.handlers->write_h)(
a000a148: e5963020 ldr r3, [r6, #32] <== NOT EXECUTED
a000a14c: e1a00006 mov r0, r6 <== NOT EXECUTED
a000a150: e5951000 ldr r1, [r5] <== NOT EXECUTED
a000a154: e593300c ldr r3, [r3, #12] <== NOT EXECUTED
a000a158: e12fff33 blx r3 <== NOT EXECUTED
iop,
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
a000a15c: e3500000 cmp r0, #0 <== NOT EXECUTED
a000a160: ba00000f blt a000a1a4 <writev+0x14c> <== NOT EXECUTED
return -1;
if ( bytes > 0 ) {
a000a164: 0a000006 beq a000a184 <writev+0x12c> <== NOT EXECUTED
iop->offset += bytes;
a000a168: e286300c add r3, r6, #12 <== NOT EXECUTED
a000a16c: e893000c ldm r3, {r2, r3} <== NOT EXECUTED
a000a170: e0922000 adds r2, r2, r0 <== NOT EXECUTED
a000a174: e0a33fc0 adc r3, r3, r0, asr #31 <== NOT EXECUTED
a000a178: e586200c str r2, [r6, #12] <== NOT EXECUTED
a000a17c: e5863010 str r3, [r6, #16] <== NOT EXECUTED
total += bytes;
a000a180: e0844000 add r4, r4, r0 <== NOT EXECUTED
}
if (bytes != iov[ v ].iov_len)
a000a184: e5953004 ldr r3, [r5, #4] <== NOT EXECUTED
a000a188: e1500003 cmp r0, r3 <== NOT EXECUTED
a000a18c: 1a000005 bne a000a1a8 <writev+0x150> <== NOT EXECUTED
}
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
a000a190: e2877001 add r7, r7, #1 <== NOT EXECUTED
a000a194: e1570008 cmp r7, r8 <== NOT EXECUTED
a000a198: e2855008 add r5, r5, #8 <== NOT EXECUTED
a000a19c: baffffe6 blt a000a13c <writev+0xe4> <== NOT EXECUTED
a000a1a0: ea000000 b a000a1a8 <writev+0x150> <== NOT EXECUTED
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
return -1;
a000a1a4: e3e04000 mvn r4, #0
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
a000a1a8: e1a00004 mov r0, r4
a000a1ac: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}