=============================================================================== a0009340 : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { a0009340: e5903000 ldr r3, [r0] ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; a0009344: e5902010 ldr r2, [r0, #16] switch( node->type ) { a0009348: 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; a000934c: e5922034 ldr r2, [r2, #52] ; 0x34 switch( node->type ) { a0009350: e2433001 sub r3, r3, #1 a0009354: e3530006 cmp r3, #6 a0009358: 979ff103 ldrls pc, [pc, r3, lsl #2] a000935c: ea000008 b a0009384 <== NOT EXECUTED a0009360: a00093ac .word 0xa00093ac <== NOT EXECUTED a0009364: a00093bc .word 0xa00093bc <== NOT EXECUTED a0009368: a000939c .word 0xa000939c <== NOT EXECUTED a000936c: a000939c .word 0xa000939c <== NOT EXECUTED a0009370: a000938c .word 0xa000938c <== NOT EXECUTED a0009374: a000938c .word 0xa000938c <== NOT EXECUTED a0009378: a000937c .word 0xa000937c <== NOT EXECUTED break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_FIFO: loc->handlers = fs_info->fifo_handlers; a000937c: e5923010 ldr r3, [r2, #16] a0009380: e5803008 str r3, [r0, #8] break; } return 0; } a0009384: e3a00000 mov r0, #0 a0009388: 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; a000938c: e5923008 ldr r3, [r2, #8] a0009390: e5803008 str r3, [r0, #8] loc->handlers = fs_info->fifo_handlers; break; } return 0; } a0009394: e3a00000 mov r0, #0 a0009398: 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; a000939c: e59f3028 ldr r3, [pc, #40] ; a00093cc a00093a0: e5803008 str r3, [r0, #8] loc->handlers = fs_info->fifo_handlers; break; } return 0; } a00093a4: e3a00000 mov r0, #0 a00093a8: 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; a00093ac: e592300c ldr r3, [r2, #12] a00093b0: e5803008 str r3, [r0, #8] loc->handlers = fs_info->fifo_handlers; break; } return 0; } a00093b4: e3a00000 mov r0, #0 a00093b8: e12fff1e bx lr switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; a00093bc: e59f300c ldr r3, [pc, #12] ; a00093d0 a00093c0: e5803008 str r3, [r0, #8] loc->handlers = fs_info->fifo_handlers; break; } return 0; } a00093c4: e3a00000 mov r0, #0 a00093c8: e12fff1e bx lr =============================================================================== a0009488 : const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { a0009488: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} char token[ IMFS_NAME_MAX + 1 ]; rtems_filesystem_location_info_t newloc; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { a000948c: e3d25007 bics r5, r2, #7 const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { a0009490: e24dd040 sub sp, sp, #64 ; 0x40 a0009494: e58d2000 str r2, [sp] a0009498: e1a0a000 mov sl, r0 a000949c: e1a04001 mov r4, r1 a00094a0: e1a07003 mov r7, r3 char token[ IMFS_NAME_MAX + 1 ]; rtems_filesystem_location_info_t newloc; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { a00094a4: 1a000081 bne a00096b0 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; a00094a8: e5936000 ldr r6, [r3] a00094ac: e28d8004 add r8, sp, #4 a00094b0: 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 ); a00094b4: e1a02008 mov r2, r8 a00094b8: e1a03009 mov r3, r9 a00094bc: e08a0005 add r0, sl, r5 a00094c0: e1a01004 mov r1, r4 a00094c4: eb0001e1 bl a0009c50 pathnamelen -= len; i += len; if ( !pathloc->node_access ) a00094c8: 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 ); a00094cc: e1a0b000 mov fp, r0 pathnamelen -= len; a00094d0: e59d203c ldr r2, [sp, #60] ; 0x3c i += len; if ( !pathloc->node_access ) a00094d4: e3530000 cmp r3, #0 a00094d8: 0a00004e beq a0009618 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) a00094dc: 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; a00094e0: e0624004 rsb r4, r2, r4 i += len; a00094e4: 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 ) a00094e8: 1a00000f bne a000952c * 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 ) { a00094ec: e593204c ldr r2, [r3, #76] ; 0x4c a00094f0: e3520001 cmp r2, #1 a00094f4: 0a000068 beq a000969c flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); a00094f8: e1a00007 mov r0, r7 a00094fc: ebffff8f bl a0009340 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) a0009500: e59d1000 ldr r1, [sp] flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); a0009504: e1a06000 mov r6, r0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) a0009508: e1a00007 mov r0, r7 a000950c: ebffffb0 bl a00093d4 a0009510: e3500000 cmp r0, #0 a0009514: 1a000036 bne a00095f4 rtems_set_errno_and_return_minus_one( EACCES ); a0009518: eb00117f bl a000db1c <__errno> a000951c: e3a0300d mov r3, #13 a0009520: e5803000 str r3, [r0] a0009524: e3e06000 mvn r6, #0 a0009528: ea000031 b a00095f4 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) a000952c: e596104c ldr r1, [r6, #76] ; 0x4c a0009530: e3510001 cmp r1, #1 a0009534: 0a000031 beq a0009600 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { a0009538: 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; a000953c: e1a06003 mov r6, r3 switch( type ) { a0009540: 0a000006 beq a0009560 a0009544: e35b0004 cmp fp, #4 a0009548: 0a000025 beq a00095e4 a000954c: e35b0002 cmp fp, #2 a0009550: 0a000013 beq a00095a4 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { a0009554: e35b0004 cmp fp, #4 a0009558: 1affffd5 bne a00094b4 a000955c: eaffffe2 b a00094ec <== NOT EXECUTED case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { a0009560: e593304c ldr r3, [r3, #76] ; 0x4c a0009564: e3530003 cmp r3, #3 a0009568: 0a00002f beq a000962c * It would be a design error if we evaluated the link and * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { a000956c: e3530004 cmp r3, #4 a0009570: 0a000058 beq a00096d8 } /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) a0009574: e3530001 cmp r3, #1 a0009578: 1a000051 bne a00096c4 /* * 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 ) { a000957c: e596e05c ldr lr, [r6, #92] ; 0x5c a0009580: e35e0000 cmp lr, #0 a0009584: 1a000047 bne a00096a8 } /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); a0009588: e1a00006 mov r0, r6 a000958c: e1a01008 mov r1, r8 a0009590: eb00018b bl a0009bc4 if ( !node ) a0009594: e2506000 subs r6, r0, #0 a0009598: 0a00001e beq a0009618 /* * Set the node access to the point we have found. */ pathloc->node_access = node; a000959c: e5876000 str r6, [r7] a00095a0: eaffffc3 b a00094b4 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) a00095a4: e59f1154 ldr r1, [pc, #340] ; a0009700 a00095a8: e5912000 ldr r2, [r1] a00095ac: e5922018 ldr r2, [r2, #24] a00095b0: e1520003 cmp r2, r3 a00095b4: 0affffbe beq a00094b4 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { a00095b8: e597e010 ldr lr, [r7, #16] /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == a00095bc: e59e201c ldr r2, [lr, #28] a00095c0: e1520003 cmp r2, r3 a00095c4: 0a00001e beq a0009644 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) a00095c8: e5936008 ldr r6, [r3, #8] a00095cc: e3560000 cmp r6, #0 a00095d0: 1afffff1 bne a000959c rtems_set_errno_and_return_minus_one( ENOENT ); a00095d4: eb001150 bl a000db1c <__errno> a00095d8: e3e06000 mvn r6, #0 a00095dc: e580b000 str fp, [r0] a00095e0: ea000003 b a00095f4 case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); a00095e4: eb00114c bl a000db1c <__errno> a00095e8: e3a0305b mov r3, #91 ; 0x5b a00095ec: e5803000 str r3, [r0] a00095f0: e3e06000 mvn r6, #0 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } a00095f4: e1a00006 mov r0, r6 a00095f8: e28dd040 add sp, sp, #64 ; 0x40 a00095fc: 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 ) ) a0009600: e1a00007 mov r0, r7 a0009604: ebffff72 bl a00093d4 a0009608: e3500000 cmp r0, #0 a000960c: 0affffc1 beq a0009518 a0009610: e5973000 ldr r3, [r7] a0009614: eaffffc7 b a0009538 /* * 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 ); a0009618: eb00113f bl a000db1c <__errno> a000961c: e3a03002 mov r3, #2 a0009620: e5803000 str r3, [r0] a0009624: e3e06000 mvn r6, #0 a0009628: eafffff1 b a00095f4 case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { IMFS_evaluate_hard_link( pathloc, 0 ); a000962c: e1a00007 mov r0, r7 a0009630: e3a01000 mov r1, #0 a0009634: ebffff80 bl a000943c node = pathloc->node_access; a0009638: e5976000 ldr r6, [r7] a000963c: e596304c ldr r3, [r6, #76] ; 0x4c a0009640: eaffffcb b a0009574 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; a0009644: 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; a0009648: e28d6028 add r6, sp, #40 ; 0x28 a000964c: e8be000f ldm lr!, {r0, r1, r2, r3} a0009650: e8a6000f stmia r6!, {r0, r1, r2, r3} *pathloc = newloc; a0009654: e28dc028 add ip, sp, #40 ; 0x28 a0009658: 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; a000965c: e59ec000 ldr ip, [lr] *pathloc = newloc; a0009660: e1a0e007 mov lr, r7 a0009664: e8ae000f stmia lr!, {r0, r1, r2, r3} return (*pathloc->ops->evalpath_h)( &pathname[i-len], a0009668: 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; a000966c: e58ec000 str ip, [lr] return (*pathloc->ops->evalpath_h)( &pathname[i-len], a0009670: e597300c ldr r3, [r7, #12] a0009674: 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; a0009678: e586c000 str ip, [r6] *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], a000967c: e08a0000 add r0, sl, r0 a0009680: e593c000 ldr ip, [r3] a0009684: e0841001 add r1, r4, r1 a0009688: e59d2000 ldr r2, [sp] a000968c: e1a03007 mov r3, r7 a0009690: e12fff3c blx ip a0009694: e1a06000 mov r6, r0 a0009698: eaffffd5 b a00095f4 * * 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 ) { a000969c: e593e05c ldr lr, [r3, #92] ; 0x5c a00096a0: e35e0000 cmp lr, #0 a00096a4: 0affff93 beq a00094f8 newloc = node->info.directory.mt_fs->mt_fs_root; a00096a8: e28ee01c add lr, lr, #28 a00096ac: eaffffe5 b a0009648 rtems_filesystem_location_info_t newloc; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { rtems_set_errno_and_return_minus_one( EIO ); a00096b0: eb001119 bl a000db1c <__errno> <== NOT EXECUTED a00096b4: e3a03005 mov r3, #5 <== NOT EXECUTED a00096b8: e5803000 str r3, [r0] <== NOT EXECUTED a00096bc: e3e06000 mvn r6, #0 <== NOT EXECUTED a00096c0: eaffffcb b a00095f4 <== NOT EXECUTED /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); a00096c4: eb001114 bl a000db1c <__errno> a00096c8: e3a03014 mov r3, #20 a00096cc: e5803000 str r3, [r0] a00096d0: e3e06000 mvn r6, #0 a00096d4: eaffffc6 b a00095f4 * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); a00096d8: e1a00007 mov r0, r7 a00096dc: e3a01000 mov r1, #0 a00096e0: eb000007 bl a0009704 /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; if ( result == -1 ) a00096e4: e3700001 cmn r0, #1 * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); a00096e8: e1a06000 mov r6, r0 /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; a00096ec: e5973000 ldr r3, [r7] if ( result == -1 ) a00096f0: 0affffbf beq a00095f4 /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; a00096f4: e1a06003 mov r6, r3 a00096f8: e593304c ldr r3, [r3, #76] ; 0x4c a00096fc: eaffff9c b a0009574 =============================================================================== a000986c : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { a000986c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} a0009870: e24dd040 sub sp, sp, #64 ; 0x40 a0009874: e1a06001 mov r6, r1 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; a0009878: 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 */ ) { a000987c: e1a0a000 mov sl, r0 a0009880: e58d2000 str r2, [sp] node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); a0009884: eb00148e bl a000eac4 const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { int i = 0; a0009888: e3a07000 mov r7, #0 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); a000988c: e1a04000 mov r4, r0 a0009890: 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 ); a0009894: e1a01004 mov r1, r4 a0009898: e28d303c add r3, sp, #60 ; 0x3c a000989c: e08a0007 add r0, sl, r7 a00098a0: e1a02008 mov r2, r8 a00098a4: eb0000e9 bl a0009c50 pathlen -= len; i += len; if ( !pathloc->node_access ) a00098a8: e5963000 ldr r3, [r6] */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; a00098ac: e59db03c ldr fp, [sp, #60] ; 0x3c * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); a00098b0: e1a09000 mov r9, r0 pathlen -= len; i += len; if ( !pathloc->node_access ) a00098b4: e3530000 cmp r3, #0 */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; a00098b8: e06b4004 rsb r4, fp, r4 i += len; if ( !pathloc->node_access ) a00098bc: 0a000035 beq a0009998 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) a00098c0: e3500000 cmp r0, #0 a00098c4: 1a000006 bne a00098e4 pathloc->node_access = node; break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); a00098c8: eb001093 bl a000db1c <__errno> a00098cc: e3a03011 mov r3, #17 a00098d0: e5803000 str r3, [r0] a00098d4: e3e05000 mvn r5, #0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } a00098d8: e1a00005 mov r0, r5 a00098dc: e28dd040 add sp, sp, #64 ; 0x40 a00098e0: 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 ) a00098e4: e595104c ldr r1, [r5, #76] ; 0x4c a00098e8: e3510001 cmp r1, #1 a00098ec: 0a000044 beq a0009a04 while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; a00098f0: 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; a00098f4: e1a05003 mov r5, r3 switch( type ) { a00098f8: e3590004 cmp r9, #4 a00098fc: 979ff109 ldrls pc, [pc, r9, lsl #2] a0009900: eaffffe3 b a0009894 <== NOT EXECUTED a0009904: a00098c8 .word 0xa00098c8 <== NOT EXECUTED a0009908: a0009894 .word 0xa0009894 <== NOT EXECUTED a000990c: a0009968 .word 0xa0009968 <== NOT EXECUTED a0009910: a0009918 .word 0xa0009918 <== NOT EXECUTED a0009914: a00099ac .word 0xa00099ac <== NOT EXECUTED pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { a0009918: e593304c ldr r3, [r3, #76] ; 0x4c a000991c: e3530003 cmp r3, #3 a0009920: 0a00006a beq a0009ad0 result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { a0009924: e3530004 cmp r3, #4 a0009928: 0a000068 beq a0009ad0 if ( result == -1 ) return -1; } node = pathloc->node_access; if ( !node ) a000992c: e3550000 cmp r5, #0 a0009930: 0a00005f beq a0009ab4 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) a0009934: e595304c ldr r3, [r5, #76] ; 0x4c a0009938: e3530001 cmp r3, #1 a000993c: 1a00005c bne a0009ab4 /* * 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 ) { a0009940: e595c05c ldr ip, [r5, #92] ; 0x5c a0009944: e35c0000 cmp ip, #0 a0009948: 1a00005e bne a0009ac8 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); a000994c: e1a00005 mov r0, r5 a0009950: e1a01008 mov r1, r8 a0009954: eb00009a bl a0009bc4 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) a0009958: e2505000 subs r5, r0, #0 a000995c: 0a000017 beq a00099c0 done = true; else pathloc->node_access = node; a0009960: e5865000 str r5, [r6] a0009964: eaffffca b a0009894 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) a0009968: e59f1180 ldr r1, [pc, #384] ; a0009af0 a000996c: e5912000 ldr r2, [r1] a0009970: e5922018 ldr r2, [r2, #24] a0009974: e1530002 cmp r3, r2 a0009978: 0affffc5 beq a0009894 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ a000997c: e596c010 ldr ip, [r6, #16] a0009980: e59c201c ldr r2, [ip, #28] a0009984: e1530002 cmp r3, r2 a0009988: 0a000023 beq a0009a1c *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) a000998c: e5935008 ldr r5, [r3, #8] a0009990: e3550000 cmp r5, #0 a0009994: 1afffff1 bne a0009960 * 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 ); a0009998: eb00105f bl a000db1c <__errno> a000999c: e3a03002 mov r3, #2 a00099a0: e5803000 str r3, [r0] a00099a4: e3e05000 mvn r5, #0 a00099a8: eaffffca b a00098d8 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 ); a00099ac: eb00105a bl a000db1c <__errno> a00099b0: e3a0305b mov r3, #91 ; 0x5b a00099b4: e5803000 str r3, [r0] a00099b8: e3e05000 mvn r5, #0 a00099bc: eaffffc5 b a00098d8 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; a00099c0: e59d303c ldr r3, [sp, #60] ; 0x3c a00099c4: e59d1000 ldr r1, [sp] /* * 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++) { a00099c8: e08a4007 add r4, sl, r7 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; a00099cc: e0633007 rsb r3, r3, r7 a00099d0: e08a3003 add r3, sl, r3 a00099d4: 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++) { a00099d8: e7da0007 ldrb r0, [sl, r7] a00099dc: e3500000 cmp r0, #0 a00099e0: 1a000003 bne a00099f4 a00099e4: ea000021 b a0009a70 a00099e8: e5f40001 ldrb r0, [r4, #1]! a00099ec: e3500000 cmp r0, #0 a00099f0: 0a00001e beq a0009a70 if ( !IMFS_is_separator( path[ i ] ) ) a00099f4: ebffe4d5 bl a0002d50 a00099f8: e3500000 cmp r0, #0 a00099fc: 1afffff9 bne a00099e8 a0009a00: eaffffe4 b a0009998 * 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 ) ) a0009a04: e1a00006 mov r0, r6 a0009a08: ebfffe71 bl a00093d4 a0009a0c: e3500000 cmp r0, #0 a0009a10: 0a000022 beq a0009aa0 a0009a14: e5963000 ldr r3, [r6] a0009a18: eaffffb4 b a00098f0 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; a0009a1c: 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; a0009a20: e28d4028 add r4, sp, #40 ; 0x28 a0009a24: e8bc000f ldm ip!, {r0, r1, r2, r3} a0009a28: e8a4000f stmia r4!, {r0, r1, r2, r3} *pathloc = newloc; a0009a2c: e28de028 add lr, sp, #40 ; 0x28 a0009a30: e8be000f ldm lr!, {r0, r1, r2, r3} a0009a34: 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; a0009a38: e59cc000 ldr ip, [ip] *pathloc = newloc; a0009a3c: e8ae000f stmia lr!, {r0, r1, r2, r3} return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); a0009a40: 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; a0009a44: e58ec000 str ip, [lr] return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); a0009a48: e596300c ldr r3, [r6, #12] a0009a4c: 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; a0009a50: e584c000 str ip, [r4] *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); a0009a54: e5933004 ldr r3, [r3, #4] a0009a58: e08a0000 add r0, sl, r0 a0009a5c: e1a01006 mov r1, r6 a0009a60: e59d2000 ldr r2, [sp] a0009a64: e12fff33 blx r3 a0009a68: e1a05000 mov r5, r0 a0009a6c: eaffff99 b a00098d8 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); a0009a70: e1a00006 mov r0, r6 a0009a74: ebfffe31 bl a0009340 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) a0009a78: e5963000 ldr r3, [r6] /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); a0009a7c: e1a05000 mov r5, r0 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) a0009a80: e593304c ldr r3, [r3, #76] ; 0x4c a0009a84: e3530001 cmp r3, #1 a0009a88: 1a000009 bne a0009ab4 /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) a0009a8c: e1a00006 mov r0, r6 a0009a90: e3a01003 mov r1, #3 a0009a94: ebfffe4e bl a00093d4 a0009a98: e3500000 cmp r0, #0 a0009a9c: 1affff8d bne a00098d8 rtems_set_errno_and_return_minus_one( EACCES ); a0009aa0: eb00101d bl a000db1c <__errno> a0009aa4: e3a0300d mov r3, #13 a0009aa8: e5803000 str r3, [r0] a0009aac: e3e05000 mvn r5, #0 a0009ab0: eaffff88 b a00098d8 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); a0009ab4: eb001018 bl a000db1c <__errno> a0009ab8: e3a03014 mov r3, #20 a0009abc: e5803000 str r3, [r0] a0009ac0: e3e05000 mvn r5, #0 a0009ac4: eaffff83 b a00098d8 * 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; a0009ac8: e28cc01c add ip, ip, #28 a0009acc: eaffffd3 b a0009a20 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); a0009ad0: e1a00006 mov r0, r6 a0009ad4: e3a01000 mov r1, #0 a0009ad8: ebffff2e bl a0009798 if ( result == -1 ) a0009adc: e3700001 cmn r0, #1 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); a0009ae0: e1a05000 mov r5, r0 if ( result == -1 ) a0009ae4: 0affff7b beq a00098d8 a0009ae8: e5965000 ldr r5, [r6] a0009aec: eaffff8e b a000992c =============================================================================== a00093d4 : uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) a00093d4: e3d13007 bics r3, r1, #7 */ int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { a00093d8: e92d4070 push {r4, r5, r6, lr} a00093dc: e1a05001 mov r5, r1 uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) a00093e0: 1a000010 bne a0009428 rtems_set_errno_and_return_minus_one( EPERM ); jnode = node->node_access; a00093e4: e5904000 ldr r4, [r0] #if defined(RTEMS_POSIX_API) st_uid = geteuid(); a00093e8: eb000319 bl a000a054 a00093ec: e1a06000 mov r6, r0 st_gid = getegid(); a00093f0: eb000312 bl a000a040 * Check if I am owner or a group member or someone else. */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) a00093f4: e1d433bc ldrh r3, [r4, #60] ; 0x3c a00093f8: e1530006 cmp r3, r6 flags_to_test <<= 6; a00093fc: 01a05305 lsleq r5, r5, #6 * Check if I am owner or a group member or someone else. */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) a0009400: 0a000002 beq a0009410 flags_to_test <<= 6; else if ( st_gid == jnode->st_gid ) a0009404: e1d433be ldrh r3, [r4, #62] ; 0x3e a0009408: e1530000 cmp r3, r0 flags_to_test <<= 3; a000940c: 01a05185 lsleq r5, r5, #3 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) a0009410: e5940030 ldr r0, [r4, #48] ; 0x30 a0009414: e0050000 and r0, r5, r0 gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) rtems_set_errno_and_return_minus_one( EPERM ); a0009418: e1550000 cmp r5, r0 a000941c: 13a00000 movne r0, #0 a0009420: 03a00001 moveq r0, #1 */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) return 1; return 0; } a0009424: e8bd8070 pop {r4, r5, r6, pc} gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) rtems_set_errno_and_return_minus_one( EPERM ); a0009428: eb0011bb bl a000db1c <__errno> <== NOT EXECUTED a000942c: e3a03001 mov r3, #1 <== NOT EXECUTED a0009430: e5803000 str r3, [r0] <== NOT EXECUTED a0009434: e3e00000 mvn r0, #0 <== NOT EXECUTED a0009438: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== a0009af4 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { a0009af4: 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; a0009af8: e1a0c000 mov ip, r0 a0009afc: e5bc401c ldr r4, [ip, #28]! ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { a0009b00: e24dd014 sub sp, sp, #20 * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; loc = temp_mt_entry->mt_fs_root; a0009b04: 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 ) { a0009b08: 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; a0009b0c: e8bc000f ldm ip!, {r0, r1, r2, r3} a0009b10: e8a6000f stmia r6!, {r0, r1, r2, r3} a0009b14: e59c2000 ldr r2, [ip] /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; a0009b18: e3a01000 mov r1, #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; a0009b1c: e1a0500d mov r5, sp /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; a0009b20: e58e101c str r1, [lr, #28] * 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; a0009b24: e5862000 str r2, [r6] temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); a0009b28: e1a0000d mov r0, sp */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; a0009b2c: e5946008 ldr r6, [r4, #8] loc.node_access = (void *)jnode; a0009b30: e58d4000 str r4, [sp] IMFS_Set_handlers( &loc ); a0009b34: ebfffe01 bl a0009340 if ( jnode->type != IMFS_DIRECTORY ) { a0009b38: e594304c ldr r3, [r4, #76] ; 0x4c RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); a0009b3c: e2842054 add r2, r4, #84 ; 0x54 a0009b40: e3530001 cmp r3, #1 a0009b44: 1a000010 bne a0009b8c result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { a0009b48: e5943050 ldr r3, [r4, #80] ; 0x50 a0009b4c: e1530002 cmp r3, r2 a0009b50: 0a000014 beq a0009ba8 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } if ( jnode != NULL ) { a0009b54: e3540000 cmp r4, #0 a0009b58: 0a000008 beq a0009b80 if ( jnode->type == IMFS_DIRECTORY ) { a0009b5c: e594304c ldr r3, [r4, #76] ; 0x4c a0009b60: e3530001 cmp r3, #1 a0009b64: 1affffef bne a0009b28 } } } while (jnode != NULL); return 0; } a0009b68: e5943050 ldr r3, [r4, #80] ; 0x50 a0009b6c: e2842054 add r2, r4, #84 ; 0x54 return -1; jnode = next; } if ( jnode != NULL ) { if ( jnode->type == IMFS_DIRECTORY ) { if ( jnode_has_children( jnode ) ) a0009b70: e1530002 cmp r3, r2 a0009b74: 0affffeb beq a0009b28 jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); a0009b78: e2534000 subs r4, r3, #0 a0009b7c: 1affffe9 bne a0009b28 return 0; a0009b80: e1a00004 mov r0, r4 } a0009b84: e28dd014 add sp, sp, #20 a0009b88: 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 ); a0009b8c: e1a0100d mov r1, sp a0009b90: e3a00000 mov r0, #0 a0009b94: ebffdf6d bl a0001950 if (result != 0) a0009b98: e3500000 cmp r0, #0 a0009b9c: 1a000006 bne a0009bbc jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; a0009ba0: e1a04006 mov r4, r6 a0009ba4: eaffffea b a0009b54 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); a0009ba8: e3a00000 mov r0, #0 a0009bac: e1a0100d mov r1, sp a0009bb0: ebffdf66 bl a0001950 if (result != 0) a0009bb4: e3500000 cmp r0, #0 a0009bb8: 0afffff8 beq a0009ba0 return -1; a0009bbc: e3e00000 mvn r0, #0 <== NOT EXECUTED a0009bc0: eaffffef b a0009b84 <== NOT EXECUTED =============================================================================== a000c00c : my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { a000c00c: e59f3200 ldr r3, [pc, #512] ; a000c214 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { a000c010: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { a000c014: e5935000 ldr r5, [r3] #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { a000c018: e24dd004 sub sp, sp, #4 a000c01c: e1a04000 mov r4, r0 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { a000c020: e1a05125 lsr r5, r5, #2 a000c024: e2453001 sub r3, r5, #1 a000c028: e1510003 cmp r1, r3 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { a000c02c: e1a06002 mov r6, r2 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { a000c030: 8a000007 bhi a000c054 p = info->indirect; if ( malloc_it ) { a000c034: e3520000 cmp r2, #0 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { p = info->indirect; a000c038: e5900058 ldr r0, [r0, #88] ; 0x58 if ( malloc_it ) { a000c03c: 0a00001c beq a000c0b4 if ( !p ) { a000c040: e3500000 cmp r0, #0 a000c044: 0a000041 beq a000c150 } if ( !p ) return 0; return &info->indirect[ my_block ]; a000c048: e0800101 add r0, r0, r1, lsl #2 /* * This means the requested block number is out of range. */ return 0; } a000c04c: e28dd004 add sp, sp, #4 a000c050: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { a000c054: e0275595 mla r7, r5, r5, r5 a000c058: e2473001 sub r3, r7, #1 a000c05c: e1510003 cmp r1, r3 a000c060: 8a000016 bhi a000c0c0 my_block -= FIRST_DOUBLY_INDIRECT; a000c064: e0657001 rsb r7, r5, r1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; a000c068: e1a00007 mov r0, r7 a000c06c: e1a01005 mov r1, r5 a000c070: eb00148e bl a00112b0 <__umodsi3> doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; a000c074: e1a01005 mov r1, r5 */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; a000c078: e1a08000 mov r8, r0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; a000c07c: e1a00007 mov r0, r7 a000c080: eb001444 bl a0011198 <__aeabi_uidiv> p = info->doubly_indirect; if ( malloc_it ) { a000c084: e3560000 cmp r6, #0 if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; a000c088: e1a05000 mov r5, r0 p = info->doubly_indirect; a000c08c: e594305c ldr r3, [r4, #92] ; 0x5c if ( malloc_it ) { a000c090: 0a00003f beq a000c194 if ( !p ) { a000c094: e3530000 cmp r3, #0 a000c098: 0a000045 beq a000c1b4 if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; a000c09c: e7930105 ldr r0, [r3, r5, lsl #2] a000c0a0: e0835105 add r5, r3, r5, lsl #2 if ( !p1 ) { a000c0a4: e3500000 cmp r0, #0 a000c0a8: 0a00002f beq a000c16c p = (block_p *)p[ doubly ]; if ( !p ) return 0; return (block_p *)&p[ singly ]; a000c0ac: e0800108 add r0, r0, r8, lsl #2 a000c0b0: eaffffe5 b a000c04c info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) a000c0b4: e3500000 cmp r0, #0 a000c0b8: 1affffe2 bne a000c048 a000c0bc: eaffffe2 b a000c04c <== NOT EXECUTED } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { a000c0c0: e0235597 mla r3, r7, r5, r5 a000c0c4: e2433001 sub r3, r3, #1 a000c0c8: e1510003 cmp r1, r3 } /* * This means the requested block number is out of range. */ return 0; a000c0cc: 83a00000 movhi r0, #0 } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { a000c0d0: 8affffdd bhi a000c04c my_block -= FIRST_TRIPLY_INDIRECT; a000c0d4: e0677001 rsb r7, r7, r1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; a000c0d8: e1a00007 mov r0, r7 a000c0dc: e1a01005 mov r1, r5 a000c0e0: eb001472 bl a00112b0 <__umodsi3> doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; a000c0e4: e1a01005 mov r1, r5 * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; a000c0e8: e1a0a000 mov sl, r0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; a000c0ec: e1a00007 mov r0, r7 a000c0f0: eb001428 bl a0011198 <__aeabi_uidiv> triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; a000c0f4: e1a01005 mov r1, r5 */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; a000c0f8: e1a08000 mov r8, r0 triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; a000c0fc: eb001425 bl a0011198 <__aeabi_uidiv> doubly %= IMFS_MEMFILE_BLOCK_SLOTS; a000c100: e1a01005 mov r1, r5 if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; a000c104: e1a07000 mov r7, r0 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; a000c108: e1a00008 mov r0, r8 a000c10c: eb001467 bl a00112b0 <__umodsi3> p = info->triply_indirect; if ( malloc_it ) { a000c110: 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; a000c114: e1a05000 mov r5, r0 p = info->triply_indirect; a000c118: e5940060 ldr r0, [r4, #96] ; 0x60 if ( malloc_it ) { a000c11c: 0a000029 beq a000c1c8 if ( !p ) { a000c120: e3500000 cmp r0, #0 a000c124: 0a000035 beq a000c200 if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; a000c128: e7903107 ldr r3, [r0, r7, lsl #2] a000c12c: e0807107 add r7, r0, r7, lsl #2 if ( !p1 ) { a000c130: e3530000 cmp r3, #0 a000c134: 0a00002c beq a000c1ec if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; a000c138: e7930105 ldr r0, [r3, r5, lsl #2] a000c13c: e0835105 add r5, r3, r5, lsl #2 if ( !p2 ) { a000c140: e3500000 cmp r0, #0 a000c144: 0a00000d beq a000c180 p2 = (block_p *)p1[ doubly ]; if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; a000c148: e080010a add r0, r0, sl, lsl #2 a000c14c: eaffffbe b a000c04c p = info->indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); a000c150: e58d1000 str r1, [sp] a000c154: ebffff9f bl a000bfd8 if ( !p ) a000c158: e3500000 cmp r0, #0 a000c15c: e59d1000 ldr r1, [sp] return 0; info->indirect = p; a000c160: 15840058 strne r0, [r4, #88] ; 0x58 if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); if ( !p ) a000c164: 1affffb7 bne a000c048 a000c168: eaffffb7 b a000c04c <== NOT EXECUTED info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); a000c16c: ebffff99 bl a000bfd8 if ( !p1 ) a000c170: e3500000 cmp r0, #0 return 0; p[ doubly ] = (block_p) p1; a000c174: 15850000 strne r0, [r5] p = (block_p *)p[ doubly ]; if ( !p ) return 0; return (block_p *)&p[ singly ]; a000c178: 10800108 addne r0, r0, r8, lsl #2 a000c17c: eaffffb2 b a000c04c p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); a000c180: ebffff94 bl a000bfd8 if ( !p2 ) a000c184: e3500000 cmp r0, #0 return 0; p1[ doubly ] = (block_p) p2; a000c188: 15850000 strne r0, [r5] p2 = (block_p *)p1[ doubly ]; if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; a000c18c: 1080010a addne r0, r0, sl, lsl #2 a000c190: eaffffad b a000c04c } return (block_p *)&p1[ singly ]; } if ( !p ) a000c194: e3530000 cmp r3, #0 a000c198: 1a000001 bne a000c1a4 p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); if ( !p1 ) return 0; a000c19c: e1a00003 mov r0, r3 <== NOT EXECUTED a000c1a0: eaffffa9 b a000c04c <== NOT EXECUTED } if ( !p ) return 0; p = (block_p *)p[ doubly ]; a000c1a4: e7930100 ldr r0, [r3, r0, lsl #2] if ( !p ) a000c1a8: e3500000 cmp r0, #0 return 0; return (block_p *)&p[ singly ]; a000c1ac: 10800108 addne r0, r0, r8, lsl #2 a000c1b0: eaffffa5 b a000c04c p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); a000c1b4: ebffff87 bl a000bfd8 if ( !p ) a000c1b8: e2503000 subs r3, r0, #0 a000c1bc: 0afffff6 beq a000c19c return 0; info->doubly_indirect = p; a000c1c0: e584305c str r3, [r4, #92] ; 0x5c a000c1c4: eaffffb4 b a000c09c p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) a000c1c8: e3500000 cmp r0, #0 a000c1cc: 0affff9e beq a000c04c return 0; p1 = (block_p *) p[ triply ]; a000c1d0: e7900107 ldr r0, [r0, r7, lsl #2] if ( !p1 ) a000c1d4: e3500000 cmp r0, #0 a000c1d8: 0affff9b beq a000c04c return 0; p2 = (block_p *)p1[ doubly ]; a000c1dc: e7900105 ldr r0, [r0, r5, lsl #2] if ( !p2 ) a000c1e0: e3500000 cmp r0, #0 return 0; return (block_p *)&p2[ singly ]; a000c1e4: 1080010a addne r0, r0, sl, lsl #2 a000c1e8: eaffff97 b a000c04c info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); a000c1ec: ebffff79 bl a000bfd8 if ( !p1 ) a000c1f0: e2503000 subs r3, r0, #0 a000c1f4: 0affffe8 beq a000c19c return 0; p[ triply ] = (block_p) p1; a000c1f8: e5873000 str r3, [r7] a000c1fc: eaffffcd b a000c138 p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); a000c200: ebffff74 bl a000bfd8 if ( !p ) a000c204: e3500000 cmp r0, #0 a000c208: 0affff8f beq a000c04c return 0; info->triply_indirect = p; a000c20c: e5840060 str r0, [r4, #96] ; 0x60 a000c210: eaffffc4 b a000c128 =============================================================================== a000c218 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { a000c218: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} a000c21c: e1a09000 mov r9, r0 * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; if (the_jnode->type == IMFS_LINEAR_FILE) { a000c220: e590004c ldr r0, [r0, #76] ; 0x4c IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { a000c224: e24dd014 sub sp, sp, #20 a000c228: e1a07001 mov r7, r1 * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; if (the_jnode->type == IMFS_LINEAR_FILE) { a000c22c: e3500006 cmp r0, #6 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { a000c230: e1a08002 mov r8, r2 a000c234: e1a0b003 mov fp, r3 a000c238: e59d5038 ldr r5, [sp, #56] ; 0x38 * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; if (the_jnode->type == IMFS_LINEAR_FILE) { a000c23c: 0a00005c beq a000c3b4 /* * 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 ) a000c240: e5992054 ldr r2, [r9, #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; a000c244: e1a03001 mov r3, r1 if ( last_byte > the_jnode->info.file.size ) a000c248: e3a01000 mov r1, #0 a000c24c: e1510002 cmp r1, r2 a000c250: e5992050 ldr r2, [r9, #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; a000c254: e0851007 add r1, r5, r7 if ( last_byte > the_jnode->info.file.size ) a000c258: da00003d ble a000c354 my_length = the_jnode->info.file.size - start; a000c25c: e0635002 rsb r5, r3, r2 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; a000c260: e59f61b8 ldr r6, [pc, #440] ; a000c420 a000c264: e1a00007 mov r0, r7 a000c268: e1a01008 mov r1, r8 a000c26c: e5964000 ldr r4, [r6] a000c270: e1a02004 mov r2, r4 a000c274: e1a03fc2 asr r3, r2, #31 a000c278: e98d000c stmib sp, {r2, r3} a000c27c: eb00156c bl a0011834 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; a000c280: e99d000c ldmib sp, {r2, r3} */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; a000c284: e1a0a000 mov sl, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; a000c288: e1a01008 mov r1, r8 a000c28c: e1a00007 mov r0, r7 a000c290: eb00143a bl a0011380 <__divdi3> if ( start_offset ) { a000c294: 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; a000c298: e1a07000 mov r7, r0 unsigned int last_byte; unsigned int copied; unsigned int start_offset; unsigned char *dest; dest = destination; a000c29c: 01a0800b moveq r8, fp /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { a000c2a0: 0a000014 beq a000c2f8 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 ); a000c2a4: e1a00009 mov r0, r9 a000c2a8: e1a01007 mov r1, r7 a000c2ac: e3a02000 mov r2, #0 a000c2b0: ebffff55 bl a000c00c if ( !block_ptr ) a000c2b4: e3500000 cmp r0, #0 a000c2b8: 0a000023 beq a000c34c return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); a000c2bc: e5901000 ldr r1, [r0] * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; a000c2c0: e06a3004 rsb r3, sl, r4 a000c2c4: e1550003 cmp r5, r3 a000c2c8: 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 ); a000c2cc: e081100a add r1, r1, sl a000c2d0: e1a02003 mov r2, r3 a000c2d4: e1a0000b mov r0, fp a000c2d8: e58d3000 str r3, [sp] a000c2dc: eb00083c bl a000e3d4 dest += to_copy; a000c2e0: e59d3000 ldr r3, [sp] block++; my_length -= to_copy; a000c2e4: e5964000 ldr r4, [r6] block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); dest += to_copy; block++; a000c2e8: e2877001 add r7, r7, #1 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; a000c2ec: e08b8003 add r8, fp, r3 block++; my_length -= to_copy; a000c2f0: e0635005 rsb r5, r3, r5 copied += to_copy; a000c2f4: 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 ) { a000c2f8: e1550004 cmp r5, r4 a000c2fc: 2a000008 bcs a000c324 a000c300: ea000017 b a000c364 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); a000c304: e5931000 ldr r1, [r3] a000c308: eb000831 bl a000e3d4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { a000c30c: 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; a000c310: e0888004 add r8, r8, r4 block++; a000c314: e2877001 add r7, r7, #1 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { a000c318: e1530005 cmp r3, r5 return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; block++; my_length -= to_copy; copied += to_copy; a000c31c: 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 ) { a000c320: 8a00000f bhi a000c364 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); a000c324: e3a02000 mov r2, #0 a000c328: e1a01007 mov r1, r7 a000c32c: e1a00009 mov r0, r9 a000c330: ebffff35 bl a000c00c if ( !block_ptr ) a000c334: e2503000 subs r3, r0, #0 return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); a000c338: e1a02004 mov r2, r4 dest += to_copy; block++; my_length -= to_copy; a000c33c: 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 ); a000c340: e1a00008 mov r0, r8 * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) a000c344: 1affffee bne a000c304 IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; a000c348: e1a0000a mov r0, sl <== NOT EXECUTED } IMFS_update_atime( the_jnode ); return copied; } a000c34c: e28dd014 add sp, sp, #20 a000c350: 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 ) a000c354: 1affffc1 bne a000c260 a000c358: e1510002 cmp r1, r2 a000c35c: 9affffbf bls a000c260 a000c360: eaffffbd b a000c25c /* * Phase 3: possibly the first part of one block */ IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { a000c364: e3550000 cmp r5, #0 a000c368: 0a00000a beq a000c398 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); a000c36c: e1a00009 mov r0, r9 a000c370: e1a01007 mov r1, r7 a000c374: e3a02000 mov r2, #0 a000c378: ebffff23 bl a000c00c if ( !block_ptr ) a000c37c: e2503000 subs r3, r0, #0 a000c380: 0afffff0 beq a000c348 return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); a000c384: e1a00008 mov r0, r8 a000c388: e5931000 ldr r1, [r3] a000c38c: e1a02005 mov r2, r5 a000c390: eb00080f bl a000e3d4 copied += my_length; a000c394: e08aa005 add sl, sl, r5 } IMFS_update_atime( the_jnode ); a000c398: e28d000c add r0, sp, #12 a000c39c: e3a01000 mov r1, #0 a000c3a0: ebffd6dc bl a0001f18 a000c3a4: e59d300c ldr r3, [sp, #12] return copied; a000c3a8: e1a0000a mov r0, sl return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; } IMFS_update_atime( the_jnode ); a000c3ac: e5893040 str r3, [r9, #64] ; 0x40 return copied; a000c3b0: eaffffe5 b a000c34c 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)) a000c3b4: e2894050 add r4, r9, #80 ; 0x50 a000c3b8: e8940018 ldm r4, {r3, r4} a000c3bc: e1a00003 mov r0, r3 a000c3c0: e1a01004 mov r1, r4 a000c3c4: e3a02000 mov r2, #0 a000c3c8: e0500007 subs r0, r0, r7 a000c3cc: e0c11008 sbc r1, r1, r8 a000c3d0: e1520001 cmp r2, r1 my_length = length; if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; a000c3d4: e5992058 ldr r2, [r9, #88] ; 0x58 if (my_length > (the_jnode->info.linearfile.size - start)) a000c3d8: da00000b ble a000c40c my_length = the_jnode->info.linearfile.size - start; a000c3dc: e067a003 rsb sl, r7, r3 memcpy(dest, &file_ptr[start], my_length); a000c3e0: e0821007 add r1, r2, r7 a000c3e4: e1a0000b mov r0, fp a000c3e8: e1a0200a mov r2, sl a000c3ec: eb0007f8 bl a000e3d4 return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; } IMFS_update_atime( the_jnode ); a000c3f0: e28d000c add r0, sp, #12 a000c3f4: e3a01000 mov r1, #0 a000c3f8: ebffd6c6 bl a0001f18 a000c3fc: e59d300c ldr r3, [sp, #12] return copied; a000c400: e1a0000a mov r0, sl return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; } IMFS_update_atime( the_jnode ); a000c404: e5893040 str r3, [r9, #64] ; 0x40 a000c408: eaffffcf b a000c34c 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)) a000c40c: 1a000001 bne a000c418 a000c410: e1550000 cmp r5, r0 a000c414: 8afffff0 bhi a000c3dc /* * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; a000c418: e1a0a005 mov sl, r5 <== NOT EXECUTED a000c41c: eaffffef b a000c3e0 <== NOT EXECUTED =============================================================================== a00017b0 : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; a00017b0: e5903008 ldr r3, [r0, #8] #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { a00017b4: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) a00017b8: e593204c ldr r2, [r3, #76] ; 0x4c a00017bc: e3520001 cmp r2, #1 a00017c0: 1a000002 bne a00017d0 /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry; a00017c4: e583005c str r0, [r3, #92] ; 0x5c return 0; a00017c8: e3a00000 mov r0, #0 } a00017cc: 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 ); a00017d0: eb0030d1 bl a000db1c <__errno> <== NOT EXECUTED a00017d4: e3a03014 mov r3, #20 <== NOT EXECUTED a00017d8: e5803000 str r3, [r0] <== NOT EXECUTED a00017dc: e3e00000 mvn r0, #0 <== NOT EXECUTED a00017e0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== a00041ac : * This routine prints the contents of the specified jnode. */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { a00041ac: e92d4030 push {r4, r5, lr} IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); a00041b0: e59f50f8 ldr r5, [pc, #248] ; a00042b0 * This routine prints the contents of the specified jnode. */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { a00041b4: e1a04000 mov r4, r0 IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); a00041b8: e280000c add r0, r0, #12 a00041bc: e5953000 ldr r3, [r5] a00041c0: e5931008 ldr r1, [r3, #8] a00041c4: eb0038b2 bl a0012494 switch( the_jnode->type ) { a00041c8: e594204c ldr r2, [r4, #76] ; 0x4c a00041cc: e2423001 sub r3, r2, #1 a00041d0: e3530006 cmp r3, #6 a00041d4: 979ff103 ldrls pc, [pc, r3, lsl #2] a00041d8: ea000023 b a000426c a00041dc: a0004280 .word 0xa0004280 a00041e0: a0004294 .word 0xa0004294 a00041e4: a00041f8 .word 0xa00041f8 a00041e8: a00041f8 .word 0xa00041f8 a00041ec: a0004230 .word 0xa0004230 a00041f0: a0004250 .word 0xa0004250 a00041f4: a0004214 .word 0xa0004214 case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); a00041f8: e5953000 ldr r3, [r5] a00041fc: e59f00b0 ldr r0, [pc, #176] ; a00042b4 a0004200: e3a01001 mov r1, #1 a0004204: e5933008 ldr r3, [r3, #8] a0004208: e3a02013 mov r2, #19 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); } a000420c: e8bd4030 pop {r4, r5, lr} case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); a0004210: ea003bd0 b a0013158 return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); a0004214: e5953000 ldr r3, [r5] a0004218: e59f0098 ldr r0, [pc, #152] ; a00042b8 a000421c: e3a01001 mov r1, #1 a0004220: e5933008 ldr r3, [r3, #8] a0004224: e3a02012 mov r2, #18 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); } a0004228: e8bd4030 pop {r4, r5, lr} case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); a000422c: ea003bc9 b a0013158 the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", a0004230: e5953000 ldr r3, [r5] a0004234: e59f1080 ldr r1, [pc, #128] ; a00042bc a0004238: e5942050 ldr r2, [r4, #80] ; 0x50 a000423c: e5930008 ldr r0, [r3, #8] a0004240: eb00383e bl a0012340 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); a0004244: e59f0074 ldr r0, [pc, #116] ; a00042c0 } a0004248: e8bd4030 pop {r4, r5, lr} default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); a000424c: ea003fa2 b a00140dc 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)", a0004250: e5953000 ldr r3, [r5] a0004254: e59f1068 ldr r1, [pc, #104] ; a00042c4 a0004258: e5942050 ldr r2, [r4, #80] ; 0x50 a000425c: e5930008 ldr r0, [r3, #8] a0004260: e5943058 ldr r3, [r4, #88] ; 0x58 a0004264: eb003835 bl a0012340 (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; a0004268: eafffff5 b a0004244 case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); return; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); a000426c: e5953000 ldr r3, [r5] <== NOT EXECUTED a0004270: e59f1050 ldr r1, [pc, #80] ; a00042c8 <== NOT EXECUTED a0004274: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED return; } puts(""); } a0004278: 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 ); a000427c: ea00382f b a0012340 <== NOT EXECUTED IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); a0004280: e5953000 ldr r3, [r5] a0004284: e3a0002f mov r0, #47 ; 0x2f a0004288: e5931008 ldr r1, [r3, #8] a000428c: eb00384b bl a00123c0 break; a0004290: eaffffeb b a0004244 case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", a0004294: e5953000 ldr r3, [r5] a0004298: e59f102c ldr r1, [pc, #44] ; a00042cc a000429c: e5942050 ldr r2, [r4, #80] ; 0x50 a00042a0: e5930008 ldr r0, [r3, #8] a00042a4: e5943054 ldr r3, [r4, #84] ; 0x54 a00042a8: eb003824 bl a0012340 the_jnode->info.device.major, the_jnode->info.device.minor ); break; a00042ac: eaffffe4 b a0004244 =============================================================================== a0009e00 : { IMFS_fs_info_t *fs_info; IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; a0009e00: e5903000 ldr r3, [r0] int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { a0009e04: e92d41f0 push {r4, r5, r6, r7, r8, lr} IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { a0009e08: e593204c ldr r2, [r3, #76] ; 0x4c a0009e0c: e2422002 sub r2, r2, #2 a0009e10: e3520005 cmp r2, #5 a0009e14: 979ff102 ldrls pc, [pc, r2, lsl #2] a0009e18: ea000027 b a0009ebc <== NOT EXECUTED a0009e1c: a0009ea8 .word 0xa0009ea8 <== NOT EXECUTED a0009e20: a0009ebc .word 0xa0009ebc <== NOT EXECUTED a0009e24: a0009e34 .word 0xa0009e34 <== NOT EXECUTED a0009e28: a0009ed0 .word 0xa0009ed0 <== NOT EXECUTED a0009e2c: a0009ed0 .word 0xa0009ed0 <== NOT EXECUTED a0009e30: a0009e34 .word 0xa0009e34 <== NOT EXECUTED case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; a0009e34: e3a04000 mov r4, #0 a0009e38: e3a05000 mov r5, #0 a0009e3c: e5814020 str r4, [r1, #32] a0009e40: 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; a0009e44: 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; a0009e48: e5936030 ldr r6, [r3, #48] ; 0x30 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; buf->st_ctime = the_jnode->stat_ctime; a0009e4c: e5930048 ldr r0, [r3, #72] ; 0x48 * 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 ); a0009e50: e5922034 ldr r2, [r2, #52] ; 0x34 buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; a0009e54: e5935038 ldr r5, [r3, #56] ; 0x38 buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; a0009e58: e5934040 ldr r4, [r3, #64] ; 0x40 * 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 ); a0009e5c: e5927000 ldr r7, [r2] rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; a0009e60: e3a02cff mov r2, #65280 ; 0xff00 a0009e64: e28220fe add r2, r2, #254 ; 0xfe 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; a0009e68: e593c044 ldr ip, [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; buf->st_nlink = the_jnode->st_nlink; a0009e6c: e1d383b4 ldrh r8, [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 = a0009e70: e5812000 str r2, [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; a0009e74: e1d323bc ldrh r2, [r3, #60] ; 0x3c buf->st_gid = the_jnode->st_gid; a0009e78: e1d333be ldrh r3, [r3, #62] ; 0x3e 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; a0009e7c: e1c181b0 strh r8, [r1, #16] 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; buf->st_ctime = the_jnode->stat_ctime; a0009e80: e5810038 str r0, [r1, #56] ; 0x38 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; a0009e84: e1c121b2 strh r2, [r1, #18] /* * 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 = a0009e88: e5817004 str r7, [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; a0009e8c: 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; a0009e90: e581600c str r6, [r1, #12] buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; a0009e94: e5815008 str r5, [r1, #8] buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; a0009e98: e5814028 str r4, [r1, #40] ; 0x28 buf->st_mtime = the_jnode->stat_mtime; a0009e9c: e581c030 str ip, [r1, #48] ; 0x30 buf->st_ctime = the_jnode->stat_ctime; return 0; a0009ea0: e3a00000 mov r0, #0 } a0009ea4: e8bd81f0 pop {r4, r5, r6, r7, r8, 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 ); a0009ea8: e593c054 ldr ip, [r3, #84] ; 0x54 a0009eac: e5932050 ldr r2, [r3, #80] ; 0x50 a0009eb0: e581c01c str ip, [r1, #28] a0009eb4: e5812018 str r2, [r1, #24] break; a0009eb8: eaffffe1 b a0009e44 case IMFS_FIFO: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); a0009ebc: eb000f16 bl a000db1c <__errno> a0009ec0: e3a03086 mov r3, #134 ; 0x86 a0009ec4: e5803000 str r3, [r0] a0009ec8: e3e00000 mvn r0, #0 a0009ecc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 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; a0009ed0: e2835050 add r5, r3, #80 ; 0x50 a0009ed4: e8950030 ldm r5, {r4, r5} a0009ed8: e5814020 str r4, [r1, #32] a0009edc: e5815024 str r5, [r1, #36] ; 0x24 break; a0009ee0: eaffffd7 b a0009e44 =============================================================================== a0001950 : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { a0001950: 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; a0001954: e5915000 ldr r5, [r1] int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { a0001958: e24dd01c sub sp, sp, #28 a000195c: e1a04001 mov r4, r1 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { a0001960: e595304c ldr r3, [r5, #76] ; 0x4c int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { a0001964: e1a06000 mov r6, r0 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { a0001968: e3530003 cmp r3, #3 a000196c: 0a000006 beq a000198c /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); a0001970: e5943008 ldr r3, [r4, #8] a0001974: e1a00006 mov r0, r6 a0001978: e1a01004 mov r1, r4 a000197c: e5933034 ldr r3, [r3, #52] ; 0x34 a0001980: e12fff33 blx r3 return result; } a0001984: e28dd01c add sp, sp, #28 a0001988: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} * free the node. */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) a000198c: e595e050 ldr lr, [r5, #80] ; 0x50 a0001990: e35e0000 cmp lr, #0 a0001994: 0a00001f beq a0001a18 rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; a0001998: e1a0c00d mov ip, sp a000199c: e1a07001 mov r7, r1 a00019a0: e8b7000f ldm r7!, {r0, r1, r2, r3} a00019a4: e8ac000f stmia ip!, {r0, r1, r2, r3} a00019a8: e5973000 ldr r3, [r7] the_link.node_access = node->info.hard_link.link_node; a00019ac: e28d801c add r8, sp, #28 IMFS_Set_handlers( &the_link ); a00019b0: 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; a00019b4: e58c3000 str r3, [ip] the_link.node_access = node->info.hard_link.link_node; a00019b8: e528e01c str lr, [r8, #-28]! IMFS_Set_handlers( &the_link ); a00019bc: eb001e5f bl a0009340 /* * 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) a00019c0: e5953050 ldr r3, [r5, #80] ; 0x50 a00019c4: e1d323b4 ldrh r2, [r3, #52] ; 0x34 a00019c8: e3520001 cmp r2, #1 a00019cc: 0a000008 beq a00019f4 if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; a00019d0: e2422001 sub r2, r2, #1 a00019d4: e1c323b4 strh r2, [r3, #52] ; 0x34 IMFS_update_ctime( node->info.hard_link.link_node ); a00019d8: e28d0014 add r0, sp, #20 a00019dc: e3a01000 mov r1, #0 a00019e0: eb00014c bl a0001f18 a00019e4: e5953050 ldr r3, [r5, #80] ; 0x50 a00019e8: e59d2014 ldr r2, [sp, #20] a00019ec: e5832048 str r2, [r3, #72] ; 0x48 a00019f0: eaffffde b a0001970 * 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 ); a00019f4: e59d3008 ldr r3, [sp, #8] a00019f8: e1a00006 mov r0, r6 a00019fc: e1a0100d mov r1, sp a0001a00: e5933034 ldr r3, [r3, #52] ; 0x34 a0001a04: e12fff33 blx r3 if ( result != 0 ) a0001a08: e3500000 cmp r0, #0 a0001a0c: 0affffd7 beq a0001970 return -1; a0001a10: e3e00000 mvn r0, #0 a0001a14: eaffffda b a0001984 */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); a0001a18: eb00303f bl a000db1c <__errno> <== NOT EXECUTED a0001a1c: e3a03016 mov r3, #22 <== NOT EXECUTED a0001a20: e5803000 str r3, [r0] <== NOT EXECUTED a0001a24: e3e00000 mvn r0, #0 <== NOT EXECUTED a0001a28: eaffffd5 b a0001984 <== NOT EXECUTED =============================================================================== a0001a2c : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; a0001a2c: e5903008 ldr r3, [r0, #8] #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { a0001a30: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) a0001a34: e593204c ldr r2, [r3, #76] ; 0x4c a0001a38: e3520001 cmp r2, #1 a0001a3c: 1a000005 bne a0001a58 /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) a0001a40: e593205c ldr r2, [r3, #92] ; 0x5c a0001a44: e3520000 cmp r2, #0 a0001a48: 0a000007 beq a0001a6c /* * 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; a0001a4c: e3a00000 mov r0, #0 a0001a50: e583005c str r0, [r3, #92] ; 0x5c return 0; } a0001a54: 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 ); a0001a58: eb00302f bl a000db1c <__errno> <== NOT EXECUTED a0001a5c: e3a03014 mov r3, #20 <== NOT EXECUTED a0001a60: e5803000 str r3, [r0] <== NOT EXECUTED a0001a64: e3e00000 mvn r0, #0 <== NOT EXECUTED a0001a68: 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 */ a0001a6c: eb00302a bl a000db1c <__errno> <== NOT EXECUTED a0001a70: e3a03016 mov r3, #22 <== NOT EXECUTED a0001a74: e5803000 str r3, [r0] <== NOT EXECUTED a0001a78: e3e00000 mvn r0, #0 <== NOT EXECUTED a0001a7c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== a0001dc4 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { a0001dc4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); a0001dc8: e59030bc ldr r3, [r0, #188] ; 0xbc size = Stack_check_usable_stack_size(stack); a0001dcc: e59060b8 ldr r6, [r0, #184] ; 0xb8 static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { a0001dd0: e24dd010 sub sp, sp, #16 { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); a0001dd4: e283c010 add ip, r3, #16 size = Stack_check_usable_stack_size(stack); a0001dd8: e2466010 sub r6, r6, #16 /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; a0001ddc: e28cb010 add fp, ip, #16 for (ebase = base + length; base < ebase; base++) a0001de0: e3c61003 bic r1, r6, #3 a0001de4: e08b1001 add r1, fp, r1 a0001de8: e15b0001 cmp fp, r1 static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { a0001dec: e1a05000 mov r5, r0 current = 0; } else #endif { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); a0001df0: e59090e8 ldr r9, [r0, #232] ; 0xe8 * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) a0001df4: 2a00000b bcs a0001e28 if (*base != U32_PATTERN) a0001df8: e59c0010 ldr r0, [ip, #16] a0001dfc: e59f20cc ldr r2, [pc, #204] ; a0001ed0 a0001e00: e1500002 cmp r0, r2 * Try to print out how much stack was actually used by the task. */ static void *print_context; static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( a0001e04: 02833024 addeq r3, r3, #36 ; 0x24 * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) if (*base != U32_PATTERN) a0001e08: 0a000003 beq a0001e1c a0001e0c: ea000026 b a0001eac <== NOT EXECUTED a0001e10: e4932004 ldr r2, [r3], #4 a0001e14: e1520000 cmp r2, r0 a0001e18: 1a000023 bne a0001eac * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) a0001e1c: e1510003 cmp r1, r3 if (*base != U32_PATTERN) a0001e20: e1a0b003 mov fp, r3 * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) a0001e24: 8afffff9 bhi a0001e10 high_water_mark = Stack_check_find_high_water_mark(low, size); if ( high_water_mark ) used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; a0001e28: e3a0b000 mov fp, #0 <== NOT EXECUTED #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if ( the_thread ) #endif { (*print_handler)( a0001e2c: e5958008 ldr r8, [r5, #8] a0001e30: e59f409c ldr r4, [pc, #156] ; a0001ed4 a0001e34: e3a01005 mov r1, #5 a0001e38: e28d2008 add r2, sp, #8 a0001e3c: e1a00008 mov r0, r8 a0001e40: e8940480 ldm r4, {r7, sl} a0001e44: eb001848 bl a0007f6c a0001e48: e1a02008 mov r2, r8 a0001e4c: e1a03000 mov r3, r0 a0001e50: e59f1080 ldr r1, [pc, #128] ; a0001ed8 a0001e54: e1a0000a mov r0, sl a0001e58: e12fff37 blx r7 (*print_handler)( print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, a0001e5c: e59530b8 ldr r3, [r5, #184] ; 0xb8 a0001e60: e59520bc ldr r2, [r5, #188] ; 0xbc else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( a0001e64: e5940004 ldr r0, [r4, #4] print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, a0001e68: e2433001 sub r3, r3, #1 else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( a0001e6c: e0823003 add r3, r2, r3 a0001e70: e59f1064 ldr r1, [pc, #100] ; a0001edc a0001e74: e58d9000 str r9, [sp] a0001e78: e58d6004 str r6, [sp, #4] a0001e7c: e594c000 ldr ip, [r4] a0001e80: e12fff3c blx ip stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { a0001e84: e5943008 ldr r3, [r4, #8] a0001e88: e3530000 cmp r3, #0 a0001e8c: 0a00000a beq a0001ebc (*print_handler)( print_context, "Unavailable\n" ); } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); a0001e90: e5943000 ldr r3, [r4] a0001e94: e5940004 ldr r0, [r4, #4] a0001e98: e59f1040 ldr r1, [pc, #64] ; a0001ee0 a0001e9c: e1a0200b mov r2, fp a0001ea0: e12fff33 blx r3 } } a0001ea4: e28dd010 add sp, sp, #16 a0001ea8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); high_water_mark = Stack_check_find_high_water_mark(low, size); if ( high_water_mark ) a0001eac: e35b0000 cmp fp, #0 used = Stack_check_Calculate_used( low, size, high_water_mark ); a0001eb0: 108cc006 addne ip, ip, r6 a0001eb4: 106bb00c rsbne fp, fp, ip a0001eb8: eaffffdb b a0001e2c current, size ); if (Stack_check_Initialized == 0) { (*print_handler)( print_context, "Unavailable\n" ); a0001ebc: e5943000 ldr r3, [r4] <== NOT EXECUTED a0001ec0: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED a0001ec4: e59f1018 ldr r1, [pc, #24] ; a0001ee4 <== NOT EXECUTED a0001ec8: e12fff33 blx r3 <== NOT EXECUTED a0001ecc: eafffff4 b a0001ea4 <== NOT EXECUTED =============================================================================== a0016a28 <_CORE_message_queue_Broadcast>: { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { a0016a28: 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 ) { a0016a2c: 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 ) { a0016a30: 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 ) { a0016a34: e1a07000 mov r7, r0 a0016a38: e1a05002 mov r5, r2 a0016a3c: e1a08001 mov r8, r1 a0016a40: 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 ) { a0016a44: 3a000013 bcc a0016a98 <_CORE_message_queue_Broadcast+0x70> * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { a0016a48: e5906048 ldr r6, [r0, #72] ; 0x48 a0016a4c: e3560000 cmp r6, #0 a0016a50: 0a000009 beq a0016a7c <_CORE_message_queue_Broadcast+0x54> *count = 0; a0016a54: e3a00000 mov r0, #0 a0016a58: e58a0000 str r0, [sl] return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; a0016a5c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} const void *source, void *destination, size_t size ) { memcpy(destination, source, size); a0016a60: e594002c ldr r0, [r4, #44] ; 0x2c a0016a64: e1a01008 mov r1, r8 a0016a68: e1a02005 mov r2, r5 a0016a6c: eb002487 bl a001fc90 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; a0016a70: e5943028 ldr r3, [r4, #40] ; 0x28 */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; a0016a74: e2866001 add r6, r6, #1 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; a0016a78: 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 = a0016a7c: e1a00007 mov r0, r7 a0016a80: eb000b13 bl a00196d4 <_Thread_queue_Dequeue> a0016a84: e2504000 subs r4, r0, #0 a0016a88: 1afffff4 bne a0016a60 <_CORE_message_queue_Broadcast+0x38> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; a0016a8c: e58a6000 str r6, [sl] return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; a0016a90: e1a00004 mov r0, r4 a0016a94: 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; a0016a98: e3a00001 mov r0, #1 <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } a0016a9c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED =============================================================================== a000b710 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { a000b710: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} a000b714: e1a08002 mov r8, r2 Heap_Statistics *const stats = &heap->stats; uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_ALLOC_BONUS; uintptr_t const page_size = heap->page_size; a000b718: e5902010 ldr r2, [r0, #16] Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { a000b71c: e24dd01c sub sp, sp, #28 a000b720: e1a05001 mov r5, r1 Heap_Block *block = NULL; uintptr_t alloc_begin = 0; uint32_t search_count = 0; bool search_again = false; if ( block_size_floor < alloc_size ) { a000b724: e2911004 adds r1, r1, #4 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { a000b728: e1a07000 mov r7, r0 Heap_Block *block = NULL; uintptr_t alloc_begin = 0; uint32_t search_count = 0; bool search_again = false; if ( block_size_floor < alloc_size ) { a000b72c: e58d1000 str r1, [sp] Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { a000b730: e1a0b003 mov fp, r3 Heap_Statistics *const stats = &heap->stats; uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_ALLOC_BONUS; uintptr_t const page_size = heap->page_size; a000b734: e58d200c str r2, [sp, #12] Heap_Block *block = NULL; uintptr_t alloc_begin = 0; uint32_t search_count = 0; bool search_again = false; if ( block_size_floor < alloc_size ) { a000b738: 2a000078 bcs a000b920 <_Heap_Allocate_aligned_with_boundary+0x210> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { a000b73c: e3530000 cmp r3, #0 a000b740: 1a000074 bne a000b918 <_Heap_Allocate_aligned_with_boundary+0x208> if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } a000b744: e5979008 ldr r9, [r7, #8] do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { a000b748: e1570009 cmp r7, r9 a000b74c: 0a000073 beq a000b920 <_Heap_Allocate_aligned_with_boundary+0x210> 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 a000b750: e59d300c ldr r3, [sp, #12] + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; a000b754: e2651004 rsb r1, r5, #4 do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { a000b758: e3a06001 mov r6, #1 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 a000b75c: e2833007 add r3, r3, #7 a000b760: e58d3010 str r3, [sp, #16] + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; a000b764: 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 ) { a000b768: e599a004 ldr sl, [r9, #4] a000b76c: e59d2000 ldr r2, [sp] a000b770: e152000a cmp r2, sl a000b774: 2a00004e bcs a000b8b4 <_Heap_Allocate_aligned_with_boundary+0x1a4> if ( alignment == 0 ) { a000b778: 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; a000b77c: 02894008 addeq r4, r9, #8 a000b780: 0a000051 beq a000b8cc <_Heap_Allocate_aligned_with_boundary+0x1bc> if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } a000b784: 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_ALLOC_BONUS; uintptr_t alloc_begin = alloc_end - alloc_size; a000b788: 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; a000b78c: 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; a000b790: 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; a000b794: 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_ALLOC_BONUS; uintptr_t alloc_begin = alloc_end - alloc_size; a000b798: e081400a add r4, r1, sl if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } a000b79c: 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; a000b7a0: e0633002 rsb r3, r3, r2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); a000b7a4: 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 a000b7a8: e083a00a add sl, r3, sl a000b7ac: 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; a000b7b0: e2893008 add r3, r9, #8 a000b7b4: e58d3008 str r3, [sp, #8] RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); a000b7b8: eb0016bc bl a00112b0 <__umodsi3> a000b7bc: 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 ) { a000b7c0: e15a0004 cmp sl, r4 a000b7c4: 2a000003 bcs a000b7d8 <_Heap_Allocate_aligned_with_boundary+0xc8> a000b7c8: e1a0000a mov r0, sl a000b7cc: e1a01008 mov r1, r8 a000b7d0: eb0016b6 bl a00112b0 <__umodsi3> a000b7d4: e060400a rsb r4, r0, sl } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { a000b7d8: e35b0000 cmp fp, #0 a000b7dc: 0a000026 beq a000b87c <_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; a000b7e0: e084a005 add sl, r4, r5 a000b7e4: e1a0000a mov r0, sl a000b7e8: e1a0100b mov r1, fp a000b7ec: eb0016af bl a00112b0 <__umodsi3> a000b7f0: 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 ) { a000b7f4: e15a0000 cmp sl, r0 a000b7f8: 93a0a000 movls sl, #0 a000b7fc: 83a0a001 movhi sl, #1 a000b800: e1540000 cmp r4, r0 a000b804: 23a0a000 movcs sl, #0 a000b808: e35a0000 cmp sl, #0 a000b80c: 0a00001a beq a000b87c <_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; a000b810: e59d1008 ldr r1, [sp, #8] a000b814: e0813005 add r3, 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 ) { a000b818: e1530000 cmp r3, r0 a000b81c: 958d9018 strls r9, [sp, #24] a000b820: 91a09003 movls r9, r3 a000b824: 9a000002 bls a000b834 <_Heap_Allocate_aligned_with_boundary+0x124> a000b828: ea000021 b a000b8b4 <_Heap_Allocate_aligned_with_boundary+0x1a4> a000b82c: e1590000 cmp r9, r0 a000b830: 8a00003c bhi a000b928 <_Heap_Allocate_aligned_with_boundary+0x218> return 0; } alloc_begin = boundary_line - alloc_size; a000b834: e0654000 rsb r4, r5, r0 a000b838: e1a01008 mov r1, r8 a000b83c: e1a00004 mov r0, r4 a000b840: eb00169a bl a00112b0 <__umodsi3> a000b844: e0604004 rsb r4, r0, r4 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; a000b848: e084a005 add sl, r4, r5 a000b84c: e1a0000a mov r0, sl a000b850: e1a0100b mov r1, fp a000b854: eb001695 bl a00112b0 <__umodsi3> a000b858: 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 ) { a000b85c: e15a0000 cmp sl, r0 a000b860: 93a0a000 movls sl, #0 a000b864: 83a0a001 movhi sl, #1 a000b868: e1540000 cmp r4, r0 a000b86c: 23a0a000 movcs sl, #0 a000b870: e35a0000 cmp sl, #0 a000b874: 1affffec bne a000b82c <_Heap_Allocate_aligned_with_boundary+0x11c> a000b878: e59d9018 ldr r9, [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 ) { a000b87c: e59d2008 ldr r2, [sp, #8] a000b880: e1520004 cmp r2, r4 a000b884: 8a00000a bhi a000b8b4 <_Heap_Allocate_aligned_with_boundary+0x1a4> a000b888: e59d100c ldr r1, [sp, #12] a000b88c: e1a00004 mov r0, r4 a000b890: eb001686 bl a00112b0 <__umodsi3> a000b894: e3e0a007 mvn sl, #7 a000b898: e069a00a rsb sl, r9, sl 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 ) { a000b89c: e59d1004 ldr r1, [sp, #4] uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); a000b8a0: e08aa004 add sl, sl, r4 a000b8a4: e060300a rsb r3, r0, sl a000b8a8: e15a0000 cmp sl, r0 a000b8ac: 11510003 cmpne r1, r3 a000b8b0: 9a000005 bls a000b8cc <_Heap_Allocate_aligned_with_boundary+0x1bc> if ( alloc_begin != 0 ) { break; } block = block->next; a000b8b4: e5999008 ldr r9, [r9, #8] a000b8b8: e2863001 add r3, r6, #1 do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { a000b8bc: e1570009 cmp r7, r9 a000b8c0: 0a00001d beq a000b93c <_Heap_Allocate_aligned_with_boundary+0x22c> a000b8c4: e1a06003 mov r6, r3 a000b8c8: eaffffa6 b a000b768 <_Heap_Allocate_aligned_with_boundary+0x58> } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { a000b8cc: e3540000 cmp r4, #0 a000b8d0: 0afffff7 beq a000b8b4 <_Heap_Allocate_aligned_with_boundary+0x1a4> search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin ); } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; a000b8d4: e5972048 ldr r2, [r7, #72] ; 0x48 stats->searches += search_count; a000b8d8: e597304c ldr r3, [r7, #76] ; 0x4c block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); a000b8dc: e1a00007 mov r0, r7 search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin ); } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; a000b8e0: e2822001 add r2, r2, #1 stats->searches += search_count; a000b8e4: e0833006 add r3, r3, r6 search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin ); } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; a000b8e8: e5872048 str r2, [r7, #72] ; 0x48 stats->searches += search_count; a000b8ec: e587304c str r3, [r7, #76] ; 0x4c block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); a000b8f0: e1a01009 mov r1, r9 a000b8f4: e1a02004 mov r2, r4 a000b8f8: e1a03005 mov r3, r5 a000b8fc: ebffeb80 bl a0006704 <_Heap_Block_allocate> a000b900: e1a00004 mov r0, r4 boundary ); } /* Statistics */ if ( stats->max_search < search_count ) { a000b904: e5973044 ldr r3, [r7, #68] ; 0x44 a000b908: e1530006 cmp r3, r6 stats->max_search = search_count; a000b90c: 35876044 strcc r6, [r7, #68] ; 0x44 } return (void *) alloc_begin; } a000b910: e28dd01c add sp, sp, #28 a000b914: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { a000b918: e1550003 cmp r5, r3 a000b91c: 9a000008 bls a000b944 <_Heap_Allocate_aligned_with_boundary+0x234> do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { a000b920: e3a00000 mov r0, #0 a000b924: eafffff9 b a000b910 <_Heap_Allocate_aligned_with_boundary+0x200> a000b928: e59d9018 ldr r9, [sp, #24] <== NOT EXECUTED if ( alloc_begin != 0 ) { break; } block = block->next; a000b92c: e2863001 add r3, r6, #1 <== NOT EXECUTED a000b930: e5999008 ldr r9, [r9, #8] <== NOT EXECUTED do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { a000b934: e1570009 cmp r7, r9 <== NOT EXECUTED a000b938: 1affffe1 bne a000b8c4 <_Heap_Allocate_aligned_with_boundary+0x1b4><== NOT EXECUTED a000b93c: e3a00000 mov r0, #0 a000b940: eaffffef b a000b904 <_Heap_Allocate_aligned_with_boundary+0x1f4> if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { alignment = page_size; a000b944: e3580000 cmp r8, #0 a000b948: 01a08002 moveq r8, r2 a000b94c: eaffff7c b a000b744 <_Heap_Allocate_aligned_with_boundary+0x34> =============================================================================== a000b950 <_Heap_Free>: return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { a000b950: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} a000b954: e1a04000 mov r4, r0 a000b958: e1a05001 mov r5, r1 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); a000b95c: e1a00001 mov r0, r1 a000b960: e5941010 ldr r1, [r4, #16] a000b964: eb001651 bl a00112b0 <__umodsi3> 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 a000b968: e5943020 ldr r3, [r4, #32] RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); a000b96c: e2455008 sub r5, r5, #8 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); a000b970: 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; a000b974: e1550003 cmp r5, r3 a000b978: 3a000030 bcc a000ba40 <_Heap_Free+0xf0> a000b97c: e5941024 ldr r1, [r4, #36] ; 0x24 a000b980: e1550001 cmp r5, r1 a000b984: 8a00002d bhi a000ba40 <_Heap_Free+0xf0> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } a000b988: 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; a000b98c: 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); a000b990: 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; a000b994: e1530002 cmp r3, r2 a000b998: 8a000028 bhi a000ba40 <_Heap_Free+0xf0> a000b99c: e1510002 cmp r1, r2 _Heap_Protection_block_check( heap, next_block ); if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { _HAssert( false ); return false; a000b9a0: 33a00000 movcc r0, #0 a000b9a4: 3a000027 bcc a000ba48 <_Heap_Free+0xf8> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } a000b9a8: 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 ) ) { a000b9ac: e2170001 ands r0, r7, #1 a000b9b0: 0a000024 beq a000ba48 <_Heap_Free+0xf8> return true; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); a000b9b4: 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; a000b9b8: e3c77001 bic r7, r7, #1 a000b9bc: 03a08000 moveq r8, #0 a000b9c0: 0a000004 beq a000b9d8 <_Heap_Free+0x88> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } a000b9c4: 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; a000b9c8: e5900004 ldr r0, [r0, #4] return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) a000b9cc: e3100001 tst r0, #1 a000b9d0: 13a08000 movne r8, #0 a000b9d4: 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 ) ) { a000b9d8: e21c0001 ands r0, ip, #1 a000b9dc: 1a00001a bne a000ba4c <_Heap_Free+0xfc> uintptr_t const prev_size = block->prev_size; a000b9e0: 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); a000b9e4: 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; a000b9e8: e153000a cmp r3, sl a000b9ec: 8a000015 bhi a000ba48 <_Heap_Free+0xf8> a000b9f0: e151000a cmp r1, sl a000b9f4: 3a000013 bcc a000ba48 <_Heap_Free+0xf8> 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; a000b9f8: 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) ) { a000b9fc: e2100001 ands r0, r0, #1 a000ba00: 0a000010 beq a000ba48 <_Heap_Free+0xf8> _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ a000ba04: e3580000 cmp r8, #0 a000ba08: 0a000038 beq a000baf0 <_Heap_Free+0x1a0> uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; a000ba0c: e5940038 ldr r0, [r4, #56] ; 0x38 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } a000ba10: 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; a000ba14: e0867007 add r7, r6, r7 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } a000ba18: e592200c ldr r2, [r2, #12] _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; a000ba1c: e087c00c add ip, r7, ip _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; a000ba20: e2400001 sub r0, r0, #1 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; a000ba24: 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; a000ba28: e5823008 str r3, [r2, #8] next->prev = prev; a000ba2c: 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; a000ba30: e5840038 str r0, [r4, #56] ; 0x38 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; a000ba34: 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; a000ba38: e78ac00c str ip, [sl, ip] a000ba3c: ea00000e b a000ba7c <_Heap_Free+0x12c> _Heap_Protection_block_check( heap, next_block ); if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { _HAssert( false ); return false; a000ba40: e3a00000 mov r0, #0 a000ba44: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } a000ba48: 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 */ a000ba4c: e3580000 cmp r8, #0 a000ba50: 0a000014 beq a000baa8 <_Heap_Free+0x158> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } a000ba54: e5923008 ldr r3, [r2, #8] a000ba58: e592200c ldr r2, [r2, #12] 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; a000ba5c: e0877006 add r7, r7, r6 _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; a000ba60: e3871001 orr r1, r7, #1 ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; a000ba64: e5853008 str r3, [r5, #8] new_block->prev = prev; a000ba68: e585200c str r2, [r5, #12] next->prev = new_block; prev->next = new_block; a000ba6c: e5825008 str r5, [r2, #8] Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; next->prev = new_block; a000ba70: e583500c str r5, [r3, #12] a000ba74: e5851004 str r1, [r5, #4] next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; a000ba78: e7857007 str r7, [r5, r7] stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; a000ba7c: e5942040 ldr r2, [r4, #64] ; 0x40 ++stats->frees; a000ba80: e5943050 ldr r3, [r4, #80] ; 0x50 stats->free_size += block_size; a000ba84: e5941030 ldr r1, [r4, #48] ; 0x30 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; a000ba88: e2422001 sub r2, r2, #1 ++stats->frees; a000ba8c: e2833001 add r3, r3, #1 stats->free_size += block_size; a000ba90: e0816006 add r6, r1, r6 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; a000ba94: e5842040 str r2, [r4, #64] ; 0x40 ++stats->frees; a000ba98: e5843050 str r3, [r4, #80] ; 0x50 stats->free_size += block_size; a000ba9c: e5846030 str r6, [r4, #48] ; 0x30 return( true ); a000baa0: e3a00001 mov r0, #1 a000baa4: 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; a000baa8: e3863001 orr r3, r6, #1 a000baac: e5853004 str r3, [r5, #4] next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; a000bab0: e5943038 ldr r3, [r4, #56] ; 0x38 if ( stats->max_free_blocks < stats->free_blocks ) { a000bab4: 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; a000bab8: 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; a000babc: e5941008 ldr r1, [r4, #8] next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; a000bac0: 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; a000bac4: e3c00001 bic r0, r0, #1 next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; if ( stats->max_free_blocks < stats->free_blocks ) { a000bac8: e153000c cmp r3, ip new_block->next = next; a000bacc: e5851008 str r1, [r5, #8] new_block->prev = block_before; a000bad0: 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; a000bad4: e5820004 str r0, [r2, #4] block_before->next = new_block; next->prev = new_block; a000bad8: e581500c str r5, [r1, #12] next_block->prev_size = block_size; a000badc: 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; a000bae0: e5845008 str r5, [r4, #8] /* Statistics */ ++stats->free_blocks; a000bae4: e5843038 str r3, [r4, #56] ; 0x38 if ( stats->max_free_blocks < stats->free_blocks ) { stats->max_free_blocks = stats->free_blocks; a000bae8: 8584303c strhi r3, [r4, #60] ; 0x3c a000baec: eaffffe2 b a000ba7c <_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; a000baf0: e086c00c add ip, r6, ip prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; a000baf4: e38c3001 orr r3, ip, #1 a000baf8: e58a3004 str r3, [sl, #4] next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; a000bafc: e5923004 ldr r3, [r2, #4] next_block->prev_size = size; a000bb00: 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; a000bb04: e3c33001 bic r3, r3, #1 a000bb08: e5823004 str r3, [r2, #4] a000bb0c: eaffffda b a000ba7c <_Heap_Free+0x12c> =============================================================================== a0012f68 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { a0012f68: e92d40f0 push {r4, r5, r6, r7, lr} a0012f6c: e1a04000 mov r4, r0 a0012f70: e1a05001 mov r5, r1 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); a0012f74: e1a00001 mov r0, r1 a0012f78: e5941010 ldr r1, [r4, #16] a0012f7c: e1a07002 mov r7, r2 a0012f80: ebfff8ca bl a00112b0 <__umodsi3> 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 a0012f84: e5943020 ldr r3, [r4, #32] RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); a0012f88: e2456008 sub r6, r5, #8 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); a0012f8c: 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; a0012f90: e1500003 cmp r0, r3 a0012f94: 3a000012 bcc a0012fe4 <_Heap_Size_of_alloc_area+0x7c> a0012f98: e5942024 ldr r2, [r4, #36] ; 0x24 a0012f9c: e1500002 cmp r0, r2 a0012fa0: 8a00000f bhi a0012fe4 <_Heap_Size_of_alloc_area+0x7c> - 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; a0012fa4: e5906004 ldr r6, [r0, #4] a0012fa8: 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); a0012fac: 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; a0012fb0: e1530006 cmp r3, r6 a0012fb4: 8a00000a bhi a0012fe4 <_Heap_Size_of_alloc_area+0x7c> a0012fb8: e1520006 cmp r2, r6 if ( !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) ) { return false; a0012fbc: 33a00000 movcc r0, #0 a0012fc0: 3a000009 bcc a0012fec <_Heap_Size_of_alloc_area+0x84> 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; a0012fc4: 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 ) a0012fc8: e2100001 ands r0, r0, #1 a0012fcc: 0a000006 beq a0012fec <_Heap_Size_of_alloc_area+0x84> ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; a0012fd0: e2655004 rsb r5, r5, #4 a0012fd4: e0856006 add r6, r5, r6 a0012fd8: e5876000 str r6, [r7] return true; a0012fdc: e3a00001 mov r0, #1 a0012fe0: e8bd80f0 pop {r4, r5, r6, r7, pc} if ( !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) ) { return false; a0012fe4: e3a00000 mov r0, #0 a0012fe8: e8bd80f0 pop {r4, r5, r6, r7, pc} } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; return true; } a0012fec: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED =============================================================================== a0007468 <_Heap_Walk>: 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() ) ) { a0007468: e59f3578 ldr r3, [pc, #1400] ; a00079e8 <_Heap_Walk+0x580> bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { a000746c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 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; a0007470: e31200ff tst r2, #255 ; 0xff if ( !_System_state_Is_up( _System_state_Get() ) ) { a0007474: 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; a0007478: e59f256c ldr r2, [pc, #1388] ; a00079ec <_Heap_Walk+0x584> a000747c: e59f956c ldr r9, [pc, #1388] ; a00079f0 <_Heap_Walk+0x588> bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { a0007480: e1a0a001 mov sl, r1 uintptr_t const page_size = heap->page_size; a0007484: e5901010 ldr r1, [r0, #16] 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; a0007488: 11a09002 movne r9, r2 if ( !_System_state_Is_up( _System_state_Get() ) ) { a000748c: 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; a0007490: e5902014 ldr r2, [r0, #20] Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; a0007494: e5903024 ldr r3, [r0, #36] ; 0x24 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { a0007498: e24dd038 sub sp, sp, #56 ; 0x38 a000749c: e1a04000 mov r4, r0 uintptr_t const page_size = heap->page_size; a00074a0: e58d1024 str r1, [sp, #36] ; 0x24 uintptr_t const min_block_size = heap->min_block_size; a00074a4: e58d2028 str r2, [sp, #40] ; 0x28 Heap_Block *const first_block = heap->first_block; a00074a8: e5908020 ldr r8, [r0, #32] Heap_Block *const last_block = heap->last_block; a00074ac: 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() ) ) { a00074b0: 0a000002 beq a00074c0 <_Heap_Walk+0x58> } block = next_block; } while ( block != first_block ); return true; a00074b4: e3a00001 mov r0, #1 } a00074b8: e28dd038 add sp, sp, #56 ; 0x38 a00074bc: 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)( a00074c0: e594101c ldr r1, [r4, #28] a00074c4: e5900018 ldr r0, [r0, #24] a00074c8: e5942008 ldr r2, [r4, #8] a00074cc: e594300c ldr r3, [r4, #12] a00074d0: e59dc028 ldr ip, [sp, #40] ; 0x28 a00074d4: e58d1008 str r1, [sp, #8] a00074d8: e59d102c ldr r1, [sp, #44] ; 0x2c a00074dc: e58d0004 str r0, [sp, #4] a00074e0: e58d2014 str r2, [sp, #20] a00074e4: e58d1010 str r1, [sp, #16] a00074e8: e58d3018 str r3, [sp, #24] a00074ec: e59f2500 ldr r2, [pc, #1280] ; a00079f4 <_Heap_Walk+0x58c> a00074f0: e58dc000 str ip, [sp] a00074f4: e58d800c str r8, [sp, #12] a00074f8: e1a0000a mov r0, sl a00074fc: e3a01000 mov r1, #0 a0007500: e59d3024 ldr r3, [sp, #36] ; 0x24 a0007504: e12fff39 blx r9 heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { a0007508: e59d2024 ldr r2, [sp, #36] ; 0x24 a000750c: e3520000 cmp r2, #0 a0007510: 0a000024 beq a00075a8 <_Heap_Walk+0x140> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { a0007514: e59d3024 ldr r3, [sp, #36] ; 0x24 a0007518: e2135007 ands r5, r3, #7 a000751c: 1a000027 bne a00075c0 <_Heap_Walk+0x158> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; a0007520: e59d0028 ldr r0, [sp, #40] ; 0x28 a0007524: e59d1024 ldr r1, [sp, #36] ; 0x24 a0007528: ebffe54f bl a0000a6c <__umodsi3> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { a000752c: e250b000 subs fp, r0, #0 a0007530: 1a000028 bne a00075d8 <_Heap_Walk+0x170> a0007534: e2880008 add r0, r8, #8 a0007538: e59d1024 ldr r1, [sp, #36] ; 0x24 a000753c: ebffe54a bl a0000a6c <__umodsi3> ); return false; } if ( a0007540: e2506000 subs r6, r0, #0 a0007544: 1a00002a bne a00075f4 <_Heap_Walk+0x18c> block = next_block; } while ( block != first_block ); return true; } a0007548: e598b004 ldr fp, [r8, #4] ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { a000754c: e21b5001 ands r5, fp, #1 a0007550: 0a0000bf beq a0007854 <_Heap_Walk+0x3ec> - 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; a0007554: e59dc02c ldr ip, [sp, #44] ; 0x2c a0007558: e59c3004 ldr r3, [ip, #4] a000755c: 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); a0007560: 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; a0007564: e5935004 ldr r5, [r3, #4] ); return false; } if ( _Heap_Is_free( last_block ) ) { a0007568: e2155001 ands r5, r5, #1 a000756c: 0a000007 beq a0007590 <_Heap_Walk+0x128> ); return false; } if ( a0007570: e1580003 cmp r8, r3 a0007574: 0a000025 beq a0007610 <_Heap_Walk+0x1a8> _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( a0007578: e1a0000a mov r0, sl <== NOT EXECUTED a000757c: e3a01001 mov r1, #1 <== NOT EXECUTED a0007580: e59f2470 ldr r2, [pc, #1136] ; a00079f8 <_Heap_Walk+0x590> <== NOT EXECUTED a0007584: e12fff39 blx r9 <== NOT EXECUTED if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; a0007588: e1a00006 mov r0, r6 <== NOT EXECUTED a000758c: eaffffc9 b a00074b8 <_Heap_Walk+0x50> <== NOT EXECUTED return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( a0007590: e1a0000a mov r0, sl a0007594: e3a01001 mov r1, #1 a0007598: e59f245c ldr r2, [pc, #1116] ; a00079fc <_Heap_Walk+0x594> a000759c: e12fff39 blx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; a00075a0: e1a00005 mov r0, r5 a00075a4: eaffffc3 b a00074b8 <_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" ); a00075a8: e1a0000a mov r0, sl a00075ac: e3a01001 mov r1, #1 a00075b0: e59f2448 ldr r2, [pc, #1096] ; a0007a00 <_Heap_Walk+0x598> a00075b4: e12fff39 blx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; a00075b8: e59d0024 ldr r0, [sp, #36] ; 0x24 a00075bc: eaffffbd b a00074b8 <_Heap_Walk+0x50> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( a00075c0: e1a0000a mov r0, sl a00075c4: e3a01001 mov r1, #1 a00075c8: e59f2434 ldr r2, [pc, #1076] ; a0007a04 <_Heap_Walk+0x59c> a00075cc: e12fff39 blx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; a00075d0: e3a00000 mov r0, #0 a00075d4: eaffffb7 b a00074b8 <_Heap_Walk+0x50> return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( a00075d8: e1a0000a mov r0, sl a00075dc: e3a01001 mov r1, #1 a00075e0: e59f2420 ldr r2, [pc, #1056] ; a0007a08 <_Heap_Walk+0x5a0> a00075e4: e59d3028 ldr r3, [sp, #40] ; 0x28 a00075e8: e12fff39 blx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; a00075ec: e1a00005 mov r0, r5 a00075f0: eaffffb0 b a00074b8 <_Heap_Walk+0x50> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( a00075f4: e1a0000a mov r0, sl a00075f8: e3a01001 mov r1, #1 a00075fc: e59f2408 ldr r2, [pc, #1032] ; a0007a0c <_Heap_Walk+0x5a4> a0007600: e1a03008 mov r3, r8 a0007604: e12fff39 blx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; a0007608: e1a0000b mov r0, fp a000760c: eaffffa9 b a00074b8 <_Heap_Walk+0x50> block = next_block; } while ( block != first_block ); return true; } a0007610: e5945008 ldr r5, [r4, #8] int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; a0007614: 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 ) { a0007618: e1540005 cmp r4, r5 a000761c: 05943020 ldreq r3, [r4, #32] a0007620: 0a00000c beq a0007658 <_Heap_Walk+0x1f0> block = next_block; } while ( block != first_block ); return true; } a0007624: 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; a0007628: e1530005 cmp r3, r5 a000762c: 9a00008e bls a000786c <_Heap_Walk+0x404> 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)( a0007630: e1a0000a mov r0, sl a0007634: e3a01001 mov r1, #1 a0007638: e59f23d0 ldr r2, [pc, #976] ; a0007a10 <_Heap_Walk+0x5a8> a000763c: e1a03005 mov r3, r5 a0007640: e12fff39 blx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; a0007644: e3a00000 mov r0, #0 a0007648: eaffff9a b a00074b8 <_Heap_Walk+0x50> a000764c: e1a03008 mov r3, r8 a0007650: e59db034 ldr fp, [sp, #52] ; 0x34 a0007654: e59d8030 ldr r8, [sp, #48] ; 0x30 ); return false; } if ( _Heap_Is_used( free_block ) ) { a0007658: 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; a000765c: 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); a0007660: 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; a0007664: e1530005 cmp r3, r5 a0007668: 9a000007 bls a000768c <_Heap_Walk+0x224> 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)( a000766c: e1a0000a mov r0, sl a0007670: e58d5000 str r5, [sp] a0007674: e3a01001 mov r1, #1 a0007678: e59f2394 ldr r2, [pc, #916] ; a0007a14 <_Heap_Walk+0x5ac> a000767c: e1a03006 mov r3, r6 a0007680: e12fff39 blx r9 "block 0x%08x: next block 0x%08x not in heap\n", block, next_block ); return false; a0007684: e3a00000 mov r0, #0 a0007688: eaffff8a b a00074b8 <_Heap_Walk+0x50> a000768c: e5943024 ldr r3, [r4, #36] ; 0x24 a0007690: e1530005 cmp r3, r5 a0007694: 3afffff4 bcc a000766c <_Heap_Walk+0x204> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; a0007698: e59d1024 ldr r1, [sp, #36] ; 0x24 a000769c: e1a00007 mov r0, r7 a00076a0: ebffe4f1 bl a0000a6c <__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; a00076a4: e59d102c ldr r1, [sp, #44] ; 0x2c a00076a8: e0563001 subs r3, r6, r1 a00076ac: 13a03001 movne r3, #1 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { a00076b0: e3500000 cmp r0, #0 a00076b4: 0a000001 beq a00076c0 <_Heap_Walk+0x258> a00076b8: e3530000 cmp r3, #0 a00076bc: 1a0000a2 bne a000794c <_Heap_Walk+0x4e4> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { a00076c0: e59d2028 ldr r2, [sp, #40] ; 0x28 a00076c4: e1520007 cmp r2, r7 a00076c8: 9a000001 bls a00076d4 <_Heap_Walk+0x26c> a00076cc: e3530000 cmp r3, #0 a00076d0: 1a0000a5 bne a000796c <_Heap_Walk+0x504> ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { a00076d4: e1560005 cmp r6, r5 a00076d8: 3a000001 bcc a00076e4 <_Heap_Walk+0x27c> a00076dc: e3530000 cmp r3, #0 a00076e0: 1a0000aa bne a0007990 <_Heap_Walk+0x528> 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; a00076e4: e5953004 ldr r3, [r5, #4] a00076e8: e20bb001 and fp, fp, #1 ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { a00076ec: e3130001 tst r3, #1 a00076f0: 0a000016 beq a0007750 <_Heap_Walk+0x2e8> if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { a00076f4: e35b0000 cmp fp, #0 a00076f8: 0a00000b beq a000772c <_Heap_Walk+0x2c4> (*printer)( a00076fc: e58d7000 str r7, [sp] a0007700: e1a0000a mov r0, sl a0007704: e3a01000 mov r1, #0 a0007708: e59f2308 ldr r2, [pc, #776] ; a0007a18 <_Heap_Walk+0x5b0> a000770c: e1a03006 mov r3, r6 a0007710: e12fff39 blx r9 block->prev_size ); } block = next_block; } while ( block != first_block ); a0007714: e1580005 cmp r8, r5 a0007718: 0affff65 beq a00074b4 <_Heap_Walk+0x4c> a000771c: e595b004 ldr fp, [r5, #4] a0007720: e5943020 ldr r3, [r4, #32] a0007724: e1a06005 mov r6, r5 a0007728: eaffffcb b a000765c <_Heap_Walk+0x1f4> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( a000772c: e58d7000 str r7, [sp] a0007730: e5963000 ldr r3, [r6] a0007734: e1a0000a mov r0, sl a0007738: e1a0100b mov r1, fp a000773c: e58d3004 str r3, [sp, #4] a0007740: e59f22d4 ldr r2, [pc, #724] ; a0007a1c <_Heap_Walk+0x5b4> a0007744: e1a03006 mov r3, r6 a0007748: e12fff39 blx r9 a000774c: eafffff0 b a0007714 <_Heap_Walk+0x2ac> 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 ? a0007750: 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)( a0007754: e5943008 ldr r3, [r4, #8] block = next_block; } while ( block != first_block ); return true; } a0007758: 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)( a000775c: e1530002 cmp r3, r2 a0007760: 059f02b8 ldreq r0, [pc, #696] ; a0007a20 <_Heap_Walk+0x5b8> a0007764: 0a000003 beq a0007778 <_Heap_Walk+0x310> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), a0007768: e59f32b4 ldr r3, [pc, #692] ; a0007a24 <_Heap_Walk+0x5bc> a000776c: e1540002 cmp r4, r2 a0007770: e59f02b0 ldr r0, [pc, #688] ; a0007a28 <_Heap_Walk+0x5c0> a0007774: 01a00003 moveq r0, r3 block->next, block->next == last_free_block ? a0007778: 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)( a000777c: e1510003 cmp r1, r3 a0007780: 059f12a4 ldreq r1, [pc, #676] ; a0007a2c <_Heap_Walk+0x5c4> a0007784: 0a000003 beq a0007798 <_Heap_Walk+0x330> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") a0007788: e59fc2a0 ldr ip, [pc, #672] ; a0007a30 <_Heap_Walk+0x5c8> a000778c: e1540003 cmp r4, r3 a0007790: e59f1290 ldr r1, [pc, #656] ; a0007a28 <_Heap_Walk+0x5c0> a0007794: 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)( a0007798: e58d2004 str r2, [sp, #4] a000779c: e58d0008 str r0, [sp, #8] a00077a0: e58d300c str r3, [sp, #12] a00077a4: e58d1010 str r1, [sp, #16] a00077a8: e1a03006 mov r3, r6 a00077ac: e58d7000 str r7, [sp] a00077b0: e1a0000a mov r0, sl a00077b4: e3a01000 mov r1, #0 a00077b8: e59f2274 ldr r2, [pc, #628] ; a0007a34 <_Heap_Walk+0x5cc> a00077bc: e12fff39 blx r9 block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { a00077c0: e5953000 ldr r3, [r5] a00077c4: e1570003 cmp r7, r3 a00077c8: 1a000010 bne a0007810 <_Heap_Walk+0x3a8> ); return false; } if ( !prev_used ) { a00077cc: e35b0000 cmp fp, #0 a00077d0: 0a000018 beq a0007838 <_Heap_Walk+0x3d0> block = next_block; } while ( block != first_block ); return true; } a00077d4: 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 ) { a00077d8: e1540003 cmp r4, r3 a00077dc: 0a000004 beq a00077f4 <_Heap_Walk+0x38c> if ( free_block == block ) { a00077e0: e1560003 cmp r6, r3 a00077e4: 0affffca beq a0007714 <_Heap_Walk+0x2ac> return true; } free_block = free_block->next; a00077e8: 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 ) { a00077ec: e1540003 cmp r4, r3 a00077f0: 1afffffa bne a00077e0 <_Heap_Walk+0x378> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( a00077f4: e1a0000a mov r0, sl a00077f8: e3a01001 mov r1, #1 a00077fc: e59f2234 ldr r2, [pc, #564] ; a0007a38 <_Heap_Walk+0x5d0> a0007800: e1a03006 mov r3, r6 a0007804: e12fff39 blx r9 return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; a0007808: e3a00000 mov r0, #0 a000780c: eaffff29 b a00074b8 <_Heap_Walk+0x50> " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { (*printer)( a0007810: e58d3004 str r3, [sp, #4] a0007814: e1a0000a mov r0, sl a0007818: e58d7000 str r7, [sp] a000781c: e58d5008 str r5, [sp, #8] a0007820: e3a01001 mov r1, #1 a0007824: e59f2210 ldr r2, [pc, #528] ; a0007a3c <_Heap_Walk+0x5d4> a0007828: e1a03006 mov r3, r6 a000782c: e12fff39 blx r9 return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; a0007830: e3a00000 mov r0, #0 a0007834: eaffff1f b a00074b8 <_Heap_Walk+0x50> return false; } if ( !prev_used ) { (*printer)( a0007838: e1a0000a mov r0, sl a000783c: e3a01001 mov r1, #1 a0007840: e59f21f8 ldr r2, [pc, #504] ; a0007a40 <_Heap_Walk+0x5d8> a0007844: e1a03006 mov r3, r6 a0007848: e12fff39 blx r9 return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; a000784c: e1a0000b mov r0, fp a0007850: eaffff18 b a00074b8 <_Heap_Walk+0x50> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( a0007854: e1a0000a mov r0, sl a0007858: e3a01001 mov r1, #1 a000785c: e59f21e0 ldr r2, [pc, #480] ; a0007a44 <_Heap_Walk+0x5dc> a0007860: e12fff39 blx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; a0007864: e1a00005 mov r0, r5 a0007868: eaffff12 b a00074b8 <_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; a000786c: e594c024 ldr ip, [r4, #36] ; 0x24 a0007870: e15c0005 cmp ip, r5 a0007874: 3affff6d bcc a0007630 <_Heap_Walk+0x1c8> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; a0007878: e2850008 add r0, r5, #8 a000787c: e1a01007 mov r1, r7 a0007880: e58d3020 str r3, [sp, #32] a0007884: e58dc01c str ip, [sp, #28] a0007888: ebffe477 bl a0000a6c <__umodsi3> ); return false; } if ( a000788c: e3500000 cmp r0, #0 a0007890: e59d3020 ldr r3, [sp, #32] a0007894: e59dc01c ldr ip, [sp, #28] a0007898: 1a000044 bne a00079b0 <_Heap_Walk+0x548> - 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; a000789c: e5952004 ldr r2, [r5, #4] a00078a0: e3c22001 bic r2, r2, #1 block = next_block; } while ( block != first_block ); return true; } a00078a4: 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; a00078a8: e5922004 ldr r2, [r2, #4] ); return false; } if ( _Heap_Is_used( free_block ) ) { a00078ac: e3120001 tst r2, #1 a00078b0: 1a000045 bne a00079cc <_Heap_Walk+0x564> a00078b4: e58d8030 str r8, [sp, #48] ; 0x30 a00078b8: e58db034 str fp, [sp, #52] ; 0x34 a00078bc: e1a01004 mov r1, r4 a00078c0: e1a06005 mov r6, r5 a00078c4: e1a08003 mov r8, r3 a00078c8: e1a0b00c mov fp, ip a00078cc: ea000013 b a0007920 <_Heap_Walk+0x4b8> return false; } prev_block = free_block; free_block = free_block->next; a00078d0: 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 ) { a00078d4: e1540005 cmp r4, r5 a00078d8: 0affff5b beq a000764c <_Heap_Walk+0x1e4> 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; a00078dc: e1580005 cmp r8, r5 a00078e0: 8affff52 bhi a0007630 <_Heap_Walk+0x1c8> a00078e4: e155000b cmp r5, fp RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; a00078e8: e2850008 add r0, r5, #8 a00078ec: 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; a00078f0: 8affff4e bhi a0007630 <_Heap_Walk+0x1c8> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; a00078f4: ebffe45c bl a0000a6c <__umodsi3> ); return false; } if ( a00078f8: e3500000 cmp r0, #0 a00078fc: 1a00002b bne a00079b0 <_Heap_Walk+0x548> - 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; a0007900: e5953004 ldr r3, [r5, #4] ); return false; } if ( _Heap_Is_used( free_block ) ) { a0007904: e1a01006 mov r1, r6 a0007908: e1a06005 mov r6, r5 a000790c: e3c33001 bic r3, r3, #1 block = next_block; } while ( block != first_block ); return true; } a0007910: 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; a0007914: e5933004 ldr r3, [r3, #4] ); return false; } if ( _Heap_Is_used( free_block ) ) { a0007918: e3130001 tst r3, #1 a000791c: 1a00002a bne a00079cc <_Heap_Walk+0x564> ); return false; } if ( free_block->prev != prev_block ) { a0007920: e595200c ldr r2, [r5, #12] a0007924: e1520001 cmp r2, r1 a0007928: 0affffe8 beq a00078d0 <_Heap_Walk+0x468> (*printer)( a000792c: e58d2000 str r2, [sp] a0007930: e1a0000a mov r0, sl a0007934: e3a01001 mov r1, #1 a0007938: e59f2108 ldr r2, [pc, #264] ; a0007a48 <_Heap_Walk+0x5e0> a000793c: e1a03005 mov r3, r5 a0007940: e12fff39 blx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; a0007944: e3a00000 mov r0, #0 a0007948: eafffeda b a00074b8 <_Heap_Walk+0x50> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { (*printer)( a000794c: e1a0000a mov r0, sl a0007950: e58d7000 str r7, [sp] a0007954: e3a01001 mov r1, #1 a0007958: e59f20ec ldr r2, [pc, #236] ; a0007a4c <_Heap_Walk+0x5e4> a000795c: e1a03006 mov r3, r6 a0007960: e12fff39 blx r9 "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; a0007964: e3a00000 mov r0, #0 a0007968: eafffed2 b a00074b8 <_Heap_Walk+0x50> } if ( block_size < min_block_size && is_not_last_block ) { (*printer)( a000796c: e58d2004 str r2, [sp, #4] a0007970: e1a0000a mov r0, sl a0007974: e58d7000 str r7, [sp] a0007978: e3a01001 mov r1, #1 a000797c: e59f20cc ldr r2, [pc, #204] ; a0007a50 <_Heap_Walk+0x5e8> a0007980: e1a03006 mov r3, r6 a0007984: e12fff39 blx r9 block, block_size, min_block_size ); return false; a0007988: e3a00000 mov r0, #0 a000798c: eafffec9 b a00074b8 <_Heap_Walk+0x50> } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( a0007990: e1a0000a mov r0, sl a0007994: e58d5000 str r5, [sp] a0007998: e3a01001 mov r1, #1 a000799c: e59f20b0 ldr r2, [pc, #176] ; a0007a54 <_Heap_Walk+0x5ec> a00079a0: e1a03006 mov r3, r6 a00079a4: e12fff39 blx r9 "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; a00079a8: e3a00000 mov r0, #0 a00079ac: eafffec1 b a00074b8 <_Heap_Walk+0x50> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( a00079b0: e1a0000a mov r0, sl a00079b4: e3a01001 mov r1, #1 a00079b8: e59f2098 ldr r2, [pc, #152] ; a0007a58 <_Heap_Walk+0x5f0> a00079bc: e1a03005 mov r3, r5 a00079c0: e12fff39 blx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; a00079c4: e3a00000 mov r0, #0 a00079c8: eafffeba b a00074b8 <_Heap_Walk+0x50> return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( a00079cc: e1a0000a mov r0, sl a00079d0: e3a01001 mov r1, #1 a00079d4: e59f2080 ldr r2, [pc, #128] ; a0007a5c <_Heap_Walk+0x5f4> a00079d8: e1a03005 mov r3, r5 a00079dc: e12fff39 blx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; a00079e0: e3a00000 mov r0, #0 a00079e4: eafffeb3 b a00074b8 <_Heap_Walk+0x50> =============================================================================== a0006950 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { a0006950: 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 ) a0006954: e5904034 ldr r4, [r0, #52] ; 0x34 */ void _Objects_Extend_information( Objects_Information *information ) { a0006958: e24dd014 sub sp, sp, #20 a000695c: e1a05000 mov r5, r0 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) a0006960: e3540000 cmp r4, #0 /* * 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 ); a0006964: e1d070b8 ldrh r7, [r0, #8] index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) a0006968: 0a00009c beq a0006be0 <_Objects_Extend_information+0x290> block_count = 0; else { block_count = information->maximum / information->allocation_size; a000696c: e1d081b4 ldrh r8, [r0, #20] a0006970: e1d0a1b0 ldrh sl, [r0, #16] a0006974: e1a01008 mov r1, r8 a0006978: e1a0000a mov r0, sl a000697c: eb002a05 bl a0011198 <__aeabi_uidiv> a0006980: e1a03800 lsl r3, r0, #16 for ( ; block < block_count; block++ ) { a0006984: e1b03823 lsrs r3, r3, #16 a0006988: 0a00009a beq a0006bf8 <_Objects_Extend_information+0x2a8> if ( information->object_blocks[ block ] == NULL ) { a000698c: e5949000 ldr r9, [r4] a0006990: e3590000 cmp r9, #0 a0006994: 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 ); a0006998: 01a06007 moveq r6, r7 index_base = minimum_index; block = 0; a000699c: 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 ) { a00069a0: 0a00000c beq a00069d8 <_Objects_Extend_information+0x88> a00069a4: e1a02004 mov r2, r4 a00069a8: 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 ); a00069ac: e1a06007 mov r6, r7 index_base = minimum_index; block = 0; a00069b0: e3a04000 mov r4, #0 a00069b4: ea000002 b a00069c4 <_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 ) { a00069b8: e5b29004 ldr r9, [r2, #4]! a00069bc: e3590000 cmp r9, #0 a00069c0: 0a000004 beq a00069d8 <_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++ ) { a00069c4: e2844001 add r4, r4, #1 a00069c8: e1530004 cmp r3, r4 if ( information->object_blocks[ block ] == NULL ) { do_extend = false; break; } else index_base += information->allocation_size; a00069cc: 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++ ) { a00069d0: 8afffff8 bhi a00069b8 <_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; a00069d4: e3a09001 mov r9, #1 } else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; a00069d8: 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 ) { a00069dc: e35a0801 cmp sl, #65536 ; 0x10000 a00069e0: 2a000064 bcs a0006b78 <_Objects_Extend_information+0x228> /* * 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 ) { a00069e4: 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; a00069e8: e5950018 ldr r0, [r5, #24] if ( information->auto_extend ) { a00069ec: 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; a00069f0: e0000091 mul r0, r1, r0 if ( information->auto_extend ) { a00069f4: 1a000061 bne a0006b80 <_Objects_Extend_information+0x230> new_object_block = _Workspace_Allocate( block_size ); if ( !new_object_block ) return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); a00069f8: e58d3000 str r3, [sp] a00069fc: eb000883 bl a0008c10 <_Workspace_Allocate_or_fatal_error> a0006a00: e59d3000 ldr r3, [sp] a0006a04: e1a08000 mov r8, r0 } /* * Do we need to grow the tables? */ if ( do_extend ) { a0006a08: e3590000 cmp r9, #0 a0006a0c: 0a00003a beq a0006afc <_Objects_Extend_information+0x1ac> */ /* * Up the block count and maximum */ block_count++; a0006a10: e283b001 add fp, r3, #1 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + a0006a14: e08b008b add r0, fp, fp, lsl #1 ((maximum + minimum_index) * sizeof(Objects_Control *)); a0006a18: e08a0000 add r0, sl, r0 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + a0006a1c: e0800007 add r0, r0, r7 ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); a0006a20: e1a00100 lsl r0, r0, #2 a0006a24: e58d3000 str r3, [sp] a0006a28: eb00086e bl a0008be8 <_Workspace_Allocate> if ( !object_blocks ) { a0006a2c: e2509000 subs r9, r0, #0 a0006a30: e59d3000 ldr r3, [sp] a0006a34: 0a000074 beq a0006c0c <_Objects_Extend_information+0x2bc> * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { a0006a38: e1d521b0 ldrh r2, [r5, #16] RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); a0006a3c: e089c10b add ip, r9, fp, lsl #2 a0006a40: e089b18b add fp, r9, fp, lsl #3 a0006a44: e1570002 cmp r7, r2 a0006a48: 3a000052 bcc a0006b98 <_Objects_Extend_information+0x248> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { a0006a4c: e3570000 cmp r7, #0 a0006a50: 13a02000 movne r2, #0 a0006a54: 11a0100b movne r1, fp local_table[ index ] = NULL; a0006a58: 11a00002 movne r0, r2 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { a0006a5c: 0a000003 beq a0006a70 <_Objects_Extend_information+0x120> a0006a60: e2822001 add r2, r2, #1 a0006a64: e1570002 cmp r7, r2 local_table[ index ] = NULL; a0006a68: e4810004 str r0, [r1], #4 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { a0006a6c: 8afffffb bhi a0006a60 <_Objects_Extend_information+0x110> a0006a70: 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 ); a0006a74: e1d511b4 ldrh r1, [r5, #20] } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; a0006a78: e3a00000 mov r0, #0 a0006a7c: e7890003 str r0, [r9, r3] inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); a0006a80: 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 ; a0006a84: e1560001 cmp r6, r1 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; a0006a88: e78c0003 str r0, [ip, r3] for ( index=index_base ; a0006a8c: 2a000005 bcs a0006aa8 <_Objects_Extend_information+0x158> a0006a90: e08b2106 add r2, fp, r6, lsl #2 * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( a0006a94: 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++ ) { a0006a98: 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 ; a0006a9c: e1530001 cmp r3, r1 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; a0006aa0: 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 ; a0006aa4: 3afffffb bcc a0006a98 <_Objects_Extend_information+0x148> a0006aa8: e10f3000 mrs r3, CPSR a0006aac: e3832080 orr r2, r3, #128 ; 0x80 a0006ab0: e129f002 msr CPSR_fc, r2 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | a0006ab4: 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( a0006ab8: e1d510b4 ldrh r1, [r5, #4] 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; a0006abc: e1a0a80a lsl sl, sl, #16 a0006ac0: e1a02c02 lsl r2, r2, #24 a0006ac4: e3822801 orr r2, r2, #65536 ; 0x10000 a0006ac8: e1a0a82a lsr sl, sl, #16 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | a0006acc: 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) | a0006ad0: e182200a orr r2, r2, sl local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; a0006ad4: e5950034 ldr r0, [r5, #52] ; 0x34 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; a0006ad8: e585c030 str ip, [r5, #48] ; 0x30 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; a0006adc: e5859034 str r9, [r5, #52] ; 0x34 information->inactive_per_block = inactive_per_block; information->local_table = local_table; a0006ae0: e585b01c str fp, [r5, #28] information->maximum = (Objects_Maximum) maximum; a0006ae4: e1c5a1b0 strh sl, [r5, #16] information->maximum_id = _Objects_Build_id( a0006ae8: e585200c str r2, [r5, #12] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a0006aec: e129f003 msr CPSR_fc, r3 information->maximum ); _ISR_Enable( level ); if ( old_tables ) a0006af0: e3500000 cmp r0, #0 a0006af4: 0a000000 beq a0006afc <_Objects_Extend_information+0x1ac> _Workspace_Free( old_tables ); a0006af8: eb000840 bl a0008c00 <_Workspace_Free> } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; a0006afc: e5953034 ldr r3, [r5, #52] ; 0x34 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( a0006b00: e28d7008 add r7, sp, #8 a0006b04: e1a01008 mov r1, r8 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; a0006b08: e7838104 str r8, [r3, r4, lsl #2] /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( a0006b0c: e1a00007 mov r0, r7 a0006b10: e1d521b4 ldrh r2, [r5, #20] a0006b14: e5953018 ldr r3, [r5, #24] a0006b18: eb00126b bl a000b4cc <_Chain_Initialize> } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; a0006b1c: e1a04104 lsl r4, r4, #2 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); a0006b20: 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 ) { a0006b24: ea000009 b a0006b50 <_Objects_Extend_information+0x200> a0006b28: e5953000 ldr r3, [r5] the_object->id = _Objects_Build_id( a0006b2c: e1d520b4 ldrh r2, [r5, #4] information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); a0006b30: e1a00008 mov r0, r8 a0006b34: e1a03c03 lsl r3, r3, #24 a0006b38: e3833801 orr r3, r3, #65536 ; 0x10000 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | a0006b3c: 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) | a0006b40: e1833006 orr r3, r3, r6 */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { the_object->id = _Objects_Build_id( a0006b44: e5813008 str r3, [r1, #8] information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); a0006b48: ebfffce1 bl a0005ed4 <_Chain_Append> index++; a0006b4c: 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 ) { a0006b50: e1a00007 mov r0, r7 a0006b54: ebfffcf1 bl a0005f20 <_Chain_Get> a0006b58: e2501000 subs r1, r0, #0 a0006b5c: 1afffff1 bne a0006b28 <_Objects_Extend_information+0x1d8> index++; } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); a0006b60: e1d522bc ldrh r2, [r5, #44] ; 0x2c _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; a0006b64: e1d531b4 ldrh r3, [r5, #20] a0006b68: e5951030 ldr r1, [r5, #48] ; 0x30 information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); a0006b6c: e0832002 add r2, r3, r2 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; a0006b70: e7813004 str r3, [r1, r4] information->inactive = a0006b74: e1c522bc strh r2, [r5, #44] ; 0x2c (Objects_Maximum)(information->inactive + information->allocation_size); } a0006b78: e28dd014 add sp, sp, #20 a0006b7c: 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 ); a0006b80: e58d3000 str r3, [sp] a0006b84: eb000817 bl a0008be8 <_Workspace_Allocate> if ( !new_object_block ) a0006b88: e2508000 subs r8, r0, #0 a0006b8c: e59d3000 ldr r3, [sp] a0006b90: 1affff9c bne a0006a08 <_Objects_Extend_information+0xb8> a0006b94: eafffff7 b a0006b78 <_Objects_Extend_information+0x228> /* * 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, a0006b98: e1a03103 lsl r3, r3, #2 a0006b9c: e5951034 ldr r1, [r5, #52] ; 0x34 a0006ba0: e1a02003 mov r2, r3 a0006ba4: e88d1008 stm sp, {r3, ip} a0006ba8: eb001e09 bl a000e3d4 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, a0006bac: e89d1008 ldm sp, {r3, ip} a0006bb0: e5951030 ldr r1, [r5, #48] ; 0x30 a0006bb4: e1a0000c mov r0, ip a0006bb8: e1a02003 mov r2, r3 a0006bbc: eb001e04 bl a000e3d4 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, information->local_table, (information->maximum + minimum_index) * sizeof(Objects_Control *) ); a0006bc0: 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, a0006bc4: e1a0000b mov r0, fp a0006bc8: e595101c ldr r1, [r5, #28] information->local_table, (information->maximum + minimum_index) * sizeof(Objects_Control *) ); a0006bcc: 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, a0006bd0: e1a02102 lsl r2, r2, #2 a0006bd4: eb001dfe bl a000e3d4 a0006bd8: e89d1008 ldm sp, {r3, ip} a0006bdc: eaffffa4 b a0006a74 <_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 ) a0006be0: e1d0a1b0 ldrh sl, [r0, #16] a0006be4: 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 ); a0006be8: 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; a0006bec: e3a09001 mov r9, #1 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) block_count = 0; a0006bf0: e1a03004 mov r3, r4 a0006bf4: eaffff77 b a00069d8 <_Objects_Extend_information+0x88> else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { a0006bf8: 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 ); a0006bfc: 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; a0006c00: e3a09001 mov r9, #1 <== NOT EXECUTED minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; a0006c04: e1a04003 mov r4, r3 <== NOT EXECUTED a0006c08: eaffff72 b a00069d8 <_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 ); a0006c0c: e1a00008 mov r0, r8 a0006c10: eb0007fa bl a0008c00 <_Workspace_Free> return; a0006c14: eaffffd7 b a0006b78 <_Objects_Extend_information+0x228> =============================================================================== a0006f94 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { a0006f94: 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 ); a0006f98: e1d040b8 ldrh r4, [r0, #8] block_count = (information->maximum - index_base) / a0006f9c: e1d051b4 ldrh r5, [r0, #20] */ void _Objects_Shrink_information( Objects_Information *information ) { a0006fa0: 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) / a0006fa4: e1d001b0 ldrh r0, [r0, #16] a0006fa8: e1a01005 mov r1, r5 a0006fac: e0640000 rsb r0, r4, r0 a0006fb0: eb002878 bl a0011198 <__aeabi_uidiv> information->allocation_size; for ( block = 0; block < block_count; block++ ) { a0006fb4: e3500000 cmp r0, #0 a0006fb8: 0a00000d beq a0006ff4 <_Objects_Shrink_information+0x60> if ( information->inactive_per_block[ block ] == a0006fbc: e5962030 ldr r2, [r6, #48] ; 0x30 a0006fc0: e5923000 ldr r3, [r2] a0006fc4: 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++ ) { a0006fc8: 13a03000 movne r3, #0 if ( information->inactive_per_block[ block ] == a0006fcc: 1a000005 bne a0006fe8 <_Objects_Shrink_information+0x54> a0006fd0: ea000008 b a0006ff8 <_Objects_Shrink_information+0x64> <== NOT EXECUTED a0006fd4: e5b21004 ldr r1, [r2, #4]! information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; a0006fd8: e0844005 add r4, r4, r5 a0006fdc: 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 ] == a0006fe0: e1550001 cmp r5, r1 a0006fe4: 0a000004 beq a0006ffc <_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++ ) { a0006fe8: e2833001 add r3, r3, #1 a0006fec: e1500003 cmp r0, r3 a0006ff0: 8afffff7 bhi a0006fd4 <_Objects_Shrink_information+0x40> a0006ff4: e8bd80f0 pop {r4, r5, r6, r7, pc} if ( information->inactive_per_block[ block ] == a0006ff8: e3a07000 mov r7, #0 <== NOT EXECUTED information->allocation_size ) { /* * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) _Chain_First( &information->Inactive ); a0006ffc: e5960020 ldr r0, [r6, #32] a0007000: ea000002 b a0007010 <_Objects_Shrink_information+0x7c> if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); a0007004: e3550000 cmp r5, #0 a0007008: 0a00000b beq a000703c <_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; a000700c: e1a00005 mov r0, r5 * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) _Chain_First( &information->Inactive ); do { index = _Objects_Get_index( the_object->id ); a0007010: 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; a0007014: e5905000 ldr r5, [r0] if ((index >= index_base) && a0007018: e1530004 cmp r3, r4 a000701c: 3afffff8 bcc a0007004 <_Objects_Shrink_information+0x70> (index < (index_base + information->allocation_size))) { a0007020: e1d621b4 ldrh r2, [r6, #20] a0007024: 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) && a0007028: e1530002 cmp r3, r2 a000702c: 2afffff4 bcs a0007004 <_Objects_Shrink_information+0x70> (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); a0007030: ebfffbb2 bl a0005f00 <_Chain_Extract> } } while ( the_object ); a0007034: e3550000 cmp r5, #0 a0007038: 1afffff3 bne a000700c <_Objects_Shrink_information+0x78> /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); a000703c: e5963034 ldr r3, [r6, #52] ; 0x34 a0007040: e7930007 ldr r0, [r3, r7] a0007044: eb0006ed bl a0008c00 <_Workspace_Free> information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; a0007048: e1d602bc ldrh r0, [r6, #44] ; 0x2c a000704c: 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; a0007050: e5961034 ldr r1, [r6, #52] ; 0x34 information->inactive_per_block[ block ] = 0; a0007054: e5962030 ldr r2, [r6, #48] ; 0x30 information->inactive -= information->allocation_size; a0007058: 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; a000705c: e7815007 str r5, [r1, r7] information->inactive_per_block[ block ] = 0; a0007060: e7825007 str r5, [r2, r7] information->inactive -= information->allocation_size; a0007064: e1c632bc strh r3, [r6, #44] ; 0x2c return; a0007068: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== a000da98 <_POSIX_signals_Clear_process_signals>: static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a000da98: e10f2000 mrs r2, CPSR a000da9c: e3823080 orr r3, r2, #128 ; 0x80 a000daa0: 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 ) { a000daa4: e3a0300c mov r3, #12 a000daa8: e0030390 mul r3, r0, r3 a000daac: e59f1048 ldr r1, [pc, #72] ; a000dafc <_POSIX_signals_Clear_process_signals+0x64> a000dab0: e7911003 ldr r1, [r1, r3] a000dab4: e3510002 cmp r1, #2 a000dab8: 0a000007 beq a000dadc <_POSIX_signals_Clear_process_signals+0x44> if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; a000dabc: e59f303c ldr r3, [pc, #60] ; a000db00 <_POSIX_signals_Clear_process_signals+0x68> a000dac0: e3a0c001 mov ip, #1 a000dac4: e2400001 sub r0, r0, #1 a000dac8: e5931000 ldr r1, [r3] a000dacc: e1c1001c bic r0, r1, ip, lsl r0 a000dad0: e5830000 str r0, [r3] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a000dad4: e129f002 msr CPSR_fc, r2 } _ISR_Enable( level ); } a000dad8: e12fff1e bx lr a000dadc: e59f1020 ldr r1, [pc, #32] ; a000db04 <_POSIX_signals_Clear_process_signals+0x6c> RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); a000dae0: e283c004 add ip, r3, #4 ISR_Level level; _ISR_Disable( level ); if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) a000dae4: e7913003 ldr r3, [r1, r3] a000dae8: e08c1001 add r1, ip, r1 a000daec: e1530001 cmp r3, r1 a000daf0: 0afffff1 beq a000dabc <_POSIX_signals_Clear_process_signals+0x24> a000daf4: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; } _ISR_Enable( level ); } a000daf8: e12fff1e bx lr <== NOT EXECUTED =============================================================================== a0006548 <_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(); a0006548: e59f30bc ldr r3, [pc, #188] ; a000660c <_TOD_Validate+0xc4> */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { a000654c: 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) || a0006550: 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(); a0006554: e593100c ldr r1, [r3, #12] if ((!the_tod) || a0006558: 0a000029 beq a0006604 <_TOD_Validate+0xbc> ) { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / a000655c: e3a0093d mov r0, #999424 ; 0xf4000 a0006560: e2800d09 add r0, r0, #576 ; 0x240 a0006564: eb0048f1 bl a0018930 <__aeabi_uidiv> rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || a0006568: e5943018 ldr r3, [r4, #24] a000656c: e1500003 cmp r0, r3 a0006570: 9a00001f bls a00065f4 <_TOD_Validate+0xac> (the_tod->ticks >= ticks_per_second) || a0006574: e5943014 ldr r3, [r4, #20] a0006578: e353003b cmp r3, #59 ; 0x3b a000657c: 8a00001c bhi a00065f4 <_TOD_Validate+0xac> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || a0006580: e5943010 ldr r3, [r4, #16] a0006584: e353003b cmp r3, #59 ; 0x3b a0006588: 8a000019 bhi a00065f4 <_TOD_Validate+0xac> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || a000658c: e594300c ldr r3, [r4, #12] a0006590: e3530017 cmp r3, #23 a0006594: 8a000016 bhi a00065f4 <_TOD_Validate+0xac> (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || a0006598: 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) || a000659c: e3500000 cmp r0, #0 a00065a0: 0a000016 beq a0006600 <_TOD_Validate+0xb8> (the_tod->month == 0) || a00065a4: e350000c cmp r0, #12 a00065a8: 8a000011 bhi a00065f4 <_TOD_Validate+0xac> (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || a00065ac: e5942000 ldr r2, [r4] (the_tod->ticks >= ticks_per_second) || (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || a00065b0: e3a03d1f mov r3, #1984 ; 0x7c0 a00065b4: e2833003 add r3, r3, #3 a00065b8: e1520003 cmp r2, r3 a00065bc: 9a00000c bls a00065f4 <_TOD_Validate+0xac> (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) a00065c0: 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) || a00065c4: e3540000 cmp r4, #0 a00065c8: 0a00000b beq a00065fc <_TOD_Validate+0xb4> (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) a00065cc: e3120003 tst r2, #3 days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; a00065d0: 059f3038 ldreq r3, [pc, #56] ; a0006610 <_TOD_Validate+0xc8> else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; a00065d4: 159f3034 ldrne r3, [pc, #52] ; a0006610 <_TOD_Validate+0xc8> (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 ]; a00065d8: 0280000d addeq r0, r0, #13 a00065dc: 07930100 ldreq r0, [r3, r0, lsl #2] else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; a00065e0: 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( a00065e4: e1500004 cmp r0, r4 a00065e8: 33a00000 movcc r0, #0 a00065ec: 23a00001 movcs r0, #1 a00065f0: 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; a00065f4: e3a00000 mov r0, #0 a00065f8: e8bd8010 pop {r4, pc} a00065fc: e1a00004 mov r0, r4 <== NOT EXECUTED if ( the_tod->day > days_in_month ) return false; return true; } a0006600: e8bd8010 pop {r4, pc} <== NOT EXECUTED (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; a0006604: e1a00004 mov r0, r4 <== NOT EXECUTED a0006608: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== a0007f04 <_Thread_queue_Enqueue_priority>: Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; a0007f04: 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 ) { a0007f08: e92d07f0 push {r4, r5, r6, r7, r8, r9, sl} RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); a0007f0c: e281403c add r4, r1, #60 ; 0x3c */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); a0007f10: e281c038 add ip, r1, #56 ; 0x38 Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; a0007f14: 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 ) ) a0007f18: e3130020 tst r3, #32 head->previous = NULL; a0007f1c: e3a04000 mov r4, #0 tail->previous = head; a0007f20: e581c040 str ip, [r1, #64] ; 0x40 { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; a0007f24: e581403c str r4, [r1, #60] ; 0x3c RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number ( Priority_Control the_priority ) { return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER); a0007f28: e1a0c323 lsr ip, 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; a0007f2c: e5905038 ldr r5, [r0, #56] ; 0x38 if ( _Thread_queue_Is_reverse_search( priority ) ) a0007f30: 0a00001f beq a0007fb4 <_Thread_queue_Enqueue_priority+0xb0> * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } a0007f34: e3a0a00c mov sl, #12 a0007f38: e59f917c ldr r9, [pc, #380] ; a00080bc <_Thread_queue_Enqueue_priority+0x1b8> a0007f3c: e02a0a9c mla sl, ip, sl, r0 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; a0007f40: e5d94000 ldrb r4, [r9] a0007f44: e2844001 add r4, r4, #1 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a0007f48: e10f7000 mrs r7, CPSR a0007f4c: e387c080 orr ip, r7, #128 ; 0x80 a0007f50: e129f00c msr CPSR_fc, ip a0007f54: e1a08007 mov r8, r7 * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } a0007f58: e59ac008 ldr ip, [sl, #8] restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) _Chain_Last( header ); while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { a0007f5c: e15c000a cmp ip, sl a0007f60: 1a000009 bne a0007f8c <_Thread_queue_Enqueue_priority+0x88> a0007f64: ea00000b b a0007f98 <_Thread_queue_Enqueue_priority+0x94> static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile ( a0007f68: e10f6000 mrs r6, CPSR a0007f6c: e129f007 msr CPSR_fc, r7 a0007f70: 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); a0007f74: 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) ) { a0007f78: e1150006 tst r5, r6 a0007f7c: 0a000034 beq a0008054 <_Thread_queue_Enqueue_priority+0x150> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) search_thread->Object.Node.previous; a0007f80: e59cc004 ldr ip, [ip, #4] restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) _Chain_Last( header ); while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { a0007f84: e15c000a cmp ip, sl a0007f88: 0a000002 beq a0007f98 <_Thread_queue_Enqueue_priority+0x94> search_priority = search_thread->current_priority; a0007f8c: e59c4014 ldr r4, [ip, #20] if ( priority >= search_priority ) a0007f90: e1530004 cmp r3, r4 a0007f94: 3afffff3 bcc a0007f68 <_Thread_queue_Enqueue_priority+0x64> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != a0007f98: e5905030 ldr r5, [r0, #48] ; 0x30 a0007f9c: e3550001 cmp r5, #1 a0007fa0: 0a00002f beq a0008064 <_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; a0007fa4: e5828000 str r8, [r2] return the_thread_queue->sync_state; } a0007fa8: e1a00005 mov r0, r5 a0007fac: e8bd07f0 pop {r4, r5, r6, r7, r8, r9, sl} a0007fb0: e12fff1e bx lr a0007fb4: e3a0900c mov r9, #12 a0007fb8: e00c0c99 mul ip, r9, ip RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Tail(the_chain)); a0007fbc: e28ca004 add sl, ip, #4 a0007fc0: e080900c add r9, r0, ip a0007fc4: e080a00a add sl, r0, sl static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a0007fc8: e10f7000 mrs r7, CPSR a0007fcc: e387c080 orr ip, r7, #128 ; 0x80 a0007fd0: e129f00c msr CPSR_fc, ip a0007fd4: e1a08007 mov r8, r7 a0007fd8: e599c000 ldr ip, [r9] restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) _Chain_First( header ); while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { a0007fdc: e15c000a cmp ip, sl a0007fe0: 1a000009 bne a000800c <_Thread_queue_Enqueue_priority+0x108> a0007fe4: ea000032 b a00080b4 <_Thread_queue_Enqueue_priority+0x1b0> static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile ( a0007fe8: e10f6000 mrs r6, CPSR a0007fec: e129f007 msr CPSR_fc, r7 a0007ff0: e129f006 msr CPSR_fc, r6 a0007ff4: 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) ) { a0007ff8: e1150006 tst r5, r6 a0007ffc: 0a000016 beq a000805c <_Thread_queue_Enqueue_priority+0x158> _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; a0008000: e59cc000 ldr ip, [ip] restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) _Chain_First( header ); while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { a0008004: e15c000a cmp ip, sl a0008008: 0a000002 beq a0008018 <_Thread_queue_Enqueue_priority+0x114> search_priority = search_thread->current_priority; a000800c: e59c4014 ldr r4, [ip, #20] if ( priority <= search_priority ) a0008010: e1530004 cmp r3, r4 a0008014: 8afffff3 bhi a0007fe8 <_Thread_queue_Enqueue_priority+0xe4> } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != a0008018: e5905030 ldr r5, [r0, #48] ; 0x30 a000801c: e3550001 cmp r5, #1 a0008020: 1affffdf bne a0007fa4 <_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 ) a0008024: 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; a0008028: e3a03000 mov r3, #0 a000802c: e5803030 str r3, [r0, #48] ; 0x30 if ( priority == search_priority ) a0008030: 0a000016 beq a0008090 <_Thread_queue_Enqueue_priority+0x18c> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; a0008034: e59c3004 ldr r3, [ip, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; a0008038: e581c000 str ip, [r1] the_node->previous = previous_node; a000803c: e5813004 str r3, [r1, #4] previous_node->next = the_node; a0008040: e5831000 str r1, [r3] search_node->previous = the_node; a0008044: e58c1004 str r1, [ip, #4] the_thread->Wait.queue = the_thread_queue; a0008048: e5810044 str r0, [r1, #68] ; 0x44 static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a000804c: e129f007 msr CPSR_fc, r7 _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; a0008050: eaffffd4 b a0007fa8 <_Thread_queue_Enqueue_priority+0xa4> a0008054: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED a0008058: eaffffb8 b a0007f40 <_Thread_queue_Enqueue_priority+0x3c> <== NOT EXECUTED a000805c: e129f007 msr CPSR_fc, r7 a0008060: eaffffd8 b a0007fc8 <_Thread_queue_Enqueue_priority+0xc4> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) a0008064: 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; a0008068: e3a03000 mov r3, #0 a000806c: e5803030 str r3, [r0, #48] ; 0x30 if ( priority == search_priority ) a0008070: 0a000006 beq a0008090 <_Thread_queue_Enqueue_priority+0x18c> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; a0008074: e59c3000 ldr r3, [ip] the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; a0008078: e8811008 stm r1, {r3, ip} search_node->next = the_node; next_node->previous = the_node; a000807c: 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; a0008080: e58c1000 str r1, [ip] next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; a0008084: e5810044 str r0, [r1, #68] ; 0x44 a0008088: e129f007 msr CPSR_fc, r7 _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; a000808c: eaffffc5 b a0007fa8 <_Thread_queue_Enqueue_priority+0xa4> equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; a0008090: e59c3040 ldr r3, [ip, #64] ; 0x40 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); a0008094: e28c203c add r2, ip, #60 ; 0x3c previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; a0008098: e881000c stm r1, {r2, r3} the_node->previous = previous_node; previous_node->next = the_node; a000809c: e5831000 str r1, [r3] search_node->previous = the_node; a00080a0: e58c1040 str r1, [ip, #64] ; 0x40 the_thread->Wait.queue = the_thread_queue; a00080a4: e5810044 str r0, [r1, #68] ; 0x44 a00080a8: e129f008 msr CPSR_fc, r8 _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; a00080ac: e3a05001 mov r5, #1 a00080b0: eaffffbc b a0007fa8 <_Thread_queue_Enqueue_priority+0xa4> if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; a00080b4: e3e04000 mvn r4, #0 a00080b8: eaffffd6 b a0008018 <_Thread_queue_Enqueue_priority+0x114> =============================================================================== a0008754 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { a0008754: e92d40f0 push {r4, r5, r6, r7, lr} return false; } } return true; } a0008758: e59f504c ldr r5, [pc, #76] ; a00087ac <_User_extensions_Thread_create+0x58> #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { a000875c: e1a06000 mov r6, r0 return false; } } return true; } a0008760: e4954004 ldr r4, [r5], #4 { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); a0008764: e1540005 cmp r4, r5 a0008768: 0a00000d beq a00087a4 <_User_extensions_Thread_create+0x50> 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)( a000876c: e59f703c ldr r7, [pc, #60] ; a00087b0 <_User_extensions_Thread_create+0x5c> !_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 ) { a0008770: e5943014 ldr r3, [r4, #20] status = (*the_extension->Callouts.thread_create)( a0008774: 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 ) { a0008778: e3530000 cmp r3, #0 a000877c: 0a000003 beq a0008790 <_User_extensions_Thread_create+0x3c> status = (*the_extension->Callouts.thread_create)( a0008780: e5970004 ldr r0, [r7, #4] a0008784: e12fff33 blx r3 _Thread_Executing, the_thread ); if ( !status ) a0008788: e3500000 cmp r0, #0 a000878c: 0a000005 beq a00087a8 <_User_extensions_Thread_create+0x54> User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { a0008790: e5944000 ldr r4, [r4] { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); a0008794: e1540005 cmp r4, r5 a0008798: 1afffff4 bne a0008770 <_User_extensions_Thread_create+0x1c> if ( !status ) return false; } } return true; a000879c: e3a00001 mov r0, #1 a00087a0: e8bd80f0 pop {r4, r5, r6, r7, pc} a00087a4: e3a00001 mov r0, #1 <== NOT EXECUTED } a00087a8: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== a000a5c0 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { a000a5c0: e92d41f0 push {r4, r5, r6, r7, r8, lr} a000a5c4: e1a04000 mov r4, r0 a000a5c8: e1a05002 mov r5, r2 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a000a5cc: e10f3000 mrs r3, CPSR a000a5d0: e3832080 orr r2, r3, #128 ; 0x80 a000a5d4: e129f002 msr CPSR_fc, r2 } } _ISR_Enable( level ); } a000a5d8: e1a07000 mov r7, r0 a000a5dc: 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 ) ) { a000a5e0: e1520007 cmp r2, r7 a000a5e4: 0a000018 beq a000a64c <_Watchdog_Adjust+0x8c> switch ( direction ) { a000a5e8: e3510000 cmp r1, #0 a000a5ec: 1a000018 bne a000a654 <_Watchdog_Adjust+0x94> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { a000a5f0: e3550000 cmp r5, #0 a000a5f4: 0a000014 beq a000a64c <_Watchdog_Adjust+0x8c> if ( units < _Watchdog_First( header )->delta_interval ) { a000a5f8: e5926010 ldr r6, [r2, #16] a000a5fc: e1550006 cmp r5, r6 _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; a000a600: 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 ) { a000a604: 2a000005 bcs a000a620 <_Watchdog_Adjust+0x60> a000a608: ea000018 b a000a670 <_Watchdog_Adjust+0xb0> <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { a000a60c: e0555006 subs r5, r5, r6 a000a610: 0a00000d beq a000a64c <_Watchdog_Adjust+0x8c> if ( units < _Watchdog_First( header )->delta_interval ) { a000a614: e5926010 ldr r6, [r2, #16] a000a618: e1560005 cmp r6, r5 a000a61c: 8a000013 bhi a000a670 <_Watchdog_Adjust+0xb0> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; a000a620: e5828010 str r8, [r2, #16] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a000a624: e129f003 msr CPSR_fc, r3 _ISR_Enable( level ); _Watchdog_Tickle( header ); a000a628: e1a00004 mov r0, r4 a000a62c: eb0000aa bl a000a8dc <_Watchdog_Tickle> static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a000a630: e10f3000 mrs r3, CPSR a000a634: e3832080 orr r2, r3, #128 ; 0x80 a000a638: e129f002 msr CPSR_fc, r2 } } _ISR_Enable( level ); } a000a63c: e5941000 ldr r1, [r4] _Watchdog_Tickle( header ); _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) a000a640: e1570001 cmp r7, r1 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) _Chain_First( header ) ); a000a644: e1a02001 mov r2, r1 a000a648: 1affffef bne a000a60c <_Watchdog_Adjust+0x4c> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a000a64c: e129f003 msr CPSR_fc, r3 } } _ISR_Enable( level ); } a000a650: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { a000a654: e3510001 cmp r1, #1 a000a658: 1afffffb bne a000a64c <_Watchdog_Adjust+0x8c> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; a000a65c: e5921010 ldr r1, [r2, #16] a000a660: e0815005 add r5, r1, r5 a000a664: e5825010 str r5, [r2, #16] a000a668: e129f003 msr CPSR_fc, r3 } } _ISR_Enable( level ); } a000a66c: 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; a000a670: e0655006 rsb r5, r5, r6 a000a674: e5825010 str r5, [r2, #16] break; a000a678: eafffff3 b a000a64c <_Watchdog_Adjust+0x8c> =============================================================================== a0006558 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { a0006558: 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 ); a000655c: e1a00001 mov r0, r1 int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { a0006560: e24dd048 sub sp, sp, #72 ; 0x48 a0006564: e1a05001 mov r5, r1 a0006568: 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 ); a000656c: ebfffa1c bl a0004de4 if ( old_parent_pathlen == 0 ) a0006570: e2507000 subs r7, r0, #0 a0006574: 1a00005a bne a00066e4 <_rename_r+0x18c> rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); a0006578: e28d4018 add r4, sp, #24 a000657c: e1a00005 mov r0, r5 a0006580: e28d1044 add r1, sp, #68 ; 0x44 a0006584: e1a02004 mov r2, r4 a0006588: eb0000eb bl a000693c 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; a000658c: e1a08007 mov r8, r7 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; a0006590: e28dc02c add ip, sp, #44 ; 0x2c a0006594: e1a0e004 mov lr, r4 a0006598: e8be000f ldm lr!, {r0, r1, r2, r3} a000659c: e8ac000f stmia ip!, {r0, r1, r2, r3} a00065a0: e59e3000 ldr r3, [lr] name = old + old_parent_pathlen; a00065a4: e0855007 add r5, r5, r7 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); a00065a8: e1a00005 mov r0, r5 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; a00065ac: e58c3000 str r3, [ip] name = old + old_parent_pathlen; a00065b0: e58d5040 str r5, [sp, #64] ; 0x40 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); a00065b4: eb0039d9 bl a0014d20 a00065b8: e1a01000 mov r1, r0 a00065bc: e1a00005 mov r0, r5 a00065c0: ebfffa16 bl a0004e20 a00065c4: e0855000 add r5, r5, r0 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), a00065c8: 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 ) ); a00065cc: e58d5040 str r5, [sp, #64] ; 0x40 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), a00065d0: eb0039d2 bl a0014d20 a00065d4: e28d702c add r7, sp, #44 ; 0x2c a00065d8: e1a01000 mov r1, r0 a00065dc: e3a02000 mov r2, #0 a00065e0: e1a00005 mov r0, r5 a00065e4: e1a03007 mov r3, r7 a00065e8: e58d2000 str r2, [sp] a00065ec: ebfff9ca bl a0004d1c 0, &old_loc, false ); if ( result != 0 ) { a00065f0: e3500000 cmp r0, #0 a00065f4: 1a000032 bne a00066c4 <_rename_r+0x16c> /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); a00065f8: e28d5004 add r5, sp, #4 a00065fc: e1a00006 mov r0, r6 a0006600: e1a02005 mov r2, r5 a0006604: e28d1044 add r1, sp, #68 ; 0x44 a0006608: eb0000cb bl a000693c result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); a000660c: e59d3010 ldr r3, [sp, #16] a0006610: e59d0044 ldr r0, [sp, #68] ; 0x44 a0006614: e1a01005 mov r1, r5 a0006618: e5933004 ldr r3, [r3, #4] a000661c: e0860000 add r0, r6, r0 a0006620: e28d2040 add r2, sp, #64 ; 0x40 a0006624: e12fff33 blx r3 if ( result != 0 ) { a0006628: e3500000 cmp r0, #0 a000662c: 1a000038 bne a0006714 <_rename_r+0x1bc> /* * 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 ) { a0006630: e59d3014 ldr r3, [sp, #20] a0006634: e59d2028 ldr r2, [sp, #40] ; 0x28 a0006638: e1520003 cmp r2, r3 a000663c: 1a000013 bne a0006690 <_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 ); a0006640: e59d3010 ldr r3, [sp, #16] a0006644: e1a01007 mov r1, r7 a0006648: e1a02005 mov r2, r5 a000664c: e593c040 ldr ip, [r3, #64] ; 0x40 a0006650: e1a00004 mov r0, r4 a0006654: e59d3040 ldr r3, [sp, #64] ; 0x40 a0006658: e12fff3c blx ip a000665c: e1a06000 mov r6, r0 rtems_filesystem_freenode( &new_parent_loc ); a0006660: e1a00005 mov r0, r5 a0006664: ebfffa81 bl a0005070 if ( free_old_parentloc ) a0006668: e3580000 cmp r8, #0 a000666c: 1a000004 bne a0006684 <_rename_r+0x12c> rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); a0006670: e1a00007 mov r0, r7 a0006674: ebfffa7d bl a0005070 return result; } a0006678: e1a00006 mov r0, r6 a000667c: e28dd048 add sp, sp, #72 ; 0x48 a0006680: 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 ); a0006684: e1a00004 mov r0, r4 a0006688: ebfffa78 bl a0005070 a000668c: eafffff7 b a0006670 <_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 ); a0006690: e1a00005 mov r0, r5 a0006694: ebfffa75 bl a0005070 if ( free_old_parentloc ) a0006698: e3580000 cmp r8, #0 a000669c: 0a000001 beq a00066a8 <_rename_r+0x150> rtems_filesystem_freenode( &old_parent_loc ); a00066a0: e1a00004 mov r0, r4 a00066a4: ebfffa71 bl a0005070 rtems_filesystem_freenode( &old_loc ); a00066a8: e1a00007 mov r0, r7 a00066ac: ebfffa6f bl a0005070 rtems_set_errno_and_return_minus_one( EXDEV ); a00066b0: eb002c97 bl a0011914 <__errno> a00066b4: e3a03012 mov r3, #18 a00066b8: e5803000 str r3, [r0] a00066bc: e3e06000 mvn r6, #0 a00066c0: eaffffec b a0006678 <_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 ) a00066c4: e3580000 cmp r8, #0 a00066c8: 1a000001 bne a00066d4 <_rename_r+0x17c> rtems_filesystem_freenode( &old_parent_loc ); return -1; a00066cc: e3e06000 mvn r6, #0 a00066d0: eaffffe8 b a0006678 <_rename_r+0x120> 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 ); a00066d4: e1a00004 mov r0, r4 a00066d8: ebfffa64 bl a0005070 return -1; a00066dc: e3e06000 mvn r6, #0 a00066e0: eaffffe4 b a0006678 <_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, a00066e4: e3a03000 mov r3, #0 a00066e8: e28d4018 add r4, sp, #24 a00066ec: e58d3000 str r3, [sp] a00066f0: e3a02002 mov r2, #2 a00066f4: e1a00005 mov r0, r5 a00066f8: e1a01007 mov r1, r7 a00066fc: e1a03004 mov r3, r4 a0006700: ebfff9a1 bl a0004d8c RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) a0006704: e3500000 cmp r0, #0 a0006708: 1affffef bne a00066cc <_rename_r+0x174> return -1; free_old_parentloc = true; a000670c: e3a08001 mov r8, #1 a0006710: eaffff9e b a0006590 <_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 ); a0006714: e1a00005 mov r0, r5 a0006718: ebfffa54 bl a0005070 if ( free_old_parentloc ) a000671c: e3580000 cmp r8, #0 a0006720: 0a000001 beq a000672c <_rename_r+0x1d4> rtems_filesystem_freenode( &old_parent_loc ); a0006724: e1a00004 mov r0, r4 a0006728: ebfffa50 bl a0005070 rtems_filesystem_freenode( &old_loc ); a000672c: e1a00007 mov r0, r7 a0006730: ebfffa4e bl a0005070 return -1; a0006734: e3e06000 mvn r6, #0 a0006738: eaffffce b a0006678 <_rename_r+0x120> =============================================================================== a0005ff0 : * operation(s) cannot be canceled */ int aio_cancel(int fildes, struct aiocb *aiocbp) { a0005ff0: e92d40f0 push {r4, r5, r6, r7, lr} rtems_aio_request_chain *r_chain; int result; pthread_mutex_lock (&aio_request_queue.mutex); a0005ff4: e59f41b4 ldr r4, [pc, #436] ; a00061b0 * operation(s) cannot be canceled */ int aio_cancel(int fildes, struct aiocb *aiocbp) { a0005ff8: e1a05001 mov r5, r1 a0005ffc: e1a07000 mov r7, r0 rtems_aio_request_chain *r_chain; int result; pthread_mutex_lock (&aio_request_queue.mutex); a0006000: e1a00004 mov r0, r4 a0006004: eb00044a bl a0007134 if (aiocbp == NULL) a0006008: e3550000 cmp r5, #0 a000600c: 0a00002d beq a00060c8 pthread_mutex_unlock (&aio_request_queue.mutex); return AIO_CANCELED; } else { if (aiocbp->aio_fildes != fildes) { a0006010: e5956000 ldr r6, [r5] a0006014: e1560007 cmp r6, r7 a0006018: 1a000023 bne a00060ac pthread_mutex_unlock (&aio_request_queue.mutex); rtems_set_errno_and_return_minus_one (EINVAL); } r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, a000601c: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED a0006020: e1a01006 mov r1, r6 <== NOT EXECUTED a0006024: e3a02000 mov r2, #0 <== NOT EXECUTED a0006028: eb0000c2 bl a0006338 <== NOT EXECUTED fildes, 0); if (r_chain == NULL) a000602c: e2507000 subs r7, r0, #0 <== NOT EXECUTED a0006030: 0a00000c beq a0006068 <== NOT EXECUTED pthread_mutex_unlock (&aio_request_queue.mutex); return result; } pthread_mutex_lock (&r_chain->mutex); a0006034: e287401c add r4, r7, #28 <== NOT EXECUTED a0006038: e1a00004 mov r0, r4 <== NOT EXECUTED a000603c: eb00043c bl a0007134 <== NOT EXECUTED result = rtems_aio_remove_req (&r_chain->next_fd, aiocbp); a0006040: e1a01005 mov r1, r5 <== NOT EXECUTED a0006044: e1a00007 mov r0, r7 <== NOT EXECUTED a0006048: eb0001be bl a0006748 <== NOT EXECUTED a000604c: e1a05000 mov r5, r0 <== NOT EXECUTED pthread_mutex_unlock (&r_chain->mutex); a0006050: e1a00004 mov r0, r4 <== NOT EXECUTED a0006054: eb000457 bl a00071b8 <== NOT EXECUTED pthread_mutex_unlock (&aio_request_queue.mutex); a0006058: e59f0150 ldr r0, [pc, #336] ; a00061b0 <== NOT EXECUTED a000605c: eb000455 bl a00071b8 <== NOT EXECUTED return result; } return AIO_ALLDONE; } a0006060: e1a00005 mov r0, r5 a0006064: e8bd80f0 pop {r4, r5, r6, r7, pc} r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); if (r_chain == NULL) if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) a0006068: e5942054 ldr r2, [r4, #84] ; 0x54 a000606c: e2843058 add r3, r4, #88 ; 0x58 <== NOT EXECUTED a0006070: e1520003 cmp r2, r3 <== NOT EXECUTED a0006074: 0affffee beq a0006034 <== NOT EXECUTED { r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, a0006078: e2840054 add r0, r4, #84 ; 0x54 <== NOT EXECUTED a000607c: e1a01006 mov r1, r6 <== NOT EXECUTED a0006080: e1a02007 mov r2, r7 <== NOT EXECUTED a0006084: eb0000ab bl a0006338 <== NOT EXECUTED fildes, 0); if (r_chain == NULL) a0006088: e3500000 cmp r0, #0 <== NOT EXECUTED a000608c: 0a000006 beq a00060ac <== NOT EXECUTED { pthread_mutex_unlock (&aio_request_queue.mutex); rtems_set_errno_and_return_minus_one (EINVAL); } result = rtems_aio_remove_req (&r_chain->next_fd, aiocbp); a0006090: e1a01005 mov r1, r5 <== NOT EXECUTED a0006094: eb0001ab bl a0006748 <== NOT EXECUTED a0006098: e1a05000 mov r5, r0 <== NOT EXECUTED pthread_mutex_unlock (&aio_request_queue.mutex); a000609c: e1a00004 mov r0, r4 <== NOT EXECUTED a00060a0: eb000444 bl a00071b8 <== NOT EXECUTED return result; } return AIO_ALLDONE; } a00060a4: e1a00005 mov r0, r5 <== NOT EXECUTED a00060a8: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0); if (r_chain == NULL) { pthread_mutex_unlock (&aio_request_queue.mutex); a00060ac: e1a00004 mov r0, r4 a00060b0: eb000440 bl a00071b8 rtems_set_errno_and_return_minus_one (EINVAL); a00060b4: eb0029b5 bl a0010790 <__errno> a00060b8: e3a03016 mov r3, #22 a00060bc: e5803000 str r3, [r0] a00060c0: e3e05000 mvn r5, #0 a00060c4: eaffffe5 b a0006060 pthread_mutex_lock (&aio_request_queue.mutex); if (aiocbp == NULL) { if (fcntl (fildes, F_GETFL) < 0) { a00060c8: e1a00007 mov r0, r7 a00060cc: e3a01003 mov r1, #3 a00060d0: eb001b7b bl a000cec4 a00060d4: e3500000 cmp r0, #0 a00060d8: ba00002d blt a0006194 pthread_mutex_unlock(&aio_request_queue.mutex); rtems_set_errno_and_return_minus_one (EBADF); } r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, a00060dc: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED a00060e0: e1a01007 mov r1, r7 <== NOT EXECUTED a00060e4: e1a02005 mov r2, r5 <== NOT EXECUTED a00060e8: eb000092 bl a0006338 <== NOT EXECUTED fildes, 0); if (r_chain == NULL) a00060ec: e2506000 subs r6, r0, #0 <== NOT EXECUTED a00060f0: 0a00000b beq a0006124 <== NOT EXECUTED pthread_mutex_unlock (&aio_request_queue.mutex); return AIO_ALLDONE; } pthread_mutex_lock (&r_chain->mutex); a00060f4: e286701c add r7, r6, #28 <== NOT EXECUTED a00060f8: e1a00007 mov r0, r7 <== NOT EXECUTED a00060fc: eb00040c bl a0007134 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); a0006100: e1a00006 mov r0, r6 <== NOT EXECUTED a0006104: eb000a75 bl a0008ae0 <_Chain_Extract> <== NOT EXECUTED rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); a0006108: e1a00006 mov r0, r6 <== NOT EXECUTED a000610c: eb000176 bl a00066ec <== NOT EXECUTED pthread_mutex_unlock (&r_chain->mutex); a0006110: e1a00007 mov r0, r7 <== NOT EXECUTED a0006114: eb000427 bl a00071b8 <== NOT EXECUTED pthread_mutex_unlock (&aio_request_queue.mutex); a0006118: e1a00004 mov r0, r4 <== NOT EXECUTED a000611c: eb000425 bl a00071b8 <== NOT EXECUTED return AIO_CANCELED; a0006120: eaffffce b a0006060 <== NOT EXECUTED r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); if (r_chain == NULL) { if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) a0006124: e5942054 ldr r2, [r4, #84] ; 0x54 <== NOT EXECUTED a0006128: e2843058 add r3, r4, #88 ; 0x58 <== NOT EXECUTED a000612c: e1520003 cmp r2, r3 <== NOT EXECUTED a0006130: 0a000013 beq a0006184 <== NOT EXECUTED { r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, a0006134: e2840054 add r0, r4, #84 ; 0x54 <== NOT EXECUTED a0006138: e1a01007 mov r1, r7 <== NOT EXECUTED a000613c: e1a02006 mov r2, r6 <== NOT EXECUTED a0006140: eb00007c bl a0006338 <== NOT EXECUTED fildes, 0); if (r_chain == NULL) { a0006144: e2505000 subs r5, r0, #0 <== NOT EXECUTED a0006148: 0a00000d beq a0006184 <== NOT EXECUTED return AIO_ALLDONE; } rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); pthread_mutex_destroy (&r_chain->mutex); a000614c: e285701c add r7, r5, #28 <== NOT EXECUTED a0006150: eb000a62 bl a0008ae0 <_Chain_Extract> <== NOT EXECUTED pthread_mutex_unlock(&aio_request_queue.mutex); return AIO_ALLDONE; } rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); a0006154: e1a00005 mov r0, r5 <== NOT EXECUTED a0006158: eb000163 bl a00066ec <== NOT EXECUTED pthread_mutex_destroy (&r_chain->mutex); a000615c: e1a00007 mov r0, r7 <== NOT EXECUTED a0006160: eb00034d bl a0006e9c <== NOT EXECUTED pthread_cond_destroy (&r_chain->mutex); a0006164: e1a00007 mov r0, r7 <== NOT EXECUTED a0006168: eb000273 bl a0006b3c <== NOT EXECUTED free (r_chain); a000616c: e1a00005 mov r0, r5 <== NOT EXECUTED a0006170: ebfff27f bl a0002b74 <== NOT EXECUTED pthread_mutex_unlock (&aio_request_queue.mutex); a0006174: e1a00004 mov r0, r4 <== NOT EXECUTED a0006178: eb00040e bl a00071b8 <== NOT EXECUTED return AIO_CANCELED; a000617c: e1a05006 mov r5, r6 <== NOT EXECUTED a0006180: eaffffb6 b a0006060 <== NOT EXECUTED } pthread_mutex_unlock (&aio_request_queue.mutex); a0006184: e1a00004 mov r0, r4 <== NOT EXECUTED a0006188: eb00040a bl a00071b8 <== NOT EXECUTED return AIO_ALLDONE; a000618c: e3a05002 mov r5, #2 <== NOT EXECUTED a0006190: eaffffb2 b a0006060 <== NOT EXECUTED pthread_mutex_lock (&aio_request_queue.mutex); if (aiocbp == NULL) { if (fcntl (fildes, F_GETFL) < 0) { pthread_mutex_unlock(&aio_request_queue.mutex); a0006194: e1a00004 mov r0, r4 a0006198: eb000406 bl a00071b8 rtems_set_errno_and_return_minus_one (EBADF); a000619c: eb00297b bl a0010790 <__errno> a00061a0: e3a03009 mov r3, #9 a00061a4: e5803000 str r3, [r0] a00061a8: e3e05000 mvn r5, #0 a00061ac: eaffffab b a0006060 =============================================================================== a00061bc : ) { rtems_aio_request *req; int mode; if (op != O_SYNC) a00061bc: e3500a02 cmp r0, #8192 ; 0x2000 int aio_fsync( int op, struct aiocb *aiocbp ) { a00061c0: e92d4030 push {r4, r5, lr} a00061c4: e1a04001 mov r4, r1 rtems_aio_request *req; int mode; if (op != O_SYNC) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); a00061c8: 13a05016 movne r5, #22 ) { rtems_aio_request *req; int mode; if (op != O_SYNC) a00061cc: 1a000011 bne a0006218 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); mode = fcntl (aiocbp->aio_fildes, F_GETFL); a00061d0: e5910000 ldr r0, [r1] a00061d4: e3a01003 mov r1, #3 a00061d8: eb001b39 bl a000cec4 if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) a00061dc: e2000003 and r0, r0, #3 a00061e0: e2400001 sub r0, r0, #1 a00061e4: e3500001 cmp r0, #1 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); a00061e8: 83a05009 movhi r5, #9 if (op != O_SYNC) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) a00061ec: 8a000009 bhi a0006218 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); req = malloc (sizeof (rtems_aio_request)); a00061f0: e3a00018 mov r0, #24 a00061f4: ebfff40c bl a000322c <== NOT EXECUTED if (req == NULL) a00061f8: e2503000 subs r3, r0, #0 <== NOT EXECUTED a00061fc: 0a000004 beq a0006214 <== NOT EXECUTED rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; a0006200: e5834014 str r4, [r3, #20] <== NOT EXECUTED req->aiocbp->aio_lio_opcode = LIO_SYNC; a0006204: e3a03003 mov r3, #3 <== NOT EXECUTED a0006208: e584302c str r3, [r4, #44] ; 0x2c <== NOT EXECUTED return rtems_aio_enqueue (req); } a000620c: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); a0006210: ea000166 b a00067b0 <== NOT EXECUTED if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); a0006214: e3a0500b mov r5, #11 <== NOT EXECUTED a0006218: e3e03000 mvn r3, #0 a000621c: e5845030 str r5, [r4, #48] ; 0x30 a0006220: e5843034 str r3, [r4, #52] ; 0x34 a0006224: eb002959 bl a0010790 <__errno> a0006228: e5805000 str r5, [r0] req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); } a000622c: e3e00000 mvn r0, #0 a0006230: e8bd8030 pop {r4, r5, pc} =============================================================================== a0006994 : * 0 - otherwise */ int aio_read (struct aiocb *aiocbp) { a0006994: e92d4030 push {r4, r5, lr} rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); a0006998: e3a01003 mov r1, #3 * 0 - otherwise */ int aio_read (struct aiocb *aiocbp) { a000699c: e1a04000 mov r4, r0 rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); a00069a0: e5900000 ldr r0, [r0] a00069a4: eb001946 bl a000cec4 if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR))) a00069a8: e2000003 and r0, r0, #3 a00069ac: e3500002 cmp r0, #2 a00069b0: 13500000 cmpne r0, #0 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); a00069b4: 13a05009 movne r5, #9 { rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR))) a00069b8: 1a00000f bne a00069fc rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) a00069bc: e5943014 ldr r3, [r4, #20] a00069c0: e3530000 cmp r3, #0 a00069c4: 1a000013 bne a0006a18 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) a00069c8: e5943008 ldr r3, [r4, #8] a00069cc: e3530000 cmp r3, #0 a00069d0: ba000010 blt a0006a18 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); a00069d4: e3a00018 mov r0, #24 a00069d8: ebfff213 bl a000322c if (req == NULL) a00069dc: e2503000 subs r3, r0, #0 a00069e0: 0a000004 beq a00069f8 rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; a00069e4: e5834014 str r4, [r3, #20] req->aiocbp->aio_lio_opcode = LIO_READ; a00069e8: e3a03001 mov r3, #1 a00069ec: e584302c str r3, [r4, #44] ; 0x2c return rtems_aio_enqueue (req); } a00069f0: e8bd4030 pop {r4, r5, lr} rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); a00069f4: eaffff6d b a00067b0 if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); a00069f8: e3a0500b mov r5, #11 <== NOT EXECUTED a00069fc: e3e03000 mvn r3, #0 a0006a00: e5845030 str r5, [r4, #48] ; 0x30 a0006a04: e5843034 str r3, [r4, #52] ; 0x34 a0006a08: eb002760 bl a0010790 <__errno> a0006a0c: e5805000 str r5, [r0] req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); } a0006a10: e3e00000 mvn r0, #0 a0006a14: e8bd8030 pop {r4, r5, pc} if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); a0006a18: e3a05016 mov r5, #22 a0006a1c: eafffff6 b a00069fc =============================================================================== a0006a28 : * 0 - otherwise */ int aio_write (struct aiocb *aiocbp) { a0006a28: e92d4030 push {r4, r5, lr} rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); a0006a2c: e3a01003 mov r1, #3 * 0 - otherwise */ int aio_write (struct aiocb *aiocbp) { a0006a30: e1a04000 mov r4, r0 rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); a0006a34: e5900000 ldr r0, [r0] a0006a38: eb001921 bl a000cec4 if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) a0006a3c: e2000003 and r0, r0, #3 a0006a40: e2400001 sub r0, r0, #1 a0006a44: e3500001 cmp r0, #1 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); a0006a48: 83a05009 movhi r5, #9 { rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) a0006a4c: 8a00000f bhi a0006a90 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) a0006a50: e5943014 ldr r3, [r4, #20] a0006a54: e3530000 cmp r3, #0 a0006a58: 1a000013 bne a0006aac rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) a0006a5c: e5943008 ldr r3, [r4, #8] a0006a60: e3530000 cmp r3, #0 a0006a64: ba000010 blt a0006aac rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); a0006a68: e3a00018 mov r0, #24 a0006a6c: ebfff1ee bl a000322c if (req == NULL) a0006a70: e2503000 subs r3, r0, #0 a0006a74: 0a000004 beq a0006a8c rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; a0006a78: e5834014 str r4, [r3, #20] req->aiocbp->aio_lio_opcode = LIO_WRITE; a0006a7c: e3a03002 mov r3, #2 a0006a80: e584302c str r3, [r4, #44] ; 0x2c return rtems_aio_enqueue (req); } a0006a84: e8bd4030 pop {r4, r5, lr} rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); a0006a88: eaffff48 b a00067b0 if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); a0006a8c: e3a0500b mov r5, #11 <== NOT EXECUTED a0006a90: e3e03000 mvn r3, #0 a0006a94: e5845030 str r5, [r4, #48] ; 0x30 a0006a98: e5843034 str r3, [r4, #52] ; 0x34 a0006a9c: eb00273b bl a0010790 <__errno> a0006aa0: e5805000 str r5, [r0] req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); } a0006aa4: e3e00000 mvn r0, #0 a0006aa8: e8bd8030 pop {r4, r5, pc} if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); a0006aac: e3a05016 mov r5, #22 a0006ab0: eafffff6 b a0006a90 =============================================================================== a000902c : const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { a000902c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) a0009030: e3d22007 bics r2, r2, #7 const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { a0009034: e24dd004 sub sp, sp, #4 a0009038: e1a0b000 mov fp, r0 a000903c: e1a04001 mov r4, r1 a0009040: e58d3000 str r3, [sp] int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) a0009044: 1a00002d bne a0009100 rtems_set_errno_and_return_minus_one( EPERM ); /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; a0009048: e59d1000 ldr r1, [sp] a000904c: e5917000 ldr r7, [r1] if (!device_name_table) a0009050: e3570000 cmp r7, #0 a0009054: 0a00002e beq a0009114 rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { a0009058: e59f30c8 ldr r3, [pc, #200] ; a0009128 a000905c: e5938000 ldr r8, [r3] a0009060: e3580000 cmp r8, #0 a0009064: 11a09002 movne r9, r2 a0009068: 11a05009 movne r5, r9 if (!device_name_table[i].device_name) a000906c: 13a0a014 movne sl, #20 /* 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++) { a0009070: 0a000010 beq a00090b8 if (!device_name_table[i].device_name) a0009074: e009099a mul r9, sl, r9 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) a0009078: e1a0000b mov r0, fp 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) a000907c: e7976009 ldr r6, [r7, r9] continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) a0009080: e1a02004 mov r2, r4 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) a0009084: e0879009 add r9, r7, r9 a0009088: e2561000 subs r1, r6, #0 a000908c: 0a000005 beq a00090a8 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) a0009090: eb000dff bl a000c894 a0009094: e3500000 cmp r0, #0 a0009098: 1a000002 bne a00090a8 continue; if (device_name_table[i].device_name[pathnamelen] != '\0') a000909c: e7d60004 ldrb r0, [r6, r4] a00090a0: e3500000 cmp r0, #0 a00090a4: 0a000008 beq a00090cc /* 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++) { a00090a8: e2855001 add r5, r5, #1 a00090ac: e1580005 cmp r8, r5 a00090b0: e1a09005 mov r9, r5 a00090b4: 8affffee bhi a0009074 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); a00090b8: eb000a6e bl a000ba78 <__errno> a00090bc: e3a03002 mov r3, #2 a00090c0: e5803000 str r3, [r0] a00090c4: e3e00000 mvn r0, #0 a00090c8: ea00000a b a00090f8 if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; a00090cc: e59d2000 ldr r2, [sp] pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; a00090d0: e59f3054 ldr r3, [pc, #84] ; a000912c 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; a00090d4: e59d1000 ldr r1, [sp] pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; a00090d8: 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]; a00090dc: e5829000 str r9, [r2] pathloc->handlers = &devFS_file_handlers; a00090e0: e59f2048 ldr r2, [pc, #72] ; a0009130 pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; a00090e4: e5933028 ldr r3, [r3, #40] ; 0x28 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; a00090e8: e5812008 str r2, [r1, #8] pathloc->ops = &devFS_ops; a00090ec: e59f2040 ldr r2, [pc, #64] ; a0009134 pathloc->mt_entry = rtems_filesystem_root.mt_entry; a00090f0: e5813010 str r3, [r1, #16] continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; a00090f4: e581200c str r2, [r1, #12] return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); } a00090f8: e28dd004 add sp, sp, #4 a00090fc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) rtems_set_errno_and_return_minus_one( EPERM ); a0009100: eb000a5c bl a000ba78 <__errno> <== NOT EXECUTED a0009104: e3a03001 mov r3, #1 <== NOT EXECUTED a0009108: e5803000 str r3, [r0] <== NOT EXECUTED a000910c: e3e00000 mvn r0, #0 <== NOT EXECUTED a0009110: eafffff8 b a00090f8 <== NOT EXECUTED /* 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 ); a0009114: eb000a57 bl a000ba78 <__errno> a0009118: e3a0300e mov r3, #14 a000911c: e5803000 str r3, [r0] a0009120: e3e00000 mvn r0, #0 a0009124: eafffff3 b a00090f8 =============================================================================== a0002dbc : drainOutput (struct rtems_termios_tty *tty) { rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { a0002dbc: e59030b4 ldr r3, [r0, #180] ; 0xb4 /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { a0002dc0: e92d4030 push {r4, r5, lr} rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { a0002dc4: e3530000 cmp r3, #0 /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { a0002dc8: e1a04000 mov r4, r0 rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { a0002dcc: 0a000017 beq a0002e30 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a0002dd0: e10f3000 mrs r3, CPSR a0002dd4: e3832080 orr r2, r3, #128 ; 0x80 a0002dd8: e129f002 msr CPSR_fc, r2 rtems_interrupt_disable (level); while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { a0002ddc: e5901084 ldr r1, [r0, #132] ; 0x84 a0002de0: e5902080 ldr r2, [r0, #128] ; 0x80 a0002de4: e1510002 cmp r1, r2 a0002de8: 0a00000f beq a0002e2c tty->rawOutBufState = rob_wait; a0002dec: e3a05002 mov r5, #2 <== NOT EXECUTED a0002df0: e5845094 str r5, [r4, #148] ; 0x94 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a0002df4: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain( a0002df8: e3a01000 mov r1, #0 <== NOT EXECUTED a0002dfc: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED a0002e00: e1a02001 mov r2, r1 <== NOT EXECUTED a0002e04: eb0009c0 bl a000550c <== NOT EXECUTED tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) a0002e08: e3500000 cmp r0, #0 <== NOT EXECUTED a0002e0c: 1a000008 bne a0002e34 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a0002e10: e10f3000 mrs r3, CPSR <== NOT EXECUTED a0002e14: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED a0002e18: 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) { a0002e1c: e5941084 ldr r1, [r4, #132] ; 0x84 <== NOT EXECUTED a0002e20: e5942080 ldr r2, [r4, #128] ; 0x80 <== NOT EXECUTED a0002e24: e1510002 cmp r1, r2 <== NOT EXECUTED a0002e28: 1afffff0 bne a0002df0 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a0002e2c: e129f003 msr CPSR_fc, r3 a0002e30: 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); a0002e34: eb000b5c bl a0005bac <== NOT EXECUTED =============================================================================== a0003ba8 : * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) a0003ba8: 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) { a0003bac: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} if (tty->ccount == 0) a0003bb0: 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) { a0003bb4: e1a04000 mov r4, r0 a0003bb8: e1a06001 mov r6, r1 if (tty->ccount == 0) a0003bbc: 0a00000d beq a0003bf8 return; if (lineFlag) { a0003bc0: e3510000 cmp r1, #0 a0003bc4: 0a00000c beq a0003bfc if (!(tty->termios.c_lflag & ECHO)) { a0003bc8: e590103c ldr r1, [r0, #60] ; 0x3c a0003bcc: e2112008 ands r2, r1, #8 a0003bd0: 0a000052 beq a0003d20 tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { a0003bd4: e2110010 ands r0, r1, #16 a0003bd8: 1a000009 bne a0003c04 tty->ccount = 0; a0003bdc: e5840020 str r0, [r4, #32] <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); a0003be0: e1a01004 mov r1, r4 <== NOT EXECUTED a0003be4: e5d40044 ldrb r0, [r4, #68] ; 0x44 <== NOT EXECUTED a0003be8: ebffffc9 bl a0003b14 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) a0003bec: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED a0003bf0: e3130020 tst r3, #32 <== NOT EXECUTED a0003bf4: 1a000068 bne a0003d9c <== NOT EXECUTED a0003bf8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} echo ('\n', tty); return; } } while (tty->ccount) { a0003bfc: e590103c ldr r1, [r0, #60] ; 0x3c a0003c00: e2012008 and r2, r1, #8 rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { a0003c04: e59f71a0 ldr r7, [pc, #416] ; a0003dac a0003c08: ea000008 b a0003c30 a0003c0c: e3110c02 tst r1, #512 ; 0x200 <== NOT EXECUTED a0003c10: 1a000049 bne a0003d3c <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) a0003c14: e3560000 cmp r6, #0 a0003c18: 0afffff6 beq a0003bf8 echo ('\n', tty); return; } } while (tty->ccount) { a0003c1c: e5943020 ldr r3, [r4, #32] a0003c20: e3530000 cmp r3, #0 a0003c24: 0a000043 beq a0003d38 } 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); a0003c28: e594103c ldr r1, [r4, #60] ; 0x3c a0003c2c: e2012008 and r2, r1, #8 return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; a0003c30: e594001c ldr r0, [r4, #28] a0003c34: e2433001 sub r3, r3, #1 a0003c38: e5843020 str r3, [r4, #32] if (tty->termios.c_lflag & ECHO) { a0003c3c: e3520000 cmp r2, #0 return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; a0003c40: e7d05003 ldrb r5, [r0, r3] if (tty->termios.c_lflag & ECHO) { a0003c44: 0afffff2 beq a0003c14 if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { a0003c48: e3560000 cmp r6, #0 a0003c4c: 1a000001 bne a0003c58 a0003c50: e3110010 tst r1, #16 a0003c54: 0a000033 beq a0003d28 echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { a0003c58: e3550009 cmp r5, #9 a0003c5c: 0a00000d beq a0003c98 rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { a0003c60: e5973000 ldr r3, [r7] a0003c64: e2855001 add r5, r5, #1 a0003c68: e7d33005 ldrb r3, [r3, r5] a0003c6c: e3130020 tst r3, #32 a0003c70: 1affffe5 bne a0003c0c 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); a0003c74: e59f0134 ldr r0, [pc, #308] ; a0003db0 a0003c78: e3a01003 mov r1, #3 a0003c7c: e1a02004 mov r2, r4 a0003c80: ebffff01 bl a000388c if (tty->column) a0003c84: e5943028 ldr r3, [r4, #40] ; 0x28 a0003c88: e3530000 cmp r3, #0 tty->column--; a0003c8c: 12433001 subne r3, r3, #1 a0003c90: 15843028 strne r3, [r4, #40] ; 0x28 a0003c94: eaffffde b a0003c14 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { a0003c98: 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; a0003c9c: e594502c ldr r5, [r4, #44] ; 0x2c int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { a0003ca0: 0a000011 beq a0003cec c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { a0003ca4: 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; a0003ca8: 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) a0003cac: e201ac02 and sl, r1, #512 ; 0x200 /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; a0003cb0: e7d01002 ldrb r1, [r0, r2] a0003cb4: e2822001 add r2, r2, #1 if (c == '\t') { a0003cb8: e3510009 cmp r1, #9 col = (col | 7) + 1; a0003cbc: 03855007 orreq r5, r5, #7 } else if (iscntrl (c)) { a0003cc0: 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; a0003cc4: 02855001 addeq r5, r5, #1 /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { a0003cc8: 0a000005 beq a0003ce4 col = (col | 7) + 1; } else if (iscntrl (c)) { a0003ccc: e5dcc001 ldrb ip, [ip, #1] a0003cd0: e31c0020 tst ip, #32 if (tty->termios.c_lflag & ECHOCTL) col += 2; } else { col++; a0003cd4: 02855001 addeq r5, r5, #1 */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { a0003cd8: 0a000001 beq a0003ce4 if (tty->termios.c_lflag & ECHOCTL) a0003cdc: e35a0000 cmp sl, #0 <== NOT EXECUTED col += 2; a0003ce0: 12855002 addne r5, r5, #2 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { a0003ce4: e1530002 cmp r3, r2 a0003ce8: 1afffff0 bne a0003cb0 } /* * Back up over the tab */ while (tty->column > col) { a0003cec: e5943028 ldr r3, [r4, #40] ; 0x28 a0003cf0: e1550003 cmp r5, r3 a0003cf4: aaffffc6 bge a0003c14 rtems_termios_puts ("\b", 1, tty); a0003cf8: e59f00b4 ldr r0, [pc, #180] ; a0003db4 a0003cfc: e3a01001 mov r1, #1 a0003d00: e1a02004 mov r2, r4 a0003d04: ebfffee0 bl a000388c tty->column--; a0003d08: e5943028 ldr r3, [r4, #40] ; 0x28 a0003d0c: e2433001 sub r3, r3, #1 } /* * Back up over the tab */ while (tty->column > col) { a0003d10: e1530005 cmp r3, r5 rtems_termios_puts ("\b", 1, tty); tty->column--; a0003d14: e5843028 str r3, [r4, #40] ; 0x28 } /* * Back up over the tab */ while (tty->column > col) { a0003d18: cafffff6 bgt a0003cf8 a0003d1c: eaffffbc b a0003c14 { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; a0003d20: e5802020 str r2, [r0, #32] <== NOT EXECUTED return; a0003d24: 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); a0003d28: e5d40043 ldrb r0, [r4, #67] ; 0x43 <== NOT EXECUTED a0003d2c: e1a01004 mov r1, r4 <== NOT EXECUTED } } if (!lineFlag) break; } } a0003d30: 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); a0003d34: eaffff76 b a0003b14 <== NOT EXECUTED a0003d38: 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); a0003d3c: e59f006c ldr r0, [pc, #108] ; a0003db0 <== NOT EXECUTED a0003d40: e3a01003 mov r1, #3 <== NOT EXECUTED a0003d44: e1a02004 mov r2, r4 <== NOT EXECUTED a0003d48: ebfffecf bl a000388c <== NOT EXECUTED if (tty->column) a0003d4c: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED a0003d50: e3530000 cmp r3, #0 <== NOT EXECUTED tty->column--; a0003d54: 12433001 subne r3, r3, #1 <== NOT EXECUTED a0003d58: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { a0003d5c: e5973000 ldr r3, [r7] <== NOT EXECUTED a0003d60: e7d33005 ldrb r3, [r3, r5] <== NOT EXECUTED a0003d64: e3130020 tst r3, #32 <== NOT EXECUTED a0003d68: 0affffc1 beq a0003c74 <== NOT EXECUTED a0003d6c: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED a0003d70: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED a0003d74: 0affffa6 beq a0003c14 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); a0003d78: e59f0030 ldr r0, [pc, #48] ; a0003db0 <== NOT EXECUTED a0003d7c: e3a01003 mov r1, #3 <== NOT EXECUTED a0003d80: e1a02004 mov r2, r4 <== NOT EXECUTED a0003d84: ebfffec0 bl a000388c <== NOT EXECUTED if (tty->column) a0003d88: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED a0003d8c: e3530000 cmp r3, #0 <== NOT EXECUTED tty->column--; a0003d90: 12433001 subne r3, r3, #1 <== NOT EXECUTED a0003d94: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED a0003d98: eaffff9d b a0003c14 <== 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); a0003d9c: e3a0000a mov r0, #10 <== NOT EXECUTED a0003da0: e1a01004 mov r1, r4 <== NOT EXECUTED } } if (!lineFlag) break; } } a0003da4: 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); a0003da8: eaffff59 b a0003b14 <== NOT EXECUTED =============================================================================== a00027d8 : int fcntl( int fd, int cmd, ... ) { a00027d8: e92d000e push {r1, r2, r3} int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); a00027dc: e59f21d8 ldr r2, [pc, #472] ; a00029bc int fcntl( int fd, int cmd, ... ) { a00027e0: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); a00027e4: e5922000 ldr r2, [r2] int fcntl( int fd, int cmd, ... ) { a00027e8: e24dd004 sub sp, sp, #4 int ret; va_list ap; va_start( ap, cmd ); a00027ec: e28d3028 add r3, sp, #40 ; 0x28 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); a00027f0: e1500002 cmp r0, r2 int fcntl( int fd, int cmd, ... ) { a00027f4: e59d4024 ldr r4, [sp, #36] ; 0x24 int ret; va_list ap; va_start( ap, cmd ); a00027f8: e58d3000 str r3, [sp] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); a00027fc: 2a000062 bcs a000298c iop = rtems_libio_iop( fd ); a0002800: e59f61b8 ldr r6, [pc, #440] ; a00029c0 a0002804: e3a05038 mov r5, #56 ; 0x38 a0002808: e5961000 ldr r1, [r6] a000280c: e0251590 mla r5, r0, r5, r1 rtems_libio_check_is_open(iop); a0002810: e595c014 ldr ip, [r5, #20] a0002814: e31c0c01 tst ip, #256 ; 0x100 a0002818: 0a00005b beq a000298c /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { a000281c: e3540009 cmp r4, #9 a0002820: 979ff104 ldrls pc, [pc, r4, lsl #2] a0002824: ea000028 b a00028cc a0002828: a00028dc .word 0xa00028dc a000282c: a0002944 .word 0xa0002944 a0002830: a0002954 .word 0xa0002954 a0002834: a0002974 .word 0xa0002974 a0002838: a0002874 .word 0xa0002874 a000283c: a0002850 .word 0xa0002850 a0002840: a0002850 .word 0xa0002850 a0002844: a0002850 .word 0xa0002850 a0002848: a0002850 .word 0xa0002850 a000284c: a0002850 .word 0xa0002850 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; a0002850: eb0030df bl a000ebd4 <__errno> a0002854: e3a03086 mov r3, #134 ; 0x86 a0002858: 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); a000285c: e3e08000 mvn r8, #0 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } a0002860: e1a00008 mov r0, r8 a0002864: e28dd004 add sp, sp, #4 a0002868: e8bd47f0 pop {r4, r5, r6, r7, r8, r9, sl, lr} a000286c: e28dd00c add sp, sp, #12 a0002870: 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 ) ); a0002874: e5930000 ldr r0, [r3] a0002878: eb00018e bl a0002eb8 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); a000287c: e5952014 ldr r2, [r5, #20] a0002880: e3a03c02 mov r3, #512 ; 0x200 a0002884: e2833001 add r3, r3, #1 a0002888: e3c22c02 bic r2, r2, #512 ; 0x200 a000288c: e0003003 and r3, r0, r3 a0002890: e3c22001 bic r2, r2, #1 a0002894: e1833002 orr r3, r3, r2 a0002898: e5853014 str r3, [r5, #20] rtems_libio_t *iop; rtems_libio_t *diop; int fd2; int flags; int mask; int ret = 0; a000289c: e3a08000 mov r8, #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 ); a00028a0: e5953020 ldr r3, [r5, #32] a00028a4: e1a00004 mov r0, r4 a00028a8: e1a01005 mov r1, r5 a00028ac: e5933030 ldr r3, [r3, #48] ; 0x30 a00028b0: e12fff33 blx r3 if (err) { a00028b4: e2504000 subs r4, r0, #0 a00028b8: 0affffe8 beq a0002860 errno = err; a00028bc: eb0030c4 bl a000ebd4 <__errno> <== NOT EXECUTED ret = -1; a00028c0: e3e08000 mvn r8, #0 <== NOT EXECUTED */ if (ret >= 0) { int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop ); if (err) { errno = err; a00028c4: e5804000 str r4, [r0] <== NOT EXECUTED a00028c8: eaffffe4 b a0002860 <== NOT EXECUTED errno = ENOTSUP; ret = -1; break; default: errno = EINVAL; a00028cc: eb0030c0 bl a000ebd4 <__errno> a00028d0: e3a03016 mov r3, #22 a00028d4: e5803000 str r3, [r0] a00028d8: eaffffdf b a000285c * This switch should contain all the cases from POSIX. */ switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); a00028dc: e5933000 ldr r3, [r3] if ( fd2 ) a00028e0: e3530000 cmp r3, #0 a00028e4: 0a00002d beq a00029a0 diop = rtems_libio_iop( fd2 ); a00028e8: e1520003 cmp r2, r3 a00028ec: 93a08000 movls r8, #0 a00028f0: 91a09008 movls r9, r8 a00028f4: 9a000002 bls a0002904 a00028f8: e3a09038 mov r9, #56 ; 0x38 a00028fc: e0291993 mla r9, r3, r9, r1 a0002900: e1a08009 mov r8, r9 } } diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); a0002904: e0618008 rsb r8, r1, r8 a0002908: e1a081c8 asr r8, r8, #3 break; } } diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; a000290c: e289a018 add sl, r9, #24 ret = (int) (diop - rtems_libio_iops); a0002910: e0886188 add r6, r8, r8, lsl #3 break; } } diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; a0002914: e2857018 add r7, r5, #24 a0002918: e8b7000f ldm r7!, {r0, r1, r2, r3} a000291c: e8aa000f stmia sl!, {r0, r1, r2, r3} ret = (int) (diop - rtems_libio_iops); a0002920: e0866306 add r6, r6, r6, lsl #6 break; } } diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; a0002924: e5973000 ldr r3, [r7] ret = (int) (diop - rtems_libio_iops); a0002928: e0886186 add r6, r8, r6, lsl #3 ret = -1; break; } } diop->flags = iop->flags; a000292c: e589c014 str ip, [r9, #20] diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); a0002930: e0866786 add r6, r6, r6, lsl #15 break; } } diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; a0002934: e58a3000 str r3, [sl] ret = (int) (diop - rtems_libio_iops); a0002938: e0888186 add r8, r8, r6, lsl #3 a000293c: e2688000 rsb r8, r8, #0 a0002940: ea00000e b a0002980 break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); a0002944: e31c0b02 tst ip, #2048 ; 0x800 a0002948: 03a08000 moveq r8, #0 a000294c: 13a08001 movne r8, #1 a0002950: eaffffd2 b a00028a0 * 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 ) ) a0002954: e5938000 ldr r8, [r3] a0002958: e3580000 cmp r8, #0 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; a000295c: 138ccb02 orrne ip, ip, #2048 ; 0x800 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; a0002960: 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; a0002964: 1585c014 strne ip, [r5, #20] rtems_libio_t *iop; rtems_libio_t *diop; int fd2; int flags; int mask; int ret = 0; a0002968: 13a08000 movne r8, #0 */ if ( va_arg( ap, int ) ) iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; a000296c: 0585c014 streq ip, [r5, #20] a0002970: eaffffca b a00028a0 break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); a0002974: e1a0000c mov r0, ip a0002978: eb00015b bl a0002eec a000297c: e1a08000 mov r8, r0 /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { a0002980: e3580000 cmp r8, #0 a0002984: aaffffc5 bge a00028a0 a0002988: eaffffb4 b a0002860 <== NOT EXECUTED int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); a000298c: eb003090 bl a000ebd4 <__errno> a0002990: e3a03009 mov r3, #9 a0002994: e5803000 str r3, [r0] a0002998: e3e08000 mvn r8, #0 a000299c: eaffffaf b a0002860 fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); else { /* allocate a file control block */ diop = rtems_libio_allocate(); a00029a0: eb000164 bl a0002f38 if ( diop == 0 ) { a00029a4: e2509000 subs r9, r0, #0 a00029a8: 0affffab beq a000285c a00029ac: e595c014 ldr ip, [r5, #20] a00029b0: e1a08009 mov r8, r9 a00029b4: e5961000 ldr r1, [r6] a00029b8: eaffffd1 b a0002904 =============================================================================== a000c210 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { a000c210: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} static rtems_status_code pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { a000c214: e59f546c ldr r5, [pc, #1132] ; a000c688 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { a000c218: e24dd00c sub sp, sp, #12 a000c21c: e1a04000 mov r4, r0 static rtems_status_code pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { a000c220: e5958000 ldr r8, [r5] */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { a000c224: e1a06001 mov r6, r1 static rtems_status_code pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { a000c228: e3580000 cmp r8, #0 a000c22c: 0a000024 beq a000c2c4 rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); a000c230: e3a01000 mov r1, #0 a000c234: e1a00008 mov r0, r8 a000c238: e1a02001 mov r2, r1 a000c23c: ebffed80 bl a0007844 } if (sc == RTEMS_SUCCESSFUL) { a000c240: e250a000 subs sl, r0, #0 a000c244: 1a0000e4 bne a000c5dc err = pipe_lock(); if (err) return err; pipe = *pipep; a000c248: e5945000 ldr r5, [r4] if (pipe == NULL) { a000c24c: e3550000 cmp r5, #0 a000c250: 0a00007f beq a000c454 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) a000c254: e3a01000 mov r1, #0 a000c258: e5950028 ldr r0, [r5, #40] ; 0x28 a000c25c: e1a02001 mov r2, r1 a000c260: ebffed77 bl a0007844 err = -EINTR; if (*pipep == NULL) { a000c264: e5943000 ldr r3, [r4] err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) a000c268: e3500000 cmp r0, #0 a000c26c: 01a07000 moveq r7, r0 a000c270: 13e07003 mvnne r7, #3 err = -EINTR; if (*pipep == NULL) { a000c274: e3530000 cmp r3, #0 a000c278: 0a0000c7 beq a000c59c else *pipep = pipe; } out: pipe_unlock(); a000c27c: ebffffa9 bl a000c128 pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) a000c280: e3570000 cmp r7, #0 a000c284: 1a00000b bne a000c2b8 return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { a000c288: e5963014 ldr r3, [r6, #20] int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; a000c28c: e5945000 ldr r5, [r4] switch (LIBIO_ACCMODE(iop)) { a000c290: e2033006 and r3, r3, #6 a000c294: e3530004 cmp r3, #4 a000c298: 0a000015 beq a000c2f4 a000c29c: e3530006 cmp r3, #6 a000c2a0: 0a000057 beq a000c404 a000c2a4: e3530002 cmp r3, #2 a000c2a8: 0a000035 beq a000c384 if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); a000c2ac: e5950028 ldr r0, [r5, #40] ; 0x28 a000c2b0: ebffedac bl a0007968 return 0; a000c2b4: e3a07000 mov r7, #0 out_error: pipe_release(pipep, iop); return err; } a000c2b8: e1a00007 mov r0, r7 a000c2bc: e28dd00c add sp, sp, #12 a000c2c0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, 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 ); a000c2c4: e59f73c0 ldr r7, [pc, #960] ; a000c68c a000c2c8: e1a01008 mov r1, r8 a000c2cc: e1a02008 mov r2, r8 a000c2d0: e5970000 ldr r0, [r7] a000c2d4: ebffed5a bl a0007844 rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { a000c2d8: e5953000 ldr r3, [r5] a000c2dc: e3530000 cmp r3, #0 a000c2e0: 0a0000b2 beq a000c5b0 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); a000c2e4: e5970000 ldr r0, [r7] <== NOT EXECUTED a000c2e8: ebffed9e bl a0007968 <== NOT EXECUTED a000c2ec: e5958000 ldr r8, [r5] <== NOT EXECUTED a000c2f0: eaffffce b a000c230 <== NOT EXECUTED break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; if (pipe->Writers ++ == 0) a000c2f4: e5953014 ldr r3, [r5, #20] } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; a000c2f8: e5951024 ldr r1, [r5, #36] ; 0x24 if (pipe->Writers ++ == 0) a000c2fc: e2832001 add r2, r3, #1 } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; a000c300: e2811001 add r1, r1, #1 if (pipe->Writers ++ == 0) a000c304: e3530000 cmp r3, #0 } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; a000c308: e5851024 str r1, [r5, #36] ; 0x24 if (pipe->Writers ++ == 0) a000c30c: e5852014 str r2, [r5, #20] a000c310: 0a0000b3 beq a000c5e4 PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { a000c314: e5953010 ldr r3, [r5, #16] a000c318: e3530000 cmp r3, #0 a000c31c: 1affffe2 bne a000c2ac a000c320: e5963014 ldr r3, [r6, #20] a000c324: e3130001 tst r3, #1 err = -ENXIO; goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; a000c328: 05957020 ldreq r7, [r5, #32] pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { a000c32c: 0a000007 beq a000c350 a000c330: ea0000c3 b a000c644 err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) a000c334: e5950028 ldr r0, [r5, #40] ; 0x28 a000c338: ebffed41 bl a0007844 a000c33c: e3500000 cmp r0, #0 a000c340: 1a00000a bne a000c370 goto out_error; } while (prevCounter == pipe->readerCounter); a000c344: e5953020 ldr r3, [r5, #32] a000c348: e1530007 cmp r3, r7 a000c34c: 1affffd6 bne a000c2ac if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); a000c350: e5950028 ldr r0, [r5, #40] ; 0x28 a000c354: ebffed83 bl a0007968 if (! PIPE_WRITEWAIT(pipe)) a000c358: e3a01000 mov r1, #0 a000c35c: e5950030 ldr r0, [r5, #48] ; 0x30 a000c360: eb000727 bl a000e004 a000c364: e2501000 subs r1, r0, #0 goto out_error; if (! PIPE_LOCK(pipe)) a000c368: e1a02001 mov r2, r1 if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) a000c36c: 0afffff0 beq a000c334 goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; a000c370: e3e07003 mvn r7, #3 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); a000c374: e1a00004 mov r0, r4 a000c378: e1a01006 mov r1, r6 a000c37c: ebffff6d bl a000c138 return err; a000c380: eaffffcc b a000c2b8 pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) a000c384: e5953010 ldr r3, [r5, #16] return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; a000c388: e5951020 ldr r1, [r5, #32] if (pipe->Readers ++ == 0) a000c38c: e2832001 add r2, r3, #1 return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; a000c390: e2811001 add r1, r1, #1 if (pipe->Readers ++ == 0) a000c394: e3530000 cmp r3, #0 return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; a000c398: e5851020 str r1, [r5, #32] if (pipe->Readers ++ == 0) a000c39c: e5852010 str r2, [r5, #16] a000c3a0: 0a000097 beq a000c604 PIPE_WAKEUPWRITERS(pipe); if (pipe->Writers == 0) { a000c3a4: e5953014 ldr r3, [r5, #20] a000c3a8: e3530000 cmp r3, #0 a000c3ac: 1affffbe bne a000c2ac /* Not an error */ if (LIBIO_NODELAY(iop)) a000c3b0: e5963014 ldr r3, [r6, #20] a000c3b4: e3130001 tst r3, #1 a000c3b8: 1affffbb bne a000c2ac break; prevCounter = pipe->writerCounter; a000c3bc: e5957024 ldr r7, [r5, #36] ; 0x24 a000c3c0: ea000006 b a000c3e0 /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) a000c3c4: e5950028 ldr r0, [r5, #40] ; 0x28 a000c3c8: ebffed1d bl a0007844 a000c3cc: e3500000 cmp r0, #0 a000c3d0: 1affffe6 bne a000c370 goto out_error; } while (prevCounter == pipe->writerCounter); a000c3d4: e5953024 ldr r3, [r5, #36] ; 0x24 a000c3d8: e1530007 cmp r3, r7 a000c3dc: 1affffb2 bne a000c2ac prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); a000c3e0: e5950028 ldr r0, [r5, #40] ; 0x28 a000c3e4: ebffed5f bl a0007968 if (! PIPE_READWAIT(pipe)) a000c3e8: e3a01000 mov r1, #0 a000c3ec: e595002c ldr r0, [r5, #44] ; 0x2c a000c3f0: eb000703 bl a000e004 a000c3f4: e2501000 subs r1, r0, #0 goto out_error; if (! PIPE_LOCK(pipe)) a000c3f8: e1a02001 mov r2, r1 prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) a000c3fc: 0afffff0 beq a000c3c4 a000c400: eaffffda b a000c370 <== NOT EXECUTED } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) a000c404: e5953010 ldr r3, [r5, #16] } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; a000c408: e5951020 ldr r1, [r5, #32] if (pipe->Readers ++ == 0) a000c40c: e2832001 add r2, r3, #1 } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; a000c410: e2811001 add r1, r1, #1 if (pipe->Readers ++ == 0) a000c414: e3530000 cmp r3, #0 } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; a000c418: e5851020 str r1, [r5, #32] if (pipe->Readers ++ == 0) a000c41c: e5852010 str r2, [r5, #16] a000c420: 0a000073 beq a000c5f4 PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; if (pipe->Writers ++ == 0) a000c424: e5953014 ldr r3, [r5, #20] case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; a000c428: e5951024 ldr r1, [r5, #36] ; 0x24 if (pipe->Writers ++ == 0) a000c42c: e2832001 add r2, r3, #1 case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; a000c430: e2811001 add r1, r1, #1 if (pipe->Writers ++ == 0) a000c434: e3530000 cmp r3, #0 case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; a000c438: e5851024 str r1, [r5, #36] ; 0x24 if (pipe->Writers ++ == 0) a000c43c: e5852014 str r2, [r5, #20] a000c440: 1affff99 bne a000c2ac PIPE_WAKEUPREADERS(pipe); a000c444: e595002c ldr r0, [r5, #44] ; 0x2c a000c448: e28d1008 add r1, sp, #8 a000c44c: eb0006d4 bl a000dfa4 a000c450: eaffff95 b a000c2ac { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); a000c454: e3a00034 mov r0, #52 ; 0x34 a000c458: ebffdff1 bl a0004424 if (pipe == NULL) a000c45c: e3500000 cmp r0, #0 { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); a000c460: e1a05000 mov r5, r0 a000c464: e1a08000 mov r8, r0 if (pipe == NULL) a000c468: 0a000081 beq a000c674 return err; memset(pipe, 0, sizeof(pipe_control_t)); a000c46c: e1a02000 mov r2, r0 a000c470: e482a004 str sl, [r2], #4 a000c474: e2822004 add r2, r2, #4 a000c478: e482a004 str sl, [r2], #4 a000c47c: e482a004 str sl, [r2], #4 a000c480: e482a004 str sl, [r2], #4 a000c484: e482a004 str sl, [r2], #4 a000c488: e482a004 str sl, [r2], #4 a000c48c: e482a004 str sl, [r2], #4 a000c490: e482a004 str sl, [r2], #4 a000c494: e482a004 str sl, [r2], #4 a000c498: e482a004 str sl, [r2], #4 a000c49c: e482a004 str sl, [r2], #4 pipe->Size = PIPE_BUF; a000c4a0: 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)); a000c4a4: e582a000 str sl, [r2] pipe->Size = PIPE_BUF; pipe->Buffer = malloc(pipe->Size); a000c4a8: 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; a000c4ac: e5853004 str r3, [r5, #4] pipe->Buffer = malloc(pipe->Size); a000c4b0: ebffdfdb bl a0004424 if (! pipe->Buffer) a000c4b4: 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); a000c4b8: e5850000 str r0, [r5] if (! pipe->Buffer) a000c4bc: 0a00006a beq a000c66c goto err_buf; err = -ENOMEM; if (rtems_barrier_create( rtems_build_name ('P', 'I', 'r', c), a000c4c0: e59f71c8 ldr r7, [pc, #456] ; a000c690 if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( a000c4c4: e1a0100a mov r1, sl a000c4c8: e1a0200a mov r2, sl rtems_build_name ('P', 'I', 'r', c), a000c4cc: e5d70000 ldrb r0, [r7] if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( a000c4d0: e285302c add r3, r5, #44 ; 0x2c a000c4d4: e3800205 orr r0, r0, #1342177280 ; 0x50000000 a000c4d8: e3800849 orr r0, r0, #4784128 ; 0x490000 a000c4dc: e3800c72 orr r0, r0, #29184 ; 0x7200 a000c4e0: eb000651 bl a000de2c a000c4e4: e2501000 subs r1, r0, #0 a000c4e8: 1a00005d bne a000c664 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), a000c4ec: e5d70000 ldrb r0, [r7] 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( a000c4f0: e2853030 add r3, r5, #48 ; 0x30 a000c4f4: e1a02001 mov r2, r1 a000c4f8: e3800205 orr r0, r0, #1342177280 ; 0x50000000 a000c4fc: e3800849 orr r0, r0, #4784128 ; 0x490000 a000c500: e3800c77 orr r0, r0, #30464 ; 0x7700 a000c504: eb000648 bl a000de2c a000c508: e2503000 subs r3, r0, #0 a000c50c: 1a000052 bne a000c65c 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, a000c510: e5d70000 ldrb r0, [r7] 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( a000c514: e285c028 add ip, r5, #40 ; 0x28 a000c518: e3a01001 mov r1, #1 a000c51c: e3800205 orr r0, r0, #1342177280 ; 0x50000000 a000c520: e3800849 orr r0, r0, #4784128 ; 0x490000 a000c524: e3800c73 orr r0, r0, #29440 ; 0x7300 a000c528: e3a02010 mov r2, #16 a000c52c: e58dc000 str ip, [sp] a000c530: ebffec29 bl a00075dc a000c534: e3500000 cmp r0, #0 a000c538: 1a000045 bne a000c654 /* 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 a000c53c: e28d8004 add r8, sp, #4 Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) _Objects_Get( &_Barrier_Information, id, location ); a000c540: e595102c ldr r1, [r5, #44] ; 0x2c a000c544: e1a02008 mov r2, r8 a000c548: e59f0144 ldr r0, [pc, #324] ; a000c694 a000c54c: ebfff2c1 bl a0009058 <_Objects_Get> |= STATES_INTERRUPTIBLE_BY_SIGNAL; a000c550: e590304c ldr r3, [r0, #76] ; 0x4c a000c554: e3833201 orr r3, r3, #268435456 ; 0x10000000 a000c558: e580304c str r3, [r0, #76] ; 0x4c _Thread_Enable_dispatch(); a000c55c: ebfff5ae bl a0009c1c <_Thread_Enable_dispatch> a000c560: e1a02008 mov r2, r8 a000c564: e5951030 ldr r1, [r5, #48] ; 0x30 a000c568: e59f0124 ldr r0, [pc, #292] ; a000c694 a000c56c: ebfff2b9 bl a0009058 <_Objects_Get> _Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state |= STATES_INTERRUPTIBLE_BY_SIGNAL; a000c570: e590304c ldr r3, [r0, #76] ; 0x4c a000c574: e3833201 orr r3, r3, #268435456 ; 0x10000000 a000c578: e580304c str r3, [r0, #76] ; 0x4c _Thread_Enable_dispatch(); a000c57c: ebfff5a6 bl a0009c1c <_Thread_Enable_dispatch> #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') a000c580: e5d73000 ldrb r3, [r7] a000c584: e353007a cmp r3, #122 ; 0x7a a000c588: e2832001 add r2, r3, #1 c = 'a'; a000c58c: 03a03061 moveq r3, #97 ; 0x61 #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') a000c590: e5c72000 strb r2, [r7] c = 'a'; a000c594: 05c73000 strbeq r3, [r7] a000c598: eaffff2d b a000c254 if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) a000c59c: e3570000 cmp r7, #0 a000c5a0: 1a00001b bne a000c614 pipe_free(pipe); else *pipep = pipe; a000c5a4: e5845000 str r5, [r4] } out: pipe_unlock(); a000c5a8: ebfffede bl a000c128 a000c5ac: eaffff35 b a000c288 if (pipe_semaphore == RTEMS_ID_NONE) { rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { sc = rtems_semaphore_create( a000c5b0: e1a03008 mov r3, r8 a000c5b4: e3a01001 mov r1, #1 a000c5b8: e3a02054 mov r2, #84 ; 0x54 a000c5bc: e59f00d4 ldr r0, [pc, #212] ; a000c698 a000c5c0: e58d5000 str r5, [sp] a000c5c4: ebffec04 bl a00075dc a000c5c8: e1a08000 mov r8, r0 a000c5cc: e5970000 ldr r0, [r7] a000c5d0: ebffece4 bl a0007968 } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { a000c5d4: e3580000 cmp r8, #0 a000c5d8: 0a000028 beq a000c680 ) { pipe_control_t *pipe; int err = 0; err = pipe_lock(); a000c5dc: e3e0700b mvn r7, #11 a000c5e0: eaffff34 b a000c2b8 case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); a000c5e4: e595002c ldr r0, [r5, #44] ; 0x2c a000c5e8: e28d1008 add r1, sp, #8 a000c5ec: eb00066c bl a000dfa4 a000c5f0: eaffff47 b a000c314 break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); a000c5f4: e5950030 ldr r0, [r5, #48] ; 0x30 a000c5f8: e28d1008 add r1, sp, #8 a000c5fc: eb000668 bl a000dfa4 a000c600: eaffff87 b a000c424 switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); a000c604: e5950030 ldr r0, [r5, #48] ; 0x30 a000c608: e28d1008 add r1, sp, #8 a000c60c: eb000664 bl a000dfa4 a000c610: eaffff63 b a000c3a4 /* Called with pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); a000c614: e595002c ldr r0, [r5, #44] ; 0x2c <== NOT EXECUTED a000c618: eb000635 bl a000def4 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); a000c61c: e5950030 ldr r0, [r5, #48] ; 0x30 <== NOT EXECUTED a000c620: eb000633 bl a000def4 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); a000c624: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED a000c628: ebffec5c bl a00077a0 <== NOT EXECUTED free(pipe->Buffer); a000c62c: e5950000 ldr r0, [r5] <== NOT EXECUTED a000c630: ebffdd52 bl a0003b80 <== NOT EXECUTED free(pipe); a000c634: e1a00005 mov r0, r5 <== NOT EXECUTED a000c638: ebffdd50 bl a0003b80 <== NOT EXECUTED else *pipep = pipe; } out: pipe_unlock(); a000c63c: ebfffeb9 bl a000c128 <== NOT EXECUTED a000c640: eaffff1c b a000c2b8 <== NOT EXECUTED if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { PIPE_UNLOCK(pipe); a000c644: e5950028 ldr r0, [r5, #40] ; 0x28 a000c648: ebffecc6 bl a0007968 err = -ENXIO; a000c64c: e3e07005 mvn r7, #5 goto out_error; a000c650: eaffff47 b a000c374 if (c ++ == 'z') c = 'a'; return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); a000c654: e5950030 ldr r0, [r5, #48] ; 0x30 a000c658: eb000625 bl a000def4 err_wbar: rtems_barrier_delete(pipe->readBarrier); a000c65c: e598002c ldr r0, [r8, #44] ; 0x2c a000c660: eb000623 bl a000def4 err_rbar: free(pipe->Buffer); a000c664: e5980000 ldr r0, [r8] a000c668: ebffdd44 bl a0003b80 err_buf: free(pipe); a000c66c: e1a00008 mov r0, r8 a000c670: ebffdd42 bl a0003b80 ) { pipe_control_t *pipe; int err = 0; err = pipe_lock(); a000c674: e3e0700b mvn r7, #11 else *pipep = pipe; } out: pipe_unlock(); a000c678: ebfffeaa bl a000c128 a000c67c: eaffff0d b a000c2b8 } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { a000c680: e5958000 ldr r8, [r5] a000c684: eafffee9 b a000c230 =============================================================================== a0002a4c : { long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); a0002a4c: e59f310c ldr r3, [pc, #268] ; a0002b60 long fpathconf( int fd, int name ) { a0002a50: 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); a0002a54: e5933000 ldr r3, [r3] a0002a58: e1500003 cmp r0, r3 a0002a5c: 2a000035 bcs a0002b38 iop = rtems_libio_iop(fd); a0002a60: e59f30fc ldr r3, [pc, #252] ; a0002b64 a0002a64: e3a02038 mov r2, #56 ; 0x38 a0002a68: e5933000 ldr r3, [r3] a0002a6c: e0203092 mla r0, r2, r0, r3 rtems_libio_check_is_open(iop); a0002a70: e5903014 ldr r3, [r0, #20] a0002a74: e3130c01 tst r3, #256 ; 0x100 a0002a78: 0a00002e beq a0002b38 rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); a0002a7c: e3130002 tst r3, #2 a0002a80: 0a000031 beq a0002b4c /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; a0002a84: e5903028 ldr r3, [r0, #40] ; 0x28 switch ( name ) { a0002a88: e351000b cmp r1, #11 a0002a8c: 979ff101 ldrls pc, [pc, r1, lsl #2] a0002a90: ea00000d b a0002acc a0002a94: a0002ae0 .word 0xa0002ae0 a0002a98: a0002ae8 .word 0xa0002ae8 a0002a9c: a0002af0 .word 0xa0002af0 a0002aa0: a0002af8 .word 0xa0002af8 a0002aa4: a0002b00 .word 0xa0002b00 a0002aa8: a0002b08 .word 0xa0002b08 a0002aac: a0002b10 .word 0xa0002b10 a0002ab0: a0002b18 .word 0xa0002b18 a0002ab4: a0002b20 .word 0xa0002b20 a0002ab8: a0002b28 .word 0xa0002b28 a0002abc: a0002b30 .word 0xa0002b30 a0002ac0: a0002ac4 .word 0xa0002ac4 break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; a0002ac4: e5930060 ldr r0, [r3, #96] ; 0x60 break; a0002ac8: e49df004 pop {pc} ; (ldr pc, [sp], #4) default: rtems_set_errno_and_return_minus_one( EINVAL ); a0002acc: eb003040 bl a000ebd4 <__errno> a0002ad0: e3a03016 mov r3, #22 a0002ad4: e5803000 str r3, [r0] a0002ad8: e3e00000 mvn r0, #0 break; } return return_value; } a0002adc: 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; a0002ae0: e5930038 ldr r0, [r3, #56] ; 0x38 break; a0002ae4: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_MAX_CANON: return_value = the_limits->max_canon; a0002ae8: e593003c ldr r0, [r3, #60] ; 0x3c break; a0002aec: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_MAX_INPUT: return_value = the_limits->max_input; a0002af0: e5930040 ldr r0, [r3, #64] ; 0x40 break; a0002af4: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_NAME_MAX: return_value = the_limits->name_max; a0002af8: e5930044 ldr r0, [r3, #68] ; 0x44 break; a0002afc: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PATH_MAX: return_value = the_limits->path_max; a0002b00: e5930048 ldr r0, [r3, #72] ; 0x48 break; a0002b04: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; a0002b08: e593004c ldr r0, [r3, #76] ; 0x4c break; a0002b0c: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; a0002b10: e5930054 ldr r0, [r3, #84] ; 0x54 break; a0002b14: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; a0002b18: e5930058 ldr r0, [r3, #88] ; 0x58 break; a0002b1c: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_VDISABLE: return_value = the_limits->posix_vdisable; a0002b20: e5930064 ldr r0, [r3, #100] ; 0x64 break; a0002b24: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; a0002b28: e5930050 ldr r0, [r3, #80] ; 0x50 break; a0002b2c: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; a0002b30: e593005c ldr r0, [r3, #92] ; 0x5c break; a0002b34: 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); a0002b38: eb003025 bl a000ebd4 <__errno> a0002b3c: e3a03009 mov r3, #9 a0002b40: e5803000 str r3, [r0] a0002b44: e3e00000 mvn r0, #0 a0002b48: e49df004 pop {pc} ; (ldr pc, [sp], #4) rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); a0002b4c: eb003020 bl a000ebd4 <__errno> a0002b50: e3a03016 mov r3, #22 a0002b54: e5803000 str r3, [r0] a0002b58: e3e00000 mvn r0, #0 a0002b5c: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== a0003274 : static void free_user_env(void *venv) { rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env a0003274: e59f302c ldr r3, [pc, #44] ; a00032a8 * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { a0003278: e92d4010 push {r4, lr} rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env a000327c: e1500003 cmp r0, r3 * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { a0003280: e1a04000 mov r4, r0 rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env a0003284: 0a000006 beq a00032a4 #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); a0003288: e2800004 add r0, r0, #4 a000328c: ebfffb7a bl a000207c rtems_filesystem_freenode( &env->root_directory); a0003290: e2840018 add r0, r4, #24 a0003294: ebfffb78 bl a000207c free(env); a0003298: e1a00004 mov r0, r4 } } a000329c: e8bd4010 pop {r4, lr} && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); a00032a0: eafffb7a b a0002090 a00032a4: e8bd8010 pop {r4, pc} =============================================================================== a0003db8 : * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { if (tty->termios.c_iflag & ISTRIP) a0003db8: e5913030 ldr r3, [r1, #48] ; 0x30 /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { a0003dbc: e92d4030 push {r4, r5, lr} if (tty->termios.c_iflag & ISTRIP) a0003dc0: e3130020 tst r3, #32 /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { a0003dc4: e20040ff and r4, r0, #255 ; 0xff if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; a0003dc8: 1200407f andne r4, r0, #127 ; 0x7f if (tty->termios.c_iflag & IUCLC) a0003dcc: e3130c02 tst r3, #512 ; 0x200 /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { a0003dd0: e1a05001 mov r5, r1 if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) a0003dd4: 0a000007 beq a0003df8 c = tolower (c); a0003dd8: e59f21ac ldr r2, [pc, #428] ; a0003f8c a0003ddc: e5922000 ldr r2, [r2] a0003de0: e0822004 add r2, r2, r4 a0003de4: e5d22001 ldrb r2, [r2, #1] a0003de8: e2022003 and r2, r2, #3 a0003dec: e3520001 cmp r2, #1 a0003df0: 02844020 addeq r4, r4, #32 a0003df4: e20440ff and r4, r4, #255 ; 0xff if (c == '\r') { a0003df8: e354000d cmp r4, #13 a0003dfc: 0a000014 beq a0003e54 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)) { a0003e00: e354000a cmp r4, #10 a0003e04: 0a000034 beq a0003edc c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { a0003e08: e3540000 cmp r4, #0 a0003e0c: 1a000015 bne a0003e68 } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { a0003e10: e59f2178 ldr r2, [pc, #376] ; a0003f90 a0003e14: e5953020 ldr r3, [r5, #32] a0003e18: e5922008 ldr r2, [r2, #8] a0003e1c: e2422001 sub r2, r2, #1 a0003e20: e1530002 cmp r3, r2 a0003e24: aa000008 bge a0003e4c if (tty->termios.c_lflag & ECHO) a0003e28: e595203c ldr r2, [r5, #60] ; 0x3c a0003e2c: e3120008 tst r2, #8 a0003e30: 1a00002e bne a0003ef0 echo (c, tty); tty->cbuf[tty->ccount++] = c; a0003e34: e595101c ldr r1, [r5, #28] <== NOT EXECUTED a0003e38: e2832001 add r2, r3, #1 <== NOT EXECUTED } return 0; a0003e3c: 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; a0003e40: e7c14003 strb r4, [r1, r3] <== NOT EXECUTED a0003e44: e5852020 str r2, [r5, #32] <== NOT EXECUTED a0003e48: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED } return 0; a0003e4c: e3a00000 mov r0, #0 <== NOT EXECUTED } a0003e50: 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) a0003e54: e3130080 tst r3, #128 ; 0x80 a0003e58: 1a000022 bne a0003ee8 return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; a0003e5c: e3130c01 tst r3, #256 ; 0x100 a0003e60: 03a0400d moveq r4, #13 a0003e64: 13a0400a movne r4, #10 } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { a0003e68: e595303c ldr r3, [r5, #60] ; 0x3c a0003e6c: e3130002 tst r3, #2 a0003e70: 0affffe6 beq a0003e10 if (c == tty->termios.c_cc[VERASE]) { a0003e74: e5d52043 ldrb r2, [r5, #67] ; 0x43 a0003e78: e1520004 cmp r2, r4 a0003e7c: 0a00003d beq a0003f78 erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { a0003e80: e5d52044 ldrb r2, [r5, #68] ; 0x44 a0003e84: e1520004 cmp r2, r4 a0003e88: 0a000026 beq a0003f28 erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { a0003e8c: e5d52045 ldrb r2, [r5, #69] ; 0x45 a0003e90: e1520004 cmp r2, r4 a0003e94: 0a000035 beq a0003f70 return 1; } else if (c == '\n') { a0003e98: e354000a cmp r4, #10 a0003e9c: 0a000026 beq a0003f3c 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]) || a0003ea0: e5d5204c ldrb r2, [r5, #76] ; 0x4c a0003ea4: e1520004 cmp r2, r4 a0003ea8: 0a000002 beq a0003eb8 a0003eac: e5d52051 ldrb r2, [r5, #81] ; 0x51 a0003eb0: e1520004 cmp r2, r4 a0003eb4: 1affffd5 bne a0003e10 (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) a0003eb8: e3130008 tst r3, #8 <== NOT EXECUTED a0003ebc: 1a000015 bne a0003f18 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; a0003ec0: e5953020 ldr r3, [r5, #32] <== NOT EXECUTED a0003ec4: e595101c ldr r1, [r5, #28] <== NOT EXECUTED return 1; a0003ec8: 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; a0003ecc: e0832000 add r2, r3, r0 <== NOT EXECUTED a0003ed0: e7c14003 strb r4, [r1, r3] <== NOT EXECUTED a0003ed4: e5852020 str r2, [r5, #32] <== NOT EXECUTED return 1; a0003ed8: 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'; a0003edc: e3130040 tst r3, #64 ; 0x40 a0003ee0: 13a0400d movne r4, #13 a0003ee4: eaffffdf b a0003e68 if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) return 0; a0003ee8: e3a00000 mov r0, #0 <== NOT EXECUTED a0003eec: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); a0003ef0: e1a00004 mov r0, r4 a0003ef4: e1a01005 mov r1, r5 a0003ef8: ebffff05 bl a0003b14 a0003efc: e5953020 ldr r3, [r5, #32] tty->cbuf[tty->ccount++] = c; a0003f00: e595101c ldr r1, [r5, #28] } return 0; a0003f04: 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; a0003f08: e2832001 add r2, r3, #1 a0003f0c: e7c14003 strb r4, [r1, r3] a0003f10: e5852020 str r2, [r5, #32] a0003f14: 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); a0003f18: e1a00004 mov r0, r4 <== NOT EXECUTED a0003f1c: e1a01005 mov r1, r5 <== NOT EXECUTED a0003f20: ebfffefb bl a0003b14 <== NOT EXECUTED a0003f24: eaffffe5 b a0003ec0 <== 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); a0003f28: e1a00005 mov r0, r5 a0003f2c: e3a01001 mov r1, #1 a0003f30: ebffff1c bl a0003ba8 return 0; a0003f34: e3a00000 mov r0, #0 a0003f38: 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)) a0003f3c: e3130048 tst r3, #72 ; 0x48 a0003f40: 0a000002 beq a0003f50 echo (c, tty); a0003f44: e1a00004 mov r0, r4 a0003f48: e1a01005 mov r1, r5 a0003f4c: ebfffef0 bl a0003b14 tty->cbuf[tty->ccount++] = c; a0003f50: e5953020 ldr r3, [r5, #32] a0003f54: e595101c ldr r1, [r5, #28] a0003f58: e3a0000a mov r0, #10 a0003f5c: e2832001 add r2, r3, #1 a0003f60: e7c10003 strb r0, [r1, r3] return 1; a0003f64: 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; a0003f68: e5852020 str r2, [r5, #32] return 1; a0003f6c: e8bd8030 pop {r4, r5, pc} else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { return 1; a0003f70: e3a00001 mov r0, #1 <== NOT EXECUTED a0003f74: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); a0003f78: e1a00005 mov r0, r5 a0003f7c: e3a01000 mov r1, #0 a0003f80: ebffff08 bl a0003ba8 return 0; a0003f84: e3a00000 mov r0, #0 a0003f88: e8bd8030 pop {r4, r5, pc} =============================================================================== a0021afc : int killinfo( pid_t pid, int sig, const union sigval *value ) { a0021afc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} a0021b00: e24dd00c sub sp, sp, #12 a0021b04: e1a04000 mov r4, r0 a0021b08: e1a05001 mov r5, r1 a0021b0c: e1a07002 mov r7, r2 POSIX_signals_Siginfo_node *psiginfo; /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) a0021b10: ebffff37 bl a00217f4 a0021b14: e1500004 cmp r0, r4 a0021b18: 1a000096 bne a0021d78 rtems_set_errno_and_return_minus_one( ESRCH ); /* * Validate the signal passed. */ if ( !sig ) a0021b1c: e3550000 cmp r5, #0 a0021b20: 0a000099 beq a0021d8c static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); a0021b24: e2454001 sub r4, r5, #1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) a0021b28: e354001f cmp r4, #31 a0021b2c: 8a000096 bhi a0021d8c 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 ) a0021b30: e59f6280 ldr r6, [pc, #640] ; a0021db8 a0021b34: e3a0300c mov r3, #12 a0021b38: e0236395 mla r3, r5, r3, r6 a0021b3c: e5933008 ldr r3, [r3, #8] a0021b40: e3530001 cmp r3, #1 return 0; a0021b44: 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 ) a0021b48: 0a000039 beq a0021c34 /* * 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 ) ) a0021b4c: e3550008 cmp r5, #8 a0021b50: 13550004 cmpne r5, #4 a0021b54: 0a000038 beq a0021c3c a0021b58: e355000b cmp r5, #11 a0021b5c: 0a000036 beq a0021c3c static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); a0021b60: e3a03001 mov r3, #1 * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { a0021b64: e3570000 cmp r7, #0 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; a0021b68: e58d3004 str r3, [sp, #4] /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; a0021b6c: e58d5000 str r5, [sp] a0021b70: e1a04413 lsl r4, r3, r4 siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; a0021b74: 15973000 ldrne r3, [r7] */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; a0021b78: 058d7008 streq r7, [sp, #8] } else { siginfo->si_value = *value; a0021b7c: 158d3008 strne r3, [sp, #8] a0021b80: e59f3234 ldr r3, [pc, #564] ; a0021dbc a0021b84: e5932000 ldr r2, [r3] a0021b88: e2822001 add r2, r2, #1 a0021b8c: 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; a0021b90: e59f3228 ldr r3, [pc, #552] ; a0021dc0 a0021b94: e5930004 ldr r0, [r3, #4] api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( _POSIX_signals_Is_interested( api, mask ) ) { a0021b98: e59030fc ldr r3, [r0, #252] ; 0xfc a0021b9c: e59330d0 ldr r3, [r3, #208] ; 0xd0 a0021ba0: e1d43003 bics r3, r4, r3 a0021ba4: 1a000014 bne a0021bfc } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } a0021ba8: e59fc214 ldr ip, [pc, #532] ; a0021dc4 a0021bac: e49c3004 ldr r3, [ip], #4 /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = _Chain_First( the_chain ); a0021bb0: e153000c cmp r3, ip a0021bb4: 0a000033 beq a0021c88 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) a0021bb8: e5932030 ldr r2, [r3, #48] ; 0x30 for ( the_node = _Chain_First( the_chain ); !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; a0021bbc: e1a00003 mov r0, r3 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; a0021bc0: e59310fc ldr r1, [r3, #252] ; 0xfc #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) a0021bc4: e1140002 tst r4, r2 a0021bc8: 0a000008 beq a0021bf0 a0021bcc: ea00000a b a0021bfc the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = _Chain_First( the_chain ); !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { a0021bd0: 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 = _Chain_First( the_chain ); a0021bd4: e153000c cmp r3, ip a0021bd8: 0a00002a beq a0021c88 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) a0021bdc: e5932030 ldr r2, [r3, #48] ; 0x30 <== NOT EXECUTED for ( the_node = _Chain_First( the_chain ); !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; a0021be0: e59310fc ldr r1, [r3, #252] ; 0xfc <== NOT EXECUTED for ( the_node = _Chain_First( the_chain ); !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; a0021be4: e1a00003 mov r0, r3 <== NOT EXECUTED #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) a0021be8: e1140002 tst r4, r2 <== NOT EXECUTED a0021bec: 1a000002 bne a0021bfc <== NOT EXECUTED /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) a0021bf0: e59120d0 ldr r2, [r1, #208] ; 0xd0 a0021bf4: e1d42002 bics r2, r4, r2 a0021bf8: 0afffff4 beq a0021bd0 /* * 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 ) ) { a0021bfc: e1a01005 mov r1, r5 a0021c00: e1a0200d mov r2, sp a0021c04: eb00007d bl a0021e00 <_POSIX_signals_Unblock_thread> a0021c08: e3500000 cmp r0, #0 a0021c0c: 1a000006 bne a0021c2c /* * 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 ); a0021c10: e1a00004 mov r0, r4 a0021c14: eb00006f bl a0021dd8 <_POSIX_signals_Set_process_signals> if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { a0021c18: e3a0300c mov r3, #12 a0021c1c: e0050593 mul r5, r3, r5 a0021c20: e7963005 ldr r3, [r6, r5] a0021c24: e3530002 cmp r3, #2 a0021c28: 0a000007 beq a0021c4c _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); a0021c2c: ebfface1 bl a000cfb8 <_Thread_Enable_dispatch> return 0; a0021c30: e3a00000 mov r0, #0 } a0021c34: e28dd00c add sp, sp, #12 a0021c38: 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 ); a0021c3c: eb0000fb bl a0022030 a0021c40: e1a01005 mov r1, r5 a0021c44: eb0000c0 bl a0021f4c a0021c48: eafffff9 b a0021c34 _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 ); a0021c4c: e59f0174 ldr r0, [pc, #372] ; a0021dc8 a0021c50: ebffa626 bl a000b4f0 <_Chain_Get> if ( !psiginfo ) { a0021c54: e2501000 subs r1, r0, #0 a0021c58: 0a000050 beq a0021da0 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; a0021c5c: e28d3004 add r3, sp, #4 a0021c60: e4932004 ldr r2, [r3], #4 a0021c64: e59d0000 ldr r0, [sp] a0021c68: e5933000 ldr r3, [r3] a0021c6c: e5810008 str r0, [r1, #8] _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); a0021c70: e59f0154 ldr r0, [pc, #340] ; a0021dcc if ( !psiginfo ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; a0021c74: e581200c str r2, [r1, #12] a0021c78: e5813010 str r3, [r1, #16] _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); a0021c7c: e0800005 add r0, r0, r5 a0021c80: ebffa607 bl a000b4a4 <_Chain_Append> a0021c84: eaffffe8 b a0021c2c * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; a0021c88: e59f3140 ldr r3, [pc, #320] ; a0021dd0 a0021c8c: e59fa140 ldr sl, [pc, #320] ; a0021dd4 * * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; a0021c90: e3a00000 mov r0, #0 interested_priority = PRIORITY_MAXIMUM + 1; a0021c94: e5d3e000 ldrb lr, [r3] */ #define _POSIX_signals_Is_interested( _api, _mask ) \ ( ~(_api)->signals_blocked & (_mask) ) int killinfo( a0021c98: e28a9008 add r9, sl, #8 * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; a0021c9c: 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 ] ) a0021ca0: e5ba3004 ldr r3, [sl, #4]! a0021ca4: e3530000 cmp r3, #0 a0021ca8: 0a000022 beq a0021d38 continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; a0021cac: e5933004 ldr r3, [r3, #4] */ if ( !the_info ) continue; #endif maximum = the_info->maximum; a0021cb0: e1d371b0 ldrh r7, [r3, #16] object_table = the_info->local_table; a0021cb4: e593101c ldr r1, [r3, #28] for ( index = 1 ; index <= maximum ; index++ ) { a0021cb8: e3570000 cmp r7, #0 a0021cbc: 0a00001d beq a0021d38 a0021cc0: e3a02001 mov r2, #1 the_thread = (Thread_Control *) object_table[ index ]; a0021cc4: e5b13004 ldr r3, [r1, #4]! if ( !the_thread ) a0021cc8: e3530000 cmp r3, #0 a0021ccc: 0a000016 beq a0021d2c /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) a0021cd0: e593c014 ldr ip, [r3, #20] a0021cd4: e15c000e cmp ip, lr a0021cd8: 8a000013 bhi a0021d2c #if defined(RTEMS_DEBUG) if ( !api ) continue; #endif if ( !_POSIX_signals_Is_interested( api, mask ) ) a0021cdc: e59380fc ldr r8, [r3, #252] ; 0xfc a0021ce0: e59880d0 ldr r8, [r8, #208] ; 0xd0 a0021ce4: e1d48008 bics r8, r4, r8 a0021ce8: 0a00000f beq a0021d2c * * 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 ) { a0021cec: e15c000e cmp ip, lr a0021cf0: 3a00001a bcc a0021d60 * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( interested && !_States_Is_ready( interested->current_state ) ) { a0021cf4: e3500000 cmp r0, #0 a0021cf8: 0a00000b beq a0021d2c a0021cfc: e5908010 ldr r8, [r0, #16] a0021d00: e3580000 cmp r8, #0 a0021d04: 0a000008 beq a0021d2c /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { a0021d08: e593b010 ldr fp, [r3, #16] a0021d0c: e35b0000 cmp fp, #0 a0021d10: 0a000012 beq a0021d60 continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { a0021d14: e3180201 tst r8, #268435456 ; 0x10000000 a0021d18: 1a000003 bne a0021d2c */ RTEMS_INLINE_ROUTINE bool _States_Is_interruptible_by_signal ( States_Control the_states ) { return (the_states & STATES_INTERRUPTIBLE_BY_SIGNAL); a0021d1c: e20bb201 and fp, fp, #268435456 ; 0x10000000 DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { a0021d20: e35b0000 cmp fp, #0 a0021d24: 11a0e00c movne lr, ip a0021d28: 11a00003 movne r0, r3 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { a0021d2c: e2822001 add r2, r2, #1 a0021d30: e1570002 cmp r7, r2 a0021d34: 2affffe2 bcs a0021cc4 * + 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++) { a0021d38: e15a0009 cmp sl, r9 a0021d3c: 1affffd7 bne a0021ca0 } } } } if ( interested ) { a0021d40: e3500000 cmp r0, #0 a0021d44: 0affffb1 beq a0021c10 /* * 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 ) ) { a0021d48: e1a01005 mov r1, r5 a0021d4c: e1a0200d mov r2, sp a0021d50: eb00002a bl a0021e00 <_POSIX_signals_Unblock_thread> a0021d54: e3500000 cmp r0, #0 a0021d58: 0affffac beq a0021c10 a0021d5c: eaffffb2 b a0021c2c <== NOT EXECUTED #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { a0021d60: e2822001 add r2, r2, #1 a0021d64: e1570002 cmp r7, r2 */ if ( interested && !_States_Is_ready( interested->current_state ) ) { /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { a0021d68: e1a0e00c mov lr, ip a0021d6c: e1a00003 mov r0, r3 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { a0021d70: 2affffd3 bcs a0021cc4 a0021d74: eaffffef b a0021d38 /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); a0021d78: ebffc534 bl a0013250 <__errno> a0021d7c: e3a03003 mov r3, #3 a0021d80: e5803000 str r3, [r0] a0021d84: e3e00000 mvn r0, #0 a0021d88: eaffffa9 b a0021c34 */ if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); a0021d8c: ebffc52f bl a0013250 <__errno> a0021d90: e3a03016 mov r3, #22 a0021d94: e5803000 str r3, [r0] a0021d98: e3e00000 mvn r0, #0 a0021d9c: eaffffa4 b a0021c34 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(); a0021da0: ebffac84 bl a000cfb8 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); a0021da4: ebffc529 bl a0013250 <__errno> a0021da8: e3a0300b mov r3, #11 a0021dac: e5803000 str r3, [r0] a0021db0: e3e00000 mvn r0, #0 a0021db4: eaffff9e b a0021c34 =============================================================================== a00129f4 : /* * In case RTEMS is already down, don't do this. It could be * dangerous. */ if (!_System_state_Is_up(_System_state_Get())) a00129f4: e59f3058 ldr r3, [pc, #88] ; a0012a54 extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { a00129f8: e92d4030 push {r4, r5, lr} /* * In case RTEMS is already down, don't do this. It could be * dangerous. */ if (!_System_state_Is_up(_System_state_Get())) a00129fc: e5933000 ldr r3, [r3] a0012a00: e3530003 cmp r3, #3 a0012a04: 0a000000 beq a0012a0c a0012a08: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED /* * This was already done if the user called exit() directly . _wrapup_reent(0); */ if (_REENT != _global_impure_ptr) { a0012a0c: e59f4044 ldr r4, [pc, #68] ; a0012a58 a0012a10: e59f2044 ldr r2, [pc, #68] ; a0012a5c a0012a14: e5943000 ldr r3, [r4] a0012a18: e5925000 ldr r5, [r2] a0012a1c: e1530005 cmp r3, r5 a0012a20: 0a000002 beq a0012a30 _wrapup_reent(_global_impure_ptr); a0012a24: e1a00005 mov r0, r5 a0012a28: eb0001ba bl a0013118 <_wrapup_reent> /* Don't reclaim this one, just in case we do printfs * on the way out to ROM. */ _reclaim_reent(&libc_global_reent); #endif _REENT = _global_impure_ptr; a0012a2c: e5845000 str r5, [r4] * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); a0012a30: e5950004 ldr r0, [r5, #4] a0012a34: ebffec86 bl a000dc54 fclose (stdout); a0012a38: e5943000 ldr r3, [r4] a0012a3c: e5930008 ldr r0, [r3, #8] a0012a40: ebffec83 bl a000dc54 fclose (stderr); a0012a44: e5943000 ldr r3, [r4] a0012a48: e593000c ldr r0, [r3, #12] } a0012a4c: e8bd4030 pop {r4, r5, lr} * _fwalk (_REENT, fclose); */ fclose (stdin); fclose (stdout); fclose (stderr); a0012a50: eaffec7f b a000dc54 =============================================================================== a00021e0 : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); a00021e0: e59f30d8 ldr r3, [pc, #216] ; a00022c0 #include "malloc_p.h" void *malloc( size_t size ) { a00021e4: e92d4030 push {r4, r5, lr} void *return_this; MSBUMP(malloc_calls, 1); a00021e8: e5932004 ldr r2, [r3, #4] #include "malloc_p.h" void *malloc( size_t size ) { a00021ec: e1a04000 mov r4, r0 void *return_this; MSBUMP(malloc_calls, 1); a00021f0: e2822001 add r2, r2, #1 a00021f4: e5832004 str r2, [r3, #4] /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); a00021f8: ebffffaf bl a00020bc /* * Validate the parameters */ if ( !size ) a00021fc: e3540000 cmp r4, #0 return (void *) 0; a0002200: 01a05004 moveq r5, r4 malloc_deferred_frees_process(); /* * Validate the parameters */ if ( !size ) a0002204: 0a000019 beq a0002270 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && a0002208: e59f30b4 ldr r3, [pc, #180] ; a00022c4 a000220c: e5933000 ldr r3, [r3] a0002210: e3530003 cmp r3, #3 a0002214: 0a000025 beq a00022b0 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); a0002218: e59f30a8 ldr r3, [pc, #168] ; a00022c8 a000221c: e3a02000 mov r2, #0 a0002220: e1a01004 mov r1, r4 a0002224: e5930000 ldr r0, [r3] a0002228: e1a03002 mov r3, r2 a000222c: eb00138e bl a000706c <_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 ) { a0002230: e2505000 subs r5, r0, #0 a0002234: 0a00000f beq a0002278 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) a0002238: e59f308c ldr r3, [pc, #140] ; a00022cc a000223c: e5933000 ldr r3, [r3] a0002240: e3530000 cmp r3, #0 a0002244: 0a000002 beq a0002254 (*rtems_malloc_dirty_helper)( return_this, size ); a0002248: e1a00005 mov r0, r5 a000224c: e1a01004 mov r1, r4 a0002250: e12fff33 blx r3 /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) a0002254: e59f3074 ldr r3, [pc, #116] ; a00022d0 a0002258: e5933000 ldr r3, [r3] a000225c: e3530000 cmp r3, #0 a0002260: 0a000002 beq a0002270 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); a0002264: e5933004 ldr r3, [r3, #4] a0002268: e1a00005 mov r0, r5 a000226c: e12fff33 blx r3 return return_this; } a0002270: e1a00005 mov r0, r5 a0002274: e8bd8030 pop {r4, r5, pc} */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { if (rtems_malloc_sbrk_helpers) a0002278: e59f3054 ldr r3, [pc, #84] ; a00022d4 a000227c: e5933000 ldr r3, [r3] a0002280: e3530000 cmp r3, #0 a0002284: 0a000005 beq a00022a0 return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); a0002288: e5933004 ldr r3, [r3, #4] a000228c: e1a00004 mov r0, r4 a0002290: e12fff33 blx r3 if ( !return_this ) { a0002294: e3500000 cmp r0, #0 a0002298: 11a05000 movne r5, r0 a000229c: 1affffe5 bne a0002238 errno = ENOMEM; a00022a0: eb002e1d bl a000db1c <__errno> a00022a4: e3a0300c mov r3, #12 a00022a8: e5803000 str r3, [r0] return (void *) 0; a00022ac: eaffffef b a0002270 /* * 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() ) a00022b0: ebffff6d bl a000206c return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && a00022b4: e2505000 subs r5, r0, #0 a00022b8: 1affffd6 bne a0002218 a00022bc: eaffffeb b a0002270 <== NOT EXECUTED =============================================================================== a0002594 : * Round to the "requested sbrk amount" so hopefully we won't have * to grow again for a while. This effectively does sbrk() calls * in "page" amounts. */ sbrk_amount = RTEMS_Malloc_Sbrk_amount; a0002594: e59f30a0 ldr r3, [pc, #160] ; a000263c } void *malloc_sbrk_extend_and_allocate( size_t size ) { a0002598: e92d40f0 push {r4, r5, r6, r7, lr} * Round to the "requested sbrk amount" so hopefully we won't have * to grow again for a while. This effectively does sbrk() calls * in "page" amounts. */ sbrk_amount = RTEMS_Malloc_Sbrk_amount; a000259c: e5934000 ldr r4, [r3] } void *malloc_sbrk_extend_and_allocate( size_t size ) { a00025a0: e1a06000 mov r6, r0 * in "page" amounts. */ sbrk_amount = RTEMS_Malloc_Sbrk_amount; if ( sbrk_amount == 0 ) a00025a4: e3540000 cmp r4, #0 a00025a8: 1a000001 bne a00025b4 return (void *) 0; a00025ac: e1a00004 mov r0, r4 <== NOT EXECUTED a00025b0: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount); a00025b4: e1a01004 mov r1, r4 a00025b8: e0800004 add r0, r0, r4 a00025bc: eb003c4a bl a00116ec <__aeabi_uidiv> a00025c0: e0040490 mul r4, r0, r4 starting_address = (void *) sbrk(the_size); a00025c4: e1a00004 mov r0, r4 a00025c8: ebfff7db bl a000053c if ( starting_address == (void*) -1 ) a00025cc: e3700001 cmn r0, #1 a00025d0: 0a000010 beq a0002618 return (void *) 0; if ( !_Protected_heap_Extend( a00025d4: e59f5064 ldr r5, [pc, #100] ; a0002640 a00025d8: e1a01000 mov r1, r0 a00025dc: e1a02004 mov r2, r4 a00025e0: e5950000 ldr r0, [r5] a00025e4: eb00136a bl a0007394 <_Protected_heap_Extend> a00025e8: e2507000 subs r7, r0, #0 a00025ec: 0a00000b beq a0002620 sbrk(-the_size); errno = ENOMEM; return (void *) 0; } MSBUMP(space_available, the_size); a00025f0: e59fc04c ldr ip, [pc, #76] ; a0002644 a00025f4: e5950000 ldr r0, [r5] a00025f8: e3a02000 mov r2, #0 a00025fc: e59c5000 ldr r5, [ip] a0002600: e1a01006 mov r1, r6 a0002604: e1a03002 mov r3, r2 a0002608: e0844005 add r4, r4, r5 a000260c: e58c4000 str r4, [ip] return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); return return_this; } a0002610: e8bd40f0 pop {r4, r5, r6, r7, lr} a0002614: ea00134b b a0007348 <_Protected_heap_Allocate_aligned_with_boundary> the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount); starting_address = (void *) sbrk(the_size); if ( starting_address == (void*) -1 ) return (void *) 0; a0002618: e3a00000 mov r0, #0 MSBUMP(space_available, the_size); return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); return return_this; } a000261c: e8bd80f0 pop {r4, r5, r6, r7, pc} if ( starting_address == (void*) -1 ) return (void *) 0; if ( !_Protected_heap_Extend( RTEMS_Malloc_Heap, starting_address, the_size) ) { sbrk(-the_size); a0002620: e2640000 rsb r0, r4, #0 a0002624: ebfff7c4 bl a000053c errno = ENOMEM; a0002628: eb002ebb bl a000e11c <__errno> a000262c: e3a0300c mov r3, #12 a0002630: e5803000 str r3, [r0] return (void *) 0; a0002634: e1a00007 mov r0, r7 a0002638: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== a000cac0 : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { a000cac0: e92d4030 push {r4, r5, lr} IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; a000cac4: e5905018 ldr r5, [r0, #24] rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { a000cac8: e1a04000 mov r4, r0 IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; if (the_jnode->type == IMFS_LINEAR_FILE) { a000cacc: e595304c ldr r3, [r5, #76] ; 0x4c a000cad0: e3530006 cmp r3, #6 a000cad4: 0a00000d beq a000cb10 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 )) a000cad8: e1a00005 mov r0, r5 a000cadc: e284200c add r2, r4, #12 a000cae0: e8920006 ldm r2, {r1, r2} a000cae4: ebfffee6 bl a000c684 a000cae8: e3500000 cmp r0, #0 a000caec: 1a000018 bne a000cb54 rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; a000caf0: e2853050 add r3, r5, #80 ; 0x50 a000caf4: e893000c ldm r3, {r2, r3} a000caf8: e984000c stmib r4, {r2, r3} a000cafc: e284300c add r3, r4, #12 a000cb00: e893000c ldm r3, {r2, r3} } return iop->offset; } a000cb04: e1a00002 mov r0, r2 a000cb08: e1a01003 mov r1, r3 a000cb0c: 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) a000cb10: e5951054 ldr r1, [r5, #84] ; 0x54 a000cb14: e280300c add r3, r0, #12 a000cb18: e893000c ldm r3, {r2, r3} a000cb1c: e5950050 ldr r0, [r5, #80] ; 0x50 a000cb20: e1530001 cmp r3, r1 a000cb24: ca000002 bgt a000cb34 a000cb28: 1afffff5 bne a000cb04 a000cb2c: e1520000 cmp r2, r0 a000cb30: 9afffff3 bls a000cb04 iop->offset = the_jnode->info.linearfile.size; a000cb34: e1a02000 mov r2, r0 <== NOT EXECUTED a000cb38: e1a03001 mov r3, r1 <== NOT EXECUTED a000cb3c: e1a05000 mov r5, r0 <== NOT EXECUTED a000cb40: e584000c str r0, [r4, #12] <== NOT EXECUTED a000cb44: 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; } a000cb48: e1a00002 mov r0, r2 <== NOT EXECUTED a000cb4c: e1a01003 mov r1, r3 <== NOT EXECUTED a000cb50: 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 ); a000cb54: eb0003f0 bl a000db1c <__errno> a000cb58: e3a0301c mov r3, #28 a000cb5c: e5803000 str r3, [r0] a000cb60: e3e02000 mvn r2, #0 a000cb64: e3e03000 mvn r3, #0 a000cb68: eaffffe5 b a000cb04 =============================================================================== a000c9a8 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { a000c9a8: e92d4070 push {r4, r5, r6, lr} the_jnode = iop->pathinfo.node_access; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) a000c9ac: e5903014 ldr r3, [r0, #20] rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { a000c9b0: e24dd004 sub sp, sp, #4 a000c9b4: 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)) a000c9b8: e3130f81 tst r3, #516 ; 0x204 uint32_t mode ) { IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; a000c9bc: e5905018 ldr r5, [r0, #24] /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) a000c9c0: 0a000002 beq a000c9d0 && (the_jnode->type == IMFS_LINEAR_FILE)) { a000c9c4: e595204c ldr r2, [r5, #76] ; 0x4c a000c9c8: e3520006 cmp r2, #6 a000c9cc: 0a00000a beq a000c9fc the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) a000c9d0: e5950050 ldr r0, [r5, #80] ; 0x50 a000c9d4: e5952054 ldr r2, [r5, #84] ; 0x54 return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) a000c9d8: e3130c02 tst r3, #512 ; 0x200 iop->offset = the_jnode->info.file.size; a000c9dc: 1584000c strne r0, [r4, #12] a000c9e0: 15842010 strne r2, [r4, #16] a000c9e4: 15950050 ldrne r0, [r5, #80] ; 0x50 a000c9e8: 15952054 ldrne r2, [r5, #84] ; 0x54 iop->size = the_jnode->info.file.size; a000c9ec: e9840005 stmib r4, {r0, r2} return 0; a000c9f0: e3a00000 mov r0, #0 } a000c9f4: e28dd004 add sp, sp, #4 a000c9f8: e8bd8070 pop {r4, r5, r6, pc} /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; a000c9fc: 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; a000ca00: e3a00000 mov r0, #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; a000ca04: e3a01000 mov r1, #0 <== NOT EXECUTED a000ca08: 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; a000ca0c: e3a06005 mov r6, #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) a000ca10: e15c0000 cmp ip, r0 <== NOT EXECUTED * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; a000ca14: e5953058 ldr r3, [r5, #88] ; 0x58 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; a000ca18: e585604c str r6, [r5, #76] ; 0x4c <== NOT EXECUTED the_jnode->info.file.size = 0; a000ca1c: e5851050 str r1, [r5, #80] ; 0x50 <== NOT EXECUTED a000ca20: e5852054 str r2, [r5, #84] ; 0x54 <== NOT EXECUTED the_jnode->info.file.indirect = 0; a000ca24: e5850058 str r0, [r5, #88] ; 0x58 <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; a000ca28: e585005c str r0, [r5, #92] ; 0x5c <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; a000ca2c: e5850060 str r0, [r5, #96] ; 0x60 <== NOT EXECUTED if ((count != 0) a000ca30: 1a000002 bne a000ca40 <== NOT EXECUTED a000ca34: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED a000ca38: e1a00001 mov r0, r1 <== NOT EXECUTED a000ca3c: eaffffe5 b a000c9d8 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) a000ca40: e1a00005 mov r0, r5 <== NOT EXECUTED a000ca44: e58dc000 str ip, [sp] <== NOT EXECUTED a000ca48: ebffff5a bl a000c7b8 <== NOT EXECUTED a000ca4c: e3700001 cmn r0, #1 <== NOT EXECUTED a000ca50: 0affffe7 beq a000c9f4 <== NOT EXECUTED a000ca54: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED a000ca58: eaffffdc b a000c9d0 <== NOT EXECUTED =============================================================================== a0002414 : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { a0002414: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && a0002418: e3530001 cmp r3, #1 const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { a000241c: e24dd030 sub sp, sp, #48 ; 0x30 a0002420: e58d3008 str r3, [sp, #8] a0002424: e1a07000 mov r7, r0 a0002428: e1a06001 mov r6, r1 a000242c: e1a09002 mov r9, r2 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && a0002430: 8a000099 bhi a000269c rtems_set_errno_and_return_minus_one( EINVAL ); /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); a0002434: e1a00002 mov r0, r2 a0002438: eb00200c bl a000a470 if ( !mount_h ) a000243c: e3500000 cmp r0, #0 a0002440: e58d0014 str r0, [sp, #20] a0002444: 0a000094 beq a000269c { 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; a0002448: e2565000 subs r5, r6, #0 a000244c: 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 : "/"; a0002450: e3550000 cmp r5, #0 a0002454: 0a000089 beq a0002680 * 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( a0002458: e1a00006 mov r0, r6 a000245c: eb003198 bl a000eac4 a0002460: e2803001 add r3, r0, #1 a0002464: e58d0010 str r0, [sp, #16] a0002468: e58d300c str r3, [sp, #12] a000246c: e58d6018 str r6, [sp, #24] const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; a0002470: e1a00009 mov r0, r9 a0002474: eb003192 bl a000eac4 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; a0002478: e3570000 cmp r7, #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; a000247c: e280b001 add fp, r0, #1 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; a0002480: 01a08007 moveq r8, r7 a0002484: 0a000002 beq a0002494 a0002488: e1a00007 mov r0, r7 a000248c: eb00318c bl a000eac4 a0002490: e2808001 add r8, r0, #1 size_t target_size = strlen( target ) + 1; size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size; a0002494: e59d300c ldr r3, [sp, #12] rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); a0002498: 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_size = strlen( target ) + 1; size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size; a000249c: e2831074 add r1, r3, #116 ; 0x74 a00024a0: e081100b add r1, r1, fp rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); a00024a4: e0811008 add r1, r1, r8 a00024a8: ebfffdf7 bl a0001c8c if ( mt_entry != NULL ) { a00024ac: e2504000 subs r4, r0, #0 a00024b0: 0a00006d beq a000266c char *str = (char *) mt_entry + sizeof( *mt_entry ); a00024b4: e284a074 add sl, r4, #116 ; 0x74 memcpy( str, filesystemtype, filesystemtype_size ); mt_entry->type = str; str += filesystemtype_size; a00024b8: e08a300b add r3, sl, fp rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); if ( mt_entry != NULL ) { char *str = (char *) mt_entry + sizeof( *mt_entry ); memcpy( str, filesystemtype, filesystemtype_size ); a00024bc: e1a01009 mov r1, r9 a00024c0: e1a0200b mov r2, fp a00024c4: e1a0000a mov r0, sl a00024c8: e58d3004 str r3, [sp, #4] a00024cc: eb002fc0 bl a000e3d4 mt_entry->type = str; str += filesystemtype_size; memcpy( str, source_or_null, source_size ); mt_entry->dev = str; str += source_size; a00024d0: e59d3004 ldr r3, [sp, #4] memcpy( str, filesystemtype, filesystemtype_size ); mt_entry->type = str; str += filesystemtype_size; memcpy( str, source_or_null, source_size ); a00024d4: e1a01007 mov r1, r7 a00024d8: e1a02008 mov r2, r8 a00024dc: e1a00003 mov r0, r3 if ( mt_entry != NULL ) { char *str = (char *) mt_entry + sizeof( *mt_entry ); memcpy( str, filesystemtype, filesystemtype_size ); mt_entry->type = str; a00024e0: e584a06c str sl, [r4, #108] ; 0x6c str += filesystemtype_size; memcpy( str, source_or_null, source_size ); mt_entry->dev = str; str += source_size; a00024e4: e0839008 add r9, r3, r8 memcpy( str, filesystemtype, filesystemtype_size ); mt_entry->type = str; str += filesystemtype_size; memcpy( str, source_or_null, source_size ); a00024e8: eb002fb9 bl a000e3d4 mt_entry->dev = str; a00024ec: e59d3004 ldr r3, [sp, #4] str += source_size; memcpy( str, target, target_size ); a00024f0: e59d1018 ldr r1, [sp, #24] a00024f4: e59d200c ldr r2, [sp, #12] memcpy( str, filesystemtype, filesystemtype_size ); mt_entry->type = str; str += filesystemtype_size; memcpy( str, source_or_null, source_size ); mt_entry->dev = str; a00024f8: e5843070 str r3, [r4, #112] ; 0x70 str += source_size; memcpy( str, target, target_size ); a00024fc: e1a00009 mov r0, r9 a0002500: eb002fb3 bl a000e3d4 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; a0002504: e59fe208 ldr lr, [pc, #520] ; a0002714 a0002508: e284c038 add ip, r4, #56 ; 0x38 /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { a000250c: e3550000 cmp r5, #0 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; a0002510: e8be000f ldm lr!, {r0, r1, r2, r3} a0002514: e8ac000f stmia ip!, {r0, r1, r2, r3} a0002518: e8be000f ldm lr!, {r0, r1, r2, r3} a000251c: e8ac000f stmia ip!, {r0, r1, r2, r3} a0002520: 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; a0002524: e59de008 ldr lr, [sp, #8] memcpy( str, source_or_null, source_size ); mt_entry->dev = str; str += source_size; memcpy( str, target, target_size ); mt_entry->target = str; a0002528: e5849068 str r9, [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; a000252c: e584402c str r4, [r4, #44] ; 0x2c mt_entry->options = options; a0002530: e584e030 str lr, [r4, #48] ; 0x30 mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; a0002534: 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 ) { a0002538: 1a000023 bne a00025cc stop = (*routine)( mt_entry, routine_arg ); } rtems_libio_unlock(); return stop; } a000253c: e59f31d4 ldr r3, [pc, #468] ; a0002718 } } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { a0002540: e5932000 ldr r2, [r3] */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_tail( const Chain_Control *the_chain ) { return &the_chain->Tail.Node; a0002544: e2833004 add r3, r3, #4 a0002548: 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; a000254c: 01a07005 moveq r7, r5 } } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { a0002550: 1a000056 bne a00026b0 * 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 ) ) { a0002554: e1a00004 mov r0, r4 a0002558: e59d1054 ldr r1, [sp, #84] ; 0x54 a000255c: e59d3014 ldr r3, [sp, #20] a0002560: e12fff33 blx r3 a0002564: e2506000 subs r6, r0, #0 a0002568: 1a000057 bne a00026cc 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 ); a000256c: e59f71a8 ldr r7, [pc, #424] ; a000271c a0002570: e1a02006 mov r2, r6 a0002574: e1a01006 mov r1, r6 a0002578: e5970000 ldr r0, [r7] a000257c: eb000be2 bl a000550c a0002580: e59f0190 ldr r0, [pc, #400] ; a0002718 a0002584: e1a01004 mov r1, r4 a0002588: eb000e51 bl a0005ed4 <_Chain_Append> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); a000258c: e5970000 ldr r0, [r7] a0002590: eb000c26 bl a0005630 */ rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); if ( !has_target ) a0002594: e3550000 cmp r5, #0 rtems_filesystem_root = mt_entry->mt_fs_root; return 0; a0002598: 11a05006 movne r5, r6 */ rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); if ( !has_target ) a000259c: 1a000007 bne a00025c0 rtems_filesystem_root = mt_entry->mt_fs_root; a00025a0: e59fc178 ldr ip, [pc, #376] ; a0002720 a00025a4: e284401c add r4, r4, #28 a00025a8: e8b4000f ldm r4!, {r0, r1, r2, r3} a00025ac: e59cc000 ldr ip, [ip] a00025b0: e5944000 ldr r4, [r4] a00025b4: e28cc018 add ip, ip, #24 a00025b8: e8ac000f stmia ip!, {r0, r1, r2, r3} a00025bc: e58c4000 str r4, [ip] if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } a00025c0: e1a00005 mov r0, r5 a00025c4: e28dd030 add sp, sp, #48 ; 0x30 a00025c8: 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( a00025cc: e28d701c add r7, sp, #28 a00025d0: e3a0c001 mov ip, #1 a00025d4: e1a00006 mov r0, r6 a00025d8: e59d1010 ldr r1, [sp, #16] a00025dc: e3a02007 mov r2, #7 a00025e0: e1a03007 mov r3, r7 a00025e4: e58dc000 str ip, [sp] a00025e8: ebfffdd6 bl a0001d48 a00025ec: e3700001 cmn r0, #1 a00025f0: 0a000031 beq a00026bc /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { a00025f4: e59d3028 ldr r3, [sp, #40] ; 0x28 a00025f8: e1a00007 mov r0, r7 a00025fc: e5933010 ldr r3, [r3, #16] a0002600: e12fff33 blx r3 a0002604: e3500001 cmp r0, #1 a0002608: 1a000039 bne a00026f4 /* * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { a000260c: e59f0110 ldr r0, [pc, #272] ; a0002724 a0002610: e59d101c ldr r1, [sp, #28] a0002614: ebffff61 bl a00023a0 a0002618: e3500000 cmp r0, #0 a000261c: 1a000038 bne a0002704 * 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; a0002620: e59d201c ldr r2, [sp, #28] mt_entry->mt_point_node.handlers = loc.handlers; mt_entry->mt_point_node.ops = loc.ops; a0002624: e59d3028 ldr r3, [sp, #40] ; 0x28 /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( loc.ops->mount_h( mt_entry ) ) { a0002628: e1a00004 mov r0, r4 * may have been allocated in loc should not be sent to freenode * until the system is unmounted. It may be needed to correctly * traverse the tree. */ mt_entry->mt_point_node.node_access = loc.node_access; a000262c: e5842008 str r2, [r4, #8] mt_entry->mt_point_node.handlers = loc.handlers; a0002630: e59d2024 ldr r2, [sp, #36] ; 0x24 mt_entry->mt_point_node.ops = loc.ops; a0002634: e5843014 str r3, [r4, #20] /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( loc.ops->mount_h( mt_entry ) ) { a0002638: e5933020 ldr r3, [r3, #32] * 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; a000263c: e5842010 str r2, [r4, #16] mt_entry->mt_point_node.ops = loc.ops; mt_entry->mt_point_node.mt_entry = loc.mt_entry; a0002640: e59d202c ldr r2, [sp, #44] ; 0x2c a0002644: 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 ) ) { a0002648: e12fff33 blx r3 a000264c: e3500000 cmp r0, #0 a0002650: 0affffbf beq a0002554 return 0; cleanup_and_bail: free( mt_entry ); a0002654: e1a00004 mov r0, r4 a0002658: ebfffdf9 bl a0001e44 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); a000265c: e1a00007 mov r0, r7 a0002660: ebfffdf2 bl a0001e30 return -1; a0002664: e3e05000 mvn r5, #0 a0002668: eaffffd4 b a00025c0 target, filesystemtype, &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); a000266c: eb002d2a bl a000db1c <__errno> <== NOT EXECUTED a0002670: e3a0300c mov r3, #12 <== NOT EXECUTED a0002674: e5803000 str r3, [r0] <== NOT EXECUTED a0002678: e3e05000 mvn r5, #0 <== NOT EXECUTED a000267c: eaffffcf b a00025c0 <== 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 : "/"; a0002680: e59fe0a0 ldr lr, [pc, #160] ; a0002728 a0002684: e3a03002 mov r3, #2 a0002688: e58d300c str r3, [sp, #12] a000268c: e58de018 str lr, [sp, #24] a0002690: e3a0e001 mov lr, #1 a0002694: e58de010 str lr, [sp, #16] a0002698: eaffff74 b a0002470 /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); if ( !mount_h ) rtems_set_errno_and_return_minus_one( EINVAL ); a000269c: eb002d1e bl a000db1c <__errno> a00026a0: e3a03016 mov r3, #22 a00026a4: e5803000 str r3, [r0] a00026a8: e3e05000 mvn r5, #0 a00026ac: eaffffc3 b a00025c0 } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { errno = EINVAL; a00026b0: eb002d19 bl a000db1c <__errno> <== NOT EXECUTED a00026b4: e3a03016 mov r3, #22 <== NOT EXECUTED a00026b8: e5803000 str r3, [r0] <== NOT EXECUTED return 0; cleanup_and_bail: free( mt_entry ); a00026bc: e1a00004 mov r0, r4 <== NOT EXECUTED a00026c0: ebfffddf bl a0001e44 <== NOT EXECUTED if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; a00026c4: e3e05000 mvn r5, #0 <== NOT EXECUTED a00026c8: eaffffbc b a00025c0 <== NOT EXECUTED if ( (*mount_h)( mt_entry, data ) ) { /* * Try to undo the mount operation */ loc.ops->unmount_h( mt_entry ); a00026cc: e59d3028 ldr r3, [sp, #40] ; 0x28 a00026d0: e1a00004 mov r0, r4 a00026d4: e5933028 ldr r3, [r3, #40] ; 0x28 a00026d8: e12fff33 blx r3 return 0; cleanup_and_bail: free( mt_entry ); a00026dc: e1a00004 mov r0, r4 a00026e0: ebfffdd7 bl a0001e44 if ( loc_to_free ) a00026e4: e3570000 cmp r7, #0 rtems_filesystem_freenode( loc_to_free ); return -1; a00026e8: 03e05000 mvneq r5, #0 cleanup_and_bail: free( mt_entry ); if ( loc_to_free ) a00026ec: 0affffb3 beq a00025c0 a00026f0: eaffffd9 b a000265c /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { errno = ENOTDIR; a00026f4: eb002d08 bl a000db1c <__errno> a00026f8: e3a03014 mov r3, #20 a00026fc: e5803000 str r3, [r0] goto cleanup_and_bail; a0002700: eaffffd3 b a0002654 /* * 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; a0002704: eb002d04 bl a000db1c <__errno> a0002708: e3a03010 mov r3, #16 a000270c: e5803000 str r3, [r0] goto cleanup_and_bail; a0002710: eaffffcf b a0002654 =============================================================================== a0002730 : */ int newlib_free_buffers( FILE *fp ) { a0002730: e92d4010 push {r4, lr} a0002734: e1a04000 mov r4, r0 switch ( fileno(fp) ) { a0002738: eb002dfa bl a000df28 a000273c: e3500002 cmp r0, #2 a0002740: 9a000003 bls a0002754 fp->_flags &= ~__SMBF; fp->_bf._base = fp->_p = (unsigned char *) NULL; } break; default: fclose(fp); a0002744: e1a00004 mov r0, r4 <== NOT EXECUTED a0002748: eb002d41 bl a000dc54 <== NOT EXECUTED } return 0; } a000274c: e3a00000 mov r0, #0 a0002750: e8bd8010 pop {r4, pc} { switch ( fileno(fp) ) { case 0: case 1: case 2: if (fp->_flags & __SMBF) { a0002754: e1d430bc ldrh r3, [r4, #12] a0002758: e3130080 tst r3, #128 ; 0x80 a000275c: 0afffffa beq a000274c free( fp->_bf._base ); a0002760: e5940010 ldr r0, [r4, #16] a0002764: ebfffdb6 bl a0001e44 <== NOT EXECUTED fp->_flags &= ~__SMBF; a0002768: e1d420bc ldrh r2, [r4, #12] <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; a000276c: e3a03000 mov r3, #0 <== NOT EXECUTED a0002770: e5843000 str r3, [r4] <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; a0002774: e3c22080 bic r2, r2, #128 ; 0x80 <== NOT EXECUTED a0002778: e1c420bc strh r2, [r4, #12] <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; a000277c: e5843010 str r3, [r4, #16] <== NOT EXECUTED break; default: fclose(fp); } return 0; } a0002780: e3a00000 mov r0, #0 <== NOT EXECUTED a0002784: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== a00039a4 : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { a00039a4: e92d4010 push {r4, lr} int i; if (tty->termios.c_oflag & OPOST) { a00039a8: e5913034 ldr r3, [r1, #52] ; 0x34 /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { a00039ac: e24dd004 sub sp, sp, #4 a00039b0: e1a04001 mov r4, r1 int i; if (tty->termios.c_oflag & OPOST) { a00039b4: e3130001 tst r3, #1 /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { a00039b8: e5cd0000 strb r0, [sp] int i; if (tty->termios.c_oflag & OPOST) { a00039bc: 0a000014 beq a0003a14 switch (c) { a00039c0: e5dd1000 ldrb r1, [sp] a00039c4: e2412008 sub r2, r1, #8 a00039c8: e3520005 cmp r2, #5 a00039cc: 979ff102 ldrls pc, [pc, r2, lsl #2] a00039d0: ea000005 b a00039ec a00039d4: a0003a9c .word 0xa0003a9c a00039d8: a0003a64 .word 0xa0003a64 a00039dc: a0003ab0 .word 0xa0003ab0 a00039e0: a00039ec .word 0xa00039ec a00039e4: a00039ec .word 0xa00039ec a00039e8: a0003a2c .word 0xa0003a2c if (tty->column > 0) tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) a00039ec: e3130002 tst r3, #2 a00039f0: 1a00003a bne a0003ae0 a00039f4: e59f310c ldr r3, [pc, #268] ; a0003b08 a00039f8: e5933000 ldr r3, [r3] c = toupper(c); if (!iscntrl(c)) a00039fc: e0831001 add r1, r3, r1 a0003a00: e5d13001 ldrb r3, [r1, #1] a0003a04: e3130020 tst r3, #32 tty->column++; a0003a08: 05943028 ldreq r3, [r4, #40] ; 0x28 a0003a0c: 02833001 addeq r3, r3, #1 a0003a10: 05843028 streq r3, [r4, #40] ; 0x28 break; } } rtems_termios_puts (&c, 1, tty); a0003a14: e1a0000d mov r0, sp a0003a18: e3a01001 mov r1, #1 a0003a1c: e1a02004 mov r2, r4 a0003a20: ebffff99 bl a000388c } a0003a24: e28dd004 add sp, sp, #4 a0003a28: e8bd8010 pop {r4, pc} tty->column = 0; } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) a0003a2c: e3130010 tst r3, #16 <== NOT EXECUTED a0003a30: 0a000002 beq a0003a40 <== NOT EXECUTED a0003a34: e5942028 ldr r2, [r4, #40] ; 0x28 <== NOT EXECUTED a0003a38: e3520000 cmp r2, #0 <== NOT EXECUTED a0003a3c: 0afffff8 beq a0003a24 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { a0003a40: e2132008 ands r2, r3, #8 <== NOT EXECUTED c = '\n'; if (tty->termios.c_oflag & ONLRET) tty->column = 0; break; } tty->column = 0; a0003a44: 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) { a0003a48: 0afffff1 beq a0003a14 <== NOT EXECUTED c = '\n'; if (tty->termios.c_oflag & ONLRET) a0003a4c: 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'; a0003a50: e3a0300a mov r3, #10 <== NOT EXECUTED a0003a54: e5cd3000 strb r3, [sp] <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) tty->column = 0; a0003a58: 13a03000 movne r3, #0 <== NOT EXECUTED a0003a5c: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED a0003a60: eaffffeb b a0003a14 <== NOT EXECUTED } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); a0003a64: e5942028 ldr r2, [r4, #40] ; 0x28 if ((tty->termios.c_oflag & TABDLY) == XTABS) { a0003a68: e2033b06 and r3, r3, #6144 ; 0x1800 a0003a6c: e3530b06 cmp r3, #6144 ; 0x1800 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); a0003a70: e2021007 and r1, r2, #7 a0003a74: e2611008 rsb r1, r1, #8 if ((tty->termios.c_oflag & TABDLY) == XTABS) { tty->column += i; rtems_termios_puts ( " ", i, tty); return; } tty->column += i; a0003a78: 10811002 addne r1, r1, r2 a0003a7c: 15841028 strne r1, [r4, #40] ; 0x28 tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { a0003a80: 1affffe3 bne a0003a14 tty->column += i; a0003a84: e0812002 add r2, r1, r2 a0003a88: e5842028 str r2, [r4, #40] ; 0x28 rtems_termios_puts ( " ", i, tty); a0003a8c: e59f0078 ldr r0, [pc, #120] ; a0003b0c a0003a90: e1a02004 mov r2, r4 a0003a94: ebffff7c bl a000388c return; a0003a98: eaffffe1 b a0003a24 } tty->column += i; break; case '\b': if (tty->column > 0) a0003a9c: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED a0003aa0: e3530000 cmp r3, #0 <== NOT EXECUTED tty->column--; a0003aa4: c2433001 subgt r3, r3, #1 <== NOT EXECUTED a0003aa8: c5843028 strgt r3, [r4, #40] ; 0x28 <== NOT EXECUTED a0003aac: eaffffd8 b a0003a14 <== NOT EXECUTED int i; if (tty->termios.c_oflag & OPOST) { switch (c) { case '\n': if (tty->termios.c_oflag & ONLRET) a0003ab0: e3130020 tst r3, #32 tty->column = 0; a0003ab4: 13a02000 movne r2, #0 a0003ab8: 15842028 strne r2, [r4, #40] ; 0x28 if (tty->termios.c_oflag & ONLCR) { a0003abc: e3130004 tst r3, #4 a0003ac0: 0affffd3 beq a0003a14 rtems_termios_puts ("\r", 1, tty); a0003ac4: e59f0044 ldr r0, [pc, #68] ; a0003b10 a0003ac8: e3a01001 mov r1, #1 a0003acc: e1a02004 mov r2, r4 a0003ad0: ebffff6d bl a000388c tty->column = 0; a0003ad4: e3a03000 mov r3, #0 a0003ad8: e5843028 str r3, [r4, #40] ; 0x28 a0003adc: eaffffcc b a0003a14 tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) c = toupper(c); a0003ae0: e59f3020 ldr r3, [pc, #32] ; a0003b08 <== NOT EXECUTED a0003ae4: e5933000 ldr r3, [r3] <== NOT EXECUTED a0003ae8: e0832001 add r2, r3, r1 <== NOT EXECUTED a0003aec: e5d22001 ldrb r2, [r2, #1] <== NOT EXECUTED a0003af0: e2022003 and r2, r2, #3 <== NOT EXECUTED a0003af4: e3520002 cmp r2, #2 <== NOT EXECUTED a0003af8: 02411020 subeq r1, r1, #32 <== NOT EXECUTED a0003afc: e20110ff and r1, r1, #255 ; 0xff <== NOT EXECUTED a0003b00: e5cd1000 strb r1, [sp] <== NOT EXECUTED a0003b04: eaffffbc b a00039fc <== NOT EXECUTED =============================================================================== a000ca68 : uint32_t cmd, void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { a000ca68: e59f3060 ldr r3, [pc, #96] ; a000cad0 pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { a000ca6c: e92d4070 push {r4, r5, r6, lr} if (cmd == FIONREAD) { a000ca70: e1510003 cmp r1, r3 pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { a000ca74: e1a05000 mov r5, r0 a000ca78: e1a04002 mov r4, r2 if (cmd == FIONREAD) { a000ca7c: 0a000001 beq a000ca88 *(unsigned int *)buffer = pipe->Length; PIPE_UNLOCK(pipe); return 0; } return -EINVAL; a000ca80: e3e00015 mvn r0, #21 a000ca84: e8bd8070 pop {r4, r5, r6, pc} void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { if (buffer == NULL) a000ca88: e3520000 cmp r2, #0 a000ca8c: 1a000001 bne a000ca98 return -EFAULT; a000ca90: e3e0000d mvn r0, #13 a000ca94: e8bd8070 pop {r4, r5, r6, pc} if (! PIPE_LOCK(pipe)) a000ca98: e3a01000 mov r1, #0 a000ca9c: e5900028 ldr r0, [r0, #40] ; 0x28 a000caa0: e1a02001 mov r2, r1 a000caa4: ebffeb66 bl a0007844 a000caa8: e2506000 subs r6, r0, #0 a000caac: 0a000001 beq a000cab8 return -EINTR; a000cab0: e3e00003 mvn r0, #3 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; } return -EINVAL; } a000cab4: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(unsigned int *)buffer = pipe->Length; a000cab8: e595300c ldr r3, [r5, #12] PIPE_UNLOCK(pipe); a000cabc: e5950028 ldr r0, [r5, #40] ; 0x28 if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(unsigned int *)buffer = pipe->Length; a000cac0: e5843000 str r3, [r4] PIPE_UNLOCK(pipe); a000cac4: ebffeba7 bl a0007968 return 0; a000cac8: e1a00006 mov r0, r6 a000cacc: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== a000c69c : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { a000c69c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} a000c6a0: e1a09001 mov r9, r1 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) a000c6a4: e3a01000 mov r1, #0 pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { a000c6a8: e24dd008 sub sp, sp, #8 a000c6ac: e1a04000 mov r4, r0 a000c6b0: e1a05002 mov r5, r2 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) a000c6b4: e5900028 ldr r0, [r0, #40] ; 0x28 a000c6b8: e1a02001 mov r2, r1 pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { a000c6bc: e1a08003 mov r8, r3 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) a000c6c0: ebffec5f bl a0007844 a000c6c4: e250a000 subs sl, r0, #0 return -EINTR; a000c6c8: 13e07003 mvnne r7, #3 rtems_libio_t *iop ) { int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) a000c6cc: 1a000027 bne a000c770 return -EINTR; while (read < count) { a000c6d0: e3550000 cmp r5, #0 a000c6d4: 01a07005 moveq r7, r5 a000c6d8: 01a06007 moveq r6, r7 a000c6dc: 0a00001f beq a000c760 a000c6e0: e1a0700a mov r7, sl /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe); a000c6e4: e28db004 add fp, sp, #4 if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { a000c6e8: e594200c ldr r2, [r4, #12] a000c6ec: e3520000 cmp r2, #0 a000c6f0: 1a000021 bne a000c77c /* Not an error */ if (pipe->Writers == 0) a000c6f4: e5946014 ldr r6, [r4, #20] a000c6f8: e3560000 cmp r6, #0 a000c6fc: 0a000017 beq a000c760 goto out_locked; if (LIBIO_NODELAY(iop)) { a000c700: e5986014 ldr r6, [r8, #20] a000c704: e2166001 ands r6, r6, #1 a000c708: 1a00003a bne a000c7f8 ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; a000c70c: e5943018 ldr r3, [r4, #24] PIPE_UNLOCK(pipe); a000c710: e5940028 ldr r0, [r4, #40] ; 0x28 ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; a000c714: e2833001 add r3, r3, #1 a000c718: e5843018 str r3, [r4, #24] PIPE_UNLOCK(pipe); a000c71c: ebffec91 bl a0007968 if (! PIPE_READWAIT(pipe)) a000c720: e1a01006 mov r1, r6 a000c724: e594002c ldr r0, [r4, #44] ; 0x2c a000c728: eb000635 bl a000e004 ret = -EINTR; if (! PIPE_LOCK(pipe)) { a000c72c: e1a01006 mov r1, r6 a000c730: e1a02001 mov r2, r1 } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) a000c734: e2506000 subs r6, r0, #0 ret = -EINTR; if (! PIPE_LOCK(pipe)) { a000c738: 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)) a000c73c: 13e06003 mvnne r6, #3 ret = -EINTR; if (! PIPE_LOCK(pipe)) { a000c740: ebffec3f bl a0007844 a000c744: e3500000 cmp r0, #0 a000c748: 1a00002c bne a000c800 /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; a000c74c: e5943018 ldr r3, [r4, #24] if (ret != 0) a000c750: e3560000 cmp r6, #0 if (! PIPE_LOCK(pipe)) { /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; a000c754: e2433001 sub r3, r3, #1 a000c758: e5843018 str r3, [r4, #24] if (ret != 0) a000c75c: 0affffe1 beq a000c6e8 PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); a000c760: e5940028 ldr r0, [r4, #40] ; 0x28 a000c764: ebffec7f bl a0007968 out_nolock: if (read > 0) return read; return ret; a000c768: e3570000 cmp r7, #0 a000c76c: d1a07006 movle r7, r6 } a000c770: e1a00007 mov r0, r7 a000c774: e28dd008 add sp, sp, #8 a000c778: 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; a000c77c: e9941008 ldmib r4, {r3, ip} if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); a000c780: e06a6005 rsb r6, sl, r5 a000c784: e1520006 cmp r2, r6 a000c788: 31a06002 movcc r6, r2 chunk1 = pipe->Size - pipe->Start; a000c78c: e06c3003 rsb r3, ip, r3 if (chunk > chunk1) { a000c790: e1560003 cmp r6, r3 a000c794: ca00001b bgt a000c808 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); a000c798: e5941000 ldr r1, [r4] a000c79c: e089000a add r0, r9, sl a000c7a0: e1a02006 mov r2, r6 a000c7a4: e081100c add r1, r1, ip a000c7a8: eb001266 bl a0011148 pipe->Start += chunk; a000c7ac: e5940008 ldr r0, [r4, #8] pipe->Start %= pipe->Size; a000c7b0: e5941004 ldr r1, [r4, #4] a000c7b4: e0860000 add r0, r6, r0 a000c7b8: eb003e5b bl a001c12c <__umodsi3> pipe->Length -= chunk; a000c7bc: e594300c ldr r3, [r4, #12] } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; a000c7c0: e5840008 str r0, [r4, #8] pipe->Length -= chunk; a000c7c4: e0663003 rsb r3, r6, r3 /* For buffering optimization */ if (PIPE_EMPTY(pipe)) a000c7c8: e3530000 cmp r3, #0 pipe->Start = 0; a000c7cc: 05843008 streq r3, [r4, #8] else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; pipe->Length -= chunk; a000c7d0: e584300c str r3, [r4, #12] /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) a000c7d4: e594301c ldr r3, [r4, #28] a000c7d8: e3530000 cmp r3, #0 a000c7dc: 1a000016 bne a000c83c PIPE_WAKEUPWRITERS(pipe); read += chunk; a000c7e0: e0877006 add r7, r7, r6 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { a000c7e4: e1570005 cmp r7, r5 a000c7e8: e1a0a007 mov sl, r7 a000c7ec: 3affffbd bcc a000c6e8 a000c7f0: e3a06000 mov r6, #0 a000c7f4: eaffffd9 b a000c760 /* Not an error */ if (pipe->Writers == 0) goto out_locked; if (LIBIO_NODELAY(iop)) { ret = -EAGAIN; a000c7f8: e3e0600a mvn r6, #10 a000c7fc: eaffffd7 b a000c760 PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { /* WARN waitingReaders not restored! */ ret = -EINTR; a000c800: e3e06003 mvn r6, #3 <== NOT EXECUTED a000c804: eaffffd7 b a000c768 <== 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); a000c808: e5941000 ldr r1, [r4] a000c80c: e1a02003 mov r2, r3 a000c810: e089000a add r0, r9, sl a000c814: e081100c add r1, r1, ip a000c818: e58d3000 str r3, [sp] a000c81c: eb001249 bl a0011148 memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); a000c820: e59d3000 ldr r3, [sp] a000c824: e5941000 ldr r1, [r4] a000c828: e08a0003 add r0, sl, r3 a000c82c: e0890000 add r0, r9, r0 a000c830: e0632006 rsb r2, r3, r6 a000c834: eb001243 bl a0011148 a000c838: eaffffdb b a000c7ac /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe); a000c83c: e5940030 ldr r0, [r4, #48] ; 0x30 a000c840: e1a0100b mov r1, fp a000c844: eb0005d6 bl a000dfa4 a000c848: eaffffe4 b a000c7e0 =============================================================================== a000c84c : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { a000c84c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) a000c850: e2524000 subs r4, r2, #0 pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { a000c854: e24dd008 sub sp, sp, #8 a000c858: e1a05000 mov r5, r0 a000c85c: e1a06001 mov r6, r1 int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) return 0; a000c860: 01a07004 moveq r7, r4 ) { int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) a000c864: 1a000002 bne a000c874 #endif if (written > 0) return written; return ret; } a000c868: e1a00007 mov r0, r7 a000c86c: e28dd008 add sp, sp, #8 a000c870: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) a000c874: e3a01000 mov r1, #0 a000c878: e5900028 ldr r0, [r0, #40] ; 0x28 a000c87c: e1a02001 mov r2, r1 a000c880: e58d3000 str r3, [sp] a000c884: ebffebee bl a0007844 a000c888: e2509000 subs r9, r0, #0 a000c88c: e59d3000 ldr r3, [sp] return -EINTR; a000c890: 13e07003 mvnne r7, #3 /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) a000c894: 1afffff3 bne a000c868 return -EINTR; if (pipe->Readers == 0) { a000c898: e5957010 ldr r7, [r5, #16] a000c89c: e3570000 cmp r7, #0 a000c8a0: 0a000058 beq a000ca08 ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; a000c8a4: e5958004 ldr r8, [r5, #4] a000c8a8: e1a07009 mov r7, r9 else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); a000c8ac: e28db004 add fp, sp, #4 ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; a000c8b0: e1540008 cmp r4, r8 a000c8b4: 91a0a004 movls sl, r4 a000c8b8: 83a0a001 movhi sl, #1 while (written < count) { while (PIPE_SPACE(pipe) < chunk) { a000c8bc: e595000c ldr r0, [r5, #12] a000c8c0: e0602008 rsb r2, r0, r8 a000c8c4: e152000a cmp r2, sl a000c8c8: 2a000021 bcs a000c954 if (LIBIO_NODELAY(iop)) { a000c8cc: e5938014 ldr r8, [r3, #20] a000c8d0: e2188001 ands r8, r8, #1 a000c8d4: 1a000053 bne a000ca28 ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; a000c8d8: e595201c ldr r2, [r5, #28] PIPE_UNLOCK(pipe); a000c8dc: e5950028 ldr r0, [r5, #40] ; 0x28 ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; a000c8e0: e2822001 add r2, r2, #1 a000c8e4: e585201c str r2, [r5, #28] PIPE_UNLOCK(pipe); a000c8e8: e58d3000 str r3, [sp] a000c8ec: ebffec1d bl a0007968 if (! PIPE_WRITEWAIT(pipe)) a000c8f0: e1a01008 mov r1, r8 a000c8f4: e5950030 ldr r0, [r5, #48] ; 0x30 a000c8f8: eb0005c1 bl a000e004 ret = -EINTR; if (! PIPE_LOCK(pipe)) { a000c8fc: e1a01008 mov r1, r8 a000c900: e1a02001 mov r2, r1 } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) a000c904: e2508000 subs r8, r0, #0 ret = -EINTR; if (! PIPE_LOCK(pipe)) { a000c908: 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)) a000c90c: 13e08003 mvnne r8, #3 ret = -EINTR; if (! PIPE_LOCK(pipe)) { a000c910: ebffebcb bl a0007844 a000c914: e3500000 cmp r0, #0 a000c918: e59d3000 ldr r3, [sp] a000c91c: 1a00003f bne a000ca20 /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; a000c920: e595201c ldr r2, [r5, #28] if (ret != 0) a000c924: e3580000 cmp r8, #0 if (! PIPE_LOCK(pipe)) { /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; a000c928: e2422001 sub r2, r2, #1 a000c92c: e585201c str r2, [r5, #28] if (ret != 0) a000c930: 1a00002d bne a000c9ec goto out_locked; if (pipe->Readers == 0) { a000c934: e5952010 ldr r2, [r5, #16] a000c938: e3520000 cmp r2, #0 a000c93c: 0a000031 beq a000ca08 a000c940: 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) { a000c944: e595000c ldr r0, [r5, #12] a000c948: e0602008 rsb r2, r0, r8 a000c94c: e152000a cmp r2, sl a000c950: 3affffdd bcc a000c8cc goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); chunk1 = pipe->Size - PIPE_WSTART(pipe); a000c954: e595c008 ldr ip, [r5, #8] a000c958: e1a01008 mov r1, r8 ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); a000c95c: e069a004 rsb sl, r9, r4 chunk1 = pipe->Size - PIPE_WSTART(pipe); a000c960: e080000c add r0, r0, ip ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); a000c964: e152000a cmp r2, sl a000c968: 31a0a002 movcc sl, r2 chunk1 = pipe->Size - PIPE_WSTART(pipe); a000c96c: e58d3000 str r3, [sp] a000c970: eb003ded bl a001c12c <__umodsi3> a000c974: e0608008 rsb r8, r0, r8 if (chunk > chunk1) { a000c978: e15a0008 cmp sl, r8 goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); chunk1 = pipe->Size - PIPE_WSTART(pipe); a000c97c: e1a0c000 mov ip, r0 if (chunk > chunk1) { a000c980: e59d3000 ldr r3, [sp] a000c984: da000029 ble a000ca30 memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); a000c988: e5950000 ldr r0, [r5] a000c98c: e0861009 add r1, r6, r9 a000c990: e1a02008 mov r2, r8 a000c994: e080000c add r0, r0, ip a000c998: eb0011ea bl a0011148 memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); a000c99c: e0881009 add r1, r8, r9 a000c9a0: e5950000 ldr r0, [r5] a000c9a4: e0861001 add r1, r6, r1 a000c9a8: e068200a rsb r2, r8, sl a000c9ac: eb0011e5 bl a0011148 a000c9b0: e59d3000 ldr r3, [sp] } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; a000c9b4: e595200c ldr r2, [r5, #12] if (pipe->waitingReaders > 0) a000c9b8: 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; a000c9bc: e082200a add r2, r2, sl if (pipe->waitingReaders > 0) a000c9c0: 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; a000c9c4: e585200c str r2, [r5, #12] if (pipe->waitingReaders > 0) a000c9c8: 1a000020 bne a000ca50 PIPE_WAKEUPREADERS(pipe); written += chunk; a000c9cc: 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) { a000c9d0: e1540007 cmp r4, r7 a000c9d4: e1a09007 mov r9, r7 a000c9d8: 9a000002 bls a000c9e8 a000c9dc: e5958004 ldr r8, [r5, #4] <== NOT EXECUTED pipe->Length += chunk; if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); written += chunk; /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; a000c9e0: e3a0a001 mov sl, #1 <== NOT EXECUTED a000c9e4: eaffffb4 b a000c8bc <== NOT EXECUTED } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { a000c9e8: e3a08000 mov r8, #0 /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); a000c9ec: e5950028 ldr r0, [r5, #40] ; 0x28 a000c9f0: ebffebdc bl a0007968 out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE) a000c9f4: e3780020 cmn r8, #32 a000c9f8: 0a000004 beq a000ca10 kill(getpid(), SIGPIPE); #endif if (written > 0) a000c9fc: e3570000 cmp r7, #0 a000ca00: d1a07008 movle r7, r8 a000ca04: eaffff97 b a000c868 pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { ret = -EPIPE; a000ca08: e3e0801f mvn r8, #31 a000ca0c: eafffff6 b a000c9ec out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE) kill(getpid(), SIGPIPE); a000ca10: eb00022b bl a000d2c4 a000ca14: e3a0100d mov r1, #13 a000ca18: eb0002f5 bl a000d5f4 a000ca1c: eafffff6 b a000c9fc PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { /* WARN waitingWriters not restored! */ ret = -EINTR; a000ca20: e3e08003 mvn r8, #3 <== NOT EXECUTED a000ca24: eafffff4 b a000c9fc <== NOT EXECUTED chunk = count <= pipe->Size ? count : 1; while (written < count) { while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) { ret = -EAGAIN; a000ca28: e3e0800a mvn r8, #10 a000ca2c: eaffffee b a000c9ec 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); a000ca30: e5950000 ldr r0, [r5] a000ca34: e0861009 add r1, r6, r9 a000ca38: e1a0200a mov r2, sl a000ca3c: e080000c add r0, r0, ip a000ca40: e58d3000 str r3, [sp] a000ca44: eb0011bf bl a0011148 a000ca48: e59d3000 ldr r3, [sp] a000ca4c: eaffffd8 b a000c9b4 pipe->Length += chunk; if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); a000ca50: e595002c ldr r0, [r5, #44] ; 0x2c a000ca54: e1a0100b mov r1, fp a000ca58: e58d3000 str r3, [sp] a000ca5c: eb000550 bl a000dfa4 a000ca60: e59d3000 ldr r3, [sp] a000ca64: eaffffd8 b a000c9cc =============================================================================== a000a79c : int pthread_attr_setschedpolicy( pthread_attr_t *attr, int policy ) { if ( !attr || !attr->is_initialized ) a000a79c: e3500000 cmp r0, #0 a000a7a0: 0a00000e beq a000a7e0 a000a7a4: e5903000 ldr r3, [r0] a000a7a8: e3530000 cmp r3, #0 a000a7ac: 0a00000b beq a000a7e0 return EINVAL; switch ( policy ) { a000a7b0: e3510004 cmp r1, #4 a000a7b4: 9a000001 bls a000a7c0 case SCHED_SPORADIC: attr->schedpolicy = policy; return 0; default: return ENOTSUP; a000a7b8: e3a00086 mov r0, #134 ; 0x86 } } a000a7bc: e12fff1e bx lr ) { if ( !attr || !attr->is_initialized ) return EINVAL; switch ( policy ) { a000a7c0: e3a03001 mov r3, #1 a000a7c4: e1a03113 lsl r3, r3, r1 a000a7c8: e3130017 tst r3, #23 case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: case SCHED_SPORADIC: attr->schedpolicy = policy; a000a7cc: 15801014 strne r1, [r0, #20] return 0; a000a7d0: 13a00000 movne r0, #0 ) { if ( !attr || !attr->is_initialized ) return EINVAL; switch ( policy ) { a000a7d4: 112fff1e bxne lr case SCHED_SPORADIC: attr->schedpolicy = policy; return 0; default: return ENOTSUP; a000a7d8: e3a00086 mov r0, #134 ; 0x86 } } a000a7dc: e12fff1e bx lr <== NOT EXECUTED pthread_attr_t *attr, int policy ) { if ( !attr || !attr->is_initialized ) return EINVAL; a000a7e0: e3a00016 mov r0, #22 a000a7e4: e12fff1e bx lr =============================================================================== a00064c8 : int pthread_cond_init( pthread_cond_t *cond, const pthread_condattr_t *attr ) { a00064c8: e92d40f0 push {r4, r5, r6, r7, lr} POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr; else the_attr = &_POSIX_Condition_variables_Default_attributes; a00064cc: e59f60ac ldr r6, [pc, #172] ; a0006580 a00064d0: e3510000 cmp r1, #0 a00064d4: 11a06001 movne r6, r1 /* * Be careful about attributes when global!!! */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) a00064d8: e5963004 ldr r3, [r6, #4] int pthread_cond_init( pthread_cond_t *cond, const pthread_condattr_t *attr ) { a00064dc: e1a05000 mov r5, r0 else the_attr = &_POSIX_Condition_variables_Default_attributes; /* * Be careful about attributes when global!!! */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) a00064e0: e3530001 cmp r3, #1 a00064e4: 0a000020 beq a000656c return EINVAL; if ( !the_attr->is_initialized ) a00064e8: e5963000 ldr r3, [r6] a00064ec: e3530000 cmp r3, #0 a00064f0: 1a000001 bne a00064fc return EINVAL; a00064f4: e3a00016 mov r0, #22 *cond = the_cond->Object.id; _Thread_Enable_dispatch(); return 0; } a00064f8: e8bd80f0 pop {r4, r5, r6, r7, pc} rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; a00064fc: e59f3080 ldr r3, [pc, #128] ; a0006584 a0006500: e5932000 ldr r2, [r3] a0006504: e2822001 add r2, r2, #1 a0006508: e5832000 str r2, [r3] RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control *_POSIX_Condition_variables_Allocate( void ) { return (POSIX_Condition_variables_Control *) _Objects_Allocate( &_POSIX_Condition_variables_Information ); a000650c: e59f7074 ldr r7, [pc, #116] ; a0006588 a0006510: e1a00007 mov r0, r7 a0006514: eb00099c bl a0008b8c <_Objects_Allocate> _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { a0006518: e2504000 subs r4, r0, #0 a000651c: 0a000014 beq a0006574 _Thread_Enable_dispatch(); return ENOMEM; } the_cond->process_shared = the_attr->process_shared; a0006520: e5963004 ldr r3, [r6, #4] the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; _Thread_queue_Initialize( a0006524: e3a02201 mov r2, #268435456 ; 0x10000000 return ENOMEM; } the_cond->process_shared = the_attr->process_shared; the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; a0006528: e3a06000 mov r6, #0 _Thread_queue_Initialize( a000652c: e2840018 add r0, r4, #24 if ( !the_cond ) { _Thread_Enable_dispatch(); return ENOMEM; } the_cond->process_shared = the_attr->process_shared; a0006530: e5843010 str r3, [r4, #16] the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; _Thread_queue_Initialize( a0006534: e1a01006 mov r1, r6 a0006538: e2822b02 add r2, r2, #2048 ; 0x800 a000653c: e3a03074 mov r3, #116 ; 0x74 return ENOMEM; } the_cond->process_shared = the_attr->process_shared; the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; a0006540: e5846014 str r6, [r4, #20] _Thread_queue_Initialize( a0006544: eb000fa7 bl a000a3e8 <_Thread_queue_Initialize> uint32_t name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), a0006548: e5943008 ldr r3, [r4, #8] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; a000654c: e597201c ldr r2, [r7, #28] Objects_Information *information, Objects_Control *the_object, uint32_t name ) { _Objects_Set_local_object( a0006550: e1a01803 lsl r1, r3, #16 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; a0006554: e7824721 str r4, [r2, r1, lsr #14] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; a0006558: e584600c str r6, [r4, #12] &_POSIX_Condition_variables_Information, &the_cond->Object, 0 ); *cond = the_cond->Object.id; a000655c: e5853000 str r3, [r5] _Thread_Enable_dispatch(); a0006560: eb000da1 bl a0009bec <_Thread_Enable_dispatch> return 0; a0006564: e1a00006 mov r0, r6 a0006568: e8bd80f0 pop {r4, r5, r6, r7, pc} /* * Be careful about attributes when global!!! */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) return EINVAL; a000656c: e3a00016 mov r0, #22 a0006570: e8bd80f0 pop {r4, r5, r6, r7, pc} _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { _Thread_Enable_dispatch(); a0006574: eb000d9c bl a0009bec <_Thread_Enable_dispatch> return ENOMEM; a0006578: e3a0000c mov r0, #12 a000657c: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== a0007580 : int pthread_mutexattr_setpshared( pthread_mutexattr_t *attr, int pshared ) { if ( !attr || !attr->is_initialized ) a0007580: e3500000 cmp r0, #0 a0007584: 0a000008 beq a00075ac a0007588: e5903000 ldr r3, [r0] a000758c: e3530000 cmp r3, #0 a0007590: 0a000005 beq a00075ac return EINVAL; switch ( pshared ) { a0007594: e3510001 cmp r1, #1 case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; a0007598: 95801004 strls r1, [r0, #4] return 0; a000759c: 93a00000 movls r0, #0 ) { if ( !attr || !attr->is_initialized ) return EINVAL; switch ( pshared ) { a00075a0: 912fff1e bxls lr case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; default: return EINVAL; a00075a4: e3a00016 mov r0, #22 } } a00075a8: e12fff1e bx lr pthread_mutexattr_t *attr, int pshared ) { if ( !attr || !attr->is_initialized ) return EINVAL; a00075ac: e3a00016 mov r0, #22 a00075b0: e12fff1e bx lr =============================================================================== a0006a40 : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { a0006a40: e92d4030 push {r4, r5, lr} Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) a0006a44: e2505000 subs r5, r0, #0 int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { a0006a48: e24dd00c sub sp, sp, #12 Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) a0006a4c: 0a00001d beq a0006ac8 * * 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 ); a0006a50: e1a00001 mov r0, r1 a0006a54: e28d1004 add r1, sp, #4 a0006a58: eb001a14 bl a000d2b0 <_POSIX_Absolute_timeout_to_ticks> a0006a5c: e5951000 ldr r1, [r5] a0006a60: e1a04000 mov r4, r0 a0006a64: e28d2008 add r2, sp, #8 a0006a68: e59f0098 ldr r0, [pc, #152] ; a0006b08 a0006a6c: eb000ab0 bl a0009534 <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { a0006a70: e59d3008 ldr r3, [sp, #8] a0006a74: e3530000 cmp r3, #0 a0006a78: 1a000012 bne a0006ac8 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( a0006a7c: e5951000 ldr r1, [r5] int _EXFUN(pthread_rwlock_init, (pthread_rwlock_t *__rwlock, _CONST pthread_rwlockattr_t *__attr)); int _EXFUN(pthread_rwlock_destroy, (pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_rdlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_tryrdlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_timedrdlock, a0006a80: e3540003 cmp r4, #3 a0006a84: 13a05000 movne r5, #0 a0006a88: 03a05001 moveq r5, #1 a0006a8c: e58d3000 str r3, [sp] a0006a90: e2800010 add r0, r0, #16 a0006a94: e1a02005 mov r2, r5 a0006a98: e59d3004 ldr r3, [sp, #4] a0006a9c: eb00073a bl a000878c <_CORE_RWLock_Obtain_for_reading> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); a0006aa0: eb000d86 bl a000a0c0 <_Thread_Enable_dispatch> if ( !do_wait ) { a0006aa4: e3550000 cmp r5, #0 a0006aa8: 1a000011 bne a0006af4 if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { a0006aac: e59f3058 ldr r3, [pc, #88] ; a0006b0c a0006ab0: e5933004 ldr r3, [r3, #4] a0006ab4: e5930034 ldr r0, [r3, #52] ; 0x34 a0006ab8: e3500002 cmp r0, #2 a0006abc: 0a000004 beq a0006ad4 status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( a0006ac0: eb000046 bl a0006be0 <_POSIX_RWLock_Translate_core_RWLock_return_code> a0006ac4: ea000000 b a0006acc _Thread_Enable_dispatch(); if ( !do_wait ) { if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) return EINVAL; a0006ac8: e3a00016 mov r0, #22 case OBJECTS_ERROR: break; } return EINVAL; } a0006acc: e28dd00c add sp, sp, #12 a0006ad0: e8bd8030 pop {r4, r5, pc} ); _Thread_Enable_dispatch(); if ( !do_wait ) { if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) a0006ad4: e3540000 cmp r4, #0 a0006ad8: 0afffffa beq a0006ac8 return EINVAL; if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || a0006adc: e2444001 sub r4, r4, #1 a0006ae0: e3540001 cmp r4, #1 status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; a0006ae4: 93a00074 movls r0, #116 ; 0x74 _Thread_Enable_dispatch(); if ( !do_wait ) { if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) return EINVAL; if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || a0006ae8: 9afffff7 bls a0006acc status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( a0006aec: eb00003b bl a0006be0 <_POSIX_RWLock_Translate_core_RWLock_return_code> a0006af0: eafffff5 b a0006acc <== NOT EXECUTED ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait ) { a0006af4: e59f3010 ldr r3, [pc, #16] ; a0006b0c a0006af8: e5933004 ldr r3, [r3, #4] a0006afc: e5930034 ldr r0, [r3, #52] ; 0x34 status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( a0006b00: eb000036 bl a0006be0 <_POSIX_RWLock_Translate_core_RWLock_return_code> a0006b04: eafffff0 b a0006acc =============================================================================== a0006b10 : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { a0006b10: e92d4030 push {r4, r5, lr} Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) a0006b14: e2505000 subs r5, r0, #0 int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { a0006b18: e24dd00c sub sp, sp, #12 Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) a0006b1c: 0a00001d beq a0006b98 * * 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 ); a0006b20: e1a00001 mov r0, r1 a0006b24: e28d1004 add r1, sp, #4 a0006b28: eb0019e0 bl a000d2b0 <_POSIX_Absolute_timeout_to_ticks> a0006b2c: e5951000 ldr r1, [r5] a0006b30: e1a04000 mov r4, r0 a0006b34: e28d2008 add r2, sp, #8 a0006b38: e59f0098 ldr r0, [pc, #152] ; a0006bd8 a0006b3c: eb000a7c bl a0009534 <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { a0006b40: e59d3008 ldr r3, [sp, #8] a0006b44: e3530000 cmp r3, #0 a0006b48: 1a000012 bne a0006b98 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( a0006b4c: e5951000 ldr r1, [r5] (pthread_rwlock_t *__rwlock, _CONST struct timespec *__abstime)); int _EXFUN(pthread_rwlock_unlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_wrlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_trywrlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_timedwrlock, a0006b50: e3540003 cmp r4, #3 a0006b54: 13a05000 movne r5, #0 a0006b58: 03a05001 moveq r5, #1 a0006b5c: e58d3000 str r3, [sp] a0006b60: e2800010 add r0, r0, #16 a0006b64: e1a02005 mov r2, r5 a0006b68: e59d3004 ldr r3, [sp, #4] a0006b6c: eb00073d bl a0008868 <_CORE_RWLock_Obtain_for_writing> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); a0006b70: eb000d52 bl a000a0c0 <_Thread_Enable_dispatch> if ( !do_wait && a0006b74: e3550000 cmp r5, #0 a0006b78: 1a000011 bne a0006bc4 (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { a0006b7c: e59f3058 ldr r3, [pc, #88] ; a0006bdc a0006b80: e5933004 ldr r3, [r3, #4] a0006b84: e5930034 ldr r0, [r3, #52] ; 0x34 ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait && a0006b88: e3500002 cmp r0, #2 a0006b8c: 0a000004 beq a0006ba4 if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } return _POSIX_RWLock_Translate_core_RWLock_return_code( a0006b90: eb000012 bl a0006be0 <_POSIX_RWLock_Translate_core_RWLock_return_code> a0006b94: ea000000 b a0006b9c _Thread_Enable_dispatch(); if ( !do_wait && (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) return EINVAL; a0006b98: e3a00016 mov r0, #22 case OBJECTS_ERROR: break; } return EINVAL; } a0006b9c: e28dd00c add sp, sp, #12 a0006ba0: e8bd8030 pop {r4, r5, pc} ); _Thread_Enable_dispatch(); if ( !do_wait && (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) a0006ba4: e3540000 cmp r4, #0 a0006ba8: 0afffffa beq a0006b98 return EINVAL; if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || a0006bac: e2444001 sub r4, r4, #1 a0006bb0: e3540001 cmp r4, #1 status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; a0006bb4: 93a00074 movls r0, #116 ; 0x74 _Thread_Enable_dispatch(); if ( !do_wait && (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) return EINVAL; if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || a0006bb8: 9afffff7 bls a0006b9c status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } return _POSIX_RWLock_Translate_core_RWLock_return_code( a0006bbc: eb000007 bl a0006be0 <_POSIX_RWLock_Translate_core_RWLock_return_code><== NOT EXECUTED a0006bc0: eafffff5 b a0006b9c <== NOT EXECUTED ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait && a0006bc4: e59f3010 ldr r3, [pc, #16] ; a0006bdc a0006bc8: e5933004 ldr r3, [r3, #4] a0006bcc: e5930034 ldr r0, [r3, #52] ; 0x34 if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } return _POSIX_RWLock_Translate_core_RWLock_return_code( a0006bd0: eb000002 bl a0006be0 <_POSIX_RWLock_Translate_core_RWLock_return_code> a0006bd4: eafffff0 b a0006b9c =============================================================================== a0007370 : int pthread_rwlockattr_setpshared( pthread_rwlockattr_t *attr, int pshared ) { if ( !attr ) a0007370: e3500000 cmp r0, #0 a0007374: 0a000008 beq a000739c return EINVAL; if ( !attr->is_initialized ) a0007378: e5903000 ldr r3, [r0] a000737c: e3530000 cmp r3, #0 a0007380: 0a000005 beq a000739c return EINVAL; switch ( pshared ) { a0007384: e3510001 cmp r1, #1 case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; a0007388: 95801004 strls r1, [r0, #4] return 0; a000738c: 93a00000 movls r0, #0 return EINVAL; if ( !attr->is_initialized ) return EINVAL; switch ( pshared ) { a0007390: 912fff1e bxls lr case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; default: return EINVAL; a0007394: e3a00016 mov r0, #22 <== NOT EXECUTED } } a0007398: e12fff1e bx lr <== NOT EXECUTED { if ( !attr ) return EINVAL; if ( !attr->is_initialized ) return EINVAL; a000739c: e3a00016 mov r0, #22 a00073a0: e12fff1e bx lr =============================================================================== a0005b70 : * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { a0005b70: e92d4010 push {r4, lr} * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) a0005b74: e59f4058 ldr r4, [pc, #88] ; a0005bd4 a0005b78: e5943000 ldr r3, [r4] a0005b7c: e3530000 cmp r3, #0 a0005b80: 1a000010 bne a0005bc8 a0005b84: e59f304c ldr r3, [pc, #76] ; a0005bd8 return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; a0005b88: e5942004 ldr r2, [r4, #4] a0005b8c: e5931000 ldr r1, [r3] a0005b90: e59220fc ldr r2, [r2, #252] ; 0xfc a0005b94: e2811001 add r1, r1, #1 a0005b98: e5831000 str r1, [r3] _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && a0005b9c: e59230d8 ldr r3, [r2, #216] ; 0xd8 a0005ba0: e3530000 cmp r3, #0 a0005ba4: 1a000008 bne a0005bcc a0005ba8: e59230e0 ldr r3, [r2, #224] ; 0xe0 a0005bac: e3530000 cmp r3, #0 a0005bb0: 0a000005 beq a0005bcc thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); a0005bb4: eb000a74 bl a000858c <_Thread_Enable_dispatch> if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); a0005bb8: e5940004 ldr r0, [r4, #4] a0005bbc: e3e01000 mvn r1, #0 } a0005bc0: e8bd4010 pop {r4, lr} thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); a0005bc4: ea0017de b a000bb44 <_POSIX_Thread_Exit> a0005bc8: e8bd8010 pop {r4, pc} } a0005bcc: e8bd4010 pop {r4, lr} _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); a0005bd0: ea000a6d b a000858c <_Thread_Enable_dispatch> =============================================================================== a0003fa0 : int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); a0003fa0: e59f313c ldr r3, [pc, #316] ; a00040e4 ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { a0003fa4: e92d41f0 push {r4, r5, r6, r7, r8, lr} int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); a0003fa8: e5933000 ldr r3, [r3] ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { a0003fac: e1a04002 mov r4, r2 int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); a0003fb0: e1500003 cmp r0, r3 a0003fb4: 2a000045 bcs a00040d0 iop = rtems_libio_iop( fd ); a0003fb8: e59f3128 ldr r3, [pc, #296] ; a00040e8 a0003fbc: e3a06038 mov r6, #56 ; 0x38 a0003fc0: e5933000 ldr r3, [r3] a0003fc4: e0263690 mla r6, r0, r6, r3 rtems_libio_check_is_open( iop ); a0003fc8: e5963014 ldr r3, [r6, #20] a0003fcc: e3130c01 tst r3, #256 ; 0x100 a0003fd0: 0a00003e beq a00040d0 rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); a0003fd4: e3130002 tst r3, #2 a0003fd8: 0a000036 beq a00040b8 /* * Argument validation on IO vector */ if ( !iov ) a0003fdc: e3510000 cmp r1, #0 a0003fe0: 0a000034 beq a00040b8 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) a0003fe4: e3520000 cmp r2, #0 a0003fe8: da000032 ble a00040b8 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) a0003fec: e3520b01 cmp r2, #1024 ; 0x400 a0003ff0: ca000030 bgt a00040b8 a0003ff4: e3a02000 mov r2, #0 rtems_set_errno_and_return_minus_one( EINVAL ); a0003ff8: 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 ) a0003ffc: e1a03001 mov r3, r1 a0004000: e3a07001 mov r7, #1 a0004004: e1a01002 mov r1, r2 a0004008: ea000000 b a0004010 if ( iov[v].iov_base == 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; a000400c: e1a0100c mov r1, ip /* * iov[v].iov_len cannot be less than 0 because size_t is unsigned. * So we only check for zero. */ if ( iov[v].iov_base == 0 ) a0004010: 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++ ) { a0004014: e2822001 add r2, r2, #1 /* * iov[v].iov_len cannot be less than 0 because size_t is unsigned. * So we only check for zero. */ if ( iov[v].iov_base == 0 ) a0004018: e3500000 cmp r0, #0 a000401c: 0a000025 beq a00040b8 rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; a0004020: 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++ ) { a0004024: e2833008 add r3, r3, #8 if ( iov[v].iov_base == 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; a0004028: e081c000 add ip, r1, r0 if ( total < old ) a000402c: e151000c cmp r1, ip a0004030: ca000020 bgt a00040b8 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) all_zeros = false; a0004034: e3500000 cmp r0, #0 a0004038: 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++ ) { a000403c: e1540002 cmp r4, r2 a0004040: cafffff1 bgt a000400c /* * 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 ) { a0004044: e3570000 cmp r7, #0 return 0; a0004048: 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 ) { a000404c: 1a00001d bne a00040c8 a0004050: e1a08007 mov r8, r7 a0004054: ea00000d b a0004090 ); if ( bytes < 0 ) return -1; if ( bytes > 0 ) { a0004058: 0a000006 beq a0004078 iop->offset += bytes; a000405c: e286300c add r3, r6, #12 a0004060: e893000c ldm r3, {r2, r3} a0004064: e0922000 adds r2, r2, r0 a0004068: e0a33fc0 adc r3, r3, r0, asr #31 a000406c: e586200c str r2, [r6, #12] a0004070: e5863010 str r3, [r6, #16] total += bytes; a0004074: e0888000 add r8, r8, r0 } if (bytes != iov[ v ].iov_len) a0004078: e5953004 ldr r3, [r5, #4] } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { a000407c: e2855008 add r5, r5, #8 if ( bytes > 0 ) { iop->offset += bytes; total += bytes; } if (bytes != iov[ v ].iov_len) a0004080: e1500003 cmp r0, r3 a0004084: 1a00000f bne a00040c8 } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { a0004088: e1540007 cmp r4, r7 a000408c: da00000d ble a00040c8 bytes = (*iop->pathinfo.handlers->read_h)( a0004090: e5963020 ldr r3, [r6, #32] a0004094: e8950006 ldm r5, {r1, r2} a0004098: e5933008 ldr r3, [r3, #8] a000409c: e1a00006 mov r0, r6 a00040a0: e12fff33 blx r3 iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) a00040a4: e3500000 cmp r0, #0 } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { a00040a8: e2877001 add r7, r7, #1 iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) a00040ac: aaffffe9 bge a0004058 return -1; a00040b0: e3e08000 mvn r8, #0 <== NOT EXECUTED a00040b4: ea000003 b a00040c8 <== NOT EXECUTED /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old ) rtems_set_errno_and_return_minus_one( EINVAL ); a00040b8: eb002acb bl a000ebec <__errno> a00040bc: e3a03016 mov r3, #22 a00040c0: e5803000 str r3, [r0] a00040c4: e3e08000 mvn r8, #0 if (bytes != iov[ v ].iov_len) break; } return total; } a00040c8: e1a00008 mov r0, r8 a00040cc: 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 ); a00040d0: eb002ac5 bl a000ebec <__errno> a00040d4: e3a03009 mov r3, #9 a00040d8: e5803000 str r3, [r0] a00040dc: e3e08000 mvn r8, #0 a00040e0: eafffff8 b a00040c8 =============================================================================== a0012b98 : void *realloc( void *ptr, size_t size ) { a0012b98: 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())) { a0012b9c: e59f3118 ldr r3, [pc, #280] ; a0012cbc ) { uintptr_t old_size; char *new_area; MSBUMP(realloc_calls, 1); a0012ba0: e59f5118 ldr r5, [pc, #280] ; a0012cc0 void *realloc( void *ptr, size_t size ) { a0012ba4: e24dd004 sub sp, sp, #4 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { a0012ba8: e5933000 ldr r3, [r3] ) { uintptr_t old_size; char *new_area; MSBUMP(realloc_calls, 1); a0012bac: e5952010 ldr r2, [r5, #16] void *realloc( void *ptr, size_t size ) { a0012bb0: e1a04000 mov r4, r0 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { a0012bb4: e3530003 cmp r3, #3 ) { uintptr_t old_size; char *new_area; MSBUMP(realloc_calls, 1); a0012bb8: e2822001 add r2, r2, #1 void *realloc( void *ptr, size_t size ) { a0012bbc: e1a06001 mov r6, r1 uintptr_t old_size; char *new_area; MSBUMP(realloc_calls, 1); a0012bc0: e5852010 str r2, [r5, #16] /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { a0012bc4: 0a000020 beq a0012c4c } /* * Continue with realloc(). */ if ( !ptr ) a0012bc8: e3540000 cmp r4, #0 a0012bcc: 0a00001a beq a0012c3c return malloc( size ); if ( !size ) { a0012bd0: e3560000 cmp r6, #0 a0012bd4: 0a00000f beq a0012c18 free( ptr ); return (void *) 0; } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { a0012bd8: e59f70e4 ldr r7, [pc, #228] ; a0012cc4 a0012bdc: e1a01004 mov r1, r4 a0012be0: e1a0200d mov r2, sp a0012be4: e5970000 ldr r0, [r7] a0012be8: eb000066 bl a0012d88 <_Protected_heap_Get_block_size> a0012bec: e2508000 subs r8, r0, #0 a0012bf0: 0a00000c beq a0012c28 } /* * Now resize it. */ if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, size ) ) { a0012bf4: e5970000 ldr r0, [r7] a0012bf8: e1a01004 mov r1, r4 a0012bfc: e1a02006 mov r2, r6 a0012c00: eb000071 bl a0012dcc <_Protected_heap_Resize_block> a0012c04: e3500000 cmp r0, #0 a0012c08: 0a00001a beq a0012c78 memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } a0012c0c: e1a00004 mov r0, r4 a0012c10: e28dd004 add sp, sp, #4 a0012c14: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} */ if ( !ptr ) return malloc( size ); if ( !size ) { free( ptr ); a0012c18: e1a00004 mov r0, r4 <== NOT EXECUTED a0012c1c: ebffbc88 bl a0001e44 <== NOT EXECUTED return (void *) 0; a0012c20: e1a04006 mov r4, r6 <== NOT EXECUTED a0012c24: eafffff8 b a0012c0c <== NOT EXECUTED } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { errno = EINVAL; a0012c28: ebffebbb bl a000db1c <__errno> a0012c2c: e3a03016 mov r3, #22 a0012c30: e5803000 str r3, [r0] return (void *) 0; a0012c34: e1a04008 mov r4, r8 a0012c38: eafffff3 b a0012c0c /* * Continue with realloc(). */ if ( !ptr ) return malloc( size ); a0012c3c: e1a00006 mov r0, r6 a0012c40: ebffbd66 bl a00021e0 a0012c44: e1a04000 mov r4, r0 a0012c48: eaffffef b a0012c0c /* * 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) a0012c4c: e59f3074 ldr r3, [pc, #116] ; a0012cc8 a0012c50: e5933000 ldr r3, [r3] a0012c54: e3530000 cmp r3, #0 return (void *) 0; a0012c58: 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) a0012c5c: 1affffea bne a0012c0c return (void *) 0; if (_ISR_Nest_level > 0) a0012c60: e59f2064 ldr r2, [pc, #100] ; a0012ccc a0012c64: e5922000 ldr r2, [r2] a0012c68: e3520000 cmp r2, #0 return (void *) 0; a0012c6c: 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) a0012c70: 0affffd4 beq a0012bc8 a0012c74: eaffffe4 b a0012c0c <== 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 ); a0012c78: e1a00006 mov r0, r6 a0012c7c: ebffbd57 bl a00021e0 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ a0012c80: e5953004 ldr r3, [r5, #4] if ( !new_area ) { a0012c84: e2507000 subs r7, r0, #0 return (void *) 0; a0012c88: 01a04007 moveq r4, r7 * and the C Standard. */ new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ a0012c8c: e2433001 sub r3, r3, #1 a0012c90: e5853004 str r3, [r5, #4] if ( !new_area ) { a0012c94: 0affffdc beq a0012c0c return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); a0012c98: e59d2000 ldr r2, [sp] a0012c9c: e1a01004 mov r1, r4 a0012ca0: e1560002 cmp r6, r2 a0012ca4: 31a02006 movcc r2, r6 a0012ca8: ebffedc9 bl a000e3d4 free( ptr ); a0012cac: e1a00004 mov r0, r4 a0012cb0: ebffbc63 bl a0001e44 return new_area; a0012cb4: e1a04007 mov r4, r7 a0012cb8: eaffffd3 b a0012c0c =============================================================================== a00067b0 : * errno - otherwise */ int rtems_aio_enqueue (rtems_aio_request *req) { a00067b0: e92d41f0 push {r4, r5, r6, r7, r8, lr} struct sched_param param; /* The queue should be initialized */ AIO_assert (aio_request_queue.initialized == AIO_QUEUE_INITIALIZED); result = pthread_mutex_lock (&aio_request_queue.mutex); a00067b4: e59f41c4 ldr r4, [pc, #452] ; a0006980 * errno - otherwise */ int rtems_aio_enqueue (rtems_aio_request *req) { a00067b8: e24dd024 sub sp, sp, #36 ; 0x24 a00067bc: e1a06000 mov r6, r0 struct sched_param param; /* The queue should be initialized */ AIO_assert (aio_request_queue.initialized == AIO_QUEUE_INITIALIZED); result = pthread_mutex_lock (&aio_request_queue.mutex); a00067c0: e1a00004 mov r0, r4 a00067c4: eb00025a bl a0007134 if (result != 0) { a00067c8: e2505000 subs r5, r0, #0 a00067cc: 1a00002a bne a000687c return result; } /* _POSIX_PRIORITIZED_IO and _POSIX_PRIORITY_SCHEDULING are defined, we can use aio_reqprio to lower the priority of the request */ pthread_getschedparam (pthread_self(), &policy, ¶m); a00067d0: eb000488 bl a00079f8 a00067d4: e28d101c add r1, sp, #28 a00067d8: e1a0200d mov r2, sp a00067dc: eb000383 bl a00075f0 req->caller_thread = pthread_self (); a00067e0: eb000484 bl a00079f8 req->priority = param.sched_priority - req->aiocbp->aio_reqprio; a00067e4: e5963014 ldr r3, [r6, #20] a00067e8: e59dc000 ldr ip, [sp] req->policy = policy; req->aiocbp->error_code = EINPROGRESS; req->aiocbp->return_value = 0; if ((aio_request_queue.idle_threads == 0) && a00067ec: e5941068 ldr r1, [r4, #104] ; 0x68 /* _POSIX_PRIORITIZED_IO and _POSIX_PRIORITY_SCHEDULING are defined, we can use aio_reqprio to lower the priority of the request */ pthread_getschedparam (pthread_self(), &policy, ¶m); req->caller_thread = pthread_self (); req->priority = param.sched_priority - req->aiocbp->aio_reqprio; a00067f0: e5932014 ldr r2, [r3, #20] /* _POSIX_PRIORITIZED_IO and _POSIX_PRIORITY_SCHEDULING are defined, we can use aio_reqprio to lower the priority of the request */ pthread_getschedparam (pthread_self(), &policy, ¶m); req->caller_thread = pthread_self (); a00067f4: e5860010 str r0, [r6, #16] req->priority = param.sched_priority - req->aiocbp->aio_reqprio; req->policy = policy; req->aiocbp->error_code = EINPROGRESS; req->aiocbp->return_value = 0; if ((aio_request_queue.idle_threads == 0) && a00067f8: e3510000 cmp r1, #0 /* _POSIX_PRIORITIZED_IO and _POSIX_PRIORITY_SCHEDULING are defined, we can use aio_reqprio to lower the priority of the request */ pthread_getschedparam (pthread_self(), &policy, ¶m); req->caller_thread = pthread_self (); req->priority = param.sched_priority - req->aiocbp->aio_reqprio; a00067fc: e062200c rsb r2, r2, ip a0006800: e586200c str r2, [r6, #12] req->policy = policy; a0006804: e59d201c ldr r2, [sp, #28] a0006808: e5862008 str r2, [r6, #8] req->aiocbp->error_code = EINPROGRESS; a000680c: e3a02077 mov r2, #119 ; 0x77 a0006810: e5832030 str r2, [r3, #48] ; 0x30 req->aiocbp->return_value = 0; a0006814: e5835034 str r5, [r3, #52] ; 0x34 if ((aio_request_queue.idle_threads == 0) && a0006818: 1a000002 bne a0006828 a000681c: e5942064 ldr r2, [r4, #100] ; 0x64 a0006820: e3520004 cmp r2, #4 a0006824: da000017 ble a0006888 else { /* the maximum number of threads has been already created even though some of them might be idle. The request belongs to one of the active fd chain */ r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, a0006828: e59f0154 ldr r0, [pc, #340] ; a0006984 a000682c: e5931000 ldr r1, [r3] a0006830: e3a02000 mov r2, #0 a0006834: ebfffebf bl a0006338 req->aiocbp->aio_fildes, 0); if (r_chain != NULL) a0006838: e2507000 subs r7, r0, #0 a000683c: 0a00002e beq a00068fc { pthread_mutex_lock (&r_chain->mutex); a0006840: e287401c add r4, r7, #28 a0006844: e1a00004 mov r0, r4 a0006848: eb000239 bl a0007134 rtems_aio_insert_prio (&r_chain->perfd, req); a000684c: e2870008 add r0, r7, #8 a0006850: e1a01006 mov r1, r6 a0006854: ebffff8e bl a0006694 pthread_cond_signal (&r_chain->cond); a0006858: e2870020 add r0, r7, #32 a000685c: eb00011b bl a0006cd0 pthread_mutex_unlock (&r_chain->mutex); a0006860: e1a00004 mov r0, r4 a0006864: eb000253 bl a00071b8 /* just insert the request in the existing fd chain */ rtems_aio_insert_prio (&r_chain->perfd, req); } } pthread_mutex_unlock (&aio_request_queue.mutex); a0006868: e59f0110 ldr r0, [pc, #272] ; a0006980 a000686c: eb000251 bl a00071b8 return 0; } a0006870: e1a00005 mov r0, r5 a0006874: e28dd024 add sp, sp, #36 ; 0x24 a0006878: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} /* The queue should be initialized */ AIO_assert (aio_request_queue.initialized == AIO_QUEUE_INITIALIZED); result = pthread_mutex_lock (&aio_request_queue.mutex); if (result != 0) { free (req); a000687c: e1a00006 mov r0, r6 <== NOT EXECUTED a0006880: ebfff0bb bl a0002b74 <== NOT EXECUTED return result; a0006884: eafffff9 b a0006870 <== NOT EXECUTED if ((aio_request_queue.idle_threads == 0) && aio_request_queue.active_threads < AIO_MAX_THREADS) /* we still have empty places on the active_threads chain */ { chain = &aio_request_queue.work_req; r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1); a0006888: e5931000 ldr r1, [r3] a000688c: e2840048 add r0, r4, #72 ; 0x48 a0006890: e3a02001 mov r2, #1 a0006894: ebfffea7 bl a0006338 if (r_chain->new_fd == 1) { a0006898: e5903018 ldr r3, [r0, #24] if ((aio_request_queue.idle_threads == 0) && aio_request_queue.active_threads < AIO_MAX_THREADS) /* we still have empty places on the active_threads chain */ { chain = &aio_request_queue.work_req; r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1); a000689c: e1a07000 mov r7, r0 if (r_chain->new_fd == 1) { a00068a0: e3530001 cmp r3, #1 a00068a4: 1affffe5 bne a0006840 RTEMS_INLINE_ROUTINE void _Chain_Prepend( Chain_Control *the_chain, Chain_Node *the_node ) { _Chain_Insert(_Chain_Head(the_chain), the_node); a00068a8: e1a01006 mov r1, r6 a00068ac: e2800008 add r0, r0, #8 a00068b0: eb00089f bl a0008b34 <_Chain_Insert> rtems_chain_prepend (&r_chain->perfd, &req->next_prio); r_chain->new_fd = 0; pthread_mutex_init (&r_chain->mutex, NULL); a00068b4: e1a01005 mov r1, r5 chain = &aio_request_queue.work_req; r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1); if (r_chain->new_fd == 1) { rtems_chain_prepend (&r_chain->perfd, &req->next_prio); r_chain->new_fd = 0; a00068b8: e5875018 str r5, [r7, #24] pthread_mutex_init (&r_chain->mutex, NULL); a00068bc: e287001c add r0, r7, #28 a00068c0: eb0001c7 bl a0006fe4 pthread_cond_init (&r_chain->cond, NULL); a00068c4: e1a01005 mov r1, r5 a00068c8: e2870020 add r0, r7, #32 a00068cc: eb0000ce bl a0006c0c AIO_printf ("New thread \n"); result = pthread_create (&thid, &aio_request_queue.attr, a00068d0: e28d0020 add r0, sp, #32 a00068d4: e2841008 add r1, r4, #8 a00068d8: e59f20a8 ldr r2, [pc, #168] ; a0006988 a00068dc: e1a03007 mov r3, r7 a00068e0: eb00029a bl a0007350 rtems_aio_handle, (void *) r_chain); if (result != 0) { a00068e4: e2506000 subs r6, r0, #0 a00068e8: 1a000020 bne a0006970 pthread_mutex_unlock (&aio_request_queue.mutex); return result; } ++aio_request_queue.active_threads; a00068ec: e5943064 ldr r3, [r4, #100] ; 0x64 a00068f0: e2833001 add r3, r3, #1 a00068f4: e5843064 str r3, [r4, #100] ; 0x64 a00068f8: eaffffda b a0006868 } else { /* or to the idle chain */ chain = &aio_request_queue.idle_req; r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1); a00068fc: e5963014 ldr r3, [r6, #20] a0006900: e59f0084 ldr r0, [pc, #132] ; a000698c a0006904: e3a02001 mov r2, #1 a0006908: e5931000 ldr r1, [r3] a000690c: ebfffe89 bl a0006338 if (r_chain->new_fd == 1) { a0006910: e5903018 ldr r3, [r0, #24] } else { /* or to the idle chain */ chain = &aio_request_queue.idle_req; r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1); a0006914: e1a08000 mov r8, r0 if (r_chain->new_fd == 1) { a0006918: e3530001 cmp r3, #1 a000691c: 0a000003 beq a0006930 pthread_cond_init (&r_chain->cond, NULL); pthread_cond_signal (&aio_request_queue.new_req); ++aio_request_queue.idle_threads; } else /* just insert the request in the existing fd chain */ rtems_aio_insert_prio (&r_chain->perfd, req); a0006920: e2800008 add r0, r0, #8 a0006924: e1a01006 mov r1, r6 a0006928: ebffff59 bl a0006694 a000692c: eaffffcd b a0006868 a0006930: e2800008 add r0, r0, #8 a0006934: e1a01006 mov r1, r6 a0006938: eb00087d bl a0008b34 <_Chain_Insert> /* If this is a new fd chain we signal the idle threads that might be waiting for requests */ AIO_printf (" New chain on waiting queue \n "); rtems_chain_prepend (&r_chain->perfd, &req->next_prio); r_chain->new_fd = 0; pthread_mutex_init (&r_chain->mutex, NULL); a000693c: e1a01007 mov r1, r7 if (r_chain->new_fd == 1) { /* If this is a new fd chain we signal the idle threads that might be waiting for requests */ AIO_printf (" New chain on waiting queue \n "); rtems_chain_prepend (&r_chain->perfd, &req->next_prio); r_chain->new_fd = 0; a0006940: e5887018 str r7, [r8, #24] pthread_mutex_init (&r_chain->mutex, NULL); a0006944: e288001c add r0, r8, #28 a0006948: eb0001a5 bl a0006fe4 pthread_cond_init (&r_chain->cond, NULL); a000694c: e1a01007 mov r1, r7 a0006950: e2880020 add r0, r8, #32 a0006954: eb0000ac bl a0006c0c pthread_cond_signal (&aio_request_queue.new_req); a0006958: e59f0030 ldr r0, [pc, #48] ; a0006990 a000695c: eb0000db bl a0006cd0 ++aio_request_queue.idle_threads; a0006960: e5943068 ldr r3, [r4, #104] ; 0x68 a0006964: e2833001 add r3, r3, #1 a0006968: e5843068 str r3, [r4, #104] ; 0x68 a000696c: eaffffbd b a0006868 AIO_printf ("New thread \n"); result = pthread_create (&thid, &aio_request_queue.attr, rtems_aio_handle, (void *) r_chain); if (result != 0) { pthread_mutex_unlock (&aio_request_queue.mutex); a0006970: e1a00004 mov r0, r4 <== NOT EXECUTED a0006974: eb00020f bl a00071b8 <== NOT EXECUTED return result; a0006978: e1a05006 mov r5, r6 <== NOT EXECUTED a000697c: eaffffbb b a0006870 <== NOT EXECUTED =============================================================================== a0006404 : * NULL - if error */ static void * rtems_aio_handle (void *arg) { a0006404: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED a0006408: e24dd02c sub sp, sp, #44 ; 0x2c <== NOT EXECUTED a000640c: e1a05000 mov r5, r0 <== NOT EXECUTED a0006410: e280601c add r6, r0, #28 <== NOT EXECUTED node = rtems_chain_first (chain); req = (rtems_aio_request *) node; /* See _POSIX_PRIORITIZE_IO and _POSIX_PRIORITY_SCHEDULING discussion in rtems_aio_enqueue () */ pthread_getschedparam (pthread_self(), &policy, ¶m); a0006414: e28d8028 add r8, sp, #40 ; 0x28 <== NOT EXECUTED a0006418: e28d7004 add r7, sp, #4 <== NOT EXECUTED default: result = -1; } if (result == -1) { req->aiocbp->return_value = -1; a000641c: e3e0b000 mvn fp, #0 <== NOT EXECUTED req->aiocbp->error_code = errno; } else { req->aiocbp->return_value = result; req->aiocbp->error_code = 0; a0006420: e3a09000 mov r9, #0 <== NOT EXECUTED /* acquire the mutex of the current fd chain. we don't need to lock the queue mutex since we can add requests to idle fd chains or even active ones if the working request has been extracted from the chain */ result = pthread_mutex_lock (&r_chain->mutex); a0006424: e1a00006 mov r0, r6 <== NOT EXECUTED a0006428: eb000341 bl a0007134 <== NOT EXECUTED if (result != 0) a000642c: e250a000 subs sl, r0, #0 <== NOT EXECUTED a0006430: 1a000021 bne a00064bc <== NOT EXECUTED } AIO_printf ("Thread finished\n"); return NULL; } a0006434: e5954008 ldr r4, [r5, #8] <== NOT EXECUTED RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); a0006438: e285300c add r3, r5, #12 <== NOT EXECUTED /* If the locked chain is not empty, take the first request extract it, unlock the chain and process the request, in this way the user can supply more requests to this fd chain */ if (!rtems_chain_is_empty (chain)) { a000643c: e1540003 cmp r4, r3 <== NOT EXECUTED a0006440: 0a000038 beq a0006528 <== NOT EXECUTED node = rtems_chain_first (chain); req = (rtems_aio_request *) node; /* See _POSIX_PRIORITIZE_IO and _POSIX_PRIORITY_SCHEDULING discussion in rtems_aio_enqueue () */ pthread_getschedparam (pthread_self(), &policy, ¶m); a0006444: eb00056b bl a00079f8 <== NOT EXECUTED a0006448: e1a01008 mov r1, r8 <== NOT EXECUTED a000644c: e1a02007 mov r2, r7 <== NOT EXECUTED a0006450: eb000466 bl a00075f0 <== NOT EXECUTED param.sched_priority = req->priority; a0006454: e594300c ldr r3, [r4, #12] <== NOT EXECUTED a0006458: e58d3004 str r3, [sp, #4] <== NOT EXECUTED pthread_setschedparam (pthread_self(), req->policy, ¶m); a000645c: eb000565 bl a00079f8 <== NOT EXECUTED a0006460: e5941008 ldr r1, [r4, #8] <== NOT EXECUTED a0006464: e1a02007 mov r2, r7 <== NOT EXECUTED a0006468: eb000567 bl a0007a0c <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); a000646c: e1a00004 mov r0, r4 <== NOT EXECUTED a0006470: eb00099a bl a0008ae0 <_Chain_Extract> <== NOT EXECUTED rtems_chain_extract (node); pthread_mutex_unlock (&r_chain->mutex); a0006474: e1a00006 mov r0, r6 <== NOT EXECUTED a0006478: eb00034e bl a00071b8 <== NOT EXECUTED switch (req->aiocbp->aio_lio_opcode) { a000647c: e594a014 ldr sl, [r4, #20] <== NOT EXECUTED a0006480: e59a302c ldr r3, [sl, #44] ; 0x2c <== NOT EXECUTED a0006484: e3530002 cmp r3, #2 <== NOT EXECUTED a0006488: 0a00001e beq a0006508 <== NOT EXECUTED a000648c: e3530003 cmp r3, #3 <== NOT EXECUTED a0006490: 0a000019 beq a00064fc <== NOT EXECUTED a0006494: e3530001 cmp r3, #1 <== NOT EXECUTED a0006498: 0a00000a beq a00064c8 <== NOT EXECUTED default: result = -1; } if (result == -1) { req->aiocbp->return_value = -1; a000649c: e58ab034 str fp, [sl, #52] ; 0x34 <== NOT EXECUTED req->aiocbp->error_code = errno; a00064a0: eb0028ba bl a0010790 <__errno> <== NOT EXECUTED a00064a4: e5903000 ldr r3, [r0] <== NOT EXECUTED /* acquire the mutex of the current fd chain. we don't need to lock the queue mutex since we can add requests to idle fd chains or even active ones if the working request has been extracted from the chain */ result = pthread_mutex_lock (&r_chain->mutex); a00064a8: e1a00006 mov r0, r6 <== NOT EXECUTED default: result = -1; } if (result == -1) { req->aiocbp->return_value = -1; req->aiocbp->error_code = errno; a00064ac: e58a3030 str r3, [sl, #48] ; 0x30 <== NOT EXECUTED /* acquire the mutex of the current fd chain. we don't need to lock the queue mutex since we can add requests to idle fd chains or even active ones if the working request has been extracted from the chain */ result = pthread_mutex_lock (&r_chain->mutex); a00064b0: eb00031f bl a0007134 <== NOT EXECUTED if (result != 0) a00064b4: e250a000 subs sl, r0, #0 <== NOT EXECUTED a00064b8: 0affffdd beq a0006434 <== NOT EXECUTED } AIO_printf ("Thread finished\n"); return NULL; } a00064bc: e3a00000 mov r0, #0 <== NOT EXECUTED a00064c0: e28dd02c add sp, sp, #44 ; 0x2c <== NOT EXECUTED a00064c4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED pthread_mutex_unlock (&r_chain->mutex); switch (req->aiocbp->aio_lio_opcode) { case LIO_READ: result = pread (req->aiocbp->aio_fildes, a00064c8: e59ac008 ldr ip, [sl, #8] <== NOT EXECUTED a00064cc: e59a0000 ldr r0, [sl] <== NOT EXECUTED a00064d0: e59a100c ldr r1, [sl, #12] <== NOT EXECUTED a00064d4: e59a2010 ldr r2, [sl, #16] <== NOT EXECUTED a00064d8: e59a3004 ldr r3, [sl, #4] <== NOT EXECUTED a00064dc: e58dc000 str ip, [sp] <== NOT EXECUTED a00064e0: eb002bac bl a0011398 <== NOT EXECUTED break; default: result = -1; } if (result == -1) { a00064e4: e3700001 cmn r0, #1 <== NOT EXECUTED a00064e8: 0a000060 beq a0006670 <== NOT EXECUTED req->aiocbp->return_value = -1; req->aiocbp->error_code = errno; } else { req->aiocbp->return_value = result; a00064ec: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED a00064f0: e5830034 str r0, [r3, #52] ; 0x34 <== NOT EXECUTED req->aiocbp->error_code = 0; a00064f4: e5839030 str r9, [r3, #48] ; 0x30 <== NOT EXECUTED a00064f8: eaffffc9 b a0006424 <== NOT EXECUTED (void *) req->aiocbp->aio_buf, req->aiocbp->aio_nbytes, req->aiocbp->aio_offset); break; case LIO_SYNC: result = fsync (req->aiocbp->aio_fildes); a00064fc: e59a0000 ldr r0, [sl] <== NOT EXECUTED a0006500: eb001aee bl a000d0c0 <== NOT EXECUTED break; a0006504: eafffff6 b a00064e4 <== NOT EXECUTED (void *) req->aiocbp->aio_buf, req->aiocbp->aio_nbytes, req->aiocbp->aio_offset); break; case LIO_WRITE: result = pwrite (req->aiocbp->aio_fildes, a0006508: e59ac008 ldr ip, [sl, #8] <== NOT EXECUTED a000650c: e59a0000 ldr r0, [sl] <== NOT EXECUTED a0006510: e59a100c ldr r1, [sl, #12] <== NOT EXECUTED a0006514: e59a2010 ldr r2, [sl, #16] <== NOT EXECUTED a0006518: e59a3004 ldr r3, [sl, #4] <== NOT EXECUTED a000651c: e58dc000 str ip, [sp] <== NOT EXECUTED a0006520: eb002be4 bl a00114b8 <== NOT EXECUTED (void *) req->aiocbp->aio_buf, req->aiocbp->aio_nbytes, req->aiocbp->aio_offset); break; a0006524: eaffffee b a00064e4 <== NOT EXECUTED wait for a signal on chain, this will unlock the queue. The fd chain is already unlocked */ struct timespec timeout; pthread_mutex_unlock (&r_chain->mutex); a0006528: e1a00006 mov r0, r6 <== NOT EXECUTED a000652c: eb000321 bl a00071b8 <== NOT EXECUTED pthread_mutex_lock (&aio_request_queue.mutex); a0006530: e59f014c ldr r0, [pc, #332] ; a0006684 <== NOT EXECUTED a0006534: eb0002fe bl a0007134 <== NOT EXECUTED if (rtems_chain_is_empty (chain)) a0006538: e5953008 ldr r3, [r5, #8] <== NOT EXECUTED a000653c: e1540003 cmp r4, r3 <== NOT EXECUTED a0006540: 1affffb7 bne a0006424 <== NOT EXECUTED { clock_gettime (CLOCK_REALTIME, &timeout); a0006544: e28d1020 add r1, sp, #32 <== NOT EXECUTED a0006548: e3a00001 mov r0, #1 <== NOT EXECUTED a000654c: eb000158 bl a0006ab4 <== NOT EXECUTED timeout.tv_sec += 3; a0006550: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED timeout.tv_nsec = 0; result = pthread_cond_timedwait (&r_chain->cond, a0006554: e2854020 add r4, r5, #32 <== NOT EXECUTED a0006558: e1a00004 mov r0, r4 <== NOT EXECUTED pthread_mutex_unlock (&r_chain->mutex); pthread_mutex_lock (&aio_request_queue.mutex); if (rtems_chain_is_empty (chain)) { clock_gettime (CLOCK_REALTIME, &timeout); timeout.tv_sec += 3; a000655c: e2833003 add r3, r3, #3 <== NOT EXECUTED timeout.tv_nsec = 0; result = pthread_cond_timedwait (&r_chain->cond, a0006560: e59f111c ldr r1, [pc, #284] ; a0006684 <== NOT EXECUTED a0006564: e28d2020 add r2, sp, #32 <== NOT EXECUTED pthread_mutex_unlock (&r_chain->mutex); pthread_mutex_lock (&aio_request_queue.mutex); if (rtems_chain_is_empty (chain)) { clock_gettime (CLOCK_REALTIME, &timeout); timeout.tv_sec += 3; a0006568: e58d3020 str r3, [sp, #32] <== NOT EXECUTED timeout.tv_nsec = 0; a000656c: e58da024 str sl, [sp, #36] ; 0x24 <== NOT EXECUTED result = pthread_cond_timedwait (&r_chain->cond, a0006570: eb0001f0 bl a0006d38 <== NOT EXECUTED &aio_request_queue.mutex, &timeout); /* If no requests were added to the chain we delete the fd chain from the queue and start working with idle fd chains */ if (result == ETIMEDOUT) { a0006574: e3500074 cmp r0, #116 ; 0x74 <== NOT EXECUTED a0006578: 1affffa9 bne a0006424 <== NOT EXECUTED a000657c: e1a00005 mov r0, r5 <== NOT EXECUTED a0006580: eb000956 bl a0008ae0 <_Chain_Extract> <== NOT EXECUTED rtems_chain_extract (&r_chain->next_fd); pthread_mutex_destroy (&r_chain->mutex); a0006584: e1a00006 mov r0, r6 <== NOT EXECUTED a0006588: eb000243 bl a0006e9c <== NOT EXECUTED pthread_cond_destroy (&r_chain->cond); a000658c: e1a00004 mov r0, r4 <== NOT EXECUTED a0006590: eb000169 bl a0006b3c <== NOT EXECUTED free (r_chain); a0006594: e1a00005 mov r0, r5 <== NOT EXECUTED a0006598: ebfff175 bl a0002b74 <== NOT EXECUTED /* If the idle chain is empty sleep for 3 seconds and wait for a signal. The thread now becomes idle. */ if (rtems_chain_is_empty (&aio_request_queue.idle_req)) { a000659c: e59f20e0 ldr r2, [pc, #224] ; a0006684 <== NOT EXECUTED a00065a0: e5923054 ldr r3, [r2, #84] ; 0x54 <== NOT EXECUTED a00065a4: e59f20dc ldr r2, [pc, #220] ; a0006688 <== NOT EXECUTED a00065a8: e1530002 cmp r3, r2 <== NOT EXECUTED a00065ac: 0a000002 beq a00065bc <== NOT EXECUTED r_chain->perfd = ((rtems_aio_request_chain *)node)->perfd; } else /* If there was a request added in the initial fd chain then release the mutex and process it */ pthread_mutex_unlock (&aio_request_queue.mutex); a00065b0: e59f00cc ldr r0, [pc, #204] ; a0006684 <== NOT EXECUTED a00065b4: eb0002ff bl a00071b8 <== NOT EXECUTED a00065b8: eaffff99 b a0006424 <== NOT EXECUTED free (r_chain); /* If the idle chain is empty sleep for 3 seconds and wait for a signal. The thread now becomes idle. */ if (rtems_chain_is_empty (&aio_request_queue.idle_req)) { ++aio_request_queue.idle_threads; a00065bc: e59f20c0 ldr r2, [pc, #192] ; a0006684 <== NOT EXECUTED clock_gettime (CLOCK_REALTIME, &timeout); a00065c0: e3a00001 mov r0, #1 <== NOT EXECUTED a00065c4: e28d1020 add r1, sp, #32 <== NOT EXECUTED free (r_chain); /* If the idle chain is empty sleep for 3 seconds and wait for a signal. The thread now becomes idle. */ if (rtems_chain_is_empty (&aio_request_queue.idle_req)) { ++aio_request_queue.idle_threads; a00065c8: e5923068 ldr r3, [r2, #104] ; 0x68 <== NOT EXECUTED a00065cc: e0833000 add r3, r3, r0 <== NOT EXECUTED a00065d0: e5823068 str r3, [r2, #104] ; 0x68 <== NOT EXECUTED clock_gettime (CLOCK_REALTIME, &timeout); a00065d4: eb000136 bl a0006ab4 <== NOT EXECUTED timeout.tv_sec += 3; a00065d8: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED timeout.tv_nsec = 0; result = pthread_cond_timedwait (&aio_request_queue.new_req, a00065dc: e59f00a8 ldr r0, [pc, #168] ; a000668c <== NOT EXECUTED a00065e0: e59f109c ldr r1, [pc, #156] ; a0006684 <== NOT EXECUTED /* If the idle chain is empty sleep for 3 seconds and wait for a signal. The thread now becomes idle. */ if (rtems_chain_is_empty (&aio_request_queue.idle_req)) { ++aio_request_queue.idle_threads; clock_gettime (CLOCK_REALTIME, &timeout); timeout.tv_sec += 3; a00065e4: e2833003 add r3, r3, #3 <== NOT EXECUTED timeout.tv_nsec = 0; result = pthread_cond_timedwait (&aio_request_queue.new_req, a00065e8: e28d2020 add r2, sp, #32 <== NOT EXECUTED /* If the idle chain is empty sleep for 3 seconds and wait for a signal. The thread now becomes idle. */ if (rtems_chain_is_empty (&aio_request_queue.idle_req)) { ++aio_request_queue.idle_threads; clock_gettime (CLOCK_REALTIME, &timeout); timeout.tv_sec += 3; a00065ec: e58d3020 str r3, [sp, #32] <== NOT EXECUTED timeout.tv_nsec = 0; a00065f0: e58da024 str sl, [sp, #36] ; 0x24 <== NOT EXECUTED result = pthread_cond_timedwait (&aio_request_queue.new_req, a00065f4: eb0001cf bl a0006d38 <== NOT EXECUTED &aio_request_queue.mutex, &timeout); /* If no new fd chain was added in the idle requests then this thread is finished */ if (result == ETIMEDOUT) { a00065f8: e3500074 cmp r0, #116 ; 0x74 <== NOT EXECUTED a00065fc: 0a00001d beq a0006678 <== NOT EXECUTED } AIO_printf ("Thread finished\n"); return NULL; } a0006600: e59f307c ldr r3, [pc, #124] ; a0006684 <== NOT EXECUTED return NULL; } /* Otherwise move this chain to the working chain and start the loop all over again */ --aio_request_queue.idle_threads; a0006604: e59f2078 ldr r2, [pc, #120] ; a0006684 <== NOT EXECUTED } AIO_printf ("Thread finished\n"); return NULL; } a0006608: e5934054 ldr r4, [r3, #84] ; 0x54 <== NOT EXECUTED return NULL; } /* Otherwise move this chain to the working chain and start the loop all over again */ --aio_request_queue.idle_threads; a000660c: e5933068 ldr r3, [r3, #104] ; 0x68 <== NOT EXECUTED a0006610: e1a00004 mov r0, r4 <== NOT EXECUTED a0006614: e2433001 sub r3, r3, #1 <== NOT EXECUTED a0006618: e5823068 str r3, [r2, #104] ; 0x68 <== NOT EXECUTED a000661c: eb00092f bl a0008ae0 <_Chain_Extract> <== NOT EXECUTED node = rtems_chain_first (&aio_request_queue.idle_req); rtems_chain_extract (node); r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, a0006620: e3a02001 mov r2, #1 <== NOT EXECUTED a0006624: e5941014 ldr r1, [r4, #20] <== NOT EXECUTED a0006628: e59f0060 ldr r0, [pc, #96] ; a0006690 <== NOT EXECUTED a000662c: ebffff41 bl a0006338 <== NOT EXECUTED ((rtems_aio_request_chain *)node)->fildes, 1); r_chain->new_fd = 0; pthread_mutex_init (&r_chain->mutex, NULL); a0006630: e280601c add r6, r0, #28 <== NOT EXECUTED /* Otherwise move this chain to the working chain and start the loop all over again */ --aio_request_queue.idle_threads; node = rtems_chain_first (&aio_request_queue.idle_req); rtems_chain_extract (node); r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, a0006634: e1a05000 mov r5, r0 <== NOT EXECUTED ((rtems_aio_request_chain *)node)->fildes, 1); r_chain->new_fd = 0; pthread_mutex_init (&r_chain->mutex, NULL); a0006638: e1a0100a mov r1, sl <== NOT EXECUTED node = rtems_chain_first (&aio_request_queue.idle_req); rtems_chain_extract (node); r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, ((rtems_aio_request_chain *)node)->fildes, 1); r_chain->new_fd = 0; a000663c: e580a018 str sl, [r0, #24] <== NOT EXECUTED pthread_mutex_init (&r_chain->mutex, NULL); a0006640: e1a00006 mov r0, r6 <== NOT EXECUTED a0006644: eb000266 bl a0006fe4 <== NOT EXECUTED pthread_cond_init (&r_chain->cond, NULL); a0006648: e2850020 add r0, r5, #32 <== NOT EXECUTED a000664c: e1a0100a mov r1, sl <== NOT EXECUTED a0006650: eb00016d bl a0006c0c <== NOT EXECUTED r_chain->perfd = ((rtems_aio_request_chain *)node)->perfd; a0006654: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED a0006658: e5853008 str r3, [r5, #8] <== NOT EXECUTED a000665c: e594300c ldr r3, [r4, #12] <== NOT EXECUTED a0006660: e585300c str r3, [r5, #12] <== NOT EXECUTED a0006664: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED a0006668: e5853010 str r3, [r5, #16] <== NOT EXECUTED a000666c: eaffff6c b a0006424 <== NOT EXECUTED break; default: result = -1; } if (result == -1) { a0006670: e594a014 ldr sl, [r4, #20] <== NOT EXECUTED a0006674: eaffff88 b a000649c <== NOT EXECUTED &timeout); /* If no new fd chain was added in the idle requests then this thread is finished */ if (result == ETIMEDOUT) { pthread_mutex_unlock (&aio_request_queue.mutex); a0006678: e59f0004 ldr r0, [pc, #4] ; a0006684 <== NOT EXECUTED a000667c: eb0002cd bl a00071b8 <== NOT EXECUTED return NULL; a0006680: eaffff8d b a00064bc <== NOT EXECUTED =============================================================================== a0006234 : * 0 - if initialization succeeded */ int rtems_aio_init (void) { a0006234: e92d4070 push {r4, r5, r6, lr} int result = 0; result = pthread_attr_init (&aio_request_queue.attr); a0006238: e59f00e8 ldr r0, [pc, #232] ; a0006328 a000623c: eb000423 bl a00072d0 if (result != 0) a0006240: e2505000 subs r5, r0, #0 a0006244: 0a000001 beq a0006250 aio_request_queue.active_threads = 0; aio_request_queue.idle_threads = 0; aio_request_queue.initialized = AIO_QUEUE_INITIALIZED; return result; } a0006248: e1a00005 mov r0, r5 <== NOT EXECUTED a000624c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED result = pthread_attr_init (&aio_request_queue.attr); if (result != 0) return result; result = a0006250: e59f00d0 ldr r0, [pc, #208] ; a0006328 a0006254: e1a01005 mov r1, r5 a0006258: eb00042f bl a000731c pthread_attr_setdetachstate (&aio_request_queue.attr, PTHREAD_CREATE_DETACHED); if (result != 0) a000625c: e3500000 cmp r0, #0 a0006260: 1a00001c bne a00062d8 pthread_attr_destroy (&aio_request_queue.attr); result = pthread_mutex_init (&aio_request_queue.mutex, NULL); a0006264: e59f40c0 ldr r4, [pc, #192] ; a000632c a0006268: e3a01000 mov r1, #0 a000626c: e1a00004 mov r0, r4 a0006270: eb00035b bl a0006fe4 if (result != 0) a0006274: e3500000 cmp r0, #0 a0006278: 1a00001e bne a00062f8 pthread_attr_destroy (&aio_request_queue.attr); result = pthread_cond_init (&aio_request_queue.new_req, NULL); a000627c: e59f00ac ldr r0, [pc, #172] ; a0006330 a0006280: e3a01000 mov r1, #0 a0006284: eb000260 bl a0006c0c if (result != 0) { a0006288: e2505000 subs r5, r0, #0 a000628c: 1a000020 bne a0006314 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; a0006290: e59f209c ldr r2, [pc, #156] ; a0006334 rtems_chain_initialize_empty (&aio_request_queue.work_req); rtems_chain_initialize_empty (&aio_request_queue.idle_req); aio_request_queue.active_threads = 0; aio_request_queue.idle_threads = 0; aio_request_queue.initialized = AIO_QUEUE_INITIALIZED; a0006294: e3a01a0b mov r1, #45056 ; 0xb000 head->previous = NULL; a0006298: e3a03000 mov r3, #0 tail->previous = head; a000629c: e2820008 add r0, r2, #8 a00062a0: e2426004 sub r6, r2, #4 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; a00062a4: e282c00c add ip, r2, #12 a00062a8: e281100b add r1, r1, #11 head->previous = NULL; tail->previous = head; a00062ac: e584005c str r0, [r4, #92] ; 0x5c ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; a00062b0: e5842048 str r2, [r4, #72] ; 0x48 head->previous = NULL; a00062b4: e584304c str r3, [r4, #76] ; 0x4c tail->previous = head; a00062b8: e5846050 str r6, [r4, #80] ; 0x50 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; a00062bc: e584c054 str ip, [r4, #84] ; 0x54 head->previous = NULL; a00062c0: e5843058 str r3, [r4, #88] ; 0x58 } rtems_chain_initialize_empty (&aio_request_queue.work_req); rtems_chain_initialize_empty (&aio_request_queue.idle_req); aio_request_queue.active_threads = 0; a00062c4: e5843064 str r3, [r4, #100] ; 0x64 aio_request_queue.idle_threads = 0; a00062c8: e5843068 str r3, [r4, #104] ; 0x68 aio_request_queue.initialized = AIO_QUEUE_INITIALIZED; a00062cc: e5841060 str r1, [r4, #96] ; 0x60 return result; } a00062d0: e1a00005 mov r0, r5 a00062d4: e8bd8070 pop {r4, r5, r6, pc} PTHREAD_CREATE_DETACHED); if (result != 0) pthread_attr_destroy (&aio_request_queue.attr); result = pthread_mutex_init (&aio_request_queue.mutex, NULL); a00062d8: e59f404c ldr r4, [pc, #76] ; a000632c <== NOT EXECUTED result = pthread_attr_setdetachstate (&aio_request_queue.attr, PTHREAD_CREATE_DETACHED); if (result != 0) pthread_attr_destroy (&aio_request_queue.attr); a00062dc: e59f0044 ldr r0, [pc, #68] ; a0006328 <== NOT EXECUTED a00062e0: eb0003f1 bl a00072ac <== NOT EXECUTED result = pthread_mutex_init (&aio_request_queue.mutex, NULL); a00062e4: e3a01000 mov r1, #0 <== NOT EXECUTED a00062e8: e1a00004 mov r0, r4 <== NOT EXECUTED a00062ec: eb00033c bl a0006fe4 <== NOT EXECUTED if (result != 0) a00062f0: e3500000 cmp r0, #0 <== NOT EXECUTED a00062f4: 0affffe0 beq a000627c <== NOT EXECUTED pthread_attr_destroy (&aio_request_queue.attr); a00062f8: e2840008 add r0, r4, #8 <== NOT EXECUTED a00062fc: eb0003ea bl a00072ac <== NOT EXECUTED result = pthread_cond_init (&aio_request_queue.new_req, NULL); a0006300: e59f0028 ldr r0, [pc, #40] ; a0006330 <== NOT EXECUTED a0006304: e3a01000 mov r1, #0 <== NOT EXECUTED a0006308: eb00023f bl a0006c0c <== NOT EXECUTED if (result != 0) { a000630c: e2505000 subs r5, r0, #0 <== NOT EXECUTED a0006310: 0affffde beq a0006290 <== NOT EXECUTED pthread_mutex_destroy (&aio_request_queue.mutex); a0006314: e59f0010 ldr r0, [pc, #16] ; a000632c <== NOT EXECUTED a0006318: eb0002df bl a0006e9c <== NOT EXECUTED pthread_attr_destroy (&aio_request_queue.attr); a000631c: e59f0004 ldr r0, [pc, #4] ; a0006328 <== NOT EXECUTED a0006320: eb0003e1 bl a00072ac <== NOT EXECUTED a0006324: eaffffd9 b a0006290 <== NOT EXECUTED =============================================================================== a0006694 : } AIO_printf ("Thread finished\n"); return NULL; } a0006694: e1a02000 mov r2, r0 a0006698: e4923004 ldr r3, [r2], #4 * NONE */ void rtems_aio_insert_prio (rtems_chain_control *chain, rtems_aio_request *req) { a000669c: e1a0c001 mov ip, r1 rtems_chain_node *node; AIO_printf ("FD exists \n"); node = rtems_chain_first (chain); if (rtems_chain_is_empty (chain)) { a00066a0: e1530002 cmp r3, r2 a00066a4: 0a00000f beq a00066e8 rtems_chain_prepend (chain, &req->next_prio); } else { AIO_printf ("Add by priority \n"); int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio; while (req->aiocbp->aio_reqprio > prio && a00066a8: e5910014 ldr r0, [r1, #20] if (rtems_chain_is_empty (chain)) { AIO_printf ("First in chain \n"); rtems_chain_prepend (chain, &req->next_prio); } else { AIO_printf ("Add by priority \n"); int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio; a00066ac: e5931014 ldr r1, [r3, #20] while (req->aiocbp->aio_reqprio > prio && a00066b0: e5900014 ldr r0, [r0, #20] a00066b4: e5911014 ldr r1, [r1, #20] a00066b8: e1510000 cmp r1, r0 a00066bc: ba000002 blt a00066cc a00066c0: ea000006 b a00066e0 a00066c4: e1530002 cmp r3, r2 <== NOT EXECUTED a00066c8: 0a000004 beq a00066e0 <== NOT EXECUTED } AIO_printf ("Thread finished\n"); return NULL; } a00066cc: e5933000 ldr r3, [r3] <== NOT EXECUTED int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio; while (req->aiocbp->aio_reqprio > prio && !rtems_chain_is_tail (chain, node)) { node = rtems_chain_next (node); prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio; a00066d0: e5931014 ldr r1, [r3, #20] <== NOT EXECUTED rtems_chain_prepend (chain, &req->next_prio); } else { AIO_printf ("Add by priority \n"); int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio; while (req->aiocbp->aio_reqprio > prio && a00066d4: e5911014 ldr r1, [r1, #20] <== NOT EXECUTED a00066d8: e1510000 cmp r1, r0 <== NOT EXECUTED a00066dc: bafffff8 blt a00066c4 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void rtems_chain_insert( rtems_chain_node *after_node, rtems_chain_node *the_node ) { _Chain_Insert( after_node, the_node ); a00066e0: e5930004 ldr r0, [r3, #4] a00066e4: e1a0100c mov r1, ip a00066e8: ea000911 b a0008b34 <_Chain_Insert> =============================================================================== a00066ec : * Output parameters: * NONE */ void rtems_aio_remove_fd (rtems_aio_request_chain *r_chain) { a00066ec: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED } AIO_printf ("Thread finished\n"); return NULL; } a00066f0: e5904008 ldr r4, [r0, #8] <== NOT EXECUTED RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Tail(the_chain)); a00066f4: e280000c add r0, r0, #12 <== NOT EXECUTED rtems_chain_node *node; chain = &r_chain->perfd; node = rtems_chain_first (chain); while (!rtems_chain_is_tail (chain, node)) a00066f8: e1540000 cmp r4, r0 <== NOT EXECUTED a00066fc: 0a000010 beq a0006744 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); a0006700: e1a00004 mov r0, r4 <== NOT EXECUTED a0006704: eb0008f5 bl a0008ae0 <_Chain_Extract> <== NOT EXECUTED { rtems_chain_extract (node); rtems_aio_request *req = (rtems_aio_request *) node; req->aiocbp->error_code = ECANCELED; a0006708: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED a000670c: e3a0608c mov r6, #140 ; 0x8c <== NOT EXECUTED req->aiocbp->return_value = -1; a0006710: e3e05000 mvn r5, #0 <== NOT EXECUTED while (!rtems_chain_is_tail (chain, node)) { rtems_chain_extract (node); rtems_aio_request *req = (rtems_aio_request *) node; req->aiocbp->error_code = ECANCELED; a0006714: e5836030 str r6, [r3, #48] ; 0x30 <== NOT EXECUTED req->aiocbp->return_value = -1; a0006718: e5835034 str r5, [r3, #52] ; 0x34 <== NOT EXECUTED free (req); a000671c: e1a00004 mov r0, r4 <== NOT EXECUTED a0006720: ebfff113 bl a0002b74 <== NOT EXECUTED a0006724: e1a00004 mov r0, r4 <== NOT EXECUTED a0006728: eb0008ec bl a0008ae0 <_Chain_Extract> <== NOT EXECUTED while (!rtems_chain_is_tail (chain, node)) { rtems_chain_extract (node); rtems_aio_request *req = (rtems_aio_request *) node; req->aiocbp->error_code = ECANCELED; a000672c: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED req->aiocbp->return_value = -1; free (req); a0006730: e1a00004 mov r0, r4 <== NOT EXECUTED while (!rtems_chain_is_tail (chain, node)) { rtems_chain_extract (node); rtems_aio_request *req = (rtems_aio_request *) node; req->aiocbp->error_code = ECANCELED; a0006734: e5836030 str r6, [r3, #48] ; 0x30 <== NOT EXECUTED req->aiocbp->return_value = -1; a0006738: e5835034 str r5, [r3, #52] ; 0x34 <== NOT EXECUTED free (req); a000673c: ebfff10c bl a0002b74 <== NOT EXECUTED a0006740: eafffff7 b a0006724 <== NOT EXECUTED a0006744: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== a0006748 : * AIO_NOTCANCELED - if request was not canceled * AIO_CANCELED - if request was canceled */ int rtems_aio_remove_req (rtems_chain_control *chain, struct aiocb *aiocbp) { a0006748: e92d4010 push {r4, lr} <== NOT EXECUTED } AIO_printf ("Thread finished\n"); return NULL; } a000674c: e4904004 ldr r4, [r0], #4 <== NOT EXECUTED rtems_chain_node *node = rtems_chain_first (chain); rtems_aio_request *current; current = (rtems_aio_request *) node; while (!rtems_chain_is_tail (chain, node) && current->aiocbp != aiocbp) { a0006750: e1540000 cmp r4, r0 <== NOT EXECUTED a0006754: 1a000003 bne a0006768 <== NOT EXECUTED a0006758: ea000012 b a00067a8 <== NOT EXECUTED } AIO_printf ("Thread finished\n"); return NULL; } a000675c: e5944000 ldr r4, [r4] <== NOT EXECUTED rtems_chain_node *node = rtems_chain_first (chain); rtems_aio_request *current; current = (rtems_aio_request *) node; while (!rtems_chain_is_tail (chain, node) && current->aiocbp != aiocbp) { a0006760: e1540000 cmp r4, r0 <== NOT EXECUTED a0006764: 0a00000d beq a00067a0 <== NOT EXECUTED a0006768: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED a000676c: e1530001 cmp r3, r1 <== NOT EXECUTED a0006770: 1afffff9 bne a000675c <== NOT EXECUTED a0006774: e1a00004 mov r0, r4 <== NOT EXECUTED a0006778: eb0008d8 bl a0008ae0 <_Chain_Extract> <== NOT EXECUTED if (rtems_chain_is_tail (chain, node)) return AIO_NOTCANCELED; else { rtems_chain_extract (node); current->aiocbp->error_code = ECANCELED; a000677c: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED a0006780: e3a0208c mov r2, #140 ; 0x8c <== NOT EXECUTED current->aiocbp->return_value = -1; free (current); a0006784: e1a00004 mov r0, r4 <== NOT EXECUTED if (rtems_chain_is_tail (chain, node)) return AIO_NOTCANCELED; else { rtems_chain_extract (node); current->aiocbp->error_code = ECANCELED; a0006788: e5832030 str r2, [r3, #48] ; 0x30 <== NOT EXECUTED current->aiocbp->return_value = -1; a000678c: e3e02000 mvn r2, #0 <== NOT EXECUTED a0006790: e5832034 str r2, [r3, #52] ; 0x34 <== NOT EXECUTED free (current); a0006794: ebfff0f6 bl a0002b74 <== NOT EXECUTED } return AIO_CANCELED; a0006798: e3a00000 mov r0, #0 <== NOT EXECUTED a000679c: e8bd8010 pop {r4, pc} <== NOT EXECUTED node = rtems_chain_next (node); current = (rtems_aio_request *) node; } if (rtems_chain_is_tail (chain, node)) return AIO_NOTCANCELED; a00067a0: e3a00001 mov r0, #1 <== NOT EXECUTED current->aiocbp->return_value = -1; free (current); } return AIO_CANCELED; } a00067a4: e8bd8010 pop {r4, pc} <== NOT EXECUTED node = rtems_chain_next (node); current = (rtems_aio_request *) node; } if (rtems_chain_is_tail (chain, node)) return AIO_NOTCANCELED; a00067a8: e3a00001 mov r0, #1 <== NOT EXECUTED a00067ac: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== a0002a38 : const rtems_assoc_t *rtems_assoc_ptr_by_name( const rtems_assoc_t *ap, const char *name ) { a0002a38: e92d41f0 push {r4, r5, r6, r7, r8, lr} const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) a0002a3c: e5904000 ldr r4, [r0] const rtems_assoc_t *rtems_assoc_ptr_by_name( const rtems_assoc_t *ap, const char *name ) { a0002a40: e1a06000 mov r6, r0 a0002a44: e1a07001 mov r7, r1 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) a0002a48: e3540000 cmp r4, #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; a0002a4c: 01a06004 moveq r6, r4 if (rtems_assoc_is_default(ap)) a0002a50: 0a000011 beq a0002a9c a0002a54: e1a00004 mov r0, r4 a0002a58: e59f106c ldr r1, [pc, #108] ; a0002acc a0002a5c: eb0032e2 bl a000f5ec a0002a60: 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; a0002a64: 13a08000 movne r8, #0 if (rtems_assoc_is_default(ap)) a0002a68: 0a00000d beq a0002aa4 default_ap = ap++; for ( ; ap->name; ap++) a0002a6c: e1a05006 mov r5, r6 a0002a70: ea000003 b a0002a84 a0002a74: e595400c ldr r4, [r5, #12] a0002a78: e285500c add r5, r5, #12 a0002a7c: e3540000 cmp r4, #0 a0002a80: 0a00000e beq a0002ac0 if (strcmp(ap->name, name) == 0) a0002a84: e1a00004 mov r0, r4 a0002a88: e1a01007 mov r1, r7 a0002a8c: eb0032d6 bl a000f5ec a0002a90: e3500000 cmp r0, #0 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) a0002a94: e1a06005 mov r6, r5 if (strcmp(ap->name, name) == 0) a0002a98: 1afffff5 bne a0002a74 return ap; return default_ap; } a0002a9c: e1a00006 mov r0, r6 a0002aa0: 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++) a0002aa4: e596400c ldr r4, [r6, #12] ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; a0002aa8: e286300c add r3, r6, #12 for ( ; ap->name; ap++) a0002aac: e3540000 cmp r4, #0 a0002ab0: 11a08006 movne r8, r6 a0002ab4: 11a06003 movne r6, r3 a0002ab8: 1affffeb bne a0002a6c a0002abc: eafffff6 b a0002a9c <== NOT EXECUTED a0002ac0: e1a06008 mov r6, r8 if (strcmp(ap->name, name) == 0) return ap; return default_ap; } a0002ac4: e1a00006 mov r0, r6 a0002ac8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} =============================================================================== a000629c : rtems_chain_control *chain, rtems_chain_node *node, rtems_id task, rtems_event_set events ) { a000629c: e92d4030 push {r4, r5, lr} a00062a0: e1a04002 mov r4, r2 a00062a4: e1a05003 mov r5, r3 RTEMS_INLINE_ROUTINE bool rtems_chain_append_with_empty_check( rtems_chain_control *chain, rtems_chain_node *node ) { return _Chain_Append_with_empty_check( chain, node ); a00062a8: eb000149 bl a00067d4 <_Chain_Append_with_empty_check> rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_append_with_empty_check( chain, node ); if ( was_empty ) { a00062ac: e3500000 cmp r0, #0 a00062b0: 1a000000 bne a00062b8 sc = rtems_event_send( task, events ); } return sc; } a00062b4: e8bd8030 pop {r4, r5, pc} { rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_append_with_empty_check( chain, node ); if ( was_empty ) { sc = rtems_event_send( task, events ); a00062b8: e1a00004 mov r0, r4 a00062bc: e1a01005 mov r1, r5 } return sc; } a00062c0: e8bd4030 pop {r4, r5, lr} { rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_append_with_empty_check( chain, node ); if ( was_empty ) { sc = rtems_event_send( task, events ); a00062c4: eafffd86 b a00058e4 =============================================================================== a0006354 : rtems_chain_control *chain, rtems_chain_node *node, rtems_id task, rtems_event_set events ) { a0006354: e92d4030 push {r4, r5, lr} a0006358: e1a04002 mov r4, r2 a000635c: e1a05003 mov r5, r3 RTEMS_INLINE_ROUTINE bool rtems_chain_prepend_with_empty_check( rtems_chain_control *chain, rtems_chain_node *node ) { return _Chain_Prepend_with_empty_check( chain, node ); a0006360: eb00016a bl a0006910 <_Chain_Prepend_with_empty_check> rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_prepend_with_empty_check( chain, node ); if (was_empty) { a0006364: e3500000 cmp r0, #0 a0006368: 1a000000 bne a0006370 sc = rtems_event_send( task, events ); } return sc; } a000636c: e8bd8030 pop {r4, r5, pc} { rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_prepend_with_empty_check( chain, node ); if (was_empty) { sc = rtems_event_send( task, events ); a0006370: e1a00004 mov r0, r4 a0006374: e1a01005 mov r1, r5 } return sc; } a0006378: e8bd4030 pop {r4, r5, lr} { rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_prepend_with_empty_check( chain, node ); if (was_empty) { sc = rtems_event_send( task, events ); a000637c: eafffd58 b a00058e4 =============================================================================== a0001da0 : int rtems_filesystem_dirname( const char *pathname ) { a0001da0: e92d4030 push {r4, r5, lr} a0001da4: e1a05000 mov r5, r0 int len = strlen( pathname ); a0001da8: eb003345 bl a000eac4 while ( len ) { a0001dac: e2504000 subs r4, r0, #0 a0001db0: 1a000002 bne a0001dc0 a0001db4: ea000006 b a0001dd4 <== NOT EXECUTED a0001db8: e3540000 cmp r4, #0 a0001dbc: 0a000004 beq a0001dd4 len--; a0001dc0: e2444001 sub r4, r4, #1 if ( rtems_filesystem_is_separator( pathname[len] ) ) a0001dc4: e7d50004 ldrb r0, [r5, r4] a0001dc8: eb0003e0 bl a0002d50 a0001dcc: e3500000 cmp r0, #0 a0001dd0: 0afffff8 beq a0001db8 break; } return len; } a0001dd4: e1a00004 mov r0, r4 a0001dd8: e8bd8030 pop {r4, r5, pc} =============================================================================== a0001b74 : rtems_filesystem_umask = 022; /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) a0001b74: e59f20f0 ldr r2, [pc, #240] ; a0001c6c * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { a0001b78: e92d40f0 push {r4, r5, r6, r7, lr} /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; a0001b7c: e59f60ec ldr r6, [pc, #236] ; a0001c70 /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) a0001b80: e5922000 ldr r2, [r2] * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { a0001b84: e24dd018 sub sp, sp, #24 /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; a0001b88: e5963000 ldr r3, [r6] /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) a0001b8c: e3520000 cmp r2, #0 /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; a0001b90: e3a02012 mov r2, #18 a0001b94: e583202c str r2, [r3, #44] ; 0x2c /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) a0001b98: 0a00002d beq a0001c54 rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; a0001b9c: e59f30d0 ldr r3, [pc, #208] ; a0001c74 status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL ); a0001ba0: e3a05000 mov r5, #0 * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; a0001ba4: e5933000 ldr r3, [r3] status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL ); a0001ba8: e5930008 ldr r0, [r3, #8] a0001bac: e593100c ldr r1, [r3, #12] a0001bb0: e893000c ldm r3, {r2, r3} a0001bb4: e58d5000 str r5, [sp] a0001bb8: eb000215 bl a0002414 if ( status == -1 ) a0001bbc: e3700001 cmn r0, #1 a0001bc0: 0a000027 beq a0001c64 rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; a0001bc4: e5963000 ldr r3, [r6] * gonna hit performance. * * Till Straumann, 10/25/2002 */ /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); a0001bc8: e28d4004 add r4, sp, #4 a0001bcc: e3a01001 mov r1, #1 status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; a0001bd0: 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); a0001bd4: e1a02005 mov r2, r5 a0001bd8: e1a03004 mov r3, r4 a0001bdc: e59f0094 ldr r0, [pc, #148] ; a0001c78 a0001be0: e58d5000 str r5, [sp] a0001be4: eb000057 bl a0001d48 rtems_filesystem_root = loc; a0001be8: e596c000 ldr ip, [r6] a0001bec: e1a07004 mov r7, r4 a0001bf0: e8b7000f ldm r7!, {r0, r1, r2, r3} a0001bf4: e28cc018 add ip, ip, #24 a0001bf8: e597e000 ldr lr, [r7] a0001bfc: e8ac000f stmia ip!, {r0, r1, r2, r3} /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); a0001c00: 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; a0001c04: e58ce000 str lr, [ip] /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); a0001c08: e1a02005 mov r2, r5 a0001c0c: e1a03004 mov r3, r4 a0001c10: e59f0060 ldr r0, [pc, #96] ; a0001c78 a0001c14: e58d5000 str r5, [sp] a0001c18: eb00004a bl a0001d48 rtems_filesystem_current = loc; a0001c1c: e8b4000f ldm r4!, {r0, r1, r2, r3} a0001c20: e596c000 ldr ip, [r6] a0001c24: e597e000 ldr lr, [r7] a0001c28: e28cc004 add ip, ip, #4 a0001c2c: 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); a0001c30: e3a01f7f mov r1, #508 ; 0x1fc /* 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; a0001c34: 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); a0001c38: e59f003c ldr r0, [pc, #60] ; a0001c7c a0001c3c: e2811003 add r1, r1, #3 a0001c40: eb0001a4 bl a00022d8 if ( status != 0 ) a0001c44: e3500000 cmp r0, #0 a0001c48: 1a000003 bne a0001c5c * 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. */ } a0001c4c: e28dd018 add sp, sp, #24 a0001c50: e8bd80f0 pop {r4, r5, r6, r7, pc} /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) rtems_fatal_error_occurred( 0xABCD0001 ); a0001c54: e59f0024 ldr r0, [pc, #36] ; a0001c80 <== NOT EXECUTED a0001c58: eb000fd3 bl a0005bac <== NOT EXECUTED * created that way by the IMFS. */ status = mkdir( "/dev", 0777); if ( status != 0 ) rtems_fatal_error_occurred( 0xABCD0003 ); a0001c5c: e59f0020 ldr r0, [pc, #32] ; a0001c84 <== NOT EXECUTED a0001c60: eb000fd1 bl a0005bac <== 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 ); a0001c64: e59f001c ldr r0, [pc, #28] ; a0001c88 <== NOT EXECUTED a0001c68: eb000fcf bl a0005bac <== NOT EXECUTED =============================================================================== a000a3b4 : bool rtems_filesystem_iterate( rtems_per_filesystem_routine routine, void *routine_arg ) { a000a3b4: 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 ) { a000a3b8: e59f60a4 ldr r6, [pc, #164] ; a000a464 bool rtems_filesystem_iterate( rtems_per_filesystem_routine routine, void *routine_arg ) { a000a3bc: e1a04000 mov r4, r0 a000a3c0: 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 ) { a000a3c4: e5963000 ldr r3, [r6] a000a3c8: e3530000 cmp r3, #0 a000a3cc: 1a000002 bne a000a3dc a000a3d0: ea00000b b a000a404 <== NOT EXECUTED a000a3d4: e3500000 cmp r0, #0 a000a3d8: 1a00001f bne a000a45c stop = (*routine)( table_entry, routine_arg ); a000a3dc: e1a00006 mov r0, r6 a000a3e0: e1a01005 mov r1, r5 a000a3e4: e12fff34 blx 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 ) { a000a3e8: e5963008 ldr r3, [r6, #8] stop = (*routine)( table_entry, routine_arg ); a000a3ec: 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 ) { a000a3f0: e2866008 add r6, r6, #8 a000a3f4: e3530000 cmp r3, #0 a000a3f8: 1afffff5 bne a000a3d4 stop = (*routine)( table_entry, routine_arg ); ++table_entry; } if ( !stop ) { a000a3fc: e3500000 cmp r0, #0 a000a400: 1a000015 bne a000a45c 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 ); a000a404: e59f705c ldr r7, [pc, #92] ; a000a468 } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } a000a408: e59f605c ldr r6, [pc, #92] ; a000a46c a000a40c: e3a01000 mov r1, #0 a000a410: e5970000 ldr r0, [r7] a000a414: e1a02001 mov r2, r1 a000a418: ebffec3b bl a000550c a000a41c: e4968004 ldr r8, [r6], #4 ++table_entry; } if ( !stop ) { rtems_libio_lock(); for ( a000a420: e1580006 cmp r8, r6 a000a424: 03a0a000 moveq sl, #0 a000a428: 1a000002 bne a000a438 a000a42c: ea000008 b a000a454 node = rtems_chain_first( &filesystem_chain ); !rtems_chain_is_tail( &filesystem_chain, node ) && !stop; a000a430: e3500000 cmp r0, #0 a000a434: 1a000006 bne a000a454 node = rtems_chain_next( node ) ) { const filesystem_node *fsn = (filesystem_node *) node; stop = (*routine)( &fsn->entry, routine_arg ); a000a438: e2880008 add r0, r8, #8 a000a43c: e1a01005 mov r1, r5 a000a440: e12fff34 blx r4 } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } a000a444: 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 ); a000a448: e1a0a000 mov sl, r0 ++table_entry; } if ( !stop ) { rtems_libio_lock(); for ( a000a44c: e1580006 cmp r8, r6 a000a450: 1afffff6 bne a000a430 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); a000a454: e5970000 ldr r0, [r7] a000a458: ebffec74 bl a0005630 } rtems_libio_unlock(); } return stop; } a000a45c: e1a0000a mov r0, sl a000a460: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} =============================================================================== a00023a0 : bool rtems_filesystem_mount_iterate( rtems_per_filesystem_mount_routine routine, void *routine_arg ) { a00023a0: 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 ); a00023a4: e59f7060 ldr r7, [pc, #96] ; a000240c stop = (*routine)( mt_entry, routine_arg ); } rtems_libio_unlock(); return stop; } a00023a8: e59f4060 ldr r4, [pc, #96] ; a0002410 bool rtems_filesystem_mount_iterate( rtems_per_filesystem_mount_routine routine, void *routine_arg ) { a00023ac: e1a06001 mov r6, r1 a00023b0: e3a01000 mov r1, #0 a00023b4: e1a05000 mov r5, r0 a00023b8: e1a02001 mov r2, r1 a00023bc: e5970000 ldr r0, [r7] a00023c0: eb000c51 bl a000550c stop = (*routine)( mt_entry, routine_arg ); } rtems_libio_unlock(); return stop; } a00023c4: e4948004 ldr r8, [r4], #4 { rtems_chain_node *node = NULL; bool stop = false; rtems_libio_lock(); for ( a00023c8: e1580004 cmp r8, r4 rtems_per_filesystem_mount_routine routine, void *routine_arg ) { rtems_chain_node *node = NULL; bool stop = false; a00023cc: 03a0a000 moveq sl, #0 rtems_libio_lock(); for ( a00023d0: 1a000002 bne a00023e0 a00023d4: ea000008 b a00023fc <== NOT EXECUTED node = rtems_chain_first( &mount_chain ); !rtems_chain_is_tail( &mount_chain, node ) && !stop; a00023d8: e3500000 cmp r0, #0 a00023dc: 1a000006 bne a00023fc 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 ); a00023e0: e1a00008 mov r0, r8 a00023e4: e1a01006 mov r1, r6 a00023e8: e12fff35 blx r5 } rtems_libio_unlock(); return stop; } a00023ec: 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 ); a00023f0: e1a0a000 mov sl, r0 { rtems_chain_node *node = NULL; bool stop = false; rtems_libio_lock(); for ( a00023f4: e1580004 cmp r8, r4 a00023f8: 1afffff6 bne a00023d8 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); a00023fc: e5970000 ldr r0, [r7] a0002400: eb000c8a bl a0005630 stop = (*routine)( mt_entry, routine_arg ); } rtems_libio_unlock(); return stop; } a0002404: e1a0000a mov r0, sl a0002408: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} =============================================================================== a0001ddc : int rtems_filesystem_prefix_separators( const char *pathname, int pathnamelen ) { a0001ddc: e92d4070 push {r4, r5, r6, lr} a0001de0: e1a05000 mov r5, r0 /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) a0001de4: e5d00000 ldrb r0, [r0] a0001de8: e1a06001 mov r6, r1 a0001dec: e3510000 cmp r1, #0 a0001df0: 13500000 cmpne r0, #0 a0001df4: 03a04000 moveq r4, #0 a0001df8: 13a04001 movne r4, #1 ) { /* * Eat any separators at start of the path. */ int stripped = 0; a0001dfc: 13a04000 movne r4, #0 while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) a0001e00: 1a000005 bne a0001e1c a0001e04: ea000007 b a0001e28 <== NOT EXECUTED a0001e08: e5f50001 ldrb r0, [r5, #1]! { pathname++; pathnamelen--; stripped++; a0001e0c: e2844001 add r4, r4, #1 { /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) a0001e10: e1560004 cmp r6, r4 a0001e14: 13500000 cmpne r0, #0 a0001e18: 0a000002 beq a0001e28 a0001e1c: eb0003cb bl a0002d50 a0001e20: e3500000 cmp r0, #0 a0001e24: 1afffff7 bne a0001e08 pathname++; pathnamelen--; stripped++; } return stripped; } a0001e28: e1a00004 mov r0, r4 a0001e2c: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== a0002a40 : } return 0; } int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *)) { a0002a40: e92d4070 push {r4, r5, r6, lr} a0002a44: e1a06000 mov r6, r0 * pointer to the buffer that will hold the value of the key itself. * We have to to this, because the others functions on this interface * deal with the value of the key, as used with the POSIX API. */ /* Do not pull your hair, trust me this works. :-) */ __gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) ); a0002a48: e3a00008 mov r0, #8 } return 0; } int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *)) { a0002a4c: e1a05001 mov r5, r1 * pointer to the buffer that will hold the value of the key itself. * We have to to this, because the others functions on this interface * deal with the value of the key, as used with the POSIX API. */ /* Do not pull your hair, trust me this works. :-) */ __gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) ); a0002a50: eb00010b bl a0002e84 *key = new_key; new_key->val = NULL; a0002a54: e3a03000 mov r3, #0 * pointer to the buffer that will hold the value of the key itself. * We have to to this, because the others functions on this interface * deal with the value of the key, as used with the POSIX API. */ /* Do not pull your hair, trust me this works. :-) */ __gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) ); a0002a58: e1a04000 mov r4, r0 *key = new_key; a0002a5c: e5860000 str r0, [r6] "gxx_wrappers: create key=%x, dtor=%x, new_key=%x\n", key, dtor, new_key ); #endif /* register with RTEMS the buffer that will hold the key values */ status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor ); a0002a60: e1a01004 mov r1, r4 a0002a64: e1a00003 mov r0, r3 a0002a68: e1a02005 mov r2, r5 * deal with the value of the key, as used with the POSIX API. */ /* Do not pull your hair, trust me this works. :-) */ __gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) ); *key = new_key; new_key->val = NULL; a0002a6c: e8840028 stm r4, {r3, r5} "gxx_wrappers: create key=%x, dtor=%x, new_key=%x\n", key, dtor, new_key ); #endif /* register with RTEMS the buffer that will hold the key values */ status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor ); a0002a70: eb000f4e bl a00067b0 if ( status == RTEMS_SUCCESSFUL ) a0002a74: e3500000 cmp r0, #0 a0002a78: 1a000000 bne a0002a80 return 0; free( new_key ); return -1; } a0002a7c: e8bd8070 pop {r4, r5, r6, pc} /* register with RTEMS the buffer that will hold the key values */ status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor ); if ( status == RTEMS_SUCCESSFUL ) return 0; free( new_key ); a0002a80: e1a00004 mov r0, r4 <== NOT EXECUTED a0002a84: ebffff7b bl a0002878 <== NOT EXECUTED return -1; a0002a88: e3e00000 mvn r0, #0 <== NOT EXECUTED a0002a8c: eafffffa b a0002a7c <== NOT EXECUTED =============================================================================== a00029c4 : /* uncomment this if you need to debug this interface */ /*#define DEBUG_GXX_WRAPPERS 1*/ int rtems_gxx_once(__gthread_once_t *once, void (*func) (void)) { a00029c4: 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 ) { a00029c8: e5903000 ldr r3, [r0] /* uncomment this if you need to debug this interface */ /*#define DEBUG_GXX_WRAPPERS 1*/ int rtems_gxx_once(__gthread_once_t *once, void (*func) (void)) { a00029cc: e24dd004 sub sp, sp, #4 a00029d0: e1a04000 mov r4, r0 #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: once=%x, func=%x\n", *once, func ); #endif if ( *(volatile __gthread_once_t *)once == 0 ) { a00029d4: e3530000 cmp r3, #0 /* uncomment this if you need to debug this interface */ /*#define DEBUG_GXX_WRAPPERS 1*/ int rtems_gxx_once(__gthread_once_t *once, void (*func) (void)) { a00029d8: 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 ) { a00029dc: 0a000002 beq a00029ec rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); if ( o == 0 ) (*func)(); } return 0; } a00029e0: e3a00000 mov r0, #0 a00029e4: e28dd004 add sp, sp, #4 a00029e8: 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); a00029ec: e3a00c01 mov r0, #256 ; 0x100 a00029f0: e1a01000 mov r1, r0 a00029f4: e1a0200d mov r2, sp a00029f8: eb000ef2 bl a00065c8 if ( (o = *(volatile __gthread_once_t *)once) == 0 ) { a00029fc: 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); a0002a00: e1a0600d mov r6, sp if ( (o = *(volatile __gthread_once_t *)once) == 0 ) { a0002a04: e3530000 cmp r3, #0 a0002a08: 1a000007 bne a0002a2c *(volatile __gthread_once_t *)once = 1; a0002a0c: e3a03001 mov r3, #1 a0002a10: e5843000 str r3, [r4] } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); a0002a14: e3a01c01 mov r1, #256 ; 0x100 a0002a18: e1a0200d mov r2, sp a0002a1c: e59d0000 ldr r0, [sp] a0002a20: eb000ee8 bl a00065c8 if ( o == 0 ) (*func)(); a0002a24: e12fff35 blx r5 a0002a28: eaffffec b a00029e0 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); a0002a2c: e59d0000 ldr r0, [sp] <== NOT EXECUTED a0002a30: e3a01c01 mov r1, #256 ; 0x100 <== NOT EXECUTED a0002a34: e1a0200d mov r2, sp <== NOT EXECUTED a0002a38: eb000ee2 bl a00065c8 <== NOT EXECUTED a0002a3c: eaffffe7 b a00029e0 <== NOT EXECUTED =============================================================================== a0006e04 : 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 ) { a0006e04: e92d4030 push {r4, r5, lr} a0006e08: e1a04000 mov r4, r0 rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) a0006e0c: e59f014c ldr r0, [pc, #332] ; a0006f60 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; a0006e10: e59f314c ldr r3, [pc, #332] ; a0006f64 if ( rtems_interrupt_is_in_progress() ) a0006e14: e5900000 ldr r0, [r0] a0006e18: e3500000 cmp r0, #0 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; a0006e1c: e5930000 ldr r0, [r3] if ( rtems_interrupt_is_in_progress() ) a0006e20: 1a000033 bne a0006ef4 return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) a0006e24: e3520000 cmp r2, #0 a0006e28: 0a000041 beq a0006f34 return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; if ( driver_table == NULL ) a0006e2c: e3510000 cmp r1, #0 if ( registered_major == NULL ) return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; a0006e30: e5820000 str r0, [r2] if ( driver_table == NULL ) a0006e34: 0a00003e beq a0006f34 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; a0006e38: e591c000 ldr ip, [r1] a0006e3c: e35c0000 cmp ip, #0 a0006e40: 0a000038 beq a0006f28 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) a0006e44: e1500004 cmp r0, r4 a0006e48: 9a000027 bls a0006eec rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; a0006e4c: e59f0114 ldr r0, [pc, #276] ; a0006f68 a0006e50: e590c000 ldr ip, [r0] a0006e54: e28cc001 add ip, ip, #1 a0006e58: e580c000 str ip, [r0] return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { a0006e5c: e3540000 cmp r4, #0 a0006e60: 1a000025 bne a0006efc static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; a0006e64: e593c000 ldr ip, [r3] rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { a0006e68: e35c0000 cmp ip, #0 a0006e6c: 0a000032 beq a0006f3c a0006e70: e59fe0f4 ldr lr, [pc, #244] ; a0006f6c a0006e74: e59e3000 ldr r3, [lr] a0006e78: ea000003 b a0006e8c a0006e7c: e2844001 add r4, r4, #1 a0006e80: e15c0004 cmp ip, r4 a0006e84: e2833018 add r3, r3, #24 a0006e88: 9a000005 bls a0006ea4 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; a0006e8c: e5930000 ldr r0, [r3] a0006e90: e3500000 cmp r0, #0 a0006e94: 1afffff8 bne a0006e7c a0006e98: e5930004 ldr r0, [r3, #4] a0006e9c: e3500000 cmp r0, #0 a0006ea0: 1afffff5 bne a0006e7c } /* Assigns invalid value in case of failure */ *major = m; if ( m != n ) a0006ea4: e15c0004 cmp ip, r4 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; a0006ea8: e5824000 str r4, [r2] if ( m != n ) a0006eac: 0a000023 beq a0006f40 a0006eb0: e3a0c018 mov ip, #24 a0006eb4: e00c0c94 mul ip, r4, ip } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; a0006eb8: e59e5000 ldr r5, [lr] a0006ebc: e1a0e001 mov lr, r1 a0006ec0: e8be000f ldm lr!, {r0, r1, r2, r3} a0006ec4: e085c00c add ip, r5, ip a0006ec8: e8ac000f stmia ip!, {r0, r1, r2, r3} a0006ecc: e89e0003 ldm lr, {r0, r1} a0006ed0: e88c0003 stm ip, {r0, r1} _Thread_Enable_dispatch(); a0006ed4: eb000765 bl a0008c70 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); a0006ed8: e3a01000 mov r1, #0 a0006edc: e1a00004 mov r0, r4 a0006ee0: e1a02001 mov r2, r1 } a0006ee4: e8bd4030 pop {r4, r5, lr} _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); a0006ee8: ea00215d b a000f464 if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) return RTEMS_INVALID_NUMBER; a0006eec: e3a0000a mov r0, #10 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } a0006ef0: e8bd8030 pop {r4, r5, pc} ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) return RTEMS_CALLED_FROM_ISR; a0006ef4: e3a00012 mov r0, #18 a0006ef8: 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; a0006efc: e59fe068 ldr lr, [pc, #104] ; a0006f6c a0006f00: e3a0c018 mov ip, #24 a0006f04: e00c0c94 mul ip, r4, ip a0006f08: e59e3000 ldr r3, [lr] static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; a0006f0c: e793000c ldr r0, [r3, ip] _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; a0006f10: 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; a0006f14: e3500000 cmp r0, #0 a0006f18: 0a00000b beq a0006f4c 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(); a0006f1c: eb000753 bl a0008c70 <_Thread_Enable_dispatch> return RTEMS_RESOURCE_IN_USE; a0006f20: e3a0000c mov r0, #12 a0006f24: 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; a0006f28: e591c004 ldr ip, [r1, #4] a0006f2c: e35c0000 cmp ip, #0 a0006f30: 1affffc3 bne a0006e44 if ( driver_table == NULL ) return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; a0006f34: e3a00009 mov r0, #9 a0006f38: e8bd8030 pop {r4, r5, pc} if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; a0006f3c: 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(); a0006f40: eb00074a bl a0008c70 <_Thread_Enable_dispatch> *major = m; if ( m != n ) return RTEMS_SUCCESSFUL; return RTEMS_TOO_MANY; a0006f44: 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; a0006f48: 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; a0006f4c: e5933004 ldr r3, [r3, #4] a0006f50: e3530000 cmp r3, #0 a0006f54: 1afffff0 bne a0006f1c if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; a0006f58: e5824000 str r4, [r2] a0006f5c: eaffffd5 b a0006eb8 =============================================================================== a0001f90 : { rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) a0001f90: e59f30bc ldr r3, [pc, #188] ; a0002054 * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { a0001f94: e92d4010 push {r4, lr} rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) a0001f98: e5934000 ldr r4, [r3] * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { a0001f9c: e24dd004 sub sp, sp, #4 rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) a0001fa0: e3540000 cmp r4, #0 a0001fa4: 0a000017 beq a0002008 { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, a0001fa8: e1a00004 mov r0, r4 a0001fac: e3a01038 mov r1, #56 ; 0x38 a0001fb0: ebffff35 bl a0001c8c a0001fb4: e59f309c ldr r3, [pc, #156] ; a0002058 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) a0001fb8: 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, a0001fbc: e1a02000 mov r2, r0 a0001fc0: e5830000 str r0, [r3] sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) a0001fc4: 0a000020 beq a000204c rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; a0001fc8: e59f308c ldr r3, [pc, #140] ; a000205c for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) a0001fcc: 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; a0001fd0: e5830000 str r0, [r3] for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) a0001fd4: 9a000009 bls a0002000 * rtems_libio_init * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) a0001fd8: e2803038 add r3, r0, #56 ; 0x38 a0001fdc: 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; a0001fe0: 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++) a0001fe4: e1520004 cmp r2, r4 iop->data1 = iop + 1; a0001fe8: e5033004 str r3, [r3, #-4] a0001fec: 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++) a0001ff0: 1afffffa bne a0001fe0 * rtems_libio_init * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) a0001ff4: e2422001 sub r2, r2, #1 a0001ff8: e3a03038 mov 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++) a0001ffc: e0220293 mla r2, r3, r2, r0 iop->data1 = iop + 1; iop->data1 = NULL; a0002000: e3a03000 mov r3, #0 a0002004: e5823034 str r3, [r2, #52] ; 0x34 /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( a0002008: e59fc050 ldr ip, [pc, #80] ; a0002060 a000200c: e59f0050 ldr r0, [pc, #80] ; a0002064 a0002010: e3a01001 mov r1, #1 a0002014: e3a02054 mov r2, #84 ; 0x54 a0002018: e3a03000 mov r3, #0 a000201c: e58dc000 str ip, [sp] a0002020: eb000c9f bl a00052a4 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) a0002024: e3500000 cmp r0, #0 a0002028: 1a000006 bne a0002048 /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) a000202c: e59f3034 ldr r3, [pc, #52] ; a0002068 a0002030: e5933000 ldr r3, [r3] a0002034: e3530000 cmp r3, #0 a0002038: 0a000000 beq a0002040 (* rtems_fs_init_helper)(); a000203c: e12fff33 blx r3 } a0002040: e28dd004 add sp, sp, #4 a0002044: 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 ); a0002048: eb000ed7 bl a0005bac <== 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); a000204c: e280001a add r0, r0, #26 a0002050: eb000ed5 bl a0005bac =============================================================================== a000a09c : uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { a000a09c: e2002006 and r2, r0, #6 a000a0a0: e3520006 cmp r2, #6 */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) { a000a0a4: e1a03000 mov r3, r0 uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { fcntl_flags |= O_RDWR; a000a0a8: 03a00002 moveq r0, #2 uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { a000a0ac: 0a000002 beq a000a0bc fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { a000a0b0: e3130002 tst r3, #2 fcntl_flags |= O_RDONLY; a000a0b4: 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) { a000a0b8: 0a000006 beq a000a0d8 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 ) { a000a0bc: e3130001 tst r3, #1 fcntl_flags |= O_NONBLOCK; a000a0c0: 13800901 orrne r0, r0, #16384 ; 0x4000 } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { a000a0c4: e3130c02 tst r3, #512 ; 0x200 fcntl_flags |= O_APPEND; a000a0c8: 13800008 orrne r0, r0, #8 } if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { a000a0cc: e3130b01 tst r3, #1024 ; 0x400 fcntl_flags |= O_CREAT; a000a0d0: 13800c02 orrne r0, r0, #512 ; 0x200 } return fcntl_flags; } a000a0d4: e12fff1e bx lr ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { fcntl_flags |= O_RDWR; a000a0d8: e3130004 tst r3, #4 <== NOT EXECUTED a000a0dc: 03a00000 moveq r0, #0 <== NOT EXECUTED a000a0e0: 13a00001 movne r0, #1 <== NOT EXECUTED a000a0e4: eafffff4 b a000a0bc <== NOT EXECUTED =============================================================================== a0005814 : ) { const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) a0005814: e3500001 cmp r0, #1 const char *rtems_object_get_api_class_name( int the_api, int the_class ) { a0005818: 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 ) a000581c: 0a00000d beq a0005858 api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) a0005820: e3500002 cmp r0, #2 a0005824: 0a000004 beq a000583c api_assoc = rtems_object_api_classic_assoc; #ifdef RTEMS_POSIX_API else if ( the_api == OBJECTS_POSIX_API ) a0005828: e3500003 cmp r0, #3 api_assoc = rtems_object_api_posix_assoc; a000582c: 059f003c ldreq r0, [pc, #60] ; a0005870 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 ) a0005830: 0a000002 beq a0005840 api_assoc = rtems_object_api_posix_assoc; #endif else return "BAD API"; a0005834: e59f0038 ldr r0, [pc, #56] ; a0005874 a0005838: 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; a000583c: e59f0034 ldr r0, [pc, #52] ; a0005878 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 ); a0005840: eb00138f bl a000a684 if ( class_assoc ) a0005844: e3500000 cmp r0, #0 return class_assoc->name; a0005848: 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 ) a000584c: 149df004 popne {pc} ; (ldrne pc, [sp], #4) return class_assoc->name; return "BAD CLASS"; a0005850: e59f0024 ldr r0, [pc, #36] ; a000587c } a0005854: 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; a0005858: e59f0020 ldr r0, [pc, #32] ; a0005880 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 ); a000585c: eb001388 bl a000a684 if ( class_assoc ) a0005860: e3500000 cmp r0, #0 return class_assoc->name; a0005864: 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 ) a0005868: 149df004 popne {pc} ; (ldrne pc, [sp], #4) a000586c: eafffff7 b a0005850 <== NOT EXECUTED =============================================================================== a00014f0 : void rtems_print_buffer( const unsigned char *buffer, int length ) { a00014f0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} int i, mod, max; if ( !length ) return; a00014f4: e3510000 cmp r1, #0 void rtems_print_buffer( const unsigned char *buffer, int length ) { a00014f8: e24dd084 sub sp, sp, #132 ; 0x84 a00014fc: e58d0004 str r0, [sp, #4] int i, mod, max; if ( !length ) return; a0001500: 0a00003f beq a0001604 mod = length % 16; a0001504: e1a03fc1 asr r3, r1, #31 a0001508: e1a03e23 lsr r3, r3, #28 a000150c: e0819003 add r9, r1, r3 a0001510: e209900f and r9, r9, #15 a0001514: e0639009 rsb r9, r3, r9 max = length - mod; a0001518: e0691001 rsb r1, r9, r1 for ( i=0 ; i a0001528: e59f7238 ldr r7, [pc, #568] ; a0001768 a000152c: e3a08000 mov r8, #0 isprint( buffer[ i ] ) ? buffer[ i ] : '.' ); for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|\n" ); a0001530: e58d9008 str r9, [sp, #8] a0001534: e28d400c add r4, sp, #12 { int i; char line_buffer[120]; line_buffer[0] = '\0'; a0001538: e1a0a008 mov sl, r8 sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] ); for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|" ); a000153c: e3a0b07c mov fp, #124 ; 0x7c isprint( buffer[ i ] ) ? buffer[ i ] : '.' ); for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|\n" ); a0001540: e1a09000 mov r9, r0 static inline void Dump_Line( const unsigned char *buffer, int length ); void rtems_print_buffer( a0001544: e0896008 add r6, r9, r8 { int i; char line_buffer[120]; line_buffer[0] = '\0'; a0001548: e5cda00c strb sl, [sp, #12] for( i=0 ; i a000155c: e1a02004 mov r2, r4 int i; char line_buffer[120]; line_buffer[0] = '\0'; for( i=0 ; i int i; char line_buffer[120]; line_buffer[0] = '\0'; for( i=0 ; i sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] ); for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|" ); a0001570: e1a00004 mov r0, r4 a0001574: eb0035c4 bl a000ec8c a0001578: e0843000 add r3, r4, r0 a000157c: e7c4b000 strb fp, [r4, r0] for( i=0 ; i isprint( buffer[ i ] ) ? buffer[ i ] : '.' ); a0001598: e0822003 add r2, r2, r3 a000159c: e5d2c001 ldrb ip, [r2, #1] for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|" ); for( i=0 ; i for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|" ); for( i=0 ; i isprint( buffer[ i ] ) ? buffer[ i ] : '.' ); for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|\n" ); a00015bc: e1a00004 mov r0, r4 a00015c0: eb0035b1 bl a000ec8c a00015c4: e0843000 add r3, r4, r0 a00015c8: e1a02000 mov r2, r0 a00015cc: e7c4b002 strb fp, [r4, r2] a00015d0: e2831002 add r1, r3, #2 a00015d4: e3a0200a mov r2, #10 a00015d8: e5c32001 strb r2, [r3, #1] printk( line_buffer ); a00015dc: e1a00004 mov r0, r4 isprint( buffer[ i ] ) ? buffer[ i ] : '.' ); for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|\n" ); a00015e0: e5c1a000 strb sl, [r1] printk( line_buffer ); a00015e4: eb000651 bl a0002f30 mod = length % 16; max = length - mod; for ( i=0 ; i a00015f8: e59d9008 ldr r9, [sp, #8] Dump_Line( &buffer[ i ], 16 ); if ( mod ) a00015fc: e3590000 cmp r9, #0 a0001600: 1a000001 bne a000160c Dump_Line( &buffer[ max ], mod ); } a0001604: e28dd084 add sp, sp, #132 ; 0x84 a0001608: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} for ( i=0 ; i a0001628: e28d400c add r4, sp, #12 sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] ); a000162c: e7d63005 ldrb r3, [r6, r5] a0001630: e1a00004 mov r0, r4 a0001634: e59f1130 ldr r1, [pc, #304] ; a000176c a0001638: e1a02004 mov r2, r4 int i; char line_buffer[120]; line_buffer[0] = '\0'; for( i=0 ; i int i; char line_buffer[120]; line_buffer[0] = '\0'; for( i=0 ; i sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] ); for( ; i<16 ; i++ ) a000164c: e359000f cmp r9, #15 a0001650: d1a05009 movle r5, r9 a0001654: ca00003b bgt a0001748 strcat( line_buffer, " " ); a0001658: e1a00004 mov r0, r4 a000165c: eb00358a bl a000ec8c line_buffer[0] = '\0'; for( i=0 ; i a0001668: e0840000 add r0, r4, r0 a000166c: e3a02004 mov r2, #4 a0001670: eb0033bd bl a000e56c line_buffer[0] = '\0'; for( i=0 ; i strcat( line_buffer, " " ); strcat( line_buffer, "|" ); a000167c: e1a00004 mov r0, r4 a0001680: eb003581 bl a000ec8c a0001684: e3a03000 mov r3, #0 a0001688: e0842000 add r2, r4, r0 for( i=0 ; i a00016a4: e59f70bc ldr r7, [pc, #188] ; a0001768 a00016a8: e3a05000 mov r5, #0 sprintf( line_buffer, "%s%c", line_buffer, isprint( buffer[ i ] ) ? buffer[ i ] : '.' ); a00016ac: e7d63005 ldrb r3, [r6, r5] a00016b0: e5972000 ldr r2, [r7] for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|" ); for( i=0 ; i isprint( buffer[ i ] ) ? buffer[ i ] : '.' ); a00016bc: e0822003 add r2, r2, r3 a00016c0: e5d2c001 ldrb ip, [r2, #1] for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|" ); for( i=0 ; i for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|" ); for( i=0 ; i sprintf( line_buffer, "%s%c", line_buffer, isprint( buffer[ i ] ) ? buffer[ i ] : '.' ); for( ; i<16 ; i++ ) a00016e0: e359000f cmp r9, #15 a00016e4: ca000009 bgt a0001710 strcat( line_buffer, " " ); a00016e8: e3a06020 mov r6, #32 a00016ec: e3a05000 mov r5, #0 a00016f0: e1a00004 mov r0, r4 a00016f4: eb003564 bl a000ec8c strcat( line_buffer, "|" ); for( i=0 ; i strcat( line_buffer, " " ); strcat( line_buffer, "|\n" ); a0001710: e1a00004 mov r0, r4 a0001714: eb00355c bl a000ec8c a0001718: e3a0c07c mov ip, #124 ; 0x7c a000171c: e1a02000 mov r2, r0 a0001720: e0843000 add r3, r4, r0 a0001724: e7c4c002 strb ip, [r4, r2] a0001728: e3a0200a mov r2, #10 a000172c: e2831002 add r1, r3, #2 a0001730: e5c32001 strb r2, [r3, #1] a0001734: e3a03000 mov r3, #0 printk( line_buffer ); a0001738: e1a00004 mov r0, r4 isprint( buffer[ i ] ) ? buffer[ i ] : '.' ); for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|\n" ); a000173c: e5c13000 strb r3, [r1] printk( line_buffer ); a0001740: eb0005fa bl a0002f30 a0001744: eaffffae b a0001604 sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] ); for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|" ); a0001748: e1a00004 mov r0, r4 <== NOT EXECUTED a000174c: eb00354e bl a000ec8c <== NOT EXECUTED a0001750: e3a0207c mov r2, #124 ; 0x7c <== NOT EXECUTED a0001754: e7c42000 strb r2, [r4, r0] <== NOT EXECUTED a0001758: e0843000 add r3, r4, r0 <== NOT EXECUTED a000175c: e3a02000 mov r2, #0 <== NOT EXECUTED a0001760: e5c32001 strb r2, [r3, #1] <== NOT EXECUTED a0001764: eaffffce b a00016a4 <== NOT EXECUTED =============================================================================== a00020b8 : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { a00020b8: e92d4830 push {r4, r5, fp, lr} Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; a00020bc: e59f4074 ldr r4, [pc, #116] ; a0002138 /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { a00020c0: e28db00c add fp, sp, #12 Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; a00020c4: e5943004 ldr r3, [r4, #4] ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { a00020c8: e59300bc ldr r0, [r3, #188] ; 0xbc a00020cc: e15b0000 cmp fp, r0 return false; a00020d0: 33a05000 movcc r5, #0 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { a00020d4: 3a000004 bcc a00020ec return false; } if ( sp > (the_stack->area + the_stack->size) ) { a00020d8: e59350b8 ldr r5, [r3, #184] ; 0xb8 a00020dc: e0805005 add r5, r0, r5 } /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) a00020e0: e15b0005 cmp fp, r5 a00020e4: 83a05000 movhi r5, #0 a00020e8: 93a05001 movls r5, #1 /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { a00020ec: e59f3048 ldr r3, [pc, #72] ; a000213c a00020f0: e5933008 ldr r3, [r3, #8] a00020f4: e3530000 cmp r3, #0 */ bool rtems_stack_checker_is_blown( void ) { Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; bool sp_ok; bool pattern_ok = true; a00020f8: 03a01001 moveq r1, #1 /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { a00020fc: 0a000005 beq a0002118 pattern_ok = (!memcmp( a0002100: e59f1038 ldr r1, [pc, #56] ; a0002140 a0002104: e2800008 add r0, r0, #8 a0002108: e3a02010 mov r2, #16 a000210c: eb003bcd bl a0011048 a0002110: e2701001 rsbs r1, r0, #1 a0002114: 33a01000 movcc r1, #0 /* * Let's report as much as we can. */ if ( !sp_ok || !pattern_ok ) { a0002118: e3550000 cmp r5, #0 a000211c: 0a000003 beq a0002130 a0002120: e3510000 cmp r1, #0 a0002124: 0a000001 beq a0002130 /* * The Stack Pointer and the Pattern Area are OK so return false. */ return false; } a0002128: e3a00000 mov r0, #0 a000212c: e8bd8830 pop {r4, r5, fp, pc} /* * Let's report as much as we can. */ if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); a0002130: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED a0002134: ebffff97 bl a0001f98 <== NOT EXECUTED =============================================================================== a000204c : */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { a000204c: e92d4810 push {r4, fp, lr} Stack_Control *the_stack = &running->Start.Initial_stack; void *pattern; bool sp_ok; bool pattern_ok = true; pattern = Stack_check_Get_pattern_area(the_stack); a0002050: e59030bc ldr r3, [r0, #188] ; 0xbc */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { a0002054: e28db008 add fp, sp, #8 a0002058: e1a04000 mov r4, r0 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { a000205c: e15b0003 cmp fp, r3 Stack_Control *the_stack = &running->Start.Initial_stack; void *pattern; bool sp_ok; bool pattern_ok = true; pattern = Stack_check_Get_pattern_area(the_stack); a0002060: e2830008 add r0, r3, #8 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { a0002064: 3a000003 bcc a0002078 return false; } if ( sp > (the_stack->area + the_stack->size) ) { a0002068: e59420b8 ldr r2, [r4, #184] ; 0xb8 a000206c: e0833002 add r3, r3, r2 a0002070: e15b0003 cmp fp, r3 a0002074: 9a000006 bls a0002094 /* * 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, a0002078: e59f1034 ldr r1, [pc, #52] ; a00020b4 <== NOT EXECUTED a000207c: e3a02010 mov r2, #16 <== NOT EXECUTED a0002080: eb003bf0 bl a0011048 <== NOT EXECUTED a0002084: e2701001 rsbs r1, r0, #1 <== NOT EXECUTED a0002088: 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 ); a000208c: e1a00004 mov r0, r4 a0002090: ebffffc0 bl a0001f98 /* * 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, a0002094: e59f1018 ldr r1, [pc, #24] ; a00020b4 a0002098: e3a02010 mov r2, #16 a000209c: eb003be9 bl a0011048 (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { a00020a0: e3500000 cmp r0, #0 a00020a4: 1a000000 bne a00020ac a00020a8: e8bd8810 pop {r4, fp, pc} a00020ac: e3a01000 mov r1, #0 a00020b0: eafffff5 b a000208c =============================================================================== a000bd54 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { a000bd54: e92d40f0 push {r4, r5, r6, r7, lr} STRING_TO_INPUT_TYPE result; char *end; if ( !n ) a000bd58: e2515000 subs r5, r1, #0 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { a000bd5c: e1a04000 mov r4, r0 a000bd60: e24dd004 sub sp, sp, #4 a000bd64: e1a06002 mov r6, r2 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; a000bd68: 03a00009 moveq r0, #9 ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) a000bd6c: 0a000013 beq a000bdc0 return RTEMS_INVALID_ADDRESS; errno = 0; a000bd70: eb000bde bl a000ecf0 <__errno> a000bd74: e3a03000 mov r3, #0 a000bd78: 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 ); a000bd7c: e1a0100d mov r1, sp if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; a000bd80: 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 ); a000bd84: e1a00004 mov r0, r4 a000bd88: e3a02010 mov r2, #16 a000bd8c: eb001906 bl a00121ac #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 ) a000bd90: e3560000 cmp r6, #0 *endptr = end; a000bd94: 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 ) a000bd98: 059d3000 ldreq r3, [sp] *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); a000bd9c: e1a07000 mov r7, r0 result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; a000bda0: 15863000 strne r3, [r6] /* nothing was converted */ if ( end == s ) a000bda4: e1540003 cmp r4, r3 return RTEMS_NOT_DEFINED; a000bda8: 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 ) a000bdac: 0a000003 beq a000bdc0 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) a000bdb0: e3770001 cmn r7, #1 a000bdb4: 0a000003 beq a000bdc8 if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; a000bdb8: e5857000 str r7, [r5] #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; a000bdbc: e3a00000 mov r0, #0 } a000bdc0: e28dd004 add sp, sp, #4 a000bdc4: 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)) a000bdc8: eb000bc8 bl a000ecf0 <__errno> <== NOT EXECUTED a000bdcc: e5903000 ldr r3, [r0] <== NOT EXECUTED a000bdd0: e3530022 cmp r3, #34 ; 0x22 <== NOT EXECUTED return RTEMS_INVALID_NUMBER; a000bdd4: 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)) a000bdd8: 1afffff6 bne a000bdb8 <== NOT EXECUTED a000bddc: eafffff7 b a000bdc0 <== NOT EXECUTED =============================================================================== a00018f0 : int rtems_tarfs_load( char *mountpoint, uint8_t *tar_image, size_t tar_size ) { a00018f0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} a00018f4: e24ddf6b sub sp, sp, #428 ; 0x1ac a00018f8: e1a06001 mov r6, r1 a00018fc: e1a07002 mov r7, r2 a0001900: e58d0018 str r0, [sp, #24] int offset; unsigned long nblocks; IMFS_jnode_t *node; int status; status = rtems_filesystem_evaluate_path( a0001904: eb0043f0 bl a00128cc a0001908: e28d2f65 add r2, sp, #404 ; 0x194 a000190c: e1a01000 mov r1, r0 a0001910: e58d2008 str r2, [sp, #8] a0001914: e59d0018 ldr r0, [sp, #24] a0001918: e3a02000 mov r2, #0 a000191c: e28d3f65 add r3, sp, #404 ; 0x194 a0001920: e58d2000 str r2, [sp] a0001924: eb0002be bl a0002424 strlen(mountpoint), 0, &root_loc, 0 ); if (status != 0) a0001928: e3500000 cmp r0, #0 return -1; a000192c: 13e02000 mvnne r2, #0 strlen(mountpoint), 0, &root_loc, 0 ); if (status != 0) a0001930: e58d0014 str r0, [sp, #20] return -1; a0001934: 158d2014 strne r2, [sp, #20] strlen(mountpoint), 0, &root_loc, 0 ); if (status != 0) a0001938: 1a000032 bne a0001a08 return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) a000193c: e59d31a0 ldr r3, [sp, #416] ; 0x1a0 a0001940: e59f21d4 ldr r2, [pc, #468] ; a0001b1c a0001944: e1530002 cmp r3, r2 a0001948: 059d8014 ldreq r8, [sp, #20] a000194c: 1a00006b bne a0001b00 /* * Create an IMFS node structure pointing to tar image memory. */ offset = 0; while (1) { if (offset + 512 > tar_size) a0001950: e2884c02 add r4, r8, #512 ; 0x200 * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; a0001954: e28d3d06 add r3, sp, #384 ; 0x180 /* * Create an IMFS node structure pointing to tar image memory. */ offset = 0; while (1) { if (offset + 512 > tar_size) a0001958: e1540007 cmp r4, r7 hdr_ptr = (char *) &tar_image[offset]; offset += 512; if (strncmp(&hdr_ptr[257], "ustar", 5)) break; strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); a000195c: e28d5f47 add r5, sp, #284 ; 0x11c * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; a0001960: e58d3004 str r3, [sp, #4] /* * Create an IMFS node structure pointing to tar image memory. */ offset = 0; while (1) { if (offset + 512 > tar_size) a0001964: 8a000027 bhi a0001a08 break; /* * Read a header. */ hdr_ptr = (char *) &tar_image[offset]; a0001968: e0868008 add r8, r6, r8 offset += 512; if (strncmp(&hdr_ptr[257], "ustar", 5)) a000196c: e2880c01 add r0, r8, #256 ; 0x100 a0001970: e2800001 add r0, r0, #1 a0001974: e59f11a4 ldr r1, [pc, #420] ; a0001b20 a0001978: e3a02005 mov r2, #5 a000197c: eb0043ea bl a001292c a0001980: e250a000 subs sl, r0, #0 a0001984: 1a00001f bne a0001a08 break; strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); a0001988: e3a02063 mov r2, #99 ; 0x63 a000198c: e1a01008 mov r1, r8 a0001990: e1a00005 mov r0, r5 a0001994: eb004440 bl a0012a9c filename[MAX_NAME_FIELD_SIZE] = '\0'; linkflag = hdr_ptr[156]; file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8); a0001998: e3a01008 mov r1, #8 offset += 512; if (strncmp(&hdr_ptr[257], "ustar", 5)) break; strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); filename[MAX_NAME_FIELD_SIZE] = '\0'; a000199c: e5cda17f strb sl, [sp, #383] ; 0x17f linkflag = hdr_ptr[156]; file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8); a00019a0: e2880064 add r0, r8, #100 ; 0x64 break; strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); filename[MAX_NAME_FIELD_SIZE] = '\0'; linkflag = hdr_ptr[156]; a00019a4: e5d8b09c ldrb fp, [r8, #156] ; 0x9c file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8); a00019a8: eb002001 bl a00099b4 <_rtems_octal2ulong> file_size = _rtems_octal2ulong(&hdr_ptr[124], 12); a00019ac: 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); a00019b0: e58d0010 str r0, [sp, #16] file_size = _rtems_octal2ulong(&hdr_ptr[124], 12); a00019b4: e288007c add r0, r8, #124 ; 0x7c a00019b8: eb001ffd bl a00099b4 <_rtems_octal2ulong> hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8); a00019bc: 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); a00019c0: e1a09000 mov r9, r0 hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8); a00019c4: e2880094 add r0, r8, #148 ; 0x94 a00019c8: eb001ff9 bl a00099b4 <_rtems_octal2ulong> a00019cc: e1a03000 mov r3, r0 if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum) a00019d0: e1a00008 mov r0, r8 a00019d4: e58d300c str r3, [sp, #12] a00019d8: eb002102 bl a0009de8 <_rtems_tar_header_checksum> a00019dc: e59d300c ldr r3, [sp, #12] a00019e0: e1500003 cmp r0, r3 a00019e4: 1a000007 bne a0001a08 * 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) { a00019e8: e35b0035 cmp fp, #53 ; 0x35 a00019ec: 0a00001a beq a0001a5c * 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) { a00019f0: e35b0030 cmp fp, #48 ; 0x30 a00019f4: 0a000006 beq a0001a14 0 ); if (status != 0) return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) a00019f8: e1a08004 mov r8, r4 /* * Create an IMFS node structure pointing to tar image memory. */ offset = 0; while (1) { if (offset + 512 > tar_size) a00019fc: e2884c02 add r4, r8, #512 ; 0x200 a0001a00: e1540007 cmp r4, r7 a0001a04: 9affffd7 bls a0001968 nblocks = (((file_size) + 511) & ~511) / 512; offset += 512 * nblocks; } } return status; } a0001a08: e59d0014 ldr r0, [sp, #20] a0001a0c: e28ddf6b add sp, sp, #428 ; 0x1ac a0001a10: 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; a0001a14: e59dc008 ldr ip, [sp, #8] a0001a18: e59de004 ldr lr, [sp, #4] a0001a1c: e8bc000f ldm ip!, {r0, r1, r2, r3} a0001a20: e8ae000f stmia lr!, {r0, r1, r2, r3} a0001a24: e59cc000 ldr ip, [ip] if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { a0001a28: e1a00005 mov r0, r5 a0001a2c: e28d1d06 add r1, sp, #384 ; 0x180 a0001a30: e28d2f6a add r2, sp, #424 ; 0x1a8 * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; a0001a34: e58ec000 str ip, [lr] if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { a0001a38: eb00231d bl a000a6b4 a0001a3c: e2508000 subs r8, r0, #0 a0001a40: 0a00001c beq a0001ab8 ); node->info.linearfile.size = file_size; node->info.linearfile.direct = &tar_image[offset]; } nblocks = (((file_size) + 511) & ~511) / 512; a0001a44: e2899f7f add r9, r9, #508 ; 0x1fc <== NOT EXECUTED a0001a48: e2899003 add r9, r9, #3 <== NOT EXECUTED a0001a4c: e1a094a9 lsr r9, r9, #9 <== NOT EXECUTED offset += 512 * nblocks; a0001a50: e0844489 add r4, r4, r9, lsl #9 <== NOT EXECUTED 0 ); if (status != 0) return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) a0001a54: e1a08004 mov r8, r4 a0001a58: eaffffe7 b a00019fc * - 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); a0001a5c: e59d1018 ldr r1, [sp, #24] a0001a60: e28d001c add r0, sp, #28 a0001a64: eb0041d4 bl a00121bc if (full_filename[strlen(full_filename)-1] != '/') a0001a68: e28d001c add r0, sp, #28 a0001a6c: eb004396 bl a00128cc a0001a70: e28def6b add lr, sp, #428 ; 0x1ac a0001a74: e08e3000 add r3, lr, r0 a0001a78: e5533191 ldrb r3, [r3, #-401] ; 0x191 0 ); if (status != 0) return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) a0001a7c: e1a08004 mov r8, r4 * will take care of the rest. * - For files, create a file node with special tarfs properties. */ if (linkflag == DIRTYPE) { strcpy(full_filename, mountpoint); if (full_filename[strlen(full_filename)-1] != '/') a0001a80: e353002f cmp r3, #47 ; 0x2f strcat(full_filename, "/"); a0001a84: 128d101c addne r1, sp, #28 a0001a88: 10813000 addne r3, r1, r0 a0001a8c: 13a0202f movne r2, #47 ; 0x2f a0001a90: 17c12000 strbne r2, [r1, r0] a0001a94: 15c3a001 strbne sl, [r3, #1] strcat(full_filename, filename); a0001a98: e1a01005 mov r1, r5 a0001a9c: e28d001c add r0, sp, #28 a0001aa0: eb00410e bl a0011ee0 mkdir(full_filename, S_IRWXU | S_IRWXG | S_IRWXO); a0001aa4: e3a01f7f mov r1, #508 ; 0x1fc a0001aa8: e28d001c add r0, sp, #28 a0001aac: e2811003 add r1, r1, #3 a0001ab0: eb0004d5 bl a0002e0c a0001ab4: eaffffd0 b a00019fc 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, a0001ab8: e59d1010 ldr r1, [sp, #16] else if (linkflag == REGTYPE) { const char *name; loc = root_loc; if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { node = IMFS_create_node( a0001abc: e28d0d06 add r0, sp, #384 ; 0x180 a0001ac0: e59d21a8 ldr r2, [sp, #424] ; 0x1a8 &loc, IMFS_LINEAR_FILE, (char *)name, (file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG, a0001ac4: e1a03b81 lsl r3, r1, #23 else if (linkflag == REGTYPE) { const char *name; loc = root_loc; if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { node = IMFS_create_node( a0001ac8: e3a01006 mov r1, #6 &loc, IMFS_LINEAR_FILE, (char *)name, (file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG, a0001acc: 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( a0001ad0: e3833902 orr r3, r3, #32768 ; 0x8000 a0001ad4: e58d8000 str r8, [sp] a0001ad8: eb002146 bl a0009ff8 &loc, IMFS_LINEAR_FILE, (char *)name, (file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG, NULL ); node->info.linearfile.size = file_size; a0001adc: e5809050 str r9, [r0, #80] ; 0x50 node->info.linearfile.direct = &tar_image[offset]; } nblocks = (((file_size) + 511) & ~511) / 512; a0001ae0: e2899f7f add r9, r9, #508 ; 0x1fc a0001ae4: e2899003 add r9, r9, #3 a0001ae8: e1a094a9 lsr r9, r9, #9 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]; a0001aec: e0863004 add r3, r6, r4 &loc, IMFS_LINEAR_FILE, (char *)name, (file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG, NULL ); node->info.linearfile.size = file_size; a0001af0: e5808054 str r8, [r0, #84] ; 0x54 node->info.linearfile.direct = &tar_image[offset]; a0001af4: e5803058 str r3, [r0, #88] ; 0x58 } nblocks = (((file_size) + 511) & ~511) / 512; offset += 512 * nblocks; a0001af8: e0844489 add r4, r4, r9, lsl #9 a0001afc: eaffffd4 b a0001a54 0 ); if (status != 0) return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) a0001b00: e59f201c ldr r2, [pc, #28] ; a0001b24 a0001b04: e1530002 cmp r3, r2 a0001b08: 01a08000 moveq r8, r0 a0001b0c: 0affff8f beq a0001950 return -1; a0001b10: e3e03000 mvn r3, #0 a0001b14: e58d3014 str r3, [sp, #20] a0001b18: eaffffba b a0001a08 =============================================================================== a000d5e4 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { a000d5e4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) a000d5e8: e2525000 subs r5, r2, #0 rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { a000d5ec: e1a04000 mov r4, r0 a000d5f0: e1a06001 mov r6, r1 ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) a000d5f4: 0a000053 beq a000d748 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; a000d5f8: e59f9158 ldr r9, [pc, #344] ; a000d758 a000d5fc: e5997004 ldr r7, [r9, #4] api = executing->API_Extensions[ THREAD_API_RTEMS ]; a000d600: e59780f8 ldr r8, [r7, #248] ; 0xf8 asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; a000d604: e5d7a074 ldrb sl, [r7, #116] ; 0x74 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) a000d608: e597307c ldr r3, [r7, #124] ; 0x7c old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; a000d60c: e5d8b008 ldrb fp, [r8, #8] executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; a000d610: e35a0000 cmp sl, #0 a000d614: 03a0ac01 moveq sl, #256 ; 0x100 a000d618: 13a0a000 movne sl, #0 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) a000d61c: e3530000 cmp r3, #0 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; a000d620: 138aac02 orrne sl, sl, #512 ; 0x200 old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; a000d624: e35b0000 cmp fp, #0 a000d628: 03a0bb01 moveq fp, #1024 ; 0x400 a000d62c: 13a0b000 movne fp, #0 old_mode |= _ISR_Get_level(); a000d630: ebffee68 bl a0008fd8 <_CPU_ISR_Get_level> if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; a000d634: e18bb000 orr fp, fp, r0 old_mode |= _ISR_Get_level(); a000d638: e18ba00a orr sl, fp, sl *previous_mode_set = old_mode; /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) a000d63c: e3160c01 tst r6, #256 ; 0x100 old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; a000d640: e585a000 str sl, [r5] /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) a000d644: 0a000003 beq a000d658 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; a000d648: e3140c01 tst r4, #256 ; 0x100 a000d64c: 13a03000 movne r3, #0 a000d650: 03a03001 moveq r3, #1 a000d654: e5c73074 strb r3, [r7, #116] ; 0x74 if ( mask & RTEMS_TIMESLICE_MASK ) { a000d658: e3160c02 tst r6, #512 ; 0x200 a000d65c: 1a00001c bne a000d6d4 } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) a000d660: e3160080 tst r6, #128 ; 0x80 a000d664: 1a000023 bne a000d6f8 * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { a000d668: e2166b01 ands r6, r6, #1024 ; 0x400 a000d66c: 0a000012 beq a000d6bc is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { a000d670: e5d82008 ldrb r2, [r8, #8] * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( a000d674: e3140b01 tst r4, #1024 ; 0x400 a000d678: 13a03000 movne r3, #0 a000d67c: 03a03001 moveq r3, #1 is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { a000d680: e1520003 cmp r2, r3 /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; a000d684: 03a06000 moveq r6, #0 if ( mask & RTEMS_ASR_MASK ) { is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { a000d688: 0a00000b beq a000d6bc asr->is_enabled = is_asr_enabled; a000d68c: e5c83008 strb r3, [r8, #8] static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a000d690: e10f3000 mrs r3, CPSR a000d694: e3832080 orr r2, r3, #128 ; 0x80 a000d698: e129f002 msr CPSR_fc, r2 { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); _signals = information->signals_pending; a000d69c: e5981018 ldr r1, [r8, #24] information->signals_pending = information->signals_posted; a000d6a0: e5982014 ldr r2, [r8, #20] information->signals_posted = _signals; a000d6a4: e5881014 str r1, [r8, #20] rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); _signals = information->signals_pending; information->signals_pending = information->signals_posted; a000d6a8: e5882018 str r2, [r8, #24] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a000d6ac: e129f003 msr CPSR_fc, r3 _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { a000d6b0: e5986014 ldr r6, [r8, #20] a000d6b4: e3560000 cmp r6, #0 /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; a000d6b8: 13a06001 movne r6, #1 needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { a000d6bc: e59f3098 ldr r3, [pc, #152] ; a000d75c a000d6c0: e5933000 ldr r3, [r3] a000d6c4: e3530003 cmp r3, #3 a000d6c8: 0a00000d beq a000d704 if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; a000d6cc: e3a00000 mov r0, #0 <== NOT EXECUTED a000d6d0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED */ if ( mask & RTEMS_PREEMPT_MASK ) executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; if ( mask & RTEMS_TIMESLICE_MASK ) { if ( _Modes_Is_timeslice(mode_set) ) { a000d6d4: e2143c02 ands r3, r4, #512 ; 0x200 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; a000d6d8: 13a03001 movne r3, #1 a000d6dc: 1587307c strne r3, [r7, #124] ; 0x7c executing->cpu_time_budget = _Thread_Ticks_per_timeslice; a000d6e0: 159f3078 ldrne r3, [pc, #120] ; a000d760 } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; a000d6e4: 0587307c streq r3, [r7, #124] ; 0x7c executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; if ( mask & RTEMS_TIMESLICE_MASK ) { if ( _Modes_Is_timeslice(mode_set) ) { executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice; a000d6e8: 15933000 ldrne r3, [r3] a000d6ec: 15873078 strne r3, [r7, #120] ; 0x78 } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) a000d6f0: e3160080 tst r6, #128 ; 0x80 a000d6f4: 0affffdb beq a000d668 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); a000d6f8: e2040080 and r0, r4, #128 ; 0x80 a000d6fc: ebffee30 bl a0008fc4 <_CPU_ISR_Set_level> a000d700: eaffffd8 b a000d668 { Thread_Control *executing; executing = _Thread_Executing; if ( are_signals_pending || a000d704: e3560000 cmp r6, #0 bool are_signals_pending ) { Thread_Control *executing; executing = _Thread_Executing; a000d708: e5993004 ldr r3, [r9, #4] if ( are_signals_pending || a000d70c: 1a000008 bne a000d734 a000d710: e59f2040 ldr r2, [pc, #64] ; a000d758 a000d714: e5922008 ldr r2, [r2, #8] a000d718: e1530002 cmp r3, r2 a000d71c: 0a00000b beq a000d750 (!_Thread_Is_heir( executing ) && executing->is_preemptible) ) { a000d720: e5d33074 ldrb r3, [r3, #116] ; 0x74 a000d724: e3530000 cmp r3, #0 a000d728: 1a000001 bne a000d734 if ( _System_state_Is_up( _System_state_Get() ) ) { if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; a000d72c: e1a00006 mov r0, r6 <== NOT EXECUTED } a000d730: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED _Thread_Dispatch_necessary = true; a000d734: e3a03001 mov r3, #1 a000d738: e5c93010 strb r3, [r9, #16] } } if ( _System_state_Is_up( _System_state_Get() ) ) { if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); a000d73c: ebffe841 bl a0007848 <_Thread_Dispatch> } return RTEMS_SUCCESSFUL; a000d740: e3a00000 mov r0, #0 a000d744: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; a000d748: e3a00009 mov r0, #9 a000d74c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} if ( _System_state_Is_up( _System_state_Get() ) ) { if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; a000d750: e1a00006 mov r0, r6 a000d754: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== a00032fc : } } rtems_status_code rtems_termios_close (void *arg) { a00032fc: 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( a0003300: e59f51a0 ldr r5, [pc, #416] ; a00034a8 rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; a0003304: e5903000 ldr r3, [r0] rtems_status_code sc; sc = rtems_semaphore_obtain( a0003308: e3a01000 mov r1, #0 } } rtems_status_code rtems_termios_close (void *arg) { a000330c: 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( a0003310: e1a02001 mov r2, r1 a0003314: 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; a0003318: e5934034 ldr r4, [r3, #52] ; 0x34 rtems_status_code sc; sc = rtems_semaphore_obtain( a000331c: eb00087a bl a000550c rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) a0003320: e3500000 cmp r0, #0 a0003324: 1a00005e bne a00034a4 rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { a0003328: e5943008 ldr r3, [r4, #8] a000332c: e2433001 sub r3, r3, #1 a0003330: e3530000 cmp r3, #0 a0003334: e5843008 str r3, [r4, #8] a0003338: 1a00002e bne a00033f8 if (rtems_termios_linesw[tty->t_line].l_close != NULL) { a000333c: e59420cc ldr r2, [r4, #204] ; 0xcc a0003340: e59f3164 ldr r3, [pc, #356] ; a00034ac a0003344: e0833282 add r3, r3, r2, lsl #5 a0003348: e5931004 ldr r1, [r3, #4] a000334c: e3510000 cmp r1, #0 a0003350: 0a00003d beq a000344c /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); a0003354: e1a00004 mov r0, r4 a0003358: e12fff31 blx r1 } drainOutput (tty); rtems_semaphore_release (tty->osem); } if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { a000335c: e59430b4 ldr r3, [r4, #180] ; 0xb4 a0003360: e3530002 cmp r3, #2 a0003364: 0a000044 beq a000347c 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) a0003368: e594309c ldr r3, [r4, #156] ; 0x9c a000336c: e3530000 cmp r3, #0 a0003370: 0a000003 beq a0003384 (*tty->device.lastClose)(tty->major, tty->minor, arg); a0003374: e594000c ldr r0, [r4, #12] a0003378: e5941010 ldr r1, [r4, #16] a000337c: e1a02006 mov r2, r6 a0003380: e12fff33 blx r3 if (tty->forw == NULL) { a0003384: e5943000 ldr r3, [r4] a0003388: e3530000 cmp r3, #0 a000338c: 0a000026 beq a000342c rtems_termios_ttyTail = tty->back; if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; } } else { tty->forw->back = tty->back; a0003390: e5942004 ldr r2, [r4, #4] a0003394: e5832004 str r2, [r3, #4] a0003398: e5942004 ldr r2, [r4, #4] } if (tty->back == NULL) { a000339c: e3520000 cmp r2, #0 a00033a0: 0a00001b beq a0003414 rtems_termios_ttyHead = tty->forw; if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; } } else { tty->back->forw = tty->forw; a00033a4: e5823000 str r3, [r2] } rtems_semaphore_delete (tty->isem); a00033a8: e5940014 ldr r0, [r4, #20] a00033ac: eb00082d bl a0005468 rtems_semaphore_delete (tty->osem); a00033b0: e5940018 ldr r0, [r4, #24] a00033b4: eb00082b bl a0005468 rtems_semaphore_delete (tty->rawOutBuf.Semaphore); a00033b8: e594008c ldr r0, [r4, #140] ; 0x8c a00033bc: eb000829 bl a0005468 if ((tty->device.pollRead == NULL) || a00033c0: e59430a0 ldr r3, [r4, #160] ; 0xa0 a00033c4: e3530000 cmp r3, #0 a00033c8: 0a00000e beq a0003408 a00033cc: e59430b4 ldr r3, [r4, #180] ; 0xb4 a00033d0: e3530002 cmp r3, #2 a00033d4: 0a00000b beq a0003408 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore); free (tty->rawInBuf.theBuf); a00033d8: e5940058 ldr r0, [r4, #88] ; 0x58 a00033dc: ebfffa98 bl a0001e44 free (tty->rawOutBuf.theBuf); a00033e0: e594007c ldr r0, [r4, #124] ; 0x7c a00033e4: ebfffa96 bl a0001e44 free (tty->cbuf); a00033e8: e594001c ldr r0, [r4, #28] a00033ec: ebfffa94 bl a0001e44 free (tty); a00033f0: e1a00004 mov r0, r4 a00033f4: ebfffa92 bl a0001e44 } rtems_semaphore_release (rtems_termios_ttyMutex); a00033f8: e5950000 ldr r0, [r5] a00033fc: eb00088b bl a0005630 return RTEMS_SUCCESSFUL; } a0003400: e3a00000 mov r0, #0 a0003404: 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); a0003408: e5940068 ldr r0, [r4, #104] ; 0x68 a000340c: eb000815 bl a0005468 a0003410: eafffff0 b a00033d8 } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; a0003414: e59f2094 ldr r2, [pc, #148] ; a00034b0 if ( rtems_termios_ttyHead != NULL ) { a0003418: e3530000 cmp r3, #0 } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; a000341c: e5823000 str r3, [r2] if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; a0003420: 13a02000 movne r2, #0 a0003424: 15832004 strne r2, [r3, #4] a0003428: eaffffde b a00033a8 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; a000342c: e5942004 ldr r2, [r4, #4] a0003430: e59f107c ldr r1, [pc, #124] ; a00034b4 if ( rtems_termios_ttyTail != NULL ) { a0003434: 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; a0003438: e5812000 str r2, [r1] if ( rtems_termios_ttyTail != NULL ) { a000343c: 0afffff4 beq a0003414 rtems_termios_ttyTail->forw = NULL; a0003440: e5823000 str r3, [r2] a0003444: e5943000 ldr r3, [r4] a0003448: eaffffd5 b a00033a4 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); a000344c: e5940018 ldr r0, [r4, #24] a0003450: e1a02001 mov r2, r1 a0003454: eb00082c bl a000550c if (sc != RTEMS_SUCCESSFUL) { a0003458: e3500000 cmp r0, #0 a000345c: 1a000010 bne a00034a4 rtems_fatal_error_occurred (sc); } drainOutput (tty); a0003460: e1a00004 mov r0, r4 a0003464: ebfffe54 bl a0002dbc rtems_semaphore_release (tty->osem); a0003468: e5940018 ldr r0, [r4, #24] a000346c: eb00086f bl a0005630 } if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { a0003470: e59430b4 ldr r3, [r4, #180] ; 0xb4 a0003474: e3530002 cmp r3, #2 a0003478: 1affffba bne a0003368 /* * send "terminate" to I/O tasks */ sc = rtems_event_send( tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT ); a000347c: e59400c4 ldr r0, [r4, #196] ; 0xc4 a0003480: e3a01001 mov r1, #1 a0003484: eb0006fd bl a0005080 if (sc != RTEMS_SUCCESSFUL) a0003488: e3500000 cmp r0, #0 a000348c: 1a000004 bne a00034a4 rtems_fatal_error_occurred (sc); sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT ); a0003490: e59400c8 ldr r0, [r4, #200] ; 0xc8 a0003494: e3a01001 mov r1, #1 a0003498: eb0006f8 bl a0005080 if (sc != RTEMS_SUCCESSFUL) a000349c: e3500000 cmp r0, #0 a00034a0: 0affffb0 beq a0003368 rtems_fatal_error_occurred (sc); a00034a4: eb0009c0 bl a0005bac =============================================================================== a0004a58 : rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; a0004a58: e590c090 ldr ip, [r0, #144] ; 0x90 if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { a0004a5c: e59020b4 ldr r2, [r0, #180] ; 0xb4 * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { a0004a60: e52de004 push {lr} ; (str lr, [sp, #-4]!) rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; a0004a64: e08c1001 add r1, ip, r1 if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { a0004a68: e3520002 cmp r2, #2 rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; a0004a6c: e5801090 str r1, [r0, #144] ; 0x90 if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { a0004a70: 0a00000b beq a0004aa4 if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); return 0; /* nothing to output in IRQ... */ } if (tty->t_line == PPPDISC ) { a0004a74: e59030cc ldr r3, [r0, #204] ; 0xcc a0004a78: e3530005 cmp r3, #5 a0004a7c: 0a000001 beq a0004a88 } return 0; /* nothing to output in IRQ... */ } return rtems_termios_refill_transmitter(tty); } a0004a80: 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); a0004a84: eaffff56 b a00047e4 if (tty->t_line == PPPDISC ) { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { a0004a88: e59f3038 ldr r3, [pc, #56] ; a0004ac8 a0004a8c: e59330b4 ldr r3, [r3, #180] ; 0xb4 a0004a90: e3530000 cmp r3, #0 a0004a94: 0a000009 beq a0004ac0 rtems_termios_linesw[tty->t_line].l_start(tty); a0004a98: e12fff33 blx r3 } return 0; /* nothing to output in IRQ... */ a0004a9c: e3a00000 mov r0, #0 a0004aa0: 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); a0004aa4: e59000c8 ldr r0, [r0, #200] ; 0xc8 a0004aa8: e1a01002 mov r1, r2 a0004aac: eb000173 bl a0005080 if (sc != RTEMS_SUCCESSFUL) a0004ab0: e2503000 subs r3, r0, #0 rtems_fatal_error_occurred (sc); return 0; /* nothing to output in IRQ... */ a0004ab4: 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) a0004ab8: 049df004 popeq {pc} ; (ldreq pc, [sp], #4) rtems_fatal_error_occurred (sc); a0004abc: eb00043a bl a0005bac * 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... */ a0004ac0: e1a00003 mov r0, r3 <== NOT EXECUTED } return rtems_termios_refill_transmitter(tty); } a0004ac4: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== a0004478 : * 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) { a0004478: 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) { a000447c: e59030cc ldr r3, [r0, #204] ; 0xcc a0004480: e59f72cc ldr r7, [pc, #716] ; a0004754 * 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) { a0004484: e24dd008 sub sp, sp, #8 a0004488: 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) { a000448c: e0873283 add r3, r7, r3, lsl #5 a0004490: 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) { a0004494: e1a05001 mov r5, r1 a0004498: e1a06002 mov r6, r2 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) { a000449c: e3590000 cmp r9, #0 a00044a0: 0a00001c beq a0004518 while (len--) { a00044a4: e3520000 cmp r2, #0 a00044a8: 0a00000a beq a00044d8 a00044ac: e3a08000 mov r8, #0 a00044b0: ea000002 b a00044c0 a00044b4: e59430cc ldr r3, [r4, #204] ; 0xcc a00044b8: e0873283 add r3, r7, r3, lsl #5 a00044bc: e5939010 ldr r9, [r3, #16] c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); a00044c0: e7d50008 ldrb r0, [r5, r8] a00044c4: e1a01004 mov r1, r4 a00044c8: e2888001 add r8, r8, #1 a00044cc: e12fff39 blx 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--) { a00044d0: e1580006 cmp r8, r6 a00044d4: 1afffff6 bne a00044b4 } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { a00044d8: e594a0e4 ldr sl, [r4, #228] ; 0xe4 a00044dc: e35a0000 cmp sl, #0 (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); tty->tty_rcvwakeup = 1; } return 0; a00044e0: 13a0a000 movne sl, #0 } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { a00044e4: 1a000008 bne a000450c a00044e8: e59430dc ldr r3, [r4, #220] ; 0xdc a00044ec: e3530000 cmp r3, #0 (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); tty->tty_rcvwakeup = 1; } return 0; a00044f0: 01a0a003 moveq sl, r3 } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { a00044f4: 0a000004 beq a000450c (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); a00044f8: e2840030 add r0, r4, #48 ; 0x30 a00044fc: e59410e0 ldr r1, [r4, #224] ; 0xe0 a0004500: e12fff33 blx r3 tty->tty_rcvwakeup = 1; a0004504: e3a03001 mov r3, #1 a0004508: e58430e4 str r3, [r4, #228] ; 0xe4 } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; } a000450c: e1a0000a mov r0, sl a0004510: e28dd008 add sp, sp, #8 a0004514: 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); a0004518: e2803030 add r3, r0, #48 ; 0x30 a000451c: e58d3000 str r3, [sp] tty->tty_rcvwakeup = 1; } return 0; } while (len--) { a0004520: 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, a0004524: e280304a add r3, r0, #74 ; 0x4a a0004528: e58d3004 str r3, [sp, #4] a000452c: e1a0b009 mov fp, r9 tty->tty_rcvwakeup = 1; } return 0; } while (len--) { a0004530: 0a000042 beq a0004640 c = *buf++; /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { a0004534: e59430b8 ldr r3, [r4, #184] ; 0xb8 } return 0; } while (len--) { c = *buf++; a0004538: 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) { a000453c: e3130c02 tst r3, #512 ; 0x200 a0004540: 0a000005 beq a000455c /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { a0004544: e5d4304a ldrb r3, [r4, #74] ; 0x4a a0004548: e1530008 cmp r3, r8 a000454c: 0a000056 beq a00046ac /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { a0004550: e5d43049 ldrb r3, [r4, #73] ; 0x49 a0004554: e1530008 cmp r3, r8 a0004558: 0a00003f beq a000465c /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; flow_rcv = true; } } if (flow_rcv) { a000455c: e3590000 cmp r9, #0 a0004560: 1a000041 bne a000466c } /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; a0004564: e5940060 ldr r0, [r4, #96] ; 0x60 a0004568: e5941064 ldr r1, [r4, #100] ; 0x64 a000456c: e2800001 add r0, r0, #1 a0004570: eb00334e bl a00112b0 <__umodsi3> a0004574: e1a07000 mov r7, r0 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a0004578: e10fa000 mrs sl, CPSR a000457c: e38a3080 orr r3, sl, #128 ; 0x80 a0004580: e129f003 msr CPSR_fc, r3 /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) a0004584: e594305c ldr r3, [r4, #92] ; 0x5c a0004588: e5940064 ldr r0, [r4, #100] ; 0x64 % tty->rawInBuf.Size) > tty->highwater) && a000458c: 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) a0004590: e0630000 rsb r0, r3, r0 % tty->rawInBuf.Size) > tty->highwater) && a0004594: e0800007 add r0, r0, r7 a0004598: eb003344 bl a00112b0 <__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) a000459c: e59430c0 ldr r3, [r4, #192] ; 0xc0 a00045a0: e1500003 cmp r0, r3 a00045a4: 9a00000f bls a00045e8 % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { a00045a8: 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) && a00045ac: e3130001 tst r3, #1 <== NOT EXECUTED a00045b0: 1a00000c bne a00045e8 <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; a00045b4: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) a00045b8: e3a03b01 mov r3, #1024 ; 0x400 <== NOT EXECUTED a00045bc: e2833002 add r3, r3, #2 <== 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; a00045c0: e3822001 orr r2, r2, #1 <== NOT EXECUTED a00045c4: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) a00045c8: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED a00045cc: e0023003 and r3, r2, r3 <== NOT EXECUTED a00045d0: e3530b01 cmp r3, #1024 ; 0x400 <== NOT EXECUTED a00045d4: 0a000046 beq a00046f4 <== 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) ) { a00045d8: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED a00045dc: e2033f41 and r3, r3, #260 ; 0x104 <== NOT EXECUTED a00045e0: e3530c01 cmp r3, #256 ; 0x100 <== NOT EXECUTED a00045e4: 0a000051 beq a0004730 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a00045e8: e129f00a msr CPSR_fc, sl } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { a00045ec: e594305c ldr r3, [r4, #92] ; 0x5c a00045f0: e1530007 cmp r3, r7 dropped++; a00045f4: 028bb001 addeq fp, fp, #1 } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { a00045f8: 0a00000d beq a0004634 dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; a00045fc: e5943058 ldr r3, [r4, #88] ; 0x58 a0004600: 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 )) { a0004604: e59430e4 ldr r3, [r4, #228] ; 0xe4 if (newTail == tty->rawInBuf.Head) { dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; tty->rawInBuf.Tail = newTail; a0004608: 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 )) { a000460c: e3530000 cmp r3, #0 a0004610: 1a000007 bne a0004634 a0004614: e59430dc ldr r3, [r4, #220] ; 0xdc a0004618: e3530000 cmp r3, #0 a000461c: 0a000004 beq a0004634 (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); a0004620: e59d0000 ldr r0, [sp] <== NOT EXECUTED a0004624: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED a0004628: e12fff33 blx r3 <== NOT EXECUTED tty->tty_rcvwakeup = 1; a000462c: e3a03001 mov r3, #1 <== NOT EXECUTED a0004630: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED a0004634: e2466001 sub r6, r6, #1 tty->tty_rcvwakeup = 1; } return 0; } while (len--) { a0004638: e3560000 cmp r6, #0 a000463c: 1affffbc bne a0004534 } } } } tty->rawInBufDropped += dropped; a0004640: e5943078 ldr r3, [r4, #120] ; 0x78 rtems_semaphore_release (tty->rawInBuf.Semaphore); a0004644: e5940068 ldr r0, [r4, #104] ; 0x68 a0004648: e1a0a00b mov sl, fp } } } } tty->rawInBufDropped += dropped; a000464c: e083300b add r3, r3, fp a0004650: e5843078 str r3, [r4, #120] ; 0x78 rtems_semaphore_release (tty->rawInBuf.Semaphore); a0004654: eb0003f5 bl a0005630 return dropped; a0004658: eaffffab b a000450c flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; a000465c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { a0004660: 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; a0004664: e3c33010 bic r3, r3, #16 <== NOT EXECUTED a0004668: 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) { a000466c: e59430b8 ldr r3, [r4, #184] ; 0xb8 a0004670: e2033030 and r3, r3, #48 ; 0x30 a0004674: e3530020 cmp r3, #32 a0004678: 1affffed bne a0004634 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a000467c: e10f7000 mrs r7, CPSR <== NOT EXECUTED a0004680: e3873080 orr r3, r7, #128 ; 0x80 <== NOT EXECUTED a0004684: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; a0004688: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { a000468c: 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; a0004690: e3c33020 bic r3, r3, #32 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { a0004694: 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; a0004698: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { a000469c: 1a00000c bne a00046d4 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a00046a0: 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; a00046a4: e2466001 sub r6, r6, #1 <== NOT EXECUTED a00046a8: eaffffe2 b a0004638 <== 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]) { a00046ac: e5d42049 ldrb r2, [r4, #73] ; 0x49 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--) { a00046b0: e3a09001 mov r9, #1 /* 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]) { a00046b4: e1520003 cmp r2, r3 /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; a00046b8: 059430b8 ldreq r3, [r4, #184] ; 0xb8 } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; a00046bc: 159430b8 ldrne r3, [r4, #184] ; 0xb8 /* 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; a00046c0: 02233010 eoreq r3, r3, #16 } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; a00046c4: 13833010 orrne r3, r3, #16 /* 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; a00046c8: 058430b8 streq r3, [r4, #184] ; 0xb8 } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; a00046cc: 158430b8 strne r3, [r4, #184] ; 0xb8 a00046d0: eaffffe5 b a000466c 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); a00046d4: e5942084 ldr r2, [r4, #132] ; 0x84 <== NOT EXECUTED rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)( a00046d8: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED a00046dc: e59430a4 ldr r3, [r4, #164] ; 0xa4 <== NOT EXECUTED a00046e0: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED a00046e4: e0811002 add r1, r1, r2 <== NOT EXECUTED a00046e8: e3a02001 mov r2, #1 <== NOT EXECUTED a00046ec: e12fff33 blx r3 <== NOT EXECUTED a00046f0: eaffffea b a00046a0 <== 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) || a00046f4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED a00046f8: e3130020 tst r3, #32 <== NOT EXECUTED a00046fc: 1a000002 bne a000470c <== NOT EXECUTED a0004700: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED a0004704: e3530000 cmp r3, #0 <== NOT EXECUTED a0004708: 1affffb6 bne a00045e8 <== 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; a000470c: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED (*tty->device.write)(tty->minor, a0004710: e59430a4 ldr r3, [r4, #164] ; 0xa4 <== NOT EXECUTED a0004714: 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; a0004718: e3822002 orr r2, r2, #2 <== NOT EXECUTED a000471c: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED (*tty->device.write)(tty->minor, a0004720: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED a0004724: e3a02001 mov r2, #1 <== NOT EXECUTED a0004728: e12fff33 blx r3 <== NOT EXECUTED a000472c: eaffffad b a00045e8 <== 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; a0004730: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { a0004734: 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; a0004738: e3822004 orr r2, r2, #4 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { a000473c: 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; a0004740: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { a0004744: 0affffa7 beq a00045e8 <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); a0004748: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED a000474c: e12fff33 blx r3 <== NOT EXECUTED a0004750: eaffffa4 b a00045e8 <== NOT EXECUTED =============================================================================== a00034d0 : rtems_status_code rtems_termios_ioctl (void *arg) { rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; a00034d0: e5902000 ldr r2, [r0] } } rtems_status_code rtems_termios_ioctl (void *arg) { a00034d4: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; a00034d8: e5925034 ldr r5, [r2, #52] ; 0x34 struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; a00034dc: e3a03000 mov r3, #0 } } rtems_status_code rtems_termios_ioctl (void *arg) { a00034e0: 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; a00034e4: e580300c str r3, [r0, #12] sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); a00034e8: e1a01003 mov r1, r3 a00034ec: e1a02003 mov r2, r3 a00034f0: e5950018 ldr r0, [r5, #24] 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; a00034f4: e5947008 ldr r7, [r4, #8] rtems_status_code sc; args->ioctl_return = 0; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); a00034f8: eb000803 bl a000550c if (sc != RTEMS_SUCCESSFUL) { a00034fc: e2506000 subs r6, r0, #0 a0003500: 1a00000e bne a0003540 args->ioctl_return = sc; return sc; } switch (args->command) { a0003504: e5943004 ldr r3, [r4, #4] a0003508: e3530004 cmp r3, #4 a000350c: 0a000006 beq a000352c a0003510: 8a00000d bhi a000354c a0003514: e3530002 cmp r3, #2 a0003518: 0a00001d beq a0003594 a000351c: 9a000082 bls a000372c if (tty->device.setAttributes) (*tty->device.setAttributes)(tty->minor, &tty->termios); break; case RTEMS_IO_TCDRAIN: drainOutput (tty); a0003520: e1a00005 mov r0, r5 a0003524: ebfffe24 bl a0002dbc break; a0003528: ea000002 b a0003538 case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; break; case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; a000352c: e897000c ldm r7, {r2, r3} a0003530: e58520dc str r2, [r5, #220] ; 0xdc a0003534: e58530e0 str r3, [r5, #224] ; 0xe0 *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); a0003538: e5950018 ldr r0, [r5, #24] a000353c: eb00083b bl a0005630 args->ioctl_return = sc; a0003540: e584600c str r6, [r4, #12] return sc; } a0003544: e1a00006 mov r0, r6 a0003548: 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) { a000354c: e59f2328 ldr r2, [pc, #808] ; a000387c a0003550: e1530002 cmp r3, r2 a0003554: 0a000068 beq a00036fc a0003558: 8a00007f bhi a000375c a000355c: e3530005 cmp r3, #5 a0003560: 0a00009c beq a00037d8 default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { a0003564: e59520cc ldr r2, [r5, #204] ; 0xcc a0003568: e59f3310 ldr r3, [pc, #784] ; a0003880 a000356c: e0833282 add r3, r3, r2, lsl #5 a0003570: e5933018 ldr r3, [r3, #24] a0003574: e3530000 cmp r3, #0 sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); } else { sc = RTEMS_INVALID_NUMBER; a0003578: 03a0600a moveq r6, #10 args->ioctl_return = sc; return sc; } switch (args->command) { default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { a000357c: 0affffed beq a0003538 sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); a0003580: e1a00005 mov r0, r5 a0003584: e1a01004 mov r1, r4 a0003588: e12fff33 blx r3 a000358c: e1a06000 mov r6, r0 a0003590: eaffffe8 b a0003538 case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; break; case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; a0003594: e594e008 ldr lr, [r4, #8] a0003598: e2857030 add r7, r5, #48 ; 0x30 a000359c: e1a0c007 mov ip, r7 a00035a0: e8be000f ldm lr!, {r0, r1, r2, r3} a00035a4: e8ac000f stmia ip!, {r0, r1, r2, r3} a00035a8: e8be000f ldm lr!, {r0, r1, r2, r3} a00035ac: 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) && a00035b0: e59580b8 ldr r8, [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; a00035b4: 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) && a00035b8: e3180c02 tst r8, #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; a00035bc: 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) && a00035c0: 0a000012 beq a0003610 !(tty->termios.c_iflag & IXON)) { a00035c4: 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) && a00035c8: e3130b01 tst r3, #1024 ; 0x400 a00035cc: 1a00000f bne a0003610 !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); a00035d0: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED a00035d4: e3c33e21 bic r3, r3, #528 ; 0x210 <== NOT EXECUTED a00035d8: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { a00035dc: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED a00035e0: e3130020 tst r3, #32 <== NOT EXECUTED a00035e4: 0a000009 beq a0003610 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a00035e8: e10f8000 mrs r8, CPSR <== NOT EXECUTED a00035ec: e3883080 orr r3, r8, #128 ; 0x80 <== NOT EXECUTED a00035f0: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; a00035f4: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { a00035f8: 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; a00035fc: e3c33020 bic r3, r3, #32 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { a0003600: 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; a0003604: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { a0003608: 1a000093 bne a000385c <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a000360c: 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)) { a0003610: e59530b8 ldr r3, [r5, #184] ; 0xb8 a0003614: e3130b01 tst r3, #1024 ; 0x400 a0003618: 0a000008 beq a0003640 a000361c: e5953030 ldr r3, [r5, #48] ; 0x30 <== NOT EXECUTED a0003620: e3130a01 tst r3, #4096 ; 0x1000 <== NOT EXECUTED a0003624: 1a000005 bne a0003640 <== NOT EXECUTED /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); a0003628: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED a000362c: e3c33b01 bic r3, r3, #1024 ; 0x400 <== NOT EXECUTED a0003630: 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); a0003634: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED a0003638: e3c33002 bic r3, r3, #2 <== NOT EXECUTED a000363c: 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)) { a0003640: e59530b8 ldr r3, [r5, #184] ; 0xb8 a0003644: e3130c01 tst r3, #256 ; 0x100 a0003648: 05952038 ldreq r2, [r5, #56] ; 0x38 a000364c: 0a000011 beq a0003698 a0003650: e5952038 ldr r2, [r5, #56] ; 0x38 a0003654: e3520000 cmp r2, #0 a0003658: ba000073 blt a000382c /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); a000365c: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED a0003660: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED a0003664: 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)) { a0003668: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED a000366c: e3130004 tst r3, #4 <== NOT EXECUTED a0003670: 0a000005 beq a000368c <== NOT EXECUTED a0003674: e59530b0 ldr r3, [r5, #176] ; 0xb0 <== NOT EXECUTED a0003678: e3530000 cmp r3, #0 <== NOT EXECUTED a000367c: 0a000002 beq a000368c <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); a0003680: e5950010 ldr r0, [r5, #16] <== NOT EXECUTED a0003684: e12fff33 blx r3 <== NOT EXECUTED a0003688: e5952038 ldr r2, [r5, #56] ; 0x38 <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); a000368c: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED a0003690: e3c33004 bic r3, r3, #4 <== NOT EXECUTED a0003694: 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) { a0003698: e3520000 cmp r2, #0 a000369c: ba000062 blt a000382c tty->flow_ctrl |= FL_MDRTS; } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { a00036a0: 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) { a00036a4: 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) { a00036a8: e3130a01 tst r3, #4096 ; 0x1000 tty->flow_ctrl |= FL_MDXOF; a00036ac: 159520b8 ldrne r2, [r5, #184] ; 0xb8 a00036b0: 13822b01 orrne r2, r2, #1024 ; 0x400 a00036b4: 158520b8 strne r2, [r5, #184] ; 0xb8 } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { a00036b8: e3130b01 tst r3, #1024 ; 0x400 tty->flow_ctrl |= FL_MDXON; a00036bc: 159530b8 ldrne r3, [r5, #184] ; 0xb8 a00036c0: 13833c02 orrne r3, r3, #512 ; 0x200 a00036c4: 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) { a00036c8: e2188002 ands r8, r8, #2 a00036cc: 0a000045 beq a00037e8 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; a00036d0: e3a03000 mov r3, #0 a00036d4: e585306c str r3, [r5, #108] ; 0x6c tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; a00036d8: e5853070 str r3, [r5, #112] ; 0x70 tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; a00036dc: e5853074 str r3, [r5, #116] ; 0x74 } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) a00036e0: e59530a8 ldr r3, [r5, #168] ; 0xa8 a00036e4: e3530000 cmp r3, #0 a00036e8: 0affff92 beq a0003538 (*tty->device.setAttributes)(tty->minor, &tty->termios); a00036ec: e5950010 ldr r0, [r5, #16] a00036f0: e1a01007 mov r1, r7 a00036f4: e12fff33 blx r3 a00036f8: eaffff8e b a0003538 case TIOCGETD: *(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; a00036fc: e5952060 ldr r2, [r5, #96] ; 0x60 <== NOT EXECUTED a0003700: 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; a0003704: e5950020 ldr r0, [r5, #32] <== NOT EXECUTED a0003708: e5941008 ldr r1, [r4, #8] <== NOT EXECUTED *(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; if ( rawnc < 0 ) a000370c: e0523003 subs r3, r2, r3 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; a0003710: 45952064 ldrmi r2, [r5, #100] ; 0x64 <== NOT EXECUTED a0003714: 40833002 addmi r3, r3, r2 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; a0003718: e5952024 ldr r2, [r5, #36] ; 0x24 <== NOT EXECUTED a000371c: e0622000 rsb r2, r2, r0 <== NOT EXECUTED a0003720: e0823003 add r3, r2, r3 <== NOT EXECUTED a0003724: e5813000 str r3, [r1] <== NOT EXECUTED } break; a0003728: eaffff82 b a0003538 <== 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) { a000372c: e3530001 cmp r3, #1 a0003730: 1affff8b bne a0003564 sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; a0003734: e5947008 ldr r7, [r4, #8] a0003738: e285c030 add ip, r5, #48 ; 0x30 a000373c: e8bc000f ldm ip!, {r0, r1, r2, r3} a0003740: e1a0e007 mov lr, r7 a0003744: e8ae000f stmia lr!, {r0, r1, r2, r3} a0003748: e8bc000f ldm ip!, {r0, r1, r2, r3} a000374c: e8ae000f stmia lr!, {r0, r1, r2, r3} a0003750: e59c3000 ldr r3, [ip] a0003754: e58e3000 str r3, [lr] break; a0003758: eaffff76 b a0003538 sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { a000375c: e59f2120 ldr r2, [pc, #288] ; a0003884 a0003760: e1530002 cmp r3, r2 a0003764: 0a000017 beq a00037c8 a0003768: e2822105 add r2, r2, #1073741825 ; 0x40000001 a000376c: e1530002 cmp r3, r2 a0003770: 1affff7b bne a0003564 #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { a0003774: e59f7104 ldr r7, [pc, #260] ; a0003880 a0003778: e59530cc ldr r3, [r5, #204] ; 0xcc a000377c: e0873283 add r3, r7, r3, lsl #5 a0003780: e5933004 ldr r3, [r3, #4] a0003784: e3530000 cmp r3, #0 a0003788: 0a000002 beq a0003798 sc = rtems_termios_linesw[tty->t_line].l_close(tty); a000378c: e1a00005 mov r0, r5 a0003790: e12fff33 blx r3 a0003794: e1a06000 mov r6, r0 } tty->t_line=*(int*)(args->buffer); a0003798: e5943008 ldr r3, [r4, #8] a000379c: e5932000 ldr r2, [r3] tty->t_sc = NULL; /* ensure that no more valid data */ a00037a0: e3a03000 mov r3, #0 a00037a4: e58530d0 str r3, [r5, #208] ; 0xd0 /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { a00037a8: 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); a00037ac: 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) { a00037b0: e3530000 cmp r3, #0 a00037b4: 0affff5f beq a0003538 sc = rtems_termios_linesw[tty->t_line].l_open(tty); a00037b8: e1a00005 mov r0, r5 a00037bc: e12fff33 blx r3 a00037c0: e1a06000 mov r6, r0 a00037c4: eaffff5b b a0003538 } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; a00037c8: e5943008 ldr r3, [r4, #8] a00037cc: e59520cc ldr r2, [r5, #204] ; 0xcc a00037d0: e5832000 str r2, [r3] break; a00037d4: eaffff57 b a0003538 case RTEMS_IO_TCDRAIN: drainOutput (tty); break; case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; a00037d8: e897000c ldm r7, {r2, r3} a00037dc: e58520d4 str r2, [r5, #212] ; 0xd4 a00037e0: e58530d8 str r3, [r5, #216] ; 0xd8 break; a00037e4: eaffff53 b a0003538 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] * a00037e8: e5d5a046 ldrb sl, [r5, #70] ; 0x46 rtems_clock_get_ticks_per_second() / 10; a00037ec: eb00059e bl a0004e6c a00037f0: e59f3090 ldr r3, [pc, #144] ; a0003888 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] * a00037f4: e000009a mul r0, sl, r0 rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { a00037f8: e5d52046 ldrb r2, [r5, #70] ; 0x46 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; a00037fc: e0831390 umull r1, r3, r0, r3 if (tty->termios.c_cc[VTIME]) { a0003800: e3520000 cmp r2, #0 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; a0003804: e1a031a3 lsr r3, r3, #3 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] * a0003808: e5853054 str r3, [r5, #84] ; 0x54 rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { a000380c: 0a00000a beq a000383c tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) a0003810: e5d52047 ldrb r2, [r5, #71] ; 0x47 } 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; a0003814: e5853070 str r3, [r5, #112] ; 0x70 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; a0003818: e585806c str r8, [r5, #108] ; 0x6c tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; a000381c: e3520000 cmp r2, #0 a0003820: 13a03000 movne r3, #0 a0003824: e5853074 str r3, [r5, #116] ; 0x74 a0003828: eaffffac b a00036e0 /* * 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; a000382c: e59530b8 ldr r3, [r5, #184] ; 0xb8 a0003830: e3833c01 orr r3, r3, #256 ; 0x100 a0003834: e58530b8 str r3, [r5, #184] ; 0xb8 a0003838: eaffff98 b a00036a0 if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { a000383c: e5d53047 ldrb r3, [r5, #71] ; 0x47 a0003840: e3530000 cmp r3, #0 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; a0003844: 03a03001 moveq r3, #1 tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; a0003848: 1585206c strne r2, [r5, #108] ; 0x6c tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; a000384c: 15852070 strne r2, [r5, #112] ; 0x70 tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; a0003850: 15852074 strne r2, [r5, #116] ; 0x74 } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; a0003854: 0585306c streq r3, [r5, #108] ; 0x6c a0003858: eaffffa0 b a00036e0 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); a000385c: e5952084 ldr r2, [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)( a0003860: e595107c ldr r1, [r5, #124] ; 0x7c <== NOT EXECUTED a0003864: e59530a4 ldr r3, [r5, #164] ; 0xa4 <== NOT EXECUTED a0003868: e5950010 ldr r0, [r5, #16] <== NOT EXECUTED a000386c: e0811002 add r1, r1, r2 <== NOT EXECUTED a0003870: e3a02001 mov r2, #1 <== NOT EXECUTED a0003874: e12fff33 blx r3 <== NOT EXECUTED a0003878: eaffff63 b a000360c <== NOT EXECUTED =============================================================================== a0002e38 : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { a0002e38: 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( a0002e3c: e59f74a0 ldr r7, [pc, #1184] ; a00032e4 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { a0002e40: e1a06001 mov r6, r1 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain( a0002e44: e3a01000 mov r1, #0 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { a0002e48: e24dd01c sub sp, sp, #28 a0002e4c: e1a05000 mov r5, r0 a0002e50: e1a08002 mov r8, r2 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain( a0002e54: e5970000 ldr r0, [r7] a0002e58: e1a02001 mov r2, r1 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { a0002e5c: e58d3014 str r3, [sp, #20] struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain( a0002e60: eb0009a9 bl a000550c rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) a0002e64: e250a000 subs sl, r0, #0 a0002e68: 1a000021 bne a0002ef4 return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { a0002e6c: e59fb474 ldr fp, [pc, #1140] ; a00032e8 a0002e70: e59b9000 ldr r9, [fp] a0002e74: e3590000 cmp r9, #0 a0002e78: 0a00002d beq a0002f34 a0002e7c: e1a04009 mov r4, r9 a0002e80: ea000002 b a0002e90 a0002e84: e5944000 ldr r4, [r4] a0002e88: e3540000 cmp r4, #0 a0002e8c: 0a000028 beq a0002f34 if ((tty->major == major) && (tty->minor == minor)) a0002e90: e594300c ldr r3, [r4, #12] a0002e94: e1530005 cmp r3, r5 a0002e98: 1afffff9 bne a0002e84 a0002e9c: e5943010 ldr r3, [r4, #16] a0002ea0: e1530006 cmp r3, r6 a0002ea4: 1afffff6 bne a0002e84 if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; if (!tty->refcount++) { a0002ea8: e5943008 ldr r3, [r4, #8] */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; a0002eac: e5981000 ldr r1, [r8] if (!tty->refcount++) { a0002eb0: e2832001 add r2, r3, #1 a0002eb4: e3530000 cmp r3, #0 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; a0002eb8: e5814034 str r4, [r1, #52] ; 0x34 if (!tty->refcount++) { a0002ebc: e5842008 str r2, [r4, #8] a0002ec0: 1a000009 bne a0002eec if (tty->device.firstOpen) a0002ec4: e5943098 ldr r3, [r4, #152] ; 0x98 a0002ec8: e3530000 cmp r3, #0 a0002ecc: 0a000003 beq a0002ee0 (*tty->device.firstOpen)(major, minor, arg); a0002ed0: e1a00005 mov r0, r5 a0002ed4: e1a01006 mov r1, r6 a0002ed8: e1a02008 mov r2, r8 a0002edc: e12fff33 blx r3 /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { a0002ee0: e59430b4 ldr r3, [r4, #180] ; 0xb4 a0002ee4: e3530002 cmp r3, #2 a0002ee8: 0a000004 beq a0002f00 tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); a0002eec: e5970000 ldr r0, [r7] a0002ef0: eb0009ce bl a0005630 return RTEMS_SUCCESSFUL; } a0002ef4: e1a0000a mov r0, sl a0002ef8: e28dd01c add sp, sp, #28 a0002efc: 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( a0002f00: e59400c4 ldr r0, [r4, #196] ; 0xc4 a0002f04: e59f13e0 ldr r1, [pc, #992] ; a00032ec a0002f08: e1a02004 mov r2, r4 a0002f0c: eb000a9b bl a0005980 tty->rxTaskId, rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) a0002f10: e3500000 cmp r0, #0 a0002f14: 1a0000d6 bne a0003274 rtems_fatal_error_occurred (sc); sc = rtems_task_start( a0002f18: e59400c8 ldr r0, [r4, #200] ; 0xc8 a0002f1c: e59f13cc ldr r1, [pc, #972] ; a00032f0 a0002f20: e1a02004 mov r2, r4 a0002f24: eb000a95 bl a0005980 tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) a0002f28: e3500000 cmp r0, #0 a0002f2c: 0affffee beq a0002eec a0002f30: ea0000cf b a0003274 <== NOT EXECUTED static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); a0002f34: e3a00001 mov r0, #1 a0002f38: e3a010e8 mov r1, #232 ; 0xe8 a0002f3c: ebfffb52 bl a0001c8c if (tty == NULL) { a0002f40: e3500000 cmp r0, #0 static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); a0002f44: e58d0018 str r0, [sp, #24] a0002f48: e1a04000 mov r4, r0 if (tty == NULL) { a0002f4c: 0a0000b3 beq a0003220 return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; a0002f50: e59f039c ldr r0, [pc, #924] ; a00032f4 a0002f54: e59d1018 ldr r1, [sp, #24] a0002f58: e5903000 ldr r3, [r0] a0002f5c: e5813064 str r3, [r1, #100] ; 0x64 tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); a0002f60: e5910064 ldr r0, [r1, #100] ; 0x64 a0002f64: ebfffc9d bl a00021e0 a0002f68: e59d2018 ldr r2, [sp, #24] if (tty->rawInBuf.theBuf == NULL) { a0002f6c: e3500000 cmp r0, #0 } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); a0002f70: e1a03000 mov r3, r0 a0002f74: e5820058 str r0, [r2, #88] ; 0x58 if (tty->rawInBuf.theBuf == NULL) { a0002f78: 0a0000ac beq a0003230 return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; a0002f7c: e59fc370 ldr ip, [pc, #880] ; a00032f4 a0002f80: e59de018 ldr lr, [sp, #24] a0002f84: e59c2004 ldr r2, [ip, #4] a0002f88: e58e2088 str r2, [lr, #136] ; 0x88 tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); a0002f8c: e59e0088 ldr r0, [lr, #136] ; 0x88 a0002f90: e58d300c str r3, [sp, #12] a0002f94: ebfffc91 bl a00021e0 a0002f98: e1a02000 mov r2, r0 if (tty->rawOutBuf.theBuf == NULL) { a0002f9c: e3500000 cmp r0, #0 } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); a0002fa0: e59d0018 ldr r0, [sp, #24] if (tty->rawOutBuf.theBuf == NULL) { a0002fa4: e59d300c ldr r3, [sp, #12] } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); a0002fa8: e580207c str r2, [r0, #124] ; 0x7c if (tty->rawOutBuf.theBuf == NULL) { a0002fac: 0a000097 beq a0003210 return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); a0002fb0: e59f133c ldr r1, [pc, #828] ; a00032f4 a0002fb4: e5910008 ldr r0, [r1, #8] a0002fb8: e58d2010 str r2, [sp, #16] a0002fbc: e58d300c str r3, [sp, #12] a0002fc0: ebfffc86 bl a00021e0 a0002fc4: e59dc018 ldr ip, [sp, #24] if (tty->cbuf == NULL) { a0002fc8: e3500000 cmp r0, #0 a0002fcc: e59d2010 ldr r2, [sp, #16] return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); a0002fd0: e58c001c str r0, [ip, #28] if (tty->cbuf == NULL) { a0002fd4: 0a00008a beq a0003204 return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; a0002fd8: e59de018 ldr lr, [sp, #24] a0002fdc: e3a03000 mov r3, #0 /* * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) a0002fe0: e1590003 cmp r9, r3 /* * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; a0002fe4: e58e3004 str r3, [lr, #4] return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; a0002fe8: e58e30d4 str r3, [lr, #212] ; 0xd4 tty->tty_snd.sw_arg = NULL; a0002fec: e58e30d8 str r3, [lr, #216] ; 0xd8 tty->tty_rcv.sw_pfn = NULL; a0002ff0: e58e30dc str r3, [lr, #220] ; 0xdc tty->tty_rcv.sw_arg = NULL; a0002ff4: e58e30e0 str r3, [lr, #224] ; 0xe0 tty->tty_rcvwakeup = 0; a0002ff8: e58e30e4 str r3, [lr, #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) a0002ffc: e59f32f4 ldr r3, [pc, #756] ; a00032f8 */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; a0003000: e59d0018 ldr r0, [sp, #24] /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( rtems_build_name ('T', 'R', 'i', c), a0003004: e59f12e8 ldr r1, [pc, #744] ; a00032f4 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) a0003008: e5932000 ldr r2, [r3] * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; a000300c: 1589e004 strne lr, [r9, #4] rtems_termios_ttyHead = tty; a0003010: e58b0000 str r0, [fp] if (rtems_termios_ttyTail == NULL) a0003014: e3520000 cmp r2, #0 rtems_termios_ttyTail = tty; a0003018: 05830000 streq r0, [r3] /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( rtems_build_name ('T', 'R', 'i', c), a000301c: e5d1000c ldrb r0, [r1, #12] tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; a0003020: e58e9000 str r9, [lr] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( a0003024: e59d2018 ldr r2, [sp, #24] rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; tty->minor = minor; a0003028: e59d9018 ldr r9, [sp, #24] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( a000302c: e3800315 orr r0, r0, #1409286144 ; 0x54000000 a0003030: e3800852 orr r0, r0, #5373952 ; 0x520000 a0003034: e282c014 add ip, r2, #20 rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; tty->minor = minor; a0003038: e5896010 str r6, [r9, #16] tty->major = major; a000303c: e589500c str r5, [r9, #12] /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( a0003040: e3a03000 mov r3, #0 a0003044: e3a01001 mov r1, #1 a0003048: e3800c69 orr r0, r0, #26880 ; 0x6900 a000304c: e3a02054 mov r2, #84 ; 0x54 a0003050: e58dc000 str ip, [sp] a0003054: eb000892 bl a00052a4 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) a0003058: e2503000 subs r3, r0, #0 /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( rtems_build_name ('T', 'R', 'i', c), a000305c: e59f9290 ldr r9, [pc, #656] ; a00032f4 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->isem); if (sc != RTEMS_SUCCESSFUL) a0003060: 1a000083 bne a0003274 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( rtems_build_name ('T', 'R', 'o', c), a0003064: e5d9000c ldrb r0, [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 ( a0003068: e59de018 ldr lr, [sp, #24] a000306c: e3a01001 mov r1, #1 a0003070: e3800315 orr r0, r0, #1409286144 ; 0x54000000 a0003074: e3800852 orr r0, r0, #5373952 ; 0x520000 a0003078: e28ec018 add ip, lr, #24 a000307c: e3800c6f orr r0, r0, #28416 ; 0x6f00 a0003080: e3a02054 mov r2, #84 ; 0x54 a0003084: e58dc000 str ip, [sp] a0003088: eb000885 bl a00052a4 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) a000308c: e2501000 subs r1, r0, #0 a0003090: 1a000077 bne a0003274 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( rtems_build_name ('T', 'R', 'x', c), a0003094: e5d9000c ldrb r0, [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 ( a0003098: e59d2018 ldr r2, [sp, #24] a000309c: e1a03001 mov r3, r1 a00030a0: e3800315 orr r0, r0, #1409286144 ; 0x54000000 a00030a4: e3800852 orr r0, r0, #5373952 ; 0x520000 a00030a8: e282c08c add ip, r2, #140 ; 0x8c a00030ac: e3800b1e orr r0, r0, #30720 ; 0x7800 a00030b0: e3a02020 mov r2, #32 a00030b4: e58dc000 str ip, [sp] a00030b8: eb000879 bl a00052a4 rtems_build_name ('T', 'R', 'x', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) a00030bc: e250b000 subs fp, r0, #0 a00030c0: 1a00006b bne a0003274 tty->rawOutBufState = rob_idle; /* * Set callbacks */ tty->device = *callbacks; a00030c4: e59d3018 ldr r3, [sp, #24] a00030c8: e59dc014 ldr ip, [sp, #20] a00030cc: e283e098 add lr, r3, #152 ; 0x98 a00030d0: e8bc000f ldm ip!, {r0, r1, r2, r3} a00030d4: e8ae000f stmia lr!, {r0, r1, r2, r3} a00030d8: e89c000f ldm ip, {r0, r1, r2, r3} a00030dc: e88e000f stm lr, {r0, r1, r2, r3} /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { a00030e0: e59dc018 ldr ip, [sp, #24] a00030e4: e59c30b4 ldr r3, [ip, #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; a00030e8: e58cb094 str fp, [ip, #148] ; 0x94 tty->device = *callbacks; /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { a00030ec: e3530002 cmp r3, #2 a00030f0: 0a000060 beq a0003278 &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || a00030f4: e59d2018 ldr r2, [sp, #24] a00030f8: e59230a0 ldr r3, [r2, #160] ; 0xa0 a00030fc: e3530000 cmp r3, #0 a0003100: 0a00004d beq a000323c a0003104: e59230b4 ldr r3, [r2, #180] ; 0xb4 a0003108: e3530002 cmp r3, #2 a000310c: 0a00004a beq a000323c 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; a0003110: e59dc018 ldr ip, [sp, #24] 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'; a0003114: e3a03000 mov r3, #0 tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') a0003118: e59f01d4 ldr r0, [pc, #468] ; a00032f4 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; a000311c: e58c30b8 str r3, [ip, #184] ; 0xb8 /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; a0003120: e59c9064 ldr r9, [ip, #100] ; 0x64 tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') a0003124: e5d0e00c ldrb lr, [r0, #12] * 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 = a0003128: e3a02c82 mov r2, #33280 ; 0x8200 /* 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; a000312c: e1a090a9 lsr r9, r9, #1 tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') a0003130: e35e007a cmp lr, #122 ; 0x7a /* 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; a0003134: e58d9008 str r9, [sp, #8] tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') a0003138: e28e9001 add r9, lr, #1 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; a000313c: e59de018 ldr lr, [sp, #24] tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = a0003140: e282203b add r2, r2, #59 ; 0x3b 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; a0003144: e59cb064 ldr fp, [ip, #100] ; 0x64 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'; a0003148: e5ce304c strb r3, [lr, #76] ; 0x4c tty->termios.c_cc[VEOL2] = '\000'; a000314c: e5ce3051 strb r3, [lr, #81] ; 0x51 tty->termios.c_cc[VSTART] = '\021'; a0003150: e3a03011 mov r3, #17 a0003154: e5ce3049 strb r3, [lr, #73] ; 0x49 tty->termios.c_cc[VSTOP] = '\023'; a0003158: e3a03013 mov r3, #19 a000315c: e5ce304a strb r3, [lr, #74] ; 0x4a * 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 = a0003160: e58e203c str r2, [lr, #60] ; 0x3c 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'; a0003164: e3a0301a mov r3, #26 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'; a0003168: e3a02003 mov r2, #3 a000316c: e5ce2041 strb r2, [lr, #65] ; 0x41 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'; a0003170: e5ce304b strb r3, [lr, #75] ; 0x4b 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'; a0003174: e3a0201c mov r2, #28 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'; a0003178: e3a03012 mov r3, #18 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'; a000317c: e5ce2042 strb r2, [lr, #66] ; 0x42 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'; a0003180: e5ce304d strb r3, [lr, #77] ; 0x4d 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'; a0003184: e3a0207f mov r2, #127 ; 0x7f 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'; a0003188: e3a0300f mov r3, #15 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'; a000318c: e5ce2043 strb r2, [lr, #67] ; 0x43 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'; a0003190: e5ce304e strb r3, [lr, #78] ; 0x4e 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'; a0003194: e3a02015 mov r2, #21 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'; a0003198: e3a03017 mov r3, #23 /* * 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; a000319c: e3a01e8b mov r1, #2224 ; 0x8b0 a00031a0: e281100d add r1, r1, #13 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'; a00031a4: e5ce2044 strb r2, [lr, #68] ; 0x44 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'; a00031a8: e5ce304f strb r3, [lr, #79] ; 0x4f 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'; a00031ac: e3a02004 mov r2, #4 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'; a00031b0: e3a03016 mov r3, #22 /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; a00031b4: e3a00b06 mov r0, #6144 ; 0x1800 a00031b8: e2800005 add r0, r0, #5 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'; a00031bc: e5ce2045 strb r2, [lr, #69] ; 0x45 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'; a00031c0: e5ce3050 strb r3, [lr, #80] ; 0x50 /* * 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; a00031c4: e58e1038 str r1, [lr, #56] ; 0x38 tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') a00031c8: e59f1124 ldr r1, [pc, #292] ; a00032f4 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; a00031cc: e08bb08b add fp, fp, fp, lsl #1 /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; a00031d0: e58e0034 str r0, [lr, #52] ; 0x34 /* 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; a00031d4: e59d0008 ldr r0, [sp, #8] } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; a00031d8: e3a0cc25 mov ip, #9472 ; 0x2500 a00031dc: e28cc002 add ip, ip, #2 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; a00031e0: e1a0b12b lsr fp, fp, #2 /* * Bump name characer */ if (c++ == 'z') c = 'a'; a00031e4: 0282205d addeq r2, r2, #93 ; 0x5d a00031e8: 01a03001 moveq r3, r1 tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') a00031ec: e5c1900c strb r9, [r1, #12] } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; a00031f0: e58ec030 str ip, [lr, #48] ; 0x30 /* 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; a00031f4: e58e00bc str r0, [lr, #188] ; 0xbc tty->highwater = tty->rawInBuf.Size * 3/4; a00031f8: e58eb0c0 str fp, [lr, #192] ; 0xc0 /* * Bump name characer */ if (c++ == 'z') c = 'a'; a00031fc: 05c3200c strbeq r2, [r3, #12] a0003200: eaffff28 b a0002ea8 /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf)); a0003204: e1a00002 mov r0, r2 <== NOT EXECUTED a0003208: ebfffb0d bl a0001e44 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); a000320c: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED a0003210: e1a00003 mov r0, r3 a0003214: ebfffb0a bl a0001e44 free(tty); a0003218: e59d0018 ldr r0, [sp, #24] a000321c: ebfffb08 bl a0001e44 rtems_semaphore_release (rtems_termios_ttyMutex); a0003220: e5970000 ldr r0, [r7] a0003224: eb000901 bl a0005630 return RTEMS_NO_MEMORY; a0003228: e3a0a01a mov sl, #26 a000322c: eaffff30 b a0002ef4 * 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); a0003230: e1a00002 mov r0, r2 a0003234: ebfffb02 bl a0001e44 a0003238: eafffff8 b a0003220 } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( rtems_build_name ('T', 'R', 'r', c), a000323c: e59f30b0 ldr r3, [pc, #176] ; a00032f4 rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( a0003240: e59d9018 ldr r9, [sp, #24] a0003244: e3a01000 mov r1, #0 rtems_build_name ('T', 'R', 'r', c), a0003248: e5d3000c ldrb r0, [r3, #12] rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( a000324c: e289c068 add ip, r9, #104 ; 0x68 a0003250: e3a02024 mov r2, #36 ; 0x24 a0003254: e3800315 orr r0, r0, #1409286144 ; 0x54000000 a0003258: e3800852 orr r0, r0, #5373952 ; 0x520000 a000325c: e3800c72 orr r0, r0, #29184 ; 0x7200 a0003260: e1a03001 mov r3, r1 a0003264: e58dc000 str ip, [sp] a0003268: eb00080d bl a00052a4 rtems_build_name ('T', 'R', 'r', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->rawInBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) a000326c: e3500000 cmp r0, #0 a0003270: 0affffa6 beq a0003110 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); a0003274: eb000a4c bl a0005bac /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_create ( rtems_build_name ('T', 'x', 'T', c), a0003278: e5d9000c ldrb r0, [r9, #12] /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_create ( a000327c: e28cc0c8 add ip, ip, #200 ; 0xc8 a0003280: e3a0100a mov r1, #10 a0003284: e3800315 orr r0, r0, #1409286144 ; 0x54000000 a0003288: e380071e orr r0, r0, #7864320 ; 0x780000 a000328c: e3800b15 orr r0, r0, #21504 ; 0x5400 a0003290: e3a02b01 mov r2, #1024 ; 0x400 a0003294: e3a03c05 mov r3, #1280 ; 0x500 a0003298: e88d1800 stm sp, {fp, ip} a000329c: eb00090d bl a00056d8 TERMIOS_TXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->txTaskId); if (sc != RTEMS_SUCCESSFUL) a00032a0: e250e000 subs lr, r0, #0 a00032a4: 1afffff2 bne a0003274 rtems_fatal_error_occurred (sc); sc = rtems_task_create ( rtems_build_name ('R', 'x', 'T', c), a00032a8: e5d9000c ldrb r0, [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 ( a00032ac: e59d1018 ldr r1, [sp, #24] a00032b0: e3a02b01 mov r2, #1024 ; 0x400 a00032b4: e3800452 orr r0, r0, #1375731712 ; 0x52000000 a00032b8: e380071e orr r0, r0, #7864320 ; 0x780000 a00032bc: e281c0c4 add ip, r1, #196 ; 0xc4 a00032c0: e3800b15 orr r0, r0, #21504 ; 0x5400 a00032c4: e3a01009 mov r1, #9 a00032c8: e3a03c05 mov r3, #1280 ; 0x500 a00032cc: e58de000 str lr, [sp] a00032d0: e58dc004 str ip, [sp, #4] a00032d4: eb0008ff bl a00056d8 TERMIOS_RXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) a00032d8: e3500000 cmp r0, #0 a00032dc: 0affff84 beq a00030f4 a00032e0: eaffffe3 b a0003274 <== NOT EXECUTED =============================================================================== a000388c : const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { a000388c: 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) { a0003890: 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) { a0003894: e3530000 cmp r3, #0 * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { a0003898: e1a04002 mov r4, r2 a000389c: e1a09000 mov r9, r0 a00038a0: 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) { a00038a4: 0a000037 beq a0003988 (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { a00038a8: e3510000 cmp r1, #0 if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; a00038ac: e5928080 ldr r8, [r2, #128] ; 0x80 while (len) { a00038b0: 0a00002b beq a0003964 * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) { tty->rawOutBufState = rob_wait; a00038b4: 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; a00038b8: e3a0b001 mov fp, #1 * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; a00038bc: e5941088 ldr r1, [r4, #136] ; 0x88 a00038c0: e2880001 add r0, r8, #1 a00038c4: eb003679 bl a00112b0 <__umodsi3> a00038c8: e1a08000 mov r8, r0 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a00038cc: e10f5000 mrs r5, CPSR a00038d0: e3853080 orr r3, r5, #128 ; 0x80 a00038d4: e129f003 msr CPSR_fc, r3 rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) { a00038d8: e5946084 ldr r6, [r4, #132] ; 0x84 a00038dc: e1560000 cmp r6, r0 a00038e0: 1a00000d bne a000391c tty->rawOutBufState = rob_wait; a00038e4: e5847094 str r7, [r4, #148] ; 0x94 static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a00038e8: e129f005 msr CPSR_fc, r5 rtems_interrupt_enable (level); sc = rtems_semaphore_obtain( a00038ec: e3a01000 mov r1, #0 a00038f0: e594008c ldr r0, [r4, #140] ; 0x8c a00038f4: e1a02001 mov r2, r1 a00038f8: eb000703 bl a000550c tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) a00038fc: e3500000 cmp r0, #0 a0003900: 1a000026 bne a00039a0 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a0003904: e10f5000 mrs r5, CPSR a0003908: e3853080 orr r3, r5, #128 ; 0x80 a000390c: 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) { a0003910: e5943084 ldr r3, [r4, #132] ; 0x84 a0003914: e1530006 cmp r3, r6 a0003918: 0afffff1 beq a00038e4 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++; a000391c: e5943080 ldr r3, [r4, #128] ; 0x80 a0003920: e4d91001 ldrb r1, [r9], #1 a0003924: e594207c ldr r2, [r4, #124] ; 0x7c a0003928: e7c21003 strb r1, [r2, r3] tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { a000392c: 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; a0003930: e5848080 str r8, [r4, #128] ; 0x80 if (tty->rawOutBufState == rob_idle) { a0003934: e3530000 cmp r3, #0 a0003938: 1a000006 bne a0003958 /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { a000393c: e59430b8 ldr r3, [r4, #184] ; 0xb8 a0003940: e3130010 tst r3, #16 a0003944: 0a000007 beq a0003968 (*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; a0003948: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED a000394c: e3833020 orr r3, r3, #32 <== NOT EXECUTED a0003950: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED } tty->rawOutBufState = rob_busy; a0003954: e584b094 str fp, [r4, #148] ; 0x94 static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a0003958: 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) { a000395c: e25aa001 subs sl, sl, #1 a0003960: 1affffd5 bne a00038bc a0003964: 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); a0003968: e5942084 ldr r2, [r4, #132] ; 0x84 tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { (*tty->device.write)(tty->minor, a000396c: e594107c ldr r1, [r4, #124] ; 0x7c a0003970: e59430a4 ldr r3, [r4, #164] ; 0xa4 a0003974: e5940010 ldr r0, [r4, #16] a0003978: e0811002 add r1, r1, r2 a000397c: e3a02001 mov r2, #1 a0003980: e12fff33 blx r3 a0003984: eafffff2 b a0003954 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); a0003988: e59230a4 ldr r3, [r2, #164] ; 0xa4 a000398c: e5920010 ldr r0, [r2, #16] a0003990: e1a01009 mov r1, r9 a0003994: e1a0200a mov r2, sl a0003998: e12fff33 blx r3 return; a000399c: 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); a00039a0: eb000881 bl a0005bac <== NOT EXECUTED =============================================================================== a00040bc : rtems_status_code rtems_termios_read (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; a00040bc: e5903000 ldr r3, [r0] return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { a00040c0: 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; a00040c4: e5934034 ldr r4, [r3, #52] ; 0x34 uint32_t count = args->count; char *buffer = args->buffer; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); a00040c8: e3a01000 mov r1, #0 return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { a00040cc: e24dd008 sub sp, sp, #8 rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; uint32_t count = args->count; a00040d0: e5908010 ldr r8, [r0, #16] char *buffer = args->buffer; a00040d4: e590a00c ldr sl, [r0, #12] return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { a00040d8: e1a09000 mov r9, r0 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); a00040dc: e1a02001 mov r2, r1 a00040e0: e5940014 ldr r0, [r4, #20] a00040e4: eb000508 bl a000550c if (sc != RTEMS_SUCCESSFUL) a00040e8: e3500000 cmp r0, #0 a00040ec: e58d0000 str r0, [sp] a00040f0: 1a00000d bne a000412c return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { a00040f4: e59420cc ldr r2, [r4, #204] ; 0xcc a00040f8: e59f3364 ldr r3, [pc, #868] ; a0004464 a00040fc: e0833282 add r3, r3, r2, lsl #5 a0004100: e5933008 ldr r3, [r3, #8] a0004104: e3530000 cmp r3, #0 a0004108: 0a00000a beq a0004138 sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); a000410c: e1a00004 mov r0, r4 a0004110: e1a01009 mov r1, r9 a0004114: e12fff33 blx r3 tty->tty_rcvwakeup = 0; a0004118: 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); a000411c: e58d0000 str r0, [sp] tty->tty_rcvwakeup = 0; a0004120: e58430e4 str r3, [r4, #228] ; 0xe4 rtems_semaphore_release (tty->isem); a0004124: e5940014 ldr r0, [r4, #20] a0004128: eb000540 bl a0005630 } args->bytes_moved = args->count - count; tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } a000412c: e59d0000 ldr r0, [sp] a0004130: e28dd008 add sp, sp, #8 a0004134: 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) { a0004138: e5942024 ldr r2, [r4, #36] ; 0x24 a000413c: e5943020 ldr r3, [r4, #32] a0004140: e1520003 cmp r2, r3 a0004144: 0a000018 beq a00041ac sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { a0004148: e3580000 cmp r8, #0 a000414c: 0a00000e beq a000418c a0004150: e5943024 ldr r3, [r4, #36] ; 0x24 a0004154: e5942020 ldr r2, [r4, #32] a0004158: e1530002 cmp r3, r2 a000415c: ba000003 blt a0004170 a0004160: ea000009 b a000418c <== NOT EXECUTED a0004164: e5942020 ldr r2, [r4, #32] a0004168: e1520003 cmp r2, r3 a000416c: da000006 ble a000418c *buffer++ = tty->cbuf[tty->cindex++]; a0004170: e594201c ldr r2, [r4, #28] sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { a0004174: e2588001 subs r8, r8, #1 *buffer++ = tty->cbuf[tty->cindex++]; a0004178: e7d22003 ldrb r2, [r2, r3] a000417c: e2833001 add r3, r3, #1 a0004180: e4ca2001 strb r2, [sl], #1 a0004184: e5843024 str r3, [r4, #36] ; 0x24 sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { a0004188: 1afffff5 bne a0004164 *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; a000418c: e5993010 ldr r3, [r9, #16] tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); a0004190: e5940014 ldr r0, [r4, #20] } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; a0004194: e0688003 rsb r8, r8, r3 tty->tty_rcvwakeup = 0; a0004198: e3a03000 mov r3, #0 } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; a000419c: e5898018 str r8, [r9, #24] tty->tty_rcvwakeup = 0; a00041a0: e58430e4 str r3, [r4, #228] ; 0xe4 rtems_semaphore_release (tty->isem); a00041a4: eb000521 bl a0005630 return sc; a00041a8: eaffffdf b a000412c } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; if (tty->device.pollRead != NULL && a00041ac: e59430a0 ldr r3, [r4, #160] ; 0xa0 rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; a00041b0: e59d1000 ldr r1, [sp] tty->read_start_column = tty->column; a00041b4: e5942028 ldr r2, [r4, #40] ; 0x28 if (tty->device.pollRead != NULL && a00041b8: e3530000 cmp r3, #0 rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; a00041bc: e5841020 str r1, [r4, #32] a00041c0: e5841024 str r1, [r4, #36] ; 0x24 tty->read_start_column = tty->column; a00041c4: e584202c str r2, [r4, #44] ; 0x2c if (tty->device.pollRead != NULL && a00041c8: 0a000002 beq a00041d8 a00041cc: e59420b4 ldr r2, [r4, #180] ; 0xb4 a00041d0: e3520000 cmp r2, #0 a00041d4: 0a000067 beq a0004378 * Fill the input buffer from the raw input queue */ static rtems_status_code fillBufferQueue (struct rtems_termios_tty *tty) { rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; a00041d8: 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))) { a00041dc: e59f7284 ldr r7, [pc, #644] ; a0004468 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)) a00041e0: e3a0bc02 mov fp, #512 ; 0x200 == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)( a00041e4: e2843049 add r3, r4, #73 ; 0x49 static rtems_status_code fillBufferQueue (struct rtems_termios_tty *tty) { rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; rtems_status_code sc; int wait = (int)1; a00041e8: e3a05001 mov r5, #1 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)) a00041ec: e28bb002 add fp, fp, #2 == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)( a00041f0: e58d3004 str r3, [sp, #4] while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && a00041f4: e594205c ldr r2, [r4, #92] ; 0x5c a00041f8: e5943060 ldr r3, [r4, #96] ; 0x60 a00041fc: e1520003 cmp r2, r3 a0004200: 0a000047 beq a0004324 (tty->ccount < (CBUFSIZE-1))) { a0004204: e5972008 ldr r2, [r7, #8] while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && a0004208: e5943020 ldr r3, [r4, #32] (tty->ccount < (CBUFSIZE-1))) { a000420c: e2422001 sub r2, r2, #1 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && a0004210: e1520003 cmp r2, r3 a0004214: ca00000f bgt a0004258 a0004218: ea000041 b a0004324 <== NOT EXECUTED } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { if (siproc (c, tty)) a000421c: e1a00006 mov r0, r6 a0004220: e1a01004 mov r1, r4 a0004224: ebffff5a bl a0003f94 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && a0004228: e594205c ldr r2, [r4, #92] ; 0x5c a000422c: e5943060 ldr r3, [r4, #96] ; 0x60 } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { if (siproc (c, tty)) wait = 0; a0004230: e3500000 cmp r0, #0 a0004234: 13a05000 movne r5, #0 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && a0004238: e1520003 cmp r2, r3 } else { siproc (c, tty); if (tty->ccount >= tty->termios.c_cc[VMIN]) wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; a000423c: e5946070 ldr r6, [r4, #112] ; 0x70 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && a0004240: 0a000037 beq a0004324 (tty->ccount < (CBUFSIZE-1))) { a0004244: e5973008 ldr r3, [r7, #8] while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && a0004248: e5942020 ldr r2, [r4, #32] (tty->ccount < (CBUFSIZE-1))) { a000424c: e2433001 sub r3, r3, #1 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && a0004250: e1520003 cmp r2, r3 a0004254: aa000032 bge a0004324 (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; a0004258: e594005c ldr r0, [r4, #92] ; 0x5c a000425c: e5941064 ldr r1, [r4, #100] ; 0x64 a0004260: e2800001 add r0, r0, #1 a0004264: eb003411 bl a00112b0 <__umodsi3> c = tty->rawInBuf.theBuf[newHead]; a0004268: e5943058 ldr r3, [r4, #88] ; 0x58 a000426c: e7d36000 ldrb r6, [r3, r0] tty->rawInBuf.Head = newHead; a0004270: e584005c str r0, [r4, #92] ; 0x5c if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) a0004274: e5943060 ldr r3, [r4, #96] ; 0x60 a0004278: e5942064 ldr r2, [r4, #100] ; 0x64 % tty->rawInBuf.Size) a000427c: 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) a0004280: e0823003 add r3, r2, r3 % tty->rawInBuf.Size) a0004284: e0600003 rsb r0, r0, r3 a0004288: eb003408 bl a00112b0 <__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) a000428c: e59430bc ldr r3, [r4, #188] ; 0xbc a0004290: e1500003 cmp r0, r3 a0004294: 2a000013 bcs a00042e8 % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; a0004298: e59420b8 ldr r2, [r4, #184] ; 0xb8 /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) a000429c: e3a03c02 mov r3, #512 ; 0x200 a00042a0: e2833002 add r3, r3, #2 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; a00042a4: e3c22001 bic r2, r2, #1 a00042a8: e58420b8 str r2, [r4, #184] ; 0xb8 /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) a00042ac: e59420b8 ldr r2, [r4, #184] ; 0xb8 a00042b0: e0023003 and r3, r2, r3 a00042b4: e153000b cmp r3, fp a00042b8: 0a000022 beq a0004348 && ((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) { a00042bc: e59430b8 ldr r3, [r4, #184] ; 0xb8 a00042c0: e3130c01 tst r3, #256 ; 0x100 a00042c4: 0a000007 beq a00042e8 tty->flow_ctrl &= ~FL_IRTSOFF; a00042c8: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { a00042cc: 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; a00042d0: e3c22004 bic r2, r2, #4 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { a00042d4: 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; a00042d8: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { a00042dc: 0a000001 beq a00042e8 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); a00042e0: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED a00042e4: e12fff33 blx r3 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { a00042e8: e594303c ldr r3, [r4, #60] ; 0x3c a00042ec: e3130002 tst r3, #2 a00042f0: 1affffc9 bne a000421c if (siproc (c, tty)) wait = 0; } else { siproc (c, tty); a00042f4: e1a00006 mov r0, r6 <== NOT EXECUTED a00042f8: e1a01004 mov r1, r4 <== NOT EXECUTED a00042fc: ebffff24 bl a0003f94 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) a0004300: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED a0004304: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; a0004308: 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; a000430c: e1520003 cmp r2, r3 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && a0004310: e594205c ldr r2, [r4, #92] ; 0x5c <== NOT EXECUTED a0004314: 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; a0004318: a3a05000 movge r5, #0 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && a000431c: e1520003 cmp r2, r3 <== NOT EXECUTED a0004320: 1affffc7 bne a0004244 <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { a0004324: e3550000 cmp r5, #0 a0004328: 0affff86 beq a0004148 sc = rtems_semaphore_obtain( a000432c: e5940068 ldr r0, [r4, #104] ; 0x68 a0004330: e594106c ldr r1, [r4, #108] ; 0x6c a0004334: e1a02006 mov r2, r6 a0004338: eb000473 bl a000550c tty->rawInBuf.Semaphore, tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) a000433c: e3500000 cmp r0, #0 a0004340: 0affffab beq a00041f4 a0004344: eaffff7f b a0004148 <== 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) a0004348: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED a000434c: e3530000 cmp r3, #0 <== NOT EXECUTED a0004350: 0a000002 beq a0004360 <== NOT EXECUTED || (tty->flow_ctrl & FL_OSTOP))) { a0004354: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED a0004358: e3130020 tst r3, #32 <== NOT EXECUTED a000435c: 0affffd6 beq a00042bc <== NOT EXECUTED /* XON should be sent now... */ (*tty->device.write)( a0004360: e59430a4 ldr r3, [r4, #164] ; 0xa4 <== NOT EXECUTED a0004364: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED a0004368: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED a000436c: e3a02001 mov r2, #1 <== NOT EXECUTED a0004370: e12fff33 blx r3 <== NOT EXECUTED a0004374: eaffffdb b a00042e8 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { a0004378: e594203c ldr r2, [r4, #60] ; 0x3c a000437c: e3120002 tst r2, #2 a0004380: 0a00000a beq a00043b0 for (;;) { n = (*tty->device.pollRead)(tty->minor); a0004384: e5940010 ldr r0, [r4, #16] a0004388: e12fff33 blx r3 if (n < 0) { a000438c: e3500000 cmp r0, #0 rtems_task_wake_after (1); } else { if (siproc (n, tty)) a0004390: e1a01004 mov r1, r4 a0004394: e20000ff and r0, r0, #255 ; 0xff int n; if (tty->termios.c_lflag & ICANON) { for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { a0004398: ba00002d blt a0004454 rtems_task_wake_after (1); } else { if (siproc (n, tty)) a000439c: ebfffefc bl a0003f94 a00043a0: e3500000 cmp r0, #0 a00043a4: 1affff67 bne a0004148 static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { a00043a8: e59430a0 ldr r3, [r4, #160] ; 0xa0 a00043ac: eafffff4 b a0004384 } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); a00043b0: eb0002b5 bl a0004e8c a00043b4: e1a05000 mov r5, r0 for (;;) { n = (*tty->device.pollRead)(tty->minor); a00043b8: e59430a0 ldr r3, [r4, #160] ; 0xa0 a00043bc: e5940010 ldr r0, [r4, #16] a00043c0: e12fff33 blx r3 if (n < 0) { a00043c4: e3500000 cmp r0, #0 a00043c8: ba00000c blt a0004400 break; } } rtems_task_wake_after (1); } else { siproc (n, tty); a00043cc: e20000ff and r0, r0, #255 ; 0xff a00043d0: e1a01004 mov r1, r4 a00043d4: ebfffeee bl a0003f94 if (tty->ccount >= tty->termios.c_cc[VMIN]) a00043d8: e5d43047 ldrb r3, [r4, #71] ; 0x47 a00043dc: e5942020 ldr r2, [r4, #32] a00043e0: e1520003 cmp r2, r3 a00043e4: aaffff57 bge a0004148 break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) a00043e8: e3530000 cmp r3, #0 a00043ec: 0afffff1 beq a00043b8 a00043f0: e5d43046 ldrb r3, [r4, #70] ; 0x46 a00043f4: e3530000 cmp r3, #0 a00043f8: 0affffee beq a00043b8 a00043fc: eaffffeb b a00043b0 then = rtems_clock_get_ticks_since_boot(); for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { if (tty->termios.c_cc[VMIN]) { a0004400: e5d43047 ldrb r3, [r4, #71] ; 0x47 a0004404: e3530000 cmp r3, #0 a0004408: 0a000008 beq a0004430 if (tty->termios.c_cc[VTIME] && tty->ccount) { a000440c: e5d43046 ldrb r3, [r4, #70] ; 0x46 a0004410: e3530000 cmp r3, #0 a0004414: 0a000002 beq a0004424 a0004418: e5943020 ldr r3, [r4, #32] a000441c: e3530000 cmp r3, #0 a0004420: 1a000005 bne a000443c now = rtems_clock_get_ticks_since_boot(); if ((now - then) > tty->vtimeTicks) { break; } } rtems_task_wake_after (1); a0004424: e3a00001 mov r0, #1 a0004428: eb00056e bl a00059e8 a000442c: eaffffe1 b a00043b8 if ((now - then) > tty->vtimeTicks) { break; } } } else { if (!tty->termios.c_cc[VTIME]) a0004430: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED a0004434: e3530000 cmp r3, #0 <== NOT EXECUTED a0004438: 0affff42 beq a0004148 <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); a000443c: eb000292 bl a0004e8c if ((now - then) > tty->vtimeTicks) { a0004440: e5943054 ldr r3, [r4, #84] ; 0x54 a0004444: e0650000 rsb r0, r5, r0 a0004448: e1500003 cmp r0, r3 a000444c: 9afffff4 bls a0004424 a0004450: eaffff3c b a0004148 if (tty->termios.c_lflag & ICANON) { for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { rtems_task_wake_after (1); a0004454: e3a00001 mov r0, #1 a0004458: eb000562 bl a00059e8 static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { a000445c: e59430a0 ldr r3, [r4, #160] ; 0xa0 a0004460: eaffffc7 b a0004384 =============================================================================== a00047e4 : int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) a00047e4: e59030b8 ldr r3, [r0, #184] ; 0xb8 a00047e8: e3a02b01 mov r2, #1024 ; 0x400 a00047ec: e2822001 add r2, r2, #1 a00047f0: e3c33fff bic r3, r3, #1020 ; 0x3fc a00047f4: e1a03a83 lsl r3, r3, #21 * 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) { a00047f8: 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)) a00047fc: e1a03aa3 lsr r3, r3, #21 a0004800: e1530002 cmp r3, r2 * 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) { a0004804: 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)) a0004808: 0a000047 beq a000492c tty->flow_ctrl |= FL_ISNTXOF; rtems_interrupt_enable(level); nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) == FL_ISNTXOF) { a000480c: e59030b8 ldr r3, [r0, #184] ; 0xb8 a0004810: e2033003 and r3, r3, #3 a0004814: e3530002 cmp r3, #2 a0004818: 0a000055 beq a0004974 tty->flow_ctrl &= ~FL_ISNTXOF; rtems_interrupt_enable(level); nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { a000481c: e5902080 ldr r2, [r0, #128] ; 0x80 a0004820: e5903084 ldr r3, [r0, #132] ; 0x84 a0004824: e1520003 cmp r2, r3 a0004828: 0a00002a beq a00048d8 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a000482c: e10f3000 mrs r3, CPSR a0004830: e3832080 orr r2, r3, #128 ; 0x80 a0004834: e129f002 msr CPSR_fc, r2 return 0; } rtems_interrupt_disable(level); len = tty->t_dqlen; tty->t_dqlen = 0; a0004838: e3a02000 mov r2, #0 } return 0; } rtems_interrupt_disable(level); len = tty->t_dqlen; a000483c: e5900090 ldr r0, [r0, #144] ; 0x90 tty->t_dqlen = 0; a0004840: e5842090 str r2, [r4, #144] ; 0x90 static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a0004844: e129f003 msr CPSR_fc, r3 rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; a0004848: e5943084 ldr r3, [r4, #132] ; 0x84 a000484c: e5941088 ldr r1, [r4, #136] ; 0x88 a0004850: e0800003 add r0, r0, r3 a0004854: eb003295 bl a00112b0 <__umodsi3> tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { a0004858: 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; a000485c: e1a05000 mov r5, r0 tty->rawOutBuf.Tail = newTail; a0004860: e5840084 str r0, [r4, #132] ; 0x84 if (tty->rawOutBufState == rob_wait) { a0004864: e3530002 cmp r3, #2 a0004868: 0a00002c beq a0004920 * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); } if (newTail == tty->rawOutBuf.Head) { a000486c: e5943080 ldr r3, [r4, #128] ; 0x80 a0004870: e1530005 cmp r3, r5 a0004874: 0a00001f beq a00048f8 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)) a0004878: e59430b8 ldr r3, [r4, #184] ; 0xb8 a000487c: e2033e21 and r3, r3, #528 ; 0x210 a0004880: e3530e21 cmp r3, #528 ; 0x210 a0004884: 0a00004c beq a00049bc nToSend = 0; } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) a0004888: 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)( a000488c: e594107c ldr r1, [r4, #124] ; 0x7c a0004890: e5940010 ldr r0, [r4, #16] nToSend = 0; } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) a0004894: e1550003 cmp r5, r3 nToSend = tty->rawOutBuf.Size - newTail; a0004898: 85946088 ldrhi r6, [r4, #136] ; 0x88 else nToSend = tty->rawOutBuf.Head - newTail; a000489c: 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)) { a00048a0: e59430b8 ldr r3, [r4, #184] ; 0xb8 } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) nToSend = tty->rawOutBuf.Size - newTail; a00048a4: 80656006 rsbhi r6, r5, r6 else nToSend = tty->rawOutBuf.Head - newTail; a00048a8: 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)) { a00048ac: e3130c06 tst r3, #1536 ; 0x600 a00048b0: 13a06001 movne r6, #1 nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ a00048b4: e3a03001 mov r3, #1 a00048b8: e5843094 str r3, [r4, #148] ; 0x94 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; a00048bc: e1a02006 mov r2, r6 } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)( a00048c0: e59430a4 ldr r3, [r4, #164] ; 0xa4 a00048c4: e0811005 add r1, r1, r5 a00048c8: e12fff33 blx r3 tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ a00048cc: e5845084 str r5, [r4, #132] ; 0x84 } return nToSend; } a00048d0: e1a00006 mov r0, r6 a00048d4: e8bd8070 pop {r4, r5, r6, pc} } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { a00048d8: e5903094 ldr r3, [r0, #148] ; 0x94 a00048dc: e3530002 cmp r3, #2 /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); } return 0; a00048e0: 13a06000 movne r6, #0 } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { a00048e4: 1afffff9 bne a00048d0 /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); a00048e8: e590008c ldr r0, [r0, #140] ; 0x8c <== NOT EXECUTED a00048ec: eb00034f bl a0005630 <== NOT EXECUTED } return 0; a00048f0: e3a06000 mov r6, #0 <== NOT EXECUTED a00048f4: eafffff5 b a00048d0 <== NOT EXECUTED nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { a00048f8: e59430d4 ldr r3, [r4, #212] ; 0xd4 if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; a00048fc: e3a06000 mov r6, #0 a0004900: e5846094 str r6, [r4, #148] ; 0x94 nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { a0004904: e1530006 cmp r3, r6 if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; nToSend = 0; a0004908: 01a06003 moveq r6, r3 /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { a000490c: 0affffee beq a00048cc (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); a0004910: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED a0004914: e59410d8 ldr r1, [r4, #216] ; 0xd8 <== NOT EXECUTED a0004918: e12fff33 blx r3 <== NOT EXECUTED a000491c: eaffffea b a00048cc <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); a0004920: e594008c ldr r0, [r4, #140] ; 0x8c a0004924: eb000341 bl a0005630 a0004928: eaffffcf b a000486c /* 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); a000492c: e59030a4 ldr r3, [r0, #164] ; 0xa4 <== NOT EXECUTED a0004930: e284104a add r1, r4, #74 ; 0x4a <== NOT EXECUTED a0004934: e3a02001 mov r2, #1 <== NOT EXECUTED a0004938: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED a000493c: e12fff33 blx r3 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a0004940: e10f3000 mrs r3, CPSR <== NOT EXECUTED a0004944: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED a0004948: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED rtems_interrupt_disable(level); tty->t_dqlen--; a000494c: e5941090 ldr r1, [r4, #144] ; 0x90 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; a0004950: 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--; a0004954: e2411001 sub r1, r1, #1 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; a0004958: 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--; a000495c: e5841090 str r1, [r4, #144] ; 0x90 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; a0004960: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a0004964: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED rtems_interrupt_enable(level); nToSend = 1; a0004968: e3a06001 mov r6, #1 <== NOT EXECUTED tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } a000496c: e1a00006 mov r0, r6 <== NOT EXECUTED a0004970: 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); a0004974: e59030a4 ldr r3, [r0, #164] ; 0xa4 <== NOT EXECUTED a0004978: e2841049 add r1, r4, #73 ; 0x49 <== NOT EXECUTED a000497c: e3a02001 mov r2, #1 <== NOT EXECUTED a0004980: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED a0004984: e12fff33 blx r3 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a0004988: e10f3000 mrs r3, CPSR <== NOT EXECUTED a000498c: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED a0004990: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED rtems_interrupt_disable(level); tty->t_dqlen--; a0004994: e5941090 ldr r1, [r4, #144] ; 0x90 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; a0004998: 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--; a000499c: e2411001 sub r1, r1, #1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; a00049a0: 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--; a00049a4: e5841090 str r1, [r4, #144] ; 0x90 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; a00049a8: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a00049ac: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED rtems_interrupt_enable(level); nToSend = 1; a00049b0: e3a06001 mov r6, #1 <== NOT EXECUTED tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } a00049b4: e1a00006 mov r0, r6 <== NOT EXECUTED a00049b8: 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 ( a00049bc: e10f3000 mrs r3, CPSR <== NOT EXECUTED a00049c0: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED a00049c4: 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; a00049c8: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ a00049cc: e3a01001 mov r1, #1 <== NOT EXECUTED a00049d0: e5841094 str r1, [r4, #148] ; 0x94 <== 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; a00049d4: e3822020 orr r2, r2, #32 <== NOT EXECUTED a00049d8: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a00049dc: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ rtems_interrupt_enable(level); nToSend = 0; a00049e0: e3a06000 mov r6, #0 <== NOT EXECUTED a00049e4: eaffffb8 b a00048cc <== NOT EXECUTED =============================================================================== a0004758 : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { a0004758: e92d40f0 push {r4, r5, r6, r7, lr} a000475c: e24dd008 sub sp, sp, #8 a0004760: e1a04000 mov r4, r0 a0004764: e28d7007 add r7, sp, #7 while (1) { /* * wait for rtems event */ rtems_event_receive( a0004768: e3a06000 mov r6, #0 a000476c: ea000005 b a0004788 } /* * do something */ c = tty->device.pollRead(tty->minor); a0004770: e59430a0 ldr r3, [r4, #160] ; 0xa0 a0004774: e5940010 ldr r0, [r4, #16] a0004778: e12fff33 blx r3 if (c != EOF) { a000477c: e3700001 cmn r0, #1 } /* * do something */ c = tty->device.pollRead(tty->minor); a0004780: e1a03000 mov r3, r0 if (c != EOF) { a0004784: 1a000010 bne a00047cc while (1) { /* * wait for rtems event */ rtems_event_receive( a0004788: e1a0300d mov r3, sp a000478c: e3a01002 mov r1, #2 a0004790: e3a02000 mov r2, #0 a0004794: e3a00003 mov r0, #3 a0004798: eb0001db bl a0004f0c (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) { a000479c: e59d3000 ldr r3, [sp] a00047a0: e3130001 tst r3, #1 a00047a4: 0afffff1 beq a0004770 tty->rxTaskId = 0; a00047a8: e58460c4 str r6, [r4, #196] ; 0xc4 <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); a00047ac: e1a00006 mov r0, r6 <== NOT EXECUTED a00047b0: eb000417 bl a0005814 <== NOT EXECUTED } /* * do something */ c = tty->device.pollRead(tty->minor); a00047b4: e59430a0 ldr r3, [r4, #160] ; 0xa0 <== NOT EXECUTED a00047b8: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED a00047bc: e12fff33 blx r3 <== NOT EXECUTED if (c != EOF) { a00047c0: e3700001 cmn r0, #1 <== NOT EXECUTED } /* * do something */ c = tty->device.pollRead(tty->minor); a00047c4: e1a03000 mov r3, r0 <== NOT EXECUTED if (c != EOF) { a00047c8: 0affffee beq a0004788 <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( tty,&c_buf,1); a00047cc: e1a00004 mov r0, r4 a00047d0: e1a01007 mov r1, r7 a00047d4: e3a02001 mov r2, #1 c = tty->device.pollRead(tty->minor); if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c; a00047d8: e5cd3007 strb r3, [sp, #7] rtems_termios_enqueue_raw_characters ( tty,&c_buf,1); a00047dc: ebffff25 bl a0004478 a00047e0: eaffffe8 b a0004788 =============================================================================== a00049e8 : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { a00049e8: e92d40f0 push {r4, r5, r6, r7, lr} a00049ec: e59f6060 ldr r6, [pc, #96] ; a0004a54 a00049f0: e24dd004 sub sp, sp, #4 a00049f4: e1a04000 mov r4, r0 while (1) { /* * wait for rtems event */ rtems_event_receive( a00049f8: e3a07000 mov r7, #0 a00049fc: ea000008 b a0004a24 } /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { a0004a00: e59430cc ldr r3, [r4, #204] ; 0xcc rtems_termios_linesw[tty->t_line].l_start(tty); a0004a04: e1a00004 mov r0, r4 } /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { a0004a08: e0863283 add r3, r6, r3, lsl #5 a0004a0c: e5933014 ldr r3, [r3, #20] a0004a10: e3530000 cmp r3, #0 a0004a14: 0a000000 beq a0004a1c rtems_termios_linesw[tty->t_line].l_start(tty); a0004a18: e12fff33 blx r3 <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); a0004a1c: e1a00004 mov r0, r4 a0004a20: ebffff6f bl a00047e4 while (1) { /* * wait for rtems event */ rtems_event_receive( a0004a24: e1a0300d mov r3, sp a0004a28: e3a01002 mov r1, #2 a0004a2c: e3a02000 mov r2, #0 a0004a30: e3a00003 mov r0, #3 a0004a34: eb000134 bl a0004f0c (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) { a0004a38: e59d3000 ldr r3, [sp] a0004a3c: e3130001 tst r3, #1 a0004a40: 0affffee beq a0004a00 tty->txTaskId = 0; a0004a44: e58470c8 str r7, [r4, #200] ; 0xc8 <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); a0004a48: e1a00007 mov r0, r7 <== NOT EXECUTED a0004a4c: eb000370 bl a0005814 <== NOT EXECUTED a0004a50: eaffffea b a0004a00 <== NOT EXECUTED =============================================================================== a0003ff0 : rtems_status_code rtems_termios_write (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; a0003ff0: e5903000 ldr r3, [r0] rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { a0003ff4: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; a0003ff8: e5934034 ldr r4, [r3, #52] ; 0x34 rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); a0003ffc: e3a01000 mov r1, #0 rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { a0004000: e1a05000 mov r5, r0 rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); a0004004: e1a02001 mov r2, r1 a0004008: e5940018 ldr r0, [r4, #24] a000400c: eb00053e bl a000550c if (sc != RTEMS_SUCCESSFUL) a0004010: e2506000 subs r6, r0, #0 a0004014: 1a00000b bne a0004048 return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { a0004018: e59420cc ldr r2, [r4, #204] ; 0xcc a000401c: e59f3094 ldr r3, [pc, #148] ; a00040b8 a0004020: e0833282 add r3, r3, r2, lsl #5 a0004024: e593300c ldr r3, [r3, #12] a0004028: e3530000 cmp r3, #0 a000402c: 0a000007 beq a0004050 sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); a0004030: e1a00004 mov r0, r4 a0004034: e1a01005 mov r1, r5 a0004038: e12fff33 blx r3 a000403c: e1a06000 mov r6, r0 rtems_semaphore_release (tty->osem); a0004040: e5940018 ldr r0, [r4, #24] a0004044: eb000579 bl a0005630 rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; } rtems_semaphore_release (tty->osem); return sc; } a0004048: e1a00006 mov r0, r6 a000404c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} if (rtems_termios_linesw[tty->t_line].l_write != NULL) { sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { a0004050: e5943034 ldr r3, [r4, #52] ; 0x34 a0004054: e3130001 tst r3, #1 a0004058: 0a000011 beq a00040a4 uint32_t count = args->count; a000405c: e5958010 ldr r8, [r5, #16] char *buffer = args->buffer; a0004060: e595a00c ldr sl, [r5, #12] while (count--) a0004064: e3580000 cmp r8, #0 a0004068: 01a03006 moveq r3, r6 a000406c: 0a000007 beq a0004090 a0004070: e1a07006 mov r7, r6 oproc (*buffer++, tty); a0004074: e7da0007 ldrb r0, [sl, r7] a0004078: e1a01004 mov r1, r4 a000407c: e2877001 add r7, r7, #1 a0004080: ebfffe47 bl a00039a4 return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) a0004084: e1570008 cmp r7, r8 a0004088: 1afffff9 bne a0004074 oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; a000408c: e5953010 ldr r3, [r5, #16] a0004090: e5853018 str r3, [r5, #24] } rtems_semaphore_release (tty->osem); a0004094: e5940018 ldr r0, [r4, #24] a0004098: eb000564 bl a0005630 return sc; } a000409c: e1a00006 mov r0, r6 a00040a0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} char *buffer = args->buffer; while (count--) oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); a00040a4: e595000c ldr r0, [r5, #12] <== NOT EXECUTED a00040a8: e5951010 ldr r1, [r5, #16] <== NOT EXECUTED a00040ac: e1a02004 mov r2, r4 <== NOT EXECUTED a00040b0: ebfffdf5 bl a000388c <== NOT EXECUTED a00040b4: eafffff4 b a000408c <== NOT EXECUTED =============================================================================== a00068e8 : { int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) { a00068e8: e3100202 tst r0, #536870912 ; 0x20000000 static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { a00068ec: e92d41f0 push {r4, r5, r6, r7, r8, lr} a00068f0: e1a04000 mov r4, r0 a00068f4: e1a08001 mov r8, r1 a00068f8: e1a06002 mov r6, r2 int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) { a00068fc: 0a00000d beq a0006938 if (rtems_panic_in_progress++) a0006900: e59f212c ldr r2, [pc, #300] ; a0006a34 a0006904: e5921000 ldr r1, [r2] a0006908: e2813001 add r3, r1, #1 a000690c: e3510000 cmp r1, #0 a0006910: e5823000 str r3, [r2] a0006914: 0a000004 beq a000692c rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; a0006918: e59f3118 ldr r3, [pc, #280] ; a0006a38 <== NOT EXECUTED a000691c: e5931000 ldr r1, [r3] <== NOT EXECUTED a0006920: e2811001 add r1, r1, #1 <== NOT EXECUTED a0006924: e5831000 str r1, [r3] <== NOT EXECUTED RTEMS_COMPILER_MEMORY_BARRIER(); a0006928: e5923000 ldr r3, [r2] <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) a000692c: e3530002 cmp r3, #2 return 0; a0006930: 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) a0006934: ca000024 bgt a00069cc return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ a0006938: e59f50fc ldr r5, [pc, #252] ; a0006a3c status = error_flag & ~RTEMS_ERROR_MASK; a000693c: 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 */ a0006940: e5953000 ldr r3, [r5] a0006944: e5930008 ldr r0, [r3, #8] a0006948: eb003337 bl a001362c status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ a000694c: e2144101 ands r4, r4, #1073741824 ; 0x40000000 a0006950: 1a00002a bne a0006a00 #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); a0006954: e5953000 ldr r3, [r5] a0006958: e1a02006 mov r2, r6 a000695c: e1a01008 mov r1, r8 a0006960: e593000c ldr r0, [r3, #12] a0006964: eb004ba2 bl a00197f4 if (status) a0006968: 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); a000696c: e1a06000 mov r6, r0 if (status) a0006970: 1a000017 bne a00069d4 chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { a0006974: e3540000 cmp r4, #0 a0006978: 0a00000b beq a00069ac if ((local_errno > 0) && *strerror(local_errno)) a000697c: da000004 ble a0006994 a0006980: e1a00004 mov r0, r4 a0006984: eb003711 bl a00145d0 a0006988: e5d03000 ldrb r3, [r0] a000698c: e3530000 cmp r3, #0 a0006990: 1a00001d bne a0006a0c chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); a0006994: e5953000 ldr r3, [r5] a0006998: e59f10a0 ldr r1, [pc, #160] ; a0006a40 a000699c: e1a02004 mov r2, r4 a00069a0: e593000c ldr r0, [r3, #12] a00069a4: eb003406 bl a00139c4 a00069a8: e0866000 add r6, r6, r0 } chars_written += fprintf(stderr, "\n"); a00069ac: e5953000 ldr r3, [r5] a00069b0: e59f108c ldr r1, [pc, #140] ; a0006a44 a00069b4: e593000c ldr r0, [r3, #12] a00069b8: eb003401 bl a00139c4 (void) fflush(stderr); a00069bc: 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"); a00069c0: e0806006 add r6, r0, r6 (void) fflush(stderr); a00069c4: e593000c ldr r0, [r3, #12] a00069c8: eb003317 bl a001362c return chars_written; } a00069cc: e1a00006 mov r0, r6 a00069d0: 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)); a00069d4: e59f3060 ldr r3, [pc, #96] ; a0006a3c a00069d8: e1a00007 mov r0, r7 a00069dc: e5933000 ldr r3, [r3] a00069e0: e593700c ldr r7, [r3, #12] a00069e4: ebffffbb bl a00068d8 a00069e8: e59f1058 ldr r1, [pc, #88] ; a0006a48 a00069ec: e1a02000 mov r2, r0 a00069f0: e1a00007 mov r0, r7 a00069f4: eb0033f2 bl a00139c4 #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += a00069f8: e0866000 add r6, r6, r0 a00069fc: eaffffdc b a0006974 (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; a0006a00: eb003212 bl a0013250 <__errno> a0006a04: e5904000 ldr r4, [r0] a0006a08: eaffffd1 b a0006954 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)); a0006a0c: e5953000 ldr r3, [r5] a0006a10: e1a00004 mov r0, r4 a0006a14: e593400c ldr r4, [r3, #12] a0006a18: eb0036ec bl a00145d0 a0006a1c: e59f1028 ldr r1, [pc, #40] ; a0006a4c a0006a20: e1a02000 mov r2, r0 a0006a24: e1a00004 mov r0, r4 a0006a28: eb0033e5 bl a00139c4 a0006a2c: e0866000 add r6, r6, r0 a0006a30: eaffffdd b a00069ac =============================================================================== a00025a8 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { a00025a8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); a00025ac: e59fb0fc ldr fp, [pc, #252] ; a00026b0 limit++; continue; } sign = 1; } if (!isdigit(c)) a00025b0: e59fa0fc ldr sl, [pc, #252] ; a00026b4 return 0; d = c - '0'; if ((i > (limit / 10)) a00025b4: e59f90fc ldr r9, [pc, #252] ; a00026b8 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { a00025b8: e24dd004 sub sp, sp, #4 int c; unsigned int i = 0; unsigned int limit = INT_MAX; int sign = 0; a00025bc: e3a06000 mov r6, #0 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { a00025c0: e1a04000 mov r4, r0 a00025c4: e58d1000 str r1, [sp] int c; unsigned int i = 0; unsigned int limit = INT_MAX; a00025c8: e3e07102 mvn r7, #-2147483648 ; 0x80000000 */ static int scanInt(FILE *fp, int *val) { int c; unsigned int i = 0; a00025cc: e1a05006 mov r5, r6 return 0; d = c - '0'; if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; a00025d0: e3a0800a mov r8, #10 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); a00025d4: e5943004 ldr r3, [r4, #4] a00025d8: e2433001 sub r3, r3, #1 a00025dc: e3530000 cmp r3, #0 a00025e0: e5843004 str r3, [r4, #4] a00025e4: ba00001b blt a0002658 a00025e8: e5943000 ldr r3, [r4] a00025ec: e4d30001 ldrb r0, [r3], #1 if (c == ':') a00025f0: e350003a cmp r0, #58 ; 0x3a unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); a00025f4: e5843000 str r3, [r4] if (c == ':') a00025f8: 0a00001b beq a000266c break; if (sign == 0) { a00025fc: e3560000 cmp r6, #0 a0002600: 1a000004 bne a0002618 if (c == '-') { a0002604: e350002d cmp r0, #45 ; 0x2d sign = -1; limit++; a0002608: 02877001 addeq r7, r7, #1 c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { sign = -1; a000260c: 03e06000 mvneq r6, #0 for (;;) { c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { a0002610: 0affffef beq a00025d4 sign = -1; limit++; continue; } sign = 1; a0002614: e3a06001 mov r6, #1 } if (!isdigit(c)) a0002618: e59a3000 ldr r3, [sl] a000261c: e0833000 add r3, r3, r0 a0002620: e5d33001 ldrb r3, [r3, #1] a0002624: e2133004 ands r3, r3, #4 a0002628: 0a00001e beq a00026a8 return 0; d = c - '0'; if ((i > (limit / 10)) a000262c: e0832799 umull r2, r3, r9, r7 a0002630: e15501a3 cmp r5, r3, lsr #3 a0002634: 8a000018 bhi a000269c } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; a0002638: e2400030 sub r0, r0, #48 ; 0x30 if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) a000263c: 0a000012 beq a000268c unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); a0002640: 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; a0002644: e0250598 mla r5, r8, r5, r0 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); a0002648: e2433001 sub r3, r3, #1 a000264c: e3530000 cmp r3, #0 a0002650: e5843004 str r3, [r4, #4] a0002654: aaffffe3 bge a00025e8 a0002658: e59b0000 ldr r0, [fp] <== NOT EXECUTED a000265c: e1a01004 mov r1, r4 <== NOT EXECUTED a0002660: eb0036ad bl a001011c <__srget_r> <== NOT EXECUTED if (c == ':') a0002664: e350003a cmp r0, #58 ; 0x3a <== NOT EXECUTED a0002668: 1affffe3 bne a00025fc <== NOT EXECUTED if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; } if (sign == 0) a000266c: e3560000 cmp r6, #0 return 0; a0002670: 01a00006 moveq r0, r6 if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; } if (sign == 0) a0002674: 0a000009 beq a00026a0 return 0; *val = i * sign; a0002678: e0050596 mul r5, r6, r5 a000267c: e59d3000 ldr r3, [sp] return 1; a0002680: e3a00001 mov r0, #1 return 0; i = i * 10 + d; } if (sign == 0) return 0; *val = i * sign; a0002684: e5835000 str r5, [r3] return 1; a0002688: ea000004 b a00026a0 } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) a000268c: e0030598 mul r3, r8, r5 a0002690: e0633007 rsb r3, r3, r7 a0002694: e1500003 cmp r0, r3 a0002698: 9affffe8 bls a0002640 return 0; a000269c: e3a00000 mov r0, #0 } if (sign == 0) return 0; *val = i * sign; return 1; } a00026a0: e28dd004 add sp, sp, #4 a00026a4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} continue; } sign = 1; } if (!isdigit(c)) return 0; a00026a8: e1a00003 mov r0, r3 a00026ac: eafffffb b a00026a0 =============================================================================== a00027b0 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { a00027b0: e92d41f0 push {r4, r5, r6, r7, r8, lr} a00027b4: e24dd014 sub sp, sp, #20 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) a00027b8: e28d5008 add r5, sp, #8 a00027bc: e28d4004 add r4, sp, #4 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { a00027c0: e58d2008 str r2, [sp, #8] a00027c4: e58d3004 str r3, [sp, #4] int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) a00027c8: e3a06000 mov r6, #0 a00027cc: e1a02005 mov r2, r5 a00027d0: e1a03004 mov r3, r4 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { a00027d4: e1a07000 mov r7, r0 a00027d8: e1a08001 mov r8, r1 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) a00027dc: e58d6000 str r6, [sp] a00027e0: ebffffb5 bl a00026bc a00027e4: e3500000 cmp r0, #0 a00027e8: 1a000001 bne a00027f4 grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; return 1; } a00027ec: e28dd014 add sp, sp, #20 a00027f0: 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) a00027f4: e1a00007 mov r0, r7 a00027f8: e2881004 add r1, r8, #4 a00027fc: e1a02005 mov r2, r5 a0002800: e1a03004 mov r3, r4 a0002804: e58d6000 str r6, [sp] a0002808: ebffffab bl a00026bc a000280c: e3500000 cmp r0, #0 a0002810: 0afffff5 beq a00027ec || !scanInt(fp, &grgid) a0002814: e1a00007 mov r0, r7 a0002818: e28d1010 add r1, sp, #16 a000281c: ebffff61 bl a00025a8 a0002820: e3500000 cmp r0, #0 a0002824: 0afffff0 beq a00027ec || !scanString(fp, &grmem, &buffer, &bufsize, 1)) a0002828: e3a06001 mov r6, #1 a000282c: e1a00007 mov r0, r7 a0002830: e28d100c add r1, sp, #12 a0002834: e1a02005 mov r2, r5 a0002838: e1a03004 mov r3, r4 a000283c: e58d6000 str r6, [sp] a0002840: ebffff9d bl a00026bc a0002844: e3500000 cmp r0, #0 a0002848: 0affffe7 beq a00027ec return 0; grp->gr_gid = grgid; a000284c: e1dd31b0 ldrh r3, [sp, #16] /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { a0002850: 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; a0002854: e1c830b8 strh r3, [r8, #8] /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { a0002858: e5d13000 ldrb r3, [r1] a000285c: e3530000 cmp r3, #0 a0002860: 03a06017 moveq r6, #23 a0002864: 0a000007 beq a0002888 a0002868: e1a02001 mov r2, r1 if(*cp == ',') a000286c: e353002c cmp r3, #44 ; 0x2c grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { a0002870: e5f23001 ldrb r3, [r2, #1]! if(*cp == ',') memcount++; a0002874: 02866001 addeq r6, r6, #1 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { a0002878: e3530000 cmp r3, #0 a000287c: 1afffffa bne a000286c a0002880: e1a06106 lsl r6, r6, #2 a0002884: e2866013 add r6, r6, #19 } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) a0002888: e59d3004 ldr r3, [sp, #4] a000288c: e1530006 cmp r3, r6 return 0; a0002890: 33a00000 movcc r0, #0 } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) a0002894: 3affffd4 bcc a00027ec return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); a0002898: e59d0008 ldr r0, [sp, #8] a000289c: e280000f add r0, r0, #15 a00028a0: e3c0000f bic r0, r0, #15 a00028a4: e588000c str r0, [r8, #12] /* * Fill in pointer array */ grp->gr_mem[0] = grmem; a00028a8: e5801000 str r1, [r0] for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { a00028ac: e59d200c ldr r2, [sp, #12] a00028b0: e5d23000 ldrb r3, [r2] a00028b4: e3530000 cmp r3, #0 a00028b8: 0a000010 beq a0002900 } /* * Extract a single group record from the database */ static int scangr( a00028bc: e2822001 add r2, r2, #1 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { a00028c0: e3a01001 mov r1, #1 if(*cp == ',') { *cp = '\0'; a00028c4: e3a00000 mov r0, #0 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') { a00028c8: e353002c cmp r3, #44 ; 0x2c *cp = '\0'; a00028cc: 05420001 strbeq r0, [r2, #-1] grp->gr_mem[memcount++] = cp + 1; a00028d0: 0598300c ldreq r3, [r8, #12] a00028d4: 07832101 streq r2, [r3, r1, lsl #2] /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { a00028d8: e4d23001 ldrb r3, [r2], #1 if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; a00028dc: 02811001 addeq r1, r1, #1 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { a00028e0: e3530000 cmp r3, #0 a00028e4: 1afffff7 bne a00028c8 a00028e8: e598000c ldr r0, [r8, #12] a00028ec: e1a01101 lsl r1, r1, #2 if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; a00028f0: e3a03000 mov r3, #0 a00028f4: e7803001 str r3, [r0, r1] return 1; a00028f8: e3a00001 mov r0, #1 a00028fc: eaffffba b a00027ec /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { a0002900: e3a01004 mov r1, #4 <== NOT EXECUTED a0002904: eafffff9 b a00028f0 <== NOT EXECUTED =============================================================================== a0008618 : int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { a0008618: e92d4010 push {r4, lr} a000861c: e24dd004 sub sp, sp, #4 a0008620: 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 ); a0008624: e1a00001 mov r0, r1 a0008628: e1a0100d mov r1, sp a000862c: eb001682 bl a000e03c <_POSIX_Absolute_timeout_to_ticks> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) a0008630: e3500003 cmp r0, #3 a0008634: 0a000005 beq a0008650 do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); a0008638: e1a00004 mov r0, r4 <== NOT EXECUTED a000863c: e3a01000 mov r1, #0 <== NOT EXECUTED a0008640: e59d2000 ldr r2, [sp] <== NOT EXECUTED a0008644: eb001998 bl a000ecac <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED lock_status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) rtems_set_errno_and_return_minus_one( ETIMEDOUT ); } return lock_status; } a0008648: e28dd004 add sp, sp, #4 a000864c: 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 ); a0008650: e1a00004 mov r0, r4 a0008654: e3a01001 mov r1, #1 a0008658: e59d2000 ldr r2, [sp] a000865c: eb001992 bl a000ecac <_POSIX_Semaphore_Wait_support> a0008660: eafffff8 b a0008648 =============================================================================== a0005e64 : struct sigaction *oact ) { ISR_Level level; if ( oact ) a0005e64: e3520000 cmp r2, #0 int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { a0005e68: e92d4070 push {r4, r5, r6, lr} a0005e6c: e1a04000 mov r4, r0 a0005e70: e1a05001 mov r5, r1 ISR_Level level; if ( oact ) a0005e74: 0a00000a beq a0005ea4 *oact = _POSIX_signals_Vectors[ sig ]; a0005e78: e3a0100c mov r1, #12 a0005e7c: e59f00ec ldr r0, [pc, #236] ; a0005f70 a0005e80: e0010194 mul r1, r4, r1 a0005e84: e1a03002 mov r3, r2 a0005e88: e790c001 ldr ip, [r0, r1] a0005e8c: e0801001 add r1, r0, r1 a0005e90: e483c004 str ip, [r3], #4 a0005e94: e5910004 ldr r0, [r1, #4] a0005e98: e5820004 str r0, [r2, #4] a0005e9c: e5912008 ldr r2, [r1, #8] a0005ea0: e5832004 str r2, [r3, #4] if ( !sig ) a0005ea4: e3540000 cmp r4, #0 a0005ea8: 0a00002b beq a0005f5c static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); a0005eac: e2443001 sub r3, r4, #1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) a0005eb0: e353001f cmp r3, #31 a0005eb4: 8a000028 bhi a0005f5c * * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) a0005eb8: e3540009 cmp r4, #9 a0005ebc: 0a000026 beq a0005f5c /* * Evaluate the new action structure and set the global signal vector * appropriately. */ if ( act ) { a0005ec0: e3550000 cmp r5, #0 a0005ec4: 0a000022 beq a0005f54 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a0005ec8: e10f6000 mrs r6, CPSR a0005ecc: e3863080 orr r3, r6, #128 ; 0x80 a0005ed0: 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 ) { a0005ed4: e5953008 ldr r3, [r5, #8] a0005ed8: e3530000 cmp r3, #0 a0005edc: 0a00000f beq a0005f20 _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; } else { _POSIX_signals_Clear_process_signals( sig ); a0005ee0: e1a00004 mov r0, r4 a0005ee4: eb001756 bl a000bc44 <_POSIX_signals_Clear_process_signals> _POSIX_signals_Vectors[ sig ] = *act; a0005ee8: e1a03005 mov r3, r5 a0005eec: e3a0000c mov r0, #12 a0005ef0: e4931004 ldr r1, [r3], #4 a0005ef4: e59f2074 ldr r2, [pc, #116] ; a0005f70 a0005ef8: e0040490 mul r4, r0, r4 a0005efc: e7821004 str r1, [r2, r4] a0005f00: e5951004 ldr r1, [r5, #4] a0005f04: e0824004 add r4, r2, r4 a0005f08: e5841004 str r1, [r4, #4] a0005f0c: e5933004 ldr r3, [r3, #4] a0005f10: e5843008 str r3, [r4, #8] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a0005f14: 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; a0005f18: e3a00000 mov r0, #0 a0005f1c: 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 ]; a0005f20: e3a0300c mov r3, #12 a0005f24: e0040493 mul r4, r3, r4 a0005f28: e59f1044 ldr r1, [pc, #68] ; a0005f74 a0005f2c: e59f203c ldr r2, [pc, #60] ; a0005f70 a0005f30: e0813004 add r3, r1, r4 a0005f34: e791c004 ldr ip, [r1, r4] a0005f38: e9930003 ldmib r3, {r0, r1} a0005f3c: e0823004 add r3, r2, r4 a0005f40: e782c004 str ip, [r2, r4] a0005f44: e9830003 stmib r3, {r0, r1} a0005f48: 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; a0005f4c: e3a00000 mov r0, #0 a0005f50: e8bd8070 pop {r4, r5, r6, pc} a0005f54: e1a00005 mov r0, r5 <== NOT EXECUTED } a0005f58: 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 ); a0005f5c: eb0023cf bl a000eea0 <__errno> a0005f60: e3a03016 mov r3, #22 a0005f64: e5803000 str r3, [r0] a0005f68: e3e00000 mvn r0, #0 a0005f6c: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== a00084b4 : int sigwait( const sigset_t *set, int *sig ) { a00084b4: e92d4010 push {r4, lr} a00084b8: e1a04001 mov r4, r1 int status; status = sigtimedwait( set, NULL, NULL ); a00084bc: e3a01000 mov r1, #0 a00084c0: e1a02001 mov r2, r1 a00084c4: ebffff7f bl a00082c8 if ( status != -1 ) { a00084c8: e3700001 cmn r0, #1 a00084cc: 0a000004 beq a00084e4 if ( sig ) a00084d0: e3540000 cmp r4, #0 a00084d4: 0a000005 beq a00084f0 *sig = status; a00084d8: e5840000 str r0, [r4] return 0; a00084dc: e3a00000 mov r0, #0 a00084e0: e8bd8010 pop {r4, pc} } return errno; a00084e4: eb002328 bl a001118c <__errno> a00084e8: e5900000 ldr r0, [r0] a00084ec: e8bd8010 pop {r4, pc} status = sigtimedwait( set, NULL, NULL ); if ( status != -1 ) { if ( sig ) *sig = status; return 0; a00084f0: e1a00004 mov r0, r4 <== NOT EXECUTED } return errno; } a00084f4: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== a0003f94 : int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { a0003f94: e591203c ldr r2, [r1, #60] ; 0x3c a0003f98: e3a03ee7 mov r3, #3696 ; 0xe70 a0003f9c: e2833008 add r3, r3, #8 a0003fa0: e0023003 and r3, r2, r3 a0003fa4: e3530000 cmp r3, #0 /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { a0003fa8: e92d4030 push {r4, r5, lr} a0003fac: e1a04001 mov r4, r1 a0003fb0: 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)) { a0003fb4: 1a000001 bne a0003fc0 } else { i = iproc (c, tty); } return i; } a0003fb8: e8bd4030 pop {r4, r5, lr} rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); i = iproc (c, tty); rtems_semaphore_release (tty->osem); } else { i = iproc (c, tty); a0003fbc: eaffff7d b a0003db8 /* * 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); a0003fc0: e3a01000 mov r1, #0 a0003fc4: e1a02001 mov r2, r1 a0003fc8: e5940018 ldr r0, [r4, #24] a0003fcc: eb00054e bl a000550c i = iproc (c, tty); a0003fd0: e1a01004 mov r1, r4 a0003fd4: e1a00005 mov r0, r5 a0003fd8: ebffff76 bl a0003db8 a0003fdc: e1a05000 mov r5, r0 rtems_semaphore_release (tty->osem); a0003fe0: e5940018 ldr r0, [r4, #24] a0003fe4: eb000591 bl a0005630 } else { i = iproc (c, tty); } return i; } a0003fe8: e1a00005 mov r0, r5 a0003fec: e8bd8030 pop {r4, r5, pc} =============================================================================== a0005b90 : #include int unlink( const char *path ) { a0005b90: e92d40f0 push {r4, r5, r6, r7, lr} a0005b94: e24dd030 sub sp, sp, #48 ; 0x30 a0005b98: e1a07000 mov r7, r0 /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); a0005b9c: ebfff462 bl a0002d2c if ( parentpathlen == 0 ) a0005ba0: e2505000 subs r5, r0, #0 a0005ba4: 1a00003a bne a0005c94 rtems_filesystem_get_start_loc( path, &i, &parentloc ); a0005ba8: e28d4018 add r4, sp, #24 a0005bac: e1a00007 mov r0, r7 a0005bb0: e28d102c add r1, sp, #44 ; 0x2c a0005bb4: e1a02004 mov r2, r4 a0005bb8: ebfff87a bl a0003da8 const char *name; rtems_filesystem_location_info_t parentloc; rtems_filesystem_location_info_t loc; int i; int result; bool free_parentloc = false; a0005bbc: e1a06005 mov r6, r5 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; a0005bc0: e28dc004 add ip, sp, #4 a0005bc4: e1a0e004 mov lr, r4 a0005bc8: e8be000f ldm lr!, {r0, r1, r2, r3} a0005bcc: e8ac000f stmia ip!, {r0, r1, r2, r3} a0005bd0: e59e3000 ldr r3, [lr] name = path + parentpathlen; a0005bd4: e0875005 add r5, r7, r5 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); a0005bd8: e1a00005 mov r0, r5 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; a0005bdc: e58c3000 str r3, [ip] name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); a0005be0: eb00339d bl a0012a5c a0005be4: e1a01000 mov r1, r0 a0005be8: e1a00005 mov r0, r5 a0005bec: ebfff45d bl a0002d68 a0005bf0: e0857000 add r7, r5, r0 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), a0005bf4: e1a00007 mov r0, r7 a0005bf8: eb003397 bl a0012a5c a0005bfc: e28d5004 add r5, sp, #4 a0005c00: e1a01000 mov r1, r0 a0005c04: e3a02000 mov r2, #0 a0005c08: e1a00007 mov r0, r7 a0005c0c: e1a03005 mov r3, r5 a0005c10: e58d2000 str r2, [sp] a0005c14: ebfff412 bl a0002c64 0, &loc, false ); if ( result != 0 ) { a0005c18: e3500000 cmp r0, #0 a0005c1c: 1a000014 bne a0005c74 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return -1; } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { a0005c20: e59d3010 ldr r3, [sp, #16] a0005c24: e1a00005 mov r0, r5 a0005c28: e5933010 ldr r3, [r3, #16] a0005c2c: e12fff33 blx r3 a0005c30: e3500001 cmp r0, #1 a0005c34: 0a000022 beq a0005cc4 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( EISDIR ); } result = (*loc.ops->unlink_h)( &parentloc, &loc ); a0005c38: e59d3010 ldr r3, [sp, #16] a0005c3c: e1a01005 mov r1, r5 a0005c40: e1a00004 mov r0, r4 a0005c44: e593300c ldr r3, [r3, #12] a0005c48: e12fff33 blx r3 a0005c4c: e1a07000 mov r7, r0 rtems_filesystem_freenode( &loc ); a0005c50: e1a00005 mov r0, r5 a0005c54: ebfff458 bl a0002dbc if ( free_parentloc ) a0005c58: e3560000 cmp r6, #0 a0005c5c: 0a000001 beq a0005c68 rtems_filesystem_freenode( &parentloc ); a0005c60: e1a00004 mov r0, r4 a0005c64: ebfff454 bl a0002dbc return result; } a0005c68: e1a00007 mov r0, r7 a0005c6c: e28dd030 add sp, sp, #48 ; 0x30 a0005c70: 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 ) a0005c74: e3560000 cmp r6, #0 a0005c78: 1a000001 bne a0005c84 rtems_filesystem_freenode( &parentloc ); return -1; a0005c7c: e3e07000 mvn r7, #0 <== NOT EXECUTED a0005c80: eafffff8 b a0005c68 <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); a0005c84: e1a00004 mov r0, r4 a0005c88: ebfff44b bl a0002dbc return -1; a0005c8c: e3e07000 mvn r7, #0 a0005c90: eafffff4 b a0005c68 parentpathlen = rtems_filesystem_dirname ( path ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( path, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path( path, parentpathlen, a0005c94: e3a03000 mov r3, #0 a0005c98: e28d4018 add r4, sp, #24 a0005c9c: e58d3000 str r3, [sp] a0005ca0: e3a02002 mov r2, #2 a0005ca4: e1a00007 mov r0, r7 a0005ca8: e1a01005 mov r1, r5 a0005cac: e1a03004 mov r3, r4 a0005cb0: ebfff407 bl a0002cd4 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) a0005cb4: e3500000 cmp r0, #0 a0005cb8: 1affffef bne a0005c7c return -1; free_parentloc = true; a0005cbc: e3a06001 mov r6, #1 a0005cc0: eaffffbe b a0005bc0 rtems_filesystem_freenode( &parentloc ); return -1; } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); a0005cc4: e1a00005 mov r0, r5 a0005cc8: ebfff43b bl a0002dbc if ( free_parentloc ) a0005ccc: e3560000 cmp r6, #0 a0005cd0: 0a000001 beq a0005cdc rtems_filesystem_freenode( &parentloc ); a0005cd4: e1a00004 mov r0, r4 a0005cd8: ebfff437 bl a0002dbc rtems_set_errno_and_return_minus_one( EISDIR ); a0005cdc: eb002f9f bl a0011b60 <__errno> a0005ce0: e3a03015 mov r3, #21 a0005ce4: e5803000 str r3, [r0] a0005ce8: e3e07000 mvn r7, #0 a0005cec: eaffffdd b a0005c68 =============================================================================== a0005d2c : */ int unmount( const char *path ) { a0005d2c: e92d4070 push {r4, r5, r6, lr} a0005d30: e24dd018 sub sp, sp, #24 a0005d34: 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 ) ) a0005d38: eb002844 bl a000fe50 a0005d3c: e28d4004 add r4, sp, #4 a0005d40: e1a01000 mov r1, r0 a0005d44: e3a0c001 mov ip, #1 a0005d48: e1a00005 mov r0, r5 a0005d4c: e3a02000 mov r2, #0 a0005d50: e1a03004 mov r3, r4 a0005d54: e58dc000 str ip, [sp] a0005d58: ebfff33f bl a0002a5c a0005d5c: e3500000 cmp r0, #0 a0005d60: 1a00001a bne a0005dd0 return -1; mt_entry = loc.mt_entry; a0005d64: 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 ){ a0005d68: e59d3004 ldr r3, [sp, #4] a0005d6c: e595201c ldr r2, [r5, #28] a0005d70: e1520003 cmp r2, r3 a0005d74: 1a00002d bne a0005e30 /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); a0005d78: e1a00004 mov r0, r4 a0005d7c: ebfff370 bl a0002b44 * 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 ) a0005d80: e59f30f8 ldr r3, [pc, #248] ; a0005e80 a0005d84: e5933000 ldr r3, [r3] a0005d88: e5933014 ldr r3, [r3, #20] a0005d8c: e1530005 cmp r3, r5 a0005d90: 0a00002d beq a0005e4c /* * Verify there are no file systems below the path specified */ if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point, a0005d94: e59f00e8 ldr r0, [pc, #232] ; a0005e84 a0005d98: e595102c ldr r1, [r5, #44] ; 0x2c a0005d9c: ebfff5cc bl a00034d4 a0005da0: e3500000 cmp r0, #0 a0005da4: 1a000028 bne a0005e4c * 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 ) a0005da8: e1a00005 mov r0, r5 a0005dac: ebfff46c bl a0002f64 a0005db0: e3500001 cmp r0, #1 a0005db4: 0a000024 beq a0005e4c * 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 ) a0005db8: e5953014 ldr r3, [r5, #20] a0005dbc: e1a00005 mov r0, r5 a0005dc0: e5933028 ldr r3, [r3, #40] ; 0x28 a0005dc4: e12fff33 blx r3 a0005dc8: e2506000 subs r6, r0, #0 a0005dcc: 0a000002 beq a0005ddc */ 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; a0005dd0: e3e00000 mvn r0, #0 rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } a0005dd4: e28dd018 add sp, sp, #24 a0005dd8: 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){ a0005ddc: e5953028 ldr r3, [r5, #40] ; 0x28 a0005de0: e1a00005 mov r0, r5 a0005de4: e593302c ldr r3, [r3, #44] ; 0x2c a0005de8: e12fff33 blx r3 a0005dec: e2504000 subs r4, r0, #0 a0005df0: 1a00001a bne a0005e60 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 ); a0005df4: e59f608c ldr r6, [pc, #140] ; a0005e88 a0005df8: e1a01004 mov r1, r4 a0005dfc: e1a02004 mov r2, r4 a0005e00: e5960000 ldr r0, [r6] a0005e04: eb000294 bl a000685c */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); a0005e08: e1a00005 mov r0, r5 a0005e0c: eb0004f8 bl a00071f4 <_Chain_Extract> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); a0005e10: e5960000 ldr r0, [r6] a0005e14: eb0002d9 bl a0006980 /* * 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 ); a0005e18: e2850008 add r0, r5, #8 a0005e1c: ebfff348 bl a0002b44 free( mt_entry ); a0005e20: e1a00005 mov r0, r5 a0005e24: ebfff34b bl a0002b58 return 0; a0005e28: e1a00004 mov r0, r4 a0005e2c: eaffffe8 b a0005dd4 /* * 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 ); a0005e30: e1a00004 mov r0, r4 a0005e34: ebfff342 bl a0002b44 rtems_set_errno_and_return_minus_one( EACCES ); a0005e38: eb00228c bl a000e870 <__errno> a0005e3c: e3a0300d mov r3, #13 a0005e40: e5803000 str r3, [r0] a0005e44: e3e00000 mvn r0, #0 a0005e48: eaffffe1 b a0005dd4 * 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 ); a0005e4c: eb002287 bl a000e870 <__errno> a0005e50: e3a03010 mov r3, #16 a0005e54: e5803000 str r3, [r0] a0005e58: e3e00000 mvn r0, #0 a0005e5c: eaffffdc b a0005dd4 * 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 ) a0005e60: e5953014 ldr r3, [r5, #20] a0005e64: e1a00005 mov r0, r5 a0005e68: e5933020 ldr r3, [r3, #32] a0005e6c: e12fff33 blx r3 a0005e70: e3500000 cmp r0, #0 a0005e74: 0affffd5 beq a0005dd0 rtems_fatal_error_occurred( 0 ); a0005e78: e1a00006 mov r0, r6 <== NOT EXECUTED a0005e7c: eb000407 bl a0006ea0 <== NOT EXECUTED =============================================================================== a0004acc : */ void vprintk( const char *fmt, va_list ap ) { a0004acc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} a0004ad0: e1a0a000 mov sl, r0 for (; *fmt != '\0'; fmt++) { a0004ad4: e5d00000 ldrb r0, [r0] */ void vprintk( const char *fmt, va_list ap ) { a0004ad8: e24dd01c sub sp, sp, #28 a0004adc: e58d1004 str r1, [sp, #4] for (; *fmt != '\0'; fmt++) { a0004ae0: e3500000 cmp r0, #0 a0004ae4: 0a000072 beq a0004cb4 bool sign = false; char lead = ' '; char c; if (*fmt != '%') { BSP_output_char(*fmt); a0004ae8: e59f8370 ldr r8, [pc, #880] ; a0004e60 * console is not yet initialized or in ISR's. * * Arguments: * as in printf: fmt - format string, ... - unnamed arguments. */ void vprintk( a0004aec: e28db008 add fp, sp, #8 bool minus = false; bool sign = false; char lead = ' '; char c; if (*fmt != '%') { a0004af0: e3500025 cmp r0, #37 ; 0x25 a0004af4: 1a000070 bne a0004cbc BSP_output_char(*fmt); continue; } fmt++; if (*fmt == '0' ) { a0004af8: e5fa0001 ldrb r0, [sl, #1]! a0004afc: e3500030 cmp r0, #48 ; 0x30 lead = '0'; fmt++; a0004b00: 05fa0001 ldrbeq r0, [sl, #1]! BSP_output_char(*fmt); continue; } fmt++; if (*fmt == '0' ) { lead = '0'; a0004b04: 03a01030 moveq r1, #48 ; 0x30 unsigned base = 0; unsigned width = 0; bool lflag = false; bool minus = false; bool sign = false; char lead = ' '; a0004b08: 13a02020 movne r2, #32 BSP_output_char(*fmt); continue; } fmt++; if (*fmt == '0' ) { lead = '0'; a0004b0c: 058d1000 streq r1, [sp] unsigned base = 0; unsigned width = 0; bool lflag = false; bool minus = false; bool sign = false; char lead = ' '; a0004b10: 158d2000 strne r2, [sp] fmt++; if (*fmt == '0' ) { lead = '0'; fmt++; } if (*fmt == '-' ) { a0004b14: e350002d cmp r0, #45 ; 0x2d minus = true; fmt++; a0004b18: 05fa0001 ldrbeq r0, [sl, #1]! if (*fmt == '0' ) { lead = '0'; fmt++; } if (*fmt == '-' ) { minus = true; a0004b1c: 03a07001 moveq r7, #1 { for (; *fmt != '\0'; fmt++) { unsigned base = 0; unsigned width = 0; bool lflag = false; bool minus = false; a0004b20: 13a07000 movne r7, #0 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { a0004b24: e2403030 sub r3, r0, #48 ; 0x30 a0004b28: e3530009 cmp r3, #9 a0004b2c: 83a05000 movhi r5, #0 a0004b30: 8a000009 bhi a0004b5c * console is not yet initialized or in ISR's. * * Arguments: * as in printf: fmt - format string, ... - unnamed arguments. */ void vprintk( a0004b34: e28a3001 add r3, sl, #1 a0004b38: e3a05000 mov r5, #0 minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { width *= 10; width += ((unsigned) *fmt - '0'); a0004b3c: e3a0100a mov r1, #10 a0004b40: e0250591 mla r5, r1, r5, r0 a0004b44: e1a0a003 mov sl, r3 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { a0004b48: e4d30001 ldrb r0, [r3], #1 width *= 10; width += ((unsigned) *fmt - '0'); a0004b4c: e2455030 sub r5, r5, #48 ; 0x30 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { a0004b50: e2402030 sub r2, r0, #48 ; 0x30 a0004b54: e3520009 cmp r2, #9 a0004b58: 9afffff7 bls a0004b3c width *= 10; width += ((unsigned) *fmt - '0'); fmt++; } if ((c = *fmt) == 'l') { a0004b5c: e350006c cmp r0, #108 ; 0x6c lflag = true; c = *++fmt; a0004b60: 05fa0001 ldrbeq r0, [sl, #1]! width += ((unsigned) *fmt - '0'); fmt++; } if ((c = *fmt) == 'l') { lflag = true; a0004b64: 03a03001 moveq r3, #1 ) { for (; *fmt != '\0'; fmt++) { unsigned base = 0; unsigned width = 0; bool lflag = false; a0004b68: 13a03000 movne r3, #0 if ((c = *fmt) == 'l') { lflag = true; c = *++fmt; } if ( c == 'c' ) { a0004b6c: e3500063 cmp r0, #99 ; 0x63 a0004b70: 0a000098 beq a0004dd8 /* 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' ) { a0004b74: e3500073 cmp r0, #115 ; 0x73 a0004b78: 0a00005a beq a0004ce8 continue; } /* must be a numeric format or something unsupported */ if ( c == 'o' || c == 'O' ) { a0004b7c: e350006f cmp r0, #111 ; 0x6f a0004b80: 1350004f cmpne r0, #79 ; 0x4f base = 8; sign = false; a0004b84: 03a02000 moveq r2, #0 a0004b88: 03a09008 moveq r9, #8 continue; } /* must be a numeric format or something unsupported */ if ( c == 'o' || c == 'O' ) { a0004b8c: 0a000009 beq a0004bb8 base = 8; sign = false; } else if ( c == 'i' || c == 'I' || a0004b90: e3500069 cmp r0, #105 ; 0x69 a0004b94: 13500049 cmpne r0, #73 ; 0x49 a0004b98: 0a000004 beq a0004bb0 c == 'd' || c == 'D' ) { a0004b9c: e3500064 cmp r0, #100 ; 0x64 a0004ba0: 13500044 cmpne r0, #68 ; 0x44 a0004ba4: 13a02000 movne r2, #0 a0004ba8: 03a02001 moveq r2, #1 a0004bac: 1a000093 bne a0004e00 base = 10; sign = true; a0004bb0: e3a02001 mov r2, #1 a0004bb4: e3a0900a mov r9, #10 } else { BSP_output_char(c); continue; } printNum( a0004bb8: e3530000 cmp r3, #0 a0004bbc: 0a000044 beq a0004cd4 a0004bc0: e59d1004 ldr r1, [sp, #4] a0004bc4: e5917000 ldr r7, [r1] lflag ? va_arg(ap, long) : (long) va_arg(ap, int), a0004bc8: e2811004 add r1, r1, #4 a0004bcc: e58d1004 str r1, [sp, #4] unsigned long unsigned_num; unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { a0004bd0: e3520000 cmp r2, #0 a0004bd4: 0a000001 beq a0004be0 a0004bd8: e3570000 cmp r7, #0 a0004bdc: ba000098 blt a0004e44 } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { a0004be0: e1a00007 mov r0, r7 a0004be4: e1a01009 mov r1, r9 a0004be8: eb00316a bl a0011198 <__aeabi_uidiv> a0004bec: e3500000 cmp r0, #0 a0004bf0: e1a04000 mov r4, r0 a0004bf4: e1a06000 mov r6, r0 a0004bf8: 01a04007 moveq r4, r7 a0004bfc: 03a07001 moveq r7, #1 a0004c00: 0a000010 beq a0004c48 a0004c04: e20930ff and r3, r9, #255 ; 0xff a0004c08: e1a02007 mov r2, r7 if (maxwidth) maxwidth--; } else { unsigned_num = (unsigned long) num; } count = 0; a0004c0c: e3a06000 mov r6, #0 a0004c10: e1a07003 mov r7, r3 a0004c14: ea000001 b a0004c20 while ((n = unsigned_num / base) > 0) { a0004c18: e1a02004 mov r2, r4 a0004c1c: e1a04000 mov r4, r0 toPrint[count++] = (char) (unsigned_num - (n * base)); a0004c20: e0030794 mul r3, r4, r7 } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { a0004c24: e1a00004 mov r0, r4 toPrint[count++] = (char) (unsigned_num - (n * base)); a0004c28: e0633002 rsb r3, r3, r2 a0004c2c: e7cb3006 strb r3, [fp, r6] } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { a0004c30: e1a01009 mov r1, r9 a0004c34: eb003157 bl a0011198 <__aeabi_uidiv> a0004c38: e3500000 cmp r0, #0 toPrint[count++] = (char) (unsigned_num - (n * base)); a0004c3c: e2866001 add r6, r6, #1 } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { a0004c40: 1afffff4 bne a0004c18 a0004c44: e2867001 add r7, r6, #1 toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; a0004c48: e28d101c add r1, sp, #28 a0004c4c: e0816006 add r6, r1, r6 for (n=maxwidth ; n > count; n-- ) a0004c50: e1570005 cmp r7, r5 count = 0; while ((n = unsigned_num / base) > 0) { toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; a0004c54: e5464014 strb r4, [r6, #-20] for (n=maxwidth ; n > count; n-- ) a0004c58: 2a000006 bcs a0004c78 a0004c5c: e59d4000 ldr r4, [sp] BSP_output_char(lead); a0004c60: e5983000 ldr r3, [r8] a0004c64: e1a00004 mov r0, r4 toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) a0004c68: e2455001 sub r5, r5, #1 BSP_output_char(lead); a0004c6c: e12fff33 blx r3 toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) a0004c70: e1570005 cmp r7, r5 a0004c74: 3afffff9 bcc a0004c60 BSP_output_char(lead); for (n = 0; n < count; n++) { a0004c78: e3570000 cmp r7, #0 a0004c7c: 0a000009 beq a0004ca8 * console is not yet initialized or in ISR's. * * Arguments: * as in printf: fmt - format string, ... - unnamed arguments. */ void vprintk( a0004c80: e08b5007 add r5, fp, r7 a0004c84: 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)])]); a0004c88: e5752001 ldrb r2, [r5, #-1]! a0004c8c: e59f11d0 ldr r1, [pc, #464] ; a0004e64 a0004c90: e5983000 ldr r3, [r8] toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { a0004c94: e2844001 add r4, r4, #1 BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); a0004c98: e7d10002 ldrb r0, [r1, r2] a0004c9c: e12fff33 blx r3 toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { a0004ca0: e1570004 cmp r7, r4 a0004ca4: 8afffff7 bhi a0004c88 void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { a0004ca8: e5fa0001 ldrb r0, [sl, #1]! a0004cac: e3500000 cmp r0, #0 a0004cb0: 1affff8e bne a0004af0 sign, width, lead ); } } a0004cb4: e28dd01c add sp, sp, #28 a0004cb8: 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); a0004cbc: e5983000 ldr r3, [r8] a0004cc0: e12fff33 blx r3 void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { a0004cc4: e5fa0001 ldrb r0, [sl, #1]! a0004cc8: e3500000 cmp r0, #0 a0004ccc: 1affff87 bne a0004af0 a0004cd0: eafffff7 b a0004cb4 } else { BSP_output_char(c); continue; } printNum( a0004cd4: e59d3004 ldr r3, [sp, #4] a0004cd8: e5937000 ldr r7, [r3] lflag ? va_arg(ap, long) : (long) va_arg(ap, int), a0004cdc: e2833004 add r3, r3, #4 a0004ce0: e58d3004 str r3, [sp, #4] a0004ce4: eaffffb9 b a0004bd0 } if ( c == 's' ) { unsigned i, len; char *s, *str; str = va_arg(ap, char *); a0004ce8: e59d3004 ldr r3, [sp, #4] if ( str == NULL ) { str = ""; a0004cec: e59f2174 ldr r2, [pc, #372] ; a0004e68 } if ( c == 's' ) { unsigned i, len; char *s, *str; str = va_arg(ap, char *); a0004cf0: e59d1004 ldr r1, [sp, #4] a0004cf4: e5933000 ldr r3, [r3] a0004cf8: e2819004 add r9, r1, #4 if ( str == NULL ) { str = ""; a0004cfc: e3530000 cmp r3, #0 a0004d00: 01a03002 moveq r3, r2 a0004d04: e58d3000 str r3, [sp] } /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) a0004d08: e5d34000 ldrb r4, [r3] a0004d0c: e3540000 cmp r4, #0 a0004d10: 0a000004 beq a0004d28 a0004d14: e3a04000 mov r4, #0 a0004d18: e5f32001 ldrb r2, [r3, #1]! a0004d1c: e2844001 add r4, r4, #1 a0004d20: e3520000 cmp r2, #0 a0004d24: 1afffffb bne a0004d18 ; /* leading spaces */ if ( !minus ) a0004d28: e3570000 cmp r7, #0 a0004d2c: 1a000008 bne a0004d54 for ( i=len ; i a0004d38: e1a06004 mov r6, r4 BSP_output_char(' '); a0004d3c: e5983000 ldr r3, [r8] a0004d40: e3a00020 mov r0, #32 for ( len=0, s=str ; *s ; len++, s++ ) ; /* leading spaces */ if ( !minus ) for ( i=len ; i BSP_output_char(' '); /* no width option */ if (width == 0) { a0004d54: e3550000 cmp r5, #0 a0004d58: 1a000002 bne a0004d68 width = len; } /* output the string */ for ( i=0 ; i a0004d64: e1a05004 mov r5, r4 a0004d68: e59d3000 ldr r3, [sp] a0004d6c: e5d30000 ldrb r0, [r3] a0004d70: e3500000 cmp r0, #0 a0004d74: 0a000008 beq a0004d9c BSP_output_char(*str); a0004d78: e5983000 ldr r3, [r8] a0004d7c: e12fff33 blx r3 a0004d80: e59d6000 ldr r6, [sp] a0004d84: ea000001 b a0004d90 a0004d88: e5983000 ldr r3, [r8] a0004d8c: e12fff33 blx r3 if (width == 0) { width = len; } /* output the string */ for ( i=0 ; i BSP_output_char(*str); /* trailing spaces */ if ( minus ) a0004d9c: e3570000 cmp r7, #0 a0004da0: 0a000007 beq a0004dc4 for ( i=len ; i BSP_output_char(' '); a0004dac: e5983000 ldr r3, [r8] a0004db0: e3a00020 mov r0, #32 for ( i=0 ; i } if ( c == 's' ) { unsigned i, len; char *s, *str; str = va_arg(ap, char *); a0004dc4: e58d9004 str r9, [sp, #4] void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { a0004dc8: e5fa0001 ldrb r0, [sl, #1]! a0004dcc: e3500000 cmp r0, #0 a0004dd0: 1affff46 bne a0004af0 a0004dd4: eaffffb6 b a0004cb4 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); a0004dd8: e59d2004 ldr r2, [sp, #4] BSP_output_char(chr); a0004ddc: e5983000 ldr r3, [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); a0004de0: e2824004 add r4, r2, #4 BSP_output_char(chr); a0004de4: e5d20000 ldrb r0, [r2] a0004de8: e12fff33 blx r3 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); a0004dec: e58d4004 str r4, [sp, #4] void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { a0004df0: e5fa0001 ldrb r0, [sl, #1]! a0004df4: e3500000 cmp r0, #0 a0004df8: 1affff3c bne a0004af0 a0004dfc: eaffffac b a0004cb4 <== 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' ) { a0004e00: e3500075 cmp r0, #117 ; 0x75 a0004e04: 13500055 cmpne r0, #85 ; 0x55 a0004e08: 13a01000 movne r1, #0 a0004e0c: 03a01001 moveq r1, #1 base = 10; sign = false; a0004e10: 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' ) { a0004e14: 0affff67 beq a0004bb8 base = 10; sign = false; } else if ( c == 'x' || c == 'X' ) { a0004e18: e3500078 cmp r0, #120 ; 0x78 a0004e1c: 13500058 cmpne r0, #88 ; 0x58 a0004e20: 13a02000 movne r2, #0 a0004e24: 03a02001 moveq r2, #1 base = 16; sign = false; a0004e28: 03a09010 moveq r9, #16 a0004e2c: 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' ) { a0004e30: 0affff60 beq a0004bb8 base = 16; sign = false; } else if ( c == 'p' ) { a0004e34: e3500070 cmp r0, #112 ; 0x70 a0004e38: 1affff9f bne a0004cbc base = 16; sign = false; lflag = true; a0004e3c: e3a09010 mov r9, #16 a0004e40: eaffff5e b a0004bc0 unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { BSP_output_char('-'); a0004e44: e5983000 ldr r3, [r8] a0004e48: e3a0002d mov r0, #45 ; 0x2d a0004e4c: e12fff33 blx r3 unsigned_num = (unsigned long) -num; if (maxwidth) maxwidth--; a0004e50: e3550000 cmp r5, #0 unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { BSP_output_char('-'); unsigned_num = (unsigned long) -num; a0004e54: e2677000 rsb r7, r7, #0 if (maxwidth) maxwidth--; a0004e58: 12455001 subne r5, r5, #1 a0004e5c: eaffff5f b a0004be0 =============================================================================== a000632c : int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); a000632c: e59f315c ldr r3, [pc, #348] ; a0006490 ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { a0006330: 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 ); a0006334: e5933000 ldr r3, [r3] ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { a0006338: e1a05002 mov r5, r2 int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); a000633c: e1500003 cmp r0, r3 a0006340: 2a00004b bcs a0006474 iop = rtems_libio_iop( fd ); a0006344: e59f3148 ldr r3, [pc, #328] ; a0006494 a0006348: e3a08038 mov r8, #56 ; 0x38 a000634c: e5933000 ldr r3, [r3] a0006350: e0283890 mla r8, r0, r8, r3 rtems_libio_check_is_open( iop ); a0006354: e5983014 ldr r3, [r8, #20] a0006358: e3130c01 tst r3, #256 ; 0x100 a000635c: 0a000044 beq a0006474 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); a0006360: e3130004 tst r3, #4 a0006364: 0a00003c beq a000645c /* * Argument validation on IO vector */ if ( !iov ) a0006368: e3510000 cmp r1, #0 a000636c: 0a00003a beq a000645c rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) a0006370: e3520000 cmp r2, #0 a0006374: da000038 ble a000645c rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) a0006378: e3520b01 cmp r2, #1024 ; 0x400 a000637c: ca000036 bgt a000645c rtems_set_errno_and_return_minus_one( EINVAL ); a0006380: e1a04001 mov r4, r1 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) a0006384: e3a0cc7f mov ip, #32512 ; 0x7f00 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) a0006388: e3a01000 mov r1, #0 a000638c: e1a02004 mov r2, r4 a0006390: e3a06001 mov r6, #1 a0006394: e1a07001 mov r7, r1 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) a0006398: e28cc0ff add ip, ip, #255 ; 0xff a000639c: ea000000 b a00063a4 if ( iov[v].iov_len ) all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; a00063a0: e1a07003 mov r7, r3 /* * iov[v].iov_len cannot be less than 0 because size_t is unsigned. * So we only check for zero. */ if ( iov[v].iov_base == 0 ) a00063a4: 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++ ) { a00063a8: e2811001 add r1, r1, #1 /* * iov[v].iov_len cannot be less than 0 because size_t is unsigned. * So we only check for zero. */ if ( iov[v].iov_base == 0 ) a00063ac: e3530000 cmp r3, #0 a00063b0: 0a000029 beq a000645c rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) a00063b4: 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++ ) { a00063b8: e2822008 add r2, r2, #8 if ( iov[v].iov_len ) all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; a00063bc: e0873000 add r3, r7, r0 */ if ( iov[v].iov_base == 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) all_zeros = false; a00063c0: e3500000 cmp r0, #0 a00063c4: 13a06000 movne r6, #0 /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) a00063c8: e1570003 cmp r7, r3 a00063cc: d153000c cmple r3, ip a00063d0: d3a07000 movle r7, #0 a00063d4: c3a07001 movgt r7, #1 a00063d8: ca00001f bgt a000645c * 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++ ) { a00063dc: e1550001 cmp r5, r1 a00063e0: caffffee bgt a00063a0 } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { a00063e4: e3560000 cmp r6, #0 a00063e8: 1a00001f bne a000646c a00063ec: e1a07006 mov r7, r6 a00063f0: ea000003 b a0006404 } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { a00063f4: e2866001 add r6, r6, #1 a00063f8: e1550006 cmp r5, r6 a00063fc: e2844008 add r4, r4, #8 a0006400: da000019 ble a000646c /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) a0006404: e5942004 ldr r2, [r4, #4] a0006408: e3520000 cmp r2, #0 a000640c: 0afffff8 beq a00063f4 continue; bytes = (*iop->pathinfo.handlers->write_h)( a0006410: e5983020 ldr r3, [r8, #32] a0006414: e5941000 ldr r1, [r4] a0006418: e1a00008 mov r0, r8 a000641c: e593300c ldr r3, [r3, #12] a0006420: e12fff33 blx r3 iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) a0006424: e3500000 cmp r0, #0 a0006428: ba000016 blt a0006488 return -1; if ( bytes > 0 ) { a000642c: 0a000006 beq a000644c iop->offset += bytes; a0006430: e288300c add r3, r8, #12 a0006434: e893000c ldm r3, {r2, r3} a0006438: e0922000 adds r2, r2, r0 a000643c: e0a33fc0 adc r3, r3, r0, asr #31 a0006440: e588200c str r2, [r8, #12] a0006444: e5883010 str r3, [r8, #16] total += bytes; a0006448: e0877000 add r7, r7, r0 } if (bytes != iov[ v ].iov_len) a000644c: e5943004 ldr r3, [r4, #4] a0006450: e1500003 cmp r0, r3 a0006454: 0affffe6 beq a00063f4 a0006458: ea000003 b a000646c <== 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 ); a000645c: eb0021e2 bl a000ebec <__errno> a0006460: e3a03016 mov r3, #22 a0006464: e5803000 str r3, [r0] a0006468: e3e07000 mvn r7, #0 if (bytes != iov[ v ].iov_len) break; } return total; } a000646c: e1a00007 mov r0, r7 a0006470: 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 ); a0006474: eb0021dc bl a000ebec <__errno> a0006478: e3a03009 mov r3, #9 a000647c: e5803000 str r3, [r0] a0006480: e3e07000 mvn r7, #0 a0006484: eafffff8 b a000646c iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) return -1; a0006488: e3e07000 mvn r7, #0 <== NOT EXECUTED a000648c: eafffff6 b a000646c <== NOT EXECUTED