=============================================================================== 0000893c : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 893c: e5902000 ldr r2, [r0] 8940: e592204c ldr r2, [r2, #76] ; 0x4c ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 8944: e5903010 ldr r3, [r0, #16] switch( node->type ) { 8948: e2422001 sub r2, r2, #1 ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 894c: e5933034 ldr r3, [r3, #52] ; 0x34 switch( node->type ) { 8950: e3520006 cmp r2, #6 8954: 979ff102 ldrls pc, [pc, r2, lsl #2] 8958: ea000010 b 89a0 <== NOT EXECUTED 895c: 00008978 .word 0x00008978 <== NOT EXECUTED 8960: 00008980 .word 0x00008980 <== NOT EXECUTED 8964: 00008988 .word 0x00008988 <== NOT EXECUTED 8968: 00008988 .word 0x00008988 <== NOT EXECUTED 896c: 00008990 .word 0x00008990 <== NOT EXECUTED 8970: 00008990 .word 0x00008990 <== NOT EXECUTED 8974: 00008998 .word 0x00008998 <== NOT EXECUTED case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 8978: e593300c ldr r3, [r3, #12] 897c: ea000006 b 899c break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 8980: e59f3020 ldr r3, [pc, #32] ; 89a8 8984: ea000004 b 899c break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 8988: e59f301c ldr r3, [pc, #28] ; 89ac 898c: ea000002 b 899c break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 8990: e5933008 ldr r3, [r3, #8] 8994: ea000000 b 899c break; case IMFS_FIFO: loc->handlers = fs_info->fifo_handlers; 8998: e5933010 ldr r3, [r3, #16] 899c: e5803008 str r3, [r0, #8] break; } return 0; } 89a0: e3a00000 mov r0, #0 89a4: e12fff1e bx lr =============================================================================== 00008a64 : const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 8a64: 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 ) ) { 8a68: e3d27007 bics r7, r2, #7 const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 8a6c: e24dd040 sub sp, sp, #64 ; 0x40 8a70: e58d0000 str r0, [sp] 8a74: e1a06001 mov r6, r1 8a78: e1a08002 mov r8, r2 8a7c: e1a04003 mov r4, r3 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 8a80: 05935000 ldreq r5, [r3] rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { int i = 0; int len; IMFS_token_types type = IMFS_CURRENT_DIR; 8a84: 03a09001 moveq r9, #1 * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 8a88: 028da004 addeq sl, sp, #4 char token[ IMFS_NAME_MAX + 1 ]; rtems_filesystem_location_info_t newloc; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { 8a8c: 0a000057 beq 8bf0 rtems_set_errno_and_return_minus_one( EIO ); 8a90: eb001014 bl cae8 <__errno> <== NOT EXECUTED 8a94: e3a03005 mov r3, #5 <== NOT EXECUTED 8a98: ea00007e b 8c98 <== NOT EXECUTED * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 8a9c: e59d2000 ldr r2, [sp] 8aa0: e28d303c add r3, sp, #60 ; 0x3c 8aa4: e0820007 add r0, r2, r7 8aa8: e1a01006 mov r1, r6 8aac: e1a0200a mov r2, sl 8ab0: eb0001ae bl 9170 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 8ab4: e5943000 ldr r3, [r4] 8ab8: e3530000 cmp r3, #0 * 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 ); 8abc: e1a09000 mov r9, r0 pathnamelen -= len; 8ac0: e59db03c ldr fp, [sp, #60] ; 0x3c i += len; if ( !pathloc->node_access ) 8ac4: 0a000041 beq 8bd0 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 8ac8: e3500000 cmp r0, #0 8acc: 0a000006 beq 8aec if ( node->type == IMFS_DIRECTORY ) 8ad0: e595104c ldr r1, [r5, #76] ; 0x4c 8ad4: e3510001 cmp r1, #1 8ad8: 1a000003 bne 8aec if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 8adc: e1a00004 mov r0, r4 8ae0: ebffffb2 bl 89b0 8ae4: e3500000 cmp r0, #0 8ae8: 0a000068 beq 8c90 rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 8aec: e3590003 cmp r9, #3 */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 8af0: e06b6006 rsb r6, fp, r6 i += len; 8af4: 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; 8af8: e5945000 ldr r5, [r4] switch( type ) { 8afc: 0a000014 beq 8b54 8b00: e3590004 cmp r9, #4 8b04: 0a000036 beq 8be4 8b08: e3590002 cmp r9, #2 8b0c: 1a000037 bne 8bf0 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 8b10: e59fc194 ldr ip, [pc, #404] ; 8cac 8b14: e59c3000 ldr r3, [ip] 8b18: e5933018 ldr r3, [r3, #24] 8b1c: e1550003 cmp r5, r3 8b20: 0a000032 beq 8bf0 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 8b24: e594e010 ldr lr, [r4, #16] /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 8b28: e59e301c ldr r3, [lr, #28] 8b2c: e1550003 cmp r5, r3 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 8b30: 028dc028 addeq ip, sp, #40 ; 0x28 8b34: 028ee008 addeq lr, lr, #8 8b38: 0a000037 beq 8c1c pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 8b3c: e5955008 ldr r5, [r5, #8] 8b40: e3550000 cmp r5, #0 8b44: 1a000024 bne 8bdc rtems_set_errno_and_return_minus_one( ENOENT ); 8b48: eb000fe6 bl cae8 <__errno> 8b4c: e5809000 str r9, [r0] 8b50: ea000051 b 8c9c case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 8b54: e595304c ldr r3, [r5, #76] ; 0x4c 8b58: e3530003 cmp r3, #3 8b5c: 1a000004 bne 8b74 IMFS_evaluate_hard_link( pathloc, 0 ); 8b60: e1a00004 mov r0, r4 8b64: e3a01000 mov r1, #0 8b68: ebffffaa bl 8a18 node = pathloc->node_access; 8b6c: e5945000 ldr r5, [r4] 8b70: ea000008 b 8b98 * It would be a design error if we evaluated the link and * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { 8b74: e3530004 cmp r3, #4 8b78: 1a000006 bne 8b98 result = IMFS_evaluate_sym_link( pathloc, 0 ); 8b7c: e1a00004 mov r0, r4 8b80: e3a01000 mov r1, #0 8b84: eb000049 bl 8cb0 /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; if ( result == -1 ) 8b88: e3700001 cmn r0, #1 * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); 8b8c: e1a0b000 mov fp, r0 /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; 8b90: e5945000 ldr r5, [r4] if ( result == -1 ) 8b94: 0a000041 beq 8ca0 } /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 8b98: e595304c ldr r3, [r5, #76] ; 0x4c 8b9c: e3530001 cmp r3, #1 8ba0: 0a000002 beq 8bb0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 8ba4: eb000fcf bl cae8 <__errno> 8ba8: e3a03014 mov r3, #20 8bac: ea000039 b 8c98 /* * 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 ) { 8bb0: e595e05c ldr lr, [r5, #92] ; 0x5c 8bb4: e35e0000 cmp lr, #0 8bb8: 1a000015 bne 8c14 } /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 8bbc: e1a00005 mov r0, r5 8bc0: e1a0100a mov r1, sl 8bc4: eb000149 bl 90f0 if ( !node ) 8bc8: e2505000 subs r5, r0, #0 8bcc: 1a000002 bne 8bdc rtems_set_errno_and_return_minus_one( ENOENT ); 8bd0: eb000fc4 bl cae8 <__errno> 8bd4: e3a03002 mov r3, #2 8bd8: ea00002e b 8c98 /* * Set the node access to the point we have found. */ pathloc->node_access = node; 8bdc: e5845000 str r5, [r4] 8be0: ea000002 b 8bf0 case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 8be4: eb000fbf bl cae8 <__errno> 8be8: e3a0305b mov r3, #91 ; 0x5b 8bec: ea000029 b 8c98 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 8bf0: e3590004 cmp r9, #4 8bf4: 13590000 cmpne r9, #0 8bf8: 1affffa7 bne 8a9c * 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 ) { 8bfc: e595304c ldr r3, [r5, #76] ; 0x4c 8c00: e3530001 cmp r3, #1 8c04: 1a000019 bne 8c70 if ( node->info.directory.mt_fs != NULL ) { 8c08: e595e05c ldr lr, [r5, #92] ; 0x5c 8c0c: e35e0000 cmp lr, #0 8c10: 0a000016 beq 8c70 newloc = node->info.directory.mt_fs->mt_fs_root; 8c14: e28dc028 add ip, sp, #40 ; 0x28 8c18: e28ee01c add lr, lr, #28 8c1c: e8be000f ldm lr!, {r0, r1, r2, r3} 8c20: e8ac000f stmia ip!, {r0, r1, r2, r3} 8c24: e59ee000 ldr lr, [lr] 8c28: e58ce000 str lr, [ip] *pathloc = newloc; 8c2c: e28dc028 add ip, sp, #40 ; 0x28 8c30: e8bc000f ldm ip!, {r0, r1, r2, r3} 8c34: e1a0c004 mov ip, r4 8c38: e8ac000f stmia ip!, {r0, r1, r2, r3} return (*pathloc->ops->evalpath_h)( &pathname[i-len], 8c3c: e59d103c ldr r1, [sp, #60] ; 0x3c 8c40: e59d2000 ldr r2, [sp] */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 8c44: e58ce000 str lr, [ip] return (*pathloc->ops->evalpath_h)( &pathname[i-len], 8c48: e0610007 rsb r0, r1, r7 8c4c: e0820000 add r0, r2, r0 8c50: e594c00c ldr ip, [r4, #12] 8c54: e0861001 add r1, r6, r1 8c58: e1a02008 mov r2, r8 8c5c: e1a03004 mov r3, r4 8c60: e1a0e00f mov lr, pc 8c64: e59cf000 ldr pc, [ip] 8c68: e1a0b000 mov fp, r0 8c6c: ea00000b b 8ca0 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 8c70: e1a00004 mov r0, r4 8c74: ebffff30 bl 893c /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 8c78: e1a01008 mov r1, r8 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 8c7c: e1a0b000 mov fp, r0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 8c80: e1a00004 mov r0, r4 8c84: ebffff49 bl 89b0 8c88: e3500000 cmp r0, #0 8c8c: 1a000003 bne 8ca0 rtems_set_errno_and_return_minus_one( EACCES ); 8c90: eb000f94 bl cae8 <__errno> 8c94: e3a0300d mov r3, #13 8c98: e5803000 str r3, [r0] 8c9c: e3e0b000 mvn fp, #0 return result; } 8ca0: e1a0000b mov r0, fp 8ca4: e28dd040 add sp, sp, #64 ; 0x40 8ca8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 00008dec : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 8dec: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8df0: e24dd03c sub sp, sp, #60 ; 0x3c 8df4: e1a07000 mov r7, r0 8df8: e1a04001 mov r4, r1 8dfc: e1a0a002 mov sl, r2 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 8e00: e5916000 ldr r6, [r1] /* * Get the path length. */ pathlen = strlen( path ); 8e04: eb001321 bl da90 const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { int i = 0; 8e08: e3a05000 mov r5, #0 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 8e0c: e1a08000 mov r8, r0 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 8e10: e1a01008 mov r1, r8 8e14: e28d3038 add r3, sp, #56 ; 0x38 8e18: e0870005 add r0, r7, r5 8e1c: e1a0200d mov r2, sp 8e20: eb0000d2 bl 9170 pathlen -= len; i += len; if ( !pathloc->node_access ) 8e24: e5943000 ldr r3, [r4] */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; 8e28: e59db038 ldr fp, [sp, #56] ; 0x38 i += len; if ( !pathloc->node_access ) 8e2c: e3530000 cmp r3, #0 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 8e30: e1a09000 mov r9, r0 pathlen -= len; 8e34: e06b8008 rsb r8, fp, r8 i += len; if ( !pathloc->node_access ) 8e38: 0a000060 beq 8fc0 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 8e3c: e3500000 cmp r0, #0 8e40: 0a000006 beq 8e60 if ( node->type == IMFS_DIRECTORY ) 8e44: e596104c ldr r1, [r6, #76] ; 0x4c 8e48: e3510001 cmp r1, #1 8e4c: 1a000003 bne 8e60 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 8e50: e1a00004 mov r0, r4 8e54: ebfffed5 bl 89b0 8e58: e3500000 cmp r0, #0 8e5c: 0a00006c beq 9014 rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 8e60: e5943000 ldr r3, [r4] while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; 8e64: e085500b add r5, r5, fp if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 8e68: e1a06003 mov r6, r3 switch( type ) { 8e6c: e3590004 cmp r9, #4 8e70: 979ff109 ldrls pc, [pc, r9, lsl #2] 8e74: eaffffe5 b 8e10 <== NOT EXECUTED 8e78: 00008f84 .word 0x00008f84 <== NOT EXECUTED 8e7c: 00008e10 .word 0x00008e10 <== NOT EXECUTED 8e80: 00008e8c .word 0x00008e8c <== NOT EXECUTED 8e84: 00008ec8 .word 0x00008ec8 <== NOT EXECUTED 8e88: 00008f90 .word 0x00008f90 <== NOT EXECUTED case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 8e8c: e59f119c ldr r1, [pc, #412] ; 9030 8e90: e5912000 ldr r2, [r1] 8e94: e5922018 ldr r2, [r2, #24] 8e98: e1530002 cmp r3, r2 8e9c: 0affffdb beq 8e10 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 8ea0: e594e010 ldr lr, [r4, #16] 8ea4: e59e201c ldr r2, [lr, #28] 8ea8: e1530002 cmp r3, r2 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 8eac: 028dc024 addeq ip, sp, #36 ; 0x24 8eb0: 028ee008 addeq lr, lr, #8 8eb4: 0a000019 beq 8f20 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 8eb8: e5936008 ldr r6, [r3, #8] 8ebc: e3560000 cmp r6, #0 8ec0: 1a00002d bne 8f7c 8ec4: ea00003d b 8fc0 pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 8ec8: e593304c ldr r3, [r3, #76] ; 0x4c 8ecc: e3530003 cmp r3, #3 8ed0: 0a000001 beq 8edc result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 8ed4: e3530004 cmp r3, #4 8ed8: 1a000005 bne 8ef4 result = IMFS_evaluate_link( pathloc, 0 ); 8edc: e1a00004 mov r0, r4 8ee0: e3a01000 mov r1, #0 8ee4: ebffff93 bl 8d38 if ( result == -1 ) 8ee8: e3700001 cmn r0, #1 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 8eec: e1a06000 mov r6, r0 if ( result == -1 ) 8ef0: 0a00004b beq 9024 return -1; } node = pathloc->node_access; 8ef4: e5940000 ldr r0, [r4] if ( !node ) 8ef8: e3500000 cmp r0, #0 8efc: 0a00003c beq 8ff4 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 8f00: e590304c ldr r3, [r0, #76] ; 0x4c 8f04: e3530001 cmp r3, #1 8f08: 1a000039 bne 8ff4 /* * 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 ) { 8f0c: e590e05c ldr lr, [r0, #92] ; 0x5c 8f10: e35e0000 cmp lr, #0 8f14: 0a000014 beq 8f6c newloc = node->info.directory.mt_fs->mt_fs_root; 8f18: e28dc024 add ip, sp, #36 ; 0x24 8f1c: e28ee01c add lr, lr, #28 8f20: e8be000f ldm lr!, {r0, r1, r2, r3} 8f24: e8ac000f stmia ip!, {r0, r1, r2, r3} 8f28: e59ee000 ldr lr, [lr] 8f2c: e58ce000 str lr, [ip] *pathloc = newloc; 8f30: e28dc024 add ip, sp, #36 ; 0x24 8f34: e8bc000f ldm ip!, {r0, r1, r2, r3} 8f38: e1a0c004 mov ip, r4 8f3c: e8ac000f stmia ip!, {r0, r1, r2, r3} return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 8f40: e59d2038 ldr r2, [sp, #56] ; 0x38 * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 8f44: e58ce000 str lr, [ip] return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 8f48: e0625005 rsb r5, r2, r5 8f4c: e594300c ldr r3, [r4, #12] 8f50: e0870005 add r0, r7, r5 8f54: e1a01004 mov r1, r4 8f58: e1a0200a mov r2, sl 8f5c: e1a0e00f mov lr, pc 8f60: e593f004 ldr pc, [r3, #4] 8f64: e1a06000 mov r6, r0 8f68: ea00002d b 9024 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 8f6c: e1a0100d mov r1, sp 8f70: eb00005e bl 90f0 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 8f74: e2506000 subs r6, r0, #0 8f78: 0a000007 beq 8f9c done = true; else pathloc->node_access = node; 8f7c: e5846000 str r6, [r4] 8f80: eaffffa2 b 8e10 break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 8f84: eb000ed7 bl cae8 <__errno> 8f88: e3a03011 mov r3, #17 8f8c: ea000022 b 901c break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 8f90: eb000ed4 bl cae8 <__errno> 8f94: e3a0305b mov r3, #91 ; 0x5b 8f98: ea00001f b 901c case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 8f9c: e59d3038 ldr r3, [sp, #56] ; 0x38 8fa0: e0633005 rsb r3, r3, r5 8fa4: e0873003 add r3, r7, r3 8fa8: e58a3000 str r3, [sl] * pathloc is returned with a pointer to the parent of the new node. * name is returned with a pointer to the first character in the * new node name. The parent node is verified to be a directory. */ int IMFS_evaluate_for_make( 8fac: e0875005 add r5, r7, r5 /* * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { 8fb0: ea000005 b 8fcc if ( !IMFS_is_separator( path[ i ] ) ) 8fb4: ebffe6b9 bl 2aa0 8fb8: e3500000 cmp r0, #0 8fbc: 1a000002 bne 8fcc rtems_set_errno_and_return_minus_one( ENOENT ); 8fc0: eb000ec8 bl cae8 <__errno> 8fc4: e3a03002 mov r3, #2 8fc8: ea000013 b 901c /* * 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++) { 8fcc: e4d50001 ldrb r0, [r5], #1 8fd0: e3500000 cmp r0, #0 8fd4: 1afffff6 bne 8fb4 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 8fd8: e1a00004 mov r0, r4 8fdc: ebfffe56 bl 893c /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 8fe0: e5943000 ldr r3, [r4] 8fe4: e593304c ldr r3, [r3, #76] ; 0x4c 8fe8: e3530001 cmp r3, #1 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 8fec: e1a06000 mov r6, r0 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 8ff0: 0a000002 beq 9000 rtems_set_errno_and_return_minus_one( ENOTDIR ); 8ff4: eb000ebb bl cae8 <__errno> 8ff8: e3a03014 mov r3, #20 8ffc: ea000006 b 901c /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 9000: e1a00004 mov r0, r4 9004: e3a01003 mov r1, #3 9008: ebfffe68 bl 89b0 900c: e3500000 cmp r0, #0 9010: 1a000003 bne 9024 rtems_set_errno_and_return_minus_one( EACCES ); 9014: eb000eb3 bl cae8 <__errno> 9018: e3a0300d mov r3, #13 901c: e5803000 str r3, [r0] 9020: e3e06000 mvn r6, #0 return result; } 9024: e1a00006 mov r0, r6 9028: e28dd03c add sp, sp, #60 ; 0x3c 902c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 000089b0 : uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) 89b0: e3d13007 bics r3, r1, #7 */ int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 89b4: e92d4070 push {r4, r5, r6, lr} 89b8: e1a04001 mov r4, r1 uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) 89bc: 0a000004 beq 89d4 rtems_set_errno_and_return_minus_one( EPERM ); 89c0: eb001048 bl cae8 <__errno> <== NOT EXECUTED 89c4: e3a03001 mov r3, #1 <== NOT EXECUTED 89c8: e5803000 str r3, [r0] <== NOT EXECUTED 89cc: e3e00000 mvn r0, #0 <== NOT EXECUTED 89d0: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED jnode = node->node_access; 89d4: e5905000 ldr r5, [r0] #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 89d8: eb0002de bl 9558 89dc: e1a06000 mov r6, r0 st_gid = getegid(); 89e0: eb0002d7 bl 9544 * Check if I am owner or a group member or someone else. */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) 89e4: e1d533bc ldrh r3, [r5, #60] ; 0x3c 89e8: e1530006 cmp r3, r6 flags_to_test <<= 6; 89ec: 01a04304 lsleq r4, r4, #6 * Check if I am owner or a group member or someone else. */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) 89f0: 0a000002 beq 8a00 flags_to_test <<= 6; else if ( st_gid == jnode->st_gid ) 89f4: e1d533be ldrh r3, [r5, #62] ; 0x3e 89f8: e1530000 cmp r3, r0 flags_to_test <<= 3; 89fc: 01a04184 lsleq r4, r4, #3 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 8a00: e5950030 ldr r0, [r5, #48] ; 0x30 8a04: e0040000 and r0, r4, 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 ); 8a08: e1500004 cmp r0, r4 8a0c: 13a00000 movne r0, #0 8a10: 03a00001 moveq r0, #1 */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) return 1; return 0; } 8a14: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== 00009034 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 9034: 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; 9038: e1a0c000 mov ip, r0 903c: 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 ) { 9040: e1a05000 mov r5, r0 9044: 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; 9048: e8bc000f ldm ip!, {r0, r1, r2, r3} 904c: e1a0e00d mov lr, sp 9050: e8ae000f stmia lr!, {r0, r1, r2, r3} 9054: e59c3000 ldr r3, [ip] 9058: e58e3000 str r3, [lr] /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; 905c: e3a03000 mov r3, #0 9060: e585301c str r3, [r5, #28] do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 9064: e1a0500d mov r5, sp 9068: e1a0000d mov r0, sp */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 906c: e5946008 ldr r6, [r4, #8] loc.node_access = (void *)jnode; 9070: e58d4000 str r4, [sp] IMFS_Set_handlers( &loc ); 9074: ebfffe30 bl 893c if ( jnode->type != IMFS_DIRECTORY ) { 9078: e594304c ldr r3, [r4, #76] ; 0x4c 907c: e3530001 cmp r3, #1 9080: 1a000003 bne 9094 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { 9084: e5942050 ldr r2, [r4, #80] ; 0x50 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 9088: e2843054 add r3, r4, #84 ; 0x54 908c: e1520003 cmp r2, r3 9090: 1a000005 bne 90ac result = IMFS_unlink( NULL, &loc ); 9094: e3a00000 mov r0, #0 9098: e1a0100d mov r1, sp 909c: ebffe1d4 bl 17f4 if (result != 0) 90a0: e3500000 cmp r0, #0 90a4: 1a00000c bne 90dc return -1; jnode = next; 90a8: e1a04006 mov r4, r6 } if ( jnode != NULL ) { 90ac: e3540000 cmp r4, #0 90b0: 0a00000b beq 90e4 if ( jnode->type == IMFS_DIRECTORY ) { 90b4: e594304c ldr r3, [r4, #76] ; 0x4c 90b8: e3530001 cmp r3, #1 90bc: 1affffe9 bne 9068 } } } while (jnode != NULL); return 0; } 90c0: e5943050 ldr r3, [r4, #80] ; 0x50 90c4: e2842054 add r2, r4, #84 ; 0x54 return -1; jnode = next; } if ( jnode != NULL ) { if ( jnode->type == IMFS_DIRECTORY ) { if ( jnode_has_children( jnode ) ) 90c8: e1530002 cmp r3, r2 90cc: 0affffe5 beq 9068 jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 90d0: e2534000 subs r4, r3, #0 90d4: 1affffe3 bne 9068 90d8: ea000001 b 90e4 <== NOT EXECUTED return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; 90dc: e3e00000 mvn r0, #0 <== NOT EXECUTED 90e0: ea000000 b 90e8 <== NOT EXECUTED jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); return 0; 90e4: e1a00004 mov r0, r4 } 90e8: e28dd014 add sp, sp, #20 90ec: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== 0000b24c : my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { b24c: e59f31e4 ldr r3, [pc, #484] ; b438 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { b250: 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 ) { b254: e5935000 ldr r5, [r3] b258: e1a05125 lsr r5, r5, #2 b25c: e2453001 sub r3, r5, #1 b260: e1510003 cmp r1, r3 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { b264: e1a04000 mov r4, r0 b268: e1a06001 mov r6, r1 b26c: e1a08002 mov r8, r2 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { b270: 8a00000e bhi b2b0 p = info->indirect; if ( malloc_it ) { b274: e3520000 cmp r2, #0 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { p = info->indirect; b278: e5900058 ldr r0, [r0, #88] ; 0x58 if ( malloc_it ) { b27c: 0a000007 beq b2a0 if ( !p ) { b280: e3500000 cmp r0, #0 b284: 1a000003 bne b298 p = memfile_alloc_block(); b288: ebffffe2 bl b218 if ( !p ) b28c: e3500000 cmp r0, #0 b290: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; info->indirect = p; b294: e5840058 str r0, [r4, #88] ; 0x58 } return &info->indirect[ my_block ]; b298: e5940058 ldr r0, [r4, #88] ; 0x58 b29c: ea000001 b b2a8 } if ( !p ) b2a0: e3500000 cmp r0, #0 b2a4: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; return &info->indirect[ my_block ]; b2a8: e0800106 add r0, r0, r6, lsl #2 b2ac: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { b2b0: e2853001 add r3, r5, #1 b2b4: e0030395 mul r3, r5, r3 b2b8: e2432001 sub r2, r3, #1 b2bc: e1510002 cmp r1, r2 b2c0: 8a000021 bhi b34c my_block -= FIRST_DOUBLY_INDIRECT; b2c4: e0656001 rsb r6, r5, r1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; b2c8: e1a00006 mov r0, r6 b2cc: e1a01005 mov r1, r5 b2d0: eb00143b bl 103c4 <__umodsi3> doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; b2d4: e1a01005 mov r1, r5 */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; b2d8: e1a07000 mov r7, r0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; b2dc: e1a00006 mov r0, r6 b2e0: eb00139f bl 10164 <__aeabi_uidiv> p = info->doubly_indirect; if ( malloc_it ) { b2e4: e3580000 cmp r8, #0 if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; b2e8: e1a05000 mov r5, r0 p = info->doubly_indirect; b2ec: e594005c ldr r0, [r4, #92] ; 0x5c if ( malloc_it ) { b2f0: 0a00000e beq b330 if ( !p ) { b2f4: e3500000 cmp r0, #0 b2f8: 1a000003 bne b30c p = memfile_alloc_block(); b2fc: ebffffc5 bl b218 if ( !p ) b300: e3500000 cmp r0, #0 b304: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; info->doubly_indirect = p; b308: e584005c str r0, [r4, #92] ; 0x5c } p1 = (block_p *)p[ doubly ]; b30c: e0804105 add r4, r0, r5, lsl #2 b310: e7900105 ldr r0, [r0, r5, lsl #2] if ( !p1 ) { b314: e3500000 cmp r0, #0 b318: 1a000009 bne b344 p1 = memfile_alloc_block(); b31c: ebffffbd bl b218 if ( !p1 ) b320: e3500000 cmp r0, #0 return 0; p[ doubly ] = (block_p) p1; b324: 15840000 strne r0, [r4] } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); if ( !p1 ) b328: 1a000005 bne b344 b32c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) b330: e3500000 cmp r0, #0 b334: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; p = (block_p *)p[ doubly ]; b338: e7900105 ldr r0, [r0, r5, lsl #2] if ( !p ) b33c: e3500000 cmp r0, #0 b340: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; return (block_p *)&p[ singly ]; b344: e0800107 add r0, r0, r7, lsl #2 b348: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { b34c: e2832001 add r2, r3, #1 b350: e0020295 mul r2, r5, r2 b354: e2422001 sub r2, r2, #1 b358: e1510002 cmp r1, r2 b35c: 8a000033 bhi b430 my_block -= FIRST_TRIPLY_INDIRECT; b360: e0636001 rsb r6, r3, r1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; b364: e1a00006 mov r0, r6 b368: e1a01005 mov r1, r5 b36c: eb001414 bl 103c4 <__umodsi3> doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; b370: 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; b374: e1a0a000 mov sl, r0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; b378: e1a00006 mov r0, r6 b37c: eb001378 bl 10164 <__aeabi_uidiv> triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; b380: 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; b384: e1a06000 mov r6, r0 triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; b388: eb001375 bl 10164 <__aeabi_uidiv> doubly %= IMFS_MEMFILE_BLOCK_SLOTS; b38c: 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; b390: e1a07000 mov r7, r0 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; b394: e1a00006 mov r0, r6 b398: eb001409 bl 103c4 <__umodsi3> p = info->triply_indirect; if ( malloc_it ) { b39c: e3580000 cmp r8, #0 my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; doubly %= IMFS_MEMFILE_BLOCK_SLOTS; b3a0: e1a05000 mov r5, r0 p = info->triply_indirect; b3a4: e5940060 ldr r0, [r4, #96] ; 0x60 if ( malloc_it ) { b3a8: 0a000016 beq b408 if ( !p ) { b3ac: e3500000 cmp r0, #0 b3b0: 1a000003 bne b3c4 p = memfile_alloc_block(); b3b4: ebffff97 bl b218 if ( !p ) b3b8: e3500000 cmp r0, #0 b3bc: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; info->triply_indirect = p; b3c0: e5840060 str r0, [r4, #96] ; 0x60 } p1 = (block_p *) p[ triply ]; b3c4: e0804107 add r4, r0, r7, lsl #2 b3c8: e7900107 ldr r0, [r0, r7, lsl #2] if ( !p1 ) { b3cc: e3500000 cmp r0, #0 b3d0: 1a000003 bne b3e4 p1 = memfile_alloc_block(); b3d4: ebffff8f bl b218 if ( !p1 ) b3d8: e3500000 cmp r0, #0 b3dc: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; p[ triply ] = (block_p) p1; b3e0: e5840000 str r0, [r4] } p2 = (block_p *)p1[ doubly ]; b3e4: e0804105 add r4, r0, r5, lsl #2 b3e8: e7900105 ldr r0, [r0, r5, lsl #2] if ( !p2 ) { b3ec: e3500000 cmp r0, #0 b3f0: 1a00000c bne b428 p2 = memfile_alloc_block(); b3f4: ebffff87 bl b218 if ( !p2 ) b3f8: e3500000 cmp r0, #0 return 0; p1[ doubly ] = (block_p) p2; b3fc: 15840000 strne r0, [r4] } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); if ( !p2 ) b400: 1a000008 bne b428 b404: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) b408: e3500000 cmp r0, #0 b40c: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; p1 = (block_p *) p[ triply ]; b410: e7900107 ldr r0, [r0, r7, lsl #2] if ( !p1 ) b414: e3500000 cmp r0, #0 b418: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; p2 = (block_p *)p1[ doubly ]; b41c: e7900105 ldr r0, [r0, r5, lsl #2] if ( !p2 ) b420: e3500000 cmp r0, #0 b424: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; return (block_p *)&p2[ singly ]; b428: e080010a add r0, r0, sl, lsl #2 b42c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} } /* * This means the requested block number is out of range. */ return 0; b430: e3a00000 mov r0, #0 <== NOT EXECUTED } b434: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED =============================================================================== 00001694 : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 1694: e5903008 ldr r3, [r0, #8] /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 1698: e593204c ldr r2, [r3, #76] ; 0x4c 169c: e3520001 cmp r2, #1 #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 16a0: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 16a4: 0a000004 beq 16bc rtems_set_errno_and_return_minus_one( ENOTDIR ); 16a8: eb002d0e bl cae8 <__errno> <== NOT EXECUTED 16ac: e3a03014 mov r3, #20 <== NOT EXECUTED 16b0: e5803000 str r3, [r0] <== NOT EXECUTED 16b4: e3e00000 mvn r0, #0 <== NOT EXECUTED 16b8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry; 16bc: e583005c str r0, [r3, #92] ; 0x5c return 0; 16c0: e3a00000 mov r0, #0 } 16c4: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== 00004018 : * This routine prints the contents of the specified jnode. */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 4018: e92d4030 push {r4, r5, lr} IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); 401c: e59f50e0 ldr r5, [pc, #224] ; 4104 4020: e5953000 ldr r3, [r5] * This routine prints the contents of the specified jnode. */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 4024: e1a04000 mov r4, r0 IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); 4028: e5931008 ldr r1, [r3, #8] 402c: e280000c add r0, r0, #12 4030: eb003485 bl 1124c switch( the_jnode->type ) { 4034: e594204c ldr r2, [r4, #76] ; 0x4c 4038: e2423001 sub r3, r2, #1 403c: e3530006 cmp r3, #6 4040: 979ff103 ldrls pc, [pc, r3, lsl #2] 4044: ea000026 b 40e4 <== NOT EXECUTED 4048: 00004064 .word 0x00004064 <== NOT EXECUTED 404c: 00004078 .word 0x00004078 <== NOT EXECUTED 4050: 000040c4 .word 0x000040c4 <== NOT EXECUTED 4054: 000040c4 .word 0x000040c4 <== NOT EXECUTED 4058: 000040ac .word 0x000040ac <== NOT EXECUTED 405c: 00004090 .word 0x00004090 <== NOT EXECUTED 4060: 000040d0 .word 0x000040d0 <== NOT EXECUTED case IMFS_DIRECTORY: fprintf(stdout, "/" ); 4064: e5953000 ldr r3, [r5] 4068: e3a0002f mov r0, #47 ; 0x2f 406c: e5931008 ldr r1, [r3, #8] 4070: eb003440 bl 11178 break; 4074: ea00001f b 40f8 case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 4078: e5953000 ldr r3, [r5] 407c: e59f1084 ldr r1, [pc, #132] ; 4108 4080: e5930008 ldr r0, [r3, #8] 4084: e2842050 add r2, r4, #80 ; 0x50 4088: e892000c ldm r2, {r2, r3} 408c: ea000004 b 40a4 the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 4090: e5953000 ldr r3, [r5] 4094: e59f1070 ldr r1, [pc, #112] ; 410c 4098: e5930008 ldr r0, [r3, #8] 409c: e5942050 ldr r2, [r4, #80] ; 0x50 40a0: e5943058 ldr r3, [r4, #88] ; 0x58 40a4: eb003413 bl 110f8 (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; 40a8: ea000012 b 40f8 the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 40ac: e5953000 ldr r3, [r5] 40b0: e59f1058 ldr r1, [pc, #88] ; 4110 40b4: e5930008 ldr r0, [r3, #8] 40b8: e5942050 ldr r2, [r4, #80] ; 0x50 40bc: eb00340d bl 110f8 (uint32_t)the_jnode->info.file.size ); #endif break; 40c0: ea00000c b 40f8 case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 40c4: e5953000 ldr r3, [r5] 40c8: e59f0044 ldr r0, [pc, #68] ; 4114 40cc: ea000001 b 40d8 return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 40d0: e5953000 ldr r3, [r5] 40d4: e59f003c ldr r0, [pc, #60] ; 4118 40d8: e5931008 ldr r1, [r3, #8] default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); } 40dc: 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" ); 40e0: ea003459 b 1124c return; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 40e4: e5953000 ldr r3, [r5] <== NOT EXECUTED 40e8: e59f102c ldr r1, [pc, #44] ; 411c <== NOT EXECUTED 40ec: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED return; } puts(""); } 40f0: 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 ); 40f4: ea0033ff b 110f8 <== NOT EXECUTED return; } puts(""); 40f8: e59f0020 ldr r0, [pc, #32] ; 4120 } 40fc: e8bd4030 pop {r4, r5, lr} default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 4100: ea003b2b b 12db4 =============================================================================== 00009318 : { IMFS_fs_info_t *fs_info; IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 9318: e5903000 ldr r3, [r0] switch ( the_jnode->type ) { 931c: e593204c ldr r2, [r3, #76] ; 0x4c 9320: e2422002 sub r2, r2, #2 int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 9324: e92d4800 push {fp, lr} IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 9328: e3520005 cmp r2, #5 932c: 979ff102 ldrls pc, [pc, r2, lsl #2] 9330: ea000012 b 9380 <== NOT EXECUTED 9334: 0000934c .word 0x0000934c <== NOT EXECUTED 9338: 00009380 .word 0x00009380 <== NOT EXECUTED 933c: 0000936c .word 0x0000936c <== NOT EXECUTED 9340: 00009360 .word 0x00009360 <== NOT EXECUTED 9344: 00009360 .word 0x00009360 <== NOT EXECUTED 9348: 0000936c .word 0x0000936c <== NOT EXECUTED case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 934c: e5932054 ldr r2, [r3, #84] ; 0x54 rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 9350: e593c050 ldr ip, [r3, #80] ; 0x50 9354: e581201c str r2, [r1, #28] 9358: e581c018 str ip, [r1, #24] break; 935c: ea00000c b 9394 case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 9360: e283c050 add ip, r3, #80 ; 0x50 9364: e89c1800 ldm ip, {fp, ip} 9368: ea000001 b 9374 case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 936c: e3a0b000 mov fp, #0 9370: e3a0c000 mov ip, #0 9374: e581b020 str fp, [r1, #32] 9378: e581c024 str ip, [r1, #36] ; 0x24 break; 937c: ea000004 b 9394 default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 9380: eb000dd8 bl cae8 <__errno> 9384: e3a03086 mov r3, #134 ; 0x86 9388: e5803000 str r3, [r0] 938c: e3e00000 mvn r0, #0 9390: e8bd8800 pop {fp, pc} /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; 9394: e5902010 ldr r2, [r0, #16] buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 9398: e5922034 ldr r2, [r2, #52] ; 0x34 939c: e5922000 ldr r2, [r2] /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = 93a0: e5812004 str r2, [r1, #4] rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; 93a4: e5932030 ldr r2, [r3, #48] ; 0x30 93a8: e581200c str r2, [r1, #12] buf->st_nlink = the_jnode->st_nlink; 93ac: e1d323b4 ldrh r2, [r3, #52] ; 0x34 93b0: e1c121b0 strh r2, [r1, #16] buf->st_ino = the_jnode->st_ino; 93b4: e5932038 ldr r2, [r3, #56] ; 0x38 93b8: e5812008 str r2, [r1, #8] buf->st_uid = the_jnode->st_uid; 93bc: e1d323bc ldrh r2, [r3, #60] ; 0x3c 93c0: e1c121b2 strh r2, [r1, #18] buf->st_gid = the_jnode->st_gid; 93c4: e1d323be ldrh r2, [r3, #62] ; 0x3e 93c8: e1c121b4 strh r2, [r1, #20] buf->st_atime = the_jnode->stat_atime; 93cc: e5932040 ldr r2, [r3, #64] ; 0x40 93d0: e59f001c ldr r0, [pc, #28] ; 93f4 93d4: e5812028 str r2, [r1, #40] ; 0x28 buf->st_mtime = the_jnode->stat_mtime; 93d8: e2832044 add r2, r3, #68 ; 0x44 93dc: e892000c ldm r2, {r2, r3} /* * 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 = 93e0: e5810000 str r0, [r1] 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; 93e4: e5812030 str r2, [r1, #48] ; 0x30 buf->st_ctime = the_jnode->stat_ctime; 93e8: e5813038 str r3, [r1, #56] ; 0x38 return 0; 93ec: e3a00000 mov r0, #0 } 93f0: e8bd8800 pop {fp, pc} =============================================================================== 000017f4 : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 17f4: e92d40f0 push {r4, r5, r6, r7, lr} IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; 17f8: e5915000 ldr r5, [r1] /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 17fc: e595304c ldr r3, [r5, #76] ; 0x4c 1800: e3530003 cmp r3, #3 int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 1804: e24dd01c sub sp, sp, #28 1808: e1a06000 mov r6, r0 180c: e1a04001 mov r4, r1 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 1810: 1a000024 bne 18a8 if ( !node->info.hard_link.link_node ) 1814: e595e050 ldr lr, [r5, #80] ; 0x50 1818: e35e0000 cmp lr, #0 181c: 1a000003 bne 1830 rtems_set_errno_and_return_minus_one( EINVAL ); 1820: eb002cb0 bl cae8 <__errno> <== NOT EXECUTED 1824: e3a03016 mov r3, #22 <== NOT EXECUTED 1828: e5803000 str r3, [r0] <== NOT EXECUTED 182c: ea000023 b 18c0 <== NOT EXECUTED the_link = *loc; 1830: e1a07001 mov r7, r1 1834: e8b7000f ldm r7!, {r0, r1, r2, r3} 1838: e1a0c00d mov ip, sp 183c: e8ac000f stmia ip!, {r0, r1, r2, r3} 1840: e5973000 ldr r3, [r7] the_link.node_access = node->info.hard_link.link_node; 1844: e28d701c add r7, sp, #28 1848: e527e01c str lr, [r7, #-28]! IMFS_Set_handlers( &the_link ); 184c: 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; 1850: e58c3000 str r3, [ip] the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 1854: eb001c38 bl 893c /* * 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) 1858: e5953050 ldr r3, [r5, #80] ; 0x50 185c: e1d323b4 ldrh r2, [r3, #52] ; 0x34 1860: e3520001 cmp r2, #1 1864: 1a000007 bne 1888 { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 1868: e1a00006 mov r0, r6 186c: e1a0100d mov r1, sp 1870: e59d3008 ldr r3, [sp, #8] 1874: e1a0e00f mov lr, pc 1878: e593f034 ldr pc, [r3, #52] ; 0x34 if ( result != 0 ) 187c: e3500000 cmp r0, #0 1880: 0a000008 beq 18a8 1884: ea00000d b 18c0 return -1; } else { node->info.hard_link.link_node->st_nlink --; 1888: e2422001 sub r2, r2, #1 188c: e1c323b4 strh r2, [r3, #52] ; 0x34 IMFS_update_ctime( node->info.hard_link.link_node ); 1890: e28d0014 add r0, sp, #20 1894: e3a01000 mov r1, #0 1898: eb00012c bl 1d50 189c: e5953050 ldr r3, [r5, #80] ; 0x50 18a0: e59d2014 ldr r2, [sp, #20] 18a4: e5832048 str r2, [r3, #72] ; 0x48 /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 18a8: e5943008 ldr r3, [r4, #8] 18ac: e1a00006 mov r0, r6 18b0: e1a01004 mov r1, r4 18b4: e1a0e00f mov lr, pc 18b8: e593f034 ldr pc, [r3, #52] ; 0x34 return result; 18bc: ea000000 b 18c4 if ( node->info.hard_link.link_node->st_nlink == 1) { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); if ( result != 0 ) return -1; 18c0: e3e00000 mvn r0, #0 */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); return result; } 18c4: e28dd01c add sp, sp, #28 18c8: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== 000018cc : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 18cc: e5903008 ldr r3, [r0, #8] /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 18d0: e593204c ldr r2, [r3, #76] ; 0x4c 18d4: e3520001 cmp r2, #1 #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 18d8: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 18dc: 0a000002 beq 18ec rtems_set_errno_and_return_minus_one( ENOTDIR ); 18e0: eb002c80 bl cae8 <__errno> <== NOT EXECUTED 18e4: e3a03014 mov r3, #20 <== NOT EXECUTED 18e8: ea000004 b 1900 <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 18ec: e593205c ldr r2, [r3, #92] ; 0x5c 18f0: e3520000 cmp r2, #0 18f4: 1a000004 bne 190c rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 18f8: eb002c7a bl cae8 <__errno> <== NOT EXECUTED 18fc: e3a03016 mov r3, #22 <== NOT EXECUTED 1900: e5803000 str r3, [r0] <== NOT EXECUTED 1904: e3e00000 mvn r0, #0 <== NOT EXECUTED 1908: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED /* * Set the mt_fs pointer to indicate that there is no longer * a file system mounted to this point. */ node->info.directory.mt_fs = NULL; 190c: e3a00000 mov r0, #0 1910: e583005c str r0, [r3, #92] ; 0x5c return 0; } 1914: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== 00001be0 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 1be0: e92d4fff push {r0, r1, r2, r3, 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); 1be4: e59030bc ldr r3, [r0, #188] ; 0xbc size = Stack_check_usable_stack_size(stack); 1be8: e59070b8 ldr r7, [r0, #184] ; 0xb8 { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); 1bec: e2832010 add r2, r3, #16 size = Stack_check_usable_stack_size(stack); 1bf0: e2477010 sub r7, r7, #16 * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 1bf4: e3c71003 bic r1, r7, #3 static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 1bf8: e1a05000 mov r5, r0 current = 0; } else #endif { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 1bfc: e590b0e8 ldr fp, [r0, #232] ; 0xe8 /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 1c00: e2820010 add r0, r2, #16 for (ebase = base + length; base < ebase; base++) 1c04: e0800001 add r0, r0, r1 * 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( 1c08: e2833020 add r3, r3, #32 * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) if (*base != U32_PATTERN) 1c0c: e59f10c0 ldr r1, [pc, #192] ; 1cd4 1c10: ea000002 b 1c20 1c14: e493c004 ldr ip, [r3], #4 1c18: e15c0001 cmp ip, r1 1c1c: 1a000004 bne 1c34 * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 1c20: e1530000 cmp r3, r0 if (*base != U32_PATTERN) 1c24: e1a06003 mov r6, 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++) 1c28: 3afffff9 bcc 1c14 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; 1c2c: e3a06000 mov r6, #0 <== NOT EXECUTED 1c30: ea000002 b 1c40 <== NOT EXECUTED low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); high_water_mark = Stack_check_find_high_water_mark(low, size); if ( high_water_mark ) 1c34: e3560000 cmp r6, #0 used = Stack_check_Calculate_used( low, size, high_water_mark ); 1c38: 10822007 addne r2, r2, r7 1c3c: 10666002 rsbne r6, r6, r2 #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if ( the_thread ) #endif { (*print_handler)( 1c40: e5958008 ldr r8, [r5, #8] 1c44: e59f408c ldr r4, [pc, #140] ; 1cd8 1c48: e3a01005 mov r1, #5 1c4c: e28d2008 add r2, sp, #8 1c50: e1a00008 mov r0, r8 1c54: e8940600 ldm r4, {r9, sl} 1c58: eb001630 bl 7520 1c5c: e59f1078 ldr r1, [pc, #120] ; 1cdc 1c60: e1a03000 mov r3, r0 1c64: e1a02008 mov r2, r8 1c68: e1a0000a mov r0, sl 1c6c: e1a0e00f mov lr, pc 1c70: e12fff19 bx r9 (*print_handler)( print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 1c74: e59530b8 ldr r3, [r5, #184] ; 0xb8 1c78: e59520bc ldr r2, [r5, #188] ; 0xbc 1c7c: e2433001 sub r3, r3, #1 else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 1c80: e0823003 add r3, r2, r3 1c84: e58db000 str fp, [sp] 1c88: e58d7004 str r7, [sp, #4] 1c8c: e5940004 ldr r0, [r4, #4] 1c90: e59f1048 ldr r1, [pc, #72] ; 1ce0 1c94: e1a0e00f mov lr, pc 1c98: e594f000 ldr pc, [r4] stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 1c9c: e5943008 ldr r3, [r4, #8] 1ca0: e3530000 cmp r3, #0 1ca4: 1a000004 bne 1cbc (*print_handler)( print_context, "Unavailable\n" ); 1ca8: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED 1cac: e59f1030 ldr r1, [pc, #48] ; 1ce4 <== NOT EXECUTED 1cb0: e1a0e00f mov lr, pc <== NOT EXECUTED 1cb4: e594f000 ldr pc, [r4] <== NOT EXECUTED 1cb8: ea000004 b 1cd0 <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 1cbc: e5940004 ldr r0, [r4, #4] 1cc0: e59f1020 ldr r1, [pc, #32] ; 1ce8 1cc4: e1a02006 mov r2, r6 1cc8: e1a0e00f mov lr, pc 1ccc: e594f000 ldr pc, [r4] } } 1cd0: e8bd8fff pop {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 00014b58 <_CORE_message_queue_Broadcast>: { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 14b58: 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 ) { 14b5c: 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 ) { 14b60: e1520003 cmp r2, r3 Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { 14b64: e1a06000 mov r6, r0 14b68: e1a0a001 mov sl, r1 14b6c: e1a07002 mov r7, r2 14b70: e59d8020 ldr r8, [sp, #32] Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 14b74: 8a000013 bhi 14bc8 <_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 ) { 14b78: e5905048 ldr r5, [r0, #72] ; 0x48 14b7c: e3550000 cmp r5, #0 *count = 0; 14b80: 13a00000 movne r0, #0 14b84: 15880000 strne r0, [r8] * 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 ) { 14b88: 0a000007 beq 14bac <_CORE_message_queue_Broadcast+0x54> 14b8c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 14b90: e594002c ldr r0, [r4, #44] ; 0x2c 14b94: e1a0100a mov r1, sl 14b98: e1a02007 mov r2, r7 14b9c: eb00221d bl 1d418 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 14ba0: e5943028 ldr r3, [r4, #40] ; 0x28 14ba4: e5837000 str r7, [r3] */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 14ba8: e2855001 add r5, r5, #1 /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 14bac: e1a00006 mov r0, r6 14bb0: eb000a82 bl 175c0 <_Thread_queue_Dequeue> 14bb4: e2504000 subs r4, r0, #0 14bb8: 1afffff4 bne 14b90 <_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; 14bbc: e5885000 str r5, [r8] return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 14bc0: e1a00004 mov r0, r4 14bc4: 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; 14bc8: e3a00001 mov r0, #1 <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 14bcc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED =============================================================================== 00006cb0 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 6cb0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 6cb4: e5903014 ldr r3, [r0, #20] bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 6cb8: e24dd030 sub sp, sp, #48 ; 0x30 uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 6cbc: e58d3024 str r3, [sp, #36] ; 0x24 Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; 6cc0: e5903024 ldr r3, [r0, #36] ; 0x24 Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 6cc4: e59f4500 ldr r4, [pc, #1280] ; 71cc <_Heap_Walk+0x51c> ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; 6cc8: e58d3028 str r3, [sp, #40] ; 0x28 Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 6ccc: e59f34fc ldr r3, [pc, #1276] ; 71d0 <_Heap_Walk+0x520> 6cd0: e31200ff tst r2, #255 ; 0xff 6cd4: 11a04003 movne r4, r3 if ( !_System_state_Is_up( _System_state_Get() ) ) { 6cd8: e59f34f4 ldr r3, [pc, #1268] ; 71d4 <_Heap_Walk+0x524> 6cdc: e5933000 ldr r3, [r3] bool dump ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; 6ce0: e590c020 ldr ip, [r0, #32] Heap_Block *const last_block = heap->last_block; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; if ( !_System_state_Is_up( _System_state_Get() ) ) { 6ce4: e3530003 cmp r3, #3 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 6ce8: e1a06000 mov r6, r0 6cec: e1a05001 mov r5, r1 uintptr_t const page_size = heap->page_size; 6cf0: e5909010 ldr r9, [r0, #16] uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; 6cf4: e58dc020 str ip, [sp, #32] Heap_Block *const last_block = heap->last_block; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; if ( !_System_state_Is_up( _System_state_Get() ) ) { 6cf8: 1a000127 bne 719c <_Heap_Walk+0x4ec> 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)( 6cfc: e59dc024 ldr ip, [sp, #36] ; 0x24 6d00: e58dc000 str ip, [sp] 6d04: e5903018 ldr r3, [r0, #24] 6d08: e58d3004 str r3, [sp, #4] 6d0c: e590301c ldr r3, [r0, #28] 6d10: e59d2020 ldr r2, [sp, #32] 6d14: e58d3008 str r3, [sp, #8] 6d18: e59d3028 ldr r3, [sp, #40] ; 0x28 6d1c: e58d200c str r2, [sp, #12] 6d20: e58d3010 str r3, [sp, #16] 6d24: e5903008 ldr r3, [r0, #8] 6d28: e58d3014 str r3, [sp, #20] 6d2c: e590300c ldr r3, [r0, #12] 6d30: e59f24a0 ldr r2, [pc, #1184] ; 71d8 <_Heap_Walk+0x528> 6d34: e58d3018 str r3, [sp, #24] 6d38: e1a00001 mov r0, r1 6d3c: e1a03009 mov r3, r9 6d40: e3a01000 mov r1, #0 6d44: e1a0e00f mov lr, pc 6d48: e12fff14 bx r4 heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 6d4c: e3590000 cmp r9, #0 6d50: 1a000006 bne 6d70 <_Heap_Walk+0xc0> (*printer)( source, true, "page size is zero\n" ); 6d54: e1a00005 mov r0, r5 6d58: e3a01001 mov r1, #1 6d5c: e59f2478 ldr r2, [pc, #1144] ; 71dc <_Heap_Walk+0x52c> 6d60: e1a0e00f mov lr, pc 6d64: e12fff14 bx r4 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 6d68: e1a08009 mov r8, r9 6d6c: ea00010b b 71a0 <_Heap_Walk+0x4f0> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 6d70: e2198007 ands r8, r9, #7 (*printer)( 6d74: 11a00005 movne r0, r5 6d78: 13a01001 movne r1, #1 6d7c: 159f245c ldrne r2, [pc, #1116] ; 71e0 <_Heap_Walk+0x530> 6d80: 11a03009 movne r3, r9 6d84: 1a00010c bne 71bc <_Heap_Walk+0x50c> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 6d88: e59d0024 ldr r0, [sp, #36] ; 0x24 6d8c: e1a01009 mov r1, r9 6d90: ebffe783 bl ba4 <__umodsi3> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 6d94: e250b000 subs fp, r0, #0 6d98: 0a000006 beq 6db8 <_Heap_Walk+0x108> (*printer)( 6d9c: e1a00005 mov r0, r5 6da0: e3a01001 mov r1, #1 6da4: e59f2438 ldr r2, [pc, #1080] ; 71e4 <_Heap_Walk+0x534> 6da8: e59d3024 ldr r3, [sp, #36] ; 0x24 6dac: e1a0e00f mov lr, pc 6db0: e12fff14 bx r4 6db4: ea0000f9 b 71a0 <_Heap_Walk+0x4f0> 6db8: e59dc020 ldr ip, [sp, #32] 6dbc: e1a01009 mov r1, r9 6dc0: e28c0008 add r0, ip, #8 6dc4: ebffe776 bl ba4 <__umodsi3> ); return false; } if ( 6dc8: e250a000 subs sl, r0, #0 !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 6dcc: 11a00005 movne r0, r5 6dd0: 13a01001 movne r1, #1 6dd4: 159f240c ldrne r2, [pc, #1036] ; 71e8 <_Heap_Walk+0x538> 6dd8: 159d3020 ldrne r3, [sp, #32] 6ddc: 1a0000cc bne 7114 <_Heap_Walk+0x464> 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; 6de0: e59d2020 ldr r2, [sp, #32] 6de4: e5928004 ldr r8, [r2, #4] ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 6de8: e2188001 ands r8, r8, #1 (*printer)( 6dec: 01a00005 moveq r0, r5 6df0: 03a01001 moveq r1, #1 6df4: 059f23f0 ldreq r2, [pc, #1008] ; 71ec <_Heap_Walk+0x53c> 6df8: 0a000009 beq 6e24 <_Heap_Walk+0x174> - 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; 6dfc: e59d3028 ldr r3, [sp, #40] ; 0x28 6e00: e5937004 ldr r7, [r3, #4] 6e04: e3c77001 bic r7, r7, #1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 6e08: e0837007 add r7, r3, r7 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 6e0c: e5978004 ldr r8, [r7, #4] ); return false; } if ( _Heap_Is_free( last_block ) ) { 6e10: e2188001 ands r8, r8, #1 6e14: 1a000005 bne 6e30 <_Heap_Walk+0x180> (*printer)( 6e18: e59f23d0 ldr r2, [pc, #976] ; 71f0 <_Heap_Walk+0x540> 6e1c: e1a00005 mov r0, r5 6e20: e3a01001 mov r1, #1 6e24: e1a0e00f mov lr, pc 6e28: e12fff14 bx r4 6e2c: ea0000db b 71a0 <_Heap_Walk+0x4f0> ); return false; } if ( 6e30: e59dc020 ldr ip, [sp, #32] 6e34: e157000c cmp r7, ip 6e38: 0a000006 beq 6e58 <_Heap_Walk+0x1a8> _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 6e3c: e1a00005 mov r0, r5 <== NOT EXECUTED 6e40: e3a01001 mov r1, #1 <== NOT EXECUTED 6e44: e59f23a8 ldr r2, [pc, #936] ; 71f4 <_Heap_Walk+0x544> <== NOT EXECUTED 6e48: e1a0e00f mov lr, pc <== NOT EXECUTED 6e4c: e12fff14 bx r4 <== NOT EXECUTED if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 6e50: e1a0800a mov r8, sl <== NOT EXECUTED 6e54: ea0000d1 b 71a0 <_Heap_Walk+0x4f0> <== NOT EXECUTED int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 6e58: e596b010 ldr fp, [r6, #16] block = next_block; } while ( block != first_block ); return true; } 6e5c: e5968008 ldr r8, [r6, #8] Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); 6e60: e1a0a006 mov sl, r6 6e64: ea000034 b 6f3c <_Heap_Walk+0x28c> 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; 6e68: e5963020 ldr r3, [r6, #32] 6e6c: e1530008 cmp r3, r8 6e70: 83a0c000 movhi ip, #0 6e74: 8a000003 bhi 6e88 <_Heap_Walk+0x1d8> 6e78: e596c024 ldr ip, [r6, #36] ; 0x24 6e7c: e15c0008 cmp ip, r8 6e80: 33a0c000 movcc ip, #0 6e84: 23a0c001 movcs ip, #1 const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { 6e88: e21cc0ff ands ip, ip, #255 ; 0xff (*printer)( 6e8c: 01a00005 moveq r0, r5 6e90: 03a01001 moveq r1, #1 6e94: 059f235c ldreq r2, [pc, #860] ; 71f8 <_Heap_Walk+0x548> 6e98: 0a000012 beq 6ee8 <_Heap_Walk+0x238> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 6e9c: e2880008 add r0, r8, #8 6ea0: e1a0100b mov r1, fp 6ea4: ebffe73e bl ba4 <__umodsi3> ); return false; } if ( 6ea8: e250c000 subs ip, r0, #0 !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 6eac: 11a00005 movne r0, r5 6eb0: 13a01001 movne r1, #1 6eb4: 159f2340 ldrne r2, [pc, #832] ; 71fc <_Heap_Walk+0x54c> 6eb8: 11a03008 movne r3, r8 6ebc: 1a0000be bne 71bc <_Heap_Walk+0x50c> - 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; 6ec0: e5983004 ldr r3, [r8, #4] 6ec4: e3c33001 bic r3, r3, #1 block = next_block; } while ( block != first_block ); return true; } 6ec8: e0883003 add r3, r8, r3 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 6ecc: e5933004 ldr r3, [r3, #4] ); return false; } if ( _Heap_Is_used( free_block ) ) { 6ed0: e2133001 ands r3, r3, #1 6ed4: e58d302c str r3, [sp, #44] ; 0x2c 6ed8: 0a000009 beq 6f04 <_Heap_Walk+0x254> (*printer)( 6edc: e59f231c ldr r2, [pc, #796] ; 7200 <_Heap_Walk+0x550> 6ee0: e1a00005 mov r0, r5 6ee4: e3a01001 mov r1, #1 6ee8: e1a03008 mov r3, r8 6eec: e58dc01c str ip, [sp, #28] 6ef0: e1a0e00f mov lr, pc 6ef4: e12fff14 bx r4 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 6ef8: e59dc01c ldr ip, [sp, #28] 6efc: e1a0800c mov r8, ip 6f00: ea0000a6 b 71a0 <_Heap_Walk+0x4f0> ); return false; } if ( free_block->prev != prev_block ) { 6f04: e598300c ldr r3, [r8, #12] 6f08: e153000a cmp r3, sl 6f0c: 0a000008 beq 6f34 <_Heap_Walk+0x284> (*printer)( 6f10: e58d3000 str r3, [sp] 6f14: e1a00005 mov r0, r5 6f18: e1a03008 mov r3, r8 6f1c: e3a01001 mov r1, #1 6f20: e59f22dc ldr r2, [pc, #732] ; 7204 <_Heap_Walk+0x554> 6f24: e1a0e00f mov lr, pc 6f28: e12fff14 bx r4 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 6f2c: e59d802c ldr r8, [sp, #44] ; 0x2c 6f30: ea00009a b 71a0 <_Heap_Walk+0x4f0> return false; } prev_block = free_block; free_block = free_block->next; 6f34: e1a0a008 mov sl, r8 6f38: e5988008 ldr r8, [r8, #8] const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 6f3c: e1580006 cmp r8, r6 6f40: 1affffc8 bne 6e68 <_Heap_Walk+0x1b8> 6f44: ea000000 b 6f4c <_Heap_Walk+0x29c> block->prev_size ); } block = next_block; } while ( block != first_block ); 6f48: e1a07008 mov r7, r8 return true; } 6f4c: e5973004 ldr r3, [r7, #4] const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 6f50: e5962020 ldr r2, [r6, #32] - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 6f54: e3c3a001 bic sl, r3, #1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 6f58: e087800a add r8, r7, sl const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 6f5c: e1520008 cmp r2, r8 6f60: 83a0b000 movhi fp, #0 6f64: 8a000003 bhi 6f78 <_Heap_Walk+0x2c8> 6f68: e596b024 ldr fp, [r6, #36] ; 0x24 6f6c: e15b0008 cmp fp, r8 6f70: 33a0b000 movcc fp, #0 6f74: 23a0b001 movcs fp, #1 bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 6f78: e21bb0ff ands fp, fp, #255 ; 0xff 6f7c: 1a000007 bne 6fa0 <_Heap_Walk+0x2f0> (*printer)( 6f80: e58d8000 str r8, [sp] 6f84: e1a00005 mov r0, r5 6f88: e3a01001 mov r1, #1 6f8c: e59f2274 ldr r2, [pc, #628] ; 7208 <_Heap_Walk+0x558> 6f90: e1a03007 mov r3, r7 6f94: e1a0e00f mov lr, pc 6f98: e12fff14 bx r4 6f9c: ea00005e b 711c <_Heap_Walk+0x46c> 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; 6fa0: e59d2028 ldr r2, [sp, #40] ; 0x28 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 6fa4: e1a0000a mov r0, sl 6fa8: e1a01009 mov r1, r9 6fac: e057b002 subs fp, r7, r2 6fb0: 13a0b001 movne fp, #1 6fb4: e58d301c str r3, [sp, #28] 6fb8: ebffe6f9 bl ba4 <__umodsi3> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { 6fbc: e3500000 cmp r0, #0 6fc0: e59d301c ldr r3, [sp, #28] 6fc4: 0a000005 beq 6fe0 <_Heap_Walk+0x330> 6fc8: e35b0000 cmp fp, #0 (*printer)( 6fcc: 158da000 strne sl, [sp] 6fd0: 11a00005 movne r0, r5 6fd4: 13a01001 movne r1, #1 6fd8: 159f222c ldrne r2, [pc, #556] ; 720c <_Heap_Walk+0x55c> 6fdc: 1a000014 bne 7034 <_Heap_Walk+0x384> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { 6fe0: e59dc024 ldr ip, [sp, #36] ; 0x24 6fe4: e15a000c cmp sl, ip 6fe8: 2a000009 bcs 7014 <_Heap_Walk+0x364> 6fec: e35b0000 cmp fp, #0 6ff0: 0a000007 beq 7014 <_Heap_Walk+0x364> (*printer)( 6ff4: e88d1400 stm sp, {sl, ip} 6ff8: e1a00005 mov r0, r5 6ffc: e3a01001 mov r1, #1 7000: e59f2208 ldr r2, [pc, #520] ; 7210 <_Heap_Walk+0x560> 7004: e1a03007 mov r3, r7 7008: e1a0e00f mov lr, pc 700c: e12fff14 bx r4 7010: ea00006b b 71c4 <_Heap_Walk+0x514> ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { 7014: e1580007 cmp r8, r7 7018: 8a000009 bhi 7044 <_Heap_Walk+0x394> 701c: e35b0000 cmp fp, #0 7020: 0a000007 beq 7044 <_Heap_Walk+0x394> (*printer)( 7024: e58d8000 str r8, [sp] 7028: e59f21e4 ldr r2, [pc, #484] ; 7214 <_Heap_Walk+0x564> 702c: e1a00005 mov r0, r5 7030: e3a01001 mov r1, #1 7034: e1a03007 mov r3, r7 7038: e1a0e00f mov lr, pc 703c: e12fff14 bx r4 7040: ea00005f b 71c4 <_Heap_Walk+0x514> 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; 7044: e203b001 and fp, r3, #1 7048: e5983004 ldr r3, [r8, #4] ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 704c: e3130001 tst r3, #1 7050: 1a00003b bne 7144 <_Heap_Walk+0x494> 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 ? 7054: e597200c ldr r2, [r7, #12] Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 7058: e5963008 ldr r3, [r6, #8] 705c: e1520003 cmp r2, r3 block = next_block; } while ( block != first_block ); return true; } 7060: e596100c ldr r1, [r6, #12] Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 7064: 059f01ac ldreq r0, [pc, #428] ; 7218 <_Heap_Walk+0x568> 7068: 0a000003 beq 707c <_Heap_Walk+0x3cc> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 706c: e59f31a8 ldr r3, [pc, #424] ; 721c <_Heap_Walk+0x56c> 7070: e1520006 cmp r2, r6 7074: e59f01a4 ldr r0, [pc, #420] ; 7220 <_Heap_Walk+0x570> 7078: 01a00003 moveq r0, r3 block->next, block->next == last_free_block ? 707c: e5973008 ldr r3, [r7, #8] Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 7080: e1530001 cmp r3, r1 7084: 059f1198 ldreq r1, [pc, #408] ; 7224 <_Heap_Walk+0x574> 7088: 0a000003 beq 709c <_Heap_Walk+0x3ec> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 708c: e59fc194 ldr ip, [pc, #404] ; 7228 <_Heap_Walk+0x578> 7090: e1530006 cmp r3, r6 7094: e59f1184 ldr r1, [pc, #388] ; 7220 <_Heap_Walk+0x570> 7098: 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)( 709c: e58d2004 str r2, [sp, #4] 70a0: e58d0008 str r0, [sp, #8] 70a4: e58d300c str r3, [sp, #12] 70a8: e58d1010 str r1, [sp, #16] 70ac: e1a03007 mov r3, r7 70b0: e58da000 str sl, [sp] 70b4: e1a00005 mov r0, r5 70b8: e3a01000 mov r1, #0 70bc: e59f2168 ldr r2, [pc, #360] ; 722c <_Heap_Walk+0x57c> 70c0: e1a0e00f mov lr, pc 70c4: e12fff14 bx r4 block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 70c8: e5983000 ldr r3, [r8] 70cc: e15a0003 cmp sl, r3 70d0: 0a000009 beq 70fc <_Heap_Walk+0x44c> (*printer)( 70d4: e58d3004 str r3, [sp, #4] 70d8: e58da000 str sl, [sp] 70dc: e58d8008 str r8, [sp, #8] 70e0: e1a00005 mov r0, r5 70e4: e3a01001 mov r1, #1 70e8: e59f2140 ldr r2, [pc, #320] ; 7230 <_Heap_Walk+0x580> 70ec: e1a03007 mov r3, r7 70f0: e1a0e00f mov lr, pc 70f4: e12fff14 bx r4 70f8: ea000031 b 71c4 <_Heap_Walk+0x514> ); return false; } if ( !prev_used ) { 70fc: e35b0000 cmp fp, #0 7100: 1a000007 bne 7124 <_Heap_Walk+0x474> (*printer)( 7104: e59f2128 ldr r2, [pc, #296] ; 7234 <_Heap_Walk+0x584> 7108: e1a00005 mov r0, r5 710c: e3a01001 mov r1, #1 7110: e1a03007 mov r3, r7 7114: e1a0e00f mov lr, pc 7118: e12fff14 bx r4 return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 711c: e1a0800b mov r8, fp 7120: ea00001e b 71a0 <_Heap_Walk+0x4f0> block = next_block; } while ( block != first_block ); return true; } 7124: e5963008 ldr r3, [r6, #8] 7128: ea000002 b 7138 <_Heap_Walk+0x488> { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { if ( free_block == block ) { 712c: e1530007 cmp r3, r7 7130: 0a000016 beq 7190 <_Heap_Walk+0x4e0> return true; } free_block = free_block->next; 7134: 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 ) { 7138: e1530006 cmp r3, r6 713c: 1afffffa bne 712c <_Heap_Walk+0x47c> 7140: ea000019 b 71ac <_Heap_Walk+0x4fc> if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { 7144: e35b0000 cmp fp, #0 7148: 0a000007 beq 716c <_Heap_Walk+0x4bc> (*printer)( 714c: e58da000 str sl, [sp] 7150: e1a00005 mov r0, r5 7154: e3a01000 mov r1, #0 7158: e59f20d8 ldr r2, [pc, #216] ; 7238 <_Heap_Walk+0x588> 715c: e1a03007 mov r3, r7 7160: e1a0e00f mov lr, pc 7164: e12fff14 bx r4 7168: ea000008 b 7190 <_Heap_Walk+0x4e0> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 716c: e58da000 str sl, [sp] 7170: e5973000 ldr r3, [r7] 7174: e1a00005 mov r0, r5 7178: e58d3004 str r3, [sp, #4] 717c: e1a0100b mov r1, fp 7180: e59f20b4 ldr r2, [pc, #180] ; 723c <_Heap_Walk+0x58c> 7184: e1a03007 mov r3, r7 7188: e1a0e00f mov lr, pc 718c: e12fff14 bx r4 block->prev_size ); } block = next_block; } while ( block != first_block ); 7190: e59d2020 ldr r2, [sp, #32] 7194: e1580002 cmp r8, r2 7198: 1affff6a bne 6f48 <_Heap_Walk+0x298> Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; 719c: e3a08001 mov r8, #1 block = next_block; } while ( block != first_block ); return true; } 71a0: e1a00008 mov r0, r8 71a4: e28dd030 add sp, sp, #48 ; 0x30 71a8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 71ac: e59f208c ldr r2, [pc, #140] ; 7240 <_Heap_Walk+0x590> 71b0: e1a00005 mov r0, r5 71b4: e3a01001 mov r1, #1 71b8: e1a03007 mov r3, r7 71bc: e1a0e00f mov lr, pc 71c0: e12fff14 bx r4 return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 71c4: e3a08000 mov r8, #0 71c8: eafffff4 b 71a0 <_Heap_Walk+0x4f0> =============================================================================== 0000762c <_Thread_queue_Enqueue_priority>: 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 ); 762c: e281303c add r3, r1, #60 ; 0x3c Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 7630: e591c014 ldr ip, [r1, #20] head->next = tail; 7634: e5813038 str r3, [r1, #56] ; 0x38 head->previous = NULL; 7638: e3a03000 mov r3, #0 763c: e581303c str r3, [r1, #60] ; 0x3c header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 7640: e31c0020 tst ip, #32 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 7644: e2813038 add r3, r1, #56 ; 0x38 Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 7648: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; tail->previous = head; 764c: e5813040 str r3, [r1, #64] ; 0x40 _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state; 7650: e5908038 ldr r8, [r0, #56] ; 0x38 RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number ( Priority_Control the_priority ) { return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER); 7654: e1a0332c lsr r3, ip, #6 if ( _Thread_queue_Is_reverse_search( priority ) ) 7658: 1a000027 bne 76fc <_Thread_queue_Enqueue_priority+0xd0> * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 765c: e3a0700c mov r7, #12 7660: e0030397 mul r3, r7, r3 7664: e080a003 add sl, r0, r3 RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Tail(the_chain)); 7668: e2833004 add r3, r3, #4 766c: e0807003 add r7, r0, r3 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 7670: e10f4000 mrs r4, CPSR 7674: e3843080 orr r3, r4, #128 ; 0x80 7678: e129f003 msr CPSR_fc, r3 767c: e1a05004 mov r5, r4 if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; 7680: e3e06000 mvn r6, #0 _ISR_Disable( level ); search_thread = (Thread_Control *) _Chain_First( header ); 7684: e59a3000 ldr r3, [sl] while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 7688: ea00000b b 76bc <_Thread_queue_Enqueue_priority+0x90> search_priority = search_thread->current_priority; 768c: e5936014 ldr r6, [r3, #20] if ( priority <= search_priority ) 7690: e15c0006 cmp ip, r6 7694: 9a00000a bls 76c4 <_Thread_queue_Enqueue_priority+0x98> static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile ( 7698: e10f9000 mrs r9, CPSR 769c: e129f004 msr CPSR_fc, r4 76a0: e129f009 msr CPSR_fc, r9 RTEMS_INLINE_ROUTINE bool _States_Are_set ( States_Control the_states, States_Control mask ) { return ( (the_states & mask) != STATES_READY); 76a4: e5939010 ldr r9, [r3, #16] search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { 76a8: e1180009 tst r8, r9 76ac: 1a000001 bne 76b8 <_Thread_queue_Enqueue_priority+0x8c> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 76b0: e129f004 msr CPSR_fc, r4 76b4: eaffffed b 7670 <_Thread_queue_Enqueue_priority+0x44> _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 76b8: e5933000 ldr r3, [r3] restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) _Chain_First( header ); while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 76bc: e1530007 cmp r3, r7 76c0: 1afffff1 bne 768c <_Thread_queue_Enqueue_priority+0x60> } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 76c4: e5907030 ldr r7, [r0, #48] ; 0x30 76c8: e3570001 cmp r7, #1 76cc: 1a00003b bne 77c0 <_Thread_queue_Enqueue_priority+0x194> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 76d0: e3a02000 mov r2, #0 if ( priority == search_priority ) 76d4: e15c0006 cmp ip, r6 if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 76d8: e5802030 str r2, [r0, #48] ; 0x30 if ( priority == search_priority ) 76dc: 0a00002d beq 7798 <_Thread_queue_Enqueue_priority+0x16c> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 76e0: e5932004 ldr r2, [r3, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 76e4: e5813000 str r3, [r1] the_node->previous = previous_node; 76e8: e5812004 str r2, [r1, #4] previous_node->next = the_node; 76ec: e5821000 str r1, [r2] search_node->previous = the_node; 76f0: e5831004 str r1, [r3, #4] the_thread->Wait.queue = the_thread_queue; 76f4: e5810044 str r0, [r1, #68] ; 0x44 _ISR_Enable( level ); 76f8: ea000024 b 7790 <_Thread_queue_Enqueue_priority+0x164> * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 76fc: e3a0700c mov r7, #12 7700: e0270793 mla r7, r3, r7, 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; 7704: e59fa0c0 ldr sl, [pc, #192] ; 77cc <_Thread_queue_Enqueue_priority+0x1a0> 7708: e5da6000 ldrb r6, [sl] 770c: e2866001 add r6, r6, #1 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 7710: e10f4000 mrs r4, CPSR 7714: e3843080 orr r3, r4, #128 ; 0x80 7718: e129f003 msr CPSR_fc, r3 771c: e1a05004 mov r5, r4 _ISR_Disable( level ); search_thread = (Thread_Control *) _Chain_Last( header ); 7720: e5973008 ldr r3, [r7, #8] while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 7724: ea00000b b 7758 <_Thread_queue_Enqueue_priority+0x12c> search_priority = search_thread->current_priority; 7728: e5936014 ldr r6, [r3, #20] if ( priority >= search_priority ) 772c: e15c0006 cmp ip, r6 7730: 2a00000a bcs 7760 <_Thread_queue_Enqueue_priority+0x134> static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile ( 7734: e10f9000 mrs r9, CPSR 7738: e129f004 msr CPSR_fc, r4 773c: e129f009 msr CPSR_fc, r9 7740: e5939010 ldr r9, [r3, #16] search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { 7744: e1180009 tst r8, r9 7748: 1a000001 bne 7754 <_Thread_queue_Enqueue_priority+0x128> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 774c: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED 7750: eaffffec b 7708 <_Thread_queue_Enqueue_priority+0xdc> <== NOT EXECUTED _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) search_thread->Object.Node.previous; 7754: e5933004 ldr r3, [r3, #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 ) ) { 7758: e1530007 cmp r3, r7 775c: 1afffff1 bne 7728 <_Thread_queue_Enqueue_priority+0xfc> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 7760: e5907030 ldr r7, [r0, #48] ; 0x30 7764: e3570001 cmp r7, #1 7768: 1a000014 bne 77c0 <_Thread_queue_Enqueue_priority+0x194> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 776c: e3a02000 mov r2, #0 if ( priority == search_priority ) 7770: e15c0006 cmp ip, r6 if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 7774: e5802030 str r2, [r0, #48] ; 0x30 if ( priority == search_priority ) 7778: 0a000006 beq 7798 <_Thread_queue_Enqueue_priority+0x16c> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 777c: e5932000 ldr r2, [r3] the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 7780: e881000c stm r1, {r2, r3} search_node->next = the_node; next_node->previous = the_node; 7784: e5821004 str r1, [r2, #4] next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; search_node->next = the_node; 7788: e5831000 str r1, [r3] next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 778c: e5810044 str r0, [r1, #68] ; 0x44 7790: e129f004 msr CPSR_fc, r4 7794: ea000007 b 77b8 <_Thread_queue_Enqueue_priority+0x18c> _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 7798: e5932040 ldr r2, [r3, #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 ); 779c: e283c03c add ip, r3, #60 ; 0x3c previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; 77a0: e581c000 str ip, [r1] the_node->previous = previous_node; 77a4: e5812004 str r2, [r1, #4] previous_node->next = the_node; 77a8: e5821000 str r1, [r2] search_node->previous = the_node; 77ac: e5831040 str r1, [r3, #64] ; 0x40 the_thread->Wait.queue = the_thread_queue; 77b0: e5810044 str r0, [r1, #68] ; 0x44 77b4: e129f005 msr CPSR_fc, r5 _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 77b8: e3a00001 mov r0, #1 77bc: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 77c0: e5825000 str r5, [r2] return the_thread_queue->sync_state; 77c4: e5900030 ldr r0, [r0, #48] ; 0x30 } 77c8: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} =============================================================================== 00005788 : * operation(s) cannot be canceled */ int aio_cancel(int fildes, struct aiocb *aiocbp) { 5788: e92d40f0 push {r4, r5, r6, r7, lr} rtems_aio_request_chain *r_chain; int result; pthread_mutex_lock (&aio_request_queue.mutex); 578c: e59f419c ldr r4, [pc, #412] ; 5930 * operation(s) cannot be canceled */ int aio_cancel(int fildes, struct aiocb *aiocbp) { 5790: e1a05001 mov r5, r1 5794: e1a07000 mov r7, r0 rtems_aio_request_chain *r_chain; int result; pthread_mutex_lock (&aio_request_queue.mutex); 5798: e1a00004 mov r0, r4 579c: eb000407 bl 67c0 if (aiocbp == NULL) 57a0: e3550000 cmp r5, #0 57a4: 1a000035 bne 5880 { if (fcntl (fildes, F_GETFL) < 0) { 57a8: e1a00007 mov r0, r7 57ac: e3a01003 mov r1, #3 57b0: eb0019fb bl bfa4 57b4: e3500000 cmp r0, #0 57b8: aa000004 bge 57d0 pthread_mutex_unlock(&aio_request_queue.mutex); 57bc: e1a00004 mov r0, r4 57c0: eb00041d bl 683c rtems_set_errno_and_return_minus_one (EBADF); 57c4: eb002710 bl f40c <__errno> 57c8: e3a03009 mov r3, #9 57cc: ea000032 b 589c } r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, 57d0: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED 57d4: e1a01007 mov r1, r7 <== NOT EXECUTED 57d8: e1a02005 mov r2, r5 <== NOT EXECUTED 57dc: eb0000a4 bl 5a74 <== NOT EXECUTED fildes, 0); if (r_chain == NULL) 57e0: e2506000 subs r6, r0, #0 <== NOT EXECUTED 57e4: 1a00001b bne 5858 <== NOT EXECUTED { if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) 57e8: e5942054 ldr r2, [r4, #84] ; 0x54 <== NOT EXECUTED 57ec: e2843058 add r3, r4, #88 ; 0x58 <== NOT EXECUTED 57f0: e1520003 cmp r2, r3 <== NOT EXECUTED 57f4: 0a000013 beq 5848 <== NOT EXECUTED { r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, 57f8: e2840054 add r0, r4, #84 ; 0x54 <== NOT EXECUTED 57fc: e1a01007 mov r1, r7 <== NOT EXECUTED 5800: e1a02006 mov r2, r6 <== NOT EXECUTED 5804: eb00009a bl 5a74 <== NOT EXECUTED fildes, 0); if (r_chain == NULL) { 5808: e2505000 subs r5, r0, #0 <== NOT EXECUTED 580c: 0a00000d beq 5848 <== NOT EXECUTED return AIO_ALLDONE; } rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); pthread_mutex_destroy (&r_chain->mutex); 5810: e285701c add r7, r5, #28 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 5814: eb000a00 bl 801c <_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); 5818: e1a00005 mov r0, r5 <== NOT EXECUTED 581c: eb00016b bl 5dd0 <== NOT EXECUTED pthread_mutex_destroy (&r_chain->mutex); 5820: e1a00007 mov r0, r7 <== NOT EXECUTED 5824: eb000347 bl 6548 <== NOT EXECUTED pthread_cond_destroy (&r_chain->mutex); 5828: e1a00007 mov r0, r7 <== NOT EXECUTED 582c: eb000279 bl 6218 <== NOT EXECUTED free (r_chain); 5830: e1a00005 mov r0, r5 <== NOT EXECUTED 5834: ebfff420 bl 28bc <== NOT EXECUTED pthread_mutex_unlock (&aio_request_queue.mutex); 5838: e1a00004 mov r0, r4 <== NOT EXECUTED 583c: eb0003fe bl 683c <== NOT EXECUTED return AIO_CANCELED; 5840: e1a05006 mov r5, r6 <== NOT EXECUTED 5844: ea000037 b 5928 <== NOT EXECUTED } pthread_mutex_unlock (&aio_request_queue.mutex); 5848: e1a00004 mov r0, r4 <== NOT EXECUTED 584c: eb0003fa bl 683c <== NOT EXECUTED return AIO_ALLDONE; 5850: e3a05002 mov r5, #2 <== NOT EXECUTED 5854: ea000033 b 5928 <== NOT EXECUTED } pthread_mutex_lock (&r_chain->mutex); 5858: e286701c add r7, r6, #28 <== NOT EXECUTED 585c: e1a00007 mov r0, r7 <== NOT EXECUTED 5860: eb0003d6 bl 67c0 <== NOT EXECUTED 5864: e1a00006 mov r0, r6 <== NOT EXECUTED 5868: eb0009eb bl 801c <_Chain_Extract> <== NOT EXECUTED rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); 586c: e1a00006 mov r0, r6 <== NOT EXECUTED 5870: eb000156 bl 5dd0 <== NOT EXECUTED pthread_mutex_unlock (&r_chain->mutex); 5874: e1a00007 mov r0, r7 <== NOT EXECUTED 5878: eb0003ef bl 683c <== NOT EXECUTED 587c: ea00001c b 58f4 <== NOT EXECUTED pthread_mutex_unlock (&aio_request_queue.mutex); return AIO_CANCELED; } else { if (aiocbp->aio_fildes != fildes) { 5880: e5956000 ldr r6, [r5] 5884: e1560007 cmp r6, r7 5888: 0a000006 beq 58a8 pthread_mutex_unlock (&aio_request_queue.mutex); 588c: e1a00004 mov r0, r4 5890: eb0003e9 bl 683c rtems_set_errno_and_return_minus_one (EINVAL); 5894: eb0026dc bl f40c <__errno> 5898: e3a03016 mov r3, #22 589c: e5803000 str r3, [r0] 58a0: e3e05000 mvn r5, #0 58a4: ea00001f b 5928 } r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, 58a8: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED 58ac: e1a01006 mov r1, r6 <== NOT EXECUTED 58b0: e3a02000 mov r2, #0 <== NOT EXECUTED 58b4: eb00006e bl 5a74 <== NOT EXECUTED fildes, 0); if (r_chain == NULL) 58b8: e2507000 subs r7, r0, #0 <== NOT EXECUTED 58bc: 1a00000e bne 58fc <== NOT EXECUTED if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) 58c0: e5942054 ldr r2, [r4, #84] ; 0x54 <== NOT EXECUTED 58c4: e2843058 add r3, r4, #88 ; 0x58 <== NOT EXECUTED 58c8: e1520003 cmp r2, r3 <== NOT EXECUTED 58cc: 0a00000a beq 58fc <== NOT EXECUTED { r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, 58d0: e2840054 add r0, r4, #84 ; 0x54 <== NOT EXECUTED 58d4: e1a01006 mov r1, r6 <== NOT EXECUTED 58d8: e1a02007 mov r2, r7 <== NOT EXECUTED 58dc: eb000064 bl 5a74 <== NOT EXECUTED fildes, 0); if (r_chain == NULL) 58e0: e3500000 cmp r0, #0 <== NOT EXECUTED 58e4: 0affffe8 beq 588c <== 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); 58e8: e1a01005 mov r1, r5 <== NOT EXECUTED 58ec: eb000147 bl 5e10 <== NOT EXECUTED 58f0: e1a05000 mov r5, r0 <== NOT EXECUTED pthread_mutex_unlock (&aio_request_queue.mutex); 58f4: e1a00004 mov r0, r4 <== NOT EXECUTED 58f8: ea000009 b 5924 <== NOT EXECUTED return result; } pthread_mutex_lock (&r_chain->mutex); 58fc: e287401c add r4, r7, #28 <== NOT EXECUTED 5900: e1a00004 mov r0, r4 <== NOT EXECUTED 5904: eb0003ad bl 67c0 <== NOT EXECUTED result = rtems_aio_remove_req (&r_chain->next_fd, aiocbp); 5908: e1a01005 mov r1, r5 <== NOT EXECUTED 590c: e1a00007 mov r0, r7 <== NOT EXECUTED 5910: eb00013e bl 5e10 <== NOT EXECUTED 5914: e1a05000 mov r5, r0 <== NOT EXECUTED pthread_mutex_unlock (&r_chain->mutex); 5918: e1a00004 mov r0, r4 <== NOT EXECUTED 591c: eb0003c6 bl 683c <== NOT EXECUTED pthread_mutex_unlock (&aio_request_queue.mutex); 5920: e59f0008 ldr r0, [pc, #8] ; 5930 <== NOT EXECUTED 5924: eb0003c4 bl 683c <== NOT EXECUTED return result; } return AIO_ALLDONE; } 5928: e1a00005 mov r0, r5 592c: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== 0000593c : ) { rtems_aio_request *req; int mode; if (op != O_SYNC) 593c: e3500a02 cmp r0, #8192 ; 0x2000 int aio_fsync( int op, struct aiocb *aiocbp ) { 5940: e92d4030 push {r4, r5, lr} 5944: e1a04001 mov r4, r1 rtems_aio_request *req; int mode; if (op != O_SYNC) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); 5948: 13a05016 movne r5, #22 ) { rtems_aio_request *req; int mode; if (op != O_SYNC) 594c: 1a00000c bne 5984 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); mode = fcntl (aiocbp->aio_fildes, F_GETFL); 5950: e5910000 ldr r0, [r1] 5954: e3a01003 mov r1, #3 5958: eb001991 bl bfa4 if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) 595c: e2000003 and r0, r0, #3 5960: e2400001 sub r0, r0, #1 5964: e3500001 cmp r0, #1 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 5968: 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))) 596c: 8a000004 bhi 5984 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); req = malloc (sizeof (rtems_aio_request)); 5970: e3a00018 mov r0, #24 5974: ebfff536 bl 2e54 <== NOT EXECUTED if (req == NULL) 5978: e2503000 subs r3, r0, #0 <== NOT EXECUTED 597c: 1a000007 bne 59a0 <== NOT EXECUTED rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 5980: e3a0500b mov r5, #11 <== NOT EXECUTED 5984: e3e03000 mvn r3, #0 5988: e5845030 str r5, [r4, #48] ; 0x30 598c: e5843034 str r3, [r4, #52] ; 0x34 5990: eb00269d bl f40c <__errno> 5994: e5805000 str r5, [r0] req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); } 5998: e3e00000 mvn r0, #0 599c: e8bd8030 pop {r4, r5, pc} req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; 59a0: e5834014 str r4, [r3, #20] req->aiocbp->aio_lio_opcode = LIO_SYNC; 59a4: e3a03003 mov r3, #3 <== NOT EXECUTED 59a8: e584302c str r3, [r4, #44] ; 0x2c <== NOT EXECUTED return rtems_aio_enqueue (req); } 59ac: 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); 59b0: ea00012c b 5e68 <== NOT EXECUTED =============================================================================== 00006078 : * 0 - otherwise */ int aio_read (struct aiocb *aiocbp) { 6078: e92d4030 push {r4, r5, lr} rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 607c: e3a01003 mov r1, #3 * 0 - otherwise */ int aio_read (struct aiocb *aiocbp) { 6080: e1a04000 mov r4, r0 rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 6084: e5900000 ldr r0, [r0] 6088: eb0017c5 bl bfa4 if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR))) 608c: e2000003 and r0, r0, #3 6090: e3500002 cmp r0, #2 6094: 13500000 cmpne r0, #0 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 6098: 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))) 609c: 1a00000d bne 60d8 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) 60a0: e5943014 ldr r3, [r4, #20] 60a4: e3530000 cmp r3, #0 60a8: 1a000007 bne 60cc rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) 60ac: e5943008 ldr r3, [r4, #8] 60b0: e3530000 cmp r3, #0 60b4: ba000004 blt 60cc rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); 60b8: e3a00018 mov r0, #24 60bc: ebfff364 bl 2e54 if (req == NULL) 60c0: e2503000 subs r3, r0, #0 60c4: 1a00000a bne 60f4 60c8: ea000001 b 60d4 <== NOT EXECUTED 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); 60cc: e3a05016 mov r5, #22 60d0: ea000000 b 60d8 req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 60d4: e3a0500b mov r5, #11 <== NOT EXECUTED 60d8: e3e03000 mvn r3, #0 60dc: e5845030 str r5, [r4, #48] ; 0x30 60e0: e5843034 str r3, [r4, #52] ; 0x34 60e4: eb0024c8 bl f40c <__errno> 60e8: e5805000 str r5, [r0] req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); } 60ec: e3e00000 mvn r0, #0 60f0: e8bd8030 pop {r4, r5, pc} req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; 60f4: e5834014 str r4, [r3, #20] req->aiocbp->aio_lio_opcode = LIO_READ; 60f8: e3a03001 mov r3, #1 60fc: e584302c str r3, [r4, #44] ; 0x2c return rtems_aio_enqueue (req); } 6100: 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); 6104: eaffff57 b 5e68 =============================================================================== 00006110 : * 0 - otherwise */ int aio_write (struct aiocb *aiocbp) { 6110: e92d4030 push {r4, r5, lr} rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 6114: e3a01003 mov r1, #3 * 0 - otherwise */ int aio_write (struct aiocb *aiocbp) { 6118: e1a04000 mov r4, r0 rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 611c: e5900000 ldr r0, [r0] 6120: eb00179f bl bfa4 if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) 6124: e2000003 and r0, r0, #3 6128: e2400001 sub r0, r0, #1 612c: e3500001 cmp r0, #1 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 6130: 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))) 6134: 8a00000d bhi 6170 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) 6138: e5943014 ldr r3, [r4, #20] 613c: e3530000 cmp r3, #0 6140: 1a000007 bne 6164 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) 6144: e5943008 ldr r3, [r4, #8] 6148: e3530000 cmp r3, #0 614c: ba000004 blt 6164 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); 6150: e3a00018 mov r0, #24 6154: ebfff33e bl 2e54 if (req == NULL) 6158: e2503000 subs r3, r0, #0 615c: 1a00000a bne 618c 6160: ea000001 b 616c <== NOT EXECUTED 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); 6164: e3a05016 mov r5, #22 6168: ea000000 b 6170 req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 616c: e3a0500b mov r5, #11 <== NOT EXECUTED 6170: e3e03000 mvn r3, #0 6174: e5845030 str r5, [r4, #48] ; 0x30 6178: e5843034 str r3, [r4, #52] ; 0x34 617c: eb0024a2 bl f40c <__errno> 6180: e5805000 str r5, [r0] req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); } 6184: e3e00000 mvn r0, #0 6188: e8bd8030 pop {r4, r5, pc} req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; 618c: e5834014 str r4, [r3, #20] req->aiocbp->aio_lio_opcode = LIO_WRITE; 6190: e3a03002 mov r3, #2 6194: e584302c str r3, [r4, #44] ; 0x2c return rtems_aio_enqueue (req); } 6198: 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); 619c: eaffff31 b 5e68 =============================================================================== 00008614 : const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 8614: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) 8618: e3d27007 bics r7, r2, #7 const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 861c: e1a09000 mov r9, r0 8620: e1a04001 mov r4, r1 8624: e1a05003 mov r5, r3 int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) 8628: 0a000002 beq 8638 rtems_set_errno_and_return_minus_one( EPERM ); 862c: eb000999 bl ac98 <__errno> <== NOT EXECUTED 8630: e3a03001 mov r3, #1 <== NOT EXECUTED 8634: ea000005 b 8650 <== NOT EXECUTED /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 8638: e5936000 ldr r6, [r3] if (!device_name_table) 863c: e3560000 cmp r6, #0 rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 8640: 159fa094 ldrne sl, [pc, #148] ; 86dc if ( !rtems_libio_is_valid_perms( flags ) ) rtems_set_errno_and_return_minus_one( EPERM ); /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) 8644: 1a00001c bne 86bc rtems_set_errno_and_return_minus_one( EFAULT ); 8648: eb000992 bl ac98 <__errno> 864c: e3a0300e mov r3, #14 8650: e5803000 str r3, [r0] 8654: e3e00000 mvn r0, #0 8658: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) 865c: e5968000 ldr r8, [r6] 8660: e3580000 cmp r8, #0 8664: 0a000012 beq 86b4 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 8668: e1a00009 mov r0, r9 866c: e1a01008 mov r1, r8 8670: e1a02004 mov r2, r4 8674: eb000d0e bl bab4 8678: e3500000 cmp r0, #0 867c: 1a00000c bne 86b4 continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 8680: e7d80004 ldrb r0, [r8, r4] 8684: e3500000 cmp r0, #0 8688: 1a000009 bne 86b4 continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; 868c: e59f304c ldr r3, [pc, #76] ; 86e0 8690: e5853008 str r3, [r5, #8] pathloc->ops = &devFS_ops; 8694: e59f3048 ldr r3, [pc, #72] ; 86e4 8698: e585300c str r3, [r5, #12] pathloc->mt_entry = rtems_filesystem_root.mt_entry; 869c: e59f3044 ldr r3, [pc, #68] ; 86e8 86a0: e5933000 ldr r3, [r3] 86a4: 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]; 86a8: e5856000 str r6, [r5] pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; 86ac: e5853010 str r3, [r5, #16] return 0; 86b0: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 86b4: e2877001 add r7, r7, #1 86b8: e2866014 add r6, r6, #20 86bc: e59a3000 ldr r3, [sl] 86c0: e1570003 cmp r7, r3 86c4: 3affffe4 bcc 865c pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 86c8: eb000972 bl ac98 <__errno> 86cc: e3a03002 mov r3, #2 86d0: e5803000 str r3, [r0] 86d4: e3e00000 mvn r0, #0 } 86d8: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} =============================================================================== 00002b10 : drainOutput (struct rtems_termios_tty *tty) { rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 2b10: e59030b4 ldr r3, [r0, #180] ; 0xb4 2b14: e3530000 cmp r3, #0 /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 2b18: e92d4030 push {r4, r5, lr} 2b1c: e1a04000 mov r4, r0 rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 2b20: 08bd8030 popeq {r4, r5, pc} rtems_interrupt_disable (level); 2b24: ebfffff5 bl 2b00 while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { tty->rawOutBufState = rob_wait; 2b28: e3a05002 mov r5, #2 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) { 2b2c: ea000008 b 2b54 tty->rawOutBufState = rob_wait; 2b30: e5845094 str r5, [r4, #148] ; 0x94 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 2b34: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain( 2b38: e3a01000 mov r1, #0 <== NOT EXECUTED 2b3c: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED 2b40: e1a02001 mov r2, r1 <== NOT EXECUTED 2b44: eb0008cc bl 4e7c <== NOT EXECUTED tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 2b48: e3500000 cmp r0, #0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 2b4c: 1b000a66 blne 54ec <== NOT EXECUTED rtems_interrupt_disable (level); 2b50: ebffffea bl 2b00 <== 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) { 2b54: e5942084 ldr r2, [r4, #132] ; 0x84 2b58: e5943080 ldr r3, [r4, #128] ; 0x80 2b5c: e1520003 cmp r2, r3 2b60: 1afffff2 bne 2b30 2b64: e129f000 msr CPSR_fc, r0 2b68: e8bd8030 pop {r4, r5, pc} =============================================================================== 000037f0 : * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) 37f0: e5903020 ldr r3, [r0, #32] 37f4: 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) { 37f8: e92d41f0 push {r4, r5, r6, r7, r8, lr} 37fc: e1a04000 mov r4, r0 3800: e1a07001 mov r7, r1 if (tty->ccount == 0) 3804: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} return; if (lineFlag) { 3808: e3510000 cmp r1, #0 380c: 0a000060 beq 3994 if (!(tty->termios.c_lflag & ECHO)) { 3810: e590303c ldr r3, [r0, #60] ; 0x3c 3814: e2132008 ands r2, r3, #8 tty->ccount = 0; 3818: 05802020 streq r2, [r0, #32] erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { 381c: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 3820: e2133010 ands r3, r3, #16 3824: 1a00005a bne 3994 tty->ccount = 0; 3828: e5803020 str r3, [r0, #32] <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 382c: e1a01004 mov r1, r4 <== NOT EXECUTED 3830: e5d00044 ldrb r0, [r0, #68] ; 0x44 <== NOT EXECUTED 3834: ebffffca bl 3764 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 3838: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 383c: e3130020 tst r3, #32 <== NOT EXECUTED echo ('\n', tty); 3840: 13a0000a movne r0, #10 <== NOT EXECUTED return; } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); if (tty->termios.c_lflag & ECHOK) 3844: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 3848: ea00000b b 387c <== NOT EXECUTED return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 384c: e2411001 sub r1, r1, #1 if (tty->termios.c_lflag & ECHO) { 3850: e594303c ldr r3, [r4, #60] ; 0x3c return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 3854: e594001c ldr r0, [r4, #28] 3858: e5841020 str r1, [r4, #32] if (tty->termios.c_lflag & ECHO) { 385c: e3130008 tst r3, #8 return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 3860: e7d05001 ldrb r5, [r0, r1] if (tty->termios.c_lflag & ECHO) { 3864: 0a000047 beq 3988 if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 3868: e3570000 cmp r7, #0 386c: 1a000005 bne 3888 3870: e3130010 tst r3, #16 3874: 1a000003 bne 3888 echo (tty->termios.c_cc[VERASE], tty); 3878: e5d40043 ldrb r0, [r4, #67] ; 0x43 <== NOT EXECUTED 387c: e1a01004 mov r1, r4 <== NOT EXECUTED } } if (!lineFlag) break; } } 3880: e8bd41f0 pop {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); 3884: eaffffb6 b 3764 <== NOT EXECUTED } else if (c == '\t') { 3888: e3550009 cmp r5, #9 388c: 1a00001f bne 3910 int col = tty->read_start_column; 3890: e594502c ldr r5, [r4, #44] ; 0x2c */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 3894: e5968000 ldr r8, [r6] 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; 3898: 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) 389c: e2033c02 and r3, r3, #512 ; 0x200 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 38a0: ea00000c b 38d8 c = tty->cbuf[i++]; 38a4: e7d0c002 ldrb ip, [r0, r2] if (c == '\t') { 38a8: e35c0009 cmp ip, #9 /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 38ac: e2822001 add r2, r2, #1 if (c == '\t') { col = (col | 7) + 1; 38b0: 03855007 orreq r5, r5, #7 /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { 38b4: 0a000006 beq 38d4 col = (col | 7) + 1; } else if (iscntrl (c)) { 38b8: e088c00c add ip, r8, ip 38bc: e5dcc001 ldrb ip, [ip, #1] 38c0: e31c0020 tst ip, #32 38c4: 0a000002 beq 38d4 if (tty->termios.c_lflag & ECHOCTL) 38c8: e3530000 cmp r3, #0 <== NOT EXECUTED col += 2; 38cc: 12855002 addne r5, r5, #2 <== NOT EXECUTED 38d0: ea000000 b 38d8 <== NOT EXECUTED } else { col++; 38d4: e2855001 add r5, r5, #1 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 38d8: e1520001 cmp r2, r1 38dc: 1afffff0 bne 38a4 38e0: ea000006 b 3900 /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 38e4: e59f00bc ldr r0, [pc, #188] ; 39a8 38e8: e3a01001 mov r1, #1 38ec: e1a02004 mov r2, r4 38f0: ebffff07 bl 3514 tty->column--; 38f4: e5943028 ldr r3, [r4, #40] ; 0x28 38f8: e2433001 sub r3, r3, #1 38fc: e5843028 str r3, [r4, #40] ; 0x28 } /* * Back up over the tab */ while (tty->column > col) { 3900: e5943028 ldr r3, [r4, #40] ; 0x28 3904: e1530005 cmp r3, r5 3908: cafffff5 bgt 38e4 390c: ea00001d b 3988 rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 3910: e5962000 ldr r2, [r6] 3914: e2855001 add r5, r5, #1 3918: e7d22005 ldrb r2, [r2, r5] 391c: e3120020 tst r2, #32 3920: 0a000009 beq 394c 3924: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED 3928: 0a000007 beq 394c <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 392c: e59f0078 ldr r0, [pc, #120] ; 39ac <== NOT EXECUTED 3930: e3a01003 mov r1, #3 <== NOT EXECUTED 3934: e1a02004 mov r2, r4 <== NOT EXECUTED 3938: ebfffef5 bl 3514 <== NOT EXECUTED if (tty->column) 393c: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 3940: e3530000 cmp r3, #0 <== NOT EXECUTED tty->column--; 3944: 12433001 subne r3, r3, #1 <== NOT EXECUTED 3948: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 394c: e5963000 ldr r3, [r6] 3950: e7d33005 ldrb r3, [r3, r5] 3954: e3130020 tst r3, #32 3958: 0a000002 beq 3968 395c: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 3960: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED 3964: 0a000007 beq 3988 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 3968: e59f003c ldr r0, [pc, #60] ; 39ac 396c: e3a01003 mov r1, #3 3970: e1a02004 mov r2, r4 3974: ebfffee6 bl 3514 if (tty->column) 3978: e5943028 ldr r3, [r4, #40] ; 0x28 397c: e3530000 cmp r3, #0 tty->column--; 3980: 12433001 subne r3, r3, #1 3984: 15843028 strne r3, [r4, #40] ; 0x28 } } } if (!lineFlag) 3988: e3570000 cmp r7, #0 398c: 1a000001 bne 3998 3990: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 3994: e59f6014 ldr r6, [pc, #20] ; 39b0 echo ('\n', tty); return; } } while (tty->ccount) { 3998: e5941020 ldr r1, [r4, #32] 399c: e3510000 cmp r1, #0 39a0: 1affffa9 bne 384c 39a4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} =============================================================================== 000025ac : int fcntl( int fd, int cmd, ... ) { 25ac: e92d000e push {r1, r2, r3} 25b0: e92d40f1 push {r0, r4, r5, r6, r7, lr} int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 25b4: e59f21a4 ldr r2, [pc, #420] ; 2760 25b8: e5921000 ldr r1, [r2] ... ) { int ret; va_list ap; va_start( ap, cmd ); 25bc: e28d301c add r3, sp, #28 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 25c0: e1500001 cmp r0, r1 int fcntl( int fd, int cmd, ... ) { 25c4: e59d7018 ldr r7, [sp, #24] int ret; va_list ap; va_start( ap, cmd ); 25c8: e58d3000 str r3, [sp] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 25cc: 2a000006 bcs 25ec iop = rtems_libio_iop( fd ); 25d0: e59f218c ldr r2, [pc, #396] ; 2764 25d4: e5922000 ldr r2, [r2] 25d8: e3a04038 mov r4, #56 ; 0x38 25dc: e0242490 mla r4, r0, r4, r2 rtems_libio_check_is_open(iop); 25e0: e5940014 ldr r0, [r4, #20] 25e4: e3100c01 tst r0, #256 ; 0x100 25e8: 1a000002 bne 25f8 25ec: eb002d1e bl da6c <__errno> 25f0: e3a03009 mov r3, #9 25f4: ea000047 b 2718 /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 25f8: e3570009 cmp r7, #9 25fc: 979ff107 ldrls pc, [pc, r7, lsl #2] 2600: ea000042 b 2710 2604: 0000262c .word 0x0000262c 2608: 0000269c .word 0x0000269c 260c: 000026ac .word 0x000026ac 2610: 000026cc .word 0x000026cc 2614: 000026d8 .word 0x000026d8 2618: 00002704 .word 0x00002704 261c: 00002704 .word 0x00002704 2620: 00002704 .word 0x00002704 2624: 00002704 .word 0x00002704 2628: 00002704 .word 0x00002704 case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 262c: e5933000 ldr r3, [r3] if ( fd2 ) 2630: e3530000 cmp r3, #0 2634: 0a000004 beq 264c diop = rtems_libio_iop( fd2 ); 2638: e1530001 cmp r3, r1 263c: 33a06038 movcc r6, #56 ; 0x38 2640: 30262693 mlacc r6, r3, r6, r2 2644: 3a000005 bcc 2660 2648: ea000003 b 265c <== NOT EXECUTED else { /* allocate a file control block */ diop = rtems_libio_allocate(); 264c: eb000190 bl 2c94 if ( diop == 0 ) { 2650: e2506000 subs r6, r0, #0 2654: 1a000001 bne 2660 2658: ea00003b b 274c <== NOT EXECUTED switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); 265c: e3a06000 mov r6, #0 <== NOT EXECUTED ret = -1; break; } } diop->flags = iop->flags; 2660: e5943014 ldr r3, [r4, #20] diop->pathinfo = iop->pathinfo; 2664: e2845018 add r5, r4, #24 ret = -1; break; } } diop->flags = iop->flags; 2668: e5863014 str r3, [r6, #20] diop->pathinfo = iop->pathinfo; 266c: e8b5000f ldm r5!, {r0, r1, r2, r3} 2670: e286c018 add ip, r6, #24 2674: e8ac000f stmia ip!, {r0, r1, r2, r3} 2678: e5953000 ldr r3, [r5] 267c: e58c3000 str r3, [ip] ret = (int) (diop - rtems_libio_iops); 2680: e59f30dc ldr r3, [pc, #220] ; 2764 2684: e5933000 ldr r3, [r3] 2688: e0636006 rsb r6, r3, r6 268c: e59f30d4 ldr r3, [pc, #212] ; 2768 2690: e1a061c6 asr r6, r6, #3 2694: e0060693 mul r6, r3, r6 2698: ea000020 b 2720 break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 269c: e3100b02 tst r0, #2048 ; 0x800 26a0: 03a06000 moveq r6, #0 26a4: 13a06001 movne r6, #1 26a8: ea00001e b 2728 * 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 ) ) 26ac: e5936000 ldr r6, [r3] 26b0: e3560000 cmp r6, #0 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 26b4: 13800b02 orrne r0, r0, #2048 ; 0x800 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 26b8: 03c00b02 biceq r0, r0, #2048 ; 0x800 * processes, then we can ignore this one except to make * F_GETFD work. */ if ( va_arg( ap, int ) ) iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 26bc: 15840014 strne r0, [r4, #20] else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 26c0: 05840014 streq r0, [r4, #20] * if a new process is exec()'ed. Since RTEMS does not support * processes, then we can ignore this one except to make * F_GETFD work. */ if ( va_arg( ap, int ) ) 26c4: 0a000017 beq 2728 26c8: ea00000b b 26fc else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 26cc: eb00015e bl 2c4c 26d0: e1a06000 mov r6, r0 26d4: ea000011 b 2720 break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 26d8: e5930000 ldr r0, [r3] 26dc: eb00014d bl 2c18 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 26e0: e5942014 ldr r2, [r4, #20] 26e4: e59f3080 ldr r3, [pc, #128] ; 276c 26e8: e3c22c02 bic r2, r2, #512 ; 0x200 26ec: e0003003 and r3, r0, r3 26f0: e3c22001 bic r2, r2, #1 26f4: e1833002 orr r3, r3, r2 26f8: e5843014 str r3, [r4, #20] rtems_libio_t *iop; rtems_libio_t *diop; int fd2; int flags; int mask; int ret = 0; 26fc: e3a06000 mov r6, #0 2700: ea000008 b 2728 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 2704: eb002cd8 bl da6c <__errno> 2708: e3a03086 mov r3, #134 ; 0x86 270c: ea000001 b 2718 ret = -1; break; default: errno = EINVAL; 2710: eb002cd5 bl da6c <__errno> 2714: e3a03016 mov r3, #22 2718: e5803000 str r3, [r0] 271c: ea00000a b 274c /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 2720: e3560000 cmp r6, #0 2724: ba000009 blt 2750 int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop ); 2728: e5943020 ldr r3, [r4, #32] 272c: e1a01004 mov r1, r4 2730: e1a00007 mov r0, r7 2734: e1a0e00f mov lr, pc 2738: e593f030 ldr pc, [r3, #48] ; 0x30 if (err) { 273c: e2504000 subs r4, r0, #0 2740: 0a000002 beq 2750 errno = err; 2744: eb002cc8 bl da6c <__errno> <== NOT EXECUTED 2748: e5804000 str r4, [r0] <== NOT EXECUTED ret = -1; 274c: e3e06000 mvn r6, #0 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 2750: e1a00006 mov r0, r6 2754: e8bd40f8 pop {r3, r4, r5, r6, r7, lr} 2758: e28dd00c add sp, sp, #12 275c: e12fff1e bx lr =============================================================================== 0000b3c8 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { b3c8: e92d45f7 push {r0, r1, r2, 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) { b3cc: e59f53bc ldr r5, [pc, #956] ; b790 b3d0: e5954000 ldr r4, [r5] b3d4: e3540000 cmp r4, #0 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { b3d8: e1a08000 mov r8, r0 b3dc: e1a07001 mov r7, r1 static rtems_status_code pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { b3e0: 1a000012 bne b430 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 ); b3e4: e59f33a8 ldr r3, [pc, #936] ; b794 b3e8: e1a01004 mov r1, r4 b3ec: e5930000 ldr r0, [r3] b3f0: e1a02004 mov r2, r4 b3f4: ebffeea9 bl 6ea0 rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { b3f8: e5953000 ldr r3, [r5] b3fc: e3530000 cmp r3, #0 b400: 1a000005 bne b41c sc = rtems_semaphore_create( b404: e59f038c ldr r0, [pc, #908] ; b798 b408: e3a01001 mov r1, #1 b40c: e3a02054 mov r2, #84 ; 0x54 b410: e58d5000 str r5, [sp] b414: ebffee0f bl 6c58 b418: e1a04000 mov r4, r0 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); b41c: e59f3370 ldr r3, [pc, #880] ; b794 b420: e5930000 ldr r0, [r3] b424: ebffeee3 bl 6fb8 } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { b428: e3540000 cmp r4, #0 b42c: 1a000006 bne b44c sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); b430: e59f3358 ldr r3, [pc, #856] ; b790 b434: e3a01000 mov r1, #0 b438: e5930000 ldr r0, [r3] b43c: e1a02001 mov r2, r1 b440: ebffee96 bl 6ea0 } if (sc == RTEMS_SUCCESSFUL) { b444: e2505000 subs r5, r0, #0 b448: 0a000000 beq b450 return 0; } else { return -ENOMEM; b44c: e3e0500b mvn r5, #11 { pipe_control_t *pipe; int err = 0; err = pipe_lock(); if (err) b450: e2556000 subs r6, r5, #0 b454: 1a0000cb bne b788 return err; pipe = *pipep; b458: e5984000 ldr r4, [r8] if (pipe == NULL) { b45c: e3540000 cmp r4, #0 b460: 1a00004d bne b59c { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); b464: e3a00034 mov r0, #52 ; 0x34 b468: ebffe2ab bl 3f1c if (pipe == NULL) b46c: e250a000 subs sl, r0, #0 { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); b470: e1a04000 mov r4, r0 if (pipe == NULL) b474: 0a000046 beq b594 return err; memset(pipe, 0, sizeof(pipe_control_t)); b478: e1a01005 mov r1, r5 b47c: e3a02034 mov r2, #52 ; 0x34 b480: eb001284 bl fe98 pipe->Size = PIPE_BUF; b484: e3a00c02 mov r0, #512 ; 0x200 b488: e5840004 str r0, [r4, #4] pipe->Buffer = malloc(pipe->Size); b48c: ebffe2a2 bl 3f1c if (! pipe->Buffer) b490: 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); b494: e5840000 str r0, [r4] if (! pipe->Buffer) b498: 0a00003b beq b58c goto err_buf; err = -ENOMEM; if (rtems_barrier_create( rtems_build_name ('P', 'I', 'r', c), b49c: e59f62f8 ldr r6, [pc, #760] ; b79c if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( b4a0: e59f02f8 ldr r0, [pc, #760] ; b7a0 rtems_build_name ('P', 'I', 'r', c), b4a4: e5d63000 ldrb r3, [r6] if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( b4a8: e1a01005 mov r1, r5 b4ac: e1830000 orr r0, r3, r0 b4b0: e1a02005 mov r2, r5 b4b4: e284302c add r3, r4, #44 ; 0x2c b4b8: eb00061c bl cd30 b4bc: e3500000 cmp r0, #0 b4c0: 1a00002f bne b584 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), b4c4: e5d63000 ldrb r3, [r6] if (rtems_barrier_create( rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( b4c8: e59f02d4 ldr r0, [pc, #724] ; b7a4 b4cc: e1a01005 mov r1, r5 b4d0: e1830000 orr r0, r3, r0 b4d4: e1a02005 mov r2, r5 b4d8: e2843030 add r3, r4, #48 ; 0x30 b4dc: eb000613 bl cd30 b4e0: e3500000 cmp r0, #0 b4e4: 1a000024 bne b57c 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, b4e8: e5d63000 ldrb r3, [r6] if (rtems_barrier_create( rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( b4ec: e59f02b4 ldr r0, [pc, #692] ; b7a8 b4f0: e2842028 add r2, r4, #40 ; 0x28 b4f4: e58d2000 str r2, [sp] b4f8: e1830000 orr r0, r3, r0 b4fc: e3a01001 mov r1, #1 b500: e3a02010 mov r2, #16 b504: e1a03005 mov r3, r5 b508: ebffedd2 bl 6c58 b50c: e3500000 cmp r0, #0 b510: 1a000017 bne b574 /* 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 b514: e28d5004 add r5, sp, #4 Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) _Objects_Get( &_Barrier_Information, id, location ); b518: e594102c ldr r1, [r4, #44] ; 0x2c b51c: e1a02005 mov r2, r5 b520: e59f0284 ldr r0, [pc, #644] ; b7ac b524: ebfff40e bl 8564 <_Objects_Get> |= STATES_INTERRUPTIBLE_BY_SIGNAL; b528: e590304c ldr r3, [r0, #76] ; 0x4c b52c: e3833201 orr r3, r3, #268435456 ; 0x10000000 b530: e580304c str r3, [r0, #76] ; 0x4c _Thread_Enable_dispatch(); b534: ebfff6cc bl 906c <_Thread_Enable_dispatch> b538: e1a02005 mov r2, r5 b53c: e5941030 ldr r1, [r4, #48] ; 0x30 b540: e59f0264 ldr r0, [pc, #612] ; b7ac b544: ebfff406 bl 8564 <_Objects_Get> _Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state |= STATES_INTERRUPTIBLE_BY_SIGNAL; b548: e590304c ldr r3, [r0, #76] ; 0x4c b54c: e3833201 orr r3, r3, #268435456 ; 0x10000000 b550: e580304c str r3, [r0, #76] ; 0x4c _Thread_Enable_dispatch(); b554: ebfff6c4 bl 906c <_Thread_Enable_dispatch> #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') b558: e5d63000 ldrb r3, [r6] b55c: e353007a cmp r3, #122 ; 0x7a b560: e2832001 add r2, r3, #1 c = 'a'; b564: 03a03061 moveq r3, #97 ; 0x61 #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') b568: e5c62000 strb r2, [r6] c = 'a'; b56c: 05c63000 strbeq r3, [r6] b570: ea000009 b b59c return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); b574: e59a0030 ldr r0, [sl, #48] ; 0x30 b578: eb00061c bl cdf0 err_wbar: rtems_barrier_delete(pipe->readBarrier); b57c: e59a002c ldr r0, [sl, #44] ; 0x2c b580: eb00061a bl cdf0 err_rbar: free(pipe->Buffer); b584: e59a0000 ldr r0, [sl] b588: ebffe086 bl 37a8 err_buf: free(pipe); b58c: e1a0000a mov r0, sl b590: ebffe084 bl 37a8 if (err) goto out; } if (! PIPE_LOCK(pipe)) err = -EINTR; b594: e3e0600b mvn r6, #11 b598: ea00000d b b5d4 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) b59c: e3a01000 mov r1, #0 b5a0: e5940028 ldr r0, [r4, #40] ; 0x28 b5a4: e1a02001 mov r2, r1 b5a8: ebffee3c bl 6ea0 err = -EINTR; if (*pipep == NULL) { b5ac: e5983000 ldr r3, [r8] if (err) goto out; } if (! PIPE_LOCK(pipe)) err = -EINTR; b5b0: e3500000 cmp r0, #0 b5b4: 03a06000 moveq r6, #0 b5b8: 13e06003 mvnne r6, #3 if (*pipep == NULL) { b5bc: e3530000 cmp r3, #0 b5c0: 1a000003 bne b5d4 if (err) b5c4: e3560000 cmp r6, #0 pipe_free(pipe); else *pipep = pipe; b5c8: 05884000 streq r4, [r8] if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) pipe_free(pipe); b5cc: 11a00004 movne r0, r4 b5d0: 1bffff43 blne b2e4 else *pipep = pipe; } out: pipe_unlock(); b5d4: ebffff3e bl b2d4 pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) b5d8: e3560000 cmp r6, #0 b5dc: 1a000069 bne b788 return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { b5e0: e5973014 ldr r3, [r7, #20] b5e4: e2033006 and r3, r3, #6 b5e8: e3530004 cmp r3, #4 int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; b5ec: e5984000 ldr r4, [r8] switch (LIBIO_ACCMODE(iop)) { b5f0: 0a000024 beq b688 b5f4: e3530006 cmp r3, #6 b5f8: 0a000047 beq b71c b5fc: e3530002 cmp r3, #2 b600: 1a000059 bne b76c case LIBIO_FLAGS_READ: pipe->readerCounter ++; b604: e5943020 ldr r3, [r4, #32] b608: e2833001 add r3, r3, #1 b60c: e5843020 str r3, [r4, #32] if (pipe->Readers ++ == 0) b610: e5943010 ldr r3, [r4, #16] b614: e2832001 add r2, r3, #1 b618: e3530000 cmp r3, #0 b61c: e5842010 str r2, [r4, #16] PIPE_WAKEUPWRITERS(pipe); b620: 05940030 ldreq r0, [r4, #48] ; 0x30 b624: 028d1008 addeq r1, sp, #8 b628: 0b000618 bleq ce90 if (pipe->Writers == 0) { b62c: e5943014 ldr r3, [r4, #20] b630: e3530000 cmp r3, #0 b634: 1a00004c bne b76c /* Not an error */ if (LIBIO_NODELAY(iop)) b638: e5973014 ldr r3, [r7, #20] b63c: e3130001 tst r3, #1 b640: 1a000049 bne b76c break; prevCounter = pipe->writerCounter; b644: e5945024 ldr r5, [r4, #36] ; 0x24 err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); b648: e5940028 ldr r0, [r4, #40] ; 0x28 b64c: ebffee59 bl 6fb8 if (! PIPE_READWAIT(pipe)) b650: e3a01000 mov r1, #0 b654: e594002c ldr r0, [r4, #44] ; 0x2c b658: eb000622 bl cee8 b65c: e2501000 subs r1, r0, #0 b660: 1a000044 bne b778 goto out_error; if (! PIPE_LOCK(pipe)) b664: e5940028 ldr r0, [r4, #40] ; 0x28 b668: e1a02001 mov r2, r1 b66c: ebffee0b bl 6ea0 b670: e3500000 cmp r0, #0 b674: 1a00003f bne b778 goto out_error; } while (prevCounter == pipe->writerCounter); b678: e5943024 ldr r3, [r4, #36] ; 0x24 b67c: e1550003 cmp r5, r3 b680: 0afffff0 beq b648 b684: ea000038 b b76c } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; b688: e5943024 ldr r3, [r4, #36] ; 0x24 b68c: e2833001 add r3, r3, #1 b690: e5843024 str r3, [r4, #36] ; 0x24 if (pipe->Writers ++ == 0) b694: e5943014 ldr r3, [r4, #20] b698: e2832001 add r2, r3, #1 b69c: e3530000 cmp r3, #0 b6a0: e5842014 str r2, [r4, #20] PIPE_WAKEUPREADERS(pipe); b6a4: 0594002c ldreq r0, [r4, #44] ; 0x2c b6a8: 028d1008 addeq r1, sp, #8 b6ac: 0b0005f7 bleq ce90 if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { b6b0: e5943010 ldr r3, [r4, #16] b6b4: e3530000 cmp r3, #0 b6b8: 1a00002b bne b76c b6bc: e5973014 ldr r3, [r7, #20] b6c0: e3130001 tst r3, #1 err = -ENXIO; goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; b6c4: 05945020 ldreq r5, [r4, #32] pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { b6c8: 0a000003 beq b6dc PIPE_UNLOCK(pipe); b6cc: e5940028 ldr r0, [r4, #40] ; 0x28 b6d0: ebffee38 bl 6fb8 err = -ENXIO; b6d4: e3e06005 mvn r6, #5 goto out_error; b6d8: ea000027 b b77c if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); b6dc: e5940028 ldr r0, [r4, #40] ; 0x28 b6e0: ebffee34 bl 6fb8 if (! PIPE_WRITEWAIT(pipe)) b6e4: e3a01000 mov r1, #0 b6e8: e5940030 ldr r0, [r4, #48] ; 0x30 b6ec: eb0005fd bl cee8 b6f0: e2501000 subs r1, r0, #0 b6f4: 1a00001f bne b778 goto out_error; if (! PIPE_LOCK(pipe)) b6f8: e5940028 ldr r0, [r4, #40] ; 0x28 b6fc: e1a02001 mov r2, r1 b700: ebffede6 bl 6ea0 b704: e3500000 cmp r0, #0 b708: 1a00001a bne b778 goto out_error; } while (prevCounter == pipe->readerCounter); b70c: e5943020 ldr r3, [r4, #32] b710: e1550003 cmp r5, r3 b714: 0afffff0 beq b6dc b718: ea000013 b b76c } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; b71c: e5943020 ldr r3, [r4, #32] b720: e2833001 add r3, r3, #1 b724: e5843020 str r3, [r4, #32] if (pipe->Readers ++ == 0) b728: e5943010 ldr r3, [r4, #16] b72c: e2832001 add r2, r3, #1 b730: e3530000 cmp r3, #0 b734: e5842010 str r2, [r4, #16] PIPE_WAKEUPWRITERS(pipe); b738: 05940030 ldreq r0, [r4, #48] ; 0x30 b73c: 028d1008 addeq r1, sp, #8 b740: 0b0005d2 bleq ce90 pipe->writerCounter ++; b744: e5943024 ldr r3, [r4, #36] ; 0x24 b748: e2833001 add r3, r3, #1 b74c: e5843024 str r3, [r4, #36] ; 0x24 if (pipe->Writers ++ == 0) b750: e5943014 ldr r3, [r4, #20] b754: e2832001 add r2, r3, #1 b758: e3530000 cmp r3, #0 b75c: e5842014 str r2, [r4, #20] PIPE_WAKEUPREADERS(pipe); b760: 0594002c ldreq r0, [r4, #44] ; 0x2c b764: 028d1008 addeq r1, sp, #8 b768: 0b0005c8 bleq ce90 break; } PIPE_UNLOCK(pipe); b76c: e5940028 ldr r0, [r4, #40] ; 0x28 b770: ebffee10 bl 6fb8 return 0; b774: ea000003 b b788 goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; b778: e3e06003 mvn r6, #3 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); b77c: e1a00008 mov r0, r8 b780: e1a01007 mov r1, r7 b784: ebfffee3 bl b318 return err; } b788: e1a00006 mov r0, r6 b78c: e8bd85fe pop {r1, r2, r3, r4, r5, r6, r7, r8, sl, pc} =============================================================================== 000027f0 : { long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 27f0: e59f3104 ldr r3, [pc, #260] ; 28fc 27f4: e5933000 ldr r3, [r3] 27f8: e1500003 cmp r0, r3 long fpathconf( int fd, int name ) { 27fc: 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); 2800: 2a000006 bcs 2820 iop = rtems_libio_iop(fd); 2804: e59f30f4 ldr r3, [pc, #244] ; 2900 2808: e5933000 ldr r3, [r3] 280c: e3a02038 mov r2, #56 ; 0x38 2810: e0203092 mla r0, r2, r0, r3 rtems_libio_check_is_open(iop); 2814: e5903014 ldr r3, [r0, #20] 2818: e3130c01 tst r3, #256 ; 0x100 281c: 1a000002 bne 282c 2820: eb002c91 bl da6c <__errno> 2824: e3a03009 mov r3, #9 2828: ea000003 b 283c rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 282c: e3130002 tst r3, #2 2830: 1a000004 bne 2848 2834: eb002c8c bl da6c <__errno> 2838: e3a03016 mov r3, #22 283c: e5803000 str r3, [r0] 2840: e3e00000 mvn r0, #0 2844: e49df004 pop {pc} ; (ldr pc, [sp], #4) /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 2848: e5903028 ldr r3, [r0, #40] ; 0x28 switch ( name ) { 284c: e351000b cmp r1, #11 2850: 979ff101 ldrls pc, [pc, r1, lsl #2] 2854: ea000023 b 28e8 2858: 00002888 .word 0x00002888 285c: 00002890 .word 0x00002890 2860: 00002898 .word 0x00002898 2864: 000028a0 .word 0x000028a0 2868: 000028a8 .word 0x000028a8 286c: 000028b0 .word 0x000028b0 2870: 000028b8 .word 0x000028b8 2874: 000028c0 .word 0x000028c0 2878: 000028c8 .word 0x000028c8 287c: 000028d0 .word 0x000028d0 2880: 000028d8 .word 0x000028d8 2884: 000028e0 .word 0x000028e0 case _PC_LINK_MAX: return_value = the_limits->link_max; 2888: e5930038 ldr r0, [r3, #56] ; 0x38 break; 288c: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_MAX_CANON: return_value = the_limits->max_canon; 2890: e593003c ldr r0, [r3, #60] ; 0x3c break; 2894: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_MAX_INPUT: return_value = the_limits->max_input; 2898: e5930040 ldr r0, [r3, #64] ; 0x40 break; 289c: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_NAME_MAX: return_value = the_limits->name_max; 28a0: e5930044 ldr r0, [r3, #68] ; 0x44 break; 28a4: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PATH_MAX: return_value = the_limits->path_max; 28a8: e5930048 ldr r0, [r3, #72] ; 0x48 break; 28ac: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 28b0: e593004c ldr r0, [r3, #76] ; 0x4c break; 28b4: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 28b8: e5930054 ldr r0, [r3, #84] ; 0x54 break; 28bc: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 28c0: e5930058 ldr r0, [r3, #88] ; 0x58 break; 28c4: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 28c8: e5930064 ldr r0, [r3, #100] ; 0x64 break; 28cc: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 28d0: e5930050 ldr r0, [r3, #80] ; 0x50 break; 28d4: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 28d8: e593005c ldr r0, [r3, #92] ; 0x5c break; 28dc: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 28e0: e5930060 ldr r0, [r3, #96] ; 0x60 break; 28e4: e49df004 pop {pc} ; (ldr pc, [sp], #4) default: rtems_set_errno_and_return_minus_one( EINVAL ); 28e8: eb002c5f bl da6c <__errno> 28ec: e3a03016 mov r3, #22 28f0: e5803000 str r3, [r0] 28f4: e3e00000 mvn r0, #0 break; } return return_value; } 28f8: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== 0000be98 : IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access; if ( the_jnode->type != IMFS_DIRECTORY ) be98: e5903018 ldr r3, [r0, #24] be9c: e593304c ldr r3, [r3, #76] ; 0x4c bea0: e3530001 cmp r3, #1 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { bea4: e92d4010 push {r4, lr} IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access; if ( the_jnode->type != IMFS_DIRECTORY ) bea8: 1a000005 bne bec4 return -1; /* It wasn't a directory --> return error */ iop->offset = 0; beac: e3a03000 mov r3, #0 beb0: e3a04000 mov r4, #0 beb4: e580300c str r3, [r0, #12] beb8: e5804010 str r4, [r0, #16] return 0; bebc: e3a00000 mov r0, #0 bec0: e8bd8010 pop {r4, pc} /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access; if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ bec4: e3e00000 mvn r0, #0 <== NOT EXECUTED iop->offset = 0; return 0; } bec8: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== 000039b4 : * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { if (tty->termios.c_iflag & ISTRIP) 39b4: e5913030 ldr r3, [r1, #48] ; 0x30 39b8: e3130020 tst r3, #32 /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 39bc: e92d4030 push {r4, r5, lr} 39c0: e20050ff and r5, r0, #255 ; 0xff if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; 39c4: 1200507f andne r5, r0, #127 ; 0x7f if (tty->termios.c_iflag & IUCLC) 39c8: e3130c02 tst r3, #512 ; 0x200 /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 39cc: e1a04001 mov r4, r1 if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) 39d0: 0a000007 beq 39f4 c = tolower (c); 39d4: e59f2164 ldr r2, [pc, #356] ; 3b40 39d8: e5922000 ldr r2, [r2] 39dc: e0822005 add r2, r2, r5 39e0: e5d22001 ldrb r2, [r2, #1] 39e4: e2022003 and r2, r2, #3 39e8: e3520001 cmp r2, #1 39ec: 02855020 addeq r5, r5, #32 39f0: e20550ff and r5, r5, #255 ; 0xff if (c == '\r') { 39f4: e355000d cmp r5, #13 39f8: 1a000005 bne 3a14 if (tty->termios.c_iflag & IGNCR) 39fc: e3130080 tst r3, #128 ; 0x80 3a00: 1a000048 bne 3b28 return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; 3a04: e3130c01 tst r3, #256 ; 0x100 3a08: 03a0500d moveq r5, #13 3a0c: 13a0500a movne r5, #10 3a10: ea000007 b 3a34 } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 3a14: e355000a cmp r5, #10 3a18: 1a000003 bne 3a2c c = '\r'; 3a1c: e3130040 tst r3, #64 ; 0x40 3a20: 03a0500a moveq r5, #10 3a24: 13a0500d movne r5, #13 3a28: ea000001 b 3a34 } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 3a2c: e3550000 cmp r5, #0 3a30: 0a00002c beq 3ae8 3a34: e594303c ldr r3, [r4, #60] ; 0x3c 3a38: e3130002 tst r3, #2 3a3c: 0a000029 beq 3ae8 if (c == tty->termios.c_cc[VERASE]) { 3a40: e5d42043 ldrb r2, [r4, #67] ; 0x43 3a44: e1520005 cmp r2, r5 erase (tty, 0); 3a48: 01a00004 moveq r0, r4 3a4c: 03a01000 moveq r1, #0 } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { if (c == tty->termios.c_cc[VERASE]) { 3a50: 0a000004 beq 3a68 erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 3a54: e5d42044 ldrb r2, [r4, #68] ; 0x44 3a58: e1520005 cmp r2, r5 3a5c: 1a000003 bne 3a70 erase (tty, 1); 3a60: e1a00004 mov r0, r4 3a64: e3a01001 mov r1, #1 3a68: ebffff60 bl 37f0 3a6c: ea00002d b 3b28 return 0; } else if (c == tty->termios.c_cc[VEOF]) { 3a70: e5d42045 ldrb r2, [r4, #69] ; 0x45 3a74: e1520005 cmp r2, r5 3a78: 0a00002c beq 3b30 return 1; } else if (c == '\n') { 3a7c: e355000a cmp r5, #10 3a80: 1a000008 bne 3aa8 if (tty->termios.c_lflag & (ECHO | ECHONL)) 3a84: e3130048 tst r3, #72 ; 0x48 echo (c, tty); 3a88: 11a00005 movne r0, r5 3a8c: 11a01004 movne r1, r4 3a90: 1bffff33 blne 3764 tty->cbuf[tty->ccount++] = c; 3a94: e284201c add r2, r4, #28 3a98: e892000c ldm r2, {r2, r3} 3a9c: e3a0100a mov r1, #10 3aa0: e7c21003 strb r1, [r2, r3] 3aa4: ea00000c b 3adc return 1; } else if ((c == tty->termios.c_cc[VEOL]) || 3aa8: e5d4204c ldrb r2, [r4, #76] ; 0x4c 3aac: e1520005 cmp r2, r5 3ab0: 0a000002 beq 3ac0 3ab4: e5d42051 ldrb r2, [r4, #81] ; 0x51 3ab8: e1520005 cmp r2, r5 3abc: 1a000009 bne 3ae8 (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) 3ac0: e3130008 tst r3, #8 <== NOT EXECUTED echo (c, tty); 3ac4: 11a00005 movne r0, r5 <== NOT EXECUTED 3ac8: 11a01004 movne r1, r4 <== NOT EXECUTED 3acc: 1bffff24 blne 3764 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 3ad0: e284201c add r2, r4, #28 <== NOT EXECUTED 3ad4: e892000c ldm r2, {r2, r3} <== NOT EXECUTED 3ad8: e7c25003 strb r5, [r2, r3] <== NOT EXECUTED 3adc: e2833001 add r3, r3, #1 3ae0: e5843020 str r3, [r4, #32] 3ae4: ea000011 b 3b30 } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 3ae8: e59f3054 ldr r3, [pc, #84] ; 3b44 3aec: e5933008 ldr r3, [r3, #8] 3af0: e5942020 ldr r2, [r4, #32] 3af4: e2433001 sub r3, r3, #1 3af8: e1520003 cmp r2, r3 3afc: aa00000d bge 3b38 if (tty->termios.c_lflag & ECHO) 3b00: e594303c ldr r3, [r4, #60] ; 0x3c 3b04: e3130008 tst r3, #8 echo (c, tty); 3b08: 11a00005 movne r0, r5 3b0c: 11a01004 movne r1, r4 3b10: 1bffff13 blne 3764 tty->cbuf[tty->ccount++] = c; 3b14: e284201c add r2, r4, #28 3b18: e892000c ldm r2, {r2, r3} 3b1c: e7c25003 strb r5, [r2, r3] 3b20: e2833001 add r3, r3, #1 3b24: e5843020 str r3, [r4, #32] if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) return 0; 3b28: e3a00000 mov r0, #0 3b2c: 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; 3b30: e3a00001 mov r0, #1 3b34: e8bd8030 pop {r4, r5, pc} if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; 3b38: e3a00000 mov r0, #0 <== NOT EXECUTED } 3b3c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED =============================================================================== 0000bc08 : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { bc08: e92d4030 push {r4, r5, lr} IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; bc0c: e5905018 ldr r5, [r0, #24] if (the_jnode->type == IMFS_LINEAR_FILE) { bc10: e595304c ldr r3, [r5, #76] ; 0x4c bc14: e3530006 cmp r3, #6 rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { bc18: e1a04000 mov r4, r0 IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; if (the_jnode->type == IMFS_LINEAR_FILE) { bc1c: 1a00000b bne bc50 if (iop->offset > the_jnode->info.linearfile.size) bc20: e5953054 ldr r3, [r5, #84] ; 0x54 bc24: e5901010 ldr r1, [r0, #16] bc28: e1510003 cmp r1, r3 bc2c: e5952050 ldr r2, [r5, #80] ; 0x50 bc30: ca000003 bgt bc44 bc34: 1a000014 bne bc8c bc38: e590100c ldr r1, [r0, #12] bc3c: e1510002 cmp r1, r2 bc40: 9a000011 bls bc8c iop->offset = the_jnode->info.linearfile.size; bc44: e584200c str r2, [r4, #12] <== NOT EXECUTED bc48: e5843010 str r3, [r4, #16] <== NOT EXECUTED bc4c: ea00000e b bc8c <== NOT EXECUTED } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) bc50: e1a00005 mov r0, r5 bc54: e284200c add r2, r4, #12 bc58: e8920006 ldm r2, {r1, r2} bc5c: ebfffeed bl b818 bc60: e3500000 cmp r0, #0 bc64: 0a000005 beq bc80 rtems_set_errno_and_return_minus_one( ENOSPC ); bc68: eb00039e bl cae8 <__errno> bc6c: e3a0301c mov r3, #28 bc70: e5803000 str r3, [r0] bc74: e3e04000 mvn r4, #0 bc78: e3e03000 mvn r3, #0 bc7c: ea000004 b bc94 iop->size = the_jnode->info.file.size; bc80: e2853050 add r3, r5, #80 ; 0x50 bc84: e893000c ldm r3, {r2, r3} bc88: e984000c stmib r4, {r2, r3} } return iop->offset; bc8c: e284400c add r4, r4, #12 bc90: e8940018 ldm r4, {r3, r4} } bc94: e1a00003 mov r0, r3 bc98: e1a01004 mov r1, r4 bc9c: e8bd8030 pop {r4, r5, pc} =============================================================================== 0000bb14 : the_jnode = iop->pathinfo.node_access; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) bb14: e5903014 ldr r3, [r0, #20] bb18: e3130f81 tst r3, #516 ; 0x204 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { bb1c: e92d4031 push {r0, r4, r5, lr} bb20: e1a05000 mov r5, r0 IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; bb24: e5904018 ldr r4, [r0, #24] /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) bb28: 0a000015 beq bb84 && (the_jnode->type == IMFS_LINEAR_FILE)) { bb2c: e594304c ldr r3, [r4, #76] ; 0x4c bb30: e3530006 cmp r3, #6 bb34: 1a000012 bne bb84 uint32_t count = the_jnode->info.linearfile.size; bb38: e594c050 ldr ip, [r4, #80] ; 0x50 <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; bb3c: e3a00000 mov r0, #0 <== NOT EXECUTED if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; bb40: e3a02005 mov r2, #5 <== NOT EXECUTED bb44: e584204c str r2, [r4, #76] ; 0x4c <== NOT EXECUTED the_jnode->info.file.size = 0; bb48: e3a01000 mov r1, #0 <== NOT EXECUTED bb4c: e3a02000 mov r2, #0 <== NOT EXECUTED the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) bb50: 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; bb54: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; bb58: e5841050 str r1, [r4, #80] ; 0x50 <== NOT EXECUTED bb5c: e5842054 str r2, [r4, #84] ; 0x54 <== NOT EXECUTED the_jnode->info.file.indirect = 0; bb60: e5840058 str r0, [r4, #88] ; 0x58 <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; bb64: e584005c str r0, [r4, #92] ; 0x5c <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; bb68: e5840060 str r0, [r4, #96] ; 0x60 <== NOT EXECUTED if ((count != 0) bb6c: 0a000004 beq bb84 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) bb70: e1a00004 mov r0, r4 <== NOT EXECUTED bb74: e58dc000 str ip, [sp] <== NOT EXECUTED bb78: ebffff6d bl b934 <== NOT EXECUTED bb7c: e3700001 cmn r0, #1 <== NOT EXECUTED bb80: 0a000009 beq bbac <== NOT EXECUTED return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) bb84: e5953014 ldr r3, [r5, #20] bb88: e3130c02 tst r3, #512 ; 0x200 iop->offset = the_jnode->info.file.size; bb8c: 12843050 addne r3, r4, #80 ; 0x50 bb90: 1893000c ldmne r3, {r2, r3} bb94: 1585200c strne r2, [r5, #12] bb98: 15853010 strne r3, [r5, #16] iop->size = the_jnode->info.file.size; bb9c: e2844050 add r4, r4, #80 ; 0x50 bba0: e8940018 ldm r4, {r3, r4} bba4: e9850018 stmib r5, {r3, r4} return 0; bba8: e3a00000 mov r0, #0 } bbac: e8bd8038 pop {r3, r4, r5, pc} =============================================================================== 00002220 : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 2220: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 2224: e3530001 cmp r3, #1 const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 2228: e24dd02c sub sp, sp, #44 ; 0x2c 222c: e1a06000 mov r6, r0 2230: e1a0b001 mov fp, r1 2234: e1a0a002 mov sl, r2 2238: e58d300c str r3, [sp, #12] /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 223c: 8a000004 bhi 2254 rtems_set_errno_and_return_minus_one( EINVAL ); /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); 2240: e1a00002 mov r0, r2 2244: eb001d9b bl 98b8 if ( !mount_h ) 2248: e3500000 cmp r0, #0 224c: e58d0014 str r0, [sp, #20] 2250: 1a000002 bne 2260 rtems_set_errno_and_return_minus_one( EINVAL ); 2254: eb002a23 bl cae8 <__errno> 2258: e3a03016 mov r3, #22 225c: ea00003b b 2350 { 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; 2260: e25b5000 subs r5, fp, #0 2264: 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 : "/"; 2268: e59f3258 ldr r3, [pc, #600] ; 24c8 226c: e3550000 cmp r5, #0 2270: 11a0300b movne r3, fp size_t filesystemtype_size = strlen( filesystemtype ) + 1; 2274: e1a0000a mov r0, sl const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 2278: e58d3004 str r3, [sp, #4] size_t filesystemtype_size = strlen( filesystemtype ) + 1; 227c: eb002e03 bl da90 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 2280: e3560000 cmp r6, #0 const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; 2284: e2809001 add r9, r0, #1 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 2288: 01a07006 moveq r7, r6 228c: 0a000002 beq 229c 2290: e1a00006 mov r0, r6 2294: eb002dfd bl da90 2298: e2807001 add r7, r0, #1 size_t target_size = strlen( target ) + 1; 229c: e59d0004 ldr r0, [sp, #4] 22a0: eb002dfa bl da90 size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size; 22a4: e2891074 add r1, r9, #116 ; 0x74 { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; size_t target_size = strlen( target ) + 1; 22a8: e2803001 add r3, r0, #1 size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size; 22ac: e0811007 add r1, r1, r7 { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; size_t target_size = strlen( target ) + 1; 22b0: e58d0010 str r0, [sp, #16] size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size; rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 22b4: e0811003 add r1, r1, r3 22b8: e3a00001 mov r0, #1 { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; size_t target_size = strlen( target ) + 1; 22bc: e58d3008 str r3, [sp, #8] size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size; rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 22c0: ebfffe15 bl 1b1c if ( mt_entry != NULL ) { 22c4: e2504000 subs r4, r0, #0 22c8: 0a00001e beq 2348 char *str = (char *) mt_entry + sizeof( *mt_entry ); 22cc: e2848074 add r8, r4, #116 ; 0x74 memcpy( str, filesystemtype, filesystemtype_size ); 22d0: e1a00008 mov r0, r8 22d4: e1a0100a mov r1, sl 22d8: e1a02009 mov r2, r9 22dc: eb002c2f bl d3a0 mt_entry->type = str; 22e0: e584806c str r8, [r4, #108] ; 0x6c str += filesystemtype_size; 22e4: e0888009 add r8, r8, r9 memcpy( str, source_or_null, source_size ); 22e8: e1a00008 mov r0, r8 22ec: e1a01006 mov r1, r6 22f0: e1a02007 mov r2, r7 22f4: eb002c29 bl d3a0 mt_entry->dev = str; 22f8: e5848070 str r8, [r4, #112] ; 0x70 str += source_size; 22fc: e0888007 add r8, r8, r7 memcpy( str, target, target_size ); 2300: e99d0006 ldmib sp, {r1, r2} 2304: e1a00008 mov r0, r8 2308: eb002c24 bl d3a0 ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; mt_entry->options = options; 230c: e59d300c ldr r3, [sp, #12] mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 2310: e59fe1b4 ldr lr, [pc, #436] ; 24cc ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; mt_entry->options = options; 2314: e5843030 str r3, [r4, #48] ; 0x30 mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 2318: e8be000f ldm lr!, {r0, r1, r2, r3} 231c: e284c038 add ip, r4, #56 ; 0x38 2320: e8ac000f stmia ip!, {r0, r1, r2, r3} 2324: e8be000f ldm lr!, {r0, r1, r2, r3} 2328: e8ac000f stmia ip!, {r0, r1, r2, r3} 232c: e89e000f ldm lr, {r0, r1, r2, r3} /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { 2330: e3550000 cmp r5, #0 memcpy( str, source_or_null, source_size ); mt_entry->dev = str; str += source_size; memcpy( str, target, target_size ); mt_entry->target = str; 2334: e5848068 str r8, [r4, #104] ; 0x68 &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; 2338: e584402c str r4, [r4, #44] ; 0x2c mt_entry->options = options; mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 233c: 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 ) { 2340: 0a00002e beq 2400 2344: ea000003 b 2358 target, filesystemtype, &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); 2348: eb0029e6 bl cae8 <__errno> <== NOT EXECUTED 234c: e3a0300c mov r3, #12 <== NOT EXECUTED 2350: e5803000 str r3, [r0] 2354: ea000058 b 24bc * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { if ( rtems_filesystem_evaluate_path( 2358: e3a03001 mov r3, #1 235c: e28d6018 add r6, sp, #24 2360: e58d3000 str r3, [sp] 2364: e1a0000b mov r0, fp 2368: e59d1010 ldr r1, [sp, #16] 236c: e3a02007 mov r2, #7 2370: e1a03006 mov r3, r6 2374: ebfffe17 bl 1bd8 2378: e3700001 cmn r0, #1 237c: 0a000048 beq 24a4 /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 2380: e1a00006 mov r0, r6 2384: e59d3024 ldr r3, [sp, #36] ; 0x24 2388: e1a0e00f mov lr, pc 238c: e593f010 ldr pc, [r3, #16] 2390: e3500001 cmp r0, #1 2394: 0a000002 beq 23a4 errno = ENOTDIR; 2398: eb0029d2 bl cae8 <__errno> 239c: e3a03014 mov r3, #20 23a0: ea000006 b 23c0 /* * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { 23a4: e59f0124 ldr r0, [pc, #292] ; 24d0 23a8: e59d1018 ldr r1, [sp, #24] 23ac: ebffff85 bl 21c8 23b0: e3500000 cmp r0, #0 23b4: 0a000003 beq 23c8 errno = EBUSY; 23b8: eb0029ca bl cae8 <__errno> 23bc: e3a03010 mov r3, #16 23c0: e5803000 str r3, [r0] goto cleanup_and_bail; 23c4: ea000037 b 24a8 * 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; 23c8: e59d3018 ldr r3, [sp, #24] 23cc: e5843008 str r3, [r4, #8] mt_entry->mt_point_node.handlers = loc.handlers; 23d0: e59d3020 ldr r3, [sp, #32] mt_entry->mt_point_node.ops = loc.ops; mt_entry->mt_point_node.mt_entry = loc.mt_entry; 23d4: e59d2028 ldr r2, [sp, #40] ; 0x28 * 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; 23d8: e5843010 str r3, [r4, #16] mt_entry->mt_point_node.ops = loc.ops; 23dc: e59d3024 ldr r3, [sp, #36] ; 0x24 mt_entry->mt_point_node.mt_entry = loc.mt_entry; 23e0: e5842018 str r2, [r4, #24] * traverse the tree. */ mt_entry->mt_point_node.node_access = loc.node_access; mt_entry->mt_point_node.handlers = loc.handlers; mt_entry->mt_point_node.ops = loc.ops; 23e4: 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 ) ) { 23e8: e1a00004 mov r0, r4 23ec: e1a0e00f mov lr, pc 23f0: e593f020 ldr pc, [r3, #32] 23f4: e3500000 cmp r0, #0 23f8: 0a00000b beq 242c 23fc: ea000029 b 24a8 <== NOT EXECUTED stop = (*routine)( mt_entry, routine_arg ); } rtems_libio_unlock(); return stop; } 2400: e59f30cc ldr r3, [pc, #204] ; 24d4 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_tail( const Chain_Control *the_chain ) { return &the_chain->Tail.Node; 2404: e2832004 add r2, r3, #4 } } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { 2408: e5933000 ldr r3, [r3] 240c: e1530002 cmp r3, r2 ) { rtems_filesystem_fsmount_me_t mount_h = NULL; rtems_filesystem_location_info_t loc; rtems_filesystem_mount_table_entry_t *mt_entry = NULL; rtems_filesystem_location_info_t *loc_to_free = NULL; 2410: 01a06005 moveq r6, r5 } } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { 2414: 0a000004 beq 242c errno = EINVAL; 2418: eb0029b2 bl cae8 <__errno> <== NOT EXECUTED 241c: e3a03016 mov r3, #22 <== NOT EXECUTED 2420: e5803000 str r3, [r0] <== NOT EXECUTED ) { rtems_filesystem_fsmount_me_t mount_h = NULL; rtems_filesystem_location_info_t loc; rtems_filesystem_mount_table_entry_t *mt_entry = NULL; rtems_filesystem_location_info_t *loc_to_free = NULL; 2424: e1a06005 mov r6, r5 <== NOT EXECUTED /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { errno = EINVAL; goto cleanup_and_bail; 2428: ea00001e b 24a8 <== NOT EXECUTED * mt_point_node.node_access will be left to null to indicate that this * is the root of the entire file system. */ } if ( (*mount_h)( mt_entry, data ) ) { 242c: e1a00004 mov r0, r4 2430: e59d1050 ldr r1, [sp, #80] ; 0x50 2434: e59d3014 ldr r3, [sp, #20] 2438: e1a0e00f mov lr, pc 243c: e12fff13 bx r3 2440: e2507000 subs r7, r0, #0 2444: 0a000004 beq 245c /* * Try to undo the mount operation */ loc.ops->unmount_h( mt_entry ); 2448: e1a00004 mov r0, r4 244c: e59d3024 ldr r3, [sp, #36] ; 0x24 2450: e1a0e00f mov lr, pc 2454: e593f028 ldr pc, [r3, #40] ; 0x28 goto cleanup_and_bail; 2458: ea000012 b 24a8 } /* * Add the mount table entry to the mount table chain */ rtems_libio_lock(); 245c: ebffff4f bl 21a0 2460: e59f006c ldr r0, [pc, #108] ; 24d4 2464: e1a01004 mov r1, r4 2468: eb000cdc bl 57e0 <_Chain_Append> rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); 246c: ebffff51 bl 21b8 if ( !has_target ) 2470: e3550000 cmp r5, #0 rtems_filesystem_root = mt_entry->mt_fs_root; return 0; 2474: 11a00007 movne r0, r7 */ rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); if ( !has_target ) 2478: 1a000010 bne 24c0 rtems_filesystem_root = mt_entry->mt_fs_root; 247c: e59f3054 ldr r3, [pc, #84] ; 24d8 2480: e284401c add r4, r4, #28 2484: e593c000 ldr ip, [r3] 2488: e8b4000f ldm r4!, {r0, r1, r2, r3} 248c: e28cc018 add ip, ip, #24 2490: e8ac000f stmia ip!, {r0, r1, r2, r3} 2494: e5943000 ldr r3, [r4] return 0; 2498: e1a00005 mov r0, r5 rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); if ( !has_target ) rtems_filesystem_root = mt_entry->mt_fs_root; 249c: e58c3000 str r3, [ip] 24a0: ea000006 b 24c0 ) { 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; 24a4: e3a06000 mov r6, #0 <== NOT EXECUTED return 0; cleanup_and_bail: free( mt_entry ); 24a8: e1a00004 mov r0, r4 24ac: ebfffdfe bl 1cac if ( loc_to_free ) 24b0: e3560000 cmp r6, #0 rtems_filesystem_freenode( loc_to_free ); 24b4: 11a00006 movne r0, r6 24b8: 1bfffdf6 blne 1c98 return -1; 24bc: e3e00000 mvn r0, #0 } 24c0: e28dd02c add sp, sp, #44 ; 0x2c 24c4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 000024e0 : */ int newlib_free_buffers( FILE *fp ) { 24e0: e92d4010 push {r4, lr} 24e4: e1a04000 mov r4, r0 switch ( fileno(fp) ) { 24e8: eb002a81 bl cef4 24ec: e3500002 cmp r0, #2 24f0: 8a00000b bhi 2524 case 0: case 1: case 2: if (fp->_flags & __SMBF) { 24f4: e1d430bc ldrh r3, [r4, #12] 24f8: e3130080 tst r3, #128 ; 0x80 24fc: 0a00000a beq 252c free( fp->_bf._base ); 2500: e5940010 ldr r0, [r4, #16] 2504: ebfffde8 bl 1cac <== NOT EXECUTED fp->_flags &= ~__SMBF; 2508: e1d430bc ldrh r3, [r4, #12] <== NOT EXECUTED 250c: e3c33080 bic r3, r3, #128 ; 0x80 <== NOT EXECUTED 2510: e1c430bc strh r3, [r4, #12] <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 2514: e3a03000 mov r3, #0 <== NOT EXECUTED 2518: e5843000 str r3, [r4] <== NOT EXECUTED 251c: e5843010 str r3, [r4, #16] <== NOT EXECUTED 2520: ea000001 b 252c <== NOT EXECUTED } break; default: fclose(fp); 2524: e1a00004 mov r0, r4 <== NOT EXECUTED 2528: eb0029bc bl cc20 <== NOT EXECUTED } return 0; } 252c: e3a00000 mov r0, #0 2530: e8bd8010 pop {r4, pc} =============================================================================== 00003614 : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 3614: e92d4011 push {r0, r4, lr} 3618: e5cd0000 strb r0, [sp] int i; if (tty->termios.c_oflag & OPOST) { 361c: e5913034 ldr r3, [r1, #52] ; 0x34 3620: e3130001 tst r3, #1 /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 3624: e1a04001 mov r4, r1 int i; if (tty->termios.c_oflag & OPOST) { 3628: 0a000045 beq 3744 switch (c) { 362c: e5dd2000 ldrb r2, [sp] 3630: e2421008 sub r1, r2, #8 3634: e3510005 cmp r1, #5 3638: 979ff101 ldrls pc, [pc, r1, lsl #2] 363c: ea00002c b 36f4 3640: 000036e0 .word 0x000036e0 3644: 000036b8 .word 0x000036b8 3648: 00003658 .word 0x00003658 364c: 000036f4 .word 0x000036f4 3650: 000036f4 .word 0x000036f4 3654: 00003680 .word 0x00003680 case '\n': if (tty->termios.c_oflag & ONLRET) 3658: e3130020 tst r3, #32 tty->column = 0; 365c: 13a02000 movne r2, #0 3660: 15842028 strne r2, [r4, #40] ; 0x28 if (tty->termios.c_oflag & ONLCR) { 3664: e3130004 tst r3, #4 3668: 0a000035 beq 3744 rtems_termios_puts ("\r", 1, tty); 366c: e59f00e4 ldr r0, [pc, #228] ; 3758 3670: e3a01001 mov r1, #1 3674: e1a02004 mov r2, r4 3678: ebffffa5 bl 3514 367c: ea00000b b 36b0 tty->column = 0; } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 3680: e3130010 tst r3, #16 <== NOT EXECUTED 3684: 0a000002 beq 3694 <== NOT EXECUTED 3688: e5942028 ldr r2, [r4, #40] ; 0x28 <== NOT EXECUTED 368c: e3520000 cmp r2, #0 <== NOT EXECUTED 3690: 0a00002f beq 3754 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 3694: e2132008 ands r2, r3, #8 <== NOT EXECUTED c = '\n'; if (tty->termios.c_oflag & ONLRET) tty->column = 0; break; } tty->column = 0; 3698: 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) { 369c: 0a000028 beq 3744 <== NOT EXECUTED c = '\n'; 36a0: e3a0200a mov r2, #10 <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 36a4: 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'; 36a8: e5cd2000 strb r2, [sp] <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 36ac: 0a000024 beq 3744 <== NOT EXECUTED tty->column = 0; 36b0: e3a03000 mov r3, #0 36b4: ea000021 b 3740 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 36b8: e5942028 ldr r2, [r4, #40] ; 0x28 36bc: e2021007 and r1, r2, #7 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 36c0: e2033b06 and r3, r3, #6144 ; 0x1800 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 36c4: e2611008 rsb r1, r1, #8 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 36c8: e3530b06 cmp r3, #6144 ; 0x1800 36cc: e0813002 add r3, r1, r2 tty->column += i; 36d0: 05843028 streq r3, [r4, #40] ; 0x28 rtems_termios_puts ( " ", i, tty); 36d4: 059f0080 ldreq r0, [pc, #128] ; 375c tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { 36d8: 1a000018 bne 3740 36dc: ea00001a b 374c } tty->column += i; break; case '\b': if (tty->column > 0) 36e0: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 36e4: e3530000 cmp r3, #0 <== NOT EXECUTED tty->column--; 36e8: c2433001 subgt r3, r3, #1 <== NOT EXECUTED } tty->column += i; break; case '\b': if (tty->column > 0) 36ec: ca000013 bgt 3740 <== NOT EXECUTED 36f0: ea000013 b 3744 <== NOT EXECUTED tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) 36f4: e3130002 tst r3, #2 36f8: 0a000007 beq 371c c = toupper(c); 36fc: e59f305c ldr r3, [pc, #92] ; 3760 <== NOT EXECUTED 3700: e5933000 ldr r3, [r3] <== NOT EXECUTED 3704: e0833002 add r3, r3, r2 <== NOT EXECUTED 3708: e5d33001 ldrb r3, [r3, #1] <== NOT EXECUTED 370c: e2033003 and r3, r3, #3 <== NOT EXECUTED 3710: e3530002 cmp r3, #2 <== NOT EXECUTED 3714: 02422020 subeq r2, r2, #32 <== NOT EXECUTED 3718: e5cd2000 strb r2, [sp] <== NOT EXECUTED if (!iscntrl(c)) 371c: e59f203c ldr r2, [pc, #60] ; 3760 3720: e5dd3000 ldrb r3, [sp] 3724: e5922000 ldr r2, [r2] 3728: e0823003 add r3, r2, r3 372c: e5d33001 ldrb r3, [r3, #1] 3730: e3130020 tst r3, #32 3734: 1a000002 bne 3744 tty->column++; 3738: e5943028 ldr r3, [r4, #40] ; 0x28 373c: e2833001 add r3, r3, #1 3740: e5843028 str r3, [r4, #40] ; 0x28 break; } } rtems_termios_puts (&c, 1, tty); 3744: e1a0000d mov r0, sp 3748: e3a01001 mov r1, #1 374c: e1a02004 mov r2, r4 3750: ebffff6f bl 3514 } 3754: e8bd8018 pop {r3, r4, pc} =============================================================================== 0000badc : uint32_t cmd, void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { badc: e59f3058 ldr r3, [pc, #88] ; bb3c bae0: e1510003 cmp r1, r3 pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { bae4: e92d4070 push {r4, r5, r6, lr} bae8: e1a04000 mov r4, r0 baec: e1a05002 mov r5, r2 *(unsigned int *)buffer = pipe->Length; PIPE_UNLOCK(pipe); return 0; } return -EINVAL; baf0: 13e00015 mvnne r0, #21 uint32_t cmd, void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { baf4: 18bd8070 popne {r4, r5, r6, pc} if (buffer == NULL) baf8: e3520000 cmp r2, #0 return -EFAULT; bafc: 03e0000d mvneq r0, #13 void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { if (buffer == NULL) bb00: 08bd8070 popeq {r4, r5, r6, pc} return -EFAULT; if (! PIPE_LOCK(pipe)) bb04: e3a01000 mov r1, #0 bb08: e5940028 ldr r0, [r4, #40] ; 0x28 bb0c: e1a02001 mov r2, r1 bb10: ebffece2 bl 6ea0 bb14: e2506000 subs r6, r0, #0 bb18: 1a000005 bne bb34 return -EINTR; /* Return length of pipe */ *(unsigned int *)buffer = pipe->Length; bb1c: e594300c ldr r3, [r4, #12] PIPE_UNLOCK(pipe); bb20: e5940028 ldr r0, [r4, #40] ; 0x28 if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(unsigned int *)buffer = pipe->Length; bb24: e5853000 str r3, [r5] PIPE_UNLOCK(pipe); bb28: ebffed22 bl 6fb8 return 0; bb2c: e1a00006 mov r0, r6 bb30: e8bd8070 pop {r4, r5, r6, pc} if (cmd == FIONREAD) { if (buffer == NULL) return -EFAULT; if (! PIPE_LOCK(pipe)) return -EINTR; bb34: e3e00003 mvn r0, #3 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; } return -EINVAL; } bb38: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== 0000b7b0 : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { b7b0: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} b7b4: e1a09001 mov r9, r1 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) b7b8: e3a01000 mov r1, #0 pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { b7bc: e1a04000 mov r4, r0 b7c0: e1a05002 mov r5, r2 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) b7c4: e5900028 ldr r0, [r0, #40] ; 0x28 b7c8: e1a02001 mov r2, r1 pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { b7cc: e1a0a003 mov sl, r3 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) b7d0: ebffedb2 bl 6ea0 b7d4: e2506000 subs r6, r0, #0 /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe); b7d8: 01a0b00d moveq fp, sp rtems_libio_t *iop ) { int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) b7dc: 0a000043 beq b8f0 b7e0: ea00004e b b920 <== NOT EXECUTED return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) b7e4: e5947014 ldr r7, [r4, #20] b7e8: e3570000 cmp r7, #0 b7ec: 0a000044 beq b904 goto out_locked; if (LIBIO_NODELAY(iop)) { b7f0: e59a8014 ldr r8, [sl, #20] b7f4: e2188001 ands r8, r8, #1 b7f8: 1a000040 bne b900 ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; b7fc: e5943018 ldr r3, [r4, #24] b800: e2833001 add r3, r3, #1 b804: e5843018 str r3, [r4, #24] PIPE_UNLOCK(pipe); b808: e5940028 ldr r0, [r4, #40] ; 0x28 b80c: ebffede9 bl 6fb8 if (! PIPE_READWAIT(pipe)) b810: e1a01008 mov r1, r8 b814: e594002c ldr r0, [r4, #44] ; 0x2c b818: eb0005b2 bl cee8 b81c: e3500000 cmp r0, #0 b820: 01a07000 moveq r7, r0 b824: 13e07003 mvnne r7, #3 ret = -EINTR; if (! PIPE_LOCK(pipe)) { b828: e1a01008 mov r1, r8 b82c: e5940028 ldr r0, [r4, #40] ; 0x28 b830: e1a02008 mov r2, r8 b834: ebffed99 bl 6ea0 b838: e3500000 cmp r0, #0 b83c: 1a000033 bne b910 /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; b840: e5943018 ldr r3, [r4, #24] if (ret != 0) b844: e3570000 cmp r7, #0 if (! PIPE_LOCK(pipe)) { /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; b848: e2433001 sub r3, r3, #1 b84c: e5843018 str r3, [r4, #24] if (ret != 0) b850: 1a00002b bne b904 if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { b854: e594300c ldr r3, [r4, #12] b858: e3530000 cmp r3, #0 b85c: 0affffe0 beq b7e4 if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); b860: e0667005 rsb r7, r6, r5 b864: e1530007 cmp r3, r7 b868: 31a07003 movcc r7, r3 chunk1 = pipe->Size - pipe->Start; b86c: e5948004 ldr r8, [r4, #4] b870: e5943008 ldr r3, [r4, #8] b874: e5941000 ldr r1, [r4] b878: e0638008 rsb r8, r3, r8 if (chunk > chunk1) { b87c: e1570008 cmp r7, r8 b880: e0890006 add r0, r9, r6 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); b884: d0811003 addle r1, r1, r3 b888: d1a02007 movle r2, r7 } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); chunk1 = pipe->Size - pipe->Start; if (chunk > chunk1) { b88c: da000006 ble b8ac memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); b890: e0811003 add r1, r1, r3 b894: e1a02008 mov r2, r8 b898: eb001102 bl fca8 memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); b89c: e0860008 add r0, r6, r8 b8a0: e5941000 ldr r1, [r4] b8a4: e0890000 add r0, r9, r0 b8a8: e0682007 rsb r2, r8, r7 } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); b8ac: eb0010fd bl fca8 pipe->Start += chunk; b8b0: e5940008 ldr r0, [r4, #8] pipe->Start %= pipe->Size; b8b4: e5941004 ldr r1, [r4, #4] b8b8: e0870000 add r0, r7, r0 b8bc: eb003d44 bl 1add4 <__umodsi3> pipe->Length -= chunk; b8c0: e594300c ldr r3, [r4, #12] b8c4: e0673003 rsb r3, r7, r3 /* For buffering optimization */ if (PIPE_EMPTY(pipe)) b8c8: e3530000 cmp r3, #0 } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; b8cc: e5840008 str r0, [r4, #8] pipe->Length -= chunk; b8d0: e584300c str r3, [r4, #12] /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; b8d4: 05843008 streq r3, [r4, #8] if (pipe->waitingWriters > 0) b8d8: e594301c ldr r3, [r4, #28] b8dc: e3530000 cmp r3, #0 PIPE_WAKEUPWRITERS(pipe); b8e0: 15940030 ldrne r0, [r4, #48] ; 0x30 b8e4: 11a0100d movne r1, sp b8e8: 1b000568 blne ce90 read += chunk; b8ec: e0866007 add r6, r6, r7 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { b8f0: e1560005 cmp r6, r5 b8f4: 3affffd6 bcc b854 b8f8: e3a07000 mov r7, #0 b8fc: ea000000 b b904 /* Not an error */ if (pipe->Writers == 0) goto out_locked; if (LIBIO_NODELAY(iop)) { ret = -EAGAIN; b900: e3e0700a mvn r7, #10 PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); b904: e5940028 ldr r0, [r4, #40] ; 0x28 b908: ebffedaa bl 6fb8 b90c: ea000000 b b914 PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { /* WARN waitingReaders not restored! */ ret = -EINTR; b910: e3e07003 mvn r7, #3 <== NOT EXECUTED PIPE_UNLOCK(pipe); out_nolock: if (read > 0) return read; return ret; b914: e3560000 cmp r6, #0 b918: d1a06007 movle r6, r7 b91c: ea000000 b b924 ) { int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; b920: e3e06003 mvn r6, #3 <== NOT EXECUTED out_nolock: if (read > 0) return read; return ret; } b924: e1a00006 mov r0, r6 b928: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 0000b92c : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { b92c: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) b930: e2527000 subs r7, r2, #0 pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { b934: e1a04000 mov r4, r0 b938: e1a0b001 mov fp, r1 b93c: e1a08003 mov r8, r3 int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) return 0; b940: 01a05007 moveq r5, r7 ) { int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) b944: 0a000062 beq bad4 return 0; if (! PIPE_LOCK(pipe)) b948: e3a01000 mov r1, #0 b94c: e5900028 ldr r0, [r0, #40] ; 0x28 b950: e1a02001 mov r2, r1 b954: ebffed51 bl 6ea0 b958: e3500000 cmp r0, #0 return -EINTR; b95c: 13e05003 mvnne r5, #3 /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) b960: 1a00005b bne bad4 return -EINTR; if (pipe->Readers == 0) { b964: e5945010 ldr r5, [r4, #16] b968: e3550000 cmp r5, #0 b96c: 0a00004c beq baa4 ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; b970: e5949004 ldr r9, [r4, #4] b974: e1570009 cmp r7, r9 b978: 91a09007 movls r9, r7 b97c: 83a09001 movhi r9, #1 /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ret = -EINTR; b980: e1a05000 mov r5, r0 b984: ea000040 b ba8c /* 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) { if (LIBIO_NODELAY(iop)) { b988: e598a014 ldr sl, [r8, #20] b98c: e21aa001 ands sl, sl, #1 b990: 1a000041 bne ba9c ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; b994: e594301c ldr r3, [r4, #28] b998: e2833001 add r3, r3, #1 b99c: e584301c str r3, [r4, #28] PIPE_UNLOCK(pipe); b9a0: e5940028 ldr r0, [r4, #40] ; 0x28 b9a4: ebffed83 bl 6fb8 if (! PIPE_WRITEWAIT(pipe)) b9a8: e1a0100a mov r1, sl b9ac: e5940030 ldr r0, [r4, #48] ; 0x30 b9b0: eb00054c bl cee8 b9b4: e3500000 cmp r0, #0 b9b8: 01a06000 moveq r6, r0 b9bc: 13e06003 mvnne r6, #3 ret = -EINTR; if (! PIPE_LOCK(pipe)) { b9c0: e1a0100a mov r1, sl b9c4: e5940028 ldr r0, [r4, #40] ; 0x28 b9c8: e1a0200a mov r2, sl b9cc: ebffed33 bl 6ea0 b9d0: e3500000 cmp r0, #0 b9d4: 1a00003b bne bac8 /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; b9d8: e594301c ldr r3, [r4, #28] if (ret != 0) b9dc: e3560000 cmp r6, #0 if (! PIPE_LOCK(pipe)) { /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; b9e0: e2433001 sub r3, r3, #1 b9e4: e584301c str r3, [r4, #28] if (ret != 0) b9e8: 1a00002e bne baa8 goto out_locked; if (pipe->Readers == 0) { b9ec: e5943010 ldr r3, [r4, #16] b9f0: e3530000 cmp r3, #0 b9f4: 0a00002a beq baa4 /* 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) { b9f8: e594a004 ldr sl, [r4, #4] b9fc: e594300c ldr r3, [r4, #12] ba00: e063200a rsb r2, r3, sl ba04: e1520009 cmp r2, r9 ba08: 3affffde bcc b988 goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); chunk1 = pipe->Size - PIPE_WSTART(pipe); ba0c: e5940008 ldr r0, [r4, #8] ba10: e1a0100a mov r1, sl ba14: e0830000 add r0, r3, r0 ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); ba18: e0656007 rsb r6, r5, r7 ba1c: e1520006 cmp r2, r6 ba20: 31a06002 movcc r6, r2 chunk1 = pipe->Size - PIPE_WSTART(pipe); ba24: eb003cea bl 1add4 <__umodsi3> ba28: e5943000 ldr r3, [r4] ba2c: e060a00a rsb sl, r0, sl if (chunk > chunk1) { ba30: e156000a cmp r6, sl ba34: e08b1005 add r1, fp, r5 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); ba38: d0830000 addle r0, r3, r0 ba3c: d1a02006 movle r2, r6 } } chunk = MIN(count - written, PIPE_SPACE(pipe)); chunk1 = pipe->Size - PIPE_WSTART(pipe); if (chunk > chunk1) { ba40: da000006 ble ba60 memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); ba44: e1a0200a mov r2, sl ba48: e0830000 add r0, r3, r0 ba4c: eb001095 bl fca8 memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); ba50: e08a1005 add r1, sl, r5 ba54: e5940000 ldr r0, [r4] ba58: e08b1001 add r1, fp, r1 ba5c: e06a2006 rsb r2, sl, r6 } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); ba60: eb001090 bl fca8 pipe->Length += chunk; ba64: e594300c ldr r3, [r4, #12] ba68: e0833006 add r3, r3, r6 ba6c: e584300c str r3, [r4, #12] if (pipe->waitingReaders > 0) ba70: e5943018 ldr r3, [r4, #24] ba74: e3530000 cmp r3, #0 PIPE_WAKEUPREADERS(pipe); ba78: 1594002c ldrne r0, [r4, #44] ; 0x2c ba7c: 11a0100d movne r1, sp ba80: 1b000502 blne ce90 written += chunk; ba84: e0855006 add r5, r5, r6 /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; ba88: e3a09001 mov r9, #1 } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { ba8c: e1550007 cmp r5, r7 ba90: 3affffd8 bcc b9f8 ba94: e3a06000 mov r6, #0 ba98: ea000002 b baa8 while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) { ret = -EAGAIN; ba9c: e3e0600a mvn r6, #10 baa0: ea000000 b baa8 pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { ret = -EPIPE; baa4: e3e0601f mvn r6, #31 /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); baa8: e5940028 ldr r0, [r4, #40] ; 0x28 baac: ebffed41 bl 6fb8 out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE) bab0: e3760020 cmn r6, #32 bab4: 1a000004 bne bacc kill(getpid(), SIGPIPE); bab8: eb0001f1 bl c284 babc: e3a0100d mov r1, #13 bac0: eb0002a4 bl c558 bac4: ea000000 b bacc PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { /* WARN waitingWriters not restored! */ ret = -EINTR; bac8: e3e06003 mvn r6, #3 <== NOT EXECUTED /* Signal SIGPIPE */ if (ret == -EPIPE) kill(getpid(), SIGPIPE); #endif if (written > 0) bacc: e3550000 cmp r5, #0 bad0: d1a05006 movle r5, r6 return written; return ret; } bad4: e1a00005 mov r0, r5 bad8: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 0000a1fc : int pthread_attr_setschedpolicy( pthread_attr_t *attr, int policy ) { if ( !attr || !attr->is_initialized ) a1fc: e3500000 cmp r0, #0 a200: 0a00000b beq a234 a204: e5903000 ldr r3, [r0] a208: e3530000 cmp r3, #0 a20c: 0a000008 beq a234 return EINVAL; switch ( policy ) { a210: e3510004 cmp r1, #4 a214: 8a000008 bhi a23c a218: e3a03001 mov r3, #1 a21c: e1a03113 lsl r3, r3, r1 a220: e3130017 tst r3, #23 case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: case SCHED_SPORADIC: attr->schedpolicy = policy; a224: 15801014 strne r1, [r0, #20] return 0; a228: 13a00000 movne r0, #0 ) { if ( !attr || !attr->is_initialized ) return EINVAL; switch ( policy ) { a22c: 112fff1e bxne lr a230: ea000001 b a23c <== NOT EXECUTED pthread_attr_t *attr, int policy ) { if ( !attr || !attr->is_initialized ) return EINVAL; a234: e3a00016 mov r0, #22 a238: e12fff1e bx lr case SCHED_SPORADIC: attr->schedpolicy = policy; return 0; default: return ENOTSUP; a23c: e3a00086 mov r0, #134 ; 0x86 } } a240: e12fff1e bx lr =============================================================================== 00007040 : int pthread_mutexattr_setpshared( pthread_mutexattr_t *attr, int pshared ) { if ( !attr || !attr->is_initialized ) 7040: e3500000 cmp r0, #0 7044: 0a000007 beq 7068 7048: e5903000 ldr r3, [r0] 704c: e3530000 cmp r3, #0 7050: 0a000004 beq 7068 return EINVAL; switch ( pshared ) { 7054: e3510001 cmp r1, #1 case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 7058: 95801004 strls r1, [r0, #4] return 0; 705c: 93a00000 movls r0, #0 ) { if ( !attr || !attr->is_initialized ) return EINVAL; switch ( pshared ) { 7060: 912fff1e bxls lr 7064: ea000001 b 7070 pthread_mutexattr_t *attr, int pshared ) { if ( !attr || !attr->is_initialized ) return EINVAL; 7068: e3a00016 mov r0, #22 706c: e12fff1e bx lr case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; default: return EINVAL; 7070: e3a00016 mov r0, #22 } } 7074: e12fff1e bx lr =============================================================================== 00006cac : int pthread_rwlockattr_setpshared( pthread_rwlockattr_t *attr, int pshared ) { if ( !attr ) 6cac: e3500000 cmp r0, #0 6cb0: 0a000007 beq 6cd4 return EINVAL; if ( !attr->is_initialized ) 6cb4: e5903000 ldr r3, [r0] 6cb8: e3530000 cmp r3, #0 6cbc: 0a000004 beq 6cd4 return EINVAL; switch ( pshared ) { 6cc0: e3510001 cmp r1, #1 case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 6cc4: 95801004 strls r1, [r0, #4] return 0; 6cc8: 93a00000 movls r0, #0 return EINVAL; if ( !attr->is_initialized ) return EINVAL; switch ( pshared ) { 6ccc: 912fff1e bxls lr 6cd0: ea000001 b 6cdc { if ( !attr ) return EINVAL; if ( !attr->is_initialized ) return EINVAL; 6cd4: e3a00016 mov r0, #22 6cd8: e12fff1e bx lr case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; default: return EINVAL; 6cdc: e3a00016 mov r0, #22 } } 6ce0: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 00011db4 : ) { uintptr_t old_size; char *new_area; MSBUMP(realloc_calls, 1); 11db4: e59f310c ldr r3, [pc, #268] ; 11ec8 11db8: e5932010 ldr r2, [r3, #16] 11dbc: e2822001 add r2, r2, #1 void *realloc( void *ptr, size_t size ) { 11dc0: e92d40f1 push {r0, r4, r5, r6, r7, lr} uintptr_t old_size; char *new_area; MSBUMP(realloc_calls, 1); 11dc4: e5832010 str r2, [r3, #16] /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 11dc8: e59f30fc ldr r3, [pc, #252] ; 11ecc 11dcc: e5933000 ldr r3, [r3] 11dd0: e3530003 cmp r3, #3 void *realloc( void *ptr, size_t size ) { 11dd4: e1a04000 mov r4, r0 11dd8: e1a05001 mov r5, r1 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 11ddc: 1a000009 bne 11e08 if (_Thread_Dispatch_disable_level > 0) 11de0: e59f30e8 ldr r3, [pc, #232] ; 11ed0 11de4: e5933000 ldr r3, [r3] 11de8: e3530000 cmp r3, #0 return (void *) 0; 11dec: 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) 11df0: 1a000032 bne 11ec0 return (void *) 0; if (_ISR_Nest_level > 0) 11df4: e59f20d8 ldr r2, [pc, #216] ; 11ed4 11df8: e5922000 ldr r2, [r2] 11dfc: e3520000 cmp r2, #0 return (void *) 0; 11e00: 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) 11e04: 1a00002d bne 11ec0 } /* * Continue with realloc(). */ if ( !ptr ) 11e08: e3540000 cmp r4, #0 11e0c: 1a000003 bne 11e20 return malloc( size ); 11e10: e1a00005 mov r0, r5 11e14: ebffc073 bl 1fe8 11e18: e1a04000 mov r4, r0 11e1c: ea000027 b 11ec0 if ( !size ) { 11e20: e3550000 cmp r5, #0 11e24: 1a000003 bne 11e38 free( ptr ); 11e28: e1a00004 mov r0, r4 <== NOT EXECUTED 11e2c: ebffbf9e bl 1cac <== NOT EXECUTED return (void *) 0; 11e30: e1a04005 mov r4, r5 <== NOT EXECUTED 11e34: ea000021 b 11ec0 <== NOT EXECUTED } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 11e38: e59f6098 ldr r6, [pc, #152] ; 11ed8 11e3c: e1a01004 mov r1, r4 11e40: e5960000 ldr r0, [r6] 11e44: e1a0200d mov r2, sp 11e48: eb00004e bl 11f88 <_Protected_heap_Get_block_size> 11e4c: e2507000 subs r7, r0, #0 11e50: 1a000004 bne 11e68 errno = EINVAL; 11e54: ebffeb23 bl cae8 <__errno> 11e58: e3a03016 mov r3, #22 11e5c: e5803000 str r3, [r0] return (void *) 0; 11e60: e1a04007 mov r4, r7 11e64: ea000015 b 11ec0 } /* * Now resize it. */ if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, size ) ) { 11e68: e5960000 ldr r0, [r6] 11e6c: e1a01004 mov r1, r4 11e70: e1a02005 mov r2, r5 11e74: eb000054 bl 11fcc <_Protected_heap_Resize_block> 11e78: e3500000 cmp r0, #0 11e7c: 1a00000f bne 11ec0 * 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 ); 11e80: e1a00005 mov r0, r5 11e84: ebffc057 bl 1fe8 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 11e88: e59f3038 ldr r3, [pc, #56] ; 11ec8 11e8c: e5932004 ldr r2, [r3, #4] if ( !new_area ) { 11e90: e2506000 subs r6, r0, #0 * and the C Standard. */ new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 11e94: e2422001 sub r2, r2, #1 11e98: e5832004 str r2, [r3, #4] if ( !new_area ) { 11e9c: 0a000006 beq 11ebc return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 11ea0: e59d2000 ldr r2, [sp] 11ea4: e1a01004 mov r1, r4 11ea8: e1550002 cmp r5, r2 11eac: 31a02005 movcc r2, r5 11eb0: ebffed3a bl d3a0 free( ptr ); 11eb4: e1a00004 mov r0, r4 11eb8: ebffbf7b bl 1cac new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ if ( !new_area ) { return (void *) 0; 11ebc: e1a04006 mov r4, r6 memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 11ec0: e1a00004 mov r0, r4 11ec4: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} =============================================================================== 00005e68 : * errno - otherwise */ int rtems_aio_enqueue (rtems_aio_request *req) { 5e68: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, 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); 5e6c: e59f41f0 ldr r4, [pc, #496] ; 6064 * errno - otherwise */ int rtems_aio_enqueue (rtems_aio_request *req) { 5e70: e24dd024 sub sp, sp, #36 ; 0x24 5e74: 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); 5e78: e1a00004 mov r0, r4 5e7c: eb00024f bl 67c0 if (result != 0) { 5e80: e2505000 subs r5, r0, #0 5e84: 0a000002 beq 5e94 free (req); 5e88: e1a00006 mov r0, r6 <== NOT EXECUTED 5e8c: ebfff28a bl 28bc <== NOT EXECUTED return result; 5e90: ea000070 b 6058 <== NOT EXECUTED } /* _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); 5e94: eb000456 bl 6ff4 5e98: e28d101c add r1, sp, #28 5e9c: e1a0200d mov r2, sp 5ea0: eb00035b bl 6c14 req->caller_thread = pthread_self (); 5ea4: eb000452 bl 6ff4 req->priority = param.sched_priority - req->aiocbp->aio_reqprio; 5ea8: e5963014 ldr r3, [r6, #20] 5eac: e59d1000 ldr r1, [sp] 5eb0: e5932014 ldr r2, [r3, #20] 5eb4: e0622001 rsb r2, r2, r1 5eb8: e586200c str r2, [r6, #12] req->policy = policy; 5ebc: e59d201c ldr r2, [sp, #28] 5ec0: e5862008 str r2, [r6, #8] req->aiocbp->error_code = EINPROGRESS; 5ec4: e3a02077 mov r2, #119 ; 0x77 /* _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 (); 5ec8: e5860010 str r0, [r6, #16] req->priority = param.sched_priority - req->aiocbp->aio_reqprio; req->policy = policy; req->aiocbp->error_code = EINPROGRESS; 5ecc: e5832030 str r2, [r3, #48] ; 0x30 req->aiocbp->return_value = 0; if ((aio_request_queue.idle_threads == 0) && 5ed0: e5942068 ldr r2, [r4, #104] ; 0x68 5ed4: e3520000 cmp r2, #0 req->caller_thread = pthread_self (); req->priority = param.sched_priority - req->aiocbp->aio_reqprio; req->policy = policy; req->aiocbp->error_code = EINPROGRESS; req->aiocbp->return_value = 0; 5ed8: e5835034 str r5, [r3, #52] ; 0x34 if ((aio_request_queue.idle_threads == 0) && 5edc: 1a00002e bne 5f9c 5ee0: e5942064 ldr r2, [r4, #100] ; 0x64 5ee4: e3520004 cmp r2, #4 5ee8: ca00002b bgt 5f9c 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); 5eec: e5931000 ldr r1, [r3] 5ef0: e2840048 add r0, r4, #72 ; 0x48 5ef4: e3a02001 mov r2, #1 5ef8: ebfffedd bl 5a74 if (r_chain->new_fd == 1) { 5efc: e5903018 ldr r3, [r0, #24] 5f00: e3530001 cmp r3, #1 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); 5f04: e1a07000 mov r7, r0 5f08: e2809008 add r9, r0, #8 5f0c: e280801c add r8, r0, #28 5f10: e280a020 add sl, r0, #32 if (r_chain->new_fd == 1) { 5f14: 1a000017 bne 5f78 RTEMS_INLINE_ROUTINE void _Chain_Prepend( Chain_Control *the_chain, Chain_Node *the_node ) { _Chain_Insert(_Chain_Head(the_chain), the_node); 5f18: e1a01006 mov r1, r6 5f1c: e1a00009 mov r0, r9 5f20: eb000852 bl 8070 <_Chain_Insert> rtems_chain_prepend (&r_chain->perfd, &req->next_prio); r_chain->new_fd = 0; pthread_mutex_init (&r_chain->mutex, NULL); 5f24: 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; 5f28: e5875018 str r5, [r7, #24] pthread_mutex_init (&r_chain->mutex, NULL); 5f2c: e1a00008 mov r0, r8 5f30: eb0001d0 bl 6678 pthread_cond_init (&r_chain->cond, NULL); 5f34: e1a01005 mov r1, r5 5f38: e1a0000a mov r0, sl 5f3c: eb0000e5 bl 62d8 AIO_printf ("New thread \n"); result = pthread_create (&thid, &aio_request_queue.attr, 5f40: e1a03007 mov r3, r7 5f44: e28d0020 add r0, sp, #32 5f48: e2841008 add r1, r4, #8 5f4c: e59f2114 ldr r2, [pc, #276] ; 6068 5f50: eb00029b bl 69c4 rtems_aio_handle, (void *) r_chain); if (result != 0) { 5f54: e2506000 subs r6, r0, #0 pthread_mutex_unlock (&aio_request_queue.mutex); return result; } ++aio_request_queue.active_threads; 5f58: 05943064 ldreq r3, [r4, #100] ; 0x64 5f5c: 02833001 addeq r3, r3, #1 5f60: 05843064 streq r3, [r4, #100] ; 0x64 pthread_cond_init (&r_chain->cond, NULL); AIO_printf ("New thread \n"); result = pthread_create (&thid, &aio_request_queue.attr, rtems_aio_handle, (void *) r_chain); if (result != 0) { 5f64: 0a000039 beq 6050 pthread_mutex_unlock (&aio_request_queue.mutex); 5f68: e1a00004 mov r0, r4 <== NOT EXECUTED 5f6c: eb000232 bl 683c <== NOT EXECUTED return result; 5f70: e1a05006 mov r5, r6 <== NOT EXECUTED 5f74: ea000037 b 6058 <== NOT EXECUTED } ++aio_request_queue.active_threads; } else { /* put request in the fd chain it belongs to */ pthread_mutex_lock (&r_chain->mutex); 5f78: e1a00008 mov r0, r8 5f7c: eb00020f bl 67c0 rtems_aio_insert_prio (&r_chain->perfd, req); 5f80: e1a00009 mov r0, r9 5f84: e1a01006 mov r1, r6 5f88: ebffff7c bl 5d80 pthread_cond_signal (&r_chain->cond); 5f8c: e1a0000a mov r0, sl 5f90: eb000100 bl 6398 pthread_mutex_unlock (&r_chain->mutex); 5f94: e1a00008 mov r0, r8 5f98: ea00000e b 5fd8 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, 5f9c: e59f00c8 ldr r0, [pc, #200] ; 606c 5fa0: e5931000 ldr r1, [r3] 5fa4: e3a02000 mov r2, #0 5fa8: ebfffeb1 bl 5a74 req->aiocbp->aio_fildes, 0); if (r_chain != NULL) 5fac: e2504000 subs r4, r0, #0 5fb0: 0a00000a beq 5fe0 { pthread_mutex_lock (&r_chain->mutex); 5fb4: e284701c add r7, r4, #28 <== NOT EXECUTED 5fb8: e1a00007 mov r0, r7 <== NOT EXECUTED 5fbc: eb0001ff bl 67c0 <== NOT EXECUTED rtems_aio_insert_prio (&r_chain->perfd, req); 5fc0: e2840008 add r0, r4, #8 <== NOT EXECUTED 5fc4: e1a01006 mov r1, r6 <== NOT EXECUTED 5fc8: ebffff6c bl 5d80 <== NOT EXECUTED pthread_cond_signal (&r_chain->cond); 5fcc: e2840020 add r0, r4, #32 <== NOT EXECUTED 5fd0: eb0000f0 bl 6398 <== NOT EXECUTED pthread_mutex_unlock (&r_chain->mutex); 5fd4: e1a00007 mov r0, r7 <== NOT EXECUTED 5fd8: eb000217 bl 683c 5fdc: ea00001b b 6050 } else { /* or to the idle chain */ chain = &aio_request_queue.idle_req; r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1); 5fe0: e5963014 ldr r3, [r6, #20] 5fe4: e59f0084 ldr r0, [pc, #132] ; 6070 5fe8: e5931000 ldr r1, [r3] 5fec: e3a02001 mov r2, #1 5ff0: ebfffe9f bl 5a74 if (r_chain->new_fd == 1) { 5ff4: e5903018 ldr r3, [r0, #24] 5ff8: e3530001 cmp r3, #1 } else { /* or to the idle chain */ chain = &aio_request_queue.idle_req; r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1); 5ffc: e1a07000 mov r7, r0 6000: e2800008 add r0, r0, #8 if (r_chain->new_fd == 1) { 6004: 1a00000f bne 6048 6008: e1a01006 mov r1, r6 600c: eb000817 bl 8070 <_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); 6010: e1a01004 mov r1, r4 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; 6014: e5874018 str r4, [r7, #24] pthread_mutex_init (&r_chain->mutex, NULL); 6018: e287001c add r0, r7, #28 601c: eb000195 bl 6678 pthread_cond_init (&r_chain->cond, NULL); 6020: e1a01004 mov r1, r4 6024: e2870020 add r0, r7, #32 6028: eb0000aa bl 62d8 pthread_cond_signal (&aio_request_queue.new_req); 602c: e59f0040 ldr r0, [pc, #64] ; 6074 6030: eb0000d8 bl 6398 ++aio_request_queue.idle_threads; 6034: e59f3028 ldr r3, [pc, #40] ; 6064 6038: e5932068 ldr r2, [r3, #104] ; 0x68 603c: e2822001 add r2, r2, #1 6040: e5832068 str r2, [r3, #104] ; 0x68 6044: ea000001 b 6050 } else /* just insert the request in the existing fd chain */ rtems_aio_insert_prio (&r_chain->perfd, req); 6048: e1a01006 mov r1, r6 604c: ebffff4b bl 5d80 } } pthread_mutex_unlock (&aio_request_queue.mutex); 6050: e59f000c ldr r0, [pc, #12] ; 6064 6054: eb0001f8 bl 683c return 0; } 6058: e1a00005 mov r0, r5 605c: e28dd024 add sp, sp, #36 ; 0x24 6060: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} =============================================================================== 00005b1c : * NULL - if error */ static void * rtems_aio_handle (void *arg) { 5b1c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED The fd chain is already unlocked */ struct timespec timeout; pthread_mutex_unlock (&r_chain->mutex); pthread_mutex_lock (&aio_request_queue.mutex); 5b20: e59f624c ldr r6, [pc, #588] ; 5d74 <== NOT EXECUTED * NULL - if error */ static void * rtems_aio_handle (void *arg) { 5b24: e24dd02c sub sp, sp, #44 ; 0x2c <== NOT EXECUTED 5b28: e1a04000 mov r4, r0 <== 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); 5b2c: e28d7020 add r7, sp, #32 <== NOT EXECUTED pthread_cond_destroy (&r_chain->cond); 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)) { 5b30: e286b058 add fp, r6, #88 ; 0x58 <== 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); 5b34: e28d9004 add r9, sp, #4 <== 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); 5b38: e284a01c add sl, r4, #28 <== NOT EXECUTED 5b3c: e1a0000a mov r0, sl <== NOT EXECUTED 5b40: eb00031e bl 67c0 <== NOT EXECUTED if (result != 0) 5b44: e2508000 subs r8, r0, #0 <== NOT EXECUTED 5b48: 1a000086 bne 5d68 <== NOT EXECUTED } AIO_printf ("Thread finished\n"); return NULL; } 5b4c: e5945008 ldr r5, [r4, #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 ); 5b50: e284300c add r3, r4, #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)) { 5b54: e1550003 cmp r5, r3 <== NOT EXECUTED 5b58: 0a000035 beq 5c34 <== 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); 5b5c: eb000524 bl 6ff4 <== NOT EXECUTED 5b60: e28d1028 add r1, sp, #40 ; 0x28 <== NOT EXECUTED 5b64: e1a02009 mov r2, r9 <== NOT EXECUTED 5b68: eb000429 bl 6c14 <== NOT EXECUTED param.sched_priority = req->priority; 5b6c: e595300c ldr r3, [r5, #12] <== NOT EXECUTED 5b70: e58d3004 str r3, [sp, #4] <== NOT EXECUTED pthread_setschedparam (pthread_self(), req->policy, ¶m); 5b74: eb00051e bl 6ff4 <== NOT EXECUTED 5b78: e1a02009 mov r2, r9 <== NOT EXECUTED 5b7c: e5951008 ldr r1, [r5, #8] <== NOT EXECUTED 5b80: eb000520 bl 7008 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 5b84: e1a00005 mov r0, r5 <== NOT EXECUTED 5b88: eb000923 bl 801c <_Chain_Extract> <== NOT EXECUTED rtems_chain_extract (node); pthread_mutex_unlock (&r_chain->mutex); 5b8c: e1a0000a mov r0, sl <== NOT EXECUTED 5b90: eb000329 bl 683c <== NOT EXECUTED switch (req->aiocbp->aio_lio_opcode) { 5b94: e5952014 ldr r2, [r5, #20] <== NOT EXECUTED 5b98: e592302c ldr r3, [r2, #44] ; 0x2c <== NOT EXECUTED 5b9c: e3530002 cmp r3, #2 <== NOT EXECUTED 5ba0: 0a00000b beq 5bd4 <== NOT EXECUTED 5ba4: e3530003 cmp r3, #3 <== NOT EXECUTED 5ba8: 0a000011 beq 5bf4 <== NOT EXECUTED 5bac: e3530001 cmp r3, #1 <== NOT EXECUTED 5bb0: 1a000013 bne 5c04 <== NOT EXECUTED case LIO_READ: result = pread (req->aiocbp->aio_fildes, 5bb4: e5921008 ldr r1, [r2, #8] <== NOT EXECUTED 5bb8: e5923004 ldr r3, [r2, #4] <== NOT EXECUTED 5bbc: e58d1000 str r1, [sp] <== NOT EXECUTED 5bc0: e592100c ldr r1, [r2, #12] <== NOT EXECUTED 5bc4: e5920000 ldr r0, [r2] <== NOT EXECUTED 5bc8: e5922010 ldr r2, [r2, #16] <== NOT EXECUTED 5bcc: eb002910 bl 10014 <== NOT EXECUTED (void *) req->aiocbp->aio_buf, req->aiocbp->aio_nbytes, req->aiocbp->aio_offset); break; 5bd0: ea000009 b 5bfc <== NOT EXECUTED case LIO_WRITE: result = pwrite (req->aiocbp->aio_fildes, 5bd4: e5921008 ldr r1, [r2, #8] <== NOT EXECUTED 5bd8: e5923004 ldr r3, [r2, #4] <== NOT EXECUTED 5bdc: e58d1000 str r1, [sp] <== NOT EXECUTED 5be0: e592100c ldr r1, [r2, #12] <== NOT EXECUTED 5be4: e5920000 ldr r0, [r2] <== NOT EXECUTED 5be8: e5922010 ldr r2, [r2, #16] <== NOT EXECUTED 5bec: eb002950 bl 10134 <== NOT EXECUTED (void *) req->aiocbp->aio_buf, req->aiocbp->aio_nbytes, req->aiocbp->aio_offset); break; 5bf0: ea000001 b 5bfc <== NOT EXECUTED case LIO_SYNC: result = fsync (req->aiocbp->aio_fildes); 5bf4: e5920000 ldr r0, [r2] <== NOT EXECUTED 5bf8: eb00195e bl c178 <== NOT EXECUTED break; default: result = -1; } if (result == -1) { 5bfc: e3700001 cmn r0, #1 <== NOT EXECUTED 5c00: 1a000006 bne 5c20 <== NOT EXECUTED req->aiocbp->return_value = -1; 5c04: e5955014 ldr r5, [r5, #20] <== NOT EXECUTED 5c08: e3e02000 mvn r2, #0 <== NOT EXECUTED 5c0c: e5852034 str r2, [r5, #52] ; 0x34 <== NOT EXECUTED req->aiocbp->error_code = errno; 5c10: eb0025fd bl f40c <__errno> <== NOT EXECUTED 5c14: e5903000 ldr r3, [r0] <== NOT EXECUTED 5c18: e5853030 str r3, [r5, #48] ; 0x30 <== NOT EXECUTED 5c1c: eaffffc5 b 5b38 <== NOT EXECUTED } else { req->aiocbp->return_value = result; 5c20: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED req->aiocbp->error_code = 0; 5c24: e3a02000 mov r2, #0 <== NOT EXECUTED } if (result == -1) { req->aiocbp->return_value = -1; req->aiocbp->error_code = errno; } else { req->aiocbp->return_value = result; 5c28: e5830034 str r0, [r3, #52] ; 0x34 <== NOT EXECUTED req->aiocbp->error_code = 0; 5c2c: e5832030 str r2, [r3, #48] ; 0x30 <== NOT EXECUTED 5c30: eaffffc0 b 5b38 <== 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); 5c34: e1a0000a mov r0, sl <== NOT EXECUTED 5c38: eb0002ff bl 683c <== NOT EXECUTED pthread_mutex_lock (&aio_request_queue.mutex); 5c3c: e59f0130 ldr r0, [pc, #304] ; 5d74 <== NOT EXECUTED 5c40: eb0002de bl 67c0 <== NOT EXECUTED if (rtems_chain_is_empty (chain)) 5c44: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED 5c48: e1530005 cmp r3, r5 <== NOT EXECUTED 5c4c: 1affffb9 bne 5b38 <== NOT EXECUTED { clock_gettime (CLOCK_REALTIME, &timeout); 5c50: e1a01007 mov r1, r7 <== NOT EXECUTED 5c54: e3a00001 mov r0, #1 <== NOT EXECUTED 5c58: eb000150 bl 61a0 <== NOT EXECUTED timeout.tv_sec += 3; 5c5c: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED timeout.tv_nsec = 0; result = pthread_cond_timedwait (&r_chain->cond, 5c60: e2845020 add r5, r4, #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; 5c64: e2833003 add r3, r3, #3 <== NOT EXECUTED timeout.tv_nsec = 0; result = pthread_cond_timedwait (&r_chain->cond, 5c68: e1a00005 mov r0, r5 <== NOT EXECUTED 5c6c: e59f1100 ldr r1, [pc, #256] ; 5d74 <== NOT EXECUTED 5c70: e1a02007 mov r2, r7 <== 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; 5c74: e58d3020 str r3, [sp, #32] <== NOT EXECUTED timeout.tv_nsec = 0; 5c78: e58d8024 str r8, [sp, #36] ; 0x24 <== NOT EXECUTED result = pthread_cond_timedwait (&r_chain->cond, 5c7c: eb0001dc bl 63f4 <== 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) { 5c80: e3500074 cmp r0, #116 ; 0x74 <== NOT EXECUTED 5c84: 1affffab bne 5b38 <== NOT EXECUTED 5c88: e1a00004 mov r0, r4 <== NOT EXECUTED 5c8c: eb0008e2 bl 801c <_Chain_Extract> <== NOT EXECUTED rtems_chain_extract (&r_chain->next_fd); pthread_mutex_destroy (&r_chain->mutex); 5c90: e1a0000a mov r0, sl <== NOT EXECUTED 5c94: eb00022b bl 6548 <== NOT EXECUTED pthread_cond_destroy (&r_chain->cond); 5c98: e1a00005 mov r0, r5 <== NOT EXECUTED 5c9c: eb00015d bl 6218 <== NOT EXECUTED free (r_chain); 5ca0: e1a00004 mov r0, r4 <== NOT EXECUTED 5ca4: ebfff304 bl 28bc <== 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)) { 5ca8: e5963054 ldr r3, [r6, #84] ; 0x54 <== NOT EXECUTED 5cac: e153000b cmp r3, fp <== NOT EXECUTED 5cb0: 1a000029 bne 5d5c <== NOT EXECUTED ++aio_request_queue.idle_threads; 5cb4: e5963068 ldr r3, [r6, #104] ; 0x68 <== NOT EXECUTED clock_gettime (CLOCK_REALTIME, &timeout); 5cb8: e1a01007 mov r1, r7 <== 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; 5cbc: e2833001 add r3, r3, #1 <== NOT EXECUTED clock_gettime (CLOCK_REALTIME, &timeout); 5cc0: e3a00001 mov r0, #1 <== 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; 5cc4: e5863068 str r3, [r6, #104] ; 0x68 <== NOT EXECUTED clock_gettime (CLOCK_REALTIME, &timeout); 5cc8: eb000134 bl 61a0 <== NOT EXECUTED timeout.tv_sec += 3; 5ccc: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED timeout.tv_nsec = 0; result = pthread_cond_timedwait (&aio_request_queue.new_req, 5cd0: e59f00a0 ldr r0, [pc, #160] ; 5d78 <== 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; 5cd4: e2833003 add r3, r3, #3 <== NOT EXECUTED timeout.tv_nsec = 0; result = pthread_cond_timedwait (&aio_request_queue.new_req, 5cd8: e59f1094 ldr r1, [pc, #148] ; 5d74 <== NOT EXECUTED 5cdc: e1a02007 mov r2, r7 <== 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; 5ce0: e58d3020 str r3, [sp, #32] <== NOT EXECUTED timeout.tv_nsec = 0; 5ce4: e58d8024 str r8, [sp, #36] ; 0x24 <== NOT EXECUTED result = pthread_cond_timedwait (&aio_request_queue.new_req, 5ce8: eb0001c1 bl 63f4 <== 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) { 5cec: e3500074 cmp r0, #116 ; 0x74 <== NOT EXECUTED 5cf0: 1a000002 bne 5d00 <== NOT EXECUTED pthread_mutex_unlock (&aio_request_queue.mutex); 5cf4: e59f0078 ldr r0, [pc, #120] ; 5d74 <== NOT EXECUTED 5cf8: eb0002cf bl 683c <== NOT EXECUTED return NULL; 5cfc: ea000019 b 5d68 <== NOT EXECUTED } AIO_printf ("Thread finished\n"); return NULL; } 5d00: e5965054 ldr r5, [r6, #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; 5d04: e5963068 ldr r3, [r6, #104] ; 0x68 <== NOT EXECUTED 5d08: e1a00005 mov r0, r5 <== NOT EXECUTED 5d0c: e2433001 sub r3, r3, #1 <== NOT EXECUTED 5d10: e5863068 str r3, [r6, #104] ; 0x68 <== NOT EXECUTED 5d14: eb0008c0 bl 801c <_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, 5d18: e3a02001 mov r2, #1 <== NOT EXECUTED 5d1c: e5951014 ldr r1, [r5, #20] <== NOT EXECUTED 5d20: e59f0054 ldr r0, [pc, #84] ; 5d7c <== NOT EXECUTED 5d24: ebffff52 bl 5a74 <== NOT EXECUTED ((rtems_aio_request_chain *)node)->fildes, 1); r_chain->new_fd = 0; pthread_mutex_init (&r_chain->mutex, NULL); 5d28: e1a01008 mov r1, r8 <== 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, 5d2c: e1a04000 mov r4, r0 <== NOT EXECUTED ((rtems_aio_request_chain *)node)->fildes, 1); r_chain->new_fd = 0; 5d30: e5808018 str r8, [r0, #24] <== NOT EXECUTED pthread_mutex_init (&r_chain->mutex, NULL); 5d34: e280001c add r0, r0, #28 <== NOT EXECUTED 5d38: eb00024e bl 6678 <== NOT EXECUTED pthread_cond_init (&r_chain->cond, NULL); r_chain->perfd = ((rtems_aio_request_chain *)node)->perfd; 5d3c: e2855008 add r5, r5, #8 <== NOT EXECUTED r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, ((rtems_aio_request_chain *)node)->fildes, 1); r_chain->new_fd = 0; pthread_mutex_init (&r_chain->mutex, NULL); pthread_cond_init (&r_chain->cond, NULL); 5d40: e1a01008 mov r1, r8 <== NOT EXECUTED 5d44: e2840020 add r0, r4, #32 <== NOT EXECUTED 5d48: eb000162 bl 62d8 <== NOT EXECUTED r_chain->perfd = ((rtems_aio_request_chain *)node)->perfd; 5d4c: e8950007 ldm r5, {r0, r1, r2} <== NOT EXECUTED 5d50: e2843008 add r3, r4, #8 <== NOT EXECUTED 5d54: e8830007 stm r3, {r0, r1, r2} <== NOT EXECUTED 5d58: eaffff76 b 5b38 <== NOT EXECUTED } 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); 5d5c: e59f0010 ldr r0, [pc, #16] ; 5d74 <== NOT EXECUTED 5d60: eb0002b5 bl 683c <== NOT EXECUTED 5d64: eaffff73 b 5b38 <== NOT EXECUTED } AIO_printf ("Thread finished\n"); return NULL; } 5d68: e3a00000 mov r0, #0 <== NOT EXECUTED 5d6c: e28dd02c add sp, sp, #44 ; 0x2c <== NOT EXECUTED 5d70: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED =============================================================================== 000059b4 : * 0 - if initialization succeeded */ int rtems_aio_init (void) { 59b4: e92d4010 push {r4, lr} int result = 0; result = pthread_attr_init (&aio_request_queue.attr); 59b8: e59f00a4 ldr r0, [pc, #164] ; 5a64 59bc: eb0003e0 bl 6944 if (result != 0) 59c0: e2504000 subs r4, r0, #0 59c4: 1a000024 bne 5a5c return result; result = 59c8: e59f0094 ldr r0, [pc, #148] ; 5a64 59cc: e1a01004 mov r1, r4 59d0: eb0003ed bl 698c pthread_attr_setdetachstate (&aio_request_queue.attr, PTHREAD_CREATE_DETACHED); if (result != 0) 59d4: e3500000 cmp r0, #0 pthread_attr_destroy (&aio_request_queue.attr); 59d8: 159f0084 ldrne r0, [pc, #132] ; 5a64 59dc: 1b0003cf blne 6920 result = pthread_mutex_init (&aio_request_queue.mutex, NULL); 59e0: e59f0080 ldr r0, [pc, #128] ; 5a68 59e4: e3a01000 mov r1, #0 59e8: eb000322 bl 6678 if (result != 0) 59ec: e3500000 cmp r0, #0 pthread_attr_destroy (&aio_request_queue.attr); 59f0: 159f006c ldrne r0, [pc, #108] ; 5a64 59f4: 1b0003c9 blne 6920 result = pthread_cond_init (&aio_request_queue.new_req, NULL); 59f8: e59f006c ldr r0, [pc, #108] ; 5a6c 59fc: e3a01000 mov r1, #0 5a00: eb000234 bl 62d8 if (result != 0) { 5a04: e2504000 subs r4, r0, #0 5a08: 0a000003 beq 5a1c pthread_mutex_destroy (&aio_request_queue.mutex); 5a0c: e59f0054 ldr r0, [pc, #84] ; 5a68 5a10: eb0002cc bl 6548 <== NOT EXECUTED pthread_attr_destroy (&aio_request_queue.attr); 5a14: e59f0048 ldr r0, [pc, #72] ; 5a64 <== NOT EXECUTED 5a18: eb0003c0 bl 6920 <== NOT EXECUTED ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 5a1c: e59f3044 ldr r3, [pc, #68] ; 5a68 5a20: e283204c add r2, r3, #76 ; 0x4c head->previous = NULL; tail->previous = head; 5a24: e2831048 add r1, r3, #72 ; 0x48 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 5a28: e5832048 str r2, [r3, #72] ; 0x48 head->previous = NULL; 5a2c: e3a02000 mov r2, #0 5a30: e583204c str r2, [r3, #76] ; 0x4c tail->previous = head; 5a34: e5831050 str r1, [r3, #80] ; 0x50 { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; 5a38: e5832058 str r2, [r3, #88] ; 0x58 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 5a3c: e2831058 add r1, r3, #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; 5a40: e5832064 str r2, [r3, #100] ; 0x64 aio_request_queue.idle_threads = 0; 5a44: e5832068 str r2, [r3, #104] ; 0x68 aio_request_queue.initialized = AIO_QUEUE_INITIALIZED; 5a48: e59f2020 ldr r2, [pc, #32] ; 5a70 5a4c: e5831054 str r1, [r3, #84] ; 0x54 head->previous = NULL; tail->previous = head; 5a50: e2831054 add r1, r3, #84 ; 0x54 5a54: e583105c str r1, [r3, #92] ; 0x5c 5a58: e5832060 str r2, [r3, #96] ; 0x60 return result; } 5a5c: e1a00004 mov r0, r4 5a60: e8bd8010 pop {r4, pc} =============================================================================== 00005d80 : 5d80: e1a02000 mov r2, r0 5d84: e4923004 ldr r3, [r2], #4 rtems_chain_node *node; AIO_printf ("FD exists \n"); node = rtems_chain_first (chain); if (rtems_chain_is_empty (chain)) { 5d88: e1530002 cmp r3, r2 * NONE */ void rtems_aio_insert_prio (rtems_chain_control *chain, rtems_aio_request *req) { 5d8c: e1a0c001 mov ip, r1 rtems_chain_node *node; AIO_printf ("FD exists \n"); node = rtems_chain_first (chain); if (rtems_chain_is_empty (chain)) { 5d90: 0a00000d beq 5dcc 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; 5d94: e5931014 ldr r1, [r3, #20] while (req->aiocbp->aio_reqprio > prio && 5d98: e59c0014 ldr r0, [ip, #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; 5d9c: e5911014 ldr r1, [r1, #20] while (req->aiocbp->aio_reqprio > prio && 5da0: e5900014 ldr r0, [r0, #20] 5da4: ea000002 b 5db4 } AIO_printf ("Thread finished\n"); return NULL; } 5da8: 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; 5dac: e5931014 ldr r1, [r3, #20] <== NOT EXECUTED 5db0: e5911014 ldr r1, [r1, #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 && 5db4: e1500001 cmp r0, r1 5db8: da000001 ble 5dc4 5dbc: e1530002 cmp r3, r2 <== NOT EXECUTED 5dc0: 1afffff8 bne 5da8 <== 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 ); 5dc4: e5930004 ldr r0, [r3, #4] 5dc8: e1a0100c mov r1, ip 5dcc: ea0008a7 b 8070 <_Chain_Insert> =============================================================================== 00005dd0 : * Output parameters: * NONE */ void rtems_aio_remove_fd (rtems_aio_request_chain *r_chain) { 5dd0: e92d40f0 push {r4, r5, r6, r7, lr} <== 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)); 5dd4: e280700c add r7, r0, #12 <== NOT EXECUTED } AIO_printf ("Thread finished\n"); return NULL; } 5dd8: e5904008 ldr r4, [r0, #8] <== 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; 5ddc: e3a0608c mov r6, #140 ; 0x8c <== NOT EXECUTED req->aiocbp->return_value = -1; 5de0: e3e05000 mvn r5, #0 <== NOT EXECUTED rtems_chain_node *node; chain = &r_chain->perfd; node = rtems_chain_first (chain); while (!rtems_chain_is_tail (chain, node)) 5de4: ea000006 b 5e04 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 5de8: e1a00004 mov r0, r4 <== NOT EXECUTED 5dec: eb00088a bl 801c <_Chain_Extract> <== NOT EXECUTED { rtems_chain_extract (node); rtems_aio_request *req = (rtems_aio_request *) node; req->aiocbp->error_code = ECANCELED; 5df0: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED req->aiocbp->return_value = -1; free (req); 5df4: 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; 5df8: e5836030 str r6, [r3, #48] ; 0x30 <== NOT EXECUTED req->aiocbp->return_value = -1; 5dfc: e5835034 str r5, [r3, #52] ; 0x34 <== NOT EXECUTED free (req); 5e00: ebfff2ad bl 28bc <== NOT EXECUTED rtems_chain_node *node; chain = &r_chain->perfd; node = rtems_chain_first (chain); while (!rtems_chain_is_tail (chain, node)) 5e04: e1540007 cmp r4, r7 <== NOT EXECUTED 5e08: 1afffff6 bne 5de8 <== NOT EXECUTED rtems_aio_request *req = (rtems_aio_request *) node; req->aiocbp->error_code = ECANCELED; req->aiocbp->return_value = -1; free (req); } } 5e0c: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED =============================================================================== 00005e10 : * 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) { 5e10: e92d4010 push {r4, lr} <== NOT EXECUTED } AIO_printf ("Thread finished\n"); return NULL; } 5e14: 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) { 5e18: ea000000 b 5e20 <== NOT EXECUTED } AIO_printf ("Thread finished\n"); return NULL; } 5e1c: 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) { 5e20: e1540000 cmp r4, r0 <== NOT EXECUTED 5e24: 0a00000d beq 5e60 <== NOT EXECUTED 5e28: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED 5e2c: e1530001 cmp r3, r1 <== NOT EXECUTED 5e30: 1afffff9 bne 5e1c <== NOT EXECUTED 5e34: e1a00004 mov r0, r4 <== NOT EXECUTED 5e38: eb000877 bl 801c <_Chain_Extract> <== NOT EXECUTED if (rtems_chain_is_tail (chain, node)) return AIO_NOTCANCELED; else { rtems_chain_extract (node); current->aiocbp->error_code = ECANCELED; 5e3c: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED 5e40: e3a0208c mov r2, #140 ; 0x8c <== NOT EXECUTED 5e44: e5832030 str r2, [r3, #48] ; 0x30 <== NOT EXECUTED current->aiocbp->return_value = -1; 5e48: e3e02000 mvn r2, #0 <== NOT EXECUTED free (current); 5e4c: e1a00004 mov r0, r4 <== NOT EXECUTED return AIO_NOTCANCELED; else { rtems_chain_extract (node); current->aiocbp->error_code = ECANCELED; current->aiocbp->return_value = -1; 5e50: e5832034 str r2, [r3, #52] ; 0x34 <== NOT EXECUTED free (current); 5e54: ebfff298 bl 28bc <== NOT EXECUTED } return AIO_CANCELED; 5e58: e3a00000 mov r0, #0 <== NOT EXECUTED 5e5c: 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; 5e60: e3a00001 mov r0, #1 <== NOT EXECUTED current->aiocbp->return_value = -1; free (current); } return AIO_CANCELED; } 5e64: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== 000022f8 : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 22f8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} Timestamp_Control uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 22fc: e251a000 subs sl, r1, #0 void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 2300: e24dd040 sub sp, sp, #64 ; 0x40 2304: e1a08000 mov r8, r0 Timestamp_Control uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 2308: 0a000055 beq 2464 * When not using nanosecond CPU usage resolution, we have to count * the number of "ticks" we gave credit for to give the user a rough * guideline as to what each number means proportionally. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 230c: e28d5030 add r5, sp, #48 ; 0x30 2310: e1a00005 mov r0, r5 _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 2314: e28d4028 add r4, sp, #40 ; 0x28 * When not using nanosecond CPU usage resolution, we have to count * the number of "ticks" we gave credit for to give the user a rough * guideline as to what each number means proportionally. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 2318: eb00147f bl 751c <_TOD_Get_uptime> _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 231c: e1a01005 mov r1, r5 2320: e59f0144 ldr r0, [pc, #324] ; 246c 2324: e1a02004 mov r2, r4 2328: eb001d3b bl 981c <_Timespec_Subtract> } } } #endif (*print)( 232c: e1a00008 mov r0, r8 2330: e59f1138 ldr r1, [pc, #312] ; 2470 2334: e1a0e00f mov lr, pc 2338: e12fff1a bx sl 233c: e59f5130 ldr r5, [pc, #304] ; 2474 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 2340: e28db008 add fp, sp, #8 #if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG) if ( !_Objects_Information_table[ api_index ] ) continue; #endif information = _Objects_Information_table[ api_index ][ 1 ]; 2344: e5b53004 ldr r3, [r5, #4]! 2348: e5936004 ldr r6, [r3, #4] if ( information ) { 234c: e3560000 cmp r6, #0 2350: 13a07001 movne r7, #1 * since the last context switch. */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) { Timestamp_Control used; _Timestamp_Subtract( 2354: 128d9018 addne r9, sp, #24 if ( !_Objects_Information_table[ api_index ] ) continue; #endif information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { 2358: 1a000032 bne 2428 235c: ea000034 b 2434 <== NOT EXECUTED for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 2360: e596301c ldr r3, [r6, #28] 2364: e7934107 ldr r4, [r3, r7, lsl #2] if ( !the_thread ) 2368: e3540000 cmp r4, #0 236c: 0a00002c beq 2424 continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 2370: e3a0100d mov r1, #13 2374: e1a0200b mov r2, fp 2378: e5940008 ldr r0, [r4, #8] 237c: eb000fc5 bl 6298 (*print)( 2380: e5942008 ldr r2, [r4, #8] 2384: e1a0300b mov r3, fp 2388: e1a00008 mov r0, r8 238c: e59f10e4 ldr r1, [pc, #228] ; 2478 2390: e1a0e00f mov lr, pc 2394: e12fff1a bx sl #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; 2398: e2843084 add r3, r4, #132 ; 0x84 239c: e893000c ldm r3, {r2, r3} 23a0: e58d2020 str r2, [sp, #32] 23a4: e58d3024 str r3, [sp, #36] ; 0x24 if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 23a8: e59f20cc ldr r2, [pc, #204] ; 247c 23ac: e5923004 ldr r3, [r2, #4] 23b0: e5932008 ldr r2, [r3, #8] 23b4: e5943008 ldr r3, [r4, #8] 23b8: e1520003 cmp r2, r3 23bc: 1a000006 bne 23dc Timestamp_Control used; _Timestamp_Subtract( 23c0: e59f00b8 ldr r0, [pc, #184] ; 2480 23c4: e28d1030 add r1, sp, #48 ; 0x30 23c8: e1a02009 mov r2, r9 23cc: eb001d12 bl 981c <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); 23d0: e28d0020 add r0, sp, #32 23d4: e1a01009 mov r1, r9 23d8: eb001cd4 bl 9730 <_Timespec_Add_to> }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 23dc: e28d203c add r2, sp, #60 ; 0x3c 23e0: e28d3038 add r3, sp, #56 ; 0x38 23e4: e28d0020 add r0, sp, #32 23e8: e28d1028 add r1, sp, #40 ; 0x28 23ec: eb001ce7 bl 9790 <_Timespec_Divide> /* * Print the information */ (*print)( context, 23f0: e3a01ffa mov r1, #1000 ; 0x3e8 23f4: e59d0024 ldr r0, [sp, #36] ; 0x24 23f8: eb0054ee bl 177b8 <__aeabi_uidiv> 23fc: e59d203c ldr r2, [sp, #60] ; 0x3c 2400: e58d2000 str r2, [sp] 2404: e59d2038 ldr r2, [sp, #56] ; 0x38 2408: e1a03000 mov r3, r0 240c: e58d2004 str r2, [sp, #4] 2410: e1a00008 mov r0, r8 2414: e59f1068 ldr r1, [pc, #104] ; 2484 2418: e59d2020 ldr r2, [sp, #32] 241c: e1a0e00f mov lr, pc 2420: e12fff1a bx sl continue; #endif information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 2424: e2877001 add r7, r7, #1 2428: e1d631b0 ldrh r3, [r6, #16] 242c: e1570003 cmp r7, r3 2430: 9affffca bls 2360 " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 2434: e59f304c ldr r3, [pc, #76] ; 2488 2438: e1550003 cmp r5, r3 243c: 1affffc0 bne 2344 } } } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( 2440: e3a01ffa mov r1, #1000 ; 0x3e8 2444: e59d002c ldr r0, [sp, #44] ; 0x2c 2448: eb0054da bl 177b8 <__aeabi_uidiv> 244c: e59f1038 ldr r1, [pc, #56] ; 248c 2450: e1a03000 mov r3, r0 2454: e59d2028 ldr r2, [sp, #40] ; 0x28 2458: e1a00008 mov r0, r8 245c: e1a0e00f mov lr, pc 2460: e12fff1a bx sl "-------------------------------------------------------------------------------\n", _Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset, total_units ); #endif } 2464: e28dd040 add sp, sp, #64 ; 0x40 2468: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 00001a0c : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 1a0c: e92d40f0 push {r4, r5, r6, r7, lr} /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 1a10: e59f60e0 ldr r6, [pc, #224] ; 1af8 1a14: e5963000 ldr r3, [r6] 1a18: e3a02012 mov r2, #18 1a1c: e583202c str r2, [r3, #44] ; 0x2c /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 1a20: e59f30d4 ldr r3, [pc, #212] ; 1afc 1a24: e5933000 ldr r3, [r3] 1a28: e3530000 cmp r3, #0 * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 1a2c: e24dd018 sub sp, sp, #24 /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) rtems_fatal_error_occurred( 0xABCD0001 ); 1a30: 059f00c8 ldreq r0, [pc, #200] ; 1b00 rtems_filesystem_umask = 022; /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 1a34: 0a00000a beq 1a64 rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 1a38: e59f30c4 ldr r3, [pc, #196] ; 1b04 status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL ); 1a3c: 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]; 1a40: e5933000 ldr r3, [r3] status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL ); 1a44: e58d5000 str r5, [sp] 1a48: e2830008 add r0, r3, #8 1a4c: e8900003 ldm r0, {r0, r1} 1a50: e893000c ldm r3, {r2, r3} 1a54: eb0001f1 bl 2220 if ( status == -1 ) 1a58: e3700001 cmn r0, #1 1a5c: 1a000001 bne 1a68 rtems_fatal_error_occurred( 0xABCD0002 ); 1a60: e59f00a0 ldr r0, [pc, #160] ; 1b08 <== NOT EXECUTED 1a64: eb000ea0 bl 54ec <== NOT EXECUTED rtems_filesystem_link_counts = 0; 1a68: e5963000 ldr r3, [r6] * gonna hit performance. * * Till Straumann, 10/25/2002 */ /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 1a6c: e28d4004 add r4, sp, #4 status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 1a70: 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); 1a74: e3a01001 mov r1, #1 1a78: e1a03004 mov r3, r4 1a7c: e1a02005 mov r2, r5 1a80: e59f0084 ldr r0, [pc, #132] ; 1b0c rtems_filesystem_root = loc; 1a84: e1a07004 mov r7, r4 * gonna hit performance. * * Till Straumann, 10/25/2002 */ /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 1a88: e58d5000 str r5, [sp] 1a8c: eb000051 bl 1bd8 rtems_filesystem_root = loc; 1a90: e596c000 ldr ip, [r6] 1a94: e8b7000f ldm r7!, {r0, r1, r2, r3} 1a98: e28cc018 add ip, ip, #24 1a9c: e8ac000f stmia ip!, {r0, r1, r2, r3} 1aa0: e5973000 ldr r3, [r7] /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 1aa4: 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; 1aa8: e58c3000 str r3, [ip] /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 1aac: e1a02005 mov r2, r5 1ab0: e1a03004 mov r3, r4 1ab4: e59f0050 ldr r0, [pc, #80] ; 1b0c 1ab8: e58d5000 str r5, [sp] 1abc: eb000045 bl 1bd8 rtems_filesystem_current = loc; 1ac0: e596c000 ldr ip, [r6] 1ac4: e8b4000f ldm r4!, {r0, r1, r2, r3} 1ac8: e28cc004 add ip, ip, #4 1acc: e8ac000f stmia ip!, {r0, r1, r2, r3} 1ad0: e5973000 ldr r3, [r7] * * NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually * created that way by the IMFS. */ status = mkdir( "/dev", 0777); 1ad4: e59f0034 ldr r0, [pc, #52] ; 1b10 /* 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; 1ad8: e58c3000 str r3, [ip] * * NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually * created that way by the IMFS. */ status = mkdir( "/dev", 0777); 1adc: e59f1030 ldr r1, [pc, #48] ; 1b14 1ae0: eb00017c bl 20d8 if ( status != 0 ) 1ae4: e3500000 cmp r0, #0 rtems_fatal_error_occurred( 0xABCD0003 ); 1ae8: 159f0028 ldrne r0, [pc, #40] ; 1b18 * NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually * created that way by the IMFS. */ status = mkdir( "/dev", 0777); if ( status != 0 ) 1aec: 1affffdc bne 1a64 * 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. */ } 1af0: e28dd018 add sp, sp, #24 1af4: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== 0000278c : int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *)) { 278c: e92d4070 push {r4, r5, r6, lr} 2790: 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 ) ); 2794: e3a00008 mov r0, #8 } return 0; } int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *)) { 2798: 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 ) ); 279c: eb0000fa bl 2b8c 27a0: e1a04000 mov r4, r0 *key = new_key; 27a4: 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 ); 27a8: e1a01004 mov r1, r4 * 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; 27ac: e3a00000 mov r0, #0 "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 ); 27b0: 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; 27b4: e8840021 stm r4, {r0, 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 ); 27b8: eb000e07 bl 5fdc if ( status == RTEMS_SUCCESSFUL ) 27bc: e3500000 cmp r0, #0 27c0: 08bd8070 popeq {r4, r5, r6, pc} return 0; free( new_key ); 27c4: e1a00004 mov r0, r4 <== NOT EXECUTED 27c8: ebffff95 bl 2624 <== NOT EXECUTED return -1; 27cc: e3e00000 mvn r0, #0 <== NOT EXECUTED } 27d0: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== 000095c8 : uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 95c8: e2003006 and r3, r0, #6 95cc: e3530006 cmp r3, #6 fcntl_flags |= O_RDWR; 95d0: 03a03002 moveq r3, #2 uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 95d4: 0a000005 beq 95f0 fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 95d8: e3100002 tst r0, #2 fcntl_flags |= O_RDONLY; 95dc: 13a03000 movne r3, #0 { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 95e0: 1a000002 bne 95f0 ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { fcntl_flags |= O_RDWR; 95e4: e3100004 tst r0, #4 <== NOT EXECUTED 95e8: 03a03000 moveq r3, #0 <== NOT EXECUTED 95ec: 13a03001 movne r3, #1 <== NOT EXECUTED fcntl_flags |= O_RDONLY; } else if ( (flags & LIBIO_FLAGS_WRITE) == LIBIO_FLAGS_WRITE) { fcntl_flags |= O_WRONLY; } if ( (flags & LIBIO_FLAGS_NO_DELAY) == LIBIO_FLAGS_NO_DELAY ) { 95f0: e3100001 tst r0, #1 fcntl_flags |= O_NONBLOCK; 95f4: 13833901 orrne r3, r3, #16384 ; 0x4000 } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { 95f8: e3100c02 tst r0, #512 ; 0x200 fcntl_flags |= O_APPEND; 95fc: 13833008 orrne r3, r3, #8 } if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { 9600: e3100b01 tst r0, #1024 ; 0x400 fcntl_flags |= O_CREAT; 9604: 13833c02 orrne r3, r3, #512 ; 0x200 } return fcntl_flags; } 9608: e1a00003 mov r0, r3 960c: e12fff1e bx lr =============================================================================== 00001e9c : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 1e9c: e92d4810 push {r4, fp, lr} Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 1ea0: e59f3078 ldr r3, [pc, #120] ; 1f20 1ea4: e5933004 ldr r3, [r3, #4] ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 1ea8: e59300bc ldr r0, [r3, #188] ; 0xbc /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 1eac: e28db008 add fp, sp, #8 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 1eb0: e15b0000 cmp fp, r0 return false; 1eb4: 33a04000 movcc r4, #0 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 1eb8: 3a000004 bcc 1ed0 return false; } if ( sp > (the_stack->area + the_stack->size) ) { 1ebc: e59340b8 ldr r4, [r3, #184] ; 0xb8 1ec0: e0804004 add r4, r0, r4 } /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) 1ec4: e15b0004 cmp fp, r4 1ec8: 83a04000 movhi r4, #0 1ecc: 93a04001 movls r4, #1 /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 1ed0: e59f304c ldr r3, [pc, #76] ; 1f24 1ed4: e5933008 ldr r3, [r3, #8] 1ed8: 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; 1edc: 03a01001 moveq r1, #1 /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 1ee0: 0a000005 beq 1efc pattern_ok = (!memcmp( 1ee4: e59f103c ldr r1, [pc, #60] ; 1f28 1ee8: e2800008 add r0, r0, #8 1eec: e3a02010 mov r2, #16 1ef0: eb003773 bl fcc4 1ef4: e2701001 rsbs r1, r0, #1 1ef8: 33a01000 movcc r1, #0 /* * Let's report as much as we can. */ if ( !sp_ok || !pattern_ok ) { 1efc: e3540000 cmp r4, #0 1f00: 0a000001 beq 1f0c 1f04: e3510000 cmp r1, #0 1f08: 1a000002 bne 1f18 Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 1f0c: e59f300c ldr r3, [pc, #12] ; 1f20 <== NOT EXECUTED 1f10: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED 1f14: ebffff9d bl 1d90 <== NOT EXECUTED /* * The Stack Pointer and the Pattern Area are OK so return false. */ return false; } 1f18: e3a00000 mov r0, #0 1f1c: e8bd8810 pop {r4, fp, pc} =============================================================================== 0000b144 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { b144: e92d40f1 push {r0, r4, r5, r6, r7, lr} STRING_TO_INPUT_TYPE result; char *end; if ( !n ) b148: e2514000 subs r4, r1, #0 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { b14c: e1a05000 mov r5, r0 b150: e1a06002 mov r6, r2 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; b154: 03a00009 moveq r0, #9 ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) b158: 0a000018 beq b1c0 return RTEMS_INVALID_ADDRESS; errno = 0; b15c: eb000ad4 bl dcb4 <__errno> b160: e3a03000 mov r3, #0 b164: 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 ); b168: e1a0100d mov r1, sp if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; b16c: e5843000 str r3, [r4] #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); b170: e1a00005 mov r0, r5 b174: e3a02010 mov r2, #16 b178: eb0017fc bl 11170 #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 ) b17c: e3560000 cmp r6, #0 *endptr = end; b180: 159d3000 ldrne r3, [sp] b184: 15863000 strne r3, [r6] /* nothing was converted */ if ( end == s ) b188: e59d3000 ldr r3, [sp] b18c: e1530005 cmp r3, r5 *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); b190: e1a07000 mov r7, r0 if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; b194: 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 ) b198: 0a000008 beq b1c0 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) b19c: e3770001 cmn r7, #1 b1a0: 1a000004 bne b1b8 b1a4: eb000ac2 bl dcb4 <__errno> <== NOT EXECUTED b1a8: e5903000 ldr r3, [r0] <== NOT EXECUTED b1ac: e3530022 cmp r3, #34 ; 0x22 <== NOT EXECUTED return RTEMS_INVALID_NUMBER; b1b0: 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)) b1b4: 0a000001 beq b1c0 <== NOT EXECUTED if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; b1b8: e5847000 str r7, [r4] #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; b1bc: e3a00000 mov r0, #0 } b1c0: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} =============================================================================== 00001884 : int rtems_tarfs_load( char *mountpoint, uint8_t *tar_image, size_t tar_size ) { 1884: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 1888: e24ddf6b sub sp, sp, #428 ; 0x1ac 188c: e58d1010 str r1, [sp, #16] 1890: e58d2018 str r2, [sp, #24] 1894: e58d000c str r0, [sp, #12] int offset; unsigned long nblocks; IMFS_jnode_t *node; int status; status = rtems_filesystem_evaluate_path( 1898: eb003f4d bl 115d4 189c: e3a02000 mov r2, #0 18a0: e1a01000 mov r1, r0 18a4: e28d3f65 add r3, sp, #404 ; 0x194 18a8: e59d000c ldr r0, [sp, #12] 18ac: e58d2000 str r2, [sp] 18b0: eb00029b bl 2324 strlen(mountpoint), 0, &root_loc, 0 ); if (status != 0) 18b4: e2504000 subs r4, r0, #0 18b8: 1a00006c bne 1a70 return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) 18bc: e59d31a0 ldr r3, [sp, #416] ; 0x1a0 18c0: e59f21c0 ldr r2, [pc, #448] ; 1a88 18c4: e1530002 cmp r3, r2 18c8: 0a000005 beq 18e4 18cc: e59f21b8 ldr r2, [pc, #440] ; 1a8c 18d0: e1530002 cmp r3, r2 18d4: 1a000065 bne 1a70 18d8: ea000001 b 18e4 <== NOT EXECUTED 18dc: e1a08004 mov r8, r4 18e0: ea000006 b 1900 * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; 18e4: e28d2f65 add r2, sp, #404 ; 0x194 18e8: e58d2004 str r2, [sp, #4] 0 ); if (status != 0) return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) 18ec: e1a08004 mov r8, r4 hdr_ptr = (char *) &tar_image[offset]; offset += 512; if (strncmp(&hdr_ptr[257], "ustar", 5)) break; strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); 18f0: e28d7f47 add r7, sp, #284 ; 0x11c * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; 18f4: e28d9d06 add r9, sp, #384 ; 0x180 * - 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); 18f8: e28d501c add r5, sp, #28 18fc: e1a0a004 mov sl, r4 /* * Create an IMFS node structure pointing to tar image memory. */ offset = 0; while (1) { if (offset + 512 > tar_size) 1900: e59d3018 ldr r3, [sp, #24] 1904: e2884c02 add r4, r8, #512 ; 0x200 1908: e1540003 cmp r4, r3 190c: 8a000059 bhi 1a78 break; /* * Read a header. */ hdr_ptr = (char *) &tar_image[offset]; 1910: e59de010 ldr lr, [sp, #16] 1914: e08e8008 add r8, lr, r8 offset += 512; if (strncmp(&hdr_ptr[257], "ustar", 5)) 1918: e2880c01 add r0, r8, #256 ; 0x100 191c: e2800001 add r0, r0, #1 1920: e59f1168 ldr r1, [pc, #360] ; 1a90 1924: e3a02005 mov r2, #5 1928: eb003f41 bl 11634 192c: e2506000 subs r6, r0, #0 1930: 1a000050 bne 1a78 break; strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); 1934: e3a02063 mov r2, #99 ; 0x63 1938: e1a01008 mov r1, r8 193c: e1a00007 mov r0, r7 1940: eb003f97 bl 117a4 filename[MAX_NAME_FIELD_SIZE] = '\0'; 1944: e5cd617f strb r6, [sp, #383] ; 0x17f linkflag = hdr_ptr[156]; file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8); 1948: e3a01008 mov r1, #8 194c: 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]; 1950: e5d8609c ldrb r6, [r8, #156] ; 0x9c file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8); 1954: eb001d7c bl 8f4c <_rtems_octal2ulong> file_size = _rtems_octal2ulong(&hdr_ptr[124], 12); 1958: 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); 195c: e58d0014 str r0, [sp, #20] file_size = _rtems_octal2ulong(&hdr_ptr[124], 12); 1960: e288007c add r0, r8, #124 ; 0x7c 1964: eb001d78 bl 8f4c <_rtems_octal2ulong> hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8); 1968: 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); 196c: e1a0b000 mov fp, r0 hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8); 1970: e2880094 add r0, r8, #148 ; 0x94 1974: eb001d74 bl 8f4c <_rtems_octal2ulong> 1978: e1a03000 mov r3, r0 if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum) 197c: e1a00008 mov r0, r8 1980: e58d3008 str r3, [sp, #8] 1984: eb001d7e bl 8f84 <_rtems_tar_header_checksum> 1988: e59d3008 ldr r3, [sp, #8] 198c: e1500003 cmp r0, r3 1990: 1a000038 bne 1a78 * 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) { 1994: e3560035 cmp r6, #53 ; 0x35 1998: 1a000012 bne 19e8 strcpy(full_filename, mountpoint); 199c: e59d100c ldr r1, [sp, #12] 19a0: e1a00005 mov r0, r5 19a4: eb003d46 bl 10ec4 if (full_filename[strlen(full_filename)-1] != '/') 19a8: e1a00005 mov r0, r5 19ac: eb003f08 bl 115d4 19b0: e28d2f6b add r2, sp, #428 ; 0x1ac 19b4: e0820000 add r0, r2, r0 19b8: e5503191 ldrb r3, [r0, #-401] ; 0x191 19bc: e353002f cmp r3, #47 ; 0x2f strcat(full_filename, "/"); 19c0: 11a00005 movne r0, r5 19c4: 159f10c8 ldrne r1, [pc, #200] ; 1a94 19c8: 1b003c86 blne 10be8 strcat(full_filename, filename); 19cc: e1a01007 mov r1, r7 19d0: e1a00005 mov r0, r5 19d4: eb003c83 bl 10be8 mkdir(full_filename, S_IRWXU | S_IRWXG | S_IRWXO); 19d8: e1a00005 mov r0, r5 19dc: e59f10b4 ldr r1, [pc, #180] ; 1a98 19e0: eb000464 bl 2b78 19e4: eaffffbc b 18dc * 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) { 19e8: e3560030 cmp r6, #48 ; 0x30 19ec: 1affffba bne 18dc const char *name; loc = root_loc; 19f0: e59dc004 ldr ip, [sp, #4] 19f4: e8bc000f ldm ip!, {r0, r1, r2, r3} 19f8: e1a0e009 mov lr, r9 19fc: e8ae000f stmia lr!, {r0, r1, r2, r3} 1a00: e59c2000 ldr r2, [ip] if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { 1a04: e1a00007 mov r0, r7 * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; 1a08: e58e2000 str r2, [lr] if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { 1a0c: e1a01009 mov r1, r9 1a10: e28d2f6a add r2, sp, #424 ; 0x1a8 1a14: eb002040 bl 9b1c 1a18: e2506000 subs r6, r0, #0 1a1c: 1a00000d bne 1a58 node = IMFS_create_node( &loc, IMFS_LINEAR_FILE, (char *)name, (file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG, 1a20: e59d2014 ldr r2, [sp, #20] 1a24: e1a03b82 lsl r3, r2, #23 1a28: 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( 1a2c: e59d21a8 ldr r2, [sp, #424] ; 0x1a8 1a30: e3833902 orr r3, r3, #32768 ; 0x8000 1a34: e1a00009 mov r0, r9 1a38: e3a01006 mov r1, #6 1a3c: e58d6000 str r6, [sp] 1a40: eb001ea9 bl 94ec 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]; 1a44: e59d2010 ldr r2, [sp, #16] 1a48: e0823004 add r3, r2, r4 &loc, IMFS_LINEAR_FILE, (char *)name, (file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG, NULL ); node->info.linearfile.size = file_size; 1a4c: e580b050 str fp, [r0, #80] ; 0x50 1a50: e5806054 str r6, [r0, #84] ; 0x54 node->info.linearfile.direct = &tar_image[offset]; 1a54: e5803058 str r3, [r0, #88] ; 0x58 } nblocks = (((file_size) + 511) & ~511) / 512; 1a58: e28bbf7f add fp, fp, #508 ; 0x1fc 1a5c: e28bb003 add fp, fp, #3 offset += 512 * nblocks; 1a60: e3cbbf7f bic fp, fp, #508 ; 0x1fc 1a64: e3cbb003 bic fp, fp, #3 1a68: e08b4004 add r4, fp, r4 1a6c: eaffff9a b 18dc ); if (status != 0) return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) return -1; 1a70: e3e04000 mvn r4, #0 1a74: ea000000 b 1a7c 1a78: e1a0400a mov r4, sl nblocks = (((file_size) + 511) & ~511) / 512; offset += 512 * nblocks; } } return status; } 1a7c: e1a00004 mov r0, r4 1a80: e28ddf6b add sp, sp, #428 ; 0x1ac 1a84: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 0000c60c : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { c60c: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) c610: e252a000 subs sl, r2, #0 rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { c614: e1a04000 mov r4, r0 c618: e1a05001 mov r5, r1 bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; c61c: 03a00009 moveq r0, #9 ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) c620: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc} return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; c624: e59f313c ldr r3, [pc, #316] ; c768 c628: e5937004 ldr r7, [r3, #4] api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; c62c: e5d78074 ldrb r8, [r7, #116] ; 0x74 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; c630: e59760f8 ldr r6, [r7, #248] ; 0xf8 asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) c634: e597307c ldr r3, [r7, #124] ; 0x7c executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; c638: e3580000 cmp r8, #0 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; c63c: e5d69008 ldrb r9, [r6, #8] executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; c640: 03a08c01 moveq r8, #256 ; 0x100 c644: 13a08000 movne r8, #0 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) c648: e3530000 cmp r3, #0 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; c64c: 13888c02 orrne r8, r8, #512 ; 0x200 old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; c650: e3590000 cmp r9, #0 c654: 03a09b01 moveq r9, #1024 ; 0x400 c658: 13a09000 movne r9, #0 old_mode |= _ISR_Get_level(); c65c: ebffefe4 bl 85f4 <_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; c660: e1899000 orr r9, r9, r0 old_mode |= _ISR_Get_level(); c664: e1898008 orr r8, r9, r8 *previous_mode_set = old_mode; /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) c668: e3150c01 tst r5, #256 ; 0x100 old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; c66c: e58a8000 str r8, [sl] /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) c670: 0a000003 beq c684 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; c674: e3140c01 tst r4, #256 ; 0x100 c678: 13a03000 movne r3, #0 c67c: 03a03001 moveq r3, #1 c680: e5c73074 strb r3, [r7, #116] ; 0x74 if ( mask & RTEMS_TIMESLICE_MASK ) { c684: e3150c02 tst r5, #512 ; 0x200 c688: 0a000006 beq c6a8 if ( _Modes_Is_timeslice(mode_set) ) { c68c: e2143c02 ands r3, r4, #512 ; 0x200 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; c690: 13a03001 movne r3, #1 c694: 1587307c strne r3, [r7, #124] ; 0x7c executing->cpu_time_budget = _Thread_Ticks_per_timeslice; c698: 159f30cc ldrne r3, [pc, #204] ; c76c c69c: 15933000 ldrne r3, [r3] } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; c6a0: 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; c6a4: 15873078 strne r3, [r7, #120] ; 0x78 } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) c6a8: e3150080 tst r5, #128 ; 0x80 c6ac: 0a000001 beq c6b8 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); c6b0: e2040080 and r0, r4, #128 ; 0x80 c6b4: ebffefc9 bl 85e0 <_CPU_ISR_Set_level> * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { c6b8: e2150b01 ands r0, r5, #1024 ; 0x400 c6bc: 0a000013 beq c710 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( c6c0: e3140b01 tst r4, #1024 ; 0x400 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 ) { c6c4: e5d62008 ldrb r2, [r6, #8] * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( c6c8: 13a03000 movne r3, #0 c6cc: 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 ) { c6d0: e1520003 cmp r2, r3 /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; c6d4: 03a00000 moveq r0, #0 if ( mask & RTEMS_ASR_MASK ) { is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { c6d8: 0a00000c beq c710 asr->is_enabled = is_asr_enabled; c6dc: e5c63008 strb r3, [r6, #8] static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( c6e0: e10f3000 mrs r3, CPSR c6e4: e3832080 orr r2, r3, #128 ; 0x80 c6e8: e129f002 msr CPSR_fc, r2 { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); _signals = information->signals_pending; c6ec: e2861014 add r1, r6, #20 c6f0: e8910006 ldm r1, {r1, r2} information->signals_pending = information->signals_posted; information->signals_posted = _signals; c6f4: e5862014 str r2, [r6, #20] rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); _signals = information->signals_pending; information->signals_pending = information->signals_posted; c6f8: e5861018 str r1, [r6, #24] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( c6fc: e129f003 msr CPSR_fc, r3 _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { c700: e5960014 ldr r0, [r6, #20] /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; c704: e3500000 cmp r0, #0 c708: 13a00001 movne r0, #1 c70c: 03a00000 moveq r0, #0 needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { c710: e59f3058 ldr r3, [pc, #88] ; c770 c714: e5933000 ldr r3, [r3] c718: e3530003 cmp r3, #3 c71c: 1a00000f bne c760 bool are_signals_pending ) { Thread_Control *executing; executing = _Thread_Executing; c720: e59f2040 ldr r2, [pc, #64] ; c768 if ( are_signals_pending || c724: e3500000 cmp r0, #0 bool are_signals_pending ) { Thread_Control *executing; executing = _Thread_Executing; c728: e5923004 ldr r3, [r2, #4] if ( are_signals_pending || c72c: 1a000005 bne c748 c730: e5922008 ldr r2, [r2, #8] c734: e1530002 cmp r3, r2 c738: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc} (!_Thread_Is_heir( executing ) && executing->is_preemptible) ) { c73c: e5d33074 ldrb r3, [r3, #116] ; 0x74 c740: e3530000 cmp r3, #0 c744: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc} _Thread_Dispatch_necessary = true; c748: e59f3018 ldr r3, [pc, #24] ; c768 c74c: e3a02001 mov r2, #1 c750: e5c32010 strb r2, [r3, #16] if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); c754: ebffea23 bl 6fe8 <_Thread_Dispatch> } return RTEMS_SUCCESSFUL; c758: e3a00000 mov r0, #0 c75c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} c760: e3a00000 mov r0, #0 <== NOT EXECUTED } c764: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED =============================================================================== 00002fc0 : rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 2fc0: e5903000 ldr r3, [r0] } } rtems_status_code rtems_termios_close (void *arg) { 2fc4: e92d4030 push {r4, r5, lr} rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 2fc8: e5934034 ldr r4, [r3, #52] ; 0x34 rtems_status_code sc; sc = rtems_semaphore_obtain( 2fcc: e59f317c ldr r3, [pc, #380] ; 3150 2fd0: e3a01000 mov r1, #0 } } rtems_status_code rtems_termios_close (void *arg) { 2fd4: e1a05000 mov r5, r0 rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; rtems_status_code sc; sc = rtems_semaphore_obtain( 2fd8: e1a02001 mov r2, r1 2fdc: e5930000 ldr r0, [r3] 2fe0: eb0007a5 bl 4e7c rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 2fe4: e3500000 cmp r0, #0 2fe8: 1a000024 bne 3080 rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 2fec: e5943008 ldr r3, [r4, #8] 2ff0: e2433001 sub r3, r3, #1 2ff4: e3530000 cmp r3, #0 2ff8: e5843008 str r3, [r4, #8] 2ffc: 1a00004e bne 313c if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 3000: e59420cc ldr r2, [r4, #204] ; 0xcc 3004: e59f3148 ldr r3, [pc, #328] ; 3154 3008: e0833282 add r3, r3, r2, lsl #5 300c: e5931004 ldr r1, [r3, #4] 3010: e3510000 cmp r1, #0 3014: 0a000003 beq 3028 /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 3018: e1a00004 mov r0, r4 301c: e1a0e00f mov lr, pc 3020: e12fff11 bx r1 3024: ea000008 b 304c } else { /* * default: just flush output buffer */ sc = rtems_semaphore_obtain(tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 3028: e5940018 ldr r0, [r4, #24] 302c: e1a02001 mov r2, r1 3030: eb000791 bl 4e7c if (sc != RTEMS_SUCCESSFUL) { 3034: e3500000 cmp r0, #0 3038: 1a000010 bne 3080 rtems_fatal_error_occurred (sc); } drainOutput (tty); 303c: e1a00004 mov r0, r4 3040: ebfffeb2 bl 2b10 rtems_semaphore_release (tty->osem); 3044: e5940018 ldr r0, [r4, #24] 3048: eb0007d1 bl 4f94 } if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 304c: e59430b4 ldr r3, [r4, #180] ; 0xb4 3050: e3530002 cmp r3, #2 3054: 1a00000a bne 3084 /* * send "terminate" to I/O tasks */ sc = rtems_event_send( tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT ); 3058: e59400c4 ldr r0, [r4, #196] ; 0xc4 305c: e3a01001 mov r1, #1 3060: eb000673 bl 4a34 if (sc != RTEMS_SUCCESSFUL) 3064: e3500000 cmp r0, #0 3068: 1a000004 bne 3080 rtems_fatal_error_occurred (sc); sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT ); 306c: e59400c8 ldr r0, [r4, #200] ; 0xc8 3070: e3a01001 mov r1, #1 3074: eb00066e bl 4a34 if (sc != RTEMS_SUCCESSFUL) 3078: e3500000 cmp r0, #0 307c: 0a000000 beq 3084 rtems_fatal_error_occurred (sc); 3080: eb000919 bl 54ec <== NOT EXECUTED } if (tty->device.lastClose) 3084: e594309c ldr r3, [r4, #156] ; 0x9c 3088: e3530000 cmp r3, #0 (*tty->device.lastClose)(tty->major, tty->minor, arg); 308c: 1284000c addne r0, r4, #12 3090: 18900003 ldmne r0, {r0, r1} 3094: 11a02005 movne r2, r5 3098: 11a0e00f movne lr, pc 309c: 112fff13 bxne r3 if (tty->forw == NULL) { 30a0: e894000c ldm r4, {r2, r3} 30a4: e3520000 cmp r2, #0 rtems_termios_ttyTail = tty->back; if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; } } else { tty->forw->back = tty->back; 30a8: 15823004 strne r3, [r2, #4] if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if (tty->device.lastClose) (*tty->device.lastClose)(tty->major, tty->minor, arg); if (tty->forw == NULL) { 30ac: 1a000003 bne 30c0 rtems_termios_ttyTail = tty->back; 30b0: e59f10a0 ldr r1, [pc, #160] ; 3158 if ( rtems_termios_ttyTail != NULL ) { 30b4: e3530000 cmp r3, #0 rtems_fatal_error_occurred (sc); } if (tty->device.lastClose) (*tty->device.lastClose)(tty->major, tty->minor, arg); if (tty->forw == NULL) { rtems_termios_ttyTail = tty->back; 30b8: e5813000 str r3, [r1] if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; 30bc: 15832000 strne r2, [r3] } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 30c0: e5942004 ldr r2, [r4, #4] 30c4: e5943000 ldr r3, [r4] 30c8: e3520000 cmp r2, #0 rtems_termios_ttyHead = tty->forw; if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; } } else { tty->back->forw = tty->forw; 30cc: 15823000 strne r3, [r2] } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 30d0: 1a000003 bne 30e4 rtems_termios_ttyHead = tty->forw; 30d4: e59f1080 ldr r1, [pc, #128] ; 315c if ( rtems_termios_ttyHead != NULL ) { 30d8: e3530000 cmp r3, #0 } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; 30dc: e5813000 str r3, [r1] if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; 30e0: 15832004 strne r2, [r3, #4] } } else { tty->back->forw = tty->forw; } rtems_semaphore_delete (tty->isem); 30e4: e5940014 ldr r0, [r4, #20] 30e8: eb00073c bl 4de0 rtems_semaphore_delete (tty->osem); 30ec: e5940018 ldr r0, [r4, #24] 30f0: eb00073a bl 4de0 rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 30f4: e594008c ldr r0, [r4, #140] ; 0x8c 30f8: eb000738 bl 4de0 if ((tty->device.pollRead == NULL) || 30fc: e59430a0 ldr r3, [r4, #160] ; 0xa0 3100: e3530000 cmp r3, #0 3104: 0a000002 beq 3114 3108: e59430b4 ldr r3, [r4, #180] ; 0xb4 310c: e3530002 cmp r3, #2 3110: 1a000001 bne 311c (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore); 3114: e5940068 ldr r0, [r4, #104] ; 0x68 3118: eb000730 bl 4de0 free (tty->rawInBuf.theBuf); 311c: e5940058 ldr r0, [r4, #88] ; 0x58 3120: ebfffae1 bl 1cac free (tty->rawOutBuf.theBuf); 3124: e594007c ldr r0, [r4, #124] ; 0x7c 3128: ebfffadf bl 1cac free (tty->cbuf); 312c: e594001c ldr r0, [r4, #28] 3130: ebfffadd bl 1cac free (tty); 3134: e1a00004 mov r0, r4 3138: ebfffadb bl 1cac } rtems_semaphore_release (rtems_termios_ttyMutex); 313c: e59f300c ldr r3, [pc, #12] ; 3150 3140: e5930000 ldr r0, [r3] 3144: eb000792 bl 4f94 return RTEMS_SUCCESSFUL; } 3148: e3a00000 mov r0, #0 314c: e8bd8030 pop {r4, r5, pc} =============================================================================== 000044dc : rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 44dc: e5902090 ldr r2, [r0, #144] ; 0x90 44e0: e0822001 add r2, r2, r1 if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 44e4: e59010b4 ldr r1, [r0, #180] ; 0xb4 44e8: e3510002 cmp r1, #2 * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 44ec: e52de004 push {lr} ; (str lr, [sp, #-4]!) rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 44f0: e5802090 str r2, [r0, #144] ; 0x90 if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 44f4: 1a000004 bne 450c /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, TERMIOS_TX_START_EVENT); 44f8: e59000c8 ldr r0, [r0, #200] ; 0xc8 44fc: eb00014c bl 4a34 if (sc != RTEMS_SUCCESSFUL) 4500: e2503000 subs r3, r0, #0 4504: 0a00000d beq 4540 rtems_fatal_error_occurred (sc); 4508: eb0003f7 bl 54ec <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } if (tty->t_line == PPPDISC ) { 450c: e59030cc ldr r3, [r0, #204] ; 0xcc 4510: e3530005 cmp r3, #5 4514: 1a000007 bne 4538 /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 4518: e59f3028 ldr r3, [pc, #40] ; 4548 451c: e59330b4 ldr r3, [r3, #180] ; 0xb4 4520: e3530000 cmp r3, #0 4524: 0a000005 beq 4540 rtems_termios_linesw[tty->t_line].l_start(tty); 4528: e1a0e00f mov lr, pc 452c: e12fff13 bx r3 } return 0; /* nothing to output in IRQ... */ 4530: e3a03000 mov r3, #0 4534: ea000001 b 4540 } return rtems_termios_refill_transmitter(tty); } 4538: 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); 453c: eaffff5a b 42ac } 4540: e1a00003 mov r0, r3 4544: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== 00003fa8 : * 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) { 3fa8: e92d4ff3 push {r0, r1, 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) { 3fac: e59030cc ldr r3, [r0, #204] ; 0xcc 3fb0: e59f7288 ldr r7, [pc, #648] ; 4240 3fb4: e0873283 add r3, r7, r3, lsl #5 3fb8: e5939010 ldr r9, [r3, #16] 3fbc: e3590000 cmp r9, #0 * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len) { 3fc0: e1a04000 mov r4, r0 3fc4: e1a06001 mov r6, r1 char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { 3fc8: 11a05002 movne r5, r2 3fcc: 1a00000d bne 4008 /* * 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); 3fd0: e2803030 add r3, r0, #48 ; 0x30 3fd4: e58d3000 str r3, [sp] 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, 3fd8: e280304a add r3, r0, #74 ; 0x4a 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) { 3fdc: e1a08002 mov r8, r2 3fe0: e1a05009 mov r5, r9 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, 3fe4: e58d3004 str r3, [sp, #4] 3fe8: ea00008b b 421c rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 3fec: e59430cc ldr r3, [r4, #204] ; 0xcc 3ff0: e4d60001 ldrb r0, [r6], #1 3ff4: e0873283 add r3, r7, r3, lsl #5 3ff8: e1a01004 mov r1, r4 3ffc: e1a0e00f mov lr, pc 4000: e593f010 ldr pc, [r3, #16] 4004: e2455001 sub r5, r5, #1 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--) { 4008: e3550000 cmp r5, #0 400c: 1afffff6 bne 3fec } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 4010: e59430e4 ldr r3, [r4, #228] ; 0xe4 4014: e3530000 cmp r3, #0 4018: 1a000086 bne 4238 401c: e59430dc ldr r3, [r4, #220] ; 0xdc 4020: e3530000 cmp r3, #0 4024: 0a000083 beq 4238 (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 4028: e2840030 add r0, r4, #48 ; 0x30 402c: e59410e0 ldr r1, [r4, #224] ; 0xe0 4030: e1a0e00f mov lr, pc 4034: e12fff13 bx r3 tty->tty_rcvwakeup = 1; 4038: e3a03001 mov r3, #1 403c: e58430e4 str r3, [r4, #228] ; 0xe4 4040: ea00007c b 4238 while (len--) { c = *buf++; /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 4044: e59430b8 ldr r3, [r4, #184] ; 0xb8 4048: e3130c02 tst r3, #512 ; 0x200 } return 0; } while (len--) { c = *buf++; 404c: e4d6a001 ldrb sl, [r6], #1 /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 4050: 0a00000f beq 4094 /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 4054: e5d4204a ldrb r2, [r4, #74] ; 0x4a 4058: e152000a cmp r2, sl 405c: e5d43049 ldrb r3, [r4, #73] ; 0x49 4060: 1a000007 bne 4084 if (c == tty->termios.c_cc[VSTART]) { 4064: e1530002 cmp r3, r2 /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 4068: 059430b8 ldreq r3, [r4, #184] ; 0xb8 } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 406c: 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; 4070: 02233010 eoreq r3, r3, #16 } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 4074: 13833010 orrne r3, r3, #16 4078: e58430b8 str r3, [r4, #184] ; 0xb8 * 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) { 407c: e3a09001 mov r9, #1 4080: ea000005 b 409c /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 4084: e153000a cmp r3, sl /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 4088: 059430b8 ldreq r3, [r4, #184] ; 0xb8 408c: 03c33010 biceq r3, r3, #16 /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 4090: 0afffff8 beq 4078 /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; flow_rcv = true; } } if (flow_rcv) { 4094: e3590000 cmp r9, #0 4098: 0a000014 beq 40f0 /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 409c: e59430b8 ldr r3, [r4, #184] ; 0xb8 40a0: e2033030 and r3, r3, #48 ; 0x30 40a4: e3530020 cmp r3, #32 40a8: 1a00005a bne 4218 /* disable interrupts */ rtems_interrupt_disable(level); 40ac: ebfffa93 bl 2b00 <== NOT EXECUTED 40b0: e1a07000 mov r7, r0 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 40b4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 40b8: e3c33020 bic r3, r3, #32 <== NOT EXECUTED 40bc: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 40c0: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 40c4: e3530000 cmp r3, #0 <== NOT EXECUTED 40c8: 0a000006 beq 40e8 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)( tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); 40cc: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)( 40d0: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED 40d4: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 40d8: e0811003 add r1, r1, r3 <== NOT EXECUTED 40dc: e3a02001 mov r2, #1 <== NOT EXECUTED 40e0: e1a0e00f mov lr, pc <== NOT EXECUTED 40e4: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 40e8: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED 40ec: ea000049 b 4218 <== NOT EXECUTED } /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 40f0: e5940060 ldr r0, [r4, #96] ; 0x60 40f4: e5941064 ldr r1, [r4, #100] ; 0x64 40f8: e2800001 add r0, r0, #1 40fc: eb0030b0 bl 103c4 <__umodsi3> 4100: e1a07000 mov r7, r0 /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 4104: ebfffa7d bl 2b00 4108: e1a0b000 mov fp, r0 if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 410c: e594305c ldr r3, [r4, #92] ; 0x5c 4110: e5940064 ldr r0, [r4, #100] ; 0x64 4114: e0630000 rsb r0, r3, r0 % tty->rawInBuf.Size) > tty->highwater) && 4118: e5941064 ldr r1, [r4, #100] ; 0x64 411c: e0800007 add r0, r0, r7 4120: eb0030a7 bl 103c4 <__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) 4124: e59430c0 ldr r3, [r4, #192] ; 0xc0 4128: e1500003 cmp r0, r3 412c: 9a000025 bls 41c8 % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { 4130: 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) && 4134: e3130001 tst r3, #1 <== NOT EXECUTED 4138: 1a000022 bne 41c8 <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; 413c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 4140: e3833001 orr r3, r3, #1 <== NOT EXECUTED 4144: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 4148: e59f30f4 ldr r3, [pc, #244] ; 4244 <== NOT EXECUTED 414c: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED 4150: e0023003 and r3, r2, r3 <== NOT EXECUTED 4154: e3530b01 cmp r3, #1024 ; 0x400 <== NOT EXECUTED 4158: 1a00000e bne 4198 <== NOT EXECUTED == (FL_MDXOF ) ) { if ((tty->flow_ctrl & FL_OSTOP) || 415c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 4160: e3130020 tst r3, #32 <== NOT EXECUTED 4164: 1a000002 bne 4174 <== NOT EXECUTED 4168: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 416c: e3530000 cmp r3, #0 <== NOT EXECUTED 4170: 1a000014 bne 41c8 <== 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; 4174: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 4178: e3833002 orr r3, r3, #2 <== NOT EXECUTED 417c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED (*tty->device.write)(tty->minor, 4180: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 4184: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED 4188: e3a02001 mov r2, #1 <== NOT EXECUTED 418c: e1a0e00f mov lr, pc <== NOT EXECUTED 4190: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 4194: ea00000b b 41c8 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) { 4198: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 419c: e2033f41 and r3, r3, #260 ; 0x104 <== NOT EXECUTED 41a0: e3530c01 cmp r3, #256 ; 0x100 <== NOT EXECUTED 41a4: 1a000007 bne 41c8 <== NOT EXECUTED tty->flow_ctrl |= FL_IRTSOFF; 41a8: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 41ac: e3833004 orr r3, r3, #4 <== NOT EXECUTED 41b0: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 41b4: e59430ac ldr r3, [r4, #172] ; 0xac <== NOT EXECUTED 41b8: e3530000 cmp r3, #0 <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 41bc: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED 41c0: 11a0e00f movne lr, pc <== NOT EXECUTED 41c4: 112fff13 bxne r3 <== NOT EXECUTED 41c8: e129f00b msr CPSR_fc, fp } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { 41cc: e594305c ldr r3, [r4, #92] ; 0x5c 41d0: e1570003 cmp r7, r3 dropped++; 41d4: 02855001 addeq r5, r5, #1 } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { 41d8: 0a00000e beq 4218 dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; 41dc: e5943058 ldr r3, [r4, #88] ; 0x58 41e0: e7c3a007 strb sl, [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 )) { 41e4: e59430e4 ldr r3, [r4, #228] ; 0xe4 41e8: e3530000 cmp r3, #0 if (newTail == tty->rawInBuf.Head) { dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; tty->rawInBuf.Tail = newTail; 41ec: 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 )) { 41f0: 1a000008 bne 4218 41f4: e59430dc ldr r3, [r4, #220] ; 0xdc 41f8: e3530000 cmp r3, #0 41fc: 0a000005 beq 4218 (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 4200: e59d0000 ldr r0, [sp] <== NOT EXECUTED 4204: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED 4208: e1a0e00f mov lr, pc <== NOT EXECUTED 420c: e12fff13 bx r3 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 4210: e3a03001 mov r3, #1 <== NOT EXECUTED 4214: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED 4218: e2488001 sub r8, r8, #1 tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 421c: e3580000 cmp r8, #0 4220: 1affff87 bne 4044 } } } } tty->rawInBufDropped += dropped; 4224: e5943078 ldr r3, [r4, #120] ; 0x78 4228: e0833005 add r3, r3, r5 422c: e5843078 str r3, [r4, #120] ; 0x78 rtems_semaphore_release (tty->rawInBuf.Semaphore); 4230: e5940068 ldr r0, [r4, #104] ; 0x68 4234: eb000356 bl 4f94 return dropped; } 4238: e1a00005 mov r0, r5 423c: e8bd8ffc pop {r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 00003178 : rtems_status_code rtems_termios_ioctl (void *arg) { rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 3178: e5903000 ldr r3, [r0] } } rtems_status_code rtems_termios_ioctl (void *arg) { 317c: e92d41f0 push {r4, r5, r6, r7, r8, lr} rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 3180: e5934034 ldr r4, [r3, #52] ; 0x34 struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; 3184: e3a01000 mov r1, #0 rtems_status_code rtems_termios_ioctl (void *arg) { rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; 3188: e5907008 ldr r7, [r0, #8] rtems_status_code sc; args->ioctl_return = 0; 318c: e580100c str r1, [r0, #12] } } rtems_status_code rtems_termios_ioctl (void *arg) { 3190: e1a05000 mov r5, r0 struct rtems_termios_tty *tty = args->iop->data1; struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 3194: e1a02001 mov r2, r1 3198: e5940018 ldr r0, [r4, #24] 319c: eb000736 bl 4e7c if (sc != RTEMS_SUCCESSFUL) { 31a0: e2506000 subs r6, r0, #0 31a4: 1a0000d4 bne 34fc args->ioctl_return = sc; return sc; } switch (args->command) { 31a8: e5953004 ldr r3, [r5, #4] 31ac: e3530004 cmp r3, #4 31b0: 0a0000a8 beq 3458 31b4: 8a000005 bhi 31d0 31b8: e3530002 cmp r3, #2 31bc: 0a000029 beq 3268 31c0: 8a00009d bhi 343c 31c4: e3530001 cmp r3, #1 31c8: 1a000010 bne 3210 31cc: ea00001b b 3240 31d0: e59f2330 ldr r2, [pc, #816] ; 3508 31d4: e1530002 cmp r3, r2 31d8: 0a0000ba beq 34c8 31dc: 8a000002 bhi 31ec 31e0: e3530005 cmp r3, #5 31e4: 1a000009 bne 3210 31e8: ea000096 b 3448 31ec: e59f2318 ldr r2, [pc, #792] ; 350c 31f0: e1530002 cmp r3, r2 if (rtems_termios_linesw[tty->t_line].l_open != NULL) { sc = rtems_termios_linesw[tty->t_line].l_open(tty); } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; 31f4: 05953008 ldreq r3, [r5, #8] 31f8: 059420cc ldreq r2, [r4, #204] ; 0xcc 31fc: 05832000 streq r2, [r3] sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { 3200: 0a0000bb beq 34f4 3204: e2822105 add r2, r2, #1073741825 ; 0x40000001 3208: e1530002 cmp r3, r2 320c: 0a000095 beq 3468 default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 3210: e59420cc ldr r2, [r4, #204] ; 0xcc 3214: e59f32f4 ldr r3, [pc, #756] ; 3510 3218: e0833282 add r3, r3, r2, lsl #5 321c: e5933018 ldr r3, [r3, #24] 3220: e3530000 cmp r3, #0 sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); } else { sc = RTEMS_INVALID_NUMBER; 3224: 03a0600a moveq r6, #10 args->ioctl_return = sc; return sc; } switch (args->command) { default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 3228: 0a0000b1 beq 34f4 sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 322c: e1a00004 mov r0, r4 3230: e1a01005 mov r1, r5 3234: e1a0e00f mov lr, pc 3238: e12fff13 bx r3 323c: ea00009f b 34c0 sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 3240: e5957008 ldr r7, [r5, #8] 3244: e284c030 add ip, r4, #48 ; 0x30 3248: e8bc000f ldm ip!, {r0, r1, r2, r3} 324c: e1a0e007 mov lr, r7 3250: e8ae000f stmia lr!, {r0, r1, r2, r3} 3254: e8bc000f ldm ip!, {r0, r1, r2, r3} 3258: e8ae000f stmia lr!, {r0, r1, r2, r3} 325c: e59c3000 ldr r3, [ip] 3260: e58e3000 str r3, [lr] break; 3264: ea0000a2 b 34f4 case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 3268: e595e008 ldr lr, [r5, #8] 326c: e8be000f ldm lr!, {r0, r1, r2, r3} 3270: e284c030 add ip, r4, #48 ; 0x30 3274: e8ac000f stmia ip!, {r0, r1, r2, r3} 3278: e8be000f ldm lr!, {r0, r1, r2, r3} 327c: e8ac000f stmia ip!, {r0, r1, r2, r3} 3280: e59e3000 ldr r3, [lr] 3284: 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) && 3288: e59430b8 ldr r3, [r4, #184] ; 0xb8 328c: e3130c02 tst r3, #512 ; 0x200 3290: 0a000018 beq 32f8 !(tty->termios.c_iflag & IXON)) { 3294: e5943030 ldr r3, [r4, #48] ; 0x30 /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 3298: e3130b01 tst r3, #1024 ; 0x400 329c: 1a000015 bne 32f8 !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 32a0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 32a4: e3c33e21 bic r3, r3, #528 ; 0x210 <== NOT EXECUTED 32a8: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 32ac: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 32b0: e3130020 tst r3, #32 <== NOT EXECUTED 32b4: 0a00000f beq 32f8 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 32b8: ebfffe10 bl 2b00 <== NOT EXECUTED 32bc: e1a07000 mov r7, r0 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 32c0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 32c4: e3c33020 bic r3, r3, #32 <== NOT EXECUTED 32c8: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 32cc: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 32d0: e3530000 cmp r3, #0 <== NOT EXECUTED 32d4: 0a000006 beq 32f4 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)( tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 32d8: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)( 32dc: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED 32e0: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 32e4: e0811003 add r1, r1, r3 <== NOT EXECUTED 32e8: e3a02001 mov r2, #1 <== NOT EXECUTED 32ec: e1a0e00f mov lr, pc <== NOT EXECUTED 32f0: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 32f4: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && !(tty->termios.c_iflag & IXOFF)) { 32f8: e59430b8 ldr r3, [r4, #184] ; 0xb8 32fc: e3130b01 tst r3, #1024 ; 0x400 3300: 0a000008 beq 3328 3304: e5943030 ldr r3, [r4, #48] ; 0x30 3308: e3130a01 tst r3, #4096 ; 0x1000 330c: 1a000005 bne 3328 /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 3310: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3314: e3c33b01 bic r3, r3, #1024 ; 0x400 <== NOT EXECUTED 3318: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); 331c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3320: e3c33002 bic r3, r3, #2 <== NOT EXECUTED 3324: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && !(tty->termios.c_cflag & CRTSCTS)) { 3328: e59430b8 ldr r3, [r4, #184] ; 0xb8 332c: e3130c01 tst r3, #256 ; 0x100 3330: 0a000010 beq 3378 3334: e5943038 ldr r3, [r4, #56] ; 0x38 <== NOT EXECUTED 3338: e3530000 cmp r3, #0 <== NOT EXECUTED 333c: ba00000d blt 3378 <== NOT EXECUTED /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 3340: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3344: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED 3348: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && (tty->device.startRemoteTx != NULL)) { 334c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3350: e3130004 tst r3, #4 <== NOT EXECUTED 3354: 0a000004 beq 336c <== NOT EXECUTED 3358: e59430b0 ldr r3, [r4, #176] ; 0xb0 <== NOT EXECUTED 335c: e3530000 cmp r3, #0 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 3360: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED 3364: 11a0e00f movne lr, pc <== NOT EXECUTED 3368: 112fff13 bxne r3 <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 336c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3370: e3c33004 bic r3, r3, #4 <== NOT EXECUTED 3374: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* * check for flow control options to be switched on */ /* check for incoming RTS/CTS flow control switched on */ if (tty->termios.c_cflag & CRTSCTS) { 3378: e5943038 ldr r3, [r4, #56] ; 0x38 337c: e3530000 cmp r3, #0 tty->flow_ctrl |= FL_MDRTS; 3380: b59430b8 ldrlt r3, [r4, #184] ; 0xb8 3384: b3833c01 orrlt r3, r3, #256 ; 0x100 3388: b58430b8 strlt r3, [r4, #184] ; 0xb8 } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 338c: e5943030 ldr r3, [r4, #48] ; 0x30 3390: e3130a01 tst r3, #4096 ; 0x1000 tty->flow_ctrl |= FL_MDXOF; 3394: 159420b8 ldrne r2, [r4, #184] ; 0xb8 3398: 13822b01 orrne r2, r2, #1024 ; 0x400 339c: 158420b8 strne r2, [r4, #184] ; 0xb8 } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { 33a0: e3130b01 tst r3, #1024 ; 0x400 tty->flow_ctrl |= FL_MDXON; 33a4: 159430b8 ldrne r3, [r4, #184] ; 0xb8 tty->termios = *(struct termios *)args->buffer; /* check for and process change in flow control options */ termios_set_flowctrl(tty); if (tty->termios.c_lflag & ICANON) { 33a8: e594703c ldr r7, [r4, #60] ; 0x3c if (tty->termios.c_iflag & IXOFF) { tty->flow_ctrl |= FL_MDXOF; } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { tty->flow_ctrl |= FL_MDXON; 33ac: 13833c02 orrne r3, r3, #512 ; 0x200 33b0: 158430b8 strne r3, [r4, #184] ; 0xb8 tty->termios = *(struct termios *)args->buffer; /* check for and process change in flow control options */ termios_set_flowctrl(tty); if (tty->termios.c_lflag & ICANON) { 33b4: e2177002 ands r7, r7, #2 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 33b8: 13a03000 movne r3, #0 tty->termios = *(struct termios *)args->buffer; /* check for and process change in flow control options */ termios_set_flowctrl(tty); if (tty->termios.c_lflag & ICANON) { 33bc: 1a000013 bne 3410 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 33c0: e5d48046 ldrb r8, [r4, #70] ; 0x46 rtems_clock_get_ticks_per_second() / 10; 33c4: eb000519 bl 4830 33c8: e3a0100a mov r1, #10 33cc: e0000098 mul r0, r8, r0 33d0: eb003363 bl 10164 <__aeabi_uidiv> if (tty->termios.c_cc[VTIME]) { 33d4: e5d43046 ldrb r3, [r4, #70] ; 0x46 33d8: e3530000 cmp r3, #0 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] * 33dc: e5840054 str r0, [r4, #84] ; 0x54 33e0: e5d42047 ldrb r2, [r4, #71] ; 0x47 rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 33e4: 0a000005 beq 3400 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 33e8: e3520000 cmp r2, #0 } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; 33ec: e5840070 str r0, [r4, #112] ; 0x70 if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 33f0: 13a00000 movne r0, #0 tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 33f4: e584706c str r7, [r4, #108] ; 0x6c tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 33f8: e5840074 str r0, [r4, #116] ; 0x74 33fc: ea000006 b 341c else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { 3400: e3520000 cmp r2, #0 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 3404: 03a03001 moveq r3, #1 3408: 0584306c streq r3, [r4, #108] ; 0x6c if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { 340c: 0a000002 beq 341c tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 3410: e584306c str r3, [r4, #108] ; 0x6c tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 3414: e5843070 str r3, [r4, #112] ; 0x70 tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 3418: e5843074 str r3, [r4, #116] ; 0x74 } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) 341c: e59430a8 ldr r3, [r4, #168] ; 0xa8 3420: e3530000 cmp r3, #0 3424: 0a000032 beq 34f4 (*tty->device.setAttributes)(tty->minor, &tty->termios); 3428: e5940010 ldr r0, [r4, #16] 342c: e2841030 add r1, r4, #48 ; 0x30 3430: e1a0e00f mov lr, pc 3434: e12fff13 bx r3 3438: ea00002d b 34f4 break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 343c: e1a00004 mov r0, r4 3440: ebfffdb2 bl 2b10 break; 3444: ea00002a b 34f4 case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 3448: e897000c ldm r7, {r2, r3} 344c: e58420d4 str r2, [r4, #212] ; 0xd4 3450: e58430d8 str r3, [r4, #216] ; 0xd8 break; 3454: ea000026 b 34f4 case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 3458: e897000c ldm r7, {r2, r3} 345c: e58420dc str r2, [r4, #220] ; 0xdc 3460: e58430e0 str r3, [r4, #224] ; 0xe0 break; 3464: ea000022 b 34f4 #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 3468: e59420cc ldr r2, [r4, #204] ; 0xcc 346c: e59f309c ldr r3, [pc, #156] ; 3510 3470: e0833282 add r3, r3, r2, lsl #5 3474: e5933004 ldr r3, [r3, #4] 3478: e3530000 cmp r3, #0 347c: 0a000003 beq 3490 sc = rtems_termios_linesw[tty->t_line].l_close(tty); 3480: e1a00004 mov r0, r4 3484: e1a0e00f mov lr, pc 3488: e12fff13 bx r3 348c: e1a06000 mov r6, r0 } tty->t_line=*(int*)(args->buffer); 3490: e5953008 ldr r3, [r5, #8] tty->t_sc = NULL; /* ensure that no more valid data */ 3494: e3a02000 mov r2, #0 * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { sc = rtems_termios_linesw[tty->t_line].l_close(tty); } tty->t_line=*(int*)(args->buffer); 3498: e5933000 ldr r3, [r3] tty->t_sc = NULL; /* ensure that no more valid data */ 349c: e58420d0 str r2, [r4, #208] ; 0xd0 /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 34a0: e59f2068 ldr r2, [pc, #104] ; 3510 * 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); 34a4: e58430cc str r3, [r4, #204] ; 0xcc tty->t_sc = NULL; /* ensure that no more valid data */ /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 34a8: e7923283 ldr r3, [r2, r3, lsl #5] 34ac: e3530000 cmp r3, #0 34b0: 0a00000f beq 34f4 sc = rtems_termios_linesw[tty->t_line].l_open(tty); 34b4: e1a00004 mov r0, r4 34b8: e1a0e00f mov lr, pc 34bc: e12fff13 bx r3 34c0: e1a06000 mov r6, r0 34c4: ea00000a b 34f4 case TIOCGETD: *(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 34c8: e5942060 ldr r2, [r4, #96] ; 0x60 <== NOT EXECUTED 34cc: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED if ( rawnc < 0 ) 34d0: e0523003 subs r3, r2, r3 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; 34d4: 45942064 ldrmi r2, [r4, #100] ; 0x64 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 34d8: e2840020 add r0, r4, #32 <== NOT EXECUTED 34dc: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED 34e0: e0401001 sub r1, r0, r1 <== NOT EXECUTED break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; if ( rawnc < 0 ) rawnc += tty->rawInBuf.Size; 34e4: 40833002 addmi r3, r3, r2 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 34e8: e5952008 ldr r2, [r5, #8] <== NOT EXECUTED 34ec: e0813003 add r3, r1, r3 <== NOT EXECUTED 34f0: e5823000 str r3, [r2] <== NOT EXECUTED } break; } rtems_semaphore_release (tty->osem); 34f4: e5940018 ldr r0, [r4, #24] 34f8: eb0006a5 bl 4f94 args->ioctl_return = sc; 34fc: e585600c str r6, [r5, #12] return sc; } 3500: e1a00006 mov r0, r6 3504: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} =============================================================================== 00002b6c : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 2b6c: e92d4fff push {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, lr} 2b70: e58d300c str r3, [sp, #12] struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain( 2b74: e59f3404 ldr r3, [pc, #1028] ; 2f80 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 2b78: e1a0a001 mov sl, r1 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain( 2b7c: e3a01000 mov r1, #0 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 2b80: e1a09000 mov r9, r0 2b84: e1a08002 mov r8, r2 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain( 2b88: e5930000 ldr r0, [r3] 2b8c: e1a02001 mov r2, r1 2b90: eb0008b9 bl 4e7c rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 2b94: e2506000 subs r6, r0, #0 2b98: 1a0000ee bne 2f58 return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 2b9c: e59f33e0 ldr r3, [pc, #992] ; 2f84 2ba0: e5937000 ldr r7, [r3] 2ba4: e1a05007 mov r5, r7 2ba8: ea000006 b 2bc8 if ((tty->major == major) && (tty->minor == minor)) 2bac: e595300c ldr r3, [r5, #12] 2bb0: e1530009 cmp r3, r9 2bb4: 1a000002 bne 2bc4 2bb8: e5953010 ldr r3, [r5, #16] 2bbc: e153000a cmp r3, sl 2bc0: 0a0000c3 beq 2ed4 sc = rtems_semaphore_obtain( rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 2bc4: e5955000 ldr r5, [r5] 2bc8: e3550000 cmp r5, #0 2bcc: 1afffff6 bne 2bac 2bd0: ea0000e3 b 2f64 return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 2bd4: e59f23ac ldr r2, [pc, #940] ; 2f88 2bd8: e5923000 ldr r3, [r2] 2bdc: e5853064 str r3, [r5, #100] ; 0x64 tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 2be0: e5950064 ldr r0, [r5, #100] ; 0x64 2be4: e58d2008 str r2, [sp, #8] 2be8: ebfffcfe bl 1fe8 if (tty->rawInBuf.theBuf == NULL) { 2bec: e3500000 cmp r0, #0 } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 2bf0: e1a0b000 mov fp, r0 2bf4: e5850058 str r0, [r5, #88] ; 0x58 if (tty->rawInBuf.theBuf == NULL) { 2bf8: e59d2008 ldr r2, [sp, #8] 2bfc: 1a000006 bne 2c1c free(tty); 2c00: e1a00005 mov r0, r5 2c04: ebfffc28 bl 1cac rtems_semaphore_release (rtems_termios_ttyMutex); 2c08: e59f3370 ldr r3, [pc, #880] ; 2f80 2c0c: e5930000 ldr r0, [r3] 2c10: eb0008df bl 4f94 return RTEMS_NO_MEMORY; 2c14: e3a0601a mov r6, #26 2c18: ea0000ce b 2f58 } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 2c1c: e5923004 ldr r3, [r2, #4] 2c20: e5853088 str r3, [r5, #136] ; 0x88 tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 2c24: e5950088 ldr r0, [r5, #136] ; 0x88 2c28: e58d2008 str r2, [sp, #8] 2c2c: ebfffced bl 1fe8 if (tty->rawOutBuf.theBuf == NULL) { 2c30: e3500000 cmp r0, #0 } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 2c34: e1a03000 mov r3, r0 2c38: e585007c str r0, [r5, #124] ; 0x7c if (tty->rawOutBuf.theBuf == NULL) { 2c3c: e59d2008 ldr r2, [sp, #8] 2c40: 0a000008 beq 2c68 return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 2c44: e5920008 ldr r0, [r2, #8] 2c48: e58d3008 str r3, [sp, #8] 2c4c: ebfffce5 bl 1fe8 if (tty->cbuf == NULL) { 2c50: e3500000 cmp r0, #0 return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 2c54: e585001c str r0, [r5, #28] if (tty->cbuf == NULL) { 2c58: e59d3008 ldr r3, [sp, #8] 2c5c: 1a000004 bne 2c74 free((void *)(tty->rawOutBuf.theBuf)); 2c60: e1a00003 mov r0, r3 <== NOT EXECUTED 2c64: ebfffc10 bl 1cac <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 2c68: e1a0000b mov r0, fp 2c6c: ebfffc0e bl 1cac 2c70: eaffffe2 b 2c00 return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 2c74: e3a03000 mov r3, #0 /* * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; 2c78: e5853004 str r3, [r5, #4] if (rtems_termios_ttyHead != NULL) 2c7c: e1570003 cmp r7, r3 return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 2c80: e58530d4 str r3, [r5, #212] ; 0xd4 tty->tty_snd.sw_arg = NULL; 2c84: e58530d8 str r3, [r5, #216] ; 0xd8 tty->tty_rcv.sw_pfn = NULL; 2c88: e58530dc str r3, [r5, #220] ; 0xdc tty->tty_rcv.sw_arg = NULL; 2c8c: e58530e0 str r3, [r5, #224] ; 0xe0 tty->tty_rcvwakeup = 0; 2c90: e58530e4 str r3, [r5, #228] ; 0xe4 */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; 2c94: e59f32e8 ldr r3, [pc, #744] ; 2f84 2c98: e5834000 str r4, [r3] if (rtems_termios_ttyTail == NULL) 2c9c: e59f32e8 ldr r3, [pc, #744] ; 2f8c 2ca0: e5932000 ldr r2, [r3] * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; 2ca4: 15875004 strne r5, [r7, #4] tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; 2ca8: e5857000 str r7, [r5] /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( rtems_build_name ('T', 'R', 'i', c), 2cac: e59f72d4 ldr r7, [pc, #724] ; 2f88 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) 2cb0: e3520000 cmp r2, #0 rtems_termios_ttyTail = tty; 2cb4: 05834000 streq r4, [r3] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 2cb8: e59f02d0 ldr r0, [pc, #720] ; 2f90 rtems_build_name ('T', 'R', 'i', c), 2cbc: e5d7300c ldrb r3, [r7, #12] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 2cc0: e2842014 add r2, r4, #20 rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; tty->minor = minor; 2cc4: e584a010 str sl, [r4, #16] tty->major = major; 2cc8: e584900c str r9, [r4, #12] /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 2ccc: e1830000 orr r0, r3, r0 2cd0: e58d2000 str r2, [sp] 2cd4: e3a03000 mov r3, #0 2cd8: e3a01001 mov r1, #1 2cdc: e3a02054 mov r2, #84 ; 0x54 2ce0: eb0007d3 bl 4c34 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) 2ce4: e2503000 subs r3, r0, #0 2ce8: 1a000096 bne 2f48 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( rtems_build_name ('T', 'R', 'o', c), 2cec: e5d7200c ldrb r2, [r7, #12] RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->isem); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 2cf0: e59f029c ldr r0, [pc, #668] ; 2f94 2cf4: e2841018 add r1, r4, #24 2cf8: e58d1000 str r1, [sp] 2cfc: e1820000 orr r0, r2, r0 2d00: e3a01001 mov r1, #1 2d04: e3a02054 mov r2, #84 ; 0x54 2d08: eb0007c9 bl 4c34 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) 2d0c: e2501000 subs r1, r0, #0 2d10: 1a00008c bne 2f48 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( rtems_build_name ('T', 'R', 'x', c), 2d14: e5d7300c ldrb r3, [r7, #12] RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->osem); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 2d18: e59f0278 ldr r0, [pc, #632] ; 2f98 2d1c: e284208c add r2, r4, #140 ; 0x8c 2d20: e58d2000 str r2, [sp] 2d24: e1830000 orr r0, r3, r0 2d28: e3a02020 mov r2, #32 2d2c: e1a03001 mov r3, r1 2d30: eb0007bf bl 4c34 rtems_build_name ('T', 'R', 'x', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 2d34: e250b000 subs fp, r0, #0 2d38: 1a000082 bne 2f48 tty->rawOutBufState = rob_idle; /* * Set callbacks */ tty->device = *callbacks; 2d3c: e59de00c ldr lr, [sp, #12] 2d40: e8be000f ldm lr!, {r0, r1, r2, r3} 2d44: e284c098 add ip, r4, #152 ; 0x98 2d48: e8ac000f stmia ip!, {r0, r1, r2, r3} 2d4c: e89e000f ldm lr, {r0, r1, r2, r3} 2d50: e88c000f stm ip, {r0, r1, r2, r3} /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 2d54: e59430b4 ldr r3, [r4, #180] ; 0xb4 2d58: e3530002 cmp r3, #2 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; 2d5c: e584b094 str fp, [r4, #148] ; 0x94 tty->device = *callbacks; /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 2d60: 1a000017 bne 2dc4 sc = rtems_task_create ( rtems_build_name ('T', 'x', 'T', c), 2d64: e5d7300c ldrb r3, [r7, #12] /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_create ( 2d68: e59f022c ldr r0, [pc, #556] ; 2f9c 2d6c: e28420c8 add r2, r4, #200 ; 0xc8 2d70: e58d2004 str r2, [sp, #4] 2d74: e1830000 orr r0, r3, r0 2d78: e3a02b01 mov r2, #1024 ; 0x400 2d7c: e3a0100a mov r1, #10 2d80: e3a03c05 mov r3, #1280 ; 0x500 2d84: e58db000 str fp, [sp] 2d88: eb0008a8 bl 5030 TERMIOS_TXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->txTaskId); if (sc != RTEMS_SUCCESSFUL) 2d8c: e2502000 subs r2, r0, #0 2d90: 1a00006c bne 2f48 rtems_fatal_error_occurred (sc); sc = rtems_task_create ( rtems_build_name ('R', 'x', 'T', c), 2d94: e5d7300c ldrb r3, [r7, #12] RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->txTaskId); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 2d98: e59f0200 ldr r0, [pc, #512] ; 2fa0 2d9c: e58d2000 str r2, [sp] 2da0: e28420c4 add r2, r4, #196 ; 0xc4 2da4: e58d2004 str r2, [sp, #4] 2da8: e1830000 orr r0, r3, r0 2dac: e3a01009 mov r1, #9 2db0: e3a02b01 mov r2, #1024 ; 0x400 2db4: e3a03c05 mov r3, #1280 ; 0x500 2db8: eb00089c bl 5030 TERMIOS_RXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) 2dbc: e3500000 cmp r0, #0 2dc0: 1a000060 bne 2f48 rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 2dc4: e59430a0 ldr r3, [r4, #160] ; 0xa0 2dc8: e3530000 cmp r3, #0 2dcc: 0a000002 beq 2ddc 2dd0: e59430b4 ldr r3, [r4, #180] ; 0xb4 2dd4: e3530002 cmp r3, #2 2dd8: 1a00000b bne 2e0c (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( rtems_build_name ('T', 'R', 'r', c), 2ddc: e59f31a4 ldr r3, [pc, #420] ; 2f88 rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 2de0: e59f01bc ldr r0, [pc, #444] ; 2fa4 rtems_build_name ('T', 'R', 'r', c), 2de4: e5d3300c ldrb r3, [r3, #12] rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 2de8: e2842068 add r2, r4, #104 ; 0x68 2dec: e3a01000 mov r1, #0 2df0: e58d2000 str r2, [sp] 2df4: e1830000 orr r0, r3, r0 2df8: e3a02024 mov r2, #36 ; 0x24 2dfc: e1a03001 mov r3, r1 2e00: eb00078b bl 4c34 rtems_build_name ('T', 'R', 'r', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->rawInBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 2e04: e3500000 cmp r0, #0 2e08: 1a00004e bne 2f48 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 2e0c: e59f3194 ldr r3, [pc, #404] ; 2fa8 2e10: e5843030 str r3, [r4, #48] ; 0x30 tty->termios.c_oflag = OPOST | ONLCR | XTABS; 2e14: e59f3190 ldr r3, [pc, #400] ; 2fac 2e18: e5843034 str r3, [r4, #52] ; 0x34 tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 2e1c: e59f318c ldr r3, [pc, #396] ; 2fb0 2e20: e5843038 str r3, [r4, #56] ; 0x38 tty->termios.c_lflag = 2e24: e59f3188 ldr r3, [pc, #392] ; 2fb4 2e28: e584303c str r3, [r4, #60] ; 0x3c ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; 2e2c: e3a03003 mov r3, #3 2e30: e5c43041 strb r3, [r4, #65] ; 0x41 tty->termios.c_cc[VQUIT] = '\034'; 2e34: e2833019 add r3, r3, #25 2e38: e5c43042 strb r3, [r4, #66] ; 0x42 tty->termios.c_cc[VERASE] = '\177'; 2e3c: e2833063 add r3, r3, #99 ; 0x63 2e40: e5c43043 strb r3, [r4, #67] ; 0x43 tty->termios.c_cc[VKILL] = '\025'; 2e44: e3a03015 mov r3, #21 2e48: e5c43044 strb r3, [r4, #68] ; 0x44 tty->termios.c_cc[VEOF] = '\004'; 2e4c: e3a03004 mov r3, #4 2e50: e5c43045 strb r3, [r4, #69] ; 0x45 tty->termios.c_cc[VEOL] = '\000'; 2e54: e3a03000 mov r3, #0 tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; tty->termios.c_cc[VLNEXT] = '\026'; /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; 2e58: e58430b8 str r3, [r4, #184] ; 0xb8 tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; 2e5c: e5c4304c strb r3, [r4, #76] ; 0x4c tty->termios.c_cc[VEOL2] = '\000'; 2e60: e5c43051 strb r3, [r4, #81] ; 0x51 tty->termios.c_cc[VSTART] = '\021'; 2e64: e3a02011 mov r2, #17 /* 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; 2e68: e5943064 ldr r3, [r4, #100] ; 0x64 tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; 2e6c: e5c42049 strb r2, [r4, #73] ; 0x49 tty->termios.c_cc[VSTOP] = '\023'; 2e70: e2822002 add r2, r2, #2 2e74: e5c4204a strb r2, [r4, #74] ; 0x4a /* 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; 2e78: e1a030a3 lsr r3, r3, #1 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'; 2e7c: e2822007 add r2, r2, #7 2e80: e5c4204b strb r2, [r4, #75] ; 0x4b /* 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; 2e84: e58430bc str r3, [r4, #188] ; 0xbc 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'; 2e88: e3a02012 mov r2, #18 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; 2e8c: e5943064 ldr r3, [r4, #100] ; 0x64 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'; 2e90: e5c4204d strb r2, [r4, #77] ; 0x4d tty->termios.c_cc[VDISCARD] = '\017'; 2e94: e3a0200f mov r2, #15 2e98: e5c4204e strb r2, [r4, #78] ; 0x4e 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; 2e9c: e0833083 add r3, r3, r3, lsl #1 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'; 2ea0: e2822008 add r2, r2, #8 2ea4: e5c4204f strb r2, [r4, #79] ; 0x4f tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; 2ea8: e1a03123 lsr r3, r3, #2 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'; 2eac: e3a02016 mov r2, #22 2eb0: e5c42050 strb r2, [r4, #80] ; 0x50 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; 2eb4: e58430c0 str r3, [r4, #192] ; 0xc0 /* * Bump name characer */ if (c++ == 'z') 2eb8: e59f30c8 ldr r3, [pc, #200] ; 2f88 2ebc: e5d3200c ldrb r2, [r3, #12] 2ec0: e352007a cmp r2, #122 ; 0x7a 2ec4: e2821001 add r1, r2, #1 c = 'a'; 2ec8: 03a02061 moveq r2, #97 ; 0x61 tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 2ecc: e5c3100c strb r1, [r3, #12] c = 'a'; 2ed0: 05c3200c strbeq r2, [r3, #12] } args->iop->data1 = tty; 2ed4: e5983000 ldr r3, [r8] 2ed8: e5835034 str r5, [r3, #52] ; 0x34 if (!tty->refcount++) { 2edc: e5953008 ldr r3, [r5, #8] 2ee0: e2832001 add r2, r3, #1 2ee4: e3530000 cmp r3, #0 2ee8: e5852008 str r2, [r5, #8] 2eec: 1a000016 bne 2f4c if (tty->device.firstOpen) 2ef0: e5953098 ldr r3, [r5, #152] ; 0x98 2ef4: e3530000 cmp r3, #0 (*tty->device.firstOpen)(major, minor, arg); 2ef8: 11a00009 movne r0, r9 2efc: 11a0100a movne r1, sl 2f00: 11a02008 movne r2, r8 2f04: 11a0e00f movne lr, pc 2f08: 112fff13 bxne r3 /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 2f0c: e59530b4 ldr r3, [r5, #180] ; 0xb4 2f10: e3530002 cmp r3, #2 2f14: 1a00000c bne 2f4c sc = rtems_task_start( 2f18: e59500c4 ldr r0, [r5, #196] ; 0xc4 2f1c: e59f1094 ldr r1, [pc, #148] ; 2fb8 2f20: e1a02005 mov r2, r5 2f24: eb0008e9 bl 52d0 tty->rxTaskId, rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 2f28: e3500000 cmp r0, #0 2f2c: 1a000005 bne 2f48 rtems_fatal_error_occurred (sc); sc = rtems_task_start( 2f30: e59500c8 ldr r0, [r5, #200] ; 0xc8 2f34: e59f1080 ldr r1, [pc, #128] ; 2fbc 2f38: e1a02005 mov r2, r5 2f3c: eb0008e3 bl 52d0 tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 2f40: e3500000 cmp r0, #0 2f44: 0a000000 beq 2f4c rtems_fatal_error_occurred (sc); 2f48: eb000967 bl 54ec } } rtems_semaphore_release (rtems_termios_ttyMutex); 2f4c: e59f302c ldr r3, [pc, #44] ; 2f80 2f50: e5930000 ldr r0, [r3] 2f54: eb00080e bl 4f94 return RTEMS_SUCCESSFUL; } 2f58: e1a00006 mov r0, r6 2f5c: e28dd010 add sp, sp, #16 2f60: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 2f64: e3a00001 mov r0, #1 2f68: e3a010e8 mov r1, #232 ; 0xe8 2f6c: ebfffaea bl 1b1c if (tty == NULL) { 2f70: e2504000 subs r4, r0, #0 static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 2f74: e1a05000 mov r5, r0 if (tty == NULL) { 2f78: 1affff15 bne 2bd4 2f7c: eaffff21 b 2c08 =============================================================================== 00003c5c : rtems_status_code rtems_termios_read (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 3c5c: e5903000 ldr r3, [r0] return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 3c60: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 3c64: 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); 3c68: e3a01000 mov r1, #0 rtems_status_code rtems_termios_read (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; uint32_t count = args->count; 3c6c: e5908010 ldr r8, [r0, #16] char *buffer = args->buffer; 3c70: e590b00c ldr fp, [r0, #12] return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 3c74: e1a05000 mov r5, 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); 3c78: e1a02001 mov r2, r1 3c7c: e5940014 ldr r0, [r4, #20] 3c80: eb00047d bl 4e7c if (sc != RTEMS_SUCCESSFUL) 3c84: e2507000 subs r7, r0, #0 3c88: 1a0000be bne 3f88 return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 3c8c: e59420cc ldr r2, [r4, #204] ; 0xcc 3c90: e59f32f8 ldr r3, [pc, #760] ; 3f90 3c94: e0833282 add r3, r3, r2, lsl #5 3c98: e5933008 ldr r3, [r3, #8] 3c9c: e3530000 cmp r3, #0 3ca0: 0a000005 beq 3cbc sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 3ca4: e1a00004 mov r0, r4 3ca8: e1a01005 mov r1, r5 3cac: e1a0e00f mov lr, pc 3cb0: e12fff13 bx r3 3cb4: e1a07000 mov r7, r0 3cb8: ea0000ae b 3f78 tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { 3cbc: e5942024 ldr r2, [r4, #36] ; 0x24 3cc0: e5943020 ldr r3, [r4, #32] 3cc4: e1520003 cmp r2, r3 3cc8: 1a0000a1 bne 3f54 tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; 3ccc: e5943028 ldr r3, [r4, #40] ; 0x28 3cd0: e584302c str r3, [r4, #44] ; 0x2c if (tty->device.pollRead != NULL && 3cd4: e59430a0 ldr r3, [r4, #160] ; 0xa0 3cd8: e3530000 cmp r3, #0 rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; 3cdc: e5847020 str r7, [r4, #32] 3ce0: e5847024 str r7, [r4, #36] ; 0x24 tty->read_start_column = tty->column; if (tty->device.pollRead != NULL && 3ce4: 0a00003b beq 3dd8 3ce8: e59430b4 ldr r3, [r4, #180] ; 0xb4 3cec: e3530000 cmp r3, #0 3cf0: 1a000038 bne 3dd8 static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 3cf4: e594303c ldr r3, [r4, #60] ; 0x3c 3cf8: e3130002 tst r3, #2 3cfc: 0a00000d beq 3d38 for (;;) { n = (*tty->device.pollRead)(tty->minor); 3d00: e5940010 ldr r0, [r4, #16] 3d04: e1a0e00f mov lr, pc 3d08: e594f0a0 ldr pc, [r4, #160] ; 0xa0 if (n < 0) { 3d0c: e3500000 cmp r0, #0 3d10: aa000002 bge 3d20 rtems_task_wake_after (1); 3d14: e3a00001 mov r0, #1 3d18: eb000584 bl 5330 3d1c: eafffff7 b 3d00 } else { if (siproc (n, tty)) 3d20: e20000ff and r0, r0, #255 ; 0xff 3d24: e1a01004 mov r1, r4 3d28: ebffff86 bl 3b48 3d2c: e3500000 cmp r0, #0 3d30: 0afffff2 beq 3d00 3d34: ea000086 b 3f54 } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 3d38: eb0002c4 bl 4850 3d3c: e1a06000 mov r6, r0 for (;;) { n = (*tty->device.pollRead)(tty->minor); 3d40: e5940010 ldr r0, [r4, #16] 3d44: e1a0e00f mov lr, pc 3d48: e594f0a0 ldr pc, [r4, #160] ; 0xa0 if (n < 0) { 3d4c: e3500000 cmp r0, #0 3d50: aa000013 bge 3da4 if (tty->termios.c_cc[VMIN]) { 3d54: e5d43047 ldrb r3, [r4, #71] ; 0x47 3d58: e3530000 cmp r3, #0 3d5c: e5d43046 ldrb r3, [r4, #70] ; 0x46 3d60: 0a000005 beq 3d7c if (tty->termios.c_cc[VTIME] && tty->ccount) { 3d64: e3530000 cmp r3, #0 3d68: 0a00000a beq 3d98 3d6c: e5943020 ldr r3, [r4, #32] 3d70: e3530000 cmp r3, #0 3d74: 0a000007 beq 3d98 3d78: ea000001 b 3d84 if ((now - then) > tty->vtimeTicks) { break; } } } else { if (!tty->termios.c_cc[VTIME]) 3d7c: e3530000 cmp r3, #0 <== NOT EXECUTED 3d80: 0a000073 beq 3f54 <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); 3d84: eb0002b1 bl 4850 if ((now - then) > tty->vtimeTicks) { 3d88: e5943054 ldr r3, [r4, #84] ; 0x54 3d8c: e0660000 rsb r0, r6, r0 3d90: e1500003 cmp r0, r3 3d94: 8a00006e bhi 3f54 break; } } rtems_task_wake_after (1); 3d98: e3a00001 mov r0, #1 3d9c: eb000563 bl 5330 3da0: eaffffe6 b 3d40 } else { siproc (n, tty); 3da4: e20000ff and r0, r0, #255 ; 0xff 3da8: e1a01004 mov r1, r4 3dac: ebffff65 bl 3b48 if (tty->ccount >= tty->termios.c_cc[VMIN]) 3db0: e5d43047 ldrb r3, [r4, #71] ; 0x47 3db4: e5942020 ldr r2, [r4, #32] 3db8: e1520003 cmp r2, r3 3dbc: aa000064 bge 3f54 break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 3dc0: e3530000 cmp r3, #0 3dc4: 0affffdd beq 3d40 3dc8: e5d43046 ldrb r3, [r4, #70] ; 0x46 3dcc: e3530000 cmp r3, #0 3dd0: 0affffda beq 3d40 3dd4: eaffffd7 b 3d38 if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)( 3dd8: e2842049 add r2, r4, #73 ; 0x49 * Fill the input buffer from the raw input queue */ static rtems_status_code fillBufferQueue (struct rtems_termios_tty *tty) { rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; 3ddc: e594a074 ldr sl, [r4, #116] ; 0x74 rtems_status_code sc; int wait = (int)1; 3de0: e3a06001 mov r6, #1 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && (tty->ccount < (CBUFSIZE-1))) { 3de4: e59f91a8 ldr r9, [pc, #424] ; 3f94 if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)( 3de8: e58d2000 str r2, [sp] 3dec: ea000040 b 3ef4 while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; 3df0: e594005c ldr r0, [r4, #92] ; 0x5c 3df4: e5941064 ldr r1, [r4, #100] ; 0x64 3df8: e2800001 add r0, r0, #1 3dfc: eb003170 bl 103c4 <__umodsi3> c = tty->rawInBuf.theBuf[newHead]; 3e00: e5943058 ldr r3, [r4, #88] ; 0x58 3e04: e7d3a000 ldrb sl, [r3, r0] tty->rawInBuf.Head = newHead; 3e08: e584005c str r0, [r4, #92] ; 0x5c if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 3e0c: e5943060 ldr r3, [r4, #96] ; 0x60 3e10: e5942064 ldr r2, [r4, #100] ; 0x64 3e14: e0823003 add r3, r2, r3 % tty->rawInBuf.Size) 3e18: e0600003 rsb r0, r0, r3 3e1c: e5941064 ldr r1, [r4, #100] ; 0x64 3e20: eb003167 bl 103c4 <__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) 3e24: e59430bc ldr r3, [r4, #188] ; 0xbc 3e28: e1500003 cmp r0, r3 3e2c: 2a00001f bcs 3eb0 % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 3e30: e59430b8 ldr r3, [r4, #184] ; 0xb8 3e34: e3c33001 bic r3, r3, #1 3e38: e58430b8 str r3, [r4, #184] ; 0xb8 /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 3e3c: e59f3154 ldr r3, [pc, #340] ; 3f98 3e40: e59420b8 ldr r2, [r4, #184] ; 0xb8 3e44: e0023003 and r3, r2, r3 3e48: e59f2148 ldr r2, [pc, #328] ; 3f98 3e4c: e1530002 cmp r3, r2 3e50: 1a00000b bne 3e84 == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) 3e54: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 3e58: e3530000 cmp r3, #0 <== NOT EXECUTED 3e5c: 0a000002 beq 3e6c <== NOT EXECUTED || (tty->flow_ctrl & FL_OSTOP))) { 3e60: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3e64: e3130020 tst r3, #32 <== NOT EXECUTED 3e68: 0a000005 beq 3e84 <== NOT EXECUTED /* XON should be sent now... */ (*tty->device.write)( 3e6c: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 3e70: e59d1000 ldr r1, [sp] <== NOT EXECUTED 3e74: e3a02001 mov r2, #1 <== NOT EXECUTED 3e78: e1a0e00f mov lr, pc <== NOT EXECUTED 3e7c: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 3e80: ea00000a b 3eb0 <== NOT EXECUTED tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { 3e84: e59430b8 ldr r3, [r4, #184] ; 0xb8 3e88: e3130c01 tst r3, #256 ; 0x100 3e8c: 0a000007 beq 3eb0 tty->flow_ctrl &= ~FL_IRTSOFF; 3e90: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3e94: e3c33004 bic r3, r3, #4 <== NOT EXECUTED 3e98: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 3e9c: e59430b0 ldr r3, [r4, #176] ; 0xb0 <== NOT EXECUTED 3ea0: e3530000 cmp r3, #0 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 3ea4: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED 3ea8: 11a0e00f movne lr, pc <== NOT EXECUTED 3eac: 112fff13 bxne r3 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 3eb0: e594303c ldr r3, [r4, #60] ; 0x3c 3eb4: e3130002 tst r3, #2 3eb8: 0a000005 beq 3ed4 if (siproc (c, tty)) 3ebc: e1a0000a mov r0, sl 3ec0: e1a01004 mov r1, r4 3ec4: ebffff1f bl 3b48 wait = 0; 3ec8: e3500000 cmp r0, #0 3ecc: 13a06000 movne r6, #0 3ed0: ea000006 b 3ef0 } else { siproc (c, tty); 3ed4: e1a0000a mov r0, sl <== NOT EXECUTED 3ed8: e1a01004 mov r1, r4 <== NOT EXECUTED 3edc: ebffff19 bl 3b48 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 3ee0: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED 3ee4: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED wait = 0; 3ee8: e1520003 cmp r2, r3 <== NOT EXECUTED 3eec: a3a06000 movge r6, #0 <== NOT EXECUTED } timeout = tty->rawInBufSemaphoreTimeout; 3ef0: e594a070 ldr sl, [r4, #112] ; 0x70 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 3ef4: e594205c ldr r2, [r4, #92] ; 0x5c 3ef8: e5943060 ldr r3, [r4, #96] ; 0x60 3efc: e1520003 cmp r2, r3 3f00: 0a000004 beq 3f18 (tty->ccount < (CBUFSIZE-1))) { 3f04: e5993008 ldr r3, [r9, #8] while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 3f08: e5942020 ldr r2, [r4, #32] (tty->ccount < (CBUFSIZE-1))) { 3f0c: e2433001 sub r3, r3, #1 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 3f10: e1520003 cmp r2, r3 3f14: baffffb5 blt 3df0 } /* * Wait for characters */ if ( wait ) { 3f18: e3560000 cmp r6, #0 3f1c: 0a00000c beq 3f54 sc = rtems_semaphore_obtain( 3f20: e2840068 add r0, r4, #104 ; 0x68 3f24: e8900003 ldm r0, {r0, r1} 3f28: e1a0200a mov r2, sl 3f2c: eb0003d2 bl 4e7c tty->rawInBuf.Semaphore, tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 3f30: e3500000 cmp r0, #0 3f34: 0affffee beq 3ef4 3f38: ea000005 b 3f54 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; 3f3c: e594201c ldr r2, [r4, #28] 3f40: e7d22003 ldrb r2, [r2, r3] 3f44: e2833001 add r3, r3, #1 3f48: e4cb2001 strb r2, [fp], #1 3f4c: e5843024 str r3, [r4, #36] ; 0x24 count--; 3f50: e2488001 sub r8, r8, #1 sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 3f54: e3580000 cmp r8, #0 3f58: 0a000003 beq 3f6c 3f5c: e2842020 add r2, r4, #32 3f60: e892000c ldm r2, {r2, r3} 3f64: e1530002 cmp r3, r2 3f68: bafffff3 blt 3f3c *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 3f6c: e5953010 ldr r3, [r5, #16] 3f70: e0688003 rsb r8, r8, r3 3f74: e5858018 str r8, [r5, #24] tty->tty_rcvwakeup = 0; 3f78: e3a03000 mov r3, #0 3f7c: e58430e4 str r3, [r4, #228] ; 0xe4 rtems_semaphore_release (tty->isem); 3f80: e5940014 ldr r0, [r4, #20] 3f84: eb000402 bl 4f94 return sc; } 3f88: e1a00007 mov r0, r7 3f8c: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 000042ac : int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) 42ac: e59020b8 ldr r2, [r0, #184] ; 0xb8 42b0: e59f31b8 ldr r3, [pc, #440] ; 4470 42b4: e0023003 and r3, r2, r3 42b8: e59f21b4 ldr r2, [pc, #436] ; 4474 42bc: 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) { 42c0: e92d4070 push {r4, r5, r6, lr} 42c4: 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)) 42c8: 1a00000c bne 4300 == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); 42cc: e284104a add r1, r4, #74 ; 0x4a <== NOT EXECUTED 42d0: e2422b01 sub r2, r2, #1024 ; 0x400 <== NOT EXECUTED 42d4: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED 42d8: e1a0e00f mov lr, pc <== NOT EXECUTED 42dc: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED rtems_interrupt_disable(level); 42e0: ebfffa06 bl 2b00 <== NOT EXECUTED tty->t_dqlen--; 42e4: e5943090 ldr r3, [r4, #144] ; 0x90 <== NOT EXECUTED 42e8: e2433001 sub r3, r3, #1 <== NOT EXECUTED 42ec: e5843090 str r3, [r4, #144] ; 0x90 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 42f0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 42f4: e3833002 orr r3, r3, #2 <== NOT EXECUTED 42f8: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED rtems_interrupt_enable(level); 42fc: ea00000f b 4340 <== NOT EXECUTED nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) == FL_ISNTXOF) { 4300: e59030b8 ldr r3, [r0, #184] ; 0xb8 4304: e2033003 and r3, r3, #3 4308: e3530002 cmp r3, #2 430c: 1a00000e bne 434c * 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); 4310: e2841049 add r1, r4, #73 ; 0x49 <== NOT EXECUTED 4314: e3a02001 mov r2, #1 <== NOT EXECUTED 4318: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED 431c: e1a0e00f mov lr, pc <== NOT EXECUTED 4320: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED rtems_interrupt_disable(level); 4324: ebfff9f5 bl 2b00 <== NOT EXECUTED tty->t_dqlen--; 4328: e5943090 ldr r3, [r4, #144] ; 0x90 <== NOT EXECUTED 432c: e2433001 sub r3, r3, #1 <== NOT EXECUTED 4330: e5843090 str r3, [r4, #144] ; 0x90 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 4334: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 4338: e3c33002 bic r3, r3, #2 <== NOT EXECUTED 433c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 4340: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED rtems_interrupt_enable(level); nToSend = 1; 4344: e3a05001 mov r5, #1 <== NOT EXECUTED 4348: ea000046 b 4468 <== NOT EXECUTED } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 434c: e5902080 ldr r2, [r0, #128] ; 0x80 4350: e5903084 ldr r3, [r0, #132] ; 0x84 4354: e1520003 cmp r2, r3 4358: 1a000005 bne 4374 /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 435c: e5903094 ldr r3, [r0, #148] ; 0x94 4360: e3530002 cmp r3, #2 4364: 1a00003e bne 4464 /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 4368: e590008c ldr r0, [r0, #140] ; 0x8c <== NOT EXECUTED 436c: eb000308 bl 4f94 <== NOT EXECUTED 4370: ea00003b b 4464 <== NOT EXECUTED } return 0; } rtems_interrupt_disable(level); 4374: ebfff9e1 bl 2b00 len = tty->t_dqlen; tty->t_dqlen = 0; 4378: e3a03000 mov r3, #0 } return 0; } rtems_interrupt_disable(level); len = tty->t_dqlen; 437c: e5942090 ldr r2, [r4, #144] ; 0x90 tty->t_dqlen = 0; 4380: e5843090 str r3, [r4, #144] ; 0x90 4384: e129f000 msr CPSR_fc, r0 rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 4388: e5943084 ldr r3, [r4, #132] ; 0x84 438c: e5941088 ldr r1, [r4, #136] ; 0x88 4390: e0820003 add r0, r2, r3 4394: eb00300a bl 103c4 <__umodsi3> tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 4398: e5943094 ldr r3, [r4, #148] ; 0x94 439c: e3530002 cmp r3, #2 rtems_interrupt_disable(level); len = tty->t_dqlen; tty->t_dqlen = 0; rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 43a0: e1a06000 mov r6, r0 tty->rawOutBuf.Tail = newTail; 43a4: e5840084 str r0, [r4, #132] ; 0x84 if (tty->rawOutBufState == rob_wait) { /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 43a8: 0594008c ldreq r0, [r4, #140] ; 0x8c 43ac: 0b0002f8 bleq 4f94 } if (newTail == tty->rawOutBuf.Head) { 43b0: e5943080 ldr r3, [r4, #128] ; 0x80 43b4: e1560003 cmp r6, r3 43b8: 1a00000a bne 43e8 nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 43bc: e59430d4 ldr r3, [r4, #212] ; 0xd4 if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 43c0: e3a05000 mov r5, #0 nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 43c4: e1530005 cmp r3, r5 if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 43c8: e5845094 str r5, [r4, #148] ; 0x94 nToSend = 0; 43cc: 01a05003 moveq r5, r3 /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 43d0: 0a000021 beq 445c (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 43d4: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED 43d8: e59410d8 ldr r1, [r4, #216] ; 0xd8 <== NOT EXECUTED 43dc: e1a0e00f mov lr, pc <== NOT EXECUTED 43e0: e12fff13 bx r3 <== NOT EXECUTED 43e4: ea00001c b 445c <== NOT EXECUTED } } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) 43e8: e59430b8 ldr r3, [r4, #184] ; 0xb8 43ec: e2033e21 and r3, r3, #528 ; 0x210 43f0: e3530e21 cmp r3, #528 ; 0x210 43f4: 1a000008 bne 441c == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); 43f8: ebfff9c0 bl 2b00 <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; 43fc: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 4400: e3833020 orr r3, r3, #32 <== NOT EXECUTED 4404: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 4408: e3a03001 mov r3, #1 <== NOT EXECUTED 440c: e5843094 str r3, [r4, #148] ; 0x94 <== NOT EXECUTED 4410: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED rtems_interrupt_enable(level); nToSend = 0; 4414: e3a05000 mov r5, #0 <== NOT EXECUTED 4418: ea00000f b 445c <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 441c: e5943080 ldr r3, [r4, #128] ; 0x80 4420: e1560003 cmp r6, r3 nToSend = tty->rawOutBuf.Size - newTail; 4424: 85945088 ldrhi r5, [r4, #136] ; 0x88 else nToSend = tty->rawOutBuf.Head - newTail; 4428: 95945080 ldrls r5, [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)) { 442c: e59430b8 ldr r3, [r4, #184] ; 0xb8 * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) nToSend = tty->rawOutBuf.Size - newTail; else nToSend = tty->rawOutBuf.Head - newTail; 4430: e0665005 rsb r5, r6, r5 /* 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)) { 4434: e3130c06 tst r3, #1536 ; 0x600 nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)( 4438: e594107c ldr r1, [r4, #124] ; 0x7c 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; 443c: 13a05001 movne r5, #1 } tty->rawOutBufState = rob_busy; /*apm*/ 4440: e3a03001 mov r3, #1 4444: e5843094 str r3, [r4, #148] ; 0x94 (*tty->device.write)( 4448: e5940010 ldr r0, [r4, #16] 444c: e0811006 add r1, r1, r6 4450: e1a02005 mov r2, r5 4454: e1a0e00f mov lr, pc 4458: e594f0a4 ldr pc, [r4, #164] ; 0xa4 tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 445c: e5846084 str r6, [r4, #132] ; 0x84 4460: ea000000 b 4468 /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); } return 0; 4464: e3a05000 mov r5, #0 tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 4468: e1a00005 mov r0, r5 446c: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== 00003ba4 : rtems_status_code rtems_termios_write (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 3ba4: e5903000 ldr r3, [r0] rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 3ba8: e92d41f0 push {r4, r5, r6, r7, r8, lr} rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 3bac: e5935034 ldr r5, [r3, #52] ; 0x34 rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 3bb0: e3a01000 mov r1, #0 rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 3bb4: e1a04000 mov r4, r0 rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 3bb8: e1a02001 mov r2, r1 3bbc: e5950018 ldr r0, [r5, #24] 3bc0: eb0004ad bl 4e7c if (sc != RTEMS_SUCCESSFUL) 3bc4: e2506000 subs r6, r0, #0 3bc8: 1a000020 bne 3c50 return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 3bcc: e59520cc ldr r2, [r5, #204] ; 0xcc 3bd0: e59f3080 ldr r3, [pc, #128] ; 3c58 3bd4: e0833282 add r3, r3, r2, lsl #5 3bd8: e593300c ldr r3, [r3, #12] 3bdc: e3530000 cmp r3, #0 3be0: 0a000005 beq 3bfc sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 3be4: e1a00005 mov r0, r5 3be8: e1a01004 mov r1, r4 3bec: e1a0e00f mov lr, pc 3bf0: e12fff13 bx r3 3bf4: e1a06000 mov r6, r0 3bf8: ea000012 b 3c48 rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { 3bfc: e5953034 ldr r3, [r5, #52] ; 0x34 3c00: e3130001 tst r3, #1 uint32_t count = args->count; 3c04: 15947010 ldrne r7, [r4, #16] char *buffer = args->buffer; 3c08: 1594800c ldrne r8, [r4, #12] if (rtems_termios_linesw[tty->t_line].l_write != NULL) { sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { 3c0c: 1a000004 bne 3c24 3c10: ea000006 b 3c30 <== NOT EXECUTED uint32_t count = args->count; char *buffer = args->buffer; while (count--) oproc (*buffer++, tty); 3c14: e4d80001 ldrb r0, [r8], #1 3c18: e1a01005 mov r1, r5 3c1c: ebfffe7c bl 3614 3c20: e2477001 sub r7, r7, #1 return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 3c24: e3570000 cmp r7, #0 3c28: 1afffff9 bne 3c14 3c2c: ea000003 b 3c40 oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); 3c30: e284000c add r0, r4, #12 <== NOT EXECUTED 3c34: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED 3c38: e1a02005 mov r2, r5 <== NOT EXECUTED 3c3c: ebfffe34 bl 3514 <== NOT EXECUTED args->bytes_moved = args->count; 3c40: e5943010 ldr r3, [r4, #16] 3c44: e5843018 str r3, [r4, #24] } rtems_semaphore_release (tty->osem); 3c48: e5950018 ldr r0, [r5, #24] 3c4c: eb0004d0 bl 4f94 return sc; } 3c50: e1a00006 mov r0, r6 3c54: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} =============================================================================== 000061e4 : { int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) { 61e4: e3100202 tst r0, #536870912 ; 0x20000000 static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 61e8: e92d41f0 push {r4, r5, r6, r7, r8, lr} 61ec: e1a05000 mov r5, r0 61f0: e1a08001 mov r8, r1 61f4: e1a04002 mov r4, r2 int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) { 61f8: 0a00000e beq 6238 if (rtems_panic_in_progress++) 61fc: e59f212c ldr r2, [pc, #300] ; 6330 6200: e5923000 ldr r3, [r2] 6204: e2831001 add r1, r3, #1 6208: e3530000 cmp r3, #0 620c: e5821000 str r1, [r2] 6210: 0a000003 beq 6224 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 6214: e59f3118 ldr r3, [pc, #280] ; 6334 <== NOT EXECUTED 6218: e5932000 ldr r2, [r3] <== NOT EXECUTED 621c: e2822001 add r2, r2, #1 <== NOT EXECUTED 6220: e5832000 str r2, [r3] <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 6224: e59f3104 ldr r3, [pc, #260] ; 6330 6228: e5933000 ldr r3, [r3] 622c: e3530002 cmp r3, #2 return 0; 6230: c3a04000 movgt r4, #0 if (error_flag & RTEMS_ERROR_PANIC) { if (rtems_panic_in_progress++) _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 6234: ca00003b bgt 6328 return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 6238: e59f30f8 ldr r3, [pc, #248] ; 6338 623c: e5933000 ldr r3, [r3] 6240: e5930008 ldr r0, [r3, #8] 6244: eb002f6d bl 12000 status = error_flag & ~RTEMS_ERROR_MASK; 6248: e3c56207 bic r6, r5, #1879048192 ; 0x70000000 if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 624c: e2155101 ands r5, r5, #1073741824 ; 0x40000000 6250: 0a000001 beq 625c local_errno = errno; 6254: eb002e72 bl 11c24 <__errno> 6258: e5905000 ldr r5, [r0] #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); 625c: e59f70d4 ldr r7, [pc, #212] ; 6338 6260: e5973000 ldr r3, [r7] 6264: e1a02004 mov r2, r4 6268: e593000c ldr r0, [r3, #12] 626c: e1a01008 mov r1, r8 6270: eb0047d4 bl 181c8 if (status) 6274: e3560000 cmp r6, #0 #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); 6278: e1a04000 mov r4, r0 if (status) 627c: 0a000008 beq 62a4 chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 6280: e5973000 ldr r3, [r7] 6284: e1a00006 mov r0, r6 6288: e593700c ldr r7, [r3, #12] 628c: ebffffd0 bl 61d4 6290: e59f10a4 ldr r1, [pc, #164] ; 633c 6294: e1a02000 mov r2, r0 6298: e1a00007 mov r0, r7 629c: eb00303d bl 12398 #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += 62a0: e0844000 add r4, r4, r0 fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { 62a4: e3550000 cmp r5, #0 62a8: 0a000015 beq 6304 if ((local_errno > 0) && *strerror(local_errno)) 62ac: da00000d ble 62e8 62b0: e1a00005 mov r0, r5 62b4: eb00333a bl 12fa4 62b8: e5d03000 ldrb r3, [r0] 62bc: e3530000 cmp r3, #0 62c0: 0a000008 beq 62e8 chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 62c4: e59f306c ldr r3, [pc, #108] ; 6338 62c8: e5933000 ldr r3, [r3] 62cc: e1a00005 mov r0, r5 62d0: e593600c ldr r6, [r3, #12] 62d4: eb003332 bl 12fa4 62d8: e59f1060 ldr r1, [pc, #96] ; 6340 62dc: e1a02000 mov r2, r0 62e0: e1a00006 mov r0, r6 62e4: ea000004 b 62fc else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 62e8: e59f3048 ldr r3, [pc, #72] ; 6338 62ec: e5933000 ldr r3, [r3] 62f0: e59f104c ldr r1, [pc, #76] ; 6344 62f4: e593000c ldr r0, [r3, #12] 62f8: e1a02005 mov r2, r5 62fc: eb003025 bl 12398 6300: e0844000 add r4, r4, r0 } chars_written += fprintf(stderr, "\n"); 6304: e59f502c ldr r5, [pc, #44] ; 6338 6308: e5953000 ldr r3, [r5] 630c: e59f1034 ldr r1, [pc, #52] ; 6348 6310: e593000c ldr r0, [r3, #12] 6314: eb00301f bl 12398 (void) fflush(stderr); 6318: 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"); 631c: e0804004 add r4, r0, r4 (void) fflush(stderr); 6320: e593000c ldr r0, [r3, #12] 6324: eb002f35 bl 12000 return chars_written; } 6328: e1a00004 mov r0, r4 632c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} =============================================================================== 000023a8 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 23a8: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} int c; unsigned int i = 0; unsigned int limit = INT_MAX; int sign = 0; 23ac: e3a04000 mov r4, #0 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 23b0: e58d1000 str r1, [sp] unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 23b4: e59fb0d4 ldr fp, [pc, #212] ; 2490 limit++; continue; } sign = 1; } if (!isdigit(c)) 23b8: e59f90d4 ldr r9, [pc, #212] ; 2494 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 23bc: e1a05000 mov r5, r0 int c; unsigned int i = 0; unsigned int limit = INT_MAX; 23c0: e3e08102 mvn r8, #-2147483648 ; 0x80000000 */ static int scanInt(FILE *fp, int *val) { int c; unsigned int i = 0; 23c4: e1a07004 mov r7, r4 sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) 23c8: e3a0a00a mov sl, #10 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 23cc: e5953004 ldr r3, [r5, #4] 23d0: e2433001 sub r3, r3, #1 23d4: e3530000 cmp r3, #0 23d8: e5853004 str r3, [r5, #4] 23dc: a5953000 ldrge r3, [r5] 23e0: a4d36001 ldrbge r6, [r3], #1 23e4: a5853000 strge r3, [r5] 23e8: aa000003 bge 23fc 23ec: e59b0000 ldr r0, [fp] <== NOT EXECUTED 23f0: e1a01005 mov r1, r5 <== NOT EXECUTED 23f4: eb003498 bl f65c <__srget_r> <== NOT EXECUTED 23f8: e1a06000 mov r6, r0 <== NOT EXECUTED if (c == ':') 23fc: e356003a cmp r6, #58 ; 0x3a 2400: 0a000019 beq 246c break; if (sign == 0) { 2404: e3540000 cmp r4, #0 2408: 1a000004 bne 2420 if (c == '-') { 240c: e356002d cmp r6, #45 ; 0x2d sign = -1; limit++; 2410: 02888001 addeq r8, r8, #1 c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { sign = -1; 2414: 03e04000 mvneq r4, #0 for (;;) { c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { 2418: 0affffeb beq 23cc sign = -1; limit++; continue; } sign = 1; 241c: e3a04001 mov r4, #1 } if (!isdigit(c)) 2420: e5993000 ldr r3, [r9] 2424: e0833006 add r3, r3, r6 2428: e5d30001 ldrb r0, [r3, #1] 242c: e2100004 ands r0, r0, #4 2430: 0a000015 beq 248c return 0; d = c - '0'; if ((i > (limit / 10)) 2434: e1a00008 mov r0, r8 2438: e3a0100a mov r1, #10 243c: eb003d90 bl 11a84 <__aeabi_uidiv> 2440: e1570000 cmp r7, r0 2444: 8a00000f bhi 2488 } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; 2448: e2466030 sub r6, r6, #48 ; 0x30 if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) 244c: 1a000004 bne 2464 2450: e1a00008 mov r0, r8 2454: e3a0100a mov r1, #10 2458: eb003e21 bl 11ce4 <__umodsi3> 245c: e1560000 cmp r6, r0 2460: 8a000008 bhi 2488 return 0; i = i * 10 + d; 2464: e027679a mla r7, sl, r7, r6 2468: eaffffd7 b 23cc } if (sign == 0) 246c: e3540000 cmp r4, #0 return 0; 2470: 01a00004 moveq r0, r4 *val = i * sign; 2474: 10040497 mulne r4, r7, r4 2478: 159d3000 ldrne r3, [sp] return 1; 247c: 13a00001 movne r0, #1 return 0; i = i * 10 + d; } if (sign == 0) return 0; *val = i * sign; 2480: 15834000 strne r4, [r3] return 1; 2484: ea000000 b 248c if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; 2488: e3a00000 mov r0, #0 } if (sign == 0) return 0; *val = i * sign; return 1; } 248c: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 00005744 : struct sigaction *oact ) { ISR_Level level; if ( oact ) 5744: e2523000 subs r3, r2, #0 *oact = _POSIX_signals_Vectors[ sig ]; 5748: 159f20b8 ldrne r2, [pc, #184] ; 5808 int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { 574c: e92d40f0 push {r4, r5, r6, r7, lr} 5750: e1a05001 mov r5, r1 ISR_Level level; if ( oact ) *oact = _POSIX_signals_Vectors[ sig ]; 5754: 13a0100c movne r1, #12 5758: 10222091 mlane r2, r1, r0, r2 int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { 575c: e1a04000 mov r4, r0 ISR_Level level; if ( oact ) *oact = _POSIX_signals_Vectors[ sig ]; 5760: 18920007 ldmne r2, {r0, r1, r2} 5764: 18830007 stmne r3, {r0, r1, r2} if ( !sig ) 5768: e3540000 cmp r4, #0 576c: 0a000004 beq 5784 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 5770: e2443001 sub r3, r4, #1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 5774: e353001f cmp r3, #31 5778: 8a000001 bhi 5784 * * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) 577c: e3540009 cmp r4, #9 5780: 1a000004 bne 5798 rtems_set_errno_and_return_minus_one( EINVAL ); 5784: eb002156 bl dce4 <__errno> 5788: e3a03016 mov r3, #22 578c: e5803000 str r3, [r0] 5790: e3e00000 mvn r0, #0 5794: e8bd80f0 pop {r4, r5, r6, r7, pc} /* * Evaluate the new action structure and set the global signal vector * appropriately. */ if ( act ) { 5798: e3550000 cmp r5, #0 579c: 0a000017 beq 5800 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 57a0: e10f6000 mrs r6, CPSR 57a4: e3863080 orr r3, r6, #128 ; 0x80 57a8: 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 ) { 57ac: e5953008 ldr r3, [r5, #8] 57b0: e3530000 cmp r3, #0 57b4: e59f704c ldr r7, [pc, #76] ; 5808 57b8: 1a000007 bne 57dc _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; 57bc: e283300c add r3, r3, #12 57c0: e0040493 mul r4, r3, r4 57c4: e59f2040 ldr r2, [pc, #64] ; 580c 57c8: e0873004 add r3, r7, r4 57cc: e0824004 add r4, r2, r4 57d0: e8940007 ldm r4, {r0, r1, r2} 57d4: e8830007 stm r3, {r0, r1, r2} 57d8: ea000005 b 57f4 } else { _POSIX_signals_Clear_process_signals( sig ); 57dc: e1a00004 mov r0, r4 57e0: eb0015b2 bl aeb0 <_POSIX_signals_Clear_process_signals> _POSIX_signals_Vectors[ sig ] = *act; 57e4: e3a0300c mov r3, #12 57e8: e0247493 mla r4, r3, r4, r7 57ec: e8950007 ldm r5, {r0, r1, r2} 57f0: e8840007 stm r4, {r0, r1, r2} static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 57f4: 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; 57f8: e3a00000 mov r0, #0 57fc: e8bd80f0 pop {r4, r5, r6, r7, pc} 5800: e1a00005 mov r0, r5 <== NOT EXECUTED } 5804: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED =============================================================================== 00007dac : int sigwait( const sigset_t *set, int *sig ) { 7dac: e92d4010 push {r4, lr} 7db0: e1a04001 mov r4, r1 int status; status = sigtimedwait( set, NULL, NULL ); 7db4: e3a01000 mov r1, #0 7db8: e1a02001 mov r2, r1 7dbc: ebffff84 bl 7bd4 if ( status != -1 ) { 7dc0: e3700001 cmn r0, #1 7dc4: 0a000004 beq 7ddc if ( sig ) 7dc8: e3540000 cmp r4, #0 *sig = status; 7dcc: 15840000 strne r0, [r4] return 0; 7dd0: 13a00000 movne r0, #0 int status; status = sigtimedwait( set, NULL, NULL ); if ( status != -1 ) { if ( sig ) 7dd4: 18bd8010 popne {r4, pc} 7dd8: ea000002 b 7de8 <== NOT EXECUTED *sig = status; return 0; } return errno; 7ddc: eb002084 bl fff4 <__errno> 7de0: e5900000 ldr r0, [r0] 7de4: e8bd8010 pop {r4, pc} status = sigtimedwait( set, NULL, NULL ); if ( status != -1 ) { if ( sig ) *sig = status; return 0; 7de8: e1a00004 mov r0, r4 <== NOT EXECUTED } return errno; } 7dec: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== 00003b48 : int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 3b48: e591203c ldr r2, [r1, #60] ; 0x3c 3b4c: e59f304c ldr r3, [pc, #76] ; 3ba0 3b50: e0023003 and r3, r2, r3 3b54: e3530000 cmp r3, #0 /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 3b58: e92d4030 push {r4, r5, lr} 3b5c: e1a04001 mov r4, r1 3b60: 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)) { 3b64: 0a00000b beq 3b98 rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 3b68: e5910018 ldr r0, [r1, #24] 3b6c: e3a01000 mov r1, #0 3b70: e1a02001 mov r2, r1 3b74: eb0004c0 bl 4e7c i = iproc (c, tty); 3b78: e1a01004 mov r1, r4 3b7c: e1a00005 mov r0, r5 3b80: ebffff8b bl 39b4 3b84: e1a05000 mov r5, r0 rtems_semaphore_release (tty->osem); 3b88: e5940018 ldr r0, [r4, #24] 3b8c: eb000500 bl 4f94 } else { i = iproc (c, tty); } return i; } 3b90: e1a00005 mov r0, r5 3b94: e8bd8030 pop {r4, r5, pc} 3b98: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); i = iproc (c, tty); rtems_semaphore_release (tty->osem); } else { i = iproc (c, tty); 3b9c: eaffff84 b 39b4 <== NOT EXECUTED =============================================================================== 00005824 : */ int unmount( const char *path ) { 5824: e92d4070 push {r4, r5, r6, lr} 5828: e24dd018 sub sp, sp, #24 582c: 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 ) ) 5830: eb0025cb bl ef64 5834: e28d4004 add r4, sp, #4 5838: e3a03001 mov r3, #1 583c: e1a01000 mov r1, r0 5840: e58d3000 str r3, [sp] 5844: e1a00005 mov r0, r5 5848: e3a02000 mov r2, #0 584c: e1a03004 mov r3, r4 5850: ebfff475 bl 2a2c 5854: e3500000 cmp r0, #0 5858: 1a000040 bne 5960 return -1; mt_entry = loc.mt_entry; 585c: 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 ){ 5860: e59d3004 ldr r3, [sp, #4] 5864: e595201c ldr r2, [r5, #28] 5868: e1520003 cmp r2, r3 586c: 0a000004 beq 5884 rtems_filesystem_freenode( &loc ); 5870: e1a00004 mov r0, r4 5874: ebfff49c bl 2aec rtems_set_errno_and_return_minus_one( EACCES ); 5878: eb002041 bl d984 <__errno> 587c: e3a0300d mov r3, #13 5880: ea000011 b 58cc /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 5884: e1a00004 mov r0, r4 5888: ebfff497 bl 2aec * 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 ) 588c: e59f30d8 ldr r3, [pc, #216] ; 596c 5890: e5933000 ldr r3, [r3] 5894: e5933014 ldr r3, [r3, #20] 5898: e1530005 cmp r3, r5 589c: 0a000008 beq 58c4 /* * Verify there are no file systems below the path specified */ if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point, 58a0: e59f00c8 ldr r0, [pc, #200] ; 5970 58a4: e595102c ldr r1, [r5, #44] ; 0x2c 58a8: ebfff6b1 bl 3374 58ac: e3500000 cmp r0, #0 58b0: 1a000003 bne 58c4 * 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 ) 58b4: e1a00005 mov r0, r5 58b8: ebfff566 bl 2e58 58bc: e3500001 cmp r0, #1 58c0: 1a000003 bne 58d4 rtems_set_errno_and_return_minus_one( EBUSY ); 58c4: eb00202e bl d984 <__errno> 58c8: e3a03010 mov r3, #16 58cc: e5803000 str r3, [r0] 58d0: ea000022 b 5960 * 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 ) 58d4: e5953014 ldr r3, [r5, #20] 58d8: e1a00005 mov r0, r5 58dc: e1a0e00f mov lr, pc 58e0: e593f028 ldr pc, [r3, #40] ; 0x28 58e4: e2506000 subs r6, r0, #0 58e8: 1a00001c bne 5960 * 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){ 58ec: e5953028 ldr r3, [r5, #40] ; 0x28 58f0: e1a00005 mov r0, r5 58f4: e1a0e00f mov lr, pc 58f8: e593f02c ldr pc, [r3, #44] ; 0x2c 58fc: e2504000 subs r4, r0, #0 5900: 0a000007 beq 5924 if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) 5904: e5953014 ldr r3, [r5, #20] 5908: e1a00005 mov r0, r5 <== NOT EXECUTED 590c: e1a0e00f mov lr, pc <== NOT EXECUTED 5910: e593f020 ldr pc, [r3, #32] <== NOT EXECUTED 5914: e3500000 cmp r0, #0 <== NOT EXECUTED 5918: 0a000010 beq 5960 <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 591c: e1a00006 mov r0, r6 <== NOT EXECUTED 5920: eb0003cb bl 6854 <== NOT EXECUTED rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 5924: e59f6048 ldr r6, [pc, #72] ; 5974 5928: e1a01004 mov r1, r4 592c: e1a02004 mov r2, r4 5930: e5960000 ldr r0, [r6] 5934: eb000242 bl 6244 */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 5938: e1a00005 mov r0, r5 593c: eb00048c bl 6b74 <_Chain_Extract> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 5940: e5960000 ldr r0, [r6] 5944: eb000284 bl 635c /* * 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 ); 5948: e2850008 add r0, r5, #8 594c: ebfff466 bl 2aec free( mt_entry ); 5950: e1a00005 mov r0, r5 5954: ebfff469 bl 2b00 return 0; 5958: e1a00004 mov r0, r4 595c: ea000000 b 5964 */ 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; 5960: e3e00000 mvn r0, #0 rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 5964: e28dd018 add sp, sp, #24 5968: e8bd8070 pop {r4, r5, r6, pc}