RTEMS 4.11Annotated Report
Fri Jul 16 19:26:40 2010
300093d8 <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 ) {
300093d8: e5903000 ldr r3, [r0]
)
{
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
300093dc: e5902010 ldr r2, [r0, #16]
switch( node->type ) {
300093e0: e593304c ldr r3, [r3, #76] ; 0x4c
)
{
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
300093e4: e5922034 ldr r2, [r2, #52] ; 0x34
switch( node->type ) {
300093e8: e2433001 sub r3, r3, #1
300093ec: e3530006 cmp r3, #6
300093f0: 979ff103 ldrls pc, [pc, r3, lsl #2]
300093f4: ea000008 b 3000941c <IMFS_Set_handlers+0x44> <== NOT EXECUTED
300093f8: 30009444 .word 0x30009444 <== NOT EXECUTED
300093fc: 30009454 .word 0x30009454 <== NOT EXECUTED
30009400: 30009434 .word 0x30009434 <== NOT EXECUTED
30009404: 30009434 .word 0x30009434 <== NOT EXECUTED
30009408: 30009424 .word 0x30009424 <== NOT EXECUTED
3000940c: 30009424 .word 0x30009424 <== NOT EXECUTED
30009410: 30009414 .word 0x30009414 <== NOT EXECUTED
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_FIFO:
loc->handlers = fs_info->fifo_handlers;
30009414: e5923010 ldr r3, [r2, #16]
30009418: e5803008 str r3, [r0, #8]
break;
}
return 0;
}
3000941c: e3a00000 mov r0, #0
30009420: e12fff1e bx lr
break;
case IMFS_LINEAR_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
30009424: e5923008 ldr r3, [r2, #8]
30009428: e5803008 str r3, [r0, #8]
loc->handlers = fs_info->fifo_handlers;
break;
}
return 0;
}
3000942c: e3a00000 mov r0, #0
30009430: e12fff1e bx lr
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
break;
case IMFS_SYM_LINK:
case IMFS_HARD_LINK:
loc->handlers = &IMFS_link_handlers;
30009434: e59f3028 ldr r3, [pc, #40] ; 30009464 <IMFS_Set_handlers+0x8c>
30009438: e5803008 str r3, [r0, #8]
loc->handlers = fs_info->fifo_handlers;
break;
}
return 0;
}
3000943c: e3a00000 mov r0, #0
30009440: e12fff1e bx lr
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;
30009444: e592300c ldr r3, [r2, #12]
30009448: e5803008 str r3, [r0, #8]
loc->handlers = fs_info->fifo_handlers;
break;
}
return 0;
}
3000944c: e3a00000 mov r0, #0
30009450: e12fff1e bx lr
switch( node->type ) {
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
break;
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
30009454: e59f300c ldr r3, [pc, #12] ; 30009468 <IMFS_Set_handlers+0x90>
30009458: e5803008 str r3, [r0, #8]
loc->handlers = fs_info->fifo_handlers;
break;
}
return 0;
}
3000945c: e3a00000 mov r0, #0
30009460: e12fff1e bx lr
30009160 <IMFS_chown>:
int IMFS_chown(
rtems_filesystem_location_info_t *pathloc, /* IN */
uid_t owner, /* IN */
gid_t group /* IN */
)
{
30009160: e92d40f0 push {r4, r5, r6, r7, lr}
30009164: e1a01801 lsl r1, r1, #16
30009168: e1a02802 lsl r2, r2, #16
3000916c: e24dd008 sub sp, sp, #8
IMFS_jnode_t *jnode;
#if defined(RTEMS_POSIX_API)
uid_t st_uid;
#endif
jnode = (IMFS_jnode_t *) pathloc->node_access;
30009170: e5904000 ldr r4, [r0]
int IMFS_chown(
rtems_filesystem_location_info_t *pathloc, /* IN */
uid_t owner, /* IN */
gid_t group /* IN */
)
{
30009174: e1a07821 lsr r7, r1, #16
30009178: e1a06822 lsr r6, r2, #16
/*
* Verify I am the owner of the node or the super user.
*/
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
3000917c: eb0003e3 bl 3000a110 <geteuid>
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
30009180: e1d453bc ldrh r5, [r4, #60] ; 0x3c
30009184: e3500000 cmp r0, #0
30009188: 11550000 cmpne r5, r0
3000918c: 03a05000 moveq r5, #0
30009190: 13a05001 movne r5, #1
30009194: 1a000009 bne 300091c0 <IMFS_chown+0x60>
rtems_set_errno_and_return_minus_one( EPERM );
#endif
jnode->st_uid = owner;
30009198: e1c473bc strh r7, [r4, #60] ; 0x3c
jnode->st_gid = group;
3000919c: e1c463be strh r6, [r4, #62] ; 0x3e
IMFS_update_ctime( jnode );
300091a0: e1a0000d mov r0, sp
300091a4: e1a01005 mov r1, r5
300091a8: ebffe3e7 bl 3000214c <gettimeofday>
300091ac: e59d3000 ldr r3, [sp]
return 0;
300091b0: e1a00005 mov r0, r5
#endif
jnode->st_uid = owner;
jnode->st_gid = group;
IMFS_update_ctime( jnode );
300091b4: e5843048 str r3, [r4, #72] ; 0x48
return 0;
}
300091b8: e28dd008 add sp, sp, #8
300091bc: 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 );
300091c0: eb00124c bl 3000daf8 <__errno> <== NOT EXECUTED
300091c4: e3a03001 mov r3, #1 <== NOT EXECUTED
300091c8: e5803000 str r3, [r0] <== NOT EXECUTED
300091cc: e3e00000 mvn r0, #0 <== NOT EXECUTED
300091d0: eafffff8 b 300091b8 <IMFS_chown+0x58> <== NOT EXECUTED
30009254 <IMFS_create_node>:
IMFS_jnode_types_t type,
const char *name,
mode_t mode,
const IMFS_types_union *info
)
{
30009254: e92d41f0 push {r4, r5, r6, r7, r8, lr}
IMFS_fs_info_t *fs_info;
/*
* MUST have a parent node to call this routine.
*/
if ( parent_loc == NULL )
30009258: e3500000 cmp r0, #0
IMFS_jnode_types_t type,
const char *name,
mode_t mode,
const IMFS_types_union *info
)
{
3000925c: e1a04001 mov r4, r1
30009260: e59d7018 ldr r7, [sp, #24]
/*
* MUST have a parent node to call this routine.
*/
if ( parent_loc == NULL )
return NULL;
30009264: 01a08000 moveq r8, r0
IMFS_fs_info_t *fs_info;
/*
* MUST have a parent node to call this routine.
*/
if ( parent_loc == NULL )
30009268: 0a000026 beq 30009308 <IMFS_create_node+0xb4>
return NULL;
parent = parent_loc->node_access;
fs_info = parent_loc->mt_entry->fs_info;
3000926c: e5901010 ldr r1, [r0, #16]
/*
* Reject creation of FIFOs if support is disabled.
*/
if ( type == IMFS_FIFO &&
30009270: e3540007 cmp r4, #7
* MUST have a parent node to call this routine.
*/
if ( parent_loc == NULL )
return NULL;
parent = parent_loc->node_access;
30009274: e5906000 ldr r6, [r0]
fs_info = parent_loc->mt_entry->fs_info;
30009278: e5915034 ldr r5, [r1, #52] ; 0x34
/*
* Reject creation of FIFOs if support is disabled.
*/
if ( type == IMFS_FIFO &&
3000927c: 0a000023 beq 30009310 <IMFS_create_node+0xbc>
return NULL;
/*
* Allocate filesystem node and fill in basic information
*/
node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask );
30009280: e59f1108 ldr r1, [pc, #264] ; 30009390 <IMFS_create_node+0x13c>
30009284: e1a00004 mov r0, r4
30009288: e591c000 ldr ip, [r1]
3000928c: e1a01002 mov r1, r2
30009290: e59c202c ldr r2, [ip, #44] ; 0x2c
30009294: e1c32002 bic r2, r3, r2
30009298: ebffffcd bl 300091d4 <IMFS_allocate_node>
if ( !node )
3000929c: e2508000 subs r8, r0, #0
300092a0: 0a000018 beq 30009308 <IMFS_create_node+0xb4>
return NULL;
/*
* Set the type specific information
*/
switch (type) {
300092a4: e2444001 sub r4, r4, #1
300092a8: e3540006 cmp r4, #6
300092ac: 979ff104 ldrls pc, [pc, r4, lsl #2]
300092b0: ea00000c b 300092e8 <IMFS_create_node+0x94> <== NOT EXECUTED
300092b4: 300092d0 .word 0x300092d0 <== NOT EXECUTED
300092b8: 30009380 .word 0x30009380 <== NOT EXECUTED
300092bc: 3000932c .word 0x3000932c <== NOT EXECUTED
300092c0: 3000932c .word 0x3000932c <== NOT EXECUTED
300092c4: 30009350 .word 0x30009350 <== NOT EXECUTED
300092c8: 30009338 .word 0x30009338 <== NOT EXECUTED
300092cc: 30009374 .word 0x30009374 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
300092d0: e2882054 add r2, r8, #84 ; 0x54
case IMFS_DIRECTORY:
rtems_chain_initialize_empty(&node->info.directory.Entries);
300092d4: e2883050 add r3, r8, #80 ; 0x50
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
300092d8: e5882050 str r2, [r8, #80] ; 0x50
the_chain->permanent_null = NULL;
300092dc: e3a02000 mov r2, #0
300092e0: e5882054 str r2, [r8, #84] ; 0x54
the_chain->last = _Chain_Head(the_chain);
300092e4: e5883058 str r3, [r8, #88] ; 0x58
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
300092e8: e5953004 ldr r3, [r5, #4]
300092ec: e2860050 add r0, r6, #80 ; 0x50
300092f0: e2833001 add r3, r3, #1
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
300092f4: e5886008 str r6, [r8, #8]
300092f8: e1a01008 mov r1, r8
node->st_ino = ++fs_info->ino_count;
300092fc: e5853004 str r3, [r5, #4]
30009300: e5883038 str r3, [r8, #56] ; 0x38
30009304: ebfff363 bl 30006098 <_Chain_Append>
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
}
30009308: e1a00008 mov r0, r8
3000930c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
fs_info = parent_loc->mt_entry->fs_info;
/*
* Reject creation of FIFOs if support is disabled.
*/
if ( type == IMFS_FIFO &&
30009310: e5950010 ldr r0, [r5, #16]
30009314: e59f1078 ldr r1, [pc, #120] ; 30009394 <IMFS_create_node+0x140>
30009318: e1500001 cmp r0, r1
fs_info->fifo_handlers == &rtems_filesystem_handlers_default )
return NULL;
3000931c: 03a08000 moveq r8, #0
fs_info = parent_loc->mt_entry->fs_info;
/*
* Reject creation of FIFOs if support is disabled.
*/
if ( type == IMFS_FIFO &&
30009320: 1affffd6 bne 30009280 <IMFS_create_node+0x2c>
node->st_ino = ++fs_info->ino_count;
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
}
30009324: e1a00008 mov r0, r8
30009328: e8bd81f0 pop {r4, r5, r6, r7, r8, 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;
3000932c: e5973000 ldr r3, [r7]
30009330: e5883050 str r3, [r8, #80] ; 0x50
break;
30009334: eaffffeb b 300092e8 <IMFS_create_node+0x94>
node->info.device.major = info->device.major;
node->info.device.minor = info->device.minor;
break;
case IMFS_LINEAR_FILE:
node->info.linearfile.size = 0;
30009338: e3a03000 mov r3, #0
3000933c: e3a04000 mov r4, #0
30009340: e5883050 str r3, [r8, #80] ; 0x50
30009344: e5884054 str r4, [r8, #84] ; 0x54
node->info.linearfile.direct = 0;
30009348: e3a03000 mov r3, #0
3000934c: e5883058 str r3, [r8, #88] ; 0x58
case IMFS_MEMORY_FILE:
node->info.file.size = 0;
node->info.file.indirect = 0;
30009350: e3a03000 mov r3, #0
case IMFS_LINEAR_FILE:
node->info.linearfile.size = 0;
node->info.linearfile.direct = 0;
case IMFS_MEMORY_FILE:
node->info.file.size = 0;
30009354: e3a01000 mov r1, #0
30009358: e3a02000 mov r2, #0
3000935c: e5881050 str r1, [r8, #80] ; 0x50
30009360: e5882054 str r2, [r8, #84] ; 0x54
node->info.file.indirect = 0;
30009364: e5883058 str r3, [r8, #88] ; 0x58
node->info.file.doubly_indirect = 0;
30009368: e588305c str r3, [r8, #92] ; 0x5c
node->info.file.triply_indirect = 0;
3000936c: e5883060 str r3, [r8, #96] ; 0x60
break;
30009370: eaffffdc b 300092e8 <IMFS_create_node+0x94>
case IMFS_FIFO:
node->info.fifo.pipe = NULL;
30009374: e3a03000 mov r3, #0
30009378: e5883050 str r3, [r8, #80] ; 0x50
break;
3000937c: eaffffd9 b 300092e8 <IMFS_create_node+0x94>
case IMFS_SYM_LINK:
node->info.sym_link.name = info->sym_link.name;
break;
case IMFS_DEVICE:
node->info.device.major = info->device.major;
30009380: e897000c ldm r7, {r2, r3}
30009384: e5882050 str r2, [r8, #80] ; 0x50
node->info.device.minor = info->device.minor;
30009388: e5883054 str r3, [r8, #84] ; 0x54
break;
3000938c: eaffffd5 b 300092e8 <IMFS_create_node+0x94>
3000951c <IMFS_eval_path>:
const char *pathname, /* IN */
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
3000951c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
30009520: e5936000 ldr r6, [r3]
const char *pathname, /* IN */
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
30009524: e24dd040 sub sp, sp, #64 ; 0x40
30009528: e1a07003 mov r7, r3
3000952c: e1a0a000 mov sl, r0
30009530: e1a04001 mov r4, r1
30009534: e58d2000 str r2, [sp]
int i = 0;
30009538: e3a05000 mov r5, #0
3000953c: e28d8004 add r8, sp, #4
30009540: e28d903c add r9, sp, #60 ; 0x3c
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
30009544: e1a02008 mov r2, r8
30009548: e1a03009 mov r3, r9
3000954c: e08a0005 add r0, sl, r5
30009550: e1a01004 mov r1, r4
30009554: eb0001ed bl 30009d10 <IMFS_get_token>
pathnamelen -= len;
i += len;
if ( !pathloc->node_access )
30009558: e5973000 ldr r3, [r7]
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
3000955c: e1a0b000 mov fp, r0
pathnamelen -= len;
i += len;
if ( !pathloc->node_access )
30009560: e3530000 cmp r3, #0
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
pathnamelen -= len;
30009564: e59d203c ldr r2, [sp, #60] ; 0x3c
i += len;
if ( !pathloc->node_access )
30009568: 0a00004e beq 300096a8 <IMFS_eval_path+0x18c>
rtems_set_errno_and_return_minus_one( ENOENT );
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
3000956c: e3500000 cmp r0, #0
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
pathnamelen -= len;
30009570: e0624004 rsb r4, r2, r4
i += len;
30009574: e0855002 add r5, r5, r2
rtems_set_errno_and_return_minus_one( ENOENT );
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
30009578: 1a00000f bne 300095bc <IMFS_eval_path+0xa0>
* 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 ) {
3000957c: e593204c ldr r2, [r3, #76] ; 0x4c
30009580: e3520001 cmp r2, #1
30009584: 0a00006a beq 30009734 <IMFS_eval_path+0x218>
flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
30009588: e1a00007 mov r0, r7
3000958c: ebffff91 bl 300093d8 <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
30009590: e59d1000 ldr r1, [sp]
flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
30009594: e1a06000 mov r6, r0
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
30009598: e1a00007 mov r0, r7
3000959c: ebffffb2 bl 3000946c <IMFS_evaluate_permission>
300095a0: e3500000 cmp r0, #0
300095a4: 1a000036 bne 30009684 <IMFS_eval_path+0x168>
rtems_set_errno_and_return_minus_one( EACCES );
300095a8: eb001152 bl 3000daf8 <__errno>
300095ac: e3a0300d mov r3, #13
300095b0: e5803000 str r3, [r0]
300095b4: e3e06000 mvn r6, #0
300095b8: ea000031 b 30009684 <IMFS_eval_path+0x168>
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
300095bc: e596104c ldr r1, [r6, #76] ; 0x4c
300095c0: e3510001 cmp r1, #1
300095c4: 0a000031 beq 30009690 <IMFS_eval_path+0x174>
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
switch( type ) {
300095c8: e35b0003 cmp fp, #3
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;
300095cc: e1a06003 mov r6, r3
switch( type ) {
300095d0: 0a000006 beq 300095f0 <IMFS_eval_path+0xd4>
300095d4: e35b0004 cmp fp, #4
300095d8: 0a000025 beq 30009674 <IMFS_eval_path+0x158>
300095dc: e35b0002 cmp fp, #2
300095e0: 0a000013 beq 30009634 <IMFS_eval_path+0x118>
/*
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
300095e4: e35b0004 cmp fp, #4
300095e8: 1affffd5 bne 30009544 <IMFS_eval_path+0x28>
300095ec: eaffffe2 b 3000957c <IMFS_eval_path+0x60> <== NOT EXECUTED
case IMFS_NAME:
/*
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
300095f0: e593304c ldr r3, [r3, #76] ; 0x4c
300095f4: e3530003 cmp r3, #3
300095f8: 0a00002f beq 300096bc <IMFS_eval_path+0x1a0>
node = pathloc->node_access;
if ( !node )
rtems_set_errno_and_return_minus_one( ENOTDIR );
} else if ( node->type == IMFS_SYM_LINK ) {
300095fc: e3530004 cmp r3, #4
30009600: 0a000055 beq 3000975c <IMFS_eval_path+0x240>
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
30009604: e3530001 cmp r3, #1
30009608: 1a00004e bne 30009748 <IMFS_eval_path+0x22c>
/*
* 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 ) {
3000960c: e596e05c ldr lr, [r6, #92] ; 0x5c
30009610: e35e0000 cmp lr, #0
30009614: 1a000049 bne 30009740 <IMFS_eval_path+0x224>
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
30009618: e1a00006 mov r0, r6
3000961c: e1a01008 mov r1, r8
30009620: eb000193 bl 30009c74 <IMFS_find_match_in_dir>
if ( !node )
30009624: e2506000 subs r6, r0, #0
30009628: 0a00001e beq 300096a8 <IMFS_eval_path+0x18c>
/*
* Set the node access to the point we have found.
*/
pathloc->node_access = node;
3000962c: e5876000 str r6, [r7]
30009630: eaffffc3 b 30009544 <IMFS_eval_path+0x28>
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
30009634: e59f1148 ldr r1, [pc, #328] ; 30009784 <IMFS_eval_path+0x268>
30009638: e5912000 ldr r2, [r1]
3000963c: e5922018 ldr r2, [r2, #24]
30009640: e1520003 cmp r2, r3
30009644: 0affffbe beq 30009544 <IMFS_eval_path+0x28>
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
pathloc->mt_entry->mt_fs_root.node_access) {
30009648: e597e010 ldr lr, [r7, #16]
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
3000964c: e59e201c ldr r2, [lr, #28]
30009650: e1520003 cmp r2, r3
30009654: 0a000020 beq 300096dc <IMFS_eval_path+0x1c0>
pathnamelen+len,
flags,pathloc);
}
} else {
if ( !node->Parent )
30009658: e5936008 ldr r6, [r3, #8]
3000965c: e3560000 cmp r6, #0
30009660: 1afffff1 bne 3000962c <IMFS_eval_path+0x110>
rtems_set_errno_and_return_minus_one( ENOENT );
30009664: eb001123 bl 3000daf8 <__errno>
30009668: e3e06000 mvn r6, #0
3000966c: e580b000 str fp, [r0]
30009670: ea000003 b 30009684 <IMFS_eval_path+0x168>
case IMFS_NO_MORE_PATH:
case IMFS_CURRENT_DIR:
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
30009674: eb00111f bl 3000daf8 <__errno>
30009678: e3a0305b mov r3, #91 ; 0x5b
3000967c: e5803000 str r3, [r0]
30009680: e3e06000 mvn r6, #0
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
30009684: e1a00006 mov r0, r6
30009688: e28dd040 add sp, sp, #64 ; 0x40
3000968c: 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 ) )
30009690: e1a00007 mov r0, r7
30009694: ebffff74 bl 3000946c <IMFS_evaluate_permission>
30009698: e3500000 cmp r0, #0
3000969c: 0affffc1 beq 300095a8 <IMFS_eval_path+0x8c>
300096a0: e5973000 ldr r3, [r7]
300096a4: eaffffc7 b 300095c8 <IMFS_eval_path+0xac>
* 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 );
300096a8: eb001112 bl 3000daf8 <__errno>
300096ac: e3a03002 mov r3, #2
300096b0: e5803000 str r3, [r0]
300096b4: e3e06000 mvn r6, #0
300096b8: eafffff1 b 30009684 <IMFS_eval_path+0x168>
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
IMFS_evaluate_hard_link( pathloc, 0 );
300096bc: e1a00007 mov r0, r7
300096c0: e3a01000 mov r1, #0
300096c4: ebffff7b bl 300094b8 <IMFS_evaluate_hard_link>
node = pathloc->node_access;
300096c8: e5976000 ldr r6, [r7]
if ( !node )
300096cc: e3560000 cmp r6, #0
300096d0: 0a00001c beq 30009748 <IMFS_eval_path+0x22c>
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
node = pathloc->node_access;
300096d4: e596304c ldr r3, [r6, #76] ; 0x4c
300096d8: eaffffc9 b 30009604 <IMFS_eval_path+0xe8>
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
newloc = pathloc->mt_entry->mt_point_node;
300096dc: e28ee008 add lr, lr, #8
* 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;
300096e0: e28d6028 add r6, sp, #40 ; 0x28
300096e4: e8be000f ldm lr!, {r0, r1, r2, r3}
300096e8: e8a6000f stmia r6!, {r0, r1, r2, r3}
*pathloc = newloc;
300096ec: e28dc028 add ip, sp, #40 ; 0x28
300096f0: e8bc000f ldm ip!, {r0, r1, r2, r3}
* 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;
300096f4: e59ec000 ldr ip, [lr]
*pathloc = newloc;
300096f8: e1a0e007 mov lr, r7
300096fc: e8ae000f stmia lr!, {r0, r1, r2, r3}
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
30009700: e59d103c ldr r1, [sp, #60] ; 0x3c
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
30009704: e58ec000 str ip, [lr]
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
30009708: e0610005 rsb r0, r1, r5
* 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;
3000970c: e586c000 str ip, [r6]
*pathloc = newloc;
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
30009710: e08a0000 add r0, sl, r0
30009714: e597c00c ldr ip, [r7, #12]
30009718: e0841001 add r1, r4, r1
3000971c: e59d2000 ldr r2, [sp]
30009720: e1a03007 mov r3, r7
30009724: e1a0e00f mov lr, pc
30009728: e59cf000 ldr pc, [ip]
3000972c: e1a06000 mov r6, r0
30009730: eaffffd3 b 30009684 <IMFS_eval_path+0x168>
*
* 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 ) {
30009734: e593e05c ldr lr, [r3, #92] ; 0x5c
30009738: e35e0000 cmp lr, #0
3000973c: 0affff91 beq 30009588 <IMFS_eval_path+0x6c>
newloc = node->info.directory.mt_fs->mt_fs_root;
30009740: e28ee01c add lr, lr, #28
30009744: eaffffe5 b 300096e0 <IMFS_eval_path+0x1c4>
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
30009748: eb0010ea bl 3000daf8 <__errno>
3000974c: e3a03014 mov r3, #20
30009750: e5803000 str r3, [r0]
30009754: e3e06000 mvn r6, #0
30009758: eaffffc9 b 30009684 <IMFS_eval_path+0x168>
if ( !node )
rtems_set_errno_and_return_minus_one( ENOTDIR );
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
3000975c: e1a00007 mov r0, r7
30009760: e3a01000 mov r1, #0
30009764: eb000007 bl 30009788 <IMFS_evaluate_sym_link>
node = pathloc->node_access;
if ( result == -1 )
30009768: e3700001 cmn r0, #1
if ( !node )
rtems_set_errno_and_return_minus_one( ENOTDIR );
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
3000976c: e1a06000 mov r6, r0
node = pathloc->node_access;
30009770: e5973000 ldr r3, [r7]
if ( result == -1 )
30009774: 0affffc2 beq 30009684 <IMFS_eval_path+0x168>
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
node = pathloc->node_access;
30009778: e1a06003 mov r6, r3
3000977c: e596304c ldr r3, [r6, #76] ; 0x4c
30009780: eaffff9f b 30009604 <IMFS_eval_path+0xe8>
3000991c <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 */
)
{
3000991c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
30009920: e24dd040 sub sp, sp, #64 ; 0x40
30009924: e1a06001 mov r6, r1
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
30009928: 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 */
)
{
3000992c: e1a0a000 mov sl, r0
30009930: e58d2000 str r2, [sp]
node = pathloc->node_access;
/*
* Get the path length.
*/
pathlen = strlen( path );
30009934: eb00145f bl 3000eab8 <strlen>
const char *path, /* IN */
rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
const char **name /* OUT */
)
{
int i = 0;
30009938: e3a07000 mov r7, #0
node = pathloc->node_access;
/*
* Get the path length.
*/
pathlen = strlen( path );
3000993c: e1a04000 mov r4, r0
30009940: e28d8004 add r8, sp, #4
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
30009944: e1a01004 mov r1, r4
30009948: e28d303c add r3, sp, #60 ; 0x3c
3000994c: e08a0007 add r0, sl, r7
30009950: e1a02008 mov r2, r8
30009954: eb0000ed bl 30009d10 <IMFS_get_token>
pathlen -= len;
i += len;
if ( !pathloc->node_access )
30009958: e5963000 ldr r3, [r6]
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
3000995c: e59db03c ldr fp, [sp, #60] ; 0x3c
i += len;
if ( !pathloc->node_access )
30009960: e3530000 cmp r3, #0
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
30009964: e1a09000 mov r9, r0
pathlen -= len;
30009968: e06b4004 rsb r4, fp, r4
i += len;
if ( !pathloc->node_access )
3000996c: 0a000035 beq 30009a48 <IMFS_evaluate_for_make+0x12c>
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
30009970: e3500000 cmp r0, #0
30009974: 1a000006 bne 30009994 <IMFS_evaluate_for_make+0x78>
pathloc->node_access = node;
break;
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
30009978: eb00105e bl 3000daf8 <__errno>
3000997c: e3a03011 mov r3, #17
30009980: e5803000 str r3, [r0]
30009984: e3e05000 mvn r5, #0
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
30009988: e1a00005 mov r0, r5
3000998c: e28dd040 add sp, sp, #64 ; 0x40
30009990: 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 )
30009994: e595104c ldr r1, [r5, #76] ; 0x4c
30009998: e3510001 cmp r1, #1
3000999c: 0a000044 beq 30009ab4 <IMFS_evaluate_for_make+0x198>
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
i += len;
300099a0: e087700b add r7, r7, fp
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
300099a4: e1a05003 mov r5, r3
switch( type ) {
300099a8: e3590004 cmp r9, #4
300099ac: 979ff109 ldrls pc, [pc, r9, lsl #2]
300099b0: eaffffe3 b 30009944 <IMFS_evaluate_for_make+0x28> <== NOT EXECUTED
300099b4: 30009978 .word 0x30009978 <== NOT EXECUTED
300099b8: 30009944 .word 0x30009944 <== NOT EXECUTED
300099bc: 30009a18 .word 0x30009a18 <== NOT EXECUTED
300099c0: 300099c8 .word 0x300099c8 <== NOT EXECUTED
300099c4: 30009a5c .word 0x30009a5c <== NOT EXECUTED
pathloc->node_access = node;
break;
case IMFS_NAME:
if ( node->type == IMFS_HARD_LINK ) {
300099c8: e593304c ldr r3, [r3, #76] ; 0x4c
300099cc: e3530003 cmp r3, #3
300099d0: 0a00006a beq 30009b80 <IMFS_evaluate_for_make+0x264>
result = IMFS_evaluate_link( pathloc, 0 );
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
300099d4: e3530004 cmp r3, #4
300099d8: 0a000068 beq 30009b80 <IMFS_evaluate_for_make+0x264>
if ( result == -1 )
return -1;
}
node = pathloc->node_access;
if ( !node )
300099dc: e3550000 cmp r5, #0
300099e0: 0a00005f beq 30009b64 <IMFS_evaluate_for_make+0x248>
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
300099e4: e595304c ldr r3, [r5, #76] ; 0x4c
300099e8: e3530001 cmp r3, #1
300099ec: 1a00005c bne 30009b64 <IMFS_evaluate_for_make+0x248>
/*
* 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 ) {
300099f0: e595c05c ldr ip, [r5, #92] ; 0x5c
300099f4: e35c0000 cmp ip, #0
300099f8: 1a00005e bne 30009b78 <IMFS_evaluate_for_make+0x25c>
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
300099fc: e1a00005 mov r0, r5
30009a00: e1a01008 mov r1, r8
30009a04: eb00009a bl 30009c74 <IMFS_find_match_in_dir>
/*
* If there is no node we have found the name of the node we
* wish to create.
*/
if ( ! node )
30009a08: e2505000 subs r5, r0, #0
30009a0c: 0a000017 beq 30009a70 <IMFS_evaluate_for_make+0x154>
done = true;
else
pathloc->node_access = node;
30009a10: e5865000 str r5, [r6]
30009a14: eaffffca b 30009944 <IMFS_evaluate_for_make+0x28>
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
30009a18: e59f1180 ldr r1, [pc, #384] ; 30009ba0 <IMFS_evaluate_for_make+0x284>
30009a1c: e5912000 ldr r2, [r1]
30009a20: e5922018 ldr r2, [r2, #24]
30009a24: e1530002 cmp r3, r2
30009a28: 0affffc5 beq 30009944 <IMFS_evaluate_for_make+0x28>
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){
30009a2c: e596c010 ldr ip, [r6, #16]
30009a30: e59c201c ldr r2, [ip, #28]
30009a34: e1530002 cmp r3, r2
30009a38: 0a000023 beq 30009acc <IMFS_evaluate_for_make+0x1b0>
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
}
} else {
if ( !node->Parent )
30009a3c: e5935008 ldr r5, [r3, #8]
30009a40: e3550000 cmp r5, #0
30009a44: 1afffff1 bne 30009a10 <IMFS_evaluate_for_make+0xf4>
* 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 );
30009a48: eb00102a bl 3000daf8 <__errno>
30009a4c: e3a03002 mov r3, #2
30009a50: e5803000 str r3, [r0]
30009a54: e3e05000 mvn r5, #0
30009a58: eaffffca b 30009988 <IMFS_evaluate_for_make+0x6c>
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 );
30009a5c: eb001025 bl 3000daf8 <__errno>
30009a60: e3a0305b mov r3, #91 ; 0x5b
30009a64: e5803000 str r3, [r0]
30009a68: e3e05000 mvn r5, #0
30009a6c: eaffffc5 b 30009988 <IMFS_evaluate_for_make+0x6c>
case IMFS_CURRENT_DIR:
break;
}
}
*name = &path[ i - len ];
30009a70: e59d303c ldr r3, [sp, #60] ; 0x3c
30009a74: e59d1000 ldr r1, [sp]
30009a78: e0633007 rsb r3, r3, r7
30009a7c: e08a3003 add r3, sl, r3
30009a80: e5813000 str r3, [r1]
/*
* 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++) {
30009a84: e7da0007 ldrb r0, [sl, r7]
30009a88: e08a4007 add r4, sl, r7
30009a8c: e3500000 cmp r0, #0
30009a90: 1a000003 bne 30009aa4 <IMFS_evaluate_for_make+0x188>
30009a94: ea000021 b 30009b20 <IMFS_evaluate_for_make+0x204>
30009a98: e5f40001 ldrb r0, [r4, #1]!
30009a9c: e3500000 cmp r0, #0
30009aa0: 0a00001e beq 30009b20 <IMFS_evaluate_for_make+0x204>
if ( !IMFS_is_separator( path[ i ] ) )
30009aa4: ebffe52d bl 30002f60 <rtems_filesystem_is_separator>
30009aa8: e3500000 cmp r0, #0
30009aac: 1afffff9 bne 30009a98 <IMFS_evaluate_for_make+0x17c>
30009ab0: eaffffe4 b 30009a48 <IMFS_evaluate_for_make+0x12c>
* 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 ) )
30009ab4: e1a00006 mov r0, r6
30009ab8: ebfffe6b bl 3000946c <IMFS_evaluate_permission>
30009abc: e3500000 cmp r0, #0
30009ac0: 0a000022 beq 30009b50 <IMFS_evaluate_for_make+0x234>
30009ac4: e5963000 ldr r3, [r6]
30009ac8: eaffffb4 b 300099a0 <IMFS_evaluate_for_make+0x84>
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
newloc = pathloc->mt_entry->mt_point_node;
30009acc: e28cc008 add ip, ip, #8
* 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;
30009ad0: e28d4028 add r4, sp, #40 ; 0x28
30009ad4: e8bc000f ldm ip!, {r0, r1, r2, r3}
30009ad8: e8a4000f stmia r4!, {r0, r1, r2, r3}
*pathloc = newloc;
30009adc: e28de028 add lr, sp, #40 ; 0x28
30009ae0: e8be000f ldm lr!, {r0, r1, r2, r3}
30009ae4: e1a0e006 mov lr, r6
* 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;
30009ae8: e59cc000 ldr ip, [ip]
*pathloc = newloc;
30009aec: e8ae000f stmia lr!, {r0, r1, r2, r3}
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
30009af0: e59d003c ldr r0, [sp, #60] ; 0x3c
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
30009af4: e58ec000 str ip, [lr]
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
30009af8: e0600007 rsb r0, r0, r7
* 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;
30009afc: e584c000 str ip, [r4]
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
30009b00: e596300c ldr r3, [r6, #12]
30009b04: e08a0000 add r0, sl, r0
30009b08: e1a01006 mov r1, r6
30009b0c: e59d2000 ldr r2, [sp]
30009b10: e1a0e00f mov lr, pc
30009b14: e593f004 ldr pc, [r3, #4]
30009b18: e1a05000 mov r5, r0
30009b1c: eaffff99 b 30009988 <IMFS_evaluate_for_make+0x6c>
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
30009b20: e1a00006 mov r0, r6
30009b24: ebfffe2b bl 300093d8 <IMFS_Set_handlers>
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
30009b28: e5963000 ldr r3, [r6]
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
30009b2c: e1a05000 mov r5, r0
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
30009b30: e593304c ldr r3, [r3, #76] ; 0x4c
30009b34: e3530001 cmp r3, #1
30009b38: 1a000009 bne 30009b64 <IMFS_evaluate_for_make+0x248>
/*
* We must have Write and execute permission on the returned node.
*/
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
30009b3c: e1a00006 mov r0, r6
30009b40: e3a01003 mov r1, #3
30009b44: ebfffe48 bl 3000946c <IMFS_evaluate_permission>
30009b48: e3500000 cmp r0, #0
30009b4c: 1affff8d bne 30009988 <IMFS_evaluate_for_make+0x6c>
rtems_set_errno_and_return_minus_one( EACCES );
30009b50: eb000fe8 bl 3000daf8 <__errno>
30009b54: e3a0300d mov r3, #13
30009b58: e5803000 str r3, [r0]
30009b5c: e3e05000 mvn r5, #0
30009b60: eaffff88 b 30009988 <IMFS_evaluate_for_make+0x6c>
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
30009b64: eb000fe3 bl 3000daf8 <__errno>
30009b68: e3a03014 mov r3, #20
30009b6c: e5803000 str r3, [r0]
30009b70: e3e05000 mvn r5, #0
30009b74: eaffff83 b 30009988 <IMFS_evaluate_for_make+0x6c>
* 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;
30009b78: e28cc01c add ip, ip, #28
30009b7c: eaffffd3 b 30009ad0 <IMFS_evaluate_for_make+0x1b4>
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_link( pathloc, 0 );
30009b80: e1a00006 mov r0, r6
30009b84: e3a01000 mov r1, #0
30009b88: ebffff2e bl 30009848 <IMFS_evaluate_link>
if ( result == -1 )
30009b8c: e3700001 cmn r0, #1
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_link( pathloc, 0 );
30009b90: e1a05000 mov r5, r0
if ( result == -1 )
30009b94: 0affff7b beq 30009988 <IMFS_evaluate_for_make+0x6c>
30009b98: e5965000 ldr r5, [r6]
30009b9c: eaffff8e b 300099dc <IMFS_evaluate_for_make+0xc0>
300094b8 <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;
300094b8: e5903000 ldr r3, [r0]
int IMFS_evaluate_hard_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
300094bc: e92d4030 push {r4, r5, lr}
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
300094c0: e593204c ldr r2, [r3, #76] ; 0x4c
int IMFS_evaluate_hard_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
300094c4: e1a04000 mov r4, r0
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
300094c8: e3520003 cmp r2, #3
int IMFS_evaluate_hard_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
300094cc: e1a05001 mov r5, r1
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
300094d0: 1a00000e bne 30009510 <IMFS_evaluate_hard_link+0x58>
/*
* Set the hard link value and the handlers.
*/
node->node_access = jnode->info.hard_link.link_node;
300094d4: e5933050 ldr r3, [r3, #80] ; 0x50
300094d8: e5803000 str r3, [r0]
IMFS_Set_handlers( node );
300094dc: ebffffbd bl 300093d8 <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
300094e0: e1a00004 mov r0, r4
300094e4: e1a01005 mov r1, r5
300094e8: ebffffdf bl 3000946c <IMFS_evaluate_permission>
300094ec: e3500000 cmp r0, #0
300094f0: 0a000001 beq 300094fc <IMFS_evaluate_hard_link+0x44>
rtems_set_errno_and_return_minus_one( EACCES );
return result;
300094f4: e3a00000 mov r0, #0
}
300094f8: e8bd8030 pop {r4, r5, pc}
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
300094fc: eb00117d bl 3000daf8 <__errno> <== NOT EXECUTED
30009500: e3a0300d mov r3, #13 <== NOT EXECUTED
30009504: e5803000 str r3, [r0] <== NOT EXECUTED
30009508: e3e00000 mvn r0, #0 <== NOT EXECUTED
3000950c: 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);
30009510: e59f0000 ldr r0, [pc, #0] ; 30009518 <IMFS_evaluate_hard_link+0x60><== NOT EXECUTED
30009514: ebfff215 bl 30005d70 <rtems_fatal_error_occurred> <== NOT EXECUTED
30009788 <IMFS_evaluate_sym_link>:
int IMFS_evaluate_sym_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
30009788: e92d4070 push {r4, r5, r6, lr}
IMFS_jnode_t *jnode = node->node_access;
3000978c: e5906000 ldr r6, [r0]
int IMFS_evaluate_sym_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
30009790: e24dd004 sub sp, sp, #4
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
30009794: e596304c ldr r3, [r6, #76] ; 0x4c
int IMFS_evaluate_sym_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
30009798: e1a04000 mov r4, r0
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
3000979c: e3530004 cmp r3, #4
int IMFS_evaluate_sym_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
300097a0: e1a05001 mov r5, r1
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
300097a4: 1a000023 bne 30009838 <IMFS_evaluate_sym_link+0xb0>
rtems_fatal_error_occurred (0xABCD0000);
if ( !jnode->Parent )
300097a8: e5963008 ldr r3, [r6, #8]
300097ac: e3530000 cmp r3, #0
300097b0: 0a00001e beq 30009830 <IMFS_evaluate_sym_link+0xa8>
* root depending on the symbolic links path.
*/
node->node_access = jnode->Parent;
rtems_filesystem_get_sym_start_loc(
300097b4: e5960050 ldr r0, [r6, #80] ; 0x50
300097b8: e1a0100d mov r1, sp
300097bc: e1a02004 mov r2, r4
/*
* Move the node_access to either the symbolic links parent or
* root depending on the symbolic links path.
*/
node->node_access = jnode->Parent;
300097c0: e5843000 str r3, [r4]
rtems_filesystem_get_sym_start_loc(
300097c4: eb0003be bl 3000a6c4 <rtems_filesystem_get_sym_start_loc>
/*
* Use eval path to evaluate the path of the symbolic link.
*/
result = IMFS_eval_path(
300097c8: e59d3000 ldr r3, [sp]
300097cc: e5966050 ldr r6, [r6, #80] ; 0x50
300097d0: e0866003 add r6, r6, r3
300097d4: e1a00006 mov r0, r6
300097d8: eb0014b6 bl 3000eab8 <strlen>
300097dc: e1a02005 mov r2, r5
300097e0: e1a01000 mov r1, r0
300097e4: e1a03004 mov r3, r4
300097e8: e1a00006 mov r0, r6
300097ec: ebffff4a bl 3000951c <IMFS_eval_path>
300097f0: e1a06000 mov r6, r0
strlen( &jnode->info.sym_link.name[i] ),
flags,
node
);
IMFS_Set_handlers( node );
300097f4: e1a00004 mov r0, r4
300097f8: ebfffef6 bl 300093d8 <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
300097fc: e1a00004 mov r0, r4
30009800: e1a01005 mov r1, r5
30009804: ebffff18 bl 3000946c <IMFS_evaluate_permission>
30009808: e3500000 cmp r0, #0
3000980c: 0a000002 beq 3000981c <IMFS_evaluate_sym_link+0x94>
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
30009810: e1a00006 mov r0, r6
30009814: e28dd004 add sp, sp, #4
30009818: e8bd8070 pop {r4, r5, r6, pc}
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
3000981c: eb0010b5 bl 3000daf8 <__errno> <== NOT EXECUTED
30009820: e3a0300d mov r3, #13 <== NOT EXECUTED
30009824: e5803000 str r3, [r0] <== NOT EXECUTED
30009828: e3e06000 mvn r6, #0 <== NOT EXECUTED
3000982c: eafffff7 b 30009810 <IMFS_evaluate_sym_link+0x88> <== NOT EXECUTED
if ( jnode->type != IMFS_SYM_LINK )
rtems_fatal_error_occurred (0xABCD0000);
if ( !jnode->Parent )
rtems_fatal_error_occurred( 0xBAD00000 );
30009830: e59f0008 ldr r0, [pc, #8] ; 30009840 <IMFS_evaluate_sym_link+0xb8><== NOT EXECUTED
30009834: ebfff14d bl 30005d70 <rtems_fatal_error_occurred> <== NOT EXECUTED
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
rtems_fatal_error_occurred (0xABCD0000);
30009838: e59f0004 ldr r0, [pc, #4] ; 30009844 <IMFS_evaluate_sym_link+0xbc><== NOT EXECUTED
3000983c: ebfff14b bl 30005d70 <rtems_fatal_error_occurred> <== NOT EXECUTED
3000d10c <IMFS_fchmod>:
int IMFS_fchmod(
rtems_filesystem_location_info_t *loc,
mode_t mode
)
{
3000d10c: e92d4070 push {r4, r5, r6, lr}
3000d110: e24dd008 sub sp, sp, #8
IMFS_jnode_t *jnode;
#if defined(RTEMS_POSIX_API)
uid_t st_uid;
#endif
jnode = loc->node_access;
3000d114: e5904000 ldr r4, [r0]
int IMFS_fchmod(
rtems_filesystem_location_info_t *loc,
mode_t mode
)
{
3000d118: e1a06001 mov r6, r1
/*
* Verify I am the owner of the node or the super user.
*/
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
3000d11c: ebfff3fb bl 3000a110 <geteuid>
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
3000d120: e1d453bc ldrh r5, [r4, #60] ; 0x3c
3000d124: e3500000 cmp r0, #0
3000d128: 11550000 cmpne r5, r0
3000d12c: 03a05000 moveq r5, #0
3000d130: 13a05001 movne r5, #1
3000d134: 1a00000d bne 3000d170 <IMFS_fchmod+0x64>
/*
* Change only the RWX permissions on the jnode to mode.
*/
jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
3000d138: e5943030 ldr r3, [r4, #48] ; 0x30
jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
3000d13c: e1a06a06 lsl r6, r6, #20
/*
* Change only the RWX permissions on the jnode to mode.
*/
jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
3000d140: e3c33eff bic r3, r3, #4080 ; 0xff0
3000d144: e3c3300f bic r3, r3, #15
jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
3000d148: e1836a26 orr r6, r3, r6, lsr #20
3000d14c: e5846030 str r6, [r4, #48] ; 0x30
IMFS_update_ctime( jnode );
3000d150: e1a0000d mov r0, sp
3000d154: e1a01005 mov r1, r5
3000d158: ebffd3fb bl 3000214c <gettimeofday>
3000d15c: e59d3000 ldr r3, [sp]
return 0;
3000d160: e1a00005 mov r0, r5
*/
jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
IMFS_update_ctime( jnode );
3000d164: e5843048 str r3, [r4, #72] ; 0x48
return 0;
}
3000d168: e28dd008 add sp, sp, #8
3000d16c: e8bd8070 pop {r4, r5, r6, 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 );
3000d170: eb000260 bl 3000daf8 <__errno> <== NOT EXECUTED
3000d174: e3a03001 mov r3, #1 <== NOT EXECUTED
3000d178: e5803000 str r3, [r0] <== NOT EXECUTED
3000d17c: e3e00000 mvn r0, #0 <== NOT EXECUTED
3000d180: eafffff8 b 3000d168 <IMFS_fchmod+0x5c> <== NOT EXECUTED
30002514 <IMFS_fifo_close>:
}
int IMFS_fifo_close(
rtems_libio_t *iop
)
{
30002514: e92d4070 push {r4, r5, r6, lr}
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
30002518: e5905018 ldr r5, [r0, #24]
int err = pipe_release(&JNODE2PIPE(jnode), iop);
3000251c: e1a01000 mov r1, r0
}
int IMFS_fifo_close(
rtems_libio_t *iop
)
{
30002520: e1a04000 mov r4, r0
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
int err = pipe_release(&JNODE2PIPE(jnode), iop);
30002524: e2850050 add r0, r5, #80 ; 0x50
30002528: eb002514 bl 3000b980 <pipe_release>
if (err == 0) {
3000252c: e2506000 subs r6, r0, #0
30002530: 0a000002 beq 30002540 <IMFS_fifo_close+0x2c>
iop->flags &= ~LIBIO_FLAGS_OPEN;
IMFS_check_node_remove(jnode);
}
IMFS_FIFO_RETURN(err);
30002534: ba000008 blt 3000255c <IMFS_fifo_close+0x48> <== NOT EXECUTED
}
30002538: e1a00006 mov r0, r6 <== NOT EXECUTED
3000253c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
int err = pipe_release(&JNODE2PIPE(jnode), iop);
if (err == 0) {
iop->flags &= ~LIBIO_FLAGS_OPEN;
30002540: e5943014 ldr r3, [r4, #20]
IMFS_check_node_remove(jnode);
30002544: e1a00005 mov r0, r5
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
int err = pipe_release(&JNODE2PIPE(jnode), iop);
if (err == 0) {
iop->flags &= ~LIBIO_FLAGS_OPEN;
30002548: e3c33c01 bic r3, r3, #256 ; 0x100
3000254c: e5843014 str r3, [r4, #20]
IMFS_check_node_remove(jnode);
30002550: eb0001a0 bl 30002bd8 <IMFS_check_node_remove>
}
IMFS_FIFO_RETURN(err);
}
30002554: e1a00006 mov r0, r6
30002558: e8bd8070 pop {r4, r5, r6, pc}
if (err == 0) {
iop->flags &= ~LIBIO_FLAGS_OPEN;
IMFS_check_node_remove(jnode);
}
IMFS_FIFO_RETURN(err);
3000255c: eb0034bf bl 3000f860 <__errno> <== NOT EXECUTED
30002560: e2666000 rsb r6, r6, #0 <== NOT EXECUTED
30002564: e5806000 str r6, [r0] <== NOT EXECUTED
30002568: e3e06000 mvn r6, #0 <== NOT EXECUTED
3000256c: eafffff1 b 30002538 <IMFS_fifo_close+0x24> <== NOT EXECUTED
30009ba4 <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
)
{
30009ba4: 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;
30009ba8: e1a0c000 mov ip, r0
((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next))
int IMFS_fsunmount(
rtems_filesystem_mount_table_entry_t *temp_mt_entry
)
{
30009bac: e24dd014 sub sp, sp, #20
/*
* Traverse tree that starts at the mt_fs_root and deallocate memory
* associated memory space
*/
jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access;
30009bb0: e5bc401c ldr r4, [ip, #28]!
loc = temp_mt_entry->mt_fs_root;
30009bb4: e1a0600d mov r6, sp
((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next))
int IMFS_fsunmount(
rtems_filesystem_mount_table_entry_t *temp_mt_entry
)
{
30009bb8: e1a0e000 mov lr, 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;
30009bbc: e8bc000f ldm ip!, {r0, r1, r2, r3}
30009bc0: e8a6000f stmia r6!, {r0, r1, r2, r3}
30009bc4: e59c2000 ldr r2, [ip]
/*
* Set this to null to indicate that it is being unmounted.
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
30009bc8: e3a03000 mov r3, #0
* 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;
30009bcc: e1a0500d mov r5, sp
30009bd0: e5862000 str r2, [r6]
/*
* Set this to null to indicate that it is being unmounted.
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
30009bd4: e58e301c str r3, [lr, #28]
do {
next = jnode->Parent;
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
30009bd8: e1a0000d mov r0, sp
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
do {
next = jnode->Parent;
30009bdc: e5946008 ldr r6, [r4, #8]
loc.node_access = (void *)jnode;
30009be0: e58d4000 str r4, [sp]
IMFS_Set_handlers( &loc );
30009be4: ebfffdfb bl 300093d8 <IMFS_Set_handlers>
if ( jnode->type != IMFS_DIRECTORY ) {
30009be8: e594304c ldr r3, [r4, #76] ; 0x4c
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
30009bec: e2842054 add r2, r4, #84 ; 0x54
30009bf0: e3530001 cmp r3, #1
30009bf4: 1a000010 bne 30009c3c <IMFS_fsunmount+0x98>
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
30009bf8: e5943050 ldr r3, [r4, #80] ; 0x50
30009bfc: e1530002 cmp r3, r2
30009c00: 0a000014 beq 30009c58 <IMFS_fsunmount+0xb4>
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
}
if ( jnode != NULL ) {
30009c04: e3540000 cmp r4, #0
30009c08: 0a000008 beq 30009c30 <IMFS_fsunmount+0x8c>
if ( jnode->type == IMFS_DIRECTORY ) {
30009c0c: e594304c ldr r3, [r4, #76] ; 0x4c
30009c10: e3530001 cmp r3, #1
30009c14: 1affffef bne 30009bd8 <IMFS_fsunmount+0x34>
if ( jnode_has_children( jnode ) )
30009c18: e5943050 ldr r3, [r4, #80] ; 0x50
30009c1c: e2842054 add r2, r4, #84 ; 0x54
30009c20: e1530002 cmp r3, r2
30009c24: 0affffeb beq 30009bd8 <IMFS_fsunmount+0x34>
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
30009c28: e2534000 subs r4, r3, #0
30009c2c: 1affffe9 bne 30009bd8 <IMFS_fsunmount+0x34>
return 0;
30009c30: e1a00004 mov r0, r4
}
30009c34: e28dd014 add sp, sp, #20
30009c38: e8bd8070 pop {r4, r5, r6, pc}
next = jnode->Parent;
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
if ( jnode->type != IMFS_DIRECTORY ) {
result = IMFS_unlink( NULL, &loc );
30009c3c: e1a0100d mov r1, sp
30009c40: e3a00000 mov r0, #0
30009c44: ebffdfbd bl 30001b40 <IMFS_unlink>
if (result != 0)
30009c48: e3500000 cmp r0, #0
30009c4c: 1a000006 bne 30009c6c <IMFS_fsunmount+0xc8>
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
30009c50: e1a04006 mov r4, r6
30009c54: eaffffea b 30009c04 <IMFS_fsunmount+0x60>
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
result = IMFS_unlink( NULL, &loc );
30009c58: e3a00000 mov r0, #0
30009c5c: e1a0100d mov r1, sp
30009c60: ebffdfb6 bl 30001b40 <IMFS_unlink>
if (result != 0)
30009c64: e3500000 cmp r0, #0
30009c68: 0afffff8 beq 30009c50 <IMFS_fsunmount+0xac>
return -1;
30009c6c: e3e00000 mvn r0, #0 <== NOT EXECUTED
30009c70: eaffffef b 30009c34 <IMFS_fsunmount+0x90> <== NOT EXECUTED
30001700 <IMFS_initialize_support>:
const rtems_filesystem_operations_table *op_table,
const rtems_filesystem_file_handlers_r *memfile_handlers,
const rtems_filesystem_file_handlers_r *directory_handlers,
const rtems_filesystem_file_handlers_r *fifo_handlers
)
{
30001700: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
30001704: e1a04000 mov r4, r0
IMFS_jnode_t *jnode;
/*
* determine/check value for imfs_memfile_bytes_per_block
*/
IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block,
30001708: e59f00d4 ldr r0, [pc, #212] ; 300017e4 <IMFS_initialize_support+0xe4>
const rtems_filesystem_operations_table *op_table,
const rtems_filesystem_file_handlers_r *memfile_handlers,
const rtems_filesystem_file_handlers_r *directory_handlers,
const rtems_filesystem_file_handlers_r *fifo_handlers
)
{
3000170c: e1a08001 mov r8, r1
IMFS_jnode_t *jnode;
/*
* determine/check value for imfs_memfile_bytes_per_block
*/
IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block,
30001710: e5900000 ldr r0, [r0]
const rtems_filesystem_operations_table *op_table,
const rtems_filesystem_file_handlers_r *memfile_handlers,
const rtems_filesystem_file_handlers_r *directory_handlers,
const rtems_filesystem_file_handlers_r *fifo_handlers
)
{
30001714: e1a0a002 mov sl, r2
int bit_mask;
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
30001718: e3500010 cmp r0, #16
const rtems_filesystem_operations_table *op_table,
const rtems_filesystem_file_handlers_r *memfile_handlers,
const rtems_filesystem_file_handlers_r *directory_handlers,
const rtems_filesystem_file_handlers_r *fifo_handlers
)
{
3000171c: e1a07003 mov r7, r3
int bit_mask;
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
30001720: 0a000007 beq 30001744 <IMFS_initialize_support+0x44>
30001724: e3a02005 mov r2, #5
30001728: e3a03020 mov r3, #32
3000172c: e1500003 cmp r0, r3
30001730: 0a000003 beq 30001744 <IMFS_initialize_support+0x44>
30001734: e2522001 subs r2, r2, #1
30001738: e1a03083 lsl r3, r3, #1
3000173c: 1afffffa bne 3000172c <IMFS_initialize_support+0x2c>
is_valid = true;
}
}
*dest_bytes_per_block = ((is_valid)
? requested_bytes_per_block
: default_bytes_per_block);
30001740: e3a00080 mov r0, #128 ; 0x80 <== NOT EXECUTED
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
if (bit_mask == requested_bytes_per_block) {
is_valid = true;
}
}
*dest_bytes_per_block = ((is_valid)
30001744: e59f509c ldr r5, [pc, #156] ; 300017e8 <IMFS_initialize_support+0xe8>
30001748: e5850000 str r0, [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_root_node();
3000174c: eb001f11 bl 30009398 <IMFS_create_root_node>
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
temp_mt_entry->mt_fs_root.ops = op_table;
temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
30001750: e59fe094 ldr lr, [pc, #148] ; 300017ec <IMFS_initialize_support+0xec>
30001754: e284c038 add ip, r4, #56 ; 0x38
/*
* Create the root node
*
* NOTE: UNIX root is 755 and owned by root/root (0/0).
*/
temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node();
30001758: e1a06000 mov r6, r0
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
temp_mt_entry->mt_fs_root.ops = op_table;
temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
3000175c: e8be000f ldm lr!, {r0, r1, r2, r3}
30001760: e8ac000f stmia ip!, {r0, r1, r2, r3}
30001764: e8be000f ldm lr!, {r0, r1, r2, r3}
30001768: e8ac000f stmia ip!, {r0, r1, r2, r3}
3000176c: e89e000f ldm lr, {r0, r1, r2, r3}
/*
* Create the root node
*
* NOTE: UNIX root is 755 and owned by root/root (0/0).
*/
temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node();
30001770: e584601c str r6, [r4, #28]
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;
30001774: e88c000f stm ip, {r0, r1, r2, r3}
* Create the root node
*
* NOTE: UNIX root is 755 and owned by root/root (0/0).
*/
temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node();
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
30001778: e5847024 str r7, [r4, #36] ; 0x24
temp_mt_entry->mt_fs_root.ops = op_table;
3000177c: e5848028 str r8, [r4, #40] ; 0x28
temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
/*
* Create custom file system data.
*/
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
30001780: e3a00001 mov r0, #1
30001784: e3a01014 mov r1, #20
30001788: eb0001ba bl 30001e78 <calloc>
if ( !fs_info ) {
3000178c: e3500000 cmp r0, #0
30001790: 0a00000c beq 300017c8 <IMFS_initialize_support+0xc8>
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
30001794: e5952004 ldr r2, [r5, #4]
fs_info->ino_count = 1;
30001798: e3a03001 mov r3, #1
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;
3000179c: e5840034 str r0, [r4, #52] ; 0x34
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
300017a0: e0821003 add r1, r2, r3
300017a4: e5802000 str r2, [r0]
fs_info->ino_count = 1;
fs_info->memfile_handlers = memfile_handlers;
fs_info->directory_handlers = directory_handlers;
fs_info->fifo_handlers = fifo_handlers;
300017a8: e59d201c ldr r2, [sp, #28]
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
fs_info->ino_count = 1;
300017ac: e9800408 stmib r0, {r3, sl}
fs_info->memfile_handlers = memfile_handlers;
fs_info->directory_handlers = directory_handlers;
300017b0: e580700c str r7, [r0, #12]
fs_info->fifo_handlers = fifo_handlers;
300017b4: e5802010 str r2, [r0, #16]
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
300017b8: e5851004 str r1, [r5, #4]
fs_info->fifo_handlers = fifo_handlers;
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
return 0;
300017bc: e3a00000 mov r0, #0
fs_info->memfile_handlers = memfile_handlers;
fs_info->directory_handlers = directory_handlers;
fs_info->fifo_handlers = fifo_handlers;
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
300017c0: e5863038 str r3, [r6, #56] ; 0x38
return 0;
}
300017c4: e8bd85f0 pop {r4, r5, r6, r7, r8, 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);
300017c8: e1a00006 mov r0, r6 <== NOT EXECUTED
300017cc: eb000235 bl 300020a8 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
300017d0: eb0030c8 bl 3000daf8 <__errno> <== NOT EXECUTED
300017d4: e3a0300c mov r3, #12 <== NOT EXECUTED
300017d8: e5803000 str r3, [r0] <== NOT EXECUTED
300017dc: e3e00000 mvn r0, #0 <== NOT EXECUTED
300017e0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
300017f0 <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 */
)
{
300017f0: e92d4070 push {r4, r5, r6, lr}
int i;
/*
* Verify this node can be linked to.
*/
info.hard_link.link_node = to_loc->node_access;
300017f4: e5903000 ldr r3, [r0]
int IMFS_link(
rtems_filesystem_location_info_t *to_loc, /* IN */
rtems_filesystem_location_info_t *parent_loc, /* IN */
const char *token /* IN */
)
{
300017f8: e1a05001 mov r5, r1
/*
* 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 )
300017fc: e1d313b4 ldrh r1, [r3, #52] ; 0x34
int IMFS_link(
rtems_filesystem_location_info_t *to_loc, /* IN */
rtems_filesystem_location_info_t *parent_loc, /* IN */
const char *token /* IN */
)
{
30001800: e24dd048 sub sp, sp, #72 ; 0x48
/*
* 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 )
30001804: e3510007 cmp r1, #7
int IMFS_link(
rtems_filesystem_location_info_t *to_loc, /* IN */
rtems_filesystem_location_info_t *parent_loc, /* IN */
const char *token /* IN */
)
{
30001808: e1a06002 mov r6, r2
int i;
/*
* Verify this node can be linked to.
*/
info.hard_link.link_node = to_loc->node_access;
3000180c: e58d3028 str r3, [sp, #40] ; 0x28
if ( info.hard_link.link_node->st_nlink >= LINK_MAX )
30001810: 8a00001d bhi 3000188c <IMFS_link+0x9c>
rtems_set_errno_and_return_minus_one( EMLINK );
/*
* Remove any separators at the end of the string.
*/
IMFS_get_token( token, strlen( token ), new_name, &i );
30001814: e1a00002 mov r0, r2
30001818: eb0034a6 bl 3000eab8 <strlen>
3000181c: e28d4004 add r4, sp, #4
30001820: e1a01000 mov r1, r0
30001824: e1a02004 mov r2, r4
30001828: e28d3044 add r3, sp, #68 ; 0x44
3000182c: e1a00006 mov r0, r6
30001830: eb002136 bl 30009d10 <IMFS_get_token>
new_node = IMFS_create_node(
parent_loc,
IMFS_HARD_LINK,
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
30001834: e28d3028 add r3, sp, #40 ; 0x28
* was ONLY passed a NULL when we created the root node. We
* added a new IMFS_create_root_node() so this path no longer
* existed. The result was simpler code which should not have
* this path.
*/
new_node = IMFS_create_node(
30001838: e58d3000 str r3, [sp]
3000183c: e3a01003 mov r1, #3
30001840: e1a00005 mov r0, r5
30001844: e1a02004 mov r2, r4
30001848: e59f3064 ldr r3, [pc, #100] ; 300018b4 <IMFS_link+0xc4>
3000184c: eb001e80 bl 30009254 <IMFS_create_node>
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if ( !new_node )
30001850: e3500000 cmp r0, #0
30001854: 0a000011 beq 300018a0 <IMFS_link+0xb0>
rtems_set_errno_and_return_minus_one( ENOMEM );
/*
* Increment the link count of the node being pointed to.
*/
info.hard_link.link_node->st_nlink++;
30001858: e59d3028 ldr r3, [sp, #40] ; 0x28
IMFS_update_ctime( info.hard_link.link_node );
3000185c: e28d003c add r0, sp, #60 ; 0x3c
rtems_set_errno_and_return_minus_one( ENOMEM );
/*
* Increment the link count of the node being pointed to.
*/
info.hard_link.link_node->st_nlink++;
30001860: e1d323b4 ldrh r2, [r3, #52] ; 0x34
IMFS_update_ctime( info.hard_link.link_node );
30001864: e3a01000 mov r1, #0
rtems_set_errno_and_return_minus_one( ENOMEM );
/*
* Increment the link count of the node being pointed to.
*/
info.hard_link.link_node->st_nlink++;
30001868: e2822001 add r2, r2, #1
3000186c: e1c323b4 strh r2, [r3, #52] ; 0x34
IMFS_update_ctime( info.hard_link.link_node );
30001870: eb000235 bl 3000214c <gettimeofday>
30001874: e59d203c ldr r2, [sp, #60] ; 0x3c
30001878: e59d3028 ldr r3, [sp, #40] ; 0x28
return 0;
3000187c: e3a00000 mov r0, #0
/*
* Increment the link count of the node being pointed to.
*/
info.hard_link.link_node->st_nlink++;
IMFS_update_ctime( info.hard_link.link_node );
30001880: e5832048 str r2, [r3, #72] ; 0x48
return 0;
}
30001884: e28dd048 add sp, sp, #72 ; 0x48
30001888: e8bd8070 pop {r4, r5, r6, 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 );
3000188c: eb003099 bl 3000daf8 <__errno>
30001890: e3a0301f mov r3, #31
30001894: e5803000 str r3, [r0]
30001898: e3e00000 mvn r0, #0
3000189c: eafffff8 b 30001884 <IMFS_link+0x94>
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if ( !new_node )
rtems_set_errno_and_return_minus_one( ENOMEM );
300018a0: eb003094 bl 3000daf8 <__errno> <== NOT EXECUTED
300018a4: e3a0300c mov r3, #12 <== NOT EXECUTED
300018a8: e5803000 str r3, [r0] <== NOT EXECUTED
300018ac: e3e00000 mvn r0, #0 <== NOT EXECUTED
300018b0: eafffff3 b 30001884 <IMFS_link+0x94> <== NOT EXECUTED
3000c6ac <IMFS_memfile_extend>:
#if defined(RTEMS_DEBUG)
assert( the_jnode );
assert( the_jnode->type == IMFS_MEMORY_FILE );
#endif
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
3000c6ac: e59f3128 ldr r3, [pc, #296] ; 3000c7dc <IMFS_memfile_extend+0x130>
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
3000c6b0: e92d4df0 push {r4, r5, r6, r7, r8, sl, fp, lr}
#if defined(RTEMS_DEBUG)
assert( the_jnode );
assert( the_jnode->type == IMFS_MEMORY_FILE );
#endif
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
3000c6b4: e593b000 ldr fp, [r3]
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
3000c6b8: e1a06002 mov r6, r2
#if defined(RTEMS_DEBUG)
assert( the_jnode );
assert( the_jnode->type == IMFS_MEMORY_FILE );
#endif
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
3000c6bc: e1a0312b lsr r3, fp, #2
3000c6c0: e0223393 mla r2, r3, r3, r3
3000c6c4: e0233392 mla r3, r2, r3, r3
3000c6c8: e3a02000 mov r2, #0
3000c6cc: e2433001 sub r3, r3, #1
3000c6d0: e1520006 cmp r2, r6
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
3000c6d4: e24dd004 sub sp, sp, #4
3000c6d8: e1a04000 mov r4, r0
3000c6dc: e1a08001 mov r8, r1
#if defined(RTEMS_DEBUG)
assert( the_jnode );
assert( the_jnode->type == IMFS_MEMORY_FILE );
#endif
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
3000c6e0: e003039b mul r3, fp, r3
3000c6e4: da000034 ble 3000c7bc <IMFS_memfile_extend+0x110>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( new_length <= the_jnode->info.file.size )
3000c6e8: e5947054 ldr r7, [r4, #84] ; 0x54
3000c6ec: e594a050 ldr sl, [r4, #80] ; 0x50
3000c6f0: e1560007 cmp r6, r7
3000c6f4: da000027 ble 3000c798 <IMFS_memfile_extend+0xec>
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
3000c6f8: e1a0cfcb asr ip, fp, #31
3000c6fc: e1a0300c mov r3, ip
3000c700: e1a0200b mov r2, fp
3000c704: e1a00008 mov r0, r8
3000c708: e1a01006 mov r1, r6
3000c70c: e58dc000 str ip, [sp]
3000c710: eb00154d bl 30011c4c <__divdi3>
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
3000c714: e59dc000 ldr ip, [sp]
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
3000c718: e1a05000 mov r5, r0
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
3000c71c: e1a01007 mov r1, r7
3000c720: e1a0000a mov r0, sl
3000c724: e1a0200b mov r2, fp
3000c728: e1a0300c mov r3, ip
3000c72c: eb001546 bl 30011c4c <__divdi3>
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
3000c730: e1550000 cmp r5, 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;
3000c734: e1a0a000 mov sl, r0
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
3000c738: 3a00001b bcc 3000c7ac <IMFS_memfile_extend+0x100>
3000c73c: e1a07000 mov r7, r0
3000c740: ea000002 b 3000c750 <IMFS_memfile_extend+0xa4>
3000c744: e2877001 add r7, r7, #1
3000c748: e1550007 cmp r5, r7
3000c74c: 3a000016 bcc 3000c7ac <IMFS_memfile_extend+0x100>
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
3000c750: e1a01007 mov r1, r7
3000c754: e1a00004 mov r0, r4
3000c758: ebffff4c bl 3000c490 <IMFS_memfile_addblock>
3000c75c: e3500000 cmp r0, #0
3000c760: 0afffff7 beq 3000c744 <IMFS_memfile_extend+0x98>
3000c764: ea000003 b 3000c778 <IMFS_memfile_extend+0xcc> <== NOT EXECUTED
for ( ; block>=old_blocks ; block-- ) {
IMFS_memfile_remove_block( the_jnode, block );
3000c768: e1a01007 mov r1, r7 <== NOT EXECUTED
3000c76c: e1a00004 mov r0, r4 <== 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-- ) {
3000c770: e2477001 sub r7, r7, #1 <== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block );
3000c774: ebffffc2 bl 3000c684 <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-- ) {
3000c778: e15a0007 cmp sl, r7 <== NOT EXECUTED
3000c77c: 9afffff9 bls 3000c768 <IMFS_memfile_extend+0xbc> <== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block );
}
rtems_set_errno_and_return_minus_one( ENOSPC );
3000c780: eb0004dc bl 3000daf8 <__errno> <== NOT EXECUTED
3000c784: e3a0301c mov r3, #28 <== NOT EXECUTED
3000c788: e5803000 str r3, [r0] <== NOT EXECUTED
3000c78c: e3e00000 mvn r0, #0 <== NOT EXECUTED
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
return 0;
}
3000c790: e28dd004 add sp, sp, #4
3000c794: e8bd8df0 pop {r4, r5, r6, r7, r8, sl, fp, pc}
#endif
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( new_length <= the_jnode->info.file.size )
3000c798: 1a000001 bne 3000c7a4 <IMFS_memfile_extend+0xf8>
3000c79c: e158000a cmp r8, sl
3000c7a0: 8affffd4 bhi 3000c6f8 <IMFS_memfile_extend+0x4c>
return 0;
3000c7a4: e3a00000 mov r0, #0
3000c7a8: eafffff8 b 3000c790 <IMFS_memfile_extend+0xe4>
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
3000c7ac: e5848050 str r8, [r4, #80] ; 0x50
3000c7b0: e5846054 str r6, [r4, #84] ; 0x54
return 0;
3000c7b4: e3a00000 mov r0, #0
3000c7b8: eafffff4 b 3000c790 <IMFS_memfile_extend+0xe4>
#if defined(RTEMS_DEBUG)
assert( the_jnode );
assert( the_jnode->type == IMFS_MEMORY_FILE );
#endif
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
3000c7bc: 1a000001 bne 3000c7c8 <IMFS_memfile_extend+0x11c>
3000c7c0: e1530001 cmp r3, r1
3000c7c4: 8affffc7 bhi 3000c6e8 <IMFS_memfile_extend+0x3c>
rtems_set_errno_and_return_minus_one( EINVAL );
3000c7c8: eb0004ca bl 3000daf8 <__errno>
3000c7cc: e3a03016 mov r3, #22
3000c7d0: e5803000 str r3, [r0]
3000c7d4: e3e00000 mvn r0, #0
3000c7d8: eaffffec b 3000c790 <IMFS_memfile_extend+0xe4>
3000c02c <IMFS_memfile_get_block_pointer>:
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
3000c02c: e59f31f8 ldr r3, [pc, #504] ; 3000c22c <IMFS_memfile_get_block_pointer+0x200>
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
3000c030: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
3000c034: e5934000 ldr r4, [r3]
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
3000c038: e24dd004 sub sp, sp, #4
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
3000c03c: e1a04124 lsr r4, r4, #2
3000c040: e2443001 sub r3, r4, #1
3000c044: e1510003 cmp r1, r3
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
3000c048: e1a05000 mov r5, r0
3000c04c: e1a06002 mov r6, r2
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
3000c050: 8a000007 bhi 3000c074 <IMFS_memfile_get_block_pointer+0x48>
p = info->indirect;
if ( malloc_it ) {
3000c054: e3520000 cmp r2, #0
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
p = info->indirect;
3000c058: e5900058 ldr r0, [r0, #88] ; 0x58
if ( malloc_it ) {
3000c05c: 0a00001c beq 3000c0d4 <IMFS_memfile_get_block_pointer+0xa8>
if ( !p ) {
3000c060: e3500000 cmp r0, #0
3000c064: 0a000041 beq 3000c170 <IMFS_memfile_get_block_pointer+0x144>
}
if ( !p )
return 0;
return &info->indirect[ my_block ];
3000c068: e0800101 add r0, r0, r1, lsl #2
/*
* This means the requested block number is out of range.
*/
return 0;
}
3000c06c: e28dd004 add sp, sp, #4
3000c070: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
/*
* Is the block number in the doubly indirect portion?
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
3000c074: e0274494 mla r7, r4, r4, r4
3000c078: e2473001 sub r3, r7, #1
3000c07c: e1510003 cmp r1, r3
3000c080: 8a000016 bhi 3000c0e0 <IMFS_memfile_get_block_pointer+0xb4>
#if 0
fprintf(stdout, "(d %d) ", block );
fflush(stdout);
#endif
my_block -= FIRST_DOUBLY_INDIRECT;
3000c084: e0647001 rsb r7, r4, r1
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
3000c088: e1a00007 mov r0, r7
3000c08c: e1a01004 mov r1, r4
3000c090: eb00148d bl 300112cc <__umodsi3>
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
3000c094: e1a01004 mov r1, r4
fflush(stdout);
#endif
my_block -= FIRST_DOUBLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
3000c098: e1a08000 mov r8, r0
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
3000c09c: e1a00007 mov r0, r7
3000c0a0: eb001443 bl 300111b4 <__aeabi_uidiv>
p = info->doubly_indirect;
if ( malloc_it ) {
3000c0a4: e3560000 cmp r6, #0
#endif
my_block -= FIRST_DOUBLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
3000c0a8: e1a04000 mov r4, r0
p = info->doubly_indirect;
3000c0ac: e595305c ldr r3, [r5, #92] ; 0x5c
if ( malloc_it ) {
3000c0b0: 0a00003f beq 3000c1b4 <IMFS_memfile_get_block_pointer+0x188>
if ( !p ) {
3000c0b4: e3530000 cmp r3, #0
3000c0b8: 0a000045 beq 3000c1d4 <IMFS_memfile_get_block_pointer+0x1a8>
if ( !p )
return 0;
info->doubly_indirect = p;
}
p1 = (block_p *)p[ doubly ];
3000c0bc: e7930104 ldr r0, [r3, r4, lsl #2]
3000c0c0: e0834104 add r4, r3, r4, lsl #2
if ( !p1 ) {
3000c0c4: e3500000 cmp r0, #0
3000c0c8: 0a00002f beq 3000c18c <IMFS_memfile_get_block_pointer+0x160>
#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 ];
3000c0cc: e0800108 add r0, r0, r8, lsl #2
3000c0d0: eaffffe5 b 3000c06c <IMFS_memfile_get_block_pointer+0x40>
info->indirect = p;
}
return &info->indirect[ my_block ];
}
if ( !p )
3000c0d4: e3500000 cmp r0, #0
3000c0d8: 1affffe2 bne 3000c068 <IMFS_memfile_get_block_pointer+0x3c>
3000c0dc: eaffffe2 b 3000c06c <IMFS_memfile_get_block_pointer+0x40> <== NOT EXECUTED
#endif
/*
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
3000c0e0: e0234497 mla r3, r7, r4, r4
3000c0e4: e2433001 sub r3, r3, #1
3000c0e8: e1510003 cmp r1, r3
/*
* This means the requested block number is out of range.
*/
return 0;
3000c0ec: 83a00000 movhi r0, #0
#endif
/*
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
3000c0f0: 8affffdd bhi 3000c06c <IMFS_memfile_get_block_pointer+0x40>
my_block -= FIRST_TRIPLY_INDIRECT;
3000c0f4: e0677001 rsb r7, r7, r1
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
3000c0f8: e1a00007 mov r0, r7
3000c0fc: e1a01004 mov r1, r4
3000c100: eb001471 bl 300112cc <__umodsi3>
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
3000c104: e1a01004 mov r1, r4
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
my_block -= FIRST_TRIPLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
3000c108: e1a0a000 mov sl, r0
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
3000c10c: e1a00007 mov r0, r7
3000c110: eb001427 bl 300111b4 <__aeabi_uidiv>
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
3000c114: e1a01004 mov r1, r4
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;
3000c118: e1a08000 mov r8, r0
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
3000c11c: eb001424 bl 300111b4 <__aeabi_uidiv>
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
3000c120: e1a01004 mov r1, r4
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;
3000c124: e1a07000 mov r7, r0
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
3000c128: e1a00008 mov r0, r8
3000c12c: eb001466 bl 300112cc <__umodsi3>
p = info->triply_indirect;
if ( malloc_it ) {
3000c130: e3560000 cmp r6, #0
my_block -= FIRST_TRIPLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
3000c134: e1a04000 mov r4, r0
p = info->triply_indirect;
3000c138: e5950060 ldr r0, [r5, #96] ; 0x60
if ( malloc_it ) {
3000c13c: 0a000029 beq 3000c1e8 <IMFS_memfile_get_block_pointer+0x1bc>
if ( !p ) {
3000c140: e3500000 cmp r0, #0
3000c144: 0a000033 beq 3000c218 <IMFS_memfile_get_block_pointer+0x1ec>
if ( !p )
return 0;
info->triply_indirect = p;
}
p1 = (block_p *) p[ triply ];
3000c148: e7903107 ldr r3, [r0, r7, lsl #2]
3000c14c: e0807107 add r7, r0, r7, lsl #2
if ( !p1 ) {
3000c150: e3530000 cmp r3, #0
3000c154: 0a00002a beq 3000c204 <IMFS_memfile_get_block_pointer+0x1d8>
if ( !p1 )
return 0;
p[ triply ] = (block_p) p1;
}
p2 = (block_p *)p1[ doubly ];
3000c158: e7930104 ldr r0, [r3, r4, lsl #2]
3000c15c: e0834104 add r4, r3, r4, lsl #2
if ( !p2 ) {
3000c160: e3500000 cmp r0, #0
3000c164: 0a00000d beq 3000c1a0 <IMFS_memfile_get_block_pointer+0x174>
p2 = (block_p *)p1[ doubly ];
if ( !p )
return 0;
return (block_p *)&p2[ singly ];
3000c168: e080010a add r0, r0, sl, lsl #2
3000c16c: eaffffbe b 3000c06c <IMFS_memfile_get_block_pointer+0x40>
p = info->indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
3000c170: e58d1000 str r1, [sp]
3000c174: ebffff9f bl 3000bff8 <memfile_alloc_block>
if ( !p )
3000c178: e3500000 cmp r0, #0
3000c17c: e59d1000 ldr r1, [sp]
return 0;
info->indirect = p;
3000c180: 15850058 strne r0, [r5, #88] ; 0x58
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
if ( !p )
3000c184: 1affffb7 bne 3000c068 <IMFS_memfile_get_block_pointer+0x3c>
3000c188: eaffffb7 b 3000c06c <IMFS_memfile_get_block_pointer+0x40> <== NOT EXECUTED
info->doubly_indirect = p;
}
p1 = (block_p *)p[ doubly ];
if ( !p1 ) {
p1 = memfile_alloc_block();
3000c18c: ebffff99 bl 3000bff8 <memfile_alloc_block>
if ( !p1 )
3000c190: e3500000 cmp r0, #0
return 0;
p[ doubly ] = (block_p) p1;
3000c194: 15840000 strne r0, [r4]
#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 ];
3000c198: 10800108 addne r0, r0, r8, lsl #2
3000c19c: eaffffb2 b 3000c06c <IMFS_memfile_get_block_pointer+0x40>
p[ triply ] = (block_p) p1;
}
p2 = (block_p *)p1[ doubly ];
if ( !p2 ) {
p2 = memfile_alloc_block();
3000c1a0: ebffff94 bl 3000bff8 <memfile_alloc_block>
if ( !p2 )
3000c1a4: e3500000 cmp r0, #0
return 0;
p1[ doubly ] = (block_p) p2;
3000c1a8: 15840000 strne r0, [r4]
p2 = (block_p *)p1[ doubly ];
if ( !p )
return 0;
return (block_p *)&p2[ singly ];
3000c1ac: 1080010a addne r0, r0, sl, lsl #2
3000c1b0: eaffffad b 3000c06c <IMFS_memfile_get_block_pointer+0x40>
}
return (block_p *)&p1[ singly ];
}
if ( !p )
3000c1b4: e3530000 cmp r3, #0
3000c1b8: 1a000001 bne 3000c1c4 <IMFS_memfile_get_block_pointer+0x198>
p1 = (block_p *) p[ triply ];
if ( !p1 ) {
p1 = memfile_alloc_block();
if ( !p1 )
return 0;
3000c1bc: e1a00003 mov r0, r3 <== NOT EXECUTED
3000c1c0: eaffffa9 b 3000c06c <IMFS_memfile_get_block_pointer+0x40> <== NOT EXECUTED
}
if ( !p )
return 0;
p = (block_p *)p[ doubly ];
3000c1c4: e7930100 ldr r0, [r3, r0, lsl #2]
if ( !p )
3000c1c8: e3500000 cmp r0, #0
#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 ];
3000c1cc: 10800108 addne r0, r0, r8, lsl #2
3000c1d0: eaffffa5 b 3000c06c <IMFS_memfile_get_block_pointer+0x40>
p = info->doubly_indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
3000c1d4: ebffff87 bl 3000bff8 <memfile_alloc_block>
if ( !p )
3000c1d8: e2503000 subs r3, r0, #0
3000c1dc: 0afffff6 beq 3000c1bc <IMFS_memfile_get_block_pointer+0x190>
return 0;
info->doubly_indirect = p;
3000c1e0: e585305c str r3, [r5, #92] ; 0x5c
3000c1e4: eaffffb4 b 3000c0bc <IMFS_memfile_get_block_pointer+0x90>
p1[ doubly ] = (block_p) p2;
}
return (block_p *)&p2[ singly ];
}
if ( !p )
3000c1e8: e3500000 cmp r0, #0
3000c1ec: 0affff9e beq 3000c06c <IMFS_memfile_get_block_pointer+0x40>
#if 0
fprintf(stdout, "(t %d %d %d %d %d) ", block, my_block, triply, doubly, singly );
fflush(stdout);
#endif
p1 = (block_p *) p[ triply ];
3000c1f0: e7900107 ldr r0, [r0, r7, lsl #2]
if ( !p1 )
3000c1f4: e3500000 cmp r0, #0
p2 = (block_p *)p1[ doubly ];
if ( !p )
return 0;
return (block_p *)&p2[ singly ];
3000c1f8: 17900104 ldrne r0, [r0, r4, lsl #2]
3000c1fc: 1080010a addne r0, r0, sl, lsl #2
3000c200: eaffff99 b 3000c06c <IMFS_memfile_get_block_pointer+0x40>
info->triply_indirect = p;
}
p1 = (block_p *) p[ triply ];
if ( !p1 ) {
p1 = memfile_alloc_block();
3000c204: ebffff7b bl 3000bff8 <memfile_alloc_block>
if ( !p1 )
3000c208: e2503000 subs r3, r0, #0
3000c20c: 0affffea beq 3000c1bc <IMFS_memfile_get_block_pointer+0x190>
return 0;
p[ triply ] = (block_p) p1;
3000c210: e5873000 str r3, [r7]
3000c214: eaffffcf b 3000c158 <IMFS_memfile_get_block_pointer+0x12c>
p = info->triply_indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
3000c218: ebffff76 bl 3000bff8 <memfile_alloc_block>
if ( !p )
3000c21c: e3500000 cmp r0, #0
3000c220: 0affff91 beq 3000c06c <IMFS_memfile_get_block_pointer+0x40>
return 0;
info->triply_indirect = p;
3000c224: e5850060 str r0, [r5, #96] ; 0x60
3000c228: eaffffc6 b 3000c148 <IMFS_memfile_get_block_pointer+0x11c>
3000c230 <IMFS_memfile_read>:
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
3000c230: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
/*
* Error checks on arguments
*/
if ( !dest )
3000c234: e253b000 subs fp, r3, #0
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
3000c238: e24dd014 sub sp, sp, #20
3000c23c: e1a09000 mov r9, r0
3000c240: e1a07001 mov r7, r1
3000c244: e1a08002 mov r8, r2
3000c248: e59d5038 ldr r5, [sp, #56] ; 0x38
/*
* Error checks on arguments
*/
if ( !dest )
3000c24c: 0a00007c beq 3000c444 <IMFS_memfile_read+0x214>
/*
* If there is nothing to read, then quick exit.
*/
my_length = length;
if ( !my_length )
3000c250: e3550000 cmp r5, #0
3000c254: 0a00007a beq 3000c444 <IMFS_memfile_read+0x214>
/*
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
if (the_jnode->type == IMFS_LINEAR_FILE) {
3000c258: e590304c ldr r3, [r0, #76] ; 0x4c
3000c25c: e3530006 cmp r3, #6
3000c260: 0a00005c beq 3000c3d8 <IMFS_memfile_read+0x1a8>
* 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 )
3000c264: e5902054 ldr r2, [r0, #84] ; 0x54
/*
* 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;
3000c268: e1a03001 mov r3, r1
if ( last_byte > the_jnode->info.file.size )
3000c26c: e3a01000 mov r1, #0
3000c270: e1510002 cmp r1, r2
3000c274: e5902050 ldr r2, [r0, #80] ; 0x50
/*
* 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;
3000c278: e0851007 add r1, r5, r7
if ( last_byte > the_jnode->info.file.size )
3000c27c: da00003d ble 3000c378 <IMFS_memfile_read+0x148>
my_length = the_jnode->info.file.size - start;
3000c280: e0635002 rsb r5, r3, r2
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
3000c284: e59f61cc ldr r6, [pc, #460] ; 3000c458 <IMFS_memfile_read+0x228>
3000c288: e1a00007 mov r0, r7
3000c28c: e5964000 ldr r4, [r6]
3000c290: e1a01008 mov r1, r8
3000c294: e1a02004 mov r2, r4
3000c298: e1a03fc2 asr r3, r2, #31
3000c29c: e98d000c stmib sp, {r2, r3}
3000c2a0: eb0017a3 bl 30012134 <__moddi3>
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
3000c2a4: e99d000c ldmib sp, {r2, r3}
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
3000c2a8: e1a0a000 mov sl, r0
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
3000c2ac: e1a01008 mov r1, r8
3000c2b0: e1a00007 mov r0, r7
3000c2b4: eb001664 bl 30011c4c <__divdi3>
if ( start_offset ) {
3000c2b8: e35a0000 cmp sl, #0
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
3000c2bc: e1a07000 mov r7, r0
if ( start_offset ) {
3000c2c0: 01a0800b moveq r8, fp
3000c2c4: 0a000014 beq 3000c31c <IMFS_memfile_read+0xec>
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 );
3000c2c8: e1a00009 mov r0, r9
3000c2cc: e1a01007 mov r1, r7
3000c2d0: e3a02000 mov r2, #0
3000c2d4: ebffff54 bl 3000c02c <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
3000c2d8: e3500000 cmp r0, #0
3000c2dc: 0a000023 beq 3000c370 <IMFS_memfile_read+0x140>
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
3000c2e0: 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;
3000c2e4: e06a3004 rsb r3, sl, r4
3000c2e8: e1550003 cmp r5, r3
3000c2ec: 31a03005 movcc r3, r5
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
3000c2f0: e081100a add r1, r1, sl
3000c2f4: e1a02003 mov r2, r3
3000c2f8: e1a0000b mov r0, fp
3000c2fc: e58d3000 str r3, [sp]
3000c300: eb00082a bl 3000e3b0 <memcpy>
dest += to_copy;
3000c304: e59d3000 ldr r3, [sp]
block++;
my_length -= to_copy;
3000c308: e5964000 ldr r4, [r6]
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
dest += to_copy;
3000c30c: e08b8003 add r8, fp, r3
block++;
3000c310: e2877001 add r7, r7, #1
my_length -= to_copy;
3000c314: e0635005 rsb r5, r3, r5
copied += to_copy;
3000c318: e1a0a003 mov sl, r3
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
3000c31c: e1550004 cmp r5, r4
3000c320: 2a000008 bcs 3000c348 <IMFS_memfile_read+0x118>
3000c324: ea000017 b 3000c388 <IMFS_memfile_read+0x158>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
3000c328: e5931000 ldr r1, [r3]
3000c32c: eb00081f bl 3000e3b0 <memcpy>
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
3000c330: e5963000 ldr r3, [r6]
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
dest += to_copy;
3000c334: 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 ) {
3000c338: e1530005 cmp r3, r5
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
dest += to_copy;
block++;
3000c33c: e2877001 add r7, r7, #1
my_length -= to_copy;
copied += to_copy;
3000c340: e08aa004 add sl, sl, r4
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
3000c344: 8a00000f bhi 3000c388 <IMFS_memfile_read+0x158>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
3000c348: e3a02000 mov r2, #0
3000c34c: e1a01007 mov r1, r7
3000c350: e1a00009 mov r0, r9
3000c354: ebffff34 bl 3000c02c <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
3000c358: e2503000 subs r3, r0, #0
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
3000c35c: e1a02004 mov r2, r4
dest += to_copy;
block++;
my_length -= to_copy;
3000c360: e0645005 rsb r5, r4, r5
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
3000c364: e1a00008 mov r0, r8
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
3000c368: 1affffee bne 3000c328 <IMFS_memfile_read+0xf8>
#endif
if ( my_length ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
3000c36c: e1a0000a mov r0, sl <== NOT EXECUTED
}
IMFS_update_atime( the_jnode );
return copied;
}
3000c370: e28dd014 add sp, sp, #20
3000c374: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
* 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 )
3000c378: 1affffc1 bne 3000c284 <IMFS_memfile_read+0x54>
3000c37c: e1510002 cmp r1, r2
3000c380: 9affffbf bls 3000c284 <IMFS_memfile_read+0x54>
3000c384: eaffffbd b 3000c280 <IMFS_memfile_read+0x50>
#if defined(RTEMS_DEBUG)
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
#endif
if ( my_length ) {
3000c388: e3550000 cmp r5, #0
3000c38c: 0a00000a beq 3000c3bc <IMFS_memfile_read+0x18c>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
3000c390: e1a00009 mov r0, r9
3000c394: e1a01007 mov r1, r7
3000c398: e3a02000 mov r2, #0
3000c39c: ebffff22 bl 3000c02c <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
3000c3a0: e2503000 subs r3, r0, #0
3000c3a4: 0afffff0 beq 3000c36c <IMFS_memfile_read+0x13c>
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], my_length );
3000c3a8: e1a00008 mov r0, r8
3000c3ac: e5931000 ldr r1, [r3]
3000c3b0: e1a02005 mov r2, r5
3000c3b4: eb0007fd bl 3000e3b0 <memcpy>
copied += my_length;
3000c3b8: e08aa005 add sl, sl, r5
}
IMFS_update_atime( the_jnode );
3000c3bc: e28d000c add r0, sp, #12
3000c3c0: e3a01000 mov r1, #0
3000c3c4: ebffd760 bl 3000214c <gettimeofday>
3000c3c8: e59d300c ldr r3, [sp, #12]
return copied;
3000c3cc: e1a0000a mov r0, sl
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], my_length );
copied += my_length;
}
IMFS_update_atime( the_jnode );
3000c3d0: e5893040 str r3, [r9, #64] ; 0x40
return copied;
3000c3d4: eaffffe5 b 3000c370 <IMFS_memfile_read+0x140>
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))
3000c3d8: e2804050 add r4, r0, #80 ; 0x50
3000c3dc: e8940018 ldm r4, {r3, r4}
3000c3e0: e1a00003 mov r0, r3
3000c3e4: e1a01004 mov r1, r4
3000c3e8: e3a02000 mov r2, #0
3000c3ec: e0500007 subs r0, r0, r7
3000c3f0: e0c11008 sbc r1, r1, r8
3000c3f4: e1520001 cmp r2, r1
* than block files).
*/
if (the_jnode->type == IMFS_LINEAR_FILE) {
unsigned char *file_ptr;
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
3000c3f8: e5992058 ldr r2, [r9, #88] ; 0x58
if (my_length > (the_jnode->info.linearfile.size - start))
3000c3fc: da00000b ble 3000c430 <IMFS_memfile_read+0x200>
my_length = the_jnode->info.linearfile.size - start;
3000c400: e067a003 rsb sl, r7, r3
memcpy(dest, &file_ptr[start], my_length);
3000c404: e0821007 add r1, r2, r7
3000c408: e1a0000b mov r0, fp
3000c40c: e1a0200a mov r2, sl
3000c410: eb0007e6 bl 3000e3b0 <memcpy>
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], my_length );
copied += my_length;
}
IMFS_update_atime( the_jnode );
3000c414: e28d000c add r0, sp, #12
3000c418: e3a01000 mov r1, #0
3000c41c: ebffd74a bl 3000214c <gettimeofday>
3000c420: e59d300c ldr r3, [sp, #12]
return copied;
3000c424: e1a0000a mov r0, sl
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], my_length );
copied += my_length;
}
IMFS_update_atime( the_jnode );
3000c428: e5893040 str r3, [r9, #64] ; 0x40
3000c42c: eaffffcf b 3000c370 <IMFS_memfile_read+0x140>
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))
3000c430: 1a000001 bne 3000c43c <IMFS_memfile_read+0x20c>
3000c434: e1550000 cmp r5, r0
3000c438: 8afffff0 bhi 3000c400 <IMFS_memfile_read+0x1d0>
3000c43c: e1a0a005 mov sl, r5 <== NOT EXECUTED
3000c440: eaffffef b 3000c404 <IMFS_memfile_read+0x1d4> <== 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 );
3000c444: eb0005ab bl 3000daf8 <__errno> <== NOT EXECUTED
3000c448: e3a03016 mov r3, #22 <== NOT EXECUTED
3000c44c: e5803000 str r3, [r0] <== NOT EXECUTED
3000c450: e3e00000 mvn r0, #0 <== NOT EXECUTED
3000c454: eaffffc5 b 3000c370 <IMFS_memfile_read+0x140> <== NOT EXECUTED
3000c544 <IMFS_memfile_remove>:
*/
int IMFS_memfile_remove(
IMFS_jnode_t *the_jnode
)
{
3000c544: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
/*
* Eventually this could be set smarter at each call to
* memfile_free_blocks_in_table to greatly speed this up.
*/
to_free = IMFS_MEMFILE_BLOCK_SLOTS;
3000c548: e59f6130 ldr r6, [pc, #304] ; 3000c680 <IMFS_memfile_remove+0x13c>
* + triply indirect
*/
info = &the_jnode->info.file;
if ( info->indirect ) {
3000c54c: e5903058 ldr r3, [r0, #88] ; 0x58
/*
* Eventually this could be set smarter at each call to
* memfile_free_blocks_in_table to greatly speed this up.
*/
to_free = IMFS_MEMFILE_BLOCK_SLOTS;
3000c550: e5967000 ldr r7, [r6]
* + triply indirect
*/
info = &the_jnode->info.file;
if ( info->indirect ) {
3000c554: e3530000 cmp r3, #0
*/
int IMFS_memfile_remove(
IMFS_jnode_t *the_jnode
)
{
3000c558: e1a0a000 mov sl, r0
/*
* Eventually this could be set smarter at each call to
* memfile_free_blocks_in_table to greatly speed this up.
*/
to_free = IMFS_MEMFILE_BLOCK_SLOTS;
3000c55c: e1a07127 lsr r7, r7, #2
*/
info = &the_jnode->info.file;
if ( info->indirect ) {
memfile_free_blocks_in_table( &info->indirect, to_free );
3000c560: 12800058 addne r0, r0, #88 ; 0x58
3000c564: 11a01007 movne r1, r7
3000c568: 1bffffde blne 3000c4e8 <memfile_free_blocks_in_table>
}
if ( info->doubly_indirect ) {
3000c56c: e59a305c ldr r3, [sl, #92] ; 0x5c
3000c570: e3530000 cmp r3, #0
3000c574: 0a000014 beq 3000c5cc <IMFS_memfile_remove+0x88>
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
3000c578: e5962000 ldr r2, [r6] <== NOT EXECUTED
3000c57c: e1b02122 lsrs r2, r2, #2 <== NOT EXECUTED
3000c580: 0a00000e beq 3000c5c0 <IMFS_memfile_remove+0x7c> <== NOT EXECUTED
3000c584: e3a02000 mov r2, #0 <== NOT EXECUTED
3000c588: e1a04002 mov r4, r2 <== NOT EXECUTED
3000c58c: ea000000 b 3000c594 <IMFS_memfile_remove+0x50> <== NOT EXECUTED
3000c590: e59a305c ldr r3, [sl, #92] ; 0x5c <== NOT EXECUTED
if ( info->doubly_indirect[i] ) {
3000c594: e7931102 ldr r1, [r3, r2, lsl #2] <== NOT EXECUTED
3000c598: e1a02102 lsl r2, r2, #2 <== NOT EXECUTED
3000c59c: e3510000 cmp r1, #0 <== NOT EXECUTED
memfile_free_blocks_in_table( &info->indirect, to_free );
}
if ( info->doubly_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
3000c5a0: e2844001 add r4, r4, #1 <== NOT EXECUTED
if ( info->doubly_indirect[i] ) {
memfile_free_blocks_in_table(
3000c5a4: e1a01007 mov r1, r7 <== NOT EXECUTED
3000c5a8: e0830002 add r0, r3, r2 <== NOT EXECUTED
3000c5ac: 1bffffcd blne 3000c4e8 <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++ ) {
3000c5b0: e5963000 ldr r3, [r6] <== NOT EXECUTED
3000c5b4: e1a02004 mov r2, r4 <== NOT EXECUTED
3000c5b8: e1540123 cmp r4, r3, lsr #2 <== NOT EXECUTED
3000c5bc: 3afffff3 bcc 3000c590 <IMFS_memfile_remove+0x4c> <== NOT EXECUTED
if ( info->doubly_indirect[i] ) {
memfile_free_blocks_in_table(
(block_p **)&info->doubly_indirect[i], to_free );
}
}
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
3000c5c0: e28a005c add r0, sl, #92 ; 0x5c <== NOT EXECUTED
3000c5c4: e1a01007 mov r1, r7 <== NOT EXECUTED
3000c5c8: ebffffc6 bl 3000c4e8 <memfile_free_blocks_in_table> <== NOT EXECUTED
}
if ( info->triply_indirect ) {
3000c5cc: e59a0060 ldr r0, [sl, #96] ; 0x60
3000c5d0: e3500000 cmp r0, #0
3000c5d4: 0a000027 beq 3000c678 <IMFS_memfile_remove+0x134>
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
3000c5d8: e5963000 ldr r3, [r6] <== NOT EXECUTED
3000c5dc: e1b03123 lsrs r3, r3, #2 <== NOT EXECUTED
3000c5e0: 0a000021 beq 3000c66c <IMFS_memfile_remove+0x128> <== NOT EXECUTED
p = (block_p *) info->triply_indirect[i];
3000c5e4: e5905000 ldr r5, [r0] <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
3000c5e8: e3550000 cmp r5, #0 <== NOT EXECUTED
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
3000c5ec: 13a09000 movne r9, #0 <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
3000c5f0: 11a08009 movne r8, r9 <== NOT EXECUTED
3000c5f4: 0a00001c beq 3000c66c <IMFS_memfile_remove+0x128> <== NOT EXECUTED
break;
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
3000c5f8: e3530000 cmp r3, #0 <== NOT EXECUTED
3000c5fc: 0a00000d beq 3000c638 <IMFS_memfile_remove+0xf4> <== NOT EXECUTED
3000c600: e3a00000 mov r0, #0 <== NOT EXECUTED
3000c604: e1a04000 mov r4, r0 <== NOT EXECUTED
if ( p[j] ) {
3000c608: e7953100 ldr r3, [r5, r0, lsl #2] <== NOT EXECUTED
3000c60c: e1a00100 lsl r0, r0, #2 <== NOT EXECUTED
3000c610: e3530000 cmp r3, #0 <== 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++ ) {
3000c614: e2844001 add r4, r4, #1 <== NOT EXECUTED
if ( p[j] ) {
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
3000c618: e1a01007 mov r1, r7 <== NOT EXECUTED
3000c61c: e0850000 add r0, r5, r0 <== NOT EXECUTED
3000c620: 1bffffb0 blne 3000c4e8 <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++ ) {
3000c624: e5963000 ldr r3, [r6] <== NOT EXECUTED
3000c628: e1a00004 mov r0, r4 <== NOT EXECUTED
3000c62c: e1540123 cmp r4, r3, lsr #2 <== NOT EXECUTED
3000c630: 3afffff4 bcc 3000c608 <IMFS_memfile_remove+0xc4> <== NOT EXECUTED
3000c634: e59a0060 ldr r0, [sl, #96] ; 0x60 <== NOT EXECUTED
if ( p[j] ) {
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
}
}
memfile_free_blocks_in_table(
3000c638: e0800009 add r0, r0, r9 <== NOT EXECUTED
3000c63c: e1a01007 mov r1, r7 <== NOT EXECUTED
3000c640: ebffffa8 bl 3000c4e8 <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++ ) {
3000c644: e5963000 ldr r3, [r6] <== NOT EXECUTED
3000c648: e2888001 add r8, r8, #1 <== NOT EXECUTED
3000c64c: e1a03123 lsr r3, r3, #2 <== NOT EXECUTED
3000c650: e1530008 cmp r3, r8 <== NOT EXECUTED
3000c654: 9a000004 bls 3000c66c <IMFS_memfile_remove+0x128> <== NOT EXECUTED
p = (block_p *) info->triply_indirect[i];
3000c658: e59a0060 ldr r0, [sl, #96] ; 0x60 <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
3000c65c: e1a09108 lsl r9, r8, #2 <== NOT EXECUTED
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
3000c660: e7905108 ldr r5, [r0, r8, lsl #2] <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
3000c664: e3550000 cmp r5, #0 <== NOT EXECUTED
3000c668: 1affffe2 bne 3000c5f8 <IMFS_memfile_remove+0xb4> <== NOT EXECUTED
}
}
memfile_free_blocks_in_table(
(block_p **)&info->triply_indirect[i], to_free );
}
memfile_free_blocks_in_table(
3000c66c: e28a0060 add r0, sl, #96 ; 0x60 <== NOT EXECUTED
3000c670: e1a01007 mov r1, r7 <== NOT EXECUTED
3000c674: ebffff9b bl 3000c4e8 <memfile_free_blocks_in_table> <== NOT EXECUTED
(block_p **)&info->triply_indirect, to_free );
}
return 0;
}
3000c678: e3a00000 mov r0, #0
3000c67c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
3000c684 <IMFS_memfile_remove_block>:
MEMFILE_STATIC int IMFS_memfile_remove_block(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
3000c684: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
block_p *block_ptr;
block_p ptr;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
3000c688: e3a02000 mov r2, #0 <== NOT EXECUTED
3000c68c: ebfffe66 bl 3000c02c <IMFS_memfile_get_block_pointer> <== NOT EXECUTED
#if defined(RTEMS_DEBUG)
assert( block_ptr );
#endif
if ( block_ptr ) {
3000c690: e2503000 subs r3, r0, #0 <== NOT EXECUTED
ptr = *block_ptr;
*block_ptr = 0;
3000c694: 13a02000 movne r2, #0 <== NOT EXECUTED
#if defined(RTEMS_DEBUG)
assert( block_ptr );
#endif
if ( block_ptr ) {
ptr = *block_ptr;
3000c698: 15930000 ldrne r0, [r3] <== NOT EXECUTED
*block_ptr = 0;
3000c69c: 15832000 strne r2, [r3] <== NOT EXECUTED
memfile_free_block( ptr );
3000c6a0: 1bffff88 blne 3000c4c8 <memfile_free_block> <== NOT EXECUTED
}
return 1;
}
3000c6a4: e3a00001 mov r0, #1 <== NOT EXECUTED
3000c6a8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
3000c7e0 <IMFS_memfile_write>:
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
3000c7e0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
/*
* Error check arguments
*/
if ( !source )
3000c7e4: e2538000 subs r8, r3, #0
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
3000c7e8: e24dd010 sub sp, sp, #16
3000c7ec: e1a09000 mov r9, r0
3000c7f0: e1a06001 mov r6, r1
3000c7f4: e1a07002 mov r7, r2
3000c7f8: e59db034 ldr fp, [sp, #52] ; 0x34
/*
* Error check arguments
*/
if ( !source )
3000c7fc: 0a000064 beq 3000c994 <IMFS_memfile_write+0x1b4>
/*
* If there is nothing to write, then quick exit.
*/
my_length = length;
if ( !my_length )
3000c800: e35b0000 cmp fp, #0
3000c804: 0a000062 beq 3000c994 <IMFS_memfile_write+0x1b4>
* 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 ) {
3000c808: e5903054 ldr r3, [r0, #84] ; 0x54
/*
* 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;
3000c80c: e08b1001 add r1, fp, r1
if ( last_byte > the_jnode->info.file.size ) {
3000c810: e3530000 cmp r3, #0
3000c814: ba000040 blt 3000c91c <IMFS_memfile_write+0x13c>
3000c818: 0a00003c beq 3000c910 <IMFS_memfile_write+0x130>
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
3000c81c: e59f5184 ldr r5, [pc, #388] ; 3000c9a8 <IMFS_memfile_write+0x1c8>
3000c820: e1a00006 mov r0, r6
3000c824: e5954000 ldr r4, [r5]
3000c828: e1a01007 mov r1, r7
3000c82c: e1a02004 mov r2, r4
3000c830: e1a03fc2 asr r3, r2, #31
3000c834: e88d000c stm sp, {r2, r3}
3000c838: eb00163d bl 30012134 <__moddi3>
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
3000c83c: e89d000c ldm sp, {r2, r3}
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
3000c840: e1a0a000 mov sl, r0
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
3000c844: e1a01007 mov r1, r7
3000c848: e1a00006 mov r0, r6
3000c84c: eb0014fe bl 30011c4c <__divdi3>
if ( start_offset ) {
3000c850: e35a0000 cmp sl, #0
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
3000c854: e1a07000 mov r7, r0
if ( start_offset ) {
3000c858: 01a0600b moveq r6, fp
3000c85c: 1a000016 bne 3000c8bc <IMFS_memfile_write+0xdc>
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
3000c860: e1560004 cmp r6, r4
3000c864: 2a000008 bcs 3000c88c <IMFS_memfile_write+0xac>
3000c868: ea000035 b 3000c944 <IMFS_memfile_write+0x164>
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 );
3000c86c: e5900000 ldr r0, [r0]
3000c870: eb0006ce bl 3000e3b0 <memcpy>
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
3000c874: e5953000 ldr 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;
3000c878: 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 ) {
3000c87c: e1530006 cmp r3, r6
#if 0
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, to_copy );
src += to_copy;
block++;
3000c880: e2877001 add r7, r7, #1
*
* This routine writes the specified data buffer into the in memory
* file pointed to by the_jnode. The file is extended as needed.
*/
MEMFILE_STATIC ssize_t IMFS_memfile_write(
3000c884: e08aa004 add sl, sl, r4
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
3000c888: 8a00002d bhi 3000c944 <IMFS_memfile_write+0x164>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
3000c88c: e1a01007 mov r1, r7
3000c890: e3a02000 mov r2, #0
3000c894: e1a00009 mov r0, r9
3000c898: ebfffde3 bl 3000c02c <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
3000c89c: e3500000 cmp r0, #0
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 );
3000c8a0: e1a01008 mov r1, r8
3000c8a4: e1a02004 mov r2, r4
src += to_copy;
block++;
my_length -= to_copy;
3000c8a8: e0646006 rsb r6, r4, r6
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
3000c8ac: 1affffee bne 3000c86c <IMFS_memfile_write+0x8c>
}
IMFS_mtime_ctime_update( the_jnode );
return copied;
}
3000c8b0: e1a0000a mov r0, sl
3000c8b4: e28dd010 add sp, sp, #16
3000c8b8: 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 );
3000c8bc: e1a00009 mov r0, r9
3000c8c0: e1a01007 mov r1, r7
3000c8c4: e3a02000 mov r2, #0
3000c8c8: ebfffdd7 bl 3000c02c <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
3000c8cc: e3500000 cmp r0, #0
return copied;
3000c8d0: 01a0a000 moveq sl, r0
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
3000c8d4: 0afffff5 beq 3000c8b0 <IMFS_memfile_write+0xd0>
*/
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;
3000c8d8: e06a4004 rsb r4, sl, r4
block,
to_copy,
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
3000c8dc: 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;
3000c8e0: e154000b cmp r4, fp
3000c8e4: 21a0400b movcs r4, fp
block,
to_copy,
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
3000c8e8: e080000a add r0, r0, sl
3000c8ec: e1a01008 mov r1, r8
3000c8f0: e1a02004 mov r2, r4
3000c8f4: eb0006ad bl 3000e3b0 <memcpy>
src += to_copy;
3000c8f8: e0888004 add r8, r8, r4
block++;
my_length -= to_copy;
3000c8fc: e064600b rsb r6, r4, fp
copied += to_copy;
3000c900: e1a0a004 mov sl, r4
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
src += to_copy;
block++;
3000c904: e2877001 add r7, r7, #1
my_length -= to_copy;
copied += to_copy;
3000c908: e5954000 ldr r4, [r5]
3000c90c: eaffffd3 b 3000c860 <IMFS_memfile_write+0x80>
* 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 ) {
3000c910: e5903050 ldr r3, [r0, #80] ; 0x50
3000c914: e1530001 cmp r3, r1
3000c918: 2affffbf bcs 3000c81c <IMFS_memfile_write+0x3c>
status = IMFS_memfile_extend( the_jnode, last_byte );
3000c91c: e1a00009 mov r0, r9
3000c920: e3a02000 mov r2, #0
3000c924: ebffff60 bl 3000c6ac <IMFS_memfile_extend>
if ( status )
3000c928: e3500000 cmp r0, #0
3000c92c: 0affffba beq 3000c81c <IMFS_memfile_write+0x3c>
rtems_set_errno_and_return_minus_one( ENOSPC );
3000c930: eb000470 bl 3000daf8 <__errno>
3000c934: e3a0301c mov r3, #28
3000c938: e5803000 str r3, [r0]
3000c93c: e3e0a000 mvn sl, #0
3000c940: eaffffda b 3000c8b0 <IMFS_memfile_write+0xd0>
#if defined(RTEMS_DEBUG)
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
#endif
to_copy = my_length;
if ( my_length ) {
3000c944: e3560000 cmp r6, #0
3000c948: 0a00000a beq 3000c978 <IMFS_memfile_write+0x198>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
3000c94c: e1a00009 mov r0, r9
3000c950: e1a01007 mov r1, r7
3000c954: e3a02000 mov r2, #0
3000c958: ebfffdb3 bl 3000c02c <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
3000c95c: e3500000 cmp r0, #0
3000c960: 0affffd2 beq 3000c8b0 <IMFS_memfile_write+0xd0>
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 );
3000c964: e5900000 ldr r0, [r0]
3000c968: e1a01008 mov r1, r8
3000c96c: e1a02006 mov r2, r6
3000c970: eb00068e bl 3000e3b0 <memcpy>
my_length = 0;
copied += to_copy;
3000c974: e08aa006 add sl, sl, r6
}
IMFS_mtime_ctime_update( the_jnode );
3000c978: e28d0008 add r0, sp, #8
3000c97c: e3a01000 mov r1, #0
3000c980: ebffd5f1 bl 3000214c <gettimeofday>
3000c984: e59d3008 ldr r3, [sp, #8]
3000c988: e5893044 str r3, [r9, #68] ; 0x44
3000c98c: e5893048 str r3, [r9, #72] ; 0x48
return copied;
3000c990: eaffffc6 b 3000c8b0 <IMFS_memfile_write+0xd0>
* If there is nothing to write, then quick exit.
*/
my_length = length;
if ( !my_length )
rtems_set_errno_and_return_minus_one( EINVAL );
3000c994: eb000457 bl 3000daf8 <__errno> <== NOT EXECUTED
3000c998: e3a03016 mov r3, #22 <== NOT EXECUTED
3000c99c: e5803000 str r3, [r0] <== NOT EXECUTED
3000c9a0: e3e0a000 mvn sl, #0 <== NOT EXECUTED
3000c9a4: eaffffc1 b 3000c8b0 <IMFS_memfile_write+0xd0> <== NOT EXECUTED
300018b8 <IMFS_mknod>:
const char *token, /* IN */
mode_t mode, /* IN */
dev_t dev, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
300018b8: e92d41f0 push {r4, r5, r6, r7, r8, lr}
300018bc: e24dd040 sub sp, sp, #64 ; 0x40
300018c0: e1a04001 mov r4, r1
300018c4: e1a08000 mov r8, r0
300018c8: e1a07002 mov r7, r2
300018cc: e1a06003 mov r6, r3
IMFS_jnode_t *new_node;
int result;
char new_name[ IMFS_NAME_MAX + 1 ];
IMFS_types_union info;
IMFS_get_token( token, strlen( token ), new_name, &result );
300018d0: eb003478 bl 3000eab8 <strlen>
300018d4: e28d5004 add r5, sp, #4
300018d8: e1a01000 mov r1, r0
300018dc: e28d303c add r3, sp, #60 ; 0x3c
300018e0: e1a00008 mov r0, r8
300018e4: e1a02005 mov r2, r5
300018e8: eb002108 bl 30009d10 <IMFS_get_token>
/*
* Figure out what type of IMFS node this is.
*/
if ( S_ISDIR(mode) )
300018ec: e2043a0f and r3, r4, #61440 ; 0xf000
300018f0: e3530901 cmp r3, #16384 ; 0x4000
300018f4: 0a00001c beq 3000196c <IMFS_mknod+0xb4>
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
300018f8: e3530902 cmp r3, #32768 ; 0x8000
300018fc: 0a000018 beq 30001964 <IMFS_mknod+0xac>
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
30001900: e3530a06 cmp r3, #24576 ; 0x6000
30001904: 13530a02 cmpne r3, #8192 ; 0x2000
type = IMFS_DEVICE;
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
30001908: 058d7028 streq r7, [sp, #40] ; 0x28
3000190c: 058d602c streq r6, [sp, #44] ; 0x2c
if ( S_ISDIR(mode) )
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
type = IMFS_DEVICE;
30001910: 03a01002 moveq r1, #2
*/
if ( S_ISDIR(mode) )
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
30001914: 1a00000a bne 30001944 <IMFS_mknod+0x8c>
new_node = IMFS_create_node(
pathloc,
type,
new_name,
mode,
&info
30001918: e28d3028 add r3, sp, #40 ; 0x28
* was ONLY passed a NULL when we created the root node. We
* added a new IMFS_create_root_node() so this path no longer
* existed. The result was simpler code which should not have
* this path.
*/
new_node = IMFS_create_node(
3000191c: e58d3000 str r3, [sp]
30001920: e59d0058 ldr r0, [sp, #88] ; 0x58
30001924: e1a02005 mov r2, r5
30001928: e1a03004 mov r3, r4
3000192c: eb001e48 bl 30009254 <IMFS_create_node>
new_name,
mode,
&info
);
if ( !new_node )
30001930: e3500000 cmp r0, #0
rtems_set_errno_and_return_minus_one( ENOMEM );
return 0;
30001934: 13a00000 movne r0, #0
new_name,
mode,
&info
);
if ( !new_node )
30001938: 0a00000d beq 30001974 <IMFS_mknod+0xbc>
rtems_set_errno_and_return_minus_one( ENOMEM );
return 0;
}
3000193c: e28dd040 add sp, sp, #64 ; 0x40
30001940: e8bd81f0 pop {r4, r5, r6, r7, r8, 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 if (S_ISFIFO(mode))
30001944: e3530a01 cmp r3, #4096 ; 0x1000
type = IMFS_FIFO;
30001948: 03a01007 moveq r1, #7
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 if (S_ISFIFO(mode))
3000194c: 0afffff1 beq 30001918 <IMFS_mknod+0x60>
type = IMFS_FIFO;
else {
rtems_set_errno_and_return_minus_one( EINVAL );
30001950: eb003068 bl 3000daf8 <__errno> <== NOT EXECUTED
30001954: e3a03016 mov r3, #22 <== NOT EXECUTED
30001958: e5803000 str r3, [r0] <== NOT EXECUTED
3000195c: e3e00000 mvn r0, #0 <== NOT EXECUTED
30001960: eafffff5 b 3000193c <IMFS_mknod+0x84> <== NOT EXECUTED
* Figure out what type of IMFS node this is.
*/
if ( S_ISDIR(mode) )
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
type = IMFS_MEMORY_FILE;
30001964: e3a01005 mov r1, #5
30001968: eaffffea b 30001918 <IMFS_mknod+0x60>
/*
* Figure out what type of IMFS node this is.
*/
if ( S_ISDIR(mode) )
type = IMFS_DIRECTORY;
3000196c: e3a01001 mov r1, #1
30001970: eaffffe8 b 30001918 <IMFS_mknod+0x60>
mode,
&info
);
if ( !new_node )
rtems_set_errno_and_return_minus_one( ENOMEM );
30001974: eb00305f bl 3000daf8 <__errno>
30001978: e3a0300c mov r3, #12
3000197c: e5803000 str r3, [r0]
30001980: e3e00000 mvn r0, #0
30001984: eaffffec b 3000193c <IMFS_mknod+0x84>
30001988 <IMFS_mount>:
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
30001988: e5903008 ldr r3, [r0, #8]
#include <rtems/seterr.h>
int IMFS_mount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
3000198c: e52de004 push {lr} ; (str lr, [sp, #-4]!)
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
30001990: e593204c ldr r2, [r3, #76] ; 0x4c
30001994: e3520001 cmp r2, #1
30001998: 1a000002 bne 300019a8 <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;
3000199c: e583005c str r0, [r3, #92] ; 0x5c
return 0;
300019a0: e3a00000 mov r0, #0
}
300019a4: 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 );
300019a8: eb003052 bl 3000daf8 <__errno> <== NOT EXECUTED
300019ac: e3a03014 mov r3, #20 <== NOT EXECUTED
300019b0: e5803000 str r3, [r0] <== NOT EXECUTED
300019b4: e3e00000 mvn r0, #0 <== NOT EXECUTED
300019b8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
30003cd4 <IMFS_print_jnode>:
*/
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
30003cd4: e92d4030 push {r4, r5, lr}
#if defined(RTEMS_DEBUG)
assert( the_jnode );
#endif
fprintf(stdout, "%s", the_jnode->name );
30003cd8: e59f50f8 ldr r5, [pc, #248] ; 30003dd8 <IMFS_print_jnode+0x104>
*/
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
30003cdc: e1a04000 mov r4, r0
#if defined(RTEMS_DEBUG)
assert( the_jnode );
#endif
fprintf(stdout, "%s", the_jnode->name );
30003ce0: e5953000 ldr r3, [r5]
30003ce4: e280000c add r0, r0, #12
30003ce8: e5931008 ldr r1, [r3, #8]
30003cec: eb0037ab bl 30011ba0 <fputs>
switch( the_jnode->type ) {
30003cf0: e594204c ldr r2, [r4, #76] ; 0x4c
30003cf4: e2423001 sub r3, r2, #1
30003cf8: e3530006 cmp r3, #6
30003cfc: 979ff103 ldrls pc, [pc, r3, lsl #2]
30003d00: ea000023 b 30003d94 <IMFS_print_jnode+0xc0> <== NOT EXECUTED
30003d04: 30003da8 .word 0x30003da8 <== NOT EXECUTED
30003d08: 30003dbc .word 0x30003dbc <== NOT EXECUTED
30003d0c: 30003d20 .word 0x30003d20 <== NOT EXECUTED
30003d10: 30003d20 .word 0x30003d20 <== NOT EXECUTED
30003d14: 30003d58 .word 0x30003d58 <== NOT EXECUTED
30003d18: 30003d78 .word 0x30003d78 <== NOT EXECUTED
30003d1c: 30003d3c .word 0x30003d3c <== NOT EXECUTED
case IMFS_HARD_LINK:
fprintf(stdout, " links not printed\n" );
return;
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
30003d20: e5953000 ldr r3, [r5] <== NOT EXECUTED
30003d24: e59f00b0 ldr r0, [pc, #176] ; 30003ddc <IMFS_print_jnode+0x108><== NOT EXECUTED
30003d28: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED
30003d2c: e3a01001 mov r1, #1 <== NOT EXECUTED
30003d30: e3a02013 mov r2, #19 <== NOT EXECUTED
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
}
30003d34: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED
case IMFS_HARD_LINK:
fprintf(stdout, " links not printed\n" );
return;
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
30003d38: ea003ac9 b 30012864 <fwrite> <== NOT EXECUTED
return;
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
30003d3c: e5953000 ldr r3, [r5] <== NOT EXECUTED
30003d40: e59f0098 ldr r0, [pc, #152] ; 30003de0 <IMFS_print_jnode+0x10c><== NOT EXECUTED
30003d44: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED
30003d48: e3a01001 mov r1, #1 <== NOT EXECUTED
30003d4c: e3a02012 mov r2, #18 <== NOT EXECUTED
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
}
30003d50: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
return;
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
30003d54: ea003ac2 b 30012864 <fwrite> <== NOT EXECUTED
the_jnode->info.file.indirect,
the_jnode->info.file.doubly_indirect,
the_jnode->info.file.triply_indirect
);
#else
fprintf(stdout, " (file %" PRId32 ")",
30003d58: e5953000 ldr r3, [r5]
30003d5c: e59f1080 ldr r1, [pc, #128] ; 30003de4 <IMFS_print_jnode+0x110>
30003d60: e5930008 ldr r0, [r3, #8]
30003d64: e5942050 ldr r2, [r4, #80] ; 0x50
30003d68: eb003737 bl 30011a4c <fprintf>
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
30003d6c: e59f0074 ldr r0, [pc, #116] ; 30003de8 <IMFS_print_jnode+0x114>
}
30003d70: e8bd4030 pop {r4, r5, lr}
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
30003d74: ea003eb5 b 30013850 <puts>
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
the_jnode->info.device.major, the_jnode->info.device.minor );
break;
case IMFS_LINEAR_FILE:
fprintf(stdout, " (file %" PRId32 " %p)",
30003d78: e5953000 ldr r3, [r5] <== NOT EXECUTED
30003d7c: e59f1068 ldr r1, [pc, #104] ; 30003dec <IMFS_print_jnode+0x118><== NOT EXECUTED
30003d80: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED
30003d84: e5942050 ldr r2, [r4, #80] ; 0x50 <== NOT EXECUTED
30003d88: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED
30003d8c: eb00372e bl 30011a4c <fprintf> <== NOT EXECUTED
(uint32_t)the_jnode->info.linearfile.size,
the_jnode->info.linearfile.direct
);
break;
30003d90: eafffff5 b 30003d6c <IMFS_print_jnode+0x98> <== NOT EXECUTED
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
return;
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
30003d94: e5953000 ldr r3, [r5] <== NOT EXECUTED
30003d98: e59f1050 ldr r1, [pc, #80] ; 30003df0 <IMFS_print_jnode+0x11c><== NOT EXECUTED
30003d9c: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED
return;
}
puts("");
}
30003da0: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
return;
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
30003da4: ea003728 b 30011a4c <fprintf> <== NOT EXECUTED
#endif
fprintf(stdout, "%s", the_jnode->name );
switch( the_jnode->type ) {
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
30003da8: e5953000 ldr r3, [r5]
30003dac: e3a0002f mov r0, #47 ; 0x2f
30003db0: e5931008 ldr r1, [r3, #8]
30003db4: eb003744 bl 30011acc <fputc>
break;
30003db8: eaffffeb b 30003d6c <IMFS_print_jnode+0x98>
case IMFS_DEVICE:
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
30003dbc: e5953000 ldr r3, [r5]
30003dc0: e59f102c ldr r1, [pc, #44] ; 30003df4 <IMFS_print_jnode+0x120>
30003dc4: e5930008 ldr r0, [r3, #8]
30003dc8: e5942050 ldr r2, [r4, #80] ; 0x50
30003dcc: e5943054 ldr r3, [r4, #84] ; 0x54
30003dd0: eb00371d bl 30011a4c <fprintf>
the_jnode->info.device.major, the_jnode->info.device.minor );
break;
30003dd4: eaffffe4 b 30003d6c <IMFS_print_jnode+0x98>
300019c8 <IMFS_readlink>:
)
{
IMFS_jnode_t *node;
int i;
node = loc->node_access;
300019c8: e5903000 ldr r3, [r0]
int IMFS_readlink(
rtems_filesystem_location_info_t *loc,
char *buf, /* OUT */
size_t bufsize
)
{
300019cc: e92d4010 push {r4, lr}
IMFS_jnode_t *node;
int i;
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
300019d0: e593004c ldr r0, [r3, #76] ; 0x4c
300019d4: e3500004 cmp r0, #4
300019d8: 1a000014 bne 30001a30 <IMFS_readlink+0x68>
rtems_set_errno_and_return_minus_one( EINVAL );
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
300019dc: e3520000 cmp r2, #0
300019e0: 0a000010 beq 30001a28 <IMFS_readlink+0x60>
300019e4: e5930050 ldr r0, [r3, #80] ; 0x50
300019e8: e5d0c000 ldrb ip, [r0]
300019ec: e35c0000 cmp ip, #0
300019f0: 01a0000c moveq r0, ip
300019f4: 08bd8010 popeq {r4, pc}
300019f8: e3a04000 mov r4, #0
300019fc: e1a00004 mov r0, r4
30001a00: e2800001 add r0, r0, #1
30001a04: e1520000 cmp r2, r0
buf[i] = node->info.sym_link.name[i];
30001a08: e7c1c004 strb ip, [r1, r4]
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++ )
30001a0c: e1a04000 mov r4, r0
30001a10: 98bd8010 popls {r4, pc}
30001a14: e593c050 ldr ip, [r3, #80] ; 0x50
30001a18: e7dcc000 ldrb ip, [ip, r0]
30001a1c: e35c0000 cmp ip, #0
30001a20: 1afffff6 bne 30001a00 <IMFS_readlink+0x38>
30001a24: e8bd8010 pop {r4, pc}
30001a28: e1a00002 mov r0, r2 <== NOT EXECUTED
buf[i] = node->info.sym_link.name[i];
return i;
}
30001a2c: 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 );
30001a30: eb003030 bl 3000daf8 <__errno> <== NOT EXECUTED
30001a34: e3a03016 mov r3, #22 <== NOT EXECUTED
30001a38: e5803000 str r3, [r0] <== NOT EXECUTED
30001a3c: e3e00000 mvn r0, #0 <== NOT EXECUTED
30001a40: e8bd8010 pop {r4, pc} <== NOT EXECUTED
30009ebc <IMFS_stat>:
{
IMFS_fs_info_t *fs_info;
IMFS_jnode_t *the_jnode;
IMFS_device_t *io;
the_jnode = loc->node_access;
30009ebc: e5903000 ldr r3, [r0]
int IMFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
30009ec0: e92d40f0 push {r4, r5, r6, r7, lr}
IMFS_device_t *io;
the_jnode = loc->node_access;
switch ( the_jnode->type ) {
30009ec4: e593204c ldr r2, [r3, #76] ; 0x4c
30009ec8: e2422002 sub r2, r2, #2
30009ecc: e3520005 cmp r2, #5
30009ed0: 979ff102 ldrls pc, [pc, r2, lsl #2]
30009ed4: ea000026 b 30009f74 <IMFS_stat+0xb8> <== NOT EXECUTED
30009ed8: 30009f60 .word 0x30009f60 <== NOT EXECUTED
30009edc: 30009f74 .word 0x30009f74 <== NOT EXECUTED
30009ee0: 30009ef0 .word 0x30009ef0 <== NOT EXECUTED
30009ee4: 30009f88 .word 0x30009f88 <== NOT EXECUTED
30009ee8: 30009f88 .word 0x30009f88 <== NOT EXECUTED
30009eec: 30009ef0 .word 0x30009ef0 <== NOT EXECUTED
case IMFS_SYM_LINK:
buf->st_size = 0;
break;
case IMFS_FIFO:
buf->st_size = 0;
30009ef0: e3a04000 mov r4, #0
30009ef4: e3a05000 mov r5, #0
30009ef8: e5814020 str r4, [r1, #32]
30009efc: e5815024 str r5, [r1, #36] ; 0x24
/*
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
30009f00: e5902010 ldr r2, [r0, #16]
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
30009f04: e1d373b4 ldrh r7, [r3, #52] ; 0x34
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
30009f08: e5922034 ldr r2, [r2, #52] ; 0x34
buf->st_ino = the_jnode->st_ino;
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
30009f0c: e5930044 ldr r0, [r3, #68] ; 0x44
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
30009f10: e5935030 ldr r5, [r3, #48] ; 0x30
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
30009f14: e5934038 ldr r4, [r3, #56] ; 0x38
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
30009f18: e5926000 ldr r6, [r2]
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
30009f1c: e593c040 ldr ip, [r3, #64] ; 0x40
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
30009f20: e5932048 ldr r2, [r3, #72] ; 0x48
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
30009f24: e1c171b0 strh r7, [r1, #16]
/*
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
30009f28: e59f706c ldr r7, [pc, #108] ; 30009f9c <IMFS_stat+0xe0>
30009f2c: e5817000 str r7, [r1]
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
buf->st_uid = the_jnode->st_uid;
30009f30: e1d373bc ldrh r7, [r3, #60] ; 0x3c
buf->st_gid = the_jnode->st_gid;
30009f34: e1d333be ldrh r3, [r3, #62] ; 0x3e
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
buf->st_uid = the_jnode->st_uid;
30009f38: e1c171b2 strh r7, [r1, #18]
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
30009f3c: e5810030 str r0, [r1, #48] ; 0x30
/*
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
30009f40: e5816004 str r6, [r1, #4]
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
30009f44: e1c131b4 strh r3, [r1, #20]
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
30009f48: e581500c str r5, [r1, #12]
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
30009f4c: e5814008 str r4, [r1, #8]
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
30009f50: e581c028 str ip, [r1, #40] ; 0x28
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
30009f54: e5812038 str r2, [r1, #56] ; 0x38
return 0;
30009f58: e3a00000 mov r0, #0
}
30009f5c: e8bd80f0 pop {r4, r5, r6, r7, pc}
switch ( the_jnode->type ) {
case IMFS_DEVICE:
io = &the_jnode->info.device;
buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
30009f60: e593c054 ldr ip, [r3, #84] ; 0x54
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
30009f64: e5932050 ldr r2, [r3, #80] ; 0x50
30009f68: e581c01c str ip, [r1, #28]
30009f6c: e5812018 str r2, [r1, #24]
break;
30009f70: eaffffe2 b 30009f00 <IMFS_stat+0x44>
case IMFS_FIFO:
buf->st_size = 0;
break;
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
30009f74: eb000edf bl 3000daf8 <__errno> <== NOT EXECUTED
30009f78: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
30009f7c: e5803000 str r3, [r0] <== NOT EXECUTED
30009f80: e3e00000 mvn r0, #0 <== NOT EXECUTED
30009f84: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
break;
case IMFS_LINEAR_FILE:
case IMFS_MEMORY_FILE:
buf->st_size = the_jnode->info.file.size;
30009f88: e2835050 add r5, r3, #80 ; 0x50
30009f8c: e8950030 ldm r5, {r4, r5}
30009f90: e5814020 str r4, [r1, #32]
30009f94: e5815024 str r5, [r1, #36] ; 0x24
break;
30009f98: eaffffd8 b 30009f00 <IMFS_stat+0x44>
30001aa8 <IMFS_symlink>:
int IMFS_symlink(
rtems_filesystem_location_info_t *parent_loc,
const char *link_name,
const char *node_name
)
{
30001aa8: e92d40f0 push {r4, r5, r6, r7, lr}
30001aac: e1a06000 mov r6, r0
30001ab0: e24dd040 sub sp, sp, #64 ; 0x40
int i;
/*
* Remove any separators at the end of the string.
*/
IMFS_get_token( node_name, strlen( node_name ), new_name, &i );
30001ab4: e1a00002 mov r0, r2
int IMFS_symlink(
rtems_filesystem_location_info_t *parent_loc,
const char *link_name,
const char *node_name
)
{
30001ab8: e1a07002 mov r7, r2
30001abc: e1a05001 mov r5, r1
int i;
/*
* Remove any separators at the end of the string.
*/
IMFS_get_token( node_name, strlen( node_name ), new_name, &i );
30001ac0: eb0033fc bl 3000eab8 <strlen>
30001ac4: e28d4004 add r4, sp, #4
30001ac8: e1a01000 mov r1, r0
30001acc: e1a02004 mov r2, r4
30001ad0: e28d303c add r3, sp, #60 ; 0x3c
30001ad4: e1a00007 mov r0, r7
30001ad8: eb00208c bl 30009d10 <IMFS_get_token>
/*
* Duplicate link name
*/
info.sym_link.name = strdup(link_name);
30001adc: e1a00005 mov r0, r5
30001ae0: eb0033e0 bl 3000ea68 <strdup>
if (info.sym_link.name == NULL) {
30001ae4: e3500000 cmp r0, #0
IMFS_get_token( node_name, strlen( node_name ), new_name, &i );
/*
* Duplicate link name
*/
info.sym_link.name = strdup(link_name);
30001ae8: e58d0028 str r0, [sp, #40] ; 0x28
if (info.sym_link.name == NULL) {
30001aec: 0a00000d beq 30001b28 <IMFS_symlink+0x80>
new_node = IMFS_create_node(
parent_loc,
IMFS_SYM_LINK,
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
30001af0: e28d3028 add r3, sp, #40 ; 0x28
* was ONLY passed a NULL when we created the root node. We
* added a new IMFS_create_root_node() so this path no longer
* existed. The result was simpler code which should not have
* this path.
*/
new_node = IMFS_create_node(
30001af4: e58d3000 str r3, [sp]
30001af8: e3a01004 mov r1, #4
30001afc: e1a00006 mov r0, r6
30001b00: e1a02004 mov r2, r4
30001b04: e59f3030 ldr r3, [pc, #48] ; 30001b3c <IMFS_symlink+0x94>
30001b08: eb001dd1 bl 30009254 <IMFS_create_node>
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if (new_node == NULL) {
30001b0c: e3500000 cmp r0, #0
free(info.sym_link.name);
rtems_set_errno_and_return_minus_one(ENOMEM);
}
return 0;
30001b10: 13a00000 movne r0, #0
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if (new_node == NULL) {
30001b14: 0a000001 beq 30001b20 <IMFS_symlink+0x78>
free(info.sym_link.name);
rtems_set_errno_and_return_minus_one(ENOMEM);
}
return 0;
}
30001b18: e28dd040 add sp, sp, #64 ; 0x40
30001b1c: e8bd80f0 pop {r4, r5, r6, r7, pc}
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if (new_node == NULL) {
free(info.sym_link.name);
30001b20: e59d0028 ldr r0, [sp, #40] ; 0x28 <== NOT EXECUTED
30001b24: eb00015f bl 300020a8 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
30001b28: eb002ff2 bl 3000daf8 <__errno> <== NOT EXECUTED
30001b2c: e3a0300c mov r3, #12 <== NOT EXECUTED
30001b30: e5803000 str r3, [r0] <== NOT EXECUTED
30001b34: e3e00000 mvn r0, #0 <== NOT EXECUTED
30001b38: eafffff6 b 30001b18 <IMFS_symlink+0x70> <== NOT EXECUTED
30001b40 <IMFS_unlink>:
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
30001b40: e92d41f0 push {r4, r5, r6, r7, r8, lr}
IMFS_jnode_t *node;
rtems_filesystem_location_info_t the_link;
int result = 0;
node = loc->node_access;
30001b44: e5915000 ldr r5, [r1]
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
30001b48: e24dd01c sub sp, sp, #28
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
30001b4c: e595304c ldr r3, [r5, #76] ; 0x4c
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
30001b50: e1a04001 mov r4, r1
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
30001b54: e3530003 cmp r3, #3
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
30001b58: e1a06000 mov r6, r0
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
30001b5c: 0a000006 beq 30001b7c <IMFS_unlink+0x3c>
/*
* Now actually free the node we were asked to free.
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
30001b60: e5943008 ldr r3, [r4, #8]
30001b64: e1a00006 mov r0, r6
30001b68: e1a01004 mov r1, r4
30001b6c: e1a0e00f mov lr, pc
30001b70: e593f034 ldr pc, [r3, #52] ; 0x34
return result;
}
30001b74: e28dd01c add sp, sp, #28
30001b78: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
30001b7c: e595e050 ldr lr, [r5, #80] ; 0x50
30001b80: e35e0000 cmp lr, #0
30001b84: 0a00001f beq 30001c08 <IMFS_unlink+0xc8>
rtems_set_errno_and_return_minus_one( EINVAL );
the_link = *loc;
30001b88: e1a0c00d mov ip, sp
30001b8c: e1a07001 mov r7, r1
30001b90: e8b7000f ldm r7!, {r0, r1, r2, r3}
30001b94: e8ac000f stmia ip!, {r0, r1, r2, r3}
30001b98: e5973000 ldr r3, [r7]
the_link.node_access = node->info.hard_link.link_node;
30001b9c: e28d801c add r8, sp, #28
IMFS_Set_handlers( &the_link );
30001ba0: e1a0000d mov r0, sp
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
rtems_set_errno_and_return_minus_one( EINVAL );
the_link = *loc;
30001ba4: e58c3000 str r3, [ip]
the_link.node_access = node->info.hard_link.link_node;
30001ba8: e528e01c str lr, [r8, #-28]!
IMFS_Set_handlers( &the_link );
30001bac: eb001e09 bl 300093d8 <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)
30001bb0: e5953050 ldr r3, [r5, #80] ; 0x50
30001bb4: e1d323b4 ldrh r2, [r3, #52] ; 0x34
30001bb8: e3520001 cmp r2, #1
30001bbc: 0a000008 beq 30001be4 <IMFS_unlink+0xa4>
if ( result != 0 )
return -1;
}
else
{
node->info.hard_link.link_node->st_nlink --;
30001bc0: e2422001 sub r2, r2, #1
30001bc4: e1c323b4 strh r2, [r3, #52] ; 0x34
IMFS_update_ctime( node->info.hard_link.link_node );
30001bc8: e28d0014 add r0, sp, #20
30001bcc: e3a01000 mov r1, #0
30001bd0: eb00015d bl 3000214c <gettimeofday>
30001bd4: e5953050 ldr r3, [r5, #80] ; 0x50
30001bd8: e59d2014 ldr r2, [sp, #20]
30001bdc: e5832048 str r2, [r3, #72] ; 0x48
30001be0: eaffffde b 30001b60 <IMFS_unlink+0x20>
* to remove the node that is a link and the node itself.
*/
if ( node->info.hard_link.link_node->st_nlink == 1)
{
result = (*the_link.handlers->rmnod_h)( parentloc, &the_link );
30001be4: e1a00006 mov r0, r6
30001be8: e1a0100d mov r1, sp
30001bec: e59d3008 ldr r3, [sp, #8]
30001bf0: e1a0e00f mov lr, pc
30001bf4: e593f034 ldr pc, [r3, #52] ; 0x34
if ( result != 0 )
30001bf8: e3500000 cmp r0, #0
30001bfc: 0affffd7 beq 30001b60 <IMFS_unlink+0x20>
return -1;
30001c00: e3e00000 mvn r0, #0
30001c04: eaffffda b 30001b74 <IMFS_unlink+0x34>
*/
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
rtems_set_errno_and_return_minus_one( EINVAL );
30001c08: eb002fba bl 3000daf8 <__errno> <== NOT EXECUTED
30001c0c: e3a03016 mov r3, #22 <== NOT EXECUTED
30001c10: e5803000 str r3, [r0] <== NOT EXECUTED
30001c14: e3e00000 mvn r0, #0 <== NOT EXECUTED
30001c18: eaffffd5 b 30001b74 <IMFS_unlink+0x34> <== NOT EXECUTED
30001c1c <IMFS_unmount>:
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
30001c1c: e5903008 ldr r3, [r0, #8]
#include <rtems/seterr.h>
int IMFS_unmount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
30001c20: e52de004 push {lr} ; (str lr, [sp, #-4]!)
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
30001c24: e593204c ldr r2, [r3, #76] ; 0x4c
30001c28: e3520001 cmp r2, #1
30001c2c: 1a000005 bne 30001c48 <IMFS_unmount+0x2c>
/*
* Did the node indicate that there was a directory mounted here?
*/
if ( node->info.directory.mt_fs == NULL )
30001c30: e593205c ldr r2, [r3, #92] ; 0x5c
30001c34: e3520000 cmp r2, #0
30001c38: 0a000007 beq 30001c5c <IMFS_unmount+0x40>
/*
* 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;
30001c3c: e3a00000 mov r0, #0
30001c40: e583005c str r0, [r3, #92] ; 0x5c
return 0;
}
30001c44: 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 );
30001c48: eb002faa bl 3000daf8 <__errno> <== NOT EXECUTED
30001c4c: e3a03014 mov r3, #20 <== NOT EXECUTED
30001c50: e5803000 str r3, [r0] <== NOT EXECUTED
30001c54: e3e00000 mvn r0, #0 <== NOT EXECUTED
30001c58: 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 */
30001c5c: eb002fa5 bl 3000daf8 <__errno> <== NOT EXECUTED
30001c60: e3a03016 mov r3, #22 <== NOT EXECUTED
30001c64: e5803000 str r3, [r0] <== NOT EXECUTED
30001c68: e3e00000 mvn r0, #0 <== NOT EXECUTED
30001c6c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
300016a4 <Stack_check_Dump_threads_usage>:
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
300016a4: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} <== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark );
else
used = 0;
if ( the_thread ) {
(*print_handler)(
300016a8: e5908008 ldr r8, [r0, #8] <== NOT EXECUTED
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
300016ac: e24dd010 sub sp, sp, #16 <== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark );
else
used = 0;
if ( the_thread ) {
(*print_handler)(
300016b0: e59f4078 ldr r4, [pc, #120] ; 30001730 <Stack_check_Dump_threads_usage+0x8c><== NOT EXECUTED
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
300016b4: e1a05000 mov r5, r0 <== NOT EXECUTED
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
#endif
low = Stack_check_usable_stack_start(stack);
size = Stack_check_usable_stack_size(stack);
300016b8: e59090c4 ldr r9, [r0, #196] ; 0xc4 <== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark );
else
used = 0;
if ( the_thread ) {
(*print_handler)(
300016bc: e28d2008 add r2, sp, #8 <== NOT EXECUTED
300016c0: e1a00008 mov r0, r8 <== NOT EXECUTED
300016c4: e3a01005 mov r1, #5 <== NOT EXECUTED
300016c8: e594a004 ldr sl, [r4, #4] <== NOT EXECUTED
current = 0;
} else
#else
{
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
300016cc: e59560f4 ldr r6, [r5, #244] ; 0xf4 <== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark );
else
used = 0;
if ( the_thread ) {
(*print_handler)(
300016d0: e5947000 ldr r7, [r4] <== NOT EXECUTED
300016d4: eb001018 bl 3000573c <rtems_object_get_name> <== NOT EXECUTED
300016d8: e1a02008 mov r2, r8 <== NOT EXECUTED
300016dc: e1a03000 mov r3, r0 <== NOT EXECUTED
300016e0: e59f104c ldr r1, [pc, #76] ; 30001734 <Stack_check_Dump_threads_usage+0x90><== NOT EXECUTED
300016e4: e1a0000a mov r0, sl <== NOT EXECUTED
300016e8: e1a0e00f mov lr, pc <== NOT EXECUTED
300016ec: e12fff17 bx r7 <== NOT EXECUTED
(*print_handler)(
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
300016f0: e59530c4 ldr r3, [r5, #196] ; 0xc4 <== NOT EXECUTED
300016f4: e59520c8 ldr r2, [r5, #200] ; 0xc8 <== NOT EXECUTED
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
#endif
low = Stack_check_usable_stack_start(stack);
size = Stack_check_usable_stack_size(stack);
300016f8: e2499010 sub r9, r9, #16 <== NOT EXECUTED
(*print_handler)(
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
300016fc: e2433001 sub r3, r3, #1 <== NOT EXECUTED
);
} else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
(*print_handler)(
30001700: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED
30001704: e88d0240 stm sp, {r6, r9} <== NOT EXECUTED
30001708: e59f1028 ldr r1, [pc, #40] ; 30001738 <Stack_check_Dump_threads_usage+0x94><== NOT EXECUTED
3000170c: e0823003 add r3, r2, r3 <== NOT EXECUTED
30001710: e1a0e00f mov lr, pc <== NOT EXECUTED
30001714: e594f000 ldr pc, [r4] <== NOT EXECUTED
current,
size
);
if (Stack_check_Initialized == 0) {
(*print_handler)( print_context, "Unavailable\n" );
30001718: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED
3000171c: e59f1018 ldr r1, [pc, #24] ; 3000173c <Stack_check_Dump_threads_usage+0x98><== NOT EXECUTED
30001720: e1a0e00f mov lr, pc <== NOT EXECUTED
30001724: e594f000 ldr pc, [r4] <== NOT EXECUTED
} else {
(*print_handler)( print_context, "%8" PRId32 "\n", used );
}
}
30001728: e28dd010 add sp, sp, #16 <== NOT EXECUTED
3000172c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
30001740 <Stack_check_Initialize>:
Stack_check_Dope_stack(&Stack_check_Interrupt_stack);
}
#endif
Stack_check_Initialized = 1;
}
30001740: e12fff1e bx lr <== NOT EXECUTED
30001788 <Stack_check_report_blown_task>:
Thread_Control *running,
bool pattern_ok
) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok)
{
30001788: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
3000178c: e1a06000 mov r6, r0 <== NOT EXECUTED
30001790: e24dd020 sub sp, sp, #32 <== NOT EXECUTED
Stack_Control *stack = &running->Start.Initial_stack;
void *pattern_area = Stack_check_Get_pattern_area(stack);
char name [32];
printk("BLOWN STACK!!!\n");
30001794: e59f0084 ldr r0, [pc, #132] ; 30001820 <Stack_check_report_blown_task+0x98><== NOT EXECUTED
Thread_Control *running,
bool pattern_ok
) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok)
{
30001798: e20140ff and r4, r1, #255 ; 0xff <== NOT EXECUTED
Stack_Control *stack = &running->Start.Initial_stack;
void *pattern_area = Stack_check_Get_pattern_area(stack);
3000179c: e59650c8 ldr r5, [r6, #200] ; 0xc8 <== NOT EXECUTED
char name [32];
printk("BLOWN STACK!!!\n");
300017a0: eb00066b bl 30003154 <printk> <== NOT EXECUTED
printk("task control block: 0x%08" PRIxPTR "\n", running);
300017a4: e59f0078 ldr r0, [pc, #120] ; 30001824 <Stack_check_report_blown_task+0x9c><== NOT EXECUTED
300017a8: e1a01006 mov r1, r6 <== NOT EXECUTED
300017ac: eb000668 bl 30003154 <printk> <== NOT EXECUTED
printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id);
300017b0: e59f0070 ldr r0, [pc, #112] ; 30001828 <Stack_check_report_blown_task+0xa0><== NOT EXECUTED
300017b4: e5961008 ldr r1, [r6, #8] <== NOT EXECUTED
300017b8: eb000665 bl 30003154 <printk> <== NOT EXECUTED
printk(
300017bc: e59f0068 ldr r0, [pc, #104] ; 3000182c <Stack_check_report_blown_task+0xa4><== NOT EXECUTED
300017c0: e596100c ldr r1, [r6, #12] <== NOT EXECUTED
300017c4: eb000662 bl 30003154 <printk> <== NOT EXECUTED
"task name: 0x%08" PRIx32 "\n",
running->Object.name.name_u32
);
printk(
300017c8: e1a0200d mov r2, sp <== NOT EXECUTED
300017cc: e3a01020 mov r1, #32 <== NOT EXECUTED
300017d0: e5960008 ldr r0, [r6, #8] <== NOT EXECUTED
300017d4: eb000fd8 bl 3000573c <rtems_object_get_name> <== NOT EXECUTED
300017d8: e1a01000 mov r1, r0 <== NOT EXECUTED
300017dc: e59f004c ldr r0, [pc, #76] ; 30001830 <Stack_check_report_blown_task+0xa8><== NOT EXECUTED
300017e0: eb00065b bl 30003154 <printk> <== NOT EXECUTED
);
printk(
"task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n",
(unsigned long) stack->size,
stack->area,
((char *) stack->area + stack->size)
300017e4: e59620c8 ldr r2, [r6, #200] ; 0xc8 <== NOT EXECUTED
300017e8: e59610c4 ldr r1, [r6, #196] ; 0xc4 <== NOT EXECUTED
);
printk(
"task name string: %s\n",
rtems_object_get_name(running->Object.id, sizeof(name), name)
);
printk(
300017ec: e59f0040 ldr r0, [pc, #64] ; 30001834 <Stack_check_report_blown_task+0xac><== NOT EXECUTED
300017f0: e0823001 add r3, r2, r1 <== NOT EXECUTED
300017f4: eb000656 bl 30003154 <printk> <== NOT EXECUTED
"task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n",
(unsigned long) stack->size,
stack->area,
((char *) stack->area + stack->size)
);
if (!pattern_ok) {
300017f8: e3540000 cmp r4, #0 <== NOT EXECUTED
300017fc: 0a000001 beq 30001808 <Stack_check_report_blown_task+0x80> <== NOT EXECUTED
rtems_configuration_get_user_multiprocessing_table()->node
);
}
#endif
rtems_fatal_error_occurred(0x81);
30001800: e3a00081 mov r0, #129 ; 0x81 <== NOT EXECUTED
30001804: eb0011f4 bl 30005fdc <rtems_fatal_error_occurred> <== NOT EXECUTED
(unsigned long) stack->size,
stack->area,
((char *) stack->area + stack->size)
);
if (!pattern_ok) {
printk(
30001808: e59f0028 ldr r0, [pc, #40] ; 30001838 <Stack_check_report_blown_task+0xb0><== NOT EXECUTED
3000180c: e3a01010 mov r1, #16 <== NOT EXECUTED
30001810: e2852008 add r2, r5, #8 <== NOT EXECUTED
30001814: e2853018 add r3, r5, #24 <== NOT EXECUTED
30001818: eb00064d bl 30003154 <printk> <== NOT EXECUTED
3000181c: eafffff7 b 30001800 <Stack_check_report_blown_task+0x78> <== NOT EXECUTED
30016d90 <_CORE_message_queue_Broadcast>:
{
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
30016d90: e590304c ldr r3, [r0, #76] ; 0x4c
Objects_Id id __attribute__((unused)),
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)),
#endif
uint32_t *count
)
{
30016d94: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
30016d98: e1530002 cmp r3, r2
Objects_Id id __attribute__((unused)),
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)),
#endif
uint32_t *count
)
{
30016d9c: e1a07000 mov r7, r0
30016da0: e1a05002 mov r5, r2
30016da4: e1a08001 mov r8, r1
30016da8: e59da020 ldr sl, [sp, #32]
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
30016dac: 3a000016 bcc 30016e0c <_CORE_message_queue_Broadcast+0x7c>
* 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 ) {
30016db0: e5906048 ldr r6, [r0, #72] ; 0x48
30016db4: e3560000 cmp r6, #0
*count = 0;
30016db8: 13a00000 movne r0, #0
30016dbc: 158a0000 strne r0, [sl]
* 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 ) {
30016dc0: 18bd85f0 popne {r4, r5, r6, r7, r8, sl, pc}
/*
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
30016dc4: e1a00007 mov r0, r7
30016dc8: eb000a5c bl 30019740 <_Thread_queue_Dequeue>
30016dcc: e2504000 subs r4, r0, #0
30016dd0: 0a00000a beq 30016e00 <_CORE_message_queue_Broadcast+0x70>
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
30016dd4: e594002c ldr r0, [r4, #44] ; 0x2c
30016dd8: e1a01008 mov r1, r8
30016ddc: e1a02005 mov r2, r5
30016de0: eb002460 bl 3001ff68 <memcpy>
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
30016de4: e5943028 ldr r3, [r4, #40] ; 0x28
/*
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
30016de8: e1a00007 mov r0, r7
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
30016dec: e5835000 str r5, [r3]
/*
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
30016df0: eb000a52 bl 30019740 <_Thread_queue_Dequeue>
30016df4: e2504000 subs r4, r0, #0
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
waitp = &the_thread->Wait;
number_broadcasted += 1;
30016df8: e2866001 add r6, r6, #1
/*
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
30016dfc: 1afffff4 bne 30016dd4 <_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;
30016e00: e58a6000 str r6, [sl]
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
30016e04: e1a00004 mov r0, r4
30016e08: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
return CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE;
30016e0c: e3a00001 mov r0, #1 <== NOT EXECUTED
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
30016e10: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
3000b570 <_Chain_Initialize>:
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
while ( count-- ) {
3000b570: e3520000 cmp r2, #0
Chain_Node *current;
Chain_Node *next;
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
3000b574: e3a0c000 mov ip, #0
Chain_Control *the_chain,
void *starting_address,
size_t number_nodes,
size_t node_size
)
{
3000b578: e92d0070 push {r4, r5, r6}
Chain_Node *current;
Chain_Node *next;
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
3000b57c: e580c004 str ip, [r0, #4]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head(
Chain_Control *the_chain
)
{
return (Chain_Node *) the_chain;
3000b580: e1a04000 mov r4, r0
next = starting_address;
3000b584: 11a05002 movne r5, r2
3000b588: 11a0c001 movne ip, r1
while ( count-- ) {
3000b58c: 1a000002 bne 3000b59c <_Chain_Initialize+0x2c>
3000b590: ea000008 b 3000b5b8 <_Chain_Initialize+0x48> <== NOT EXECUTED
3000b594: e1a0400c mov r4, ip
current->next = next;
next->previous = current;
current = next;
next = (Chain_Node *)
3000b598: e1a0c006 mov ip, r6
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
while ( count-- ) {
3000b59c: e2555001 subs r5, r5, #1
current->next = next;
3000b5a0: e584c000 str ip, [r4]
next->previous = current;
3000b5a4: e58c4004 str r4, [ip, #4]
* node_size - size of node in bytes
*
* Output parameters: NONE
*/
void _Chain_Initialize(
3000b5a8: e08c6003 add r6, ip, r3
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
while ( count-- ) {
3000b5ac: 1afffff8 bne 3000b594 <_Chain_Initialize+0x24>
* node_size - size of node in bytes
*
* Output parameters: NONE
*/
void _Chain_Initialize(
3000b5b0: e2422001 sub r2, r2, #1
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
while ( count-- ) {
3000b5b4: e0241293 mla r4, r3, r2, r1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
3000b5b8: e2803004 add r3, r0, #4
next->previous = current;
current = next;
next = (Chain_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
current->next = _Chain_Tail( the_chain );
3000b5bc: e5843000 str r3, [r4]
the_chain->last = current;
3000b5c0: e5804008 str r4, [r0, #8]
}
3000b5c4: e8bd0070 pop {r4, r5, r6}
3000b5c8: e12fff1e bx lr
3000b7ac <_Heap_Allocate_aligned_with_boundary>:
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
3000b7ac: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
3000b7b0: e1a08002 mov r8, r2
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
Heap_Block *block = _Heap_Free_list_first( heap );
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
- HEAP_BLOCK_SIZE_OFFSET;
uintptr_t const page_size = heap->page_size;
3000b7b4: e5902010 ldr r2, [r0, #16]
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
3000b7b8: e24dd01c sub sp, sp, #28
3000b7bc: e1a05001 mov r5, r1
- HEAP_BLOCK_SIZE_OFFSET;
uintptr_t const page_size = heap->page_size;
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
if ( block_size_floor < alloc_size ) {
3000b7c0: e2911004 adds r1, r1, #4
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
3000b7c4: e1a07000 mov r7, r0
- HEAP_BLOCK_SIZE_OFFSET;
uintptr_t const page_size = heap->page_size;
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
if ( block_size_floor < alloc_size ) {
3000b7c8: e58d1000 str r1, [sp]
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
3000b7cc: e1a0b003 mov fp, r3
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
3000b7d0: e5909008 ldr r9, [r0, #8]
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
Heap_Block *block = _Heap_Free_list_first( heap );
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
- HEAP_BLOCK_SIZE_OFFSET;
uintptr_t const page_size = heap->page_size;
3000b7d4: e58d200c str r2, [sp, #12]
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
if ( block_size_floor < alloc_size ) {
3000b7d8: 2a000073 bcs 3000b9ac <_Heap_Allocate_aligned_with_boundary+0x200>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
3000b7dc: e3530000 cmp r3, #0
3000b7e0: 1a00006f bne 3000b9a4 <_Heap_Allocate_aligned_with_boundary+0x1f8>
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
3000b7e4: e1570009 cmp r7, r9
3000b7e8: 0a00006f beq 3000b9ac <_Heap_Allocate_aligned_with_boundary+0x200>
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
3000b7ec: e59d300c ldr r3, [sp, #12]
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
3000b7f0: e2651004 rsb r1, r5, #4
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
3000b7f4: e2833007 add r3, r3, #7
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
3000b7f8: e3a06000 mov r6, #0
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
3000b7fc: e58d3010 str r3, [sp, #16]
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
3000b800: e58d1014 str r1, [sp, #20]
/*
* The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag
* field. Thus the value is about one unit larger than the real block
* size. The greater than operator takes this into account.
*/
if ( block->size_and_flag > block_size_floor ) {
3000b804: e599a004 ldr sl, [r9, #4]
3000b808: e59d2000 ldr r2, [sp]
while ( block != free_list_tail ) {
_HAssert( _Heap_Is_prev_used( block ) );
/* Statistics */
++search_count;
3000b80c: e2866001 add r6, r6, #1
/*
* The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag
* field. Thus the value is about one unit larger than the real block
* size. The greater than operator takes this into account.
*/
if ( block->size_and_flag > block_size_floor ) {
3000b810: e152000a cmp r2, sl
3000b814: 2a00004f bcs 3000b958 <_Heap_Allocate_aligned_with_boundary+0x1ac>
if ( alignment == 0 ) {
3000b818: e3580000 cmp r8, #0
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
3000b81c: 02894008 addeq r4, r9, #8
3000b820: 0a00004a beq 3000b950 <_Heap_Allocate_aligned_with_boundary+0x1a4>
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
3000b824: e5973014 ldr r3, [r7, #20]
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
3000b828: e59d1014 ldr r1, [sp, #20]
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
3000b82c: e59d2010 ldr r2, [sp, #16]
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
3000b830: e3caa001 bic sl, sl, #1
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
3000b834: e089a00a add sl, r9, sl
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
3000b838: e081400a add r4, r1, sl
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
3000b83c: e58d3004 str r3, [sp, #4]
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
3000b840: e0633002 rsb r3, r3, r2
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
3000b844: e1a00004 mov r0, r4
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
3000b848: e083a00a add sl, r3, sl
3000b84c: e1a01008 mov r1, r8
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
3000b850: e2893008 add r3, r9, #8
3000b854: e58d3008 str r3, [sp, #8]
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
3000b858: eb00169b bl 300112cc <__umodsi3>
3000b85c: e0604004 rsb r4, r0, r4
uintptr_t alloc_begin = alloc_end - alloc_size;
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
/* Ensure that the we have a valid new block at the end */
if ( alloc_begin > alloc_begin_ceiling ) {
3000b860: e15a0004 cmp sl, r4
3000b864: 2a000003 bcs 3000b878 <_Heap_Allocate_aligned_with_boundary+0xcc>
3000b868: e1a0000a mov r0, sl
3000b86c: e1a01008 mov r1, r8
3000b870: eb001695 bl 300112cc <__umodsi3>
3000b874: e060400a rsb r4, r0, sl
}
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
3000b878: e35b0000 cmp fp, #0
3000b87c: 0a000025 beq 3000b918 <_Heap_Allocate_aligned_with_boundary+0x16c>
/* Ensure that the we have a valid new block at the end */
if ( alloc_begin > alloc_begin_ceiling ) {
alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment );
}
alloc_end = alloc_begin + alloc_size;
3000b880: e084a005 add sl, r4, r5
3000b884: e1a0000a mov r0, sl
3000b888: e1a0100b mov r1, fp
3000b88c: eb00168e bl 300112cc <__umodsi3>
3000b890: e060000a rsb r0, r0, sl
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
3000b894: e1540000 cmp r4, r0
3000b898: 23a03000 movcs r3, #0
3000b89c: 33a03001 movcc r3, #1
3000b8a0: e15a0000 cmp sl, r0
3000b8a4: 93a03000 movls r3, #0
3000b8a8: e3530000 cmp r3, #0
3000b8ac: 0a000019 beq 3000b918 <_Heap_Allocate_aligned_with_boundary+0x16c>
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
3000b8b0: e59d1008 ldr r1, [sp, #8]
3000b8b4: e081a005 add sl, r1, r5
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
if ( boundary_line < boundary_floor ) {
3000b8b8: e15a0000 cmp sl, r0
3000b8bc: 958d6018 strls r6, [sp, #24]
3000b8c0: 9a000002 bls 3000b8d0 <_Heap_Allocate_aligned_with_boundary+0x124>
3000b8c4: ea000023 b 3000b958 <_Heap_Allocate_aligned_with_boundary+0x1ac>
3000b8c8: e15a0000 cmp sl, r0
3000b8cc: 8a000038 bhi 3000b9b4 <_Heap_Allocate_aligned_with_boundary+0x208>
return 0;
}
alloc_begin = boundary_line - alloc_size;
3000b8d0: e0654000 rsb r4, r5, r0
3000b8d4: e1a01008 mov r1, r8
3000b8d8: e1a00004 mov r0, r4
3000b8dc: eb00167a bl 300112cc <__umodsi3>
3000b8e0: e0604004 rsb r4, r0, r4
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
3000b8e4: e0846005 add r6, r4, r5
3000b8e8: e1a00006 mov r0, r6
3000b8ec: e1a0100b mov r1, fp
3000b8f0: eb001675 bl 300112cc <__umodsi3>
3000b8f4: e0600006 rsb r0, r0, r6
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
3000b8f8: e1560000 cmp r6, r0
3000b8fc: 93a06000 movls r6, #0
3000b900: 83a06001 movhi r6, #1
3000b904: e1540000 cmp r4, r0
3000b908: 23a06000 movcs r6, #0
3000b90c: e3560000 cmp r6, #0
3000b910: 1affffec bne 3000b8c8 <_Heap_Allocate_aligned_with_boundary+0x11c>
3000b914: e59d6018 ldr r6, [sp, #24]
boundary_line = _Heap_Align_down( alloc_end, boundary );
}
}
/* Ensure that the we have a valid new block at the beginning */
if ( alloc_begin >= alloc_begin_floor ) {
3000b918: e59d2008 ldr r2, [sp, #8]
3000b91c: e1520004 cmp r2, r4
3000b920: 8a00000c bhi 3000b958 <_Heap_Allocate_aligned_with_boundary+0x1ac>
3000b924: e59d100c ldr r1, [sp, #12]
3000b928: e1a00004 mov r0, r4
3000b92c: eb001666 bl 300112cc <__umodsi3>
3000b930: e3e0a007 mvn sl, #7
3000b934: e069a00a rsb sl, r9, sl
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
3000b938: e08aa004 add sl, sl, r4
uintptr_t const alloc_block_begin =
(uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size );
uintptr_t const free_size = alloc_block_begin - block_begin;
if ( free_size >= min_block_size || free_size == 0 ) {
3000b93c: e59d1004 ldr r1, [sp, #4]
3000b940: e060300a rsb r3, r0, sl
3000b944: e15a0000 cmp sl, r0
3000b948: 11510003 cmpne r1, r3
3000b94c: 8a000001 bhi 3000b958 <_Heap_Allocate_aligned_with_boundary+0x1ac>
boundary
);
}
}
if ( alloc_begin != 0 ) {
3000b950: e3540000 cmp r4, #0
3000b954: 1a000004 bne 3000b96c <_Heap_Allocate_aligned_with_boundary+0x1c0>
break;
}
block = block->next;
3000b958: e5999008 ldr r9, [r9, #8]
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
3000b95c: e1570009 cmp r7, r9
3000b960: 1affffa7 bne 3000b804 <_Heap_Allocate_aligned_with_boundary+0x58>
3000b964: e3a00000 mov r0, #0
3000b968: ea000008 b 3000b990 <_Heap_Allocate_aligned_with_boundary+0x1e4>
block = block->next;
}
if ( alloc_begin != 0 ) {
/* Statistics */
stats->searches += search_count;
3000b96c: e597304c ldr r3, [r7, #76] ; 0x4c
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
3000b970: e1a00007 mov r0, r7
block = block->next;
}
if ( alloc_begin != 0 ) {
/* Statistics */
stats->searches += search_count;
3000b974: e0833006 add r3, r3, r6
3000b978: e587304c str r3, [r7, #76] ; 0x4c
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
3000b97c: e1a01009 mov r1, r9
3000b980: e1a02004 mov r2, r4
3000b984: e1a03005 mov r3, r5
3000b988: ebffebcc bl 300068c0 <_Heap_Block_allocate>
3000b98c: e1a00004 mov r0, r4
boundary
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
3000b990: e5973044 ldr r3, [r7, #68] ; 0x44
3000b994: e1530006 cmp r3, r6
stats->max_search = search_count;
3000b998: 35876044 strcc r6, [r7, #68] ; 0x44
}
return (void *) alloc_begin;
}
3000b99c: e28dd01c add sp, sp, #28
3000b9a0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
3000b9a4: e1550003 cmp r5, r3
3000b9a8: 9a000006 bls 3000b9c8 <_Heap_Allocate_aligned_with_boundary+0x21c>
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
3000b9ac: e3a00000 mov r0, #0
3000b9b0: eafffff9 b 3000b99c <_Heap_Allocate_aligned_with_boundary+0x1f0>
if ( alloc_begin != 0 ) {
break;
}
block = block->next;
3000b9b4: e5999008 ldr r9, [r9, #8] <== NOT EXECUTED
3000b9b8: e59d6018 ldr r6, [sp, #24] <== NOT EXECUTED
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
3000b9bc: e1570009 cmp r7, r9 <== NOT EXECUTED
3000b9c0: 1affff8f bne 3000b804 <_Heap_Allocate_aligned_with_boundary+0x58><== NOT EXECUTED
3000b9c4: eaffffe6 b 3000b964 <_Heap_Allocate_aligned_with_boundary+0x1b8><== NOT EXECUTED
if ( boundary < alloc_size ) {
return NULL;
}
if ( alignment == 0 ) {
alignment = page_size;
3000b9c8: e3580000 cmp r8, #0
3000b9cc: 01a08002 moveq r8, r2
3000b9d0: eaffff83 b 3000b7e4 <_Heap_Allocate_aligned_with_boundary+0x38>
3000b9d4 <_Heap_Free>:
#include <rtems/system.h>
#include <rtems/score/sysstate.h>
#include <rtems/score/heap.h>
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
3000b9d4: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
3000b9d8: e1a04000 mov r4, r0
3000b9dc: e1a05001 mov r5, r1
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
3000b9e0: e1a00001 mov r0, r1
3000b9e4: e5941010 ldr r1, [r4, #16]
3000b9e8: eb001637 bl 300112cc <__umodsi3>
3000b9ec: e2455008 sub r5, r5, #8
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
3000b9f0: e5943020 ldr r3, [r4, #32]
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
3000b9f4: e0605005 rsb r5, r0, r5
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
3000b9f8: e1550003 cmp r5, r3
3000b9fc: 3a00002f bcc 3000bac0 <_Heap_Free+0xec>
3000ba00: e5941024 ldr r1, [r4, #36] ; 0x24
3000ba04: e1550001 cmp r5, r1
3000ba08: 8a00002c bhi 3000bac0 <_Heap_Free+0xec>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
3000ba0c: e595c004 ldr ip, [r5, #4]
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
3000ba10: e3cc6001 bic r6, ip, #1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
3000ba14: e0852006 add r2, r5, r6
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
3000ba18: e1530002 cmp r3, r2
3000ba1c: 8a000027 bhi 3000bac0 <_Heap_Free+0xec>
3000ba20: e1510002 cmp r1, r2
3000ba24: 3a000027 bcc 3000bac8 <_Heap_Free+0xf4>
3000ba28: e5927004 ldr r7, [r2, #4]
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
_HAssert( false );
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
3000ba2c: e2170001 ands r0, r7, #1
3000ba30: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
return false;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
3000ba34: e1510002 cmp r1, r2
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
3000ba38: e3c77001 bic r7, r7, #1
3000ba3c: 03a08000 moveq r8, #0
3000ba40: 0a000004 beq 3000ba58 <_Heap_Free+0x84>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
3000ba44: e0820007 add r0, r2, r7
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
3000ba48: e5900004 ldr r0, [r0, #4]
#include <rtems/system.h>
#include <rtems/score/sysstate.h>
#include <rtems/score/heap.h>
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
3000ba4c: e3100001 tst r0, #1
3000ba50: 13a08000 movne r8, #0
3000ba54: 03a08001 moveq r8, #1
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
if ( !_Heap_Is_prev_used( block ) ) {
3000ba58: e21c0001 ands r0, ip, #1
3000ba5c: 1a00001b bne 3000bad0 <_Heap_Free+0xfc>
uintptr_t const prev_size = block->prev_size;
3000ba60: e595c000 ldr ip, [r5]
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
3000ba64: e06ca005 rsb sl, ip, r5
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
3000ba68: e153000a cmp r3, sl
3000ba6c: 88bd85f0 pophi {r4, r5, r6, r7, r8, sl, pc}
3000ba70: e151000a cmp r1, sl
3000ba74: 38bd85f0 popcc {r4, r5, r6, r7, r8, sl, pc}
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
3000ba78: e59a0004 ldr r0, [sl, #4]
return( false );
}
/* As we always coalesce free blocks, the block that preceedes prev_block
must have been used. */
if ( !_Heap_Is_prev_used ( prev_block) ) {
3000ba7c: e2100001 ands r0, r0, #1
3000ba80: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
3000ba84: e3580000 cmp r8, #0
3000ba88: 0a000039 beq 3000bb74 <_Heap_Free+0x1a0>
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
3000ba8c: e5940038 ldr r0, [r4, #56] ; 0x38
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
3000ba90: e0867007 add r7, r6, r7
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
3000ba94: e5923008 ldr r3, [r2, #8]
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
3000ba98: e087c00c add ip, r7, ip
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
3000ba9c: e592200c ldr r2, [r2, #12]
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
3000baa0: e2400001 sub r0, r0, #1
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
3000baa4: e38c1001 orr r1, ip, #1
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
3000baa8: e5823008 str r3, [r2, #8]
next->prev = prev;
3000baac: e583200c str r2, [r3, #12]
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
3000bab0: e5840038 str r0, [r4, #56] ; 0x38
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
3000bab4: e58a1004 str r1, [sl, #4]
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
3000bab8: e78ac00c str ip, [sl, ip]
3000babc: ea00000f b 3000bb00 <_Heap_Free+0x12c>
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
_HAssert( false );
return false;
3000bac0: e3a00000 mov r0, #0
3000bac4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
3000bac8: e3a00000 mov r0, #0 <== NOT EXECUTED
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
3000bacc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
uintptr_t const size = block_size + prev_size;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
3000bad0: e3580000 cmp r8, #0
3000bad4: 0a000014 beq 3000bb2c <_Heap_Free+0x158>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
3000bad8: e5923008 ldr r3, [r2, #8]
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
uintptr_t const size = block_size + next_block_size;
3000badc: e0877006 add r7, r7, r6
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
3000bae0: e592200c ldr r2, [r2, #12]
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
uintptr_t const size = block_size + next_block_size;
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
3000bae4: e3871001 orr r1, r7, #1
)
{
Heap_Block *next = old_block->next;
Heap_Block *prev = old_block->prev;
new_block->next = next;
3000bae8: e5853008 str r3, [r5, #8]
new_block->prev = prev;
3000baec: e585200c str r2, [r5, #12]
next->prev = new_block;
prev->next = new_block;
3000baf0: e5825008 str r5, [r2, #8]
Heap_Block *prev = old_block->prev;
new_block->next = next;
new_block->prev = prev;
next->prev = new_block;
3000baf4: e583500c str r5, [r3, #12]
3000baf8: e5851004 str r1, [r5, #4]
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
3000bafc: e7857007 str r7, [r5, r7]
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
3000bb00: e5942040 ldr r2, [r4, #64] ; 0x40
++stats->frees;
3000bb04: e5943050 ldr r3, [r4, #80] ; 0x50
stats->free_size += block_size;
3000bb08: e5941030 ldr r1, [r4, #48] ; 0x30
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
3000bb0c: e2422001 sub r2, r2, #1
++stats->frees;
3000bb10: e2833001 add r3, r3, #1
stats->free_size += block_size;
3000bb14: e0816006 add r6, r1, r6
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
3000bb18: e5842040 str r2, [r4, #64] ; 0x40
++stats->frees;
3000bb1c: e5843050 str r3, [r4, #80] ; 0x50
stats->free_size += block_size;
3000bb20: e5846030 str r6, [r4, #48] ; 0x30
return( true );
3000bb24: e3a00001 mov r0, #1
3000bb28: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
next_block->prev_size = size;
} else { /* no coalesce */
/* Add 'block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block );
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
3000bb2c: e3863001 orr r3, r6, #1
3000bb30: e5853004 str r3, [r5, #4]
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
3000bb34: e5943038 ldr r3, [r4, #56] ; 0x38
if ( stats->max_free_blocks < stats->free_blocks ) {
3000bb38: e594c03c ldr ip, [r4, #60] ; 0x3c
} else { /* no coalesce */
/* Add 'block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block );
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
3000bb3c: e5920004 ldr r0, [r2, #4]
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
3000bb40: e5941008 ldr r1, [r4, #8]
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
3000bb44: e2833001 add r3, r3, #1
} else { /* no coalesce */
/* Add 'block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block );
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
3000bb48: e3c00001 bic r0, r0, #1
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
if ( stats->max_free_blocks < stats->free_blocks ) {
3000bb4c: e153000c cmp r3, ip
new_block->next = next;
3000bb50: e5851008 str r1, [r5, #8]
new_block->prev = block_before;
3000bb54: e585400c str r4, [r5, #12]
} else { /* no coalesce */
/* Add 'block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block );
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
3000bb58: e5820004 str r0, [r2, #4]
block_before->next = new_block;
next->prev = new_block;
3000bb5c: e581500c str r5, [r1, #12]
next_block->prev_size = block_size;
3000bb60: e7856006 str r6, [r5, r6]
{
Heap_Block *next = block_before->next;
new_block->next = next;
new_block->prev = block_before;
block_before->next = new_block;
3000bb64: e5845008 str r5, [r4, #8]
/* Statistics */
++stats->free_blocks;
3000bb68: e5843038 str r3, [r4, #56] ; 0x38
if ( stats->max_free_blocks < stats->free_blocks ) {
stats->max_free_blocks = stats->free_blocks;
3000bb6c: 8584303c strhi r3, [r4, #60] ; 0x3c
3000bb70: eaffffe2 b 3000bb00 <_Heap_Free+0x12c>
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
} else { /* coalesce prev */
uintptr_t const size = block_size + prev_size;
3000bb74: e086c00c add ip, r6, ip
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
3000bb78: e38c3001 orr r3, ip, #1
3000bb7c: e58a3004 str r3, [sl, #4]
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
3000bb80: e5923004 ldr r3, [r2, #4]
next_block->prev_size = size;
3000bb84: e785c006 str ip, [r5, r6]
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
} else { /* coalesce prev */
uintptr_t const size = block_size + prev_size;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
3000bb88: e3c33001 bic r3, r3, #1
3000bb8c: e5823004 str r3, [r2, #4]
3000bb90: eaffffda b 3000bb00 <_Heap_Free+0x12c>
30013858 <_Heap_Size_of_alloc_area>:
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
30013858: e92d40f0 push {r4, r5, r6, r7, lr}
3001385c: e1a04000 mov r4, r0
30013860: e1a05001 mov r5, r1
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
30013864: e1a00001 mov r0, r1
30013868: e5941010 ldr r1, [r4, #16]
3001386c: e1a07002 mov r7, r2
30013870: ebfff695 bl 300112cc <__umodsi3>
30013874: e2456008 sub r6, r5, #8
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
30013878: e5943020 ldr r3, [r4, #32]
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
3001387c: e0600006 rsb r0, r0, r6
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
30013880: e1500003 cmp r0, r3
30013884: 3a000010 bcc 300138cc <_Heap_Size_of_alloc_area+0x74>
30013888: e5942024 ldr r2, [r4, #36] ; 0x24
3001388c: e1500002 cmp r0, r2
30013890: 8a00000d bhi 300138cc <_Heap_Size_of_alloc_area+0x74>
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
30013894: e5906004 ldr r6, [r0, #4]
30013898: e3c66001 bic r6, r6, #1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
3001389c: e0806006 add r6, r0, r6
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
300138a0: e1530006 cmp r3, r6
300138a4: 8a000008 bhi 300138cc <_Heap_Size_of_alloc_area+0x74>
300138a8: e1520006 cmp r2, r6
300138ac: 3a000008 bcc 300138d4 <_Heap_Size_of_alloc_area+0x7c>
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
300138b0: e5960004 ldr r0, [r6, #4]
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
300138b4: e2100001 ands r0, r0, #1
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin;
300138b8: 12655004 rsbne r5, r5, #4
300138bc: 10856006 addne r6, r5, r6
300138c0: 15876000 strne r6, [r7]
return true;
300138c4: 13a00001 movne r0, #1
300138c8: e8bd80f0 pop {r4, r5, r6, r7, pc}
if (
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
) {
return false;
300138cc: e3a00000 mov r0, #0
300138d0: e8bd80f0 pop {r4, r5, r6, r7, pc}
300138d4: e3a00000 mov r0, #0 <== NOT EXECUTED
}
*alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin;
return true;
}
300138d8: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
30007608 <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
30007608: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
if ( !_System_state_Is_up( _System_state_Get() ) ) {
3000760c: e59f35cc ldr r3, [pc, #1484] ; 30007be0 <_Heap_Walk+0x5d8>
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
30007610: e31200ff tst r2, #255 ; 0xff
if ( !_System_state_Is_up( _System_state_Get() ) ) {
30007614: e5933000 ldr r3, [r3]
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
30007618: e59f25c4 ldr r2, [pc, #1476] ; 30007be4 <_Heap_Walk+0x5dc>
3000761c: e59f95c4 ldr r9, [pc, #1476] ; 30007be8 <_Heap_Walk+0x5e0>
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
30007620: e1a0a001 mov sl, r1
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
30007624: 11a09002 movne r9, r2
Heap_Control *heap,
int source,
bool dump
)
{
uintptr_t const page_size = heap->page_size;
30007628: e5901010 ldr r1, [r0, #16]
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
if ( !_System_state_Is_up( _System_state_Get() ) ) {
3000762c: e3530003 cmp r3, #3
int source,
bool dump
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
30007630: e5902014 ldr r2, [r0, #20]
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
30007634: e5903024 ldr r3, [r0, #36] ; 0x24
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
30007638: e24dd038 sub sp, sp, #56 ; 0x38
3000763c: e1a04000 mov r4, r0
uintptr_t const page_size = heap->page_size;
30007640: e58d1024 str r1, [sp, #36] ; 0x24
uintptr_t const min_block_size = heap->min_block_size;
30007644: e58d2028 str r2, [sp, #40] ; 0x28
Heap_Block *const first_block = heap->first_block;
30007648: e5908020 ldr r8, [r0, #32]
Heap_Block *const last_block = heap->last_block;
3000764c: e58d302c str r3, [sp, #44] ; 0x2c
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
if ( !_System_state_Is_up( _System_state_Get() ) ) {
30007650: 0a000002 beq 30007660 <_Heap_Walk+0x58>
}
block = next_block;
} while ( block != first_block );
return true;
30007654: e3a00001 mov r0, #1
}
30007658: e28dd038 add sp, sp, #56 ; 0x38
3000765c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
(*printer)(
30007660: e594101c ldr r1, [r4, #28]
30007664: e5900018 ldr r0, [r0, #24]
30007668: e5942008 ldr r2, [r4, #8]
3000766c: e594300c ldr r3, [r4, #12]
30007670: e59dc028 ldr ip, [sp, #40] ; 0x28
30007674: e58d1008 str r1, [sp, #8]
30007678: e59d102c ldr r1, [sp, #44] ; 0x2c
3000767c: e58d0004 str r0, [sp, #4]
30007680: e58d1010 str r1, [sp, #16]
30007684: e58d2014 str r2, [sp, #20]
30007688: e58d3018 str r3, [sp, #24]
3000768c: e59f2558 ldr r2, [pc, #1368] ; 30007bec <_Heap_Walk+0x5e4>
30007690: e58dc000 str ip, [sp]
30007694: e58d800c str r8, [sp, #12]
30007698: e1a0000a mov r0, sl
3000769c: e3a01000 mov r1, #0
300076a0: e59d3024 ldr r3, [sp, #36] ; 0x24
300076a4: e1a0e00f mov lr, pc
300076a8: e12fff19 bx r9
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
300076ac: e59d2024 ldr r2, [sp, #36] ; 0x24
300076b0: e3520000 cmp r2, #0
300076b4: 0a000026 beq 30007754 <_Heap_Walk+0x14c>
(*printer)( source, true, "page size is zero\n" );
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
300076b8: e59d3024 ldr r3, [sp, #36] ; 0x24
300076bc: e2135003 ands r5, r3, #3
300076c0: 1a00002a bne 30007770 <_Heap_Walk+0x168>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
300076c4: e59d0028 ldr r0, [sp, #40] ; 0x28
300076c8: e59d1024 ldr r1, [sp, #36] ; 0x24
300076cc: ebffe530 bl 30000b94 <__umodsi3>
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
300076d0: e250b000 subs fp, r0, #0
300076d4: 1a00002c bne 3000778c <_Heap_Walk+0x184>
300076d8: e2880008 add r0, r8, #8
300076dc: e59d1024 ldr r1, [sp, #36] ; 0x24
300076e0: ebffe52b bl 30000b94 <__umodsi3>
);
return false;
}
if (
300076e4: e2506000 subs r6, r0, #0
300076e8: 1a00002f bne 300077ac <_Heap_Walk+0x1a4>
block = next_block;
} while ( block != first_block );
return true;
}
300076ec: e598b004 ldr fp, [r8, #4]
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
300076f0: e21b5001 ands r5, fp, #1
300076f4: 0a0000cd beq 30007a30 <_Heap_Walk+0x428>
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
300076f8: e59dc02c ldr ip, [sp, #44] ; 0x2c
300076fc: e59c3004 ldr r3, [ip, #4]
30007700: e3c33001 bic r3, r3, #1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
30007704: e08c3003 add r3, ip, r3
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
30007708: e5935004 ldr r5, [r3, #4]
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
3000770c: e2155001 ands r5, r5, #1
30007710: 0a000008 beq 30007738 <_Heap_Walk+0x130>
);
return false;
}
if (
30007714: e1580003 cmp r8, r3
30007718: 0a00002b beq 300077cc <_Heap_Walk+0x1c4>
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
3000771c: e1a0000a mov r0, sl <== NOT EXECUTED
30007720: e3a01001 mov r1, #1 <== NOT EXECUTED
30007724: e59f24c4 ldr r2, [pc, #1220] ; 30007bf0 <_Heap_Walk+0x5e8> <== NOT EXECUTED
30007728: e1a0e00f mov lr, pc <== NOT EXECUTED
3000772c: e12fff19 bx r9 <== NOT EXECUTED
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
30007730: e1a00006 mov r0, r6 <== NOT EXECUTED
30007734: eaffffc7 b 30007658 <_Heap_Walk+0x50> <== NOT EXECUTED
return false;
}
if ( _Heap_Is_free( last_block ) ) {
(*printer)(
30007738: e1a0000a mov r0, sl
3000773c: e3a01001 mov r1, #1
30007740: e59f24ac ldr r2, [pc, #1196] ; 30007bf4 <_Heap_Walk+0x5ec>
30007744: e1a0e00f mov lr, pc
30007748: e12fff19 bx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
3000774c: e1a00005 mov r0, r5
30007750: eaffffc0 b 30007658 <_Heap_Walk+0x50>
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
(*printer)( source, true, "page size is zero\n" );
30007754: e1a0000a mov r0, sl
30007758: e3a01001 mov r1, #1
3000775c: e59f2494 ldr r2, [pc, #1172] ; 30007bf8 <_Heap_Walk+0x5f0>
30007760: e1a0e00f mov lr, pc
30007764: e12fff19 bx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
30007768: e59d0024 ldr r0, [sp, #36] ; 0x24
3000776c: eaffffb9 b 30007658 <_Heap_Walk+0x50>
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
(*printer)(
30007770: e1a0000a mov r0, sl
30007774: e3a01001 mov r1, #1
30007778: e59f247c ldr r2, [pc, #1148] ; 30007bfc <_Heap_Walk+0x5f4>
3000777c: e1a0e00f mov lr, pc
30007780: e12fff19 bx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
30007784: e3a00000 mov r0, #0
30007788: eaffffb2 b 30007658 <_Heap_Walk+0x50>
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
(*printer)(
3000778c: e1a0000a mov r0, sl
30007790: e3a01001 mov r1, #1
30007794: e59f2464 ldr r2, [pc, #1124] ; 30007c00 <_Heap_Walk+0x5f8>
30007798: e59d3028 ldr r3, [sp, #40] ; 0x28
3000779c: e1a0e00f mov lr, pc
300077a0: e12fff19 bx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
300077a4: e1a00005 mov r0, r5
300077a8: eaffffaa b 30007658 <_Heap_Walk+0x50>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
300077ac: e1a0000a mov r0, sl
300077b0: e3a01001 mov r1, #1
300077b4: e59f2448 ldr r2, [pc, #1096] ; 30007c04 <_Heap_Walk+0x5fc>
300077b8: e1a03008 mov r3, r8
300077bc: e1a0e00f mov lr, pc
300077c0: e12fff19 bx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
300077c4: e1a0000b mov r0, fp
300077c8: eaffffa2 b 30007658 <_Heap_Walk+0x50>
block = next_block;
} while ( block != first_block );
return true;
}
300077cc: e5945008 ldr r5, [r4, #8]
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
300077d0: e5947010 ldr r7, [r4, #16]
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
300077d4: e1540005 cmp r4, r5
300077d8: 05943020 ldreq r3, [r4, #32]
300077dc: 0a00000d beq 30007818 <_Heap_Walk+0x210>
block = next_block;
} while ( block != first_block );
return true;
}
300077e0: e5943020 ldr r3, [r4, #32]
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
300077e4: e1530005 cmp r3, r5
300077e8: 9a000097 bls 30007a4c <_Heap_Walk+0x444>
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
if ( !_Heap_Is_block_in_heap( heap, free_block ) ) {
(*printer)(
300077ec: e1a0000a mov r0, sl
300077f0: e3a01001 mov r1, #1
300077f4: e59f240c ldr r2, [pc, #1036] ; 30007c08 <_Heap_Walk+0x600>
300077f8: e1a03005 mov r3, r5
300077fc: e1a0e00f mov lr, pc
30007800: e12fff19 bx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
30007804: e3a00000 mov r0, #0
30007808: eaffff92 b 30007658 <_Heap_Walk+0x50>
3000780c: e1a03008 mov r3, r8
30007810: e59db034 ldr fp, [sp, #52] ; 0x34
30007814: e59d8030 ldr r8, [sp, #48] ; 0x30
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
30007818: e1a06008 mov r6, r8
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
3000781c: e3cb7001 bic r7, fp, #1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
30007820: e0875006 add r5, r7, r6
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
30007824: e1530005 cmp r3, r5
30007828: 9a000008 bls 30007850 <_Heap_Walk+0x248>
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
bool const is_not_last_block = block != last_block;
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
(*printer)(
3000782c: e1a0000a mov r0, sl
30007830: e58d5000 str r5, [sp]
30007834: e3a01001 mov r1, #1
30007838: e59f23cc ldr r2, [pc, #972] ; 30007c0c <_Heap_Walk+0x604>
3000783c: e1a03006 mov r3, r6
30007840: e1a0e00f mov lr, pc
30007844: e12fff19 bx r9
"block 0x%08x: next block 0x%08x not in heap\n",
block,
next_block
);
return false;
30007848: e3a00000 mov r0, #0
3000784c: eaffff81 b 30007658 <_Heap_Walk+0x50>
30007850: e5943024 ldr r3, [r4, #36] ; 0x24
30007854: e1530005 cmp r3, r5
30007858: 3afffff3 bcc 3000782c <_Heap_Walk+0x224>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
3000785c: e59d1024 ldr r1, [sp, #36] ; 0x24
30007860: e1a00007 mov r0, r7
30007864: ebffe4ca bl 30000b94 <__umodsi3>
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
bool const prev_used = _Heap_Is_prev_used( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
bool const is_not_last_block = block != last_block;
30007868: e59d102c ldr r1, [sp, #44] ; 0x2c
3000786c: e0563001 subs r3, r6, r1
30007870: 13a03001 movne r3, #1
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
30007874: e3500000 cmp r0, #0
30007878: 0a000001 beq 30007884 <_Heap_Walk+0x27c>
3000787c: e3530000 cmp r3, #0
30007880: 1a0000aa bne 30007b30 <_Heap_Walk+0x528>
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
30007884: e59d2028 ldr r2, [sp, #40] ; 0x28
30007888: e1520007 cmp r2, r7
3000788c: 9a000001 bls 30007898 <_Heap_Walk+0x290>
30007890: e3530000 cmp r3, #0
30007894: 1a0000ae bne 30007b54 <_Heap_Walk+0x54c>
);
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
30007898: e1560005 cmp r6, r5
3000789c: 3a000001 bcc 300078a8 <_Heap_Walk+0x2a0>
300078a0: e3530000 cmp r3, #0
300078a4: 1a0000b4 bne 30007b7c <_Heap_Walk+0x574>
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
300078a8: e5953004 ldr r3, [r5, #4]
300078ac: e20bb001 and fp, fp, #1
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
300078b0: e3130001 tst r3, #1
300078b4: 0a000018 beq 3000791c <_Heap_Walk+0x314>
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
300078b8: e35b0000 cmp fp, #0
300078bc: 0a00000c beq 300078f4 <_Heap_Walk+0x2ec>
(*printer)(
300078c0: e58d7000 str r7, [sp]
300078c4: e1a0000a mov r0, sl
300078c8: e3a01000 mov r1, #0
300078cc: e59f233c ldr r2, [pc, #828] ; 30007c10 <_Heap_Walk+0x608>
300078d0: e1a03006 mov r3, r6
300078d4: e1a0e00f mov lr, pc
300078d8: e12fff19 bx r9
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
300078dc: e1580005 cmp r8, r5
300078e0: 0affff5b beq 30007654 <_Heap_Walk+0x4c>
300078e4: e595b004 ldr fp, [r5, #4]
300078e8: e5943020 ldr r3, [r4, #32]
300078ec: e1a06005 mov r6, r5
300078f0: eaffffc9 b 3000781c <_Heap_Walk+0x214>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
300078f4: e58d7000 str r7, [sp]
300078f8: e5963000 ldr r3, [r6]
300078fc: e1a0000a mov r0, sl
30007900: e58d3004 str r3, [sp, #4]
30007904: e1a0100b mov r1, fp
30007908: e59f2304 ldr r2, [pc, #772] ; 30007c14 <_Heap_Walk+0x60c>
3000790c: e1a03006 mov r3, r6
30007910: e1a0e00f mov lr, pc
30007914: e12fff19 bx r9
30007918: eaffffef b 300078dc <_Heap_Walk+0x2d4>
false,
"block 0x%08x: size %u, prev 0x%08x%s, next 0x%08x%s\n",
block,
block_size,
block->prev,
block->prev == first_free_block ?
3000791c: e596200c ldr r2, [r6, #12]
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
30007920: e5943008 ldr r3, [r4, #8]
block = next_block;
} while ( block != first_block );
return true;
}
30007924: e594100c ldr r1, [r4, #12]
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
30007928: e1530002 cmp r3, r2
3000792c: 059f02e4 ldreq r0, [pc, #740] ; 30007c18 <_Heap_Walk+0x610>
30007930: 0a000003 beq 30007944 <_Heap_Walk+0x33c>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
30007934: e59f32e0 ldr r3, [pc, #736] ; 30007c1c <_Heap_Walk+0x614>
30007938: e1540002 cmp r4, r2
3000793c: e59f02dc ldr r0, [pc, #732] ; 30007c20 <_Heap_Walk+0x618>
30007940: 01a00003 moveq r0, r3
block->next,
block->next == last_free_block ?
30007944: e5963008 ldr r3, [r6, #8]
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
30007948: e1510003 cmp r1, r3
3000794c: 059f12d0 ldreq r1, [pc, #720] ; 30007c24 <_Heap_Walk+0x61c>
30007950: 0a000003 beq 30007964 <_Heap_Walk+0x35c>
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
30007954: e59fc2cc ldr ip, [pc, #716] ; 30007c28 <_Heap_Walk+0x620>
30007958: e1540003 cmp r4, r3
3000795c: e59f12bc ldr r1, [pc, #700] ; 30007c20 <_Heap_Walk+0x618>
30007960: 01a0100c moveq r1, ip
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
30007964: e58d2004 str r2, [sp, #4]
30007968: e58d0008 str r0, [sp, #8]
3000796c: e58d300c str r3, [sp, #12]
30007970: e58d1010 str r1, [sp, #16]
30007974: e1a03006 mov r3, r6
30007978: e58d7000 str r7, [sp]
3000797c: e1a0000a mov r0, sl
30007980: e3a01000 mov r1, #0
30007984: e59f22a0 ldr r2, [pc, #672] ; 30007c2c <_Heap_Walk+0x624>
30007988: e1a0e00f mov lr, pc
3000798c: e12fff19 bx r9
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
30007990: e5953000 ldr r3, [r5]
30007994: e1570003 cmp r7, r3
30007998: 1a000011 bne 300079e4 <_Heap_Walk+0x3dc>
);
return false;
}
if ( !prev_used ) {
3000799c: e35b0000 cmp fp, #0
300079a0: 0a00001a beq 30007a10 <_Heap_Walk+0x408>
block = next_block;
} while ( block != first_block );
return true;
}
300079a4: e5943008 ldr r3, [r4, #8]
)
{
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *free_block = _Heap_Free_list_first( heap );
while ( free_block != free_list_tail ) {
300079a8: e1540003 cmp r4, r3
300079ac: 0a000004 beq 300079c4 <_Heap_Walk+0x3bc>
if ( free_block == block ) {
300079b0: e1560003 cmp r6, r3
300079b4: 0affffc8 beq 300078dc <_Heap_Walk+0x2d4>
return true;
}
free_block = free_block->next;
300079b8: e5933008 ldr r3, [r3, #8]
)
{
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *free_block = _Heap_Free_list_first( heap );
while ( free_block != free_list_tail ) {
300079bc: e1540003 cmp r4, r3
300079c0: 1afffffa bne 300079b0 <_Heap_Walk+0x3a8>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
300079c4: e1a0000a mov r0, sl
300079c8: e3a01001 mov r1, #1
300079cc: e59f225c ldr r2, [pc, #604] ; 30007c30 <_Heap_Walk+0x628>
300079d0: e1a03006 mov r3, r6
300079d4: e1a0e00f mov lr, pc
300079d8: e12fff19 bx r9
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
300079dc: e3a00000 mov r0, #0
300079e0: eaffff1c b 30007658 <_Heap_Walk+0x50>
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
(*printer)(
300079e4: e58d3004 str r3, [sp, #4]
300079e8: e1a0000a mov r0, sl
300079ec: e58d7000 str r7, [sp]
300079f0: e58d5008 str r5, [sp, #8]
300079f4: e3a01001 mov r1, #1
300079f8: e59f2234 ldr r2, [pc, #564] ; 30007c34 <_Heap_Walk+0x62c>
300079fc: e1a03006 mov r3, r6
30007a00: e1a0e00f mov lr, pc
30007a04: e12fff19 bx r9
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
30007a08: e3a00000 mov r0, #0
30007a0c: eaffff11 b 30007658 <_Heap_Walk+0x50>
return false;
}
if ( !prev_used ) {
(*printer)(
30007a10: e1a0000a mov r0, sl
30007a14: e3a01001 mov r1, #1
30007a18: e59f2218 ldr r2, [pc, #536] ; 30007c38 <_Heap_Walk+0x630>
30007a1c: e1a03006 mov r3, r6
30007a20: e1a0e00f mov lr, pc
30007a24: e12fff19 bx r9
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
30007a28: e1a0000b mov r0, fp
30007a2c: eaffff09 b 30007658 <_Heap_Walk+0x50>
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
(*printer)(
30007a30: e1a0000a mov r0, sl
30007a34: e3a01001 mov r1, #1
30007a38: e59f21fc ldr r2, [pc, #508] ; 30007c3c <_Heap_Walk+0x634>
30007a3c: e1a0e00f mov lr, pc
30007a40: e12fff19 bx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
30007a44: e1a00005 mov r0, r5
30007a48: eaffff02 b 30007658 <_Heap_Walk+0x50>
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
30007a4c: e594c024 ldr ip, [r4, #36] ; 0x24
30007a50: e15c0005 cmp ip, r5
30007a54: 3affff64 bcc 300077ec <_Heap_Walk+0x1e4>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
30007a58: e2850008 add r0, r5, #8
30007a5c: e1a01007 mov r1, r7
30007a60: e58d301c str r3, [sp, #28]
30007a64: e58dc020 str ip, [sp, #32]
30007a68: ebffe449 bl 30000b94 <__umodsi3>
);
return false;
}
if (
30007a6c: e3500000 cmp r0, #0
30007a70: e59d301c ldr r3, [sp, #28]
30007a74: e59dc020 ldr ip, [sp, #32]
30007a78: 1a000048 bne 30007ba0 <_Heap_Walk+0x598>
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
30007a7c: e5952004 ldr r2, [r5, #4]
30007a80: e3c22001 bic r2, r2, #1
block = next_block;
} while ( block != first_block );
return true;
}
30007a84: e0852002 add r2, r5, r2
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
30007a88: e5922004 ldr r2, [r2, #4]
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
30007a8c: e3120001 tst r2, #1
30007a90: 1a00004a bne 30007bc0 <_Heap_Walk+0x5b8>
30007a94: e58d8030 str r8, [sp, #48] ; 0x30
30007a98: e58db034 str fp, [sp, #52] ; 0x34
30007a9c: e1a01004 mov r1, r4
30007aa0: e1a06005 mov r6, r5
30007aa4: e1a0b00c mov fp, ip
30007aa8: e1a08003 mov r8, r3
30007aac: ea000013 b 30007b00 <_Heap_Walk+0x4f8>
return false;
}
prev_block = free_block;
free_block = free_block->next;
30007ab0: e5955008 ldr r5, [r5, #8]
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
30007ab4: e1540005 cmp r4, r5
30007ab8: 0affff53 beq 3000780c <_Heap_Walk+0x204>
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
30007abc: e1580005 cmp r8, r5
30007ac0: 8affff49 bhi 300077ec <_Heap_Walk+0x1e4>
30007ac4: e155000b cmp r5, fp
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
30007ac8: e2850008 add r0, r5, #8
30007acc: e1a01007 mov r1, r7
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
30007ad0: 8affff45 bhi 300077ec <_Heap_Walk+0x1e4>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
30007ad4: ebffe42e bl 30000b94 <__umodsi3>
);
return false;
}
if (
30007ad8: e3500000 cmp r0, #0
30007adc: 1a00002f bne 30007ba0 <_Heap_Walk+0x598>
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
30007ae0: e5953004 ldr r3, [r5, #4]
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
30007ae4: e1a01006 mov r1, r6
30007ae8: e3c33001 bic r3, r3, #1
block = next_block;
} while ( block != first_block );
return true;
}
30007aec: e0833005 add r3, r3, r5
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
30007af0: e5933004 ldr r3, [r3, #4]
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
30007af4: e1a06005 mov r6, r5
30007af8: e3130001 tst r3, #1
30007afc: 1a00002f bne 30007bc0 <_Heap_Walk+0x5b8>
);
return false;
}
if ( free_block->prev != prev_block ) {
30007b00: e595200c ldr r2, [r5, #12]
30007b04: e1520001 cmp r2, r1
30007b08: 0affffe8 beq 30007ab0 <_Heap_Walk+0x4a8>
(*printer)(
30007b0c: e58d2000 str r2, [sp]
30007b10: e1a0000a mov r0, sl
30007b14: e3a01001 mov r1, #1
30007b18: e59f2120 ldr r2, [pc, #288] ; 30007c40 <_Heap_Walk+0x638>
30007b1c: e1a03005 mov r3, r5
30007b20: e1a0e00f mov lr, pc
30007b24: e12fff19 bx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
30007b28: e3a00000 mov r0, #0
30007b2c: eafffec9 b 30007658 <_Heap_Walk+0x50>
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
(*printer)(
30007b30: e1a0000a mov r0, sl
30007b34: e58d7000 str r7, [sp]
30007b38: e3a01001 mov r1, #1
30007b3c: e59f2100 ldr r2, [pc, #256] ; 30007c44 <_Heap_Walk+0x63c>
30007b40: e1a03006 mov r3, r6
30007b44: e1a0e00f mov lr, pc
30007b48: e12fff19 bx r9
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
30007b4c: e3a00000 mov r0, #0
30007b50: eafffec0 b 30007658 <_Heap_Walk+0x50>
}
if ( block_size < min_block_size && is_not_last_block ) {
(*printer)(
30007b54: e58d2004 str r2, [sp, #4]
30007b58: e1a0000a mov r0, sl
30007b5c: e58d7000 str r7, [sp]
30007b60: e3a01001 mov r1, #1
30007b64: e59f20dc ldr r2, [pc, #220] ; 30007c48 <_Heap_Walk+0x640>
30007b68: e1a03006 mov r3, r6
30007b6c: e1a0e00f mov lr, pc
30007b70: e12fff19 bx r9
block,
block_size,
min_block_size
);
return false;
30007b74: e3a00000 mov r0, #0
30007b78: eafffeb6 b 30007658 <_Heap_Walk+0x50>
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
(*printer)(
30007b7c: e1a0000a mov r0, sl
30007b80: e58d5000 str r5, [sp]
30007b84: e3a01001 mov r1, #1
30007b88: e59f20bc ldr r2, [pc, #188] ; 30007c4c <_Heap_Walk+0x644>
30007b8c: e1a03006 mov r3, r6
30007b90: e1a0e00f mov lr, pc
30007b94: e12fff19 bx r9
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
30007b98: e3a00000 mov r0, #0
30007b9c: eafffead b 30007658 <_Heap_Walk+0x50>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
30007ba0: e1a0000a mov r0, sl
30007ba4: e3a01001 mov r1, #1
30007ba8: e59f20a0 ldr r2, [pc, #160] ; 30007c50 <_Heap_Walk+0x648>
30007bac: e1a03005 mov r3, r5
30007bb0: e1a0e00f mov lr, pc
30007bb4: e12fff19 bx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
30007bb8: e3a00000 mov r0, #0
30007bbc: eafffea5 b 30007658 <_Heap_Walk+0x50>
return false;
}
if ( _Heap_Is_used( free_block ) ) {
(*printer)(
30007bc0: e1a0000a mov r0, sl
30007bc4: e3a01001 mov r1, #1
30007bc8: e59f2084 ldr r2, [pc, #132] ; 30007c54 <_Heap_Walk+0x64c>
30007bcc: e1a03005 mov r3, r5
30007bd0: e1a0e00f mov lr, pc
30007bd4: e12fff19 bx r9
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
30007bd8: e3a00000 mov r0, #0
30007bdc: eafffe9d b 30007658 <_Heap_Walk+0x50>
30006a04 <_Internal_error_Occurred>:
bool is_internal,
Internal_errors_t the_error
)
{
_Internal_errors_What_happened.the_source = the_source;
30006a04: e59f303c ldr r3, [pc, #60] ; 30006a48 <_Internal_error_Occurred+0x44>
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
30006a08: e201c0ff and ip, r1, #255 ; 0xff
30006a0c: e52de004 push {lr} ; (str lr, [sp, #-4]!)
_Internal_errors_What_happened.the_source = the_source;
_Internal_errors_What_happened.is_internal = is_internal;
_Internal_errors_What_happened.the_error = the_error;
_User_extensions_Fatal( the_source, is_internal, the_error );
30006a10: e1a0100c mov r1, ip
bool is_internal,
Internal_errors_t the_error
)
{
_Internal_errors_What_happened.the_source = the_source;
30006a14: e5830000 str r0, [r3]
_Internal_errors_What_happened.is_internal = is_internal;
30006a18: e5c3c004 strb ip, [r3, #4]
_Internal_errors_What_happened.the_error = the_error;
30006a1c: e5832008 str r2, [r3, #8]
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
30006a20: e1a04002 mov r4, r2
_Internal_errors_What_happened.the_source = the_source;
_Internal_errors_What_happened.is_internal = is_internal;
_Internal_errors_What_happened.the_error = the_error;
_User_extensions_Fatal( the_source, is_internal, the_error );
30006a24: eb00075f bl 300087a8 <_User_extensions_Fatal>
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
30006a28: e59f301c ldr r3, [pc, #28] ; 30006a4c <_Internal_error_Occurred+0x48><== NOT EXECUTED
30006a2c: e3a02005 mov r2, #5 <== NOT EXECUTED
30006a30: e5832000 str r2, [r3] <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
30006a34: e10f2000 mrs r2, CPSR <== NOT EXECUTED
30006a38: e3823080 orr r3, r2, #128 ; 0x80 <== NOT EXECUTED
30006a3c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
30006a40: e1a00004 mov r0, r4 <== NOT EXECUTED
30006a44: eafffffe b 30006a44 <_Internal_error_Occurred+0x40> <== NOT EXECUTED
30006b0c <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
30006b0c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
30006b10: e5904034 ldr r4, [r0, #52] ; 0x34
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
30006b14: e24dd014 sub sp, sp, #20
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
30006b18: e3540000 cmp r4, #0
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
30006b1c: e1a05000 mov r5, r0
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
30006b20: e1d070b8 ldrh r7, [r0, #8]
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
30006b24: 0a00009b beq 30006d98 <_Objects_Extend_information+0x28c>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
30006b28: e1d081b4 ldrh r8, [r0, #20]
30006b2c: e1d0a1b0 ldrh sl, [r0, #16]
30006b30: e1a01008 mov r1, r8
30006b34: e1a0000a mov r0, sl
30006b38: eb00299d bl 300111b4 <__aeabi_uidiv>
30006b3c: e1a03800 lsl r3, r0, #16
for ( ; block < block_count; block++ ) {
30006b40: e1b03823 lsrs r3, r3, #16
30006b44: 0a000099 beq 30006db0 <_Objects_Extend_information+0x2a4>
if ( information->object_blocks[ block ] == NULL ) {
30006b48: e5949000 ldr r9, [r4]
30006b4c: e3590000 cmp r9, #0
30006b50: 01a01008 moveq r1, r8
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
30006b54: 01a06007 moveq r6, r7
index_base = minimum_index;
block = 0;
30006b58: 01a04009 moveq r4, r9
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
30006b5c: 0a00000c beq 30006b94 <_Objects_Extend_information+0x88>
30006b60: e1a02004 mov r2, r4
30006b64: e1a01008 mov r1, r8
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
30006b68: e1a06007 mov r6, r7
index_base = minimum_index;
block = 0;
30006b6c: e3a04000 mov r4, #0
30006b70: ea000002 b 30006b80 <_Objects_Extend_information+0x74>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
30006b74: e5b29004 ldr r9, [r2, #4]!
30006b78: e3590000 cmp r9, #0
30006b7c: 0a000004 beq 30006b94 <_Objects_Extend_information+0x88>
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
30006b80: e2844001 add r4, r4, #1
30006b84: e1530004 cmp r3, r4
if ( information->object_blocks[ block ] == NULL ) {
do_extend = false;
break;
} else
index_base += information->allocation_size;
30006b88: e0866008 add r6, r6, r8
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
30006b8c: 8afffff8 bhi 30006b74 <_Objects_Extend_information+0x68>
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
30006b90: e3a09001 mov r9, #1
} else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
30006b94: e08aa001 add sl, sl, r1
/*
* We need to limit the number of objects to the maximum number
* representable in the index portion of the object Id. In the
* case of 16-bit Ids, this is only 256 object instances.
*/
if ( maximum > OBJECTS_ID_FINAL_INDEX ) {
30006b98: e35a0801 cmp sl, #65536 ; 0x10000
30006b9c: 2a000063 bcs 30006d30 <_Objects_Extend_information+0x224>
/*
* Allocate the name table, and the objects and if it fails either return or
* generate a fatal error depending on auto-extending being active.
*/
block_size = information->allocation_size * information->size;
if ( information->auto_extend ) {
30006ba0: e5d52012 ldrb r2, [r5, #18]
/*
* Allocate the name table, and the objects and if it fails either return or
* generate a fatal error depending on auto-extending being active.
*/
block_size = information->allocation_size * information->size;
30006ba4: e5950018 ldr r0, [r5, #24]
if ( information->auto_extend ) {
30006ba8: e3520000 cmp r2, #0
/*
* Allocate the name table, and the objects and if it fails either return or
* generate a fatal error depending on auto-extending being active.
*/
block_size = information->allocation_size * information->size;
30006bac: e0000091 mul r0, r1, r0
if ( information->auto_extend ) {
30006bb0: 1a000060 bne 30006d38 <_Objects_Extend_information+0x22c>
new_object_block = _Workspace_Allocate( block_size );
if ( !new_object_block )
return;
} else {
new_object_block = _Workspace_Allocate_or_fatal_error( block_size );
30006bb4: e58d3000 str r3, [sp]
30006bb8: eb00083d bl 30008cb4 <_Workspace_Allocate_or_fatal_error>
30006bbc: e59d3000 ldr r3, [sp]
30006bc0: e1a08000 mov r8, r0
}
/*
* Do we need to grow the tables?
*/
if ( do_extend ) {
30006bc4: e3590000 cmp r9, #0
30006bc8: 0a000039 beq 30006cb4 <_Objects_Extend_information+0x1a8>
*/
/*
* Up the block count and maximum
*/
block_count++;
30006bcc: e283b001 add fp, r3, #1
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
30006bd0: e08b008b add r0, fp, fp, lsl #1
((maximum + minimum_index) * sizeof(Objects_Control *));
30006bd4: e08a0000 add r0, sl, r0
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
30006bd8: e0800007 add r0, r0, r7
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
30006bdc: e1a00100 lsl r0, r0, #2
30006be0: e58d3000 str r3, [sp]
30006be4: eb000828 bl 30008c8c <_Workspace_Allocate>
if ( !object_blocks ) {
30006be8: e2509000 subs r9, r0, #0
30006bec: e59d3000 ldr r3, [sp]
30006bf0: 0a000073 beq 30006dc4 <_Objects_Extend_information+0x2b8>
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
30006bf4: e1d521b0 ldrh r2, [r5, #16]
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
30006bf8: e089c10b add ip, r9, fp, lsl #2
30006bfc: e1570002 cmp r7, r2
30006c00: e089b18b add fp, r9, fp, lsl #3
30006c04: 3a000051 bcc 30006d50 <_Objects_Extend_information+0x244>
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
30006c08: e3570000 cmp r7, #0
30006c0c: 13a02000 movne r2, #0
30006c10: 11a0100b movne r1, fp
local_table[ index ] = NULL;
30006c14: 11a00002 movne r0, r2
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
30006c18: 0a000003 beq 30006c2c <_Objects_Extend_information+0x120>
30006c1c: e2822001 add r2, r2, #1
30006c20: e1570002 cmp r7, r2
local_table[ index ] = NULL;
30006c24: e4810004 str r0, [r1], #4
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
30006c28: 8afffffb bhi 30006c1c <_Objects_Extend_information+0x110>
30006c2c: e1a03103 lsl r3, r3, #2
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
30006c30: e1d511b4 ldrh r1, [r5, #20]
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
30006c34: e3a00000 mov r0, #0
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
30006c38: e0861001 add r1, r6, r1
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
30006c3c: e1560001 cmp r6, r1
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
30006c40: e7890003 str r0, [r9, r3]
inactive_per_block[block_count] = 0;
30006c44: e78c0003 str r0, [ip, r3]
for ( index=index_base ;
30006c48: 2a000005 bcs 30006c64 <_Objects_Extend_information+0x158>
30006c4c: e08b2106 add r2, fp, r6, lsl #2
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
30006c50: e1a03006 mov r3, r6
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
index++ ) {
30006c54: e2833001 add r3, r3, #1
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
30006c58: e1530001 cmp r3, r1
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
30006c5c: e4820004 str r0, [r2], #4
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
30006c60: 3afffffb bcc 30006c54 <_Objects_Extend_information+0x148>
30006c64: e10f3000 mrs r3, CPSR
30006c68: e3832080 orr r2, r3, #128 ; 0x80
30006c6c: e129f002 msr CPSR_fc, r2
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
30006c70: e5952000 ldr r2, [r5]
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
30006c74: e1d510b4 ldrh r1, [r5, #4]
30006c78: e1a02c02 lsl r2, r2, #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 = (Objects_Maximum) maximum;
30006c7c: e1a0a80a lsl sl, sl, #16
30006c80: e3822801 orr r2, r2, #65536 ; 0x10000
30006c84: e1a0a82a lsr sl, sl, #16
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
30006c88: e1822d81 orr r2, r2, r1, lsl #27
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
30006c8c: e182200a orr r2, r2, sl
local_table[ index ] = NULL;
}
_ISR_Disable( level );
old_tables = information->object_blocks;
30006c90: e5950034 ldr r0, [r5, #52] ; 0x34
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
30006c94: e585c030 str ip, [r5, #48] ; 0x30
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
30006c98: e5859034 str r9, [r5, #52] ; 0x34
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
30006c9c: e585b01c str fp, [r5, #28]
information->maximum = (Objects_Maximum) maximum;
30006ca0: e1c5a1b0 strh sl, [r5, #16]
information->maximum_id = _Objects_Build_id(
30006ca4: e585200c str r2, [r5, #12]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
30006ca8: e129f003 msr CPSR_fc, r3
information->maximum
);
_ISR_Enable( level );
if ( old_tables )
30006cac: e3500000 cmp r0, #0
_Workspace_Free( old_tables );
30006cb0: 1b0007fb blne 30008ca4 <_Workspace_Free>
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
30006cb4: e5953034 ldr r3, [r5, #52] ; 0x34
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
30006cb8: e28d7008 add r7, sp, #8
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
30006cbc: e7838104 str r8, [r3, r4, lsl #2]
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
30006cc0: e1a01008 mov r1, r8
30006cc4: e1a00007 mov r0, r7
30006cc8: e1d521b4 ldrh r2, [r5, #20]
30006ccc: e5953018 ldr r3, [r5, #24]
30006cd0: eb001226 bl 3000b570 <_Chain_Initialize>
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
30006cd4: e1a04104 lsl r4, r4, #2
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
30006cd8: e2858020 add r8, r5, #32
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
30006cdc: ea000009 b 30006d08 <_Objects_Extend_information+0x1fc>
30006ce0: e5953000 ldr r3, [r5]
the_object->id = _Objects_Build_id(
30006ce4: e1d520b4 ldrh r2, [r5, #4]
30006ce8: e1a03c03 lsl r3, r3, #24
30006cec: e3833801 orr r3, r3, #65536 ; 0x10000
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
30006cf0: e1833d82 orr r3, r3, r2, lsl #27
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
30006cf4: e1833006 orr r3, r3, r6
30006cf8: e5813008 str r3, [r1, #8]
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
30006cfc: e1a00008 mov r0, r8
30006d00: ebfffce4 bl 30006098 <_Chain_Append>
index++;
30006d04: e2866001 add r6, r6, #1
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
30006d08: e1a00007 mov r0, r7
30006d0c: ebfffcf4 bl 300060e4 <_Chain_Get>
30006d10: e2501000 subs r1, r0, #0
30006d14: 1afffff1 bne 30006ce0 <_Objects_Extend_information+0x1d4>
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
30006d18: e1d522bc ldrh r2, [r5, #44] ; 0x2c
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
30006d1c: e1d531b4 ldrh r3, [r5, #20]
30006d20: e5951030 ldr r1, [r5, #48] ; 0x30
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
30006d24: e0832002 add r2, r3, r2
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
30006d28: e7813004 str r3, [r1, r4]
information->inactive =
30006d2c: e1c522bc strh r2, [r5, #44] ; 0x2c
(Objects_Maximum)(information->inactive + information->allocation_size);
}
30006d30: e28dd014 add sp, sp, #20
30006d34: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
* Allocate the name table, and the objects and if it fails either return or
* generate a fatal error depending on auto-extending being active.
*/
block_size = information->allocation_size * information->size;
if ( information->auto_extend ) {
new_object_block = _Workspace_Allocate( block_size );
30006d38: e58d3000 str r3, [sp]
30006d3c: eb0007d2 bl 30008c8c <_Workspace_Allocate>
if ( !new_object_block )
30006d40: e2508000 subs r8, r0, #0
30006d44: e59d3000 ldr r3, [sp]
30006d48: 1affff9d bne 30006bc4 <_Objects_Extend_information+0xb8>
30006d4c: eafffff7 b 30006d30 <_Objects_Extend_information+0x224>
/*
* 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,
30006d50: e1a03103 lsl r3, r3, #2
30006d54: e5951034 ldr r1, [r5, #52] ; 0x34
30006d58: e1a02003 mov r2, r3
30006d5c: e88d1008 stm sp, {r3, ip}
30006d60: eb001d92 bl 3000e3b0 <memcpy>
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
30006d64: e89d1008 ldm sp, {r3, ip}
30006d68: e1a0000c mov r0, ip
30006d6c: e1a02003 mov r2, r3
30006d70: e5951030 ldr r1, [r5, #48] ; 0x30
30006d74: eb001d8d bl 3000e3b0 <memcpy>
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
information->local_table,
(information->maximum + minimum_index) * sizeof(Objects_Control *) );
30006d78: e1d521b0 ldrh r2, [r5, #16]
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
30006d7c: e1a0000b mov r0, fp
information->local_table,
(information->maximum + minimum_index) * sizeof(Objects_Control *) );
30006d80: e0872002 add r2, r7, r2
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
30006d84: e595101c ldr r1, [r5, #28]
30006d88: e1a02102 lsl r2, r2, #2
30006d8c: eb001d87 bl 3000e3b0 <memcpy>
30006d90: e89d1008 ldm sp, {r3, ip}
30006d94: eaffffa5 b 30006c30 <_Objects_Extend_information+0x124>
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
30006d98: e1d0a1b0 ldrh sl, [r0, #16]
30006d9c: e1d011b4 ldrh r1, [r0, #20]
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
30006da0: e1a06007 mov r6, r7
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
30006da4: e3a09001 mov r9, #1
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
block_count = 0;
30006da8: e1a03004 mov r3, r4
30006dac: eaffff78 b 30006b94 <_Objects_Extend_information+0x88>
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
30006db0: e1a01008 mov r1, r8 <== NOT EXECUTED
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
30006db4: e1a06007 mov r6, r7 <== NOT EXECUTED
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
30006db8: e3a09001 mov r9, #1 <== NOT EXECUTED
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
30006dbc: e1a04003 mov r4, r3 <== NOT EXECUTED
30006dc0: eaffff73 b 30006b94 <_Objects_Extend_information+0x88> <== NOT EXECUTED
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
if ( !object_blocks ) {
_Workspace_Free( new_object_block );
30006dc4: e1a00008 mov r0, r8
30006dc8: eb0007b5 bl 30008ca4 <_Workspace_Free>
return;
30006dcc: eaffffd7 b 30006d30 <_Objects_Extend_information+0x224>
300077b8 <_Objects_Set_name>:
bool _Objects_Set_name(
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
300077b8: e92d40f0 push {r4, r5, r6, r7, lr}
300077bc: e1a05000 mov r5, r0
300077c0: e1a06001 mov r6, r1
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
300077c4: e1a00002 mov r0, r2
300077c8: e1d513ba ldrh r1, [r5, #58] ; 0x3a
bool _Objects_Set_name(
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
300077cc: e1a07002 mov r7, r2
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
300077d0: eb002207 bl 3000fff4 <strnlen>
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
300077d4: e5d53038 ldrb r3, [r5, #56] ; 0x38
{
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
300077d8: e1a04000 mov r4, r0
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
300077dc: e3530000 cmp r3, #0
300077e0: 1a000017 bne 30007844 <_Objects_Set_name+0x8c>
d[length] = '\0';
the_object->name.name_p = d;
} else
#endif
{
the_object->name.name_u32 = _Objects_Build_name(
300077e4: e5d72000 ldrb r2, [r7]
300077e8: e3500001 cmp r0, #1
300077ec: e1a02c02 lsl r2, r2, #24
300077f0: 9a00000c bls 30007828 <_Objects_Set_name+0x70>
300077f4: e5d73001 ldrb r3, [r7, #1]
300077f8: e3500002 cmp r0, #2
300077fc: e1822803 orr r2, r2, r3, lsl #16
30007800: 0a000009 beq 3000782c <_Objects_Set_name+0x74>
30007804: e5d73002 ldrb r3, [r7, #2]
30007808: e3500003 cmp r0, #3
3000780c: e1822403 orr r2, r2, r3, lsl #8
30007810: 15d73003 ldrbne r3, [r7, #3]
30007814: 03a03020 moveq r3, #32
30007818: e1823003 orr r3, r2, r3
3000781c: e586300c str r3, [r6, #12]
((3 < length) ? s[ 3 ] : ' ')
);
}
return true;
30007820: e3a00001 mov r0, #1
30007824: e8bd80f0 pop {r4, r5, r6, r7, pc}
d[length] = '\0';
the_object->name.name_p = d;
} else
#endif
{
the_object->name.name_u32 = _Objects_Build_name(
30007828: e3822602 orr r2, r2, #2097152 ; 0x200000
3000782c: e3822a02 orr r2, r2, #8192 ; 0x2000
30007830: e3a03020 mov r3, #32
30007834: e1823003 orr r3, r2, r3
30007838: e586300c str r3, [r6, #12]
((3 < length) ? s[ 3 ] : ' ')
);
}
return true;
3000783c: e3a00001 mov r0, #1
30007840: e8bd80f0 pop {r4, r5, r6, r7, pc}
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
char *d;
d = _Workspace_Allocate( length + 1 );
30007844: e2800001 add r0, r0, #1
30007848: eb0006e9 bl 300093f4 <_Workspace_Allocate>
if ( !d )
3000784c: e2505000 subs r5, r0, #0
30007850: 0a00000e beq 30007890 <_Objects_Set_name+0xd8>
return false;
if ( the_object->name.name_p ) {
30007854: e596000c ldr r0, [r6, #12]
30007858: e3500000 cmp r0, #0
3000785c: 0a000002 beq 3000786c <_Objects_Set_name+0xb4>
_Workspace_Free( (void *)the_object->name.name_p );
30007860: eb0006e9 bl 3000940c <_Workspace_Free>
the_object->name.name_p = NULL;
30007864: e3a03000 mov r3, #0
30007868: e586300c str r3, [r6, #12]
}
strncpy( d, name, length );
3000786c: e1a00005 mov r0, r5
30007870: e1a01007 mov r1, r7
30007874: e1a02004 mov r2, r4
30007878: eb0021a2 bl 3000ff08 <strncpy>
d[length] = '\0';
3000787c: e3a03000 mov r3, #0
30007880: e7c53004 strb r3, [r5, r4]
((3 < length) ? s[ 3 ] : ' ')
);
}
return true;
30007884: e3a00001 mov r0, #1
the_object->name.name_p = NULL;
}
strncpy( d, name, length );
d[length] = '\0';
the_object->name.name_p = d;
30007888: e586500c str r5, [r6, #12]
3000788c: e8bd80f0 pop {r4, r5, r6, r7, pc}
if ( information->is_string ) {
char *d;
d = _Workspace_Allocate( length + 1 );
if ( !d )
return false;
30007890: e1a00005 mov r0, r5 <== NOT EXECUTED
);
}
return true;
}
30007894: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
30007130 <_Objects_Shrink_information>:
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
30007130: e92d40f0 push {r4, r5, r6, r7, lr}
/*
* Search the list to find block or chunk with all objects inactive.
*/
index_base = _Objects_Get_index( information->minimum_id );
30007134: e1d040b8 ldrh r4, [r0, #8]
block_count = (information->maximum - index_base) /
30007138: e1d051b4 ldrh r5, [r0, #20]
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
3000713c: e1a06000 mov r6, r0
/*
* Search the list to find block or chunk with all objects inactive.
*/
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
30007140: e1d001b0 ldrh r0, [r0, #16]
30007144: e1a01005 mov r1, r5
30007148: e0640000 rsb r0, r4, r0
3000714c: eb002818 bl 300111b4 <__aeabi_uidiv>
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
30007150: e3500000 cmp r0, #0
30007154: 08bd80f0 popeq {r4, r5, r6, r7, pc}
if ( information->inactive_per_block[ block ] ==
30007158: e5962030 ldr r2, [r6, #48] ; 0x30
3000715c: e5923000 ldr r3, [r2]
30007160: e1550003 cmp r5, r3
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
30007164: 13a03000 movne r3, #0
if ( information->inactive_per_block[ block ] ==
30007168: 1a000005 bne 30007184 <_Objects_Shrink_information+0x54>
3000716c: ea000008 b 30007194 <_Objects_Shrink_information+0x64> <== NOT EXECUTED
30007170: e5b21004 ldr r1, [r2, #4]!
information->inactive -= information->allocation_size;
return;
}
index_base += information->allocation_size;
30007174: e0844005 add r4, r4, r5
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
if ( information->inactive_per_block[ block ] ==
30007178: e1550001 cmp r5, r1
information->inactive -= information->allocation_size;
return;
}
index_base += information->allocation_size;
3000717c: e1a07103 lsl r7, r3, #2
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
if ( information->inactive_per_block[ block ] ==
30007180: 0a000004 beq 30007198 <_Objects_Shrink_information+0x68>
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
30007184: e2833001 add r3, r3, #1
30007188: e1500003 cmp r0, r3
3000718c: 8afffff7 bhi 30007170 <_Objects_Shrink_information+0x40>
30007190: e8bd80f0 pop {r4, r5, r6, r7, pc}
if ( information->inactive_per_block[ block ] ==
30007194: e3a07000 mov r7, #0 <== NOT EXECUTED
information->allocation_size ) {
/*
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) information->Inactive.first;
30007198: e5960020 ldr r0, [r6, #32]
3000719c: ea000002 b 300071ac <_Objects_Shrink_information+0x7c>
if ((index >= index_base) &&
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
}
}
while ( the_object );
300071a0: e3550000 cmp r5, #0
300071a4: 0a00000b beq 300071d8 <_Objects_Shrink_information+0xa8>
index = _Objects_Get_index( the_object->id );
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
300071a8: e1a00005 mov r0, r5
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) information->Inactive.first;
do {
index = _Objects_Get_index( the_object->id );
300071ac: e1d030b8 ldrh r3, [r0, #8]
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
300071b0: e5905000 ldr r5, [r0]
if ((index >= index_base) &&
300071b4: e1530004 cmp r3, r4
300071b8: 3afffff8 bcc 300071a0 <_Objects_Shrink_information+0x70>
(index < (index_base + information->allocation_size))) {
300071bc: e1d621b4 ldrh r2, [r6, #20]
300071c0: e0842002 add r2, r4, r2
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
if ((index >= index_base) &&
300071c4: e1530002 cmp r3, r2
300071c8: 2afffff4 bcs 300071a0 <_Objects_Shrink_information+0x70>
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
300071cc: ebfffbbc bl 300060c4 <_Chain_Extract>
}
}
while ( the_object );
300071d0: e3550000 cmp r5, #0
300071d4: 1afffff3 bne 300071a8 <_Objects_Shrink_information+0x78>
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
300071d8: e5963034 ldr r3, [r6, #52] ; 0x34
300071dc: e7930007 ldr r0, [r3, r7]
300071e0: eb0006af bl 30008ca4 <_Workspace_Free>
information->object_blocks[ block ] = NULL;
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
300071e4: e1d602bc ldrh r0, [r6, #44] ; 0x2c
300071e8: e1d631b4 ldrh r3, [r6, #20]
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
300071ec: e5961034 ldr r1, [r6, #52] ; 0x34
information->inactive_per_block[ block ] = 0;
300071f0: e5962030 ldr r2, [r6, #48] ; 0x30
information->inactive -= information->allocation_size;
300071f4: e0633000 rsb r3, r3, r0
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
300071f8: e7815007 str r5, [r1, r7]
information->inactive_per_block[ block ] = 0;
300071fc: e7825007 str r5, [r2, r7]
information->inactive -= information->allocation_size;
30007200: e1c632bc strh r3, [r6, #44] ; 0x2c
return;
30007204: e8bd80f0 pop {r4, r5, r6, r7, pc}
3000684c <_POSIX_Condition_variables_Wait_support>:
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
3000684c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
30006850: e24dd004 sub sp, sp, #4
30006854: e1a04001 mov r4, r1
30006858: e1a06000 mov r6, r0
register POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
int status;
int mutex_status;
if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
3000685c: e1a00001 mov r0, r1
30006860: e1a0100d mov r1, sp
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
30006864: e1a08002 mov r8, r2
30006868: e20370ff and r7, r3, #255 ; 0xff
register POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
int status;
int mutex_status;
if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
3000686c: eb00005a bl 300069dc <_POSIX_Mutex_Get>
30006870: e3500000 cmp r0, #0
30006874: 0a00000a beq 300068a4 <_POSIX_Condition_variables_Wait_support+0x58>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
30006878: e59f30d8 ldr r3, [pc, #216] ; 30006958 <_POSIX_Condition_variables_Wait_support+0x10c>
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
3000687c: e1a00006 mov r0, r6
30006880: e5932000 ldr r2, [r3]
30006884: e1a0100d mov r1, sp
30006888: e2422001 sub r2, r2, #1
3000688c: e5832000 str r2, [r3]
30006890: ebffff76 bl 30006670 <_POSIX_Condition_variables_Get>
switch ( location ) {
30006894: e59d3000 ldr r3, [sp]
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
30006898: e1a0a000 mov sl, r0
switch ( location ) {
3000689c: e3530000 cmp r3, #0
300068a0: 0a000003 beq 300068b4 <_POSIX_Condition_variables_Wait_support+0x68>
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
300068a4: e3a05016 mov r5, #22
}
300068a8: e1a00005 mov r0, r5
300068ac: e28dd004 add sp, sp, #4
300068b0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
the_cond = _POSIX_Condition_variables_Get( cond, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) {
300068b4: e5903014 ldr r3, [r0, #20]
300068b8: e3530000 cmp r3, #0
300068bc: 0a000005 beq 300068d8 <_POSIX_Condition_variables_Wait_support+0x8c>
300068c0: e5942000 ldr r2, [r4]
300068c4: e1530002 cmp r3, r2
300068c8: 0a000002 beq 300068d8 <_POSIX_Condition_variables_Wait_support+0x8c>
_Thread_Enable_dispatch();
300068cc: eb000c82 bl 30009adc <_Thread_Enable_dispatch>
return EINVAL;
300068d0: e3a05016 mov r5, #22
300068d4: eafffff3 b 300068a8 <_POSIX_Condition_variables_Wait_support+0x5c>
}
(void) pthread_mutex_unlock( mutex );
300068d8: e1a00004 mov r0, r4
300068dc: eb0000e4 bl 30006c74 <pthread_mutex_unlock>
_Thread_Enable_dispatch();
return EINVAL;
}
*/
if ( !already_timedout ) {
300068e0: e3570000 cmp r7, #0
300068e4: 0a000006 beq 30006904 <_POSIX_Condition_variables_Wait_support+0xb8>
status = _Thread_Executing->Wait.return_code;
if ( status && status != ETIMEDOUT )
return status;
} else {
_Thread_Enable_dispatch();
300068e8: eb000c7b bl 30009adc <_Thread_Enable_dispatch>
status = ETIMEDOUT;
300068ec: e3a05074 mov r5, #116 ; 0x74
/*
* When we get here the dispatch disable level is 0.
*/
mutex_status = pthread_mutex_lock( mutex );
300068f0: e1a00004 mov r0, r4
300068f4: eb0000bd bl 30006bf0 <pthread_mutex_lock>
if ( mutex_status )
return EINVAL;
300068f8: e3500000 cmp r0, #0
300068fc: 13a05016 movne r5, #22
30006900: eaffffe8 b 300068a8 <_POSIX_Condition_variables_Wait_support+0x5c>
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
30006904: e59f5050 ldr r5, [pc, #80] ; 3000695c <_POSIX_Condition_variables_Wait_support+0x110>
return EINVAL;
}
*/
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
30006908: e5942000 ldr r2, [r4]
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
3000690c: e5953004 ldr r3, [r5, #4]
return EINVAL;
}
*/
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
30006910: e58a2014 str r2, [sl, #20]
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
30006914: e3a02001 mov r2, #1
30006918: e58a2048 str r2, [sl, #72] ; 0x48
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
3000691c: e5837034 str r7, [r3, #52] ; 0x34
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
_Thread_Executing->Wait.id = *cond;
30006920: e5962000 ldr r2, [r6]
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;
30006924: e28a0018 add r0, sl, #24
_Thread_Executing->Wait.id = *cond;
30006928: e5832020 str r2, [r3, #32]
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
3000692c: e5830044 str r0, [r3, #68] ; 0x44
_Thread_Executing->Wait.id = *cond;
_Thread_queue_Enqueue( &the_cond->Wait_queue, timeout );
30006930: e1a01008 mov r1, r8
30006934: e59f2024 ldr r2, [pc, #36] ; 30006960 <_POSIX_Condition_variables_Wait_support+0x114>
30006938: eb000d9c bl 30009fb0 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
3000693c: eb000c66 bl 30009adc <_Thread_Enable_dispatch>
/*
* Switch ourself out because we blocked as a result of the
* _Thread_queue_Enqueue.
*/
status = _Thread_Executing->Wait.return_code;
30006940: e5953004 ldr r3, [r5, #4]
30006944: e5935034 ldr r5, [r3, #52] ; 0x34
if ( status && status != ETIMEDOUT )
30006948: e3550074 cmp r5, #116 ; 0x74
3000694c: 13550000 cmpne r5, #0
30006950: 0affffe6 beq 300068f0 <_POSIX_Condition_variables_Wait_support+0xa4>
30006954: eaffffd3 b 300068a8 <_POSIX_Condition_variables_Wait_support+0x5c><== NOT EXECUTED
3000da74 <_POSIX_signals_Clear_process_signals>:
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
3000da74: e10f2000 mrs r2, CPSR
3000da78: e3823080 orr r3, r2, #128 ; 0x80
3000da7c: e129f003 msr CPSR_fc, r3
mask = signo_to_mask( signo );
ISR_Level level;
_ISR_Disable( level );
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
3000da80: e59f1050 ldr r1, [pc, #80] ; 3000dad8 <_POSIX_signals_Clear_process_signals+0x64>
3000da84: e0803080 add r3, r0, r0, lsl #1
3000da88: e7911103 ldr r1, [r1, r3, lsl #2]
3000da8c: e1a0c103 lsl ip, r3, #2
3000da90: e3510002 cmp r1, #2
3000da94: 0a000007 beq 3000dab8 <_POSIX_signals_Clear_process_signals+0x44>
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
clear_signal = false;
}
if ( clear_signal ) {
_POSIX_signals_Pending &= ~mask;
3000da98: e59f303c ldr r3, [pc, #60] ; 3000dadc <_POSIX_signals_Clear_process_signals+0x68>
3000da9c: e3a0c001 mov ip, #1
3000daa0: e5931000 ldr r1, [r3]
3000daa4: e2400001 sub r0, r0, #1
3000daa8: e1c1001c bic r0, r1, ip, lsl r0
3000daac: e5830000 str r0, [r3]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
3000dab0: e129f002 msr CPSR_fc, r2
}
_ISR_Enable( level );
}
3000dab4: e12fff1e bx lr
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
3000dab8: e59f1020 ldr r1, [pc, #32] ; 3000dae0 <_POSIX_signals_Clear_process_signals+0x6c>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
3000dabc: e28cc004 add ip, ip, #4
ISR_Level level;
_ISR_Disable( level );
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
3000dac0: e7913103 ldr r3, [r1, r3, lsl #2]
3000dac4: e08c1001 add r1, ip, r1
3000dac8: e1530001 cmp r3, r1
3000dacc: 0afffff1 beq 3000da98 <_POSIX_signals_Clear_process_signals+0x24>
3000dad0: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
}
if ( clear_signal ) {
_POSIX_signals_Pending &= ~mask;
}
_ISR_Enable( level );
}
3000dad4: e12fff1e bx lr <== NOT EXECUTED
30006730 <_TOD_Validate>:
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
30006730: e59f30b0 ldr r3, [pc, #176] ; 300067e8 <_TOD_Validate+0xb8>
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
30006734: e92d4010 push {r4, lr}
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
30006738: e2504000 subs r4, r0, #0
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
3000673c: e593100c ldr r1, [r3, #12]
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
return false;
30006740: 01a00004 moveq r0, r4
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
30006744: 08bd8010 popeq {r4, pc}
)
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
30006748: e59f009c ldr r0, [pc, #156] ; 300067ec <_TOD_Validate+0xbc>
3000674c: eb0048da bl 30018abc <__aeabi_uidiv>
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
30006750: e5943018 ldr r3, [r4, #24]
30006754: e1500003 cmp r0, r3
30006758: 9a00001e bls 300067d8 <_TOD_Validate+0xa8>
(the_tod->ticks >= ticks_per_second) ||
3000675c: e5943014 ldr r3, [r4, #20]
30006760: e353003b cmp r3, #59 ; 0x3b
30006764: 8a00001b bhi 300067d8 <_TOD_Validate+0xa8>
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
30006768: e5943010 ldr r3, [r4, #16]
3000676c: e353003b cmp r3, #59 ; 0x3b
30006770: 8a000018 bhi 300067d8 <_TOD_Validate+0xa8>
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
30006774: e594300c ldr r3, [r4, #12]
30006778: e3530017 cmp r3, #23
3000677c: 8a000015 bhi 300067d8 <_TOD_Validate+0xa8>
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
30006780: e5940004 ldr r0, [r4, #4]
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
(the_tod->ticks >= ticks_per_second) ||
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
30006784: e3500000 cmp r0, #0
30006788: 08bd8010 popeq {r4, pc}
(the_tod->month == 0) ||
3000678c: e350000c cmp r0, #12
30006790: 8a000010 bhi 300067d8 <_TOD_Validate+0xa8>
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
30006794: e5943000 ldr r3, [r4]
(the_tod->ticks >= ticks_per_second) ||
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
30006798: e59f2050 ldr r2, [pc, #80] ; 300067f0 <_TOD_Validate+0xc0>
3000679c: e1530002 cmp r3, r2
300067a0: 9a00000c bls 300067d8 <_TOD_Validate+0xa8>
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
300067a4: e5944008 ldr r4, [r4, #8]
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
300067a8: e3540000 cmp r4, #0
300067ac: 0a00000b beq 300067e0 <_TOD_Validate+0xb0>
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
300067b0: e3130003 tst r3, #3
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
300067b4: 059f3038 ldreq r3, [pc, #56] ; 300067f4 <_TOD_Validate+0xc4>
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
300067b8: 159f3034 ldrne r3, [pc, #52] ; 300067f4 <_TOD_Validate+0xc4>
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
300067bc: 0280000d addeq r0, r0, #13
300067c0: 07930100 ldreq r0, [r3, r0, lsl #2]
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
300067c4: 17930100 ldrne r0, [r3, r0, lsl #2]
* false - if the the_tod is invalid
*
* NOTE: This routine only works for leap-years through 2099.
*/
bool _TOD_Validate(
300067c8: e1500004 cmp r0, r4
300067cc: 33a00000 movcc r0, #0
300067d0: 23a00001 movcs r0, #1
300067d4: e8bd8010 pop {r4, pc}
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
return false;
300067d8: e3a00000 mov r0, #0
300067dc: e8bd8010 pop {r4, pc}
300067e0: e1a00004 mov r0, r4 <== NOT EXECUTED
if ( the_tod->day > days_in_month )
return false;
return true;
}
300067e4: e8bd8010 pop {r4, pc} <== NOT EXECUTED
30007ddc <_Thread_queue_Enqueue_priority>:
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
30007ddc: e5913014 ldr r3, [r1, #20]
Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
30007de0: e92d0ff0 push {r4, r5, r6, r7, r8, r9, sl, fp}
30007de4: e281403c add r4, r1, #60 ; 0x3c
Chain_Node *previous_node;
Chain_Node *search_node;
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
30007de8: e281c038 add ip, r1, #56 ; 0x38
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
30007dec: e5814038 str r4, [r1, #56] ; 0x38
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 ) )
30007df0: e3130020 tst r3, #32
the_chain->permanent_null = NULL;
30007df4: e3a04000 mov r4, #0
30007df8: e581403c str r4, [r1, #60] ; 0x3c
the_chain->last = _Chain_Head(the_chain);
30007dfc: e581c040 str ip, [r1, #64] ; 0x40
RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number (
Priority_Control the_priority
)
{
return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER);
30007e00: e1a08323 lsr r8, r3, #6
_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;
30007e04: e5905038 ldr r5, [r0, #56] ; 0x38
if ( _Thread_queue_Is_reverse_search( priority ) )
30007e08: 1a00001f bne 30007e8c <_Thread_queue_Enqueue_priority+0xb0>
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
30007e0c: e0888088 add r8, r8, r8, lsl #1
30007e10: e1a09108 lsl r9, r8, #2
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
30007e14: e2898004 add r8, r9, #4
30007e18: e0808008 add r8, r0, r8
30007e1c: e0809009 add r9, r0, r9
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
30007e20: e10f7000 mrs r7, CPSR
30007e24: e387c080 orr ip, r7, #128 ; 0x80
30007e28: e129f00c msr CPSR_fc, ip
30007e2c: e1a0a007 mov sl, r7
30007e30: e599c000 ldr ip, [r9]
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
30007e34: e15c0008 cmp ip, r8
30007e38: 1a000009 bne 30007e64 <_Thread_queue_Enqueue_priority+0x88>
30007e3c: ea000054 b 30007f94 <_Thread_queue_Enqueue_priority+0x1b8>
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
30007e40: e10f6000 mrs r6, CPSR
30007e44: e129f007 msr CPSR_fc, r7
30007e48: e129f006 msr CPSR_fc, r6
RTEMS_INLINE_ROUTINE bool _States_Are_set (
States_Control the_states,
States_Control mask
)
{
return ( (the_states & mask) != STATES_READY);
30007e4c: e59c6010 ldr r6, [ip, #16]
search_priority = search_thread->current_priority;
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
30007e50: e1150006 tst r5, r6
30007e54: 0a000036 beq 30007f34 <_Thread_queue_Enqueue_priority+0x158>
_ISR_Enable( level );
goto restart_forward_search;
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
30007e58: e59cc000 ldr ip, [ip]
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 ) ) {
30007e5c: e15c0008 cmp ip, r8
30007e60: 0a000002 beq 30007e70 <_Thread_queue_Enqueue_priority+0x94>
search_priority = search_thread->current_priority;
30007e64: e59c4014 ldr r4, [ip, #20]
if ( priority <= search_priority )
30007e68: e1530004 cmp r3, r4
30007e6c: 8afffff3 bhi 30007e40 <_Thread_queue_Enqueue_priority+0x64>
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
30007e70: e5905030 ldr r5, [r0, #48] ; 0x30
30007e74: e3550001 cmp r5, #1
30007e78: 0a00002f beq 30007f3c <_Thread_queue_Enqueue_priority+0x160>
* 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;
30007e7c: e582a000 str sl, [r2]
return the_thread_queue->sync_state;
}
30007e80: e1a00005 mov r0, r5
30007e84: e8bd0ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp}
30007e88: e12fff1e bx lr
_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 ];
30007e8c: e0888088 add r8, r8, r8, lsl #1
30007e90: e0808108 add r8, r0, r8, lsl #2
30007e94: e59f9100 ldr r9, [pc, #256] ; 30007f9c <_Thread_queue_Enqueue_priority+0x1c0>
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
30007e98: e1a0b008 mov fp, r8
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
30007e9c: e5d94000 ldrb r4, [r9]
30007ea0: e2844001 add r4, r4, #1
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
30007ea4: e10f7000 mrs r7, CPSR
30007ea8: e387c080 orr ip, r7, #128 ; 0x80
30007eac: e129f00c msr CPSR_fc, ip
30007eb0: e1a0a007 mov sl, r7
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
30007eb4: e59bc008 ldr ip, [fp, #8]
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
30007eb8: e15c0008 cmp ip, r8
30007ebc: 1a000009 bne 30007ee8 <_Thread_queue_Enqueue_priority+0x10c>
30007ec0: ea00000b b 30007ef4 <_Thread_queue_Enqueue_priority+0x118>
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
30007ec4: e10f6000 mrs r6, CPSR
30007ec8: e129f007 msr CPSR_fc, r7
30007ecc: e129f006 msr CPSR_fc, r6
30007ed0: e59c6010 ldr r6, [ip, #16]
search_priority = search_thread->current_priority;
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
30007ed4: e1150006 tst r5, r6
30007ed8: 0a000013 beq 30007f2c <_Thread_queue_Enqueue_priority+0x150>
_ISR_Enable( level );
goto restart_reverse_search;
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
30007edc: e59cc004 ldr ip, [ip, #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 ) ) {
30007ee0: e15c0008 cmp ip, r8
30007ee4: 0a000002 beq 30007ef4 <_Thread_queue_Enqueue_priority+0x118>
search_priority = search_thread->current_priority;
30007ee8: e59c4014 ldr r4, [ip, #20]
if ( priority >= search_priority )
30007eec: e1530004 cmp r3, r4
30007ef0: 3afffff3 bcc 30007ec4 <_Thread_queue_Enqueue_priority+0xe8>
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
30007ef4: e5905030 ldr r5, [r0, #48] ; 0x30
30007ef8: e3550001 cmp r5, #1
30007efc: 1affffde bne 30007e7c <_Thread_queue_Enqueue_priority+0xa0>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( priority == search_priority )
30007f00: e1530004 cmp r3, r4
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
30007f04: e3a03000 mov r3, #0
30007f08: e5803030 str r3, [r0, #48] ; 0x30
if ( priority == search_priority )
30007f0c: 0a000016 beq 30007f6c <_Thread_queue_Enqueue_priority+0x190>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
30007f10: e59c3000 ldr r3, [ip]
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
30007f14: e8811008 stm r1, {r3, ip}
search_node->next = the_node;
next_node->previous = the_node;
30007f18: e5831004 str r1, [r3, #4]
next_node = search_node->next;
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
search_node->next = the_node;
30007f1c: e58c1000 str r1, [ip]
next_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
30007f20: e5810044 str r0, [r1, #68] ; 0x44
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
30007f24: e129f007 msr CPSR_fc, r7
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
30007f28: eaffffd4 b 30007e80 <_Thread_queue_Enqueue_priority+0xa4>
30007f2c: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED
30007f30: eaffffd9 b 30007e9c <_Thread_queue_Enqueue_priority+0xc0> <== NOT EXECUTED
30007f34: e129f007 msr CPSR_fc, r7
30007f38: eaffffb8 b 30007e20 <_Thread_queue_Enqueue_priority+0x44>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( priority == search_priority )
30007f3c: e1530004 cmp r3, r4
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
30007f40: e3a03000 mov r3, #0
30007f44: e5803030 str r3, [r0, #48] ; 0x30
if ( priority == search_priority )
30007f48: 0a000007 beq 30007f6c <_Thread_queue_Enqueue_priority+0x190>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
30007f4c: e59c3004 ldr r3, [ip, #4]
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
30007f50: e581c000 str ip, [r1]
the_node->previous = previous_node;
30007f54: e5813004 str r3, [r1, #4]
previous_node->next = the_node;
30007f58: e5831000 str r1, [r3]
search_node->previous = the_node;
30007f5c: e58c1004 str r1, [ip, #4]
the_thread->Wait.queue = the_thread_queue;
30007f60: e5810044 str r0, [r1, #68] ; 0x44
30007f64: e129f007 msr CPSR_fc, r7
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
30007f68: eaffffc4 b 30007e80 <_Thread_queue_Enqueue_priority+0xa4>
30007f6c: e28cc03c add ip, ip, #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;
30007f70: e59c3004 ldr r3, [ip, #4]
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
30007f74: e581c000 str ip, [r1]
the_node->previous = previous_node;
30007f78: e5813004 str r3, [r1, #4]
previous_node->next = the_node;
30007f7c: e5831000 str r1, [r3]
search_node->previous = the_node;
30007f80: e58c1004 str r1, [ip, #4]
the_thread->Wait.queue = the_thread_queue;
30007f84: e5810044 str r0, [r1, #68] ; 0x44
30007f88: e129f00a msr CPSR_fc, sl
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
30007f8c: e3a05001 mov r5, #1
30007f90: eaffffba b 30007e80 <_Thread_queue_Enqueue_priority+0xa4>
if ( _Thread_queue_Is_reverse_search( priority ) )
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
30007f94: e3e04000 mvn r4, #0
30007f98: eaffffb4 b 30007e70 <_Thread_queue_Enqueue_priority+0x94>
3000bd04 <_Thread_queue_Extract_priority_helper>:
void _Thread_queue_Extract_priority_helper(
Thread_queue_Control *the_thread_queue __attribute__((unused)),
Thread_Control *the_thread,
bool requeuing
)
{
3000bd04: e92d4070 push {r4, r5, r6, lr}
3000bd08: e20220ff and r2, r2, #255 ; 0xff
3000bd0c: e24dd004 sub sp, sp, #4
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
3000bd10: e10fc000 mrs ip, CPSR
3000bd14: e38c3080 orr r3, ip, #128 ; 0x80
3000bd18: e129f003 msr CPSR_fc, r3
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue (
States_Control the_states
)
{
return (the_states & STATES_WAITING_ON_THREAD_QUEUE);
3000bd1c: e59f30bc ldr r3, [pc, #188] ; 3000bde0 <_Thread_queue_Extract_priority_helper+0xdc>
3000bd20: e5910010 ldr r0, [r1, #16]
3000bd24: e0003003 and r3, r0, r3
Chain_Node *new_second_node;
Chain_Node *last_node;
the_node = (Chain_Node *) the_thread;
_ISR_Disable( level );
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
3000bd28: e3530000 cmp r3, #0
3000bd2c: 0a000021 beq 3000bdb8 <_Thread_queue_Extract_priority_helper+0xb4>
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
3000bd30: e5913038 ldr r3, [r1, #56] ; 0x38
/*
* The thread was actually waiting on a thread queue so let's remove it.
*/
next_node = the_node->next;
3000bd34: e8910030 ldm r1, {r4, r5}
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
3000bd38: e281003c add r0, r1, #60 ; 0x3c
previous_node = the_node->previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
3000bd3c: e1530000 cmp r3, r0
new_first_thread->Wait.Block2n.last = last_node;
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
}
} else {
previous_node->next = next_node;
3000bd40: 05854000 streq r4, [r5]
next_node->previous = previous_node;
3000bd44: 05845004 streq r5, [r4, #4]
*/
next_node = the_node->next;
previous_node = the_node->previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
3000bd48: 0a00000c beq 3000bd80 <_Thread_queue_Extract_priority_helper+0x7c>
new_first_node = the_thread->Wait.Block2n.first;
new_first_thread = (Thread_Control *) new_first_node;
last_node = the_thread->Wait.Block2n.last;
3000bd4c: e5910040 ldr r0, [r1, #64] ; 0x40
new_second_node = new_first_node->next;
3000bd50: e5936000 ldr r6, [r3]
previous_node->next = new_first_node;
next_node->previous = new_first_node;
new_first_node->next = next_node;
new_first_node->previous = previous_node;
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
3000bd54: e1500003 cmp r0, r3
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;
3000bd58: e5853000 str r3, [r5]
next_node->previous = new_first_node;
3000bd5c: e5843004 str r3, [r4, #4]
new_first_node->next = next_node;
3000bd60: e8830030 stm r3, {r4, r5}
new_first_node->previous = previous_node;
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
3000bd64: 0a000005 beq 3000bd80 <_Thread_queue_Extract_priority_helper+0x7c>
/* > two threads on 2-n */
new_second_node->previous =
_Chain_Head( &new_first_thread->Wait.Block2n );
3000bd68: e2835038 add r5, r3, #56 ; 0x38
3000bd6c: e283403c add r4, r3, #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 =
3000bd70: e5865004 str r5, [r6, #4]
_Chain_Head( &new_first_thread->Wait.Block2n );
new_first_thread->Wait.Block2n.first = new_second_node;
3000bd74: e5836038 str r6, [r3, #56] ; 0x38
new_first_thread->Wait.Block2n.last = last_node;
3000bd78: e5830040 str r0, [r3, #64] ; 0x40
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
3000bd7c: e5804000 str r4, [r0]
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
3000bd80: e3520000 cmp r2, #0
3000bd84: 1a000008 bne 3000bdac <_Thread_queue_Extract_priority_helper+0xa8>
_ISR_Enable( level );
return;
}
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
3000bd88: e5913050 ldr r3, [r1, #80] ; 0x50
3000bd8c: e3530002 cmp r3, #2
3000bd90: 0a00000a beq 3000bdc0 <_Thread_queue_Extract_priority_helper+0xbc>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
3000bd94: e129f00c msr CPSR_fc, ip
3000bd98: e1a00001 mov r0, r1
3000bd9c: e59f1040 ldr r1, [pc, #64] ; 3000bde4 <_Thread_queue_Extract_priority_helper+0xe0>
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
3000bda0: e28dd004 add sp, sp, #4
3000bda4: e8bd4070 pop {r4, r5, r6, lr}
3000bda8: eaffedb4 b 30007480 <_Thread_Clear_state>
3000bdac: e129f00c msr CPSR_fc, ip
3000bdb0: e28dd004 add sp, sp, #4
3000bdb4: e8bd8070 pop {r4, r5, r6, pc}
3000bdb8: e129f00c msr CPSR_fc, ip
3000bdbc: eafffffb b 3000bdb0 <_Thread_queue_Extract_priority_helper+0xac>
3000bdc0: e3a03003 mov r3, #3 <== NOT EXECUTED
3000bdc4: e5813050 str r3, [r1, #80] ; 0x50 <== NOT EXECUTED
3000bdc8: e129f00c msr CPSR_fc, ip <== NOT EXECUTED
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
(void) _Watchdog_Remove( &the_thread->Timer );
3000bdcc: e2810048 add r0, r1, #72 ; 0x48 <== NOT EXECUTED
3000bdd0: e58d1000 str r1, [sp] <== NOT EXECUTED
3000bdd4: ebfff343 bl 30008ae8 <_Watchdog_Remove> <== NOT EXECUTED
3000bdd8: e59d1000 ldr r1, [sp] <== NOT EXECUTED
3000bddc: eaffffed b 3000bd98 <_Thread_queue_Extract_priority_helper+0x94><== NOT EXECUTED
30016118 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
30016118: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
3001611c: e24dd024 sub sp, sp, #36 ; 0x24
30016120: e28d700c add r7, sp, #12
30016124: e28d2018 add r2, sp, #24
30016128: e282a004 add sl, r2, #4
3001612c: e2872004 add r2, r7, #4
30016130: e58d2000 str r2, [sp]
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
30016134: e28d2018 add r2, sp, #24
30016138: e58d2020 str r2, [sp, #32]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
3001613c: e59d2000 ldr r2, [sp]
the_chain->permanent_null = NULL;
30016140: e3a03000 mov r3, #0
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
30016144: e58d200c str r2, [sp, #12]
30016148: e2802008 add r2, r0, #8
3001614c: e58d2004 str r2, [sp, #4]
30016150: e59f91bc ldr r9, [pc, #444] ; 30016314 <_Timer_server_Body+0x1fc>
30016154: e2802040 add r2, r0, #64 ; 0x40
30016158: e59fb1b8 ldr fp, [pc, #440] ; 30016318 <_Timer_server_Body+0x200>
3001615c: e1a04000 mov r4, r0
30016160: e58da018 str sl, [sp, #24]
the_chain->permanent_null = NULL;
30016164: e58d301c str r3, [sp, #28]
30016168: e58d3010 str r3, [sp, #16]
the_chain->last = _Chain_Head(the_chain);
3001616c: e58d7014 str r7, [sp, #20]
30016170: e2806030 add r6, r0, #48 ; 0x30
30016174: e2808068 add r8, r0, #104 ; 0x68
30016178: e58d2008 str r2, [sp, #8]
{
/*
* Afterwards all timer inserts are directed to this chain and the interval
* and TOD chains will be no more modified by other parties.
*/
ts->insert_chain = insert_chain;
3001617c: e28d3018 add r3, sp, #24
30016180: e5843078 str r3, [r4, #120] ; 0x78
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
30016184: e5993000 ldr r3, [r9]
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
30016188: e594103c ldr r1, [r4, #60] ; 0x3c
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
3001618c: e1a02007 mov r2, r7
30016190: e1a00006 mov r0, r6
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
30016194: e584303c str r3, [r4, #60] ; 0x3c
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
30016198: e0611003 rsb r1, r1, r3
3001619c: eb0011c2 bl 3001a8ac <_Watchdog_Adjust_to_chain>
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
300161a0: e59b5000 ldr r5, [fp]
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
300161a4: e5942074 ldr r2, [r4, #116] ; 0x74
/*
* Process the seconds chain. Start by checking that the Time
* of Day (TOD) has not been set backwards. If it has then
* we want to adjust the watchdogs->Chain to indicate this.
*/
if ( snapshot > last_snapshot ) {
300161a8: e1550002 cmp r5, r2
300161ac: 8a000022 bhi 3001623c <_Timer_server_Body+0x124>
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
} else if ( snapshot < last_snapshot ) {
300161b0: 3a000018 bcc 30016218 <_Timer_server_Body+0x100>
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
}
watchdogs->last_snapshot = snapshot;
300161b4: e5845074 str r5, [r4, #116] ; 0x74
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
300161b8: e5940078 ldr r0, [r4, #120] ; 0x78
300161bc: eb0002cf bl 30016d00 <_Chain_Get>
if ( timer == NULL ) {
300161c0: e2501000 subs r1, r0, #0
300161c4: 0a00000b beq 300161f8 <_Timer_server_Body+0xe0>
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
300161c8: e5913038 ldr r3, [r1, #56] ; 0x38
300161cc: e3530001 cmp r3, #1
300161d0: 0a000015 beq 3001622c <_Timer_server_Body+0x114>
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
300161d4: e3530003 cmp r3, #3
300161d8: 1afffff6 bne 300161b8 <_Timer_server_Body+0xa0>
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
300161dc: e2811010 add r1, r1, #16
300161e0: e1a00008 mov r0, r8
300161e4: eb0011da bl 3001a954 <_Watchdog_Insert>
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
300161e8: e5940078 ldr r0, [r4, #120] ; 0x78
300161ec: eb0002c3 bl 30016d00 <_Chain_Get>
if ( timer == NULL ) {
300161f0: e2501000 subs r1, r0, #0
300161f4: 1afffff3 bne 300161c8 <_Timer_server_Body+0xb0>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
300161f8: e10f2000 mrs r2, CPSR
300161fc: e3823080 orr r3, r2, #128 ; 0x80
30016200: e129f003 msr CPSR_fc, r3
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
30016204: e59d3018 ldr r3, [sp, #24]
30016208: e15a0003 cmp sl, r3
3001620c: 0a00000f beq 30016250 <_Timer_server_Body+0x138>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
30016210: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
30016214: eaffffda b 30016184 <_Timer_server_Body+0x6c> <== NOT EXECUTED
/*
* The current TOD is before the last TOD which indicates that
* TOD has been set backwards.
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
30016218: e1a00008 mov r0, r8
3001621c: e3a01001 mov r1, #1
30016220: e0652002 rsb r2, r5, r2
30016224: eb001171 bl 3001a7f0 <_Watchdog_Adjust>
30016228: eaffffe1 b 300161b4 <_Timer_server_Body+0x9c>
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
3001622c: e1a00006 mov r0, r6
30016230: e2811010 add r1, r1, #16
30016234: eb0011c6 bl 3001a954 <_Watchdog_Insert>
30016238: eaffffde b 300161b8 <_Timer_server_Body+0xa0>
/*
* This path is for normal forward movement and cases where the
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
3001623c: e0621005 rsb r1, r2, r5
30016240: e1a00008 mov r0, r8
30016244: e1a02007 mov r2, r7
30016248: eb001197 bl 3001a8ac <_Watchdog_Adjust_to_chain>
3001624c: eaffffd8 b 300161b4 <_Timer_server_Body+0x9c>
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
ts->insert_chain = NULL;
30016250: e5841078 str r1, [r4, #120] ; 0x78
30016254: e129f002 msr CPSR_fc, r2
_Chain_Initialize_empty( &fire_chain );
while ( true ) {
_Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain );
if ( !_Chain_Is_empty( &fire_chain ) ) {
30016258: e59d300c ldr r3, [sp, #12]
3001625c: e59d2000 ldr r2, [sp]
30016260: e1520003 cmp r2, r3
30016264: 0a000015 beq 300162c0 <_Timer_server_Body+0x1a8>
30016268: e1a05004 mov r5, r4
3001626c: e59d4000 ldr r4, [sp]
30016270: ea000009 b 3001629c <_Timer_server_Body+0x184>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
30016274: e5932000 ldr r2, [r3]
the_chain->first = new_first;
new_first->previous = _Chain_Head(the_chain);
30016278: e5827004 str r7, [r2, #4]
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
the_chain->first = new_first;
3001627c: e58d200c str r2, [sp, #12]
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
30016280: e3a02000 mov r2, #0
30016284: e5832008 str r2, [r3, #8]
30016288: e129f001 msr CPSR_fc, r1
/*
* The timer server may block here and wait for resources or time.
* The system watchdogs are inactive and will remain inactive since
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
3001628c: e5930020 ldr r0, [r3, #32]
30016290: e5931024 ldr r1, [r3, #36] ; 0x24
30016294: e1a0e00f mov lr, pc
30016298: e593f01c ldr pc, [r3, #28]
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
3001629c: e10f1000 mrs r1, CPSR
300162a0: e3813080 orr r3, r1, #128 ; 0x80
300162a4: e129f003 msr CPSR_fc, r3
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
300162a8: e59d300c ldr r3, [sp, #12]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
300162ac: e1540003 cmp r4, r3
300162b0: 1affffef bne 30016274 <_Timer_server_Body+0x15c>
300162b4: e1a04005 mov r4, r5
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
300162b8: e129f001 msr CPSR_fc, r1
300162bc: eaffffae b 3001617c <_Timer_server_Body+0x64>
300162c0: e59f2054 ldr r2, [pc, #84] ; 3001631c <_Timer_server_Body+0x204>
}
} else {
ts->active = false;
300162c4: e3a03000 mov r3, #0
300162c8: e5c4307c strb r3, [r4, #124] ; 0x7c
300162cc: e5923000 ldr r3, [r2]
300162d0: e2833001 add r3, r3, #1
300162d4: e5823000 str r3, [r2]
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
300162d8: e3a01008 mov r1, #8
300162dc: e5940000 ldr r0, [r4]
300162e0: eb000ed9 bl 30019e4c <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
300162e4: e1a00004 mov r0, r4
300162e8: ebffff5e bl 30016068 <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
300162ec: e1a00004 mov r0, r4
300162f0: ebffff72 bl 300160c0 <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
300162f4: eb000c38 bl 300193dc <_Thread_Enable_dispatch>
ts->active = true;
300162f8: e3a03001 mov r3, #1
300162fc: e5c4307c strb r3, [r4, #124] ; 0x7c
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
30016300: e59d0004 ldr r0, [sp, #4]
30016304: eb0011ff bl 3001ab08 <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
30016308: e59d0008 ldr r0, [sp, #8]
3001630c: eb0011fd bl 3001ab08 <_Watchdog_Remove>
30016310: eaffff99 b 3001617c <_Timer_server_Body+0x64>
300087a8 <_User_extensions_Fatal>:
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
300087a8: e92d41f0 push {r4, r5, r6, r7, r8, lr}
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
300087ac: e59f5040 ldr r5, [pc, #64] ; 300087f4 <_User_extensions_Fatal+0x4c>
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
300087b0: e1a08000 mov r8, r0
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
300087b4: e5954008 ldr r4, [r5, #8]
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
300087b8: e1a07002 mov r7, r2
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
300087bc: e1540005 cmp r4, r5
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
300087c0: e20160ff and r6, r1, #255 ; 0xff
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
300087c4: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc}
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
300087c8: e5943030 ldr r3, [r4, #48] ; 0x30
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
300087cc: e1a00008 mov r0, r8
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
300087d0: e3530000 cmp r3, #0
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
300087d4: e1a01006 mov r1, r6
300087d8: e1a02007 mov r2, r7
300087dc: 11a0e00f movne lr, pc
300087e0: 112fff13 bxne r3
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 ) {
300087e4: e5944004 ldr r4, [r4, #4]
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
300087e8: e1540005 cmp r4, r5
300087ec: 1afffff5 bne 300087c8 <_User_extensions_Fatal+0x20>
300087f0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
300087f8 <_User_extensions_Thread_create>:
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
300087f8: e92d40f0 push {r4, r5, r6, r7, lr}
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
300087fc: e59f5050 ldr r5, [pc, #80] ; 30008854 <_User_extensions_Thread_create+0x5c>
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
30008800: e1a06000 mov r6, r0
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
30008804: e4954004 ldr r4, [r5], #4
30008808: e1540005 cmp r4, r5
3000880c: 0a00000e beq 3000884c <_User_extensions_Thread_create+0x54>
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_create != NULL ) {
status = (*the_extension->Callouts.thread_create)(
30008810: e59f7040 ldr r7, [pc, #64] ; 30008858 <_User_extensions_Thread_create+0x60>
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_create != NULL ) {
30008814: e5943014 ldr r3, [r4, #20]
status = (*the_extension->Callouts.thread_create)(
30008818: e1a01006 mov r1, r6
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_create != NULL ) {
3000881c: e3530000 cmp r3, #0
30008820: 0a000004 beq 30008838 <_User_extensions_Thread_create+0x40>
status = (*the_extension->Callouts.thread_create)(
30008824: e5970004 ldr r0, [r7, #4]
30008828: e1a0e00f mov lr, pc
3000882c: e12fff13 bx r3
_Thread_Executing,
the_thread
);
if ( !status )
30008830: e3500000 cmp r0, #0
30008834: 08bd80f0 popeq {r4, r5, r6, r7, pc}
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
30008838: e5944000 ldr r4, [r4]
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
3000883c: e1540005 cmp r4, r5
30008840: 1afffff3 bne 30008814 <_User_extensions_Thread_create+0x1c>
if ( !status )
return false;
}
}
return true;
30008844: e3a00001 mov r0, #1
30008848: e8bd80f0 pop {r4, r5, r6, r7, pc}
3000884c: e3a00001 mov r0, #1 <== NOT EXECUTED
}
30008850: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
3000a7cc <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
3000a7cc: e92d41f0 push {r4, r5, r6, r7, r8, lr}
3000a7d0: e1a04000 mov r4, r0
3000a7d4: e1a05002 mov r5, r2
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
3000a7d8: e10f3000 mrs r3, CPSR
3000a7dc: e3832080 orr r2, r3, #128 ; 0x80
3000a7e0: e129f002 msr CPSR_fc, r2
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
3000a7e4: e1a07000 mov r7, r0
3000a7e8: e4972004 ldr r2, [r7], #4
* hence the compiler must not assume *header to remain
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
3000a7ec: e1520007 cmp r2, r7
3000a7f0: 0a000018 beq 3000a858 <_Watchdog_Adjust+0x8c>
switch ( direction ) {
3000a7f4: e3510000 cmp r1, #0
3000a7f8: 1a000018 bne 3000a860 <_Watchdog_Adjust+0x94>
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
3000a7fc: e3550000 cmp r5, #0
3000a800: 0a000014 beq 3000a858 <_Watchdog_Adjust+0x8c>
if ( units < _Watchdog_First( header )->delta_interval ) {
3000a804: e5926010 ldr r6, [r2, #16]
3000a808: e1550006 cmp r5, r6
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
3000a80c: 23a08001 movcs r8, #1
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
3000a810: 2a000005 bcs 3000a82c <_Watchdog_Adjust+0x60>
3000a814: ea000018 b 3000a87c <_Watchdog_Adjust+0xb0> <== NOT EXECUTED
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
3000a818: e0555006 subs r5, r5, r6
3000a81c: 0a00000d beq 3000a858 <_Watchdog_Adjust+0x8c>
if ( units < _Watchdog_First( header )->delta_interval ) {
3000a820: e5926010 ldr r6, [r2, #16]
3000a824: e1560005 cmp r6, r5
3000a828: 8a000013 bhi 3000a87c <_Watchdog_Adjust+0xb0>
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
3000a82c: e5828010 str r8, [r2, #16]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
3000a830: e129f003 msr CPSR_fc, r3
_ISR_Enable( level );
_Watchdog_Tickle( header );
3000a834: e1a00004 mov r0, r4
3000a838: eb0000aa bl 3000aae8 <_Watchdog_Tickle>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
3000a83c: e10f3000 mrs r3, CPSR
3000a840: e3832080 orr r2, r3, #128 ; 0x80
3000a844: e129f002 msr CPSR_fc, r2
3000a848: e5941000 ldr r1, [r4]
_ISR_Disable( level );
if ( _Chain_Is_empty( header ) )
3000a84c: e1570001 cmp r7, r1
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) header->first );
3000a850: e1a02001 mov r2, r1
3000a854: 1affffef bne 3000a818 <_Watchdog_Adjust+0x4c>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
3000a858: e129f003 msr CPSR_fc, r3
}
}
_ISR_Enable( level );
}
3000a85c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
3000a860: e3510001 cmp r1, #1
3000a864: 1afffffb bne 3000a858 <_Watchdog_Adjust+0x8c>
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
3000a868: e5921010 ldr r1, [r2, #16]
3000a86c: e0815005 add r5, r1, r5
3000a870: e5825010 str r5, [r2, #16]
3000a874: e129f003 msr CPSR_fc, r3
}
}
_ISR_Enable( level );
}
3000a878: 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;
3000a87c: e0655006 rsb r5, r5, r6
3000a880: e5825010 str r5, [r2, #16]
break;
3000a884: eafffff3 b 3000a858 <_Watchdog_Adjust+0x8c>
30013368 <_exit>:
extern void FINI_SYMBOL( void );
#endif
void EXIT_SYMBOL(int status)
{
30013368: e52de004 push {lr} ; (str lr, [sp, #-4]!)
3001336c: e24dd004 sub sp, sp, #4
/*
* If the toolset uses init/fini sections, then we need to
* run the global destructors now.
*/
#if defined(__USE_INIT_FINI__)
FINI_SYMBOL();
30013370: e58d0000 str r0, [sp]
30013374: eb0001ee bl 30013b34 <_fini>
* We need to do the exit processing on the global reentrancy structure.
* This has already been done on the per task reentrancy structure
* associated with this task.
*/
libc_wrapup();
30013378: ebffffe0 bl 30013300 <libc_wrapup>
rtems_shutdown_executive(status);
3001337c: e59d0000 ldr r0, [sp]
30013380: eb000038 bl 30013468 <rtems_shutdown_executive>
30013384: eafffffe b 30013384 <_exit+0x1c> <== NOT EXECUTED
30005e9c <_rename_r>:
int _rename_r(
struct _reent *ptr __attribute__((unused)),
const char *old,
const char *new
)
{
30005e9c: e92d41f0 push {r4, r5, r6, r7, r8, lr}
/*
* Get the parent node of the old path to be renamed. Find the parent path.
*/
old_parent_pathlen = rtems_filesystem_dirname ( old );
30005ea0: e1a00001 mov r0, r1
int _rename_r(
struct _reent *ptr __attribute__((unused)),
const char *old,
const char *new
)
{
30005ea4: e24dd048 sub sp, sp, #72 ; 0x48
30005ea8: e1a05001 mov r5, r1
30005eac: e1a06002 mov r6, r2
/*
* Get the parent node of the old path to be renamed. Find the parent path.
*/
old_parent_pathlen = rtems_filesystem_dirname ( old );
30005eb0: ebfffab5 bl 3000498c <rtems_filesystem_dirname>
if ( old_parent_pathlen == 0 )
30005eb4: e2507000 subs r7, r0, #0
30005eb8: 1a000059 bne 30006024 <_rename_r+0x188>
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
30005ebc: e28d4018 add r4, sp, #24
30005ec0: e1a00005 mov r0, r5
30005ec4: e28d1044 add r1, sp, #68 ; 0x44
30005ec8: e1a02004 mov r2, r4
30005ecc: eb0000e8 bl 30006274 <rtems_filesystem_get_start_loc>
rtems_filesystem_location_info_t old_parent_loc;
rtems_filesystem_location_info_t new_parent_loc;
int i;
int result;
const char *name;
bool free_old_parentloc = false;
30005ed0: e1a08007 mov r8, r7
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
30005ed4: e28dc02c add ip, sp, #44 ; 0x2c
30005ed8: e1a0e004 mov lr, r4
30005edc: e8be000f ldm lr!, {r0, r1, r2, r3}
30005ee0: e8ac000f stmia ip!, {r0, r1, r2, r3}
30005ee4: e59e3000 ldr r3, [lr]
name = old + old_parent_pathlen;
30005ee8: e0855007 add r5, r5, r7
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
30005eec: e58c3000 str r3, [ip]
name = old + old_parent_pathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
30005ef0: e1a00005 mov r0, r5
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
name = old + old_parent_pathlen;
30005ef4: e58d5040 str r5, [sp, #64] ; 0x40
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
30005ef8: eb003965 bl 30014494 <strlen>
30005efc: e1a01000 mov r1, r0
30005f00: e1a00005 mov r0, r5
30005f04: ebfffaaf bl 300049c8 <rtems_filesystem_prefix_separators>
30005f08: e0855000 add r5, r5, r0
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
30005f0c: e1a00005 mov r0, r5
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
name = old + old_parent_pathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
30005f10: e58d5040 str r5, [sp, #64] ; 0x40
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
30005f14: eb00395e bl 30014494 <strlen>
30005f18: e28d702c add r7, sp, #44 ; 0x2c
30005f1c: e1a01000 mov r1, r0
30005f20: e3a02000 mov r2, #0
30005f24: e1a00005 mov r0, r5
30005f28: e1a03007 mov r3, r7
30005f2c: e58d2000 str r2, [sp]
30005f30: ebfffa49 bl 3000485c <rtems_filesystem_evaluate_relative_path>
0, &old_loc, false );
if ( result != 0 ) {
30005f34: e3500000 cmp r0, #0
30005f38: 1a000031 bne 30006004 <_rename_r+0x168>
/*
* Get the parent of the new node we are renaming to.
*/
rtems_filesystem_get_start_loc( new, &i, &new_parent_loc );
30005f3c: e28d5004 add r5, sp, #4
30005f40: e1a00006 mov r0, r6
30005f44: e1a02005 mov r2, r5
30005f48: e28d1044 add r1, sp, #68 ; 0x44
30005f4c: eb0000c8 bl 30006274 <rtems_filesystem_get_start_loc>
result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name );
30005f50: e59d0044 ldr r0, [sp, #68] ; 0x44
30005f54: e1a01005 mov r1, r5
30005f58: e0860000 add r0, r6, r0
30005f5c: e28d2040 add r2, sp, #64 ; 0x40
30005f60: e59d3010 ldr r3, [sp, #16]
30005f64: e1a0e00f mov lr, pc
30005f68: e593f004 ldr pc, [r3, #4]
if ( result != 0 ) {
30005f6c: e3500000 cmp r0, #0
30005f70: 1a000037 bne 30006054 <_rename_r+0x1b8>
/*
* Check to see if the caller is trying to rename across file system
* boundaries.
*/
if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) {
30005f74: e59d3014 ldr r3, [sp, #20]
30005f78: e59d2028 ldr r2, [sp, #40] ; 0x28
30005f7c: e1520003 cmp r2, r3
30005f80: 1a000013 bne 30005fd4 <_rename_r+0x138>
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
rtems_set_errno_and_return_minus_one( EXDEV );
}
result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name );
30005f84: e1a01007 mov r1, r7
30005f88: e1a02005 mov r2, r5
30005f8c: e59d3040 ldr r3, [sp, #64] ; 0x40
30005f90: e59dc010 ldr ip, [sp, #16]
30005f94: e1a00004 mov r0, r4
30005f98: e1a0e00f mov lr, pc
30005f9c: e59cf040 ldr pc, [ip, #64] ; 0x40
30005fa0: e1a06000 mov r6, r0
rtems_filesystem_freenode( &new_parent_loc );
30005fa4: e1a00005 mov r0, r5
30005fa8: ebfffaa0 bl 30004a30 <rtems_filesystem_freenode>
if ( free_old_parentloc )
30005fac: e3580000 cmp r8, #0
30005fb0: 1a000004 bne 30005fc8 <_rename_r+0x12c>
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
30005fb4: e1a00007 mov r0, r7
30005fb8: ebfffa9c bl 30004a30 <rtems_filesystem_freenode>
return result;
}
30005fbc: e1a00006 mov r0, r6
30005fc0: e28dd048 add sp, sp, #72 ; 0x48
30005fc4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name );
rtems_filesystem_freenode( &new_parent_loc );
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
30005fc8: e1a00004 mov r0, r4
30005fcc: ebfffa97 bl 30004a30 <rtems_filesystem_freenode>
30005fd0: eafffff7 b 30005fb4 <_rename_r+0x118>
* Check to see if the caller is trying to rename across file system
* boundaries.
*/
if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) {
rtems_filesystem_freenode( &new_parent_loc );
30005fd4: e1a00005 mov r0, r5
30005fd8: ebfffa94 bl 30004a30 <rtems_filesystem_freenode>
if ( free_old_parentloc )
30005fdc: e3580000 cmp r8, #0
rtems_filesystem_freenode( &old_parent_loc );
30005fe0: 11a00004 movne r0, r4
30005fe4: 1bfffa91 blne 30004a30 <rtems_filesystem_freenode>
rtems_filesystem_freenode( &old_loc );
30005fe8: e1a00007 mov r0, r7
30005fec: ebfffa8f bl 30004a30 <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( EXDEV );
30005ff0: eb002c0a bl 30011020 <__errno>
30005ff4: e3a03012 mov r3, #18
30005ff8: e5803000 str r3, [r0]
30005ffc: e3e06000 mvn r6, #0
30006000: eaffffed b 30005fbc <_rename_r+0x120>
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &old_loc, false );
if ( result != 0 ) {
if ( free_old_parentloc )
30006004: e3580000 cmp r8, #0
30006008: 1a000001 bne 30006014 <_rename_r+0x178>
rtems_filesystem_freenode( &old_parent_loc );
return -1;
3000600c: e3e06000 mvn r6, #0 <== NOT EXECUTED
30006010: eaffffe9 b 30005fbc <_rename_r+0x120> <== NOT EXECUTED
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &old_loc, false );
if ( result != 0 ) {
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
30006014: e1a00004 mov r0, r4
30006018: ebfffa84 bl 30004a30 <rtems_filesystem_freenode>
return -1;
3000601c: e3e06000 mvn r6, #0
30006020: eaffffe5 b 30005fbc <_rename_r+0x120>
old_parent_pathlen = rtems_filesystem_dirname ( old );
if ( old_parent_pathlen == 0 )
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
else {
result = rtems_filesystem_evaluate_path( old, old_parent_pathlen,
30006024: e3a03000 mov r3, #0
30006028: e28d4018 add r4, sp, #24
3000602c: e58d3000 str r3, [sp]
30006030: e3a02002 mov r2, #2
30006034: e1a00005 mov r0, r5
30006038: e1a01007 mov r1, r7
3000603c: e1a03004 mov r3, r4
30006040: ebfffa2f bl 30004904 <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&old_parent_loc,
false );
if ( result != 0 )
30006044: e3500000 cmp r0, #0
30006048: 1affffef bne 3000600c <_rename_r+0x170>
return -1;
free_old_parentloc = true;
3000604c: e3a08001 mov r8, #1
30006050: eaffff9f b 30005ed4 <_rename_r+0x38>
rtems_filesystem_get_start_loc( new, &i, &new_parent_loc );
result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name );
if ( result != 0 ) {
rtems_filesystem_freenode( &new_parent_loc );
30006054: e1a00005 mov r0, r5
30006058: ebfffa74 bl 30004a30 <rtems_filesystem_freenode>
if ( free_old_parentloc )
3000605c: e3580000 cmp r8, #0
rtems_filesystem_freenode( &old_parent_loc );
30006060: 11a00004 movne r0, r4
30006064: 1bfffa71 blne 30004a30 <rtems_filesystem_freenode>
rtems_filesystem_freenode( &old_loc );
30006068: e1a00007 mov r0, r7
3000606c: ebfffa6f bl 30004a30 <rtems_filesystem_freenode>
return -1;
30006070: e3e06000 mvn r6, #0
30006074: eaffffd0 b 30005fbc <_rename_r+0x120>
3000212c <chroot>:
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
3000212c: 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) {
30002130: e59f50b4 ldr r5, [pc, #180] ; 300021ec <chroot+0xc0>
30002134: e59f30b4 ldr r3, [pc, #180] ; 300021f0 <chroot+0xc4>
30002138: e5954000 ldr r4, [r5]
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
3000213c: e24dd018 sub sp, sp, #24
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) {
30002140: e1540003 cmp r4, r3
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
30002144: e1a06000 mov r6, 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) {
30002148: 0a000017 beq 300021ac <chroot+0x80>
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);
3000214c: e1a00006 mov r0, r6
30002150: eb0022ab bl 3000ac04 <chdir>
if (result) {
30002154: e2502000 subs r2, r0, #0
30002158: 1a00001c bne 300021d0 <chroot+0xa4>
rtems_set_errno_and_return_minus_one( errno );
}
/* clone the new root location */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
3000215c: e28d4004 add r4, sp, #4
30002160: e59f008c ldr r0, [pc, #140] ; 300021f4 <chroot+0xc8>
30002164: e3a01001 mov r1, #1
30002168: e1a03004 mov r3, r4
3000216c: e58d2000 str r2, [sp]
30002170: eb00006a bl 30002320 <rtems_filesystem_evaluate_path>
30002174: e2506000 subs r6, r0, #0
30002178: 1a000014 bne 300021d0 <chroot+0xa4>
/* 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);
3000217c: e5950000 ldr r0, [r5]
30002180: e2800018 add r0, r0, #24
30002184: eb0000b0 bl 3000244c <rtems_filesystem_freenode>
rtems_filesystem_root = loc;
30002188: e8b4000f ldm r4!, {r0, r1, r2, r3}
3000218c: e595c000 ldr ip, [r5]
30002190: e5944000 ldr r4, [r4]
30002194: e28cc018 add ip, ip, #24
30002198: e8ac000f stmia ip!, {r0, r1, r2, r3}
return 0;
3000219c: e1a00006 mov r0, r6
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
/* our cwd has changed, though - but there is no easy way of return :-( */
rtems_set_errno_and_return_minus_one( errno );
}
rtems_filesystem_freenode(&rtems_filesystem_root);
rtems_filesystem_root = loc;
300021a0: e58c4000 str r4, [ip]
return 0;
}
300021a4: e28dd018 add sp, sp, #24
300021a8: 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*/
300021ac: eb000510 bl 300035f4 <rtems_libio_set_private_env>
if (rtems_current_user_env == &rtems_global_user_env) /* not ok */
300021b0: e5953000 ldr r3, [r5]
300021b4: e1530004 cmp r3, r4
300021b8: 1affffe3 bne 3000214c <chroot+0x20>
rtems_set_errno_and_return_minus_one( ENOTSUP );
300021bc: eb003066 bl 3000e35c <__errno> <== NOT EXECUTED
300021c0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
300021c4: e5803000 str r3, [r0] <== NOT EXECUTED
300021c8: e3e00000 mvn r0, #0 <== NOT EXECUTED
300021cc: eafffff4 b 300021a4 <chroot+0x78> <== NOT EXECUTED
}
/* clone the new root location */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
/* our cwd has changed, though - but there is no easy way of return :-( */
rtems_set_errno_and_return_minus_one( errno );
300021d0: eb003061 bl 3000e35c <__errno> <== NOT EXECUTED
300021d4: e1a04000 mov r4, r0 <== NOT EXECUTED
300021d8: eb00305f bl 3000e35c <__errno> <== NOT EXECUTED
300021dc: e5903000 ldr r3, [r0] <== NOT EXECUTED
300021e0: e3e00000 mvn r0, #0 <== NOT EXECUTED
300021e4: e5843000 str r3, [r4] <== NOT EXECUTED
300021e8: eaffffed b 300021a4 <chroot+0x78> <== NOT EXECUTED
300090b8 <devFS_evaluate_path>:
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
300090b8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
assert( 0 );
rtems_set_errno_and_return_minus_one( EIO );
}
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
300090bc: e5936000 ldr r6, [r3]
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
300090c0: e1a0b003 mov fp, r3
rtems_set_errno_and_return_minus_one( EIO );
}
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
300090c4: e3560000 cmp r6, #0
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
300090c8: e1a0a000 mov sl, r0
300090cc: e1a07001 mov r7, r1
rtems_set_errno_and_return_minus_one( EIO );
}
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
300090d0: 0a000025 beq 3000916c <devFS_evaluate_path+0xb4>
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
300090d4: e59f30a4 ldr r3, [pc, #164] ; 30009180 <devFS_evaluate_path+0xc8>
300090d8: e5938000 ldr r8, [r3]
300090dc: e3580000 cmp r8, #0
300090e0: 13a09000 movne r9, #0
300090e4: 11a04009 movne r4, r9
300090e8: 0a000010 beq 30009130 <devFS_evaluate_path+0x78>
if (!device_name_table[i].device_name)
300090ec: e0899109 add r9, r9, r9, lsl #2
300090f0: e7965109 ldr r5, [r6, r9, lsl #2]
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
300090f4: e1a0000a mov r0, sl
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
if (!device_name_table[i].device_name)
300090f8: e2551000 subs r1, r5, #0
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
300090fc: e1a02007 mov r2, r7
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
if (!device_name_table[i].device_name)
30009100: e0869109 add r9, r6, r9, lsl #2
30009104: 0a000005 beq 30009120 <devFS_evaluate_path+0x68>
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
30009108: eb000df6 bl 3000c8e8 <strncmp>
3000910c: e3500000 cmp r0, #0
30009110: 1a000002 bne 30009120 <devFS_evaluate_path+0x68>
continue;
if (device_name_table[i].device_name[pathnamelen] != '\0')
30009114: e7d50007 ldrb r0, [r5, r7]
30009118: e3500000 cmp r0, #0
3000911c: 0a000008 beq 30009144 <devFS_evaluate_path+0x8c>
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
30009120: e2844001 add r4, r4, #1
30009124: e1580004 cmp r8, r4
30009128: e1a09004 mov r9, r4
3000912c: 8affffee bhi 300090ec <devFS_evaluate_path+0x34>
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
return 0;
}
/* no such file or directory */
rtems_set_errno_and_return_minus_one( ENOENT );
30009130: eb000a23 bl 3000b9c4 <__errno>
30009134: e3a03002 mov r3, #2
30009138: e5803000 str r3, [r0]
3000913c: e3e00000 mvn r0, #0
}
30009140: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
pathloc->handlers = &devFS_file_handlers;
pathloc->ops = &devFS_ops;
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
30009144: e59f3038 ldr r3, [pc, #56] ; 30009184 <devFS_evaluate_path+0xcc>
if (device_name_table[i].device_name[pathnamelen] != '\0')
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
pathloc->handlers = &devFS_file_handlers;
30009148: e59f2038 ldr r2, [pc, #56] ; 30009188 <devFS_evaluate_path+0xd0>
pathloc->ops = &devFS_ops;
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
3000914c: e5933000 ldr r3, [r3]
if (device_name_table[i].device_name[pathnamelen] != '\0')
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
pathloc->handlers = &devFS_file_handlers;
30009150: e58b2008 str r2, [fp, #8]
pathloc->ops = &devFS_ops;
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
30009154: e5933028 ldr r3, [r3, #40] ; 0x28
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
pathloc->handlers = &devFS_file_handlers;
pathloc->ops = &devFS_ops;
30009158: e59f202c ldr r2, [pc, #44] ; 3000918c <devFS_evaluate_path+0xd4>
if (device_name_table[i].device_name[pathnamelen] != '\0')
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
3000915c: e58b9000 str r9, [fp]
pathloc->handlers = &devFS_file_handlers;
pathloc->ops = &devFS_ops;
30009160: e58b200c str r2, [fp, #12]
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
30009164: e58b3010 str r3, [fp, #16]
return 0;
30009168: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
}
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
3000916c: eb000a14 bl 3000b9c4 <__errno> <== NOT EXECUTED
30009170: e3a0300e mov r3, #14 <== NOT EXECUTED
30009174: e5803000 str r3, [r0] <== NOT EXECUTED
30009178: e3e00000 mvn r0, #0 <== NOT EXECUTED
3000917c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
300017a8 <devFS_initialize>:
int devFS_initialize(
rtems_filesystem_mount_table_entry_t *temp_mt_entry,
const void *data
)
{
300017a8: e92d4070 push {r4, r5, r6, lr}
rtems_device_name_t *device_name_table;
/* allocate device only filesystem name table */
device_name_table = (rtems_device_name_t *)_Workspace_Allocate(
300017ac: e59f605c ldr r6, [pc, #92] ; 30001810 <devFS_initialize+0x68>
int devFS_initialize(
rtems_filesystem_mount_table_entry_t *temp_mt_entry,
const void *data
)
{
300017b0: e1a04000 mov r4, r0
rtems_device_name_t *device_name_table;
/* allocate device only filesystem name table */
device_name_table = (rtems_device_name_t *)_Workspace_Allocate(
300017b4: e5960000 ldr r0, [r6]
300017b8: e0800100 add r0, r0, r0, lsl #2
300017bc: e1a00100 lsl r0, r0, #2
300017c0: eb001cb6 bl 30008aa0 <_Workspace_Allocate>
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* no memory for device filesystem */
if (!device_name_table)
300017c4: e2505000 subs r5, r0, #0
300017c8: 0a00000b beq 300017fc <devFS_initialize+0x54>
rtems_set_errno_and_return_minus_one( ENOMEM );
memset(
300017cc: e5962000 ldr r2, [r6]
300017d0: e3a01000 mov r1, #0
300017d4: e0822102 add r2, r2, r2, lsl #2
300017d8: e1a02102 lsl r2, r2, #2
300017dc: eb002ae5 bl 3000c378 <memset>
device_name_table, 0,
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* set file handlers */
temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers;
300017e0: e59f302c ldr r3, [pc, #44] ; 30001814 <devFS_initialize+0x6c>
temp_mt_entry->mt_fs_root.ops = &devFS_ops;
/* Set the node_access to device name table */
temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table;
300017e4: e584501c str r5, [r4, #28]
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* set file handlers */
temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers;
temp_mt_entry->mt_fs_root.ops = &devFS_ops;
300017e8: e2832038 add r2, r3, #56 ; 0x38
device_name_table, 0,
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* set file handlers */
temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers;
300017ec: e5843024 str r3, [r4, #36] ; 0x24
temp_mt_entry->mt_fs_root.ops = &devFS_ops;
300017f0: e5842028 str r2, [r4, #40] ; 0x28
/* Set the node_access to device name table */
temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table;
return 0;
300017f4: e3a00000 mov r0, #0
}
300017f8: e8bd8070 pop {r4, r5, r6, pc}
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* no memory for device filesystem */
if (!device_name_table)
rtems_set_errno_and_return_minus_one( ENOMEM );
300017fc: eb002870 bl 3000b9c4 <__errno> <== NOT EXECUTED
30001800: e3a0300c mov r3, #12 <== NOT EXECUTED
30001804: e5803000 str r3, [r0] <== NOT EXECUTED
30001808: e3e00000 mvn r0, #0 <== NOT EXECUTED
3000180c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
30001a0c <devFS_ioctl>:
int devFS_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
30001a0c: e52de004 push {lr} ; (str lr, [sp, #-4]!)
rtems_libio_ioctl_args_t args;
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->pathinfo.node_access;
30001a10: e590c018 ldr ip, [r0, #24]
int devFS_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
30001a14: e24dd010 sub sp, sp, #16
30001a18: e1a03000 mov r3, r0
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->pathinfo.node_access;
args.iop = iop;
args.command = command;
30001a1c: e98d0006 stmib sp, {r1, r2}
args.buffer = buffer;
status = rtems_io_control(
30001a20: e59c0008 ldr r0, [ip, #8]
30001a24: e59c100c ldr r1, [ip, #12]
30001a28: e1a0200d mov r2, sp
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->pathinfo.node_access;
args.iop = iop;
30001a2c: e58d3000 str r3, [sp]
args.command = command;
args.buffer = buffer;
status = rtems_io_control(
30001a30: eb00104b bl 30005b64 <rtems_io_control>
np->major,
np->minor,
(void *) &args
);
if ( status )
30001a34: e3500000 cmp r0, #0
return rtems_deviceio_errno(status);
return args.ioctl_return;
30001a38: 059d000c ldreq r0, [sp, #12]
np->major,
np->minor,
(void *) &args
);
if ( status )
30001a3c: 1a000001 bne 30001a48 <devFS_ioctl+0x3c>
return rtems_deviceio_errno(status);
return args.ioctl_return;
}
30001a40: e28dd010 add sp, sp, #16
30001a44: e8bd8000 pop {pc}
np->minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
30001a48: eb001dd3 bl 3000919c <rtems_deviceio_errno> <== NOT EXECUTED
30001a4c: eafffffb b 30001a40 <devFS_ioctl+0x34> <== NOT EXECUTED
30001818 <devFS_mknod>:
const char *path,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
30001818: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
3000181c: e1a04000 mov r4, r0
* condition and do not create the '/dev' and the 'path'
* actually passed in is 'dev', not '/dev'. Just return 0 to
* indicate we are OK.
*/
if ((path[0] == 'd') && (path[1] == 'e') &&
30001820: e5d00000 ldrb r0, [r0]
const char *path,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
30001824: e1a05001 mov r5, r1
* condition and do not create the '/dev' and the 'path'
* actually passed in is 'dev', not '/dev'. Just return 0 to
* indicate we are OK.
*/
if ((path[0] == 'd') && (path[1] == 'e') &&
30001828: e3500064 cmp r0, #100 ; 0x64
const char *path,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
3000182c: e1a06002 mov r6, r2
30001830: e1a0b003 mov fp, r3
* condition and do not create the '/dev' and the 'path'
* actually passed in is 'dev', not '/dev'. Just return 0 to
* indicate we are OK.
*/
if ((path[0] == 'd') && (path[1] == 'e') &&
30001834: 0a000035 beq 30001910 <devFS_mknod+0xf8>
(path[2] == 'v') && (path[3] == '\0'))
return 0;
/* must be a character device or a block device */
if (!S_ISBLK(mode) && !S_ISCHR(mode))
30001838: e2053a0f and r3, r5, #61440 ; 0xf000
3000183c: e3530a02 cmp r3, #8192 ; 0x2000
30001840: 13530a06 cmpne r3, #24576 ; 0x6000
30001844: 03a03000 moveq r3, #0
30001848: 13a03001 movne r3, #1
3000184c: 1a000039 bne 30001938 <devFS_mknod+0x120>
rtems_set_errno_and_return_minus_one( EINVAL );
else
rtems_filesystem_split_dev_t(dev, major, minor);
/* Find an empty slot in device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
30001850: e59d2024 ldr r2, [sp, #36] ; 0x24
30001854: e5928000 ldr r8, [r2]
if (!device_name_table)
30001858: e3580000 cmp r8, #0
3000185c: 0a00003f beq 30001960 <devFS_mknod+0x148>
rtems_set_errno_and_return_minus_one( EFAULT );
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
30001860: e59f210c ldr r2, [pc, #268] ; 30001974 <devFS_mknod+0x15c>
30001864: e592a000 ldr sl, [r2]
30001868: e35a0000 cmp sl, #0
3000186c: 13e09000 mvnne r9, #0
30001870: 11a07003 movne r7, r3
30001874: 1a000007 bne 30001898 <devFS_mknod+0x80>
30001878: ea000033 b 3000194c <devFS_mknod+0x134> <== NOT EXECUTED
if (device_name_table[i].device_name == NULL)
slot = i;
else
if (strcmp(path, device_name_table[i].device_name) == 0)
3000187c: eb002b39 bl 3000c568 <strcmp> <== NOT EXECUTED
30001880: e3500000 cmp r0, #0 <== NOT EXECUTED
30001884: 0a00001c beq 300018fc <devFS_mknod+0xe4> <== NOT EXECUTED
/* Find an empty slot in device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
30001888: e2877001 add r7, r7, #1 <== NOT EXECUTED
3000188c: e157000a cmp r7, sl <== NOT EXECUTED
30001890: e1a03007 mov r3, r7 <== NOT EXECUTED
30001894: 2a000009 bcs 300018c0 <devFS_mknod+0xa8> <== NOT EXECUTED
if (device_name_table[i].device_name == NULL)
30001898: e0833103 add r3, r3, r3, lsl #2
3000189c: e7983103 ldr r3, [r8, r3, lsl #2]
slot = i;
else
if (strcmp(path, device_name_table[i].device_name) == 0)
300018a0: e1a00004 mov r0, r4
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
if (device_name_table[i].device_name == NULL)
300018a4: e2531000 subs r1, r3, #0
300018a8: 1afffff3 bne 3000187c <devFS_mknod+0x64>
300018ac: e1a09007 mov r9, r7
/* Find an empty slot in device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
300018b0: e2877001 add r7, r7, #1
300018b4: e157000a cmp r7, sl
300018b8: e1a03007 mov r3, r7
300018bc: 3afffff5 bcc 30001898 <devFS_mknod+0x80>
else
if (strcmp(path, device_name_table[i].device_name) == 0)
rtems_set_errno_and_return_minus_one( EEXIST );
}
if (slot == -1)
300018c0: e3790001 cmn r9, #1
300018c4: 0a000020 beq 3000194c <devFS_mknod+0x134>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
300018c8: e10f7000 mrs r7, CPSR
300018cc: e3873080 orr r3, r7, #128 ; 0x80
300018d0: e129f003 msr CPSR_fc, r3
rtems_set_errno_and_return_minus_one( ENOMEM );
_ISR_Disable(level);
device_name_table[slot].device_name = (char *)path;
300018d4: e0899109 add r9, r9, r9, lsl #2
300018d8: e7884109 str r4, [r8, r9, lsl #2]
device_name_table[slot].device_name_length = strlen(path);
300018dc: e1a00004 mov r0, r4
300018e0: eb002be8 bl 3000c888 <strlen>
if (slot == -1)
rtems_set_errno_and_return_minus_one( ENOMEM );
_ISR_Disable(level);
device_name_table[slot].device_name = (char *)path;
300018e4: e0888109 add r8, r8, r9, lsl #2
device_name_table[slot].device_name_length = strlen(path);
device_name_table[slot].major = major;
300018e8: e9880841 stmib r8, {r0, r6, fp}
device_name_table[slot].minor = minor;
device_name_table[slot].mode = mode;
300018ec: e5885010 str r5, [r8, #16]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
300018f0: e129f007 msr CPSR_fc, r7
_ISR_Enable(level);
return 0;
300018f4: e3a00000 mov r0, #0
}
300018f8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
if (device_name_table[i].device_name == NULL)
slot = i;
else
if (strcmp(path, device_name_table[i].device_name) == 0)
rtems_set_errno_and_return_minus_one( EEXIST );
300018fc: eb002830 bl 3000b9c4 <__errno> <== NOT EXECUTED
30001900: e3a03011 mov r3, #17 <== NOT EXECUTED
30001904: e5803000 str r3, [r0] <== NOT EXECUTED
30001908: e3e00000 mvn r0, #0 <== NOT EXECUTED
3000190c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
* condition and do not create the '/dev' and the 'path'
* actually passed in is 'dev', not '/dev'. Just return 0 to
* indicate we are OK.
*/
if ((path[0] == 'd') && (path[1] == 'e') &&
30001910: e5d43001 ldrb r3, [r4, #1]
30001914: e3530065 cmp r3, #101 ; 0x65
30001918: 1affffc6 bne 30001838 <devFS_mknod+0x20>
3000191c: e5d43002 ldrb r3, [r4, #2]
30001920: e3530076 cmp r3, #118 ; 0x76
30001924: 1affffc3 bne 30001838 <devFS_mknod+0x20>
(path[2] == 'v') && (path[3] == '\0'))
30001928: e5d40003 ldrb r0, [r4, #3]
3000192c: e3500000 cmp r0, #0
30001930: 1affffc0 bne 30001838 <devFS_mknod+0x20>
30001934: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
return 0;
/* must be a character device or a block device */
if (!S_ISBLK(mode) && !S_ISCHR(mode))
rtems_set_errno_and_return_minus_one( EINVAL );
30001938: eb002821 bl 3000b9c4 <__errno> <== NOT EXECUTED
3000193c: e3a03016 mov r3, #22 <== NOT EXECUTED
30001940: e5803000 str r3, [r0] <== NOT EXECUTED
30001944: e3e00000 mvn r0, #0 <== NOT EXECUTED
30001948: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
if (strcmp(path, device_name_table[i].device_name) == 0)
rtems_set_errno_and_return_minus_one( EEXIST );
}
if (slot == -1)
rtems_set_errno_and_return_minus_one( ENOMEM );
3000194c: eb00281c bl 3000b9c4 <__errno> <== NOT EXECUTED
30001950: e3a0300c mov r3, #12 <== NOT EXECUTED
30001954: e5803000 str r3, [r0] <== NOT EXECUTED
30001958: e3e00000 mvn r0, #0 <== NOT EXECUTED
3000195c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
rtems_filesystem_split_dev_t(dev, major, minor);
/* Find an empty slot in device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
30001960: eb002817 bl 3000b9c4 <__errno> <== NOT EXECUTED
30001964: e3a0300e mov r3, #14 <== NOT EXECUTED
30001968: e5803000 str r3, [r0] <== NOT EXECUTED
3000196c: e3e00000 mvn r0, #0 <== NOT EXECUTED
30001970: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
30001a88 <devFS_read>:
ssize_t devFS_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
30001a88: e92d4800 push {fp, lr} <== NOT EXECUTED
rtems_libio_rw_args_t args;
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->pathinfo.node_access;
30001a8c: e590c018 ldr ip, [r0, #24] <== NOT EXECUTED
ssize_t devFS_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
30001a90: e24dd01c sub sp, sp, #28 <== NOT EXECUTED
30001a94: e1a03000 mov r3, r0 <== NOT EXECUTED
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
30001a98: e590e014 ldr lr, [r0, #20] <== NOT EXECUTED
np = (rtems_device_name_t *)iop->pathinfo.node_access;
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
30001a9c: e58d100c str r1, [sp, #12] <== NOT EXECUTED
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read(
30001aa0: e59c0008 ldr r0, [ip, #8] <== NOT EXECUTED
30001aa4: e59c100c ldr r1, [ip, #12] <== NOT EXECUTED
np = (rtems_device_name_t *)iop->pathinfo.node_access;
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
30001aa8: e58d2010 str r2, [sp, #16] <== NOT EXECUTED
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->pathinfo.node_access;
args.iop = iop;
args.offset = iop->offset;
30001aac: e283c00c add ip, r3, #12 <== NOT EXECUTED
30001ab0: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->pathinfo.node_access;
args.iop = iop;
30001ab4: e58d3000 str r3, [sp] <== NOT EXECUTED
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read(
30001ab8: e1a0200d mov r2, sp <== NOT EXECUTED
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
30001abc: e3a03000 mov r3, #0 <== NOT EXECUTED
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->pathinfo.node_access;
args.iop = iop;
args.offset = iop->offset;
30001ac0: e98d1800 stmib sp, {fp, ip} <== NOT EXECUTED
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
30001ac4: e58de014 str lr, [sp, #20] <== NOT EXECUTED
args.bytes_moved = 0;
30001ac8: e58d3018 str r3, [sp, #24] <== NOT EXECUTED
status = rtems_io_read(
30001acc: eb001087 bl 30005cf0 <rtems_io_read> <== NOT EXECUTED
np->major,
np->minor,
(void *) &args
);
if ( status )
30001ad0: e3500000 cmp r0, #0 <== NOT EXECUTED
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
30001ad4: 059d0018 ldreq r0, [sp, #24] <== NOT EXECUTED
np->major,
np->minor,
(void *) &args
);
if ( status )
30001ad8: 1a000001 bne 30001ae4 <devFS_read+0x5c> <== NOT EXECUTED
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
}
30001adc: e28dd01c add sp, sp, #28 <== NOT EXECUTED
30001ae0: e8bd8800 pop {fp, pc} <== NOT EXECUTED
np->minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
30001ae4: eb001dac bl 3000919c <rtems_deviceio_errno> <== NOT EXECUTED
30001ae8: eafffffb b 30001adc <devFS_read+0x54> <== NOT EXECUTED
30001aec <devFS_stat>:
struct stat *buf
)
{
rtems_device_name_t *the_dev;
the_dev = (rtems_device_name_t *)loc->node_access;
30001aec: e5903000 ldr r3, [r0]
int devFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
30001af0: e52de004 push {lr} ; (str lr, [sp, #-4]!)
rtems_device_name_t *the_dev;
the_dev = (rtems_device_name_t *)loc->node_access;
if (!the_dev)
30001af4: e3530000 cmp r3, #0
30001af8: 0a000006 beq 30001b18 <devFS_stat+0x2c>
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
30001afc: e2830008 add r0, r3, #8
30001b00: e890000d ldm r0, {r0, r2, r3}
rtems_set_errno_and_return_minus_one( EFAULT );
buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor );
30001b04: e5810018 str r0, [r1, #24]
30001b08: e581201c str r2, [r1, #28]
buf->st_mode = the_dev->mode;
30001b0c: e581300c str r3, [r1, #12]
return 0;
30001b10: e3a00000 mov r0, #0
}
30001b14: e49df004 pop {pc} ; (ldr pc, [sp], #4)
{
rtems_device_name_t *the_dev;
the_dev = (rtems_device_name_t *)loc->node_access;
if (!the_dev)
rtems_set_errno_and_return_minus_one( EFAULT );
30001b18: eb0027a9 bl 3000b9c4 <__errno> <== NOT EXECUTED
30001b1c: e3a0300e mov r3, #14 <== NOT EXECUTED
30001b20: e5803000 str r3, [r0] <== NOT EXECUTED
30001b24: e3e00000 mvn r0, #0 <== NOT EXECUTED
30001b28: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
30001b2c <devFS_write>:
ssize_t devFS_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
30001b2c: e92d4800 push {fp, lr}
rtems_libio_rw_args_t args;
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->pathinfo.node_access;
30001b30: e590c018 ldr ip, [r0, #24]
ssize_t devFS_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
30001b34: e24dd01c sub sp, sp, #28
30001b38: e1a03000 mov r3, r0
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
30001b3c: e590e014 ldr lr, [r0, #20]
np = (rtems_device_name_t *)iop->pathinfo.node_access;
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
30001b40: e58d100c str r1, [sp, #12]
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_write(
30001b44: e59c0008 ldr r0, [ip, #8]
30001b48: e59c100c ldr r1, [ip, #12]
np = (rtems_device_name_t *)iop->pathinfo.node_access;
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
args.count = count;
30001b4c: e58d2010 str r2, [sp, #16]
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->pathinfo.node_access;
args.iop = iop;
args.offset = iop->offset;
30001b50: e283c00c add ip, r3, #12
30001b54: e89c1800 ldm ip, {fp, ip}
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->pathinfo.node_access;
args.iop = iop;
30001b58: e58d3000 str r3, [sp]
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_write(
30001b5c: e1a0200d mov r2, sp
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
30001b60: e3a03000 mov r3, #0
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->pathinfo.node_access;
args.iop = iop;
args.offset = iop->offset;
30001b64: e98d1800 stmib sp, {fp, ip}
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
30001b68: e58de014 str lr, [sp, #20]
args.bytes_moved = 0;
30001b6c: e58d3018 str r3, [sp, #24]
status = rtems_io_write(
30001b70: eb001073 bl 30005d44 <rtems_io_write>
np->major,
np->minor,
(void *) &args
);
if ( status )
30001b74: e3500000 cmp r0, #0
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
30001b78: 059d0018 ldreq r0, [sp, #24]
np->major,
np->minor,
(void *) &args
);
if ( status )
30001b7c: 1a000001 bne 30001b88 <devFS_write+0x5c>
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
}
30001b80: e28dd01c add sp, sp, #28
30001b84: e8bd8800 pop {fp, pc}
np->minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
30001b88: eb001d83 bl 3000919c <rtems_deviceio_errno> <== NOT EXECUTED
30001b8c: eafffffb b 30001b80 <devFS_write+0x54> <== NOT EXECUTED
3000cdbc <device_ioctl>:
int device_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
3000cdbc: e52de004 push {lr} ; (str lr, [sp, #-4]!)
args.iop = iop;
args.command = command;
args.buffer = buffer;
the_jnode = iop->pathinfo.node_access;
3000cdc0: e590c018 ldr ip, [r0, #24]
int device_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
3000cdc4: e24dd010 sub sp, sp, #16
3000cdc8: e1a03000 mov r3, r0
rtems_libio_ioctl_args_t args;
rtems_status_code status;
IMFS_jnode_t *the_jnode;
args.iop = iop;
args.command = command;
3000cdcc: e98d0006 stmib sp, {r1, r2}
args.buffer = buffer;
the_jnode = iop->pathinfo.node_access;
status = rtems_io_control(
3000cdd0: e59c0050 ldr r0, [ip, #80] ; 0x50
3000cdd4: e59c1054 ldr r1, [ip, #84] ; 0x54
3000cdd8: e1a0200d mov r2, sp
{
rtems_libio_ioctl_args_t args;
rtems_status_code status;
IMFS_jnode_t *the_jnode;
args.iop = iop;
3000cddc: e58d3000 str r3, [sp]
args.command = command;
args.buffer = buffer;
the_jnode = iop->pathinfo.node_access;
status = rtems_io_control(
3000cde0: eb00026b bl 3000d794 <rtems_io_control>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
3000cde4: e3500000 cmp r0, #0
return rtems_deviceio_errno(status);
return args.ioctl_return;
3000cde8: 059d000c ldreq r0, [sp, #12]
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
3000cdec: 1a000001 bne 3000cdf8 <device_ioctl+0x3c>
return rtems_deviceio_errno(status);
return args.ioctl_return;
}
3000cdf0: e28dd010 add sp, sp, #16
3000cdf4: e8bd8000 pop {pc}
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
3000cdf8: eb00030f bl 3000da3c <rtems_deviceio_errno> <== NOT EXECUTED
3000cdfc: eafffffb b 3000cdf0 <device_ioctl+0x34> <== NOT EXECUTED
3000ccf4 <device_read>:
ssize_t device_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
3000ccf4: e92d4800 push {fp, lr}
rtems_libio_rw_args_t args;
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
3000ccf8: e590c018 ldr ip, [r0, #24]
ssize_t device_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
3000ccfc: e24dd01c sub sp, sp, #28
3000cd00: e1a03000 mov r3, r0
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
3000cd04: e590e014 ldr lr, [r0, #20]
the_jnode = iop->pathinfo.node_access;
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
3000cd08: e58d100c str r1, [sp, #12]
args.count = count;
3000cd0c: e58d2010 str r2, [sp, #16]
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read(
3000cd10: e59c0050 ldr r0, [ip, #80] ; 0x50
3000cd14: e59c1054 ldr r1, [ip, #84] ; 0x54
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
args.iop = iop;
3000cd18: e58d3000 str r3, [sp]
args.offset = iop->offset;
3000cd1c: e283c00c add ip, r3, #12
3000cd20: e89c1800 ldm ip, {fp, ip}
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read(
3000cd24: e1a0200d mov r2, sp
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
3000cd28: e3a03000 mov r3, #0
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
args.iop = iop;
args.offset = iop->offset;
3000cd2c: e98d1800 stmib sp, {fp, ip}
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
3000cd30: e58de014 str lr, [sp, #20]
args.bytes_moved = 0;
3000cd34: e58d3018 str r3, [sp, #24]
status = rtems_io_read(
3000cd38: eb0002bf bl 3000d83c <rtems_io_read>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
3000cd3c: e3500000 cmp r0, #0
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
3000cd40: 059d0018 ldreq r0, [sp, #24]
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
3000cd44: 1a000001 bne 3000cd50 <device_read+0x5c>
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
}
3000cd48: e28dd01c add sp, sp, #28
3000cd4c: e8bd8800 pop {fp, pc}
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
3000cd50: eb000339 bl 3000da3c <rtems_deviceio_errno> <== NOT EXECUTED
3000cd54: eafffffb b 3000cd48 <device_read+0x54> <== NOT EXECUTED
3000cd58 <device_write>:
ssize_t device_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
3000cd58: e92d4800 push {fp, lr}
rtems_libio_rw_args_t args;
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
3000cd5c: e590c018 ldr ip, [r0, #24]
ssize_t device_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
3000cd60: e24dd01c sub sp, sp, #28
3000cd64: e1a03000 mov r3, r0
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
3000cd68: e590e014 ldr lr, [r0, #20]
the_jnode = iop->pathinfo.node_access;
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
3000cd6c: e58d100c str r1, [sp, #12]
args.count = count;
3000cd70: e58d2010 str r2, [sp, #16]
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_write(
3000cd74: e59c0050 ldr r0, [ip, #80] ; 0x50
3000cd78: e59c1054 ldr r1, [ip, #84] ; 0x54
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
args.iop = iop;
3000cd7c: e58d3000 str r3, [sp]
args.offset = iop->offset;
3000cd80: e283c00c add ip, r3, #12
3000cd84: e89c1800 ldm ip, {fp, ip}
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_write(
3000cd88: e1a0200d mov r2, sp
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
3000cd8c: e3a03000 mov r3, #0
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
args.iop = iop;
args.offset = iop->offset;
3000cd90: e98d1800 stmib sp, {fp, ip}
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
3000cd94: e58de014 str lr, [sp, #20]
args.bytes_moved = 0;
3000cd98: e58d3018 str r3, [sp, #24]
status = rtems_io_write(
3000cd9c: eb0002bb bl 3000d890 <rtems_io_write>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
3000cda0: e3500000 cmp r0, #0
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
3000cda4: 059d0018 ldreq r0, [sp, #24]
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
3000cda8: 1a000001 bne 3000cdb4 <device_write+0x5c>
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
}
3000cdac: e28dd01c add sp, sp, #28
3000cdb0: e8bd8800 pop {fp, pc}
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
3000cdb4: eb000320 bl 3000da3c <rtems_deviceio_errno> <== NOT EXECUTED
3000cdb8: eafffffb b 3000cdac <device_write+0x54> <== NOT EXECUTED
30002fcc <drainOutput>:
drainOutput (struct rtems_termios_tty *tty)
{
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
30002fcc: e59030b4 ldr r3, [r0, #180] ; 0xb4
/*
* Drain output queue
*/
static void
drainOutput (struct rtems_termios_tty *tty)
{
30002fd0: e92d4030 push {r4, r5, lr}
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
30002fd4: e3530000 cmp r3, #0
/*
* Drain output queue
*/
static void
drainOutput (struct rtems_termios_tty *tty)
{
30002fd8: e1a04000 mov r4, r0
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
30002fdc: 08bd8030 popeq {r4, r5, pc}
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
30002fe0: e10f3000 mrs r3, CPSR
30002fe4: e3832080 orr r2, r3, #128 ; 0x80
30002fe8: e129f002 msr CPSR_fc, r2
rtems_interrupt_disable (level);
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
30002fec: e5901084 ldr r1, [r0, #132] ; 0x84
30002ff0: e5902080 ldr r2, [r0, #128] ; 0x80
30002ff4: e1510002 cmp r1, r2
30002ff8: 0a00000f beq 3000303c <drainOutput+0x70>
tty->rawOutBufState = rob_wait;
30002ffc: e3a05002 mov r5, #2 <== NOT EXECUTED
30003000: e5845094 str r5, [r4, #148] ; 0x94 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
30003004: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain(
30003008: e3a01000 mov r1, #0 <== NOT EXECUTED
3000300c: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED
30003010: e1a02001 mov r2, r1 <== NOT EXECUTED
30003014: eb0009b1 bl 300056e0 <rtems_semaphore_obtain> <== NOT EXECUTED
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
30003018: e3500000 cmp r0, #0 <== NOT EXECUTED
3000301c: 1a000008 bne 30003044 <drainOutput+0x78> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
30003020: e10f3000 mrs r3, CPSR <== NOT EXECUTED
30003024: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED
30003028: e129f002 msr CPSR_fc, r2 <== 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) {
3000302c: e5941084 ldr r1, [r4, #132] ; 0x84 <== NOT EXECUTED
30003030: e5942080 ldr r2, [r4, #128] ; 0x80 <== NOT EXECUTED
30003034: e1510002 cmp r1, r2 <== NOT EXECUTED
30003038: 1afffff0 bne 30003000 <drainOutput+0x34> <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
3000303c: e129f003 msr CPSR_fc, r3
30003040: e8bd8030 pop {r4, r5, pc}
tty->rawOutBufState = rob_wait;
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain(
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
30003044: eb000b49 bl 30005d70 <rtems_fatal_error_occurred> <== NOT EXECUTED
30002798 <dup2>:
int dup2(
int fildes,
int fildes2
)
{
30002798: e92d4070 push {r4, r5, r6, lr}
3000279c: e24dd048 sub sp, sp, #72 ; 0x48
300027a0: e1a05001 mov r5, r1
/*
* If fildes is not valid, then fildes2 should not be closed.
*/
status = fstat( fildes, &buf );
300027a4: e1a0100d mov r1, sp
int dup2(
int fildes,
int fildes2
)
{
300027a8: e1a06000 mov r6, r0
/*
* If fildes is not valid, then fildes2 should not be closed.
*/
status = fstat( fildes, &buf );
300027ac: eb000197 bl 30002e10 <fstat>
if ( status == -1 )
300027b0: e3700001 cmn r0, #1
/*
* If fildes is not valid, then fildes2 should not be closed.
*/
status = fstat( fildes, &buf );
300027b4: e1a0400d mov r4, sp
if ( status == -1 )
300027b8: 1a000001 bne 300027c4 <dup2+0x2c>
/*
* This fcntl handles everything else.
*/
return fcntl( fildes, F_DUPFD, fildes2 );
}
300027bc: e28dd048 add sp, sp, #72 ; 0x48
300027c0: e8bd8070 pop {r4, r5, r6, pc}
/*
* If fildes2 is not valid, then we should not do anything either.
*/
status = fstat( fildes2, &buf );
300027c4: e1a00005 mov r0, r5
300027c8: e1a0100d mov r1, sp
300027cc: eb00018f bl 30002e10 <fstat>
if ( status == -1 )
300027d0: e3700001 cmn r0, #1
300027d4: 0afffff8 beq 300027bc <dup2+0x24>
/*
* This fcntl handles everything else.
*/
return fcntl( fildes, F_DUPFD, fildes2 );
300027d8: e1a00006 mov r0, r6 <== NOT EXECUTED
300027dc: e3a01000 mov r1, #0 <== NOT EXECUTED
300027e0: e1a02005 mov r2, r5 <== NOT EXECUTED
300027e4: eb000078 bl 300029cc <fcntl> <== NOT EXECUTED
300027e8: eafffff3 b 300027bc <dup2+0x24> <== NOT EXECUTED
30003dbc <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)
30003dbc: e5903020 ldr r3, [r0, #32]
* 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)
{
30003dc0: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
if (tty->ccount == 0)
30003dc4: e3530000 cmp r3, #0
* 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)
{
30003dc8: e1a04000 mov r4, r0
30003dcc: e1a06001 mov r6, r1
if (tty->ccount == 0)
30003dd0: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
return;
if (lineFlag) {
30003dd4: e3510000 cmp r1, #0
30003dd8: 0a000010 beq 30003e20 <erase+0x64>
if (!(tty->termios.c_lflag & ECHO)) {
30003ddc: e590103c ldr r1, [r0, #60] ; 0x3c
30003de0: e2112008 ands r2, r1, #8
tty->ccount = 0;
30003de4: 05802020 streq r2, [r0, #32]
erase (struct rtems_termios_tty *tty, int lineFlag)
{
if (tty->ccount == 0)
return;
if (lineFlag) {
if (!(tty->termios.c_lflag & ECHO)) {
30003de8: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
tty->ccount = 0;
return;
}
if (!(tty->termios.c_lflag & ECHOE)) {
30003dec: e2110010 ands r0, r1, #16
30003df0: 1a00000c bne 30003e28 <erase+0x6c>
tty->ccount = 0;
30003df4: e5840020 str r0, [r4, #32] <== NOT EXECUTED
echo (tty->termios.c_cc[VKILL], tty);
30003df8: e1a01004 mov r1, r4 <== NOT EXECUTED
30003dfc: e5d40044 ldrb r0, [r4, #68] ; 0x44 <== NOT EXECUTED
30003e00: ebffffc8 bl 30003d28 <echo> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
30003e04: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED
30003e08: e3130020 tst r3, #32 <== NOT EXECUTED
30003e0c: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
echo ('\n', tty);
30003e10: e3a0000a mov r0, #10 <== NOT EXECUTED
30003e14: e1a01004 mov r1, r4 <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
30003e18: e8bd45f0 pop {r4, r5, r6, r7, r8, sl, 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);
30003e1c: eaffffc1 b 30003d28 <echo> <== NOT EXECUTED
return;
}
}
while (tty->ccount) {
30003e20: e590103c ldr r1, [r0, #60] ; 0x3c
30003e24: e2012008 and r2, r1, #8
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
30003e28: e59f7198 ldr r7, [pc, #408] ; 30003fc8 <erase+0x20c>
30003e2c: ea000008 b 30003e54 <erase+0x98>
30003e30: e3110c02 tst r1, #512 ; 0x200 <== NOT EXECUTED
30003e34: 1a00004b bne 30003f68 <erase+0x1ac> <== NOT EXECUTED
if (tty->column)
tty->column--;
}
}
}
if (!lineFlag)
30003e38: e3560000 cmp r6, #0 <== NOT EXECUTED
30003e3c: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
30003e40: e5943020 ldr r3, [r4, #32]
30003e44: e3530000 cmp r3, #0
30003e48: 0a000045 beq 30003f64 <erase+0x1a8>
}
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);
30003e4c: e594103c ldr r1, [r4, #60] ; 0x3c
30003e50: e2012008 and r2, r1, #8
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
30003e54: e2433001 sub r3, r3, #1
30003e58: e594001c ldr r0, [r4, #28]
30003e5c: e5843020 str r3, [r4, #32]
if (tty->termios.c_lflag & ECHO) {
30003e60: e3520000 cmp r2, #0
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
30003e64: e7d05003 ldrb r5, [r0, r3]
if (tty->termios.c_lflag & ECHO) {
30003e68: 0afffff2 beq 30003e38 <erase+0x7c>
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
30003e6c: e3560000 cmp r6, #0
30003e70: 1a000001 bne 30003e7c <erase+0xc0>
30003e74: e3110010 tst r1, #16
30003e78: 0a000035 beq 30003f54 <erase+0x198>
echo (tty->termios.c_cc[VERASE], tty);
} else if (c == '\t') {
30003e7c: e3550009 cmp r5, #9
30003e80: 0a00000f beq 30003ec4 <erase+0x108>
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
30003e84: e5973000 ldr r3, [r7]
30003e88: e2855001 add r5, r5, #1
30003e8c: e7d33005 ldrb r3, [r3, r5]
30003e90: e3130020 tst r3, #32
30003e94: 1affffe5 bne 30003e30 <erase+0x74>
rtems_termios_puts ("\b \b", 3, tty);
if (tty->column)
tty->column--;
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
rtems_termios_puts ("\b \b", 3, tty);
30003e98: e59f012c ldr r0, [pc, #300] ; 30003fcc <erase+0x210>
30003e9c: e3a01003 mov r1, #3
30003ea0: e1a02004 mov r2, r4
30003ea4: ebfffefd bl 30003aa0 <rtems_termios_puts>
if (tty->column)
30003ea8: e5943028 ldr r3, [r4, #40] ; 0x28
30003eac: e3530000 cmp r3, #0
tty->column--;
30003eb0: 12433001 subne r3, r3, #1
30003eb4: 15843028 strne r3, [r4, #40] ; 0x28
}
}
}
if (!lineFlag)
30003eb8: e3560000 cmp r6, #0
30003ebc: 1affffdf bne 30003e40 <erase+0x84>
30003ec0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
30003ec4: e3530000 cmp r3, #0
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;
30003ec8: e594502c ldr r5, [r4, #44] ; 0x2c
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
30003ecc: 0a000011 beq 30003f18 <erase+0x15c>
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
} else if (iscntrl (c)) {
30003ed0: e5978000 ldr r8, [r7]
if (tty->termios.c_lflag & ECHO) {
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
echo (tty->termios.c_cc[VERASE], tty);
} else if (c == '\t') {
int col = tty->read_start_column;
int i = 0;
30003ed4: e3a02000 mov r2, #0
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
} else if (iscntrl (c)) {
if (tty->termios.c_lflag & ECHOCTL)
30003ed8: e201ac02 and sl, r1, #512 ; 0x200
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
30003edc: e7d01002 ldrb r1, [r0, r2]
30003ee0: e2822001 add r2, r2, #1
if (c == '\t') {
30003ee4: e3510009 cmp r1, #9
col = (col | 7) + 1;
30003ee8: 03855007 orreq r5, r5, #7
} else if (iscntrl (c)) {
30003eec: e088c001 add ip, r8, r1
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
30003ef0: 02855001 addeq r5, r5, #1
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
30003ef4: 0a000005 beq 30003f10 <erase+0x154>
col = (col | 7) + 1;
} else if (iscntrl (c)) {
30003ef8: e5dcc001 ldrb ip, [ip, #1]
30003efc: e31c0020 tst ip, #32
if (tty->termios.c_lflag & ECHOCTL)
col += 2;
} else {
col++;
30003f00: 02855001 addeq r5, r5, #1
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
} else if (iscntrl (c)) {
30003f04: 0a000001 beq 30003f10 <erase+0x154>
if (tty->termios.c_lflag & ECHOCTL)
30003f08: e35a0000 cmp sl, #0 <== NOT EXECUTED
col += 2;
30003f0c: 12855002 addne r5, r5, #2 <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
30003f10: e1530002 cmp r3, r2
30003f14: 1afffff0 bne 30003edc <erase+0x120>
}
/*
* Back up over the tab
*/
while (tty->column > col) {
30003f18: e5943028 ldr r3, [r4, #40] ; 0x28
30003f1c: e1550003 cmp r5, r3
30003f20: aaffffc4 bge 30003e38 <erase+0x7c>
rtems_termios_puts ("\b", 1, tty);
30003f24: e59f00a4 ldr r0, [pc, #164] ; 30003fd0 <erase+0x214>
30003f28: e3a01001 mov r1, #1
30003f2c: e1a02004 mov r2, r4
30003f30: ebfffeda bl 30003aa0 <rtems_termios_puts>
tty->column--;
30003f34: e5943028 ldr r3, [r4, #40] ; 0x28
30003f38: e2433001 sub r3, r3, #1
}
/*
* Back up over the tab
*/
while (tty->column > col) {
30003f3c: e1530005 cmp r3, r5
rtems_termios_puts ("\b", 1, tty);
tty->column--;
30003f40: e5843028 str r3, [r4, #40] ; 0x28
}
/*
* Back up over the tab
*/
while (tty->column > col) {
30003f44: cafffff6 bgt 30003f24 <erase+0x168>
if (tty->column)
tty->column--;
}
}
}
if (!lineFlag)
30003f48: e3560000 cmp r6, #0
30003f4c: 1affffbb bne 30003e40 <erase+0x84>
30003f50: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, 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);
30003f54: e5d40043 ldrb r0, [r4, #67] ; 0x43 <== NOT EXECUTED
30003f58: e1a01004 mov r1, r4 <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
30003f5c: e8bd45f0 pop {r4, r5, r6, r7, r8, sl, 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);
30003f60: eaffff70 b 30003d28 <echo> <== NOT EXECUTED
30003f64: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
rtems_termios_puts ("\b \b", 3, tty);
30003f68: e59f005c ldr r0, [pc, #92] ; 30003fcc <erase+0x210> <== NOT EXECUTED
30003f6c: e3a01003 mov r1, #3 <== NOT EXECUTED
30003f70: e1a02004 mov r2, r4 <== NOT EXECUTED
30003f74: ebfffec9 bl 30003aa0 <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
30003f78: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED
30003f7c: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->column--;
30003f80: 12433001 subne r3, r3, #1 <== NOT EXECUTED
30003f84: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
30003f88: e5973000 ldr r3, [r7] <== NOT EXECUTED
30003f8c: e7d33005 ldrb r3, [r3, r5] <== NOT EXECUTED
30003f90: e3130020 tst r3, #32 <== NOT EXECUTED
30003f94: 0affffbf beq 30003e98 <erase+0xdc> <== NOT EXECUTED
30003f98: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED
30003f9c: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED
30003fa0: 0affffa4 beq 30003e38 <erase+0x7c> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
30003fa4: e59f0020 ldr r0, [pc, #32] ; 30003fcc <erase+0x210> <== NOT EXECUTED
30003fa8: e3a01003 mov r1, #3 <== NOT EXECUTED
30003fac: e1a02004 mov r2, r4 <== NOT EXECUTED
30003fb0: ebfffeba bl 30003aa0 <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
30003fb4: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED
30003fb8: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->column--;
30003fbc: 12433001 subne r3, r3, #1 <== NOT EXECUTED
30003fc0: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED
30003fc4: eaffffbb b 30003eb8 <erase+0xfc> <== NOT EXECUTED
300029cc <fcntl>:
int fcntl(
int fd,
int cmd,
...
)
{
300029cc: e92d000e push {r1, r2, r3}
300029d0: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
300029d4: e59f31cc ldr r3, [pc, #460] ; 30002ba8 <fcntl+0x1dc>
int fcntl(
int fd,
int cmd,
...
)
{
300029d8: e24dd004 sub sp, sp, #4
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
300029dc: e5932000 ldr r2, [r3]
...
)
{
int ret;
va_list ap;
va_start( ap, cmd );
300029e0: e28d3028 add r3, sp, #40 ; 0x28
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
300029e4: e1500002 cmp r0, r2
int fcntl(
int fd,
int cmd,
...
)
{
300029e8: e59d4024 ldr r4, [sp, #36] ; 0x24
int ret;
va_list ap;
va_start( ap, cmd );
300029ec: e58d3000 str r3, [sp]
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
300029f0: 2a000060 bcs 30002b78 <fcntl+0x1ac>
iop = rtems_libio_iop( fd );
300029f4: e59f71b0 ldr r7, [pc, #432] ; 30002bac <fcntl+0x1e0>
300029f8: e0600180 rsb r0, r0, r0, lsl #3
300029fc: e5976000 ldr r6, [r7]
30002a00: e0865180 add r5, r6, r0, lsl #3
rtems_libio_check_is_open(iop);
30002a04: e595c014 ldr ip, [r5, #20]
30002a08: e31c0c01 tst ip, #256 ; 0x100
30002a0c: 0a000059 beq 30002b78 <fcntl+0x1ac>
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
30002a10: e3540009 cmp r4, #9
30002a14: 979ff104 ldrls pc, [pc, r4, lsl #2]
30002a18: ea000027 b 30002abc <fcntl+0xf0>
30002a1c: 30002acc .word 0x30002acc <== NOT EXECUTED
30002a20: 30002b30 .word 0x30002b30 <== NOT EXECUTED
30002a24: 30002b40 .word 0x30002b40 <== NOT EXECUTED
30002a28: 30002b60 .word 0x30002b60 <== NOT EXECUTED
30002a2c: 30002a68 .word 0x30002a68 <== NOT EXECUTED
30002a30: 30002a44 .word 0x30002a44 <== NOT EXECUTED
30002a34: 30002a44 .word 0x30002a44 <== NOT EXECUTED
30002a38: 30002a44 .word 0x30002a44 <== NOT EXECUTED
30002a3c: 30002a44 .word 0x30002a44 <== NOT EXECUTED
30002a40: 30002a44 .word 0x30002a44 <== NOT EXECUTED
errno = ENOTSUP;
ret = -1;
break;
case F_GETOWN: /* for sockets. */
errno = ENOTSUP;
30002a44: eb003038 bl 3000eb2c <__errno>
30002a48: e3a03086 mov r3, #134 ; 0x86
30002a4c: e5803000 str r3, [r0]
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
30002a50: e3e06000 mvn r6, #0
va_list ap;
va_start( ap, cmd );
ret = vfcntl(fd,cmd,ap);
va_end(ap);
return ret;
}
30002a54: e1a00006 mov r0, r6
30002a58: e28dd004 add sp, sp, #4
30002a5c: e8bd47f0 pop {r4, r5, r6, r7, r8, r9, sl, lr}
30002a60: e28dd00c add sp, sp, #12
30002a64: 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 ) );
30002a68: e5930000 ldr r0, [r3]
30002a6c: eb000181 bl 30003078 <rtems_libio_fcntl_flags>
/*
* XXX If we are turning on append, should we seek to the end?
*/
iop->flags = (iop->flags & ~mask) | (flags & mask);
30002a70: e5952014 ldr r2, [r5, #20]
30002a74: e59f3134 ldr r3, [pc, #308] ; 30002bb0 <fcntl+0x1e4>
30002a78: e3c22c02 bic r2, r2, #512 ; 0x200
30002a7c: e0003003 and r3, r0, r3
30002a80: e3c22001 bic r2, r2, #1
30002a84: e1833002 orr r3, r3, r2
30002a88: e5853014 str r3, [r5, #20]
rtems_libio_t *iop;
rtems_libio_t *diop;
int fd2;
int flags;
int mask;
int ret = 0;
30002a8c: e3a06000 mov r6, #0
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop );
30002a90: e1a00004 mov r0, r4
30002a94: e5953020 ldr r3, [r5, #32]
30002a98: e1a01005 mov r1, r5
30002a9c: e1a0e00f mov lr, pc
30002aa0: e593f030 ldr pc, [r3, #48] ; 0x30
if (err) {
30002aa4: e2504000 subs r4, r0, #0
30002aa8: 0affffe9 beq 30002a54 <fcntl+0x88>
errno = err;
30002aac: eb00301e bl 3000eb2c <__errno> <== NOT EXECUTED
ret = -1;
30002ab0: e3e06000 mvn r6, #0 <== NOT EXECUTED
*/
if (ret >= 0) {
int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop );
if (err) {
errno = err;
30002ab4: e5804000 str r4, [r0] <== NOT EXECUTED
30002ab8: eaffffe5 b 30002a54 <fcntl+0x88> <== NOT EXECUTED
errno = ENOTSUP;
ret = -1;
break;
default:
errno = EINVAL;
30002abc: eb00301a bl 3000eb2c <__errno>
30002ac0: e3a03016 mov r3, #22
30002ac4: e5803000 str r3, [r0]
30002ac8: eaffffe0 b 30002a50 <fcntl+0x84>
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
30002acc: e593a000 ldr sl, [r3]
if ( fd2 )
30002ad0: e35a0000 cmp sl, #0
30002ad4: 0a00002c beq 30002b8c <fcntl+0x1c0>
diop = rtems_libio_iop( fd2 );
30002ad8: e152000a cmp r2, sl <== NOT EXECUTED
30002adc: 806aa18a rsbhi sl, sl, sl, lsl #3 <== NOT EXECUTED
30002ae0: 8086a18a addhi sl, r6, sl, lsl #3 <== NOT EXECUTED
30002ae4: 81a0900a movhi r9, sl <== NOT EXECUTED
30002ae8: 93a09000 movls r9, #0 <== NOT EXECUTED
30002aec: 91a0a009 movls sl, r9 <== NOT EXECUTED
break;
}
}
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
30002af0: e28a8018 add r8, sl, #24
30002af4: e2857018 add r7, r5, #24
30002af8: e8b7000f ldm r7!, {r0, r1, r2, r3}
ret = (int) (diop - rtems_libio_iops);
30002afc: e0666009 rsb r6, r6, r9
break;
}
}
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
30002b00: e8a8000f stmia r8!, {r0, r1, r2, r3}
ret = (int) (diop - rtems_libio_iops);
30002b04: e1a061c6 asr r6, r6, #3
30002b08: e0863186 add r3, r6, r6, lsl #3
30002b0c: e0833303 add r3, r3, r3, lsl #6
30002b10: e0863183 add r3, r6, r3, lsl #3
break;
}
}
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
30002b14: e5972000 ldr r2, [r7]
ret = (int) (diop - rtems_libio_iops);
30002b18: e0833783 add r3, r3, r3, lsl #15
30002b1c: e0866183 add r6, r6, r3, lsl #3
ret = -1;
break;
}
}
diop->flags = iop->flags;
30002b20: e58ac014 str ip, [sl, #20]
diop->pathinfo = iop->pathinfo;
30002b24: e5882000 str r2, [r8]
ret = (int) (diop - rtems_libio_iops);
30002b28: e2666000 rsb r6, r6, #0
30002b2c: ea00000e b 30002b6c <fcntl+0x1a0>
break;
case F_GETFD: /* get f_flags */
ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0);
30002b30: e31c0b02 tst ip, #2048 ; 0x800
30002b34: 03a06000 moveq r6, #0
30002b38: 13a06001 movne r6, #1
30002b3c: eaffffd3 b 30002a90 <fcntl+0xc4>
* 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 ) )
30002b40: e5936000 ldr r6, [r3]
30002b44: e3560000 cmp r6, #0
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
30002b48: 138ccb02 orrne ip, ip, #2048 ; 0x800
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
30002b4c: 03cccb02 biceq ip, ip, #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;
30002b50: 1585c014 strne ip, [r5, #20]
rtems_libio_t *iop;
rtems_libio_t *diop;
int fd2;
int flags;
int mask;
int ret = 0;
30002b54: 13a06000 movne r6, #0
*/
if ( va_arg( ap, int ) )
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
30002b58: 0585c014 streq ip, [r5, #20]
30002b5c: eaffffcb b 30002a90 <fcntl+0xc4>
break;
case F_GETFL: /* more flags (cloexec) */
ret = rtems_libio_to_fcntl_flags( iop->flags );
30002b60: e1a0000c mov r0, ip
30002b64: eb000150 bl 300030ac <rtems_libio_to_fcntl_flags>
30002b68: e1a06000 mov r6, r0
/*
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
30002b6c: e3560000 cmp r6, #0
30002b70: aaffffc6 bge 30002a90 <fcntl+0xc4>
30002b74: eaffffb6 b 30002a54 <fcntl+0x88> <== NOT EXECUTED
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
30002b78: eb002feb bl 3000eb2c <__errno>
30002b7c: e3a03009 mov r3, #9
30002b80: e5803000 str r3, [r0]
30002b84: e3e06000 mvn r6, #0
30002b88: eaffffb1 b 30002a54 <fcntl+0x88>
fd2 = va_arg( ap, int );
if ( fd2 )
diop = rtems_libio_iop( fd2 );
else {
/* allocate a file control block */
diop = rtems_libio_allocate();
30002b8c: eb000159 bl 300030f8 <rtems_libio_allocate>
if ( diop == 0 ) {
30002b90: e250a000 subs sl, r0, #0
30002b94: 0affffad beq 30002a50 <fcntl+0x84>
30002b98: e595c014 ldr ip, [r5, #20]
30002b9c: e1a0900a mov r9, sl
30002ba0: e5976000 ldr r6, [r7]
30002ba4: eaffffd1 b 30002af0 <fcntl+0x124>
3000ba84 <fifo_open>:
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
3000ba84: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
3000ba88: e24dd00c sub sp, sp, #12
3000ba8c: e1a05000 mov r5, r0
3000ba90: e1a07001 mov r7, r1
)
{
pipe_control_t *pipe;
int err = 0;
err = pipe_lock();
3000ba94: ebffff84 bl 3000b8ac <pipe_lock>
if (err)
3000ba98: e2504000 subs r4, r0, #0
3000ba9c: 1a00001b bne 3000bb10 <fifo_open+0x8c>
return err;
pipe = *pipep;
3000baa0: e5956000 ldr r6, [r5]
if (pipe == NULL) {
3000baa4: e3560000 cmp r6, #0
3000baa8: 0a00001b beq 3000bb1c <fifo_open+0x98>
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
3000baac: e3a01000 mov r1, #0
3000bab0: e5960028 ldr r0, [r6, #40] ; 0x28
3000bab4: e1a02001 mov r2, r1
3000bab8: ebffed15 bl 30006f14 <rtems_semaphore_obtain>
err = -EINTR;
if (*pipep == NULL) {
3000babc: e5953000 ldr r3, [r5]
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
3000bac0: e3500000 cmp r0, #0
3000bac4: 13e08003 mvnne r8, #3
3000bac8: 03a08000 moveq r8, #0
err = -EINTR;
if (*pipep == NULL) {
3000bacc: e3530000 cmp r3, #0
3000bad0: 0a0000ba beq 3000bdc0 <fifo_open+0x33c>
else
*pipep = pipe;
}
out:
pipe_unlock();
3000bad4: ebffff9f bl 3000b958 <pipe_unlock>
pipe_control_t *pipe;
unsigned int prevCounter;
int err;
err = pipe_new(pipep);
if (err)
3000bad8: e3580000 cmp r8, #0
3000badc: 11a04008 movne r4, r8
3000bae0: 1a00000a bne 3000bb10 <fifo_open+0x8c>
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
3000bae4: e5973014 ldr r3, [r7, #20]
int err;
err = pipe_new(pipep);
if (err)
return err;
pipe = *pipep;
3000bae8: e5956000 ldr r6, [r5]
switch (LIBIO_ACCMODE(iop)) {
3000baec: e2033006 and r3, r3, #6
3000baf0: e3530004 cmp r3, #4
3000baf4: 0a000091 beq 3000bd40 <fifo_open+0x2bc>
3000baf8: e3530006 cmp r3, #6
3000bafc: 0a00007b beq 3000bcf0 <fifo_open+0x26c>
3000bb00: e3530002 cmp r3, #2
3000bb04: 0a000055 beq 3000bc60 <fifo_open+0x1dc>
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
break;
}
PIPE_UNLOCK(pipe);
3000bb08: e5960028 ldr r0, [r6, #40] ; 0x28
3000bb0c: ebffed49 bl 30007038 <rtems_semaphore_release>
return 0;
out_error:
pipe_release(pipep, iop);
return err;
}
3000bb10: e1a00004 mov r0, r4
3000bb14: e28dd00c add sp, sp, #12
3000bb18: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
3000bb1c: e3a00034 mov r0, #52 ; 0x34
3000bb20: ebffdfd2 bl 30003a70 <malloc>
if (pipe == NULL)
3000bb24: e3500000 cmp r0, #0
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
3000bb28: e1a06000 mov r6, r0
3000bb2c: e1a0a000 mov sl, r0
if (pipe == NULL)
3000bb30: 0a0000cc beq 3000be68 <fifo_open+0x3e4>
return err;
memset(pipe, 0, sizeof(pipe_control_t));
3000bb34: e1a02000 mov r2, r0
3000bb38: e4824004 str r4, [r2], #4
3000bb3c: e2822004 add r2, r2, #4
3000bb40: e4824004 str r4, [r2], #4
3000bb44: e4824004 str r4, [r2], #4
3000bb48: e4824004 str r4, [r2], #4
3000bb4c: e4824004 str r4, [r2], #4
3000bb50: e4824004 str r4, [r2], #4
3000bb54: e4824004 str r4, [r2], #4
3000bb58: e4824004 str r4, [r2], #4
3000bb5c: e4824004 str r4, [r2], #4
3000bb60: e4824004 str r4, [r2], #4
3000bb64: e4824004 str r4, [r2], #4
pipe->Size = PIPE_BUF;
3000bb68: e3a03c02 mov r3, #512 ; 0x200
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
if (pipe == NULL)
return err;
memset(pipe, 0, sizeof(pipe_control_t));
3000bb6c: e5824000 str r4, [r2]
pipe->Size = PIPE_BUF;
pipe->Buffer = malloc(pipe->Size);
3000bb70: e1a00003 mov r0, r3
pipe = malloc(sizeof(pipe_control_t));
if (pipe == NULL)
return err;
memset(pipe, 0, sizeof(pipe_control_t));
pipe->Size = PIPE_BUF;
3000bb74: e5863004 str r3, [r6, #4]
pipe->Buffer = malloc(pipe->Size);
3000bb78: ebffdfbc bl 30003a70 <malloc>
if (! pipe->Buffer)
3000bb7c: e3500000 cmp r0, #0
if (pipe == NULL)
return err;
memset(pipe, 0, sizeof(pipe_control_t));
pipe->Size = PIPE_BUF;
pipe->Buffer = malloc(pipe->Size);
3000bb80: e5860000 str r0, [r6]
if (! pipe->Buffer)
3000bb84: 0a0000b5 beq 3000be60 <fifo_open+0x3dc>
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
rtems_build_name ('P', 'I', 'r', c),
3000bb88: e59f82e4 ldr r8, [pc, #740] ; 3000be74 <fifo_open+0x3f0>
if (! pipe->Buffer)
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
3000bb8c: e59f02e4 ldr r0, [pc, #740] ; 3000be78 <fifo_open+0x3f4>
rtems_build_name ('P', 'I', 'r', c),
3000bb90: e5d83000 ldrb r3, [r8]
if (! pipe->Buffer)
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
3000bb94: e1a01004 mov r1, r4
3000bb98: e1830000 orr r0, r3, r0
3000bb9c: e1a02004 mov r2, r4
3000bba0: e286302c add r3, r6, #44 ; 0x2c
3000bba4: eb000709 bl 3000d7d0 <rtems_barrier_create>
3000bba8: e3500000 cmp r0, #0
3000bbac: 1a0000a9 bne 3000be58 <fifo_open+0x3d4>
rtems_build_name ('P', 'I', 'r', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->readBarrier) != RTEMS_SUCCESSFUL)
goto err_rbar;
if (rtems_barrier_create(
rtems_build_name ('P', 'I', 'w', c),
3000bbb0: e5d83000 ldrb r3, [r8]
if (rtems_barrier_create(
rtems_build_name ('P', 'I', 'r', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->readBarrier) != RTEMS_SUCCESSFUL)
goto err_rbar;
if (rtems_barrier_create(
3000bbb4: e59f02c0 ldr r0, [pc, #704] ; 3000be7c <fifo_open+0x3f8>
3000bbb8: e1a01004 mov r1, r4
3000bbbc: e1830000 orr r0, r3, r0
3000bbc0: e1a02004 mov r2, r4
3000bbc4: e2863030 add r3, r6, #48 ; 0x30
3000bbc8: eb000700 bl 3000d7d0 <rtems_barrier_create>
3000bbcc: e3500000 cmp r0, #0
3000bbd0: 1a00009e bne 3000be50 <fifo_open+0x3cc>
rtems_build_name ('P', 'I', 'w', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->writeBarrier) != RTEMS_SUCCESSFUL)
goto err_wbar;
if (rtems_semaphore_create(
rtems_build_name ('P', 'I', 's', c), 1,
3000bbd4: e5d83000 ldrb r3, [r8]
if (rtems_barrier_create(
rtems_build_name ('P', 'I', 'w', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->writeBarrier) != RTEMS_SUCCESSFUL)
goto err_wbar;
if (rtems_semaphore_create(
3000bbd8: e59f02a0 ldr r0, [pc, #672] ; 3000be80 <fifo_open+0x3fc>
3000bbdc: e286c028 add ip, r6, #40 ; 0x28
3000bbe0: e1830000 orr r0, r3, r0
3000bbe4: e3a01001 mov r1, #1
3000bbe8: e3a02010 mov r2, #16
3000bbec: e1a03004 mov r3, r4
3000bbf0: e58dc000 str ip, [sp]
3000bbf4: ebffec2c bl 30006cac <rtems_semaphore_create>
3000bbf8: e3500000 cmp r0, #0
3000bbfc: 1a000091 bne 3000be48 <fifo_open+0x3c4>
/* Set barriers to be interruptible by signals. */
static void pipe_interruptible(pipe_control_t *pipe)
{
Objects_Locations location;
_Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state
3000bc00: e28da004 add sl, sp, #4
Objects_Id id,
Objects_Locations *location
)
{
return (Barrier_Control *)
_Objects_Get( &_Barrier_Information, id, location );
3000bc04: e596102c ldr r1, [r6, #44] ; 0x2c
3000bc08: e1a0200a mov r2, sl
3000bc0c: e59f0270 ldr r0, [pc, #624] ; 3000be84 <fifo_open+0x400>
3000bc10: ebfff2dc bl 30008788 <_Objects_Get>
|= STATES_INTERRUPTIBLE_BY_SIGNAL;
3000bc14: e590304c ldr r3, [r0, #76] ; 0x4c
3000bc18: e3833201 orr r3, r3, #268435456 ; 0x10000000
3000bc1c: e580304c str r3, [r0, #76] ; 0x4c
_Thread_Enable_dispatch();
3000bc20: ebfff503 bl 30009034 <_Thread_Enable_dispatch>
3000bc24: e1a0200a mov r2, sl
3000bc28: e5961030 ldr r1, [r6, #48] ; 0x30
3000bc2c: e59f0250 ldr r0, [pc, #592] ; 3000be84 <fifo_open+0x400>
3000bc30: ebfff2d4 bl 30008788 <_Objects_Get>
_Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state
|= STATES_INTERRUPTIBLE_BY_SIGNAL;
3000bc34: e590304c ldr r3, [r0, #76] ; 0x4c
3000bc38: e3833201 orr r3, r3, #268435456 ; 0x10000000
3000bc3c: e580304c str r3, [r0, #76] ; 0x4c
_Thread_Enable_dispatch();
3000bc40: ebfff4fb bl 30009034 <_Thread_Enable_dispatch>
#ifdef RTEMS_POSIX_API
pipe_interruptible(pipe);
#endif
*pipep = pipe;
if (c ++ == 'z')
3000bc44: e5d83000 ldrb r3, [r8]
3000bc48: e353007a cmp r3, #122 ; 0x7a
3000bc4c: e2832001 add r2, r3, #1
c = 'a';
3000bc50: 03a03061 moveq r3, #97 ; 0x61
#ifdef RTEMS_POSIX_API
pipe_interruptible(pipe);
#endif
*pipep = pipe;
if (c ++ == 'z')
3000bc54: e5c82000 strb r2, [r8]
c = 'a';
3000bc58: 05c83000 strbeq r3, [r8]
3000bc5c: eaffff92 b 3000baac <fifo_open+0x28>
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
3000bc60: e5963010 ldr r3, [r6, #16]
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
3000bc64: e5961020 ldr r1, [r6, #32]
if (pipe->Readers ++ == 0)
3000bc68: e2832001 add r2, r3, #1
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
3000bc6c: e2811001 add r1, r1, #1
if (pipe->Readers ++ == 0)
3000bc70: e3530000 cmp r3, #0
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
3000bc74: e5861020 str r1, [r6, #32]
if (pipe->Readers ++ == 0)
3000bc78: e5862010 str r2, [r6, #16]
3000bc7c: 0a000069 beq 3000be28 <fifo_open+0x3a4>
PIPE_WAKEUPWRITERS(pipe);
if (pipe->Writers == 0) {
3000bc80: e5963014 ldr r3, [r6, #20]
3000bc84: e3530000 cmp r3, #0
3000bc88: 1affff9e bne 3000bb08 <fifo_open+0x84>
/* Not an error */
if (LIBIO_NODELAY(iop))
3000bc8c: e5973014 ldr r3, [r7, #20]
3000bc90: e3130001 tst r3, #1
3000bc94: 1affff9b bne 3000bb08 <fifo_open+0x84>
break;
prevCounter = pipe->writerCounter;
3000bc98: e5968024 ldr r8, [r6, #36] ; 0x24
3000bc9c: ea000006 b 3000bcbc <fifo_open+0x238>
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
goto out_error;
if (! PIPE_LOCK(pipe))
3000bca0: e5960028 ldr r0, [r6, #40] ; 0x28
3000bca4: ebffec9a bl 30006f14 <rtems_semaphore_obtain>
3000bca8: e3500000 cmp r0, #0
3000bcac: 1a00000a bne 3000bcdc <fifo_open+0x258>
goto out_error;
} while (prevCounter == pipe->writerCounter);
3000bcb0: e5963024 ldr r3, [r6, #36] ; 0x24
3000bcb4: e1530008 cmp r3, r8
3000bcb8: 1affff92 bne 3000bb08 <fifo_open+0x84>
prevCounter = pipe->writerCounter;
err = -EINTR;
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
3000bcbc: e5960028 ldr r0, [r6, #40] ; 0x28
3000bcc0: ebffecdc bl 30007038 <rtems_semaphore_release>
if (! PIPE_READWAIT(pipe))
3000bcc4: e3a01000 mov r1, #0
3000bcc8: e596002c ldr r0, [r6, #44] ; 0x2c
3000bccc: eb000735 bl 3000d9a8 <rtems_barrier_wait>
3000bcd0: e2501000 subs r1, r0, #0
goto out_error;
if (! PIPE_LOCK(pipe))
3000bcd4: e1a02001 mov r2, r1
prevCounter = pipe->writerCounter;
err = -EINTR;
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
3000bcd8: 0afffff0 beq 3000bca0 <fifo_open+0x21c>
goto out_error;
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
3000bcdc: e3e04003 mvn r4, #3 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
out_error:
pipe_release(pipep, iop);
3000bce0: e1a00005 mov r0, r5
3000bce4: e1a01007 mov r1, r7
3000bce8: ebffff24 bl 3000b980 <pipe_release>
return err;
3000bcec: eaffff87 b 3000bb10 <fifo_open+0x8c>
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
3000bcf0: e5963010 ldr r3, [r6, #16]
} while (prevCounter == pipe->readerCounter);
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
3000bcf4: e5961020 ldr r1, [r6, #32]
if (pipe->Readers ++ == 0)
3000bcf8: e2832001 add r2, r3, #1
} while (prevCounter == pipe->readerCounter);
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
3000bcfc: e2811001 add r1, r1, #1
if (pipe->Readers ++ == 0)
3000bd00: e3530000 cmp r3, #0
} while (prevCounter == pipe->readerCounter);
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
3000bd04: e5861020 str r1, [r6, #32]
if (pipe->Readers ++ == 0)
3000bd08: e5862010 str r2, [r6, #16]
3000bd0c: 0a00003d beq 3000be08 <fifo_open+0x384>
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
3000bd10: e5963014 ldr r3, [r6, #20]
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
3000bd14: e5961024 ldr r1, [r6, #36] ; 0x24
if (pipe->Writers ++ == 0)
3000bd18: e2832001 add r2, r3, #1
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
3000bd1c: e2811001 add r1, r1, #1
if (pipe->Writers ++ == 0)
3000bd20: e3530000 cmp r3, #0
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
3000bd24: e5861024 str r1, [r6, #36] ; 0x24
if (pipe->Writers ++ == 0)
3000bd28: e5862014 str r2, [r6, #20]
3000bd2c: 1affff75 bne 3000bb08 <fifo_open+0x84>
PIPE_WAKEUPREADERS(pipe);
3000bd30: e596002c ldr r0, [r6, #44] ; 0x2c
3000bd34: e28d1008 add r1, sp, #8
3000bd38: eb000702 bl 3000d948 <rtems_barrier_release>
3000bd3c: eaffff71 b 3000bb08 <fifo_open+0x84>
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
3000bd40: e5963014 ldr r3, [r6, #20]
} while (prevCounter == pipe->writerCounter);
}
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
3000bd44: e5961024 ldr r1, [r6, #36] ; 0x24
if (pipe->Writers ++ == 0)
3000bd48: e2832001 add r2, r3, #1
} while (prevCounter == pipe->writerCounter);
}
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
3000bd4c: e2811001 add r1, r1, #1
if (pipe->Writers ++ == 0)
3000bd50: e3530000 cmp r3, #0
} while (prevCounter == pipe->writerCounter);
}
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
3000bd54: e5861024 str r1, [r6, #36] ; 0x24
if (pipe->Writers ++ == 0)
3000bd58: e5862014 str r2, [r6, #20]
3000bd5c: 0a00002d beq 3000be18 <fifo_open+0x394>
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
3000bd60: e5963010 ldr r3, [r6, #16]
3000bd64: e3530000 cmp r3, #0
3000bd68: 1affff66 bne 3000bb08 <fifo_open+0x84>
3000bd6c: e5973014 ldr r3, [r7, #20]
3000bd70: e3130001 tst r3, #1
err = -ENXIO;
goto out_error;
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
3000bd74: 05968020 ldreq r8, [r6, #32]
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
3000bd78: 0a000007 beq 3000bd9c <fifo_open+0x318>
3000bd7c: ea00002d b 3000be38 <fifo_open+0x3b4>
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
goto out_error;
if (! PIPE_LOCK(pipe))
3000bd80: e5960028 ldr r0, [r6, #40] ; 0x28
3000bd84: ebffec62 bl 30006f14 <rtems_semaphore_obtain>
3000bd88: e3500000 cmp r0, #0
3000bd8c: 1affffd2 bne 3000bcdc <fifo_open+0x258>
goto out_error;
} while (prevCounter == pipe->readerCounter);
3000bd90: e5963020 ldr r3, [r6, #32]
3000bd94: e1530008 cmp r3, r8
3000bd98: 1affff5a bne 3000bb08 <fifo_open+0x84>
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
3000bd9c: e5960028 ldr r0, [r6, #40] ; 0x28
3000bda0: ebffeca4 bl 30007038 <rtems_semaphore_release>
if (! PIPE_WRITEWAIT(pipe))
3000bda4: e3a01000 mov r1, #0
3000bda8: e5960030 ldr r0, [r6, #48] ; 0x30
3000bdac: eb0006fd bl 3000d9a8 <rtems_barrier_wait>
3000bdb0: e2501000 subs r1, r0, #0
goto out_error;
if (! PIPE_LOCK(pipe))
3000bdb4: e1a02001 mov r2, r1
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
3000bdb8: 0afffff0 beq 3000bd80 <fifo_open+0x2fc>
3000bdbc: eaffffc6 b 3000bcdc <fifo_open+0x258> <== NOT EXECUTED
if (! PIPE_LOCK(pipe))
err = -EINTR;
if (*pipep == NULL) {
if (err)
3000bdc0: e3580000 cmp r8, #0
3000bdc4: 1a000002 bne 3000bdd4 <fifo_open+0x350>
pipe_free(pipe);
else
*pipep = pipe;
3000bdc8: e5856000 str r6, [r5]
}
out:
pipe_unlock();
3000bdcc: ebfffee1 bl 3000b958 <pipe_unlock>
3000bdd0: eaffff43 b 3000bae4 <fifo_open+0x60>
/* Called with pipe_semaphore held. */
static inline void pipe_free(
pipe_control_t *pipe
)
{
rtems_barrier_delete(pipe->readBarrier);
3000bdd4: e596002c ldr r0, [r6, #44] ; 0x2c <== NOT EXECUTED
3000bdd8: eb0006ae bl 3000d898 <rtems_barrier_delete> <== NOT EXECUTED
rtems_barrier_delete(pipe->writeBarrier);
3000bddc: e5960030 ldr r0, [r6, #48] ; 0x30 <== NOT EXECUTED
3000bde0: eb0006ac bl 3000d898 <rtems_barrier_delete> <== NOT EXECUTED
rtems_semaphore_delete(pipe->Semaphore);
3000bde4: e5960028 ldr r0, [r6, #40] ; 0x28 <== NOT EXECUTED
3000bde8: ebffec20 bl 30006e70 <rtems_semaphore_delete> <== NOT EXECUTED
free(pipe->Buffer);
3000bdec: e5960000 ldr r0, [r6] <== NOT EXECUTED
3000bdf0: ebffdd75 bl 300033cc <free> <== NOT EXECUTED
free(pipe);
3000bdf4: e1a00006 mov r0, r6 <== NOT EXECUTED
3000bdf8: ebffdd73 bl 300033cc <free> <== NOT EXECUTED
3000bdfc: e1a04008 mov r4, r8 <== NOT EXECUTED
else
*pipep = pipe;
}
out:
pipe_unlock();
3000be00: ebfffed4 bl 3000b958 <pipe_unlock> <== NOT EXECUTED
3000be04: eaffff41 b 3000bb10 <fifo_open+0x8c> <== NOT EXECUTED
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
3000be08: e5960030 ldr r0, [r6, #48] ; 0x30
3000be0c: e28d1008 add r1, sp, #8
3000be10: eb0006cc bl 3000d948 <rtems_barrier_release>
3000be14: eaffffbd b 3000bd10 <fifo_open+0x28c>
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
3000be18: e596002c ldr r0, [r6, #44] ; 0x2c
3000be1c: e28d1008 add r1, sp, #8
3000be20: eb0006c8 bl 3000d948 <rtems_barrier_release>
3000be24: eaffffcd b 3000bd60 <fifo_open+0x2dc>
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
3000be28: e5960030 ldr r0, [r6, #48] ; 0x30
3000be2c: e28d1008 add r1, sp, #8
3000be30: eb0006c4 bl 3000d948 <rtems_barrier_release>
3000be34: eaffff91 b 3000bc80 <fifo_open+0x1fc>
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
PIPE_UNLOCK(pipe);
3000be38: e5960028 ldr r0, [r6, #40] ; 0x28
3000be3c: ebffec7d bl 30007038 <rtems_semaphore_release>
err = -ENXIO;
3000be40: e3e04005 mvn r4, #5
goto out_error;
3000be44: eaffffa5 b 3000bce0 <fifo_open+0x25c>
if (c ++ == 'z')
c = 'a';
return 0;
err_sem:
rtems_barrier_delete(pipe->writeBarrier);
3000be48: e5960030 ldr r0, [r6, #48] ; 0x30
3000be4c: eb000691 bl 3000d898 <rtems_barrier_delete>
err_wbar:
rtems_barrier_delete(pipe->readBarrier);
3000be50: e59a002c ldr r0, [sl, #44] ; 0x2c
3000be54: eb00068f bl 3000d898 <rtems_barrier_delete>
err_rbar:
free(pipe->Buffer);
3000be58: e59a0000 ldr r0, [sl]
3000be5c: ebffdd5a bl 300033cc <free>
err_buf:
free(pipe);
3000be60: e1a0000a mov r0, sl
3000be64: ebffdd58 bl 300033cc <free>
{
rtems_barrier_delete(pipe->readBarrier);
rtems_barrier_delete(pipe->writeBarrier);
rtems_semaphore_delete(pipe->Semaphore);
free(pipe->Buffer);
free(pipe);
3000be68: e3e0400b mvn r4, #11
else
*pipep = pipe;
}
out:
pipe_unlock();
3000be6c: ebfffeb9 bl 3000b958 <pipe_unlock>
3000be70: eaffff26 b 3000bb10 <fifo_open+0x8c>
30002c3c <fpathconf>:
{
long return_value;
rtems_libio_t *iop;
rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
30002c3c: e59f310c ldr r3, [pc, #268] ; 30002d50 <fpathconf+0x114>
long fpathconf(
int fd,
int name
)
{
30002c40: e52de004 push {lr} ; (str lr, [sp, #-4]!)
long return_value;
rtems_libio_t *iop;
rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
30002c44: e5933000 ldr r3, [r3]
30002c48: e1500003 cmp r0, r3
30002c4c: 2a000035 bcs 30002d28 <fpathconf+0xec>
iop = rtems_libio_iop(fd);
30002c50: e59f30fc ldr r3, [pc, #252] ; 30002d54 <fpathconf+0x118>
30002c54: e0600180 rsb r0, r0, r0, lsl #3
30002c58: e5933000 ldr r3, [r3]
30002c5c: e0830180 add r0, r3, r0, lsl #3
rtems_libio_check_is_open(iop);
30002c60: e5903014 ldr r3, [r0, #20]
30002c64: e3130c01 tst r3, #256 ; 0x100
30002c68: 0a00002e beq 30002d28 <fpathconf+0xec>
rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ);
30002c6c: e3130002 tst r3, #2
30002c70: 0a000031 beq 30002d3c <fpathconf+0x100>
/*
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
30002c74: e5903028 ldr r3, [r0, #40] ; 0x28
switch ( name ) {
30002c78: e351000b cmp r1, #11
30002c7c: 979ff101 ldrls pc, [pc, r1, lsl #2]
30002c80: ea00000d b 30002cbc <fpathconf+0x80>
30002c84: 30002cd0 .word 0x30002cd0 <== NOT EXECUTED
30002c88: 30002cd8 .word 0x30002cd8 <== NOT EXECUTED
30002c8c: 30002ce0 .word 0x30002ce0 <== NOT EXECUTED
30002c90: 30002ce8 .word 0x30002ce8 <== NOT EXECUTED
30002c94: 30002cf0 .word 0x30002cf0 <== NOT EXECUTED
30002c98: 30002cf8 .word 0x30002cf8 <== NOT EXECUTED
30002c9c: 30002d00 .word 0x30002d00 <== NOT EXECUTED
30002ca0: 30002d08 .word 0x30002d08 <== NOT EXECUTED
30002ca4: 30002d10 .word 0x30002d10 <== NOT EXECUTED
30002ca8: 30002d18 .word 0x30002d18 <== NOT EXECUTED
30002cac: 30002d20 .word 0x30002d20 <== NOT EXECUTED
30002cb0: 30002cb4 .word 0x30002cb4 <== NOT EXECUTED
break;
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
break;
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
30002cb4: e5930060 ldr r0, [r3, #96] ; 0x60
break;
30002cb8: e49df004 pop {pc} ; (ldr pc, [sp], #4)
default:
rtems_set_errno_and_return_minus_one( EINVAL );
30002cbc: eb002f9a bl 3000eb2c <__errno>
30002cc0: e3a03016 mov r3, #22
30002cc4: e5803000 str r3, [r0]
30002cc8: e3e00000 mvn r0, #0
break;
}
return return_value;
}
30002ccc: 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;
30002cd0: e5930038 ldr r0, [r3, #56] ; 0x38
break;
30002cd4: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_MAX_CANON:
return_value = the_limits->max_canon;
30002cd8: e593003c ldr r0, [r3, #60] ; 0x3c
break;
30002cdc: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_MAX_INPUT:
return_value = the_limits->max_input;
30002ce0: e5930040 ldr r0, [r3, #64] ; 0x40
break;
30002ce4: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_NAME_MAX:
return_value = the_limits->name_max;
30002ce8: e5930044 ldr r0, [r3, #68] ; 0x44
break;
30002cec: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_PATH_MAX:
return_value = the_limits->path_max;
30002cf0: e5930048 ldr r0, [r3, #72] ; 0x48
break;
30002cf4: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_PIPE_BUF:
return_value = the_limits->pipe_buf;
30002cf8: e593004c ldr r0, [r3, #76] ; 0x4c
break;
30002cfc: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_CHOWN_RESTRICTED:
return_value = the_limits->posix_chown_restrictions;
30002d00: e5930054 ldr r0, [r3, #84] ; 0x54
break;
30002d04: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_NO_TRUNC:
return_value = the_limits->posix_no_trunc;
30002d08: e5930058 ldr r0, [r3, #88] ; 0x58
break;
30002d0c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_VDISABLE:
return_value = the_limits->posix_vdisable;
30002d10: e5930064 ldr r0, [r3, #100] ; 0x64
break;
30002d14: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_ASYNC_IO:
return_value = the_limits->posix_async_io;
30002d18: e5930050 ldr r0, [r3, #80] ; 0x50
break;
30002d1c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
30002d20: e593005c ldr r0, [r3, #92] ; 0x5c
break;
30002d24: 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);
30002d28: eb002f7f bl 3000eb2c <__errno>
30002d2c: e3a03009 mov r3, #9
30002d30: e5803000 str r3, [r0]
30002d34: e3e00000 mvn r0, #0
30002d38: e49df004 pop {pc} ; (ldr pc, [sp], #4)
rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ);
30002d3c: eb002f7a bl 3000eb2c <__errno> <== NOT EXECUTED
30002d40: e3a03016 mov r3, #22 <== NOT EXECUTED
30002d44: e5803000 str r3, [r0] <== NOT EXECUTED
30002d48: e3e00000 mvn r0, #0 <== NOT EXECUTED
30002d4c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
300035c0 <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
300035c0: e59f3028 ldr r3, [pc, #40] ; 300035f0 <free_user_env+0x30> <== NOT EXECUTED
* NOTE: this must be called with
* thread dispatching disabled!
*/
static void
free_user_env(void *venv)
{
300035c4: e92d4010 push {r4, lr} <== NOT EXECUTED
rtems_user_env_t *env = (rtems_user_env_t*) venv ;
if (env != &rtems_global_user_env
300035c8: e1500003 cmp r0, r3 <== NOT EXECUTED
* NOTE: this must be called with
* thread dispatching disabled!
*/
static void
free_user_env(void *venv)
{
300035cc: e1a04000 mov r4, r0 <== NOT EXECUTED
rtems_user_env_t *env = (rtems_user_env_t*) venv ;
if (env != &rtems_global_user_env
300035d0: 08bd8010 popeq {r4, pc} <== NOT EXECUTED
#ifdef HAVE_USERENV_REFCNT
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
300035d4: e2800004 add r0, r0, #4 <== NOT EXECUTED
300035d8: ebfffb9b bl 3000244c <rtems_filesystem_freenode> <== NOT EXECUTED
rtems_filesystem_freenode( &env->root_directory);
300035dc: e2840018 add r0, r4, #24 <== NOT EXECUTED
300035e0: ebfffb99 bl 3000244c <rtems_filesystem_freenode> <== NOT EXECUTED
free(env);
300035e4: e1a00004 mov r0, r4 <== NOT EXECUTED
}
}
300035e8: e8bd4010 pop {r4, lr} <== NOT EXECUTED
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
rtems_filesystem_freenode( &env->root_directory);
free(env);
300035ec: eafffb9b b 30002460 <free> <== NOT EXECUTED
30003fd4 <iproc>:
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
if (tty->termios.c_iflag & ISTRIP)
30003fd4: e5913030 ldr r3, [r1, #48] ; 0x30
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
30003fd8: e92d4030 push {r4, r5, lr}
if (tty->termios.c_iflag & ISTRIP)
30003fdc: e3130020 tst r3, #32
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
30003fe0: e20040ff and r4, r0, #255 ; 0xff
if (tty->termios.c_iflag & ISTRIP)
c &= 0x7f;
30003fe4: 1200407f andne r4, r0, #127 ; 0x7f
if (tty->termios.c_iflag & IUCLC)
30003fe8: e3130c02 tst r3, #512 ; 0x200
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
30003fec: e1a05001 mov r5, r1
if (tty->termios.c_iflag & ISTRIP)
c &= 0x7f;
if (tty->termios.c_iflag & IUCLC)
30003ff0: 0a000007 beq 30004014 <iproc+0x40>
c = tolower (c);
30003ff4: e59f21a0 ldr r2, [pc, #416] ; 3000419c <iproc+0x1c8>
30003ff8: e5922000 ldr r2, [r2]
30003ffc: e0822004 add r2, r2, r4
30004000: e5d22001 ldrb r2, [r2, #1]
30004004: e2022003 and r2, r2, #3
30004008: e3520001 cmp r2, #1
3000400c: 02844020 addeq r4, r4, #32
30004010: e20440ff and r4, r4, #255 ; 0xff
if (c == '\r') {
30004014: e354000d cmp r4, #13
30004018: 0a000014 beq 30004070 <iproc+0x9c>
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)) {
3000401c: e354000a cmp r4, #10
30004020: 0a000036 beq 30004100 <iproc+0x12c>
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
30004024: e3540000 cmp r4, #0
30004028: 1a000016 bne 30004088 <iproc+0xb4>
}
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
3000402c: e59f216c ldr r2, [pc, #364] ; 300041a0 <iproc+0x1cc>
30004030: e5953020 ldr r3, [r5, #32]
30004034: e5922008 ldr r2, [r2, #8]
30004038: e2422001 sub r2, r2, #1
3000403c: e1530002 cmp r3, r2
30004040: aa000008 bge 30004068 <iproc+0x94>
if (tty->termios.c_lflag & ECHO)
30004044: e595203c ldr r2, [r5, #60] ; 0x3c
30004048: e3120008 tst r2, #8
3000404c: 1a00002e bne 3000410c <iproc+0x138>
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
30004050: e595101c ldr r1, [r5, #28] <== NOT EXECUTED
30004054: e2832001 add r2, r3, #1 <== NOT EXECUTED
30004058: e7c14003 strb r4, [r1, r3] <== NOT EXECUTED
}
return 0;
3000405c: e3a00000 mov r0, #0 <== 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;
30004060: e5852020 str r2, [r5, #32] <== NOT EXECUTED
30004064: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
}
return 0;
30004068: e3a00000 mov r0, #0 <== NOT EXECUTED
}
3000406c: 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)
30004070: e3130080 tst r3, #128 ; 0x80
return 0;
30004074: 13a00000 movne r0, #0
if (tty->termios.c_iflag & IUCLC)
c = tolower (c);
if (c == '\r') {
if (tty->termios.c_iflag & IGNCR)
30004078: 18bd8030 popne {r4, r5, pc}
return 0;
if (tty->termios.c_iflag & ICRNL)
c = '\n';
3000407c: e3130c01 tst r3, #256 ; 0x100
30004080: 03a0400d moveq r4, #13
30004084: 13a0400a movne r4, #10
} else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
30004088: e595303c ldr r3, [r5, #60] ; 0x3c
3000408c: e3130002 tst r3, #2
30004090: 0affffe5 beq 3000402c <iproc+0x58>
if (c == tty->termios.c_cc[VERASE]) {
30004094: e5d52043 ldrb r2, [r5, #67] ; 0x43
30004098: e1520004 cmp r2, r4
3000409c: 0a000039 beq 30004188 <iproc+0x1b4>
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
300040a0: e5d52044 ldrb r2, [r5, #68] ; 0x44
300040a4: e1520004 cmp r2, r4
300040a8: 0a000025 beq 30004144 <iproc+0x170>
erase (tty, 1);
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
300040ac: e5d52045 ldrb r2, [r5, #69] ; 0x45
300040b0: e1520004 cmp r2, r4
return 1;
300040b4: 03a00001 moveq r0, #1
}
else if (c == tty->termios.c_cc[VKILL]) {
erase (tty, 1);
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
300040b8: 08bd8030 popeq {r4, r5, pc}
return 1;
} else if (c == '\n') {
300040bc: e354000a cmp r4, #10
300040c0: 0a000024 beq 30004158 <iproc+0x184>
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]) ||
300040c4: e5d5204c ldrb r2, [r5, #76] ; 0x4c
300040c8: e1520004 cmp r2, r4
300040cc: 0a000002 beq 300040dc <iproc+0x108>
300040d0: e5d52051 ldrb r2, [r5, #81] ; 0x51
300040d4: e1520004 cmp r2, r4
300040d8: 1affffd3 bne 3000402c <iproc+0x58>
(c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
300040dc: e3130008 tst r3, #8 <== NOT EXECUTED
300040e0: 1a000013 bne 30004134 <iproc+0x160> <== NOT EXECUTED
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
300040e4: e5953020 ldr r3, [r5, #32] <== NOT EXECUTED
300040e8: e595101c ldr r1, [r5, #28] <== NOT EXECUTED
300040ec: e2832001 add r2, r3, #1 <== NOT EXECUTED
300040f0: e7c14003 strb r4, [r1, r3] <== NOT EXECUTED
return 1;
300040f4: e3a00001 mov r0, #1 <== NOT EXECUTED
return 1;
} else if ((c == tty->termios.c_cc[VEOL]) ||
(c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
300040f8: e5852020 str r2, [r5, #32] <== NOT EXECUTED
return 1;
300040fc: e8bd8030 pop {r4, r5, pc} <== 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)) {
c = '\r';
30004100: e3130040 tst r3, #64 ; 0x40
30004104: 13a0400d movne r4, #13
30004108: eaffffde b 30004088 <iproc+0xb4>
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
3000410c: e1a00004 mov r0, r4
30004110: e1a01005 mov r1, r5
30004114: ebffff03 bl 30003d28 <echo>
30004118: e5953020 ldr r3, [r5, #32]
tty->cbuf[tty->ccount++] = c;
3000411c: e595101c ldr r1, [r5, #28]
30004120: e2832001 add r2, r3, #1
30004124: e7c14003 strb r4, [r1, r3]
}
return 0;
30004128: e3a00000 mov r0, #0
* 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;
3000412c: e5852020 str r2, [r5, #32]
30004130: e8bd8030 pop {r4, r5, pc}
tty->cbuf[tty->ccount++] = c;
return 1;
} else if ((c == tty->termios.c_cc[VEOL]) ||
(c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
30004134: e1a00004 mov r0, r4 <== NOT EXECUTED
30004138: e1a01005 mov r1, r5 <== NOT EXECUTED
3000413c: ebfffef9 bl 30003d28 <echo> <== NOT EXECUTED
30004140: eaffffe7 b 300040e4 <iproc+0x110> <== NOT EXECUTED
if (c == tty->termios.c_cc[VERASE]) {
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
erase (tty, 1);
30004144: e1a00005 mov r0, r5
30004148: e3a01001 mov r1, #1
3000414c: ebffff1a bl 30003dbc <erase>
return 0;
30004150: e3a00000 mov r0, #0
30004154: e8bd8030 pop {r4, r5, pc}
}
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
} else if (c == '\n') {
if (tty->termios.c_lflag & (ECHO | ECHONL))
30004158: e3130048 tst r3, #72 ; 0x48
echo (c, tty);
3000415c: 11a00004 movne r0, r4
30004160: 11a01005 movne r1, r5
30004164: 1bfffeef blne 30003d28 <echo>
tty->cbuf[tty->ccount++] = c;
30004168: e5953020 ldr r3, [r5, #32]
3000416c: e595101c ldr r1, [r5, #28]
30004170: e3a0000a mov r0, #10
30004174: e2832001 add r2, r3, #1
30004178: e7c10003 strb r0, [r1, r3]
return 1;
3000417c: e3a00001 mov r0, #1
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
} else if (c == '\n') {
if (tty->termios.c_lflag & (ECHO | ECHONL))
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
30004180: e5852020 str r2, [r5, #32]
return 1;
30004184: e8bd8030 pop {r4, r5, pc}
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
if (c == tty->termios.c_cc[VERASE]) {
erase (tty, 0);
30004188: e1a00005 mov r0, r5
3000418c: e3a01000 mov r1, #0
30004190: ebffff09 bl 30003dbc <erase>
return 0;
30004194: e3a00000 mov r0, #0
30004198: e8bd8030 pop {r4, r5, pc}
30021b50 <killinfo>:
int killinfo(
pid_t pid,
int sig,
const union sigval *value
)
{
30021b50: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
30021b54: e24dd00c sub sp, sp, #12
30021b58: e1a04000 mov r4, r0
30021b5c: e1a05001 mov r5, r1
30021b60: e1a08002 mov r8, r2
POSIX_signals_Siginfo_node *psiginfo;
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
30021b64: ebffff40 bl 3002186c <getpid>
30021b68: e1500004 cmp r0, r4
30021b6c: 1a000090 bne 30021db4 <killinfo+0x264>
rtems_set_errno_and_return_minus_one( ESRCH );
/*
* Validate the signal passed.
*/
if ( !sig )
30021b70: e3550000 cmp r5, #0
30021b74: 0a000093 beq 30021dc8 <killinfo+0x278>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
30021b78: e2454001 sub r4, r5, #1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
30021b7c: e354001f cmp r4, #31
30021b80: 8a000090 bhi 30021dc8 <killinfo+0x278>
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* If the signal is being ignored, then we are out of here.
*/
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN )
30021b84: e59f6268 ldr r6, [pc, #616] ; 30021df4 <killinfo+0x2a4>
30021b88: e1a07085 lsl r7, r5, #1
30021b8c: e0873005 add r3, r7, r5
30021b90: e0863103 add r3, r6, r3, lsl #2
30021b94: e5933008 ldr r3, [r3, #8]
30021b98: e3530001 cmp r3, #1
return 0;
30021b9c: 03a00000 moveq r0, #0
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* If the signal is being ignored, then we are out of here.
*/
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN )
30021ba0: 0a00006a beq 30021d50 <killinfo+0x200>
/*
* 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 ) )
30021ba4: e3550008 cmp r5, #8
30021ba8: 13550004 cmpne r5, #4
30021bac: 0a000069 beq 30021d58 <killinfo+0x208>
30021bb0: e355000b cmp r5, #11
30021bb4: 0a000067 beq 30021d58 <killinfo+0x208>
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
30021bb8: e3a03001 mov r3, #1
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
if ( !value ) {
30021bbc: e3580000 cmp r8, #0
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
30021bc0: e58d3004 str r3, [sp, #4]
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
30021bc4: e58d5000 str r5, [sp]
30021bc8: e1a04413 lsl r4, r3, r4
siginfo->si_code = SI_USER;
if ( !value ) {
siginfo->si_value.sival_int = 0;
} else {
siginfo->si_value = *value;
30021bcc: 15983000 ldrne r3, [r8]
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
if ( !value ) {
siginfo->si_value.sival_int = 0;
30021bd0: 058d8008 streq r8, [sp, #8]
} else {
siginfo->si_value = *value;
30021bd4: 158d3008 strne r3, [sp, #8]
30021bd8: e59f3218 ldr r3, [pc, #536] ; 30021df8 <killinfo+0x2a8>
30021bdc: e5932000 ldr r2, [r3]
30021be0: e2822001 add r2, r2, #1
30021be4: e5832000 str r2, [r3]
/*
* 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;
30021be8: e59f320c ldr r3, [pc, #524] ; 30021dfc <killinfo+0x2ac>
30021bec: e5930004 ldr r0, [r3, #4]
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( _POSIX_signals_Is_interested( api, mask ) ) {
30021bf0: e5903108 ldr r3, [r0, #264] ; 0x108
30021bf4: e59330cc ldr r3, [r3, #204] ; 0xcc
30021bf8: e1d43003 bics r3, r4, r3
30021bfc: 1a000046 bne 30021d1c <killinfo+0x1cc>
/* XXX violation of visibility -- need to define thread queue support */
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = the_chain->first ;
30021c00: e59fc1f8 ldr ip, [pc, #504] ; 30021e00 <killinfo+0x2b0>
30021c04: e49c3004 ldr r3, [ip], #4
30021c08: e153000c cmp r3, ip
30021c0c: 0a000013 beq 30021c60 <killinfo+0x110>
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
30021c10: e5932030 ldr r2, [r3, #48] ; 0x30
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
the_thread = (Thread_Control *)the_node;
30021c14: e1a00003 mov r0, r3
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
30021c18: e1140002 tst r4, r2
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
the_thread = (Thread_Control *)the_node;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
30021c1c: e5932108 ldr r2, [r3, #264] ; 0x108
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
30021c20: 1a00003d bne 30021d1c <killinfo+0x1cc>
/*
* Is this thread is blocked waiting for another signal but has
* not blocked this one?
*/
if (~api->signals_blocked & mask)
30021c24: e59220cc ldr r2, [r2, #204] ; 0xcc
30021c28: e1d42002 bics r2, r4, r2
30021c2c: 0a000008 beq 30021c54 <killinfo+0x104>
30021c30: ea000039 b 30021d1c <killinfo+0x1cc>
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
30021c34: e5932030 ldr r2, [r3, #48] ; 0x30 <== NOT EXECUTED
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
the_thread = (Thread_Control *)the_node;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
30021c38: e5931108 ldr r1, [r3, #264] ; 0x108 <== NOT EXECUTED
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
30021c3c: e1140002 tst r4, r2 <== 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;
30021c40: e1a00003 mov r0, r3 <== NOT EXECUTED
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
30021c44: 1a000034 bne 30021d1c <killinfo+0x1cc> <== NOT EXECUTED
/*
* Is this thread is blocked waiting for another signal but has
* not blocked this one?
*/
if (~api->signals_blocked & mask)
30021c48: e59120cc ldr r2, [r1, #204] ; 0xcc <== NOT EXECUTED
30021c4c: e1d42002 bics r2, r4, r2 <== NOT EXECUTED
30021c50: 1a000031 bne 30021d1c <killinfo+0x1cc> <== NOT EXECUTED
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
30021c54: e5933000 ldr r3, [r3]
/* XXX violation of visibility -- need to define thread queue support */
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = the_chain->first ;
30021c58: e153000c cmp r3, ip
30021c5c: 1afffff4 bne 30021c34 <killinfo+0xe4>
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
30021c60: e59f319c ldr r3, [pc, #412] ; 30021e04 <killinfo+0x2b4>
30021c64: e59f819c ldr r8, [pc, #412] ; 30021e08 <killinfo+0x2b8>
30021c68: e5d3e000 ldrb lr, [r3]
*
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
30021c6c: e3a0a000 mov sl, #0
interested_priority = PRIORITY_MAXIMUM + 1;
30021c70: e28ee001 add lr, lr, #1
for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) {
/*
* This can occur when no one is interested and an API is not configured.
*/
if ( !_Objects_Information_table[ the_api ] )
30021c74: e5b83004 ldr r3, [r8, #4]!
30021c78: e3530000 cmp r3, #0
30021c7c: 0a000020 beq 30021d04 <killinfo+0x1b4>
continue;
the_info = _Objects_Information_table[ the_api ][ 1 ];
30021c80: e5933004 ldr r3, [r3, #4]
*/
if ( !the_info )
continue;
#endif
maximum = the_info->maximum;
30021c84: e1d3c1b0 ldrh ip, [r3, #16]
object_table = the_info->local_table;
30021c88: e593101c ldr r1, [r3, #28]
for ( index = 1 ; index <= maximum ; index++ ) {
30021c8c: e35c0000 cmp ip, #0
30021c90: 0a00001b beq 30021d04 <killinfo+0x1b4>
30021c94: e3a02001 mov r2, #1
the_thread = (Thread_Control *) object_table[ index ];
30021c98: e5b13004 ldr r3, [r1, #4]!
if ( !the_thread )
30021c9c: e3530000 cmp r3, #0
30021ca0: 0a000014 beq 30021cf8 <killinfo+0x1a8>
/*
* If this thread is of lower priority than the interested thread,
* go on to the next thread.
*/
if ( the_thread->current_priority > interested_priority )
30021ca4: e5930014 ldr r0, [r3, #20]
30021ca8: e150000e cmp r0, lr
30021cac: 8a000011 bhi 30021cf8 <killinfo+0x1a8>
#if defined(RTEMS_DEBUG)
if ( !api )
continue;
#endif
if ( !_POSIX_signals_Is_interested( api, mask ) )
30021cb0: e5939108 ldr r9, [r3, #264] ; 0x108
30021cb4: e59990cc ldr r9, [r9, #204] ; 0xcc
30021cb8: e1d49009 bics r9, r4, r9
30021cbc: 0a00000d beq 30021cf8 <killinfo+0x1a8>
*
* NOTE: We initialized interested_priority to PRIORITY_MAXIMUM + 1
* so we never have to worry about deferencing a NULL
* interested thread.
*/
if ( the_thread->current_priority < interested_priority ) {
30021cc0: e150000e cmp r0, lr
30021cc4: 3a000034 bcc 30021d9c <killinfo+0x24c>
* and blocking interruptibutable by signal.
*
* If the interested thread is ready, don't think about changing.
*/
if ( !_States_Is_ready( interested->current_state ) ) {
30021cc8: e59a9010 ldr r9, [sl, #16]
30021ccc: e3590000 cmp r9, #0
30021cd0: 0a000008 beq 30021cf8 <killinfo+0x1a8>
/* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
30021cd4: e593b010 ldr fp, [r3, #16]
30021cd8: e35b0000 cmp fp, #0
30021cdc: 0a00002e beq 30021d9c <killinfo+0x24c>
continue;
}
DEBUG_STEP("6");
/* prefer blocked/interruptible over blocked/not interruptible */
if ( !_States_Is_interruptible_by_signal(interested->current_state) ) {
30021ce0: e3190201 tst r9, #268435456 ; 0x10000000
30021ce4: 1a000003 bne 30021cf8 <killinfo+0x1a8>
*/
RTEMS_INLINE_ROUTINE bool _States_Is_interruptible_by_signal (
States_Control the_states
)
{
return (the_states & STATES_INTERRUPTIBLE_BY_SIGNAL);
30021ce8: e20bb201 and fp, fp, #268435456 ; 0x10000000
DEBUG_STEP("7");
if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) {
30021cec: e35b0000 cmp fp, #0
30021cf0: 11a0e000 movne lr, r0
30021cf4: 11a0a003 movne sl, r3
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
30021cf8: e2822001 add r2, r2, #1
30021cfc: e15c0002 cmp ip, r2
30021d00: 2affffe4 bcs 30021c98 <killinfo+0x148>
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) {
30021d04: e59f3100 ldr r3, [pc, #256] ; 30021e0c <killinfo+0x2bc>
30021d08: e1580003 cmp r8, r3
30021d0c: 1affffd8 bne 30021c74 <killinfo+0x124>
}
}
}
}
if ( interested ) {
30021d10: e35a0000 cmp sl, #0
30021d14: 0a000005 beq 30021d30 <killinfo+0x1e0>
30021d18: e1a0000a mov r0, sl
/*
* 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 ) ) {
30021d1c: e1a01005 mov r1, r5
30021d20: e1a0200d mov r2, sp
30021d24: eb000045 bl 30021e40 <_POSIX_signals_Unblock_thread>
30021d28: e3500000 cmp r0, #0
30021d2c: 1a000005 bne 30021d48 <killinfo+0x1f8>
/*
* 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 );
30021d30: e1a00004 mov r0, r4
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
30021d34: e0875005 add r5, r7, r5
/*
* 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 );
30021d38: eb000036 bl 30021e18 <_POSIX_signals_Set_process_signals>
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
30021d3c: e7963105 ldr r3, [r6, r5, lsl #2]
30021d40: e3530002 cmp r3, #2
30021d44: 0a000007 beq 30021d68 <killinfo+0x218>
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
30021d48: ebffac42 bl 3000ce58 <_Thread_Enable_dispatch>
return 0;
30021d4c: e3a00000 mov r0, #0
}
30021d50: e28dd00c add sp, sp, #12
30021d54: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
* P1003.1c/Draft 10, p. 33 says that certain signals should always
* be directed to the executing thread such as those caused by hardware
* faults.
*/
if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) )
return pthread_kill( pthread_self(), sig );
30021d58: eb0000b5 bl 30022034 <pthread_self>
30021d5c: e1a01005 mov r1, r5
30021d60: eb00007a bl 30021f50 <pthread_kill>
30021d64: eafffff9 b 30021d50 <killinfo+0x200>
_POSIX_signals_Set_process_signals( mask );
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
30021d68: e59f00a0 ldr r0, [pc, #160] ; 30021e10 <killinfo+0x2c0>
30021d6c: ebffa645 bl 3000b688 <_Chain_Get>
if ( !psiginfo ) {
30021d70: e250c000 subs ip, r0, #0
30021d74: 0a000018 beq 30021ddc <killinfo+0x28c>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EAGAIN );
}
psiginfo->Info = *siginfo;
30021d78: e28c3008 add r3, ip, #8
30021d7c: e1a0200d mov r2, sp
30021d80: e8920007 ldm r2, {r0, r1, r2}
30021d84: e8830007 stm r3, {r0, r1, r2}
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
30021d88: e59f0084 ldr r0, [pc, #132] ; 30021e14 <killinfo+0x2c4>
30021d8c: e1a0100c mov r1, ip
30021d90: e0800105 add r0, r0, r5, lsl #2
30021d94: ebffa628 bl 3000b63c <_Chain_Append>
30021d98: eaffffea b 30021d48 <killinfo+0x1f8>
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
30021d9c: e2822001 add r2, r2, #1
30021da0: e15c0002 cmp ip, r2
*/
if ( !_States_Is_ready( interested->current_state ) ) {
/* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
30021da4: e1a0e000 mov lr, r0
30021da8: e1a0a003 mov sl, r3
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
30021dac: 2affffb9 bcs 30021c98 <killinfo+0x148>
30021db0: eaffffd3 b 30021d04 <killinfo+0x1b4>
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
rtems_set_errno_and_return_minus_one( ESRCH );
30021db4: ebffc50f bl 300131f8 <__errno>
30021db8: e3a03003 mov r3, #3
30021dbc: e5803000 str r3, [r0]
30021dc0: e3e00000 mvn r0, #0
30021dc4: eaffffe1 b 30021d50 <killinfo+0x200>
*/
if ( !sig )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
rtems_set_errno_and_return_minus_one( EINVAL );
30021dc8: ebffc50a bl 300131f8 <__errno>
30021dcc: e3a03016 mov r3, #22
30021dd0: e5803000 str r3, [r0]
30021dd4: e3e00000 mvn r0, #0
30021dd8: eaffffdc b 30021d50 <killinfo+0x200>
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
_Thread_Enable_dispatch();
30021ddc: ebffac1d bl 3000ce58 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EAGAIN );
30021de0: ebffc504 bl 300131f8 <__errno>
30021de4: e3a0300b mov r3, #11
30021de8: e5803000 str r3, [r0]
30021dec: e3e00000 mvn r0, #0
30021df0: eaffffd6 b 30021d50 <killinfo+0x200>
30002410 <malloc>:
size_t size
)
{
void *return_this;
MSBUMP(malloc_calls, 1);
30002410: e59f30d4 ldr r3, [pc, #212] ; 300024ec <malloc+0xdc>
#include "malloc_p.h"
void *malloc(
size_t size
)
{
30002414: e92d4030 push {r4, r5, lr}
void *return_this;
MSBUMP(malloc_calls, 1);
30002418: e5932004 ldr r2, [r3, #4]
#include "malloc_p.h"
void *malloc(
size_t size
)
{
3000241c: e1a04000 mov r4, r0
void *return_this;
MSBUMP(malloc_calls, 1);
30002420: e2822001 add r2, r2, #1
30002424: e5832004 str r2, [r3, #4]
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
30002428: ebffffb0 bl 300022f0 <malloc_deferred_frees_process>
/*
* Validate the parameters
*/
if ( !size )
3000242c: e3540000 cmp r4, #0
return (void *) 0;
30002430: 01a05004 moveq r5, r4
malloc_deferred_frees_process();
/*
* Validate the parameters
*/
if ( !size )
30002434: 0a000018 beq 3000249c <malloc+0x8c>
return (void *) 0;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
30002438: e59f30b0 ldr r3, [pc, #176] ; 300024f0 <malloc+0xe0>
3000243c: e5933000 ldr r3, [r3]
30002440: e3530003 cmp r3, #3
30002444: 0a000024 beq 300024dc <malloc+0xcc>
RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate(
Heap_Control *heap,
uintptr_t size
)
{
return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 );
30002448: e59f30a4 ldr r3, [pc, #164] ; 300024f4 <malloc+0xe4>
3000244c: e3a02000 mov r2, #0
30002450: e5930000 ldr r0, [r3]
30002454: e1a01004 mov r1, r4
30002458: e1a03002 mov r3, r2
3000245c: eb001369 bl 30007208 <_Protected_heap_Allocate_aligned_with_boundary>
* If this fails then return a NULL pointer.
*/
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
30002460: e2505000 subs r5, r0, #0
30002464: 0a00000e beq 300024a4 <malloc+0x94>
}
/*
* If the user wants us to dirty the allocated memory, then do it.
*/
if ( rtems_malloc_dirty_helper )
30002468: e59f3088 ldr r3, [pc, #136] ; 300024f8 <malloc+0xe8>
3000246c: e5933000 ldr r3, [r3]
30002470: e3530000 cmp r3, #0
(*rtems_malloc_dirty_helper)( return_this, size );
30002474: 11a00005 movne r0, r5
30002478: 11a01004 movne r1, r4
3000247c: 11a0e00f movne lr, pc
30002480: 112fff13 bxne r3
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
30002484: e59f3070 ldr r3, [pc, #112] ; 300024fc <malloc+0xec>
30002488: e5933000 ldr r3, [r3]
3000248c: e3530000 cmp r3, #0
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
30002490: 11a00005 movne r0, r5
30002494: 11a0e00f movne lr, pc
30002498: 1593f004 ldrne pc, [r3, #4]
return return_this;
}
3000249c: e1a00005 mov r0, r5
300024a0: e8bd8030 pop {r4, r5, pc}
*/
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
if (rtems_malloc_sbrk_helpers)
300024a4: e59f3054 ldr r3, [pc, #84] ; 30002500 <malloc+0xf0>
300024a8: e5933000 ldr r3, [r3]
300024ac: e3530000 cmp r3, #0
300024b0: 0a000005 beq 300024cc <malloc+0xbc>
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
300024b4: e1a00004 mov r0, r4
300024b8: e1a0e00f mov lr, pc
300024bc: e593f004 ldr pc, [r3, #4]
if ( !return_this ) {
300024c0: e3500000 cmp r0, #0
300024c4: 11a05000 movne r5, r0
300024c8: 1affffe6 bne 30002468 <malloc+0x58>
errno = ENOMEM;
300024cc: eb002d89 bl 3000daf8 <__errno>
300024d0: e3a0300c mov r3, #12
300024d4: e5803000 str r3, [r0]
return (void *) 0;
300024d8: eaffffef b 3000249c <malloc+0x8c>
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
!malloc_is_system_state_OK() )
300024dc: ebffff6f bl 300022a0 <malloc_is_system_state_OK>
return (void *) 0;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
300024e0: e2505000 subs r5, r0, #0
300024e4: 1affffd7 bne 30002448 <malloc+0x38>
300024e8: eaffffeb b 3000249c <malloc+0x8c> <== NOT EXECUTED
3000caa0 <memfile_ftruncate>:
int memfile_ftruncate(
rtems_libio_t *iop,
rtems_off64_t length
)
{
3000caa0: e92d4010 push {r4, lr}
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
3000caa4: e5904018 ldr r4, [r0, #24]
int memfile_ftruncate(
rtems_libio_t *iop,
rtems_off64_t length
)
{
3000caa8: e1a03000 mov r3, r0
* 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 )
3000caac: e5940054 ldr r0, [r4, #84] ; 0x54
int memfile_ftruncate(
rtems_libio_t *iop,
rtems_off64_t length
)
{
3000cab0: e24dd008 sub sp, sp, #8
* 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 )
3000cab4: e1500002 cmp r0, r2
3000cab8: ba00000e blt 3000caf8 <memfile_ftruncate+0x58>
3000cabc: 0a00000a beq 3000caec <memfile_ftruncate+0x4c>
* 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;
3000cac0: e5841050 str r1, [r4, #80] ; 0x50
3000cac4: e5842054 str r2, [r4, #84] ; 0x54
iop->size = the_jnode->info.file.size;
IMFS_update_atime( the_jnode );
3000cac8: e1a0000d mov r0, sp
* deleted. So we leave the previously allocated blocks in place for
* future use and just set the length.
*/
the_jnode->info.file.size = length;
iop->size = the_jnode->info.file.size;
3000cacc: e9830006 stmib r3, {r1, r2}
IMFS_update_atime( the_jnode );
3000cad0: e3a01000 mov r1, #0
3000cad4: ebffd59c bl 3000214c <gettimeofday>
3000cad8: e59d3000 ldr r3, [sp]
return 0;
3000cadc: e3a00000 mov r0, #0
*/
the_jnode->info.file.size = length;
iop->size = the_jnode->info.file.size;
IMFS_update_atime( the_jnode );
3000cae0: e5843040 str r3, [r4, #64] ; 0x40
return 0;
}
3000cae4: e28dd008 add sp, sp, #8
3000cae8: e8bd8010 pop {r4, pc}
* 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 )
3000caec: e5940050 ldr r0, [r4, #80] ; 0x50
3000caf0: e1500001 cmp r0, r1
3000caf4: 2afffff1 bcs 3000cac0 <memfile_ftruncate+0x20>
return IMFS_memfile_extend( the_jnode, length );
3000caf8: e1a00004 mov r0, r4 <== NOT EXECUTED
3000cafc: ebfffeea bl 3000c6ac <IMFS_memfile_extend> <== NOT EXECUTED
3000cb00: eafffff7 b 3000cae4 <memfile_ftruncate+0x44> <== NOT EXECUTED
3000cb04 <memfile_lseek>:
rtems_off64_t memfile_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
3000cb04: e92d4030 push {r4, r5, lr}
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
3000cb08: e5905018 ldr r5, [r0, #24]
rtems_off64_t memfile_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
3000cb0c: e1a04000 mov r4, r0
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
if (the_jnode->type == IMFS_LINEAR_FILE) {
3000cb10: e595304c ldr r3, [r5, #76] ; 0x4c
3000cb14: e3530006 cmp r3, #6
3000cb18: 0a00000d beq 3000cb54 <memfile_lseek+0x50>
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 ))
3000cb1c: e1a00005 mov r0, r5
3000cb20: e284200c add r2, r4, #12
3000cb24: e8920006 ldm r2, {r1, r2}
3000cb28: ebfffedf bl 3000c6ac <IMFS_memfile_extend>
3000cb2c: e3500000 cmp r0, #0
3000cb30: 1a000018 bne 3000cb98 <memfile_lseek+0x94>
rtems_set_errno_and_return_minus_one( ENOSPC );
iop->size = the_jnode->info.file.size;
3000cb34: e2853050 add r3, r5, #80 ; 0x50
3000cb38: e893000c ldm r3, {r2, r3}
3000cb3c: e984000c stmib r4, {r2, r3}
3000cb40: e284300c add r3, r4, #12
3000cb44: e893000c ldm r3, {r2, r3}
}
return iop->offset;
}
3000cb48: e1a00002 mov r0, r2
3000cb4c: e1a01003 mov r1, r3
3000cb50: e8bd8030 pop {r4, r5, pc}
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
if (the_jnode->type == IMFS_LINEAR_FILE) {
if (iop->offset > the_jnode->info.linearfile.size)
3000cb54: e5951054 ldr r1, [r5, #84] ; 0x54
3000cb58: e280300c add r3, r0, #12
3000cb5c: e893000c ldm r3, {r2, r3}
3000cb60: e1530001 cmp r3, r1
3000cb64: e5950050 ldr r0, [r5, #80] ; 0x50
3000cb68: ca000002 bgt 3000cb78 <memfile_lseek+0x74>
3000cb6c: 1afffff5 bne 3000cb48 <memfile_lseek+0x44>
3000cb70: e1520000 cmp r2, r0
3000cb74: 9afffff3 bls 3000cb48 <memfile_lseek+0x44>
iop->offset = the_jnode->info.linearfile.size;
3000cb78: e1a02000 mov r2, r0 <== NOT EXECUTED
3000cb7c: e1a03001 mov r3, r1 <== NOT EXECUTED
3000cb80: e1a05000 mov r5, r0 <== NOT EXECUTED
3000cb84: e584000c str r0, [r4, #12] <== NOT EXECUTED
3000cb88: e5841010 str r1, [r4, #16] <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSPC );
iop->size = the_jnode->info.file.size;
}
return iop->offset;
}
3000cb8c: e1a00002 mov r0, r2 <== NOT EXECUTED
3000cb90: e1a01003 mov r1, r3 <== NOT EXECUTED
3000cb94: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
if (iop->offset > the_jnode->info.linearfile.size)
iop->offset = the_jnode->info.linearfile.size;
}
else { /* Must be a block file (IMFS_MEMORY_FILE). */
if (IMFS_memfile_extend( the_jnode, iop->offset ))
rtems_set_errno_and_return_minus_one( ENOSPC );
3000cb98: eb0003d6 bl 3000daf8 <__errno> <== NOT EXECUTED
3000cb9c: e3a0301c mov r3, #28 <== NOT EXECUTED
3000cba0: e5803000 str r3, [r0] <== NOT EXECUTED
3000cba4: e3e02000 mvn r2, #0 <== NOT EXECUTED
3000cba8: e3e03000 mvn r3, #0 <== NOT EXECUTED
3000cbac: eaffffe5 b 3000cb48 <memfile_lseek+0x44> <== NOT EXECUTED
3000c9f0 <memfile_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
3000c9f0: e92d40f0 push {r4, r5, r6, r7, lr}
3000c9f4: e1a04000 mov r4, r0
the_jnode = iop->pathinfo.node_access;
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
3000c9f8: e5900014 ldr r0, [r0, #20]
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
3000c9fc: e24dd004 sub sp, sp, #4
the_jnode = iop->pathinfo.node_access;
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
3000ca00: e3100f81 tst r0, #516 ; 0x204
uint32_t mode
)
{
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
3000ca04: e5945018 ldr r5, [r4, #24]
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
3000ca08: 0a000002 beq 3000ca18 <memfile_open+0x28>
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
3000ca0c: e595304c ldr r3, [r5, #76] ; 0x4c
3000ca10: e3530006 cmp r3, #6
3000ca14: 0a00000c beq 3000ca4c <memfile_open+0x5c>
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)
3000ca18: e3100c02 tst r0, #512 ; 0x200
3000ca1c: 1a000005 bne 3000ca38 <memfile_open+0x48>
3000ca20: e2853050 add r3, r5, #80 ; 0x50
3000ca24: e893000c ldm r3, {r2, r3}
iop->offset = the_jnode->info.file.size;
iop->size = the_jnode->info.file.size;
3000ca28: e984000c stmib r4, {r2, r3}
return 0;
3000ca2c: e3a00000 mov r0, #0
}
3000ca30: e28dd004 add sp, sp, #4
3000ca34: e8bd80f0 pop {r4, r5, r6, r7, pc}
if ((count != 0)
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
return -1;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
iop->offset = the_jnode->info.file.size;
3000ca38: e2853050 add r3, r5, #80 ; 0x50
3000ca3c: e893000c ldm r3, {r2, r3}
3000ca40: e584200c str r2, [r4, #12]
3000ca44: e5843010 str r3, [r4, #16]
3000ca48: eafffff6 b 3000ca28 <memfile_open+0x38>
/*
* 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;
3000ca4c: e595c050 ldr ip, [r5, #80] ; 0x50 <== NOT EXECUTED
const unsigned char *buffer = the_jnode->info.linearfile.direct;
the_jnode->type = IMFS_MEMORY_FILE;
the_jnode->info.file.size = 0;
the_jnode->info.file.indirect = 0;
3000ca50: e3a06000 mov r6, #0 <== NOT EXECUTED
&& (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;
the_jnode->info.file.size = 0;
3000ca54: e3a01000 mov r1, #0 <== NOT EXECUTED
3000ca58: e3a02000 mov r2, #0 <== NOT EXECUTED
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
uint32_t count = the_jnode->info.linearfile.size;
const unsigned char *buffer = the_jnode->info.linearfile.direct;
the_jnode->type = IMFS_MEMORY_FILE;
3000ca5c: e3a07005 mov r7, #5 <== 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)
3000ca60: e15c0006 cmp ip, r6 <== 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;
3000ca64: e5953058 ldr r3, [r5, #88] ; 0x58 <== NOT EXECUTED
the_jnode->type = IMFS_MEMORY_FILE;
3000ca68: e585704c str r7, [r5, #76] ; 0x4c <== NOT EXECUTED
the_jnode->info.file.size = 0;
3000ca6c: e5851050 str r1, [r5, #80] ; 0x50 <== NOT EXECUTED
3000ca70: e5852054 str r2, [r5, #84] ; 0x54 <== NOT EXECUTED
the_jnode->info.file.indirect = 0;
3000ca74: e5856058 str r6, [r5, #88] ; 0x58 <== NOT EXECUTED
the_jnode->info.file.doubly_indirect = 0;
3000ca78: e585605c str r6, [r5, #92] ; 0x5c <== NOT EXECUTED
the_jnode->info.file.triply_indirect = 0;
3000ca7c: e5856060 str r6, [r5, #96] ; 0x60 <== NOT EXECUTED
if ((count != 0)
3000ca80: 0affffe4 beq 3000ca18 <memfile_open+0x28> <== NOT EXECUTED
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
3000ca84: e1a00005 mov r0, r5 <== NOT EXECUTED
3000ca88: e58dc000 str ip, [sp] <== NOT EXECUTED
3000ca8c: ebffff53 bl 3000c7e0 <IMFS_memfile_write> <== NOT EXECUTED
3000ca90: e3700001 cmn r0, #1 <== NOT EXECUTED
3000ca94: 0affffe5 beq 3000ca30 <memfile_open+0x40> <== NOT EXECUTED
3000ca98: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED
3000ca9c: eaffffdd b 3000ca18 <memfile_open+0x28> <== NOT EXECUTED
30002514 <mknod>:
int mknod(
const char *pathname,
mode_t mode,
dev_t dev
)
{
30002514: e92d41f0 push {r4, r5, r6, r7, r8, lr}
rtems_filesystem_location_info_t temp_loc;
int i;
const char *name_start;
int result;
if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) )
30002518: e3110a0f tst r1, #61440 ; 0xf000
int mknod(
const char *pathname,
mode_t mode,
dev_t dev
)
{
3000251c: e24dd020 sub sp, sp, #32
30002520: e1a04001 mov r4, r1
30002524: e1a06000 mov r6, r0
30002528: e1a07002 mov r7, r2
3000252c: e1a08003 mov r8, r3
rtems_filesystem_location_info_t temp_loc;
int i;
const char *name_start;
int result;
if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) )
30002530: 1a000006 bne 30002550 <mknod+0x3c>
rtems_set_errno_and_return_minus_one( EINVAL );
30002534: eb002d6f bl 3000daf8 <__errno> <== NOT EXECUTED
30002538: e3a03016 mov r3, #22 <== NOT EXECUTED
3000253c: e5803000 str r3, [r0] <== NOT EXECUTED
30002540: e3e04000 mvn r4, #0 <== NOT EXECUTED
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
rtems_filesystem_freenode( &temp_loc );
return result;
}
30002544: e1a00004 mov r0, r4
30002548: e28dd020 add sp, sp, #32
3000254c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
int result;
if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) )
rtems_set_errno_and_return_minus_one( EINVAL );
rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
30002550: e28d5004 add r5, sp, #4
30002554: e1a02005 mov r2, r5
30002558: e28d101c add r1, sp, #28
3000255c: eb000264 bl 30002ef4 <rtems_filesystem_get_start_loc>
result = (*temp_loc.ops->evalformake_h)(
30002560: e59d001c ldr r0, [sp, #28]
30002564: e1a01005 mov r1, r5
30002568: e0860000 add r0, r6, r0
3000256c: e28d2018 add r2, sp, #24
30002570: e59d3010 ldr r3, [sp, #16]
30002574: e1a0e00f mov lr, pc
30002578: e593f004 ldr pc, [r3, #4]
&pathname[i],
&temp_loc,
&name_start
);
if ( result != 0 )
3000257c: e3500000 cmp r0, #0
return -1;
30002580: 13e04000 mvnne r4, #0
result = (*temp_loc.ops->evalformake_h)(
&pathname[i],
&temp_loc,
&name_start
);
if ( result != 0 )
30002584: 1affffee bne 30002544 <mknod+0x30>
return -1;
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
30002588: e1a01004 mov r1, r4
3000258c: e1a02007 mov r2, r7
30002590: e1a03008 mov r3, r8
30002594: e58d5000 str r5, [sp]
30002598: e59d0018 ldr r0, [sp, #24]
3000259c: e59dc010 ldr ip, [sp, #16]
300025a0: e1a0e00f mov lr, pc
300025a4: e59cf014 ldr pc, [ip, #20]
300025a8: e1a04000 mov r4, r0
rtems_filesystem_freenode( &temp_loc );
300025ac: e1a00005 mov r0, r5
300025b0: ebfffeb7 bl 30002094 <rtems_filesystem_freenode>
return result;
300025b4: eaffffe2 b 30002544 <mknod+0x30>
30002644 <mount>:
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
30002644: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
30002648: e3530001 cmp r3, #1
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
3000264c: e24dd028 sub sp, sp, #40 ; 0x28
30002650: e58d3004 str r3, [sp, #4]
30002654: e1a08000 mov r8, r0
30002658: e1a06001 mov r6, r1
3000265c: e1a0a002 mov sl, r2
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
30002660: 8a000092 bhi 300028b0 <mount+0x26c>
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* Get mount handler
*/
mount_h = rtems_filesystem_get_mount_handler( filesystemtype );
30002664: e1a00002 mov r0, r2
30002668: eb001faf bl 3000a52c <rtems_filesystem_get_mount_handler>
if ( !mount_h )
3000266c: e3500000 cmp r0, #0
30002670: e58d000c str r0, [sp, #12]
30002674: 0a00008d beq 300028b0 <mount+0x26c>
{
rtems_filesystem_fsmount_me_t mount_h = NULL;
rtems_filesystem_location_info_t loc;
rtems_filesystem_mount_table_entry_t *mt_entry = NULL;
rtems_filesystem_location_info_t *loc_to_free = NULL;
bool has_target = target != NULL;
30002678: e2565000 subs r5, r6, #0
3000267c: 13a05001 movne r5, #1
const char *target_or_null,
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
30002680: e3550000 cmp r5, #0
30002684: 0a000084 beq 3000289c <mount+0x258>
* 4) The mount point exists with the proper permissions to allow mounting
* 5) The selected mount point already has a file system mounted to it
*
*/
int mount(
30002688: e1a00006 mov r0, r6
3000268c: eb003109 bl 3000eab8 <strlen>
30002690: e58d6010 str r6, [sp, #16]
30002694: e58d0008 str r0, [sp, #8]
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
30002698: e1a0000a mov r0, sl
3000269c: eb003105 bl 3000eab8 <strlen>
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
300026a0: e3580000 cmp r8, #0
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
300026a4: e280b001 add fp, r0, #1
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
300026a8: 01a09008 moveq r9, r8
300026ac: 0a000002 beq 300026bc <mount+0x78>
300026b0: e1a00008 mov r0, r8
300026b4: eb0030ff bl 3000eab8 <strlen>
300026b8: e2809001 add r9, r0, #1
size_t target_length = strlen( target );
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_length + 1;
300026bc: e59d3008 ldr r3, [sp, #8]
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
300026c0: e3a00001 mov r0, #1
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
size_t target_length = strlen( target );
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_length + 1;
300026c4: e2831075 add r1, r3, #117 ; 0x75
300026c8: e081100b add r1, r1, fp
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
300026cc: e0811009 add r1, r1, r9
300026d0: ebfffde8 bl 30001e78 <calloc>
if ( mt_entry != NULL ) {
300026d4: e2504000 subs r4, r0, #0
300026d8: 0a00006a beq 30002888 <mount+0x244>
char *str = (char *) mt_entry + sizeof( *mt_entry );
300026dc: e2847074 add r7, r4, #116 ; 0x74
strcpy( str, filesystemtype );
300026e0: e1a00007 mov r0, r7
300026e4: e1a0100a mov r1, sl
300026e8: eb0030a2 bl 3000e978 <strcpy>
mt_entry->type = str;
str += filesystemtype_size;
if ( source_or_null != NULL ) {
300026ec: e3580000 cmp r8, #0
if ( mt_entry != NULL ) {
char *str = (char *) mt_entry + sizeof( *mt_entry );
strcpy( str, filesystemtype );
mt_entry->type = str;
300026f0: e584706c str r7, [r4, #108] ; 0x6c
str += filesystemtype_size;
300026f4: e087700b add r7, r7, fp
if ( source_or_null != NULL ) {
300026f8: 0a000004 beq 30002710 <mount+0xcc>
strcpy( str, source_or_null );
300026fc: e1a00007 mov r0, r7
30002700: e1a01008 mov r1, r8
30002704: eb00309b bl 3000e978 <strcpy>
mt_entry->dev = str;
30002708: e5847070 str r7, [r4, #112] ; 0x70
str += source_size;
3000270c: e0877009 add r7, r7, r9
}
strcpy( str, target );
30002710: e59d1010 ldr r1, [sp, #16]
30002714: e1a00007 mov r0, r7
30002718: eb003096 bl 3000e978 <strcpy>
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
mt_entry->mt_fs_root.mt_entry = mt_entry;
mt_entry->options = options;
mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf;
3000271c: e59fe204 ldr lr, [pc, #516] ; 30002928 <mount+0x2e4>
30002720: e284c038 add ip, r4, #56 ; 0x38
30002724: e8be000f ldm lr!, {r0, r1, r2, r3}
30002728: e8ac000f stmia ip!, {r0, r1, r2, r3}
3000272c: e8be000f ldm lr!, {r0, r1, r2, r3}
30002730: e8ac000f stmia ip!, {r0, r1, r2, r3}
30002734: e89e000f ldm lr, {r0, r1, r2, r3}
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
mt_entry->mt_fs_root.mt_entry = mt_entry;
mt_entry->options = options;
30002738: e59de004 ldr lr, [sp, #4]
/*
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
3000273c: e3550000 cmp r5, #0
mt_entry->dev = str;
str += source_size;
}
strcpy( str, target );
mt_entry->target = str;
30002740: e5847068 str r7, [r4, #104] ; 0x68
&target_length
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
mt_entry->mt_fs_root.mt_entry = mt_entry;
30002744: e584402c str r4, [r4, #44] ; 0x2c
mt_entry->options = options;
30002748: e584e030 str lr, [r4, #48] ; 0x30
mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf;
3000274c: e88c000f stm ip, {r0, r1, r2, r3}
/*
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
30002750: 1a000024 bne 300027e8 <mount+0x1a4>
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
30002754: e59f31d0 ldr r3, [pc, #464] ; 3000292c <mount+0x2e8>
}
} else {
/*
* Do we already have a base file system ?
*/
if ( !rtems_chain_is_empty( &mount_chain ) ) {
30002758: e5932000 ldr r2, [r3]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
3000275c: e2833004 add r3, r3, #4
30002760: e1520003 cmp r2, r3
)
{
rtems_filesystem_fsmount_me_t mount_h = NULL;
rtems_filesystem_location_info_t loc;
rtems_filesystem_mount_table_entry_t *mt_entry = NULL;
rtems_filesystem_location_info_t *loc_to_free = NULL;
30002764: 01a07005 moveq r7, r5
}
} else {
/*
* Do we already have a base file system ?
*/
if ( !rtems_chain_is_empty( &mount_chain ) ) {
30002768: 1a000055 bne 300028c4 <mount+0x280>
* mt_point_node.node_access will be left to null to indicate that this
* is the root of the entire file system.
*/
}
if ( (*mount_h)( mt_entry, data ) ) {
3000276c: e1a00004 mov r0, r4
30002770: e59d104c ldr r1, [sp, #76] ; 0x4c
30002774: e59d300c ldr r3, [sp, #12]
30002778: e1a0e00f mov lr, pc
3000277c: e12fff13 bx r3
30002780: e2506000 subs r6, r0, #0
30002784: 1a000055 bne 300028e0 <mount+0x29c>
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
30002788: e59f71a0 ldr r7, [pc, #416] ; 30002930 <mount+0x2ec>
3000278c: e1a02006 mov r2, r6
30002790: e1a01006 mov r1, r6
30002794: e5970000 ldr r0, [r7]
30002798: eb000bd0 bl 300056e0 <rtems_semaphore_obtain>
3000279c: e59f0188 ldr r0, [pc, #392] ; 3000292c <mount+0x2e8>
300027a0: e1a01004 mov r1, r4
300027a4: eb000e3b bl 30006098 <_Chain_Append>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
300027a8: e5970000 ldr r0, [r7]
300027ac: eb000c14 bl 30005804 <rtems_semaphore_release>
*/
rtems_libio_lock();
rtems_chain_append( &mount_chain, &mt_entry->Node );
rtems_libio_unlock();
if ( !has_target )
300027b0: e3550000 cmp r5, #0
rtems_filesystem_root = mt_entry->mt_fs_root;
return 0;
300027b4: 11a00006 movne r0, r6
*/
rtems_libio_lock();
rtems_chain_append( &mount_chain, &mt_entry->Node );
rtems_libio_unlock();
if ( !has_target )
300027b8: 1a000008 bne 300027e0 <mount+0x19c>
rtems_filesystem_root = mt_entry->mt_fs_root;
300027bc: e59f3170 ldr r3, [pc, #368] ; 30002934 <mount+0x2f0>
300027c0: e284401c add r4, r4, #28
300027c4: e593c000 ldr ip, [r3]
300027c8: e8b4000f ldm r4!, {r0, r1, r2, r3}
300027cc: e28cc018 add ip, ip, #24
300027d0: e8ac000f stmia ip!, {r0, r1, r2, r3}
300027d4: e5943000 ldr r3, [r4]
return 0;
300027d8: e1a00005 mov r0, r5
rtems_libio_lock();
rtems_chain_append( &mount_chain, &mt_entry->Node );
rtems_libio_unlock();
if ( !has_target )
rtems_filesystem_root = mt_entry->mt_fs_root;
300027dc: e58c3000 str r3, [ip]
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
}
300027e0: e28dd028 add sp, sp, #40 ; 0x28
300027e4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
if ( rtems_filesystem_evaluate_path(
300027e8: e28d7014 add r7, sp, #20
300027ec: e3a0c001 mov ip, #1
300027f0: e1a00006 mov r0, r6
300027f4: e59d1008 ldr r1, [sp, #8]
300027f8: e3a02007 mov r2, #7
300027fc: e1a03007 mov r3, r7
30002800: e58dc000 str ip, [sp]
30002804: ebfffdd7 bl 30001f68 <rtems_filesystem_evaluate_path>
30002808: e3700001 cmn r0, #1
3000280c: 0a00002f beq 300028d0 <mount+0x28c>
/*
* Test to see if it is a directory
*/
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
30002810: e1a00007 mov r0, r7
30002814: e59d3020 ldr r3, [sp, #32]
30002818: e1a0e00f mov lr, pc
3000281c: e593f010 ldr pc, [r3, #16]
30002820: e3500001 cmp r0, #1
30002824: 1a000037 bne 30002908 <mount+0x2c4>
/*
* You can only mount one file system onto a single mount point.
*/
if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) {
30002828: e59f0108 ldr r0, [pc, #264] ; 30002938 <mount+0x2f4>
3000282c: e59d1014 ldr r1, [sp, #20]
30002830: ebffff65 bl 300025cc <rtems_filesystem_mount_iterate>
30002834: e3500000 cmp r0, #0
30002838: 1a000036 bne 30002918 <mount+0x2d4>
* may have been allocated in loc should not be sent to freenode
* until the system is unmounted. It may be needed to correctly
* traverse the tree.
*/
mt_entry->mt_point_node.node_access = loc.node_access;
3000283c: e59d2014 ldr r2, [sp, #20]
mt_entry->mt_point_node.handlers = loc.handlers;
mt_entry->mt_point_node.ops = loc.ops;
30002840: e59d3020 ldr r3, [sp, #32]
* may have been allocated in loc should not be sent to freenode
* until the system is unmounted. It may be needed to correctly
* traverse the tree.
*/
mt_entry->mt_point_node.node_access = loc.node_access;
30002844: e5842008 str r2, [r4, #8]
mt_entry->mt_point_node.handlers = loc.handlers;
30002848: e59d201c ldr r2, [sp, #28]
mt_entry->mt_point_node.ops = loc.ops;
3000284c: e5843014 str r3, [r4, #20]
* until the system is unmounted. It may be needed to correctly
* traverse the tree.
*/
mt_entry->mt_point_node.node_access = loc.node_access;
mt_entry->mt_point_node.handlers = loc.handlers;
30002850: e5842010 str r2, [r4, #16]
mt_entry->mt_point_node.ops = loc.ops;
mt_entry->mt_point_node.mt_entry = loc.mt_entry;
30002854: e59d2024 ldr r2, [sp, #36] ; 0x24
/*
* This link to the parent is only done when we are dealing with system
* below the base file system
*/
if ( loc.ops->mount_h( mt_entry ) ) {
30002858: e1a00004 mov r0, r4
*/
mt_entry->mt_point_node.node_access = loc.node_access;
mt_entry->mt_point_node.handlers = loc.handlers;
mt_entry->mt_point_node.ops = loc.ops;
mt_entry->mt_point_node.mt_entry = loc.mt_entry;
3000285c: e5842018 str r2, [r4, #24]
/*
* This link to the parent is only done when we are dealing with system
* below the base file system
*/
if ( loc.ops->mount_h( mt_entry ) ) {
30002860: e1a0e00f mov lr, pc
30002864: e593f020 ldr pc, [r3, #32]
30002868: e3500000 cmp r0, #0
3000286c: 0affffbe beq 3000276c <mount+0x128>
return 0;
cleanup_and_bail:
free( mt_entry );
30002870: e1a00004 mov r0, r4
30002874: ebfffe0b bl 300020a8 <free>
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
30002878: e1a00007 mov r0, r7
3000287c: ebfffe04 bl 30002094 <rtems_filesystem_freenode>
return -1;
30002880: e3e00000 mvn r0, #0
30002884: eaffffd5 b 300027e0 <mount+0x19c>
target,
filesystemtype,
&target_length
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
30002888: eb002c9a bl 3000daf8 <__errno> <== NOT EXECUTED
3000288c: e3a0300c mov r3, #12 <== NOT EXECUTED
30002890: e5803000 str r3, [r0] <== NOT EXECUTED
30002894: e3e00000 mvn r0, #0 <== NOT EXECUTED
30002898: eaffffd0 b 300027e0 <mount+0x19c> <== NOT EXECUTED
const char *target_or_null,
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
3000289c: e59f3098 ldr r3, [pc, #152] ; 3000293c <mount+0x2f8>
300028a0: e3a0e001 mov lr, #1
300028a4: e58d3010 str r3, [sp, #16]
300028a8: e58de008 str lr, [sp, #8]
300028ac: eaffff79 b 30002698 <mount+0x54>
/*
* Get mount handler
*/
mount_h = rtems_filesystem_get_mount_handler( filesystemtype );
if ( !mount_h )
rtems_set_errno_and_return_minus_one( EINVAL );
300028b0: eb002c90 bl 3000daf8 <__errno>
300028b4: e3a03016 mov r3, #22
300028b8: e5803000 str r3, [r0]
300028bc: e3e00000 mvn r0, #0
300028c0: eaffffc6 b 300027e0 <mount+0x19c>
} else {
/*
* Do we already have a base file system ?
*/
if ( !rtems_chain_is_empty( &mount_chain ) ) {
errno = EINVAL;
300028c4: eb002c8b bl 3000daf8 <__errno> <== NOT EXECUTED
300028c8: e3a03016 mov r3, #22 <== NOT EXECUTED
300028cc: e5803000 str r3, [r0] <== NOT EXECUTED
return 0;
cleanup_and_bail:
free( mt_entry );
300028d0: e1a00004 mov r0, r4 <== NOT EXECUTED
300028d4: ebfffdf3 bl 300020a8 <free> <== NOT EXECUTED
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
300028d8: e3e00000 mvn r0, #0 <== NOT EXECUTED
300028dc: eaffffbf b 300027e0 <mount+0x19c> <== NOT EXECUTED
if ( (*mount_h)( mt_entry, data ) ) {
/*
* Try to undo the mount operation
*/
loc.ops->unmount_h( mt_entry );
300028e0: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED
300028e4: e1a00004 mov r0, r4 <== NOT EXECUTED
300028e8: e1a0e00f mov lr, pc <== NOT EXECUTED
300028ec: e593f028 ldr pc, [r3, #40] ; 0x28 <== NOT EXECUTED
return 0;
cleanup_and_bail:
free( mt_entry );
300028f0: e1a00004 mov r0, r4 <== NOT EXECUTED
300028f4: ebfffdeb bl 300020a8 <free> <== NOT EXECUTED
if ( loc_to_free )
300028f8: e3570000 cmp r7, #0 <== NOT EXECUTED
rtems_filesystem_freenode( loc_to_free );
return -1;
300028fc: 03e00000 mvneq r0, #0 <== NOT EXECUTED
cleanup_and_bail:
free( mt_entry );
if ( loc_to_free )
30002900: 0affffb6 beq 300027e0 <mount+0x19c> <== NOT EXECUTED
30002904: eaffffdb b 30002878 <mount+0x234> <== NOT EXECUTED
/*
* Test to see if it is a directory
*/
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
errno = ENOTDIR;
30002908: eb002c7a bl 3000daf8 <__errno>
3000290c: e3a03014 mov r3, #20
30002910: e5803000 str r3, [r0]
goto cleanup_and_bail;
30002914: eaffffd5 b 30002870 <mount+0x22c>
/*
* You can only mount one file system onto a single mount point.
*/
if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) {
errno = EBUSY;
30002918: eb002c76 bl 3000daf8 <__errno>
3000291c: e3a03010 mov r3, #16
30002920: e5803000 str r3, [r0]
goto cleanup_and_bail;
30002924: eaffffd1 b 30002870 <mount+0x22c>
30002944 <newlib_free_buffers>:
*/
int newlib_free_buffers(
FILE *fp
)
{
30002944: e92d4010 push {r4, lr}
30002948: e1a04000 mov r4, r0
switch ( fileno(fp) ) {
3000294c: eb002d6c bl 3000df04 <fileno>
30002950: e3500002 cmp r0, #2
30002954: 9a000003 bls 30002968 <newlib_free_buffers+0x24>
fp->_flags &= ~__SMBF;
fp->_bf._base = fp->_p = (unsigned char *) NULL;
}
break;
default:
fclose(fp);
30002958: e1a00004 mov r0, r4 <== NOT EXECUTED
3000295c: eb002cb3 bl 3000dc30 <fclose> <== NOT EXECUTED
}
return 0;
}
30002960: e3a00000 mov r0, #0
30002964: e8bd8010 pop {r4, pc}
{
switch ( fileno(fp) ) {
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
30002968: e1d430bc ldrh r3, [r4, #12]
3000296c: e3130080 tst r3, #128 ; 0x80
30002970: 0afffffa beq 30002960 <newlib_free_buffers+0x1c>
free( fp->_bf._base );
30002974: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
30002978: ebfffdca bl 300020a8 <free> <== NOT EXECUTED
fp->_flags &= ~__SMBF;
3000297c: e1d420bc ldrh r2, [r4, #12] <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
30002980: e3a03000 mov r3, #0 <== NOT EXECUTED
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
free( fp->_bf._base );
fp->_flags &= ~__SMBF;
30002984: e3c22080 bic r2, r2, #128 ; 0x80 <== NOT EXECUTED
30002988: e1c420bc strh r2, [r4, #12] <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
3000298c: e5843000 str r3, [r4] <== NOT EXECUTED
30002990: e5843010 str r3, [r4, #16] <== NOT EXECUTED
break;
default:
fclose(fp);
}
return 0;
}
30002994: e3a00000 mov r0, #0 <== NOT EXECUTED
30002998: e8bd8010 pop {r4, pc} <== NOT EXECUTED
300025f0 <null_initialize>:
rtems_device_driver null_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor __attribute__((unused)),
void *pargp __attribute__((unused))
)
{
300025f0: e92d4010 push {r4, lr}
rtems_device_driver status;
if ( !initialized ) {
300025f4: e59f3044 ldr r3, [pc, #68] ; 30002640 <null_initialize+0x50>
rtems_device_driver null_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor __attribute__((unused)),
void *pargp __attribute__((unused))
)
{
300025f8: e1a04000 mov r4, r0
rtems_device_driver status;
if ( !initialized ) {
300025fc: e5d32000 ldrb r2, [r3]
30002600: e3520000 cmp r2, #0
30002604: 0a000001 beq 30002610 <null_initialize+0x20>
NULL_major = major;
}
return RTEMS_SUCCESSFUL;
}
30002608: e3a00000 mov r0, #0
3000260c: e8bd8010 pop {r4, pc}
)
{
rtems_device_driver status;
if ( !initialized ) {
initialized = 1;
30002610: e3a0c001 mov ip, #1
status = rtems_io_register_name(
30002614: e59f0028 ldr r0, [pc, #40] ; 30002644 <null_initialize+0x54>
30002618: e1a01004 mov r1, r4
)
{
rtems_device_driver status;
if ( !initialized ) {
initialized = 1;
3000261c: e5c3c000 strb ip, [r3]
status = rtems_io_register_name(
30002620: eb000189 bl 30002c4c <rtems_io_register_name>
"/dev/null",
major,
(rtems_device_minor_number) 0
);
if (status != RTEMS_SUCCESSFUL)
30002624: e3500000 cmp r0, #0
30002628: 1a000003 bne 3000263c <null_initialize+0x4c>
rtems_fatal_error_occurred(status);
NULL_major = major;
3000262c: e59f3014 ldr r3, [pc, #20] ; 30002648 <null_initialize+0x58>
}
return RTEMS_SUCCESSFUL;
}
30002630: e3a00000 mov r0, #0
);
if (status != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(status);
NULL_major = major;
30002634: e5834000 str r4, [r3]
}
return RTEMS_SUCCESSFUL;
}
30002638: e8bd8010 pop {r4, pc}
major,
(rtems_device_minor_number) 0
);
if (status != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(status);
3000263c: eb00125a bl 30006fac <rtems_fatal_error_occurred> <== NOT EXECUTED
30003bb8 <oproc>:
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
30003bb8: e92d4010 push {r4, lr}
int i;
if (tty->termios.c_oflag & OPOST) {
30003bbc: e5913034 ldr r3, [r1, #52] ; 0x34
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
30003bc0: e24dd004 sub sp, sp, #4
int i;
if (tty->termios.c_oflag & OPOST) {
30003bc4: e3130001 tst r3, #1
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
30003bc8: e1a04001 mov r4, r1
30003bcc: e5cd0000 strb r0, [sp]
int i;
if (tty->termios.c_oflag & OPOST) {
30003bd0: 0a000014 beq 30003c28 <oproc+0x70>
switch (c) {
30003bd4: e5dd1000 ldrb r1, [sp]
30003bd8: e2412008 sub r2, r1, #8
30003bdc: e3520005 cmp r2, #5
30003be0: 979ff102 ldrls pc, [pc, r2, lsl #2]
30003be4: ea000005 b 30003c00 <oproc+0x48>
30003be8: 30003cb0 .word 0x30003cb0 <== NOT EXECUTED
30003bec: 30003c78 .word 0x30003c78 <== NOT EXECUTED
30003bf0: 30003cc4 .word 0x30003cc4 <== NOT EXECUTED
30003bf4: 30003c00 .word 0x30003c00 <== NOT EXECUTED
30003bf8: 30003c00 .word 0x30003c00 <== NOT EXECUTED
30003bfc: 30003c40 .word 0x30003c40 <== NOT EXECUTED
if (tty->column > 0)
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
30003c00: e3130002 tst r3, #2
30003c04: 1a00003a bne 30003cf4 <oproc+0x13c>
30003c08: e59f310c ldr r3, [pc, #268] ; 30003d1c <oproc+0x164>
30003c0c: e5933000 ldr r3, [r3]
c = toupper(c);
if (!iscntrl(c))
30003c10: e0831001 add r1, r3, r1
30003c14: e5d13001 ldrb r3, [r1, #1]
30003c18: e3130020 tst r3, #32
tty->column++;
30003c1c: 05943028 ldreq r3, [r4, #40] ; 0x28
30003c20: 02833001 addeq r3, r3, #1
30003c24: 05843028 streq r3, [r4, #40] ; 0x28
break;
}
}
rtems_termios_puts (&c, 1, tty);
30003c28: e1a0000d mov r0, sp
30003c2c: e3a01001 mov r1, #1
30003c30: e1a02004 mov r2, r4
30003c34: ebffff99 bl 30003aa0 <rtems_termios_puts>
}
30003c38: e28dd004 add sp, sp, #4
30003c3c: e8bd8010 pop {r4, pc}
tty->column = 0;
}
break;
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
30003c40: e3130010 tst r3, #16 <== NOT EXECUTED
30003c44: 0a000002 beq 30003c54 <oproc+0x9c> <== NOT EXECUTED
30003c48: e5942028 ldr r2, [r4, #40] ; 0x28 <== NOT EXECUTED
30003c4c: e3520000 cmp r2, #0 <== NOT EXECUTED
30003c50: 0afffff8 beq 30003c38 <oproc+0x80> <== NOT EXECUTED
return;
if (tty->termios.c_oflag & OCRNL) {
30003c54: e2132008 ands r2, r3, #8 <== NOT EXECUTED
c = '\n';
if (tty->termios.c_oflag & ONLRET)
tty->column = 0;
break;
}
tty->column = 0;
30003c58: 05842028 streq r2, [r4, #40] ; 0x28 <== NOT EXECUTED
break;
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
return;
if (tty->termios.c_oflag & OCRNL) {
30003c5c: 0afffff1 beq 30003c28 <oproc+0x70> <== NOT EXECUTED
c = '\n';
if (tty->termios.c_oflag & ONLRET)
30003c60: e3130020 tst r3, #32 <== NOT EXECUTED
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
return;
if (tty->termios.c_oflag & OCRNL) {
c = '\n';
30003c64: e3a0300a mov r3, #10 <== NOT EXECUTED
30003c68: e5cd3000 strb r3, [sp] <== NOT EXECUTED
if (tty->termios.c_oflag & ONLRET)
tty->column = 0;
30003c6c: 13a03000 movne r3, #0 <== NOT EXECUTED
30003c70: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED
30003c74: eaffffeb b 30003c28 <oproc+0x70> <== NOT EXECUTED
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
30003c78: e5942028 ldr r2, [r4, #40] ; 0x28
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
30003c7c: e2033b06 and r3, r3, #6144 ; 0x1800
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
30003c80: e2021007 and r1, r2, #7
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
30003c84: e3530b06 cmp r3, #6144 ; 0x1800
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
30003c88: e2611008 rsb r1, r1, #8
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
tty->column += i;
rtems_termios_puts ( " ", i, tty);
return;
}
tty->column += i;
30003c8c: 10811002 addne r1, r1, r2
30003c90: 15841028 strne r1, [r4, #40] ; 0x28
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
30003c94: 1affffe3 bne 30003c28 <oproc+0x70>
tty->column += i;
30003c98: e0812002 add r2, r1, r2
30003c9c: e5842028 str r2, [r4, #40] ; 0x28
rtems_termios_puts ( " ", i, tty);
30003ca0: e59f0078 ldr r0, [pc, #120] ; 30003d20 <oproc+0x168>
30003ca4: e1a02004 mov r2, r4
30003ca8: ebffff7c bl 30003aa0 <rtems_termios_puts>
return;
30003cac: eaffffe1 b 30003c38 <oproc+0x80>
}
tty->column += i;
break;
case '\b':
if (tty->column > 0)
30003cb0: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED
30003cb4: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->column--;
30003cb8: c2433001 subgt r3, r3, #1 <== NOT EXECUTED
30003cbc: c5843028 strgt r3, [r4, #40] ; 0x28 <== NOT EXECUTED
30003cc0: eaffffd8 b 30003c28 <oproc+0x70> <== NOT EXECUTED
int i;
if (tty->termios.c_oflag & OPOST) {
switch (c) {
case '\n':
if (tty->termios.c_oflag & ONLRET)
30003cc4: e3130020 tst r3, #32
tty->column = 0;
30003cc8: 13a02000 movne r2, #0
30003ccc: 15842028 strne r2, [r4, #40] ; 0x28
if (tty->termios.c_oflag & ONLCR) {
30003cd0: e3130004 tst r3, #4
30003cd4: 0affffd3 beq 30003c28 <oproc+0x70>
rtems_termios_puts ("\r", 1, tty);
30003cd8: e59f0044 ldr r0, [pc, #68] ; 30003d24 <oproc+0x16c>
30003cdc: e3a01001 mov r1, #1
30003ce0: e1a02004 mov r2, r4
30003ce4: ebffff6d bl 30003aa0 <rtems_termios_puts>
tty->column = 0;
30003ce8: e3a03000 mov r3, #0
30003cec: e5843028 str r3, [r4, #40] ; 0x28
30003cf0: eaffffcc b 30003c28 <oproc+0x70>
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
c = toupper(c);
30003cf4: e59f3020 ldr r3, [pc, #32] ; 30003d1c <oproc+0x164> <== NOT EXECUTED
30003cf8: e5933000 ldr r3, [r3] <== NOT EXECUTED
30003cfc: e0832001 add r2, r3, r1 <== NOT EXECUTED
30003d00: e5d22001 ldrb r2, [r2, #1] <== NOT EXECUTED
30003d04: e2022003 and r2, r2, #3 <== NOT EXECUTED
30003d08: e3520002 cmp r2, #2 <== NOT EXECUTED
30003d0c: 02411020 subeq r1, r1, #32 <== NOT EXECUTED
30003d10: e20110ff and r1, r1, #255 ; 0xff <== NOT EXECUTED
30003d14: e5cd1000 strb r1, [sp] <== NOT EXECUTED
30003d18: eaffffbc b 30003c10 <oproc+0x58> <== NOT EXECUTED
3000c254 <pipe_ioctl>:
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
if (cmd == FIONREAD) {
3000c254: e59f3058 ldr r3, [pc, #88] ; 3000c2b4 <pipe_ioctl+0x60>
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
3000c258: e92d4070 push {r4, r5, r6, lr}
if (cmd == FIONREAD) {
3000c25c: e1510003 cmp r1, r3
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
3000c260: e1a05000 mov r5, r0
3000c264: e1a04002 mov r4, r2
*(unsigned int *)buffer = pipe->Length;
PIPE_UNLOCK(pipe);
return 0;
}
return -EINVAL;
3000c268: 13e00015 mvnne r0, #21
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
if (cmd == FIONREAD) {
3000c26c: 18bd8070 popne {r4, r5, r6, pc}
if (buffer == NULL)
3000c270: e3520000 cmp r2, #0
return -EFAULT;
3000c274: 03e0000d mvneq r0, #13
void *buffer,
rtems_libio_t *iop
)
{
if (cmd == FIONREAD) {
if (buffer == NULL)
3000c278: 08bd8070 popeq {r4, r5, r6, pc}
return -EFAULT;
if (! PIPE_LOCK(pipe))
3000c27c: e3a01000 mov r1, #0
3000c280: e5950028 ldr r0, [r5, #40] ; 0x28
3000c284: e1a02001 mov r2, r1
3000c288: ebffeb21 bl 30006f14 <rtems_semaphore_obtain>
3000c28c: e2506000 subs r6, r0, #0
3000c290: 0a000001 beq 3000c29c <pipe_ioctl+0x48>
return -EINTR;
3000c294: e3e00003 mvn r0, #3 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
}
return -EINVAL;
}
3000c298: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
if (! PIPE_LOCK(pipe))
return -EINTR;
/* Return length of pipe */
*(unsigned int *)buffer = pipe->Length;
3000c29c: e595300c ldr r3, [r5, #12]
PIPE_UNLOCK(pipe);
3000c2a0: e5950028 ldr r0, [r5, #40] ; 0x28
if (! PIPE_LOCK(pipe))
return -EINTR;
/* Return length of pipe */
*(unsigned int *)buffer = pipe->Length;
3000c2a4: e5843000 str r3, [r4]
PIPE_UNLOCK(pipe);
3000c2a8: ebffeb62 bl 30007038 <rtems_semaphore_release>
return 0;
3000c2ac: e1a00006 mov r0, r6
3000c2b0: e8bd8070 pop {r4, r5, r6, pc}
3000b8ac <pipe_lock>:
free(pipe->Buffer);
free(pipe);
}
static rtems_status_code pipe_lock(void)
{
3000b8ac: e92d4070 push {r4, r5, r6, lr}
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
3000b8b0: e59f4094 ldr r4, [pc, #148] ; 3000b94c <pipe_lock+0xa0>
free(pipe->Buffer);
free(pipe);
}
static rtems_status_code pipe_lock(void)
{
3000b8b4: e24dd004 sub sp, sp, #4
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
3000b8b8: e5946000 ldr r6, [r4]
3000b8bc: e3560000 cmp r6, #0
3000b8c0: 0a000007 beq 3000b8e4 <pipe_lock+0x38>
rtems_libio_unlock();
}
if (sc == RTEMS_SUCCESSFUL) {
sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
3000b8c4: e3a01000 mov r1, #0
3000b8c8: e1a00006 mov r0, r6
3000b8cc: e1a02001 mov r2, r1
3000b8d0: ebffed8f bl 30006f14 <rtems_semaphore_obtain>
}
if (sc == RTEMS_SUCCESSFUL) {
return 0;
} else {
return -ENOMEM;
3000b8d4: e3500000 cmp r0, #0
3000b8d8: 13e0000b mvnne r0, #11
}
}
3000b8dc: e28dd004 add sp, sp, #4
3000b8e0: e8bd8070 pop {r4, r5, r6, pc}
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
3000b8e4: e59f5064 ldr r5, [pc, #100] ; 3000b950 <pipe_lock+0xa4>
3000b8e8: e1a01006 mov r1, r6
3000b8ec: e5950000 ldr r0, [r5]
3000b8f0: e1a02006 mov r2, r6
3000b8f4: ebffed86 bl 30006f14 <rtems_semaphore_obtain>
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
rtems_libio_lock();
if (pipe_semaphore == RTEMS_ID_NONE) {
3000b8f8: e5943000 ldr r3, [r4]
3000b8fc: e3530000 cmp r3, #0
3000b900: 0a000003 beq 3000b914 <pipe_lock+0x68>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
3000b904: e5950000 ldr r0, [r5] <== NOT EXECUTED
3000b908: ebffedca bl 30007038 <rtems_semaphore_release> <== NOT EXECUTED
3000b90c: e5946000 ldr r6, [r4] <== NOT EXECUTED
3000b910: eaffffeb b 3000b8c4 <pipe_lock+0x18> <== NOT EXECUTED
sc = rtems_semaphore_create(
3000b914: e1a03006 mov r3, r6
3000b918: e3a01001 mov r1, #1
3000b91c: e3a02054 mov r2, #84 ; 0x54
3000b920: e59f002c ldr r0, [pc, #44] ; 3000b954 <pipe_lock+0xa8>
3000b924: e58d4000 str r4, [sp]
3000b928: ebffecdf bl 30006cac <rtems_semaphore_create>
3000b92c: e1a06000 mov r6, r0
3000b930: e5950000 ldr r0, [r5]
3000b934: ebffedbf bl 30007038 <rtems_semaphore_release>
}
rtems_libio_unlock();
}
if (sc == RTEMS_SUCCESSFUL) {
3000b938: e3560000 cmp r6, #0
}
if (sc == RTEMS_SUCCESSFUL) {
return 0;
} else {
return -ENOMEM;
3000b93c: 13e0000b mvnne r0, #11
}
rtems_libio_unlock();
}
if (sc == RTEMS_SUCCESSFUL) {
3000b940: 1affffe5 bne 3000b8dc <pipe_lock+0x30>
3000b944: e5946000 ldr r6, [r4]
3000b948: eaffffdd b 3000b8c4 <pipe_lock+0x18>
3000be88 <pipe_read>:
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
3000be88: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
3000be8c: e1a09001 mov r9, r1
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
3000be90: e3a01000 mov r1, #0
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
3000be94: e24dd008 sub sp, sp, #8
3000be98: e1a04000 mov r4, r0
3000be9c: e1a05002 mov r5, r2
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
3000bea0: e5900028 ldr r0, [r0, #40] ; 0x28
3000bea4: e1a02001 mov r2, r1
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
3000bea8: e1a08003 mov r8, r3
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
3000beac: ebffec18 bl 30006f14 <rtems_semaphore_obtain>
3000beb0: e250a000 subs sl, r0, #0
return -EINTR;
3000beb4: 13e07003 mvnne r7, #3
rtems_libio_t *iop
)
{
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
3000beb8: 1a000027 bne 3000bf5c <pipe_read+0xd4>
return -EINTR;
while (read < count) {
3000bebc: e3550000 cmp r5, #0
3000bec0: 01a07005 moveq r7, r5
3000bec4: 01a06007 moveq r6, r7
3000bec8: 0a00001f beq 3000bf4c <pipe_read+0xc4>
3000becc: e1a0700a mov r7, sl
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
pipe->Start = 0;
if (pipe->waitingWriters > 0)
PIPE_WAKEUPWRITERS(pipe);
3000bed0: e28db004 add fp, sp, #4
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
while (PIPE_EMPTY(pipe)) {
3000bed4: e594200c ldr r2, [r4, #12]
3000bed8: e3520000 cmp r2, #0
3000bedc: 1a000021 bne 3000bf68 <pipe_read+0xe0>
/* Not an error */
if (pipe->Writers == 0)
3000bee0: e5946014 ldr r6, [r4, #20]
3000bee4: e3560000 cmp r6, #0
3000bee8: 0a000017 beq 3000bf4c <pipe_read+0xc4>
goto out_locked;
if (LIBIO_NODELAY(iop)) {
3000beec: e5986014 ldr r6, [r8, #20]
3000bef0: e2166001 ands r6, r6, #1
3000bef4: 1a00003b bne 3000bfe8 <pipe_read+0x160>
ret = -EAGAIN;
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
3000bef8: e5943018 ldr r3, [r4, #24]
PIPE_UNLOCK(pipe);
3000befc: e5940028 ldr r0, [r4, #40] ; 0x28
ret = -EAGAIN;
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
3000bf00: e2833001 add r3, r3, #1
3000bf04: e5843018 str r3, [r4, #24]
PIPE_UNLOCK(pipe);
3000bf08: ebffec4a bl 30007038 <rtems_semaphore_release>
if (! PIPE_READWAIT(pipe))
3000bf0c: e1a01006 mov r1, r6
3000bf10: e594002c ldr r0, [r4, #44] ; 0x2c
3000bf14: eb0006a3 bl 3000d9a8 <rtems_barrier_wait>
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
3000bf18: e1a01006 mov r1, r6
3000bf1c: e1a02001 mov r2, r1
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
3000bf20: e2506000 subs r6, r0, #0
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
3000bf24: e5940028 ldr r0, [r4, #40] ; 0x28
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
3000bf28: 13e06003 mvnne r6, #3
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
3000bf2c: ebffebf8 bl 30006f14 <rtems_semaphore_obtain>
3000bf30: e3500000 cmp r0, #0
3000bf34: 1a00002d bne 3000bff0 <pipe_read+0x168>
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
3000bf38: e5943018 ldr r3, [r4, #24]
if (ret != 0)
3000bf3c: e3560000 cmp r6, #0
if (! PIPE_LOCK(pipe)) {
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
3000bf40: e2433001 sub r3, r3, #1
3000bf44: e5843018 str r3, [r4, #24]
if (ret != 0)
3000bf48: 0affffe1 beq 3000bed4 <pipe_read+0x4c>
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
3000bf4c: e5940028 ldr r0, [r4, #40] ; 0x28
3000bf50: ebffec38 bl 30007038 <rtems_semaphore_release>
out_nolock:
if (read > 0)
return read;
return ret;
3000bf54: e3570000 cmp r7, #0
3000bf58: d1a07006 movle r7, r6
}
3000bf5c: e1a00007 mov r0, r7
3000bf60: e28dd008 add sp, sp, #8
3000bf64: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
goto out_locked;
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
chunk1 = pipe->Size - pipe->Start;
3000bf68: e5941008 ldr r1, [r4, #8]
3000bf6c: e5943004 ldr r3, [r4, #4]
if (ret != 0)
goto out_locked;
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
3000bf70: e06a6005 rsb r6, sl, r5
3000bf74: e1520006 cmp r2, r6
3000bf78: 31a06002 movcc r6, r2
chunk1 = pipe->Size - pipe->Start;
3000bf7c: e0613003 rsb r3, r1, r3
if (chunk > chunk1) {
3000bf80: e1560003 cmp r6, r3
3000bf84: ca00001b bgt 3000bff8 <pipe_read+0x170>
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
3000bf88: e5943000 ldr r3, [r4]
3000bf8c: e089000a add r0, r9, sl
3000bf90: e0831001 add r1, r3, r1
3000bf94: e1a02006 mov r2, r6
3000bf98: eb00105e bl 30010118 <memcpy>
pipe->Start += chunk;
3000bf9c: e5940008 ldr r0, [r4, #8]
pipe->Start %= pipe->Size;
3000bfa0: e5941004 ldr r1, [r4, #4]
3000bfa4: e0860000 add r0, r6, r0
3000bfa8: eb0033ba bl 30018e98 <__umodsi3>
pipe->Length -= chunk;
3000bfac: e594300c ldr r3, [r4, #12]
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
pipe->Start += chunk;
pipe->Start %= pipe->Size;
3000bfb0: e5840008 str r0, [r4, #8]
pipe->Length -= chunk;
3000bfb4: e0663003 rsb r3, r6, r3
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
3000bfb8: e3530000 cmp r3, #0
pipe->Start = 0;
3000bfbc: 05843008 streq r3, [r4, #8]
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
pipe->Start += chunk;
pipe->Start %= pipe->Size;
pipe->Length -= chunk;
3000bfc0: e584300c str r3, [r4, #12]
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
pipe->Start = 0;
if (pipe->waitingWriters > 0)
3000bfc4: e594301c ldr r3, [r4, #28]
3000bfc8: e3530000 cmp r3, #0
3000bfcc: 1a000016 bne 3000c02c <pipe_read+0x1a4>
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
3000bfd0: e0877006 add r7, r7, r6
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
3000bfd4: e1570005 cmp r7, r5
3000bfd8: e1a0a007 mov sl, r7
3000bfdc: 3affffbc bcc 3000bed4 <pipe_read+0x4c>
3000bfe0: e3a06000 mov r6, #0
3000bfe4: eaffffd8 b 3000bf4c <pipe_read+0xc4>
/* Not an error */
if (pipe->Writers == 0)
goto out_locked;
if (LIBIO_NODELAY(iop)) {
ret = -EAGAIN;
3000bfe8: e3e0600a mvn r6, #10
3000bfec: eaffffd6 b 3000bf4c <pipe_read+0xc4>
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
/* WARN waitingReaders not restored! */
ret = -EINTR;
3000bff0: e3e06003 mvn r6, #3 <== NOT EXECUTED
3000bff4: eaffffd6 b 3000bf54 <pipe_read+0xcc> <== NOT EXECUTED
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
chunk1 = pipe->Size - pipe->Start;
if (chunk > chunk1) {
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
3000bff8: e5940000 ldr r0, [r4]
3000bffc: e1a02003 mov r2, r3
3000c000: e0801001 add r1, r0, r1
3000c004: e089000a add r0, r9, sl
3000c008: e58d3000 str r3, [sp]
3000c00c: eb001041 bl 30010118 <memcpy>
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
3000c010: e59d3000 ldr r3, [sp]
3000c014: e5941000 ldr r1, [r4]
3000c018: e08a0003 add r0, sl, r3
3000c01c: e0890000 add r0, r9, r0
3000c020: e0632006 rsb r2, r3, r6
3000c024: eb00103b bl 30010118 <memcpy>
3000c028: eaffffdb b 3000bf9c <pipe_read+0x114>
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
pipe->Start = 0;
if (pipe->waitingWriters > 0)
PIPE_WAKEUPWRITERS(pipe);
3000c02c: e5940030 ldr r0, [r4, #48] ; 0x30
3000c030: e1a0100b mov r1, fp
3000c034: eb000643 bl 3000d948 <rtems_barrier_release>
3000c038: eaffffe4 b 3000bfd0 <pipe_read+0x148>
3000b980 <pipe_release>:
*/
int pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
3000b980: e92d40f0 push {r4, r5, r6, r7, lr}
3000b984: e24dd004 sub sp, sp, #4
3000b988: e1a06001 mov r6, r1
3000b98c: e1a05000 mov r5, r0
pipe_control_t *pipe = *pipep;
3000b990: e5904000 ldr r4, [r0]
uint32_t mode;
if (pipe_lock())
3000b994: ebffffc4 bl 3000b8ac <pipe_lock>
3000b998: e2501000 subs r1, r0, #0
3000b99c: 1a000035 bne 3000ba78 <pipe_release+0xf8>
/* WARN pipe not freed and pipep not set to NULL! */
/* FIXME */
rtems_fatal_error_occurred(0xdeadbeef);
if (!PIPE_LOCK(pipe))
3000b9a0: e5940028 ldr r0, [r4, #40] ; 0x28
3000b9a4: e1a02001 mov r2, r1
3000b9a8: ebffed59 bl 30006f14 <rtems_semaphore_obtain>
3000b9ac: e3500000 cmp r0, #0
3000b9b0: 1a000030 bne 3000ba78 <pipe_release+0xf8>
/* WARN pipe not released! */
/* FIXME */
rtems_fatal_error_occurred(0xdeadbeef);
mode = LIBIO_ACCMODE(iop);
3000b9b4: e5966014 ldr r6, [r6, #20]
if (mode & LIBIO_FLAGS_READ)
pipe->Readers --;
if (mode & LIBIO_FLAGS_WRITE)
pipe->Writers --;
PIPE_UNLOCK(pipe);
3000b9b8: e5940028 ldr r0, [r4, #40] ; 0x28
/* WARN pipe not released! */
/* FIXME */
rtems_fatal_error_occurred(0xdeadbeef);
mode = LIBIO_ACCMODE(iop);
if (mode & LIBIO_FLAGS_READ)
3000b9bc: e3160002 tst r6, #2
pipe->Readers --;
3000b9c0: 15943010 ldrne r3, [r4, #16]
if (!PIPE_LOCK(pipe))
/* WARN pipe not released! */
/* FIXME */
rtems_fatal_error_occurred(0xdeadbeef);
mode = LIBIO_ACCMODE(iop);
3000b9c4: e2066006 and r6, r6, #6
if (mode & LIBIO_FLAGS_READ)
pipe->Readers --;
3000b9c8: 12433001 subne r3, r3, #1
3000b9cc: 15843010 strne r3, [r4, #16]
if (mode & LIBIO_FLAGS_WRITE)
3000b9d0: e3160004 tst r6, #4
pipe->Writers --;
3000b9d4: 15943014 ldrne r3, [r4, #20]
3000b9d8: 12433001 subne r3, r3, #1
3000b9dc: 15843014 strne r3, [r4, #20]
PIPE_UNLOCK(pipe);
3000b9e0: ebffed94 bl 30007038 <rtems_semaphore_release>
if (pipe->Readers == 0 && pipe->Writers == 0) {
3000b9e4: e5943010 ldr r3, [r4, #16]
3000b9e8: e3530000 cmp r3, #0
3000b9ec: 0a00000c beq 3000ba24 <pipe_release+0xa4>
*pipep = NULL;
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ)
3000b9f0: e5943014 ldr r3, [r4, #20]
3000b9f4: e2733001 rsbs r3, r3, #1
3000b9f8: 33a03000 movcc r3, #0
3000b9fc: e3560002 cmp r6, #2
3000ba00: 03a03000 moveq r3, #0
3000ba04: e3530000 cmp r3, #0
PIPE_WAKEUPREADERS(pipe);
3000ba08: 1594002c ldrne r0, [r4, #44] ; 0x2c
3000ba0c: 11a0100d movne r1, sp
3000ba10: 1b0007cc blne 3000d948 <rtems_barrier_release>
pipe_unlock();
3000ba14: ebffffcf bl 3000b958 <pipe_unlock>
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return -errno;
#endif
return 0;
}
3000ba18: e3a00000 mov r0, #0
3000ba1c: e28dd004 add sp, sp, #4
3000ba20: e8bd80f0 pop {r4, r5, r6, r7, pc}
if (mode & LIBIO_FLAGS_WRITE)
pipe->Writers --;
PIPE_UNLOCK(pipe);
if (pipe->Readers == 0 && pipe->Writers == 0) {
3000ba24: e5947014 ldr r7, [r4, #20]
3000ba28: e3570000 cmp r7, #0
3000ba2c: 0a000005 beq 3000ba48 <pipe_release+0xc8>
delfile = TRUE;
#endif
pipe_free(pipe);
*pipep = NULL;
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
3000ba30: e3560004 cmp r6, #4
3000ba34: 0afffff6 beq 3000ba14 <pipe_release+0x94>
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
3000ba38: e5940030 ldr r0, [r4, #48] ; 0x30
3000ba3c: e1a0100d mov r1, sp
3000ba40: eb0007c0 bl 3000d948 <rtems_barrier_release>
3000ba44: eafffff2 b 3000ba14 <pipe_release+0x94>
/* Called with pipe_semaphore held. */
static inline void pipe_free(
pipe_control_t *pipe
)
{
rtems_barrier_delete(pipe->readBarrier);
3000ba48: e594002c ldr r0, [r4, #44] ; 0x2c
3000ba4c: eb000791 bl 3000d898 <rtems_barrier_delete>
rtems_barrier_delete(pipe->writeBarrier);
3000ba50: e5940030 ldr r0, [r4, #48] ; 0x30
3000ba54: eb00078f bl 3000d898 <rtems_barrier_delete>
rtems_semaphore_delete(pipe->Semaphore);
3000ba58: e5940028 ldr r0, [r4, #40] ; 0x28
3000ba5c: ebffed03 bl 30006e70 <rtems_semaphore_delete>
free(pipe->Buffer);
3000ba60: e5940000 ldr r0, [r4]
3000ba64: ebffde58 bl 300033cc <free>
free(pipe);
3000ba68: e1a00004 mov r0, r4
3000ba6c: ebffde56 bl 300033cc <free>
/* To delete an anonymous pipe file when all users closed it */
if (pipe->Anonymous)
delfile = TRUE;
#endif
pipe_free(pipe);
*pipep = NULL;
3000ba70: e5857000 str r7, [r5]
3000ba74: eaffffe6 b 3000ba14 <pipe_release+0x94>
rtems_fatal_error_occurred(0xdeadbeef);
if (!PIPE_LOCK(pipe))
/* WARN pipe not released! */
/* FIXME */
rtems_fatal_error_occurred(0xdeadbeef);
3000ba78: e59f0000 ldr r0, [pc, #0] ; 3000ba80 <pipe_release+0x100> <== NOT EXECUTED
3000ba7c: ebffeeb1 bl 30007548 <rtems_fatal_error_occurred> <== NOT EXECUTED
3000b958 <pipe_unlock>:
static void pipe_unlock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_release(pipe_semaphore);
3000b958: e59f3018 ldr r3, [pc, #24] ; 3000b978 <pipe_unlock+0x20>
return -ENOMEM;
}
}
static void pipe_unlock(void)
{
3000b95c: e52de004 push {lr} ; (str lr, [sp, #-4]!)
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_release(pipe_semaphore);
3000b960: e5930000 ldr r0, [r3]
3000b964: ebffedb3 bl 30007038 <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL) {
3000b968: e3500000 cmp r0, #0
3000b96c: 049df004 popeq {pc} ; (ldreq pc, [sp], #4)
/* FIXME */
rtems_fatal_error_occurred(0xdeadbeef);
3000b970: e59f0004 ldr r0, [pc, #4] ; 3000b97c <pipe_unlock+0x24> <== NOT EXECUTED
3000b974: ebffeef3 bl 30007548 <rtems_fatal_error_occurred> <== NOT EXECUTED
3000c03c <pipe_write>:
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
3000c03c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
3000c040: e2524000 subs r4, r2, #0
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
3000c044: e24dd008 sub sp, sp, #8
3000c048: e1a05000 mov r5, r0
3000c04c: e1a06001 mov r6, r1
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
return 0;
3000c050: 01a07004 moveq r7, r4
)
{
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
3000c054: 1a000002 bne 3000c064 <pipe_write+0x28>
#endif
if (written > 0)
return written;
return ret;
}
3000c058: e1a00007 mov r0, r7
3000c05c: e28dd008 add sp, sp, #8
3000c060: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
/* Write nothing */
if (count == 0)
return 0;
if (! PIPE_LOCK(pipe))
3000c064: e3a01000 mov r1, #0
3000c068: e5900028 ldr r0, [r0, #40] ; 0x28
3000c06c: e1a02001 mov r2, r1
3000c070: e58d3000 str r3, [sp]
3000c074: ebffeba6 bl 30006f14 <rtems_semaphore_obtain>
3000c078: e2509000 subs r9, r0, #0
3000c07c: e59d3000 ldr r3, [sp]
return -EINTR;
3000c080: 13e07003 mvnne r7, #3
/* Write nothing */
if (count == 0)
return 0;
if (! PIPE_LOCK(pipe))
3000c084: 1afffff3 bne 3000c058 <pipe_write+0x1c>
return -EINTR;
if (pipe->Readers == 0) {
3000c088: e5957010 ldr r7, [r5, #16]
3000c08c: e3570000 cmp r7, #0
3000c090: 0a000057 beq 3000c1f4 <pipe_write+0x1b8>
ret = -EPIPE;
goto out_locked;
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
3000c094: e5958004 ldr r8, [r5, #4]
3000c098: e1a07009 mov r7, r9
3000c09c: e1540008 cmp r4, r8
3000c0a0: 91a0a004 movls sl, r4
3000c0a4: 83a0a001 movhi sl, #1
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
if (pipe->waitingReaders > 0)
PIPE_WAKEUPREADERS(pipe);
3000c0a8: e28db004 add fp, sp, #4
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
while (PIPE_SPACE(pipe) < chunk) {
3000c0ac: e595100c ldr r1, [r5, #12]
3000c0b0: e0612008 rsb r2, r1, r8
3000c0b4: e152000a cmp r2, sl
3000c0b8: 2a000021 bcs 3000c144 <pipe_write+0x108>
if (LIBIO_NODELAY(iop)) {
3000c0bc: e5938014 ldr r8, [r3, #20]
3000c0c0: e2188001 ands r8, r8, #1
3000c0c4: 1a000052 bne 3000c214 <pipe_write+0x1d8>
ret = -EAGAIN;
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
3000c0c8: e595201c ldr r2, [r5, #28]
PIPE_UNLOCK(pipe);
3000c0cc: e5950028 ldr r0, [r5, #40] ; 0x28
ret = -EAGAIN;
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
3000c0d0: e2822001 add r2, r2, #1
3000c0d4: e585201c str r2, [r5, #28]
PIPE_UNLOCK(pipe);
3000c0d8: e58d3000 str r3, [sp]
3000c0dc: ebffebd5 bl 30007038 <rtems_semaphore_release>
if (! PIPE_WRITEWAIT(pipe))
3000c0e0: e1a01008 mov r1, r8
3000c0e4: e5950030 ldr r0, [r5, #48] ; 0x30
3000c0e8: eb00062e bl 3000d9a8 <rtems_barrier_wait>
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
3000c0ec: e1a01008 mov r1, r8
3000c0f0: e1a02001 mov r2, r1
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
3000c0f4: e2508000 subs r8, r0, #0
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
3000c0f8: e5950028 ldr r0, [r5, #40] ; 0x28
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
3000c0fc: 13e08003 mvnne r8, #3
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
3000c100: ebffeb83 bl 30006f14 <rtems_semaphore_obtain>
3000c104: e3500000 cmp r0, #0
3000c108: e59d3000 ldr r3, [sp]
3000c10c: 1a00003e bne 3000c20c <pipe_write+0x1d0>
/* WARN waitingWriters not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingWriters --;
3000c110: e595201c ldr r2, [r5, #28]
if (ret != 0)
3000c114: e3580000 cmp r8, #0
if (! PIPE_LOCK(pipe)) {
/* WARN waitingWriters not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingWriters --;
3000c118: e2422001 sub r2, r2, #1
3000c11c: e585201c str r2, [r5, #28]
if (ret != 0)
3000c120: 1a00002c bne 3000c1d8 <pipe_write+0x19c>
goto out_locked;
if (pipe->Readers == 0) {
3000c124: e5952010 ldr r2, [r5, #16]
3000c128: e3520000 cmp r2, #0
3000c12c: 0a000030 beq 3000c1f4 <pipe_write+0x1b8>
3000c130: e5958004 ldr r8, [r5, #4]
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
while (PIPE_SPACE(pipe) < chunk) {
3000c134: e595100c ldr r1, [r5, #12]
3000c138: e0612008 rsb r2, r1, r8
3000c13c: e152000a cmp r2, sl
3000c140: 3affffdd bcc 3000c0bc <pipe_write+0x80>
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
chunk1 = pipe->Size - PIPE_WSTART(pipe);
3000c144: e5950008 ldr r0, [r5, #8]
ret = -EPIPE;
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
3000c148: e069a004 rsb sl, r9, r4
chunk1 = pipe->Size - PIPE_WSTART(pipe);
3000c14c: e0810000 add r0, r1, r0
3000c150: e1a01008 mov r1, r8
ret = -EPIPE;
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
3000c154: e152000a cmp r2, sl
3000c158: 31a0a002 movcc sl, r2
chunk1 = pipe->Size - PIPE_WSTART(pipe);
3000c15c: e58d3000 str r3, [sp]
3000c160: eb00334c bl 30018e98 <__umodsi3>
3000c164: e0608008 rsb r8, r0, r8
if (chunk > chunk1) {
3000c168: e15a0008 cmp sl, r8
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
chunk1 = pipe->Size - PIPE_WSTART(pipe);
3000c16c: e1a0c000 mov ip, r0
if (chunk > chunk1) {
3000c170: e59d3000 ldr r3, [sp]
3000c174: da000028 ble 3000c21c <pipe_write+0x1e0>
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
3000c178: e5950000 ldr r0, [r5]
3000c17c: e0861009 add r1, r6, r9
3000c180: e1a02008 mov r2, r8
3000c184: e080000c add r0, r0, ip
3000c188: eb000fe2 bl 30010118 <memcpy>
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
3000c18c: e0881009 add r1, r8, r9
3000c190: e5950000 ldr r0, [r5]
3000c194: e0861001 add r1, r6, r1
3000c198: e068200a rsb r2, r8, sl
3000c19c: eb000fdd bl 30010118 <memcpy>
3000c1a0: e59d3000 ldr r3, [sp]
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
3000c1a4: e595200c ldr r2, [r5, #12]
if (pipe->waitingReaders > 0)
3000c1a8: e5951018 ldr r1, [r5, #24]
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
3000c1ac: e082200a add r2, r2, sl
if (pipe->waitingReaders > 0)
3000c1b0: e3510000 cmp r1, #0
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
3000c1b4: e585200c str r2, [r5, #12]
if (pipe->waitingReaders > 0)
3000c1b8: 1a00001f bne 3000c23c <pipe_write+0x200>
PIPE_WAKEUPREADERS(pipe);
written += chunk;
3000c1bc: e087700a add r7, r7, sl
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
3000c1c0: e1540007 cmp r4, r7
3000c1c4: e1a09007 mov r9, r7
3000c1c8: 85958004 ldrhi r8, [r5, #4]
pipe->Length += chunk;
if (pipe->waitingReaders > 0)
PIPE_WAKEUPREADERS(pipe);
written += chunk;
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
3000c1cc: 83a0a001 movhi sl, #1
3000c1d0: 8affffb5 bhi 3000c0ac <pipe_write+0x70>
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
3000c1d4: e3a08000 mov r8, #0
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
3000c1d8: e5950028 ldr r0, [r5, #40] ; 0x28
3000c1dc: ebffeb95 bl 30007038 <rtems_semaphore_release>
out_nolock:
#ifdef RTEMS_POSIX_API
/* Signal SIGPIPE */
if (ret == -EPIPE)
3000c1e0: e3780020 cmn r8, #32
3000c1e4: 0a000004 beq 3000c1fc <pipe_write+0x1c0>
kill(getpid(), SIGPIPE);
#endif
if (written > 0)
3000c1e8: e3570000 cmp r7, #0
3000c1ec: d1a07008 movle r7, r8
3000c1f0: eaffff98 b 3000c058 <pipe_write+0x1c>
pipe->waitingWriters --;
if (ret != 0)
goto out_locked;
if (pipe->Readers == 0) {
ret = -EPIPE;
3000c1f4: e3e0801f mvn r8, #31
3000c1f8: eafffff6 b 3000c1d8 <pipe_write+0x19c>
out_nolock:
#ifdef RTEMS_POSIX_API
/* Signal SIGPIPE */
if (ret == -EPIPE)
kill(getpid(), SIGPIPE);
3000c1fc: eb000200 bl 3000ca04 <getpid>
3000c200: e3a0100d mov r1, #13
3000c204: eb000365 bl 3000cfa0 <kill>
3000c208: eafffff6 b 3000c1e8 <pipe_write+0x1ac>
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
/* WARN waitingWriters not restored! */
ret = -EINTR;
3000c20c: e3e08003 mvn r8, #3 <== NOT EXECUTED
3000c210: eafffff4 b 3000c1e8 <pipe_write+0x1ac> <== NOT EXECUTED
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
while (PIPE_SPACE(pipe) < chunk) {
if (LIBIO_NODELAY(iop)) {
ret = -EAGAIN;
3000c214: e3e0800a mvn r8, #10
3000c218: eaffffee b 3000c1d8 <pipe_write+0x19c>
if (chunk > chunk1) {
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
3000c21c: e5950000 ldr r0, [r5]
3000c220: e0861009 add r1, r6, r9
3000c224: e080000c add r0, r0, ip
3000c228: e1a0200a mov r2, sl
3000c22c: e58d3000 str r3, [sp]
3000c230: eb000fb8 bl 30010118 <memcpy>
3000c234: e59d3000 ldr r3, [sp]
3000c238: eaffffd9 b 3000c1a4 <pipe_write+0x168>
pipe->Length += chunk;
if (pipe->waitingReaders > 0)
PIPE_WAKEUPREADERS(pipe);
3000c23c: e595002c ldr r0, [r5, #44] ; 0x2c
3000c240: e1a0100b mov r1, fp
3000c244: e58d3000 str r3, [sp]
3000c248: eb0005be bl 3000d948 <rtems_barrier_release>
3000c24c: e59d3000 ldr r3, [sp]
3000c250: eaffffd9 b 3000c1bc <pipe_write+0x180>
30009e08 <pthread_attr_setschedpolicy>:
int pthread_attr_setschedpolicy(
pthread_attr_t *attr,
int policy
)
{
if ( !attr || !attr->is_initialized )
30009e08: e3500000 cmp r0, #0
30009e0c: 0a00000e beq 30009e4c <pthread_attr_setschedpolicy+0x44>
30009e10: e5903000 ldr r3, [r0]
30009e14: e3530000 cmp r3, #0
30009e18: 0a00000b beq 30009e4c <pthread_attr_setschedpolicy+0x44>
return EINVAL;
switch ( policy ) {
30009e1c: e3510004 cmp r1, #4
30009e20: 9a000001 bls 30009e2c <pthread_attr_setschedpolicy+0x24>
case SCHED_SPORADIC:
attr->schedpolicy = policy;
return 0;
default:
return ENOTSUP;
30009e24: e3a00086 mov r0, #134 ; 0x86
}
}
30009e28: e12fff1e bx lr
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( policy ) {
30009e2c: e3a03001 mov r3, #1
30009e30: e1a03113 lsl r3, r3, r1
30009e34: e3130017 tst r3, #23
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
case SCHED_SPORADIC:
attr->schedpolicy = policy;
30009e38: 15801014 strne r1, [r0, #20]
return 0;
30009e3c: 13a00000 movne r0, #0
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( policy ) {
30009e40: 112fff1e bxne lr
case SCHED_SPORADIC:
attr->schedpolicy = policy;
return 0;
default:
return ENOTSUP;
30009e44: e3a00086 mov r0, #134 ; 0x86 <== NOT EXECUTED
}
}
30009e48: e12fff1e bx lr <== NOT EXECUTED
pthread_attr_t *attr,
int policy
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
30009e4c: e3a00016 mov r0, #22
30009e50: e12fff1e bx lr
30005760 <pthread_key_create>:
30005760: e59f30f8 ldr r3, [pc, #248] ; 30005860 <pthread_key_create+0x100>
int pthread_key_create(
pthread_key_t *key,
void (*destructor)( void * )
)
{
30005764: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
30005768: e5932000 ldr r2, [r3]
3000576c: e1a08000 mov r8, r0
30005770: e2822001 add r2, r2, #1
30005774: e5832000 str r2, [r3]
30005778: e1a04001 mov r4, r1
* the inactive chain of free keys control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void )
{
return (POSIX_Keys_Control *) _Objects_Allocate( &_POSIX_Keys_Information );
3000577c: e59f00e0 ldr r0, [pc, #224] ; 30005864 <pthread_key_create+0x104>
30005780: eb0008a2 bl 30007a10 <_Objects_Allocate>
_Thread_Disable_dispatch();
the_key = _POSIX_Keys_Allocate();
if ( !the_key ) {
30005784: e2507000 subs r7, r0, #0
30005788: 0a000023 beq 3000581c <pthread_key_create+0xbc>
_Thread_Enable_dispatch();
return EAGAIN;
}
the_key->destructor = destructor;
3000578c: e59f60d4 ldr r6, [pc, #212] ; 30005868 <pthread_key_create+0x108>
30005790: e5874010 str r4, [r7, #16]
30005794: e1a05007 mov r5, r7
* APIs are optional.
*
* NOTE: Currently RTEMS Classic API tasks are always enabled.
*/
for ( the_api = 1;
30005798: e3a04001 mov r4, #1
the_api <= OBJECTS_APIS_LAST;
the_api++ ) {
if ( _Objects_Information_table[ the_api ] ) {
3000579c: e5b63004 ldr r3, [r6, #4]!
300057a0: e3530000 cmp r3, #0
300057a4: 0a00001a beq 30005814 <pthread_key_create+0xb4>
true,
INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY
);
#endif
bytes_to_allocate = sizeof( void * ) *
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
300057a8: e5933004 ldr r3, [r3, #4]
300057ac: e1d3a1b0 ldrh sl, [r3, #16]
300057b0: e28aa001 add sl, sl, #1
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY
);
#endif
bytes_to_allocate = sizeof( void * ) *
300057b4: e1a0a10a lsl sl, sl, #2
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
table = _Workspace_Allocate( bytes_to_allocate );
300057b8: e1a0000a mov r0, sl
300057bc: eb00114e bl 30009cfc <_Workspace_Allocate>
if ( !table ) {
300057c0: e2503000 subs r3, r0, #0
300057c4: 0a000017 beq 30005828 <pthread_key_create+0xc8>
_POSIX_Keys_Free( the_key );
_Thread_Enable_dispatch();
return ENOMEM;
}
the_key->Values[ the_api ] = table;
300057c8: e5853018 str r3, [r5, #24]
memset( table, '\0', bytes_to_allocate );
300057cc: e3a01000 mov r1, #0
300057d0: e1a0200a mov r2, sl
300057d4: eb0026cc bl 3000f30c <memset>
* NOTE: Currently RTEMS Classic API tasks are always enabled.
*/
for ( the_api = 1;
the_api <= OBJECTS_APIS_LAST;
the_api++ ) {
300057d8: e2844001 add r4, r4, #1
* APIs are optional.
*
* NOTE: Currently RTEMS Classic API tasks are always enabled.
*/
for ( the_api = 1;
300057dc: e3540004 cmp r4, #4
the_api <= OBJECTS_APIS_LAST;
the_api++ ) {
300057e0: e2855004 add r5, r5, #4
* APIs are optional.
*
* NOTE: Currently RTEMS Classic API tasks are always enabled.
*/
for ( the_api = 1;
300057e4: 1affffec bne 3000579c <pthread_key_create+0x3c>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
300057e8: e59f2074 ldr r2, [pc, #116] ; 30005864 <pthread_key_create+0x104>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
300057ec: e5973008 ldr r3, [r7, #8]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
300057f0: e592201c ldr r2, [r2, #28]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
300057f4: e3a04000 mov r4, #0
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
300057f8: e1a01803 lsl r1, r3, #16
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
300057fc: e7827721 str r7, [r2, r1, lsr #14]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
30005800: e587400c str r4, [r7, #12]
}
_Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 );
*key = the_key->Object.id;
30005804: e5883000 str r3, [r8]
_Thread_Enable_dispatch();
30005808: eb000bdc bl 30008780 <_Thread_Enable_dispatch>
return 0;
3000580c: e1a00004 mov r0, r4
}
30005810: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
}
the_key->Values[ the_api ] = table;
memset( table, '\0', bytes_to_allocate );
} else {
the_key->Values[ the_api ] = NULL;
30005814: e5853018 str r3, [r5, #24] <== NOT EXECUTED
30005818: eaffffee b 300057d8 <pthread_key_create+0x78> <== NOT EXECUTED
_Thread_Disable_dispatch();
the_key = _POSIX_Keys_Allocate();
if ( !the_key ) {
_Thread_Enable_dispatch();
3000581c: eb000bd7 bl 30008780 <_Thread_Enable_dispatch>
return EAGAIN;
30005820: e3a0000b mov r0, #11
30005824: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
#endif
bytes_to_allocate = sizeof( void * ) *
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
table = _Workspace_Allocate( bytes_to_allocate );
if ( !table ) {
for ( --the_api;
30005828: e2545001 subs r5, r4, #1
3000582c: 0a000005 beq 30005848 <pthread_key_create+0xe8>
int _EXFUN(pthread_once,
(pthread_once_t *__once_control, void (*__init_routine)(void)));
/* Thread-Specific Data Key Create, P1003.1c/Draft 10, p. 163 */
int _EXFUN(pthread_key_create,
30005830: e2844005 add r4, r4, #5
30005834: e0874104 add r4, r7, r4, lsl #2
the_api >= 1;
the_api-- )
_Workspace_Free( the_key->Values[ the_api ] );
30005838: e5340004 ldr r0, [r4, #-4]!
3000583c: eb001134 bl 30009d14 <_Workspace_Free>
#endif
bytes_to_allocate = sizeof( void * ) *
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
table = _Workspace_Allocate( bytes_to_allocate );
if ( !table ) {
for ( --the_api;
30005840: e2555001 subs r5, r5, #1
30005844: 1afffffb bne 30005838 <pthread_key_create+0xd8>
*/
RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free (
POSIX_Keys_Control *the_key
)
{
_Objects_Free( &_POSIX_Keys_Information, &the_key->Object );
30005848: e59f0014 ldr r0, [pc, #20] ; 30005864 <pthread_key_create+0x104>
3000584c: e1a01007 mov r1, r7
30005850: eb000949 bl 30007d7c <_Objects_Free>
the_api >= 1;
the_api-- )
_Workspace_Free( the_key->Values[ the_api ] );
_POSIX_Keys_Free( the_key );
_Thread_Enable_dispatch();
30005854: eb000bc9 bl 30008780 <_Thread_Enable_dispatch>
return ENOMEM;
30005858: e3a0000c mov r0, #12
3000585c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
30007b3c <pthread_mutexattr_setpshared>:
int pthread_mutexattr_setpshared(
pthread_mutexattr_t *attr,
int pshared
)
{
if ( !attr || !attr->is_initialized )
30007b3c: e3500000 cmp r0, #0
30007b40: 0a000008 beq 30007b68 <pthread_mutexattr_setpshared+0x2c>
30007b44: e5903000 ldr r3, [r0]
30007b48: e3530000 cmp r3, #0
30007b4c: 0a000005 beq 30007b68 <pthread_mutexattr_setpshared+0x2c>
return EINVAL;
switch ( pshared ) {
30007b50: e3510001 cmp r1, #1
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
30007b54: 95801004 strls r1, [r0, #4]
return 0;
30007b58: 93a00000 movls r0, #0
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( pshared ) {
30007b5c: 912fff1e bxls lr
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
return 0;
default:
return EINVAL;
30007b60: e3a00016 mov r0, #22 <== NOT EXECUTED
}
}
30007b64: e12fff1e bx lr <== NOT EXECUTED
pthread_mutexattr_t *attr,
int pshared
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
30007b68: e3a00016 mov r0, #22
30007b6c: e12fff1e bx lr
3000752c <pthread_rwlockattr_setpshared>:
int pthread_rwlockattr_setpshared(
pthread_rwlockattr_t *attr,
int pshared
)
{
if ( !attr )
3000752c: e3500000 cmp r0, #0
30007530: 0a000008 beq 30007558 <pthread_rwlockattr_setpshared+0x2c>
return EINVAL;
if ( !attr->is_initialized )
30007534: e5903000 ldr r3, [r0]
30007538: e3530000 cmp r3, #0
3000753c: 0a000005 beq 30007558 <pthread_rwlockattr_setpshared+0x2c>
return EINVAL;
switch ( pshared ) {
30007540: e3510001 cmp r1, #1
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
30007544: 95801004 strls r1, [r0, #4]
return 0;
30007548: 93a00000 movls r0, #0
return EINVAL;
if ( !attr->is_initialized )
return EINVAL;
switch ( pshared ) {
3000754c: 912fff1e bxls lr
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
return 0;
default:
return EINVAL;
30007550: e3a00016 mov r0, #22 <== NOT EXECUTED
}
}
30007554: e12fff1e bx lr <== NOT EXECUTED
{
if ( !attr )
return EINVAL;
if ( !attr->is_initialized )
return EINVAL;
30007558: e3a00016 mov r0, #22
3000755c: e12fff1e bx lr
30013388 <read>:
)
{
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
30013388: e59f30a4 ldr r3, [pc, #164] ; 30013434 <read+0xac>
ssize_t read(
int fd,
void *buffer,
size_t count
)
{
3001338c: e92d4010 push {r4, lr}
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
30013390: e5933000 ldr r3, [r3]
30013394: e1500003 cmp r0, r3
30013398: 2a00001b bcs 3001340c <read+0x84>
iop = rtems_libio_iop( fd );
3001339c: e59f4094 ldr r4, [pc, #148] ; 30013438 <read+0xb0>
300133a0: e0600180 rsb r0, r0, r0, lsl #3
300133a4: e5944000 ldr r4, [r4]
300133a8: e0844180 add r4, r4, r0, lsl #3
rtems_libio_check_is_open( iop );
300133ac: e5940014 ldr r0, [r4, #20]
300133b0: e3100c01 tst r0, #256 ; 0x100
300133b4: 0a000014 beq 3001340c <read+0x84>
rtems_libio_check_buffer( buffer );
300133b8: e3510000 cmp r1, #0
300133bc: 0a000017 beq 30013420 <read+0x98>
rtems_libio_check_count( count );
300133c0: e3520000 cmp r2, #0
300133c4: 0a00000e beq 30013404 <read+0x7c>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
300133c8: e3100002 tst r0, #2
300133cc: 0a000013 beq 30013420 <read+0x98>
return 0;
/*
* Now process the read().
*/
rc = (*iop->pathinfo.handlers->read_h)( iop, buffer, count );
300133d0: e5943020 ldr r3, [r4, #32]
300133d4: e1a00004 mov r0, r4
300133d8: e1a0e00f mov lr, pc
300133dc: e593f008 ldr pc, [r3, #8]
if ( rc > 0 )
300133e0: e3500000 cmp r0, #0
300133e4: d8bd8010 pople {r4, pc}
iop->offset += rc;
300133e8: e284300c add r3, r4, #12
300133ec: e893000c ldm r3, {r2, r3}
300133f0: e0922000 adds r2, r2, r0
300133f4: e0a33fc0 adc r3, r3, r0, asr #31
300133f8: e584200c str r2, [r4, #12]
300133fc: e5843010 str r3, [r4, #16]
30013400: e8bd8010 pop {r4, 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 );
30013404: e1a00002 mov r0, r2 <== NOT EXECUTED
if ( rc > 0 )
iop->offset += rc;
return rc;
}
30013408: e8bd8010 pop {r4, pc} <== NOT EXECUTED
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
3001340c: ebffe9b9 bl 3000daf8 <__errno>
30013410: e3a03009 mov r3, #9
30013414: e5803000 str r3, [r0]
30013418: e3e00000 mvn r0, #0
3001341c: e8bd8010 pop {r4, pc}
rtems_libio_check_buffer( buffer );
rtems_libio_check_count( count );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
30013420: ebffe9b4 bl 3000daf8 <__errno> <== NOT EXECUTED
30013424: e3a03016 mov r3, #22 <== NOT EXECUTED
30013428: e5803000 str r3, [r0] <== NOT EXECUTED
3001342c: e3e00000 mvn r0, #0 <== NOT EXECUTED
30013430: e8bd8010 pop {r4, pc} <== NOT EXECUTED
300057d4 <readlink>:
ssize_t readlink(
const char *pathname,
char *buf,
size_t bufsize
)
{
300057d4: e92d40f0 push {r4, r5, r6, r7, lr}
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
300057d8: e2516000 subs r6, r1, #0
ssize_t readlink(
const char *pathname,
char *buf,
size_t bufsize
)
{
300057dc: e24dd018 sub sp, sp, #24
300057e0: e1a07000 mov r7, r0
300057e4: e1a05002 mov r5, r2
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
300057e8: 0a00001d beq 30005864 <readlink+0x90>
rtems_set_errno_and_return_minus_one( EFAULT );
result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ),
300057ec: eb0034c4 bl 30012b04 <strlen>
300057f0: e28d4004 add r4, sp, #4
300057f4: e1a01000 mov r1, r0
300057f8: e3a02000 mov r2, #0
300057fc: e1a00007 mov r0, r7
30005800: e1a03004 mov r3, r4
30005804: e58d2000 str r2, [sp]
30005808: ebfffb70 bl 300045d0 <rtems_filesystem_evaluate_path>
0, &loc, false );
if ( result != 0 )
3000580c: e3500000 cmp r0, #0
return -1;
30005810: 13e05000 mvnne r5, #0
if (!buf)
rtems_set_errno_and_return_minus_one( EFAULT );
result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ),
0, &loc, false );
if ( result != 0 )
30005814: 0a000002 beq 30005824 <readlink+0x50>
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
rtems_filesystem_freenode( &loc );
return result;
}
30005818: e1a00005 mov r0, r5
3000581c: e28dd018 add sp, sp, #24
30005820: e8bd80f0 pop {r4, r5, r6, r7, pc}
result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ),
0, &loc, false );
if ( result != 0 )
return -1;
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
30005824: e1a00004 mov r0, r4
30005828: e59d3010 ldr r3, [sp, #16]
3000582c: e1a0e00f mov lr, pc
30005830: e593f010 ldr pc, [r3, #16]
30005834: e3500004 cmp r0, #4
30005838: 1a00000e bne 30005878 <readlink+0xa4>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( EINVAL );
}
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
3000583c: e1a02005 mov r2, r5
30005840: e1a00004 mov r0, r4
30005844: e1a01006 mov r1, r6
30005848: e59d3010 ldr r3, [sp, #16]
3000584c: e1a0e00f mov lr, pc
30005850: e593f03c ldr pc, [r3, #60] ; 0x3c
30005854: e1a05000 mov r5, r0
rtems_filesystem_freenode( &loc );
30005858: e1a00004 mov r0, r4
3000585c: ebfffba6 bl 300046fc <rtems_filesystem_freenode>
return result;
30005860: eaffffec b 30005818 <readlink+0x44>
{
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
rtems_set_errno_and_return_minus_one( EFAULT );
30005864: eb002d4c bl 30010d9c <__errno> <== NOT EXECUTED
30005868: e3a0300e mov r3, #14 <== NOT EXECUTED
3000586c: e5803000 str r3, [r0] <== NOT EXECUTED
30005870: e3e05000 mvn r5, #0 <== NOT EXECUTED
30005874: eaffffe7 b 30005818 <readlink+0x44> <== NOT EXECUTED
0, &loc, false );
if ( result != 0 )
return -1;
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
rtems_filesystem_freenode( &loc );
30005878: e1a00004 mov r0, r4
3000587c: ebfffb9e bl 300046fc <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( EINVAL );
30005880: eb002d45 bl 30010d9c <__errno>
30005884: e3a03016 mov r3, #22
30005888: e5803000 str r3, [r0]
3000588c: e3e05000 mvn r5, #0
30005890: eaffffe0 b 30005818 <readlink+0x44>
30004184 <readv>:
int v;
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
30004184: e59f313c ldr r3, [pc, #316] ; 300042c8 <readv+0x144>
ssize_t readv(
int fd,
const struct iovec *iov,
int iovcnt
)
{
30004188: e92d41f0 push {r4, r5, r6, r7, r8, lr}
int v;
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
3000418c: e5933000 ldr r3, [r3]
ssize_t readv(
int fd,
const struct iovec *iov,
int iovcnt
)
{
30004190: e1a04002 mov r4, r2
int v;
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
30004194: e1500003 cmp r0, r3
30004198: 2a000045 bcs 300042b4 <readv+0x130>
iop = rtems_libio_iop( fd );
3000419c: e59f3128 ldr r3, [pc, #296] ; 300042cc <readv+0x148>
300041a0: e0600180 rsb r0, r0, r0, lsl #3
300041a4: e5933000 ldr r3, [r3]
300041a8: e0836180 add r6, r3, r0, lsl #3
rtems_libio_check_is_open( iop );
300041ac: e5963014 ldr r3, [r6, #20]
300041b0: e3130c01 tst r3, #256 ; 0x100
300041b4: 0a00003e beq 300042b4 <readv+0x130>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
300041b8: e3130002 tst r3, #2
300041bc: 0a000036 beq 3000429c <readv+0x118>
/*
* Argument validation on IO vector
*/
if ( !iov )
300041c0: e3510000 cmp r1, #0
300041c4: 0a000034 beq 3000429c <readv+0x118>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
300041c8: e3520000 cmp r2, #0
300041cc: da000032 ble 3000429c <readv+0x118>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
300041d0: e3520b01 cmp r2, #1024 ; 0x400
300041d4: ca000030 bgt 3000429c <readv+0x118>
300041d8: e3a02000 mov r2, #0
rtems_set_errno_and_return_minus_one( EINVAL );
300041dc: e1a05001 mov r5, r1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
300041e0: e1a03001 mov r3, r1
300041e4: e3a07001 mov r7, #1
300041e8: e1a01002 mov r1, r2
300041ec: ea000000 b 300041f4 <readv+0x70>
if ( iov[v].iov_len < 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
300041f0: e1a0100c mov r1, ip
all_zeros = true;
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
ssize_t old;
if ( !iov[v].iov_base )
300041f4: e5930000 ldr r0, [r3]
* are obvious errors in the iovec. So this extra loop ensures
* that we do not do anything if there is an argument error.
*/
all_zeros = true;
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
300041f8: e2822001 add r2, r2, #1
ssize_t old;
if ( !iov[v].iov_base )
300041fc: e3500000 cmp r0, #0
30004200: 0a000025 beq 3000429c <readv+0x118>
if ( iov[v].iov_len < 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
30004204: e5930004 ldr r0, [r3, #4]
* are obvious errors in the iovec. So this extra loop ensures
* that we do not do anything if there is an argument error.
*/
all_zeros = true;
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
30004208: e2833008 add r3, r3, #8
if ( iov[v].iov_len < 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
3000420c: e081c000 add ip, r1, r0
if ( total < old )
30004210: e151000c cmp r1, ip
30004214: ca000020 bgt 3000429c <readv+0x118>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
all_zeros = false;
30004218: e3500000 cmp r0, #0
3000421c: 13a07000 movne r7, #0
* are obvious errors in the iovec. So this extra loop ensures
* that we do not do anything if there is an argument error.
*/
all_zeros = true;
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
30004220: e1540002 cmp r4, r2
30004224: cafffff1 bgt 300041f0 <readv+0x6c>
/*
* A readv with all zeros logically has no effect. Even though
* OpenGroup didn't address this case as they did with writev(),
* we will handle it the same way for symmetry.
*/
if ( all_zeros == true ) {
30004228: e3570000 cmp r7, #0
return 0;
3000422c: 13a08000 movne r8, #0
/*
* A readv with all zeros logically has no effect. Even though
* OpenGroup didn't address this case as they did with writev(),
* we will handle it the same way for symmetry.
*/
if ( all_zeros == true ) {
30004230: 1a00001d bne 300042ac <readv+0x128>
30004234: e1a08007 mov r8, r7
30004238: ea00000d b 30004274 <readv+0xf0>
);
if ( bytes < 0 )
return -1;
if ( bytes > 0 ) {
3000423c: 0a000006 beq 3000425c <readv+0xd8>
iop->offset += bytes;
30004240: e286300c add r3, r6, #12
30004244: e893000c ldm r3, {r2, r3}
30004248: e0922000 adds r2, r2, r0
3000424c: e0a33fc0 adc r3, r3, r0, asr #31
30004250: e586200c str r2, [r6, #12]
30004254: e5863010 str r3, [r6, #16]
total += bytes;
30004258: e0888000 add r8, r8, r0
}
if (bytes != iov[ v ].iov_len)
3000425c: e5953004 ldr r3, [r5, #4]
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
30004260: e2855008 add r5, r5, #8
if ( bytes > 0 ) {
iop->offset += bytes;
total += bytes;
}
if (bytes != iov[ v ].iov_len)
30004264: e1500003 cmp r0, r3
30004268: 1a00000f bne 300042ac <readv+0x128>
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
3000426c: e1540007 cmp r4, r7
30004270: da00000d ble 300042ac <readv+0x128>
bytes = (*iop->pathinfo.handlers->read_h)(
30004274: e8950006 ldm r5, {r1, r2}
30004278: e5963020 ldr r3, [r6, #32]
3000427c: e1a00006 mov r0, r6
30004280: e1a0e00f mov lr, pc
30004284: e593f008 ldr pc, [r3, #8]
iop,
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
30004288: e3500000 cmp r0, #0
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
3000428c: e2877001 add r7, r7, #1
iop,
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
30004290: aaffffe9 bge 3000423c <readv+0xb8>
return -1;
30004294: e3e08000 mvn r8, #0 <== NOT EXECUTED
30004298: ea000003 b 300042ac <readv+0x128> <== NOT EXECUTED
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old )
rtems_set_errno_and_return_minus_one( EINVAL );
3000429c: eb002a3f bl 3000eba0 <__errno>
300042a0: e3a03016 mov r3, #22
300042a4: e5803000 str r3, [r0]
300042a8: e3e08000 mvn r8, #0
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
300042ac: e1a00008 mov r0, r8
300042b0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
300042b4: eb002a39 bl 3000eba0 <__errno>
300042b8: e3a03009 mov r3, #9
300042bc: e5803000 str r3, [r0]
300042c0: e3e08000 mvn r8, #0
300042c4: eafffff8 b 300042ac <readv+0x128>
30013494 <realloc>:
void *realloc(
void *ptr,
size_t size
)
{
30013494: e92d41f0 push {r4, r5, r6, r7, r8, lr}
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
30013498: e59f2118 ldr r2, [pc, #280] ; 300135b8 <realloc+0x124>
)
{
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
3001349c: e59f5118 ldr r5, [pc, #280] ; 300135bc <realloc+0x128>
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
300134a0: e5922000 ldr r2, [r2]
)
{
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
300134a4: e5953010 ldr r3, [r5, #16]
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
300134a8: e3520003 cmp r2, #3
)
{
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
300134ac: e2833001 add r3, r3, #1
void *realloc(
void *ptr,
size_t size
)
{
300134b0: e24dd004 sub sp, sp, #4
300134b4: e1a04000 mov r4, r0
300134b8: e1a06001 mov r6, r1
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
300134bc: e5853010 str r3, [r5, #16]
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
300134c0: 0a000020 beq 30013548 <realloc+0xb4>
}
/*
* Continue with realloc().
*/
if ( !ptr )
300134c4: e3540000 cmp r4, #0
300134c8: 0a00001a beq 30013538 <realloc+0xa4>
return malloc( size );
if ( !size ) {
300134cc: e3560000 cmp r6, #0
300134d0: 0a00000f beq 30013514 <realloc+0x80>
free( ptr );
return (void *) 0;
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
300134d4: e59f70e4 ldr r7, [pc, #228] ; 300135c0 <realloc+0x12c>
300134d8: e1a01004 mov r1, r4
300134dc: e5970000 ldr r0, [r7]
300134e0: e1a0200d mov r2, sp
300134e4: eb000065 bl 30013680 <_Protected_heap_Get_block_size>
300134e8: e2508000 subs r8, r0, #0
300134ec: 0a00000c beq 30013524 <realloc+0x90>
}
/*
* Now resize it.
*/
if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, size ) ) {
300134f0: e5970000 ldr r0, [r7]
300134f4: e1a01004 mov r1, r4
300134f8: e1a02006 mov r2, r6
300134fc: eb000070 bl 300136c4 <_Protected_heap_Resize_block>
30013500: e3500000 cmp r0, #0
30013504: 0a00001a beq 30013574 <realloc+0xe0>
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
30013508: e1a00004 mov r0, r4
3001350c: e28dd004 add sp, sp, #4
30013510: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
*/
if ( !ptr )
return malloc( size );
if ( !size ) {
free( ptr );
30013514: e1a00004 mov r0, r4 <== NOT EXECUTED
30013518: ebffbae2 bl 300020a8 <free> <== NOT EXECUTED
return (void *) 0;
3001351c: e1a04006 mov r4, r6 <== NOT EXECUTED
30013520: eafffff8 b 30013508 <realloc+0x74> <== NOT EXECUTED
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
errno = EINVAL;
30013524: ebffe973 bl 3000daf8 <__errno>
30013528: e3a03016 mov r3, #22
3001352c: e5803000 str r3, [r0]
return (void *) 0;
30013530: e1a04008 mov r4, r8
30013534: eafffff3 b 30013508 <realloc+0x74>
/*
* Continue with realloc().
*/
if ( !ptr )
return malloc( size );
30013538: e1a00006 mov r0, r6
3001353c: ebffbbb3 bl 30002410 <malloc>
30013540: e1a04000 mov r4, r0
30013544: eaffffef b 30013508 <realloc+0x74>
/*
* 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)
30013548: e59f3074 ldr r3, [pc, #116] ; 300135c4 <realloc+0x130>
3001354c: e5933000 ldr r3, [r3]
30013550: e3530000 cmp r3, #0
return (void *) 0;
30013554: 13a04000 movne r4, #0
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
if (_Thread_Dispatch_disable_level > 0)
30013558: 1affffea bne 30013508 <realloc+0x74>
return (void *) 0;
if (_ISR_Nest_level > 0)
3001355c: e59f2064 ldr r2, [pc, #100] ; 300135c8 <realloc+0x134>
30013560: e5922000 ldr r2, [r2]
30013564: e3520000 cmp r2, #0
return (void *) 0;
30013568: 11a04003 movne r4, r3
if (_System_state_Is_up(_System_state_Get())) {
if (_Thread_Dispatch_disable_level > 0)
return (void *) 0;
if (_ISR_Nest_level > 0)
3001356c: 0affffd4 beq 300134c4 <realloc+0x30>
30013570: eaffffe4 b 30013508 <realloc+0x74> <== 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 );
30013574: e1a00006 mov r0, r6
30013578: ebffbba4 bl 30002410 <malloc>
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
3001357c: e5953004 ldr r3, [r5, #4]
if ( !new_area ) {
30013580: e2507000 subs r7, r0, #0
* and the C Standard.
*/
new_area = malloc( size );
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
30013584: e2433001 sub r3, r3, #1
30013588: e5853004 str r3, [r5, #4]
if ( !new_area ) {
return (void *) 0;
3001358c: 01a04007 moveq r4, r7
new_area = malloc( size );
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
if ( !new_area ) {
30013590: 0affffdc beq 30013508 <realloc+0x74>
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
30013594: e59d2000 ldr r2, [sp]
30013598: e1a01004 mov r1, r4
3001359c: e1560002 cmp r6, r2
300135a0: 31a02006 movcc r2, r6
300135a4: ebffeb81 bl 3000e3b0 <memcpy>
free( ptr );
300135a8: e1a00004 mov r0, r4
300135ac: ebffbabd bl 300020a8 <free>
return new_area;
300135b0: e1a04007 mov r4, r7
300135b4: eaffffd3 b 30013508 <realloc+0x74>
30004340 <rmdir>:
#include <rtems/seterr.h>
int rmdir(
const char *pathname
)
{
30004340: e92d40f0 push {r4, r5, r6, r7, lr}
30004344: e24dd030 sub sp, sp, #48 ; 0x30
30004348: e1a07000 mov r7, r0
/*
* Get the parent node of the node we wish to remove. Find the parent path.
*/
parentpathlen = rtems_filesystem_dirname ( pathname );
3000434c: ebfffade bl 30002ecc <rtems_filesystem_dirname>
if ( parentpathlen == 0 )
30004350: e2505000 subs r5, r0, #0
30004354: 1a000045 bne 30004470 <rmdir+0x130>
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
30004358: e28d4018 add r4, sp, #24
3000435c: e1a00007 mov r0, r7
30004360: e28d102c add r1, sp, #44 ; 0x2c
30004364: e1a02004 mov r2, r4
30004368: eb00004c bl 300044a0 <rtems_filesystem_get_start_loc>
const char *name;
rtems_filesystem_location_info_t parentloc;
rtems_filesystem_location_info_t loc;
int i;
int result;
bool free_parentloc = false;
3000436c: e1a06005 mov r6, r5
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
30004370: e28dc004 add ip, sp, #4
30004374: e1a0e004 mov lr, r4
30004378: e8be000f ldm lr!, {r0, r1, r2, r3}
3000437c: e8ac000f stmia ip!, {r0, r1, r2, r3}
name = pathname + parentpathlen;
30004380: e0875005 add r5, r7, r5
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
30004384: e59e3000 ldr r3, [lr]
name = pathname + parentpathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
30004388: e1a00005 mov r0, r5
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
3000438c: e58c3000 str r3, [ip]
name = pathname + parentpathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
30004390: eb002e42 bl 3000fca0 <strlen>
30004394: e1a01000 mov r1, r0
30004398: e1a00005 mov r0, r5
3000439c: ebfffad9 bl 30002f08 <rtems_filesystem_prefix_separators>
300043a0: e0857000 add r7, r5, r0
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
300043a4: e1a00007 mov r0, r7
300043a8: eb002e3c bl 3000fca0 <strlen>
300043ac: e28d5004 add r5, sp, #4
300043b0: e1a01000 mov r1, r0
300043b4: e3a02000 mov r2, #0
300043b8: e1a00007 mov r0, r7
300043bc: e1a03005 mov r3, r5
300043c0: e58d2000 str r2, [sp]
300043c4: ebfffa74 bl 30002d9c <rtems_filesystem_evaluate_relative_path>
0, &loc, false );
if ( result != 0 ) {
300043c8: e3500000 cmp r0, #0
300043cc: 1a000015 bne 30004428 <rmdir+0xe8>
}
/*
* Verify you can remove this node as a directory.
*/
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){
300043d0: e1a00005 mov r0, r5
300043d4: e59d3010 ldr r3, [sp, #16]
300043d8: e1a0e00f mov lr, pc
300043dc: e593f010 ldr pc, [r3, #16]
300043e0: e3500001 cmp r0, #1
300043e4: 1a000013 bne 30004438 <rmdir+0xf8>
/*
* Use the filesystems rmnod to remove the node.
*/
result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
300043e8: e1a01005 mov r1, r5
300043ec: e59d300c ldr r3, [sp, #12]
300043f0: e1a00004 mov r0, r4
300043f4: e1a0e00f mov lr, pc
300043f8: e593f034 ldr pc, [r3, #52] ; 0x34
300043fc: e1a07000 mov r7, r0
rtems_filesystem_freenode( &loc );
30004400: e1a00005 mov r0, r5
30004404: ebfffb70 bl 300031cc <rtems_filesystem_freenode>
if ( free_parentloc )
30004408: e3560000 cmp r6, #0
3000440c: 1a000002 bne 3000441c <rmdir+0xdc>
rtems_filesystem_freenode( &parentloc );
return result;
}
30004410: e1a00007 mov r0, r7
30004414: e28dd030 add sp, sp, #48 ; 0x30
30004418: e8bd80f0 pop {r4, r5, r6, r7, pc}
result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
3000441c: e1a00004 mov r0, r4
30004420: ebfffb69 bl 300031cc <rtems_filesystem_freenode>
30004424: eafffff9 b 30004410 <rmdir+0xd0>
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
30004428: e3560000 cmp r6, #0
3000442c: 1a00000b bne 30004460 <rmdir+0x120>
rtems_filesystem_freenode( &parentloc );
return -1;
30004430: e3e07000 mvn r7, #0
30004434: eafffff5 b 30004410 <rmdir+0xd0>
/*
* Verify you can remove this node as a directory.
*/
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){
rtems_filesystem_freenode( &loc );
30004438: e1a00005 mov r0, r5
3000443c: ebfffb62 bl 300031cc <rtems_filesystem_freenode>
if ( free_parentloc )
30004440: e3560000 cmp r6, #0
rtems_filesystem_freenode( &parentloc );
30004444: 11a00004 movne r0, r4
30004448: 1bfffb5f blne 300031cc <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( ENOTDIR );
3000444c: eb002a4e bl 3000ed8c <__errno>
30004450: e3a03014 mov r3, #20
30004454: e5803000 str r3, [r0]
30004458: e3e07000 mvn r7, #0
3000445c: eaffffeb b 30004410 <rmdir+0xd0>
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
30004460: e1a00004 mov r0, r4 <== NOT EXECUTED
30004464: ebfffb58 bl 300031cc <rtems_filesystem_freenode> <== NOT EXECUTED
return -1;
30004468: e3e07000 mvn r7, #0 <== NOT EXECUTED
3000446c: eaffffe7 b 30004410 <rmdir+0xd0> <== NOT EXECUTED
parentpathlen = rtems_filesystem_dirname ( pathname );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
else {
result = rtems_filesystem_evaluate_path(pathname, parentpathlen,
30004470: e3a03000 mov r3, #0
30004474: e28d4018 add r4, sp, #24
30004478: e58d3000 str r3, [sp]
3000447c: e3a02002 mov r2, #2
30004480: e1a00007 mov r0, r7
30004484: e1a01005 mov r1, r5
30004488: e1a03004 mov r3, r4
3000448c: ebfffa6c bl 30002e44 <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
30004490: e3500000 cmp r0, #0
30004494: 1affffe5 bne 30004430 <rmdir+0xf0>
return -1;
free_parentloc = true;
30004498: e3a06001 mov r6, #1
3000449c: eaffffb3 b 30004370 <rmdir+0x30>
30002c20 <rtems_assoc_ptr_by_name>:
const rtems_assoc_t *rtems_assoc_ptr_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
30002c20: e92d41f0 push {r4, r5, r6, r7, r8, lr}
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
30002c24: e5904000 ldr r4, [r0]
const rtems_assoc_t *rtems_assoc_ptr_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
30002c28: e1a06000 mov r6, r0
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
30002c2c: e3540000 cmp r4, #0
const rtems_assoc_t *rtems_assoc_ptr_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
30002c30: e1a07001 mov r7, r1
const rtems_assoc_t *default_ap = 0;
30002c34: 01a06004 moveq r6, r4
if (rtems_assoc_is_default(ap))
30002c38: 0a000011 beq 30002c84 <rtems_assoc_ptr_by_name+0x64>
30002c3c: e1a00004 mov r0, r4
30002c40: e59f106c ldr r1, [pc, #108] ; 30002cb4 <rtems_assoc_ptr_by_name+0x94>
30002c44: eb003264 bl 3000f5dc <strcmp>
30002c48: e3500000 cmp r0, #0
const rtems_assoc_t *rtems_assoc_ptr_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
const rtems_assoc_t *default_ap = 0;
30002c4c: 13a08000 movne r8, #0
if (rtems_assoc_is_default(ap))
30002c50: 0a00000d beq 30002c8c <rtems_assoc_ptr_by_name+0x6c>
default_ap = ap++;
for ( ; ap->name; ap++)
30002c54: e1a05006 mov r5, r6
30002c58: ea000003 b 30002c6c <rtems_assoc_ptr_by_name+0x4c>
30002c5c: e595400c ldr r4, [r5, #12]
30002c60: e285500c add r5, r5, #12
30002c64: e3540000 cmp r4, #0
30002c68: 0a00000e beq 30002ca8 <rtems_assoc_ptr_by_name+0x88>
if (strcmp(ap->name, name) == 0)
30002c6c: e1a00004 mov r0, r4
30002c70: e1a01007 mov r1, r7
30002c74: eb003258 bl 3000f5dc <strcmp>
30002c78: e3500000 cmp r0, #0
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
30002c7c: e1a06005 mov r6, r5
if (strcmp(ap->name, name) == 0)
30002c80: 1afffff5 bne 30002c5c <rtems_assoc_ptr_by_name+0x3c>
return ap;
return default_ap;
}
30002c84: e1a00006 mov r0, r6
30002c88: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
30002c8c: e596400c ldr r4, [r6, #12]
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
30002c90: e286300c add r3, r6, #12
for ( ; ap->name; ap++)
30002c94: e3540000 cmp r4, #0
30002c98: 11a08006 movne r8, r6
30002c9c: 11a06003 movne r6, r3
30002ca0: 1affffeb bne 30002c54 <rtems_assoc_ptr_by_name+0x34>
30002ca4: eafffff6 b 30002c84 <rtems_assoc_ptr_by_name+0x64> <== NOT EXECUTED
30002ca8: e1a06008 mov r6, r8
if (strcmp(ap->name, name) == 0)
return ap;
return default_ap;
}
30002cac: e1a00006 mov r0, r6
30002cb0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
3000da3c <rtems_deviceio_errno>:
[RTEMS_PROXY_BLOCKING] = EIO
};
int rtems_deviceio_errno(rtems_status_code sc)
{
if (sc == RTEMS_SUCCESSFUL) {
3000da3c: e2503000 subs r3, r0, #0
[RTEMS_IO_ERROR] = EIO,
[RTEMS_PROXY_BLOCKING] = EIO
};
int rtems_deviceio_errno(rtems_status_code sc)
{
3000da40: e92d4010 push {r4, lr}
if (sc == RTEMS_SUCCESSFUL) {
3000da44: 1a000001 bne 3000da50 <rtems_deviceio_errno+0x14>
errno = eno;
return -1;
}
}
3000da48: e1a00003 mov r0, r3
3000da4c: e8bd8010 pop {r4, pc}
if (sc == RTEMS_SUCCESSFUL) {
return 0;
} else {
int eno = EINVAL;
if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) {
3000da50: e353001c cmp r3, #28 <== NOT EXECUTED
eno = status_code_to_errno [sc];
3000da54: 959f2014 ldrls r2, [pc, #20] ; 3000da70 <rtems_deviceio_errno+0x34><== NOT EXECUTED
int rtems_deviceio_errno(rtems_status_code sc)
{
if (sc == RTEMS_SUCCESSFUL) {
return 0;
} else {
int eno = EINVAL;
3000da58: 83a04016 movhi r4, #22 <== NOT EXECUTED
if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) {
eno = status_code_to_errno [sc];
3000da5c: 97924103 ldrls r4, [r2, r3, lsl #2] <== NOT EXECUTED
}
errno = eno;
3000da60: eb000024 bl 3000daf8 <__errno> <== NOT EXECUTED
return -1;
3000da64: e3e03000 mvn r3, #0 <== NOT EXECUTED
if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) {
eno = status_code_to_errno [sc];
}
errno = eno;
3000da68: e5804000 str r4, [r0] <== NOT EXECUTED
return -1;
3000da6c: eafffff5 b 3000da48 <rtems_deviceio_errno+0xc> <== NOT EXECUTED
30001ff0 <rtems_filesystem_dirname>:
}
int rtems_filesystem_dirname(
const char *pathname
)
{
30001ff0: e92d4030 push {r4, r5, lr}
30001ff4: e1a05000 mov r5, r0
int len = strlen( pathname );
30001ff8: eb0032ae bl 3000eab8 <strlen>
while ( len ) {
30001ffc: e2504000 subs r4, r0, #0
30002000: 1a000002 bne 30002010 <rtems_filesystem_dirname+0x20>
30002004: ea000006 b 30002024 <rtems_filesystem_dirname+0x34> <== NOT EXECUTED
30002008: e3540000 cmp r4, #0
3000200c: 0a000004 beq 30002024 <rtems_filesystem_dirname+0x34>
len--;
30002010: e2444001 sub r4, r4, #1
if ( rtems_filesystem_is_separator( pathname[len] ) )
30002014: e7d50004 ldrb r0, [r5, r4]
30002018: eb0003d0 bl 30002f60 <rtems_filesystem_is_separator>
3000201c: e3500000 cmp r0, #0
30002020: 0afffff8 beq 30002008 <rtems_filesystem_dirname+0x18>
break;
}
return len;
}
30002024: e1a00004 mov r0, r4
30002028: e8bd8030 pop {r4, r5, pc}
30001f68 <rtems_filesystem_evaluate_path>:
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
30001f68: e92d40f0 push {r4, r5, r6, r7, lr}
30001f6c: e1a07003 mov r7, r3
30001f70: e24dd008 sub sp, sp, #8
int i = 0;
30001f74: e3a03000 mov r3, #0
/*
* Verify Input parameters.
*/
if ( !pathname )
30001f78: e2505000 subs r5, r0, #0
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
30001f7c: e1a04001 mov r4, r1
30001f80: e1a06002 mov r6, r2
int i = 0;
30001f84: e58d3004 str r3, [sp, #4]
/*
* Verify Input parameters.
*/
if ( !pathname )
30001f88: 0a000013 beq 30001fdc <rtems_filesystem_evaluate_path+0x74>
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !pathloc )
30001f8c: e3570000 cmp r7, #0
30001f90: 0a00000c beq 30001fc8 <rtems_filesystem_evaluate_path+0x60>
/*
* Evaluate the path using the optable evalpath.
*/
rtems_filesystem_get_start_loc( pathname, &i, pathloc );
30001f94: e28d1004 add r1, sp, #4
30001f98: e1a02007 mov r2, r7
30001f9c: eb0003d4 bl 30002ef4 <rtems_filesystem_get_start_loc>
/*
* We evaluation the path relative to the start location we get got.
*/
return rtems_filesystem_evaluate_relative_path( &pathname[i],
30001fa0: e59d1004 ldr r1, [sp, #4]
30001fa4: e59dc01c ldr ip, [sp, #28]
30001fa8: e0850001 add r0, r5, r1
30001fac: e1a02006 mov r2, r6
30001fb0: e0611004 rsb r1, r1, r4
30001fb4: e1a03007 mov r3, r7
30001fb8: e58dc000 str ip, [sp]
30001fbc: ebffffbf bl 30001ec0 <rtems_filesystem_evaluate_relative_path>
pathnamelen - i,
flags,
pathloc,
follow_link );
}
30001fc0: e28dd008 add sp, sp, #8
30001fc4: e8bd80f0 pop {r4, r5, r6, r7, pc}
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !pathloc )
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
30001fc8: eb002eca bl 3000daf8 <__errno> <== NOT EXECUTED
30001fcc: e3a03005 mov r3, #5 <== NOT EXECUTED
30001fd0: e5803000 str r3, [r0] <== NOT EXECUTED
30001fd4: e3e00000 mvn r0, #0 <== NOT EXECUTED
30001fd8: eafffff8 b 30001fc0 <rtems_filesystem_evaluate_path+0x58> <== NOT EXECUTED
/*
* Verify Input parameters.
*/
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
30001fdc: eb002ec5 bl 3000daf8 <__errno> <== NOT EXECUTED
30001fe0: e3a0300e mov r3, #14 <== NOT EXECUTED
30001fe4: e5803000 str r3, [r0] <== NOT EXECUTED
30001fe8: e3e00000 mvn r0, #0 <== NOT EXECUTED
30001fec: eafffff3 b 30001fc0 <rtems_filesystem_evaluate_path+0x58> <== NOT EXECUTED
30001ec0 <rtems_filesystem_evaluate_relative_path>:
/*
* Verify Input parameters.
*/
if ( !pathname )
30001ec0: e3500000 cmp r0, #0
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
30001ec4: e92d4030 push {r4, r5, lr}
30001ec8: e1a05002 mov r5, r2
30001ecc: e1a04003 mov r4, r3
/*
* Verify Input parameters.
*/
if ( !pathname )
30001ed0: 0a00001f beq 30001f54 <rtems_filesystem_evaluate_relative_path+0x94>
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !pathloc )
30001ed4: e3530000 cmp r3, #0
30001ed8: 0a000018 beq 30001f40 <rtems_filesystem_evaluate_relative_path+0x80>
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc );
30001edc: e593c00c ldr ip, [r3, #12]
30001ee0: e1a0e00f mov lr, pc
30001ee4: e59cf000 ldr pc, [ip]
/*
* Get the Node type and determine if you need to follow the link or
* not.
*/
if ( (result == 0) && follow_link ) {
30001ee8: e59d200c ldr r2, [sp, #12]
30001eec: e2703001 rsbs r3, r0, #1
30001ef0: 33a03000 movcc r3, #0
30001ef4: e3520000 cmp r2, #0
30001ef8: 03a03000 moveq r3, #0
30001efc: e3530000 cmp r3, #0
30001f00: 08bd8030 popeq {r4, r5, pc}
type = (*pathloc->ops->node_type_h)( pathloc );
30001f04: e594300c ldr r3, [r4, #12]
30001f08: e1a00004 mov r0, r4
30001f0c: e1a0e00f mov lr, pc
30001f10: e593f010 ldr pc, [r3, #16]
if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
30001f14: e2400003 sub r0, r0, #3
30001f18: e3500001 cmp r0, #1
30001f1c: 9a000001 bls 30001f28 <rtems_filesystem_evaluate_relative_path+0x68>
30001f20: e3a00000 mov r0, #0
result = (*pathloc->ops->eval_link_h)( pathloc, flags );
}
}
return result;
}
30001f24: e8bd8030 pop {r4, r5, pc}
* 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 );
30001f28: e594300c ldr r3, [r4, #12]
30001f2c: e1a00004 mov r0, r4
30001f30: e1a01005 mov r1, r5
30001f34: e1a0e00f mov lr, pc
30001f38: e593f034 ldr pc, [r3, #52] ; 0x34
30001f3c: e8bd8030 pop {r4, r5, pc}
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !pathloc )
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
30001f40: eb002eec bl 3000daf8 <__errno> <== NOT EXECUTED
30001f44: e3a03005 mov r3, #5 <== NOT EXECUTED
30001f48: e5803000 str r3, [r0] <== NOT EXECUTED
30001f4c: e3e00000 mvn r0, #0 <== NOT EXECUTED
30001f50: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
/*
* Verify Input parameters.
*/
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
30001f54: eb002ee7 bl 3000daf8 <__errno> <== NOT EXECUTED
30001f58: e3a0300e mov r3, #14 <== NOT EXECUTED
30001f5c: e5803000 str r3, [r0] <== NOT EXECUTED
30001f60: e3e00000 mvn r0, #0 <== NOT EXECUTED
30001f64: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
30001d60 <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 )
{
30001d60: e92d40f0 push {r4, r5, r6, r7, lr}
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
30001d64: e59f20e8 ldr r2, [pc, #232] ; 30001e54 <rtems_filesystem_initialize+0xf4>
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
30001d68: e59f60e8 ldr r6, [pc, #232] ; 30001e58 <rtems_filesystem_initialize+0xf8>
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
30001d6c: e5922000 ldr r2, [r2]
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
30001d70: e5963000 ldr r3, [r6]
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
30001d74: e3520000 cmp r2, #0
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
30001d78: e3a02012 mov r2, #18
* configuration is a single instantiation of the IMFS or miniIMFS with
* a single "/dev" directory in it.
*/
void rtems_filesystem_initialize( void )
{
30001d7c: e24dd018 sub sp, sp, #24
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
30001d80: e583202c str r2, [r3, #44] ; 0x2c
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
30001d84: 0a00002c beq 30001e3c <rtems_filesystem_initialize+0xdc>
rtems_fatal_error_occurred( 0xABCD0001 );
mt = &rtems_filesystem_mount_table[0];
30001d88: e59f30cc ldr r3, [pc, #204] ; 30001e5c <rtems_filesystem_initialize+0xfc>
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
30001d8c: e3a05000 mov r5, #0
*/
if ( rtems_filesystem_mount_table_size == 0 )
rtems_fatal_error_occurred( 0xABCD0001 );
mt = &rtems_filesystem_mount_table[0];
30001d90: e5933000 ldr r3, [r3]
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
30001d94: e5930008 ldr r0, [r3, #8]
30001d98: e593100c ldr r1, [r3, #12]
30001d9c: e893000c ldm r3, {r2, r3}
30001da0: e58d5000 str r5, [sp]
30001da4: eb000226 bl 30002644 <mount>
if ( status == -1 )
30001da8: e3700001 cmn r0, #1
30001dac: 0a000026 beq 30001e4c <rtems_filesystem_initialize+0xec>
rtems_fatal_error_occurred( 0xABCD0002 );
rtems_filesystem_link_counts = 0;
30001db0: e5963000 ldr r3, [r6]
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
30001db4: e28d4004 add r4, sp, #4
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
if ( status == -1 )
rtems_fatal_error_occurred( 0xABCD0002 );
rtems_filesystem_link_counts = 0;
30001db8: e1c353b0 strh r5, [r3, #48] ; 0x30
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
30001dbc: e3a01001 mov r1, #1
30001dc0: e1a03004 mov r3, r4
30001dc4: e1a02005 mov r2, r5
30001dc8: e59f0090 ldr r0, [pc, #144] ; 30001e60 <rtems_filesystem_initialize+0x100>
30001dcc: e58d5000 str r5, [sp]
30001dd0: eb000064 bl 30001f68 <rtems_filesystem_evaluate_path>
rtems_filesystem_root = loc;
30001dd4: e596c000 ldr ip, [r6]
30001dd8: e1a07004 mov r7, r4
30001ddc: e28cc018 add ip, ip, #24
30001de0: e8b7000f ldm r7!, {r0, r1, r2, r3}
30001de4: e597e000 ldr lr, [r7]
30001de8: e8ac000f stmia ip!, {r0, r1, r2, r3}
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
30001dec: e3a01001 mov r1, #1
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
30001df0: e58ce000 str lr, [ip]
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
30001df4: e1a02005 mov r2, r5
30001df8: e1a03004 mov r3, r4
30001dfc: e59f005c ldr r0, [pc, #92] ; 30001e60 <rtems_filesystem_initialize+0x100>
30001e00: e58d5000 str r5, [sp]
30001e04: eb000057 bl 30001f68 <rtems_filesystem_evaluate_path>
rtems_filesystem_current = loc;
30001e08: e8b4000f ldm r4!, {r0, r1, r2, r3}
30001e0c: e596c000 ldr ip, [r6]
30001e10: e597e000 ldr lr, [r7]
30001e14: e28cc004 add ip, ip, #4
30001e18: e8ac000f stmia 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);
30001e1c: e59f0040 ldr r0, [pc, #64] ; 30001e64 <rtems_filesystem_initialize+0x104>
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_current = loc;
30001e20: e58ce000 str lr, [ip]
*
* NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually
* created that way by the IMFS.
*/
status = mkdir( "/dev", 0777);
30001e24: e59f103c ldr r1, [pc, #60] ; 30001e68 <rtems_filesystem_initialize+0x108>
30001e28: eb0001b5 bl 30002504 <mkdir>
if ( status != 0 )
30001e2c: e3500000 cmp r0, #0
30001e30: 1a000003 bne 30001e44 <rtems_filesystem_initialize+0xe4>
* it will be mounted onto is created. Moreover, if it is going to
* use a device, then it is REALLY unfair to attempt this
* before device drivers are initialized. So we return via a base
* filesystem image and nothing auto-mounted at this point.
*/
}
30001e34: e28dd018 add sp, sp, #24
30001e38: e8bd80f0 pop {r4, r5, r6, r7, pc}
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
rtems_fatal_error_occurred( 0xABCD0001 );
30001e3c: e59f0028 ldr r0, [pc, #40] ; 30001e6c <rtems_filesystem_initialize+0x10c><== NOT EXECUTED
30001e40: eb000fca bl 30005d70 <rtems_fatal_error_occurred> <== NOT EXECUTED
* created that way by the IMFS.
*/
status = mkdir( "/dev", 0777);
if ( status != 0 )
rtems_fatal_error_occurred( 0xABCD0003 );
30001e44: e59f0024 ldr r0, [pc, #36] ; 30001e70 <rtems_filesystem_initialize+0x110><== NOT EXECUTED
30001e48: eb000fc8 bl 30005d70 <rtems_fatal_error_occurred> <== NOT EXECUTED
mt = &rtems_filesystem_mount_table[0];
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
if ( status == -1 )
rtems_fatal_error_occurred( 0xABCD0002 );
30001e4c: e59f0020 ldr r0, [pc, #32] ; 30001e74 <rtems_filesystem_initialize+0x114><== NOT EXECUTED
30001e50: eb000fc6 bl 30005d70 <rtems_fatal_error_occurred> <== NOT EXECUTED
3000a468 <rtems_filesystem_iterate>:
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
3000a468: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
3000a46c: e59f60ac ldr r6, [pc, #172] ; 3000a520 <rtems_filesystem_iterate+0xb8>
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
3000a470: e1a04000 mov r4, r0
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
3000a474: e5963000 ldr r3, [r6]
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
3000a478: e1a05001 mov r5, r1
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
3000a47c: e3530000 cmp r3, #0
3000a480: 1a000002 bne 3000a490 <rtems_filesystem_iterate+0x28>
3000a484: ea00000c b 3000a4bc <rtems_filesystem_iterate+0x54> <== NOT EXECUTED
3000a488: e3500000 cmp r0, #0 <== NOT EXECUTED
3000a48c: 1a000021 bne 3000a518 <rtems_filesystem_iterate+0xb0> <== NOT EXECUTED
stop = (*routine)( table_entry, routine_arg );
3000a490: e1a00006 mov r0, r6
3000a494: e1a01005 mov r1, r5
3000a498: e1a0e00f mov lr, pc
3000a49c: e12fff14 bx r4
{
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
3000a4a0: e5963008 ldr r3, [r6, #8]
stop = (*routine)( table_entry, routine_arg );
3000a4a4: e1a0a000 mov sl, r0
{
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
3000a4a8: e3530000 cmp r3, #0
3000a4ac: e2866008 add r6, r6, #8
3000a4b0: 1afffff4 bne 3000a488 <rtems_filesystem_iterate+0x20>
stop = (*routine)( table_entry, routine_arg );
++table_entry;
}
if ( !stop ) {
3000a4b4: e3500000 cmp r0, #0
3000a4b8: 1a000016 bne 3000a518 <rtems_filesystem_iterate+0xb0>
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
3000a4bc: e59f7060 ldr r7, [pc, #96] ; 3000a524 <rtems_filesystem_iterate+0xbc>
3000a4c0: e3a01000 mov r1, #0
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
3000a4c4: e59f605c ldr r6, [pc, #92] ; 3000a528 <rtems_filesystem_iterate+0xc0>
3000a4c8: e5970000 ldr r0, [r7]
3000a4cc: e1a02001 mov r2, r1
3000a4d0: ebffec82 bl 300056e0 <rtems_semaphore_obtain>
3000a4d4: e4968004 ldr r8, [r6], #4
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
3000a4d8: e1580006 cmp r8, r6
3000a4dc: 03a0a000 moveq sl, #0
3000a4e0: 1a000002 bne 3000a4f0 <rtems_filesystem_iterate+0x88>
3000a4e4: ea000009 b 3000a510 <rtems_filesystem_iterate+0xa8>
node = rtems_chain_first( &filesystem_chain );
!rtems_chain_is_tail( &filesystem_chain, node ) && !stop;
3000a4e8: e3500000 cmp r0, #0
3000a4ec: 1a000007 bne 3000a510 <rtems_filesystem_iterate+0xa8>
node = rtems_chain_next( node )
) {
const filesystem_node *fsn = (filesystem_node *) node;
stop = (*routine)( &fsn->entry, routine_arg );
3000a4f0: e2880008 add r0, r8, #8
3000a4f4: e1a01005 mov r1, r5
3000a4f8: e1a0e00f mov lr, pc
3000a4fc: e12fff14 bx r4
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
3000a500: e5988000 ldr r8, [r8]
!rtems_chain_is_tail( &filesystem_chain, node ) && !stop;
node = rtems_chain_next( node )
) {
const filesystem_node *fsn = (filesystem_node *) node;
stop = (*routine)( &fsn->entry, routine_arg );
3000a504: e1a0a000 mov sl, r0
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
3000a508: e1580006 cmp r8, r6
3000a50c: 1afffff5 bne 3000a4e8 <rtems_filesystem_iterate+0x80>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
3000a510: e5970000 ldr r0, [r7]
3000a514: ebffecba bl 30005804 <rtems_semaphore_release>
}
rtems_libio_unlock();
}
return stop;
}
3000a518: e1a0000a mov r0, sl
3000a51c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
300025cc <rtems_filesystem_mount_iterate>:
bool rtems_filesystem_mount_iterate(
rtems_per_filesystem_mount_routine routine,
void *routine_arg
)
{
300025cc: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
300025d0: e59f7064 ldr r7, [pc, #100] ; 3000263c <rtems_filesystem_mount_iterate+0x70>
stop = (*routine)( mt_entry, routine_arg );
}
rtems_libio_unlock();
return stop;
}
300025d4: e59f4064 ldr r4, [pc, #100] ; 30002640 <rtems_filesystem_mount_iterate+0x74>
bool rtems_filesystem_mount_iterate(
rtems_per_filesystem_mount_routine routine,
void *routine_arg
)
{
300025d8: e1a06001 mov r6, r1
300025dc: e3a01000 mov r1, #0
300025e0: e1a05000 mov r5, r0
300025e4: e1a02001 mov r2, r1
300025e8: e5970000 ldr r0, [r7]
300025ec: eb000c3b bl 300056e0 <rtems_semaphore_obtain>
stop = (*routine)( mt_entry, routine_arg );
}
rtems_libio_unlock();
return stop;
}
300025f0: e4948004 ldr r8, [r4], #4
{
rtems_chain_node *node = NULL;
bool stop = false;
rtems_libio_lock();
for (
300025f4: e1580004 cmp r8, r4
rtems_per_filesystem_mount_routine routine,
void *routine_arg
)
{
rtems_chain_node *node = NULL;
bool stop = false;
300025f8: 03a0a000 moveq sl, #0
rtems_libio_lock();
for (
300025fc: 1a000002 bne 3000260c <rtems_filesystem_mount_iterate+0x40>
30002600: ea000009 b 3000262c <rtems_filesystem_mount_iterate+0x60> <== NOT EXECUTED
node = rtems_chain_first( &mount_chain );
!rtems_chain_is_tail( &mount_chain, node ) && !stop;
30002604: e3500000 cmp r0, #0
30002608: 1a000007 bne 3000262c <rtems_filesystem_mount_iterate+0x60>
node = rtems_chain_next( node )
) {
const rtems_filesystem_mount_table_entry_t *mt_entry =
(rtems_filesystem_mount_table_entry_t *) node;
stop = (*routine)( mt_entry, routine_arg );
3000260c: e1a00008 mov r0, r8
30002610: e1a01006 mov r1, r6
30002614: e1a0e00f mov lr, pc
30002618: e12fff15 bx r5
}
rtems_libio_unlock();
return stop;
}
3000261c: e5988000 ldr r8, [r8]
node = rtems_chain_next( node )
) {
const rtems_filesystem_mount_table_entry_t *mt_entry =
(rtems_filesystem_mount_table_entry_t *) node;
stop = (*routine)( mt_entry, routine_arg );
30002620: e1a0a000 mov sl, r0
{
rtems_chain_node *node = NULL;
bool stop = false;
rtems_libio_lock();
for (
30002624: e1580004 cmp r8, r4
30002628: 1afffff5 bne 30002604 <rtems_filesystem_mount_iterate+0x38>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
3000262c: e5970000 ldr r0, [r7]
30002630: eb000c73 bl 30005804 <rtems_semaphore_release>
stop = (*routine)( mt_entry, routine_arg );
}
rtems_libio_unlock();
return stop;
}
30002634: e1a0000a mov r0, sl
30002638: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
3000202c <rtems_filesystem_prefix_separators>:
int rtems_filesystem_prefix_separators(
const char *pathname,
int pathnamelen
)
{
3000202c: e92d4070 push {r4, r5, r6, lr}
30002030: e1a06000 mov r6, r0
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
30002034: e5d00000 ldrb r0, [r0]
30002038: e1a04001 mov r4, r1
3000203c: e3510000 cmp r1, #0
30002040: 13500000 cmpne r0, #0
30002044: 03a05000 moveq r5, #0
30002048: 13a05001 movne r5, #1
)
{
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
3000204c: 13a05000 movne r5, #0
while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
30002050: 1a00000a bne 30002080 <rtems_filesystem_prefix_separators+0x54>
30002054: ea00000c b 3000208c <rtems_filesystem_prefix_separators+0x60><== NOT EXECUTED
30002058: e2544001 subs r4, r4, #1
3000205c: e5f60001 ldrb r0, [r6, #1]!
30002060: 03a03000 moveq r3, #0
30002064: 13a03001 movne r3, #1
30002068: e3500000 cmp r0, #0
3000206c: 03a03000 moveq r3, #0
30002070: 12033001 andne r3, r3, #1
30002074: e3530000 cmp r3, #0
{
pathname++;
pathnamelen--;
stripped++;
30002078: e2855001 add r5, r5, #1
{
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
3000207c: 0a000002 beq 3000208c <rtems_filesystem_prefix_separators+0x60>
30002080: eb0003b6 bl 30002f60 <rtems_filesystem_is_separator>
30002084: e3500000 cmp r0, #0
30002088: 1afffff2 bne 30002058 <rtems_filesystem_prefix_separators+0x2c>
pathname++;
pathnamelen--;
stripped++;
}
return stripped;
}
3000208c: e1a00005 mov r0, r5
30002090: e8bd8070 pop {r4, r5, r6, pc}
30002a4c <rtems_gxx_getspecific>:
void *rtems_gxx_getspecific(__gthread_key_t key)
{
30002a4c: e92d4030 push {r4, r5, lr}
30002a50: e24dd004 sub sp, sp, #4
rtems_status_code status;
void *p= 0;
30002a54: e3a05000 mov r5, #0
}
return 0;
}
void *rtems_gxx_getspecific(__gthread_key_t key)
{
30002a58: e1a04000 mov r4, r0
rtems_status_code status;
void *p= 0;
30002a5c: e28d2004 add r2, sp, #4
30002a60: e5225004 str r5, [r2, #-4]!
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_get( RTEMS_SELF, (void **)key, &p );
30002a64: e1a00005 mov r0, r5
30002a68: e1a01004 mov r1, r4
30002a6c: e1a0200d mov r2, sp
30002a70: eb000f63 bl 30006804 <rtems_task_variable_get>
if ( status == RTEMS_SUCCESSFUL ) {
30002a74: e1500005 cmp r0, r5
/* We do not have to do this, but what the heck ! */
p= key->val;
30002a78: 05940000 ldreq r0, [r4]
rtems_status_code status;
void *p= 0;
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_get( RTEMS_SELF, (void **)key, &p );
if ( status == RTEMS_SUCCESSFUL ) {
30002a7c: 1a000001 bne 30002a88 <rtems_gxx_getspecific+0x3c>
p,
rtems_task_self()
);
#endif
return p;
}
30002a80: e28dd004 add sp, sp, #4
30002a84: e8bd8030 pop {r4, r5, pc}
p= key->val;
} else {
/* fisrt time, always set to zero, it is unknown the value that the others
* threads are using at the moment of this call
*/
status = rtems_task_variable_add( RTEMS_SELF, (void **)key, key->dtor );
30002a88: e1a00005 mov r0, r5 <== NOT EXECUTED
30002a8c: e1a01004 mov r1, r4 <== NOT EXECUTED
30002a90: e5942004 ldr r2, [r4, #4] <== NOT EXECUTED
30002a94: eb000f07 bl 300066b8 <rtems_task_variable_add> <== NOT EXECUTED
if ( status != RTEMS_SUCCESSFUL ) {
30002a98: e2503000 subs r3, r0, #0 <== NOT EXECUTED
rtems_panic ("rtems_gxx_getspecific");
}
key->val = (void *)0;
30002a9c: 059d0000 ldreq r0, [sp] <== NOT EXECUTED
30002aa0: 05843000 streq r3, [r4] <== NOT EXECUTED
30002aa4: 0afffff5 beq 30002a80 <rtems_gxx_getspecific+0x34> <== NOT EXECUTED
/* fisrt time, always set to zero, it is unknown the value that the others
* threads are using at the moment of this call
*/
status = rtems_task_variable_add( RTEMS_SELF, (void **)key, key->dtor );
if ( status != RTEMS_SUCCESSFUL ) {
rtems_panic ("rtems_gxx_getspecific");
30002aa8: e59f0000 ldr r0, [pc, #0] ; 30002ab0 <rtems_gxx_getspecific+0x64><== NOT EXECUTED
30002aac: eb0020fa bl 3000ae9c <rtems_panic> <== NOT EXECUTED
30002a0c <rtems_gxx_key_dtor>:
{
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: dtor key=%x, ptr=%x\n", key, ptr );
#endif
key->val = 0;
30002a0c: e3a03000 mov r3, #0 <== NOT EXECUTED
30002a10: e5803000 str r3, [r0] <== NOT EXECUTED
return 0;
}
30002a14: e1a00003 mov r0, r3 <== NOT EXECUTED
30002a18: e12fff1e bx lr <== NOT EXECUTED
30002b40 <rtems_gxx_mutex_destroy>:
int rtems_gxx_mutex_destroy (__gthread_mutex_t *mutex)
{
30002b40: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: destroy mutex=%X\n", *mutex );
#endif
status = rtems_semaphore_delete(*(rtems_id *)mutex);
30002b44: e5900000 ldr r0, [r0] <== NOT EXECUTED
30002b48: eb000d32 bl 30006018 <rtems_semaphore_delete> <== NOT EXECUTED
if ( status == RTEMS_SUCCESSFUL )
30002b4c: e3500000 cmp r0, #0 <== NOT EXECUTED
return 0;
return -1;
}
30002b50: 13e00000 mvnne r0, #0 <== NOT EXECUTED
30002b54: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
30002ae0 <rtems_gxx_mutex_init>:
/*
* MUTEX support
*/
void rtems_gxx_mutex_init (__gthread_mutex_t *mutex)
{
30002ae0: e52de004 push {lr} ; (str lr, [sp, #-4]!)
30002ae4: e24dd004 sub sp, sp, #4
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: mutex init =%X\n", *mutex );
#endif
status = rtems_semaphore_create(
30002ae8: e58d0000 str r0, [sp]
30002aec: e3a01001 mov r1, #1
30002af0: e59f0020 ldr r0, [pc, #32] ; 30002b18 <rtems_gxx_mutex_init+0x38>
30002af4: e3a02054 mov r2, #84 ; 0x54
30002af8: e3a03000 mov r3, #0
30002afc: eb000cd4 bl 30005e54 <rtems_semaphore_create>
RTEMS_PRIORITY|RTEMS_BINARY_SEMAPHORE|
RTEMS_INHERIT_PRIORITY|RTEMS_NO_PRIORITY_CEILING|RTEMS_LOCAL,
0,
(rtems_id *)mutex
);
if ( status != RTEMS_SUCCESSFUL ) {
30002b00: e3500000 cmp r0, #0
30002b04: 1a000001 bne 30002b10 <rtems_gxx_mutex_init+0x30>
rtems_panic ("rtems_gxx_mutex_init");
}
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: mutex init complete =%X\n", *mutex );
#endif
}
30002b08: e28dd004 add sp, sp, #4
30002b0c: e8bd8000 pop {pc}
"gxx_wrappers: mutex init failed %s (%d)\n",
rtems_status_text(status),
status
);
#endif
rtems_panic ("rtems_gxx_mutex_init");
30002b10: e59f0004 ldr r0, [pc, #4] ; 30002b1c <rtems_gxx_mutex_init+0x3c><== NOT EXECUTED
30002b14: eb0020e0 bl 3000ae9c <rtems_panic> <== NOT EXECUTED
30002948 <rtems_gxx_once>:
typedef int __gthread_once_t;
typedef void *__gthread_mutex_t;
typedef void *__gthread_recursive_mutex_t;
int rtems_gxx_once(__gthread_once_t *once, void (*func) (void))
{
30002948: e92d4070 push {r4, r5, r6, lr}
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: once=%x, func=%x\n", *once, func );
#endif
if ( *(volatile __gthread_once_t *)once == 0 ) {
3000294c: e5903000 ldr r3, [r0]
typedef int __gthread_once_t;
typedef void *__gthread_mutex_t;
typedef void *__gthread_recursive_mutex_t;
int rtems_gxx_once(__gthread_once_t *once, void (*func) (void))
{
30002950: e24dd004 sub sp, sp, #4
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: once=%x, func=%x\n", *once, func );
#endif
if ( *(volatile __gthread_once_t *)once == 0 ) {
30002954: e3530000 cmp r3, #0
typedef int __gthread_once_t;
typedef void *__gthread_mutex_t;
typedef void *__gthread_recursive_mutex_t;
int rtems_gxx_once(__gthread_once_t *once, void (*func) (void))
{
30002958: e1a04000 mov r4, r0
3000295c: e1a05001 mov r5, r1
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: once=%x, func=%x\n", *once, func );
#endif
if ( *(volatile __gthread_once_t *)once == 0 ) {
30002960: 0a000002 beq 30002970 <rtems_gxx_once+0x28>
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
if ( o == 0 )
(*func)();
}
return 0;
}
30002964: e3a00000 mov r0, #0
30002968: e28dd004 add sp, sp, #4
3000296c: e8bd8070 pop {r4, r5, r6, pc}
if ( *(volatile __gthread_once_t *)once == 0 ) {
rtems_mode saveMode;
__gthread_once_t o;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
30002970: e3a00c01 mov r0, #256 ; 0x100
30002974: e1a01000 mov r1, r0
30002978: e1a0200d mov r2, sp
3000297c: eb000ed4 bl 300064d4 <rtems_task_mode>
if ( (o = *(volatile __gthread_once_t *)once) == 0 ) {
30002980: e5943000 ldr r3, [r4]
if ( *(volatile __gthread_once_t *)once == 0 ) {
rtems_mode saveMode;
__gthread_once_t o;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
30002984: e1a0600d mov r6, sp
if ( (o = *(volatile __gthread_once_t *)once) == 0 ) {
30002988: e3530000 cmp r3, #0
3000298c: 1a000008 bne 300029b4 <rtems_gxx_once+0x6c>
*(volatile __gthread_once_t *)once = 1;
30002990: e3a03001 mov r3, #1
30002994: e5843000 str r3, [r4]
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
30002998: e3a01c01 mov r1, #256 ; 0x100
3000299c: e1a0200d mov r2, sp
300029a0: e59d0000 ldr r0, [sp]
300029a4: eb000eca bl 300064d4 <rtems_task_mode>
if ( o == 0 )
(*func)();
300029a8: e1a0e00f mov lr, pc
300029ac: e12fff15 bx r5
300029b0: eaffffeb b 30002964 <rtems_gxx_once+0x1c>
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
if ( (o = *(volatile __gthread_once_t *)once) == 0 ) {
*(volatile __gthread_once_t *)once = 1;
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
300029b4: e59d0000 ldr r0, [sp] <== NOT EXECUTED
300029b8: e3a01c01 mov r1, #256 ; 0x100 <== NOT EXECUTED
300029bc: e1a0200d mov r2, sp <== NOT EXECUTED
300029c0: eb000ec3 bl 300064d4 <rtems_task_mode> <== NOT EXECUTED
300029c4: eaffffe6 b 30002964 <rtems_gxx_once+0x1c> <== NOT EXECUTED
30007328 <rtems_io_register_driver>:
rtems_device_major_number *registered_major
)
{
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
30007328: e59fc150 ldr ip, [pc, #336] ; 30007480 <rtems_io_register_driver+0x158>
rtems_device_major_number major,
const rtems_driver_address_table *driver_table,
rtems_device_major_number *registered_major
)
{
rtems_device_major_number major_limit = _IO_Number_of_drivers;
3000732c: e59f3150 ldr r3, [pc, #336] ; 30007484 <rtems_io_register_driver+0x15c>
if ( rtems_interrupt_is_in_progress() )
30007330: e59cc000 ldr ip, [ip]
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
)
{
30007334: e92d4030 push {r4, r5, lr}
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
30007338: e35c0000 cmp ip, #0
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
)
{
3000733c: e1a04000 mov r4, r0
rtems_device_major_number major_limit = _IO_Number_of_drivers;
30007340: e5930000 ldr r0, [r3]
if ( rtems_interrupt_is_in_progress() )
return RTEMS_CALLED_FROM_ISR;
30007344: 13a00012 movne r0, #18
rtems_device_major_number *registered_major
)
{
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
30007348: 18bd8030 popne {r4, r5, pc}
return RTEMS_CALLED_FROM_ISR;
if ( registered_major == NULL )
3000734c: e3520000 cmp r2, #0
30007350: 0a00003f beq 30007454 <rtems_io_register_driver+0x12c>
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
if ( driver_table == NULL )
30007354: e3510000 cmp r1, #0
if ( registered_major == NULL )
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
30007358: e5820000 str r0, [r2]
if ( driver_table == NULL )
3000735c: 0a00003c beq 30007454 <rtems_io_register_driver+0x12c>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
30007360: e591c000 ldr ip, [r1]
30007364: e35c0000 cmp ip, #0
30007368: 0a000036 beq 30007448 <rtems_io_register_driver+0x120>
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
3000736c: e1500004 cmp r0, r4
30007370: 9a000027 bls 30007414 <rtems_io_register_driver+0xec>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
30007374: e59f010c ldr r0, [pc, #268] ; 30007488 <rtems_io_register_driver+0x160>
30007378: e590c000 ldr ip, [r0]
3000737c: e28cc001 add ip, ip, #1
30007380: e580c000 str ip, [r0]
return RTEMS_INVALID_NUMBER;
_Thread_Disable_dispatch();
if ( major == 0 ) {
30007384: e3540000 cmp r4, #0
30007388: 1a000023 bne 3000741c <rtems_io_register_driver+0xf4>
static rtems_status_code rtems_io_obtain_major_number(
rtems_device_major_number *major
)
{
rtems_device_major_number n = _IO_Number_of_drivers;
3000738c: e593c000 ldr ip, [r3]
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
30007390: e35c0000 cmp ip, #0
30007394: 0a000030 beq 3000745c <rtems_io_register_driver+0x134>
30007398: e59fe0ec ldr lr, [pc, #236] ; 3000748c <rtems_io_register_driver+0x164>
3000739c: e59e3000 ldr r3, [lr]
300073a0: ea000003 b 300073b4 <rtems_io_register_driver+0x8c>
300073a4: e2844001 add r4, r4, #1
300073a8: e15c0004 cmp ip, r4
300073ac: e2833018 add r3, r3, #24
300073b0: 9a000005 bls 300073cc <rtems_io_register_driver+0xa4>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
300073b4: e5930000 ldr r0, [r3]
300073b8: e3500000 cmp r0, #0
300073bc: 1afffff8 bne 300073a4 <rtems_io_register_driver+0x7c>
300073c0: e5930004 ldr r0, [r3, #4]
300073c4: e3500000 cmp r0, #0
300073c8: 1afffff5 bne 300073a4 <rtems_io_register_driver+0x7c>
}
/* Assigns invalid value in case of failure */
*major = m;
if ( m != n )
300073cc: e15c0004 cmp ip, r4
300073d0: 1084c084 addne ip, r4, r4, lsl #1
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
300073d4: e5824000 str r4, [r2]
if ( m != n )
300073d8: 11a0c18c lslne ip, ip, #3
300073dc: 0a00001f beq 30007460 <rtems_io_register_driver+0x138>
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
300073e0: e59e5000 ldr r5, [lr]
300073e4: e1a0e001 mov lr, r1
300073e8: e085c00c add ip, r5, ip
300073ec: e8be000f ldm lr!, {r0, r1, r2, r3}
300073f0: e8ac000f stmia ip!, {r0, r1, r2, r3}
300073f4: e89e0003 ldm lr, {r0, r1}
300073f8: e88c0003 stm ip, {r0, r1}
_Thread_Enable_dispatch();
300073fc: eb0006c4 bl 30008f14 <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
30007400: e3a01000 mov r1, #0
30007404: e1a00004 mov r0, r4
30007408: e1a02001 mov r2, r1
}
3000740c: e8bd4030 pop {r4, r5, lr}
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
30007410: ea002177 b 3000f9f4 <rtems_io_initialize>
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
return RTEMS_INVALID_NUMBER;
30007414: e3a0000a mov r0, #10
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
30007418: e8bd8030 pop {r4, r5, pc}
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
3000741c: e59fe068 ldr lr, [pc, #104] ; 3000748c <rtems_io_register_driver+0x164>
30007420: e0840084 add r0, r4, r4, lsl #1
30007424: e59e3000 ldr r3, [lr]
30007428: e1a0c180 lsl ip, r0, #3
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
3000742c: e7930180 ldr r0, [r3, r0, lsl #3]
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
30007430: e083300c add r3, r3, ip
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
30007434: e3500000 cmp r0, #0
30007438: 0a00000b beq 3000746c <rtems_io_register_driver+0x144>
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
3000743c: eb0006b4 bl 30008f14 <_Thread_Enable_dispatch>
return RTEMS_RESOURCE_IN_USE;
30007440: e3a0000c mov r0, #12
30007444: e8bd8030 pop {r4, r5, pc}
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
30007448: e591c004 ldr ip, [r1, #4]
3000744c: e35c0000 cmp ip, #0
30007450: 1affffc5 bne 3000736c <rtems_io_register_driver+0x44>
if ( driver_table == NULL )
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
30007454: e3a00009 mov r0, #9
30007458: e8bd8030 pop {r4, r5, pc}
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
3000745c: e5824000 str r4, [r2] <== NOT EXECUTED
if ( major == 0 ) {
rtems_status_code sc = rtems_io_obtain_major_number( registered_major );
if ( sc != RTEMS_SUCCESSFUL ) {
_Thread_Enable_dispatch();
30007460: eb0006ab bl 30008f14 <_Thread_Enable_dispatch>
*major = m;
if ( m != n )
return RTEMS_SUCCESSFUL;
return RTEMS_TOO_MANY;
30007464: e3a00005 mov r0, #5
if ( major == 0 ) {
rtems_status_code sc = rtems_io_obtain_major_number( registered_major );
if ( sc != RTEMS_SUCCESSFUL ) {
_Thread_Enable_dispatch();
return sc;
30007468: e8bd8030 pop {r4, r5, pc}
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
3000746c: e5933004 ldr r3, [r3, #4]
30007470: e3530000 cmp r3, #0
30007474: 1afffff0 bne 3000743c <rtems_io_register_driver+0x114>
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
*registered_major = major;
30007478: e5824000 str r4, [r2]
3000747c: eaffffd7 b 300073e0 <rtems_io_register_driver+0xb8>
300021c4 <rtems_libio_init>:
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
{
300021c4: e92d4010 push {r4, lr}
rtems_status_code rc;
uint32_t i;
rtems_libio_t *iop;
if (rtems_libio_number_iops > 0)
300021c8: e59f30b8 ldr r3, [pc, #184] ; 30002288 <rtems_libio_init+0xc4>
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
{
300021cc: e24dd004 sub sp, sp, #4
rtems_status_code rc;
uint32_t i;
rtems_libio_t *iop;
if (rtems_libio_number_iops > 0)
300021d0: e5934000 ldr r4, [r3]
300021d4: e3540000 cmp r4, #0
300021d8: 0a000017 beq 3000223c <rtems_libio_init+0x78>
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
300021dc: e1a00004 mov r0, r4
300021e0: e3a01038 mov r1, #56 ; 0x38
300021e4: ebffff23 bl 30001e78 <calloc>
300021e8: e59f309c ldr r3, [pc, #156] ; 3000228c <rtems_libio_init+0xc8>
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
300021ec: e3500000 cmp r0, #0
uint32_t i;
rtems_libio_t *iop;
if (rtems_libio_number_iops > 0)
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
300021f0: e1a02000 mov r2, r0
300021f4: e5830000 str r0, [r3]
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
300021f8: 0a000020 beq 30002280 <rtems_libio_init+0xbc>
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
300021fc: e59f308c ldr r3, [pc, #140] ; 30002290 <rtems_libio_init+0xcc>
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
30002200: e3540001 cmp r4, #1
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;
30002204: e5830000 str r0, [r3]
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
30002208: 9a000009 bls 30002234 <rtems_libio_init+0x70>
* rtems_libio_init
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
3000220c: e2803038 add r3, r0, #56 ; 0x38
30002210: e3a02001 mov r2, #1
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
iop->data1 = iop + 1;
30002214: e2822001 add r2, r2, #1
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
30002218: e1520004 cmp r2, r4
iop->data1 = iop + 1;
3000221c: e5033004 str r3, [r3, #-4]
30002220: e2833038 add r3, r3, #56 ; 0x38
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
30002224: 1afffffa bne 30002214 <rtems_libio_init+0x50>
* rtems_libio_init
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
30002228: e2422001 sub r2, r2, #1
3000222c: e0622182 rsb r2, r2, r2, lsl #3
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
30002230: e0802182 add r2, r0, r2, lsl #3
iop->data1 = iop + 1;
iop->data1 = NULL;
30002234: e3a03000 mov r3, #0
30002238: e5823034 str r3, [r2, #52] ; 0x34
/*
* Create the binary semaphore used to provide mutual exclusion
* on the IOP Table.
*/
rc = rtems_semaphore_create(
3000223c: e59fc050 ldr ip, [pc, #80] ; 30002294 <rtems_libio_init+0xd0>
30002240: e59f0050 ldr r0, [pc, #80] ; 30002298 <rtems_libio_init+0xd4>
30002244: e3a01001 mov r1, #1
30002248: e3a02054 mov r2, #84 ; 0x54
3000224c: e3a03000 mov r3, #0
30002250: e58dc000 str ip, [sp]
30002254: eb000c87 bl 30005478 <rtems_semaphore_create>
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_libio_semaphore
);
if ( rc != RTEMS_SUCCESSFUL )
30002258: e3500000 cmp r0, #0
3000225c: 1a000006 bne 3000227c <rtems_libio_init+0xb8>
/*
* Initialize the base file system infrastructure.
*/
if (rtems_fs_init_helper)
30002260: e59f3034 ldr r3, [pc, #52] ; 3000229c <rtems_libio_init+0xd8>
30002264: e5933000 ldr r3, [r3]
30002268: e3530000 cmp r3, #0
(* rtems_fs_init_helper)();
3000226c: 11a0e00f movne lr, pc
30002270: 112fff13 bxne r3
}
30002274: e28dd004 add sp, sp, #4
30002278: e8bd8010 pop {r4, pc}
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_libio_semaphore
);
if ( rc != RTEMS_SUCCESSFUL )
rtems_fatal_error_occurred( rc );
3000227c: eb000ebb bl 30005d70 <rtems_fatal_error_occurred> <== NOT EXECUTED
if (rtems_libio_number_iops > 0)
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
30002280: e280001a add r0, r0, #26
30002284: eb000eb9 bl 30005d70 <rtems_fatal_error_occurred>
300035f4 <rtems_libio_set_private_env>:
}
}
rtems_status_code rtems_libio_set_private_env(void)
{
300035f4: 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);
300035f8: e3a00000 mov r0, #0
free(env);
}
}
rtems_status_code rtems_libio_set_private_env(void)
{
300035fc: e24dd01c sub sp, sp, #28
rtems_status_code sc;
rtems_id task_id;
rtems_filesystem_location_info_t loc;
sc=rtems_task_ident(RTEMS_SELF,0,&task_id);
30003600: e1a01000 mov r1, r0
30003604: e28d2018 add r2, sp, #24
30003608: eb000b6f bl 300063cc <rtems_task_ident>
if (sc != RTEMS_SUCCESSFUL) return sc;
3000360c: e2508000 subs r8, r0, #0
30003610: 1a000025 bne 300036ac <rtems_libio_set_private_env+0xb8>
/* Only for the first time a malloc is necesary */
if (rtems_current_user_env==&rtems_global_user_env) {
30003614: e59f60dc ldr r6, [pc, #220] ; 300036f8 <rtems_libio_set_private_env+0x104>
30003618: e59f30dc ldr r3, [pc, #220] ; 300036fc <rtems_libio_set_private_env+0x108>
3000361c: e5967000 ldr r7, [r6]
30003620: e1570003 cmp r7, r3
30003624: 0a000023 beq 300036b8 <rtems_libio_set_private_env+0xc4>
return sc;
}
rtems_current_user_env = tmp;
}
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
30003628: e59f10cc ldr r1, [pc, #204] ; 300036fc <rtems_libio_set_private_env+0x108>
3000362c: e3a02048 mov r2, #72 ; 0x48
30003630: e1a00007 mov r0, r7
30003634: eb002d76 bl 3000ec14 <memcpy>
rtems_current_user_env->task_id=task_id; /* mark the local values*/
30003638: e59d3018 ldr r3, [sp, #24]
* what we are trying to do here is forking off
* clones. The reason is a pathloc can be allocated by the
* file system and needs to be freed when deleting the environment.
*/
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
3000363c: e28d4004 add r4, sp, #4
30003640: e3a05000 mov r5, #0
}
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*/
30003644: e5873000 str r3, [r7]
* what we are trying to do here is forking off
* clones. The reason is a pathloc can be allocated by the
* file system and needs to be freed when deleting the environment.
*/
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
30003648: e3a01001 mov r1, #1
3000364c: e1a03004 mov r3, r4
30003650: e1a02005 mov r2, r5
30003654: e59f00a4 ldr r0, [pc, #164] ; 30003700 <rtems_libio_set_private_env+0x10c>
30003658: e58d5000 str r5, [sp]
3000365c: ebfffb2f bl 30002320 <rtems_filesystem_evaluate_path>
rtems_filesystem_root = loc;
30003660: e596c000 ldr ip, [r6]
30003664: e1a07004 mov r7, r4
30003668: e28cc018 add ip, ip, #24
3000366c: e8b7000f ldm r7!, {r0, r1, r2, r3}
30003670: e597e000 ldr lr, [r7]
30003674: e8ac000f stmia ip!, {r0, r1, r2, r3}
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
30003678: e3a01001 mov r1, #1
* clones. The reason is a pathloc can be allocated by the
* file system and needs to be freed when deleting the environment.
*/
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
3000367c: e58ce000 str lr, [ip]
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
30003680: e1a02005 mov r2, r5
30003684: e1a03004 mov r3, r4
30003688: e59f0070 ldr r0, [pc, #112] ; 30003700 <rtems_libio_set_private_env+0x10c>
3000368c: e58d5000 str r5, [sp]
30003690: ebfffb22 bl 30002320 <rtems_filesystem_evaluate_path>
rtems_filesystem_current = loc;
30003694: e8b4000f ldm r4!, {r0, r1, r2, r3}
30003698: e596c000 ldr ip, [r6]
3000369c: e5974000 ldr r4, [r7]
300036a0: e28cc004 add ip, ip, #4
300036a4: e8ac000f stmia ip!, {r0, r1, r2, r3}
300036a8: e58c4000 str r4, [ip]
return RTEMS_SUCCESSFUL;
}
300036ac: e1a00008 mov r0, r8
300036b0: e28dd01c add sp, sp, #28
300036b4: 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));
300036b8: e3a00048 mov r0, #72 ; 0x48
300036bc: ebfffd06 bl 30002adc <malloc>
if (!tmp)
300036c0: e2507000 subs r7, r0, #0
return RTEMS_NO_MEMORY;
300036c4: 03a0801a moveq r8, #26
if (sc != RTEMS_SUCCESSFUL) return sc;
/* Only for the first time a malloc is necesary */
if (rtems_current_user_env==&rtems_global_user_env) {
rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t));
if (!tmp)
300036c8: 0afffff7 beq 300036ac <rtems_libio_set_private_env+0xb8>
#ifdef HAVE_USERENV_REFCNT
tmp->refcnt = 1;
#endif
sc = rtems_task_variable_add(
300036cc: e1a00008 mov r0, r8
300036d0: e1a01006 mov r1, r6
300036d4: e59f2028 ldr r2, [pc, #40] ; 30003704 <rtems_libio_set_private_env+0x110>
300036d8: eb000b90 bl 30006520 <rtems_task_variable_add>
RTEMS_SELF,
(void*)&rtems_current_user_env,
(void(*)(void *))free_user_env
);
if (sc != RTEMS_SUCCESSFUL) {
300036dc: e2504000 subs r4, r0, #0
* not initialized yet
*/
free(tmp);
return sc;
}
rtems_current_user_env = tmp;
300036e0: 05867000 streq r7, [r6]
sc = rtems_task_variable_add(
RTEMS_SELF,
(void*)&rtems_current_user_env,
(void(*)(void *))free_user_env
);
if (sc != RTEMS_SUCCESSFUL) {
300036e4: 0affffcf beq 30003628 <rtems_libio_set_private_env+0x34>
/* don't use free_user_env because the pathlocs are
* not initialized yet
*/
free(tmp);
300036e8: e1a00007 mov r0, r7 <== NOT EXECUTED
300036ec: ebfffb5b bl 30002460 <free> <== NOT EXECUTED
return sc;
300036f0: e1a08004 mov r8, r4 <== NOT EXECUTED
300036f4: eaffffec b 300036ac <rtems_libio_set_private_env+0xb8> <== NOT EXECUTED
30003708 <rtems_libio_share_private_env>:
* while changing any of those (chdir(), chroot()).
*/
#ifndef HAVE_USERENV_REFCNT
rtems_status_code rtems_libio_share_private_env(rtems_id task_id)
{
30003708: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
3000370c: e1a05000 mov r5, r0 <== NOT EXECUTED
30003710: e24dd008 sub sp, sp, #8 <== 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);
30003714: e3a00000 mov r0, #0 <== NOT EXECUTED
30003718: e1a01000 mov r1, r0 <== NOT EXECUTED
3000371c: e1a0200d mov r2, sp <== NOT EXECUTED
30003720: eb000b29 bl 300063cc <rtems_task_ident> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
30003724: e2503000 subs r3, r0, #0 <== NOT EXECUTED
30003728: 1a000013 bne 3000377c <rtems_libio_share_private_env+0x74> <== NOT EXECUTED
if (rtems_current_user_env->task_id==current_task_id) {
3000372c: e59f407c ldr r4, [pc, #124] ; 300037b0 <rtems_libio_share_private_env+0xa8><== NOT EXECUTED
30003730: e59d3000 ldr r3, [sp] <== NOT EXECUTED
30003734: e5946000 ldr r6, [r4] <== NOT EXECUTED
30003738: e5962000 ldr r2, [r6] <== NOT EXECUTED
3000373c: e1520003 cmp r2, r3 <== NOT EXECUTED
30003740: 0a000010 beq 30003788 <rtems_libio_share_private_env+0x80> <== NOT EXECUTED
rtems_user_env_t *tmp = rtems_current_user_env;
sc = rtems_task_variable_delete(RTEMS_SELF,(void*)&rtems_current_user_env);
if (sc != RTEMS_SUCCESSFUL) return sc;
free_user_env(tmp);
} else {
sc = rtems_task_variable_get(
30003744: e1a00005 mov r0, r5 <== NOT EXECUTED
30003748: e1a01004 mov r1, r4 <== NOT EXECUTED
3000374c: e28d2004 add r2, sp, #4 <== NOT EXECUTED
30003750: eb000bc5 bl 3000666c <rtems_task_variable_get> <== NOT EXECUTED
task_id,(void*)&rtems_current_user_env, (void*)&shared_user_env );
if (sc != RTEMS_SUCCESSFUL)
30003754: e2503000 subs r3, r0, #0 <== NOT EXECUTED
30003758: 1a000005 bne 30003774 <rtems_libio_share_private_env+0x6c> <== NOT EXECUTED
goto bailout;
}
/* AT THIS POINT, rtems_current_user_env is DANGLING */
sc = rtems_task_variable_add(
3000375c: e3a00000 mov r0, #0 <== NOT EXECUTED
30003760: e59f1048 ldr r1, [pc, #72] ; 300037b0 <rtems_libio_share_private_env+0xa8><== NOT EXECUTED
30003764: e59f2048 ldr r2, [pc, #72] ; 300037b4 <rtems_libio_share_private_env+0xac><== NOT EXECUTED
30003768: eb000b6c bl 30006520 <rtems_task_variable_add> <== NOT EXECUTED
RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env);
if (sc != RTEMS_SUCCESSFUL)
3000376c: e2503000 subs r3, r0, #0 <== NOT EXECUTED
30003770: 0a00000b beq 300037a4 <rtems_libio_share_private_env+0x9c> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
bailout:
/* fallback to the global env */
rtems_current_user_env = &rtems_global_user_env;
30003774: e59f203c ldr r2, [pc, #60] ; 300037b8 <rtems_libio_share_private_env+0xb0><== NOT EXECUTED
30003778: e5842000 str r2, [r4] <== NOT EXECUTED
return sc;
}
3000377c: e1a00003 mov r0, r3 <== NOT EXECUTED
30003780: e28dd008 add sp, sp, #8 <== NOT EXECUTED
30003784: 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);
30003788: e1a01004 mov r1, r4 <== NOT EXECUTED
3000378c: eb000b8f bl 300065d0 <rtems_task_variable_delete> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
30003790: e2503000 subs r3, r0, #0 <== NOT EXECUTED
30003794: 1afffff8 bne 3000377c <rtems_libio_share_private_env+0x74> <== NOT EXECUTED
free_user_env(tmp);
30003798: e1a00006 mov r0, r6 <== NOT EXECUTED
3000379c: ebffff87 bl 300035c0 <free_user_env> <== NOT EXECUTED
300037a0: eaffffed b 3000375c <rtems_libio_share_private_env+0x54> <== NOT EXECUTED
RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env);
if (sc != RTEMS_SUCCESSFUL)
goto bailout;
/* the current_user_env is the same pointer that remote env */
rtems_current_user_env = shared_user_env;
300037a4: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED
300037a8: e5842000 str r2, [r4] <== NOT EXECUTED
/* increase the reference count */
#ifdef HAVE_USERENV_REFCNT
rtems_current_user_env->refcnt++;
#endif
return RTEMS_SUCCESSFUL;
300037ac: eafffff2 b 3000377c <rtems_libio_share_private_env+0x74> <== NOT EXECUTED
3000a158 <rtems_libio_to_fcntl_flags>:
uint32_t flags
)
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
3000a158: e2002006 and r2, r0, #6
3000a15c: e3520006 cmp r2, #6
*/
uint32_t rtems_libio_to_fcntl_flags(
uint32_t flags
)
{
3000a160: e1a03000 mov r3, r0
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
fcntl_flags |= O_RDWR;
3000a164: 03a00002 moveq r0, #2
uint32_t flags
)
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
3000a168: 0a000002 beq 3000a178 <rtems_libio_to_fcntl_flags+0x20>
fcntl_flags |= O_RDWR;
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
3000a16c: e3130002 tst r3, #2
fcntl_flags |= O_RDONLY;
3000a170: 13a00000 movne r0, #0
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
fcntl_flags |= O_RDWR;
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
3000a174: 0a000006 beq 3000a194 <rtems_libio_to_fcntl_flags+0x3c>
fcntl_flags |= O_RDONLY;
} else if ( (flags & LIBIO_FLAGS_WRITE) == LIBIO_FLAGS_WRITE) {
fcntl_flags |= O_WRONLY;
}
if ( (flags & LIBIO_FLAGS_NO_DELAY) == LIBIO_FLAGS_NO_DELAY ) {
3000a178: e3130001 tst r3, #1
fcntl_flags |= O_NONBLOCK;
3000a17c: 13800901 orrne r0, r0, #16384 ; 0x4000
}
if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) {
3000a180: e3130c02 tst r3, #512 ; 0x200
fcntl_flags |= O_APPEND;
3000a184: 13800008 orrne r0, r0, #8
}
if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) {
3000a188: e3130b01 tst r3, #1024 ; 0x400
fcntl_flags |= O_CREAT;
3000a18c: 13800c02 orrne r0, r0, #512 ; 0x200
}
return fcntl_flags;
}
3000a190: e12fff1e bx lr
)
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
fcntl_flags |= O_RDWR;
3000a194: e3130004 tst r3, #4 <== NOT EXECUTED
3000a198: 03a00000 moveq r0, #0 <== NOT EXECUTED
3000a19c: 13a00001 movne r0, #1 <== NOT EXECUTED
3000a1a0: eafffff4 b 3000a178 <rtems_libio_to_fcntl_flags+0x20> <== NOT EXECUTED
3000ccb0 <rtems_mkdir>:
return (retval);
}
int
rtems_mkdir(const char *path, mode_t mode)
{
3000ccb0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
3000ccb4: e24dd048 sub sp, sp, #72 ; 0x48
3000ccb8: e1a0a001 mov sl, r1
int success = 0;
char *dup_path = strdup(path);
3000ccbc: eb000ecf bl 30010800 <strdup>
if (dup_path != NULL) {
3000ccc0: e2506000 subs r6, r0, #0
3000ccc4: 0a000054 beq 3000ce1c <rtems_mkdir+0x16c>
char *p;
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
3000ccc8: e5d63000 ldrb r3, [r6]
3000cccc: e3a07000 mov r7, #0
3000ccd0: e353002f cmp r3, #47 ; 0x2f
++p;
3000ccd4: 05d63001 ldrbeq r3, [r6, #1]
3000ccd8: 02865001 addeq r5, r6, #1
char *p;
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
3000ccdc: 11a05006 movne r5, r6
3000cce0: e3a02001 mov r2, #1
retval = 0;
break;
}
}
if (!last)
*p = '/';
3000cce4: e3a0802f mov r8, #47 ; 0x2f
3000cce8: e1a09007 mov r9, r7
}
if (last)
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
if (errno == EEXIST || errno == EISDIR) {
if (stat(path, &sb) < 0) {
3000ccec: e1a0b00d mov fp, sp
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
3000ccf0: e3530000 cmp r3, #0
last = 1;
else if (p[0] != '/')
continue;
*p = '\0';
3000ccf4: 05c53000 strbeq r3, [r5]
3000ccf8: 03a04001 moveq r4, #1
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
3000ccfc: 0a000006 beq 3000cd1c <rtems_mkdir+0x6c>
last = 1;
else if (p[0] != '/')
3000cd00: e353002f cmp r3, #47 ; 0x2f
retval = 0;
break;
}
}
if (!last)
*p = '/';
3000cd04: 15f53001 ldrbne r3, [r5, #1]!
3000cd08: 1afffff8 bne 3000ccf0 <rtems_mkdir+0x40>
if (p[0] == '\0')
last = 1;
else if (p[0] != '/')
continue;
*p = '\0';
if (!last && p[1] == '\0')
3000cd0c: e5d54001 ldrb r4, [r5, #1]
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
last = 1;
else if (p[0] != '/')
continue;
*p = '\0';
3000cd10: e5c59000 strb r9, [r5]
if (!last && p[1] == '\0')
3000cd14: e2744001 rsbs r4, r4, #1
3000cd18: 33a04000 movcc r4, #0
last = 1;
if (first) {
3000cd1c: e3520000 cmp r2, #0
3000cd20: 1a000030 bne 3000cde8 <rtems_mkdir+0x138>
oumask = umask(0);
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
first = 0;
}
if (last)
3000cd24: e3540000 cmp r4, #0
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
3000cd28: 059f1124 ldreq r1, [pc, #292] ; 3000ce54 <rtems_mkdir+0x1a4>
oumask = umask(0);
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
first = 0;
}
if (last)
3000cd2c: 1a000011 bne 3000cd78 <rtems_mkdir+0xc8>
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
3000cd30: e1a00006 mov r0, r6
3000cd34: ebffdb8a bl 30003b64 <mkdir>
3000cd38: e3500000 cmp r0, #0
3000cd3c: ba000014 blt 3000cd94 <rtems_mkdir+0xe4>
} else {
retval = 0;
break;
}
}
if (!last)
3000cd40: e3540000 cmp r4, #0
3000cd44: 0a000007 beq 3000cd68 <rtems_mkdir+0xb8>
3000cd48: e3a04001 mov r4, #1
int success = 0;
char *dup_path = strdup(path);
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
3000cd4c: e1a00006 mov r0, r6
3000cd50: ebffd99d bl 300033cc <free>
}
return success != 0 ? 0 : -1;
3000cd54: e3540000 cmp r4, #0
3000cd58: 13a00000 movne r0, #0
3000cd5c: 0a00002e beq 3000ce1c <rtems_mkdir+0x16c>
}
3000cd60: e28dd048 add sp, sp, #72 ; 0x48
3000cd64: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
retval = 0;
break;
}
}
if (!last)
*p = '/';
3000cd68: e5c58000 strb r8, [r5]
3000cd6c: e3a02000 mov r2, #0
3000cd70: e5f53001 ldrb r3, [r5, #1]!
3000cd74: eaffffdd b 3000ccf0 <rtems_mkdir+0x40>
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
first = 0;
}
if (last)
(void)umask(oumask);
3000cd78: e1a00007 mov r0, r7
3000cd7c: eb00005c bl 3000cef4 <umask>
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
3000cd80: e1a0100a mov r1, sl
3000cd84: e1a00006 mov r0, r6
3000cd88: ebffdb75 bl 30003b64 <mkdir>
3000cd8c: e3500000 cmp r0, #0
3000cd90: aaffffea bge 3000cd40 <rtems_mkdir+0x90>
if (errno == EEXIST || errno == EISDIR) {
3000cd94: eb000ab1 bl 3000f860 <__errno>
3000cd98: e5903000 ldr r3, [r0]
3000cd9c: e3530011 cmp r3, #17
3000cda0: 0a000003 beq 3000cdb4 <rtems_mkdir+0x104>
3000cda4: eb000aad bl 3000f860 <__errno> <== NOT EXECUTED
3000cda8: e5903000 ldr r3, [r0] <== NOT EXECUTED
3000cdac: e3530015 cmp r3, #21 <== NOT EXECUTED
3000cdb0: 1a000024 bne 3000ce48 <rtems_mkdir+0x198> <== NOT EXECUTED
if (stat(path, &sb) < 0) {
3000cdb4: e1a00006 mov r0, r6
3000cdb8: e1a0100d mov r1, sp
3000cdbc: eb000025 bl 3000ce58 <stat>
3000cdc0: e3500000 cmp r0, #0
3000cdc4: ba00001f blt 3000ce48 <rtems_mkdir+0x198>
retval = 0;
break;
} else if (!S_ISDIR(sb.st_mode)) {
3000cdc8: e59d300c ldr r3, [sp, #12]
3000cdcc: e2033a0f and r3, r3, #61440 ; 0xf000
3000cdd0: e3530901 cmp r3, #16384 ; 0x4000
3000cdd4: 1a000012 bne 3000ce24 <rtems_mkdir+0x174>
else
errno = ENOTDIR;
retval = 0;
break;
}
if (last)
3000cdd8: e3540000 cmp r4, #0
3000cddc: 0affffe1 beq 3000cd68 <rtems_mkdir+0xb8>
retval = 2;
3000cde0: e3a04002 mov r4, #2
3000cde4: eaffffd8 b 3000cd4c <rtems_mkdir+0x9c>
* mkdir [-m mode] dir
*
* We change the user's umask and then restore it,
* instead of doing chmod's.
*/
oumask = umask(0);
3000cde8: e3a00000 mov r0, #0
3000cdec: eb000040 bl 3000cef4 <umask>
3000cdf0: e1a07000 mov r7, r0
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
3000cdf4: e3c000c0 bic r0, r0, #192 ; 0xc0
3000cdf8: eb00003d bl 3000cef4 <umask>
3000cdfc: eaffffc8 b 3000cd24 <rtems_mkdir+0x74>
break;
} else if (!S_ISDIR(sb.st_mode)) {
if (last)
errno = EEXIST;
else
errno = ENOTDIR;
3000ce00: eb000a96 bl 3000f860 <__errno> <== NOT EXECUTED
3000ce04: e3a03014 mov r3, #20 <== NOT EXECUTED
3000ce08: e5803000 str r3, [r0] <== NOT EXECUTED
}
if (!last)
*p = '/';
}
if (!first && !last)
(void)umask(oumask);
3000ce0c: e1a00007 mov r0, r7 <== NOT EXECUTED
3000ce10: eb000037 bl 3000cef4 <umask> <== NOT EXECUTED
int success = 0;
char *dup_path = strdup(path);
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
3000ce14: e1a00006 mov r0, r6 <== NOT EXECUTED
3000ce18: ebffd96b bl 300033cc <free> <== NOT EXECUTED
}
return success != 0 ? 0 : -1;
3000ce1c: e3e00000 mvn r0, #0 <== NOT EXECUTED
3000ce20: eaffffce b 3000cd60 <rtems_mkdir+0xb0> <== NOT EXECUTED
if (errno == EEXIST || errno == EISDIR) {
if (stat(path, &sb) < 0) {
retval = 0;
break;
} else if (!S_ISDIR(sb.st_mode)) {
if (last)
3000ce24: e3540000 cmp r4, #0
3000ce28: 0afffff4 beq 3000ce00 <rtems_mkdir+0x150>
errno = EEXIST;
3000ce2c: eb000a8b bl 3000f860 <__errno>
3000ce30: e3a03011 mov r3, #17
3000ce34: e5803000 str r3, [r0]
int success = 0;
char *dup_path = strdup(path);
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
3000ce38: e1a00006 mov r0, r6
3000ce3c: ebffd962 bl 300033cc <free>
}
return success != 0 ? 0 : -1;
3000ce40: e3e00000 mvn r0, #0
3000ce44: eaffffc5 b 3000cd60 <rtems_mkdir+0xb0>
}
}
if (!last)
*p = '/';
}
if (!first && !last)
3000ce48: e3540000 cmp r4, #0 <== NOT EXECUTED
3000ce4c: 0affffee beq 3000ce0c <rtems_mkdir+0x15c> <== NOT EXECUTED
3000ce50: eaffffef b 3000ce14 <rtems_mkdir+0x164> <== NOT EXECUTED
300059e8 <rtems_object_get_api_class_name>:
)
{
const rtems_assoc_t *api_assoc;
const rtems_assoc_t *class_assoc;
if ( the_api == OBJECTS_INTERNAL_API )
300059e8: e3500001 cmp r0, #1
const char *rtems_object_get_api_class_name(
int the_api,
int the_class
)
{
300059ec: e52de004 push {lr} ; (str lr, [sp, #-4]!)
const rtems_assoc_t *api_assoc;
const rtems_assoc_t *class_assoc;
if ( the_api == OBJECTS_INTERNAL_API )
300059f0: 0a00000d beq 30005a2c <rtems_object_get_api_class_name+0x44>
api_assoc = rtems_object_api_internal_assoc;
else if ( the_api == OBJECTS_CLASSIC_API )
300059f4: e3500002 cmp r0, #2
300059f8: 0a000004 beq 30005a10 <rtems_object_get_api_class_name+0x28>
api_assoc = rtems_object_api_classic_assoc;
#ifdef RTEMS_POSIX_API
else if ( the_api == OBJECTS_POSIX_API )
300059fc: e3500003 cmp r0, #3
api_assoc = rtems_object_api_posix_assoc;
30005a00: 059f003c ldreq r0, [pc, #60] ; 30005a44 <rtems_object_get_api_class_name+0x5c>
if ( the_api == OBJECTS_INTERNAL_API )
api_assoc = rtems_object_api_internal_assoc;
else if ( the_api == OBJECTS_CLASSIC_API )
api_assoc = rtems_object_api_classic_assoc;
#ifdef RTEMS_POSIX_API
else if ( the_api == OBJECTS_POSIX_API )
30005a04: 0a000002 beq 30005a14 <rtems_object_get_api_class_name+0x2c>
api_assoc = rtems_object_api_posix_assoc;
#endif
else
return "BAD API";
30005a08: e59f0038 ldr r0, [pc, #56] ; 30005a48 <rtems_object_get_api_class_name+0x60>
30005a0c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
const rtems_assoc_t *class_assoc;
if ( the_api == OBJECTS_INTERNAL_API )
api_assoc = rtems_object_api_internal_assoc;
else if ( the_api == OBJECTS_CLASSIC_API )
api_assoc = rtems_object_api_classic_assoc;
30005a10: e59f0034 ldr r0, [pc, #52] ; 30005a4c <rtems_object_get_api_class_name+0x64>
else if ( the_api == OBJECTS_POSIX_API )
api_assoc = rtems_object_api_posix_assoc;
#endif
else
return "BAD API";
class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class );
30005a14: eb001345 bl 3000a730 <rtems_assoc_ptr_by_local>
if ( class_assoc )
30005a18: e3500000 cmp r0, #0
return class_assoc->name;
30005a1c: 15900000 ldrne r0, [r0]
api_assoc = rtems_object_api_posix_assoc;
#endif
else
return "BAD API";
class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class );
if ( class_assoc )
30005a20: 149df004 popne {pc} ; (ldrne pc, [sp], #4)
return class_assoc->name;
return "BAD CLASS";
30005a24: e59f0024 ldr r0, [pc, #36] ; 30005a50 <rtems_object_get_api_class_name+0x68>
}
30005a28: e49df004 pop {pc} ; (ldr pc, [sp], #4)
{
const rtems_assoc_t *api_assoc;
const rtems_assoc_t *class_assoc;
if ( the_api == OBJECTS_INTERNAL_API )
api_assoc = rtems_object_api_internal_assoc;
30005a2c: e59f0020 ldr r0, [pc, #32] ; 30005a54 <rtems_object_get_api_class_name+0x6c>
else if ( the_api == OBJECTS_POSIX_API )
api_assoc = rtems_object_api_posix_assoc;
#endif
else
return "BAD API";
class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class );
30005a30: eb00133e bl 3000a730 <rtems_assoc_ptr_by_local>
if ( class_assoc )
30005a34: e3500000 cmp r0, #0
return class_assoc->name;
30005a38: 15900000 ldrne r0, [r0]
api_assoc = rtems_object_api_posix_assoc;
#endif
else
return "BAD API";
class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class );
if ( class_assoc )
30005a3c: 149df004 popne {pc} ; (ldrne pc, [sp], #4)
30005a40: eafffff7 b 30005a24 <rtems_object_get_api_class_name+0x3c> <== NOT EXECUTED
30001c6c <rtems_print_buffer>:
void rtems_print_buffer(
const unsigned char *buffer,
int length
)
{
30001c6c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
int i, mod, max;
if ( !length ) return;
30001c70: e3510000 cmp r1, #0
void rtems_print_buffer(
const unsigned char *buffer,
int length
)
{
30001c74: e24dd078 sub sp, sp, #120 ; 0x78
30001c78: e1a0b000 mov fp, r0
int i, mod, max;
if ( !length ) return;
30001c7c: 0a000037 beq 30001d60 <rtems_print_buffer+0xf4>
mod = length % 16;
30001c80: e1a03fc1 asr r3, r1, #31
30001c84: e1a03e23 lsr r3, r3, #28
30001c88: e081a003 add sl, r1, r3
30001c8c: e20aa00f and sl, sl, #15
30001c90: e063a00a rsb sl, r3, sl
max = length - mod;
30001c94: e06a9001 rsb r9, sl, r1
for ( i=0 ; i<max ; i+=16 )
30001c98: e3590000 cmp r9, #0
30001c9c: da00002d ble 30001d58 <rtems_print_buffer+0xec>
30001ca0: e59f71f4 ldr r7, [pc, #500] ; 30001e9c <rtems_print_buffer+0x230>
30001ca4: e3a08000 mov r8, #0
30001ca8: e1a0400d mov r4, sp
{
int i;
char line_buffer[120];
line_buffer[0] = '\0';
30001cac: e3a03000 mov r3, #0
static inline void Dump_Line(
const unsigned char *buffer,
int length
);
void rtems_print_buffer(
30001cb0: e08b6008 add r6, fp, r8
{
int i;
char line_buffer[120];
line_buffer[0] = '\0';
30001cb4: e5cd3000 strb r3, [sp]
for( i=0 ; i<length ; i++ )
30001cb8: e3a05000 mov r5, #0
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
30001cbc: e7d63005 ldrb r3, [r6, r5]
30001cc0: e1a0000d mov r0, sp
30001cc4: e59f11d4 ldr r1, [pc, #468] ; 30001ea0 <rtems_print_buffer+0x234>
30001cc8: e1a0200d mov r2, sp
int i;
char line_buffer[120];
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
30001ccc: e2855001 add r5, r5, #1
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
30001cd0: eb0034a7 bl 3000ef74 <sprintf>
int i;
char line_buffer[120];
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
30001cd4: e3550010 cmp r5, #16
30001cd8: 1afffff7 bne 30001cbc <rtems_print_buffer+0x50>
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
30001cdc: e1a0000d mov r0, sp
30001ce0: eb0035da bl 3000f450 <strlen>
30001ce4: e59f11b8 ldr r1, [pc, #440] ; 30001ea4 <rtems_print_buffer+0x238>
30001ce8: e0840000 add r0, r4, r0
30001cec: e3a02002 mov r2, #2
30001cf0: eb003408 bl 3000ed18 <memcpy>
for( i=0 ; i<length ; i++ )
30001cf4: e3a05000 mov r5, #0
sprintf( line_buffer, "%s%c", line_buffer,
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
30001cf8: e7d63005 ldrb r3, [r6, r5]
30001cfc: e5972000 ldr r2, [r7]
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%c", line_buffer,
30001d00: e1a0000d mov r0, sp
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
30001d04: e0822003 add r2, r2, r3
30001d08: e5d22001 ldrb r2, [r2, #1]
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%c", line_buffer,
30001d0c: e59f1194 ldr r1, [pc, #404] ; 30001ea8 <rtems_print_buffer+0x23c>
30001d10: e3120097 tst r2, #151 ; 0x97
30001d14: 03a0302e moveq r3, #46 ; 0x2e
30001d18: e1a0200d mov r2, sp
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
30001d1c: e2855001 add r5, r5, #1
sprintf( line_buffer, "%s%c", line_buffer,
30001d20: eb003493 bl 3000ef74 <sprintf>
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
30001d24: e3550010 cmp r5, #16
30001d28: 1afffff2 bne 30001cf8 <rtems_print_buffer+0x8c>
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|\n" );
30001d2c: e1a0000d mov r0, sp
30001d30: eb0035c6 bl 3000f450 <strlen>
30001d34: e59f1170 ldr r1, [pc, #368] ; 30001eac <rtems_print_buffer+0x240>
30001d38: e3a02003 mov r2, #3
30001d3c: e0840000 add r0, r4, r0
30001d40: eb0033f4 bl 3000ed18 <memcpy>
mod = length % 16;
max = length - mod;
for ( i=0 ; i<max ; i+=16 )
30001d44: e2888010 add r8, r8, #16
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|\n" );
printk( line_buffer );
30001d48: e1a0000d mov r0, sp
30001d4c: eb00073d bl 30003a48 <printk>
mod = length % 16;
max = length - mod;
for ( i=0 ; i<max ; i+=16 )
30001d50: e1590008 cmp r9, r8
30001d54: caffffd4 bgt 30001cac <rtems_print_buffer+0x40>
Dump_Line( &buffer[ i ], 16 );
if ( mod )
30001d58: e35a0000 cmp sl, #0
30001d5c: 1a000001 bne 30001d68 <rtems_print_buffer+0xfc>
Dump_Line( &buffer[ max ], mod );
}
30001d60: e28dd078 add sp, sp, #120 ; 0x78
30001d64: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
{
int i;
char line_buffer[120];
line_buffer[0] = '\0';
30001d68: e3a05000 mov r5, #0
for ( i=0 ; i<max ; i+=16 )
Dump_Line( &buffer[ i ], 16 );
if ( mod )
Dump_Line( &buffer[ max ], mod );
30001d6c: e08b9009 add r9, fp, r9
{
int i;
char line_buffer[120];
line_buffer[0] = '\0';
30001d70: e5cd5000 strb r5, [sp]
30001d74: d1a0400d movle r4, sp
for( i=0 ; i<length ; i++ )
30001d78: da00000b ble 30001dac <rtems_print_buffer+0x140>
30001d7c: e1a0400d mov r4, sp
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
30001d80: e7d93005 ldrb r3, [r9, r5]
30001d84: e1a0000d mov r0, sp
30001d88: e59f1110 ldr r1, [pc, #272] ; 30001ea0 <rtems_print_buffer+0x234>
30001d8c: e1a0200d mov r2, sp
int i;
char line_buffer[120];
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
30001d90: e2855001 add r5, r5, #1
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
30001d94: eb003476 bl 3000ef74 <sprintf>
int i;
char line_buffer[120];
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
30001d98: e15a0005 cmp sl, r5
30001d9c: cafffff7 bgt 30001d80 <rtems_print_buffer+0x114>
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
for( ; i<16 ; i++ )
30001da0: e35a000f cmp sl, #15
30001da4: d1a0500a movle r5, sl
30001da8: ca000034 bgt 30001e80 <rtems_print_buffer+0x214>
strcat( line_buffer, " " );
30001dac: e1a0000d mov r0, sp
30001db0: eb0035a6 bl 3000f450 <strlen>
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
for( ; i<16 ; i++ )
30001db4: e2855001 add r5, r5, #1
strcat( line_buffer, " " );
30001db8: e59f10f0 ldr r1, [pc, #240] ; 30001eb0 <rtems_print_buffer+0x244>
30001dbc: e0840000 add r0, r4, r0
30001dc0: e3a02004 mov r2, #4
30001dc4: eb0033d3 bl 3000ed18 <memcpy>
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
for( ; i<16 ; i++ )
30001dc8: e355000f cmp r5, #15
30001dcc: dafffff6 ble 30001dac <rtems_print_buffer+0x140>
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
30001dd0: e1a0000d mov r0, sp
30001dd4: eb00359d bl 3000f450 <strlen>
30001dd8: e59f10c4 ldr r1, [pc, #196] ; 30001ea4 <rtems_print_buffer+0x238>
30001ddc: e0840000 add r0, r4, r0
30001de0: e3a02002 mov r2, #2
30001de4: eb0033cb bl 3000ed18 <memcpy>
for( i=0 ; i<length ; i++ )
30001de8: e35a0000 cmp sl, #0
30001dec: d3a0a000 movle sl, #0
30001df0: da000010 ble 30001e38 <rtems_print_buffer+0x1cc>
30001df4: e59f70a0 ldr r7, [pc, #160] ; 30001e9c <rtems_print_buffer+0x230>
30001df8: e3a05000 mov r5, #0
sprintf( line_buffer, "%s%c", line_buffer,
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
30001dfc: e7d93005 ldrb r3, [r9, r5]
30001e00: e5972000 ldr r2, [r7]
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%c", line_buffer,
30001e04: e1a0000d mov r0, sp
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
30001e08: e0822003 add r2, r2, r3
30001e0c: e5d22001 ldrb r2, [r2, #1]
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%c", line_buffer,
30001e10: e59f1090 ldr r1, [pc, #144] ; 30001ea8 <rtems_print_buffer+0x23c>
30001e14: e3120097 tst r2, #151 ; 0x97
30001e18: 03a0302e moveq r3, #46 ; 0x2e
30001e1c: e1a0200d mov r2, sp
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
30001e20: e2855001 add r5, r5, #1
sprintf( line_buffer, "%s%c", line_buffer,
30001e24: eb003452 bl 3000ef74 <sprintf>
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
30001e28: e15a0005 cmp sl, r5
30001e2c: cafffff2 bgt 30001dfc <rtems_print_buffer+0x190>
sprintf( line_buffer, "%s%c", line_buffer,
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
for( ; i<16 ; i++ )
30001e30: e35a000f cmp sl, #15
30001e34: ca000008 bgt 30001e5c <rtems_print_buffer+0x1f0>
strcat( line_buffer, " " );
30001e38: e1a0000d mov r0, sp
30001e3c: eb003583 bl 3000f450 <strlen>
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%c", line_buffer,
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
for( ; i<16 ; i++ )
30001e40: e28aa001 add sl, sl, #1
strcat( line_buffer, " " );
30001e44: e59f1068 ldr r1, [pc, #104] ; 30001eb4 <rtems_print_buffer+0x248>
30001e48: e0840000 add r0, r4, r0
30001e4c: e3a02002 mov r2, #2
30001e50: eb0033b0 bl 3000ed18 <memcpy>
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%c", line_buffer,
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
for( ; i<16 ; i++ )
30001e54: e35a000f cmp sl, #15
30001e58: dafffff6 ble 30001e38 <rtems_print_buffer+0x1cc>
strcat( line_buffer, " " );
strcat( line_buffer, "|\n" );
30001e5c: e1a0000d mov r0, sp
30001e60: eb00357a bl 3000f450 <strlen>
30001e64: e59f1040 ldr r1, [pc, #64] ; 30001eac <rtems_print_buffer+0x240>
30001e68: e0840000 add r0, r4, r0
30001e6c: e3a02003 mov r2, #3
30001e70: eb0033a8 bl 3000ed18 <memcpy>
printk( line_buffer );
30001e74: e1a0000d mov r0, sp
30001e78: eb0006f2 bl 30003a48 <printk>
30001e7c: eaffffb7 b 30001d60 <rtems_print_buffer+0xf4>
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
30001e80: e1a0000d mov r0, sp <== NOT EXECUTED
30001e84: eb003571 bl 3000f450 <strlen> <== NOT EXECUTED
30001e88: e59f1014 ldr r1, [pc, #20] ; 30001ea4 <rtems_print_buffer+0x238><== NOT EXECUTED
30001e8c: e0840000 add r0, r4, r0 <== NOT EXECUTED
30001e90: e3a02002 mov r2, #2 <== NOT EXECUTED
30001e94: eb00339f bl 3000ed18 <memcpy> <== NOT EXECUTED
30001e98: eaffffd5 b 30001df4 <rtems_print_buffer+0x188> <== NOT EXECUTED
300018a4 <rtems_stack_checker_is_blown>:
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
300018a4: e92d4800 push {fp, lr}
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
300018a8: e59f3034 ldr r3, [pc, #52] ; 300018e4 <rtems_stack_checker_is_blown+0x40>
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
300018ac: e28db004 add fp, sp, #4
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
300018b0: e5931004 ldr r1, [r3, #4]
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
300018b4: e59120c8 ldr r2, [r1, #200] ; 0xc8
300018b8: e15b0002 cmp fp, r2
300018bc: 3a000003 bcc 300018d0 <rtems_stack_checker_is_blown+0x2c>
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
300018c0: e59110c4 ldr r1, [r1, #196] ; 0xc4
300018c4: e0822001 add r2, r2, r1
300018c8: e15b0002 cmp fp, r2
300018cc: 9a000002 bls 300018dc <rtems_stack_checker_is_blown+0x38>
/*
* Let's report as much as we can.
*/
if ( !sp_ok || !pattern_ok ) {
Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
300018d0: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED
300018d4: e3a01001 mov r1, #1 <== NOT EXECUTED
300018d8: ebffffaa bl 30001788 <Stack_check_report_blown_task> <== NOT EXECUTED
/*
* The Stack Pointer and the Pattern Area are OK so return false.
*/
return false;
}
300018dc: e3a00000 mov r0, #0
300018e0: e8bd8800 pop {fp, pc}
30001948 <rtems_stack_checker_report_usage>:
}
void rtems_stack_checker_report_usage( void )
{
rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin );
30001948: e59f1004 ldr r1, [pc, #4] ; 30001954 <rtems_stack_checker_report_usage+0xc><== NOT EXECUTED
3000194c: e3a00000 mov r0, #0 <== NOT EXECUTED
30001950: eaffffe4 b 300018e8 <rtems_stack_checker_report_usage_with_plugin><== NOT EXECUTED
300018e8 <rtems_stack_checker_report_usage_with_plugin>:
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
300018e8: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
if ( !print )
300018ec: e2515000 subs r5, r1, #0 <== NOT EXECUTED
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
300018f0: e1a06000 mov r6, r0 <== NOT EXECUTED
if ( !print )
300018f4: 08bd8070 popeq {r4, r5, r6, pc} <== NOT EXECUTED
return;
print_context = context;
300018f8: e59f4038 ldr r4, [pc, #56] ; 30001938 <rtems_stack_checker_report_usage_with_plugin+0x50><== NOT EXECUTED
print_handler = print;
(*print)( context, "Stack usage by thread\n");
300018fc: e59f1038 ldr r1, [pc, #56] ; 3000193c <rtems_stack_checker_report_usage_with_plugin+0x54><== NOT EXECUTED
)
{
if ( !print )
return;
print_context = context;
30001900: e5840004 str r0, [r4, #4] <== NOT EXECUTED
print_handler = print;
30001904: e5845000 str r5, [r4] <== NOT EXECUTED
(*print)( context, "Stack usage by thread\n");
30001908: e1a0e00f mov lr, pc <== NOT EXECUTED
3000190c: e12fff15 bx r5 <== NOT EXECUTED
(*print)( context,
30001910: e59f1028 ldr r1, [pc, #40] ; 30001940 <rtems_stack_checker_report_usage_with_plugin+0x58><== NOT EXECUTED
30001914: e1a00006 mov r0, r6 <== NOT EXECUTED
30001918: e1a0e00f mov lr, pc <== NOT EXECUTED
3000191c: e12fff15 bx r5 <== NOT EXECUTED
" ID NAME LOW HIGH CURRENT AVAILABLE USED\n"
);
/* iterate over all threads and dump the usage */
rtems_iterate_over_all_threads( Stack_check_Dump_threads_usage );
30001920: e59f001c ldr r0, [pc, #28] ; 30001944 <rtems_stack_checker_report_usage_with_plugin+0x5c><== NOT EXECUTED
30001924: eb0014e9 bl 30006cd0 <rtems_iterate_over_all_threads> <== NOT EXECUTED
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
/* dump interrupt stack info if any */
Stack_check_Dump_threads_usage((Thread_Control *) -1);
#endif
print_context = NULL;
30001928: e3a03000 mov r3, #0 <== NOT EXECUTED
3000192c: e5843004 str r3, [r4, #4] <== NOT EXECUTED
print_handler = NULL;
30001930: e5843000 str r3, [r4] <== NOT EXECUTED
30001934: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
3000183c <rtems_stack_checker_switch_extension>:
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
3000183c: e92d4810 push {r4, fp, lr}
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;
30001840: e59030c8 ldr r3, [r0, #200] ; 0xc8
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
30001844: e28db008 add fp, sp, #8
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
30001848: e15b0003 cmp fp, r3
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
3000184c: 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;
30001850: e2830008 add r0, r3, #8
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
30001854: 3a000003 bcc 30001868 <rtems_stack_checker_switch_extension+0x2c>
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
30001858: e59420c4 ldr r2, [r4, #196] ; 0xc4
3000185c: e0833002 add r3, r3, r2
30001860: e15b0003 cmp fp, r3
30001864: 9a000006 bls 30001884 <rtems_stack_checker_switch_extension+0x48>
/*
* 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,
30001868: e59f1030 ldr r1, [pc, #48] ; 300018a0 <rtems_stack_checker_switch_extension+0x64><== NOT EXECUTED
3000186c: e3a02010 mov r2, #16 <== NOT EXECUTED
30001870: eb0033af bl 3000e734 <memcmp> <== NOT EXECUTED
30001874: e2701001 rsbs r1, r0, #1 <== NOT EXECUTED
30001878: 33a01000 movcc r1, #0 <== NOT EXECUTED
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
Stack_check_report_blown_task( running, pattern_ok );
3000187c: e1a00004 mov r0, r4 <== NOT EXECUTED
30001880: ebffffc0 bl 30001788 <Stack_check_report_blown_task> <== NOT EXECUTED
/*
* Check for an out of bounds stack pointer or an overwrite
*/
sp_ok = Stack_check_Frame_pointer_in_range( the_stack );
pattern_ok = (!memcmp( pattern,
30001884: e59f1014 ldr r1, [pc, #20] ; 300018a0 <rtems_stack_checker_switch_extension+0x64>
30001888: e3a02010 mov r2, #16
3000188c: eb0033a8 bl 3000e734 <memcmp>
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
30001890: e3500000 cmp r0, #0
30001894: 08bd8810 popeq {r4, fp, pc}
30001898: e3a01000 mov r1, #0 <== NOT EXECUTED
3000189c: eafffff6 b 3000187c <rtems_stack_checker_switch_extension+0x40><== NOT EXECUTED
3000c064 <rtems_string_to_pointer>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
3000c064: e92d40f0 push {r4, r5, r6, r7, lr}
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
3000c068: e2515000 subs r5, r1, #0
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
3000c06c: e1a04000 mov r4, r0
3000c070: e24dd004 sub sp, sp, #4
3000c074: e1a06002 mov r6, r2
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
3000c078: 03a00009 moveq r0, #9
)
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
3000c07c: 0a000013 beq 3000c0d0 <rtems_string_to_pointer+0x6c>
return RTEMS_INVALID_ADDRESS;
errno = 0;
3000c080: eb000b97 bl 3000eee4 <__errno>
3000c084: e3a03000 mov r3, #0
3000c088: e5803000 str r3, [r0]
*n = 0;
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
3000c08c: e1a0100d mov r1, sp
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
3000c090: e5853000 str r3, [r5]
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
3000c094: e1a00004 mov r0, r4
3000c098: e3a02010 mov r2, #16
3000c09c: eb00191d bl 30012518 <strtoul>
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
3000c0a0: e3560000 cmp r6, #0
*endptr = end;
3000c0a4: 159d3000 ldrne r3, [sp]
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
3000c0a8: 059d3000 ldreq r3, [sp]
*endptr = end;
3000c0ac: 15863000 strne r3, [r6]
/* nothing was converted */
if ( end == s )
3000c0b0: e1540003 cmp r4, r3
*n = 0;
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
3000c0b4: e1a07000 mov r7, r0
if ( endptr )
*endptr = end;
/* nothing was converted */
if ( end == s )
return RTEMS_NOT_DEFINED;
3000c0b8: 03a0000b moveq r0, #11
/* If the user wants the end pointer back, then return it. */
if ( endptr )
*endptr = end;
/* nothing was converted */
if ( end == s )
3000c0bc: 0a000003 beq 3000c0d0 <rtems_string_to_pointer+0x6c>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
3000c0c0: e3770001 cmn r7, #1
3000c0c4: 0a000003 beq 3000c0d8 <rtems_string_to_pointer+0x74>
if ( (result == STRING_TO_MIN) && (errno == ERANGE))
return RTEMS_INVALID_NUMBER;
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
3000c0c8: e5857000 str r7, [r5]
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
3000c0cc: e3a00000 mov r0, #0
}
3000c0d0: e28dd004 add sp, sp, #4
3000c0d4: e8bd80f0 pop {r4, r5, r6, r7, pc}
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
3000c0d8: eb000b81 bl 3000eee4 <__errno> <== NOT EXECUTED
3000c0dc: e5903000 ldr r3, [r0] <== NOT EXECUTED
3000c0e0: e3530022 cmp r3, #34 ; 0x22 <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
3000c0e4: 03a0000a moveq r0, #10 <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
3000c0e8: 1afffff6 bne 3000c0c8 <rtems_string_to_pointer+0x64> <== NOT EXECUTED
3000c0ec: eafffff7 b 3000c0d0 <rtems_string_to_pointer+0x6c> <== NOT EXECUTED
30001b50 <rtems_tarfs_load>:
int rtems_tarfs_load(
char *mountpoint,
uint8_t *tar_image,
size_t tar_size
)
{
30001b50: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
30001b54: e24ddf6a sub sp, sp, #424 ; 0x1a8
30001b58: e1a06001 mov r6, r1
30001b5c: e1a07002 mov r7, r2
30001b60: e58d0014 str r0, [sp, #20]
int offset;
unsigned long nblocks;
IMFS_jnode_t *node;
int status;
status = rtems_filesystem_evaluate_path(
30001b64: eb004191 bl 300121b0 <strlen>
30001b68: e28d2e19 add r2, sp, #400 ; 0x190
30001b6c: e1a01000 mov r1, r0
30001b70: e58d2008 str r2, [sp, #8]
30001b74: e59d0014 ldr r0, [sp, #20]
30001b78: e3a02000 mov r2, #0
30001b7c: e28d3e19 add r3, sp, #400 ; 0x190
30001b80: e58d2000 str r2, [sp]
30001b84: eb0002d7 bl 300026e8 <rtems_filesystem_evaluate_path>
strlen(mountpoint),
0,
&root_loc,
0
);
if (status != 0)
30001b88: e3500000 cmp r0, #0
return -1;
30001b8c: 13e02000 mvnne r2, #0
strlen(mountpoint),
0,
&root_loc,
0
);
if (status != 0)
30001b90: e58d0010 str r0, [sp, #16]
return -1;
30001b94: 158d2010 strne r2, [sp, #16]
strlen(mountpoint),
0,
&root_loc,
0
);
if (status != 0)
30001b98: 1a000032 bne 30001c68 <rtems_tarfs_load+0x118>
return -1;
if (root_loc.ops != &IMFS_ops
30001b9c: e59d319c ldr r3, [sp, #412] ; 0x19c
30001ba0: e59f21d0 ldr r2, [pc, #464] ; 30001d78 <rtems_tarfs_load+0x228>
30001ba4: e1530002 cmp r3, r2
30001ba8: 059da010 ldreq sl, [sp, #16]
30001bac: 1a00006a bne 30001d5c <rtems_tarfs_load+0x20c>
/*
* Create an IMFS node structure pointing to tar image memory.
*/
offset = 0;
while (1) {
if (offset + 512 > tar_size)
30001bb0: e28a4c02 add r4, sl, #512 ; 0x200
* should not have this path.
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
30001bb4: e28d3f5f add r3, sp, #380 ; 0x17c
/*
* Create an IMFS node structure pointing to tar image memory.
*/
offset = 0;
while (1) {
if (offset + 512 > tar_size)
30001bb8: e1540007 cmp r4, r7
hdr_ptr = (char *) &tar_image[offset];
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar ", 7))
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
30001bbc: e28d5f46 add r5, sp, #280 ; 0x118
* should not have this path.
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
30001bc0: e58d3004 str r3, [sp, #4]
/*
* Create an IMFS node structure pointing to tar image memory.
*/
offset = 0;
while (1) {
if (offset + 512 > tar_size)
30001bc4: 8a000027 bhi 30001c68 <rtems_tarfs_load+0x118>
break;
/*
* Read a header.
*/
hdr_ptr = (char *) &tar_image[offset];
30001bc8: e086a00a add sl, r6, sl
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar ", 7))
30001bcc: e28a0c01 add r0, sl, #256 ; 0x100
30001bd0: e2800001 add r0, r0, #1
30001bd4: e59f11a0 ldr r1, [pc, #416] ; 30001d7c <rtems_tarfs_load+0x22c>
30001bd8: e3a02007 mov r2, #7
30001bdc: eb00418b bl 30012210 <strncmp>
30001be0: e2508000 subs r8, r0, #0
30001be4: 1a00001f bne 30001c68 <rtems_tarfs_load+0x118>
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
30001be8: e3a02063 mov r2, #99 ; 0x63
30001bec: e1a0100a mov r1, sl
30001bf0: e1a00005 mov r0, r5
30001bf4: eb0041e1 bl 30012380 <strncpy>
filename[MAX_NAME_FIELD_SIZE] = '\0';
30001bf8: e5cd817b strb r8, [sp, #379] ; 0x17b
linkflag = hdr_ptr[156];
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
30001bfc: e3a01008 mov r1, #8
30001c00: e28a0064 add r0, sl, #100 ; 0x64
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
filename[MAX_NAME_FIELD_SIZE] = '\0';
linkflag = hdr_ptr[156];
30001c04: e5dab09c ldrb fp, [sl, #156] ; 0x9c
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
30001c08: eb002039 bl 30009cf4 <_rtems_octal2ulong>
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
30001c0c: e3a0100c mov r1, #12
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
filename[MAX_NAME_FIELD_SIZE] = '\0';
linkflag = hdr_ptr[156];
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
30001c10: e1a09000 mov r9, r0
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
30001c14: e28a007c add r0, sl, #124 ; 0x7c
30001c18: eb002035 bl 30009cf4 <_rtems_octal2ulong>
hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8);
30001c1c: e3a01008 mov r1, #8
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
filename[MAX_NAME_FIELD_SIZE] = '\0';
linkflag = hdr_ptr[156];
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
30001c20: e1a08000 mov r8, r0
hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8);
30001c24: e28a0094 add r0, sl, #148 ; 0x94
30001c28: eb002031 bl 30009cf4 <_rtems_octal2ulong>
30001c2c: e1a03000 mov r3, r0
if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum)
30001c30: e1a0000a mov r0, sl
30001c34: e58d300c str r3, [sp, #12]
30001c38: eb00213a bl 3000a128 <_rtems_tar_header_checksum>
30001c3c: e59d300c ldr r3, [sp, #12]
30001c40: e1500003 cmp r0, r3
30001c44: 1a000007 bne 30001c68 <rtems_tarfs_load+0x118>
* Generate an IMFS node depending on the file type.
* - For directories, just create directories as usual. IMFS
* will take care of the rest.
* - For files, create a file node with special tarfs properties.
*/
if (linkflag == DIRTYPE) {
30001c48: e35b0035 cmp fp, #53 ; 0x35
30001c4c: 0a00001a beq 30001cbc <rtems_tarfs_load+0x16c>
* IMFS_create_node was ONLY passed a NULL when we created the
* root node. We added a new IMFS_create_root_node() so this
* path no longer existed. The result was simpler code which
* should not have this path.
*/
else if (linkflag == REGTYPE) {
30001c50: e35b0030 cmp fp, #48 ; 0x30
30001c54: 0a000006 beq 30001c74 <rtems_tarfs_load+0x124>
);
if (status != 0)
return -1;
if (root_loc.ops != &IMFS_ops
&& root_loc.ops != &fifoIMFS_ops)
30001c58: e1a0a004 mov sl, r4
/*
* Create an IMFS node structure pointing to tar image memory.
*/
offset = 0;
while (1) {
if (offset + 512 > tar_size)
30001c5c: e28a4c02 add r4, sl, #512 ; 0x200
30001c60: e1540007 cmp r4, r7
30001c64: 9affffd7 bls 30001bc8 <rtems_tarfs_load+0x78>
nblocks = (((file_size) + 511) & ~511) / 512;
offset += 512 * nblocks;
}
}
return status;
}
30001c68: e59d0010 ldr r0, [sp, #16]
30001c6c: e28ddf6a add sp, sp, #424 ; 0x1a8
30001c70: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
* should not have this path.
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
30001c74: e59dc008 ldr ip, [sp, #8]
30001c78: e59de004 ldr lr, [sp, #4]
30001c7c: e8bc000f ldm ip!, {r0, r1, r2, r3}
30001c80: e8ae000f stmia lr!, {r0, r1, r2, r3}
30001c84: e59cc000 ldr ip, [ip]
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
30001c88: e1a00005 mov r0, r5
30001c8c: e28d1f5f add r1, sp, #380 ; 0x17c
30001c90: e28d2f69 add r2, sp, #420 ; 0x1a4
* should not have this path.
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
30001c94: e58ec000 str ip, [lr]
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
30001c98: eb002358 bl 3000aa00 <IMFS_evaluate_for_make>
30001c9c: e250a000 subs sl, r0, #0
30001ca0: 0a00001c beq 30001d18 <rtems_tarfs_load+0x1c8>
);
node->info.linearfile.size = file_size;
node->info.linearfile.direct = &tar_image[offset];
}
nblocks = (((file_size) + 511) & ~511) / 512;
30001ca4: e2888f7f add r8, r8, #508 ; 0x1fc <== NOT EXECUTED
30001ca8: e2888003 add r8, r8, #3 <== NOT EXECUTED
30001cac: e1a084a8 lsr r8, r8, #9 <== NOT EXECUTED
offset += 512 * nblocks;
30001cb0: e0844488 add r4, r4, r8, lsl #9 <== NOT EXECUTED
);
if (status != 0)
return -1;
if (root_loc.ops != &IMFS_ops
&& root_loc.ops != &fifoIMFS_ops)
30001cb4: e1a0a004 mov sl, r4
30001cb8: eaffffe7 b 30001c5c <rtems_tarfs_load+0x10c>
* - For directories, just create directories as usual. IMFS
* will take care of the rest.
* - For files, create a file node with special tarfs properties.
*/
if (linkflag == DIRTYPE) {
strcpy(full_filename, mountpoint);
30001cbc: e59d1014 ldr r1, [sp, #20]
30001cc0: e28d0018 add r0, sp, #24
30001cc4: eb003f75 bl 30011aa0 <strcpy>
if (full_filename[strlen(full_filename)-1] != '/')
30001cc8: e28d0018 add r0, sp, #24
30001ccc: eb004137 bl 300121b0 <strlen>
30001cd0: e28def6a add lr, sp, #424 ; 0x1a8
30001cd4: e08e3000 add r3, lr, r0
30001cd8: e5533191 ldrb r3, [r3, #-401] ; 0x191
30001cdc: e353002f cmp r3, #47 ; 0x2f
30001ce0: 0a000004 beq 30001cf8 <rtems_tarfs_load+0x1a8>
strcat(full_filename, "/");
30001ce4: e28d2018 add r2, sp, #24 <== NOT EXECUTED
30001ce8: e0820000 add r0, r2, r0 <== NOT EXECUTED
30001cec: e59f108c ldr r1, [pc, #140] ; 30001d80 <rtems_tarfs_load+0x230><== NOT EXECUTED
30001cf0: e3a02002 mov r2, #2 <== NOT EXECUTED
30001cf4: eb003d14 bl 3001114c <memcpy> <== NOT EXECUTED
strcat(full_filename, filename);
30001cf8: e1a01005 mov r1, r5
30001cfc: e28d0018 add r0, sp, #24
30001d00: eb003eaf bl 300117c4 <strcat>
mkdir(full_filename, S_IRWXU | S_IRWXG | S_IRWXO);
30001d04: e28d0018 add r0, sp, #24
30001d08: e59f1074 ldr r1, [pc, #116] ; 30001d84 <rtems_tarfs_load+0x234>
30001d0c: eb0004e9 bl 300030b8 <mkdir>
);
if (status != 0)
return -1;
if (root_loc.ops != &IMFS_ops
&& root_loc.ops != &fifoIMFS_ops)
30001d10: e1a0a004 mov sl, r4
30001d14: eaffffd0 b 30001c5c <rtems_tarfs_load+0x10c>
loc = root_loc;
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
node = IMFS_create_node(
&loc,
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
30001d18: e1a03b89 lsl r3, r9, #23
30001d1c: e1a03ba3 lsr r3, r3, #23
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
node = IMFS_create_node(
30001d20: e3833902 orr r3, r3, #32768 ; 0x8000
30001d24: e3a01006 mov r1, #6
30001d28: e28d0f5f add r0, sp, #380 ; 0x17c
30001d2c: e59d21a4 ldr r2, [sp, #420] ; 0x1a4
30001d30: e58da000 str sl, [sp]
30001d34: eb00217f bl 3000a338 <IMFS_create_node>
&loc,
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
NULL
);
node->info.linearfile.size = file_size;
30001d38: e5808050 str r8, [r0, #80] ; 0x50
node->info.linearfile.direct = &tar_image[offset];
}
nblocks = (((file_size) + 511) & ~511) / 512;
30001d3c: e2888f7f add r8, r8, #508 ; 0x1fc
30001d40: e2888003 add r8, r8, #3
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
NULL
);
node->info.linearfile.size = file_size;
node->info.linearfile.direct = &tar_image[offset];
30001d44: e0863004 add r3, r6, r4
}
nblocks = (((file_size) + 511) & ~511) / 512;
30001d48: e1a084a8 lsr r8, r8, #9
&loc,
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
NULL
);
node->info.linearfile.size = file_size;
30001d4c: e580a054 str sl, [r0, #84] ; 0x54
node->info.linearfile.direct = &tar_image[offset];
30001d50: e5803058 str r3, [r0, #88] ; 0x58
}
nblocks = (((file_size) + 511) & ~511) / 512;
offset += 512 * nblocks;
30001d54: e0844488 add r4, r4, r8, lsl #9
30001d58: eaffffd5 b 30001cb4 <rtems_tarfs_load+0x164>
);
if (status != 0)
return -1;
if (root_loc.ops != &IMFS_ops
&& root_loc.ops != &fifoIMFS_ops)
30001d5c: e59f2024 ldr r2, [pc, #36] ; 30001d88 <rtems_tarfs_load+0x238><== NOT EXECUTED
30001d60: e1530002 cmp r3, r2 <== NOT EXECUTED
30001d64: 01a0a000 moveq sl, r0 <== NOT EXECUTED
30001d68: 0affff90 beq 30001bb0 <rtems_tarfs_load+0x60> <== NOT EXECUTED
return -1;
30001d6c: e3e03000 mvn r3, #0 <== NOT EXECUTED
30001d70: e58d3010 str r3, [sp, #16] <== NOT EXECUTED
30001d74: eaffffbb b 30001c68 <rtems_tarfs_load+0x118> <== NOT EXECUTED
300036b4 <rtems_termios_bufsize>:
int cbufsize,
int raw_input,
int raw_output
)
{
rtems_termios_cbufsize = cbufsize;
300036b4: e59f300c ldr r3, [pc, #12] ; 300036c8 <rtems_termios_bufsize+0x14><== NOT EXECUTED
300036b8: e5830008 str r0, [r3, #8] <== NOT EXECUTED
rtems_termios_raw_input_size = raw_input;
300036bc: e8830006 stm r3, {r1, r2} <== NOT EXECUTED
rtems_termios_raw_output_size = raw_output;
return RTEMS_SUCCESSFUL;
}
300036c0: e3a00000 mov r0, #0 <== NOT EXECUTED
300036c4: e12fff1e bx lr <== NOT EXECUTED
300034fc <rtems_termios_close>:
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
300034fc: 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(
30003500: e59f519c ldr r5, [pc, #412] ; 300036a4 <rtems_termios_close+0x1a8>
rtems_status_code
rtems_termios_close (void *arg)
{
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
30003504: e5903000 ldr r3, [r0]
rtems_status_code sc;
sc = rtems_semaphore_obtain(
30003508: e3a01000 mov r1, #0
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
3000350c: e1a06000 mov r6, 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(
30003510: e1a02001 mov r2, r1
30003514: e5950000 ldr r0, [r5]
rtems_status_code
rtems_termios_close (void *arg)
{
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
30003518: e5934034 ldr r4, [r3, #52] ; 0x34
rtems_status_code sc;
sc = rtems_semaphore_obtain(
3000351c: eb00086f bl 300056e0 <rtems_semaphore_obtain>
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
30003520: e3500000 cmp r0, #0
30003524: 1a00005d bne 300036a0 <rtems_termios_close+0x1a4>
rtems_fatal_error_occurred (sc);
if (--tty->refcount == 0) {
30003528: e5943008 ldr r3, [r4, #8]
3000352c: e2433001 sub r3, r3, #1
30003530: e3530000 cmp r3, #0
30003534: e5843008 str r3, [r4, #8]
30003538: 1a00002f bne 300035fc <rtems_termios_close+0x100>
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
3000353c: e59420cc ldr r2, [r4, #204] ; 0xcc
30003540: e59f3160 ldr r3, [pc, #352] ; 300036a8 <rtems_termios_close+0x1ac>
30003544: e0833282 add r3, r3, r2, lsl #5
30003548: e5931004 ldr r1, [r3, #4]
3000354c: e3510000 cmp r1, #0
30003550: 0a00003e beq 30003650 <rtems_termios_close+0x154>
/*
* call discipline-specific close
*/
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
30003554: e1a00004 mov r0, r4
30003558: e1a0e00f mov lr, pc
3000355c: e12fff11 bx r1
rtems_fatal_error_occurred (sc);
}
drainOutput (tty);
}
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
30003560: e59430b4 ldr r3, [r4, #180] ; 0xb4
30003564: e3530002 cmp r3, #2
30003568: 0a000042 beq 30003678 <rtems_termios_close+0x17c>
rtems_fatal_error_occurred (sc);
sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT );
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
if (tty->device.lastClose)
3000356c: e594309c ldr r3, [r4, #156] ; 0x9c
30003570: e3530000 cmp r3, #0
(*tty->device.lastClose)(tty->major, tty->minor, arg);
30003574: 1594000c ldrne r0, [r4, #12]
30003578: 15941010 ldrne r1, [r4, #16]
3000357c: 11a02006 movne r2, r6
30003580: 11a0e00f movne lr, pc
30003584: 112fff13 bxne r3
if (tty->forw == NULL) {
30003588: e5943000 ldr r3, [r4]
3000358c: e3530000 cmp r3, #0
30003590: 0a000026 beq 30003630 <rtems_termios_close+0x134>
rtems_termios_ttyTail = tty->back;
if ( rtems_termios_ttyTail != NULL ) {
rtems_termios_ttyTail->forw = NULL;
}
} else {
tty->forw->back = tty->back;
30003594: e5942004 ldr r2, [r4, #4]
30003598: e5832004 str r2, [r3, #4]
3000359c: e5942004 ldr r2, [r4, #4]
}
if (tty->back == NULL) {
300035a0: e3520000 cmp r2, #0
300035a4: 0a00001b beq 30003618 <rtems_termios_close+0x11c>
rtems_termios_ttyHead = tty->forw;
if ( rtems_termios_ttyHead != NULL ) {
rtems_termios_ttyHead->back = NULL;
}
} else {
tty->back->forw = tty->forw;
300035a8: e5823000 str r3, [r2] <== NOT EXECUTED
}
rtems_semaphore_delete (tty->isem);
300035ac: e5940014 ldr r0, [r4, #20]
300035b0: eb000821 bl 3000563c <rtems_semaphore_delete>
rtems_semaphore_delete (tty->osem);
300035b4: e5940018 ldr r0, [r4, #24]
300035b8: eb00081f bl 3000563c <rtems_semaphore_delete>
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
300035bc: e594008c ldr r0, [r4, #140] ; 0x8c
300035c0: eb00081d bl 3000563c <rtems_semaphore_delete>
if ((tty->device.pollRead == NULL) ||
300035c4: e59430a0 ldr r3, [r4, #160] ; 0xa0
300035c8: e3530000 cmp r3, #0
300035cc: 0a00000e beq 3000360c <rtems_termios_close+0x110>
300035d0: e59430b4 ldr r3, [r4, #180] ; 0xb4
300035d4: e3530002 cmp r3, #2
300035d8: 0a00000b beq 3000360c <rtems_termios_close+0x110>
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
rtems_semaphore_delete (tty->rawInBuf.Semaphore);
free (tty->rawInBuf.theBuf);
300035dc: e5940058 ldr r0, [r4, #88] ; 0x58
300035e0: ebfffab0 bl 300020a8 <free>
free (tty->rawOutBuf.theBuf);
300035e4: e594007c ldr r0, [r4, #124] ; 0x7c
300035e8: ebfffaae bl 300020a8 <free>
free (tty->cbuf);
300035ec: e594001c ldr r0, [r4, #28]
300035f0: ebfffaac bl 300020a8 <free>
free (tty);
300035f4: e1a00004 mov r0, r4
300035f8: ebfffaaa bl 300020a8 <free>
}
rtems_semaphore_release (rtems_termios_ttyMutex);
300035fc: e5950000 ldr r0, [r5]
30003600: eb00087f bl 30005804 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
}
30003604: e3a00000 mov r0, #0
30003608: 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);
3000360c: e5940068 ldr r0, [r4, #104] ; 0x68
30003610: eb000809 bl 3000563c <rtems_semaphore_delete>
30003614: eafffff0 b 300035dc <rtems_termios_close+0xe0>
} else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
rtems_termios_ttyHead = tty->forw;
30003618: e59f208c ldr r2, [pc, #140] ; 300036ac <rtems_termios_close+0x1b0>
if ( rtems_termios_ttyHead != NULL ) {
3000361c: e3530000 cmp r3, #0
} else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
rtems_termios_ttyHead = tty->forw;
30003620: e5823000 str r3, [r2]
if ( rtems_termios_ttyHead != NULL ) {
rtems_termios_ttyHead->back = NULL;
30003624: 13a02000 movne r2, #0
30003628: 15832004 strne r2, [r3, #4]
3000362c: eaffffde b 300035ac <rtems_termios_close+0xb0>
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;
30003630: e5942004 ldr r2, [r4, #4]
30003634: e59f1074 ldr r1, [pc, #116] ; 300036b0 <rtems_termios_close+0x1b4>
if ( rtems_termios_ttyTail != NULL ) {
30003638: e3520000 cmp r2, #0
rtems_fatal_error_occurred (sc);
}
if (tty->device.lastClose)
(*tty->device.lastClose)(tty->major, tty->minor, arg);
if (tty->forw == NULL) {
rtems_termios_ttyTail = tty->back;
3000363c: e5812000 str r2, [r1]
if ( rtems_termios_ttyTail != NULL ) {
30003640: 0afffff4 beq 30003618 <rtems_termios_close+0x11c>
rtems_termios_ttyTail->forw = NULL;
30003644: e5823000 str r3, [r2] <== NOT EXECUTED
30003648: e5943000 ldr r3, [r4] <== NOT EXECUTED
3000364c: eaffffd5 b 300035a8 <rtems_termios_close+0xac> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
} else {
/*
* default: just flush output buffer
*/
sc = rtems_semaphore_obtain(tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
30003650: e5940018 ldr r0, [r4, #24]
30003654: e1a02001 mov r2, r1
30003658: eb000820 bl 300056e0 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
3000365c: e3500000 cmp r0, #0
30003660: 1a00000e bne 300036a0 <rtems_termios_close+0x1a4>
rtems_fatal_error_occurred (sc);
}
drainOutput (tty);
30003664: e1a00004 mov r0, r4
30003668: ebfffe57 bl 30002fcc <drainOutput>
}
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
3000366c: e59430b4 ldr r3, [r4, #180] ; 0xb4
30003670: e3530002 cmp r3, #2
30003674: 1affffbc bne 3000356c <rtems_termios_close+0x70>
/*
* send "terminate" to I/O tasks
*/
sc = rtems_event_send( tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT );
30003678: e59400c4 ldr r0, [r4, #196] ; 0xc4
3000367c: e3a01001 mov r1, #1
30003680: eb0006f3 bl 30005254 <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
30003684: e3500000 cmp r0, #0
30003688: 1a000004 bne 300036a0 <rtems_termios_close+0x1a4>
rtems_fatal_error_occurred (sc);
sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT );
3000368c: e59400c8 ldr r0, [r4, #200] ; 0xc8
30003690: e3a01001 mov r1, #1
30003694: eb0006ee bl 30005254 <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
30003698: e3500000 cmp r0, #0
3000369c: 0affffb2 beq 3000356c <rtems_termios_close+0x70>
rtems_fatal_error_occurred (sc);
300036a0: eb0009b2 bl 30005d70 <rtems_fatal_error_occurred> <== NOT EXECUTED
30004c64 <rtems_termios_dequeue_characters>:
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
30004c64: e590c090 ldr ip, [r0, #144] ; 0x90
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
30004c68: e59020b4 ldr r2, [r0, #180] ; 0xb4
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
30004c6c: e08c1001 add r1, ip, r1
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
30004c70: e3520002 cmp r2, #2
* for each transmitted character.
* It returns number of characters left to transmit
*/
int
rtems_termios_dequeue_characters (void *ttyp, int len)
{
30004c74: e52de004 push {lr} ; (str lr, [sp, #-4]!)
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
30004c78: e5801090 str r1, [r0, #144] ; 0x90
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
30004c7c: 0a00000c beq 30004cb4 <rtems_termios_dequeue_characters+0x50>
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
return 0; /* nothing to output in IRQ... */
}
if (tty->t_line == PPPDISC ) {
30004c80: e59030cc ldr r3, [r0, #204] ; 0xcc
30004c84: e3530005 cmp r3, #5
30004c88: 0a000001 beq 30004c94 <rtems_termios_dequeue_characters+0x30>
}
return 0; /* nothing to output in IRQ... */
}
return rtems_termios_refill_transmitter(tty);
}
30004c8c: e49de004 pop {lr} ; (ldr lr, [sp], #4)
rtems_termios_linesw[tty->t_line].l_start(tty);
}
return 0; /* nothing to output in IRQ... */
}
return rtems_termios_refill_transmitter(tty);
30004c90: eaffff55 b 300049ec <rtems_termios_refill_transmitter>
if (tty->t_line == PPPDISC ) {
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
30004c94: e59f303c ldr r3, [pc, #60] ; 30004cd8 <rtems_termios_dequeue_characters+0x74>
30004c98: e59330b4 ldr r3, [r3, #180] ; 0xb4
30004c9c: e3530000 cmp r3, #0
30004ca0: 0a00000a beq 30004cd0 <rtems_termios_dequeue_characters+0x6c>
rtems_termios_linesw[tty->t_line].l_start(tty);
30004ca4: e1a0e00f mov lr, pc
30004ca8: e12fff13 bx r3
}
return 0; /* nothing to output in IRQ... */
30004cac: e3a00000 mov r0, #0
30004cb0: e49df004 pop {pc} ; (ldr pc, [sp], #4)
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
/*
* send wake up to transmitter task
*/
sc = rtems_event_send(tty->txTaskId, TERMIOS_TX_START_EVENT);
30004cb4: e59000c8 ldr r0, [r0, #200] ; 0xc8
30004cb8: e1a01002 mov r1, r2
30004cbc: eb000164 bl 30005254 <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
30004cc0: e2503000 subs r3, r0, #0
rtems_fatal_error_occurred (sc);
return 0; /* nothing to output in IRQ... */
30004cc4: 01a00003 moveq r0, r3
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
/*
* send wake up to transmitter task
*/
sc = rtems_event_send(tty->txTaskId, TERMIOS_TX_START_EVENT);
if (sc != RTEMS_SUCCESSFUL)
30004cc8: 049df004 popeq {pc} ; (ldreq pc, [sp], #4)
rtems_fatal_error_occurred (sc);
30004ccc: eb000427 bl 30005d70 <rtems_fatal_error_occurred> <== NOT EXECUTED
* 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);
}
return 0; /* nothing to output in IRQ... */
30004cd0: e1a00003 mov r0, r3 <== NOT EXECUTED
}
return rtems_termios_refill_transmitter(tty);
}
30004cd4: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
30004674 <rtems_termios_enqueue_raw_characters>:
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len)
{
30004674: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
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) {
30004678: e59030cc ldr r3, [r0, #204] ; 0xcc
3000467c: e59f72d4 ldr r7, [pc, #724] ; 30004958 <rtems_termios_enqueue_raw_characters+0x2e4>
* 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)
{
30004680: e24dd008 sub sp, sp, #8
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) {
30004684: e0873283 add r3, r7, r3, lsl #5
30004688: e5939010 ldr r9, [r3, #16]
* 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)
{
3000468c: e1a04000 mov r4, r0
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) {
30004690: e3590000 cmp r9, #0
* 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)
{
30004694: e1a05001 mov r5, r1
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) {
30004698: 0a00001d beq 30004714 <rtems_termios_enqueue_raw_characters+0xa0>
while (len--) {
3000469c: e3520000 cmp r2, #0
300046a0: 0a00000a beq 300046d0 <rtems_termios_enqueue_raw_characters+0x5c>
300046a4: e1a06002 mov r6, r2
300046a8: ea000002 b 300046b8 <rtems_termios_enqueue_raw_characters+0x44>
300046ac: e59430cc ldr r3, [r4, #204] ; 0xcc
300046b0: e0873283 add r3, r7, r3, lsl #5
300046b4: e5939010 ldr r9, [r3, #16]
c = *buf++;
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
300046b8: e4d50001 ldrb r0, [r5], #1
300046bc: e1a01004 mov r1, r4
300046c0: e1a0e00f mov lr, pc
300046c4: e12fff19 bx r9
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--) {
300046c8: e2566001 subs r6, r6, #1
300046cc: 1afffff6 bne 300046ac <rtems_termios_enqueue_raw_characters+0x38>
}
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
300046d0: e594a0e4 ldr sl, [r4, #228] ; 0xe4
300046d4: e35a0000 cmp sl, #0
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
tty->tty_rcvwakeup = 1;
}
return 0;
300046d8: 13a0a000 movne sl, #0
}
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
300046dc: 1a000009 bne 30004708 <rtems_termios_enqueue_raw_characters+0x94>
300046e0: e59430dc ldr r3, [r4, #220] ; 0xdc
300046e4: e3530000 cmp r3, #0
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
tty->tty_rcvwakeup = 1;
}
return 0;
300046e8: 01a0a003 moveq sl, r3
}
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
300046ec: 0a000005 beq 30004708 <rtems_termios_enqueue_raw_characters+0x94>
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
300046f0: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED
300046f4: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED
300046f8: e1a0e00f mov lr, pc <== NOT EXECUTED
300046fc: e12fff13 bx r3 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
30004700: e3a03001 mov r3, #1 <== NOT EXECUTED
30004704: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED
}
tty->rawInBufDropped += dropped;
rtems_semaphore_release (tty->rawInBuf.Semaphore);
return dropped;
}
30004708: e1a0000a mov r0, sl
3000470c: e28dd008 add sp, sp, #8
30004710: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
/*
* 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);
30004714: e2803030 add r3, r0, #48 ; 0x30
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) {
30004718: e1a06002 mov r6, r2
/*
* 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);
3000471c: e58d3000 str r3, [sp]
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
30004720: e3560000 cmp r6, #0
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,
30004724: e280304a add r3, r0, #74 ; 0x4a
30004728: e58d3004 str r3, [sp, #4]
3000472c: e1a0b009 mov fp, r9
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
30004730: 0a000042 beq 30004840 <rtems_termios_enqueue_raw_characters+0x1cc>
c = *buf++;
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
30004734: e59430b8 ldr r3, [r4, #184] ; 0xb8
}
return 0;
}
while (len--) {
c = *buf++;
30004738: e4d58001 ldrb r8, [r5], #1
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
3000473c: e3130c02 tst r3, #512 ; 0x200
30004740: 0a000005 beq 3000475c <rtems_termios_enqueue_raw_characters+0xe8>
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
30004744: e5d4304a ldrb r3, [r4, #74] ; 0x4a
30004748: e1530008 cmp r3, r8
3000474c: 0a000056 beq 300048ac <rtems_termios_enqueue_raw_characters+0x238>
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
}
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
30004750: e5d43049 ldrb r3, [r4, #73] ; 0x49
30004754: e1530008 cmp r3, r8
30004758: 0a00003f beq 3000485c <rtems_termios_enqueue_raw_characters+0x1e8>
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
flow_rcv = true;
}
}
if (flow_rcv) {
3000475c: e3590000 cmp r9, #0
30004760: 1a000041 bne 3000486c <rtems_termios_enqueue_raw_characters+0x1f8>
}
/* reenable interrupts */
rtems_interrupt_enable(level);
}
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
30004764: e5940060 ldr r0, [r4, #96] ; 0x60
30004768: e5941064 ldr r1, [r4, #100] ; 0x64
3000476c: e2800001 add r0, r0, #1
30004770: eb0032d5 bl 300112cc <__umodsi3>
30004774: e1a07000 mov r7, r0
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
30004778: e10fa000 mrs sl, CPSR
3000477c: e38a3080 orr r3, sl, #128 ; 0x80
30004780: e129f003 msr CPSR_fc, r3
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
30004784: e594305c ldr r3, [r4, #92] ; 0x5c
30004788: e5940064 ldr r0, [r4, #100] ; 0x64
% tty->rawInBuf.Size) > tty->highwater) &&
3000478c: e5941064 ldr r1, [r4, #100] ; 0x64
}
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
30004790: e0630000 rsb r0, r3, r0
% tty->rawInBuf.Size) > tty->highwater) &&
30004794: e0800007 add r0, r0, r7
30004798: eb0032cb bl 300112cc <__umodsi3>
}
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
3000479c: e59430c0 ldr r3, [r4, #192] ; 0xc0
300047a0: e1500003 cmp r0, r3
300047a4: 9a00000e bls 300047e4 <rtems_termios_enqueue_raw_characters+0x170>
% tty->rawInBuf.Size) > tty->highwater) &&
!(tty->flow_ctrl & FL_IREQXOF)) {
300047a8: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
% tty->rawInBuf.Size) > tty->highwater) &&
300047ac: e3130001 tst r3, #1 <== NOT EXECUTED
300047b0: 1a00000b bne 300047e4 <rtems_termios_enqueue_raw_characters+0x170><== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
300047b4: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
300047b8: e59f319c ldr r3, [pc, #412] ; 3000495c <rtems_termios_enqueue_raw_characters+0x2e8><== NOT EXECUTED
rtems_interrupt_disable(level);
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
% tty->rawInBuf.Size) > tty->highwater) &&
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
300047bc: e3822001 orr r2, r2, #1 <== NOT EXECUTED
300047c0: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
300047c4: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
300047c8: e0023003 and r3, r2, r3 <== NOT EXECUTED
300047cc: e3530b01 cmp r3, #1024 ; 0x400 <== NOT EXECUTED
300047d0: 0a000047 beq 300048f4 <rtems_termios_enqueue_raw_characters+0x280><== NOT EXECUTED
/* call write function here */
tty->flow_ctrl |= FL_ISNTXOF;
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTOP]), 1);
}
} else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) {
300047d4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
300047d8: e2033f41 and r3, r3, #260 ; 0x104 <== NOT EXECUTED
300047dc: e3530c01 cmp r3, #256 ; 0x100 <== NOT EXECUTED
300047e0: 0a000052 beq 30004930 <rtems_termios_enqueue_raw_characters+0x2bc><== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
300047e4: e129f00a msr CPSR_fc, sl
}
/* reenable interrupts */
rtems_interrupt_enable(level);
if (newTail == tty->rawInBuf.Head) {
300047e8: e594305c ldr r3, [r4, #92] ; 0x5c
300047ec: e1530007 cmp r3, r7
dropped++;
300047f0: 028bb001 addeq fp, fp, #1
}
/* reenable interrupts */
rtems_interrupt_enable(level);
if (newTail == tty->rawInBuf.Head) {
300047f4: 0a00000e beq 30004834 <rtems_termios_enqueue_raw_characters+0x1c0>
dropped++;
} else {
tty->rawInBuf.theBuf[newTail] = c;
300047f8: e5943058 ldr r3, [r4, #88] ; 0x58
300047fc: e7c38007 strb r8, [r3, r7]
tty->rawInBuf.Tail = newTail;
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
30004800: e59430e4 ldr r3, [r4, #228] ; 0xe4
if (newTail == tty->rawInBuf.Head) {
dropped++;
} else {
tty->rawInBuf.theBuf[newTail] = c;
tty->rawInBuf.Tail = newTail;
30004804: e5847060 str r7, [r4, #96] ; 0x60
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
30004808: e3530000 cmp r3, #0
3000480c: 1a000008 bne 30004834 <rtems_termios_enqueue_raw_characters+0x1c0>
30004810: e59430dc ldr r3, [r4, #220] ; 0xdc
30004814: e3530000 cmp r3, #0
30004818: 0a000005 beq 30004834 <rtems_termios_enqueue_raw_characters+0x1c0>
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
3000481c: e59d0000 ldr r0, [sp] <== NOT EXECUTED
30004820: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED
30004824: e1a0e00f mov lr, pc <== NOT EXECUTED
30004828: e12fff13 bx r3 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
3000482c: e3a03001 mov r3, #1 <== NOT EXECUTED
30004830: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED
30004834: e2466001 sub r6, r6, #1
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
30004838: e3560000 cmp r6, #0
3000483c: 1affffbc bne 30004734 <rtems_termios_enqueue_raw_characters+0xc0>
}
}
}
}
tty->rawInBufDropped += dropped;
30004840: e5943078 ldr r3, [r4, #120] ; 0x78
rtems_semaphore_release (tty->rawInBuf.Semaphore);
30004844: e5940068 ldr r0, [r4, #104] ; 0x68
}
}
}
}
tty->rawInBufDropped += dropped;
30004848: e083300b add r3, r3, fp
3000484c: e5843078 str r3, [r4, #120] ; 0x78
30004850: e1a0a00b mov sl, fp
rtems_semaphore_release (tty->rawInBuf.Semaphore);
30004854: eb0003ea bl 30005804 <rtems_semaphore_release>
return dropped;
30004858: eaffffaa b 30004708 <rtems_termios_enqueue_raw_characters+0x94>
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
3000485c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len)
{
30004860: e3a09001 mov r9, #1 <== NOT EXECUTED
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
30004864: e3c33010 bic r3, r3, #16 <== NOT EXECUTED
30004868: e58430b8 str r3, [r4, #184] ; 0xb8 <== 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) {
3000486c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
30004870: e2033030 and r3, r3, #48 ; 0x30 <== NOT EXECUTED
30004874: e3530020 cmp r3, #32 <== NOT EXECUTED
30004878: 1affffed bne 30004834 <rtems_termios_enqueue_raw_characters+0x1c0><== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
3000487c: e10f7000 mrs r7, CPSR <== NOT EXECUTED
30004880: e3873080 orr r3, r7, #128 ; 0x80 <== NOT EXECUTED
30004884: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
/* disable interrupts */
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
30004888: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
3000488c: e5942094 ldr r2, [r4, #148] ; 0x94 <== 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;
30004890: e3c33020 bic r3, r3, #32 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
30004894: e3520000 cmp r2, #0 <== 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;
30004898: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
3000489c: 1a00000c bne 300048d4 <rtems_termios_enqueue_raw_characters+0x260><== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
300048a0: e129f007 msr CPSR_fc, r7 <== 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;
300048a4: e2466001 sub r6, r6, #1 <== NOT EXECUTED
300048a8: eaffffe2 b 30004838 <rtems_termios_enqueue_raw_characters+0x1c4><== 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]) {
300048ac: e5d42049 ldrb r2, [r4, #73] ; 0x49 <== 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)
{
300048b0: e3a09001 mov r9, #1 <== 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]) {
300048b4: e1520003 cmp r2, r3 <== NOT EXECUTED
/* received VSTOP and VSTART==VSTOP? */
/* then toggle "stop output" status */
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
300048b8: 059430b8 ldreq r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
300048bc: 159430b8 ldrne r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
if (c == tty->termios.c_cc[VSTART]) {
/* received VSTOP and VSTART==VSTOP? */
/* then toggle "stop output" status */
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
300048c0: 02233010 eoreq r3, r3, #16 <== NOT EXECUTED
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
300048c4: 13833010 orrne r3, r3, #16 <== 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;
300048c8: 058430b8 streq r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
300048cc: 158430b8 strne r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
300048d0: eaffffe5 b 3000486c <rtems_termios_enqueue_raw_characters+0x1f8><== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
/* if chars available, call write function... */
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
300048d4: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
/* if chars available, call write function... */
(*tty->device.write)(
300048d8: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED
300048dc: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
300048e0: e0811003 add r1, r1, r3 <== NOT EXECUTED
300048e4: e3a02001 mov r2, #1 <== NOT EXECUTED
300048e8: e1a0e00f mov lr, pc <== NOT EXECUTED
300048ec: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
300048f0: eaffffea b 300048a0 <rtems_termios_enqueue_raw_characters+0x22c><== 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) ||
300048f4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
300048f8: e3130020 tst r3, #32 <== NOT EXECUTED
300048fc: 1a000002 bne 3000490c <rtems_termios_enqueue_raw_characters+0x298><== NOT EXECUTED
30004900: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED
30004904: e3530000 cmp r3, #0 <== NOT EXECUTED
30004908: 1affffb5 bne 300047e4 <rtems_termios_enqueue_raw_characters+0x170><== 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;
3000490c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
30004910: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
== (FL_MDXOF ) ) {
if ((tty->flow_ctrl & FL_OSTOP) ||
(tty->rawOutBufState == rob_idle)) {
/* if tx is stopped due to XOFF or out of data */
/* call write function here */
tty->flow_ctrl |= FL_ISNTXOF;
30004914: e3833002 orr r3, r3, #2 <== NOT EXECUTED
30004918: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
3000491c: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED
30004920: e3a02001 mov r2, #1 <== NOT EXECUTED
30004924: e1a0e00f mov lr, pc <== NOT EXECUTED
30004928: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
3000492c: eaffffac b 300047e4 <rtems_termios_enqueue_raw_characters+0x170><== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTOP]), 1);
}
} else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) {
tty->flow_ctrl |= FL_IRTSOFF;
30004930: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
30004934: e59430ac ldr r3, [r4, #172] ; 0xac <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTOP]), 1);
}
} else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) {
tty->flow_ctrl |= FL_IRTSOFF;
30004938: e3822004 orr r2, r2, #4 <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
3000493c: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTOP]), 1);
}
} else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) {
tty->flow_ctrl |= FL_IRTSOFF;
30004940: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
30004944: 0affffa6 beq 300047e4 <rtems_termios_enqueue_raw_characters+0x170><== NOT EXECUTED
tty->device.stopRemoteTx(tty->minor);
30004948: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
3000494c: e1a0e00f mov lr, pc <== NOT EXECUTED
30004950: e12fff13 bx r3 <== NOT EXECUTED
30004954: eaffffa2 b 300047e4 <rtems_termios_enqueue_raw_characters+0x170><== NOT EXECUTED
300036cc <rtems_termios_ioctl>:
rtems_status_code
rtems_termios_ioctl (void *arg)
{
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
300036cc: e5902000 ldr r2, [r0]
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
300036d0: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
300036d4: e5925034 ldr r5, [r2, #52] ; 0x34
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
rtems_status_code sc;
args->ioctl_return = 0;
300036d8: e3a03000 mov r3, #0
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
300036dc: e1a04000 mov r4, r0
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
rtems_status_code sc;
args->ioctl_return = 0;
300036e0: e580300c str r3, [r0, #12]
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
300036e4: e1a01003 mov r1, r3
300036e8: e5950018 ldr r0, [r5, #24]
300036ec: e1a02003 mov r2, r3
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;
300036f0: e5947008 ldr r7, [r4, #8]
rtems_status_code sc;
args->ioctl_return = 0;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
300036f4: eb0007f9 bl 300056e0 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
300036f8: e2506000 subs r6, r0, #0
300036fc: 1a00000e bne 3000373c <rtems_termios_ioctl+0x70>
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
30003700: e5943004 ldr r3, [r4, #4]
30003704: e3530004 cmp r3, #4
30003708: 0a000006 beq 30003728 <rtems_termios_ioctl+0x5c>
3000370c: 8a00000d bhi 30003748 <rtems_termios_ioctl+0x7c>
30003710: e3530002 cmp r3, #2
30003714: 0a00001e beq 30003794 <rtems_termios_ioctl+0xc8>
30003718: 9a000085 bls 30003934 <rtems_termios_ioctl+0x268>
if (tty->device.setAttributes)
(*tty->device.setAttributes)(tty->minor, &tty->termios);
break;
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
3000371c: e1a00005 mov r0, r5
30003720: ebfffe29 bl 30002fcc <drainOutput>
break;
30003724: ea000002 b 30003734 <rtems_termios_ioctl+0x68>
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
break;
case RTEMS_IO_RCVWAKEUP:
tty->tty_rcv = *wakeup;
30003728: e897000c ldm r7, {r2, r3} <== NOT EXECUTED
3000372c: e58520dc str r2, [r5, #220] ; 0xdc <== NOT EXECUTED
30003730: e58530e0 str r3, [r5, #224] ; 0xe0 <== NOT EXECUTED
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
}
break;
}
rtems_semaphore_release (tty->osem);
30003734: e5950018 ldr r0, [r5, #24]
30003738: eb000831 bl 30005804 <rtems_semaphore_release>
args->ioctl_return = sc;
3000373c: e584600c str r6, [r4, #12]
return sc;
}
30003740: e1a00006 mov r0, r6
30003744: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
30003748: e59f2340 ldr r2, [pc, #832] ; 30003a90 <rtems_termios_ioctl+0x3c4>
3000374c: e1530002 cmp r3, r2
30003750: 0a00006b beq 30003904 <rtems_termios_ioctl+0x238>
30003754: 8a000082 bhi 30003964 <rtems_termios_ioctl+0x298>
30003758: e3530005 cmp r3, #5
3000375c: 0a0000a1 beq 300039e8 <rtems_termios_ioctl+0x31c>
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
30003760: e59520cc ldr r2, [r5, #204] ; 0xcc
30003764: e59f3328 ldr r3, [pc, #808] ; 30003a94 <rtems_termios_ioctl+0x3c8>
30003768: e0833282 add r3, r3, r2, lsl #5
3000376c: e5933018 ldr r3, [r3, #24]
30003770: e3530000 cmp r3, #0
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
}
else {
sc = RTEMS_INVALID_NUMBER;
30003774: 03a0600a moveq r6, #10
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
30003778: 0affffed beq 30003734 <rtems_termios_ioctl+0x68>
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
3000377c: e1a00005 mov r0, r5
30003780: e1a01004 mov r1, r4
30003784: e1a0e00f mov lr, pc
30003788: e12fff13 bx r3
3000378c: e1a06000 mov r6, r0
30003790: eaffffe7 b 30003734 <rtems_termios_ioctl+0x68>
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
break;
case RTEMS_IO_SET_ATTRIBUTES:
tty->termios = *(struct termios *)args->buffer;
30003794: e594e008 ldr lr, [r4, #8]
30003798: e2857030 add r7, r5, #48 ; 0x30
3000379c: e1a0c007 mov ip, r7
300037a0: e8be000f ldm lr!, {r0, r1, r2, r3}
300037a4: e8ac000f stmia ip!, {r0, r1, r2, r3}
300037a8: e8be000f ldm lr!, {r0, r1, r2, r3}
300037ac: e8ac000f stmia ip!, {r0, r1, r2, r3}
/*
* check for flow control options to be switched off
*/
/* check for outgoing XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXON) &&
300037b0: e59520b8 ldr r2, [r5, #184] ; 0xb8
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
break;
case RTEMS_IO_SET_ATTRIBUTES:
tty->termios = *(struct termios *)args->buffer;
300037b4: e59e3000 ldr r3, [lr]
/*
* check for flow control options to be switched off
*/
/* check for outgoing XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXON) &&
300037b8: e3120c02 tst r2, #512 ; 0x200
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
break;
case RTEMS_IO_SET_ATTRIBUTES:
tty->termios = *(struct termios *)args->buffer;
300037bc: e58c3000 str r3, [ip]
/*
* check for flow control options to be switched off
*/
/* check for outgoing XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXON) &&
300037c0: 0a000012 beq 30003810 <rtems_termios_ioctl+0x144>
!(tty->termios.c_iflag & IXON)) {
300037c4: e5953030 ldr r3, [r5, #48] ; 0x30
/*
* check for flow control options to be switched off
*/
/* check for outgoing XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXON) &&
300037c8: e3130b01 tst r3, #1024 ; 0x400
300037cc: 1a00000f bne 30003810 <rtems_termios_ioctl+0x144>
!(tty->termios.c_iflag & IXON)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF);
300037d0: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
300037d4: e3c33e21 bic r3, r3, #528 ; 0x210 <== NOT EXECUTED
300037d8: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
300037dc: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
300037e0: e3130020 tst r3, #32 <== NOT EXECUTED
300037e4: 0a000009 beq 30003810 <rtems_termios_ioctl+0x144> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
300037e8: e10f8000 mrs r8, CPSR <== NOT EXECUTED
300037ec: e3883080 orr r3, r8, #128 ; 0x80 <== NOT EXECUTED
300037f0: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
/* disable interrupts */
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
300037f4: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
300037f8: e5952094 ldr r2, [r5, #148] ; 0x94 <== 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;
300037fc: e3c33020 bic r3, r3, #32 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
30003800: e3520000 cmp r2, #0 <== 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;
30003804: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
30003808: 1a000098 bne 30003a70 <rtems_termios_ioctl+0x3a4> <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
3000380c: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED
/* reenable interrupts */
rtems_interrupt_enable(level);
}
}
/* check for incoming XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXOF) && !(tty->termios.c_iflag & IXOFF)) {
30003810: e59530b8 ldr r3, [r5, #184] ; 0xb8
30003814: e3130b01 tst r3, #1024 ; 0x400
30003818: 0a000008 beq 30003840 <rtems_termios_ioctl+0x174>
3000381c: e5953030 ldr r3, [r5, #48] ; 0x30 <== NOT EXECUTED
30003820: e3130a01 tst r3, #4096 ; 0x1000 <== NOT EXECUTED
30003824: 1a000005 bne 30003840 <rtems_termios_ioctl+0x174> <== NOT EXECUTED
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXOF);
30003828: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
3000382c: e3c33b01 bic r3, r3, #1024 ; 0x400 <== NOT EXECUTED
30003830: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
/* FIXME: what happens, if we had sent XOFF but not yet XON? */
tty->flow_ctrl &= ~(FL_ISNTXOF);
30003834: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
30003838: e3c33002 bic r3, r3, #2 <== NOT EXECUTED
3000383c: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
}
/* check for incoming RTS/CTS flow control switched off */
if (( tty->flow_ctrl & FL_MDRTS) && !(tty->termios.c_cflag & CRTSCTS)) {
30003840: e59530b8 ldr r3, [r5, #184] ; 0xb8
30003844: e3130c01 tst r3, #256 ; 0x100
30003848: 05952038 ldreq r2, [r5, #56] ; 0x38
3000384c: 0a000012 beq 3000389c <rtems_termios_ioctl+0x1d0>
30003850: e5952038 ldr r2, [r5, #56] ; 0x38 <== NOT EXECUTED
30003854: e3520000 cmp r2, #0 <== NOT EXECUTED
30003858: ba000078 blt 30003a40 <rtems_termios_ioctl+0x374> <== NOT EXECUTED
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDRTS);
3000385c: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
30003860: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED
30003864: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
/* restart remote Tx, if it was stopped */
if ((tty->flow_ctrl & FL_IRTSOFF) && (tty->device.startRemoteTx != NULL)) {
30003868: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
3000386c: e3130004 tst r3, #4 <== NOT EXECUTED
30003870: 0a000006 beq 30003890 <rtems_termios_ioctl+0x1c4> <== NOT EXECUTED
30003874: e59530b0 ldr r3, [r5, #176] ; 0xb0 <== NOT EXECUTED
30003878: e3530000 cmp r3, #0 <== NOT EXECUTED
3000387c: 0a000003 beq 30003890 <rtems_termios_ioctl+0x1c4> <== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
30003880: e5950010 ldr r0, [r5, #16] <== NOT EXECUTED
30003884: e1a0e00f mov lr, pc <== NOT EXECUTED
30003888: e12fff13 bx r3 <== NOT EXECUTED
3000388c: e5952038 ldr r2, [r5, #56] ; 0x38 <== NOT EXECUTED
}
tty->flow_ctrl &= ~(FL_IRTSOFF);
30003890: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
30003894: e3c33004 bic r3, r3, #4 <== NOT EXECUTED
30003898: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
/*
* check for flow control options to be switched on
*/
/* check for incoming RTS/CTS flow control switched on */
if (tty->termios.c_cflag & CRTSCTS) {
3000389c: e3520000 cmp r2, #0
300038a0: ba000066 blt 30003a40 <rtems_termios_ioctl+0x374>
tty->flow_ctrl |= FL_MDRTS;
}
/* check for incoming XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXOFF) {
300038a4: e5953030 ldr r3, [r5, #48] ; 0x30
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) {
300038a8: e595803c ldr r8, [r5, #60] ; 0x3c
/* check for incoming RTS/CTS flow control switched on */
if (tty->termios.c_cflag & CRTSCTS) {
tty->flow_ctrl |= FL_MDRTS;
}
/* check for incoming XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXOFF) {
300038ac: e3130a01 tst r3, #4096 ; 0x1000
tty->flow_ctrl |= FL_MDXOF;
300038b0: 159520b8 ldrne r2, [r5, #184] ; 0xb8
300038b4: 13822b01 orrne r2, r2, #1024 ; 0x400
300038b8: 158520b8 strne r2, [r5, #184] ; 0xb8
}
/* check for outgoing XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXON) {
300038bc: e3130b01 tst r3, #1024 ; 0x400
tty->flow_ctrl |= FL_MDXON;
300038c0: 159530b8 ldrne r3, [r5, #184] ; 0xb8
300038c4: 13833c02 orrne r3, r3, #512 ; 0x200
300038c8: 158530b8 strne r3, [r5, #184] ; 0xb8
tty->termios = *(struct termios *)args->buffer;
/* check for and process change in flow control options */
termios_set_flowctrl(tty);
if (tty->termios.c_lflag & ICANON) {
300038cc: e2188002 ands r8, r8, #2
300038d0: 0a000048 beq 300039f8 <rtems_termios_ioctl+0x32c>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
300038d4: e3a03000 mov r3, #0
300038d8: e585306c str r3, [r5, #108] ; 0x6c
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
300038dc: e5853070 str r3, [r5, #112] ; 0x70
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
300038e0: e5853074 str r3, [r5, #116] ; 0x74
} else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
}
}
}
if (tty->device.setAttributes)
300038e4: e59530a8 ldr r3, [r5, #168] ; 0xa8
300038e8: e3530000 cmp r3, #0
300038ec: 0affff90 beq 30003734 <rtems_termios_ioctl+0x68>
(*tty->device.setAttributes)(tty->minor, &tty->termios);
300038f0: e5950010 ldr r0, [r5, #16]
300038f4: e1a01007 mov r1, r7
300038f8: e1a0e00f mov lr, pc
300038fc: e12fff13 bx r3
30003900: eaffff8b b 30003734 <rtems_termios_ioctl+0x68>
case TIOCGETD:
*(int*)(args->buffer)=tty->t_line;
break;
#endif
case FIONREAD: {
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
30003904: e5952060 ldr r2, [r5, #96] ; 0x60 <== NOT EXECUTED
30003908: e595305c ldr r3, [r5, #92] ; 0x5c <== NOT EXECUTED
if ( rawnc < 0 )
rawnc += tty->rawInBuf.Size;
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
3000390c: e5950020 ldr r0, [r5, #32] <== NOT EXECUTED
*(int*)(args->buffer)=tty->t_line;
break;
#endif
case FIONREAD: {
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
if ( rawnc < 0 )
30003910: e0523003 subs r3, r2, r3 <== NOT EXECUTED
rawnc += tty->rawInBuf.Size;
30003914: 45952064 ldrmi r2, [r5, #100] ; 0x64 <== NOT EXECUTED
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
30003918: e5941008 ldr r1, [r4, #8] <== NOT EXECUTED
break;
#endif
case FIONREAD: {
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
if ( rawnc < 0 )
rawnc += tty->rawInBuf.Size;
3000391c: 40833002 addmi r3, r3, r2 <== NOT EXECUTED
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
30003920: e5952024 ldr r2, [r5, #36] ; 0x24 <== NOT EXECUTED
30003924: e0622000 rsb r2, r2, r0 <== NOT EXECUTED
30003928: e0823003 add r3, r2, r3 <== NOT EXECUTED
3000392c: e5813000 str r3, [r1] <== NOT EXECUTED
}
break;
30003930: eaffff7f b 30003734 <rtems_termios_ioctl+0x68> <== 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) {
30003934: e3530001 cmp r3, #1
30003938: 1affff88 bne 30003760 <rtems_termios_ioctl+0x94>
sc = RTEMS_INVALID_NUMBER;
}
break;
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
3000393c: e5947008 ldr r7, [r4, #8]
30003940: e285c030 add ip, r5, #48 ; 0x30
30003944: e1a0e007 mov lr, r7
30003948: e8bc000f ldm ip!, {r0, r1, r2, r3}
3000394c: e8ae000f stmia lr!, {r0, r1, r2, r3}
30003950: e8bc000f ldm ip!, {r0, r1, r2, r3}
30003954: e8ae000f stmia lr!, {r0, r1, r2, r3}
30003958: e59c3000 ldr r3, [ip]
3000395c: e58e3000 str r3, [lr]
break;
30003960: eaffff73 b 30003734 <rtems_termios_ioctl+0x68>
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
30003964: e59f212c ldr r2, [pc, #300] ; 30003a98 <rtems_termios_ioctl+0x3cc>
30003968: e1530002 cmp r3, r2
3000396c: 0a000019 beq 300039d8 <rtems_termios_ioctl+0x30c>
30003970: e2822105 add r2, r2, #1073741825 ; 0x40000001
30003974: e1530002 cmp r3, r2
30003978: 1affff78 bne 30003760 <rtems_termios_ioctl+0x94>
#if 1 /* FIXME */
case TIOCSETD:
/*
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
3000397c: e59f7110 ldr r7, [pc, #272] ; 30003a94 <rtems_termios_ioctl+0x3c8>
30003980: e59530cc ldr r3, [r5, #204] ; 0xcc
30003984: e0873283 add r3, r7, r3, lsl #5
30003988: e5933004 ldr r3, [r3, #4]
3000398c: e3530000 cmp r3, #0
30003990: 0a000003 beq 300039a4 <rtems_termios_ioctl+0x2d8>
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
30003994: e1a00005 mov r0, r5
30003998: e1a0e00f mov lr, pc
3000399c: e12fff13 bx r3
300039a0: e1a06000 mov r6, r0
}
tty->t_line=*(int*)(args->buffer);
300039a4: e5943008 ldr r3, [r4, #8]
300039a8: e5932000 ldr r2, [r3]
tty->t_sc = NULL; /* ensure that no more valid data */
300039ac: e3a03000 mov r3, #0
300039b0: e58530d0 str r3, [r5, #208] ; 0xd0
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
300039b4: e7973282 ldr r3, [r7, r2, lsl #5]
* 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);
300039b8: e58520cc str r2, [r5, #204] ; 0xcc
tty->t_sc = NULL; /* ensure that no more valid data */
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
300039bc: e3530000 cmp r3, #0
300039c0: 0affff5b beq 30003734 <rtems_termios_ioctl+0x68>
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
300039c4: e1a00005 mov r0, r5
300039c8: e1a0e00f mov lr, pc
300039cc: e12fff13 bx r3
300039d0: e1a06000 mov r6, r0
300039d4: eaffff56 b 30003734 <rtems_termios_ioctl+0x68>
}
break;
case TIOCGETD:
*(int*)(args->buffer)=tty->t_line;
300039d8: e5943008 ldr r3, [r4, #8]
300039dc: e59520cc ldr r2, [r5, #204] ; 0xcc
300039e0: e5832000 str r2, [r3]
break;
300039e4: eaffff52 b 30003734 <rtems_termios_ioctl+0x68>
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
break;
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
300039e8: e897000c ldm r7, {r2, r3} <== NOT EXECUTED
300039ec: e58520d4 str r2, [r5, #212] ; 0xd4 <== NOT EXECUTED
300039f0: e58530d8 str r3, [r5, #216] ; 0xd8 <== NOT EXECUTED
break;
300039f4: eaffff4e b 30003734 <rtems_termios_ioctl+0x68> <== NOT EXECUTED
if (tty->termios.c_lflag & ICANON) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
300039f8: e5d5a046 ldrb sl, [r5, #70] ; 0x46 <== NOT EXECUTED
rtems_clock_get_ticks_per_second() / 10;
300039fc: eb00058f bl 30005040 <rtems_clock_get_ticks_per_second> <== NOT EXECUTED
if (tty->termios.c_lflag & ICANON) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
30003a00: e000009a mul r0, sl, r0 <== NOT EXECUTED
rtems_clock_get_ticks_per_second() / 10;
30003a04: e59f3090 ldr r3, [pc, #144] ; 30003a9c <rtems_termios_ioctl+0x3d0><== NOT EXECUTED
if (tty->termios.c_cc[VTIME]) {
30003a08: e5d52046 ldrb r2, [r5, #70] ; 0x46 <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
rtems_clock_get_ticks_per_second() / 10;
30003a0c: e0831390 umull r1, r3, r0, r3 <== NOT EXECUTED
if (tty->termios.c_cc[VTIME]) {
30003a10: e3520000 cmp r2, #0 <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
rtems_clock_get_ticks_per_second() / 10;
30003a14: e1a031a3 lsr r3, r3, #3 <== NOT EXECUTED
if (tty->termios.c_lflag & ICANON) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
30003a18: e5853054 str r3, [r5, #84] ; 0x54 <== NOT EXECUTED
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
30003a1c: 0a00000b beq 30003a50 <rtems_termios_ioctl+0x384> <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
if (tty->termios.c_cc[VMIN])
30003a20: e5d52047 ldrb r2, [r5, #71] ; 0x47 <== NOT EXECUTED
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
30003a24: e585806c str r8, [r5, #108] ; 0x6c <== NOT EXECUTED
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
if (tty->termios.c_cc[VMIN])
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
30003a28: e3520000 cmp r2, #0 <== NOT EXECUTED
30003a2c: 01a02003 moveq r2, r3 <== NOT EXECUTED
30003a30: 13a02000 movne r2, #0 <== NOT EXECUTED
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
30003a34: e5853070 str r3, [r5, #112] ; 0x70 <== NOT EXECUTED
if (tty->termios.c_cc[VMIN])
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
30003a38: e5852074 str r2, [r5, #116] ; 0x74 <== NOT EXECUTED
30003a3c: eaffffa8 b 300038e4 <rtems_termios_ioctl+0x218> <== 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;
30003a40: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
30003a44: e3833c01 orr r3, r3, #256 ; 0x100 <== NOT EXECUTED
30003a48: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED
30003a4c: eaffff94 b 300038a4 <rtems_termios_ioctl+0x1d8> <== NOT EXECUTED
if (tty->termios.c_cc[VMIN])
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
} else {
if (tty->termios.c_cc[VMIN]) {
30003a50: e5d53047 ldrb r3, [r5, #71] ; 0x47 <== NOT EXECUTED
30003a54: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
30003a58: 03a03001 moveq r3, #1 <== NOT EXECUTED
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
} else {
if (tty->termios.c_cc[VMIN]) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
30003a5c: 1585206c strne r2, [r5, #108] ; 0x6c <== NOT EXECUTED
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
30003a60: 15852070 strne r2, [r5, #112] ; 0x70 <== NOT EXECUTED
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
30003a64: 15852074 strne r2, [r5, #116] ; 0x74 <== NOT EXECUTED
} else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
30003a68: 0585306c streq r3, [r5, #108] ; 0x6c <== NOT EXECUTED
30003a6c: eaffff9c b 300038e4 <rtems_termios_ioctl+0x218> <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
/* if chars available, call write function... */
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
30003a70: e5953084 ldr r3, [r5, #132] ; 0x84 <== NOT EXECUTED
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
/* if chars available, call write function... */
(*tty->device.write)(
30003a74: e595107c ldr r1, [r5, #124] ; 0x7c <== NOT EXECUTED
30003a78: e5950010 ldr r0, [r5, #16] <== NOT EXECUTED
30003a7c: e0811003 add r1, r1, r3 <== NOT EXECUTED
30003a80: e3a02001 mov r2, #1 <== NOT EXECUTED
30003a84: e1a0e00f mov lr, pc <== NOT EXECUTED
30003a88: e595f0a4 ldr pc, [r5, #164] ; 0xa4 <== NOT EXECUTED
30003a8c: eaffff5e b 3000380c <rtems_termios_ioctl+0x140> <== NOT EXECUTED
30003048 <rtems_termios_open>:
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
30003048: 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(
3000304c: e59f7468 ldr r7, [pc, #1128] ; 300034bc <rtems_termios_open+0x474>
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
30003050: e1a06001 mov r6, r1
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
30003054: e3a01000 mov r1, #0
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
30003058: e24dd018 sub sp, sp, #24
3000305c: e1a05000 mov r5, r0
30003060: e1a08002 mov r8, r2
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
30003064: e5970000 ldr r0, [r7]
30003068: e1a02001 mov r2, r1
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
3000306c: e58d3010 str r3, [sp, #16]
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
30003070: eb00099a bl 300056e0 <rtems_semaphore_obtain>
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
30003074: e250a000 subs sl, r0, #0
30003078: 1a000021 bne 30003104 <rtems_termios_open+0xbc>
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
3000307c: e59fb43c ldr fp, [pc, #1084] ; 300034c0 <rtems_termios_open+0x478>
30003080: e59b9000 ldr r9, [fp]
30003084: e3590000 cmp r9, #0
30003088: 0a00002d beq 30003144 <rtems_termios_open+0xfc>
3000308c: e1a04009 mov r4, r9
30003090: ea000002 b 300030a0 <rtems_termios_open+0x58>
30003094: e5944000 ldr r4, [r4]
30003098: e3540000 cmp r4, #0
3000309c: 0a000028 beq 30003144 <rtems_termios_open+0xfc>
if ((tty->major == major) && (tty->minor == minor))
300030a0: e594300c ldr r3, [r4, #12]
300030a4: e1530005 cmp r3, r5
300030a8: 1afffff9 bne 30003094 <rtems_termios_open+0x4c>
300030ac: e5943010 ldr r3, [r4, #16]
300030b0: e1530006 cmp r3, r6
300030b4: 1afffff6 bne 30003094 <rtems_termios_open+0x4c>
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
if (!tty->refcount++) {
300030b8: e5943008 ldr r3, [r4, #8]
*/
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
300030bc: e5981000 ldr r1, [r8]
if (!tty->refcount++) {
300030c0: e2832001 add r2, r3, #1
300030c4: e3530000 cmp r3, #0
*/
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
300030c8: e5814034 str r4, [r1, #52] ; 0x34
if (!tty->refcount++) {
300030cc: e5842008 str r2, [r4, #8]
300030d0: 1a000009 bne 300030fc <rtems_termios_open+0xb4>
if (tty->device.firstOpen)
300030d4: e5943098 ldr r3, [r4, #152] ; 0x98
300030d8: e3530000 cmp r3, #0
(*tty->device.firstOpen)(major, minor, arg);
300030dc: 11a00005 movne r0, r5
300030e0: 11a01006 movne r1, r6
300030e4: 11a02008 movne r2, r8
300030e8: 11a0e00f movne lr, pc
300030ec: 112fff13 bxne r3
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
300030f0: e59430b4 ldr r3, [r4, #180] ; 0xb4
300030f4: e3530002 cmp r3, #2
300030f8: 0a000004 beq 30003110 <rtems_termios_open+0xc8>
tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
300030fc: e5970000 ldr r0, [r7]
30003100: eb0009bf bl 30005804 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
}
30003104: e1a0000a mov r0, sl
30003108: e28dd018 add sp, sp, #24
3000310c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_start(
30003110: e59400c4 ldr r0, [r4, #196] ; 0xc4
30003114: e59f13a8 ldr r1, [pc, #936] ; 300034c4 <rtems_termios_open+0x47c>
30003118: e1a02004 mov r2, r4
3000311c: eb000a8c bl 30005b54 <rtems_task_start>
tty->rxTaskId, rtems_termios_rxdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
30003120: e3500000 cmp r0, #0
30003124: 1a0000ca bne 30003454 <rtems_termios_open+0x40c>
rtems_fatal_error_occurred (sc);
sc = rtems_task_start(
30003128: e59400c8 ldr r0, [r4, #200] ; 0xc8
3000312c: e59f1394 ldr r1, [pc, #916] ; 300034c8 <rtems_termios_open+0x480>
30003130: e1a02004 mov r2, r4
30003134: eb000a86 bl 30005b54 <rtems_task_start>
tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
30003138: e3500000 cmp r0, #0
3000313c: 0affffee beq 300030fc <rtems_termios_open+0xb4>
30003140: ea0000c3 b 30003454 <rtems_termios_open+0x40c> <== NOT EXECUTED
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
30003144: e3a00001 mov r0, #1
30003148: e3a010e8 mov r1, #232 ; 0xe8
3000314c: ebfffb49 bl 30001e78 <calloc>
if (tty == NULL) {
30003150: e3500000 cmp r0, #0
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
30003154: e58d0014 str r0, [sp, #20]
30003158: e1a04000 mov r4, r0
if (tty == NULL) {
3000315c: 0a0000a8 beq 30003404 <rtems_termios_open+0x3bc>
return RTEMS_NO_MEMORY;
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
30003160: e59f0364 ldr r0, [pc, #868] ; 300034cc <rtems_termios_open+0x484>
30003164: e59d1014 ldr r1, [sp, #20]
30003168: e5903000 ldr r3, [r0]
3000316c: e5813064 str r3, [r1, #100] ; 0x64
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
30003170: e5910064 ldr r0, [r1, #100] ; 0x64
30003174: ebfffca5 bl 30002410 <malloc>
30003178: e59d2014 ldr r2, [sp, #20]
if (tty->rawInBuf.theBuf == NULL) {
3000317c: e3500000 cmp r0, #0
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
30003180: e1a03000 mov r3, r0
30003184: e5820058 str r0, [r2, #88] ; 0x58
if (tty->rawInBuf.theBuf == NULL) {
30003188: 0a0000a1 beq 30003414 <rtems_termios_open+0x3cc>
return RTEMS_NO_MEMORY;
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
3000318c: e59fe338 ldr lr, [pc, #824] ; 300034cc <rtems_termios_open+0x484>
30003190: e59d0014 ldr r0, [sp, #20]
30003194: e59e2004 ldr r2, [lr, #4]
30003198: e5802088 str r2, [r0, #136] ; 0x88
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
3000319c: e5900088 ldr r0, [r0, #136] ; 0x88
300031a0: e58d3008 str r3, [sp, #8]
300031a4: ebfffc99 bl 30002410 <malloc>
300031a8: e59de014 ldr lr, [sp, #20]
if (tty->rawOutBuf.theBuf == NULL) {
300031ac: e3500000 cmp r0, #0
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
300031b0: e1a02000 mov r2, r0
300031b4: e58e007c str r0, [lr, #124] ; 0x7c
if (tty->rawOutBuf.theBuf == NULL) {
300031b8: e59d3008 ldr r3, [sp, #8]
300031bc: 0a00008c beq 300033f4 <rtems_termios_open+0x3ac>
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
300031c0: e59f1304 ldr r1, [pc, #772] ; 300034cc <rtems_termios_open+0x484>
300031c4: e5910008 ldr r0, [r1, #8]
300031c8: e58d200c str r2, [sp, #12]
300031cc: e58d3008 str r3, [sp, #8]
300031d0: ebfffc8e bl 30002410 <malloc>
300031d4: e59de014 ldr lr, [sp, #20]
if (tty->cbuf == NULL) {
300031d8: e3500000 cmp r0, #0
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
300031dc: e58e001c str r0, [lr, #28]
if (tty->cbuf == NULL) {
300031e0: e59d200c ldr r2, [sp, #12]
300031e4: 0a00007f beq 300033e8 <rtems_termios_open+0x3a0>
return RTEMS_NO_MEMORY;
}
/*
* Initialize wakeup callbacks
*/
tty->tty_snd.sw_pfn = NULL;
300031e8: e59d0014 ldr r0, [sp, #20]
300031ec: e3a03000 mov r3, #0
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
300031f0: e5803004 str r3, [r0, #4]
if (rtems_termios_ttyHead != NULL)
300031f4: e1590003 cmp r9, r3
return RTEMS_NO_MEMORY;
}
/*
* Initialize wakeup callbacks
*/
tty->tty_snd.sw_pfn = NULL;
300031f8: e58030d4 str r3, [r0, #212] ; 0xd4
tty->tty_snd.sw_arg = NULL;
300031fc: e58030d8 str r3, [r0, #216] ; 0xd8
tty->tty_rcv.sw_pfn = NULL;
30003200: e58030dc str r3, [r0, #220] ; 0xdc
tty->tty_rcv.sw_arg = NULL;
30003204: e58030e0 str r3, [r0, #224] ; 0xe0
tty->tty_rcvwakeup = 0;
30003208: e58030e4 str r3, [r0, #228] ; 0xe4
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)
3000320c: e59f32bc ldr r3, [pc, #700] ; 300034d0 <rtems_termios_open+0x488>
* link tty
*/
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
rtems_termios_ttyHead->back = tty;
30003210: 15890004 strne r0, [r9, #4]
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
30003214: e5932000 ldr r2, [r3]
*/
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
30003218: e59d1014 ldr r1, [sp, #20]
if (rtems_termios_ttyTail == NULL)
3000321c: e3520000 cmp r2, #0
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'i', c),
30003220: e59f22a4 ldr r2, [pc, #676] ; 300034cc <rtems_termios_open+0x484>
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;
30003224: 05831000 streq r1, [r3]
tty->tty_rcvwakeup = 0;
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
30003228: e5809000 str r9, [r0]
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'i', c),
3000322c: e5d2300c ldrb r3, [r2, #12]
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
30003230: e59de014 ldr lr, [sp, #20]
30003234: e59f0298 ldr r0, [pc, #664] ; 300034d4 <rtems_termios_open+0x48c>
*/
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
30003238: e58b1000 str r1, [fp]
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
3000323c: e28ec014 add ip, lr, #20
30003240: e1830000 orr r0, r3, r0
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
rtems_termios_ttyTail = tty;
tty->minor = minor;
30003244: e58e6010 str r6, [lr, #16]
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
30003248: e3a03000 mov r3, #0
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
rtems_termios_ttyTail = tty;
tty->minor = minor;
tty->major = major;
3000324c: e58e500c str r5, [lr, #12]
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
30003250: e3a01001 mov r1, #1
30003254: e3a02054 mov r2, #84 ; 0x54
30003258: e58dc000 str ip, [sp]
3000325c: eb000885 bl 30005478 <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)
30003260: e2503000 subs r3, r0, #0
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'i', c),
30003264: e59f9260 ldr r9, [pc, #608] ; 300034cc <rtems_termios_open+0x484>
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->isem);
if (sc != RTEMS_SUCCESSFUL)
30003268: 1a000079 bne 30003454 <rtems_termios_open+0x40c>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'o', c),
3000326c: e5d9200c ldrb r2, [r9, #12]
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->isem);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
30003270: e59d1014 ldr r1, [sp, #20]
30003274: e59f025c ldr r0, [pc, #604] ; 300034d8 <rtems_termios_open+0x490>
30003278: e281c018 add ip, r1, #24
3000327c: e1820000 orr r0, r2, r0
30003280: e3a01001 mov r1, #1
30003284: e3a02054 mov r2, #84 ; 0x54
30003288: e58dc000 str ip, [sp]
3000328c: eb000879 bl 30005478 <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)
30003290: e2501000 subs r1, r0, #0
30003294: 1a00006e bne 30003454 <rtems_termios_open+0x40c>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'x', c),
30003298: e5d9300c ldrb r3, [r9, #12]
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->osem);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
3000329c: e59d2014 ldr r2, [sp, #20]
300032a0: e59f0234 ldr r0, [pc, #564] ; 300034dc <rtems_termios_open+0x494>
300032a4: e282c08c add ip, r2, #140 ; 0x8c
300032a8: e1830000 orr r0, r3, r0
300032ac: e3a02020 mov r2, #32
300032b0: e1a03001 mov r3, r1
300032b4: e58dc000 str ip, [sp]
300032b8: eb00086e bl 30005478 <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)
300032bc: e250b000 subs fp, r0, #0
300032c0: 1a000063 bne 30003454 <rtems_termios_open+0x40c>
tty->rawOutBufState = rob_idle;
/*
* Set callbacks
*/
tty->device = *callbacks;
300032c4: e59d3014 ldr r3, [sp, #20]
300032c8: e59dc010 ldr ip, [sp, #16]
300032cc: e283e098 add lr, r3, #152 ; 0x98
300032d0: e8bc000f ldm ip!, {r0, r1, r2, r3}
300032d4: e8ae000f stmia lr!, {r0, r1, r2, r3}
300032d8: e89c000f ldm ip, {r0, r1, r2, r3}
300032dc: e88e000f stm lr, {r0, r1, r2, r3}
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
300032e0: e59de014 ldr lr, [sp, #20]
300032e4: e59e30b4 ldr r3, [lr, #180] ; 0xb4
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;
300032e8: e58eb094 str fp, [lr, #148] ; 0x94
tty->device = *callbacks;
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
300032ec: e3530002 cmp r3, #2
300032f0: 0a000058 beq 30003458 <rtems_termios_open+0x410>
&tty->rxTaskId);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
300032f4: e59d2014 ldr r2, [sp, #20]
300032f8: e59230a0 ldr r3, [r2, #160] ; 0xa0
300032fc: e3530000 cmp r3, #0
30003300: 0a000046 beq 30003420 <rtems_termios_open+0x3d8>
30003304: e59230b4 ldr r3, [r2, #180] ; 0xb4
30003308: e3530002 cmp r3, #2
3000330c: 0a000043 beq 30003420 <rtems_termios_open+0x3d8>
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;
30003310: e59de014 ldr lr, [sp, #20]
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';
30003314: e3a03000 mov r3, #0
tty->termios.c_cc[VDISCARD] = '\017';
tty->termios.c_cc[VWERASE] = '\027';
tty->termios.c_cc[VLNEXT] = '\026';
/* start with no flow control, clear flow control flags */
tty->flow_ctrl = 0;
30003318: e58e30b8 str r3, [lr, #184] ; 0xb8
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
3000331c: e59f01a8 ldr r0, [pc, #424] ; 300034cc <rtems_termios_open+0x484>
/* 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;
30003320: e59ec064 ldr ip, [lr, #100] ; 0x64
tty->highwater = tty->rawInBuf.Size * 3/4;
30003324: e59e1064 ldr r1, [lr, #100] ; 0x64
/*
* Bump name characer
*/
if (c++ == 'z')
30003328: e5d0200c ldrb r2, [r0, #12]
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;
3000332c: e0811081 add r1, r1, r1, lsl #1
/*
* Bump name characer
*/
if (c++ == 'z')
30003330: e352007a cmp r2, #122 ; 0x7a
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;
30003334: e1a00121 lsr r0, r1, #2
/*
* Bump name characer
*/
if (c++ == 'z')
30003338: e2821001 add r1, r2, #1
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
3000333c: e59f219c ldr r2, [pc, #412] ; 300034e0 <rtems_termios_open+0x498>
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';
30003340: e5ce304c strb r3, [lr, #76] ; 0x4c
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
30003344: e58e2030 str r2, [lr, #48] ; 0x30
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
30003348: e59f2194 ldr r2, [pc, #404] ; 300034e4 <rtems_termios_open+0x49c>
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';
tty->termios.c_cc[VEOL2] = '\000';
3000334c: e5ce3051 strb r3, [lr, #81] ; 0x51
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
30003350: e58e2034 str r2, [lr, #52] ; 0x34
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
30003354: e59f218c ldr r2, [pc, #396] ; 300034e8 <rtems_termios_open+0x4a0>
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';
30003358: e3a03011 mov r3, #17
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
3000335c: e58e2038 str r2, [lr, #56] ; 0x38
tty->termios.c_lflag =
30003360: e59f2184 ldr r2, [pc, #388] ; 300034ec <rtems_termios_open+0x4a4>
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';
30003364: e5ce3049 strb r3, [lr, #73] ; 0x49
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
tty->termios.c_lflag =
30003368: e58e203c str r2, [lr, #60] ; 0x3c
tty->termios.c_cc[VKILL] = '\025';
tty->termios.c_cc[VEOF] = '\004';
tty->termios.c_cc[VEOL] = '\000';
tty->termios.c_cc[VEOL2] = '\000';
tty->termios.c_cc[VSTART] = '\021';
tty->termios.c_cc[VSTOP] = '\023';
3000336c: e3a03013 mov r3, #19
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';
30003370: e3a02003 mov r2, #3
30003374: e5ce2041 strb r2, [lr, #65] ; 0x41
tty->termios.c_cc[VKILL] = '\025';
tty->termios.c_cc[VEOF] = '\004';
tty->termios.c_cc[VEOL] = '\000';
tty->termios.c_cc[VEOL2] = '\000';
tty->termios.c_cc[VSTART] = '\021';
tty->termios.c_cc[VSTOP] = '\023';
30003378: e5ce304a strb r3, [lr, #74] ; 0x4a
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';
3000337c: e3a0201c mov r2, #28
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';
30003380: e3a0301a mov r3, #26
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';
30003384: e5ce2042 strb r2, [lr, #66] ; 0x42
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';
30003388: e5ce304b strb r3, [lr, #75] ; 0x4b
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';
3000338c: e3a0207f mov r2, #127 ; 0x7f
tty->termios.c_cc[VEOL] = '\000';
tty->termios.c_cc[VEOL2] = '\000';
tty->termios.c_cc[VSTART] = '\021';
tty->termios.c_cc[VSTOP] = '\023';
tty->termios.c_cc[VSUSP] = '\032';
tty->termios.c_cc[VREPRINT] = '\022';
30003390: e3a03012 mov r3, #18
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';
30003394: e5ce2043 strb r2, [lr, #67] ; 0x43
tty->termios.c_cc[VEOL] = '\000';
tty->termios.c_cc[VEOL2] = '\000';
tty->termios.c_cc[VSTART] = '\021';
tty->termios.c_cc[VSTOP] = '\023';
tty->termios.c_cc[VSUSP] = '\032';
tty->termios.c_cc[VREPRINT] = '\022';
30003398: e5ce304d strb r3, [lr, #77] ; 0x4d
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';
3000339c: e3a02015 mov r2, #21
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';
300033a0: e3a0300f mov r3, #15
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';
300033a4: e5ce2044 strb r2, [lr, #68] ; 0x44
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';
300033a8: e5ce304e strb r3, [lr, #78] ; 0x4e
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';
300033ac: e3a02004 mov r2, #4
tty->termios.c_cc[VSTART] = '\021';
tty->termios.c_cc[VSTOP] = '\023';
tty->termios.c_cc[VSUSP] = '\032';
tty->termios.c_cc[VREPRINT] = '\022';
tty->termios.c_cc[VDISCARD] = '\017';
tty->termios.c_cc[VWERASE] = '\027';
300033b0: e3a03017 mov r3, #23
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';
300033b4: e5ce2045 strb r2, [lr, #69] ; 0x45
tty->termios.c_cc[VSTART] = '\021';
tty->termios.c_cc[VSTOP] = '\023';
tty->termios.c_cc[VSUSP] = '\032';
tty->termios.c_cc[VREPRINT] = '\022';
tty->termios.c_cc[VDISCARD] = '\017';
tty->termios.c_cc[VWERASE] = '\027';
300033b8: e5ce304f strb r3, [lr, #79] ; 0x4f
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
300033bc: e59f2108 ldr r2, [pc, #264] ; 300034cc <rtems_termios_open+0x484>
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';
300033c0: e3a03016 mov r3, #22
300033c4: e5ce3050 strb r3, [lr, #80] ; 0x50
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
c = 'a';
300033c8: 059f30fc ldreq r3, [pc, #252] ; 300034cc <rtems_termios_open+0x484>
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
300033cc: e5c2100c strb r1, [r2, #12]
/* 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;
300033d0: e1a0c0ac lsr ip, ip, #1
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
c = 'a';
300033d4: 03a02061 moveq r2, #97 ; 0x61
/* 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;
300033d8: e58ec0bc str ip, [lr, #188] ; 0xbc
tty->highwater = tty->rawInBuf.Size * 3/4;
300033dc: e58e00c0 str r0, [lr, #192] ; 0xc0
/*
* Bump name characer
*/
if (c++ == 'z')
c = 'a';
300033e0: 05c3200c strbeq r2, [r3, #12]
300033e4: eaffff33 b 300030b8 <rtems_termios_open+0x70>
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
if (tty->cbuf == NULL) {
free((void *)(tty->rawOutBuf.theBuf));
300033e8: e1a00002 mov r0, r2 <== NOT EXECUTED
300033ec: ebfffb2d bl 300020a8 <free> <== NOT EXECUTED
free((void *)(tty->rawInBuf.theBuf));
300033f0: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
300033f4: e1a00003 mov r0, r3 <== NOT EXECUTED
300033f8: ebfffb2a bl 300020a8 <free> <== NOT EXECUTED
free(tty);
300033fc: e59d0014 ldr r0, [sp, #20] <== NOT EXECUTED
30003400: ebfffb28 bl 300020a8 <free> <== NOT EXECUTED
rtems_semaphore_release (rtems_termios_ttyMutex);
30003404: e5970000 ldr r0, [r7] <== NOT EXECUTED
30003408: eb0008fd bl 30005804 <rtems_semaphore_release> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
3000340c: e3a0a01a mov sl, #26 <== NOT EXECUTED
30003410: eaffff3b b 30003104 <rtems_termios_open+0xbc> <== NOT EXECUTED
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
if (tty->rawInBuf.theBuf == NULL) {
free(tty);
30003414: e1a00002 mov r0, r2 <== NOT EXECUTED
30003418: ebfffb22 bl 300020a8 <free> <== NOT EXECUTED
3000341c: eafffff8 b 30003404 <rtems_termios_open+0x3bc> <== NOT EXECUTED
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'r', c),
30003420: e59fe0a4 ldr lr, [pc, #164] ; 300034cc <rtems_termios_open+0x484>
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
30003424: e59d2014 ldr r2, [sp, #20]
rtems_build_name ('T', 'R', 'r', c),
30003428: e5de300c ldrb r3, [lr, #12]
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
3000342c: e59f00bc ldr r0, [pc, #188] ; 300034f0 <rtems_termios_open+0x4a8>
30003430: e3a01000 mov r1, #0
30003434: e282c068 add ip, r2, #104 ; 0x68
30003438: e1830000 orr r0, r3, r0
3000343c: e3a02024 mov r2, #36 ; 0x24
30003440: e1a03001 mov r3, r1
30003444: e58dc000 str ip, [sp]
30003448: eb00080a bl 30005478 <rtems_semaphore_create>
rtems_build_name ('T', 'R', 'r', c),
0,
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->rawInBuf.Semaphore);
if (sc != RTEMS_SUCCESSFUL)
3000344c: e3500000 cmp r0, #0
30003450: 0affffae beq 30003310 <rtems_termios_open+0x2c8>
rtems_fatal_error_occurred (sc);
sc = rtems_task_start(
tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
30003454: eb000a45 bl 30005d70 <rtems_fatal_error_occurred>
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_create (
rtems_build_name ('T', 'x', 'T', c),
30003458: e5d9300c ldrb r3, [r9, #12]
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_create (
3000345c: e59f0090 ldr r0, [pc, #144] ; 300034f4 <rtems_termios_open+0x4ac>
30003460: e28ec0c8 add ip, lr, #200 ; 0xc8
30003464: e1830000 orr r0, r3, r0
30003468: e3a0100a mov r1, #10
3000346c: e3a02b01 mov r2, #1024 ; 0x400
30003470: e3a03c05 mov r3, #1280 ; 0x500
30003474: e88d1800 stm sp, {fp, ip}
30003478: eb00090b bl 300058ac <rtems_task_create>
TERMIOS_TXTASK_STACKSIZE,
RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE |
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->txTaskId);
if (sc != RTEMS_SUCCESSFUL)
3000347c: e250e000 subs lr, r0, #0
30003480: 1afffff3 bne 30003454 <rtems_termios_open+0x40c>
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
rtems_build_name ('R', 'x', 'T', c),
30003484: e5d9300c ldrb r3, [r9, #12]
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->txTaskId);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
30003488: e59d1014 ldr r1, [sp, #20]
3000348c: e59f0064 ldr r0, [pc, #100] ; 300034f8 <rtems_termios_open+0x4b0>
30003490: e281c0c4 add ip, r1, #196 ; 0xc4
30003494: e1830000 orr r0, r3, r0
30003498: e3a01009 mov r1, #9
3000349c: e3a02b01 mov r2, #1024 ; 0x400
300034a0: e3a03c05 mov r3, #1280 ; 0x500
300034a4: e58de000 str lr, [sp]
300034a8: e58dc004 str ip, [sp, #4]
300034ac: eb0008fe bl 300058ac <rtems_task_create>
TERMIOS_RXTASK_STACKSIZE,
RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE |
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->rxTaskId);
if (sc != RTEMS_SUCCESSFUL)
300034b0: e3500000 cmp r0, #0
300034b4: 0affff8e beq 300032f4 <rtems_termios_open+0x2ac>
300034b8: eaffffe5 b 30003454 <rtems_termios_open+0x40c> <== NOT EXECUTED
30003aa0 <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) {
30003aa0: e59230b4 ldr r3, [r2, #180] ; 0xb4
* Send characters to device-specific code
*/
void
rtems_termios_puts (
const void *_buf, int len, struct rtems_termios_tty *tty)
{
30003aa4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
const unsigned char *buf = _buf;
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
30003aa8: e3530000 cmp r3, #0
* Send characters to device-specific code
*/
void
rtems_termios_puts (
const void *_buf, int len, struct rtems_termios_tty *tty)
{
30003aac: e1a04002 mov r4, r2
30003ab0: e1a09000 mov r9, r0
30003ab4: e1a0a001 mov sl, r1
const unsigned char *buf = _buf;
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
30003ab8: 0a000037 beq 30003b9c <rtems_termios_puts+0xfc>
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
while (len) {
30003abc: e3510000 cmp r1, #0
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
30003ac0: e5928080 ldr r8, [r2, #128] ; 0x80
while (len) {
30003ac4: 08bd8ff0 popeq {r4, r5, r6, r7, r8, r9, sl, fp, pc}
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
rtems_interrupt_disable (level);
while (newHead == tty->rawOutBuf.Tail) {
tty->rawOutBufState = rob_wait;
30003ac8: e3a07002 mov r7, #2
(char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
} else {
/* remember that output has been stopped due to flow ctrl*/
tty->flow_ctrl |= FL_OSTOP;
}
tty->rawOutBufState = rob_busy;
30003acc: e3a0b001 mov fp, #1
* len -= ncopy
*
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
30003ad0: e5941088 ldr r1, [r4, #136] ; 0x88
30003ad4: e2880001 add r0, r8, #1
30003ad8: eb0035fb bl 300112cc <__umodsi3>
30003adc: e1a08000 mov r8, r0
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
30003ae0: e10f5000 mrs r5, CPSR
30003ae4: e3853080 orr r3, r5, #128 ; 0x80
30003ae8: e129f003 msr CPSR_fc, r3
rtems_interrupt_disable (level);
while (newHead == tty->rawOutBuf.Tail) {
30003aec: e5946084 ldr r6, [r4, #132] ; 0x84
30003af0: e1560000 cmp r6, r0
30003af4: 1a00000d bne 30003b30 <rtems_termios_puts+0x90>
tty->rawOutBufState = rob_wait;
30003af8: e5847094 str r7, [r4, #148] ; 0x94
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
30003afc: e129f005 msr CPSR_fc, r5
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain(
30003b00: e3a01000 mov r1, #0
30003b04: e594008c ldr r0, [r4, #140] ; 0x8c
30003b08: e1a02001 mov r2, r1
30003b0c: eb0006f3 bl 300056e0 <rtems_semaphore_obtain>
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
30003b10: e3500000 cmp r0, #0
30003b14: 1a000026 bne 30003bb4 <rtems_termios_puts+0x114>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
30003b18: e10f5000 mrs r5, CPSR
30003b1c: e3853080 orr r3, r5, #128 ; 0x80
30003b20: e129f003 msr CPSR_fc, r3
* 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) {
30003b24: e5943084 ldr r3, [r4, #132] ; 0x84
30003b28: e1530006 cmp r3, r6
30003b2c: 0afffff1 beq 30003af8 <rtems_termios_puts+0x58>
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
30003b30: e5943080 ldr r3, [r4, #128] ; 0x80
30003b34: e4d91001 ldrb r1, [r9], #1
30003b38: e594207c ldr r2, [r4, #124] ; 0x7c
30003b3c: e7c21003 strb r1, [r2, r3]
tty->rawOutBuf.Head = newHead;
if (tty->rawOutBufState == rob_idle) {
30003b40: e5943094 ldr r3, [r4, #148] ; 0x94
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
tty->rawOutBuf.Head = newHead;
30003b44: e5848080 str r8, [r4, #128] ; 0x80
if (tty->rawOutBufState == rob_idle) {
30003b48: e3530000 cmp r3, #0
30003b4c: 1a000006 bne 30003b6c <rtems_termios_puts+0xcc>
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
30003b50: e59430b8 ldr r3, [r4, #184] ; 0xb8
30003b54: e3130010 tst r3, #16
30003b58: 0a000007 beq 30003b7c <rtems_termios_puts+0xdc>
(*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;
30003b5c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
30003b60: e3833020 orr r3, r3, #32 <== NOT EXECUTED
30003b64: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
}
tty->rawOutBufState = rob_busy;
30003b68: e584b094 str fp, [r4, #148] ; 0x94
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
30003b6c: e129f005 msr CPSR_fc, r5
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
while (len) {
30003b70: e25aa001 subs sl, sl, #1
30003b74: 1affffd5 bne 30003ad0 <rtems_termios_puts+0x30>
30003b78: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
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,
(char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
30003b7c: e5943084 ldr r3, [r4, #132] ; 0x84
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
tty->rawOutBuf.Head = newHead;
if (tty->rawOutBufState == rob_idle) {
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
(*tty->device.write)(tty->minor,
30003b80: e594107c ldr r1, [r4, #124] ; 0x7c
30003b84: e5940010 ldr r0, [r4, #16]
30003b88: e0811003 add r1, r1, r3
30003b8c: e3a02001 mov r2, #1
30003b90: e1a0e00f mov lr, pc
30003b94: e594f0a4 ldr pc, [r4, #164] ; 0xa4
30003b98: eafffff2 b 30003b68 <rtems_termios_puts+0xc8>
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);
30003b9c: e5920010 ldr r0, [r2, #16]
30003ba0: e1a01009 mov r1, r9
30003ba4: e1a0200a mov r2, sl
30003ba8: e1a0e00f mov lr, pc
30003bac: e594f0a4 ldr pc, [r4, #164] ; 0xa4
return;
30003bb0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
tty->rawOutBufState = rob_wait;
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain(
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
30003bb4: eb00086d bl 30005d70 <rtems_fatal_error_occurred> <== NOT EXECUTED
300042c8 <rtems_termios_read>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
300042c8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
300042cc: e5903000 ldr r3, [r0]
uint32_t count = args->count;
char *buffer = args->buffer;
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
300042d0: e3a01000 mov r1, #0
rtems_status_code
rtems_termios_read (void *arg)
{
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
300042d4: e5934034 ldr r4, [r3, #52] ; 0x34
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
300042d8: e1a09000 mov r9, r0
300042dc: e24dd008 sub sp, sp, #8
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);
300042e0: e1a02001 mov r2, r1
300042e4: e5940014 ldr r0, [r4, #20]
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;
300042e8: e5998010 ldr r8, [r9, #16]
char *buffer = args->buffer;
300042ec: e599a00c ldr sl, [r9, #12]
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
300042f0: eb0004fa bl 300056e0 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
300042f4: e3500000 cmp r0, #0
300042f8: e58d0000 str r0, [sp]
300042fc: 1a00000e bne 3000433c <rtems_termios_read+0x74>
return sc;
if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
30004300: e59420cc ldr r2, [r4, #204] ; 0xcc
30004304: e59f3350 ldr r3, [pc, #848] ; 3000465c <rtems_termios_read+0x394>
30004308: e0833282 add r3, r3, r2, lsl #5
3000430c: e5933008 ldr r3, [r3, #8]
30004310: e3530000 cmp r3, #0
30004314: 0a00000b beq 30004348 <rtems_termios_read+0x80>
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
30004318: e1a00004 mov r0, r4
3000431c: e1a01009 mov r1, r9
30004320: e1a0e00f mov lr, pc
30004324: e12fff13 bx r3
tty->tty_rcvwakeup = 0;
30004328: e3a03000 mov r3, #0
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);
3000432c: e58d0000 str r0, [sp]
tty->tty_rcvwakeup = 0;
30004330: e58430e4 str r3, [r4, #228] ; 0xe4
rtems_semaphore_release (tty->isem);
30004334: e5940014 ldr r0, [r4, #20]
30004338: eb000531 bl 30005804 <rtems_semaphore_release>
}
args->bytes_moved = args->count - count;
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
3000433c: e59d0000 ldr r0, [sp]
30004340: e28dd008 add sp, sp, #8
30004344: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
30004348: e5942024 ldr r2, [r4, #36] ; 0x24
3000434c: e5943020 ldr r3, [r4, #32]
30004350: e1520003 cmp r2, r3
30004354: 0a000018 beq 300043bc <rtems_termios_read+0xf4>
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
30004358: e3580000 cmp r8, #0
3000435c: 0a00000e beq 3000439c <rtems_termios_read+0xd4>
30004360: e5943024 ldr r3, [r4, #36] ; 0x24
30004364: e5942020 ldr r2, [r4, #32]
30004368: e1530002 cmp r3, r2
3000436c: ba000003 blt 30004380 <rtems_termios_read+0xb8>
30004370: ea000009 b 3000439c <rtems_termios_read+0xd4> <== NOT EXECUTED
30004374: e5942020 ldr r2, [r4, #32]
30004378: e1520003 cmp r2, r3
3000437c: da000006 ble 3000439c <rtems_termios_read+0xd4>
*buffer++ = tty->cbuf[tty->cindex++];
30004380: e594201c ldr r2, [r4, #28]
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
30004384: e2588001 subs r8, r8, #1
*buffer++ = tty->cbuf[tty->cindex++];
30004388: e7d22003 ldrb r2, [r2, r3]
3000438c: e2833001 add r3, r3, #1
30004390: e4ca2001 strb r2, [sl], #1
30004394: e5843024 str r3, [r4, #36] ; 0x24
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
30004398: 1afffff5 bne 30004374 <rtems_termios_read+0xac>
*buffer++ = tty->cbuf[tty->cindex++];
count--;
}
args->bytes_moved = args->count - count;
3000439c: e5993010 ldr r3, [r9, #16]
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
300043a0: e5940014 ldr r0, [r4, #20]
}
while (count && (tty->cindex < tty->ccount)) {
*buffer++ = tty->cbuf[tty->cindex++];
count--;
}
args->bytes_moved = args->count - count;
300043a4: e0688003 rsb r8, r8, r3
tty->tty_rcvwakeup = 0;
300043a8: e3a03000 mov r3, #0
}
while (count && (tty->cindex < tty->ccount)) {
*buffer++ = tty->cbuf[tty->cindex++];
count--;
}
args->bytes_moved = args->count - count;
300043ac: e5898018 str r8, [r9, #24]
tty->tty_rcvwakeup = 0;
300043b0: e58430e4 str r3, [r4, #228] ; 0xe4
rtems_semaphore_release (tty->isem);
300043b4: eb000512 bl 30005804 <rtems_semaphore_release>
return sc;
300043b8: eaffffdf b 3000433c <rtems_termios_read+0x74>
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
tty->read_start_column = tty->column;
if (tty->device.pollRead != NULL &&
300043bc: e59430a0 ldr r3, [r4, #160] ; 0xa0
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
300043c0: e59d1000 ldr r1, [sp]
tty->read_start_column = tty->column;
300043c4: e5942028 ldr r2, [r4, #40] ; 0x28
if (tty->device.pollRead != NULL &&
300043c8: e3530000 cmp r3, #0
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
300043cc: e5841020 str r1, [r4, #32]
300043d0: e5841024 str r1, [r4, #36] ; 0x24
tty->read_start_column = tty->column;
300043d4: e584202c str r2, [r4, #44] ; 0x2c
if (tty->device.pollRead != NULL &&
300043d8: 0a000002 beq 300043e8 <rtems_termios_read+0x120>
300043dc: e59420b4 ldr r2, [r4, #180] ; 0xb4
300043e0: e3520000 cmp r2, #0
300043e4: 0a000060 beq 3000456c <rtems_termios_read+0x2a4>
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)(
300043e8: e2843049 add r3, r4, #73 ; 0x49
* Fill the input buffer from the raw input queue
*/
static rtems_status_code
fillBufferQueue (struct rtems_termios_tty *tty)
{
rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout;
300043ec: e5946074 ldr r6, [r4, #116] ; 0x74
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
(tty->ccount < (CBUFSIZE-1))) {
300043f0: e59f7268 ldr r7, [pc, #616] ; 30004660 <rtems_termios_read+0x398>
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))
300043f4: e59fb268 ldr fp, [pc, #616] ; 30004664 <rtems_termios_read+0x39c>
static rtems_status_code
fillBufferQueue (struct rtems_termios_tty *tty)
{
rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout;
rtems_status_code sc;
int wait = (int)1;
300043f8: e3a05001 mov r5, #1
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)(
300043fc: e58d3004 str r3, [sp, #4]
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
30004400: e594205c ldr r2, [r4, #92] ; 0x5c
30004404: e5943060 ldr r3, [r4, #96] ; 0x60
30004408: e1520003 cmp r2, r3
3000440c: 1a00000a bne 3000443c <rtems_termios_read+0x174>
30004410: ea000040 b 30004518 <rtems_termios_read+0x250>
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
if (siproc (c, tty))
30004414: e1a00006 mov r0, r6
30004418: e1a01004 mov r1, r4
3000441c: ebffff60 bl 300041a4 <siproc>
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
30004420: e594205c ldr r2, [r4, #92] ; 0x5c
30004424: e5943060 ldr r3, [r4, #96] ; 0x60
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
if (siproc (c, tty))
wait = 0;
30004428: e3500000 cmp r0, #0
3000442c: 13a05000 movne r5, #0
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
30004430: e1520003 cmp r2, r3
} else {
siproc (c, tty);
if (tty->ccount >= tty->termios.c_cc[VMIN])
wait = 0;
}
timeout = tty->rawInBufSemaphoreTimeout;
30004434: e5946070 ldr r6, [r4, #112] ; 0x70
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
30004438: 0a000036 beq 30004518 <rtems_termios_read+0x250>
(tty->ccount < (CBUFSIZE-1))) {
3000443c: e5973008 ldr r3, [r7, #8]
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
30004440: e5942020 ldr r2, [r4, #32]
(tty->ccount < (CBUFSIZE-1))) {
30004444: e2433001 sub r3, r3, #1
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
30004448: e1520003 cmp r2, r3
3000444c: aa000031 bge 30004518 <rtems_termios_read+0x250>
(tty->ccount < (CBUFSIZE-1))) {
unsigned char c;
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
30004450: e594005c ldr r0, [r4, #92] ; 0x5c
30004454: e5941064 ldr r1, [r4, #100] ; 0x64
30004458: e2800001 add r0, r0, #1
3000445c: eb00339a bl 300112cc <__umodsi3>
c = tty->rawInBuf.theBuf[newHead];
30004460: e5943058 ldr r3, [r4, #88] ; 0x58
30004464: e7d36000 ldrb r6, [r3, r0]
tty->rawInBuf.Head = newHead;
30004468: e584005c str r0, [r4, #92] ; 0x5c
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
3000446c: e5943060 ldr r3, [r4, #96] ; 0x60
30004470: e5942064 ldr r2, [r4, #100] ; 0x64
% tty->rawInBuf.Size)
30004474: e5941064 ldr r1, [r4, #100] ; 0x64
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
c = tty->rawInBuf.theBuf[newHead];
tty->rawInBuf.Head = newHead;
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
30004478: e0823003 add r3, r2, r3
% tty->rawInBuf.Size)
3000447c: e0600003 rsb r0, r0, r3
30004480: eb003391 bl 300112cc <__umodsi3>
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
c = tty->rawInBuf.theBuf[newHead];
tty->rawInBuf.Head = newHead;
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
30004484: e59430bc ldr r3, [r4, #188] ; 0xbc
30004488: e1500003 cmp r0, r3
3000448c: 2a000012 bcs 300044dc <rtems_termios_read+0x214>
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
30004490: e59420b8 ldr r2, [r4, #184] ; 0xb8
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
30004494: e59f31c8 ldr r3, [pc, #456] ; 30004664 <rtems_termios_read+0x39c>
c = tty->rawInBuf.theBuf[newHead];
tty->rawInBuf.Head = newHead;
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
30004498: e3c22001 bic r2, r2, #1
3000449c: e58420b8 str r2, [r4, #184] ; 0xb8
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
300044a0: e59420b8 ldr r2, [r4, #184] ; 0xb8
300044a4: e0023003 and r3, r2, r3
300044a8: e153000b cmp r3, fp
300044ac: 0a000022 beq 3000453c <rtems_termios_read+0x274>
&& ((tty->rawOutBufState == rob_idle)
|| (tty->flow_ctrl & FL_OSTOP))) {
/* XON should be sent now... */
(*tty->device.write)(
tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
} else if (tty->flow_ctrl & FL_MDRTS) {
300044b0: e59430b8 ldr r3, [r4, #184] ; 0xb8
300044b4: e3130c01 tst r3, #256 ; 0x100
300044b8: 0a000007 beq 300044dc <rtems_termios_read+0x214>
tty->flow_ctrl &= ~FL_IRTSOFF;
300044bc: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
300044c0: e59430b0 ldr r3, [r4, #176] ; 0xb0 <== NOT EXECUTED
|| (tty->flow_ctrl & FL_OSTOP))) {
/* XON should be sent now... */
(*tty->device.write)(
tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
} else if (tty->flow_ctrl & FL_MDRTS) {
tty->flow_ctrl &= ~FL_IRTSOFF;
300044c4: e3c22004 bic r2, r2, #4 <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
300044c8: e3530000 cmp r3, #0 <== NOT EXECUTED
|| (tty->flow_ctrl & FL_OSTOP))) {
/* XON should be sent now... */
(*tty->device.write)(
tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
} else if (tty->flow_ctrl & FL_MDRTS) {
tty->flow_ctrl &= ~FL_IRTSOFF;
300044cc: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
tty->device.startRemoteTx(tty->minor);
300044d0: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED
300044d4: 11a0e00f movne lr, pc <== NOT EXECUTED
300044d8: 112fff13 bxne r3 <== NOT EXECUTED
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
300044dc: e594303c ldr r3, [r4, #60] ; 0x3c
300044e0: e3130002 tst r3, #2
300044e4: 1affffca bne 30004414 <rtems_termios_read+0x14c>
if (siproc (c, tty))
wait = 0;
} else {
siproc (c, tty);
300044e8: e1a00006 mov r0, r6 <== NOT EXECUTED
300044ec: e1a01004 mov r1, r4 <== NOT EXECUTED
300044f0: ebffff2b bl 300041a4 <siproc> <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
300044f4: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED
300044f8: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED
wait = 0;
}
timeout = tty->rawInBufSemaphoreTimeout;
300044fc: e5946070 ldr r6, [r4, #112] ; 0x70 <== NOT EXECUTED
if (siproc (c, tty))
wait = 0;
} else {
siproc (c, tty);
if (tty->ccount >= tty->termios.c_cc[VMIN])
wait = 0;
30004500: e1520003 cmp r2, r3 <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
30004504: e594205c ldr r2, [r4, #92] ; 0x5c <== NOT EXECUTED
30004508: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED
if (siproc (c, tty))
wait = 0;
} else {
siproc (c, tty);
if (tty->ccount >= tty->termios.c_cc[VMIN])
wait = 0;
3000450c: a3a05000 movge r5, #0 <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
30004510: e1520003 cmp r2, r3 <== NOT EXECUTED
30004514: 1affffc8 bne 3000443c <rtems_termios_read+0x174> <== NOT EXECUTED
}
/*
* Wait for characters
*/
if ( wait ) {
30004518: e3550000 cmp r5, #0
3000451c: 0affff8d beq 30004358 <rtems_termios_read+0x90>
sc = rtems_semaphore_obtain(
30004520: e5940068 ldr r0, [r4, #104] ; 0x68
30004524: e594106c ldr r1, [r4, #108] ; 0x6c
30004528: e1a02006 mov r2, r6
3000452c: eb00046b bl 300056e0 <rtems_semaphore_obtain>
tty->rawInBuf.Semaphore, tty->rawInBufSemaphoreOptions, timeout);
if (sc != RTEMS_SUCCESSFUL)
30004530: e3500000 cmp r0, #0
30004534: 0affffb1 beq 30004400 <rtems_termios_read+0x138>
30004538: eaffff86 b 30004358 <rtems_termios_read+0x90> <== NOT EXECUTED
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
3000453c: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED
30004540: e3530000 cmp r3, #0 <== NOT EXECUTED
30004544: 0a000002 beq 30004554 <rtems_termios_read+0x28c> <== NOT EXECUTED
|| (tty->flow_ctrl & FL_OSTOP))) {
30004548: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
3000454c: e3130020 tst r3, #32 <== NOT EXECUTED
30004550: 0affffd6 beq 300044b0 <rtems_termios_read+0x1e8> <== NOT EXECUTED
/* XON should be sent now... */
(*tty->device.write)(
30004554: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
30004558: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED
3000455c: e3a02001 mov r2, #1 <== NOT EXECUTED
30004560: e1a0e00f mov lr, pc <== NOT EXECUTED
30004564: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
30004568: eaffffdb b 300044dc <rtems_termios_read+0x214> <== NOT EXECUTED
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
3000456c: e594203c ldr r2, [r4, #60] ; 0x3c
30004570: e3120002 tst r2, #2
30004574: 0a00000b beq 300045a8 <rtems_termios_read+0x2e0>
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
30004578: e5940010 ldr r0, [r4, #16]
3000457c: e1a0e00f mov lr, pc
30004580: e12fff13 bx r3
if (n < 0) {
30004584: e3500000 cmp r0, #0
rtems_task_wake_after (1);
} else {
if (siproc (n, tty))
30004588: e1a01004 mov r1, r4
3000458c: e20000ff and r0, r0, #255 ; 0xff
int n;
if (tty->termios.c_lflag & ICANON) {
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
30004590: ba00002d blt 3000464c <rtems_termios_read+0x384>
rtems_task_wake_after (1);
} else {
if (siproc (n, tty))
30004594: ebffff02 bl 300041a4 <siproc>
30004598: e3500000 cmp r0, #0
3000459c: 1affff6d bne 30004358 <rtems_termios_read+0x90>
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
300045a0: e59430a0 ldr r3, [r4, #160] ; 0xa0
300045a4: eafffff3 b 30004578 <rtems_termios_read+0x2b0>
}
}
} else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
300045a8: eb0002ac bl 30005060 <rtems_clock_get_ticks_since_boot> <== NOT EXECUTED
300045ac: e1a05000 mov r5, r0 <== NOT EXECUTED
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
300045b0: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
300045b4: e1a0e00f mov lr, pc <== NOT EXECUTED
300045b8: e594f0a0 ldr pc, [r4, #160] ; 0xa0 <== NOT EXECUTED
if (n < 0) {
300045bc: e3500000 cmp r0, #0 <== NOT EXECUTED
300045c0: ba00000c blt 300045f8 <rtems_termios_read+0x330> <== NOT EXECUTED
break;
}
}
rtems_task_wake_after (1);
} else {
siproc (n, tty);
300045c4: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED
300045c8: e1a01004 mov r1, r4 <== NOT EXECUTED
300045cc: ebfffef4 bl 300041a4 <siproc> <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
300045d0: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED
300045d4: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED
300045d8: e1520003 cmp r2, r3 <== NOT EXECUTED
300045dc: aaffff5d bge 30004358 <rtems_termios_read+0x90> <== NOT EXECUTED
break;
if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
300045e0: e3530000 cmp r3, #0 <== NOT EXECUTED
300045e4: 0afffff1 beq 300045b0 <rtems_termios_read+0x2e8> <== NOT EXECUTED
300045e8: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED
300045ec: e3530000 cmp r3, #0 <== NOT EXECUTED
300045f0: 0affffee beq 300045b0 <rtems_termios_read+0x2e8> <== NOT EXECUTED
300045f4: eaffffeb b 300045a8 <rtems_termios_read+0x2e0> <== NOT EXECUTED
then = rtems_clock_get_ticks_since_boot();
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
if (tty->termios.c_cc[VMIN]) {
300045f8: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED
300045fc: e3530000 cmp r3, #0 <== NOT EXECUTED
30004600: 0a000008 beq 30004628 <rtems_termios_read+0x360> <== NOT EXECUTED
if (tty->termios.c_cc[VTIME] && tty->ccount) {
30004604: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED
30004608: e3530000 cmp r3, #0 <== NOT EXECUTED
3000460c: 0a000002 beq 3000461c <rtems_termios_read+0x354> <== NOT EXECUTED
30004610: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED
30004614: e3530000 cmp r3, #0 <== NOT EXECUTED
30004618: 1a000005 bne 30004634 <rtems_termios_read+0x36c> <== NOT EXECUTED
now = rtems_clock_get_ticks_since_boot();
if ((now - then) > tty->vtimeTicks) {
break;
}
}
rtems_task_wake_after (1);
3000461c: e3a00001 mov r0, #1 <== NOT EXECUTED
30004620: eb000565 bl 30005bbc <rtems_task_wake_after> <== NOT EXECUTED
30004624: eaffffe1 b 300045b0 <rtems_termios_read+0x2e8> <== NOT EXECUTED
if ((now - then) > tty->vtimeTicks) {
break;
}
}
} else {
if (!tty->termios.c_cc[VTIME])
30004628: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED
3000462c: e3530000 cmp r3, #0 <== NOT EXECUTED
30004630: 0affff48 beq 30004358 <rtems_termios_read+0x90> <== NOT EXECUTED
break;
now = rtems_clock_get_ticks_since_boot();
30004634: eb000289 bl 30005060 <rtems_clock_get_ticks_since_boot> <== NOT EXECUTED
if ((now - then) > tty->vtimeTicks) {
30004638: e5943054 ldr r3, [r4, #84] ; 0x54 <== NOT EXECUTED
3000463c: e0650000 rsb r0, r5, r0 <== NOT EXECUTED
30004640: e1500003 cmp r0, r3 <== NOT EXECUTED
30004644: 9afffff4 bls 3000461c <rtems_termios_read+0x354> <== NOT EXECUTED
30004648: eaffff42 b 30004358 <rtems_termios_read+0x90> <== NOT EXECUTED
if (tty->termios.c_lflag & ICANON) {
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
rtems_task_wake_after (1);
3000464c: e3a00001 mov r0, #1
30004650: eb000559 bl 30005bbc <rtems_task_wake_after>
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
30004654: e59430a0 ldr r3, [r4, #160] ; 0xa0
30004658: eaffffc6 b 30004578 <rtems_termios_read+0x2b0>
300049ec <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))
300049ec: e59020b8 ldr r2, [r0, #184] ; 0xb8
300049f0: e59f31f4 ldr r3, [pc, #500] ; 30004bec <rtems_termios_refill_transmitter+0x200>
* 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)
{
300049f4: e92d4070 push {r4, r5, r6, lr}
int nToSend;
rtems_interrupt_level level;
int len;
/* check for XOF/XON to send */
if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF))
300049f8: e0023003 and r3, r2, r3
300049fc: e59f21ec ldr r2, [pc, #492] ; 30004bf0 <rtems_termios_refill_transmitter+0x204>
* 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)
{
30004a00: e1a04000 mov r4, r0
int nToSend;
rtems_interrupt_level level;
int len;
/* check for XOF/XON to send */
if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF))
30004a04: e1530002 cmp r3, r2
30004a08: 0a000048 beq 30004b30 <rtems_termios_refill_transmitter+0x144>
tty->flow_ctrl |= FL_ISNTXOF;
rtems_interrupt_enable(level);
nToSend = 1;
} else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) == FL_ISNTXOF) {
30004a0c: e59030b8 ldr r3, [r0, #184] ; 0xb8
30004a10: e2033003 and r3, r3, #3
30004a14: e3530002 cmp r3, #2
30004a18: 0a000056 beq 30004b78 <rtems_termios_refill_transmitter+0x18c>
tty->flow_ctrl &= ~FL_ISNTXOF;
rtems_interrupt_enable(level);
nToSend = 1;
} else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
30004a1c: e5902080 ldr r2, [r0, #128] ; 0x80
30004a20: e5903084 ldr r3, [r0, #132] ; 0x84
30004a24: e1520003 cmp r2, r3
30004a28: 0a00002a beq 30004ad8 <rtems_termios_refill_transmitter+0xec>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
30004a2c: e10f3000 mrs r3, CPSR
30004a30: e3832080 orr r2, r3, #128 ; 0x80
30004a34: e129f002 msr CPSR_fc, r2
return 0;
}
rtems_interrupt_disable(level);
len = tty->t_dqlen;
tty->t_dqlen = 0;
30004a38: e3a02000 mov r2, #0
}
return 0;
}
rtems_interrupt_disable(level);
len = tty->t_dqlen;
30004a3c: e5900090 ldr r0, [r0, #144] ; 0x90
tty->t_dqlen = 0;
30004a40: e5842090 str r2, [r4, #144] ; 0x90
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
30004a44: e129f003 msr CPSR_fc, r3
rtems_interrupt_enable(level);
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
30004a48: e5943084 ldr r3, [r4, #132] ; 0x84
30004a4c: e5941088 ldr r1, [r4, #136] ; 0x88
30004a50: e0800003 add r0, r0, r3
30004a54: eb00321c bl 300112cc <__umodsi3>
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
30004a58: e5943094 ldr r3, [r4, #148] ; 0x94
rtems_interrupt_disable(level);
len = tty->t_dqlen;
tty->t_dqlen = 0;
rtems_interrupt_enable(level);
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
30004a5c: e1a05000 mov r5, r0
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
30004a60: e3530002 cmp r3, #2
len = tty->t_dqlen;
tty->t_dqlen = 0;
rtems_interrupt_enable(level);
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
tty->rawOutBuf.Tail = newTail;
30004a64: e5840084 str r0, [r4, #132] ; 0x84
if (tty->rawOutBufState == rob_wait) {
30004a68: 0a00002d beq 30004b24 <rtems_termios_refill_transmitter+0x138>
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
if (newTail == tty->rawOutBuf.Head) {
30004a6c: e5943080 ldr r3, [r4, #128] ; 0x80
30004a70: e1530005 cmp r3, r5
30004a74: 0a00001f beq 30004af8 <rtems_termios_refill_transmitter+0x10c>
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))
30004a78: e59430b8 ldr r3, [r4, #184] ; 0xb8
30004a7c: e2033e21 and r3, r3, #528 ; 0x210
30004a80: e3530e21 cmp r3, #528 ; 0x210
30004a84: 0a00004d beq 30004bc0 <rtems_termios_refill_transmitter+0x1d4>
nToSend = 0;
} else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
30004a88: e5943080 ldr r3, [r4, #128] ; 0x80
/* for outgoing flow control */
if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) {
nToSend = 1;
}
tty->rawOutBufState = rob_busy; /*apm*/
(*tty->device.write)(
30004a8c: e594107c ldr r1, [r4, #124] ; 0x7c
nToSend = 0;
} else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
30004a90: e1550003 cmp r5, r3
nToSend = tty->rawOutBuf.Size - newTail;
30004a94: 85946088 ldrhi r6, [r4, #136] ; 0x88
else
nToSend = tty->rawOutBuf.Head - newTail;
30004a98: 95946080 ldrls r6, [r4, #128] ; 0x80
/* 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)) {
30004a9c: e59430b8 ldr r3, [r4, #184] ; 0xb8
} else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
nToSend = tty->rawOutBuf.Size - newTail;
30004aa0: 80656006 rsbhi r6, r5, r6
else
nToSend = tty->rawOutBuf.Head - newTail;
30004aa4: 90656006 rsbls r6, r5, r6
/* 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)) {
30004aa8: e3130c06 tst r3, #1536 ; 0x600
30004aac: 13a06001 movne r6, #1
nToSend = 1;
}
tty->rawOutBufState = rob_busy; /*apm*/
30004ab0: e3a03001 mov r3, #1
nToSend = tty->rawOutBuf.Head - newTail;
/* when flow control XON or XOF, don't send blocks of data */
/* to allow fast reaction on incoming flow ctrl and low latency*/
/* for outgoing flow control */
if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) {
nToSend = 1;
30004ab4: e1a02006 mov r2, r6
}
tty->rawOutBufState = rob_busy; /*apm*/
30004ab8: e5843094 str r3, [r4, #148] ; 0x94
(*tty->device.write)(
30004abc: e5940010 ldr r0, [r4, #16]
30004ac0: e0811005 add r1, r1, r5
30004ac4: e1a0e00f mov lr, pc
30004ac8: e594f0a4 ldr pc, [r4, #164] ; 0xa4
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
30004acc: e5845084 str r5, [r4, #132] ; 0x84
}
return nToSend;
}
30004ad0: e1a00006 mov r0, r6
30004ad4: e8bd8070 pop {r4, r5, r6, pc}
} else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
/*
* buffer was empty
*/
if (tty->rawOutBufState == rob_wait) {
30004ad8: e5903094 ldr r3, [r0, #148] ; 0x94
30004adc: e3530002 cmp r3, #2
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
return 0;
30004ae0: 13a06000 movne r6, #0
} else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
/*
* buffer was empty
*/
if (tty->rawOutBufState == rob_wait) {
30004ae4: 1afffff9 bne 30004ad0 <rtems_termios_refill_transmitter+0xe4>
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
30004ae8: e590008c ldr r0, [r0, #140] ; 0x8c <== NOT EXECUTED
30004aec: eb000344 bl 30005804 <rtems_semaphore_release> <== NOT EXECUTED
}
return 0;
30004af0: e3a06000 mov r6, #0 <== NOT EXECUTED
30004af4: eafffff5 b 30004ad0 <rtems_termios_refill_transmitter+0xe4><== NOT EXECUTED
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
30004af8: e59430d4 ldr r3, [r4, #212] ; 0xd4
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
30004afc: e3a06000 mov r6, #0
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
30004b00: e1530006 cmp r3, r6
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
30004b04: e5846094 str r6, [r4, #148] ; 0x94
nToSend = 0;
30004b08: 01a06003 moveq r6, r3
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
30004b0c: 0affffee beq 30004acc <rtems_termios_refill_transmitter+0xe0>
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
30004b10: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED
30004b14: e59410d8 ldr r1, [r4, #216] ; 0xd8 <== NOT EXECUTED
30004b18: e1a0e00f mov lr, pc <== NOT EXECUTED
30004b1c: e12fff13 bx r3 <== NOT EXECUTED
30004b20: eaffffe9 b 30004acc <rtems_termios_refill_transmitter+0xe0><== NOT EXECUTED
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
/*
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
30004b24: e594008c ldr r0, [r4, #140] ; 0x8c
30004b28: eb000335 bl 30005804 <rtems_semaphore_release>
30004b2c: eaffffce b 30004a6c <rtems_termios_refill_transmitter+0x80>
/* check for XOF/XON to send */
if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF))
== (FL_MDXOF | FL_IREQXOF)) {
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1);
30004b30: e284104a add r1, r4, #74 ; 0x4a <== NOT EXECUTED
30004b34: e3a02001 mov r2, #1 <== NOT EXECUTED
30004b38: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED
30004b3c: e1a0e00f mov lr, pc <== NOT EXECUTED
30004b40: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
30004b44: e10f3000 mrs r3, CPSR <== NOT EXECUTED
30004b48: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED
30004b4c: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
rtems_interrupt_disable(level);
tty->t_dqlen--;
30004b50: e5941090 ldr r1, [r4, #144] ; 0x90 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
30004b54: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
== (FL_MDXOF | FL_IREQXOF)) {
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
30004b58: e2411001 sub r1, r1, #1 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
30004b5c: e3822002 orr r2, r2, #2 <== NOT EXECUTED
== (FL_MDXOF | FL_IREQXOF)) {
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
30004b60: e5841090 str r1, [r4, #144] ; 0x90 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
30004b64: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
30004b68: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
rtems_interrupt_enable(level);
nToSend = 1;
30004b6c: e3a06001 mov r6, #1 <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
30004b70: e1a00006 mov r0, r6 <== NOT EXECUTED
30004b74: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
* FIXME: this .write call will generate another
* dequeue callback. This will advance the "Tail" in the data
* buffer, although the corresponding data is not yet out!
* Therefore the dequeue "length" should be reduced by 1
*/
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
30004b78: e2841049 add r1, r4, #73 ; 0x49 <== NOT EXECUTED
30004b7c: e3a02001 mov r2, #1 <== NOT EXECUTED
30004b80: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED
30004b84: e1a0e00f mov lr, pc <== NOT EXECUTED
30004b88: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
30004b8c: e10f3000 mrs r3, CPSR <== NOT EXECUTED
30004b90: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED
30004b94: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
rtems_interrupt_disable(level);
tty->t_dqlen--;
30004b98: e5941090 ldr r1, [r4, #144] ; 0x90 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
30004b9c: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
* Therefore the dequeue "length" should be reduced by 1
*/
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
30004ba0: e2411001 sub r1, r1, #1 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
30004ba4: e3c22002 bic r2, r2, #2 <== NOT EXECUTED
* Therefore the dequeue "length" should be reduced by 1
*/
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
30004ba8: e5841090 str r1, [r4, #144] ; 0x90 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
30004bac: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
30004bb0: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
rtems_interrupt_enable(level);
nToSend = 1;
30004bb4: e3a06001 mov r6, #1 <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
30004bb8: e1a00006 mov r0, r6 <== NOT EXECUTED
30004bbc: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
30004bc0: e10f3000 mrs r3, CPSR <== NOT EXECUTED
30004bc4: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED
30004bc8: e129f002 msr CPSR_fc, r2 <== 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;
30004bcc: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
30004bd0: e3822020 orr r2, r2, #32 <== NOT EXECUTED
30004bd4: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
30004bd8: e3a02001 mov r2, #1 <== NOT EXECUTED
30004bdc: e5842094 str r2, [r4, #148] ; 0x94 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
30004be0: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
rtems_interrupt_enable(level);
nToSend = 0;
30004be4: e3a06000 mov r6, #0 <== NOT EXECUTED
30004be8: eaffffb7 b 30004acc <rtems_termios_refill_transmitter+0xe0><== NOT EXECUTED
30004960 <rtems_termios_rxdaemon>:
/*
* this task actually processes any receive events
*/
static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument)
{
30004960: e92d40f0 push {r4, r5, r6, r7, lr}
30004964: e24dd008 sub sp, sp, #8
30004968: e1a04000 mov r4, r0
3000496c: e28d7007 add r7, sp, #7
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
30004970: e3a06000 mov r6, #0
30004974: ea000005 b 30004990 <rtems_termios_rxdaemon+0x30>
}
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
30004978: e5940010 ldr r0, [r4, #16]
3000497c: e1a0e00f mov lr, pc
30004980: e594f0a0 ldr pc, [r4, #160] ; 0xa0
if (c != EOF) {
30004984: e3700001 cmn r0, #1
}
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
30004988: e1a03000 mov r3, r0
if (c != EOF) {
3000498c: 1a000010 bne 300049d4 <rtems_termios_rxdaemon+0x74>
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
30004990: e1a0300d mov r3, sp
30004994: e3a01002 mov r1, #2
30004998: e3a02000 mov r2, #0
3000499c: e3a00003 mov r0, #3
300049a0: eb0001ce bl 300050e0 <rtems_event_receive>
(TERMIOS_RX_PROC_EVENT | TERMIOS_RX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event
);
if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) {
300049a4: e59d3000 ldr r3, [sp]
300049a8: e3130001 tst r3, #1
300049ac: 0afffff1 beq 30004978 <rtems_termios_rxdaemon+0x18>
tty->rxTaskId = 0;
300049b0: e58460c4 str r6, [r4, #196] ; 0xc4 <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
300049b4: e1a00006 mov r0, r6 <== NOT EXECUTED
300049b8: eb00040a bl 300059e8 <rtems_task_delete> <== NOT EXECUTED
}
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
300049bc: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
300049c0: e1a0e00f mov lr, pc <== NOT EXECUTED
300049c4: e594f0a0 ldr pc, [r4, #160] ; 0xa0 <== NOT EXECUTED
if (c != EOF) {
300049c8: e3700001 cmn r0, #1 <== NOT EXECUTED
}
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
300049cc: e1a03000 mov r3, r0 <== NOT EXECUTED
if (c != EOF) {
300049d0: 0affffee beq 30004990 <rtems_termios_rxdaemon+0x30> <== NOT EXECUTED
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
rtems_termios_enqueue_raw_characters ( tty,&c_buf,1);
300049d4: e1a00004 mov r0, r4
300049d8: e1a01007 mov r1, r7
300049dc: e3a02001 mov r2, #1
c = tty->device.pollRead(tty->minor);
if (c != EOF) {
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
300049e0: e5cd3007 strb r3, [sp, #7]
rtems_termios_enqueue_raw_characters ( tty,&c_buf,1);
300049e4: ebffff22 bl 30004674 <rtems_termios_enqueue_raw_characters>
300049e8: eaffffe8 b 30004990 <rtems_termios_rxdaemon+0x30>
30004bf4 <rtems_termios_txdaemon>:
/*
* this task actually processes any transmit events
*/
static rtems_task rtems_termios_txdaemon(rtems_task_argument argument)
{
30004bf4: e92d40f0 push {r4, r5, r6, r7, lr}
30004bf8: e59f6060 ldr r6, [pc, #96] ; 30004c60 <rtems_termios_txdaemon+0x6c>
30004bfc: e24dd004 sub sp, sp, #4
30004c00: e1a04000 mov r4, r0
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
30004c04: e3a07000 mov r7, #0
30004c08: ea000008 b 30004c30 <rtems_termios_txdaemon+0x3c>
}
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
30004c0c: e59430cc ldr r3, [r4, #204] ; 0xcc
rtems_termios_linesw[tty->t_line].l_start(tty);
30004c10: e1a00004 mov r0, r4
}
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
30004c14: e0863283 add r3, r6, r3, lsl #5
30004c18: e5933014 ldr r3, [r3, #20]
30004c1c: e3530000 cmp r3, #0
rtems_termios_linesw[tty->t_line].l_start(tty);
30004c20: 11a0e00f movne lr, pc
30004c24: 112fff13 bxne r3
}
/*
* try to push further characters to device
*/
rtems_termios_refill_transmitter(tty);
30004c28: e1a00004 mov r0, r4
30004c2c: ebffff6e bl 300049ec <rtems_termios_refill_transmitter>
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
30004c30: e1a0300d mov r3, sp
30004c34: e3a01002 mov r1, #2
30004c38: e3a02000 mov r2, #0
30004c3c: e3a00003 mov r0, #3
30004c40: eb000126 bl 300050e0 <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) {
30004c44: e59d3000 ldr r3, [sp]
30004c48: e3130001 tst r3, #1
30004c4c: 0affffee beq 30004c0c <rtems_termios_txdaemon+0x18>
tty->txTaskId = 0;
30004c50: e58470c8 str r7, [r4, #200] ; 0xc8 <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
30004c54: e1a00007 mov r0, r7 <== NOT EXECUTED
30004c58: eb000362 bl 300059e8 <rtems_task_delete> <== NOT EXECUTED
30004c5c: eaffffea b 30004c0c <rtems_termios_txdaemon+0x18> <== NOT EXECUTED
30006ac4 <rtems_verror>:
{
int local_errno = 0;
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC) {
30006ac4: e3100202 tst r0, #536870912 ; 0x20000000
static int rtems_verror(
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
30006ac8: e92d41f0 push {r4, r5, r6, r7, r8, lr}
30006acc: e1a04000 mov r4, r0
30006ad0: e1a08001 mov r8, r1
30006ad4: e1a06002 mov r6, r2
int local_errno = 0;
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC) {
30006ad8: 0a00000d beq 30006b14 <rtems_verror+0x50>
if (rtems_panic_in_progress++)
30006adc: e59f212c ldr r2, [pc, #300] ; 30006c10 <rtems_verror+0x14c>
30006ae0: e5921000 ldr r1, [r2]
30006ae4: e2813001 add r3, r1, #1
30006ae8: e3510000 cmp r1, #0
30006aec: e5823000 str r3, [r2]
30006af0: 0a000004 beq 30006b08 <rtems_verror+0x44>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
30006af4: e59f3118 ldr r3, [pc, #280] ; 30006c14 <rtems_verror+0x150><== NOT EXECUTED
30006af8: e5931000 ldr r1, [r3] <== NOT EXECUTED
30006afc: e2811001 add r1, r1, #1 <== NOT EXECUTED
30006b00: e5831000 str r1, [r3] <== NOT EXECUTED
RTEMS_COMPILER_MEMORY_BARRIER();
30006b04: e5923000 ldr r3, [r2] <== NOT EXECUTED
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
30006b08: e3530002 cmp r3, #2
return 0;
30006b0c: c3a06000 movgt r6, #0
if (error_flag & RTEMS_ERROR_PANIC) {
if (rtems_panic_in_progress++)
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
30006b10: ca000024 bgt 30006ba8 <rtems_verror+0xe4>
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
30006b14: e59f50fc ldr r5, [pc, #252] ; 30006c18 <rtems_verror+0x154>
status = error_flag & ~RTEMS_ERROR_MASK;
30006b18: e3c47207 bic r7, r4, #1879048192 ; 0x70000000
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
30006b1c: e5953000 ldr r3, [r5]
30006b20: e5930008 ldr r0, [r3, #8]
30006b24: eb0032aa bl 300135d4 <fflush>
status = error_flag & ~RTEMS_ERROR_MASK;
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
30006b28: e2144101 ands r4, r4, #1073741824 ; 0x40000000
30006b2c: 1a00002a bne 30006bdc <rtems_verror+0x118>
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
30006b30: e5953000 ldr r3, [r5]
30006b34: e1a02006 mov r2, r6
30006b38: e1a01008 mov r1, r8
30006b3c: e593000c ldr r0, [r3, #12]
30006b40: eb004b1a bl 300197b0 <vfprintf>
if (status)
30006b44: e3570000 cmp r7, #0
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
30006b48: e1a06000 mov r6, r0
if (status)
30006b4c: 1a000017 bne 30006bb0 <rtems_verror+0xec>
chars_written +=
fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno) {
30006b50: e3540000 cmp r4, #0
30006b54: 0a00000b beq 30006b88 <rtems_verror+0xc4>
if ((local_errno > 0) && *strerror(local_errno))
30006b58: da000004 ble 30006b70 <rtems_verror+0xac>
30006b5c: e1a00004 mov r0, r4
30006b60: eb00368a bl 30014590 <strerror>
30006b64: e5d03000 ldrb r3, [r0]
30006b68: e3530000 cmp r3, #0
30006b6c: 1a00001d bne 30006be8 <rtems_verror+0x124>
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
30006b70: e5953000 ldr r3, [r5]
30006b74: e59f10a0 ldr r1, [pc, #160] ; 30006c1c <rtems_verror+0x158>
30006b78: e593000c ldr r0, [r3, #12]
30006b7c: e1a02004 mov r2, r4
30006b80: eb003379 bl 3001396c <fprintf>
30006b84: e0866000 add r6, r6, r0
}
chars_written += fprintf(stderr, "\n");
30006b88: e5953000 ldr r3, [r5]
30006b8c: e59f108c ldr r1, [pc, #140] ; 30006c20 <rtems_verror+0x15c>
30006b90: e593000c ldr r0, [r3, #12]
30006b94: eb003374 bl 3001396c <fprintf>
(void) fflush(stderr);
30006b98: e5953000 ldr r3, [r5]
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
}
chars_written += fprintf(stderr, "\n");
30006b9c: e0806006 add r6, r0, r6
(void) fflush(stderr);
30006ba0: e593000c ldr r0, [r3, #12]
30006ba4: eb00328a bl 300135d4 <fflush>
return chars_written;
}
30006ba8: e1a00006 mov r0, r6
30006bac: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written +=
fprintf(stderr, " (status: %s)", rtems_status_text(status));
30006bb0: e59f3060 ldr r3, [pc, #96] ; 30006c18 <rtems_verror+0x154>
30006bb4: e1a00007 mov r0, r7
30006bb8: e5933000 ldr r3, [r3]
30006bbc: e593700c ldr r7, [r3, #12]
30006bc0: ebffffbb bl 30006ab4 <rtems_status_text>
30006bc4: e59f1058 ldr r1, [pc, #88] ; 30006c24 <rtems_verror+0x160>
30006bc8: e1a02000 mov r2, r0
30006bcc: e1a00007 mov r0, r7
30006bd0: eb003365 bl 3001396c <fprintf>
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written +=
30006bd4: e0866000 add r6, r6, r0
30006bd8: eaffffdc b 30006b50 <rtems_verror+0x8c>
(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;
30006bdc: eb003185 bl 300131f8 <__errno>
30006be0: e5904000 ldr r4, [r0]
30006be4: eaffffd1 b 30006b30 <rtems_verror+0x6c>
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));
30006be8: e5953000 ldr r3, [r5]
30006bec: e1a00004 mov r0, r4
30006bf0: e593400c ldr r4, [r3, #12]
30006bf4: eb003665 bl 30014590 <strerror>
30006bf8: e59f1028 ldr r1, [pc, #40] ; 30006c28 <rtems_verror+0x164>
30006bfc: e1a02000 mov r2, r0
30006c00: e1a00004 mov r0, r4
30006c04: eb003358 bl 3001396c <fprintf>
30006c08: e0866000 add r6, r6, r0
30006c0c: eaffffdd b 30006b88 <rtems_verror+0xc4>
300027f0 <scanInt>:
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
300027f0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
int sign = 0;
300027f4: e3a06000 mov r6, #0
int d;
for (;;) {
c = getc(fp);
300027f8: e59f90f8 ldr r9, [pc, #248] ; 300028f8 <scanInt+0x108>
limit++;
continue;
}
sign = 1;
}
if (!isdigit(c))
300027fc: e59f80f8 ldr r8, [pc, #248] ; 300028fc <scanInt+0x10c>
return 0;
d = c - '0';
if ((i > (limit / 10))
30002800: e59fa0f8 ldr sl, [pc, #248] ; 30002900 <scanInt+0x110>
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
30002804: e1a04000 mov r4, r0
30002808: e1a0b001 mov fp, r1
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
3000280c: e3e07102 mvn r7, #-2147483648 ; 0x80000000
*/
static int
scanInt(FILE *fp, int *val)
{
int c;
unsigned int i = 0;
30002810: e1a05006 mov r5, r6
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
30002814: e5943004 ldr r3, [r4, #4]
30002818: e2433001 sub r3, r3, #1
3000281c: e3530000 cmp r3, #0
30002820: e5843004 str r3, [r4, #4]
30002824: ba00001d blt 300028a0 <scanInt+0xb0>
30002828: e5943000 ldr r3, [r4]
3000282c: e4d30001 ldrb r0, [r3], #1
if (c == ':')
30002830: e350003a cmp r0, #58 ; 0x3a
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
30002834: e5843000 str r3, [r4]
if (c == ':')
30002838: 0a00001d beq 300028b4 <scanInt+0xc4>
break;
if (sign == 0) {
3000283c: e3560000 cmp r6, #0
30002840: 1a000004 bne 30002858 <scanInt+0x68>
if (c == '-') {
30002844: e350002d cmp r0, #45 ; 0x2d
sign = -1;
limit++;
30002848: 02877001 addeq r7, r7, #1
c = getc(fp);
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
sign = -1;
3000284c: 03e06000 mvneq r6, #0
for (;;) {
c = getc(fp);
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
30002850: 0affffef beq 30002814 <scanInt+0x24>
sign = -1;
limit++;
continue;
}
sign = 1;
30002854: e3a06001 mov r6, #1
}
if (!isdigit(c))
30002858: e5983000 ldr r3, [r8]
3000285c: e0833000 add r3, r3, r0
30002860: e5d33001 ldrb r3, [r3, #1]
30002864: e2133004 ands r3, r3, #4
30002868: 0a00001e beq 300028e8 <scanInt+0xf8>
return 0;
d = c - '0';
if ((i > (limit / 10))
3000286c: e083279a umull r2, r3, sl, r7
30002870: e15501a3 cmp r5, r3, lsr #3
30002874: 8a000019 bhi 300028e0 <scanInt+0xf0>
}
sign = 1;
}
if (!isdigit(c))
return 0;
d = c - '0';
30002878: e2400030 sub r0, r0, #48 ; 0x30
3000287c: 11a03105 lslne r3, r5, #2
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
30002880: 0a000011 beq 300028cc <scanInt+0xdc>
return 0;
i = i * 10 + d;
30002884: e0835005 add r5, r3, r5
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
30002888: e5943004 ldr r3, [r4, #4]
return 0;
d = c - '0';
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
i = i * 10 + d;
3000288c: e0805085 add r5, r0, r5, lsl #1
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
30002890: e2433001 sub r3, r3, #1
30002894: e3530000 cmp r3, #0
30002898: e5843004 str r3, [r4, #4]
3000289c: aaffffe1 bge 30002828 <scanInt+0x38>
300028a0: e5990000 ldr r0, [r9] <== NOT EXECUTED
300028a4: e1a01004 mov r1, r4 <== NOT EXECUTED
300028a8: eb003612 bl 300100f8 <__srget_r> <== NOT EXECUTED
if (c == ':')
300028ac: e350003a cmp r0, #58 ; 0x3a <== NOT EXECUTED
300028b0: 1affffe1 bne 3000283c <scanInt+0x4c> <== NOT EXECUTED
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
i = i * 10 + d;
}
if (sign == 0)
300028b4: e3560000 cmp r6, #0
300028b8: 0a00000c beq 300028f0 <scanInt+0x100>
return 0;
*val = i * sign;
300028bc: e0050596 mul r5, r6, r5
return 1;
300028c0: e3a00001 mov r0, #1
return 0;
i = i * 10 + d;
}
if (sign == 0)
return 0;
*val = i * sign;
300028c4: e58b5000 str r5, [fp]
return 1;
300028c8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
}
if (!isdigit(c))
return 0;
d = c - '0';
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
300028cc: e1a03105 lsl r3, r5, #2 <== NOT EXECUTED
300028d0: e0832005 add r2, r3, r5 <== NOT EXECUTED
300028d4: e0472082 sub r2, r7, r2, lsl #1 <== NOT EXECUTED
300028d8: e1500002 cmp r0, r2 <== NOT EXECUTED
300028dc: 9affffe8 bls 30002884 <scanInt+0x94> <== NOT EXECUTED
return 0;
300028e0: e3a00000 mov r0, #0 <== NOT EXECUTED
300028e4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
continue;
}
sign = 1;
}
if (!isdigit(c))
return 0;
300028e8: e1a00003 mov r0, r3
300028ec: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
i = i * 10 + d;
}
if (sign == 0)
return 0;
300028f0: e1a00006 mov r0, r6 <== NOT EXECUTED
*val = i * sign;
return 1;
}
300028f4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
30002904 <scanString>:
/*
* Extract a string value from the database
*/
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
30002904: e92d41f0 push {r4, r5, r6, r7, r8, lr}
30002908: e1a05002 mov r5, r2
int c;
*name = *bufp;
3000290c: e5922000 ldr r2, [r2]
/*
* Extract a string value from the database
*/
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
30002910: e59d7018 ldr r7, [sp, #24]
int c;
*name = *bufp;
for (;;) {
c = getc(fp);
30002914: e59f60d8 ldr r6, [pc, #216] ; 300029f4 <scanString+0xf0>
/*
* Extract a string value from the database
*/
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
30002918: e1a04000 mov r4, r0
3000291c: e1a08003 mov r8, r3
int c;
*name = *bufp;
30002920: e5812000 str r2, [r1]
30002924: ea000013 b 30002978 <scanString+0x74>
for (;;) {
c = getc(fp);
30002928: e5943000 ldr r3, [r4]
3000292c: e4d30001 ldrb r0, [r3], #1
if (c == ':') {
30002930: e350003a cmp r0, #58 ; 0x3a
{
int c;
*name = *bufp;
for (;;) {
c = getc(fp);
30002934: e5843000 str r3, [r4]
if (c == ':') {
30002938: 0a000018 beq 300029a0 <scanString+0x9c>
if (nlFlag)
return 0;
break;
}
if (c == '\n') {
3000293c: e350000a cmp r0, #10
30002940: 0a000025 beq 300029dc <scanString+0xd8>
if (!nlFlag)
return 0;
break;
}
if (c == EOF)
30002944: e3700001 cmn r0, #1
30002948: 0a000021 beq 300029d4 <scanString+0xd0>
return 0;
if (*nleft < 2)
3000294c: e5983000 ldr r3, [r8]
30002950: e3530001 cmp r3, #1
30002954: 9a000024 bls 300029ec <scanString+0xe8>
return 0;
**bufp = c;
30002958: e5953000 ldr r3, [r5]
3000295c: e5c30000 strb r0, [r3]
++(*bufp);
30002960: e5952000 ldr r2, [r5]
--(*nleft);
30002964: e5983000 ldr r3, [r8]
if (c == EOF)
return 0;
if (*nleft < 2)
return 0;
**bufp = c;
++(*bufp);
30002968: e2822001 add r2, r2, #1
--(*nleft);
3000296c: e2433001 sub r3, r3, #1
if (c == EOF)
return 0;
if (*nleft < 2)
return 0;
**bufp = c;
++(*bufp);
30002970: e5852000 str r2, [r5]
--(*nleft);
30002974: e5883000 str r3, [r8]
{
int c;
*name = *bufp;
for (;;) {
c = getc(fp);
30002978: e5943004 ldr r3, [r4, #4]
3000297c: e2433001 sub r3, r3, #1
30002980: e3530000 cmp r3, #0
30002984: e5843004 str r3, [r4, #4]
30002988: aaffffe6 bge 30002928 <scanString+0x24>
3000298c: e5960000 ldr r0, [r6]
30002990: e1a01004 mov r1, r4
30002994: eb0035d7 bl 300100f8 <__srget_r>
if (c == ':') {
30002998: e350003a cmp r0, #58 ; 0x3a
3000299c: 1affffe6 bne 3000293c <scanString+0x38>
if (nlFlag)
300029a0: e3570000 cmp r7, #0
300029a4: 1a00000a bne 300029d4 <scanString+0xd0>
return 0;
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
300029a8: e5953000 ldr r3, [r5]
300029ac: e3a02000 mov r2, #0
300029b0: e5c32000 strb r2, [r3]
++(*bufp);
300029b4: e5952000 ldr r2, [r5]
--(*nleft);
300029b8: e5983000 ldr r3, [r8]
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
++(*bufp);
300029bc: e2822001 add r2, r2, #1
--(*nleft);
300029c0: e2433001 sub r3, r3, #1
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
++(*bufp);
300029c4: e5852000 str r2, [r5]
--(*nleft);
return 1;
300029c8: e3a00001 mov r0, #1
++(*bufp);
--(*nleft);
}
**bufp = '\0';
++(*bufp);
--(*nleft);
300029cc: e5883000 str r3, [r8]
return 1;
300029d0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
if (!nlFlag)
return 0;
break;
}
if (c == EOF)
return 0;
300029d4: e3a00000 mov r0, #0
300029d8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
if (nlFlag)
return 0;
break;
}
if (c == '\n') {
if (!nlFlag)
300029dc: e3570000 cmp r7, #0
300029e0: 1afffff0 bne 300029a8 <scanString+0xa4>
return 0;
300029e4: e1a00007 mov r0, r7
300029e8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
break;
}
if (c == EOF)
return 0;
if (*nleft < 2)
return 0;
300029ec: e3a00000 mov r0, #0 <== NOT EXECUTED
}
**bufp = '\0';
++(*bufp);
--(*nleft);
return 1;
}
300029f0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
300029f8 <scangr>:
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
300029f8: e92d41f0 push {r4, r5, r6, r7, r8, lr}
300029fc: e24dd014 sub sp, sp, #20
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
30002a00: e28d5008 add r5, sp, #8
30002a04: e28d4004 add r4, sp, #4
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
30002a08: e58d2008 str r2, [sp, #8]
30002a0c: e58d3004 str r3, [sp, #4]
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
30002a10: e3a06000 mov r6, #0
30002a14: e1a02005 mov r2, r5
30002a18: e1a03004 mov r3, r4
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
30002a1c: e1a07000 mov r7, r0
30002a20: e1a08001 mov r8, r1
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
30002a24: e58d6000 str r6, [sp]
30002a28: ebffffb5 bl 30002904 <scanString>
30002a2c: e3500000 cmp r0, #0
30002a30: 1a000001 bne 30002a3c <scangr+0x44>
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
return 1;
}
30002a34: e28dd014 add sp, sp, #20
30002a38: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
30002a3c: e1a00007 mov r0, r7
30002a40: e2881004 add r1, r8, #4
30002a44: e1a02005 mov r2, r5
30002a48: e1a03004 mov r3, r4
30002a4c: e58d6000 str r6, [sp]
30002a50: ebffffab bl 30002904 <scanString>
30002a54: e3500000 cmp r0, #0
30002a58: 0afffff5 beq 30002a34 <scangr+0x3c>
|| !scanInt(fp, &grgid)
30002a5c: e1a00007 mov r0, r7
30002a60: e28d1010 add r1, sp, #16
30002a64: ebffff61 bl 300027f0 <scanInt>
30002a68: e3500000 cmp r0, #0
30002a6c: 0afffff0 beq 30002a34 <scangr+0x3c>
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
30002a70: e3a06001 mov r6, #1
30002a74: e1a00007 mov r0, r7
30002a78: e28d100c add r1, sp, #12
30002a7c: e1a02005 mov r2, r5
30002a80: e1a03004 mov r3, r4
30002a84: e58d6000 str r6, [sp]
30002a88: ebffff9d bl 30002904 <scanString>
30002a8c: e3500000 cmp r0, #0
30002a90: 0affffe7 beq 30002a34 <scangr+0x3c>
return 0;
grp->gr_gid = grgid;
30002a94: e1dd31b0 ldrh r3, [sp, #16]
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
30002a98: e59d100c ldr r1, [sp, #12]
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &grgid)
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
return 0;
grp->gr_gid = grgid;
30002a9c: e1c830b8 strh r3, [r8, #8]
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
30002aa0: e5d13000 ldrb r3, [r1]
30002aa4: e3530000 cmp r3, #0
30002aa8: 03a06017 moveq r6, #23
30002aac: 0a000007 beq 30002ad0 <scangr+0xd8>
30002ab0: e1a02001 mov r2, r1
if(*cp == ',')
30002ab4: e353002c cmp r3, #44 ; 0x2c
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
30002ab8: e5f23001 ldrb r3, [r2, #1]!
if(*cp == ',')
memcount++;
30002abc: 02866001 addeq r6, r6, #1
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
30002ac0: e3530000 cmp r3, #0
30002ac4: 1afffffa bne 30002ab4 <scangr+0xbc>
30002ac8: e1a06106 lsl r6, r6, #2
30002acc: e2866013 add r6, r6, #19
}
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
30002ad0: e59d3004 ldr r3, [sp, #4]
30002ad4: e1530006 cmp r3, r6
return 0;
30002ad8: 33a00000 movcc r0, #0
}
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
30002adc: 3affffd4 bcc 30002a34 <scangr+0x3c>
return 0;
grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
30002ae0: e59d0008 ldr r0, [sp, #8]
30002ae4: e280000f add r0, r0, #15
30002ae8: e3c0000f bic r0, r0, #15
30002aec: e588000c str r0, [r8, #12]
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
30002af0: e5801000 str r1, [r0]
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
30002af4: e59d200c ldr r2, [sp, #12]
30002af8: e5d23000 ldrb r3, [r2]
30002afc: e3530000 cmp r3, #0
30002b00: 0a000010 beq 30002b48 <scangr+0x150>
}
/*
* Extract a single group record from the database
*/
static int scangr(
30002b04: e2822001 add r2, r2, #1
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
30002b08: e3a01001 mov r1, #1
if(*cp == ',') {
*cp = '\0';
30002b0c: e3a00000 mov r0, #0
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
if(*cp == ',') {
30002b10: e353002c cmp r3, #44 ; 0x2c
*cp = '\0';
30002b14: 05420001 strbeq r0, [r2, #-1]
grp->gr_mem[memcount++] = cp + 1;
30002b18: 0598300c ldreq r3, [r8, #12]
30002b1c: 07832101 streq r2, [r3, r1, lsl #2]
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
30002b20: e4d23001 ldrb r3, [r2], #1
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
30002b24: 02811001 addeq r1, r1, #1
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
30002b28: e3530000 cmp r3, #0
30002b2c: 1afffff7 bne 30002b10 <scangr+0x118>
30002b30: e598000c ldr r0, [r8, #12]
30002b34: e1a01101 lsl r1, r1, #2
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
30002b38: e3a03000 mov r3, #0
30002b3c: e7803001 str r3, [r0, r1]
return 1;
30002b40: e3a00001 mov r0, #1
30002b44: eaffffba b 30002a34 <scangr+0x3c>
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
30002b48: e3a01004 mov r1, #4 <== NOT EXECUTED
30002b4c: eafffff9 b 30002b38 <scangr+0x140> <== NOT EXECUTED
300087f8 <sem_timedwait>:
int sem_timedwait(
sem_t *sem,
const struct timespec *abstime
)
{
300087f8: e92d4010 push {r4, lr}
300087fc: e24dd004 sub sp, sp, #4
30008800: e1a04000 mov r4, r0
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
30008804: e1a00001 mov r0, r1
30008808: e1a0100d mov r1, sp
3000880c: eb001635 bl 3000e0e8 <_POSIX_Absolute_timeout_to_ticks>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
30008810: e3500003 cmp r0, #3
30008814: 0a000005 beq 30008830 <sem_timedwait+0x38>
do_wait = false;
lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
30008818: e1a00004 mov r0, r4 <== NOT EXECUTED
3000881c: e3a01000 mov r1, #0 <== NOT EXECUTED
30008820: e59d2000 ldr r2, [sp] <== NOT EXECUTED
30008824: eb001948 bl 3000ed4c <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED
break;
}
}
return lock_status;
}
30008828: e28dd004 add sp, sp, #4
3000882c: e8bd8010 pop {r4, pc}
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
30008830: e1a00004 mov r0, r4
30008834: e3a01001 mov r1, #1
30008838: e59d2000 ldr r2, [sp]
3000883c: eb001942 bl 3000ed4c <_POSIX_Semaphore_Wait_support>
30008840: eafffff8 b 30008828 <sem_timedwait+0x30>
30006028 <sigaction>:
struct sigaction *oact
)
{
ISR_Level level;
if ( oact )
30006028: e2523000 subs r3, r2, #0
*oact = _POSIX_signals_Vectors[ sig ];
3000602c: 159f20c4 ldrne r2, [pc, #196] ; 300060f8 <sigaction+0xd0>
int sigaction(
int sig,
const struct sigaction *act,
struct sigaction *oact
)
{
30006030: e92d4070 push {r4, r5, r6, lr}
30006034: e1a05001 mov r5, r1
ISR_Level level;
if ( oact )
*oact = _POSIX_signals_Vectors[ sig ];
30006038: 10801080 addne r1, r0, r0, lsl #1
3000603c: 10822101 addne r2, r2, r1, lsl #2
int sigaction(
int sig,
const struct sigaction *act,
struct sigaction *oact
)
{
30006040: e1a04000 mov r4, r0
ISR_Level level;
if ( oact )
*oact = _POSIX_signals_Vectors[ sig ];
30006044: 18920007 ldmne r2, {r0, r1, r2}
30006048: 18830007 stmne r3, {r0, r1, r2}
if ( !sig )
3000604c: e3540000 cmp r4, #0
30006050: 0a000023 beq 300060e4 <sigaction+0xbc>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
30006054: e2443001 sub r3, r4, #1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
30006058: e353001f cmp r3, #31
3000605c: 8a000020 bhi 300060e4 <sigaction+0xbc>
*
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
30006060: e3540009 cmp r4, #9
30006064: 0a00001e beq 300060e4 <sigaction+0xbc>
/*
* Evaluate the new action structure and set the global signal vector
* appropriately.
*/
if ( act ) {
30006068: e3550000 cmp r5, #0
3000606c: 0a00001a beq 300060dc <sigaction+0xb4>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
30006070: e10f6000 mrs r6, CPSR
30006074: e3863080 orr r3, r6, #128 ; 0x80
30006078: e129f003 msr CPSR_fc, r3
* Unless the user is installing the default signal actions, then
* we can just copy the provided sigaction structure into the vectors.
*/
_ISR_Disable( level );
if ( act->sa_handler == SIG_DFL ) {
3000607c: e5953008 ldr r3, [r5, #8]
30006080: e3530000 cmp r3, #0
30006084: 0a000009 beq 300060b0 <sigaction+0x88>
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
} else {
_POSIX_signals_Clear_process_signals( sig );
30006088: e1a00004 mov r0, r4
3000608c: eb001708 bl 3000bcb4 <_POSIX_signals_Clear_process_signals>
_POSIX_signals_Vectors[ sig ] = *act;
30006090: e8950007 ldm r5, {r0, r1, r2}
30006094: e59f305c ldr r3, [pc, #92] ; 300060f8 <sigaction+0xd0>
30006098: e0844084 add r4, r4, r4, lsl #1
3000609c: e0834104 add r4, r3, r4, lsl #2
300060a0: e8840007 stm r4, {r0, r1, r2}
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
300060a4: e129f006 msr CPSR_fc, r6
* now (signals not posted when SIG_IGN).
* + If we are now ignoring a signal that was previously pending,
* we clear the pending signal indicator.
*/
return 0;
300060a8: e3a00000 mov r0, #0
300060ac: e8bd8070 pop {r4, r5, r6, pc}
* we can just copy the provided sigaction structure into the vectors.
*/
_ISR_Disable( level );
if ( act->sa_handler == SIG_DFL ) {
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
300060b0: e59f2044 ldr r2, [pc, #68] ; 300060fc <sigaction+0xd4>
300060b4: e0844084 add r4, r4, r4, lsl #1
300060b8: e59f3038 ldr r3, [pc, #56] ; 300060f8 <sigaction+0xd0>
300060bc: e1a04104 lsl r4, r4, #2
300060c0: e0833004 add r3, r3, r4
300060c4: e0824004 add r4, r2, r4
300060c8: e8940007 ldm r4, {r0, r1, r2}
300060cc: e8830007 stm r3, {r0, r1, r2}
300060d0: e129f006 msr CPSR_fc, r6
* now (signals not posted when SIG_IGN).
* + If we are now ignoring a signal that was previously pending,
* we clear the pending signal indicator.
*/
return 0;
300060d4: e3a00000 mov r0, #0
300060d8: e8bd8070 pop {r4, r5, r6, pc}
300060dc: e1a00005 mov r0, r5 <== NOT EXECUTED
}
300060e0: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
rtems_set_errno_and_return_minus_one( EINVAL );
300060e4: eb002338 bl 3000edcc <__errno>
300060e8: e3a03016 mov r3, #22
300060ec: e5803000 str r3, [r0]
300060f0: e3e00000 mvn r0, #0
300060f4: e8bd8070 pop {r4, r5, r6, pc}
3000890c <sigwait>:
int sigwait(
const sigset_t *set,
int *sig
)
{
3000890c: e92d4010 push {r4, lr}
30008910: e1a04001 mov r4, r1
int status;
status = sigtimedwait( set, NULL, NULL );
30008914: e3a01000 mov r1, #0
30008918: e1a02001 mov r2, r1
3000891c: ebffff8a bl 3000874c <sigtimedwait>
if ( status != -1 ) {
30008920: e3700001 cmn r0, #1
30008924: 0a000005 beq 30008940 <sigwait+0x34>
if ( sig )
30008928: e3540000 cmp r4, #0
*sig = status;
3000892c: 15840000 strne r0, [r4]
return 0;
30008930: 13a00000 movne r0, #0
int status;
status = sigtimedwait( set, NULL, NULL );
if ( status != -1 ) {
if ( sig )
30008934: 18bd8010 popne {r4, pc}
*sig = status;
return 0;
30008938: e1a00004 mov r0, r4 <== NOT EXECUTED
}
return errno;
}
3000893c: e8bd8010 pop {r4, pc} <== NOT EXECUTED
if ( sig )
*sig = status;
return 0;
}
return errno;
30008940: eb002294 bl 30011398 <__errno>
30008944: e5900000 ldr r0, [r0]
30008948: e8bd8010 pop {r4, pc}
300041a4 <siproc>:
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
300041a4: e591203c ldr r2, [r1, #60] ; 0x3c
300041a8: e59f304c ldr r3, [pc, #76] ; 300041fc <siproc+0x58>
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
300041ac: e92d4030 push {r4, r5, lr}
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
300041b0: e0023003 and r3, r2, r3
300041b4: e3530000 cmp r3, #0
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
300041b8: e1a04001 mov r4, r1
300041bc: e1a05000 mov r5, r0
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
300041c0: 1a000001 bne 300041cc <siproc+0x28>
}
else {
i = iproc (c, tty);
}
return i;
}
300041c4: 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);
300041c8: eaffff81 b 30003fd4 <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);
300041cc: e3a01000 mov r1, #0
300041d0: e1a02001 mov r2, r1
300041d4: e5940018 ldr r0, [r4, #24]
300041d8: eb000540 bl 300056e0 <rtems_semaphore_obtain>
i = iproc (c, tty);
300041dc: e1a01004 mov r1, r4
300041e0: e1a00005 mov r0, r5
300041e4: ebffff7a bl 30003fd4 <iproc>
300041e8: e1a05000 mov r5, r0
rtems_semaphore_release (tty->osem);
300041ec: e5940018 ldr r0, [r4, #24]
300041f0: eb000583 bl 30005804 <rtems_semaphore_release>
}
else {
i = iproc (c, tty);
}
return i;
}
300041f4: e1a00005 mov r0, r5
300041f8: e8bd8030 pop {r4, r5, pc}
30006098 <unlink>:
#include <rtems/seterr.h>
int unlink(
const char *path
)
{
30006098: e92d40f0 push {r4, r5, r6, r7, lr}
3000609c: e24dd030 sub sp, sp, #48 ; 0x30
300060a0: e1a07000 mov r7, r0
/*
* Get the node to be unlinked. Find the parent path first.
*/
parentpathlen = rtems_filesystem_dirname ( path );
300060a4: ebfff472 bl 30003274 <rtems_filesystem_dirname>
if ( parentpathlen == 0 )
300060a8: e2505000 subs r5, r0, #0
300060ac: 1a000039 bne 30006198 <unlink+0x100>
rtems_filesystem_get_start_loc( path, &i, &parentloc );
300060b0: e28d4018 add r4, sp, #24
300060b4: e1a00007 mov r0, r7
300060b8: e28d102c add r1, sp, #44 ; 0x2c
300060bc: e1a02004 mov r2, r4
300060c0: ebfff87a bl 300042b0 <rtems_filesystem_get_start_loc>
const char *name;
rtems_filesystem_location_info_t parentloc;
rtems_filesystem_location_info_t loc;
int i;
int result;
bool free_parentloc = false;
300060c4: e1a06005 mov r6, r5
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
300060c8: e28dc004 add ip, sp, #4
300060cc: e1a0e004 mov lr, r4
300060d0: e8be000f ldm lr!, {r0, r1, r2, r3}
300060d4: e8ac000f stmia ip!, {r0, r1, r2, r3}
name = path + parentpathlen;
300060d8: e0875005 add r5, r7, r5
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
300060dc: e59e3000 ldr r3, [lr]
name = path + parentpathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
300060e0: e1a00005 mov r0, r5
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
300060e4: e58c3000 str r3, [ip]
name = path + parentpathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
300060e8: eb003396 bl 30012f48 <strlen>
300060ec: e1a01000 mov r1, r0
300060f0: e1a00005 mov r0, r5
300060f4: ebfff46d bl 300032b0 <rtems_filesystem_prefix_separators>
300060f8: e0857000 add r7, r5, r0
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
300060fc: e1a00007 mov r0, r7
30006100: eb003390 bl 30012f48 <strlen>
30006104: e28d5004 add r5, sp, #4
30006108: e1a01000 mov r1, r0
3000610c: e3a02000 mov r2, #0
30006110: e1a00007 mov r0, r7
30006114: e1a03005 mov r3, r5
30006118: e58d2000 str r2, [sp]
3000611c: ebfff408 bl 30003144 <rtems_filesystem_evaluate_relative_path>
0, &loc, false );
if ( result != 0 ) {
30006120: e3500000 cmp r0, #0
30006124: 1a000013 bne 30006178 <unlink+0xe0>
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return -1;
}
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
30006128: e1a00005 mov r0, r5
3000612c: e59d3010 ldr r3, [sp, #16]
30006130: e1a0e00f mov lr, pc
30006134: e593f010 ldr pc, [r3, #16]
30006138: e3500001 cmp r0, #1
3000613c: 0a000021 beq 300061c8 <unlink+0x130>
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( EISDIR );
}
result = (*loc.ops->unlink_h)( &parentloc, &loc );
30006140: e1a01005 mov r1, r5
30006144: e59d3010 ldr r3, [sp, #16]
30006148: e1a00004 mov r0, r4
3000614c: e1a0e00f mov lr, pc
30006150: e593f00c ldr pc, [r3, #12]
30006154: e1a07000 mov r7, r0
rtems_filesystem_freenode( &loc );
30006158: e1a00005 mov r0, r5
3000615c: ebfff46d bl 30003318 <rtems_filesystem_freenode>
if ( free_parentloc )
30006160: e3560000 cmp r6, #0
rtems_filesystem_freenode( &parentloc );
30006164: 11a00004 movne r0, r4
30006168: 1bfff46a blne 30003318 <rtems_filesystem_freenode>
return result;
}
3000616c: e1a00007 mov r0, r7
30006170: e28dd030 add sp, sp, #48 ; 0x30
30006174: e8bd80f0 pop {r4, r5, r6, r7, pc}
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
30006178: e3560000 cmp r6, #0
3000617c: 1a000001 bne 30006188 <unlink+0xf0>
rtems_filesystem_freenode( &parentloc );
return -1;
30006180: e3e07000 mvn r7, #0 <== NOT EXECUTED
30006184: eafffff8 b 3000616c <unlink+0xd4> <== NOT EXECUTED
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
30006188: e1a00004 mov r0, r4
3000618c: ebfff461 bl 30003318 <rtems_filesystem_freenode>
return -1;
30006190: e3e07000 mvn r7, #0
30006194: eafffff4 b 3000616c <unlink+0xd4>
parentpathlen = rtems_filesystem_dirname ( path );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( path, &i, &parentloc );
else {
result = rtems_filesystem_evaluate_path( path, parentpathlen,
30006198: e3a03000 mov r3, #0
3000619c: e28d4018 add r4, sp, #24
300061a0: e58d3000 str r3, [sp]
300061a4: e3a02002 mov r2, #2
300061a8: e1a00007 mov r0, r7
300061ac: e1a01005 mov r1, r5
300061b0: e1a03004 mov r3, r4
300061b4: ebfff40c bl 300031ec <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
300061b8: e3500000 cmp r0, #0
300061bc: 1affffef bne 30006180 <unlink+0xe8>
return -1;
free_parentloc = true;
300061c0: e3a06001 mov r6, #1
300061c4: eaffffbf b 300060c8 <unlink+0x30>
rtems_filesystem_freenode( &parentloc );
return -1;
}
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_filesystem_freenode( &loc );
300061c8: e1a00005 mov r0, r5
300061cc: ebfff451 bl 30003318 <rtems_filesystem_freenode>
if ( free_parentloc )
300061d0: e3560000 cmp r6, #0
rtems_filesystem_freenode( &parentloc );
300061d4: 11a00004 movne r0, r4
300061d8: 1bfff44e blne 30003318 <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( EISDIR );
300061dc: eb002f94 bl 30012034 <__errno>
300061e0: e3a03015 mov r3, #21
300061e4: e5803000 str r3, [r0]
300061e8: e3e07000 mvn r7, #0
300061ec: eaffffde b 3000616c <unlink+0xd4>
300063b8 <unmount>:
*/
int unmount(
const char *path
)
{
300063b8: e92d4070 push {r4, r5, r6, lr}
300063bc: e24dd018 sub sp, sp, #24
300063c0: e1a05000 mov r5, r0
* The root node of the mounted filesytem.
* The node for the directory that the fileystem is mounted on.
* The mount entry that is being refered to.
*/
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) )
300063c4: eb00284d bl 30010500 <strlen>
300063c8: e28d4004 add r4, sp, #4
300063cc: e1a01000 mov r1, r0
300063d0: e3a0c001 mov ip, #1
300063d4: e1a00005 mov r0, r5
300063d8: e3a02000 mov r2, #0
300063dc: e1a03004 mov r3, r4
300063e0: e58dc000 str ip, [sp]
300063e4: ebfff345 bl 30003100 <rtems_filesystem_evaluate_path>
300063e8: e3500000 cmp r0, #0
300063ec: 1a00001a bne 3000645c <unmount+0xa4>
return -1;
mt_entry = loc.mt_entry;
300063f0: e59d5014 ldr r5, [sp, #20]
/*
* Verify this is the root node for the file system to be unmounted.
*/
if ( fs_root_loc->node_access != loc.node_access ){
300063f4: e59d3004 ldr r3, [sp, #4]
300063f8: e595201c ldr r2, [r5, #28]
300063fc: e1520003 cmp r2, r3
30006400: 1a00002d bne 300064bc <unmount+0x104>
/*
* Free the loc node and just use the nodes from the mt_entry .
*/
rtems_filesystem_freenode( &loc );
30006404: e1a00004 mov r0, r4
30006408: ebfff387 bl 3000322c <rtems_filesystem_freenode>
* that made the current node thread based instead
* of system based? I thought it was but it doesn't
* look like it in this version.
*/
if ( rtems_filesystem_current.mt_entry == mt_entry )
3000640c: e59f30f8 ldr r3, [pc, #248] ; 3000650c <unmount+0x154>
30006410: e5933000 ldr r3, [r3]
30006414: e5933014 ldr r3, [r3, #20]
30006418: e1530005 cmp r3, r5
3000641c: 0a00002d beq 300064d8 <unmount+0x120>
/*
* Verify there are no file systems below the path specified
*/
if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point,
30006420: e59f00e8 ldr r0, [pc, #232] ; 30006510 <unmount+0x158>
30006424: e595102c ldr r1, [r5, #44] ; 0x2c
30006428: ebfff5d3 bl 30003b7c <rtems_filesystem_mount_iterate>
3000642c: e3500000 cmp r0, #0
30006430: 1a000028 bne 300064d8 <unmount+0x120>
* 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 )
30006434: e1a00005 mov r0, r5
30006438: ebfff475 bl 30003614 <rtems_libio_is_open_files_in_fs>
3000643c: e3500001 cmp r0, #1
30006440: 0a000024 beq 300064d8 <unmount+0x120>
* 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 )
30006444: e5953014 ldr r3, [r5, #20]
30006448: e1a00005 mov r0, r5
3000644c: e1a0e00f mov lr, pc
30006450: e593f028 ldr pc, [r3, #40] ; 0x28
30006454: e2506000 subs r6, r0, #0
30006458: 0a000002 beq 30006468 <unmount+0xb0>
*/
if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){
if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 )
rtems_fatal_error_occurred( 0 );
return -1;
3000645c: e3e00000 mvn r0, #0
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
30006460: e28dd018 add sp, sp, #24
30006464: e8bd8070 pop {r4, r5, r6, pc}
* 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){
30006468: e5953028 ldr r3, [r5, #40] ; 0x28
3000646c: e1a00005 mov r0, r5
30006470: e1a0e00f mov lr, pc
30006474: e593f02c ldr pc, [r3, #44] ; 0x2c
30006478: e2504000 subs r4, r0, #0
3000647c: 1a00001a bne 300064ec <unmount+0x134>
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
30006480: e59f608c ldr r6, [pc, #140] ; 30006514 <unmount+0x15c>
30006484: e1a01004 mov r1, r4
30006488: e1a02004 mov r2, r4
3000648c: e5960000 ldr r0, [r6]
30006490: eb0002a1 bl 30006f1c <rtems_semaphore_obtain>
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
30006494: e1a00005 mov r0, r5
30006498: eb000501 bl 300078a4 <_Chain_Extract>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
3000649c: e5960000 ldr r0, [r6]
300064a0: eb0002e6 bl 30007040 <rtems_semaphore_release>
/*
* Free the memory node that was allocated in mount
* Free the memory associated with the extracted mount table entry.
*/
rtems_filesystem_freenode( fs_mount_loc );
300064a4: e2850008 add r0, r5, #8
300064a8: ebfff35f bl 3000322c <rtems_filesystem_freenode>
free( mt_entry );
300064ac: e1a00005 mov r0, r5
300064b0: ebfff362 bl 30003240 <free>
return 0;
300064b4: e1a00004 mov r0, r4
300064b8: eaffffe8 b 30006460 <unmount+0xa8>
/*
* Verify this is the root node for the file system to be unmounted.
*/
if ( fs_root_loc->node_access != loc.node_access ){
rtems_filesystem_freenode( &loc );
300064bc: e1a00004 mov r0, r4
300064c0: ebfff359 bl 3000322c <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( EACCES );
300064c4: eb002291 bl 3000ef10 <__errno>
300064c8: e3a0300d mov r3, #13
300064cc: e5803000 str r3, [r0]
300064d0: e3e00000 mvn r0, #0
300064d4: eaffffe1 b 30006460 <unmount+0xa8>
* 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 );
300064d8: eb00228c bl 3000ef10 <__errno>
300064dc: e3a03010 mov r3, #16
300064e0: e5803000 str r3, [r0]
300064e4: e3e00000 mvn r0, #0
300064e8: eaffffdc b 30006460 <unmount+0xa8>
* 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 )
300064ec: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED
300064f0: e1a00005 mov r0, r5 <== NOT EXECUTED
300064f4: e1a0e00f mov lr, pc <== NOT EXECUTED
300064f8: e593f020 ldr pc, [r3, #32] <== NOT EXECUTED
300064fc: e3500000 cmp r0, #0 <== NOT EXECUTED
30006500: 0affffd5 beq 3000645c <unmount+0xa4> <== NOT EXECUTED
rtems_fatal_error_occurred( 0 );
30006504: e1a00006 mov r0, r6 <== NOT EXECUTED
30006508: eb000410 bl 30007550 <rtems_fatal_error_occurred> <== NOT EXECUTED
30006064 <utime>:
int utime(
const char *path,
const struct utimbuf *times
)
{
30006064: e92d4070 push {r4, r5, r6, lr}
30006068: e24dd018 sub sp, sp, #24
3000606c: e1a05001 mov r5, r1
30006070: e1a06000 mov r6, r0
rtems_filesystem_location_info_t temp_loc;
int result;
struct utimbuf now;
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) )
30006074: eb0029c5 bl 30010790 <strlen>
30006078: e28d4004 add r4, sp, #4
3000607c: e3a03001 mov r3, #1
30006080: e1a01000 mov r1, r0
30006084: e58d3000 str r3, [sp]
30006088: e3a02000 mov r2, #0
3000608c: e1a00006 mov r0, r6
30006090: e1a03004 mov r3, r4
30006094: ebfff201 bl 300028a0 <rtems_filesystem_evaluate_path>
30006098: e3500000 cmp r0, #0
return -1;
3000609c: 13e05000 mvnne r5, #0
{
rtems_filesystem_location_info_t temp_loc;
int result;
struct utimbuf now;
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) )
300060a0: 1a000009 bne 300060cc <utime+0x68>
return -1;
if ( times == NULL ) {
300060a4: e3550000 cmp r5, #0
300060a8: 0a00000a beq 300060d8 <utime+0x74>
300060ac: e8950006 ldm r5, {r1, r2}
now.actime = now.modtime = time( NULL );
times = &now;
}
result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime );
300060b0: e1a00004 mov r0, r4
300060b4: e59d3010 ldr r3, [sp, #16]
300060b8: e1a0e00f mov lr, pc
300060bc: e593f030 ldr pc, [r3, #48] ; 0x30
300060c0: e1a05000 mov r5, r0
rtems_filesystem_freenode( &temp_loc );
300060c4: e1a00004 mov r0, r4
300060c8: ebfff322 bl 30002d58 <rtems_filesystem_freenode>
return result;
}
300060cc: e1a00005 mov r0, r5
300060d0: e28dd018 add sp, sp, #24
300060d4: e8bd8070 pop {r4, r5, r6, pc}
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) )
return -1;
if ( times == NULL ) {
now.actime = now.modtime = time( NULL );
300060d8: eb0029ff bl 300108dc <time> <== NOT EXECUTED
300060dc: e1a01000 mov r1, r0 <== NOT EXECUTED
300060e0: e1a02000 mov r2, r0 <== NOT EXECUTED
300060e4: eafffff1 b 300060b0 <utime+0x4c> <== NOT EXECUTED
30004cdc <vprintk>:
*/
void vprintk(
const char *fmt,
va_list ap
)
{
30004cdc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
30004ce0: e1a0a000 mov sl, r0
for (; *fmt != '\0'; fmt++) {
30004ce4: e5d00000 ldrb r0, [r0]
*/
void vprintk(
const char *fmt,
va_list ap
)
{
30004ce8: e24dd01c sub sp, sp, #28
for (; *fmt != '\0'; fmt++) {
30004cec: e3500000 cmp r0, #0
*/
void vprintk(
const char *fmt,
va_list ap
)
{
30004cf0: e58d1000 str r1, [sp]
for (; *fmt != '\0'; fmt++) {
30004cf4: 0a00006e beq 30004eb4 <vprintk+0x1d8>
bool sign = false;
char lead = ' ';
char c;
if (*fmt != '%') {
BSP_output_char(*fmt);
30004cf8: e59f8334 ldr r8, [pc, #820] ; 30005034 <vprintk+0x358>
* console is not yet initialized or in ISR's.
*
* Arguments:
* as in printf: fmt - format string, ... - unnamed arguments.
*/
void vprintk(
30004cfc: e28db008 add fp, sp, #8
bool minus = false;
bool sign = false;
char lead = ' ';
char c;
if (*fmt != '%') {
30004d00: e3500025 cmp r0, #37 ; 0x25
30004d04: 1a00006c bne 30004ebc <vprintk+0x1e0>
BSP_output_char(*fmt);
continue;
}
fmt++;
if (*fmt == '0' ) {
30004d08: e5fa0001 ldrb r0, [sl, #1]!
30004d0c: e3500030 cmp r0, #48 ; 0x30
lead = '0';
fmt++;
30004d10: 05fa0001 ldrbeq r0, [sl, #1]!
unsigned base = 0;
unsigned width = 0;
bool lflag = false;
bool minus = false;
bool sign = false;
char lead = ' ';
30004d14: 13a03020 movne r3, #32
BSP_output_char(*fmt);
continue;
}
fmt++;
if (*fmt == '0' ) {
lead = '0';
30004d18: 03a02030 moveq r2, #48 ; 0x30
unsigned base = 0;
unsigned width = 0;
bool lflag = false;
bool minus = false;
bool sign = false;
char lead = ' ';
30004d1c: 158d3004 strne r3, [sp, #4]
BSP_output_char(*fmt);
continue;
}
fmt++;
if (*fmt == '0' ) {
lead = '0';
30004d20: 058d2004 streq r2, [sp, #4]
fmt++;
}
if (*fmt == '-' ) {
30004d24: e350002d cmp r0, #45 ; 0x2d
minus = true;
fmt++;
30004d28: 05fa0001 ldrbeq r0, [sl, #1]!
if (*fmt == '0' ) {
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
minus = true;
30004d2c: 03a09001 moveq r9, #1
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
30004d30: e2403030 sub r3, r0, #48 ; 0x30
{
for (; *fmt != '\0'; fmt++) {
unsigned base = 0;
unsigned width = 0;
bool lflag = false;
bool minus = false;
30004d34: 13a09000 movne r9, #0
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
30004d38: e3530009 cmp r3, #9
30004d3c: 83a04000 movhi r4, #0
30004d40: 8a000009 bhi 30004d6c <vprintk+0x90>
* console is not yet initialized or in ISR's.
*
* Arguments:
* as in printf: fmt - format string, ... - unnamed arguments.
*/
void vprintk(
30004d44: e28a3001 add r3, sl, #1
30004d48: e3a04000 mov r4, #0
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
width *= 10;
30004d4c: e0844104 add r4, r4, r4, lsl #2
width += ((unsigned) *fmt - '0');
30004d50: e0804084 add r4, r0, r4, lsl #1
30004d54: e1a0a003 mov sl, r3
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
30004d58: e4d30001 ldrb r0, [r3], #1
width *= 10;
width += ((unsigned) *fmt - '0');
30004d5c: e2444030 sub r4, r4, #48 ; 0x30
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
30004d60: e2402030 sub r2, r0, #48 ; 0x30
30004d64: e3520009 cmp r2, #9
30004d68: 9afffff7 bls 30004d4c <vprintk+0x70>
width *= 10;
width += ((unsigned) *fmt - '0');
fmt++;
}
if ((c = *fmt) == 'l') {
30004d6c: e350006c cmp r0, #108 ; 0x6c
lflag = true;
c = *++fmt;
30004d70: 05fa0001 ldrbeq r0, [sl, #1]!
}
if ( c == 'c' ) {
30004d74: e3500063 cmp r0, #99 ; 0x63
30004d78: 0a00008b beq 30004fac <vprintk+0x2d0>
/* need a cast here since va_arg() only takes fully promoted types */
char chr = (char) va_arg(ap, int);
BSP_output_char(chr);
continue;
}
if ( c == 's' ) {
30004d7c: e3500073 cmp r0, #115 ; 0x73
30004d80: 0a000053 beq 30004ed4 <vprintk+0x1f8>
continue;
}
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
30004d84: e350006f cmp r0, #111 ; 0x6f
30004d88: 1350004f cmpne r0, #79 ; 0x4f
base = 8; sign = false;
30004d8c: 03a02000 moveq r2, #0
30004d90: 03a09008 moveq r9, #8
continue;
}
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
30004d94: 0a000009 beq 30004dc0 <vprintk+0xe4>
base = 8; sign = false;
} else if ( c == 'i' || c == 'I' ||
30004d98: e3500069 cmp r0, #105 ; 0x69
30004d9c: 13500049 cmpne r0, #73 ; 0x49
30004da0: 0a000004 beq 30004db8 <vprintk+0xdc>
c == 'd' || c == 'D' ) {
30004da4: e3500064 cmp r0, #100 ; 0x64
30004da8: 13500044 cmpne r0, #68 ; 0x44
30004dac: 13a02000 movne r2, #0
30004db0: 03a02001 moveq r2, #1
30004db4: 1a000086 bne 30004fd4 <vprintk+0x2f8>
base = 10; sign = true;
30004db8: e3a02001 mov r2, #1
30004dbc: e3a0900a mov r9, #10
} else {
BSP_output_char(c);
continue;
}
printNum(
30004dc0: e59d3000 ldr r3, [sp]
unsigned long unsigned_num;
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
30004dc4: e3520000 cmp r2, #0
} else {
BSP_output_char(c);
continue;
}
printNum(
30004dc8: e5937000 ldr r7, [r3]
lflag ? va_arg(ap, long) : (long) va_arg(ap, int),
30004dcc: e2833004 add r3, r3, #4
30004dd0: e58d3000 str r3, [sp]
unsigned long unsigned_num;
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
30004dd4: 0a000001 beq 30004de0 <vprintk+0x104>
30004dd8: e3570000 cmp r7, #0
30004ddc: ba00008d blt 30005018 <vprintk+0x33c>
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
30004de0: e1a00007 mov r0, r7
30004de4: e1a01009 mov r1, r9
30004de8: eb0030f1 bl 300111b4 <__aeabi_uidiv>
30004dec: e3500000 cmp r0, #0
30004df0: e1a05000 mov r5, r0
30004df4: e1a06000 mov r6, r0
30004df8: 01a05007 moveq r5, r7
30004dfc: 03a07001 moveq r7, #1
30004e00: 0a000010 beq 30004e48 <vprintk+0x16c>
30004e04: e20930ff and r3, r9, #255 ; 0xff
30004e08: e1a02007 mov r2, r7
if (maxwidth) maxwidth--;
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
30004e0c: e3a06000 mov r6, #0
30004e10: e1a07003 mov r7, r3
30004e14: ea000001 b 30004e20 <vprintk+0x144>
while ((n = unsigned_num / base) > 0) {
30004e18: e1a02005 mov r2, r5
30004e1c: e1a05000 mov r5, r0
toPrint[count++] = (char) (unsigned_num - (n * base));
30004e20: e0030795 mul r3, r5, r7
30004e24: e0633002 rsb r3, r3, r2
30004e28: e7cb3006 strb r3, [fp, r6]
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
30004e2c: e1a00005 mov r0, r5
30004e30: e1a01009 mov r1, r9
30004e34: eb0030de bl 300111b4 <__aeabi_uidiv>
30004e38: e3500000 cmp r0, #0
toPrint[count++] = (char) (unsigned_num - (n * base));
30004e3c: e2866001 add r6, r6, #1
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
30004e40: 1afffff4 bne 30004e18 <vprintk+0x13c>
30004e44: e2867001 add r7, r6, #1
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
30004e48: e28d201c add r2, sp, #28
30004e4c: e0826006 add r6, r2, r6
for (n=maxwidth ; n > count; n-- )
30004e50: e1570004 cmp r7, r4
count = 0;
while ((n = unsigned_num / base) > 0) {
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
30004e54: e5465014 strb r5, [r6, #-20]
for (n=maxwidth ; n > count; n-- )
30004e58: 2a000006 bcs 30004e78 <vprintk+0x19c>
30004e5c: e59d5004 ldr r5, [sp, #4]
BSP_output_char(lead);
30004e60: e1a00005 mov r0, r5
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
30004e64: e2444001 sub r4, r4, #1
BSP_output_char(lead);
30004e68: e1a0e00f mov lr, pc
30004e6c: e598f000 ldr pc, [r8]
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
30004e70: e1570004 cmp r7, r4
30004e74: 3afffff9 bcc 30004e60 <vprintk+0x184>
BSP_output_char(lead);
for (n = 0; n < count; n++) {
30004e78: e3570000 cmp r7, #0
30004e7c: 0a000009 beq 30004ea8 <vprintk+0x1cc>
* console is not yet initialized or in ISR's.
*
* Arguments:
* as in printf: fmt - format string, ... - unnamed arguments.
*/
void vprintk(
30004e80: e08b5007 add r5, fp, r7
30004e84: e3a04000 mov r4, #0
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
30004e88: e5753001 ldrb r3, [r5, #-1]!
30004e8c: e59f21a4 ldr r2, [pc, #420] ; 30005038 <vprintk+0x35c>
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
30004e90: e2844001 add r4, r4, #1
BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
30004e94: e7d20003 ldrb r0, [r2, r3]
30004e98: e1a0e00f mov lr, pc
30004e9c: e598f000 ldr pc, [r8]
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
30004ea0: e1570004 cmp r7, r4
30004ea4: 8afffff7 bhi 30004e88 <vprintk+0x1ac>
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
30004ea8: e5fa0001 ldrb r0, [sl, #1]!
30004eac: e3500000 cmp r0, #0
30004eb0: 1affff92 bne 30004d00 <vprintk+0x24>
sign,
width,
lead
);
}
}
30004eb4: e28dd01c add sp, sp, #28
30004eb8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
} else if ( c == 'x' || c == 'X' ) {
base = 16; sign = false;
} else if ( c == 'p' ) {
base = 16; sign = false; lflag = true;
} else {
BSP_output_char(c);
30004ebc: e1a0e00f mov lr, pc
30004ec0: e598f000 ldr pc, [r8]
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
30004ec4: e5fa0001 ldrb r0, [sl, #1]!
30004ec8: e3500000 cmp r0, #0
30004ecc: 1affff8b bne 30004d00 <vprintk+0x24>
30004ed0: eafffff7 b 30004eb4 <vprintk+0x1d8>
}
if ( c == 's' ) {
unsigned i, len;
char *s, *str;
str = va_arg(ap, char *);
30004ed4: e59d3000 ldr r3, [sp]
30004ed8: e5936000 ldr r6, [r3]
30004edc: e2832004 add r2, r3, #4
if ( str == NULL ) {
str = "";
30004ee0: e59f3154 ldr r3, [pc, #340] ; 3000503c <vprintk+0x360>
30004ee4: e3560000 cmp r6, #0
30004ee8: 01a06003 moveq r6, r3
}
if ( c == 's' ) {
unsigned i, len;
char *s, *str;
str = va_arg(ap, char *);
30004eec: e58d2000 str r2, [sp]
if ( str == NULL ) {
str = "";
}
/* calculate length of string */
for ( len=0, s=str ; *s ; len++, s++ )
30004ef0: e5d65000 ldrb r5, [r6]
30004ef4: e3550000 cmp r5, #0
30004ef8: 0a000005 beq 30004f14 <vprintk+0x238>
30004efc: e1a03006 mov r3, r6
30004f00: e3a05000 mov r5, #0
30004f04: e5f32001 ldrb r2, [r3, #1]!
30004f08: e2855001 add r5, r5, #1
30004f0c: e3520000 cmp r2, #0
30004f10: 1afffffb bne 30004f04 <vprintk+0x228>
;
/* leading spaces */
if ( !minus )
30004f14: e3590000 cmp r9, #0
30004f18: 1a000008 bne 30004f40 <vprintk+0x264>
for ( i=len ; i<width ; i++ )
30004f1c: e1550004 cmp r5, r4
30004f20: 2a000006 bcs 30004f40 <vprintk+0x264>
30004f24: e1a07005 mov r7, r5
BSP_output_char(' ');
30004f28: e3a00020 mov r0, #32
for ( len=0, s=str ; *s ; len++, s++ )
;
/* leading spaces */
if ( !minus )
for ( i=len ; i<width ; i++ )
30004f2c: e2877001 add r7, r7, #1
BSP_output_char(' ');
30004f30: e1a0e00f mov lr, pc
30004f34: e598f000 ldr pc, [r8]
for ( len=0, s=str ; *s ; len++, s++ )
;
/* leading spaces */
if ( !minus )
for ( i=len ; i<width ; i++ )
30004f38: e1570004 cmp r7, r4
30004f3c: 3afffff9 bcc 30004f28 <vprintk+0x24c>
BSP_output_char(' ');
/* no width option */
if (width == 0) {
30004f40: e3540000 cmp r4, #0
30004f44: 1a000002 bne 30004f54 <vprintk+0x278>
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
30004f48: e3550000 cmp r5, #0
30004f4c: 0a000008 beq 30004f74 <vprintk+0x298>
30004f50: e1a04005 mov r4, r5
30004f54: e5d60000 ldrb r0, [r6]
30004f58: e3500000 cmp r0, #0
30004f5c: 0a000004 beq 30004f74 <vprintk+0x298>
BSP_output_char(*str);
30004f60: e1a0e00f mov lr, pc
30004f64: e598f000 ldr pc, [r8]
if (width == 0) {
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
30004f68: e5f60001 ldrb r0, [r6, #1]!
30004f6c: e3500000 cmp r0, #0
30004f70: 1afffffa bne 30004f60 <vprintk+0x284>
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
30004f74: e3590000 cmp r9, #0
30004f78: 0affffca beq 30004ea8 <vprintk+0x1cc>
for ( i=len ; i<width ; i++ )
30004f7c: e1550004 cmp r5, r4
30004f80: 2affffc8 bcs 30004ea8 <vprintk+0x1cc>
BSP_output_char(' ');
30004f84: e3a00020 mov r0, #32
for ( i=0 ; i<width && *str ; str++ )
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
for ( i=len ; i<width ; i++ )
30004f88: e2855001 add r5, r5, #1
BSP_output_char(' ');
30004f8c: e1a0e00f mov lr, pc
30004f90: e598f000 ldr pc, [r8]
for ( i=0 ; i<width && *str ; str++ )
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
for ( i=len ; i<width ; i++ )
30004f94: e1550004 cmp r5, r4
30004f98: 3afffff9 bcc 30004f84 <vprintk+0x2a8>
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
30004f9c: e5fa0001 ldrb r0, [sl, #1]!
30004fa0: e3500000 cmp r0, #0
30004fa4: 1affff55 bne 30004d00 <vprintk+0x24>
30004fa8: eaffffc1 b 30004eb4 <vprintk+0x1d8> <== NOT EXECUTED
lflag = true;
c = *++fmt;
}
if ( c == 'c' ) {
/* need a cast here since va_arg() only takes fully promoted types */
char chr = (char) va_arg(ap, int);
30004fac: e59d2000 ldr r2, [sp]
30004fb0: e2824004 add r4, r2, #4
BSP_output_char(chr);
30004fb4: e5d20000 ldrb r0, [r2]
30004fb8: e1a0e00f mov lr, pc
30004fbc: e598f000 ldr pc, [r8]
lflag = true;
c = *++fmt;
}
if ( c == 'c' ) {
/* need a cast here since va_arg() only takes fully promoted types */
char chr = (char) va_arg(ap, int);
30004fc0: e58d4000 str r4, [sp]
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
30004fc4: e5fa0001 ldrb r0, [sl, #1]!
30004fc8: e3500000 cmp r0, #0
30004fcc: 1affff4b bne 30004d00 <vprintk+0x24>
30004fd0: eaffffb7 b 30004eb4 <vprintk+0x1d8> <== NOT EXECUTED
if ( c == 'o' || c == 'O' ) {
base = 8; sign = false;
} else if ( c == 'i' || c == 'I' ||
c == 'd' || c == 'D' ) {
base = 10; sign = true;
} else if ( c == 'u' || c == 'U' ) {
30004fd4: e3500075 cmp r0, #117 ; 0x75
30004fd8: 13500055 cmpne r0, #85 ; 0x55
30004fdc: 13a01000 movne r1, #0
30004fe0: 03a01001 moveq r1, #1
base = 10; sign = false;
30004fe4: 03a0900a moveq r9, #10
if ( c == 'o' || c == 'O' ) {
base = 8; sign = false;
} else if ( c == 'i' || c == 'I' ||
c == 'd' || c == 'D' ) {
base = 10; sign = true;
} else if ( c == 'u' || c == 'U' ) {
30004fe8: 0affff74 beq 30004dc0 <vprintk+0xe4>
base = 10; sign = false;
} else if ( c == 'x' || c == 'X' ) {
30004fec: e3500078 cmp r0, #120 ; 0x78
30004ff0: 13500058 cmpne r0, #88 ; 0x58
30004ff4: 13a02000 movne r2, #0
30004ff8: 03a02001 moveq r2, #1
base = 16; sign = false;
30004ffc: 03a09010 moveq r9, #16
30005000: 01a02001 moveq r2, r1
} else if ( c == 'i' || c == 'I' ||
c == 'd' || c == 'D' ) {
base = 10; sign = true;
} else if ( c == 'u' || c == 'U' ) {
base = 10; sign = false;
} else if ( c == 'x' || c == 'X' ) {
30005004: 0affff6d beq 30004dc0 <vprintk+0xe4>
base = 16; sign = false;
} else if ( c == 'p' ) {
30005008: e3500070 cmp r0, #112 ; 0x70
3000500c: 1affffaa bne 30004ebc <vprintk+0x1e0>
base = 16; sign = false; lflag = true;
30005010: e3a09010 mov r9, #16
30005014: eaffff69 b 30004dc0 <vprintk+0xe4>
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
BSP_output_char('-');
30005018: e3a0002d mov r0, #45 ; 0x2d
3000501c: e1a0e00f mov lr, pc
30005020: e598f000 ldr pc, [r8]
unsigned_num = (unsigned long) -num;
if (maxwidth) maxwidth--;
30005024: e3540000 cmp r4, #0
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
BSP_output_char('-');
unsigned_num = (unsigned long) -num;
30005028: e2677000 rsb r7, r7, #0
if (maxwidth) maxwidth--;
3000502c: 12444001 subne r4, r4, #1
30005030: eaffff6a b 30004de0 <vprintk+0x104>
300135cc <write>:
)
{
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
300135cc: e59f30a4 ldr r3, [pc, #164] ; 30013678 <write+0xac>
ssize_t write(
int fd,
const void *buffer,
size_t count
)
{
300135d0: e92d4010 push {r4, lr}
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
300135d4: e5933000 ldr r3, [r3]
300135d8: e1500003 cmp r0, r3
300135dc: 2a00001b bcs 30013650 <write+0x84>
iop = rtems_libio_iop( fd );
300135e0: e59f4094 ldr r4, [pc, #148] ; 3001367c <write+0xb0>
300135e4: e0600180 rsb r0, r0, r0, lsl #3
300135e8: e5944000 ldr r4, [r4]
300135ec: e0844180 add r4, r4, r0, lsl #3
rtems_libio_check_is_open( iop );
300135f0: e5940014 ldr r0, [r4, #20]
300135f4: e3100c01 tst r0, #256 ; 0x100
300135f8: 0a000014 beq 30013650 <write+0x84>
rtems_libio_check_buffer( buffer );
300135fc: e3510000 cmp r1, #0
30013600: 0a000017 beq 30013664 <write+0x98>
rtems_libio_check_count( count );
30013604: e3520000 cmp r2, #0
30013608: 0a00000e beq 30013648 <write+0x7c>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
3001360c: e3100004 tst r0, #4
30013610: 0a000013 beq 30013664 <write+0x98>
return 0;
/*
* Now process the write() request.
*/
rc = (*iop->pathinfo.handlers->write_h)( iop, buffer, count );
30013614: e5943020 ldr r3, [r4, #32]
30013618: e1a00004 mov r0, r4
3001361c: e1a0e00f mov lr, pc
30013620: e593f00c ldr pc, [r3, #12]
if ( rc > 0 )
30013624: e3500000 cmp r0, #0
30013628: d8bd8010 pople {r4, pc}
iop->offset += rc;
3001362c: e284300c add r3, r4, #12
30013630: e893000c ldm r3, {r2, r3}
30013634: e0922000 adds r2, r2, r0
30013638: e0a33fc0 adc r3, r3, r0, asr #31
3001363c: e584200c str r2, [r4, #12]
30013640: e5843010 str r3, [r4, #16]
30013644: e8bd8010 pop {r4, 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 );
30013648: e1a00002 mov r0, r2
if ( rc > 0 )
iop->offset += rc;
return rc;
}
3001364c: e8bd8010 pop {r4, pc}
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
30013650: ebffe928 bl 3000daf8 <__errno>
30013654: e3a03009 mov r3, #9
30013658: e5803000 str r3, [r0]
3001365c: e3e00000 mvn r0, #0
30013660: e8bd8010 pop {r4, pc}
rtems_libio_check_buffer( buffer );
rtems_libio_check_count( count );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
30013664: ebffe923 bl 3000daf8 <__errno> <== NOT EXECUTED
30013668: e3a03016 mov r3, #22 <== NOT EXECUTED
3001366c: e5803000 str r3, [r0] <== NOT EXECUTED
30013670: e3e00000 mvn r0, #0 <== NOT EXECUTED
30013674: e8bd8010 pop {r4, pc} <== NOT EXECUTED
300064d0 <writev>:
int bytes;
rtems_libio_t *iop;
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
300064d0: e59f3158 ldr r3, [pc, #344] ; 30006630 <writev+0x160>
ssize_t writev(
int fd,
const struct iovec *iov,
int iovcnt
)
{
300064d4: e92d41f0 push {r4, r5, r6, r7, r8, lr}
int bytes;
rtems_libio_t *iop;
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
300064d8: e5933000 ldr r3, [r3]
ssize_t writev(
int fd,
const struct iovec *iov,
int iovcnt
)
{
300064dc: e1a05002 mov r5, r2
int bytes;
rtems_libio_t *iop;
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
300064e0: e1500003 cmp r0, r3
300064e4: 2a00004a bcs 30006614 <writev+0x144>
iop = rtems_libio_iop( fd );
300064e8: e59f3144 ldr r3, [pc, #324] ; 30006634 <writev+0x164>
300064ec: e0600180 rsb r0, r0, r0, lsl #3
300064f0: e5933000 ldr r3, [r3]
300064f4: e0838180 add r8, r3, r0, lsl #3
rtems_libio_check_is_open( iop );
300064f8: e5983014 ldr r3, [r8, #20]
300064fc: e3130c01 tst r3, #256 ; 0x100
30006500: 0a000043 beq 30006614 <writev+0x144>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
30006504: e3130004 tst r3, #4
30006508: 0a00003b beq 300065fc <writev+0x12c>
/*
* Argument validation on IO vector
*/
if ( !iov )
3000650c: e3510000 cmp r1, #0
30006510: 0a000039 beq 300065fc <writev+0x12c>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
30006514: e3520000 cmp r2, #0
30006518: da000037 ble 300065fc <writev+0x12c>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
3000651c: e3520b01 cmp r2, #1024 ; 0x400
30006520: ca000035 bgt 300065fc <writev+0x12c>
rtems_set_errno_and_return_minus_one( EINVAL );
30006524: e1a04001 mov r4, r1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
30006528: e3a01000 mov r1, #0
3000652c: e1a02004 mov r2, r4
30006530: e3a06001 mov r6, #1
30006534: e1a07001 mov r7, r1
all_zeros = false;
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
30006538: e59fc0f8 ldr ip, [pc, #248] ; 30006638 <writev+0x168>
3000653c: ea000000 b 30006544 <writev+0x74>
if ( iov[v].iov_len )
all_zeros = false;
/* check for wrap */
old = total;
total += iov[v].iov_len;
30006540: e1a07003 mov r7, r3
* entering the write loop.
*/
all_zeros = true;
for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) {
if ( !iov[v].iov_base )
30006544: e5923000 ldr r3, [r2]
* this loop does that check as well and sets "all-zero" appropriately.
* The variable "all_zero" is used as an early exit point before
* entering the write loop.
*/
all_zeros = true;
for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) {
30006548: e2811001 add r1, r1, #1
if ( !iov[v].iov_base )
3000654c: e3530000 cmp r3, #0
30006550: 0a000029 beq 300065fc <writev+0x12c>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len < 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
30006554: e5920004 ldr r0, [r2, #4]
* this loop does that check as well and sets "all-zero" appropriately.
* The variable "all_zero" is used as an early exit point before
* entering the write loop.
*/
all_zeros = true;
for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) {
30006558: e2822008 add r2, r2, #8
if ( iov[v].iov_len )
all_zeros = false;
/* check for wrap */
old = total;
total += iov[v].iov_len;
3000655c: e0873000 add r3, r7, r0
if ( iov[v].iov_len < 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
all_zeros = false;
30006560: e3500000 cmp r0, #0
30006564: 13a06000 movne r6, #0
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
30006568: e1570003 cmp r7, r3
3000656c: d153000c cmple r3, ip
30006570: d3a07000 movle r7, #0
30006574: c3a07001 movgt r7, #1
30006578: ca00001f bgt 300065fc <writev+0x12c>
* this loop does that check as well and sets "all-zero" appropriately.
* The variable "all_zero" is used as an early exit point before
* entering the write loop.
*/
all_zeros = true;
for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) {
3000657c: e1550001 cmp r5, r1
30006580: caffffee bgt 30006540 <writev+0x70>
}
/*
* A writev with all zeros is supposed to have no effect per OpenGroup.
*/
if ( all_zeros == true ) {
30006584: e3560000 cmp r6, #0
30006588: 1a00001f bne 3000660c <writev+0x13c>
3000658c: e1a07006 mov r7, r6
30006590: ea000003 b 300065a4 <writev+0xd4>
}
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
30006594: e2866001 add r6, r6, #1
30006598: e1550006 cmp r5, r6
3000659c: e2844008 add r4, r4, #8
300065a0: da000019 ble 3000660c <writev+0x13c>
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
300065a4: e5942004 ldr r2, [r4, #4]
300065a8: e3520000 cmp r2, #0
300065ac: 0afffff8 beq 30006594 <writev+0xc4>
continue;
bytes = (*iop->pathinfo.handlers->write_h)(
300065b0: e5941000 ldr r1, [r4]
300065b4: e5983020 ldr r3, [r8, #32]
300065b8: e1a00008 mov r0, r8
300065bc: e1a0e00f mov lr, pc
300065c0: e593f00c ldr pc, [r3, #12]
iop,
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
300065c4: e3500000 cmp r0, #0
300065c8: ba000016 blt 30006628 <writev+0x158>
return -1;
if ( bytes > 0 ) {
300065cc: 0a000006 beq 300065ec <writev+0x11c>
iop->offset += bytes;
300065d0: e288300c add r3, r8, #12
300065d4: e893000c ldm r3, {r2, r3}
300065d8: e0922000 adds r2, r2, r0
300065dc: e0a33fc0 adc r3, r3, r0, asr #31
300065e0: e588200c str r2, [r8, #12]
300065e4: e5883010 str r3, [r8, #16]
total += bytes;
300065e8: e0877000 add r7, r7, r0
}
if (bytes != iov[ v ].iov_len)
300065ec: e5943004 ldr r3, [r4, #4]
300065f0: e1500003 cmp r0, r3
300065f4: 0affffe6 beq 30006594 <writev+0xc4>
300065f8: ea000003 b 3000660c <writev+0x13c> <== NOT EXECUTED
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
rtems_set_errno_and_return_minus_one( EINVAL );
300065fc: eb002167 bl 3000eba0 <__errno>
30006600: e3a03016 mov r3, #22
30006604: e5803000 str r3, [r0]
30006608: e3e07000 mvn r7, #0
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
3000660c: e1a00007 mov r0, r7
30006610: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
30006614: eb002161 bl 3000eba0 <__errno>
30006618: e3a03009 mov r3, #9
3000661c: e5803000 str r3, [r0]
30006620: e3e07000 mvn r7, #0
30006624: eafffff8 b 3000660c <writev+0x13c>
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
return -1;
30006628: e3e07000 mvn r7, #0 <== NOT EXECUTED
3000662c: eafffff6 b 3000660c <writev+0x13c> <== NOT EXECUTED