RTEMS 4.9.6Annotated Report
Sun Jul 24 18:09:27 2011
00008178 <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 ) {
8178: e5903000 ldr r3, [r0]
817c: e593204c ldr r2, [r3, #76]
)
{
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
8180: e590100c ldr r1, [r0, #12]
switch( node->type ) {
8184: e2422001 sub r2, r2, #1 ; 0x1
)
{
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
8188: e591302c ldr r3, [r1, #44]
switch( node->type ) {
818c: e3520005 cmp r2, #5 ; 0x5
8190: 979ff102 ldrls pc, [pc, r2, lsl #2]
8194: ea000007 b 81b8 <IMFS_Set_handlers+0x40> <== NOT EXECUTED
8198: 000081d0 .word 0x000081d0 <== NOT EXECUTED
819c: 000081e0 .word 0x000081e0 <== NOT EXECUTED
81a0: 000081c0 .word 0x000081c0 <== NOT EXECUTED
81a4: 000081c0 .word 0x000081c0 <== NOT EXECUTED
81a8: 000081b0 .word 0x000081b0 <== NOT EXECUTED
81ac: 000081b0 .word 0x000081b0 <== NOT EXECUTED
break;
case IMFS_LINEAR_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
81b0: e5933004 ldr r3, [r3, #4] <== NOT EXECUTED
81b4: e5803004 str r3, [r0, #4] <== NOT EXECUTED
break;
}
return 0;
}
81b8: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
81bc: e12fff1e bx lr <== NOT EXECUTED
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
break;
case IMFS_SYM_LINK:
case IMFS_HARD_LINK:
loc->handlers = &IMFS_link_handlers;
81c0: e59f3028 ldr r3, [pc, #40] ; 81f0 <IMFS_Set_handlers+0x78> <== NOT EXECUTED
81c4: e5803004 str r3, [r0, #4] <== NOT EXECUTED
loc->handlers = fs_info->memfile_handlers;
break;
}
return 0;
}
81c8: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
81cc: e12fff1e bx lr <== NOT EXECUTED
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
switch( node->type ) {
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
81d0: e5933008 ldr r3, [r3, #8]
81d4: e5803004 str r3, [r0, #4]
loc->handlers = fs_info->memfile_handlers;
break;
}
return 0;
}
81d8: e3a00000 mov r0, #0 ; 0x0
81dc: e12fff1e bx lr
switch( node->type ) {
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
break;
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
81e0: e59f300c ldr r3, [pc, #12] ; 81f4 <IMFS_Set_handlers+0x7c>
81e4: e5803004 str r3, [r0, #4]
loc->handlers = fs_info->memfile_handlers;
break;
}
return 0;
}
81e8: e3a00000 mov r0, #0 ; 0x0
81ec: e12fff1e bx lr
00009e5c <IMFS_chown>:
int IMFS_chown(
rtems_filesystem_location_info_t *pathloc, /* IN */
uid_t owner, /* IN */
gid_t group /* IN */
)
{
9e5c: e92d40f0 push {r4, r5, r6, r7, lr}
9e60: e1a01801 lsl r1, r1, #16
9e64: e1a02802 lsl r2, r2, #16
9e68: e24dd008 sub sp, sp, #8 ; 0x8
IMFS_jnode_t *jnode;
#if defined(RTEMS_POSIX_API)
uid_t st_uid;
#endif
jnode = (IMFS_jnode_t *) pathloc->node_access;
9e6c: e5904000 ldr r4, [r0]
int IMFS_chown(
rtems_filesystem_location_info_t *pathloc, /* IN */
uid_t owner, /* IN */
gid_t group /* IN */
)
{
9e70: e1a06821 lsr r6, r1, #16
9e74: e1a07822 lsr r7, r2, #16
/*
* Verify I am the owner of the node or the super user.
*/
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
9e78: eb00043e bl af78 <geteuid>
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
9e7c: e1d433bc ldrh r3, [r4, #60]
9e80: e1530000 cmp r3, r0
9e84: 13500000 cmpne r0, #0 ; 0x0
9e88: 03a05000 moveq r5, #0 ; 0x0
9e8c: 13a05001 movne r5, #1 ; 0x1
9e90: 1a000009 bne 9ebc <IMFS_chown+0x60>
rtems_set_errno_and_return_minus_one( EPERM );
#endif
jnode->st_uid = owner;
9e94: e1c463bc strh r6, [r4, #60]
jnode->st_gid = group;
9e98: e1c473be strh r7, [r4, #62]
IMFS_update_ctime( jnode );
9e9c: e1a0000d mov r0, sp
9ea0: e1a01005 mov r1, r5
9ea4: ebffe2a6 bl 2944 <gettimeofday>
9ea8: e59d3000 ldr r3, [sp]
9eac: e5843048 str r3, [r4, #72]
9eb0: e1a00005 mov r0, r5
return 0;
}
9eb4: e28dd008 add sp, sp, #8 ; 0x8
9eb8: e8bd80f0 pop {r4, r5, r6, r7, pc}
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
rtems_set_errno_and_return_minus_one( EPERM );
9ebc: eb0011d0 bl e604 <__errno> <== NOT EXECUTED
9ec0: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED
9ec4: e5803000 str r3, [r0] <== NOT EXECUTED
9ec8: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
9ecc: eafffff8 b 9eb4 <IMFS_chown+0x58> <== NOT EXECUTED
0000b37c <IMFS_create_node>:
IMFS_jnode_types_t type,
const char *name,
mode_t mode,
const IMFS_types_union *info
)
{
b37c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
IMFS_jnode_t *node;
struct timeval tv;
IMFS_jnode_t *parent = NULL;
IMFS_fs_info_t *fs_info;
if ( parent_loc != NULL )
b380: e250a000 subs sl, r0, #0 ; 0x0
IMFS_jnode_types_t type,
const char *name,
mode_t mode,
const IMFS_types_union *info
)
{
b384: e24dd008 sub sp, sp, #8 ; 0x8
b388: e1a07001 mov r7, r1
/*
* Allocate an IMFS jnode
*/
node = calloc( 1, sizeof( IMFS_jnode_t ) );
b38c: e3a00001 mov r0, #1 ; 0x1
b390: e3a01060 mov r1, #96 ; 0x60
IMFS_jnode_t *node;
struct timeval tv;
IMFS_jnode_t *parent = NULL;
IMFS_fs_info_t *fs_info;
if ( parent_loc != NULL )
b394: 01a0800a moveq r8, sl
parent = parent_loc->node_access;
b398: 159a8000 ldrne r8, [sl]
IMFS_jnode_types_t type,
const char *name,
mode_t mode,
const IMFS_types_union *info
)
{
b39c: e1a05002 mov r5, r2
b3a0: e1a06003 mov r6, r3
/*
* Allocate an IMFS jnode
*/
node = calloc( 1, sizeof( IMFS_jnode_t ) );
b3a4: ebfff700 bl 8fac <calloc>
if ( !node )
b3a8: e2504000 subs r4, r0, #0 ; 0x0
b3ac: 0a000035 beq b488 <IMFS_create_node+0x10c>
/*
* Fill in the basic information
*/
node->st_nlink = 1;
b3b0: e3a02001 mov r2, #1 ; 0x1
node->type = type;
strncpy( node->name, name, IMFS_NAME_MAX );
b3b4: e1a01005 mov r1, r5
/*
* Fill in the basic information
*/
node->st_nlink = 1;
b3b8: e1c423b4 strh r2, [r4, #52]
node->type = type;
b3bc: e584704c str r7, [r4, #76]
strncpy( node->name, name, IMFS_NAME_MAX );
b3c0: e3a02020 mov r2, #32 ; 0x20
b3c4: e284000c add r0, r4, #12 ; 0xc
b3c8: eb00086a bl d578 <strncpy>
/*
* Fill in the mode and permission information for the jnode structure.
*/
node->st_mode = mode & ~rtems_filesystem_umask;
b3cc: e59f2124 ldr r2, [pc, #292] ; b4f8 <IMFS_create_node+0x17c>
b3d0: e5921000 ldr r1, [r2]
b3d4: e5913024 ldr r3, [r1, #36]
b3d8: e1e03003 mvn r3, r3
b3dc: e0063003 and r3, r6, r3
b3e0: e5843030 str r3, [r4, #48]
#if defined(RTEMS_POSIX_API)
node->st_uid = geteuid();
b3e4: ebfff79b bl 9258 <geteuid>
b3e8: e1c403bc strh r0, [r4, #60]
node->st_gid = getegid();
b3ec: ebfff794 bl 9244 <getegid>
/*
* Now set all the times.
*/
gettimeofday( &tv, 0 );
b3f0: e3a01000 mov r1, #0 ; 0x0
node->st_mode = mode & ~rtems_filesystem_umask;
#if defined(RTEMS_POSIX_API)
node->st_uid = geteuid();
node->st_gid = getegid();
b3f4: e1c403be strh r0, [r4, #62]
/*
* Now set all the times.
*/
gettimeofday( &tv, 0 );
b3f8: e1a0000d mov r0, sp
b3fc: ebfff79a bl 926c <gettimeofday>
node->stat_atime = (time_t) tv.tv_sec;
b400: e59d3000 ldr r3, [sp]
/*
* Set the type specific information
*/
switch (type) {
b404: e2472001 sub r2, r7, #1 ; 0x1
gettimeofday( &tv, 0 );
node->stat_atime = (time_t) tv.tv_sec;
node->stat_mtime = (time_t) tv.tv_sec;
node->stat_ctime = (time_t) tv.tv_sec;
b408: e5843048 str r3, [r4, #72]
* Now set all the times.
*/
gettimeofday( &tv, 0 );
node->stat_atime = (time_t) tv.tv_sec;
b40c: e5843040 str r3, [r4, #64]
node->stat_mtime = (time_t) tv.tv_sec;
b410: e5843044 str r3, [r4, #68]
/*
* Set the type specific information
*/
switch (type) {
b414: e3520005 cmp r2, #5 ; 0x5
b418: 979ff102 ldrls pc, [pc, r2, lsl #2]
b41c: ea000020 b b4a4 <IMFS_create_node+0x128> <== NOT EXECUTED
b420: 0000b4b8 .word 0x0000b4b8 <== NOT EXECUTED
b424: 0000b4d4 .word 0x0000b4d4 <== NOT EXECUTED
b428: 0000b4e8 .word 0x0000b4e8 <== NOT EXECUTED
b42c: 0000b494 .word 0x0000b494 <== NOT EXECUTED
b430: 0000b444 .word 0x0000b444 <== NOT EXECUTED
b434: 0000b438 .word 0x0000b438 <== NOT EXECUTED
node->info.device.major = info->device.major;
node->info.device.minor = info->device.minor;
break;
case IMFS_LINEAR_FILE:
node->info.linearfile.size = 0;
b438: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED
node->info.linearfile.direct = 0;
b43c: e5843054 str r3, [r4, #84] <== NOT EXECUTED
node->info.device.major = info->device.major;
node->info.device.minor = info->device.minor;
break;
case IMFS_LINEAR_FILE:
node->info.linearfile.size = 0;
b440: e5843050 str r3, [r4, #80] <== NOT EXECUTED
node->info.linearfile.direct = 0;
case IMFS_MEMORY_FILE:
node->info.file.size = 0;
b444: e3a03000 mov r3, #0 ; 0x0
node->info.file.indirect = 0;
node->info.file.doubly_indirect = 0;
node->info.file.triply_indirect = 0;
b448: e584305c str r3, [r4, #92]
case IMFS_LINEAR_FILE:
node->info.linearfile.size = 0;
node->info.linearfile.direct = 0;
case IMFS_MEMORY_FILE:
node->info.file.size = 0;
b44c: e5843050 str r3, [r4, #80]
node->info.file.indirect = 0;
b450: e5843054 str r3, [r4, #84]
node->info.file.doubly_indirect = 0;
b454: e5843058 str r3, [r4, #88]
/*
* If this node has a parent, then put it in that directory list.
*/
if ( parent ) {
b458: e3580000 cmp r8, #0 ; 0x0
b45c: 0a000009 beq b488 <IMFS_create_node+0x10c>
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
b460: e1a01004 mov r1, r4
b464: e2880050 add r0, r8, #80 ; 0x50
b468: ebffe79b bl 52dc <_Chain_Append>
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
node->Parent = parent;
fs_info = parent_loc->mt_entry->fs_info;
b46c: e59a300c ldr r3, [sl, #12]
b470: e593102c ldr r1, [r3, #44]
node->st_ino = ++fs_info->ino_count;
b474: e5912000 ldr r2, [r1]
b478: e2822001 add r2, r2, #1 ; 0x1
b47c: e5812000 str r2, [r1]
* If this node has a parent, then put it in that directory list.
*/
if ( parent ) {
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
node->Parent = parent;
b480: e5848008 str r8, [r4, #8]
fs_info = parent_loc->mt_entry->fs_info;
node->st_ino = ++fs_info->ino_count;
b484: e5842038 str r2, [r4, #56]
}
return node;
}
b488: e1a00004 mov r0, r4
b48c: e28dd008 add sp, sp, #8 ; 0x8
b490: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
case IMFS_HARD_LINK:
node->info.hard_link.link_node = info->hard_link.link_node;
break;
case IMFS_SYM_LINK:
node->info.sym_link.name = info->sym_link.name;
b494: e59d2024 ldr r2, [sp, #36]
b498: e5923000 ldr r3, [r2]
b49c: e5843050 str r3, [r4, #80]
b4a0: eaffffec b b458 <IMFS_create_node+0xdc>
node->info.file.doubly_indirect = 0;
node->info.file.triply_indirect = 0;
break;
default:
assert(0);
b4a4: e59f0050 ldr r0, [pc, #80] ; b4fc <IMFS_create_node+0x180> <== NOT EXECUTED
b4a8: e3a01074 mov r1, #116 ; 0x74 <== NOT EXECUTED
b4ac: e59f204c ldr r2, [pc, #76] ; b500 <IMFS_create_node+0x184> <== NOT EXECUTED
b4b0: e59f304c ldr r3, [pc, #76] ; b504 <IMFS_create_node+0x188> <== NOT EXECUTED
b4b4: ebfff65f bl 8e38 <__assert_func> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
b4b8: e2843054 add r3, r4, #84 ; 0x54
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
b4bc: e2841050 add r1, r4, #80 ; 0x50
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
b4c0: e3a02000 mov r2, #0 ; 0x0
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
b4c4: e5843050 str r3, [r4, #80]
the_chain->permanent_null = NULL;
b4c8: e5842054 str r2, [r4, #84]
the_chain->last = _Chain_Head(the_chain);
b4cc: e5841058 str r1, [r4, #88]
b4d0: eaffffe0 b b458 <IMFS_create_node+0xdc>
node->info.sym_link.name = info->sym_link.name;
break;
case IMFS_DEVICE:
node->info.device.major = info->device.major;
node->info.device.minor = info->device.minor;
b4d4: e59d1024 ldr r1, [sp, #36]
b4d8: e891000c ldm r1, {r2, r3}
b4dc: e5843054 str r3, [r4, #84]
case IMFS_SYM_LINK:
node->info.sym_link.name = info->sym_link.name;
break;
case IMFS_DEVICE:
node->info.device.major = info->device.major;
b4e0: e5842050 str r2, [r4, #80]
b4e4: eaffffdb b b458 <IMFS_create_node+0xdc>
case IMFS_DIRECTORY:
rtems_chain_initialize_empty(&node->info.directory.Entries);
break;
case IMFS_HARD_LINK:
node->info.hard_link.link_node = info->hard_link.link_node;
b4e8: e59d1024 ldr r1, [sp, #36]
b4ec: e5913000 ldr r3, [r1]
b4f0: e5843050 str r3, [r4, #80]
b4f4: eaffffd7 b b458 <IMFS_create_node+0xdc>
00002b84 <IMFS_dump_directory>:
rtems_chain_node *the_node;
rtems_chain_control *the_chain;
IMFS_jnode_t *the_jnode;
int i;
assert( the_directory );
2b84: e3500000 cmp r0, #0 ; 0x0
void IMFS_dump_directory(
IMFS_jnode_t *the_directory,
int level
)
{
2b88: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
2b8c: e1a05001 mov r5, r1
rtems_chain_node *the_node;
rtems_chain_control *the_chain;
IMFS_jnode_t *the_jnode;
int i;
assert( the_directory );
2b90: 0a000021 beq 2c1c <IMFS_dump_directory+0x98>
assert( level >= 0 );
2b94: e3510000 cmp r1, #0 ; 0x0
2b98: ba000029 blt 2c44 <IMFS_dump_directory+0xc0>
assert( the_directory->type == IMFS_DIRECTORY );
2b9c: e590304c ldr r3, [r0, #76]
2ba0: e3530001 cmp r3, #1 ; 0x1
2ba4: 1a000021 bne 2c30 <IMFS_dump_directory+0xac>
the_chain = &the_directory->info.directory.Entries;
for ( the_node = the_chain->first;
2ba8: e5906050 ldr r6, [r0, #80]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
2bac: e2808054 add r8, r0, #84 ; 0x54
!rtems_chain_is_tail( the_chain, the_node );
2bb0: e1560008 cmp r6, r8
2bb4: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
2bb8: e59f7098 ldr r7, [pc, #152] ; 2c58 <IMFS_dump_directory+0xd4>
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
if ( the_jnode->type == IMFS_DIRECTORY )
IMFS_dump_directory( the_jnode, level + 1 );
2bbc: e281a001 add sl, r1, #1 ; 0x1
for ( the_node = the_chain->first;
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
2bc0: e3a04000 mov r4, #0 ; 0x0
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
2bc4: e5972000 ldr r2, [r7]
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
for ( i=0 ; i<=level ; i++ )
2bc8: e2844001 add r4, r4, #1 ; 0x1
fprintf(stdout, "...." );
2bcc: e5923008 ldr r3, [r2, #8]
2bd0: e59f0084 ldr r0, [pc, #132] ; 2c5c <IMFS_dump_directory+0xd8>
2bd4: e3a01001 mov r1, #1 ; 0x1
2bd8: e3a02004 mov r2, #4 ; 0x4
2bdc: eb0038f9 bl 10fc8 <fwrite>
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
for ( i=0 ; i<=level ; i++ )
2be0: e1550004 cmp r5, r4
2be4: aafffff6 bge 2bc4 <IMFS_dump_directory+0x40>
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
2be8: e1a00006 mov r0, r6
2bec: ebffff87 bl 2a10 <IMFS_print_jnode>
if ( the_jnode->type == IMFS_DIRECTORY )
2bf0: e596304c ldr r3, [r6, #76]
2bf4: e3530001 cmp r3, #1 ; 0x1
2bf8: 0a000003 beq 2c0c <IMFS_dump_directory+0x88>
the_chain = &the_directory->info.directory.Entries;
for ( the_node = the_chain->first;
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
2bfc: e5966000 ldr r6, [r6]
assert( the_directory->type == IMFS_DIRECTORY );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = the_chain->first;
!rtems_chain_is_tail( the_chain, the_node );
2c00: e1560008 cmp r6, r8
2c04: 1affffed bne 2bc0 <IMFS_dump_directory+0x3c>
2c08: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
if ( the_jnode->type == IMFS_DIRECTORY )
IMFS_dump_directory( the_jnode, level + 1 );
2c0c: e1a00006 mov r0, r6
2c10: e1a0100a mov r1, sl
2c14: ebffffda bl 2b84 <IMFS_dump_directory>
2c18: eafffff7 b 2bfc <IMFS_dump_directory+0x78>
rtems_chain_node *the_node;
rtems_chain_control *the_chain;
IMFS_jnode_t *the_jnode;
int i;
assert( the_directory );
2c1c: e59f003c ldr r0, [pc, #60] ; 2c60 <IMFS_dump_directory+0xdc><== NOT EXECUTED
2c20: e3a0107f mov r1, #127 ; 0x7f <== NOT EXECUTED
2c24: e59f2038 ldr r2, [pc, #56] ; 2c64 <IMFS_dump_directory+0xe0><== NOT EXECUTED
2c28: e59f3038 ldr r3, [pc, #56] ; 2c68 <IMFS_dump_directory+0xe4><== NOT EXECUTED
2c2c: eb0001bc bl 3324 <__assert_func> <== NOT EXECUTED
assert( level >= 0 );
assert( the_directory->type == IMFS_DIRECTORY );
2c30: e59f0028 ldr r0, [pc, #40] ; 2c60 <IMFS_dump_directory+0xdc><== NOT EXECUTED
2c34: e3a01083 mov r1, #131 ; 0x83 <== NOT EXECUTED
2c38: e59f2024 ldr r2, [pc, #36] ; 2c64 <IMFS_dump_directory+0xe0><== NOT EXECUTED
2c3c: e59f3028 ldr r3, [pc, #40] ; 2c6c <IMFS_dump_directory+0xe8><== NOT EXECUTED
2c40: eb0001b7 bl 3324 <__assert_func> <== NOT EXECUTED
IMFS_jnode_t *the_jnode;
int i;
assert( the_directory );
assert( level >= 0 );
2c44: e59f0014 ldr r0, [pc, #20] ; 2c60 <IMFS_dump_directory+0xdc><== NOT EXECUTED
2c48: e3a01081 mov r1, #129 ; 0x81 <== NOT EXECUTED
2c4c: e59f2010 ldr r2, [pc, #16] ; 2c64 <IMFS_dump_directory+0xe0><== NOT EXECUTED
2c50: e59f3018 ldr r3, [pc, #24] ; 2c70 <IMFS_dump_directory+0xec><== NOT EXECUTED
2c54: eb0001b2 bl 3324 <__assert_func> <== NOT EXECUTED
0000839c <IMFS_eval_path>:
int IMFS_eval_path(
const char *pathname, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
839c: 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 ) ) {
83a0: e3d1e007 bics lr, r1, #7 ; 0x7
int IMFS_eval_path(
const char *pathname, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
83a4: e24dd038 sub sp, sp, #56 ; 0x38
83a8: e1a0a001 mov sl, r1
83ac: e1a08000 mov r8, r0
83b0: e1a06002 mov r6, r2
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 ) ) {
83b4: 1a000080 bne 85bc <IMFS_eval_path+0x220>
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
83b8: e5925000 ldr r5, [r2]
83bc: e1a0700e mov r7, lr
83c0: e28d9003 add r9, sp, #3 ; 0x3
83c4: e28db034 add fp, sp, #52 ; 0x34
* 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], token, &len );
83c8: e0880007 add r0, r8, r7
83cc: e1a01009 mov r1, r9
83d0: e1a0200b mov r2, fp
83d4: eb000189 bl 8a00 <IMFS_get_token>
i += len;
if ( !pathloc->node_access )
83d8: e596e000 ldr lr, [r6]
83dc: e35e0000 cmp lr, #0 ; 0x0
* 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], token, &len );
83e0: e1a04000 mov r4, r0
i += len;
83e4: e59d3034 ldr r3, [sp, #52]
if ( !pathloc->node_access )
83e8: 0a00004d beq 8524 <IMFS_eval_path+0x188>
rtems_set_errno_and_return_minus_one( ENOENT );
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
83ec: e3500000 cmp r0, #0 ; 0x0
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], token, &len );
i += len;
83f0: e0877003 add r7, r7, r3
rtems_set_errno_and_return_minus_one( ENOENT );
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
83f4: 1a00000f bne 8438 <IMFS_eval_path+0x9c>
* 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 ) {
83f8: e59e304c ldr r3, [lr, #76]
83fc: e3530001 cmp r3, #1 ; 0x1
8400: 0a000063 beq 8594 <IMFS_eval_path+0x1f8>
return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
8404: e1a00006 mov r0, r6
8408: ebffff5a bl 8178 <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
840c: e1a0100a mov r1, sl
return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
8410: e1a04000 mov r4, r0
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
8414: e1a00006 mov r0, r6
8418: ebffff76 bl 81f8 <IMFS_evaluate_permission>
841c: e3500000 cmp r0, #0 ; 0x0
8420: 1a000036 bne 8500 <IMFS_eval_path+0x164>
rtems_set_errno_and_return_minus_one( EACCES );
8424: eb000ef6 bl c004 <__errno>
8428: e3a0300d mov r3, #13 ; 0xd
842c: e5803000 str r3, [r0]
8430: e3e04000 mvn r4, #0 ; 0x0
8434: ea000031 b 8500 <IMFS_eval_path+0x164>
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
8438: e595104c ldr r1, [r5, #76]
843c: e3510001 cmp r1, #1 ; 0x1
8440: 0a000031 beq 850c <IMFS_eval_path+0x170>
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
switch( type ) {
8444: e3540003 cmp r4, #3 ; 0x3
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;
8448: e1a0500e mov r5, lr
switch( type ) {
844c: 0a000006 beq 846c <IMFS_eval_path+0xd0>
8450: e3540004 cmp r4, #4 ; 0x4
8454: 0a000025 beq 84f0 <IMFS_eval_path+0x154>
8458: e3540002 cmp r4, #2 ; 0x2
845c: 0a000013 beq 84b0 <IMFS_eval_path+0x114>
/*
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
8460: e3540004 cmp r4, #4 ; 0x4
8464: 1affffd7 bne 83c8 <IMFS_eval_path+0x2c>
8468: eaffffe2 b 83f8 <IMFS_eval_path+0x5c> <== NOT EXECUTED
case IMFS_NAME:
/*
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
846c: e59e304c ldr r3, [lr, #76]
8470: e3530003 cmp r3, #3 ; 0x3
8474: 0a00002f beq 8538 <IMFS_eval_path+0x19c>
node = pathloc->node_access;
if ( !node )
rtems_set_errno_and_return_minus_one( ENOTDIR );
} else if ( node->type == IMFS_SYM_LINK ) {
8478: e3530004 cmp r3, #4 ; 0x4
847c: 0a000054 beq 85d4 <IMFS_eval_path+0x238>
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
8480: e3530001 cmp r3, #1 ; 0x1
8484: 1a000047 bne 85a8 <IMFS_eval_path+0x20c>
/*
* 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 ) {
8488: e595e05c ldr lr, [r5, #92]
848c: e35e0000 cmp lr, #0 ; 0x0
8490: 1a000042 bne 85a0 <IMFS_eval_path+0x204>
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
8494: e1a00005 mov r0, r5
8498: e1a01009 mov r1, r9
849c: eb000128 bl 8944 <IMFS_find_match_in_dir>
if ( !node )
84a0: e2505000 subs r5, r0, #0 ; 0x0
84a4: 0a00001e beq 8524 <IMFS_eval_path+0x188>
/*
* Set the node access to the point we have found.
*/
pathloc->node_access = node;
84a8: e5865000 str r5, [r6]
84ac: eaffffc5 b 83c8 <IMFS_eval_path+0x2c>
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
84b0: e59f2144 ldr r2, [pc, #324] ; 85fc <IMFS_eval_path+0x260>
84b4: e5923000 ldr r3, [r2]
84b8: e5932014 ldr r2, [r3, #20]
84bc: e152000e cmp r2, lr
84c0: 0affffc0 beq 83c8 <IMFS_eval_path+0x2c>
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
84c4: e596200c ldr r2, [r6, #12]
84c8: e5923018 ldr r3, [r2, #24]
84cc: e153000e cmp r3, lr
84d0: 0a000020 beq 8558 <IMFS_eval_path+0x1bc>
*pathloc = newloc;
return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),flags,pathloc);
}
} else {
if ( !node->Parent )
84d4: e59e5008 ldr r5, [lr, #8]
84d8: e3550000 cmp r5, #0 ; 0x0
84dc: 1afffff1 bne 84a8 <IMFS_eval_path+0x10c>
rtems_set_errno_and_return_minus_one( ENOENT );
84e0: eb000ec7 bl c004 <__errno>
84e4: e5804000 str r4, [r0]
84e8: e3e04000 mvn r4, #0 ; 0x0
84ec: ea000003 b 8500 <IMFS_eval_path+0x164>
case IMFS_NO_MORE_PATH:
case IMFS_CURRENT_DIR:
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
84f0: eb000ec3 bl c004 <__errno>
84f4: e3a0305b mov r3, #91 ; 0x5b
84f8: e5803000 str r3, [r0]
84fc: e3e04000 mvn r4, #0 ; 0x0
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
8500: e1a00004 mov r0, r4
8504: e28dd038 add sp, sp, #56 ; 0x38
8508: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
850c: e1a00006 mov r0, r6
8510: ebffff38 bl 81f8 <IMFS_evaluate_permission>
8514: e3500000 cmp r0, #0 ; 0x0
8518: 0affffc1 beq 8424 <IMFS_eval_path+0x88>
851c: e596e000 ldr lr, [r6]
8520: eaffffc7 b 8444 <IMFS_eval_path+0xa8>
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
if ( !node )
rtems_set_errno_and_return_minus_one( ENOENT );
8524: eb000eb6 bl c004 <__errno>
8528: e3a03002 mov r3, #2 ; 0x2
852c: e5803000 str r3, [r0]
8530: e3e04000 mvn r4, #0 ; 0x0
8534: eafffff1 b 8500 <IMFS_eval_path+0x164>
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
IMFS_evaluate_hard_link( pathloc, 0 );
8538: e1a00006 mov r0, r6
853c: e3a01000 mov r1, #0 ; 0x0
8540: ebffff47 bl 8264 <IMFS_evaluate_hard_link>
node = pathloc->node_access;
8544: e5965000 ldr r5, [r6]
if ( !node )
8548: e3550000 cmp r5, #0 ; 0x0
854c: 0a000015 beq 85a8 <IMFS_eval_path+0x20c>
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
node = pathloc->node_access;
8550: e595304c ldr r3, [r5, #76]
8554: eaffffc9 b 8480 <IMFS_eval_path+0xe4>
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
newloc = pathloc->mt_entry->mt_point_node;
8558: e282e008 add lr, r2, #8 ; 0x8
* NOTE: The behavior of stat() on a mount point appears to be questionable.
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
855c: e89e000f ldm lr, {r0, r1, r2, r3}
*pathloc = newloc;
return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc );
8560: e59de034 ldr lr, [sp, #52]
* NOTE: The behavior of stat() on a mount point appears to be questionable.
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
8564: e28dc024 add ip, sp, #36 ; 0x24
*pathloc = newloc;
return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc );
8568: e06ee007 rsb lr, lr, r7
* NOTE: The behavior of stat() on a mount point appears to be questionable.
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
856c: e88c000f stm ip, {r0, r1, r2, r3}
*pathloc = newloc;
8570: e886000f stm r6, {r0, r1, r2, r3}
return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc );
8574: e5923000 ldr r3, [r2]
8578: e088000e add r0, r8, lr
857c: e1a0100a mov r1, sl
8580: e1a02006 mov r2, r6
8584: e1a0e00f mov lr, pc
8588: e12fff13 bx r3
858c: e1a04000 mov r4, r0
8590: eaffffda b 8500 <IMFS_eval_path+0x164>
*
* NOTE: The behavior of stat() on a mount point appears to be questionable.
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
8594: e59ee05c ldr lr, [lr, #92]
8598: e35e0000 cmp lr, #0 ; 0x0
859c: 0affff98 beq 8404 <IMFS_eval_path+0x68>
newloc = node->info.directory.mt_fs->mt_fs_root;
85a0: e28ee018 add lr, lr, #24 ; 0x18
85a4: eaffffec b 855c <IMFS_eval_path+0x1c0>
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
85a8: eb000e95 bl c004 <__errno>
85ac: e3a03014 mov r3, #20 ; 0x14
85b0: e5803000 str r3, [r0]
85b4: e3e04000 mvn r4, #0 ; 0x0
85b8: eaffffd0 b 8500 <IMFS_eval_path+0x164>
rtems_filesystem_location_info_t newloc;
IMFS_jnode_t *node;
int result;
if ( !rtems_libio_is_valid_perms( flags ) ) {
assert( 0 );
85bc: e3a01f7a mov r1, #488 ; 0x1e8 <== NOT EXECUTED
85c0: e2811002 add r1, r1, #2 ; 0x2 <== NOT EXECUTED
85c4: e59f0034 ldr r0, [pc, #52] ; 8600 <IMFS_eval_path+0x264> <== NOT EXECUTED
85c8: e59f2034 ldr r2, [pc, #52] ; 8604 <IMFS_eval_path+0x268> <== NOT EXECUTED
85cc: e59f3034 ldr r3, [pc, #52] ; 8608 <IMFS_eval_path+0x26c> <== NOT EXECUTED
85d0: eb000218 bl 8e38 <__assert_func> <== NOT EXECUTED
if ( !node )
rtems_set_errno_and_return_minus_one( ENOTDIR );
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
85d4: e1a00006 mov r0, r6
85d8: e3a01000 mov r1, #0 ; 0x0
85dc: ebffff38 bl 82c4 <IMFS_evaluate_sym_link>
node = pathloc->node_access;
if ( result == -1 )
85e0: e3700001 cmn r0, #1 ; 0x1
if ( !node )
rtems_set_errno_and_return_minus_one( ENOTDIR );
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
85e4: e1a04000 mov r4, r0
node = pathloc->node_access;
85e8: e5960000 ldr r0, [r6]
if ( result == -1 )
85ec: 0affffc3 beq 8500 <IMFS_eval_path+0x164>
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
node = pathloc->node_access;
85f0: e1a05000 mov r5, r0
85f4: e595304c ldr r3, [r5, #76]
85f8: eaffffa0 b 8480 <IMFS_eval_path+0xe4>
000086cc <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 */
)
{
86cc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
86d0: e24dd03c sub sp, sp, #60 ; 0x3c
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
86d4: e5915000 ldr r5, [r1]
int IMFS_evaluate_for_make(
const char *path, /* IN */
rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
const char **name /* OUT */
)
{
86d8: e58d2000 str r2, [sp]
86dc: e1a07001 mov r7, r1
86e0: e1a0a000 mov sl, r0
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
86e4: e3a08000 mov r8, #0 ; 0x0
86e8: e28d9007 add r9, sp, #7 ; 0x7
86ec: e28db038 add fp, sp, #56 ; 0x38
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], token, &len );
86f0: e08a0008 add r0, sl, r8
86f4: e1a01009 mov r1, r9
86f8: e1a0200b mov r2, fp
86fc: eb0000bf bl 8a00 <IMFS_get_token>
i += len;
if ( !pathloc->node_access )
8700: e597c000 ldr ip, [r7]
8704: e35c0000 cmp ip, #0 ; 0x0
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], token, &len );
8708: e1a04000 mov r4, r0
i += len;
870c: e59d6038 ldr r6, [sp, #56]
if ( !pathloc->node_access )
8710: 0a00003a beq 8800 <IMFS_evaluate_for_make+0x134>
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
8714: e3500000 cmp r0, #0 ; 0x0
8718: 1a000006 bne 8738 <IMFS_evaluate_for_make+0x6c>
pathloc->node_access = node;
break;
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
871c: eb000e38 bl c004 <__errno>
8720: e3a03011 mov r3, #17 ; 0x11
8724: e5803000 str r3, [r0]
8728: e3e04000 mvn r4, #0 ; 0x0
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
872c: e1a00004 mov r0, r4
8730: e28dd03c add sp, sp, #60 ; 0x3c
8734: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
8738: e595104c ldr r1, [r5, #76]
873c: e3510001 cmp r1, #1 ; 0x1
8740: 0a000033 beq 8814 <IMFS_evaluate_for_make+0x148>
*/
while( !done ) {
type = IMFS_get_token( &path[i], token, &len );
i += len;
8744: e0888006 add r8, r8, r6
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;
8748: e1a0500c mov r5, ip
switch( type ) {
874c: e3540004 cmp r4, #4 ; 0x4
8750: 979ff104 ldrls pc, [pc, r4, lsl #2]
8754: eaffffe5 b 86f0 <IMFS_evaluate_for_make+0x24> <== NOT EXECUTED
8758: 0000871c .word 0x0000871c <== NOT EXECUTED
875c: 000086f0 .word 0x000086f0 <== NOT EXECUTED
8760: 000087d0 .word 0x000087d0 <== NOT EXECUTED
8764: 00008780 .word 0x00008780 <== NOT EXECUTED
8768: 0000876c .word 0x0000876c <== NOT EXECUTED
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
876c: eb000e24 bl c004 <__errno>
8770: e3a0305b mov r3, #91 ; 0x5b
8774: e5803000 str r3, [r0]
8778: e3e04000 mvn r4, #0 ; 0x0
877c: eaffffea b 872c <IMFS_evaluate_for_make+0x60>
pathloc->node_access = node;
break;
case IMFS_NAME:
if ( node->type == IMFS_HARD_LINK ) {
8780: e59c304c ldr r3, [ip, #76]
8784: e3530003 cmp r3, #3 ; 0x3
8788: 0a000062 beq 8918 <IMFS_evaluate_for_make+0x24c>
result = IMFS_evaluate_link( pathloc, 0 );
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
878c: e3530004 cmp r3, #4 ; 0x4
8790: 0a000060 beq 8918 <IMFS_evaluate_for_make+0x24c>
if ( result == -1 )
return -1;
}
node = pathloc->node_access;
if ( !node )
8794: e3550000 cmp r5, #0 ; 0x0
8798: 0a00004a beq 88c8 <IMFS_evaluate_for_make+0x1fc>
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
879c: e595304c ldr r3, [r5, #76]
87a0: e3530001 cmp r3, #1 ; 0x1
87a4: 1a000047 bne 88c8 <IMFS_evaluate_for_make+0x1fc>
/*
* 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 ) {
87a8: e595e05c ldr lr, [r5, #92]
87ac: e35e0000 cmp lr, #0 ; 0x0
87b0: 1a000049 bne 88dc <IMFS_evaluate_for_make+0x210>
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
87b4: e1a00005 mov r0, r5
87b8: e1a01009 mov r1, r9
87bc: eb000060 bl 8944 <IMFS_find_match_in_dir>
/*
* If there is no node we have found the name of the node we
* wish to create.
*/
if ( ! node )
87c0: e2505000 subs r5, r0, #0 ; 0x0
87c4: 0a000018 beq 882c <IMFS_evaluate_for_make+0x160>
done = true;
else
pathloc->node_access = node;
87c8: e5875000 str r5, [r7]
87cc: eaffffc7 b 86f0 <IMFS_evaluate_for_make+0x24>
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
87d0: e59f2168 ldr r2, [pc, #360] ; 8940 <IMFS_evaluate_for_make+0x274>
87d4: e5923000 ldr r3, [r2]
87d8: e5932014 ldr r2, [r3, #20]
87dc: e152000c cmp r2, ip
87e0: 0affffc2 beq 86f0 <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){
87e4: e597e00c ldr lr, [r7, #12]
87e8: e59e3018 ldr r3, [lr, #24]
87ec: e153000c cmp r3, ip
87f0: 0a000050 beq 8938 <IMFS_evaluate_for_make+0x26c>
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
}
} else {
if ( !node->Parent )
87f4: e59c5008 ldr r5, [ip, #8]
87f8: e3550000 cmp r5, #0 ; 0x0
87fc: 1afffff1 bne 87c8 <IMFS_evaluate_for_make+0xfc>
* Verify there is not any invalid stuff at the end of the name.
*/
for( ; path[i] != '\0'; i++) {
if ( !IMFS_is_separator( path[ i ] ) )
rtems_set_errno_and_return_minus_one( ENOENT );
8800: eb000dff bl c004 <__errno>
8804: e3a03002 mov r3, #2 ; 0x2
8808: e5803000 str r3, [r0]
880c: e3e04000 mvn r4, #0 ; 0x0
8810: eaffffc5 b 872c <IMFS_evaluate_for_make+0x60>
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
8814: e1a00007 mov r0, r7
8818: ebfffe76 bl 81f8 <IMFS_evaluate_permission>
881c: e3500000 cmp r0, #0 ; 0x0
8820: 0a000023 beq 88b4 <IMFS_evaluate_for_make+0x1e8>
8824: e597c000 ldr ip, [r7]
8828: eaffffc5 b 8744 <IMFS_evaluate_for_make+0x78>
case IMFS_CURRENT_DIR:
break;
}
}
*name = &path[ i - len ];
882c: e59d3038 ldr r3, [sp, #56]
8830: e59d2000 ldr r2, [sp]
8834: e0633008 rsb r3, r3, r8
8838: e08a3003 add r3, sl, r3
883c: e5823000 str r3, [r2]
/*
* 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++) {
8840: e7da2008 ldrb r2, [sl, r8]
8844: e3520000 cmp r2, #0 ; 0x0
8848: e08a0008 add r0, sl, r8
884c: 1a000004 bne 8864 <IMFS_evaluate_for_make+0x198>
8850: ea00000b b 8884 <IMFS_evaluate_for_make+0x1b8>
8854: e5d02001 ldrb r2, [r0, #1]
8858: e3520000 cmp r2, #0 ; 0x0
if ( !IMFS_is_separator( path[ i ] ) )
885c: e2800001 add r0, r0, #1 ; 0x1
/*
* 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++) {
8860: 0a000007 beq 8884 <IMFS_evaluate_for_make+0x1b8>
if ( !IMFS_is_separator( path[ i ] ) )
8864: e352002f cmp r2, #47 ; 0x2f
8868: 1352005c cmpne r2, #92 ; 0x5c
886c: 0afffff8 beq 8854 <IMFS_evaluate_for_make+0x188>
rtems_set_errno_and_return_minus_one( ENOENT );
8870: eb000de3 bl c004 <__errno>
8874: e3a03002 mov r3, #2 ; 0x2
8878: e5803000 str r3, [r0]
887c: e3e04000 mvn r4, #0 ; 0x0
8880: eaffffa9 b 872c <IMFS_evaluate_for_make+0x60>
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
8884: e1a00007 mov r0, r7
8888: ebfffe3a bl 8178 <IMFS_Set_handlers>
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
888c: e5973000 ldr r3, [r7]
8890: e593204c ldr r2, [r3, #76]
8894: e3520001 cmp r2, #1 ; 0x1
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
8898: e1a04000 mov r4, r0
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
889c: 1a000009 bne 88c8 <IMFS_evaluate_for_make+0x1fc>
/*
* We must have Write and execute permission on the returned node.
*/
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
88a0: e1a00007 mov r0, r7
88a4: e3a01003 mov r1, #3 ; 0x3
88a8: ebfffe52 bl 81f8 <IMFS_evaluate_permission>
88ac: e3500000 cmp r0, #0 ; 0x0
88b0: 1affff9d bne 872c <IMFS_evaluate_for_make+0x60>
rtems_set_errno_and_return_minus_one( EACCES );
88b4: eb000dd2 bl c004 <__errno>
88b8: e3a0300d mov r3, #13 ; 0xd
88bc: e5803000 str r3, [r0]
88c0: e3e04000 mvn r4, #0 ; 0x0
88c4: eaffff98 b 872c <IMFS_evaluate_for_make+0x60>
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
88c8: eb000dcd bl c004 <__errno>
88cc: e3a03014 mov r3, #20 ; 0x14
88d0: e5803000 str r3, [r0]
88d4: e3e04000 mvn r4, #0 ; 0x0
88d8: eaffff93 b 872c <IMFS_evaluate_for_make+0x60>
* If we are at a node that is a mount point. Set loc to the
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
88dc: e28ee018 add lr, lr, #24 ; 0x18
88e0: e89e000f ldm lr, {r0, r1, r2, r3}
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
88e4: e59de038 ldr lr, [sp, #56]
* If we are at a node that is a mount point. Set loc to the
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
88e8: e28dc028 add ip, sp, #40 ; 0x28
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
88ec: e06ee008 rsb lr, lr, r8
* If we are at a node that is a mount point. Set loc to the
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
88f0: e88c000f stm ip, {r0, r1, r2, r3}
*pathloc = newloc;
88f4: e887000f stm r7, {r0, r1, r2, r3}
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
88f8: e5923004 ldr r3, [r2, #4]
88fc: e08a000e add r0, sl, lr
8900: e1a01007 mov r1, r7
8904: e59d2000 ldr r2, [sp]
8908: e1a0e00f mov lr, pc
890c: e12fff13 bx r3
8910: e1a04000 mov r4, r0
8914: eaffff84 b 872c <IMFS_evaluate_for_make+0x60>
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_link( pathloc, 0 );
8918: e1a00007 mov r0, r7
891c: e3a01000 mov r1, #0 ; 0x0
8920: ebffff39 bl 860c <IMFS_evaluate_link>
if ( result == -1 )
8924: e3700001 cmn r0, #1 ; 0x1
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_link( pathloc, 0 );
8928: e1a04000 mov r4, r0
if ( result == -1 )
892c: 0affff7e beq 872c <IMFS_evaluate_for_make+0x60>
8930: e5975000 ldr r5, [r7]
8934: eaffff96 b 8794 <IMFS_evaluate_for_make+0xc8>
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
newloc = pathloc->mt_entry->mt_point_node;
8938: e28ee008 add lr, lr, #8 ; 0x8
893c: eaffffe7 b 88e0 <IMFS_evaluate_for_make+0x214>
00008264 <IMFS_evaluate_hard_link>:
int IMFS_evaluate_hard_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
IMFS_jnode_t *jnode = node->node_access;
8264: e5902000 ldr r2, [r0]
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
8268: e592304c ldr r3, [r2, #76]
826c: e3530003 cmp r3, #3 ; 0x3
int IMFS_evaluate_hard_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
8270: e92d4030 push {r4, r5, lr}
8274: e1a04000 mov r4, r0
8278: e1a05001 mov r5, r1
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
827c: 1a00000d bne 82b8 <IMFS_evaluate_hard_link+0x54>
/*
* Set the hard link value and the handlers.
*/
node->node_access = jnode->info.hard_link.link_node;
8280: e5923050 ldr r3, [r2, #80]
8284: e5803000 str r3, [r0]
IMFS_Set_handlers( node );
8288: ebffffba bl 8178 <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
828c: e1a00004 mov r0, r4
8290: e1a01005 mov r1, r5
8294: ebffffd7 bl 81f8 <IMFS_evaluate_permission>
8298: e3500000 cmp r0, #0 ; 0x0
829c: 13a00000 movne r0, #0 ; 0x0
82a0: 18bd8030 popne {r4, r5, pc}
rtems_set_errno_and_return_minus_one( EACCES );
82a4: eb000f56 bl c004 <__errno> <== NOT EXECUTED
82a8: e3a0300d mov r3, #13 ; 0xd <== NOT EXECUTED
82ac: e5803000 str r3, [r0] <== NOT EXECUTED
82b0: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
return result;
}
82b4: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
rtems_fatal_error_occurred (0xABCD0000);
82b8: e3a0032b mov r0, #-1409286144 ; 0xac000000 <== NOT EXECUTED
82bc: e2400833 sub r0, r0, #3342336 ; 0x330000 <== NOT EXECUTED
82c0: ebfff30b bl 4ef4 <rtems_fatal_error_occurred> <== NOT EXECUTED
000081f8 <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 ) )
81f8: e3d13007 bics r3, r1, #7 ; 0x7
int IMFS_evaluate_permission(
rtems_filesystem_location_info_t *node,
int flags
)
{
81fc: e92d4070 push {r4, r5, r6, lr}
8200: e1a06001 mov r6, r1
uid_t st_uid;
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
8204: 1a000011 bne 8250 <IMFS_evaluate_permission+0x58>
rtems_set_errno_and_return_minus_one( EPERM );
jnode = node->node_access;
8208: e5905000 ldr r5, [r0]
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
820c: eb000411 bl 9258 <geteuid>
8210: e1a04000 mov r4, r0
st_gid = getegid();
8214: eb00040a bl 9244 <getegid>
* Check if I am owner or a group member or someone else.
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
8218: e1d533bc ldrh r3, [r5, #60]
821c: e1530004 cmp r3, r4
flags_to_test <<= 6;
8220: 01a01306 lsleq r1, r6, #6
* Check if I am owner or a group member or someone else.
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
8224: 0a000003 beq 8238 <IMFS_evaluate_permission+0x40>
flags_to_test <<= 6;
else if ( st_gid == jnode->st_gid )
8228: e1d533be ldrh r3, [r5, #62]
822c: e1530000 cmp r3, r0
8230: 11a01006 movne r1, r6
flags_to_test <<= 3;
8234: 01a01186 lsleq r1, r6, #3
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
8238: e5953030 ldr r3, [r5, #48]
823c: e0013003 and r3, r1, r3
8240: e1510003 cmp r1, r3
8244: 13a00000 movne r0, #0 ; 0x0
8248: 03a00001 moveq r0, #1 ; 0x1
return 1;
return 0;
}
824c: e8bd8070 pop {r4, r5, r6, pc}
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 );
8250: eb000f6b bl c004 <__errno> <== NOT EXECUTED
8254: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED
8258: e5803000 str r3, [r0] <== NOT EXECUTED
825c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
8260: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
000082c4 <IMFS_evaluate_sym_link>:
int IMFS_evaluate_sym_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
82c4: e92d4070 push {r4, r5, r6, lr}
82c8: e1a04000 mov r4, r0
IMFS_jnode_t *jnode = node->node_access;
82cc: e5900000 ldr r0, [r0]
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
82d0: e590304c ldr r3, [r0, #76]
82d4: e3530004 cmp r3, #4 ; 0x4
int IMFS_evaluate_sym_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
82d8: e1a06001 mov r6, r1
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
82dc: 1a000027 bne 8380 <IMFS_evaluate_sym_link+0xbc>
rtems_fatal_error_occurred (0xABCD0000);
if ( !jnode->Parent )
82e0: e5903008 ldr r3, [r0, #8]
82e4: e3530000 cmp r3, #0 ; 0x0
82e8: 0a000027 beq 838c <IMFS_evaluate_sym_link+0xc8>
/*
* Move the node_access to either the symbolic links parent or
* root depending on the symbolic links path.
*/
node->node_access = jnode->Parent;
82ec: e5843000 str r3, [r4]
rtems_filesystem_get_sym_start_loc(
82f0: e590e050 ldr lr, [r0, #80]
82f4: e5de3000 ldrb r3, [lr]
82f8: e353005c cmp r3, #92 ; 0x5c
82fc: 1353002f cmpne r3, #47 ; 0x2f
8300: 13a02000 movne r2, #0 ; 0x0
8304: 03a02001 moveq r2, #1 ; 0x1
8308: 1a000013 bne 835c <IMFS_evaluate_sym_link+0x98>
830c: e59f3084 ldr r3, [pc, #132] ; 8398 <IMFS_evaluate_sym_link+0xd4>
8310: e593c000 ldr ip, [r3]
8314: e28cc014 add ip, ip, #20 ; 0x14
8318: e89c000f ldm ip, {r0, r1, r2, r3}
831c: e884000f stm r4, {r0, r1, r2, r3}
8320: e3a03001 mov r3, #1 ; 0x1
/*
* Use eval path to evaluate the path of the symbolic link.
*/
result = IMFS_eval_path(
8324: e08e0003 add r0, lr, r3
8328: e1a02004 mov r2, r4
832c: e1a01006 mov r1, r6
8330: eb000019 bl 839c <IMFS_eval_path>
8334: e1a05000 mov r5, r0
&jnode->info.sym_link.name[i],
flags,
node
);
IMFS_Set_handlers( node );
8338: e1a00004 mov r0, r4
833c: ebffff8d bl 8178 <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
8340: e1a00004 mov r0, r4
8344: e1a01006 mov r1, r6
8348: ebffffaa bl 81f8 <IMFS_evaluate_permission>
834c: e3500000 cmp r0, #0 ; 0x0
8350: 0a000005 beq 836c <IMFS_evaluate_sym_link+0xa8>
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
8354: e1a00005 mov r0, r5
8358: e8bd8070 pop {r4, r5, r6, pc}
* root depending on the symbolic links path.
*/
node->node_access = jnode->Parent;
rtems_filesystem_get_sym_start_loc(
835c: e3530000 cmp r3, #0 ; 0x0
8360: 11a03002 movne r3, r2
8364: 1affffee bne 8324 <IMFS_evaluate_sym_link+0x60>
8368: eaffffe7 b 830c <IMFS_evaluate_sym_link+0x48> <== NOT EXECUTED
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
836c: eb000f24 bl c004 <__errno> <== NOT EXECUTED
8370: e3a0300d mov r3, #13 ; 0xd <== NOT EXECUTED
8374: e5803000 str r3, [r0] <== NOT EXECUTED
8378: e3e05000 mvn r5, #0 ; 0x0 <== NOT EXECUTED
837c: eafffff4 b 8354 <IMFS_evaluate_sym_link+0x90> <== NOT EXECUTED
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
rtems_fatal_error_occurred (0xABCD0000);
8380: e3a0032b mov r0, #-1409286144 ; 0xac000000 <== NOT EXECUTED
8384: e2400833 sub r0, r0, #3342336 ; 0x330000 <== NOT EXECUTED
8388: ebfff2d9 bl 4ef4 <rtems_fatal_error_occurred> <== NOT EXECUTED
if ( !jnode->Parent )
rtems_fatal_error_occurred( 0xBAD00000 );
838c: e3a004ba mov r0, #-1174405120 ; 0xba000000 <== NOT EXECUTED
8390: e280060d add r0, r0, #13631488 ; 0xd00000 <== NOT EXECUTED
8394: ebfff2d6 bl 4ef4 <rtems_fatal_error_occurred> <== NOT EXECUTED
00008944 <IMFS_find_match_in_dir>:
IMFS_jnode_t *IMFS_find_match_in_dir(
IMFS_jnode_t *directory,
char *name
)
{
8944: e92d4070 push {r4, r5, r6, lr}
/*
* Check for fatal errors. A NULL directory show a problem in the
* the IMFS code.
*/
assert( directory );
8948: e2504000 subs r4, r0, #0 ; 0x0
IMFS_jnode_t *IMFS_find_match_in_dir(
IMFS_jnode_t *directory,
char *name
)
{
894c: e1a05001 mov r5, r1
/*
* Check for fatal errors. A NULL directory show a problem in the
* the IMFS code.
*/
assert( directory );
8950: 0a000020 beq 89d8 <IMFS_find_match_in_dir+0x94>
if ( !name )
8954: e3510000 cmp r1, #0 ; 0x0
8958: 0a00001b beq 89cc <IMFS_find_match_in_dir+0x88>
/*
* Check for "." and ".."
*/
if ( !strcmp( name, dotname ) )
895c: e1a00001 mov r0, r1
8960: e59f1084 ldr r1, [pc, #132] ; 89ec <IMFS_find_match_in_dir+0xa8>
8964: eb001274 bl d33c <strcmp>
8968: e3500000 cmp r0, #0 ; 0x0
896c: 1a000001 bne 8978 <IMFS_find_match_in_dir+0x34>
if ( !strcmp( name, the_jnode->name ) )
return the_jnode;
}
return 0;
}
8970: e1a00004 mov r0, r4
8974: e8bd8070 pop {r4, r5, r6, pc}
*/
if ( !strcmp( name, dotname ) )
return directory;
if ( !strcmp( name, dotdotname ) )
8978: e1a00005 mov r0, r5
897c: e59f106c ldr r1, [pc, #108] ; 89f0 <IMFS_find_match_in_dir+0xac>
8980: eb00126d bl d33c <strcmp>
8984: e3500000 cmp r0, #0 ; 0x0
return directory->Parent;
8988: 05944008 ldreq r4, [r4, #8]
*/
if ( !strcmp( name, dotname ) )
return directory;
if ( !strcmp( name, dotdotname ) )
898c: 0afffff7 beq 8970 <IMFS_find_match_in_dir+0x2c>
return directory->Parent;
the_chain = &directory->info.directory.Entries;
for ( the_node = the_chain->first;
8990: e5946050 ldr r6, [r4, #80]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
8994: e2844054 add r4, r4, #84 ; 0x54
!rtems_chain_is_tail( the_chain, the_node );
8998: e1560004 cmp r6, r4
899c: 1a000003 bne 89b0 <IMFS_find_match_in_dir+0x6c>
89a0: ea000009 b 89cc <IMFS_find_match_in_dir+0x88>
the_node = the_node->next ) {
89a4: e5966000 ldr r6, [r6]
return directory->Parent;
the_chain = &directory->info.directory.Entries;
for ( the_node = the_chain->first;
!rtems_chain_is_tail( the_chain, the_node );
89a8: e1560004 cmp r6, r4
89ac: 0a000006 beq 89cc <IMFS_find_match_in_dir+0x88>
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
if ( !strcmp( name, the_jnode->name ) )
89b0: e1a00005 mov r0, r5
89b4: e286100c add r1, r6, #12 ; 0xc
89b8: eb00125f bl d33c <strcmp>
89bc: e3500000 cmp r0, #0 ; 0x0
89c0: 1afffff7 bne 89a4 <IMFS_find_match_in_dir+0x60>
89c4: e1a04006 mov r4, r6
89c8: eaffffe8 b 8970 <IMFS_find_match_in_dir+0x2c>
return directory->Parent;
the_chain = &directory->info.directory.Entries;
for ( the_node = the_chain->first;
!rtems_chain_is_tail( the_chain, the_node );
89cc: e3a04000 mov r4, #0 ; 0x0
if ( !strcmp( name, the_jnode->name ) )
return the_jnode;
}
return 0;
}
89d0: e1a00004 mov r0, r4
89d4: e8bd8070 pop {r4, r5, r6, pc}
/*
* Check for fatal errors. A NULL directory show a problem in the
* the IMFS code.
*/
assert( directory );
89d8: e59f0014 ldr r0, [pc, #20] ; 89f4 <IMFS_find_match_in_dir+0xb0><== NOT EXECUTED
89dc: e3a0102a mov r1, #42 ; 0x2a <== NOT EXECUTED
89e0: e59f2010 ldr r2, [pc, #16] ; 89f8 <IMFS_find_match_in_dir+0xb4><== NOT EXECUTED
89e4: e59f3010 ldr r3, [pc, #16] ; 89fc <IMFS_find_match_in_dir+0xb8><== NOT EXECUTED
89e8: eb000112 bl 8e38 <__assert_func> <== NOT EXECUTED
0000a830 <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
)
{
a830: 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;
a834: e1a0e000 mov lr, r0
a838: e5be4018 ldr r4, [lr, #24]!
((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next))
int IMFS_fsunmount(
rtems_filesystem_mount_table_entry_t *temp_mt_entry
)
{
a83c: e1a0c000 mov ip, 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;
a840: e89e000f ldm lr, {r0, r1, r2, r3}
((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next))
int IMFS_fsunmount(
rtems_filesystem_mount_table_entry_t *temp_mt_entry
)
{
a844: e24dd010 sub sp, sp, #16 ; 0x10
* 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;
a848: e88d000f stm sp, {r0, r1, r2, r3}
/*
* Set this to null to indicate that it is being unmounted.
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
a84c: e3a03000 mov r3, #0 ; 0x0
a850: e58c3018 str r3, [ip, #24]
* 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;
a854: e1a0500d mov r5, sp
temp_mt_entry->mt_fs_root.node_access = NULL;
do {
next = jnode->Parent;
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
a858: e1a0000d mov r0, sp
temp_mt_entry->mt_fs_root.node_access = NULL;
do {
next = jnode->Parent;
loc.node_access = (void *)jnode;
a85c: e58d4000 str r4, [sp]
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
do {
next = jnode->Parent;
a860: e5946008 ldr r6, [r4, #8]
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
a864: ebfffdfc bl a05c <IMFS_Set_handlers>
if ( jnode->type != IMFS_DIRECTORY ) {
a868: e594304c ldr r3, [r4, #76]
a86c: e3530001 cmp r3, #1 ; 0x1
result = IMFS_unlink( &loc );
if (result != 0)
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
a870: e2842054 add r2, r4, #84 ; 0x54
do {
next = jnode->Parent;
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
if ( jnode->type != IMFS_DIRECTORY ) {
a874: 1a000010 bne a8bc <IMFS_fsunmount+0x8c>
result = IMFS_unlink( &loc );
if (result != 0)
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
a878: e5943050 ldr r3, [r4, #80]
a87c: e1530002 cmp r3, r2
a880: 0a00000d beq a8bc <IMFS_fsunmount+0x8c>
result = IMFS_unlink( &loc );
if (result != 0)
return -1;
jnode = next;
}
if ( jnode != NULL ) {
a884: e3540000 cmp r4, #0 ; 0x0
a888: 0a000008 beq a8b0 <IMFS_fsunmount+0x80>
if ( jnode->type == IMFS_DIRECTORY ) {
a88c: e594304c ldr r3, [r4, #76]
a890: e3530001 cmp r3, #1 ; 0x1
a894: 1affffef bne a858 <IMFS_fsunmount+0x28>
if ( jnode_has_children( jnode ) )
a898: e5942050 ldr r2, [r4, #80]
a89c: e2843054 add r3, r4, #84 ; 0x54
a8a0: e1520003 cmp r2, r3
a8a4: 0affffeb beq a858 <IMFS_fsunmount+0x28>
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
a8a8: e2524000 subs r4, r2, #0 ; 0x0
a8ac: 1affffe9 bne a858 <IMFS_fsunmount+0x28>
a8b0: e3a00000 mov r0, #0 ; 0x0
return 0;
}
a8b4: e28dd010 add sp, sp, #16 ; 0x10
a8b8: e8bd8070 pop {r4, r5, r6, pc}
result = IMFS_unlink( &loc );
if (result != 0)
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
result = IMFS_unlink( &loc );
a8bc: e1a0000d mov r0, sp
a8c0: ebffdd39 bl 1dac <IMFS_unlink>
if (result != 0)
a8c4: e3500000 cmp r0, #0 ; 0x0
a8c8: 01a04006 moveq r4, r6
a8cc: 0affffec beq a884 <IMFS_fsunmount+0x54>
if ( jnode->type == IMFS_DIRECTORY ) {
if ( jnode_has_children( jnode ) )
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
a8d0: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
a8d4: eafffff6 b a8b4 <IMFS_fsunmount+0x84> <== NOT EXECUTED
00008a00 <IMFS_get_token>:
IMFS_token_types IMFS_get_token(
const char *path,
char *token,
int *token_len
)
{
8a00: e92d4010 push {r4, lr}
register char c;
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
8a04: e5d03000 ldrb r3, [r0]
while ( (!IMFS_is_separator(c)) && (i <= IMFS_NAME_MAX) ) {
8a08: e353002f cmp r3, #47 ; 0x2f
8a0c: 1353005c cmpne r3, #92 ; 0x5c
IMFS_token_types IMFS_get_token(
const char *path,
char *token,
int *token_len
)
{
8a10: e1a04001 mov r4, r1
8a14: e1a0c002 mov ip, r2
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
while ( (!IMFS_is_separator(c)) && (i <= IMFS_NAME_MAX) ) {
8a18: 0a000025 beq 8ab4 <IMFS_get_token+0xb4>
8a1c: e3530000 cmp r3, #0 ; 0x0
token[i] = c;
8a20: 15c13000 strbne r3, [r1]
8a24: 13a01000 movne r1, #0 ; 0x0
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
while ( (!IMFS_is_separator(c)) && (i <= IMFS_NAME_MAX) ) {
8a28: 1a000009 bne 8a54 <IMFS_get_token+0x54>
8a2c: ea000029 b 8ad8 <IMFS_get_token+0xd8>
8a30: e2523000 subs r3, r2, #0 ; 0x0
8a34: 13a03001 movne r3, #1 ; 0x1
8a38: e3510020 cmp r1, #32 ; 0x20
8a3c: c3a03000 movgt r3, #0 ; 0x0
8a40: e3530000 cmp r3, #0 ; 0x0
8a44: 0a000007 beq 8a68 <IMFS_get_token+0x68>
token[i] = c;
if ( i == IMFS_NAME_MAX )
8a48: e3510020 cmp r1, #32 ; 0x20
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
while ( (!IMFS_is_separator(c)) && (i <= IMFS_NAME_MAX) ) {
token[i] = c;
8a4c: e7c42001 strb r2, [r4, r1]
if ( i == IMFS_NAME_MAX )
8a50: 0a00001e beq 8ad0 <IMFS_get_token+0xd0>
return IMFS_INVALID_TOKEN;
if ( !IMFS_is_valid_name_char(c) )
type = IMFS_INVALID_TOKEN;
c = path [++i];
8a54: e2811001 add r1, r1, #1 ; 0x1
8a58: e7d02001 ldrb r2, [r0, r1]
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
while ( (!IMFS_is_separator(c)) && (i <= IMFS_NAME_MAX) ) {
8a5c: e352002f cmp r2, #47 ; 0x2f
8a60: 1352005c cmpne r2, #92 ; 0x5c
8a64: 1afffff1 bne 8a30 <IMFS_get_token+0x30>
i++;
type = IMFS_CURRENT_DIR;
} else {
type = IMFS_NO_MORE_PATH;
}
} else if (token[ i-1 ] != '\0') {
8a68: e0843001 add r3, r4, r1
8a6c: e5532001 ldrb r2, [r3, #-1]
8a70: e3520000 cmp r2, #0 ; 0x0
token[i] = '\0';
8a74: 13a03000 movne r3, #0 ; 0x0
8a78: 17c43001 strbne r3, [r4, r1]
* If we copied something that was not a seperator see if
* it was a special name.
*/
if ( type == IMFS_NAME ) {
if ( strcmp( token, "..") == 0 )
8a7c: e1a00004 mov r0, r4
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
8a80: e58c1000 str r1, [ip]
* If we copied something that was not a seperator see if
* it was a special name.
*/
if ( type == IMFS_NAME ) {
if ( strcmp( token, "..") == 0 )
8a84: e59f1060 ldr r1, [pc, #96] ; 8aec <IMFS_get_token+0xec>
8a88: eb00122b bl d33c <strcmp>
8a8c: e3500000 cmp r0, #0 ; 0x0
8a90: 02800002 addeq r0, r0, #2 ; 0x2
8a94: 08bd8010 popeq {r4, pc}
type = IMFS_UP_DIR;
else if ( strcmp( token, "." ) == 0 )
8a98: e1a00004 mov r0, r4
8a9c: e59f104c ldr r1, [pc, #76] ; 8af0 <IMFS_get_token+0xf0>
8aa0: eb001225 bl d33c <strcmp>
8aa4: e3500000 cmp r0, #0 ; 0x0
8aa8: 13a00003 movne r0, #3 ; 0x3
8aac: 03a00001 moveq r0, #1 ; 0x1
type = IMFS_CURRENT_DIR;
}
return type;
}
8ab0: e8bd8010 pop {r4, pc}
*/
if ( i == 0 ) {
token[i] = c;
if ( token[i] != '\0' ) {
8ab4: e3530000 cmp r3, #0 ; 0x0
/*
* Copy a seperator into token.
*/
if ( i == 0 ) {
token[i] = c;
8ab8: e5c13000 strb r3, [r1]
if ( token[i] != '\0' ) {
8abc: 13a03001 movne r3, #1 ; 0x1
8ac0: 11a00003 movne r0, r3
8ac4: 0a000004 beq 8adc <IMFS_get_token+0xdc>
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
8ac8: e58c3000 str r3, [ip]
8acc: e8bd8010 pop {r4, pc}
c = path[i];
while ( (!IMFS_is_separator(c)) && (i <= IMFS_NAME_MAX) ) {
token[i] = c;
if ( i == IMFS_NAME_MAX )
8ad0: e3a00004 mov r0, #4 ; 0x4 <== NOT EXECUTED
8ad4: e8bd8010 pop {r4, pc} <== NOT EXECUTED
/*
* Copy a seperator into token.
*/
if ( i == 0 ) {
token[i] = c;
8ad8: e5c43000 strb r3, [r4]
type = IMFS_CURRENT_DIR;
} else {
type = IMFS_NO_MORE_PATH;
}
} else if (token[ i-1 ] != '\0') {
token[i] = '\0';
8adc: e3a03000 mov r3, #0 ; 0x0
8ae0: e1a00003 mov r0, r3
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
8ae4: e58c3000 str r3, [ip]
8ae8: e8bd8010 pop {r4, pc}
00008af4 <IMFS_initialize_support>:
rtems_filesystem_mount_table_entry_t *temp_mt_entry,
const rtems_filesystem_operations_table *op_table,
const rtems_filesystem_file_handlers_r *memfile_handlers,
const rtems_filesystem_file_handlers_r *directory_handlers
)
{
8af4: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
IMFS_jnode_t *jnode;
/*
* determine/check value for imfs_memfile_bytes_per_block
*/
IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block,
8af8: e59fc0f0 ldr ip, [pc, #240] ; 8bf0 <IMFS_initialize_support+0xfc>
8afc: e59ce000 ldr lr, [ip]
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16;
!is_valid && (bit_mask <= 512);
bit_mask <<= 1) {
if (bit_mask == requested_bytes_per_block) {
8b00: e35e0010 cmp lr, #16 ; 0x10
rtems_filesystem_mount_table_entry_t *temp_mt_entry,
const rtems_filesystem_operations_table *op_table,
const rtems_filesystem_file_handlers_r *memfile_handlers,
const rtems_filesystem_file_handlers_r *directory_handlers
)
{
8b04: e1a09002 mov r9, r2
8b08: e1a08003 mov r8, r3
8b0c: e24dd004 sub sp, sp, #4 ; 0x4
8b10: e1a06000 mov r6, r0
8b14: e1a0a001 mov sl, r1
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16;
!is_valid && (bit_mask <= 512);
bit_mask <<= 1) {
if (bit_mask == requested_bytes_per_block) {
8b18: 13a02020 movne r2, #32 ; 0x20
8b1c: 13a03000 movne r3, #0 ; 0x0
8b20: 0a000006 beq 8b40 <IMFS_initialize_support+0x4c>
8b24: e15e0002 cmp lr, r2
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16;
!is_valid && (bit_mask <= 512);
bit_mask <<= 1) {
8b28: e2833001 add r3, r3, #1 ; 0x1
8b2c: e1a02082 lsl r2, r2, #1
if (bit_mask == requested_bytes_per_block) {
8b30: 0a000002 beq 8b40 <IMFS_initialize_support+0x4c>
int bit_mask;
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16;
!is_valid && (bit_mask <= 512);
8b34: e3530005 cmp r3, #5 ; 0x5
8b38: 1afffff9 bne 8b24 <IMFS_initialize_support+0x30>
8b3c: e3a0e080 mov lr, #128 ; 0x80 <== NOT EXECUTED
bit_mask <<= 1) {
if (bit_mask == requested_bytes_per_block) {
is_valid = true;
}
}
*dest_bytes_per_block = ((is_valid)
8b40: e59fc0ac ldr ip, [pc, #172] ; 8bf4 <IMFS_initialize_support+0x100>
* 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_node(
8b44: e3a07000 mov r7, #0 ; 0x0
8b48: e3a03c41 mov r3, #16640 ; 0x4100
bit_mask <<= 1) {
if (bit_mask == requested_bytes_per_block) {
is_valid = true;
}
}
*dest_bytes_per_block = ((is_valid)
8b4c: e58ce000 str lr, [ip]
* 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_node(
8b50: e28330ed add r3, r3, #237 ; 0xed
8b54: e3a01001 mov r1, #1 ; 0x1
8b58: e59f2098 ldr r2, [pc, #152] ; 8bf8 <IMFS_initialize_support+0x104>
8b5c: e1a00007 mov r0, r7
8b60: e58d7000 str r7, [sp]
8b64: eb000a04 bl b37c <IMFS_create_node>
NULL
);
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;
8b68: e59f508c ldr r5, [pc, #140] ; 8bfc <IMFS_initialize_support+0x108>
8b6c: e1a04005 mov r4, r5
* 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_node(
8b70: e5860018 str r0, [r6, #24]
NULL
);
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;
8b74: e8b4000f ldm r4!, {r0, r1, r2, r3}
8b78: e286c030 add ip, r6, #48 ; 0x30
8b7c: e8ac000f stmia ip!, {r0, r1, r2, r3}
8b80: e8b4000f ldm r4!, {r0, r1, r2, r3}
8b84: e8ac000f stmia ip!, {r0, r1, r2, r3}
8b88: e894000f ldm r4, {r0, r1, r2, r3}
( S_IFDIR | 0755 ),
NULL
);
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
temp_mt_entry->mt_fs_root.ops = op_table;
8b8c: e586a020 str sl, [r6, #32]
temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
8b90: e88c000f stm ip, {r0, r1, r2, r3}
"",
( S_IFDIR | 0755 ),
NULL
);
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
8b94: e586801c str r8, [r6, #28]
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 ) );
8b98: e3a00001 mov r0, #1 ; 0x1
8b9c: e3a0100c mov r1, #12 ; 0xc
8ba0: eb000101 bl 8fac <calloc>
if ( !fs_info ){
8ba4: e3500000 cmp r0, #0 ; 0x0
8ba8: 0a000009 beq 8bd4 <IMFS_initialize_support+0xe0>
fs_info->ino_count = 1;
fs_info->memfile_handlers = memfile_handlers;
fs_info->directory_handlers = directory_handlers;
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
8bac: e5962018 ldr r2, [r6, #24]
/*
* Set st_ino for the root to 1.
*/
fs_info->ino_count = 1;
8bb0: e3a03001 mov r3, #1 ; 0x1
8bb4: e5803000 str r3, [r0]
fs_info->memfile_handlers = memfile_handlers;
fs_info->directory_handlers = directory_handlers;
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
8bb8: e5823038 str r3, [r2, #56]
* Set st_ino for the root to 1.
*/
fs_info->ino_count = 1;
fs_info->memfile_handlers = memfile_handlers;
fs_info->directory_handlers = directory_handlers;
8bbc: e5808008 str r8, [r0, #8]
/*
* Set st_ino for the root to 1.
*/
fs_info->ino_count = 1;
fs_info->memfile_handlers = memfile_handlers;
8bc0: e5809004 str r9, [r0, #4]
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;
8bc4: e586002c str r0, [r6, #44]
fs_info->ino_count = 1;
fs_info->memfile_handlers = memfile_handlers;
fs_info->directory_handlers = directory_handlers;
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
8bc8: e1a00007 mov r0, r7
return 0;
}
8bcc: e28dd004 add sp, sp, #4 ; 0x4
8bd0: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
/*
* Create custom file system data.
*/
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
if ( !fs_info ){
free(temp_mt_entry->mt_fs_root.node_access);
8bd4: e5960018 ldr r0, [r6, #24] <== NOT EXECUTED
8bd8: eb000132 bl 90a8 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
8bdc: eb000d08 bl c004 <__errno> <== NOT EXECUTED
8be0: e3a0300c mov r3, #12 ; 0xc <== NOT EXECUTED
8be4: e5803000 str r3, [r0] <== NOT EXECUTED
8be8: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
8bec: eafffff6 b 8bcc <IMFS_initialize_support+0xd8> <== NOT EXECUTED
00001b04 <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 */
)
{
1b04: e92d4030 push {r4, r5, lr}
/*
* Verify this node can be linked to.
*/
info.hard_link.link_node = to_loc->node_access;
1b08: e590c000 ldr ip, [r0]
int IMFS_link(
rtems_filesystem_location_info_t *to_loc, /* IN */
rtems_filesystem_location_info_t *parent_loc, /* IN */
const char *token /* IN */
)
{
1b0c: e24dd044 sub sp, sp, #68 ; 0x44
/*
* Verify this node can be linked to.
*/
info.hard_link.link_node = to_loc->node_access;
1b10: e58dc028 str ip, [sp, #40]
if ( info.hard_link.link_node->st_nlink >= LINK_MAX )
1b14: e1dc33b4 ldrh r3, [ip, #52]
1b18: e3530007 cmp r3, #7 ; 0x7
int IMFS_link(
rtems_filesystem_location_info_t *to_loc, /* IN */
rtems_filesystem_location_info_t *parent_loc, /* IN */
const char *token /* IN */
)
{
1b1c: e1a05001 mov r5, r1
1b20: e1a00002 mov r0, 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 )
1b24: 8a00001a bhi 1b94 <IMFS_link+0x90>
/*
* Remove any separators at the end of the string.
*/
IMFS_get_token( token, new_name, &i );
1b28: e28d4007 add r4, sp, #7 ; 0x7
1b2c: e1a01004 mov r1, r4
1b30: e28d2040 add r2, sp, #64 ; 0x40
1b34: eb002396 bl a994 <IMFS_get_token>
/*
* Create a new link node.
*/
new_node = IMFS_create_node(
1b38: e3a03ca2 mov r3, #41472 ; 0xa200
1b3c: e28dc028 add ip, sp, #40 ; 0x28
1b40: e1a00005 mov r0, r5
1b44: e1a02004 mov r2, r4
1b48: e2433001 sub r3, r3, #1 ; 0x1
1b4c: e3a01003 mov r1, #3 ; 0x3
1b50: e58dc000 str ip, [sp]
1b54: eb0020dd bl 9ed0 <IMFS_create_node>
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if ( !new_node )
1b58: e3500000 cmp r0, #0 ; 0x0
1b5c: 0a000011 beq 1ba8 <IMFS_link+0xa4>
/*
* Increment the link count of the node being pointed to.
*/
info.hard_link.link_node->st_nlink++;
1b60: e59d2028 ldr r2, [sp, #40]
1b64: e1d233b4 ldrh r3, [r2, #52]
1b68: e2833001 add r3, r3, #1 ; 0x1
1b6c: e1c233b4 strh r3, [r2, #52]
IMFS_update_ctime( info.hard_link.link_node );
1b70: e28d0038 add r0, sp, #56 ; 0x38
1b74: e3a01000 mov r1, #0 ; 0x0
1b78: eb000371 bl 2944 <gettimeofday>
1b7c: e59d2038 ldr r2, [sp, #56]
1b80: e59d3028 ldr r3, [sp, #40]
1b84: e5832048 str r2, [r3, #72]
1b88: e3a00000 mov r0, #0 ; 0x0
return 0;
}
1b8c: e28dd044 add sp, sp, #68 ; 0x44
1b90: e8bd8030 pop {r4, r5, pc}
* Verify this node can be linked to.
*/
info.hard_link.link_node = to_loc->node_access;
if ( info.hard_link.link_node->st_nlink >= LINK_MAX )
rtems_set_errno_and_return_minus_one( EMLINK );
1b94: eb00329a bl e604 <__errno>
1b98: e3a0301f mov r3, #31 ; 0x1f
1b9c: e5803000 str r3, [r0]
1ba0: e3e00000 mvn r0, #0 ; 0x0
1ba4: eafffff8 b 1b8c <IMFS_link+0x88>
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if ( !new_node )
rtems_set_errno_and_return_minus_one( ENOMEM );
1ba8: eb003295 bl e604 <__errno> <== NOT EXECUTED
1bac: e3a0300c mov r3, #12 ; 0xc <== NOT EXECUTED
1bb0: e5803000 str r3, [r0] <== NOT EXECUTED
1bb4: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
1bb8: eafffff3 b 1b8c <IMFS_link+0x88> <== NOT EXECUTED
0000cf2c <IMFS_memfile_addblock>:
)
{
block_p memory;
block_p *block_entry_ptr;
assert( the_jnode );
cf2c: e2503000 subs r3, r0, #0 ; 0x0
MEMFILE_STATIC int IMFS_memfile_addblock(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
cf30: e92d4030 push {r4, r5, lr}
block_p memory;
block_p *block_entry_ptr;
assert( the_jnode );
cf34: 0a00000f beq cf78 <IMFS_memfile_addblock+0x4c>
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
cf38: e593304c ldr r3, [r3, #76]
cf3c: e3530005 cmp r3, #5 ; 0x5
cf40: 1a000012 bne cf90 <IMFS_memfile_addblock+0x64>
if ( the_jnode->type != IMFS_MEMORY_FILE )
rtems_set_errno_and_return_minus_one( EIO );
block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 );
cf44: e3a02001 mov r2, #1 ; 0x1
cf48: ebfffe99 bl c9b4 <IMFS_memfile_get_block_pointer>
if ( *block_entry_ptr )
cf4c: e5905000 ldr r5, [r0]
cf50: e3550000 cmp r5, #0 ; 0x0
assert( the_jnode->type == IMFS_MEMORY_FILE );
if ( the_jnode->type != IMFS_MEMORY_FILE )
rtems_set_errno_and_return_minus_one( EIO );
block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 );
cf54: e1a04000 mov r4, r0
if ( *block_entry_ptr )
cf58: 13a00000 movne r0, #0 ; 0x0
cf5c: 18bd8030 popne {r4, r5, pc}
#if 0
fprintf(stdout, "%d %p", block, block_entry_ptr );
fflush(stdout);
#endif
memory = memfile_alloc_block();
cf60: ebfffe86 bl c980 <memfile_alloc_block>
if ( !memory )
cf64: e3500000 cmp r0, #0 ; 0x0
return 1;
*block_entry_ptr = memory;
cf68: 15840000 strne r0, [r4]
fprintf(stdout, "%d %p", block, block_entry_ptr );
fflush(stdout);
#endif
memory = memfile_alloc_block();
if ( !memory )
cf6c: 03a00001 moveq r0, #1 ; 0x1
return 1;
*block_entry_ptr = memory;
cf70: 11a00005 movne r0, r5
return 0;
}
cf74: e8bd8030 pop {r4, r5, pc}
)
{
block_p memory;
block_p *block_entry_ptr;
assert( the_jnode );
cf78: e3a01f5a mov r1, #360 ; 0x168 <== NOT EXECUTED
cf7c: e2811001 add r1, r1, #1 ; 0x1 <== NOT EXECUTED
cf80: e59f0020 ldr r0, [pc, #32] ; cfa8 <IMFS_memfile_addblock+0x7c><== NOT EXECUTED
cf84: e59f2020 ldr r2, [pc, #32] ; cfac <IMFS_memfile_addblock+0x80><== NOT EXECUTED
cf88: e59f3020 ldr r3, [pc, #32] ; cfb0 <IMFS_memfile_addblock+0x84><== NOT EXECUTED
cf8c: ebfff71c bl ac04 <__assert_func> <== NOT EXECUTED
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
cf90: e3a01f5b mov r1, #364 ; 0x16c <== NOT EXECUTED
cf94: e2811001 add r1, r1, #1 ; 0x1 <== NOT EXECUTED
cf98: e59f0008 ldr r0, [pc, #8] ; cfa8 <IMFS_memfile_addblock+0x7c><== NOT EXECUTED
cf9c: e59f2008 ldr r2, [pc, #8] ; cfac <IMFS_memfile_addblock+0x80><== NOT EXECUTED
cfa0: e59f300c ldr r3, [pc, #12] ; cfb4 <IMFS_memfile_addblock+0x88><== NOT EXECUTED
cfa4: ebfff716 bl ac04 <__assert_func> <== NOT EXECUTED
0000cfb8 <IMFS_memfile_extend>:
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
cfb8: e92d41f0 push {r4, r5, r6, r7, r8, lr}
/*
* Perform internal consistency checks
*/
assert( the_jnode );
cfbc: e2505000 subs r5, r0, #0 ; 0x0
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
cfc0: e1a08001 mov r8, r1
/*
* Perform internal consistency checks
*/
assert( the_jnode );
cfc4: 0a000037 beq d0a8 <IMFS_memfile_extend+0xf0>
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
cfc8: e595304c ldr r3, [r5, #76]
cfcc: e3530005 cmp r3, #5 ; 0x5
cfd0: 1a00003a bne d0c0 <IMFS_memfile_extend+0x108>
if ( the_jnode->type != IMFS_MEMORY_FILE )
rtems_set_errno_and_return_minus_one( EIO );
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
cfd4: e59f20fc ldr r2, [pc, #252] ; d0d8 <IMFS_memfile_extend+0x120>
cfd8: e5924000 ldr r4, [r2]
cfdc: e1a03124 lsr r3, r4, #2
cfe0: e0213393 mla r1, r3, r3, r3
cfe4: e0223391 mla r2, r1, r3, r3
cfe8: e2422001 sub r2, r2, #1 ; 0x1
cfec: e0030294 mul r3, r4, r2
cff0: e1580003 cmp r8, r3
cff4: 2a000026 bcs d094 <IMFS_memfile_extend+0xdc>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( new_length <= the_jnode->info.file.size )
cff8: e5956050 ldr r6, [r5, #80]
cffc: e1580006 cmp r8, r6
d000: d3a00000 movle r0, #0 ; 0x0
d004: d8bd81f0 pople {r4, r5, r6, r7, r8, pc}
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
d008: e1a01004 mov r1, r4
d00c: e1a00008 mov r0, r8
d010: eb0015c5 bl 1272c <__aeabi_idiv>
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
d014: e1a01004 mov r1, r4
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
d018: e1a07000 mov r7, r0
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
d01c: e1a00006 mov r0, r6
d020: eb0015c1 bl 1272c <__aeabi_idiv>
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
d024: e1570000 cmp r7, r0
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
d028: e1a06000 mov r6, r0
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
d02c: 3a000015 bcc d088 <IMFS_memfile_extend+0xd0>
d030: e1a04000 mov r4, r0
d034: ea000002 b d044 <IMFS_memfile_extend+0x8c>
d038: e2844001 add r4, r4, #1 ; 0x1
d03c: e1570004 cmp r7, r4
d040: 3a000010 bcc d088 <IMFS_memfile_extend+0xd0>
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
d044: e1a00005 mov r0, r5
d048: e1a01004 mov r1, r4
d04c: ebffffb6 bl cf2c <IMFS_memfile_addblock>
d050: e3500000 cmp r0, #0 ; 0x0
d054: 0afffff7 beq d038 <IMFS_memfile_extend+0x80>
d058: ea000003 b d06c <IMFS_memfile_extend+0xb4> <== NOT EXECUTED
for ( ; block>=old_blocks ; block-- ) {
IMFS_memfile_remove_block( the_jnode, block );
d05c: e1a01004 mov r1, r4 <== NOT EXECUTED
d060: e1a00005 mov r0, r5 <== 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-- ) {
d064: e2444001 sub r4, r4, #1 ; 0x1 <== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block );
d068: ebfffeeb bl cc1c <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-- ) {
d06c: e1560004 cmp r6, r4 <== NOT EXECUTED
d070: 9afffff9 bls d05c <IMFS_memfile_extend+0xa4> <== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block );
}
rtems_set_errno_and_return_minus_one( ENOSPC );
d074: eb000562 bl e604 <__errno> <== NOT EXECUTED
d078: e3a0301c mov r3, #28 ; 0x1c <== NOT EXECUTED
d07c: e5803000 str r3, [r0] <== NOT EXECUTED
d080: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
d084: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
d088: e5858050 str r8, [r5, #80]
d08c: e3a00000 mov r0, #0 ; 0x0
return 0;
}
d090: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
assert( the_jnode->type == IMFS_MEMORY_FILE );
if ( the_jnode->type != IMFS_MEMORY_FILE )
rtems_set_errno_and_return_minus_one( EIO );
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
rtems_set_errno_and_return_minus_one( EINVAL );
d094: eb00055a bl e604 <__errno> <== NOT EXECUTED
d098: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED
d09c: e5803000 str r3, [r0] <== NOT EXECUTED
d0a0: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
d0a4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
/*
* Perform internal consistency checks
*/
assert( the_jnode );
d0a8: e3a01e13 mov r1, #304 ; 0x130 <== NOT EXECUTED
d0ac: e2811001 add r1, r1, #1 ; 0x1 <== NOT EXECUTED
d0b0: e59f0024 ldr r0, [pc, #36] ; d0dc <IMFS_memfile_extend+0x124><== NOT EXECUTED
d0b4: e59f2024 ldr r2, [pc, #36] ; d0e0 <IMFS_memfile_extend+0x128><== NOT EXECUTED
d0b8: e59f3024 ldr r3, [pc, #36] ; d0e4 <IMFS_memfile_extend+0x12c><== NOT EXECUTED
d0bc: ebfff6d0 bl ac04 <__assert_func> <== NOT EXECUTED
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
d0c0: e3a01f4d mov r1, #308 ; 0x134 <== NOT EXECUTED
d0c4: e2811001 add r1, r1, #1 ; 0x1 <== NOT EXECUTED
d0c8: e59f000c ldr r0, [pc, #12] ; d0dc <IMFS_memfile_extend+0x124><== NOT EXECUTED
d0cc: e59f200c ldr r2, [pc, #12] ; d0e0 <IMFS_memfile_extend+0x128><== NOT EXECUTED
d0d0: e59f3010 ldr r3, [pc, #16] ; d0e8 <IMFS_memfile_extend+0x130><== NOT EXECUTED
d0d4: ebfff6ca bl ac04 <__assert_func> <== NOT EXECUTED
0000c9b4 <IMFS_memfile_get_block_pointer>:
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
c9b4: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
/*
* Perform internal consistency checks
*/
assert( the_jnode );
c9b8: e2506000 subs r6, r0, #0 ; 0x0
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
c9bc: e1a04001 mov r4, r1
c9c0: e1a07002 mov r7, r2
/*
* Perform internal consistency checks
*/
assert( the_jnode );
c9c4: 0a00002a beq ca74 <IMFS_memfile_get_block_pointer+0xc0>
if ( !the_jnode )
return NULL;
assert( the_jnode->type == IMFS_MEMORY_FILE );
c9c8: e596304c ldr r3, [r6, #76]
c9cc: e3530005 cmp r3, #5 ; 0x5
c9d0: 1a00002d bne ca8c <IMFS_memfile_get_block_pointer+0xd8>
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
c9d4: e59f322c ldr r3, [pc, #556] ; cc08 <IMFS_memfile_get_block_pointer+0x254>
c9d8: e5932000 ldr r2, [r3]
c9dc: e1a05122 lsr r5, r2, #2
c9e0: e2453001 sub r3, r5, #1 ; 0x1
c9e4: e1510003 cmp r1, r3
c9e8: 9a000019 bls ca54 <IMFS_memfile_get_block_pointer+0xa0>
/*
* Is the block number in the doubly indirect portion?
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
c9ec: e0215595 mla r1, r5, r5, r5 <== NOT EXECUTED
c9f0: e2413001 sub r3, r1, #1 ; 0x1 <== NOT EXECUTED
c9f4: e1540003 cmp r4, r3 <== NOT EXECUTED
c9f8: 8a00002d bhi cab4 <IMFS_memfile_get_block_pointer+0x100> <== NOT EXECUTED
#if 0
fprintf(stdout, "(d %d) ", block );
fflush(stdout);
#endif
my_block -= FIRST_DOUBLY_INDIRECT;
c9fc: e0654004 rsb r4, r5, r4 <== NOT EXECUTED
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
ca00: e1a00004 mov r0, r4 <== NOT EXECUTED
ca04: e1a01005 mov r1, r5 <== NOT EXECUTED
ca08: eb001797 bl 1286c <__umodsi3> <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
ca0c: e1a01005 mov r1, r5 <== NOT EXECUTED
fflush(stdout);
#endif
my_block -= FIRST_DOUBLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
ca10: e1a08000 mov r8, r0 <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
ca14: e1a00004 mov r0, r4 <== NOT EXECUTED
ca18: eb0016ff bl 1261c <__aeabi_uidiv> <== NOT EXECUTED
p = info->doubly_indirect;
if ( malloc_it ) {
ca1c: e3570000 cmp r7, #0 ; 0x0 <== NOT EXECUTED
#endif
my_block -= FIRST_DOUBLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
ca20: e1a04000 mov r4, r0 <== NOT EXECUTED
p = info->doubly_indirect;
ca24: e5960058 ldr r0, [r6, #88] <== NOT EXECUTED
if ( malloc_it ) {
ca28: 0a000047 beq cb4c <IMFS_memfile_get_block_pointer+0x198> <== NOT EXECUTED
if ( !p ) {
ca2c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
ca30: 0a000052 beq cb80 <IMFS_memfile_get_block_pointer+0x1cc> <== NOT EXECUTED
if ( !p )
return 0;
info->doubly_indirect = p;
}
p1 = (block_p *)p[ doubly ];
ca34: e7901104 ldr r1, [r0, r4, lsl #2] <== NOT EXECUTED
ca38: e1a03104 lsl r3, r4, #2 <== NOT EXECUTED
if ( !p1 ) {
ca3c: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED
if ( !p )
return 0;
info->doubly_indirect = p;
}
p1 = (block_p *)p[ doubly ];
ca40: e0804003 add r4, r0, r3 <== NOT EXECUTED
if ( !p1 ) {
ca44: 0a000052 beq cb94 <IMFS_memfile_get_block_pointer+0x1e0> <== NOT EXECUTED
if ( !p1 )
return 0;
p[ doubly ] = (block_p) p1;
}
return (block_p *)&p1[ singly ];
ca48: e1a03108 lsl r3, r8, #2 <== NOT EXECUTED
ca4c: e0810003 add r0, r1, r3 <== NOT EXECUTED
ca50: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
fprintf(stdout, "(s %d) ", block );
fflush(stdout);
#endif
p = info->indirect;
if ( malloc_it ) {
ca54: e3570000 cmp r7, #0 ; 0x0
if ( my_block <= LAST_INDIRECT ) {
#if 0
fprintf(stdout, "(s %d) ", block );
fflush(stdout);
#endif
p = info->indirect;
ca58: e5960054 ldr r0, [r6, #84]
if ( malloc_it ) {
ca5c: 0a000010 beq caa4 <IMFS_memfile_get_block_pointer+0xf0>
if ( !p ) {
ca60: e3500000 cmp r0, #0 ; 0x0
ca64: 0a000040 beq cb6c <IMFS_memfile_get_block_pointer+0x1b8>
}
if ( !p )
return 0;
return &info->indirect[ my_block ];
ca68: e1a03104 lsl r3, r4, #2
ca6c: e0800003 add r0, r0, r3
ca70: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
/*
* Perform internal consistency checks
*/
assert( the_jnode );
ca74: e3a01fe1 mov r1, #900 ; 0x384 <== NOT EXECUTED
ca78: e2811002 add r1, r1, #2 ; 0x2 <== NOT EXECUTED
ca7c: e59f0188 ldr r0, [pc, #392] ; cc0c <IMFS_memfile_get_block_pointer+0x258><== NOT EXECUTED
ca80: e59f2188 ldr r2, [pc, #392] ; cc10 <IMFS_memfile_get_block_pointer+0x25c><== NOT EXECUTED
ca84: e59f3188 ldr r3, [pc, #392] ; cc14 <IMFS_memfile_get_block_pointer+0x260><== NOT EXECUTED
ca88: ebfff85d bl ac04 <__assert_func> <== NOT EXECUTED
if ( !the_jnode )
return NULL;
assert( the_jnode->type == IMFS_MEMORY_FILE );
ca8c: e3a01fe2 mov r1, #904 ; 0x388 <== NOT EXECUTED
ca90: e2811002 add r1, r1, #2 ; 0x2 <== NOT EXECUTED
ca94: e59f0170 ldr r0, [pc, #368] ; cc0c <IMFS_memfile_get_block_pointer+0x258><== NOT EXECUTED
ca98: e59f2170 ldr r2, [pc, #368] ; cc10 <IMFS_memfile_get_block_pointer+0x25c><== NOT EXECUTED
ca9c: e59f3174 ldr r3, [pc, #372] ; cc18 <IMFS_memfile_get_block_pointer+0x264><== NOT EXECUTED
caa0: ebfff857 bl ac04 <__assert_func> <== NOT EXECUTED
info->indirect = p;
}
return &info->indirect[ my_block ];
}
if ( !p )
caa4: e3500000 cmp r0, #0 ; 0x0
caa8: 1affffee bne ca68 <IMFS_memfile_get_block_pointer+0xb4>
p2 = (block_p *)p1[ doubly ];
if ( !p2 )
return 0;
return (block_p *)&p2[ singly ];
caac: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
/*
* This means the requested block number is out of range.
*/
return 0;
}
cab0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
#endif
/*
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
cab4: e0235591 mla r3, r1, r5, r5 <== NOT EXECUTED
cab8: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED
cabc: e1540003 cmp r4, r3 <== NOT EXECUTED
cac0: 8afffff9 bhi caac <IMFS_memfile_get_block_pointer+0xf8> <== NOT EXECUTED
my_block -= FIRST_TRIPLY_INDIRECT;
cac4: e0614004 rsb r4, r1, r4 <== NOT EXECUTED
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
cac8: e1a00004 mov r0, r4 <== NOT EXECUTED
cacc: e1a01005 mov r1, r5 <== NOT EXECUTED
cad0: eb001765 bl 1286c <__umodsi3> <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
cad4: e1a01005 mov r1, r5 <== NOT EXECUTED
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
my_block -= FIRST_TRIPLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
cad8: e1a0a000 mov sl, r0 <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
cadc: e1a00004 mov r0, r4 <== NOT EXECUTED
cae0: eb0016cd bl 1261c <__aeabi_uidiv> <== NOT EXECUTED
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
cae4: e1a01005 mov r1, r5 <== NOT EXECUTED
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
my_block -= FIRST_TRIPLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
cae8: e1a04000 mov r4, r0 <== NOT EXECUTED
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
caec: eb0016ca bl 1261c <__aeabi_uidiv> <== NOT EXECUTED
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
caf0: e1a01005 mov r1, r5 <== NOT EXECUTED
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
my_block -= FIRST_TRIPLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
caf4: e1a08000 mov r8, r0 <== NOT EXECUTED
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
caf8: e1a00004 mov r0, r4 <== NOT EXECUTED
cafc: eb00175a bl 1286c <__umodsi3> <== NOT EXECUTED
p = info->triply_indirect;
if ( malloc_it ) {
cb00: e3570000 cmp r7, #0 ; 0x0 <== NOT EXECUTED
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;
cb04: e1a04000 mov r4, r0 <== NOT EXECUTED
p = info->triply_indirect;
cb08: e596005c ldr r0, [r6, #92] <== NOT EXECUTED
if ( malloc_it ) {
cb0c: 0a000025 beq cba8 <IMFS_memfile_get_block_pointer+0x1f4> <== NOT EXECUTED
if ( !p ) {
cb10: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
cb14: 0a00002c beq cbcc <IMFS_memfile_get_block_pointer+0x218> <== NOT EXECUTED
if ( !p )
return 0;
info->triply_indirect = p;
}
p1 = (block_p *) p[ triply ];
cb18: e7902108 ldr r2, [r0, r8, lsl #2] <== NOT EXECUTED
cb1c: e1a03108 lsl r3, r8, #2 <== NOT EXECUTED
if ( !p1 ) {
cb20: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED
if ( !p )
return 0;
info->triply_indirect = p;
}
p1 = (block_p *) p[ triply ];
cb24: e0805003 add r5, r0, r3 <== NOT EXECUTED
if ( !p1 ) {
cb28: 0a000031 beq cbf4 <IMFS_memfile_get_block_pointer+0x240> <== NOT EXECUTED
if ( !p1 )
return 0;
p[ triply ] = (block_p) p1;
}
p2 = (block_p *)p1[ doubly ];
cb2c: e7920104 ldr r0, [r2, r4, lsl #2] <== NOT EXECUTED
cb30: e1a03104 lsl r3, r4, #2 <== NOT EXECUTED
if ( !p2 ) {
cb34: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
if ( !p1 )
return 0;
p[ triply ] = (block_p) p1;
}
p2 = (block_p *)p1[ doubly ];
cb38: e0824003 add r4, r2, r3 <== NOT EXECUTED
if ( !p2 ) {
cb3c: 0a000027 beq cbe0 <IMFS_memfile_get_block_pointer+0x22c> <== NOT EXECUTED
p2 = (block_p *)p1[ doubly ];
if ( !p2 )
return 0;
return (block_p *)&p2[ singly ];
cb40: e1a0310a lsl r3, sl, #2 <== NOT EXECUTED
cb44: e0800003 add r0, r0, r3 <== NOT EXECUTED
cb48: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
}
return (block_p *)&p1[ singly ];
}
if ( !p )
cb4c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
cb50: 0affffd5 beq caac <IMFS_memfile_get_block_pointer+0xf8> <== NOT EXECUTED
return 0;
p = (block_p *)p[ doubly ];
cb54: e7900104 ldr r0, [r0, r4, lsl #2] <== NOT EXECUTED
if ( !p )
cb58: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
#if 0
fprintf(stdout, "(d %d %d %d %d %p %p) ", block, my_block, doubly,
singly, p, &p[singly] );
fflush(stdout);
#endif
return (block_p *)&p[ singly ];
cb5c: 11a03108 lslne r3, r8, #2 <== NOT EXECUTED
cb60: 10800003 addne r0, r0, r3 <== NOT EXECUTED
if ( !p )
return 0;
p = (block_p *)p[ doubly ];
if ( !p )
cb64: 18bd85f0 popne {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
cb68: eaffffcf b caac <IMFS_memfile_get_block_pointer+0xf8> <== NOT EXECUTED
p = info->indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
cb6c: ebffff83 bl c980 <memfile_alloc_block>
if ( !p )
cb70: e3500000 cmp r0, #0 ; 0x0
return 0;
info->indirect = p;
cb74: 15860054 strne r0, [r6, #84]
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
if ( !p )
cb78: 1affffba bne ca68 <IMFS_memfile_get_block_pointer+0xb4>
cb7c: eaffffca b caac <IMFS_memfile_get_block_pointer+0xf8> <== NOT EXECUTED
p = info->doubly_indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
cb80: ebffff7e bl c980 <memfile_alloc_block> <== NOT EXECUTED
if ( !p )
cb84: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
cb88: 0affffc7 beq caac <IMFS_memfile_get_block_pointer+0xf8> <== NOT EXECUTED
return 0;
info->doubly_indirect = p;
cb8c: e5860058 str r0, [r6, #88] <== NOT EXECUTED
cb90: eaffffa7 b ca34 <IMFS_memfile_get_block_pointer+0x80> <== NOT EXECUTED
}
p1 = (block_p *)p[ doubly ];
if ( !p1 ) {
p1 = memfile_alloc_block();
cb94: ebffff79 bl c980 <memfile_alloc_block> <== NOT EXECUTED
if ( !p1 )
cb98: e2501000 subs r1, r0, #0 ; 0x0 <== NOT EXECUTED
cb9c: 0affffc2 beq caac <IMFS_memfile_get_block_pointer+0xf8> <== NOT EXECUTED
return 0;
p[ doubly ] = (block_p) p1;
cba0: e5841000 str r1, [r4] <== NOT EXECUTED
cba4: eaffffa7 b ca48 <IMFS_memfile_get_block_pointer+0x94> <== NOT EXECUTED
p1[ doubly ] = (block_p) p2;
}
return (block_p *)&p2[ singly ];
}
if ( !p )
cba8: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
cbac: 0affffbe beq caac <IMFS_memfile_get_block_pointer+0xf8> <== NOT EXECUTED
#if 0
fprintf(stdout, "(t %d %d %d %d %d) ", block, my_block, triply, doubly, singly );
fflush(stdout);
#endif
p1 = (block_p *) p[ triply ];
cbb0: e7900108 ldr r0, [r0, r8, lsl #2] <== NOT EXECUTED
if ( !p1 )
cbb4: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
cbb8: 0affffbb beq caac <IMFS_memfile_get_block_pointer+0xf8> <== NOT EXECUTED
return 0;
p2 = (block_p *)p1[ doubly ];
cbbc: e7900104 ldr r0, [r0, r4, lsl #2] <== NOT EXECUTED
if ( !p2 )
cbc0: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
cbc4: 1affffdd bne cb40 <IMFS_memfile_get_block_pointer+0x18c> <== NOT EXECUTED
cbc8: eaffffb7 b caac <IMFS_memfile_get_block_pointer+0xf8> <== NOT EXECUTED
p = info->triply_indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
cbcc: ebffff6b bl c980 <memfile_alloc_block> <== NOT EXECUTED
if ( !p )
cbd0: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
cbd4: 0affffb4 beq caac <IMFS_memfile_get_block_pointer+0xf8> <== NOT EXECUTED
return 0;
info->triply_indirect = p;
cbd8: e586005c str r0, [r6, #92] <== NOT EXECUTED
cbdc: eaffffcd b cb18 <IMFS_memfile_get_block_pointer+0x164> <== NOT EXECUTED
p[ triply ] = (block_p) p1;
}
p2 = (block_p *)p1[ doubly ];
if ( !p2 ) {
p2 = memfile_alloc_block();
cbe0: ebffff66 bl c980 <memfile_alloc_block> <== NOT EXECUTED
if ( !p2 )
cbe4: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
return 0;
p1[ doubly ] = (block_p) p2;
cbe8: 15840000 strne r0, [r4] <== NOT EXECUTED
}
p2 = (block_p *)p1[ doubly ];
if ( !p2 ) {
p2 = memfile_alloc_block();
if ( !p2 )
cbec: 1affffd3 bne cb40 <IMFS_memfile_get_block_pointer+0x18c> <== NOT EXECUTED
cbf0: eaffffad b caac <IMFS_memfile_get_block_pointer+0xf8> <== NOT EXECUTED
info->triply_indirect = p;
}
p1 = (block_p *) p[ triply ];
if ( !p1 ) {
p1 = memfile_alloc_block();
cbf4: ebffff61 bl c980 <memfile_alloc_block> <== NOT EXECUTED
if ( !p1 )
cbf8: e2502000 subs r2, r0, #0 ; 0x0 <== NOT EXECUTED
cbfc: 0affffaa beq caac <IMFS_memfile_get_block_pointer+0xf8> <== NOT EXECUTED
return 0;
p[ triply ] = (block_p) p1;
cc00: e5852000 str r2, [r5] <== NOT EXECUTED
cc04: eaffffc8 b cb2c <IMFS_memfile_get_block_pointer+0x178> <== NOT EXECUTED
0000d490 <IMFS_memfile_read>:
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
d490: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
/*
* Perform internal consistency checks
*/
assert( the_jnode );
d494: e250a000 subs sl, r0, #0 ; 0x0
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
d498: e24dd008 sub sp, sp, #8 ; 0x8
d49c: e1a05001 mov r5, r1
d4a0: e1a06002 mov r6, r2
d4a4: e1a00003 mov r0, r3
/*
* Perform internal consistency checks
*/
assert( the_jnode );
d4a8: 0a00006c beq d660 <IMFS_memfile_read+0x1d0>
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE ||
d4ac: e59a104c ldr r1, [sl, #76]
d4b0: e2413005 sub r3, r1, #5 ; 0x5
d4b4: e3530001 cmp r3, #1 ; 0x1
d4b8: 8a000073 bhi d68c <IMFS_memfile_read+0x1fc>
/*
* Error checks on arguments
*/
assert( dest );
d4bc: e3520000 cmp r2, #0 ; 0x0
d4c0: 0a00006c beq d678 <IMFS_memfile_read+0x1e8>
/*
* If there is nothing to read, then quick exit.
*/
my_length = length;
if ( !my_length )
d4c4: e3500000 cmp r0, #0 ; 0x0
d4c8: 0a00005f beq d64c <IMFS_memfile_read+0x1bc>
/*
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
if (the_jnode->type == IMFS_LINEAR_FILE) {
d4cc: e3510006 cmp r1, #6 ; 0x6
d4d0: 0a00004d beq d60c <IMFS_memfile_read+0x17c>
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
d4d4: e59f91f4 ldr r9, [pc, #500] ; d6d0 <IMFS_memfile_read+0x240>
* If the last byte we are supposed to read is past the end of this
* in memory file, then shorten the length to read.
*/
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size )
d4d8: e59a2050 ldr r2, [sl, #80]
d4dc: e0803005 add r3, r0, r5
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
d4e0: e5994000 ldr r4, [r9]
* If the last byte we are supposed to read is past the end of this
* in memory file, then shorten the length to read.
*/
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size )
d4e4: e1530002 cmp r3, r2
d4e8: 91a08000 movls r8, r0
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
d4ec: e1a01004 mov r1, r4
d4f0: e1a00005 mov r0, r5
* in memory file, then shorten the length to read.
*/
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size )
my_length = the_jnode->info.file.size - start;
d4f4: 80658002 rsbhi r8, r5, r2
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
d4f8: eb00150e bl 12938 <__modsi3>
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
d4fc: e1a01004 mov r1, r4
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
d500: e1a07000 mov r7, r0
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
d504: e1a00005 mov r0, r5
d508: eb001487 bl 1272c <__aeabi_idiv>
if ( start_offset ) {
d50c: e3570000 cmp r7, #0 ; 0x0
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
d510: e1a05000 mov r5, r0
if ( start_offset ) {
d514: 1a000029 bne d5c0 <IMFS_memfile_read+0x130>
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
d518: e5994000 ldr r4, [r9]
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
d51c: e1580004 cmp r8, r4
d520: 3a000010 bcc d568 <IMFS_memfile_read+0xd8>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
d524: e1a0000a mov r0, sl
d528: e1a01005 mov r1, r5
d52c: e3a02000 mov r2, #0 ; 0x0
d530: ebfffd1f bl c9b4 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
d534: e3500000 cmp r0, #0 ; 0x0
d538: 0a00003d beq d634 <IMFS_memfile_read+0x1a4>
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
d53c: e5901000 ldr r1, [r0]
d540: e1a02004 mov r2, r4
d544: e1a00006 mov r0, r6
d548: eb00081d bl f5c4 <memcpy>
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
d54c: e5993000 ldr r3, [r9]
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
dest += to_copy;
block++;
my_length -= to_copy;
d550: e0648008 rsb r8, r4, r8
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
d554: e1530008 cmp r3, r8
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
dest += to_copy;
d558: e0866004 add r6, r6, r4
block++;
d55c: e2855001 add r5, r5, #1 ; 0x1
my_length -= to_copy;
copied += to_copy;
d560: e0877004 add r7, r7, r4
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
d564: 9affffee bls d524 <IMFS_memfile_read+0x94>
* Phase 3: possibly the first part of one block
*/
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
if ( my_length ) {
d568: e3580000 cmp r8, #0 ; 0x0
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
d56c: e1a04007 mov r4, r7
* Phase 3: possibly the first part of one block
*/
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
if ( my_length ) {
d570: 0a00000a beq d5a0 <IMFS_memfile_read+0x110>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
d574: e1a01005 mov r1, r5
d578: e1a0000a mov r0, sl
d57c: e3a02000 mov r2, #0 ; 0x0
d580: ebfffd0b bl c9b4 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
d584: e2501000 subs r1, r0, #0 ; 0x0
d588: 0a00004a beq d6b8 <IMFS_memfile_read+0x228>
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], my_length );
d58c: e1a00006 mov r0, r6
d590: e5911000 ldr r1, [r1]
d594: e1a02008 mov r2, r8
d598: eb000809 bl f5c4 <memcpy>
copied += my_length;
d59c: e0884007 add r4, r8, r7
}
IMFS_update_atime( the_jnode );
d5a0: e1a0000d mov r0, sp
d5a4: e3a01000 mov r1, #0 ; 0x0
d5a8: ebffd4e5 bl 2944 <gettimeofday>
d5ac: e59d3000 ldr r3, [sp]
d5b0: e58a3040 str r3, [sl, #64]
return copied;
d5b4: e1a00004 mov r0, r4
}
d5b8: e28dd008 add sp, sp, #8 ; 0x8
d5bc: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
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 );
d5c0: e1a0000a mov r0, sl
d5c4: e1a01005 mov r1, r5
d5c8: e3a02000 mov r2, #0 ; 0x0
d5cc: ebfffcf8 bl c9b4 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
d5d0: e3500000 cmp r0, #0 ; 0x0
d5d4: 0a000032 beq d6a4 <IMFS_memfile_read+0x214>
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
d5d8: e5901000 ldr r1, [r0]
*/
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;
d5dc: e0674004 rsb r4, r7, r4
d5e0: e1580004 cmp r8, r4
d5e4: 31a04008 movcc r4, r8
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
d5e8: e0811007 add r1, r1, r7
d5ec: e1a00006 mov r0, r6
d5f0: e1a02004 mov r2, r4
d5f4: eb0007f2 bl f5c4 <memcpy>
dest += to_copy;
d5f8: e0866004 add r6, r6, r4
block++;
d5fc: e2855001 add r5, r5, #1 ; 0x1
my_length -= to_copy;
d600: e0648008 rsb r8, r4, r8
d604: e1a07004 mov r7, r4
d608: eaffffc2 b d518 <IMFS_memfile_read+0x88>
if (the_jnode->type == IMFS_LINEAR_FILE) {
unsigned char *file_ptr;
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
if (my_length > (the_jnode->info.linearfile.size - start))
d60c: e59a4050 ldr r4, [sl, #80] <== NOT EXECUTED
my_length = the_jnode->info.linearfile.size - start;
memcpy(dest, &file_ptr[start], my_length);
d610: e59a1054 ldr r1, [sl, #84] <== NOT EXECUTED
if (the_jnode->type == IMFS_LINEAR_FILE) {
unsigned char *file_ptr;
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
if (my_length > (the_jnode->info.linearfile.size - start))
d614: e0654004 rsb r4, r5, r4 <== NOT EXECUTED
d618: e1540000 cmp r4, r0 <== NOT EXECUTED
d61c: 21a04000 movcs r4, r0 <== NOT EXECUTED
my_length = the_jnode->info.linearfile.size - start;
memcpy(dest, &file_ptr[start], my_length);
d620: e0811005 add r1, r1, r5 <== NOT EXECUTED
d624: e1a00002 mov r0, r2 <== NOT EXECUTED
d628: e1a02004 mov r2, r4 <== NOT EXECUTED
d62c: eb0007e4 bl f5c4 <memcpy> <== NOT EXECUTED
d630: eaffffda b d5a0 <IMFS_memfile_read+0x110> <== NOT EXECUTED
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
d634: e3a01fa9 mov r1, #676 ; 0x2a4 <== NOT EXECUTED
d638: e2811001 add r1, r1, #1 ; 0x1 <== NOT EXECUTED
d63c: e59f0090 ldr r0, [pc, #144] ; d6d4 <IMFS_memfile_read+0x244><== NOT EXECUTED
d640: e59f2090 ldr r2, [pc, #144] ; d6d8 <IMFS_memfile_read+0x248><== NOT EXECUTED
d644: e59f3090 ldr r3, [pc, #144] ; d6dc <IMFS_memfile_read+0x24c><== NOT EXECUTED
d648: ebfff56d bl ac04 <__assert_func> <== NOT EXECUTED
* If there is nothing to read, then quick exit.
*/
my_length = length;
if ( !my_length )
rtems_set_errno_and_return_minus_one( EINVAL );
d64c: eb0003ec bl e604 <__errno> <== NOT EXECUTED
d650: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED
d654: e5803000 str r3, [r0] <== NOT EXECUTED
d658: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
d65c: eaffffd5 b d5b8 <IMFS_memfile_read+0x128> <== NOT EXECUTED
/*
* Perform internal consistency checks
*/
assert( the_jnode );
d660: e3a01f92 mov r1, #584 ; 0x248 <== NOT EXECUTED
d664: e2811002 add r1, r1, #2 ; 0x2 <== NOT EXECUTED
d668: e59f0064 ldr r0, [pc, #100] ; d6d4 <IMFS_memfile_read+0x244><== NOT EXECUTED
d66c: e59f2064 ldr r2, [pc, #100] ; d6d8 <IMFS_memfile_read+0x248><== NOT EXECUTED
d670: e59f3068 ldr r3, [pc, #104] ; d6e0 <IMFS_memfile_read+0x250><== NOT EXECUTED
d674: ebfff562 bl ac04 <__assert_func> <== NOT EXECUTED
/*
* Error checks on arguments
*/
assert( dest );
d678: e59f0054 ldr r0, [pc, #84] ; d6d4 <IMFS_memfile_read+0x244><== NOT EXECUTED
d67c: e3a01f96 mov r1, #600 ; 0x258 <== NOT EXECUTED
d680: e59f2050 ldr r2, [pc, #80] ; d6d8 <IMFS_memfile_read+0x248><== NOT EXECUTED
d684: e59f3058 ldr r3, [pc, #88] ; d6e4 <IMFS_memfile_read+0x254><== NOT EXECUTED
d688: ebfff55d bl ac04 <__assert_func> <== NOT EXECUTED
assert( the_jnode );
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE ||
d68c: e3a01f93 mov r1, #588 ; 0x24c <== NOT EXECUTED
d690: e2811003 add r1, r1, #3 ; 0x3 <== NOT EXECUTED
d694: e59f0038 ldr r0, [pc, #56] ; d6d4 <IMFS_memfile_read+0x244><== NOT EXECUTED
d698: e59f2038 ldr r2, [pc, #56] ; d6d8 <IMFS_memfile_read+0x248><== NOT EXECUTED
d69c: e59f3044 ldr r3, [pc, #68] ; d6e8 <IMFS_memfile_read+0x258><== NOT EXECUTED
d6a0: ebfff557 bl ac04 <__assert_func> <== NOT EXECUTED
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
d6a4: e59f0028 ldr r0, [pc, #40] ; d6d4 <IMFS_memfile_read+0x244><== NOT EXECUTED
d6a8: e3a01fa5 mov r1, #660 ; 0x294 <== NOT EXECUTED
d6ac: e59f2024 ldr r2, [pc, #36] ; d6d8 <IMFS_memfile_read+0x248><== NOT EXECUTED
d6b0: e59f3024 ldr r3, [pc, #36] ; d6dc <IMFS_memfile_read+0x24c><== NOT EXECUTED
d6b4: ebfff552 bl ac04 <__assert_func> <== NOT EXECUTED
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
if ( my_length ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
d6b8: e3a01fad mov r1, #692 ; 0x2b4 <== NOT EXECUTED
d6bc: e2811003 add r1, r1, #3 ; 0x3 <== NOT EXECUTED
d6c0: e59f000c ldr r0, [pc, #12] ; d6d4 <IMFS_memfile_read+0x244><== NOT EXECUTED
d6c4: e59f200c ldr r2, [pc, #12] ; d6d8 <IMFS_memfile_read+0x248><== NOT EXECUTED
d6c8: e59f300c ldr r3, [pc, #12] ; d6dc <IMFS_memfile_read+0x24c><== NOT EXECUTED
d6cc: ebfff54c bl ac04 <__assert_func> <== NOT EXECUTED
0000cccc <IMFS_memfile_remove>:
*/
int IMFS_memfile_remove(
IMFS_jnode_t *the_jnode
)
{
cccc: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
/*
* Perform internal consistency checks
*/
assert( the_jnode );
ccd0: e250a000 subs sl, r0, #0 ; 0x0
ccd4: 0a00004f beq ce18 <IMFS_memfile_remove+0x14c>
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
ccd8: e59a304c ldr r3, [sl, #76]
ccdc: e3530005 cmp r3, #5 ; 0x5
cce0: 1a000051 bne ce2c <IMFS_memfile_remove+0x160>
/*
* 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;
cce4: e59f7154 ldr r7, [pc, #340] ; ce40 <IMFS_memfile_remove+0x174>
* + triply indirect
*/
info = &the_jnode->info.file;
if ( info->indirect ) {
cce8: e59a3054 ldr r3, [sl, #84]
/*
* 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;
ccec: e5972000 ldr r2, [r7]
* + triply indirect
*/
info = &the_jnode->info.file;
if ( info->indirect ) {
ccf0: e3530000 cmp r3, #0 ; 0x0
/*
* 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;
ccf4: e1a08122 lsr r8, r2, #2
*/
info = &the_jnode->info.file;
if ( info->indirect ) {
memfile_free_blocks_in_table( &info->indirect, to_free );
ccf8: 128a0054 addne r0, sl, #84 ; 0x54
ccfc: 11a01008 movne r1, r8
cd00: 1bffffcf blne cc44 <memfile_free_blocks_in_table>
}
if ( info->doubly_indirect ) {
cd04: e59a0058 ldr r0, [sl, #88]
cd08: e3500000 cmp r0, #0 ; 0x0
cd0c: 0a000014 beq cd64 <IMFS_memfile_remove+0x98>
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
cd10: e5973000 ldr r3, [r7] <== NOT EXECUTED
cd14: e1b03123 lsrs r3, r3, #2 <== NOT EXECUTED
cd18: 0a00000e beq cd58 <IMFS_memfile_remove+0x8c> <== NOT EXECUTED
cd1c: e3a04000 mov r4, #0 ; 0x0 <== NOT EXECUTED
cd20: e1a02004 mov r2, r4 <== NOT EXECUTED
cd24: ea000000 b cd2c <IMFS_memfile_remove+0x60> <== NOT EXECUTED
cd28: e59a0058 ldr r0, [sl, #88] <== NOT EXECUTED
if ( info->doubly_indirect[i] ) {
cd2c: e7903102 ldr r3, [r0, r2, lsl #2] <== NOT EXECUTED
cd30: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
cd34: e1a03102 lsl r3, r2, #2 <== NOT EXECUTED
memfile_free_blocks_in_table(
cd38: 10800003 addne r0, r0, r3 <== NOT EXECUTED
cd3c: 11a01008 movne r1, r8 <== NOT EXECUTED
cd40: 1bffffbf blne cc44 <memfile_free_blocks_in_table> <== NOT EXECUTED
memfile_free_blocks_in_table( &info->indirect, to_free );
}
if ( info->doubly_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
cd44: e5973000 ldr r3, [r7] <== NOT EXECUTED
cd48: e2844001 add r4, r4, #1 ; 0x1 <== NOT EXECUTED
cd4c: e1540123 cmp r4, r3, lsr #2 <== NOT EXECUTED
cd50: e1a02004 mov r2, r4 <== NOT EXECUTED
cd54: 3afffff3 bcc cd28 <IMFS_memfile_remove+0x5c> <== 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 );
cd58: e28a0058 add r0, sl, #88 ; 0x58 <== NOT EXECUTED
cd5c: e1a01008 mov r1, r8 <== NOT EXECUTED
cd60: ebffffb7 bl cc44 <memfile_free_blocks_in_table> <== NOT EXECUTED
}
if ( info->triply_indirect ) {
cd64: e59a005c ldr r0, [sl, #92]
cd68: e3500000 cmp r0, #0 ; 0x0
cd6c: 0a000027 beq ce10 <IMFS_memfile_remove+0x144>
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
cd70: e5973000 ldr r3, [r7] <== NOT EXECUTED
cd74: e1b03123 lsrs r3, r3, #2 <== NOT EXECUTED
cd78: 0a000021 beq ce04 <IMFS_memfile_remove+0x138> <== NOT EXECUTED
p = (block_p *) info->triply_indirect[i];
cd7c: e5905000 ldr r5, [r0] <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
cd80: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED
cd84: 13a06000 movne r6, #0 ; 0x0 <== NOT EXECUTED
cd88: 11a09006 movne r9, r6 <== NOT EXECUTED
cd8c: 0a00001c beq ce04 <IMFS_memfile_remove+0x138> <== NOT EXECUTED
break;
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
cd90: e5973000 ldr r3, [r7] <== NOT EXECUTED
cd94: e1b03123 lsrs r3, r3, #2 <== NOT EXECUTED
cd98: 0a00000d beq cdd4 <IMFS_memfile_remove+0x108> <== NOT EXECUTED
cd9c: e3a04000 mov r4, #0 ; 0x0 <== NOT EXECUTED
cda0: e1a02004 mov r2, r4 <== NOT EXECUTED
if ( p[j] ) {
cda4: e7953102 ldr r3, [r5, r2, lsl #2] <== NOT EXECUTED
cda8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
cdac: e1a03102 lsl r3, r2, #2 <== NOT EXECUTED
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
cdb0: 10850003 addne r0, r5, r3 <== NOT EXECUTED
cdb4: 11a01008 movne r1, r8 <== NOT EXECUTED
cdb8: 1bffffa1 blne cc44 <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++ ) {
cdbc: e5973000 ldr r3, [r7] <== NOT EXECUTED
cdc0: e2844001 add r4, r4, #1 ; 0x1 <== NOT EXECUTED
cdc4: e1540123 cmp r4, r3, lsr #2 <== NOT EXECUTED
cdc8: e1a02004 mov r2, r4 <== NOT EXECUTED
cdcc: 3afffff4 bcc cda4 <IMFS_memfile_remove+0xd8> <== NOT EXECUTED
cdd0: e59a005c ldr r0, [sl, #92] <== NOT EXECUTED
if ( p[j] ) {
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
}
}
memfile_free_blocks_in_table(
cdd4: e0800009 add r0, r0, r9 <== NOT EXECUTED
cdd8: e1a01008 mov r1, r8 <== NOT EXECUTED
cddc: ebffff98 bl cc44 <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++ ) {
cde0: e5973000 ldr r3, [r7] <== NOT EXECUTED
cde4: e2866001 add r6, r6, #1 ; 0x1 <== NOT EXECUTED
cde8: e1560123 cmp r6, r3, lsr #2 <== NOT EXECUTED
cdec: 2a000004 bcs ce04 <IMFS_memfile_remove+0x138> <== NOT EXECUTED
p = (block_p *) info->triply_indirect[i];
cdf0: e59a005c ldr r0, [sl, #92] <== NOT EXECUTED
cdf4: e7905106 ldr r5, [r0, r6, lsl #2] <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
cdf8: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED
cdfc: e1a09106 lsl r9, r6, #2 <== NOT EXECUTED
ce00: 1affffe2 bne cd90 <IMFS_memfile_remove+0xc4> <== NOT EXECUTED
}
}
memfile_free_blocks_in_table(
(block_p **)&info->triply_indirect[i], to_free );
}
memfile_free_blocks_in_table(
ce04: e28a005c add r0, sl, #92 ; 0x5c <== NOT EXECUTED
ce08: e1a01008 mov r1, r8 <== NOT EXECUTED
ce0c: ebffff8c bl cc44 <memfile_free_blocks_in_table> <== NOT EXECUTED
(block_p **)&info->triply_indirect, to_free );
}
return 0;
}
ce10: e3a00000 mov r0, #0 ; 0x0
ce14: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
/*
* Perform internal consistency checks
*/
assert( the_jnode );
ce18: e59f0024 ldr r0, [pc, #36] ; ce44 <IMFS_memfile_remove+0x178><== NOT EXECUTED
ce1c: e3a01f7b mov r1, #492 ; 0x1ec <== NOT EXECUTED
ce20: e59f2020 ldr r2, [pc, #32] ; ce48 <IMFS_memfile_remove+0x17c><== NOT EXECUTED
ce24: e59f3020 ldr r3, [pc, #32] ; ce4c <IMFS_memfile_remove+0x180><== NOT EXECUTED
ce28: ebfff775 bl ac04 <__assert_func> <== NOT EXECUTED
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
ce2c: e59f0010 ldr r0, [pc, #16] ; ce44 <IMFS_memfile_remove+0x178><== NOT EXECUTED
ce30: e3a01e1f mov r1, #496 ; 0x1f0 <== NOT EXECUTED
ce34: e59f200c ldr r2, [pc, #12] ; ce48 <IMFS_memfile_remove+0x17c><== NOT EXECUTED
ce38: e59f3010 ldr r3, [pc, #16] ; ce50 <IMFS_memfile_remove+0x184><== NOT EXECUTED
ce3c: ebfff770 bl ac04 <__assert_func> <== NOT EXECUTED
0000cc1c <IMFS_memfile_remove_block>:
MEMFILE_STATIC int IMFS_memfile_remove_block(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
cc1c: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
block_p *block_entry_ptr;
block_p ptr;
block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
cc20: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED
cc24: ebffff62 bl c9b4 <IMFS_memfile_get_block_pointer> <== NOT EXECUTED
ptr = *block_entry_ptr;
cc28: e5902000 ldr r2, [r0] <== NOT EXECUTED
*block_entry_ptr = 0;
cc2c: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED
cc30: e5803000 str r3, [r0] <== NOT EXECUTED
memfile_free_block( ptr );
cc34: e1a00002 mov r0, r2 <== NOT EXECUTED
cc38: ebffff48 bl c960 <memfile_free_block> <== NOT EXECUTED
return 1;
}
cc3c: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED
cc40: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
0000d1a0 <IMFS_memfile_write>:
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
d1a0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
/*
* Perform internal consistency checks
*/
assert( the_jnode );
d1a4: e250a000 subs sl, r0, #0 ; 0x0
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
d1a8: e24dd008 sub sp, sp, #8 ; 0x8
d1ac: e1a05001 mov r5, r1
d1b0: e1a07002 mov r7, r2
d1b4: e1a0b003 mov fp, r3
/*
* Perform internal consistency checks
*/
assert( the_jnode );
d1b8: 0a00006e beq d378 <IMFS_memfile_write+0x1d8>
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
d1bc: e59a304c ldr r3, [sl, #76]
d1c0: e3530005 cmp r3, #5 ; 0x5
d1c4: 1a000065 bne d360 <IMFS_memfile_write+0x1c0>
/*
* Error check arguments
*/
assert( source );
d1c8: e3520000 cmp r2, #0 ; 0x0
d1cc: 0a00006f beq d390 <IMFS_memfile_write+0x1f0>
/*
* If there is nothing to write, then quick exit.
*/
my_length = length;
if ( !my_length )
d1d0: e35b0000 cmp fp, #0 ; 0x0
d1d4: 0a00005c beq d34c <IMFS_memfile_write+0x1ac>
* If the last byte we are supposed to write is past the end of this
* in memory file, then extend the length.
*/
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size ) {
d1d8: e59a3050 ldr r3, [sl, #80]
/*
* If the last byte we are supposed to write is past the end of this
* in memory file, then extend the length.
*/
last_byte = start + length;
d1dc: e08b1001 add r1, fp, r1
if ( last_byte > the_jnode->info.file.size ) {
d1e0: e1510003 cmp r1, r3
d1e4: 8a00004a bhi d314 <IMFS_memfile_write+0x174>
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
d1e8: e59f91cc ldr r9, [pc, #460] ; d3bc <IMFS_memfile_write+0x21c>
d1ec: e5994000 ldr r4, [r9]
d1f0: e1a00005 mov r0, r5
d1f4: e1a01004 mov r1, r4
d1f8: eb0015ce bl 12938 <__modsi3>
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
d1fc: e1a01004 mov r1, r4
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
d200: e1a08000 mov r8, r0
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
d204: e1a00005 mov r0, r5
d208: eb001547 bl 1272c <__aeabi_idiv>
if ( start_offset ) {
d20c: e3580000 cmp r8, #0 ; 0x0
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
d210: e1a06000 mov r6, r0
if ( start_offset ) {
d214: 01a0500b moveq r5, fp
d218: 1a000029 bne d2c4 <IMFS_memfile_write+0x124>
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
d21c: e5994000 ldr r4, [r9]
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
d220: e1550004 cmp r5, r4
d224: 3a000010 bcc d26c <IMFS_memfile_write+0xcc>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
d228: e1a0000a mov r0, sl
d22c: e1a01006 mov r1, r6
d230: e3a02000 mov r2, #0 ; 0x0
d234: ebfffdde bl c9b4 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
d238: e3500000 cmp r0, #0 ; 0x0
d23c: 0a00003c beq d334 <IMFS_memfile_write+0x194>
if ( !block_ptr )
return copied;
#if 0
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, to_copy );
d240: e1a01007 mov r1, r7
d244: e5900000 ldr r0, [r0]
d248: e1a02004 mov r2, r4
d24c: eb0008dc bl f5c4 <memcpy>
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
d250: e5993000 ldr r3, [r9]
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, to_copy );
src += to_copy;
block++;
my_length -= to_copy;
d254: e0645005 rsb r5, r4, r5
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
d258: e1530005 cmp r3, r5
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 );
src += to_copy;
d25c: e0877004 add r7, r7, r4
block++;
d260: e2866001 add r6, r6, #1 ; 0x1
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
d264: e0888004 add r8, r8, r4
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
d268: 9affffee bls d228 <IMFS_memfile_write+0x88>
*/
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
to_copy = my_length;
if ( my_length ) {
d26c: e3550000 cmp r5, #0 ; 0x0
d270: 0a00000a beq d2a0 <IMFS_memfile_write+0x100>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
d274: e1a01006 mov r1, r6
d278: e1a0000a mov r0, sl
d27c: e3a02000 mov r2, #0 ; 0x0
d280: ebfffdcb bl c9b4 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
d284: e3500000 cmp r0, #0 ; 0x0
d288: 0a000046 beq d3a8 <IMFS_memfile_write+0x208>
if ( !block_ptr )
return copied;
#if 0
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, my_length );
d28c: e5900000 ldr r0, [r0]
d290: e1a01007 mov r1, r7
d294: e1a02005 mov r2, r5
d298: eb0008c9 bl f5c4 <memcpy>
my_length = 0;
copied += to_copy;
d29c: e0888005 add r8, r8, r5
}
IMFS_atime_mtime_update( the_jnode );
d2a0: e1a0000d mov r0, sp
d2a4: e3a01000 mov r1, #0 ; 0x0
d2a8: ebffd5a5 bl 2944 <gettimeofday>
d2ac: e59d3000 ldr r3, [sp]
d2b0: e58a3040 str r3, [sl, #64]
d2b4: e58a3044 str r3, [sl, #68]
return copied;
}
d2b8: e1a00008 mov r0, r8
d2bc: e28dd008 add sp, sp, #8 ; 0x8
d2c0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
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 );
d2c4: e1a01006 mov r1, r6
d2c8: e1a0000a mov r0, sl
d2cc: e3a02000 mov r2, #0 ; 0x0
d2d0: ebfffdb7 bl c9b4 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
d2d4: e3500000 cmp r0, #0 ; 0x0
d2d8: 03a01fc6 moveq r1, #792 ; 0x318
d2dc: 0a000015 beq d338 <IMFS_memfile_write+0x198>
if ( !block_ptr )
return copied;
#if 0
fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
d2e0: e5900000 ldr r0, [r0]
*/
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;
d2e4: e0684004 rsb r4, r8, r4
d2e8: e154000b cmp r4, fp
d2ec: 21a0400b movcs r4, fp
if ( !block_ptr )
return copied;
#if 0
fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
d2f0: e0800008 add r0, r0, r8
d2f4: e1a01007 mov r1, r7
d2f8: e1a02004 mov r2, r4
d2fc: eb0008b0 bl f5c4 <memcpy>
src += to_copy;
d300: e0877004 add r7, r7, r4
block++;
d304: e2866001 add r6, r6, #1 ; 0x1
my_length -= to_copy;
d308: e064500b rsb r5, r4, fp
copied += to_copy;
d30c: e1a08004 mov r8, r4
d310: eaffffc1 b d21c <IMFS_memfile_write+0x7c>
* in memory file, then extend the length.
*/
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size ) {
status = IMFS_memfile_extend( the_jnode, last_byte );
d314: ebffff27 bl cfb8 <IMFS_memfile_extend>
if ( status )
d318: e3500000 cmp r0, #0 ; 0x0
d31c: 0affffb1 beq d1e8 <IMFS_memfile_write+0x48>
rtems_set_errno_and_return_minus_one( ENOSPC );
d320: eb0004b7 bl e604 <__errno> <== NOT EXECUTED
d324: e3a0301c mov r3, #28 ; 0x1c <== NOT EXECUTED
d328: e5803000 str r3, [r0] <== NOT EXECUTED
d32c: e3e08000 mvn r8, #0 ; 0x0 <== NOT EXECUTED
d330: eaffffe0 b d2b8 <IMFS_memfile_write+0x118> <== NOT EXECUTED
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
d334: e3a01fcb mov r1, #812 ; 0x32c <== NOT EXECUTED
d338: e2811002 add r1, r1, #2 ; 0x2 <== NOT EXECUTED
d33c: e59f007c ldr r0, [pc, #124] ; d3c0 <IMFS_memfile_write+0x220><== NOT EXECUTED
d340: e59f207c ldr r2, [pc, #124] ; d3c4 <IMFS_memfile_write+0x224><== NOT EXECUTED
d344: e59f307c ldr r3, [pc, #124] ; d3c8 <IMFS_memfile_write+0x228><== NOT EXECUTED
d348: ebfff62d bl ac04 <__assert_func> <== NOT EXECUTED
* If there is nothing to write, then quick exit.
*/
my_length = length;
if ( !my_length )
rtems_set_errno_and_return_minus_one( EINVAL );
d34c: eb0004ac bl e604 <__errno> <== NOT EXECUTED
d350: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED
d354: e5803000 str r3, [r0] <== NOT EXECUTED
d358: e3e08000 mvn r8, #0 ; 0x0 <== NOT EXECUTED
d35c: eaffffd5 b d2b8 <IMFS_memfile_write+0x118> <== NOT EXECUTED
assert( the_jnode );
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
d360: e3a01fb9 mov r1, #740 ; 0x2e4 <== NOT EXECUTED
d364: e2811001 add r1, r1, #1 ; 0x1 <== NOT EXECUTED
d368: e59f0050 ldr r0, [pc, #80] ; d3c0 <IMFS_memfile_write+0x220><== NOT EXECUTED
d36c: e59f2050 ldr r2, [pc, #80] ; d3c4 <IMFS_memfile_write+0x224><== NOT EXECUTED
d370: e59f3054 ldr r3, [pc, #84] ; d3cc <IMFS_memfile_write+0x22c><== NOT EXECUTED
d374: ebfff622 bl ac04 <__assert_func> <== NOT EXECUTED
/*
* Perform internal consistency checks
*/
assert( the_jnode );
d378: e3a01e2e mov r1, #736 ; 0x2e0 <== NOT EXECUTED
d37c: e2811001 add r1, r1, #1 ; 0x1 <== NOT EXECUTED
d380: e59f0038 ldr r0, [pc, #56] ; d3c0 <IMFS_memfile_write+0x220><== NOT EXECUTED
d384: e59f2038 ldr r2, [pc, #56] ; d3c4 <IMFS_memfile_write+0x224><== NOT EXECUTED
d388: e59f3040 ldr r3, [pc, #64] ; d3d0 <IMFS_memfile_write+0x230><== NOT EXECUTED
d38c: ebfff61c bl ac04 <__assert_func> <== NOT EXECUTED
/*
* Error check arguments
*/
assert( source );
d390: e3a01fbb mov r1, #748 ; 0x2ec <== NOT EXECUTED
d394: e2811001 add r1, r1, #1 ; 0x1 <== NOT EXECUTED
d398: e59f0020 ldr r0, [pc, #32] ; d3c0 <IMFS_memfile_write+0x220><== NOT EXECUTED
d39c: e59f2020 ldr r2, [pc, #32] ; d3c4 <IMFS_memfile_write+0x224><== NOT EXECUTED
d3a0: e59f302c ldr r3, [pc, #44] ; d3d4 <IMFS_memfile_write+0x234><== NOT EXECUTED
d3a4: ebfff616 bl ac04 <__assert_func> <== NOT EXECUTED
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
to_copy = my_length;
if ( my_length ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
d3a8: e59f0010 ldr r0, [pc, #16] ; d3c0 <IMFS_memfile_write+0x220><== NOT EXECUTED
d3ac: e3a01fd1 mov r1, #836 ; 0x344 <== NOT EXECUTED
d3b0: e59f200c ldr r2, [pc, #12] ; d3c4 <IMFS_memfile_write+0x224><== NOT EXECUTED
d3b4: e59f300c ldr r3, [pc, #12] ; d3c8 <IMFS_memfile_write+0x228><== NOT EXECUTED
d3b8: ebfff611 bl ac04 <__assert_func> <== NOT EXECUTED
00008c00 <IMFS_mknod>:
const char *token, /* IN */
mode_t mode, /* IN */
dev_t dev, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
8c00: e92d40f0 push {r4, r5, r6, r7, lr}
8c04: e24dd03c sub sp, sp, #60 ; 0x3c
IMFS_jnode_t *new_node;
int result;
char new_name[ IMFS_NAME_MAX + 1 ];
IMFS_types_union info;
IMFS_get_token( token, new_name, &result );
8c08: e28d7007 add r7, sp, #7 ; 0x7
const char *token, /* IN */
mode_t mode, /* IN */
dev_t dev, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
8c0c: e1a05001 mov r5, r1
8c10: e1a06002 mov r6, r2
IMFS_jnode_t *new_node;
int result;
char new_name[ IMFS_NAME_MAX + 1 ];
IMFS_types_union info;
IMFS_get_token( token, new_name, &result );
8c14: e1a01007 mov r1, r7
8c18: e28d2038 add r2, sp, #56 ; 0x38
const char *token, /* IN */
mode_t mode, /* IN */
dev_t dev, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
8c1c: e1a04003 mov r4, r3
IMFS_jnode_t *new_node;
int result;
char new_name[ IMFS_NAME_MAX + 1 ];
IMFS_types_union info;
IMFS_get_token( token, new_name, &result );
8c20: ebffff76 bl 8a00 <IMFS_get_token>
/*
* Figure out what type of IMFS node this is.
*/
if ( S_ISDIR(mode) )
8c24: e2053a0f and r3, r5, #61440 ; 0xf000
8c28: e3530901 cmp r3, #16384 ; 0x4000
8c2c: 0a000013 beq 8c80 <IMFS_mknod+0x80>
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
8c30: e3530902 cmp r3, #32768 ; 0x8000
8c34: 03a01005 moveq r1, #5 ; 0x5
8c38: 0a000005 beq 8c54 <IMFS_mknod+0x54>
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
8c3c: e3530a02 cmp r3, #8192 ; 0x2000
8c40: 13530a06 cmpne r3, #24576 ; 0x6000
type = IMFS_DEVICE;
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
8c44: 058d6028 streq r6, [sp, #40]
8c48: 058d402c streq r4, [sp, #44]
8c4c: 03a01002 moveq r1, #2 ; 0x2
if ( S_ISDIR(mode) )
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
8c50: 1a00000c bne 8c88 <IMFS_mknod+0x88>
/*
* Allocate and fill in an IMFS jnode
*/
new_node = IMFS_create_node(
8c54: e28dc028 add ip, sp, #40 ; 0x28
8c58: e59d0050 ldr r0, [sp, #80]
8c5c: e1a02007 mov r2, r7
8c60: e1a03005 mov r3, r5
8c64: e58dc000 str ip, [sp]
8c68: eb0009c3 bl b37c <IMFS_create_node>
new_name,
mode,
&info
);
if ( !new_node )
8c6c: e3500000 cmp r0, #0 ; 0x0
8c70: 13a00000 movne r0, #0 ; 0x0
8c74: 0a000008 beq 8c9c <IMFS_mknod+0x9c>
rtems_set_errno_and_return_minus_one( ENOMEM );
return 0;
}
8c78: e28dd03c add sp, sp, #60 ; 0x3c
8c7c: e8bd80f0 pop {r4, r5, r6, r7, pc}
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
type = IMFS_DEVICE;
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
} else {
rtems_set_errno_and_return_minus_one( EINVAL );
8c80: e3a01001 mov r1, #1 ; 0x1
8c84: eafffff2 b 8c54 <IMFS_mknod+0x54>
8c88: eb000cdd bl c004 <__errno> <== NOT EXECUTED
8c8c: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED
8c90: e5803000 str r3, [r0] <== NOT EXECUTED
8c94: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
8c98: eafffff6 b 8c78 <IMFS_mknod+0x78> <== NOT EXECUTED
mode,
&info
);
if ( !new_node )
rtems_set_errno_and_return_minus_one( ENOMEM );
8c9c: eb000cd8 bl c004 <__errno> <== NOT EXECUTED
8ca0: e3a0300c mov r3, #12 ; 0xc <== NOT EXECUTED
8ca4: e5803000 str r3, [r0] <== NOT EXECUTED
8ca8: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
8cac: eafffff1 b 8c78 <IMFS_mknod+0x78> <== NOT EXECUTED
00001c6c <IMFS_mount>:
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
1c6c: e5902008 ldr r2, [r0, #8]
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
1c70: e592304c ldr r3, [r2, #76]
1c74: e3530001 cmp r3, #1 ; 0x1
#include <rtems/seterr.h>
int IMFS_mount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
1c78: e52de004 push {lr} ; (str lr, [sp, #-4]!)
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
1c7c: 1a000002 bne 1c8c <IMFS_mount+0x20>
/*
* Set mt_fs pointer to point to the mount table entry for
* the mounted file system.
*/
node->info.directory.mt_fs = mt_entry;
1c80: e582005c str r0, [r2, #92]
1c84: e3a00000 mov r0, #0 ; 0x0
return 0;
}
1c88: e49df004 pop {pc} ; (ldr pc, [sp], #4)
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
1c8c: eb00325c bl e604 <__errno> <== NOT EXECUTED
1c90: e3a03014 mov r3, #20 ; 0x14 <== NOT EXECUTED
1c94: e5803000 str r3, [r0] <== NOT EXECUTED
1c98: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
1c9c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
00002a10 <IMFS_print_jnode>:
*/
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
2a10: e92d4030 push {r4, r5, lr}
assert( the_jnode );
2a14: e2504000 subs r4, r0, #0 ; 0x0
2a18: 0a000049 beq 2b44 <IMFS_print_jnode+0x134>
fprintf(stdout, "%s", the_jnode->name );
2a1c: e59f5134 ldr r5, [pc, #308] ; 2b58 <IMFS_print_jnode+0x148>
2a20: e5953000 ldr r3, [r5]
2a24: e284000c add r0, r4, #12 ; 0xc
2a28: e5931008 ldr r1, [r3, #8]
2a2c: eb0036b3 bl 10500 <fputs>
switch( the_jnode->type ) {
2a30: e594204c ldr r2, [r4, #76]
2a34: e2423001 sub r3, r2, #1 ; 0x1
2a38: e3530005 cmp r3, #5 ; 0x5
2a3c: 979ff103 ldrls pc, [pc, r3, lsl #2]
2a40: ea000005 b 2a5c <IMFS_print_jnode+0x4c> <== NOT EXECUTED
2a44: 00002a80 .word 0x00002a80 <== NOT EXECUTED
2a48: 00002a9c .word 0x00002a9c <== NOT EXECUTED
2a4c: 00002ab8 .word 0x00002ab8 <== NOT EXECUTED
2a50: 00002ae4 .word 0x00002ae4 <== NOT EXECUTED
2a54: 00002b10 .word 0x00002b10 <== NOT EXECUTED
2a58: 00002b28 .word 0x00002b28 <== NOT EXECUTED
fprintf(stdout, " links not printed\n" );
assert(0);
break;
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
2a5c: e5953000 ldr r3, [r5] <== NOT EXECUTED
2a60: e59f10f4 ldr r1, [pc, #244] ; 2b5c <IMFS_print_jnode+0x14c><== NOT EXECUTED
2a64: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED
2a68: eb003659 bl 103d4 <fprintf> <== NOT EXECUTED
assert(0);
2a6c: e59f00ec ldr r0, [pc, #236] ; 2b60 <IMFS_print_jnode+0x150><== NOT EXECUTED
2a70: e3a01067 mov r1, #103 ; 0x67 <== NOT EXECUTED
2a74: e59f20e8 ldr r2, [pc, #232] ; 2b64 <IMFS_print_jnode+0x154><== NOT EXECUTED
2a78: e59f30e8 ldr r3, [pc, #232] ; 2b68 <IMFS_print_jnode+0x158><== NOT EXECUTED
2a7c: eb000228 bl 3324 <__assert_func> <== NOT EXECUTED
assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
switch( the_jnode->type ) {
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
2a80: e5953000 ldr r3, [r5]
2a84: e3a0002f mov r0, #47 ; 0x2f
2a88: e5931008 ldr r1, [r3, #8]
2a8c: eb003664 bl 10424 <fputc>
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
2a90: e59f00d4 ldr r0, [pc, #212] ; 2b6c <IMFS_print_jnode+0x15c>
}
2a94: e8bd4030 pop {r4, r5, lr}
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
2a98: ea003d82 b 120a8 <puts>
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
break;
case IMFS_DEVICE:
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
2a9c: e5952000 ldr r2, [r5]
2aa0: e5943054 ldr r3, [r4, #84]
2aa4: e5920008 ldr r0, [r2, #8]
2aa8: e59f10c0 ldr r1, [pc, #192] ; 2b70 <IMFS_print_jnode+0x160>
2aac: e5942050 ldr r2, [r4, #80]
2ab0: eb003647 bl 103d4 <fprintf>
2ab4: eafffff5 b 2a90 <IMFS_print_jnode+0x80>
(uint32_t)the_jnode->info.file.size );
#endif
break;
case IMFS_HARD_LINK:
fprintf(stdout, " links not printed\n" );
2ab8: e5952000 ldr r2, [r5] <== NOT EXECUTED
2abc: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED
2ac0: e5923008 ldr r3, [r2, #8] <== NOT EXECUTED
2ac4: e59f00a8 ldr r0, [pc, #168] ; 2b74 <IMFS_print_jnode+0x164><== NOT EXECUTED
2ac8: e3a02013 mov r2, #19 ; 0x13 <== NOT EXECUTED
2acc: eb00393d bl 10fc8 <fwrite> <== NOT EXECUTED
assert(0);
2ad0: e59f0088 ldr r0, [pc, #136] ; 2b60 <IMFS_print_jnode+0x150><== NOT EXECUTED
2ad4: e3a0105d mov r1, #93 ; 0x5d <== NOT EXECUTED
2ad8: e59f2084 ldr r2, [pc, #132] ; 2b64 <IMFS_print_jnode+0x154><== NOT EXECUTED
2adc: e59f3084 ldr r3, [pc, #132] ; 2b68 <IMFS_print_jnode+0x158><== NOT EXECUTED
2ae0: eb00020f bl 3324 <__assert_func> <== NOT EXECUTED
break;
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
2ae4: e5952000 ldr r2, [r5] <== NOT EXECUTED
2ae8: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED
2aec: e5923008 ldr r3, [r2, #8] <== NOT EXECUTED
2af0: e59f007c ldr r0, [pc, #124] ; 2b74 <IMFS_print_jnode+0x164><== NOT EXECUTED
2af4: e3a02013 mov r2, #19 ; 0x13 <== NOT EXECUTED
2af8: eb003932 bl 10fc8 <fwrite> <== NOT EXECUTED
assert(0);
2afc: e59f005c ldr r0, [pc, #92] ; 2b60 <IMFS_print_jnode+0x150> <== NOT EXECUTED
2b00: e3a01062 mov r1, #98 ; 0x62 <== NOT EXECUTED
2b04: e59f2058 ldr r2, [pc, #88] ; 2b64 <IMFS_print_jnode+0x154> <== NOT EXECUTED
2b08: e59f3058 ldr r3, [pc, #88] ; 2b68 <IMFS_print_jnode+0x158> <== NOT EXECUTED
2b0c: eb000204 bl 3324 <__assert_func> <== NOT EXECUTED
the_jnode->info.file.indirect,
the_jnode->info.file.doubly_indirect,
the_jnode->info.file.triply_indirect
);
#else
fprintf(stdout, " (file %" PRId32 ")",
2b10: e5953000 ldr r3, [r5]
2b14: e5942050 ldr r2, [r4, #80]
2b18: e5930008 ldr r0, [r3, #8]
2b1c: e59f1054 ldr r1, [pc, #84] ; 2b78 <IMFS_print_jnode+0x168>
2b20: eb00362b bl 103d4 <fprintf>
2b24: eaffffd9 b 2a90 <IMFS_print_jnode+0x80>
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
the_jnode->info.device.major, the_jnode->info.device.minor );
break;
case IMFS_LINEAR_FILE:
fprintf(stdout, " (file %" PRId32 " %p)",
2b28: e5952000 ldr r2, [r5] <== NOT EXECUTED
2b2c: e5943054 ldr r3, [r4, #84] <== NOT EXECUTED
2b30: e5920008 ldr r0, [r2, #8] <== NOT EXECUTED
2b34: e59f1040 ldr r1, [pc, #64] ; 2b7c <IMFS_print_jnode+0x16c> <== NOT EXECUTED
2b38: e5942050 ldr r2, [r4, #80] <== NOT EXECUTED
2b3c: eb003624 bl 103d4 <fprintf> <== NOT EXECUTED
2b40: eaffffd2 b 2a90 <IMFS_print_jnode+0x80> <== NOT EXECUTED
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
assert( the_jnode );
2b44: e59f0014 ldr r0, [pc, #20] ; 2b60 <IMFS_print_jnode+0x150> <== NOT EXECUTED
2b48: e3a01038 mov r1, #56 ; 0x38 <== NOT EXECUTED
2b4c: e59f2010 ldr r2, [pc, #16] ; 2b64 <IMFS_print_jnode+0x154> <== NOT EXECUTED
2b50: e59f3028 ldr r3, [pc, #40] ; 2b80 <IMFS_print_jnode+0x170> <== NOT EXECUTED
2b54: eb0001f2 bl 3324 <__assert_func> <== NOT EXECUTED
00001cac <IMFS_readlink>:
int IMFS_readlink(
rtems_filesystem_location_info_t *loc,
char *buf, /* OUT */
size_t bufsize
)
{
1cac: e92d4010 push {r4, lr}
IMFS_jnode_t *node;
int i;
node = loc->node_access;
1cb0: e5904000 ldr r4, [r0]
if ( node->type != IMFS_SYM_LINK )
1cb4: e594304c ldr r3, [r4, #76]
1cb8: e3530004 cmp r3, #4 ; 0x4
1cbc: 1a000013 bne 1d10 <IMFS_readlink+0x64>
rtems_set_errno_and_return_minus_one( EINVAL );
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
1cc0: e3520000 cmp r2, #0 ; 0x0
1cc4: 0a00000f beq 1d08 <IMFS_readlink+0x5c>
1cc8: e5943050 ldr r3, [r4, #80]
1ccc: e5d33000 ldrb r3, [r3]
1cd0: e3530000 cmp r3, #0 ; 0x0
int i;
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
rtems_set_errno_and_return_minus_one( EINVAL );
1cd4: 13a00000 movne r0, #0 ; 0x0
1cd8: 11a0c000 movne ip, r0
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
1cdc: 0a000009 beq 1d08 <IMFS_readlink+0x5c>
1ce0: e2800001 add r0, r0, #1 ; 0x1
1ce4: e1520000 cmp r2, r0
buf[i] = node->info.sym_link.name[i];
1ce8: e7c1300c strb r3, [r1, ip]
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
rtems_set_errno_and_return_minus_one( EINVAL );
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
1cec: e1a0c000 mov ip, r0
1cf0: 98bd8010 popls {r4, pc}
1cf4: e5943050 ldr r3, [r4, #80]
1cf8: e7d33000 ldrb r3, [r3, r0]
1cfc: e3530000 cmp r3, #0 ; 0x0
1d00: 1afffff6 bne 1ce0 <IMFS_readlink+0x34>
1d04: e8bd8010 pop {r4, pc}
1d08: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
buf[i] = node->info.sym_link.name[i];
return i;
}
1d0c: e8bd8010 pop {r4, pc} <== NOT EXECUTED
int i;
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
rtems_set_errno_and_return_minus_one( EINVAL );
1d10: eb00323b bl e604 <__errno> <== NOT EXECUTED
1d14: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED
1d18: e5803000 str r3, [r0] <== NOT EXECUTED
1d1c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
1d20: e8bd8010 pop {r4, pc} <== NOT EXECUTED
00008cbc <IMFS_rmnod>:
*/
int IMFS_rmnod(
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
8cbc: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
IMFS_jnode_t *the_jnode;
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
8cc0: e5904000 ldr r4, [r0] <== NOT EXECUTED
/*
* Take the node out of the parent's chain that contains this node
*/
if ( the_jnode->Parent != NULL ) {
8cc4: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
8cc8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
*/
int IMFS_rmnod(
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
8ccc: e24dd008 sub sp, sp, #8 ; 0x8 <== NOT EXECUTED
8cd0: e1a05000 mov r5, r0 <== NOT EXECUTED
/*
* Take the node out of the parent's chain that contains this node
*/
if ( the_jnode->Parent != NULL ) {
8cd4: 0a000003 beq 8ce8 <IMFS_rmnod+0x2c> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
8cd8: e1a00004 mov r0, r4 <== NOT EXECUTED
8cdc: eb000672 bl a6ac <_Chain_Extract> <== NOT EXECUTED
rtems_chain_extract( (rtems_chain_node *) the_jnode );
the_jnode->Parent = NULL;
8ce0: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED
8ce4: e5843008 str r3, [r4, #8] <== NOT EXECUTED
/*
* Decrement the link counter and see if we can free the space.
*/
the_jnode->st_nlink--;
8ce8: e1d433b4 ldrh r3, [r4, #52] <== NOT EXECUTED
8cec: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED
8cf0: e1c433b4 strh r3, [r4, #52] <== NOT EXECUTED
IMFS_update_ctime( the_jnode );
8cf4: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED
8cf8: e1a0000d mov r0, sp <== NOT EXECUTED
8cfc: eb00015a bl 926c <gettimeofday> <== NOT EXECUTED
8d00: e59d3000 ldr r3, [sp] <== NOT EXECUTED
/*
* The file cannot be open and the link must be less than 1 to free.
*/
if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) {
8d04: e1a00004 mov r0, r4 <== NOT EXECUTED
/*
* Decrement the link counter and see if we can free the space.
*/
the_jnode->st_nlink--;
IMFS_update_ctime( the_jnode );
8d08: e5843048 str r3, [r4, #72] <== NOT EXECUTED
/*
* The file cannot be open and the link must be less than 1 to free.
*/
if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) {
8d0c: eb000184 bl 9324 <rtems_libio_is_file_open> <== NOT EXECUTED
8d10: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
8d14: 1a00000d bne 8d50 <IMFS_rmnod+0x94> <== NOT EXECUTED
8d18: e1d413b4 ldrh r1, [r4, #52] <== NOT EXECUTED
8d1c: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED
8d20: 1a00000a bne 8d50 <IMFS_rmnod+0x94> <== NOT EXECUTED
/*
* Is rtems_filesystem_current this node?
*/
if ( rtems_filesystem_current.node_access == pathloc->node_access )
8d24: e59f3044 ldr r3, [pc, #68] ; 8d70 <IMFS_rmnod+0xb4> <== NOT EXECUTED
8d28: e5930000 ldr r0, [r3] <== NOT EXECUTED
8d2c: e5952000 ldr r2, [r5] <== NOT EXECUTED
8d30: e5903004 ldr r3, [r0, #4] <== NOT EXECUTED
8d34: e1530002 cmp r3, r2 <== NOT EXECUTED
/*
* Free memory associated with a memory file.
*/
if ( the_jnode->type == IMFS_SYM_LINK ) {
8d38: e594304c ldr r3, [r4, #76] <== NOT EXECUTED
/*
* Is rtems_filesystem_current this node?
*/
if ( rtems_filesystem_current.node_access == pathloc->node_access )
rtems_filesystem_current.node_access = NULL;
8d3c: 05801004 streq r1, [r0, #4] <== NOT EXECUTED
/*
* Free memory associated with a memory file.
*/
if ( the_jnode->type == IMFS_SYM_LINK ) {
8d40: e3530004 cmp r3, #4 ; 0x4 <== NOT EXECUTED
8d44: 0a000004 beq 8d5c <IMFS_rmnod+0xa0> <== NOT EXECUTED
if ( the_jnode->info.sym_link.name )
free( (void*) the_jnode->info.sym_link.name );
}
free( the_jnode );
8d48: e1a00004 mov r0, r4 <== NOT EXECUTED
8d4c: eb0000d5 bl 90a8 <free> <== NOT EXECUTED
}
return 0;
}
8d50: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
8d54: e28dd008 add sp, sp, #8 ; 0x8 <== NOT EXECUTED
8d58: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
/*
* Free memory associated with a memory file.
*/
if ( the_jnode->type == IMFS_SYM_LINK ) {
if ( the_jnode->info.sym_link.name )
8d5c: e5940050 ldr r0, [r4, #80] <== NOT EXECUTED
8d60: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
8d64: 0afffff7 beq 8d48 <IMFS_rmnod+0x8c> <== NOT EXECUTED
free( (void*) the_jnode->info.sym_link.name );
8d68: eb0000ce bl 90a8 <free> <== NOT EXECUTED
8d6c: eafffff5 b 8d48 <IMFS_rmnod+0x8c> <== NOT EXECUTED
00008d74 <IMFS_stat>:
int IMFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
8d74: e92d4010 push {r4, lr}
IMFS_jnode_t *the_jnode;
IMFS_device_t *io;
the_jnode = loc->node_access;
8d78: e5904000 ldr r4, [r0]
switch ( the_jnode->type ) {
8d7c: e594304c ldr r3, [r4, #76]
8d80: e2433002 sub r3, r3, #2 ; 0x2
int IMFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
8d84: e1a0c001 mov ip, r1
IMFS_device_t *io;
the_jnode = loc->node_access;
switch ( the_jnode->type ) {
8d88: e3530004 cmp r3, #4 ; 0x4
8d8c: 979ff103 ldrls pc, [pc, r3, lsl #2]
8d90: ea000004 b 8da8 <IMFS_stat+0x34> <== NOT EXECUTED
8d94: 00008e24 .word 0x00008e24 <== NOT EXECUTED
8d98: 00008da8 .word 0x00008da8 <== NOT EXECUTED
8d9c: 00008e18 .word 0x00008e18 <== NOT EXECUTED
8da0: 00008dbc .word 0x00008dbc <== NOT EXECUTED
8da4: 00008dbc .word 0x00008dbc <== NOT EXECUTED
case IMFS_SYM_LINK:
buf->st_size = 0;
break;
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
8da8: eb000c95 bl c004 <__errno> <== NOT EXECUTED
8dac: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
8db0: e5803000 str r3, [r0] <== NOT EXECUTED
8db4: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
8db8: e8bd8010 pop {r4, pc} <== NOT EXECUTED
buf->st_dev = rtems_filesystem_make_dev_t( io->major, io->minor );
break;
case IMFS_LINEAR_FILE:
case IMFS_MEMORY_FILE:
buf->st_size = the_jnode->info.file.size;
8dbc: e5943050 ldr r3, [r4, #80]
8dc0: e5813020 str r3, [r1, #32]
break;
}
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
8dc4: e5943038 ldr r3, [r4, #56]
8dc8: e58c3008 str r3, [ip, #8]
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
8dcc: e5942040 ldr r2, [r4, #64]
8dd0: e58c2024 str r2, [ip, #36]
buf->st_mtime = the_jnode->stat_mtime;
8dd4: e5943044 ldr r3, [r4, #68]
8dd8: e58c302c str r3, [ip, #44]
buf->st_ctime = the_jnode->stat_ctime;
buf->st_blksize = imfs_rq_memfile_bytes_per_block;
8ddc: e59f3050 ldr r3, [pc, #80] ; 8e34 <IMFS_stat+0xc0>
8de0: e5932000 ldr r2, [r3]
rtems_set_errno_and_return_minus_one( ENOTSUP );
break;
}
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
8de4: e1d433b4 ldrh r3, [r4, #52]
8de8: e1cc31b0 strh r3, [ip, #16]
buf->st_ino = the_jnode->st_ino;
buf->st_uid = the_jnode->st_uid;
8dec: e1d433bc ldrh r3, [r4, #60]
8df0: e1cc31b2 strh r3, [ip, #18]
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
8df4: e5940048 ldr r0, [r4, #72]
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
break;
}
buf->st_mode = the_jnode->st_mode;
8df8: e5941030 ldr r1, [r4, #48]
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
8dfc: e1d443be ldrh r4, [r4, #62]
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
8e00: e58c0034 str r0, [ip, #52]
buf->st_blksize = imfs_rq_memfile_bytes_per_block;
8e04: e58c203c str r2, [ip, #60]
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
break;
}
buf->st_mode = the_jnode->st_mode;
8e08: e58c100c str r1, [ip, #12]
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
8e0c: e1cc41b4 strh r4, [ip, #20]
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
buf->st_blksize = imfs_rq_memfile_bytes_per_block;
8e10: e3a00000 mov r0, #0 ; 0x0
return 0;
}
8e14: e8bd8010 pop {r4, pc}
case IMFS_MEMORY_FILE:
buf->st_size = the_jnode->info.file.size;
break;
case IMFS_SYM_LINK:
buf->st_size = 0;
8e18: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED
8e1c: e5813020 str r3, [r1, #32] <== NOT EXECUTED
8e20: eaffffe7 b 8dc4 <IMFS_stat+0x50> <== NOT EXECUTED
switch ( the_jnode->type ) {
case IMFS_DEVICE:
io = &the_jnode->info.device;
buf->st_dev = rtems_filesystem_make_dev_t( io->major, io->minor );
8e24: e2842050 add r2, r4, #80 ; 0x50
8e28: e892000c ldm r2, {r2, r3}
8e2c: e881000c stm r1, {r2, r3}
8e30: eaffffe3 b 8dc4 <IMFS_stat+0x50>
00001d24 <IMFS_symlink>:
int IMFS_symlink(
rtems_filesystem_location_info_t *parent_loc,
const char *link_name,
const char *node_name
)
{
1d24: e92d4070 push {r4, r5, r6, lr}
1d28: e24dd03c sub sp, sp, #60 ; 0x3c
/*
* Remove any separators at the end of the string.
*/
IMFS_get_token( node_name, new_name, &i );
1d2c: e28d6007 add r6, sp, #7 ; 0x7
int IMFS_symlink(
rtems_filesystem_location_info_t *parent_loc,
const char *link_name,
const char *node_name
)
{
1d30: e1a04001 mov r4, r1
1d34: e1a05000 mov r5, r0
/*
* Remove any separators at the end of the string.
*/
IMFS_get_token( node_name, new_name, &i );
1d38: e1a01006 mov r1, r6
1d3c: e1a00002 mov r0, r2
1d40: e28d2038 add r2, sp, #56 ; 0x38
1d44: eb002312 bl a994 <IMFS_get_token>
/*
* Duplicate link name
*/
info.sym_link.name = strdup( link_name);
1d48: e1a00004 mov r0, r4
1d4c: eb003a17 bl 105b0 <strdup>
if (info.sym_link.name == NULL) {
1d50: e3500000 cmp r0, #0 ; 0x0
/*
* Duplicate link name
*/
info.sym_link.name = strdup( link_name);
1d54: e58d0028 str r0, [sp, #40]
if (info.sym_link.name == NULL) {
1d58: 0a00000e beq 1d98 <IMFS_symlink+0x74>
/*
* Create a new link node.
*/
new_node = IMFS_create_node(
1d5c: e3a03ca2 mov r3, #41472 ; 0xa200
1d60: e28dc028 add ip, sp, #40 ; 0x28
1d64: e1a00005 mov r0, r5
1d68: e1a02006 mov r2, r6
1d6c: e2433001 sub r3, r3, #1 ; 0x1
1d70: e3a01004 mov r1, #4 ; 0x4
1d74: e58dc000 str ip, [sp]
1d78: eb002054 bl 9ed0 <IMFS_create_node>
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if (new_node == NULL) {
1d7c: e3500000 cmp r0, #0 ; 0x0
1d80: 13a00000 movne r0, #0 ; 0x0
1d84: 0a000001 beq 1d90 <IMFS_symlink+0x6c>
free( info.sym_link.name);
rtems_set_errno_and_return_minus_one( ENOMEM);
}
return 0;
}
1d88: e28dd03c add sp, sp, #60 ; 0x3c
1d8c: e8bd8070 pop {r4, r5, r6, pc}
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if (new_node == NULL) {
free( info.sym_link.name);
1d90: e59d0028 ldr r0, [sp, #40] <== NOT EXECUTED
1d94: eb000269 bl 2740 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM);
1d98: eb003219 bl e604 <__errno> <== NOT EXECUTED
1d9c: e3a0300c mov r3, #12 ; 0xc <== NOT EXECUTED
1da0: e5803000 str r3, [r0] <== NOT EXECUTED
1da4: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
1da8: eafffff6 b 1d88 <IMFS_symlink+0x64> <== NOT EXECUTED
00001dac <IMFS_unlink>:
#include <rtems/seterr.h>
int IMFS_unlink(
rtems_filesystem_location_info_t *loc /* IN */
)
{
1dac: e92d4070 push {r4, r5, r6, lr}
IMFS_jnode_t *node;
rtems_filesystem_location_info_t the_link;
int result = 0;
node = loc->node_access;
1db0: e5905000 ldr r5, [r0]
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
1db4: e595304c ldr r3, [r5, #76]
1db8: e3530003 cmp r3, #3 ; 0x3
#include <rtems/seterr.h>
int IMFS_unlink(
rtems_filesystem_location_info_t *loc /* IN */
)
{
1dbc: e24dd018 sub sp, sp, #24 ; 0x18
1dc0: e1a04000 mov r4, r0
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
1dc4: 1a000014 bne 1e1c <IMFS_unlink+0x70>
if ( !node->info.hard_link.link_node )
1dc8: e595c050 ldr ip, [r5, #80]
1dcc: e35c0000 cmp ip, #0 ; 0x0
1dd0: 0a000017 beq 1e34 <IMFS_unlink+0x88>
rtems_set_errno_and_return_minus_one( EINVAL );
the_link = *loc;
1dd4: e890000f ldm r0, {r0, r1, r2, r3}
1dd8: e88d000f stm sp, {r0, r1, r2, r3}
the_link.node_access = node->info.hard_link.link_node;
IMFS_Set_handlers( &the_link );
1ddc: e1a0000d mov r0, sp
if ( !node->info.hard_link.link_node )
rtems_set_errno_and_return_minus_one( EINVAL );
the_link = *loc;
the_link.node_access = node->info.hard_link.link_node;
1de0: e58dc000 str ip, [sp]
IMFS_Set_handlers( &the_link );
1de4: eb00209c bl a05c <IMFS_Set_handlers>
/*
* If removing the last hard link to a node, then we need
* to remove the node that is a link and the node itself.
*/
if ( node->info.hard_link.link_node->st_nlink == 1)
1de8: e5952050 ldr r2, [r5, #80]
1dec: e1d233b4 ldrh r3, [r2, #52]
1df0: e3530001 cmp r3, #1 ; 0x1
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
rtems_set_errno_and_return_minus_one( EINVAL );
the_link = *loc;
1df4: e1a0600d mov r6, sp
/*
* 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)
1df8: 0a000012 beq 1e48 <IMFS_unlink+0x9c>
if ( result != 0 )
return -1;
}
else
{
node->info.hard_link.link_node->st_nlink --;
1dfc: e2433001 sub r3, r3, #1 ; 0x1
1e00: e1c233b4 strh r3, [r2, #52]
IMFS_update_ctime( node->info.hard_link.link_node );
1e04: e28d0010 add r0, sp, #16 ; 0x10
1e08: e3a01000 mov r1, #0 ; 0x0
1e0c: eb0002cc bl 2944 <gettimeofday>
1e10: e5952050 ldr r2, [r5, #80]
1e14: e59d3010 ldr r3, [sp, #16]
1e18: e5823048 str r3, [r2, #72]
/*
* Now actually free the node we were asked to free.
*/
result = (*loc->handlers->rmnod_h)( loc );
1e1c: e1a00004 mov r0, r4
1e20: e5943004 ldr r3, [r4, #4]
1e24: e1a0e00f mov lr, pc
1e28: e593f034 ldr pc, [r3, #52]
return result;
}
1e2c: e28dd018 add sp, sp, #24 ; 0x18
1e30: e8bd8070 pop {r4, r5, r6, pc}
*/
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
rtems_set_errno_and_return_minus_one( EINVAL );
1e34: eb0031f2 bl e604 <__errno> <== NOT EXECUTED
1e38: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED
1e3c: e5803000 str r3, [r0] <== NOT EXECUTED
1e40: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
1e44: eafffff8 b 1e2c <IMFS_unlink+0x80> <== NOT EXECUTED
* to remove the node that is a link and the node itself.
*/
if ( node->info.hard_link.link_node->st_nlink == 1)
{
result = (*the_link.handlers->rmnod_h)( &the_link );
1e48: e1a0000d mov r0, sp
1e4c: e59d3004 ldr r3, [sp, #4]
1e50: e1a0e00f mov lr, pc
1e54: e593f034 ldr pc, [r3, #52]
if ( result != 0 )
1e58: e3500000 cmp r0, #0 ; 0x0
1e5c: 13e00000 mvnne r0, #0 ; 0x0
1e60: 0affffed beq 1e1c <IMFS_unlink+0x70>
1e64: eafffff0 b 1e2c <IMFS_unlink+0x80>
00001e68 <IMFS_unmount>:
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
1e68: e5902008 ldr r2, [r0, #8]
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
1e6c: e592304c ldr r3, [r2, #76]
1e70: e3530001 cmp r3, #1 ; 0x1
#include <rtems/seterr.h>
int IMFS_unmount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
1e74: e52de004 push {lr} ; (str lr, [sp, #-4]!)
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
1e78: 1a000006 bne 1e98 <IMFS_unmount+0x30>
/*
* Did the node indicate that there was a directory mounted here?
*/
if ( node->info.directory.mt_fs == NULL )
1e7c: e592305c ldr r3, [r2, #92]
1e80: e3530000 cmp r3, #0 ; 0x0
1e84: 0a000008 beq 1eac <IMFS_unmount+0x44>
/*
* 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;
1e88: e3a03000 mov r3, #0 ; 0x0
1e8c: e582305c str r3, [r2, #92]
1e90: e1a00003 mov r0, r3
return 0;
}
1e94: e49df004 pop {pc} ; (ldr pc, [sp], #4)
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
1e98: eb0031d9 bl e604 <__errno> <== NOT EXECUTED
1e9c: e3a03014 mov r3, #20 ; 0x14 <== NOT EXECUTED
1ea0: e5803000 str r3, [r0] <== NOT EXECUTED
1ea4: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
1ea8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
/*
* Did the node indicate that there was a directory mounted here?
*/
if ( node->info.directory.mt_fs == NULL )
rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */
1eac: eb0031d4 bl e604 <__errno> <== NOT EXECUTED
1eb0: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED
1eb4: e5803000 str r3, [r0] <== NOT EXECUTED
1eb8: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
1ebc: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
000015bc <RTEMS_Malloc_Initialize>:
#endif
/*
* If configured, initialize the statistics support
*/
if ( rtems_malloc_statistics_helpers )
15bc: e59f30a4 ldr r3, [pc, #164] ; 1668 <RTEMS_Malloc_Initialize+0xac>
15c0: e5933000 ldr r3, [r3]
15c4: e3530000 cmp r3, #0 ; 0x0
void RTEMS_Malloc_Initialize(
void *start,
size_t length,
size_t sbrk_amount
)
{
15c8: e92d4070 push {r4, r5, r6, lr}
15cc: e1a06000 mov r6, r0
15d0: e1a05001 mov r5, r1
15d4: e1a04002 mov r4, r2
/*
* If configured, initialize the statistics support
*/
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->initialize)();
15d8: 11a0e00f movne lr, pc
15dc: 1593f000 ldrne pc, [r3]
/*
* Initialize the garbage collection list to start with nothing on it.
*/
malloc_deferred_frees_initialize();
15e0: eb00200c bl 9618 <malloc_deferred_frees_initialize>
starting_address = start;
/*
* Initialize the optional sbrk support for extending the heap
*/
if (rtems_malloc_sbrk_helpers) {
15e4: e59f3080 ldr r3, [pc, #128] ; 166c <RTEMS_Malloc_Initialize+0xb0>
15e8: e5933000 ldr r3, [r3]
15ec: e3530000 cmp r3, #0 ; 0x0
15f0: 01a04006 moveq r4, r6
15f4: 0a000004 beq 160c <RTEMS_Malloc_Initialize+0x50>
starting_address = (*rtems_malloc_sbrk_helpers->initialize)(
15f8: e1a01004 mov r1, r4 <== NOT EXECUTED
15fc: e1a00006 mov r0, r6 <== NOT EXECUTED
1600: e1a0e00f mov lr, pc <== NOT EXECUTED
1604: e593f000 ldr pc, [r3] <== NOT EXECUTED
1608: e1a04000 mov r4, r0 <== NOT EXECUTED
* of the time under UNIX because zero'ing memory when it is first
* given to a process eliminates the chance of a process seeing data
* left over from another process. This would be a security violation.
*/
if ( rtems_configuration_get_do_zero_of_workspace() )
160c: e59f305c ldr r3, [pc, #92] ; 1670 <RTEMS_Malloc_Initialize+0xb4>
1610: e5932000 ldr r2, [r3]
1614: e5d21028 ldrb r1, [r2, #40]
1618: e3510000 cmp r1, #0 ; 0x0
161c: 1a00000b bne 1650 <RTEMS_Malloc_Initialize+0x94>
void *starting_address,
size_t size,
uint32_t page_size
)
{
return _Heap_Initialize( the_heap, starting_address, size, page_size );
1620: e1a01004 mov r1, r4
1624: e59f0048 ldr r0, [pc, #72] ; 1674 <RTEMS_Malloc_Initialize+0xb8>
1628: e1a02005 mov r2, r5
162c: e3a03004 mov r3, #4 ; 0x4
1630: eb00107b bl 5824 <_Heap_Initialize>
&RTEMS_Malloc_Heap,
starting_address,
length,
CPU_HEAP_ALIGNMENT
);
if ( !status )
1634: e3500000 cmp r0, #0 ; 0x0
1638: 0a000009 beq 1664 <RTEMS_Malloc_Initialize+0xa8>
rtems_print_buffer( (start + length) - 48, 48 );
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
}
#endif
MSBUMP(space_available, length);
163c: e59f2034 ldr r2, [pc, #52] ; 1678 <RTEMS_Malloc_Initialize+0xbc>
1640: e5923000 ldr r3, [r2]
1644: e0853003 add r3, r5, r3
1648: e5823000 str r3, [r2]
}
164c: e8bd8070 pop {r4, r5, r6, pc}
* given to a process eliminates the chance of a process seeing data
* left over from another process. This would be a security violation.
*/
if ( rtems_configuration_get_do_zero_of_workspace() )
memset( starting_address, 0, length );
1650: e1a00004 mov r0, r4 <== NOT EXECUTED
1654: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED
1658: e1a02005 mov r2, r5 <== NOT EXECUTED
165c: eb002c71 bl c828 <memset> <== NOT EXECUTED
1660: eaffffee b 1620 <RTEMS_Malloc_Initialize+0x64> <== NOT EXECUTED
starting_address,
length,
CPU_HEAP_ALIGNMENT
);
if ( !status )
rtems_fatal_error_occurred( status );
1664: eb000e22 bl 4ef4 <rtems_fatal_error_occurred> <== NOT EXECUTED
00001ae0 <Stack_check_Dump_threads_usage>:
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
1ae0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
void *high_water_mark;
void *current;
Stack_Control *stack;
char name[5];
if ( !the_thread )
1ae4: e2504000 subs r4, r0, #0 ; 0x0 <== NOT EXECUTED
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
1ae8: e24dd010 sub sp, sp, #16 ; 0x10 <== NOT EXECUTED
void *high_water_mark;
void *current;
Stack_Control *stack;
char name[5];
if ( !the_thread )
1aec: 0a000036 beq 1bcc <Stack_check_Dump_threads_usage+0xec> <== NOT EXECUTED
return;
if ( !print_handler )
1af0: e59f312c ldr r3, [pc, #300] ; 1c24 <Stack_check_Dump_threads_usage+0x144><== NOT EXECUTED
1af4: e593a000 ldr sl, [r3] <== NOT EXECUTED
1af8: e35a0000 cmp sl, #0 ; 0x0 <== NOT EXECUTED
1afc: 0a000032 beq 1bcc <Stack_check_Dump_threads_usage+0xec> <== NOT EXECUTED
/*
* Obtain interrupt stack information
*/
if (the_thread == (Thread_Control *) -1) {
1b00: e3740001 cmn r4, #1 ; 0x1 <== NOT EXECUTED
}
else
return;
} else {
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
1b04: 159490f4 ldrne r9, [r4, #244] <== NOT EXECUTED
current = 0;
}
else
return;
} else {
stack = &the_thread->Start.Initial_stack;
1b08: 128470c4 addne r7, r4, #196 ; 0xc4 <== NOT EXECUTED
/*
* Obtain interrupt stack information
*/
if (the_thread == (Thread_Control *) -1) {
1b0c: 0a000035 beq 1be8 <Stack_check_Dump_threads_usage+0x108> <== NOT EXECUTED
} else {
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
low = Stack_check_usable_stack_start(stack);
1b10: e897000c ldm r7, {r2, r3} <== NOT EXECUTED
1b14: e2835010 add r5, r3, #16 ; 0x10 <== NOT EXECUTED
size = Stack_check_usable_stack_size(stack);
1b18: e2428010 sub r8, r2, #16 ; 0x10 <== NOT EXECUTED
high_water_mark = Stack_check_find_high_water_mark(low, size);
1b1c: e1a00005 mov r0, r5 <== NOT EXECUTED
1b20: e1a01008 mov r1, r8 <== NOT EXECUTED
1b24: ebffffd8 bl 1a8c <Stack_check_find_high_water_mark> <== NOT EXECUTED
if ( high_water_mark )
1b28: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark );
1b2c: 10853008 addne r3, r5, r8 <== 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 )
1b30: 01a0b000 moveq fp, r0 <== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark );
1b34: 1060b003 rsbne fp, r0, r3 <== NOT EXECUTED
else
used = 0;
if ( the_thread ) {
1b38: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED
1b3c: 0a000031 beq 1c08 <Stack_check_Dump_threads_usage+0x128> <== NOT EXECUTED
(*print_handler)(
1b40: e5945008 ldr r5, [r4, #8] <== NOT EXECUTED
1b44: e59f60dc ldr r6, [pc, #220] ; 1c28 <Stack_check_Dump_threads_usage+0x148><== NOT EXECUTED
1b48: e28d200b add r2, sp, #11 ; 0xb <== NOT EXECUTED
1b4c: e3a01005 mov r1, #5 ; 0x5 <== NOT EXECUTED
1b50: e1a00005 mov r0, r5 <== NOT EXECUTED
1b54: e5964000 ldr r4, [r6] <== NOT EXECUTED
1b58: eb000eee bl 5718 <rtems_object_get_name> <== NOT EXECUTED
1b5c: e1a02005 mov r2, r5 <== NOT EXECUTED
1b60: e1a03000 mov r3, r0 <== NOT EXECUTED
1b64: e59f10c0 ldr r1, [pc, #192] ; 1c2c <Stack_check_Dump_threads_usage+0x14c><== NOT EXECUTED
1b68: e1a00004 mov r0, r4 <== NOT EXECUTED
1b6c: e1a0e00f mov lr, pc <== NOT EXECUTED
1b70: e12fff1a bx sl <== NOT EXECUTED
);
} else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
(*print_handler)(
1b74: e5973000 ldr r3, [r7] <== NOT EXECUTED
1b78: e5972004 ldr r2, [r7, #4] <== NOT EXECUTED
1b7c: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED
1b80: e0823003 add r3, r2, r3 <== NOT EXECUTED
1b84: e5960000 ldr r0, [r6] <== NOT EXECUTED
1b88: e58d9000 str r9, [sp] <== NOT EXECUTED
1b8c: e58d8004 str r8, [sp, #4] <== NOT EXECUTED
1b90: e59f1098 ldr r1, [pc, #152] ; 1c30 <Stack_check_Dump_threads_usage+0x150><== NOT EXECUTED
1b94: e59fc088 ldr ip, [pc, #136] ; 1c24 <Stack_check_Dump_threads_usage+0x144><== NOT EXECUTED
1b98: e1a0e00f mov lr, pc <== NOT EXECUTED
1b9c: e59cf000 ldr pc, [ip] <== NOT EXECUTED
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
1ba0: e59f308c ldr r3, [pc, #140] ; 1c34 <Stack_check_Dump_threads_usage+0x154><== NOT EXECUTED
1ba4: e5932000 ldr r2, [r3] <== NOT EXECUTED
1ba8: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED
);
} else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
(*print_handler)(
1bac: e59f3070 ldr r3, [pc, #112] ; 1c24 <Stack_check_Dump_threads_usage+0x144><== NOT EXECUTED
1bb0: e59f0070 ldr r0, [pc, #112] ; 1c28 <Stack_check_Dump_threads_usage+0x148><== NOT EXECUTED
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
1bb4: 0a000006 beq 1bd4 <Stack_check_Dump_threads_usage+0xf4> <== NOT EXECUTED
(*print_handler)( print_context, "Unavailable\n" );
} else {
(*print_handler)( print_context, "%8" PRId32 "\n", used );
1bb8: e5900000 ldr r0, [r0] <== NOT EXECUTED
1bbc: e1a0200b mov r2, fp <== NOT EXECUTED
1bc0: e59f1070 ldr r1, [pc, #112] ; 1c38 <Stack_check_Dump_threads_usage+0x158><== NOT EXECUTED
1bc4: e1a0e00f mov lr, pc <== NOT EXECUTED
1bc8: e593f000 ldr pc, [r3] <== NOT EXECUTED
}
}
1bcc: e28dd010 add sp, sp, #16 ; 0x10 <== NOT EXECUTED
1bd0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
current,
size
);
if (Stack_check_Initialized == 0) {
(*print_handler)( print_context, "Unavailable\n" );
1bd4: e59f1060 ldr r1, [pc, #96] ; 1c3c <Stack_check_Dump_threads_usage+0x15c><== NOT EXECUTED
1bd8: e5900000 ldr r0, [r0] <== NOT EXECUTED
1bdc: e1a0e00f mov lr, pc <== NOT EXECUTED
1be0: e593f000 ldr pc, [r3] <== NOT EXECUTED
1be4: eafffff8 b 1bcc <Stack_check_Dump_threads_usage+0xec> <== NOT EXECUTED
/*
* Obtain interrupt stack information
*/
if (the_thread == (Thread_Control *) -1) {
if (Stack_check_Interrupt_stack.area) {
1be8: e59f2050 ldr r2, [pc, #80] ; 1c40 <Stack_check_Dump_threads_usage+0x160><== NOT EXECUTED
1bec: e5923004 ldr r3, [r2, #4] <== NOT EXECUTED
1bf0: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
stack = &Stack_check_Interrupt_stack;
the_thread = 0;
current = 0;
}
else
return;
1bf4: 12844001 addne r4, r4, #1 ; 0x1 <== NOT EXECUTED
1bf8: 11a07002 movne r7, r2 <== NOT EXECUTED
1bfc: 11a09004 movne r9, r4 <== NOT EXECUTED
/*
* Obtain interrupt stack information
*/
if (the_thread == (Thread_Control *) -1) {
if (Stack_check_Interrupt_stack.area) {
1c00: 1affffc2 bne 1b10 <Stack_check_Dump_threads_usage+0x30> <== NOT EXECUTED
1c04: eafffff0 b 1bcc <Stack_check_Dump_threads_usage+0xec> <== NOT EXECUTED
"0x%08" PRIx32 " %4s",
the_thread->Object.id,
rtems_object_get_name( the_thread->Object.id, sizeof(name), name )
);
} else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
1c08: e59f6018 ldr r6, [pc, #24] ; 1c28 <Stack_check_Dump_threads_usage+0x148><== NOT EXECUTED
1c0c: e59f1030 ldr r1, [pc, #48] ; 1c44 <Stack_check_Dump_threads_usage+0x164><== NOT EXECUTED
1c10: e5960000 ldr r0, [r6] <== NOT EXECUTED
1c14: e3e02000 mvn r2, #0 ; 0x0 <== NOT EXECUTED
1c18: e1a0e00f mov lr, pc <== NOT EXECUTED
1c1c: e12fff1a bx sl <== NOT EXECUTED
1c20: eaffffd3 b 1b74 <Stack_check_Dump_threads_usage+0x94> <== NOT EXECUTED
00001a8c <Stack_check_find_high_water_mark>:
*/
void *Stack_check_find_high_water_mark(
const void *s,
size_t n
)
{
1a8c: e1a0c000 mov ip, r0 <== 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++)
1a90: e3c11003 bic r1, r1, #3 ; 0x3 <== NOT EXECUTED
/*
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
1a94: e2800010 add r0, r0, #16 ; 0x10 <== NOT EXECUTED
for (ebase = base + length; base < ebase; base++)
1a98: e0802001 add r2, r0, r1 <== NOT EXECUTED
1a9c: e1500002 cmp r0, r2 <== NOT EXECUTED
1aa0: 2a00000c bcs 1ad8 <Stack_check_find_high_water_mark+0x4c> <== NOT EXECUTED
if (*base != U32_PATTERN)
1aa4: e3a03ca6 mov r3, #42496 ; 0xa600 <== NOT EXECUTED
1aa8: e243305b sub r3, r3, #91 ; 0x5b <== NOT EXECUTED
1aac: e59c1010 ldr r1, [ip, #16] <== NOT EXECUTED
1ab0: e1833803 orr r3, r3, r3, lsl #16 <== NOT EXECUTED
1ab4: e1510003 cmp r1, r3 <== NOT EXECUTED
1ab8: 0a000003 beq 1acc <Stack_check_find_high_water_mark+0x40> <== NOT EXECUTED
1abc: e12fff1e bx lr <== NOT EXECUTED
1ac0: e5903000 ldr r3, [r0] <== NOT EXECUTED
1ac4: e1530001 cmp r3, r1 <== NOT EXECUTED
1ac8: 112fff1e bxne lr <== 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++)
1acc: e2800004 add r0, r0, #4 ; 0x4 <== NOT EXECUTED
1ad0: e1520000 cmp r2, r0 <== NOT EXECUTED
1ad4: 8afffff9 bhi 1ac0 <Stack_check_find_high_water_mark+0x34> <== NOT EXECUTED
1ad8: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
if (*base != U32_PATTERN)
return (void *) base;
#endif
return (void *)0;
}
1adc: e12fff1e bx lr <== NOT EXECUTED
00005270 <_API_Mutex_Initialization>:
#include <rtems/score/apimutex.h>
void _API_Mutex_Initialization(
uint32_t maximum_mutexes
)
{
5270: e92d4010 push {r4, lr}
5274: e1a03000 mov r3, r0
5278: e24dd00c sub sp, sp, #12 ; 0xc
_Objects_Initialize_information(
527c: e3a04000 mov r4, #0 ; 0x0
5280: e3a0c074 mov ip, #116 ; 0x74
5284: e59f001c ldr r0, [pc, #28] ; 52a8 <_API_Mutex_Initialization+0x38>
5288: e3a01001 mov r1, #1 ; 0x1
528c: e3a02002 mov r2, #2 ; 0x2
5290: e58dc000 str ip, [sp]
5294: e58d4008 str r4, [sp, #8]
5298: e58d4004 str r4, [sp, #4]
529c: eb000369 bl 6048 <_Objects_Initialize_information>
,
TRUE, /* TRUE if this is a global object class */
NULL /* Proxy extraction support callout */
#endif
);
}
52a0: e28dd00c add sp, sp, #12 ; 0xc
52a4: e8bd8010 pop {r4, pc}
00007194 <_CORE_RWLock_Release>:
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
7194: e59f30e4 ldr r3, [pc, #228] ; 7280 <_CORE_RWLock_Release+0xec>
*/
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
7198: e92d4010 push {r4, lr}
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
719c: e5931000 ldr r1, [r3]
*/
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
71a0: e1a04000 mov r4, r0
* Otherwise, we have to block.
* If locked for reading and no waiters, then OK to read.
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
71a4: e10f2000 mrs r2, CPSR
71a8: e38230c0 orr r3, r2, #192 ; 0xc0
71ac: e129f003 msr CPSR_fc, r3
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
71b0: e5903044 ldr r3, [r0, #68]
71b4: e3530000 cmp r3, #0 ; 0x0
71b8: 0a00002b beq 726c <_CORE_RWLock_Release+0xd8>
_ISR_Enable( level );
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
return CORE_RWLOCK_SUCCESSFUL;
}
if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) {
71bc: e3530001 cmp r3, #1 ; 0x1
71c0: 0a000021 beq 724c <_CORE_RWLock_Release+0xb8>
return CORE_RWLOCK_SUCCESSFUL;
}
}
/* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
71c4: e3a03000 mov r3, #0 ; 0x0
71c8: e5813034 str r3, [r1, #52]
/*
* Implicitly transition to "unlocked" and find another thread interested
* in obtaining this rwlock.
*/
the_rwlock->current_state = CORE_RWLOCK_UNLOCKED;
71cc: e5843044 str r3, [r4, #68]
_ISR_Enable( level );
71d0: e129f002 msr CPSR_fc, r2
next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue );
71d4: e1a00004 mov r0, r4
71d8: eb0005b9 bl 88c4 <_Thread_queue_Dequeue>
if ( next ) {
71dc: e3500000 cmp r0, #0 ; 0x0
71e0: 0a000017 beq 7244 <_CORE_RWLock_Release+0xb0>
if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) {
71e4: e5903030 ldr r3, [r0, #48]
71e8: e3530001 cmp r3, #1 ; 0x1
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING;
71ec: 02833001 addeq r3, r3, #1 ; 0x1
71f0: 05843044 streq r3, [r4, #68]
_ISR_Enable( level );
next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue );
if ( next ) {
if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) {
71f4: 0a000012 beq 7244 <_CORE_RWLock_Release+0xb0>
}
/*
* Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING
*/
the_rwlock->number_of_readers += 1;
71f8: e5943048 ldr r3, [r4, #72]
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
71fc: e3a02001 mov r2, #1 ; 0x1
}
/*
* Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING
*/
the_rwlock->number_of_readers += 1;
7200: e2833001 add r3, r3, #1 ; 0x1
7204: e5843048 str r3, [r4, #72]
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
7208: e5842044 str r2, [r4, #68]
720c: ea000006 b 722c <_CORE_RWLock_Release+0x98>
/*
* Now see if more readers can be let go.
*/
while ( 1 ) {
next = _Thread_queue_First( &the_rwlock->Wait_queue );
if ( !next ||
7210: e5933030 ldr r3, [r3, #48]
7214: e3530001 cmp r3, #1 ; 0x1
7218: 0a000009 beq 7244 <_CORE_RWLock_Release+0xb0>
next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE )
return CORE_RWLOCK_SUCCESSFUL;
the_rwlock->number_of_readers += 1;
721c: e5943048 ldr r3, [r4, #72]
7220: e2833001 add r3, r3, #1 ; 0x1
7224: e5843048 str r3, [r4, #72]
_Thread_queue_Extract( &the_rwlock->Wait_queue, next );
7228: eb0006bb bl 8d1c <_Thread_queue_Extract>
/*
* Now see if more readers can be let go.
*/
while ( 1 ) {
next = _Thread_queue_First( &the_rwlock->Wait_queue );
722c: e1a00004 mov r0, r4
7230: eb000706 bl 8e50 <_Thread_queue_First>
if ( !next ||
7234: e2503000 subs r3, r0, #0 ; 0x0
next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE )
return CORE_RWLOCK_SUCCESSFUL;
the_rwlock->number_of_readers += 1;
_Thread_queue_Extract( &the_rwlock->Wait_queue, next );
7238: e1a01003 mov r1, r3
723c: e1a00004 mov r0, r4
/*
* Now see if more readers can be let go.
*/
while ( 1 ) {
next = _Thread_queue_First( &the_rwlock->Wait_queue );
if ( !next ||
7240: 1afffff2 bne 7210 <_CORE_RWLock_Release+0x7c>
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
7244: e3a00000 mov r0, #0 ; 0x0
7248: e8bd8010 pop {r4, pc}
_ISR_Enable( level );
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
return CORE_RWLOCK_SUCCESSFUL;
}
if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) {
the_rwlock->number_of_readers -= 1;
724c: e5903048 ldr r3, [r0, #72]
7250: e2433001 sub r3, r3, #1 ; 0x1
if ( the_rwlock->number_of_readers != 0 ) {
7254: e3530000 cmp r3, #0 ; 0x0
_ISR_Enable( level );
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
return CORE_RWLOCK_SUCCESSFUL;
}
if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) {
the_rwlock->number_of_readers -= 1;
7258: e5803048 str r3, [r0, #72]
if ( the_rwlock->number_of_readers != 0 ) {
725c: 0affffd8 beq 71c4 <_CORE_RWLock_Release+0x30>
/* must be unlocked again */
_ISR_Enable( level );
7260: e129f002 msr CPSR_fc, r2
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
7264: e3a00000 mov r0, #0 ; 0x0
7268: e8bd8010 pop {r4, pc}
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
_ISR_Enable( level );
726c: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
7270: e2833002 add r3, r3, #2 ; 0x2 <== NOT EXECUTED
7274: e5813034 str r3, [r1, #52] <== NOT EXECUTED
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
7278: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
727c: e8bd8010 pop {r4, pc} <== NOT EXECUTED
000136f4 <_CORE_message_queue_Broadcast>:
{
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
136f4: e590304c ldr r3, [r0, #76]
136f8: e1530002 cmp r3, r2
size_t size,
Objects_Id id,
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support,
uint32_t *count
)
{
136fc: e92d41f0 push {r4, r5, r6, r7, r8, lr}
13700: e1a07000 mov r7, r0
13704: e1a06002 mov r6, r2
13708: e1a08001 mov r8, r1
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
1370c: 33a00001 movcc r0, #1 ; 0x1
13710: 38bd81f0 popcc {r4, r5, r6, r7, r8, pc}
* 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 ) {
13714: e5973048 ldr r3, [r7, #72]
13718: e3530000 cmp r3, #0 ; 0x0
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
1371c: 01a05003 moveq r5, r3
* 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 ) {
13720: 0a000009 beq 1374c <_CORE_message_queue_Broadcast+0x58>
*count = 0;
13724: e59d201c ldr r2, [sp, #28] <== NOT EXECUTED
13728: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED
1372c: e5823000 str r3, [r2] <== NOT EXECUTED
13730: e1a00003 mov r0, r3 <== NOT EXECUTED
13734: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
13738: e594002c ldr r0, [r4, #44]
1373c: eb002108 bl 1bb64 <memcpy>
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
13740: e5943028 ldr r3, [r4, #40]
13744: e5836000 str r6, [r3]
*/
number_broadcasted = 0;
while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
waitp = &the_thread->Wait;
number_broadcasted += 1;
13748: e2855001 add r5, r5, #1 ; 0x1
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
1374c: e1a00007 mov r0, r7
13750: eb00099d bl 15dcc <_Thread_queue_Dequeue>
13754: e2504000 subs r4, r0, #0 ; 0x0
13758: e1a01008 mov r1, r8
1375c: e1a02006 mov r2, r6
13760: 1afffff4 bne 13738 <_CORE_message_queue_Broadcast+0x44>
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_message_queue_mp_support) ( the_thread, id );
#endif
}
*count = number_broadcasted;
13764: e59d301c ldr r3, [sp, #28]
13768: e1a00004 mov r0, r4
1376c: e5835000 str r5, [r3]
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
13770: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
0000c154 <_CORE_message_queue_Submit>:
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support,
CORE_message_queue_Submit_types submit_type,
bool wait,
Watchdog_Interval timeout
)
{
c154: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *the_thread;
if ( size > the_message_queue->maximum_message_size ) {
c158: e590c04c ldr ip, [r0, #76]
c15c: e15c0002 cmp ip, r2
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support,
CORE_message_queue_Submit_types submit_type,
bool wait,
Watchdog_Interval timeout
)
{
c160: e1a04000 mov r4, r0
c164: e1a07002 mov r7, r2
c168: e1a0a001 mov sl, r1
c16c: e1a09003 mov r9, r3
c170: e5dd8028 ldrb r8, [sp, #40]
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *the_thread;
if ( size > the_message_queue->maximum_message_size ) {
c174: 33a00001 movcc r0, #1 ; 0x1
c178: 38bd87f0 popcc {r4, r5, r6, r7, r8, r9, sl, pc}
/*
* Is there a thread currently waiting on this message queue?
*/
if ( the_message_queue->number_of_pending_messages == 0 ) {
c17c: e5945048 ldr r5, [r4, #72]
c180: e3550000 cmp r5, #0 ; 0x0
c184: 0a00001d beq c200 <_CORE_message_queue_Submit+0xac>
/*
* 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 <
c188: e5943044 ldr r3, [r4, #68]
c18c: e1530005 cmp r3, r5
c190: 8a00002a bhi c240 <_CORE_message_queue_Submit+0xec>
* No message buffers were available so we may need to return an
* overflow error or block the sender until the message is placed
* on the queue.
*/
if ( !wait ) {
c194: e3580000 cmp r8, #0 ; 0x0
c198: 03a00002 moveq r0, #2 ; 0x2
c19c: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc}
/*
* Do NOT block on a send if the caller is in an ISR. It is
* deadly to block in an ISR.
*/
if ( _ISR_Is_in_progress() ) {
c1a0: e59f30dc ldr r3, [pc, #220] ; c284 <_CORE_message_queue_Submit+0x130>
c1a4: e5932000 ldr r2, [r3]
c1a8: e3520000 cmp r2, #0 ; 0x0
c1ac: 1a000021 bne c238 <_CORE_message_queue_Submit+0xe4>
* it as a variable. Doing this emphasizes how dangerous it
* would be to use this variable prior to here.
*/
{
Thread_Control *executing = _Thread_Executing;
c1b0: e59f30d0 ldr r3, [pc, #208] ; c288 <_CORE_message_queue_Submit+0x134>
c1b4: e5932000 ldr r2, [r3]
_ISR_Disable( level );
c1b8: e10f1000 mrs r1, CPSR
c1bc: e38130c0 orr r3, r1, #192 ; 0xc0
c1c0: e129f003 msr CPSR_fc, r3
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
executing->Wait.id = id;
executing->Wait.return_argument_second.immutable_object = buffer;
executing->Wait.option = (uint32_t) size;
executing->Wait.count = submit_type;
c1c4: e59d3024 ldr r3, [sp, #36]
c1c8: e5823024 str r3, [r2, #36]
c1cc: e3a03001 mov r3, #1 ; 0x1
c1d0: e5843030 str r3, [r4, #48]
Thread_Control *executing = _Thread_Executing;
_ISR_Disable( level );
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
executing->Wait.id = id;
c1d4: e5829020 str r9, [r2, #32]
executing->Wait.return_argument_second.immutable_object = buffer;
c1d8: e582a02c str sl, [r2, #44]
executing->Wait.option = (uint32_t) size;
c1dc: e5827030 str r7, [r2, #48]
{
Thread_Control *executing = _Thread_Executing;
_ISR_Disable( level );
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
c1e0: e5824044 str r4, [r2, #68]
executing->Wait.id = id;
executing->Wait.return_argument_second.immutable_object = buffer;
executing->Wait.option = (uint32_t) size;
executing->Wait.count = submit_type;
_ISR_Enable( level );
c1e4: e129f001 msr CPSR_fc, r1
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
c1e8: e59f209c ldr r2, [pc, #156] ; c28c <_CORE_message_queue_Submit+0x138>
c1ec: e1a00004 mov r0, r4
c1f0: e59d102c ldr r1, [sp, #44]
c1f4: eb00070f bl de38 <_Thread_queue_Enqueue_with_handler>
c1f8: e3a00007 mov r0, #7 ; 0x7
c1fc: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
/*
* Is there a thread currently waiting on this message queue?
*/
if ( the_message_queue->number_of_pending_messages == 0 ) {
the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue );
c200: eb0006aa bl dcb0 <_Thread_queue_Dequeue>
if ( the_thread ) {
c204: e2506000 subs r6, r0, #0 ; 0x0
c208: 05945048 ldreq r5, [r4, #72]
c20c: 0affffdd beq c188 <_CORE_message_queue_Submit+0x34>
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
c210: e1a0100a mov r1, sl
c214: e596002c ldr r0, [r6, #44]
c218: e1a02007 mov r2, r7
c21c: eb001f22 bl 13eac <memcpy>
_CORE_message_queue_Copy_buffer(
buffer,
the_thread->Wait.return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
c220: e5963028 ldr r3, [r6, #40]
c224: e5837000 str r7, [r3]
the_thread->Wait.count = submit_type;
c228: e59d3024 ldr r3, [sp, #36]
c22c: e1a00005 mov r0, r5
c230: e5863024 str r3, [r6, #36]
c234: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
c238: e3a00003 mov r0, #3 ; 0x3 <== NOT EXECUTED
}
c23c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
RTEMS_INLINE_ROUTINE CORE_message_queue_Buffer_control *
_CORE_message_queue_Allocate_message_buffer (
CORE_message_queue_Control *the_message_queue
)
{
return (CORE_message_queue_Buffer_control *)
c240: e2840068 add r0, r4, #104 ; 0x68
c244: eb0015bd bl 11940 <_Chain_Get>
/*
* NOTE: If the system is consistent, this error should never occur.
*/
if ( !the_message ) {
c248: e2505000 subs r5, r0, #0 ; 0x0
c24c: 0afffff9 beq c238 <_CORE_message_queue_Submit+0xe4>
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
c250: e1a0100a mov r1, sl
c254: e1a02007 mov r2, r7
c258: e2850010 add r0, r5, #16 ; 0x10
c25c: eb001f12 bl 13eac <memcpy>
buffer,
the_message->Contents.buffer,
size
);
the_message->Contents.size = size;
the_message->priority = submit_type;
c260: e59d3024 ldr r3, [sp, #36]
c264: e5853008 str r3, [r5, #8]
_CORE_message_queue_Insert_message(
c268: e1a00004 mov r0, r4
_CORE_message_queue_Copy_buffer(
buffer,
the_message->Contents.buffer,
size
);
the_message->Contents.size = size;
c26c: e585700c str r7, [r5, #12]
the_message->priority = submit_type;
_CORE_message_queue_Insert_message(
c270: e1a01005 mov r1, r5
c274: e59d2024 ldr r2, [sp, #36]
c278: eb0015d4 bl 119d0 <_CORE_message_queue_Insert_message>
c27c: e3a00000 mov r0, #0 ; 0x0
c280: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
0000530c <_CORE_mutex_Initialize>:
CORE_mutex_Status _CORE_mutex_Initialize(
CORE_mutex_Control *the_mutex,
CORE_mutex_Attributes *the_mutex_attributes,
uint32_t initial_lock
)
{
530c: e92d40f0 push {r4, r5, r6, r7, lr}
5310: e1a05000 mov r5, r0
5314: e1a04002 mov r4, r2
5318: e1a07001 mov r7, r1
/* Add this to the RTEMS environment later ?????????
rtems_assert( initial_lock == CORE_MUTEX_LOCKED ||
initial_lock == CORE_MUTEX_UNLOCKED );
*/
the_mutex->Attributes = *the_mutex_attributes;
531c: e891000f ldm r1, {r0, r1, r2, r3}
the_mutex->lock = initial_lock;
the_mutex->blocked_count = 0;
5320: e3a06000 mov r6, #0 ; 0x0
if ( initial_lock == CORE_MUTEX_LOCKED ) {
5324: e3540000 cmp r4, #0 ; 0x0
/* Add this to the RTEMS environment later ?????????
rtems_assert( initial_lock == CORE_MUTEX_LOCKED ||
initial_lock == CORE_MUTEX_UNLOCKED );
*/
the_mutex->Attributes = *the_mutex_attributes;
5328: e285c040 add ip, r5, #64 ; 0x40
532c: e88c000f stm ip, {r0, r1, r2, r3}
the_mutex->lock = initial_lock;
5330: e5854050 str r4, [r5, #80]
the_mutex->blocked_count = 0;
5334: e5856058 str r6, [r5, #88]
_Thread_Executing->resource_count++;
}
} else {
the_mutex->nest_count = 0;
the_mutex->holder = NULL;
the_mutex->holder_id = 0;
5338: 15856060 strne r6, [r5, #96]
#endif
_Thread_Executing->resource_count++;
}
} else {
the_mutex->nest_count = 0;
533c: 15856054 strne r6, [r5, #84]
the_mutex->holder = NULL;
5340: 1585605c strne r6, [r5, #92]
the_mutex->Attributes = *the_mutex_attributes;
the_mutex->lock = initial_lock;
the_mutex->blocked_count = 0;
if ( initial_lock == CORE_MUTEX_LOCKED ) {
5344: 1a00000b bne 5378 <_CORE_mutex_Initialize+0x6c>
the_mutex->nest_count = 1;
the_mutex->holder = _Thread_Executing;
5348: e59f2070 ldr r2, [pc, #112] ; 53c0 <_CORE_mutex_Initialize+0xb4>
the_mutex->Attributes = *the_mutex_attributes;
the_mutex->lock = initial_lock;
the_mutex->blocked_count = 0;
if ( initial_lock == CORE_MUTEX_LOCKED ) {
the_mutex->nest_count = 1;
534c: e3a03001 mov r3, #1 ; 0x1
the_mutex->holder = _Thread_Executing;
5350: e5921000 ldr r1, [r2]
the_mutex->Attributes = *the_mutex_attributes;
the_mutex->lock = initial_lock;
the_mutex->blocked_count = 0;
if ( initial_lock == CORE_MUTEX_LOCKED ) {
the_mutex->nest_count = 1;
5354: e5853054 str r3, [r5, #84]
*/
RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority(
CORE_mutex_Attributes *the_attribute
)
{
return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
5358: e5952048 ldr r2, [r5, #72]
the_mutex->holder = _Thread_Executing;
the_mutex->holder_id = _Thread_Executing->Object.id;
535c: e5913008 ldr r3, [r1, #8]
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
5360: e3520002 cmp r2, #2 ; 0x2
the_mutex->blocked_count = 0;
if ( initial_lock == CORE_MUTEX_LOCKED ) {
the_mutex->nest_count = 1;
the_mutex->holder = _Thread_Executing;
the_mutex->holder_id = _Thread_Executing->Object.id;
5364: e5853060 str r3, [r5, #96]
the_mutex->lock = initial_lock;
the_mutex->blocked_count = 0;
if ( initial_lock == CORE_MUTEX_LOCKED ) {
the_mutex->nest_count = 1;
the_mutex->holder = _Thread_Executing;
5368: e585105c str r1, [r5, #92]
the_mutex->holder_id = _Thread_Executing->Object.id;
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
536c: 0a00000a beq 539c <_CORE_mutex_Initialize+0x90>
5370: e3520003 cmp r2, #3 ; 0x3
5374: 0a000008 beq 539c <_CORE_mutex_Initialize+0x90>
the_mutex->nest_count = 0;
the_mutex->holder = NULL;
the_mutex->holder_id = 0;
}
_Thread_queue_Initialize(
5378: e5971008 ldr r1, [r7, #8]
537c: e1a00005 mov r0, r5
5380: e2511000 subs r1, r1, #0 ; 0x0
5384: 13a01001 movne r1, #1 ; 0x1
5388: e3a02b01 mov r2, #1024 ; 0x400
538c: e3a03005 mov r3, #5 ; 0x5
5390: eb000768 bl 7138 <_Thread_queue_Initialize>
5394: e3a00000 mov r0, #0 ; 0x0
STATES_WAITING_FOR_MUTEX,
CORE_MUTEX_TIMEOUT
);
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
5398: e8bd80f0 pop {r4, r5, r6, r7, pc}
the_mutex->holder = _Thread_Executing;
the_mutex->holder_id = _Thread_Executing->Object.id;
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
if ( _Thread_Executing->current_priority <
539c: e595304c ldr r3, [r5, #76]
53a0: e5912014 ldr r2, [r1, #20]
53a4: e1520003 cmp r2, r3
_Chain_Prepend_unprotected( &_Thread_Executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = _Thread_Executing->current_priority;
#endif
_Thread_Executing->resource_count++;
53a8: 2591301c ldrcs r3, [r1, #28]
53ac: 22833001 addcs r3, r3, #1 ; 0x1
the_mutex->holder = _Thread_Executing;
the_mutex->holder_id = _Thread_Executing->Object.id;
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
if ( _Thread_Executing->current_priority <
53b0: 33a00006 movcc r0, #6 ; 0x6
_Chain_Prepend_unprotected( &_Thread_Executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = _Thread_Executing->current_priority;
#endif
_Thread_Executing->resource_count++;
53b4: 2581301c strcs r3, [r1, #28]
the_mutex->holder = _Thread_Executing;
the_mutex->holder_id = _Thread_Executing->Object.id;
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
if ( _Thread_Executing->current_priority <
53b8: 2affffee bcs 5378 <_CORE_mutex_Initialize+0x6c>
53bc: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
0000a760 <_CORE_mutex_Seize_interrupt_trylock>:
Thread_Control *executing;
ISR_Level level = *level_p;
/* disabled when you get here */
executing = _Thread_Executing;
a760: e59f313c ldr r3, [pc, #316] ; a8a4 <_CORE_mutex_Seize_interrupt_trylock+0x144>
a764: e593c000 ldr ip, [r3]
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
a768: e3a02000 mov r2, #0 ; 0x0
#if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__)
int _CORE_mutex_Seize_interrupt_trylock(
CORE_mutex_Control *the_mutex,
ISR_Level *level_p
)
{
a76c: e92d4010 push {r4, lr}
CORE_mutex_Control *the_mutex,
ISR_Level *level_p
)
{
Thread_Control *executing;
ISR_Level level = *level_p;
a770: e5914000 ldr r4, [r1]
/* disabled when you get here */
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
a774: e58c2034 str r2, [ip, #52]
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
a778: e5903050 ldr r3, [r0, #80]
a77c: e1530002 cmp r3, r2
a780: 0a00000d beq a7bc <_CORE_mutex_Seize_interrupt_trylock+0x5c>
the_mutex->lock = CORE_MUTEX_LOCKED;
a784: e5802050 str r2, [r0, #80]
*/
RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority(
CORE_mutex_Attributes *the_attribute
)
{
return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
a788: e5901048 ldr r1, [r0, #72]
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;
the_mutex->holder_id = executing->Object.id;
a78c: e59c2008 ldr r2, [ip, #8]
the_mutex->nest_count = 1;
a790: e3a03001 mov r3, #1 ; 0x1
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
a794: e3510002 cmp r1, #2 ; 0x2
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;
the_mutex->holder_id = executing->Object.id;
a798: e5802060 str r2, [r0, #96]
the_mutex->nest_count = 1;
a79c: e5803054 str r3, [r0, #84]
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;
a7a0: e580c05c str ip, [r0, #92]
the_mutex->holder_id = executing->Object.id;
the_mutex->nest_count = 1;
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
a7a4: 0a000009 beq a7d0 <_CORE_mutex_Seize_interrupt_trylock+0x70>
a7a8: e3510003 cmp r1, #3 ; 0x3
a7ac: 0a000007 beq a7d0 <_CORE_mutex_Seize_interrupt_trylock+0x70>
executing->resource_count++;
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
_ISR_Enable( level );
a7b0: e129f004 msr CPSR_fc, r4
a7b4: e3a00000 mov r0, #0 ; 0x0
a7b8: 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 ) ) {
a7bc: e590305c ldr r3, [r0, #92]
a7c0: e15c0003 cmp ip, r3
a7c4: 0a000017 beq a828 <_CORE_mutex_Seize_interrupt_trylock+0xc8>
the_mutex->nest_count++;
_ISR_Enable( level );
return 0;
case CORE_MUTEX_NESTING_IS_ERROR:
executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED;
_ISR_Enable( level );
a7c8: e3a00001 mov r0, #1 ; 0x1
return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p );
}
a7cc: e8bd8010 pop {r4, pc}
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
a7d0: e59c301c ldr r3, [ip, #28]
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
a7d4: e3510003 cmp r1, #3 ; 0x3
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
a7d8: e2833001 add r3, r3, #1 ; 0x1
a7dc: e58c301c str r3, [ip, #28]
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
a7e0: 1afffff2 bne a7b0 <_CORE_mutex_Seize_interrupt_trylock+0x50>
*/
{
Priority_Control ceiling;
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
a7e4: e590204c ldr r2, [r0, #76]
current = executing->current_priority;
a7e8: e59c3014 ldr r3, [ip, #20]
if ( current == ceiling ) {
a7ec: e1520003 cmp r2, r3
a7f0: 0a00001c beq a868 <_CORE_mutex_Seize_interrupt_trylock+0x108>
_ISR_Enable( level );
return 0;
}
if ( current > ceiling ) {
a7f4: 3a00001e bcc a874 <_CORE_mutex_Seize_interrupt_trylock+0x114>
);
_Thread_Enable_dispatch();
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
a7f8: e3a03006 mov r3, #6 ; 0x6 <== NOT EXECUTED
the_mutex->lock = CORE_MUTEX_UNLOCKED;
the_mutex->nest_count = 0; /* undo locking above */
a7fc: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED
_Thread_Enable_dispatch();
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
the_mutex->lock = CORE_MUTEX_UNLOCKED;
a800: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED
);
_Thread_Enable_dispatch();
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
a804: e58c3034 str r3, [ip, #52] <== NOT EXECUTED
the_mutex->lock = CORE_MUTEX_UNLOCKED;
the_mutex->nest_count = 0; /* undo locking above */
a808: e5802054 str r2, [r0, #84] <== NOT EXECUTED
_Thread_Enable_dispatch();
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
the_mutex->lock = CORE_MUTEX_UNLOCKED;
a80c: e5801050 str r1, [r0, #80] <== NOT EXECUTED
the_mutex->nest_count = 0; /* undo locking above */
executing->resource_count--; /* undo locking above */
a810: e59c301c ldr r3, [ip, #28] <== NOT EXECUTED
a814: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED
a818: e58c301c str r3, [ip, #28] <== NOT EXECUTED
_ISR_Enable( level );
a81c: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED
a820: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
a824: e8bd8010 pop {r4, pc} <== NOT EXECUTED
* 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 ) ) {
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
a828: e5903040 ldr r3, [r0, #64]
a82c: e3530000 cmp r3, #0 ; 0x0
a830: 0a000006 beq a850 <_CORE_mutex_Seize_interrupt_trylock+0xf0>
a834: e3530001 cmp r3, #1 ; 0x1
a838: 1affffe2 bne a7c8 <_CORE_mutex_Seize_interrupt_trylock+0x68>
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
_ISR_Enable( level );
return 0;
case CORE_MUTEX_NESTING_IS_ERROR:
executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED;
a83c: e3a03002 mov r3, #2 ; 0x2
a840: e58c3034 str r3, [ip, #52]
_ISR_Enable( level );
a844: e129f004 msr CPSR_fc, r4
a848: e3a00000 mov r0, #0 ; 0x0
a84c: e8bd8010 pop {r4, pc}
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
a850: e5903054 ldr r3, [r0, #84]
a854: e2833001 add r3, r3, #1 ; 0x1
a858: e5803054 str r3, [r0, #84]
_ISR_Enable( level );
a85c: e129f004 msr CPSR_fc, r4
a860: e3a00000 mov r0, #0 ; 0x0
a864: e8bd8010 pop {r4, pc}
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
current = executing->current_priority;
if ( current == ceiling ) {
_ISR_Enable( level );
a868: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED
a86c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
a870: e8bd8010 pop {r4, pc} <== NOT EXECUTED
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a874: e59f202c ldr r2, [pc, #44] ; a8a8 <_CORE_mutex_Seize_interrupt_trylock+0x148>
a878: e5923000 ldr r3, [r2]
a87c: e2833001 add r3, r3, #1 ; 0x1
a880: e5823000 str r3, [r2]
return 0;
}
if ( current > ceiling ) {
_Thread_Disable_dispatch();
_ISR_Enable( level );
a884: e129f004 msr CPSR_fc, r4
_Thread_Change_priority(
a888: e3a02000 mov r2, #0 ; 0x0
a88c: e590104c ldr r1, [r0, #76]
a890: e590005c ldr r0, [r0, #92]
a894: ebffeea1 bl 6320 <_Thread_Change_priority>
the_mutex->holder,
the_mutex->Attributes.priority_ceiling,
FALSE
);
_Thread_Enable_dispatch();
a898: ebfff012 bl 68e8 <_Thread_Enable_dispatch>
a89c: e3a00000 mov r0, #0 ; 0x0
a8a0: e8bd8010 pop {r4, pc}
000054fc <_CORE_mutex_Surrender>:
* 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 ) {
54fc: e5d03044 ldrb r3, [r0, #68]
5500: e3530000 cmp r3, #0 ; 0x0
CORE_mutex_Status _CORE_mutex_Surrender(
CORE_mutex_Control *the_mutex,
Objects_Id id,
CORE_mutex_API_mp_support_callout api_mutex_mp_support
)
{
5504: e92d4010 push {r4, lr}
5508: e1a04000 mov r4, r0
Thread_Control *the_thread;
Thread_Control *holder;
#ifdef __RTEMS_STRICT_ORDER_MUTEX__
Chain_Node *first_node;
#endif
holder = the_mutex->holder;
550c: e590005c ldr r0, [r0, #92]
* 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 ) {
5510: 0a000004 beq 5528 <_CORE_mutex_Surrender+0x2c>
if ( !_Thread_Is_executing( holder ) )
5514: e59f3138 ldr r3, [pc, #312] ; 5654 <_CORE_mutex_Surrender+0x158>
5518: e5932000 ldr r2, [r3]
551c: e1500002 cmp r0, r2
5520: 13a00003 movne r0, #3 ; 0x3
5524: 18bd8010 popne {r4, pc}
return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE;
}
/* XXX already unlocked -- not right status */
if ( !the_mutex->nest_count )
5528: e5943054 ldr r3, [r4, #84]
552c: e3530000 cmp r3, #0 ; 0x0
5530: 0a000020 beq 55b8 <_CORE_mutex_Surrender+0xbc>
return CORE_MUTEX_STATUS_SUCCESSFUL;
the_mutex->nest_count--;
5534: e2433001 sub r3, r3, #1 ; 0x1
if ( the_mutex->nest_count != 0 ) {
5538: e3530000 cmp r3, #0 ; 0x0
/* XXX already unlocked -- not right status */
if ( !the_mutex->nest_count )
return CORE_MUTEX_STATUS_SUCCESSFUL;
the_mutex->nest_count--;
553c: e5843054 str r3, [r4, #84]
if ( the_mutex->nest_count != 0 ) {
5540: 1a00001e bne 55c0 <_CORE_mutex_Surrender+0xc4>
5544: e5942048 ldr r2, [r4, #72]
/*
* Formally release the mutex before possibly transferring it to a
* blocked thread.
*/
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
5548: e3520002 cmp r2, #2 ; 0x2
554c: 0a00002c beq 5604 <_CORE_mutex_Surrender+0x108>
5550: e3520003 cmp r2, #3 ; 0x3
5554: 0a00002a beq 5604 <_CORE_mutex_Surrender+0x108>
}
first_node = _Chain_Get_first_unprotected(&holder->lock_mutex);
#endif
holder->resource_count--;
}
the_mutex->holder = NULL;
5558: e3a03000 mov r3, #0 ; 0x0
/*
* 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 ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
555c: e3520002 cmp r2, #2 ; 0x2
first_node = _Chain_Get_first_unprotected(&holder->lock_mutex);
#endif
holder->resource_count--;
}
the_mutex->holder = NULL;
the_mutex->holder_id = 0;
5560: e5843060 str r3, [r4, #96]
}
first_node = _Chain_Get_first_unprotected(&holder->lock_mutex);
#endif
holder->resource_count--;
}
the_mutex->holder = NULL;
5564: e584305c str r3, [r4, #92]
/*
* 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 ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
5568: 0a00001b beq 55dc <_CORE_mutex_Surrender+0xe0>
556c: e3520003 cmp r2, #3 ; 0x3
5570: 0a000019 beq 55dc <_CORE_mutex_Surrender+0xe0>
/*
* 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 ) ) ) {
5574: e1a00004 mov r0, r4
5578: eb0005c0 bl 6c80 <_Thread_queue_Dequeue>
557c: e2501000 subs r1, r0, #0 ; 0x0
}
break;
}
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
5580: 03a03001 moveq r3, #1 ; 0x1
5584: 05843050 streq r3, [r4, #80]
5588: 01a00001 moveq r0, r1
/*
* 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 ) ) ) {
558c: 08bd8010 popeq {r4, pc}
the_mutex->holder = the_thread;
the_mutex->holder_id = the_thread->Object.id;
the_mutex->nest_count = 1;
switch ( the_mutex->Attributes.discipline ) {
5590: e594c048 ldr ip, [r4, #72]
} else
#endif
{
the_mutex->holder = the_thread;
the_mutex->holder_id = the_thread->Object.id;
5594: e5912008 ldr r2, [r1, #8]
the_mutex->nest_count = 1;
5598: e3a03001 mov r3, #1 ; 0x1
switch ( the_mutex->Attributes.discipline ) {
559c: e35c0002 cmp ip, #2 ; 0x2
} else
#endif
{
the_mutex->holder = the_thread;
the_mutex->holder_id = the_thread->Object.id;
55a0: e5842060 str r2, [r4, #96]
the_mutex->nest_count = 1;
55a4: e5843054 str r3, [r4, #84]
} else
#endif
{
the_mutex->holder = the_thread;
55a8: e584105c str r1, [r4, #92]
the_mutex->holder_id = the_thread->Object.id;
the_mutex->nest_count = 1;
switch ( the_mutex->Attributes.discipline ) {
55ac: 0a000023 beq 5640 <_CORE_mutex_Surrender+0x144>
55b0: e35c0003 cmp ip, #3 ; 0x3
55b4: 0a000016 beq 5614 <_CORE_mutex_Surrender+0x118>
}
break;
}
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
55b8: e3a00000 mov r0, #0 ; 0x0
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
55bc: e8bd8010 pop {r4, pc}
return CORE_MUTEX_STATUS_SUCCESSFUL;
the_mutex->nest_count--;
if ( the_mutex->nest_count != 0 ) {
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
55c0: e5943040 ldr r3, [r4, #64]
55c4: e3530000 cmp r3, #0 ; 0x0
55c8: 0afffffa beq 55b8 <_CORE_mutex_Surrender+0xbc>
55cc: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED
55d0: 03a00002 moveq r0, #2 ; 0x2 <== NOT EXECUTED
55d4: 1affffda bne 5544 <_CORE_mutex_Surrender+0x48> <== NOT EXECUTED
55d8: e8bd8010 pop {r4, pc} <== NOT EXECUTED
_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
#ifdef __RTEMS_STRICT_ORDER_MUTEX__
if(the_mutex->queue.priority_before != holder->current_priority)
_Thread_Change_priority(holder,the_mutex->queue.priority_before,TRUE);
#endif
if ( holder->resource_count == 0 &&
55dc: e590301c ldr r3, [r0, #28]
55e0: e3530000 cmp r3, #0 ; 0x0
55e4: 1affffe2 bne 5574 <_CORE_mutex_Surrender+0x78>
55e8: e5901018 ldr r1, [r0, #24]
55ec: e5903014 ldr r3, [r0, #20]
55f0: e1510003 cmp r1, r3
55f4: 0affffde beq 5574 <_CORE_mutex_Surrender+0x78>
holder->real_priority != holder->current_priority ) {
_Thread_Change_priority( holder, holder->real_priority, TRUE );
55f8: e3a02001 mov r2, #1 ; 0x1
55fc: eb000347 bl 6320 <_Thread_Change_priority>
5600: eaffffdb b 5574 <_CORE_mutex_Surrender+0x78>
the_mutex->nest_count++;
return CORE_MUTEX_RELEASE_NOT_ORDER;
}
first_node = _Chain_Get_first_unprotected(&holder->lock_mutex);
#endif
holder->resource_count--;
5604: e590301c ldr r3, [r0, #28]
5608: e2433001 sub r3, r3, #1 ; 0x1
560c: e580301c str r3, [r0, #28]
5610: eaffffd0 b 5558 <_CORE_mutex_Surrender+0x5c>
case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING:
#ifdef __RTEMS_STRICT_ORDER_MUTEX__
_Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue);
the_mutex->queue.priority_before = the_thread->current_priority;
#endif
the_thread->resource_count++;
5614: e591301c ldr r3, [r1, #28] <== NOT EXECUTED
5618: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED
561c: e581301c str r3, [r1, #28] <== NOT EXECUTED
if (the_mutex->Attributes.priority_ceiling <
5620: e5912014 ldr r2, [r1, #20] <== NOT EXECUTED
5624: e594104c ldr r1, [r4, #76] <== NOT EXECUTED
5628: e1510002 cmp r1, r2 <== NOT EXECUTED
562c: 2affffe1 bcs 55b8 <_CORE_mutex_Surrender+0xbc> <== NOT EXECUTED
the_thread->current_priority){
_Thread_Change_priority(
5630: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED
5634: eb000339 bl 6320 <_Thread_Change_priority> <== NOT EXECUTED
5638: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
563c: e8bd8010 pop {r4, pc} <== NOT EXECUTED
case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT:
#ifdef __RTEMS_STRICT_ORDER_MUTEX__
_Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue);
the_mutex->queue.priority_before = the_thread->current_priority;
#endif
the_thread->resource_count++;
5640: e591301c ldr r3, [r1, #28]
5644: e2833001 add r3, r3, #1 ; 0x1
5648: e581301c str r3, [r1, #28]
564c: e3a00000 mov r0, #0 ; 0x0
5650: e8bd8010 pop {r4, pc}
00005f54 <_CORE_spinlock_Release>:
CORE_spinlock_Control *the_spinlock
)
{
ISR_Level level;
_ISR_Disable( level );
5f54: e10fc000 mrs ip, CPSR
5f58: e38c30c0 orr r3, ip, #192 ; 0xc0
5f5c: e129f003 msr CPSR_fc, r3
/*
* It must locked before it can be unlocked.
*/
if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) {
5f60: e5903004 ldr r3, [r0, #4]
5f64: e3530000 cmp r3, #0 ; 0x0
5f68: 1a000002 bne 5f78 <_CORE_spinlock_Release+0x24>
_ISR_Enable( level );
5f6c: e129f00c msr CPSR_fc, ip
5f70: e3a00006 mov r0, #6 ; 0x6
5f74: e12fff1e bx lr
}
/*
* It must locked by the current thread before it can be unlocked.
*/
if ( the_spinlock->holder != _Thread_Executing->Object.id ) {
5f78: e59f3040 ldr r3, [pc, #64] ; 5fc0 <_CORE_spinlock_Release+0x6c>
5f7c: e5932000 ldr r2, [r3]
5f80: e590300c ldr r3, [r0, #12]
5f84: e5921008 ldr r1, [r2, #8]
5f88: e1530001 cmp r3, r1
5f8c: 0a000002 beq 5f9c <_CORE_spinlock_Release+0x48>
_ISR_Enable( level );
5f90: e129f00c msr CPSR_fc, ip <== NOT EXECUTED
5f94: e3a00002 mov r0, #2 ; 0x2 <== NOT EXECUTED
5f98: e12fff1e bx lr <== NOT EXECUTED
}
/*
* Let it be unlocked.
*/
the_spinlock->users -= 1;
5f9c: e5903008 ldr r3, [r0, #8]
the_spinlock->lock = CORE_SPINLOCK_UNLOCKED;
5fa0: e3a02000 mov r2, #0 ; 0x0
}
/*
* Let it be unlocked.
*/
the_spinlock->users -= 1;
5fa4: e2433001 sub r3, r3, #1 ; 0x1
5fa8: e5803008 str r3, [r0, #8]
the_spinlock->lock = CORE_SPINLOCK_UNLOCKED;
5fac: e5802004 str r2, [r0, #4]
the_spinlock->holder = 0;
5fb0: e580200c str r2, [r0, #12]
_ISR_Enable( level );
5fb4: e129f00c msr CPSR_fc, ip
5fb8: e3a00000 mov r0, #0 ; 0x0
return CORE_SPINLOCK_SUCCESSFUL;
}
5fbc: e12fff1e bx lr
00005fc4 <_CORE_spinlock_Wait>:
CORE_spinlock_Status _CORE_spinlock_Wait(
CORE_spinlock_Control *the_spinlock,
bool wait,
Watchdog_Interval timeout
)
{
5fc4: e92d41f0 push {r4, r5, r6, r7, r8, lr}
ISR_Level level;
Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout;
5fc8: e59f8104 ldr r8, [pc, #260] ; 60d4 <_CORE_spinlock_Wait+0x110>
5fcc: e5983000 ldr r3, [r8]
CORE_spinlock_Status _CORE_spinlock_Wait(
CORE_spinlock_Control *the_spinlock,
bool wait,
Watchdog_Interval timeout
)
{
5fd0: e1a06002 mov r6, r2
5fd4: e1a04000 mov r4, r0
5fd8: e201c0ff and ip, r1, #255 ; 0xff
ISR_Level level;
Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout;
5fdc: e0827003 add r7, r2, r3
_ISR_Disable( level );
5fe0: e10f0000 mrs r0, CPSR
5fe4: e38030c0 orr r3, r0, #192 ; 0xc0
5fe8: e129f003 msr CPSR_fc, r3
if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) &&
5fec: e5943004 ldr r3, [r4, #4]
5ff0: e3530001 cmp r3, #1 ; 0x1
5ff4: 0a000027 beq 6098 <_CORE_spinlock_Wait+0xd4>
(the_spinlock->holder == _Thread_Executing->Object.id) ) {
_ISR_Enable( level );
return CORE_SPINLOCK_HOLDER_RELOCKING;
}
the_spinlock->users += 1;
5ff8: e5943008 ldr r3, [r4, #8]
5ffc: e2833001 add r3, r3, #1 ; 0x1
6000: e5843008 str r3, [r4, #8]
for ( ;; ) {
if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) {
6004: e5942004 ldr r2, [r4, #4]
6008: e3520000 cmp r2, #0 ; 0x0
600c: 0a000012 beq 605c <_CORE_spinlock_Wait+0x98>
}
/*
* Spinlock is unavailable. If not willing to wait, return.
*/
if ( !wait ) {
6010: e35c0000 cmp ip, #0 ; 0x0
6014: 159f50bc ldrne r5, [pc, #188] ; 60d8 <_CORE_spinlock_Wait+0x114>
6018: 0a000018 beq 6080 <_CORE_spinlock_Wait+0xbc>
}
/*
* They are willing to wait but there could be a timeout.
*/
if ( timeout && (limit <= _Watchdog_Ticks_since_boot) ) {
601c: e3560000 cmp r6, #0 ; 0x0
6020: 0a000002 beq 6030 <_CORE_spinlock_Wait+0x6c>
6024: e5983000 ldr r3, [r8] <== NOT EXECUTED
6028: e1570003 cmp r7, r3 <== NOT EXECUTED
602c: 9a000022 bls 60bc <_CORE_spinlock_Wait+0xf8> <== NOT EXECUTED
*
* A spinlock cannot be deleted while it is being used so we are
* safe from deletion.
*/
_ISR_Enable( level );
6030: e129f000 msr CPSR_fc, r0
/* An ISR could occur here */
_Thread_Enable_dispatch();
6034: eb000489 bl 7260 <_Thread_Enable_dispatch>
6038: e5953000 ldr r3, [r5]
603c: e2833001 add r3, r3, #1 ; 0x1
6040: e5853000 str r3, [r5]
/* Another thread could get dispatched here */
/* Reenter the critical sections so we can attempt the lock again. */
_Thread_Disable_dispatch();
_ISR_Disable( level );
6044: e10f0000 mrs r0, CPSR
6048: e38030c0 orr r3, r0, #192 ; 0xc0
604c: e129f003 msr CPSR_fc, r3
_ISR_Enable( level );
return CORE_SPINLOCK_HOLDER_RELOCKING;
}
the_spinlock->users += 1;
for ( ;; ) {
if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) {
6050: e5943004 ldr r3, [r4, #4]
6054: e3530000 cmp r3, #0 ; 0x0
6058: 1affffef bne 601c <_CORE_spinlock_Wait+0x58>
the_spinlock->lock = CORE_SPINLOCK_LOCKED;
the_spinlock->holder = _Thread_Executing->Object.id;
605c: e59f2078 ldr r2, [pc, #120] ; 60dc <_CORE_spinlock_Wait+0x118>
return CORE_SPINLOCK_HOLDER_RELOCKING;
}
the_spinlock->users += 1;
for ( ;; ) {
if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) {
the_spinlock->lock = CORE_SPINLOCK_LOCKED;
6060: e3a03001 mov r3, #1 ; 0x1
6064: e5843004 str r3, [r4, #4]
the_spinlock->holder = _Thread_Executing->Object.id;
6068: e5923000 ldr r3, [r2]
606c: e5931008 ldr r1, [r3, #8]
6070: e584100c str r1, [r4, #12]
_ISR_Enable( level );
6074: e129f000 msr CPSR_fc, r0
6078: e3a00000 mov r0, #0 ; 0x0
607c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
/*
* Spinlock is unavailable. If not willing to wait, return.
*/
if ( !wait ) {
the_spinlock->users -= 1;
6080: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
6084: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED
6088: e5843008 str r3, [r4, #8] <== NOT EXECUTED
_ISR_Enable( level );
608c: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED
6090: e3a00005 mov r0, #5 ; 0x5 <== NOT EXECUTED
6094: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
{
ISR_Level level;
Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout;
_ISR_Disable( level );
if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) &&
6098: e59f303c ldr r3, [pc, #60] ; 60dc <_CORE_spinlock_Wait+0x118>
609c: e5932000 ldr r2, [r3]
60a0: e594300c ldr r3, [r4, #12]
60a4: e5921008 ldr r1, [r2, #8]
60a8: e1530001 cmp r3, r1
60ac: 1affffd1 bne 5ff8 <_CORE_spinlock_Wait+0x34>
(the_spinlock->holder == _Thread_Executing->Object.id) ) {
_ISR_Enable( level );
60b0: e129f000 msr CPSR_fc, r0
60b4: e3a00001 mov r0, #1 ; 0x1
60b8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
/*
* They are willing to wait but there could be a timeout.
*/
if ( timeout && (limit <= _Watchdog_Ticks_since_boot) ) {
the_spinlock->users -= 1;
60bc: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
60c0: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED
60c4: e5843008 str r3, [r4, #8] <== NOT EXECUTED
_ISR_Enable( level );
60c8: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED
60cc: e3a00003 mov r0, #3 ; 0x3 <== NOT EXECUTED
60d0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
0000a640 <_Debug_Is_enabled>:
*/
bool _Debug_Is_enabled(
rtems_debug_control level
)
{
a640: e59f3010 ldr r3, [pc, #16] ; a658 <_Debug_Is_enabled+0x18> <== NOT EXECUTED
a644: e5932000 ldr r2, [r3] <== NOT EXECUTED
a648: e1100002 tst r0, r2 <== NOT EXECUTED
return (_Debug_Level & level) ? true : false;
}
a64c: 03a00000 moveq r0, #0 ; 0x0 <== NOT EXECUTED
a650: 13a00001 movne r0, #1 ; 0x1 <== NOT EXECUTED
a654: e12fff1e bx lr <== NOT EXECUTED
0000a170 <_Dual_ported_memory_Manager_initialization>:
*/
void _Dual_ported_memory_Manager_initialization(
uint32_t maximum_ports
)
{
a170: e52de004 push {lr} ; (str lr, [sp, #-4]!)
_Objects_Initialize_information(
a174: e3a0c01c mov ip, #28 ; 0x1c
*/
void _Dual_ported_memory_Manager_initialization(
uint32_t maximum_ports
)
{
a178: e24dd00c sub sp, sp, #12 ; 0xc
a17c: e1a03000 mov r3, r0
_Objects_Initialize_information(
a180: e58dc000 str ip, [sp]
a184: e3a0e000 mov lr, #0 ; 0x0
a188: e24cc018 sub ip, ip, #24 ; 0x18
a18c: e59f0018 ldr r0, [pc, #24] ; a1ac <_Dual_ported_memory_Manager_initialization+0x3c>
a190: e3a01002 mov r1, #2 ; 0x2
a194: e3a02007 mov r2, #7 ; 0x7
a198: e58de004 str lr, [sp, #4]
a19c: e58dc008 str ip, [sp, #8]
a1a0: ebffefa8 bl 6048 <_Objects_Initialize_information>
,
FALSE, /* TRUE if this is a global object class */
NULL /* Proxy extraction support callout */
#endif
);
}
a1a4: e28dd00c add sp, sp, #12 ; 0xc
a1a8: e8bd8000 pop {pc}
000041e4 <_Event_Seize>:
rtems_event_set pending_events;
ISR_Level level;
RTEMS_API_Control *api;
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
41e4: e59fc108 ldr ip, [pc, #264] ; 42f4 <_Event_Seize+0x110> <== NOT EXECUTED
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
41e8: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
rtems_event_set pending_events;
ISR_Level level;
RTEMS_API_Control *api;
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
41ec: e59c5000 ldr r5, [ip] <== NOT EXECUTED
executing->Wait.return_code = RTEMS_SUCCESSFUL;
41f0: e3a04000 mov r4, #0 ; 0x0 <== NOT EXECUTED
41f4: e5854034 str r4, [r5, #52] <== NOT EXECUTED
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
41f8: e1a08002 mov r8, r2 <== NOT EXECUTED
41fc: e1a07003 mov r7, r3 <== NOT EXECUTED
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
executing->Wait.return_code = RTEMS_SUCCESSFUL;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
4200: e5954104 ldr r4, [r5, #260] <== NOT EXECUTED
_ISR_Disable( level );
4204: e10f6000 mrs r6, CPSR <== NOT EXECUTED
4208: e38630c0 orr r3, r6, #192 ; 0xc0 <== NOT EXECUTED
420c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
pending_events = api->pending_events;
4210: e5942000 ldr r2, [r4] <== NOT EXECUTED
seized_events = _Event_sets_Get( pending_events, event_in );
if ( !_Event_sets_Is_empty( seized_events ) &&
4214: e010c002 ands ip, r0, r2 <== NOT EXECUTED
4218: 0a000003 beq 422c <_Event_Seize+0x48> <== NOT EXECUTED
421c: e150000c cmp r0, ip <== NOT EXECUTED
4220: 0a00001f beq 42a4 <_Event_Seize+0xc0> <== NOT EXECUTED
4224: e3110002 tst r1, #2 ; 0x2 <== NOT EXECUTED
4228: 1a00001d bne 42a4 <_Event_Seize+0xc0> <== NOT EXECUTED
_ISR_Enable( level );
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
422c: e3110001 tst r1, #1 ; 0x1 <== NOT EXECUTED
4230: 1a000016 bne 4290 <_Event_Seize+0xac> <== NOT EXECUTED
executing->Wait.return_code = RTEMS_UNSATISFIED;
*event_out = seized_events;
return;
}
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
4234: e59f40bc ldr r4, [pc, #188] ; 42f8 <_Event_Seize+0x114> <== NOT EXECUTED
4238: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED
423c: e5843000 str r3, [r4] <== NOT EXECUTED
executing->Wait.option = (uint32_t) option_set;
4240: e5851030 str r1, [r5, #48] <== NOT EXECUTED
executing->Wait.count = (uint32_t) event_in;
4244: e5850024 str r0, [r5, #36] <== NOT EXECUTED
executing->Wait.return_argument = event_out;
4248: e5857028 str r7, [r5, #40] <== NOT EXECUTED
_ISR_Enable( level );
424c: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED
if ( ticks ) {
4250: e3580000 cmp r8, #0 ; 0x0 <== NOT EXECUTED
4254: 1a00001a bne 42c4 <_Event_Seize+0xe0> <== NOT EXECUTED
NULL
);
_Watchdog_Insert_ticks( &executing->Timer, ticks );
}
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
4258: e1a00005 mov r0, r5 <== NOT EXECUTED
425c: e3a01c01 mov r1, #256 ; 0x100 <== NOT EXECUTED
4260: eb000c24 bl 72f8 <_Thread_Set_state> <== NOT EXECUTED
_ISR_Disable( level );
4264: e10f2000 mrs r2, CPSR <== NOT EXECUTED
4268: e38230c0 orr r3, r2, #192 ; 0xc0 <== NOT EXECUTED
426c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
sync_state = _Event_Sync_state;
4270: e5940000 ldr r0, [r4] <== NOT EXECUTED
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
4274: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
4278: e3500001 cmp r0, #1 ; 0x1 <== NOT EXECUTED
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
_ISR_Disable( level );
sync_state = _Event_Sync_state;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
427c: e5843000 str r3, [r4] <== NOT EXECUTED
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
4280: 0a00000d beq 42bc <_Event_Seize+0xd8> <== 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 );
4284: e1a01005 mov r1, r5 <== NOT EXECUTED
}
4288: e8bd41f0 pop {r4, r5, r6, r7, r8, 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 );
428c: ea00080f b 62d0 <_Thread_blocking_operation_Cancel> <== NOT EXECUTED
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
_ISR_Enable( level );
4290: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED
executing->Wait.return_code = RTEMS_UNSATISFIED;
4294: e3a0300d mov r3, #13 ; 0xd <== NOT EXECUTED
4298: e5853034 str r3, [r5, #52] <== NOT EXECUTED
*event_out = seized_events;
429c: e587c000 str ip, [r7] <== NOT EXECUTED
42a0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
pending_events = api->pending_events;
seized_events = _Event_sets_Get( pending_events, event_in );
if ( !_Event_sets_Is_empty( seized_events ) &&
(seized_events == event_in || _Options_Is_any( option_set )) ) {
api->pending_events =
42a4: e1e0300c mvn r3, ip <== NOT EXECUTED
42a8: e0033002 and r3, r3, r2 <== NOT EXECUTED
42ac: e5843000 str r3, [r4] <== NOT EXECUTED
_Event_sets_Clear( pending_events, seized_events );
_ISR_Enable( level );
42b0: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED
*event_out = seized_events;
42b4: e587c000 str ip, [r7] <== NOT EXECUTED
42b8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
_ISR_Disable( level );
sync_state = _Event_Sync_state;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
_ISR_Enable( level );
42bc: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
42c0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
executing->Wait.return_argument = event_out;
_ISR_Enable( level );
if ( ticks ) {
_Watchdog_Initialize(
42c4: e5953008 ldr r3, [r5, #8] <== NOT EXECUTED
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
42c8: e59f202c ldr r2, [pc, #44] ; 42fc <_Event_Seize+0x118> <== NOT EXECUTED
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
42cc: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
42d0: e585106c str r1, [r5, #108] <== NOT EXECUTED
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
42d4: e5851050 str r1, [r5, #80] <== NOT EXECUTED
the_watchdog->routine = routine;
42d8: e5852064 str r2, [r5, #100] <== NOT EXECUTED
the_watchdog->id = id;
42dc: e5853068 str r3, [r5, #104] <== NOT EXECUTED
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
42e0: e5858054 str r8, [r5, #84] <== NOT EXECUTED
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
42e4: e59f0014 ldr r0, [pc, #20] ; 4300 <_Event_Seize+0x11c> <== NOT EXECUTED
42e8: e2851048 add r1, r5, #72 ; 0x48 <== NOT EXECUTED
42ec: eb000e03 bl 7b00 <_Watchdog_Insert> <== NOT EXECUTED
42f0: eaffffd8 b 4258 <_Event_Seize+0x74> <== NOT EXECUTED
0000435c <_Event_Surrender>:
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
435c: e92d41f0 push {r4, r5, r6, r7, r8, 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 ];
4360: e590c104 ldr ip, [r0, #260]
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
4364: e1a04000 mov r4, r0
rtems_option option_set;
RTEMS_API_Control *api;
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
option_set = (rtems_option) the_thread->Wait.option;
4368: e5907030 ldr r7, [r0, #48]
_ISR_Disable( level );
436c: e10f6000 mrs r6, CPSR
4370: e38630c0 orr r3, r6, #192 ; 0xc0
4374: e129f003 msr CPSR_fc, r3
pending_events = api->pending_events;
4378: e59c0000 ldr r0, [ip]
event_condition = (rtems_event_set) the_thread->Wait.count;
437c: e5941024 ldr r1, [r4, #36]
seized_events = _Event_sets_Get( pending_events, event_condition );
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
4380: e0115000 ands r5, r1, r0
4384: 0a000024 beq 441c <_Event_Surrender+0xc0>
/*
* 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() &&
4388: e59f3118 ldr r3, [pc, #280] ; 44a8 <_Event_Surrender+0x14c>
438c: e5932000 ldr r2, [r3]
4390: e3520000 cmp r2, #0 ; 0x0
4394: 0a000003 beq 43a8 <_Event_Surrender+0x4c>
4398: e59f310c ldr r3, [pc, #268] ; 44ac <_Event_Surrender+0x150>
439c: e5932000 ldr r2, [r3]
43a0: e1540002 cmp r4, r2
43a4: 0a000029 beq 4450 <_Event_Surrender+0xf4>
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
43a8: e5943010 ldr r3, [r4, #16]
43ac: e3130c01 tst r3, #256 ; 0x100
43b0: 0a000017 beq 4414 <_Event_Surrender+0xb8>
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
43b4: e1510005 cmp r1, r5
43b8: 0a000001 beq 43c4 <_Event_Surrender+0x68>
43bc: e3170002 tst r7, #2 ; 0x2
43c0: 0a000013 beq 4414 <_Event_Surrender+0xb8>
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
43c4: e1e03005 mvn r3, r5
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
43c8: e5941028 ldr r1, [r4, #40]
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
43cc: e0033000 and r3, r3, r0
the_thread->Wait.count = 0;
43d0: e3a02000 mov r2, #0 ; 0x0
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
43d4: e58c3000 str r3, [ip]
the_thread->Wait.count = 0;
43d8: e5842024 str r2, [r4, #36]
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
43dc: e5815000 str r5, [r1]
_ISR_Flash( level );
43e0: e10f3000 mrs r3, CPSR
43e4: e129f006 msr CPSR_fc, r6
43e8: e129f003 msr CPSR_fc, r3
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
43ec: e5943050 ldr r3, [r4, #80]
43f0: e3530002 cmp r3, #2 ; 0x2
43f4: 0a00000a beq 4424 <_Event_Surrender+0xc8>
_ISR_Enable( level );
43f8: e129f006 msr CPSR_fc, r6
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
43fc: e3a01201 mov r1, #268435456 ; 0x10000000
4400: e2811bff add r1, r1, #261120 ; 0x3fc00
4404: e1a00004 mov r0, r4
4408: e2811ffe add r1, r1, #1016 ; 0x3f8
}
return;
}
}
_ISR_Enable( level );
}
440c: e8bd41f0 pop {r4, r5, r6, r7, r8, lr}
4410: ea00082d b 64cc <_Thread_Clear_state>
_Thread_Unblock( the_thread );
}
return;
}
}
_ISR_Enable( level );
4414: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED
4418: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
_ISR_Enable( level );
441c: e129f006 msr CPSR_fc, r6
4420: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
4424: e3a03003 mov r3, #3 ; 0x3
4428: e5843050 str r3, [r4, #80]
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
442c: e129f006 msr CPSR_fc, r6
(void) _Watchdog_Remove( &the_thread->Timer );
4430: e2840048 add r0, r4, #72 ; 0x48
4434: eb000e20 bl 7cbc <_Watchdog_Remove>
4438: e3a01201 mov r1, #268435456 ; 0x10000000
443c: e2811bff add r1, r1, #261120 ; 0x3fc00
4440: e1a00004 mov r0, r4
4444: e2811ffe add r1, r1, #1016 ; 0x3f8
}
return;
}
}
_ISR_Enable( level );
}
4448: e8bd41f0 pop {r4, r5, r6, r7, r8, lr}
444c: ea00081e b 64cc <_Thread_Clear_state>
/*
* 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() &&
4450: e59f8058 ldr r8, [pc, #88] ; 44b0 <_Event_Surrender+0x154> <== NOT EXECUTED
4454: e5983000 ldr r3, [r8] <== NOT EXECUTED
4458: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED
445c: 0a000002 beq 446c <_Event_Surrender+0x110> <== NOT EXECUTED
4460: e5983000 ldr r3, [r8] <== NOT EXECUTED
4464: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED
4468: 1affffce bne 43a8 <_Event_Surrender+0x4c> <== NOT EXECUTED
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
446c: e1510005 cmp r1, r5 <== NOT EXECUTED
4470: 0a000001 beq 447c <_Event_Surrender+0x120> <== NOT EXECUTED
4474: e3170002 tst r7, #2 ; 0x2 <== NOT EXECUTED
4478: 0a000008 beq 44a0 <_Event_Surrender+0x144> <== NOT EXECUTED
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
447c: e1e03005 mvn r3, r5 <== NOT EXECUTED
4480: e0033000 and r3, r3, r0 <== NOT EXECUTED
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
4484: e5941028 ldr r1, [r4, #40] <== NOT EXECUTED
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
4488: e58c3000 str r3, [ip] <== NOT EXECUTED
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
448c: e3a02003 mov r2, #3 ; 0x3 <== NOT EXECUTED
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
the_thread->Wait.count = 0;
4490: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED
4494: e5843024 str r3, [r4, #36] <== NOT EXECUTED
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
4498: e5882000 str r2, [r8] <== NOT EXECUTED
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
449c: e5815000 str r5, [r1] <== NOT EXECUTED
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
}
_ISR_Enable( level );
44a0: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED
44a4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
000044b4 <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
44b4: e52de004 push {lr} ; (str lr, [sp, #-4]!)
44b8: e24dd004 sub sp, sp, #4 ; 0x4
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
44bc: e1a0100d mov r1, sp
44c0: eb000911 bl 690c <_Thread_Get>
switch ( location ) {
44c4: e59d1000 ldr r1, [sp]
44c8: e3510000 cmp r1, #0 ; 0x0
44cc: 1a000015 bne 4528 <_Event_Timeout+0x74>
* this is the "timeout" transition. After a request is satisfied,
* a timeout is not allowed to occur.
*/
_ISR_Disable( level );
44d0: e10fc000 mrs ip, CPSR
44d4: e38c30c0 orr r3, ip, #192 ; 0xc0
44d8: e129f003 msr CPSR_fc, r3
if ( !the_thread->Wait.count ) { /* verify thread is waiting */
44dc: e5903024 ldr r3, [r0, #36]
44e0: e3530000 cmp r3, #0 ; 0x0
44e4: 0a000011 beq 4530 <_Event_Timeout+0x7c>
_ISR_Enable( level );
return;
}
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
44e8: e59f3070 ldr r3, [pc, #112] ; 4560 <_Event_Timeout+0xac>
44ec: e5932000 ldr r2, [r3]
44f0: e1500002 cmp r0, r2
_Thread_Unnest_dispatch();
_ISR_Enable( level );
return;
}
the_thread->Wait.count = 0;
44f4: e5801024 str r1, [r0, #36]
if ( _Thread_Is_executing( the_thread ) ) {
44f8: 0a000012 beq 4548 <_Event_Timeout+0x94>
(sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) {
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
44fc: e3a03006 mov r3, #6 ; 0x6
4500: e5803034 str r3, [r0, #52]
_ISR_Enable( level );
4504: e129f00c msr CPSR_fc, ip
4508: e3a01201 mov r1, #268435456 ; 0x10000000
450c: e2811bff add r1, r1, #261120 ; 0x3fc00
4510: e2811ffe add r1, r1, #1016 ; 0x3f8
4514: eb0007ec bl 64cc <_Thread_Clear_state>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
4518: e59f2044 ldr r2, [pc, #68] ; 4564 <_Event_Timeout+0xb0>
451c: e5923000 ldr r3, [r2]
4520: e2433001 sub r3, r3, #1 ; 0x1
4524: e5823000 str r3, [r2]
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
4528: e28dd004 add sp, sp, #4 ; 0x4
452c: e8bd8000 pop {pc}
4530: e59f202c ldr r2, [pc, #44] ; 4564 <_Event_Timeout+0xb0> <== NOT EXECUTED
4534: e5923000 ldr r3, [r2] <== NOT EXECUTED
4538: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED
453c: e5823000 str r3, [r2] <== NOT EXECUTED
_ISR_Disable( level );
if ( !the_thread->Wait.count ) { /* verify thread is waiting */
_Thread_Unnest_dispatch();
_ISR_Enable( level );
4540: e129f00c msr CPSR_fc, ip <== NOT EXECUTED
4544: eafffff7 b 4528 <_Event_Timeout+0x74> <== NOT EXECUTED
return;
}
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
Thread_blocking_operation_States sync = _Event_Sync_state;
4548: e59f2018 ldr r2, [pc, #24] ; 4568 <_Event_Timeout+0xb4> <== NOT EXECUTED
454c: e5923000 ldr r3, [r2] <== NOT EXECUTED
if ( (sync == THREAD_BLOCKING_OPERATION_SYNCHRONIZED) ||
4550: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED
(sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) {
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
4554: 93a03002 movls r3, #2 ; 0x2 <== NOT EXECUTED
4558: 95823000 strls r3, [r2] <== NOT EXECUTED
455c: eaffffe6 b 44fc <_Event_Timeout+0x48> <== NOT EXECUTED
00008658 <_Heap_Allocate_aligned>:
void *_Heap_Allocate_aligned(
Heap_Control *the_heap,
size_t size,
uint32_t alignment
)
{
8658: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
uint32_t search_count;
Heap_Block *the_block;
void *user_ptr = NULL;
uint32_t const page_size = the_heap->page_size;
865c: e5909010 ldr r9, [r0, #16]
void *_Heap_Allocate_aligned(
Heap_Control *the_heap,
size_t size,
uint32_t alignment
)
{
8660: e1a07000 mov r7, r0
8664: e1a03001 mov r3, r1
8668: e24dd010 sub sp, sp, #16 ; 0x10
Heap_Block *const tail = _Heap_Tail(the_heap);
uint32_t const end_to_user_offs = size - HEAP_BLOCK_HEADER_OFFSET;
uint32_t const the_size =
_Heap_Calc_block_size(size, page_size, the_heap->min_block_size);
866c: e1a00001 mov r0, r1
void *user_ptr = NULL;
uint32_t const page_size = the_heap->page_size;
Heap_Statistics *const stats = &the_heap->stats;
Heap_Block *const tail = _Heap_Tail(the_heap);
uint32_t const end_to_user_offs = size - HEAP_BLOCK_HEADER_OFFSET;
8670: e2433004 sub r3, r3, #4 ; 0x4
void *_Heap_Allocate_aligned(
Heap_Control *the_heap,
size_t size,
uint32_t alignment
)
{
8674: e1a0b002 mov fp, r2
Heap_Block *const tail = _Heap_Tail(the_heap);
uint32_t const end_to_user_offs = size - HEAP_BLOCK_HEADER_OFFSET;
uint32_t const the_size =
_Heap_Calc_block_size(size, page_size, the_heap->min_block_size);
8678: e1a01009 mov r1, r9
867c: e5972014 ldr r2, [r7, #20]
void *user_ptr = NULL;
uint32_t const page_size = the_heap->page_size;
Heap_Statistics *const stats = &the_heap->stats;
Heap_Block *const tail = _Heap_Tail(the_heap);
uint32_t const end_to_user_offs = size - HEAP_BLOCK_HEADER_OFFSET;
8680: e58d3004 str r3, [sp, #4]
uint32_t const the_size =
_Heap_Calc_block_size(size, page_size, the_heap->min_block_size);
8684: eb000163 bl 8c18 <_Heap_Calc_block_size>
if(the_size == 0)
8688: e3500000 cmp r0, #0 ; 0x0
868c: e58d0008 str r0, [sp, #8]
8690: 0a000064 beq 8828 <_Heap_Allocate_aligned+0x1d0>
*/
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First (
Heap_Control *the_heap
)
{
return _Heap_Head(the_heap)->next;
8694: e5975008 ldr r5, [r7, #8]
return NULL;
if(alignment == 0)
8698: e35b0000 cmp fp, #0 ; 0x0
869c: 03a0b004 moveq fp, #4 ; 0x4
alignment = CPU_ALIGNMENT;
/* Find large enough free block that satisfies the alignment requirements. */
for(the_block = _Heap_First(the_heap), search_count = 0;
the_block != tail;
86a0: e1570005 cmp r7, r5
86a4: 0a00005f beq 8828 <_Heap_Allocate_aligned+0x1d0>
86a8: e3a0a000 mov sl, #0 ; 0x0
*/
RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size (
Heap_Block *the_block
)
{
return (the_block->size & ~HEAP_PREV_USED);
86ac: e5953004 ldr r3, [r5, #4]
uint32_t const block_size = _Heap_Block_size(the_block);
/* As we always coalesce free blocks, prev block must have been used. */
_HAssert(_Heap_Is_prev_used(the_block));
if(block_size >= the_size) { /* the_block is large enough. */
86b0: e59d1008 ldr r1, [sp, #8]
86b4: e3c36001 bic r6, r3, #1 ; 0x1
86b8: e1510006 cmp r1, r6
86bc: 8a000023 bhi 8750 <_Heap_Allocate_aligned+0xf8>
return. It should be at least 'end_to_user_offs' bytes less than the
the 'block_end' and should be aligned on 'alignment' boundary.
Calculations are from the 'block_end' as we are going to split free
block so that the upper part of the block becomes used block. */
_H_uptr_t const block_end = _H_p2u(the_block) + block_size;
aligned_user_addr = block_end - end_to_user_offs;
86c0: e59d3004 ldr r3, [sp, #4]
/* Calculate 'aligned_user_addr' that will become the user pointer we
return. It should be at least 'end_to_user_offs' bytes less than the
the 'block_end' and should be aligned on 'alignment' boundary.
Calculations are from the 'block_end' as we are going to split free
block so that the upper part of the block becomes used block. */
_H_uptr_t const block_end = _H_p2u(the_block) + block_size;
86c4: e0852006 add r2, r5, r6
aligned_user_addr = block_end - end_to_user_offs;
86c8: e0634002 rsb r4, r3, r2
_H_uptr_t *value,
uint32_t alignment
)
{
_H_uptr_t v = *value;
*value = v - (v % alignment);
86cc: e1a0100b mov r1, fp
86d0: e1a00004 mov r0, r4
/* Calculate 'aligned_user_addr' that will become the user pointer we
return. It should be at least 'end_to_user_offs' bytes less than the
the 'block_end' and should be aligned on 'alignment' boundary.
Calculations are from the 'block_end' as we are going to split free
block so that the upper part of the block becomes used block. */
_H_uptr_t const block_end = _H_p2u(the_block) + block_size;
86d4: e58d200c str r2, [sp, #12]
86d8: eb003e93 bl 1812c <__umodsi3>
86dc: e0608004 rsb r8, r0, r4
if(block_size >= the_size) { /* the_block is large enough. */
_H_uptr_t user_addr;
_H_uptr_t aligned_user_addr;
_H_uptr_t const user_area = _H_p2u(_Heap_User_area(the_block));
86e0: e1a00008 mov r0, r8
86e4: e1a01009 mov r1, r9
86e8: eb003e8f bl 1812c <__umodsi3>
86ec: e2854008 add r4, r5, #8 ; 0x8
86f0: e0602008 rsb r2, r0, r8
only at 'page_size' aligned addresses */
user_addr = aligned_user_addr;
_Heap_Align_down_uptr(&user_addr, page_size);
/* Make sure 'user_addr' calculated didn't run out of 'the_block'. */
if(user_addr >= user_area) {
86f4: e1540002 cmp r4, r2
86f8: 8a000014 bhi 8750 <_Heap_Allocate_aligned+0xf8>
/* The block seems to be acceptable. Check if the remainder of
'the_block' is less than 'min_block_size' so that 'the_block' won't
actually be split at the address we assume. */
if(user_addr - user_area < the_heap->min_block_size) {
86fc: e597c014 ldr ip, [r7, #20]
8700: e0643002 rsb r3, r4, r2
8704: e153000c cmp r3, ip
8708: 2a00001c bcs 8780 <_Heap_Allocate_aligned+0x128>
'aligned_user_addr' to be outside of [0,page_size) range. If we do,
we will need to store this distance somewhere to be able to
resurrect the block address from the user pointer. (Having the
distance within [0,page_size) range allows resurrection by
aligning user pointer down to the nearest 'page_size' boundary.) */
if(aligned_user_addr - user_addr >= page_size) {
870c: e0643008 rsb r3, r4, r8
8710: e1590003 cmp r9, r3
8714: 81a02004 movhi r2, r4
8718: 8a000018 bhi 8780 <_Heap_Allocate_aligned+0x128>
uint32_t alignment
)
{
_H_uptr_t v = *value;
uint32_t a = alignment;
_H_uptr_t r = v % a;
871c: e1a00004 mov r0, r4
8720: e1a0100b mov r1, fp
8724: e58dc000 str ip, [sp]
8728: eb003e7f bl 1812c <__umodsi3>
*value = r ? v - r + a : v;
872c: e3500000 cmp r0, #0 ; 0x0
8730: 1084300b addne r3, r4, fp
8734: 10600003 rsbne r0, r0, r3
8738: 01a03000 moveq r3, r0
873c: 10643000 rsbne r3, r4, r0
8740: 01a00004 moveq r0, r4
/* The user pointer will be too far from 'user_addr'. See if we
can make 'aligned_user_addr' to be close enough to the
'user_addr'. */
aligned_user_addr = user_addr;
_Heap_Align_up_uptr(&aligned_user_addr, alignment);
if(aligned_user_addr - user_addr >= page_size) {
8744: e1590003 cmp r9, r3
8748: e59dc000 ldr ip, [sp]
874c: 8a000009 bhi 8778 <_Heap_Allocate_aligned+0x120>
/* Find large enough free block that satisfies the alignment requirements. */
for(the_block = _Heap_First(the_heap), search_count = 0;
the_block != tail;
the_block = the_block->next, ++search_count)
8750: e5955008 ldr r5, [r5, #8]
alignment = CPU_ALIGNMENT;
/* Find large enough free block that satisfies the alignment requirements. */
for(the_block = _Heap_First(the_heap), search_count = 0;
the_block != tail;
8754: e1570005 cmp r7, r5
the_block = the_block->next, ++search_count)
8758: e28aa001 add sl, sl, #1 ; 0x1
alignment = CPU_ALIGNMENT;
/* Find large enough free block that satisfies the alignment requirements. */
for(the_block = _Heap_First(the_heap), search_count = 0;
the_block != tail;
875c: 1affffd2 bne 86ac <_Heap_Allocate_aligned+0x54>
8760: e3a00000 mov r0, #0 ; 0x0
}
}
}
}
if(stats->max_search < search_count)
8764: e5973044 ldr r3, [r7, #68]
8768: e153000a cmp r3, sl
stats->max_search = search_count;
876c: 3587a044 strcc sl, [r7, #68]
return user_ptr;
}
8770: e28dd010 add sp, sp, #16 ; 0x10
8774: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
/* The user pointer will be too far from 'user_addr'. See if we
can make 'aligned_user_addr' to be close enough to the
'user_addr'. */
aligned_user_addr = user_addr;
_Heap_Align_up_uptr(&aligned_user_addr, alignment);
if(aligned_user_addr - user_addr >= page_size) {
8778: e1a02004 mov r2, r4
877c: e1a08000 mov r8, r0
aligned_user_addr = 0;
}
}
}
if(aligned_user_addr) {
8780: e3580000 cmp r8, #0 ; 0x0
8784: 0afffff1 beq 8750 <_Heap_Allocate_aligned+0xf8>
/* The block is indeed acceptable: calculate the size of the block
to be allocated and perform allocation. */
uint32_t const alloc_size =
block_end - user_addr + HEAP_BLOCK_USER_OFFSET;
8788: e59d100c ldr r1, [sp, #12]
878c: e2813008 add r3, r1, #8 ; 0x8
8790: e0624003 rsb r4, r2, r3
Heap_Block *the_block,
uint32_t alloc_size)
{
Heap_Statistics *const stats = &the_heap->stats;
uint32_t const block_size = _Heap_Block_size(the_block);
uint32_t const the_rest = block_size - alloc_size;
8794: e0642006 rsb r2, r4, r6
_HAssert(_Heap_Is_aligned(block_size, the_heap->page_size));
_HAssert(_Heap_Is_aligned(alloc_size, the_heap->page_size));
_HAssert(alloc_size <= block_size);
_HAssert(_Heap_Is_prev_used(the_block));
if(the_rest >= the_heap->min_block_size) {
8798: e152000c cmp r2, ip
/* Split the block so that lower part is still free, and upper part
becomes used. */
the_block->size = the_rest | HEAP_PREV_USED;
879c: 23823001 orrcs r3, r2, #1 ; 0x1
87a0: 25853004 strcs r3, [r5, #4]
the_block = _Heap_Block_at(the_block, the_rest);
the_block->prev_size = the_rest;
87a4: 27a52002 strcs r2, [r5, r2]!
the_block->size = alloc_size;
87a8: 25854004 strcs r4, [r5, #4]
_HAssert(_Heap_Is_aligned(block_size, the_heap->page_size));
_HAssert(_Heap_Is_aligned(alloc_size, the_heap->page_size));
_HAssert(alloc_size <= block_size);
_HAssert(_Heap_Is_prev_used(the_block));
if(the_rest >= the_heap->min_block_size) {
87ac: 2a000007 bcs 87d0 <_Heap_Allocate_aligned+0x178>
/* Don't split the block as remainder is either zero or too small to be
used as a separate free block. Change 'alloc_size' to the size of the
block and remove the block from the list of free blocks. */
_Heap_Block_remove(the_block);
alloc_size = block_size;
stats->free_blocks -= 1;
87b0: e5973038 ldr r3, [r7, #56]
Heap_Block *the_block
)
{
Heap_Block *block = the_block;
Heap_Block *next = block->next;
87b4: e2851008 add r1, r5, #8 ; 0x8
87b8: e8910006 ldm r1, {r1, r2}
87bc: e2433001 sub r3, r3, #1 ; 0x1
Heap_Block *prev = block->prev;
prev->next = next;
next->prev = prev;
87c0: e581200c str r2, [r1, #12]
87c4: e5873038 str r3, [r7, #56]
{
Heap_Block *block = the_block;
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
87c8: e5821008 str r1, [r2, #8]
87cc: e1a04006 mov r4, r6
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
87d0: e0852004 add r2, r5, r4
}
/* Mark the block as used (in the next block). */
_Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED;
87d4: e5923004 ldr r3, [r2, #4]
87d8: e3833001 orr r3, r3, #1 ; 0x1
87dc: e5823004 str r3, [r2, #4]
/* Update statistics */
stats->free_size -= alloc_size;
87e0: e2871030 add r1, r7, #48 ; 0x30
87e4: e891000a ldm r1, {r1, r3}
87e8: e0641001 rsb r1, r4, r1
if(stats->min_free_size > stats->free_size)
87ec: e1510003 cmp r1, r3
_HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment));
the_block = block_allocate(the_heap, the_block, alloc_size);
stats->searches += search_count + 1;
87f0: e597304c ldr r3, [r7, #76]
_Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED;
/* Update statistics */
stats->free_size -= alloc_size;
if(stats->min_free_size > stats->free_size)
stats->min_free_size = stats->free_size;
stats->used_blocks += 1;
87f4: e5972040 ldr r2, [r7, #64]
stats->free_blocks -= 1;
}
/* Mark the block as used (in the next block). */
_Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED;
/* Update statistics */
stats->free_size -= alloc_size;
87f8: e5871030 str r1, [r7, #48]
if(stats->min_free_size > stats->free_size)
stats->min_free_size = stats->free_size;
87fc: 35871034 strcc r1, [r7, #52]
_HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment));
the_block = block_allocate(the_heap, the_block, alloc_size);
stats->searches += search_count + 1;
stats->allocs += 1;
8800: e5971048 ldr r1, [r7, #72]
_HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment));
the_block = block_allocate(the_heap, the_block, alloc_size);
stats->searches += search_count + 1;
8804: e2833001 add r3, r3, #1 ; 0x1
_Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED;
/* Update statistics */
stats->free_size -= alloc_size;
if(stats->min_free_size > stats->free_size)
stats->min_free_size = stats->free_size;
stats->used_blocks += 1;
8808: e2822001 add r2, r2, #1 ; 0x1
_HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment));
the_block = block_allocate(the_heap, the_block, alloc_size);
stats->searches += search_count + 1;
880c: e083300a add r3, r3, sl
stats->allocs += 1;
8810: e2811001 add r1, r1, #1 ; 0x1
_Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED;
/* Update statistics */
stats->free_size -= alloc_size;
if(stats->min_free_size > stats->free_size)
stats->min_free_size = stats->free_size;
stats->used_blocks += 1;
8814: e5872040 str r2, [r7, #64]
_HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment));
the_block = block_allocate(the_heap, the_block, alloc_size);
stats->searches += search_count + 1;
8818: e587304c str r3, [r7, #76]
stats->allocs += 1;
881c: e5871048 str r1, [r7, #72]
check_result(the_heap, the_block, user_addr,
aligned_user_addr, size);
user_ptr = (void*)aligned_user_addr;
8820: e1a00008 mov r0, r8
8824: eaffffce b 8764 <_Heap_Allocate_aligned+0x10c>
}
}
}
if(stats->max_search < search_count)
stats->max_search = search_count;
8828: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
882c: eaffffcf b 8770 <_Heap_Allocate_aligned+0x118> <== NOT EXECUTED
0000e14c <_Heap_Get_information>:
Heap_Get_information_status _Heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
e14c: e92d0070 push {r4, r5, r6}
Heap_Block *the_block = the_heap->start;
e150: e2802020 add r2, r0, #32 ; 0x20
e154: e8920044 ldm r2, {r2, r6}
Heap_Block *const end = the_heap->final;
_HAssert(the_block->prev_size == HEAP_PREV_USED);
_HAssert(_Heap_Is_prev_used(the_block));
the_info->Free.number = 0;
e158: e3a03000 mov r3, #0 ; 0x0
the_info->Free.largest = 0;
the_info->Used.number = 0;
the_info->Used.total = 0;
the_info->Used.largest = 0;
while ( the_block != end ) {
e15c: e1520006 cmp r2, r6
Heap_Get_information_status _Heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
e160: e1a0c001 mov ip, r1
the_info->Free.number = 0;
the_info->Free.total = 0;
the_info->Free.largest = 0;
the_info->Used.number = 0;
the_info->Used.total = 0;
the_info->Used.largest = 0;
e164: e5813010 str r3, [r1, #16]
Heap_Block *const end = the_heap->final;
_HAssert(the_block->prev_size == HEAP_PREV_USED);
_HAssert(_Heap_Is_prev_used(the_block));
the_info->Free.number = 0;
e168: e5813000 str r3, [r1]
the_info->Free.total = 0;
e16c: e5813008 str r3, [r1, #8]
the_info->Free.largest = 0;
e170: e5813004 str r3, [r1, #4]
the_info->Used.number = 0;
e174: e581300c str r3, [r1, #12]
the_info->Used.total = 0;
e178: e5813014 str r3, [r1, #20]
the_info->Used.largest = 0;
while ( the_block != end ) {
e17c: 0a000020 beq e204 <_Heap_Get_information+0xb8>
e180: e5925004 ldr r5, [r2, #4]
e184: ea00000b b e1b8 <_Heap_Get_information+0x6c>
uint32_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
if ( _Heap_Is_prev_used(next_block) ) {
the_info->Used.number++;
e188: e59c300c ldr r3, [ip, #12]
the_info->Used.total += the_size;
e18c: e59c1014 ldr r1, [ip, #20]
if ( the_info->Used.largest < the_size )
e190: e59c2010 ldr r2, [ip, #16]
while ( the_block != end ) {
uint32_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
if ( _Heap_Is_prev_used(next_block) ) {
the_info->Used.number++;
e194: e2833001 add r3, r3, #1 ; 0x1
the_info->Used.total += the_size;
if ( the_info->Used.largest < the_size )
e198: e1520000 cmp r2, r0
uint32_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
if ( _Heap_Is_prev_used(next_block) ) {
the_info->Used.number++;
the_info->Used.total += the_size;
e19c: e0811000 add r1, r1, r0
while ( the_block != end ) {
uint32_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
if ( _Heap_Is_prev_used(next_block) ) {
the_info->Used.number++;
e1a0: e58c300c str r3, [ip, #12]
the_info->Used.total += the_size;
e1a4: e58c1014 str r1, [ip, #20]
if ( the_info->Used.largest < the_size )
the_info->Used.largest = the_size;
e1a8: 358c0010 strcc r0, [ip, #16]
the_info->Free.largest = 0;
the_info->Used.number = 0;
the_info->Used.total = 0;
the_info->Used.largest = 0;
while ( the_block != end ) {
e1ac: e1560004 cmp r6, r4
} else {
the_info->Free.number++;
the_info->Free.total += the_size;
if ( the_info->Free.largest < the_size )
the_info->Free.largest = the_size;
if ( the_size != next_block->prev_size )
e1b0: e1a02004 mov r2, r4
the_info->Free.largest = 0;
the_info->Used.number = 0;
the_info->Used.total = 0;
the_info->Used.largest = 0;
while ( the_block != end ) {
e1b4: 0a000012 beq e204 <_Heap_Get_information+0xb8>
e1b8: e3c50001 bic r0, r5, #1 ; 0x1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
e1bc: e0824000 add r4, r2, r0
*/
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used (
Heap_Block *the_block
)
{
return (the_block->size & HEAP_PREV_USED);
e1c0: e5945004 ldr r5, [r4, #4]
uint32_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
if ( _Heap_Is_prev_used(next_block) ) {
e1c4: e3150001 tst r5, #1 ; 0x1
e1c8: 1affffee bne e188 <_Heap_Get_information+0x3c>
the_info->Used.number++;
the_info->Used.total += the_size;
if ( the_info->Used.largest < the_size )
the_info->Used.largest = the_size;
} else {
the_info->Free.number++;
e1cc: e59c3000 ldr r3, [ip]
the_info->Free.total += the_size;
e1d0: e59c1008 ldr r1, [ip, #8]
if ( the_info->Free.largest < the_size )
e1d4: e59c2004 ldr r2, [ip, #4]
the_info->Used.number++;
the_info->Used.total += the_size;
if ( the_info->Used.largest < the_size )
the_info->Used.largest = the_size;
} else {
the_info->Free.number++;
e1d8: e2833001 add r3, r3, #1 ; 0x1
the_info->Free.total += the_size;
if ( the_info->Free.largest < the_size )
e1dc: e1520000 cmp r2, r0
the_info->Used.total += the_size;
if ( the_info->Used.largest < the_size )
the_info->Used.largest = the_size;
} else {
the_info->Free.number++;
the_info->Free.total += the_size;
e1e0: e0811000 add r1, r1, r0
if ( the_info->Free.largest < the_size )
the_info->Free.largest = the_size;
e1e4: 358c0004 strcc r0, [ip, #4]
the_info->Used.number++;
the_info->Used.total += the_size;
if ( the_info->Used.largest < the_size )
the_info->Used.largest = the_size;
} else {
the_info->Free.number++;
e1e8: e58c3000 str r3, [ip]
the_info->Free.total += the_size;
e1ec: e58c1008 str r1, [ip, #8]
if ( the_info->Free.largest < the_size )
the_info->Free.largest = the_size;
if ( the_size != next_block->prev_size )
e1f0: e5943000 ldr r3, [r4]
e1f4: e1530000 cmp r3, r0
e1f8: 0affffeb beq e1ac <_Heap_Get_information+0x60>
e1fc: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED
e200: ea000003 b e214 <_Heap_Get_information+0xc8> <== NOT EXECUTED
}
/* Handle the last dummy block. Don't consider this block to be
"used" as client never allocated it. Make 'Used.total' contain this
blocks' overhead though. */
the_info->Used.total += HEAP_OVERHEAD;
e204: e59c3014 ldr r3, [ip, #20]
e208: e2833008 add r3, r3, #8 ; 0x8
e20c: e58c3014 str r3, [ip, #20]
e210: e3a00000 mov r0, #0 ; 0x0
return HEAP_GET_INFORMATION_SUCCESSFUL;
}
e214: e8bd0070 pop {r4, r5, r6}
e218: e12fff1e bx lr
00014bf4 <_Heap_Resize_block>:
void *starting_address,
size_t size,
uint32_t *old_mem_size,
uint32_t *avail_mem_size
)
{
14bf4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
14bf8: e24dd00c sub sp, sp, #12 ; 0xc
Heap_Statistics *const stats = &the_heap->stats;
uint32_t const min_block_size = the_heap->min_block_size;
uint32_t const page_size = the_heap->page_size;
*old_mem_size = 0;
*avail_mem_size = 0;
14bfc: e59dc030 ldr ip, [sp, #48]
void *starting_address,
size_t size,
uint32_t *old_mem_size,
uint32_t *avail_mem_size
)
{
14c00: e1a05000 mov r5, r0
14c04: e1a09003 mov r9, r3
uint32_t prev_used_flag;
Heap_Statistics *const stats = &the_heap->stats;
uint32_t const min_block_size = the_heap->min_block_size;
uint32_t const page_size = the_heap->page_size;
*old_mem_size = 0;
14c08: e3a03000 mov r3, #0 ; 0x0
Heap_Block *next_next_block;
uint32_t old_block_size;
uint32_t old_user_size;
uint32_t prev_used_flag;
Heap_Statistics *const stats = &the_heap->stats;
uint32_t const min_block_size = the_heap->min_block_size;
14c0c: e5900014 ldr r0, [r0, #20]
uint32_t const page_size = the_heap->page_size;
14c10: e595b010 ldr fp, [r5, #16]
*old_mem_size = 0;
14c14: e5893000 str r3, [r9]
*avail_mem_size = 0;
14c18: e58c3000 str r3, [ip]
Heap_Block *next_next_block;
uint32_t old_block_size;
uint32_t old_user_size;
uint32_t prev_used_flag;
Heap_Statistics *const stats = &the_heap->stats;
uint32_t const min_block_size = the_heap->min_block_size;
14c1c: e58d0004 str r0, [sp, #4]
void *starting_address,
size_t size,
uint32_t *old_mem_size,
uint32_t *avail_mem_size
)
{
14c20: e1a04001 mov r4, r1
/* The address passed could be greater than the block address plus
* HEAP_BLOCK_USER_OFFSET as _Heap_Allocate_aligned() may produce such user
* pointers. To get rid of this offset we need to align the address down
* to the nearest 'page_size' boundary. */
_Heap_Align_down_uptr ( &addr, the_heap->page_size );
*the_block = (Heap_Block *)(addr - HEAP_BLOCK_USER_OFFSET);
14c24: e1a00001 mov r0, r1
14c28: e5951010 ldr r1, [r5, #16]
14c2c: e1a08002 mov r8, r2
14c30: ebfff862 bl 12dc0 <__umodsi3>
14c34: e2442008 sub r2, r4, #8 ; 0x8
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in (
Heap_Control *the_heap,
Heap_Block *the_block
)
{
return _Addresses_Is_in_range( the_block, the_heap->start, the_heap->final );
14c38: e595c020 ldr ip, [r5, #32]
14c3c: e5951024 ldr r1, [r5, #36]
/* The address passed could be greater than the block address plus
* HEAP_BLOCK_USER_OFFSET as _Heap_Allocate_aligned() may produce such user
* pointers. To get rid of this offset we need to align the address down
* to the nearest 'page_size' boundary. */
_Heap_Align_down_uptr ( &addr, the_heap->page_size );
*the_block = (Heap_Block *)(addr - HEAP_BLOCK_USER_OFFSET);
14c40: e0606002 rsb r6, r0, r2
*old_mem_size = 0;
*avail_mem_size = 0;
_Heap_Start_of_block(the_heap, starting_address, &the_block);
_HAssert(_Heap_Is_block_in(the_heap, the_block));
if (!_Heap_Is_block_in(the_heap, the_block))
14c44: e156000c cmp r6, ip
14c48: 33a03000 movcc r3, #0 ; 0x0
14c4c: 23a03001 movcs r3, #1 ; 0x1
14c50: e1560001 cmp r6, r1
14c54: 83a03000 movhi r3, #0 ; 0x0
14c58: e3530000 cmp r3, #0 ; 0x0
14c5c: 0a00002d beq 14d18 <_Heap_Resize_block+0x124>
return HEAP_RESIZE_FATAL_ERROR;
prev_used_flag = the_block->size & HEAP_PREV_USED;
14c60: e5962004 ldr r2, [r6, #4]
*/
RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size (
Heap_Block *the_block
)
{
return (the_block->size & ~HEAP_PREV_USED);
14c64: e3c2a001 bic sl, r2, #1 ; 0x1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
14c68: e086700a add r7, r6, sl
old_block_size = _Heap_Block_size(the_block);
next_block = _Heap_Block_at(the_block, old_block_size);
_HAssert(_Heap_Is_block_in(the_heap, next_block));
_HAssert(_Heap_Is_prev_used(next_block));
if ( !_Heap_Is_block_in(the_heap, next_block) ||
14c6c: e15c0007 cmp ip, r7
14c70: 83a03000 movhi r3, #0 ; 0x0
14c74: 93a03001 movls r3, #1 ; 0x1
14c78: e1510007 cmp r1, r7
14c7c: 33a03000 movcc r3, #0 ; 0x0
14c80: e3530000 cmp r3, #0 ; 0x0
14c84: 0a000023 beq 14d18 <_Heap_Resize_block+0x124>
*/
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used (
Heap_Block *the_block
)
{
return (the_block->size & HEAP_PREV_USED);
14c88: e5973004 ldr r3, [r7, #4]
14c8c: e3130001 tst r3, #1 ; 0x1
14c90: 0a000020 beq 14d18 <_Heap_Resize_block+0x124>
*/
RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size (
Heap_Block *the_block
)
{
return (the_block->size & ~HEAP_PREV_USED);
14c94: e3c33001 bic r3, r3, #1 ; 0x1
!_Heap_Is_prev_used(next_block))
return HEAP_RESIZE_FATAL_ERROR;
next_block_size = _Heap_Block_size(next_block);
next_next_block = _Heap_Block_at(next_block, next_block_size);
next_is_used = (next_block == the_heap->final) ||
14c98: e1510007 cmp r1, r7
14c9c: e58d3000 str r3, [sp]
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
14ca0: e0873003 add r3, r7, r3
14ca4: 15933004 ldrne r3, [r3, #4]
14ca8: 12033001 andne r3, r3, #1 ; 0x1
14cac: 03a00001 moveq r0, #1 ; 0x1
14cb0: 158d3008 strne r3, [sp, #8]
_Heap_Is_prev_used(next_next_block);
/* See _Heap_Size_of_user_area() source for explanations */
old_user_size = _Addresses_Subtract(next_block, starting_address)
14cb4: e0643007 rsb r3, r4, r7
!_Heap_Is_prev_used(next_block))
return HEAP_RESIZE_FATAL_ERROR;
next_block_size = _Heap_Block_size(next_block);
next_next_block = _Heap_Block_at(next_block, next_block_size);
next_is_used = (next_block == the_heap->final) ||
14cb8: 058d0008 streq r0, [sp, #8]
_Heap_Is_prev_used(next_next_block);
/* See _Heap_Size_of_user_area() source for explanations */
old_user_size = _Addresses_Subtract(next_block, starting_address)
14cbc: e2830004 add r0, r3, #4 ; 0x4
+ HEAP_BLOCK_HEADER_OFFSET;
*old_mem_size = old_user_size;
if (size > old_user_size) {
14cc0: e1500008 cmp r0, r8
/* See _Heap_Size_of_user_area() source for explanations */
old_user_size = _Addresses_Subtract(next_block, starting_address)
+ HEAP_BLOCK_HEADER_OFFSET;
*old_mem_size = old_user_size;
14cc4: e5890000 str r0, [r9]
_Heap_Start_of_block(the_heap, starting_address, &the_block);
_HAssert(_Heap_Is_block_in(the_heap, the_block));
if (!_Heap_Is_block_in(the_heap, the_block))
return HEAP_RESIZE_FATAL_ERROR;
prev_used_flag = the_block->size & HEAP_PREV_USED;
14cc8: e2029001 and r9, r2, #1 ; 0x1
old_user_size = _Addresses_Subtract(next_block, starting_address)
+ HEAP_BLOCK_HEADER_OFFSET;
*old_mem_size = old_user_size;
if (size > old_user_size) {
14ccc: 2a000014 bcs 14d24 <_Heap_Resize_block+0x130>
/* Need to extend the block: allocate part of the next block and then
merge 'the_block' and allocated block together. */
if (next_is_used) /* Next block is in use, -- no way to extend */
14cd0: e59d1008 ldr r1, [sp, #8]
14cd4: e3510000 cmp r1, #0 ; 0x0
14cd8: 1a00000c bne 14d10 <_Heap_Resize_block+0x11c>
return HEAP_RESIZE_UNSATISFIED;
else {
uint32_t add_block_size = size - old_user_size;
14cdc: e0604008 rsb r4, r0, r8
uint32_t alignment
)
{
uint32_t v = *value;
uint32_t a = alignment;
uint32_t r = v % a;
14ce0: e1a00004 mov r0, r4
14ce4: e1a0100b mov r1, fp
14ce8: ebfff834 bl 12dc0 <__umodsi3>
*value = r ? v - r + a : v;
14cec: e3500000 cmp r0, #0 ; 0x0
14cf0: 1084300b addne r3, r4, fp
14cf4: e59d2004 ldr r2, [sp, #4]
14cf8: 10604003 rsbne r4, r0, r3
_Heap_Align_up(&add_block_size, page_size);
if (add_block_size < min_block_size)
add_block_size = min_block_size;
if (add_block_size > next_block_size)
14cfc: e59d3000 ldr r3, [sp]
14d00: e1540002 cmp r4, r2
14d04: 21a02004 movcs r2, r4
14d08: e1530002 cmp r3, r2
14d0c: 2a000049 bcs 14e38 <_Heap_Resize_block+0x244>
}
}
}
++stats->resizes;
return HEAP_RESIZE_SUCCESSFUL;
14d10: e3a00001 mov r0, #1 ; 0x1
14d14: ea000000 b 14d1c <_Heap_Resize_block+0x128>
14d18: e3a00002 mov r0, #2 ; 0x2
}
14d1c: e28dd00c add sp, sp, #12 ; 0xc
14d20: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
--stats->used_blocks;
}
} else {
/* Calculate how much memory we could free */
uint32_t free_block_size = old_user_size - size;
14d24: e0684000 rsb r4, r8, r0
uint32_t *value,
uint32_t alignment
)
{
uint32_t v = *value;
*value = v - (v % alignment);
14d28: e1a00004 mov r0, r4
14d2c: e1a0100b mov r1, fp
14d30: ebfff822 bl 12dc0 <__umodsi3>
_Heap_Align_down(&free_block_size, page_size);
if (free_block_size > 0) {
14d34: e0544000 subs r4, r4, r0
14d38: 0a000020 beq 14dc0 <_Heap_Resize_block+0x1cc>
can hold 'size' user bytes and still remain not shorter than
'min_block_size'. */
uint32_t new_block_size = old_block_size - free_block_size;
if (new_block_size < min_block_size) {
14d3c: e59dc004 ldr ip, [sp, #4]
/* To free some memory the block should be shortened so that it can
can hold 'size' user bytes and still remain not shorter than
'min_block_size'. */
uint32_t new_block_size = old_block_size - free_block_size;
14d40: e064000a rsb r0, r4, sl
if (new_block_size < min_block_size) {
14d44: e15c0000 cmp ip, r0
14d48: 9a000021 bls 14dd4 <_Heap_Resize_block+0x1e0>
uint32_t delta = min_block_size - new_block_size;
14d4c: e060300c rsb r3, r0, ip
_HAssert(free_block_size >= delta);
free_block_size -= delta;
if (free_block_size == 0) {
14d50: e0544003 subs r4, r4, r3
++stats->resizes;
return HEAP_RESIZE_SUCCESSFUL;
}
new_block_size += delta;
14d54: 10800003 addne r0, r0, r3
if (new_block_size < min_block_size) {
uint32_t delta = min_block_size - new_block_size;
_HAssert(free_block_size >= delta);
free_block_size -= delta;
if (free_block_size == 0) {
14d58: 1a00001d bne 14dd4 <_Heap_Resize_block+0x1e0>
++stats->resizes;
14d5c: e5953054 ldr r3, [r5, #84]
14d60: e2833001 add r3, r3, #1 ; 0x1
14d64: e5853054 str r3, [r5, #84]
14d68: e1a00004 mov r0, r4
14d6c: eaffffea b 14d1c <_Heap_Resize_block+0x128>
next_next_block->prev_size = new_next_block_size;
_Heap_Block_replace(next_block, new_next_block);
the_heap->stats.free_size += free_block_size;
*avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD;
} else if (free_block_size >= min_block_size) {
14d70: e59dc004 ldr ip, [sp, #4] <== NOT EXECUTED
14d74: e15c0004 cmp ip, r4 <== NOT EXECUTED
14d78: 8a000010 bhi 14dc0 <_Heap_Resize_block+0x1cc> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
14d7c: e0861000 add r1, r6, r0 <== NOT EXECUTED
/* Split the block into 2 used parts, then free the second one. */
the_block->size = new_block_size | prev_used_flag;
14d80: e1803009 orr r3, r0, r9 <== NOT EXECUTED
next_block = _Heap_Block_at(the_block, new_block_size);
next_block->size = free_block_size | HEAP_PREV_USED;
14d84: e3842001 orr r2, r4, #1 ; 0x1 <== NOT EXECUTED
the_heap->stats.free_size += free_block_size;
*avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD;
} else if (free_block_size >= min_block_size) {
/* Split the block into 2 used parts, then free the second one. */
the_block->size = new_block_size | prev_used_flag;
14d88: e5863004 str r3, [r6, #4] <== NOT EXECUTED
next_block = _Heap_Block_at(the_block, new_block_size);
next_block->size = free_block_size | HEAP_PREV_USED;
14d8c: e5812004 str r2, [r1, #4] <== NOT EXECUTED
++stats->used_blocks; /* We have created used block */
14d90: e5953040 ldr r3, [r5, #64] <== NOT EXECUTED
--stats->frees; /* Don't count next call in stats */
14d94: e5952050 ldr r2, [r5, #80] <== NOT EXECUTED
} else if (free_block_size >= min_block_size) {
/* Split the block into 2 used parts, then free the second one. */
the_block->size = new_block_size | prev_used_flag;
next_block = _Heap_Block_at(the_block, new_block_size);
next_block->size = free_block_size | HEAP_PREV_USED;
++stats->used_blocks; /* We have created used block */
14d98: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED
--stats->frees; /* Don't count next call in stats */
14d9c: e2422001 sub r2, r2, #1 ; 0x1 <== NOT EXECUTED
} else if (free_block_size >= min_block_size) {
/* Split the block into 2 used parts, then free the second one. */
the_block->size = new_block_size | prev_used_flag;
next_block = _Heap_Block_at(the_block, new_block_size);
next_block->size = free_block_size | HEAP_PREV_USED;
++stats->used_blocks; /* We have created used block */
14da0: e5853040 str r3, [r5, #64] <== NOT EXECUTED
--stats->frees; /* Don't count next call in stats */
14da4: e5852050 str r2, [r5, #80] <== NOT EXECUTED
_Heap_Free(the_heap, _Heap_User_area(next_block));
14da8: e2811008 add r1, r1, #8 ; 0x8 <== NOT EXECUTED
14dac: e1a00005 mov r0, r5 <== NOT EXECUTED
14db0: ebffd70a bl a9e0 <_Heap_Free> <== NOT EXECUTED
*avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD;
14db4: e59d0030 ldr r0, [sp, #48] <== NOT EXECUTED
14db8: e2443004 sub r3, r4, #4 ; 0x4 <== NOT EXECUTED
14dbc: e5803000 str r3, [r0] <== NOT EXECUTED
}
}
}
++stats->resizes;
14dc0: e5953054 ldr r3, [r5, #84]
14dc4: e2833001 add r3, r3, #1 ; 0x1
14dc8: e5853054 str r3, [r5, #84]
14dcc: e3a00000 mov r0, #0 ; 0x0
14dd0: eaffffd1 b 14d1c <_Heap_Resize_block+0x128>
_HAssert(new_block_size >= min_block_size);
_HAssert(new_block_size + free_block_size == old_block_size);
_HAssert(_Heap_Is_aligned(new_block_size, page_size));
_HAssert(_Heap_Is_aligned(free_block_size, page_size));
if (!next_is_used) {
14dd4: e59d1008 ldr r1, [sp, #8]
14dd8: e3510000 cmp r1, #0 ; 0x0
14ddc: 1affffe3 bne 14d70 <_Heap_Resize_block+0x17c>
/* Extend the next block to the low addresses by 'free_block_size' */
Heap_Block *const new_next_block =
_Heap_Block_at(the_block, new_block_size);
uint32_t const new_next_block_size =
next_block_size + free_block_size;
14de0: e59d3000 ldr r3, [sp]
_HAssert(_Heap_Is_block_in(the_heap, next_next_block));
the_block->size = new_block_size | prev_used_flag;
new_next_block->size = new_next_block_size | HEAP_PREV_USED;
next_next_block->prev_size = new_next_block_size;
14de4: e59dc000 ldr ip, [sp]
if (!next_is_used) {
/* Extend the next block to the low addresses by 'free_block_size' */
Heap_Block *const new_next_block =
_Heap_Block_at(the_block, new_block_size);
uint32_t const new_next_block_size =
next_block_size + free_block_size;
14de8: e0842003 add r2, r4, r3
14dec: e0861000 add r1, r6, r0
_HAssert(_Heap_Is_block_in(the_heap, next_next_block));
the_block->size = new_block_size | prev_used_flag;
14df0: e1803009 orr r3, r0, r9
new_next_block->size = new_next_block_size | HEAP_PREV_USED;
14df4: e3820001 orr r0, r2, #1 ; 0x1
next_next_block->prev_size = new_next_block_size;
14df8: e787200c str r2, [r7, ip]
Heap_Block *const new_next_block =
_Heap_Block_at(the_block, new_block_size);
uint32_t const new_next_block_size =
next_block_size + free_block_size;
_HAssert(_Heap_Is_block_in(the_heap, next_next_block));
the_block->size = new_block_size | prev_used_flag;
14dfc: e5863004 str r3, [r6, #4]
new_next_block->size = new_next_block_size | HEAP_PREV_USED;
14e00: e5810004 str r0, [r1, #4]
next_next_block->prev_size = new_next_block_size;
_Heap_Block_replace(next_block, new_next_block);
the_heap->stats.free_size += free_block_size;
14e04: e5953030 ldr r3, [r5, #48]
14e08: e0833004 add r3, r3, r4
Heap_Block *new_block
)
{
Heap_Block *block = old_block;
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
14e0c: e597000c ldr r0, [r7, #12]
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *block = old_block;
Heap_Block *next = block->next;
14e10: e597c008 ldr ip, [r7, #8]
14e14: e5853030 str r3, [r5, #48]
*avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD;
14e18: e59d3030 ldr r3, [sp, #48]
14e1c: e2422004 sub r2, r2, #4 ; 0x4
Heap_Block *prev = block->prev;
block = new_block;
block->next = next;
14e20: e581c008 str ip, [r1, #8]
block->prev = prev;
14e24: e581000c str r0, [r1, #12]
14e28: e5832000 str r2, [r3]
next->prev = prev->next = block;
14e2c: e5801008 str r1, [r0, #8]
14e30: e58c100c str r1, [ip, #12]
14e34: eaffffe1 b 14dc0 <_Heap_Resize_block+0x1cc>
_Heap_Align_up(&add_block_size, page_size);
if (add_block_size < min_block_size)
add_block_size = min_block_size;
if (add_block_size > next_block_size)
return HEAP_RESIZE_UNSATISFIED; /* Next block is too small or none. */
add_block_size =
14e38: e1a01007 mov r1, r7
14e3c: e1a00005 mov r0, r5
14e40: ebffc2d3 bl 5994 <_Heap_Block_allocate>
_Heap_Block_allocate(the_heap, next_block, add_block_size);
/* Merge two subsequent blocks */
the_block->size = (old_block_size + add_block_size) | prev_used_flag;
14e44: e080000a add r0, r0, sl
14e48: e1800009 orr r0, r0, r9
14e4c: e5860004 str r0, [r6, #4]
--stats->used_blocks;
14e50: e5953040 ldr r3, [r5, #64]
14e54: e2433001 sub r3, r3, #1 ; 0x1
14e58: e5853040 str r3, [r5, #64]
14e5c: eaffffd7 b 14dc0 <_Heap_Resize_block+0x1cc>
0000e2c8 <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *the_heap,
int source,
bool do_dump
)
{
e2c8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
Heap_Block *the_block = the_heap->start;
Heap_Block *const end = the_heap->final;
e2cc: e5903024 ldr r3, [r0, #36]
Heap_Control *the_heap,
int source,
bool do_dump
)
{
Heap_Block *the_block = the_heap->start;
e2d0: e5906020 ldr r6, [r0, #32]
bool _Heap_Walk(
Heap_Control *the_heap,
int source,
bool do_dump
)
{
e2d4: e24dd004 sub sp, sp, #4 ; 0x4
Heap_Block *the_block = the_heap->start;
Heap_Block *const end = the_heap->final;
e2d8: e58d3000 str r3, [sp]
/*
* Handle the 1st block
*/
if (!_Heap_Is_prev_used(the_block)) {
e2dc: e5963004 ldr r3, [r6, #4]
/*
if ( !_System_state_Is_up( _System_state_Get() ) )
return TRUE;
*/
if (source < 0)
e2e0: e251b000 subs fp, r1, #0 ; 0x0
source = the_heap->stats.instance;
e2e4: b590b028 ldrlt fp, [r0, #40]
/*
* Handle the 1st block
*/
if (!_Heap_Is_prev_used(the_block)) {
e2e8: e3130001 tst r3, #1 ; 0x1
bool _Heap_Walk(
Heap_Control *the_heap,
int source,
bool do_dump
)
{
e2ec: e1a05000 mov r5, r0
/*
* Handle the 1st block
*/
if (!_Heap_Is_prev_used(the_block)) {
e2f0: 13a08000 movne r8, #0 ; 0x0
e2f4: 0a000086 beq e514 <_Heap_Walk+0x24c>
printk("PASS: %d !HEAP_PREV_USED flag of 1st block isn't set\n", source);
error = 1;
}
if (the_block->prev_size != the_heap->page_size) {
e2f8: e5962000 ldr r2, [r6]
e2fc: e5953010 ldr r3, [r5, #16]
e300: e1520003 cmp r2, r3
e304: 0a000003 beq e318 <_Heap_Walk+0x50>
printk("PASS: %d !prev_size of 1st block isn't page_size\n", source);
e308: e59f0238 ldr r0, [pc, #568] ; e548 <_Heap_Walk+0x280> <== NOT EXECUTED
e30c: e1a0100b mov r1, fp <== NOT EXECUTED
e310: ebffd9e4 bl 4aa8 <printk> <== NOT EXECUTED
e314: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED
error = 1;
}
while ( the_block != end ) {
e318: e59d3000 ldr r3, [sp]
e31c: e1560003 cmp r6, r3
e320: 0a000080 beq e528 <_Heap_Walk+0x260>
*/
RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size (
Heap_Block *the_block
)
{
return (the_block->size & ~HEAP_PREV_USED);
e324: e5960004 ldr r0, [r6, #4]
printk(" prev_size %d", the_block->prev_size);
else
printk(" (prev_size) %d", the_block->prev_size);
}
if (!_Heap_Is_block_in(the_heap, next_block)) {
e328: e5951020 ldr r1, [r5, #32]
e32c: e3c07001 bic r7, r0, #1 ; 0x1
e330: e5952024 ldr r2, [r5, #36]
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
e334: e0864007 add r4, r6, r7
e338: e1540001 cmp r4, r1
e33c: 33a03000 movcc r3, #0 ; 0x0
e340: 23a03001 movcs r3, #1 ; 0x1
e344: e1540002 cmp r4, r2
e348: 83a03000 movhi r3, #0 ; 0x0
e34c: e3530000 cmp r3, #0 ; 0x0
*/
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used (
Heap_Block *the_block
)
{
return (the_block->size & HEAP_PREV_USED);
e350: 1200a001 andne sl, r0, #1 ; 0x1
e354: 11a09004 movne r9, r4
e358: 0a000075 beq e534 <_Heap_Walk+0x26c>
printk("PASS: %d !block %p is out of heap\n", source, next_block);
error = 1;
break;
}
if (!_Heap_Is_prev_used(next_block)) {
e35c: e5943004 ldr r3, [r4, #4]
e360: e3130001 tst r3, #1 ; 0x1
e364: 1a00003f bne e468 <_Heap_Walk+0x1a0>
if (do_dump)
printk( " prev %p next %p", the_block->prev, the_block->next);
if (_Heap_Block_size(the_block) != next_block->prev_size) {
e368: e5943000 ldr r3, [r4]
e36c: e1530007 cmp r3, r7
e370: 0a000003 beq e384 <_Heap_Walk+0xbc>
if (do_dump) printk("\n");
printk("PASS: %d !front and back sizes don't match", source);
e374: e59f01d0 ldr r0, [pc, #464] ; e54c <_Heap_Walk+0x284> <== NOT EXECUTED
e378: e1a0100b mov r1, fp <== NOT EXECUTED
e37c: ebffd9c9 bl 4aa8 <printk> <== NOT EXECUTED
e380: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED
error = 1;
}
if (!prev_used) {
e384: e35a0000 cmp sl, #0 ; 0x0
e388: 1a000005 bne e3a4 <_Heap_Walk+0xdc>
if (do_dump || error) printk("\n");
e38c: e3580000 cmp r8, #0 ; 0x0 <== NOT EXECUTED
e390: 1a00005c bne e508 <_Heap_Walk+0x240> <== NOT EXECUTED
printk("PASS: %d !two consecutive blocks are free", source);
e394: e59f01b4 ldr r0, [pc, #436] ; e550 <_Heap_Walk+0x288> <== NOT EXECUTED
e398: e1a0100b mov r1, fp <== NOT EXECUTED
e39c: ebffd9c1 bl 4aa8 <printk> <== NOT EXECUTED
e3a0: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First (
Heap_Control *the_heap
)
{
return _Heap_Head(the_heap)->next;
e3a4: e5953008 ldr r3, [r5, #8]
error = 1;
}
{ /* Check if 'the_block' is in the free block list */
Heap_Block* block = _Heap_First(the_heap);
while(block != the_block && block != tail)
e3a8: e1530006 cmp r3, r6
e3ac: 11550003 cmpne r5, r3
e3b0: 0a000003 beq e3c4 <_Heap_Walk+0xfc>
block = block->next;
e3b4: e5933008 ldr r3, [r3, #8]
error = 1;
}
{ /* Check if 'the_block' is in the free block list */
Heap_Block* block = _Heap_First(the_heap);
while(block != the_block && block != tail)
e3b8: e1530006 cmp r3, r6
e3bc: 11550003 cmpne r5, r3
e3c0: 1afffffb bne e3b4 <_Heap_Walk+0xec>
block = block->next;
if(block != the_block) {
e3c4: e1530006 cmp r3, r6
e3c8: 0a000026 beq e468 <_Heap_Walk+0x1a0>
if (do_dump || error) printk("\n");
e3cc: e3580000 cmp r8, #0 ; 0x0 <== NOT EXECUTED
e3d0: 1a000049 bne e4fc <_Heap_Walk+0x234> <== NOT EXECUTED
printk("PASS: %d !the_block not in the free list", source);
e3d4: e59f0178 ldr r0, [pc, #376] ; e554 <_Heap_Walk+0x28c> <== NOT EXECUTED
e3d8: e1a0100b mov r1, fp <== NOT EXECUTED
e3dc: ebffd9b1 bl 4aa8 <printk> <== NOT EXECUTED
error = 1;
}
}
}
if (do_dump || error) printk("\n");
e3e0: e59f0170 ldr r0, [pc, #368] ; e558 <_Heap_Walk+0x290> <== NOT EXECUTED
e3e4: ebffd9af bl 4aa8 <printk> <== NOT EXECUTED
if (the_size < the_heap->min_block_size) {
e3e8: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED
e3ec: e1530007 cmp r3, r7 <== NOT EXECUTED
error = 1;
}
}
}
if (do_dump || error) printk("\n");
e3f0: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED
if (the_size < the_heap->min_block_size) {
e3f4: 8a000020 bhi e47c <_Heap_Walk+0x1b4> <== NOT EXECUTED
printk("PASS: %d !block size is too small\n", source);
error = 1;
break;
}
if (!_Heap_Is_aligned( the_size, the_heap->page_size)) {
e3f8: e1a00007 mov r0, r7
e3fc: e5951010 ldr r1, [r5, #16]
e400: eb002749 bl 1812c <__umodsi3>
e404: e3500000 cmp r0, #0 ; 0x0
e408: 1a000031 bne e4d4 <_Heap_Walk+0x20c>
printk("PASS: %d !block size is misaligned\n", source);
error = 1;
}
if (++passes > (do_dump ? 10 : 0) && error)
e40c: e3580000 cmp r8, #0 ; 0x0
e410: 1a000032 bne e4e0 <_Heap_Walk+0x218>
if (the_block->prev_size != the_heap->page_size) {
printk("PASS: %d !prev_size of 1st block isn't page_size\n", source);
error = 1;
}
while ( the_block != end ) {
e414: e59d3000 ldr r3, [sp]
e418: e1530004 cmp r3, r4
e41c: 0a000041 beq e528 <_Heap_Walk+0x260>
*/
RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size (
Heap_Block *the_block
)
{
return (the_block->size & ~HEAP_PREV_USED);
e420: e5940004 ldr r0, [r4, #4]
printk(" prev_size %d", the_block->prev_size);
else
printk(" (prev_size) %d", the_block->prev_size);
}
if (!_Heap_Is_block_in(the_heap, next_block)) {
e424: e5951020 ldr r1, [r5, #32]
e428: e3c07001 bic r7, r0, #1 ; 0x1
e42c: e5952024 ldr r2, [r5, #36]
e430: e0844007 add r4, r4, r7
e434: e1540001 cmp r4, r1
e438: 33a03000 movcc r3, #0 ; 0x0
e43c: 23a03001 movcs r3, #1 ; 0x1
e440: e1540002 cmp r4, r2
e444: 83a03000 movhi r3, #0 ; 0x0
e448: e3530000 cmp r3, #0 ; 0x0
e44c: 0a000037 beq e530 <_Heap_Walk+0x268>
printk("PASS: %d !block %p is out of heap\n", source, next_block);
error = 1;
break;
}
if (!_Heap_Is_prev_used(next_block)) {
e450: e5943004 ldr r3, [r4, #4]
e454: e3130001 tst r3, #1 ; 0x1
*/
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used (
Heap_Block *the_block
)
{
return (the_block->size & HEAP_PREV_USED);
e458: e1a06009 mov r6, r9
e45c: e200a001 and sl, r0, #1 ; 0x1
e460: e1a09004 mov r9, r4
e464: 0affffbf beq e368 <_Heap_Walk+0xa0>
error = 1;
}
}
}
if (do_dump || error) printk("\n");
e468: e3580000 cmp r8, #0 ; 0x0
e46c: 1affffdb bne e3e0 <_Heap_Walk+0x118>
if (the_size < the_heap->min_block_size) {
e470: e5953014 ldr r3, [r5, #20]
e474: e1530007 cmp r3, r7
e478: 9affffde bls e3f8 <_Heap_Walk+0x130>
printk("PASS: %d !block size is too small\n", source);
e47c: e59f00d8 ldr r0, [pc, #216] ; e55c <_Heap_Walk+0x294> <== NOT EXECUTED
e480: e1a0100b mov r1, fp <== NOT EXECUTED
e484: ebffd987 bl 4aa8 <printk> <== NOT EXECUTED
the_block = next_block;
}
if (the_block != end) {
printk("PASS: %d !last block address isn't equal to 'final' %p %p\n",
e488: e59d3000 ldr r3, [sp] <== NOT EXECUTED
e48c: e59f00cc ldr r0, [pc, #204] ; e560 <_Heap_Walk+0x298> <== NOT EXECUTED
e490: e1a0100b mov r1, fp <== NOT EXECUTED
e494: e1a02006 mov r2, r6 <== NOT EXECUTED
e498: ebffd982 bl 4aa8 <printk> <== NOT EXECUTED
e49c: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size (
Heap_Block *the_block
)
{
return (the_block->size & ~HEAP_PREV_USED);
e4a0: e5963004 ldr r3, [r6, #4]
source, the_block, end);
error = 1;
}
if (_Heap_Block_size(the_block) != the_heap->page_size) {
e4a4: e5950010 ldr r0, [r5, #16]
e4a8: e3c32001 bic r2, r3, #1 ; 0x1
e4ac: e1500002 cmp r0, r2
e4b0: 01a00008 moveq r0, r8
e4b4: 0a000004 beq e4cc <_Heap_Walk+0x204>
printk("PASS: %d !last block's size isn't page_size (%d != %d)\n", source,
e4b8: e1a03000 mov r3, r0 <== NOT EXECUTED
e4bc: e1a0100b mov r1, fp <== NOT EXECUTED
e4c0: e59f009c ldr r0, [pc, #156] ; e564 <_Heap_Walk+0x29c> <== NOT EXECUTED
e4c4: ebffd977 bl 4aa8 <printk> <== NOT EXECUTED
e4c8: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED
if(do_dump && error)
_Internal_error_Occurred( INTERNAL_ERROR_CORE, TRUE, 0xffff0000 );
return error;
}
e4cc: e28dd004 add sp, sp, #4 ; 0x4
e4d0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
printk("PASS: %d !block size is too small\n", source);
error = 1;
break;
}
if (!_Heap_Is_aligned( the_size, the_heap->page_size)) {
printk("PASS: %d !block size is misaligned\n", source);
e4d4: e59f008c ldr r0, [pc, #140] ; e568 <_Heap_Walk+0x2a0> <== NOT EXECUTED
e4d8: e1a0100b mov r1, fp <== NOT EXECUTED
e4dc: ebffd971 bl 4aa8 <printk> <== NOT EXECUTED
the_block = next_block;
}
if (the_block != end) {
printk("PASS: %d !last block address isn't equal to 'final' %p %p\n",
e4e0: e59d3000 ldr r3, [sp] <== NOT EXECUTED
e4e4: e59f0074 ldr r0, [pc, #116] ; e560 <_Heap_Walk+0x298> <== NOT EXECUTED
e4e8: e1a0100b mov r1, fp <== NOT EXECUTED
e4ec: e1a02006 mov r2, r6 <== NOT EXECUTED
e4f0: ebffd96c bl 4aa8 <printk> <== NOT EXECUTED
e4f4: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED
e4f8: eaffffe8 b e4a0 <_Heap_Walk+0x1d8> <== NOT EXECUTED
{ /* Check if 'the_block' is in the free block list */
Heap_Block* block = _Heap_First(the_heap);
while(block != the_block && block != tail)
block = block->next;
if(block != the_block) {
if (do_dump || error) printk("\n");
e4fc: e59f0054 ldr r0, [pc, #84] ; e558 <_Heap_Walk+0x290> <== NOT EXECUTED
e500: ebffd968 bl 4aa8 <printk> <== NOT EXECUTED
e504: eaffffb2 b e3d4 <_Heap_Walk+0x10c> <== NOT EXECUTED
if (do_dump) printk("\n");
printk("PASS: %d !front and back sizes don't match", source);
error = 1;
}
if (!prev_used) {
if (do_dump || error) printk("\n");
e508: e59f0048 ldr r0, [pc, #72] ; e558 <_Heap_Walk+0x290> <== NOT EXECUTED
e50c: ebffd965 bl 4aa8 <printk> <== NOT EXECUTED
e510: eaffff9f b e394 <_Heap_Walk+0xcc> <== NOT EXECUTED
/*
* Handle the 1st block
*/
if (!_Heap_Is_prev_used(the_block)) {
printk("PASS: %d !HEAP_PREV_USED flag of 1st block isn't set\n", source);
e514: e59f0050 ldr r0, [pc, #80] ; e56c <_Heap_Walk+0x2a4> <== NOT EXECUTED
e518: e1a0100b mov r1, fp <== NOT EXECUTED
e51c: ebffd961 bl 4aa8 <printk> <== NOT EXECUTED
e520: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED
e524: eaffff73 b e2f8 <_Heap_Walk+0x30> <== NOT EXECUTED
source, the_block, end);
error = 1;
}
if (_Heap_Block_size(the_block) != the_heap->page_size) {
printk("PASS: %d !last block's size isn't page_size (%d != %d)\n", source,
e528: e59d6000 ldr r6, [sp]
e52c: eaffffdb b e4a0 <_Heap_Walk+0x1d8>
*/
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used (
Heap_Block *the_block
)
{
return (the_block->size & HEAP_PREV_USED);
e530: e1a06009 mov r6, r9 <== NOT EXECUTED
printk(" (prev_size) %d", the_block->prev_size);
}
if (!_Heap_Is_block_in(the_heap, next_block)) {
if (do_dump) printk("\n");
printk("PASS: %d !block %p is out of heap\n", source, next_block);
e534: e1a02004 mov r2, r4 <== NOT EXECUTED
e538: e59f0030 ldr r0, [pc, #48] ; e570 <_Heap_Walk+0x2a8> <== NOT EXECUTED
e53c: e1a0100b mov r1, fp <== NOT EXECUTED
e540: ebffd958 bl 4aa8 <printk> <== NOT EXECUTED
e544: eaffffe5 b e4e0 <_Heap_Walk+0x218> <== NOT EXECUTED
0000abd0 <_Objects_API_maximum_class>:
int _Objects_API_maximum_class(
uint32_t api
)
{
switch (api) {
abd0: e2400001 sub r0, r0, #1 ; 0x1
abd4: e3500003 cmp r0, #3 ; 0x3
abd8: 979ff100 ldrls pc, [pc, r0, lsl #2]
abdc: ea000003 b abf0 <_Objects_API_maximum_class+0x20>
abe0: 0000ac10 .word 0x0000ac10
abe4: 0000ac08 .word 0x0000ac08
abe8: 0000ac00 .word 0x0000ac00
abec: 0000abf8 .word 0x0000abf8
case OBJECTS_CLASSIC_API:
return OBJECTS_RTEMS_CLASSES_LAST;
case OBJECTS_POSIX_API:
return OBJECTS_POSIX_CLASSES_LAST;
case OBJECTS_ITRON_API:
return OBJECTS_ITRON_CLASSES_LAST;
abf0: e3e00000 mvn r0, #0 ; 0x0
case OBJECTS_NO_API:
default:
break;
}
return -1;
}
abf4: e12fff1e bx lr
case OBJECTS_INTERNAL_API:
return OBJECTS_INTERNAL_CLASSES_LAST;
case OBJECTS_CLASSIC_API:
return OBJECTS_RTEMS_CLASSES_LAST;
case OBJECTS_POSIX_API:
return OBJECTS_POSIX_CLASSES_LAST;
abf8: e3a00008 mov r0, #8 ; 0x8
abfc: e12fff1e bx lr
int _Objects_API_maximum_class(
uint32_t api
)
{
switch (api) {
ac00: e3a0000c mov r0, #12 ; 0xc
ac04: e12fff1e bx lr
ac08: e3a0000a mov r0, #10 ; 0xa
ac0c: e12fff1e bx lr
ac10: e3a00002 mov r0, #2 ; 0x2
ac14: e12fff1e bx lr
00005b78 <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
5b78: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
*/
RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_index(
Objects_Id id
)
{
return (id >> OBJECTS_INDEX_START_BIT) & OBJECTS_INDEX_VALID_BITS;
5b7c: e1d0a0b8 ldrh sl, [r0, #8]
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
if ( information->maximum < minimum_index )
5b80: e1d091b0 ldrh r9, [r0, #16]
5b84: e159000a cmp r9, sl
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
5b88: e24dd014 sub sp, sp, #20 ; 0x14
5b8c: e1a05000 mov r5, r0
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
if ( information->maximum < minimum_index )
5b90: 2a000071 bcs 5d5c <_Objects_Extend_information+0x1e4>
5b94: e3a07000 mov r7, #0 ; 0x0
5b98: e5904014 ldr r4, [r0, #20]
5b9c: e1a0800a mov r8, sl
5ba0: e1a06007 mov r6, r7
5ba4: e3a0b001 mov fp, #1 ; 0x1
5ba8: e3a00003 mov r0, #3 ; 0x3
/*
* Allocate the tables and break it up.
*/
if ( information->auto_extend ) {
5bac: e5d53012 ldrb r3, [r5, #18]
* Up the block count and maximum
*/
block_count++;
maximum = information->maximum + information->allocation_size;
5bb0: e0849009 add r9, r4, r9
/*
* Allocate the tables and break it up.
*/
if ( information->auto_extend ) {
5bb4: e3530000 cmp r3, #0 ; 0x0
* Up the block count and maximum
*/
block_count++;
maximum = information->maximum + information->allocation_size;
5bb8: e58d9004 str r9, [sp, #4]
/*
* Allocate the tables and break it up.
*/
if ( information->auto_extend ) {
5bbc: 1a000080 bne 5dc4 <_Objects_Extend_information+0x24c>
if ( !object_blocks )
return;
}
else {
object_blocks = (void**)
5bc0: e59d3004 ldr r3, [sp, #4]
5bc4: e080000a add r0, r0, sl
5bc8: e0800003 add r0, r0, r3
5bcc: e1a00100 lsl r0, r0, #2
5bd0: eb000893 bl 7e24 <_Workspace_Allocate_or_fatal_error>
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
5bd4: e1d531b0 ldrh r3, [r5, #16]
/*
* Break the block into the various sections.
*
*/
inactive_per_block = (uint32_t *) _Addresses_Add_offset(
5bd8: e1a0210b lsl r2, fp, #2
if ( !object_blocks )
return;
}
else {
object_blocks = (void**)
5bdc: e1a0c000 mov ip, r0
/*
* Break the block into the various sections.
*
*/
inactive_per_block = (uint32_t *) _Addresses_Add_offset(
5be0: e08c9002 add r9, ip, r2
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
5be4: e153000a cmp r3, sl
5be8: e0894002 add r4, r9, r2
5bec: 8a000080 bhi 5df4 <_Objects_Extend_information+0x27c>
else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
5bf0: e35a0000 cmp sl, #0 ; 0x0
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
5bf4: 13a03000 movne r3, #0 ; 0x0
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
local_table[ index ] = NULL;
5bf8: 11a02003 movne r2, r3
else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
5bfc: 0a000003 beq 5c10 <_Objects_Extend_information+0x98>
local_table[ index ] = NULL;
5c00: e7842103 str r2, [r4, r3, lsl #2]
else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
5c04: e2833001 add r3, r3, #1 ; 0x1
5c08: e153000a cmp r3, sl
5c0c: 3afffffb bcc 5c00 <_Objects_Extend_information+0x88>
5c10: e1a07107 lsl r7, r7, #2
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
5c14: e3a00000 mov r0, #0 ; 0x0
inactive_per_block[block_count] = 0;
5c18: e7890007 str r0, [r9, r7]
for ( index=index_base ;
index < ( information->allocation_size + index_base );
5c1c: e5953014 ldr r3, [r5, #20]
5c20: e0881003 add r1, r8, r3
5c24: e1580001 cmp r8, r1
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
5c28: e78c0007 str r0, [ip, r7]
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
5c2c: 2a000006 bcs 5c4c <_Objects_Extend_information+0xd4>
5c30: e1a03108 lsl r3, r8, #2
5c34: e0842003 add r2, r4, r3
5c38: e1a03008 mov r3, r8
index++ ) {
5c3c: e2833001 add r3, r3, #1 ; 0x1
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
5c40: e1530001 cmp r3, r1
index++ ) {
local_table[ index ] = NULL;
5c44: e4820004 str r0, [r2], #4
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
5c48: 3afffffb bcc 5c3c <_Objects_Extend_information+0xc4>
index++ ) {
local_table[ index ] = NULL;
}
_ISR_Disable( level );
5c4c: e10f0000 mrs r0, CPSR
5c50: e38030c0 orr r3, r0, #192 ; 0xc0
5c54: e129f003 msr CPSR_fc, r3
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = maximum;
information->maximum_id = _Objects_Build_id(
5c58: e5953000 ldr r3, [r5]
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = maximum;
5c5c: e59de004 ldr lr, [sp, #4]
information->maximum_id = _Objects_Build_id(
5c60: e1d510b4 ldrh r1, [r5, #4]
5c64: e1a03c03 lsl r3, r3, #24
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = maximum;
5c68: e1a0280e lsl r2, lr, #16
information->maximum_id = _Objects_Build_id(
5c6c: e3833801 orr r3, r3, #65536 ; 0x10000
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = maximum;
5c70: e1a02822 lsr r2, r2, #16
information->maximum_id = _Objects_Build_id(
5c74: e1833d81 orr r3, r3, r1, lsl #27
5c78: e1833002 orr r3, r3, r2
5c7c: e585300c str r3, [r5, #12]
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
5c80: e5859030 str r9, [r5, #48]
local_table[ index ] = NULL;
}
_ISR_Disable( level );
old_tables = information->object_blocks;
5c84: e5953034 ldr r3, [r5, #52]
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
5c88: e585401c str r4, [r5, #28]
information->maximum = maximum;
5c8c: e1c521b0 strh r2, [r5, #16]
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
5c90: e585c034 str ip, [r5, #52]
information->the_class,
_Objects_Local_node,
information->maximum
);
_ISR_Enable( level );
5c94: e129f000 msr CPSR_fc, r0
if ( old_tables )
5c98: e3530000 cmp r3, #0 ; 0x0
_Workspace_Free( old_tables );
5c9c: 11a00003 movne r0, r3
5ca0: 1b000857 blne 7e04 <_Workspace_Free>
5ca4: e5954014 ldr r4, [r5, #20]
/*
* Allocate the name table, and the objects
*/
if ( information->auto_extend ) {
5ca8: e5d53012 ldrb r3, [r5, #18]
5cac: e3530000 cmp r3, #0 ; 0x0
5cb0: 0a000061 beq 5e3c <_Objects_Extend_information+0x2c4>
information->object_blocks[ block ] =
5cb4: e5953018 ldr r3, [r5, #24]
5cb8: e0000493 mul r0, r3, r4
5cbc: e5954034 ldr r4, [r5, #52]
5cc0: eb000853 bl 7e14 <_Workspace_Allocate>
_Workspace_Allocate(
(information->allocation_size * information->size)
);
if ( !information->object_blocks[ block ] )
5cc4: e5953034 ldr r3, [r5, #52]
/*
* Allocate the name table, and the objects
*/
if ( information->auto_extend ) {
information->object_blocks[ block ] =
5cc8: e7840106 str r0, [r4, r6, lsl #2]
_Workspace_Allocate(
(information->allocation_size * information->size)
);
if ( !information->object_blocks[ block ] )
5ccc: e7931106 ldr r1, [r3, r6, lsl #2]
5cd0: e3510000 cmp r1, #0 ; 0x0
/*
* Allocate the name table, and the objects
*/
if ( information->auto_extend ) {
information->object_blocks[ block ] =
5cd4: e1a0a106 lsl sl, r6, #2
_Workspace_Allocate(
(information->allocation_size * information->size)
);
if ( !information->object_blocks[ block ] )
5cd8: 0a00001d beq 5d54 <_Objects_Extend_information+0x1dc>
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
5cdc: e28d7008 add r7, sp, #8 ; 0x8
5ce0: e1a00007 mov r0, r7
5ce4: e2852014 add r2, r5, #20 ; 0x14
5ce8: e892000c ldm r2, {r2, r3}
5cec: eb001284 bl a704 <_Chain_Initialize>
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
5cf0: e1a04008 mov r4, r8
5cf4: e2856020 add r6, r5, #32 ; 0x20
5cf8: ea000008 b 5d20 <_Objects_Extend_information+0x1a8>
index = index_base;
while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) {
the_object->id = _Objects_Build_id(
5cfc: e5953000 ldr r3, [r5]
5d00: e1d520b4 ldrh r2, [r5, #4]
5d04: e1a03c03 lsl r3, r3, #24
5d08: e3833801 orr r3, r3, #65536 ; 0x10000
5d0c: e1833d82 orr r3, r3, r2, lsl #27
5d10: e1833004 orr r3, r3, r4
5d14: e58c3008 str r3, [ip, #8]
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
5d18: ebfffd6f bl 52dc <_Chain_Append>
index++;
5d1c: e2844001 add r4, r4, #1 ; 0x1
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) {
5d20: e1a00007 mov r0, r7
5d24: eb001269 bl a6d0 <_Chain_Get>
5d28: e250c000 subs ip, r0, #0 ; 0x0
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
5d2c: e1a0100c mov r1, ip
5d30: e1a00006 mov r0, r6
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) {
5d34: 1afffff0 bne 5cfc <_Objects_Extend_information+0x184>
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
5d38: e5953014 ldr r3, [r5, #20]
5d3c: e5952030 ldr r2, [r5, #48]
5d40: e782300a str r3, [r2, sl]
information->inactive += information->allocation_size;
5d44: e1d512bc ldrh r1, [r5, #44]
5d48: e5953014 ldr r3, [r5, #20]
5d4c: e0833001 add r3, r3, r1
5d50: e1c532bc strh r3, [r5, #44]
}
5d54: e28dd014 add sp, sp, #20 ; 0x14
5d58: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
block = 0;
if ( information->maximum < minimum_index )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
5d5c: e5904014 ldr r4, [r0, #20]
5d60: e1a00009 mov r0, r9
5d64: e1a01004 mov r1, r4
5d68: eb0033d0 bl 12cb0 <__aeabi_uidiv>
for ( ; block < block_count; block++ ) {
5d6c: e2507000 subs r7, r0, #0 ; 0x0
5d70: 0a00003a beq 5e60 <_Objects_Extend_information+0x2e8>
if ( information->object_blocks[ block ] == NULL )
5d74: e5952034 ldr r2, [r5, #52]
5d78: e5923000 ldr r3, [r2]
5d7c: e3530000 cmp r3, #0 ; 0x0
5d80: 11a0800a movne r8, sl
5d84: 13a06000 movne r6, #0 ; 0x0
5d88: 1a000003 bne 5d9c <_Objects_Extend_information+0x224>
5d8c: ea000033 b 5e60 <_Objects_Extend_information+0x2e8> <== NOT EXECUTED
5d90: e7923106 ldr r3, [r2, r6, lsl #2]
5d94: e3530000 cmp r3, #0 ; 0x0
5d98: 0a000003 beq 5dac <_Objects_Extend_information+0x234>
if ( information->maximum < minimum_index )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
5d9c: e2866001 add r6, r6, #1 ; 0x1
5da0: e1570006 cmp r7, r6
if ( information->object_blocks[ block ] == NULL )
break;
else
index_base += information->allocation_size;
5da4: e0888004 add r8, r8, r4
if ( information->maximum < minimum_index )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
5da8: 8afffff8 bhi 5d90 <_Objects_Extend_information+0x218>
/*
* If the index_base is the maximum we need to grow the tables.
*/
if (index_base >= information->maximum ) {
5dac: e1580009 cmp r8, r9
5db0: 3affffbc bcc 5ca8 <_Objects_Extend_information+0x130>
5db4: e287b001 add fp, r7, #1 ; 0x1
5db8: e1a0308b lsl r3, fp, #1
5dbc: e083000b add r0, r3, fp
5dc0: eaffff79 b 5bac <_Objects_Extend_information+0x34>
/*
* Allocate the tables and break it up.
*/
if ( information->auto_extend ) {
object_blocks = (void**)
5dc4: e080000a add r0, r0, sl
5dc8: e0800009 add r0, r0, r9
5dcc: e1a00100 lsl r0, r0, #2
5dd0: eb00080f bl 7e14 <_Workspace_Allocate>
block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *))
);
if ( !object_blocks )
5dd4: e250c000 subs ip, r0, #0 ; 0x0
5dd8: 0affffdd beq 5d54 <_Objects_Extend_information+0x1dc>
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
5ddc: e1d531b0 ldrh r3, [r5, #16]
/*
* Break the block into the various sections.
*
*/
inactive_per_block = (uint32_t *) _Addresses_Add_offset(
5de0: e1a0210b lsl r2, fp, #2
5de4: e08c9002 add r9, ip, r2
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
5de8: e153000a cmp r3, sl
5dec: e0894002 add r4, r9, r2
5df0: 9affff7e bls 5bf0 <_Objects_Extend_information+0x78>
/*
* Copy each section of the table over. This has to be performed as
* separate parts as size of each block has changed.
*/
memcpy( object_blocks,
5df4: e1a07107 lsl r7, r7, #2
5df8: e1a0000c mov r0, ip
5dfc: e5951034 ldr r1, [r5, #52]
5e00: e1a02007 mov r2, r7
5e04: e58dc000 str ip, [sp]
5e08: eb001a47 bl c72c <memcpy>
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
5e0c: e5951030 ldr r1, [r5, #48]
5e10: e1a02007 mov r2, r7
5e14: e1a00009 mov r0, r9
5e18: eb001a43 bl c72c <memcpy>
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
5e1c: e1d521b0 ldrh r2, [r5, #16]
5e20: e08a2002 add r2, sl, r2
5e24: e1a02102 lsl r2, r2, #2
5e28: e1a00004 mov r0, r4
5e2c: e595101c ldr r1, [r5, #28]
5e30: eb001a3d bl c72c <memcpy>
5e34: e59dc000 ldr ip, [sp]
5e38: eaffff75 b 5c14 <_Objects_Extend_information+0x9c>
if ( !information->object_blocks[ block ] )
return;
}
else {
information->object_blocks[ block ] =
5e3c: e5953018 ldr r3, [r5, #24]
5e40: e0000493 mul r0, r3, r4
5e44: e5954034 ldr r4, [r5, #52]
5e48: eb0007f5 bl 7e24 <_Workspace_Allocate_or_fatal_error>
5e4c: e5953034 ldr r3, [r5, #52]
5e50: e7840106 str r0, [r4, r6, lsl #2]
5e54: e1a0a106 lsl sl, r6, #2
5e58: e7931106 ldr r1, [r3, r6, lsl #2]
5e5c: eaffff9e b 5cdc <_Objects_Extend_information+0x164>
if ( information->maximum < minimum_index )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
5e60: e1a0800a mov r8, sl <== NOT EXECUTED
5e64: e3a06000 mov r6, #0 ; 0x0 <== NOT EXECUTED
5e68: eaffffcf b 5dac <_Objects_Extend_information+0x234> <== NOT EXECUTED
00005144 <_POSIX_Condition_variables_Get>:
POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get (
pthread_cond_t *cond,
Objects_Locations *location
)
{
5144: e92d4030 push {r4, r5, lr}
Objects_Id *id = (Objects_Id *)cond;
int status;
if ( !id ) {
5148: e2505000 subs r5, r0, #0 ; 0x0
POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get (
pthread_cond_t *cond,
Objects_Locations *location
)
{
514c: e1a04001 mov r4, r1
Objects_Id *id = (Objects_Id *)cond;
int status;
if ( !id ) {
5150: 0a00000b beq 5184 <_POSIX_Condition_variables_Get+0x40>
*location = OBJECTS_ERROR;
return (POSIX_Condition_variables_Control *) 0;
}
if ( *id == PTHREAD_COND_INITIALIZER ) {
5154: e5951000 ldr r1, [r5]
5158: e3710001 cmn r1, #1 ; 0x1
515c: 0a000003 beq 5170 <_POSIX_Condition_variables_Get+0x2c>
/*
* Now call Objects_Get()
*/
return (POSIX_Condition_variables_Control *)
5160: e59f002c ldr r0, [pc, #44] ; 5194 <_POSIX_Condition_variables_Get+0x50>
5164: e1a02004 mov r2, r4
_Objects_Get( &_POSIX_Condition_variables_Information, *id, location );
}
5168: e8bd4030 pop {r4, r5, lr}
/*
* Now call Objects_Get()
*/
return (POSIX_Condition_variables_Control *)
516c: ea000b92 b 7fbc <_Objects_Get>
if ( *id == PTHREAD_COND_INITIALIZER ) {
/*
* Do an "auto-create" here.
*/
status = pthread_cond_init( (pthread_cond_t *)id, 0 );
5170: e2811001 add r1, r1, #1 ; 0x1 <== NOT EXECUTED
5174: eb000007 bl 5198 <pthread_cond_init> <== NOT EXECUTED
if ( status ) {
5178: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
517c: 05951000 ldreq r1, [r5] <== NOT EXECUTED
5180: 0afffff6 beq 5160 <_POSIX_Condition_variables_Get+0x1c> <== NOT EXECUTED
*location = OBJECTS_ERROR;
5184: e3a03001 mov r3, #1 ; 0x1
5188: e5843000 str r3, [r4]
* Now call Objects_Get()
*/
return (POSIX_Condition_variables_Control *)
_Objects_Get( &_POSIX_Condition_variables_Information, *id, location );
}
518c: e3a00000 mov r0, #0 ; 0x0
5190: e8bd8030 pop {r4, r5, pc}
0000532c <_POSIX_Condition_variables_Wait_support>:
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
532c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
5330: e1a06001 mov r6, r1
5334: e24dd004 sub sp, sp, #4 ; 0x4
5338: e1a07000 mov r7, r0
register POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
int status;
int mutex_status;
if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
533c: e1a0100d mov r1, sp
5340: e1a00006 mov r0, r6
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
5344: e1a0a002 mov sl, r2
5348: e20380ff and r8, r3, #255 ; 0xff
register POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
int status;
int mutex_status;
if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
534c: eb000071 bl 5518 <_POSIX_Mutex_Get>
5350: e3500000 cmp r0, #0 ; 0x0
5354: 0a00001d beq 53d0 <_POSIX_Condition_variables_Wait_support+0xa4>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
5358: e59f30d8 ldr r3, [pc, #216] ; 5438 <_POSIX_Condition_variables_Wait_support+0x10c>
535c: e5932000 ldr r2, [r3]
5360: e2422001 sub r2, r2, #1 ; 0x1
5364: e5832000 str r2, [r3]
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
5368: e1a0100d mov r1, sp
536c: e1a00007 mov r0, r7
5370: ebffff73 bl 5144 <_POSIX_Condition_variables_Get>
switch ( location ) {
5374: e59d3000 ldr r3, [sp]
5378: e3530000 cmp r3, #0 ; 0x0
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
537c: e1a05000 mov r5, r0
switch ( location ) {
5380: 1a000012 bne 53d0 <_POSIX_Condition_variables_Wait_support+0xa4>
case OBJECTS_LOCAL:
if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) {
5384: e5902014 ldr r2, [r0, #20]
5388: e3520000 cmp r2, #0 ; 0x0
538c: 0a000005 beq 53a8 <_POSIX_Condition_variables_Wait_support+0x7c>
5390: e5963000 ldr r3, [r6]
5394: e1520003 cmp r2, r3
5398: 0a000002 beq 53a8 <_POSIX_Condition_variables_Wait_support+0x7c>
_Thread_Enable_dispatch();
539c: eb000d27 bl 8840 <_Thread_Enable_dispatch> <== NOT EXECUTED
53a0: e3a04016 mov r4, #22 ; 0x16 <== NOT EXECUTED
53a4: ea00000a b 53d4 <_POSIX_Condition_variables_Wait_support+0xa8><== NOT EXECUTED
return EINVAL;
}
(void) pthread_mutex_unlock( mutex );
53a8: e1a00006 mov r0, r6
53ac: eb0000e9 bl 5758 <pthread_mutex_unlock>
_Thread_Enable_dispatch();
return EINVAL;
}
*/
if ( !already_timedout ) {
53b0: e3580000 cmp r8, #0 ; 0x0
53b4: 0a000009 beq 53e0 <_POSIX_Condition_variables_Wait_support+0xb4>
status = _Thread_Executing->Wait.return_code;
if ( status && status != ETIMEDOUT )
return status;
} else {
_Thread_Enable_dispatch();
53b8: eb000d20 bl 8840 <_Thread_Enable_dispatch>
53bc: e3a04074 mov r4, #116 ; 0x74
/*
* When we get here the dispatch disable level is 0.
*/
mutex_status = pthread_mutex_lock( mutex );
53c0: e1a00006 mov r0, r6
53c4: eb0000c2 bl 56d4 <pthread_mutex_lock>
if ( mutex_status )
53c8: e3500000 cmp r0, #0 ; 0x0
53cc: 0a000000 beq 53d4 <_POSIX_Condition_variables_Wait_support+0xa8>
53d0: e3a04016 mov r4, #22 ; 0x16
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
53d4: e1a00004 mov r0, r4
53d8: e28dd004 add sp, sp, #4 ; 0x4
53dc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
return EINVAL;
}
*/
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
53e0: e5963000 ldr r3, [r6]
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
53e4: e59f4050 ldr r4, [pc, #80] ; 543c <_POSIX_Condition_variables_Wait_support+0x110>
return EINVAL;
}
*/
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
53e8: e5853014 str r3, [r5, #20]
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
53ec: e5942000 ldr r2, [r4]
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
_Thread_Executing->Wait.id = *cond;
53f0: e5971000 ldr r1, [r7]
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
53f4: e285c018 add ip, r5, #24 ; 0x18
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;
53f8: e3a03001 mov r3, #1 ; 0x1
_Thread_Executing->Wait.id = *cond;
53fc: e5821020 str r1, [r2, #32]
5400: e5853048 str r3, [r5, #72]
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
5404: e582c044 str ip, [r2, #68]
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
5408: e5828034 str r8, [r2, #52]
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
_Thread_Executing->Wait.id = *cond;
_Thread_queue_Enqueue( &the_cond->Wait_queue, timeout );
540c: e1a0000c mov r0, ip
5410: e1a0100a mov r1, sl
5414: e59f2024 ldr r2, [pc, #36] ; 5440 <_POSIX_Condition_variables_Wait_support+0x114>
5418: eb000e50 bl 8d60 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
541c: eb000d07 bl 8840 <_Thread_Enable_dispatch>
/*
* Switch ourself out because we blocked as a result of the
* _Thread_queue_Enqueue.
*/
status = _Thread_Executing->Wait.return_code;
5420: e5943000 ldr r3, [r4]
5424: e5934034 ldr r4, [r3, #52]
if ( status && status != ETIMEDOUT )
5428: e3540000 cmp r4, #0 ; 0x0
542c: 13540074 cmpne r4, #116 ; 0x74
5430: 0affffe2 beq 53c0 <_POSIX_Condition_variables_Wait_support+0x94>
5434: eaffffe6 b 53d4 <_POSIX_Condition_variables_Wait_support+0xa8><== NOT EXECUTED
00010c50 <_POSIX_Message_queue_Create_support>:
const char *name_arg,
int pshared,
struct mq_attr *attr_ptr,
POSIX_Message_queue_Control **message_queue
)
{
10c50: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
10c54: e1a08001 mov r8, r1
10c58: e24dd010 sub sp, sp, #16 ; 0x10
CORE_message_queue_Attributes *the_mq_attr;
struct mq_attr attr;
char *name;
size_t n;
n = strnlen( name_arg, NAME_MAX );
10c5c: e3a010ff mov r1, #255 ; 0xff
const char *name_arg,
int pshared,
struct mq_attr *attr_ptr,
POSIX_Message_queue_Control **message_queue
)
{
10c60: e1a04002 mov r4, r2
10c64: e1a0b003 mov fp, r3
10c68: e1a09000 mov r9, r0
CORE_message_queue_Attributes *the_mq_attr;
struct mq_attr attr;
char *name;
size_t n;
n = strnlen( name_arg, NAME_MAX );
10c6c: eb00125f bl 155f0 <strnlen>
if ( n > NAME_MAX )
10c70: e35000ff cmp r0, #255 ; 0xff
CORE_message_queue_Attributes *the_mq_attr;
struct mq_attr attr;
char *name;
size_t n;
n = strnlen( name_arg, NAME_MAX );
10c74: e1a05000 mov r5, r0
if ( n > NAME_MAX )
10c78: 83a0005b movhi r0, #91 ; 0x5b
10c7c: 8a000031 bhi 10d48 <_POSIX_Message_queue_Create_support+0xf8>
10c80: e59f2148 ldr r2, [pc, #328] ; 10dd0 <_POSIX_Message_queue_Create_support+0x180>
10c84: e5923000 ldr r3, [r2]
10c88: e2833001 add r3, r3, #1 ; 0x1
10c8c: e5823000 str r3, [r2]
* but were not compared against any existing implementation for
* compatibility. See README.mqueue for an example program we
* think will print out the defaults. Report anything you find with it.
*/
if ( attr_ptr == NULL ) {
10c90: e3540000 cmp r4, #0 ; 0x0
10c94: 03a0a010 moveq sl, #16 ; 0x10
10c98: 03a0700a moveq r7, #10 ; 0xa
10c9c: 0a000009 beq 10cc8 <_POSIX_Message_queue_Create_support+0x78>
attr.mq_maxmsg = 10;
attr.mq_msgsize = 16;
} else {
if ( attr_ptr->mq_maxmsg <= 0 ){
10ca0: e5943004 ldr r3, [r4, #4]
10ca4: e3530000 cmp r3, #0 ; 0x0
10ca8: da000033 ble 10d7c <_POSIX_Message_queue_Create_support+0x12c>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( attr_ptr->mq_msgsize <= 0 ){
10cac: e5943008 ldr r3, [r4, #8]
10cb0: e3530000 cmp r3, #0 ; 0x0
10cb4: da000030 ble 10d7c <_POSIX_Message_queue_Create_support+0x12c>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EINVAL );
}
attr = *attr_ptr;
10cb8: e894000f ldm r4, {r0, r1, r2, r3}
10cbc: e88d000f stm sp, {r0, r1, r2, r3}
10cc0: e1a0a002 mov sl, r2
10cc4: e1a07001 mov r7, r1
*/
RTEMS_INLINE_ROUTINE
POSIX_Message_queue_Control *_POSIX_Message_queue_Allocate( void )
{
return (POSIX_Message_queue_Control *)
10cc8: e59f6104 ldr r6, [pc, #260] ; 10dd4 <_POSIX_Message_queue_Create_support+0x184>
10ccc: e1a00006 mov r0, r6
10cd0: ebffef75 bl caac <_Objects_Allocate>
}
the_mq = _POSIX_Message_queue_Allocate();
if ( !the_mq ) {
10cd4: e2504000 subs r4, r0, #0 ; 0x0
10cd8: 0a000036 beq 10db8 <_POSIX_Message_queue_Create_support+0x168>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENFILE );
}
the_mq->process_shared = pshared;
the_mq->named = TRUE;
10cdc: e3a03001 mov r3, #1 ; 0x1
/*
* Make a copy of the user's string for name just in case it was
* dynamically constructed.
*/
name = _Workspace_Allocate(n);
10ce0: e1a00005 mov r0, r5
if ( !the_mq ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENFILE );
}
the_mq->process_shared = pshared;
10ce4: e5848010 str r8, [r4, #16]
the_mq->named = TRUE;
the_mq->open_count = 1;
the_mq->linked = TRUE;
10ce8: e5c43015 strb r3, [r4, #21]
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENFILE );
}
the_mq->process_shared = pshared;
the_mq->named = TRUE;
10cec: e5c43014 strb r3, [r4, #20]
the_mq->open_count = 1;
10cf0: e5843018 str r3, [r4, #24]
/*
* Make a copy of the user's string for name just in case it was
* dynamically constructed.
*/
name = _Workspace_Allocate(n);
10cf4: ebfff899 bl ef60 <_Workspace_Allocate>
if (!name) {
10cf8: e2505000 subs r5, r0, #0 ; 0x0
10cfc: 0a000024 beq 10d94 <_POSIX_Message_queue_Create_support+0x144>
_POSIX_Message_queue_Free( the_mq );
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENOMEM );
}
strcpy( name, name_arg );
10d00: e1a01009 mov r1, r9
* Note that thread blocking discipline should be based on the
* current scheduling policy.
*/
the_mq_attr = &the_mq->Message_queue.Attributes;
the_mq_attr->discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO;
10d04: e3a08000 mov r8, #0 ; 0x0
if (!name) {
_POSIX_Message_queue_Free( the_mq );
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENOMEM );
}
strcpy( name, name_arg );
10d08: eb000fbf bl 14c0c <strcpy>
* Note that thread blocking discipline should be based on the
* current scheduling policy.
*/
the_mq_attr = &the_mq->Message_queue.Attributes;
the_mq_attr->discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO;
10d0c: e584805c str r8, [r4, #92]
if ( ! _CORE_message_queue_Initialize(
10d10: e1a02007 mov r2, r7
10d14: e1a0300a mov r3, sl
10d18: e284001c add r0, r4, #28 ; 0x1c
10d1c: e284105c add r1, r4, #92 ; 0x5c
10d20: eb00037a bl 11b10 <_CORE_message_queue_Initialize>
10d24: e1500008 cmp r0, r8
10d28: 0a000008 beq 10d50 <_POSIX_Message_queue_Create_support+0x100>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10d2c: e596201c ldr r2, [r6, #28]
10d30: e1d430b8 ldrh r3, [r4, #8]
10d34: e7824103 str r4, [r2, r3, lsl #2]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string */
the_object->name.name_p = name;
10d38: e584500c str r5, [r4, #12]
&_POSIX_Message_queue_Information,
&the_mq->Object,
name
);
*message_queue = the_mq;
10d3c: e58b4000 str r4, [fp]
_Thread_Enable_dispatch();
10d40: ebfff2f4 bl d918 <_Thread_Enable_dispatch>
10d44: e1a00008 mov r0, r8
return 0;
}
10d48: e28dd010 add sp, sp, #16 ; 0x10
10d4c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free (
POSIX_Message_queue_Control *the_mq
)
{
_Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object );
10d50: e1a01004 mov r1, r4 <== NOT EXECUTED
10d54: e1a00006 mov r0, r6 <== NOT EXECUTED
10d58: ebfff040 bl ce60 <_Objects_Free> <== NOT EXECUTED
attr.mq_maxmsg,
attr.mq_msgsize
) ) {
_POSIX_Message_queue_Free( the_mq );
_Workspace_Free(name);
10d5c: e1a00005 mov r0, r5 <== NOT EXECUTED
10d60: ebfff87a bl ef50 <_Workspace_Free> <== NOT EXECUTED
_Thread_Enable_dispatch();
10d64: ebfff2eb bl d918 <_Thread_Enable_dispatch> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSPC );
10d68: eb000a6f bl 1372c <__errno> <== NOT EXECUTED
10d6c: e3a0301c mov r3, #28 ; 0x1c <== NOT EXECUTED
10d70: e5803000 str r3, [r0] <== NOT EXECUTED
10d74: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
10d78: eafffff2 b 10d48 <_POSIX_Message_queue_Create_support+0xf8><== NOT EXECUTED
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( attr_ptr->mq_msgsize <= 0 ){
_Thread_Enable_dispatch();
10d7c: ebfff2e5 bl d918 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EINVAL );
10d80: eb000a69 bl 1372c <__errno>
10d84: e3a03016 mov r3, #22 ; 0x16
10d88: e5803000 str r3, [r0]
10d8c: e3e00000 mvn r0, #0 ; 0x0
10d90: eaffffec b 10d48 <_POSIX_Message_queue_Create_support+0xf8>
10d94: e1a00006 mov r0, r6 <== NOT EXECUTED
10d98: e1a01004 mov r1, r4 <== NOT EXECUTED
10d9c: ebfff02f bl ce60 <_Objects_Free> <== NOT EXECUTED
*/
name = _Workspace_Allocate(n);
if (!name) {
_POSIX_Message_queue_Free( the_mq );
_Thread_Enable_dispatch();
10da0: ebfff2dc bl d918 <_Thread_Enable_dispatch> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
10da4: eb000a60 bl 1372c <__errno> <== NOT EXECUTED
10da8: e3a0300c mov r3, #12 ; 0xc <== NOT EXECUTED
10dac: e5803000 str r3, [r0] <== NOT EXECUTED
10db0: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
10db4: eaffffe3 b 10d48 <_POSIX_Message_queue_Create_support+0xf8><== NOT EXECUTED
attr = *attr_ptr;
}
the_mq = _POSIX_Message_queue_Allocate();
if ( !the_mq ) {
_Thread_Enable_dispatch();
10db8: ebfff2d6 bl d918 <_Thread_Enable_dispatch> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENFILE );
10dbc: eb000a5a bl 1372c <__errno> <== NOT EXECUTED
10dc0: e3a03017 mov r3, #23 ; 0x17 <== NOT EXECUTED
10dc4: e5803000 str r3, [r0] <== NOT EXECUTED
10dc8: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
10dcc: eaffffdd b 10d48 <_POSIX_Message_queue_Create_support+0xf8><== NOT EXECUTED
00005df4 <_POSIX_Mutex_Get>:
POSIX_Mutex_Control *_POSIX_Mutex_Get (
pthread_mutex_t *mutex,
Objects_Locations *location
)
{
5df4: e92d4030 push {r4, r5, lr}
Objects_Id *id = (Objects_Id *)mutex;
___POSIX_Mutex_Get_support( id, location );
5df8: e2505000 subs r5, r0, #0 ; 0x0
POSIX_Mutex_Control *_POSIX_Mutex_Get (
pthread_mutex_t *mutex,
Objects_Locations *location
)
{
5dfc: e1a04001 mov r4, r1
Objects_Id *id = (Objects_Id *)mutex;
___POSIX_Mutex_Get_support( id, location );
5e00: 0a00000b beq 5e34 <_POSIX_Mutex_Get+0x40>
5e04: e5951000 ldr r1, [r5]
5e08: e3710001 cmn r1, #1 ; 0x1
5e0c: 0a000003 beq 5e20 <_POSIX_Mutex_Get+0x2c>
return (POSIX_Mutex_Control *)
5e10: e59f002c ldr r0, [pc, #44] ; 5e44 <_POSIX_Mutex_Get+0x50>
5e14: e1a02004 mov r2, r4
_Objects_Get( &_POSIX_Mutex_Information, *id, location );
}
5e18: e8bd4030 pop {r4, r5, lr}
{
Objects_Id *id = (Objects_Id *)mutex;
___POSIX_Mutex_Get_support( id, location );
return (POSIX_Mutex_Control *)
5e1c: ea000b6e b 8bdc <_Objects_Get>
Objects_Locations *location
)
{
Objects_Id *id = (Objects_Id *)mutex;
___POSIX_Mutex_Get_support( id, location );
5e20: e2811001 add r1, r1, #1 ; 0x1 <== NOT EXECUTED
5e24: eb000019 bl 5e90 <pthread_mutex_init> <== NOT EXECUTED
5e28: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
5e2c: 05951000 ldreq r1, [r5] <== NOT EXECUTED
5e30: 0afffff6 beq 5e10 <_POSIX_Mutex_Get+0x1c> <== NOT EXECUTED
5e34: e3a03001 mov r3, #1 ; 0x1
5e38: e5843000 str r3, [r4]
return (POSIX_Mutex_Control *)
_Objects_Get( &_POSIX_Mutex_Information, *id, location );
}
5e3c: e3a00000 mov r0, #0 ; 0x0
5e40: e8bd8030 pop {r4, r5, pc}
00005d98 <_POSIX_Mutex_Get_interrupt_disable>:
POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable (
pthread_mutex_t *mutex,
Objects_Locations *location,
ISR_Level *level
)
{
5d98: e92d4070 push {r4, r5, r6, lr}
Objects_Id *id = (Objects_Id *)mutex;
___POSIX_Mutex_Get_support( id, location );
5d9c: e2505000 subs r5, r0, #0 ; 0x0
POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable (
pthread_mutex_t *mutex,
Objects_Locations *location,
ISR_Level *level
)
{
5da0: e1a04001 mov r4, r1
5da4: e1a06002 mov r6, r2
Objects_Id *id = (Objects_Id *)mutex;
___POSIX_Mutex_Get_support( id, location );
5da8: 0a00000c beq 5de0 <_POSIX_Mutex_Get_interrupt_disable+0x48>
5dac: e5951000 ldr r1, [r5]
5db0: e3710001 cmn r1, #1 ; 0x1
5db4: 0a000004 beq 5dcc <_POSIX_Mutex_Get_interrupt_disable+0x34>
return (POSIX_Mutex_Control *)
5db8: e59f0030 ldr r0, [pc, #48] ; 5df0 <_POSIX_Mutex_Get_interrupt_disable+0x58>
5dbc: e1a02004 mov r2, r4
5dc0: e1a03006 mov r3, r6
_Objects_Get_isr_disable( &_POSIX_Mutex_Information, *id, location, level );
}
5dc4: e8bd4070 pop {r4, r5, r6, lr}
{
Objects_Id *id = (Objects_Id *)mutex;
___POSIX_Mutex_Get_support( id, location );
return (POSIX_Mutex_Control *)
5dc8: ea000b67 b 8b6c <_Objects_Get_isr_disable>
ISR_Level *level
)
{
Objects_Id *id = (Objects_Id *)mutex;
___POSIX_Mutex_Get_support( id, location );
5dcc: e2811001 add r1, r1, #1 ; 0x1 <== NOT EXECUTED
5dd0: eb00002e bl 5e90 <pthread_mutex_init> <== NOT EXECUTED
5dd4: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
5dd8: 05951000 ldreq r1, [r5] <== NOT EXECUTED
5ddc: 0afffff5 beq 5db8 <_POSIX_Mutex_Get_interrupt_disable+0x20><== NOT EXECUTED
5de0: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED
5de4: e5843000 str r3, [r4] <== NOT EXECUTED
return (POSIX_Mutex_Control *)
_Objects_Get_isr_disable( &_POSIX_Mutex_Information, *id, location, level );
}
5de8: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
5dec: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
0000d590 <_POSIX_Semaphore_Create_support>:
d590: e59fc0f8 ldr ip, [pc, #248] ; d690 <_POSIX_Semaphore_Create_support+0x100>
const char *name,
int pshared,
unsigned int value,
POSIX_Semaphore_Control **the_sem
)
{
d594: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
d598: e59ce000 ldr lr, [ip]
d59c: e28ee001 add lr, lr, #1 ; 0x1
d5a0: e58ce000 str lr, [ip]
d5a4: e1a07002 mov r7, r2
d5a8: e1a0a003 mov sl, r3
d5ac: e1a06000 mov r6, r0
char *name_p = (char *)name;
_Thread_Disable_dispatch();
/* Sharing semaphores among processes is not currently supported */
if (pshared != 0) {
d5b0: e3510000 cmp r1, #0 ; 0x0
d5b4: 1a000023 bne d648 <_POSIX_Semaphore_Create_support+0xb8>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENOSYS );
}
if ( name ) {
d5b8: e3500000 cmp r0, #0 ; 0x0
d5bc: 0a000002 beq d5cc <_POSIX_Semaphore_Create_support+0x3c>
if( strlen(name) > PATH_MAX ) {
d5c0: eb000f8e bl 11400 <strlen>
d5c4: e35000ff cmp r0, #255 ; 0xff
d5c8: 8a000024 bhi d660 <_POSIX_Semaphore_Create_support+0xd0>
* _POSIX_Semaphore_Allocate
*/
RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void )
{
return (POSIX_Semaphore_Control *)
d5cc: e59f80c0 ldr r8, [pc, #192] ; d694 <_POSIX_Semaphore_Create_support+0x104>
d5d0: e1a00008 mov r0, r8
d5d4: ebffed90 bl 8c1c <_Objects_Allocate>
}
}
the_semaphore = _POSIX_Semaphore_Allocate();
if ( !the_semaphore ) {
d5d8: e2505000 subs r5, r0, #0 ; 0x0
d5dc: 0a000025 beq d678 <_POSIX_Semaphore_Create_support+0xe8>
rtems_set_errno_and_return_minus_one( ENOSPC );
}
the_semaphore->process_shared = pshared;
if ( name ) {
d5e0: e3560000 cmp r6, #0 ; 0x0
if ( !the_semaphore ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENOSPC );
}
the_semaphore->process_shared = pshared;
d5e4: e3a03000 mov r3, #0 ; 0x0
d5e8: e5853010 str r3, [r5, #16]
if ( name ) {
the_semaphore->named = TRUE;
d5ec: 12833001 addne r3, r3, #1 ; 0x1
the_semaphore->open_count = 1;
the_semaphore->linked = TRUE;
d5f0: 15c53015 strbne r3, [r5, #21]
}
the_semaphore->process_shared = pshared;
if ( name ) {
the_semaphore->named = TRUE;
d5f4: 15c53014 strbne r3, [r5, #20]
the_semaphore->open_count = 1;
d5f8: 15853018 strne r3, [r5, #24]
* be derived from the current scheduling policy. One
* thing is certain, no matter what we decide, it won't be
* the same as all other POSIX implementations. :)
*/
the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO;
d5fc: e3a04000 mov r4, #0 ; 0x0
/*
* This effectively disables limit checking.
*/
the_sem_attr->maximum_count = 0xFFFFFFFF;
d600: e3e03000 mvn r3, #0 ; 0x0
_CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value );
d604: e285001c add r0, r5, #28 ; 0x1c
if ( name ) {
the_semaphore->named = TRUE;
the_semaphore->open_count = 1;
the_semaphore->linked = TRUE;
} else {
the_semaphore->named = FALSE;
d608: 05c56014 strbeq r6, [r5, #20]
the_semaphore->open_count = 0;
d60c: 05856018 streq r6, [r5, #24]
the_semaphore->linked = FALSE;
d610: 05c56015 strbeq r6, [r5, #21]
/*
* This effectively disables limit checking.
*/
the_sem_attr->maximum_count = 0xFFFFFFFF;
d614: e585305c str r3, [r5, #92]
_CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value );
d618: e1a02007 mov r2, r7
d61c: e285105c add r1, r5, #92 ; 0x5c
* be derived from the current scheduling policy. One
* thing is certain, no matter what we decide, it won't be
* the same as all other POSIX implementations. :)
*/
the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO;
d620: e5854060 str r4, [r5, #96]
* This effectively disables limit checking.
*/
the_sem_attr->maximum_count = 0xFFFFFFFF;
_CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value );
d624: ebffec65 bl 87c0 <_CORE_semaphore_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
d628: e598201c ldr r2, [r8, #28]
d62c: e1d530b8 ldrh r3, [r5, #8]
d630: e7825103 str r5, [r2, r3, lsl #2]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string */
the_object->name.name_p = name;
d634: e585600c str r6, [r5, #12]
&_POSIX_Semaphore_Information,
&the_semaphore->Object,
name_p
);
*the_sem = the_semaphore;
d638: e58a5000 str r5, [sl]
_Thread_Enable_dispatch();
d63c: ebfff0de bl 99bc <_Thread_Enable_dispatch>
d640: e1a00004 mov r0, r4
return 0;
}
d644: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
_Thread_Disable_dispatch();
/* Sharing semaphores among processes is not currently supported */
if (pshared != 0) {
_Thread_Enable_dispatch();
d648: ebfff0db bl 99bc <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENOSYS );
d64c: eb000894 bl f8a4 <__errno>
d650: e3a03058 mov r3, #88 ; 0x58
d654: e5803000 str r3, [r0]
d658: e3e00000 mvn r0, #0 ; 0x0
d65c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
}
if ( name ) {
if( strlen(name) > PATH_MAX ) {
_Thread_Enable_dispatch();
d660: ebfff0d5 bl 99bc <_Thread_Enable_dispatch> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
d664: eb00088e bl f8a4 <__errno> <== NOT EXECUTED
d668: e3a0305b mov r3, #91 ; 0x5b <== NOT EXECUTED
d66c: e5803000 str r3, [r0] <== NOT EXECUTED
d670: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
d674: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
}
the_semaphore = _POSIX_Semaphore_Allocate();
if ( !the_semaphore ) {
_Thread_Enable_dispatch();
d678: ebfff0cf bl 99bc <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENOSPC );
d67c: eb000888 bl f8a4 <__errno>
d680: e3a0301c mov r3, #28 ; 0x1c
d684: e5803000 str r3, [r0]
d688: e3e00000 mvn r0, #0 ; 0x0
d68c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
0000a0c0 <_POSIX_Semaphore_Manager_initialization>:
*/
void _POSIX_Semaphore_Manager_initialization(
uint32_t maximum_semaphores
)
{
a0c0: e52de004 push {lr} ; (str lr, [sp, #-4]!)
_Objects_Initialize_information(
a0c4: e3a0c068 mov ip, #104 ; 0x68
*/
void _POSIX_Semaphore_Manager_initialization(
uint32_t maximum_semaphores
)
{
a0c8: e24dd00c sub sp, sp, #12 ; 0xc
a0cc: e1a03000 mov r3, r0
_Objects_Initialize_information(
a0d0: e58dc000 str ip, [sp]
a0d4: e3a0e001 mov lr, #1 ; 0x1
a0d8: e28cc097 add ip, ip, #151 ; 0x97
a0dc: e59f0018 ldr r0, [pc, #24] ; a0fc <_POSIX_Semaphore_Manager_initialization+0x3c>
a0e0: e3a01003 mov r1, #3 ; 0x3
a0e4: e3a02007 mov r2, #7 ; 0x7
a0e8: e58de004 str lr, [sp, #4]
a0ec: e58dc008 str ip, [sp, #8]
a0f0: ebffefd4 bl 6048 <_Objects_Initialize_information>
,
FALSE, /* TRUE if this is a global object class */
NULL /* Proxy extraction support callout */
#endif
);
}
a0f4: e28dd00c add sp, sp, #12 ; 0xc
a0f8: e8bd8000 pop {pc}
00009d94 <_POSIX_Threads_Initialize_user_threads>:
* Output parameters: NONE
*/
void _POSIX_Threads_Initialize_user_threads( void )
{
if ( _POSIX_Threads_Initialize_user_threads_p )
9d94: e59f3018 ldr r3, [pc, #24] ; 9db4 <_POSIX_Threads_Initialize_user_threads+0x20>
9d98: e5933000 ldr r3, [r3]
9d9c: e3530000 cmp r3, #0 ; 0x0
*
* Output parameters: NONE
*/
void _POSIX_Threads_Initialize_user_threads( void )
{
9da0: e52de004 push {lr} ; (str lr, [sp, #-4]!)
if ( _POSIX_Threads_Initialize_user_threads_p )
9da4: 049df004 popeq {pc} ; (ldreq pc, [sp], #4)
(*_POSIX_Threads_Initialize_user_threads_p)();
9da8: e1a0e00f mov lr, pc <== NOT EXECUTED
9dac: e12fff13 bx r3 <== NOT EXECUTED
9db0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
00009db8 <_POSIX_Threads_Manager_initialization>:
uint32_t maximum_pthreads,
uint32_t number_of_initialization_threads,
posix_initialization_threads_table *user_threads
)
{
9db8: e92d4010 push {r4, lr}
9dbc: e1a03000 mov r3, r0
_POSIX_Threads_Number_of_initialization_threads =
9dc0: e59f0048 ldr r0, [pc, #72] ; 9e10 <_POSIX_Threads_Manager_initialization+0x58>
9dc4: e5801000 str r1, [r0]
number_of_initialization_threads;
_POSIX_Threads_User_initialization_threads = user_threads;
9dc8: e59f1044 ldr r1, [pc, #68] ; 9e14 <_POSIX_Threads_Manager_initialization+0x5c>
#if 0
if ( user_threads == NULL || number_of_initialization_threads == 0 )
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, TRUE, EINVAL );
#endif
_Objects_Initialize_information(
9dcc: e3a04001 mov r4, #1 ; 0x1
uint32_t maximum_pthreads,
uint32_t number_of_initialization_threads,
posix_initialization_threads_table *user_threads
)
{
9dd0: e24dd00c sub sp, sp, #12 ; 0xc
_POSIX_Threads_Number_of_initialization_threads =
number_of_initialization_threads;
_POSIX_Threads_User_initialization_threads = user_threads;
9dd4: e5812000 str r2, [r1]
#if 0
if ( user_threads == NULL || number_of_initialization_threads == 0 )
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, TRUE, EINVAL );
#endif
_Objects_Initialize_information(
9dd8: e3a0cf46 mov ip, #280 ; 0x118
9ddc: e3a0e0ff mov lr, #255 ; 0xff
9de0: e1a02004 mov r2, r4
9de4: e3a01003 mov r1, #3 ; 0x3
9de8: e59f0028 ldr r0, [pc, #40] ; 9e18 <_POSIX_Threads_Manager_initialization+0x60>
9dec: e58dc000 str ip, [sp]
9df0: e98d4010 stmib sp, {r4, lr}
9df4: ebfff093 bl 6048 <_Objects_Initialize_information>
/*
* Add all the extensions for this API
*/
_User_extensions_Add_API_set( &_POSIX_Threads_User_extensions );
9df8: e59f001c ldr r0, [pc, #28] ; 9e1c <_POSIX_Threads_Manager_initialization+0x64>
9dfc: eb0004ce bl b13c <_User_extensions_Add_API_set>
_API_extensions_Add( &_POSIX_Threads_API_extensions );
9e00: e59f0018 ldr r0, [pc, #24] ; 9e20 <_POSIX_Threads_Manager_initialization+0x68>
/*
* If we supported MP, then here we would ...
* Register the MP Process Packet routine.
*/
}
9e04: e28dd00c add sp, sp, #12 ; 0xc
9e08: e8bd4010 pop {r4, lr}
* Add all the extensions for this API
*/
_User_extensions_Add_API_set( &_POSIX_Threads_User_extensions );
_API_extensions_Add( &_POSIX_Threads_API_extensions );
9e0c: eaffece9 b 51b8 <_API_extensions_Add>
0000b688 <_POSIX_Threads_cancel_run>:
#include <rtems/posix/threadsup.h>
void _POSIX_Threads_cancel_run(
Thread_Control *the_thread
)
{
b688: e92d4070 push {r4, r5, r6, lr}
POSIX_Cancel_Handler_control *handler;
Chain_Control *handler_stack;
POSIX_API_Control *thread_support;
ISR_Level level;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
b68c: e5906108 ldr r6, [r0, #264]
handler_stack = &thread_support->Cancellation_Handlers;
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
while ( !_Chain_Is_empty( handler_stack ) ) {
b690: e59620d8 ldr r2, [r6, #216]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
b694: e28650dc add r5, r6, #220 ; 0xdc
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
handler_stack = &thread_support->Cancellation_Handlers;
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
b698: e3a03001 mov r3, #1 ; 0x1
while ( !_Chain_Is_empty( handler_stack ) ) {
b69c: e1520005 cmp r2, r5
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
handler_stack = &thread_support->Cancellation_Handlers;
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
b6a0: e58630cc str r3, [r6, #204]
while ( !_Chain_Is_empty( handler_stack ) ) {
b6a4: 08bd8070 popeq {r4, r5, r6, pc}
_ISR_Disable( level );
b6a8: e10f1000 mrs r1, CPSR <== NOT EXECUTED
b6ac: e38130c0 orr r3, r1, #192 ; 0xc0 <== NOT EXECUTED
b6b0: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
handler = (POSIX_Cancel_Handler_control *)
b6b4: e5954004 ldr r4, [r5, #4] <== NOT EXECUTED
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
b6b8: e894000c ldm r4, {r2, r3} <== NOT EXECUTED
previous = the_node->previous;
next->previous = previous;
previous->next = next;
b6bc: e5832000 str r2, [r3] <== NOT EXECUTED
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
b6c0: e5823004 str r3, [r2, #4] <== NOT EXECUTED
_Chain_Tail( handler_stack )->previous;
_Chain_Extract_unprotected( &handler->Node );
_ISR_Enable( level );
b6c4: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED
(*handler->routine)( handler->arg );
b6c8: e594000c ldr r0, [r4, #12] <== NOT EXECUTED
b6cc: e1a0e00f mov lr, pc <== NOT EXECUTED
b6d0: e594f008 ldr pc, [r4, #8] <== NOT EXECUTED
_Workspace_Free( handler );
b6d4: e1a00004 mov r0, r4 <== NOT EXECUTED
b6d8: ebfff1c9 bl 7e04 <_Workspace_Free> <== NOT EXECUTED
handler_stack = &thread_support->Cancellation_Handlers;
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
while ( !_Chain_Is_empty( handler_stack ) ) {
b6dc: e59630d8 ldr r3, [r6, #216] <== NOT EXECUTED
b6e0: e1530005 cmp r3, r5 <== NOT EXECUTED
b6e4: 1affffef bne b6a8 <_POSIX_Threads_cancel_run+0x20> <== NOT EXECUTED
b6e8: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
0000c1c8 <_POSIX_Timer_Insert_helper>:
Watchdog_Interval ticks,
Objects_Id id,
Watchdog_Service_routine_entry TSR,
void *arg
)
{
c1c8: e92d41f0 push {r4, r5, r6, r7, r8, lr}
c1cc: e1a08001 mov r8, r1
c1d0: e1a07002 mov r7, r2
c1d4: e1a05003 mov r5, r3
c1d8: e1a04000 mov r4, r0
ISR_Level level;
(void) _Watchdog_Remove( timer );
c1dc: ebfff62f bl 9aa0 <_Watchdog_Remove>
_ISR_Disable( level );
c1e0: e10f6000 mrs r6, CPSR
c1e4: e38630c0 orr r3, r6, #192 ; 0xc0
c1e8: 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 ( timer->state != WATCHDOG_INACTIVE ) {
c1ec: e5943008 ldr r3, [r4, #8]
c1f0: e3530000 cmp r3, #0 ; 0x0
c1f4: 0a000002 beq c204 <_POSIX_Timer_Insert_helper+0x3c>
_ISR_Enable( level );
c1f8: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED
c1fc: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
c200: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
c204: e5843008 str r3, [r4, #8]
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
c208: e59d3018 ldr r3, [sp, #24]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
c20c: e584501c str r5, [r4, #28]
the_watchdog->id = id;
c210: e5847020 str r7, [r4, #32]
the_watchdog->user_data = user_data;
c214: e5843024 str r3, [r4, #36]
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
c218: e584800c str r8, [r4, #12]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
c21c: e1a01004 mov r1, r4
c220: e59f000c ldr r0, [pc, #12] ; c234 <_POSIX_Timer_Insert_helper+0x6c>
c224: ebfff5ae bl 98e4 <_Watchdog_Insert>
* OK. Now we now the timer was not rescheduled by an interrupt
* so we can atomically initialize it as in use.
*/
_Watchdog_Initialize( timer, TSR, id, arg );
_Watchdog_Insert_ticks( timer, ticks );
_ISR_Enable( level );
c228: e129f006 msr CPSR_fc, r6
c22c: e3a00001 mov r0, #1 ; 0x1
return true;
}
c230: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
00005cc4 <_POSIX_Timer_TSR>:
/*
* This is the operation that is run when a timer expires
*/
void _POSIX_Timer_TSR(Objects_Id timer, void *data)
{
5cc4: e92d4010 push {r4, lr}
bool activated;
ptimer = (POSIX_Timer_Control *)data;
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
5cc8: e5913068 ldr r3, [r1, #104]
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
5ccc: e5912054 ldr r2, [r1, #84]
bool activated;
ptimer = (POSIX_Timer_Control *)data;
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
5cd0: e2833001 add r3, r3, #1 ; 0x1
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
5cd4: e3520000 cmp r2, #0 ; 0x0
/*
* This is the operation that is run when a timer expires
*/
void _POSIX_Timer_TSR(Objects_Id timer, void *data)
{
5cd8: e24dd004 sub sp, sp, #4 ; 0x4
5cdc: e1a04001 mov r4, r1
bool activated;
ptimer = (POSIX_Timer_Control *)data;
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
5ce0: e5813068 str r3, [r1, #104]
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
5ce4: 1a000004 bne 5cfc <_POSIX_Timer_TSR+0x38>
5ce8: e5913058 ldr r3, [r1, #88] <== NOT EXECUTED
5cec: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
/* The state really did not change but just to be safe */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
} else {
/* Indicates that the timer is stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
5cf0: 03a03004 moveq r3, #4 ; 0x4 <== NOT EXECUTED
5cf4: 05c1303c strbeq r3, [r1, #60] <== NOT EXECUTED
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
5cf8: 0a00000d beq 5d34 <_POSIX_Timer_TSR+0x70> <== NOT EXECUTED
( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) {
activated = _POSIX_Timer_Insert_helper(
5cfc: e5941064 ldr r1, [r4, #100]
5d00: e5942008 ldr r2, [r4, #8]
5d04: e2840010 add r0, r4, #16 ; 0x10
5d08: e59f303c ldr r3, [pc, #60] ; 5d4c <_POSIX_Timer_TSR+0x88>
5d0c: e58d4000 str r4, [sp]
5d10: eb00192c bl c1c8 <_POSIX_Timer_Insert_helper>
ptimer->ticks,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated )
5d14: e3500000 cmp r0, #0 ; 0x0
5d18: 1a000001 bne 5d24 <_POSIX_Timer_TSR+0x60>
/* After the signal handler returns, the count of expirations of the
* timer must be set to 0.
*/
ptimer->overrun = 0;
}
5d1c: e28dd004 add sp, sp, #4 ; 0x4
5d20: e8bd8010 pop {r4, pc}
);
if ( !activated )
return;
/* Store the time when the timer was started again */
_TOD_Get( &ptimer->time );
5d24: e284006c add r0, r4, #108 ; 0x6c
5d28: eb0005bd bl 7424 <_TOD_Get>
/* The state really did not change but just to be safe */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
5d2c: e3a03003 mov r3, #3 ; 0x3
5d30: e5c4303c strb r3, [r4, #60]
/*
* The sending of the signal to the process running the handling function
* specified for that signal is simulated
*/
if ( pthread_kill ( ptimer->thread_id, ptimer->inf.sigev_signo ) ) {
5d34: e5940038 ldr r0, [r4, #56]
5d38: e5941044 ldr r1, [r4, #68]
5d3c: eb001847 bl be60 <pthread_kill>
}
/* After the signal handler returns, the count of expirations of the
* timer must be set to 0.
*/
ptimer->overrun = 0;
5d40: e3a03000 mov r3, #0 ; 0x0
5d44: e5843068 str r3, [r4, #104]
5d48: eafffff3 b 5d1c <_POSIX_Timer_TSR+0x58>
000052a8 <_POSIX_signals_Get_highest>:
#include <rtems/score/isr.h>
int _POSIX_signals_Get_highest(
sigset_t set
)
{
52a8: e1a02000 mov r2, r0
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
if ( set & signo_to_mask( signo ) )
52ac: e3a01001 mov r1, #1 ; 0x1
#include <rtems/score/isr.h>
int _POSIX_signals_Get_highest(
sigset_t set
)
{
52b0: e3a0001b mov r0, #27 ; 0x1b
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
if ( set & signo_to_mask( signo ) )
52b4: e2403001 sub r3, r0, #1 ; 0x1
52b8: e0123311 ands r3, r2, r1, lsl r3
52bc: 112fff1e bxne lr
sigset_t set
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
52c0: e2800001 add r0, r0, #1 ; 0x1
52c4: e3500020 cmp r0, #32 ; 0x20
52c8: 1afffff9 bne 52b4 <_POSIX_signals_Get_highest+0xc>
52cc: e240001f sub r0, r0, #31 ; 0x1f
}
/* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
if ( set & signo_to_mask( signo ) )
52d0: e1a01000 mov r1, r0
52d4: e2403001 sub r3, r0, #1 ; 0x1
52d8: e0123311 ands r3, r2, r1, lsl r3
52dc: 112fff1e bxne lr
return signo;
}
/* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
52e0: e2800001 add r0, r0, #1 ; 0x1
52e4: e350001b cmp r0, #27 ; 0x1b
52e8: 1afffff9 bne 52d4 <_POSIX_signals_Get_highest+0x2c>
52ec: e1a00003 mov r0, r3 <== NOT EXECUTED
if ( set & signo_to_mask( signo ) )
return signo;
}
return 0;
}
52f0: e12fff1e bx lr <== NOT EXECUTED
00009c7c <_POSIX_signals_Post_switch_extension>:
*/
void _POSIX_signals_Post_switch_extension(
Thread_Control *the_thread
)
{
9c7c: e92d4070 push {r4, r5, r6, lr}
POSIX_API_Control *api;
int signo;
ISR_Level level;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
9c80: e5905108 ldr r5, [r0, #264]
if ( !api )
9c84: e3550000 cmp r5, #0 ; 0x0
9c88: 08bd8070 popeq {r4, r5, r6, pc}
9c8c: e59f60b0 ldr r6, [pc, #176] ; 9d44 <_POSIX_signals_Post_switch_extension+0xc8>
* The first thing done is to check there are any signals to be
* processed at all. No point in doing this loop otherwise.
*/
while (1) {
restart:
_ISR_Disable( level );
9c90: e10f0000 mrs r0, CPSR
9c94: e38030c0 orr r3, r0, #192 ; 0xc0
9c98: e129f003 msr CPSR_fc, r3
if ( !(~api->signals_blocked &
9c9c: e5963000 ldr r3, [r6]
9ca0: e28510c4 add r1, r5, #196 ; 0xc4
9ca4: e8910006 ldm r1, {r1, r2}
9ca8: e1833002 orr r3, r3, r2
9cac: e1d31001 bics r1, r3, r1
9cb0: 0a000021 beq 9d3c <_POSIX_signals_Post_switch_extension+0xc0>
(api->signals_pending | _POSIX_signals_Pending)) ) {
_ISR_Enable( level );
break;
}
_ISR_Enable( level );
9cb4: e129f000 msr CPSR_fc, r0
9cb8: e3a0401b mov r4, #27 ; 0x1b
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
if ( _POSIX_signals_Check_signal( api, signo, false ) )
9cbc: e1a01004 mov r1, r4
9cc0: e3a02000 mov r2, #0 ; 0x0
9cc4: e1a00005 mov r0, r5
9cc8: eb0006b5 bl b7a4 <_POSIX_signals_Check_signal>
9ccc: e3500000 cmp r0, #0 ; 0x0
goto restart;
if ( _POSIX_signals_Check_signal( api, signo, true ) )
9cd0: e1a01004 mov r1, r4
9cd4: e3a02001 mov r2, #1 ; 0x1
_ISR_Enable( level );
break;
}
_ISR_Enable( level );
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
9cd8: e2844001 add r4, r4, #1 ; 0x1
if ( _POSIX_signals_Check_signal( api, signo, false ) )
goto restart;
if ( _POSIX_signals_Check_signal( api, signo, true ) )
9cdc: e1a00005 mov r0, r5
}
_ISR_Enable( level );
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
if ( _POSIX_signals_Check_signal( api, signo, false ) )
9ce0: 1affffea bne 9c90 <_POSIX_signals_Post_switch_extension+0x14>
goto restart;
if ( _POSIX_signals_Check_signal( api, signo, true ) )
9ce4: eb0006ae bl b7a4 <_POSIX_signals_Check_signal>
9ce8: e3500000 cmp r0, #0 ; 0x0
9cec: 1affffe7 bne 9c90 <_POSIX_signals_Post_switch_extension+0x14>
_ISR_Enable( level );
break;
}
_ISR_Enable( level );
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
9cf0: e3540020 cmp r4, #32 ; 0x20
9cf4: 1afffff0 bne 9cbc <_POSIX_signals_Post_switch_extension+0x40>
9cf8: e244401f sub r4, r4, #31 ; 0x1f
/* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
if ( _POSIX_signals_Check_signal( api, signo, false ) )
9cfc: e1a01004 mov r1, r4
9d00: e3a02000 mov r2, #0 ; 0x0
9d04: e1a00005 mov r0, r5
9d08: eb0006a5 bl b7a4 <_POSIX_signals_Check_signal>
9d0c: e3500000 cmp r0, #0 ; 0x0
goto restart;
if ( _POSIX_signals_Check_signal( api, signo, true ) )
9d10: e1a01004 mov r1, r4
9d14: e3a02001 mov r2, #1 ; 0x1
}
/* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
9d18: e2844001 add r4, r4, #1 ; 0x1
if ( _POSIX_signals_Check_signal( api, signo, false ) )
goto restart;
if ( _POSIX_signals_Check_signal( api, signo, true ) )
9d1c: e1a00005 mov r0, r5
/* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
if ( _POSIX_signals_Check_signal( api, signo, false ) )
9d20: 1affffda bne 9c90 <_POSIX_signals_Post_switch_extension+0x14>
goto restart;
if ( _POSIX_signals_Check_signal( api, signo, true ) )
9d24: eb00069e bl b7a4 <_POSIX_signals_Check_signal>
9d28: e3500000 cmp r0, #0 ; 0x0
9d2c: 1affffd7 bne 9c90 <_POSIX_signals_Post_switch_extension+0x14>
}
/* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
9d30: e354001b cmp r4, #27 ; 0x1b
9d34: 1afffff0 bne 9cfc <_POSIX_signals_Post_switch_extension+0x80>
9d38: eaffffd4 b 9c90 <_POSIX_signals_Post_switch_extension+0x14><== NOT EXECUTED
while (1) {
restart:
_ISR_Disable( level );
if ( !(~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending)) ) {
_ISR_Enable( level );
9d3c: e129f000 msr CPSR_fc, r0
9d40: e8bd8070 pop {r4, r5, r6, pc}
0000a204 <_Partition_Manager_initialization>:
*/
void _Partition_Manager_initialization(
uint32_t maximum_partitions
)
{
a204: e52de004 push {lr} ; (str lr, [sp, #-4]!)
_Objects_Initialize_information(
a208: e3a0c030 mov ip, #48 ; 0x30
*/
void _Partition_Manager_initialization(
uint32_t maximum_partitions
)
{
a20c: e24dd00c sub sp, sp, #12 ; 0xc
a210: e1a03000 mov r3, r0
_Objects_Initialize_information(
a214: e58dc000 str ip, [sp]
a218: e3a0e000 mov lr, #0 ; 0x0
a21c: e24cc02c sub ip, ip, #44 ; 0x2c
a220: e59f0018 ldr r0, [pc, #24] ; a240 <_Partition_Manager_initialization+0x3c>
a224: e3a01002 mov r1, #2 ; 0x2
a228: e3a02005 mov r2, #5 ; 0x5
a22c: e58de004 str lr, [sp, #4]
a230: e58dc008 str ip, [sp, #8]
a234: ebffef83 bl 6048 <_Objects_Initialize_information>
MP_PACKET_PARTITION,
_Partition_MP_Process_packet
);
#endif
}
a238: e28dd00c add sp, sp, #12 ; 0xc
a23c: e8bd8000 pop {pc}
0000ac18 <_Protected_heap_Allocate>:
void *_Protected_heap_Allocate(
Heap_Control *the_heap,
size_t size
)
{
ac18: e92d4070 push {r4, r5, r6, lr}
void *p;
_RTEMS_Lock_allocator();
ac1c: e59f602c ldr r6, [pc, #44] ; ac50 <_Protected_heap_Allocate+0x38>
void *_Protected_heap_Allocate(
Heap_Control *the_heap,
size_t size
)
{
ac20: e1a04000 mov r4, r0
ac24: e1a05001 mov r5, r1
void *p;
_RTEMS_Lock_allocator();
ac28: e5960000 ldr r0, [r6]
ac2c: ebffe982 bl 523c <_API_Mutex_Lock>
p = _Heap_Allocate( the_heap, size );
ac30: e1a01005 mov r1, r5
ac34: e1a00004 mov r0, r4
ac38: ebffff36 bl a918 <_Heap_Allocate>
ac3c: e1a04000 mov r4, r0
_RTEMS_Unlock_allocator();
ac40: e5960000 ldr r0, [r6]
ac44: ebffe998 bl 52ac <_API_Mutex_Unlock>
return p;
}
ac48: e1a00004 mov r0, r4
ac4c: e8bd8070 pop {r4, r5, r6, pc}
0000998c <_Protected_heap_Get_information>:
bool _Protected_heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
998c: e92d4070 push {r4, r5, r6, lr}
Heap_Get_information_status status;
if ( !the_heap )
9990: e2506000 subs r6, r0, #0 ; 0x0
bool _Protected_heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
9994: e1a04001 mov r4, r1
Heap_Get_information_status status;
if ( !the_heap )
9998: 0a00000d beq 99d4 <_Protected_heap_Get_information+0x48>
return false;
if ( !the_info )
999c: e3510000 cmp r1, #0 ; 0x0
99a0: 0a00000b beq 99d4 <_Protected_heap_Get_information+0x48>
return false;
_RTEMS_Lock_allocator();
99a4: e59f5030 ldr r5, [pc, #48] ; 99dc <_Protected_heap_Get_information+0x50>
99a8: e5950000 ldr r0, [r5]
99ac: ebfff981 bl 7fb8 <_API_Mutex_Lock>
status = _Heap_Get_information( the_heap, the_info );
99b0: e1a01004 mov r1, r4
99b4: e1a00006 mov r0, r6
99b8: eb0011e3 bl e14c <_Heap_Get_information>
99bc: e1a04000 mov r4, r0
_RTEMS_Unlock_allocator();
99c0: e5950000 ldr r0, [r5]
99c4: ebfff997 bl 8028 <_API_Mutex_Unlock>
if ( status == HEAP_GET_INFORMATION_SUCCESSFUL )
99c8: e2740001 rsbs r0, r4, #1 ; 0x1
99cc: 33a00000 movcc r0, #0 ; 0x0
99d0: e8bd8070 pop {r4, r5, r6, pc}
99d4: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
return true;
return false;
}
99d8: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
0000a3cc <_RTEMS_tasks_Initialize_user_tasks>:
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks( void )
{
if ( _RTEMS_tasks_Initialize_user_tasks_p )
a3cc: e59f3018 ldr r3, [pc, #24] ; a3ec <_RTEMS_tasks_Initialize_user_tasks+0x20>
a3d0: e5933000 ldr r3, [r3]
a3d4: e3530000 cmp r3, #0 ; 0x0
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks( void )
{
a3d8: e52de004 push {lr} ; (str lr, [sp, #-4]!)
if ( _RTEMS_tasks_Initialize_user_tasks_p )
a3dc: 049df004 popeq {pc} ; (ldreq pc, [sp], #4)
(*_RTEMS_tasks_Initialize_user_tasks_p)();
a3e0: e1a0e00f mov lr, pc
a3e4: e12fff13 bx r3
a3e8: e49df004 pop {pc} ; (ldr pc, [sp], #4)
0000a3f0 <_RTEMS_tasks_Manager_initialization>:
*/
void _RTEMS_tasks_Manager_initialization(
uint32_t maximum_tasks
)
{
a3f0: e52de004 push {lr} ; (str lr, [sp, #-4]!)
_Objects_Initialize_information(
a3f4: e3a0cf46 mov ip, #280 ; 0x118
*/
void _RTEMS_tasks_Manager_initialization(
uint32_t maximum_tasks
)
{
a3f8: e24dd00c sub sp, sp, #12 ; 0xc
a3fc: e1a03000 mov r3, r0
_Objects_Initialize_information(
a400: e3a0e000 mov lr, #0 ; 0x0
a404: e3a01002 mov r1, #2 ; 0x2
a408: e3a02001 mov r2, #1 ; 0x1
a40c: e58dc000 str ip, [sp]
a410: e59f0024 ldr r0, [pc, #36] ; a43c <_RTEMS_tasks_Manager_initialization+0x4c>
a414: e24ccf45 sub ip, ip, #276 ; 0x114
a418: e58de004 str lr, [sp, #4]
a41c: e58dc008 str ip, [sp, #8]
a420: ebffef08 bl 6048 <_Objects_Initialize_information>
/*
* Add all the extensions for this API
*/
_User_extensions_Add_API_set( &_RTEMS_tasks_User_extensions );
a424: e59f0014 ldr r0, [pc, #20] ; a440 <_RTEMS_tasks_Manager_initialization+0x50>
a428: eb000343 bl b13c <_User_extensions_Add_API_set>
_API_extensions_Add( &_RTEMS_tasks_API_extensions );
a42c: e59f0010 ldr r0, [pc, #16] ; a444 <_RTEMS_tasks_Manager_initialization+0x54>
MP_PACKET_TASKS,
_RTEMS_tasks_MP_Process_packet
);
#endif
}
a430: e28dd00c add sp, sp, #12 ; 0xc
a434: e49de004 pop {lr} ; (ldr lr, [sp], #4)
* Add all the extensions for this API
*/
_User_extensions_Add_API_set( &_RTEMS_tasks_User_extensions );
_API_extensions_Add( &_RTEMS_tasks_API_extensions );
a438: eaffeb5e b 51b8 <_API_extensions_Add>
0000a244 <_Rate_monotonic_Manager_initialization>:
*/
void _Rate_monotonic_Manager_initialization(
uint32_t maximum_periods
)
{
a244: e52de004 push {lr} ; (str lr, [sp, #-4]!)
_Objects_Initialize_information(
a248: e3a0c08c mov ip, #140 ; 0x8c
*/
void _Rate_monotonic_Manager_initialization(
uint32_t maximum_periods
)
{
a24c: e24dd00c sub sp, sp, #12 ; 0xc
a250: e1a03000 mov r3, r0
_Objects_Initialize_information(
a254: e58dc000 str ip, [sp]
a258: e3a0e000 mov lr, #0 ; 0x0
a25c: e24cc088 sub ip, ip, #136 ; 0x88
a260: e59f0018 ldr r0, [pc, #24] ; a280 <_Rate_monotonic_Manager_initialization+0x3c>
a264: e3a01002 mov r1, #2 ; 0x2
a268: e3a02008 mov r2, #8 ; 0x8
a26c: e58de004 str lr, [sp, #4]
a270: e58dc008 str ip, [sp, #8]
a274: ebffef73 bl 6048 <_Objects_Initialize_information>
,
FALSE, /* TRUE if this is a global object class */
NULL /* Proxy extraction support callout */
#endif
);
}
a278: e28dd00c add sp, sp, #12 ; 0xc
a27c: e8bd8000 pop {pc}
0000499c <_Semaphore_Translate_core_mutex_return_code>:
};
rtems_status_code _Semaphore_Translate_core_mutex_return_code (
uint32_t status
)
{
499c: e59f3004 ldr r3, [pc, #4] ; 49a8 <_Semaphore_Translate_core_mutex_return_code+0xc>
#if defined(RTEMS_DEBUG)
if ( status > CORE_MUTEX_STATUS_LAST )
return RTEMS_INTERNAL_ERROR;
#endif
return _Semaphore_Translate_core_mutex_return_code_[status];
}
49a0: e7930100 ldr r0, [r3, r0, lsl #2]
49a4: e12fff1e bx lr
...
000056d8 <_TOD_Get>:
*/
void _TOD_Get(
struct timespec *time
)
{
56d8: e92d4070 push {r4, r5, r6, lr}
ISR_Level level;
struct timespec offset;
/* assume time checked by caller */
offset.tv_sec = 0;
56dc: e3a03000 mov r3, #0 ; 0x0
*/
void _TOD_Get(
struct timespec *time
)
{
56e0: e24dd008 sub sp, sp, #8 ; 0x8
struct timespec offset;
/* assume time checked by caller */
offset.tv_sec = 0;
offset.tv_nsec = 0;
56e4: e58d3004 str r3, [sp, #4]
*/
void _TOD_Get(
struct timespec *time
)
{
56e8: e1a05000 mov r5, r0
ISR_Level level;
struct timespec offset;
/* assume time checked by caller */
offset.tv_sec = 0;
56ec: e58d3000 str r3, [sp]
offset.tv_nsec = 0;
/* _TOD_Now is a proper POSIX time */
_ISR_Disable( level );
56f0: e10f6000 mrs r6, CPSR
56f4: e38630c0 orr r3, r6, #192 ; 0xc0
56f8: e129f003 msr CPSR_fc, r3
*time = _TOD_Now;
if ( _Watchdog_Nanoseconds_since_tick_handler )
56fc: e59f3038 ldr r3, [pc, #56] ; 573c <_TOD_Get+0x64>
offset.tv_sec = 0;
offset.tv_nsec = 0;
/* _TOD_Now is a proper POSIX time */
_ISR_Disable( level );
*time = _TOD_Now;
5700: e59f2038 ldr r2, [pc, #56] ; 5740 <_TOD_Get+0x68>
if ( _Watchdog_Nanoseconds_since_tick_handler )
5704: e5931000 ldr r1, [r3]
offset.tv_sec = 0;
offset.tv_nsec = 0;
/* _TOD_Now is a proper POSIX time */
_ISR_Disable( level );
*time = _TOD_Now;
5708: e8920018 ldm r2, {r3, r4}
if ( _Watchdog_Nanoseconds_since_tick_handler )
570c: e3510000 cmp r1, #0 ; 0x0
offset.tv_sec = 0;
offset.tv_nsec = 0;
/* _TOD_Now is a proper POSIX time */
_ISR_Disable( level );
*time = _TOD_Now;
5710: e8800018 stm r0, {r3, r4}
if ( _Watchdog_Nanoseconds_since_tick_handler )
5714: 0a000002 beq 5724 <_TOD_Get+0x4c>
offset.tv_nsec = (*_Watchdog_Nanoseconds_since_tick_handler)();
5718: e1a0e00f mov lr, pc <== NOT EXECUTED
571c: e12fff11 bx r1 <== NOT EXECUTED
5720: e58d0004 str r0, [sp, #4] <== NOT EXECUTED
_ISR_Enable( level );
5724: e129f006 msr CPSR_fc, r6
_Timespec_Add_to( time, &offset );
5728: e1a00005 mov r0, r5
572c: e1a0100d mov r1, sp
5730: eb000813 bl 7784 <_Timespec_Add_to>
}
5734: e28dd008 add sp, sp, #8 ; 0x8
5738: e8bd8070 pop {r4, r5, r6, pc}
0000a8ac <_TOD_Get_uptime>:
*/
void _TOD_Get_uptime(
struct timespec *uptime
)
{
a8ac: e92d4070 push {r4, r5, r6, lr}
ISR_Level level;
struct timespec offset;
/* assume uptime checked by caller */
offset.tv_sec = 0;
a8b0: e3a03000 mov r3, #0 ; 0x0
*/
void _TOD_Get_uptime(
struct timespec *uptime
)
{
a8b4: e24dd008 sub sp, sp, #8 ; 0x8
struct timespec offset;
/* assume uptime checked by caller */
offset.tv_sec = 0;
offset.tv_nsec = 0;
a8b8: e58d3004 str r3, [sp, #4]
*/
void _TOD_Get_uptime(
struct timespec *uptime
)
{
a8bc: e1a05000 mov r5, r0
ISR_Level level;
struct timespec offset;
/* assume uptime checked by caller */
offset.tv_sec = 0;
a8c0: e58d3000 str r3, [sp]
offset.tv_nsec = 0;
_ISR_Disable( level );
a8c4: e10f6000 mrs r6, CPSR
a8c8: e38630c0 orr r3, r6, #192 ; 0xc0
a8cc: e129f003 msr CPSR_fc, r3
*uptime = _TOD_Uptime;
if ( _Watchdog_Nanoseconds_since_tick_handler )
a8d0: e59f3038 ldr r3, [pc, #56] ; a910 <_TOD_Get_uptime+0x64>
offset.tv_sec = 0;
offset.tv_nsec = 0;
_ISR_Disable( level );
*uptime = _TOD_Uptime;
a8d4: e59f2038 ldr r2, [pc, #56] ; a914 <_TOD_Get_uptime+0x68>
if ( _Watchdog_Nanoseconds_since_tick_handler )
a8d8: e5931000 ldr r1, [r3]
offset.tv_sec = 0;
offset.tv_nsec = 0;
_ISR_Disable( level );
*uptime = _TOD_Uptime;
a8dc: e8920018 ldm r2, {r3, r4}
if ( _Watchdog_Nanoseconds_since_tick_handler )
a8e0: e3510000 cmp r1, #0 ; 0x0
offset.tv_sec = 0;
offset.tv_nsec = 0;
_ISR_Disable( level );
*uptime = _TOD_Uptime;
a8e4: e8800018 stm r0, {r3, r4}
if ( _Watchdog_Nanoseconds_since_tick_handler )
a8e8: 0a000002 beq a8f8 <_TOD_Get_uptime+0x4c>
offset.tv_nsec = (*_Watchdog_Nanoseconds_since_tick_handler)();
a8ec: e1a0e00f mov lr, pc <== NOT EXECUTED
a8f0: e12fff11 bx r1 <== NOT EXECUTED
a8f4: e58d0004 str r0, [sp, #4] <== NOT EXECUTED
_ISR_Enable( level );
a8f8: e129f006 msr CPSR_fc, r6
_Timespec_Add_to( uptime, &offset );
a8fc: e1a00005 mov r0, r5
a900: e1a0100d mov r1, sp
a904: ebfff39e bl 7784 <_Timespec_Add_to>
}
a908: e28dd008 add sp, sp, #8 ; 0x8
a90c: e8bd8070 pop {r4, r5, r6, pc}
00006750 <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored
)
{
6750: e52de004 push {lr} ; (str lr, [sp, #-4]!)
6754: e24dd004 sub sp, sp, #4 ; 0x4
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
6758: e1a0100d mov r1, sp
675c: eb00006a bl 690c <_Thread_Get>
switch ( location ) {
6760: e59d3000 ldr r3, [sp]
6764: e3530000 cmp r3, #0 ; 0x0
6768: 1a000007 bne 678c <_Thread_Delay_ended+0x3c>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
676c: e3a01201 mov r1, #268435456 ; 0x10000000
6770: e2811bff add r1, r1, #261120 ; 0x3fc00
6774: e2811ffe add r1, r1, #1016 ; 0x3f8
6778: ebffff53 bl 64cc <_Thread_Clear_state>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
677c: e59f2010 ldr r2, [pc, #16] ; 6794 <_Thread_Delay_ended+0x44>
6780: e5923000 ldr r3, [r2]
6784: e2433001 sub r3, r3, #1 ; 0x1
6788: e5823000 str r3, [r2]
case OBJECTS_LOCAL:
_Thread_Unblock( the_thread );
_Thread_Unnest_dispatch();
break;
}
}
678c: e28dd004 add sp, sp, #4 ; 0x4
6790: e8bd8000 pop {pc}
000068e8 <_Thread_Enable_dispatch>:
#if ( (CPU_INLINE_ENABLE_DISPATCH == FALSE) || \
(__RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH__ == 1) )
void _Thread_Enable_dispatch( void )
{
if ( --_Thread_Dispatch_disable_level )
68e8: e59f3018 ldr r3, [pc, #24] ; 6908 <_Thread_Enable_dispatch+0x20>
68ec: e5932000 ldr r2, [r3]
68f0: e2422001 sub r2, r2, #1 ; 0x1
68f4: e5832000 str r2, [r3]
68f8: e5931000 ldr r1, [r3]
68fc: e3510000 cmp r1, #0 ; 0x0
6900: 112fff1e bxne lr
return;
_Thread_Dispatch();
6904: eaffffa3 b 6798 <_Thread_Dispatch>
0000bd78 <_Thread_Handler>:
#if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__)
static char doneConstructors;
char doneCons;
#endif
executing = _Thread_Executing;
bd78: e59f3110 ldr r3, [pc, #272] ; be90 <_Thread_Handler+0x118>
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
bd7c: e92d4030 push {r4, r5, lr}
#if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__)
static char doneConstructors;
char doneCons;
#endif
executing = _Thread_Executing;
bd80: e5935000 ldr r5, [r3]
/*
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
bd84: e59520b8 ldr r2, [r5, #184]
_ISR_Set_level(level);
bd88: e3a03000 mov r3, #0 ; 0x0
bd8c: e10f3000 mrs r3, CPSR
bd90: e3c330c0 bic r3, r3, #192 ; 0xc0
bd94: e1833002 orr r3, r3, r2
bd98: e121f003 msr CPSR_c, r3
#if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__)
doneCons = doneConstructors;
bd9c: e59f20f0 ldr r2, [pc, #240] ; be94 <_Thread_Handler+0x11c>
doneConstructors = 1;
bda0: e3a03001 mov r3, #1 ; 0x1
level = executing->Start.isr_level;
_ISR_Set_level(level);
#if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__)
doneCons = doneConstructors;
bda4: e5d24000 ldrb r4, [r2]
* Take care that 'begin' extensions get to complete before
* 'switch' extensions can run. This means must keep dispatch
* disabled until all 'begin' extensions complete.
*/
_User_extensions_Thread_begin( executing );
bda8: e1a00005 mov r0, r5
level = executing->Start.isr_level;
_ISR_Set_level(level);
#if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__)
doneCons = doneConstructors;
doneConstructors = 1;
bdac: e5c23000 strb r3, [r2]
* Take care that 'begin' extensions get to complete before
* 'switch' extensions can run. This means must keep dispatch
* disabled until all 'begin' extensions complete.
*/
_User_extensions_Thread_begin( executing );
bdb0: ebffeece bl 78f0 <_User_extensions_Thread_begin>
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
bdb4: ebffeacb bl 68e8 <_Thread_Enable_dispatch>
/*
* _init could be a weak symbol and we SHOULD test it but it isn't
* in any configuration I know of and it generates a warning on every
* RTEMS target configuration. --joel (12 May 2007)
*/
if (!doneCons) /* && (volatile void *)_init) */
bdb8: e3540000 cmp r4, #0 ; 0x0
bdbc: 0a000031 beq be88 <_Thread_Handler+0x110>
#if defined(__USE__MAIN__)
if (!doneCons && _main)
__main ();
#endif
switch ( executing->Start.prototype ) {
bdc0: e59530a0 ldr r3, [r5, #160]
bdc4: e3530003 cmp r3, #3 ; 0x3
bdc8: 979ff103 ldrls pc, [pc, r3, lsl #2]
bdcc: ea000008 b bdf4 <_Thread_Handler+0x7c> <== NOT EXECUTED
bdd0: 0000be60 .word 0x0000be60 <== NOT EXECUTED
bdd4: 0000be38 .word 0x0000be38 <== NOT EXECUTED
bdd8: 0000be0c .word 0x0000be0c <== NOT EXECUTED
bddc: 0000bde0 .word 0x0000bde0 <== NOT EXECUTED
executing->Start.pointer_argument,
executing->Start.numeric_argument
);
break;
case THREAD_START_BOTH_NUMERIC_FIRST:
executing->Wait.return_argument =
bde0: e59500a8 ldr r0, [r5, #168] <== NOT EXECUTED
bde4: e59510a4 ldr r1, [r5, #164] <== NOT EXECUTED
bde8: e1a0e00f mov lr, pc <== NOT EXECUTED
bdec: e595f09c ldr pc, [r5, #156] <== NOT EXECUTED
bdf0: e5850028 str r0, [r5, #40] <== NOT EXECUTED
* was placed in return_argument. This assumed that if it returned
* anything (which is not supporting in all APIs), then it would be
* able to fit in a (void *).
*/
_User_extensions_Thread_exitted( executing );
bdf4: e1a00005 mov r0, r5 <== NOT EXECUTED
bdf8: ebffeecc bl 7930 <_User_extensions_Thread_exitted> <== NOT EXECUTED
_Internal_error_Occurred(
bdfc: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
be00: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED
be04: e3a02006 mov r2, #6 ; 0x6 <== NOT EXECUTED
be08: ebffe710 bl 5a50 <_Internal_error_Occurred> <== NOT EXECUTED
(*(Thread_Entry_pointer) executing->Start.entry_point)(
executing->Start.pointer_argument
);
break;
case THREAD_START_BOTH_POINTER_FIRST:
executing->Wait.return_argument =
be0c: e28500a4 add r0, r5, #164 ; 0xa4 <== NOT EXECUTED
be10: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED
be14: e1a0e00f mov lr, pc <== NOT EXECUTED
be18: e595f09c ldr pc, [r5, #156] <== NOT EXECUTED
be1c: e5850028 str r0, [r5, #40] <== NOT EXECUTED
* was placed in return_argument. This assumed that if it returned
* anything (which is not supporting in all APIs), then it would be
* able to fit in a (void *).
*/
_User_extensions_Thread_exitted( executing );
be20: e1a00005 mov r0, r5 <== NOT EXECUTED
be24: ebffeec1 bl 7930 <_User_extensions_Thread_exitted> <== NOT EXECUTED
_Internal_error_Occurred(
be28: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
be2c: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED
be30: e3a02006 mov r2, #6 ; 0x6 <== NOT EXECUTED
be34: ebffe705 bl 5a50 <_Internal_error_Occurred> <== NOT EXECUTED
(*(Thread_Entry_numeric) executing->Start.entry_point)(
executing->Start.numeric_argument
);
break;
case THREAD_START_POINTER:
executing->Wait.return_argument =
be38: e59500a4 ldr r0, [r5, #164]
be3c: e1a0e00f mov lr, pc
be40: e595f09c ldr pc, [r5, #156]
be44: e5850028 str r0, [r5, #40]
* was placed in return_argument. This assumed that if it returned
* anything (which is not supporting in all APIs), then it would be
* able to fit in a (void *).
*/
_User_extensions_Thread_exitted( executing );
be48: e1a00005 mov r0, r5
be4c: ebffeeb7 bl 7930 <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
be50: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
be54: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED
be58: e3a02006 mov r2, #6 ; 0x6 <== NOT EXECUTED
be5c: ebffe6fb bl 5a50 <_Internal_error_Occurred> <== NOT EXECUTED
__main ();
#endif
switch ( executing->Start.prototype ) {
case THREAD_START_NUMERIC:
executing->Wait.return_argument =
be60: e59500a8 ldr r0, [r5, #168]
be64: e1a0e00f mov lr, pc
be68: e595f09c ldr pc, [r5, #156]
be6c: e5850028 str r0, [r5, #40]
* was placed in return_argument. This assumed that if it returned
* anything (which is not supporting in all APIs), then it would be
* able to fit in a (void *).
*/
_User_extensions_Thread_exitted( executing );
be70: e1a00005 mov r0, r5
be74: ebffeead bl 7930 <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
be78: e3a00000 mov r0, #0 ; 0x0
be7c: e3a01001 mov r1, #1 ; 0x1
be80: e3a02006 mov r2, #6 ; 0x6
be84: ebffe6f1 bl 5a50 <_Internal_error_Occurred>
* in any configuration I know of and it generates a warning on every
* RTEMS target configuration. --joel (12 May 2007)
*/
if (!doneCons) /* && (volatile void *)_init) */
{
_init ();
be88: ebffd0a4 bl 120 <_init>
be8c: eaffffcb b bdc0 <_Thread_Handler+0x48>
000069b4 <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
69b4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
/*
* Allocate and Initialize the stack for this thread.
*/
if ( !stack_area ) {
69b8: e2526000 subs r6, r2, #0 ; 0x0
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
69bc: e1a04003 mov r4, r3
stack = the_thread->Start.stack;
the_thread->Start.core_allocated_stack = TRUE;
} else {
stack = stack_area;
actual_stack_size = stack_size;
the_thread->Start.core_allocated_stack = FALSE;
69c0: 13a03000 movne r3, #0 ; 0x0
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
69c4: e5dda02c ldrb sl, [sp, #44]
69c8: e1a09000 mov r9, r0
69cc: e1a05001 mov r5, r1
69d0: e59d8028 ldr r8, [sp, #40]
69d4: e59db030 ldr fp, [sp, #48]
stack = the_thread->Start.stack;
the_thread->Start.core_allocated_stack = TRUE;
} else {
stack = stack_area;
actual_stack_size = stack_size;
the_thread->Start.core_allocated_stack = FALSE;
69d8: 15c130c0 strbne r3, [r1, #192]
69dc: 11a0c004 movne ip, r4
69e0: 11a02006 movne r2, r6
/*
* Allocate and Initialize the stack for this thread.
*/
if ( !stack_area ) {
69e4: 0a000034 beq 6abc <_Thread_Initialize+0x108>
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
69e8: e59f416c ldr r4, [pc, #364] ; 6b5c <_Thread_Initialize+0x1a8>
69ec: e5940000 ldr r0, [r4]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
69f0: e3a06000 mov r6, #0 ; 0x0
69f4: e3500000 cmp r0, #0 ; 0x0
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
69f8: e58520c8 str r2, [r5, #200]
the_stack->size = size;
69fc: e585c0c4 str ip, [r5, #196]
6a00: e5856050 str r6, [r5, #80]
the_watchdog->routine = routine;
6a04: e5856064 str r6, [r5, #100]
the_watchdog->id = id;
6a08: e5856068 str r6, [r5, #104]
the_watchdog->user_data = user_data;
6a0c: e585606c str r6, [r5, #108]
/*
* Clear the libc reent hook.
*/
the_thread->libc_reent = NULL;
6a10: e5856100 str r6, [r5, #256]
return FALSE;
}
} else
extensions_area = NULL;
the_thread->extensions = (void **) extensions_area;
6a14: 05850110 streq r0, [r5, #272]
6a18: 01a07000 moveq r7, r0
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
6a1c: 1a000033 bne 6af0 <_Thread_Initialize+0x13c>
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
6a20: e59d3034 ldr r3, [sp, #52]
switch ( budget_algorithm ) {
6a24: e35b0002 cmp fp, #2 ; 0x2
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
6a28: e58530b4 str r3, [r5, #180]
switch ( budget_algorithm ) {
case THREAD_CPU_BUDGET_ALGORITHM_NONE:
case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
break;
case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
6a2c: 059f312c ldreq r3, [pc, #300] ; 6b60 <_Thread_Initialize+0x1ac>
6a30: 05932000 ldreq r2, [r3]
6a34: 05852078 streq r2, [r5, #120]
break;
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
}
the_thread->Start.isr_level = isr_level;
6a38: e59d3038 ldr r3, [sp, #56]
the_thread->current_state = STATES_DORMANT;
the_thread->Wait.queue = NULL;
6a3c: e3a04000 mov r4, #0 ; 0x0
break;
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
6a40: e3a06001 mov r6, #1 ; 0x1
break;
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
}
the_thread->Start.isr_level = isr_level;
6a44: e58530b8 str r3, [r5, #184]
the_thread->Wait.queue = NULL;
the_thread->resource_count = 0;
the_thread->suspend_count = 0;
the_thread->real_priority = priority;
the_thread->Start.initial_priority = priority;
_Thread_Set_priority( the_thread, priority );
6a48: e1a01008 mov r1, r8
6a4c: e1a00005 mov r0, r5
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
6a50: e5c5a0ac strb sl, [r5, #172]
the_thread->Start.budget_algorithm = budget_algorithm;
6a54: e585b0b0 str fp, [r5, #176]
break;
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
6a58: e5856010 str r6, [r5, #16]
the_thread->Wait.queue = NULL;
6a5c: e5854044 str r4, [r5, #68]
the_thread->resource_count = 0;
6a60: e585401c str r4, [r5, #28]
the_thread->suspend_count = 0;
6a64: e5854070 str r4, [r5, #112]
the_thread->real_priority = priority;
6a68: e5858018 str r8, [r5, #24]
the_thread->Start.initial_priority = priority;
6a6c: e58580bc str r8, [r5, #188]
_Thread_Set_priority( the_thread, priority );
6a70: eb000200 bl 7278 <_Thread_Set_priority>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
6a74: e1d530b8 ldrh r3, [r5, #8]
6a78: e599201c ldr r2, [r9, #28]
* Initialize the CPU usage statistics
*/
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
the_thread->cpu_time_used.tv_sec = 0;
the_thread->cpu_time_used.tv_nsec = 0;
6a7c: e5854088 str r4, [r5, #136]
6a80: e7825103 str r5, [r2, r3, lsl #2]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
6a84: e59d303c ldr r3, [sp, #60]
* 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 );
6a88: e1a00005 mov r0, r5
6a8c: e585300c str r3, [r5, #12]
/*
* Initialize the CPU usage statistics
*/
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
the_thread->cpu_time_used.tv_sec = 0;
6a90: e5854084 str r4, [r5, #132]
* 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 );
6a94: eb0003cb bl 79c8 <_User_extensions_Thread_create>
if ( !extension_status ) {
6a98: e1500004 cmp r0, r4
6a9c: 1a000011 bne 6ae8 <_Thread_Initialize+0x134>
if ( extensions_area )
6aa0: e3570000 cmp r7, #0 ; 0x0 <== NOT EXECUTED
(void) _Workspace_Free( extensions_area );
6aa4: 11a00007 movne r0, r7 <== NOT EXECUTED
6aa8: 1b0004d5 blne 7e04 <_Workspace_Free> <== NOT EXECUTED
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( fp_area )
(void) _Workspace_Free( fp_area );
#endif
_Thread_Stack_Free( the_thread );
6aac: e1a00005 mov r0, r5 <== NOT EXECUTED
6ab0: eb0002ad bl 756c <_Thread_Stack_Free> <== NOT EXECUTED
6ab4: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
return FALSE;
}
return TRUE;
}
6ab8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
*/
if ( !stack_area ) {
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
6abc: e1a00001 mov r0, r1
6ac0: e1a01004 mov r1, r4
6ac4: eb000288 bl 74ec <_Thread_Stack_Allocate>
if ( !actual_stack_size || actual_stack_size < stack_size )
6ac8: e1540000 cmp r4, r0
6acc: 93a03000 movls r3, #0 ; 0x0
6ad0: 83a03001 movhi r3, #1 ; 0x1
6ad4: e3500000 cmp r0, #0 ; 0x0
6ad8: 03833001 orreq r3, r3, #1 ; 0x1
6adc: e3530000 cmp r3, #0 ; 0x0
6ae0: e1a0c000 mov ip, r0
6ae4: 0a000014 beq 6b3c <_Thread_Initialize+0x188>
* Mutex provides sufficient protection to let the user extensions
* run safely.
*/
extension_status = _User_extensions_Thread_create( the_thread );
if ( !extension_status ) {
6ae8: e1a00006 mov r0, r6
6aec: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
extensions_area = _Workspace_Allocate(
6af0: e2800001 add r0, r0, #1 ; 0x1
6af4: e1a00100 lsl r0, r0, #2
6af8: eb0004c5 bl 7e14 <_Workspace_Allocate>
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area ) {
6afc: e2507000 subs r7, r0, #0 ; 0x0
6b00: 0a000011 beq 6b4c <_Thread_Initialize+0x198>
* call.
*/
if ( the_thread->extensions ) {
uint32_t i;
for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ )
6b04: e5943000 ldr r3, [r4]
6b08: e3730001 cmn r3, #1 ; 0x1
return FALSE;
}
} else
extensions_area = NULL;
the_thread->extensions = (void **) extensions_area;
6b0c: e5857110 str r7, [r5, #272]
* call.
*/
if ( the_thread->extensions ) {
uint32_t i;
for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ )
6b10: 0affffc2 beq 6a20 <_Thread_Initialize+0x6c>
6b14: e1a02006 mov r2, r6
6b18: e1a01007 mov r1, r7
the_thread->extensions[i] = NULL;
6b1c: e1a00006 mov r0, r6
* call.
*/
if ( the_thread->extensions ) {
uint32_t i;
for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ )
6b20: e5943000 ldr r3, [r4]
the_thread->extensions[i] = NULL;
6b24: e7810102 str r0, [r1, r2, lsl #2]
* call.
*/
if ( the_thread->extensions ) {
uint32_t i;
for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ )
6b28: e2833001 add r3, r3, #1 ; 0x1
6b2c: e2822001 add r2, r2, #1 ; 0x1
6b30: e1530002 cmp r3, r2
6b34: 8afffff9 bhi 6b20 <_Thread_Initialize+0x16c>
6b38: eaffffb8 b 6a20 <_Thread_Initialize+0x6c>
if ( !actual_stack_size || actual_stack_size < stack_size )
return FALSE; /* stack allocation failed */
stack = the_thread->Start.stack;
the_thread->Start.core_allocated_stack = TRUE;
6b3c: e3a03001 mov r3, #1 ; 0x1
6b40: e5c530c0 strb r3, [r5, #192]
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
if ( !actual_stack_size || actual_stack_size < stack_size )
return FALSE; /* stack allocation failed */
stack = the_thread->Start.stack;
6b44: e59520cc ldr r2, [r5, #204]
6b48: eaffffa6 b 69e8 <_Thread_Initialize+0x34>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( fp_area )
(void) _Workspace_Free( fp_area );
#endif
_Thread_Stack_Free( the_thread );
6b4c: e1a00005 mov r0, r5 <== NOT EXECUTED
6b50: eb000285 bl 756c <_Thread_Stack_Free> <== NOT EXECUTED
6b54: e1a00007 mov r0, r7 <== NOT EXECUTED
6b58: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
00007f74 <_Thread_Restart>:
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
if ( !_States_Is_dormant( the_thread->current_state ) ) {
7f74: e5903010 ldr r3, [r0, #16]
7f78: e3130001 tst r3, #1 ; 0x1
bool _Thread_Restart(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
7f7c: e92d4070 push {r4, r5, r6, lr}
7f80: e1a04000 mov r4, r0
7f84: e1a05001 mov r5, r1
7f88: e1a06002 mov r6, r2
if ( !_States_Is_dormant( the_thread->current_state ) ) {
7f8c: 13a00000 movne r0, #0 ; 0x0
7f90: 18bd8070 popne {r4, r5, r6, pc}
_Thread_Set_transient( the_thread );
7f94: eb000089 bl 81c0 <_Thread_Set_transient>
_Thread_Reset( the_thread, pointer_argument, numeric_argument );
7f98: e1a02006 mov r2, r6
7f9c: e1a01005 mov r1, r5
7fa0: e1a00004 mov r0, r4
7fa4: eb000fbd bl bea0 <_Thread_Reset>
_Thread_Load_environment( the_thread );
7fa8: e1a00004 mov r0, r4
7fac: eb000ed1 bl baf8 <_Thread_Load_environment>
_Thread_Ready( the_thread );
7fb0: e1a00004 mov r0, r4
7fb4: eb000f74 bl bd8c <_Thread_Ready>
_User_extensions_Thread_restart( the_thread );
7fb8: e1a00004 mov r0, r4
7fbc: eb000208 bl 87e4 <_User_extensions_Thread_restart>
if ( _Thread_Is_executing ( the_thread ) )
7fc0: e59f301c ldr r3, [pc, #28] ; 7fe4 <_Thread_Restart+0x70>
7fc4: e5932000 ldr r2, [r3]
7fc8: e1540002 cmp r4, r2
7fcc: 13a00001 movne r0, #1 ; 0x1
7fd0: 18bd8070 popne {r4, r5, r6, pc}
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( _Thread_Executing->fp_context != NULL )
_Context_Restore_fp( &_Thread_Executing->fp_context );
#endif
_CPU_Context_Restart_self( &_Thread_Executing->Registers );
7fd4: e28400d0 add r0, r4, #208 ; 0xd0
7fd8: eb00032e bl 8c98 <_CPU_Context_restore>
7fdc: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED
return TRUE;
}
return FALSE;
}
7fe0: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
00008d78 <_Thread_Resume>:
void _Thread_Resume(
Thread_Control *the_thread,
bool force
)
{
8d78: e92d0030 push {r4, r5}
8d7c: e20110ff and r1, r1, #255 ; 0xff
8d80: e1a04000 mov r4, r0
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
8d84: e10f5000 mrs r5, CPSR
8d88: e38530c0 orr r3, r5, #192 ; 0xc0
8d8c: e129f003 msr CPSR_fc, r3
if ( force == TRUE )
8d90: e3510000 cmp r1, #0 ; 0x0
the_thread->suspend_count = 0;
8d94: 13a03000 movne r3, #0 ; 0x0
8d98: 15803070 strne r3, [r0, #112]
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
if ( force == TRUE )
8d9c: 1a000006 bne 8dbc <_Thread_Resume+0x44>
the_thread->suspend_count = 0;
else
the_thread->suspend_count--;
8da0: e5903070 ldr r3, [r0, #112] <== NOT EXECUTED
8da4: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED
if ( the_thread->suspend_count > 0 ) {
8da8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
_ISR_Disable( level );
if ( force == TRUE )
the_thread->suspend_count = 0;
else
the_thread->suspend_count--;
8dac: e5803070 str r3, [r0, #112] <== NOT EXECUTED
if ( the_thread->suspend_count > 0 ) {
8db0: 0a000001 beq 8dbc <_Thread_Resume+0x44> <== NOT EXECUTED
_ISR_Enable( level );
8db4: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED
8db8: ea000003 b 8dcc <_Thread_Resume+0x54> <== NOT EXECUTED
return;
}
current_state = the_thread->current_state;
8dbc: e5943010 ldr r3, [r4, #16]
if ( current_state & STATES_SUSPENDED ) {
8dc0: e3130002 tst r3, #2 ; 0x2
8dc4: 1a000002 bne 8dd4 <_Thread_Resume+0x5c>
_Context_Switch_necessary = TRUE;
}
}
}
_ISR_Enable( level );
8dc8: e129f005 msr CPSR_fc, r5
}
8dcc: e8bd0030 pop {r4, r5}
8dd0: e12fff1e bx lr
8dd4: e3c33002 bic r3, r3, #2 ; 0x2
current_state = the_thread->current_state;
if ( current_state & STATES_SUSPENDED ) {
current_state =
the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state);
if ( _States_Is_ready( current_state ) ) {
8dd8: e3530000 cmp r3, #0 ; 0x0
return;
}
current_state = the_thread->current_state;
if ( current_state & STATES_SUSPENDED ) {
current_state =
8ddc: e5843010 str r3, [r4, #16]
the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state);
if ( _States_Is_ready( current_state ) ) {
8de0: 1afffff8 bne 8dc8 <_Thread_Resume+0x50>
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
8de4: e5940090 ldr r0, [r4, #144]
8de8: e1d429b6 ldrh r2, [r4, #150]
8dec: e1d030b0 ldrh r3, [r0]
_Priority_Add_to_bit_map( &the_thread->Priority_map );
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
8df0: e594108c ldr r1, [r4, #140]
8df4: e1833002 orr r3, r3, r2
8df8: e1c030b0 strh r3, [r0]
_Priority_Major_bit_map |= the_priority_map->ready_major;
8dfc: e59fc07c ldr ip, [pc, #124] ; 8e80 <_Thread_Resume+0x108>
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
8e00: e2813004 add r3, r1, #4 ; 0x4
8e04: e5843000 str r3, [r4]
8e08: e1dc20b0 ldrh r2, [ip]
8e0c: e1d439b4 ldrh r3, [r4, #148]
old_last_node = the_chain->last;
8e10: e5910008 ldr r0, [r1, #8]
8e14: e1822003 orr r2, r2, r3
the_chain->last = the_node;
8e18: e5814008 str r4, [r1, #8]
8e1c: e1cc20b0 strh r2, [ip]
old_last_node->next = the_node;
the_node->previous = old_last_node;
8e20: e5840004 str r0, [r4, #4]
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
8e24: e5804000 str r4, [r0]
_ISR_Flash( level );
8e28: e10f3000 mrs r3, CPSR
8e2c: e129f005 msr CPSR_fc, r5
8e30: e129f003 msr CPSR_fc, r3
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
8e34: e59fc048 ldr ip, [pc, #72] ; 8e84 <_Thread_Resume+0x10c>
8e38: e59c3000 ldr r3, [ip]
8e3c: e5940014 ldr r0, [r4, #20]
8e40: e5932014 ldr r2, [r3, #20]
8e44: e1500002 cmp r0, r2
8e48: 2affffde bcs 8dc8 <_Thread_Resume+0x50>
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
8e4c: e59f3034 ldr r3, [pc, #52] ; 8e88 <_Thread_Resume+0x110>
8e50: e5932000 ldr r2, [r3]
8e54: e5d21076 ldrb r1, [r2, #118]
8e58: e3510000 cmp r1, #0 ; 0x0
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
_ISR_Flash( level );
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
_Thread_Heir = the_thread;
8e5c: e58c4000 str r4, [ip]
if ( _Thread_Executing->is_preemptible ||
8e60: 0a000003 beq 8e74 <_Thread_Resume+0xfc>
the_thread->current_priority == 0 )
_Context_Switch_necessary = TRUE;
8e64: e59f3020 ldr r3, [pc, #32] ; 8e8c <_Thread_Resume+0x114>
8e68: e3a02001 mov r2, #1 ; 0x1
8e6c: e5c32000 strb r2, [r3]
8e70: eaffffd4 b 8dc8 <_Thread_Resume+0x50>
_ISR_Flash( level );
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
8e74: e3500000 cmp r0, #0 ; 0x0
8e78: 1affffd2 bne 8dc8 <_Thread_Resume+0x50>
8e7c: eafffff8 b 8e64 <_Thread_Resume+0xec> <== NOT EXECUTED
000074ec <_Thread_Stack_Allocate>:
* Call ONLY the CPU table stack allocate hook, _or_ the
* the RTEMS workspace allocate. This is so the stack free
* routine can call the correct deallocation routine.
*/
if ( _Configuration_Table->stack_allocate_hook ) {
74ec: e59f3070 ldr r3, [pc, #112] ; 7564 <_Thread_Stack_Allocate+0x78>
74f0: e5932000 ldr r2, [r3]
size_t _Thread_Stack_Allocate(
Thread_Control *the_thread,
size_t stack_size
)
{
74f4: e59f306c ldr r3, [pc, #108] ; 7568 <_Thread_Stack_Allocate+0x7c>
* Call ONLY the CPU table stack allocate hook, _or_ the
* the RTEMS workspace allocate. This is so the stack free
* routine can call the correct deallocation routine.
*/
if ( _Configuration_Table->stack_allocate_hook ) {
74f8: e592c020 ldr ip, [r2, #32]
size_t _Thread_Stack_Allocate(
Thread_Control *the_thread,
size_t stack_size
)
{
74fc: e5932000 ldr r2, [r3]
7500: e92d4030 push {r4, r5, lr}
7504: e1510002 cmp r1, r2
7508: 21a04001 movcs r4, r1
750c: 31a04002 movcc r4, r2
* Call ONLY the CPU table stack allocate hook, _or_ the
* the RTEMS workspace allocate. This is so the stack free
* routine can call the correct deallocation routine.
*/
if ( _Configuration_Table->stack_allocate_hook ) {
7510: e35c0000 cmp ip, #0 ; 0x0
size_t _Thread_Stack_Allocate(
Thread_Control *the_thread,
size_t stack_size
)
{
7514: e1a05000 mov r5, r0
* Call ONLY the CPU table stack allocate hook, _or_ the
* the RTEMS workspace allocate. This is so the stack free
* routine can call the correct deallocation routine.
*/
if ( _Configuration_Table->stack_allocate_hook ) {
7518: 0a000008 beq 7540 <_Thread_Stack_Allocate+0x54>
stack_addr = (*_Configuration_Table->stack_allocate_hook)( the_stack_size );
751c: e1a00004 mov r0, r4 <== NOT EXECUTED
7520: e1a0e00f mov lr, pc <== NOT EXECUTED
7524: e12fff1c bx ip <== NOT EXECUTED
7528: e1a03000 mov r3, r0 <== NOT EXECUTED
the_stack_size = 0;
the_thread->Start.stack = stack_addr;
return the_stack_size;
}
752c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
7530: 11a00004 movne r0, r4 <== NOT EXECUTED
7534: 03a00000 moveq r0, #0 ; 0x0 <== NOT EXECUTED
}
if ( !stack_addr )
the_stack_size = 0;
the_thread->Start.stack = stack_addr;
7538: e58530cc str r3, [r5, #204] <== NOT EXECUTED
return the_stack_size;
}
753c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
RTEMS_INLINE_ROUTINE uint32_t _Stack_Adjust_size (
size_t size
)
{
return size + CPU_STACK_ALIGNMENT;
7540: e2844004 add r4, r4, #4 ; 0x4
* get and keep the stack adjust factor, the stack alignment, and
* the context initialization sequence in sync.
*/
the_stack_size = _Stack_Adjust_size( the_stack_size );
stack_addr = _Workspace_Allocate( the_stack_size );
7544: e1a00004 mov r0, r4
7548: eb000231 bl 7e14 <_Workspace_Allocate>
754c: e1a03000 mov r3, r0
the_stack_size = 0;
the_thread->Start.stack = stack_addr;
return the_stack_size;
}
7550: e3530000 cmp r3, #0 ; 0x0
7554: 11a00004 movne r0, r4
7558: 03a00000 moveq r0, #0 ; 0x0
}
if ( !stack_addr )
the_stack_size = 0;
the_thread->Start.stack = stack_addr;
755c: e58530cc str r3, [r5, #204]
return the_stack_size;
}
7560: e8bd8030 pop {r4, r5, pc}
0000756c <_Thread_Stack_Free>:
{
/*
* If the API provided the stack space, then don't free it.
*/
if ( !the_thread->Start.core_allocated_stack )
756c: e5d030c0 ldrb r3, [r0, #192]
7570: e3530000 cmp r3, #0 ; 0x0
*/
void _Thread_Stack_Free(
Thread_Control *the_thread
)
{
7574: e52de004 push {lr} ; (str lr, [sp, #-4]!)
/*
* If the API provided the stack space, then don't free it.
*/
if ( !the_thread->Start.core_allocated_stack )
7578: 049df004 popeq {pc} ; (ldreq pc, [sp], #4)
* Call ONLY the CPU table stack free hook, or the
* the RTEMS workspace free. This is so the free
* routine properly matches the allocation of the stack.
*/
if ( _Configuration_Table->stack_free_hook )
757c: e59f3028 ldr r3, [pc, #40] ; 75ac <_Thread_Stack_Free+0x40>
7580: e5932000 ldr r2, [r3]
7584: e5923024 ldr r3, [r2, #36]
7588: e3530000 cmp r3, #0 ; 0x0
758c: 0a000003 beq 75a0 <_Thread_Stack_Free+0x34>
(*_Configuration_Table->stack_free_hook)(
7590: e59000c8 ldr r0, [r0, #200] <== NOT EXECUTED
7594: e1a0e00f mov lr, pc <== NOT EXECUTED
7598: e12fff13 bx r3 <== NOT EXECUTED
759c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
the_thread->Start.Initial_stack.area
);
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
75a0: e59000c8 ldr r0, [r0, #200]
}
75a4: e49de004 pop {lr} ; (ldr lr, [sp], #4)
if ( _Configuration_Table->stack_free_hook )
(*_Configuration_Table->stack_free_hook)(
the_thread->Start.Initial_stack.area
);
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
75a8: ea000215 b 7e04 <_Workspace_Free>
00007648 <_Thread_Tickle_timeslice>:
void _Thread_Tickle_timeslice( void )
{
Thread_Control *executing;
executing = _Thread_Executing;
7648: e59f3084 ldr r3, [pc, #132] ; 76d4 <_Thread_Tickle_timeslice+0x8c>
*
* Output parameters: NONE
*/
void _Thread_Tickle_timeslice( void )
{
764c: e92d4010 push {r4, lr}
Thread_Control *executing;
executing = _Thread_Executing;
7650: e5934000 ldr r4, [r3]
/*
* If the thread is not preemptible or is not ready, then
* just return.
*/
if ( !executing->is_preemptible )
7654: e5d42076 ldrb r2, [r4, #118]
7658: e3520000 cmp r2, #0 ; 0x0
765c: 08bd8010 popeq {r4, pc}
return;
if ( !_States_Is_ready( executing->current_state ) )
7660: e5943010 ldr r3, [r4, #16]
7664: e3530000 cmp r3, #0 ; 0x0
7668: 18bd8010 popne {r4, pc}
/*
* The cpu budget algorithm determines what happens next.
*/
switch ( executing->budget_algorithm ) {
766c: e594307c ldr r3, [r4, #124]
7670: e3530001 cmp r3, #1 ; 0x1
7674: 38bd8010 popcc {r4, pc}
7678: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED
767c: 9a00000a bls 76ac <_Thread_Tickle_timeslice+0x64> <== NOT EXECUTED
7680: e3530003 cmp r3, #3 ; 0x3 <== NOT EXECUTED
7684: 18bd8010 popne {r4, pc} <== NOT EXECUTED
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
}
break;
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
if ( --executing->cpu_time_budget == 0 )
7688: e5943078 ldr r3, [r4, #120] <== NOT EXECUTED
768c: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED
7690: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
7694: e5843078 str r3, [r4, #120] <== NOT EXECUTED
7698: 18bd8010 popne {r4, pc} <== NOT EXECUTED
(*executing->budget_callout)( executing );
769c: e1a00004 mov r0, r4 <== NOT EXECUTED
76a0: e1a0e00f mov lr, pc <== NOT EXECUTED
76a4: e594f080 ldr pc, [r4, #128] <== NOT EXECUTED
76a8: e8bd8010 pop {r4, pc} <== NOT EXECUTED
case THREAD_CPU_BUDGET_ALGORITHM_NONE:
break;
case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
if ( (int)(--executing->cpu_time_budget) <= 0 ) {
76ac: e5943078 ldr r3, [r4, #120] <== NOT EXECUTED
76b0: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED
76b4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
76b8: e5843078 str r3, [r4, #120] <== NOT EXECUTED
76bc: c8bd8010 popgt {r4, pc} <== NOT EXECUTED
_Thread_Reset_timeslice();
76c0: eb000e5c bl b038 <_Thread_Reset_timeslice> <== NOT EXECUTED
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
76c4: e59f300c ldr r3, [pc, #12] ; 76d8 <_Thread_Tickle_timeslice+0x90><== NOT EXECUTED
76c8: e5932000 ldr r2, [r3] <== NOT EXECUTED
76cc: e5842078 str r2, [r4, #120] <== NOT EXECUTED
76d0: e8bd8010 pop {r4, pc} <== NOT EXECUTED
000076dc <_Thread_Yield_processor>:
{
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
76dc: e59f3094 ldr r3, [pc, #148] ; 7778 <_Thread_Yield_processor+0x9c><== NOT EXECUTED
76e0: e5930000 ldr r0, [r3] <== NOT EXECUTED
* ready chain
* select heir
*/
void _Thread_Yield_processor( void )
{
76e4: e52d4004 push {r4} ; (str r4, [sp, #-4]!) <== NOT EXECUTED
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
ready = executing->ready;
76e8: e590c08c ldr ip, [r0, #140] <== NOT EXECUTED
_ISR_Disable( level );
76ec: e10f4000 mrs r4, CPSR <== NOT EXECUTED
76f0: e38430c0 orr r3, r4, #192 ; 0xc0 <== NOT EXECUTED
76f4: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
if ( !_Chain_Has_only_one_node( ready ) ) {
76f8: e59c2000 ldr r2, [ip] <== NOT EXECUTED
76fc: e59c3008 ldr r3, [ip, #8] <== NOT EXECUTED
7700: e1520003 cmp r2, r3 <== NOT EXECUTED
7704: 0a000016 beq 7764 <_Thread_Yield_processor+0x88> <== NOT EXECUTED
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
7708: e8900006 ldm r0, {r1, r2} <== NOT EXECUTED
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
770c: e28c3004 add r3, ip, #4 ; 0x4 <== NOT EXECUTED
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
previous->next = next;
7710: e5821000 str r1, [r2] <== NOT EXECUTED
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
7714: e5812004 str r2, [r1, #4] <== NOT EXECUTED
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
7718: e5803000 str r3, [r0] <== NOT EXECUTED
old_last_node = the_chain->last;
771c: e59c3008 ldr r3, [ip, #8] <== NOT EXECUTED
the_chain->last = the_node;
7720: e58c0008 str r0, [ip, #8] <== NOT EXECUTED
old_last_node->next = the_node;
the_node->previous = old_last_node;
7724: e5803004 str r3, [r0, #4] <== NOT EXECUTED
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
7728: e5830000 str r0, [r3] <== NOT EXECUTED
_Chain_Extract_unprotected( &executing->Object.Node );
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
772c: e10f3000 mrs r3, CPSR <== NOT EXECUTED
7730: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED
7734: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
if ( _Thread_Is_heir( executing ) )
7738: e59f103c ldr r1, [pc, #60] ; 777c <_Thread_Yield_processor+0xa0><== NOT EXECUTED
773c: e5913000 ldr r3, [r1] <== NOT EXECUTED
7740: e1500003 cmp r0, r3 <== NOT EXECUTED
_Thread_Heir = (Thread_Control *) ready->first;
7744: 059c3000 ldreq r3, [ip] <== NOT EXECUTED
7748: 05813000 streq r3, [r1] <== NOT EXECUTED
_Context_Switch_necessary = TRUE;
}
else if ( !_Thread_Is_heir( executing ) )
_Context_Switch_necessary = TRUE;
774c: e59f302c ldr r3, [pc, #44] ; 7780 <_Thread_Yield_processor+0xa4><== NOT EXECUTED
7750: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED
7754: e5c32000 strb r2, [r3] <== NOT EXECUTED
_ISR_Enable( level );
7758: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED
}
775c: e8bd0010 pop {r4} <== NOT EXECUTED
7760: e12fff1e bx lr <== NOT EXECUTED
if ( _Thread_Is_heir( executing ) )
_Thread_Heir = (Thread_Control *) ready->first;
_Context_Switch_necessary = TRUE;
}
else if ( !_Thread_Is_heir( executing ) )
7764: e59f3010 ldr r3, [pc, #16] ; 777c <_Thread_Yield_processor+0xa0><== NOT EXECUTED
7768: e5932000 ldr r2, [r3] <== NOT EXECUTED
776c: e1500002 cmp r0, r2 <== NOT EXECUTED
7770: 1afffff5 bne 774c <_Thread_Yield_processor+0x70> <== NOT EXECUTED
7774: eafffff7 b 7758 <_Thread_Yield_processor+0x7c> <== NOT EXECUTED
000062d0 <_Thread_blocking_operation_Cancel>:
/*
* If the sync state is timed out, this is very likely not needed.
* But better safe than sorry when it comes to critical sections.
*/
if ( _Watchdog_Is_active( &the_thread->Timer ) ) {
62d0: e5913050 ldr r3, [r1, #80] <== NOT EXECUTED
void _Thread_blocking_operation_Cancel(
Thread_blocking_operation_States sync_state,
Thread_Control *the_thread,
ISR_Level level
)
{
62d4: e92d4010 push {r4, lr} <== 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 ) ) {
62d8: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED
void _Thread_blocking_operation_Cancel(
Thread_blocking_operation_States sync_state,
Thread_Control *the_thread,
ISR_Level level
)
{
62dc: e1a04001 mov r4, r1 <== NOT EXECUTED
#endif
/*
* The thread is not waiting on anything after this completes.
*/
the_thread->Wait.queue = NULL;
62e0: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED
62e4: e5841044 str r1, [r4, #68] <== 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 ) ) {
62e8: 0a000006 beq 6308 <_Thread_blocking_operation_Cancel+0x38> <== NOT EXECUTED
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
(void) _Watchdog_Remove( &the_thread->Timer );
} else
_ISR_Enable( level );
62ec: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
62f0: e3a01201 mov r1, #268435456 ; 0x10000000 <== NOT EXECUTED
62f4: e2811bff add r1, r1, #261120 ; 0x3fc00 <== NOT EXECUTED
62f8: e1a00004 mov r0, r4 <== NOT EXECUTED
62fc: e2811ffe add r1, r1, #1016 ; 0x3f8 <== NOT EXECUTED
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
6300: e8bd4010 pop {r4, lr} <== NOT EXECUTED
6304: ea000070 b 64cc <_Thread_Clear_state> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
6308: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED
630c: e5843050 str r3, [r4, #80] <== 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 ) ) {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
6310: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
(void) _Watchdog_Remove( &the_thread->Timer );
6314: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED
6318: eb000667 bl 7cbc <_Watchdog_Remove> <== NOT EXECUTED
631c: eafffff3 b 62f0 <_Thread_blocking_operation_Cancel+0x20> <== NOT EXECUTED
00006eb4 <_Thread_queue_Enqueue_priority>:
Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
6eb4: e92d07f0 push {r4, r5, r6, r7, r8, r9, sl}
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
6eb8: e281303c add r3, r1, #60 ; 0x3c
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
6ebc: e5914014 ldr r4, [r1, #20]
Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
6ec0: e1a07001 mov r7, r1
6ec4: e1a08000 mov r8, r0
6ec8: e5813038 str r3, [r1, #56]
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
6ecc: e2810038 add r0, r1, #56 ; 0x38
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
6ed0: e3a01000 mov r1, #0 ; 0x0
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
block_state = the_thread_queue->state;
if ( _Thread_queue_Is_reverse_search( priority ) )
6ed4: e3140020 tst r4, #32 ; 0x20
6ed8: e587103c str r1, [r7, #60]
RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number (
Priority_Control the_priority
)
{
return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER);
6edc: e1a01324 lsr r1, r4, #6
Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
6ee0: e1a0a002 mov sl, r2
the_node->previous = previous_node;
previous_node->next = the_node;
search_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
6ee4: 11a02201 lslne r2, r1, #4
6ee8: 10423101 subne r3, r2, r1, lsl #2
6eec: 10882003 addne r2, r8, r3
the_chain->last = _Chain_Head(the_chain);
6ef0: e5870040 str r0, [r7, #64]
_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;
6ef4: e5986038 ldr r6, [r8, #56]
6ef8: 159f91d4 ldrne r9, [pc, #468] ; 70d4 <_Thread_queue_Enqueue_priority+0x220>
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
6efc: 12820008 addne r0, r2, #8 ; 0x8
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
block_state = the_thread_queue->state;
if ( _Thread_queue_Is_reverse_search( priority ) )
6f00: 1a000028 bne 6fa8 <_Thread_queue_Enqueue_priority+0xf4>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
6f04: e1a03081 lsl r3, r1, #1
6f08: e0833001 add r3, r3, r1
6f0c: e2833001 add r3, r3, #1 ; 0x1
6f10: e1a02201 lsl r2, r1, #4
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
6f14: e0422101 sub r2, r2, r1, lsl #2
6f18: e1a03103 lsl r3, r3, #2
6f1c: e0880003 add r0, r8, r3
6f20: e0882002 add r2, r8, r2
if ( _Thread_queue_Is_reverse_search( priority ) )
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
6f24: e10f5000 mrs r5, CPSR
6f28: e38530c0 orr r3, r5, #192 ; 0xc0
6f2c: e129f003 msr CPSR_fc, r3
search_thread = (Thread_Control *) header->first;
6f30: e5921000 ldr r1, [r2]
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
6f34: e1510000 cmp r1, r0
6f38: 1a00000f bne 6f7c <_Thread_queue_Enqueue_priority+0xc8>
6f3c: ea000061 b 70c8 <_Thread_queue_Enqueue_priority+0x214>
search_priority = search_thread->current_priority;
if ( priority <= search_priority )
break;
#if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE )
search_thread = (Thread_Control *) search_thread->Object.Node.next;
6f40: e5911000 ldr r1, [r1]
if ( _Chain_Is_tail( header, (Chain_Node *)search_thread ) )
6f44: e1510000 cmp r1, r0
6f48: 0a00000e beq 6f88 <_Thread_queue_Enqueue_priority+0xd4>
break;
search_priority = search_thread->current_priority;
6f4c: e591c014 ldr ip, [r1, #20]
if ( priority <= search_priority )
6f50: e154000c cmp r4, ip
6f54: 9a00000b bls 6f88 <_Thread_queue_Enqueue_priority+0xd4>
break;
#endif
_ISR_Flash( level );
6f58: e10f3000 mrs r3, CPSR
6f5c: e129f005 msr CPSR_fc, r5
6f60: e129f003 msr CPSR_fc, r3
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
6f64: e5913010 ldr r3, [r1, #16]
6f68: e1160003 tst r6, r3
6f6c: 0a000049 beq 7098 <_Thread_queue_Enqueue_priority+0x1e4>
_ISR_Enable( level );
goto restart_forward_search;
}
search_thread =
6f70: e5911000 ldr r1, [r1]
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
6f74: e1510000 cmp r1, r0
6f78: 0a000002 beq 6f88 <_Thread_queue_Enqueue_priority+0xd4>
search_priority = search_thread->current_priority;
6f7c: e591c014 ldr ip, [r1, #20]
if ( priority <= search_priority )
6f80: e154000c cmp r4, ip
6f84: 8affffed bhi 6f40 <_Thread_queue_Enqueue_priority+0x8c>
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
6f88: e1a06005 mov r6, r5
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
6f8c: e5980030 ldr r0, [r8, #48]
6f90: e3500001 cmp r0, #1 ; 0x1
6f94: 0a000034 beq 706c <_Thread_queue_Enqueue_priority+0x1b8>
* 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;
6f98: e58a6000 str r6, [sl] <== NOT EXECUTED
return the_thread_queue->sync_state;
}
6f9c: e8bd07f0 pop {r4, r5, r6, r7, r8, r9, sl}
6fa0: e12fff1e bx lr
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
_ISR_Enable( level );
6fa4: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
6fa8: e5d93000 ldrb r3, [r9]
6fac: e283c001 add ip, r3, #1 ; 0x1
_ISR_Disable( level );
6fb0: e10f5000 mrs r5, CPSR
6fb4: e38530c0 orr r3, r5, #192 ; 0xc0
6fb8: e129f003 msr CPSR_fc, r3
search_thread = (Thread_Control *) header->last;
6fbc: e5901000 ldr r1, [r0]
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
6fc0: e1520001 cmp r2, r1
6fc4: 0a000018 beq 702c <_Thread_queue_Enqueue_priority+0x178>
search_priority = search_thread->current_priority;
6fc8: e591c014 ldr ip, [r1, #20]
if ( priority >= search_priority )
6fcc: e154000c cmp r4, ip
6fd0: 2a000015 bcs 702c <_Thread_queue_Enqueue_priority+0x178>
break;
#if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE )
search_thread = (Thread_Control *) search_thread->Object.Node.previous;
6fd4: e5911004 ldr r1, [r1, #4]
if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) )
6fd8: e1520001 cmp r2, r1
6fdc: 1a00000f bne 7020 <_Thread_queue_Enqueue_priority+0x16c>
6fe0: ea000011 b 702c <_Thread_queue_Enqueue_priority+0x178>
break;
search_priority = search_thread->current_priority;
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
6fe4: e10f3000 mrs r3, CPSR
6fe8: e129f005 msr CPSR_fc, r5
6fec: e129f003 msr CPSR_fc, r3
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
6ff0: e5913010 ldr r3, [r1, #16]
6ff4: e1160003 tst r6, r3
6ff8: 0affffe9 beq 6fa4 <_Thread_queue_Enqueue_priority+0xf0>
_ISR_Enable( level );
goto restart_reverse_search;
}
search_thread = (Thread_Control *)
6ffc: e5911004 ldr r1, [r1, #4]
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
7000: e1510002 cmp r1, r2
7004: 0a000008 beq 702c <_Thread_queue_Enqueue_priority+0x178>
search_priority = search_thread->current_priority;
7008: e591c014 ldr ip, [r1, #20]
if ( priority >= search_priority )
700c: e154000c cmp r4, ip
7010: 2a000005 bcs 702c <_Thread_queue_Enqueue_priority+0x178>
break;
#if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE )
search_thread = (Thread_Control *) search_thread->Object.Node.previous;
7014: e5911004 ldr r1, [r1, #4] <== NOT EXECUTED
if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) )
7018: e1510002 cmp r1, r2 <== NOT EXECUTED
701c: 0a000002 beq 702c <_Thread_queue_Enqueue_priority+0x178> <== NOT EXECUTED
break;
search_priority = search_thread->current_priority;
7020: e591c014 ldr ip, [r1, #20]
if ( priority >= search_priority )
7024: e154000c cmp r4, ip
7028: 3affffed bcc 6fe4 <_Thread_queue_Enqueue_priority+0x130>
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
702c: e5980030 ldr r0, [r8, #48]
7030: e3500001 cmp r0, #1 ; 0x1
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
7034: e1a06005 mov r6, r5
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
7038: 1affffd6 bne 6f98 <_Thread_queue_Enqueue_priority+0xe4>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
703c: e3a03000 mov r3, #0 ; 0x0
if ( priority == search_priority )
7040: e154000c cmp r4, ip
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
7044: e5883030 str r3, [r8, #48]
if ( priority == search_priority )
7048: 0a000014 beq 70a0 <_Thread_queue_Enqueue_priority+0x1ec>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
704c: e5913000 ldr r3, [r1]
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
7050: e5871004 str r1, [r7, #4]
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
7054: e5873000 str r3, [r7]
the_node->previous = search_node;
search_node->next = the_node;
next_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
7058: e5878044 str r8, [r7, #68]
next_node = search_node->next;
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
search_node->next = the_node;
705c: e5817000 str r7, [r1]
next_node->previous = the_node;
7060: e5837004 str r7, [r3, #4]
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
7064: e129f005 msr CPSR_fc, r5
7068: eaffffcb b 6f9c <_Thread_queue_Enqueue_priority+0xe8>
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
706c: e3a03000 mov r3, #0 ; 0x0
if ( priority == search_priority )
7070: e154000c cmp r4, ip
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
7074: e5883030 str r3, [r8, #48]
if ( priority == search_priority )
7078: 0a000008 beq 70a0 <_Thread_queue_Enqueue_priority+0x1ec>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
707c: e5913004 ldr r3, [r1, #4]
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
7080: e887000a stm r7, {r1, r3}
the_node->previous = previous_node;
previous_node->next = the_node;
search_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
7084: e5878044 str r8, [r7, #68]
previous_node = search_node->previous;
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
the_node->previous = previous_node;
previous_node->next = the_node;
7088: e5837000 str r7, [r3]
search_node->previous = the_node;
708c: e5817004 str r7, [r1, #4]
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
7090: e129f005 msr CPSR_fc, r5
7094: eaffffc0 b 6f9c <_Thread_queue_Enqueue_priority+0xe8>
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
_ISR_Enable( level );
7098: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED
709c: eaffffa0 b 6f24 <_Thread_queue_Enqueue_priority+0x70> <== NOT EXECUTED
70a0: e281303c add r3, r1, #60 ; 0x3c
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
equal_priority: /* add at end of priority group */
search_node = _Chain_Tail( &search_thread->Wait.Block2n );
previous_node = search_node->previous;
70a4: e5932004 ldr r2, [r3, #4]
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
70a8: e5873000 str r3, [r7]
the_node->previous = previous_node;
70ac: e5872004 str r2, [r7, #4]
previous_node->next = the_node;
search_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
70b0: e5878044 str r8, [r7, #68]
previous_node = search_node->previous;
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
the_node->previous = previous_node;
previous_node->next = the_node;
70b4: e5827000 str r7, [r2]
search_node->previous = the_node;
70b8: e5837004 str r7, [r3, #4]
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
70bc: e129f006 msr CPSR_fc, r6
70c0: e3a00001 mov r0, #1 ; 0x1
70c4: eaffffb4 b 6f9c <_Thread_queue_Enqueue_priority+0xe8>
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
70c8: e1a06005 mov r6, r5
70cc: e3e0c000 mvn ip, #0 ; 0x0
70d0: eaffffad b 6f8c <_Thread_queue_Enqueue_priority+0xd8>
0000be98 <_Thread_queue_Extract_fifo>:
void _Thread_queue_Extract_fifo(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
be98: e92d4010 push {r4, lr}
be9c: e1a04001 mov r4, r1
ISR_Level level;
_ISR_Disable( level );
bea0: e10f0000 mrs r0, CPSR
bea4: e38030c0 orr r3, r0, #192 ; 0xc0
bea8: e129f003 msr CPSR_fc, r3
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
beac: e5913010 ldr r3, [r1, #16]
beb0: e3c334ff bic r3, r3, #-16777216 ; 0xff000000
beb4: e3c3373f bic r3, r3, #16515072 ; 0xfc0000
beb8: e3c33c41 bic r3, r3, #16640 ; 0x4100
bebc: e3c3301f bic r3, r3, #31 ; 0x1f
bec0: e3530000 cmp r3, #0 ; 0x0
bec4: 0a00000f beq bf08 <_Thread_queue_Extract_fifo+0x70>
_Chain_Extract_unprotected( &the_thread->Object.Node );
the_thread->Wait.queue = NULL;
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
bec8: e5913050 ldr r3, [r1, #80]
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
becc: e5942004 ldr r2, [r4, #4]
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
bed0: e5911000 ldr r1, [r1]
bed4: e3530002 cmp r3, #2 ; 0x2
return;
}
_Chain_Extract_unprotected( &the_thread->Object.Node );
the_thread->Wait.queue = NULL;
bed8: e3a03000 mov r3, #0 ; 0x0
previous = the_node->previous;
next->previous = previous;
previous->next = next;
bedc: e5821000 str r1, [r2]
bee0: e5843044 str r3, [r4, #68]
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
bee4: e5812004 str r2, [r1, #4]
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
bee8: 0a000008 beq bf10 <_Thread_queue_Extract_fifo+0x78>
_ISR_Enable( level );
beec: e129f000 msr CPSR_fc, r0
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
bef0: e3a01201 mov r1, #268435456 ; 0x10000000
bef4: e2811bff add r1, r1, #261120 ; 0x3fc00
bef8: e1a00004 mov r0, r4
befc: e2811ffe add r1, r1, #1016 ; 0x3f8
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
bf00: e8bd4010 pop {r4, lr}
bf04: eaffe970 b 64cc <_Thread_Clear_state>
ISR_Level level;
_ISR_Disable( level );
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
_ISR_Enable( level );
bf08: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
bf0c: e8bd8010 pop {r4, pc} <== NOT EXECUTED
bf10: e3a03003 mov r3, #3 ; 0x3
bf14: e5843050 str r3, [r4, #80]
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
bf18: e129f000 msr CPSR_fc, r0
(void) _Watchdog_Remove( &the_thread->Timer );
bf1c: e2840048 add r0, r4, #72 ; 0x48
bf20: ebffef65 bl 7cbc <_Watchdog_Remove>
bf24: eafffff1 b bef0 <_Thread_queue_Extract_fifo+0x58>
0000adf4 <_Thread_queue_Extract_priority_helper>:
void _Thread_queue_Extract_priority_helper(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
bool requeuing
)
{
adf4: e92d4070 push {r4, r5, r6, lr}
adf8: e1a04001 mov r4, r1
adfc: e20260ff and r6, r2, #255 ; 0xff
Chain_Node *new_first_node;
Chain_Node *new_second_node;
Chain_Node *last_node;
the_node = (Chain_Node *) the_thread;
_ISR_Disable( level );
ae00: e10fc000 mrs ip, CPSR
ae04: e38c30c0 orr r3, ip, #192 ; 0xc0
ae08: e129f003 msr CPSR_fc, r3
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
ae0c: e5913010 ldr r3, [r1, #16]
ae10: e3c334ff bic r3, r3, #-16777216 ; 0xff000000
ae14: e3c3373f bic r3, r3, #16515072 ; 0xfc0000
ae18: e3c33c41 bic r3, r3, #16640 ; 0x4100
ae1c: e3c3301f bic r3, r3, #31 ; 0x1f
ae20: e3530000 cmp r3, #0 ; 0x0
ae24: 0a000023 beq aeb8 <_Thread_queue_Extract_priority_helper+0xc4>
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
ae28: e5911038 ldr r1, [r1, #56]
*/
next_node = the_node->next;
previous_node = the_node->previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
ae2c: e284303c add r3, r4, #60 ; 0x3c
ae30: e1510003 cmp r1, r3
/*
* The thread was actually waiting on a thread queue so let's remove it.
*/
next_node = the_node->next;
ae34: e894000c ldm r4, {r2, r3}
new_first_thread->Wait.Block2n.last = last_node;
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
}
} else {
previous_node->next = next_node;
next_node->previous = previous_node;
ae38: 05823004 streq r3, [r2, #4]
new_first_thread->Wait.Block2n.last = last_node;
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
}
} else {
previous_node->next = next_node;
ae3c: 05832000 streq r2, [r3]
*/
next_node = the_node->next;
previous_node = the_node->previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
ae40: 0a00000e beq ae80 <_Thread_queue_Extract_priority_helper+0x8c>
new_first_node = the_thread->Wait.Block2n.first;
new_first_thread = (Thread_Control *) new_first_node;
last_node = the_thread->Wait.Block2n.last;
ae44: e5945040 ldr r5, [r4, #64]
new_second_node = new_first_node->next;
ae48: e5910000 ldr r0, [r1]
previous_node->next = new_first_node;
next_node->previous = new_first_node;
ae4c: e5821004 str r1, [r2, #4]
new_first_node = the_thread->Wait.Block2n.first;
new_first_thread = (Thread_Control *) new_first_node;
last_node = the_thread->Wait.Block2n.last;
new_second_node = new_first_node->next;
previous_node->next = new_first_node;
ae50: e5831000 str r1, [r3]
next_node->previous = new_first_node;
new_first_node->next = next_node;
new_first_node->previous = previous_node;
ae54: e881000c stm r1, {r2, r3}
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
ae58: e5942038 ldr r2, [r4, #56]
ae5c: e5943040 ldr r3, [r4, #64]
ae60: e1520003 cmp r2, r3
ae64: 0a000005 beq ae80 <_Thread_queue_Extract_priority_helper+0x8c>
new_second_node->previous =
_Chain_Head( &new_first_thread->Wait.Block2n );
new_first_thread->Wait.Block2n.first = new_second_node;
new_first_thread->Wait.Block2n.last = last_node;
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
ae68: e281203c add r2, r1, #60 ; 0x3c
new_first_node->next = next_node;
new_first_node->previous = previous_node;
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
/* > two threads on 2-n */
new_second_node->previous =
ae6c: e2813038 add r3, r1, #56 ; 0x38
ae70: e5803004 str r3, [r0, #4]
_Chain_Head( &new_first_thread->Wait.Block2n );
new_first_thread->Wait.Block2n.first = new_second_node;
ae74: e5810038 str r0, [r1, #56]
new_first_thread->Wait.Block2n.last = last_node;
ae78: e5815040 str r5, [r1, #64]
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
ae7c: e5852000 str r2, [r5]
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
ae80: e3560000 cmp r6, #0 ; 0x0
ae84: 1a000009 bne aeb0 <_Thread_queue_Extract_priority_helper+0xbc>
_ISR_Enable( level );
return;
}
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
ae88: e5943050 ldr r3, [r4, #80]
ae8c: e3530002 cmp r3, #2 ; 0x2
ae90: 0a00000a beq aec0 <_Thread_queue_Extract_priority_helper+0xcc>
_ISR_Enable( level );
ae94: e129f00c msr CPSR_fc, ip
ae98: e3a01201 mov r1, #268435456 ; 0x10000000
ae9c: e2811bff add r1, r1, #261120 ; 0x3fc00
aea0: e1a00004 mov r0, r4
aea4: e2811ffe add r1, r1, #1016 ; 0x3f8
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
aea8: e8bd4070 pop {r4, r5, r6, lr}
aeac: eaffed86 b 64cc <_Thread_Clear_state>
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
_ISR_Enable( level );
aeb0: e129f00c msr CPSR_fc, ip
aeb4: e8bd8070 pop {r4, r5, r6, pc}
Chain_Node *last_node;
the_node = (Chain_Node *) the_thread;
_ISR_Disable( level );
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
_ISR_Enable( level );
aeb8: e129f00c msr CPSR_fc, ip <== NOT EXECUTED
aebc: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
aec0: e3a03003 mov r3, #3 ; 0x3
aec4: e5843050 str r3, [r4, #80]
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
aec8: e129f00c msr CPSR_fc, ip
(void) _Watchdog_Remove( &the_thread->Timer );
aecc: e2840048 add r0, r4, #72 ; 0x48
aed0: ebfff379 bl 7cbc <_Watchdog_Remove>
aed4: eaffffef b ae98 <_Thread_queue_Extract_priority_helper+0xa4>
0000aed8 <_Thread_queue_Process_timeout>:
#include <rtems/score/tqdata.h>
void _Thread_queue_Process_timeout(
Thread_Control *the_thread
)
{
aed8: e1a01000 mov r1, r0
Thread_queue_Control *the_thread_queue = the_thread->Wait.queue;
aedc: e5900044 ldr r0, [r0, #68]
* 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 &&
aee0: e590c030 ldr ip, [r0, #48]
aee4: e35c0000 cmp ip, #0 ; 0x0
aee8: 0a000003 beq aefc <_Thread_queue_Process_timeout+0x24>
aeec: e59f302c ldr r3, [pc, #44] ; af20 <_Thread_queue_Process_timeout+0x48><== NOT EXECUTED
aef0: e5932000 ldr r2, [r3] <== NOT EXECUTED
aef4: e1510002 cmp r1, r2 <== NOT EXECUTED
aef8: 0a000002 beq af08 <_Thread_queue_Process_timeout+0x30> <== NOT EXECUTED
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
} else {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
aefc: e590303c ldr r3, [r0, #60]
af00: e5813034 str r3, [r1, #52]
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
af04: eaffffb4 b addc <_Thread_queue_Extract>
* a timeout is not allowed to occur.
*/
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED &&
_Thread_Is_executing( the_thread ) ) {
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) {
af08: e35c0003 cmp ip, #3 ; 0x3 <== NOT EXECUTED
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
af0c: 1590303c ldrne r3, [r0, #60] <== NOT EXECUTED
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
af10: 13a02002 movne r2, #2 ; 0x2 <== NOT EXECUTED
*/
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED &&
_Thread_Is_executing( the_thread ) ) {
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
af14: 15813034 strne r3, [r1, #52] <== NOT EXECUTED
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
af18: 15802030 strne r2, [r0, #48] <== NOT EXECUTED
af1c: e12fff1e bx lr <== NOT EXECUTED
00012c24 <_Timer_Server_body>:
* @param[in] ignored is the the task argument that is ignored
*/
Thread _Timer_Server_body(
uint32_t ignored
)
{
12c24: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
/*
* Initialize the "last time" markers to indicate the timer that
* the server was initiated.
*/
_Timer_Server_ticks_last_time = _Watchdog_Ticks_since_boot;
12c28: e59f01cc ldr r0, [pc, #460] ; 12dfc <_Timer_Server_body+0x1d8>
12c2c: e59f81cc ldr r8, [pc, #460] ; 12e00 <_Timer_Server_body+0x1dc>
12c30: e5902000 ldr r2, [r0]
_Timer_Server_seconds_last_time = _TOD_Seconds_since_epoch;
12c34: e59f01c8 ldr r0, [pc, #456] ; 12e04 <_Timer_Server_body+0x1e0>
12c38: e5983000 ldr r3, [r8]
* @param[in] ignored is the the task argument that is ignored
*/
Thread _Timer_Server_body(
uint32_t ignored
)
{
12c3c: e24dd00c sub sp, sp, #12 ; 0xc
/*
* Initialize the "last time" markers to indicate the timer that
* the server was initiated.
*/
_Timer_Server_ticks_last_time = _Watchdog_Ticks_since_boot;
12c40: e59f91c0 ldr r9, [pc, #448] ; 12e08 <_Timer_Server_body+0x1e4>
_Timer_Server_seconds_last_time = _TOD_Seconds_since_epoch;
12c44: e59fb1c0 ldr fp, [pc, #448] ; 12e0c <_Timer_Server_body+0x1e8>
12c48: e5901000 ldr r1, [r0]
12c4c: e2833001 add r3, r3, #1 ; 0x1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
12c50: e28d5004 add r5, sp, #4 ; 0x4
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
12c54: e3a04000 mov r4, #0 ; 0x0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
12c58: e1a0600d mov r6, sp
/*
* Initialize the "last time" markers to indicate the timer that
* the server was initiated.
*/
_Timer_Server_ticks_last_time = _Watchdog_Ticks_since_boot;
12c5c: e5892000 str r2, [r9]
_Timer_Server_seconds_last_time = _TOD_Seconds_since_epoch;
12c60: e58b1000 str r1, [fp]
12c64: e5883000 str r3, [r8]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
12c68: e58d5000 str r5, [sp]
the_chain->permanent_null = NULL;
12c6c: e98d2010 stmib sp, {r4, sp}
/*
* Insert the timers that were inserted before we got to run.
* This should be done with dispatching disabled.
*/
_Thread_Disable_dispatch();
_Timer_Server_process_insertions();
12c70: ebffffce bl 12bb0 <_Timer_Server_process_insertions>
_Thread_Enable_dispatch();
12c74: eb000b6e bl 15a34 <_Thread_Enable_dispatch>
12c78: e59fa190 ldr sl, [pc, #400] ; 12e10 <_Timer_Server_body+0x1ec>
if ( watch == NULL ) {
_ISR_Enable( level );
break;
}
watch->state = WATCHDOG_INACTIVE;
12c7c: e1a07004 mov r7, r4
12c80: e5983000 ldr r3, [r8]
12c84: e2833001 add r3, r3, #1 ; 0x1
12c88: e5883000 str r3, [r8]
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( _Timer_Server, STATES_DELAYING );
12c8c: e3a01008 mov r1, #8 ; 0x8
12c90: e59a0000 ldr r0, [sl]
12c94: eb000e4d bl 165d0 <_Thread_Set_state>
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
12c98: e59f2174 ldr r2, [pc, #372] ; 12e14 <_Timer_Server_body+0x1f0>
_Timer_Server_reset_ticks_timer();
12c9c: e59f0174 ldr r0, [pc, #372] ; 12e18 <_Timer_Server_body+0x1f4>
12ca0: e5923000 ldr r3, [r2]
12ca4: e1530000 cmp r3, r0
12ca8: 0a000006 beq 12cc8 <_Timer_Server_body+0xa4>
12cac: e59f215c ldr r2, [pc, #348] ; 12e10 <_Timer_Server_body+0x1ec>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
12cb0: e5933010 ldr r3, [r3, #16]
12cb4: e5921000 ldr r1, [r2]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
12cb8: e59f015c ldr r0, [pc, #348] ; 12e1c <_Timer_Server_body+0x1f8>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
12cbc: e5813054 str r3, [r1, #84]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
12cc0: e2811048 add r1, r1, #72 ; 0x48
12cc4: eb001125 bl 17160 <_Watchdog_Insert>
12cc8: e59f0150 ldr r0, [pc, #336] ; 12e20 <_Timer_Server_body+0x1fc>
_Timer_Server_reset_seconds_timer();
12ccc: e59f2150 ldr r2, [pc, #336] ; 12e24 <_Timer_Server_body+0x200>
12cd0: e5903000 ldr r3, [r0]
12cd4: e1530002 cmp r3, r2
12cd8: 0a000004 beq 12cf0 <_Timer_Server_body+0xcc>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
12cdc: e5933010 ldr r3, [r3, #16] <== NOT EXECUTED
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
12ce0: e59f1140 ldr r1, [pc, #320] ; 12e28 <_Timer_Server_body+0x204><== NOT EXECUTED
12ce4: e59f0140 ldr r0, [pc, #320] ; 12e2c <_Timer_Server_body+0x208><== NOT EXECUTED
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
12ce8: e581300c str r3, [r1, #12] <== NOT EXECUTED
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
12cec: eb00111b bl 17160 <_Watchdog_Insert> <== NOT EXECUTED
_Thread_Enable_dispatch();
12cf0: eb000b4f bl 15a34 <_Thread_Enable_dispatch>
12cf4: e5983000 ldr r3, [r8]
12cf8: e2833001 add r3, r3, #1 ; 0x1
12cfc: e5883000 str r3, [r8]
/*
* At this point, at least one of the timers this task relies
* upon has fired. Stop them both while we process any outstanding
* timers. Before we block, we will restart them.
*/
_Timer_Server_stop_ticks_timer();
12d00: e59a0000 ldr r0, [sl]
12d04: e2800048 add r0, r0, #72 ; 0x48
12d08: eb001183 bl 1731c <_Watchdog_Remove>
_Timer_Server_stop_seconds_timer();
12d0c: e59f0114 ldr r0, [pc, #276] ; 12e28 <_Timer_Server_body+0x204>
12d10: eb001181 bl 1731c <_Watchdog_Remove>
)
{
Watchdog_Interval snapshot;
Watchdog_Interval ticks;
snapshot = _Watchdog_Ticks_since_boot;
12d14: e59f30e0 ldr r3, [pc, #224] ; 12dfc <_Timer_Server_body+0x1d8>
if ( snapshot >= _Timer_Server_ticks_last_time )
12d18: e5991000 ldr r1, [r9]
)
{
Watchdog_Interval snapshot;
Watchdog_Interval ticks;
snapshot = _Watchdog_Ticks_since_boot;
12d1c: e593c000 ldr ip, [r3]
if ( snapshot >= _Timer_Server_ticks_last_time )
12d20: e15c0001 cmp ip, r1
ticks = snapshot - _Timer_Server_ticks_last_time;
else
ticks = (0xFFFFFFFF - _Timer_Server_ticks_last_time) + snapshot;
12d24: 31e03001 mvncc r3, r1
Watchdog_Interval snapshot;
Watchdog_Interval ticks;
snapshot = _Watchdog_Ticks_since_boot;
if ( snapshot >= _Timer_Server_ticks_last_time )
ticks = snapshot - _Timer_Server_ticks_last_time;
12d28: 2061100c rsbcs r1, r1, ip
else
ticks = (0xFFFFFFFF - _Timer_Server_ticks_last_time) + snapshot;
12d2c: 3083100c addcc r1, r3, ip
_Timer_Server_ticks_last_time = snapshot;
_Watchdog_Adjust_to_chain( &_Timer_Ticks_chain, ticks, to_fire );
12d30: e59f00dc ldr r0, [pc, #220] ; 12e14 <_Timer_Server_body+0x1f0>
12d34: e1a0200d mov r2, sp
if ( snapshot >= _Timer_Server_ticks_last_time )
ticks = snapshot - _Timer_Server_ticks_last_time;
else
ticks = (0xFFFFFFFF - _Timer_Server_ticks_last_time) + snapshot;
_Timer_Server_ticks_last_time = snapshot;
12d38: e589c000 str ip, [r9]
_Watchdog_Adjust_to_chain( &_Timer_Ticks_chain, ticks, to_fire );
12d3c: eb0010d9 bl 170a8 <_Watchdog_Adjust_to_chain>
/*
* 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 _Timer_Seconds_chain to indicate this.
*/
snapshot = _TOD_Seconds_since_epoch;
12d40: e59f00bc ldr r0, [pc, #188] ; 12e04 <_Timer_Server_body+0x1e0>
if ( snapshot > _Timer_Server_seconds_last_time ) {
12d44: e59b2000 ldr r2, [fp]
/*
* 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 _Timer_Seconds_chain to indicate this.
*/
snapshot = _TOD_Seconds_since_epoch;
12d48: e5904000 ldr r4, [r0]
if ( snapshot > _Timer_Server_seconds_last_time ) {
12d4c: e1540002 cmp r4, r2
12d50: 8a00001f bhi 12dd4 <_Timer_Server_body+0x1b0>
* TOD has been set forward.
*/
ticks = snapshot - _Timer_Server_seconds_last_time;
_Watchdog_Adjust_to_chain( &_Timer_Seconds_chain, ticks, to_fire );
} else if ( snapshot < _Timer_Server_seconds_last_time ) {
12d54: 3a000023 bcc 12de8 <_Timer_Server_body+0x1c4>
* TOD has been set backwards.
*/
ticks = _Timer_Server_seconds_last_time - snapshot;
_Watchdog_Adjust( &_Timer_Seconds_chain, WATCHDOG_BACKWARD, ticks );
}
_Timer_Server_seconds_last_time = snapshot;
12d58: e58b4000 str r4, [fp]
_Timer_Server_process_seconds_chain( &to_fire );
/*
* Insert the timers that have been requested to be inserted.
*/
_Timer_Server_process_insertions();
12d5c: ebffff93 bl 12bb0 <_Timer_Server_process_insertions>
/*
* Enable dispatching to process the set that are ready "to fire."
*/
_Thread_Enable_dispatch();
12d60: eb000b33 bl 15a34 <_Thread_Enable_dispatch>
*/
while (1) {
Watchdog_Control *watch;
ISR_Level level;
_ISR_Disable( level );
12d64: e10f1000 mrs r1, CPSR
12d68: e38130c0 orr r3, r1, #192 ; 0xc0
12d6c: e129f003 msr CPSR_fc, r3
12d70: e59d2000 ldr r2, [sp]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
12d74: e1550002 cmp r5, r2
12d78: 0a000013 beq 12dcc <_Timer_Server_body+0x1a8>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
12d7c: e5923000 ldr r3, [r2]
the_chain->first = new_first;
12d80: e58d3000 str r3, [sp]
new_first->previous = _Chain_Head(the_chain);
12d84: e5836004 str r6, [r3, #4]
12d88: ea000002 b 12d98 <_Timer_Server_body+0x174>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
12d8c: e5933000 ldr r3, [r3] <== NOT EXECUTED
the_chain->first = new_first;
12d90: e58d3000 str r3, [sp] <== NOT EXECUTED
new_first->previous = _Chain_Head(the_chain);
12d94: e5836004 str r6, [r3, #4] <== NOT EXECUTED
if ( watch == NULL ) {
_ISR_Enable( level );
break;
}
watch->state = WATCHDOG_INACTIVE;
12d98: e5827008 str r7, [r2, #8]
_ISR_Enable( level );
12d9c: e129f001 msr CPSR_fc, r1
(*watch->routine)( watch->id, watch->user_data );
12da0: e2820020 add r0, r2, #32 ; 0x20
12da4: e8900003 ldm r0, {r0, r1}
12da8: e1a0e00f mov lr, pc
12dac: e592f01c ldr pc, [r2, #28]
*/
while (1) {
Watchdog_Control *watch;
ISR_Level level;
_ISR_Disable( level );
12db0: e10f1000 mrs r1, CPSR
12db4: e38130c0 orr r3, r1, #192 ; 0xc0
12db8: e129f003 msr CPSR_fc, r3
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
12dbc: e59d3000 ldr r3, [sp]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
12dc0: e1550003 cmp r5, r3
watch = (Watchdog_Control *) _Chain_Get_unprotected( &to_fire );
12dc4: e1a02003 mov r2, r3
12dc8: 1affffef bne 12d8c <_Timer_Server_body+0x168>
if ( watch == NULL ) {
_ISR_Enable( level );
12dcc: e129f001 msr CPSR_fc, r1
12dd0: eaffffaa b 12c80 <_Timer_Server_body+0x5c>
/*
* This path is for normal forward movement and cases where the
* TOD has been set forward.
*/
ticks = snapshot - _Timer_Server_seconds_last_time;
_Watchdog_Adjust_to_chain( &_Timer_Seconds_chain, ticks, to_fire );
12dd4: e0621004 rsb r1, r2, r4
12dd8: e59f0040 ldr r0, [pc, #64] ; 12e20 <_Timer_Server_body+0x1fc>
12ddc: e1a0200d mov r2, sp
12de0: eb0010b0 bl 170a8 <_Watchdog_Adjust_to_chain>
12de4: eaffffdb b 12d58 <_Timer_Server_body+0x134>
/*
* The current TOD is before the last TOD which indicates that
* TOD has been set backwards.
*/
ticks = _Timer_Server_seconds_last_time - snapshot;
_Watchdog_Adjust( &_Timer_Seconds_chain, WATCHDOG_BACKWARD, ticks );
12de8: e0642002 rsb r2, r4, r2 <== NOT EXECUTED
12dec: e59f002c ldr r0, [pc, #44] ; 12e20 <_Timer_Server_body+0x1fc><== NOT EXECUTED
12df0: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED
12df4: eb00107c bl 16fec <_Watchdog_Adjust> <== NOT EXECUTED
12df8: eaffffd6 b 12d58 <_Timer_Server_body+0x134> <== NOT EXECUTED
00012bb0 <_Timer_Server_process_insertions>:
* onto one of the Timer Server chains.
*
* @note It is only to be called from the Timer Server task.
*/
static void _Timer_Server_process_insertions(void)
{
12bb0: e52de004 push {lr} ; (str lr, [sp, #-4]!)
Timer_Control *the_timer;
while ( 1 ) {
the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted );
12bb4: e59f005c ldr r0, [pc, #92] ; 12c18 <_Timer_Server_process_insertions+0x68>
12bb8: eb0002a9 bl 13664 <_Chain_Get>
if ( the_timer == NULL )
12bbc: e3500000 cmp r0, #0 ; 0x0
12bc0: 049df004 popeq {pc} ; (ldreq pc, [sp], #4)
break;
if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
12bc4: e5903038 ldr r3, [r0, #56]
12bc8: e3530001 cmp r3, #1 ; 0x1
12bcc: 0a00000c beq 12c04 <_Timer_Server_process_insertions+0x54>
_Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker );
} else if ( the_timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
12bd0: e3530003 cmp r3, #3 ; 0x3 <== NOT EXECUTED
12bd4: 0a000005 beq 12bf0 <_Timer_Server_process_insertions+0x40> <== NOT EXECUTED
}
/*
* Insert the timers that have been requested to be inserted.
*/
_Timer_Server_process_insertions();
12bd8: ebfffff4 bl 12bb0 <_Timer_Server_process_insertions> <== NOT EXECUTED
static void _Timer_Server_process_insertions(void)
{
Timer_Control *the_timer;
while ( 1 ) {
the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted );
12bdc: e59f0034 ldr r0, [pc, #52] ; 12c18 <_Timer_Server_process_insertions+0x68>
12be0: eb00029f bl 13664 <_Chain_Get>
if ( the_timer == NULL )
12be4: e3500000 cmp r0, #0 ; 0x0
12be8: 1afffff5 bne 12bc4 <_Timer_Server_process_insertions+0x14>
12bec: e49df004 pop {pc} ; (ldr pc, [sp], #4)
break;
if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker );
} else if ( the_timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
_Watchdog_Insert( &_Timer_Seconds_chain, &the_timer->Ticker );
12bf0: e2801010 add r1, r0, #16 ; 0x10 <== NOT EXECUTED
12bf4: e59f0020 ldr r0, [pc, #32] ; 12c1c <_Timer_Server_process_insertions+0x6c><== NOT EXECUTED
12bf8: eb001158 bl 17160 <_Watchdog_Insert> <== NOT EXECUTED
}
/*
* Insert the timers that have been requested to be inserted.
*/
_Timer_Server_process_insertions();
12bfc: ebffffeb bl 12bb0 <_Timer_Server_process_insertions> <== NOT EXECUTED
12c00: eafffff5 b 12bdc <_Timer_Server_process_insertions+0x2c> <== NOT EXECUTED
the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted );
if ( the_timer == NULL )
break;
if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker );
12c04: e2801010 add r1, r0, #16 ; 0x10
12c08: e59f0010 ldr r0, [pc, #16] ; 12c20 <_Timer_Server_process_insertions+0x70>
12c0c: eb001153 bl 17160 <_Watchdog_Insert>
}
/*
* Insert the timers that have been requested to be inserted.
*/
_Timer_Server_process_insertions();
12c10: ebffffe6 bl 12bb0 <_Timer_Server_process_insertions>
12c14: eafffff0 b 12bdc <_Timer_Server_process_insertions+0x2c>
00009644 <_Timespec_Divide_by_integer>:
void _Timespec_Divide_by_integer(
const struct timespec *time,
uint32_t iterations,
struct timespec *result
)
{
9644: e92d45f0 push {r4, r5, r6, r7, r8, sl, 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;
9648: e3a0c5ee mov ip, #998244352 ; 0x3b800000 <== NOT EXECUTED
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
t = time->tv_sec;
964c: e5907000 ldr r7, [r0] <== NOT EXECUTED
t *= TOD_NANOSECONDS_PER_SECOND;
9650: e28cc96b add ip, ip, #1753088 ; 0x1ac000 <== NOT EXECUTED
9654: e28ccc0a add ip, ip, #2560 ; 0xa00 <== NOT EXECUTED
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
t = time->tv_sec;
9658: e1a08fc7 asr r8, r7, #31 <== NOT EXECUTED
t *= TOD_NANOSECONDS_PER_SECOND;
965c: e086579c umull r5, r6, ip, r7 <== NOT EXECUTED
9660: e026689c mla r6, ip, r8, r6 <== NOT EXECUTED
t += time->tv_nsec;
9664: e5903004 ldr r3, [r0, #4] <== NOT EXECUTED
9668: e1a04fc3 asr r4, r3, #31 <== NOT EXECUTED
/*
* Divide to get nanoseconds per iteration
*/
t /= iterations;
966c: e0950003 adds r0, r5, r3 <== NOT EXECUTED
9670: e1a07001 mov r7, r1 <== NOT EXECUTED
9674: e3a08000 mov r8, #0 ; 0x0 <== NOT EXECUTED
void _Timespec_Divide_by_integer(
const struct timespec *time,
uint32_t iterations,
struct timespec *result
)
{
9678: e1a0a002 mov sl, r2 <== NOT EXECUTED
/*
* Divide to get nanoseconds per iteration
*/
t /= iterations;
967c: e0a61004 adc r1, r6, r4 <== NOT EXECUTED
9680: e1a02007 mov r2, r7 <== NOT EXECUTED
9684: e1a03008 mov r3, r8 <== NOT EXECUTED
9688: eb0036b2 bl 17158 <__udivdi3> <== NOT EXECUTED
/*
* Put it back in the timespec result
*/
result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND;
968c: e3a025ee mov r2, #998244352 ; 0x3b800000 <== NOT EXECUTED
9690: e282296b add r2, r2, #1753088 ; 0x1ac000 <== NOT EXECUTED
9694: e2822c0a add r2, r2, #2560 ; 0xa00 <== NOT EXECUTED
9698: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED
/*
* Divide to get nanoseconds per iteration
*/
t /= iterations;
969c: e1a04000 mov r4, r0 <== NOT EXECUTED
96a0: e1a05001 mov r5, r1 <== NOT EXECUTED
/*
* Put it back in the timespec result
*/
result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND;
96a4: eb0036ab bl 17158 <__udivdi3> <== NOT EXECUTED
result->tv_nsec = t % TOD_NANOSECONDS_PER_SECOND;
96a8: e3a025ee mov r2, #998244352 ; 0x3b800000 <== NOT EXECUTED
96ac: e282296b add r2, r2, #1753088 ; 0x1ac000 <== NOT EXECUTED
/*
* Put it back in the timespec result
*/
result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND;
96b0: e58a0000 str r0, [sl] <== NOT EXECUTED
result->tv_nsec = t % TOD_NANOSECONDS_PER_SECOND;
96b4: e1a01005 mov r1, r5 <== NOT EXECUTED
96b8: e1a00004 mov r0, r4 <== NOT EXECUTED
96bc: e2822c0a add r2, r2, #2560 ; 0xa00 <== NOT EXECUTED
96c0: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED
96c4: eb0037eb bl 17678 <__umoddi3> <== NOT EXECUTED
96c8: e58a0004 str r0, [sl, #4] <== NOT EXECUTED
}
96cc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
00009d20 <_User_extensions_Remove_set>:
*/
void _User_extensions_Remove_set (
User_extensions_Control *the_extension
)
{
9d20: e92d4010 push {r4, lr}
9d24: e1a04000 mov r4, r0
_Chain_Extract( &the_extension->Node );
9d28: eb000bb2 bl cbf8 <_Chain_Extract>
/*
* If a switch handler is present, remove it.
*/
if ( the_extension->Callouts.thread_switch != NULL )
9d2c: e5943024 ldr r3, [r4, #36]
9d30: e3530000 cmp r3, #0 ; 0x0
9d34: 08bd8010 popeq {r4, pc}
_Chain_Extract( &the_extension->Switch.Node );
9d38: e2840008 add r0, r4, #8 ; 0x8 <== NOT EXECUTED
}
9d3c: 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 );
9d40: ea000bac b cbf8 <_Chain_Extract> <== NOT EXECUTED
00007930 <_User_extensions_Thread_exitted>:
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
7930: e59f3038 ldr r3, [pc, #56] ; 7970 <_User_extensions_Thread_exitted+0x40><== NOT EXECUTED
*/
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
7934: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
7938: e5934008 ldr r4, [r3, #8] <== NOT EXECUTED
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
793c: e1540003 cmp r4, r3 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head(
Chain_Control *the_chain
)
{
return (Chain_Node *) the_chain;
7940: e1a06003 mov r6, r3 <== NOT EXECUTED
*/
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
7944: e1a05000 mov r5, r0 <== NOT EXECUTED
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
7948: 08bd8070 popeq {r4, r5, r6, pc} <== NOT EXECUTED
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_exitted != NULL )
794c: e594302c ldr r3, [r4, #44] <== NOT EXECUTED
7950: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
(*the_extension->Callouts.thread_exitted)( executing );
7954: e1a00005 mov r0, r5 <== NOT EXECUTED
7958: 11a0e00f movne lr, pc <== NOT EXECUTED
795c: 112fff13 bxne r3 <== NOT EXECUTED
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
7960: e5944004 ldr r4, [r4, #4] <== NOT EXECUTED
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
7964: e1540006 cmp r4, r6 <== NOT EXECUTED
7968: 1afffff7 bne 794c <_User_extensions_Thread_exitted+0x1c> <== NOT EXECUTED
796c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
00007a74 <_User_extensions_Thread_start>:
*/
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
7a74: e92d40f0 push {r4, r5, r6, r7, lr}
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
7a78: e59f5038 ldr r5, [pc, #56] ; 7ab8 <_User_extensions_Thread_start+0x44>
7a7c: e4954004 ldr r4, [r5], #4
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
7a80: e1540005 cmp r4, r5
*/
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
7a84: e1a06000 mov r6, r0
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
7a88: 08bd80f0 popeq {r4, r5, r6, r7, pc}
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_start != NULL )
(*the_extension->Callouts.thread_start)(
7a8c: e59f7028 ldr r7, [pc, #40] ; 7abc <_User_extensions_Thread_start+0x48>
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_start != NULL )
7a90: e5943018 ldr r3, [r4, #24]
7a94: e3530000 cmp r3, #0 ; 0x0
(*the_extension->Callouts.thread_start)(
7a98: e1a01006 mov r1, r6
7a9c: 15970000 ldrne r0, [r7]
7aa0: 11a0e00f movne lr, pc
7aa4: 112fff13 bxne r3
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
7aa8: e5944000 ldr r4, [r4]
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
7aac: e1540005 cmp r4, r5
7ab0: 1afffff6 bne 7a90 <_User_extensions_Thread_start+0x1c>
7ab4: e8bd80f0 pop {r4, r5, r6, r7, pc}
00007ac0 <_User_extensions_Thread_switch>:
*/
void _User_extensions_Thread_switch (
Thread_Control *executing,
Thread_Control *heir
)
{
7ac0: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _User_extensions_Switches_list.first ;
7ac4: e59f5030 ldr r5, [pc, #48] ; 7afc <_User_extensions_Thread_switch+0x3c><== NOT EXECUTED
7ac8: e4954004 ldr r4, [r5], #4 <== NOT EXECUTED
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
7acc: e1540005 cmp r4, r5 <== NOT EXECUTED
*/
void _User_extensions_Thread_switch (
Thread_Control *executing,
Thread_Control *heir
)
{
7ad0: e1a07000 mov r7, r0 <== NOT EXECUTED
7ad4: e1a06001 mov r6, r1 <== NOT EXECUTED
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _User_extensions_Switches_list.first ;
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
7ad8: 08bd80f0 popeq {r4, r5, r6, r7, pc} <== NOT EXECUTED
the_node = the_node->next ) {
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
7adc: e1a00007 mov r0, r7 <== NOT EXECUTED
7ae0: e1a01006 mov r1, r6 <== NOT EXECUTED
7ae4: e1a0e00f mov lr, pc <== NOT EXECUTED
7ae8: e594f008 ldr pc, [r4, #8] <== NOT EXECUTED
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _User_extensions_Switches_list.first ;
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
the_node = the_node->next ) {
7aec: e5944000 ldr r4, [r4] <== NOT EXECUTED
{
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _User_extensions_Switches_list.first ;
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
7af0: e1540005 cmp r4, r5 <== NOT EXECUTED
7af4: 1afffff8 bne 7adc <_User_extensions_Thread_switch+0x1c> <== NOT EXECUTED
7af8: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
0000996c <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
996c: e92d41f0 push {r4, r5, r6, r7, r8, lr}
9970: e1a07000 mov r7, r0
9974: e1a04002 mov r4, r2
ISR_Level level;
_ISR_Disable( level );
9978: e10fc000 mrs ip, CPSR
997c: e38c30c0 orr r3, ip, #192 ; 0xc0
9980: e129f003 msr CPSR_fc, r3
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
9984: e1a06000 mov r6, r0
9988: e4960004 ldr r0, [r6], #4
* hence the compiler must not assume *header to remain
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
998c: e1500006 cmp r0, r6
9990: 0a000019 beq 99fc <_Watchdog_Adjust+0x90>
switch ( direction ) {
9994: e3510000 cmp r1, #0 ; 0x0
9998: 1a000019 bne 9a04 <_Watchdog_Adjust+0x98>
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
999c: e3520000 cmp r2, #0 ; 0x0
99a0: 0a000015 beq 99fc <_Watchdog_Adjust+0x90>
if ( units < _Watchdog_First( header )->delta_interval ) {
99a4: e5905010 ldr r5, [r0, #16]
99a8: e1520005 cmp r2, r5
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) header->first );
99ac: e1a01000 mov r1, r0
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
99b0: 23a08001 movcs r8, #1 ; 0x1
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
99b4: 2a000005 bcs 99d0 <_Watchdog_Adjust+0x64>
99b8: ea000017 b 9a1c <_Watchdog_Adjust+0xb0> <== NOT EXECUTED
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
99bc: e0544005 subs r4, r4, r5
99c0: 0a00000d beq 99fc <_Watchdog_Adjust+0x90>
if ( units < _Watchdog_First( header )->delta_interval ) {
99c4: e5915010 ldr r5, [r1, #16]
99c8: e1550004 cmp r5, r4
99cc: 8a000012 bhi 9a1c <_Watchdog_Adjust+0xb0>
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
99d0: e5818010 str r8, [r1, #16]
_ISR_Enable( level );
99d4: e129f00c msr CPSR_fc, ip
_Watchdog_Tickle( header );
99d8: e1a00007 mov r0, r7
99dc: eb0000ab bl 9c90 <_Watchdog_Tickle>
_ISR_Disable( level );
99e0: e10fc000 mrs ip, CPSR
99e4: e38c30c0 orr r3, ip, #192 ; 0xc0
99e8: e129f003 msr CPSR_fc, r3
99ec: e5973000 ldr r3, [r7]
if ( _Chain_Is_empty( header ) )
99f0: e1560003 cmp r6, r3
99f4: e1a01003 mov r1, r3
99f8: 1affffef bne 99bc <_Watchdog_Adjust+0x50>
}
break;
}
}
_ISR_Enable( level );
99fc: e129f00c msr CPSR_fc, ip
}
9a00: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
9a04: e3510001 cmp r1, #1 ; 0x1
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
9a08: 05903010 ldreq r3, [r0, #16]
9a0c: 00833002 addeq r3, r3, r2
9a10: 05803010 streq r3, [r0, #16]
}
break;
}
}
_ISR_Enable( level );
9a14: e129f00c msr CPSR_fc, ip
}
9a18: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
9a1c: e0643005 rsb r3, r4, r5
9a20: e5813010 str r3, [r1, #16]
9a24: eafffff4 b 99fc <_Watchdog_Adjust+0x90>
00007c5c <_Watchdog_Handler_initialization>:
* Output parameters: NONE
*/
void _Watchdog_Handler_initialization( void )
{
_Watchdog_Sync_count = 0;
7c5c: e59f3044 ldr r3, [pc, #68] ; 7ca8 <_Watchdog_Handler_initialization+0x4c>
7c60: e3a01000 mov r1, #0 ; 0x0
7c64: e5831000 str r1, [r3]
_Watchdog_Sync_level = 0;
7c68: e59f303c ldr r3, [pc, #60] ; 7cac <_Watchdog_Handler_initialization+0x50>
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
7c6c: e59f003c ldr r0, [pc, #60] ; 7cb0 <_Watchdog_Handler_initialization+0x54>
7c70: e59f203c ldr r2, [pc, #60] ; 7cb4 <_Watchdog_Handler_initialization+0x58>
7c74: e5831000 str r1, [r3]
_Watchdog_Ticks_since_boot = 0;
7c78: e59f3038 ldr r3, [pc, #56] ; 7cb8 <_Watchdog_Handler_initialization+0x5c>
*
* Output parameters: NONE
*/
void _Watchdog_Handler_initialization( void )
{
7c7c: e52d4004 push {r4} ; (str r4, [sp, #-4]!)
7c80: e280c004 add ip, r0, #4 ; 0x4
7c84: e2824004 add r4, r2, #4 ; 0x4
7c88: e580c000 str ip, [r0]
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
7c8c: e5800008 str r0, [r0, #8]
_Watchdog_Sync_count = 0;
_Watchdog_Sync_level = 0;
_Watchdog_Ticks_since_boot = 0;
7c90: e5831000 str r1, [r3]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
7c94: e5824000 str r4, [r2]
the_chain->permanent_null = NULL;
7c98: e9820006 stmib r2, {r1, r2}
7c9c: e5801004 str r1, [r0, #4]
_Chain_Initialize_empty( &_Watchdog_Ticks_chain );
_Chain_Initialize_empty( &_Watchdog_Seconds_chain );
}
7ca0: e8bd0010 pop {r4}
7ca4: e12fff1e bx lr
00007b00 <_Watchdog_Insert>:
Watchdog_Control *after;
uint32_t insert_isr_nest_level;
Watchdog_Interval delta_interval;
insert_isr_nest_level = _ISR_Nest_level;
7b00: e59f3144 ldr r3, [pc, #324] ; 7c4c <_Watchdog_Insert+0x14c>
void _Watchdog_Insert(
Chain_Control *header,
Watchdog_Control *the_watchdog
)
{
7b04: e92d01f0 push {r4, r5, r6, r7, r8}
7b08: e1a04001 mov r4, r1
Watchdog_Control *after;
uint32_t insert_isr_nest_level;
Watchdog_Interval delta_interval;
insert_isr_nest_level = _ISR_Nest_level;
7b0c: e5935000 ldr r5, [r3]
_ISR_Disable( level );
7b10: e10f6000 mrs r6, CPSR
7b14: e38630c0 orr r3, r6, #192 ; 0xc0
7b18: 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 ) {
7b1c: e5913008 ldr r3, [r1, #8]
7b20: e3530000 cmp r3, #0 ; 0x0
7b24: 1a000041 bne 7c30 <_Watchdog_Insert+0x130>
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
_Watchdog_Sync_count++;
7b28: e59f8120 ldr r8, [pc, #288] ; 7c50 <_Watchdog_Insert+0x150>
7b2c: e5983000 ldr r3, [r8]
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
7b30: e3a02001 mov r2, #1 ; 0x1
_Watchdog_Sync_count++;
7b34: e2833001 add r3, r3, #1 ; 0x1
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
7b38: e5812008 str r2, [r1, #8]
_Watchdog_Sync_count++;
7b3c: e5883000 str r3, [r8]
7b40: e59f710c ldr r7, [pc, #268] ; 7c54 <_Watchdog_Insert+0x154>
restart:
delta_interval = the_watchdog->initial;
7b44: e594c00c ldr ip, [r4, #12]
*/
for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
7b48: e35c0000 cmp ip, #0 ; 0x0
* cache *header!!
*
* Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc)
*
*/
for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ;
7b4c: e5902000 ldr r2, [r0]
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
7b50: 0a000023 beq 7be4 <_Watchdog_Insert+0xe4>
7b54: e5923000 ldr r3, [r2]
7b58: e3530000 cmp r3, #0 ; 0x0
7b5c: 0a000020 beq 7be4 <_Watchdog_Insert+0xe4>
break;
if ( delta_interval < after->delta_interval ) {
7b60: e5921010 ldr r1, [r2, #16] <== NOT EXECUTED
7b64: e15c0001 cmp ip, r1 <== NOT EXECUTED
7b68: 3a000032 bcc 7c38 <_Watchdog_Insert+0x138> <== NOT EXECUTED
* used around this flash point allowed interrupts to execute
* which violated the design assumptions. The critical section
* mechanism used here WAS redesigned to address this.
*/
_ISR_Flash( level );
7b6c: e10f3000 mrs r3, CPSR <== NOT EXECUTED
7b70: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED
7b74: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
7b78: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
7b7c: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED
7b80: 1a000023 bne 7c14 <_Watchdog_Insert+0x114> <== NOT EXECUTED
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
7b84: e5973000 ldr r3, [r7] <== NOT EXECUTED
7b88: e1550003 cmp r5, r3 <== NOT EXECUTED
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
break;
}
delta_interval -= after->delta_interval;
7b8c: 2061c00c rsbcs ip, r1, ip <== NOT EXECUTED
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
7b90: 2a000010 bcs 7bd8 <_Watchdog_Insert+0xd8> <== NOT EXECUTED
7b94: ea00002a b 7c44 <_Watchdog_Insert+0x144> <== NOT EXECUTED
*/
for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
7b98: e5923000 ldr r3, [r2] <== NOT EXECUTED
7b9c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
7ba0: 0a00000f beq 7be4 <_Watchdog_Insert+0xe4> <== NOT EXECUTED
break;
if ( delta_interval < after->delta_interval ) {
7ba4: e5921010 ldr r1, [r2, #16] <== NOT EXECUTED
7ba8: e151000c cmp r1, ip <== NOT EXECUTED
7bac: 8a000021 bhi 7c38 <_Watchdog_Insert+0x138> <== NOT EXECUTED
* used around this flash point allowed interrupts to execute
* which violated the design assumptions. The critical section
* mechanism used here WAS redesigned to address this.
*/
_ISR_Flash( level );
7bb0: e10f3000 mrs r3, CPSR <== NOT EXECUTED
7bb4: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED
7bb8: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
7bbc: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
7bc0: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
break;
}
delta_interval -= after->delta_interval;
7bc4: e061c00c rsb ip, r1, ip <== NOT EXECUTED
* mechanism used here WAS redesigned to address this.
*/
_ISR_Flash( level );
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
7bc8: 1a000011 bne 7c14 <_Watchdog_Insert+0x114> <== NOT EXECUTED
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
7bcc: e5973000 ldr r3, [r7] <== NOT EXECUTED
7bd0: e1550003 cmp r5, r3 <== NOT EXECUTED
7bd4: 3a00001a bcc 7c44 <_Watchdog_Insert+0x144> <== NOT EXECUTED
*/
for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
7bd8: e35c0000 cmp ip, #0 ; 0x0 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next(
Watchdog_Control *the_watchdog
)
{
return ( (Watchdog_Control *) the_watchdog->Node.next );
7bdc: e5922000 ldr r2, [r2] <== NOT EXECUTED
7be0: 1affffec bne 7b98 <_Watchdog_Insert+0x98> <== NOT EXECUTED
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
7be4: e5921004 ldr r1, [r2, #4]
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
7be8: e59f3068 ldr r3, [pc, #104] ; 7c58 <_Watchdog_Insert+0x158>
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
7bec: e5910000 ldr r0, [r1]
7bf0: e5932000 ldr r2, [r3]
RTEMS_INLINE_ROUTINE void _Watchdog_Activate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_ACTIVE;
7bf4: e3a03002 mov r3, #2 ; 0x2
after_node->next = the_node;
7bf8: e5814000 str r4, [r1]
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
7bfc: e5841004 str r1, [r4, #4]
7c00: e5842014 str r2, [r4, #20]
7c04: e5843008 str r3, [r4, #8]
}
}
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
7c08: e584c010 str ip, [r4, #16]
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
before_node->previous = the_node;
7c0c: e5804004 str r4, [r0, #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;
7c10: e5840000 str r0, [r4]
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
7c14: e5875000 str r5, [r7]
_Watchdog_Sync_count--;
7c18: e5983000 ldr r3, [r8]
7c1c: e2433001 sub r3, r3, #1 ; 0x1
7c20: e5883000 str r3, [r8]
_ISR_Enable( level );
7c24: e129f006 msr CPSR_fc, r6
}
7c28: e8bd01f0 pop {r4, r5, r6, r7, r8}
7c2c: e12fff1e bx lr
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
7c30: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED
7c34: eafffffb b 7c28 <_Watchdog_Insert+0x128> <== NOT EXECUTED
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
break;
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
7c38: e06c3001 rsb r3, ip, r1 <== NOT EXECUTED
7c3c: e5823010 str r3, [r2, #16] <== NOT EXECUTED
7c40: eaffffe7 b 7be4 <_Watchdog_Insert+0xe4> <== NOT EXECUTED
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
_Watchdog_Sync_level = insert_isr_nest_level;
7c44: e5875000 str r5, [r7] <== NOT EXECUTED
7c48: eaffffbd b 7b44 <_Watchdog_Insert+0x44> <== NOT EXECUTED
00007cbc <_Watchdog_Remove>:
*/
Watchdog_States _Watchdog_Remove(
Watchdog_Control *the_watchdog
)
{
7cbc: e92d0030 push {r4, r5}
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
7cc0: e10f5000 mrs r5, CPSR
7cc4: e38530c0 orr r3, r5, #192 ; 0xc0
7cc8: e129f003 msr CPSR_fc, r3
previous_state = the_watchdog->state;
7ccc: e590c008 ldr ip, [r0, #8]
switch ( previous_state ) {
7cd0: e35c0001 cmp ip, #1 ; 0x1
/*
* It is not actually on the chain so just change the state and
* the Insert operation we interrupted will be aborted.
*/
the_watchdog->state = WATCHDOG_INACTIVE;
7cd4: 03a03000 moveq r3, #0 ; 0x0
7cd8: 05803008 streq r3, [r0, #8]
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
previous_state = the_watchdog->state;
switch ( previous_state ) {
7cdc: 0a000000 beq 7ce4 <_Watchdog_Remove+0x28>
7ce0: 2a000006 bcs 7d00 <_Watchdog_Remove+0x44>
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
7ce4: e59f306c ldr r3, [pc, #108] ; 7d58 <_Watchdog_Remove+0x9c>
7ce8: e5932000 ldr r2, [r3]
7cec: e5802018 str r2, [r0, #24]
_ISR_Enable( level );
7cf0: e129f005 msr CPSR_fc, r5
return( previous_state );
}
7cf4: e1a0000c mov r0, ip
7cf8: e8bd0030 pop {r4, r5}
7cfc: e12fff1e bx lr
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
previous_state = the_watchdog->state;
switch ( previous_state ) {
7d00: e35c0003 cmp ip, #3 ; 0x3
7d04: 8afffff6 bhi 7ce4 <_Watchdog_Remove+0x28>
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next(
Watchdog_Control *the_watchdog
)
{
return ( (Watchdog_Control *) the_watchdog->Node.next );
7d08: e5904000 ldr r4, [r0]
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
7d0c: e5943000 ldr r3, [r4]
break;
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
7d10: e3a02000 mov r2, #0 ; 0x0
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
7d14: e3530000 cmp r3, #0 ; 0x0
next_watchdog->delta_interval += the_watchdog->delta_interval;
7d18: 15943010 ldrne r3, [r4, #16]
break;
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
7d1c: e5802008 str r2, [r0, #8]
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
next_watchdog->delta_interval += the_watchdog->delta_interval;
7d20: 15902010 ldrne r2, [r0, #16]
7d24: 10833002 addne r3, r3, r2
7d28: 15843010 strne r3, [r4, #16]
if ( _Watchdog_Sync_count )
7d2c: e59f3028 ldr r3, [pc, #40] ; 7d5c <_Watchdog_Remove+0xa0>
7d30: e5932000 ldr r2, [r3]
7d34: e3520000 cmp r2, #0 ; 0x0
_Watchdog_Sync_level = _ISR_Nest_level;
7d38: 159f3020 ldrne r3, [pc, #32] ; 7d60 <_Watchdog_Remove+0xa4>
7d3c: 159f2020 ldrne r2, [pc, #32] ; 7d64 <_Watchdog_Remove+0xa8>
7d40: 15931000 ldrne r1, [r3]
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
7d44: e5903004 ldr r3, [r0, #4]
7d48: 15821000 strne r1, [r2]
next->previous = previous;
previous->next = next;
7d4c: e5834000 str r4, [r3]
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
7d50: e5843004 str r3, [r4, #4]
7d54: eaffffe2 b 7ce4 <_Watchdog_Remove+0x28>
00007e04 <_Workspace_Free>:
* _Workspace_Free
*/
bool _Workspace_Free(
void *block
)
{
7e04: e1a01000 mov r1, r0 <== NOT EXECUTED
return _Heap_Free( &_Workspace_Area, block );
7e08: e59f0000 ldr r0, [pc, #0] ; 7e10 <_Workspace_Free+0xc> <== NOT EXECUTED
7e0c: ea000af3 b a9e0 <_Heap_Free> <== NOT EXECUTED
00007e4c <_Workspace_Handler_initialization>:
*/
void _Workspace_Handler_initialization(
void *starting_address,
size_t size
)
{
7e4c: e92d4030 push {r4, r5, lr}
uint32_t memory_available;
if ( !starting_address || !_Addresses_Is_aligned( starting_address ) )
7e50: e2504000 subs r4, r0, #0 ; 0x0
*/
void _Workspace_Handler_initialization(
void *starting_address,
size_t size
)
{
7e54: e1a05001 mov r5, r1
uint32_t memory_available;
if ( !starting_address || !_Addresses_Is_aligned( starting_address ) )
7e58: 0a000010 beq 7ea0 <_Workspace_Handler_initialization+0x54>
7e5c: e214c003 ands ip, r4, #3 ; 0x3
7e60: 1a00000e bne 7ea0 <_Workspace_Handler_initialization+0x54>
INTERNAL_ERROR_CORE,
TRUE,
INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS
);
if ( _Configuration_Table->do_zero_of_workspace )
7e64: e59f3054 ldr r3, [pc, #84] ; 7ec0 <_Workspace_Handler_initialization+0x74>
7e68: e5932000 ldr r2, [r3]
7e6c: e5d21028 ldrb r1, [r2, #40]
7e70: e3510000 cmp r1, #0 ; 0x0
7e74: 1a00000d bne 7eb0 <_Workspace_Handler_initialization+0x64>
memset( starting_address, 0, size );
memory_available = _Heap_Initialize(
7e78: e1a01004 mov r1, r4
7e7c: e1a02005 mov r2, r5
7e80: e59f003c ldr r0, [pc, #60] ; 7ec4 <_Workspace_Handler_initialization+0x78>
7e84: e3a03004 mov r3, #4 ; 0x4
7e88: ebfff665 bl 5824 <_Heap_Initialize>
starting_address,
size,
CPU_HEAP_ALIGNMENT
);
if ( memory_available == 0 )
7e8c: e3500000 cmp r0, #0 ; 0x0
7e90: 18bd8030 popne {r4, r5, pc}
_Internal_error_Occurred(
7e94: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED
7e98: e3a02003 mov r2, #3 ; 0x3 <== NOT EXECUTED
7e9c: ebfff6eb bl 5a50 <_Internal_error_Occurred> <== NOT EXECUTED
)
{
uint32_t memory_available;
if ( !starting_address || !_Addresses_Is_aligned( starting_address ) )
_Internal_error_Occurred(
7ea0: e3a00000 mov r0, #0 ; 0x0
7ea4: e3a01001 mov r1, #1 ; 0x1
7ea8: e3a02002 mov r2, #2 ; 0x2
7eac: ebfff6e7 bl 5a50 <_Internal_error_Occurred>
TRUE,
INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS
);
if ( _Configuration_Table->do_zero_of_workspace )
memset( starting_address, 0, size );
7eb0: e1a0100c mov r1, ip <== NOT EXECUTED
7eb4: e1a02005 mov r2, r5 <== NOT EXECUTED
7eb8: eb00125a bl c828 <memset> <== NOT EXECUTED
7ebc: eaffffed b 7e78 <_Workspace_Handler_initialization+0x2c> <== NOT EXECUTED
00008e84 <__assert>:
void __assert(
const char *file,
int line,
const char *failedexpr
)
{
8e84: e1a03002 mov r3, r2 <== NOT EXECUTED
__assert_func (file, line, NULL, failedexpr);
8e88: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED
8e8c: eaffffe9 b 8e38 <__assert_func> <== NOT EXECUTED
000147f8 <_exit>:
/*
* If the toolset uses init/fini sections, then we need to
* run the global destructors now.
*/
#if defined(__USE_INIT_FINI__)
_fini();
147f8: e1a04000 mov r4, r0
147fc: eb00023b bl 150f0 <___DTOR_END__>
* We need to do the exit processing on the global reentrancy structure.
* This has already been done on the per task reentrancy structure
* associated with this task.
*/
libc_wrapup();
14800: ebffffe2 bl 14790 <libc_wrapup>
rtems_shutdown_executive(status);
14804: e1a00004 mov r0, r4
14808: eb000040 bl 14910 <rtems_shutdown_executive>
1480c: eafffffe b 1480c <_exit+0x14> <== NOT EXECUTED
00002590 <_fcntl_r>:
int fd,
int cmd,
int arg
)
{
return fcntl( fd, cmd, arg );
2590: e1a00001 mov r0, r1 <== NOT EXECUTED
2594: e1a01002 mov r1, r2 <== NOT EXECUTED
2598: e1a02003 mov r2, r3 <== NOT EXECUTED
259c: eaffff72 b 236c <fcntl> <== NOT EXECUTED
00017d6c <_getpid_r>:
pid_t _getpid_r(
struct _reent *ptr
)
{
return getpid();
}
17d6c: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED
17d70: e12fff1e bx lr <== NOT EXECUTED
000092d4 <_gettimeofday>:
int _gettimeofday(
struct timeval *tp,
struct timezone *tzp
)
{
return gettimeofday( tp, tzp );
92d4: eaffffe4 b 926c <gettimeofday> <== NOT EXECUTED
00002d64 <_link_r>:
struct _reent *ptr,
const char *existing,
const char *new
)
{
return link( existing, new );
2d64: e1a00001 mov r0, r1 <== NOT EXECUTED
2d68: e1a01002 mov r1, r2 <== NOT EXECUTED
2d6c: eaffff6a b 2b1c <link> <== NOT EXECUTED
000148f4 <_realloc_r>:
struct _reent *ignored,
void *ptr,
size_t size
)
{
return realloc( ptr, size );
148f4: e1a00001 mov r0, r1 <== NOT EXECUTED
148f8: e1a01002 mov r1, r2 <== NOT EXECUTED
148fc: ea000012 b 1494c <realloc> <== NOT EXECUTED
00003d0c <_stat_r>:
struct _reent *ptr,
const char *path,
struct stat *buf
)
{
return _STAT_NAME( path, buf );
3d0c: e1a00001 mov r0, r1 <== NOT EXECUTED
3d10: e1a01002 mov r1, r2 <== NOT EXECUTED
3d14: eaffffc6 b 3c34 <stat> <== NOT EXECUTED
000070bc <_unlink_r>:
int _unlink_r(
struct _reent *ptr,
const char *path
)
{
return unlink( path );
70bc: e1a00001 mov r0, r1 <== NOT EXECUTED
70c0: eaffffaa b 6f70 <unlink> <== NOT EXECUTED
00004438 <alphasort>:
int
alphasort(
const void *d1,
const void *d2 )
{
return(strcmp((*(struct dirent **)d1)->d_name,
4438: e5900000 ldr r0, [r0] <== NOT EXECUTED
443c: e5911000 ldr r1, [r1] <== NOT EXECUTED
4440: e280000c add r0, r0, #12 ; 0xc <== NOT EXECUTED
4444: e281100c add r1, r1, #12 ; 0xc <== NOT EXECUTED
4448: ea0031e3 b 10bdc <strcmp> <== NOT EXECUTED
0000a0ac <chdir>:
#include <rtems/seterr.h>
int chdir(
const char *pathname
)
{
a0ac: e92d4030 push {r4, r5, lr}
/*
* Get the node where we wish to go.
*/
result = rtems_filesystem_evaluate_path(
a0b0: e3a01001 mov r1, #1 ; 0x1
#include <rtems/seterr.h>
int chdir(
const char *pathname
)
{
a0b4: e24dd010 sub sp, sp, #16 ; 0x10
/*
* Get the node where we wish to go.
*/
result = rtems_filesystem_evaluate_path(
a0b8: e1a0200d mov r2, sp
a0bc: e1a03001 mov r3, r1
a0c0: ebffde3d bl 19bc <rtems_filesystem_evaluate_path>
pathname, RTEMS_LIBIO_PERMS_SEARCH, &loc, true );
if ( result != 0 )
a0c4: e3500000 cmp r0, #0 ; 0x0
/*
* Get the node where we wish to go.
*/
result = rtems_filesystem_evaluate_path(
a0c8: e1a0400d mov r4, sp
pathname, RTEMS_LIBIO_PERMS_SEARCH, &loc, true );
if ( result != 0 )
a0cc: 1a000021 bne a158 <chdir+0xac>
/*
* Verify you can change directory into this node.
*/
if ( !loc.ops->node_type_h ) {
a0d0: e59d2008 ldr r2, [sp, #8]
a0d4: e5923010 ldr r3, [r2, #16]
a0d8: e3530000 cmp r3, #0 ; 0x0
a0dc: 0a000015 beq a138 <chdir+0x8c>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
a0e0: e1a0000d mov r0, sp
a0e4: e1a0e00f mov lr, pc
a0e8: e12fff13 bx r3
a0ec: e3500001 cmp r0, #1 ; 0x1
a0f0: 1a00001a bne a160 <chdir+0xb4>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTDIR );
}
rtems_filesystem_freenode( &rtems_filesystem_current );
a0f4: e59f5098 ldr r5, [pc, #152] ; a194 <chdir+0xe8>
a0f8: e5950000 ldr r0, [r5]
a0fc: e590300c ldr r3, [r0, #12]
a100: e3530000 cmp r3, #0 ; 0x0
a104: 0a000004 beq a11c <chdir+0x70>
a108: e593301c ldr r3, [r3, #28]
a10c: e3530000 cmp r3, #0 ; 0x0
a110: 12800004 addne r0, r0, #4 ; 0x4
a114: 11a0e00f movne lr, pc
a118: 112fff13 bxne r3
rtems_filesystem_current = loc;
a11c: e595c000 ldr ip, [r5]
a120: e894000f ldm r4, {r0, r1, r2, r3}
a124: e28cc004 add ip, ip, #4 ; 0x4
a128: e88c000f stm ip, {r0, r1, r2, r3}
a12c: e3a00000 mov r0, #0 ; 0x0
return 0;
}
a130: e28dd010 add sp, sp, #16 ; 0x10
a134: e8bd8030 pop {r4, r5, pc}
/*
* Verify you can change directory into this node.
*/
if ( !loc.ops->node_type_h ) {
rtems_filesystem_freenode( &loc );
a138: e592301c ldr r3, [r2, #28] <== NOT EXECUTED
a13c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
a140: 11a0000d movne r0, sp <== NOT EXECUTED
a144: 11a0e00f movne lr, pc <== NOT EXECUTED
a148: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
a14c: eb000db6 bl d82c <__errno> <== NOT EXECUTED
a150: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
a154: e5803000 str r3, [r0] <== NOT EXECUTED
a158: e3e00000 mvn r0, #0 ; 0x0
a15c: eafffff3 b a130 <chdir+0x84>
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_filesystem_freenode( &loc );
a160: e59d3008 ldr r3, [sp, #8]
a164: e3530000 cmp r3, #0 ; 0x0
a168: 0a000004 beq a180 <chdir+0xd4>
a16c: e593301c ldr r3, [r3, #28]
a170: e3530000 cmp r3, #0 ; 0x0
a174: 11a0000d movne r0, sp
a178: 11a0e00f movne lr, pc
a17c: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( ENOTDIR );
a180: eb000da9 bl d82c <__errno>
a184: e3a03014 mov r3, #20 ; 0x14
a188: e5803000 str r3, [r0]
a18c: e3e00000 mvn r0, #0 ; 0x0
a190: eaffffe6 b a130 <chdir+0x84>
00003384 <chmod>:
int chmod(
const char *path,
mode_t mode
)
{
3384: e92d4030 push {r4, r5, lr}
3388: e24dd010 sub sp, sp, #16 ; 0x10
338c: e1a04001 mov r4, r1
int status;
rtems_filesystem_location_info_t loc;
int result;
status = rtems_filesystem_evaluate_path( path, 0, &loc, true );
3390: e1a0200d mov r2, sp
3394: e3a01000 mov r1, #0 ; 0x0
3398: e3a03001 mov r3, #1 ; 0x1
339c: eb000088 bl 35c4 <rtems_filesystem_evaluate_path>
if ( status != 0 )
33a0: e3500000 cmp r0, #0 ; 0x0
{
int status;
rtems_filesystem_location_info_t loc;
int result;
status = rtems_filesystem_evaluate_path( path, 0, &loc, true );
33a4: e1a0500d mov r5, sp
if ( status != 0 )
33a8: 1a000020 bne 3430 <chmod+0xac>
return -1;
if ( !loc.handlers ){
33ac: e59d3004 ldr r3, [sp, #4]
33b0: e3530000 cmp r3, #0 ; 0x0
33b4: 0a000012 beq 3404 <chmod+0x80>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( EBADF );
}
if ( !loc.handlers->fchmod_h ){
33b8: e593301c ldr r3, [r3, #28]
33bc: e3530000 cmp r3, #0 ; 0x0
33c0: 0a00001c beq 3438 <chmod+0xb4>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.handlers->fchmod_h)( &loc, mode );
33c4: e1a01004 mov r1, r4
33c8: e1a0000d mov r0, sp
33cc: e1a0e00f mov lr, pc
33d0: e12fff13 bx r3
rtems_filesystem_freenode( &loc );
33d4: e59d3008 ldr r3, [sp, #8]
33d8: e3530000 cmp r3, #0 ; 0x0
if ( !loc.handlers->fchmod_h ){
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.handlers->fchmod_h)( &loc, mode );
33dc: e1a04000 mov r4, r0
rtems_filesystem_freenode( &loc );
33e0: 0a000004 beq 33f8 <chmod+0x74>
33e4: e593301c ldr r3, [r3, #28]
33e8: e3530000 cmp r3, #0 ; 0x0
33ec: 11a0000d movne r0, sp
33f0: 11a0e00f movne lr, pc
33f4: 112fff13 bxne r3
return result;
}
33f8: e1a00004 mov r0, r4
33fc: e28dd010 add sp, sp, #16 ; 0x10
3400: e8bd8030 pop {r4, r5, pc}
status = rtems_filesystem_evaluate_path( path, 0, &loc, true );
if ( status != 0 )
return -1;
if ( !loc.handlers ){
rtems_filesystem_freenode( &loc );
3404: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
3408: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
340c: 0a000004 beq 3424 <chmod+0xa0> <== NOT EXECUTED
3410: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
3414: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
3418: 11a0000d movne r0, sp <== NOT EXECUTED
341c: 11a0e00f movne lr, pc <== NOT EXECUTED
3420: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EBADF );
3424: eb0032dc bl ff9c <__errno> <== NOT EXECUTED
3428: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED
342c: e5803000 str r3, [r0] <== NOT EXECUTED
3430: e3e04000 mvn r4, #0 ; 0x0
3434: eaffffef b 33f8 <chmod+0x74>
}
if ( !loc.handlers->fchmod_h ){
rtems_filesystem_freenode( &loc );
3438: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
343c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
3440: 0a000004 beq 3458 <chmod+0xd4> <== NOT EXECUTED
3444: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
3448: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
344c: 11a0000d movne r0, sp <== NOT EXECUTED
3450: 11a0e00f movne lr, pc <== NOT EXECUTED
3454: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
3458: eb0032cf bl ff9c <__errno> <== NOT EXECUTED
345c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
3460: e5803000 str r3, [r0] <== NOT EXECUTED
3464: e3e04000 mvn r4, #0 ; 0x0 <== NOT EXECUTED
3468: eaffffe2 b 33f8 <chmod+0x74> <== NOT EXECUTED
0000346c <chown>:
int chown(
const char *path,
uid_t owner,
gid_t group
)
{
346c: e92d4070 push {r4, r5, r6, lr}
3470: e24dd010 sub sp, sp, #16 ; 0x10
3474: e1a0c801 lsl ip, r1, #16
3478: e1a04802 lsl r4, r2, #16
rtems_filesystem_location_info_t loc;
int result;
if ( rtems_filesystem_evaluate_path( path, 0x00, &loc, true ) )
347c: e3a01000 mov r1, #0 ; 0x0
3480: e1a0200d mov r2, sp
3484: e3a03001 mov r3, #1 ; 0x1
int chown(
const char *path,
uid_t owner,
gid_t group
)
{
3488: e1a0582c lsr r5, ip, #16
rtems_filesystem_location_info_t loc;
int result;
if ( rtems_filesystem_evaluate_path( path, 0x00, &loc, true ) )
348c: eb00004c bl 35c4 <rtems_filesystem_evaluate_path>
3490: e3500000 cmp r0, #0 ; 0x0
3494: e1a0600d mov r6, sp
int chown(
const char *path,
uid_t owner,
gid_t group
)
{
3498: e1a04824 lsr r4, r4, #16
rtems_filesystem_location_info_t loc;
int result;
if ( rtems_filesystem_evaluate_path( path, 0x00, &loc, true ) )
349c: 1a00001c bne 3514 <chown+0xa8>
return -1;
if ( !loc.ops->chown_h ) {
34a0: e59d2008 ldr r2, [sp, #8]
34a4: e5923018 ldr r3, [r2, #24]
34a8: e3530000 cmp r3, #0 ; 0x0
34ac: 0a000010 beq 34f4 <chown+0x88>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->chown_h)( &loc, owner, group );
34b0: e1a02004 mov r2, r4
34b4: e1a01005 mov r1, r5
34b8: e1a0000d mov r0, sp
34bc: e1a0e00f mov lr, pc
34c0: e12fff13 bx r3
rtems_filesystem_freenode( &loc );
34c4: e59d3008 ldr r3, [sp, #8]
34c8: e3530000 cmp r3, #0 ; 0x0
if ( !loc.ops->chown_h ) {
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->chown_h)( &loc, owner, group );
34cc: e1a04000 mov r4, r0
rtems_filesystem_freenode( &loc );
34d0: 0a000004 beq 34e8 <chown+0x7c>
34d4: e593301c ldr r3, [r3, #28]
34d8: e3530000 cmp r3, #0 ; 0x0
34dc: 11a0000d movne r0, sp
34e0: 11a0e00f movne lr, pc
34e4: 112fff13 bxne r3
return result;
}
34e8: e1a00004 mov r0, r4
34ec: e28dd010 add sp, sp, #16 ; 0x10
34f0: e8bd8070 pop {r4, r5, r6, pc}
if ( rtems_filesystem_evaluate_path( path, 0x00, &loc, true ) )
return -1;
if ( !loc.ops->chown_h ) {
rtems_filesystem_freenode( &loc );
34f4: e592301c ldr r3, [r2, #28] <== NOT EXECUTED
34f8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
34fc: 11a0000d movne r0, sp <== NOT EXECUTED
3500: 11a0e00f movne lr, pc <== NOT EXECUTED
3504: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
3508: eb0032a3 bl ff9c <__errno> <== NOT EXECUTED
350c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
3510: e5803000 str r3, [r0] <== NOT EXECUTED
3514: e3e04000 mvn r4, #0 ; 0x0
3518: eafffff2 b 34e8 <chown+0x7c>
00001784 <chroot>:
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
1784: e92d4070 push {r4, r5, r6, lr}
int result;
rtems_filesystem_location_info_t loc;
/* an automatic call to new private env the first time */
if (rtems_current_user_env == &rtems_global_user_env) {
1788: e59f60c4 ldr r6, [pc, #196] ; 1854 <chroot+0xd0>
178c: e59f30c4 ldr r3, [pc, #196] ; 1858 <chroot+0xd4>
1790: e5964000 ldr r4, [r6]
1794: e1540003 cmp r4, r3
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
1798: e24dd010 sub sp, sp, #16 ; 0x10
179c: e1a05000 mov r5, r0
int result;
rtems_filesystem_location_info_t loc;
/* an automatic call to new private env the first time */
if (rtems_current_user_env == &rtems_global_user_env) {
17a0: 0a00001b beq 1814 <chroot+0x90>
rtems_libio_set_private_env(); /* try to set a new private env*/
if (rtems_current_user_env == &rtems_global_user_env) /* not ok */
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = chdir(pathname);
17a4: e1a00005 mov r0, r5
17a8: eb00223f bl a0ac <chdir>
if (result) {
17ac: e3500000 cmp r0, #0 ; 0x0
17b0: 1a000020 bne 1838 <chroot+0xb4>
rtems_set_errno_and_return_minus_one( errno );
}
/* clone the new root location */
if (rtems_filesystem_evaluate_path(".", 0, &loc, 0)) {
17b4: e1a01000 mov r1, r0
17b8: e1a0200d mov r2, sp
17bc: e59f0098 ldr r0, [pc, #152] ; 185c <chroot+0xd8>
17c0: e1a03001 mov r3, r1
17c4: eb00007c bl 19bc <rtems_filesystem_evaluate_path>
17c8: e3500000 cmp r0, #0 ; 0x0
17cc: e1a0400d mov r4, sp
17d0: 1a000018 bne 1838 <chroot+0xb4>
/* our cwd has changed, though - but there is no easy way of return :-( */
rtems_set_errno_and_return_minus_one( errno );
}
rtems_filesystem_freenode(&rtems_filesystem_root);
17d4: e5960000 ldr r0, [r6]
17d8: e590301c ldr r3, [r0, #28]
17dc: e3530000 cmp r3, #0 ; 0x0
17e0: 0a000004 beq 17f8 <chroot+0x74>
17e4: e593301c ldr r3, [r3, #28]
17e8: e3530000 cmp r3, #0 ; 0x0
17ec: 12800014 addne r0, r0, #20 ; 0x14
17f0: 11a0e00f movne lr, pc
17f4: 112fff13 bxne r3
rtems_filesystem_root = loc;
17f8: e596c000 ldr ip, [r6]
17fc: e894000f ldm r4, {r0, r1, r2, r3}
1800: e28cc014 add ip, ip, #20 ; 0x14
1804: e88c000f stm ip, {r0, r1, r2, r3}
1808: e3a00000 mov r0, #0 ; 0x0
return 0;
}
180c: e28dd010 add sp, sp, #16 ; 0x10
1810: e8bd8070 pop {r4, r5, r6, pc}
int result;
rtems_filesystem_location_info_t loc;
/* an automatic call to new private env the first time */
if (rtems_current_user_env == &rtems_global_user_env) {
rtems_libio_set_private_env(); /* try to set a new private env*/
1814: eb000595 bl 2e70 <rtems_libio_set_private_env>
if (rtems_current_user_env == &rtems_global_user_env) /* not ok */
1818: e5963000 ldr r3, [r6]
181c: e1530004 cmp r3, r4
1820: 1affffdf bne 17a4 <chroot+0x20>
rtems_set_errno_and_return_minus_one( ENOTSUP );
1824: eb003000 bl d82c <__errno> <== NOT EXECUTED
1828: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
182c: e5803000 str r3, [r0] <== NOT EXECUTED
1830: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
1834: eafffff4 b 180c <chroot+0x88> <== NOT EXECUTED
}
/* clone the new root location */
if (rtems_filesystem_evaluate_path(".", 0, &loc, 0)) {
/* our cwd has changed, though - but there is no easy way of return :-( */
rtems_set_errno_and_return_minus_one( errno );
1838: eb002ffb bl d82c <__errno> <== NOT EXECUTED
183c: e1a04000 mov r4, r0 <== NOT EXECUTED
1840: eb002ff9 bl d82c <__errno> <== NOT EXECUTED
1844: e5903000 ldr r3, [r0] <== NOT EXECUTED
1848: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
184c: e5843000 str r3, [r4] <== NOT EXECUTED
1850: eaffffed b 180c <chroot+0x88> <== NOT EXECUTED
0000232c <closedir>:
* close a directory.
*/
int
closedir(
DIR *dirp )
{
232c: e92d4030 push {r4, r5, lr}
int fd;
if ( !dirp )
2330: e2505000 subs r5, r0, #0 ; 0x0
2334: 0a00000b beq 2368 <closedir+0x3c>
rtems_set_errno_and_return_minus_one( EBADF );
fd = dirp->dd_fd;
dirp->dd_fd = -1;
dirp->dd_loc = 0;
2338: e3a03000 mov r3, #0 ; 0x0
233c: e5853004 str r3, [r5, #4]
if ( !dirp )
rtems_set_errno_and_return_minus_one( EBADF );
fd = dirp->dd_fd;
dirp->dd_fd = -1;
2340: e2433001 sub r3, r3, #1 ; 0x1
int fd;
if ( !dirp )
rtems_set_errno_and_return_minus_one( EBADF );
fd = dirp->dd_fd;
2344: e5954000 ldr r4, [r5]
dirp->dd_fd = -1;
dirp->dd_loc = 0;
(void)free((void *)dirp->dd_buf);
2348: e595000c ldr r0, [r5, #12]
if ( !dirp )
rtems_set_errno_and_return_minus_one( EBADF );
fd = dirp->dd_fd;
dirp->dd_fd = -1;
234c: e5853000 str r3, [r5]
dirp->dd_loc = 0;
(void)free((void *)dirp->dd_buf);
2350: eb0000b5 bl 262c <free>
(void)free((void *)dirp);
2354: e1a00005 mov r0, r5
2358: eb0000b3 bl 262c <free>
return(close(fd));
235c: e1a00004 mov r0, r4
}
2360: e8bd4030 pop {r4, r5, lr}
fd = dirp->dd_fd;
dirp->dd_fd = -1;
dirp->dd_loc = 0;
(void)free((void *)dirp->dd_buf);
(void)free((void *)dirp);
return(close(fd));
2364: ea000004 b 237c <close>
DIR *dirp )
{
int fd;
if ( !dirp )
rtems_set_errno_and_return_minus_one( EBADF );
2368: eb003095 bl e5c4 <__errno> <== NOT EXECUTED
236c: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED
2370: e5803000 str r3, [r0] <== NOT EXECUTED
dirp->dd_fd = -1;
dirp->dd_loc = 0;
(void)free((void *)dirp->dd_buf);
(void)free((void *)dirp);
return(close(fd));
}
2374: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
2378: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
0000b20c <device_ioctl>:
int device_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
b20c: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
b210: e24dd010 sub sp, sp, #16 ; 0x10 <== NOT EXECUTED
rtems_status_code status;
IMFS_jnode_t *the_jnode;
args.iop = iop;
args.command = command;
args.buffer = buffer;
b214: e88d0007 stm sp, {r0, r1, r2} <== NOT EXECUTED
the_jnode = iop->file_info;
b218: e590302c ldr r3, [r0, #44] <== NOT EXECUTED
status = rtems_io_control(
b21c: e1a0200d mov r2, sp <== NOT EXECUTED
b220: e2830050 add r0, r3, #80 ; 0x50 <== NOT EXECUTED
b224: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED
b228: eb000268 bl bbd0 <rtems_io_control> <== NOT EXECUTED
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
b22c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
return rtems_deviceio_errno(status);
return args.ioctl_return;
b230: 059d000c ldreq r0, [sp, #12] <== NOT EXECUTED
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
b234: 1a000001 bne b240 <device_ioctl+0x34> <== NOT EXECUTED
return rtems_deviceio_errno(status);
return args.ioctl_return;
}
b238: e28dd010 add sp, sp, #16 ; 0x10 <== NOT EXECUTED
b23c: e8bd8000 pop {pc} <== NOT EXECUTED
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
b240: ebffffe6 bl b1e0 <rtems_deviceio_errno> <== NOT EXECUTED
b244: eafffffb b b238 <device_ioctl+0x2c> <== NOT EXECUTED
0000b2a4 <device_read>:
ssize_t device_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
b2a4: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
args.iop = iop;
args.offset = iop->offset;
b2a8: e5903008 ldr r3, [r0, #8] <== NOT EXECUTED
ssize_t device_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
b2ac: e24dd018 sub sp, sp, #24 ; 0x18 <== NOT EXECUTED
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
b2b0: e590c00c ldr ip, [r0, #12] <== NOT EXECUTED
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
args.iop = iop;
args.offset = iop->offset;
b2b4: e58d3004 str r3, [sp, #4] <== NOT EXECUTED
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
b2b8: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED
the_jnode = iop->file_info;
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
b2bc: e58d200c str r2, [sp, #12] <== NOT EXECUTED
args.flags = iop->flags;
args.bytes_moved = 0;
b2c0: e58d3014 str r3, [sp, #20] <== NOT EXECUTED
the_jnode = iop->file_info;
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
b2c4: e58d1008 str r1, [sp, #8] <== NOT EXECUTED
args.count = count;
args.flags = iop->flags;
b2c8: e58dc010 str ip, [sp, #16] <== NOT EXECUTED
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
args.iop = iop;
b2cc: e58d0000 str r0, [sp] <== NOT EXECUTED
{
rtems_libio_rw_args_t args;
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
b2d0: e590302c ldr r3, [r0, #44] <== NOT EXECUTED
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read(
b2d4: e1a0200d mov r2, sp <== NOT EXECUTED
b2d8: e2830050 add r0, r3, #80 ; 0x50 <== NOT EXECUTED
b2dc: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED
b2e0: eb000264 bl bc78 <rtems_io_read> <== NOT EXECUTED
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
b2e4: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
b2e8: 059d0014 ldreq r0, [sp, #20] <== NOT EXECUTED
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
b2ec: 1a000001 bne b2f8 <device_read+0x54> <== NOT EXECUTED
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
}
b2f0: e28dd018 add sp, sp, #24 ; 0x18 <== NOT EXECUTED
b2f4: e8bd8000 pop {pc} <== NOT EXECUTED
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
b2f8: ebffffb8 bl b1e0 <rtems_deviceio_errno> <== NOT EXECUTED
b2fc: eafffffb b b2f0 <device_read+0x4c> <== NOT EXECUTED
0000b248 <device_write>:
ssize_t device_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
b248: e52de004 push {lr} ; (str lr, [sp, #-4]!)
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
args.iop = iop;
args.offset = iop->offset;
b24c: e5903008 ldr r3, [r0, #8]
ssize_t device_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
b250: e24dd018 sub sp, sp, #24 ; 0x18
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
b254: e590c00c ldr ip, [r0, #12]
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
args.iop = iop;
args.offset = iop->offset;
b258: e58d3004 str r3, [sp, #4]
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
b25c: e3a03000 mov r3, #0 ; 0x0
the_jnode = iop->file_info;
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
args.count = count;
b260: e58d200c str r2, [sp, #12]
args.flags = iop->flags;
args.bytes_moved = 0;
b264: e58d3014 str r3, [sp, #20]
the_jnode = iop->file_info;
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
b268: e58d1008 str r1, [sp, #8]
args.count = count;
args.flags = iop->flags;
b26c: e58dc010 str ip, [sp, #16]
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
args.iop = iop;
b270: e58d0000 str r0, [sp]
{
rtems_libio_rw_args_t args;
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
b274: e590302c ldr r3, [r0, #44]
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_write(
b278: e1a0200d mov r2, sp
b27c: e2830050 add r0, r3, #80 ; 0x50
b280: e8900003 ldm r0, {r0, r1}
b284: eb000290 bl bccc <rtems_io_write>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
b288: e3500000 cmp r0, #0 ; 0x0
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
b28c: 059d0014 ldreq r0, [sp, #20]
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
b290: 1a000001 bne b29c <device_write+0x54>
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
}
b294: e28dd018 add sp, sp, #24 ; 0x18
b298: e8bd8000 pop {pc}
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
b29c: ebffffcf bl b1e0 <rtems_deviceio_errno> <== NOT EXECUTED
b2a0: eafffffb b b294 <device_write+0x4c> <== NOT EXECUTED
00002f7c <drainOutput>:
drainOutput (struct rtems_termios_tty *tty)
{
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
2f7c: e59030b4 ldr r3, [r0, #180]
2f80: e3530000 cmp r3, #0 ; 0x0
/*
* Drain output queue
*/
static void
drainOutput (struct rtems_termios_tty *tty)
{
2f84: e92d4030 push {r4, r5, lr}
2f88: e1a04000 mov r4, r0
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
2f8c: 08bd8030 popeq {r4, r5, pc}
rtems_interrupt_disable (level);
2f90: e10f1000 mrs r1, CPSR <== NOT EXECUTED
2f94: e38130c0 orr r3, r1, #192 ; 0xc0 <== NOT EXECUTED
2f98: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
2f9c: e5902084 ldr r2, [r0, #132] <== NOT EXECUTED
2fa0: e5903080 ldr r3, [r0, #128] <== NOT EXECUTED
2fa4: e1520003 cmp r2, r3 <== NOT EXECUTED
2fa8: 0a00000f beq 2fec <drainOutput+0x70> <== NOT EXECUTED
tty->rawOutBufState = rob_wait;
2fac: e3a05002 mov r5, #2 ; 0x2 <== NOT EXECUTED
2fb0: e5845094 str r5, [r4, #148] <== NOT EXECUTED
rtems_interrupt_enable (level);
2fb4: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore,
2fb8: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED
2fbc: e594008c ldr r0, [r4, #140] <== NOT EXECUTED
2fc0: e1a02001 mov r2, r1 <== NOT EXECUTED
2fc4: eb00060c bl 47fc <rtems_semaphore_obtain> <== NOT EXECUTED
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
2fc8: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
2fcc: 1a000008 bne 2ff4 <drainOutput+0x78> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
2fd0: e10f1000 mrs r1, CPSR <== NOT EXECUTED
2fd4: e38130c0 orr r3, r1, #192 ; 0xc0 <== NOT EXECUTED
2fd8: e129f003 msr CPSR_fc, r3 <== 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) {
2fdc: e5942084 ldr r2, [r4, #132] <== NOT EXECUTED
2fe0: e5943080 ldr r3, [r4, #128] <== NOT EXECUTED
2fe4: e1520003 cmp r2, r3 <== NOT EXECUTED
2fe8: 1afffff0 bne 2fb0 <drainOutput+0x34> <== NOT EXECUTED
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
rtems_interrupt_enable (level);
2fec: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED
2ff0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore,
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
2ff4: eb0007be bl 4ef4 <rtems_fatal_error_occurred> <== NOT EXECUTED
0000210c <dup2>:
int dup2(
int fildes,
int fildes2
)
{
210c: e92d4070 push {r4, r5, r6, lr}
2110: e24dd04c sub sp, sp, #76 ; 0x4c
2114: e1a06001 mov r6, r1
/*
* If fildes is not valid, then fildes2 should not be closed.
*/
status = fstat( fildes, &buf );
2118: e1a0100d mov r1, sp
int dup2(
int fildes,
int fildes2
)
{
211c: e1a05000 mov r5, r0
/*
* If fildes is not valid, then fildes2 should not be closed.
*/
status = fstat( fildes, &buf );
2120: eb0001ae bl 27e0 <fstat>
if ( status == -1 )
2124: e3700001 cmn r0, #1 ; 0x1
/*
* If fildes is not valid, then fildes2 should not be closed.
*/
status = fstat( fildes, &buf );
2128: e1a0400d mov r4, sp
if ( status == -1 )
212c: 1a000002 bne 213c <dup2+0x30>
/*
* This fcntl handles everything else.
*/
return fcntl( fildes, F_DUPFD, fildes2 );
2130: e3e00000 mvn r0, #0 ; 0x0
}
2134: e28dd04c add sp, sp, #76 ; 0x4c
2138: e8bd8070 pop {r4, r5, r6, pc}
/*
* If fildes2 is not valid, then we should not do anything either.
*/
status = fstat( fildes2, &buf );
213c: e1a0100d mov r1, sp
2140: e1a00006 mov r0, r6
2144: eb0001a5 bl 27e0 <fstat>
if ( status == -1 )
2148: e3700001 cmn r0, #1 ; 0x1
214c: 0afffff7 beq 2130 <dup2+0x24>
/*
* This fcntl handles everything else.
*/
return fcntl( fildes, F_DUPFD, fildes2 );
2150: e1a00005 mov r0, r5 <== NOT EXECUTED
2154: e1a02006 mov r2, r6 <== NOT EXECUTED
2158: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED
215c: eb000082 bl 236c <fcntl> <== NOT EXECUTED
2160: eafffff3 b 2134 <dup2+0x28> <== NOT EXECUTED
00002a20 <echo>:
/*
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
2a20: e92d4010 push {r4, lr} <== NOT EXECUTED
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
2a24: e591303c ldr r3, [r1, #60] <== NOT EXECUTED
2a28: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED
/*
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
2a2c: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED
2a30: e1a04001 mov r4, r1 <== NOT EXECUTED
2a34: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
2a38: 0a000006 beq 2a58 <echo+0x38> <== NOT EXECUTED
2a3c: e59f305c ldr r3, [pc, #92] ; 2aa0 <echo+0x80> <== NOT EXECUTED
2a40: e5932000 ldr r2, [r3] <== NOT EXECUTED
2a44: e7d21000 ldrb r1, [r2, r0] <== NOT EXECUTED
2a48: e2503009 subs r3, r0, #9 ; 0x9 <== NOT EXECUTED
2a4c: 13a03001 movne r3, #1 ; 0x1 <== NOT EXECUTED
2a50: e01332a1 ands r3, r3, r1, lsr #5 <== NOT EXECUTED
2a54: 1a000003 bne 2a68 <echo+0x48> <== NOT EXECUTED
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
tty->column += 2;
}
else {
oproc (c, tty);
2a58: e1a01004 mov r1, r4 <== NOT EXECUTED
2a5c: ebffff96 bl 28bc <oproc> <== NOT EXECUTED
}
}
2a60: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED
2a64: e8bd8010 pop {r4, pc} <== NOT EXECUTED
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
2a68: e350000a cmp r0, #10 ; 0xa <== NOT EXECUTED
2a6c: 0afffff9 beq 2a58 <echo+0x38> <== NOT EXECUTED
char echobuf[2];
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
2a70: e220c040 eor ip, r0, #64 ; 0x40 <== NOT EXECUTED
echo (unsigned char c, struct rtems_termios_tty *tty)
{
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
2a74: e3a0305e mov r3, #94 ; 0x5e <== NOT EXECUTED
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
2a78: e28d0002 add r0, sp, #2 ; 0x2 <== NOT EXECUTED
2a7c: e3a01002 mov r1, #2 ; 0x2 <== NOT EXECUTED
2a80: e1a02004 mov r2, r4 <== NOT EXECUTED
echo (unsigned char c, struct rtems_termios_tty *tty)
{
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
2a84: e5cd3002 strb r3, [sp, #2] <== NOT EXECUTED
echobuf[1] = c ^ 0x40;
2a88: e5cdc003 strb ip, [sp, #3] <== NOT EXECUTED
rtems_termios_puts (echobuf, 2, tty);
2a8c: ebffff42 bl 279c <rtems_termios_puts> <== NOT EXECUTED
tty->column += 2;
2a90: e5943028 ldr r3, [r4, #40] <== NOT EXECUTED
2a94: e2833002 add r3, r3, #2 ; 0x2 <== NOT EXECUTED
2a98: e5843028 str r3, [r4, #40] <== NOT EXECUTED
2a9c: eaffffef b 2a60 <echo+0x40> <== NOT EXECUTED
00002aa4 <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)
2aa4: e5903020 ldr r3, [r0, #32] <== NOT EXECUTED
2aa8: e3530000 cmp r3, #0 ; 0x0 <== 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)
{
2aac: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
2ab0: e1a04000 mov r4, r0 <== NOT EXECUTED
2ab4: e1a07001 mov r7, r1 <== NOT EXECUTED
if (tty->ccount == 0)
2ab8: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
return;
if (lineFlag) {
2abc: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED
2ac0: 0590103c ldreq r1, [r0, #60] <== NOT EXECUTED
2ac4: 1a000019 bne 2b30 <erase+0x8c> <== NOT EXECUTED
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
2ac8: e59f81a8 ldr r8, [pc, #424] ; 2c78 <erase+0x1d4> <== NOT EXECUTED
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
2acc: e2430001 sub r0, r3, #1 ; 0x1 <== NOT EXECUTED
2ad0: e5840020 str r0, [r4, #32] <== NOT EXECUTED
2ad4: e594c01c ldr ip, [r4, #28] <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) {
2ad8: e3110008 tst r1, #8 ; 0x8 <== NOT EXECUTED
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
2adc: e7dc5000 ldrb r5, [ip, r0] <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) {
2ae0: 0a00000b beq 2b14 <erase+0x70> <== NOT EXECUTED
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
2ae4: e3570000 cmp r7, #0 ; 0x0 <== NOT EXECUTED
2ae8: 1a000001 bne 2af4 <erase+0x50> <== NOT EXECUTED
2aec: e3110010 tst r1, #16 ; 0x10 <== NOT EXECUTED
2af0: 0a00005c beq 2c68 <erase+0x1c4> <== NOT EXECUTED
echo (tty->termios.c_cc[VERASE], tty);
}
else if (c == '\t') {
2af4: e3550009 cmp r5, #9 ; 0x9 <== NOT EXECUTED
2af8: 0a000037 beq 2bdc <erase+0x138> <== NOT EXECUTED
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
2afc: e5983000 ldr r3, [r8] <== NOT EXECUTED
2b00: e7d32005 ldrb r2, [r3, r5] <== NOT EXECUTED
2b04: e3120020 tst r2, #32 ; 0x20 <== NOT EXECUTED
2b08: 0a000028 beq 2bb0 <erase+0x10c> <== NOT EXECUTED
2b0c: e3110c02 tst r1, #512 ; 0x200 <== NOT EXECUTED
2b10: 1a000017 bne 2b74 <erase+0xd0> <== NOT EXECUTED
if (tty->column)
tty->column--;
}
}
}
if (!lineFlag)
2b14: e3570000 cmp r7, #0 ; 0x0 <== NOT EXECUTED
2b18: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
2b1c: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED
2b20: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
2b24: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
2b28: e594103c ldr r1, [r4, #60] <== NOT EXECUTED
2b2c: eaffffe6 b 2acc <erase+0x28> <== NOT EXECUTED
erase (struct rtems_termios_tty *tty, int lineFlag)
{
if (tty->ccount == 0)
return;
if (lineFlag) {
if (!(tty->termios.c_lflag & ECHO)) {
2b30: e590103c ldr r1, [r0, #60] <== NOT EXECUTED
2b34: e2112008 ands r2, r1, #8 ; 0x8 <== NOT EXECUTED
tty->ccount = 0;
2b38: 05802020 streq r2, [r0, #32] <== NOT EXECUTED
erase (struct rtems_termios_tty *tty, int lineFlag)
{
if (tty->ccount == 0)
return;
if (lineFlag) {
if (!(tty->termios.c_lflag & ECHO)) {
2b3c: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
tty->ccount = 0;
return;
}
if (!(tty->termios.c_lflag & ECHOE)) {
2b40: e2112010 ands r2, r1, #16 ; 0x10 <== NOT EXECUTED
2b44: 1affffdf bne 2ac8 <erase+0x24> <== NOT EXECUTED
tty->ccount = 0;
2b48: e5802020 str r2, [r0, #32] <== NOT EXECUTED
echo (tty->termios.c_cc[VKILL], tty);
2b4c: e1a01004 mov r1, r4 <== NOT EXECUTED
2b50: e5d00044 ldrb r0, [r0, #68] <== NOT EXECUTED
2b54: ebffffb1 bl 2a20 <echo> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
2b58: e594303c ldr r3, [r4, #60] <== NOT EXECUTED
2b5c: e3130020 tst r3, #32 ; 0x20 <== NOT EXECUTED
2b60: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
echo ('\n', tty);
2b64: e1a01004 mov r1, r4 <== NOT EXECUTED
2b68: e3a0000a mov r0, #10 ; 0xa <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
2b6c: e8bd41f0 pop {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
}
if (!(tty->termios.c_lflag & ECHOE)) {
tty->ccount = 0;
echo (tty->termios.c_cc[VKILL], tty);
if (tty->termios.c_lflag & ECHOK)
echo ('\n', tty);
2b70: eaffffaa b 2a20 <echo> <== NOT EXECUTED
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
rtems_termios_puts ("\b \b", 3, tty);
2b74: e1a02004 mov r2, r4 <== NOT EXECUTED
2b78: e59f00fc ldr r0, [pc, #252] ; 2c7c <erase+0x1d8> <== NOT EXECUTED
2b7c: e3a01003 mov r1, #3 ; 0x3 <== NOT EXECUTED
2b80: ebffff05 bl 279c <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
2b84: e5943028 ldr r3, [r4, #40] <== NOT EXECUTED
2b88: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
tty->column--;
2b8c: 12433001 subne r3, r3, #1 ; 0x1 <== NOT EXECUTED
2b90: 15843028 strne r3, [r4, #40] <== NOT EXECUTED
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
2b94: e5983000 ldr r3, [r8] <== NOT EXECUTED
2b98: e7d32005 ldrb r2, [r3, r5] <== NOT EXECUTED
2b9c: e3120020 tst r2, #32 ; 0x20 <== NOT EXECUTED
2ba0: 0a000002 beq 2bb0 <erase+0x10c> <== NOT EXECUTED
2ba4: e594103c ldr r1, [r4, #60] <== NOT EXECUTED
2ba8: e3110c02 tst r1, #512 ; 0x200 <== NOT EXECUTED
2bac: 0affffd8 beq 2b14 <erase+0x70> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
2bb0: e59f00c4 ldr r0, [pc, #196] ; 2c7c <erase+0x1d8> <== NOT EXECUTED
2bb4: e3a01003 mov r1, #3 ; 0x3 <== NOT EXECUTED
2bb8: e1a02004 mov r2, r4 <== NOT EXECUTED
2bbc: ebfffef6 bl 279c <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
2bc0: e5943028 ldr r3, [r4, #40] <== NOT EXECUTED
2bc4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
tty->column--;
2bc8: 12433001 subne r3, r3, #1 ; 0x1 <== NOT EXECUTED
2bcc: 15843028 strne r3, [r4, #40] <== NOT EXECUTED
}
}
}
if (!lineFlag)
2bd0: e3570000 cmp r7, #0 ; 0x0 <== NOT EXECUTED
2bd4: 1affffd0 bne 2b1c <erase+0x78> <== NOT EXECUTED
2bd8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
2bdc: e3500000 cmp r0, #0 ; 0x0 <== 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;
2be0: e594502c ldr r5, [r4, #44] <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
2be4: 0a000010 beq 2c2c <erase+0x188> <== NOT EXECUTED
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
}
else if (iscntrl (c)) {
2be8: e5986000 ldr r6, [r8] <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOCTL)
2bec: e2011c02 and r1, r1, #512 ; 0x200 <== NOT EXECUTED
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
}
else if (iscntrl (c)) {
2bf0: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
2bf4: e7dc3002 ldrb r3, [ip, r2] <== NOT EXECUTED
if (c == '\t') {
2bf8: e3530009 cmp r3, #9 ; 0x9 <== NOT EXECUTED
col = (col | 7) + 1;
2bfc: 03853007 orreq r3, r5, #7 ; 0x7 <== NOT EXECUTED
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
2c00: e2822001 add r2, r2, #1 ; 0x1 <== NOT EXECUTED
if (c == '\t') {
col = (col | 7) + 1;
2c04: 02835001 addeq r5, r3, #1 ; 0x1 <== NOT EXECUTED
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
2c08: 0a000005 beq 2c24 <erase+0x180> <== NOT EXECUTED
col = (col | 7) + 1;
}
else if (iscntrl (c)) {
2c0c: e7d63003 ldrb r3, [r6, r3] <== NOT EXECUTED
2c10: e3130020 tst r3, #32 ; 0x20 <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOCTL)
col += 2;
}
else {
col++;
2c14: 02855001 addeq r5, r5, #1 ; 0x1 <== NOT EXECUTED
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
}
else if (iscntrl (c)) {
2c18: 0a000001 beq 2c24 <erase+0x180> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOCTL)
2c1c: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED
col += 2;
2c20: 12855002 addne r5, r5, #2 ; 0x2 <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
2c24: e1500002 cmp r0, r2 <== NOT EXECUTED
2c28: 1afffff1 bne 2bf4 <erase+0x150> <== NOT EXECUTED
}
/*
* Back up over the tab
*/
while (tty->column > col) {
2c2c: e5943028 ldr r3, [r4, #40] <== NOT EXECUTED
2c30: e1530005 cmp r3, r5 <== NOT EXECUTED
2c34: daffffb6 ble 2b14 <erase+0x70> <== NOT EXECUTED
rtems_termios_puts ("\b", 1, tty);
2c38: e59f0040 ldr r0, [pc, #64] ; 2c80 <erase+0x1dc> <== NOT EXECUTED
2c3c: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED
2c40: e1a02004 mov r2, r4 <== NOT EXECUTED
2c44: ebfffed4 bl 279c <rtems_termios_puts> <== NOT EXECUTED
tty->column--;
2c48: e5943028 ldr r3, [r4, #40] <== NOT EXECUTED
2c4c: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED
}
/*
* Back up over the tab
*/
while (tty->column > col) {
2c50: e1530005 cmp r3, r5 <== NOT EXECUTED
rtems_termios_puts ("\b", 1, tty);
tty->column--;
2c54: e5843028 str r3, [r4, #40] <== NOT EXECUTED
}
/*
* Back up over the tab
*/
while (tty->column > col) {
2c58: cafffff6 bgt 2c38 <erase+0x194> <== NOT EXECUTED
if (tty->column)
tty->column--;
}
}
}
if (!lineFlag)
2c5c: e3570000 cmp r7, #0 ; 0x0 <== NOT EXECUTED
2c60: 1affffad bne 2b1c <erase+0x78> <== NOT EXECUTED
2c64: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== 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);
2c68: e5d40043 ldrb r0, [r4, #67] <== NOT EXECUTED
2c6c: e1a01004 mov r1, r4 <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
2c70: 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);
2c74: eaffff69 b 2a20 <echo> <== NOT EXECUTED
0000236c <fcntl>:
int fcntl(
int fd,
int cmd,
...
)
{
236c: e92d000e push {r1, r2, r3}
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
2370: e59f3210 ldr r3, [pc, #528] ; 2588 <fcntl+0x21c>
int fcntl(
int fd,
int cmd,
...
)
{
2374: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
2378: e5932000 ldr r2, [r3]
237c: e1500002 cmp r0, r2
int fcntl(
int fd,
int cmd,
...
)
{
2380: e59d8024 ldr r8, [sp, #36]
2384: e28d1028 add r1, sp, #40 ; 0x28
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
2388: 2a000072 bcs 2558 <fcntl+0x1ec>
iop = rtems_libio_iop( fd );
238c: e59f61f8 ldr r6, [pc, #504] ; 258c <fcntl+0x220>
2390: e1a03200 lsl r3, r0, #4
2394: e0433100 sub r3, r3, r0, lsl #2
2398: e0833000 add r3, r3, r0
239c: e596c000 ldr ip, [r6]
23a0: e1a03103 lsl r3, r3, #2
23a4: e08ca003 add sl, ip, r3
rtems_libio_check_is_open(iop);
23a8: e59a900c ldr r9, [sl, #12]
23ac: e3190c01 tst r9, #256 ; 0x100
23b0: 0a000068 beq 2558 <fcntl+0x1ec>
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
23b4: e3580009 cmp r8, #9 ; 0x9
23b8: 979ff108 ldrls pc, [pc, r8, lsl #2]
23bc: ea00002b b 2470 <fcntl+0x104>
23c0: 00002484 .word 0x00002484
23c4: 00002518 .word 0x00002518
23c8: 00002524 .word 0x00002524
23cc: 00002548 .word 0x00002548
23d0: 00002408 .word 0x00002408
23d4: 000023e8 .word 0x000023e8
23d8: 000023e8 .word 0x000023e8
23dc: 000023e8 .word 0x000023e8
23e0: 000023e8 .word 0x000023e8
23e4: 000023e8 .word 0x000023e8
errno = ENOTSUP;
ret = -1;
break;
case F_GETOWN: /* for sockets. */
errno = ENOTSUP;
23e8: eb003085 bl e604 <__errno>
23ec: e3a03086 mov r3, #134 ; 0x86
23f0: e5803000 str r3, [r0]
23f4: e3e06000 mvn r6, #0 ; 0x0
va_list ap;
va_start( ap, cmd );
ret = vfcntl(fd,cmd,ap);
va_end(ap);
return ret;
}
23f8: e1a00006 mov r0, r6
23fc: e8bd4ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, lr}
2400: e28dd00c add sp, sp, #12 ; 0xc
2404: e12fff1e bx lr
case F_GETFL: /* more flags (cloexec) */
ret = rtems_libio_to_fcntl_flags( iop->flags );
break;
case F_SETFL:
flags = rtems_libio_fcntl_flags( va_arg( ap, int ) );
2408: e5910000 ldr r0, [r1]
240c: eb000253 bl 2d60 <rtems_libio_fcntl_flags>
/*
* XXX If we are turning on append, should we seek to the end?
*/
iop->flags = (iop->flags & ~mask) | (flags & mask);
2410: e59a300c ldr r3, [sl, #12]
2414: e3c00f7f bic r0, r0, #508 ; 0x1fc
2418: e3c00002 bic r0, r0, #2 ; 0x2
241c: e1a00b00 lsl r0, r0, #22
2420: e3c33c02 bic r3, r3, #512 ; 0x200
2424: e1a00b20 lsr r0, r0, #22
2428: e3c33001 bic r3, r3, #1 ; 0x1
242c: e1800003 orr r0, r0, r3
2430: e58a000c str r0, [sl, #12]
2434: e3a06000 mov r6, #0 ; 0x0
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
if (iop->handlers->fcntl_h) {
2438: e59a3030 ldr r3, [sl, #48]
243c: e5933030 ldr r3, [r3, #48]
2440: e3530000 cmp r3, #0 ; 0x0
2444: 0affffeb beq 23f8 <fcntl+0x8c>
int err = (*iop->handlers->fcntl_h)( cmd, iop );
2448: e1a00008 mov r0, r8
244c: e1a0100a mov r1, sl
2450: e1a0e00f mov lr, pc
2454: e12fff13 bx r3
if (err) {
2458: e2504000 subs r4, r0, #0 ; 0x0
245c: 0affffe5 beq 23f8 <fcntl+0x8c>
errno = err;
2460: eb003067 bl e604 <__errno> <== NOT EXECUTED
2464: e3e06000 mvn r6, #0 ; 0x0 <== NOT EXECUTED
2468: e5804000 str r4, [r0] <== NOT EXECUTED
246c: eaffffe1 b 23f8 <fcntl+0x8c> <== NOT EXECUTED
errno = ENOTSUP;
ret = -1;
break;
default:
errno = EINVAL;
2470: eb003063 bl e604 <__errno>
2474: e3a03016 mov r3, #22 ; 0x16
2478: e5803000 str r3, [r0]
247c: e3e06000 mvn r6, #0 ; 0x0
2480: eaffffdc b 23f8 <fcntl+0x8c>
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
2484: e5910000 ldr r0, [r1]
if ( fd2 )
2488: e3500000 cmp r0, #0 ; 0x0
248c: 0a000036 beq 256c <fcntl+0x200>
diop = rtems_libio_iop( fd2 );
2490: e1520000 cmp r2, r0 <== NOT EXECUTED
2494: 81a03200 lslhi r3, r0, #4 <== NOT EXECUTED
2498: 80433100 subhi r3, r3, r0, lsl #2 <== NOT EXECUTED
249c: 80833000 addhi r3, r3, r0 <== NOT EXECUTED
24a0: 81a03103 lslhi r3, r3, #2 <== NOT EXECUTED
24a4: 93a0b000 movls fp, #0 ; 0x0 <== NOT EXECUTED
24a8: 808cb003 addhi fp, ip, r3 <== NOT EXECUTED
24ac: 91a0300b movls r3, fp <== NOT EXECUTED
24b0: 81a0300b movhi r3, fp <== NOT EXECUTED
diop->handlers = iop->handlers;
diop->file_info = iop->file_info;
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
ret = (int) (diop - rtems_libio_iops);
24b4: e5966000 ldr r6, [r6]
24b8: e0666003 rsb r6, r6, r3
24bc: e1a06146 asr r6, r6, #2
24c0: e1a03306 lsl r3, r6, #6
24c4: e0433106 sub r3, r3, r6, lsl #2
24c8: e1a05303 lsl r5, r3, #6
24cc: e0635005 rsb r5, r3, r5
24d0: e1a02605 lsl r2, r5, #12
}
diop->handlers = iop->handlers;
diop->file_info = iop->file_info;
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
24d4: e28a4010 add r4, sl, #16 ; 0x10
ret = (int) (diop - rtems_libio_iops);
24d8: e0855002 add r5, r5, r2
}
diop->handlers = iop->handlers;
diop->file_info = iop->file_info;
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
24dc: e894000f ldm r4, {r0, r1, r2, r3}
24e0: e28bc010 add ip, fp, #16 ; 0x10
ret = (int) (diop - rtems_libio_iops);
24e4: e0855006 add r5, r5, r6
ret = -1;
break;
}
}
diop->handlers = iop->handlers;
24e8: e59a7030 ldr r7, [sl, #48]
diop->file_info = iop->file_info;
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
24ec: e88c000f stm ip, {r0, r1, r2, r3}
break;
}
}
diop->handlers = iop->handlers;
diop->file_info = iop->file_info;
24f0: e59a302c ldr r3, [sl, #44]
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
ret = (int) (diop - rtems_libio_iops);
24f4: e1a05205 lsl r5, r5, #4
24f8: e0665005 rsb r5, r6, r5
ret = -1;
break;
}
}
diop->handlers = iop->handlers;
24fc: e58b7030 str r7, [fp, #48]
diop->file_info = iop->file_info;
2500: e58b302c str r3, [fp, #44]
diop->flags = iop->flags;
2504: e58b900c str r9, [fp, #12]
diop->pathinfo = iop->pathinfo;
ret = (int) (diop - rtems_libio_iops);
2508: e0466105 sub r6, r6, r5, lsl #2
/*
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
250c: e3560000 cmp r6, #0 ; 0x0
2510: aaffffc8 bge 2438 <fcntl+0xcc>
2514: eaffffb7 b 23f8 <fcntl+0x8c> <== NOT EXECUTED
diop->pathinfo = iop->pathinfo;
ret = (int) (diop - rtems_libio_iops);
break;
case F_GETFD: /* get f_flags */
ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0);
2518: e1a035a9 lsr r3, r9, #11
251c: e2036001 and r6, r3, #1 ; 0x1
2520: eaffffc4 b 2438 <fcntl+0xcc>
* 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 ) )
2524: e5910000 ldr r0, [r1]
2528: e3500000 cmp r0, #0 ; 0x0
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
252c: 13893b02 orrne r3, r9, #2048 ; 0x800
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
2530: 03c93b02 biceq r3, r9, #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;
2534: 158a300c strne r3, [sl, #12]
2538: 13a06000 movne r6, #0 ; 0x0
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
253c: 058a300c streq r3, [sl, #12]
2540: 01a06000 moveq r6, r0
2544: eaffffbb b 2438 <fcntl+0xcc>
break;
case F_GETFL: /* more flags (cloexec) */
ret = rtems_libio_to_fcntl_flags( iop->flags );
2548: e1a00009 mov r0, r9
254c: eb00014f bl 2a90 <rtems_libio_to_fcntl_flags>
2550: e1a06000 mov r6, r0
2554: eaffffec b 250c <fcntl+0x1a0>
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
2558: eb003029 bl e604 <__errno> <== NOT EXECUTED
255c: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED
2560: e5803000 str r3, [r0] <== NOT EXECUTED
2564: e3e06000 mvn r6, #0 ; 0x0 <== NOT EXECUTED
2568: eaffffa2 b 23f8 <fcntl+0x8c> <== NOT EXECUTED
fd2 = va_arg( ap, int );
if ( fd2 )
diop = rtems_libio_iop( fd2 );
else {
/* allocate a file control block */
diop = rtems_libio_allocate();
256c: eb0001b7 bl 2c50 <rtems_libio_allocate>
if ( diop == 0 ) {
2570: e250b000 subs fp, r0, #0 ; 0x0
2574: 159a900c ldrne r9, [sl, #12]
2578: 11a0300b movne r3, fp
257c: 1affffcc bne 24b4 <fcntl+0x148>
if (ret >= 0) {
if (iop->handlers->fcntl_h) {
int err = (*iop->handlers->fcntl_h)( cmd, iop );
if (err) {
errno = err;
2580: e3e06000 mvn r6, #0 ; 0x0 <== NOT EXECUTED
2584: eaffff9b b 23f8 <fcntl+0x8c> <== NOT EXECUTED
000025a0 <fdatasync>:
int fd
)
{
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
25a0: e59f3080 ldr r3, [pc, #128] ; 2628 <fdatasync+0x88>
25a4: e5932000 ldr r2, [r3]
25a8: e1500002 cmp r0, r2
#include <rtems/seterr.h>
int fdatasync(
int fd
)
{
25ac: e52de004 push {lr} ; (str lr, [sp, #-4]!)
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
25b0: 2a000012 bcs 2600 <fdatasync+0x60>
iop = rtems_libio_iop( fd );
25b4: e1a03200 lsl r3, r0, #4
25b8: e59f206c ldr r2, [pc, #108] ; 262c <fdatasync+0x8c>
25bc: e0433100 sub r3, r3, r0, lsl #2
25c0: e0833000 add r3, r3, r0
25c4: e5921000 ldr r1, [r2]
25c8: e1a03103 lsl r3, r3, #2
25cc: e0810003 add r0, r1, r3
rtems_libio_check_is_open(iop);
25d0: e590300c ldr r3, [r0, #12]
25d4: e3130c01 tst r3, #256 ; 0x100
25d8: 0a000008 beq 2600 <fdatasync+0x60>
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
25dc: e3130004 tst r3, #4 ; 0x4
25e0: 0a000006 beq 2600 <fdatasync+0x60>
/*
* Now process the fdatasync().
*/
if ( !iop->handlers->fdatasync_h )
25e4: e5903030 ldr r3, [r0, #48]
25e8: e593302c ldr r3, [r3, #44]
25ec: e3530000 cmp r3, #0 ; 0x0
25f0: 0a000007 beq 2614 <fdatasync+0x74>
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->fdatasync_h)( iop );
25f4: e1a0e00f mov lr, pc <== NOT EXECUTED
25f8: e12fff13 bx r3 <== NOT EXECUTED
}
25fc: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
2600: eb002fff bl e604 <__errno>
2604: e3a03009 mov r3, #9 ; 0x9
2608: e5803000 str r3, [r0]
260c: e3e00000 mvn r0, #0 ; 0x0
2610: e49df004 pop {pc} ; (ldr pc, [sp], #4)
/*
* Now process the fdatasync().
*/
if ( !iop->handlers->fdatasync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
2614: eb002ffa bl e604 <__errno>
2618: e3a03086 mov r3, #134 ; 0x86
261c: e5803000 str r3, [r0]
2620: e3e00000 mvn r0, #0 ; 0x0
2624: e49df004 pop {pc} ; (ldr pc, [sp], #4)
00005d90 <file_systems_below_this_mountpoint>:
/*
* Search the mount table for any mount entries referencing this
* mount entry.
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
5d90: e59f0044 ldr r0, [pc, #68] ; 5ddc <file_systems_below_this_mountpoint+0x4c><== NOT EXECUTED
5d94: e4902004 ldr r2, [r0], #4 <== NOT EXECUTED
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node );
5d98: e1520000 cmp r2, r0 <== NOT EXECUTED
5d9c: 0a00000a beq 5dcc <file_systems_below_this_mountpoint+0x3c><== NOT EXECUTED
the_node = the_node->next ) {
the_mount_entry = ( rtems_filesystem_mount_table_entry_t * )the_node;
if (the_mount_entry->mt_point_node.mt_entry == fs_root_loc->mt_entry ) {
5da0: e591100c ldr r1, [r1, #12] <== NOT EXECUTED
5da4: e5923014 ldr r3, [r2, #20] <== NOT EXECUTED
5da8: e1530001 cmp r3, r1 <== NOT EXECUTED
5dac: 1a000003 bne 5dc0 <file_systems_below_this_mountpoint+0x30><== NOT EXECUTED
5db0: ea000007 b 5dd4 <file_systems_below_this_mountpoint+0x44> <== NOT EXECUTED
5db4: e5923014 ldr r3, [r2, #20] <== NOT EXECUTED
5db8: e1530001 cmp r3, r1 <== NOT EXECUTED
5dbc: 0a000004 beq 5dd4 <file_systems_below_this_mountpoint+0x44><== NOT EXECUTED
* mount entry.
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node );
the_node = the_node->next ) {
5dc0: e5922000 ldr r2, [r2] <== NOT EXECUTED
* Search the mount table for any mount entries referencing this
* mount entry.
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node );
5dc4: e1520000 cmp r2, r0 <== NOT EXECUTED
5dc8: 1afffff9 bne 5db4 <file_systems_below_this_mountpoint+0x24><== NOT EXECUTED
5dcc: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
return true;
}
}
return false;
}
5dd0: e12fff1e bx lr <== NOT EXECUTED
* Search the mount table for any mount entries referencing this
* mount entry.
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node );
5dd4: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED
5dd8: e12fff1e bx lr <== NOT EXECUTED
00002630 <fpathconf>:
{
long return_value;
rtems_libio_t *iop;
rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
2630: e59f3100 ldr r3, [pc, #256] ; 2738 <fpathconf+0x108>
2634: e5932000 ldr r2, [r3]
2638: e1500002 cmp r0, r2
long fpathconf(
int fd,
int name
)
{
263c: e52de004 push {lr} ; (str lr, [sp, #-4]!)
2640: e1a0c001 mov ip, r1
long return_value;
rtems_libio_t *iop;
rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
2644: 2a000036 bcs 2724 <fpathconf+0xf4>
iop = rtems_libio_iop(fd);
2648: e1a03200 lsl r3, r0, #4
264c: e59f20e8 ldr r2, [pc, #232] ; 273c <fpathconf+0x10c>
2650: e0433100 sub r3, r3, r0, lsl #2
2654: e0833000 add r3, r3, r0
2658: e5921000 ldr r1, [r2]
265c: e1a03103 lsl r3, r3, #2
2660: e0810003 add r0, r1, r3
rtems_libio_check_is_open(iop);
2664: e590200c ldr r2, [r0, #12]
2668: e3120c01 tst r2, #256 ; 0x100
266c: 0a00002c beq 2724 <fpathconf+0xf4>
/*
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
2670: e590001c ldr r0, [r0, #28]
switch ( name ) {
2674: e35c000b cmp ip, #11 ; 0xb
2678: 979ff10c ldrls pc, [pc, ip, lsl #2]
267c: ea00000b b 26b0 <fpathconf+0x80>
2680: 000026c4 .word 0x000026c4
2684: 000026cc .word 0x000026cc
2688: 000026d4 .word 0x000026d4
268c: 000026dc .word 0x000026dc
2690: 000026e4 .word 0x000026e4
2694: 000026ec .word 0x000026ec
2698: 000026f4 .word 0x000026f4
269c: 000026fc .word 0x000026fc
26a0: 00002704 .word 0x00002704
26a4: 0000270c .word 0x0000270c
26a8: 00002714 .word 0x00002714
26ac: 0000271c .word 0x0000271c
break;
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
26b0: eb002fd3 bl e604 <__errno>
26b4: e3a03016 mov r3, #22 ; 0x16
26b8: e5803000 str r3, [r0]
26bc: e3e00000 mvn r0, #0 ; 0x0
break;
}
return return_value;
}
26c0: e49df004 pop {pc} ; (ldr pc, [sp], #4)
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
switch ( name ) {
case _PC_LINK_MAX:
return_value = the_limits->link_max;
26c4: e5900030 ldr r0, [r0, #48]
26c8: e49df004 pop {pc} ; (ldr pc, [sp], #4)
break;
case _PC_MAX_CANON:
return_value = the_limits->max_canon;
26cc: e5900034 ldr r0, [r0, #52]
26d0: e49df004 pop {pc} ; (ldr pc, [sp], #4)
break;
case _PC_MAX_INPUT:
return_value = the_limits->max_input;
26d4: e5900038 ldr r0, [r0, #56]
26d8: e49df004 pop {pc} ; (ldr pc, [sp], #4)
break;
case _PC_NAME_MAX:
return_value = the_limits->name_max;
26dc: e590003c ldr r0, [r0, #60]
26e0: e49df004 pop {pc} ; (ldr pc, [sp], #4)
break;
case _PC_PATH_MAX:
return_value = the_limits->path_max;
26e4: e5900040 ldr r0, [r0, #64]
26e8: e49df004 pop {pc} ; (ldr pc, [sp], #4)
break;
case _PC_PIPE_BUF:
return_value = the_limits->pipe_buf;
26ec: e5900044 ldr r0, [r0, #68]
26f0: e49df004 pop {pc} ; (ldr pc, [sp], #4)
break;
case _PC_CHOWN_RESTRICTED:
return_value = the_limits->posix_chown_restrictions;
26f4: e590004c ldr r0, [r0, #76]
26f8: e49df004 pop {pc} ; (ldr pc, [sp], #4)
break;
case _PC_NO_TRUNC:
return_value = the_limits->posix_no_trunc;
26fc: e5900050 ldr r0, [r0, #80]
2700: e49df004 pop {pc} ; (ldr pc, [sp], #4)
break;
case _PC_VDISABLE:
return_value = the_limits->posix_vdisable;
2704: e590005c ldr r0, [r0, #92]
2708: e49df004 pop {pc} ; (ldr pc, [sp], #4)
break;
case _PC_ASYNC_IO:
return_value = the_limits->posix_async_io;
270c: e5900048 ldr r0, [r0, #72]
2710: e49df004 pop {pc} ; (ldr pc, [sp], #4)
break;
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
2714: e5900054 ldr r0, [r0, #84]
2718: e49df004 pop {pc} ; (ldr pc, [sp], #4)
break;
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
271c: e5900058 ldr r0, [r0, #88]
2720: e49df004 pop {pc} ; (ldr pc, [sp], #4)
rtems_libio_t *iop;
rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
iop = rtems_libio_iop(fd);
rtems_libio_check_is_open(iop);
2724: eb002fb6 bl e604 <__errno>
2728: e3a03009 mov r3, #9 ; 0x9
272c: e5803000 str r3, [r0]
2730: e3e00000 mvn r0, #0 ; 0x0
2734: e49df004 pop {pc} ; (ldr pc, [sp], #4)
000090a8 <free>:
void free(
void *ptr
)
{
MSBUMP(free_calls, 1);
90a8: e59f2084 ldr r2, [pc, #132] ; 9134 <free+0x8c>
90ac: e592300c ldr r3, [r2, #12]
90b0: e92d4030 push {r4, r5, lr}
90b4: e2833001 add r3, r3, #1 ; 0x1
if ( !ptr )
90b8: e2505000 subs r5, r0, #0 ; 0x0
void free(
void *ptr
)
{
MSBUMP(free_calls, 1);
90bc: e582300c str r3, [r2, #12]
if ( !ptr )
90c0: 08bd8030 popeq {r4, r5, pc}
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
90c4: e59f306c ldr r3, [pc, #108] ; 9138 <free+0x90>
90c8: e5932000 ldr r2, [r3]
90cc: e3520003 cmp r2, #3 ; 0x3
90d0: 0a000011 beq 911c <free+0x74>
#endif
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
90d4: e59f3060 ldr r3, [pc, #96] ; 913c <free+0x94>
90d8: e5933000 ldr r3, [r3]
90dc: e3530000 cmp r3, #0 ; 0x0
(*rtems_malloc_statistics_helpers->at_free)(ptr);
90e0: 11a00005 movne r0, r5
90e4: 11a0e00f movne lr, pc
90e8: 1593f008 ldrne pc, [r3, #8]
if ( !_Protected_heap_Free( &RTEMS_Malloc_Heap, ptr ) ) {
90ec: e59f404c ldr r4, [pc, #76] ; 9140 <free+0x98>
90f0: e1a01005 mov r1, r5
90f4: e1a00004 mov r0, r4
90f8: eb0006d5 bl ac54 <_Protected_heap_Free>
90fc: e3500000 cmp r0, #0 ; 0x0
9100: 18bd8030 popne {r4, r5, pc}
printk( "Program heap: free of bad pointer %p -- range %p - %p \n",
9104: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
9108: e59f0034 ldr r0, [pc, #52] ; 9144 <free+0x9c> <== NOT EXECUTED
910c: e5942018 ldr r2, [r4, #24] <== NOT EXECUTED
9110: e1a01005 mov r1, r5 <== NOT EXECUTED
RTEMS_Malloc_Heap.begin,
RTEMS_Malloc_Heap.end
);
}
}
9114: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED
*/
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_free)(ptr);
if ( !_Protected_heap_Free( &RTEMS_Malloc_Heap, ptr ) ) {
printk( "Program heap: free of bad pointer %p -- range %p - %p \n",
9118: eaffe416 b 2178 <printk> <== NOT EXECUTED
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
911c: eb000131 bl 95e8 <malloc_is_system_state_OK>
9120: e3500000 cmp r0, #0 ; 0x0
9124: 1affffea bne 90d4 <free+0x2c>
!malloc_is_system_state_OK() ) {
malloc_deferred_free(ptr);
9128: e1a00005 mov r0, r5 <== NOT EXECUTED
RTEMS_Malloc_Heap.begin,
RTEMS_Malloc_Heap.end
);
}
}
912c: 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);
9130: ea00013f b 9634 <malloc_deferred_free> <== NOT EXECUTED
00002d5c <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
2d5c: e59f3058 ldr r3, [pc, #88] ; 2dbc <free_user_env+0x60> <== NOT EXECUTED
2d60: e1500003 cmp r0, r3 <== NOT EXECUTED
* NOTE: this must be called with
* thread dispatching disabled!
*/
static void
free_user_env(void *venv)
{
2d64: e92d4010 push {r4, lr} <== NOT EXECUTED
2d68: e1a04000 mov r4, r0 <== NOT EXECUTED
rtems_user_env_t *env = (rtems_user_env_t*) venv ;
if (env != &rtems_global_user_env
2d6c: 08bd8010 popeq {r4, pc} <== NOT EXECUTED
#ifdef HAVE_USERENV_REFCNT
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
2d70: e590300c ldr r3, [r0, #12] <== NOT EXECUTED
2d74: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
2d78: 0a000004 beq 2d90 <free_user_env+0x34> <== NOT EXECUTED
2d7c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
2d80: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
2d84: 12800004 addne r0, r0, #4 ; 0x4 <== NOT EXECUTED
2d88: 11a0e00f movne lr, pc <== NOT EXECUTED
2d8c: 112fff13 bxne r3 <== NOT EXECUTED
rtems_filesystem_freenode( &env->root_directory);
2d90: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
2d94: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
2d98: 0a000004 beq 2db0 <free_user_env+0x54> <== NOT EXECUTED
2d9c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
2da0: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
2da4: 12840014 addne r0, r4, #20 ; 0x14 <== NOT EXECUTED
2da8: 11a0e00f movne lr, pc <== NOT EXECUTED
2dac: 112fff13 bxne r3 <== NOT EXECUTED
free(env);
2db0: e1a00004 mov r0, r4 <== NOT EXECUTED
}
}
2db4: e8bd4010 pop {r4, lr} <== NOT EXECUTED
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
rtems_filesystem_freenode( &env->root_directory);
free(env);
2db8: eafffb54 b 1b10 <free> <== NOT EXECUTED
0001457c <fstat>:
int fstat(
int fd,
struct stat *sbuf
)
{
1457c: e92d4030 push {r4, r5, lr}
/*
* Check to see if we were passed a valid pointer.
*/
if ( !sbuf )
14580: e2515000 subs r5, r1, #0 ; 0x0
14584: 0a000027 beq 14628 <fstat+0xac>
/*
* Now process the stat() request.
*/
iop = rtems_libio_iop( fd );
14588: e59f30ac ldr r3, [pc, #172] ; 1463c <fstat+0xc0>
1458c: e5932000 ldr r2, [r3]
14590: e1500002 cmp r0, r2
14594: 2a000019 bcs 14600 <fstat+0x84>
14598: e59f20a0 ldr r2, [pc, #160] ; 14640 <fstat+0xc4>
1459c: e1a03200 lsl r3, r0, #4
145a0: e0433100 sub r3, r3, r0, lsl #2
145a4: e5921000 ldr r1, [r2]
145a8: e0833000 add r3, r3, r0
145ac: e1a03103 lsl r3, r3, #2
145b0: e0814003 add r4, r1, r3
rtems_libio_check_fd( fd );
rtems_libio_check_is_open(iop);
145b4: e594200c ldr r2, [r4, #12]
145b8: e3120c01 tst r2, #256 ; 0x100
145bc: 0a00000f beq 14600 <fstat+0x84>
if ( !iop->handlers )
145c0: e5943030 ldr r3, [r4, #48]
145c4: e3530000 cmp r3, #0 ; 0x0
145c8: 0a00000c beq 14600 <fstat+0x84>
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->fstat_h )
145cc: e5933018 ldr r3, [r3, #24]
145d0: e3530000 cmp r3, #0 ; 0x0
145d4: 0a00000e beq 14614 <fstat+0x98>
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
145d8: e3a01000 mov r1, #0 ; 0x0
145dc: e3a0204c mov r2, #76 ; 0x4c
145e0: e1a00005 mov r0, r5
145e4: ebffe08f bl c828 <memset>
return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf );
145e8: e2840010 add r0, r4, #16 ; 0x10
145ec: e1a01005 mov r1, r5
145f0: e5943030 ldr r3, [r4, #48]
145f4: e1a0e00f mov lr, pc
145f8: e593f018 ldr pc, [r3, #24]
}
145fc: e8bd8030 pop {r4, r5, pc}
iop = rtems_libio_iop( fd );
rtems_libio_check_fd( fd );
rtems_libio_check_is_open(iop);
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
14600: ebffde7f bl c004 <__errno>
14604: e3a03009 mov r3, #9 ; 0x9
14608: e5803000 str r3, [r0]
1460c: e3e00000 mvn r0, #0 ; 0x0
14610: e8bd8030 pop {r4, r5, pc}
if ( !iop->handlers->fstat_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
14614: ebffde7a bl c004 <__errno> <== NOT EXECUTED
14618: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
1461c: e5803000 str r3, [r0] <== NOT EXECUTED
14620: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
14624: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
/*
* Check to see if we were passed a valid pointer.
*/
if ( !sbuf )
rtems_set_errno_and_return_minus_one( EFAULT );
14628: ebffde75 bl c004 <__errno>
1462c: e3a0300e mov r3, #14 ; 0xe
14630: e5803000 str r3, [r0]
14634: e3e00000 mvn r0, #0 ; 0x0
14638: e8bd8030 pop {r4, r5, pc}
000028b4 <fsync>:
int fd
)
{
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
28b4: e59f3080 ldr r3, [pc, #128] ; 293c <fsync+0x88>
28b8: e5932000 ldr r2, [r3]
28bc: e1500002 cmp r0, r2
#include <rtems/seterr.h>
int fsync(
int fd
)
{
28c0: e52de004 push {lr} ; (str lr, [sp, #-4]!)
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
28c4: 2a000012 bcs 2914 <fsync+0x60>
iop = rtems_libio_iop( fd );
28c8: e1a03200 lsl r3, r0, #4
28cc: e59f206c ldr r2, [pc, #108] ; 2940 <fsync+0x8c>
28d0: e0433100 sub r3, r3, r0, lsl #2
28d4: e0833000 add r3, r3, r0
28d8: e5921000 ldr r1, [r2]
28dc: e1a03103 lsl r3, r3, #2
28e0: e0810003 add r0, r1, r3
rtems_libio_check_is_open(iop);
28e4: e590200c ldr r2, [r0, #12]
28e8: e3120c01 tst r2, #256 ; 0x100
28ec: 0a000008 beq 2914 <fsync+0x60>
/*
* Now process the fsync().
*/
if ( !iop->handlers )
28f0: e5902030 ldr r2, [r0, #48]
28f4: e3520000 cmp r2, #0 ; 0x0
28f8: 0a000005 beq 2914 <fsync+0x60>
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->fsync_h )
28fc: e5922028 ldr r2, [r2, #40]
2900: e3520000 cmp r2, #0 ; 0x0
2904: 0a000007 beq 2928 <fsync+0x74>
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->fsync_h)( iop );
2908: e1a0e00f mov lr, pc
290c: e12fff12 bx r2
}
2910: e49df004 pop {pc} ; (ldr pc, [sp], #4)
/*
* Now process the fsync().
*/
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
2914: eb002f3a bl e604 <__errno> <== NOT EXECUTED
2918: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED
291c: e5803000 str r3, [r0] <== NOT EXECUTED
2920: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
2924: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
if ( !iop->handlers->fsync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
2928: eb002f35 bl e604 <__errno>
292c: e3a03086 mov r3, #134 ; 0x86
2930: e5803000 str r3, [r0]
2934: e3e00000 mvn r0, #0 ; 0x0
2938: e49df004 pop {pc} ; (ldr pc, [sp], #4)
00009148 <ftruncate>:
int ftruncate(
int fd,
off_t length
)
{
9148: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
914c: e59f30e8 ldr r3, [pc, #232] ; 923c <ftruncate+0xf4> <== NOT EXECUTED
9150: e5932000 ldr r2, [r3] <== NOT EXECUTED
9154: e1500002 cmp r0, r2 <== NOT EXECUTED
int ftruncate(
int fd,
off_t length
)
{
9158: e24dd010 sub sp, sp, #16 ; 0x10 <== NOT EXECUTED
915c: e1a05001 mov r5, r1 <== NOT EXECUTED
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
9160: 2a000021 bcs 91ec <ftruncate+0xa4> <== NOT EXECUTED
iop = rtems_libio_iop( fd );
9164: e59f20d4 ldr r2, [pc, #212] ; 9240 <ftruncate+0xf8> <== NOT EXECUTED
9168: e1a03200 lsl r3, r0, #4 <== NOT EXECUTED
916c: e0433100 sub r3, r3, r0, lsl #2 <== NOT EXECUTED
9170: e5921000 ldr r1, [r2] <== NOT EXECUTED
9174: e0833000 add r3, r3, r0 <== NOT EXECUTED
9178: e1a03103 lsl r3, r3, #2 <== NOT EXECUTED
917c: e0814003 add r4, r1, r3 <== NOT EXECUTED
rtems_libio_check_is_open(iop);
9180: e594200c ldr r2, [r4, #12] <== NOT EXECUTED
9184: e3120c01 tst r2, #256 ; 0x100 <== NOT EXECUTED
9188: 0a000017 beq 91ec <ftruncate+0xa4> <== NOT EXECUTED
/*
* Make sure we are not working on a directory
*/
loc = iop->pathinfo;
918c: e284c010 add ip, r4, #16 ; 0x10 <== NOT EXECUTED
9190: e89c000f ldm ip, {r0, r1, r2, r3} <== NOT EXECUTED
9194: e88d000f stm sp, {r0, r1, r2, r3} <== NOT EXECUTED
if ( !loc.ops->node_type_h )
9198: e5923010 ldr r3, [r2, #16] <== NOT EXECUTED
919c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
91a0: 0a00001b beq 9214 <ftruncate+0xcc> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
91a4: e1a0000d mov r0, sp <== NOT EXECUTED
91a8: e1a0e00f mov lr, pc <== NOT EXECUTED
91ac: e12fff13 bx r3 <== NOT EXECUTED
91b0: e3500001 cmp r0, #1 ; 0x1 <== NOT EXECUTED
91b4: 0a00001b beq 9228 <ftruncate+0xe0> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EISDIR );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
91b8: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
91bc: e3130004 tst r3, #4 ; 0x4 <== NOT EXECUTED
91c0: 0a00000e beq 9200 <ftruncate+0xb8> <== NOT EXECUTED
if ( !iop->handlers->ftruncate_h )
91c4: e5943030 ldr r3, [r4, #48] <== NOT EXECUTED
91c8: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
91cc: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
91d0: 0a00000f beq 9214 <ftruncate+0xcc> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->ftruncate_h)( iop, length );
91d4: e1a00004 mov r0, r4 <== NOT EXECUTED
91d8: e1a01005 mov r1, r5 <== NOT EXECUTED
91dc: e1a0e00f mov lr, pc <== NOT EXECUTED
91e0: e12fff13 bx r3 <== NOT EXECUTED
}
91e4: e28dd010 add sp, sp, #16 ; 0x10 <== NOT EXECUTED
91e8: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
91ec: eb000b84 bl c004 <__errno> <== NOT EXECUTED
91f0: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED
91f4: e5803000 str r3, [r0] <== NOT EXECUTED
91f8: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
91fc: eafffff8 b 91e4 <ftruncate+0x9c> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( EISDIR );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
9200: eb000b7f bl c004 <__errno> <== NOT EXECUTED
9204: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED
9208: e5803000 str r3, [r0] <== NOT EXECUTED
920c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
9210: eafffff3 b 91e4 <ftruncate+0x9c> <== NOT EXECUTED
if ( !iop->handlers->ftruncate_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
9214: eb000b7a bl c004 <__errno> <== NOT EXECUTED
9218: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
921c: e5803000 str r3, [r0] <== NOT EXECUTED
9220: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
9224: eaffffee b 91e4 <ftruncate+0x9c> <== NOT EXECUTED
loc = iop->pathinfo;
if ( !loc.ops->node_type_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( EISDIR );
9228: eb000b75 bl c004 <__errno> <== NOT EXECUTED
922c: e3a03015 mov r3, #21 ; 0x15 <== NOT EXECUTED
9230: e5803000 str r3, [r0] <== NOT EXECUTED
9234: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
9238: eaffffe9 b 91e4 <ftruncate+0x9c> <== NOT EXECUTED
0000b69c <getdents>:
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
b69c: e59f30b4 ldr r3, [pc, #180] ; b758 <getdents+0xbc>
b6a0: e593c000 ldr ip, [r3]
b6a4: e150000c cmp r0, ip
b6a8: 31a03200 lslcc r3, r0, #4
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
b6ac: e92d4070 push {r4, r5, r6, lr}
b6b0: e1a06002 mov r6, r2
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
b6b4: 359f20a0 ldrcc r2, [pc, #160] ; b75c <getdents+0xc0>
b6b8: 30433100 subcc r3, r3, r0, lsl #2
b6bc: 30833000 addcc r3, r3, r0
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
b6c0: e1a05001 mov r5, r1
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
b6c4: 35921000 ldrcc r1, [r2]
b6c8: 31a03103 lslcc r3, r3, #2
b6cc: 30814003 addcc r4, r1, r3
b6d0: 23a04000 movcs r4, #0 ; 0x0
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
b6d4: e284c010 add ip, r4, #16 ; 0x10
b6d8: e89c000f ldm ip, {r0, r1, r2, r3}
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
b6dc: e24dd010 sub sp, sp, #16 ; 0x10
iop = rtems_libio_iop( dd_fd );
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
b6e0: e88d000f stm sp, {r0, r1, r2, r3}
if ( !loc.ops->node_type_h )
b6e4: e5923010 ldr r3, [r2, #16]
b6e8: e3530000 cmp r3, #0 ; 0x0
b6ec: 0a000014 beq b744 <getdents+0xa8>
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
b6f0: e1a0000d mov r0, sp
b6f4: e1a0e00f mov lr, pc
b6f8: e12fff13 bx r3
b6fc: e3500001 cmp r0, #1 ; 0x1
b700: 1a00000a bne b730 <getdents+0x94>
/*
* Return the number of bytes that were actually transfered as a result
* of the read attempt.
*/
if ( !iop->handlers->read_h )
b704: e5943030 ldr r3, [r4, #48]
b708: e5933008 ldr r3, [r3, #8]
b70c: e3530000 cmp r3, #0 ; 0x0
b710: 0a00000b beq b744 <getdents+0xa8>
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->read_h)( iop, dd_buf, dd_len );
b714: e1a00004 mov r0, r4
b718: e1a01005 mov r1, r5
b71c: e1a02006 mov r2, r6
b720: e1a0e00f mov lr, pc
b724: e12fff13 bx r3
}
b728: e28dd010 add sp, sp, #16 ; 0x10
b72c: e8bd8070 pop {r4, r5, r6, pc}
loc = iop->pathinfo;
if ( !loc.ops->node_type_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
b730: eb000e0f bl ef74 <__errno>
b734: e3a03014 mov r3, #20 ; 0x14
b738: e5803000 str r3, [r0]
b73c: e3e00000 mvn r0, #0 ; 0x0
b740: eafffff8 b b728 <getdents+0x8c>
* Return the number of bytes that were actually transfered as a result
* of the read attempt.
*/
if ( !iop->handlers->read_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
b744: eb000e0a bl ef74 <__errno> <== NOT EXECUTED
b748: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
b74c: e5803000 str r3, [r0] <== NOT EXECUTED
b750: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
b754: eafffff3 b b728 <getdents+0x8c> <== NOT EXECUTED
0000926c <gettimeofday>:
int gettimeofday(
struct timeval *tp,
void * __tz
)
{
926c: e92d4030 push {r4, r5, lr}
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp ) {
9270: e2505000 subs r5, r0, #0 ; 0x0
int gettimeofday(
struct timeval *tp,
void * __tz
)
{
9274: e24dd008 sub sp, sp, #8 ; 0x8
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp ) {
9278: 0a00000f beq 92bc <gettimeofday+0x50>
)
{
ISR_Level level;
struct timespec now;
_ISR_Disable(level);
927c: e10f4000 mrs r4, CPSR
9280: e38430c0 orr r3, r4, #192 ; 0xc0
9284: e129f003 msr CPSR_fc, r3
_TOD_Get( &now );
9288: e1a0000d mov r0, sp
928c: ebfff111 bl 56d8 <_TOD_Get>
_ISR_Enable(level);
9290: e129f004 msr CPSR_fc, r4
time->tv_sec = now.tv_sec;
9294: e59d3000 ldr r3, [sp]
9298: e5853000 str r3, [r5]
time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND;
929c: e59d2004 ldr r2, [sp, #4]
92a0: e59f1028 ldr r1, [pc, #40] ; 92d0 <gettimeofday+0x64>
92a4: e0830291 umull r0, r3, r1, r2
92a8: e1a03323 lsr r3, r3, #6
92ac: e5853004 str r3, [r5, #4]
92b0: e3a00000 mov r0, #0 ; 0x0
* with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X
* do it. This puts us in good company.
*/
return 0;
}
92b4: e28dd008 add sp, sp, #8 ; 0x8
92b8: e8bd8030 pop {r4, r5, pc}
void * __tz
)
{
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp ) {
errno = EFAULT;
92bc: eb000b50 bl c004 <__errno> <== NOT EXECUTED
92c0: e3a0300e mov r3, #14 ; 0xe <== NOT EXECUTED
92c4: e5803000 str r3, [r0] <== NOT EXECUTED
92c8: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
92cc: eafffff8 b 92b4 <gettimeofday+0x48> <== NOT EXECUTED
0000dac0 <imfs_dir_read>:
ssize_t imfs_dir_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
dac0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
int current_entry;
int first_entry;
int last_entry;
struct dirent tmp_dirent;
the_jnode = (IMFS_jnode_t *)iop->file_info;
dac4: e590302c ldr r3, [r0, #44]
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
dac8: e5936050 ldr r6, [r3, #80]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
dacc: e2833054 add r3, r3, #84 ; 0x54
ssize_t imfs_dir_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
dad0: e24ddf46 sub sp, sp, #280 ; 0x118
struct dirent tmp_dirent;
the_jnode = (IMFS_jnode_t *)iop->file_info;
the_chain = &the_jnode->info.directory.Entries;
if ( rtems_chain_is_empty( the_chain ) )
dad4: e1560003 cmp r6, r3
ssize_t imfs_dir_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
dad8: e58d1000 str r1, [sp]
dadc: e1a08000 mov r8, r0
dae0: e58d3008 str r3, [sp, #8]
dae4: e1a01002 mov r1, r2
struct dirent tmp_dirent;
the_jnode = (IMFS_jnode_t *)iop->file_info;
the_chain = &the_jnode->info.directory.Entries;
if ( rtems_chain_is_empty( the_chain ) )
dae8: 0a00003b beq dbdc <imfs_dir_read+0x11c>
bytes_transferred = 0;
first_entry = iop->offset;
/* protect against using sizes that are not exact multiples of the */
/* -dirent- size. These could result in unexpected results */
last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent);
daec: e59f30f0 ldr r3, [pc, #240] ; dbe4 <imfs_dir_read+0x124>
daf0: e0820193 umull r0, r2, r3, r1
daf4: e1a021a2 lsr r2, r2, #3
daf8: e1a03102 lsl r3, r2, #2
dafc: e1a01302 lsl r1, r2, #6
db00: e0833001 add r3, r3, r1
db04: e0623003 rsb r3, r2, r3
/* Move to the first of the desired directory entries */
the_node = the_chain->first;
bytes_transferred = 0;
first_entry = iop->offset;
db08: e5982008 ldr r2, [r8, #8]
/* protect against using sizes that are not exact multiples of the */
/* -dirent- size. These could result in unexpected results */
last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent);
db0c: e1a03103 lsl r3, r3, #2
db10: e083b002 add fp, r3, r2
/* The directory was not empty so try to move to the desired entry in chain*/
for (
current_entry = 0;
current_entry < last_entry;
db14: e35b0000 cmp fp, #0 ; 0x0
db18: c3a07000 movgt r7, #0 ; 0x0
}
if( current_entry >= first_entry ) {
/* Move the entry to the return buffer */
tmp_dirent.d_off = current_entry;
tmp_dirent.d_reclen = sizeof( struct dirent );
db1c: c3a094bf movgt r9, #-1090519040 ; 0xbf000000
the_jnode = (IMFS_jnode_t *) the_node;
tmp_dirent.d_ino = the_jnode->st_ino;
tmp_dirent.d_namlen = strlen( the_jnode->name );
db20: c3e0ac01 mvngt sl, #256 ; 0x100
/* Move to the first of the desired directory entries */
the_node = the_chain->first;
bytes_transferred = 0;
first_entry = iop->offset;
db24: e58d2004 str r2, [sp, #4]
}
if( current_entry >= first_entry ) {
/* Move the entry to the return buffer */
tmp_dirent.d_off = current_entry;
tmp_dirent.d_reclen = sizeof( struct dirent );
db28: c1a09b49 asrgt r9, r9, #22
the_jnode = (IMFS_jnode_t *) the_node;
tmp_dirent.d_ino = the_jnode->st_ino;
tmp_dirent.d_namlen = strlen( the_jnode->name );
db2c: c24aa001 subgt sl, sl, #1 ; 0x1
last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent);
/* The directory was not empty so try to move to the desired entry in chain*/
for (
current_entry = 0;
current_entry < last_entry;
db30: c1a05007 movgt r5, r7
db34: ca000007 bgt db58 <imfs_dir_read+0x98>
db38: ea000027 b dbdc <imfs_dir_read+0x11c> <== NOT EXECUTED
ssize_t imfs_dir_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
db3c: e2855f43 add r5, r5, #268 ; 0x10c
last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent);
/* The directory was not empty so try to move to the desired entry in chain*/
for (
current_entry = 0;
current_entry < last_entry;
db40: e15b0005 cmp fp, r5
);
iop->offset = iop->offset + sizeof(struct dirent);
bytes_transferred = bytes_transferred + sizeof( struct dirent );
}
the_node = the_node->next;
db44: e5966000 ldr r6, [r6]
last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent);
/* The directory was not empty so try to move to the desired entry in chain*/
for (
current_entry = 0;
current_entry < last_entry;
db48: da000020 ble dbd0 <imfs_dir_read+0x110>
current_entry = current_entry + sizeof(struct dirent) ){
if ( rtems_chain_is_tail( the_chain, the_node ) ){
db4c: e59d3008 ldr r3, [sp, #8]
db50: e1560003 cmp r6, r3
db54: 0a00001d beq dbd0 <imfs_dir_read+0x110>
/* entry in the read */
return bytes_transferred; /* Indicate that there are no more */
/* entries to return */
}
if( current_entry >= first_entry ) {
db58: e59d0004 ldr r0, [sp, #4]
db5c: e1500005 cmp r0, r5
db60: cafffff5 bgt db3c <imfs_dir_read+0x7c>
/* Move the entry to the return buffer */
tmp_dirent.d_off = current_entry;
db64: e58d5010 str r5, [sp, #16]
tmp_dirent.d_reclen = sizeof( struct dirent );
the_jnode = (IMFS_jnode_t *) the_node;
tmp_dirent.d_ino = the_jnode->st_ino;
db68: e5963038 ldr r3, [r6, #56]
tmp_dirent.d_namlen = strlen( the_jnode->name );
db6c: e286400c add r4, r6, #12 ; 0xc
}
if( current_entry >= first_entry ) {
/* Move the entry to the return buffer */
tmp_dirent.d_off = current_entry;
tmp_dirent.d_reclen = sizeof( struct dirent );
db70: e28d2f46 add r2, sp, #280 ; 0x118
the_jnode = (IMFS_jnode_t *) the_node;
tmp_dirent.d_ino = the_jnode->st_ino;
db74: e58d300c str r3, [sp, #12]
}
if( current_entry >= first_entry ) {
/* Move the entry to the return buffer */
tmp_dirent.d_off = current_entry;
tmp_dirent.d_reclen = sizeof( struct dirent );
db78: e3a03f43 mov r3, #268 ; 0x10c
db7c: e18230b9 strh r3, [r2, r9]
the_jnode = (IMFS_jnode_t *) the_node;
tmp_dirent.d_ino = the_jnode->st_ino;
tmp_dirent.d_namlen = strlen( the_jnode->name );
db80: e1a00004 mov r0, r4
db84: eb000a9d bl 10600 <strlen>
db88: e28d2f46 add r2, sp, #280 ; 0x118
db8c: e18200ba strh r0, [r2, sl]
strcpy( tmp_dirent.d_name, the_jnode->name );
db90: e1a01004 mov r1, r4
db94: e28d0018 add r0, sp, #24 ; 0x18
db98: eb000a56 bl 104f8 <strcpy>
memcpy(
db9c: e59d3000 ldr r3, [sp]
dba0: e28d100c add r1, sp, #12 ; 0xc
dba4: e0830007 add r0, r3, r7
dba8: e3a02f43 mov r2, #268 ; 0x10c
dbac: eb000684 bl f5c4 <memcpy>
buffer + bytes_transferred,
(void *)&tmp_dirent,
sizeof( struct dirent )
);
iop->offset = iop->offset + sizeof(struct dirent);
dbb0: e5983008 ldr r3, [r8, #8]
ssize_t imfs_dir_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
dbb4: e2855f43 add r5, r5, #268 ; 0x10c
memcpy(
buffer + bytes_transferred,
(void *)&tmp_dirent,
sizeof( struct dirent )
);
iop->offset = iop->offset + sizeof(struct dirent);
dbb8: e2833f43 add r3, r3, #268 ; 0x10c
last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent);
/* The directory was not empty so try to move to the desired entry in chain*/
for (
current_entry = 0;
current_entry < last_entry;
dbbc: e15b0005 cmp fp, r5
buffer + bytes_transferred,
(void *)&tmp_dirent,
sizeof( struct dirent )
);
iop->offset = iop->offset + sizeof(struct dirent);
bytes_transferred = bytes_transferred + sizeof( struct dirent );
dbc0: e2877f43 add r7, r7, #268 ; 0x10c
memcpy(
buffer + bytes_transferred,
(void *)&tmp_dirent,
sizeof( struct dirent )
);
iop->offset = iop->offset + sizeof(struct dirent);
dbc4: e5883008 str r3, [r8, #8]
bytes_transferred = bytes_transferred + sizeof( struct dirent );
}
the_node = the_node->next;
dbc8: e5966000 ldr r6, [r6]
last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent);
/* The directory was not empty so try to move to the desired entry in chain*/
for (
current_entry = 0;
current_entry < last_entry;
dbcc: caffffde bgt db4c <imfs_dir_read+0x8c>
the_node = the_node->next;
}
/* Success */
return bytes_transferred;
}
dbd0: e1a00007 mov r0, r7
dbd4: e28ddf46 add sp, sp, #280 ; 0x118
dbd8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent);
/* The directory was not empty so try to move to the desired entry in chain*/
for (
current_entry = 0;
current_entry < last_entry;
dbdc: e3a07000 mov r7, #0 ; 0x0
dbe0: eafffffa b dbd0 <imfs_dir_read+0x110>
00009768 <init_fs_mount_table>:
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
9768: e59f3010 ldr r3, [pc, #16] ; 9780 <init_fs_mount_table+0x18>
the_chain->permanent_null = NULL;
976c: e3a00000 mov r0, #0 ; 0x0
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
9770: e2832004 add r2, r3, #4 ; 0x4
9774: e5832000 str r2, [r3]
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
9778: e9830009 stmib r3, {r0, r3}
int init_fs_mount_table(void)
{
rtems_chain_initialize_empty ( &rtems_filesystem_mount_table_control );
return 0;
}
977c: e12fff1e bx lr
0000c6d4 <ioctl>:
int ioctl(
int fd,
ioctl_command_t command,
...
)
{
c6d4: e92d000e push {r1, r2, r3}
va_list ap;
rtems_status_code rc;
rtems_libio_t *iop;
void *buffer;
rtems_libio_check_fd( fd );
c6d8: e59f3090 ldr r3, [pc, #144] ; c770 <ioctl+0x9c>
c6dc: e5932000 ldr r2, [r3]
c6e0: e1500002 cmp r0, r2
int ioctl(
int fd,
ioctl_command_t command,
...
)
{
c6e4: e52de004 push {lr} ; (str lr, [sp, #-4]!)
va_list ap;
rtems_status_code rc;
rtems_libio_t *iop;
void *buffer;
rtems_libio_check_fd( fd );
c6e8: 2a000016 bcs c748 <ioctl+0x74>
iop = rtems_libio_iop( fd );
c6ec: e1a03200 lsl r3, r0, #4
c6f0: e59f207c ldr r2, [pc, #124] ; c774 <ioctl+0xa0>
c6f4: e0433100 sub r3, r3, r0, lsl #2
c6f8: e0833000 add r3, r3, r0
c6fc: e5921000 ldr r1, [r2]
c700: e1a03103 lsl r3, r3, #2
c704: e0810003 add r0, r1, r3
rtems_libio_check_is_open(iop);
c708: e590200c ldr r2, [r0, #12]
c70c: e3120c01 tst r2, #256 ; 0x100
c710: 0a00000c beq c748 <ioctl+0x74>
/*
* Now process the ioctl().
*/
if ( !iop->handlers )
c714: e590c030 ldr ip, [r0, #48]
c718: e35c0000 cmp ip, #0 ; 0x0
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
va_start(ap, command);
buffer = va_arg(ap, void *);
c71c: e59d2008 ldr r2, [sp, #8]
/*
* Now process the ioctl().
*/
if ( !iop->handlers )
c720: 0a000008 beq c748 <ioctl+0x74>
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->ioctl_h )
c724: e59c3010 ldr r3, [ip, #16]
c728: e3530000 cmp r3, #0 ; 0x0
c72c: 0a00000a beq c75c <ioctl+0x88>
rtems_set_errno_and_return_minus_one( ENOTSUP );
rc = (*iop->handlers->ioctl_h)( iop, command, buffer );
c730: e59d1004 ldr r1, [sp, #4]
c734: e1a0e00f mov lr, pc
c738: e12fff13 bx r3
return rc;
}
c73c: e49de004 pop {lr} ; (ldr lr, [sp], #4)
c740: e28dd00c add sp, sp, #12 ; 0xc
c744: e12fff1e bx lr
/*
* Now process the ioctl().
*/
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
c748: eb000cfa bl fb38 <__errno> <== NOT EXECUTED
c74c: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED
c750: e5803000 str r3, [r0] <== NOT EXECUTED
c754: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
c758: eafffff7 b c73c <ioctl+0x68> <== NOT EXECUTED
if ( !iop->handlers->ioctl_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
c75c: eb000cf5 bl fb38 <__errno> <== NOT EXECUTED
c760: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
c764: e5803000 str r3, [r0] <== NOT EXECUTED
c768: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
c76c: eafffff2 b c73c <ioctl+0x68> <== NOT EXECUTED
00002c84 <iproc>:
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
2c84: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
2c88: e1a05001 mov r5, r1 <== NOT EXECUTED
if (tty->termios.c_iflag & ISTRIP)
2c8c: e5911030 ldr r1, [r1, #48] <== NOT EXECUTED
2c90: e3110020 tst r1, #32 ; 0x20 <== NOT EXECUTED
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
2c94: e20040ff and r4, r0, #255 ; 0xff <== NOT EXECUTED
if (tty->termios.c_iflag & ISTRIP)
c &= 0x7f;
2c98: 1200407f andne r4, r0, #127 ; 0x7f <== NOT EXECUTED
if (tty->termios.c_iflag & IUCLC)
2c9c: e3110c02 tst r1, #512 ; 0x200 <== NOT EXECUTED
2ca0: 0a000006 beq 2cc0 <iproc+0x3c> <== NOT EXECUTED
c = tolower (c);
2ca4: e59f3190 ldr r3, [pc, #400] ; 2e3c <iproc+0x1b8> <== NOT EXECUTED
2ca8: e5932000 ldr r2, [r3] <== NOT EXECUTED
2cac: e7d23004 ldrb r3, [r2, r4] <== NOT EXECUTED
2cb0: e3130001 tst r3, #1 ; 0x1 <== NOT EXECUTED
2cb4: e1a00004 mov r0, r4 <== NOT EXECUTED
2cb8: 12840020 addne r0, r4, #32 ; 0x20 <== NOT EXECUTED
2cbc: e20040ff and r4, r0, #255 ; 0xff <== NOT EXECUTED
if (c == '\r') {
2cc0: e354000d cmp r4, #13 ; 0xd <== NOT EXECUTED
2cc4: 0a000034 beq 2d9c <iproc+0x118> <== NOT EXECUTED
if (tty->termios.c_iflag & IGNCR)
return 0;
if (tty->termios.c_iflag & ICRNL)
c = '\n';
}
else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
2cc8: e354000a cmp r4, #10 ; 0xa <== NOT EXECUTED
2ccc: 0a000010 beq 2d14 <iproc+0x90> <== NOT EXECUTED
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
2cd0: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED
2cd4: 1a000011 bne 2d20 <iproc+0x9c> <== NOT EXECUTED
}
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
2cd8: e59f2160 ldr r2, [pc, #352] ; 2e40 <iproc+0x1bc> <== NOT EXECUTED
2cdc: e5923000 ldr r3, [r2] <== NOT EXECUTED
2ce0: e5951020 ldr r1, [r5, #32] <== NOT EXECUTED
2ce4: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED
2ce8: e1510003 cmp r1, r3 <== NOT EXECUTED
2cec: aa00002c bge 2da4 <iproc+0x120> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO)
2cf0: e595303c ldr r3, [r5, #60] <== NOT EXECUTED
2cf4: e3130008 tst r3, #8 ; 0x8 <== NOT EXECUTED
2cf8: 1a00002f bne 2dbc <iproc+0x138> <== NOT EXECUTED
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
2cfc: e595301c ldr r3, [r5, #28] <== NOT EXECUTED
2d00: e2812001 add r2, r1, #1 ; 0x1 <== NOT EXECUTED
2d04: e7c34001 strb r4, [r3, r1] <== NOT EXECUTED
2d08: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
2d0c: e5852020 str r2, [r5, #32] <== NOT EXECUTED
2d10: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
2d14: e3110040 tst r1, #64 ; 0x40 <== NOT EXECUTED
2d18: 03a0400a moveq r4, #10 ; 0xa <== NOT EXECUTED
2d1c: 13a0400d movne r4, #13 ; 0xd <== NOT EXECUTED
c = '\n';
}
else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
2d20: e595203c ldr r2, [r5, #60] <== NOT EXECUTED
2d24: e3120002 tst r2, #2 ; 0x2 <== NOT EXECUTED
2d28: 0affffea beq 2cd8 <iproc+0x54> <== NOT EXECUTED
if (c == tty->termios.c_cc[VERASE]) {
2d2c: e5d53043 ldrb r3, [r5, #67] <== NOT EXECUTED
2d30: e1530004 cmp r3, r4 <== NOT EXECUTED
2d34: 0a000036 beq 2e14 <iproc+0x190> <== NOT EXECUTED
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
2d38: e5d53044 ldrb r3, [r5, #68] <== NOT EXECUTED
2d3c: e1530004 cmp r3, r4 <== NOT EXECUTED
2d40: 0a000038 beq 2e28 <iproc+0x1a4> <== NOT EXECUTED
erase (tty, 1);
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
2d44: e5d53045 ldrb r3, [r5, #69] <== NOT EXECUTED
2d48: e1530004 cmp r3, r4 <== NOT EXECUTED
2d4c: 0a00002e beq 2e0c <iproc+0x188> <== NOT EXECUTED
return 1;
}
else if (c == '\n') {
2d50: e354000a cmp r4, #10 ; 0xa <== NOT EXECUTED
2d54: 0a000022 beq 2de4 <iproc+0x160> <== NOT EXECUTED
if (tty->termios.c_lflag & (ECHO | ECHONL))
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
return 1;
}
else if ((c == tty->termios.c_cc[VEOL])
2d58: e5d5304c ldrb r3, [r5, #76] <== NOT EXECUTED
2d5c: e1530004 cmp r3, r4 <== NOT EXECUTED
2d60: 0a000002 beq 2d70 <iproc+0xec> <== NOT EXECUTED
2d64: e5d53051 ldrb r3, [r5, #81] <== NOT EXECUTED
2d68: e1530004 cmp r3, r4 <== NOT EXECUTED
2d6c: 1affffd9 bne 2cd8 <iproc+0x54> <== NOT EXECUTED
|| (c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
2d70: e3120008 tst r2, #8 ; 0x8 <== NOT EXECUTED
echo (c, tty);
2d74: 11a00004 movne r0, r4 <== NOT EXECUTED
2d78: 11a01005 movne r1, r5 <== NOT EXECUTED
2d7c: 1bffff27 blne 2a20 <echo> <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
2d80: e285201c add r2, r5, #28 ; 0x1c <== NOT EXECUTED
2d84: e892000c ldm r2, {r2, r3} <== NOT EXECUTED
2d88: e2831001 add r1, r3, #1 ; 0x1 <== NOT EXECUTED
2d8c: e7c24003 strb r4, [r2, r3] <== NOT EXECUTED
2d90: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED
2d94: e5851020 str r1, [r5, #32] <== NOT EXECUTED
2d98: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
if (tty->termios.c_iflag & ISTRIP)
c &= 0x7f;
if (tty->termios.c_iflag & IUCLC)
c = tolower (c);
if (c == '\r') {
if (tty->termios.c_iflag & IGNCR)
2d9c: e3110080 tst r1, #128 ; 0x80 <== NOT EXECUTED
2da0: 0a000001 beq 2dac <iproc+0x128> <== NOT EXECUTED
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
2da4: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
}
return 0;
}
2da8: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
if (tty->termios.c_iflag & IUCLC)
c = tolower (c);
if (c == '\r') {
if (tty->termios.c_iflag & IGNCR)
return 0;
if (tty->termios.c_iflag & ICRNL)
2dac: e3110c01 tst r1, #256 ; 0x100 <== NOT EXECUTED
2db0: 03a0400d moveq r4, #13 ; 0xd <== NOT EXECUTED
2db4: 13a0400a movne r4, #10 ; 0xa <== NOT EXECUTED
2db8: eaffffd8 b 2d20 <iproc+0x9c> <== NOT EXECUTED
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
2dbc: e1a00004 mov r0, r4 <== NOT EXECUTED
2dc0: e1a01005 mov r1, r5 <== NOT EXECUTED
2dc4: ebffff15 bl 2a20 <echo> <== NOT EXECUTED
2dc8: e5951020 ldr r1, [r5, #32] <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
2dcc: e595301c ldr r3, [r5, #28] <== NOT EXECUTED
2dd0: e2812001 add r2, r1, #1 ; 0x1 <== NOT EXECUTED
2dd4: e7c34001 strb r4, [r3, r1] <== NOT EXECUTED
2dd8: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
2ddc: e5852020 str r2, [r5, #32] <== NOT EXECUTED
2de0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
}
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
}
else if (c == '\n') {
if (tty->termios.c_lflag & (ECHO | ECHONL))
2de4: e3120048 tst r2, #72 ; 0x48 <== NOT EXECUTED
echo (c, tty);
2de8: 11a00004 movne r0, r4 <== NOT EXECUTED
2dec: 11a01005 movne r1, r5 <== NOT EXECUTED
2df0: 1bffff0a blne 2a20 <echo> <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
2df4: e285101c add r1, r5, #28 ; 0x1c <== NOT EXECUTED
2df8: e8910006 ldm r1, {r1, r2} <== NOT EXECUTED
2dfc: e2820001 add r0, r2, #1 ; 0x1 <== NOT EXECUTED
2e00: e3a0300a mov r3, #10 ; 0xa <== NOT EXECUTED
2e04: e7c13002 strb r3, [r1, r2] <== NOT EXECUTED
2e08: e5850020 str r0, [r5, #32] <== NOT EXECUTED
2e0c: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED
2e10: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
if (c == tty->termios.c_cc[VERASE]) {
erase (tty, 0);
2e14: e1a00005 mov r0, r5 <== NOT EXECUTED
2e18: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED
2e1c: ebffff20 bl 2aa4 <erase> <== NOT EXECUTED
2e20: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
2e24: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
erase (tty, 1);
2e28: e1a00005 mov r0, r5 <== NOT EXECUTED
2e2c: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED
2e30: ebffff1b bl 2aa4 <erase> <== NOT EXECUTED
2e34: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
2e38: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
000181cc <killinfo>:
int killinfo(
pid_t pid,
int sig,
const union sigval *value
)
{
181cc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
181d0: e24dd00c sub sp, sp, #12 ; 0xc
181d4: e1a04000 mov r4, r0
181d8: e1a05001 mov r5, r1
181dc: e1a06002 mov r6, r2
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
181e0: ebfffedf bl 17d64 <getpid>
181e4: e1500004 cmp r0, r4
181e8: 1a0000a5 bne 18484 <killinfo+0x2b8>
/*
* Validate the signal passed.
*/
if ( !sig )
181ec: e3550000 cmp r5, #0 ; 0x0
181f0: 0a0000a8 beq 18498 <killinfo+0x2cc>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
181f4: e2450001 sub r0, r5, #1 ; 0x1
181f8: e350001f cmp r0, #31 ; 0x1f
181fc: 8a0000a5 bhi 18498 <killinfo+0x2cc>
/*
* If the signal is being ignored, then we are out of here.
*/
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
18200: e59f22b8 ldr r2, [pc, #696] ; 184c0 <killinfo+0x2f4>
18204: e1a0b105 lsl fp, r5, #2
18208: e1a09205 lsl r9, r5, #4
1820c: e06b3009 rsb r3, fp, r9
18210: e0823003 add r3, r2, r3
18214: e5932008 ldr r2, [r3, #8]
18218: e3520001 cmp r2, #1 ; 0x1
1821c: 0a00003c beq 18314 <killinfo+0x148>
* P1003.1c/Draft 10, p. 33 says that certain signals should always
* be directed to the executing thread such as those caused by hardware
* faults.
*/
if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) )
18220: e3550004 cmp r5, #4 ; 0x4
18224: 13550008 cmpne r5, #8 ; 0x8
18228: 0a00003b beq 1831c <killinfo+0x150>
1822c: e355000b cmp r5, #11 ; 0xb
18230: 0a000039 beq 1831c <killinfo+0x150>
return pthread_kill( pthread_self(), sig );
mask = signo_to_mask( sig );
18234: e3a03001 mov r3, #1 ; 0x1
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
18238: e58d3004 str r3, [sp, #4]
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
1823c: e58d5000 str r5, [sp]
siginfo->si_code = SI_USER;
if ( !value ) {
18240: e3560000 cmp r6, #0 ; 0x0
*/
if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) )
return pthread_kill( pthread_self(), sig );
mask = signo_to_mask( sig );
18244: e1a04013 lsl r4, r3, r0
18248: e59f2274 ldr r2, [pc, #628] ; 184c4 <killinfo+0x2f8>
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
if ( !value ) {
siginfo->si_value.sival_int = 0;
} else {
siginfo->si_value = *value;
1824c: 15963000 ldrne r3, [r6]
18250: 158d3008 strne r3, [sp, #8]
18254: e5923000 ldr r3, [r2]
18258: e2833001 add r3, r3, #1 ; 0x1
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
if ( !value ) {
siginfo->si_value.sival_int = 0;
1825c: 058d6008 streq r6, [sp, #8]
18260: e5823000 str r3, [r2]
/*
* Is the currently executing thread interested? If so then it will
* get it an execute it as soon as the dispatcher executes.
*/
the_thread = _Thread_Executing;
18264: e59f325c ldr r3, [pc, #604] ; 184c8 <killinfo+0x2fc>
18268: e5930000 ldr r0, [r3]
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( _POSIX_signals_Is_interested( api, mask ) ) {
1826c: e5902108 ldr r2, [r0, #264]
18270: e59230c4 ldr r3, [r2, #196]
18274: e1d43003 bics r3, r4, r3
18278: 1a000016 bne 182d8 <killinfo+0x10c>
goto process_it;
1827c: e59fc248 ldr ip, [pc, #584] ; 184cc <killinfo+0x300>
*/
/* XXX violation of visibility -- need to define thread queue support */
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
18280: e28ce030 add lr, ip, #48 ; 0x30
index++ ) {
the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ];
for ( the_node = the_chain->first ;
18284: e1a0100c mov r1, ip
18288: e4912004 ldr r2, [r1], #4
!_Chain_Is_tail( the_chain, the_node ) ;
1828c: e1520001 cmp r2, r1
18290: 0a000036 beq 18370 <killinfo+0x1a4>
the_node = the_node->next ) {
the_thread = (Thread_Control *)the_node;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ((the_thread->Wait.option & mask) || (~api->signals_blocked & mask)) {
18294: e5923030 ldr r3, [r2, #48]
18298: e1140003 tst r4, r3
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
the_thread = (Thread_Control *)the_node;
1829c: e1a00002 mov r0, r2
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
182a0: e5923108 ldr r3, [r2, #264]
if ((the_thread->Wait.option & mask) || (~api->signals_blocked & mask)) {
182a4: 0a000008 beq 182cc <killinfo+0x100>
182a8: ea00000a b 182d8 <killinfo+0x10c>
the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ];
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
182ac: e5922000 ldr r2, [r2] <== NOT EXECUTED
index++ ) {
the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ];
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
182b0: e1520001 cmp r2, r1 <== NOT EXECUTED
182b4: 0a00002d beq 18370 <killinfo+0x1a4> <== NOT EXECUTED
the_node = the_node->next ) {
the_thread = (Thread_Control *)the_node;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ((the_thread->Wait.option & mask) || (~api->signals_blocked & mask)) {
182b8: e5923030 ldr r3, [r2, #48] <== NOT EXECUTED
182bc: e1140003 tst r4, r3 <== NOT EXECUTED
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
the_thread = (Thread_Control *)the_node;
182c0: e1a00002 mov r0, r2 <== NOT EXECUTED
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
182c4: e5923108 ldr r3, [r2, #264] <== NOT EXECUTED
if ((the_thread->Wait.option & mask) || (~api->signals_blocked & mask)) {
182c8: 1a000002 bne 182d8 <killinfo+0x10c> <== NOT EXECUTED
182cc: e59330c4 ldr r3, [r3, #196] <== NOT EXECUTED
182d0: e1d43003 bics r3, r4, r3 <== NOT EXECUTED
182d4: 0afffff4 beq 182ac <killinfo+0xe0> <== NOT EXECUTED
* evaluate the signals pending.
*/
process_it:
the_thread->do_post_task_switch_extension = true;
182d8: e3a03001 mov r3, #1 ; 0x1
182dc: e5c03075 strb r3, [r0, #117]
/*
* Returns TRUE if the signal was synchronously given to a thread
* blocked waiting for the signal.
*/
if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) {
182e0: e1a01005 mov r1, r5
182e4: e1a0200d mov r2, sp
182e8: eb000090 bl 18530 <_POSIX_signals_Unblock_thread>
182ec: e3500000 cmp r0, #0 ; 0x0
182f0: 1a00001b bne 18364 <killinfo+0x198>
/*
* We may have woken up a thread but we definitely need to post the
* signal to the process wide information set.
*/
_POSIX_signals_Set_process_signals( mask );
182f4: e1a00004 mov r0, r4
182f8: eb000079 bl 184e4 <_POSIX_signals_Set_process_signals>
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
182fc: e59f21bc ldr r2, [pc, #444] ; 184c0 <killinfo+0x2f4>
18300: e06b5009 rsb r5, fp, r9
18304: e7923005 ldr r3, [r2, r5]
18308: e3530002 cmp r3, #2 ; 0x2
1830c: 0a000007 beq 18330 <killinfo+0x164>
psiginfo->Info = *siginfo;
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
}
_Thread_Enable_dispatch();
18310: ebffc01e bl 8390 <_Thread_Enable_dispatch>
18314: e3a00000 mov r0, #0 ; 0x0
18318: ea000002 b 18328 <killinfo+0x15c>
* be directed to the executing thread such as those caused by hardware
* faults.
*/
if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) )
return pthread_kill( pthread_self(), sig );
1831c: eb00010c bl 18754 <pthread_self>
18320: e1a01005 mov r1, r5
18324: eb0000cf bl 18668 <pthread_kill>
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
}
_Thread_Enable_dispatch();
return 0;
}
18328: e28dd00c add sp, sp, #12 ; 0xc
1832c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
_POSIX_signals_Set_process_signals( mask );
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
18330: e59f0198 ldr r0, [pc, #408] ; 184d0 <killinfo+0x304>
18334: ebffd0da bl c6a4 <_Chain_Get>
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
18338: e250e000 subs lr, r0, #0 ; 0x0
1833c: 0a00005a beq 184ac <killinfo+0x2e0>
rtems_set_errno_and_return_minus_one( EAGAIN );
}
psiginfo->Info = *siginfo;
18340: e89d0007 ldm sp, {r0, r1, r2}
18344: e28ec008 add ip, lr, #8 ; 0x8
18348: e88c0007 stm ip, {r0, r1, r2}
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
1834c: e59f0180 ldr r0, [pc, #384] ; 184d4 <killinfo+0x308>
18350: e1a0100e mov r1, lr
18354: e0800005 add r0, r0, r5
18358: ebffba0c bl 6b90 <_Chain_Append>
}
_Thread_Enable_dispatch();
1835c: ebffc00b bl 8390 <_Thread_Enable_dispatch>
18360: eaffffeb b 18314 <killinfo+0x148>
* Returns TRUE if the signal was synchronously given to a thread
* blocked waiting for the signal.
*/
if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) {
_Thread_Enable_dispatch();
18364: ebffc009 bl 8390 <_Thread_Enable_dispatch>
18368: e3a00000 mov r0, #0 ; 0x0
1836c: eaffffed b 18328 <killinfo+0x15c>
index++ ) {
the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ];
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
18370: e28cc00c add ip, ip, #12 ; 0xc
*/
/* XXX violation of visibility -- need to define thread queue support */
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
18374: e15c000e cmp ip, lr
18378: 1affffc1 bne 18284 <killinfo+0xb8>
*
* + rtems internal threads do not receive signals.
*/
interested_thread = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
1837c: e59f3154 ldr r3, [pc, #340] ; 184d8 <killinfo+0x30c>
18380: e5d32000 ldrb r2, [r3]
18384: e59f7150 ldr r7, [pc, #336] ; 184dc <killinfo+0x310>
18388: e2822001 add r2, r2, #1 ; 0x1
1838c: e3a0a000 mov sl, #0 ; 0x0
the_api++ ) {
/*
* Thie can occur when no one is interested and ITRON is not configured.
*/
if ( !_Objects_Information_table[ the_api ] )
18390: e5973008 ldr r3, [r7, #8]
18394: e3530000 cmp r3, #0 ; 0x0
18398: 0a00002d beq 18454 <killinfo+0x288>
continue;
the_info = _Objects_Information_table[ the_api ][ 1 ];
1839c: e5933004 ldr r3, [r3, #4]
/*
* This cannot happen in the current (as of Dec 2007) implementation
* of initialization but at some point, the object information
* structure for a particular manager may not be installed.
*/
if ( !the_info )
183a0: e3530000 cmp r3, #0 ; 0x0
183a4: 0a00002a beq 18454 <killinfo+0x288>
continue;
maximum = the_info->maximum;
183a8: e1d361b0 ldrh r6, [r3, #16]
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
183ac: e3560000 cmp r6, #0 ; 0x0
*/
if ( !the_info )
continue;
maximum = the_info->maximum;
object_table = the_info->local_table;
183b0: e593001c ldr r0, [r3, #28]
for ( index = 1 ; index <= maximum ; index++ ) {
183b4: 0a000026 beq 18454 <killinfo+0x288>
183b8: e3a0c001 mov ip, #1 ; 0x1
the_thread = (Thread_Control *) object_table[ index ];
183bc: e790110c ldr r1, [r0, ip, lsl #2]
if ( !the_thread )
183c0: e3510000 cmp r1, #0 ; 0x0
183c4: 0a000018 beq 1842c <killinfo+0x260>
/*
* If this thread is of lower priority than the interested thread,
* go on to the next thread.
*/
if ( the_thread->current_priority > interested_priority )
183c8: e591e014 ldr lr, [r1, #20]
183cc: e15e0002 cmp lr, r2
183d0: 8a000015 bhi 1842c <killinfo+0x260>
/*
* If this thread is not interested, then go on to the next thread.
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
183d4: e5913108 ldr r3, [r1, #264]
if ( !api || !_POSIX_signals_Is_interested( api, mask ) )
183d8: e3530000 cmp r3, #0 ; 0x0
183dc: 0a000012 beq 1842c <killinfo+0x260>
183e0: e59330c4 ldr r3, [r3, #196]
183e4: e1d43003 bics r3, r4, r3
183e8: 0a00000f beq 1842c <killinfo+0x260>
* Now we know the thread under connsideration is interested.
* If the thread under consideration is of higher priority, then
* it becomes the interested thread.
*/
if ( the_thread->current_priority < interested_priority ) {
183ec: e15e0002 cmp lr, r2
183f0: 3a000005 bcc 1840c <killinfo+0x240>
* Now the thread and the interested thread have the same priority.
* If the interested thread is ready, then we don't need to send it
* to a blocked thread.
*/
if ( _States_Is_ready( interested_thread->current_state ) )
183f4: e59a3010 ldr r3, [sl, #16] <== NOT EXECUTED
183f8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
183fc: 0a00000a beq 1842c <killinfo+0x260> <== NOT EXECUTED
* Now the interested thread is blocked.
* If the thread we are considering is not, the it becomes the
* interested thread.
*/
if ( _States_Is_ready( the_thread->current_state ) ) {
18400: e5918010 ldr r8, [r1, #16] <== NOT EXECUTED
18404: e3580000 cmp r8, #0 ; 0x0 <== NOT EXECUTED
18408: 1a000017 bne 1846c <killinfo+0x2a0> <== NOT EXECUTED
continue;
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
1840c: e28cc001 add ip, ip, #1 ; 0x1
18410: e156000c cmp r6, ip
* If the thread under consideration is interruptible by a signal,
* then it becomes the interested thread.
*/
/* XXX need a new states macro */
if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) {
18414: e1a0a001 mov sl, r1
continue;
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
18418: 3a000007 bcc 1843c <killinfo+0x270>
the_thread = (Thread_Control *) object_table[ index ];
1841c: e790110c ldr r1, [r0, ip, lsl #2]
if ( !the_thread )
18420: e3510000 cmp r1, #0 ; 0x0
continue;
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
18424: e1a0200e mov r2, lr
the_thread = (Thread_Control *) object_table[ index ];
if ( !the_thread )
18428: 1affffe6 bne 183c8 <killinfo+0x1fc>
* If the thread under consideration is interruptible by a signal,
* then it becomes the interested thread.
*/
/* XXX need a new states macro */
if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) {
1842c: e1a0e002 mov lr, r2
continue;
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
18430: e28cc001 add ip, ip, #1 ; 0x1
18434: e156000c cmp r6, ip
18438: 2afffff7 bcs 1841c <killinfo+0x250>
interested_thread = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
for ( the_api = OBJECTS_CLASSIC_API;
the_api <= OBJECTS_APIS_LAST;
1843c: e59f309c ldr r3, [pc, #156] ; 184e0 <killinfo+0x314>
continue;
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
18440: e2877004 add r7, r7, #4 ; 0x4
interested_thread = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
for ( the_api = OBJECTS_CLASSIC_API;
the_api <= OBJECTS_APIS_LAST;
18444: e1570003 cmp r7, r3
18448: 0a000003 beq 1845c <killinfo+0x290>
1844c: e1a0200e mov r2, lr
18450: eaffffce b 18390 <killinfo+0x1c4>
continue;
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
18454: e1a0e002 mov lr, r2
18458: eafffff7 b 1843c <killinfo+0x270>
interested_priority = the_thread->current_priority;
}
}
}
if ( interested_thread ) {
1845c: e35a0000 cmp sl, #0 ; 0x0
18460: 0affffa3 beq 182f4 <killinfo+0x128>
18464: e1a0000a mov r0, sl
18468: eaffff9a b 182d8 <killinfo+0x10c>
* Now we know both threads are blocked.
* If the interested thread is interruptible, then just use it.
*/
/* XXX need a new states macro */
if ( interested_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL )
1846c: e3130201 tst r3, #268435456 ; 0x10000000 <== NOT EXECUTED
18470: 1affffed bne 1842c <killinfo+0x260> <== NOT EXECUTED
* If the thread under consideration is interruptible by a signal,
* then it becomes the interested thread.
*/
/* XXX need a new states macro */
if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) {
18474: e3180201 tst r8, #268435456 ; 0x10000000 <== NOT EXECUTED
18478: 1affffe3 bne 1840c <killinfo+0x240> <== NOT EXECUTED
1847c: e1a0e002 mov lr, r2 <== NOT EXECUTED
18480: eaffffea b 18430 <killinfo+0x264> <== NOT EXECUTED
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
rtems_set_errno_and_return_minus_one( ESRCH );
18484: ebffd617 bl dce8 <__errno> <== NOT EXECUTED
18488: e3a03003 mov r3, #3 ; 0x3 <== NOT EXECUTED
1848c: e5803000 str r3, [r0] <== NOT EXECUTED
18490: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
18494: eaffffa3 b 18328 <killinfo+0x15c> <== NOT EXECUTED
if ( !sig )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
rtems_set_errno_and_return_minus_one( EINVAL );
18498: ebffd612 bl dce8 <__errno> <== NOT EXECUTED
1849c: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED
184a0: e5803000 str r3, [r0] <== NOT EXECUTED
184a4: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
184a8: eaffff9e b 18328 <killinfo+0x15c> <== NOT EXECUTED
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
rtems_set_errno_and_return_minus_one( EAGAIN );
184ac: ebffd60d bl dce8 <__errno> <== NOT EXECUTED
184b0: e3a0300b mov r3, #11 ; 0xb <== NOT EXECUTED
184b4: e5803000 str r3, [r0] <== NOT EXECUTED
184b8: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
184bc: eaffff99 b 18328 <killinfo+0x15c> <== NOT EXECUTED
00002b1c <link>:
int link(
const char *existing,
const char *new
)
{
2b1c: e92d4070 push {r4, r5, r6, lr}
2b20: e24dd024 sub sp, sp, #36 ; 0x24
/*
* Get the node we are linking to.
*/
result = rtems_filesystem_evaluate_path( existing, 0, &existing_loc, true );
2b24: e28d6010 add r6, sp, #16 ; 0x10
int link(
const char *existing,
const char *new
)
{
2b28: e1a05001 mov r5, r1
/*
* Get the node we are linking to.
*/
result = rtems_filesystem_evaluate_path( existing, 0, &existing_loc, true );
2b2c: e1a02006 mov r2, r6
2b30: e3a01000 mov r1, #0 ; 0x0
2b34: e3a03001 mov r3, #1 ; 0x1
2b38: ebfffe66 bl 24d8 <rtems_filesystem_evaluate_path>
if ( result != 0 )
2b3c: e3500000 cmp r0, #0 ; 0x0
2b40: 1a00004d bne 2c7c <link+0x160>
/*
* Get the parent of the node we are creating.
*/
rtems_filesystem_get_start_loc( new, &i, &parent_loc );
2b44: e5d53000 ldrb r3, [r5]
2b48: e353005c cmp r3, #92 ; 0x5c
2b4c: 1353002f cmpne r3, #47 ; 0x2f
2b50: 13a0e000 movne lr, #0 ; 0x0
2b54: 03a0e001 moveq lr, #1 ; 0x1
2b58: 1a000032 bne 2c28 <link+0x10c>
2b5c: e59f31fc ldr r3, [pc, #508] ; 2d60 <link+0x244>
2b60: e593c000 ldr ip, [r3]
2b64: e28cc014 add ip, ip, #20 ; 0x14
2b68: e89c000f ldm ip, {r0, r1, r2, r3}
2b6c: e1a0400d mov r4, sp
2b70: e88d000f stm sp, {r0, r1, r2, r3}
2b74: e3a02001 mov r2, #1 ; 0x1
if ( !parent_loc.ops->evalformake_h ) {
2b78: e59d3008 ldr r3, [sp, #8]
2b7c: e5933004 ldr r3, [r3, #4]
2b80: e3530000 cmp r3, #0 ; 0x0
2b84: 0a000031 beq 2c50 <link+0x134>
rtems_filesystem_freenode( &existing_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start );
2b88: e0850002 add r0, r5, r2
2b8c: e1a0100d mov r1, sp
2b90: e28d2020 add r2, sp, #32 ; 0x20
2b94: e1a0e00f mov lr, pc
2b98: e12fff13 bx r3
if ( result != 0 ) {
2b9c: e2505000 subs r5, r0, #0 ; 0x0
2ba0: 1a00004c bne 2cd8 <link+0x1bc>
/*
* Check to see if the caller is trying to link across file system
* boundaries.
*/
if ( parent_loc.mt_entry != existing_loc.mt_entry ) {
2ba4: e59d201c ldr r2, [sp, #28]
2ba8: e59d300c ldr r3, [sp, #12]
2bac: e1530002 cmp r3, r2
2bb0: 1a000033 bne 2c84 <link+0x168>
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
rtems_set_errno_and_return_minus_one( EXDEV );
}
if ( !parent_loc.ops->link_h ) {
2bb4: e59d2008 ldr r2, [sp, #8]
2bb8: e5923008 ldr r3, [r2, #8]
2bbc: e3530000 cmp r3, #0 ; 0x0
2bc0: 0a000050 beq 2d08 <link+0x1ec>
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start );
2bc4: e1a00006 mov r0, r6
2bc8: e1a0100d mov r1, sp
2bcc: e59d2020 ldr r2, [sp, #32]
2bd0: e1a0e00f mov lr, pc
2bd4: e12fff13 bx r3
rtems_filesystem_freenode( &existing_loc );
2bd8: e59d3018 ldr r3, [sp, #24]
2bdc: e3530000 cmp r3, #0 ; 0x0
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start );
2be0: e1a05000 mov r5, r0
rtems_filesystem_freenode( &existing_loc );
2be4: 0a000004 beq 2bfc <link+0xe0>
2be8: e593301c ldr r3, [r3, #28]
2bec: e3530000 cmp r3, #0 ; 0x0
2bf0: 11a00006 movne r0, r6
2bf4: 11a0e00f movne lr, pc
2bf8: 112fff13 bxne r3
rtems_filesystem_freenode( &parent_loc );
2bfc: e59d3008 ldr r3, [sp, #8]
2c00: e3530000 cmp r3, #0 ; 0x0
2c04: 0a000004 beq 2c1c <link+0x100>
2c08: e593301c ldr r3, [r3, #28]
2c0c: e3530000 cmp r3, #0 ; 0x0
2c10: 11a0000d movne r0, sp
2c14: 11a0e00f movne lr, pc
2c18: 112fff13 bxne r3
return result;
}
2c1c: e1a00005 mov r0, r5
2c20: e28dd024 add sp, sp, #36 ; 0x24
2c24: e8bd8070 pop {r4, r5, r6, pc}
/*
* Get the parent of the node we are creating.
*/
rtems_filesystem_get_start_loc( new, &i, &parent_loc );
2c28: e3530000 cmp r3, #0 ; 0x0
2c2c: 0affffca beq 2b5c <link+0x40>
2c30: e59f3128 ldr r3, [pc, #296] ; 2d60 <link+0x244>
2c34: e593c000 ldr ip, [r3]
2c38: e28cc004 add ip, ip, #4 ; 0x4
2c3c: e89c000f ldm ip, {r0, r1, r2, r3}
2c40: e1a0400d mov r4, sp
2c44: e88d000f stm sp, {r0, r1, r2, r3}
2c48: e1a0200e mov r2, lr
2c4c: eaffffc9 b 2b78 <link+0x5c>
if ( !parent_loc.ops->evalformake_h ) {
rtems_filesystem_freenode( &existing_loc );
2c50: e59d3018 ldr r3, [sp, #24] <== NOT EXECUTED
2c54: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
2c58: 0a000004 beq 2c70 <link+0x154> <== NOT EXECUTED
2c5c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
2c60: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
2c64: 11a00006 movne r0, r6 <== NOT EXECUTED
2c68: 11a0e00f movne lr, pc <== NOT EXECUTED
2c6c: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
2c70: eb002e53 bl e5c4 <__errno> <== NOT EXECUTED
2c74: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
2c78: e5803000 str r3, [r0] <== NOT EXECUTED
2c7c: e3e05000 mvn r5, #0 ; 0x0
2c80: eaffffe5 b 2c1c <link+0x100>
* Check to see if the caller is trying to link across file system
* boundaries.
*/
if ( parent_loc.mt_entry != existing_loc.mt_entry ) {
rtems_filesystem_freenode( &existing_loc );
2c84: e59d3018 ldr r3, [sp, #24]
2c88: e3530000 cmp r3, #0 ; 0x0
2c8c: 0a000004 beq 2ca4 <link+0x188>
2c90: e593301c ldr r3, [r3, #28]
2c94: e3530000 cmp r3, #0 ; 0x0
2c98: 11a00006 movne r0, r6
2c9c: 11a0e00f movne lr, pc
2ca0: 112fff13 bxne r3
rtems_filesystem_freenode( &parent_loc );
2ca4: e59d3008 ldr r3, [sp, #8]
2ca8: e3530000 cmp r3, #0 ; 0x0
2cac: 0a000004 beq 2cc4 <link+0x1a8>
2cb0: e593301c ldr r3, [r3, #28]
2cb4: e3530000 cmp r3, #0 ; 0x0
2cb8: 11a0000d movne r0, sp
2cbc: 11a0e00f movne lr, pc
2cc0: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( EXDEV );
2cc4: eb002e3e bl e5c4 <__errno>
2cc8: e3a03012 mov r3, #18 ; 0x12
2ccc: e5803000 str r3, [r0]
2cd0: e3e05000 mvn r5, #0 ; 0x0
2cd4: eaffffd0 b 2c1c <link+0x100>
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start );
if ( result != 0 ) {
rtems_filesystem_freenode( &existing_loc );
2cd8: e59d3018 ldr r3, [sp, #24]
2cdc: e3530000 cmp r3, #0 ; 0x0
2ce0: 0a000004 beq 2cf8 <link+0x1dc>
2ce4: e593301c ldr r3, [r3, #28]
2ce8: e3530000 cmp r3, #0 ; 0x0
2cec: 11a00006 movne r0, r6
2cf0: 11a0e00f movne lr, pc
2cf4: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( result );
2cf8: eb002e31 bl e5c4 <__errno>
2cfc: e5805000 str r5, [r0]
2d00: e3e05000 mvn r5, #0 ; 0x0
2d04: eaffffc4 b 2c1c <link+0x100>
rtems_filesystem_freenode( &parent_loc );
rtems_set_errno_and_return_minus_one( EXDEV );
}
if ( !parent_loc.ops->link_h ) {
rtems_filesystem_freenode( &existing_loc );
2d08: e59d3018 ldr r3, [sp, #24] <== NOT EXECUTED
2d0c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
2d10: 0a000006 beq 2d30 <link+0x214> <== NOT EXECUTED
2d14: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
2d18: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
2d1c: 0a000003 beq 2d30 <link+0x214> <== NOT EXECUTED
2d20: e1a00006 mov r0, r6 <== NOT EXECUTED
2d24: e1a0e00f mov lr, pc <== NOT EXECUTED
2d28: e12fff13 bx r3 <== NOT EXECUTED
2d2c: e59d2008 ldr r2, [sp, #8] <== NOT EXECUTED
rtems_filesystem_freenode( &parent_loc );
2d30: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED
2d34: 0a000004 beq 2d4c <link+0x230> <== NOT EXECUTED
2d38: e592301c ldr r3, [r2, #28] <== NOT EXECUTED
2d3c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
2d40: 11a0000d movne r0, sp <== NOT EXECUTED
2d44: 11a0e00f movne lr, pc <== NOT EXECUTED
2d48: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
2d4c: eb002e1c bl e5c4 <__errno> <== NOT EXECUTED
2d50: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
2d54: e5803000 str r3, [r0] <== NOT EXECUTED
2d58: e3e05000 mvn r5, #0 ; 0x0 <== NOT EXECUTED
2d5c: eaffffae b 2c1c <link+0x100> <== NOT EXECUTED
00014688 <lseek>:
{
rtems_libio_t *iop;
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
14688: e59f30e0 ldr r3, [pc, #224] ; 14770 <lseek+0xe8>
1468c: e593c000 ldr ip, [r3]
14690: e150000c cmp r0, ip
off_t lseek(
int fd,
off_t offset,
int whence
)
{
14694: e92d4070 push {r4, r5, r6, lr}
14698: e1a0c002 mov ip, r2
1469c: e1a0e001 mov lr, r1
rtems_libio_t *iop;
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
146a0: 2a000028 bcs 14748 <lseek+0xc0>
iop = rtems_libio_iop( fd );
146a4: e59f20c8 ldr r2, [pc, #200] ; 14774 <lseek+0xec>
146a8: e1a03200 lsl r3, r0, #4
146ac: e0433100 sub r3, r3, r0, lsl #2
146b0: e5921000 ldr r1, [r2]
146b4: e0833000 add r3, r3, r0
146b8: e1a03103 lsl r3, r3, #2
146bc: e0814003 add r4, r1, r3
rtems_libio_check_is_open(iop);
146c0: e594200c ldr r2, [r4, #12]
146c4: e3120c01 tst r2, #256 ; 0x100
146c8: 0a00001e beq 14748 <lseek+0xc0>
/*
* Check as many errors as possible before touching iop->offset.
*/
if ( !iop->handlers->lseek_h )
146cc: e5945030 ldr r5, [r4, #48]
146d0: e5953014 ldr r3, [r5, #20]
146d4: e3530000 cmp r3, #0 ; 0x0
146d8: 0a00001f beq 1475c <lseek+0xd4>
/*
* Now process the lseek().
*/
old_offset = iop->offset;
switch ( whence ) {
146dc: e35c0001 cmp ip, #1 ; 0x1
/*
* Now process the lseek().
*/
old_offset = iop->offset;
146e0: e5946008 ldr r6, [r4, #8]
switch ( whence ) {
146e4: 0a000014 beq 1473c <lseek+0xb4>
146e8: e35c0002 cmp ip, #2 ; 0x2
146ec: 0a000007 beq 14710 <lseek+0x88>
146f0: e35c0000 cmp ip, #0 ; 0x0
case SEEK_SET:
iop->offset = offset;
146f4: 0584e008 streq lr, [r4, #8]
/*
* Now process the lseek().
*/
old_offset = iop->offset;
switch ( whence ) {
146f8: 0a000007 beq 1471c <lseek+0x94>
case SEEK_END:
iop->offset = iop->size + offset;
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
146fc: ebffde40 bl c004 <__errno>
14700: e3a03016 mov r3, #22 ; 0x16
14704: e5803000 str r3, [r0]
14708: e3e00000 mvn r0, #0 ; 0x0
1470c: e8bd8070 pop {r4, r5, r6, pc}
case SEEK_CUR:
iop->offset += offset;
break;
case SEEK_END:
iop->offset = iop->size + offset;
14710: e5943004 ldr r3, [r4, #4]
14714: e08e3003 add r3, lr, r3
14718: e5843008 str r3, [r4, #8]
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->handlers->lseek_h)( iop, offset, whence );
1471c: e1a0100e mov r1, lr
14720: e1a0200c mov r2, ip
14724: e1a00004 mov r0, r4
14728: e1a0e00f mov lr, pc
1472c: e595f014 ldr pc, [r5, #20]
if ( status == (off_t) -1 )
14730: e3700001 cmn r0, #1 ; 0x1
iop->offset = old_offset;
14734: 05846008 streq r6, [r4, #8]
/*
* So if the operation failed, we have to restore iop->offset.
*/
return status;
}
14738: e8bd8070 pop {r4, r5, r6, pc}
case SEEK_SET:
iop->offset = offset;
break;
case SEEK_CUR:
iop->offset += offset;
1473c: e08e3006 add r3, lr, r6
14740: e5843008 str r3, [r4, #8]
14744: eafffff4 b 1471c <lseek+0x94>
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
14748: ebffde2d bl c004 <__errno> <== NOT EXECUTED
1474c: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED
14750: e5803000 str r3, [r0] <== NOT EXECUTED
14754: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
14758: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
/*
* Check as many errors as possible before touching iop->offset.
*/
if ( !iop->handlers->lseek_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
1475c: ebffde28 bl c004 <__errno> <== NOT EXECUTED
14760: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
14764: e5803000 str r3, [r0] <== NOT EXECUTED
14768: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
1476c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
00009668 <malloc>:
size_t size
)
{
void *return_this;
MSBUMP(malloc_calls, 1);
9668: e59f20d0 ldr r2, [pc, #208] ; 9740 <malloc+0xd8>
966c: e5923004 ldr r3, [r2, #4]
9670: e2833001 add r3, r3, #1 ; 0x1
9674: e92d4070 push {r4, r5, r6, lr}
9678: e5823004 str r3, [r2, #4]
967c: e1a06000 mov r6, r0
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
9680: ebffffef bl 9644 <malloc_deferred_frees_process>
/*
* Validate the parameters
*/
if ( !size )
9684: e3560000 cmp r6, #0 ; 0x0
9688: 0a00001c beq 9700 <malloc+0x98>
return (void *) 0;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
968c: e59f30b0 ldr r3, [pc, #176] ; 9744 <malloc+0xdc>
9690: e5932000 ldr r2, [r3]
9694: e3520003 cmp r2, #3 ; 0x3
9698: 0a000015 beq 96f4 <malloc+0x8c>
* Try to give a segment in the current heap if there is not
* enough space then try to grow the heap.
* If this fails then return a NULL pointer.
*/
return_this = _Protected_heap_Allocate( &RTEMS_Malloc_Heap, size );
969c: e59f00a4 ldr r0, [pc, #164] ; 9748 <malloc+0xe0>
96a0: e1a01006 mov r1, r6
96a4: eb00055b bl ac18 <_Protected_heap_Allocate>
if ( !return_this ) {
96a8: e2504000 subs r4, r0, #0 ; 0x0
if (rtems_malloc_sbrk_helpers)
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
if ( !return_this ) {
errno = ENOMEM;
return (void *) 0;
96ac: 11a05004 movne r5, r4
* If this fails then return a NULL pointer.
*/
return_this = _Protected_heap_Allocate( &RTEMS_Malloc_Heap, size );
if ( !return_this ) {
96b0: 0a000015 beq 970c <malloc+0xa4>
}
/*
* If the user wants us to dirty the allocated memory, then do it.
*/
if ( rtems_malloc_dirty_helper )
96b4: e59f3090 ldr r3, [pc, #144] ; 974c <malloc+0xe4>
96b8: e5933000 ldr r3, [r3]
96bc: e3530000 cmp r3, #0 ; 0x0
(*rtems_malloc_dirty_helper)( return_this, size );
96c0: 11a01006 movne r1, r6
96c4: 11a00005 movne r0, r5
96c8: 11a0e00f movne lr, pc
96cc: 112fff13 bxne r3
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
96d0: e59f3078 ldr r3, [pc, #120] ; 9750 <malloc+0xe8>
96d4: e5933000 ldr r3, [r3]
96d8: e3530000 cmp r3, #0 ; 0x0
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
96dc: 11a00005 movne r0, r5
96e0: 11a0e00f movne lr, pc
96e4: 1593f004 ldrne pc, [r3, #4]
96e8: e1a04005 mov r4, r5
if (rtems_malloc_boundary_helpers)
(*rtems_malloc_boundary_helpers->at_malloc)(return_this, size);
#endif
return return_this;
}
96ec: e1a00004 mov r0, r4
96f0: e8bd8070 pop {r4, r5, r6, pc}
return (void *) 0;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
96f4: ebffffbb bl 95e8 <malloc_is_system_state_OK>
96f8: e3500000 cmp r0, #0 ; 0x0
96fc: 1affffe6 bne 969c <malloc+0x34>
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
9700: e3a04000 mov r4, #0 ; 0x0
if (rtems_malloc_boundary_helpers)
(*rtems_malloc_boundary_helpers->at_malloc)(return_this, size);
#endif
return return_this;
}
9704: e1a00004 mov r0, r4
9708: e8bd8070 pop {r4, r5, r6, pc}
*/
return_this = _Protected_heap_Allocate( &RTEMS_Malloc_Heap, size );
if ( !return_this ) {
if (rtems_malloc_sbrk_helpers)
970c: e59f3040 ldr r3, [pc, #64] ; 9754 <malloc+0xec>
9710: e5933000 ldr r3, [r3]
9714: e3530000 cmp r3, #0 ; 0x0
9718: 0a000004 beq 9730 <malloc+0xc8>
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
971c: e1a00006 mov r0, r6 <== NOT EXECUTED
9720: e1a0e00f mov lr, pc <== NOT EXECUTED
9724: e593f004 ldr pc, [r3, #4] <== NOT EXECUTED
if ( !return_this ) {
9728: e2505000 subs r5, r0, #0 ; 0x0 <== NOT EXECUTED
972c: 1affffe0 bne 96b4 <malloc+0x4c> <== NOT EXECUTED
errno = ENOMEM;
9730: eb000a33 bl c004 <__errno>
9734: e3a0300c mov r3, #12 ; 0xc
9738: e5803000 str r3, [r0]
973c: eaffffea b 96ec <malloc+0x84>
00009634 <malloc_deferred_free>:
}
void malloc_deferred_free(
void *pointer
)
{
9634: 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 );
9638: e59f0000 ldr r0, [pc, #0] ; 9640 <malloc_deferred_free+0xc><== NOT EXECUTED
963c: eaffef26 b 52dc <_Chain_Append> <== NOT EXECUTED
00009644 <malloc_deferred_frees_process>:
{
rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list);
}
void malloc_deferred_frees_process(void)
{
9644: e52de004 push {lr} ; (str lr, [sp, #-4]!)
9648: ea000000 b 9650 <malloc_deferred_frees_process+0xc>
/*
* If some free's have been deferred, then do them now.
*/
while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL)
free(to_be_freed);
964c: ebfffe95 bl 90a8 <free> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
9650: e59f000c ldr r0, [pc, #12] ; 9664 <malloc_deferred_frees_process+0x20>
9654: eb00041d bl a6d0 <_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)
9658: e3500000 cmp r0, #0 ; 0x0
965c: 1afffffa bne 964c <malloc_deferred_frees_process+0x8>
free(to_be_freed);
}
9660: e49df004 pop {pc} ; (ldr pc, [sp], #4)
0000cc44 <memfile_free_blocks_in_table>:
void memfile_free_blocks_in_table(
block_p **block_table,
int entries
)
{
cc44: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
/*
* Perform internal consistency checks
*/
assert( block_table );
cc48: e250a000 subs sl, r0, #0 ; 0x0
void memfile_free_blocks_in_table(
block_p **block_table,
int entries
)
{
cc4c: e1a07001 mov r7, r1
/*
* Perform internal consistency checks
*/
assert( block_table );
cc50: 0a000014 beq cca8 <memfile_free_blocks_in_table+0x64>
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
cc54: e3510000 cmp r1, #0 ; 0x0
/*
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
cc58: e59a6000 ldr r6, [sl]
for ( i=0 ; i<entries ; i++ ) {
cc5c: da00000c ble cc94 <memfile_free_blocks_in_table+0x50>
cc60: e3a05000 mov r5, #0 ; 0x0
cc64: e1a04005 mov r4, r5
if ( b[i] ) {
memfile_free_block( b[i] );
b[i] = 0;
cc68: e1a08005 mov r8, r5
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
if ( b[i] ) {
cc6c: e7960004 ldr r0, [r6, r4]
cc70: e3500000 cmp r0, #0 ; 0x0
cc74: 0a000001 beq cc80 <memfile_free_blocks_in_table+0x3c>
memfile_free_block( b[i] );
cc78: ebffff38 bl c960 <memfile_free_block>
b[i] = 0;
cc7c: e7868004 str r8, [r6, r4]
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
cc80: e2855001 add r5, r5, #1 ; 0x1
cc84: e1570005 cmp r7, r5
cc88: e2844004 add r4, r4, #4 ; 0x4
cc8c: cafffff6 bgt cc6c <memfile_free_blocks_in_table+0x28>
cc90: e59a6000 ldr r6, [sl]
/*
* Now that all the blocks in the block table are free, we can
* free the block table itself.
*/
memfile_free_block( *block_table );
cc94: e1a00006 mov r0, r6
cc98: ebffff30 bl c960 <memfile_free_block>
*block_table = 0;
cc9c: e3a03000 mov r3, #0 ; 0x0
cca0: e58a3000 str r3, [sl]
}
cca4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
/*
* Perform internal consistency checks
*/
assert( block_table );
cca8: e3a01e1b mov r1, #432 ; 0x1b0 <== NOT EXECUTED
ccac: e2811001 add r1, r1, #1 ; 0x1 <== NOT EXECUTED
ccb0: e59f0008 ldr r0, [pc, #8] ; ccc0 <memfile_free_blocks_in_table+0x7c><== NOT EXECUTED
ccb4: e59f2008 ldr r2, [pc, #8] ; ccc4 <memfile_free_blocks_in_table+0x80><== NOT EXECUTED
ccb8: e59f3008 ldr r3, [pc, #8] ; ccc8 <memfile_free_blocks_in_table+0x84><== NOT EXECUTED
ccbc: ebfff7d0 bl ac04 <__assert_func> <== NOT EXECUTED
0000d0ec <memfile_ftruncate>:
int memfile_ftruncate(
rtems_libio_t *iop,
off_t length
)
{
d0ec: e92d4010 push {r4, lr}
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
d0f0: e590402c ldr r4, [r0, #44]
* 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 )
d0f4: e5943050 ldr r3, [r4, #80]
d0f8: e1530001 cmp r3, r1
int memfile_ftruncate(
rtems_libio_t *iop,
off_t length
)
{
d0fc: e24dd008 sub sp, sp, #8 ; 0x8
* 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 )
d100: ba000009 blt d12c <memfile_ftruncate+0x40>
* 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;
d104: e5841050 str r1, [r4, #80]
iop->size = the_jnode->info.file.size;
d108: e5801004 str r1, [r0, #4]
IMFS_update_atime( the_jnode );
d10c: e1a0000d mov r0, sp
d110: e3a01000 mov r1, #0 ; 0x0
d114: ebffd60a bl 2944 <gettimeofday>
d118: e59d3000 ldr r3, [sp]
d11c: e5843040 str r3, [r4, #64]
d120: e3a00000 mov r0, #0 ; 0x0
return 0;
}
d124: e28dd008 add sp, sp, #8 ; 0x8
d128: e8bd8010 pop {r4, pc}
* and the new length is greater than the current size. We treat this
* as an extend operation.
*/
if ( length > the_jnode->info.file.size )
return IMFS_memfile_extend( the_jnode, length );
d12c: e1a00004 mov r0, r4 <== NOT EXECUTED
d130: ebffffa0 bl cfb8 <IMFS_memfile_extend> <== NOT EXECUTED
d134: eafffffa b d124 <memfile_ftruncate+0x38> <== NOT EXECUTED
0000d138 <memfile_lseek>:
off_t memfile_lseek(
rtems_libio_t *iop,
off_t offset,
int whence
)
{
d138: e92d4030 push {r4, r5, lr}
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
d13c: e590402c ldr r4, [r0, #44]
if (the_jnode->type == IMFS_LINEAR_FILE) {
d140: e594304c ldr r3, [r4, #76]
d144: e3530006 cmp r3, #6 ; 0x6
off_t memfile_lseek(
rtems_libio_t *iop,
off_t offset,
int whence
)
{
d148: e1a05000 mov r5, r0
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
if (the_jnode->type == IMFS_LINEAR_FILE) {
d14c: 1a000005 bne d168 <memfile_lseek+0x30>
if (iop->offset > the_jnode->info.linearfile.size)
d150: e5943050 ldr r3, [r4, #80] <== NOT EXECUTED
d154: e5900008 ldr r0, [r0, #8] <== NOT EXECUTED
d158: e1500003 cmp r0, r3 <== NOT EXECUTED
iop->offset = the_jnode->info.linearfile.size;
d15c: c5853008 strgt r3, [r5, #8] <== NOT EXECUTED
d160: c1a00003 movgt r0, r3 <== NOT EXECUTED
d164: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
}
else { /* Must be a block file (IMFS_MEMORY_FILE). */
if (IMFS_memfile_extend( the_jnode, iop->offset ))
d168: e1a00004 mov r0, r4
d16c: e5951008 ldr r1, [r5, #8]
d170: ebffff90 bl cfb8 <IMFS_memfile_extend>
d174: e3500000 cmp r0, #0 ; 0x0
d178: 1a000003 bne d18c <memfile_lseek+0x54>
rtems_set_errno_and_return_minus_one( ENOSPC );
iop->size = the_jnode->info.file.size;
d17c: e5943050 ldr r3, [r4, #80]
d180: e5950008 ldr r0, [r5, #8]
d184: e5853004 str r3, [r5, #4]
}
return iop->offset;
}
d188: e8bd8030 pop {r4, r5, pc}
if (iop->offset > the_jnode->info.linearfile.size)
iop->offset = the_jnode->info.linearfile.size;
}
else { /* Must be a block file (IMFS_MEMORY_FILE). */
if (IMFS_memfile_extend( the_jnode, iop->offset ))
rtems_set_errno_and_return_minus_one( ENOSPC );
d18c: eb00051c bl e604 <__errno> <== NOT EXECUTED
d190: e3a0301c mov r3, #28 ; 0x1c <== NOT EXECUTED
d194: e5803000 str r3, [r0] <== NOT EXECUTED
d198: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
d19c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
0000d404 <memfile_open>:
the_jnode = iop->file_info;
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
d404: e590200c ldr r2, [r0, #12]
d408: e3120f81 tst r2, #516 ; 0x204
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
d40c: e92d4030 push {r4, r5, lr}
d410: e1a05000 mov r5, r0
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
d414: e590402c ldr r4, [r0, #44]
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
d418: 0a000002 beq d428 <memfile_open+0x24>
d41c: e594304c ldr r3, [r4, #76]
d420: e3530006 cmp r3, #6 ; 0x6
d424: 0a000006 beq d444 <memfile_open+0x40>
the_jnode->info.file.triply_indirect = 0;
if ((count != 0)
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
return -1;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
d428: e3120c02 tst r2, #512 ; 0x200
iop->offset = the_jnode->info.file.size;
d42c: 15943050 ldrne r3, [r4, #80]
d430: 15853008 strne r3, [r5, #8]
iop->size = the_jnode->info.file.size;
d434: e5943050 ldr r3, [r4, #80]
d438: e3a00000 mov r0, #0 ; 0x0
d43c: e5853004 str r3, [r5, #4]
return 0;
}
d440: e8bd8030 pop {r4, r5, pc}
/*
* 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;
d444: e5940050 ldr r0, [r4, #80] <== NOT EXECUTED
const unsigned char *buffer = the_jnode->info.linearfile.direct;
the_jnode->type = IMFS_MEMORY_FILE;
the_jnode->info.file.size = 0;
d448: e3a01000 mov r1, #0 ; 0x0 <== 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;
d44c: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED
the_jnode->info.file.size = 0;
the_jnode->info.file.indirect = 0;
the_jnode->info.file.doubly_indirect = 0;
the_jnode->info.file.triply_indirect = 0;
if ((count != 0)
d450: e3500000 cmp r0, #0 ; 0x0 <== 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;
d454: e5942054 ldr r2, [r4, #84] <== NOT EXECUTED
the_jnode->type = IMFS_MEMORY_FILE;
d458: e584304c str r3, [r4, #76] <== NOT EXECUTED
the_jnode->info.file.size = 0;
d45c: e5841050 str r1, [r4, #80] <== NOT EXECUTED
the_jnode->info.file.indirect = 0;
the_jnode->info.file.doubly_indirect = 0;
d460: e5841058 str r1, [r4, #88] <== NOT EXECUTED
the_jnode->info.file.triply_indirect = 0;
d464: e584105c str r1, [r4, #92] <== NOT EXECUTED
uint32_t count = the_jnode->info.linearfile.size;
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;
d468: e5841054 str r1, [r4, #84] <== NOT EXECUTED
the_jnode->info.file.doubly_indirect = 0;
the_jnode->info.file.triply_indirect = 0;
if ((count != 0)
d46c: 0595200c ldreq r2, [r5, #12] <== NOT EXECUTED
d470: 0affffec beq d428 <memfile_open+0x24> <== NOT EXECUTED
d474: e1a03000 mov r3, r0 <== NOT EXECUTED
d478: e1a00004 mov r0, r4 <== NOT EXECUTED
d47c: ebffff47 bl d1a0 <IMFS_memfile_write> <== NOT EXECUTED
d480: e3700001 cmn r0, #1 ; 0x1 <== NOT EXECUTED
d484: 08bd8030 popeq {r4, r5, pc} <== NOT EXECUTED
d488: e595200c ldr r2, [r5, #12] <== NOT EXECUTED
d48c: eaffffe5 b d428 <memfile_open+0x24> <== NOT EXECUTED
0000167c <mknod>:
int mknod(
const char *pathname,
mode_t mode,
dev_t dev
)
{
167c: e92d41f0 push {r4, r5, r6, r7, r8, lr}
1680: e1a08001 mov r8, r1
int result;
/*
* The file type is field within the mode. Check we have a sane mode set.
*/
switch (mode & S_IFMT) {
1684: e2011a0f and r1, r1, #61440 ; 0xf000
1688: e3510901 cmp r1, #16384 ; 0x4000
int mknod(
const char *pathname,
mode_t mode,
dev_t dev
)
{
168c: e24dd018 sub sp, sp, #24 ; 0x18
1690: e1a05000 mov r5, r0
1694: e1a06002 mov r6, r2
1698: e1a07003 mov r7, r3
int result;
/*
* The file type is field within the mode. Check we have a sane mode set.
*/
switch (mode & S_IFMT) {
169c: 0a00000d beq 16d8 <mknod+0x5c>
16a0: 9a000008 bls 16c8 <mknod+0x4c>
16a4: e3510a06 cmp r1, #24576 ; 0x6000
16a8: 0a00000a beq 16d8 <mknod+0x5c>
16ac: e3510902 cmp r1, #32768 ; 0x8000
16b0: 0a000008 beq 16d8 <mknod+0x5c>
case S_IFBLK:
case S_IFREG:
case S_IFIFO:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
16b4: eb002a52 bl c004 <__errno> <== NOT EXECUTED
16b8: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED
16bc: e5803000 str r3, [r0] <== NOT EXECUTED
16c0: e3e05000 mvn r5, #0 ; 0x0 <== NOT EXECUTED
16c4: ea00003c b 17bc <mknod+0x140> <== NOT EXECUTED
int result;
/*
* The file type is field within the mode. Check we have a sane mode set.
*/
switch (mode & S_IFMT) {
16c8: e3510a01 cmp r1, #4096 ; 0x1000
16cc: 0a000036 beq 17ac <mknod+0x130>
16d0: e3510a02 cmp r1, #8192 ; 0x2000
16d4: 1afffff6 bne 16b4 <mknod+0x38>
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( S_ISFIFO(mode) )
16d8: e3510a01 cmp r1, #4096 ; 0x1000
16dc: 0a000032 beq 17ac <mknod+0x130>
rtems_set_errno_and_return_minus_one( ENOTSUP );
rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
16e0: e5d53000 ldrb r3, [r5]
16e4: e353005c cmp r3, #92 ; 0x5c
16e8: 1353002f cmpne r3, #47 ; 0x2f
16ec: 13a0e000 movne lr, #0 ; 0x0
16f0: 03a0e001 moveq lr, #1 ; 0x1
16f4: 1a000033 bne 17c8 <mknod+0x14c>
16f8: e59f30f0 ldr r3, [pc, #240] ; 17f0 <mknod+0x174>
16fc: e593c000 ldr ip, [r3]
1700: e28cc014 add ip, ip, #20 ; 0x14
1704: e89c000f ldm ip, {r0, r1, r2, r3}
1708: e28d4004 add r4, sp, #4 ; 0x4
170c: e884000f stm r4, {r0, r1, r2, r3}
1710: e3a02001 mov r2, #1 ; 0x1
if ( !temp_loc.ops->evalformake_h ) {
1714: e59d300c ldr r3, [sp, #12]
1718: e5933004 ldr r3, [r3, #4]
171c: e3530000 cmp r3, #0 ; 0x0
1720: 0a000021 beq 17ac <mknod+0x130>
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*temp_loc.ops->evalformake_h)(
1724: e0850002 add r0, r5, r2
1728: e1a01004 mov r1, r4
172c: e28d2014 add r2, sp, #20 ; 0x14
1730: e1a0e00f mov lr, pc
1734: e12fff13 bx r3
&pathname[i],
&temp_loc,
&name_start
);
if ( result != 0 )
1738: e3500000 cmp r0, #0 ; 0x0
173c: 1a00001d bne 17b8 <mknod+0x13c>
return -1;
if ( !temp_loc.ops->mknod_h ) {
1740: e59d300c ldr r3, [sp, #12]
1744: e593c014 ldr ip, [r3, #20]
1748: e35c0000 cmp ip, #0 ; 0x0
174c: 0a000011 beq 1798 <mknod+0x11c>
rtems_filesystem_freenode( &temp_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
1750: e1a03007 mov r3, r7
1754: e58d4000 str r4, [sp]
1758: e59d0014 ldr r0, [sp, #20]
175c: e1a01008 mov r1, r8
1760: e1a02006 mov r2, r6
1764: e1a0e00f mov lr, pc
1768: e12fff1c bx ip
rtems_filesystem_freenode( &temp_loc );
176c: e59d300c ldr r3, [sp, #12]
1770: e3530000 cmp r3, #0 ; 0x0
if ( !temp_loc.ops->mknod_h ) {
rtems_filesystem_freenode( &temp_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
1774: e1a05000 mov r5, r0
rtems_filesystem_freenode( &temp_loc );
1778: 0a00000f beq 17bc <mknod+0x140>
177c: e593301c ldr r3, [r3, #28]
1780: e3530000 cmp r3, #0 ; 0x0
1784: 0a00000c beq 17bc <mknod+0x140>
1788: e1a00004 mov r0, r4
178c: e1a0e00f mov lr, pc
1790: e12fff13 bx r3
1794: ea000008 b 17bc <mknod+0x140>
);
if ( result != 0 )
return -1;
if ( !temp_loc.ops->mknod_h ) {
rtems_filesystem_freenode( &temp_loc );
1798: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
179c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
17a0: 11a00004 movne r0, r4 <== NOT EXECUTED
17a4: 11a0e00f movne lr, pc <== NOT EXECUTED
17a8: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
17ac: eb002a14 bl c004 <__errno>
17b0: e3a03086 mov r3, #134 ; 0x86
17b4: e5803000 str r3, [r0]
17b8: e3e05000 mvn r5, #0 ; 0x0
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
rtems_filesystem_freenode( &temp_loc );
return result;
}
17bc: e1a00005 mov r0, r5
17c0: e28dd018 add sp, sp, #24 ; 0x18
17c4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
}
if ( S_ISFIFO(mode) )
rtems_set_errno_and_return_minus_one( ENOTSUP );
rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
17c8: e3530000 cmp r3, #0 ; 0x0
17cc: 0affffc9 beq 16f8 <mknod+0x7c>
17d0: e59f3018 ldr r3, [pc, #24] ; 17f0 <mknod+0x174>
17d4: e593c000 ldr ip, [r3]
17d8: e28cc004 add ip, ip, #4 ; 0x4
17dc: e89c000f ldm ip, {r0, r1, r2, r3}
17e0: e28d4004 add r4, sp, #4 ; 0x4
17e4: e884000f stm r4, {r0, r1, r2, r3}
17e8: e1a0200e mov r2, lr
17ec: eaffffc8 b 1714 <mknod+0x98>
00009784 <mount>:
const rtems_filesystem_operations_table *fs_ops,
rtems_filesystem_options_t options,
const char *device,
const char *mount_point
)
{
9784: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
/*
* Is there a file system operations table?
*/
if ( fs_ops == NULL ) {
9788: e251a000 subs sl, r1, #0 ; 0x0
const rtems_filesystem_operations_table *fs_ops,
rtems_filesystem_options_t options,
const char *device,
const char *mount_point
)
{
978c: e24dd010 sub sp, sp, #16 ; 0x10
9790: e1a09000 mov r9, r0
9794: e1a07002 mov r7, r2
9798: e1a05003 mov r5, r3
979c: e59d6030 ldr r6, [sp, #48]
/*
* Is there a file system operations table?
*/
if ( fs_ops == NULL ) {
97a0: 0a000093 beq 99f4 <mount+0x270>
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
97a4: e3520001 cmp r2, #1 ; 0x1
97a8: 8a000091 bhi 99f4 <mount+0x270>
errno = EINVAL;
return -1;
}
/* Do they support being mounted at all ? */
if ( !fs_ops->fsmount_me_h ) {
97ac: e59a4024 ldr r4, [sl, #36]
97b0: e3540000 cmp r4, #0 ; 0x0
97b4: 0a000032 beq 9884 <mount+0x100>
/*
* Allocate a mount table entry
*/
size = sizeof(rtems_filesystem_mount_table_entry_t);
if ( device )
97b8: e3530000 cmp r3, #0 ; 0x0
97bc: 03a00064 moveq r0, #100 ; 0x64
97c0: 0a000002 beq 97d0 <mount+0x4c>
size += strlen( device ) + 1;
97c4: e1a00003 mov r0, r3 <== NOT EXECUTED
97c8: eb000f43 bl d4dc <strlen> <== NOT EXECUTED
97cc: e2800065 add r0, r0, #101 ; 0x65 <== NOT EXECUTED
temp_mt_entry = malloc( size );
97d0: ebffffa4 bl 9668 <malloc>
if ( !temp_mt_entry ) {
97d4: e3500000 cmp r0, #0 ; 0x0
*/
size = sizeof(rtems_filesystem_mount_table_entry_t);
if ( device )
size += strlen( device ) + 1;
temp_mt_entry = malloc( size );
97d8: e1a04000 mov r4, r0
97dc: e1a08000 mov r8, r0
if ( !temp_mt_entry ) {
97e0: 0a000088 beq 9a08 <mount+0x284>
return -1;
}
temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry;
temp_mt_entry->options = options;
if ( device ) {
97e4: e3550000 cmp r5, #0 ; 0x0
errno = ENOMEM;
return -1;
}
temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry;
temp_mt_entry->options = options;
97e8: e5807028 str r7, [r0, #40]
if ( !temp_mt_entry ) {
errno = ENOMEM;
return -1;
}
temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry;
97ec: e5840024 str r0, [r4, #36]
if ( device ) {
temp_mt_entry->dev =
(char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t );
strcpy( temp_mt_entry->dev, device );
} else
temp_mt_entry->dev = 0;
97f0: 05805060 streq r5, [r0, #96]
return -1;
}
temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry;
temp_mt_entry->options = options;
if ( device ) {
97f4: 0a000004 beq 980c <mount+0x88>
temp_mt_entry->dev =
97f8: e2803064 add r3, r0, #100 ; 0x64 <== NOT EXECUTED
(char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t );
strcpy( temp_mt_entry->dev, device );
97fc: e1a00003 mov r0, r3 <== NOT EXECUTED
9800: e1a01005 mov r1, r5 <== NOT EXECUTED
}
temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry;
temp_mt_entry->options = options;
if ( device ) {
temp_mt_entry->dev =
9804: e5843060 str r3, [r4, #96] <== NOT EXECUTED
(char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t );
strcpy( temp_mt_entry->dev, device );
9808: eb000f05 bl d424 <strcpy> <== NOT EXECUTED
/*
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( mount_point ) {
980c: e3560000 cmp r6, #0 ; 0x0
9810: 0a000024 beq 98a8 <mount+0x124>
if ( rtems_filesystem_evaluate_path(
9814: e1a00006 mov r0, r6
9818: e3a01007 mov r1, #7 ; 0x7
981c: e1a0200d mov r2, sp
9820: e3a03001 mov r3, #1 ; 0x1
9824: ebffdeda bl 1394 <rtems_filesystem_evaluate_path>
9828: e3700001 cmn r0, #1 ; 0x1
982c: e1a0500d mov r5, sp
9830: 0a000017 beq 9894 <mount+0x110>
/*
* Test for node_type_h
*/
if (!loc.ops->node_type_h) {
9834: e59d3008 ldr r3, [sp, #8]
9838: e5933010 ldr r3, [r3, #16]
983c: e3530000 cmp r3, #0 ; 0x0
9840: 0a00005d beq 99bc <mount+0x238>
/*
* Test to see if it is a directory
*/
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
9844: e1a0000d mov r0, sp
9848: e1a0e00f mov lr, pc
984c: e12fff13 bx r3
9850: e3500001 cmp r0, #1 ; 0x1
9854: 0a00002c beq 990c <mount+0x188>
errno = ENOTDIR;
9858: eb0009e9 bl c004 <__errno>
985c: e3a03014 mov r3, #20 ; 0x14
9860: e5803000 str r3, [r0]
return 0;
cleanup_and_bail:
free( temp_mt_entry );
9864: e1a00004 mov r0, r4
9868: ebfffe0e bl 90a8 <free>
986c: e1a0500d mov r5, sp
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
9870: e5953008 ldr r3, [r5, #8]
9874: e3530000 cmp r3, #0 ; 0x0
9878: 1a000053 bne 99cc <mount+0x248>
987c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
9880: ea000006 b 98a0 <mount+0x11c> <== NOT EXECUTED
return -1;
}
/* Do they support being mounted at all ? */
if ( !fs_ops->fsmount_me_h ) {
errno = ENOTSUP;
9884: eb0009de bl c004 <__errno> <== NOT EXECUTED
9888: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
988c: e5803000 str r3, [r0] <== NOT EXECUTED
9890: e1a08004 mov r8, r4 <== NOT EXECUTED
return 0;
cleanup_and_bail:
free( temp_mt_entry );
9894: e1a00008 mov r0, r8 <== NOT EXECUTED
9898: ebfffe02 bl 90a8 <free> <== NOT EXECUTED
989c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
}
98a0: e28dd010 add sp, sp, #16 ; 0x10
98a4: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
* This is a mount of the base file system --> The
* mt_point_node.node_access will be set to null to indicate that this
* is the root of the entire file system.
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
98a8: e5846018 str r6, [r4, #24]
temp_mt_entry->mt_fs_root.handlers = NULL;
98ac: e584601c str r6, [r4, #28]
temp_mt_entry->mt_fs_root.ops = NULL;
98b0: e5846020 str r6, [r4, #32]
temp_mt_entry->mt_point_node.node_access = NULL;
98b4: e5846008 str r6, [r4, #8]
temp_mt_entry->mt_point_node.handlers = NULL;
98b8: e584600c str r6, [r4, #12]
temp_mt_entry->mt_point_node.ops = NULL;
98bc: e5846010 str r6, [r4, #16]
temp_mt_entry->mt_point_node.mt_entry = NULL;
98c0: e5846014 str r6, [r4, #20]
98c4: e1a05006 mov r5, r6
}
if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) {
98c8: e1a00004 mov r0, r4
98cc: e1a0e00f mov lr, pc
98d0: e59af024 ldr pc, [sl, #36]
98d4: e2506000 subs r6, r0, #0 ; 0x0
98d8: 0a00002b beq 998c <mount+0x208>
/* try to undo the mount operation */
if ( loc.ops->unmount_h ) {
98dc: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
98e0: e5933028 ldr r3, [r3, #40] <== NOT EXECUTED
98e4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
loc.ops->unmount_h( temp_mt_entry );
98e8: 11a00004 movne r0, r4 <== NOT EXECUTED
98ec: 11a0e00f movne lr, pc <== NOT EXECUTED
98f0: 112fff13 bxne r3 <== NOT EXECUTED
return 0;
cleanup_and_bail:
free( temp_mt_entry );
98f4: e1a00004 mov r0, r4 <== NOT EXECUTED
98f8: ebfffdea bl 90a8 <free> <== NOT EXECUTED
if ( loc_to_free )
98fc: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED
9900: 1affffda bne 9870 <mount+0xec> <== NOT EXECUTED
rtems_filesystem_freenode( loc_to_free );
9904: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
9908: eaffffe4 b 98a0 <mount+0x11c> <== NOT EXECUTED
/*
* For each mount table entry
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
990c: e59f1108 ldr r1, [pc, #264] ; 9a1c <mount+0x298>
9910: e4912004 ldr r2, [r1], #4
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node );
9914: e1520001 cmp r2, r1
9918: 0a000033 beq 99ec <mount+0x268>
the_node = the_node->next ) {
the_mount_entry = (rtems_filesystem_mount_table_entry_t *) the_node;
if ( the_mount_entry->mt_fs_root.node_access == loc->node_access )
991c: e59d0000 ldr r0, [sp]
9920: e5923018 ldr r3, [r2, #24]
9924: e1530000 cmp r3, r0
9928: 1a000003 bne 993c <mount+0x1b8>
992c: ea00001e b 99ac <mount+0x228> <== NOT EXECUTED
9930: e5923018 ldr r3, [r2, #24]
9934: e1530000 cmp r3, r0
9938: 0a00001b beq 99ac <mount+0x228>
* For each mount table entry
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node );
the_node = the_node->next ) {
993c: e5922000 ldr r2, [r2]
/*
* For each mount table entry
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node );
9940: e1520001 cmp r2, r1
9944: 1afffff9 bne 9930 <mount+0x1ac>
* traverse the tree.
*/
temp_mt_entry->mt_point_node.node_access = loc.node_access;
temp_mt_entry->mt_point_node.handlers = loc.handlers;
temp_mt_entry->mt_point_node.ops = loc.ops;
9948: e59d3008 ldr r3, [sp, #8]
/*
* This link to the parent is only done when we are dealing with system
* below the base file system
*/
if ( !loc.ops->mount_h ){
994c: e593c020 ldr ip, [r3, #32]
* until the system is unmounted. It may be needed to correctly
* traverse the tree.
*/
temp_mt_entry->mt_point_node.node_access = loc.node_access;
temp_mt_entry->mt_point_node.handlers = loc.handlers;
9950: e59d2004 ldr r2, [sp, #4]
temp_mt_entry->mt_point_node.ops = loc.ops;
temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry;
9954: e59d100c ldr r1, [sp, #12]
/*
* This link to the parent is only done when we are dealing with system
* below the base file system
*/
if ( !loc.ops->mount_h ){
9958: e35c0000 cmp ip, #0 ; 0x0
* 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.
*/
temp_mt_entry->mt_point_node.node_access = loc.node_access;
995c: e5840008 str r0, [r4, #8]
temp_mt_entry->mt_point_node.handlers = loc.handlers;
9960: e584200c str r2, [r4, #12]
temp_mt_entry->mt_point_node.ops = loc.ops;
temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry;
9964: e5841014 str r1, [r4, #20]
* traverse the tree.
*/
temp_mt_entry->mt_point_node.node_access = loc.node_access;
temp_mt_entry->mt_point_node.handlers = loc.handlers;
temp_mt_entry->mt_point_node.ops = loc.ops;
9968: e5843010 str r3, [r4, #16]
/*
* This link to the parent is only done when we are dealing with system
* below the base file system
*/
if ( !loc.ops->mount_h ){
996c: 0a000012 beq 99bc <mount+0x238>
errno = ENOTSUP;
goto cleanup_and_bail;
}
if ( loc.ops->mount_h( temp_mt_entry ) ) {
9970: e1a00004 mov r0, r4
9974: e1a0e00f mov lr, pc
9978: e12fff1c bx ip
997c: e3500000 cmp r0, #0 ; 0x0
goto cleanup_and_bail;
9980: 01a0500d moveq r5, sp
if ( !loc.ops->mount_h ){
errno = ENOTSUP;
goto cleanup_and_bail;
}
if ( loc.ops->mount_h( temp_mt_entry ) ) {
9984: 0affffcf beq 98c8 <mount+0x144>
9988: eaffffb5 b 9864 <mount+0xe0> <== 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 );
998c: e59f0088 ldr r0, [pc, #136] ; 9a1c <mount+0x298>
9990: e1a01004 mov r1, r4
9994: ebffee50 bl 52dc <_Chain_Append>
*/
rtems_chain_append( &rtems_filesystem_mount_table_control,
&temp_mt_entry->Node );
if ( mt_entry )
9998: e3590000 cmp r9, #0 ; 0x0
999c: 01a00009 moveq r0, r9
*mt_entry = temp_mt_entry;
99a0: 15894000 strne r4, [r9]
99a4: 11a00006 movne r0, r6
99a8: eaffffbc b 98a0 <mount+0x11c>
/*
* You can only mount one file system onto a single mount point.
*/
if ( Is_node_fs_root( &loc ) ){
errno = EBUSY;
99ac: eb000994 bl c004 <__errno>
99b0: e3a03010 mov r3, #16 ; 0x10
99b4: e5803000 str r3, [r0]
99b8: eaffffa9 b 9864 <mount+0xe0>
* This link to the parent is only done when we are dealing with system
* below the base file system
*/
if ( !loc.ops->mount_h ){
errno = ENOTSUP;
99bc: eb000990 bl c004 <__errno> <== NOT EXECUTED
99c0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
99c4: e5803000 str r3, [r0] <== NOT EXECUTED
99c8: eaffffa5 b 9864 <mount+0xe0> <== NOT EXECUTED
cleanup_and_bail:
free( temp_mt_entry );
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
99cc: e593301c ldr r3, [r3, #28]
99d0: e3530000 cmp r3, #0 ; 0x0
99d4: 0affffa8 beq 987c <mount+0xf8>
99d8: e1a00005 mov r0, r5
99dc: e1a0e00f mov lr, pc
99e0: e12fff13 bx r3
99e4: e3e00000 mvn r0, #0 ; 0x0
99e8: eaffffac b 98a0 <mount+0x11c>
99ec: e59d0000 ldr r0, [sp] <== NOT EXECUTED
99f0: eaffffd4 b 9948 <mount+0x1c4> <== NOT EXECUTED
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
options != RTEMS_FILESYSTEM_READ_WRITE ) {
errno = EINVAL;
99f4: eb000982 bl c004 <__errno>
99f8: e3a03016 mov r3, #22 ; 0x16
99fc: e5803000 str r3, [r0]
9a00: e3e00000 mvn r0, #0 ; 0x0
9a04: eaffffa5 b 98a0 <mount+0x11c>
if ( device )
size += strlen( device ) + 1;
temp_mt_entry = malloc( size );
if ( !temp_mt_entry ) {
errno = ENOMEM;
9a08: eb00097d bl c004 <__errno> <== NOT EXECUTED
9a0c: e3a0300c mov r3, #12 ; 0xc <== NOT EXECUTED
9a10: e5803000 str r3, [r0] <== NOT EXECUTED
9a14: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
9a18: eaffffa0 b 98a0 <mount+0x11c> <== NOT EXECUTED
0000a040 <nanosleep>:
int nanosleep(
const struct timespec *rqtp,
struct timespec *rmtp
)
{
a040: e92d4070 push {r4, r5, r6, lr}
a044: e1a06001 mov r6, r1
a048: e1a04000 mov r4, r0
Watchdog_Interval ticks;
if ( !_Timespec_Is_valid( rqtp ) )
a04c: eb0005a5 bl b6e8 <_Timespec_Is_valid>
a050: e3500000 cmp r0, #0 ; 0x0
a054: 0a000038 beq a13c <nanosleep+0xfc>
* Return EINVAL if the delay interval is negative.
*
* NOTE: This behavior is beyond the POSIX specification.
* FSU and GNU/Linux pthreads shares this behavior.
*/
if ( rqtp->tv_sec < 0 || rqtp->tv_nsec < 0 )
a058: e5943000 ldr r3, [r4]
a05c: e3530000 cmp r3, #0 ; 0x0
a060: ba000035 blt a13c <nanosleep+0xfc>
a064: e5943004 ldr r3, [r4, #4]
a068: e3530000 cmp r3, #0 ; 0x0
a06c: ba000032 blt a13c <nanosleep+0xfc>
rtems_set_errno_and_return_minus_one( EINVAL );
ticks = _Timespec_To_ticks( rqtp );
a070: e1a00004 mov r0, r4
a074: eb0005ac bl b72c <_Timespec_To_ticks>
* A nanosleep for zero time is implemented as a yield.
* This behavior is also beyond the POSIX specification but is
* consistent with the RTEMS API and yields desirable behavior.
*/
if ( !ticks ) {
a078: e2505000 subs r5, r0, #0 ; 0x0
a07c: 0a000022 beq a10c <nanosleep+0xcc>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a080: e59f20dc ldr r2, [pc, #220] ; a164 <nanosleep+0x124>
a084: e5923000 ldr r3, [r2]
a088: e2833001 add r3, r3, #1 ; 0x1
a08c: e5823000 str r3, [r2]
/*
* Block for the desired amount of time
*/
_Thread_Disable_dispatch();
_Thread_Set_state(
a090: e59f40d0 ldr r4, [pc, #208] ; a168 <nanosleep+0x128>
a094: e3a01281 mov r1, #268435464 ; 0x10000008
a098: e5940000 ldr r0, [r4]
a09c: ebfff5a5 bl 7738 <_Thread_Set_state>
_Thread_Executing,
STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Watchdog_Initialize(
a0a0: e5943000 ldr r3, [r4]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
a0a4: e59f20c0 ldr r2, [pc, #192] ; a16c <nanosleep+0x12c>
a0a8: e5931008 ldr r1, [r3, #8]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a0ac: e3a00000 mov r0, #0 ; 0x0
the_watchdog->routine = routine;
the_watchdog->id = id;
a0b0: e5831068 str r1, [r3, #104]
the_watchdog->user_data = user_data;
a0b4: e583006c str r0, [r3, #108]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a0b8: e5830050 str r0, [r3, #80]
the_watchdog->routine = routine;
a0bc: e5832064 str r2, [r3, #100]
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a0c0: e2831048 add r1, r3, #72 ; 0x48
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
a0c4: e5835054 str r5, [r3, #84]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a0c8: e59f00a0 ldr r0, [pc, #160] ; a170 <nanosleep+0x130>
a0cc: ebfff7ca bl 7ffc <_Watchdog_Insert>
_Thread_Delay_ended,
_Thread_Executing->Object.id,
NULL
);
_Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks );
_Thread_Enable_dispatch();
a0d0: ebfff314 bl 6d28 <_Thread_Enable_dispatch>
/* calculate time remaining */
if ( rmtp ) {
a0d4: e3560000 cmp r6, #0 ; 0x0
a0d8: 0a000009 beq a104 <nanosleep+0xc4>
ticks -=
a0dc: e5943000 ldr r3, [r4]
a0e0: e283205c add r2, r3, #92 ; 0x5c
a0e4: e8920014 ldm r2, {r2, r4}
a0e8: e0424004 sub r4, r2, r4
a0ec: e0844005 add r4, r4, r5
_Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time;
_Timespec_From_ticks( ticks, rmtp );
a0f0: e1a01006 mov r1, r6
a0f4: e1a00004 mov r0, r4
a0f8: eb000566 bl b698 <_Timespec_From_ticks>
/*
* If there is time remaining, then we were interrupted by a signal.
*/
if ( ticks )
a0fc: e3540000 cmp r4, #0 ; 0x0
a100: 1a000012 bne a150 <nanosleep+0x110>
rtems_set_errno_and_return_minus_one( EINTR );
a104: e3a00000 mov r0, #0 ; 0x0
}
return 0;
}
a108: e8bd8070 pop {r4, r5, r6, pc}
a10c: e59f2050 ldr r2, [pc, #80] ; a164 <nanosleep+0x124>
a110: e5923000 ldr r3, [r2]
a114: e2833001 add r3, r3, #1 ; 0x1
a118: e5823000 str r3, [r2]
* consistent with the RTEMS API and yields desirable behavior.
*/
if ( !ticks ) {
_Thread_Disable_dispatch();
_Thread_Yield_processor();
a11c: ebfff67e bl 7b1c <_Thread_Yield_processor>
_Thread_Enable_dispatch();
a120: ebfff300 bl 6d28 <_Thread_Enable_dispatch>
if ( rmtp ) {
a124: e3560000 cmp r6, #0 ; 0x0
rmtp->tv_sec = 0;
rmtp->tv_nsec = 0;
a128: 15865004 strne r5, [r6, #4]
if ( !ticks ) {
_Thread_Disable_dispatch();
_Thread_Yield_processor();
_Thread_Enable_dispatch();
if ( rmtp ) {
rmtp->tv_sec = 0;
a12c: 15865000 strne r5, [r6]
rmtp->tv_nsec = 0;
a130: 11a00005 movne r0, r5
if ( !ticks ) {
_Thread_Disable_dispatch();
_Thread_Yield_processor();
_Thread_Enable_dispatch();
if ( rmtp ) {
a134: 18bd8070 popne {r4, r5, r6, pc}
a138: eafffff1 b a104 <nanosleep+0xc4> <== NOT EXECUTED
*
* NOTE: This behavior is beyond the POSIX specification.
* FSU and GNU/Linux pthreads shares this behavior.
*/
if ( rqtp->tv_sec < 0 || rqtp->tv_nsec < 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
a13c: eb00094f bl c680 <__errno>
a140: e3a03016 mov r3, #22 ; 0x16
a144: e5803000 str r3, [r0]
a148: e3e00000 mvn r0, #0 ; 0x0
a14c: e8bd8070 pop {r4, r5, r6, pc}
/*
* If there is time remaining, then we were interrupted by a signal.
*/
if ( ticks )
rtems_set_errno_and_return_minus_one( EINTR );
a150: eb00094a bl c680 <__errno>
a154: e3a03004 mov r3, #4 ; 0x4
a158: e5803000 str r3, [r0]
a15c: e3e00000 mvn r0, #0 ; 0x0
a160: e8bd8070 pop {r4, r5, r6, pc}
00001880 <newlib_free_buffers>:
*/
int newlib_free_buffers(
FILE *fp
)
{
1880: e92d4010 push {r4, lr}
1884: e1a04000 mov r4, r0
switch ( fileno(fp) ) {
1888: eb002aaa bl c338 <fileno>
188c: e3500002 cmp r0, #2 ; 0x2
1890: 9a000003 bls 18a4 <newlib_free_buffers+0x24>
fp->_flags &= ~__SMBF;
fp->_bf._base = fp->_p = (unsigned char *) NULL;
}
break;
default:
fclose(fp);
1894: e1a00004 mov r0, r4 <== NOT EXECUTED
1898: eb002a2a bl c148 <fclose> <== NOT EXECUTED
}
return 0;
}
189c: e3a00000 mov r0, #0 ; 0x0
18a0: e8bd8010 pop {r4, pc}
{
switch ( fileno(fp) ) {
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
18a4: e1d430bc ldrh r3, [r4, #12]
18a8: e3130080 tst r3, #128 ; 0x80
18ac: 0afffffa beq 189c <newlib_free_buffers+0x1c>
free( fp->_bf._base );
18b0: e5940010 ldr r0, [r4, #16]
18b4: eb001dfb bl 90a8 <free>
fp->_flags &= ~__SMBF;
18b8: e1d430bc ldrh r3, [r4, #12]
fp->_bf._base = fp->_p = (unsigned char *) NULL;
18bc: e3a02000 mov r2, #0 ; 0x0
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
free( fp->_bf._base );
fp->_flags &= ~__SMBF;
18c0: e3c33080 bic r3, r3, #128 ; 0x80
fp->_bf._base = fp->_p = (unsigned char *) NULL;
18c4: e5842010 str r2, [r4, #16]
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
free( fp->_bf._base );
fp->_flags &= ~__SMBF;
18c8: e1c430bc strh r3, [r4, #12]
fp->_bf._base = fp->_p = (unsigned char *) NULL;
18cc: e5842000 str r2, [r4]
break;
default:
fclose(fp);
}
return 0;
}
18d0: e3a00000 mov r0, #0 ; 0x0
18d4: e8bd8010 pop {r4, pc}
0000202c <null_initialize>:
void *pargp
)
{
rtems_device_driver status;
if ( !initialized ) {
202c: e59fc040 ldr ip, [pc, #64] ; 2074 <null_initialize+0x48>
2030: e5dc2000 ldrb r2, [ip]
2034: e3520000 cmp r2, #0 ; 0x0
rtems_device_driver null_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *pargp
)
{
2038: e92d4010 push {r4, lr}
203c: e1a04000 mov r4, r0
rtems_device_driver status;
if ( !initialized ) {
2040: 0a000001 beq 204c <null_initialize+0x20>
NULL_major = major;
}
return RTEMS_SUCCESSFUL;
}
2044: e3a00000 mov r0, #0 ; 0x0
2048: e8bd8010 pop {r4, pc}
)
{
rtems_device_driver status;
if ( !initialized ) {
initialized = 1;
204c: e3a03001 mov r3, #1 ; 0x1
status = rtems_io_register_name(
2050: e59f0020 ldr r0, [pc, #32] ; 2078 <null_initialize+0x4c>
2054: e1a01004 mov r1, r4
)
{
rtems_device_driver status;
if ( !initialized ) {
initialized = 1;
2058: e5cc3000 strb r3, [ip]
status = rtems_io_register_name(
205c: eb00004b bl 2190 <rtems_io_register_name>
"/dev/null",
major,
(rtems_device_minor_number) 0
);
if (status != RTEMS_SUCCESSFUL)
2060: e3500000 cmp r0, #0 ; 0x0
rtems_fatal_error_occurred(status);
NULL_major = major;
2064: 059f3010 ldreq r3, [pc, #16] ; 207c <null_initialize+0x50>
2068: 05834000 streq r4, [r3]
"/dev/null",
major,
(rtems_device_minor_number) 0
);
if (status != RTEMS_SUCCESSFUL)
206c: 0afffff4 beq 2044 <null_initialize+0x18>
rtems_fatal_error_occurred(status);
2070: eb000ff7 bl 6054 <rtems_fatal_error_occurred> <== NOT EXECUTED
00001ae8 <open>:
int open(
const char *pathname,
int flags,
...
)
{
1ae8: e92d000e push {r1, r2, r3}
1aec: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
1af0: e24dd010 sub sp, sp, #16 ; 0x10
1af4: e59da034 ldr sl, [sp, #52]
/*
* Set the Evaluation flags
*/
eval_flags = 0;
status = flags + 1;
1af8: e28a3001 add r3, sl, #1 ; 0x1
if ( ( status & _FREAD ) == _FREAD )
1afc: e2132001 ands r2, r3, #1 ; 0x1
1b00: 01a04002 moveq r4, r2
1b04: 13a04004 movne r4, #4 ; 0x4
eval_flags |= RTEMS_LIBIO_PERMS_READ;
if ( ( status & _FWRITE ) == _FWRITE )
1b08: e3130002 tst r3, #2 ; 0x2
eval_flags |= RTEMS_LIBIO_PERMS_WRITE;
1b0c: 13844002 orrne r4, r4, #2 ; 0x2
int open(
const char *pathname,
int flags,
...
)
{
1b10: e1a09000 mov r9, r0
eval_flags |= RTEMS_LIBIO_PERMS_WRITE;
va_start(ap, flags);
mode = va_arg( ap, int );
1b14: e59db038 ldr fp, [sp, #56]
* 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();
1b18: eb001e61 bl 94a4 <rtems_libio_allocate>
if ( iop == 0 ) {
1b1c: e2506000 subs r6, r0, #0 ; 0x0
1b20: 03a05017 moveq r5, #23 ; 0x17
1b24: 0a000030 beq 1bec <open+0x104>
/*
* See if the file exists.
*/
status = rtems_filesystem_evaluate_path(
1b28: e1a01004 mov r1, r4
1b2c: e1a00009 mov r0, r9
1b30: e1a0200d mov r2, sp
1b34: e3a03001 mov r3, #1 ; 0x1
1b38: ebfffe15 bl 1394 <rtems_filesystem_evaluate_path>
pathname, eval_flags, &loc, true );
if ( status == -1 ) {
1b3c: e3700001 cmn r0, #1 ; 0x1
/*
* See if the file exists.
*/
status = rtems_filesystem_evaluate_path(
1b40: e1a0700d mov r7, sp
pathname, eval_flags, &loc, true );
if ( status == -1 ) {
1b44: 0a000040 beq 1c4c <open+0x164>
if ( status != 0 ) { /* The file did not exist */
rc = EACCES;
goto done;
}
} else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) {
1b48: e20a3c0a and r3, sl, #2560 ; 0xa00
1b4c: e3530c0a cmp r3, #2560 ; 0xa00
1b50: 01a0400d moveq r4, sp
1b54: 03a05011 moveq r5, #17 ; 0x11
1b58: 0a000055 beq 1cb4 <open+0x1cc>
/*
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->handlers = loc.handlers;
1b5c: e89d000c ldm sp, {r2, r3}
1b60: e5863030 str r3, [r6, #48]
iop->file_info = loc.node_access;
1b64: e586202c str r2, [r6, #44]
iop->flags |= rtems_libio_fcntl_flags( flags );
1b68: e1a0000a mov r0, sl
1b6c: e596400c ldr r4, [r6, #12]
1b70: eb001e8f bl 95b4 <rtems_libio_fcntl_flags>
iop->pathinfo = loc;
if ( !iop->handlers->open_h ) {
1b74: e5963030 ldr r3, [r6, #48]
1b78: e5938000 ldr r8, [r3]
* returned by successful path evaluation.
*/
iop->handlers = loc.handlers;
iop->file_info = loc.node_access;
iop->flags |= rtems_libio_fcntl_flags( flags );
1b7c: e1805004 orr r5, r0, r4
iop->pathinfo = loc;
1b80: e897000f ldm r7, {r0, r1, r2, r3}
1b84: e286c010 add ip, r6, #16 ; 0x10
if ( !iop->handlers->open_h ) {
1b88: e3580000 cmp r8, #0 ; 0x0
*/
iop->handlers = loc.handlers;
iop->file_info = loc.node_access;
iop->flags |= rtems_libio_fcntl_flags( flags );
iop->pathinfo = loc;
1b8c: e88c000f stm ip, {r0, r1, r2, r3}
* returned by successful path evaluation.
*/
iop->handlers = loc.handlers;
iop->file_info = loc.node_access;
iop->flags |= rtems_libio_fcntl_flags( flags );
1b90: e586500c str r5, [r6, #12]
iop->pathinfo = loc;
if ( !iop->handlers->open_h ) {
1b94: 0a000044 beq 1cac <open+0x1c4>
rc = ENOTSUP;
goto done;
}
rc = (*iop->handlers->open_h)( iop, pathname, flags, mode );
1b98: e1a01009 mov r1, r9
1b9c: e1a0300b mov r3, fp
1ba0: e1a00006 mov r0, r6
1ba4: e1a0200a mov r2, sl
1ba8: e1a0e00f mov lr, pc
1bac: e12fff18 bx r8
if ( rc )
1bb0: e2505000 subs r5, r0, #0 ; 0x0
1bb4: 11a0400d movne r4, sp
1bb8: 0a00000f beq 1bfc <open+0x114>
done:
va_end(ap);
if ( rc ) {
if ( iop )
rtems_libio_free( iop );
1bbc: e1a00006 mov r0, r6
1bc0: eb001e21 bl 944c <rtems_libio_free>
if ( loc_to_free )
1bc4: e3540000 cmp r4, #0 ; 0x0
1bc8: 0a000007 beq 1bec <open+0x104>
rtems_filesystem_freenode( loc_to_free );
1bcc: e5943008 ldr r3, [r4, #8]
1bd0: e3530000 cmp r3, #0 ; 0x0
1bd4: 0a000004 beq 1bec <open+0x104>
1bd8: e593301c ldr r3, [r3, #28]
1bdc: e3530000 cmp r3, #0 ; 0x0
1be0: 11a00004 movne r0, r4
1be4: 11a0e00f movne lr, pc
1be8: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( rc );
1bec: eb002904 bl c004 <__errno>
1bf0: e5805000 str r5, [r0]
1bf4: e3e00000 mvn r0, #0 ; 0x0
1bf8: ea00000f b 1c3c <open+0x154>
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
1bfc: e31a0b01 tst sl, #1024 ; 0x400
1c00: 1a000034 bne 1cd8 <open+0x1f0>
1c04: e59f4170 ldr r4, [pc, #368] ; 1d7c <open+0x294>
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
rtems_set_errno_and_return_minus_one( rc );
}
return iop - rtems_libio_iops;
1c08: e5941000 ldr r1, [r4]
1c0c: e0611006 rsb r1, r1, r6
1c10: e1a01141 asr r1, r1, #2
1c14: e1a02301 lsl r2, r1, #6
1c18: e0422101 sub r2, r2, r1, lsl #2
1c1c: e1a03302 lsl r3, r2, #6
1c20: e0623003 rsb r3, r2, r3
1c24: e1a00603 lsl r0, r3, #12
1c28: e0833000 add r3, r3, r0
1c2c: e0833001 add r3, r3, r1
1c30: e1a03203 lsl r3, r3, #4
1c34: e0613003 rsb r3, r1, r3
1c38: e0410103 sub r0, r1, r3, lsl #2
}
1c3c: e28dd010 add sp, sp, #16 ; 0x10
1c40: e8bd4ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, lr}
1c44: e28dd00c add sp, sp, #12 ; 0xc
1c48: e12fff1e bx lr
status = rtems_filesystem_evaluate_path(
pathname, eval_flags, &loc, true );
if ( status == -1 ) {
if ( errno != ENOENT ) {
1c4c: eb0028ec bl c004 <__errno>
1c50: e5900000 ldr r0, [r0]
1c54: e3500002 cmp r0, #2 ; 0x2
1c58: 1a000018 bne 1cc0 <open+0x1d8>
rc = errno;
goto done;
}
/* If the file does not exist and we are not trying to create it--> error */
if ( !(flags & O_CREAT) ) {
1c5c: e21a3c02 ands r3, sl, #512 ; 0x200
1c60: 01a05000 moveq r5, r0
1c64: 01a04003 moveq r4, r3
1c68: 0a000011 beq 1cb4 <open+0x1cc>
rc = ENOENT;
goto done;
}
/* Create the node for the new regular file */
rc = mknod( pathname, S_IFREG | mode, 0LL );
1c6c: e1a00009 mov r0, r9
1c70: e38b1902 orr r1, fp, #32768 ; 0x8000
1c74: e3a02000 mov r2, #0 ; 0x0
1c78: e3a03000 mov r3, #0 ; 0x0
1c7c: ebfffe7e bl 167c <mknod>
if ( rc ) {
1c80: e2504000 subs r4, r0, #0 ; 0x0
1c84: 1a00000d bne 1cc0 <open+0x1d8>
rc = errno;
goto done;
}
/* Sanity check to see if the file name exists after the mknod() */
status = rtems_filesystem_evaluate_path( pathname, 0x0, &loc, true );
1c88: e1a00009 mov r0, r9
1c8c: e1a01004 mov r1, r4
1c90: e1a0200d mov r2, sp
1c94: e3a03001 mov r3, #1 ; 0x1
1c98: ebfffdbd bl 1394 <rtems_filesystem_evaluate_path>
if ( status != 0 ) { /* The file did not exist */
1c9c: e3500000 cmp r0, #0 ; 0x0
1ca0: 13a0500d movne r5, #13 ; 0xd
1ca4: 1a000002 bne 1cb4 <open+0x1cc>
1ca8: eaffffab b 1b5c <open+0x74>
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
rtems_set_errno_and_return_minus_one( rc );
}
return iop - rtems_libio_iops;
1cac: e1a0400d mov r4, sp <== NOT EXECUTED
1cb0: e3a05086 mov r5, #134 ; 0x86 <== NOT EXECUTED
done:
va_end(ap);
if ( rc ) {
if ( iop )
1cb4: e3560000 cmp r6, #0 ; 0x0
1cb8: 0affffc1 beq 1bc4 <open+0xdc>
1cbc: eaffffbe b 1bbc <open+0xd4>
}
/* Create the node for the new regular file */
rc = mknod( pathname, S_IFREG | mode, 0LL );
if ( rc ) {
rc = errno;
1cc0: eb0028cf bl c004 <__errno>
1cc4: e5905000 ldr r5, [r0]
*/
done:
va_end(ap);
if ( rc ) {
1cc8: e3550000 cmp r5, #0 ; 0x0
1ccc: 0affffcc beq 1c04 <open+0x11c>
1cd0: e3a04000 mov r4, #0 ; 0x0
1cd4: eafffff6 b 1cb4 <open+0x1cc>
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
1cd8: e59f409c ldr r4, [pc, #156] ; 1d7c <open+0x294>
1cdc: e5942000 ldr r2, [r4]
1ce0: e0622006 rsb r2, r2, r6
1ce4: e1a02142 asr r2, r2, #2
1ce8: e1a03302 lsl r3, r2, #6
1cec: e0433102 sub r3, r3, r2, lsl #2
1cf0: e1a00303 lsl r0, r3, #6
1cf4: e0630000 rsb r0, r3, r0
1cf8: e1a01600 lsl r1, r0, #12
1cfc: e0800001 add r0, r0, r1
1d00: e0800002 add r0, r0, r2
1d04: e1a00200 lsl r0, r0, #4
1d08: e0620000 rsb r0, r2, r0
1d0c: e1a01005 mov r1, r5
1d10: e0420100 sub r0, r2, r0, lsl #2
1d14: eb001d0b bl 9148 <ftruncate>
if ( rc ) {
1d18: e2505000 subs r5, r0, #0 ; 0x0
1d1c: 0affffb9 beq 1c08 <open+0x120>
if(errno) rc = errno;
1d20: eb0028b7 bl c004 <__errno> <== NOT EXECUTED
1d24: e5903000 ldr r3, [r0] <== NOT EXECUTED
1d28: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
1d2c: 1a00000f bne 1d70 <open+0x288> <== NOT EXECUTED
close( iop - rtems_libio_iops );
1d30: e5942000 ldr r2, [r4] <== NOT EXECUTED
1d34: e0622006 rsb r2, r2, r6 <== NOT EXECUTED
1d38: e1a02142 asr r2, r2, #2 <== NOT EXECUTED
1d3c: e1a03302 lsl r3, r2, #6 <== NOT EXECUTED
1d40: e0433102 sub r3, r3, r2, lsl #2 <== NOT EXECUTED
1d44: e1a00303 lsl r0, r3, #6 <== NOT EXECUTED
1d48: e0630000 rsb r0, r3, r0 <== NOT EXECUTED
1d4c: e1a01600 lsl r1, r0, #12 <== NOT EXECUTED
1d50: e0800001 add r0, r0, r1 <== NOT EXECUTED
1d54: e0800002 add r0, r0, r2 <== NOT EXECUTED
1d58: e1a00200 lsl r0, r0, #4 <== NOT EXECUTED
1d5c: e0620000 rsb r0, r2, r0 <== NOT EXECUTED
1d60: e0420100 sub r0, r2, r0, lsl #2 <== NOT EXECUTED
1d64: eb001ca2 bl 8ff4 <close> <== NOT EXECUTED
1d68: e3a06000 mov r6, #0 ; 0x0 <== NOT EXECUTED
1d6c: eaffffd5 b 1cc8 <open+0x1e0> <== NOT EXECUTED
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
if ( rc ) {
if(errno) rc = errno;
1d70: eb0028a3 bl c004 <__errno> <== NOT EXECUTED
1d74: e5905000 ldr r5, [r0] <== NOT EXECUTED
1d78: eaffffec b 1d30 <open+0x248> <== NOT EXECUTED
00001a80 <open_dev_console>:
int error_code = 'S' << 24 | 'T' << 16 | 'D' << 8;
/*
* Attempt to open /dev/console.
*/
if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) {
1a80: e3a01000 mov r1, #0 ; 0x0
/*
* This is a replaceable stub
*/
void open_dev_console(void)
{
1a84: e52de004 push {lr} ; (str lr, [sp, #-4]!)
int error_code = 'S' << 24 | 'T' << 16 | 'D' << 8;
/*
* Attempt to open /dev/console.
*/
if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) {
1a88: e59f004c ldr r0, [pc, #76] ; 1adc <open_dev_console+0x5c>
1a8c: e1a02001 mov r2, r1
1a90: eb000014 bl 1ae8 <open>
1a94: e3700001 cmn r0, #1 ; 0x1
1a98: 049df004 popeq {pc} ; (ldreq pc, [sp], #4)
/*
* But if we find /dev/console once, we better find it twice more
* or something is REALLY wrong.
*/
if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1)
1a9c: e59f0038 ldr r0, [pc, #56] ; 1adc <open_dev_console+0x5c>
1aa0: e3a01001 mov r1, #1 ; 0x1
1aa4: e3a02000 mov r2, #0 ; 0x0
1aa8: eb00000e bl 1ae8 <open>
1aac: e3700001 cmn r0, #1 ; 0x1
1ab0: 0a000007 beq 1ad4 <open_dev_console+0x54>
rtems_fatal_error_occurred( error_code | '1' );
if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1)
1ab4: e59f0020 ldr r0, [pc, #32] ; 1adc <open_dev_console+0x5c>
1ab8: e3a01001 mov r1, #1 ; 0x1
1abc: e3a02000 mov r2, #0 ; 0x0
1ac0: eb000008 bl 1ae8 <open>
1ac4: e3700001 cmn r0, #1 ; 0x1
1ac8: 149df004 popne {pc} ; (ldrne pc, [sp], #4)
rtems_fatal_error_occurred( error_code | '2' );
1acc: e59f000c ldr r0, [pc, #12] ; 1ae0 <open_dev_console+0x60> <== NOT EXECUTED
1ad0: eb000d07 bl 4ef4 <rtems_fatal_error_occurred> <== NOT EXECUTED
/*
* But if we find /dev/console once, we better find it twice more
* or something is REALLY wrong.
*/
if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1)
rtems_fatal_error_occurred( error_code | '1' );
1ad4: e59f0008 ldr r0, [pc, #8] ; 1ae4 <open_dev_console+0x64> <== NOT EXECUTED
1ad8: eb000d05 bl 4ef4 <rtems_fatal_error_occurred> <== NOT EXECUTED
000036d4 <opendir>:
* open a directory.
*/
DIR *
opendir(
const char *name )
{
36d4: e92d4030 push {r4, r5, lr}
register DIR *dirp;
register int fd;
if ((fd = open(name, 0)) == -1)
36d8: e3a01000 mov r1, #0 ; 0x0
36dc: eb000020 bl 3764 <open>
36e0: e3700001 cmn r0, #1 ; 0x1
36e4: e1a05000 mov r5, r0
36e8: 0a00001a beq 3758 <opendir+0x84>
return NULL;
if (fcntl(fd, F_SETFD, 1) == -1 ||
36ec: e3a01002 mov r1, #2 ; 0x2
36f0: e3a02001 mov r2, #1 ; 0x1
36f4: eb001e25 bl af90 <fcntl>
36f8: e3700001 cmn r0, #1 ; 0x1
36fc: 0a000013 beq 3750 <opendir+0x7c>
3700: e3a00018 mov r0, #24 ; 0x18
3704: ebfffde9 bl 2eb0 <malloc>
3708: e2504000 subs r4, r0, #0 ; 0x0
370c: 0a00000f beq 3750 <opendir+0x7c>
* If CLSIZE is an exact multiple of DIRBLKSIZ, use a CLSIZE
* buffer that it cluster boundary aligned.
* Hopefully this can be a big win someday by allowing page trades
* to user space to be done by getdirentries()
*/
dirp->dd_buf = malloc (512);
3710: e3a00c02 mov r0, #512 ; 0x200
3714: ebfffde5 bl 2eb0 <malloc>
dirp->dd_len = 512;
3718: e3a03c02 mov r3, #512 ; 0x200
if (dirp->dd_buf == NULL) {
371c: e3500000 cmp r0, #0 ; 0x0
* buffer that it cluster boundary aligned.
* Hopefully this can be a big win someday by allowing page trades
* to user space to be done by getdirentries()
*/
dirp->dd_buf = malloc (512);
dirp->dd_len = 512;
3720: e5843010 str r3, [r4, #16]
if (dirp->dd_buf == NULL) {
close (fd);
return NULL;
}
dirp->dd_fd = fd;
dirp->dd_loc = 0;
3724: 13a03000 movne r3, #0 ; 0x0
* If CLSIZE is an exact multiple of DIRBLKSIZ, use a CLSIZE
* buffer that it cluster boundary aligned.
* Hopefully this can be a big win someday by allowing page trades
* to user space to be done by getdirentries()
*/
dirp->dd_buf = malloc (512);
3728: e1a02000 mov r2, r0
372c: e584000c str r0, [r4, #12]
if (dirp->dd_buf == NULL) {
close (fd);
return NULL;
}
dirp->dd_fd = fd;
3730: 15845000 strne r5, [r4]
dirp->dd_loc = 0;
dirp->dd_seek = 0;
3734: 15843014 strne r3, [r4, #20]
if (dirp->dd_buf == NULL) {
close (fd);
return NULL;
}
dirp->dd_fd = fd;
dirp->dd_loc = 0;
3738: 15843004 strne r3, [r4, #4]
* to user space to be done by getdirentries()
*/
dirp->dd_buf = malloc (512);
dirp->dd_len = 512;
if (dirp->dd_buf == NULL) {
373c: 1a000006 bne 375c <opendir+0x88>
close (fd);
3740: e1a00005 mov r0, r5 <== NOT EXECUTED
3744: e1a04002 mov r4, r2 <== NOT EXECUTED
3748: ebfffb0b bl 237c <close> <== NOT EXECUTED
374c: ea000002 b 375c <opendir+0x88> <== NOT EXECUTED
if ((fd = open(name, 0)) == -1)
return NULL;
if (fcntl(fd, F_SETFD, 1) == -1 ||
(dirp = (DIR *)malloc(sizeof(DIR))) == NULL) {
close (fd);
3750: e1a00005 mov r0, r5 <== NOT EXECUTED
3754: ebfffb08 bl 237c <close> <== NOT EXECUTED
3758: e3a04000 mov r4, #0 ; 0x0 <== NOT EXECUTED
dirp->dd_seek = 0;
/*
* Set up seek point for rewinddir.
*/
return dirp;
}
375c: e1a00004 mov r0, r4
3760: e8bd8030 pop {r4, r5, pc}
000028bc <oproc>:
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
28bc: e92d4010 push {r4, lr}
int i;
if (tty->termios.c_oflag & OPOST) {
28c0: e5912034 ldr r2, [r1, #52]
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
28c4: e24dd004 sub sp, sp, #4 ; 0x4
int i;
if (tty->termios.c_oflag & OPOST) {
28c8: e3120001 tst r2, #1 ; 0x1
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
28cc: e1a04001 mov r4, r1
28d0: e5cd0000 strb r0, [sp]
int i;
if (tty->termios.c_oflag & OPOST) {
28d4: 0a000016 beq 2934 <oproc+0x78>
switch (c) {
28d8: e5dd1000 ldrb r1, [sp]
28dc: e2413008 sub r3, r1, #8 ; 0x8
28e0: e3530005 cmp r3, #5 ; 0x5
28e4: 979ff103 ldrls pc, [pc, r3, lsl #2]
28e8: ea000017 b 294c <oproc+0x90>
28ec: 00002994 .word 0x00002994
28f0: 000029d8 .word 0x000029d8 <== NOT EXECUTED
28f4: 000029a8 .word 0x000029a8 <== NOT EXECUTED
28f8: 0000294c .word 0x0000294c <== NOT EXECUTED
28fc: 0000294c .word 0x0000294c <== NOT EXECUTED
2900: 00002904 .word 0x00002904 <== NOT EXECUTED
tty->column = 0;
}
break;
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
2904: e3120010 tst r2, #16 ; 0x10 <== NOT EXECUTED
2908: 0a000002 beq 2918 <oproc+0x5c> <== NOT EXECUTED
290c: e5943028 ldr r3, [r4, #40] <== NOT EXECUTED
2910: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
2914: 0a00000a beq 2944 <oproc+0x88> <== NOT EXECUTED
return;
if (tty->termios.c_oflag & OCRNL) {
2918: e2123008 ands r3, r2, #8 ; 0x8 <== NOT EXECUTED
291c: 0a00001a beq 298c <oproc+0xd0> <== NOT EXECUTED
c = '\n';
2920: e3a0300a mov r3, #10 ; 0xa <== NOT EXECUTED
if (tty->termios.c_oflag & ONLRET)
2924: e3120020 tst r2, #32 ; 0x20 <== NOT EXECUTED
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
return;
if (tty->termios.c_oflag & OCRNL) {
c = '\n';
2928: e5cd3000 strb r3, [sp] <== NOT EXECUTED
if (tty->termios.c_oflag & ONLRET)
tty->column = 0;
292c: 1243300a subne r3, r3, #10 ; 0xa <== NOT EXECUTED
2930: 15843028 strne r3, [r4, #40] <== NOT EXECUTED
if (!iscntrl(c))
tty->column++;
break;
}
}
rtems_termios_puts (&c, 1, tty);
2934: e1a02004 mov r2, r4
2938: e1a0000d mov r0, sp
293c: e3a01001 mov r1, #1 ; 0x1
2940: ebffff95 bl 279c <rtems_termios_puts>
}
2944: e28dd004 add sp, sp, #4 ; 0x4
2948: e8bd8010 pop {r4, pc}
if (tty->column > 0)
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
294c: e3120002 tst r2, #2 ; 0x2
2950: 059f00bc ldreq r0, [pc, #188] ; 2a14 <oproc+0x158>
2954: 0a000006 beq 2974 <oproc+0xb8>
c = toupper(c);
2958: e59f00b4 ldr r0, [pc, #180] ; 2a14 <oproc+0x158> <== NOT EXECUTED
295c: e5902000 ldr r2, [r0] <== NOT EXECUTED
2960: e7d23001 ldrb r3, [r2, r1] <== NOT EXECUTED
2964: e3130002 tst r3, #2 ; 0x2 <== NOT EXECUTED
2968: 12411020 subne r1, r1, #32 ; 0x20 <== NOT EXECUTED
296c: e5cd1000 strb r1, [sp] <== NOT EXECUTED
2970: e5dd1000 ldrb r1, [sp] <== NOT EXECUTED
if (!iscntrl(c))
2974: e5903000 ldr r3, [r0]
2978: e7d32001 ldrb r2, [r3, r1]
297c: e3120020 tst r2, #32 ; 0x20
2980: 1affffeb bne 2934 <oproc+0x78>
tty->column++;
2984: e5943028 ldr r3, [r4, #40]
2988: e2833001 add r3, r3, #1 ; 0x1
298c: e5843028 str r3, [r4, #40]
2990: eaffffe7 b 2934 <oproc+0x78>
}
tty->column += i;
break;
case '\b':
if (tty->column > 0)
2994: e5943028 ldr r3, [r4, #40] <== NOT EXECUTED
2998: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
tty->column--;
299c: c2433001 subgt r3, r3, #1 ; 0x1 <== NOT EXECUTED
29a0: c5843028 strgt r3, [r4, #40] <== NOT EXECUTED
29a4: eaffffe2 b 2934 <oproc+0x78> <== NOT EXECUTED
int i;
if (tty->termios.c_oflag & OPOST) {
switch (c) {
case '\n':
if (tty->termios.c_oflag & ONLRET)
29a8: e3120020 tst r2, #32 ; 0x20
tty->column = 0;
29ac: 13a03000 movne r3, #0 ; 0x0
29b0: 15843028 strne r3, [r4, #40]
if (tty->termios.c_oflag & ONLCR) {
29b4: e3120004 tst r2, #4 ; 0x4
29b8: 0affffdd beq 2934 <oproc+0x78>
rtems_termios_puts ("\r", 1, tty);
29bc: e59f0054 ldr r0, [pc, #84] ; 2a18 <oproc+0x15c>
29c0: e3a01001 mov r1, #1 ; 0x1
29c4: e1a02004 mov r2, r4
29c8: ebffff73 bl 279c <rtems_termios_puts>
tty->column = 0;
29cc: e3a03000 mov r3, #0 ; 0x0
29d0: e5843028 str r3, [r4, #40]
29d4: eaffffd6 b 2934 <oproc+0x78>
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
29d8: e5941028 ldr r1, [r4, #40] <== NOT EXECUTED
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
29dc: e2023b06 and r3, r2, #6144 ; 0x1800 <== NOT EXECUTED
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
29e0: e2012007 and r2, r1, #7 ; 0x7 <== NOT EXECUTED
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
29e4: e3530b06 cmp r3, #6144 ; 0x1800 <== NOT EXECUTED
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
29e8: e2620008 rsb r0, r2, #8 ; 0x8 <== NOT EXECUTED
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
tty->column += i;
rtems_termios_puts ( " ", i, tty);
return;
}
tty->column += i;
29ec: 10803001 addne r3, r0, r1 <== NOT EXECUTED
29f0: 15843028 strne r3, [r4, #40] <== NOT EXECUTED
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
29f4: 1affffce bne 2934 <oproc+0x78> <== NOT EXECUTED
tty->column += i;
29f8: e0803001 add r3, r0, r1 <== NOT EXECUTED
29fc: e5843028 str r3, [r4, #40] <== NOT EXECUTED
rtems_termios_puts ( " ", i, tty);
2a00: e1a01000 mov r1, r0 <== NOT EXECUTED
2a04: e1a02004 mov r2, r4 <== NOT EXECUTED
2a08: e59f000c ldr r0, [pc, #12] ; 2a1c <oproc+0x160> <== NOT EXECUTED
2a0c: ebffff62 bl 279c <rtems_termios_puts> <== NOT EXECUTED
2a10: eaffffcb b 2944 <oproc+0x88> <== NOT EXECUTED
000052bc <pthread_cond_timedwait>:
int pthread_cond_timedwait(
pthread_cond_t *cond,
pthread_mutex_t *mutex,
const struct timespec *abstime
)
{
52bc: e92d4030 push {r4, r5, lr}
52c0: e24dd004 sub sp, sp, #4 ; 0x4
52c4: e1a04000 mov r4, r0
52c8: e1a05001 mov r5, r1
* So we check the abstime provided, and hold on to whether it
* is valid or not. If it isn't correct and in the future,
* then we do a polling operation and convert the UNSATISFIED
* status into the appropriate error.
*/
switch ( _POSIX_Absolute_timeout_to_ticks(abstime, &ticks) ) {
52cc: e1a00002 mov r0, r2
52d0: e1a0100d mov r1, sp
52d4: eb000130 bl 579c <_POSIX_Absolute_timeout_to_ticks>
52d8: e3500003 cmp r0, #3 ; 0x3
52dc: 979ff100 ldrls pc, [pc, r0, lsl #2]
52e0: ea000004 b 52f8 <pthread_cond_timedwait+0x3c> <== NOT EXECUTED
52e4: 00005318 .word 0x00005318 <== NOT EXECUTED
52e8: 00005310 .word 0x00005310 <== NOT EXECUTED
52ec: 00005310 .word 0x00005310 <== NOT EXECUTED
52f0: 000052f4 .word 0x000052f4 <== NOT EXECUTED
52f4: e3a03000 mov r3, #0 ; 0x0
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
already_timedout = FALSE;
break;
}
return _POSIX_Condition_variables_Wait_support(
52f8: e1a00004 mov r0, r4
52fc: e1a01005 mov r1, r5
5300: e59d2000 ldr r2, [sp]
5304: eb000008 bl 532c <_POSIX_Condition_variables_Wait_support>
cond,
mutex,
ticks,
already_timedout
);
}
5308: e28dd004 add sp, sp, #4 ; 0x4
530c: e8bd8030 pop {r4, r5, pc}
* So we check the abstime provided, and hold on to whether it
* is valid or not. If it isn't correct and in the future,
* then we do a polling operation and convert the UNSATISFIED
* status into the appropriate error.
*/
switch ( _POSIX_Absolute_timeout_to_ticks(abstime, &ticks) ) {
5310: e3a03001 mov r3, #1 ; 0x1
5314: eafffff7 b 52f8 <pthread_cond_timedwait+0x3c>
5318: e3a00016 mov r0, #22 ; 0x16
531c: eafffff9 b 5308 <pthread_cond_timedwait+0x4c>
00005510 <pthread_create>:
pthread_t *thread,
const pthread_attr_t *attr,
void *(*start_routine)( void * ),
void *arg
)
{
5510: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
POSIX_API_Control *api;
int schedpolicy = SCHED_RR;
struct sched_param schedparam;
Objects_Name name;
if ( !start_routine )
5514: e2529000 subs r9, r2, #0 ; 0x0
pthread_t *thread,
const pthread_attr_t *attr,
void *(*start_routine)( void * ),
void *arg
)
{
5518: e24dd03c sub sp, sp, #60 ; 0x3c
551c: e58d001c str r0, [sp, #28]
5520: e1a0a003 mov sl, r3
POSIX_API_Control *api;
int schedpolicy = SCHED_RR;
struct sched_param schedparam;
Objects_Name name;
if ( !start_routine )
5524: 03a0000e moveq r0, #14 ; 0xe
5528: 0a000014 beq 5580 <pthread_create+0x70>
return EFAULT;
the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes;
552c: e59f32d0 ldr r3, [pc, #720] ; 5804 <pthread_create+0x2f4>
5530: e3510000 cmp r1, #0 ; 0x0
5534: 11a06001 movne r6, r1
5538: 01a06003 moveq r6, r3
if ( !the_attr->is_initialized )
553c: e5962000 ldr r2, [r6]
5540: e3520000 cmp r2, #0 ; 0x0
5544: 0a00000c beq 557c <pthread_create+0x6c>
* stack space if it is allowed to allocate it itself.
*
* NOTE: If the user provides the stack we will let it drop below
* twice the minimum.
*/
if ( the_attr->stackaddr && !_Stack_Is_enough(the_attr->stacksize) )
5548: e5963004 ldr r3, [r6, #4]
554c: e3530000 cmp r3, #0 ; 0x0
5550: 0a000004 beq 5568 <pthread_create+0x58>
5554: e59f32ac ldr r3, [pc, #684] ; 5808 <pthread_create+0x2f8>
5558: e5962008 ldr r2, [r6, #8]
555c: e5931000 ldr r1, [r3]
5560: e1520001 cmp r2, r1
5564: 3a000004 bcc 557c <pthread_create+0x6c>
* inherits scheduling attributes from the creating thread. If it is
* PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the
* attributes structure.
*/
switch ( the_attr->inheritsched ) {
5568: e5963010 ldr r3, [r6, #16]
556c: e3530001 cmp r3, #1 ; 0x1
5570: 0a00001b beq 55e4 <pthread_create+0xd4>
5574: e3530002 cmp r3, #2 ; 0x2
5578: 0a000002 beq 5588 <pthread_create+0x78>
*/
*thread = the_thread->Object.id;
_RTEMS_Unlock_allocator();
return 0;
557c: e3a00016 mov r0, #22 ; 0x16
}
5580: e28dd03c add sp, sp, #60 ; 0x3c
5584: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
schedparam = api->schedparam;
break;
case PTHREAD_EXPLICIT_SCHED:
schedpolicy = the_attr->schedpolicy;
schedparam = the_attr->schedparam;
5588: e286c018 add ip, r6, #24 ; 0x18
558c: e8bc000f ldm ip!, {r0, r1, r2, r3}
5590: e28d7024 add r7, sp, #36 ; 0x24
5594: e1a04007 mov r4, r7
schedpolicy = api->schedpolicy;
schedparam = api->schedparam;
break;
case PTHREAD_EXPLICIT_SCHED:
schedpolicy = the_attr->schedpolicy;
5598: e5968014 ldr r8, [r6, #20]
schedparam = the_attr->schedparam;
559c: e8a4000f stmia r4!, {r0, r1, r2, r3}
55a0: e89c0003 ldm ip, {r0, r1}
55a4: e8840003 stm r4, {r0, r1}
/*
* Check the contentionscope since rtems only supports PROCESS wide
* contention (i.e. no system wide contention).
*/
if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS )
55a8: e596300c ldr r3, [r6, #12]
55ac: e3530000 cmp r3, #0 ; 0x0
55b0: 13a00086 movne r0, #134 ; 0x86
55b4: 1afffff1 bne 5580 <pthread_create+0x70>
/*
* Interpret the scheduling parameters.
*/
if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) )
55b8: e59db024 ldr fp, [sp, #36]
55bc: e24b3001 sub r3, fp, #1 ; 0x1
55c0: e35300fd cmp r3, #253 ; 0xfd
55c4: 8affffec bhi 557c <pthread_create+0x6c>
*/
budget_callout = NULL;
budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
switch ( schedpolicy ) {
55c8: e3580003 cmp r8, #3 ; 0x3
55cc: 979ff108 ldrls pc, [pc, r8, lsl #2]
55d0: eaffffe9 b 557c <pthread_create+0x6c>
55d4: 00005700 .word 0x00005700
55d8: 000056f4 .word 0x000056f4 <== NOT EXECUTED
55dc: 000056e4 .word 0x000056e4 <== NOT EXECUTED
55e0: 00005614 .word 0x00005614 <== NOT EXECUTED
* attributes structure.
*/
switch ( the_attr->inheritsched ) {
case PTHREAD_INHERIT_SCHED:
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
55e4: e59f3220 ldr r3, [pc, #544] ; 580c <pthread_create+0x2fc>
55e8: e5932000 ldr r2, [r3]
55ec: e5925108 ldr r5, [r2, #264]
schedpolicy = api->schedpolicy;
schedparam = api->schedparam;
55f0: e285c080 add ip, r5, #128 ; 0x80
55f4: e8bc000f ldm ip!, {r0, r1, r2, r3}
55f8: e28d7024 add r7, sp, #36 ; 0x24
55fc: e1a04007 mov r4, r7
*/
switch ( the_attr->inheritsched ) {
case PTHREAD_INHERIT_SCHED:
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
schedpolicy = api->schedpolicy;
5600: e595807c ldr r8, [r5, #124]
schedparam = api->schedparam;
5604: e8a4000f stmia r4!, {r0, r1, r2, r3}
5608: e89c0003 ldm ip, {r0, r1}
560c: e8840003 stm r4, {r0, r1}
5610: eaffffe4 b 55a8 <pthread_create+0x98>
case SCHED_SPORADIC:
budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
budget_callout = _POSIX_Threads_Sporadic_budget_callout;
if ( _Timespec_To_ticks( &schedparam.ss_replenish_period ) <
5614: e28d002c add r0, sp, #44 ; 0x2c
5618: eb0010d9 bl 9984 <_Timespec_To_ticks>
561c: e1a04000 mov r4, r0
5620: e28d0034 add r0, sp, #52 ; 0x34
5624: eb0010d6 bl 9984 <_Timespec_To_ticks>
5628: e1540000 cmp r4, r0
562c: 3affffd2 bcc 557c <pthread_create+0x6c>
_Timespec_To_ticks( &schedparam.ss_initial_budget ) )
return EINVAL;
if ( !_POSIX_Priority_Is_valid( schedparam.ss_low_priority ) )
5630: e59d3028 ldr r3, [sp, #40]
5634: e2433001 sub r3, r3, #1 ; 0x1
5638: e35300fd cmp r3, #253 ; 0xfd
563c: 8affffce bhi 557c <pthread_create+0x6c>
5640: e59fc1c8 ldr ip, [pc, #456] ; 5810 <pthread_create+0x300>
5644: e58dc020 str ip, [sp, #32]
5648: e3a04003 mov r4, #3 ; 0x3
#endif
/*
* Lock the allocator mutex for protection
*/
_RTEMS_Lock_allocator();
564c: e59f21c0 ldr r2, [pc, #448] ; 5814 <pthread_create+0x304>
5650: e5920000 ldr r0, [r2]
5654: eb0006f1 bl 7220 <_API_Mutex_Lock>
* _POSIX_Threads_Allocate
*/
RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void )
{
return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information );
5658: e59f01b8 ldr r0, [pc, #440] ; 5818 <pthread_create+0x308>
565c: eb00094a bl 7b8c <_Objects_Allocate>
* NOTE: Global threads are not currently supported.
*/
the_thread = _POSIX_Threads_Allocate();
if ( !the_thread ) {
5660: e2505000 subs r5, r0, #0 ; 0x0
5664: 0a000052 beq 57b4 <pthread_create+0x2a4>
/*
* Initialize the core thread for this task.
*/
name.name_p = NULL; /* posix threads don't have a name by default */
status = _Thread_Initialize(
5668: e59f2198 ldr r2, [pc, #408] ; 5808 <pthread_create+0x2f8>
566c: e26bc0ff rsb ip, fp, #255 ; 0xff
5670: e5923000 ldr r3, [r2]
5674: e5961008 ldr r1, [r6, #8]
5678: e5962004 ldr r2, [r6, #4]
567c: e58dc004 str ip, [sp, #4]
5680: e59dc020 ldr ip, [sp, #32]
5684: e1a03083 lsl r3, r3, #1
/*
* Initialize the core thread for this task.
*/
name.name_p = NULL; /* posix threads don't have a name by default */
5688: e3a0b000 mov fp, #0 ; 0x0
status = _Thread_Initialize(
568c: e1530001 cmp r3, r1
5690: 31a03001 movcc r3, r1
5694: e58dc010 str ip, [sp, #16]
5698: e59f0178 ldr r0, [pc, #376] ; 5818 <pthread_create+0x308>
569c: e3a0c001 mov ip, #1 ; 0x1
56a0: e1a01005 mov r1, r5
56a4: e58d400c str r4, [sp, #12]
56a8: e58db000 str fp, [sp]
56ac: e58dc008 str ip, [sp, #8]
56b0: e58db014 str fp, [sp, #20]
56b4: e58db018 str fp, [sp, #24]
56b8: eb000ce4 bl 8a50 <_Thread_Initialize>
budget_callout,
0, /* isr level */
name /* posix threads don't have a name */
);
if ( !status ) {
56bc: e150000b cmp r0, fp
56c0: 1a000012 bne 5710 <pthread_create+0x200>
RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free (
Thread_Control *the_pthread
)
{
_Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object );
56c4: e1a01005 mov r1, r5
56c8: e59f0148 ldr r0, [pc, #328] ; 5818 <pthread_create+0x308>
56cc: eb000a1b bl 7f40 <_Objects_Free>
_POSIX_Threads_Free( the_thread );
_RTEMS_Unlock_allocator();
56d0: e59f213c ldr r2, [pc, #316] ; 5814 <pthread_create+0x304>
56d4: e5920000 ldr r0, [r2]
56d8: eb0006ec bl 7290 <_API_Mutex_Unlock>
56dc: e3a0000b mov r0, #11 ; 0xb
56e0: eaffffa6 b 5580 <pthread_create+0x70>
*/
budget_callout = NULL;
budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
switch ( schedpolicy ) {
56e4: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED
56e8: e3a04002 mov r4, #2 ; 0x2 <== NOT EXECUTED
56ec: e58d3020 str r3, [sp, #32] <== NOT EXECUTED
56f0: eaffffd5 b 564c <pthread_create+0x13c> <== NOT EXECUTED
56f4: e3a04000 mov r4, #0 ; 0x0
56f8: e58d4020 str r4, [sp, #32]
56fc: eaffffd2 b 564c <pthread_create+0x13c>
5700: e3a02000 mov r2, #0 ; 0x0
5704: e3a04001 mov r4, #1 ; 0x1
5708: e58d2020 str r2, [sp, #32]
570c: eaffffce b 564c <pthread_create+0x13c>
/*
* finish initializing the per API structure
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
5710: e5954108 ldr r4, [r5, #264]
api->Attributes = *the_attr;
5714: e1a0c006 mov ip, r6
5718: e8bc000f ldm ip!, {r0, r1, r2, r3}
571c: e1a0e004 mov lr, r4
5720: e8ae000f stmia lr!, {r0, r1, r2, r3}
5724: e8bc000f ldm ip!, {r0, r1, r2, r3}
5728: e8ae000f stmia lr!, {r0, r1, r2, r3}
572c: e8bc000f ldm ip!, {r0, r1, r2, r3}
5730: e8ae000f stmia lr!, {r0, r1, r2, r3}
5734: e89c0003 ldm ip, {r0, r1}
5738: e88e0003 stm lr, {r0, r1}
api->detachstate = the_attr->detachstate;
573c: e5963034 ldr r3, [r6, #52]
api->schedpolicy = schedpolicy;
5740: e584807c str r8, [r4, #124]
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
api->Attributes = *the_attr;
api->detachstate = the_attr->detachstate;
5744: e5843038 str r3, [r4, #56]
api->schedpolicy = schedpolicy;
api->schedparam = schedparam;
5748: e1a0e007 mov lr, r7
574c: e8be000f ldm lr!, {r0, r1, r2, r3}
5750: e284c080 add ip, r4, #128 ; 0x80
5754: e8ac000f stmia ip!, {r0, r1, r2, r3}
5758: e89e0003 ldm lr, {r0, r1}
* first run.
*
* NOTE: Since the thread starts with all unblocked, this is necessary.
*/
the_thread->do_post_task_switch_extension = true;
575c: e3a03001 mov r3, #1 ; 0x1
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
api->Attributes = *the_attr;
api->detachstate = the_attr->detachstate;
api->schedpolicy = schedpolicy;
api->schedparam = schedparam;
5760: e88c0003 stm ip, {r0, r1}
* first run.
*
* NOTE: Since the thread starts with all unblocked, this is necessary.
*/
the_thread->do_post_task_switch_extension = true;
5764: e5c53075 strb r3, [r5, #117]
/*
* POSIX threads are allocated and started in one operation.
*/
status = _Thread_Start(
5768: e3a01001 mov r1, #1 ; 0x1
576c: e1a02009 mov r2, r9
5770: e1a0300a mov r3, sl
5774: e1a00005 mov r0, r5
5778: e58db000 str fp, [sp]
577c: eb000fc6 bl 969c <_Thread_Start>
start_routine,
arg,
0 /* unused */
);
if ( schedpolicy == SCHED_SPORADIC ) {
5780: e3580003 cmp r8, #3 ; 0x3
/*
* POSIX threads are allocated and started in one operation.
*/
status = _Thread_Start(
5784: e1a06000 mov r6, r0
start_routine,
arg,
0 /* unused */
);
if ( schedpolicy == SCHED_SPORADIC ) {
5788: 0a000016 beq 57e8 <pthread_create+0x2d8>
*
* NOTE: This can only happen if someone slips in and touches the
* thread while we are creating it.
*/
if ( !status ) {
578c: e3560000 cmp r6, #0 ; 0x0
5790: 1a00000c bne 57c8 <pthread_create+0x2b8>
5794: e1a01005 mov r1, r5 <== NOT EXECUTED
5798: e59f0078 ldr r0, [pc, #120] ; 5818 <pthread_create+0x308> <== NOT EXECUTED
579c: eb0009e7 bl 7f40 <_Objects_Free> <== NOT EXECUTED
_POSIX_Threads_Free( the_thread );
_RTEMS_Unlock_allocator();
57a0: e59fc06c ldr ip, [pc, #108] ; 5814 <pthread_create+0x304> <== NOT EXECUTED
57a4: e59c0000 ldr r0, [ip] <== NOT EXECUTED
57a8: eb0006b8 bl 7290 <_API_Mutex_Unlock> <== NOT EXECUTED
57ac: e3a00016 mov r0, #22 ; 0x16 <== NOT EXECUTED
57b0: eaffff72 b 5580 <pthread_create+0x70> <== NOT EXECUTED
*/
the_thread = _POSIX_Threads_Allocate();
if ( !the_thread ) {
_RTEMS_Unlock_allocator();
57b4: e59f3058 ldr r3, [pc, #88] ; 5814 <pthread_create+0x304>
57b8: e5930000 ldr r0, [r3]
57bc: eb0006b3 bl 7290 <_API_Mutex_Unlock>
57c0: e3a0000b mov r0, #11 ; 0xb
57c4: eaffff6d b 5580 <pthread_create+0x70>
/*
* Return the id and indicate we successfully created the thread
*/
*thread = the_thread->Object.id;
57c8: e5953008 ldr r3, [r5, #8]
57cc: e59d201c ldr r2, [sp, #28]
57d0: e5823000 str r3, [r2]
_RTEMS_Unlock_allocator();
57d4: e59f3038 ldr r3, [pc, #56] ; 5814 <pthread_create+0x304>
57d8: e5930000 ldr r0, [r3]
57dc: eb0006ab bl 7290 <_API_Mutex_Unlock>
57e0: e3a00000 mov r0, #0 ; 0x0
57e4: eaffff65 b 5580 <pthread_create+0x70>
arg,
0 /* unused */
);
if ( schedpolicy == SCHED_SPORADIC ) {
_Watchdog_Insert_ticks(
57e8: e2840088 add r0, r4, #136 ; 0x88
57ec: eb001064 bl 9984 <_Timespec_To_ticks>
57f0: e284109c add r1, r4, #156 ; 0x9c
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
57f4: e58400a8 str r0, [r4, #168]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
57f8: e59f001c ldr r0, [pc, #28] ; 581c <pthread_create+0x30c>
57fc: eb001163 bl 9d90 <_Watchdog_Insert>
5800: eaffffe1 b 578c <pthread_create+0x27c>
0000459c <pthread_key_create>:
459c: e59f2104 ldr r2, [pc, #260] ; 46a8 <pthread_key_create+0x10c>
45a0: e5923000 ldr r3, [r2]
45a4: e2833001 add r3, r3, #1 ; 0x1
int pthread_key_create(
pthread_key_t *key,
void (*destructor)( void * )
)
{
45a8: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
45ac: e5823000 str r3, [r2]
45b0: e1a09000 mov r9, r0
45b4: e1a04001 mov r4, r1
* _POSIX_Keys_Allocate
*/
RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void )
{
return (POSIX_Keys_Control *) _Objects_Allocate( &_POSIX_Keys_Information );
45b8: e59fa0ec ldr sl, [pc, #236] ; 46ac <pthread_key_create+0x110>
45bc: e1a0000a mov r0, sl
45c0: eb00093a bl 6ab0 <_Objects_Allocate>
_Thread_Disable_dispatch();
the_key = _POSIX_Keys_Allocate();
if ( !the_key ) {
45c4: e2507000 subs r7, r0, #0 ; 0x0
45c8: 0a000024 beq 4660 <pthread_key_create+0xc4>
_Thread_Enable_dispatch();
return EAGAIN;
}
the_key->destructor = destructor;
45cc: e5874014 str r4, [r7, #20]
45d0: e59f80d8 ldr r8, [pc, #216] ; 46b0 <pthread_key_create+0x114>
45d4: e1a06007 mov r6, r7
45d8: e3a05001 mov r5, #1 ; 0x1
for ( the_api = 1;
the_api <= OBJECTS_APIS_LAST;
the_api++ ) {
if ( _Objects_Information_table[ the_api ] ) {
45dc: e7983105 ldr r3, [r8, r5, lsl #2]
45e0: e3530000 cmp r3, #0 ; 0x0
45e4: 0a00001b beq 4658 <pthread_key_create+0xbc>
INTERNAL_ERROR_CORE,
TRUE,
INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY
);
#endif
bytes_to_allocate = sizeof( void * ) *
45e8: e5933004 ldr r3, [r3, #4]
45ec: e1d341b0 ldrh r4, [r3, #16]
45f0: e2844001 add r4, r4, #1 ; 0x1
45f4: e1a04104 lsl r4, r4, #2
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
table = _Workspace_Allocate( bytes_to_allocate );
45f8: e1a00004 mov r0, r4
45fc: eb001236 bl 8edc <_Workspace_Allocate>
if ( !table ) {
4600: e2503000 subs r3, r0, #0 ; 0x0
_Thread_Enable_dispatch();
return ENOMEM;
}
the_key->Values[ the_api ] = table;
memset( table, '\0', bytes_to_allocate );
4604: e1a02004 mov r2, r4
4608: e3a01000 mov r1, #0 ; 0x0
);
#endif
bytes_to_allocate = sizeof( void * ) *
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
table = _Workspace_Allocate( bytes_to_allocate );
if ( !table ) {
460c: 0a000016 beq 466c <pthread_key_create+0xd0>
_POSIX_Keys_Free( the_key );
_Thread_Enable_dispatch();
return ENOMEM;
}
the_key->Values[ the_api ] = table;
4610: e586301c str r3, [r6, #28]
memset( table, '\0', bytes_to_allocate );
4614: eb002452 bl d764 <memset>
* for. [NOTE: Currently RTEMS Classic API tasks are always enabled.]
*/
for ( the_api = 1;
the_api <= OBJECTS_APIS_LAST;
the_api++ ) {
4618: e2855001 add r5, r5, #1 ; 0x1
* APIs are optional. Thus there may be no ITRON tasks to have keys
* for. [NOTE: Currently RTEMS Classic API tasks are always enabled.]
*/
for ( the_api = 1;
the_api <= OBJECTS_APIS_LAST;
461c: e3550005 cmp r5, #5 ; 0x5
the_api++ ) {
4620: e2866004 add r6, r6, #4 ; 0x4
* APIs are optional. Thus there may be no ITRON tasks to have keys
* for. [NOTE: Currently RTEMS Classic API tasks are always enabled.]
*/
for ( the_api = 1;
the_api <= OBJECTS_APIS_LAST;
4624: 1affffec bne 45dc <pthread_key_create+0x40>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
4628: e5970008 ldr r0, [r7, #8]
462c: e59a101c ldr r1, [sl, #28]
4630: e1a02800 lsl r2, r0, #16
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == FALSE */
the_object->name.name_u32 = name;
4634: e3a04000 mov r4, #0 ; 0x0
}
}
the_key->is_active = TRUE;
4638: e3a03001 mov r3, #1 ; 0x1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
463c: e7817722 str r7, [r1, r2, lsr #14]
4640: e5c73010 strb r3, [r7, #16]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == FALSE */
the_object->name.name_u32 = name;
4644: e587400c str r4, [r7, #12]
_Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 );
*key = the_key->Object.id;
4648: e5890000 str r0, [r9]
_Thread_Enable_dispatch();
464c: eb000c7f bl 7850 <_Thread_Enable_dispatch>
4650: e1a00004 mov r0, r4
return 0;
}
4654: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
}
the_key->Values[ the_api ] = table;
memset( table, '\0', bytes_to_allocate );
} else {
the_key->Values[ the_api ] = NULL;
4658: e586301c str r3, [r6, #28]
465c: eaffffed b 4618 <pthread_key_create+0x7c>
_Thread_Disable_dispatch();
the_key = _POSIX_Keys_Allocate();
if ( !the_key ) {
_Thread_Enable_dispatch();
4660: eb000c7a bl 7850 <_Thread_Enable_dispatch>
4664: e3a0000b mov r0, #11 ; 0xb
4668: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
bytes_to_allocate = sizeof( void * ) *
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
table = _Workspace_Allocate( bytes_to_allocate );
if ( !table ) {
for ( --the_api;
the_api >= 1;
466c: e2554001 subs r4, r5, #1 ; 0x1
4670: 0a000006 beq 4690 <pthread_key_create+0xf4>
4674: e2853006 add r3, r5, #6 ; 0x6 <== NOT EXECUTED
4678: e1a03103 lsl r3, r3, #2 <== NOT EXECUTED
467c: e0875003 add r5, r7, r3 <== NOT EXECUTED
the_api-- )
_Workspace_Free( the_key->Values[ the_api ] );
4680: e5350004 ldr r0, [r5, #-4]! <== NOT EXECUTED
4684: eb001210 bl 8ecc <_Workspace_Free> <== NOT EXECUTED
bytes_to_allocate = sizeof( void * ) *
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
table = _Workspace_Allocate( bytes_to_allocate );
if ( !table ) {
for ( --the_api;
the_api >= 1;
4688: e2544001 subs r4, r4, #1 ; 0x1 <== NOT EXECUTED
468c: 1afffffb bne 4680 <pthread_key_create+0xe4> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free (
POSIX_Keys_Control *the_key
)
{
_Objects_Free( &_POSIX_Keys_Information, &the_key->Object );
4690: e59f0014 ldr r0, [pc, #20] ; 46ac <pthread_key_create+0x110>
4694: e1a01007 mov r1, r7
4698: eb0009f1 bl 6e64 <_Objects_Free>
the_api-- )
_Workspace_Free( the_key->Values[ the_api ] );
_POSIX_Keys_Free( the_key );
_Thread_Enable_dispatch();
469c: eb000c6b bl 7850 <_Thread_Enable_dispatch>
46a0: e3a0000c mov r0, #12 ; 0xc
46a4: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
00018668 <pthread_kill>:
int pthread_kill(
pthread_t thread,
int sig
)
{
18668: e92d41f0 push {r4, r5, r6, r7, r8, lr}
POSIX_API_Control *api;
Thread_Control *the_thread;
Objects_Locations location;
if ( !sig )
1866c: e2514000 subs r4, r1, #0 ; 0x0
int pthread_kill(
pthread_t thread,
int sig
)
{
18670: e24dd004 sub sp, sp, #4 ; 0x4
POSIX_API_Control *api;
Thread_Control *the_thread;
Objects_Locations location;
if ( !sig )
18674: 0a000028 beq 1871c <pthread_kill+0xb4>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
18678: e2447001 sub r7, r4, #1 ; 0x1
1867c: e357001f cmp r7, #31 ; 0x1f
18680: 8a000025 bhi 1871c <pthread_kill+0xb4>
rtems_set_errno_and_return_minus_one( EINVAL );
the_thread = _Thread_Get( thread, &location );
18684: e1a0100d mov r1, sp
18688: ebffbf5f bl 840c <_Thread_Get>
switch ( location ) {
1868c: e59d5000 ldr r5, [sp]
18690: e3550000 cmp r5, #0 ; 0x0
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
rtems_set_errno_and_return_minus_one( EINVAL );
the_thread = _Thread_Get( thread, &location );
18694: e1a06000 mov r6, r0
switch ( location ) {
18698: 1a000024 bne 18730 <pthread_kill+0xc8>
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( sig ) {
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
1869c: e1a03204 lsl r3, r4, #4
186a0: e59f209c ldr r2, [pc, #156] ; 18744 <pthread_kill+0xdc>
186a4: e0433104 sub r3, r3, r4, lsl #2
186a8: e0822003 add r2, r2, r3
186ac: e5921008 ldr r1, [r2, #8]
186b0: e3510001 cmp r1, #1 ; 0x1
case OBJECTS_LOCAL:
/*
* If sig == 0 then just validate arguments
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
186b4: e5902108 ldr r2, [r0, #264]
if ( sig ) {
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
186b8: 0a000014 beq 18710 <pthread_kill+0xa8>
return 0;
}
/* XXX critical section */
api->signals_pending |= signo_to_mask( sig );
186bc: e59230c8 ldr r3, [r2, #200]
186c0: e3a08001 mov r8, #1 ; 0x1
186c4: e1833718 orr r3, r3, r8, lsl r7
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
186c8: e1a01004 mov r1, r4
return 0;
}
/* XXX critical section */
api->signals_pending |= signo_to_mask( sig );
186cc: e58230c8 str r3, [r2, #200]
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
186d0: e1a02005 mov r2, r5
186d4: ebffff95 bl 18530 <_POSIX_signals_Unblock_thread>
the_thread->do_post_task_switch_extension = true;
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
186d8: e59f3068 ldr r3, [pc, #104] ; 18748 <pthread_kill+0xe0>
186dc: e5932000 ldr r2, [r3]
186e0: e3520000 cmp r2, #0 ; 0x0
api->signals_pending |= signo_to_mask( sig );
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
the_thread->do_post_task_switch_extension = true;
186e4: e5c68075 strb r8, [r6, #117]
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
186e8: 0a000004 beq 18700 <pthread_kill+0x98>
186ec: e59f3058 ldr r3, [pc, #88] ; 1874c <pthread_kill+0xe4>
186f0: e5932000 ldr r2, [r3]
186f4: e1560002 cmp r6, r2
_ISR_Signals_to_thread_executing = TRUE;
186f8: 059f3050 ldreq r3, [pc, #80] ; 18750 <pthread_kill+0xe8>
186fc: 05c38000 strbeq r8, [r3]
}
_Thread_Enable_dispatch();
18700: ebffbf22 bl 8390 <_Thread_Enable_dispatch>
18704: e3a00000 mov r0, #0 ; 0x0
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( ESRCH );
}
18708: e28dd004 add sp, sp, #4 ; 0x4
1870c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( sig ) {
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
_Thread_Enable_dispatch();
18710: ebffbf1e bl 8390 <_Thread_Enable_dispatch> <== NOT EXECUTED
18714: e1a00005 mov r0, r5 <== NOT EXECUTED
18718: eafffffa b 18708 <pthread_kill+0xa0> <== NOT EXECUTED
if ( !sig )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
rtems_set_errno_and_return_minus_one( EINVAL );
1871c: ebffd571 bl dce8 <__errno>
18720: e3a03016 mov r3, #22 ; 0x16
18724: e5803000 str r3, [r0]
18728: e3e00000 mvn r0, #0 ; 0x0
1872c: eafffff5 b 18708 <pthread_kill+0xa0>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( ESRCH );
18730: ebffd56c bl dce8 <__errno> <== NOT EXECUTED
18734: e3a03003 mov r3, #3 ; 0x3 <== NOT EXECUTED
18738: e5803000 str r3, [r0] <== NOT EXECUTED
1873c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
18740: eafffff0 b 18708 <pthread_kill+0xa0> <== NOT EXECUTED
00005d20 <pthread_mutex_destroy>:
*/
int pthread_mutex_destroy(
pthread_mutex_t *mutex
)
{
5d20: e92d4030 push {r4, r5, lr}
5d24: e24dd004 sub sp, sp, #4 ; 0x4
register POSIX_Mutex_Control *the_mutex;
Objects_Locations location;
the_mutex = _POSIX_Mutex_Get( mutex, &location );
5d28: e1a0100d mov r1, sp
5d2c: eb000030 bl 5df4 <_POSIX_Mutex_Get>
switch ( location ) {
5d30: e59d5000 ldr r5, [sp]
5d34: e3550000 cmp r5, #0 ; 0x0
)
{
register POSIX_Mutex_Control *the_mutex;
Objects_Locations location;
the_mutex = _POSIX_Mutex_Get( mutex, &location );
5d38: e1a04000 mov r4, r0
switch ( location ) {
5d3c: 13a00016 movne r0, #22 ; 0x16
5d40: 1a000004 bne 5d58 <pthread_mutex_destroy+0x38>
/*
* XXX: There is an error for the mutex being locked
* or being in use by a condition variable.
*/
if ( _CORE_mutex_Is_locked( &the_mutex->Mutex ) ) {
5d44: e5943064 ldr r3, [r4, #100]
5d48: e3530000 cmp r3, #0 ; 0x0
5d4c: 1a000003 bne 5d60 <pthread_mutex_destroy+0x40>
_Thread_Enable_dispatch();
5d50: eb000dc2 bl 9460 <_Thread_Enable_dispatch> <== NOT EXECUTED
5d54: e3a00010 mov r0, #16 ; 0x10 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
5d58: e28dd004 add sp, sp, #4 ; 0x4
5d5c: e8bd8030 pop {r4, r5, pc}
if ( _CORE_mutex_Is_locked( &the_mutex->Mutex ) ) {
_Thread_Enable_dispatch();
return EBUSY;
}
_Objects_Close( &_POSIX_Mutex_Information, &the_mutex->Object );
5d60: e59f002c ldr r0, [pc, #44] ; 5d94 <pthread_mutex_destroy+0x74>
5d64: e1a01004 mov r1, r4
5d68: eb000a7a bl 8758 <_Objects_Close>
_CORE_mutex_Flush( &the_mutex->Mutex, NULL, EINVAL );
5d6c: e3a02016 mov r2, #22 ; 0x16
5d70: e2840014 add r0, r4, #20 ; 0x14
5d74: e1a01005 mov r1, r5
5d78: eb000843 bl 7e8c <_CORE_mutex_Flush>
RTEMS_INLINE_ROUTINE void _POSIX_Mutex_Free (
POSIX_Mutex_Control *the_mutex
)
{
_Objects_Free( &_POSIX_Mutex_Information, &the_mutex->Object );
5d7c: e59f0010 ldr r0, [pc, #16] ; 5d94 <pthread_mutex_destroy+0x74>
5d80: e1a01004 mov r1, r4
5d84: eb000b3a bl 8a74 <_Objects_Free>
_POSIX_Mutex_Free( the_mutex );
_Thread_Enable_dispatch();
5d88: eb000db4 bl 9460 <_Thread_Enable_dispatch>
5d8c: e1a00005 mov r0, r5
5d90: eafffff0 b 5d58 <pthread_mutex_destroy+0x38>
00005e48 <pthread_mutex_getprioceiling>:
int pthread_mutex_getprioceiling(
pthread_mutex_t *mutex,
int *prioceiling
)
{
5e48: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
register POSIX_Mutex_Control *the_mutex;
Objects_Locations location;
if ( !prioceiling )
5e4c: e2515000 subs r5, r1, #0 ; 0x0 <== NOT EXECUTED
int pthread_mutex_getprioceiling(
pthread_mutex_t *mutex,
int *prioceiling
)
{
5e50: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED
register POSIX_Mutex_Control *the_mutex;
Objects_Locations location;
if ( !prioceiling )
5e54: 0a000004 beq 5e6c <pthread_mutex_getprioceiling+0x24> <== NOT EXECUTED
return EINVAL;
the_mutex = _POSIX_Mutex_Get( mutex, &location );
5e58: e1a0100d mov r1, sp <== NOT EXECUTED
5e5c: ebffffe4 bl 5df4 <_POSIX_Mutex_Get> <== NOT EXECUTED
switch ( location ) {
5e60: e59d4000 ldr r4, [sp] <== NOT EXECUTED
5e64: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED
5e68: 0a000002 beq 5e78 <pthread_mutex_getprioceiling+0x30> <== NOT EXECUTED
case OBJECTS_LOCAL:
*prioceiling = _POSIX_Priority_From_core(
the_mutex->Mutex.Attributes.priority_ceiling
);
_Thread_Enable_dispatch();
return 0;
5e6c: e3a00016 mov r0, #22 ; 0x16 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
5e70: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED
5e74: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
the_mutex = _POSIX_Mutex_Get( mutex, &location );
switch ( location ) {
case OBJECTS_LOCAL:
*prioceiling = _POSIX_Priority_From_core(
5e78: e5903060 ldr r3, [r0, #96] <== NOT EXECUTED
5e7c: e26330ff rsb r3, r3, #255 ; 0xff <== NOT EXECUTED
5e80: e5853000 str r3, [r5] <== NOT EXECUTED
the_mutex->Mutex.Attributes.priority_ceiling
);
_Thread_Enable_dispatch();
5e84: eb000d75 bl 9460 <_Thread_Enable_dispatch> <== NOT EXECUTED
5e88: e1a00004 mov r0, r4 <== NOT EXECUTED
5e8c: eafffff7 b 5e70 <pthread_mutex_getprioceiling+0x28> <== NOT EXECUTED
00005e90 <pthread_mutex_init>:
#if 0
register POSIX_Mutex_Control *mutex_in_use;
Objects_Locations location;
#endif
if ( attr ) the_attr = attr;
5e90: e59f3148 ldr r3, [pc, #328] ; 5fe0 <pthread_mutex_init+0x150>
5e94: e3510000 cmp r1, #0 ; 0x0
int pthread_mutex_init(
pthread_mutex_t *mutex,
const pthread_mutexattr_t *attr
)
{
5e98: e92d41f0 push {r4, r5, r6, r7, r8, lr}
#if 0
register POSIX_Mutex_Control *mutex_in_use;
Objects_Locations location;
#endif
if ( attr ) the_attr = attr;
5e9c: 11a04001 movne r4, r1
5ea0: 01a04003 moveq r4, r3
else the_attr = &_POSIX_Mutex_Default_attributes;
/* Check for NULL mutex */
if ( !mutex )
5ea4: e2507000 subs r7, r0, #0 ; 0x0
5ea8: 0a000011 beq 5ef4 <pthread_mutex_init+0x64>
break;
}
}
#endif
if ( !the_attr->is_initialized )
5eac: e5943000 ldr r3, [r4]
5eb0: e3530000 cmp r3, #0 ; 0x0
5eb4: 0a00000e beq 5ef4 <pthread_mutex_init+0x64>
/*
* XXX: Be careful about attributes when global!!!
*/
assert( the_attr->process_shared == PTHREAD_PROCESS_PRIVATE );
5eb8: e5943004 ldr r3, [r4, #4]
5ebc: e3530000 cmp r3, #0 ; 0x0
5ec0: 1a000041 bne 5fcc <pthread_mutex_init+0x13c>
/*
* Determine the discipline of the mutex
*/
switch ( the_attr->protocol ) {
5ec4: e594300c ldr r3, [r4, #12]
5ec8: e3530001 cmp r3, #1 ; 0x1
5ecc: 0a00002f beq 5f90 <pthread_mutex_init+0x100>
5ed0: e3530002 cmp r3, #2 ; 0x2
5ed4: 0a000033 beq 5fa8 <pthread_mutex_init+0x118>
5ed8: e3530000 cmp r3, #0 ; 0x0
5edc: 01a06003 moveq r6, r3
5ee0: 1a000003 bne 5ef4 <pthread_mutex_init+0x64>
break;
default:
return EINVAL;
}
if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) )
5ee4: e5943008 ldr r3, [r4, #8]
5ee8: e2433001 sub r3, r3, #1 ; 0x1
5eec: e35300fd cmp r3, #253 ; 0xfd
5ef0: 9a000001 bls 5efc <pthread_mutex_init+0x6c>
_Objects_Open_u32( &_POSIX_Mutex_Information, &the_mutex->Object, 0 );
*mutex = the_mutex->Object.id;
_Thread_Enable_dispatch();
return 0;
5ef4: e3a00016 mov r0, #22 ; 0x16
}
5ef8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
5efc: e59f20e0 ldr r2, [pc, #224] ; 5fe4 <pthread_mutex_init+0x154>
5f00: e5923000 ldr r3, [r2]
5f04: e2833001 add r3, r3, #1 ; 0x1
5f08: e5823000 str r3, [r2]
* _POSIX_Mutex_Allocate
*/
RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void )
{
return (POSIX_Mutex_Control *) _Objects_Allocate( &_POSIX_Mutex_Information );
5f0c: e59f80d4 ldr r8, [pc, #212] ; 5fe8 <pthread_mutex_init+0x158>
5f10: e1a00008 mov r0, r8
5f14: eb0009e9 bl 86c0 <_Objects_Allocate>
_Thread_Disable_dispatch();
the_mutex = _POSIX_Mutex_Allocate();
if ( !the_mutex ) {
5f18: e2505000 subs r5, r0, #0 ; 0x0
5f1c: 0a000027 beq 5fc0 <pthread_mutex_init+0x130>
_Thread_Enable_dispatch();
return EAGAIN;
}
the_mutex->process_shared = the_attr->process_shared;
5f20: e5943004 ldr r3, [r4, #4]
5f24: e5853010 str r3, [r5, #16]
the_mutex_attr = &the_mutex->Mutex.Attributes;
if ( the_attr->recursive )
5f28: e5942010 ldr r2, [r4, #16]
5f2c: e3520000 cmp r2, #0 ; 0x0
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
5f30: 13a03000 movne r3, #0 ; 0x0
else
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR;
5f34: 03a03001 moveq r3, #1 ; 0x1
the_mutex->process_shared = the_attr->process_shared;
the_mutex_attr = &the_mutex->Mutex.Attributes;
if ( the_attr->recursive )
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
5f38: 15853054 strne r3, [r5, #84]
else
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR;
5f3c: 05853054 streq r3, [r5, #84]
the_mutex_attr->only_owner_release = TRUE;
the_mutex_attr->priority_ceiling =
5f40: e5943008 ldr r3, [r4, #8]
if ( the_attr->recursive )
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
else
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR;
the_mutex_attr->only_owner_release = TRUE;
5f44: e3a01001 mov r1, #1 ; 0x1
the_mutex_attr->priority_ceiling =
5f48: e26330ff rsb r3, r3, #255 ; 0xff
/*
* Must be initialized to unlocked.
*/
_CORE_mutex_Initialize(
5f4c: e1a02001 mov r2, r1
if ( the_attr->recursive )
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
else
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR;
the_mutex_attr->only_owner_release = TRUE;
the_mutex_attr->priority_ceiling =
5f50: e5853060 str r3, [r5, #96]
if ( the_attr->recursive )
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
else
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR;
the_mutex_attr->only_owner_release = TRUE;
5f54: e5c51058 strb r1, [r5, #88]
the_mutex_attr->priority_ceiling =
_POSIX_Priority_To_core( the_attr->prio_ceiling );
the_mutex_attr->discipline = the_discipline;
5f58: e585605c str r6, [r5, #92]
/*
* Must be initialized to unlocked.
*/
_CORE_mutex_Initialize(
5f5c: e2851054 add r1, r5, #84 ; 0x54
5f60: e2850014 add r0, r5, #20 ; 0x14
5f64: eb0007c9 bl 7e90 <_CORE_mutex_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
5f68: e5951008 ldr r1, [r5, #8]
5f6c: e598201c ldr r2, [r8, #28]
5f70: e1a03801 lsl r3, r1, #16
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == FALSE */
the_object->name.name_u32 = name;
5f74: e3a04000 mov r4, #0 ; 0x0
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
5f78: e7825723 str r5, [r2, r3, lsr #14]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == FALSE */
the_object->name.name_u32 = name;
5f7c: e585400c str r4, [r5, #12]
CORE_MUTEX_UNLOCKED
);
_Objects_Open_u32( &_POSIX_Mutex_Information, &the_mutex->Object, 0 );
*mutex = the_mutex->Object.id;
5f80: e5871000 str r1, [r7]
_Thread_Enable_dispatch();
5f84: eb000d35 bl 9460 <_Thread_Enable_dispatch>
5f88: e1a00004 mov r0, r4
5f8c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
break;
default:
return EINVAL;
}
if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) )
5f90: e5943008 ldr r3, [r4, #8]
5f94: e2433001 sub r3, r3, #1 ; 0x1
5f98: e35300fd cmp r3, #253 ; 0xfd
/*
* Determine the discipline of the mutex
*/
switch ( the_attr->protocol ) {
5f9c: e3a06002 mov r6, #2 ; 0x2
break;
default:
return EINVAL;
}
if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) )
5fa0: 8affffd3 bhi 5ef4 <pthread_mutex_init+0x64>
5fa4: eaffffd4 b 5efc <pthread_mutex_init+0x6c>
5fa8: e5943008 ldr r3, [r4, #8]
5fac: e2433001 sub r3, r3, #1 ; 0x1
5fb0: e35300fd cmp r3, #253 ; 0xfd
/*
* Determine the discipline of the mutex
*/
switch ( the_attr->protocol ) {
5fb4: e3a06003 mov r6, #3 ; 0x3
break;
default:
return EINVAL;
}
if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) )
5fb8: 8affffcd bhi 5ef4 <pthread_mutex_init+0x64>
5fbc: eaffffce b 5efc <pthread_mutex_init+0x6c>
_Thread_Disable_dispatch();
the_mutex = _POSIX_Mutex_Allocate();
if ( !the_mutex ) {
_Thread_Enable_dispatch();
5fc0: eb000d26 bl 9460 <_Thread_Enable_dispatch> <== NOT EXECUTED
5fc4: e3a0000b mov r0, #11 ; 0xb <== NOT EXECUTED
5fc8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
/*
* XXX: Be careful about attributes when global!!!
*/
assert( the_attr->process_shared == PTHREAD_PROCESS_PRIVATE );
5fcc: e59f0018 ldr r0, [pc, #24] ; 5fec <pthread_mutex_init+0x15c><== NOT EXECUTED
5fd0: e3a01068 mov r1, #104 ; 0x68 <== NOT EXECUTED
5fd4: e59f2014 ldr r2, [pc, #20] ; 5ff0 <pthread_mutex_init+0x160><== NOT EXECUTED
5fd8: e59f3014 ldr r3, [pc, #20] ; 5ff4 <pthread_mutex_init+0x164><== NOT EXECUTED
5fdc: ebfff387 bl 2e00 <__assert_func> <== NOT EXECUTED
0000606c <pthread_mutex_setprioceiling>:
int pthread_mutex_setprioceiling(
pthread_mutex_t *mutex,
int prioceiling,
int *old_ceiling
)
{
606c: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
register POSIX_Mutex_Control *the_mutex;
Objects_Locations location;
Priority_Control the_priority;
int status;
if ( !old_ceiling )
6070: e2527000 subs r7, r2, #0 ; 0x0 <== NOT EXECUTED
int pthread_mutex_setprioceiling(
pthread_mutex_t *mutex,
int prioceiling,
int *old_ceiling
)
{
6074: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED
6078: e1a06001 mov r6, r1 <== NOT EXECUTED
607c: e1a05000 mov r5, r0 <== NOT EXECUTED
register POSIX_Mutex_Control *the_mutex;
Objects_Locations location;
Priority_Control the_priority;
int status;
if ( !old_ceiling )
6080: 0a000002 beq 6090 <pthread_mutex_setprioceiling+0x24> <== NOT EXECUTED
return EINVAL;
if ( !_POSIX_Priority_Is_valid( prioceiling ) )
6084: e2413001 sub r3, r1, #1 ; 0x1 <== NOT EXECUTED
6088: e35300fd cmp r3, #253 ; 0xfd <== NOT EXECUTED
608c: 9a000003 bls 60a0 <pthread_mutex_setprioceiling+0x34> <== NOT EXECUTED
&the_mutex->Mutex,
the_mutex->Object.id,
NULL
);
_Thread_Enable_dispatch();
return 0;
6090: e3a04016 mov r4, #22 ; 0x16 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
6094: e1a00004 mov r0, r4 <== NOT EXECUTED
6098: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED
609c: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
/*
* Must acquire the mutex before we can change it's ceiling
*/
status = pthread_mutex_lock( mutex );
60a0: ebffffd4 bl 5ff8 <pthread_mutex_lock> <== NOT EXECUTED
if ( status )
60a4: e2504000 subs r4, r0, #0 ; 0x0 <== NOT EXECUTED
60a8: 1afffff9 bne 6094 <pthread_mutex_setprioceiling+0x28> <== NOT EXECUTED
return status;
the_mutex = _POSIX_Mutex_Get( mutex, &location );
60ac: e1a00005 mov r0, r5 <== NOT EXECUTED
60b0: e1a0100d mov r1, sp <== NOT EXECUTED
60b4: ebffff4e bl 5df4 <_POSIX_Mutex_Get> <== NOT EXECUTED
switch ( location ) {
60b8: e59d3000 ldr r3, [sp] <== NOT EXECUTED
60bc: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
60c0: 1afffff2 bne 6090 <pthread_mutex_setprioceiling+0x24> <== NOT EXECUTED
case OBJECTS_LOCAL:
*old_ceiling = _POSIX_Priority_From_core(
60c4: e5903060 ldr r3, [r0, #96] <== NOT EXECUTED
the_mutex->Mutex.Attributes.priority_ceiling
);
the_mutex->Mutex.Attributes.priority_ceiling = the_priority;
60c8: e26620ff rsb r2, r6, #255 ; 0xff <== NOT EXECUTED
the_mutex = _POSIX_Mutex_Get( mutex, &location );
switch ( location ) {
case OBJECTS_LOCAL:
*old_ceiling = _POSIX_Priority_From_core(
60cc: e26330ff rsb r3, r3, #255 ; 0xff <== NOT EXECUTED
the_mutex->Mutex.Attributes.priority_ceiling
);
the_mutex->Mutex.Attributes.priority_ceiling = the_priority;
_CORE_mutex_Surrender(
60d0: e5901008 ldr r1, [r0, #8] <== NOT EXECUTED
the_mutex = _POSIX_Mutex_Get( mutex, &location );
switch ( location ) {
case OBJECTS_LOCAL:
*old_ceiling = _POSIX_Priority_From_core(
60d4: e5873000 str r3, [r7] <== NOT EXECUTED
the_mutex->Mutex.Attributes.priority_ceiling
);
the_mutex->Mutex.Attributes.priority_ceiling = the_priority;
60d8: e5802060 str r2, [r0, #96] <== NOT EXECUTED
_CORE_mutex_Surrender(
60dc: e1a02004 mov r2, r4 <== NOT EXECUTED
60e0: e2800014 add r0, r0, #20 ; 0x14 <== NOT EXECUTED
60e4: eb0007e5 bl 8080 <_CORE_mutex_Surrender> <== NOT EXECUTED
&the_mutex->Mutex,
the_mutex->Object.id,
NULL
);
_Thread_Enable_dispatch();
60e8: eb000cdc bl 9460 <_Thread_Enable_dispatch> <== NOT EXECUTED
60ec: eaffffe8 b 6094 <pthread_mutex_setprioceiling+0x28> <== NOT EXECUTED
000060f0 <pthread_mutex_timedlock>:
int pthread_mutex_timedlock(
pthread_mutex_t *mutex,
const struct timespec *abstime
)
{
60f0: e92d4010 push {r4, lr} <== NOT EXECUTED
60f4: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED
60f8: e1a04000 mov r4, r0 <== NOT EXECUTED
* So we check the abstime provided, and hold on to whether it
* is valid or not. If it isn't correct and in the future,
* then we do a polling operation and convert the UNSATISFIED
* status into the appropriate error.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
60fc: e1a00001 mov r0, r1 <== NOT EXECUTED
6100: e1a0100d mov r1, sp <== NOT EXECUTED
6104: eb000026 bl 61a4 <_POSIX_Absolute_timeout_to_ticks> <== NOT EXECUTED
switch ( status ) {
6108: e3500002 cmp r0, #2 ; 0x2 <== NOT EXECUTED
610c: 9a000001 bls 6118 <pthread_mutex_timedlock+0x28> <== NOT EXECUTED
6110: e3500003 cmp r0, #3 ; 0x3 <== NOT EXECUTED
6114: 0a000005 beq 6130 <pthread_mutex_timedlock+0x40> <== NOT EXECUTED
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
do_wait = TRUE;
break;
}
lock_status = _POSIX_Mutex_Lock_support(
6118: e1a00004 mov r0, r4 <== NOT EXECUTED
611c: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED
6120: e59d2000 ldr r2, [sp] <== NOT EXECUTED
6124: ebffffb6 bl 6004 <_POSIX_Mutex_Lock_support> <== NOT EXECUTED
break;
}
}
return lock_status;
}
6128: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED
612c: e8bd8010 pop {r4, pc} <== NOT EXECUTED
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
do_wait = TRUE;
break;
}
lock_status = _POSIX_Mutex_Lock_support(
6130: e1a00004 mov r0, r4 <== NOT EXECUTED
6134: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED
6138: e59d2000 ldr r2, [sp] <== NOT EXECUTED
613c: ebffffb0 bl 6004 <_POSIX_Mutex_Lock_support> <== NOT EXECUTED
6140: eafffff8 b 6128 <pthread_mutex_timedlock+0x38> <== NOT EXECUTED
00004d98 <pthread_rwlock_init>:
int pthread_rwlock_init(
pthread_rwlock_t *rwlock,
const pthread_rwlockattr_t *attr
)
{
4d98: e92d40f0 push {r4, r5, r6, r7, lr}
const pthread_rwlockattr_t *the_attr;
/*
* Error check parameters
*/
if ( !rwlock )
4d9c: e2506000 subs r6, r0, #0 ; 0x0
int pthread_rwlock_init(
pthread_rwlock_t *rwlock,
const pthread_rwlockattr_t *attr
)
{
4da0: e24dd00c sub sp, sp, #12 ; 0xc
const pthread_rwlockattr_t *the_attr;
/*
* Error check parameters
*/
if ( !rwlock )
4da4: 0a000007 beq 4dc8 <pthread_rwlock_init+0x30>
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
4da8: e3510000 cmp r1, #0 ; 0x0
4dac: 0a000020 beq 4e34 <pthread_rwlock_init+0x9c>
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
4db0: e5913000 ldr r3, [r1]
4db4: e3530000 cmp r3, #0 ; 0x0
4db8: 0a000002 beq 4dc8 <pthread_rwlock_init+0x30>
return EINVAL;
switch ( the_attr->process_shared ) {
4dbc: e5915004 ldr r5, [r1, #4]
4dc0: e3550000 cmp r5, #0 ; 0x0
4dc4: 0a000002 beq 4dd4 <pthread_rwlock_init+0x3c>
);
*rwlock = the_rwlock->Object.id;
_Thread_Enable_dispatch();
return 0;
4dc8: e3a00016 mov r0, #22 ; 0x16
}
4dcc: e28dd00c add sp, sp, #12 ; 0xc
4dd0: e8bd80f0 pop {r4, r5, r6, r7, pc}
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
4dd4: e59f206c ldr r2, [pc, #108] ; 4e48 <pthread_rwlock_init+0xb0>
4dd8: e5923000 ldr r3, [r2]
4ddc: e2833001 add r3, r3, #1 ; 0x1
4de0: e5823000 str r3, [r2]
* This function allocates a RWLock control block from
* the inactive chain of free RWLock control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Allocate( void )
{
return (POSIX_RWLock_Control *)
4de4: e59f7060 ldr r7, [pc, #96] ; 4e4c <pthread_rwlock_init+0xb4>
4de8: e1a00007 mov r0, r7
4dec: eb000a66 bl 778c <_Objects_Allocate>
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
4df0: e2504000 subs r4, r0, #0 ; 0x0
4df4: 0a00000b beq 4e28 <pthread_rwlock_init+0x90>
_Thread_Enable_dispatch();
return EAGAIN;
}
_CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes );
4df8: e2840010 add r0, r4, #16 ; 0x10
4dfc: e28d1008 add r1, sp, #8 ; 0x8
4e00: eb00087d bl 6ffc <_CORE_RWLock_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
4e04: e5941008 ldr r1, [r4, #8]
4e08: e597201c ldr r2, [r7, #28]
4e0c: e1a03801 lsl r3, r1, #16
4e10: e7824723 str r4, [r2, r3, lsr #14]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == FALSE */
the_object->name.name_u32 = name;
4e14: e584500c str r5, [r4, #12]
&_POSIX_RWLock_Information,
&the_rwlock->Object,
0
);
*rwlock = the_rwlock->Object.id;
4e18: e5861000 str r1, [r6]
_Thread_Enable_dispatch();
4e1c: eb000dc2 bl 852c <_Thread_Enable_dispatch>
4e20: e1a00005 mov r0, r5
4e24: eaffffe8 b 4dcc <pthread_rwlock_init+0x34>
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
_Thread_Enable_dispatch();
4e28: eb000dbf bl 852c <_Thread_Enable_dispatch>
4e2c: e3a0000b mov r0, #11 ; 0xb
4e30: eaffffe5 b 4dcc <pthread_rwlock_init+0x34>
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
the_attr = attr;
} else {
(void) pthread_rwlockattr_init( &default_attr );
4e34: e1a0000d mov r0, sp <== NOT EXECUTED
4e38: eb000294 bl 5890 <pthread_rwlockattr_init> <== NOT EXECUTED
4e3c: e1a0400d mov r4, sp <== NOT EXECUTED
4e40: e1a0100d mov r1, sp <== NOT EXECUTED
4e44: eaffffd9 b 4db0 <pthread_rwlock_init+0x18> <== NOT EXECUTED
00004ec0 <pthread_rwlock_timedrdlock>:
int pthread_rwlock_timedrdlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
4ec0: e92d4070 push {r4, r5, r6, lr}
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
4ec4: e2506000 subs r6, r0, #0 ; 0x0
int pthread_rwlock_timedrdlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
4ec8: e24dd00c sub sp, sp, #12 ; 0xc
4ecc: e1a00001 mov r0, r1
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
4ed0: 0a00000c beq 4f08 <pthread_rwlock_timedrdlock+0x48>
* So we check the abstime provided, and hold on to whether it
* is valid or not. If it isn't correct and in the future,
* then we do a polling operation and convert the UNSATISFIED
* status into the appropriate error.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
4ed4: e28d1004 add r1, sp, #4 ; 0x4
4ed8: eb001b4f bl bc1c <_POSIX_Absolute_timeout_to_ticks>
switch (status) {
4edc: e3500002 cmp r0, #2 ; 0x2
* So we check the abstime provided, and hold on to whether it
* is valid or not. If it isn't correct and in the future,
* then we do a polling operation and convert the UNSATISFIED
* status into the appropriate error.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
4ee0: e1a05000 mov r5, r0
switch (status) {
4ee4: 93a04000 movls r4, #0 ; 0x0
4ee8: 8a000009 bhi 4f14 <pthread_rwlock_timedrdlock+0x54>
4eec: e59f00a8 ldr r0, [pc, #168] ; 4f9c <pthread_rwlock_timedrdlock+0xdc>
4ef0: e5961000 ldr r1, [r6]
4ef4: e28d2008 add r2, sp, #8 ; 0x8
4ef8: eb000b6a bl 7ca8 <_Objects_Get>
do_wait = TRUE;
break;
}
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
4efc: e59dc008 ldr ip, [sp, #8]
4f00: e35c0000 cmp ip, #0 ; 0x0
4f04: 0a00000c beq 4f3c <pthread_rwlock_timedrdlock+0x7c>
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
break;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
4f08: e3a00016 mov r0, #22 ; 0x16
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
4f0c: e28dd00c add sp, sp, #12 ; 0xc
4f10: e8bd8070 pop {r4, r5, r6, pc}
* is valid or not. If it isn't correct and in the future,
* then we do a polling operation and convert the UNSATISFIED
* status into the appropriate error.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
switch (status) {
4f14: e3500003 cmp r0, #3 ; 0x3
4f18: e5961000 ldr r1, [r6]
4f1c: e59f0078 ldr r0, [pc, #120] ; 4f9c <pthread_rwlock_timedrdlock+0xdc>
4f20: e28d2008 add r2, sp, #8 ; 0x8
4f24: e3a04000 mov r4, #0 ; 0x0
4f28: 03a04001 moveq r4, #1 ; 0x1
4f2c: eb000b5d bl 7ca8 <_Objects_Get>
do_wait = TRUE;
break;
}
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
4f30: e59dc008 ldr ip, [sp, #8]
4f34: e35c0000 cmp ip, #0 ; 0x0
4f38: 1afffff2 bne 4f08 <pthread_rwlock_timedrdlock+0x48>
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_reading(
4f3c: e5961000 ldr r1, [r6]
4f40: e2800010 add r0, r0, #16 ; 0x10
4f44: e59d3004 ldr r3, [sp, #4]
4f48: e1a02004 mov r2, r4
4f4c: e58dc000 str ip, [sp]
4f50: eb000831 bl 701c <_CORE_RWLock_Obtain_for_reading>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
4f54: eb000d74 bl 852c <_Thread_Enable_dispatch>
if ( !do_wait &&
4f58: e3540000 cmp r4, #0 ; 0x0
4f5c: 159f103c ldrne r1, [pc, #60] ; 4fa0 <pthread_rwlock_timedrdlock+0xe0>
4f60: 1a000009 bne 4f8c <pthread_rwlock_timedrdlock+0xcc>
4f64: e59f1034 ldr r1, [pc, #52] ; 4fa0 <pthread_rwlock_timedrdlock+0xe0><== NOT EXECUTED
4f68: e5913000 ldr r3, [r1] <== NOT EXECUTED
4f6c: e5932034 ldr r2, [r3, #52] <== NOT EXECUTED
4f70: e3520002 cmp r2, #2 ; 0x2 <== NOT EXECUTED
4f74: 1a000004 bne 4f8c <pthread_rwlock_timedrdlock+0xcc> <== NOT EXECUTED
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
switch (status) {
4f78: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED
4f7c: 0affffe1 beq 4f08 <pthread_rwlock_timedrdlock+0x48> <== NOT EXECUTED
4f80: e3550002 cmp r5, #2 ; 0x2 <== NOT EXECUTED
4f84: 93a00074 movls r0, #116 ; 0x74 <== NOT EXECUTED
4f88: 9affffdf bls 4f0c <pthread_rwlock_timedrdlock+0x4c> <== NOT EXECUTED
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
break;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
4f8c: e5913000 ldr r3, [r1]
4f90: e5930034 ldr r0, [r3, #52]
4f94: eb00003b bl 5088 <_POSIX_RWLock_Translate_core_RWLock_return_code>
4f98: eaffffdb b 4f0c <pthread_rwlock_timedrdlock+0x4c>
00004fa4 <pthread_rwlock_timedwrlock>:
int pthread_rwlock_timedwrlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
4fa4: e92d4070 push {r4, r5, r6, lr}
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
4fa8: e2506000 subs r6, r0, #0 ; 0x0
int pthread_rwlock_timedwrlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
4fac: e24dd00c sub sp, sp, #12 ; 0xc
4fb0: e1a00001 mov r0, r1
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
4fb4: 0a00000c beq 4fec <pthread_rwlock_timedwrlock+0x48>
* So we check the abstime provided, and hold on to whether it
* is valid or not. If it isn't correct and in the future,
* then we do a polling operation and convert the UNSATISFIED
* status into the appropriate error.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
4fb8: e28d1004 add r1, sp, #4 ; 0x4
4fbc: eb001b16 bl bc1c <_POSIX_Absolute_timeout_to_ticks>
switch (status) {
4fc0: e3500002 cmp r0, #2 ; 0x2
* So we check the abstime provided, and hold on to whether it
* is valid or not. If it isn't correct and in the future,
* then we do a polling operation and convert the UNSATISFIED
* status into the appropriate error.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
4fc4: e1a05000 mov r5, r0
switch (status) {
4fc8: 93a04000 movls r4, #0 ; 0x0
4fcc: 8a000009 bhi 4ff8 <pthread_rwlock_timedwrlock+0x54>
4fd0: e59f00a8 ldr r0, [pc, #168] ; 5080 <pthread_rwlock_timedwrlock+0xdc>
4fd4: e5961000 ldr r1, [r6]
4fd8: e28d2008 add r2, sp, #8 ; 0x8
4fdc: eb000b31 bl 7ca8 <_Objects_Get>
do_wait = TRUE;
break;
}
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
4fe0: e59dc008 ldr ip, [sp, #8]
4fe4: e35c0000 cmp ip, #0 ; 0x0
4fe8: 0a00000c beq 5020 <pthread_rwlock_timedwrlock+0x7c>
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
break;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
4fec: e3a00016 mov r0, #22 ; 0x16
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
4ff0: e28dd00c add sp, sp, #12 ; 0xc
4ff4: e8bd8070 pop {r4, r5, r6, pc}
* is valid or not. If it isn't correct and in the future,
* then we do a polling operation and convert the UNSATISFIED
* status into the appropriate error.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
switch (status) {
4ff8: e3500003 cmp r0, #3 ; 0x3
4ffc: e5961000 ldr r1, [r6]
5000: e59f0078 ldr r0, [pc, #120] ; 5080 <pthread_rwlock_timedwrlock+0xdc>
5004: e28d2008 add r2, sp, #8 ; 0x8
5008: e3a04000 mov r4, #0 ; 0x0
500c: 03a04001 moveq r4, #1 ; 0x1
5010: eb000b24 bl 7ca8 <_Objects_Get>
do_wait = TRUE;
break;
}
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
5014: e59dc008 ldr ip, [sp, #8]
5018: e35c0000 cmp ip, #0 ; 0x0
501c: 1afffff2 bne 4fec <pthread_rwlock_timedwrlock+0x48>
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_writing(
5020: e5961000 ldr r1, [r6]
5024: e2800010 add r0, r0, #16 ; 0x10
5028: e59d3004 ldr r3, [sp, #4]
502c: e1a02004 mov r2, r4
5030: e58dc000 str ip, [sp]
5034: eb00082f bl 70f8 <_CORE_RWLock_Obtain_for_writing>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
5038: eb000d3b bl 852c <_Thread_Enable_dispatch>
if ( !do_wait &&
503c: e3540000 cmp r4, #0 ; 0x0
5040: 159f103c ldrne r1, [pc, #60] ; 5084 <pthread_rwlock_timedwrlock+0xe0>
5044: 1a000009 bne 5070 <pthread_rwlock_timedwrlock+0xcc>
5048: e59f1034 ldr r1, [pc, #52] ; 5084 <pthread_rwlock_timedwrlock+0xe0><== NOT EXECUTED
504c: e5913000 ldr r3, [r1] <== NOT EXECUTED
5050: e5932034 ldr r2, [r3, #52] <== NOT EXECUTED
5054: e3520002 cmp r2, #2 ; 0x2 <== NOT EXECUTED
5058: 1a000004 bne 5070 <pthread_rwlock_timedwrlock+0xcc> <== NOT EXECUTED
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
switch (status) {
505c: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED
5060: 0affffe1 beq 4fec <pthread_rwlock_timedwrlock+0x48> <== NOT EXECUTED
5064: e3550002 cmp r5, #2 ; 0x2 <== NOT EXECUTED
5068: 93a00074 movls r0, #116 ; 0x74 <== NOT EXECUTED
506c: 9affffdf bls 4ff0 <pthread_rwlock_timedwrlock+0x4c> <== NOT EXECUTED
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
break;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
5070: e5913000 ldr r3, [r1]
5074: e5930034 ldr r0, [r3, #52]
5078: eb000002 bl 5088 <_POSIX_RWLock_Translate_core_RWLock_return_code>
507c: eaffffdb b 4ff0 <pthread_rwlock_timedwrlock+0x4c>
0000479c <pthread_setcancelstate>:
* Don't even think about deleting a resource from an ISR.
* Besides this request is supposed to be for _Thread_Executing
* and the ISR context is not a thread.
*/
if ( _ISR_Is_in_progress() )
479c: e59f309c ldr r3, [pc, #156] ; 4840 <pthread_setcancelstate+0xa4>
47a0: e5932000 ldr r2, [r3]
47a4: e3520000 cmp r2, #0 ; 0x0
int pthread_setcancelstate(
int state,
int *oldstate
)
{
47a8: e92d4030 push {r4, r5, lr}
47ac: e1a04000 mov r4, r0
47b0: e1a00001 mov r0, r1
* Don't even think about deleting a resource from an ISR.
* Besides this request is supposed to be for _Thread_Executing
* and the ISR context is not a thread.
*/
if ( _ISR_Is_in_progress() )
47b4: 13a00047 movne r0, #71 ; 0x47
47b8: 18bd8030 popne {r4, r5, pc}
return EPROTO;
if ( !oldstate )
47bc: e3500000 cmp r0, #0 ; 0x0
47c0: 0a000001 beq 47cc <pthread_setcancelstate+0x30>
return EINVAL;
if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE )
47c4: e3540001 cmp r4, #1 ; 0x1
47c8: 9a000001 bls 47d4 <pthread_setcancelstate+0x38>
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
47cc: e3a00016 mov r0, #22 ; 0x16 <== NOT EXECUTED
if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
return 0;
}
47d0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
47d4: e59f1068 ldr r1, [pc, #104] ; 4844 <pthread_setcancelstate+0xa8>
return EINVAL;
if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE )
return EINVAL;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
47d8: e59f5068 ldr r5, [pc, #104] ; 4848 <pthread_setcancelstate+0xac>
47dc: e5913000 ldr r3, [r1]
47e0: e5952000 ldr r2, [r5]
47e4: e2833001 add r3, r3, #1 ; 0x1
47e8: e5813000 str r3, [r1]
47ec: e5922108 ldr r2, [r2, #264]
_Thread_Disable_dispatch();
*oldstate = thread_support->cancelability_state;
47f0: e59230cc ldr r3, [r2, #204]
thread_support->cancelability_state = state;
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
47f4: e3540000 cmp r4, #0 ; 0x0
return EINVAL;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
_Thread_Disable_dispatch();
*oldstate = thread_support->cancelability_state;
47f8: e5803000 str r3, [r0]
thread_support->cancelability_state = state;
47fc: e58240cc str r4, [r2, #204]
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
4800: 1a000002 bne 4810 <pthread_setcancelstate+0x74>
4804: e59230d0 ldr r3, [r2, #208]
4808: e3530001 cmp r3, #1 ; 0x1
480c: 0a000002 beq 481c <pthread_setcancelstate+0x80>
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
4810: eb000a9c bl 7288 <_Thread_Enable_dispatch>
4814: e3a00000 mov r0, #0 ; 0x0
4818: e8bd8030 pop {r4, r5, pc}
_Thread_Disable_dispatch();
*oldstate = thread_support->cancelability_state;
thread_support->cancelability_state = state;
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
481c: e59230d4 ldr r3, [r2, #212] <== NOT EXECUTED
4820: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
4824: 0afffff9 beq 4810 <pthread_setcancelstate+0x74> <== NOT EXECUTED
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
4828: eb000a96 bl 7288 <_Thread_Enable_dispatch> <== NOT EXECUTED
if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
482c: e5950000 ldr r0, [r5] <== NOT EXECUTED
4830: e3e01000 mvn r1, #0 ; 0x0 <== NOT EXECUTED
4834: ebfffed4 bl 438c <_POSIX_Thread_Exit> <== NOT EXECUTED
4838: e1a00004 mov r0, r4 <== NOT EXECUTED
483c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
0000484c <pthread_setcanceltype>:
* Don't even think about deleting a resource from an ISR.
* Besides this request is supposed to be for _Thread_Executing
* and the ISR context is not a thread.
*/
if ( _ISR_Is_in_progress() )
484c: e59f3098 ldr r3, [pc, #152] ; 48ec <pthread_setcanceltype+0xa0>
4850: e5932000 ldr r2, [r3]
4854: e3520000 cmp r2, #0 ; 0x0
int pthread_setcanceltype(
int type,
int *oldtype
)
{
4858: e92d4030 push {r4, r5, lr}
485c: e1a0c001 mov ip, r1
* Don't even think about deleting a resource from an ISR.
* Besides this request is supposed to be for _Thread_Executing
* and the ISR context is not a thread.
*/
if ( _ISR_Is_in_progress() )
4860: 13a00047 movne r0, #71 ; 0x47
4864: 18bd8030 popne {r4, r5, pc}
return EPROTO;
if ( !oldtype )
4868: e3510000 cmp r1, #0 ; 0x0
486c: 0a000001 beq 4878 <pthread_setcanceltype+0x2c>
return EINVAL;
if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS )
4870: e3500001 cmp r0, #1 ; 0x1
4874: 9a000001 bls 4880 <pthread_setcanceltype+0x34>
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
4878: e3a00016 mov r0, #22 ; 0x16 <== NOT EXECUTED
if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
return 0;
}
487c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
4880: e59f1068 ldr r1, [pc, #104] ; 48f0 <pthread_setcanceltype+0xa4>
return EINVAL;
if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS )
return EINVAL;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
4884: e59f5068 ldr r5, [pc, #104] ; 48f4 <pthread_setcanceltype+0xa8>
4888: e5913000 ldr r3, [r1]
488c: e5952000 ldr r2, [r5]
4890: e2833001 add r3, r3, #1 ; 0x1
4894: e5813000 str r3, [r1]
4898: e5922108 ldr r2, [r2, #264]
_Thread_Disable_dispatch();
*oldtype = thread_support->cancelability_type;
489c: e59230d0 ldr r3, [r2, #208]
48a0: e58c3000 str r3, [ip]
thread_support->cancelability_type = type;
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
48a4: e59240cc ldr r4, [r2, #204]
48a8: e3540000 cmp r4, #0 ; 0x0
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
_Thread_Disable_dispatch();
*oldtype = thread_support->cancelability_type;
thread_support->cancelability_type = type;
48ac: e58200d0 str r0, [r2, #208]
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
48b0: 1a000001 bne 48bc <pthread_setcanceltype+0x70>
48b4: e3500001 cmp r0, #1 ; 0x1
48b8: 0a000002 beq 48c8 <pthread_setcanceltype+0x7c>
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
48bc: eb000a71 bl 7288 <_Thread_Enable_dispatch>
48c0: e3a00000 mov r0, #0 ; 0x0
48c4: e8bd8030 pop {r4, r5, pc}
_Thread_Disable_dispatch();
*oldtype = thread_support->cancelability_type;
thread_support->cancelability_type = type;
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
48c8: e59230d4 ldr r3, [r2, #212]
48cc: e3530000 cmp r3, #0 ; 0x0
48d0: 0afffff9 beq 48bc <pthread_setcanceltype+0x70>
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
48d4: eb000a6b bl 7288 <_Thread_Enable_dispatch> <== NOT EXECUTED
if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
48d8: e5950000 ldr r0, [r5] <== NOT EXECUTED
48dc: e3e01000 mvn r1, #0 ; 0x0 <== NOT EXECUTED
48e0: ebfffea9 bl 438c <_POSIX_Thread_Exit> <== NOT EXECUTED
48e4: e1a00004 mov r0, r4 <== NOT EXECUTED
48e8: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
000069dc <pthread_setschedparam>:
int pthread_setschedparam(
pthread_t thread,
int policy,
struct sched_param *param
)
{
69dc: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
/*
* Check all the parameters
*/
if ( !param )
69e0: e2525000 subs r5, r2, #0 ; 0x0
int pthread_setschedparam(
pthread_t thread,
int policy,
struct sched_param *param
)
{
69e4: e24dd004 sub sp, sp, #4 ; 0x4
69e8: e1a06000 mov r6, r0
69ec: e1a07001 mov r7, r1
/*
* Check all the parameters
*/
if ( !param )
69f0: 0a000015 beq 6a4c <pthread_setschedparam+0x70>
return EINVAL;
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
69f4: e5953000 ldr r3, [r5]
69f8: e2433001 sub r3, r3, #1 ; 0x1
69fc: e35300fd cmp r3, #253 ; 0xfd
6a00: 8a000011 bhi 6a4c <pthread_setschedparam+0x70>
return EINVAL;
budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
budget_callout = NULL;
switch ( policy ) {
6a04: e3510003 cmp r1, #3 ; 0x3
6a08: 979ff101 ldrls pc, [pc, r1, lsl #2]
6a0c: ea00000e b 6a4c <pthread_setschedparam+0x70>
6a10: 00006a58 .word 0x00006a58
6a14: 00006af8 .word 0x00006af8
6a18: 00006b04 .word 0x00006b04
6a1c: 00006a20 .word 0x00006a20
case SCHED_SPORADIC:
budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
budget_callout = _POSIX_Threads_Sporadic_budget_callout;
if ( _Timespec_To_ticks( ¶m->ss_replenish_period ) <
6a20: e2850008 add r0, r5, #8 ; 0x8
6a24: eb000e86 bl a444 <_Timespec_To_ticks>
6a28: e1a04000 mov r4, r0
6a2c: e2850010 add r0, r5, #16 ; 0x10
6a30: eb000e83 bl a444 <_Timespec_To_ticks>
6a34: e1540000 cmp r4, r0
6a38: 3a000003 bcc 6a4c <pthread_setschedparam+0x70>
_Timespec_To_ticks( ¶m->ss_initial_budget ) )
return EINVAL;
if ( !_POSIX_Priority_Is_valid( param->ss_low_priority ) )
6a3c: e5953004 ldr r3, [r5, #4]
6a40: e2433001 sub r3, r3, #1 ; 0x1
6a44: e35300fd cmp r3, #253 ; 0xfd
6a48: 9a00003a bls 6b38 <pthread_setschedparam+0x15c>
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
break;
}
_Thread_Enable_dispatch();
return 0;
6a4c: e3a00016 mov r0, #22 ; 0x16
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
6a50: e28dd004 add sp, sp, #4 ; 0x4
6a54: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
return EINVAL;
budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
budget_callout = NULL;
switch ( policy ) {
6a58: e3a08001 mov r8, #1 ; 0x1
6a5c: e3a0a000 mov sl, #0 ; 0x0
RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get (
pthread_t id,
Objects_Locations *location
)
{
return (Thread_Control *)
6a60: e1a01006 mov r1, r6
6a64: e59f00e4 ldr r0, [pc, #228] ; 6b50 <pthread_setschedparam+0x174>
6a68: e1a0200d mov r2, sp
6a6c: eb00085a bl 8bdc <_Objects_Get>
/*
* Actually change the scheduling policy and parameters
*/
the_thread = _POSIX_Threads_Get( thread, &location );
switch ( location ) {
6a70: e59d3000 ldr r3, [sp]
6a74: e3530000 cmp r3, #0 ; 0x0
6a78: e1a06000 mov r6, r0
6a7c: 13a00003 movne r0, #3 ; 0x3
6a80: 1afffff2 bne 6a50 <pthread_setschedparam+0x74>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
6a84: e5964108 ldr r4, [r6, #264]
if ( api->schedpolicy == SCHED_SPORADIC )
6a88: e594307c ldr r3, [r4, #124]
6a8c: e3530003 cmp r3, #3 ; 0x3
6a90: 0a00002b beq 6b44 <pthread_setschedparam+0x168>
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
6a94: e584707c str r7, [r4, #124]
api->schedparam = *param;
6a98: e1a0e005 mov lr, r5
6a9c: e8be000f ldm lr!, {r0, r1, r2, r3}
6aa0: e284c080 add ip, r4, #128 ; 0x80
6aa4: e8ac000f stmia ip!, {r0, r1, r2, r3}
6aa8: e89e0003 ldm lr, {r0, r1}
the_thread->budget_algorithm = budget_algorithm;
the_thread->budget_callout = budget_callout;
switch ( api->schedpolicy ) {
6aac: e3570000 cmp r7, #0 ; 0x0
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
api->schedparam = *param;
6ab0: e88c0003 stm ip, {r0, r1}
the_thread->budget_algorithm = budget_algorithm;
6ab4: e586807c str r8, [r6, #124]
the_thread->budget_callout = budget_callout;
6ab8: e586a080 str sl, [r6, #128]
switch ( api->schedpolicy ) {
6abc: ba00000a blt 6aec <pthread_setschedparam+0x110>
6ac0: e3570002 cmp r7, #2 ; 0x2
6ac4: ca000011 bgt 6b10 <pthread_setschedparam+0x134>
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
6ac8: e59f3084 ldr r3, [pc, #132] ; 6b54 <pthread_setschedparam+0x178>
6acc: e5941080 ldr r1, [r4, #128]
6ad0: e5932000 ldr r2, [r3]
6ad4: e26110ff rsb r1, r1, #255 ; 0xff
6ad8: e5862078 str r2, [r6, #120]
the_thread->real_priority =
6adc: e5861018 str r1, [r6, #24]
_POSIX_Priority_To_core( api->schedparam.sched_priority );
_Thread_Change_priority(
6ae0: e1a00006 mov r0, r6
6ae4: e3a02001 mov r2, #1 ; 0x1
6ae8: eb0008ea bl 8e98 <_Thread_Change_priority>
_Watchdog_Remove( &api->Sporadic_timer );
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
break;
}
_Thread_Enable_dispatch();
6aec: eb000a5b bl 9460 <_Thread_Enable_dispatch>
6af0: e3a00000 mov r0, #0 ; 0x0
6af4: eaffffd5 b 6a50 <pthread_setschedparam+0x74>
return EINVAL;
budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
budget_callout = NULL;
switch ( policy ) {
6af8: e3a08000 mov r8, #0 ; 0x0
6afc: e1a0a008 mov sl, r8
6b00: eaffffd6 b 6a60 <pthread_setschedparam+0x84>
6b04: e3a08002 mov r8, #2 ; 0x2
6b08: e3a0a000 mov sl, #0 ; 0x0
6b0c: eaffffd3 b 6a60 <pthread_setschedparam+0x84>
api->schedpolicy = policy;
api->schedparam = *param;
the_thread->budget_algorithm = budget_algorithm;
the_thread->budget_callout = budget_callout;
switch ( api->schedpolicy ) {
6b10: e3570003 cmp r7, #3 ; 0x3
6b14: 1afffff4 bne 6aec <pthread_setschedparam+0x110>
TRUE
);
break;
case SCHED_SPORADIC:
api->ss_high_priority = api->schedparam.sched_priority;
6b18: e5943080 ldr r3, [r4, #128]
_Watchdog_Remove( &api->Sporadic_timer );
6b1c: e284009c add r0, r4, #156 ; 0x9c
TRUE
);
break;
case SCHED_SPORADIC:
api->ss_high_priority = api->schedparam.sched_priority;
6b20: e5843098 str r3, [r4, #152]
_Watchdog_Remove( &api->Sporadic_timer );
6b24: eb000fb8 bl aa0c <_Watchdog_Remove>
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
6b28: e1a01006 mov r1, r6
6b2c: e3a00000 mov r0, #0 ; 0x0
6b30: ebffff86 bl 6950 <_POSIX_Threads_Sporadic_budget_TSR>
6b34: eaffffec b 6aec <pthread_setschedparam+0x110>
if ( _Timespec_To_ticks( ¶m->ss_replenish_period ) <
_Timespec_To_ticks( ¶m->ss_initial_budget ) )
return EINVAL;
if ( !_POSIX_Priority_Is_valid( param->ss_low_priority ) )
6b38: e59fa018 ldr sl, [pc, #24] ; 6b58 <pthread_setschedparam+0x17c>
6b3c: e3a08003 mov r8, #3 ; 0x3
6b40: eaffffc6 b 6a60 <pthread_setschedparam+0x84>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
6b44: e284009c add r0, r4, #156 ; 0x9c
6b48: eb000faf bl aa0c <_Watchdog_Remove>
6b4c: eaffffd0 b 6a94 <pthread_setschedparam+0xb8>
00014810 <read>:
)
{
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
14810: e59f30c4 ldr r3, [pc, #196] ; 148dc <read+0xcc>
14814: e593c000 ldr ip, [r3]
14818: e150000c cmp r0, ip
ssize_t read(
int fd,
void *buffer,
size_t count
)
{
1481c: e92d4070 push {r4, r5, r6, lr}
14820: e1a06001 mov r6, r1
14824: e1a05002 mov r5, r2
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
14828: 2a00001c bcs 148a0 <read+0x90>
iop = rtems_libio_iop( fd );
1482c: e1a03200 lsl r3, r0, #4
14830: e0433100 sub r3, r3, r0, lsl #2
14834: e0833000 add r3, r3, r0
14838: e59f00a0 ldr r0, [pc, #160] ; 148e0 <read+0xd0>
1483c: e590c000 ldr ip, [r0]
14840: e1a03103 lsl r3, r3, #2
14844: e08c4003 add r4, ip, r3
rtems_libio_check_is_open( iop );
14848: e594300c ldr r3, [r4, #12]
1484c: e3130c01 tst r3, #256 ; 0x100
14850: 0a000012 beq 148a0 <read+0x90>
rtems_libio_check_buffer( buffer );
14854: e3510000 cmp r1, #0 ; 0x0
14858: 0a00001a beq 148c8 <read+0xb8>
rtems_libio_check_count( count );
1485c: e3520000 cmp r2, #0 ; 0x0
14860: 01a00002 moveq r0, r2
14864: 08bd8070 popeq {r4, r5, r6, pc}
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
14868: e3130002 tst r3, #2 ; 0x2
1486c: 0a00000b beq 148a0 <read+0x90>
/*
* Now process the read().
*/
if ( !iop->handlers->read_h )
14870: e5943030 ldr r3, [r4, #48]
14874: e5933008 ldr r3, [r3, #8]
14878: e3530000 cmp r3, #0 ; 0x0
1487c: 0a00000c beq 148b4 <read+0xa4>
rtems_set_errno_and_return_minus_one( ENOTSUP );
rc = (*iop->handlers->read_h)( iop, buffer, count );
14880: e1a00004 mov r0, r4
14884: e1a0e00f mov lr, pc
14888: e12fff13 bx r3
if ( rc > 0 )
1488c: e3500000 cmp r0, #0 ; 0x0
iop->offset += rc;
14890: c5943008 ldrgt r3, [r4, #8]
14894: c0833000 addgt r3, r3, r0
14898: c5843008 strgt r3, [r4, #8]
return rc;
}
1489c: e8bd8070 pop {r4, r5, r6, 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 );
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
148a0: ebffddd7 bl c004 <__errno> <== NOT EXECUTED
148a4: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED
148a8: e5803000 str r3, [r0] <== NOT EXECUTED
148ac: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
148b0: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
/*
* Now process the read().
*/
if ( !iop->handlers->read_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
148b4: ebffddd2 bl c004 <__errno> <== NOT EXECUTED
148b8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
148bc: e5803000 str r3, [r0] <== NOT EXECUTED
148c0: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
148c4: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_buffer( buffer );
148c8: ebffddcd bl c004 <__errno> <== NOT EXECUTED
148cc: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED
148d0: e5803000 str r3, [r0] <== NOT EXECUTED
148d4: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
148d8: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
00004c68 <readlink>:
ssize_t readlink(
const char *pathname,
char *buf,
size_t bufsize
)
{
4c68: e92d4070 push {r4, r5, r6, lr}
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
4c6c: e2514000 subs r4, r1, #0 ; 0x0
ssize_t readlink(
const char *pathname,
char *buf,
size_t bufsize
)
{
4c70: e24dd010 sub sp, sp, #16 ; 0x10
4c74: e1a06002 mov r6, r2
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
4c78: 0a00002e beq 4d38 <readlink+0xd0>
rtems_set_errno_and_return_minus_one( EFAULT );
result = rtems_filesystem_evaluate_path( pathname, 0, &loc, false );
4c7c: e3a01000 mov r1, #0 ; 0x0
4c80: e1a0200d mov r2, sp
4c84: e1a03001 mov r3, r1
4c88: ebfffa4d bl 35c4 <rtems_filesystem_evaluate_path>
if ( result != 0 )
4c8c: e3500000 cmp r0, #0 ; 0x0
int result;
if (!buf)
rtems_set_errno_and_return_minus_one( EFAULT );
result = rtems_filesystem_evaluate_path( pathname, 0, &loc, false );
4c90: e1a0500d mov r5, sp
if ( result != 0 )
4c94: 1a000025 bne 4d30 <readlink+0xc8>
return -1;
if ( !loc.ops->node_type_h ){
4c98: e59d2008 ldr r2, [sp, #8]
4c9c: e5923010 ldr r3, [r2, #16]
4ca0: e3530000 cmp r3, #0 ; 0x0
4ca4: 0a000019 beq 4d10 <readlink+0xa8>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
4ca8: e1a0000d mov r0, sp
4cac: e1a0e00f mov lr, pc
4cb0: e12fff13 bx r3
4cb4: e3500004 cmp r0, #4 ; 0x4
4cb8: 1a000023 bne 4d4c <readlink+0xe4>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( !loc.ops->readlink_h ){
4cbc: e59d2008 ldr r2, [sp, #8]
4cc0: e592303c ldr r3, [r2, #60]
4cc4: e3530000 cmp r3, #0 ; 0x0
4cc8: 0a00002c beq 4d80 <readlink+0x118>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
4ccc: e1a01004 mov r1, r4
4cd0: e1a02006 mov r2, r6
4cd4: e1a0000d mov r0, sp
4cd8: e1a0e00f mov lr, pc
4cdc: e12fff13 bx r3
rtems_filesystem_freenode( &loc );
4ce0: e59d3008 ldr r3, [sp, #8]
4ce4: e3530000 cmp r3, #0 ; 0x0
if ( !loc.ops->readlink_h ){
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
4ce8: e1a04000 mov r4, r0
rtems_filesystem_freenode( &loc );
4cec: 0a000004 beq 4d04 <readlink+0x9c>
4cf0: e593301c ldr r3, [r3, #28]
4cf4: e3530000 cmp r3, #0 ; 0x0
4cf8: 11a0000d movne r0, sp
4cfc: 11a0e00f movne lr, pc
4d00: 112fff13 bxne r3
return result;
}
4d04: e1a00004 mov r0, r4
4d08: e28dd010 add sp, sp, #16 ; 0x10
4d0c: e8bd8070 pop {r4, r5, r6, pc}
result = rtems_filesystem_evaluate_path( pathname, 0, &loc, false );
if ( result != 0 )
return -1;
if ( !loc.ops->node_type_h ){
rtems_filesystem_freenode( &loc );
4d10: e592301c ldr r3, [r2, #28] <== NOT EXECUTED
4d14: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
4d18: 11a0000d movne r0, sp <== NOT EXECUTED
4d1c: 11a0e00f movne lr, pc <== NOT EXECUTED
4d20: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
4d24: eb002c9c bl ff9c <__errno> <== NOT EXECUTED
4d28: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
4d2c: e5803000 str r3, [r0] <== NOT EXECUTED
4d30: e3e04000 mvn r4, #0 ; 0x0 <== NOT EXECUTED
4d34: eafffff2 b 4d04 <readlink+0x9c> <== NOT EXECUTED
{
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
rtems_set_errno_and_return_minus_one( EFAULT );
4d38: eb002c97 bl ff9c <__errno> <== NOT EXECUTED
4d3c: e3a0300e mov r3, #14 ; 0xe <== NOT EXECUTED
4d40: e5803000 str r3, [r0] <== NOT EXECUTED
4d44: e3e04000 mvn r4, #0 ; 0x0 <== NOT EXECUTED
4d48: eaffffed b 4d04 <readlink+0x9c> <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
rtems_filesystem_freenode( &loc );
4d4c: e59d3008 ldr r3, [sp, #8]
4d50: e3530000 cmp r3, #0 ; 0x0
4d54: 0a000004 beq 4d6c <readlink+0x104>
4d58: e593301c ldr r3, [r3, #28]
4d5c: e3530000 cmp r3, #0 ; 0x0
4d60: 11a0000d movne r0, sp
4d64: 11a0e00f movne lr, pc
4d68: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( EINVAL );
4d6c: eb002c8a bl ff9c <__errno>
4d70: e3a03016 mov r3, #22 ; 0x16
4d74: e5803000 str r3, [r0]
4d78: e3e04000 mvn r4, #0 ; 0x0
4d7c: eaffffe0 b 4d04 <readlink+0x9c>
}
if ( !loc.ops->readlink_h ){
rtems_filesystem_freenode( &loc );
4d80: e592301c ldr r3, [r2, #28] <== NOT EXECUTED
4d84: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
4d88: 11a0000d movne r0, sp <== NOT EXECUTED
4d8c: 11a0e00f movne lr, pc <== NOT EXECUTED
4d90: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
4d94: eb002c80 bl ff9c <__errno> <== NOT EXECUTED
4d98: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
4d9c: e5803000 str r3, [r0] <== NOT EXECUTED
4da0: e3e04000 mvn r4, #0 ; 0x0 <== NOT EXECUTED
4da4: eaffffd6 b 4d04 <readlink+0x9c> <== NOT EXECUTED
0001494c <realloc>:
{
size_t old_size;
char *new_area;
size_t resize;
MSBUMP(realloc_calls, 1);
1494c: e92d40f0 push {r4, r5, r6, r7, lr}
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
14950: e59f3114 ldr r3, [pc, #276] ; 14a6c <realloc+0x120>
{
size_t old_size;
char *new_area;
size_t resize;
MSBUMP(realloc_calls, 1);
14954: e59f7114 ldr r7, [pc, #276] ; 14a70 <realloc+0x124>
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
14958: e593c000 ldr ip, [r3]
{
size_t old_size;
char *new_area;
size_t resize;
MSBUMP(realloc_calls, 1);
1495c: e5972010 ldr r2, [r7, #16]
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
14960: e35c0003 cmp ip, #3 ; 0x3
{
size_t old_size;
char *new_area;
size_t resize;
MSBUMP(realloc_calls, 1);
14964: e2822001 add r2, r2, #1 ; 0x1
14968: e24dd004 sub sp, sp, #4 ; 0x4
1496c: e5872010 str r2, [r7, #16]
14970: e1a04000 mov r4, r0
14974: e1a06001 mov r6, r1
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
14978: 0a00001f beq 149fc <realloc+0xb0>
}
/*
* Continue with realloc().
*/
if ( !ptr )
1497c: e3540000 cmp r4, #0 ; 0x0
14980: 0a000010 beq 149c8 <realloc+0x7c>
return malloc( size );
if ( !size ) {
14984: e3560000 cmp r6, #0 ; 0x0
14988: 0a000012 beq 149d8 <realloc+0x8c>
free( ptr );
return (void *) 0;
}
if ( !_Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, ptr, &old_size) ) {
1498c: e59f00e0 ldr r0, [pc, #224] ; 14a74 <realloc+0x128>
14990: e1a01004 mov r1, r4
14994: e1a0200d mov r2, sp
14998: eb00006d bl 14b54 <_Protected_heap_Get_block_size>
1499c: e2505000 subs r5, r0, #0 ; 0x0
149a0: 0a000010 beq 149e8 <realloc+0x9c>
#if defined(RTEMS_MALLOC_BOUNDARY_HELPERS)
if (rtems_malloc_boundary_helpers)
resize += (*rtems_malloc_boundary_helpers->overhead)();
#endif
if ( _Protected_heap_Resize_block( &RTEMS_Malloc_Heap, ptr, resize ) ) {
149a4: e59f00c8 ldr r0, [pc, #200] ; 14a74 <realloc+0x128>
149a8: e1a01004 mov r1, r4
149ac: e1a02006 mov r2, r6
149b0: eb000078 bl 14b98 <_Protected_heap_Resize_block>
149b4: e3500000 cmp r0, #0 ; 0x0
149b8: 0a00001b beq 14a2c <realloc+0xe0>
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
149bc: e1a00004 mov r0, r4
149c0: e28dd004 add sp, sp, #4 ; 0x4
149c4: e8bd80f0 pop {r4, r5, r6, r7, pc}
/*
* Continue with realloc().
*/
if ( !ptr )
return malloc( size );
149c8: e1a00006 mov r0, r6 <== NOT EXECUTED
149cc: ebffd325 bl 9668 <malloc> <== NOT EXECUTED
149d0: e1a04000 mov r4, r0 <== NOT EXECUTED
149d4: eafffff8 b 149bc <realloc+0x70> <== NOT EXECUTED
if ( !size ) {
free( ptr );
149d8: e1a00004 mov r0, r4 <== NOT EXECUTED
149dc: ebffd1b1 bl 90a8 <free> <== NOT EXECUTED
149e0: e1a04006 mov r4, r6 <== NOT EXECUTED
149e4: eafffff4 b 149bc <realloc+0x70> <== NOT EXECUTED
return (void *) 0;
}
if ( !_Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, ptr, &old_size) ) {
errno = EINVAL;
149e8: ebffdd85 bl c004 <__errno>
149ec: e3a03016 mov r3, #22 ; 0x16
149f0: e5803000 str r3, [r0]
149f4: e1a04005 mov r4, r5
149f8: eaffffef b 149bc <realloc+0x70>
/*
* 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)
149fc: e59f3074 ldr r3, [pc, #116] ; 14a78 <realloc+0x12c>
14a00: e5932000 ldr r2, [r3]
14a04: e3520000 cmp r2, #0 ; 0x0
14a08: 0a000001 beq 14a14 <realloc+0xc8>
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
14a0c: e3a04000 mov r4, #0 ; 0x0 <== NOT EXECUTED
14a10: eaffffe9 b 149bc <realloc+0x70> <== NOT EXECUTED
if (_System_state_Is_up(_System_state_Get())) {
if (_Thread_Dispatch_disable_level > 0)
return (void *) 0;
if (_ISR_Nest_level > 0)
14a14: e59f3060 ldr r3, [pc, #96] ; 14a7c <realloc+0x130>
14a18: e5932000 ldr r2, [r3]
14a1c: e3520000 cmp r2, #0 ; 0x0
14a20: 0affffd5 beq 1497c <realloc+0x30>
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
14a24: e3a04000 mov r4, #0 ; 0x0 <== NOT EXECUTED
14a28: eaffffe3 b 149bc <realloc+0x70> <== NOT EXECUTED
* 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 );
14a2c: e1a00006 mov r0, r6
14a30: ebffd30c bl 9668 <malloc>
MSBUMP(malloc_calls, -1); /* subtract off the malloc */
14a34: e5973004 ldr r3, [r7, #4]
if ( !new_area ) {
14a38: e2505000 subs r5, r0, #0 ; 0x0
* and the C Standard.
*/
new_area = malloc( size );
MSBUMP(malloc_calls, -1); /* subtract off the malloc */
14a3c: e2433001 sub r3, r3, #1 ; 0x1
14a40: e5873004 str r3, [r7, #4]
if ( !new_area ) {
14a44: 0afffff0 beq 14a0c <realloc+0xc0>
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
14a48: e59d2000 ldr r2, [sp]
14a4c: e1a01004 mov r1, r4
14a50: e1560002 cmp r6, r2
14a54: 31a02006 movcc r2, r6
14a58: ebffdf33 bl c72c <memcpy>
free( ptr );
14a5c: e1a00004 mov r0, r4
14a60: ebffd190 bl 90a8 <free>
14a64: e1a04005 mov r4, r5
14a68: eaffffd3 b 149bc <realloc+0x70>
00004f74 <rmdir>:
#include <rtems/seterr.h>
int rmdir(
const char *pathname
)
{
4f74: e92d4030 push {r4, r5, lr}
/*
* Get the node where we wish to go.
*/
result = rtems_filesystem_evaluate_path( pathname, 0, &loc, false );
4f78: e3a01000 mov r1, #0 ; 0x0
#include <rtems/seterr.h>
int rmdir(
const char *pathname
)
{
4f7c: e24dd010 sub sp, sp, #16 ; 0x10
/*
* Get the node where we wish to go.
*/
result = rtems_filesystem_evaluate_path( pathname, 0, &loc, false );
4f80: e1a0200d mov r2, sp
4f84: e1a03001 mov r3, r1
4f88: ebfff9e6 bl 3728 <rtems_filesystem_evaluate_path>
if ( result != 0 )
4f8c: e3500000 cmp r0, #0 ; 0x0
/*
* Get the node where we wish to go.
*/
result = rtems_filesystem_evaluate_path( pathname, 0, &loc, false );
4f90: e1a0500d mov r5, sp
if ( result != 0 )
4f94: 0a000003 beq 4fa8 <rmdir+0x34>
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.handlers->rmnod_h)( &loc );
rtems_filesystem_freenode( &loc );
4f98: e3e04000 mvn r4, #0 ; 0x0
return result;
}
4f9c: e1a00004 mov r0, r4
4fa0: e28dd010 add sp, sp, #16 ; 0x10
4fa4: e8bd8030 pop {r4, r5, pc}
result = rtems_filesystem_evaluate_path( pathname, 0, &loc, false );
if ( result != 0 )
return -1;
result = rtems_filesystem_evaluate_parent(RTEMS_LIBIO_PERMS_WRITE, &loc );
4fa8: e2800002 add r0, r0, #2 ; 0x2
4fac: e1a0100d mov r1, sp
4fb0: ebfff9b2 bl 3680 <rtems_filesystem_evaluate_parent>
if (result != 0) {
4fb4: e3500000 cmp r0, #0 ; 0x0
4fb8: 1a000027 bne 505c <rmdir+0xe8>
/*
* Verify you can remove this node as a directory.
*/
if ( !loc.ops->node_type_h ){
4fbc: e59d2008 ldr r2, [sp, #8]
4fc0: e5923010 ldr r3, [r2, #16]
4fc4: e3530000 cmp r3, #0 ; 0x0
4fc8: 0a00002e beq 5088 <rmdir+0x114>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){
4fcc: e1a0000d mov r0, sp
4fd0: e1a0e00f mov lr, pc
4fd4: e12fff13 bx r3
4fd8: e3500001 cmp r0, #1 ; 0x1
4fdc: 1a000011 bne 5028 <rmdir+0xb4>
/*
* Use the filesystems rmnod to remove the node.
*/
if ( !loc.handlers->rmnod_h ){
4fe0: e59d3004 ldr r3, [sp, #4]
4fe4: e5933034 ldr r3, [r3, #52]
4fe8: e3530000 cmp r3, #0 ; 0x0
4fec: 0a000030 beq 50b4 <rmdir+0x140>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.handlers->rmnod_h)( &loc );
4ff0: e1a0000d mov r0, sp
4ff4: e1a0e00f mov lr, pc
4ff8: e12fff13 bx r3
rtems_filesystem_freenode( &loc );
4ffc: e59d3008 ldr r3, [sp, #8]
5000: e3530000 cmp r3, #0 ; 0x0
if ( !loc.handlers->rmnod_h ){
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.handlers->rmnod_h)( &loc );
5004: e1a04000 mov r4, r0
rtems_filesystem_freenode( &loc );
5008: 0affffe3 beq 4f9c <rmdir+0x28>
500c: e593301c ldr r3, [r3, #28]
5010: e3530000 cmp r3, #0 ; 0x0
5014: 0affffe0 beq 4f9c <rmdir+0x28>
5018: e1a0000d mov r0, sp
501c: e1a0e00f mov lr, pc
5020: e12fff13 bx r3
5024: eaffffdc b 4f9c <rmdir+0x28>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){
rtems_filesystem_freenode( &loc );
5028: e59d3008 ldr r3, [sp, #8]
502c: e3530000 cmp r3, #0 ; 0x0
5030: 0a000004 beq 5048 <rmdir+0xd4>
5034: e593301c ldr r3, [r3, #28]
5038: e3530000 cmp r3, #0 ; 0x0
503c: 11a0000d movne r0, sp
5040: 11a0e00f movne lr, pc
5044: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( ENOTDIR );
5048: eb002aba bl fb38 <__errno>
504c: e3a03014 mov r3, #20 ; 0x14
5050: e5803000 str r3, [r0]
5054: e3e04000 mvn r4, #0 ; 0x0
5058: eaffffcf b 4f9c <rmdir+0x28>
if ( result != 0 )
return -1;
result = rtems_filesystem_evaluate_parent(RTEMS_LIBIO_PERMS_WRITE, &loc );
if (result != 0) {
rtems_filesystem_freenode( &loc );
505c: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
5060: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
5064: 0affffcb beq 4f98 <rmdir+0x24> <== NOT EXECUTED
5068: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
506c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
5070: 0affffc8 beq 4f98 <rmdir+0x24> <== NOT EXECUTED
5074: e1a0000d mov r0, sp <== NOT EXECUTED
5078: e1a0e00f mov lr, pc <== NOT EXECUTED
507c: e12fff13 bx r3 <== NOT EXECUTED
5080: e3e04000 mvn r4, #0 ; 0x0 <== NOT EXECUTED
5084: eaffffc4 b 4f9c <rmdir+0x28> <== NOT EXECUTED
/*
* Verify you can remove this node as a directory.
*/
if ( !loc.ops->node_type_h ){
rtems_filesystem_freenode( &loc );
5088: e592301c ldr r3, [r2, #28] <== NOT EXECUTED
508c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
5090: 0a000002 beq 50a0 <rmdir+0x12c> <== NOT EXECUTED
/*
* Use the filesystems rmnod to remove the node.
*/
if ( !loc.handlers->rmnod_h ){
rtems_filesystem_freenode( &loc );
5094: e1a0000d mov r0, sp <== NOT EXECUTED
5098: e1a0e00f mov lr, pc <== NOT EXECUTED
509c: e12fff13 bx r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
50a0: eb002aa4 bl fb38 <__errno> <== NOT EXECUTED
50a4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
50a8: e5803000 str r3, [r0] <== NOT EXECUTED
50ac: e3e04000 mvn r4, #0 ; 0x0 <== NOT EXECUTED
50b0: eaffffb9 b 4f9c <rmdir+0x28> <== NOT EXECUTED
/*
* Use the filesystems rmnod to remove the node.
*/
if ( !loc.handlers->rmnod_h ){
rtems_filesystem_freenode( &loc );
50b4: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
50b8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
50bc: 0afffff7 beq 50a0 <rmdir+0x12c> <== NOT EXECUTED
50c0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
50c4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
50c8: 1afffff1 bne 5094 <rmdir+0x120> <== NOT EXECUTED
50cc: eafffff3 b 50a0 <rmdir+0x12c> <== NOT EXECUTED
0000d500 <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;
}
d500: e59f0000 ldr r0, [pc, #0] ; d508 <rtems_assoc_name_bad+0x8><== NOT EXECUTED
d504: e12fff1e bx lr <== NOT EXECUTED
0000adb8 <rtems_assoc_name_by_local>:
const char *rtems_assoc_name_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
adb8: e92d4010 push {r4, lr} <== NOT EXECUTED
adbc: e1a04001 mov r4, r1 <== NOT EXECUTED
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_local(ap, local_value);
adc0: eb000006 bl ade0 <rtems_assoc_ptr_by_local> <== NOT EXECUTED
if (nap)
adc4: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
adc8: 0a000001 beq add4 <rtems_assoc_name_by_local+0x1c> <== NOT EXECUTED
return nap->name;
return rtems_assoc_name_bad(local_value);
}
adcc: e5900000 ldr r0, [r0] <== NOT EXECUTED
add0: e8bd8010 pop {r4, pc} <== NOT EXECUTED
nap = rtems_assoc_ptr_by_local(ap, local_value);
if (nap)
return nap->name;
return rtems_assoc_name_bad(local_value);
add4: e1a00004 mov r0, r4 <== NOT EXECUTED
}
add8: 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);
addc: ea0009c7 b d500 <rtems_assoc_name_bad> <== NOT EXECUTED
0000bf28 <rtems_assoc_ptr_by_local>:
const rtems_assoc_t *rtems_assoc_ptr_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
bf28: e92d4030 push {r4, r5, lr}
bf2c: e1a04000 mov r4, r0
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
bf30: e5900000 ldr r0, [r0]
bf34: e3500000 cmp r0, #0 ; 0x0
const rtems_assoc_t *rtems_assoc_ptr_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
bf38: e1a05001 mov r5, r1
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
bf3c: 01a04000 moveq r4, r0
bf40: 0a000013 beq bf94 <rtems_assoc_ptr_by_local+0x6c>
bf44: e59f105c ldr r1, [pc, #92] ; bfa8 <rtems_assoc_ptr_by_local+0x80>
bf48: eb0004fb bl d33c <strcmp>
bf4c: e3500000 cmp r0, #0 ; 0x0
bf50: 13a02000 movne r2, #0 ; 0x0
bf54: 1a00000b bne bf88 <rtems_assoc_ptr_by_local+0x60>
default_ap = ap++;
for ( ; ap->name; ap++)
bf58: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
bf5c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
bf60: e284300c add r3, r4, #12 ; 0xc <== NOT EXECUTED
for ( ; ap->name; ap++)
bf64: 0a00000a beq bf94 <rtems_assoc_ptr_by_local+0x6c> <== NOT EXECUTED
bf68: e1a02004 mov r2, r4 <== NOT EXECUTED
bf6c: e1a04003 mov r4, r3 <== NOT EXECUTED
if (ap->local_value == local_value)
bf70: e5943004 ldr r3, [r4, #4] <== NOT EXECUTED
bf74: e1530005 cmp r3, r5 <== NOT EXECUTED
bf78: 0a000005 beq bf94 <rtems_assoc_ptr_by_local+0x6c> <== NOT EXECUTED
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
bf7c: e5b4300c ldr r3, [r4, #12]!
bf80: e3530000 cmp r3, #0 ; 0x0
bf84: 0a000004 beq bf9c <rtems_assoc_ptr_by_local+0x74>
if (ap->local_value == local_value)
bf88: e5943004 ldr r3, [r4, #4]
bf8c: e1530005 cmp r3, r5
bf90: 1afffff9 bne bf7c <rtems_assoc_ptr_by_local+0x54>
return ap;
return default_ap;
}
bf94: e1a00004 mov r0, r4
bf98: e8bd8030 pop {r4, r5, pc}
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
bf9c: e1a04002 mov r4, r2
if (ap->local_value == local_value)
return ap;
return default_ap;
}
bfa0: e1a00004 mov r0, r4
bfa4: e8bd8030 pop {r4, r5, pc}
0000b5f0 <rtems_assoc_ptr_by_remote>:
const rtems_assoc_t *rtems_assoc_ptr_by_remote(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
b5f0: e92d4030 push {r4, r5, lr}
b5f4: e1a04000 mov r4, r0
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
b5f8: e5900000 ldr r0, [r0]
b5fc: e3500000 cmp r0, #0 ; 0x0
const rtems_assoc_t *rtems_assoc_ptr_by_remote(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
b600: e1a05001 mov r5, r1
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
b604: 01a04000 moveq r4, r0
b608: 0a000013 beq b65c <rtems_assoc_ptr_by_remote+0x6c>
b60c: e59f105c ldr r1, [pc, #92] ; b670 <rtems_assoc_ptr_by_remote+0x80>
b610: eb000749 bl d33c <strcmp>
b614: e3500000 cmp r0, #0 ; 0x0
b618: 13a02000 movne r2, #0 ; 0x0
b61c: 1a00000b bne b650 <rtems_assoc_ptr_by_remote+0x60>
default_ap = ap++;
for ( ; ap->name; ap++)
b620: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
b624: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
b628: e284300c add r3, r4, #12 ; 0xc <== NOT EXECUTED
for ( ; ap->name; ap++)
b62c: 0a00000a beq b65c <rtems_assoc_ptr_by_remote+0x6c> <== NOT EXECUTED
b630: e1a02004 mov r2, r4 <== NOT EXECUTED
b634: e1a04003 mov r4, r3 <== NOT EXECUTED
if (ap->remote_value == remote_value)
b638: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
b63c: e1530005 cmp r3, r5 <== NOT EXECUTED
b640: 0a000005 beq b65c <rtems_assoc_ptr_by_remote+0x6c> <== NOT EXECUTED
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
b644: e5b4300c ldr r3, [r4, #12]!
b648: e3530000 cmp r3, #0 ; 0x0
b64c: 0a000004 beq b664 <rtems_assoc_ptr_by_remote+0x74>
if (ap->remote_value == remote_value)
b650: e5943008 ldr r3, [r4, #8]
b654: e1530005 cmp r3, r5
b658: 1afffff9 bne b644 <rtems_assoc_ptr_by_remote+0x54>
return ap;
return default_ap;
}
b65c: e1a00004 mov r0, r4
b660: e8bd8030 pop {r4, r5, pc}
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
b664: e1a04002 mov r4, r2
if (ap->remote_value == remote_value)
return ap;
return default_ap;
}
b668: e1a00004 mov r0, r4
b66c: e8bd8030 pop {r4, r5, pc}
0000b674 <rtems_assoc_remote_by_local>:
uint32_t rtems_assoc_remote_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
b674: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_local(ap, local_value);
b678: eb00022a bl bf28 <rtems_assoc_ptr_by_local> <== NOT EXECUTED
if (nap)
b67c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
return nap->remote_value;
b680: 15900008 ldrne r0, [r0, #8] <== NOT EXECUTED
return 0;
}
b684: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
00003f0c <rtems_clock_get>:
rtems_status_code rtems_clock_get(
rtems_clock_get_options option,
void *time_buffer
)
{
3f0c: e92d4010 push {r4, lr}
if ( !time_buffer )
3f10: e2514000 subs r4, r1, #0 ; 0x0
3f14: 03a00009 moveq r0, #9 ; 0x9
3f18: 08bd8010 popeq {r4, pc}
return RTEMS_INVALID_ADDRESS;
switch ( option ) {
3f1c: e3500004 cmp r0, #4 ; 0x4
3f20: 979ff100 ldrls pc, [pc, r0, lsl #2]
3f24: ea000004 b 3f3c <rtems_clock_get+0x30>
3f28: 00003f44 .word 0x00003f44
3f2c: 00003f50 .word 0x00003f50
3f30: 00003f5c .word 0x00003f5c <== NOT EXECUTED
3f34: 00003f6c .word 0x00003f6c <== NOT EXECUTED
3f38: 00003f7c .word 0x00003f7c <== NOT EXECUTED
3f3c: e3a0000a mov r0, #10 ; 0xa
3f40: e8bd8010 pop {r4, pc}
case RTEMS_CLOCK_GET_TOD:
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
3f44: e1a00004 mov r0, r4
break;
}
return RTEMS_INVALID_NUMBER;
}
3f48: e8bd4010 pop {r4, lr}
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
switch ( option ) {
case RTEMS_CLOCK_GET_TOD:
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
3f4c: ea000027 b 3ff0 <rtems_clock_get_tod>
case RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH:
return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer);
3f50: e1a00004 mov r0, r4
break;
}
return RTEMS_INVALID_NUMBER;
}
3f54: e8bd4010 pop {r4, lr}
switch ( option ) {
case RTEMS_CLOCK_GET_TOD:
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
case RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH:
return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer);
3f58: ea00000a b 3f88 <rtems_clock_get_seconds_since_epoch>
case RTEMS_CLOCK_GET_TICKS_SINCE_BOOT: {
rtems_interval *interval = (rtems_interval *)time_buffer;
*interval = rtems_clock_get_ticks_since_boot();
3f5c: eb00001f bl 3fe0 <rtems_clock_get_ticks_since_boot>
3f60: e5840000 str r0, [r4]
3f64: e3a00000 mov r0, #0 ; 0x0
3f68: e8bd8010 pop {r4, pc}
return RTEMS_SUCCESSFUL;
}
case RTEMS_CLOCK_GET_TICKS_PER_SECOND: {
rtems_interval *interval = (rtems_interval *)time_buffer;
*interval = rtems_clock_get_ticks_per_second();
3f6c: eb000013 bl 3fc0 <rtems_clock_get_ticks_per_second>
3f70: e5840000 str r0, [r4]
3f74: e3a00000 mov r0, #0 ; 0x0
3f78: e8bd8010 pop {r4, pc}
return RTEMS_SUCCESSFUL;
}
case RTEMS_CLOCK_GET_TIME_VALUE:
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
3f7c: e1a00004 mov r0, r4
break;
}
return RTEMS_INVALID_NUMBER;
}
3f80: e8bd4010 pop {r4, lr}
*interval = rtems_clock_get_ticks_per_second();
return RTEMS_SUCCESSFUL;
}
case RTEMS_CLOCK_GET_TIME_VALUE:
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
3f84: ea00004c b 40bc <rtems_clock_get_tod_timeval>
00003f88 <rtems_clock_get_seconds_since_epoch>:
rtems_status_code rtems_clock_get_seconds_since_epoch(
rtems_interval *the_interval
)
{
if ( !the_interval )
3f88: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
3f8c: 03a00009 moveq r0, #9 ; 0x9 <== NOT EXECUTED
3f90: 012fff1e bxeq lr <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Is_set )
3f94: e59f301c ldr r3, [pc, #28] ; 3fb8 <rtems_clock_get_seconds_since_epoch+0x30><== NOT EXECUTED
3f98: e5d32000 ldrb r2, [r3] <== NOT EXECUTED
3f9c: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED
return RTEMS_NOT_DEFINED;
*the_interval = _TOD_Seconds_since_epoch;
3fa0: 159f3014 ldrne r3, [pc, #20] ; 3fbc <rtems_clock_get_seconds_since_epoch+0x34><== NOT EXECUTED
3fa4: 15932000 ldrne r2, [r3] <== NOT EXECUTED
)
{
if ( !the_interval )
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Is_set )
3fa8: 03a0000b moveq r0, #11 ; 0xb <== NOT EXECUTED
return RTEMS_NOT_DEFINED;
*the_interval = _TOD_Seconds_since_epoch;
3fac: 15802000 strne r2, [r0] <== NOT EXECUTED
3fb0: 13a00000 movne r0, #0 ; 0x0 <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
3fb4: e12fff1e bx lr <== NOT EXECUTED
00003fc0 <rtems_clock_get_ticks_per_second>:
#include <rtems/score/thread.h>
#include <rtems/score/tod.h>
#include <rtems/score/watchdog.h>
rtems_interval rtems_clock_get_ticks_per_second(void)
{
3fc0: e59f3014 ldr r3, [pc, #20] ; 3fdc <rtems_clock_get_ticks_per_second+0x1c>
3fc4: e3a0093d mov r0, #999424 ; 0xf4000
3fc8: e52de004 push {lr} ; (str lr, [sp, #-4]!)
3fcc: e5931000 ldr r1, [r3]
3fd0: e2800d09 add r0, r0, #576 ; 0x240
3fd4: eb003b35 bl 12cb0 <__aeabi_uidiv>
return TOD_MICROSECONDS_PER_SECOND / _TOD_Microseconds_per_tick;
}
3fd8: e49df004 pop {pc} ; (ldr pc, [sp], #4)
0000412c <rtems_clock_tick>:
*
* NOTE: This routine only works for leap-years through 2099.
*/
rtems_status_code rtems_clock_tick( void )
{
412c: e52de004 push {lr} ; (str lr, [sp, #-4]!)
_TOD_Tickle_ticks();
4130: eb000598 bl 5798 <_TOD_Tickle_ticks>
*/
RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_ticks( void )
{
_Watchdog_Tickle( &_Watchdog_Ticks_chain );
4134: e59f0038 ldr r0, [pc, #56] ; 4174 <rtems_clock_tick+0x48>
4138: eb000f0a bl 7d68 <_Watchdog_Tickle>
_Watchdog_Tickle_ticks();
_Thread_Tickle_timeslice();
413c: eb000d41 bl 7648 <_Thread_Tickle_timeslice>
* otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_context_switch_necessary( void )
{
return ( _Context_Switch_necessary );
4140: e59f3030 ldr r3, [pc, #48] ; 4178 <rtems_clock_tick+0x4c>
4144: e5d32000 ldrb r2, [r3]
if ( _Thread_Is_context_switch_necessary() &&
4148: e3520000 cmp r2, #0 ; 0x0
414c: 0a000003 beq 4160 <rtems_clock_tick+0x34>
* otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_dispatching_enabled( void )
{
return ( _Thread_Dispatch_disable_level == 0 );
4150: e59f3024 ldr r3, [pc, #36] ; 417c <rtems_clock_tick+0x50> <== NOT EXECUTED
4154: e5932000 ldr r2, [r3] <== NOT EXECUTED
4158: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED
415c: 0a000001 beq 4168 <rtems_clock_tick+0x3c> <== NOT EXECUTED
_Thread_Is_dispatching_enabled() )
_Thread_Dispatch();
return RTEMS_SUCCESSFUL;
}
4160: e3a00000 mov r0, #0 ; 0x0
4164: e49df004 pop {pc} ; (ldr pc, [sp], #4)
_Thread_Tickle_timeslice();
if ( _Thread_Is_context_switch_necessary() &&
_Thread_Is_dispatching_enabled() )
_Thread_Dispatch();
4168: eb00098a bl 6798 <_Thread_Dispatch> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
416c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
4170: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
0000a624 <rtems_debug_disable>:
void rtems_debug_disable (
rtems_debug_control to_be_disabled
)
{
_Debug_Level &= ~to_be_disabled;
a624: e59f2010 ldr r2, [pc, #16] ; a63c <rtems_debug_disable+0x18><== NOT EXECUTED
a628: e5923000 ldr r3, [r2] <== NOT EXECUTED
a62c: e1e00000 mvn r0, r0 <== NOT EXECUTED
a630: e0000003 and r0, r0, r3 <== NOT EXECUTED
a634: e5820000 str r0, [r2] <== NOT EXECUTED
}
a638: e12fff1e bx lr <== NOT EXECUTED
0000b1e0 <rtems_deviceio_errno>:
{ 0, 0, 0 },
};
static int
rtems_deviceio_errno(rtems_status_code code)
{
b1e0: e92d4010 push {r4, lr} <== NOT EXECUTED
b1e4: e1a01000 mov r1, r0 <== NOT EXECUTED
int rc;
if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t) code)))
b1e8: e59f0018 ldr r0, [pc, #24] ; b208 <rtems_deviceio_errno+0x28><== NOT EXECUTED
b1ec: eb000120 bl b674 <rtems_assoc_remote_by_local> <== NOT EXECUTED
b1f0: e2504000 subs r4, r0, #0 ; 0x0 <== NOT EXECUTED
b1f4: 0a000001 beq b200 <rtems_deviceio_errno+0x20> <== NOT EXECUTED
{
errno = rc;
b1f8: eb000381 bl c004 <__errno> <== NOT EXECUTED
b1fc: e5804000 str r4, [r0] <== NOT EXECUTED
return -1;
}
return -1;
}
b200: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
b204: e8bd8010 pop {r4, pc} <== NOT EXECUTED
00002630 <rtems_error>:
int rtems_error(
int error_flag,
const char *printf_format,
...
)
{
2630: e92d000e push {r1, r2, r3} <== NOT EXECUTED
2634: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
va_list arglist;
int chars_written;
va_start(arglist, printf_format);
chars_written = rtems_verror(error_flag, printf_format, arglist);
2638: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED
263c: e28d2008 add r2, sp, #8 ; 0x8 <== NOT EXECUTED
2640: ebffff7b bl 2434 <rtems_verror> <== NOT EXECUTED
va_end(arglist);
return chars_written;
}
2644: e49de004 pop {lr} ; (ldr lr, [sp], #4) <== NOT EXECUTED
2648: e28dd00c add sp, sp, #12 ; 0xc <== NOT EXECUTED
264c: e12fff1e bx lr <== NOT EXECUTED
000012ec <rtems_filesystem_evaluate_parent>:
int rtems_filesystem_evaluate_parent(
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
12ec: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
rtems_filesystem_location_info_t parent;
int result;
if ( !pathloc )
12f0: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED
int rtems_filesystem_evaluate_parent(
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
12f4: e24dd010 sub sp, sp, #16 ; 0x10 <== NOT EXECUTED
12f8: e1a0e000 mov lr, r0 <== NOT EXECUTED
rtems_filesystem_location_info_t parent;
int result;
if ( !pathloc )
12fc: 0a00001e beq 137c <rtems_filesystem_evaluate_parent+0x90> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
if ( !pathloc->ops->evalpath_h )
1300: e5913008 ldr r3, [r1, #8] <== NOT EXECUTED
1304: e593c000 ldr ip, [r3] <== NOT EXECUTED
1308: e35c0000 cmp ip, #0 ; 0x0 <== NOT EXECUTED
130c: 0a000015 beq 1368 <rtems_filesystem_evaluate_parent+0x7c> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
parent = *pathloc;
1310: e891000f ldm r1, {r0, r1, r2, r3} <== NOT EXECUTED
1314: e88d000f stm sp, {r0, r1, r2, r3} <== NOT EXECUTED
result = (*pathloc->ops->evalpath_h)( "..", flags, &parent );
1318: e1a0100e mov r1, lr <== NOT EXECUTED
131c: e59f006c ldr r0, [pc, #108] ; 1390 <rtems_filesystem_evaluate_parent+0xa4><== NOT EXECUTED
1320: e1a0200d mov r2, sp <== NOT EXECUTED
1324: e1a0e00f mov lr, pc <== NOT EXECUTED
1328: e12fff1c bx ip <== NOT EXECUTED
if (result != 0){
132c: e2505000 subs r5, r0, #0 ; 0x0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
if ( !pathloc->ops->evalpath_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
parent = *pathloc;
1330: e1a0400d mov r4, sp <== NOT EXECUTED
result = (*pathloc->ops->evalpath_h)( "..", flags, &parent );
if (result != 0){
1334: 13e05000 mvnne r5, #0 ; 0x0 <== NOT EXECUTED
1338: 1a000007 bne 135c <rtems_filesystem_evaluate_parent+0x70> <== NOT EXECUTED
return -1;
}
rtems_filesystem_freenode( &parent );
133c: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
1340: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
1344: 0a000004 beq 135c <rtems_filesystem_evaluate_parent+0x70> <== NOT EXECUTED
1348: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
134c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
1350: 11a0000d movne r0, sp <== NOT EXECUTED
1354: 11a0e00f movne lr, pc <== NOT EXECUTED
1358: 112fff13 bxne r3 <== NOT EXECUTED
return result;
}
135c: e1a00005 mov r0, r5 <== NOT EXECUTED
1360: e28dd010 add sp, sp, #16 ; 0x10 <== NOT EXECUTED
1364: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
if ( !pathloc )
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
if ( !pathloc->ops->evalpath_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
1368: eb002b25 bl c004 <__errno> <== NOT EXECUTED
136c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
1370: e5803000 str r3, [r0] <== NOT EXECUTED
1374: e3e05000 mvn r5, #0 ; 0x0 <== NOT EXECUTED
1378: eafffff7 b 135c <rtems_filesystem_evaluate_parent+0x70> <== NOT EXECUTED
{
rtems_filesystem_location_info_t parent;
int result;
if ( !pathloc )
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
137c: eb002b20 bl c004 <__errno> <== NOT EXECUTED
1380: e3a03005 mov r3, #5 ; 0x5 <== NOT EXECUTED
1384: e5803000 str r3, [r0] <== NOT EXECUTED
1388: e3e05000 mvn r5, #0 ; 0x0 <== NOT EXECUTED
138c: eafffff2 b 135c <rtems_filesystem_evaluate_parent+0x70> <== NOT EXECUTED
00001394 <rtems_filesystem_evaluate_path>:
const char *pathname,
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
1394: e92d40f0 push {r4, r5, r6, r7, lr}
/*
* Verify Input parameters.
*/
if ( !pathname )
1398: e2505000 subs r5, r0, #0 ; 0x0
const char *pathname,
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
139c: e1a07001 mov r7, r1
13a0: e1a04002 mov r4, r2
13a4: e1a06003 mov r6, r3
/*
* Verify Input parameters.
*/
if ( !pathname )
13a8: 0a000043 beq 14bc <rtems_filesystem_evaluate_path+0x128>
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !pathloc )
13ac: e3520000 cmp r2, #0 ; 0x0
13b0: 0a000046 beq 14d0 <rtems_filesystem_evaluate_path+0x13c>
/*
* Evaluate the path using the optable evalpath.
*/
rtems_filesystem_get_start_loc( pathname, &i, pathloc );
13b4: e5d53000 ldrb r3, [r5]
13b8: e353005c cmp r3, #92 ; 0x5c
13bc: 1353002f cmpne r3, #47 ; 0x2f
13c0: 13a0e000 movne lr, #0 ; 0x0
13c4: 03a0e001 moveq lr, #1 ; 0x1
13c8: 1a000028 bne 1470 <rtems_filesystem_evaluate_path+0xdc>
13cc: e59f3110 ldr r3, [pc, #272] ; 14e4 <rtems_filesystem_evaluate_path+0x150>
13d0: e593c000 ldr ip, [r3]
13d4: e28cc014 add ip, ip, #20 ; 0x14
13d8: e89c000f ldm ip, {r0, r1, r2, r3}
13dc: e884000f stm r4, {r0, r1, r2, r3}
13e0: e3a02001 mov r2, #1 ; 0x1
if ( !pathloc->ops->evalpath_h )
13e4: e5943008 ldr r3, [r4, #8]
13e8: e5933000 ldr r3, [r3]
13ec: e3530000 cmp r3, #0 ; 0x0
13f0: 0a00002c beq 14a8 <rtems_filesystem_evaluate_path+0x114>
rtems_set_errno_and_return_minus_one( ENOTSUP );
result = (*pathloc->ops->evalpath_h)( &pathname[i], flags, pathloc );
13f4: e0850002 add r0, r5, r2
13f8: e1a01007 mov r1, r7
13fc: e1a02004 mov r2, r4
1400: e1a0e00f mov lr, pc
1404: e12fff13 bx r3
/*
* Get the Node type and determine if you need to follow the link or
* not.
*/
if ( (result == 0) && follow_link ) {
1408: e2703001 rsbs r3, r0, #1 ; 0x1
140c: 33a03000 movcc r3, #0 ; 0x0
1410: e3560000 cmp r6, #0 ; 0x0
1414: 03a03000 moveq r3, #0 ; 0x0
1418: e3530000 cmp r3, #0 ; 0x0
141c: 08bd80f0 popeq {r4, r5, r6, r7, pc}
if ( !pathloc->ops->node_type_h ){
1420: e5942008 ldr r2, [r4, #8]
1424: e5923010 ldr r3, [r2, #16]
1428: e3530000 cmp r3, #0 ; 0x0
142c: 0a000018 beq 1494 <rtems_filesystem_evaluate_path+0x100>
rtems_filesystem_freenode( pathloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
type = (*pathloc->ops->node_type_h)( pathloc );
1430: e1a00004 mov r0, r4
1434: e1a0e00f mov lr, pc
1438: e12fff13 bx r3
if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
143c: e2400003 sub r0, r0, #3 ; 0x3
1440: e3500001 cmp r0, #1 ; 0x1
1444: 83a00000 movhi r0, #0 ; 0x0
1448: 88bd80f0 pophi {r4, r5, r6, r7, pc}
( type == RTEMS_FILESYSTEM_SYM_LINK ) ) {
if ( !pathloc->ops->eval_link_h ){
144c: e5942008 ldr r2, [r4, #8]
1450: e5923034 ldr r3, [r2, #52]
1454: e3530000 cmp r3, #0 ; 0x0
1458: 0a00000d beq 1494 <rtems_filesystem_evaluate_path+0x100>
* pathloc will be passed up (and eventually released).
* Hence, the (valid) originial node that we submit to
* eval_link_h() should be released by the handler.
*/
result = (*pathloc->ops->eval_link_h)( pathloc, flags );
145c: e1a00004 mov r0, r4
1460: e1a01007 mov r1, r7
1464: e1a0e00f mov lr, pc
1468: e12fff13 bx r3
}
}
return result;
}
146c: e8bd80f0 pop {r4, r5, r6, r7, pc}
/*
* Evaluate the path using the optable evalpath.
*/
rtems_filesystem_get_start_loc( pathname, &i, pathloc );
1470: e3530000 cmp r3, #0 ; 0x0
1474: 0affffd4 beq 13cc <rtems_filesystem_evaluate_path+0x38>
1478: e59f3064 ldr r3, [pc, #100] ; 14e4 <rtems_filesystem_evaluate_path+0x150>
147c: e593c000 ldr ip, [r3]
1480: e28cc004 add ip, ip, #4 ; 0x4
1484: e89c000f ldm ip, {r0, r1, r2, r3}
1488: e884000f stm r4, {r0, r1, r2, r3}
148c: e1a0200e mov r2, lr
1490: eaffffd3 b 13e4 <rtems_filesystem_evaluate_path+0x50>
if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
( type == RTEMS_FILESYSTEM_SYM_LINK ) ) {
if ( !pathloc->ops->eval_link_h ){
rtems_filesystem_freenode( pathloc );
1494: e592301c ldr r3, [r2, #28] <== NOT EXECUTED
1498: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
149c: 11a00004 movne r0, r4 <== NOT EXECUTED
14a0: 11a0e00f movne lr, pc <== NOT EXECUTED
14a4: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
14a8: eb002ad5 bl c004 <__errno> <== NOT EXECUTED
14ac: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
14b0: e5803000 str r3, [r0] <== NOT EXECUTED
14b4: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
14b8: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
/*
* Verify Input parameters.
*/
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
14bc: eb002ad0 bl c004 <__errno>
14c0: e3a0300e mov r3, #14 ; 0xe
14c4: e5803000 str r3, [r0]
14c8: e3e00000 mvn r0, #0 ; 0x0
14cc: e8bd80f0 pop {r4, r5, r6, r7, pc}
if ( !pathloc )
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
14d0: eb002acb bl c004 <__errno> <== NOT EXECUTED
14d4: e3a03005 mov r3, #5 ; 0x5 <== NOT EXECUTED
14d8: e5803000 str r3, [r0] <== NOT EXECUTED
14dc: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
14e0: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
00008e90 <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 )
{
8e90: e92d4070 push {r4, r5, r6, lr}
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
8e94: e59f60fc ldr r6, [pc, #252] ; 8f98 <rtems_filesystem_initialize+0x108>
8e98: e5962000 ldr r2, [r6]
8e9c: e3a03012 mov r3, #18 ; 0x12
8ea0: e5823024 str r3, [r2, #36]
* configuration is a single instantiation of the IMFS or miniIMFS with
* a single "/dev" directory in it.
*/
void rtems_filesystem_initialize( void )
{
8ea4: e24dd018 sub sp, sp, #24 ; 0x18
*/
rtems_filesystem_umask = 022;
init_fs_mount_table();
8ea8: eb00022e bl 9768 <init_fs_mount_table>
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
8eac: e59f30e8 ldr r3, [pc, #232] ; 8f9c <rtems_filesystem_initialize+0x10c>
8eb0: e5932000 ldr r2, [r3]
8eb4: e3520000 cmp r2, #0 ; 0x0
8eb8: 0a00002a beq 8f68 <rtems_filesystem_initialize+0xd8>
rtems_fatal_error_occurred( 0xABCD0001 );
mt = &rtems_filesystem_mount_table[0];
8ebc: e59f30dc ldr r3, [pc, #220] ; 8fa0 <rtems_filesystem_initialize+0x110>
8ec0: e5930000 ldr r0, [r3]
status = mount(
8ec4: e890100e ldm r0, {r1, r2, r3, ip}
8ec8: e28d0014 add r0, sp, #20 ; 0x14
8ecc: e58dc000 str ip, [sp]
8ed0: eb00022b bl 9784 <mount>
&entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point );
if ( status == -1 )
8ed4: e3700001 cmn r0, #1 ; 0x1
8ed8: 0a000026 beq 8f78 <rtems_filesystem_initialize+0xe8>
* set_private_env() - but then: that's
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
rtems_filesystem_root = entry->mt_fs_root;
8edc: e59de014 ldr lr, [sp, #20]
&entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point );
if ( status == -1 )
rtems_fatal_error_occurred( 0xABCD0002 );
rtems_filesystem_link_counts = 0;
8ee0: e5965000 ldr r5, [r6]
* set_private_env() - but then: that's
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
rtems_filesystem_root = entry->mt_fs_root;
8ee4: e28ee018 add lr, lr, #24 ; 0x18
8ee8: e89e000f ldm lr, {r0, r1, r2, r3}
8eec: e285c014 add ip, r5, #20 ; 0x14
8ef0: e88c000f stm ip, {r0, r1, r2, r3}
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 0, &loc, 0);
8ef4: e28d4004 add r4, sp, #4 ; 0x4
8ef8: e3a01000 mov r1, #0 ; 0x0
&entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point );
if ( status == -1 )
rtems_fatal_error_occurred( 0xABCD0002 );
rtems_filesystem_link_counts = 0;
8efc: e3a03000 mov r3, #0 ; 0x0
8f00: e1c532b8 strh r3, [r5, #40]
*
* Till Straumann, 10/25/2002
*/
rtems_filesystem_root = entry->mt_fs_root;
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 0, &loc, 0);
8f04: e1a02004 mov r2, r4
8f08: e1a03001 mov r3, r1
8f0c: e59f0090 ldr r0, [pc, #144] ; 8fa4 <rtems_filesystem_initialize+0x114>
8f10: ebffe11f bl 1394 <rtems_filesystem_evaluate_path>
rtems_filesystem_root = loc;
8f14: e596c000 ldr ip, [r6]
8f18: e894000f ldm r4, {r0, r1, r2, r3}
8f1c: e28cc014 add ip, ip, #20 ; 0x14
8f20: e88c000f stm ip, {r0, r1, r2, r3}
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 0, &loc, 0);
8f24: e3a01000 mov r1, #0 ; 0x0
8f28: e1a02004 mov r2, r4
8f2c: e1a03001 mov r3, r1
8f30: e59f006c ldr r0, [pc, #108] ; 8fa4 <rtems_filesystem_initialize+0x114>
8f34: ebffe116 bl 1394 <rtems_filesystem_evaluate_path>
rtems_filesystem_current = loc;
8f38: e596c000 ldr ip, [r6]
8f3c: e894000f ldm r4, {r0, r1, r2, r3}
8f40: e28cc004 add ip, ip, #4 ; 0x4
8f44: e88c000f stm ip, {r0, r1, r2, r3}
*
* 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);
8f48: e3a01f7f mov r1, #508 ; 0x1fc
8f4c: e2811003 add r1, r1, #3 ; 0x3
8f50: e59f0050 ldr r0, [pc, #80] ; 8fa8 <rtems_filesystem_initialize+0x118>
8f54: eb0001ff bl 9758 <mkdir>
if ( status != 0 )
8f58: e3500000 cmp r0, #0 ; 0x0
8f5c: 1a000009 bne 8f88 <rtems_filesystem_initialize+0xf8>
* before device drivers are initialized. So we return via a base
* filesystem image and nothing auto-mounted at this point.
*/
#endif
}
8f60: e28dd018 add sp, sp, #24 ; 0x18
8f64: e8bd8070 pop {r4, r5, r6, pc}
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
rtems_fatal_error_occurred( 0xABCD0001 );
8f68: e3a004ab mov r0, #-1426063360 ; 0xab000000 <== NOT EXECUTED
8f6c: e28008cd add r0, r0, #13434880 ; 0xcd0000 <== NOT EXECUTED
8f70: e2800001 add r0, r0, #1 ; 0x1 <== NOT EXECUTED
8f74: ebffefde bl 4ef4 <rtems_fatal_error_occurred> <== NOT EXECUTED
status = mount(
&entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point );
if ( status == -1 )
rtems_fatal_error_occurred( 0xABCD0002 );
8f78: e3a004ab mov r0, #-1426063360 ; 0xab000000 <== NOT EXECUTED
8f7c: e28008cd add r0, r0, #13434880 ; 0xcd0000 <== NOT EXECUTED
8f80: e2800002 add r0, r0, #2 ; 0x2 <== NOT EXECUTED
8f84: ebffefda bl 4ef4 <rtems_fatal_error_occurred> <== NOT EXECUTED
* created that way by the IMFS.
*/
status = mkdir( "/dev", 0777);
if ( status != 0 )
rtems_fatal_error_occurred( 0xABCD0003 );
8f88: e3a004ab mov r0, #-1426063360 ; 0xab000000 <== NOT EXECUTED
8f8c: e28008cd add r0, r0, #13434880 ; 0xcd0000 <== NOT EXECUTED
8f90: e2800003 add r0, r0, #3 ; 0x3 <== NOT EXECUTED
8f94: ebffefd6 bl 4ef4 <rtems_fatal_error_occurred> <== NOT EXECUTED
00005d78 <rtems_filesystem_nodes_equal>:
);
bool rtems_filesystem_nodes_equal(
const rtems_filesystem_location_info_t *loc1,
const rtems_filesystem_location_info_t *loc2
){
5d78: e5903000 ldr r3, [r0] <== NOT EXECUTED
5d7c: e5910000 ldr r0, [r1] <== NOT EXECUTED
return ( loc1->node_access == loc2->node_access );
}
5d80: e1530000 cmp r3, r0 <== NOT EXECUTED
5d84: 13a00000 movne r0, #0 ; 0x0 <== NOT EXECUTED
5d88: 03a00001 moveq r0, #1 ; 0x1 <== NOT EXECUTED
5d8c: e12fff1e bx lr <== NOT EXECUTED
00004d90 <rtems_initialize_data_structures>:
Objects_Information *_Internal_Objects[ OBJECTS_INTERNAL_CLASSES_LAST + 1 ];
void rtems_initialize_data_structures(
rtems_configuration_table *configuration_table
)
{
4d90: e92d40f0 push {r4, r5, r6, r7, lr}
4d94: e1a06000 mov r6, r0
/*
* Dispatching and interrupts are disabled until the end of the
* initialization sequence. This prevents an inadvertent context
* switch before the executive is initialized.
*/
_ISR_Disable( bsp_level );
4d98: e10f2000 mrs r2, CPSR
4d9c: e38230c0 orr r3, r2, #192 ; 0xc0
4da0: e129f003 msr CPSR_fc, r3
/*
* Make sure the parameters were not NULL.
*/
if ( configuration_table == NULL )
4da4: e3500000 cmp r0, #0 ; 0x0
4da8: 0a000035 beq 4e84 <rtems_initialize_data_structures+0xf4>
);
/*
* Provide pointers just for later convenience.
*/
_Configuration_Table = configuration_table;
4dac: e59f30dc ldr r3, [pc, #220] ; 4e90 <rtems_initialize_data_structures+0x100>
RTEMS_INLINE_ROUTINE void _System_state_Handler_initialization (
bool is_multiprocessing
)
{
_System_state_Current = SYSTEM_STATE_BEFORE_INITIALIZATION;
4db0: e59f70dc ldr r7, [pc, #220] ; 4e94 <rtems_initialize_data_structures+0x104>
/*
* Initialize any target architecture specific support as early as possible
*/
_CPU_Initialize( _Thread_Dispatch );
4db4: e59f00dc ldr r0, [pc, #220] ; 4e98 <rtems_initialize_data_structures+0x108>
);
/*
* Provide pointers just for later convenience.
*/
_Configuration_Table = configuration_table;
4db8: e5836000 str r6, [r3]
4dbc: e3a04000 mov r4, #0 ; 0x0
/*
* Initialize any target architecture specific support as early as possible
*/
_CPU_Initialize( _Thread_Dispatch );
4dc0: eb000c96 bl 8020 <_CPU_Initialize>
4dc4: e5874000 str r4, [r7]
/*
* Do this as early as possible to insure no debugging output
* is even attempted to be printed.
*/
_Debug_Manager_initialization();
4dc8: eb00160a bl a5f8 <_Debug_Manager_initialization>
_API_extensions_Initialization();
4dcc: eb0000c5 bl 50e8 <_API_extensions_Initialization>
* This routine initializes the thread dispatching subsystem.
*/
RTEMS_INLINE_ROUTINE void _Thread_Dispatch_initialization( void )
{
_Thread_Dispatch_disable_level = 1;
4dd0: e59f30c4 ldr r3, [pc, #196] ; 4e9c <rtems_initialize_data_structures+0x10c>
4dd4: e3a05001 mov r5, #1 ; 0x1
/*
* Before this is called, we are not allowed to allocate memory
* from the Workspace because it is not initialized.
*/
_Workspace_Handler_initialization(
4dd8: e8960003 ldm r6, {r0, r1}
4ddc: e5835000 str r5, [r3]
4de0: eb000c19 bl 7e4c <_Workspace_Handler_initialization>
(void *)configuration_table->work_space_start,
configuration_table->work_space_size
);
_User_extensions_Handler_initialization(
4de4: e2860038 add r0, r6, #56 ; 0x38
4de8: e8900003 ldm r0, {r0, r1}
4dec: eb000a98 bl 7854 <_User_extensions_Handler_initialization>
configuration_table->number_of_initial_extensions,
configuration_table->User_extension_table
);
_ISR_Handler_initialization();
4df0: eb000328 bl 5a98 <_ISR_Handler_initialization>
_Objects_Handler_initialization(
4df4: eb0004f5 bl 61d0 <_Objects_Handler_initialization>
_Configuration_MP_table->maximum_nodes,
_Configuration_MP_table->maximum_global_objects
#endif
);
_Objects_Information_table[OBJECTS_INTERNAL_API] = _Internal_Objects;
4df8: e59f30a0 ldr r3, [pc, #160] ; 4ea0 <rtems_initialize_data_structures+0x110>
4dfc: e59f20a0 ldr r2, [pc, #160] ; 4ea4 <rtems_initialize_data_structures+0x114>
/*
* Initialize the internal allocator Mutex
*/
_API_Mutex_Initialization( 1 );
4e00: e1a00005 mov r0, r5
_Configuration_MP_table->maximum_nodes,
_Configuration_MP_table->maximum_global_objects
#endif
);
_Objects_Information_table[OBJECTS_INTERNAL_API] = _Internal_Objects;
4e04: e5832004 str r2, [r3, #4]
/*
* Initialize the internal allocator Mutex
*/
_API_Mutex_Initialization( 1 );
4e08: eb000118 bl 5270 <_API_Mutex_Initialization>
_API_Mutex_Allocate( &_RTEMS_Allocator_Mutex );
4e0c: e59f0094 ldr r0, [pc, #148] ; 4ea8 <rtems_initialize_data_structures+0x118>
4e10: eb0000ec bl 51c8 <_API_Mutex_Allocate>
RTEMS_INLINE_ROUTINE void _Priority_Handler_initialization( void )
{
size_t index;
_Priority_Major_bit_map = 0;
4e14: e59f3090 ldr r3, [pc, #144] ; 4eac <rtems_initialize_data_structures+0x11c>
4e18: e1c340b0 strh r4, [r3]
4e1c: e59f308c ldr r3, [pc, #140] ; 4eb0 <rtems_initialize_data_structures+0x120>
for ( index=0 ; index <16 ; index++ )
_Priority_Bit_map[ index ] = 0;
4e20: e3a02000 mov r2, #0 ; 0x0
4e24: e18320b4 strh r2, [r3, r4]
4e28: e2844002 add r4, r4, #2 ; 0x2
RTEMS_INLINE_ROUTINE void _Priority_Handler_initialization( void )
{
size_t index;
_Priority_Major_bit_map = 0;
for ( index=0 ; index <16 ; index++ )
4e2c: e3540020 cmp r4, #32 ; 0x20
4e30: 1afffffa bne 4e20 <rtems_initialize_data_structures+0x90>
_Priority_Handler_initialization();
_Watchdog_Handler_initialization();
4e34: eb000b88 bl 7c5c <_Watchdog_Handler_initialization>
_TOD_Handler_initialization( configuration_table->microseconds_per_tick );
4e38: e596000c ldr r0, [r6, #12]
4e3c: eb000240 bl 5744 <_TOD_Handler_initialization>
_Thread_Handler_initialization(
4e40: e5961008 ldr r1, [r6, #8]
4e44: e5960010 ldr r0, [r6, #16]
4e48: eb000745 bl 6b64 <_Thread_Handler_initialization>
);
#endif
/* MANAGERS */
_RTEMS_API_Initialize( configuration_table );
4e4c: e1a00006 mov r0, r6
4e50: eb000087 bl 5074 <_RTEMS_API_Initialize>
_Extension_Manager_initialization( configuration_table->maximum_extensions );
4e54: e5960008 ldr r0, [r6, #8]
4e58: eb000015 bl 4eb4 <_Extension_Manager_initialization>
_IO_Manager_initialization(
4e5c: e5961030 ldr r1, [r6, #48]
4e60: e596202c ldr r2, [r6, #44]
4e64: e5960034 ldr r0, [r6, #52]
4e68: eb000035 bl 4f44 <_IO_Manager_initialization>
configuration_table->number_of_device_drivers,
configuration_table->maximum_drivers
);
#ifdef RTEMS_POSIX_API
_POSIX_API_Initialize( configuration_table );
4e6c: e1a00006 mov r0, r6
4e70: eb00005b bl 4fe4 <_POSIX_API_Initialize>
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
4e74: e3a03001 mov r3, #1 ; 0x1
4e78: e5873000 str r3, [r7]
_Thread_Create_idle();
/*
* Scheduling can properly occur now as long as we avoid dispatching.
*/
}
4e7c: e8bd40f0 pop {r4, r5, r6, r7, lr}
*
* At this point all API extensions are in place. After the call to
* _Thread_Create_idle() _Thread_Executing and _Thread_Heir will be set.
*/
_Thread_Create_idle();
4e80: ea0005f6 b 6660 <_Thread_Create_idle>
/*
* Make sure the parameters were not NULL.
*/
if ( configuration_table == NULL )
_Internal_error_Occurred(
4e84: e1a02000 mov r2, r0 <== NOT EXECUTED
4e88: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED
4e8c: eb0002ef bl 5a50 <_Internal_error_Occurred> <== NOT EXECUTED
000011b0 <rtems_io_lookup_name>:
rtems_status_code rtems_io_lookup_name(
const char *name,
rtems_driver_name_t *device_info
)
{
11b0: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
11b4: e24dd010 sub sp, sp, #16 ; 0x10 <== NOT EXECUTED
IMFS_jnode_t *the_jnode;
rtems_filesystem_location_info_t loc;
int result;
rtems_filesystem_node_types_t node_type;
result = rtems_filesystem_evaluate_path( name, 0x00, &loc, true );
11b8: e1a0200d mov r2, sp <== NOT EXECUTED
11bc: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED
rtems_status_code rtems_io_lookup_name(
const char *name,
rtems_driver_name_t *device_info
)
{
11c0: 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( name, 0x00, &loc, true );
11c4: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED
rtems_status_code rtems_io_lookup_name(
const char *name,
rtems_driver_name_t *device_info
)
{
11c8: e1a07000 mov r7, r0 <== NOT EXECUTED
IMFS_jnode_t *the_jnode;
rtems_filesystem_location_info_t loc;
int result;
rtems_filesystem_node_types_t node_type;
result = rtems_filesystem_evaluate_path( name, 0x00, &loc, true );
11cc: eb000070 bl 1394 <rtems_filesystem_evaluate_path> <== NOT EXECUTED
the_jnode = loc.node_access;
if ( !loc.ops->node_type_h ) {
11d0: e59d2008 ldr r2, [sp, #8] <== NOT EXECUTED
11d4: e5923010 ldr r3, [r2, #16] <== NOT EXECUTED
11d8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
IMFS_jnode_t *the_jnode;
rtems_filesystem_location_info_t loc;
int result;
rtems_filesystem_node_types_t node_type;
result = rtems_filesystem_evaluate_path( name, 0x00, &loc, true );
11dc: e1a0800d mov r8, sp <== NOT EXECUTED
11e0: e1a04000 mov r4, r0 <== NOT EXECUTED
the_jnode = loc.node_access;
11e4: e59d6000 ldr r6, [sp] <== NOT EXECUTED
if ( !loc.ops->node_type_h ) {
11e8: 0a000013 beq 123c <rtems_io_lookup_name+0x8c> <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
node_type = (*loc.ops->node_type_h)( &loc );
11ec: e1a0000d mov r0, sp <== NOT EXECUTED
11f0: e1a0e00f mov lr, pc <== NOT EXECUTED
11f4: e12fff13 bx r3 <== NOT EXECUTED
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
11f8: e3500002 cmp r0, #2 ; 0x2 <== NOT EXECUTED
11fc: 03540000 cmpeq r4, #0 ; 0x0 <== NOT EXECUTED
1200: 03a04000 moveq r4, #0 ; 0x0 <== NOT EXECUTED
1204: 13a04001 movne r4, #1 ; 0x1 <== NOT EXECUTED
1208: 0a000015 beq 1264 <rtems_io_lookup_name+0xb4> <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
120c: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
1210: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
1214: 0a000025 beq 12b0 <rtems_io_lookup_name+0x100> <== NOT EXECUTED
1218: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
121c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
1220: 0a000022 beq 12b0 <rtems_io_lookup_name+0x100> <== NOT EXECUTED
1224: e1a0000d mov r0, sp <== NOT EXECUTED
1228: e1a0e00f mov lr, pc <== NOT EXECUTED
122c: e12fff13 bx r3 <== NOT EXECUTED
1230: e3a0000d mov r0, #13 ; 0xd <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
#endif
return RTEMS_SUCCESSFUL;
}
1234: e28dd010 add sp, sp, #16 ; 0x10 <== NOT EXECUTED
1238: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
result = rtems_filesystem_evaluate_path( name, 0x00, &loc, true );
the_jnode = loc.node_access;
if ( !loc.ops->node_type_h ) {
rtems_filesystem_freenode( &loc );
123c: e592301c ldr r3, [r2, #28] <== NOT EXECUTED
1240: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
1244: 11a0000d movne r0, sp <== NOT EXECUTED
1248: 11a0e00f movne lr, pc <== NOT EXECUTED
124c: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
1250: eb002b6b bl c004 <__errno> <== NOT EXECUTED
1254: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
1258: e5803000 str r3, [r0] <== NOT EXECUTED
125c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
1260: eafffff3 b 1234 <rtems_io_lookup_name+0x84> <== NOT EXECUTED
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
rtems_filesystem_freenode( &loc );
return RTEMS_UNSATISFIED;
}
device_info->device_name = (char *) name;
1264: e5857000 str r7, [r5] <== NOT EXECUTED
device_info->device_name_length = strlen( name );
1268: e1a00007 mov r0, r7 <== NOT EXECUTED
126c: eb00309a bl d4dc <strlen> <== NOT EXECUTED
1270: e5850004 str r0, [r5, #4] <== NOT EXECUTED
device_info->major = the_jnode->info.device.major;
1274: e5963050 ldr r3, [r6, #80] <== NOT EXECUTED
1278: e5853008 str r3, [r5, #8] <== NOT EXECUTED
device_info->minor = the_jnode->info.device.minor;
rtems_filesystem_freenode( &loc );
127c: e59d2008 ldr r2, [sp, #8] <== NOT EXECUTED
}
device_info->device_name = (char *) name;
device_info->device_name_length = strlen( name );
device_info->major = the_jnode->info.device.major;
device_info->minor = the_jnode->info.device.minor;
1280: e5963054 ldr r3, [r6, #84] <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
1284: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED
}
device_info->device_name = (char *) name;
device_info->device_name_length = strlen( name );
device_info->major = the_jnode->info.device.major;
device_info->minor = the_jnode->info.device.minor;
1288: e585300c str r3, [r5, #12] <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
128c: 0a000009 beq 12b8 <rtems_io_lookup_name+0x108> <== NOT EXECUTED
1290: e592301c ldr r3, [r2, #28] <== NOT EXECUTED
1294: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
1298: 0a000006 beq 12b8 <rtems_io_lookup_name+0x108> <== NOT EXECUTED
129c: e1a0000d mov r0, sp <== NOT EXECUTED
12a0: e1a0e00f mov lr, pc <== NOT EXECUTED
12a4: e12fff13 bx r3 <== NOT EXECUTED
12a8: e1a00004 mov r0, r4 <== NOT EXECUTED
12ac: eaffffe0 b 1234 <rtems_io_lookup_name+0x84> <== NOT EXECUTED
12b0: e3a0000d mov r0, #13 ; 0xd <== NOT EXECUTED
12b4: eaffffde b 1234 <rtems_io_lookup_name+0x84> <== NOT EXECUTED
12b8: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
12bc: eaffffdc b 1234 <rtems_io_lookup_name+0x84> <== NOT EXECUTED
000062e4 <rtems_io_register_driver>:
{
/*
* Validate the pointer data and contents passed in
*/
if ( !driver_table )
62e4: e251c000 subs ip, r1, #0 ; 0x0
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
)
{
62e8: e92d00f0 push {r4, r5, r6, r7}
62ec: e1a06000 mov r6, r0
62f0: e1a07002 mov r7, r2
/*
* Validate the pointer data and contents passed in
*/
if ( !driver_table )
62f4: 0a00003e beq 63f4 <rtems_io_register_driver+0x110>
return RTEMS_INVALID_ADDRESS;
if ( !registered_major )
62f8: e3520000 cmp r2, #0 ; 0x0
62fc: 0a00003c beq 63f4 <rtems_io_register_driver+0x110>
return RTEMS_INVALID_ADDRESS;
if ( !driver_table->initialization_entry && !driver_table->open_entry )
6300: e59c3000 ldr r3, [ip]
6304: e3530000 cmp r3, #0 ; 0x0
6308: 0a000036 beq 63e8 <rtems_io_register_driver+0x104>
return RTEMS_INVALID_ADDRESS;
*registered_major = 0;
630c: e3a03000 mov r3, #0 ; 0x0
6310: e5873000 str r3, [r7]
/*
* The requested major number is higher than what is configured.
*/
if ( major >= _IO_Number_of_drivers )
6314: e59f20e0 ldr r2, [pc, #224] ; 63fc <rtems_io_register_driver+0x118>
6318: e5922000 ldr r2, [r2]
631c: e1520006 cmp r2, r6
6320: 93a0000a movls r0, #10 ; 0xa
6324: 9a00002b bls 63d8 <rtems_io_register_driver+0xf4>
/*
* Test for initialise/open being present to indicate the driver slot is
* in use.
*/
if ( major == 0 ) {
6328: e3560000 cmp r6, #0 ; 0x0
632c: 1a00001d bne 63a8 <rtems_io_register_driver+0xc4>
bool found = false;
for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) {
6330: e2526001 subs r6, r2, #1 ; 0x1
6334: 0a000029 beq 63e0 <rtems_io_register_driver+0xfc>
6338: e1a03282 lsl r3, r2, #5
633c: e0433182 sub r3, r3, r2, lsl #3
6340: e59f20b8 ldr r2, [pc, #184] ; 6400 <rtems_io_register_driver+0x11c>
6344: e5921000 ldr r1, [r2]
6348: e2433018 sub r3, r3, #24 ; 0x18
634c: e0811003 add r1, r1, r3
6350: ea000002 b 6360 <rtems_io_register_driver+0x7c>
6354: e2566001 subs r6, r6, #1 ; 0x1
6358: e2411018 sub r1, r1, #24 ; 0x18
635c: 0a00001f beq 63e0 <rtems_io_register_driver+0xfc>
if ( !_IO_Driver_address_table[major].initialization_entry &&
6360: e5913000 ldr r3, [r1]
6364: e3530000 cmp r3, #0 ; 0x0
* in use.
*/
if ( major == 0 ) {
bool found = false;
for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) {
6368: e1a05001 mov r5, r1
if ( !_IO_Driver_address_table[major].initialization_entry &&
636c: 1afffff8 bne 6354 <rtems_io_register_driver+0x70>
6370: e5913004 ldr r3, [r1, #4]
6374: e3530000 cmp r3, #0 ; 0x0
6378: 1afffff5 bne 6354 <rtems_io_register_driver+0x70>
if ( _IO_Driver_address_table[major].initialization_entry ||
_IO_Driver_address_table[major].open_entry )
return RTEMS_RESOURCE_IN_USE;
_IO_Driver_address_table[major] = *driver_table;
637c: e8bc000f ldm ip!, {r0, r1, r2, r3}
6380: e1a04005 mov r4, r5
6384: e8a4000f stmia r4!, {r0, r1, r2, r3}
6388: e89c0003 ldm ip, {r0, r1}
638c: e8840003 stm r4, {r0, r1}
*registered_major = major;
return rtems_io_initialize( major, 0, NULL );
6390: e3a01000 mov r1, #0 ; 0x0
6394: e1a00006 mov r0, r6
6398: e1a02001 mov r2, r1
_IO_Driver_address_table[major].open_entry )
return RTEMS_RESOURCE_IN_USE;
_IO_Driver_address_table[major] = *driver_table;
*registered_major = major;
639c: e5876000 str r6, [r7]
return rtems_io_initialize( major, 0, NULL );
}
63a0: e8bd00f0 pop {r4, r5, r6, r7}
_IO_Driver_address_table[major] = *driver_table;
*registered_major = major;
return rtems_io_initialize( major, 0, NULL );
63a4: eaffff58 b 610c <rtems_io_initialize>
if ( !found )
return RTEMS_TOO_MANY;
}
if ( _IO_Driver_address_table[major].initialization_entry ||
63a8: e59f2050 ldr r2, [pc, #80] ; 6400 <rtems_io_register_driver+0x11c>
63ac: e1a03286 lsl r3, r6, #5
63b0: e5921000 ldr r1, [r2]
63b4: e0433186 sub r3, r3, r6, lsl #3
63b8: e7912003 ldr r2, [r1, r3]
63bc: e3520000 cmp r2, #0 ; 0x0
63c0: e0815003 add r5, r1, r3
63c4: 1a000002 bne 63d4 <rtems_io_register_driver+0xf0>
63c8: e5953004 ldr r3, [r5, #4] <== NOT EXECUTED
63cc: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
63d0: 0affffe9 beq 637c <rtems_io_register_driver+0x98> <== NOT EXECUTED
_IO_Driver_address_table[major] = *driver_table;
*registered_major = major;
return rtems_io_initialize( major, 0, NULL );
63d4: e3a0000c mov r0, #12 ; 0xc
}
63d8: e8bd00f0 pop {r4, r5, r6, r7}
63dc: e12fff1e bx lr
_IO_Driver_address_table[major] = *driver_table;
*registered_major = major;
return rtems_io_initialize( major, 0, NULL );
63e0: e3a00005 mov r0, #5 ; 0x5
63e4: eafffffb b 63d8 <rtems_io_register_driver+0xf4>
return RTEMS_INVALID_ADDRESS;
if ( !registered_major )
return RTEMS_INVALID_ADDRESS;
if ( !driver_table->initialization_entry && !driver_table->open_entry )
63e8: e59c3004 ldr r3, [ip, #4]
63ec: e3530000 cmp r3, #0 ; 0x0
63f0: 1affffc5 bne 630c <rtems_io_register_driver+0x28>
_IO_Driver_address_table[major] = *driver_table;
*registered_major = major;
return rtems_io_initialize( major, 0, NULL );
63f4: e3a00009 mov r0, #9 ; 0x9
63f8: eafffff6 b 63d8 <rtems_io_register_driver+0xf4>
000095b4 <rtems_libio_fcntl_flags>:
};
uint32_t rtems_libio_fcntl_flags(
uint32_t fcntl_flags
)
{
95b4: e92d4030 push {r4, r5, lr}
* Access mode is a small integer
*/
access_modes = fcntl_flags & O_ACCMODE;
fcntl_flags &= ~O_ACCMODE;
flags = rtems_assoc_local_by_remote( access_modes_assoc, access_modes );
95b8: e2001003 and r1, r0, #3 ; 0x3
};
uint32_t rtems_libio_fcntl_flags(
uint32_t fcntl_flags
)
{
95bc: e1a04000 mov r4, r0
* Access mode is a small integer
*/
access_modes = fcntl_flags & O_ACCMODE;
fcntl_flags &= ~O_ACCMODE;
flags = rtems_assoc_local_by_remote( access_modes_assoc, access_modes );
95c0: e59f0018 ldr r0, [pc, #24] ; 95e0 <rtems_libio_fcntl_flags+0x2c>
95c4: eb000804 bl b5dc <rtems_assoc_local_by_remote>
/*
* Everything else is single bits
*/
flags |=
95c8: e3c41003 bic r1, r4, #3 ; 0x3
* Access mode is a small integer
*/
access_modes = fcntl_flags & O_ACCMODE;
fcntl_flags &= ~O_ACCMODE;
flags = rtems_assoc_local_by_remote( access_modes_assoc, access_modes );
95cc: e1a05000 mov r5, r0
/*
* Everything else is single bits
*/
flags |=
95d0: e59f000c ldr r0, [pc, #12] ; 95e4 <rtems_libio_fcntl_flags+0x30>
95d4: eb0007ea bl b584 <rtems_assoc_local_by_remote_bitfield>
rtems_assoc_local_by_remote_bitfield(status_flags_assoc, fcntl_flags);
return flags;
}
95d8: e1800005 orr r0, r0, r5
95dc: e8bd8030 pop {r4, r5, pc}
000014e8 <rtems_libio_init>:
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
{
14e8: e92d4010 push {r4, lr}
rtems_status_code rc;
int i;
rtems_libio_t *iop;
if (rtems_libio_number_iops > 0)
14ec: e59f40b4 ldr r4, [pc, #180] ; 15a8 <rtems_libio_init+0xc0>
14f0: e5940000 ldr r0, [r4]
14f4: e3500000 cmp r0, #0 ; 0x0
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
{
14f8: e24dd004 sub sp, sp, #4 ; 0x4
rtems_status_code rc;
int i;
rtems_libio_t *iop;
if (rtems_libio_number_iops > 0)
14fc: 0a00001a beq 156c <rtems_libio_init+0x84>
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
1500: e3a01034 mov r1, #52 ; 0x34
1504: eb001ea8 bl 8fac <calloc>
1508: e59f309c ldr r3, [pc, #156] ; 15ac <rtems_libio_init+0xc4>
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
150c: e3500000 cmp r0, #0 ; 0x0
int i;
rtems_libio_t *iop;
if (rtems_libio_number_iops > 0)
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
1510: e5830000 str r0, [r3]
1514: e1a02000 mov r2, r0
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
1518: 0a00001f beq 159c <rtems_libio_init+0xb4>
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
for (i = 0 ; i < (rtems_libio_number_iops - 1) ; i++, iop++)
151c: e5941000 ldr r1, [r4]
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
1520: e59f3088 ldr r3, [pc, #136] ; 15b0 <rtems_libio_init+0xc8>
for (i = 0 ; i < (rtems_libio_number_iops - 1) ; i++, iop++)
1524: e3510001 cmp r1, #1 ; 0x1
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
1528: e5830000 str r0, [r3]
for (i = 0 ; i < (rtems_libio_number_iops - 1) ; i++, iop++)
152c: 0a00000c beq 1564 <rtems_libio_init+0x7c>
1530: e2803034 add r3, r0, #52 ; 0x34
1534: e3a02001 mov r2, #1 ; 0x1
iop->data1 = iop + 1;
1538: e2822001 add r2, r2, #1 ; 0x1
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
for (i = 0 ; i < (rtems_libio_number_iops - 1) ; i++, iop++)
153c: e1520001 cmp r2, r1
iop->data1 = iop + 1;
1540: e503300c str r3, [r3, #-12]
1544: e2833034 add r3, r3, #52 ; 0x34
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
for (i = 0 ; i < (rtems_libio_number_iops - 1) ; i++, iop++)
1548: 1afffffa bne 1538 <rtems_libio_init+0x50>
154c: e1a03202 lsl r3, r2, #4
1550: e0433102 sub r3, r3, r2, lsl #2
1554: e0833002 add r3, r3, r2
1558: e1a03103 lsl r3, r3, #2
155c: e2433034 sub r3, r3, #52 ; 0x34
1560: e0802003 add r2, r0, r3
iop->data1 = iop + 1;
iop->data1 = NULL;
1564: e3a03000 mov r3, #0 ; 0x0
1568: e5823028 str r3, [r2, #40]
/*
* Create the binary semaphore used to provide mutual exclusion
* on the IOP Table.
*/
rc = rtems_semaphore_create(
156c: e59fc040 ldr ip, [pc, #64] ; 15b4 <rtems_libio_init+0xcc>
1570: e59f0040 ldr r0, [pc, #64] ; 15b8 <rtems_libio_init+0xd0>
1574: e3a01001 mov r1, #1 ; 0x1
1578: e3a02054 mov r2, #84 ; 0x54
157c: e3a03000 mov r3, #0 ; 0x0
1580: e58dc000 str ip, [sp]
1584: eb000bf8 bl 456c <rtems_semaphore_create>
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_libio_semaphore
);
if ( rc != RTEMS_SUCCESSFUL )
1588: e3500000 cmp r0, #0 ; 0x0
158c: 1a000004 bne 15a4 <rtems_libio_init+0xbc>
/*
* Initialize the base file system infrastructure.
*/
rtems_filesystem_initialize();
}
1590: e28dd004 add sp, sp, #4 ; 0x4
1594: e8bd4010 pop {r4, lr}
/*
* Initialize the base file system infrastructure.
*/
rtems_filesystem_initialize();
1598: ea001e3c b 8e90 <rtems_filesystem_initialize>
if (rtems_libio_number_iops > 0)
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
159c: e280001a add r0, r0, #26 ; 0x1a <== NOT EXECUTED
15a0: eb000e53 bl 4ef4 <rtems_fatal_error_occurred> <== NOT EXECUTED
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_libio_semaphore
);
if ( rc != RTEMS_SUCCESSFUL )
rtems_fatal_error_occurred( rc );
15a4: eb000e52 bl 4ef4 <rtems_fatal_error_occurred> <== NOT EXECUTED
00002e70 <rtems_libio_set_private_env>:
rtems_filesystem_freenode( &env->root_directory);
free(env);
}
}
rtems_status_code rtems_libio_set_private_env(void) {
2e70: e92d41f0 push {r4, r5, r6, r7, r8, lr}
rtems_status_code sc;
rtems_id task_id;
rtems_filesystem_location_info_t loc;
sc=rtems_task_ident(RTEMS_SELF,0,&task_id);
2e74: e3a00000 mov r0, #0 ; 0x0
rtems_filesystem_freenode( &env->root_directory);
free(env);
}
}
rtems_status_code rtems_libio_set_private_env(void) {
2e78: e24dd014 sub sp, sp, #20 ; 0x14
rtems_status_code sc;
rtems_id task_id;
rtems_filesystem_location_info_t loc;
sc=rtems_task_ident(RTEMS_SELF,0,&task_id);
2e7c: e1a01000 mov r1, r0
2e80: e28d2010 add r2, sp, #16 ; 0x10
2e84: eb000adf bl 5a08 <rtems_task_ident>
if (sc != RTEMS_SUCCESSFUL) return sc;
2e88: e2506000 subs r6, r0, #0 ; 0x0
2e8c: 1a000029 bne 2f38 <rtems_libio_set_private_env+0xc8>
/* Only for the first time a malloc is necesary */
if (rtems_current_user_env==&rtems_global_user_env) {
2e90: e59f70ec ldr r7, [pc, #236] ; 2f84 <rtems_libio_set_private_env+0x114>
2e94: e59f50ec ldr r5, [pc, #236] ; 2f88 <rtems_libio_set_private_env+0x118>
2e98: e5973000 ldr r3, [r7]
2e9c: e1530005 cmp r3, r5
2ea0: 0a000027 beq 2f44 <rtems_libio_set_private_env+0xd4>
return sc;
}
rtems_current_user_env = tmp;
};
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
2ea4: e5974000 ldr r4, [r7]
2ea8: e1a0c005 mov ip, r5
2eac: e8bc000f ldm ip!, {r0, r1, r2, r3}
2eb0: e1a0e004 mov lr, r4
2eb4: e8ae000f stmia lr!, {r0, r1, r2, r3}
2eb8: e8bc000f ldm ip!, {r0, r1, r2, r3}
2ebc: e8ae000f stmia lr!, {r0, r1, r2, r3}
2ec0: e8bc000f ldm ip!, {r0, r1, r2, r3}
2ec4: e8ae000f stmia lr!, {r0, r1, r2, r3}
2ec8: e89c000f ldm ip, {r0, r1, r2, r3}
2ecc: e88e000f stm lr, {r0, r1, r2, r3}
rtems_current_user_env->task_id=task_id; /* mark the local values*/
/* get a clean root */
rtems_filesystem_root = THE_ROOT_FS_LOC;
2ed0: e59f20b4 ldr r2, [pc, #180] ; 2f8c <rtems_libio_set_private_env+0x11c>
}
rtems_current_user_env = tmp;
};
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
rtems_current_user_env->task_id=task_id; /* mark the local values*/
2ed4: e59d3010 ldr r3, [sp, #16]
2ed8: e4843014 str r3, [r4], #20
/* get a clean root */
rtems_filesystem_root = THE_ROOT_FS_LOC;
2edc: e592c000 ldr ip, [r2]
2ee0: e28cc018 add ip, ip, #24 ; 0x18
2ee4: e89c000f ldm ip, {r0, r1, r2, r3}
2ee8: e884000f stm r4, {r0, r1, r2, r3}
* code we must _not_ free the original locs because
* what we are trying to do here is forking off
* clones.
*/
rtems_filesystem_evaluate_path("/", 0, &loc, 0);
2eec: e3a01000 mov r1, #0 ; 0x0
2ef0: e1a0200d mov r2, sp
2ef4: e1a03001 mov r3, r1
2ef8: e59f0090 ldr r0, [pc, #144] ; 2f90 <rtems_libio_set_private_env+0x120>
2efc: ebfffaae bl 19bc <rtems_filesystem_evaluate_path>
rtems_filesystem_root = loc;
2f00: e597c000 ldr ip, [r7]
2f04: e89d000f ldm sp, {r0, r1, r2, r3}
2f08: e28cc014 add ip, ip, #20 ; 0x14
2f0c: e88c000f stm ip, {r0, r1, r2, r3}
rtems_filesystem_evaluate_path("/", 0, &loc, 0);
2f10: e3a01000 mov r1, #0 ; 0x0
2f14: e1a0200d mov r2, sp
2f18: e1a03001 mov r3, r1
2f1c: e59f006c ldr r0, [pc, #108] ; 2f90 <rtems_libio_set_private_env+0x120>
2f20: ebfffaa5 bl 19bc <rtems_filesystem_evaluate_path>
rtems_filesystem_current = loc;
2f24: e597c000 ldr ip, [r7]
2f28: e89d000f ldm sp, {r0, r1, r2, r3}
2f2c: e28cc004 add ip, ip, #4 ; 0x4
2f30: e88c000f stm ip, {r0, r1, r2, r3}
* code we must _not_ free the original locs because
* what we are trying to do here is forking off
* clones.
*/
rtems_filesystem_evaluate_path("/", 0, &loc, 0);
2f34: e1a0500d mov r5, sp
rtems_filesystem_root = loc;
rtems_filesystem_evaluate_path("/", 0, &loc, 0);
rtems_filesystem_current = loc;
return RTEMS_SUCCESSFUL;
}
2f38: e1a00006 mov r0, r6
2f3c: e28dd014 add sp, sp, #20 ; 0x14
2f40: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
sc=rtems_task_ident(RTEMS_SELF,0,&task_id);
if (sc != RTEMS_SUCCESSFUL) return sc;
/* Only for the first time a malloc is necesary */
if (rtems_current_user_env==&rtems_global_user_env) {
rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t));
2f44: e2800040 add r0, r0, #64 ; 0x40
2f48: ebfffc7c bl 2140 <malloc>
if (!tmp)
2f4c: e2508000 subs r8, r0, #0 ; 0x0
2f50: 03a0601a moveq r6, #26 ; 0x1a
2f54: 0afffff7 beq 2f38 <rtems_libio_set_private_env+0xc8>
#ifdef HAVE_USERENV_REFCNT
tmp->refcnt = 1;
#endif
sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env);
2f58: e1a00006 mov r0, r6
2f5c: e1a01007 mov r1, r7
2f60: e59f202c ldr r2, [pc, #44] ; 2f94 <rtems_libio_set_private_env+0x124>
2f64: eb000b00 bl 5b6c <rtems_task_variable_add>
if (sc != RTEMS_SUCCESSFUL) {
2f68: e2504000 subs r4, r0, #0 ; 0x0
* not initialized yet
*/
free(tmp);
return sc;
}
rtems_current_user_env = tmp;
2f6c: 05878000 streq r8, [r7]
#ifdef HAVE_USERENV_REFCNT
tmp->refcnt = 1;
#endif
sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env);
if (sc != RTEMS_SUCCESSFUL) {
2f70: 0affffcb beq 2ea4 <rtems_libio_set_private_env+0x34>
/* don't use free_user_env because the pathlocs are
* not initialized yet
*/
free(tmp);
2f74: e1a00008 mov r0, r8 <== NOT EXECUTED
2f78: ebfffae4 bl 1b10 <free> <== NOT EXECUTED
2f7c: e1a06004 mov r6, r4 <== NOT EXECUTED
2f80: eaffffec b 2f38 <rtems_libio_set_private_env+0xc8> <== NOT EXECUTED
00002dc0 <rtems_libio_share_private_env>:
* b) mutex access to rtems_filesystem_current, rtems_filesytem_root
* while changing any of those (chdir(), chroot()).
*/
#ifndef HAVE_USERENV_REFCNT
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) {
2dc0: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
2dc4: e1a05000 mov r5, r0 <== NOT EXECUTED
2dc8: e24dd008 sub sp, sp, #8 ; 0x8 <== NOT EXECUTED
rtems_status_code sc;
rtems_user_env_t * shared_user_env;
rtems_id current_task_id;
sc=rtems_task_ident(RTEMS_SELF,0,¤t_task_id);
2dcc: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
2dd0: e1a0200d mov r2, sp <== NOT EXECUTED
2dd4: e1a01000 mov r1, r0 <== NOT EXECUTED
2dd8: eb000b0a bl 5a08 <rtems_task_ident> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
2ddc: e2502000 subs r2, r0, #0 ; 0x0 <== NOT EXECUTED
2de0: 1a00000d bne 2e1c <rtems_libio_share_private_env+0x5c> <== NOT EXECUTED
if (rtems_current_user_env->task_id==current_task_id) {
2de4: e59f6078 ldr r6, [pc, #120] ; 2e64 <rtems_libio_share_private_env+0xa4><== NOT EXECUTED
2de8: e5964000 ldr r4, [r6] <== NOT EXECUTED
2dec: e59d3000 ldr r3, [sp] <== NOT EXECUTED
2df0: e5942000 ldr r2, [r4] <== NOT EXECUTED
2df4: e1520003 cmp r2, r3 <== NOT EXECUTED
2df8: 0a00000a beq 2e28 <rtems_libio_share_private_env+0x68> <== NOT EXECUTED
free_user_env(tmp);
};
/* AT THIS POINT, rtems_current_user_env is DANGLING */
sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env,
2dfc: e28d2004 add r2, sp, #4 ; 0x4 <== NOT EXECUTED
2e00: e1a00005 mov r0, r5 <== NOT EXECUTED
2e04: e59f1058 ldr r1, [pc, #88] ; 2e64 <rtems_libio_share_private_env+0xa4><== NOT EXECUTED
2e08: eb000ba9 bl 5cb4 <rtems_task_variable_get> <== NOT EXECUTED
(void*)&shared_user_env );
if (sc != RTEMS_SUCCESSFUL)
2e0c: e2502000 subs r2, r0, #0 ; 0x0 <== NOT EXECUTED
2e10: 0a00000b beq 2e44 <rtems_libio_share_private_env+0x84> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
bailout:
/* fallback to the global env */
rtems_current_user_env = &rtems_global_user_env;
2e14: e59f304c ldr r3, [pc, #76] ; 2e68 <rtems_libio_share_private_env+0xa8><== NOT EXECUTED
2e18: e5863000 str r3, [r6] <== NOT EXECUTED
return sc;
}
2e1c: e1a00002 mov r0, r2 <== NOT EXECUTED
2e20: e28dd008 add sp, sp, #8 ; 0x8 <== NOT EXECUTED
2e24: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
if (rtems_current_user_env->task_id==current_task_id) {
/* kill the current user env & task_var*/
rtems_user_env_t *tmp = rtems_current_user_env;
sc = rtems_task_variable_delete(RTEMS_SELF,(void*)&rtems_current_user_env);
2e28: e1a01006 mov r1, r6 <== NOT EXECUTED
2e2c: eb000b7b bl 5c20 <rtems_task_variable_delete> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
2e30: e2502000 subs r2, r0, #0 ; 0x0 <== NOT EXECUTED
2e34: 1afffff8 bne 2e1c <rtems_libio_share_private_env+0x5c> <== NOT EXECUTED
free_user_env(tmp);
2e38: e1a00004 mov r0, r4 <== NOT EXECUTED
2e3c: ebffffc6 bl 2d5c <free_user_env> <== NOT EXECUTED
2e40: eaffffed b 2dfc <rtems_libio_share_private_env+0x3c> <== NOT EXECUTED
sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env,
(void*)&shared_user_env );
if (sc != RTEMS_SUCCESSFUL)
goto bailout;
sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env);
2e44: e59f2020 ldr r2, [pc, #32] ; 2e6c <rtems_libio_share_private_env+0xac><== NOT EXECUTED
2e48: e59f1014 ldr r1, [pc, #20] ; 2e64 <rtems_libio_share_private_env+0xa4><== NOT EXECUTED
2e4c: eb000b46 bl 5b6c <rtems_task_variable_add> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2e50: e2502000 subs r2, r0, #0 ; 0x0 <== NOT EXECUTED
goto bailout;
/* the current_user_env is the same pointer that remote env */
rtems_current_user_env = shared_user_env;
2e54: 059d3004 ldreq r3, [sp, #4] <== NOT EXECUTED
2e58: 05863000 streq r3, [r6] <== NOT EXECUTED
(void*)&shared_user_env );
if (sc != RTEMS_SUCCESSFUL)
goto bailout;
sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env);
if (sc != RTEMS_SUCCESSFUL)
2e5c: 1affffec bne 2e14 <rtems_libio_share_private_env+0x54> <== NOT EXECUTED
2e60: eaffffed b 2e1c <rtems_libio_share_private_env+0x5c> <== NOT EXECUTED
000102b4 <rtems_message_queue_delete>:
*/
rtems_status_code rtems_message_queue_delete(
Objects_Id id
)
{
102b4: e92d4030 push {r4, r5, lr}
102b8: e24dd004 sub sp, sp, #4 ; 0x4
102bc: e1a01000 mov r1, r0
RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Message_queue_Control *)
102c0: e1a0200d mov r2, sp
102c4: e59f004c ldr r0, [pc, #76] ; 10318 <rtems_message_queue_delete+0x64>
102c8: eb001394 bl 15120 <_Objects_Get>
register Message_queue_Control *the_message_queue;
Objects_Locations location;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
102cc: e59d4000 ldr r4, [sp]
102d0: e3540000 cmp r4, #0 ; 0x0
102d4: e1a05000 mov r5, r0
102d8: 13a00004 movne r0, #4 ; 0x4
102dc: 1a00000b bne 10310 <rtems_message_queue_delete+0x5c>
case OBJECTS_LOCAL:
_Objects_Close( &_Message_queue_Information,
102e0: e59f0030 ldr r0, [pc, #48] ; 10318 <rtems_message_queue_delete+0x64>
102e4: e1a01005 mov r1, r5
102e8: eb00125a bl 14c58 <_Objects_Close>
&the_message_queue->Object );
_CORE_message_queue_Close(
102ec: e3a02005 mov r2, #5 ; 0x5
102f0: e2850014 add r0, r5, #20 ; 0x14
102f4: e1a01004 mov r1, r4
102f8: eb000d1d bl 13774 <_CORE_message_queue_Close>
*/
RTEMS_INLINE_ROUTINE void _Message_queue_Free (
Message_queue_Control *the_message_queue
)
{
_Objects_Free( &_Message_queue_Information, &the_message_queue->Object );
102fc: e59f0014 ldr r0, [pc, #20] ; 10318 <rtems_message_queue_delete+0x64>
10300: e1a01005 mov r1, r5
10304: eb00131a bl 14f74 <_Objects_Free>
0, /* Not used */
0
);
}
#endif
_Thread_Enable_dispatch();
10308: eb0015c9 bl 15a34 <_Thread_Enable_dispatch>
1030c: e1a00004 mov r0, r4
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10310: e28dd004 add sp, sp, #4 ; 0x4
10314: e8bd8030 pop {r4, r5, pc}
0001031c <rtems_message_queue_flush>:
rtems_status_code rtems_message_queue_flush(
Objects_Id id,
uint32_t *count
)
{
1031c: e92d4030 push {r4, r5, lr}
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
10320: e2515000 subs r5, r1, #0 ; 0x0
rtems_status_code rtems_message_queue_flush(
Objects_Id id,
uint32_t *count
)
{
10324: e24dd004 sub sp, sp, #4 ; 0x4
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
10328: 03a00009 moveq r0, #9 ; 0x9
1032c: 0a000007 beq 10350 <rtems_message_queue_flush+0x34>
RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Message_queue_Control *)
10330: e1a01000 mov r1, r0
10334: e1a0200d mov r2, sp
10338: e59f0030 ldr r0, [pc, #48] ; 10370 <rtems_message_queue_flush+0x54>
1033c: eb001377 bl 15120 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
10340: e59d4000 ldr r4, [sp]
10344: e3540000 cmp r4, #0 ; 0x0
10348: 13a00004 movne r0, #4 ; 0x4
1034c: 0a000001 beq 10358 <rtems_message_queue_flush+0x3c>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10350: e28dd004 add sp, sp, #4 ; 0x4
10354: e8bd8030 pop {r4, r5, pc}
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
*count = _CORE_message_queue_Flush( &the_message_queue->message_queue );
10358: e2800014 add r0, r0, #20 ; 0x14
1035c: eb000d0e bl 1379c <_CORE_message_queue_Flush>
10360: e5850000 str r0, [r5]
_Thread_Enable_dispatch();
10364: eb0015b2 bl 15a34 <_Thread_Enable_dispatch>
10368: e1a00004 mov r0, r4
1036c: eafffff7 b 10350 <rtems_message_queue_flush+0x34>
0000260c <rtems_panic>:
void rtems_panic(
const char *printf_format,
...
)
{
260c: e92d000f push {r0, r1, r2, r3} <== NOT EXECUTED
2610: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
va_list arglist;
va_start(arglist, printf_format);
(void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist);
2614: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED
2618: e28d2008 add r2, sp, #8 ; 0x8 <== NOT EXECUTED
261c: e3a00202 mov r0, #536870912 ; 0x20000000 <== NOT EXECUTED
2620: ebffff83 bl 2434 <rtems_verror> <== NOT EXECUTED
va_end(arglist);
}
2624: e49de004 pop {lr} ; (ldr lr, [sp], #4) <== NOT EXECUTED
2628: e28dd010 add sp, sp, #16 ; 0x10 <== NOT EXECUTED
262c: e12fff1e bx lr <== NOT EXECUTED
0000c25c <rtems_rate_monotonic_get_statistics>:
rtems_status_code rtems_rate_monotonic_get_statistics(
Objects_Id id,
rtems_rate_monotonic_period_statistics *statistics
)
{
c25c: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
Objects_Locations location;
Rate_monotonic_Control *the_period;
if ( !statistics )
c260: e2515000 subs r5, r1, #0 ; 0x0 <== NOT EXECUTED
rtems_status_code rtems_rate_monotonic_get_statistics(
Objects_Id id,
rtems_rate_monotonic_period_statistics *statistics
)
{
c264: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED
Objects_Locations location;
Rate_monotonic_Control *the_period;
if ( !statistics )
c268: 03a00009 moveq r0, #9 ; 0x9 <== NOT EXECUTED
c26c: 0a000007 beq c290 <rtems_rate_monotonic_get_statistics+0x34><== NOT EXECUTED
c270: e1a01000 mov r1, r0 <== NOT EXECUTED
c274: e1a0200d mov r2, sp <== NOT EXECUTED
c278: e59f004c ldr r0, [pc, #76] ; c2cc <rtems_rate_monotonic_get_statistics+0x70><== NOT EXECUTED
c27c: ebffee7b bl 7c70 <_Objects_Get> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
c280: e59d6000 ldr r6, [sp] <== NOT EXECUTED
c284: e3560000 cmp r6, #0 ; 0x0 <== NOT EXECUTED
c288: 13a00004 movne r0, #4 ; 0x4 <== NOT EXECUTED
c28c: 0a000001 beq c298 <rtems_rate_monotonic_get_statistics+0x3c><== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
c290: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED
c294: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
*statistics = the_period->Statistics;
c298: e280c054 add ip, r0, #84 ; 0x54 <== NOT EXECUTED
c29c: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED
c2a0: e1a04005 mov r4, r5 <== NOT EXECUTED
c2a4: e8a4000f stmia r4!, {r0, r1, r2, r3} <== NOT EXECUTED
c2a8: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED
c2ac: e8a4000f stmia r4!, {r0, r1, r2, r3} <== NOT EXECUTED
c2b0: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED
c2b4: e8a4000f stmia r4!, {r0, r1, r2, r3} <== NOT EXECUTED
c2b8: e89c0003 ldm ip, {r0, r1} <== NOT EXECUTED
c2bc: e8840003 stm r4, {r0, r1} <== NOT EXECUTED
_Thread_Enable_dispatch();
c2c0: ebfff0af bl 8584 <_Thread_Enable_dispatch> <== NOT EXECUTED
c2c4: e1a00006 mov r0, r6 <== NOT EXECUTED
c2c8: eafffff0 b c290 <rtems_rate_monotonic_get_statistics+0x34> <== NOT EXECUTED
0000c2d0 <rtems_rate_monotonic_get_status>:
rtems_status_code rtems_rate_monotonic_get_status(
Objects_Id id,
rtems_rate_monotonic_period_status *status
)
{
c2d0: e92d4070 push {r4, r5, r6, lr}
Objects_Locations location;
Rate_monotonic_Control *the_period;
if ( !status )
c2d4: e2515000 subs r5, r1, #0 ; 0x0
rtems_status_code rtems_rate_monotonic_get_status(
Objects_Id id,
rtems_rate_monotonic_period_status *status
)
{
c2d8: e24dd00c sub sp, sp, #12 ; 0xc
Objects_Locations location;
Rate_monotonic_Control *the_period;
if ( !status )
c2dc: 03a00009 moveq r0, #9 ; 0x9
c2e0: 0a000016 beq c340 <rtems_rate_monotonic_get_status+0x70>
c2e4: e1a01000 mov r1, r0
c2e8: e28d2008 add r2, sp, #8 ; 0x8
c2ec: e59f0084 ldr r0, [pc, #132] ; c378 <rtems_rate_monotonic_get_status+0xa8>
c2f0: ebffee5e bl 7c70 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
c2f4: e59d3008 ldr r3, [sp, #8]
c2f8: e3530000 cmp r3, #0 ; 0x0
c2fc: e1a06000 mov r6, r0
c300: 13a00004 movne r0, #4 ; 0x4
c304: 1a00000d bne c340 <rtems_rate_monotonic_get_status+0x70>
case OBJECTS_LOCAL:
status->owner = ((the_period->owner) ? the_period->owner->Object.id : 0);
c308: e5963050 ldr r3, [r6, #80] <== NOT EXECUTED
c30c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
c310: 01a02003 moveq r2, r3 <== NOT EXECUTED
c314: 15932008 ldrne r2, [r3, #8] <== NOT EXECUTED
status->state = the_period->state;
c318: e5963038 ldr r3, [r6, #56] <== NOT EXECUTED
if ( status->state == RATE_MONOTONIC_INACTIVE ) {
c31c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
status->owner = ((the_period->owner) ? the_period->owner->Object.id : 0);
c320: e885000c stm r5, {r2, r3} <== NOT EXECUTED
status->state = the_period->state;
if ( status->state == RATE_MONOTONIC_INACTIVE ) {
c324: 1a000007 bne c348 <rtems_rate_monotonic_get_status+0x78> <== NOT EXECUTED
#else
status->since_last_period = 0;
#endif
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
status->executed_since_last_period.tv_sec = 0;
status->executed_since_last_period.tv_nsec = 0;
c328: e5853014 str r3, [r5, #20] <== NOT EXECUTED
status->owner = ((the_period->owner) ? the_period->owner->Object.id : 0);
status->state = the_period->state;
if ( status->state == RATE_MONOTONIC_INACTIVE ) {
#ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS
status->since_last_period.tv_sec = 0;
c32c: e5853008 str r3, [r5, #8] <== NOT EXECUTED
status->since_last_period.tv_nsec = 0;
c330: e585300c str r3, [r5, #12] <== NOT EXECUTED
#else
status->since_last_period = 0;
#endif
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
status->executed_since_last_period.tv_sec = 0;
c334: e5853010 str r3, [r5, #16] <== NOT EXECUTED
the_period->owner->cpu_time_used -
the_period->owner_executed_at_period;
#endif
}
_Thread_Enable_dispatch();
c338: ebfff091 bl 8584 <_Thread_Enable_dispatch> <== NOT EXECUTED
c33c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
c340: e28dd00c add sp, sp, #12 ; 0xc
c344: e8bd8070 pop {r4, r5, r6, pc}
* This lets them share one single invocation of _TOD_Get_uptime().
*/
#if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) || \
defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS)
struct timespec uptime;
_TOD_Get_uptime( &uptime );
c348: e1a0000d mov r0, sp <== NOT EXECUTED
c34c: ebffebc1 bl 7258 <_TOD_Get_uptime> <== NOT EXECUTED
#endif
#ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS
_Timespec_Subtract(
c350: e2860044 add r0, r6, #68 ; 0x44 <== NOT EXECUTED
c354: e1a0100d mov r1, sp <== NOT EXECUTED
c358: e2852008 add r2, r5, #8 ; 0x8 <== NOT EXECUTED
c35c: ebfff4f5 bl 9738 <_Timespec_Subtract> <== NOT EXECUTED
status->since_last_period =
_Watchdog_Ticks_since_boot - the_period->time_at_period;
#endif
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
_Timespec_Subtract(
c360: e1a0100d mov r1, sp <== NOT EXECUTED
c364: e2852010 add r2, r5, #16 ; 0x10 <== NOT EXECUTED
c368: e59f000c ldr r0, [pc, #12] ; c37c <rtems_rate_monotonic_get_status+0xac><== NOT EXECUTED
* This lets them share one single invocation of _TOD_Get_uptime().
*/
#if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) || \
defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS)
struct timespec uptime;
_TOD_Get_uptime( &uptime );
c36c: e1a0400d mov r4, sp <== NOT EXECUTED
status->since_last_period =
_Watchdog_Ticks_since_boot - the_period->time_at_period;
#endif
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
_Timespec_Subtract(
c370: ebfff4f0 bl 9738 <_Timespec_Subtract> <== NOT EXECUTED
c374: eaffffef b c338 <rtems_rate_monotonic_get_status+0x68> <== NOT EXECUTED
00005d48 <rtems_rate_monotonic_report_statistics>:
}
}
void rtems_rate_monotonic_report_statistics( void )
{
rtems_rate_monotonic_report_statistics_with_plugin( NULL, printk_plugin );
5d48: e59f1004 ldr r1, [pc, #4] ; 5d54 <rtems_rate_monotonic_report_statistics+0xc><== NOT EXECUTED
5d4c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
5d50: eaffff71 b 5b1c <rtems_rate_monotonic_report_statistics_with_plugin><== NOT EXECUTED
00005b1c <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
5b1c: 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 )
5b20: e2516000 subs r6, r1, #0 ; 0x0 <== NOT EXECUTED
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
5b24: e24dd070 sub sp, sp, #112 ; 0x70 <== NOT EXECUTED
5b28: e1a07000 mov r7, 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 )
5b2c: 0a000042 beq 5c3c <rtems_rate_monotonic_report_statistics_with_plugin+0x120><== NOT EXECUTED
return;
(*print)( context, "Period information by period\n" );
5b30: e59f11e4 ldr r1, [pc, #484] ; 5d1c <rtems_rate_monotonic_report_statistics_with_plugin+0x200><== NOT EXECUTED
5b34: e1a0e00f mov lr, pc <== NOT EXECUTED
5b38: e12fff16 bx r6 <== NOT EXECUTED
#if defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS)
(*print)( context, "--- CPU times are in seconds ---\n" );
5b3c: e59f11dc ldr r1, [pc, #476] ; 5d20 <rtems_rate_monotonic_report_statistics_with_plugin+0x204><== NOT EXECUTED
5b40: e1a00007 mov r0, r7 <== NOT EXECUTED
5b44: e1a0e00f mov lr, pc <== NOT EXECUTED
5b48: e12fff16 bx r6 <== NOT EXECUTED
#endif
#if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS)
(*print)( context, "--- Wall times are in seconds ---\n" );
5b4c: e59f11d0 ldr r1, [pc, #464] ; 5d24 <rtems_rate_monotonic_report_statistics_with_plugin+0x208><== NOT EXECUTED
5b50: e1a00007 mov r0, r7 <== NOT EXECUTED
5b54: e1a0e00f mov lr, pc <== NOT EXECUTED
5b58: e12fff16 bx r6 <== 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 ;
5b5c: e59f81c4 ldr r8, [pc, #452] ; 5d28 <rtems_rate_monotonic_report_statistics_with_plugin+0x20c><== NOT EXECUTED
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
5b60: e59f11c4 ldr r1, [pc, #452] ; 5d2c <rtems_rate_monotonic_report_statistics_with_plugin+0x210><== NOT EXECUTED
5b64: e1a00007 mov r0, r7 <== NOT EXECUTED
5b68: e1a0e00f mov lr, pc <== NOT EXECUTED
5b6c: e12fff16 bx r6 <== NOT EXECUTED
#ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
5b70: e1a00007 mov r0, r7 <== NOT EXECUTED
5b74: e59f11b4 ldr r1, [pc, #436] ; 5d30 <rtems_rate_monotonic_report_statistics_with_plugin+0x214><== NOT EXECUTED
5b78: e1a0e00f mov lr, pc <== NOT EXECUTED
5b7c: e12fff16 bx r6 <== 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 ;
5b80: e5985008 ldr r5, [r8, #8] <== NOT EXECUTED
id <= _Rate_monotonic_Information.maximum_id ;
5b84: e598300c ldr r3, [r8, #12] <== NOT EXECUTED
5b88: e1550003 cmp r5, r3 <== NOT EXECUTED
5b8c: 8a00002a bhi 5c3c <rtems_rate_monotonic_report_statistics_with_plugin+0x120><== NOT EXECUTED
_Timespec_Divide_by_integer(
&the_stats.total_cpu_time,
the_stats.count,
&cpu_average
);
(*print)( context,
5b90: e59fa19c ldr sl, [pc, #412] ; 5d34 <rtems_rate_monotonic_report_statistics_with_plugin+0x218><== NOT EXECUTED
5b94: e28d9010 add r9, sp, #16 ; 0x10 <== NOT EXECUTED
*/
{
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
struct timespec cpu_average;
_Timespec_Divide_by_integer(
5b98: e28db060 add fp, sp, #96 ; 0x60 <== NOT EXECUTED
5b9c: ea000003 b 5bb0 <rtems_rate_monotonic_report_statistics_with_plugin+0x94><== 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 ;
5ba0: e598300c ldr r3, [r8, #12] <== NOT EXECUTED
id++ ) {
5ba4: e2855001 add r5, r5, #1 ; 0x1 <== 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 ;
5ba8: e1530005 cmp r3, r5 <== NOT EXECUTED
5bac: 3a000022 bcc 5c3c <rtems_rate_monotonic_report_statistics_with_plugin+0x120><== NOT EXECUTED
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
5bb0: e1a00005 mov r0, r5 <== NOT EXECUTED
5bb4: e1a01009 mov r1, r9 <== NOT EXECUTED
5bb8: eb0019a7 bl c25c <rtems_rate_monotonic_get_statistics> <== NOT EXECUTED
if ( status != RTEMS_SUCCESSFUL )
5bbc: e2504000 subs r4, r0, #0 ; 0x0 <== NOT EXECUTED
5bc0: 1afffff6 bne 5ba0 <rtems_rate_monotonic_report_statistics_with_plugin+0x84><== NOT EXECUTED
continue;
/* If the above passed, so should this but check it anyway */
status = rtems_rate_monotonic_get_status( id, &the_status );
5bc4: e28d1048 add r1, sp, #72 ; 0x48 <== NOT EXECUTED
5bc8: e1a00005 mov r0, r5 <== NOT EXECUTED
5bcc: eb0019bf bl c2d0 <rtems_rate_monotonic_get_status> <== NOT EXECUTED
continue;
#endif
name[ 0 ] = '\0';
if ( the_status.owner ) {
5bd0: e59d0048 ldr r0, [sp, #72] <== NOT EXECUTED
5bd4: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
#if defined(RTEMS_DEBUG)
if ( status != RTEMS_SUCCESSFUL )
continue;
#endif
name[ 0 ] = '\0';
5bd8: e5cd406b strb r4, [sp, #107] <== NOT EXECUTED
if ( the_status.owner ) {
5bdc: 1a00004a bne 5d0c <rtems_rate_monotonic_report_statistics_with_plugin+0x1f0><== NOT EXECUTED
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
5be0: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
5be4: e59d2014 ldr r2, [sp, #20] <== NOT EXECUTED
5be8: e58d3000 str r3, [sp] <== NOT EXECUTED
5bec: e58d2004 str r2, [sp, #4] <== NOT EXECUTED
5bf0: e28d306b add r3, sp, #107 ; 0x6b <== NOT EXECUTED
5bf4: e1a02005 mov r2, r5 <== NOT EXECUTED
5bf8: e59f1138 ldr r1, [pc, #312] ; 5d38 <rtems_rate_monotonic_report_statistics_with_plugin+0x21c><== NOT EXECUTED
5bfc: e1a00007 mov r0, r7 <== NOT EXECUTED
5c00: e1a0e00f mov lr, pc <== NOT EXECUTED
5c04: e12fff16 bx r6 <== NOT EXECUTED
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
5c08: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
5c0c: e2531000 subs r1, r3, #0 ; 0x0 <== NOT EXECUTED
*/
{
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
struct timespec cpu_average;
_Timespec_Divide_by_integer(
5c10: e28d0028 add r0, sp, #40 ; 0x28 <== NOT EXECUTED
5c14: e1a0200b mov r2, fp <== NOT EXECUTED
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
5c18: 1a000009 bne 5c44 <rtems_rate_monotonic_report_statistics_with_plugin+0x128><== NOT EXECUTED
(*print)( context, "\n" );
5c1c: e1a00007 mov r0, r7 <== NOT EXECUTED
5c20: e59f1114 ldr r1, [pc, #276] ; 5d3c <rtems_rate_monotonic_report_statistics_with_plugin+0x220><== NOT EXECUTED
5c24: e1a0e00f mov lr, pc <== NOT EXECUTED
5c28: e12fff16 bx r6 <== 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 ;
5c2c: e598300c ldr r3, [r8, #12] <== NOT EXECUTED
id++ ) {
5c30: e2855001 add r5, r5, #1 ; 0x1 <== 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 ;
5c34: e1530005 cmp r3, r5 <== NOT EXECUTED
5c38: 2affffdc bcs 5bb0 <rtems_rate_monotonic_report_statistics_with_plugin+0x94><== NOT EXECUTED
the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall
);
#endif
}
}
}
5c3c: e28dd070 add sp, sp, #112 ; 0x70 <== NOT EXECUTED
5c40: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
*/
{
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
struct timespec cpu_average;
_Timespec_Divide_by_integer(
5c44: eb000e7e bl 9644 <_Timespec_Divide_by_integer> <== NOT EXECUTED
&the_stats.total_cpu_time,
the_stats.count,
&cpu_average
);
(*print)( context,
5c48: e59d1024 ldr r1, [sp, #36] <== NOT EXECUTED
5c4c: e0c2c19a smull ip, r2, sl, r1 <== NOT EXECUTED
5c50: e59d0064 ldr r0, [sp, #100] <== NOT EXECUTED
5c54: e59d301c ldr r3, [sp, #28] <== NOT EXECUTED
5c58: e0cce09a smull lr, ip, sl, r0 <== NOT EXECUTED
5c5c: e0c4e39a smull lr, r4, sl, r3 <== NOT EXECUTED
5c60: e1a01fc1 asr r1, r1, #31 <== NOT EXECUTED
5c64: e0611342 rsb r1, r1, r2, asr #6 <== NOT EXECUTED
5c68: e59d2020 ldr r2, [sp, #32] <== NOT EXECUTED
5c6c: e1a00fc0 asr r0, r0, #31 <== NOT EXECUTED
5c70: e58d2000 str r2, [sp] <== NOT EXECUTED
5c74: e59d2060 ldr r2, [sp, #96] <== NOT EXECUTED
5c78: e060034c rsb r0, r0, ip, asr #6 <== NOT EXECUTED
5c7c: e1a03fc3 asr r3, r3, #31 <== NOT EXECUTED
5c80: e0633344 rsb r3, r3, r4, asr #6 <== NOT EXECUTED
5c84: e98d0006 stmib sp, {r1, r2} <== NOT EXECUTED
5c88: e58d000c str r0, [sp, #12] <== NOT EXECUTED
5c8c: e59d2018 ldr r2, [sp, #24] <== NOT EXECUTED
5c90: e59f10a8 ldr r1, [pc, #168] ; 5d40 <rtems_rate_monotonic_report_statistics_with_plugin+0x224><== NOT EXECUTED
5c94: e1a00007 mov r0, r7 <== NOT EXECUTED
5c98: e1a0e00f mov lr, pc <== NOT EXECUTED
5c9c: e12fff16 bx r6 <== NOT EXECUTED
* print Wall time part of statistics
*/
{
#ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS
struct timespec wall_average;
_Timespec_Divide_by_integer(
5ca0: e28d0040 add r0, sp, #64 ; 0x40 <== NOT EXECUTED
5ca4: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED
5ca8: e1a0200b mov r2, fp <== NOT EXECUTED
5cac: eb000e64 bl 9644 <_Timespec_Divide_by_integer> <== NOT EXECUTED
&the_stats.total_wall_time,
the_stats.count,
&wall_average
);
(*print)( context,
5cb0: e59d103c ldr r1, [sp, #60] <== NOT EXECUTED
5cb4: e0c2c19a smull ip, r2, sl, r1 <== NOT EXECUTED
5cb8: e59d0064 ldr r0, [sp, #100] <== NOT EXECUTED
5cbc: e59d3034 ldr r3, [sp, #52] <== NOT EXECUTED
5cc0: e0cce09a smull lr, ip, sl, r0 <== NOT EXECUTED
5cc4: e0c4e39a smull lr, r4, sl, r3 <== NOT EXECUTED
5cc8: e1a01fc1 asr r1, r1, #31 <== NOT EXECUTED
5ccc: e0611342 rsb r1, r1, r2, asr #6 <== NOT EXECUTED
5cd0: e59d2038 ldr r2, [sp, #56] <== NOT EXECUTED
5cd4: e1a00fc0 asr r0, r0, #31 <== NOT EXECUTED
5cd8: e58d2000 str r2, [sp] <== NOT EXECUTED
5cdc: e59d2060 ldr r2, [sp, #96] <== NOT EXECUTED
5ce0: e060034c rsb r0, r0, ip, asr #6 <== NOT EXECUTED
5ce4: e1a03fc3 asr r3, r3, #31 <== NOT EXECUTED
5ce8: e98d0006 stmib sp, {r1, r2} <== NOT EXECUTED
5cec: e58d000c str r0, [sp, #12] <== NOT EXECUTED
5cf0: e0633344 rsb r3, r3, r4, asr #6 <== NOT EXECUTED
5cf4: e59d2030 ldr r2, [sp, #48] <== NOT EXECUTED
5cf8: e1a00007 mov r0, r7 <== NOT EXECUTED
5cfc: e59f1040 ldr r1, [pc, #64] ; 5d44 <rtems_rate_monotonic_report_statistics_with_plugin+0x228><== NOT EXECUTED
5d00: e1a0e00f mov lr, pc <== NOT EXECUTED
5d04: e12fff16 bx r6 <== NOT EXECUTED
5d08: eaffffa4 b 5ba0 <rtems_rate_monotonic_report_statistics_with_plugin+0x84><== NOT EXECUTED
#endif
name[ 0 ] = '\0';
if ( the_status.owner ) {
rtems_object_get_name( the_status.owner, sizeof(name), name );
5d0c: e28d206b add r2, sp, #107 ; 0x6b <== NOT EXECUTED
5d10: e3a01005 mov r1, #5 ; 0x5 <== NOT EXECUTED
5d14: eb000070 bl 5edc <rtems_object_get_name> <== NOT EXECUTED
5d18: eaffffb0 b 5be0 <rtems_rate_monotonic_report_statistics_with_plugin+0xc4><== NOT EXECUTED
00005d58 <rtems_rate_monotonic_reset_all_statistics>:
5d58: e59f3040 ldr r3, [pc, #64] ; 5da0 <rtems_rate_monotonic_reset_all_statistics+0x48><== NOT EXECUTED
5d5c: e5932000 ldr r2, [r3] <== NOT EXECUTED
5d60: e2822001 add r2, r2, #1 ; 0x1 <== NOT EXECUTED
/*
* rtems_rate_monotonic_reset_all_statistics
*/
void rtems_rate_monotonic_reset_all_statistics( void )
{
5d64: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
5d68: 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 ;
5d6c: e59f5030 ldr r5, [pc, #48] ; 5da4 <rtems_rate_monotonic_reset_all_statistics+0x4c><== NOT EXECUTED
5d70: e5954008 ldr r4, [r5, #8] <== NOT EXECUTED
id <= _Rate_monotonic_Information.maximum_id ;
5d74: e595300c ldr r3, [r5, #12] <== NOT EXECUTED
5d78: e1540003 cmp r4, r3 <== NOT EXECUTED
5d7c: 8a000005 bhi 5d98 <rtems_rate_monotonic_reset_all_statistics+0x40><== NOT EXECUTED
id++ ) {
status = rtems_rate_monotonic_reset_statistics( id );
5d80: e1a00004 mov r0, r4 <== NOT EXECUTED
5d84: eb000007 bl 5da8 <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 ;
5d88: e595300c ldr r3, [r5, #12] <== NOT EXECUTED
id++ ) {
5d8c: e2844001 add r4, r4, #1 ; 0x1 <== 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 ;
5d90: e1530004 cmp r3, r4 <== NOT EXECUTED
5d94: 2afffff9 bcs 5d80 <rtems_rate_monotonic_reset_all_statistics+0x28><== NOT EXECUTED
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
}
5d98: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED
}
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
5d9c: ea0009f8 b 8584 <_Thread_Enable_dispatch> <== NOT EXECUTED
00005da8 <rtems_rate_monotonic_reset_statistics>:
*/
rtems_status_code rtems_rate_monotonic_reset_statistics(
Objects_Id id
)
{
5da8: e92d4010 push {r4, lr} <== NOT EXECUTED
5dac: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED
5db0: e1a01000 mov r1, r0 <== NOT EXECUTED
5db4: e1a0200d mov r2, sp <== NOT EXECUTED
5db8: e59f005c ldr r0, [pc, #92] ; 5e1c <rtems_rate_monotonic_reset_statistics+0x74><== NOT EXECUTED
5dbc: eb0007ab bl 7c70 <_Objects_Get> <== NOT EXECUTED
Objects_Locations location;
Rate_monotonic_Control *the_period;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
5dc0: e59d4000 ldr r4, [sp] <== NOT EXECUTED
5dc4: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED
5dc8: 13a00004 movne r0, #4 ; 0x4 <== NOT EXECUTED
5dcc: 1a000010 bne 5e14 <rtems_rate_monotonic_reset_statistics+0x6c><== NOT EXECUTED
case OBJECTS_LOCAL:
_Rate_monotonic_Reset_statistics( the_period );
5dd0: e3e03102 mvn r3, #-2147483648 ; 0x80000000 <== NOT EXECUTED
5dd4: e5803078 str r3, [r0, #120] <== NOT EXECUTED
5dd8: e5804054 str r4, [r0, #84] <== NOT EXECUTED
5ddc: e5804058 str r4, [r0, #88] <== NOT EXECUTED
5de0: e5804064 str r4, [r0, #100] <== NOT EXECUTED
5de4: e5804068 str r4, [r0, #104] <== NOT EXECUTED
5de8: e580406c str r4, [r0, #108] <== NOT EXECUTED
5dec: e5804070 str r4, [r0, #112] <== NOT EXECUTED
5df0: e580407c str r4, [r0, #124] <== NOT EXECUTED
5df4: e5804080 str r4, [r0, #128] <== NOT EXECUTED
5df8: e5804084 str r4, [r0, #132] <== NOT EXECUTED
5dfc: e5804088 str r4, [r0, #136] <== NOT EXECUTED
5e00: e580305c str r3, [r0, #92] <== NOT EXECUTED
5e04: e5803060 str r3, [r0, #96] <== NOT EXECUTED
5e08: e5803074 str r3, [r0, #116] <== NOT EXECUTED
_Thread_Enable_dispatch();
5e0c: eb0009dc bl 8584 <_Thread_Enable_dispatch> <== NOT EXECUTED
5e10: e1a00004 mov r0, r4 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
5e14: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED
5e18: e8bd8010 pop {r4, pc} <== NOT EXECUTED
000110cc <rtems_region_extend>:
rtems_status_code rtems_region_extend(
Objects_Id id,
void *starting_address,
uint32_t length
)
{
110cc: e92d41f0 push {r4, r5, r6, r7, r8, lr}
Heap_Extend_status heap_status;
Objects_Locations location;
rtems_status_code return_status = RTEMS_INTERNAL_ERROR;
Region_Control *the_region;
if ( !starting_address )
110d0: e2517000 subs r7, r1, #0 ; 0x0
rtems_status_code rtems_region_extend(
Objects_Id id,
void *starting_address,
uint32_t length
)
{
110d4: e1a04000 mov r4, r0
110d8: e24dd008 sub sp, sp, #8 ; 0x8
110dc: e1a06002 mov r6, r2
Heap_Extend_status heap_status;
Objects_Locations location;
rtems_status_code return_status = RTEMS_INTERNAL_ERROR;
Region_Control *the_region;
if ( !starting_address )
110e0: 03a04009 moveq r4, #9 ; 0x9
110e4: 0a000020 beq 1116c <rtems_region_extend+0xa0>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
110e8: e59f80a0 ldr r8, [pc, #160] ; 11190 <rtems_region_extend+0xc4>
110ec: e5980000 ldr r0, [r8]
110f0: eb000928 bl 13598 <_API_Mutex_Lock>
RTEMS_INLINE_ROUTINE Region_Control *_Region_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Region_Control *)
110f4: e1a01004 mov r1, r4
110f8: e59f0094 ldr r0, [pc, #148] ; 11194 <rtems_region_extend+0xc8>
110fc: e1a0200d mov r2, sp
11100: eb000ff5 bl 150dc <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
11104: e59d4000 ldr r4, [sp]
11108: e3540000 cmp r4, #0 ; 0x0
1110c: e1a05000 mov r5, r0
11110: 1a000018 bne 11178 <rtems_region_extend+0xac>
case OBJECTS_LOCAL:
heap_status = _Heap_Extend(
11114: e1a01007 mov r1, r7
11118: e1a02006 mov r2, r6
1111c: e2800068 add r0, r0, #104 ; 0x68
11120: e28d3004 add r3, sp, #4 ; 0x4
11124: eb000c3a bl 14214 <_Heap_Extend>
starting_address,
length,
&amount_extended
);
switch ( heap_status ) {
11128: e3500001 cmp r0, #1 ; 0x1
1112c: 03a04009 moveq r4, #9 ; 0x9
11130: 0a00000b beq 11164 <rtems_region_extend+0x98>
11134: 2a000007 bcs 11158 <rtems_region_extend+0x8c>
case HEAP_EXTEND_SUCCESSFUL:
the_region->length += amount_extended;
11138: e59d1004 ldr r1, [sp, #4]
1113c: e5952054 ldr r2, [r5, #84]
the_region->maximum_segment_size += amount_extended;
11140: e595305c ldr r3, [r5, #92]
&amount_extended
);
switch ( heap_status ) {
case HEAP_EXTEND_SUCCESSFUL:
the_region->length += amount_extended;
11144: e0822001 add r2, r2, r1
the_region->maximum_segment_size += amount_extended;
11148: e0833001 add r3, r3, r1
1114c: e585305c str r3, [r5, #92]
&amount_extended
);
switch ( heap_status ) {
case HEAP_EXTEND_SUCCESSFUL:
the_region->length += amount_extended;
11150: e5852054 str r2, [r5, #84]
11154: ea000002 b 11164 <rtems_region_extend+0x98>
starting_address,
length,
&amount_extended
);
switch ( heap_status ) {
11158: e3500002 cmp r0, #2 ; 0x2
1115c: 0a000009 beq 11188 <rtems_region_extend+0xbc>
case HEAP_EXTEND_SUCCESSFUL:
the_region->length += amount_extended;
the_region->maximum_segment_size += amount_extended;
return_status = RTEMS_SUCCESSFUL;
break;
11160: e3a04019 mov r4, #25 ; 0x19 <== NOT EXECUTED
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
11164: e5980000 ldr r0, [r8]
11168: eb000926 bl 13608 <_API_Mutex_Unlock>
return return_status;
}
1116c: e1a00004 mov r0, r4
11170: e28dd008 add sp, sp, #8 ; 0x8
11174: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
the_region = _Region_Get( id, &location );
switch ( location ) {
11178: e3540001 cmp r4, #1 ; 0x1
1117c: 03a04004 moveq r4, #4 ; 0x4
11180: 1afffff6 bne 11160 <rtems_region_extend+0x94>
11184: eafffff6 b 11164 <rtems_region_extend+0x98>
switch ( heap_status ) {
case HEAP_EXTEND_SUCCESSFUL:
the_region->length += amount_extended;
the_region->maximum_segment_size += amount_extended;
return_status = RTEMS_SUCCESSFUL;
break;
11188: e3a04018 mov r4, #24 ; 0x18
1118c: eafffff4 b 11164 <rtems_region_extend+0x98>
000114b4 <rtems_region_resize_segment>:
Objects_Id id,
void *segment,
size_t size,
size_t *old_size
)
{
114b4: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
uint32_t osize;
rtems_status_code return_status = RTEMS_INTERNAL_ERROR;
Heap_Resize_status status;
register Region_Control *the_region;
if ( !old_size )
114b8: e253a000 subs sl, r3, #0 ; 0x0
Objects_Id id,
void *segment,
size_t size,
size_t *old_size
)
{
114bc: e24dd010 sub sp, sp, #16 ; 0x10
114c0: e1a04000 mov r4, r0
114c4: e1a05001 mov r5, r1
114c8: e1a06002 mov r6, r2
uint32_t osize;
rtems_status_code return_status = RTEMS_INTERNAL_ERROR;
Heap_Resize_status status;
register Region_Control *the_region;
if ( !old_size )
114cc: 0a000028 beq 11574 <rtems_region_resize_segment+0xc0>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
114d0: e59f70b4 ldr r7, [pc, #180] ; 1158c <rtems_region_resize_segment+0xd8>
114d4: e5970000 ldr r0, [r7]
114d8: eb00082e bl 13598 <_API_Mutex_Lock>
114dc: e1a01004 mov r1, r4
114e0: e59f00a8 ldr r0, [pc, #168] ; 11590 <rtems_region_resize_segment+0xdc>
114e4: e28d2008 add r2, sp, #8 ; 0x8
114e8: eb000efb bl 150dc <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
114ec: e59d3008 ldr r3, [sp, #8]
114f0: e3530000 cmp r3, #0 ; 0x0
114f4: e1a08000 mov r8, r0
114f8: 0a000007 beq 1151c <rtems_region_resize_segment+0x68>
114fc: e3530001 cmp r3, #1 ; 0x1
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
11500: e5970000 ldr r0, [r7]
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
the_region = _Region_Get( id, &location );
switch ( location ) {
11504: 03a04004 moveq r4, #4 ; 0x4
11508: 13a04019 movne r4, #25 ; 0x19
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
1150c: eb00083d bl 13608 <_API_Mutex_Unlock>
return return_status;
}
11510: e1a00004 mov r0, r4
11514: e28dd010 add sp, sp, #16 ; 0x10
11518: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
case OBJECTS_LOCAL:
_Region_Debug_Walk( the_region, 7 );
status = _Heap_Resize_block(
1151c: e1a01005 mov r1, r5
11520: e28d3004 add r3, sp, #4 ; 0x4
11524: e28dc00c add ip, sp, #12 ; 0xc
11528: e1a02006 mov r2, r6
1152c: e2800068 add r0, r0, #104 ; 0x68
11530: e58dc000 str ip, [sp]
11534: eb000cc1 bl 14840 <_Heap_Resize_block>
segment,
(uint32_t) size,
&osize,
&avail_size
);
*old_size = (uint32_t) osize;
11538: e59d3004 ldr r3, [sp, #4]
_Region_Debug_Walk( the_region, 8 );
if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 )
1153c: e2505000 subs r5, r0, #0 ; 0x0
segment,
(uint32_t) size,
&osize,
&avail_size
);
*old_size = (uint32_t) osize;
11540: e58a3000 str r3, [sl]
_Region_Debug_Walk( the_region, 8 );
if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 )
11544: 1a000005 bne 11560 <rtems_region_resize_segment+0xac>
11548: e59d400c ldr r4, [sp, #12] <== NOT EXECUTED
1154c: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED
11550: 1a000009 bne 1157c <rtems_region_resize_segment+0xc8> <== NOT EXECUTED
_Region_Process_queue( the_region ); /* unlocks allocator */
else
_RTEMS_Unlock_allocator();
11554: e5970000 ldr r0, [r7] <== NOT EXECUTED
11558: eb00082a bl 13608 <_API_Mutex_Unlock> <== NOT EXECUTED
1155c: eaffffeb b 11510 <rtems_region_resize_segment+0x5c> <== NOT EXECUTED
11560: e5970000 ldr r0, [r7]
11564: eb000827 bl 13608 <_API_Mutex_Unlock>
return
11568: e3550001 cmp r5, #1 ; 0x1
1156c: 03a0400d moveq r4, #13 ; 0xd
11570: 0affffe6 beq 11510 <rtems_region_resize_segment+0x5c>
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
return return_status;
11574: e3a04009 mov r4, #9 ; 0x9
11578: eaffffe4 b 11510 <rtems_region_resize_segment+0x5c>
*old_size = (uint32_t) osize;
_Region_Debug_Walk( the_region, 8 );
if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 )
_Region_Process_queue( the_region ); /* unlocks allocator */
1157c: e1a00008 mov r0, r8 <== NOT EXECUTED
11580: eb002115 bl 199dc <_Region_Process_queue> <== NOT EXECUTED
11584: e1a04005 mov r4, r5 <== NOT EXECUTED
11588: eaffffe0 b 11510 <rtems_region_resize_segment+0x5c> <== NOT EXECUTED
0000456c <rtems_semaphore_create>:
uint32_t count,
rtems_attribute attribute_set,
rtems_task_priority priority_ceiling,
rtems_id *id
)
{
456c: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
register Semaphore_Control *the_semaphore;
CORE_mutex_Attributes the_mutex_attributes;
CORE_semaphore_Attributes the_semaphore_attributes;
if ( !rtems_is_name_valid( name ) )
4570: e250a000 subs sl, r0, #0 ; 0x0
uint32_t count,
rtems_attribute attribute_set,
rtems_task_priority priority_ceiling,
rtems_id *id
)
{
4574: e24dd018 sub sp, sp, #24 ; 0x18
4578: e1a06001 mov r6, r1
457c: e1a04002 mov r4, r2
4580: e1a08003 mov r8, r3
register Semaphore_Control *the_semaphore;
CORE_mutex_Attributes the_mutex_attributes;
CORE_semaphore_Attributes the_semaphore_attributes;
if ( !rtems_is_name_valid( name ) )
4584: 02800003 addeq r0, r0, #3 ; 0x3
4588: 0a000037 beq 466c <rtems_semaphore_create+0x100>
return RTEMS_INVALID_NAME;
if ( !id )
458c: e59d3038 ldr r3, [sp, #56]
4590: e3530000 cmp r3, #0 ; 0x0
4594: 03a00009 moveq r0, #9 ; 0x9
4598: 0a000033 beq 466c <rtems_semaphore_create+0x100>
return RTEMS_NOT_DEFINED;
} else
#endif
if ( _Attributes_Is_inherit_priority( attribute_set ) ||
459c: e21230c0 ands r3, r2, #192 ; 0xc0
45a0: 02025030 andeq r5, r2, #48 ; 0x30
45a4: 1a000032 bne 4674 <rtems_semaphore_create+0x108>
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 ) )
45a8: e3550000 cmp r5, #0 ; 0x0
45ac: 0a000002 beq 45bc <rtems_semaphore_create+0x50>
45b0: e3560001 cmp r6, #1 ; 0x1
45b4: 83a0000a movhi r0, #10 ; 0xa
45b8: 8a00002b bhi 466c <rtems_semaphore_create+0x100>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
45bc: e59f218c ldr r2, [pc, #396] ; 4750 <rtems_semaphore_create+0x1e4>
45c0: e5923000 ldr r3, [r2]
45c4: e2833001 add r3, r3, #1 ; 0x1
45c8: e5823000 str r3, [r2]
* 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 );
45cc: e59f9180 ldr r9, [pc, #384] ; 4754 <rtems_semaphore_create+0x1e8>
45d0: e1a00009 mov r0, r9
45d4: eb000537 bl 5ab8 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_semaphore = _Semaphore_Allocate();
if ( !the_semaphore ) {
45d8: e2507000 subs r7, r0, #0 ; 0x0
45dc: 0a000048 beq 4704 <rtems_semaphore_create+0x198>
* If it is not a counting semaphore, then it is either a
* simple binary semaphore or a more powerful mutex style binary
* semaphore.
*/
if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) {
45e0: e3550000 cmp r5, #0 ; 0x0
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_semaphore->attribute_set = attribute_set;
45e4: e5874010 str r4, [r7, #16]
* If it is not a counting semaphore, then it is either a
* simple binary semaphore or a more powerful mutex style binary
* semaphore.
*/
if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) {
45e8: 0a00002e beq 46a8 <rtems_semaphore_create+0x13c>
CORE_mutex_Status mutex_status;
if ( _Attributes_Is_inherit_priority( attribute_set ) )
45ec: e3140040 tst r4, #64 ; 0x40
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
45f0: 13a03002 movne r3, #2 ; 0x2
45f4: 158d3008 strne r3, [sp, #8]
*/
if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) {
CORE_mutex_Status mutex_status;
if ( _Attributes_Is_inherit_priority( attribute_set ) )
45f8: 1a000007 bne 461c <rtems_semaphore_create+0xb0>
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
else if ( _Attributes_Is_priority_ceiling( attribute_set ) )
45fc: e3140080 tst r4, #128 ; 0x80
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
4600: 13a03003 movne r3, #3 ; 0x3
4604: 158d3008 strne r3, [sp, #8]
if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) {
CORE_mutex_Status mutex_status;
if ( _Attributes_Is_inherit_priority( attribute_set ) )
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
else if ( _Attributes_Is_priority_ceiling( attribute_set ) )
4608: 1a000003 bne 461c <rtems_semaphore_create+0xb0>
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
else if ( _Attributes_Is_priority( attribute_set ) )
460c: e2143004 ands r3, r4, #4 ; 0x4
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY;
4610: 13a03001 movne r3, #1 ; 0x1
4614: 158d3008 strne r3, [sp, #8]
else
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
4618: 058d3008 streq r3, [sp, #8]
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
461c: e3550010 cmp r5, #16 ; 0x10
case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT:
the_mutex_attributes.only_owner_release = TRUE;
break;
}
} else {
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS;
4620: 13a03002 movne r3, #2 ; 0x2
the_mutex_attributes.only_owner_release = FALSE;
4624: 13a02000 movne r2, #0 ; 0x0
case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT:
the_mutex_attributes.only_owner_release = TRUE;
break;
}
} else {
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS;
4628: 158d3000 strne r3, [sp]
the_mutex_attributes.only_owner_release = FALSE;
462c: 15cd2004 strbne r2, [sp, #4]
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY;
else
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
4630: 0a000036 beq 4710 <rtems_semaphore_create+0x1a4>
the_mutex_attributes.only_owner_release = FALSE;
}
the_mutex_attributes.priority_ceiling = priority_ceiling;
mutex_status = _CORE_mutex_Initialize(
4634: e3560001 cmp r6, #1 ; 0x1
4638: 13a02000 movne r2, #0 ; 0x0
463c: 03a02001 moveq r2, #1 ; 0x1
4640: e2870014 add r0, r7, #20 ; 0x14
4644: e1a0100d mov r1, sp
} else {
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS;
the_mutex_attributes.only_owner_release = FALSE;
}
the_mutex_attributes.priority_ceiling = priority_ceiling;
4648: e58d800c str r8, [sp, #12]
mutex_status = _CORE_mutex_Initialize(
464c: eb00032e bl 530c <_CORE_mutex_Initialize>
&the_semaphore->Core_control.mutex,
&the_mutex_attributes,
(count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED
);
if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) {
4650: e3500006 cmp r0, #6 ; 0x6
4654: 1a000020 bne 46dc <rtems_semaphore_create+0x170>
*/
RTEMS_INLINE_ROUTINE void _Semaphore_Free (
Semaphore_Control *the_semaphore
)
{
_Objects_Free( &_Semaphore_Information, &the_semaphore->Object );
4658: e59f00f4 ldr r0, [pc, #244] ; 4754 <rtems_semaphore_create+0x1e8><== NOT EXECUTED
465c: e1a01007 mov r1, r7 <== NOT EXECUTED
4660: eb000601 bl 5e6c <_Objects_Free> <== NOT EXECUTED
_Semaphore_Free( the_semaphore );
_Thread_Enable_dispatch();
4664: eb00089f bl 68e8 <_Thread_Enable_dispatch> <== NOT EXECUTED
4668: e3a00013 mov r0, #19 ; 0x13 <== NOT EXECUTED
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
466c: e28dd018 add sp, sp, #24 ; 0x18
4670: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
*/
RTEMS_INLINE_ROUTINE bool _Attributes_Is_binary_semaphore(
rtems_attribute attribute_set
)
{
return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_BINARY_SEMAPHORE);
4674: e2025030 and r5, r2, #48 ; 0x30
#endif
if ( _Attributes_Is_inherit_priority( attribute_set ) ||
_Attributes_Is_priority_ceiling( attribute_set ) ) {
if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) ||
4678: e3550010 cmp r5, #16 ; 0x10
467c: 0a000003 beq 4690 <rtems_semaphore_create+0x124>
4680: e3550020 cmp r5, #32 ; 0x20
4684: 0a000001 beq 4690 <rtems_semaphore_create+0x124>
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
4688: e3a0000b mov r0, #11 ; 0xb
468c: eafffff6 b 466c <rtems_semaphore_create+0x100>
#endif
if ( _Attributes_Is_inherit_priority( attribute_set ) ||
_Attributes_Is_priority_ceiling( attribute_set ) ) {
if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) ||
4690: e3140004 tst r4, #4 ; 0x4
4694: 0afffffb beq 4688 <rtems_semaphore_create+0x11c>
_Attributes_Is_priority( attribute_set ) ) )
return RTEMS_NOT_DEFINED;
}
if ( _Attributes_Is_inherit_priority( attribute_set ) &&
4698: e35300c0 cmp r3, #192 ; 0xc0
469c: 1affffc1 bne 45a8 <rtems_semaphore_create+0x3c>
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
46a0: e3a0000b mov r0, #11 ; 0xb
46a4: eafffff0 b 466c <rtems_semaphore_create+0x100>
_Semaphore_Free( the_semaphore );
_Thread_Enable_dispatch();
return RTEMS_INVALID_PRIORITY;
}
} else {
if ( _Attributes_Is_priority( attribute_set ) )
46a8: e3140004 tst r4, #4 ; 0x4
the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY;
46ac: 13a03001 movne r3, #1 ; 0x1
/*
* The following are just to make Purify happy.
*/
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
46b0: e3a0c000 mov ip, #0 ; 0x0
_Thread_Enable_dispatch();
return RTEMS_INVALID_PRIORITY;
}
} else {
if ( _Attributes_Is_priority( attribute_set ) )
the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY;
46b4: 158d3014 strne r3, [sp, #20]
*/
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM;
_CORE_semaphore_Initialize(
46b8: e1a02006 mov r2, r6
/*
* This effectively disables limit checking.
*/
the_semaphore_attributes.maximum_count = 0xFFFFFFFF;
46bc: e3e03000 mvn r3, #0 ; 0x0
*/
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM;
_CORE_semaphore_Initialize(
46c0: e2870014 add r0, r7, #20 ; 0x14
46c4: e28d1010 add r1, sp, #16 ; 0x10
}
} else {
if ( _Attributes_Is_priority( attribute_set ) )
the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY;
else
the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO;
46c8: 058d5014 streq r5, [sp, #20]
/*
* This effectively disables limit checking.
*/
the_semaphore_attributes.maximum_count = 0xFFFFFFFF;
46cc: e58d3010 str r3, [sp, #16]
/*
* The following are just to make Purify happy.
*/
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM;
46d0: e58dc00c str ip, [sp, #12]
/*
* The following are just to make Purify happy.
*/
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
46d4: e58dc000 str ip, [sp]
the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM;
_CORE_semaphore_Initialize(
46d8: eb0003df bl 565c <_CORE_semaphore_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
46dc: e5971008 ldr r1, [r7, #8]
46e0: e599201c ldr r2, [r9, #28]
46e4: e1a03801 lsl r3, r1, #16
46e8: e7827723 str r7, [r2, r3, lsr #14]
&_Semaphore_Information,
&the_semaphore->Object,
(Objects_Name) name
);
*id = the_semaphore->Object.id;
46ec: e59d3038 ldr r3, [sp, #56]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
46f0: e587a00c str sl, [r7, #12]
46f4: e5831000 str r1, [r3]
the_semaphore->Object.id,
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
46f8: eb00087a bl 68e8 <_Thread_Enable_dispatch>
46fc: e3a00000 mov r0, #0 ; 0x0
4700: eaffffd9 b 466c <rtems_semaphore_create+0x100>
_Thread_Disable_dispatch(); /* prevents deletion */
the_semaphore = _Semaphore_Allocate();
if ( !the_semaphore ) {
_Thread_Enable_dispatch();
4704: eb000877 bl 68e8 <_Thread_Enable_dispatch>
4708: e3a00005 mov r0, #5 ; 0x5
470c: eaffffd6 b 466c <rtems_semaphore_create+0x100>
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
switch ( the_mutex_attributes.discipline ) {
4710: e59d2008 ldr r2, [sp, #8]
else
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
4714: e3a03000 mov r3, #0 ; 0x0
4718: e58d3000 str r3, [sp]
switch ( the_mutex_attributes.discipline ) {
471c: e3520003 cmp r2, #3 ; 0x3
4720: 979ff102 ldrls pc, [pc, r2, lsl #2]
4724: eaffffc2 b 4634 <rtems_semaphore_create+0xc8> <== NOT EXECUTED
4728: 00004744 .word 0x00004744 <== NOT EXECUTED
472c: 00004744 .word 0x00004744 <== NOT EXECUTED
4730: 00004738 .word 0x00004738 <== NOT EXECUTED
4734: 00004738 .word 0x00004738 <== NOT EXECUTED
case CORE_MUTEX_DISCIPLINES_PRIORITY:
the_mutex_attributes.only_owner_release = FALSE;
break;
case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING:
case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT:
the_mutex_attributes.only_owner_release = TRUE;
4738: e3a03001 mov r3, #1 ; 0x1
473c: e5cd3004 strb r3, [sp, #4]
4740: eaffffbb b 4634 <rtems_semaphore_create+0xc8>
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
switch ( the_mutex_attributes.discipline ) {
case CORE_MUTEX_DISCIPLINES_FIFO:
case CORE_MUTEX_DISCIPLINES_PRIORITY:
the_mutex_attributes.only_owner_release = FALSE;
4744: e3a03000 mov r3, #0 ; 0x0
4748: e5cd3004 strb r3, [sp, #4]
474c: eaffffb8 b 4634 <rtems_semaphore_create+0xc8>
000118bc <rtems_semaphore_flush>:
#endif
rtems_status_code rtems_semaphore_flush(
rtems_id id
)
{
118bc: e52de004 push {lr} ; (str lr, [sp, #-4]!)
118c0: e24dd004 sub sp, sp, #4 ; 0x4
118c4: e1a01000 mov r1, r0
RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Semaphore_Control *)
118c8: e1a0200d mov r2, sp
118cc: e59f004c ldr r0, [pc, #76] ; 11920 <rtems_semaphore_flush+0x64>
118d0: eb000e12 bl 15120 <_Objects_Get>
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
118d4: e59d1000 ldr r1, [sp]
118d8: e3510000 cmp r1, #0 ; 0x0
118dc: 13a00004 movne r0, #4 ; 0x4
118e0: 1a000008 bne 11908 <rtems_semaphore_flush+0x4c>
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
118e4: e5903010 ldr r3, [r0, #16]
118e8: e2133030 ands r3, r3, #48 ; 0x30
118ec: 1a000007 bne 11910 <rtems_semaphore_flush+0x54>
&the_semaphore->Core_control.mutex,
SEND_OBJECT_WAS_DELETED,
CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT
);
} else {
_CORE_semaphore_Flush(
118f0: e2800014 add r0, r0, #20 ; 0x14 <== NOT EXECUTED
118f4: e1a01003 mov r1, r3 <== NOT EXECUTED
118f8: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED
118fc: eb000963 bl 13e90 <_CORE_semaphore_Flush> <== NOT EXECUTED
&the_semaphore->Core_control.semaphore,
SEND_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT
);
}
_Thread_Enable_dispatch();
11900: eb00104b bl 15a34 <_Thread_Enable_dispatch>
11904: e3a00000 mov r0, #0 ; 0x0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11908: e28dd004 add sp, sp, #4 ; 0x4
1190c: e8bd8000 pop {pc}
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
_CORE_mutex_Flush(
11910: e2800014 add r0, r0, #20 ; 0x14
11914: e3a02001 mov r2, #1 ; 0x1
11918: eb000888 bl 13b40 <_CORE_mutex_Flush>
1191c: eafffff7 b 11900 <rtems_semaphore_flush+0x44>
000047fc <rtems_semaphore_obtain>:
rtems_status_code rtems_semaphore_obtain(
rtems_id id,
rtems_option option_set,
rtems_interval timeout
)
{
47fc: e92d40f0 push {r4, r5, r6, r7, lr}
4800: e1a04000 mov r4, r0
4804: e24dd00c sub sp, sp, #12 ; 0xc
Objects_Id id,
Objects_Locations *location,
ISR_Level *level
)
{
return (Semaphore_Control *)
4808: e28d3004 add r3, sp, #4 ; 0x4
480c: e1a05001 mov r5, r1
4810: e1a06002 mov r6, r2
4814: e1a01004 mov r1, r4
4818: e59f00e8 ldr r0, [pc, #232] ; 4908 <rtems_semaphore_obtain+0x10c>
481c: e28d2008 add r2, sp, #8 ; 0x8
4820: eb0005cf bl 5f64 <_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 ) {
4824: e59d3008 ldr r3, [sp, #8]
4828: e3530000 cmp r3, #0 ; 0x0
482c: e1a01000 mov r1, r0
4830: 13a00004 movne r0, #4 ; 0x4
4834: 1a00000e bne 4874 <rtems_semaphore_obtain+0x78>
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
4838: e5913010 ldr r3, [r1, #16]
483c: e2133030 ands r3, r3, #48 ; 0x30
4840: 0a00000d beq 487c <rtems_semaphore_obtain+0x80>
_CORE_mutex_Seize(
4844: e59dc004 ldr ip, [sp, #4]
4848: e2252001 eor r2, r5, #1 ; 0x1
484c: e2810014 add r0, r1, #20 ; 0x14
4850: e2022001 and r2, r2, #1 ; 0x1
4854: e1a03006 mov r3, r6
4858: e1a01004 mov r1, r4
485c: e58dc000 str ip, [sp]
4860: eb0002f2 bl 5430 <_CORE_mutex_Seize>
id,
((_Options_Is_no_wait( option_set )) ? FALSE : TRUE),
timeout,
level
);
return _Semaphore_Translate_core_mutex_return_code(
4864: e59f30a0 ldr r3, [pc, #160] ; 490c <rtems_semaphore_obtain+0x110>
4868: e5932000 ldr r2, [r3]
486c: e5920034 ldr r0, [r2, #52]
4870: eb000049 bl 499c <_Semaphore_Translate_core_mutex_return_code>
break;
}
return RTEMS_INVALID_ID;
}
4874: e28dd00c add sp, sp, #12 ; 0xc
4878: e8bd80f0 pop {r4, r5, r6, r7, pc}
Thread_Control *executing;
ISR_Level level = *level_p;
/* disabled when you get here */
executing = _Thread_Executing;
487c: e59f7088 ldr r7, [pc, #136] ; 490c <rtems_semaphore_obtain+0x110><== NOT EXECUTED
4880: e597c000 ldr ip, [r7] <== NOT EXECUTED
Watchdog_Interval timeout,
ISR_Level *level_p
)
{
Thread_Control *executing;
ISR_Level level = *level_p;
4884: e59de004 ldr lr, [sp, #4] <== NOT EXECUTED
/* disabled when you get here */
executing = _Thread_Executing;
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
4888: e58c3034 str r3, [ip, #52] <== NOT EXECUTED
if ( the_semaphore->count != 0 ) {
488c: e591305c ldr r3, [r1, #92] <== NOT EXECUTED
4890: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
4894: 1a000008 bne 48bc <rtems_semaphore_obtain+0xc0> <== NOT EXECUTED
the_semaphore->count -= 1;
_ISR_Enable( level );
return;
}
if ( !wait ) {
4898: e3150001 tst r5, #1 ; 0x1 <== NOT EXECUTED
489c: 0a00000a beq 48cc <rtems_semaphore_obtain+0xd0> <== NOT EXECUTED
_ISR_Enable( level );
48a0: e129f00e msr CPSR_fc, lr <== NOT EXECUTED
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT;
48a4: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED
48a8: e58c3034 str r3, [ip, #52] <== NOT EXECUTED
id,
((_Options_Is_no_wait( option_set )) ? FALSE : TRUE),
timeout,
&level
);
return _Semaphore_Translate_core_semaphore_return_code(
48ac: e5973000 ldr r3, [r7] <== NOT EXECUTED
48b0: e5930034 ldr r0, [r3, #52] <== NOT EXECUTED
48b4: eb00003c bl 49ac <_Semaphore_Translate_core_semaphore_return_code><== NOT EXECUTED
48b8: eaffffed b 4874 <rtems_semaphore_obtain+0x78> <== NOT EXECUTED
/* disabled when you get here */
executing = _Thread_Executing;
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
if ( the_semaphore->count != 0 ) {
the_semaphore->count -= 1;
48bc: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED
48c0: e581305c str r3, [r1, #92] <== NOT EXECUTED
_ISR_Enable( level );
48c4: e129f00e msr CPSR_fc, lr <== NOT EXECUTED
48c8: eafffff7 b 48ac <rtems_semaphore_obtain+0xb0> <== NOT EXECUTED
48cc: e59f203c ldr r2, [pc, #60] ; 4910 <rtems_semaphore_obtain+0x114><== NOT EXECUTED
48d0: e5923000 ldr r3, [r2] <== NOT EXECUTED
48d4: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED
48d8: e5823000 str r3, [r2] <== NOT EXECUTED
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;
48dc: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED
return;
}
_Thread_Disable_dispatch();
_Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue );
executing->Wait.queue = &the_semaphore->Wait_queue;
48e0: e2810014 add r0, r1, #20 ; 0x14 <== NOT EXECUTED
48e4: e5813044 str r3, [r1, #68] <== NOT EXECUTED
executing->Wait.id = id;
48e8: e58c4020 str r4, [ip, #32] <== NOT EXECUTED
return;
}
_Thread_Disable_dispatch();
_Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue );
executing->Wait.queue = &the_semaphore->Wait_queue;
48ec: e58c0044 str r0, [ip, #68] <== NOT EXECUTED
executing->Wait.id = id;
_ISR_Enable( level );
48f0: e129f00e msr CPSR_fc, lr <== NOT EXECUTED
_Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout );
48f4: e59f2018 ldr r2, [pc, #24] ; 4914 <rtems_semaphore_obtain+0x118><== NOT EXECUTED
48f8: e1a01006 mov r1, r6 <== NOT EXECUTED
48fc: eb000941 bl 6e08 <_Thread_queue_Enqueue_with_handler> <== NOT EXECUTED
_Thread_Enable_dispatch();
4900: eb0007f8 bl 68e8 <_Thread_Enable_dispatch> <== NOT EXECUTED
4904: eaffffe8 b 48ac <rtems_semaphore_obtain+0xb0> <== NOT EXECUTED
00014910 <rtems_shutdown_executive>:
*/
void rtems_shutdown_executive(
uint32_t result
)
{
14910: e52de004 push {lr} ; (str lr, [sp, #-4]!)
if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) {
14914: e59f2028 ldr r2, [pc, #40] ; 14944 <rtems_shutdown_executive+0x34>
14918: e5923000 ldr r3, [r2]
1491c: e3530004 cmp r3, #4 ; 0x4
*/
void rtems_shutdown_executive(
uint32_t result
)
{
14920: e24dd030 sub sp, sp, #48 ; 0x30
if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) {
14924: 0a000004 beq 1493c <rtems_shutdown_executive+0x2c>
14928: e3a03004 mov r3, #4 ; 0x4
Context_Control *context_p = &context_area;
if ( _System_state_Is_up(_System_state_Get ()) )
context_p = &_Thread_Executing->Registers;
_Context_Switch( context_p, &_Thread_BSP_context );
1492c: e1a0000d mov r0, sp
14930: e59f1010 ldr r1, [pc, #16] ; 14948 <rtems_shutdown_executive+0x38>
14934: e5823000 str r3, [r2]
14938: ebffcd62 bl 7ec8 <_CPU_Context_switch>
_System_state_Set( SYSTEM_STATE_SHUTDOWN );
_Thread_Stop_multitasking();
}
}
1493c: e28dd030 add sp, sp, #48 ; 0x30 <== NOT EXECUTED
14940: e8bd8000 pop {pc} <== NOT EXECUTED
00001d34 <rtems_stack_checker_is_blown>:
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
1d34: e1a0c00d mov ip, sp <== NOT EXECUTED
1d38: e92dd830 push {r4, r5, fp, ip, lr, pc} <== NOT EXECUTED
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
1d3c: e59f407c ldr r4, [pc, #124] ; 1dc0 <rtems_stack_checker_is_blown+0x8c><== NOT EXECUTED
1d40: e5943000 ldr r3, [r4] <== NOT EXECUTED
)
{
void *sp = __builtin_frame_address(0);
#if defined(__GNUC__)
if ( sp < the_stack->area ) {
1d44: e59300c8 ldr r0, [r3, #200] <== NOT EXECUTED
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
1d48: e24cb004 sub fp, ip, #4 ; 0x4 <== NOT EXECUTED
)
{
void *sp = __builtin_frame_address(0);
#if defined(__GNUC__)
if ( sp < the_stack->area ) {
1d4c: e15b0000 cmp fp, r0 <== NOT EXECUTED
1d50: 33a05000 movcc r5, #0 ; 0x0 <== NOT EXECUTED
1d54: 3a000004 bcc 1d6c <rtems_stack_checker_is_blown+0x38> <== NOT EXECUTED
1d58: e59330c4 ldr r3, [r3, #196] <== NOT EXECUTED
1d5c: e0803003 add r3, r0, r3 <== NOT EXECUTED
1d60: e15b0003 cmp fp, r3 <== NOT EXECUTED
1d64: 83a05000 movhi r5, #0 ; 0x0 <== NOT EXECUTED
1d68: 93a05001 movls r5, #1 ; 0x1 <== NOT EXECUTED
/*
* The stack checker must be initialized before the pattern is there
* to check.
*/
if ( Stack_check_Initialized ) {
1d6c: e59f3050 ldr r3, [pc, #80] ; 1dc4 <rtems_stack_checker_is_blown+0x90><== NOT EXECUTED
1d70: e5932000 ldr r2, [r3] <== NOT EXECUTED
1d74: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED
1d78: 03a01001 moveq r1, #1 ; 0x1 <== NOT EXECUTED
1d7c: 1a000008 bne 1da4 <rtems_stack_checker_is_blown+0x70> <== NOT EXECUTED
}
/*
* The Stack Pointer and the Pattern Area are OK so return false.
*/
if ( sp_ok && pattern_ok )
1d80: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED
1d84: 0a000002 beq 1d94 <rtems_stack_checker_is_blown+0x60> <== NOT EXECUTED
1d88: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED
1d8c: 13a00000 movne r0, #0 ; 0x0 <== NOT EXECUTED
1d90: 189da830 ldmne sp, {r4, r5, fp, sp, pc} <== NOT EXECUTED
return false;
/*
* Let's report as much as we can.
*/
Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
1d94: e5940000 ldr r0, [r4] <== NOT EXECUTED
1d98: ebffffc9 bl 1cc4 <Stack_check_report_blown_task> <== NOT EXECUTED
1d9c: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED
return true;
}
1da0: e89da830 ldm sp, {r4, r5, fp, sp, pc} <== NOT EXECUTED
/*
* The stack checker must be initialized before the pattern is there
* to check.
*/
if ( Stack_check_Initialized ) {
pattern_ok = (!memcmp(
1da4: e59f101c ldr r1, [pc, #28] ; 1dc8 <rtems_stack_checker_is_blown+0x94><== NOT EXECUTED
1da8: e2800008 add r0, r0, #8 ; 0x8 <== NOT EXECUTED
1dac: e3a02010 mov r2, #16 ; 0x10 <== NOT EXECUTED
1db0: eb002fc6 bl dcd0 <memcmp> <== NOT EXECUTED
1db4: e2701001 rsbs r1, r0, #1 ; 0x1 <== NOT EXECUTED
1db8: 33a01000 movcc r1, #0 ; 0x0 <== NOT EXECUTED
1dbc: eaffffef b 1d80 <rtems_stack_checker_is_blown+0x4c> <== NOT EXECUTED
00001cb4 <rtems_stack_checker_report_usage>:
void rtems_stack_checker_report_usage( void )
{
rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin );
1cb4: e59f1004 ldr r1, [pc, #4] ; 1cc0 <rtems_stack_checker_report_usage+0xc><== NOT EXECUTED
1cb8: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
1cbc: eaffffe1 b 1c48 <rtems_stack_checker_report_usage_with_plugin><== NOT EXECUTED
00001c48 <rtems_stack_checker_report_usage_with_plugin>:
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
1c48: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
print_context = context;
1c4c: e59f704c ldr r7, [pc, #76] ; 1ca0 <rtems_stack_checker_report_usage_with_plugin+0x58><== NOT EXECUTED
print_handler = print;
1c50: e59f604c ldr r6, [pc, #76] ; 1ca4 <rtems_stack_checker_report_usage_with_plugin+0x5c><== NOT EXECUTED
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
1c54: e1a04001 mov r4, r1 <== NOT EXECUTED
1c58: e1a05000 mov r5, r0 <== NOT EXECUTED
print_context = context;
print_handler = print;
1c5c: e5861000 str r1, [r6] <== NOT EXECUTED
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
print_context = context;
1c60: e5870000 str r0, [r7] <== NOT EXECUTED
print_handler = print;
(*print)( context, "Stack usage by thread\n");
1c64: e59f103c ldr r1, [pc, #60] ; 1ca8 <rtems_stack_checker_report_usage_with_plugin+0x60><== NOT EXECUTED
1c68: e1a0e00f mov lr, pc <== NOT EXECUTED
1c6c: e12fff14 bx r4 <== NOT EXECUTED
(*print)( context,
1c70: e59f1034 ldr r1, [pc, #52] ; 1cac <rtems_stack_checker_report_usage_with_plugin+0x64><== NOT EXECUTED
1c74: e1a00005 mov r0, r5 <== NOT EXECUTED
1c78: e1a0e00f mov lr, pc <== NOT EXECUTED
1c7c: e12fff14 bx r4 <== 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 );
1c80: e59f0028 ldr r0, [pc, #40] ; 1cb0 <rtems_stack_checker_report_usage_with_plugin+0x68><== NOT EXECUTED
1c84: eb001427 bl 6d28 <rtems_iterate_over_all_threads> <== NOT EXECUTED
/* dump interrupt stack info if any */
Stack_check_Dump_threads_usage((Thread_Control *) -1);
1c88: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
1c8c: ebffff93 bl 1ae0 <Stack_check_Dump_threads_usage> <== NOT EXECUTED
print_context = NULL;
1c90: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED
print_handler = NULL;
1c94: e5863000 str r3, [r6] <== NOT EXECUTED
rtems_iterate_over_all_threads( Stack_check_Dump_threads_usage );
/* dump interrupt stack info if any */
Stack_check_Dump_threads_usage((Thread_Control *) -1);
print_context = NULL;
1c98: e5873000 str r3, [r7] <== NOT EXECUTED
print_handler = NULL;
}
1c9c: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
00001dcc <rtems_stack_checker_switch_extension>:
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running,
Thread_Control *heir
)
{
1dcc: e1a0c00d mov ip, sp
Stack_Control *the_stack = &running->Start.Initial_stack;
void *pattern;
bool sp_ok;
bool pattern_ok = true;
pattern = (void *) Stack_check_Get_pattern_area(the_stack)->pattern;
1dd0: e59020c8 ldr r2, [r0, #200]
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running,
Thread_Control *heir
)
{
1dd4: e92dd810 push {r4, fp, ip, lr, pc}
1dd8: e24cb004 sub fp, ip, #4 ; 0x4
)
{
void *sp = __builtin_frame_address(0);
#if defined(__GNUC__)
if ( sp < the_stack->area ) {
1ddc: e15b0002 cmp fp, r2
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running,
Thread_Control *heir
)
{
1de0: e1a04000 mov r4, r0
Stack_Control *the_stack = &running->Start.Initial_stack;
void *pattern;
bool sp_ok;
bool pattern_ok = true;
pattern = (void *) Stack_check_Get_pattern_area(the_stack)->pattern;
1de4: e2820008 add r0, r2, #8 ; 0x8
)
{
void *sp = __builtin_frame_address(0);
#if defined(__GNUC__)
if ( sp < the_stack->area ) {
1de8: 3a000003 bcc 1dfc <rtems_stack_checker_switch_extension+0x30>
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
1dec: e59430c4 ldr r3, [r4, #196]
1df0: e0823003 add r3, r2, r3
1df4: e15b0003 cmp fp, r3
1df8: 9a000007 bls 1e1c <rtems_stack_checker_switch_extension+0x50>
/*
* 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,
1dfc: e59f1034 ldr r1, [pc, #52] ; 1e38 <rtems_stack_checker_switch_extension+0x6c><== NOT EXECUTED
1e00: e3a02010 mov r2, #16 ; 0x10 <== NOT EXECUTED
1e04: eb002fb1 bl dcd0 <memcmp> <== NOT EXECUTED
1e08: e2701001 rsbs r1, r0, #1 ; 0x1 <== NOT EXECUTED
1e0c: 33a01000 movcc r1, #0 ; 0x0 <== NOT EXECUTED
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
Stack_check_report_blown_task( running, pattern_ok );
1e10: e1a00004 mov r0, r4
}
}
1e14: e89d6810 ldm sp, {r4, fp, sp, lr}
pattern_ok = (!memcmp( pattern,
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
Stack_check_report_blown_task( running, pattern_ok );
1e18: eaffffa9 b 1cc4 <Stack_check_report_blown_task>
/*
* 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,
1e1c: e59f1014 ldr r1, [pc, #20] ; 1e38 <rtems_stack_checker_switch_extension+0x6c>
1e20: e3a02010 mov r2, #16 ; 0x10
1e24: eb002fa9 bl dcd0 <memcmp>
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
1e28: e3500000 cmp r0, #0 ; 0x0
1e2c: 13a01000 movne r1, #0 ; 0x0
1e30: 1afffff6 bne 1e10 <rtems_stack_checker_switch_extension+0x44>
1e34: e89da810 ldm sp, {r4, fp, sp, pc}
00002424 <rtems_status_text>:
const char *
rtems_status_text(
rtems_status_code status
)
{
2424: e1a01000 mov r1, r0 <== NOT EXECUTED
return rtems_assoc_name_by_local(rtems_status_assoc, status);
2428: e59f0000 ldr r0, [pc, #0] ; 2430 <rtems_status_text+0xc> <== NOT EXECUTED
242c: ea002261 b adb8 <rtems_assoc_name_by_local> <== NOT EXECUTED
000049bc <rtems_task_create>:
size_t stack_size,
rtems_mode initial_modes,
rtems_attribute attribute_set,
Objects_Id *id
)
{
49bc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
49c0: e24dd01c sub sp, sp, #28 ; 0x1c
Priority_Control core_priority;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !id )
49c4: e59dc044 ldr ip, [sp, #68]
49c8: e35c0000 cmp ip, #0 ; 0x0
size_t stack_size,
rtems_mode initial_modes,
rtems_attribute attribute_set,
Objects_Id *id
)
{
49cc: e1a08000 mov r8, r0
49d0: e1a05001 mov r5, r1
49d4: e1a0a002 mov sl, r2
49d8: e1a06003 mov r6, r3
Priority_Control core_priority;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !id )
49dc: 03a00009 moveq r0, #9 ; 0x9
49e0: 0a000031 beq 4aac <rtems_task_create+0xf0>
return RTEMS_INVALID_ADDRESS;
if ( !rtems_is_name_valid( name ) )
49e4: e3580000 cmp r8, #0 ; 0x0
49e8: 03a00003 moveq r0, #3 ; 0x3
49ec: 0a00002e beq 4aac <rtems_task_create+0xf0>
/*
* Validate the RTEMS API priority and convert it to the core priority range.
*/
if ( !_Attributes_Is_system_task( the_attribute_set ) ) {
49f0: e59d3040 ldr r3, [sp, #64]
49f4: e3130902 tst r3, #32768 ; 0x8000
RTEMS_INLINE_ROUTINE rtems_attribute _Attributes_Clear (
rtems_attribute attribute_set,
rtems_attribute mask
)
{
return attribute_set & ~mask;
49f8: e3c34001 bic r4, r3, #1 ; 0x1
49fc: 1a000005 bne 4a18 <rtems_task_create+0x5c>
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
4a00: e3510000 cmp r1, #0 ; 0x0
4a04: 0a000032 beq 4ad4 <rtems_task_create+0x118>
4a08: e59f30dc ldr r3, [pc, #220] ; 4aec <rtems_task_create+0x130>
4a0c: e5d32000 ldrb r2, [r3]
4a10: e1510002 cmp r1, r2
4a14: 8a00002e bhi 4ad4 <rtems_task_create+0x118>
*/
/*
* Lock the allocator mutex for protection
*/
_RTEMS_Lock_allocator();
4a18: e59fb0d0 ldr fp, [pc, #208] ; 4af0 <rtems_task_create+0x134>
4a1c: e59b0000 ldr r0, [fp]
4a20: eb000205 bl 523c <_API_Mutex_Lock>
* This function allocates a task control block from
* the inactive chain of free task control blocks.
*/
RTEMS_INLINE_ROUTINE Thread_Control *_RTEMS_tasks_Allocate( void )
{
return (Thread_Control *) _Objects_Allocate( &_RTEMS_tasks_Information );
4a24: e59f00c8 ldr r0, [pc, #200] ; 4af4 <rtems_task_create+0x138>
4a28: eb000422 bl 5ab8 <_Objects_Allocate>
* the event of an error.
*/
the_thread = _RTEMS_tasks_Allocate();
if ( !the_thread ) {
4a2c: e2507000 subs r7, r0, #0 ; 0x0
4a30: 0a000029 beq 4adc <rtems_task_create+0x120>
/*
* Initialize the core thread for this task.
*/
status = _Thread_Initialize(
4a34: e1a0c426 lsr ip, r6, #8
4a38: e2049001 and r9, r4, #1 ; 0x1
4a3c: e22cc001 eor ip, ip, #1 ; 0x1
4a40: e1a0e4a6 lsr lr, r6, #9
4a44: e20cc001 and ip, ip, #1 ; 0x1
4a48: e20ee001 and lr, lr, #1 ; 0x1
4a4c: e1a0300a mov r3, sl
4a50: e20640c0 and r4, r6, #192 ; 0xc0
4a54: e59f0098 ldr r0, [pc, #152] ; 4af4 <rtems_task_create+0x138>
4a58: e1a01007 mov r1, r7
4a5c: e1a02009 mov r2, r9
4a60: e98d5020 stmib sp, {r5, ip, lr}
4a64: e58d4014 str r4, [sp, #20]
4a68: e58d8018 str r8, [sp, #24]
4a6c: e58d9000 str r9, [sp]
4a70: e58d9010 str r9, [sp, #16]
4a74: eb0007ce bl 69b4 <_Thread_Initialize>
NULL, /* no budget algorithm callout */
_Modes_Get_interrupt_level(initial_modes),
(Objects_Name) name
);
if ( !status ) {
4a78: e3500000 cmp r0, #0 ; 0x0
4a7c: 0a00000c beq 4ab4 <rtems_task_create+0xf8>
}
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true;
4a80: e1a03526 lsr r3, r6, #10
*id = the_thread->Object.id;
4a84: e5971008 ldr r1, [r7, #8]
}
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true;
4a88: e5972104 ldr r2, [r7, #260]
*id = the_thread->Object.id;
4a8c: e59dc044 ldr ip, [sp, #68]
}
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true;
4a90: e2233001 eor r3, r3, #1 ; 0x1
4a94: e2033001 and r3, r3, #1 ; 0x1
);
}
#endif
_RTEMS_Unlock_allocator();
4a98: e59b0000 ldr r0, [fp]
}
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true;
4a9c: e5c23008 strb r3, [r2, #8]
*id = the_thread->Object.id;
4aa0: e58c1000 str r1, [ip]
);
}
#endif
_RTEMS_Unlock_allocator();
4aa4: eb000200 bl 52ac <_API_Mutex_Unlock>
4aa8: e1a00009 mov r0, r9
return RTEMS_SUCCESSFUL;
}
4aac: e28dd01c add sp, sp, #28 ; 0x1c
4ab0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
*/
RTEMS_INLINE_ROUTINE void _RTEMS_tasks_Free (
Thread_Control *the_task
)
{
_Objects_Free(
4ab4: e5970008 ldr r0, [r7, #8] <== NOT EXECUTED
4ab8: eb000508 bl 5ee0 <_Objects_Get_information_id> <== NOT EXECUTED
4abc: e1a01007 mov r1, r7 <== NOT EXECUTED
4ac0: eb0004e9 bl 5e6c <_Objects_Free> <== NOT EXECUTED
#if defined(RTEMS_MULTIPROCESSING)
if ( is_global )
_Objects_MP_Free_global_object( the_global_object );
#endif
_RTEMS_tasks_Free( the_thread );
_RTEMS_Unlock_allocator();
4ac4: e59b0000 ldr r0, [fp] <== NOT EXECUTED
4ac8: eb0001f7 bl 52ac <_API_Mutex_Unlock> <== NOT EXECUTED
4acc: e3a0000d mov r0, #13 ; 0xd <== NOT EXECUTED
4ad0: eafffff5 b 4aac <rtems_task_create+0xf0> <== NOT EXECUTED
}
#endif
_RTEMS_Unlock_allocator();
return RTEMS_SUCCESSFUL;
4ad4: e3a00013 mov r0, #19 ; 0x13 <== NOT EXECUTED
4ad8: eafffff3 b 4aac <rtems_task_create+0xf0> <== NOT EXECUTED
*/
the_thread = _RTEMS_tasks_Allocate();
if ( !the_thread ) {
_RTEMS_Unlock_allocator();
4adc: e59b0000 ldr r0, [fp] <== NOT EXECUTED
4ae0: eb0001f1 bl 52ac <_API_Mutex_Unlock> <== NOT EXECUTED
4ae4: e3a00005 mov r0, #5 ; 0x5 <== NOT EXECUTED
4ae8: eaffffef b 4aac <rtems_task_create+0xf0> <== NOT EXECUTED
00004af8 <rtems_task_delete>:
*/
rtems_status_code rtems_task_delete(
Objects_Id id
)
{
4af8: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
register Thread_Control *the_thread;
Objects_Locations location;
Objects_Information *the_information;
_RTEMS_Lock_allocator();
4afc: e59f6070 ldr r6, [pc, #112] ; 4b74 <rtems_task_delete+0x7c><== NOT EXECUTED
*/
rtems_status_code rtems_task_delete(
Objects_Id id
)
{
4b00: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED
4b04: e1a04000 mov r4, r0 <== NOT EXECUTED
register Thread_Control *the_thread;
Objects_Locations location;
Objects_Information *the_information;
_RTEMS_Lock_allocator();
4b08: e5960000 ldr r0, [r6] <== NOT EXECUTED
4b0c: eb0001ca bl 523c <_API_Mutex_Lock> <== NOT EXECUTED
the_thread = _Thread_Get( id, &location );
4b10: e1a00004 mov r0, r4 <== NOT EXECUTED
4b14: e1a0100d mov r1, sp <== NOT EXECUTED
4b18: eb00077b bl 690c <_Thread_Get> <== NOT EXECUTED
switch ( location ) {
4b1c: e59d5000 ldr r5, [sp] <== NOT EXECUTED
4b20: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED
Objects_Locations location;
Objects_Information *the_information;
_RTEMS_Lock_allocator();
the_thread = _Thread_Get( id, &location );
4b24: e1a04000 mov r4, r0 <== NOT EXECUTED
switch ( location ) {
4b28: 1a00000d bne 4b64 <rtems_task_delete+0x6c> <== NOT EXECUTED
case OBJECTS_LOCAL:
the_information = _Objects_Get_information_id( the_thread->Object.id );
4b2c: e5900008 ldr r0, [r0, #8] <== NOT EXECUTED
4b30: eb0004ea bl 5ee0 <_Objects_Get_information_id> <== NOT EXECUTED
0 /* Not used */
);
}
#endif
_Thread_Close( the_information, the_thread );
4b34: e1a01004 mov r1, r4 <== NOT EXECUTED
4b38: eb00069d bl 65b4 <_Thread_Close> <== NOT EXECUTED
4b3c: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED
4b40: eb0004e6 bl 5ee0 <_Objects_Get_information_id> <== NOT EXECUTED
4b44: e1a01004 mov r1, r4 <== NOT EXECUTED
4b48: eb0004c7 bl 5e6c <_Objects_Free> <== NOT EXECUTED
_RTEMS_tasks_Free( the_thread );
_RTEMS_Unlock_allocator();
4b4c: e5960000 ldr r0, [r6] <== NOT EXECUTED
4b50: eb0001d5 bl 52ac <_API_Mutex_Unlock> <== NOT EXECUTED
_Thread_Enable_dispatch();
4b54: eb000763 bl 68e8 <_Thread_Enable_dispatch> <== NOT EXECUTED
4b58: e1a00005 mov r0, r5 <== NOT EXECUTED
break;
}
_RTEMS_Unlock_allocator();
return RTEMS_INVALID_ID;
}
4b5c: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED
4b60: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
_RTEMS_Unlock_allocator();
4b64: e5960000 ldr r0, [r6] <== NOT EXECUTED
4b68: eb0001cf bl 52ac <_API_Mutex_Unlock> <== NOT EXECUTED
4b6c: e3a00004 mov r0, #4 ; 0x4 <== NOT EXECUTED
4b70: eafffff9 b 4b5c <rtems_task_delete+0x64> <== NOT EXECUTED
000021e0 <rtems_termios_bufsize>:
int cbufsize,
int raw_input,
int raw_output
)
{
rtems_termios_cbufsize = cbufsize;
21e0: e59f3018 ldr r3, [pc, #24] ; 2200 <rtems_termios_bufsize+0x20><== NOT EXECUTED
21e4: e5830000 str r0, [r3] <== NOT EXECUTED
rtems_termios_raw_input_size = raw_input;
21e8: e59f0014 ldr r0, [pc, #20] ; 2204 <rtems_termios_bufsize+0x24><== NOT EXECUTED
rtems_termios_raw_output_size = raw_output;
21ec: e59f3014 ldr r3, [pc, #20] ; 2208 <rtems_termios_bufsize+0x28><== NOT EXECUTED
int raw_input,
int raw_output
)
{
rtems_termios_cbufsize = cbufsize;
rtems_termios_raw_input_size = raw_input;
21f0: e5801000 str r1, [r0] <== NOT EXECUTED
rtems_termios_raw_output_size = raw_output;
21f4: e5832000 str r2, [r3] <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
21f8: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
21fc: e12fff1e bx lr <== NOT EXECUTED
00003800 <rtems_termios_close>:
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
3800: e92d4070 push {r4, r5, r6, lr}
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
rtems_status_code sc;
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
3804: e59f6188 ldr r6, [pc, #392] ; 3994 <rtems_termios_close+0x194>
rtems_status_code
rtems_termios_close (void *arg)
{
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
3808: e5903000 ldr r3, [r0]
rtems_status_code sc;
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
380c: e3a01000 mov r1, #0 ; 0x0
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
3810: 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 (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
3814: e1a02001 mov r2, r1
3818: e5960000 ldr r0, [r6]
rtems_status_code
rtems_termios_close (void *arg)
{
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
381c: e5934028 ldr r4, [r3, #40]
rtems_status_code sc;
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
3820: eb0003f5 bl 47fc <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
3824: e3500000 cmp r0, #0 ; 0x0
3828: 1a000046 bne 3948 <rtems_termios_close+0x148>
rtems_fatal_error_occurred (sc);
if (--tty->refcount == 0) {
382c: e5943008 ldr r3, [r4, #8]
3830: e2433001 sub r3, r3, #1 ; 0x1
3834: e3530000 cmp r3, #0 ; 0x0
3838: e5843008 str r3, [r4, #8]
383c: 1a000030 bne 3904 <rtems_termios_close+0x104>
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
3840: e59430cc ldr r3, [r4, #204]
3844: e59f214c ldr r2, [pc, #332] ; 3998 <rtems_termios_close+0x198>
3848: e1a03183 lsl r3, r3, #3
384c: e2833001 add r3, r3, #1 ; 0x1
3850: e7923103 ldr r3, [r2, r3, lsl #2]
3854: e3530000 cmp r3, #0 ; 0x0
3858: 0a00003b beq 394c <rtems_termios_close+0x14c>
/*
* call discipline-specific close
*/
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
385c: e1a00004 mov r0, r4 <== NOT EXECUTED
3860: e1a0e00f mov lr, pc <== NOT EXECUTED
3864: e12fff13 bx r3 <== NOT EXECUTED
* default: just flush output buffer
*/
drainOutput (tty);
}
if (tty->device.outputUsesInterrupts
3868: e59430b4 ldr r3, [r4, #180]
386c: e3530002 cmp r3, #2 ; 0x2
3870: 0a00002a beq 3920 <rtems_termios_close+0x120>
tty->txTaskId,
TERMIOS_TX_TERMINATE_EVENT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
if (tty->device.lastClose)
3874: e594309c ldr r3, [r4, #156]
3878: e3530000 cmp r3, #0 ; 0x0
(*tty->device.lastClose)(tty->major, tty->minor, arg);
387c: 11a02005 movne r2, r5
3880: 1284000c addne r0, r4, #12 ; 0xc
3884: 18900003 ldmne r0, {r0, r1}
3888: 11a0e00f movne lr, pc
388c: 112fff13 bxne r3
if (tty->forw == NULL) {
3890: e5941000 ldr r1, [r4]
3894: e3510000 cmp r1, #0 ; 0x0
if ( rtems_termios_ttyTail != NULL ) {
rtems_termios_ttyTail->forw = NULL;
}
}
else {
tty->forw->back = tty->back;
3898: 15943004 ldrne r3, [r4, #4]
389c: 15813004 strne r3, [r1, #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) {
38a0: 0a00002c beq 3958 <rtems_termios_close+0x158>
}
}
else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
38a4: e5942004 ldr r2, [r4, #4] <== NOT EXECUTED
38a8: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED
if ( rtems_termios_ttyHead != NULL ) {
rtems_termios_ttyHead->back = NULL;
}
}
else {
tty->back->forw = tty->forw;
38ac: 15821000 strne r1, [r2] <== NOT EXECUTED
}
}
else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
38b0: 0a000032 beq 3980 <rtems_termios_close+0x180> <== NOT EXECUTED
}
}
else {
tty->back->forw = tty->forw;
}
rtems_semaphore_delete (tty->isem);
38b4: e5940014 ldr r0, [r4, #20]
38b8: eb0003a6 bl 4758 <rtems_semaphore_delete>
rtems_semaphore_delete (tty->osem);
38bc: e5940018 ldr r0, [r4, #24]
38c0: eb0003a4 bl 4758 <rtems_semaphore_delete>
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
38c4: e594008c ldr r0, [r4, #140]
38c8: eb0003a2 bl 4758 <rtems_semaphore_delete>
if ((tty->device.pollRead == NULL) ||
38cc: e59430a0 ldr r3, [r4, #160]
38d0: e3530000 cmp r3, #0 ; 0x0
38d4: 0a00000e beq 3914 <rtems_termios_close+0x114>
38d8: e59430b4 ldr r3, [r4, #180]
38dc: e3530002 cmp r3, #2 ; 0x2
38e0: 0a00000b beq 3914 <rtems_termios_close+0x114>
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
rtems_semaphore_delete (tty->rawInBuf.Semaphore);
free (tty->rawInBuf.theBuf);
38e4: e5940058 ldr r0, [r4, #88]
38e8: eb0015ee bl 90a8 <free>
free (tty->rawOutBuf.theBuf);
38ec: e594007c ldr r0, [r4, #124]
38f0: eb0015ec bl 90a8 <free>
free (tty->cbuf);
38f4: e594001c ldr r0, [r4, #28]
38f8: eb0015ea bl 90a8 <free>
free (tty);
38fc: e1a00004 mov r0, r4
3900: eb0015e8 bl 90a8 <free>
}
rtems_semaphore_release (rtems_termios_ttyMutex);
3904: e5960000 ldr r0, [r6]
3908: eb000402 bl 4918 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
}
390c: e3a00000 mov r0, #0 ; 0x0
3910: e8bd8070 pop {r4, r5, r6, pc}
rtems_semaphore_delete (tty->isem);
rtems_semaphore_delete (tty->osem);
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
rtems_semaphore_delete (tty->rawInBuf.Semaphore);
3914: e5940068 ldr r0, [r4, #104] <== NOT EXECUTED
3918: eb00038e bl 4758 <rtems_semaphore_delete> <== NOT EXECUTED
391c: eafffff0 b 38e4 <rtems_termios_close+0xe4> <== NOT EXECUTED
if (tty->device.outputUsesInterrupts
== TERMIOS_TASK_DRIVEN) {
/*
* send "terminate" to I/O tasks
*/
sc = rtems_event_send(
3920: e59400c4 ldr r0, [r4, #196] <== NOT EXECUTED
3924: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED
3928: eb000275 bl 4304 <rtems_event_send> <== NOT EXECUTED
tty->rxTaskId,
TERMIOS_RX_TERMINATE_EVENT);
if (sc != RTEMS_SUCCESSFUL)
392c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
3930: 1a000004 bne 3948 <rtems_termios_close+0x148> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
sc = rtems_event_send(
3934: e59400c8 ldr r0, [r4, #200] <== NOT EXECUTED
3938: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED
393c: eb000270 bl 4304 <rtems_event_send> <== NOT EXECUTED
tty->txTaskId,
TERMIOS_TX_TERMINATE_EVENT);
if (sc != RTEMS_SUCCESSFUL)
3940: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
3944: 0affffca beq 3874 <rtems_termios_close+0x74> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
3948: eb000569 bl 4ef4 <rtems_fatal_error_occurred> <== NOT EXECUTED
}
else {
/*
* default: just flush output buffer
*/
drainOutput (tty);
394c: e1a00004 mov r0, r4
3950: ebfffd89 bl 2f7c <drainOutput>
3954: eaffffc3 b 3868 <rtems_termios_close+0x68>
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;
3958: e5942004 ldr r2, [r4, #4]
395c: e59f3038 ldr r3, [pc, #56] ; 399c <rtems_termios_close+0x19c>
if ( rtems_termios_ttyTail != NULL ) {
3960: e3520000 cmp r2, #0 ; 0x0
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;
3964: e5832000 str r2, [r3]
if ( rtems_termios_ttyTail != NULL ) {
rtems_termios_ttyTail->forw = NULL;
3968: 15821000 strne r1, [r2]
396c: 15941000 ldrne r1, [r4]
}
if (tty->device.lastClose)
(*tty->device.lastClose)(tty->major, tty->minor, arg);
if (tty->forw == NULL) {
rtems_termios_ttyTail = tty->back;
if ( rtems_termios_ttyTail != NULL ) {
3970: 1affffcb bne 38a4 <rtems_termios_close+0xa4>
}
else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
rtems_termios_ttyHead = tty->forw;
3974: e59f3024 ldr r3, [pc, #36] ; 39a0 <rtems_termios_close+0x1a0>
3978: e5832000 str r2, [r3]
397c: eaffffcc b 38b4 <rtems_termios_close+0xb4>
3980: e59f3018 ldr r3, [pc, #24] ; 39a0 <rtems_termios_close+0x1a0><== NOT EXECUTED
if ( rtems_termios_ttyHead != NULL ) {
3984: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED
}
else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
rtems_termios_ttyHead = tty->forw;
3988: e5831000 str r1, [r3] <== NOT EXECUTED
if ( rtems_termios_ttyHead != NULL ) {
rtems_termios_ttyHead->back = NULL;
398c: 15812004 strne r2, [r1, #4] <== NOT EXECUTED
3990: eaffffc7 b 38b4 <rtems_termios_close+0xb4> <== NOT EXECUTED
00002428 <rtems_termios_dequeue_characters>:
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
2428: e5903090 ldr r3, [r0, #144] <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
242c: e590c0b4 ldr ip, [r0, #180] <== NOT EXECUTED
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
2430: e0833001 add r3, r3, r1 <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
2434: e35c0002 cmp ip, #2 ; 0x2 <== NOT EXECUTED
* for each transmitted character.
* It returns number of characters left to transmit
*/
int
rtems_termios_dequeue_characters (void *ttyp, int len)
{
2438: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
243c: e5803090 str r3, [r0, #144] <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
2440: 0a00000b beq 2474 <rtems_termios_dequeue_characters+0x4c> <== NOT EXECUTED
TERMIOS_TX_START_EVENT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
return 0; /* nothing to output in IRQ... */
}
else if (tty->t_line == PPPDISC ) {
2444: e59030cc ldr r3, [r0, #204] <== NOT EXECUTED
2448: e3530005 cmp r3, #5 ; 0x5 <== NOT EXECUTED
244c: 1a000006 bne 246c <rtems_termios_dequeue_characters+0x44> <== NOT EXECUTED
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
2450: e59f3034 ldr r3, [pc, #52] ; 248c <rtems_termios_dequeue_characters+0x64><== NOT EXECUTED
2454: e59330b4 ldr r3, [r3, #180] <== NOT EXECUTED
2458: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_start(tty);
245c: 11a0e00f movne lr, pc <== NOT EXECUTED
2460: 112fff13 bxne r3 <== NOT EXECUTED
return 0; /* nothing to output in IRQ... */
}
else {
return rtems_termios_refill_transmitter(tty);
}
}
2464: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
2468: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
246c: 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... */
}
else {
return rtems_termios_refill_transmitter(tty);
2470: eaffff68 b 2218 <rtems_termios_refill_transmitter> <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
/*
* send wake up to transmitter task
*/
sc = rtems_event_send(tty->txTaskId,
2474: e59000c8 ldr r0, [r0, #200] <== NOT EXECUTED
2478: e1a0100c mov r1, ip <== NOT EXECUTED
247c: eb0007a0 bl 4304 <rtems_event_send> <== NOT EXECUTED
TERMIOS_TX_START_EVENT);
if (sc != RTEMS_SUCCESSFUL)
2480: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
2484: 0afffff6 beq 2464 <rtems_termios_dequeue_characters+0x3c> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
2488: eb000a99 bl 4ef4 <rtems_fatal_error_occurred> <== NOT EXECUTED
00002490 <rtems_termios_enqueue_raw_characters>:
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) {
2490: e59030cc ldr r3, [r0, #204] <== 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)
{
2494: e92d4ff0 push {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) {
2498: e1a03083 lsl r3, r3, #1 <== NOT EXECUTED
249c: e59f62f4 ldr r6, [pc, #756] ; 2798 <rtems_termios_enqueue_raw_characters+0x308><== NOT EXECUTED
24a0: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED
24a4: e7963203 ldr r3, [r6, r3, lsl #4] <== NOT EXECUTED
24a8: e3530000 cmp r3, #0 ; 0x0 <== 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)
{
24ac: e24dd00c sub sp, sp, #12 ; 0xc <== NOT EXECUTED
24b0: e1a05000 mov r5, r0 <== NOT EXECUTED
24b4: e1a08001 mov r8, r1 <== NOT EXECUTED
24b8: e1a07002 mov r7, r2 <== 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) {
24bc: 0a000020 beq 2544 <rtems_termios_enqueue_raw_characters+0xb4><== NOT EXECUTED
while (len--) {
24c0: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED
24c4: 0a00000c beq 24fc <rtems_termios_enqueue_raw_characters+0x6c><== NOT EXECUTED
24c8: e3a04000 mov r4, #0 ; 0x0 <== NOT EXECUTED
24cc: ea000003 b 24e0 <rtems_termios_enqueue_raw_characters+0x50><== NOT EXECUTED
24d0: e59530cc ldr r3, [r5, #204] <== NOT EXECUTED
24d4: e1a03083 lsl r3, r3, #1 <== NOT EXECUTED
24d8: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED
24dc: e7963203 ldr r3, [r6, r3, lsl #4] <== NOT EXECUTED
c = *buf++;
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
24e0: e7d80004 ldrb r0, [r8, r4] <== NOT EXECUTED
24e4: e1a01005 mov r1, r5 <== NOT EXECUTED
24e8: e2844001 add r4, r4, #1 ; 0x1 <== NOT EXECUTED
24ec: e1a0e00f mov lr, pc <== NOT EXECUTED
24f0: e12fff13 bx r3 <== 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--) {
24f4: e1540007 cmp r4, r7 <== NOT EXECUTED
24f8: 1afffff4 bne 24d0 <rtems_termios_enqueue_raw_characters+0x40><== NOT EXECUTED
}
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
24fc: e59540e4 ldr r4, [r5, #228] <== NOT EXECUTED
2500: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED
2504: 1a00000a bne 2534 <rtems_termios_enqueue_raw_characters+0xa4><== NOT EXECUTED
2508: e59530dc ldr r3, [r5, #220] <== NOT EXECUTED
250c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
2510: 0a000007 beq 2534 <rtems_termios_enqueue_raw_characters+0xa4><== NOT EXECUTED
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
2514: e2850030 add r0, r5, #48 ; 0x30 <== NOT EXECUTED
2518: e59510e0 ldr r1, [r5, #224] <== NOT EXECUTED
251c: e1a0e00f mov lr, pc <== NOT EXECUTED
2520: e12fff13 bx r3 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
2524: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED
2528: e58530e4 str r3, [r5, #228] <== NOT EXECUTED
252c: e1a09004 mov r9, r4 <== NOT EXECUTED
2530: ea000000 b 2538 <rtems_termios_enqueue_raw_characters+0xa8><== NOT EXECUTED
}
}
}
tty->rawInBufDropped += dropped;
rtems_semaphore_release (tty->rawInBuf.Semaphore);
return dropped;
2534: e3a09000 mov r9, #0 ; 0x0 <== NOT EXECUTED
}
2538: e1a00009 mov r0, r9 <== NOT EXECUTED
253c: e28dd00c add sp, sp, #12 ; 0xc <== NOT EXECUTED
2540: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== 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);
2544: e1a09003 mov r9, r3 <== 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,
2548: e280204a add r2, r0, #74 ; 0x4a <== 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);
254c: e2803030 add r3, r0, #48 ; 0x30 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
2550: e2577001 subs r7, r7, #1 ; 0x1 <== 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,
2554: e58d2000 str r2, [sp] <== 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);
2558: e58d3008 str r3, [sp, #8] <== NOT EXECUTED
255c: e1a0b009 mov fp, r9 <== NOT EXECUTED
2560: e1a0a009 mov sl, r9 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
2564: 3a000049 bcc 2690 <rtems_termios_enqueue_raw_characters+0x200><== NOT EXECUTED
c = *buf++;
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
2568: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED
256c: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED
}
return 0;
}
while (len--) {
c = *buf++;
2570: e7d8600a ldrb r6, [r8, sl] <== NOT EXECUTED
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
2574: 0a000008 beq 259c <rtems_termios_enqueue_raw_characters+0x10c><== NOT EXECUTED
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
2578: e5d5204a ldrb r2, [r5, #74] <== NOT EXECUTED
257c: e1520006 cmp r2, r6 <== NOT EXECUTED
2580: 0a000048 beq 26a8 <rtems_termios_enqueue_raw_characters+0x218><== NOT EXECUTED
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
}
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
2584: e5d53049 ldrb r3, [r5, #73] <== NOT EXECUTED
2588: e1530006 cmp r3, r6 <== NOT EXECUTED
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
258c: 059530b8 ldreq r3, [r5, #184] <== NOT EXECUTED
2590: 03c33010 biceq r3, r3, #16 ; 0x10 <== NOT EXECUTED
2594: 058530b8 streq r3, [r5, #184] <== NOT EXECUTED
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
}
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
2598: 0a00004a beq 26c8 <rtems_termios_enqueue_raw_characters+0x238><== NOT EXECUTED
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
flow_rcv = true;
}
}
if (flow_rcv) {
259c: e35b0000 cmp fp, #0 ; 0x0 <== NOT EXECUTED
25a0: 1a000048 bne 26c8 <rtems_termios_enqueue_raw_characters+0x238><== NOT EXECUTED
/* reenable interrupts */
rtems_interrupt_enable(level);
}
}
else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
25a4: e5950060 ldr r0, [r5, #96] <== NOT EXECUTED
25a8: e5951064 ldr r1, [r5, #100] <== NOT EXECUTED
25ac: e2800001 add r0, r0, #1 ; 0x1 <== NOT EXECUTED
25b0: eb004202 bl 12dc0 <__umodsi3> <== NOT EXECUTED
25b4: e1a04000 mov r4, r0 <== NOT EXECUTED
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
25b8: e10f2000 mrs r2, CPSR <== NOT EXECUTED
25bc: e38230c0 orr r3, r2, #192 ; 0xc0 <== NOT EXECUTED
25c0: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
25c4: e58d2004 str r2, [sp, #4] <== NOT EXECUTED
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
25c8: e595305c ldr r3, [r5, #92] <== NOT EXECUTED
25cc: e5950064 ldr r0, [r5, #100] <== NOT EXECUTED
25d0: e0630000 rsb r0, r3, r0 <== NOT EXECUTED
25d4: e5951064 ldr r1, [r5, #100] <== NOT EXECUTED
25d8: e0800004 add r0, r0, r4 <== NOT EXECUTED
25dc: eb0041f7 bl 12dc0 <__umodsi3> <== NOT EXECUTED
25e0: e59530c0 ldr r3, [r5, #192] <== NOT EXECUTED
25e4: e1500003 cmp r0, r3 <== NOT EXECUTED
25e8: 9a000010 bls 2630 <rtems_termios_enqueue_raw_characters+0x1a0><== NOT EXECUTED
25ec: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED
25f0: e3130001 tst r3, #1 ; 0x1 <== NOT EXECUTED
25f4: 1a00000d bne 2630 <rtems_termios_enqueue_raw_characters+0x1a0><== NOT EXECUTED
% tty->rawInBuf.Size)
> tty->highwater) &&
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
25f8: e59520b8 ldr r2, [r5, #184] <== NOT EXECUTED
25fc: e3822001 orr r2, r2, #1 ; 0x1 <== NOT EXECUTED
2600: e58520b8 str r2, [r5, #184] <== NOT EXECUTED
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
2604: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED
2608: e3c33fff bic r3, r3, #1020 ; 0x3fc <== NOT EXECUTED
260c: e3c33001 bic r3, r3, #1 ; 0x1 <== NOT EXECUTED
2610: e1a03a83 lsl r3, r3, #21 <== NOT EXECUTED
2614: e1a03aa3 lsr r3, r3, #21 <== NOT EXECUTED
2618: e3530b01 cmp r3, #1024 ; 0x400 <== NOT EXECUTED
261c: 0a000044 beq 2734 <rtems_termios_enqueue_raw_characters+0x2a4><== NOT EXECUTED
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTOP]),
1);
}
}
else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF))
2620: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED
2624: e2033f41 and r3, r3, #260 ; 0x104 <== NOT EXECUTED
2628: e3530c01 cmp r3, #256 ; 0x100 <== NOT EXECUTED
262c: 0a00004f beq 2770 <rtems_termios_enqueue_raw_characters+0x2e0><== NOT EXECUTED
tty->device.stopRemoteTx(tty->minor);
}
}
}
/* reenable interrupts */
rtems_interrupt_enable(level);
2630: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED
2634: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
if (newTail == tty->rawInBuf.Head) {
2638: e595305c ldr r3, [r5, #92] <== NOT EXECUTED
263c: e1530004 cmp r3, r4 <== NOT EXECUTED
dropped++;
2640: 02899001 addeq r9, r9, #1 ; 0x1 <== NOT EXECUTED
}
}
/* reenable interrupts */
rtems_interrupt_enable(level);
if (newTail == tty->rawInBuf.Head) {
2644: 0a00000e beq 2684 <rtems_termios_enqueue_raw_characters+0x1f4><== NOT EXECUTED
dropped++;
}
else {
tty->rawInBuf.theBuf[newTail] = c;
2648: e5953058 ldr r3, [r5, #88] <== NOT EXECUTED
264c: e7c36004 strb r6, [r3, r4] <== 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 )) {
2650: e59520e4 ldr r2, [r5, #228] <== NOT EXECUTED
2654: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED
if (newTail == tty->rawInBuf.Head) {
dropped++;
}
else {
tty->rawInBuf.theBuf[newTail] = c;
tty->rawInBuf.Tail = newTail;
2658: e5854060 str r4, [r5, #96] <== NOT EXECUTED
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
265c: 1a000008 bne 2684 <rtems_termios_enqueue_raw_characters+0x1f4><== NOT EXECUTED
2660: e59530dc ldr r3, [r5, #220] <== NOT EXECUTED
2664: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
2668: 0a000005 beq 2684 <rtems_termios_enqueue_raw_characters+0x1f4><== NOT EXECUTED
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
266c: e59d0008 ldr r0, [sp, #8] <== NOT EXECUTED
2670: e59510e0 ldr r1, [r5, #224] <== NOT EXECUTED
2674: e1a0e00f mov lr, pc <== NOT EXECUTED
2678: e12fff13 bx r3 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
267c: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED
2680: e58520e4 str r2, [r5, #228] <== NOT EXECUTED
2684: e28aa001 add sl, sl, #1 ; 0x1 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
2688: e2577001 subs r7, r7, #1 ; 0x1 <== NOT EXECUTED
268c: 2affffb5 bcs 2568 <rtems_termios_enqueue_raw_characters+0xd8><== NOT EXECUTED
tty->tty_rcvwakeup = 1;
}
}
}
}
tty->rawInBufDropped += dropped;
2690: e5953078 ldr r3, [r5, #120] <== NOT EXECUTED
2694: e0833009 add r3, r3, r9 <== NOT EXECUTED
2698: e5853078 str r3, [r5, #120] <== NOT EXECUTED
rtems_semaphore_release (tty->rawInBuf.Semaphore);
269c: e5950068 ldr r0, [r5, #104] <== NOT EXECUTED
26a0: eb00089c bl 4918 <rtems_semaphore_release> <== NOT EXECUTED
26a4: eaffffa3 b 2538 <rtems_termios_enqueue_raw_characters+0xa8><== NOT EXECUTED
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
if (c == tty->termios.c_cc[VSTART]) {
26a8: e5d53049 ldrb r3, [r5, #73] <== NOT EXECUTED
26ac: e1530002 cmp r3, r2 <== NOT EXECUTED
/* received VSTOP and VSTART==VSTOP? */
/* then toggle "stop output" status */
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
26b0: 059530b8 ldreq r3, [r5, #184] <== NOT EXECUTED
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
26b4: 159530b8 ldrne r3, [r5, #184] <== 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;
26b8: 02233010 eoreq r3, r3, #16 ; 0x10 <== NOT EXECUTED
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
26bc: 13833010 orrne r3, r3, #16 ; 0x10 <== 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;
26c0: 058530b8 streq r3, [r5, #184] <== NOT EXECUTED
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
26c4: 158530b8 strne r3, [r5, #184] <== NOT EXECUTED
flow_rcv = true;
}
}
if (flow_rcv) {
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
26c8: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED
26cc: e2033030 and r3, r3, #48 ; 0x30 <== NOT EXECUTED
26d0: e3530020 cmp r3, #32 ; 0x20 <== NOT EXECUTED
26d4: 0a000002 beq 26e4 <rtems_termios_enqueue_raw_characters+0x254><== NOT EXECUTED
/* if chars available, call write function... */
(*tty->device.write)(tty->minor,
&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
}
/* reenable interrupts */
rtems_interrupt_enable(level);
26d8: e3a0b001 mov fp, #1 ; 0x1 <== NOT EXECUTED
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
tty->tty_rcvwakeup = 1;
26dc: e28aa001 add sl, sl, #1 ; 0x1 <== NOT EXECUTED
26e0: eaffffe8 b 2688 <rtems_termios_enqueue_raw_characters+0x1f8><== NOT EXECUTED
}
if (flow_rcv) {
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
/* disable interrupts */
rtems_interrupt_disable(level);
26e4: e10f4000 mrs r4, CPSR <== NOT EXECUTED
26e8: e38430c0 orr r3, r4, #192 ; 0xc0 <== NOT EXECUTED
26ec: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
26f0: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
26f4: e5952094 ldr r2, [r5, #148] <== NOT EXECUTED
if (flow_rcv) {
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
/* disable interrupts */
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
26f8: e3c33020 bic r3, r3, #32 ; 0x20 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
26fc: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED
if (flow_rcv) {
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
/* disable interrupts */
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
2700: e58530b8 str r3, [r5, #184] <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
2704: 1a000002 bne 2714 <rtems_termios_enqueue_raw_characters+0x284><== NOT EXECUTED
/* if chars available, call write function... */
(*tty->device.write)(tty->minor,
&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
}
/* reenable interrupts */
rtems_interrupt_enable(level);
2708: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED
270c: e3a0b001 mov fp, #1 ; 0x1 <== NOT EXECUTED
2710: eafffff1 b 26dc <rtems_termios_enqueue_raw_characters+0x24c><== NOT EXECUTED
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
/* if chars available, call write function... */
(*tty->device.write)(tty->minor,
2714: e5953084 ldr r3, [r5, #132] <== NOT EXECUTED
2718: e595107c ldr r1, [r5, #124] <== NOT EXECUTED
271c: e5950010 ldr r0, [r5, #16] <== NOT EXECUTED
2720: e0811003 add r1, r1, r3 <== NOT EXECUTED
2724: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED
2728: e1a0e00f mov lr, pc <== NOT EXECUTED
272c: e595f0a4 ldr pc, [r5, #164] <== NOT EXECUTED
2730: eafffff4 b 2708 <rtems_termios_enqueue_raw_characters+0x278><== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
== (FL_MDXOF ) ){
if ((tty->flow_ctrl & FL_OSTOP) ||
2734: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED
2738: e3130020 tst r3, #32 ; 0x20 <== NOT EXECUTED
273c: 1a000002 bne 274c <rtems_termios_enqueue_raw_characters+0x2bc><== NOT EXECUTED
2740: e5953094 ldr r3, [r5, #148] <== NOT EXECUTED
2744: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
2748: 1affffb8 bne 2630 <rtems_termios_enqueue_raw_characters+0x1a0><== 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;
274c: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED
2750: e3833002 orr r3, r3, #2 ; 0x2 <== NOT EXECUTED
2754: e58530b8 str r3, [r5, #184] <== NOT EXECUTED
(*tty->device.write)(tty->minor,
2758: e5950010 ldr r0, [r5, #16] <== NOT EXECUTED
275c: e59d1000 ldr r1, [sp] <== NOT EXECUTED
2760: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED
2764: e1a0e00f mov lr, pc <== NOT EXECUTED
2768: e595f0a4 ldr pc, [r5, #164] <== NOT EXECUTED
276c: eaffffaf b 2630 <rtems_termios_enqueue_raw_characters+0x1a0><== NOT EXECUTED
1);
}
}
else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF))
== (FL_MDRTS ) ) {
tty->flow_ctrl |= FL_IRTSOFF;
2770: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
2774: e59520ac ldr r2, [r5, #172] <== NOT EXECUTED
1);
}
}
else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF))
== (FL_MDRTS ) ) {
tty->flow_ctrl |= FL_IRTSOFF;
2778: e3833004 orr r3, r3, #4 ; 0x4 <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
277c: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED
1);
}
}
else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF))
== (FL_MDRTS ) ) {
tty->flow_ctrl |= FL_IRTSOFF;
2780: e58530b8 str r3, [r5, #184] <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
2784: 0affffa9 beq 2630 <rtems_termios_enqueue_raw_characters+0x1a0><== NOT EXECUTED
tty->device.stopRemoteTx(tty->minor);
2788: e5950010 ldr r0, [r5, #16] <== NOT EXECUTED
278c: e1a0e00f mov lr, pc <== NOT EXECUTED
2790: e12fff12 bx r2 <== NOT EXECUTED
2794: eaffffa5 b 2630 <rtems_termios_enqueue_raw_characters+0x1a0><== NOT EXECUTED
00002198 <rtems_termios_initialize>:
struct rtems_termios_tty *rtems_termios_ttyTail;
rtems_id rtems_termios_ttyMutex;
void
rtems_termios_initialize (void)
{
2198: e52de004 push {lr} ; (str lr, [sp, #-4]!)
rtems_status_code sc;
/*
* Create the mutex semaphore for the tty list
*/
if (!rtems_termios_ttyMutex) {
219c: e59fc034 ldr ip, [pc, #52] ; 21d8 <rtems_termios_initialize+0x40>
21a0: e59c3000 ldr r3, [ip]
21a4: e3530000 cmp r3, #0 ; 0x0
struct rtems_termios_tty *rtems_termios_ttyTail;
rtems_id rtems_termios_ttyMutex;
void
rtems_termios_initialize (void)
{
21a8: e24dd004 sub sp, sp, #4 ; 0x4
rtems_status_code sc;
/*
* Create the mutex semaphore for the tty list
*/
if (!rtems_termios_ttyMutex) {
21ac: 0a000001 beq 21b8 <rtems_termios_initialize+0x20>
RTEMS_NO_PRIORITY,
&rtems_termios_ttyMutex);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
}
21b0: e28dd004 add sp, sp, #4 ; 0x4
21b4: e8bd8000 pop {pc}
/*
* Create the mutex semaphore for the tty list
*/
if (!rtems_termios_ttyMutex) {
sc = rtems_semaphore_create (
21b8: e59f001c ldr r0, [pc, #28] ; 21dc <rtems_termios_initialize+0x44>
21bc: e3a01001 mov r1, #1 ; 0x1
21c0: e3a02054 mov r2, #84 ; 0x54
21c4: e58dc000 str ip, [sp]
21c8: eb0008e7 bl 456c <rtems_semaphore_create>
rtems_build_name ('T', 'R', 'm', 'i'),
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_termios_ttyMutex);
if (sc != RTEMS_SUCCESSFUL)
21cc: e3500000 cmp r0, #0 ; 0x0
21d0: 0afffff6 beq 21b0 <rtems_termios_initialize+0x18>
rtems_fatal_error_occurred (sc);
21d4: eb000b46 bl 4ef4 <rtems_fatal_error_occurred> <== NOT EXECUTED
00003404 <rtems_termios_ioctl>:
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
3404: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
3408: e5903000 ldr r3, [r0] <== NOT EXECUTED
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
rtems_status_code sc;
args->ioctl_return = 0;
340c: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED
rtems_status_code
rtems_termios_ioctl (void *arg)
{
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
3410: e5935028 ldr r5, [r3, #40] <== NOT EXECUTED
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
rtems_status_code sc;
args->ioctl_return = 0;
3414: e580100c str r1, [r0, #12] <== NOT EXECUTED
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
3418: e1a06000 mov r6, r0 <== NOT EXECUTED
341c: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED
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);
3420: e5950018 ldr r0, [r5, #24] <== NOT EXECUTED
3424: e1a02001 mov r2, r1 <== NOT EXECUTED
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;
3428: e5964008 ldr r4, [r6, #8] <== NOT EXECUTED
rtems_status_code sc;
args->ioctl_return = 0;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
342c: eb0004f2 bl 47fc <rtems_semaphore_obtain> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
3430: e2507000 subs r7, r0, #0 ; 0x0 <== NOT EXECUTED
3434: 1a00000a bne 3464 <rtems_termios_ioctl+0x60> <== NOT EXECUTED
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
3438: e5962004 ldr r2, [r6, #4] <== NOT EXECUTED
343c: e3520004 cmp r2, #4 ; 0x4 <== NOT EXECUTED
3440: 0a000021 beq 34cc <rtems_termios_ioctl+0xc8> <== NOT EXECUTED
3444: 8a00000a bhi 3474 <rtems_termios_ioctl+0x70> <== NOT EXECUTED
3448: e3520002 cmp r2, #2 ; 0x2 <== NOT EXECUTED
344c: 0a000064 beq 35e4 <rtems_termios_ioctl+0x1e0> <== NOT EXECUTED
3450: 9a00004b bls 3584 <rtems_termios_ioctl+0x180> <== NOT EXECUTED
if (tty->device.setAttributes)
(*tty->device.setAttributes)(tty->minor, &tty->termios);
break;
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
3454: e1a00005 mov r0, r5 <== NOT EXECUTED
3458: ebfffec7 bl 2f7c <drainOutput> <== NOT EXECUTED
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
}
break;
}
rtems_semaphore_release (tty->osem);
345c: e5950018 ldr r0, [r5, #24] <== NOT EXECUTED
3460: eb00052c bl 4918 <rtems_semaphore_release> <== NOT EXECUTED
args->ioctl_return = sc;
3464: e586700c str r7, [r6, #12] <== NOT EXECUTED
return sc;
}
3468: e1a00007 mov r0, r7 <== NOT EXECUTED
346c: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED
3470: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
3474: e3a03a46 mov r3, #286720 ; 0x46000 <== NOT EXECUTED
3478: e2833e67 add r3, r3, #1648 ; 0x670 <== NOT EXECUTED
347c: e283313d add r3, r3, #1073741839 ; 0x4000000f <== NOT EXECUTED
3480: e1520003 cmp r2, r3 <== NOT EXECUTED
3484: 0a00004a beq 35b4 <rtems_termios_ioctl+0x1b0> <== NOT EXECUTED
3488: 8a000017 bhi 34ec <rtems_termios_ioctl+0xe8> <== NOT EXECUTED
348c: e3520005 cmp r2, #5 ; 0x5 <== NOT EXECUTED
3490: 0a000011 beq 34dc <rtems_termios_ioctl+0xd8> <== NOT EXECUTED
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
3494: e59520cc ldr r2, [r5, #204] <== NOT EXECUTED
3498: e59f3358 ldr r3, [pc, #856] ; 37f8 <rtems_termios_ioctl+0x3f4><== NOT EXECUTED
349c: e1a02282 lsl r2, r2, #5 <== NOT EXECUTED
34a0: e0833002 add r3, r3, r2 <== NOT EXECUTED
34a4: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED
34a8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
34ac: 03a0700a moveq r7, #10 ; 0xa <== NOT EXECUTED
34b0: 0affffe9 beq 345c <rtems_termios_ioctl+0x58> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
34b4: e1a00005 mov r0, r5 <== NOT EXECUTED
34b8: e1a01006 mov r1, r6 <== NOT EXECUTED
34bc: e1a0e00f mov lr, pc <== NOT EXECUTED
34c0: e12fff13 bx r3 <== NOT EXECUTED
34c4: e1a07000 mov r7, r0 <== NOT EXECUTED
34c8: eaffffe3 b 345c <rtems_termios_ioctl+0x58> <== NOT EXECUTED
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
break;
case RTEMS_IO_RCVWAKEUP:
tty->tty_rcv = *wakeup;
34cc: e894000c ldm r4, {r2, r3} <== NOT EXECUTED
34d0: e58530e0 str r3, [r5, #224] <== NOT EXECUTED
34d4: e58520dc str r2, [r5, #220] <== NOT EXECUTED
34d8: eaffffdf b 345c <rtems_termios_ioctl+0x58> <== NOT EXECUTED
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
break;
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
34dc: e894000c ldm r4, {r2, r3} <== NOT EXECUTED
34e0: e58530d8 str r3, [r5, #216] <== NOT EXECUTED
34e4: e58520d4 str r2, [r5, #212] <== NOT EXECUTED
34e8: eaffffdb b 345c <rtems_termios_ioctl+0x58> <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
34ec: e3a03a47 mov r3, #290816 ; 0x47000 <== NOT EXECUTED
34f0: e2833e41 add r3, r3, #1040 ; 0x410 <== NOT EXECUTED
34f4: e2833129 add r3, r3, #1073741834 ; 0x4000000a <== NOT EXECUTED
34f8: e1520003 cmp r2, r3 <== NOT EXECUTED
34fc: 0a00001c beq 3574 <rtems_termios_ioctl+0x170> <== NOT EXECUTED
3500: e3a03a47 mov r3, #290816 ; 0x47000 <== NOT EXECUTED
3504: e2833e41 add r3, r3, #1040 ; 0x410 <== NOT EXECUTED
3508: e283312e add r3, r3, #-2147483637 ; 0x8000000b <== NOT EXECUTED
350c: e1520003 cmp r2, r3 <== NOT EXECUTED
3510: 1affffdf bne 3494 <rtems_termios_ioctl+0x90> <== NOT EXECUTED
#if 1 /* FIXME */
case TIOCSETD:
/*
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
3514: e59530cc ldr r3, [r5, #204] <== NOT EXECUTED
3518: e59f42d8 ldr r4, [pc, #728] ; 37f8 <rtems_termios_ioctl+0x3f4><== NOT EXECUTED
351c: e1a03183 lsl r3, r3, #3 <== NOT EXECUTED
3520: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED
3524: e7943103 ldr r3, [r4, r3, lsl #2] <== NOT EXECUTED
3528: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
352c: 0a000003 beq 3540 <rtems_termios_ioctl+0x13c> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
3530: e1a00005 mov r0, r5 <== NOT EXECUTED
3534: e1a0e00f mov lr, pc <== NOT EXECUTED
3538: e12fff13 bx r3 <== NOT EXECUTED
353c: e1a07000 mov r7, r0 <== NOT EXECUTED
}
tty->t_line=*(int*)(args->buffer);
3540: e5963008 ldr r3, [r6, #8] <== NOT EXECUTED
3544: e5932000 ldr r2, [r3] <== NOT EXECUTED
tty->t_sc = NULL; /* ensure that no more valid data */
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
3548: e7941282 ldr r1, [r4, r2, lsl #5] <== NOT EXECUTED
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
}
tty->t_line=*(int*)(args->buffer);
tty->t_sc = NULL; /* ensure that no more valid data */
354c: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
3550: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
}
tty->t_line=*(int*)(args->buffer);
tty->t_sc = NULL; /* ensure that no more valid data */
3554: e58530d0 str r3, [r5, #208] <== NOT EXECUTED
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
}
tty->t_line=*(int*)(args->buffer);
3558: e58520cc str r2, [r5, #204] <== NOT EXECUTED
tty->t_sc = NULL; /* ensure that no more valid data */
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
355c: 0affffbe beq 345c <rtems_termios_ioctl+0x58> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
3560: e1a00005 mov r0, r5 <== NOT EXECUTED
3564: e1a0e00f mov lr, pc <== NOT EXECUTED
3568: e12fff11 bx r1 <== NOT EXECUTED
356c: e1a07000 mov r7, r0 <== NOT EXECUTED
3570: eaffffb9 b 345c <rtems_termios_ioctl+0x58> <== NOT EXECUTED
}
break;
case TIOCGETD:
*(int*)(args->buffer)=tty->t_line;
3574: e5962008 ldr r2, [r6, #8] <== NOT EXECUTED
3578: e59530cc ldr r3, [r5, #204] <== NOT EXECUTED
357c: e5823000 str r3, [r2] <== NOT EXECUTED
3580: eaffffb5 b 345c <rtems_termios_ioctl+0x58> <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
3584: e3520001 cmp r2, #1 ; 0x1 <== NOT EXECUTED
3588: 1affffc1 bne 3494 <rtems_termios_ioctl+0x90> <== NOT EXECUTED
sc = RTEMS_INVALID_NUMBER;
}
break;
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
358c: e5964008 ldr r4, [r6, #8] <== NOT EXECUTED
3590: e285c030 add ip, r5, #48 ; 0x30 <== NOT EXECUTED
3594: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED
3598: e1a0e004 mov lr, r4 <== NOT EXECUTED
359c: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED
35a0: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED
35a4: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED
35a8: e59c3000 ldr r3, [ip] <== NOT EXECUTED
35ac: e58e3000 str r3, [lr] <== NOT EXECUTED
35b0: eaffffa9 b 345c <rtems_termios_ioctl+0x58> <== NOT EXECUTED
*(int*)(args->buffer)=tty->t_line;
break;
#endif
case FIONREAD:
{
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
35b4: e5952060 ldr r2, [r5, #96] <== NOT EXECUTED
35b8: e595305c ldr r3, [r5, #92] <== NOT EXECUTED
if ( rawnc < 0 )
35bc: e0521003 subs r1, r2, r3 <== NOT EXECUTED
rawnc += tty->rawInBuf.Size;
35c0: 45953064 ldrmi r3, [r5, #100] <== NOT EXECUTED
35c4: 40811003 addmi r1, r1, r3 <== NOT EXECUTED
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
35c8: e2852020 add r2, r5, #32 ; 0x20 <== NOT EXECUTED
35cc: e892000c ldm r2, {r2, r3} <== NOT EXECUTED
35d0: e0423003 sub r3, r2, r3 <== NOT EXECUTED
35d4: e5962008 ldr r2, [r6, #8] <== NOT EXECUTED
35d8: e0833001 add r3, r3, r1 <== NOT EXECUTED
35dc: e5823000 str r3, [r2] <== NOT EXECUTED
35e0: eaffff9d b 345c <rtems_termios_ioctl+0x58> <== NOT EXECUTED
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
break;
case RTEMS_IO_SET_ATTRIBUTES:
tty->termios = *(struct termios *)args->buffer;
35e4: e596c008 ldr ip, [r6, #8] <== NOT EXECUTED
35e8: e1a0e00c mov lr, ip <== NOT EXECUTED
35ec: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED
35f0: e2854030 add r4, r5, #48 ; 0x30 <== NOT EXECUTED
35f4: e1a0c004 mov ip, r4 <== NOT EXECUTED
35f8: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED
35fc: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED
3600: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED
/*
* check for flow control options to be switched off
*/
/* check for outgoing XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXON) &&
3604: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
break;
case RTEMS_IO_SET_ATTRIBUTES:
tty->termios = *(struct termios *)args->buffer;
3608: e59e2000 ldr r2, [lr] <== NOT EXECUTED
/*
* check for flow control options to be switched off
*/
/* check for outgoing XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXON) &&
360c: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
break;
case RTEMS_IO_SET_ATTRIBUTES:
tty->termios = *(struct termios *)args->buffer;
3610: e58c2000 str r2, [ip] <== NOT EXECUTED
/*
* check for flow control options to be switched off
*/
/* check for outgoing XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXON) &&
3614: 0a000012 beq 3664 <rtems_termios_ioctl+0x260> <== NOT EXECUTED
3618: e5953030 ldr r3, [r5, #48] <== NOT EXECUTED
361c: e3130b01 tst r3, #1024 ; 0x400 <== NOT EXECUTED
3620: 1a00000f bne 3664 <rtems_termios_ioctl+0x260> <== NOT EXECUTED
!(tty->termios.c_iflag & IXON)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF);
3624: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED
3628: e3c33e21 bic r3, r3, #528 ; 0x210 <== NOT EXECUTED
362c: e58530b8 str r3, [r5, #184] <== NOT EXECUTED
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
3630: e59520b8 ldr r2, [r5, #184] <== NOT EXECUTED
3634: e3120020 tst r2, #32 ; 0x20 <== NOT EXECUTED
3638: 0a000009 beq 3664 <rtems_termios_ioctl+0x260> <== NOT EXECUTED
/* disable interrupts */
rtems_interrupt_disable(level);
363c: e10f8000 mrs r8, CPSR <== NOT EXECUTED
3640: e38830c0 orr r3, r8, #192 ; 0xc0 <== NOT EXECUTED
3644: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
3648: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
364c: e5952094 ldr r2, [r5, #148] <== NOT EXECUTED
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
/* disable interrupts */
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
3650: e3c33020 bic r3, r3, #32 ; 0x20 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
3654: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
/* disable interrupts */
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
3658: e58530b8 str r3, [r5, #184] <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
365c: 1a00005d bne 37d8 <rtems_termios_ioctl+0x3d4> <== NOT EXECUTED
/* if chars available, call write function... */
(*tty->device.write)(tty->minor,
&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
}
/* reenable interrupts */
rtems_interrupt_enable(level);
3660: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED
}
}
/* check for incoming XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXOF) &&
3664: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED
3668: e3130b01 tst r3, #1024 ; 0x400 <== NOT EXECUTED
366c: 0a000008 beq 3694 <rtems_termios_ioctl+0x290> <== NOT EXECUTED
3670: e5953030 ldr r3, [r5, #48] <== NOT EXECUTED
3674: e3130a01 tst r3, #4096 ; 0x1000 <== NOT EXECUTED
3678: 1a000005 bne 3694 <rtems_termios_ioctl+0x290> <== NOT EXECUTED
!(tty->termios.c_iflag & IXOFF)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXOF);
367c: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED
3680: e3c33b01 bic r3, r3, #1024 ; 0x400 <== NOT EXECUTED
3684: e58530b8 str r3, [r5, #184] <== NOT EXECUTED
/* FIXME: what happens, if we had sent XOFF but not yet XON? */
tty->flow_ctrl &= ~(FL_ISNTXOF);
3688: e59520b8 ldr r2, [r5, #184] <== NOT EXECUTED
368c: e3c22002 bic r2, r2, #2 ; 0x2 <== NOT EXECUTED
3690: e58520b8 str r2, [r5, #184] <== NOT EXECUTED
}
/* check for incoming RTS/CTS flow control switched off */
if (( tty->flow_ctrl & FL_MDRTS) &&
3694: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED
3698: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED
369c: 05951038 ldreq r1, [r5, #56] <== NOT EXECUTED
36a0: 0a000012 beq 36f0 <rtems_termios_ioctl+0x2ec> <== NOT EXECUTED
36a4: e5951038 ldr r1, [r5, #56] <== NOT EXECUTED
36a8: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED
36ac: ba00003d blt 37a8 <rtems_termios_ioctl+0x3a4> <== NOT EXECUTED
!(tty->termios.c_cflag & CRTSCTS)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDRTS);
36b0: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED
36b4: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED
36b8: e58530b8 str r3, [r5, #184] <== NOT EXECUTED
/* restart remote Tx, if it was stopped */
if ((tty->flow_ctrl & FL_IRTSOFF) &&
36bc: e59520b8 ldr r2, [r5, #184] <== NOT EXECUTED
36c0: e3120004 tst r2, #4 ; 0x4 <== NOT EXECUTED
36c4: 0a000006 beq 36e4 <rtems_termios_ioctl+0x2e0> <== NOT EXECUTED
36c8: e59530b0 ldr r3, [r5, #176] <== NOT EXECUTED
36cc: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
36d0: 0a000003 beq 36e4 <rtems_termios_ioctl+0x2e0> <== NOT EXECUTED
(tty->device.startRemoteTx != NULL)) {
tty->device.startRemoteTx(tty->minor);
36d4: e5950010 ldr r0, [r5, #16] <== NOT EXECUTED
36d8: e1a0e00f mov lr, pc <== NOT EXECUTED
36dc: e12fff13 bx r3 <== NOT EXECUTED
36e0: e5951038 ldr r1, [r5, #56] <== NOT EXECUTED
}
tty->flow_ctrl &= ~(FL_IRTSOFF);
36e4: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED
36e8: e3c33004 bic r3, r3, #4 ; 0x4 <== NOT EXECUTED
36ec: e58530b8 str r3, [r5, #184] <== NOT EXECUTED
/*
* check for flow control options to be switched on
*/
/* check for incoming RTS/CTS flow control switched on */
if (tty->termios.c_cflag & CRTSCTS) {
36f0: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED
36f4: ba00002b blt 37a8 <rtems_termios_ioctl+0x3a4> <== NOT EXECUTED
tty->flow_ctrl |= FL_MDRTS;
}
/* check for incoming XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXOFF) {
36f8: e5952030 ldr r2, [r5, #48] <== NOT EXECUTED
36fc: e3120a01 tst r2, #4096 ; 0x1000 <== NOT EXECUTED
tty->flow_ctrl |= FL_MDXOF;
3700: 159530b8 ldrne r3, [r5, #184] <== NOT EXECUTED
3704: 13833b01 orrne r3, r3, #1024 ; 0x400 <== NOT EXECUTED
3708: 158530b8 strne r3, [r5, #184] <== NOT EXECUTED
}
/* check for outgoing XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXON) {
370c: e3120b01 tst r2, #1024 ; 0x400 <== NOT EXECUTED
tty->flow_ctrl |= FL_MDXON;
3710: 159530b8 ldrne r3, [r5, #184] <== NOT EXECUTED
3714: 13833c02 orrne r3, r3, #512 ; 0x200 <== NOT EXECUTED
3718: 158530b8 strne r3, [r5, #184] <== NOT EXECUTED
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) {
371c: e595303c ldr r3, [r5, #60] <== NOT EXECUTED
3720: e2138002 ands r8, r3, #2 ; 0x2 <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
3724: 13a03000 movne r3, #0 ; 0x0 <== NOT EXECUTED
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
3728: 15853074 strne r3, [r5, #116] <== NOT EXECUTED
/* check for and process change in flow control options */
termios_set_flowctrl(tty);
if (tty->termios.c_lflag & ICANON) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
372c: 1585306c strne r3, [r5, #108] <== NOT EXECUTED
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
3730: 15853070 strne r3, [r5, #112] <== NOT EXECUTED
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) {
3734: 0a000007 beq 3758 <rtems_termios_ioctl+0x354> <== NOT EXECUTED
else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
}
}
}
if (tty->device.setAttributes)
3738: e59530a8 ldr r3, [r5, #168] <== NOT EXECUTED
373c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
3740: 0affff45 beq 345c <rtems_termios_ioctl+0x58> <== NOT EXECUTED
(*tty->device.setAttributes)(tty->minor, &tty->termios);
3744: e1a01004 mov r1, r4 <== NOT EXECUTED
3748: e5950010 ldr r0, [r5, #16] <== NOT EXECUTED
374c: e1a0e00f mov lr, pc <== NOT EXECUTED
3750: e12fff13 bx r3 <== NOT EXECUTED
3754: eaffff40 b 345c <rtems_termios_ioctl+0x58> <== NOT EXECUTED
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
}
else {
rtems_interval ticksPerSecond;
rtems_clock_get (RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticksPerSecond);
3758: e1a0100d mov r1, sp <== NOT EXECUTED
375c: e3a00003 mov r0, #3 ; 0x3 <== NOT EXECUTED
3760: eb0001e9 bl 3f0c <rtems_clock_get> <== NOT EXECUTED
tty->vtimeTicks = tty->termios.c_cc[VTIME] * ticksPerSecond / 10;
3764: e59d3000 ldr r3, [sp] <== NOT EXECUTED
3768: e5d50046 ldrb r0, [r5, #70] <== NOT EXECUTED
376c: e0010093 mul r1, r3, r0 <== NOT EXECUTED
3770: e59f2084 ldr r2, [pc, #132] ; 37fc <rtems_termios_ioctl+0x3f8><== NOT EXECUTED
3774: e083c192 umull ip, r3, r2, r1 <== NOT EXECUTED
if (tty->termios.c_cc[VTIME]) {
3778: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
}
else {
rtems_interval ticksPerSecond;
rtems_clock_get (RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticksPerSecond);
tty->vtimeTicks = tty->termios.c_cc[VTIME] * ticksPerSecond / 10;
377c: e1a021a3 lsr r2, r3, #3 <== NOT EXECUTED
3780: e5852054 str r2, [r5, #84] <== NOT EXECUTED
if (tty->termios.c_cc[VTIME]) {
3784: 0a00000b beq 37b8 <rtems_termios_ioctl+0x3b4> <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
if (tty->termios.c_cc[VMIN])
3788: e5d53047 ldrb r3, [r5, #71] <== NOT EXECUTED
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
378c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
3790: 01a03002 moveq r3, r2 <== NOT EXECUTED
3794: 13a03000 movne r3, #0 ; 0x0 <== NOT EXECUTED
else {
rtems_interval ticksPerSecond;
rtems_clock_get (RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticksPerSecond);
tty->vtimeTicks = tty->termios.c_cc[VTIME] * ticksPerSecond / 10;
if (tty->termios.c_cc[VTIME]) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
3798: e585806c str r8, [r5, #108] <== NOT EXECUTED
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
if (tty->termios.c_cc[VMIN])
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
379c: e5853074 str r3, [r5, #116] <== NOT EXECUTED
rtems_interval ticksPerSecond;
rtems_clock_get (RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticksPerSecond);
tty->vtimeTicks = tty->termios.c_cc[VTIME] * ticksPerSecond / 10;
if (tty->termios.c_cc[VTIME]) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
37a0: e5852070 str r2, [r5, #112] <== NOT EXECUTED
37a4: eaffffe3 b 3738 <rtems_termios_ioctl+0x334> <== NOT EXECUTED
/*
* check for flow control options to be switched on
*/
/* check for incoming RTS/CTS flow control switched on */
if (tty->termios.c_cflag & CRTSCTS) {
tty->flow_ctrl |= FL_MDRTS;
37a8: e59530b8 ldr r3, [r5, #184] <== NOT EXECUTED
37ac: e3833c01 orr r3, r3, #256 ; 0x100 <== NOT EXECUTED
37b0: e58530b8 str r3, [r5, #184] <== NOT EXECUTED
37b4: eaffffcf b 36f8 <rtems_termios_ioctl+0x2f4> <== NOT EXECUTED
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
}
else {
if (tty->termios.c_cc[VMIN]) {
37b8: e5d53047 ldrb r3, [r5, #71] <== NOT EXECUTED
37bc: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
}
else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
37c0: 03a03001 moveq r3, #1 ; 0x1 <== NOT EXECUTED
}
else {
if (tty->termios.c_cc[VMIN]) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
37c4: 15850074 strne r0, [r5, #116] <== NOT EXECUTED
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
}
else {
if (tty->termios.c_cc[VMIN]) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
37c8: 1585006c strne r0, [r5, #108] <== NOT EXECUTED
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
37cc: 15850070 strne r0, [r5, #112] <== NOT EXECUTED
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
}
else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
37d0: 0585306c streq r3, [r5, #108] <== NOT EXECUTED
37d4: eaffffd7 b 3738 <rtems_termios_ioctl+0x334> <== NOT EXECUTED
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
/* if chars available, call write function... */
(*tty->device.write)(tty->minor,
37d8: e5953084 ldr r3, [r5, #132] <== NOT EXECUTED
37dc: e595107c ldr r1, [r5, #124] <== NOT EXECUTED
37e0: e5950010 ldr r0, [r5, #16] <== NOT EXECUTED
37e4: e0811003 add r1, r1, r3 <== NOT EXECUTED
37e8: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED
37ec: e1a0e00f mov lr, pc <== NOT EXECUTED
37f0: e595f0a4 ldr pc, [r5, #164] <== NOT EXECUTED
37f4: eaffff99 b 3660 <rtems_termios_ioctl+0x25c> <== NOT EXECUTED
000039a4 <rtems_termios_open>:
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
39a4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
39a8: e59fb434 ldr fp, [pc, #1076] ; 3de4 <rtems_termios_open+0x440>
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
39ac: e24dd00c sub sp, sp, #12 ; 0xc
39b0: e1a0a001 mov sl, r1
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
39b4: e3a01000 mov r1, #0 ; 0x0
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
39b8: e58d2008 str r2, [sp, #8]
39bc: e1a07000 mov r7, r0
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
39c0: e1a02001 mov r2, r1
39c4: e59b0000 ldr r0, [fp]
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
39c8: e1a04003 mov r4, r3
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
39cc: eb00038a bl 47fc <rtems_semaphore_obtain>
RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
39d0: e2509000 subs r9, r0, #0 ; 0x0
39d4: 1a000021 bne 3a60 <rtems_termios_open+0xbc>
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
39d8: e59f5408 ldr r5, [pc, #1032] ; 3de8 <rtems_termios_open+0x444>
39dc: e5956000 ldr r6, [r5]
39e0: e3560000 cmp r6, #0 ; 0x0
39e4: 1a000003 bne 39f8 <rtems_termios_open+0x54>
39e8: ea00001f b 3a6c <rtems_termios_open+0xc8>
39ec: e5966000 ldr r6, [r6] <== NOT EXECUTED
39f0: e3560000 cmp r6, #0 ; 0x0 <== NOT EXECUTED
39f4: 0a00001c beq 3a6c <rtems_termios_open+0xc8> <== NOT EXECUTED
if ((tty->major == major) && (tty->minor == minor))
39f8: e596300c ldr r3, [r6, #12]
39fc: e1530007 cmp r3, r7
3a00: 1afffff9 bne 39ec <rtems_termios_open+0x48>
3a04: e5963010 ldr r3, [r6, #16]
3a08: e153000a cmp r3, sl
3a0c: 1afffff6 bne 39ec <rtems_termios_open+0x48>
*/
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
3a10: e59d1008 ldr r1, [sp, #8]
if (!tty->refcount++) {
3a14: e5963008 ldr r3, [r6, #8]
*/
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
3a18: e5912000 ldr r2, [r1]
if (!tty->refcount++) {
3a1c: e3530000 cmp r3, #0 ; 0x0
3a20: e2833001 add r3, r3, #1 ; 0x1
*/
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
3a24: e5826028 str r6, [r2, #40]
if (!tty->refcount++) {
3a28: e5863008 str r3, [r6, #8]
3a2c: 1a000009 bne 3a58 <rtems_termios_open+0xb4>
if (tty->device.firstOpen)
3a30: e5963098 ldr r3, [r6, #152]
3a34: e3530000 cmp r3, #0 ; 0x0
(*tty->device.firstOpen)(major, minor, arg);
3a38: 11a00007 movne r0, r7
3a3c: 11a0100a movne r1, sl
3a40: 159d2008 ldrne r2, [sp, #8]
3a44: 11a0e00f movne lr, pc
3a48: 112fff13 bxne r3
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
3a4c: e59630b4 ldr r3, [r6, #180]
3a50: e3530002 cmp r3, #2 ; 0x2
3a54: 0a0000a1 beq 3ce0 <rtems_termios_open+0x33c>
(rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
3a58: e59b0000 ldr r0, [fp]
3a5c: eb0003ad bl 4918 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
}
3a60: e1a00009 mov r0, r9
3a64: e28dd00c add sp, sp, #12 ; 0xc
3a68: 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));
3a6c: e3a00001 mov r0, #1 ; 0x1
3a70: e3a010e8 mov r1, #232 ; 0xe8
3a74: eb00154c bl 8fac <calloc>
if (tty == NULL) {
3a78: e3500000 cmp r0, #0 ; 0x0
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
3a7c: e1a08000 mov r8, r0
3a80: e1a06000 mov r6, r0
if (tty == NULL) {
3a84: 0a0000a8 beq 3d2c <rtems_termios_open+0x388>
return RTEMS_NO_MEMORY;
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
3a88: e59f335c ldr r3, [pc, #860] ; 3dec <rtems_termios_open+0x448>
3a8c: e5932000 ldr r2, [r3]
3a90: e5882064 str r2, [r8, #100]
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
3a94: e5980064 ldr r0, [r8, #100]
3a98: eb0016f2 bl 9668 <malloc>
if (tty->rawInBuf.theBuf == NULL) {
3a9c: e3500000 cmp r0, #0 ; 0x0
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
3aa0: e5880058 str r0, [r8, #88]
if (tty->rawInBuf.theBuf == NULL) {
3aa4: 0a00009e beq 3d24 <rtems_termios_open+0x380>
return RTEMS_NO_MEMORY;
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
3aa8: e59f3340 ldr r3, [pc, #832] ; 3df0 <rtems_termios_open+0x44c>
3aac: e5932000 ldr r2, [r3]
3ab0: e5882088 str r2, [r8, #136]
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
3ab4: e5980088 ldr r0, [r8, #136]
3ab8: eb0016ea bl 9668 <malloc>
if (tty->rawOutBuf.theBuf == NULL) {
3abc: e3500000 cmp r0, #0 ; 0x0
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
3ac0: e588007c str r0, [r8, #124]
if (tty->rawOutBuf.theBuf == NULL) {
3ac4: 0a000094 beq 3d1c <rtems_termios_open+0x378>
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
3ac8: e59f3324 ldr r3, [pc, #804] ; 3df4 <rtems_termios_open+0x450>
3acc: e5930000 ldr r0, [r3]
3ad0: eb0016e4 bl 9668 <malloc>
if (tty->cbuf == NULL) {
3ad4: e3500000 cmp r0, #0 ; 0x0
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
3ad8: e588001c str r0, [r8, #28]
if (tty->cbuf == NULL) {
3adc: 0a00008c beq 3d14 <rtems_termios_open+0x370>
tty->tty_rcvwakeup = 0;
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
3ae0: e5952000 ldr r2, [r5]
return RTEMS_NO_MEMORY;
}
/*
* Initialize wakeup callbacks
*/
tty->tty_snd.sw_pfn = NULL;
3ae4: e3a03000 mov r3, #0 ; 0x0
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
3ae8: e3520000 cmp r2, #0 ; 0x0
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
3aec: e888000c stm r8, {r2, r3}
if (rtems_termios_ttyHead != NULL)
rtems_termios_ttyHead->back = tty;
3af0: 15828004 strne r8, [r2, #4]
return RTEMS_NO_MEMORY;
}
/*
* Initialize wakeup callbacks
*/
tty->tty_snd.sw_pfn = NULL;
3af4: e58830d4 str r3, [r8, #212]
tty->tty_snd.sw_arg = NULL;
3af8: e58830d8 str r3, [r8, #216]
tty->tty_rcv.sw_pfn = NULL;
3afc: e58830dc str r3, [r8, #220]
tty->tty_rcv.sw_arg = NULL;
3b00: e58830e0 str r3, [r8, #224]
tty->tty_rcvwakeup = 0;
3b04: e58830e4 str r3, [r8, #228]
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
3b08: e59f12e8 ldr r1, [pc, #744] ; 3df8 <rtems_termios_open+0x454>
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)
3b0c: e59f22e8 ldr r2, [pc, #744] ; 3dfc <rtems_termios_open+0x458>
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
3b10: e5d10000 ldrb r0, [r1]
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)
3b14: e5923000 ldr r3, [r2]
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
3b18: e3800315 orr r0, r0, #1409286144 ; 0x54000000
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)
3b1c: e3530000 cmp r3, #0 ; 0x0
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
3b20: e3800852 orr r0, r0, #5373952 ; 0x520000
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
rtems_termios_ttyTail = tty;
3b24: 05828000 streq r8, [r2]
*/
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
3b28: e5858000 str r8, [r5]
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
3b2c: e288c014 add ip, r8, #20 ; 0x14
3b30: e3a03000 mov r3, #0 ; 0x0
3b34: e3800c69 orr r0, r0, #26880 ; 0x6900
3b38: e3a01001 mov r1, #1 ; 0x1
3b3c: e3a02054 mov r2, #84 ; 0x54
3b40: e58dc000 str ip, [sp]
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
rtems_termios_ttyTail = tty;
tty->minor = minor;
3b44: e588a010 str sl, [r8, #16]
tty->major = major;
3b48: e588700c str r7, [r8, #12]
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
3b4c: eb000286 bl 456c <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)
3b50: e2503000 subs r3, r0, #0 ; 0x0
3b54: 1a00006d bne 3d10 <rtems_termios_open+0x36c>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
3b58: e59f2298 ldr r2, [pc, #664] ; 3df8 <rtems_termios_open+0x454>
3b5c: e5d20000 ldrb r0, [r2]
3b60: e3800315 orr r0, r0, #1409286144 ; 0x54000000
3b64: e3800852 orr r0, r0, #5373952 ; 0x520000
3b68: e288c018 add ip, r8, #24 ; 0x18
3b6c: e3a01001 mov r1, #1 ; 0x1
3b70: e3800c6f orr r0, r0, #28416 ; 0x6f00
3b74: e3a02054 mov r2, #84 ; 0x54
3b78: e58dc000 str ip, [sp]
3b7c: eb00027a bl 456c <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)
3b80: e2501000 subs r1, r0, #0 ; 0x0
3b84: 1a000061 bne 3d10 <rtems_termios_open+0x36c>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
3b88: e59f3268 ldr r3, [pc, #616] ; 3df8 <rtems_termios_open+0x454>
3b8c: e5d30000 ldrb r0, [r3]
3b90: e3800315 orr r0, r0, #1409286144 ; 0x54000000
3b94: e3800852 orr r0, r0, #5373952 ; 0x520000
3b98: e288c08c add ip, r8, #140 ; 0x8c
3b9c: e3800b1e orr r0, r0, #30720 ; 0x7800
3ba0: e3a02020 mov r2, #32 ; 0x20
3ba4: e1a03001 mov r3, r1
3ba8: e58dc000 str ip, [sp]
3bac: eb00026e bl 456c <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)
3bb0: e2505000 subs r5, r0, #0 ; 0x0
3bb4: 1a000055 bne 3d10 <rtems_termios_open+0x36c>
tty->rawOutBufState = rob_idle;
/*
* Set callbacks
*/
tty->device = *callbacks;
3bb8: e1a0c004 mov ip, r4
3bbc: e8bc000f ldm ip!, {r0, r1, r2, r3}
3bc0: e288e098 add lr, r8, #152 ; 0x98
3bc4: e8ae000f stmia lr!, {r0, r1, r2, r3}
3bc8: e89c000f ldm ip, {r0, r1, r2, r3}
3bcc: e88e000f stm lr, {r0, r1, r2, r3}
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
3bd0: e59830b4 ldr r3, [r8, #180]
3bd4: e3530002 cmp r3, #2 ; 0x2
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;
3bd8: e5885094 str r5, [r8, #148]
tty->device = *callbacks;
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
3bdc: 0a000064 beq 3d74 <rtems_termios_open+0x3d0>
&tty->rxTaskId);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
3be0: e59830a0 ldr r3, [r8, #160]
3be4: e3530000 cmp r3, #0 ; 0x0
3be8: 0a000053 beq 3d3c <rtems_termios_open+0x398>
3bec: e59830b4 ldr r3, [r8, #180]
3bf0: e3530002 cmp r3, #2 ; 0x2
3bf4: 0a000050 beq 3d3c <rtems_termios_open+0x398>
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';
3bf8: e3a04000 mov r4, #0 ; 0x0
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;
3bfc: e58840b8 str r4, [r8, #184]
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
3c00: e59f21f0 ldr r2, [pc, #496] ; 3df8 <rtems_termios_open+0x454>
/* 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;
3c04: e5985064 ldr r5, [r8, #100]
tty->highwater = tty->rawInBuf.Size * 3/4;
3c08: e5983064 ldr r3, [r8, #100]
/*
* Bump name characer
*/
if (c++ == 'z')
3c0c: e5d21000 ldrb r1, [r2]
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;
3c10: e1a02083 lsl r2, r3, #1
3c14: e0822003 add r2, r2, r3
3c18: e1a02122 lsr r2, r2, #2
3c1c: e58820c0 str r2, [r8, #192]
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
3c20: e3a03b06 mov r3, #6144 ; 0x1800
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
3c24: e59f21cc ldr r2, [pc, #460] ; 3df8 <rtems_termios_open+0x454>
3c28: e351007a cmp r1, #122 ; 0x7a
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
3c2c: e2833005 add r3, r3, #5 ; 0x5
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
3c30: e2811001 add r1, r1, #1 ; 0x1
3c34: e5c21000 strb r1, [r2]
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
3c38: e5883034 str r3, [r8, #52]
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
3c3c: e3a03003 mov r3, #3 ; 0x3
3c40: e5c83041 strb r3, [r8, #65]
tty->termios.c_cc[VQUIT] = '\034';
3c44: e3a0201c mov r2, #28 ; 0x1c
tty->termios.c_cc[VERASE] = '\177';
3c48: e283307c add r3, r3, #124 ; 0x7c
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
tty->termios.c_cc[VQUIT] = '\034';
3c4c: e5c82042 strb r2, [r8, #66]
tty->termios.c_cc[VERASE] = '\177';
3c50: e5c83043 strb r3, [r8, #67]
tty->termios.c_cc[VKILL] = '\025';
3c54: e2422007 sub r2, r2, #7 ; 0x7
tty->termios.c_cc[VEOF] = '\004';
3c58: e243307b sub r3, r3, #123 ; 0x7b
tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
tty->termios.c_cc[VQUIT] = '\034';
tty->termios.c_cc[VERASE] = '\177';
tty->termios.c_cc[VKILL] = '\025';
3c5c: e5c82044 strb r2, [r8, #68]
tty->termios.c_cc[VEOF] = '\004';
3c60: e5c83045 strb r3, [r8, #69]
tty->termios.c_cc[VEOL] = '\000';
tty->termios.c_cc[VEOL2] = '\000';
tty->termios.c_cc[VSTART] = '\021';
3c64: e2422004 sub r2, r2, #4 ; 0x4
tty->termios.c_cc[VSTOP] = '\023';
3c68: e283300f add r3, r3, #15 ; 0xf
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';
3c6c: e5c82049 strb r2, [r8, #73]
tty->termios.c_cc[VSTOP] = '\023';
3c70: e5c8304a strb r3, [r8, #74]
tty->termios.c_cc[VSUSP] = '\032';
3c74: e2822009 add r2, r2, #9 ; 0x9
tty->termios.c_cc[VREPRINT] = '\022';
3c78: e2433001 sub r3, r3, #1 ; 0x1
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';
3c7c: e5c8204b strb r2, [r8, #75]
tty->termios.c_cc[VREPRINT] = '\022';
3c80: e5c8304d strb r3, [r8, #77]
tty->termios.c_cc[VDISCARD] = '\017';
3c84: e242200b sub r2, r2, #11 ; 0xb
tty->termios.c_cc[VWERASE] = '\027';
3c88: e2833005 add r3, r3, #5 ; 0x5
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';
3c8c: e5c8204e strb r2, [r8, #78]
tty->termios.c_cc[VWERASE] = '\027';
3c90: e5c8304f strb r3, [r8, #79]
tty->termios.c_cc[VLNEXT] = '\026';
3c94: e2822007 add r2, r2, #7 ; 0x7
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
3c98: e3a00c25 mov r0, #9472 ; 0x2500
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
3c9c: e3a0ce8b mov ip, #2224 ; 0x8b0
tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
3ca0: e3a0ec82 mov lr, #33280 ; 0x8200
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
c = 'a';
3ca4: 059f314c ldreq r3, [pc, #332] ; 3df8 <rtems_termios_open+0x454>
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';
3ca8: e5c82050 strb r2, [r8, #80]
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
3cac: e2800002 add r0, r0, #2 ; 0x2
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
3cb0: e28cc00d add ip, ip, #13 ; 0xd
tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
3cb4: e28ee03b add lr, lr, #59 ; 0x3b
/* 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;
3cb8: e1a050a5 lsr r5, r5, #1
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
c = 'a';
3cbc: 0282204b addeq r2, r2, #75 ; 0x4b
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
3cc0: e5880030 str r0, [r8, #48]
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
3cc4: e588c038 str ip, [r8, #56]
tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
3cc8: e588e03c str lr, [r8, #60]
/* 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;
3ccc: e58850bc str r5, [r8, #188]
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';
3cd0: e5c8404c strb r4, [r8, #76]
tty->termios.c_cc[VEOL2] = '\000';
3cd4: e5c84051 strb r4, [r8, #81]
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
c = 'a';
3cd8: 05c32000 strbeq r2, [r3]
3cdc: eaffff4b b 3a10 <rtems_termios_open+0x6c>
(*tty->device.firstOpen)(major, minor, arg);
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_start(tty->rxTaskId,
3ce0: e59600c4 ldr r0, [r6, #196] <== NOT EXECUTED
3ce4: e59f1114 ldr r1, [pc, #276] ; 3e00 <rtems_termios_open+0x45c><== NOT EXECUTED
3ce8: e1a02006 mov r2, r6 <== NOT EXECUTED
3cec: eb0003df bl 4c70 <rtems_task_start> <== NOT EXECUTED
rtems_termios_rxdaemon,
(rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
3cf0: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
3cf4: 1a000005 bne 3d10 <rtems_termios_open+0x36c> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
sc = rtems_task_start(tty->txTaskId,
3cf8: e1a02006 mov r2, r6 <== NOT EXECUTED
3cfc: e59600c8 ldr r0, [r6, #200] <== NOT EXECUTED
3d00: e59f10fc ldr r1, [pc, #252] ; 3e04 <rtems_termios_open+0x460><== NOT EXECUTED
3d04: eb0003d9 bl 4c70 <rtems_task_start> <== NOT EXECUTED
rtems_termios_txdaemon,
(rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
3d08: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
3d0c: 0affff51 beq 3a58 <rtems_termios_open+0xb4> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
3d10: eb000477 bl 4ef4 <rtems_fatal_error_occurred> <== NOT EXECUTED
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
if (tty->cbuf == NULL) {
free((void *)(tty->rawOutBuf.theBuf));
3d14: e598007c ldr r0, [r8, #124] <== NOT EXECUTED
3d18: eb0014e2 bl 90a8 <free> <== NOT EXECUTED
free((void *)(tty->rawInBuf.theBuf));
3d1c: e5980058 ldr r0, [r8, #88] <== NOT EXECUTED
3d20: eb0014e0 bl 90a8 <free> <== NOT EXECUTED
free(tty);
3d24: e1a00008 mov r0, r8 <== NOT EXECUTED
3d28: eb0014de bl 90a8 <free> <== NOT EXECUTED
rtems_semaphore_release (rtems_termios_ttyMutex);
3d2c: e59b0000 ldr r0, [fp] <== NOT EXECUTED
3d30: eb0002f8 bl 4918 <rtems_semaphore_release> <== NOT EXECUTED
3d34: e3a0901a mov r9, #26 ; 0x1a <== NOT EXECUTED
3d38: eaffff48 b 3a60 <rtems_termios_open+0xbc> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
3d3c: e59f30b4 ldr r3, [pc, #180] ; 3df8 <rtems_termios_open+0x454><== NOT EXECUTED
3d40: e5d30000 ldrb r0, [r3] <== NOT EXECUTED
3d44: e3800315 orr r0, r0, #1409286144 ; 0x54000000 <== NOT EXECUTED
3d48: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED
3d4c: e3800852 orr r0, r0, #5373952 ; 0x520000 <== NOT EXECUTED
3d50: e288c068 add ip, r8, #104 ; 0x68 <== NOT EXECUTED
3d54: e3800c72 orr r0, r0, #29184 ; 0x7200 <== NOT EXECUTED
3d58: e3a02024 mov r2, #36 ; 0x24 <== NOT EXECUTED
3d5c: e1a03001 mov r3, r1 <== NOT EXECUTED
3d60: e58dc000 str ip, [sp] <== NOT EXECUTED
3d64: eb000200 bl 456c <rtems_semaphore_create> <== NOT EXECUTED
rtems_build_name ('T', 'R', 'r', c),
0,
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->rawInBuf.Semaphore);
if (sc != RTEMS_SUCCESSFUL)
3d68: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
3d6c: 0affffa1 beq 3bf8 <rtems_termios_open+0x254> <== NOT EXECUTED
sc = rtems_task_start(tty->txTaskId,
rtems_termios_txdaemon,
(rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
3d70: eb00045f bl 4ef4 <rtems_fatal_error_occurred> <== NOT EXECUTED
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_create (
3d74: e59f107c ldr r1, [pc, #124] ; 3df8 <rtems_termios_open+0x454><== NOT EXECUTED
3d78: e5d10000 ldrb r0, [r1] <== NOT EXECUTED
3d7c: e3800315 orr r0, r0, #1409286144 ; 0x54000000 <== NOT EXECUTED
3d80: e380071e orr r0, r0, #7864320 ; 0x780000 <== NOT EXECUTED
3d84: e288c0c8 add ip, r8, #200 ; 0xc8 <== NOT EXECUTED
3d88: e3800b15 orr r0, r0, #21504 ; 0x5400 <== NOT EXECUTED
3d8c: e3a0100a mov r1, #10 ; 0xa <== NOT EXECUTED
3d90: e3a02b01 mov r2, #1024 ; 0x400 <== NOT EXECUTED
3d94: e3a03c05 mov r3, #1280 ; 0x500 <== NOT EXECUTED
3d98: e88d1020 stm sp, {r5, ip} <== NOT EXECUTED
3d9c: eb000306 bl 49bc <rtems_task_create> <== NOT EXECUTED
TERMIOS_TXTASK_STACKSIZE,
RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE |
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->txTaskId);
if (sc != RTEMS_SUCCESSFUL)
3da0: e250e000 subs lr, r0, #0 ; 0x0 <== NOT EXECUTED
3da4: 1affffd9 bne 3d10 <rtems_termios_open+0x36c> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
3da8: e59f2048 ldr r2, [pc, #72] ; 3df8 <rtems_termios_open+0x454><== NOT EXECUTED
3dac: e5d20000 ldrb r0, [r2] <== NOT EXECUTED
3db0: e3800452 orr r0, r0, #1375731712 ; 0x52000000 <== NOT EXECUTED
3db4: e380071e orr r0, r0, #7864320 ; 0x780000 <== NOT EXECUTED
3db8: e288c0c4 add ip, r8, #196 ; 0xc4 <== NOT EXECUTED
3dbc: e3800b15 orr r0, r0, #21504 ; 0x5400 <== NOT EXECUTED
3dc0: e3a01009 mov r1, #9 ; 0x9 <== NOT EXECUTED
3dc4: e3a02b01 mov r2, #1024 ; 0x400 <== NOT EXECUTED
3dc8: e3a03c05 mov r3, #1280 ; 0x500 <== NOT EXECUTED
3dcc: e58de000 str lr, [sp] <== NOT EXECUTED
3dd0: e58dc004 str ip, [sp, #4] <== NOT EXECUTED
3dd4: eb0002f8 bl 49bc <rtems_task_create> <== NOT EXECUTED
TERMIOS_RXTASK_STACKSIZE,
RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE |
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->rxTaskId);
if (sc != RTEMS_SUCCESSFUL)
3dd8: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
3ddc: 0affff7f beq 3be0 <rtems_termios_open+0x23c> <== NOT EXECUTED
sc = rtems_task_start(tty->txTaskId,
rtems_termios_txdaemon,
(rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
3de0: eb000443 bl 4ef4 <rtems_fatal_error_occurred> <== NOT EXECUTED
0000279c <rtems_termios_puts>:
const unsigned char *buf = _buf;
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
279c: e59230b4 ldr r3, [r2, #180]
27a0: e3530000 cmp r3, #0 ; 0x0
* Send characters to device-specific code
*/
void
rtems_termios_puts (
const void *_buf, int len, struct rtems_termios_tty *tty)
{
27a4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
27a8: e1a04002 mov r4, r2
27ac: e1a0b000 mov fp, r0
27b0: e1a09001 mov r9, r1
const unsigned char *buf = _buf;
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
27b4: 0a00003a beq 28a4 <rtems_termios_puts+0x108>
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
while (len) {
27b8: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
27bc: e5928080 ldr r8, [r2, #128] <== NOT EXECUTED
while (len) {
27c0: 08bd8ff0 popeq {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
27c4: e3a0a000 mov sl, #0 ; 0x0 <== NOT EXECUTED
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
rtems_interrupt_disable (level);
while (newHead == tty->rawOutBuf.Tail) {
tty->rawOutBufState = rob_wait;
27c8: e3a07002 mov r7, #2 ; 0x2 <== NOT EXECUTED
* len -= ncopy
*
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
27cc: e5941088 ldr r1, [r4, #136] <== NOT EXECUTED
27d0: e2880001 add r0, r8, #1 ; 0x1 <== NOT EXECUTED
27d4: eb004179 bl 12dc0 <__umodsi3> <== NOT EXECUTED
27d8: e1a08000 mov r8, r0 <== NOT EXECUTED
rtems_interrupt_disable (level);
27dc: e10f5000 mrs r5, CPSR <== NOT EXECUTED
27e0: e38530c0 orr r3, r5, #192 ; 0xc0 <== NOT EXECUTED
27e4: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
while (newHead == tty->rawOutBuf.Tail) {
27e8: e5946084 ldr r6, [r4, #132] <== NOT EXECUTED
27ec: e1560000 cmp r6, r0 <== NOT EXECUTED
27f0: 1a00000d bne 282c <rtems_termios_puts+0x90> <== NOT EXECUTED
tty->rawOutBufState = rob_wait;
27f4: e5847094 str r7, [r4, #148] <== NOT EXECUTED
rtems_interrupt_enable (level);
27f8: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore,
27fc: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED
2800: e594008c ldr r0, [r4, #140] <== NOT EXECUTED
2804: e1a02001 mov r2, r1 <== NOT EXECUTED
2808: eb0007fb bl 47fc <rtems_semaphore_obtain> <== NOT EXECUTED
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
280c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
2810: 1a00001a bne 2880 <rtems_termios_puts+0xe4> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
2814: e10f5000 mrs r5, CPSR <== NOT EXECUTED
2818: e38530c0 orr r3, r5, #192 ; 0xc0 <== NOT EXECUTED
281c: e129f003 msr CPSR_fc, r3 <== 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) {
2820: e5943084 ldr r3, [r4, #132] <== NOT EXECUTED
2824: e1530006 cmp r3, r6 <== NOT EXECUTED
2828: 0afffff1 beq 27f4 <rtems_termios_puts+0x58> <== NOT EXECUTED
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
282c: e5940080 ldr r0, [r4, #128] <== NOT EXECUTED
2830: e7db100a ldrb r1, [fp, sl] <== NOT EXECUTED
2834: e594307c ldr r3, [r4, #124] <== NOT EXECUTED
2838: e7c31000 strb r1, [r3, r0] <== NOT EXECUTED
tty->rawOutBuf.Head = newHead;
if (tty->rawOutBufState == rob_idle) {
283c: e5942094 ldr r2, [r4, #148] <== NOT EXECUTED
2840: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
tty->rawOutBuf.Head = newHead;
2844: e5848080 str r8, [r4, #128] <== NOT EXECUTED
if (tty->rawOutBufState == rob_idle) {
2848: 1a000007 bne 286c <rtems_termios_puts+0xd0> <== NOT EXECUTED
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
284c: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED
2850: e3130010 tst r3, #16 ; 0x10 <== NOT EXECUTED
(*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;
2854: 159430b8 ldrne r3, [r4, #184] <== NOT EXECUTED
2858: 13833020 orrne r3, r3, #32 ; 0x20 <== NOT EXECUTED
285c: 158430b8 strne r3, [r4, #184] <== NOT EXECUTED
}
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)) {
2860: 0a000007 beq 2884 <rtems_termios_puts+0xe8> <== NOT EXECUTED
}
else {
/* remember that output has been stopped due to flow ctrl*/
tty->flow_ctrl |= FL_OSTOP;
}
tty->rawOutBufState = rob_busy;
2864: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED
2868: e5843094 str r3, [r4, #148] <== NOT EXECUTED
}
rtems_interrupt_enable (level);
286c: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
while (len) {
2870: e2599001 subs r9, r9, #1 ; 0x1 <== NOT EXECUTED
tty->flow_ctrl |= FL_OSTOP;
}
tty->rawOutBufState = rob_busy;
}
rtems_interrupt_enable (level);
len--;
2874: e28aa001 add sl, sl, #1 ; 0x1 <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
while (len) {
2878: 1affffd3 bne 27cc <rtems_termios_puts+0x30> <== NOT EXECUTED
287c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore,
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
2880: eb00099b bl 4ef4 <rtems_fatal_error_occurred> <== NOT EXECUTED
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,
2884: e5943084 ldr r3, [r4, #132] <== NOT EXECUTED
2888: e594107c ldr r1, [r4, #124] <== NOT EXECUTED
288c: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
2890: e0811003 add r1, r1, r3 <== NOT EXECUTED
2894: e2822001 add r2, r2, #1 ; 0x1 <== NOT EXECUTED
2898: e1a0e00f mov lr, pc <== NOT EXECUTED
289c: e594f0a4 ldr pc, [r4, #164] <== NOT EXECUTED
28a0: eaffffef b 2864 <rtems_termios_puts+0xc8> <== NOT EXECUTED
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, (void *)buf, len);
28a4: e1a01000 mov r1, r0
28a8: e1a02009 mov r2, r9
28ac: e5940010 ldr r0, [r4, #16]
28b0: e1a0e00f mov lr, pc
28b4: e594f0a4 ldr pc, [r4, #164]
28b8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
00002ff8 <rtems_termios_read>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
2ff8: e92d4ff0 push {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;
2ffc: e5903000 ldr r3, [r0] <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
3000: e1a0a000 mov sl, r0 <== NOT EXECUTED
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
3004: e5934028 ldr r4, [r3, #40] <== 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);
3008: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED
rtems_termios_read (void *arg)
{
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
uint32_t count = args->count;
char *buffer = args->buffer;
300c: e59a3008 ldr r3, [sl, #8] <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
3010: e24dd010 sub sp, sp, #16 ; 0x10 <== 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);
3014: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED
3018: e1a02001 mov r2, r1 <== 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;
301c: e59a700c ldr r7, [sl, #12] <== NOT EXECUTED
char *buffer = args->buffer;
3020: e58d3000 str r3, [sp] <== NOT EXECUTED
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
3024: eb0005f4 bl 47fc <rtems_semaphore_obtain> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
3028: e250b000 subs fp, r0, #0 ; 0x0 <== NOT EXECUTED
302c: 1a00000f bne 3070 <rtems_termios_read+0x78> <== NOT EXECUTED
return sc;
if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
3030: e59430cc ldr r3, [r4, #204] <== NOT EXECUTED
3034: e59f23c0 ldr r2, [pc, #960] ; 33fc <rtems_termios_read+0x404><== NOT EXECUTED
3038: e1a03103 lsl r3, r3, #2 <== NOT EXECUTED
303c: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED
3040: e7923183 ldr r3, [r2, r3, lsl #3] <== NOT EXECUTED
3044: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
3048: 0a00000b beq 307c <rtems_termios_read+0x84> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
304c: e1a0100a mov r1, sl <== NOT EXECUTED
3050: e1a00004 mov r0, r4 <== NOT EXECUTED
3054: e1a0e00f mov lr, pc <== NOT EXECUTED
3058: e12fff13 bx r3 <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
305c: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
return sc;
if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
3060: e1a0b000 mov fp, r0 <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
3064: e58430e4 str r3, [r4, #228] <== NOT EXECUTED
rtems_semaphore_release (tty->isem);
3068: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED
306c: eb000629 bl 4918 <rtems_semaphore_release> <== NOT EXECUTED
}
args->bytes_moved = args->count - count;
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
3070: e1a0000b mov r0, fp <== NOT EXECUTED
3074: e28dd010 add sp, sp, #16 ; 0x10 <== NOT EXECUTED
3078: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
307c: e5942024 ldr r2, [r4, #36] <== NOT EXECUTED
3080: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED
3084: e1520003 cmp r2, r3 <== NOT EXECUTED
3088: 0a00001b beq 30fc <rtems_termios_read+0x104> <== NOT EXECUTED
else
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
308c: e3570000 cmp r7, #0 ; 0x0 <== NOT EXECUTED
3090: 0a000011 beq 30dc <rtems_termios_read+0xe4> <== NOT EXECUTED
3094: e5942024 ldr r2, [r4, #36] <== NOT EXECUTED
3098: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED
309c: e1520003 cmp r2, r3 <== NOT EXECUTED
30a0: aa00000d bge 30dc <rtems_termios_read+0xe4> <== NOT EXECUTED
*buffer++ = tty->cbuf[tty->cindex++];
30a4: e59d3000 ldr r3, [sp] <== NOT EXECUTED
else
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
30a8: e1a01002 mov r1, r2 <== NOT EXECUTED
*buffer++ = tty->cbuf[tty->cindex++];
30ac: e0620003 rsb r0, r2, r3 <== NOT EXECUTED
30b0: ea000002 b 30c0 <rtems_termios_read+0xc8> <== NOT EXECUTED
else
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
30b4: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED
30b8: e1530001 cmp r3, r1 <== NOT EXECUTED
30bc: da000006 ble 30dc <rtems_termios_read+0xe4> <== NOT EXECUTED
*buffer++ = tty->cbuf[tty->cindex++];
30c0: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
30c4: e7d32001 ldrb r2, [r3, r1] <== NOT EXECUTED
else
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
30c8: e2577001 subs r7, r7, #1 ; 0x1 <== NOT EXECUTED
*buffer++ = tty->cbuf[tty->cindex++];
30cc: e7c02001 strb r2, [r0, r1] <== NOT EXECUTED
30d0: e2811001 add r1, r1, #1 ; 0x1 <== NOT EXECUTED
30d4: e5841024 str r1, [r4, #36] <== NOT EXECUTED
else
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
30d8: 1afffff5 bne 30b4 <rtems_termios_read+0xbc> <== NOT EXECUTED
*buffer++ = tty->cbuf[tty->cindex++];
count--;
}
args->bytes_moved = args->count - count;
30dc: e59a300c ldr r3, [sl, #12] <== NOT EXECUTED
30e0: e0673003 rsb r3, r7, r3 <== NOT EXECUTED
30e4: e58a3014 str r3, [sl, #20] <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
30e8: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED
30ec: e58420e4 str r2, [r4, #228] <== NOT EXECUTED
rtems_semaphore_release (tty->isem);
30f0: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED
30f4: eb000607 bl 4918 <rtems_semaphore_release> <== NOT EXECUTED
30f8: eaffffdc b 3070 <rtems_termios_read+0x78> <== NOT EXECUTED
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
tty->read_start_column = tty->column;
if (tty->device.pollRead != NULL
30fc: e59420a0 ldr r2, [r4, #160] <== NOT EXECUTED
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
tty->read_start_column = tty->column;
3100: e5943028 ldr r3, [r4, #40] <== NOT EXECUTED
if (tty->device.pollRead != NULL
3104: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
tty->read_start_column = tty->column;
3108: e584302c str r3, [r4, #44] <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
310c: e584b020 str fp, [r4, #32] <== NOT EXECUTED
3110: e584b024 str fp, [r4, #36] <== NOT EXECUTED
tty->read_start_column = tty->column;
if (tty->device.pollRead != NULL
3114: e1a01002 mov r1, r2 <== NOT EXECUTED
3118: 0a000002 beq 3128 <rtems_termios_read+0x130> <== NOT EXECUTED
311c: e59430b4 ldr r3, [r4, #180] <== NOT EXECUTED
3120: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
3124: 0a000060 beq 32ac <rtems_termios_read+0x2b4> <== NOT EXECUTED
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
|| (tty->flow_ctrl & FL_OSTOP))) {
/* XON should be sent now... */
(*tty->device.write)(tty->minor,
3128: e2843049 add r3, r4, #73 ; 0x49 <== NOT EXECUTED
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
312c: e3a06c02 mov r6, #512 ; 0x200 <== 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;
3130: e5945074 ldr r5, [r4, #116] <== NOT EXECUTED
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
|| (tty->flow_ctrl & FL_OSTOP))) {
/* XON should be sent now... */
(*tty->device.write)(tty->minor,
3134: e58d3004 str r3, [sp, #4] <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
3138: e59f92c0 ldr r9, [pc, #704] ; 3400 <rtems_termios_read+0x408><== NOT EXECUTED
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
313c: e2866002 add r6, r6, #2 ; 0x2 <== NOT EXECUTED
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
|| (tty->flow_ctrl & FL_OSTOP))) {
/* XON should be sent now... */
(*tty->device.write)(tty->minor,
3140: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
3144: e594205c ldr r2, [r4, #92] <== NOT EXECUTED
3148: e5943060 ldr r3, [r4, #96] <== NOT EXECUTED
314c: e1520003 cmp r2, r3 <== NOT EXECUTED
3150: 0a000037 beq 3234 <rtems_termios_read+0x23c> <== NOT EXECUTED
3154: e5993000 ldr r3, [r9] <== NOT EXECUTED
3158: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED
315c: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED
3160: e1520003 cmp r2, r3 <== NOT EXECUTED
3164: aa000032 bge 3234 <rtems_termios_read+0x23c> <== NOT EXECUTED
(tty->ccount < (CBUFSIZE-1))) {
unsigned char c;
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
3168: e594005c ldr r0, [r4, #92] <== NOT EXECUTED
316c: e5941064 ldr r1, [r4, #100] <== NOT EXECUTED
3170: e2800001 add r0, r0, #1 ; 0x1 <== NOT EXECUTED
3174: eb003f11 bl 12dc0 <__umodsi3> <== NOT EXECUTED
c = tty->rawInBuf.theBuf[newHead];
3178: e5943058 ldr r3, [r4, #88] <== NOT EXECUTED
317c: e7d35000 ldrb r5, [r3, r0] <== NOT EXECUTED
tty->rawInBuf.Head = newHead;
3180: e584005c str r0, [r4, #92] <== 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;
3184: e1a02000 mov r2, r0 <== NOT EXECUTED
c = tty->rawInBuf.theBuf[newHead];
tty->rawInBuf.Head = newHead;
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
3188: e5943060 ldr r3, [r4, #96] <== NOT EXECUTED
318c: e5940064 ldr r0, [r4, #100] <== NOT EXECUTED
3190: e0800003 add r0, r0, r3 <== NOT EXECUTED
3194: e5941064 ldr r1, [r4, #100] <== NOT EXECUTED
3198: e0620000 rsb r0, r2, r0 <== NOT EXECUTED
319c: eb003f07 bl 12dc0 <__umodsi3> <== NOT EXECUTED
31a0: e59430bc ldr r3, [r4, #188] <== NOT EXECUTED
31a4: e1500003 cmp r0, r3 <== NOT EXECUTED
31a8: 2a000014 bcs 3200 <rtems_termios_read+0x208> <== NOT EXECUTED
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
31ac: e59420b8 ldr r2, [r4, #184] <== NOT EXECUTED
31b0: e3c22001 bic r2, r2, #1 ; 0x1 <== NOT EXECUTED
31b4: e58420b8 str r2, [r4, #184] <== NOT EXECUTED
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
31b8: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED
31bc: e3c33f7f bic r3, r3, #508 ; 0x1fc <== NOT EXECUTED
31c0: e3c33001 bic r3, r3, #1 ; 0x1 <== NOT EXECUTED
31c4: e1a03b03 lsl r3, r3, #22 <== NOT EXECUTED
31c8: e1a03b23 lsr r3, r3, #22 <== NOT EXECUTED
31cc: e1530006 cmp r3, r6 <== NOT EXECUTED
31d0: 0a000029 beq 327c <rtems_termios_read+0x284> <== NOT EXECUTED
/* XON should be sent now... */
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTART]),
1);
}
else if (tty->flow_ctrl & FL_MDRTS) {
31d4: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED
31d8: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED
31dc: 0a000007 beq 3200 <rtems_termios_read+0x208> <== NOT EXECUTED
tty->flow_ctrl &= ~FL_IRTSOFF;
31e0: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
31e4: e59420b0 ldr r2, [r4, #176] <== NOT EXECUTED
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTART]),
1);
}
else if (tty->flow_ctrl & FL_MDRTS) {
tty->flow_ctrl &= ~FL_IRTSOFF;
31e8: e3c33004 bic r3, r3, #4 ; 0x4 <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
31ec: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTART]),
1);
}
else if (tty->flow_ctrl & FL_MDRTS) {
tty->flow_ctrl &= ~FL_IRTSOFF;
31f0: e58430b8 str r3, [r4, #184] <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
tty->device.startRemoteTx(tty->minor);
31f4: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED
31f8: 11a0e00f movne lr, pc <== NOT EXECUTED
31fc: 112fff12 bxne r2 <== NOT EXECUTED
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
3200: e594303c ldr r3, [r4, #60] <== NOT EXECUTED
3204: e3130002 tst r3, #2 ; 0x2 <== NOT EXECUTED
3208: 0a000012 beq 3258 <rtems_termios_read+0x260> <== NOT EXECUTED
if (siproc (c, tty))
320c: e1a00005 mov r0, r5 <== NOT EXECUTED
3210: e1a01004 mov r1, r4 <== NOT EXECUTED
3214: ebffff0a bl 2e44 <siproc> <== NOT EXECUTED
3218: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
321c: 1a000014 bne 3274 <rtems_termios_read+0x27c> <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
3220: e594205c ldr r2, [r4, #92] <== NOT EXECUTED
3224: e5943060 ldr r3, [r4, #96] <== NOT EXECUTED
3228: e1520003 cmp r2, r3 <== NOT EXECUTED
else {
siproc (c, tty);
if (tty->ccount >= tty->termios.c_cc[VMIN])
wait = 0;
}
timeout = tty->rawInBufSemaphoreTimeout;
322c: e5945070 ldr r5, [r4, #112] <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
3230: 1affffc7 bne 3154 <rtems_termios_read+0x15c> <== NOT EXECUTED
}
/*
* Wait for characters
*/
if ( wait ) {
3234: e3580000 cmp r8, #0 ; 0x0 <== NOT EXECUTED
3238: 0affff93 beq 308c <rtems_termios_read+0x94> <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore,
323c: e2840068 add r0, r4, #104 ; 0x68 <== NOT EXECUTED
3240: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED
3244: e1a02005 mov r2, r5 <== NOT EXECUTED
3248: eb00056b bl 47fc <rtems_semaphore_obtain> <== NOT EXECUTED
tty->rawInBufSemaphoreOptions,
timeout);
if (sc != RTEMS_SUCCESSFUL)
324c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
3250: 0affffbb beq 3144 <rtems_termios_read+0x14c> <== NOT EXECUTED
3254: eaffff8c b 308c <rtems_termios_read+0x94> <== NOT EXECUTED
if (tty->termios.c_lflag & ICANON) {
if (siproc (c, tty))
wait = 0;
}
else {
siproc (c, tty);
3258: e1a00005 mov r0, r5 <== NOT EXECUTED
325c: e1a01004 mov r1, r4 <== NOT EXECUTED
3260: ebfffef7 bl 2e44 <siproc> <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
3264: e5d42047 ldrb r2, [r4, #71] <== NOT EXECUTED
3268: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED
326c: e1530002 cmp r3, r2 <== NOT EXECUTED
3270: baffffea blt 3220 <rtems_termios_read+0x228> <== NOT EXECUTED
3274: e3a08000 mov r8, #0 ; 0x0 <== NOT EXECUTED
3278: eaffffe8 b 3220 <rtems_termios_read+0x228> <== NOT EXECUTED
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
327c: e5943094 ldr r3, [r4, #148] <== NOT EXECUTED
3280: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
3284: 0a000002 beq 3294 <rtems_termios_read+0x29c> <== NOT EXECUTED
3288: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED
328c: e3130020 tst r3, #32 ; 0x20 <== NOT EXECUTED
3290: 0affffcf beq 31d4 <rtems_termios_read+0x1dc> <== NOT EXECUTED
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
|| (tty->flow_ctrl & FL_OSTOP))) {
/* XON should be sent now... */
(*tty->device.write)(tty->minor,
3294: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
3298: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED
329c: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED
32a0: e1a0e00f mov lr, pc <== NOT EXECUTED
32a4: e594f0a4 ldr pc, [r4, #164] <== NOT EXECUTED
32a8: eaffffd4 b 3200 <rtems_termios_read+0x208> <== NOT EXECUTED
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
32ac: e594303c ldr r3, [r4, #60] <== NOT EXECUTED
32b0: e3130002 tst r3, #2 ; 0x2 <== NOT EXECUTED
32b4: 1a000032 bne 3384 <rtems_termios_read+0x38c> <== NOT EXECUTED
}
}
}
else {
rtems_interval then, now;
if (!tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
32b8: e5d43047 ldrb r3, [r4, #71] <== NOT EXECUTED
32bc: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
32c0: 1a000006 bne 32e0 <rtems_termios_read+0x2e8> <== NOT EXECUTED
32c4: e5d43046 ldrb r3, [r4, #70] <== NOT EXECUTED
32c8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
32cc: 0a000003 beq 32e0 <rtems_termios_read+0x2e8> <== NOT EXECUTED
rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then);
32d0: e3a00002 mov r0, #2 ; 0x2 <== NOT EXECUTED
32d4: e28d100c add r1, sp, #12 ; 0xc <== NOT EXECUTED
32d8: eb00030b bl 3f0c <rtems_clock_get> <== NOT EXECUTED
32dc: e59420a0 ldr r2, [r4, #160] <== NOT EXECUTED
else {
siproc (n, tty);
if (tty->ccount >= tty->termios.c_cc[VMIN])
break;
if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then);
32e0: e28d600c add r6, sp, #12 ; 0xc <== NOT EXECUTED
}
}
else {
if (!tty->termios.c_cc[VTIME])
break;
rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now);
32e4: e28d5008 add r5, sp, #8 ; 0x8 <== NOT EXECUTED
else {
rtems_interval then, now;
if (!tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then);
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
32e8: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
32ec: e1a0e00f mov lr, pc <== NOT EXECUTED
32f0: e12fff12 bx r2 <== NOT EXECUTED
if (n < 0) {
32f4: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
32f8: aa000010 bge 3340 <rtems_termios_read+0x348> <== NOT EXECUTED
if (tty->termios.c_cc[VMIN]) {
32fc: e5d43047 ldrb r3, [r4, #71] <== NOT EXECUTED
3300: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
3304: 0a00002f beq 33c8 <rtems_termios_read+0x3d0> <== NOT EXECUTED
if (tty->termios.c_cc[VTIME] && tty->ccount) {
3308: e5d43046 ldrb r3, [r4, #70] <== NOT EXECUTED
330c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
3310: 0a000002 beq 3320 <rtems_termios_read+0x328> <== NOT EXECUTED
3314: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED
3318: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
331c: 1a00002c bne 33d4 <rtems_termios_read+0x3dc> <== NOT EXECUTED
rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now);
if ((now - then) > tty->vtimeTicks) {
break;
}
}
rtems_task_wake_after (1);
3320: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED
3324: eb00066c bl 4cdc <rtems_task_wake_after> <== NOT EXECUTED
3328: e59420a0 ldr r2, [r4, #160] <== NOT EXECUTED
else {
rtems_interval then, now;
if (!tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then);
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
332c: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
3330: e1a0e00f mov lr, pc <== NOT EXECUTED
3334: e12fff12 bx r2 <== NOT EXECUTED
if (n < 0) {
3338: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
333c: baffffee blt 32fc <rtems_termios_read+0x304> <== NOT EXECUTED
}
}
rtems_task_wake_after (1);
}
else {
siproc (n, tty);
3340: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED
3344: e1a01004 mov r1, r4 <== NOT EXECUTED
3348: ebfffebd bl 2e44 <siproc> <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
334c: e5d42047 ldrb r2, [r4, #71] <== NOT EXECUTED
3350: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED
3354: e1530002 cmp r3, r2 <== NOT EXECUTED
3358: aaffff4b bge 308c <rtems_termios_read+0x94> <== NOT EXECUTED
break;
if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
335c: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED
3360: 0a000002 beq 3370 <rtems_termios_read+0x378> <== NOT EXECUTED
3364: e5d43046 ldrb r3, [r4, #70] <== NOT EXECUTED
3368: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
336c: 1a000010 bne 33b4 <rtems_termios_read+0x3bc> <== NOT EXECUTED
3370: e59420a0 ldr r2, [r4, #160] <== NOT EXECUTED
3374: eaffffdb b 32e8 <rtems_termios_read+0x2f0> <== NOT EXECUTED
if (tty->termios.c_lflag & ICANON) {
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
rtems_task_wake_after (1);
3378: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED
337c: eb000656 bl 4cdc <rtems_task_wake_after> <== NOT EXECUTED
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
3380: e59410a0 ldr r1, [r4, #160] <== NOT EXECUTED
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
3384: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
3388: e1a0e00f mov lr, pc <== NOT EXECUTED
338c: e12fff11 bx r1 <== NOT EXECUTED
if (n < 0) {
3390: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
rtems_task_wake_after (1);
}
else {
if (siproc (n, tty))
3394: e1a01004 mov r1, r4 <== NOT EXECUTED
3398: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED
int n;
if (tty->termios.c_lflag & ICANON) {
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
339c: bafffff5 blt 3378 <rtems_termios_read+0x380> <== NOT EXECUTED
rtems_task_wake_after (1);
}
else {
if (siproc (n, tty))
33a0: ebfffea7 bl 2e44 <siproc> <== NOT EXECUTED
33a4: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
33a8: 1affff37 bne 308c <rtems_termios_read+0x94> <== NOT EXECUTED
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
33ac: e59410a0 ldr r1, [r4, #160] <== NOT EXECUTED
33b0: eafffff3 b 3384 <rtems_termios_read+0x38c> <== NOT EXECUTED
else {
siproc (n, tty);
if (tty->ccount >= tty->termios.c_cc[VMIN])
break;
if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then);
33b4: e3a00002 mov r0, #2 ; 0x2 <== NOT EXECUTED
33b8: e1a01006 mov r1, r6 <== NOT EXECUTED
33bc: eb0002d2 bl 3f0c <rtems_clock_get> <== NOT EXECUTED
33c0: e59420a0 ldr r2, [r4, #160] <== NOT EXECUTED
33c4: eaffffc7 b 32e8 <rtems_termios_read+0x2f0> <== NOT EXECUTED
break;
}
}
}
else {
if (!tty->termios.c_cc[VTIME])
33c8: e5d43046 ldrb r3, [r4, #70] <== NOT EXECUTED
33cc: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
33d0: 0affff2d beq 308c <rtems_termios_read+0x94> <== NOT EXECUTED
break;
rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now);
33d4: e1a01005 mov r1, r5 <== NOT EXECUTED
33d8: e3a00002 mov r0, #2 ; 0x2 <== NOT EXECUTED
33dc: eb0002ca bl 3f0c <rtems_clock_get> <== NOT EXECUTED
if ((now - then) > tty->vtimeTicks) {
33e0: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED
33e4: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
33e8: e5941054 ldr r1, [r4, #84] <== NOT EXECUTED
33ec: e0623003 rsb r3, r2, r3 <== NOT EXECUTED
33f0: e1530001 cmp r3, r1 <== NOT EXECUTED
33f4: 9affffc9 bls 3320 <rtems_termios_read+0x328> <== NOT EXECUTED
33f8: eaffff23 b 308c <rtems_termios_read+0x94> <== NOT EXECUTED
00002218 <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))
2218: e59030b8 ldr r3, [r0, #184] <== NOT EXECUTED
221c: e3c33fff bic r3, r3, #1020 ; 0x3fc <== NOT EXECUTED
2220: e1a03a83 lsl r3, r3, #21 <== NOT EXECUTED
2224: e3a02b01 mov r2, #1024 ; 0x400 <== NOT EXECUTED
2228: e1a03aa3 lsr r3, r3, #21 <== NOT EXECUTED
222c: e2822001 add r2, r2, #1 ; 0x1 <== NOT EXECUTED
2230: e1530002 cmp r3, r2 <== 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)
{
2234: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
2238: 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))
223c: 0a000038 beq 2324 <rtems_termios_refill_transmitter+0x10c> <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
rtems_interrupt_enable(level);
nToSend = 1;
}
else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF))
2240: e59030b8 ldr r3, [r0, #184] <== NOT EXECUTED
2244: e2033003 and r3, r3, #3 ; 0x3 <== NOT EXECUTED
2248: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED
224c: 0a000051 beq 2398 <rtems_termios_refill_transmitter+0x180> <== NOT EXECUTED
rtems_interrupt_enable(level);
nToSend = 1;
}
else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
2250: e5902080 ldr r2, [r0, #128] <== NOT EXECUTED
2254: e5903084 ldr r3, [r0, #132] <== NOT EXECUTED
2258: e1520003 cmp r2, r3 <== NOT EXECUTED
225c: 0a00002a beq 230c <rtems_termios_refill_transmitter+0xf4> <== NOT EXECUTED
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
return 0;
}
rtems_interrupt_disable(level);
2260: e10f2000 mrs r2, CPSR <== NOT EXECUTED
2264: e38230c0 orr r3, r2, #192 ; 0xc0 <== NOT EXECUTED
2268: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
len = tty->t_dqlen;
tty->t_dqlen = 0;
226c: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED
}
return 0;
}
rtems_interrupt_disable(level);
len = tty->t_dqlen;
2270: e590c090 ldr ip, [r0, #144] <== NOT EXECUTED
tty->t_dqlen = 0;
2274: e5803090 str r3, [r0, #144] <== NOT EXECUTED
rtems_interrupt_enable(level);
2278: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
227c: e5900084 ldr r0, [r0, #132] <== NOT EXECUTED
2280: e5941088 ldr r1, [r4, #136] <== NOT EXECUTED
2284: e08c0000 add r0, ip, r0 <== NOT EXECUTED
2288: eb0042cc bl 12dc0 <__umodsi3> <== NOT EXECUTED
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
228c: e5943094 ldr r3, [r4, #148] <== NOT EXECUTED
2290: e3530002 cmp r3, #2 ; 0x2 <== 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;
2294: e1a06000 mov r6, r0 <== NOT EXECUTED
tty->rawOutBuf.Tail = newTail;
2298: e5840084 str r0, [r4, #132] <== NOT EXECUTED
if (tty->rawOutBufState == rob_wait) {
229c: 0a00005a beq 240c <rtems_termios_refill_transmitter+0x1f4> <== NOT EXECUTED
/*
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
if (newTail == tty->rawOutBuf.Head) {
22a0: e5943080 ldr r3, [r4, #128] <== NOT EXECUTED
22a4: e1530006 cmp r3, r6 <== NOT EXECUTED
22a8: 0a00002f beq 236c <rtems_termios_refill_transmitter+0x154> <== NOT EXECUTED
if ( tty->tty_snd.sw_pfn != NULL) {
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
}
}
/* check, whether output should stop due to received XOFF */
else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
22ac: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED
22b0: e2033e21 and r3, r3, #528 ; 0x210 <== NOT EXECUTED
22b4: e3530e21 cmp r3, #528 ; 0x210 <== NOT EXECUTED
22b8: 0a000048 beq 23e0 <rtems_termios_refill_transmitter+0x1c8> <== NOT EXECUTED
}
else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
22bc: e5943080 ldr r3, [r4, #128] <== NOT EXECUTED
22c0: e1560003 cmp r6, r3 <== NOT EXECUTED
nToSend = tty->rawOutBuf.Size - newTail;
22c4: 85943088 ldrhi r3, [r4, #136] <== NOT EXECUTED
else
nToSend = tty->rawOutBuf.Head - newTail;
22c8: 95943080 ldrls r3, [r4, #128] <== NOT EXECUTED
else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
nToSend = tty->rawOutBuf.Size - newTail;
22cc: 80665003 rsbhi r5, r6, r3 <== NOT EXECUTED
else
nToSend = tty->rawOutBuf.Head - newTail;
22d0: 90665003 rsbls r5, r6, r3 <== 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)) {
22d4: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED
nToSend = 1;
}
tty->rawOutBufState = rob_busy; /*apm*/
(*tty->device.write)(tty->minor,
22d8: e594107c ldr r1, [r4, #124] <== NOT EXECUTED
else
nToSend = tty->rawOutBuf.Head - newTail;
/* when flow control XON or XOF, don't send blocks of data */
/* to allow fast reaction on incoming flow ctrl and low latency*/
/* for outgoing flow control */
if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) {
22dc: e3130c06 tst r3, #1536 ; 0x600 <== NOT EXECUTED
22e0: 13a05001 movne r5, #1 ; 0x1 <== NOT EXECUTED
nToSend = 1;
}
tty->rawOutBufState = rob_busy; /*apm*/
22e4: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED
22e8: e5843094 str r3, [r4, #148] <== NOT EXECUTED
(*tty->device.write)(tty->minor,
22ec: e0811006 add r1, r1, r6 <== NOT EXECUTED
22f0: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
22f4: e1a02005 mov r2, r5 <== NOT EXECUTED
22f8: e1a0e00f mov lr, pc <== NOT EXECUTED
22fc: e594f0a4 ldr pc, [r4, #164] <== NOT EXECUTED
&tty->rawOutBuf.theBuf[newTail],
nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
2300: e5846084 str r6, [r4, #132] <== NOT EXECUTED
}
return nToSend;
}
2304: e1a00005 mov r0, r5 <== NOT EXECUTED
2308: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
/*
* buffer was empty
*/
if (tty->rawOutBufState == rob_wait) {
230c: e5903094 ldr r3, [r0, #148] <== NOT EXECUTED
2310: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED
2314: 0a00003f beq 2418 <rtems_termios_refill_transmitter+0x200> <== NOT EXECUTED
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
2318: e3a05000 mov r5, #0 ; 0x0 <== NOT EXECUTED
nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
231c: e1a00005 mov r0, r5 <== NOT EXECUTED
2320: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
/* check for XOF/XON to send */
if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF))
== (FL_MDXOF | FL_IREQXOF)) {
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor,
2324: e284104a add r1, r4, #74 ; 0x4a <== NOT EXECUTED
2328: e2422b01 sub r2, r2, #1024 ; 0x400 <== NOT EXECUTED
232c: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED
2330: e1a0e00f mov lr, pc <== NOT EXECUTED
2334: e594f0a4 ldr pc, [r4, #164] <== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTOP]), 1);
rtems_interrupt_disable(level);
2338: e10f1000 mrs r1, CPSR <== NOT EXECUTED
233c: e38130c0 orr r3, r1, #192 ; 0xc0 <== NOT EXECUTED
2340: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
tty->t_dqlen--;
2344: e5942090 ldr r2, [r4, #144] <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
2348: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTOP]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
234c: e2422001 sub r2, r2, #1 ; 0x1 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
2350: e3833002 orr r3, r3, #2 ; 0x2 <== NOT EXECUTED
2354: e58430b8 str r3, [r4, #184] <== NOT EXECUTED
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTOP]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
2358: e5842090 str r2, [r4, #144] <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
rtems_interrupt_enable(level);
235c: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED
2360: e3a05001 mov r5, #1 ; 0x1 <== NOT EXECUTED
nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
2364: e1a00005 mov r0, r5 <== NOT EXECUTED
2368: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
236c: e59420d4 ldr r2, [r4, #212] <== NOT EXECUTED
}
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
2370: e3a05000 mov r5, #0 ; 0x0 <== NOT EXECUTED
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
2374: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED
}
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
2378: e5845094 str r5, [r4, #148] <== NOT EXECUTED
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
237c: 01a05002 moveq r5, r2 <== NOT EXECUTED
2380: 0affffde beq 2300 <rtems_termios_refill_transmitter+0xe8> <== NOT EXECUTED
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
2384: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED
2388: e59410d8 ldr r1, [r4, #216] <== NOT EXECUTED
238c: e1a0e00f mov lr, pc <== NOT EXECUTED
2390: e12fff12 bx r2 <== NOT EXECUTED
2394: eaffffd9 b 2300 <rtems_termios_refill_transmitter+0xe8> <== 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,
2398: e2841049 add r1, r4, #73 ; 0x49 <== NOT EXECUTED
239c: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED
23a0: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED
23a4: e1a0e00f mov lr, pc <== NOT EXECUTED
23a8: e594f0a4 ldr pc, [r4, #164] <== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTART]), 1);
rtems_interrupt_disable(level);
23ac: e10f1000 mrs r1, CPSR <== NOT EXECUTED
23b0: e38130c0 orr r3, r1, #192 ; 0xc0 <== NOT EXECUTED
23b4: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
tty->t_dqlen--;
23b8: e5942090 ldr r2, [r4, #144] <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
23bc: e59430b8 ldr r3, [r4, #184] <== NOT EXECUTED
*/
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTART]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
23c0: e2422001 sub r2, r2, #1 ; 0x1 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
23c4: e3c33002 bic r3, r3, #2 ; 0x2 <== NOT EXECUTED
23c8: e58430b8 str r3, [r4, #184] <== NOT EXECUTED
*/
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTART]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
23cc: e5842090 str r2, [r4, #144] <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
rtems_interrupt_enable(level);
23d0: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED
23d4: e3a05001 mov r5, #1 ; 0x1 <== NOT EXECUTED
nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
23d8: e1a00005 mov r0, r5 <== NOT EXECUTED
23dc: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
/* check, whether output should stop due to received XOFF */
else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
== (FL_MDXON | FL_ORCVXOF)) {
/* Buffer not empty, but output stops due to XOFF */
/* set flag, that output has been stopped */
rtems_interrupt_disable(level);
23e0: e10f3000 mrs r3, CPSR <== NOT EXECUTED
23e4: e38320c0 orr r2, r3, #192 ; 0xc0 <== NOT EXECUTED
23e8: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
tty->flow_ctrl |= FL_OSTOP;
23ec: e59420b8 ldr r2, [r4, #184] <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
23f0: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED
else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
== (FL_MDXON | FL_ORCVXOF)) {
/* Buffer not empty, but output stops due to XOFF */
/* set flag, that output has been stopped */
rtems_interrupt_disable(level);
tty->flow_ctrl |= FL_OSTOP;
23f4: e3822020 orr r2, r2, #32 ; 0x20 <== NOT EXECUTED
23f8: e58420b8 str r2, [r4, #184] <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
23fc: e5841094 str r1, [r4, #148] <== NOT EXECUTED
rtems_interrupt_enable(level);
2400: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
2404: e3a05000 mov r5, #0 ; 0x0 <== NOT EXECUTED
2408: eaffffbc b 2300 <rtems_termios_refill_transmitter+0xe8> <== NOT EXECUTED
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
/*
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
240c: e594008c ldr r0, [r4, #140] <== NOT EXECUTED
2410: eb000940 bl 4918 <rtems_semaphore_release> <== NOT EXECUTED
2414: eaffffa1 b 22a0 <rtems_termios_refill_transmitter+0x88> <== NOT EXECUTED
*/
if (tty->rawOutBufState == rob_wait) {
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
2418: e590008c ldr r0, [r0, #140] <== NOT EXECUTED
241c: eb00093d bl 4918 <rtems_semaphore_release> <== NOT EXECUTED
2420: e3a05000 mov r5, #0 ; 0x0 <== NOT EXECUTED
2424: eaffffbc b 231c <rtems_termios_refill_transmitter+0x104> <== NOT EXECUTED
00003e7c <rtems_termios_rxdaemon>:
/*
* this task actually processes any receive events
*/
static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument)
{
3e7c: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
3e80: e24dd008 sub sp, sp, #8 ; 0x8 <== NOT EXECUTED
3e84: e1a04000 mov r4, r0 <== NOT EXECUTED
3e88: e28d6007 add r6, sp, #7 ; 0x7 <== NOT EXECUTED
char c_buf;
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_RX_PROC_EVENT |
3e8c: e3a07000 mov r7, #0 ; 0x0 <== NOT EXECUTED
3e90: e1a0300d mov r3, sp <== NOT EXECUTED
3e94: e3a01002 mov r1, #2 ; 0x2 <== NOT EXECUTED
3e98: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED
3e9c: e3a00003 mov r0, #3 ; 0x3 <== NOT EXECUTED
3ea0: eb0000b6 bl 4180 <rtems_event_receive> <== NOT EXECUTED
TERMIOS_RX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event);
if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) {
3ea4: e59d3000 ldr r3, [sp] <== NOT EXECUTED
3ea8: e3130001 tst r3, #1 ; 0x1 <== NOT EXECUTED
3eac: 1a000012 bne 3efc <rtems_termios_rxdaemon+0x80> <== NOT EXECUTED
}
else {
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
3eb0: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
3eb4: e1a0e00f mov lr, pc <== NOT EXECUTED
3eb8: e594f0a0 ldr pc, [r4, #160] <== NOT EXECUTED
3ebc: e1a03000 mov r3, r0 <== NOT EXECUTED
if (c != EOF) {
3ec0: e3730001 cmn r3, #1 ; 0x1 <== NOT EXECUTED
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
rtems_termios_enqueue_raw_characters (
3ec4: e1a01006 mov r1, r6 <== NOT EXECUTED
3ec8: e1a00004 mov r0, r4 <== NOT EXECUTED
3ecc: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED
else {
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
if (c != EOF) {
3ed0: 0affffee beq 3e90 <rtems_termios_rxdaemon+0x14> <== NOT EXECUTED
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
3ed4: e5cd3007 strb r3, [sp, #7] <== NOT EXECUTED
rtems_termios_enqueue_raw_characters (
3ed8: ebfff96c bl 2490 <rtems_termios_enqueue_raw_characters> <== NOT EXECUTED
char c_buf;
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_RX_PROC_EVENT |
3edc: e1a0300d mov r3, sp <== NOT EXECUTED
3ee0: e3a01002 mov r1, #2 ; 0x2 <== NOT EXECUTED
3ee4: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED
3ee8: e3a00003 mov r0, #3 ; 0x3 <== NOT EXECUTED
3eec: eb0000a3 bl 4180 <rtems_event_receive> <== NOT EXECUTED
TERMIOS_RX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event);
if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) {
3ef0: e59d3000 ldr r3, [sp] <== NOT EXECUTED
3ef4: e3130001 tst r3, #1 ; 0x1 <== NOT EXECUTED
3ef8: 0affffec beq 3eb0 <rtems_termios_rxdaemon+0x34> <== NOT EXECUTED
tty->rxTaskId = 0;
3efc: e58470c4 str r7, [r4, #196] <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
3f00: e1a00007 mov r0, r7 <== NOT EXECUTED
3f04: eb0002fb bl 4af8 <rtems_task_delete> <== NOT EXECUTED
3f08: eaffffe0 b 3e90 <rtems_termios_rxdaemon+0x14> <== NOT EXECUTED
0000220c <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);
220c: e59000c4 ldr r0, [r0, #196] <== NOT EXECUTED
2210: e3a01002 mov r1, #2 ; 0x2 <== NOT EXECUTED
2214: ea00083a b 4304 <rtems_event_send> <== NOT EXECUTED
00003e08 <rtems_termios_txdaemon>:
/*
* this task actually processes any transmit events
*/
static rtems_task rtems_termios_txdaemon(rtems_task_argument argument)
{
3e08: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
3e0c: e59f7064 ldr r7, [pc, #100] ; 3e78 <rtems_termios_txdaemon+0x70><== NOT EXECUTED
3e10: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED
3e14: e1a04000 mov r4, r0 <== NOT EXECUTED
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_TX_START_EVENT |
3e18: e3a06000 mov r6, #0 ; 0x0 <== NOT EXECUTED
3e1c: e1a0300d mov r3, sp <== NOT EXECUTED
3e20: e3a01002 mov r1, #2 ; 0x2 <== NOT EXECUTED
3e24: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED
3e28: e3a00003 mov r0, #3 ; 0x3 <== NOT EXECUTED
3e2c: eb0000d3 bl 4180 <rtems_event_receive> <== NOT EXECUTED
TERMIOS_TX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event);
if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) {
3e30: e59d3000 ldr r3, [sp] <== NOT EXECUTED
3e34: e3130001 tst r3, #1 ; 0x1 <== NOT EXECUTED
else {
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
rtems_termios_linesw[tty->t_line].l_start(tty);
3e38: e1a00004 mov r0, r4 <== NOT EXECUTED
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) {
3e3c: 1a000009 bne 3e68 <rtems_termios_txdaemon+0x60> <== NOT EXECUTED
}
else {
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
3e40: e59430cc ldr r3, [r4, #204] <== NOT EXECUTED
3e44: e1a03283 lsl r3, r3, #5 <== NOT EXECUTED
3e48: e0873003 add r3, r7, r3 <== NOT EXECUTED
3e4c: e5933014 ldr r3, [r3, #20] <== NOT EXECUTED
3e50: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_start(tty);
3e54: 11a0e00f movne lr, pc <== NOT EXECUTED
3e58: 112fff13 bxne r3 <== NOT EXECUTED
}
/*
* try to push further characters to device
*/
rtems_termios_refill_transmitter(tty);
3e5c: e1a00004 mov r0, r4 <== NOT EXECUTED
3e60: ebfff8ec bl 2218 <rtems_termios_refill_transmitter> <== NOT EXECUTED
3e64: eaffffec b 3e1c <rtems_termios_txdaemon+0x14> <== NOT EXECUTED
TERMIOS_TX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event);
if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) {
tty->txTaskId = 0;
3e68: e58460c8 str r6, [r4, #200] <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
3e6c: e1a00006 mov r0, r6 <== NOT EXECUTED
3e70: eb000320 bl 4af8 <rtems_task_delete> <== NOT EXECUTED
3e74: eaffffe8 b 3e1c <rtems_termios_txdaemon+0x14> <== NOT EXECUTED
00002ea8 <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;
2ea8: e5903000 ldr r3, [r0]
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
2eac: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
2eb0: e5935028 ldr r5, [r3, #40]
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
2eb4: e3a01000 mov r1, #0 ; 0x0
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
2eb8: e1a06000 mov r6, 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);
2ebc: e1a02001 mov r2, r1
2ec0: e5950018 ldr r0, [r5, #24]
2ec4: eb00064c bl 47fc <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
2ec8: e250a000 subs sl, r0, #0 ; 0x0
2ecc: 1a00000d bne 2f08 <rtems_termios_write+0x60>
return sc;
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
2ed0: e59520cc ldr r2, [r5, #204]
2ed4: e59f309c ldr r3, [pc, #156] ; 2f78 <rtems_termios_write+0xd0>
2ed8: e1a02282 lsl r2, r2, #5
2edc: e0833002 add r3, r3, r2
2ee0: e593300c ldr r3, [r3, #12]
2ee4: e3530000 cmp r3, #0 ; 0x0
2ee8: 0a000008 beq 2f10 <rtems_termios_write+0x68>
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
2eec: e1a01006 mov r1, r6 <== NOT EXECUTED
2ef0: e1a00005 mov r0, r5 <== NOT EXECUTED
2ef4: e1a0e00f mov lr, pc <== NOT EXECUTED
2ef8: e12fff13 bx r3 <== NOT EXECUTED
2efc: e1a0a000 mov sl, r0 <== NOT EXECUTED
rtems_semaphore_release (tty->osem);
2f00: e5950018 ldr r0, [r5, #24] <== NOT EXECUTED
2f04: eb000683 bl 4918 <rtems_semaphore_release> <== NOT EXECUTED
rtems_termios_puts (args->buffer, args->count, tty);
args->bytes_moved = args->count;
}
rtems_semaphore_release (tty->osem);
return sc;
}
2f08: e1a0000a mov r0, sl <== NOT EXECUTED
2f0c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
rtems_semaphore_release (tty->osem);
return sc;
}
if (tty->termios.c_oflag & OPOST) {
2f10: e5953034 ldr r3, [r5, #52]
2f14: e3130001 tst r3, #1 ; 0x1
2f18: 0a000011 beq 2f64 <rtems_termios_write+0xbc>
uint32_t count = args->count;
2f1c: e596800c ldr r8, [r6, #12]
char *buffer = args->buffer;
while (count--)
2f20: e3580000 cmp r8, #0 ; 0x0
rtems_semaphore_release (tty->osem);
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
2f24: e5967008 ldr r7, [r6, #8]
while (count--)
2f28: 01a0300a moveq r3, sl
2f2c: 0a000007 beq 2f50 <rtems_termios_write+0xa8>
2f30: e1a0400a mov r4, sl
oproc (*buffer++, tty);
2f34: e7d70004 ldrb r0, [r7, r4]
2f38: e1a01005 mov r1, r5
2f3c: e2844001 add r4, r4, #1 ; 0x1
2f40: ebfffe5d bl 28bc <oproc>
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
2f44: e1580004 cmp r8, r4
2f48: 1afffff9 bne 2f34 <rtems_termios_write+0x8c>
oproc (*buffer++, tty);
args->bytes_moved = args->count;
}
else {
rtems_termios_puts (args->buffer, args->count, tty);
args->bytes_moved = args->count;
2f4c: e596300c ldr r3, [r6, #12]
2f50: e5863014 str r3, [r6, #20]
}
rtems_semaphore_release (tty->osem);
2f54: e5950018 ldr r0, [r5, #24]
2f58: eb00066e bl 4918 <rtems_semaphore_release>
return sc;
}
2f5c: e1a0000a mov r0, sl
2f60: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
while (count--)
oproc (*buffer++, tty);
args->bytes_moved = args->count;
}
else {
rtems_termios_puts (args->buffer, args->count, tty);
2f64: e2860008 add r0, r6, #8 ; 0x8 <== NOT EXECUTED
2f68: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED
2f6c: e1a02005 mov r2, r5 <== NOT EXECUTED
2f70: ebfffe09 bl 279c <rtems_termios_puts> <== NOT EXECUTED
2f74: eafffff4 b 2f4c <rtems_termios_write+0xa4> <== NOT EXECUTED
000059b8 <rtems_timer_fire_after>:
Objects_Id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
59b8: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( ticks == 0 )
59bc: e2518000 subs r8, r1, #0 ; 0x0
Objects_Id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
59c0: e1a06000 mov r6, r0
59c4: e24dd004 sub sp, sp, #4 ; 0x4
59c8: e1a05002 mov r5, r2
59cc: e1a07003 mov r7, r3
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( ticks == 0 )
59d0: 03a0000a moveq r0, #10 ; 0xa
59d4: 0a000020 beq 5a5c <rtems_timer_fire_after+0xa4>
return RTEMS_INVALID_NUMBER;
if ( !routine )
59d8: e3520000 cmp r2, #0 ; 0x0
59dc: 03a00009 moveq r0, #9 ; 0x9
59e0: 0a00001d beq 5a5c <rtems_timer_fire_after+0xa4>
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
59e4: e59f0088 ldr r0, [pc, #136] ; 5a74 <rtems_timer_fire_after+0xbc>
59e8: e1a01006 mov r1, r6
59ec: e1a0200d mov r2, sp
59f0: eb0004f4 bl 6dc8 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
59f4: e59d3000 ldr r3, [sp]
59f8: e3530000 cmp r3, #0 ; 0x0
59fc: e1a04000 mov r4, r0
5a00: 13a00004 movne r0, #4 ; 0x4
5a04: 1a000014 bne 5a5c <rtems_timer_fire_after+0xa4>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
5a08: e284a010 add sl, r4, #16 ; 0x10
5a0c: e1a0000a mov r0, sl
5a10: eb000c31 bl 8adc <_Watchdog_Remove>
_ISR_Disable( level );
5a14: e10f2000 mrs r2, CPSR
5a18: e38230c0 orr r3, r2, #192 ; 0xc0
5a1c: 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 ) {
5a20: e5943018 ldr r3, [r4, #24]
5a24: e3530000 cmp r3, #0 ; 0x0
5a28: 1a00000d bne 5a64 <rtems_timer_fire_after+0xac>
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
5a2c: e5843018 str r3, [r4, #24]
the_watchdog->routine = routine;
5a30: e584502c str r5, [r4, #44]
the_watchdog->id = id;
5a34: e5846030 str r6, [r4, #48]
the_watchdog->user_data = user_data;
5a38: e5847034 str r7, [r4, #52]
/*
* 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;
5a3c: e5843038 str r3, [r4, #56]
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
_ISR_Enable( level );
5a40: e129f002 msr CPSR_fc, r2
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
5a44: e59f002c ldr r0, [pc, #44] ; 5a78 <rtems_timer_fire_after+0xc0>
5a48: e1a0100a mov r1, sl
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
5a4c: e584801c str r8, [r4, #28]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
5a50: eb000bb2 bl 8920 <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_timer->Ticker, ticks );
_Thread_Enable_dispatch();
5a54: eb0006fc bl 764c <_Thread_Enable_dispatch>
5a58: e3a00000 mov r0, #0 ; 0x0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
5a5c: e28dd004 add sp, sp, #4 ; 0x4
5a60: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
* 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 ) {
_ISR_Enable( level );
5a64: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
_Thread_Enable_dispatch();
5a68: eb0006f7 bl 764c <_Thread_Enable_dispatch> <== NOT EXECUTED
5a6c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
5a70: eafffff9 b 5a5c <rtems_timer_fire_after+0xa4> <== NOT EXECUTED
000129cc <rtems_timer_initiate_server>:
rtems_status_code rtems_timer_initiate_server(
uint32_t priority,
uint32_t stack_size,
rtems_attribute attribute_set
)
{
129cc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
129d0: e3500000 cmp r0, #0 ; 0x0
129d4: e24dd010 sub sp, sp, #16 ; 0x10
129d8: e1a07001 mov r7, r1
129dc: e1a06002 mov r6, r2
129e0: 1a000002 bne 129f0 <rtems_timer_initiate_server+0x24>
* but there is actually no way (in normal circumstances) that the
* start can fail. The id and starting address are known to be
* be good. If this service fails, something is weirdly wrong on the
* target such as a stray write in an ISR or incorrect memory layout.
*/
initialized = false;
129e4: e3a00013 mov r0, #19 ; 0x13
}
return status;
}
129e8: e28dd010 add sp, sp, #16 ; 0x10
129ec: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
129f0: e59f3144 ldr r3, [pc, #324] ; 12b3c <rtems_timer_initiate_server+0x170>
129f4: e5d32000 ldrb r2, [r3]
129f8: e1500002 cmp r0, r2
129fc: 8a00004a bhi 12b2c <rtems_timer_initiate_server+0x160>
12a00: e1a08000 mov r8, r0 <== NOT EXECUTED
12a04: e59f3134 ldr r3, [pc, #308] ; 12b40 <rtems_timer_initiate_server+0x174>
12a08: e5932000 ldr r2, [r3]
12a0c: e2822001 add r2, r2, #1 ; 0x1
12a10: e5832000 str r2, [r3]
/*
* Just to make sure this is only called once.
*/
_Thread_Disable_dispatch();
tmpInitialized = initialized;
12a14: e59fa128 ldr sl, [pc, #296] ; 12b44 <rtems_timer_initiate_server+0x178>
12a18: e5da5000 ldrb r5, [sl]
initialized = true;
12a1c: e3a03001 mov r3, #1 ; 0x1
12a20: e5ca3000 strb r3, [sl]
_Thread_Enable_dispatch();
12a24: eb000c02 bl 15a34 <_Thread_Enable_dispatch>
if ( tmpInitialized )
12a28: e3550000 cmp r5, #0 ; 0x0
12a2c: 13a0000e movne r0, #14 ; 0xe
12a30: 1affffec bne 129e8 <rtems_timer_initiate_server+0x1c>
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
12a34: e59f410c ldr r4, [pc, #268] ; 12b48 <rtems_timer_initiate_server+0x17c>
12a38: e284c004 add ip, r4, #4 ; 0x4
12a3c: e584c000 str ip, [r4]
* other library rules. For example, if using a TSR written in Ada the
* Server should run at the same priority as the priority Ada task.
* Otherwise, the priority ceiling for the mutex used to protect the
* GNAT run-time is violated.
*/
status = rtems_task_create(
12a40: e386e902 orr lr, r6, #32768 ; 0x8000
12a44: e28dc00c add ip, sp, #12 ; 0xc
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
12a48: e5844008 str r4, [r4, #8]
12a4c: e1a01008 mov r1, r8
12a50: e58de000 str lr, [sp]
12a54: e58dc004 str ip, [sp, #4]
12a58: e1a02007 mov r2, r7
12a5c: e59f00e8 ldr r0, [pc, #232] ; 12b4c <rtems_timer_initiate_server+0x180>
12a60: e3a03c01 mov r3, #256 ; 0x100
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
12a64: e5845004 str r5, [r4, #4]
12a68: ebfffc60 bl 11bf0 <rtems_task_create>
/* user may want floating point but we need */
/* system task specified for 0 priority */
attribute_set | RTEMS_SYSTEM_TASK,
&id /* get the id back */
);
if (status) {
12a6c: e3500000 cmp r0, #0 ; 0x0
initialized = false;
12a70: 15ca5000 strbne r5, [sl]
/* user may want floating point but we need */
/* system task specified for 0 priority */
attribute_set | RTEMS_SYSTEM_TASK,
&id /* get the id back */
);
if (status) {
12a74: 1affffdb bne 129e8 <rtems_timer_initiate_server+0x1c>
* to a TCB pointer from here out.
*
* NOTE: Setting the pointer to the Timer Server TCB to a value other than
* NULL indicates that task-based timer support is initialized.
*/
_Timer_Server = (Thread_Control *)_Objects_Get_local_object(
12a78: e59d200c ldr r2, [sp, #12]
RTEMS_INLINE_ROUTINE Objects_Control *_Objects_Get_local_object(
Objects_Information *information,
uint16_t index
)
{
if ( index > information->maximum )
12a7c: e59fc0cc ldr ip, [pc, #204] ; 12b50 <rtems_timer_initiate_server+0x184>
12a80: e1a03802 lsl r3, r2, #16
12a84: e58d2008 str r2, [sp, #8]
12a88: e1dc21b0 ldrh r2, [ip, #16]
12a8c: e1a01823 lsr r1, r3, #16
12a90: e1520001 cmp r2, r1
12a94: 259c301c ldrcs r3, [ip, #28]
12a98: 27939101 ldrcs r9, [r3, r1, lsl #2]
the_watchdog->routine = routine;
12a9c: e59f30b0 ldr r3, [pc, #176] ; 12b54 <rtems_timer_initiate_server+0x188>
12aa0: 31a09000 movcc r9, r0
12aa4: e5893064 str r3, [r9, #100]
/*
* Initialize the pointer to the timer reset method so applications
* that do not use the Timer Server do not have to pull it in.
*/
_Timer_Server_schedule_operation = _Timer_Server_schedule_operation_method;
12aa8: e59fe0a8 ldr lr, [pc, #168] ; 12b58 <rtems_timer_initiate_server+0x18c>
12aac: e59f30a8 ldr r3, [pc, #168] ; 12b5c <rtems_timer_initiate_server+0x190>
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
12ab0: e59f40a8 ldr r4, [pc, #168] ; 12b60 <rtems_timer_initiate_server+0x194>
the_watchdog->id = id;
12ab4: e59f50a8 ldr r5, [pc, #168] ; 12b64 <rtems_timer_initiate_server+0x198>
12ab8: e59d2008 ldr r2, [sp, #8]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
12abc: e59f60a4 ldr r6, [pc, #164] ; 12b68 <rtems_timer_initiate_server+0x19c>
12ac0: e583e000 str lr, [r3]
* to a TCB pointer from here out.
*
* NOTE: Setting the pointer to the Timer Server TCB to a value other than
* NULL indicates that task-based timer support is initialized.
*/
_Timer_Server = (Thread_Control *)_Objects_Get_local_object(
12ac4: e59fc0a0 ldr ip, [pc, #160] ; 12b6c <rtems_timer_initiate_server+0x1a0>
the_watchdog->routine = routine;
12ac8: e59f3084 ldr r3, [pc, #132] ; 12b54 <rtems_timer_initiate_server+0x188>
the_chain->permanent_null = NULL;
12acc: e3a0b000 mov fp, #0 ; 0x0
_Timer_Server_schedule_operation = _Timer_Server_schedule_operation_method;
/*
* Start the timer server
*/
status = rtems_task_start(
12ad0: e1a00002 mov r0, r2
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
12ad4: e2847004 add r7, r4, #4 ; 0x4
12ad8: e2858004 add r8, r5, #4 ; 0x4
the_watchdog->id = id;
12adc: e5892068 str r2, [r9, #104]
the_watchdog->user_data = user_data;
12ae0: e589b06c str fp, [r9, #108]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
12ae4: e589b050 str fp, [r9, #80]
12ae8: e59f1080 ldr r1, [pc, #128] ; 12b70 <rtems_timer_initiate_server+0x1a4>
12aec: e1a0200b mov r2, fp
* to a TCB pointer from here out.
*
* NOTE: Setting the pointer to the Timer Server TCB to a value other than
* NULL indicates that task-based timer support is initialized.
*/
_Timer_Server = (Thread_Control *)_Objects_Get_local_object(
12af0: e58c9000 str r9, [ip]
12af4: e5847000 str r7, [r4]
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
12af8: e5844008 str r4, [r4, #8]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
12afc: e5858000 str r8, [r5]
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
12b00: e5855008 str r5, [r5, #8]
the_watchdog->routine = routine;
12b04: e586301c str r3, [r6, #28]
the_watchdog->id = id;
the_watchdog->user_data = user_data;
12b08: e586b024 str fp, [r6, #36]
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
12b0c: e584b004 str fp, [r4, #4]
12b10: e585b004 str fp, [r5, #4]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
12b14: e586b008 str fp, [r6, #8]
the_watchdog->routine = routine;
the_watchdog->id = id;
12b18: e5860020 str r0, [r6, #32]
_Timer_Server_schedule_operation = _Timer_Server_schedule_operation_method;
/*
* Start the timer server
*/
status = rtems_task_start(
12b1c: ebfffd8e bl 1215c <rtems_task_start>
id, /* the id from create */
(rtems_task_entry) _Timer_Server_body, /* the timer server entry point */
0 /* there is no argument */
);
if (status) {
12b20: e3500000 cmp r0, #0 ; 0x0
* but there is actually no way (in normal circumstances) that the
* start can fail. The id and starting address are known to be
* be good. If this service fails, something is weirdly wrong on the
* target such as a stray write in an ISR or incorrect memory layout.
*/
initialized = false;
12b24: 15cab000 strbne fp, [sl]
12b28: eaffffae b 129e8 <rtems_timer_initiate_server+0x1c>
* structured so we check it is invalid before looking for
* a specific invalid value as the default.
*/
_priority = priority;
if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) {
if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY )
12b2c: e3700001 cmn r0, #1 ; 0x1
12b30: 03a08000 moveq r8, #0 ; 0x0
12b34: 0affffb2 beq 12a04 <rtems_timer_initiate_server+0x38>
12b38: eaffffa9 b 129e4 <rtems_timer_initiate_server+0x18>
00012714 <rtems_timer_reset>:
*/
rtems_status_code rtems_timer_reset(
Objects_Id id
)
{
12714: e92d4030 push {r4, r5, lr}
12718: e24dd004 sub sp, sp, #4 ; 0x4
1271c: e1a01000 mov r1, r0
12720: e1a0200d mov r2, sp
12724: e59f00a8 ldr r0, [pc, #168] ; 127d4 <rtems_timer_reset+0xc0>
12728: eb000a7c bl 15120 <_Objects_Get>
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
1272c: e59d3000 ldr r3, [sp]
12730: e3530000 cmp r3, #0 ; 0x0
12734: e1a04000 mov r4, r0
12738: 13a00004 movne r0, #4 ; 0x4
1273c: 1a00000a bne 1276c <rtems_timer_reset+0x58>
case OBJECTS_LOCAL:
switch ( the_timer->the_class ) {
12740: e5943038 ldr r3, [r4, #56]
12744: e3530004 cmp r3, #4 ; 0x4
12748: 979ff103 ldrls pc, [pc, r3, lsl #2]
1274c: ea000011 b 12798 <rtems_timer_reset+0x84> <== NOT EXECUTED
12750: 000127b0 .word 0x000127b0 <== NOT EXECUTED
12754: 00012774 .word 0x00012774 <== NOT EXECUTED
12758: 000127a4 .word 0x000127a4 <== NOT EXECUTED
1275c: 000127a4 .word 0x000127a4 <== NOT EXECUTED
12760: 000127a4 .word 0x000127a4 <== NOT EXECUTED
_Watchdog_Remove( &the_timer->Ticker );
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
break;
case TIMER_INTERVAL_ON_TASK:
if ( !_Timer_Server_schedule_operation ) {
_Thread_Enable_dispatch();
12764: eb000cb2 bl 15a34 <_Thread_Enable_dispatch> <== NOT EXECUTED
12768: e3a0000e mov r0, #14 ; 0xe <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1276c: e28dd004 add sp, sp, #4 ; 0x4
12770: e8bd8030 pop {r4, r5, pc}
case TIMER_INTERVAL:
_Watchdog_Remove( &the_timer->Ticker );
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
break;
case TIMER_INTERVAL_ON_TASK:
if ( !_Timer_Server_schedule_operation ) {
12774: e59f505c ldr r5, [pc, #92] ; 127d8 <rtems_timer_reset+0xc4><== NOT EXECUTED
12778: e5953000 ldr r3, [r5] <== NOT EXECUTED
1277c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
12780: 0afffff7 beq 12764 <rtems_timer_reset+0x50> <== NOT EXECUTED
_Thread_Enable_dispatch();
return RTEMS_INCORRECT_STATE;
}
_Watchdog_Remove( &the_timer->Ticker );
12784: e2840010 add r0, r4, #16 ; 0x10 <== NOT EXECUTED
12788: eb0012e3 bl 1731c <_Watchdog_Remove> <== NOT EXECUTED
(*_Timer_Server_schedule_operation)( the_timer );
1278c: e1a00004 mov r0, r4 <== NOT EXECUTED
12790: e1a0e00f mov lr, pc <== NOT EXECUTED
12794: e595f000 ldr pc, [r5] <== NOT EXECUTED
case TIMER_TIME_OF_DAY_ON_TASK:
case TIMER_DORMANT:
_Thread_Enable_dispatch();
return RTEMS_NOT_DEFINED;
}
_Thread_Enable_dispatch();
12798: eb000ca5 bl 15a34 <_Thread_Enable_dispatch> <== NOT EXECUTED
1279c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
127a0: eafffff1 b 1276c <rtems_timer_reset+0x58> <== NOT EXECUTED
(*_Timer_Server_schedule_operation)( the_timer );
break;
case TIMER_TIME_OF_DAY:
case TIMER_TIME_OF_DAY_ON_TASK:
case TIMER_DORMANT:
_Thread_Enable_dispatch();
127a4: eb000ca2 bl 15a34 <_Thread_Enable_dispatch>
127a8: e3a0000b mov r0, #11 ; 0xb
127ac: eaffffee b 1276c <rtems_timer_reset+0x58>
switch ( location ) {
case OBJECTS_LOCAL:
switch ( the_timer->the_class ) {
case TIMER_INTERVAL:
_Watchdog_Remove( &the_timer->Ticker );
127b0: e2844010 add r4, r4, #16 ; 0x10
127b4: e1a00004 mov r0, r4
127b8: eb0012d7 bl 1731c <_Watchdog_Remove>
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
127bc: e59f0018 ldr r0, [pc, #24] ; 127dc <rtems_timer_reset+0xc8>
127c0: e1a01004 mov r1, r4
127c4: eb001265 bl 17160 <_Watchdog_Insert>
case TIMER_TIME_OF_DAY_ON_TASK:
case TIMER_DORMANT:
_Thread_Enable_dispatch();
return RTEMS_NOT_DEFINED;
}
_Thread_Enable_dispatch();
127c8: eb000c99 bl 15a34 <_Thread_Enable_dispatch>
127cc: e3a00000 mov r0, #0 ; 0x0
127d0: eaffffe5 b 1276c <rtems_timer_reset+0x58>
000127e0 <rtems_timer_server_fire_after>:
Objects_Id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
127e0: e92d41f0 push {r4, r5, r6, r7, r8, lr}
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( !_Timer_Server )
127e4: e59fc0d0 ldr ip, [pc, #208] ; 128bc <rtems_timer_server_fire_after+0xdc>
127e8: e59c4000 ldr r4, [ip]
127ec: e3540000 cmp r4, #0 ; 0x0
Objects_Id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
127f0: e1a07000 mov r7, r0
127f4: e24dd004 sub sp, sp, #4 ; 0x4
127f8: e1a06001 mov r6, r1
127fc: e1a05002 mov r5, r2
12800: e1a08003 mov r8, r3
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( !_Timer_Server )
12804: 03a0000e moveq r0, #14 ; 0xe
12808: 0a000005 beq 12824 <rtems_timer_server_fire_after+0x44>
return RTEMS_INCORRECT_STATE;
if ( !routine )
1280c: e3520000 cmp r2, #0 ; 0x0
12810: 03a00009 moveq r0, #9 ; 0x9
12814: 0a000002 beq 12824 <rtems_timer_server_fire_after+0x44>
return RTEMS_INVALID_ADDRESS;
if ( ticks == 0 )
12818: e3510000 cmp r1, #0 ; 0x0
1281c: 03a0000a moveq r0, #10 ; 0xa
12820: 1a000001 bne 1282c <rtems_timer_server_fire_after+0x4c>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
12824: e28dd004 add sp, sp, #4 ; 0x4
12828: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
1282c: e59f008c ldr r0, [pc, #140] ; 128c0 <rtems_timer_server_fire_after+0xe0>
12830: e1a01007 mov r1, r7
12834: e1a0200d mov r2, sp
12838: eb000a38 bl 15120 <_Objects_Get>
if ( ticks == 0 )
return RTEMS_INVALID_NUMBER;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
1283c: e59d3000 ldr r3, [sp]
12840: e3530000 cmp r3, #0 ; 0x0
12844: e1a04000 mov r4, r0
12848: 13a00004 movne r0, #4 ; 0x4
1284c: 1afffff4 bne 12824 <rtems_timer_server_fire_after+0x44>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
12850: e2840010 add r0, r4, #16 ; 0x10
12854: eb0012b0 bl 1731c <_Watchdog_Remove>
_ISR_Disable( level );
12858: e10f1000 mrs r1, CPSR
1285c: e38130c0 orr r3, r1, #192 ; 0xc0
12860: 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 ) {
12864: e5942018 ldr r2, [r4, #24]
12868: e3520000 cmp r2, #0 ; 0x0
1286c: 1a00000e bne 128ac <rtems_timer_server_fire_after+0xcc>
/*
* 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;
12870: e3a03001 mov r3, #1 ; 0x1
12874: e5843038 str r3, [r4, #56]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
12878: e5842018 str r2, [r4, #24]
the_watchdog->routine = routine;
1287c: e584502c str r5, [r4, #44]
the_watchdog->id = id;
12880: e5847030 str r7, [r4, #48]
the_watchdog->user_data = user_data;
12884: e5848034 str r8, [r4, #52]
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = ticks;
12888: e584601c str r6, [r4, #28]
_ISR_Enable( level );
1288c: e129f001 msr CPSR_fc, r1
/*
* _Timer_Server_schedule_operation != NULL because we checked that
* _Timer_Server was != NULL above. Both are set at the same time.
*/
(*_Timer_Server_schedule_operation)( the_timer );
12890: e59f302c ldr r3, [pc, #44] ; 128c4 <rtems_timer_server_fire_after+0xe4>
12894: e1a00004 mov r0, r4
12898: e1a0e00f mov lr, pc
1289c: e593f000 ldr pc, [r3]
_Thread_Enable_dispatch();
128a0: eb000c63 bl 15a34 <_Thread_Enable_dispatch>
128a4: e3a00000 mov r0, #0 ; 0x0
128a8: eaffffdd b 12824 <rtems_timer_server_fire_after+0x44>
* 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 ) {
_ISR_Enable( level );
128ac: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED
_Thread_Enable_dispatch();
128b0: eb000c5f bl 15a34 <_Thread_Enable_dispatch> <== NOT EXECUTED
128b4: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
128b8: eaffffd9 b 12824 <rtems_timer_server_fire_after+0x44> <== NOT EXECUTED
000128c8 <rtems_timer_server_fire_when>:
Objects_Id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
128c8: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_Timer_Server )
128cc: e59fc0e4 ldr ip, [pc, #228] ; 129b8 <rtems_timer_server_fire_when+0xf0>
128d0: e59c4000 ldr r4, [ip]
128d4: e3540000 cmp r4, #0 ; 0x0
Objects_Id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
128d8: e1a06000 mov r6, r0
128dc: e24dd004 sub sp, sp, #4 ; 0x4
128e0: e1a04001 mov r4, r1
128e4: e1a05002 mov r5, r2
128e8: e1a0a003 mov sl, r3
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_Timer_Server )
128ec: 03a0000e moveq r0, #14 ; 0xe
128f0: 0a00000c beq 12928 <rtems_timer_server_fire_when+0x60>
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
128f4: e59f30c0 ldr r3, [pc, #192] ; 129bc <rtems_timer_server_fire_when+0xf4>
128f8: e5d32000 ldrb r2, [r3]
128fc: e3520000 cmp r2, #0 ; 0x0
12900: 03a0000b moveq r0, #11 ; 0xb
12904: 0a000007 beq 12928 <rtems_timer_server_fire_when+0x60>
return RTEMS_NOT_DEFINED;
if ( !routine )
12908: e3550000 cmp r5, #0 ; 0x0
1290c: 03a00009 moveq r0, #9 ; 0x9
12910: 0a000004 beq 12928 <rtems_timer_server_fire_when+0x60>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
12914: e1a00001 mov r0, r1
12918: ebfff458 bl fa80 <_TOD_Validate>
1291c: e3500000 cmp r0, #0 ; 0x0
12920: 1a000002 bne 12930 <rtems_timer_server_fire_when+0x68>
*/
(*_Timer_Server_schedule_operation)( the_timer );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
12924: e3a00014 mov r0, #20 ; 0x14
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
12928: e28dd004 add sp, sp, #4 ; 0x4
1292c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
12930: e1a00004 mov r0, r4
12934: ebfff417 bl f998 <_TOD_To_seconds>
if ( seconds <= _TOD_Seconds_since_epoch )
12938: e59f9080 ldr r9, [pc, #128] ; 129c0 <rtems_timer_server_fire_when+0xf8>
1293c: e5993000 ldr r3, [r9]
12940: e1500003 cmp r0, r3
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
12944: e1a08000 mov r8, r0
if ( seconds <= _TOD_Seconds_since_epoch )
12948: 9afffff5 bls 12924 <rtems_timer_server_fire_when+0x5c>
1294c: e59f0070 ldr r0, [pc, #112] ; 129c4 <rtems_timer_server_fire_when+0xfc>
12950: e1a01006 mov r1, r6
12954: e1a0200d mov r2, sp
12958: eb0009f0 bl 15120 <_Objects_Get>
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
1295c: e59d7000 ldr r7, [sp]
12960: e3570000 cmp r7, #0 ; 0x0
12964: e1a04000 mov r4, r0
12968: 13a00004 movne r0, #4 ; 0x4
1296c: 1affffed bne 12928 <rtems_timer_server_fire_when+0x60>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
12970: e2840010 add r0, r4, #16 ; 0x10 <== NOT EXECUTED
12974: eb001268 bl 1731c <_Watchdog_Remove> <== NOT EXECUTED
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
12978: e5846030 str r6, [r4, #48] <== NOT EXECUTED
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;
1297c: e5993000 ldr r3, [r9] <== NOT EXECUTED
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
12980: e3a02003 mov r2, #3 ; 0x3 <== NOT EXECUTED
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch;
12984: e0633008 rsb r3, r3, r8 <== NOT EXECUTED
/*
* _Timer_Server_schedule_operation != NULL because we checked that
* _Timer_Server was != NULL above. Both are set at the same time.
*/
(*_Timer_Server_schedule_operation)( the_timer );
12988: e1a00004 mov r0, r4 <== NOT EXECUTED
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
1298c: e5842038 str r2, [r4, #56] <== NOT EXECUTED
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch;
12990: e584301c str r3, [r4, #28] <== NOT EXECUTED
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
12994: e584502c str r5, [r4, #44] <== NOT EXECUTED
/*
* _Timer_Server_schedule_operation != NULL because we checked that
* _Timer_Server was != NULL above. Both are set at the same time.
*/
(*_Timer_Server_schedule_operation)( the_timer );
12998: e59f3028 ldr r3, [pc, #40] ; 129c8 <rtems_timer_server_fire_when+0x100><== NOT EXECUTED
the_watchdog->id = id;
the_watchdog->user_data = user_data;
1299c: e584a034 str sl, [r4, #52] <== NOT EXECUTED
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
129a0: e5847018 str r7, [r4, #24] <== NOT EXECUTED
129a4: e1a0e00f mov lr, pc <== NOT EXECUTED
129a8: e593f000 ldr pc, [r3] <== NOT EXECUTED
_Thread_Enable_dispatch();
129ac: eb000c20 bl 15a34 <_Thread_Enable_dispatch> <== NOT EXECUTED
129b0: e1a00007 mov r0, r7 <== NOT EXECUTED
129b4: eaffffdb b 12928 <rtems_timer_server_fire_when+0x60> <== NOT EXECUTED
00002434 <rtems_verror>:
static int rtems_verror(
uint32_t error_flag,
const char *printf_format,
va_list arglist
)
{
2434: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} <== NOT EXECUTED
int local_errno = 0;
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC)
2438: e2109202 ands r9, r0, #536870912 ; 0x20000000 <== NOT EXECUTED
static int rtems_verror(
uint32_t error_flag,
const char *printf_format,
va_list arglist
)
{
243c: e1a05000 mov r5, r0 <== NOT EXECUTED
2440: e1a06001 mov r6, r1 <== NOT EXECUTED
2444: e1a0a002 mov sl, r2 <== NOT EXECUTED
int local_errno = 0;
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC)
2448: 0a00000c beq 2480 <rtems_verror+0x4c> <== NOT EXECUTED
{
if (rtems_panic_in_progress++)
244c: e59f1190 ldr r1, [pc, #400] ; 25e4 <rtems_verror+0x1b0> <== NOT EXECUTED
2450: e5913000 ldr r3, [r1] <== NOT EXECUTED
2454: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
2458: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED
245c: e5813000 str r3, [r1] <== NOT EXECUTED
2460: 0a000003 beq 2474 <rtems_verror+0x40> <== NOT EXECUTED
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
2464: e59f217c ldr r2, [pc, #380] ; 25e8 <rtems_verror+0x1b4> <== NOT EXECUTED
2468: e5923000 ldr r3, [r2] <== NOT EXECUTED
246c: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED
2470: e5823000 str r3, [r2] <== NOT EXECUTED
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
2474: e5913000 ldr r3, [r1] <== NOT EXECUTED
2478: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED
247c: ca00002f bgt 2540 <rtems_verror+0x10c> <== NOT EXECUTED
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
2480: e59f8164 ldr r8, [pc, #356] ; 25ec <rtems_verror+0x1b8> <== NOT EXECUTED
2484: e5983000 ldr r3, [r8] <== NOT EXECUTED
2488: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED
248c: eb002ed5 bl dfe8 <fflush> <== NOT EXECUTED
status = error_flag & ~RTEMS_ERROR_MASK;
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
2490: e2150101 ands r0, r5, #1073741824 ; 0x40000000 <== NOT EXECUTED
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
status = error_flag & ~RTEMS_ERROR_MASK;
2494: e3c54207 bic r4, r5, #1879048192 ; 0x70000000 <== NOT EXECUTED
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
2498: 01a07000 moveq r7, r0 <== NOT EXECUTED
249c: 1a000037 bne 2580 <rtems_verror+0x14c> <== NOT EXECUTED
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
24a0: e5983000 ldr r3, [r8] <== NOT EXECUTED
24a4: e1a01006 mov r1, r6 <== NOT EXECUTED
24a8: e593000c ldr r0, [r3, #12] <== NOT EXECUTED
24ac: e1a0200a mov r2, sl <== NOT EXECUTED
24b0: eb00434d bl 131ec <vfprintf> <== NOT EXECUTED
if (status)
24b4: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
24b8: e1a06000 mov r6, r0 <== NOT EXECUTED
if (status)
24bc: 1a000021 bne 2548 <rtems_verror+0x114> <== NOT EXECUTED
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno)
24c0: e3570000 cmp r7, #0 ; 0x0 <== NOT EXECUTED
24c4: 0a00000b beq 24f8 <rtems_verror+0xc4> <== NOT EXECUTED
{
if ((local_errno > 0) && *strerror(local_errno))
24c8: da000004 ble 24e0 <rtems_verror+0xac> <== NOT EXECUTED
24cc: e1a00007 mov r0, r7 <== NOT EXECUTED
24d0: eb00339c bl f348 <strerror> <== NOT EXECUTED
24d4: e5d03000 ldrb r3, [r0] <== NOT EXECUTED
24d8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
24dc: 1a000032 bne 25ac <rtems_verror+0x178> <== NOT EXECUTED
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
24e0: e5983000 ldr r3, [r8] <== NOT EXECUTED
24e4: e59f1104 ldr r1, [pc, #260] ; 25f0 <rtems_verror+0x1bc> <== NOT EXECUTED
24e8: e593000c ldr r0, [r3, #12] <== NOT EXECUTED
24ec: e1a02007 mov r2, r7 <== NOT EXECUTED
24f0: eb002f95 bl e34c <fprintf> <== NOT EXECUTED
24f4: e0866000 add r6, r6, r0 <== NOT EXECUTED
}
chars_written += fprintf(stderr, "\n");
24f8: e5983000 ldr r3, [r8] <== NOT EXECUTED
24fc: e59f10f0 ldr r1, [pc, #240] ; 25f4 <rtems_verror+0x1c0> <== NOT EXECUTED
2500: e593000c ldr r0, [r3, #12] <== NOT EXECUTED
2504: eb002f90 bl e34c <fprintf> <== NOT EXECUTED
(void) fflush(stderr);
2508: e5983000 ldr r3, [r8] <== NOT EXECUTED
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
}
chars_written += fprintf(stderr, "\n");
250c: e1a04000 mov r4, r0 <== NOT EXECUTED
(void) fflush(stderr);
2510: e593000c ldr r0, [r3, #12] <== NOT EXECUTED
2514: eb002eb3 bl dfe8 <fflush> <== NOT EXECUTED
if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT))
2518: e3150203 tst r5, #805306368 ; 0x30000000 <== NOT EXECUTED
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
}
chars_written += fprintf(stderr, "\n");
251c: 00840006 addeq r0, r4, r6 <== NOT EXECUTED
(void) fflush(stderr);
if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT))
2520: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
{
if (error_flag & RTEMS_ERROR_PANIC)
2524: e3590000 cmp r9, #0 ; 0x0 <== NOT EXECUTED
2528: 0a000029 beq 25d4 <rtems_verror+0x1a0> <== NOT EXECUTED
{
rtems_error(0, "fatal error, exiting");
252c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
2530: e59f10c0 ldr r1, [pc, #192] ; 25f8 <rtems_verror+0x1c4> <== NOT EXECUTED
2534: eb00003d bl 2630 <rtems_error> <== NOT EXECUTED
_exit(local_errno);
2538: e1a00007 mov r0, r7 <== NOT EXECUTED
253c: eb00019f bl 2bc0 <_exit> <== NOT EXECUTED
}
else
{
rtems_error(0, "fatal error, aborting");
abort();
2540: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
}
}
return chars_written;
}
2544: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
2548: e59f309c ldr r3, [pc, #156] ; 25ec <rtems_verror+0x1b8> <== NOT EXECUTED
254c: e5932000 ldr r2, [r3] <== NOT EXECUTED
const char *
rtems_status_text(
rtems_status_code status
)
{
return rtems_assoc_name_by_local(rtems_status_assoc, status);
2550: e1a01004 mov r1, r4 <== NOT EXECUTED
2554: e59f00a0 ldr r0, [pc, #160] ; 25fc <rtems_verror+0x1c8> <== NOT EXECUTED
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
2558: e592400c ldr r4, [r2, #12] <== NOT EXECUTED
const char *
rtems_status_text(
rtems_status_code status
)
{
return rtems_assoc_name_by_local(rtems_status_assoc, status);
255c: eb002215 bl adb8 <rtems_assoc_name_by_local> <== NOT EXECUTED
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
2560: e59f1098 ldr r1, [pc, #152] ; 2600 <rtems_verror+0x1cc> <== NOT EXECUTED
const char *
rtems_status_text(
rtems_status_code status
)
{
return rtems_assoc_name_by_local(rtems_status_assoc, status);
2564: e1a02000 mov r2, r0 <== NOT EXECUTED
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
2568: e1a00004 mov r0, r4 <== NOT EXECUTED
256c: eb002f76 bl e34c <fprintf> <== NOT EXECUTED
if (local_errno)
2570: e3570000 cmp r7, #0 ; 0x0 <== NOT EXECUTED
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
2574: e0866000 add r6, r6, r0 <== NOT EXECUTED
if (local_errno)
2578: 0affffde beq 24f8 <rtems_verror+0xc4> <== NOT EXECUTED
257c: eaffffd1 b 24c8 <rtems_verror+0x94> <== NOT EXECUTED
(void) fflush(stdout); /* in case stdout/stderr same */
status = error_flag & ~RTEMS_ERROR_MASK;
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
local_errno = errno;
2580: eb002dd8 bl dce8 <__errno> <== NOT EXECUTED
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
2584: e5983000 ldr r3, [r8] <== NOT EXECUTED
(void) fflush(stdout); /* in case stdout/stderr same */
status = error_flag & ~RTEMS_ERROR_MASK;
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
local_errno = errno;
2588: e5907000 ldr r7, [r0] <== NOT EXECUTED
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
258c: e1a01006 mov r1, r6 <== NOT EXECUTED
2590: e593000c ldr r0, [r3, #12] <== NOT EXECUTED
2594: e1a0200a mov r2, sl <== NOT EXECUTED
2598: eb004313 bl 131ec <vfprintf> <== NOT EXECUTED
if (status)
259c: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
25a0: e1a06000 mov r6, r0 <== NOT EXECUTED
if (status)
25a4: 0affffc5 beq 24c0 <rtems_verror+0x8c> <== NOT EXECUTED
25a8: eaffffe6 b 2548 <rtems_verror+0x114> <== NOT EXECUTED
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno)
{
if ((local_errno > 0) && *strerror(local_errno))
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
25ac: e5983000 ldr r3, [r8] <== NOT EXECUTED
25b0: e1a00007 mov r0, r7 <== NOT EXECUTED
25b4: e593400c ldr r4, [r3, #12] <== NOT EXECUTED
25b8: eb003362 bl f348 <strerror> <== NOT EXECUTED
25bc: e59f1040 ldr r1, [pc, #64] ; 2604 <rtems_verror+0x1d0> <== NOT EXECUTED
25c0: e1a02000 mov r2, r0 <== NOT EXECUTED
25c4: e1a00004 mov r0, r4 <== NOT EXECUTED
25c8: eb002f5f bl e34c <fprintf> <== NOT EXECUTED
25cc: e0866000 add r6, r6, r0 <== NOT EXECUTED
25d0: eaffffc8 b 24f8 <rtems_verror+0xc4> <== NOT EXECUTED
rtems_error(0, "fatal error, exiting");
_exit(local_errno);
}
else
{
rtems_error(0, "fatal error, aborting");
25d4: e59f102c ldr r1, [pc, #44] ; 2608 <rtems_verror+0x1d4> <== NOT EXECUTED
25d8: e1a00009 mov r0, r9 <== NOT EXECUTED
25dc: eb000013 bl 2630 <rtems_error> <== NOT EXECUTED
abort();
25e0: eb002db7 bl dcc4 <abort> <== NOT EXECUTED
00005664 <rtems_workspace_allocate>:
*/
bool rtems_workspace_allocate(
uintptr_t bytes,
void **pointer
)
{
5664: e92d4010 push {r4, lr}
void *ptr;
/*
* check the arguments
*/
if ( !pointer )
5668: e2514000 subs r4, r1, #0 ; 0x0
566c: 0a000001 beq 5678 <rtems_workspace_allocate+0x14>
return false;
if ( !bytes )
5670: e3500000 cmp r0, #0 ; 0x0
5674: 1a000001 bne 5680 <rtems_workspace_allocate+0x1c>
ptr = _Protected_heap_Allocate( &_Workspace_Area, (intptr_t) bytes );
if (!ptr)
return false;
*pointer = ptr;
return true;
5678: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
}
567c: e8bd8010 pop {r4, pc} <== NOT EXECUTED
return false;
/*
* Allocate the memory
*/
ptr = _Protected_heap_Allocate( &_Workspace_Area, (intptr_t) bytes );
5680: e1a01000 mov r1, r0
5684: e59f0014 ldr r0, [pc, #20] ; 56a0 <rtems_workspace_allocate+0x3c>
5688: eb000570 bl 6c50 <_Protected_heap_Allocate>
if (!ptr)
568c: e3500000 cmp r0, #0 ; 0x0
return false;
*pointer = ptr;
5690: 15840000 strne r0, [r4]
5694: 13a00001 movne r0, #1 ; 0x1
/*
* Allocate the memory
*/
ptr = _Protected_heap_Allocate( &_Workspace_Area, (intptr_t) bytes );
if (!ptr)
5698: 18bd8010 popne {r4, pc}
569c: eafffff5 b 5678 <rtems_workspace_allocate+0x14> <== NOT EXECUTED
00005654 <rtems_workspace_free>:
* _Workspace_Allocate
*/
bool rtems_workspace_free(
void *pointer
)
{
5654: e1a01000 mov r1, r0 <== NOT EXECUTED
return _Protected_heap_Free( &_Workspace_Area, pointer );
5658: e59f0000 ldr r0, [pc, #0] ; 5660 <rtems_workspace_free+0xc><== NOT EXECUTED
565c: ea00058a b 6c8c <_Protected_heap_Free> <== NOT EXECUTED
0000444c <scandir>:
scandir(
const char *dirname,
struct dirent ***namelist,
int (*select)(struct dirent *),
int (*dcomp)(const struct dirent **, const struct dirent **))
{
444c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
4450: e24dd054 sub sp, sp, #84 ; 0x54
4454: e58d1004 str r1, [sp, #4]
4458: e1a09002 mov r9, r2
445c: e58d3000 str r3, [sp]
struct stat stb;
long arraysz;
DIR *dirp = NULL;
int i;
if ((dirp = opendir(dirname)) == NULL)
4460: ebfffd9a bl 3ad0 <opendir>
4464: e250a000 subs sl, r0, #0 ; 0x0
4468: 02400001 subeq r0, r0, #1 ; 0x1
446c: 0a000040 beq 4574 <scandir+0x128>
return(-1);
if (fstat(dirp->dd_fd, &stb) < 0)
4470: e28db008 add fp, sp, #8 ; 0x8
4474: e59a0000 ldr r0, [sl]
4478: e1a0100b mov r1, fp
447c: eb001c12 bl b4cc <fstat>
4480: e3500000 cmp r0, #0 ; 0x0
4484: ba00004b blt 45b8 <scandir+0x16c>
/*
* estimate the array size by taking the size of the directory file
* and dividing it by a multiple of the minimum size entry.
*/
arraysz = (stb.st_size / 24);
4488: e59d3028 ldr r3, [sp, #40]
448c: e59f4174 ldr r4, [pc, #372] ; 4608 <scandir+0x1bc>
4490: e0c21394 smull r1, r2, r4, r3
4494: e1a03fc3 asr r3, r3, #31
4498: e0638142 rsb r8, r3, r2, asr #2
names = (struct dirent **)malloc(arraysz * sizeof(struct dirent *));
449c: e1a00108 lsl r0, r8, #2
44a0: ebfffb81 bl 32ac <malloc>
if (names == NULL)
44a4: e2507000 subs r7, r0, #0 ; 0x0
goto cleanup_and_bail;
44a8: 13a06000 movne r6, #0 ; 0x0
* estimate the array size by taking the size of the directory file
* and dividing it by a multiple of the minimum size entry.
*/
arraysz = (stb.st_size / 24);
names = (struct dirent **)malloc(arraysz * sizeof(struct dirent *));
if (names == NULL)
44ac: 0a000041 beq 45b8 <scandir+0x16c>
goto cleanup_and_bail;
while ((d = readdir(dirp)) != NULL) {
44b0: e1a0000a mov r0, sl
44b4: ebffff55 bl 4210 <readdir>
44b8: e2504000 subs r4, r0, #0 ; 0x0
44bc: 0a000020 beq 4544 <scandir+0xf8>
if (select != NULL && !(*select)(d))
44c0: e3590000 cmp r9, #0 ; 0x0
44c4: 0a000003 beq 44d8 <scandir+0x8c>
44c8: e1a0e00f mov lr, pc
44cc: e12fff19 bx r9
44d0: e3500000 cmp r0, #0 ; 0x0
44d4: 0afffff5 beq 44b0 <scandir+0x64>
continue; /* just selected names */
/*
* Make a minimum size copy of the data
*/
p = (struct dirent *)malloc(DIRSIZ(d));
44d8: e1d400ba ldrh r0, [r4, #10]
44dc: e2800004 add r0, r0, #4 ; 0x4
44e0: e3c00003 bic r0, r0, #3 ; 0x3
44e4: e280000c add r0, r0, #12 ; 0xc
44e8: ebfffb6f bl 32ac <malloc>
if (p == NULL)
44ec: e2505000 subs r5, r0, #0 ; 0x0
goto cleanup_and_bail;
p->d_ino = d->d_ino;
p->d_reclen = d->d_reclen;
p->d_namlen = d->d_namlen;
strncpy(p->d_name, d->d_name, p->d_namlen + 1);
44f0: e284100c add r1, r4, #12 ; 0xc
44f4: e285000c add r0, r5, #12 ; 0xc
continue; /* just selected names */
/*
* Make a minimum size copy of the data
*/
p = (struct dirent *)malloc(DIRSIZ(d));
if (p == NULL)
44f8: 0a000032 beq 45c8 <scandir+0x17c>
goto cleanup_and_bail;
p->d_ino = d->d_ino;
p->d_reclen = d->d_reclen;
p->d_namlen = d->d_namlen;
44fc: e1d4c0ba ldrh ip, [r4, #10]
* Make a minimum size copy of the data
*/
p = (struct dirent *)malloc(DIRSIZ(d));
if (p == NULL)
goto cleanup_and_bail;
p->d_ino = d->d_ino;
4500: e5943000 ldr r3, [r4]
p->d_reclen = d->d_reclen;
4504: e1d440b8 ldrh r4, [r4, #8]
* Make a minimum size copy of the data
*/
p = (struct dirent *)malloc(DIRSIZ(d));
if (p == NULL)
goto cleanup_and_bail;
p->d_ino = d->d_ino;
4508: e5853000 str r3, [r5]
p->d_reclen = d->d_reclen;
p->d_namlen = d->d_namlen;
strncpy(p->d_name, d->d_name, p->d_namlen + 1);
450c: e28c2001 add r2, ip, #1 ; 0x1
/*
* Check to make sure the array has space left and
* realloc the maximum size.
*/
if (++nitems >= arraysz) {
4510: e2866001 add r6, r6, #1 ; 0x1
*/
p = (struct dirent *)malloc(DIRSIZ(d));
if (p == NULL)
goto cleanup_and_bail;
p->d_ino = d->d_ino;
p->d_reclen = d->d_reclen;
4514: e1c540b8 strh r4, [r5, #8]
p->d_namlen = d->d_namlen;
4518: e1c5c0ba strh ip, [r5, #10]
strncpy(p->d_name, d->d_name, p->d_namlen + 1);
451c: eb003251 bl 10e68 <strncpy>
/*
* Check to make sure the array has space left and
* realloc the maximum size.
*/
if (++nitems >= arraysz) {
4520: e1560008 cmp r6, r8
4524: 2a000014 bcs 457c <scandir+0x130>
names = (struct dirent **)realloc((char *)names,
arraysz * sizeof(struct dirent *));
if (names == NULL)
goto cleanup_and_bail;
}
names[nitems-1] = p;
4528: e1a03106 lsl r3, r6, #2
452c: e2433004 sub r3, r3, #4 ; 0x4
4530: e7875003 str r5, [r7, r3]
arraysz = (stb.st_size / 24);
names = (struct dirent **)malloc(arraysz * sizeof(struct dirent *));
if (names == NULL)
goto cleanup_and_bail;
while ((d = readdir(dirp)) != NULL) {
4534: e1a0000a mov r0, sl
4538: ebffff34 bl 4210 <readdir>
453c: e2504000 subs r4, r0, #0 ; 0x0
4540: 1affffde bne 44c0 <scandir+0x74>
if (names == NULL)
goto cleanup_and_bail;
}
names[nitems-1] = p;
}
closedir(dirp);
4544: e1a0000a mov r0, sl
4548: ebfff83e bl 2648 <closedir>
if (nitems && dcomp != NULL){
454c: e59d3000 ldr r3, [sp]
4550: e3560000 cmp r6, #0 ; 0x0
4554: 13530000 cmpne r3, #0 ; 0x0
qsort(names, nitems, sizeof(struct dirent *),
4558: 11a00007 movne r0, r7
455c: 11a01006 movne r1, r6
4560: 13a02004 movne r2, #4 ; 0x4
4564: 1b002efe blne 10164 <qsort>
(int (*)(const void *, const void *)) dcomp);
}
*namelist = names;
4568: e59dc004 ldr ip, [sp, #4]
456c: e58c7000 str r7, [ip]
return(nitems);
4570: e1a00006 mov r0, r6
free( names[i] );
free( names );
}
return(-1);
}
4574: e28dd054 add sp, sp, #84 ; 0x54
4578: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
/*
* Check to make sure the array has space left and
* realloc the maximum size.
*/
if (++nitems >= arraysz) {
if (fstat(dirp->dd_fd, &stb) < 0)
457c: e1a0100b mov r1, fp <== NOT EXECUTED
4580: e59a0000 ldr r0, [sl] <== NOT EXECUTED
4584: eb001bd0 bl b4cc <fstat> <== NOT EXECUTED
4588: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
goto cleanup_and_bail; /* just might have grown */
arraysz = stb.st_size / 12;
names = (struct dirent **)realloc((char *)names,
458c: e1a00007 mov r0, r7 <== NOT EXECUTED
/*
* Check to make sure the array has space left and
* realloc the maximum size.
*/
if (++nitems >= arraysz) {
if (fstat(dirp->dd_fd, &stb) < 0)
4590: ba00000c blt 45c8 <scandir+0x17c> <== NOT EXECUTED
goto cleanup_and_bail; /* just might have grown */
arraysz = stb.st_size / 12;
4594: e59d3028 ldr r3, [sp, #40] <== NOT EXECUTED
4598: e59fc068 ldr ip, [pc, #104] ; 4608 <scandir+0x1bc> <== NOT EXECUTED
459c: e0c2139c smull r1, r2, ip, r3 <== NOT EXECUTED
45a0: e1a03fc3 asr r3, r3, #31 <== NOT EXECUTED
45a4: e06380c2 rsb r8, r3, r2, asr #1 <== NOT EXECUTED
names = (struct dirent **)realloc((char *)names,
45a8: e1a01108 lsl r1, r8, #2 <== NOT EXECUTED
45ac: eb001c75 bl b788 <realloc> <== NOT EXECUTED
arraysz * sizeof(struct dirent *));
if (names == NULL)
45b0: e2507000 subs r7, r0, #0 ; 0x0 <== NOT EXECUTED
45b4: 1affffdb bne 4528 <scandir+0xdc> <== NOT EXECUTED
return(nitems);
cleanup_and_bail:
if ( dirp )
closedir( dirp );
45b8: e1a0000a mov r0, sl
45bc: ebfff821 bl 2648 <closedir>
45c0: e3e00000 mvn r0, #0 ; 0x0
45c4: eaffffea b 4574 <scandir+0x128>
45c8: e1a0000a mov r0, sl <== NOT EXECUTED
45cc: ebfff81d bl 2648 <closedir> <== NOT EXECUTED
if ( names ) {
for (i=0; i < nitems; i++ )
45d0: e3560000 cmp r6, #0 ; 0x0 <== NOT EXECUTED
45d4: 0a000007 beq 45f8 <scandir+0x1ac> <== NOT EXECUTED
45d8: e3a04000 mov r4, #0 ; 0x0 <== NOT EXECUTED
45dc: e1a03004 mov r3, r4 <== NOT EXECUTED
free( names[i] );
45e0: e7970103 ldr r0, [r7, r3, lsl #2] <== NOT EXECUTED
if ( dirp )
closedir( dirp );
if ( names ) {
for (i=0; i < nitems; i++ )
45e4: e2844001 add r4, r4, #1 ; 0x1 <== NOT EXECUTED
free( names[i] );
45e8: ebfff963 bl 2b7c <free> <== NOT EXECUTED
if ( dirp )
closedir( dirp );
if ( names ) {
for (i=0; i < nitems; i++ )
45ec: e1560004 cmp r6, r4 <== NOT EXECUTED
45f0: e1a03004 mov r3, r4 <== NOT EXECUTED
45f4: 8afffff9 bhi 45e0 <scandir+0x194> <== NOT EXECUTED
free( names[i] );
free( names );
45f8: e1a00007 mov r0, r7 <== NOT EXECUTED
45fc: ebfff95e bl 2b7c <free> <== NOT EXECUTED
4600: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
4604: eaffffda b 4574 <scandir+0x128> <== NOT EXECUTED
00006e04 <sem_destroy>:
*/
int sem_destroy(
sem_t *sem
)
{
6e04: e92d4010 push {r4, lr}
6e08: e24dd004 sub sp, sp, #4 ; 0x4
6e0c: e5901000 ldr r1, [r0]
6e10: e1a0200d mov r2, sp
6e14: e59f0058 ldr r0, [pc, #88] ; 6e74 <sem_destroy+0x70>
6e18: eb0008c6 bl 9138 <_Objects_Get>
register POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
6e1c: e59d3000 ldr r3, [sp]
6e20: e3530000 cmp r3, #0 ; 0x0
6e24: 0a000005 beq 6e40 <sem_destroy+0x3c>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
6e28: eb00229d bl f8a4 <__errno>
6e2c: e3a03016 mov r3, #22 ; 0x16
6e30: e5803000 str r3, [r0]
6e34: e3e00000 mvn r0, #0 ; 0x0
}
6e38: e28dd004 add sp, sp, #4 ; 0x4
6e3c: e8bd8010 pop {r4, pc}
case OBJECTS_LOCAL:
/*
* Undefined operation on a named semaphore.
*/
if ( the_semaphore->named == TRUE ) {
6e40: e5d04014 ldrb r4, [r0, #20]
6e44: e3540000 cmp r4, #0 ; 0x0
6e48: 1a000003 bne 6e5c <sem_destroy+0x58>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EINVAL );
}
_POSIX_Semaphore_Delete( the_semaphore );
6e4c: eb001a11 bl d698 <_POSIX_Semaphore_Delete>
_Thread_Enable_dispatch();
6e50: eb000ad9 bl 99bc <_Thread_Enable_dispatch>
6e54: e1a00004 mov r0, r4
6e58: eafffff6 b 6e38 <sem_destroy+0x34>
/*
* Undefined operation on a named semaphore.
*/
if ( the_semaphore->named == TRUE ) {
_Thread_Enable_dispatch();
6e5c: eb000ad6 bl 99bc <_Thread_Enable_dispatch> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
6e60: eb00228f bl f8a4 <__errno> <== NOT EXECUTED
6e64: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED
6e68: e5803000 str r3, [r0] <== NOT EXECUTED
6e6c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
6e70: eafffff0 b 6e38 <sem_destroy+0x34> <== NOT EXECUTED
00006ed4 <sem_init>:
int sem_init(
sem_t *sem,
int pshared,
unsigned int value
)
{
6ed4: e92d4010 push {r4, lr}
int status;
POSIX_Semaphore_Control *the_semaphore;
if ( !sem )
6ed8: e2504000 subs r4, r0, #0 ; 0x0
int sem_init(
sem_t *sem,
int pshared,
unsigned int value
)
{
6edc: e24dd004 sub sp, sp, #4 ; 0x4
int status;
POSIX_Semaphore_Control *the_semaphore;
if ( !sem )
6ee0: 0a000008 beq 6f08 <sem_init+0x34>
rtems_set_errno_and_return_minus_one( EINVAL );
status = _POSIX_Semaphore_Create_support(
6ee4: e1a0300d mov r3, sp
6ee8: e3a00000 mov r0, #0 ; 0x0
6eec: eb0019a7 bl d590 <_POSIX_Semaphore_Create_support>
pshared,
value,
&the_semaphore
);
if ( status != -1 )
6ef0: e3700001 cmn r0, #1 ; 0x1
*sem = the_semaphore->Object.id;
6ef4: 159d3000 ldrne r3, [sp]
6ef8: 15932008 ldrne r2, [r3, #8]
6efc: 15842000 strne r2, [r4]
return status;
}
6f00: e28dd004 add sp, sp, #4 ; 0x4
6f04: e8bd8010 pop {r4, pc}
{
int status;
POSIX_Semaphore_Control *the_semaphore;
if ( !sem )
rtems_set_errno_and_return_minus_one( EINVAL );
6f08: eb002265 bl f8a4 <__errno> <== NOT EXECUTED
6f0c: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED
6f10: e5803000 str r3, [r0] <== NOT EXECUTED
6f14: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
6f18: eafffff8 b 6f00 <sem_init+0x2c> <== NOT EXECUTED
00007078 <sem_timedwait>:
int sem_timedwait(
sem_t *sem,
const struct timespec *abstime
)
{
7078: e92d4010 push {r4, lr}
707c: e24dd004 sub sp, sp, #4 ; 0x4
7080: e1a04000 mov r4, r0
* So we check the abstime provided, and hold on to whether it
* is valid or not. If it isn't correct and in the future,
* then we do a polling operation and convert the UNSATISFIED
* status into the appropriate error.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
7084: e1a00001 mov r0, r1
7088: e1a0100d mov r1, sp
708c: eb0016db bl cc00 <_POSIX_Absolute_timeout_to_ticks>
switch ( status ) {
7090: e3500002 cmp r0, #2 ; 0x2
7094: 9a000005 bls 70b0 <sem_timedwait+0x38>
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
do_wait = true;
break;
}
lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
7098: e1a00004 mov r0, r4
709c: e3a01001 mov r1, #1 ; 0x1
70a0: e59d2000 ldr r2, [sp]
70a4: eb0019b0 bl d76c <_POSIX_Semaphore_Wait_support>
break;
}
}
return lock_status;
}
70a8: e28dd004 add sp, sp, #4 ; 0x4
70ac: e8bd8010 pop {r4, pc}
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
do_wait = true;
break;
}
lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
70b0: e1a00004 mov r0, r4 <== NOT EXECUTED
70b4: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED
70b8: e59d2000 ldr r2, [sp] <== NOT EXECUTED
70bc: eb0019aa bl d76c <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED
70c0: eafffff8 b 70a8 <sem_timedwait+0x30> <== NOT EXECUTED
00006d78 <sigwait>:
int sigwait(
const sigset_t *set,
int *sig
)
{
6d78: e92d4010 push {r4, lr}
6d7c: e1a04001 mov r4, r1
int status;
status = sigtimedwait( set, NULL, NULL );
6d80: e3a01000 mov r1, #0 ; 0x0
6d84: e1a02001 mov r2, r1
6d88: ebffff8c bl 6bc0 <sigtimedwait>
if ( status != -1 ) {
6d8c: e3700001 cmn r0, #1 ; 0x1
6d90: 0a000004 beq 6da8 <sigwait+0x30>
if ( sig )
6d94: e3540000 cmp r4, #0 ; 0x0
*sig = status;
6d98: 15840000 strne r0, [r4]
int status;
status = sigtimedwait( set, NULL, NULL );
if ( status != -1 ) {
if ( sig )
6d9c: 01a00004 moveq r0, r4
*sig = status;
6da0: 13a00000 movne r0, #0 ; 0x0
6da4: e8bd8010 pop {r4, pc}
return 0;
}
return errno;
6da8: eb002105 bl f1c4 <__errno> <== NOT EXECUTED
6dac: e5900000 ldr r0, [r0] <== NOT EXECUTED
}
6db0: e8bd8010 pop {r4, pc} <== NOT EXECUTED
00002e44 <siproc>:
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
2e44: e591303c ldr r3, [r1, #60] <== NOT EXECUTED
2e48: e3c33f61 bic r3, r3, #388 ; 0x184 <== NOT EXECUTED
2e4c: e3c33003 bic r3, r3, #3 ; 0x3 <== NOT EXECUTED
2e50: e1a03a03 lsl r3, r3, #20 <== NOT EXECUTED
2e54: e1a03a23 lsr r3, r3, #20 <== NOT EXECUTED
2e58: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
2e5c: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
2e60: e1a05001 mov r5, r1 <== NOT EXECUTED
2e64: e20040ff and r4, r0, #255 ; 0xff <== NOT EXECUTED
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
2e68: 1a000002 bne 2e78 <siproc+0x34> <== 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);
2e6c: e1a00004 mov r0, r4 <== NOT EXECUTED
}
return i;
}
2e70: 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);
2e74: eaffff82 b 2c84 <iproc> <== NOT EXECUTED
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
2e78: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED
2e7c: e1a02001 mov r2, r1 <== NOT EXECUTED
2e80: e5950018 ldr r0, [r5, #24] <== NOT EXECUTED
2e84: eb00065c bl 47fc <rtems_semaphore_obtain> <== NOT EXECUTED
i = iproc (c, tty);
2e88: e1a01005 mov r1, r5 <== NOT EXECUTED
2e8c: e1a00004 mov r0, r4 <== NOT EXECUTED
2e90: ebffff7b bl 2c84 <iproc> <== NOT EXECUTED
2e94: e1a04000 mov r4, r0 <== NOT EXECUTED
rtems_semaphore_release (tty->osem);
2e98: e5950018 ldr r0, [r5, #24] <== NOT EXECUTED
2e9c: eb00069d bl 4918 <rtems_semaphore_release> <== NOT EXECUTED
}
else {
i = iproc (c, tty);
}
return i;
}
2ea0: e1a00004 mov r0, r4 <== NOT EXECUTED
2ea4: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
00003c34 <stat>:
int _STAT_NAME(
const char *path,
struct stat *buf
)
{
3c34: e92d4030 push {r4, r5, lr}
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
3c38: e2514000 subs r4, r1, #0 ; 0x0
int _STAT_NAME(
const char *path,
struct stat *buf
)
{
3c3c: e24dd010 sub sp, sp, #16 ; 0x10
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
3c40: 0a00002c beq 3cf8 <stat+0xc4>
rtems_set_errno_and_return_minus_one( EFAULT );
status = rtems_filesystem_evaluate_path( path, 0, &loc, _STAT_FOLLOW_LINKS );
3c44: e3a01000 mov r1, #0 ; 0x0
3c48: e1a0200d mov r2, sp
3c4c: e3a03001 mov r3, #1 ; 0x1
3c50: ebfff970 bl 2218 <rtems_filesystem_evaluate_path>
if ( status != 0 )
3c54: e3500000 cmp r0, #0 ; 0x0
*/
if ( !buf )
rtems_set_errno_and_return_minus_one( EFAULT );
status = rtems_filesystem_evaluate_path( path, 0, &loc, _STAT_FOLLOW_LINKS );
3c58: e1a0500d mov r5, sp
if ( status != 0 )
3c5c: 1a000023 bne 3cf0 <stat+0xbc>
return -1;
if ( !loc.handlers->fstat_h ){
3c60: e59d3004 ldr r3, [sp, #4]
3c64: e5932018 ldr r2, [r3, #24]
3c68: e3520000 cmp r2, #0 ; 0x0
3c6c: 0a000014 beq 3cc4 <stat+0x90>
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( buf, 0, sizeof(struct stat) );
3c70: e1a01000 mov r1, r0
3c74: e3a0204c mov r2, #76 ; 0x4c
3c78: e1a00004 mov r0, r4
3c7c: eb002e8f bl f6c0 <memset>
status = (*loc.handlers->fstat_h)( &loc, buf );
3c80: e1a01004 mov r1, r4
3c84: e59d3004 ldr r3, [sp, #4]
3c88: e1a0000d mov r0, sp
3c8c: e1a0e00f mov lr, pc
3c90: e593f018 ldr pc, [r3, #24]
rtems_filesystem_freenode( &loc );
3c94: e59d3008 ldr r3, [sp, #8]
3c98: e3530000 cmp r3, #0 ; 0x0
* versions of stat don't have to.
*/
memset( buf, 0, sizeof(struct stat) );
status = (*loc.handlers->fstat_h)( &loc, buf );
3c9c: e1a04000 mov r4, r0
rtems_filesystem_freenode( &loc );
3ca0: 0a000004 beq 3cb8 <stat+0x84>
3ca4: e593301c ldr r3, [r3, #28]
3ca8: e3530000 cmp r3, #0 ; 0x0
3cac: 11a0000d movne r0, sp
3cb0: 11a0e00f movne lr, pc
3cb4: 112fff13 bxne r3
return status;
}
3cb8: e1a00004 mov r0, r4
3cbc: e28dd010 add sp, sp, #16 ; 0x10
3cc0: e8bd8030 pop {r4, r5, pc}
status = rtems_filesystem_evaluate_path( path, 0, &loc, _STAT_FOLLOW_LINKS );
if ( status != 0 )
return -1;
if ( !loc.handlers->fstat_h ){
rtems_filesystem_freenode( &loc );
3cc4: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
3cc8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
3ccc: 0a000004 beq 3ce4 <stat+0xb0> <== NOT EXECUTED
3cd0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
3cd4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
3cd8: 11a0000d movne r0, sp <== NOT EXECUTED
3cdc: 11a0e00f movne lr, pc <== NOT EXECUTED
3ce0: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
3ce4: eb002a46 bl e604 <__errno> <== NOT EXECUTED
3ce8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
3cec: e5803000 str r3, [r0] <== NOT EXECUTED
3cf0: e3e04000 mvn r4, #0 ; 0x0
3cf4: eaffffef b 3cb8 <stat+0x84>
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
rtems_set_errno_and_return_minus_one( EFAULT );
3cf8: eb002a41 bl e604 <__errno>
3cfc: e3a0300e mov r3, #14 ; 0xe
3d00: e5803000 str r3, [r0]
3d04: e3e04000 mvn r4, #0 ; 0x0
3d08: eaffffea b 3cb8 <stat+0x84>
00003ef8 <symlink>:
int symlink(
const char *actualpath,
const char *sympath
)
{
3ef8: e92d4070 push {r4, r5, r6, lr}
rtems_filesystem_location_info_t loc;
int i;
const char *name_start;
int result;
rtems_filesystem_get_start_loc( sympath, &i, &loc );
3efc: e5d13000 ldrb r3, [r1]
3f00: e353005c cmp r3, #92 ; 0x5c
3f04: 1353002f cmpne r3, #47 ; 0x2f
int symlink(
const char *actualpath,
const char *sympath
)
{
3f08: e24dd014 sub sp, sp, #20 ; 0x14
3f0c: e1a0e001 mov lr, r1
rtems_filesystem_location_info_t loc;
int i;
const char *name_start;
int result;
rtems_filesystem_get_start_loc( sympath, &i, &loc );
3f10: 13a05000 movne r5, #0 ; 0x0
3f14: 03a05001 moveq r5, #1 ; 0x1
int symlink(
const char *actualpath,
const char *sympath
)
{
3f18: e1a06000 mov r6, r0
rtems_filesystem_location_info_t loc;
int i;
const char *name_start;
int result;
rtems_filesystem_get_start_loc( sympath, &i, &loc );
3f1c: 0a000001 beq 3f28 <symlink+0x30>
3f20: e3530000 cmp r3, #0 ; 0x0
3f24: 1a000023 bne 3fb8 <symlink+0xc0>
3f28: e59f30d0 ldr r3, [pc, #208] ; 4000 <symlink+0x108>
3f2c: e593c000 ldr ip, [r3]
3f30: e28cc014 add ip, ip, #20 ; 0x14
3f34: e89c000f ldm ip, {r0, r1, r2, r3}
3f38: e1a0400d mov r4, sp
3f3c: e88d000f stm sp, {r0, r1, r2, r3}
3f40: e3a03001 mov r3, #1 ; 0x1
result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start );
3f44: e08e0003 add r0, lr, r3
3f48: e1a0100d mov r1, sp
3f4c: e28d2010 add r2, sp, #16 ; 0x10
3f50: e59d3008 ldr r3, [sp, #8]
3f54: e1a0e00f mov lr, pc
3f58: e593f004 ldr pc, [r3, #4]
if ( result != 0 )
3f5c: e3500000 cmp r0, #0 ; 0x0
3f60: 1a000024 bne 3ff8 <symlink+0x100>
return -1;
if ( !loc.ops->symlink_h ) {
3f64: e59d2008 ldr r2, [sp, #8]
3f68: e5923038 ldr r3, [r2, #56]
3f6c: e3530000 cmp r3, #0 ; 0x0
3f70: 0a000018 beq 3fd8 <symlink+0xe0>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->symlink_h)( &loc, actualpath, name_start);
3f74: e1a01006 mov r1, r6
3f78: e1a0000d mov r0, sp
3f7c: e59d2010 ldr r2, [sp, #16]
3f80: e1a0e00f mov lr, pc
3f84: e12fff13 bx r3
rtems_filesystem_freenode( &loc );
3f88: e59d3008 ldr r3, [sp, #8]
3f8c: e3530000 cmp r3, #0 ; 0x0
if ( !loc.ops->symlink_h ) {
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->symlink_h)( &loc, actualpath, name_start);
3f90: e1a05000 mov r5, r0
rtems_filesystem_freenode( &loc );
3f94: 0a000004 beq 3fac <symlink+0xb4>
3f98: e593301c ldr r3, [r3, #28]
3f9c: e3530000 cmp r3, #0 ; 0x0
3fa0: 11a0000d movne r0, sp
3fa4: 11a0e00f movne lr, pc
3fa8: 112fff13 bxne r3
return result;
}
3fac: e1a00005 mov r0, r5
3fb0: e28dd014 add sp, sp, #20 ; 0x14
3fb4: e8bd8070 pop {r4, r5, r6, pc}
rtems_filesystem_location_info_t loc;
int i;
const char *name_start;
int result;
rtems_filesystem_get_start_loc( sympath, &i, &loc );
3fb8: e59f3040 ldr r3, [pc, #64] ; 4000 <symlink+0x108>
3fbc: e593c000 ldr ip, [r3]
3fc0: e28cc004 add ip, ip, #4 ; 0x4
3fc4: e89c000f ldm ip, {r0, r1, r2, r3}
3fc8: e1a0400d mov r4, sp
3fcc: e88d000f stm sp, {r0, r1, r2, r3}
3fd0: e1a03005 mov r3, r5
3fd4: eaffffda b 3f44 <symlink+0x4c>
result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start );
if ( result != 0 )
return -1;
if ( !loc.ops->symlink_h ) {
rtems_filesystem_freenode( &loc );
3fd8: e592301c ldr r3, [r2, #28] <== NOT EXECUTED
3fdc: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
3fe0: 11a0000d movne r0, sp <== NOT EXECUTED
3fe4: 11a0e00f movne lr, pc <== NOT EXECUTED
3fe8: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
3fec: eb002974 bl e5c4 <__errno> <== NOT EXECUTED
3ff0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
3ff4: e5803000 str r3, [r0] <== NOT EXECUTED
3ff8: e3e05000 mvn r5, #0 ; 0x0
3ffc: eaffffea b 3fac <symlink+0xb4>
00004718 <telldir>:
DIR *dirp
)
{
rtems_libio_t *iop;
if ( !dirp )
4718: e3500000 cmp r0, #0 ; 0x0
#include <rtems/seterr.h>
long telldir(
DIR *dirp
)
{
471c: e52de004 push {lr} ; (str lr, [sp, #-4]!)
rtems_libio_t *iop;
if ( !dirp )
4720: 0a000013 beq 4774 <telldir+0x5c>
/*
* Get the file control block structure associated with the
* file descriptor
*/
iop = rtems_libio_iop( dirp->dd_fd );
4724: e59f305c ldr r3, [pc, #92] ; 4788 <telldir+0x70>
4728: e5900000 ldr r0, [r0]
472c: e5932000 ldr r2, [r3]
4730: e1500002 cmp r0, r2
4734: 2a000009 bcs 4760 <telldir+0x48>
4738: e1a03200 lsl r3, r0, #4
473c: e59f2048 ldr r2, [pc, #72] ; 478c <telldir+0x74>
4740: e0433100 sub r3, r3, r0, lsl #2
4744: e0833000 add r3, r3, r0
4748: e5921000 ldr r1, [r2]
474c: e1a03103 lsl r3, r3, #2
if (iop == NULL)
4750: e0910003 adds r0, r1, r3
4754: 0a000001 beq 4760 <telldir+0x48>
assert(0);
return (long)( iop->offset );
4758: e5900008 ldr r0, [r0, #8]
}
475c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
*/
iop = rtems_libio_iop( dirp->dd_fd );
if (iop == NULL)
assert(0);
4760: e59f0028 ldr r0, [pc, #40] ; 4790 <telldir+0x78> <== NOT EXECUTED
4764: e3a0102c mov r1, #44 ; 0x2c <== NOT EXECUTED
4768: e59f2024 ldr r2, [pc, #36] ; 4794 <telldir+0x7c> <== NOT EXECUTED
476c: e59f3024 ldr r3, [pc, #36] ; 4798 <telldir+0x80> <== NOT EXECUTED
4770: ebfff751 bl 24bc <__assert_func> <== NOT EXECUTED
)
{
rtems_libio_t *iop;
if ( !dirp )
rtems_set_errno_and_return_minus_one( EBADF );
4774: eb0029fe bl ef74 <__errno> <== NOT EXECUTED
4778: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED
477c: e5803000 str r3, [r0] <== NOT EXECUTED
4780: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
4784: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
00005b24 <timer_settime>:
timer_t timerid,
int flags,
const struct itimerspec *value,
struct itimerspec *ovalue
)
{
5b24: e92d41f0 push {r4, r5, r6, r7, r8, lr}
Objects_Locations location;
bool activated;
uint32_t initial_period;
struct itimerspec normalize;
if ( !value )
5b28: e2524000 subs r4, r2, #0 ; 0x0
timer_t timerid,
int flags,
const struct itimerspec *value,
struct itimerspec *ovalue
)
{
5b2c: e24dd018 sub sp, sp, #24 ; 0x18
5b30: e1a05000 mov r5, r0
5b34: e1a0c001 mov ip, r1
5b38: e1a06003 mov r6, r3
Objects_Locations location;
bool activated;
uint32_t initial_period;
struct itimerspec normalize;
if ( !value )
5b3c: 0a00003b beq 5c30 <timer_settime+0x10c>
rtems_set_errno_and_return_minus_one( EINVAL );
/* First, it verifies if the structure "value" is correct */
if ( ( value->it_value.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) ||
5b40: e3e02331 mvn r2, #-1006632960 ; 0xc4000000
5b44: e2422865 sub r2, r2, #6619136 ; 0x650000
5b48: e594300c ldr r3, [r4, #12]
5b4c: e2422c36 sub r2, r2, #13824 ; 0x3600
5b50: e1530002 cmp r3, r2
5b54: 8a000035 bhi 5c30 <timer_settime+0x10c>
5b58: e5943004 ldr r3, [r4, #4]
5b5c: e1530002 cmp r3, r2
5b60: 8a000032 bhi 5c30 <timer_settime+0x10c>
5b64: e3530000 cmp r3, #0 ; 0x0
5b68: ba000030 blt 5c30 <timer_settime+0x10c>
( value->it_interval.tv_nsec < 0 )) {
/* The number of nanoseconds is not correct */
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
5b6c: e3510004 cmp r1, #4 ; 0x4
5b70: 13510000 cmpne r1, #0 ; 0x0
5b74: 1a00002d bne 5c30 <timer_settime+0x10c>
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
5b78: e894000f ldm r4, {r0, r1, r2, r3}
5b7c: e28d7004 add r7, sp, #4 ; 0x4
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
5b80: e35c0004 cmp ip, #4 ; 0x4
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
5b84: e887000f stm r7, {r0, r1, r2, r3}
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
5b88: 0a00003c beq 5c80 <timer_settime+0x15c>
5b8c: e1a01005 mov r1, r5
5b90: e59f0120 ldr r0, [pc, #288] ; 5cb8 <timer_settime+0x194>
5b94: e28d2014 add r2, sp, #20 ; 0x14
5b98: eb000860 bl 7d20 <_Objects_Get>
* something with the structure of times of the timer: to stop, start
* or start it again
*/
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
5b9c: e59d3014 ldr r3, [sp, #20]
5ba0: e3530000 cmp r3, #0 ; 0x0
5ba4: e1a05000 mov r5, r0
5ba8: 1a000020 bne 5c30 <timer_settime+0x10c>
case OBJECTS_LOCAL:
/* First, it verifies if the timer must be stopped */
if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) {
5bac: e59d300c ldr r3, [sp, #12]
5bb0: e3530000 cmp r3, #0 ; 0x0
5bb4: 1a000002 bne 5bc4 <timer_settime+0xa0>
5bb8: e59d3010 ldr r3, [sp, #16]
5bbc: e3530000 cmp r3, #0 ; 0x0
5bc0: 0a000020 beq 5c48 <timer_settime+0x124>
_Thread_Enable_dispatch();
return 0;
}
/* Convert from seconds and nanoseconds to ticks */
ptimer->ticks = _Timespec_To_ticks( &value->it_interval );
5bc4: e1a00004 mov r0, r4
5bc8: eb000e71 bl 9594 <_Timespec_To_ticks>
5bcc: e5850064 str r0, [r5, #100]
initial_period = _Timespec_To_ticks( &normalize.it_value );
5bd0: e28d000c add r0, sp, #12 ; 0xc
5bd4: eb000e6e bl 9594 <_Timespec_To_ticks>
activated = _POSIX_Timer_Insert_helper(
5bd8: e5952008 ldr r2, [r5, #8]
return 0;
}
/* Convert from seconds and nanoseconds to ticks */
ptimer->ticks = _Timespec_To_ticks( &value->it_interval );
initial_period = _Timespec_To_ticks( &normalize.it_value );
5bdc: e1a01000 mov r1, r0
activated = _POSIX_Timer_Insert_helper(
5be0: e59f30d4 ldr r3, [pc, #212] ; 5cbc <timer_settime+0x198>
5be4: e2850010 add r0, r5, #16 ; 0x10
5be8: e58d5000 str r5, [sp]
5bec: eb001975 bl c1c8 <_POSIX_Timer_Insert_helper>
initial_period,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated ) {
5bf0: e2504000 subs r4, r0, #0 ; 0x0
5bf4: 0a00002c beq 5cac <timer_settime+0x188>
/*
* The timer has been started and is running. So we return the
* old ones in "ovalue"
*/
if ( ovalue )
5bf8: e3560000 cmp r6, #0 ; 0x0
*ovalue = ptimer->timer_data;
5bfc: 1285c054 addne ip, r5, #84 ; 0x54
5c00: 189c000f ldmne ip, {r0, r1, r2, r3}
5c04: 1886000f stmne r6, {r0, r1, r2, r3}
ptimer->timer_data = normalize;
5c08: e897000f ldm r7, {r0, r1, r2, r3}
5c0c: 0285c054 addeq ip, r5, #84 ; 0x54
5c10: e88c000f stm ip, {r0, r1, r2, r3}
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
5c14: e3a03003 mov r3, #3 ; 0x3
_TOD_Get( &ptimer->time );
5c18: e285006c add r0, r5, #108 ; 0x6c
if ( ovalue )
*ovalue = ptimer->timer_data;
ptimer->timer_data = normalize;
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
5c1c: e5c5303c strb r3, [r5, #60]
_TOD_Get( &ptimer->time );
5c20: eb0005ff bl 7424 <_TOD_Get>
_Thread_Enable_dispatch();
5c24: eb000a5e bl 85a4 <_Thread_Enable_dispatch>
5c28: e3a00000 mov r0, #0 ; 0x0
5c2c: ea000003 b 5c40 <timer_settime+0x11c>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
5c30: eb002108 bl e058 <__errno>
5c34: e3a03016 mov r3, #22 ; 0x16
5c38: e5803000 str r3, [r0]
5c3c: e3e00000 mvn r0, #0 ; 0x0
}
5c40: e28dd018 add sp, sp, #24 ; 0x18
5c44: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
case OBJECTS_LOCAL:
/* First, it verifies if the timer must be stopped */
if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) {
/* Stop the timer */
(void) _Watchdog_Remove( &ptimer->Timer );
5c48: e2800010 add r0, r0, #16 ; 0x10
5c4c: eb000f93 bl 9aa0 <_Watchdog_Remove>
/* The old data of the timer are returned */
if ( ovalue )
5c50: e3560000 cmp r6, #0 ; 0x0
*ovalue = ptimer->timer_data;
5c54: 1285c054 addne ip, r5, #84 ; 0x54
5c58: 189c000f ldmne ip, {r0, r1, r2, r3}
5c5c: 1886000f stmne r6, {r0, r1, r2, r3}
/* The new data are set */
ptimer->timer_data = normalize;
5c60: e897000f ldm r7, {r0, r1, r2, r3}
5c64: 0285c054 addeq ip, r5, #84 ; 0x54
5c68: e88c000f stm ip, {r0, r1, r2, r3}
/* Indicates that the timer is created and stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
5c6c: e3a03004 mov r3, #4 ; 0x4
5c70: e5c5303c strb r3, [r5, #60]
/* Returns with success */
_Thread_Enable_dispatch();
5c74: eb000a4a bl 85a4 <_Thread_Enable_dispatch>
5c78: e3a00000 mov r0, #0 ; 0x0
5c7c: eaffffef b 5c40 <timer_settime+0x11c>
normalize = *value;
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
/* Check for seconds in the past */
if ( _Timespec_Greater_than( &_TOD_Now, &normalize.it_value ) )
5c80: e28d800c add r8, sp, #12 ; 0xc
5c84: e59f0034 ldr r0, [pc, #52] ; 5cc0 <timer_settime+0x19c>
5c88: e1a01008 mov r1, r8
5c8c: eb000e1a bl 94fc <_Timespec_Greater_than>
5c90: e3500000 cmp r0, #0 ; 0x0
5c94: 1affffe5 bne 5c30 <timer_settime+0x10c>
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_Subtract( &_TOD_Now, &normalize.it_value, &normalize.it_value );
5c98: e1a01008 mov r1, r8
5c9c: e59f001c ldr r0, [pc, #28] ; 5cc0 <timer_settime+0x19c>
5ca0: e1a02008 mov r2, r8
5ca4: eb000e21 bl 9530 <_Timespec_Subtract>
5ca8: eaffffb7 b 5b8c <timer_settime+0x68>
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated ) {
_Thread_Enable_dispatch();
5cac: eb000a3c bl 85a4 <_Thread_Enable_dispatch> <== NOT EXECUTED
5cb0: e1a00004 mov r0, r4 <== NOT EXECUTED
5cb4: eaffffe1 b 5c40 <timer_settime+0x11c> <== NOT EXECUTED
0000447c <ualarm>:
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
447c: e92d4070 push {r4, r5, r6, lr}
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
4480: e59f6108 ldr r6, [pc, #264] ; 4590 <ualarm+0x114>
4484: e596201c ldr r2, [r6, #28]
4488: e3520000 cmp r2, #0 ; 0x0
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
448c: e24dd008 sub sp, sp, #8 ; 0x8
4490: e1a04000 mov r4, r0
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
4494: 0a000036 beq 4574 <ualarm+0xf8>
_Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL );
} else {
switch ( _Watchdog_Remove( the_timer ) ) {
4498: e1a00006 mov r0, r6 <== NOT EXECUTED
449c: eb000fd5 bl 83f8 <_Watchdog_Remove> <== NOT EXECUTED
44a0: e2400002 sub r0, r0, #2 ; 0x2 <== NOT EXECUTED
44a4: e3500001 cmp r0, #1 ; 0x1 <== NOT EXECUTED
44a8: 83a05000 movhi r5, #0 ; 0x0 <== NOT EXECUTED
44ac: 9a00001b bls 4520 <ualarm+0xa4> <== NOT EXECUTED
/*
* If useconds is non-zero, then the caller wants to schedule
* the alarm repeatedly at that interval. If the interval is
* less than a single clock tick, then fudge it to a clock tick.
*/
if ( useconds ) {
44b0: e3540000 cmp r4, #0 ; 0x0
44b4: 0a000016 beq 4514 <ualarm+0x98>
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
44b8: e59f30d4 ldr r3, [pc, #212] ; 4594 <ualarm+0x118>
44bc: e0812493 umull r2, r1, r3, r4
44c0: e1a01921 lsr r1, r1, #18
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
44c4: e1a02401 lsl r2, r1, #8
44c8: e0422181 sub r2, r2, r1, lsl #3
44cc: e1a03302 lsl r3, r2, #6
44d0: e0623003 rsb r3, r2, r3
44d4: e0833001 add r3, r3, r1
44d8: e0443303 sub r3, r4, r3, lsl #6
44dc: e1a02383 lsl r2, r3, #7
44e0: e0422103 sub r2, r2, r3, lsl #2
44e4: e0822003 add r2, r2, r3
44e8: e1a02182 lsl r2, r2, #3
ticks = _Timespec_To_ticks( &tp );
44ec: e1a0000d mov r0, sp
* less than a single clock tick, then fudge it to a clock tick.
*/
if ( useconds ) {
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
44f0: e88d0006 stm sp, {r1, r2}
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
ticks = _Timespec_To_ticks( &tp );
44f4: eb000e5c bl 7e6c <_Timespec_To_ticks>
if ( ticks == 0 )
ticks = 1;
_Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) );
44f8: e1a0000d mov r0, sp
44fc: eb000e5a bl 7e6c <_Timespec_To_ticks>
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
4500: e59f1088 ldr r1, [pc, #136] ; 4590 <ualarm+0x114>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
4504: e586000c str r0, [r6, #12]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
4508: e59f0088 ldr r0, [pc, #136] ; 4598 <ualarm+0x11c>
if ( useconds ) {
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
ticks = _Timespec_To_ticks( &tp );
450c: e1a0400d mov r4, sp
4510: eb000f49 bl 823c <_Watchdog_Insert>
_Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) );
}
return remaining;
}
4514: e1a00005 mov r0, r5
4518: e28dd008 add sp, sp, #8 ; 0x8
451c: e8bd8070 pop {r4, r5, r6, pc}
* boot. Since alarm() is dealing in seconds, we must account for
* this.
*/
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
4520: e596300c ldr r3, [r6, #12] <== NOT EXECUTED
4524: e2860014 add r0, r6, #20 ; 0x14 <== NOT EXECUTED
4528: e8900005 ldm r0, {r0, r2} <== NOT EXECUTED
452c: e0800003 add r0, r0, r3 <== NOT EXECUTED
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
4530: e0620000 rsb r0, r2, r0 <== NOT EXECUTED
4534: e1a0100d mov r1, sp <== NOT EXECUTED
4538: eb000e1e bl 7db8 <_Timespec_From_ticks> <== NOT EXECUTED
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
remaining += tp.tv_nsec / 1000;
453c: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED
4540: e59f3054 ldr r3, [pc, #84] ; 459c <ualarm+0x120> <== NOT EXECUTED
4544: e0cc2093 smull r2, ip, r3, r0 <== NOT EXECUTED
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
4548: e59d1000 ldr r1, [sp] <== NOT EXECUTED
454c: e1a02401 lsl r2, r1, #8 <== NOT EXECUTED
4550: e0422181 sub r2, r2, r1, lsl #3 <== NOT EXECUTED
4554: e1a03302 lsl r3, r2, #6 <== NOT EXECUTED
4558: e0623003 rsb r3, r2, r3 <== NOT EXECUTED
455c: e0833001 add r3, r3, r1 <== NOT EXECUTED
remaining += tp.tv_nsec / 1000;
4560: e1a00fc0 asr r0, r0, #31 <== NOT EXECUTED
4564: e060034c rsb r0, r0, ip, asr #6 <== NOT EXECUTED
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
4568: e1a03303 lsl r3, r3, #6 <== NOT EXECUTED
remaining += tp.tv_nsec / 1000;
456c: e0805003 add r5, r0, r3 <== NOT EXECUTED
4570: eaffffce b 44b0 <ualarm+0x34> <== NOT EXECUTED
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
4574: e59f3024 ldr r3, [pc, #36] ; 45a0 <ualarm+0x124>
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
4578: e5862008 str r2, [r6, #8]
the_watchdog->routine = routine;
457c: e586301c str r3, [r6, #28]
the_watchdog->id = id;
4580: e5862020 str r2, [r6, #32]
the_watchdog->user_data = user_data;
4584: e5862024 str r2, [r6, #36]
4588: e1a05002 mov r5, r2
458c: eaffffc7 b 44b0 <ualarm+0x34>
00006f70 <unlink>:
#include <rtems/seterr.h>
int unlink(
const char *path
)
{
6f70: e92d4030 push {r4, r5, lr}
/*
* Get the node to be unlinked.
*/
result = rtems_filesystem_evaluate_path( path, 0, &loc, false );
6f74: e3a01000 mov r1, #0 ; 0x0
#include <rtems/seterr.h>
int unlink(
const char *path
)
{
6f78: e24dd010 sub sp, sp, #16 ; 0x10
/*
* Get the node to be unlinked.
*/
result = rtems_filesystem_evaluate_path( path, 0, &loc, false );
6f7c: e1a0200d mov r2, sp
6f80: e1a03001 mov r3, r1
6f84: ebfff1e7 bl 3728 <rtems_filesystem_evaluate_path>
if ( result != 0 )
6f88: e3500000 cmp r0, #0 ; 0x0
/*
* Get the node to be unlinked.
*/
result = rtems_filesystem_evaluate_path( path, 0, &loc, false );
6f8c: e1a0500d mov r5, sp
if ( result != 0 )
6f90: 0a000003 beq 6fa4 <unlink+0x34>
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->unlink_h)( &loc );
rtems_filesystem_freenode( &loc );
6f94: e3e04000 mvn r4, #0 ; 0x0
return result;
}
6f98: e1a00004 mov r0, r4
6f9c: e28dd010 add sp, sp, #16 ; 0x10
6fa0: e8bd8030 pop {r4, r5, pc}
result = rtems_filesystem_evaluate_path( path, 0, &loc, false );
if ( result != 0 )
return -1;
result = rtems_filesystem_evaluate_parent(RTEMS_LIBIO_PERMS_WRITE, &loc );
6fa4: e2800002 add r0, r0, #2 ; 0x2
6fa8: e1a0100d mov r1, sp
6fac: ebfff1b3 bl 3680 <rtems_filesystem_evaluate_parent>
if (result != 0 && errno != ENOTSUP) {
6fb0: e3500000 cmp r0, #0 ; 0x0
6fb4: 1a00001a bne 7024 <unlink+0xb4>
rtems_filesystem_freenode( &loc );
return -1;
}
if ( !loc.ops->node_type_h ) {
6fb8: e59d2008 ldr r2, [sp, #8]
6fbc: e5923010 ldr r3, [r2, #16]
6fc0: e3530000 cmp r3, #0 ; 0x0
6fc4: 0a000025 beq 7060 <unlink+0xf0>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
6fc8: e1a0000d mov r0, sp
6fcc: e1a0e00f mov lr, pc
6fd0: e12fff13 bx r3
6fd4: e3500001 cmp r0, #1 ; 0x1
6fd8: 0a00002a beq 7088 <unlink+0x118>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( EISDIR );
}
if ( !loc.ops->unlink_h ) {
6fdc: e59d2008 ldr r2, [sp, #8]
6fe0: e592300c ldr r3, [r2, #12]
6fe4: e3530000 cmp r3, #0 ; 0x0
6fe8: 0a00001c beq 7060 <unlink+0xf0>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->unlink_h)( &loc );
6fec: e1a0000d mov r0, sp
6ff0: e1a0e00f mov lr, pc
6ff4: e12fff13 bx r3
rtems_filesystem_freenode( &loc );
6ff8: e59d3008 ldr r3, [sp, #8]
6ffc: e3530000 cmp r3, #0 ; 0x0
if ( !loc.ops->unlink_h ) {
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->unlink_h)( &loc );
7000: e1a04000 mov r4, r0
rtems_filesystem_freenode( &loc );
7004: 0affffe3 beq 6f98 <unlink+0x28>
7008: e593301c ldr r3, [r3, #28]
700c: e3530000 cmp r3, #0 ; 0x0
7010: 0affffe0 beq 6f98 <unlink+0x28>
7014: e1a0000d mov r0, sp
7018: e1a0e00f mov lr, pc
701c: e12fff13 bx r3
7020: eaffffdc b 6f98 <unlink+0x28>
result = rtems_filesystem_evaluate_path( path, 0, &loc, false );
if ( result != 0 )
return -1;
result = rtems_filesystem_evaluate_parent(RTEMS_LIBIO_PERMS_WRITE, &loc );
if (result != 0 && errno != ENOTSUP) {
7024: eb0022c3 bl fb38 <__errno> <== NOT EXECUTED
7028: e5903000 ldr r3, [r0] <== NOT EXECUTED
702c: e3530086 cmp r3, #134 ; 0x86 <== NOT EXECUTED
7030: 0affffe0 beq 6fb8 <unlink+0x48> <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
7034: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
7038: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
703c: 0affffd4 beq 6f94 <unlink+0x24> <== NOT EXECUTED
7040: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
7044: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
7048: 0affffd1 beq 6f94 <unlink+0x24> <== NOT EXECUTED
704c: e1a0000d mov r0, sp <== NOT EXECUTED
7050: e1a0e00f mov lr, pc <== NOT EXECUTED
7054: e12fff13 bx r3 <== NOT EXECUTED
7058: e3e04000 mvn r4, #0 ; 0x0 <== NOT EXECUTED
705c: eaffffcd b 6f98 <unlink+0x28> <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( EISDIR );
}
if ( !loc.ops->unlink_h ) {
rtems_filesystem_freenode( &loc );
7060: e592301c ldr r3, [r2, #28] <== NOT EXECUTED
7064: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
7068: 11a0000d movne r0, sp <== NOT EXECUTED
706c: 11a0e00f movne lr, pc <== NOT EXECUTED
7070: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
7074: eb0022af bl fb38 <__errno> <== NOT EXECUTED
7078: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
707c: e5803000 str r3, [r0] <== NOT EXECUTED
7080: e3e04000 mvn r4, #0 ; 0x0 <== NOT EXECUTED
7084: eaffffc3 b 6f98 <unlink+0x28> <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_filesystem_freenode( &loc );
7088: e59d3008 ldr r3, [sp, #8]
708c: e3530000 cmp r3, #0 ; 0x0
7090: 0a000004 beq 70a8 <unlink+0x138>
7094: e593301c ldr r3, [r3, #28]
7098: e3530000 cmp r3, #0 ; 0x0
709c: 11a0000d movne r0, sp
70a0: 11a0e00f movne lr, pc
70a4: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( EISDIR );
70a8: eb0022a2 bl fb38 <__errno>
70ac: e3a03015 mov r3, #21 ; 0x15
70b0: e5803000 str r3, [r0]
70b4: e3e04000 mvn r4, #0 ; 0x0
70b8: eaffffb6 b 6f98 <unlink+0x28>
00005de0 <unmount>:
*/
int unmount(
const char *path
)
{
5de0: e92d4030 push {r4, r5, lr}
5de4: e24dd010 sub sp, sp, #16 ; 0x10
* 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, 0x0, &loc, true ) )
5de8: e3a01000 mov r1, #0 ; 0x0
5dec: e1a0200d mov r2, sp
5df0: e3a03001 mov r3, #1 ; 0x1
5df4: ebfff1b7 bl 24d8 <rtems_filesystem_evaluate_path>
5df8: e3500000 cmp r0, #0 ; 0x0
5dfc: e1a0500d mov r5, sp
5e00: 1a000032 bne 5ed0 <unmount+0xf0>
return -1;
mt_entry = loc.mt_entry;
5e04: e59d400c ldr r4, [sp, #12]
/*
* Verify this is the root node for the file system to be unmounted.
*/
if ( !rtems_filesystem_nodes_equal( fs_root_loc, &loc) ){
5e08: e59d3000 ldr r3, [sp]
5e0c: e5942018 ldr r2, [r4, #24]
5e10: e1520003 cmp r2, r3
5e14: 1a000035 bne 5ef0 <unmount+0x110>
/*
* Free the loc node and just use the nodes from the mt_entry .
*/
rtems_filesystem_freenode( &loc );
5e18: e59d3008 ldr r3, [sp, #8]
5e1c: e3530000 cmp r3, #0 ; 0x0
5e20: 0a000004 beq 5e38 <unmount+0x58>
5e24: e593301c ldr r3, [r3, #28]
5e28: e3530000 cmp r3, #0 ; 0x0
5e2c: 11a0000d movne r0, sp
5e30: 11a0e00f movne lr, pc
5e34: 112fff13 bxne r3
/*
* Verify Unmount is supported by both filesystems.
*/
if ( !fs_mount_loc->ops->unmount_h )
5e38: e5943010 ldr r3, [r4, #16]
5e3c: e5932028 ldr r2, [r3, #40]
5e40: e3520000 cmp r2, #0 ; 0x0
5e44: 0a000052 beq 5f94 <unmount+0x1b4>
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( !fs_root_loc->ops->fsunmount_me_h )
5e48: e5943020 ldr r3, [r4, #32]
5e4c: e593202c ldr r2, [r3, #44]
5e50: e3520000 cmp r2, #0 ; 0x0
5e54: 0a00004e beq 5f94 <unmount+0x1b4>
* 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 )
5e58: e59f3148 ldr r3, [pc, #328] ; 5fa8 <unmount+0x1c8>
5e5c: e5932000 ldr r2, [r3]
5e60: e5921010 ldr r1, [r2, #16]
5e64: e1510004 cmp r1, r4
5e68: 0a00001b beq 5edc <unmount+0xfc>
/*
* Search the mount table for any mount entries referencing this
* mount entry.
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
5e6c: e59f1138 ldr r1, [pc, #312] ; 5fac <unmount+0x1cc>
5e70: e4912004 ldr r2, [r1], #4
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node );
5e74: e1510002 cmp r1, r2
5e78: 0a00000a beq 5ea8 <unmount+0xc8>
the_node = the_node->next ) {
the_mount_entry = ( rtems_filesystem_mount_table_entry_t * )the_node;
if (the_mount_entry->mt_point_node.mt_entry == fs_root_loc->mt_entry ) {
5e7c: e5940024 ldr r0, [r4, #36]
5e80: e5923014 ldr r3, [r2, #20]
5e84: e1530000 cmp r3, r0
5e88: 1a000003 bne 5e9c <unmount+0xbc>
5e8c: ea000012 b 5edc <unmount+0xfc> <== NOT EXECUTED
5e90: e5923014 ldr r3, [r2, #20]
5e94: e1500003 cmp r0, r3
5e98: 0a00000f beq 5edc <unmount+0xfc>
* mount entry.
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node );
the_node = the_node->next ) {
5e9c: e5922000 ldr r2, [r2]
* Search the mount table for any mount entries referencing this
* mount entry.
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node );
5ea0: e1510002 cmp r1, r2
5ea4: 1afffff9 bne 5e90 <unmount+0xb0>
* 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 )
5ea8: e1a00004 mov r0, r4
5eac: ebfff28e bl 28ec <rtems_libio_is_open_files_in_fs>
5eb0: e3500001 cmp r0, #1 ; 0x1
5eb4: 0a000008 beq 5edc <unmount+0xfc>
* 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 )
5eb8: e5943010 ldr r3, [r4, #16]
5ebc: e1a00004 mov r0, r4
5ec0: e1a0e00f mov lr, pc
5ec4: e593f028 ldr pc, [r3, #40]
5ec8: e2505000 subs r5, r0, #0 ; 0x0
5ecc: 0a000014 beq 5f24 <unmount+0x144>
*/
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
5ed0: e3e00000 mvn r0, #0 ; 0x0
}
5ed4: e28dd010 add sp, sp, #16 ; 0x10
5ed8: e8bd8030 pop {r4, r5, pc}
* descriptors that are currently active and reference nodes in the
* file system that we are trying to unmount
*/
if ( rtems_libio_is_open_files_in_fs( mt_entry ) == 1 )
rtems_set_errno_and_return_minus_one( EBUSY );
5edc: eb0021b8 bl e5c4 <__errno>
5ee0: e3a03010 mov r3, #16 ; 0x10
5ee4: e5803000 str r3, [r0]
5ee8: e3e00000 mvn r0, #0 ; 0x0
5eec: eafffff8 b 5ed4 <unmount+0xf4>
/*
* Verify this is the root node for the file system to be unmounted.
*/
if ( !rtems_filesystem_nodes_equal( fs_root_loc, &loc) ){
rtems_filesystem_freenode( &loc );
5ef0: e59d3008 ldr r3, [sp, #8]
5ef4: e3530000 cmp r3, #0 ; 0x0
5ef8: 0a000004 beq 5f10 <unmount+0x130>
5efc: e593301c ldr r3, [r3, #28]
5f00: e3530000 cmp r3, #0 ; 0x0
5f04: 11a0000d movne r0, sp
5f08: 11a0e00f movne lr, pc
5f0c: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( EACCES );
5f10: eb0021ab bl e5c4 <__errno>
5f14: e3a0300d mov r3, #13 ; 0xd
5f18: e5803000 str r3, [r0]
5f1c: e3e00000 mvn r0, #0 ; 0x0
5f20: eaffffeb b 5ed4 <unmount+0xf4>
* 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){
5f24: e5943020 ldr r3, [r4, #32]
5f28: e1a00004 mov r0, r4
5f2c: e1a0e00f mov lr, pc
5f30: e593f02c ldr pc, [r3, #44]
5f34: e3500000 cmp r0, #0 ; 0x0
5f38: 1a00000d bne 5f74 <unmount+0x194>
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
5f3c: e1a00004 mov r0, r4
5f40: eb0004ee bl 7300 <_Chain_Extract>
/*
* 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 );
5f44: e5943010 ldr r3, [r4, #16]
5f48: e3530000 cmp r3, #0 ; 0x0
5f4c: 0a000004 beq 5f64 <unmount+0x184>
5f50: e593301c ldr r3, [r3, #28]
5f54: e3530000 cmp r3, #0 ; 0x0
5f58: 12840008 addne r0, r4, #8 ; 0x8
5f5c: 11a0e00f movne lr, pc
5f60: 112fff13 bxne r3
free( mt_entry );
5f64: e1a00004 mov r0, r4
5f68: ebfff1af bl 262c <free>
5f6c: e3a00000 mov r0, #0 ; 0x0
5f70: eaffffd7 b 5ed4 <unmount+0xf4>
* This was response was questionable but the best we could
* come up with.
*/
if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){
if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 )
5f74: e1a00004 mov r0, r4 <== NOT EXECUTED
5f78: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED
5f7c: e1a0e00f mov lr, pc <== NOT EXECUTED
5f80: e593f020 ldr pc, [r3, #32] <== NOT EXECUTED
5f84: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
5f88: 0affffd0 beq 5ed0 <unmount+0xf0> <== NOT EXECUTED
rtems_fatal_error_occurred( 0 );
5f8c: e1a00005 mov r0, r5 <== NOT EXECUTED
5f90: eb0003d5 bl 6eec <rtems_fatal_error_occurred> <== NOT EXECUTED
if ( !fs_mount_loc->ops->unmount_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( !fs_root_loc->ops->fsunmount_me_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
5f94: eb00218a bl e5c4 <__errno> <== NOT EXECUTED
5f98: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
5f9c: e5803000 str r3, [r0] <== NOT EXECUTED
5fa0: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
5fa4: eaffffca b 5ed4 <unmount+0xf4> <== NOT EXECUTED
00005b2c <utime>:
int utime(
const char *path,
const struct utimbuf *times
)
{
5b2c: e92d4030 push {r4, r5, lr}
5b30: e24dd010 sub sp, sp, #16 ; 0x10
5b34: e1a04001 mov r4, r1
rtems_filesystem_location_info_t temp_loc;
int result;
if ( rtems_filesystem_evaluate_path( path, 0x00, &temp_loc, true ) )
5b38: e1a0200d mov r2, sp
5b3c: e3a01000 mov r1, #0 ; 0x0
5b40: e3a03001 mov r3, #1 ; 0x1
5b44: ebfff1b3 bl 2218 <rtems_filesystem_evaluate_path>
5b48: e3500000 cmp r0, #0 ; 0x0
5b4c: e1a0500d mov r5, sp
5b50: 1a00001b bne 5bc4 <utime+0x98>
return -1;
if ( !temp_loc.ops->utime_h ){
5b54: e59d2008 ldr r2, [sp, #8]
5b58: e5923030 ldr r3, [r2, #48]
5b5c: e3530000 cmp r3, #0 ; 0x0
5b60: 0a00000f beq 5ba4 <utime+0x78>
rtems_filesystem_freenode( &temp_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime );
5b64: e8940006 ldm r4, {r1, r2}
5b68: e1a0000d mov r0, sp
5b6c: e1a0e00f mov lr, pc
5b70: e12fff13 bx r3
rtems_filesystem_freenode( &temp_loc );
5b74: e59d3008 ldr r3, [sp, #8]
5b78: e3530000 cmp r3, #0 ; 0x0
if ( !temp_loc.ops->utime_h ){
rtems_filesystem_freenode( &temp_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime );
5b7c: e1a04000 mov r4, r0
rtems_filesystem_freenode( &temp_loc );
5b80: 0a000004 beq 5b98 <utime+0x6c>
5b84: e593301c ldr r3, [r3, #28]
5b88: e3530000 cmp r3, #0 ; 0x0
5b8c: 11a0000d movne r0, sp
5b90: 11a0e00f movne lr, pc
5b94: 112fff13 bxne r3
return result;
}
5b98: e1a00004 mov r0, r4
5b9c: e28dd010 add sp, sp, #16 ; 0x10
5ba0: e8bd8030 pop {r4, r5, pc}
if ( rtems_filesystem_evaluate_path( path, 0x00, &temp_loc, true ) )
return -1;
if ( !temp_loc.ops->utime_h ){
rtems_filesystem_freenode( &temp_loc );
5ba4: e592301c ldr r3, [r2, #28] <== NOT EXECUTED
5ba8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
5bac: 11a0000d movne r0, sp <== NOT EXECUTED
5bb0: 11a0e00f movne lr, pc <== NOT EXECUTED
5bb4: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
5bb8: eb002291 bl e604 <__errno> <== NOT EXECUTED
5bbc: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
5bc0: e5803000 str r3, [r0] <== NOT EXECUTED
5bc4: e3e04000 mvn r4, #0 ; 0x0
5bc8: eafffff2 b 5b98 <utime+0x6c>
00001d90 <vprintk>:
*/
void vprintk(
const char *fmt,
va_list ap
)
{
1d90: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
1d94: e1a08000 mov r8, r0
char c, *str;
int lflag, base, sign, width, lead, minus;
for (; *fmt != '\0'; fmt++) {
1d98: e5d00000 ldrb r0, [r0]
1d9c: e3500000 cmp r0, #0 ; 0x0
*/
void vprintk(
const char *fmt,
va_list ap
)
{
1da0: e24dd01c sub sp, sp, #28 ; 0x1c
1da4: e1a07001 mov r7, r1
char c, *str;
int lflag, base, sign, width, lead, minus;
for (; *fmt != '\0'; fmt++) {
1da8: 0a0000a1 beq 2034 <vprintk+0x2a4>
1dac: e59fa3bc ldr sl, [pc, #956] ; 2170 <vprintk+0x3e0>
base = 0;
sign = 0;
width = 0;
minus = 0;
lead = ' ';
if (*fmt == '%') {
1db0: e3500025 cmp r0, #37 ; 0x25
1db4: 1a000059 bne 1f20 <vprintk+0x190>
fmt++;
if (*fmt == '0' ) {
1db8: e5d80001 ldrb r0, [r8, #1]
sign = 0;
width = 0;
minus = 0;
lead = ' ';
if (*fmt == '%') {
fmt++;
1dbc: e2881001 add r1, r8, #1 ; 0x1
if (*fmt == '0' ) {
1dc0: e3500030 cmp r0, #48 ; 0x30
lead = '0';
fmt++;
1dc4: 05f10001 ldrbeq r0, [r1, #1]!
width = 0;
minus = 0;
lead = ' ';
if (*fmt == '%') {
fmt++;
if (*fmt == '0' ) {
1dc8: 13a09020 movne r9, #32 ; 0x20
lead = '0';
fmt++;
1dcc: 03a09030 moveq r9, #48 ; 0x30
}
if (*fmt == '-' ) {
1dd0: e350002d cmp r0, #45 ; 0x2d
minus = 1;
fmt++;
1dd4: 05f10001 ldrbeq r0, [r1, #1]!
1dd8: 03a03001 moveq r3, #1 ; 0x1
fmt++;
if (*fmt == '0' ) {
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
1ddc: 13a02000 movne r2, #0 ; 0x0
minus = 1;
fmt++;
1de0: 058d3000 streq r3, [sp]
}
while (*fmt >= '0' && *fmt <= '9' ) {
1de4: e2403030 sub r3, r0, #48 ; 0x30
fmt++;
if (*fmt == '0' ) {
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
1de8: 158d2000 strne r2, [sp]
minus = 1;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
1dec: e3530009 cmp r3, #9 ; 0x9
1df0: 83a04000 movhi r4, #0 ; 0x0
1df4: 81a08001 movhi r8, r1
1df8: 81a0b004 movhi fp, r4
1dfc: 8a00000b bhi 1e30 <vprintk+0xa0>
1e00: e3a04000 mov r4, #0 ; 0x0
width *= 10;
width += (*fmt - '0');
1e04: e1a03184 lsl r3, r4, #3
1e08: e1a02084 lsl r2, r4, #1
1e0c: e0822003 add r2, r2, r3
1e10: e0822000 add r2, r2, r0
}
if (*fmt == '-' ) {
minus = 1;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
1e14: e5f10001 ldrb r0, [r1, #1]!
1e18: e2403030 sub r3, r0, #48 ; 0x30
1e1c: e3530009 cmp r3, #9 ; 0x9
width *= 10;
width += (*fmt - '0');
1e20: e2424030 sub r4, r2, #48 ; 0x30
}
if (*fmt == '-' ) {
minus = 1;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
1e24: 9afffff6 bls 1e04 <vprintk+0x74>
1e28: e1a0b004 mov fp, r4
1e2c: e1a08001 mov r8, r1
width *= 10;
width += (*fmt - '0');
fmt++;
}
if ((c = *fmt) == 'l') {
1e30: e350006c cmp r0, #108 ; 0x6c
lflag = 1;
c = *++fmt;
1e34: 05d10001 ldrbeq r0, [r1, #1]
}
switch (c) {
1e38: e2403044 sub r3, r0, #68 ; 0x44
fmt++;
}
if ((c = *fmt) == 'l') {
lflag = 1;
c = *++fmt;
1e3c: 02818001 addeq r8, r1, #1 ; 0x1
}
switch (c) {
1e40: e3530034 cmp r3, #52 ; 0x34
1e44: 979ff103 ldrls pc, [pc, r3, lsl #2]
1e48: ea000034 b 1f20 <vprintk+0x190>
1e4c: 0000203c .word 0x0000203c
1e50: 00001f20 .word 0x00001f20
1e54: 00001f20 .word 0x00001f20 <== NOT EXECUTED
1e58: 00001f20 .word 0x00001f20 <== NOT EXECUTED
1e5c: 00001f20 .word 0x00001f20 <== NOT EXECUTED
1e60: 0000203c .word 0x0000203c <== NOT EXECUTED
1e64: 00001f20 .word 0x00001f20 <== NOT EXECUTED
1e68: 00001f20 .word 0x00001f20 <== NOT EXECUTED
1e6c: 00001f20 .word 0x00001f20 <== NOT EXECUTED
1e70: 00001f20 .word 0x00001f20 <== NOT EXECUTED
1e74: 00001f20 .word 0x00001f20 <== NOT EXECUTED
1e78: 00001f40 .word 0x00001f40 <== NOT EXECUTED
1e7c: 00001f20 .word 0x00001f20 <== NOT EXECUTED
1e80: 00001f20 .word 0x00001f20 <== NOT EXECUTED
1e84: 00001f20 .word 0x00001f20 <== NOT EXECUTED
1e88: 00001f20 .word 0x00001f20 <== NOT EXECUTED
1e8c: 00001f20 .word 0x00001f20 <== NOT EXECUTED
1e90: 00002130 .word 0x00002130 <== NOT EXECUTED
1e94: 00001f20 .word 0x00001f20 <== NOT EXECUTED
1e98: 00001f20 .word 0x00001f20 <== NOT EXECUTED
1e9c: 00002164 .word 0x00002164 <== NOT EXECUTED
1ea0: 00001f20 .word 0x00001f20 <== NOT EXECUTED
1ea4: 00001f20 .word 0x00001f20 <== NOT EXECUTED
1ea8: 00001f20 .word 0x00001f20 <== NOT EXECUTED
1eac: 00001f20 .word 0x00001f20 <== NOT EXECUTED
1eb0: 00001f20 .word 0x00001f20 <== NOT EXECUTED
1eb4: 00001f20 .word 0x00001f20 <== NOT EXECUTED
1eb8: 00001f20 .word 0x00001f20 <== NOT EXECUTED
1ebc: 00001f20 .word 0x00001f20 <== NOT EXECUTED
1ec0: 00001f20 .word 0x00001f20 <== NOT EXECUTED
1ec4: 00001f20 .word 0x00001f20 <== NOT EXECUTED
1ec8: 00002118 .word 0x00002118 <== NOT EXECUTED
1ecc: 0000203c .word 0x0000203c <== NOT EXECUTED
1ed0: 00001f20 .word 0x00001f20 <== NOT EXECUTED
1ed4: 00001f20 .word 0x00001f20 <== NOT EXECUTED
1ed8: 00001f20 .word 0x00001f20 <== NOT EXECUTED
1edc: 00001f20 .word 0x00001f20 <== NOT EXECUTED
1ee0: 0000203c .word 0x0000203c <== NOT EXECUTED
1ee4: 00001f20 .word 0x00001f20 <== NOT EXECUTED
1ee8: 00001f20 .word 0x00001f20 <== NOT EXECUTED
1eec: 00001f20 .word 0x00001f20 <== NOT EXECUTED
1ef0: 00001f20 .word 0x00001f20 <== NOT EXECUTED
1ef4: 00001f20 .word 0x00001f20 <== NOT EXECUTED
1ef8: 00001f40 .word 0x00001f40 <== NOT EXECUTED
1efc: 00002164 .word 0x00002164 <== NOT EXECUTED
1f00: 00001f20 .word 0x00001f20 <== NOT EXECUTED
1f04: 00001f20 .word 0x00001f20 <== NOT EXECUTED
1f08: 00002074 .word 0x00002074 <== NOT EXECUTED
1f0c: 00001f20 .word 0x00001f20 <== NOT EXECUTED
1f10: 00002130 .word 0x00002130 <== NOT EXECUTED
1f14: 00001f20 .word 0x00001f20 <== NOT EXECUTED
1f18: 00001f20 .word 0x00001f20 <== NOT EXECUTED
1f1c: 00002164 .word 0x00002164 <== NOT EXECUTED
if (base)
printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int),
base, sign, width, lead);
} else {
BSP_output_char(*fmt);
1f20: e1a0e00f mov lr, pc
1f24: e59af000 ldr pc, [sl]
1f28: e58d7004 str r7, [sp, #4]
)
{
char c, *str;
int lflag, base, sign, width, lead, minus;
for (; *fmt != '\0'; fmt++) {
1f2c: e5f80001 ldrb r0, [r8, #1]!
1f30: e3500000 cmp r0, #0 ; 0x0
1f34: 0a00003e beq 2034 <vprintk+0x2a4>
1f38: e59d7004 ldr r7, [sp, #4]
1f3c: eaffff9b b 1db0 <vprintk+0x20>
break;
case 'c':
BSP_output_char(va_arg(ap, int));
break;
default:
BSP_output_char(c);
1f40: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED
1f44: e3a06008 mov r6, #8 ; 0x8 <== NOT EXECUTED
break;
} /* switch*/
if (base)
printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int),
1f48: e5975000 ldr r5, [r7]
1f4c: e2877004 add r7, r7, #4 ; 0x4
{
long unsigned int n;
int count;
char toPrint[20];
if ( (sign == 1) && ((long)num < 0) ) {
1f50: e0133fa5 ands r3, r3, r5, lsr #31
BSP_output_char(c);
break;
} /* switch*/
if (base)
printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int),
1f54: e58d7004 str r7, [sp, #4]
{
long unsigned int n;
int count;
char toPrint[20];
if ( (sign == 1) && ((long)num < 0) ) {
1f58: 1a00003e bne 2058 <vprintk+0x2c8>
num = -num;
if (maxwidth) maxwidth--;
}
count = 0;
while ((n = num / base) > 0) {
1f5c: e1a00005 mov r0, r5
1f60: e1a01006 mov r1, r6
1f64: eb004351 bl 12cb0 <__aeabi_uidiv>
1f68: e3500000 cmp r0, #0 ; 0x0
1f6c: 01a04000 moveq r4, r0
1f70: 03a07001 moveq r7, #1 ; 0x1
1f74: 0a000010 beq 1fbc <vprintk+0x22c>
1f78: e1a02005 mov r2, r5
1f7c: e3a04000 mov r4, #0 ; 0x0
1f80: e1a05000 mov r5, r0
1f84: ea000000 b 1f8c <vprintk+0x1fc>
1f88: e1a05000 mov r5, r0
toPrint[count++] = (num - (n*base));
1f8c: e0030596 mul r3, r6, r5
1f90: e0633002 rsb r3, r3, r2
1f94: e28d2008 add r2, sp, #8 ; 0x8
1f98: e7c23004 strb r3, [r2, r4]
num = -num;
if (maxwidth) maxwidth--;
}
count = 0;
while ((n = num / base) > 0) {
1f9c: e1a00005 mov r0, r5
1fa0: e1a01006 mov r1, r6
1fa4: eb004341 bl 12cb0 <__aeabi_uidiv>
1fa8: e3500000 cmp r0, #0 ; 0x0
1fac: e1a02005 mov r2, r5
toPrint[count++] = (num - (n*base));
1fb0: e2844001 add r4, r4, #1 ; 0x1
num = -num;
if (maxwidth) maxwidth--;
}
count = 0;
while ((n = num / base) > 0) {
1fb4: 1afffff3 bne 1f88 <vprintk+0x1f8>
1fb8: e2847001 add r7, r4, #1 ; 0x1
toPrint[count++] = (num - (n*base));
num = n;
}
toPrint[count++] = num;
1fbc: e28d201c add r2, sp, #28 ; 0x1c
1fc0: e0823004 add r3, r2, r4
for (n=maxwidth ; n > count; n-- )
1fc4: e157000b cmp r7, fp
1fc8: e1a0600b mov r6, fp
count = 0;
while ((n = num / base) > 0) {
toPrint[count++] = (num - (n*base));
num = n;
}
toPrint[count++] = num;
1fcc: e5435014 strb r5, [r3, #-20]
for (n=maxwidth ; n > count; n-- )
1fd0: 2a000006 bcs 1ff0 <vprintk+0x260>
1fd4: e20940ff and r4, r9, #255 ; 0xff
1fd8: e2466001 sub r6, r6, #1 ; 0x1
BSP_output_char(lead);
1fdc: e1a00004 mov r0, r4
1fe0: e1a0e00f mov lr, pc
1fe4: e59af000 ldr pc, [sl]
toPrint[count++] = (num - (n*base));
num = n;
}
toPrint[count++] = num;
for (n=maxwidth ; n > count; n-- )
1fe8: e1570006 cmp r7, r6
1fec: 3afffff9 bcc 1fd8 <vprintk+0x248>
BSP_output_char(lead);
for (n = 0; n < count; n++) {
1ff0: e3570000 cmp r7, #0 ; 0x0
1ff4: 0affffcc beq 1f2c <vprintk+0x19c>
1ff8: e28d301c add r3, sp, #28 ; 0x1c
1ffc: e3a04000 mov r4, #0 ; 0x0
2000: e0835007 add r5, r3, r7
BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
2004: e0643005 rsb r3, r4, r5
2008: e5532015 ldrb r2, [r3, #-21]
200c: e59f3160 ldr r3, [pc, #352] ; 2174 <vprintk+0x3e4>
toPrint[count++] = num;
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
2010: e2844001 add r4, r4, #1 ; 0x1
BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
2014: e7d30002 ldrb r0, [r3, r2]
2018: e1a0e00f mov lr, pc
201c: e59af000 ldr pc, [sl]
toPrint[count++] = num;
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
2020: e1570004 cmp r7, r4
2024: 8afffff6 bhi 2004 <vprintk+0x274>
)
{
char c, *str;
int lflag, base, sign, width, lead, minus;
for (; *fmt != '\0'; fmt++) {
2028: e5f80001 ldrb r0, [r8, #1]!
202c: e3500000 cmp r0, #0 ; 0x0
2030: 1affffc0 bne 1f38 <vprintk+0x1a8>
base, sign, width, lead);
} else {
BSP_output_char(*fmt);
}
}
}
2034: e28dd01c add sp, sp, #28 ; 0x1c
2038: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
BSP_output_char(c);
break;
} /* switch*/
if (base)
printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int),
203c: e5975000 ldr r5, [r7]
if ((c = *fmt) == 'l') {
lflag = 1;
c = *++fmt;
}
switch (c) {
2040: e3a03001 mov r3, #1 ; 0x1
BSP_output_char(c);
break;
} /* switch*/
if (base)
printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int),
2044: e2877004 add r7, r7, #4 ; 0x4
{
long unsigned int n;
int count;
char toPrint[20];
if ( (sign == 1) && ((long)num < 0) ) {
2048: e0133fa5 ands r3, r3, r5, lsr #31
if ((c = *fmt) == 'l') {
lflag = 1;
c = *++fmt;
}
switch (c) {
204c: e3a0600a mov r6, #10 ; 0xa
BSP_output_char(c);
break;
} /* switch*/
if (base)
printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int),
2050: e58d7004 str r7, [sp, #4]
{
long unsigned int n;
int count;
char toPrint[20];
if ( (sign == 1) && ((long)num < 0) ) {
2054: 0affffc0 beq 1f5c <vprintk+0x1cc>
BSP_output_char('-');
2058: e3a0002d mov r0, #45 ; 0x2d <== NOT EXECUTED
205c: e1a0e00f mov lr, pc <== NOT EXECUTED
2060: e59af000 ldr pc, [sl] <== NOT EXECUTED
num = -num;
if (maxwidth) maxwidth--;
2064: e35b0000 cmp fp, #0 ; 0x0 <== NOT EXECUTED
int count;
char toPrint[20];
if ( (sign == 1) && ((long)num < 0) ) {
BSP_output_char('-');
num = -num;
2068: e2655000 rsb r5, r5, #0 ; 0x0 <== NOT EXECUTED
if (maxwidth) maxwidth--;
206c: 124bb001 subne fp, fp, #1 ; 0x1 <== NOT EXECUTED
2070: eaffffb9 b 1f5c <vprintk+0x1cc> <== NOT EXECUTED
case 'p': base = 16; sign = 0; break;
case 's':
{ int i, len;
char *s;
str = va_arg(ap, char *);
2074: e5979000 ldr r9, [r7]
/* calculate length of string */
for ( len=0, s=str ; *s ; len++, s++ )
2078: e5d93000 ldrb r3, [r9]
case 'p': base = 16; sign = 0; break;
case 's':
{ int i, len;
char *s;
str = va_arg(ap, char *);
207c: e2877004 add r7, r7, #4 ; 0x4
/* calculate length of string */
for ( len=0, s=str ; *s ; len++, s++ )
2080: e3530000 cmp r3, #0 ; 0x0
case 'p': base = 16; sign = 0; break;
case 's':
{ int i, len;
char *s;
str = va_arg(ap, char *);
2084: e58d7004 str r7, [sp, #4]
/* calculate length of string */
for ( len=0, s=str ; *s ; len++, s++ )
2088: 01a06003 moveq r6, r3
208c: 0a000004 beq 20a4 <vprintk+0x314>
2090: e3a06000 mov r6, #0 ; 0x0
2094: e2866001 add r6, r6, #1 ; 0x1
2098: e7d93006 ldrb r3, [r9, r6]
209c: e3530000 cmp r3, #0 ; 0x0
20a0: 1afffffb bne 2094 <vprintk+0x304>
;
/* leading spaces */
if ( !minus )
20a4: e59d2000 ldr r2, [sp]
20a8: e3520000 cmp r2, #0 ; 0x0
20ac: 0a000022 beq 213c <vprintk+0x3ac>
for ( i=len ; i<width ; i++ )
BSP_output_char(' ');
/* no width option */
if (width == 0) {
20b0: e3540000 cmp r4, #0 ; 0x0
20b4: 01a0b006 moveq fp, r6
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
20b8: e35b0000 cmp fp, #0 ; 0x0
20bc: da000008 ble 20e4 <vprintk+0x354>
20c0: e5d90000 ldrb r0, [r9]
20c4: e3500000 cmp r0, #0 ; 0x0
20c8: 0a000005 beq 20e4 <vprintk+0x354>
20cc: e1a04009 mov r4, r9
BSP_output_char(*str);
20d0: e1a0e00f mov lr, pc
20d4: e59af000 ldr pc, [sl]
if (width == 0) {
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
20d8: e5f40001 ldrb r0, [r4, #1]!
20dc: e3500000 cmp r0, #0 ; 0x0
20e0: 1afffffa bne 20d0 <vprintk+0x340>
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
20e4: e59d3000 ldr r3, [sp]
20e8: e3530000 cmp r3, #0 ; 0x0
20ec: 0affff8e beq 1f2c <vprintk+0x19c>
for ( i=len ; i<width ; i++ )
20f0: e15b0006 cmp fp, r6
20f4: daffff8c ble 1f2c <vprintk+0x19c>
20f8: e1a04006 mov r4, r6
20fc: e2844001 add r4, r4, #1 ; 0x1
BSP_output_char(' ');
2100: e3a00020 mov r0, #32 ; 0x20
2104: e1a0e00f mov lr, pc
2108: e59af000 ldr pc, [sl]
for ( i=0 ; i<width && *str ; str++ )
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
for ( i=len ; i<width ; i++ )
210c: e15b0004 cmp fp, r4
2110: cafffff9 bgt 20fc <vprintk+0x36c>
2114: eaffff84 b 1f2c <vprintk+0x19c>
BSP_output_char(' ');
}
break;
case 'c':
BSP_output_char(va_arg(ap, int));
2118: e5d70000 ldrb r0, [r7] <== NOT EXECUTED
211c: e2877004 add r7, r7, #4 ; 0x4 <== NOT EXECUTED
2120: e58d7004 str r7, [sp, #4] <== NOT EXECUTED
2124: e1a0e00f mov lr, pc <== NOT EXECUTED
2128: e59af000 ldr pc, [sl] <== NOT EXECUTED
212c: eaffff7e b 1f2c <vprintk+0x19c> <== NOT EXECUTED
if ((c = *fmt) == 'l') {
lflag = 1;
c = *++fmt;
}
switch (c) {
2130: e3a03000 mov r3, #0 ; 0x0
2134: e3a0600a mov r6, #10 ; 0xa
2138: eaffff82 b 1f48 <vprintk+0x1b8>
for ( len=0, s=str ; *s ; len++, s++ )
;
/* leading spaces */
if ( !minus )
for ( i=len ; i<width ; i++ )
213c: e1540006 cmp r4, r6
2140: daffffda ble 20b0 <vprintk+0x320>
2144: e1a05006 mov r5, r6 <== NOT EXECUTED
2148: e2855001 add r5, r5, #1 ; 0x1 <== NOT EXECUTED
BSP_output_char(' ');
214c: e3a00020 mov r0, #32 ; 0x20 <== NOT EXECUTED
2150: e1a0e00f mov lr, pc <== NOT EXECUTED
2154: e59af000 ldr pc, [sl] <== NOT EXECUTED
for ( len=0, s=str ; *s ; len++, s++ )
;
/* leading spaces */
if ( !minus )
for ( i=len ; i<width ; i++ )
2158: e1550004 cmp r5, r4 <== NOT EXECUTED
215c: bafffff9 blt 2148 <vprintk+0x3b8> <== NOT EXECUTED
2160: eaffffd4 b 20b8 <vprintk+0x328> <== NOT EXECUTED
break;
case 'c':
BSP_output_char(va_arg(ap, int));
break;
default:
BSP_output_char(c);
2164: e3a03000 mov r3, #0 ; 0x0
2168: e3a06010 mov r6, #16 ; 0x10
216c: eaffff75 b 1f48 <vprintk+0x1b8>
00014a80 <write>:
)
{
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
14a80: e59f30c4 ldr r3, [pc, #196] ; 14b4c <write+0xcc>
14a84: e593c000 ldr ip, [r3]
14a88: e150000c cmp r0, ip
ssize_t write(
int fd,
const void *buffer,
size_t count
)
{
14a8c: e92d4070 push {r4, r5, r6, lr}
14a90: e1a06001 mov r6, r1
14a94: e1a05002 mov r5, r2
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
14a98: 2a00001c bcs 14b10 <write+0x90>
iop = rtems_libio_iop( fd );
14a9c: e1a03200 lsl r3, r0, #4
14aa0: e0433100 sub r3, r3, r0, lsl #2
14aa4: e0833000 add r3, r3, r0
14aa8: e59f00a0 ldr r0, [pc, #160] ; 14b50 <write+0xd0>
14aac: e590c000 ldr ip, [r0]
14ab0: e1a03103 lsl r3, r3, #2
14ab4: e08c4003 add r4, ip, r3
rtems_libio_check_is_open( iop );
14ab8: e594300c ldr r3, [r4, #12]
14abc: e3130c01 tst r3, #256 ; 0x100
14ac0: 0a000012 beq 14b10 <write+0x90>
rtems_libio_check_buffer( buffer );
14ac4: e3510000 cmp r1, #0 ; 0x0
14ac8: 0a00001a beq 14b38 <write+0xb8>
rtems_libio_check_count( count );
14acc: e3520000 cmp r2, #0 ; 0x0
14ad0: 01a00002 moveq r0, r2
14ad4: 08bd8070 popeq {r4, r5, r6, pc}
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
14ad8: e3130004 tst r3, #4 ; 0x4
14adc: 0a00000b beq 14b10 <write+0x90>
/*
* Now process the write() request.
*/
if ( !iop->handlers->write_h )
14ae0: e5943030 ldr r3, [r4, #48]
14ae4: e593300c ldr r3, [r3, #12]
14ae8: e3530000 cmp r3, #0 ; 0x0
14aec: 0a00000c beq 14b24 <write+0xa4>
rtems_set_errno_and_return_minus_one( ENOTSUP );
rc = (*iop->handlers->write_h)( iop, buffer, count );
14af0: e1a00004 mov r0, r4
14af4: e1a0e00f mov lr, pc
14af8: e12fff13 bx r3
if ( rc > 0 )
14afc: e3500000 cmp r0, #0 ; 0x0
iop->offset += rc;
14b00: c5943008 ldrgt r3, [r4, #8]
14b04: c0833000 addgt r3, r3, r0
14b08: c5843008 strgt r3, [r4, #8]
return rc;
}
14b0c: e8bd8070 pop {r4, r5, r6, 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 );
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
14b10: ebffdd3b bl c004 <__errno> <== NOT EXECUTED
14b14: e3a03009 mov r3, #9 ; 0x9 <== NOT EXECUTED
14b18: e5803000 str r3, [r0] <== NOT EXECUTED
14b1c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
14b20: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
/*
* Now process the write() request.
*/
if ( !iop->handlers->write_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
14b24: ebffdd36 bl c004 <__errno> <== NOT EXECUTED
14b28: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
14b2c: e5803000 str r3, [r0] <== NOT EXECUTED
14b30: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
14b34: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_buffer( buffer );
14b38: ebffdd31 bl c004 <__errno> <== NOT EXECUTED
14b3c: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED
14b40: e5803000 str r3, [r0] <== NOT EXECUTED
14b44: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
14b48: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED