=============================================================================== 00009848 : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 9848: e5903000 ldr r3, [r0] 984c: e593304c ldr r3, [r3, #76] ; 0x4c ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 9850: e5902010 ldr r2, [r0, #16] switch( node->type ) { 9854: e2433001 sub r3, r3, #1 ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 9858: e5922034 ldr r2, [r2, #52] ; 0x34 switch( node->type ) { 985c: e3530006 cmp r3, #6 9860: 979ff103 ldrls pc, [pc, r3, lsl #2] 9864: ea000008 b 988c <== NOT EXECUTED 9868: 000098b4 .word 0x000098b4 <== NOT EXECUTED 986c: 000098c4 .word 0x000098c4 <== NOT EXECUTED 9870: 000098a4 .word 0x000098a4 <== NOT EXECUTED 9874: 000098a4 .word 0x000098a4 <== NOT EXECUTED 9878: 00009894 .word 0x00009894 <== NOT EXECUTED 987c: 00009894 .word 0x00009894 <== NOT EXECUTED 9880: 00009884 .word 0x00009884 <== NOT EXECUTED break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_FIFO: loc->handlers = fs_info->fifo_handlers; 9884: e5923010 ldr r3, [r2, #16] 9888: e5803008 str r3, [r0, #8] break; } return 0; } 988c: e3a00000 mov r0, #0 9890: e12fff1e bx lr break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 9894: e5923008 ldr r3, [r2, #8] 9898: e5803008 str r3, [r0, #8] loc->handlers = fs_info->fifo_handlers; break; } return 0; } 989c: e3a00000 mov r0, #0 98a0: e12fff1e bx lr case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 98a4: e59f3028 ldr r3, [pc, #40] ; 98d4 98a8: e5803008 str r3, [r0, #8] loc->handlers = fs_info->fifo_handlers; break; } return 0; } 98ac: e3a00000 mov r0, #0 98b0: e12fff1e bx lr IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 98b4: e592300c ldr r3, [r2, #12] 98b8: e5803008 str r3, [r0, #8] loc->handlers = fs_info->fifo_handlers; break; } return 0; } 98bc: e3a00000 mov r0, #0 98c0: e12fff1e bx lr switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 98c4: e59f300c ldr r3, [pc, #12] ; 98d8 98c8: e5803008 str r3, [r0, #8] loc->handlers = fs_info->fifo_handlers; break; } return 0; } 98cc: e3a00000 mov r0, #0 98d0: e12fff1e bx lr =============================================================================== 00009990 : const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 9990: 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 ) ) { 9994: e3d25007 bics r5, r2, #7 const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 9998: e24dd040 sub sp, sp, #64 ; 0x40 999c: e58d2000 str r2, [sp] 99a0: e1a0a000 mov sl, r0 99a4: e1a04001 mov r4, r1 99a8: e1a07003 mov r7, r3 char token[ IMFS_NAME_MAX + 1 ]; rtems_filesystem_location_info_t newloc; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { 99ac: 1a000081 bne 9bb8 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 99b0: e5936000 ldr r6, [r3] 99b4: e28d8004 add r8, sp, #4 99b8: e28d903c add r9, sp, #60 ; 0x3c * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 99bc: e1a02008 mov r2, r8 99c0: e1a03009 mov r3, r9 99c4: e08a0005 add r0, sl, r5 99c8: e1a01004 mov r1, r4 99cc: eb0001df bl a150 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 99d0: e5973000 ldr r3, [r7] 99d4: 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 ); 99d8: e1a0b000 mov fp, r0 pathnamelen -= len; 99dc: e59d203c ldr r2, [sp, #60] ; 0x3c i += len; if ( !pathloc->node_access ) 99e0: 0a00004e beq 9b20 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 99e4: e3500000 cmp r0, #0 */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 99e8: e0624004 rsb r4, r2, r4 i += len; 99ec: e0855002 add r5, r5, r2 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 99f0: 1a00000f bne 9a34 * 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 ) { 99f4: e593204c ldr r2, [r3, #76] ; 0x4c 99f8: e3520001 cmp r2, #1 99fc: 0a000068 beq 9ba4 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 9a00: e1a00007 mov r0, r7 9a04: ebffff8f bl 9848 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 9a08: e59d1000 ldr r1, [sp] flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 9a0c: e1a06000 mov r6, r0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 9a10: e1a00007 mov r0, r7 9a14: ebffffb0 bl 98dc 9a18: e3500000 cmp r0, #0 9a1c: 1a000036 bne 9afc rtems_set_errno_and_return_minus_one( EACCES ); 9a20: eb00116a bl dfd0 <__errno> 9a24: e3a0300d mov r3, #13 9a28: e5803000 str r3, [r0] 9a2c: e3e06000 mvn r6, #0 9a30: ea000031 b 9afc /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 9a34: e596104c ldr r1, [r6, #76] ; 0x4c 9a38: e3510001 cmp r1, #1 9a3c: 0a000031 beq 9b08 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 9a40: e35b0003 cmp fp, #3 if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 9a44: e1a06003 mov r6, r3 switch( type ) { 9a48: 0a000006 beq 9a68 9a4c: e35b0004 cmp fp, #4 9a50: 0a000025 beq 9aec 9a54: e35b0002 cmp fp, #2 9a58: 0a000013 beq 9aac /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 9a5c: e35b0004 cmp fp, #4 9a60: 1affffd5 bne 99bc 9a64: eaffffe2 b 99f4 <== NOT EXECUTED case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 9a68: e593304c ldr r3, [r3, #76] ; 0x4c 9a6c: e3530003 cmp r3, #3 9a70: 0a00002f beq 9b34 * It would be a design error if we evaluated the link and * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { 9a74: e3530004 cmp r3, #4 9a78: 0a000058 beq 9be0 } /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 9a7c: e3530001 cmp r3, #1 9a80: 1a000051 bne 9bcc /* * 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 ) { 9a84: e596e05c ldr lr, [r6, #92] ; 0x5c 9a88: e35e0000 cmp lr, #0 9a8c: 1a000047 bne 9bb0 } /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 9a90: e1a00006 mov r0, r6 9a94: e1a01008 mov r1, r8 9a98: eb00018b bl a0cc if ( !node ) 9a9c: e2506000 subs r6, r0, #0 9aa0: 0a00001e beq 9b20 /* * Set the node access to the point we have found. */ pathloc->node_access = node; 9aa4: e5876000 str r6, [r7] 9aa8: eaffffc3 b 99bc case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 9aac: e59f1154 ldr r1, [pc, #340] ; 9c08 9ab0: e5912000 ldr r2, [r1] 9ab4: e5922018 ldr r2, [r2, #24] 9ab8: e1520003 cmp r2, r3 9abc: 0affffbe beq 99bc /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 9ac0: e597e010 ldr lr, [r7, #16] /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 9ac4: e59e201c ldr r2, [lr, #28] 9ac8: e1520003 cmp r2, r3 9acc: 0a00001e beq 9b4c pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 9ad0: e5936008 ldr r6, [r3, #8] 9ad4: e3560000 cmp r6, #0 9ad8: 1afffff1 bne 9aa4 rtems_set_errno_and_return_minus_one( ENOENT ); 9adc: eb00113b bl dfd0 <__errno> 9ae0: e3e06000 mvn r6, #0 9ae4: e580b000 str fp, [r0] 9ae8: ea000003 b 9afc case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 9aec: eb001137 bl dfd0 <__errno> 9af0: e3a0305b mov r3, #91 ; 0x5b 9af4: e5803000 str r3, [r0] 9af8: e3e06000 mvn r6, #0 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 9afc: e1a00006 mov r0, r6 9b00: e28dd040 add sp, sp, #64 ; 0x40 9b04: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 9b08: e1a00007 mov r0, r7 9b0c: ebffff72 bl 98dc 9b10: e3500000 cmp r0, #0 9b14: 0affffc1 beq 9a20 9b18: e5973000 ldr r3, [r7] 9b1c: eaffffc7 b 9a40 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); if ( !node ) rtems_set_errno_and_return_minus_one( ENOENT ); 9b20: eb00112a bl dfd0 <__errno> 9b24: e3a03002 mov r3, #2 9b28: e5803000 str r3, [r0] 9b2c: e3e06000 mvn r6, #0 9b30: eafffff1 b 9afc case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { IMFS_evaluate_hard_link( pathloc, 0 ); 9b34: e1a00007 mov r0, r7 9b38: e3a01000 mov r1, #0 9b3c: ebffff80 bl 9944 node = pathloc->node_access; 9b40: e5976000 ldr r6, [r7] 9b44: e596304c ldr r3, [r6, #76] ; 0x4c 9b48: eaffffcb b 9a7c */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 9b4c: e28ee008 add lr, lr, #8 * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; 9b50: e8be000f ldm lr!, {r0, r1, r2, r3} 9b54: e28d6028 add r6, sp, #40 ; 0x28 9b58: e8a6000f stmia r6!, {r0, r1, r2, r3} *pathloc = newloc; 9b5c: e28dc028 add ip, sp, #40 ; 0x28 9b60: e8bc000f ldm ip!, {r0, r1, r2, r3} * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; 9b64: e59ec000 ldr ip, [lr] *pathloc = newloc; 9b68: e1a0e007 mov lr, r7 9b6c: e8ae000f stmia lr!, {r0, r1, r2, r3} return (*pathloc->ops->evalpath_h)( &pathname[i-len], 9b70: e59d103c ldr r1, [sp, #60] ; 0x3c */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 9b74: e58ec000 str ip, [lr] return (*pathloc->ops->evalpath_h)( &pathname[i-len], 9b78: e0610005 rsb r0, r1, r5 * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; 9b7c: e586c000 str ip, [r6] *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], 9b80: e08a0000 add r0, sl, r0 9b84: e597c00c ldr ip, [r7, #12] 9b88: e0841001 add r1, r4, r1 9b8c: e59d2000 ldr r2, [sp] 9b90: e1a03007 mov r3, r7 9b94: e1a0e00f mov lr, pc 9b98: e59cf000 ldr pc, [ip] 9b9c: e1a06000 mov r6, r0 9ba0: eaffffd5 b 9afc * * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { 9ba4: e593e05c ldr lr, [r3, #92] ; 0x5c 9ba8: e35e0000 cmp lr, #0 9bac: 0affff93 beq 9a00 newloc = node->info.directory.mt_fs->mt_fs_root; 9bb0: e28ee01c add lr, lr, #28 9bb4: eaffffe5 b 9b50 rtems_filesystem_location_info_t newloc; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { rtems_set_errno_and_return_minus_one( EIO ); 9bb8: eb001104 bl dfd0 <__errno> <== NOT EXECUTED 9bbc: e3a03005 mov r3, #5 <== NOT EXECUTED 9bc0: e5803000 str r3, [r0] <== NOT EXECUTED 9bc4: e3e06000 mvn r6, #0 <== NOT EXECUTED 9bc8: eaffffcb b 9afc <== NOT EXECUTED /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 9bcc: eb0010ff bl dfd0 <__errno> 9bd0: e3a03014 mov r3, #20 9bd4: e5803000 str r3, [r0] 9bd8: e3e06000 mvn r6, #0 9bdc: eaffffc6 b 9afc * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); 9be0: e1a00007 mov r0, r7 9be4: e3a01000 mov r1, #0 9be8: eb000007 bl 9c0c /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; if ( result == -1 ) 9bec: e3700001 cmn r0, #1 * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); 9bf0: e1a06000 mov r6, r0 /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; 9bf4: e5973000 ldr r3, [r7] if ( result == -1 ) 9bf8: 0affffbf beq 9afc /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; 9bfc: e1a06003 mov r6, r3 9c00: e593304c ldr r3, [r3, #76] ; 0x4c 9c04: eaffff9c b 9a7c =============================================================================== 00009d74 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 9d74: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 9d78: e24dd040 sub sp, sp, #64 ; 0x40 9d7c: e1a06001 mov r6, r1 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 9d80: e5915000 ldr r5, [r1] int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 9d84: e1a0a000 mov sl, r0 9d88: e58d2000 str r2, [sp] node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 9d8c: eb001479 bl ef78 const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { int i = 0; 9d90: e3a07000 mov r7, #0 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 9d94: e1a04000 mov r4, r0 9d98: e28d8004 add r8, sp, #4 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 9d9c: e1a01004 mov r1, r4 9da0: e28d303c add r3, sp, #60 ; 0x3c 9da4: e08a0007 add r0, sl, r7 9da8: e1a02008 mov r2, r8 9dac: eb0000e7 bl a150 pathlen -= len; i += len; if ( !pathloc->node_access ) 9db0: e5963000 ldr r3, [r6] */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; 9db4: e59db03c ldr fp, [sp, #60] ; 0x3c i += len; if ( !pathloc->node_access ) 9db8: 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 ); 9dbc: e1a09000 mov r9, r0 pathlen -= len; 9dc0: e06b4004 rsb r4, fp, r4 i += len; if ( !pathloc->node_access ) 9dc4: 0a000035 beq 9ea0 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 9dc8: e3500000 cmp r0, #0 9dcc: 1a000006 bne 9dec pathloc->node_access = node; break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 9dd0: eb00107e bl dfd0 <__errno> 9dd4: e3a03011 mov r3, #17 9dd8: e5803000 str r3, [r0] 9ddc: e3e05000 mvn r5, #0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 9de0: e1a00005 mov r0, r5 9de4: e28dd040 add sp, sp, #64 ; 0x40 9de8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 9dec: e595104c ldr r1, [r5, #76] ; 0x4c 9df0: e3510001 cmp r1, #1 9df4: 0a000044 beq 9f0c while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; 9df8: 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; 9dfc: e1a05003 mov r5, r3 switch( type ) { 9e00: e3590004 cmp r9, #4 9e04: 979ff109 ldrls pc, [pc, r9, lsl #2] 9e08: eaffffe3 b 9d9c <== NOT EXECUTED 9e0c: 00009dd0 .word 0x00009dd0 <== NOT EXECUTED 9e10: 00009d9c .word 0x00009d9c <== NOT EXECUTED 9e14: 00009e70 .word 0x00009e70 <== NOT EXECUTED 9e18: 00009e20 .word 0x00009e20 <== NOT EXECUTED 9e1c: 00009eb4 .word 0x00009eb4 <== NOT EXECUTED pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 9e20: e593304c ldr r3, [r3, #76] ; 0x4c 9e24: e3530003 cmp r3, #3 9e28: 0a00006a beq 9fd8 result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 9e2c: e3530004 cmp r3, #4 9e30: 0a000068 beq 9fd8 if ( result == -1 ) return -1; } node = pathloc->node_access; if ( !node ) 9e34: e3550000 cmp r5, #0 9e38: 0a00005f beq 9fbc /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 9e3c: e595304c ldr r3, [r5, #76] ; 0x4c 9e40: e3530001 cmp r3, #1 9e44: 1a00005c bne 9fbc /* * 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 ) { 9e48: e595c05c ldr ip, [r5, #92] ; 0x5c 9e4c: e35c0000 cmp ip, #0 9e50: 1a00005e bne 9fd0 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 9e54: e1a00005 mov r0, r5 9e58: e1a01008 mov r1, r8 9e5c: eb00009a bl a0cc /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 9e60: e2505000 subs r5, r0, #0 9e64: 0a000017 beq 9ec8 done = true; else pathloc->node_access = node; 9e68: e5865000 str r5, [r6] 9e6c: eaffffca b 9d9c case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 9e70: e59f1180 ldr r1, [pc, #384] ; 9ff8 9e74: e5912000 ldr r2, [r1] 9e78: e5922018 ldr r2, [r2, #24] 9e7c: e1530002 cmp r3, r2 9e80: 0affffc5 beq 9d9c /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 9e84: e596c010 ldr ip, [r6, #16] 9e88: e59c201c ldr r2, [ip, #28] 9e8c: e1530002 cmp r3, r2 9e90: 0a000023 beq 9f24 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 9e94: e5935008 ldr r5, [r3, #8] 9e98: e3550000 cmp r5, #0 9e9c: 1afffff1 bne 9e68 * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { if ( !IMFS_is_separator( path[ i ] ) ) rtems_set_errno_and_return_minus_one( ENOENT ); 9ea0: eb00104a bl dfd0 <__errno> 9ea4: e3a03002 mov r3, #2 9ea8: e5803000 str r3, [r0] 9eac: e3e05000 mvn r5, #0 9eb0: eaffffca b 9de0 case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 9eb4: eb001045 bl dfd0 <__errno> 9eb8: e3a0305b mov r3, #91 ; 0x5b 9ebc: e5803000 str r3, [r0] 9ec0: e3e05000 mvn r5, #0 9ec4: eaffffc5 b 9de0 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 9ec8: e59d303c ldr r3, [sp, #60] ; 0x3c 9ecc: e59d1000 ldr r1, [sp] 9ed0: e0633007 rsb r3, r3, r7 9ed4: e08a3003 add r3, sl, r3 9ed8: e5813000 str r3, [r1] /* * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { 9edc: e7da0007 ldrb r0, [sl, r7] 9ee0: e3500000 cmp r0, #0 9ee4: e08a7007 add r7, sl, r7 9ee8: 1a000003 bne 9efc 9eec: ea000021 b 9f78 9ef0: e5f70001 ldrb r0, [r7, #1]! 9ef4: e3500000 cmp r0, #0 9ef8: 0a00001e beq 9f78 if ( !IMFS_is_separator( path[ i ] ) ) 9efc: ebffe4d0 bl 3244 9f00: e3500000 cmp r0, #0 9f04: 1afffff9 bne 9ef0 9f08: eaffffe4 b 9ea0 * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 9f0c: e1a00006 mov r0, r6 9f10: ebfffe71 bl 98dc 9f14: e3500000 cmp r0, #0 9f18: 0a000022 beq 9fa8 9f1c: e5963000 ldr r3, [r6] 9f20: eaffffb4 b 9df8 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 9f24: e28cc008 add ip, ip, #8 * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; 9f28: e8bc000f ldm ip!, {r0, r1, r2, r3} 9f2c: e28d4028 add r4, sp, #40 ; 0x28 9f30: e8a4000f stmia r4!, {r0, r1, r2, r3} *pathloc = newloc; 9f34: e28de028 add lr, sp, #40 ; 0x28 9f38: e8be000f ldm lr!, {r0, r1, r2, r3} 9f3c: e1a0e006 mov lr, r6 * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; 9f40: e59cc000 ldr ip, [ip] *pathloc = newloc; 9f44: e8ae000f stmia lr!, {r0, r1, r2, r3} return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 9f48: e59d003c ldr r0, [sp, #60] ; 0x3c * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 9f4c: e58ec000 str ip, [lr] return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 9f50: e0600007 rsb r0, r0, r7 * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; 9f54: e584c000 str ip, [r4] *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 9f58: e596300c ldr r3, [r6, #12] 9f5c: e08a0000 add r0, sl, r0 9f60: e1a01006 mov r1, r6 9f64: e59d2000 ldr r2, [sp] 9f68: e1a0e00f mov lr, pc 9f6c: e593f004 ldr pc, [r3, #4] 9f70: e1a05000 mov r5, r0 9f74: eaffff99 b 9de0 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 9f78: e1a00006 mov r0, r6 9f7c: ebfffe31 bl 9848 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 9f80: e5963000 ldr r3, [r6] 9f84: e593304c ldr r3, [r3, #76] ; 0x4c 9f88: e3530001 cmp r3, #1 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 9f8c: e1a05000 mov r5, r0 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 9f90: 1a000009 bne 9fbc /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 9f94: e1a00006 mov r0, r6 9f98: e3a01003 mov r1, #3 9f9c: ebfffe4e bl 98dc 9fa0: e3500000 cmp r0, #0 9fa4: 1affff8d bne 9de0 rtems_set_errno_and_return_minus_one( EACCES ); 9fa8: eb001008 bl dfd0 <__errno> 9fac: e3a0300d mov r3, #13 9fb0: e5803000 str r3, [r0] 9fb4: e3e05000 mvn r5, #0 9fb8: eaffff88 b 9de0 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 9fbc: eb001003 bl dfd0 <__errno> 9fc0: e3a03014 mov r3, #20 9fc4: e5803000 str r3, [r0] 9fc8: e3e05000 mvn r5, #0 9fcc: eaffff83 b 9de0 * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; 9fd0: e28cc01c add ip, ip, #28 9fd4: eaffffd3 b 9f28 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 9fd8: e1a00006 mov r0, r6 9fdc: e3a01000 mov r1, #0 9fe0: ebffff2e bl 9ca0 if ( result == -1 ) 9fe4: e3700001 cmn r0, #1 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 9fe8: e1a05000 mov r5, r0 if ( result == -1 ) 9fec: 0affff7b beq 9de0 9ff0: e5965000 ldr r5, [r6] 9ff4: eaffff8e b 9e34 =============================================================================== 000098dc : uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) 98dc: e3d13007 bics r3, r1, #7 */ int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 98e0: e92d4070 push {r4, r5, r6, lr} 98e4: e1a05001 mov r5, r1 uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) 98e8: 1a000010 bne 9930 rtems_set_errno_and_return_minus_one( EPERM ); jnode = node->node_access; 98ec: e5904000 ldr r4, [r0] #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 98f0: eb000316 bl a550 98f4: e1a06000 mov r6, r0 st_gid = getegid(); 98f8: eb00030f bl a53c * Check if I am owner or a group member or someone else. */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) 98fc: e1d433bc ldrh r3, [r4, #60] ; 0x3c 9900: e1530006 cmp r3, r6 flags_to_test <<= 6; 9904: 01a05305 lsleq r5, r5, #6 * Check if I am owner or a group member or someone else. */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) 9908: 0a000002 beq 9918 flags_to_test <<= 6; else if ( st_gid == jnode->st_gid ) 990c: e1d433be ldrh r3, [r4, #62] ; 0x3e 9910: e1530000 cmp r3, r0 flags_to_test <<= 3; 9914: 01a05185 lsleq r5, r5, #3 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 9918: e5940030 ldr r0, [r4, #48] ; 0x30 991c: e0050000 and r0, r5, r0 gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) rtems_set_errno_and_return_minus_one( EPERM ); 9920: e1550000 cmp r5, r0 9924: 13a00000 movne r0, #0 9928: 03a00001 moveq r0, #1 */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) return 1; return 0; } 992c: e8bd8070 pop {r4, r5, r6, pc} gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) rtems_set_errno_and_return_minus_one( EPERM ); 9930: eb0011a6 bl dfd0 <__errno> <== NOT EXECUTED 9934: e3a03001 mov r3, #1 <== NOT EXECUTED 9938: e5803000 str r3, [r0] <== NOT EXECUTED 993c: e3e00000 mvn r0, #0 <== NOT EXECUTED 9940: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== 00009ffc : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 9ffc: 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; a000: e1a0c000 mov ip, r0 a004: 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 ) { a008: e24dd014 sub sp, sp, #20 a00c: e1a0e000 mov lr, r0 * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; loc = temp_mt_entry->mt_fs_root; a010: e8bc000f ldm ip!, {r0, r1, r2, r3} a014: e1a0600d mov r6, sp a018: e8a6000f stmia r6!, {r0, r1, r2, r3} a01c: e59c2000 ldr r2, [ip] /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; a020: e3a03000 mov r3, #0 * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; loc = temp_mt_entry->mt_fs_root; a024: e5862000 str r2, [r6] /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; a028: e58e301c str r3, [lr, #28] * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; loc = temp_mt_entry->mt_fs_root; a02c: e1a0500d mov r5, sp temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); a030: e1a0000d mov r0, sp */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; a034: e5946008 ldr r6, [r4, #8] loc.node_access = (void *)jnode; a038: e58d4000 str r4, [sp] IMFS_Set_handlers( &loc ); a03c: ebfffe01 bl 9848 if ( jnode->type != IMFS_DIRECTORY ) { a040: e594304c ldr r3, [r4, #76] ; 0x4c a044: e3530001 cmp r3, #1 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); a048: e2842054 add r2, r4, #84 ; 0x54 a04c: 1a000010 bne a094 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { a050: e5943050 ldr r3, [r4, #80] ; 0x50 a054: e1530002 cmp r3, r2 a058: 0a000014 beq a0b0 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } if ( jnode != NULL ) { a05c: e3540000 cmp r4, #0 a060: 0a000008 beq a088 if ( jnode->type == IMFS_DIRECTORY ) { a064: e594304c ldr r3, [r4, #76] ; 0x4c a068: e3530001 cmp r3, #1 a06c: 1affffef bne a030 } } } while (jnode != NULL); return 0; } a070: e5943050 ldr r3, [r4, #80] ; 0x50 a074: e2842054 add r2, r4, #84 ; 0x54 return -1; jnode = next; } if ( jnode != NULL ) { if ( jnode->type == IMFS_DIRECTORY ) { if ( jnode_has_children( jnode ) ) a078: e1530002 cmp r3, r2 a07c: 0affffeb beq a030 jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); a080: e2534000 subs r4, r3, #0 a084: 1affffe9 bne a030 return 0; a088: e1a00004 mov r0, r4 } a08c: e28dd014 add sp, sp, #20 a090: e8bd8070 pop {r4, r5, r6, pc} next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); if ( jnode->type != IMFS_DIRECTORY ) { result = IMFS_unlink( NULL, &loc ); a094: e1a0100d mov r1, sp a098: e3a00000 mov r0, #0 a09c: ebffdf73 bl 1e70 if (result != 0) a0a0: e3500000 cmp r0, #0 a0a4: 1a000006 bne a0c4 jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; a0a8: e1a04006 mov r4, r6 a0ac: eaffffea b a05c result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); a0b0: e3a00000 mov r0, #0 a0b4: e1a0100d mov r1, sp a0b8: ebffdf6c bl 1e70 if (result != 0) a0bc: e3500000 cmp r0, #0 a0c0: 0afffff8 beq a0a8 return -1; a0c4: e3e00000 mvn r0, #0 <== NOT EXECUTED a0c8: eaffffef b a08c <== NOT EXECUTED =============================================================================== 0000c500 : my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { c500: e59f3200 ldr r3, [pc, #512] ; c708 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { c504: 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 ) { c508: e5934000 ldr r4, [r3] c50c: e1a04124 lsr r4, r4, #2 c510: e2443001 sub r3, r4, #1 c514: e1510003 cmp r1, r3 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { c518: e24dd004 sub sp, sp, #4 c51c: e1a05000 mov r5, r0 c520: e1a06002 mov r6, r2 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { c524: 8a000007 bhi c548 p = info->indirect; if ( malloc_it ) { c528: e3520000 cmp r2, #0 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { p = info->indirect; c52c: e5900058 ldr r0, [r0, #88] ; 0x58 if ( malloc_it ) { c530: 0a00001c beq c5a8 if ( !p ) { c534: e3500000 cmp r0, #0 c538: 0a000041 beq c644 } if ( !p ) return 0; return &info->indirect[ my_block ]; c53c: e0800101 add r0, r0, r1, lsl #2 /* * This means the requested block number is out of range. */ return 0; } c540: e28dd004 add sp, sp, #4 c544: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { c548: e0274494 mla r7, r4, r4, r4 c54c: e2473001 sub r3, r7, #1 c550: e1510003 cmp r1, r3 c554: 8a000016 bhi c5b4 my_block -= FIRST_DOUBLY_INDIRECT; c558: e0647001 rsb r7, r4, r1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; c55c: e1a00007 mov r0, r7 c560: e1a01004 mov r1, r4 c564: eb00147d bl 11760 <__umodsi3> doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; c568: e1a01004 mov r1, r4 */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; c56c: e1a08000 mov r8, r0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; c570: e1a00007 mov r0, r7 c574: eb001433 bl 11648 <__aeabi_uidiv> p = info->doubly_indirect; if ( malloc_it ) { c578: e3560000 cmp r6, #0 if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; c57c: e1a04000 mov r4, r0 p = info->doubly_indirect; c580: e595305c ldr r3, [r5, #92] ; 0x5c if ( malloc_it ) { c584: 0a00003f beq c688 if ( !p ) { c588: e3530000 cmp r3, #0 c58c: 0a000045 beq c6a8 if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; c590: e7930104 ldr r0, [r3, r4, lsl #2] if ( !p1 ) { c594: e3500000 cmp r0, #0 if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; c598: e0834104 add r4, r3, r4, lsl #2 if ( !p1 ) { c59c: 0a00002f beq c660 p = (block_p *)p[ doubly ]; if ( !p ) return 0; return (block_p *)&p[ singly ]; c5a0: e0800108 add r0, r0, r8, lsl #2 c5a4: eaffffe5 b c540 info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) c5a8: e3500000 cmp r0, #0 c5ac: 1affffe2 bne c53c c5b0: eaffffe2 b c540 <== NOT EXECUTED } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { c5b4: e0234497 mla r3, r7, r4, r4 c5b8: e2433001 sub r3, r3, #1 c5bc: e1510003 cmp r1, r3 } /* * This means the requested block number is out of range. */ return 0; c5c0: 83a00000 movhi r0, #0 } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { c5c4: 8affffdd bhi c540 my_block -= FIRST_TRIPLY_INDIRECT; c5c8: e0677001 rsb r7, r7, r1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; c5cc: e1a00007 mov r0, r7 c5d0: e1a01004 mov r1, r4 c5d4: eb001461 bl 11760 <__umodsi3> doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; c5d8: e1a01004 mov r1, r4 * 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; c5dc: e1a0a000 mov sl, r0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; c5e0: e1a00007 mov r0, r7 c5e4: eb001417 bl 11648 <__aeabi_uidiv> triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; c5e8: e1a01004 mov r1, r4 */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; c5ec: e1a08000 mov r8, r0 triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; c5f0: eb001414 bl 11648 <__aeabi_uidiv> doubly %= IMFS_MEMFILE_BLOCK_SLOTS; c5f4: e1a01004 mov r1, r4 if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; c5f8: e1a07000 mov r7, r0 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; c5fc: e1a00008 mov r0, r8 c600: eb001456 bl 11760 <__umodsi3> p = info->triply_indirect; if ( malloc_it ) { c604: e3560000 cmp r6, #0 my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; doubly %= IMFS_MEMFILE_BLOCK_SLOTS; c608: e1a04000 mov r4, r0 p = info->triply_indirect; c60c: e5950060 ldr r0, [r5, #96] ; 0x60 if ( malloc_it ) { c610: 0a000029 beq c6bc if ( !p ) { c614: e3500000 cmp r0, #0 c618: 0a000035 beq c6f4 if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; c61c: e7903107 ldr r3, [r0, r7, lsl #2] if ( !p1 ) { c620: e3530000 cmp r3, #0 if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; c624: e0807107 add r7, r0, r7, lsl #2 if ( !p1 ) { c628: 0a00002c beq c6e0 if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; c62c: e7930104 ldr r0, [r3, r4, lsl #2] if ( !p2 ) { c630: e3500000 cmp r0, #0 if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; c634: e0834104 add r4, r3, r4, lsl #2 if ( !p2 ) { c638: 0a00000d beq c674 p2 = (block_p *)p1[ doubly ]; if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; c63c: e080010a add r0, r0, sl, lsl #2 c640: eaffffbe b c540 p = info->indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); c644: e58d1000 str r1, [sp] c648: ebffff9f bl c4cc if ( !p ) c64c: e3500000 cmp r0, #0 c650: e59d1000 ldr r1, [sp] return 0; info->indirect = p; c654: 15850058 strne r0, [r5, #88] ; 0x58 if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); if ( !p ) c658: 1affffb7 bne c53c c65c: eaffffb7 b c540 <== NOT EXECUTED info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); c660: ebffff99 bl c4cc if ( !p1 ) c664: e3500000 cmp r0, #0 return 0; p[ doubly ] = (block_p) p1; c668: 15840000 strne r0, [r4] p = (block_p *)p[ doubly ]; if ( !p ) return 0; return (block_p *)&p[ singly ]; c66c: 10800108 addne r0, r0, r8, lsl #2 c670: eaffffb2 b c540 p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); c674: ebffff94 bl c4cc if ( !p2 ) c678: e3500000 cmp r0, #0 return 0; p1[ doubly ] = (block_p) p2; c67c: 15840000 strne r0, [r4] p2 = (block_p *)p1[ doubly ]; if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; c680: 1080010a addne r0, r0, sl, lsl #2 c684: eaffffad b c540 } return (block_p *)&p1[ singly ]; } if ( !p ) c688: e3530000 cmp r3, #0 c68c: 1a000001 bne c698 p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); if ( !p1 ) return 0; c690: e1a00003 mov r0, r3 <== NOT EXECUTED c694: eaffffa9 b c540 <== NOT EXECUTED } if ( !p ) return 0; p = (block_p *)p[ doubly ]; c698: e7930100 ldr r0, [r3, r0, lsl #2] if ( !p ) c69c: e3500000 cmp r0, #0 return 0; return (block_p *)&p[ singly ]; c6a0: 10800108 addne r0, r0, r8, lsl #2 c6a4: eaffffa5 b c540 p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); c6a8: ebffff87 bl c4cc if ( !p ) c6ac: e2503000 subs r3, r0, #0 c6b0: 0afffff6 beq c690 return 0; info->doubly_indirect = p; c6b4: e585305c str r3, [r5, #92] ; 0x5c c6b8: eaffffb4 b c590 p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) c6bc: e3500000 cmp r0, #0 c6c0: 0affff9e beq c540 return 0; p1 = (block_p *) p[ triply ]; c6c4: e7900107 ldr r0, [r0, r7, lsl #2] if ( !p1 ) c6c8: e3500000 cmp r0, #0 c6cc: 0affff9b beq c540 return 0; p2 = (block_p *)p1[ doubly ]; c6d0: e7900104 ldr r0, [r0, r4, lsl #2] if ( !p2 ) c6d4: e3500000 cmp r0, #0 return 0; return (block_p *)&p2[ singly ]; c6d8: 1080010a addne r0, r0, sl, lsl #2 c6dc: eaffff97 b c540 info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); c6e0: ebffff79 bl c4cc if ( !p1 ) c6e4: e2503000 subs r3, r0, #0 c6e8: 0affffe8 beq c690 return 0; p[ triply ] = (block_p) p1; c6ec: e5873000 str r3, [r7] c6f0: eaffffcd b c62c p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); c6f4: ebffff74 bl c4cc if ( !p ) c6f8: e3500000 cmp r0, #0 c6fc: 0affff8f beq c540 return 0; info->triply_indirect = p; c700: e5850060 str r0, [r5, #96] ; 0x60 c704: eaffffc4 b c61c =============================================================================== 0000c70c : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { c70c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} c710: e1a09000 mov r9, r0 * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; if (the_jnode->type == IMFS_LINEAR_FILE) { c714: e590004c ldr r0, [r0, #76] ; 0x4c IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { c718: e24dd014 sub sp, sp, #20 * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; if (the_jnode->type == IMFS_LINEAR_FILE) { c71c: e3500006 cmp r0, #6 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { c720: e1a07001 mov r7, r1 c724: e1a08002 mov r8, r2 c728: e1a0b003 mov fp, r3 c72c: e59d5038 ldr r5, [sp, #56] ; 0x38 * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; if (the_jnode->type == IMFS_LINEAR_FILE) { c730: 0a00005c beq c8a8 /* * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) c734: e5992054 ldr r2, [r9, #84] ; 0x54 /* * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; c738: e1a03001 mov r3, r1 if ( last_byte > the_jnode->info.file.size ) c73c: e3a01000 mov r1, #0 c740: e1510002 cmp r1, r2 c744: e5992050 ldr r2, [r9, #80] ; 0x50 /* * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; c748: e0851007 add r1, r5, r7 if ( last_byte > the_jnode->info.file.size ) c74c: da00003d ble c848 my_length = the_jnode->info.file.size - start; c750: e0635002 rsb r5, r3, r2 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; c754: e59f61b8 ldr r6, [pc, #440] ; c914 c758: e5964000 ldr r4, [r6] c75c: e1a00007 mov r0, r7 c760: e1a02004 mov r2, r4 c764: e1a03fc2 asr r3, r2, #31 c768: e1a01008 mov r1, r8 c76c: e98d000c stmib sp, {r2, r3} c770: eb00155b bl 11ce4 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; c774: e1a01008 mov r1, r8 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; c778: e1a0a000 mov sl, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; c77c: e99d000c ldmib sp, {r2, r3} c780: e1a00007 mov r0, r7 c784: eb001429 bl 11830 <__divdi3> if ( start_offset ) { c788: e35a0000 cmp sl, #0 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; c78c: e1a07000 mov r7, r0 unsigned int last_byte; unsigned int copied; unsigned int start_offset; unsigned char *dest; dest = destination; c790: 01a0800b moveq r8, fp /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { c794: 0a000014 beq c7ec to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); c798: e1a00009 mov r0, r9 c79c: e1a01007 mov r1, r7 c7a0: e3a02000 mov r2, #0 c7a4: ebffff55 bl c500 if ( !block_ptr ) c7a8: e3500000 cmp r0, #0 c7ac: 0a000023 beq c840 return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); c7b0: e5901000 ldr r1, [r0] * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; c7b4: e06a3004 rsb r3, sl, r4 c7b8: e1550003 cmp r5, r3 c7bc: 31a03005 movcc r3, r5 if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); c7c0: e081100a add r1, r1, sl c7c4: e1a02003 mov r2, r3 c7c8: e1a0000b mov r0, fp c7cc: e58d3000 str r3, [sp] c7d0: eb00082c bl e888 dest += to_copy; c7d4: e59d3000 ldr r3, [sp] block++; my_length -= to_copy; c7d8: e5964000 ldr r4, [r6] to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); dest += to_copy; c7dc: e08b8003 add r8, fp, r3 block++; c7e0: e2877001 add r7, r7, #1 my_length -= to_copy; c7e4: e0635005 rsb r5, r3, r5 copied += to_copy; c7e8: e1a0a003 mov sl, r3 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { c7ec: e1550004 cmp r5, r4 c7f0: 2a000008 bcs c818 c7f4: ea000017 b c858 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); c7f8: e5931000 ldr r1, [r3] c7fc: eb000821 bl e888 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { c800: e5963000 ldr r3, [r6] c804: e1530005 cmp r3, r5 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; c808: e0888004 add r8, r8, r4 block++; c80c: e2877001 add r7, r7, #1 my_length -= to_copy; copied += to_copy; c810: e08aa004 add sl, sl, r4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { c814: 8a00000f bhi c858 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); c818: e3a02000 mov r2, #0 c81c: e1a01007 mov r1, r7 c820: e1a00009 mov r0, r9 c824: ebffff35 bl c500 if ( !block_ptr ) c828: e2503000 subs r3, r0, #0 return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); c82c: e1a02004 mov r2, r4 dest += to_copy; block++; my_length -= to_copy; c830: e0645005 rsb r5, r4, r5 to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); c834: e1a00008 mov r0, r8 * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) c838: 1affffee bne c7f8 IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; c83c: e1a0000a mov r0, sl <== NOT EXECUTED } IMFS_update_atime( the_jnode ); return copied; } c840: e28dd014 add sp, sp, #20 c844: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} /* * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) c848: 1affffc1 bne c754 c84c: e1510002 cmp r1, r2 c850: 9affffbf bls c754 c854: eaffffbd b c750 /* * Phase 3: possibly the first part of one block */ IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { c858: e3550000 cmp r5, #0 c85c: 0a00000a beq c88c block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); c860: e1a00009 mov r0, r9 c864: e1a01007 mov r1, r7 c868: e3a02000 mov r2, #0 c86c: ebffff23 bl c500 if ( !block_ptr ) c870: e2503000 subs r3, r0, #0 c874: 0afffff0 beq c83c return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); c878: e1a00008 mov r0, r8 c87c: e5931000 ldr r1, [r3] c880: e1a02005 mov r2, r5 c884: eb0007ff bl e888 copied += my_length; c888: e08aa005 add sl, sl, r5 } IMFS_update_atime( the_jnode ); c88c: e28d000c add r0, sp, #12 c890: e3a01000 mov r1, #0 c894: ebffd6dd bl 2410 c898: e59d300c ldr r3, [sp, #12] return copied; c89c: e1a0000a mov r0, sl return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; } IMFS_update_atime( the_jnode ); c8a0: e5893040 str r3, [r9, #64] ; 0x40 return copied; c8a4: eaffffe5 b c840 if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) c8a8: e2894050 add r4, r9, #80 ; 0x50 c8ac: e8940018 ldm r4, {r3, r4} c8b0: e1a00003 mov r0, r3 c8b4: e1a01004 mov r1, r4 c8b8: e3a02000 mov r2, #0 c8bc: e0500007 subs r0, r0, r7 c8c0: e0c11008 sbc r1, r1, r8 c8c4: e1520001 cmp r2, r1 my_length = length; if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; c8c8: e5992058 ldr r2, [r9, #88] ; 0x58 if (my_length > (the_jnode->info.linearfile.size - start)) c8cc: da00000b ble c900 my_length = the_jnode->info.linearfile.size - start; c8d0: e067a003 rsb sl, r7, r3 memcpy(dest, &file_ptr[start], my_length); c8d4: e0821007 add r1, r2, r7 c8d8: e1a0000b mov r0, fp c8dc: e1a0200a mov r2, sl c8e0: eb0007e8 bl e888 return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; } IMFS_update_atime( the_jnode ); c8e4: e28d000c add r0, sp, #12 c8e8: e3a01000 mov r1, #0 c8ec: ebffd6c7 bl 2410 c8f0: e59d300c ldr r3, [sp, #12] return copied; c8f4: e1a0000a mov r0, sl return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; } IMFS_update_atime( the_jnode ); c8f8: e5893040 str r3, [r9, #64] ; 0x40 c8fc: eaffffcf b c840 if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) c900: 1a000001 bne c90c c904: e1550000 cmp r5, r0 c908: 8afffff0 bhi c8d0 /* * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; c90c: e1a0a005 mov sl, r5 <== NOT EXECUTED c910: eaffffef b c8d4 <== NOT EXECUTED =============================================================================== 0000cc94 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { cc94: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} cc98: e1a09000 mov r9, r0 cc9c: e24dd010 sub sp, sp, #16 * If the last byte we are supposed to write is past the end of this * in memory file, then extend the length. */ last_byte = start + my_length; if ( last_byte > the_jnode->info.file.size ) { cca0: e5900054 ldr r0, [r0, #84] ; 0x54 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { cca4: e59db034 ldr fp, [sp, #52] ; 0x34 * If the last byte we are supposed to write is past the end of this * in memory file, then extend the length. */ last_byte = start + my_length; if ( last_byte > the_jnode->info.file.size ) { cca8: e3500000 cmp r0, #0 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { ccac: e1a06001 mov r6, r1 ccb0: e1a07002 mov r7, r2 ccb4: e1a08003 mov r8, r3 /* * If the last byte we are supposed to write is past the end of this * in memory file, then extend the length. */ last_byte = start + my_length; ccb8: e08b1001 add r1, fp, r1 if ( last_byte > the_jnode->info.file.size ) { ccbc: ba000054 blt ce14 ccc0: 0a000050 beq ce08 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; ccc4: e59f5170 ldr r5, [pc, #368] ; ce3c ccc8: e5954000 ldr r4, [r5] cccc: e1a00006 mov r0, r6 ccd0: e1a02004 mov r2, r4 ccd4: e1a03fc2 asr r3, r2, #31 ccd8: e1a01007 mov r1, r7 ccdc: e88d000c stm sp, {r2, r3} cce0: eb0013ff bl 11ce4 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; cce4: e1a01007 mov r1, r7 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; cce8: e1a0a000 mov sl, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; ccec: e89d000c ldm sp, {r2, r3} ccf0: e1a00006 mov r0, r6 ccf4: eb0012cd bl 11830 <__divdi3> if ( start_offset ) { ccf8: e35a0000 cmp sl, #0 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; ccfc: e1a07000 mov r7, r0 if ( start_offset ) { cd00: 01a0600b moveq r6, fp cd04: 1a000016 bne cd64 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { cd08: e1560004 cmp r6, r4 cd0c: 2a000008 bcs cd34 cd10: ea000027 b cdb4 if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); cd14: e5900000 ldr r0, [r0] cd18: eb0006da bl e888 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { cd1c: e5953000 ldr r3, [r5] cd20: e1530006 cmp r3, r6 return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); src += to_copy; cd24: e0888004 add r8, r8, r4 block++; cd28: e2877001 add r7, r7, #1 * IMFS_memfile_write * * This routine writes the specified data buffer into the in memory * file pointed to by the_jnode. The file is extended as needed. */ MEMFILE_STATIC ssize_t IMFS_memfile_write( cd2c: e08aa004 add sl, sl, r4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { cd30: 8a00001f bhi cdb4 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); cd34: e1a01007 mov r1, r7 cd38: e3a02000 mov r2, #0 cd3c: e1a00009 mov r0, r9 cd40: ebfffdee bl c500 if ( !block_ptr ) cd44: e3500000 cmp r0, #0 return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); cd48: e1a01008 mov r1, r8 cd4c: e1a02004 mov r2, r4 src += to_copy; block++; my_length -= to_copy; cd50: e0646006 rsb r6, r4, r6 */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) cd54: 1affffee bne cd14 IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) cd58: e1a0000a mov r0, sl <== NOT EXECUTED } IMFS_mtime_ctime_update( the_jnode ); return copied; } cd5c: e28dd010 add sp, sp, #16 cd60: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); cd64: e1a00009 mov r0, r9 cd68: e1a01007 mov r1, r7 cd6c: e3a02000 mov r2, #0 cd70: ebfffde2 bl c500 if ( !block_ptr ) cd74: e3500000 cmp r0, #0 cd78: 0afffff7 beq cd5c * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; cd7c: e06a4004 rsb r4, sl, r4 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); cd80: e5900000 ldr r0, [r0] * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; cd84: e154000b cmp r4, fp cd88: 21a0400b movcs r4, fp block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); cd8c: e080000a add r0, r0, sl cd90: e1a01008 mov r1, r8 cd94: e1a02004 mov r2, r4 cd98: eb0006ba bl e888 src += to_copy; cd9c: e0888004 add r8, r8, r4 block++; my_length -= to_copy; cda0: e064600b rsb r6, r4, fp copied += to_copy; cda4: e1a0a004 mov sl, r4 src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); src += to_copy; block++; cda8: e2877001 add r7, r7, #1 my_length -= to_copy; copied += to_copy; cdac: e5954000 ldr r4, [r5] cdb0: eaffffd4 b cd08 * Phase 3: possibly the first part of one block */ IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { cdb4: e3560000 cmp r6, #0 cdb8: 0a00000a beq cde8 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); cdbc: e1a00009 mov r0, r9 cdc0: e1a01007 mov r1, r7 cdc4: e3a02000 mov r2, #0 cdc8: ebfffdcc bl c500 if ( !block_ptr ) cdcc: e3500000 cmp r0, #0 cdd0: 0affffe0 beq cd58 return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, my_length ); cdd4: e5900000 ldr r0, [r0] cdd8: e1a01008 mov r1, r8 cddc: e1a02006 mov r2, r6 cde0: eb0006a8 bl e888 my_length = 0; copied += to_copy; cde4: e08aa006 add sl, sl, r6 } IMFS_mtime_ctime_update( the_jnode ); cde8: e28d0008 add r0, sp, #8 cdec: e3a01000 mov r1, #0 cdf0: ebffd586 bl 2410 cdf4: e59d3008 ldr r3, [sp, #8] return copied; cdf8: e1a0000a mov r0, sl memcpy( &(*block_ptr)[ 0 ], src, my_length ); my_length = 0; copied += to_copy; } IMFS_mtime_ctime_update( the_jnode ); cdfc: e5893044 str r3, [r9, #68] ; 0x44 ce00: e5893048 str r3, [r9, #72] ; 0x48 return copied; ce04: eaffffd4 b cd5c * If the last byte we are supposed to write is past the end of this * in memory file, then extend the length. */ last_byte = start + my_length; if ( last_byte > the_jnode->info.file.size ) { ce08: e5993050 ldr r3, [r9, #80] ; 0x50 ce0c: e1530001 cmp r3, r1 ce10: 2affffab bcs ccc4 status = IMFS_memfile_extend( the_jnode, last_byte ); ce14: e1a00009 mov r0, r9 ce18: e3a02000 mov r2, #0 ce1c: ebffff4f bl cb60 if ( status ) ce20: e3500000 cmp r0, #0 ce24: 0affffa6 beq ccc4 rtems_set_errno_and_return_minus_one( ENOSPC ); ce28: eb000468 bl dfd0 <__errno> ce2c: e3a0301c mov r3, #28 ce30: e5803000 str r3, [r0] ce34: e3e00000 mvn r0, #0 ce38: eaffffc7 b cd5c =============================================================================== 00001cd4 : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 1cd4: e5903008 ldr r3, [r0, #8] /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 1cd8: e593204c ldr r2, [r3, #76] ; 0x4c 1cdc: e3520001 cmp r2, #1 #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 1ce0: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 1ce4: 1a000002 bne 1cf4 /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry; 1ce8: e583005c str r0, [r3, #92] ; 0x5c return 0; 1cec: e3a00000 mov r0, #0 } 1cf0: e49df004 pop {pc} ; (ldr pc, [sp], #4) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 1cf4: eb0030b5 bl dfd0 <__errno> <== NOT EXECUTED 1cf8: e3a03014 mov r3, #20 <== NOT EXECUTED 1cfc: e5803000 str r3, [r0] <== NOT EXECUTED 1d00: e3e00000 mvn r0, #0 <== NOT EXECUTED 1d04: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== 000046c8 : * This routine prints the contents of the specified jnode. */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 46c8: e92d4030 push {r4, r5, lr} IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); 46cc: e59f50f8 ldr r5, [pc, #248] ; 47cc 46d0: e5953000 ldr r3, [r5] * This routine prints the contents of the specified jnode. */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 46d4: e1a04000 mov r4, r0 IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); 46d8: e5931008 ldr r1, [r3, #8] 46dc: e280000c add r0, r0, #12 46e0: eb00388c bl 12918 switch( the_jnode->type ) { 46e4: e594204c ldr r2, [r4, #76] ; 0x4c 46e8: e2423001 sub r3, r2, #1 46ec: e3530006 cmp r3, #6 46f0: 979ff103 ldrls pc, [pc, r3, lsl #2] 46f4: ea000023 b 4788 <== NOT EXECUTED 46f8: 0000479c .word 0x0000479c <== NOT EXECUTED 46fc: 000047b0 .word 0x000047b0 <== NOT EXECUTED 4700: 00004714 .word 0x00004714 <== NOT EXECUTED 4704: 00004714 .word 0x00004714 <== NOT EXECUTED 4708: 0000474c .word 0x0000474c <== NOT EXECUTED 470c: 0000476c .word 0x0000476c <== NOT EXECUTED 4710: 00004730 .word 0x00004730 <== NOT EXECUTED case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 4714: e5953000 ldr r3, [r5] 4718: e59f00b0 ldr r0, [pc, #176] ; 47d0 471c: e5933008 ldr r3, [r3, #8] 4720: e3a01001 mov r1, #1 4724: e3a02013 mov r2, #19 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); } 4728: e8bd4030 pop {r4, r5, lr} case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 472c: ea003ba9 b 135d8 return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 4730: e5953000 ldr r3, [r5] 4734: e59f0098 ldr r0, [pc, #152] ; 47d4 4738: e5933008 ldr r3, [r3, #8] 473c: e3a01001 mov r1, #1 4740: e3a02012 mov r2, #18 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); } 4744: 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" ); 4748: ea003ba2 b 135d8 the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 474c: e5953000 ldr r3, [r5] 4750: e59f1080 ldr r1, [pc, #128] ; 47d8 4754: e5930008 ldr r0, [r3, #8] 4758: e5942050 ldr r2, [r4, #80] ; 0x50 475c: eb003818 bl 127c4 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 4760: e59f0074 ldr r0, [pc, #116] ; 47dc } 4764: e8bd4030 pop {r4, r5, lr} default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 4768: ea003f7c b 14560 fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 476c: e5953000 ldr r3, [r5] 4770: e59f1068 ldr r1, [pc, #104] ; 47e0 4774: e5930008 ldr r0, [r3, #8] 4778: e5942050 ldr r2, [r4, #80] ; 0x50 477c: e5943058 ldr r3, [r4, #88] ; 0x58 4780: eb00380f bl 127c4 (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; 4784: eafffff5 b 4760 case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); return; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 4788: e5953000 ldr r3, [r5] <== NOT EXECUTED 478c: e59f1050 ldr r1, [pc, #80] ; 47e4 <== NOT EXECUTED 4790: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED return; } puts(""); } 4794: 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 ); 4798: ea003809 b 127c4 <== NOT EXECUTED IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); 479c: e5953000 ldr r3, [r5] 47a0: e3a0002f mov r0, #47 ; 0x2f 47a4: e5931008 ldr r1, [r3, #8] 47a8: eb003825 bl 12844 break; 47ac: eaffffeb b 4760 case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 47b0: e5953000 ldr r3, [r5] 47b4: e59f102c ldr r1, [pc, #44] ; 47e8 47b8: e5930008 ldr r0, [r3, #8] 47bc: e2842050 add r2, r4, #80 ; 0x50 47c0: e892000c ldm r2, {r2, r3} 47c4: eb0037fe bl 127c4 the_jnode->info.device.major, the_jnode->info.device.minor ); break; 47c8: eaffffe4 b 4760 =============================================================================== 0000a2fc : { IMFS_fs_info_t *fs_info; IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; a2fc: e5903000 ldr r3, [r0] switch ( the_jnode->type ) { a300: e593204c ldr r2, [r3, #76] ; 0x4c a304: e2422002 sub r2, r2, #2 int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { a308: e92d41f0 push {r4, r5, r6, r7, r8, lr} IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { a30c: e3520005 cmp r2, #5 a310: 979ff102 ldrls pc, [pc, r2, lsl #2] a314: ea000027 b a3b8 <== NOT EXECUTED a318: 0000a3a4 .word 0x0000a3a4 <== NOT EXECUTED a31c: 0000a3b8 .word 0x0000a3b8 <== NOT EXECUTED a320: 0000a330 .word 0x0000a330 <== NOT EXECUTED a324: 0000a3cc .word 0x0000a3cc <== NOT EXECUTED a328: 0000a3cc .word 0x0000a3cc <== NOT EXECUTED a32c: 0000a330 .word 0x0000a330 <== NOT EXECUTED case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; a330: e3a04000 mov r4, #0 a334: e3a05000 mov r5, #0 a338: e5814020 str r4, [r1, #32] a33c: e5815024 str r5, [r1, #36] ; 0x24 /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; a340: e5902010 ldr r2, [r0, #16] buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); a344: e5922034 ldr r2, [r2, #52] ; 0x34 a348: e5927000 ldr r7, [r2] rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; a34c: e3a02cff mov r2, #65280 ; 0xff00 a350: e28220fe add r2, r2, #254 ; 0xfe buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; a354: e5930048 ldr r0, [r3, #72] ; 0x48 */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; a358: e5936030 ldr r6, [r3, #48] ; 0x30 buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; a35c: e5935038 ldr r5, [r3, #56] ; 0x38 buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; a360: e2834040 add r4, r3, #64 ; 0x40 a364: e8941010 ldm r4, {r4, ip} fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; a368: e1d383b4 ldrh r8, [r3, #52] ; 0x34 /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = a36c: e5812000 str r2, [r1] rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; a370: e1d323bc ldrh r2, [r3, #60] ; 0x3c buf->st_gid = the_jnode->st_gid; a374: e1d333be ldrh r3, [r3, #62] ; 0x3e fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; a378: e1c181b0 strh r8, [r1, #16] buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; a37c: e5810038 str r0, [r1, #56] ; 0x38 rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; a380: e1c121b2 strh r2, [r1, #18] /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = a384: e5817004 str r7, [r1, #4] buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; a388: e1c131b4 strh r3, [r1, #20] */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; a38c: e581600c str r6, [r1, #12] buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; a390: e5815008 str r5, [r1, #8] buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; a394: e5814028 str r4, [r1, #40] ; 0x28 buf->st_mtime = the_jnode->stat_mtime; a398: e581c030 str ip, [r1, #48] ; 0x30 buf->st_ctime = the_jnode->stat_ctime; return 0; a39c: e3a00000 mov r0, #0 } a3a0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} switch ( the_jnode->type ) { case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); a3a4: e2832050 add r2, r3, #80 ; 0x50 a3a8: e8921004 ldm r2, {r2, ip} a3ac: e581c01c str ip, [r1, #28] a3b0: e5812018 str r2, [r1, #24] break; a3b4: eaffffe1 b a340 case IMFS_FIFO: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); a3b8: eb000f04 bl dfd0 <__errno> a3bc: e3a03086 mov r3, #134 ; 0x86 a3c0: e5803000 str r3, [r0] a3c4: e3e00000 mvn r0, #0 a3c8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); break; case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; a3cc: e2835050 add r5, r3, #80 ; 0x50 a3d0: e8950030 ldm r5, {r4, r5} a3d4: e5814020 str r4, [r1, #32] a3d8: e5815024 str r5, [r1, #36] ; 0x24 break; a3dc: eaffffd7 b a340 =============================================================================== 00001e70 : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 1e70: e92d41f0 push {r4, r5, r6, r7, r8, lr} IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; 1e74: e5915000 ldr r5, [r1] /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 1e78: e595304c ldr r3, [r5, #76] ; 0x4c 1e7c: e3530003 cmp r3, #3 int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 1e80: e24dd01c sub sp, sp, #28 1e84: e1a04001 mov r4, r1 1e88: e1a06000 mov r6, r0 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 1e8c: 0a000006 beq 1eac /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 1e90: e5943008 ldr r3, [r4, #8] 1e94: e1a00006 mov r0, r6 1e98: e1a01004 mov r1, r4 1e9c: e1a0e00f mov lr, pc 1ea0: e593f034 ldr pc, [r3, #52] ; 0x34 return result; } 1ea4: e28dd01c add sp, sp, #28 1ea8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} * free the node. */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) 1eac: e595e050 ldr lr, [r5, #80] ; 0x50 1eb0: e35e0000 cmp lr, #0 1eb4: 0a00001f beq 1f38 rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 1eb8: e1a07001 mov r7, r1 1ebc: e8b7000f ldm r7!, {r0, r1, r2, r3} 1ec0: e1a0c00d mov ip, sp 1ec4: e8ac000f stmia ip!, {r0, r1, r2, r3} the_link.node_access = node->info.hard_link.link_node; 1ec8: e28d801c add r8, sp, #28 1ecc: e528e01c str lr, [r8, #-28]! if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 1ed0: e5973000 ldr r3, [r7] the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 1ed4: 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; 1ed8: e58c3000 str r3, [ip] the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 1edc: eb001e59 bl 9848 /* * 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) 1ee0: e5953050 ldr r3, [r5, #80] ; 0x50 1ee4: e1d323b4 ldrh r2, [r3, #52] ; 0x34 1ee8: e3520001 cmp r2, #1 1eec: 0a000008 beq 1f14 if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; 1ef0: e2422001 sub r2, r2, #1 1ef4: e1c323b4 strh r2, [r3, #52] ; 0x34 IMFS_update_ctime( node->info.hard_link.link_node ); 1ef8: e28d0014 add r0, sp, #20 1efc: e3a01000 mov r1, #0 1f00: eb000142 bl 2410 1f04: e5953050 ldr r3, [r5, #80] ; 0x50 1f08: e59d2014 ldr r2, [sp, #20] 1f0c: e5832048 str r2, [r3, #72] ; 0x48 1f10: eaffffde b 1e90 * to remove the node that is a link and the node itself. */ if ( node->info.hard_link.link_node->st_nlink == 1) { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 1f14: e1a00006 mov r0, r6 1f18: e1a0100d mov r1, sp 1f1c: e59d3008 ldr r3, [sp, #8] 1f20: e1a0e00f mov lr, pc 1f24: e593f034 ldr pc, [r3, #52] ; 0x34 if ( result != 0 ) 1f28: e3500000 cmp r0, #0 1f2c: 0affffd7 beq 1e90 return -1; 1f30: e3e00000 mvn r0, #0 1f34: eaffffda b 1ea4 */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); 1f38: eb003024 bl dfd0 <__errno> <== NOT EXECUTED 1f3c: e3a03016 mov r3, #22 <== NOT EXECUTED 1f40: e5803000 str r3, [r0] <== NOT EXECUTED 1f44: e3e00000 mvn r0, #0 <== NOT EXECUTED 1f48: eaffffd5 b 1ea4 <== NOT EXECUTED =============================================================================== 00001f4c : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 1f4c: e5903008 ldr r3, [r0, #8] /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 1f50: e593204c ldr r2, [r3, #76] ; 0x4c 1f54: e3520001 cmp r2, #1 #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 1f58: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 1f5c: 1a000005 bne 1f78 /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 1f60: e593205c ldr r2, [r3, #92] ; 0x5c 1f64: e3520000 cmp r2, #0 1f68: 0a000007 beq 1f8c /* * 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; 1f6c: e3a00000 mov r0, #0 1f70: e583005c str r0, [r3, #92] ; 0x5c return 0; } 1f74: e49df004 pop {pc} ; (ldr pc, [sp], #4) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 1f78: eb003014 bl dfd0 <__errno> <== NOT EXECUTED 1f7c: e3a03014 mov r3, #20 <== NOT EXECUTED 1f80: e5803000 str r3, [r0] <== NOT EXECUTED 1f84: e3e00000 mvn r0, #0 <== NOT EXECUTED 1f88: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 1f8c: eb00300f bl dfd0 <__errno> <== NOT EXECUTED 1f90: e3a03016 mov r3, #22 <== NOT EXECUTED 1f94: e5803000 str r3, [r0] <== NOT EXECUTED 1f98: e3e00000 mvn r0, #0 <== NOT EXECUTED 1f9c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== 000022e8 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 22e8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); 22ec: e59030bc ldr r3, [r0, #188] ; 0xbc size = Stack_check_usable_stack_size(stack); 22f0: e59060b8 ldr r6, [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); 22f4: e283c010 add ip, r3, #16 size = Stack_check_usable_stack_size(stack); 22f8: e2466010 sub r6, r6, #16 /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 22fc: e28cb010 add fp, ip, #16 for (ebase = base + length; base < ebase; base++) 2300: e3c61003 bic r1, r6, #3 2304: e08b1001 add r1, fp, r1 2308: e15b0001 cmp fp, r1 static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 230c: e24dd010 sub sp, sp, #16 2310: e1a05000 mov r5, r0 current = 0; } else #endif { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 2314: e59090e8 ldr r9, [r0, #232] ; 0xe8 * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 2318: 2a00000d bcs 2354 if (*base != U32_PATTERN) 231c: e3a02ca6 mov r2, #42496 ; 0xa600 2320: e242205b sub r2, r2, #91 ; 0x5b 2324: e59c0010 ldr r0, [ip, #16] 2328: e1822802 orr r2, r2, r2, lsl #16 232c: e1500002 cmp r0, r2 * Try to print out how much stack was actually used by the task. */ static void *print_context; static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( 2330: 02833024 addeq r3, r3, #36 ; 0x24 * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) if (*base != U32_PATTERN) 2334: 0a000003 beq 2348 2338: ea000027 b 23dc <== NOT EXECUTED 233c: e4932004 ldr r2, [r3], #4 2340: e1520000 cmp r2, r0 2344: 1a000024 bne 23dc * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 2348: e1510003 cmp r1, r3 if (*base != U32_PATTERN) 234c: e1a0b003 mov fp, r3 * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 2350: 8afffff9 bhi 233c 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; 2354: e3a0b000 mov fp, #0 <== NOT EXECUTED #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if ( the_thread ) #endif { (*print_handler)( 2358: e5958008 ldr r8, [r5, #8] 235c: e59f409c ldr r4, [pc, #156] ; 2400 2360: e3a01005 mov r1, #5 2364: e28d2008 add r2, sp, #8 2368: e1a00008 mov r0, r8 236c: e8940480 ldm r4, {r7, sl} 2370: eb001840 bl 8478 2374: e1a02008 mov r2, r8 2378: e1a03000 mov r3, r0 237c: e59f1080 ldr r1, [pc, #128] ; 2404 2380: e1a0000a mov r0, sl 2384: e1a0e00f mov lr, pc 2388: e12fff17 bx r7 (*print_handler)( print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 238c: e59530b8 ldr r3, [r5, #184] ; 0xb8 2390: e59520bc ldr r2, [r5, #188] ; 0xbc 2394: e2433001 sub r3, r3, #1 else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 2398: e0823003 add r3, r2, r3 239c: e5940004 ldr r0, [r4, #4] 23a0: e58d9000 str r9, [sp] 23a4: e58d6004 str r6, [sp, #4] 23a8: e59f1058 ldr r1, [pc, #88] ; 2408 23ac: e1a0e00f mov lr, pc 23b0: e594f000 ldr pc, [r4] stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 23b4: e5943008 ldr r3, [r4, #8] 23b8: e3530000 cmp r3, #0 23bc: 0a00000a beq 23ec (*print_handler)( print_context, "Unavailable\n" ); } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 23c0: e5940004 ldr r0, [r4, #4] 23c4: e59f1040 ldr r1, [pc, #64] ; 240c 23c8: e1a0200b mov r2, fp 23cc: e1a0e00f mov lr, pc 23d0: e594f000 ldr pc, [r4] } } 23d4: e28dd010 add sp, sp, #16 23d8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); high_water_mark = Stack_check_find_high_water_mark(low, size); if ( high_water_mark ) 23dc: e35b0000 cmp fp, #0 used = Stack_check_Calculate_used( low, size, high_water_mark ); 23e0: 108cc006 addne ip, ip, r6 23e4: 106bb00c rsbne fp, fp, ip 23e8: eaffffda b 2358 current, size ); if (Stack_check_Initialized == 0) { (*print_handler)( print_context, "Unavailable\n" ); 23ec: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED 23f0: e59f1018 ldr r1, [pc, #24] ; 2410 <== NOT EXECUTED 23f4: e1a0e00f mov lr, pc <== NOT EXECUTED 23f8: e594f000 ldr pc, [r4] <== NOT EXECUTED 23fc: eafffff4 b 23d4 <== NOT EXECUTED =============================================================================== 00016fb8 <_CORE_message_queue_Broadcast>: { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 16fb8: 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 ) { 16fbc: 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 ) { 16fc0: e1530002 cmp r3, r2 Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { 16fc4: e1a07000 mov r7, r0 16fc8: e1a05002 mov r5, r2 16fcc: e1a08001 mov r8, r1 16fd0: e59da020 ldr sl, [sp, #32] Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 16fd4: 3a000016 bcc 17034 <_CORE_message_queue_Broadcast+0x7c> * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { 16fd8: e5906048 ldr r6, [r0, #72] ; 0x48 16fdc: e3560000 cmp r6, #0 *count = 0; 16fe0: 13a00000 movne r0, #0 16fe4: 158a0000 strne r0, [sl] * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { 16fe8: 18bd85f0 popne {r4, r5, r6, r7, r8, sl, pc} /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 16fec: e1a00007 mov r0, r7 16ff0: eb000b08 bl 19c18 <_Thread_queue_Dequeue> 16ff4: e2504000 subs r4, r0, #0 16ff8: 0a00000a beq 17028 <_CORE_message_queue_Broadcast+0x70> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 16ffc: e594002c ldr r0, [r4, #44] ; 0x2c 17000: e1a01008 mov r1, r8 17004: e1a02005 mov r2, r5 17008: eb002464 bl 201a0 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 1700c: e5943028 ldr r3, [r4, #40] ; 0x28 /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 17010: e1a00007 mov r0, r7 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 17014: e5835000 str r5, [r3] /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 17018: eb000afe bl 19c18 <_Thread_queue_Dequeue> 1701c: e2504000 subs r4, r0, #0 _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 17020: e2866001 add r6, r6, #1 /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 17024: 1afffff4 bne 16ffc <_CORE_message_queue_Broadcast+0x44> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 17028: e58a6000 str r6, [sl] return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 1702c: e1a00004 mov r0, r4 17030: 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; 17034: e3a00001 mov r0, #1 <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 17038: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED =============================================================================== 0000bc00 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { bc00: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} bc04: e1a08002 mov r8, r2 Heap_Statistics *const stats = &heap->stats; uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_ALLOC_BONUS; uintptr_t const page_size = heap->page_size; bc08: e5902010 ldr r2, [r0, #16] Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { bc0c: e24dd01c sub sp, sp, #28 bc10: e1a05001 mov r5, r1 Heap_Block *block = NULL; uintptr_t alloc_begin = 0; uint32_t search_count = 0; bool search_again = false; if ( block_size_floor < alloc_size ) { bc14: e2911004 adds r1, r1, #4 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { bc18: e1a07000 mov r7, r0 Heap_Block *block = NULL; uintptr_t alloc_begin = 0; uint32_t search_count = 0; bool search_again = false; if ( block_size_floor < alloc_size ) { bc1c: e58d1000 str r1, [sp] Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { bc20: e1a0b003 mov fp, r3 Heap_Statistics *const stats = &heap->stats; uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_ALLOC_BONUS; uintptr_t const page_size = heap->page_size; bc24: e58d200c str r2, [sp, #12] Heap_Block *block = NULL; uintptr_t alloc_begin = 0; uint32_t search_count = 0; bool search_again = false; if ( block_size_floor < alloc_size ) { bc28: 2a00007a bcs be18 <_Heap_Allocate_aligned_with_boundary+0x218> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { bc2c: e3530000 cmp r3, #0 bc30: 1a000076 bne be10 <_Heap_Allocate_aligned_with_boundary+0x210> if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } bc34: e5979008 ldr r9, [r7, #8] do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { bc38: e1570009 cmp r7, r9 bc3c: 0a000075 beq be18 <_Heap_Allocate_aligned_with_boundary+0x218> uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size bc40: e59d300c ldr r3, [sp, #12] + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; bc44: e2651004 rsb r1, r5, #4 uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size bc48: e2833007 add r3, r3, #7 bc4c: e58d3010 str r3, [sp, #16] + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; bc50: e58d1014 str r1, [sp, #20] do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { bc54: e3a06001 mov r6, #1 /* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { bc58: e599a004 ldr sl, [r9, #4] bc5c: e59d2000 ldr r2, [sp] bc60: e152000a cmp r2, sl bc64: 2a000050 bcs bdac <_Heap_Allocate_aligned_with_boundary+0x1ac> if ( alignment == 0 ) { bc68: e3580000 cmp r8, #0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; bc6c: 02894008 addeq r4, r9, #8 bc70: 0a000053 beq bdc4 <_Heap_Allocate_aligned_with_boundary+0x1c4> if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } bc74: e5973014 ldr r3, [r7, #20] uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; uintptr_t alloc_begin = alloc_end - alloc_size; bc78: e59d1014 ldr r1, [sp, #20] uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; bc7c: e59d2010 ldr r2, [sp, #16] - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; bc80: e3caa001 bic sl, sl, #1 uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; bc84: e089a00a add sl, r9, sl uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; uintptr_t alloc_begin = alloc_end - alloc_size; bc88: e081400a add r4, r1, sl if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } bc8c: e58d3004 str r3, [sp, #4] uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; bc90: e0633002 rsb r3, r3, r2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); bc94: e1a00004 mov r0, r4 uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size bc98: e083a00a add sl, r3, sl bc9c: e1a01008 mov r1, r8 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; bca0: e2893008 add r3, r9, #8 bca4: e58d3008 str r3, [sp, #8] RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); bca8: eb0016ac bl 11760 <__umodsi3> bcac: e0604004 rsb r4, r0, r4 uintptr_t alloc_begin = alloc_end - alloc_size; alloc_begin = _Heap_Align_down( alloc_begin, alignment ); /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { bcb0: e15a0004 cmp sl, r4 bcb4: 2a000003 bcs bcc8 <_Heap_Allocate_aligned_with_boundary+0xc8> bcb8: e1a0000a mov r0, sl bcbc: e1a01008 mov r1, r8 bcc0: eb0016a6 bl 11760 <__umodsi3> bcc4: e060400a rsb r4, r0, sl } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { bcc8: e35b0000 cmp fp, #0 bccc: 0a000026 beq bd6c <_Heap_Allocate_aligned_with_boundary+0x16c> /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment ); } alloc_end = alloc_begin + alloc_size; bcd0: e084a005 add sl, r4, r5 bcd4: e1a0000a mov r0, sl bcd8: e1a0100b mov r1, fp bcdc: eb00169f bl 11760 <__umodsi3> bce0: e060000a rsb r0, r0, sl /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { bce4: e15a0000 cmp sl, r0 bce8: 93a0a000 movls sl, #0 bcec: 83a0a001 movhi sl, #1 bcf0: e1540000 cmp r4, r0 bcf4: 23a0a000 movcs sl, #0 bcf8: e35a0000 cmp sl, #0 bcfc: 0a00001a beq bd6c <_Heap_Allocate_aligned_with_boundary+0x16c> alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; bd00: e59d1008 ldr r1, [sp, #8] bd04: e0813005 add r3, r1, r5 uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { bd08: e1530000 cmp r3, r0 bd0c: 958d9018 strls r9, [sp, #24] bd10: 91a09003 movls r9, r3 bd14: 9a000002 bls bd24 <_Heap_Allocate_aligned_with_boundary+0x124> bd18: ea000023 b bdac <_Heap_Allocate_aligned_with_boundary+0x1ac> bd1c: e1590000 cmp r9, r0 bd20: 8a00003e bhi be20 <_Heap_Allocate_aligned_with_boundary+0x220> return 0; } alloc_begin = boundary_line - alloc_size; bd24: e0654000 rsb r4, r5, r0 bd28: e1a01008 mov r1, r8 bd2c: e1a00004 mov r0, r4 bd30: eb00168a bl 11760 <__umodsi3> bd34: e0604004 rsb r4, r0, r4 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; bd38: e084a005 add sl, r4, r5 bd3c: e1a0000a mov r0, sl bd40: e1a0100b mov r1, fp bd44: eb001685 bl 11760 <__umodsi3> bd48: e060000a rsb r0, r0, sl /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { bd4c: e15a0000 cmp sl, r0 bd50: 93a0a000 movls sl, #0 bd54: 83a0a001 movhi sl, #1 bd58: e1540000 cmp r4, r0 bd5c: 23a0a000 movcs sl, #0 bd60: e35a0000 cmp sl, #0 bd64: 1affffec bne bd1c <_Heap_Allocate_aligned_with_boundary+0x11c> bd68: e59d9018 ldr r9, [sp, #24] boundary_line = _Heap_Align_down( alloc_end, boundary ); } } /* Ensure that the we have a valid new block at the beginning */ if ( alloc_begin >= alloc_begin_floor ) { bd6c: e59d2008 ldr r2, [sp, #8] bd70: e1520004 cmp r2, r4 bd74: 8a00000c bhi bdac <_Heap_Allocate_aligned_with_boundary+0x1ac> bd78: e59d100c ldr r1, [sp, #12] bd7c: e1a00004 mov r0, r4 bd80: eb001676 bl 11760 <__umodsi3> bd84: e269a4ff rsb sl, r9, #-16777216 ; 0xff000000 bd88: e28aa8ff add sl, sl, #16711680 ; 0xff0000 bd8c: e28aacff add sl, sl, #65280 ; 0xff00 bd90: e28aa0f8 add sl, sl, #248 ; 0xf8 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); bd94: e08aa004 add sl, sl, r4 uintptr_t const alloc_block_begin = (uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size ); uintptr_t const free_size = alloc_block_begin - block_begin; if ( free_size >= min_block_size || free_size == 0 ) { bd98: e59d1004 ldr r1, [sp, #4] bd9c: e060300a rsb r3, r0, sl bda0: e15a0000 cmp sl, r0 bda4: 11510003 cmpne r1, r3 bda8: 9a000005 bls bdc4 <_Heap_Allocate_aligned_with_boundary+0x1c4> if ( alloc_begin != 0 ) { break; } block = block->next; bdac: e5999008 ldr r9, [r9, #8] do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { bdb0: e1570009 cmp r7, r9 if ( alloc_begin != 0 ) { break; } block = block->next; bdb4: e2863001 add r3, r6, #1 do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { bdb8: 0a00001d beq be34 <_Heap_Allocate_aligned_with_boundary+0x234> bdbc: e1a06003 mov r6, r3 bdc0: eaffffa4 b bc58 <_Heap_Allocate_aligned_with_boundary+0x58> } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { bdc4: e3540000 cmp r4, #0 bdc8: 0afffff7 beq bdac <_Heap_Allocate_aligned_with_boundary+0x1ac> search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin ); } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; bdcc: e2872048 add r2, r7, #72 ; 0x48 bdd0: e892000c ldm r2, {r2, r3} bdd4: e2822001 add r2, r2, #1 stats->searches += search_count; bdd8: e0833006 add r3, r3, r6 search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin ); } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; bddc: e5872048 str r2, [r7, #72] ; 0x48 stats->searches += search_count; bde0: e587304c str r3, [r7, #76] ; 0x4c block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); bde4: e1a00007 mov r0, r7 bde8: e1a01009 mov r1, r9 bdec: e1a02004 mov r2, r4 bdf0: e1a03005 mov r3, r5 bdf4: ebffeb8e bl 6c34 <_Heap_Block_allocate> bdf8: e1a00004 mov r0, r4 boundary ); } /* Statistics */ if ( stats->max_search < search_count ) { bdfc: e5973044 ldr r3, [r7, #68] ; 0x44 be00: e1530006 cmp r3, r6 stats->max_search = search_count; be04: 35876044 strcc r6, [r7, #68] ; 0x44 } return (void *) alloc_begin; } be08: e28dd01c add sp, sp, #28 be0c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { be10: e1550003 cmp r5, r3 be14: 9a000008 bls be3c <_Heap_Allocate_aligned_with_boundary+0x23c> do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { be18: e3a00000 mov r0, #0 be1c: eafffff9 b be08 <_Heap_Allocate_aligned_with_boundary+0x208> be20: e59d9018 ldr r9, [sp, #24] <== NOT EXECUTED if ( alloc_begin != 0 ) { break; } block = block->next; be24: e5999008 ldr r9, [r9, #8] <== NOT EXECUTED do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { be28: e1570009 cmp r7, r9 <== NOT EXECUTED if ( alloc_begin != 0 ) { break; } block = block->next; be2c: e2863001 add r3, r6, #1 <== NOT EXECUTED do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { be30: 1affffe1 bne bdbc <_Heap_Allocate_aligned_with_boundary+0x1bc><== NOT EXECUTED be34: e3a00000 mov r0, #0 be38: eaffffef b bdfc <_Heap_Allocate_aligned_with_boundary+0x1fc> if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { alignment = page_size; be3c: e3580000 cmp r8, #0 be40: 01a08002 moveq r8, r2 be44: eaffff7a b bc34 <_Heap_Allocate_aligned_with_boundary+0x34> =============================================================================== 0000be48 <_Heap_Free>: return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { be48: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} be4c: e1a04000 mov r4, r0 be50: e1a05001 mov r5, r1 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); be54: e1a00001 mov r0, r1 be58: e5941010 ldr r1, [r4, #16] be5c: eb00163f bl 11760 <__umodsi3> be60: e2455008 sub r5, r5, #8 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block be64: e5943020 ldr r3, [r4, #32] uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); be68: e0605005 rsb r5, r0, r5 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; be6c: e1550003 cmp r5, r3 be70: 3a00002f bcc bf34 <_Heap_Free+0xec> be74: e5941024 ldr r1, [r4, #36] ; 0x24 be78: e1550001 cmp r5, r1 be7c: 8a00002c bhi bf34 <_Heap_Free+0xec> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } be80: e595c004 ldr ip, [r5, #4] - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; be84: e3cc6001 bic r6, ip, #1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); be88: e0852006 add r2, r5, r6 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; be8c: e1530002 cmp r3, r2 be90: 8a000027 bhi bf34 <_Heap_Free+0xec> be94: e1510002 cmp r1, r2 be98: 3a000027 bcc bf3c <_Heap_Free+0xf4> be9c: e5927004 ldr r7, [r2, #4] if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { bea0: e2170001 ands r0, r7, #1 bea4: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return true; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); bea8: e1510002 cmp r1, r2 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; beac: e3c77001 bic r7, r7, #1 beb0: 03a08000 moveq r8, #0 beb4: 0a000004 beq becc <_Heap_Free+0x84> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } beb8: e0820007 add r0, r2, r7 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; bebc: e5900004 ldr r0, [r0, #4] return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) bec0: e3100001 tst r0, #1 bec4: 13a08000 movne r8, #0 bec8: 03a08001 moveq r8, #1 next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { becc: e21c0001 ands r0, ip, #1 bed0: 1a00001b bne bf44 <_Heap_Free+0xfc> uintptr_t const prev_size = block->prev_size; bed4: e595c000 ldr ip, [r5] RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); bed8: e06ca005 rsb sl, ip, r5 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; bedc: e153000a cmp r3, sl bee0: 88bd85f0 pophi {r4, r5, r6, r7, r8, sl, pc} bee4: e151000a cmp r1, sl bee8: 38bd85f0 popcc {r4, r5, r6, r7, r8, sl, pc} block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; beec: e59a0004 ldr r0, [sl, #4] return( false ); } /* As we always coalesce free blocks, the block that preceedes prev_block must have been used. */ if ( !_Heap_Is_prev_used ( prev_block) ) { bef0: e2100001 ands r0, r0, #1 bef4: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ bef8: e3580000 cmp r8, #0 befc: 0a000039 beq bfe8 <_Heap_Free+0x1a0> uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; bf00: e5940038 ldr r0, [r4, #56] ; 0x38 _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; bf04: e0867007 add r7, r6, r7 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } bf08: e5923008 ldr r3, [r2, #8] _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; bf0c: e087c00c add ip, r7, ip --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } bf10: e592200c ldr r2, [r2, #12] } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; bf14: e2400001 sub r0, r0, #1 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; bf18: e38c1001 orr r1, ip, #1 RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; bf1c: e5823008 str r3, [r2, #8] next->prev = prev; bf20: e583200c str r2, [r3, #12] } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; bf24: e5840038 str r0, [r4, #56] ; 0x38 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; bf28: e58a1004 str r1, [sl, #4] next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; bf2c: e78ac00c str ip, [sl, ip] bf30: ea00000f b bf74 <_Heap_Free+0x12c> _Heap_Protection_block_check( heap, next_block ); if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { _HAssert( false ); return false; bf34: e3a00000 mov r0, #0 bf38: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} bf3c: e3a00000 mov r0, #0 <== NOT EXECUTED --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } bf40: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ bf44: e3580000 cmp r8, #0 bf48: 0a000014 beq bfa0 <_Heap_Free+0x158> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } bf4c: e5923008 ldr r3, [r2, #8] prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ uintptr_t const size = block_size + next_block_size; bf50: e0877006 add r7, r7, r6 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } bf54: e592200c ldr r2, [r2, #12] next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ uintptr_t const size = block_size + next_block_size; _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; bf58: e3871001 orr r1, r7, #1 ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; bf5c: e5853008 str r3, [r5, #8] new_block->prev = prev; bf60: e585200c str r2, [r5, #12] next->prev = new_block; prev->next = new_block; bf64: e5825008 str r5, [r2, #8] Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; next->prev = new_block; bf68: e583500c str r5, [r3, #12] bf6c: e5851004 str r1, [r5, #4] next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; bf70: e7857007 str r7, [r5, r7] stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; bf74: e5942040 ldr r2, [r4, #64] ; 0x40 ++stats->frees; bf78: e5943050 ldr r3, [r4, #80] ; 0x50 stats->free_size += block_size; bf7c: e5941030 ldr r1, [r4, #48] ; 0x30 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; bf80: e2422001 sub r2, r2, #1 ++stats->frees; bf84: e2833001 add r3, r3, #1 stats->free_size += block_size; bf88: e0816006 add r6, r1, r6 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; bf8c: e5842040 str r2, [r4, #64] ; 0x40 ++stats->frees; bf90: e5843050 str r3, [r4, #80] ; 0x50 stats->free_size += block_size; bf94: e5846030 str r6, [r4, #48] ; 0x30 return( true ); bf98: e3a00001 mov r0, #1 bf9c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} next_block->prev_size = size; } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; bfa0: e3863001 orr r3, r6, #1 bfa4: e5853004 str r3, [r5, #4] next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; bfa8: e2843038 add r3, r4, #56 ; 0x38 bfac: e8931008 ldm r3, {r3, ip} } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; bfb0: e5920004 ldr r0, [r2, #4] RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; bfb4: e5941008 ldr r1, [r4, #8] next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; bfb8: e2833001 add r3, r3, #1 } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; bfbc: e3c00001 bic r0, r0, #1 next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; if ( stats->max_free_blocks < stats->free_blocks ) { bfc0: e153000c cmp r3, ip new_block->next = next; bfc4: e5851008 str r1, [r5, #8] new_block->prev = block_before; bfc8: e585400c str r4, [r5, #12] } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; bfcc: e5820004 str r0, [r2, #4] block_before->next = new_block; next->prev = new_block; bfd0: e581500c str r5, [r1, #12] next_block->prev_size = block_size; bfd4: e7856006 str r6, [r5, r6] { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; block_before->next = new_block; bfd8: e5845008 str r5, [r4, #8] /* Statistics */ ++stats->free_blocks; bfdc: e5843038 str r3, [r4, #56] ; 0x38 if ( stats->max_free_blocks < stats->free_blocks ) { stats->max_free_blocks = stats->free_blocks; bfe0: 8584303c strhi r3, [r4, #60] ; 0x3c bfe4: eaffffe2 b bf74 <_Heap_Free+0x12c> prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; bfe8: e086c00c add ip, r6, ip prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; bfec: e38c3001 orr r3, ip, #1 bff0: e58a3004 str r3, [sl, #4] next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; bff4: e5923004 ldr r3, [r2, #4] bff8: e3c33001 bic r3, r3, #1 bffc: e5823004 str r3, [r2, #4] next_block->prev_size = size; c000: e785c006 str ip, [r5, r6] c004: eaffffda b bf74 <_Heap_Free+0x12c> =============================================================================== 00013590 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 13590: e92d40f0 push {r4, r5, r6, r7, lr} 13594: e1a04000 mov r4, r0 13598: e1a05001 mov r5, r1 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 1359c: e1a00001 mov r0, r1 135a0: e5941010 ldr r1, [r4, #16] 135a4: e1a07002 mov r7, r2 135a8: ebfff86c bl 11760 <__umodsi3> 135ac: e2456008 sub r6, r5, #8 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 135b0: e5943020 ldr r3, [r4, #32] uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 135b4: e0600006 rsb r0, r0, r6 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 135b8: e1500003 cmp r0, r3 135bc: 3a000010 bcc 13604 <_Heap_Size_of_alloc_area+0x74> 135c0: e5942024 ldr r2, [r4, #36] ; 0x24 135c4: e1500002 cmp r0, r2 135c8: 8a00000d bhi 13604 <_Heap_Size_of_alloc_area+0x74> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 135cc: e5906004 ldr r6, [r0, #4] 135d0: e3c66001 bic r6, r6, #1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 135d4: e0806006 add r6, r0, r6 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 135d8: e1530006 cmp r3, r6 135dc: 8a000008 bhi 13604 <_Heap_Size_of_alloc_area+0x74> 135e0: e1520006 cmp r2, r6 135e4: 3a000008 bcc 1360c <_Heap_Size_of_alloc_area+0x7c> block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 135e8: e5960004 ldr r0, [r6, #4] block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) 135ec: e2100001 ands r0, r0, #1 ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; 135f0: 12655004 rsbne r5, r5, #4 135f4: 10856006 addne r6, r5, r6 135f8: 15876000 strne r6, [r7] return true; 135fc: 13a00001 movne r0, #1 13600: e8bd80f0 pop {r4, r5, r6, r7, pc} if ( !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) ) { return false; 13604: e3a00000 mov r0, #0 13608: e8bd80f0 pop {r4, r5, r6, r7, pc} 1360c: e3a00000 mov r0, #0 <== NOT EXECUTED } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; return true; } 13610: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED =============================================================================== 000079a4 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 79a4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} Heap_Block *const last_block = heap->last_block; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; if ( !_System_state_Is_up( _System_state_Get() ) ) { 79a8: e59f35d8 ldr r3, [pc, #1496] ; 7f88 <_Heap_Walk+0x5e4> uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 79ac: e31200ff tst r2, #255 ; 0xff if ( !_System_state_Is_up( _System_state_Get() ) ) { 79b0: e5933000 ldr r3, [r3] uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 79b4: e59f25d0 ldr r2, [pc, #1488] ; 7f8c <_Heap_Walk+0x5e8> 79b8: e59f95d0 ldr r9, [pc, #1488] ; 7f90 <_Heap_Walk+0x5ec> bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 79bc: e1a0a001 mov sl, r1 uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 79c0: 11a09002 movne r9, r2 Heap_Control *heap, int source, bool dump ) { uintptr_t const page_size = heap->page_size; 79c4: e5901010 ldr r1, [r0, #16] Heap_Block *const last_block = heap->last_block; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; if ( !_System_state_Is_up( _System_state_Get() ) ) { 79c8: e3530003 cmp r3, #3 int source, bool dump ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 79cc: e5902014 ldr r2, [r0, #20] Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; 79d0: e5903024 ldr r3, [r0, #36] ; 0x24 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 79d4: e24dd038 sub sp, sp, #56 ; 0x38 79d8: e1a04000 mov r4, r0 uintptr_t const page_size = heap->page_size; 79dc: e58d1024 str r1, [sp, #36] ; 0x24 uintptr_t const min_block_size = heap->min_block_size; 79e0: e58d2028 str r2, [sp, #40] ; 0x28 Heap_Block *const first_block = heap->first_block; 79e4: e5908020 ldr r8, [r0, #32] Heap_Block *const last_block = heap->last_block; 79e8: e58d302c str r3, [sp, #44] ; 0x2c Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; if ( !_System_state_Is_up( _System_state_Get() ) ) { 79ec: 0a000002 beq 79fc <_Heap_Walk+0x58> } block = next_block; } while ( block != first_block ); return true; 79f0: e3a00001 mov r0, #1 } 79f4: e28dd038 add sp, sp, #56 ; 0x38 79f8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; (*printer)( 79fc: e594101c ldr r1, [r4, #28] 7a00: e5900018 ldr r0, [r0, #24] 7a04: e2842008 add r2, r4, #8 7a08: e892000c ldm r2, {r2, r3} 7a0c: e59dc028 ldr ip, [sp, #40] ; 0x28 7a10: e58d1008 str r1, [sp, #8] 7a14: e59d102c ldr r1, [sp, #44] ; 0x2c 7a18: e58d0004 str r0, [sp, #4] 7a1c: e58d1010 str r1, [sp, #16] 7a20: e58d2014 str r2, [sp, #20] 7a24: e58d3018 str r3, [sp, #24] 7a28: e59f2564 ldr r2, [pc, #1380] ; 7f94 <_Heap_Walk+0x5f0> 7a2c: e58dc000 str ip, [sp] 7a30: e58d800c str r8, [sp, #12] 7a34: e1a0000a mov r0, sl 7a38: e3a01000 mov r1, #0 7a3c: e59d3024 ldr r3, [sp, #36] ; 0x24 7a40: e1a0e00f mov lr, pc 7a44: e12fff19 bx r9 heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 7a48: e59d2024 ldr r2, [sp, #36] ; 0x24 7a4c: e3520000 cmp r2, #0 7a50: 0a000026 beq 7af0 <_Heap_Walk+0x14c> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 7a54: e59d3024 ldr r3, [sp, #36] ; 0x24 7a58: e2135007 ands r5, r3, #7 7a5c: 1a00002a bne 7b0c <_Heap_Walk+0x168> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 7a60: e59d0028 ldr r0, [sp, #40] ; 0x28 7a64: e59d1024 ldr r1, [sp, #36] ; 0x24 7a68: ebffe55c bl fe0 <__umodsi3> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 7a6c: e250b000 subs fp, r0, #0 7a70: 1a00002c bne 7b28 <_Heap_Walk+0x184> 7a74: e2880008 add r0, r8, #8 7a78: e59d1024 ldr r1, [sp, #36] ; 0x24 7a7c: ebffe557 bl fe0 <__umodsi3> ); return false; } if ( 7a80: e2506000 subs r6, r0, #0 7a84: 1a00002f bne 7b48 <_Heap_Walk+0x1a4> block = next_block; } while ( block != first_block ); return true; } 7a88: e598b004 ldr fp, [r8, #4] ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 7a8c: e21b5001 ands r5, fp, #1 7a90: 0a0000fc beq 7e88 <_Heap_Walk+0x4e4> - 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; 7a94: e59dc02c ldr ip, [sp, #44] ; 0x2c 7a98: e59c3004 ldr r3, [ip, #4] 7a9c: e3c33001 bic r3, r3, #1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 7aa0: e08c3003 add r3, ip, r3 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 7aa4: e5935004 ldr r5, [r3, #4] ); return false; } if ( _Heap_Is_free( last_block ) ) { 7aa8: e2155001 ands r5, r5, #1 7aac: 0a000008 beq 7ad4 <_Heap_Walk+0x130> ); return false; } if ( 7ab0: e1580003 cmp r8, r3 7ab4: 0a00002b beq 7b68 <_Heap_Walk+0x1c4> _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 7ab8: e1a0000a mov r0, sl <== NOT EXECUTED 7abc: e3a01001 mov r1, #1 <== NOT EXECUTED 7ac0: e59f24d0 ldr r2, [pc, #1232] ; 7f98 <_Heap_Walk+0x5f4> <== NOT EXECUTED 7ac4: e1a0e00f mov lr, pc <== NOT EXECUTED 7ac8: e12fff19 bx r9 <== NOT EXECUTED if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 7acc: e1a00006 mov r0, r6 <== NOT EXECUTED 7ad0: eaffffc7 b 79f4 <_Heap_Walk+0x50> <== NOT EXECUTED return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 7ad4: e1a0000a mov r0, sl 7ad8: e3a01001 mov r1, #1 7adc: e59f24b8 ldr r2, [pc, #1208] ; 7f9c <_Heap_Walk+0x5f8> 7ae0: e1a0e00f mov lr, pc 7ae4: e12fff19 bx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 7ae8: e1a00005 mov r0, r5 7aec: eaffffc0 b 79f4 <_Heap_Walk+0x50> first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { (*printer)( source, true, "page size is zero\n" ); 7af0: e1a0000a mov r0, sl 7af4: e3a01001 mov r1, #1 7af8: e59f24a0 ldr r2, [pc, #1184] ; 7fa0 <_Heap_Walk+0x5fc> 7afc: e1a0e00f mov lr, pc 7b00: e12fff19 bx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 7b04: e59d0024 ldr r0, [sp, #36] ; 0x24 7b08: eaffffb9 b 79f4 <_Heap_Walk+0x50> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 7b0c: e1a0000a mov r0, sl 7b10: e3a01001 mov r1, #1 7b14: e59f2488 ldr r2, [pc, #1160] ; 7fa4 <_Heap_Walk+0x600> 7b18: e1a0e00f mov lr, pc 7b1c: e12fff19 bx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 7b20: e3a00000 mov r0, #0 7b24: eaffffb2 b 79f4 <_Heap_Walk+0x50> return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 7b28: e1a0000a mov r0, sl 7b2c: e3a01001 mov r1, #1 7b30: e59f2470 ldr r2, [pc, #1136] ; 7fa8 <_Heap_Walk+0x604> 7b34: e59d3028 ldr r3, [sp, #40] ; 0x28 7b38: e1a0e00f mov lr, pc 7b3c: e12fff19 bx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 7b40: e1a00005 mov r0, r5 7b44: eaffffaa b 79f4 <_Heap_Walk+0x50> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 7b48: e1a0000a mov r0, sl 7b4c: e3a01001 mov r1, #1 7b50: e59f2454 ldr r2, [pc, #1108] ; 7fac <_Heap_Walk+0x608> 7b54: e1a03008 mov r3, r8 7b58: e1a0e00f mov lr, pc 7b5c: e12fff19 bx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 7b60: e1a0000b mov r0, fp 7b64: eaffffa2 b 79f4 <_Heap_Walk+0x50> block = next_block; } while ( block != first_block ); return true; } 7b68: e5946008 ldr r6, [r4, #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 ) { 7b6c: e1540006 cmp r4, r6 int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 7b70: e5947010 ldr r7, [r4, #16] const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 7b74: 05943020 ldreq r3, [r4, #32] 7b78: 0a00002c beq 7c30 <_Heap_Walk+0x28c> block = next_block; } while ( block != first_block ); return true; } 7b7c: e5943020 ldr r3, [r4, #32] const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 7b80: e1530006 cmp r3, r6 7b84: 8a0000c6 bhi 7ea4 <_Heap_Walk+0x500> 7b88: e594c024 ldr ip, [r4, #36] ; 0x24 7b8c: e15c0006 cmp ip, r6 7b90: 3a0000c3 bcc 7ea4 <_Heap_Walk+0x500> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 7b94: e2860008 add r0, r6, #8 7b98: e1a01007 mov r1, r7 7b9c: e58d3020 str r3, [sp, #32] 7ba0: e58dc01c str ip, [sp, #28] 7ba4: ebffe50d bl fe0 <__umodsi3> ); return false; } if ( 7ba8: e3500000 cmp r0, #0 7bac: e59d3020 ldr r3, [sp, #32] 7bb0: e59dc01c ldr ip, [sp, #28] 7bb4: 1a0000d8 bne 7f1c <_Heap_Walk+0x578> - 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; 7bb8: e5962004 ldr r2, [r6, #4] 7bbc: e3c22001 bic r2, r2, #1 block = next_block; } while ( block != first_block ); return true; } 7bc0: e0862002 add r2, r6, r2 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 7bc4: e5922004 ldr r2, [r2, #4] ); return false; } if ( _Heap_Is_used( free_block ) ) { 7bc8: e3120001 tst r2, #1 7bcc: 1a0000db bne 7f40 <_Heap_Walk+0x59c> 7bd0: e58d8030 str r8, [sp, #48] ; 0x30 7bd4: e58db034 str fp, [sp, #52] ; 0x34 7bd8: e1a02004 mov r2, r4 7bdc: e1a08003 mov r8, r3 7be0: e1a0b00c mov fp, ip ); return false; } if ( free_block->prev != prev_block ) { 7be4: e596100c ldr r1, [r6, #12] 7be8: e1510002 cmp r1, r2 7bec: 1a0000dc bne 7f64 <_Heap_Walk+0x5c0> return false; } prev_block = free_block; free_block = free_block->next; 7bf0: e5965008 ldr r5, [r6, #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 ) { 7bf4: e1540005 cmp r4, r5 7bf8: 0a000009 beq 7c24 <_Heap_Walk+0x280> 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; 7bfc: e1580005 cmp r8, r5 7c00: 9a00007d bls 7dfc <_Heap_Walk+0x458> if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 7c04: e1a0000a mov r0, sl 7c08: e3a01001 mov r1, #1 7c0c: e59f239c ldr r2, [pc, #924] ; 7fb0 <_Heap_Walk+0x60c> 7c10: e1a03005 mov r3, r5 7c14: e1a0e00f mov lr, pc 7c18: e12fff19 bx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 7c1c: e3a00000 mov r0, #0 7c20: eaffff73 b 79f4 <_Heap_Walk+0x50> 7c24: e1a03008 mov r3, r8 7c28: e28d8030 add r8, sp, #48 ; 0x30 7c2c: e8980900 ldm r8, {r8, fp} ); return false; } if ( _Heap_Is_used( free_block ) ) { 7c30: e1a06008 mov r6, r8 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 7c34: e3cb7001 bic r7, fp, #1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 7c38: e0875006 add r5, r7, r6 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 7c3c: e1530005 cmp r3, r5 7c40: 9a000008 bls 7c68 <_Heap_Walk+0x2c4> Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 7c44: e1a0000a mov r0, sl 7c48: e58d5000 str r5, [sp] 7c4c: e3a01001 mov r1, #1 7c50: e59f235c ldr r2, [pc, #860] ; 7fb4 <_Heap_Walk+0x610> 7c54: e1a03006 mov r3, r6 7c58: e1a0e00f mov lr, pc 7c5c: e12fff19 bx r9 "block 0x%08x: next block 0x%08x not in heap\n", block, next_block ); return false; 7c60: e3a00000 mov r0, #0 7c64: eaffff62 b 79f4 <_Heap_Walk+0x50> 7c68: e5943024 ldr r3, [r4, #36] ; 0x24 7c6c: e1530005 cmp r3, r5 7c70: 3afffff3 bcc 7c44 <_Heap_Walk+0x2a0> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 7c74: e59d1024 ldr r1, [sp, #36] ; 0x24 7c78: e1a00007 mov r0, r7 7c7c: ebffe4d7 bl fe0 <__umodsi3> uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; 7c80: e59d102c ldr r1, [sp, #44] ; 0x2c 7c84: e0563001 subs r3, r6, r1 7c88: 13a03001 movne r3, #1 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { 7c8c: e3500000 cmp r0, #0 7c90: 0a000001 beq 7c9c <_Heap_Walk+0x2f8> 7c94: e3530000 cmp r3, #0 7c98: 1a000083 bne 7eac <_Heap_Walk+0x508> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { 7c9c: e59d2028 ldr r2, [sp, #40] ; 0x28 7ca0: e1520007 cmp r2, r7 7ca4: 9a000001 bls 7cb0 <_Heap_Walk+0x30c> 7ca8: e3530000 cmp r3, #0 7cac: 1a000087 bne 7ed0 <_Heap_Walk+0x52c> ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { 7cb0: e1560005 cmp r6, r5 7cb4: 3a000001 bcc 7cc0 <_Heap_Walk+0x31c> 7cb8: e3530000 cmp r3, #0 7cbc: 1a00008d bne 7ef8 <_Heap_Walk+0x554> 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; 7cc0: e5953004 ldr r3, [r5, #4] ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 7cc4: e3130001 tst r3, #1 7cc8: e20bb001 and fp, fp, #1 7ccc: 0a000018 beq 7d34 <_Heap_Walk+0x390> if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { 7cd0: e35b0000 cmp fp, #0 7cd4: 0a00000c beq 7d0c <_Heap_Walk+0x368> (*printer)( 7cd8: e58d7000 str r7, [sp] 7cdc: e1a0000a mov r0, sl 7ce0: e3a01000 mov r1, #0 7ce4: e59f22cc ldr r2, [pc, #716] ; 7fb8 <_Heap_Walk+0x614> 7ce8: e1a03006 mov r3, r6 7cec: e1a0e00f mov lr, pc 7cf0: e12fff19 bx r9 block->prev_size ); } block = next_block; } while ( block != first_block ); 7cf4: e1580005 cmp r8, r5 7cf8: 0affff3c beq 79f0 <_Heap_Walk+0x4c> 7cfc: e595b004 ldr fp, [r5, #4] 7d00: e5943020 ldr r3, [r4, #32] 7d04: e1a06005 mov r6, r5 7d08: eaffffc9 b 7c34 <_Heap_Walk+0x290> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 7d0c: e58d7000 str r7, [sp] 7d10: e5963000 ldr r3, [r6] 7d14: e1a0000a mov r0, sl 7d18: e58d3004 str r3, [sp, #4] 7d1c: e1a0100b mov r1, fp 7d20: e59f2294 ldr r2, [pc, #660] ; 7fbc <_Heap_Walk+0x618> 7d24: e1a03006 mov r3, r6 7d28: e1a0e00f mov lr, pc 7d2c: e12fff19 bx r9 7d30: eaffffef b 7cf4 <_Heap_Walk+0x350> 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 ? 7d34: e596200c ldr r2, [r6, #12] Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 7d38: e5943008 ldr r3, [r4, #8] 7d3c: e1530002 cmp r3, r2 block = next_block; } while ( block != first_block ); return true; } 7d40: e594100c ldr r1, [r4, #12] Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 7d44: 059f0274 ldreq r0, [pc, #628] ; 7fc0 <_Heap_Walk+0x61c> 7d48: 0a000003 beq 7d5c <_Heap_Walk+0x3b8> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 7d4c: e59f3270 ldr r3, [pc, #624] ; 7fc4 <_Heap_Walk+0x620> 7d50: e1540002 cmp r4, r2 7d54: e59f026c ldr r0, [pc, #620] ; 7fc8 <_Heap_Walk+0x624> 7d58: 01a00003 moveq r0, r3 block->next, block->next == last_free_block ? 7d5c: e5963008 ldr r3, [r6, #8] Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 7d60: e1510003 cmp r1, r3 7d64: 059f1260 ldreq r1, [pc, #608] ; 7fcc <_Heap_Walk+0x628> 7d68: 0a000003 beq 7d7c <_Heap_Walk+0x3d8> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 7d6c: e59fc25c ldr ip, [pc, #604] ; 7fd0 <_Heap_Walk+0x62c> 7d70: e1540003 cmp r4, r3 7d74: e59f124c ldr r1, [pc, #588] ; 7fc8 <_Heap_Walk+0x624> 7d78: 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)( 7d7c: e58d2004 str r2, [sp, #4] 7d80: e58d0008 str r0, [sp, #8] 7d84: e58d300c str r3, [sp, #12] 7d88: e58d1010 str r1, [sp, #16] 7d8c: e1a03006 mov r3, r6 7d90: e58d7000 str r7, [sp] 7d94: e1a0000a mov r0, sl 7d98: e3a01000 mov r1, #0 7d9c: e59f2230 ldr r2, [pc, #560] ; 7fd4 <_Heap_Walk+0x630> 7da0: e1a0e00f mov lr, pc 7da4: e12fff19 bx r9 block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 7da8: e5953000 ldr r3, [r5] 7dac: e1570003 cmp r7, r3 7db0: 1a000021 bne 7e3c <_Heap_Walk+0x498> ); return false; } if ( !prev_used ) { 7db4: e35b0000 cmp fp, #0 7db8: 0a00002a beq 7e68 <_Heap_Walk+0x4c4> block = next_block; } while ( block != first_block ); return true; } 7dbc: e5943008 ldr r3, [r4, #8] ) { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { 7dc0: e1540003 cmp r4, r3 7dc4: 0a000004 beq 7ddc <_Heap_Walk+0x438> if ( free_block == block ) { 7dc8: e1560003 cmp r6, r3 7dcc: 0affffc8 beq 7cf4 <_Heap_Walk+0x350> return true; } free_block = free_block->next; 7dd0: 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 ) { 7dd4: e1540003 cmp r4, r3 7dd8: 1afffffa bne 7dc8 <_Heap_Walk+0x424> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 7ddc: e1a0000a mov r0, sl 7de0: e3a01001 mov r1, #1 7de4: e59f21ec ldr r2, [pc, #492] ; 7fd8 <_Heap_Walk+0x634> 7de8: e1a03006 mov r3, r6 7dec: e1a0e00f mov lr, pc 7df0: e12fff19 bx r9 return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 7df4: e3a00000 mov r0, #0 7df8: eafffefd b 79f4 <_Heap_Walk+0x50> const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 7dfc: e155000b cmp r5, fp RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 7e00: e2850008 add r0, r5, #8 7e04: e1a01007 mov r1, r7 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 7e08: 8affff7d bhi 7c04 <_Heap_Walk+0x260> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 7e0c: ebffe473 bl fe0 <__umodsi3> ); return false; } if ( 7e10: e3500000 cmp r0, #0 7e14: 1a000041 bne 7f20 <_Heap_Walk+0x57c> - 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; 7e18: e5953004 ldr r3, [r5, #4] 7e1c: e3c33001 bic r3, r3, #1 block = next_block; } while ( block != first_block ); return true; } 7e20: e0833005 add r3, r3, r5 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 7e24: e5933004 ldr r3, [r3, #4] ); return false; } if ( _Heap_Is_used( free_block ) ) { 7e28: e3130001 tst r3, #1 7e2c: 1a000044 bne 7f44 <_Heap_Walk+0x5a0> 7e30: e1a02006 mov r2, r6 7e34: e1a06005 mov r6, r5 7e38: eaffff69 b 7be4 <_Heap_Walk+0x240> " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { (*printer)( 7e3c: e58d3004 str r3, [sp, #4] 7e40: e1a0000a mov r0, sl 7e44: e58d7000 str r7, [sp] 7e48: e58d5008 str r5, [sp, #8] 7e4c: e3a01001 mov r1, #1 7e50: e59f2184 ldr r2, [pc, #388] ; 7fdc <_Heap_Walk+0x638> 7e54: e1a03006 mov r3, r6 7e58: e1a0e00f mov lr, pc 7e5c: e12fff19 bx r9 return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 7e60: e3a00000 mov r0, #0 7e64: eafffee2 b 79f4 <_Heap_Walk+0x50> return false; } if ( !prev_used ) { (*printer)( 7e68: e1a0000a mov r0, sl 7e6c: e3a01001 mov r1, #1 7e70: e59f2168 ldr r2, [pc, #360] ; 7fe0 <_Heap_Walk+0x63c> 7e74: e1a03006 mov r3, r6 7e78: e1a0e00f mov lr, pc 7e7c: e12fff19 bx r9 return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 7e80: e1a0000b mov r0, fp 7e84: eafffeda b 79f4 <_Heap_Walk+0x50> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 7e88: e1a0000a mov r0, sl 7e8c: e3a01001 mov r1, #1 7e90: e59f214c ldr r2, [pc, #332] ; 7fe4 <_Heap_Walk+0x640> 7e94: e1a0e00f mov lr, pc 7e98: e12fff19 bx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 7e9c: e1a00005 mov r0, r5 7ea0: eafffed3 b 79f4 <_Heap_Walk+0x50> const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 7ea4: e1a05006 mov r5, r6 <== NOT EXECUTED 7ea8: eaffff55 b 7c04 <_Heap_Walk+0x260> <== NOT EXECUTED return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { (*printer)( 7eac: e1a0000a mov r0, sl 7eb0: e58d7000 str r7, [sp] 7eb4: e3a01001 mov r1, #1 7eb8: e59f2128 ldr r2, [pc, #296] ; 7fe8 <_Heap_Walk+0x644> 7ebc: e1a03006 mov r3, r6 7ec0: e1a0e00f mov lr, pc 7ec4: e12fff19 bx r9 "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 7ec8: e3a00000 mov r0, #0 7ecc: eafffec8 b 79f4 <_Heap_Walk+0x50> } if ( block_size < min_block_size && is_not_last_block ) { (*printer)( 7ed0: e58d2004 str r2, [sp, #4] 7ed4: e1a0000a mov r0, sl 7ed8: e58d7000 str r7, [sp] 7edc: e3a01001 mov r1, #1 7ee0: e59f2104 ldr r2, [pc, #260] ; 7fec <_Heap_Walk+0x648> 7ee4: e1a03006 mov r3, r6 7ee8: e1a0e00f mov lr, pc 7eec: e12fff19 bx r9 block, block_size, min_block_size ); return false; 7ef0: e3a00000 mov r0, #0 7ef4: eafffebe b 79f4 <_Heap_Walk+0x50> } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( 7ef8: e1a0000a mov r0, sl 7efc: e58d5000 str r5, [sp] 7f00: e3a01001 mov r1, #1 7f04: e59f20e4 ldr r2, [pc, #228] ; 7ff0 <_Heap_Walk+0x64c> 7f08: e1a03006 mov r3, r6 7f0c: e1a0e00f mov lr, pc 7f10: e12fff19 bx r9 "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 7f14: e3a00000 mov r0, #0 7f18: eafffeb5 b 79f4 <_Heap_Walk+0x50> ); return false; } if ( 7f1c: e1a05006 mov r5, r6 <== NOT EXECUTED !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 7f20: e1a0000a mov r0, sl 7f24: e3a01001 mov r1, #1 7f28: e59f20c4 ldr r2, [pc, #196] ; 7ff4 <_Heap_Walk+0x650> 7f2c: e1a03005 mov r3, r5 7f30: e1a0e00f mov lr, pc 7f34: e12fff19 bx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 7f38: e3a00000 mov r0, #0 7f3c: eafffeac b 79f4 <_Heap_Walk+0x50> ); return false; } if ( _Heap_Is_used( free_block ) ) { 7f40: e1a05006 mov r5, r6 <== NOT EXECUTED (*printer)( 7f44: e1a0000a mov r0, sl 7f48: e3a01001 mov r1, #1 7f4c: e59f20a4 ldr r2, [pc, #164] ; 7ff8 <_Heap_Walk+0x654> 7f50: e1a03005 mov r3, r5 7f54: e1a0e00f mov lr, pc 7f58: e12fff19 bx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 7f5c: e3a00000 mov r0, #0 7f60: eafffea3 b 79f4 <_Heap_Walk+0x50> return false; } if ( free_block->prev != prev_block ) { (*printer)( 7f64: e58d1000 str r1, [sp] 7f68: e1a0000a mov r0, sl 7f6c: e3a01001 mov r1, #1 7f70: e59f2084 ldr r2, [pc, #132] ; 7ffc <_Heap_Walk+0x658> 7f74: e1a03006 mov r3, r6 7f78: e1a0e00f mov lr, pc 7f7c: e12fff19 bx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 7f80: e3a00000 mov r0, #0 7f84: eafffe9a b 79f4 <_Heap_Walk+0x50> =============================================================================== 00006e80 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 6e80: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 6e84: e5904034 ldr r4, [r0, #52] ; 0x34 6e88: e3540000 cmp r4, #0 */ void _Objects_Extend_information( Objects_Information *information ) { 6e8c: e24dd014 sub sp, sp, #20 6e90: e1a05000 mov r5, r0 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 6e94: e1d070b8 ldrh r7, [r0, #8] index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 6e98: 0a00009b beq 710c <_Objects_Extend_information+0x28c> block_count = 0; else { block_count = information->maximum / information->allocation_size; 6e9c: e1d081b4 ldrh r8, [r0, #20] 6ea0: e1d0a1b0 ldrh sl, [r0, #16] 6ea4: e1a01008 mov r1, r8 6ea8: e1a0000a mov r0, sl 6eac: eb0029e5 bl 11648 <__aeabi_uidiv> 6eb0: e1a03800 lsl r3, r0, #16 for ( ; block < block_count; block++ ) { 6eb4: e1b03823 lsrs r3, r3, #16 6eb8: 0a000099 beq 7124 <_Objects_Extend_information+0x2a4> if ( information->object_blocks[ block ] == NULL ) { 6ebc: e5949000 ldr r9, [r4] 6ec0: e3590000 cmp r9, #0 6ec4: 01a01008 moveq r1, r8 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 6ec8: 01a06007 moveq r6, r7 index_base = minimum_index; block = 0; 6ecc: 01a04009 moveq r4, r9 block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { 6ed0: 0a00000c beq 6f08 <_Objects_Extend_information+0x88> 6ed4: e1a02004 mov r2, r4 6ed8: e1a01008 mov r1, r8 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 6edc: e1a06007 mov r6, r7 index_base = minimum_index; block = 0; 6ee0: e3a04000 mov r4, #0 6ee4: ea000002 b 6ef4 <_Objects_Extend_information+0x74> block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { 6ee8: e5b29004 ldr r9, [r2, #4]! 6eec: e3590000 cmp r9, #0 6ef0: 0a000004 beq 6f08 <_Objects_Extend_information+0x88> if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 6ef4: e2844001 add r4, r4, #1 6ef8: e1530004 cmp r3, r4 if ( information->object_blocks[ block ] == NULL ) { do_extend = false; break; } else index_base += information->allocation_size; 6efc: e0866008 add r6, r6, r8 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 6f00: 8afffff8 bhi 6ee8 <_Objects_Extend_information+0x68> /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; 6f04: e3a09001 mov r9, #1 } else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 6f08: e08aa001 add sl, sl, r1 /* * We need to limit the number of objects to the maximum number * representable in the index portion of the object Id. In the * case of 16-bit Ids, this is only 256 object instances. */ if ( maximum > OBJECTS_ID_FINAL_INDEX ) { 6f0c: e35a0801 cmp sl, #65536 ; 0x10000 6f10: 2a000063 bcs 70a4 <_Objects_Extend_information+0x224> /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; if ( information->auto_extend ) { 6f14: e5d52012 ldrb r2, [r5, #18] /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; 6f18: e5950018 ldr r0, [r5, #24] if ( information->auto_extend ) { 6f1c: e3520000 cmp r2, #0 /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; 6f20: e0000091 mul r0, r1, r0 if ( information->auto_extend ) { 6f24: 1a000060 bne 70ac <_Objects_Extend_information+0x22c> new_object_block = _Workspace_Allocate( block_size ); if ( !new_object_block ) return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 6f28: e58d3000 str r3, [sp] 6f2c: eb000879 bl 9118 <_Workspace_Allocate_or_fatal_error> 6f30: e59d3000 ldr r3, [sp] 6f34: e1a08000 mov r8, r0 } /* * Do we need to grow the tables? */ if ( do_extend ) { 6f38: e3590000 cmp r9, #0 6f3c: 0a000039 beq 7028 <_Objects_Extend_information+0x1a8> */ /* * Up the block count and maximum */ block_count++; 6f40: e283b001 add fp, r3, #1 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + 6f44: e08b008b add r0, fp, fp, lsl #1 ((maximum + minimum_index) * sizeof(Objects_Control *)); 6f48: e08a0000 add r0, sl, r0 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + 6f4c: e0800007 add r0, r0, r7 ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 6f50: e1a00100 lsl r0, r0, #2 6f54: e58d3000 str r3, [sp] 6f58: eb000864 bl 90f0 <_Workspace_Allocate> if ( !object_blocks ) { 6f5c: e2509000 subs r9, r0, #0 6f60: e59d3000 ldr r3, [sp] 6f64: 0a000073 beq 7138 <_Objects_Extend_information+0x2b8> * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 6f68: e1d521b0 ldrh r2, [r5, #16] 6f6c: e1570002 cmp r7, r2 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 6f70: e089c10b add ip, r9, fp, lsl #2 6f74: e089b18b add fp, r9, fp, lsl #3 6f78: 3a000051 bcc 70c4 <_Objects_Extend_information+0x244> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 6f7c: e3570000 cmp r7, #0 6f80: 13a02000 movne r2, #0 6f84: 11a0100b movne r1, fp local_table[ index ] = NULL; 6f88: 11a00002 movne r0, r2 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 6f8c: 0a000003 beq 6fa0 <_Objects_Extend_information+0x120> 6f90: e2822001 add r2, r2, #1 6f94: e1570002 cmp r7, r2 local_table[ index ] = NULL; 6f98: e4810004 str r0, [r1], #4 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 6f9c: 8afffffb bhi 6f90 <_Objects_Extend_information+0x110> 6fa0: e1a03103 lsl r3, r3, #2 */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 6fa4: e1d511b4 ldrh r1, [r5, #20] 6fa8: e0861001 add r1, r6, r1 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 6fac: e3a00000 mov r0, #0 inactive_per_block[block_count] = 0; for ( index=index_base ; 6fb0: e1560001 cmp r6, r1 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 6fb4: e7890003 str r0, [r9, r3] inactive_per_block[block_count] = 0; 6fb8: e78c0003 str r0, [ip, r3] for ( index=index_base ; 6fbc: 2a000005 bcs 6fd8 <_Objects_Extend_information+0x158> 6fc0: e08b2106 add r2, fp, r6, lsl #2 * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( 6fc4: e1a03006 mov r3, r6 object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { 6fc8: e2833001 add r3, r3, #1 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 6fcc: e1530001 cmp r3, r1 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 6fd0: e4820004 str r0, [r2], #4 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 6fd4: 3afffffb bcc 6fc8 <_Objects_Extend_information+0x148> 6fd8: e10f3000 mrs r3, CPSR 6fdc: e3832080 orr r2, r3, #128 ; 0x80 6fe0: e129f002 msr CPSR_fc, r2 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 6fe4: e5952000 ldr r2, [r5] information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 6fe8: e1d510b4 ldrh r1, [r5, #4] 6fec: e1a02c02 lsl r2, r2, #24 old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; 6ff0: e1a0a80a lsl sl, sl, #16 6ff4: e3822801 orr r2, r2, #65536 ; 0x10000 6ff8: e1a0a82a lsr sl, sl, #16 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 6ffc: e1822d81 orr r2, r2, r1, lsl #27 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 7000: e182200a orr r2, r2, sl local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 7004: e5950034 ldr r0, [r5, #52] ; 0x34 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 7008: e585c030 str ip, [r5, #48] ; 0x30 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 700c: e5859034 str r9, [r5, #52] ; 0x34 information->inactive_per_block = inactive_per_block; information->local_table = local_table; 7010: e585b01c str fp, [r5, #28] information->maximum = (Objects_Maximum) maximum; 7014: e1c5a1b0 strh sl, [r5, #16] information->maximum_id = _Objects_Build_id( 7018: e585200c str r2, [r5, #12] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 701c: e129f003 msr CPSR_fc, r3 information->maximum ); _ISR_Enable( level ); if ( old_tables ) 7020: e3500000 cmp r0, #0 _Workspace_Free( old_tables ); 7024: 1b000837 blne 9108 <_Workspace_Free> } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 7028: e5953034 ldr r3, [r5, #52] ; 0x34 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 702c: e28d7008 add r7, sp, #8 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 7030: e7838104 str r8, [r3, r4, lsl #2] /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 7034: e1a01008 mov r1, r8 7038: e1a00007 mov r0, r7 703c: e1d521b4 ldrh r2, [r5, #20] 7040: e5953018 ldr r3, [r5, #24] 7044: eb00125f bl b9c8 <_Chain_Initialize> } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 7048: e1a04104 lsl r4, r4, #2 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 704c: e2858020 add r8, r5, #32 /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 7050: ea000009 b 707c <_Objects_Extend_information+0x1fc> 7054: e5953000 ldr r3, [r5] the_object->id = _Objects_Build_id( 7058: e1d520b4 ldrh r2, [r5, #4] 705c: e1a03c03 lsl r3, r3, #24 7060: e3833801 orr r3, r3, #65536 ; 0x10000 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 7064: e1833d82 orr r3, r3, r2, lsl #27 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 7068: e1833006 orr r3, r3, r6 706c: e5813008 str r3, [r1, #8] information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 7070: e1a00008 mov r0, r8 7074: ebfffce9 bl 6420 <_Chain_Append> index++; 7078: e2866001 add r6, r6, #1 /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 707c: e1a00007 mov r0, r7 7080: ebfffcf9 bl 646c <_Chain_Get> 7084: e2501000 subs r1, r0, #0 7088: 1afffff1 bne 7054 <_Objects_Extend_information+0x1d4> index++; } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); 708c: e1d522bc ldrh r2, [r5, #44] ; 0x2c _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 7090: e1d531b4 ldrh r3, [r5, #20] 7094: e5951030 ldr r1, [r5, #48] ; 0x30 information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); 7098: e0832002 add r2, r3, r2 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 709c: e7813004 str r3, [r1, r4] information->inactive = 70a0: e1c522bc strh r2, [r5, #44] ; 0x2c (Objects_Maximum)(information->inactive + information->allocation_size); } 70a4: e28dd014 add sp, sp, #20 70a8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; if ( information->auto_extend ) { new_object_block = _Workspace_Allocate( block_size ); 70ac: e58d3000 str r3, [sp] 70b0: eb00080e bl 90f0 <_Workspace_Allocate> if ( !new_object_block ) 70b4: e2508000 subs r8, r0, #0 70b8: e59d3000 ldr r3, [sp] 70bc: 1affff9d bne 6f38 <_Objects_Extend_information+0xb8> 70c0: eafffff7 b 70a4 <_Objects_Extend_information+0x224> /* * Copy each section of the table over. This has to be performed as * separate parts as size of each block has changed. */ memcpy( object_blocks, 70c4: e1a03103 lsl r3, r3, #2 70c8: e5951034 ldr r1, [r5, #52] ; 0x34 70cc: e1a02003 mov r2, r3 70d0: e88d1008 stm sp, {r3, ip} 70d4: eb001deb bl e888 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 70d8: e89d1008 ldm sp, {r3, ip} 70dc: e1a0000c mov r0, ip 70e0: e1a02003 mov r2, r3 70e4: e5951030 ldr r1, [r5, #48] ; 0x30 70e8: eb001de6 bl e888 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, information->local_table, (information->maximum + minimum_index) * sizeof(Objects_Control *) ); 70ec: e1d521b0 ldrh r2, [r5, #16] 70f0: e0872002 add r2, r7, r2 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 70f4: e1a0000b mov r0, fp 70f8: e595101c ldr r1, [r5, #28] 70fc: e1a02102 lsl r2, r2, #2 7100: eb001de0 bl e888 7104: e89d1008 ldm sp, {r3, ip} 7108: eaffffa5 b 6fa4 <_Objects_Extend_information+0x124> minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 710c: e1d0a1b0 ldrh sl, [r0, #16] 7110: e1d011b4 ldrh r1, [r0, #20] /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 7114: e1a06007 mov r6, r7 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; 7118: e3a09001 mov r9, #1 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) block_count = 0; 711c: e1a03004 mov r3, r4 7120: eaffff78 b 6f08 <_Objects_Extend_information+0x88> else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 7124: e1a01008 mov r1, r8 <== NOT EXECUTED /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 7128: e1a06007 mov r6, r7 <== NOT EXECUTED /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; 712c: e3a09001 mov r9, #1 <== NOT EXECUTED minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; 7130: e1a04003 mov r4, r3 <== NOT EXECUTED 7134: eaffff73 b 6f08 <_Objects_Extend_information+0x88> <== NOT EXECUTED (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); if ( !object_blocks ) { _Workspace_Free( new_object_block ); 7138: e1a00008 mov r0, r8 713c: eb0007f1 bl 9108 <_Workspace_Free> return; 7140: eaffffd7 b 70a4 <_Objects_Extend_information+0x224> =============================================================================== 000074b0 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 74b0: e92d40f0 push {r4, r5, r6, r7, lr} /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 74b4: e1d040b8 ldrh r4, [r0, #8] block_count = (information->maximum - index_base) / 74b8: e1d051b4 ldrh r5, [r0, #20] */ void _Objects_Shrink_information( Objects_Information *information ) { 74bc: e1a06000 mov r6, r0 /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / 74c0: e1d001b0 ldrh r0, [r0, #16] 74c4: e1a01005 mov r1, r5 74c8: e0640000 rsb r0, r4, r0 74cc: eb00285d bl 11648 <__aeabi_uidiv> information->allocation_size; for ( block = 0; block < block_count; block++ ) { 74d0: e3500000 cmp r0, #0 74d4: 08bd80f0 popeq {r4, r5, r6, r7, pc} if ( information->inactive_per_block[ block ] == 74d8: e5962030 ldr r2, [r6, #48] ; 0x30 74dc: e5923000 ldr r3, [r2] 74e0: e1550003 cmp r5, r3 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 74e4: 13a03000 movne r3, #0 if ( information->inactive_per_block[ block ] == 74e8: 1a000005 bne 7504 <_Objects_Shrink_information+0x54> 74ec: ea000008 b 7514 <_Objects_Shrink_information+0x64> <== NOT EXECUTED 74f0: e5b21004 ldr r1, [r2, #4]! 74f4: e1550001 cmp r5, r1 information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 74f8: e0844005 add r4, r4, r5 74fc: e1a07103 lsl r7, r3, #2 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == 7500: 0a000004 beq 7518 <_Objects_Shrink_information+0x68> index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 7504: e2833001 add r3, r3, #1 7508: e1500003 cmp r0, r3 750c: 8afffff7 bhi 74f0 <_Objects_Shrink_information+0x40> 7510: e8bd80f0 pop {r4, r5, r6, r7, pc} if ( information->inactive_per_block[ block ] == 7514: e3a07000 mov r7, #0 <== NOT EXECUTED information->allocation_size ) { /* * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) _Chain_First( &information->Inactive ); 7518: e5960020 ldr r0, [r6, #32] 751c: ea000002 b 752c <_Objects_Shrink_information+0x7c> if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); 7520: e3550000 cmp r5, #0 7524: 0a00000b beq 7558 <_Objects_Shrink_information+0xa8> index = _Objects_Get_index( the_object->id ); /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; 7528: e1a00005 mov r0, r5 * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) _Chain_First( &information->Inactive ); do { index = _Objects_Get_index( the_object->id ); 752c: e1d030b8 ldrh r3, [r0, #8] /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && 7530: e1530004 cmp r3, r4 index = _Objects_Get_index( the_object->id ); /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; 7534: e5905000 ldr r5, [r0] if ((index >= index_base) && 7538: 3afffff8 bcc 7520 <_Objects_Shrink_information+0x70> (index < (index_base + information->allocation_size))) { 753c: e1d621b4 ldrh r2, [r6, #20] 7540: e0842002 add r2, r4, r2 /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && 7544: e1530002 cmp r3, r2 7548: 2afffff4 bcs 7520 <_Objects_Shrink_information+0x70> (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); 754c: ebfffbbe bl 644c <_Chain_Extract> } } while ( the_object ); 7550: e3550000 cmp r5, #0 7554: 1afffff3 bne 7528 <_Objects_Shrink_information+0x78> /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 7558: e5963034 ldr r3, [r6, #52] ; 0x34 755c: e7930007 ldr r0, [r3, r7] 7560: eb0006e8 bl 9108 <_Workspace_Free> information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 7564: e1d602bc ldrh r0, [r6, #44] ; 0x2c 7568: e1d631b4 ldrh r3, [r6, #20] /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 756c: e5961034 ldr r1, [r6, #52] ; 0x34 information->inactive_per_block[ block ] = 0; 7570: e5962030 ldr r2, [r6, #48] ; 0x30 information->inactive -= information->allocation_size; 7574: e0633000 rsb r3, r3, r0 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 7578: e7815007 str r5, [r1, r7] information->inactive_per_block[ block ] = 0; 757c: e7825007 str r5, [r2, r7] information->inactive -= information->allocation_size; 7580: e1c632bc strh r3, [r6, #44] ; 0x2c return; 7584: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== 0000df4c <_POSIX_signals_Clear_process_signals>: static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( df4c: e10f2000 mrs r2, CPSR df50: e3823080 orr r3, r2, #128 ; 0x80 df54: e129f003 msr CPSR_fc, r3 mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { df58: e59f1050 ldr r1, [pc, #80] ; dfb0 <_POSIX_signals_Clear_process_signals+0x64> df5c: e0803080 add r3, r0, r0, lsl #1 df60: e1a03103 lsl r3, r3, #2 df64: e7911003 ldr r1, [r1, r3] df68: e3510002 cmp r1, #2 df6c: 0a000007 beq df90 <_POSIX_signals_Clear_process_signals+0x44> if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; df70: e59f303c ldr r3, [pc, #60] ; dfb4 <_POSIX_signals_Clear_process_signals+0x68> df74: e5931000 ldr r1, [r3] df78: e3a0c001 mov ip, #1 df7c: e2400001 sub r0, r0, #1 df80: e1c1001c bic r0, r1, ip, lsl r0 df84: e5830000 str r0, [r3] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( df88: e129f002 msr CPSR_fc, r2 } _ISR_Enable( level ); } df8c: e12fff1e bx lr df90: e59f1020 ldr r1, [pc, #32] ; dfb8 <_POSIX_signals_Clear_process_signals+0x6c> RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); df94: e283c004 add ip, r3, #4 ISR_Level level; _ISR_Disable( level ); if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) df98: e7913003 ldr r3, [r1, r3] df9c: e08c1001 add r1, ip, r1 dfa0: e1530001 cmp r3, r1 dfa4: 0afffff1 beq df70 <_POSIX_signals_Clear_process_signals+0x24> dfa8: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; } _ISR_Enable( level ); } dfac: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 00022440 <_POSIX_signals_Unblock_thread>: bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 22440: e92d40f0 push {r4, r5, r6, r7, lr} /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 22444: e5905010 ldr r5, [r0, #16] 22448: e3c534ef bic r3, r5, #-285212672 ; 0xef000000 2244c: e3c338ff bic r3, r3, #16711680 ; 0xff0000 22450: e3c33c7f bic r3, r3, #32512 ; 0x7f00 22454: e3a0c201 mov ip, #268435456 ; 0x10000000 22458: e3c330ff bic r3, r3, #255 ; 0xff 2245c: e28cc902 add ip, ip, #32768 ; 0x8000 22460: e2417001 sub r7, r1, #1 22464: e3a06001 mov r6, #1 22468: e153000c cmp r3, ip bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 2246c: e1a04000 mov r4, r0 POSIX_API_Control *api; sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 22470: e59030fc ldr r3, [r0, #252] ; 0xfc 22474: e1a07716 lsl r7, r6, r7 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 22478: 0a00001b beq 224ec <_POSIX_signals_Unblock_thread+0xac> } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { 2247c: e59330d0 ldr r3, [r3, #208] ; 0xd0 22480: e1d77003 bics r7, r7, r3 22484: 0a000016 beq 224e4 <_POSIX_signals_Unblock_thread+0xa4> * it is not blocked, THEN * we need to dispatch at the end of this ISR. * + Any other combination, do nothing. */ if ( _States_Is_interruptible_by_signal( the_thread->current_state ) ) { 22488: e2157201 ands r7, r5, #268435456 ; 0x10000000 2248c: 0a000012 beq 224dc <_POSIX_signals_Unblock_thread+0x9c> */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue ( States_Control the_states ) { return (the_states & STATES_WAITING_ON_THREAD_QUEUE); 22490: e3c564ff bic r6, r5, #-16777216 ; 0xff000000 22494: e3c6673f bic r6, r6, #16515072 ; 0xfc0000 22498: e3c66c41 bic r6, r6, #16640 ; 0x4100 2249c: e3c6601f bic r6, r6, #31 the_thread->Wait.return_code = EINTR; 224a0: e3a03004 mov r3, #4 /* * In pthread_cond_wait, a thread will be blocking on a thread * queue, but is also interruptible by a POSIX signal. */ if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) 224a4: e3560000 cmp r6, #0 * we need to dispatch at the end of this ISR. * + Any other combination, do nothing. */ if ( _States_Is_interruptible_by_signal( the_thread->current_state ) ) { the_thread->Wait.return_code = EINTR; 224a8: e5803034 str r3, [r0, #52] ; 0x34 /* * In pthread_cond_wait, a thread will be blocking on a thread * queue, but is also interruptible by a POSIX signal. */ if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) 224ac: 1a00002e bne 2256c <_POSIX_signals_Unblock_thread+0x12c> _Thread_queue_Extract_with_proxy( the_thread ); else if ( _States_Is_delaying(the_thread->current_state) ) { 224b0: e2150008 ands r0, r5, #8 224b4: 08bd80f0 popeq {r4, r5, r6, r7, pc} (void) _Watchdog_Remove( &the_thread->Timer ); 224b8: e2840048 add r0, r4, #72 ; 0x48 224bc: ebffb033 bl e590 <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 224c0: e3a01201 mov r1, #268435456 ; 0x10000000 224c4: e2811bff add r1, r1, #261120 ; 0x3fc00 224c8: e1a00004 mov r0, r4 224cc: e2811ffe add r1, r1, #1016 ; 0x3f8 224d0: ebffab27 bl d174 <_Thread_Clear_state> } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; 224d4: e1a00006 mov r0, r6 224d8: e8bd80f0 pop {r4, r5, r6, r7, pc} else if ( _States_Is_delaying(the_thread->current_state) ) { (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { 224dc: e3550000 cmp r5, #0 224e0: 0a000016 beq 22540 <_POSIX_signals_Unblock_thread+0x100> if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; 224e4: e1a00007 mov r0, r7 224e8: e8bd80f0 pop {r4, r5, r6, r7, pc} * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 224ec: e5900030 ldr r0, [r0, #48] ; 0x30 224f0: e1170000 tst r7, r0 224f4: 0a00000d beq 22530 <_POSIX_signals_Unblock_thread+0xf0> the_thread->Wait.return_code = EINTR; 224f8: e3a03004 mov r3, #4 the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { 224fc: e3520000 cmp r2, #0 */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { the_thread->Wait.return_code = EINTR; 22500: e5843034 str r3, [r4, #52] ; 0x34 the_info = (siginfo_t *) the_thread->Wait.return_argument; 22504: e5943028 ldr r3, [r4, #40] ; 0x28 if ( !info ) { the_info->si_signo = signo; the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; } else { *the_info = *info; 22508: 18920007 ldmne r2, {r0, r1, r2} the_thread->Wait.return_code = EINTR; the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; 2250c: 05831000 streq r1, [r3] the_info->si_code = SI_USER; 22510: 03a01001 moveq r1, #1 the_info->si_value.sival_int = 0; } else { *the_info = *info; 22514: 18830007 stmne r3, {r0, r1, r2} the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; the_info->si_code = SI_USER; 22518: 05831004 streq r1, [r3, #4] the_info->si_value.sival_int = 0; 2251c: 05832008 streq r2, [r3, #8] } else { *the_info = *info; } _Thread_queue_Extract_with_proxy( the_thread ); 22520: e1a00004 mov r0, r4 22524: ebffadba bl dc14 <_Thread_queue_Extract_with_proxy> return true; 22528: e3a00001 mov r0, #1 2252c: e8bd80f0 pop {r4, r5, r6, r7, pc} * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 22530: e59300d0 ldr r0, [r3, #208] ; 0xd0 22534: e1d70000 bics r0, r7, r0 22538: 1affffee bne 224f8 <_POSIX_signals_Unblock_thread+0xb8> 2253c: e8bd80f0 pop {r4, r5, r6, r7, pc} (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 22540: e59f2030 ldr r2, [pc, #48] ; 22578 <_POSIX_signals_Unblock_thread+0x138> 22544: e5920000 ldr r0, [r2] 22548: e3500000 cmp r0, #0 2254c: 08bd80f0 popeq {r4, r5, r6, r7, pc} 22550: e5923004 ldr r3, [r2, #4] 22554: e1540003 cmp r4, r3 _Thread_Dispatch_necessary = true; 22558: 05c26010 strbeq r6, [r2, #16] } } return false; 2255c: 01a00005 moveq r0, r5 (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 22560: 08bd80f0 popeq {r4, r5, r6, r7, pc} _Thread_Dispatch_necessary = true; } } return false; 22564: e1a00005 mov r0, r5 <== NOT EXECUTED } 22568: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED /* * In pthread_cond_wait, a thread will be blocking on a thread * queue, but is also interruptible by a POSIX signal. */ if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) _Thread_queue_Extract_with_proxy( the_thread ); 2256c: ebffada8 bl dc14 <_Thread_queue_Extract_with_proxy> } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; 22570: e3a00000 mov r0, #0 22574: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== 00006aac <_TOD_Validate>: { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); 6aac: e59f30b8 ldr r3, [pc, #184] ; 6b6c <_TOD_Validate+0xc0> */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 6ab0: e92d4010 push {r4, lr} uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 6ab4: e2504000 subs r4, r0, #0 { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); 6ab8: e593100c ldr r1, [r3, #12] (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; 6abc: 01a00004 moveq r0, r4 uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 6ac0: 08bd8010 popeq {r4, pc} ) { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / 6ac4: e3a0093d mov r0, #999424 ; 0xf4000 6ac8: e2800d09 add r0, r0, #576 ; 0x240 6acc: eb0048cf bl 18e10 <__aeabi_uidiv> rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 6ad0: e5943018 ldr r3, [r4, #24] 6ad4: e1500003 cmp r0, r3 6ad8: 9a00001f bls 6b5c <_TOD_Validate+0xb0> (the_tod->ticks >= ticks_per_second) || 6adc: e5943014 ldr r3, [r4, #20] 6ae0: e353003b cmp r3, #59 ; 0x3b 6ae4: 8a00001c bhi 6b5c <_TOD_Validate+0xb0> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 6ae8: e5943010 ldr r3, [r4, #16] 6aec: e353003b cmp r3, #59 ; 0x3b 6af0: 8a000019 bhi 6b5c <_TOD_Validate+0xb0> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 6af4: e594300c ldr r3, [r4, #12] 6af8: e3530017 cmp r3, #23 6afc: 8a000016 bhi 6b5c <_TOD_Validate+0xb0> (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || 6b00: e5940004 ldr r0, [r4, #4] rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || (the_tod->ticks >= ticks_per_second) || (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || 6b04: e3500000 cmp r0, #0 6b08: 08bd8010 popeq {r4, pc} (the_tod->month == 0) || 6b0c: e350000c cmp r0, #12 6b10: 8a000011 bhi 6b5c <_TOD_Validate+0xb0> (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 6b14: e5942000 ldr r2, [r4] (the_tod->ticks >= ticks_per_second) || (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || 6b18: e3a03d1f mov r3, #1984 ; 0x7c0 6b1c: e2833003 add r3, r3, #3 6b20: e1520003 cmp r2, r3 6b24: 9a00000c bls 6b5c <_TOD_Validate+0xb0> (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 6b28: e5944008 ldr r4, [r4, #8] (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 6b2c: e3540000 cmp r4, #0 6b30: 0a00000b beq 6b64 <_TOD_Validate+0xb8> (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 6b34: e3120003 tst r2, #3 days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 6b38: 059f3030 ldreq r3, [pc, #48] ; 6b70 <_TOD_Validate+0xc4> else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 6b3c: 159f302c ldrne r3, [pc, #44] ; 6b70 <_TOD_Validate+0xc4> (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 6b40: 0280000d addeq r0, r0, #13 6b44: 07930100 ldreq r0, [r3, r0, lsl #2] else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 6b48: 17930100 ldrne r0, [r3, r0, lsl #2] * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 6b4c: e1500004 cmp r0, r4 6b50: 33a00000 movcc r0, #0 6b54: 23a00001 movcs r0, #1 6b58: e8bd8010 pop {r4, pc} (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; 6b5c: e3a00000 mov r0, #0 6b60: e8bd8010 pop {r4, pc} 6b64: e1a00004 mov r0, r4 if ( the_tod->day > days_in_month ) return false; return true; } 6b68: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== 00008c78 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 8c78: e92d40f0 push {r4, r5, r6, r7, lr} return false; } } return true; } 8c7c: e59f5050 ldr r5, [pc, #80] ; 8cd4 <_User_extensions_Thread_create+0x5c> 8c80: e4954004 ldr r4, [r5], #4 { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); 8c84: e1540005 cmp r4, r5 #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 8c88: e1a06000 mov r6, r0 Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); 8c8c: 0a00000e beq 8ccc <_User_extensions_Thread_create+0x54> the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_create != NULL ) { status = (*the_extension->Callouts.thread_create)( 8c90: e59f7040 ldr r7, [pc, #64] ; 8cd8 <_User_extensions_Thread_create+0x60> !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_create != NULL ) { 8c94: e5943014 ldr r3, [r4, #20] 8c98: e3530000 cmp r3, #0 status = (*the_extension->Callouts.thread_create)( 8c9c: e1a01006 mov r1, r6 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_create != NULL ) { 8ca0: 0a000004 beq 8cb8 <_User_extensions_Thread_create+0x40> status = (*the_extension->Callouts.thread_create)( 8ca4: e5970004 ldr r0, [r7, #4] 8ca8: e1a0e00f mov lr, pc 8cac: e12fff13 bx r3 _Thread_Executing, the_thread ); if ( !status ) 8cb0: e3500000 cmp r0, #0 8cb4: 08bd80f0 popeq {r4, r5, r6, r7, pc} User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 8cb8: e5944000 ldr r4, [r4] { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); 8cbc: e1540005 cmp r4, r5 8cc0: 1afffff3 bne 8c94 <_User_extensions_Thread_create+0x1c> if ( !status ) return false; } } return true; 8cc4: e3a00001 mov r0, #1 8cc8: e8bd80f0 pop {r4, r5, r6, r7, pc} 8ccc: e3a00001 mov r0, #1 <== NOT EXECUTED } 8cd0: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED =============================================================================== 0000aafc <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { aafc: e92d41f0 push {r4, r5, r6, r7, r8, lr} ab00: e1a04000 mov r4, r0 ab04: e1a05002 mov r5, r2 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( ab08: e10f2000 mrs r2, CPSR ab0c: e3823080 orr r3, r2, #128 ; 0x80 ab10: e129f003 msr CPSR_fc, r3 } } _ISR_Enable( level ); } ab14: e1a07000 mov r7, r0 ab18: e4973004 ldr r3, [r7], #4 * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { ab1c: e1530007 cmp r3, r7 ab20: 0a00001a beq ab90 <_Watchdog_Adjust+0x94> switch ( direction ) { ab24: e3510000 cmp r1, #0 ab28: 1a00001a bne ab98 <_Watchdog_Adjust+0x9c> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { ab2c: e3550000 cmp r5, #0 ab30: 0a000016 beq ab90 <_Watchdog_Adjust+0x94> if ( units < _Watchdog_First( header )->delta_interval ) { ab34: e5936010 ldr r6, [r3, #16] ab38: e1550006 cmp r5, r6 ab3c: 21a01002 movcs r1, r2 _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; ab40: 23a08001 movcs r8, #1 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { ab44: 2a000005 bcs ab60 <_Watchdog_Adjust+0x64> ab48: ea00001a b abb8 <_Watchdog_Adjust+0xbc> <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { ab4c: e0555006 subs r5, r5, r6 ab50: 0a00000d beq ab8c <_Watchdog_Adjust+0x90> if ( units < _Watchdog_First( header )->delta_interval ) { ab54: e5936010 ldr r6, [r3, #16] ab58: e1560005 cmp r6, r5 ab5c: 8a000014 bhi abb4 <_Watchdog_Adjust+0xb8> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; ab60: e5838010 str r8, [r3, #16] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( ab64: e129f001 msr CPSR_fc, r1 _ISR_Enable( level ); _Watchdog_Tickle( header ); ab68: e1a00004 mov r0, r4 ab6c: eb0000a4 bl ae04 <_Watchdog_Tickle> static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( ab70: e10f1000 mrs r1, CPSR ab74: e3813080 orr r3, r1, #128 ; 0x80 ab78: e129f003 msr CPSR_fc, r3 } } _ISR_Enable( level ); } ab7c: e5942000 ldr r2, [r4] _Watchdog_Tickle( header ); _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) ab80: e1570002 cmp r7, r2 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) _Chain_First( header ) ); ab84: e1a03002 mov r3, r2 ab88: 1affffef bne ab4c <_Watchdog_Adjust+0x50> ab8c: e1a02001 mov r2, r1 static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( ab90: e129f002 msr CPSR_fc, r2 } } _ISR_Enable( level ); } ab94: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { ab98: e3510001 cmp r1, #1 ab9c: 1afffffb bne ab90 <_Watchdog_Adjust+0x94> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; aba0: e5931010 ldr r1, [r3, #16] aba4: e0815005 add r5, r1, r5 aba8: e5835010 str r5, [r3, #16] abac: e129f002 msr CPSR_fc, r2 } } _ISR_Enable( level ); } abb0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( abb4: e1a02001 mov r2, r1 _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; abb8: e0655006 rsb r5, r5, r6 abbc: e5835010 str r5, [r3, #16] break; abc0: eafffff2 b ab90 <_Watchdog_Adjust+0x94> =============================================================================== 00006a14 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 6a14: e92d41f0 push {r4, r5, r6, r7, r8, lr} /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 6a18: e1a00001 mov r0, r1 int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 6a1c: e24dd048 sub sp, sp, #72 ; 0x48 6a20: e1a05001 mov r5, r1 6a24: e1a06002 mov r6, r2 /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 6a28: ebfffa34 bl 5300 if ( old_parent_pathlen == 0 ) 6a2c: e2507000 subs r7, r0, #0 6a30: 1a000059 bne 6b9c <_rename_r+0x188> rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 6a34: e28d4018 add r4, sp, #24 6a38: e1a00005 mov r0, r5 6a3c: e28d1044 add r1, sp, #68 ; 0x44 6a40: e1a02004 mov r2, r4 6a44: eb0000e8 bl 6dec rtems_filesystem_location_info_t old_parent_loc; rtems_filesystem_location_info_t new_parent_loc; int i; int result; const char *name; bool free_old_parentloc = false; 6a48: e1a08007 mov r8, r7 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 6a4c: e1a0e004 mov lr, r4 6a50: e8be000f ldm lr!, {r0, r1, r2, r3} 6a54: e28dc02c add ip, sp, #44 ; 0x2c 6a58: e8ac000f stmia ip!, {r0, r1, r2, r3} 6a5c: e59e3000 ldr r3, [lr] name = old + old_parent_pathlen; 6a60: e0855007 add r5, r5, r7 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 6a64: e58c3000 str r3, [ip] name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 6a68: e1a00005 mov r0, r5 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; name = old + old_parent_pathlen; 6a6c: e58d5040 str r5, [sp, #64] ; 0x40 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 6a70: eb0039cb bl 151a4 6a74: e1a01000 mov r1, r0 6a78: e1a00005 mov r0, r5 6a7c: ebfffa2e bl 533c 6a80: e0855000 add r5, r5, r0 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 6a84: e1a00005 mov r0, r5 * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 6a88: e58d5040 str r5, [sp, #64] ; 0x40 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 6a8c: eb0039c4 bl 151a4 6a90: e28d702c add r7, sp, #44 ; 0x2c 6a94: e1a01000 mov r1, r0 6a98: e3a02000 mov r2, #0 6a9c: e1a00005 mov r0, r5 6aa0: e1a03007 mov r3, r7 6aa4: e58d2000 str r2, [sp] 6aa8: ebfff9e2 bl 5238 0, &old_loc, false ); if ( result != 0 ) { 6aac: e3500000 cmp r0, #0 6ab0: 1a000031 bne 6b7c <_rename_r+0x168> /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 6ab4: e28d5004 add r5, sp, #4 6ab8: e1a00006 mov r0, r6 6abc: e1a02005 mov r2, r5 6ac0: e28d1044 add r1, sp, #68 ; 0x44 6ac4: eb0000c8 bl 6dec result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); 6ac8: e59d0044 ldr r0, [sp, #68] ; 0x44 6acc: e1a01005 mov r1, r5 6ad0: e0860000 add r0, r6, r0 6ad4: e28d2040 add r2, sp, #64 ; 0x40 6ad8: e59d3010 ldr r3, [sp, #16] 6adc: e1a0e00f mov lr, pc 6ae0: e593f004 ldr pc, [r3, #4] if ( result != 0 ) { 6ae4: e3500000 cmp r0, #0 6ae8: 1a000037 bne 6bcc <_rename_r+0x1b8> /* * Check to see if the caller is trying to rename across file system * boundaries. */ if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) { 6aec: e59d3014 ldr r3, [sp, #20] 6af0: e59d2028 ldr r2, [sp, #40] ; 0x28 6af4: e1520003 cmp r2, r3 6af8: 1a000013 bne 6b4c <_rename_r+0x138> rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 6afc: e1a01007 mov r1, r7 6b00: e1a02005 mov r2, r5 6b04: e59d3040 ldr r3, [sp, #64] ; 0x40 6b08: e59dc010 ldr ip, [sp, #16] 6b0c: e1a00004 mov r0, r4 6b10: e1a0e00f mov lr, pc 6b14: e59cf040 ldr pc, [ip, #64] ; 0x40 6b18: e1a06000 mov r6, r0 rtems_filesystem_freenode( &new_parent_loc ); 6b1c: e1a00005 mov r0, r5 6b20: ebfffa98 bl 5588 if ( free_old_parentloc ) 6b24: e3580000 cmp r8, #0 6b28: 1a000004 bne 6b40 <_rename_r+0x12c> rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); 6b2c: e1a00007 mov r0, r7 6b30: ebfffa94 bl 5588 return result; } 6b34: e1a00006 mov r0, r6 6b38: e28dd048 add sp, sp, #72 ; 0x48 6b3c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); rtems_filesystem_freenode( &new_parent_loc ); if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); 6b40: e1a00004 mov r0, r4 6b44: ebfffa8f bl 5588 6b48: eafffff7 b 6b2c <_rename_r+0x118> * Check to see if the caller is trying to rename across file system * boundaries. */ if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) { rtems_filesystem_freenode( &new_parent_loc ); 6b4c: e1a00005 mov r0, r5 6b50: ebfffa8c bl 5588 if ( free_old_parentloc ) 6b54: e3580000 cmp r8, #0 rtems_filesystem_freenode( &old_parent_loc ); 6b58: 11a00004 movne r0, r4 6b5c: 1bfffa89 blne 5588 rtems_filesystem_freenode( &old_loc ); 6b60: e1a00007 mov r0, r7 6b64: ebfffa87 bl 5588 rtems_set_errno_and_return_minus_one( EXDEV ); 6b68: eb002c8a bl 11d98 <__errno> 6b6c: e3a03012 mov r3, #18 6b70: e5803000 str r3, [r0] 6b74: e3e06000 mvn r6, #0 6b78: eaffffed b 6b34 <_rename_r+0x120> name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &old_loc, false ); if ( result != 0 ) { if ( free_old_parentloc ) 6b7c: e3580000 cmp r8, #0 6b80: 1a000001 bne 6b8c <_rename_r+0x178> rtems_filesystem_freenode( &old_parent_loc ); return -1; 6b84: e3e06000 mvn r6, #0 6b88: eaffffe9 b 6b34 <_rename_r+0x120> <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &old_loc, false ); if ( result != 0 ) { if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); 6b8c: e1a00004 mov r0, r4 6b90: ebfffa7c bl 5588 return -1; 6b94: e3e06000 mvn r6, #0 6b98: eaffffe5 b 6b34 <_rename_r+0x120> old_parent_pathlen = rtems_filesystem_dirname ( old ); if ( old_parent_pathlen == 0 ) rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen, 6b9c: e3a03000 mov r3, #0 6ba0: e28d4018 add r4, sp, #24 6ba4: e58d3000 str r3, [sp] 6ba8: e3a02002 mov r2, #2 6bac: e1a00005 mov r0, r5 6bb0: e1a01007 mov r1, r7 6bb4: e1a03004 mov r3, r4 6bb8: ebfff9ba bl 52a8 RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 6bbc: e3500000 cmp r0, #0 6bc0: 1affffef bne 6b84 <_rename_r+0x170> return -1; free_old_parentloc = true; 6bc4: e3a08001 mov r8, #1 6bc8: eaffff9f b 6a4c <_rename_r+0x38> rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); if ( result != 0 ) { rtems_filesystem_freenode( &new_parent_loc ); 6bcc: e1a00005 mov r0, r5 6bd0: ebfffa6c bl 5588 if ( free_old_parentloc ) 6bd4: e3580000 cmp r8, #0 rtems_filesystem_freenode( &old_parent_loc ); 6bd8: 11a00004 movne r0, r4 6bdc: 1bfffa69 blne 5588 rtems_filesystem_freenode( &old_loc ); 6be0: e1a00007 mov r0, r7 6be4: ebfffa67 bl 5588 return -1; 6be8: e3e06000 mvn r6, #0 6bec: eaffffd0 b 6b34 <_rename_r+0x120> =============================================================================== 000066cc : ) { rtems_aio_request *req; int mode; if (op != O_SYNC) 66cc: e3500a02 cmp r0, #8192 ; 0x2000 int aio_fsync( int op, struct aiocb *aiocbp ) { 66d0: e92d4030 push {r4, r5, lr} 66d4: e1a04001 mov r4, r1 rtems_aio_request *req; int mode; if (op != O_SYNC) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); 66d8: 13a05016 movne r5, #22 ) { rtems_aio_request *req; int mode; if (op != O_SYNC) 66dc: 1a000011 bne 6728 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); mode = fcntl (aiocbp->aio_fildes, F_GETFL); 66e0: e5910000 ldr r0, [r1] 66e4: e3a01003 mov r1, #3 66e8: eb001b26 bl d388 if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) 66ec: e2000003 and r0, r0, #3 66f0: e2400001 sub r0, r0, #1 66f4: e3500001 cmp r0, #1 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 66f8: 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))) 66fc: 8a000009 bhi 6728 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); req = malloc (sizeof (rtems_aio_request)); 6700: e3a00018 mov r0, #24 6704: ebfff406 bl 3724 if (req == NULL) 6708: e2503000 subs r3, r0, #0 670c: 0a000004 beq 6724 rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; 6710: e5834014 str r4, [r3, #20] req->aiocbp->aio_lio_opcode = LIO_SYNC; 6714: e3a03003 mov r3, #3 6718: e584302c str r3, [r4, #44] ; 0x2c return rtems_aio_enqueue (req); } 671c: e8bd4030 pop {r4, r5, lr} rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); 6720: ea000163 b 6cb4 if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 6724: e3a0500b mov r5, #11 <== NOT EXECUTED 6728: e3e03000 mvn r3, #0 672c: e5845030 str r5, [r4, #48] ; 0x30 6730: e5843034 str r3, [r4, #52] ; 0x34 6734: eb002931 bl 10c00 <__errno> 6738: e5805000 str r5, [r0] req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); } 673c: e3e00000 mvn r0, #0 6740: e8bd8030 pop {r4, r5, pc} =============================================================================== 00006e98 : * 0 - otherwise */ int aio_read (struct aiocb *aiocbp) { 6e98: e92d4030 push {r4, r5, lr} rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 6e9c: e3a01003 mov r1, #3 * 0 - otherwise */ int aio_read (struct aiocb *aiocbp) { 6ea0: e1a04000 mov r4, r0 rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 6ea4: e5900000 ldr r0, [r0] 6ea8: eb001936 bl d388 if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR))) 6eac: e2000003 and r0, r0, #3 6eb0: e3500002 cmp r0, #2 6eb4: 13500000 cmpne r0, #0 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 6eb8: 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))) 6ebc: 1a00000f bne 6f00 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) 6ec0: e5943014 ldr r3, [r4, #20] 6ec4: e3530000 cmp r3, #0 6ec8: 1a000013 bne 6f1c rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) 6ecc: e5943008 ldr r3, [r4, #8] 6ed0: e3530000 cmp r3, #0 6ed4: ba000010 blt 6f1c rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); 6ed8: e3a00018 mov r0, #24 6edc: ebfff210 bl 3724 if (req == NULL) 6ee0: e2503000 subs r3, r0, #0 6ee4: 0a000004 beq 6efc rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; 6ee8: e5834014 str r4, [r3, #20] req->aiocbp->aio_lio_opcode = LIO_READ; 6eec: e3a03001 mov r3, #1 6ef0: e584302c str r3, [r4, #44] ; 0x2c return rtems_aio_enqueue (req); } 6ef4: 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); 6ef8: eaffff6d b 6cb4 if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 6efc: e3a0500b mov r5, #11 <== NOT EXECUTED 6f00: e3e03000 mvn r3, #0 6f04: e5845030 str r5, [r4, #48] ; 0x30 6f08: e5843034 str r3, [r4, #52] ; 0x34 6f0c: eb00273b bl 10c00 <__errno> 6f10: e5805000 str r5, [r0] req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); } 6f14: e3e00000 mvn r0, #0 6f18: e8bd8030 pop {r4, r5, pc} if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); 6f1c: e3a05016 mov r5, #22 6f20: eafffff6 b 6f00 =============================================================================== 00006f2c : * 0 - otherwise */ int aio_write (struct aiocb *aiocbp) { 6f2c: e92d4030 push {r4, r5, lr} rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 6f30: e3a01003 mov r1, #3 * 0 - otherwise */ int aio_write (struct aiocb *aiocbp) { 6f34: e1a04000 mov r4, r0 rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 6f38: e5900000 ldr r0, [r0] 6f3c: eb001911 bl d388 if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) 6f40: e2000003 and r0, r0, #3 6f44: e2400001 sub r0, r0, #1 6f48: e3500001 cmp r0, #1 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 6f4c: 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))) 6f50: 8a00000f bhi 6f94 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) 6f54: e5943014 ldr r3, [r4, #20] 6f58: e3530000 cmp r3, #0 6f5c: 1a000013 bne 6fb0 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) 6f60: e5943008 ldr r3, [r4, #8] 6f64: e3530000 cmp r3, #0 6f68: ba000010 blt 6fb0 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); 6f6c: e3a00018 mov r0, #24 6f70: ebfff1eb bl 3724 if (req == NULL) 6f74: e2503000 subs r3, r0, #0 6f78: 0a000004 beq 6f90 rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; 6f7c: e5834014 str r4, [r3, #20] req->aiocbp->aio_lio_opcode = LIO_WRITE; 6f80: e3a03002 mov r3, #2 6f84: e584302c str r3, [r4, #44] ; 0x2c return rtems_aio_enqueue (req); } 6f88: 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); 6f8c: eaffff48 b 6cb4 if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 6f90: e3a0500b mov r5, #11 <== NOT EXECUTED 6f94: e3e03000 mvn r3, #0 6f98: e5845030 str r5, [r4, #48] ; 0x30 6f9c: e5843034 str r3, [r4, #52] ; 0x34 6fa0: eb002716 bl 10c00 <__errno> 6fa4: e5805000 str r5, [r0] req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); } 6fa8: e3e00000 mvn r0, #0 6fac: e8bd8030 pop {r4, r5, pc} if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); 6fb0: e3a05016 mov r5, #22 6fb4: eafffff6 b 6f94 =============================================================================== 00009528 : const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 9528: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) 952c: e3d2a007 bics sl, r2, #7 const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 9530: e1a09000 mov r9, r0 9534: e1a04001 mov r4, r1 9538: e1a0b003 mov fp, r3 int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) 953c: 1a000027 bne 95e0 rtems_set_errno_and_return_minus_one( EPERM ); /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 9540: e5937000 ldr r7, [r3] if (!device_name_table) 9544: e3570000 cmp r7, #0 9548: 0a000029 beq 95f4 rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 954c: e59f30b4 ldr r3, [pc, #180] ; 9608 9550: e5938000 ldr r8, [r3] 9554: e3580000 cmp r8, #0 9558: 11a0500a movne r5, sl 955c: 0a000010 beq 95a4 if (!device_name_table[i].device_name) 9560: e08aa10a add sl, sl, sl, lsl #2 9564: e797610a ldr r6, [r7, sl, lsl #2] 9568: e2561000 subs r1, r6, #0 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 956c: e1a00009 mov r0, r9 9570: e1a02004 mov r2, r4 device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) 9574: e087a10a add sl, r7, sl, lsl #2 9578: 0a000005 beq 9594 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 957c: eb000df1 bl cd48 9580: e3500000 cmp r0, #0 9584: 1a000002 bne 9594 continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 9588: e7d60004 ldrb r0, [r6, r4] 958c: e3500000 cmp r0, #0 9590: 0a000008 beq 95b8 /* 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++) { 9594: e2855001 add r5, r5, #1 9598: e1580005 cmp r8, r5 959c: e1a0a005 mov sl, r5 95a0: 8affffee bhi 9560 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 95a4: eb000a60 bl bf2c <__errno> 95a8: e3a03002 mov r3, #2 95ac: e5803000 str r3, [r0] 95b0: e3e00000 mvn r0, #0 } 95b4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; 95b8: e59f304c ldr r3, [pc, #76] ; 960c if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; 95bc: e59f204c ldr r2, [pc, #76] ; 9610 pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; 95c0: e5933000 ldr r3, [r3] if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; 95c4: e58b2008 str r2, [fp, #8] pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; 95c8: e5933028 ldr r3, [r3, #40] ; 0x28 continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; 95cc: e59f2040 ldr r2, [pc, #64] ; 9614 if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 95d0: e58ba000 str sl, [fp] pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; 95d4: e58b200c str r2, [fp, #12] pathloc->mt_entry = rtems_filesystem_root.mt_entry; 95d8: e58b3010 str r3, [fp, #16] return 0; 95dc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) rtems_set_errno_and_return_minus_one( EPERM ); 95e0: eb000a51 bl bf2c <__errno> <== NOT EXECUTED 95e4: e3a03001 mov r3, #1 <== NOT EXECUTED 95e8: e5803000 str r3, [r0] <== NOT EXECUTED 95ec: e3e00000 mvn r0, #0 <== NOT EXECUTED 95f0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 95f4: eb000a4c bl bf2c <__errno> 95f8: e3a0300e mov r3, #14 95fc: e5803000 str r3, [r0] 9600: e3e00000 mvn r0, #0 9604: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 000032b0 : drainOutput (struct rtems_termios_tty *tty) { rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 32b0: e59030b4 ldr r3, [r0, #180] ; 0xb4 32b4: e3530000 cmp r3, #0 /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 32b8: e92d4030 push {r4, r5, lr} 32bc: e1a04000 mov r4, r0 rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 32c0: 08bd8030 popeq {r4, r5, pc} static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 32c4: e10f3000 mrs r3, CPSR 32c8: e3832080 orr r2, r3, #128 ; 0x80 32cc: e129f002 msr CPSR_fc, r2 rtems_interrupt_disable (level); while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 32d0: e5901084 ldr r1, [r0, #132] ; 0x84 32d4: e5902080 ldr r2, [r0, #128] ; 0x80 32d8: e1510002 cmp r1, r2 32dc: 0a00000f beq 3320 tty->rawOutBufState = rob_wait; 32e0: e3a05002 mov r5, #2 <== NOT EXECUTED 32e4: e5845094 str r5, [r4, #148] ; 0x94 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 32e8: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain( 32ec: e3a01000 mov r1, #0 <== NOT EXECUTED 32f0: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED 32f4: e1a02001 mov r2, r1 <== NOT EXECUTED 32f8: eb0009d4 bl 5a50 <== NOT EXECUTED tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 32fc: e3500000 cmp r0, #0 <== NOT EXECUTED 3300: 1a000008 bne 3328 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 3304: e10f3000 mrs r3, CPSR <== NOT EXECUTED 3308: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 330c: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { rtems_interrupt_disable (level); while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 3310: e5941084 ldr r1, [r4, #132] ; 0x84 <== NOT EXECUTED 3314: e5942080 ldr r2, [r4, #128] ; 0x80 <== NOT EXECUTED 3318: e1510002 cmp r1, r2 <== NOT EXECUTED 331c: 1afffff0 bne 32e4 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 3320: e129f003 msr CPSR_fc, r3 3324: e8bd8030 pop {r4, r5, pc} tty->rawOutBufState = rob_wait; rtems_interrupt_enable (level); sc = rtems_semaphore_obtain( tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 3328: eb000b71 bl 60f4 <== NOT EXECUTED =============================================================================== 000040e0 : * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) 40e0: e5903020 ldr r3, [r0, #32] 40e4: 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) { 40e8: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 40ec: e1a04000 mov r4, r0 40f0: e1a06001 mov r6, r1 if (tty->ccount == 0) 40f4: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return; if (lineFlag) { 40f8: e3510000 cmp r1, #0 40fc: 0a000010 beq 4144 if (!(tty->termios.c_lflag & ECHO)) { 4100: e590103c ldr r1, [r0, #60] ; 0x3c 4104: e2112008 ands r2, r1, #8 tty->ccount = 0; 4108: 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)) { 410c: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 4110: e2110010 ands r0, r1, #16 4114: 1a00000c bne 414c tty->ccount = 0; 4118: e5840020 str r0, [r4, #32] <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 411c: e1a01004 mov r1, r4 <== NOT EXECUTED 4120: e5d40044 ldrb r0, [r4, #68] ; 0x44 <== NOT EXECUTED 4124: ebffffc8 bl 404c <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 4128: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 412c: e3130020 tst r3, #32 <== NOT EXECUTED 4130: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED echo ('\n', tty); 4134: e3a0000a mov r0, #10 <== NOT EXECUTED 4138: e1a01004 mov r1, r4 <== NOT EXECUTED } } if (!lineFlag) break; } } 413c: e8bd45f0 pop {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); 4140: eaffffc1 b 404c <== NOT EXECUTED return; } } while (tty->ccount) { 4144: e590103c ldr r1, [r0, #60] ; 0x3c 4148: e2012008 and r2, r1, #8 rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 414c: e59f7198 ldr r7, [pc, #408] ; 42ec 4150: ea000008 b 4178 4154: e3110c02 tst r1, #512 ; 0x200 <== NOT EXECUTED 4158: 1a00004b bne 428c <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 415c: e3560000 cmp r6, #0 <== NOT EXECUTED 4160: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { 4164: e5943020 ldr r3, [r4, #32] 4168: e3530000 cmp r3, #0 416c: 0a000045 beq 4288 } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); 4170: e594103c ldr r1, [r4, #60] ; 0x3c 4174: e2012008 and r2, r1, #8 return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 4178: e2433001 sub r3, r3, #1 417c: e594001c ldr r0, [r4, #28] 4180: e5843020 str r3, [r4, #32] if (tty->termios.c_lflag & ECHO) { 4184: e3520000 cmp r2, #0 return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 4188: e7d05003 ldrb r5, [r0, r3] if (tty->termios.c_lflag & ECHO) { 418c: 0afffff2 beq 415c if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 4190: e3560000 cmp r6, #0 4194: 1a000001 bne 41a0 4198: e3110010 tst r1, #16 419c: 0a000035 beq 4278 echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { 41a0: e3550009 cmp r5, #9 41a4: 0a00000f beq 41e8 rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 41a8: e5973000 ldr r3, [r7] 41ac: e2855001 add r5, r5, #1 41b0: e7d33005 ldrb r3, [r3, r5] 41b4: e3130020 tst r3, #32 41b8: 1affffe5 bne 4154 rtems_termios_puts ("\b \b", 3, tty); if (tty->column) tty->column--; } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 41bc: e59f012c ldr r0, [pc, #300] ; 42f0 41c0: e3a01003 mov r1, #3 41c4: e1a02004 mov r2, r4 41c8: ebfffefc bl 3dc0 if (tty->column) 41cc: e5943028 ldr r3, [r4, #40] ; 0x28 41d0: e3530000 cmp r3, #0 tty->column--; 41d4: 12433001 subne r3, r3, #1 41d8: 15843028 strne r3, [r4, #40] ; 0x28 } } } if (!lineFlag) 41dc: e3560000 cmp r6, #0 41e0: 1affffdf bne 4164 41e4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 41e8: e3530000 cmp r3, #0 if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { int col = tty->read_start_column; 41ec: e594502c ldr r5, [r4, #44] ; 0x2c int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 41f0: 0a000011 beq 423c c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 41f4: e5978000 ldr r8, [r7] if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { int col = tty->read_start_column; int i = 0; 41f8: 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) 41fc: e201ac02 and sl, r1, #512 ; 0x200 /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 4200: e7d01002 ldrb r1, [r0, r2] if (c == '\t') { 4204: e3510009 cmp r1, #9 col = (col | 7) + 1; 4208: 03855007 orreq r5, r5, #7 } else if (iscntrl (c)) { 420c: e088c001 add ip, r8, r1 /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 4210: e2822001 add r2, r2, #1 if (c == '\t') { col = (col | 7) + 1; 4214: 02855001 addeq r5, r5, #1 /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { 4218: 0a000005 beq 4234 col = (col | 7) + 1; } else if (iscntrl (c)) { 421c: e5dcc001 ldrb ip, [ip, #1] 4220: e31c0020 tst ip, #32 if (tty->termios.c_lflag & ECHOCTL) col += 2; } else { col++; 4224: 02855001 addeq r5, r5, #1 */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 4228: 0a000001 beq 4234 if (tty->termios.c_lflag & ECHOCTL) 422c: e35a0000 cmp sl, #0 <== NOT EXECUTED col += 2; 4230: 12855002 addne r5, r5, #2 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 4234: e1530002 cmp r3, r2 4238: 1afffff0 bne 4200 } /* * Back up over the tab */ while (tty->column > col) { 423c: e5943028 ldr r3, [r4, #40] ; 0x28 4240: e1550003 cmp r5, r3 4244: aaffffc4 bge 415c rtems_termios_puts ("\b", 1, tty); 4248: e59f00a4 ldr r0, [pc, #164] ; 42f4 424c: e3a01001 mov r1, #1 4250: e1a02004 mov r2, r4 4254: ebfffed9 bl 3dc0 tty->column--; 4258: e5943028 ldr r3, [r4, #40] ; 0x28 425c: e2433001 sub r3, r3, #1 } /* * Back up over the tab */ while (tty->column > col) { 4260: e1530005 cmp r3, r5 rtems_termios_puts ("\b", 1, tty); tty->column--; 4264: e5843028 str r3, [r4, #40] ; 0x28 } /* * Back up over the tab */ while (tty->column > col) { 4268: cafffff6 bgt 4248 if (tty->column) tty->column--; } } } if (!lineFlag) 426c: e3560000 cmp r6, #0 4270: 1affffbb bne 4164 4274: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); 4278: e5d40043 ldrb r0, [r4, #67] ; 0x43 <== NOT EXECUTED 427c: e1a01004 mov r1, r4 <== NOT EXECUTED } } if (!lineFlag) break; } } 4280: e8bd45f0 pop {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); 4284: eaffff70 b 404c <== NOT EXECUTED 4288: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 428c: e59f005c ldr r0, [pc, #92] ; 42f0 <== NOT EXECUTED 4290: e3a01003 mov r1, #3 <== NOT EXECUTED 4294: e1a02004 mov r2, r4 <== NOT EXECUTED 4298: ebfffec8 bl 3dc0 <== NOT EXECUTED if (tty->column) 429c: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 42a0: e3530000 cmp r3, #0 <== NOT EXECUTED tty->column--; 42a4: 12433001 subne r3, r3, #1 <== NOT EXECUTED 42a8: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 42ac: e5973000 ldr r3, [r7] <== NOT EXECUTED 42b0: e7d33005 ldrb r3, [r3, r5] <== NOT EXECUTED 42b4: e3130020 tst r3, #32 <== NOT EXECUTED 42b8: 0affffbf beq 41bc <== NOT EXECUTED 42bc: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 42c0: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED 42c4: 0affffa4 beq 415c <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 42c8: e59f0020 ldr r0, [pc, #32] ; 42f0 <== NOT EXECUTED 42cc: e3a01003 mov r1, #3 <== NOT EXECUTED 42d0: e1a02004 mov r2, r4 <== NOT EXECUTED 42d4: ebfffeb9 bl 3dc0 <== NOT EXECUTED if (tty->column) 42d8: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 42dc: e3530000 cmp r3, #0 <== NOT EXECUTED tty->column--; 42e0: 12433001 subne r3, r3, #1 <== NOT EXECUTED 42e4: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED 42e8: eaffffbb b 41dc <== NOT EXECUTED =============================================================================== 00002d00 : int fcntl( int fd, int cmd, ... ) { 2d00: e92d000e push {r1, r2, r3} 2d04: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 2d08: e59f31d0 ldr r3, [pc, #464] ; 2ee0 2d0c: e5933000 ldr r3, [r3] int fcntl( int fd, int cmd, ... ) { 2d10: e24dd004 sub sp, sp, #4 int ret; va_list ap; va_start( ap, cmd ); 2d14: e28d2028 add r2, sp, #40 ; 0x28 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 2d18: e1500003 cmp r0, r3 int fcntl( int fd, int cmd, ... ) { 2d1c: e59d4024 ldr r4, [sp, #36] ; 0x24 int ret; va_list ap; va_start( ap, cmd ); 2d20: e58d2000 str r2, [sp] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 2d24: 2a000061 bcs 2eb0 iop = rtems_libio_iop( fd ); 2d28: e59f71b4 ldr r7, [pc, #436] ; 2ee4 2d2c: e5976000 ldr r6, [r7] 2d30: e0600180 rsb r0, r0, r0, lsl #3 2d34: e0865180 add r5, r6, r0, lsl #3 rtems_libio_check_is_open(iop); 2d38: e595c014 ldr ip, [r5, #20] 2d3c: e31c0c01 tst ip, #256 ; 0x100 2d40: 0a00005a beq 2eb0 /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 2d44: e3540009 cmp r4, #9 2d48: 979ff104 ldrls pc, [pc, r4, lsl #2] 2d4c: ea000028 b 2df4 2d50: 00002e04 .word 0x00002e04 2d54: 00002e68 .word 0x00002e68 2d58: 00002e78 .word 0x00002e78 2d5c: 00002e98 .word 0x00002e98 2d60: 00002d9c .word 0x00002d9c 2d64: 00002d78 .word 0x00002d78 2d68: 00002d78 .word 0x00002d78 2d6c: 00002d78 .word 0x00002d78 2d70: 00002d78 .word 0x00002d78 2d74: 00002d78 .word 0x00002d78 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 2d78: eb0030bb bl f06c <__errno> 2d7c: e3a03086 mov r3, #134 ; 0x86 2d80: e5803000 str r3, [r0] if (ret >= 0) { int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop ); if (err) { errno = err; ret = -1; 2d84: e3e06000 mvn r6, #0 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 2d88: e1a00006 mov r0, r6 2d8c: e28dd004 add sp, sp, #4 2d90: e8bd47f0 pop {r4, r5, r6, r7, r8, r9, sl, lr} 2d94: e28dd00c add sp, sp, #12 2d98: e12fff1e bx lr case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 2d9c: e5920000 ldr r0, [r2] 2da0: eb000181 bl 33ac /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 2da4: e5953014 ldr r3, [r5, #20] 2da8: e3c00f7f bic r0, r0, #508 ; 0x1fc 2dac: e3c00002 bic r0, r0, #2 2db0: e1a00b00 lsl r0, r0, #22 2db4: e3c33c02 bic r3, r3, #512 ; 0x200 2db8: e1a00b20 lsr r0, r0, #22 2dbc: e3c33001 bic r3, r3, #1 2dc0: e1800003 orr r0, r0, r3 2dc4: e5850014 str r0, [r5, #20] rtems_libio_t *iop; rtems_libio_t *diop; int fd2; int flags; int mask; int ret = 0; 2dc8: e3a06000 mov r6, #0 * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop ); 2dcc: e1a00004 mov r0, r4 2dd0: e5953020 ldr r3, [r5, #32] 2dd4: e1a01005 mov r1, r5 2dd8: e1a0e00f mov lr, pc 2ddc: e593f030 ldr pc, [r3, #48] ; 0x30 if (err) { 2de0: e2504000 subs r4, r0, #0 2de4: 0affffe7 beq 2d88 errno = err; 2de8: eb00309f bl f06c <__errno> <== NOT EXECUTED 2dec: e5804000 str r4, [r0] <== NOT EXECUTED 2df0: eaffffe3 b 2d84 <== NOT EXECUTED errno = ENOTSUP; ret = -1; break; default: errno = EINVAL; 2df4: eb00309c bl f06c <__errno> 2df8: e3a03016 mov r3, #22 2dfc: e5803000 str r3, [r0] 2e00: eaffffdf b 2d84 * This switch should contain all the cases from POSIX. */ switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 2e04: e592a000 ldr sl, [r2] if ( fd2 ) 2e08: e35a0000 cmp sl, #0 2e0c: 0a00002c beq 2ec4 diop = rtems_libio_iop( fd2 ); 2e10: e153000a cmp r3, sl 2e14: 806aa18a rsbhi sl, sl, sl, lsl #3 2e18: 8086a18a addhi sl, r6, sl, lsl #3 2e1c: 81a0900a movhi r9, sl 2e20: 93a09000 movls r9, #0 2e24: 91a0a009 movls sl, r9 break; } } diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 2e28: e2857018 add r7, r5, #24 2e2c: e8b7000f ldm r7!, {r0, r1, r2, r3} 2e30: e28a8018 add r8, sl, #24 2e34: e8a8000f stmia r8!, {r0, r1, r2, r3} ret = (int) (diop - rtems_libio_iops); 2e38: e0669009 rsb r9, r6, r9 2e3c: e1a091c9 asr r9, r9, #3 2e40: e0896189 add r6, r9, r9, lsl #3 2e44: e0866306 add r6, r6, r6, lsl #6 2e48: e0896186 add r6, r9, r6, lsl #3 break; } } diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 2e4c: e5973000 ldr r3, [r7] ret = (int) (diop - rtems_libio_iops); 2e50: e0866786 add r6, r6, r6, lsl #15 2e54: e0896186 add r6, r9, r6, lsl #3 ret = -1; break; } } diop->flags = iop->flags; 2e58: e58ac014 str ip, [sl, #20] diop->pathinfo = iop->pathinfo; 2e5c: e5883000 str r3, [r8] ret = (int) (diop - rtems_libio_iops); 2e60: e2666000 rsb r6, r6, #0 2e64: ea00000e b 2ea4 break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 2e68: e31c0b02 tst ip, #2048 ; 0x800 2e6c: 03a06000 moveq r6, #0 2e70: 13a06001 movne r6, #1 2e74: eaffffd4 b 2dcc * 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 ) ) 2e78: e5926000 ldr r6, [r2] 2e7c: e3560000 cmp r6, #0 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 2e80: 138ccb02 orrne ip, ip, #2048 ; 0x800 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 2e84: 03cccb02 biceq ip, ip, #2048 ; 0x800 * processes, then we can ignore this one except to make * F_GETFD work. */ if ( va_arg( ap, int ) ) iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 2e88: 1585c014 strne ip, [r5, #20] rtems_libio_t *iop; rtems_libio_t *diop; int fd2; int flags; int mask; int ret = 0; 2e8c: 13a06000 movne r6, #0 */ if ( va_arg( ap, int ) ) iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 2e90: 0585c014 streq ip, [r5, #20] 2e94: eaffffcc b 2dcc break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 2e98: e1a0000c mov r0, ip 2e9c: eb00014f bl 33e0 2ea0: e1a06000 mov r6, r0 /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 2ea4: e3560000 cmp r6, #0 2ea8: aaffffc7 bge 2dcc 2eac: eaffffb5 b 2d88 <== NOT EXECUTED int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 2eb0: eb00306d bl f06c <__errno> 2eb4: e3a03009 mov r3, #9 2eb8: e5803000 str r3, [r0] 2ebc: e3e06000 mvn r6, #0 2ec0: eaffffb0 b 2d88 fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); else { /* allocate a file control block */ diop = rtems_libio_allocate(); 2ec4: eb000158 bl 342c if ( diop == 0 ) { 2ec8: e250a000 subs sl, r0, #0 2ecc: 0affffac beq 2d84 2ed0: e595c014 ldr ip, [r5, #20] 2ed4: e1a0900a mov r9, sl 2ed8: e5976000 ldr r6, [r7] 2edc: eaffffd1 b 2e28 =============================================================================== 0000c6f4 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { c6f4: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} static rtems_status_code pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { c6f8: e59f546c ldr r5, [pc, #1132] ; cb6c c6fc: e5958000 ldr r8, [r5] c700: e3580000 cmp r8, #0 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { c704: e24dd00c sub sp, sp, #12 c708: e1a04000 mov r4, r0 c70c: e1a06001 mov r6, r1 static rtems_status_code pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { c710: 0a000024 beq c7a8 rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); c714: e3a01000 mov r1, #0 c718: e1a00008 mov r0, r8 c71c: e1a02001 mov r2, r1 c720: ebffed96 bl 7d80 } if (sc == RTEMS_SUCCESSFUL) { c724: e250a000 subs sl, r0, #0 c728: 1a0000e4 bne cac0 err = pipe_lock(); if (err) return err; pipe = *pipep; c72c: e5945000 ldr r5, [r4] if (pipe == NULL) { c730: e3550000 cmp r5, #0 c734: 0a00007f beq c938 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) c738: e3a01000 mov r1, #0 c73c: e5950028 ldr r0, [r5, #40] ; 0x28 c740: e1a02001 mov r2, r1 c744: ebffed8d bl 7d80 err = -EINTR; if (*pipep == NULL) { c748: e5943000 ldr r3, [r4] err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) c74c: e3500000 cmp r0, #0 c750: 01a07000 moveq r7, r0 c754: 13e07003 mvnne r7, #3 err = -EINTR; if (*pipep == NULL) { c758: e3530000 cmp r3, #0 c75c: 0a0000c7 beq ca80 else *pipep = pipe; } out: pipe_unlock(); c760: ebffffa9 bl c60c pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) c764: e3570000 cmp r7, #0 c768: 1a00000b bne c79c return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { c76c: e5963014 ldr r3, [r6, #20] c770: e2033006 and r3, r3, #6 c774: e3530004 cmp r3, #4 int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; c778: e5945000 ldr r5, [r4] switch (LIBIO_ACCMODE(iop)) { c77c: 0a000015 beq c7d8 c780: e3530006 cmp r3, #6 c784: 0a000057 beq c8e8 c788: e3530002 cmp r3, #2 c78c: 0a000035 beq c868 if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); c790: e5950028 ldr r0, [r5, #40] ; 0x28 c794: ebffedc2 bl 7ea4 return 0; c798: e3a07000 mov r7, #0 out_error: pipe_release(pipep, iop); return err; } c79c: e1a00007 mov r0, r7 c7a0: e28dd00c add sp, sp, #12 c7a4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); c7a8: e59f73c0 ldr r7, [pc, #960] ; cb70 c7ac: e1a01008 mov r1, r8 c7b0: e5970000 ldr r0, [r7] c7b4: e1a02008 mov r2, r8 c7b8: ebffed70 bl 7d80 rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { c7bc: e5953000 ldr r3, [r5] c7c0: e3530000 cmp r3, #0 c7c4: 0a0000b2 beq ca94 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); c7c8: e5970000 ldr r0, [r7] <== NOT EXECUTED c7cc: ebffedb4 bl 7ea4 <== NOT EXECUTED c7d0: e5958000 ldr r8, [r5] <== NOT EXECUTED c7d4: eaffffce b c714 <== NOT EXECUTED break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; if (pipe->Writers ++ == 0) c7d8: e5953014 ldr r3, [r5, #20] } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; c7dc: e5951024 ldr r1, [r5, #36] ; 0x24 if (pipe->Writers ++ == 0) c7e0: e2832001 add r2, r3, #1 } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; c7e4: e2811001 add r1, r1, #1 if (pipe->Writers ++ == 0) c7e8: e3530000 cmp r3, #0 } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; c7ec: e5851024 str r1, [r5, #36] ; 0x24 if (pipe->Writers ++ == 0) c7f0: e5852014 str r2, [r5, #20] c7f4: 0a0000b3 beq cac8 PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { c7f8: e5953010 ldr r3, [r5, #16] c7fc: e3530000 cmp r3, #0 c800: 1affffe2 bne c790 c804: e5963014 ldr r3, [r6, #20] c808: e3130001 tst r3, #1 err = -ENXIO; goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; c80c: 05957020 ldreq r7, [r5, #32] pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { c810: 0a000007 beq c834 c814: ea0000c3 b cb28 err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) c818: e5950028 ldr r0, [r5, #40] ; 0x28 c81c: ebffed57 bl 7d80 c820: e3500000 cmp r0, #0 c824: 1a00000a bne c854 goto out_error; } while (prevCounter == pipe->readerCounter); c828: e5953020 ldr r3, [r5, #32] c82c: e1530007 cmp r3, r7 c830: 1affffd6 bne c790 if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); c834: e5950028 ldr r0, [r5, #40] ; 0x28 c838: ebffed99 bl 7ea4 if (! PIPE_WRITEWAIT(pipe)) c83c: e3a01000 mov r1, #0 c840: e5950030 ldr r0, [r5, #48] ; 0x30 c844: eb000728 bl e4ec c848: e2501000 subs r1, r0, #0 goto out_error; if (! PIPE_LOCK(pipe)) c84c: e1a02001 mov r2, r1 if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) c850: 0afffff0 beq c818 goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; c854: e3e07003 mvn r7, #3 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); c858: e1a00004 mov r0, r4 c85c: e1a01006 mov r1, r6 c860: ebffff6d bl c61c return err; c864: eaffffcc b c79c pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) c868: e5953010 ldr r3, [r5, #16] return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; c86c: e5951020 ldr r1, [r5, #32] if (pipe->Readers ++ == 0) c870: e2832001 add r2, r3, #1 return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; c874: e2811001 add r1, r1, #1 if (pipe->Readers ++ == 0) c878: e3530000 cmp r3, #0 return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; c87c: e5851020 str r1, [r5, #32] if (pipe->Readers ++ == 0) c880: e5852010 str r2, [r5, #16] c884: 0a000097 beq cae8 PIPE_WAKEUPWRITERS(pipe); if (pipe->Writers == 0) { c888: e5953014 ldr r3, [r5, #20] c88c: e3530000 cmp r3, #0 c890: 1affffbe bne c790 /* Not an error */ if (LIBIO_NODELAY(iop)) c894: e5963014 ldr r3, [r6, #20] c898: e3130001 tst r3, #1 c89c: 1affffbb bne c790 break; prevCounter = pipe->writerCounter; c8a0: e5957024 ldr r7, [r5, #36] ; 0x24 c8a4: ea000006 b c8c4 /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) c8a8: e5950028 ldr r0, [r5, #40] ; 0x28 c8ac: ebffed33 bl 7d80 c8b0: e3500000 cmp r0, #0 c8b4: 1affffe6 bne c854 goto out_error; } while (prevCounter == pipe->writerCounter); c8b8: e5953024 ldr r3, [r5, #36] ; 0x24 c8bc: e1530007 cmp r3, r7 c8c0: 1affffb2 bne c790 prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); c8c4: e5950028 ldr r0, [r5, #40] ; 0x28 c8c8: ebffed75 bl 7ea4 if (! PIPE_READWAIT(pipe)) c8cc: e3a01000 mov r1, #0 c8d0: e595002c ldr r0, [r5, #44] ; 0x2c c8d4: eb000704 bl e4ec c8d8: e2501000 subs r1, r0, #0 goto out_error; if (! PIPE_LOCK(pipe)) c8dc: e1a02001 mov r2, r1 prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) c8e0: 0afffff0 beq c8a8 c8e4: eaffffda b c854 <== NOT EXECUTED } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) c8e8: e5953010 ldr r3, [r5, #16] } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; c8ec: e5951020 ldr r1, [r5, #32] if (pipe->Readers ++ == 0) c8f0: e2832001 add r2, r3, #1 } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; c8f4: e2811001 add r1, r1, #1 if (pipe->Readers ++ == 0) c8f8: e3530000 cmp r3, #0 } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; c8fc: e5851020 str r1, [r5, #32] if (pipe->Readers ++ == 0) c900: e5852010 str r2, [r5, #16] c904: 0a000073 beq cad8 PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; if (pipe->Writers ++ == 0) c908: e5953014 ldr r3, [r5, #20] case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; c90c: e5951024 ldr r1, [r5, #36] ; 0x24 if (pipe->Writers ++ == 0) c910: e2832001 add r2, r3, #1 case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; c914: e2811001 add r1, r1, #1 if (pipe->Writers ++ == 0) c918: e3530000 cmp r3, #0 case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; c91c: e5851024 str r1, [r5, #36] ; 0x24 if (pipe->Writers ++ == 0) c920: e5852014 str r2, [r5, #20] c924: 1affff99 bne c790 PIPE_WAKEUPREADERS(pipe); c928: e595002c ldr r0, [r5, #44] ; 0x2c c92c: e28d1008 add r1, sp, #8 c930: eb0006d5 bl e48c c934: eaffff95 b c790 { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); c938: e3a00034 mov r0, #52 ; 0x34 c93c: ebffdff4 bl 4914 if (pipe == NULL) c940: e3500000 cmp r0, #0 { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); c944: e1a05000 mov r5, r0 c948: e1a08000 mov r8, r0 if (pipe == NULL) c94c: 0a000081 beq cb58 return err; memset(pipe, 0, sizeof(pipe_control_t)); c950: e1a02000 mov r2, r0 c954: e482a004 str sl, [r2], #4 c958: e2822004 add r2, r2, #4 c95c: e482a004 str sl, [r2], #4 c960: e482a004 str sl, [r2], #4 c964: e482a004 str sl, [r2], #4 c968: e482a004 str sl, [r2], #4 c96c: e482a004 str sl, [r2], #4 c970: e482a004 str sl, [r2], #4 c974: e482a004 str sl, [r2], #4 c978: e482a004 str sl, [r2], #4 c97c: e482a004 str sl, [r2], #4 c980: e482a004 str sl, [r2], #4 pipe->Size = PIPE_BUF; c984: e3a03c02 mov r3, #512 ; 0x200 int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); c988: e582a000 str sl, [r2] pipe->Size = PIPE_BUF; pipe->Buffer = malloc(pipe->Size); c98c: e1a00003 mov r0, r3 pipe = malloc(sizeof(pipe_control_t)); if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF; c990: e5853004 str r3, [r5, #4] pipe->Buffer = malloc(pipe->Size); c994: ebffdfde bl 4914 if (! pipe->Buffer) c998: 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); c99c: e5850000 str r0, [r5] if (! pipe->Buffer) c9a0: 0a00006a beq cb50 goto err_buf; err = -ENOMEM; if (rtems_barrier_create( rtems_build_name ('P', 'I', 'r', c), c9a4: e59f71c8 ldr r7, [pc, #456] ; cb74 c9a8: e5d70000 ldrb r0, [r7] if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( c9ac: e3800205 orr r0, r0, #1342177280 ; 0x50000000 c9b0: e3800849 orr r0, r0, #4784128 ; 0x490000 c9b4: e1a0100a mov r1, sl c9b8: e3800c72 orr r0, r0, #29184 ; 0x7200 c9bc: e1a0200a mov r2, sl c9c0: e285302c add r3, r5, #44 ; 0x2c c9c4: eb000652 bl e314 c9c8: e2501000 subs r1, r0, #0 c9cc: 1a00005d bne cb48 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), c9d0: e5d73000 ldrb r3, [r7] if (rtems_barrier_create( rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( c9d4: e3833205 orr r3, r3, #1342177280 ; 0x50000000 c9d8: e3833849 orr r3, r3, #4784128 ; 0x490000 c9dc: e3830c77 orr r0, r3, #30464 ; 0x7700 c9e0: e1a02001 mov r2, r1 c9e4: e2853030 add r3, r5, #48 ; 0x30 c9e8: eb000649 bl e314 c9ec: e2503000 subs r3, r0, #0 c9f0: 1a000052 bne cb40 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, c9f4: e5d70000 ldrb r0, [r7] if (rtems_barrier_create( rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( c9f8: e3800205 orr r0, r0, #1342177280 ; 0x50000000 c9fc: e3800849 orr r0, r0, #4784128 ; 0x490000 ca00: e285c028 add ip, r5, #40 ; 0x28 ca04: e3800c73 orr r0, r0, #29440 ; 0x7300 ca08: e3a01001 mov r1, #1 ca0c: e3a02010 mov r2, #16 ca10: e58dc000 str ip, [sp] ca14: ebffec3f bl 7b18 ca18: e3500000 cmp r0, #0 ca1c: 1a000045 bne cb38 /* 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 ca20: e28d8004 add r8, sp, #4 Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) _Objects_Get( &_Barrier_Information, id, location ); ca24: e595102c ldr r1, [r5, #44] ; 0x2c ca28: e1a02008 mov r2, r8 ca2c: e59f0144 ldr r0, [pc, #324] ; cb78 ca30: ebfff2cf bl 9574 <_Objects_Get> |= STATES_INTERRUPTIBLE_BY_SIGNAL; ca34: e590304c ldr r3, [r0, #76] ; 0x4c ca38: e3833201 orr r3, r3, #268435456 ; 0x10000000 ca3c: e580304c str r3, [r0, #76] ; 0x4c _Thread_Enable_dispatch(); ca40: ebfff5b8 bl a128 <_Thread_Enable_dispatch> ca44: e1a02008 mov r2, r8 ca48: e5951030 ldr r1, [r5, #48] ; 0x30 ca4c: e59f0124 ldr r0, [pc, #292] ; cb78 ca50: ebfff2c7 bl 9574 <_Objects_Get> _Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state |= STATES_INTERRUPTIBLE_BY_SIGNAL; ca54: e590304c ldr r3, [r0, #76] ; 0x4c ca58: e3833201 orr r3, r3, #268435456 ; 0x10000000 ca5c: e580304c str r3, [r0, #76] ; 0x4c _Thread_Enable_dispatch(); ca60: ebfff5b0 bl a128 <_Thread_Enable_dispatch> #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') ca64: e5d73000 ldrb r3, [r7] ca68: e353007a cmp r3, #122 ; 0x7a ca6c: e2832001 add r2, r3, #1 c = 'a'; ca70: 03a03061 moveq r3, #97 ; 0x61 #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') ca74: e5c72000 strb r2, [r7] c = 'a'; ca78: 05c73000 strbeq r3, [r7] ca7c: eaffff2d b c738 if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) ca80: e3570000 cmp r7, #0 ca84: 1a00001b bne caf8 pipe_free(pipe); else *pipep = pipe; ca88: e5845000 str r5, [r4] } out: pipe_unlock(); ca8c: ebfffede bl c60c ca90: eaffff35 b c76c if (pipe_semaphore == RTEMS_ID_NONE) { rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { sc = rtems_semaphore_create( ca94: e1a03008 mov r3, r8 ca98: e3a01001 mov r1, #1 ca9c: e3a02054 mov r2, #84 ; 0x54 caa0: e59f00d4 ldr r0, [pc, #212] ; cb7c caa4: e58d5000 str r5, [sp] caa8: ebffec1a bl 7b18 caac: e1a08000 mov r8, r0 cab0: e5970000 ldr r0, [r7] cab4: ebffecfa bl 7ea4 } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { cab8: e3580000 cmp r8, #0 cabc: 0a000028 beq cb64 ) { pipe_control_t *pipe; int err = 0; err = pipe_lock(); cac0: e3e0700b mvn r7, #11 cac4: eaffff34 b c79c case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); cac8: e595002c ldr r0, [r5, #44] ; 0x2c cacc: e28d1008 add r1, sp, #8 cad0: eb00066d bl e48c cad4: eaffff47 b c7f8 break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); cad8: e5950030 ldr r0, [r5, #48] ; 0x30 cadc: e28d1008 add r1, sp, #8 cae0: eb000669 bl e48c cae4: eaffff87 b c908 switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); cae8: e5950030 ldr r0, [r5, #48] ; 0x30 caec: e28d1008 add r1, sp, #8 caf0: eb000665 bl e48c caf4: eaffff63 b c888 /* Called with pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); caf8: e595002c ldr r0, [r5, #44] ; 0x2c <== NOT EXECUTED cafc: eb000636 bl e3dc <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); cb00: e5950030 ldr r0, [r5, #48] ; 0x30 <== NOT EXECUTED cb04: eb000634 bl e3dc <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); cb08: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED cb0c: ebffec72 bl 7cdc <== NOT EXECUTED free(pipe->Buffer); cb10: e5950000 ldr r0, [r5] <== NOT EXECUTED cb14: ebffdd64 bl 40ac <== NOT EXECUTED free(pipe); cb18: e1a00005 mov r0, r5 <== NOT EXECUTED cb1c: ebffdd62 bl 40ac <== NOT EXECUTED else *pipep = pipe; } out: pipe_unlock(); cb20: ebfffeb9 bl c60c <== NOT EXECUTED cb24: eaffff1c b c79c <== NOT EXECUTED if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { PIPE_UNLOCK(pipe); cb28: e5950028 ldr r0, [r5, #40] ; 0x28 cb2c: ebffecdc bl 7ea4 err = -ENXIO; cb30: e3e07005 mvn r7, #5 goto out_error; cb34: eaffff47 b c858 if (c ++ == 'z') c = 'a'; return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); cb38: e5950030 ldr r0, [r5, #48] ; 0x30 cb3c: eb000626 bl e3dc err_wbar: rtems_barrier_delete(pipe->readBarrier); cb40: e598002c ldr r0, [r8, #44] ; 0x2c cb44: eb000624 bl e3dc err_rbar: free(pipe->Buffer); cb48: e5980000 ldr r0, [r8] cb4c: ebffdd56 bl 40ac err_buf: free(pipe); cb50: e1a00008 mov r0, r8 cb54: ebffdd54 bl 40ac ) { pipe_control_t *pipe; int err = 0; err = pipe_lock(); cb58: e3e0700b mvn r7, #11 else *pipep = pipe; } out: pipe_unlock(); cb5c: ebfffeaa bl c60c cb60: eaffff0d b c79c } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { cb64: e5958000 ldr r8, [r5] cb68: eafffee9 b c714 =============================================================================== 00002f70 : { long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 2f70: e59f310c ldr r3, [pc, #268] ; 3084 2f74: e5933000 ldr r3, [r3] 2f78: e1500003 cmp r0, r3 long fpathconf( int fd, int name ) { 2f7c: 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); 2f80: 2a000035 bcs 305c iop = rtems_libio_iop(fd); 2f84: e59f30fc ldr r3, [pc, #252] ; 3088 2f88: e5933000 ldr r3, [r3] 2f8c: e0600180 rsb r0, r0, r0, lsl #3 2f90: e0830180 add r0, r3, r0, lsl #3 rtems_libio_check_is_open(iop); 2f94: e5903014 ldr r3, [r0, #20] 2f98: e3130c01 tst r3, #256 ; 0x100 2f9c: 0a00002e beq 305c rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 2fa0: e3130002 tst r3, #2 2fa4: 0a000031 beq 3070 /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 2fa8: e5903028 ldr r3, [r0, #40] ; 0x28 switch ( name ) { 2fac: e351000b cmp r1, #11 2fb0: 979ff101 ldrls pc, [pc, r1, lsl #2] 2fb4: ea00000d b 2ff0 2fb8: 00003004 .word 0x00003004 2fbc: 0000300c .word 0x0000300c 2fc0: 00003014 .word 0x00003014 2fc4: 0000301c .word 0x0000301c 2fc8: 00003024 .word 0x00003024 2fcc: 0000302c .word 0x0000302c 2fd0: 00003034 .word 0x00003034 2fd4: 0000303c .word 0x0000303c 2fd8: 00003044 .word 0x00003044 2fdc: 0000304c .word 0x0000304c 2fe0: 00003054 .word 0x00003054 2fe4: 00002fe8 .word 0x00002fe8 break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 2fe8: e5930060 ldr r0, [r3, #96] ; 0x60 break; 2fec: e49df004 pop {pc} ; (ldr pc, [sp], #4) default: rtems_set_errno_and_return_minus_one( EINVAL ); 2ff0: eb00301d bl f06c <__errno> 2ff4: e3a03016 mov r3, #22 2ff8: e5803000 str r3, [r0] 2ffc: e3e00000 mvn r0, #0 break; } return return_value; } 3000: e49df004 pop {pc} ; (ldr pc, [sp], #4) the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; 3004: e5930038 ldr r0, [r3, #56] ; 0x38 break; 3008: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_MAX_CANON: return_value = the_limits->max_canon; 300c: e593003c ldr r0, [r3, #60] ; 0x3c break; 3010: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_MAX_INPUT: return_value = the_limits->max_input; 3014: e5930040 ldr r0, [r3, #64] ; 0x40 break; 3018: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_NAME_MAX: return_value = the_limits->name_max; 301c: e5930044 ldr r0, [r3, #68] ; 0x44 break; 3020: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PATH_MAX: return_value = the_limits->path_max; 3024: e5930048 ldr r0, [r3, #72] ; 0x48 break; 3028: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 302c: e593004c ldr r0, [r3, #76] ; 0x4c break; 3030: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 3034: e5930054 ldr r0, [r3, #84] ; 0x54 break; 3038: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 303c: e5930058 ldr r0, [r3, #88] ; 0x58 break; 3040: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 3044: e5930064 ldr r0, [r3, #100] ; 0x64 break; 3048: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 304c: e5930050 ldr r0, [r3, #80] ; 0x50 break; 3050: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 3054: e593005c ldr r0, [r3, #92] ; 0x5c break; 3058: e49df004 pop {pc} ; (ldr pc, [sp], #4) rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); iop = rtems_libio_iop(fd); rtems_libio_check_is_open(iop); 305c: eb003002 bl f06c <__errno> 3060: e3a03009 mov r3, #9 3064: e5803000 str r3, [r0] 3068: e3e00000 mvn r0, #0 306c: e49df004 pop {pc} ; (ldr pc, [sp], #4) rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 3070: eb002ffd bl f06c <__errno> 3074: e3a03016 mov r3, #22 3078: e5803000 str r3, [r0] 307c: e3e00000 mvn r0, #0 3080: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== 000042f8 : * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { if (tty->termios.c_iflag & ISTRIP) 42f8: e5913030 ldr r3, [r1, #48] ; 0x30 42fc: e3130020 tst r3, #32 /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 4300: e92d4030 push {r4, r5, lr} 4304: e20040ff and r4, r0, #255 ; 0xff if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; 4308: 1200407f andne r4, r0, #127 ; 0x7f if (tty->termios.c_iflag & IUCLC) 430c: e3130c02 tst r3, #512 ; 0x200 /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 4310: e1a05001 mov r5, r1 if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) 4314: 0a000007 beq 4338 c = tolower (c); 4318: e59f21a0 ldr r2, [pc, #416] ; 44c0 431c: e5922000 ldr r2, [r2] 4320: e0822004 add r2, r2, r4 4324: e5d22001 ldrb r2, [r2, #1] 4328: e2022003 and r2, r2, #3 432c: e3520001 cmp r2, #1 4330: 02844020 addeq r4, r4, #32 4334: e20440ff and r4, r4, #255 ; 0xff if (c == '\r') { 4338: e354000d cmp r4, #13 433c: 0a000014 beq 4394 if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 4340: e354000a cmp r4, #10 4344: 0a000036 beq 4424 c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 4348: e3540000 cmp r4, #0 434c: 1a000016 bne 43ac } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 4350: e59f316c ldr r3, [pc, #364] ; 44c4 4354: e5932008 ldr r2, [r3, #8] 4358: e5953020 ldr r3, [r5, #32] 435c: e2422001 sub r2, r2, #1 4360: e1530002 cmp r3, r2 4364: aa000008 bge 438c if (tty->termios.c_lflag & ECHO) 4368: e595203c ldr r2, [r5, #60] ; 0x3c 436c: e3120008 tst r2, #8 4370: 1a00002e bne 4430 echo (c, tty); tty->cbuf[tty->ccount++] = c; 4374: e595101c ldr r1, [r5, #28] <== NOT EXECUTED 4378: e2832001 add r2, r3, #1 <== NOT EXECUTED 437c: e7c14003 strb r4, [r1, r3] <== NOT EXECUTED } return 0; 4380: e3a00000 mov r0, #0 <== NOT EXECUTED * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; 4384: e5852020 str r2, [r5, #32] <== NOT EXECUTED 4388: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED } return 0; 438c: e3a00000 mov r0, #0 <== NOT EXECUTED } 4390: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) 4394: e3130080 tst r3, #128 ; 0x80 return 0; 4398: 13a00000 movne r0, #0 if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) 439c: 18bd8030 popne {r4, r5, pc} return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; 43a0: e3130c01 tst r3, #256 ; 0x100 43a4: 03a0400d moveq r4, #13 43a8: 13a0400a movne r4, #10 } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 43ac: e595303c ldr r3, [r5, #60] ; 0x3c 43b0: e3130002 tst r3, #2 43b4: 0affffe5 beq 4350 if (c == tty->termios.c_cc[VERASE]) { 43b8: e5d52043 ldrb r2, [r5, #67] ; 0x43 43bc: e1520004 cmp r2, r4 43c0: 0a000039 beq 44ac erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 43c4: e5d52044 ldrb r2, [r5, #68] ; 0x44 43c8: e1520004 cmp r2, r4 43cc: 0a000025 beq 4468 erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { 43d0: e5d52045 ldrb r2, [r5, #69] ; 0x45 43d4: e1520004 cmp r2, r4 return 1; 43d8: 03a00001 moveq r0, #1 } else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { 43dc: 08bd8030 popeq {r4, r5, pc} return 1; } else if (c == '\n') { 43e0: e354000a cmp r4, #10 43e4: 0a000024 beq 447c if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); tty->cbuf[tty->ccount++] = c; return 1; } else if ((c == tty->termios.c_cc[VEOL]) || 43e8: e5d5204c ldrb r2, [r5, #76] ; 0x4c 43ec: e1520004 cmp r2, r4 43f0: 0a000002 beq 4400 43f4: e5d52051 ldrb r2, [r5, #81] ; 0x51 43f8: e1520004 cmp r2, r4 43fc: 1affffd3 bne 4350 (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) 4400: e3130008 tst r3, #8 <== NOT EXECUTED 4404: 1a000013 bne 4458 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 4408: e285101c add r1, r5, #28 <== NOT EXECUTED 440c: e891000a ldm r1, {r1, r3} <== NOT EXECUTED 4410: e2832001 add r2, r3, #1 <== NOT EXECUTED 4414: e7c14003 strb r4, [r1, r3] <== NOT EXECUTED return 1; 4418: e3a00001 mov r0, #1 <== NOT EXECUTED return 1; } else if ((c == tty->termios.c_cc[VEOL]) || (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; 441c: e5852020 str r2, [r5, #32] <== NOT EXECUTED return 1; 4420: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; 4424: e3130040 tst r3, #64 ; 0x40 4428: 13a0400d movne r4, #13 442c: eaffffde b 43ac /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 4430: e1a00004 mov r0, r4 4434: e1a01005 mov r1, r5 4438: ebffff03 bl 404c 443c: e285101c add r1, r5, #28 4440: e891000a ldm r1, {r1, r3} tty->cbuf[tty->ccount++] = c; 4444: e2832001 add r2, r3, #1 4448: e7c14003 strb r4, [r1, r3] } return 0; 444c: e3a00000 mov r0, #0 * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; 4450: e5852020 str r2, [r5, #32] 4454: e8bd8030 pop {r4, r5, pc} tty->cbuf[tty->ccount++] = c; return 1; } else if ((c == tty->termios.c_cc[VEOL]) || (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 4458: e1a00004 mov r0, r4 <== NOT EXECUTED 445c: e1a01005 mov r1, r5 <== NOT EXECUTED 4460: ebfffef9 bl 404c <== NOT EXECUTED 4464: eaffffe7 b 4408 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); 4468: e1a00005 mov r0, r5 446c: e3a01001 mov r1, #1 4470: ebffff1a bl 40e0 return 0; 4474: e3a00000 mov r0, #0 4478: e8bd8030 pop {r4, r5, pc} } else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) 447c: e3130048 tst r3, #72 ; 0x48 echo (c, tty); 4480: 11a00004 movne r0, r4 4484: 11a01005 movne r1, r5 4488: 1bfffeef blne 404c tty->cbuf[tty->ccount++] = c; 448c: e285101c add r1, r5, #28 4490: e891000a ldm r1, {r1, r3} 4494: e3a0000a mov r0, #10 4498: e2832001 add r2, r3, #1 449c: e7c10003 strb r0, [r1, r3] return 1; 44a0: e3a00001 mov r0, #1 else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); tty->cbuf[tty->ccount++] = c; 44a4: e5852020 str r2, [r5, #32] return 1; 44a8: e8bd8030 pop {r4, r5, pc} c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); 44ac: e1a00005 mov r0, r5 44b0: e3a01000 mov r1, #0 44b4: ebffff09 bl 40e0 return 0; 44b8: e3a00000 mov r0, #0 44bc: e8bd8030 pop {r4, r5, pc} =============================================================================== 00022138 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 22138: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 2213c: e24dd00c sub sp, sp, #12 22140: e1a04000 mov r4, r0 22144: e1a05001 mov r5, r1 22148: e1a08002 mov r8, r2 POSIX_signals_Siginfo_node *psiginfo; /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 2214c: ebffff40 bl 21e54 22150: e1500004 cmp r0, r4 22154: 1a000096 bne 223b4 rtems_set_errno_and_return_minus_one( ESRCH ); /* * Validate the signal passed. */ if ( !sig ) 22158: e3550000 cmp r5, #0 2215c: 0a000099 beq 223c8 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 22160: e2454001 sub r4, r5, #1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 22164: e354001f cmp r4, #31 22168: 8a000096 bhi 223c8 rtems_set_errno_and_return_minus_one( EINVAL ); /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) 2216c: e59f6280 ldr r6, [pc, #640] ; 223f4 22170: e1a07085 lsl r7, r5, #1 22174: e0873005 add r3, r7, r5 22178: e0863103 add r3, r6, r3, lsl #2 2217c: e5933008 ldr r3, [r3, #8] 22180: e3530001 cmp r3, #1 return 0; 22184: 03a00000 moveq r0, #0 rtems_set_errno_and_return_minus_one( EINVAL ); /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) 22188: 0a000039 beq 22274 /* * P1003.1c/Draft 10, p. 33 says that certain signals should always * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) 2218c: e3550008 cmp r5, #8 22190: 13550004 cmpne r5, #4 22194: 0a000038 beq 2227c 22198: e355000b cmp r5, #11 2219c: 0a000036 beq 2227c static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 221a0: e3a03001 mov r3, #1 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; 221a4: e58d3004 str r3, [sp, #4] /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 221a8: e58d5000 str r5, [sp] siginfo->si_code = SI_USER; if ( !value ) { 221ac: e3580000 cmp r8, #0 221b0: e1a04413 lsl r4, r3, r4 siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; 221b4: 15983000 ldrne r3, [r8] 221b8: 158d3008 strne r3, [sp, #8] 221bc: e59f3234 ldr r3, [pc, #564] ; 223f8 221c0: e5932000 ldr r2, [r3] 221c4: e2822001 add r2, r2, #1 */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; 221c8: 058d8008 streq r8, [sp, #8] 221cc: e5832000 str r2, [r3] /* * Is the currently executing thread interested? If so then it will * get it an execute it as soon as the dispatcher executes. */ the_thread = _Thread_Executing; 221d0: e59f3224 ldr r3, [pc, #548] ; 223fc 221d4: e5930004 ldr r0, [r3, #4] api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( _POSIX_signals_Is_interested( api, mask ) ) { 221d8: e59030fc ldr r3, [r0, #252] ; 0xfc 221dc: e59330d0 ldr r3, [r3, #208] ; 0xd0 221e0: e1d43003 bics r3, r4, r3 221e4: 1a000014 bne 2223c } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 221e8: e59f1210 ldr r1, [pc, #528] ; 22400 221ec: e4913004 ldr r3, [r1], #4 /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = _Chain_First( the_chain ); 221f0: e1530001 cmp r3, r1 221f4: 0a000031 beq 222c0 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 221f8: e5932030 ldr r2, [r3, #48] ; 0x30 221fc: e1140002 tst r4, r2 for ( the_node = _Chain_First( the_chain ); !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; 22200: e1a00003 mov r0, r3 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 22204: e59320fc ldr r2, [r3, #252] ; 0xfc #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 22208: 0a000008 beq 22230 2220c: ea00000a b 2223c the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = _Chain_First( the_chain ); !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { 22210: e5933000 ldr r3, [r3] /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = _Chain_First( the_chain ); 22214: e1530001 cmp r3, r1 22218: 0a000028 beq 222c0 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 2221c: e5932030 ldr r2, [r3, #48] ; 0x30 <== NOT EXECUTED 22220: e1140002 tst r4, r2 <== NOT EXECUTED for ( the_node = _Chain_First( the_chain ); !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; 22224: e1a00003 mov r0, r3 <== NOT EXECUTED api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 22228: e59320fc ldr r2, [r3, #252] ; 0xfc <== NOT EXECUTED #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 2222c: 1a000002 bne 2223c <== NOT EXECUTED /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) 22230: e59220d0 ldr r2, [r2, #208] ; 0xd0 22234: e1d42002 bics r2, r4, r2 22238: 0afffff4 beq 22210 /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { 2223c: e1a01005 mov r1, r5 22240: e1a0200d mov r2, sp 22244: eb00007d bl 22440 <_POSIX_signals_Unblock_thread> 22248: e3500000 cmp r0, #0 2224c: 1a000006 bne 2226c * We may have woken up a thread but we definitely need to post the * signal to the process wide information set. */ _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 22250: e0875005 add r5, r7, r5 /* * We may have woken up a thread but we definitely need to post the * signal to the process wide information set. */ _POSIX_signals_Set_process_signals( mask ); 22254: e1a00004 mov r0, r4 if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 22258: e1a05105 lsl r5, r5, #2 /* * We may have woken up a thread but we definitely need to post the * signal to the process wide information set. */ _POSIX_signals_Set_process_signals( mask ); 2225c: eb00006d bl 22418 <_POSIX_signals_Set_process_signals> if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 22260: e7963005 ldr r3, [r6, r5] 22264: e3530002 cmp r3, #2 22268: 0a000007 beq 2228c _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 2226c: ebffac9e bl d4ec <_Thread_Enable_dispatch> return 0; 22270: e3a00000 mov r0, #0 } 22274: e28dd00c add sp, sp, #12 22278: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} * P1003.1c/Draft 10, p. 33 says that certain signals should always * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) return pthread_kill( pthread_self(), sig ); 2227c: eb0000f7 bl 22660 22280: e1a01005 mov r1, r5 22284: eb0000bc bl 2257c 22288: eafffff9 b 22274 _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get( &_POSIX_signals_Inactive_siginfo ); 2228c: e59f0170 ldr r0, [pc, #368] ; 22404 22290: ebffa5f1 bl ba5c <_Chain_Get> if ( !psiginfo ) { 22294: e250c000 subs ip, r0, #0 22298: 0a00004f beq 223dc _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 2229c: e1a0300d mov r3, sp 222a0: e8930007 ldm r3, {r0, r1, r2} 222a4: e28c3008 add r3, ip, #8 222a8: e8830007 stm r3, {r0, r1, r2} _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 222ac: e59f0154 ldr r0, [pc, #340] ; 22408 222b0: e1a0100c mov r1, ip 222b4: e0800005 add r0, r0, r5 222b8: ebffa5d4 bl ba10 <_Chain_Append> 222bc: eaffffea b 2226c * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 222c0: e59f3144 ldr r3, [pc, #324] ; 2240c 222c4: e5d3e000 ldrb lr, [r3] 222c8: e59fa140 ldr sl, [pc, #320] ; 22410 222cc: e28ee001 add lr, lr, #1 * * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; 222d0: e3a08000 mov r8, #0 for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { /* * This can occur when no one is interested and an API is not configured. */ if ( !_Objects_Information_table[ the_api ] ) 222d4: e5ba3004 ldr r3, [sl, #4]! 222d8: e3530000 cmp r3, #0 222dc: 0a000022 beq 2236c continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 222e0: e5933004 ldr r3, [r3, #4] */ if ( !the_info ) continue; #endif maximum = the_info->maximum; 222e4: e1d3c1b0 ldrh ip, [r3, #16] object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 222e8: e35c0000 cmp ip, #0 if ( !the_info ) continue; #endif maximum = the_info->maximum; object_table = the_info->local_table; 222ec: e593101c ldr r1, [r3, #28] for ( index = 1 ; index <= maximum ; index++ ) { 222f0: 0a00001d beq 2236c 222f4: e3a02001 mov r2, #1 the_thread = (Thread_Control *) object_table[ index ]; 222f8: e5b13004 ldr r3, [r1, #4]! if ( !the_thread ) 222fc: e3530000 cmp r3, #0 22300: 0a000016 beq 22360 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 22304: e5930014 ldr r0, [r3, #20] 22308: e150000e cmp r0, lr 2230c: 8a000013 bhi 22360 #if defined(RTEMS_DEBUG) if ( !api ) continue; #endif if ( !_POSIX_signals_Is_interested( api, mask ) ) 22310: e59390fc ldr r9, [r3, #252] ; 0xfc 22314: e59990d0 ldr r9, [r9, #208] ; 0xd0 22318: e1d49009 bics r9, r4, r9 2231c: 0a00000f beq 22360 * * NOTE: We initialized interested_priority to PRIORITY_MAXIMUM + 1 * so we never have to worry about deferencing a NULL * interested thread. */ if ( the_thread->current_priority < interested_priority ) { 22320: e150000e cmp r0, lr 22324: 3a00001c bcc 2239c * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( interested && !_States_Is_ready( interested->current_state ) ) { 22328: e3580000 cmp r8, #0 2232c: 0a00000b beq 22360 22330: e5989010 ldr r9, [r8, #16] 22334: e3590000 cmp r9, #0 22338: 0a000008 beq 22360 /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 2233c: e593b010 ldr fp, [r3, #16] 22340: e35b0000 cmp fp, #0 22344: 0a000014 beq 2239c continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 22348: e3190201 tst r9, #268435456 ; 0x10000000 2234c: 1a000003 bne 22360 */ RTEMS_INLINE_ROUTINE bool _States_Is_interruptible_by_signal ( States_Control the_states ) { return (the_states & STATES_INTERRUPTIBLE_BY_SIGNAL); 22350: e20bb201 and fp, fp, #268435456 ; 0x10000000 DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 22354: e35b0000 cmp fp, #0 22358: 11a0e000 movne lr, r0 2235c: 11a08003 movne r8, r3 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 22360: e2822001 add r2, r2, #1 22364: e15c0002 cmp ip, r2 22368: 2affffe2 bcs 222f8 * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { 2236c: e59f30a0 ldr r3, [pc, #160] ; 22414 22370: e15a0003 cmp sl, r3 22374: 1affffd6 bne 222d4 } } } } if ( interested ) { 22378: e3580000 cmp r8, #0 2237c: 0affffb3 beq 22250 22380: e1a00008 mov r0, r8 /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { 22384: e1a01005 mov r1, r5 22388: e1a0200d mov r2, sp 2238c: eb00002b bl 22440 <_POSIX_signals_Unblock_thread> 22390: e3500000 cmp r0, #0 22394: 0affffad beq 22250 22398: eaffffb3 b 2226c <== NOT EXECUTED #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 2239c: e2822001 add r2, r2, #1 223a0: e15c0002 cmp ip, r2 */ if ( interested && !_States_Is_ready( interested->current_state ) ) { /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 223a4: e1a0e000 mov lr, r0 223a8: e1a08003 mov r8, r3 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 223ac: 2affffd1 bcs 222f8 223b0: eaffffed b 2236c /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); 223b4: ebffc4d9 bl 13720 <__errno> 223b8: e3a03003 mov r3, #3 223bc: e5803000 str r3, [r0] 223c0: e3e00000 mvn r0, #0 223c4: eaffffaa b 22274 */ if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); 223c8: ebffc4d4 bl 13720 <__errno> 223cc: e3a03016 mov r3, #22 223d0: e5803000 str r3, [r0] 223d4: e3e00000 mvn r0, #0 223d8: eaffffa5 b 22274 if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { _Thread_Enable_dispatch(); 223dc: ebffac42 bl d4ec <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 223e0: ebffc4ce bl 13720 <__errno> 223e4: e3a0300b mov r3, #11 223e8: e5803000 str r3, [r0] 223ec: e3e00000 mvn r0, #0 223f0: eaffff9f b 22274 =============================================================================== 000026d4 : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 26d4: e59f30d4 ldr r3, [pc, #212] ; 27b0 26d8: e5932004 ldr r2, [r3, #4] 26dc: e2822001 add r2, r2, #1 #include "malloc_p.h" void *malloc( size_t size ) { 26e0: e92d4030 push {r4, r5, lr} 26e4: e1a04000 mov r4, r0 void *return_this; MSBUMP(malloc_calls, 1); 26e8: e5832004 str r2, [r3, #4] /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 26ec: ebffffb0 bl 25b4 /* * Validate the parameters */ if ( !size ) 26f0: e3540000 cmp r4, #0 return (void *) 0; 26f4: 01a05004 moveq r5, r4 malloc_deferred_frees_process(); /* * Validate the parameters */ if ( !size ) 26f8: 0a000018 beq 2760 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 26fc: e59f30b0 ldr r3, [pc, #176] ; 27b4 2700: e5933000 ldr r3, [r3] 2704: e3530003 cmp r3, #3 2708: 0a000024 beq 27a0 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 270c: e59f30a4 ldr r3, [pc, #164] ; 27b8 2710: e3a02000 mov r2, #0 2714: e5930000 ldr r0, [r3] 2718: e1a01004 mov r1, r4 271c: e1a03002 mov r3, r2 2720: eb001398 bl 7588 <_Protected_heap_Allocate_aligned_with_boundary> * If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { 2724: e2505000 subs r5, r0, #0 2728: 0a00000e beq 2768 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 272c: e59f3088 ldr r3, [pc, #136] ; 27bc 2730: e5933000 ldr r3, [r3] 2734: e3530000 cmp r3, #0 (*rtems_malloc_dirty_helper)( return_this, size ); 2738: 11a00005 movne r0, r5 273c: 11a01004 movne r1, r4 2740: 11a0e00f movne lr, pc 2744: 112fff13 bxne r3 /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 2748: e59f3070 ldr r3, [pc, #112] ; 27c0 274c: e5933000 ldr r3, [r3] 2750: e3530000 cmp r3, #0 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 2754: 11a00005 movne r0, r5 2758: 11a0e00f movne lr, pc 275c: 1593f004 ldrne pc, [r3, #4] return return_this; } 2760: e1a00005 mov r0, r5 2764: e8bd8030 pop {r4, r5, pc} */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { if (rtems_malloc_sbrk_helpers) 2768: e59f3054 ldr r3, [pc, #84] ; 27c4 276c: e5933000 ldr r3, [r3] 2770: e3530000 cmp r3, #0 2774: 0a000005 beq 2790 return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 2778: e1a00004 mov r0, r4 277c: e1a0e00f mov lr, pc 2780: e593f004 ldr pc, [r3, #4] if ( !return_this ) { 2784: e3500000 cmp r0, #0 2788: 11a05000 movne r5, r0 278c: 1affffe6 bne 272c errno = ENOMEM; 2790: eb002e0e bl dfd0 <__errno> 2794: e3a0300c mov r3, #12 2798: e5803000 str r3, [r0] return (void *) 0; 279c: eaffffef b 2760 /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && !malloc_is_system_state_OK() ) 27a0: ebffff6f bl 2564 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 27a4: e2505000 subs r5, r0, #0 27a8: 1affffd7 bne 270c 27ac: eaffffeb b 2760 <== NOT EXECUTED =============================================================================== 0000cf98 : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { cf98: e92d4030 push {r4, r5, lr} IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; cf9c: e5905018 ldr r5, [r0, #24] if (the_jnode->type == IMFS_LINEAR_FILE) { cfa0: e595304c ldr r3, [r5, #76] ; 0x4c cfa4: e3530006 cmp r3, #6 rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { cfa8: e1a04000 mov r4, r0 IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; if (the_jnode->type == IMFS_LINEAR_FILE) { cfac: 0a00000d beq cfe8 if (iop->offset > the_jnode->info.linearfile.size) iop->offset = the_jnode->info.linearfile.size; } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) cfb0: e1a00005 mov r0, r5 cfb4: e284200c add r2, r4, #12 cfb8: e8920006 ldm r2, {r1, r2} cfbc: ebfffee7 bl cb60 cfc0: e3500000 cmp r0, #0 cfc4: 1a000018 bne d02c rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; cfc8: e2853050 add r3, r5, #80 ; 0x50 cfcc: e893000c ldm r3, {r2, r3} cfd0: e984000c stmib r4, {r2, r3} cfd4: e284300c add r3, r4, #12 cfd8: e893000c ldm r3, {r2, r3} } return iop->offset; } cfdc: e1a00002 mov r0, r2 cfe0: e1a01003 mov r1, r3 cfe4: e8bd8030 pop {r4, r5, pc} IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; if (the_jnode->type == IMFS_LINEAR_FILE) { if (iop->offset > the_jnode->info.linearfile.size) cfe8: e280300c add r3, r0, #12 cfec: e893000c ldm r3, {r2, r3} cff0: e5951054 ldr r1, [r5, #84] ; 0x54 cff4: e1530001 cmp r3, r1 cff8: e5950050 ldr r0, [r5, #80] ; 0x50 cffc: ca000002 bgt d00c d000: 1afffff5 bne cfdc d004: e1520000 cmp r2, r0 d008: 9afffff3 bls cfdc iop->offset = the_jnode->info.linearfile.size; d00c: e1a02000 mov r2, r0 <== NOT EXECUTED d010: e1a03001 mov r3, r1 <== NOT EXECUTED d014: e1a05000 mov r5, r0 <== NOT EXECUTED d018: e584000c str r0, [r4, #12] <== NOT EXECUTED d01c: e5841010 str r1, [r4, #16] <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; } return iop->offset; } d020: e1a00002 mov r0, r2 <== NOT EXECUTED d024: e1a01003 mov r1, r3 <== NOT EXECUTED d028: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED if (iop->offset > the_jnode->info.linearfile.size) iop->offset = the_jnode->info.linearfile.size; } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) rtems_set_errno_and_return_minus_one( ENOSPC ); d02c: eb0003e7 bl dfd0 <__errno> d030: e3a0301c mov r3, #28 d034: e5803000 str r3, [r0] d038: e3e02000 mvn r2, #0 d03c: e3e03000 mvn r3, #0 d040: eaffffe5 b cfdc =============================================================================== 0000ce84 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { ce84: e92d4070 push {r4, r5, r6, lr} the_jnode = iop->pathinfo.node_access; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) ce88: e5903014 ldr r3, [r0, #20] ce8c: e3130f81 tst r3, #516 ; 0x204 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { ce90: e24dd004 sub sp, sp, #4 ce94: e1a04000 mov r4, r0 IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; ce98: e5905018 ldr r5, [r0, #24] /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) ce9c: 0a000002 beq ceac && (the_jnode->type == IMFS_LINEAR_FILE)) { cea0: e595204c ldr r2, [r5, #76] ; 0x4c cea4: e3520006 cmp r2, #6 cea8: 0a00000a beq ced8 the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) ceac: e2850050 add r0, r5, #80 ; 0x50 ceb0: e8900005 ldm r0, {r0, r2} return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) ceb4: e3130c02 tst r3, #512 ; 0x200 iop->offset = the_jnode->info.file.size; ceb8: 1584000c strne r0, [r4, #12] cebc: 15842010 strne r2, [r4, #16] cec0: 15952054 ldrne r2, [r5, #84] ; 0x54 cec4: 15950050 ldrne r0, [r5, #80] ; 0x50 iop->size = the_jnode->info.file.size; cec8: e9840005 stmib r4, {r0, r2} return 0; cecc: e3a00000 mov r0, #0 } ced0: e28dd004 add sp, sp, #4 ced4: e8bd8070 pop {r4, r5, r6, pc} /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; ced8: e595c050 ldr ip, [r5, #80] ; 0x50 <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; cedc: e3a00000 mov r0, #0 <== NOT EXECUTED && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; cee0: e3a01000 mov r1, #0 <== NOT EXECUTED cee4: e3a02000 mov r2, #0 <== NOT EXECUTED if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; cee8: e3a06005 mov r6, #5 <== NOT EXECUTED the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) ceec: 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; cef0: e5953058 ldr r3, [r5, #88] ; 0x58 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; cef4: e585604c str r6, [r5, #76] ; 0x4c <== NOT EXECUTED the_jnode->info.file.size = 0; cef8: e5851050 str r1, [r5, #80] ; 0x50 <== NOT EXECUTED cefc: e5852054 str r2, [r5, #84] ; 0x54 <== NOT EXECUTED the_jnode->info.file.indirect = 0; cf00: e5850058 str r0, [r5, #88] ; 0x58 <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; cf04: e585005c str r0, [r5, #92] ; 0x5c <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; cf08: e5850060 str r0, [r5, #96] ; 0x60 <== NOT EXECUTED if ((count != 0) cf0c: 05943014 ldreq r3, [r4, #20] <== NOT EXECUTED cf10: 01a00001 moveq r0, r1 <== NOT EXECUTED cf14: 0affffe6 beq ceb4 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) cf18: e1a00005 mov r0, r5 <== NOT EXECUTED cf1c: e58dc000 str ip, [sp] <== NOT EXECUTED cf20: ebffff5b bl cc94 <== NOT EXECUTED cf24: e3700001 cmn r0, #1 <== NOT EXECUTED cf28: 0affffe8 beq ced0 <== NOT EXECUTED cf2c: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED cf30: eaffffdd b ceac <== NOT EXECUTED =============================================================================== 00002908 : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 2908: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 290c: e3530001 cmp r3, #1 const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 2910: e24dd030 sub sp, sp, #48 ; 0x30 2914: e58d3008 str r3, [sp, #8] 2918: e1a07000 mov r7, r0 291c: e1a06001 mov r6, r1 2920: e1a09002 mov r9, r2 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 2924: 8a00009a bhi 2b94 rtems_set_errno_and_return_minus_one( EINVAL ); /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); 2928: e1a00002 mov r0, r2 292c: eb00200e bl a96c if ( !mount_h ) 2930: e3500000 cmp r0, #0 2934: e58d0014 str r0, [sp, #20] 2938: 0a000095 beq 2b94 { 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; 293c: e2565000 subs r5, r6, #0 2940: 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 : "/"; 2944: e3550000 cmp r5, #0 2948: 0a00008a beq 2b78 * 4) The mount point exists with the proper permissions to allow mounting * 5) The selected mount point already has a file system mounted to it * */ int mount( 294c: e1a00006 mov r0, r6 2950: eb003188 bl ef78 2954: e2803001 add r3, r0, #1 2958: e58d0010 str r0, [sp, #16] 295c: e58d300c str r3, [sp, #12] 2960: e58d6018 str r6, [sp, #24] const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; 2964: e1a00009 mov r0, r9 2968: eb003182 bl ef78 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 296c: e3570000 cmp r7, #0 const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; 2970: e280b001 add fp, r0, #1 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 2974: 01a08007 moveq r8, r7 2978: 0a000002 beq 2988 297c: e1a00007 mov r0, r7 2980: eb00317c bl ef78 2984: e2808001 add r8, r0, #1 size_t target_size = strlen( target ) + 1; size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size; 2988: e59d300c ldr r3, [sp, #12] 298c: e2831074 add r1, r3, #116 ; 0x74 2990: e081100b add r1, r1, fp rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 2994: e3a00001 mov r0, #1 2998: e0811008 add r1, r1, r8 299c: ebfffe05 bl 21b8 if ( mt_entry != NULL ) { 29a0: e2504000 subs r4, r0, #0 29a4: 0a00006e beq 2b64 char *str = (char *) mt_entry + sizeof( *mt_entry ); 29a8: e284a074 add sl, r4, #116 ; 0x74 memcpy( str, filesystemtype, filesystemtype_size ); mt_entry->type = str; str += filesystemtype_size; 29ac: e08a300b add r3, sl, fp rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); if ( mt_entry != NULL ) { char *str = (char *) mt_entry + sizeof( *mt_entry ); memcpy( str, filesystemtype, filesystemtype_size ); 29b0: e1a01009 mov r1, r9 29b4: e1a0200b mov r2, fp 29b8: e1a0000a mov r0, sl 29bc: e58d3004 str r3, [sp, #4] 29c0: eb002fb0 bl e888 mt_entry->type = str; str += filesystemtype_size; memcpy( str, source_or_null, source_size ); mt_entry->dev = str; str += source_size; 29c4: e59d3004 ldr r3, [sp, #4] memcpy( str, filesystemtype, filesystemtype_size ); mt_entry->type = str; str += filesystemtype_size; memcpy( str, source_or_null, source_size ); 29c8: e1a01007 mov r1, r7 29cc: e1a02008 mov r2, r8 29d0: e1a00003 mov r0, r3 if ( mt_entry != NULL ) { char *str = (char *) mt_entry + sizeof( *mt_entry ); memcpy( str, filesystemtype, filesystemtype_size ); mt_entry->type = str; 29d4: e584a06c str sl, [r4, #108] ; 0x6c str += filesystemtype_size; memcpy( str, source_or_null, source_size ); mt_entry->dev = str; str += source_size; 29d8: e0839008 add r9, r3, r8 memcpy( str, filesystemtype, filesystemtype_size ); mt_entry->type = str; str += filesystemtype_size; memcpy( str, source_or_null, source_size ); 29dc: eb002fa9 bl e888 mt_entry->dev = str; 29e0: e59d3004 ldr r3, [sp, #4] str += source_size; memcpy( str, target, target_size ); 29e4: e59d1018 ldr r1, [sp, #24] 29e8: e59d200c ldr r2, [sp, #12] memcpy( str, filesystemtype, filesystemtype_size ); mt_entry->type = str; str += filesystemtype_size; memcpy( str, source_or_null, source_size ); mt_entry->dev = str; 29ec: e5843070 str r3, [r4, #112] ; 0x70 str += source_size; memcpy( str, target, target_size ); 29f0: e1a00009 mov r0, r9 29f4: eb002fa3 bl e888 if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; mt_entry->options = options; mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 29f8: e59fe20c ldr lr, [pc, #524] ; 2c0c 29fc: e8be000f ldm lr!, {r0, r1, r2, r3} 2a00: e284c038 add ip, r4, #56 ; 0x38 2a04: e8ac000f stmia ip!, {r0, r1, r2, r3} 2a08: e8be000f ldm lr!, {r0, r1, r2, r3} 2a0c: e8ac000f stmia ip!, {r0, r1, r2, r3} 2a10: e89e000f ldm lr, {r0, r1, r2, r3} ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; mt_entry->options = options; 2a14: e59de008 ldr lr, [sp, #8] /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { 2a18: 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; 2a1c: e5849068 str r9, [r4, #104] ; 0x68 &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; 2a20: e584402c str r4, [r4, #44] ; 0x2c mt_entry->options = options; 2a24: e584e030 str lr, [r4, #48] ; 0x30 mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 2a28: 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 ) { 2a2c: 1a000024 bne 2ac4 stop = (*routine)( mt_entry, routine_arg ); } rtems_libio_unlock(); return stop; } 2a30: e59f31d8 ldr r3, [pc, #472] ; 2c10 } } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { 2a34: e5932000 ldr r2, [r3] */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_tail( const Chain_Control *the_chain ) { return &the_chain->Tail.Node; 2a38: e2833004 add r3, r3, #4 2a3c: e1520003 cmp r2, r3 ) { rtems_filesystem_fsmount_me_t mount_h = NULL; rtems_filesystem_location_info_t loc; rtems_filesystem_mount_table_entry_t *mt_entry = NULL; rtems_filesystem_location_info_t *loc_to_free = NULL; 2a40: 01a07005 moveq r7, r5 } } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { 2a44: 1a000057 bne 2ba8 * 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 ) ) { 2a48: e1a00004 mov r0, r4 2a4c: e59d1054 ldr r1, [sp, #84] ; 0x54 2a50: e59d3014 ldr r3, [sp, #20] 2a54: e1a0e00f mov lr, pc 2a58: e12fff13 bx r3 2a5c: e2506000 subs r6, r0, #0 2a60: 1a000057 bne 2bc4 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 ); 2a64: e59f71a8 ldr r7, [pc, #424] ; 2c14 2a68: e1a02006 mov r2, r6 2a6c: e1a01006 mov r1, r6 2a70: e5970000 ldr r0, [r7] 2a74: eb000bf5 bl 5a50 2a78: e59f0190 ldr r0, [pc, #400] ; 2c10 2a7c: e1a01004 mov r1, r4 2a80: eb000e66 bl 6420 <_Chain_Append> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 2a84: e5970000 ldr r0, [r7] 2a88: eb000c39 bl 5b74 */ rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); if ( !has_target ) 2a8c: e3550000 cmp r5, #0 rtems_filesystem_root = mt_entry->mt_fs_root; return 0; 2a90: 11a00006 movne r0, r6 */ rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); if ( !has_target ) 2a94: 1a000008 bne 2abc rtems_filesystem_root = mt_entry->mt_fs_root; 2a98: e59f3178 ldr r3, [pc, #376] ; 2c18 2a9c: e284401c add r4, r4, #28 2aa0: e593c000 ldr ip, [r3] 2aa4: e8b4000f ldm r4!, {r0, r1, r2, r3} 2aa8: e28cc018 add ip, ip, #24 2aac: e8ac000f stmia ip!, {r0, r1, r2, r3} 2ab0: e5943000 ldr r3, [r4] 2ab4: e58c3000 str r3, [ip] return 0; 2ab8: e1a00005 mov r0, r5 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 2abc: e28dd030 add sp, sp, #48 ; 0x30 2ac0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { if ( rtems_filesystem_evaluate_path( 2ac4: e28d701c add r7, sp, #28 2ac8: e3a0c001 mov ip, #1 2acc: e1a00006 mov r0, r6 2ad0: e59d1010 ldr r1, [sp, #16] 2ad4: e3a02007 mov r2, #7 2ad8: e1a03007 mov r3, r7 2adc: e58dc000 str ip, [sp] 2ae0: ebfffde2 bl 2270 2ae4: e3700001 cmn r0, #1 2ae8: 0a000031 beq 2bb4 /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 2aec: e1a00007 mov r0, r7 2af0: e59d3028 ldr r3, [sp, #40] ; 0x28 2af4: e1a0e00f mov lr, pc 2af8: e593f010 ldr pc, [r3, #16] 2afc: e3500001 cmp r0, #1 2b00: 1a000039 bne 2bec /* * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { 2b04: e59f0110 ldr r0, [pc, #272] ; 2c1c 2b08: e59d101c ldr r1, [sp, #28] 2b0c: ebffff5f bl 2890 2b10: e3500000 cmp r0, #0 2b14: 1a000038 bne 2bfc * 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; 2b18: e59d201c ldr r2, [sp, #28] 2b1c: e5842008 str r2, [r4, #8] mt_entry->mt_point_node.handlers = loc.handlers; 2b20: e28d2024 add r2, sp, #36 ; 0x24 2b24: e892000c ldm r2, {r2, r3} 2b28: e5842010 str r2, [r4, #16] mt_entry->mt_point_node.ops = loc.ops; mt_entry->mt_point_node.mt_entry = loc.mt_entry; 2b2c: e59d202c ldr r2, [sp, #44] ; 0x2c * 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; 2b30: e5843014 str r3, [r4, #20] mt_entry->mt_point_node.mt_entry = loc.mt_entry; 2b34: e5842018 str r2, [r4, #24] /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( loc.ops->mount_h( mt_entry ) ) { 2b38: e1a00004 mov r0, r4 2b3c: e1a0e00f mov lr, pc 2b40: e593f020 ldr pc, [r3, #32] 2b44: e3500000 cmp r0, #0 2b48: 0affffbe beq 2a48 return 0; cleanup_and_bail: free( mt_entry ); 2b4c: e1a00004 mov r0, r4 2b50: ebfffe05 bl 236c if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); 2b54: e1a00007 mov r0, r7 2b58: ebfffdfe bl 2358 return -1; 2b5c: e3e00000 mvn r0, #0 2b60: eaffffd5 b 2abc target, filesystemtype, &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); 2b64: eb002d19 bl dfd0 <__errno> <== NOT EXECUTED 2b68: e3a0300c mov r3, #12 <== NOT EXECUTED 2b6c: e5803000 str r3, [r0] <== NOT EXECUTED 2b70: e3e00000 mvn r0, #0 <== NOT EXECUTED 2b74: eaffffd0 b 2abc <== NOT EXECUTED const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 2b78: e59fe0a0 ldr lr, [pc, #160] ; 2c20 2b7c: e3a03002 mov r3, #2 2b80: e58de018 str lr, [sp, #24] 2b84: e3a0e001 mov lr, #1 2b88: e58d300c str r3, [sp, #12] 2b8c: e58de010 str lr, [sp, #16] 2b90: eaffff73 b 2964 /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); if ( !mount_h ) rtems_set_errno_and_return_minus_one( EINVAL ); 2b94: eb002d0d bl dfd0 <__errno> 2b98: e3a03016 mov r3, #22 2b9c: e5803000 str r3, [r0] 2ba0: e3e00000 mvn r0, #0 2ba4: eaffffc4 b 2abc } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { errno = EINVAL; 2ba8: eb002d08 bl dfd0 <__errno> 2bac: e3a03016 mov r3, #22 2bb0: e5803000 str r3, [r0] return 0; cleanup_and_bail: free( mt_entry ); 2bb4: e1a00004 mov r0, r4 2bb8: ebfffdeb bl 236c if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; 2bbc: e3e00000 mvn r0, #0 2bc0: eaffffbd b 2abc if ( (*mount_h)( mt_entry, data ) ) { /* * Try to undo the mount operation */ loc.ops->unmount_h( mt_entry ); 2bc4: e59d3028 ldr r3, [sp, #40] ; 0x28 2bc8: e1a00004 mov r0, r4 2bcc: e1a0e00f mov lr, pc 2bd0: e593f028 ldr pc, [r3, #40] ; 0x28 return 0; cleanup_and_bail: free( mt_entry ); 2bd4: e1a00004 mov r0, r4 2bd8: ebfffde3 bl 236c if ( loc_to_free ) 2bdc: e3570000 cmp r7, #0 rtems_filesystem_freenode( loc_to_free ); return -1; 2be0: 03e00000 mvneq r0, #0 cleanup_and_bail: free( mt_entry ); if ( loc_to_free ) 2be4: 0affffb4 beq 2abc 2be8: eaffffd9 b 2b54 /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { errno = ENOTDIR; 2bec: eb002cf7 bl dfd0 <__errno> 2bf0: e3a03014 mov r3, #20 2bf4: e5803000 str r3, [r0] goto cleanup_and_bail; 2bf8: eaffffd3 b 2b4c /* * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { errno = EBUSY; 2bfc: eb002cf3 bl dfd0 <__errno> 2c00: e3a03010 mov r3, #16 2c04: e5803000 str r3, [r0] goto cleanup_and_bail; 2c08: eaffffcf b 2b4c =============================================================================== 00002c28 : */ int newlib_free_buffers( FILE *fp ) { 2c28: e92d4010 push {r4, lr} 2c2c: e1a04000 mov r4, r0 switch ( fileno(fp) ) { 2c30: eb002de9 bl e3dc 2c34: e3500002 cmp r0, #2 2c38: 9a000003 bls 2c4c fp->_flags &= ~__SMBF; fp->_bf._base = fp->_p = (unsigned char *) NULL; } break; default: fclose(fp); 2c3c: e1a00004 mov r0, r4 <== NOT EXECUTED 2c40: eb002d30 bl e108 <== NOT EXECUTED } return 0; } 2c44: e3a00000 mov r0, #0 2c48: e8bd8010 pop {r4, pc} { switch ( fileno(fp) ) { case 0: case 1: case 2: if (fp->_flags & __SMBF) { 2c4c: e1d430bc ldrh r3, [r4, #12] 2c50: e3130080 tst r3, #128 ; 0x80 2c54: 0afffffa beq 2c44 free( fp->_bf._base ); 2c58: e5940010 ldr r0, [r4, #16] 2c5c: ebfffdc2 bl 236c <== NOT EXECUTED fp->_flags &= ~__SMBF; 2c60: e1d420bc ldrh r2, [r4, #12] <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 2c64: e3a03000 mov r3, #0 <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 2c68: e3c22080 bic r2, r2, #128 ; 0x80 <== NOT EXECUTED 2c6c: e1c420bc strh r2, [r4, #12] <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 2c70: e5843000 str r3, [r4] <== NOT EXECUTED 2c74: e5843010 str r3, [r4, #16] <== NOT EXECUTED break; default: fclose(fp); } return 0; } 2c78: e3a00000 mov r0, #0 <== NOT EXECUTED 2c7c: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== 00003edc : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 3edc: e92d4010 push {r4, lr} int i; if (tty->termios.c_oflag & OPOST) { 3ee0: e5913034 ldr r3, [r1, #52] ; 0x34 /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 3ee4: e24dd004 sub sp, sp, #4 int i; if (tty->termios.c_oflag & OPOST) { 3ee8: e3130001 tst r3, #1 /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 3eec: e1a04001 mov r4, r1 3ef0: e5cd0000 strb r0, [sp] int i; if (tty->termios.c_oflag & OPOST) { 3ef4: 0a000014 beq 3f4c switch (c) { 3ef8: e5dd1000 ldrb r1, [sp] 3efc: e2412008 sub r2, r1, #8 3f00: e3520005 cmp r2, #5 3f04: 979ff102 ldrls pc, [pc, r2, lsl #2] 3f08: ea000005 b 3f24 3f0c: 00003fd4 .word 0x00003fd4 3f10: 00003f9c .word 0x00003f9c 3f14: 00003fe8 .word 0x00003fe8 3f18: 00003f24 .word 0x00003f24 3f1c: 00003f24 .word 0x00003f24 3f20: 00003f64 .word 0x00003f64 if (tty->column > 0) tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) 3f24: e3130002 tst r3, #2 3f28: 1a00003a bne 4018 3f2c: e59f310c ldr r3, [pc, #268] ; 4040 3f30: e5933000 ldr r3, [r3] c = toupper(c); if (!iscntrl(c)) 3f34: e0831001 add r1, r3, r1 3f38: e5d13001 ldrb r3, [r1, #1] 3f3c: e3130020 tst r3, #32 tty->column++; 3f40: 05943028 ldreq r3, [r4, #40] ; 0x28 3f44: 02833001 addeq r3, r3, #1 3f48: 05843028 streq r3, [r4, #40] ; 0x28 break; } } rtems_termios_puts (&c, 1, tty); 3f4c: e1a0000d mov r0, sp 3f50: e3a01001 mov r1, #1 3f54: e1a02004 mov r2, r4 3f58: ebffff98 bl 3dc0 } 3f5c: e28dd004 add sp, sp, #4 3f60: e8bd8010 pop {r4, pc} tty->column = 0; } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 3f64: e3130010 tst r3, #16 <== NOT EXECUTED 3f68: 0a000002 beq 3f78 <== NOT EXECUTED 3f6c: e5942028 ldr r2, [r4, #40] ; 0x28 <== NOT EXECUTED 3f70: e3520000 cmp r2, #0 <== NOT EXECUTED 3f74: 0afffff8 beq 3f5c <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 3f78: e2132008 ands r2, r3, #8 <== NOT EXECUTED c = '\n'; if (tty->termios.c_oflag & ONLRET) tty->column = 0; break; } tty->column = 0; 3f7c: 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) { 3f80: 0afffff1 beq 3f4c <== NOT EXECUTED c = '\n'; if (tty->termios.c_oflag & ONLRET) 3f84: 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'; 3f88: e3a0300a mov r3, #10 <== NOT EXECUTED 3f8c: e5cd3000 strb r3, [sp] <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) tty->column = 0; 3f90: 13a03000 movne r3, #0 <== NOT EXECUTED 3f94: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED 3f98: eaffffeb b 3f4c <== NOT EXECUTED } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 3f9c: e5942028 ldr r2, [r4, #40] ; 0x28 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 3fa0: e2033b06 and r3, r3, #6144 ; 0x1800 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 3fa4: e2021007 and r1, r2, #7 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 3fa8: e3530b06 cmp r3, #6144 ; 0x1800 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 3fac: e2611008 rsb r1, r1, #8 if ((tty->termios.c_oflag & TABDLY) == XTABS) { tty->column += i; rtems_termios_puts ( " ", i, tty); return; } tty->column += i; 3fb0: 10811002 addne r1, r1, r2 3fb4: 15841028 strne r1, [r4, #40] ; 0x28 tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { 3fb8: 1affffe3 bne 3f4c tty->column += i; 3fbc: e0812002 add r2, r1, r2 3fc0: e5842028 str r2, [r4, #40] ; 0x28 rtems_termios_puts ( " ", i, tty); 3fc4: e59f0078 ldr r0, [pc, #120] ; 4044 3fc8: e1a02004 mov r2, r4 3fcc: ebffff7b bl 3dc0 return; 3fd0: eaffffe1 b 3f5c } tty->column += i; break; case '\b': if (tty->column > 0) 3fd4: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 3fd8: e3530000 cmp r3, #0 <== NOT EXECUTED tty->column--; 3fdc: c2433001 subgt r3, r3, #1 <== NOT EXECUTED 3fe0: c5843028 strgt r3, [r4, #40] ; 0x28 <== NOT EXECUTED 3fe4: eaffffd8 b 3f4c <== NOT EXECUTED int i; if (tty->termios.c_oflag & OPOST) { switch (c) { case '\n': if (tty->termios.c_oflag & ONLRET) 3fe8: e3130020 tst r3, #32 tty->column = 0; 3fec: 13a02000 movne r2, #0 3ff0: 15842028 strne r2, [r4, #40] ; 0x28 if (tty->termios.c_oflag & ONLCR) { 3ff4: e3130004 tst r3, #4 3ff8: 0affffd3 beq 3f4c rtems_termios_puts ("\r", 1, tty); 3ffc: e59f0044 ldr r0, [pc, #68] ; 4048 4000: e3a01001 mov r1, #1 4004: e1a02004 mov r2, r4 4008: ebffff6c bl 3dc0 tty->column = 0; 400c: e3a03000 mov r3, #0 4010: e5843028 str r3, [r4, #40] ; 0x28 4014: eaffffcc b 3f4c tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) c = toupper(c); 4018: e59f3020 ldr r3, [pc, #32] ; 4040 <== NOT EXECUTED 401c: e5933000 ldr r3, [r3] <== NOT EXECUTED 4020: e0832001 add r2, r3, r1 <== NOT EXECUTED 4024: e5d22001 ldrb r2, [r2, #1] <== NOT EXECUTED 4028: e2022003 and r2, r2, #3 <== NOT EXECUTED 402c: e3520002 cmp r2, #2 <== NOT EXECUTED 4030: 02411020 subeq r1, r1, #32 <== NOT EXECUTED 4034: e20110ff and r1, r1, #255 ; 0xff <== NOT EXECUTED 4038: e5cd1000 strb r1, [sp] <== NOT EXECUTED 403c: eaffffbc b 3f34 <== NOT EXECUTED =============================================================================== 0000cf4c : uint32_t cmd, void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { cf4c: e3a03a46 mov r3, #286720 ; 0x46000 cf50: e2833e67 add r3, r3, #1648 ; 0x670 cf54: e283313d add r3, r3, #1073741839 ; 0x4000000f cf58: e1510003 cmp r1, r3 pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { cf5c: e92d4070 push {r4, r5, r6, lr} cf60: e1a05000 mov r5, r0 cf64: e1a04002 mov r4, r2 *(unsigned int *)buffer = pipe->Length; PIPE_UNLOCK(pipe); return 0; } return -EINVAL; cf68: 13e00015 mvnne r0, #21 uint32_t cmd, void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { cf6c: 18bd8070 popne {r4, r5, r6, pc} if (buffer == NULL) cf70: e3520000 cmp r2, #0 return -EFAULT; cf74: 03e0000d mvneq r0, #13 void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { if (buffer == NULL) cf78: 08bd8070 popeq {r4, r5, r6, pc} return -EFAULT; if (! PIPE_LOCK(pipe)) cf7c: e3a01000 mov r1, #0 cf80: e5950028 ldr r0, [r5, #40] ; 0x28 cf84: e1a02001 mov r2, r1 cf88: ebffeb7c bl 7d80 cf8c: e2506000 subs r6, r0, #0 cf90: 0a000001 beq cf9c return -EINTR; cf94: e3e00003 mvn r0, #3 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; } return -EINVAL; } cf98: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(unsigned int *)buffer = pipe->Length; cf9c: e595300c ldr r3, [r5, #12] PIPE_UNLOCK(pipe); cfa0: e5950028 ldr r0, [r5, #40] ; 0x28 if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(unsigned int *)buffer = pipe->Length; cfa4: e5843000 str r3, [r4] PIPE_UNLOCK(pipe); cfa8: ebffebbd bl 7ea4 return 0; cfac: e1a00006 mov r0, r6 cfb0: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== 0000cb80 : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { cb80: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} cb84: e1a09001 mov r9, r1 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) cb88: e3a01000 mov r1, #0 pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { cb8c: e24dd008 sub sp, sp, #8 cb90: e1a04000 mov r4, r0 cb94: e1a05002 mov r5, r2 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) cb98: e5900028 ldr r0, [r0, #40] ; 0x28 cb9c: e1a02001 mov r2, r1 pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { cba0: e1a07003 mov r7, r3 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) cba4: ebffec75 bl 7d80 cba8: e250a000 subs sl, r0, #0 return -EINTR; cbac: 13e00003 mvnne r0, #3 rtems_libio_t *iop ) { int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) cbb0: 1a000028 bne cc58 return -EINTR; while (read < count) { cbb4: e3550000 cmp r5, #0 cbb8: 01a08005 moveq r8, r5 cbbc: 01a06008 moveq r6, r8 cbc0: 0a00001f beq cc44 cbc4: e1a0800a mov r8, sl /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe); cbc8: e28db004 add fp, sp, #4 if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { cbcc: e594200c ldr r2, [r4, #12] cbd0: e3520000 cmp r2, #0 cbd4: 1a000021 bne cc60 /* Not an error */ if (pipe->Writers == 0) cbd8: e5946014 ldr r6, [r4, #20] cbdc: e3560000 cmp r6, #0 cbe0: 0a000017 beq cc44 goto out_locked; if (LIBIO_NODELAY(iop)) { cbe4: e5976014 ldr r6, [r7, #20] cbe8: e2166001 ands r6, r6, #1 cbec: 1a00003b bne cce0 ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; cbf0: e5943018 ldr r3, [r4, #24] cbf4: e2833001 add r3, r3, #1 cbf8: e5843018 str r3, [r4, #24] PIPE_UNLOCK(pipe); cbfc: e5940028 ldr r0, [r4, #40] ; 0x28 cc00: ebffeca7 bl 7ea4 if (! PIPE_READWAIT(pipe)) cc04: e1a01006 mov r1, r6 cc08: e594002c ldr r0, [r4, #44] ; 0x2c cc0c: eb000636 bl e4ec ret = -EINTR; if (! PIPE_LOCK(pipe)) { cc10: e1a01006 mov r1, r6 cc14: e1a02001 mov r2, r1 } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) cc18: e2506000 subs r6, r0, #0 ret = -EINTR; if (! PIPE_LOCK(pipe)) { cc1c: e5940028 ldr r0, [r4, #40] ; 0x28 } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) cc20: 13e06003 mvnne r6, #3 ret = -EINTR; if (! PIPE_LOCK(pipe)) { cc24: ebffec55 bl 7d80 cc28: e3500000 cmp r0, #0 cc2c: 1a00002d bne cce8 /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; cc30: e5943018 ldr r3, [r4, #24] if (ret != 0) cc34: e3560000 cmp r6, #0 if (! PIPE_LOCK(pipe)) { /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; cc38: e2433001 sub r3, r3, #1 cc3c: e5843018 str r3, [r4, #24] if (ret != 0) cc40: 0affffe1 beq cbcc PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); cc44: e5940028 ldr r0, [r4, #40] ; 0x28 cc48: ebffec95 bl 7ea4 out_nolock: if (read > 0) cc4c: e3580000 cmp r8, #0 cc50: c1a00008 movgt r0, r8 cc54: d1a00006 movle r0, r6 return read; return ret; } cc58: e28dd008 add sp, sp, #8 cc5c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); chunk1 = pipe->Size - pipe->Start; cc60: e5941008 ldr r1, [r4, #8] cc64: e5943004 ldr r3, [r4, #4] if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); cc68: e06a6005 rsb r6, sl, r5 cc6c: e1520006 cmp r2, r6 cc70: 31a06002 movcc r6, r2 chunk1 = pipe->Size - pipe->Start; cc74: e0613003 rsb r3, r1, r3 if (chunk > chunk1) { cc78: e1560003 cmp r6, r3 cc7c: ca00001b bgt ccf0 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); cc80: e5943000 ldr r3, [r4] cc84: e089000a add r0, r9, sl cc88: e0831001 add r1, r3, r1 cc8c: e1a02006 mov r2, r6 cc90: eb001258 bl 115f8 pipe->Start += chunk; cc94: e5940008 ldr r0, [r4, #8] pipe->Start %= pipe->Size; cc98: e5941004 ldr r1, [r4, #4] cc9c: e0860000 add r0, r6, r0 cca0: eb003e47 bl 1c5c4 <__umodsi3> pipe->Length -= chunk; cca4: e594300c ldr r3, [r4, #12] cca8: e0663003 rsb r3, r6, r3 /* For buffering optimization */ if (PIPE_EMPTY(pipe)) ccac: e3530000 cmp r3, #0 } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; ccb0: e5840008 str r0, [r4, #8] pipe->Length -= chunk; ccb4: e584300c str r3, [r4, #12] /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; ccb8: 05843008 streq r3, [r4, #8] if (pipe->waitingWriters > 0) ccbc: e594301c ldr r3, [r4, #28] ccc0: e3530000 cmp r3, #0 ccc4: 1a000016 bne cd24 PIPE_WAKEUPWRITERS(pipe); read += chunk; ccc8: e0888006 add r8, r8, r6 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { cccc: e1580005 cmp r8, r5 ccd0: e1a0a008 mov sl, r8 ccd4: 3affffbc bcc cbcc ccd8: e3a06000 mov r6, #0 ccdc: eaffffd8 b cc44 /* Not an error */ if (pipe->Writers == 0) goto out_locked; if (LIBIO_NODELAY(iop)) { ret = -EAGAIN; cce0: e3e0600a mvn r6, #10 cce4: eaffffd6 b cc44 PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { /* WARN waitingReaders not restored! */ ret = -EINTR; cce8: e3e06003 mvn r6, #3 <== NOT EXECUTED ccec: eaffffd6 b cc4c <== NOT EXECUTED /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); chunk1 = pipe->Size - pipe->Start; if (chunk > chunk1) { memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); ccf0: e5940000 ldr r0, [r4] ccf4: e1a02003 mov r2, r3 ccf8: e0801001 add r1, r0, r1 ccfc: e089000a add r0, r9, sl cd00: e58d3000 str r3, [sp] cd04: eb00123b bl 115f8 memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); cd08: e59d3000 ldr r3, [sp] cd0c: e08a0003 add r0, sl, r3 cd10: e0890000 add r0, r9, r0 cd14: e5941000 ldr r1, [r4] cd18: e0632006 rsb r2, r3, r6 cd1c: eb001235 bl 115f8 cd20: eaffffdb b cc94 /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe); cd24: e5940030 ldr r0, [r4, #48] ; 0x30 cd28: e1a0100b mov r1, fp cd2c: eb0005d6 bl e48c cd30: eaffffe4 b ccc8 =============================================================================== 0000cd34 : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { cd34: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) cd38: e2524000 subs r4, r2, #0 pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { cd3c: e1a05000 mov r5, r0 cd40: e24dd008 sub sp, sp, #8 cd44: e1a06001 mov r6, r1 int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) return 0; cd48: 01a00004 moveq r0, r4 ) { int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) cd4c: 1a000001 bne cd58 #endif if (written > 0) return written; return ret; } cd50: e28dd008 add sp, sp, #8 cd54: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) cd58: e3a01000 mov r1, #0 cd5c: e5950028 ldr r0, [r5, #40] ; 0x28 cd60: e1a02001 mov r2, r1 cd64: e58d3000 str r3, [sp] cd68: ebffec04 bl 7d80 cd6c: e2509000 subs r9, r0, #0 cd70: e59d3000 ldr r3, [sp] return -EINTR; cd74: 13e00003 mvnne r0, #3 /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) cd78: 1afffff4 bne cd50 return -EINTR; if (pipe->Readers == 0) { cd7c: e595a010 ldr sl, [r5, #16] cd80: e35a0000 cmp sl, #0 cd84: 0a000058 beq ceec ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; cd88: e5957004 ldr r7, [r5, #4] cd8c: e1540007 cmp r4, r7 cd90: 91a08004 movls r8, r4 cd94: 83a08001 movhi r8, #1 cd98: e1a0a009 mov sl, r9 else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); cd9c: e28db004 add fp, sp, #4 /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { while (PIPE_SPACE(pipe) < chunk) { cda0: e595100c ldr r1, [r5, #12] cda4: e0612007 rsb r2, r1, r7 cda8: e1520008 cmp r2, r8 cdac: 2a000021 bcs ce38 if (LIBIO_NODELAY(iop)) { cdb0: e5937014 ldr r7, [r3, #20] cdb4: e2177001 ands r7, r7, #1 cdb8: 1a000053 bne cf0c ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; cdbc: e595201c ldr r2, [r5, #28] cdc0: e2822001 add r2, r2, #1 cdc4: e585201c str r2, [r5, #28] PIPE_UNLOCK(pipe); cdc8: e5950028 ldr r0, [r5, #40] ; 0x28 cdcc: e58d3000 str r3, [sp] cdd0: ebffec33 bl 7ea4 if (! PIPE_WRITEWAIT(pipe)) cdd4: e1a01007 mov r1, r7 cdd8: e5950030 ldr r0, [r5, #48] ; 0x30 cddc: eb0005c2 bl e4ec ret = -EINTR; if (! PIPE_LOCK(pipe)) { cde0: e1a01007 mov r1, r7 cde4: e1a02001 mov r2, r1 } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) cde8: e2507000 subs r7, r0, #0 ret = -EINTR; if (! PIPE_LOCK(pipe)) { cdec: e5950028 ldr r0, [r5, #40] ; 0x28 } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) cdf0: 13e07003 mvnne r7, #3 ret = -EINTR; if (! PIPE_LOCK(pipe)) { cdf4: ebffebe1 bl 7d80 cdf8: e3500000 cmp r0, #0 cdfc: e59d3000 ldr r3, [sp] ce00: 1a00003f bne cf04 /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; ce04: e595201c ldr r2, [r5, #28] if (ret != 0) ce08: e3570000 cmp r7, #0 if (! PIPE_LOCK(pipe)) { /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; ce0c: e2422001 sub r2, r2, #1 ce10: e585201c str r2, [r5, #28] if (ret != 0) ce14: 1a00002c bne cecc goto out_locked; if (pipe->Readers == 0) { ce18: e5952010 ldr r2, [r5, #16] ce1c: e3520000 cmp r2, #0 ce20: 0a000031 beq ceec ce24: e5957004 ldr r7, [r5, #4] /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { while (PIPE_SPACE(pipe) < chunk) { ce28: e595100c ldr r1, [r5, #12] ce2c: e0612007 rsb r2, r1, r7 ce30: e1520008 cmp r2, r8 ce34: 3affffdd bcc cdb0 goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); chunk1 = pipe->Size - PIPE_WSTART(pipe); ce38: e5950008 ldr r0, [r5, #8] ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); ce3c: e0698004 rsb r8, r9, r4 chunk1 = pipe->Size - PIPE_WSTART(pipe); ce40: e0810000 add r0, r1, r0 ce44: e1a01007 mov r1, r7 ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); ce48: e1520008 cmp r2, r8 ce4c: 31a08002 movcc r8, r2 chunk1 = pipe->Size - PIPE_WSTART(pipe); ce50: e58d3000 str r3, [sp] ce54: eb003dda bl 1c5c4 <__umodsi3> ce58: e0607007 rsb r7, r0, r7 if (chunk > chunk1) { ce5c: e1580007 cmp r8, r7 goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); chunk1 = pipe->Size - PIPE_WSTART(pipe); ce60: e1a0c000 mov ip, r0 if (chunk > chunk1) { ce64: e59d3000 ldr r3, [sp] ce68: da000029 ble cf14 memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); ce6c: e5950000 ldr r0, [r5] ce70: e0861009 add r1, r6, r9 ce74: e1a02007 mov r2, r7 ce78: e080000c add r0, r0, ip ce7c: eb0011dd bl 115f8 memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); ce80: e0871009 add r1, r7, r9 ce84: e5950000 ldr r0, [r5] ce88: e0861001 add r1, r6, r1 ce8c: e0672008 rsb r2, r7, r8 ce90: eb0011d8 bl 115f8 ce94: e59d3000 ldr r3, [sp] } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; ce98: e595200c ldr r2, [r5, #12] if (pipe->waitingReaders > 0) ce9c: e5951018 ldr r1, [r5, #24] memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; cea0: e0822008 add r2, r2, r8 if (pipe->waitingReaders > 0) cea4: e3510000 cmp r1, #0 memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; cea8: e585200c str r2, [r5, #12] if (pipe->waitingReaders > 0) ceac: 1a000020 bne cf34 PIPE_WAKEUPREADERS(pipe); written += chunk; ceb0: e08aa008 add sl, sl, r8 } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { ceb4: e154000a cmp r4, sl ceb8: e1a0900a mov r9, sl cebc: 85957004 ldrhi r7, [r5, #4] pipe->Length += chunk; if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); written += chunk; /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; cec0: 83a08001 movhi r8, #1 cec4: 8affffb5 bhi cda0 } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { cec8: e3a07000 mov r7, #0 /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); cecc: e5950028 ldr r0, [r5, #40] ; 0x28 ced0: ebffebf3 bl 7ea4 out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE) ced4: e3770020 cmn r7, #32 ced8: 0a000005 beq cef4 kill(getpid(), SIGPIPE); #endif if (written > 0) cedc: e35a0000 cmp sl, #0 cee0: c1a0000a movgt r0, sl cee4: d1a00007 movle r0, r7 cee8: eaffff98 b cd50 pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { ret = -EPIPE; ceec: e3e0701f mvn r7, #31 cef0: eafffff5 b cecc out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE) kill(getpid(), SIGPIPE); cef4: eb00022a bl d7a4 cef8: e3a0100d mov r1, #13 cefc: eb0002f6 bl dadc cf00: eafffff5 b cedc PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { /* WARN waitingWriters not restored! */ ret = -EINTR; cf04: e3e07003 mvn r7, #3 <== NOT EXECUTED cf08: eafffff3 b cedc <== NOT EXECUTED chunk = count <= pipe->Size ? count : 1; while (written < count) { while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) { ret = -EAGAIN; cf0c: e3e0700a mvn r7, #10 cf10: eaffffed b cecc if (chunk > chunk1) { memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); cf14: e5950000 ldr r0, [r5] cf18: e0861009 add r1, r6, r9 cf1c: e080000c add r0, r0, ip cf20: e1a02008 mov r2, r8 cf24: e58d3000 str r3, [sp] cf28: eb0011b2 bl 115f8 cf2c: e59d3000 ldr r3, [sp] cf30: eaffffd8 b ce98 pipe->Length += chunk; if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); cf34: e595002c ldr r0, [r5, #44] ; 0x2c cf38: e1a0100b mov r1, fp cf3c: e58d3000 str r3, [sp] cf40: eb000551 bl e48c cf44: e59d3000 ldr r3, [sp] cf48: eaffffd8 b ceb0 =============================================================================== 0000acc8 : int pthread_attr_setschedpolicy( pthread_attr_t *attr, int policy ) { if ( !attr || !attr->is_initialized ) acc8: e3500000 cmp r0, #0 accc: 0a00000e beq ad0c acd0: e5903000 ldr r3, [r0] acd4: e3530000 cmp r3, #0 acd8: 0a00000b beq ad0c return EINVAL; switch ( policy ) { acdc: e3510004 cmp r1, #4 ace0: 9a000001 bls acec case SCHED_SPORADIC: attr->schedpolicy = policy; return 0; default: return ENOTSUP; ace4: e3a00086 mov r0, #134 ; 0x86 } } ace8: e12fff1e bx lr ) { if ( !attr || !attr->is_initialized ) return EINVAL; switch ( policy ) { acec: e3a03001 mov r3, #1 acf0: e1a03113 lsl r3, r3, r1 acf4: e3130017 tst r3, #23 case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: case SCHED_SPORADIC: attr->schedpolicy = policy; acf8: 15801014 strne r1, [r0, #20] return 0; acfc: 13a00000 movne r0, #0 ) { if ( !attr || !attr->is_initialized ) return EINVAL; switch ( policy ) { ad00: 112fff1e bxne lr case SCHED_SPORADIC: attr->schedpolicy = policy; return 0; default: return ENOTSUP; ad04: e3a00086 mov r0, #134 ; 0x86 <== NOT EXECUTED } } ad08: e12fff1e bx lr <== NOT EXECUTED pthread_attr_t *attr, int policy ) { if ( !attr || !attr->is_initialized ) return EINVAL; ad0c: e3a00016 mov r0, #22 ad10: e12fff1e bx lr =============================================================================== 00007b7c : int pthread_mutexattr_setpshared( pthread_mutexattr_t *attr, int pshared ) { if ( !attr || !attr->is_initialized ) 7b7c: e3500000 cmp r0, #0 7b80: 0a000008 beq 7ba8 7b84: e5903000 ldr r3, [r0] 7b88: e3530000 cmp r3, #0 7b8c: 0a000005 beq 7ba8 return EINVAL; switch ( pshared ) { 7b90: e3510001 cmp r1, #1 case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 7b94: 95801004 strls r1, [r0, #4] return 0; 7b98: 93a00000 movls r0, #0 ) { if ( !attr || !attr->is_initialized ) return EINVAL; switch ( pshared ) { 7b9c: 912fff1e bxls lr case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; default: return EINVAL; 7ba0: e3a00016 mov r0, #22 } } 7ba4: e12fff1e bx lr <== NOT EXECUTED pthread_mutexattr_t *attr, int pshared ) { if ( !attr || !attr->is_initialized ) return EINVAL; 7ba8: e3a00016 mov r0, #22 7bac: e12fff1e bx lr =============================================================================== 00006fd4 : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 6fd4: e92d4030 push {r4, r5, lr} Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 6fd8: e2505000 subs r5, r0, #0 int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 6fdc: e24dd00c sub sp, sp, #12 Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 6fe0: 0a00001d beq 705c * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 6fe4: e1a00001 mov r0, r1 6fe8: e28d1004 add r1, sp, #4 6fec: eb001a00 bl d7f4 <_POSIX_Absolute_timeout_to_ticks> 6ff0: e5951000 ldr r1, [r5] 6ff4: e1a04000 mov r4, r0 6ff8: e28d2008 add r2, sp, #8 6ffc: e59f0098 ldr r0, [pc, #152] ; 709c 7000: eb000aae bl 9ac0 <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 7004: e59d3008 ldr r3, [sp, #8] 7008: e3530000 cmp r3, #0 700c: 1a000012 bne 705c case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 7010: e5951000 ldr r1, [r5] int _EXFUN(pthread_rwlock_init, (pthread_rwlock_t *__rwlock, _CONST pthread_rwlockattr_t *__attr)); int _EXFUN(pthread_rwlock_destroy, (pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_rdlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_tryrdlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_timedrdlock, 7014: e3540003 cmp r4, #3 7018: 13a05000 movne r5, #0 701c: 03a05001 moveq r5, #1 7020: e58d3000 str r3, [sp] 7024: e2800010 add r0, r0, #16 7028: e1a02005 mov r2, r5 702c: e59d3004 ldr r3, [sp, #4] 7030: eb00073d bl 8d2c <_CORE_RWLock_Obtain_for_reading> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 7034: eb000d80 bl a63c <_Thread_Enable_dispatch> if ( !do_wait ) { 7038: e3550000 cmp r5, #0 703c: 1a000011 bne 7088 if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { 7040: e59f3058 ldr r3, [pc, #88] ; 70a0 7044: e5933004 ldr r3, [r3, #4] 7048: e5930034 ldr r0, [r3, #52] ; 0x34 704c: e3500002 cmp r0, #2 7050: 0a000004 beq 7068 status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 7054: eb000046 bl 7174 <_POSIX_RWLock_Translate_core_RWLock_return_code> 7058: ea000000 b 7060 _Thread_Enable_dispatch(); if ( !do_wait ) { if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) return EINVAL; 705c: e3a00016 mov r0, #22 case OBJECTS_ERROR: break; } return EINVAL; } 7060: e28dd00c add sp, sp, #12 7064: e8bd8030 pop {r4, r5, pc} ); _Thread_Enable_dispatch(); if ( !do_wait ) { if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) 7068: e3540000 cmp r4, #0 706c: 0afffffa beq 705c return EINVAL; if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || 7070: e2444001 sub r4, r4, #1 7074: e3540001 cmp r4, #1 status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; 7078: 93a00074 movls r0, #116 ; 0x74 _Thread_Enable_dispatch(); if ( !do_wait ) { if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) return EINVAL; if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || 707c: 9afffff7 bls 7060 status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 7080: eb00003b bl 7174 <_POSIX_RWLock_Translate_core_RWLock_return_code><== NOT EXECUTED 7084: eafffff5 b 7060 <== NOT EXECUTED ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait ) { 7088: e59f3010 ldr r3, [pc, #16] ; 70a0 708c: e5933004 ldr r3, [r3, #4] 7090: e5930034 ldr r0, [r3, #52] ; 0x34 status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 7094: eb000036 bl 7174 <_POSIX_RWLock_Translate_core_RWLock_return_code> 7098: eafffff0 b 7060 =============================================================================== 000070a4 : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 70a4: e92d4030 push {r4, r5, lr} Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 70a8: e2505000 subs r5, r0, #0 int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 70ac: e24dd00c sub sp, sp, #12 Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 70b0: 0a00001d beq 712c * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 70b4: e1a00001 mov r0, r1 70b8: e28d1004 add r1, sp, #4 70bc: eb0019cc bl d7f4 <_POSIX_Absolute_timeout_to_ticks> 70c0: e5951000 ldr r1, [r5] 70c4: e1a04000 mov r4, r0 70c8: e28d2008 add r2, sp, #8 70cc: e59f0098 ldr r0, [pc, #152] ; 716c 70d0: eb000a7a bl 9ac0 <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 70d4: e59d3008 ldr r3, [sp, #8] 70d8: e3530000 cmp r3, #0 70dc: 1a000012 bne 712c case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 70e0: e5951000 ldr r1, [r5] (pthread_rwlock_t *__rwlock, _CONST struct timespec *__abstime)); int _EXFUN(pthread_rwlock_unlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_wrlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_trywrlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_timedwrlock, 70e4: e3540003 cmp r4, #3 70e8: 13a05000 movne r5, #0 70ec: 03a05001 moveq r5, #1 70f0: e58d3000 str r3, [sp] 70f4: e2800010 add r0, r0, #16 70f8: e1a02005 mov r2, r5 70fc: e59d3004 ldr r3, [sp, #4] 7100: eb000740 bl 8e08 <_CORE_RWLock_Obtain_for_writing> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 7104: eb000d4c bl a63c <_Thread_Enable_dispatch> if ( !do_wait && 7108: e3550000 cmp r5, #0 710c: 1a000011 bne 7158 (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { 7110: e59f3058 ldr r3, [pc, #88] ; 7170 7114: e5933004 ldr r3, [r3, #4] 7118: e5930034 ldr r0, [r3, #52] ; 0x34 ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait && 711c: e3500002 cmp r0, #2 7120: 0a000004 beq 7138 if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } return _POSIX_RWLock_Translate_core_RWLock_return_code( 7124: eb000012 bl 7174 <_POSIX_RWLock_Translate_core_RWLock_return_code> 7128: ea000000 b 7130 _Thread_Enable_dispatch(); if ( !do_wait && (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) return EINVAL; 712c: e3a00016 mov r0, #22 case OBJECTS_ERROR: break; } return EINVAL; } 7130: e28dd00c add sp, sp, #12 7134: e8bd8030 pop {r4, r5, pc} ); _Thread_Enable_dispatch(); if ( !do_wait && (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) 7138: e3540000 cmp r4, #0 713c: 0afffffa beq 712c return EINVAL; if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || 7140: e2444001 sub r4, r4, #1 7144: e3540001 cmp r4, #1 status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; 7148: 93a00074 movls r0, #116 ; 0x74 _Thread_Enable_dispatch(); if ( !do_wait && (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) return EINVAL; if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || 714c: 9afffff7 bls 7130 status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } return _POSIX_RWLock_Translate_core_RWLock_return_code( 7150: eb000007 bl 7174 <_POSIX_RWLock_Translate_core_RWLock_return_code><== NOT EXECUTED 7154: eafffff5 b 7130 <== NOT EXECUTED ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait && 7158: e59f3010 ldr r3, [pc, #16] ; 7170 715c: e5933004 ldr r3, [r3, #4] 7160: e5930034 ldr r0, [r3, #52] ; 0x34 if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } return _POSIX_RWLock_Translate_core_RWLock_return_code( 7164: eb000002 bl 7174 <_POSIX_RWLock_Translate_core_RWLock_return_code> 7168: eafffff0 b 7130 =============================================================================== 0000790c : int pthread_rwlockattr_setpshared( pthread_rwlockattr_t *attr, int pshared ) { if ( !attr ) 790c: e3500000 cmp r0, #0 7910: 0a000008 beq 7938 return EINVAL; if ( !attr->is_initialized ) 7914: e5903000 ldr r3, [r0] 7918: e3530000 cmp r3, #0 791c: 0a000005 beq 7938 return EINVAL; switch ( pshared ) { 7920: e3510001 cmp r1, #1 case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 7924: 95801004 strls r1, [r0, #4] return 0; 7928: 93a00000 movls r0, #0 return EINVAL; if ( !attr->is_initialized ) return EINVAL; switch ( pshared ) { 792c: 912fff1e bxls lr case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; default: return EINVAL; 7930: e3a00016 mov r0, #22 } } 7934: e12fff1e bx lr { if ( !attr ) return EINVAL; if ( !attr->is_initialized ) return EINVAL; 7938: e3a00016 mov r0, #22 793c: e12fff1e bx lr =============================================================================== 0000446c : int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 446c: e59f313c ldr r3, [pc, #316] ; 45b0 4470: e5933000 ldr r3, [r3] 4474: e1500003 cmp r0, r3 ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { 4478: e92d41f0 push {r4, r5, r6, r7, r8, lr} 447c: e1a04002 mov r4, r2 int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 4480: 2a000045 bcs 459c iop = rtems_libio_iop( fd ); 4484: e59f3128 ldr r3, [pc, #296] ; 45b4 4488: e5933000 ldr r3, [r3] 448c: e0600180 rsb r0, r0, r0, lsl #3 4490: e0836180 add r6, r3, r0, lsl #3 rtems_libio_check_is_open( iop ); 4494: e5963014 ldr r3, [r6, #20] 4498: e3130c01 tst r3, #256 ; 0x100 449c: 0a00003e beq 459c rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 44a0: e3130002 tst r3, #2 44a4: 0a000036 beq 4584 /* * Argument validation on IO vector */ if ( !iov ) 44a8: e3510000 cmp r1, #0 44ac: 0a000034 beq 4584 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 44b0: e3520000 cmp r2, #0 44b4: da000032 ble 4584 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 44b8: e3520b01 cmp r2, #1024 ; 0x400 44bc: ca000030 bgt 4584 44c0: e3a02000 mov r2, #0 rtems_set_errno_and_return_minus_one( EINVAL ); 44c4: e1a05001 mov r5, r1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 44c8: e1a03001 mov r3, r1 44cc: e3a07001 mov r7, #1 44d0: e1a01002 mov r1, r2 44d4: ea000000 b 44dc if ( iov[v].iov_base == 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; 44d8: e1a0100c mov r1, ip /* * iov[v].iov_len cannot be less than 0 because size_t is unsigned. * So we only check for zero. */ if ( iov[v].iov_base == 0 ) 44dc: e5930000 ldr r0, [r3] 44e0: e3500000 cmp r0, #0 * are obvious errors in the iovec. So this extra loop ensures * that we do not do anything if there is an argument error. */ all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { 44e4: e2822001 add r2, r2, #1 /* * iov[v].iov_len cannot be less than 0 because size_t is unsigned. * So we only check for zero. */ if ( iov[v].iov_base == 0 ) 44e8: 0a000025 beq 4584 rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; 44ec: e5930004 ldr r0, [r3, #4] 44f0: e081c000 add ip, r1, r0 if ( total < old ) 44f4: e151000c cmp r1, ip 44f8: ca000021 bgt 4584 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) all_zeros = false; 44fc: e3500000 cmp r0, #0 4500: 13a07000 movne r7, #0 * are obvious errors in the iovec. So this extra loop ensures * that we do not do anything if there is an argument error. */ all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { 4504: e1540002 cmp r4, r2 4508: e2833008 add r3, r3, #8 450c: cafffff1 bgt 44d8 /* * A readv with all zeros logically has no effect. Even though * OpenGroup didn't address this case as they did with writev(), * we will handle it the same way for symmetry. */ if ( all_zeros == true ) { 4510: e3570000 cmp r7, #0 return 0; 4514: 13a08000 movne r8, #0 /* * A readv with all zeros logically has no effect. Even though * OpenGroup didn't address this case as they did with writev(), * we will handle it the same way for symmetry. */ if ( all_zeros == true ) { 4518: 1a00001d bne 4594 451c: e1a08007 mov r8, r7 4520: ea00000d b 455c ); if ( bytes < 0 ) return -1; if ( bytes > 0 ) { 4524: 0a000006 beq 4544 iop->offset += bytes; 4528: e286300c add r3, r6, #12 452c: e893000c ldm r3, {r2, r3} 4530: e0922000 adds r2, r2, r0 4534: e0a33fc0 adc r3, r3, r0, asr #31 4538: e586200c str r2, [r6, #12] 453c: e5863010 str r3, [r6, #16] total += bytes; 4540: e0888000 add r8, r8, r0 } if (bytes != iov[ v ].iov_len) 4544: e5953004 ldr r3, [r5, #4] 4548: e1500003 cmp r0, r3 454c: 1a000010 bne 4594 } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 4550: e1540007 cmp r4, r7 4554: e2855008 add r5, r5, #8 4558: da00000d ble 4594 bytes = (*iop->pathinfo.handlers->read_h)( 455c: e8950006 ldm r5, {r1, r2} 4560: e5963020 ldr r3, [r6, #32] 4564: e1a00006 mov r0, r6 4568: e1a0e00f mov lr, pc 456c: e593f008 ldr pc, [r3, #8] iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) 4570: e3500000 cmp r0, #0 } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 4574: e2877001 add r7, r7, #1 iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) 4578: aaffffe9 bge 4524 return -1; 457c: e3e08000 mvn r8, #0 4580: ea000003 b 4594 <== NOT EXECUTED /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old ) rtems_set_errno_and_return_minus_one( EINVAL ); 4584: eb002abc bl f07c <__errno> 4588: e3a03016 mov r3, #22 458c: e5803000 str r3, [r0] 4590: e3e08000 mvn r8, #0 if (bytes != iov[ v ].iov_len) break; } return total; } 4594: e1a00008 mov r0, r8 4598: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 459c: eb002ab6 bl f07c <__errno> 45a0: e3a03009 mov r3, #9 45a4: e5803000 str r3, [r0] 45a8: e3e08000 mvn r8, #0 45ac: eafffff8 b 4594 =============================================================================== 000131d0 : void *realloc( void *ptr, size_t size ) { 131d0: e92d41f0 push {r4, r5, r6, r7, r8, lr} /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 131d4: e59f2118 ldr r2, [pc, #280] ; 132f4 ) { uintptr_t old_size; char *new_area; MSBUMP(realloc_calls, 1); 131d8: e59f5118 ldr r5, [pc, #280] ; 132f8 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 131dc: e5922000 ldr r2, [r2] ) { uintptr_t old_size; char *new_area; MSBUMP(realloc_calls, 1); 131e0: e5953010 ldr r3, [r5, #16] /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 131e4: e3520003 cmp r2, #3 ) { uintptr_t old_size; char *new_area; MSBUMP(realloc_calls, 1); 131e8: e2833001 add r3, r3, #1 void *realloc( void *ptr, size_t size ) { 131ec: e24dd004 sub sp, sp, #4 131f0: e1a04000 mov r4, r0 131f4: e1a06001 mov r6, r1 uintptr_t old_size; char *new_area; MSBUMP(realloc_calls, 1); 131f8: e5853010 str r3, [r5, #16] /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 131fc: 0a000020 beq 13284 } /* * Continue with realloc(). */ if ( !ptr ) 13200: e3540000 cmp r4, #0 13204: 0a00001a beq 13274 return malloc( size ); if ( !size ) { 13208: e3560000 cmp r6, #0 1320c: 0a00000f beq 13250 free( ptr ); return (void *) 0; } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 13210: e59f70e4 ldr r7, [pc, #228] ; 132fc 13214: e1a01004 mov r1, r4 13218: e5970000 ldr r0, [r7] 1321c: e1a0200d mov r2, sp 13220: eb000065 bl 133bc <_Protected_heap_Get_block_size> 13224: e2508000 subs r8, r0, #0 13228: 0a00000c beq 13260 } /* * Now resize it. */ if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, size ) ) { 1322c: e5970000 ldr r0, [r7] 13230: e1a01004 mov r1, r4 13234: e1a02006 mov r2, r6 13238: eb000070 bl 13400 <_Protected_heap_Resize_block> 1323c: e3500000 cmp r0, #0 13240: 0a00001a beq 132b0 memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 13244: e1a00004 mov r0, r4 13248: e28dd004 add sp, sp, #4 1324c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} */ if ( !ptr ) return malloc( size ); if ( !size ) { free( ptr ); 13250: e1a00004 mov r0, r4 <== NOT EXECUTED 13254: ebffbc44 bl 236c <== NOT EXECUTED return (void *) 0; 13258: e1a04006 mov r4, r6 <== NOT EXECUTED 1325c: eafffff8 b 13244 <== NOT EXECUTED } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { errno = EINVAL; 13260: ebffeb5a bl dfd0 <__errno> 13264: e3a03016 mov r3, #22 13268: e5803000 str r3, [r0] return (void *) 0; 1326c: e1a04008 mov r4, r8 13270: eafffff3 b 13244 /* * Continue with realloc(). */ if ( !ptr ) return malloc( size ); 13274: e1a00006 mov r0, r6 13278: ebffbd15 bl 26d4 1327c: e1a04000 mov r4, r0 13280: eaffffef b 13244 /* * 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) 13284: e59f3074 ldr r3, [pc, #116] ; 13300 13288: e5933000 ldr r3, [r3] 1328c: e3530000 cmp r3, #0 return (void *) 0; 13290: 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) 13294: 1affffea bne 13244 return (void *) 0; if (_ISR_Nest_level > 0) 13298: e59f2064 ldr r2, [pc, #100] ; 13304 1329c: e5922000 ldr r2, [r2] 132a0: e3520000 cmp r2, #0 return (void *) 0; 132a4: 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) 132a8: 0affffd4 beq 13200 132ac: eaffffe4 b 13244 <== NOT EXECUTED * There used to be a free on this error case but it is wrong to * free the memory per OpenGroup Single UNIX Specification V2 * and the C Standard. */ new_area = malloc( size ); 132b0: e1a00006 mov r0, r6 132b4: ebffbd06 bl 26d4 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 132b8: e5953004 ldr r3, [r5, #4] if ( !new_area ) { 132bc: e2507000 subs r7, r0, #0 * and the C Standard. */ new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 132c0: e2433001 sub r3, r3, #1 132c4: e5853004 str r3, [r5, #4] if ( !new_area ) { return (void *) 0; 132c8: 01a04007 moveq r4, r7 new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ if ( !new_area ) { 132cc: 0affffdc beq 13244 return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 132d0: e59d2000 ldr r2, [sp] 132d4: e1a01004 mov r1, r4 132d8: e1560002 cmp r6, r2 132dc: 31a02006 movcc r2, r6 132e0: ebffed68 bl e888 free( ptr ); 132e4: e1a00004 mov r0, r4 132e8: ebffbc1f bl 236c return new_area; 132ec: e1a04007 mov r4, r7 132f0: eaffffd3 b 13244 =============================================================================== 00006cb4 : * errno - otherwise */ int rtems_aio_enqueue (rtems_aio_request *req) { 6cb4: e92d41f0 push {r4, r5, r6, r7, r8, lr} struct sched_param param; /* The queue should be initialized */ AIO_assert (aio_request_queue.initialized == AIO_QUEUE_INITIALIZED); result = pthread_mutex_lock (&aio_request_queue.mutex); 6cb8: e59f41c4 ldr r4, [pc, #452] ; 6e84 * errno - otherwise */ int rtems_aio_enqueue (rtems_aio_request *req) { 6cbc: e24dd024 sub sp, sp, #36 ; 0x24 6cc0: 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); 6cc4: e1a00004 mov r0, r4 6cc8: eb000256 bl 7628 if (result != 0) { 6ccc: e2505000 subs r5, r0, #0 6cd0: 1a00002a bne 6d80 return result; } /* _POSIX_PRIORITIZED_IO and _POSIX_PRIORITY_SCHEDULING are defined, we can use aio_reqprio to lower the priority of the request */ pthread_getschedparam (pthread_self(), &policy, ¶m); 6cd4: eb000486 bl 7ef4 6cd8: e28d101c add r1, sp, #28 6cdc: e1a0200d mov r2, sp 6ce0: eb000380 bl 7ae8 req->caller_thread = pthread_self (); 6ce4: eb000482 bl 7ef4 req->priority = param.sched_priority - req->aiocbp->aio_reqprio; 6ce8: e5963014 ldr r3, [r6, #20] 6cec: e59dc000 ldr ip, [sp] 6cf0: e5932014 ldr r2, [r3, #20] 6cf4: e062200c rsb r2, r2, ip req->policy = policy; req->aiocbp->error_code = EINPROGRESS; req->aiocbp->return_value = 0; if ((aio_request_queue.idle_threads == 0) && 6cf8: e5941068 ldr r1, [r4, #104] ; 0x68 /* _POSIX_PRIORITIZED_IO and _POSIX_PRIORITY_SCHEDULING are defined, we can use aio_reqprio to lower the priority of the request */ pthread_getschedparam (pthread_self(), &policy, ¶m); req->caller_thread = pthread_self (); req->priority = param.sched_priority - req->aiocbp->aio_reqprio; 6cfc: e586200c str r2, [r6, #12] req->policy = policy; 6d00: e59d201c ldr r2, [sp, #28] req->aiocbp->error_code = EINPROGRESS; req->aiocbp->return_value = 0; if ((aio_request_queue.idle_threads == 0) && 6d04: e3510000 cmp r1, #0 we can use aio_reqprio to lower the priority of the request */ pthread_getschedparam (pthread_self(), &policy, ¶m); req->caller_thread = pthread_self (); req->priority = param.sched_priority - req->aiocbp->aio_reqprio; req->policy = policy; 6d08: e5862008 str r2, [r6, #8] req->aiocbp->error_code = EINPROGRESS; 6d0c: 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 (); 6d10: e5860010 str r0, [r6, #16] req->priority = param.sched_priority - req->aiocbp->aio_reqprio; req->policy = policy; req->aiocbp->error_code = EINPROGRESS; 6d14: e5832030 str r2, [r3, #48] ; 0x30 req->aiocbp->return_value = 0; 6d18: e5835034 str r5, [r3, #52] ; 0x34 if ((aio_request_queue.idle_threads == 0) && 6d1c: 1a000002 bne 6d2c 6d20: e5942064 ldr r2, [r4, #100] ; 0x64 6d24: e3520004 cmp r2, #4 6d28: da000017 ble 6d8c 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, 6d2c: e59f0154 ldr r0, [pc, #340] ; 6e88 6d30: e5931000 ldr r1, [r3] 6d34: e3a02000 mov r2, #0 6d38: ebfffec2 bl 6848 req->aiocbp->aio_fildes, 0); if (r_chain != NULL) 6d3c: e2507000 subs r7, r0, #0 6d40: 0a00002e beq 6e00 { pthread_mutex_lock (&r_chain->mutex); 6d44: e287401c add r4, r7, #28 6d48: e1a00004 mov r0, r4 6d4c: eb000235 bl 7628 rtems_aio_insert_prio (&r_chain->perfd, req); 6d50: e2870008 add r0, r7, #8 6d54: e1a01006 mov r1, r6 6d58: ebffff8f bl 6b9c pthread_cond_signal (&r_chain->cond); 6d5c: e2870020 add r0, r7, #32 6d60: eb00011a bl 71d0 pthread_mutex_unlock (&r_chain->mutex); 6d64: e1a00004 mov r0, r4 6d68: eb00024f bl 76ac /* just insert the request in the existing fd chain */ rtems_aio_insert_prio (&r_chain->perfd, req); } } pthread_mutex_unlock (&aio_request_queue.mutex); 6d6c: e59f0110 ldr r0, [pc, #272] ; 6e84 6d70: eb00024d bl 76ac return 0; } 6d74: e1a00005 mov r0, r5 6d78: e28dd024 add sp, sp, #36 ; 0x24 6d7c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} /* The queue should be initialized */ AIO_assert (aio_request_queue.initialized == AIO_QUEUE_INITIALIZED); result = pthread_mutex_lock (&aio_request_queue.mutex); if (result != 0) { free (req); 6d80: e1a00006 mov r0, r6 <== NOT EXECUTED 6d84: ebfff0c7 bl 30a8 <== NOT EXECUTED return result; 6d88: eafffff9 b 6d74 <== NOT EXECUTED if ((aio_request_queue.idle_threads == 0) && aio_request_queue.active_threads < AIO_MAX_THREADS) /* we still have empty places on the active_threads chain */ { chain = &aio_request_queue.work_req; r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1); 6d8c: e5931000 ldr r1, [r3] 6d90: e2840048 add r0, r4, #72 ; 0x48 6d94: e3a02001 mov r2, #1 6d98: ebfffeaa bl 6848 if (r_chain->new_fd == 1) { 6d9c: e5903018 ldr r3, [r0, #24] 6da0: 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); 6da4: e1a07000 mov r7, r0 if (r_chain->new_fd == 1) { 6da8: 1affffe5 bne 6d44 RTEMS_INLINE_ROUTINE void _Chain_Prepend( Chain_Control *the_chain, Chain_Node *the_node ) { _Chain_Insert(_Chain_Head(the_chain), the_node); 6dac: e1a01006 mov r1, r6 6db0: e2800008 add r0, r0, #8 6db4: eb0008a3 bl 9048 <_Chain_Insert> rtems_chain_prepend (&r_chain->perfd, &req->next_prio); r_chain->new_fd = 0; pthread_mutex_init (&r_chain->mutex, NULL); 6db8: 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; 6dbc: e5875018 str r5, [r7, #24] pthread_mutex_init (&r_chain->mutex, NULL); 6dc0: e287001c add r0, r7, #28 6dc4: eb0001c4 bl 74dc pthread_cond_init (&r_chain->cond, NULL); 6dc8: e1a01005 mov r1, r5 6dcc: e2870020 add r0, r7, #32 6dd0: eb0000cd bl 710c AIO_printf ("New thread \n"); result = pthread_create (&thid, &aio_request_queue.attr, 6dd4: e28d0020 add r0, sp, #32 6dd8: e2841008 add r1, r4, #8 6ddc: e59f20a8 ldr r2, [pc, #168] ; 6e8c 6de0: e1a03007 mov r3, r7 6de4: eb000296 bl 7844 rtems_aio_handle, (void *) r_chain); if (result != 0) { 6de8: e2506000 subs r6, r0, #0 6dec: 1a000020 bne 6e74 pthread_mutex_unlock (&aio_request_queue.mutex); return result; } ++aio_request_queue.active_threads; 6df0: e5943064 ldr r3, [r4, #100] ; 0x64 6df4: e2833001 add r3, r3, #1 6df8: e5843064 str r3, [r4, #100] ; 0x64 6dfc: eaffffda b 6d6c } else { /* or to the idle chain */ chain = &aio_request_queue.idle_req; r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1); 6e00: e5963014 ldr r3, [r6, #20] 6e04: e59f0084 ldr r0, [pc, #132] ; 6e90 6e08: e5931000 ldr r1, [r3] 6e0c: e3a02001 mov r2, #1 6e10: ebfffe8c bl 6848 if (r_chain->new_fd == 1) { 6e14: e5903018 ldr r3, [r0, #24] 6e18: 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); 6e1c: e1a08000 mov r8, r0 if (r_chain->new_fd == 1) { 6e20: 0a000003 beq 6e34 pthread_cond_init (&r_chain->cond, NULL); pthread_cond_signal (&aio_request_queue.new_req); ++aio_request_queue.idle_threads; } else /* just insert the request in the existing fd chain */ rtems_aio_insert_prio (&r_chain->perfd, req); 6e24: e2800008 add r0, r0, #8 6e28: e1a01006 mov r1, r6 6e2c: ebffff5a bl 6b9c 6e30: eaffffcd b 6d6c 6e34: e2800008 add r0, r0, #8 6e38: e1a01006 mov r1, r6 6e3c: eb000881 bl 9048 <_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); 6e40: e1a01007 mov r1, r7 if (r_chain->new_fd == 1) { /* If this is a new fd chain we signal the idle threads that might be waiting for requests */ AIO_printf (" New chain on waiting queue \n "); rtems_chain_prepend (&r_chain->perfd, &req->next_prio); r_chain->new_fd = 0; 6e44: e5887018 str r7, [r8, #24] pthread_mutex_init (&r_chain->mutex, NULL); 6e48: e288001c add r0, r8, #28 6e4c: eb0001a2 bl 74dc pthread_cond_init (&r_chain->cond, NULL); 6e50: e1a01007 mov r1, r7 6e54: e2880020 add r0, r8, #32 6e58: eb0000ab bl 710c pthread_cond_signal (&aio_request_queue.new_req); 6e5c: e59f0030 ldr r0, [pc, #48] ; 6e94 6e60: eb0000da bl 71d0 ++aio_request_queue.idle_threads; 6e64: e5943068 ldr r3, [r4, #104] ; 0x68 6e68: e2833001 add r3, r3, #1 6e6c: e5843068 str r3, [r4, #104] ; 0x68 6e70: eaffffbd b 6d6c AIO_printf ("New thread \n"); result = pthread_create (&thid, &aio_request_queue.attr, rtems_aio_handle, (void *) r_chain); if (result != 0) { pthread_mutex_unlock (&aio_request_queue.mutex); 6e74: e1a00004 mov r0, r4 <== NOT EXECUTED 6e78: eb00020b bl 76ac <== NOT EXECUTED return result; 6e7c: e1a05006 mov r5, r6 <== NOT EXECUTED 6e80: eaffffbb b 6d74 <== NOT EXECUTED =============================================================================== 00006914 : * NULL - if error */ static void * rtems_aio_handle (void *arg) { 6914: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED 6918: e24dd02c sub sp, sp, #44 ; 0x2c <== NOT EXECUTED 691c: e1a05000 mov r5, r0 <== NOT EXECUTED 6920: e280601c add r6, r0, #28 <== NOT EXECUTED node = rtems_chain_first (chain); req = (rtems_aio_request *) node; /* See _POSIX_PRIORITIZE_IO and _POSIX_PRIORITY_SCHEDULING discussion in rtems_aio_enqueue () */ pthread_getschedparam (pthread_self(), &policy, ¶m); 6924: e28d8028 add r8, sp, #40 ; 0x28 <== NOT EXECUTED 6928: e28d7004 add r7, sp, #4 <== NOT EXECUTED default: result = -1; } if (result == -1) { req->aiocbp->return_value = -1; 692c: e3e0b000 mvn fp, #0 <== NOT EXECUTED req->aiocbp->error_code = errno; } else { req->aiocbp->return_value = result; req->aiocbp->error_code = 0; 6930: e3a09000 mov r9, #0 <== NOT EXECUTED /* acquire the mutex of the current fd chain. we don't need to lock the queue mutex since we can add requests to idle fd chains or even active ones if the working request has been extracted from the chain */ result = pthread_mutex_lock (&r_chain->mutex); 6934: e1a00006 mov r0, r6 <== NOT EXECUTED 6938: eb00033a bl 7628 <== NOT EXECUTED if (result != 0) 693c: e250a000 subs sl, r0, #0 <== NOT EXECUTED 6940: 1a000021 bne 69cc <== NOT EXECUTED } AIO_printf ("Thread finished\n"); return NULL; } 6944: e5954008 ldr r4, [r5, #8] <== NOT EXECUTED RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 6948: e285300c add r3, r5, #12 <== NOT EXECUTED /* If the locked chain is not empty, take the first request extract it, unlock the chain and process the request, in this way the user can supply more requests to this fd chain */ if (!rtems_chain_is_empty (chain)) { 694c: e1540003 cmp r4, r3 <== NOT EXECUTED 6950: 0a000038 beq 6a38 <== 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); 6954: eb000566 bl 7ef4 <== NOT EXECUTED 6958: e1a01008 mov r1, r8 <== NOT EXECUTED 695c: e1a02007 mov r2, r7 <== NOT EXECUTED 6960: eb000460 bl 7ae8 <== NOT EXECUTED param.sched_priority = req->priority; 6964: e594300c ldr r3, [r4, #12] <== NOT EXECUTED 6968: e58d3004 str r3, [sp, #4] <== NOT EXECUTED pthread_setschedparam (pthread_self(), req->policy, ¶m); 696c: eb000560 bl 7ef4 <== NOT EXECUTED 6970: e5941008 ldr r1, [r4, #8] <== NOT EXECUTED 6974: e1a02007 mov r2, r7 <== NOT EXECUTED 6978: eb000562 bl 7f08 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 697c: e1a00004 mov r0, r4 <== NOT EXECUTED 6980: eb00099b bl 8ff4 <_Chain_Extract> <== NOT EXECUTED rtems_chain_extract (node); pthread_mutex_unlock (&r_chain->mutex); 6984: e1a00006 mov r0, r6 <== NOT EXECUTED 6988: eb000347 bl 76ac <== NOT EXECUTED switch (req->aiocbp->aio_lio_opcode) { 698c: e594a014 ldr sl, [r4, #20] <== NOT EXECUTED 6990: e59a302c ldr r3, [sl, #44] ; 0x2c <== NOT EXECUTED 6994: e3530002 cmp r3, #2 <== NOT EXECUTED 6998: 0a00001e beq 6a18 <== NOT EXECUTED 699c: e3530003 cmp r3, #3 <== NOT EXECUTED 69a0: 0a000019 beq 6a0c <== NOT EXECUTED 69a4: e3530001 cmp r3, #1 <== NOT EXECUTED 69a8: 0a00000a beq 69d8 <== NOT EXECUTED default: result = -1; } if (result == -1) { req->aiocbp->return_value = -1; 69ac: e58ab034 str fp, [sl, #52] ; 0x34 <== NOT EXECUTED req->aiocbp->error_code = errno; 69b0: eb002892 bl 10c00 <__errno> <== NOT EXECUTED 69b4: e5903000 ldr r3, [r0] <== NOT EXECUTED /* acquire the mutex of the current fd chain. we don't need to lock the queue mutex since we can add requests to idle fd chains or even active ones if the working request has been extracted from the chain */ result = pthread_mutex_lock (&r_chain->mutex); 69b8: e1a00006 mov r0, r6 <== NOT EXECUTED default: result = -1; } if (result == -1) { req->aiocbp->return_value = -1; req->aiocbp->error_code = errno; 69bc: e58a3030 str r3, [sl, #48] ; 0x30 <== NOT EXECUTED /* acquire the mutex of the current fd chain. we don't need to lock the queue mutex since we can add requests to idle fd chains or even active ones if the working request has been extracted from the chain */ result = pthread_mutex_lock (&r_chain->mutex); 69c0: eb000318 bl 7628 <== NOT EXECUTED if (result != 0) 69c4: e250a000 subs sl, r0, #0 <== NOT EXECUTED 69c8: 0affffdd beq 6944 <== NOT EXECUTED } AIO_printf ("Thread finished\n"); return NULL; } 69cc: e3a00000 mov r0, #0 <== NOT EXECUTED 69d0: e28dd02c add sp, sp, #44 ; 0x2c <== NOT EXECUTED 69d4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED pthread_mutex_unlock (&r_chain->mutex); switch (req->aiocbp->aio_lio_opcode) { case LIO_READ: result = pread (req->aiocbp->aio_fildes, 69d8: e59ac008 ldr ip, [sl, #8] <== NOT EXECUTED 69dc: e59a0000 ldr r0, [sl] <== NOT EXECUTED 69e0: e28a100c add r1, sl, #12 <== NOT EXECUTED 69e4: e8910006 ldm r1, {r1, r2} <== NOT EXECUTED 69e8: e59a3004 ldr r3, [sl, #4] <== NOT EXECUTED 69ec: e58dc000 str ip, [sp] <== NOT EXECUTED 69f0: eb002b86 bl 11810 <== NOT EXECUTED break; default: result = -1; } if (result == -1) { 69f4: e3700001 cmn r0, #1 <== NOT EXECUTED 69f8: 0a00005e beq 6b78 <== NOT EXECUTED req->aiocbp->return_value = -1; req->aiocbp->error_code = errno; } else { req->aiocbp->return_value = result; 69fc: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED 6a00: e5830034 str r0, [r3, #52] ; 0x34 <== NOT EXECUTED req->aiocbp->error_code = 0; 6a04: e5839030 str r9, [r3, #48] ; 0x30 <== NOT EXECUTED 6a08: eaffffc9 b 6934 <== NOT EXECUTED (void *) req->aiocbp->aio_buf, req->aiocbp->aio_nbytes, req->aiocbp->aio_offset); break; case LIO_SYNC: result = fsync (req->aiocbp->aio_fildes); 6a0c: e59a0000 ldr r0, [sl] <== NOT EXECUTED 6a10: eb001ada bl d580 <== NOT EXECUTED break; 6a14: eafffff6 b 69f4 <== NOT EXECUTED (void *) req->aiocbp->aio_buf, req->aiocbp->aio_nbytes, req->aiocbp->aio_offset); break; case LIO_WRITE: result = pwrite (req->aiocbp->aio_fildes, 6a18: e59ac008 ldr ip, [sl, #8] <== NOT EXECUTED 6a1c: e59a0000 ldr r0, [sl] <== NOT EXECUTED 6a20: e28a100c add r1, sl, #12 <== NOT EXECUTED 6a24: e8910006 ldm r1, {r1, r2} <== NOT EXECUTED 6a28: e59a3004 ldr r3, [sl, #4] <== NOT EXECUTED 6a2c: e58dc000 str ip, [sp] <== NOT EXECUTED 6a30: eb002bc0 bl 11938 <== NOT EXECUTED (void *) req->aiocbp->aio_buf, req->aiocbp->aio_nbytes, req->aiocbp->aio_offset); break; 6a34: eaffffee b 69f4 <== 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); 6a38: e1a00006 mov r0, r6 <== NOT EXECUTED 6a3c: eb00031a bl 76ac <== NOT EXECUTED pthread_mutex_lock (&aio_request_queue.mutex); 6a40: e59f0144 ldr r0, [pc, #324] ; 6b8c <== NOT EXECUTED 6a44: eb0002f7 bl 7628 <== NOT EXECUTED if (rtems_chain_is_empty (chain)) 6a48: e5953008 ldr r3, [r5, #8] <== NOT EXECUTED 6a4c: e1540003 cmp r4, r3 <== NOT EXECUTED 6a50: 1affffb7 bne 6934 <== NOT EXECUTED { clock_gettime (CLOCK_REALTIME, &timeout); 6a54: e28d1020 add r1, sp, #32 <== NOT EXECUTED 6a58: e3a00001 mov r0, #1 <== NOT EXECUTED 6a5c: eb000155 bl 6fb8 <== NOT EXECUTED timeout.tv_sec += 3; 6a60: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED timeout.tv_nsec = 0; result = pthread_cond_timedwait (&r_chain->cond, 6a64: e2854020 add r4, r5, #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; 6a68: e2833003 add r3, r3, #3 <== NOT EXECUTED timeout.tv_nsec = 0; result = pthread_cond_timedwait (&r_chain->cond, 6a6c: e1a00004 mov r0, r4 <== NOT EXECUTED 6a70: e59f1114 ldr r1, [pc, #276] ; 6b8c <== NOT EXECUTED 6a74: e28d2020 add r2, sp, #32 <== NOT EXECUTED pthread_mutex_unlock (&r_chain->mutex); pthread_mutex_lock (&aio_request_queue.mutex); if (rtems_chain_is_empty (chain)) { clock_gettime (CLOCK_REALTIME, &timeout); timeout.tv_sec += 3; 6a78: e58d3020 str r3, [sp, #32] <== NOT EXECUTED timeout.tv_nsec = 0; 6a7c: e58da024 str sl, [sp, #36] ; 0x24 <== NOT EXECUTED result = pthread_cond_timedwait (&r_chain->cond, 6a80: eb0001ec bl 7238 <== 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) { 6a84: e3500074 cmp r0, #116 ; 0x74 <== NOT EXECUTED 6a88: 1affffa9 bne 6934 <== NOT EXECUTED 6a8c: e1a00005 mov r0, r5 <== NOT EXECUTED 6a90: eb000957 bl 8ff4 <_Chain_Extract> <== NOT EXECUTED rtems_chain_extract (&r_chain->next_fd); pthread_mutex_destroy (&r_chain->mutex); 6a94: e1a00006 mov r0, r6 <== NOT EXECUTED 6a98: eb00023f bl 739c <== NOT EXECUTED pthread_cond_destroy (&r_chain->cond); 6a9c: e1a00004 mov r0, r4 <== NOT EXECUTED 6aa0: eb000166 bl 7040 <== NOT EXECUTED free (r_chain); 6aa4: e1a00005 mov r0, r5 <== NOT EXECUTED 6aa8: ebfff17e bl 30a8 <== 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)) { 6aac: e59f20d8 ldr r2, [pc, #216] ; 6b8c <== NOT EXECUTED 6ab0: e5923054 ldr r3, [r2, #84] ; 0x54 <== NOT EXECUTED 6ab4: e59f20d4 ldr r2, [pc, #212] ; 6b90 <== NOT EXECUTED 6ab8: e1530002 cmp r3, r2 <== NOT EXECUTED 6abc: 0a000002 beq 6acc <== NOT EXECUTED r_chain->perfd = ((rtems_aio_request_chain *)node)->perfd; } else /* If there was a request added in the initial fd chain then release the mutex and process it */ pthread_mutex_unlock (&aio_request_queue.mutex); 6ac0: e59f00c4 ldr r0, [pc, #196] ; 6b8c <== NOT EXECUTED 6ac4: eb0002f8 bl 76ac <== NOT EXECUTED 6ac8: eaffff99 b 6934 <== 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; 6acc: e59f20b8 ldr r2, [pc, #184] ; 6b8c <== NOT EXECUTED 6ad0: e5923068 ldr r3, [r2, #104] ; 0x68 <== NOT EXECUTED 6ad4: e2833001 add r3, r3, #1 <== NOT EXECUTED 6ad8: e5823068 str r3, [r2, #104] ; 0x68 <== NOT EXECUTED clock_gettime (CLOCK_REALTIME, &timeout); 6adc: e28d1020 add r1, sp, #32 <== NOT EXECUTED 6ae0: e3a00001 mov r0, #1 <== NOT EXECUTED 6ae4: eb000133 bl 6fb8 <== NOT EXECUTED timeout.tv_sec += 3; 6ae8: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED timeout.tv_nsec = 0; result = pthread_cond_timedwait (&aio_request_queue.new_req, 6aec: e59f00a0 ldr r0, [pc, #160] ; 6b94 <== 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; 6af0: e2833003 add r3, r3, #3 <== NOT EXECUTED timeout.tv_nsec = 0; result = pthread_cond_timedwait (&aio_request_queue.new_req, 6af4: e59f1090 ldr r1, [pc, #144] ; 6b8c <== NOT EXECUTED 6af8: e28d2020 add r2, sp, #32 <== NOT EXECUTED /* If the idle chain is empty sleep for 3 seconds and wait for a signal. The thread now becomes idle. */ if (rtems_chain_is_empty (&aio_request_queue.idle_req)) { ++aio_request_queue.idle_threads; clock_gettime (CLOCK_REALTIME, &timeout); timeout.tv_sec += 3; 6afc: e58d3020 str r3, [sp, #32] <== NOT EXECUTED timeout.tv_nsec = 0; 6b00: e58da024 str sl, [sp, #36] ; 0x24 <== NOT EXECUTED result = pthread_cond_timedwait (&aio_request_queue.new_req, 6b04: eb0001cb bl 7238 <== 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) { 6b08: e3500074 cmp r0, #116 ; 0x74 <== NOT EXECUTED 6b0c: 0a00001b beq 6b80 <== NOT EXECUTED } AIO_printf ("Thread finished\n"); return NULL; } 6b10: e59f3074 ldr r3, [pc, #116] ; 6b8c <== NOT EXECUTED 6b14: e5934054 ldr r4, [r3, #84] ; 0x54 <== NOT EXECUTED return NULL; } /* Otherwise move this chain to the working chain and start the loop all over again */ --aio_request_queue.idle_threads; 6b18: e5933068 ldr r3, [r3, #104] ; 0x68 <== NOT EXECUTED 6b1c: e59f2068 ldr r2, [pc, #104] ; 6b8c <== NOT EXECUTED 6b20: e2433001 sub r3, r3, #1 <== NOT EXECUTED 6b24: e5823068 str r3, [r2, #104] ; 0x68 <== NOT EXECUTED 6b28: e1a00004 mov r0, r4 <== NOT EXECUTED 6b2c: eb000930 bl 8ff4 <_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, 6b30: e3a02001 mov r2, #1 <== NOT EXECUTED 6b34: e5941014 ldr r1, [r4, #20] <== NOT EXECUTED 6b38: e59f0058 ldr r0, [pc, #88] ; 6b98 <== NOT EXECUTED 6b3c: ebffff41 bl 6848 <== NOT EXECUTED ((rtems_aio_request_chain *)node)->fildes, 1); r_chain->new_fd = 0; pthread_mutex_init (&r_chain->mutex, NULL); 6b40: e280601c add r6, r0, #28 <== NOT EXECUTED /* Otherwise move this chain to the working chain and start the loop all over again */ --aio_request_queue.idle_threads; node = rtems_chain_first (&aio_request_queue.idle_req); rtems_chain_extract (node); r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, 6b44: e1a05000 mov r5, r0 <== NOT EXECUTED ((rtems_aio_request_chain *)node)->fildes, 1); r_chain->new_fd = 0; pthread_mutex_init (&r_chain->mutex, NULL); 6b48: e1a0100a mov r1, sl <== NOT EXECUTED node = rtems_chain_first (&aio_request_queue.idle_req); rtems_chain_extract (node); r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, ((rtems_aio_request_chain *)node)->fildes, 1); r_chain->new_fd = 0; 6b4c: e580a018 str sl, [r0, #24] <== NOT EXECUTED pthread_mutex_init (&r_chain->mutex, NULL); 6b50: e1a00006 mov r0, r6 <== NOT EXECUTED 6b54: eb000260 bl 74dc <== NOT EXECUTED pthread_cond_init (&r_chain->cond, NULL); r_chain->perfd = ((rtems_aio_request_chain *)node)->perfd; 6b58: e2844008 add r4, r4, #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); 6b5c: e1a0100a mov r1, sl <== NOT EXECUTED 6b60: e2850020 add r0, r5, #32 <== NOT EXECUTED 6b64: eb000168 bl 710c <== NOT EXECUTED r_chain->perfd = ((rtems_aio_request_chain *)node)->perfd; 6b68: e8940007 ldm r4, {r0, r1, r2} <== NOT EXECUTED 6b6c: e2853008 add r3, r5, #8 <== NOT EXECUTED 6b70: e8830007 stm r3, {r0, r1, r2} <== NOT EXECUTED 6b74: eaffff6e b 6934 <== NOT EXECUTED break; default: result = -1; } if (result == -1) { 6b78: e594a014 ldr sl, [r4, #20] <== NOT EXECUTED 6b7c: eaffff8a b 69ac <== NOT EXECUTED &timeout); /* If no new fd chain was added in the idle requests then this thread is finished */ if (result == ETIMEDOUT) { pthread_mutex_unlock (&aio_request_queue.mutex); 6b80: e59f0004 ldr r0, [pc, #4] ; 6b8c <== NOT EXECUTED 6b84: eb0002c8 bl 76ac <== NOT EXECUTED return NULL; 6b88: eaffff8f b 69cc <== NOT EXECUTED =============================================================================== 00006744 : * 0 - if initialization succeeded */ int rtems_aio_init (void) { 6744: e92d4070 push {r4, r5, r6, lr} int result = 0; result = pthread_attr_init (&aio_request_queue.attr); 6748: e59f00e8 ldr r0, [pc, #232] ; 6838 674c: eb00041c bl 77c4 if (result != 0) 6750: e2505000 subs r5, r0, #0 6754: 0a000001 beq 6760 aio_request_queue.active_threads = 0; aio_request_queue.idle_threads = 0; aio_request_queue.initialized = AIO_QUEUE_INITIALIZED; return result; } 6758: e1a00005 mov r0, r5 675c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED result = pthread_attr_init (&aio_request_queue.attr); if (result != 0) return result; result = 6760: e59f00d0 ldr r0, [pc, #208] ; 6838 6764: e1a01005 mov r1, r5 6768: eb000428 bl 7810 pthread_attr_setdetachstate (&aio_request_queue.attr, PTHREAD_CREATE_DETACHED); if (result != 0) 676c: e3500000 cmp r0, #0 6770: 1a00001c bne 67e8 pthread_attr_destroy (&aio_request_queue.attr); result = pthread_mutex_init (&aio_request_queue.mutex, NULL); 6774: e59f40c0 ldr r4, [pc, #192] ; 683c 6778: e3a01000 mov r1, #0 677c: e1a00004 mov r0, r4 6780: eb000355 bl 74dc if (result != 0) 6784: e3500000 cmp r0, #0 6788: 1a00001e bne 6808 pthread_attr_destroy (&aio_request_queue.attr); result = pthread_cond_init (&aio_request_queue.new_req, NULL); 678c: e59f00ac ldr r0, [pc, #172] ; 6840 6790: e3a01000 mov r1, #0 6794: eb00025c bl 710c if (result != 0) { 6798: e2505000 subs r5, r0, #0 679c: 1a000020 bne 6824 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 67a0: e59f209c ldr r2, [pc, #156] ; 6844 rtems_chain_initialize_empty (&aio_request_queue.work_req); rtems_chain_initialize_empty (&aio_request_queue.idle_req); aio_request_queue.active_threads = 0; aio_request_queue.idle_threads = 0; aio_request_queue.initialized = AIO_QUEUE_INITIALIZED; 67a4: e3a01a0b mov r1, #45056 ; 0xb000 head->previous = NULL; 67a8: e3a03000 mov r3, #0 tail->previous = head; 67ac: e2820008 add r0, r2, #8 67b0: e2426004 sub r6, r2, #4 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 67b4: e282c00c add ip, r2, #12 67b8: e281100b add r1, r1, #11 head->previous = NULL; tail->previous = head; 67bc: e584005c str r0, [r4, #92] ; 0x5c ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 67c0: e5842048 str r2, [r4, #72] ; 0x48 head->previous = NULL; 67c4: e584304c str r3, [r4, #76] ; 0x4c tail->previous = head; 67c8: e5846050 str r6, [r4, #80] ; 0x50 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 67cc: e584c054 str ip, [r4, #84] ; 0x54 head->previous = NULL; 67d0: e5843058 str r3, [r4, #88] ; 0x58 } rtems_chain_initialize_empty (&aio_request_queue.work_req); rtems_chain_initialize_empty (&aio_request_queue.idle_req); aio_request_queue.active_threads = 0; 67d4: e5843064 str r3, [r4, #100] ; 0x64 aio_request_queue.idle_threads = 0; 67d8: e5843068 str r3, [r4, #104] ; 0x68 aio_request_queue.initialized = AIO_QUEUE_INITIALIZED; 67dc: e5841060 str r1, [r4, #96] ; 0x60 return result; } 67e0: e1a00005 mov r0, r5 67e4: e8bd8070 pop {r4, r5, r6, pc} PTHREAD_CREATE_DETACHED); if (result != 0) pthread_attr_destroy (&aio_request_queue.attr); result = pthread_mutex_init (&aio_request_queue.mutex, NULL); 67e8: e59f404c ldr r4, [pc, #76] ; 683c result = pthread_attr_setdetachstate (&aio_request_queue.attr, PTHREAD_CREATE_DETACHED); if (result != 0) pthread_attr_destroy (&aio_request_queue.attr); 67ec: e59f0044 ldr r0, [pc, #68] ; 6838 67f0: eb0003ea bl 77a0 <== NOT EXECUTED result = pthread_mutex_init (&aio_request_queue.mutex, NULL); 67f4: e3a01000 mov r1, #0 <== NOT EXECUTED 67f8: e1a00004 mov r0, r4 <== NOT EXECUTED 67fc: eb000336 bl 74dc <== NOT EXECUTED if (result != 0) 6800: e3500000 cmp r0, #0 <== NOT EXECUTED 6804: 0affffe0 beq 678c <== NOT EXECUTED pthread_attr_destroy (&aio_request_queue.attr); 6808: e2840008 add r0, r4, #8 <== NOT EXECUTED 680c: eb0003e3 bl 77a0 <== NOT EXECUTED result = pthread_cond_init (&aio_request_queue.new_req, NULL); 6810: e59f0028 ldr r0, [pc, #40] ; 6840 <== NOT EXECUTED 6814: e3a01000 mov r1, #0 <== NOT EXECUTED 6818: eb00023b bl 710c <== NOT EXECUTED if (result != 0) { 681c: e2505000 subs r5, r0, #0 <== NOT EXECUTED 6820: 0affffde beq 67a0 <== NOT EXECUTED pthread_mutex_destroy (&aio_request_queue.mutex); 6824: e59f0010 ldr r0, [pc, #16] ; 683c <== NOT EXECUTED 6828: eb0002db bl 739c <== NOT EXECUTED pthread_attr_destroy (&aio_request_queue.attr); 682c: e59f0004 ldr r0, [pc, #4] ; 6838 <== NOT EXECUTED 6830: eb0003da bl 77a0 <== NOT EXECUTED 6834: eaffffd9 b 67a0 <== NOT EXECUTED =============================================================================== 00006b9c : } AIO_printf ("Thread finished\n"); return NULL; } 6b9c: e1a03000 mov r3, r0 6ba0: e4932004 ldr r2, [r3], #4 rtems_chain_node *node; AIO_printf ("FD exists \n"); node = rtems_chain_first (chain); if (rtems_chain_is_empty (chain)) { 6ba4: e1520003 cmp r2, r3 * NONE */ void rtems_aio_insert_prio (rtems_chain_control *chain, rtems_aio_request *req) { 6ba8: e1a0c001 mov ip, r1 rtems_chain_node *node; AIO_printf ("FD exists \n"); node = rtems_chain_first (chain); if (rtems_chain_is_empty (chain)) { 6bac: 0a00000f beq 6bf0 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 && 6bb0: e5910014 ldr r0, [r1, #20] if (rtems_chain_is_empty (chain)) { AIO_printf ("First in chain \n"); rtems_chain_prepend (chain, &req->next_prio); } else { AIO_printf ("Add by priority \n"); int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio; 6bb4: e5921014 ldr r1, [r2, #20] while (req->aiocbp->aio_reqprio > prio && 6bb8: e5900014 ldr r0, [r0, #20] 6bbc: e5911014 ldr r1, [r1, #20] 6bc0: e1510000 cmp r1, r0 6bc4: ba000002 blt 6bd4 6bc8: ea000006 b 6be8 6bcc: e1520003 cmp r2, r3 <== NOT EXECUTED 6bd0: 0a000007 beq 6bf4 <== NOT EXECUTED } AIO_printf ("Thread finished\n"); return NULL; } 6bd4: e5922000 ldr r2, [r2] <== 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; 6bd8: e5921014 ldr r1, [r2, #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 && 6bdc: e5911014 ldr r1, [r1, #20] <== NOT EXECUTED 6be0: e1510000 cmp r1, r0 <== NOT EXECUTED 6be4: bafffff8 blt 6bcc <== 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 ); 6be8: e5920004 ldr r0, [r2, #4] 6bec: e1a0100c mov r1, ip 6bf0: ea000914 b 9048 <_Chain_Insert> } AIO_printf ("Thread finished\n"); return NULL; } 6bf4: e1a02003 mov r2, r3 <== NOT EXECUTED 6bf8: eafffffa b 6be8 <== NOT EXECUTED =============================================================================== 00006bfc : * Output parameters: * NONE */ void rtems_aio_remove_fd (rtems_aio_request_chain *r_chain) { 6bfc: e92d41f0 push {r4, r5, r6, r7, r8, lr} } AIO_printf ("Thread finished\n"); return NULL; } 6c00: e5904008 ldr r4, [r0, #8] RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Tail(the_chain)); 6c04: e280600c add r6, r0, #12 rtems_chain_control *chain; rtems_chain_node *node; chain = &r_chain->perfd; node = rtems_chain_first (chain); while (!rtems_chain_is_tail (chain, node)) 6c08: e1540006 cmp r4, r6 { rtems_chain_extract (node); rtems_aio_request *req = (rtems_aio_request *) node; node = rtems_chain_next (node); req->aiocbp->error_code = ECANCELED; 6c0c: 13a0808c movne r8, #140 ; 0x8c req->aiocbp->return_value = -1; 6c10: 13e07000 mvnne r7, #0 rtems_chain_control *chain; rtems_chain_node *node; chain = &r_chain->perfd; node = rtems_chain_first (chain); while (!rtems_chain_is_tail (chain, node)) 6c14: 1a000001 bne 6c20 6c18: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED { rtems_chain_extract (node); rtems_aio_request *req = (rtems_aio_request *) node; node = rtems_chain_next (node); 6c1c: e1a04005 mov r4, r5 */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 6c20: e1a00004 mov r0, r4 6c24: eb0008f2 bl 8ff4 <_Chain_Extract> req->aiocbp->error_code = ECANCELED; 6c28: e5943014 ldr r3, [r4, #20] } AIO_printf ("Thread finished\n"); return NULL; } 6c2c: e5945000 ldr r5, [r4] rtems_chain_extract (node); rtems_aio_request *req = (rtems_aio_request *) node; node = rtems_chain_next (node); req->aiocbp->error_code = ECANCELED; req->aiocbp->return_value = -1; free (req); 6c30: e1a00004 mov r0, r4 while (!rtems_chain_is_tail (chain, node)) { rtems_chain_extract (node); rtems_aio_request *req = (rtems_aio_request *) node; node = rtems_chain_next (node); req->aiocbp->error_code = ECANCELED; 6c34: e5838030 str r8, [r3, #48] ; 0x30 req->aiocbp->return_value = -1; 6c38: e5837034 str r7, [r3, #52] ; 0x34 free (req); 6c3c: ebfff119 bl 30a8 rtems_chain_control *chain; rtems_chain_node *node; chain = &r_chain->perfd; node = rtems_chain_first (chain); while (!rtems_chain_is_tail (chain, node)) 6c40: e1550006 cmp r5, r6 6c44: 1afffff4 bne 6c1c 6c48: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} =============================================================================== 00006c4c : * 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) { 6c4c: e92d4010 push {r4, lr} } AIO_printf ("Thread finished\n"); return NULL; } 6c50: e4903004 ldr r3, [r0], #4 * AIO_CANCELED - if request was canceled */ int rtems_aio_remove_req (rtems_chain_control *chain, struct aiocb *aiocbp) { if (rtems_chain_is_empty (chain)) 6c54: e1530000 cmp r3, r0 return AIO_ALLDONE; 6c58: 03a00002 moveq r0, #2 * AIO_CANCELED - if request was canceled */ int rtems_aio_remove_req (rtems_chain_control *chain, struct aiocb *aiocbp) { if (rtems_chain_is_empty (chain)) 6c5c: 1a000003 bne 6c70 6c60: e8bd8010 pop {r4, pc} <== NOT EXECUTED } AIO_printf ("Thread finished\n"); return NULL; } 6c64: e5933000 ldr r3, [r3] <== 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) { 6c68: e1530000 cmp r3, r0 <== NOT EXECUTED 6c6c: 0a00000e beq 6cac <== NOT EXECUTED 6c70: e5932014 ldr r2, [r3, #20] 6c74: e1520001 cmp r2, r1 return AIO_ALLDONE; rtems_chain_node *node = rtems_chain_first (chain); rtems_aio_request *current; current = (rtems_aio_request *) node; 6c78: e1a04003 mov r4, r3 while (!rtems_chain_is_tail (chain, node) && current->aiocbp != aiocbp) { 6c7c: 1afffff8 bne 6c64 6c80: e1a00003 mov r0, r3 6c84: eb0008da bl 8ff4 <_Chain_Extract> if (rtems_chain_is_tail (chain, node)) return AIO_NOTCANCELED; else { rtems_chain_extract (node); current->aiocbp->error_code = ECANCELED; 6c88: e5943014 ldr r3, [r4, #20] 6c8c: e3a0208c mov r2, #140 ; 0x8c 6c90: e5832030 str r2, [r3, #48] ; 0x30 current->aiocbp->return_value = -1; 6c94: e3e02000 mvn r2, #0 free (current); 6c98: e1a00004 mov r0, r4 return AIO_NOTCANCELED; else { rtems_chain_extract (node); current->aiocbp->error_code = ECANCELED; current->aiocbp->return_value = -1; 6c9c: e5832034 str r2, [r3, #52] ; 0x34 free (current); 6ca0: ebfff100 bl 30a8 } return AIO_CANCELED; 6ca4: e3a00000 mov r0, #0 6ca8: e8bd8010 pop {r4, pc} node = rtems_chain_next (node); current = (rtems_aio_request *) node; } if (rtems_chain_is_tail (chain, node)) return AIO_NOTCANCELED; 6cac: e3a00001 mov r0, #1 <== NOT EXECUTED current->aiocbp->return_value = -1; free (current); } return AIO_CANCELED; } 6cb0: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== 00002f58 : const rtems_assoc_t *rtems_assoc_ptr_by_name( const rtems_assoc_t *ap, const char *name ) { 2f58: e92d41f0 push {r4, r5, r6, r7, r8, lr} const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 2f5c: e5904000 ldr r4, [r0] 2f60: e3540000 cmp r4, #0 const rtems_assoc_t *rtems_assoc_ptr_by_name( const rtems_assoc_t *ap, const char *name ) { 2f64: e1a06000 mov r6, r0 2f68: e1a07001 mov r7, r1 const rtems_assoc_t *default_ap = 0; 2f6c: 01a06004 moveq r6, r4 if (rtems_assoc_is_default(ap)) 2f70: 0a000011 beq 2fbc 2f74: e1a00004 mov r0, r4 2f78: e59f106c ldr r1, [pc, #108] ; 2fec 2f7c: eb0032c7 bl faa0 2f80: e3500000 cmp r0, #0 const rtems_assoc_t *rtems_assoc_ptr_by_name( const rtems_assoc_t *ap, const char *name ) { const rtems_assoc_t *default_ap = 0; 2f84: 13a08000 movne r8, #0 if (rtems_assoc_is_default(ap)) 2f88: 0a00000d beq 2fc4 default_ap = ap++; for ( ; ap->name; ap++) 2f8c: e1a05006 mov r5, r6 2f90: ea000003 b 2fa4 2f94: e595400c ldr r4, [r5, #12] 2f98: e3540000 cmp r4, #0 2f9c: e285500c add r5, r5, #12 2fa0: 0a00000e beq 2fe0 if (strcmp(ap->name, name) == 0) 2fa4: e1a00004 mov r0, r4 2fa8: e1a01007 mov r1, r7 2fac: eb0032bb bl faa0 2fb0: e3500000 cmp r0, #0 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 2fb4: e1a06005 mov r6, r5 if (strcmp(ap->name, name) == 0) 2fb8: 1afffff5 bne 2f94 return ap; return default_ap; } 2fbc: e1a00006 mov r0, r6 2fc0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 2fc4: e596400c ldr r4, [r6, #12] ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; 2fc8: e286300c add r3, r6, #12 for ( ; ap->name; ap++) 2fcc: e3540000 cmp r4, #0 2fd0: 11a08006 movne r8, r6 2fd4: 11a06003 movne r6, r3 2fd8: 1affffeb bne 2f8c 2fdc: eafffff6 b 2fbc <== NOT EXECUTED 2fe0: e1a06008 mov r6, r8 if (strcmp(ap->name, name) == 0) return ap; return default_ap; } 2fe4: e1a00006 mov r0, r6 2fe8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} =============================================================================== 00001e5c : const char *rtems_bsp_cmdline_get_param( const char *name, char *value, size_t length ) { 1e5c: e92d4070 push {r4, r5, r6, lr} const char *p; if ( !name ) 1e60: e2503000 subs r3, r0, #0 const char *rtems_bsp_cmdline_get_param( const char *name, char *value, size_t length ) { 1e64: e24dd008 sub sp, sp, #8 const char *p; if ( !name ) return NULL; 1e68: 01a00003 moveq r0, r3 size_t length ) { const char *p; if ( !name ) 1e6c: 1a000001 bne 1e78 return NULL; copy_string( p, value, length ); return value; } 1e70: e28dd008 add sp, sp, #8 1e74: e8bd8070 pop {r4, r5, r6, pc} const char *p; if ( !name ) return NULL; if ( !value ) 1e78: e3510000 cmp r1, #0 1e7c: 1a000001 bne 1e88 int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i return NULL; if ( !value ) return NULL; if ( !length ) 1e88: e3520000 cmp r2, #0 return NULL; 1e8c: 01a00002 moveq r0, r2 return NULL; if ( !value ) return NULL; if ( !length ) 1e90: 0afffff6 beq 1e70 return NULL; value[0] = '\0'; 1e94: e3a04000 mov r4, #0 1e98: e5c14000 strb r4, [r1] p = rtems_bsp_cmdline_get_param_raw( name ); 1e9c: e58d1004 str r1, [sp, #4] 1ea0: e58d2000 str r2, [sp] 1ea4: eb00001e bl 1f24 if ( !p ) 1ea8: e3500000 cmp r0, #0 1eac: e59d1004 ldr r1, [sp, #4] 1eb0: e59d2000 ldr r2, [sp] 1eb4: 0affffed beq 1e70 int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i 1ec4: e2526001 subs r6, r2, #1 1ec8: 11a03004 movne r3, r4 1ecc: 11a02004 movne r2, r4 if ( *p == '\"' ) { quotes++; } else if ( ((quotes % 2) == 0) && *p == ' ' ) break; value[i++] = *p++; value[i] = '\0'; 1ed0: 11a05004 movne r5, r4 int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i 1ed8: eaffffe8 b 1e80 <== NOT EXECUTED 1edc: e1530006 cmp r3, r6 1ee0: 2affffe6 bcs 1e80 1ee4: e1a04003 mov r4, r3 if ( *p == '\"' ) { 1ee8: e35c0022 cmp ip, #34 ; 0x22 quotes++; 1eec: 02822001 addeq r2, r2, #1 int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i quotes++; } else if ( ((quotes % 2) == 0) && *p == ' ' ) 1ef4: e3120001 tst r2, #1 1ef8: 1a000001 bne 1f04 1efc: e35c0020 cmp ip, #32 1f00: 0affffde beq 1e80 break; value[i++] = *p++; 1f04: e2833001 add r3, r3, #1 1f08: e7c1c004 strb ip, [r1, r4] value[i] = '\0'; 1f0c: e7c15003 strb r5, [r1, r3] int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i 1f1c: e1a00001 mov r0, r1 1f20: eaffffd2 b 1e70 =============================================================================== 000022c8 : int rtems_filesystem_dirname( const char *pathname ) { 22c8: e92d4030 push {r4, r5, lr} 22cc: e1a05000 mov r5, r0 int len = strlen( pathname ); 22d0: eb003328 bl ef78 while ( len ) { 22d4: e2504000 subs r4, r0, #0 22d8: 1a000002 bne 22e8 22dc: ea000006 b 22fc <== NOT EXECUTED 22e0: e3540000 cmp r4, #0 22e4: 0a000004 beq 22fc len--; 22e8: e2444001 sub r4, r4, #1 if ( rtems_filesystem_is_separator( pathname[len] ) ) 22ec: e7d50004 ldrb r0, [r5, r4] 22f0: eb0003d3 bl 3244 22f4: e3500000 cmp r0, #0 22f8: 0afffff8 beq 22e0 break; } return len; } 22fc: e1a00004 mov r0, r4 2300: e8bd8030 pop {r4, r5, pc} =============================================================================== 00002094 : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 2094: e92d40f0 push {r4, r5, r6, r7, lr} rtems_filesystem_umask = 022; /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 2098: e59f2104 ldr r2, [pc, #260] ; 21a4 /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 209c: e59f6104 ldr r6, [pc, #260] ; 21a8 /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 20a0: e5922000 ldr r2, [r2] /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 20a4: e5963000 ldr r3, [r6] /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 20a8: e3520000 cmp r2, #0 /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 20ac: e3a02012 mov r2, #18 * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 20b0: e24dd018 sub sp, sp, #24 /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 20b4: e583202c str r2, [r3, #44] ; 0x2c /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 20b8: 0a00002d beq 2174 rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 20bc: e59f30e8 ldr r3, [pc, #232] ; 21ac 20c0: e5933000 ldr r3, [r3] status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL ); 20c4: e3a05000 mov r5, #0 20c8: e2830008 add r0, r3, #8 20cc: e8900003 ldm r0, {r0, r1} 20d0: e893000c ldm r3, {r2, r3} 20d4: e58d5000 str r5, [sp] 20d8: eb00020a bl 2908 if ( status == -1 ) 20dc: e3700001 cmn r0, #1 20e0: 0a00002b beq 2194 rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 20e4: e5963000 ldr r3, [r6] * gonna hit performance. * * Till Straumann, 10/25/2002 */ /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 20e8: 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; 20ec: 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); 20f0: e3a01001 mov r1, #1 20f4: e1a03004 mov r3, r4 20f8: e1a02005 mov r2, r5 20fc: e59f00ac ldr r0, [pc, #172] ; 21b0 rtems_filesystem_root = loc; 2100: e1a07004 mov r7, r4 * gonna hit performance. * * Till Straumann, 10/25/2002 */ /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 2104: e58d5000 str r5, [sp] 2108: eb000058 bl 2270 rtems_filesystem_root = loc; 210c: e596c000 ldr ip, [r6] 2110: e8b7000f ldm r7!, {r0, r1, r2, r3} 2114: e28cc018 add ip, ip, #24 2118: e8ac000f stmia ip!, {r0, r1, r2, r3} 211c: e5973000 ldr r3, [r7] /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 2120: 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; 2124: e58c3000 str r3, [ip] /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 2128: e1a02005 mov r2, r5 212c: e1a03004 mov r3, r4 2130: e59f0078 ldr r0, [pc, #120] ; 21b0 2134: e58d5000 str r5, [sp] 2138: eb00004c bl 2270 rtems_filesystem_current = loc; 213c: e596c000 ldr ip, [r6] 2140: e8b4000f ldm r4!, {r0, r1, r2, r3} 2144: e28cc004 add ip, ip, #4 2148: e8ac000f stmia ip!, {r0, r1, r2, r3} 214c: 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); 2150: e3a01f7f mov r1, #508 ; 0x1fc /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_current = loc; 2154: 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); 2158: e59f0054 ldr r0, [pc, #84] ; 21b4 215c: e2811003 add r1, r1, #3 2160: eb000198 bl 27c8 if ( status != 0 ) 2164: e3500000 cmp r0, #0 2168: 1a000005 bne 2184 * 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. */ } 216c: e28dd018 add sp, sp, #24 2170: e8bd80f0 pop {r4, r5, r6, r7, pc} /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) rtems_fatal_error_occurred( 0xABCD0001 ); 2174: e3a004ab mov r0, #-1426063360 ; 0xab000000 <== NOT EXECUTED 2178: e28008cd add r0, r0, #13434880 ; 0xcd0000 <== NOT EXECUTED 217c: e2800001 add r0, r0, #1 <== NOT EXECUTED 2180: eb000fdb bl 60f4 <== NOT EXECUTED * created that way by the IMFS. */ status = mkdir( "/dev", 0777); if ( status != 0 ) rtems_fatal_error_occurred( 0xABCD0003 ); 2184: e3a004ab mov r0, #-1426063360 ; 0xab000000 <== NOT EXECUTED 2188: e28008cd add r0, r0, #13434880 ; 0xcd0000 <== NOT EXECUTED 218c: e2800003 add r0, r0, #3 <== NOT EXECUTED 2190: eb000fd7 bl 60f4 <== NOT EXECUTED mt = &rtems_filesystem_mount_table[0]; status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); 2194: e3a004ab mov r0, #-1426063360 ; 0xab000000 2198: e28008cd add r0, r0, #13434880 ; 0xcd0000 219c: e2800002 add r0, r0, #2 21a0: eb000fd3 bl 60f4 =============================================================================== 0000a8a8 : bool rtems_filesystem_iterate( rtems_per_filesystem_routine routine, void *routine_arg ) { a8a8: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0]; rtems_chain_node *node = NULL; bool stop = false; while ( table_entry->type && !stop ) { a8ac: e59f60ac ldr r6, [pc, #172] ; a960 a8b0: e5963000 ldr r3, [r6] a8b4: e3530000 cmp r3, #0 bool rtems_filesystem_iterate( rtems_per_filesystem_routine routine, void *routine_arg ) { a8b8: e1a04000 mov r4, r0 a8bc: e1a05001 mov r5, r1 const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0]; rtems_chain_node *node = NULL; bool stop = false; while ( table_entry->type && !stop ) { a8c0: 1a000003 bne a8d4 a8c4: ea00000c b a8fc <== NOT EXECUTED a8c8: e3500000 cmp r0, #0 a8cc: e2866008 add r6, r6, #8 a8d0: 1a000020 bne a958 stop = (*routine)( table_entry, routine_arg ); a8d4: e1a00006 mov r0, r6 a8d8: e1a01005 mov r1, r5 a8dc: e1a0e00f mov lr, pc a8e0: e12fff14 bx r4 { const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0]; rtems_chain_node *node = NULL; bool stop = false; while ( table_entry->type && !stop ) { a8e4: e5963008 ldr r3, [r6, #8] a8e8: e3530000 cmp r3, #0 stop = (*routine)( table_entry, routine_arg ); a8ec: e1a0a000 mov sl, r0 { const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0]; rtems_chain_node *node = NULL; bool stop = false; while ( table_entry->type && !stop ) { a8f0: 1afffff4 bne a8c8 stop = (*routine)( table_entry, routine_arg ); ++table_entry; } if ( !stop ) { a8f4: e3500000 cmp r0, #0 a8f8: 1a000016 bne a958 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 ); a8fc: e59f7060 ldr r7, [pc, #96] ; a964 a900: e3a01000 mov r1, #0 } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } a904: e59f605c ldr r6, [pc, #92] ; a968 a908: e5970000 ldr r0, [r7] a90c: e1a02001 mov r2, r1 a910: ebffec4e bl 5a50 a914: e4968004 ldr r8, [r6], #4 ++table_entry; } if ( !stop ) { rtems_libio_lock(); for ( a918: e1580006 cmp r8, r6 a91c: 03a0a000 moveq sl, #0 a920: 1a000002 bne a930 a924: ea000009 b a950 node = rtems_chain_first( &filesystem_chain ); !rtems_chain_is_tail( &filesystem_chain, node ) && !stop; a928: e3500000 cmp r0, #0 a92c: 1a000007 bne a950 node = rtems_chain_next( node ) ) { const filesystem_node *fsn = (filesystem_node *) node; stop = (*routine)( &fsn->entry, routine_arg ); a930: e2880008 add r0, r8, #8 a934: e1a01005 mov r1, r5 a938: e1a0e00f mov lr, pc a93c: e12fff14 bx r4 } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } a940: e5988000 ldr r8, [r8] ++table_entry; } if ( !stop ) { rtems_libio_lock(); for ( a944: e1580006 cmp r8, r6 !rtems_chain_is_tail( &filesystem_chain, node ) && !stop; node = rtems_chain_next( node ) ) { const filesystem_node *fsn = (filesystem_node *) node; stop = (*routine)( &fsn->entry, routine_arg ); a948: e1a0a000 mov sl, r0 ++table_entry; } if ( !stop ) { rtems_libio_lock(); for ( a94c: 1afffff5 bne a928 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); a950: e5970000 ldr r0, [r7] a954: ebffec86 bl 5b74 } rtems_libio_unlock(); } return stop; } a958: e1a0000a mov r0, sl a95c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} =============================================================================== 00002890 : bool rtems_filesystem_mount_iterate( rtems_per_filesystem_mount_routine routine, void *routine_arg ) { 2890: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 2894: e59f7064 ldr r7, [pc, #100] ; 2900 stop = (*routine)( mt_entry, routine_arg ); } rtems_libio_unlock(); return stop; } 2898: e59f4064 ldr r4, [pc, #100] ; 2904 bool rtems_filesystem_mount_iterate( rtems_per_filesystem_mount_routine routine, void *routine_arg ) { 289c: e1a06001 mov r6, r1 28a0: e3a01000 mov r1, #0 28a4: e1a05000 mov r5, r0 28a8: e1a02001 mov r2, r1 28ac: e5970000 ldr r0, [r7] 28b0: eb000c66 bl 5a50 stop = (*routine)( mt_entry, routine_arg ); } rtems_libio_unlock(); return stop; } 28b4: e4948004 ldr r8, [r4], #4 { rtems_chain_node *node = NULL; bool stop = false; rtems_libio_lock(); for ( 28b8: e1580004 cmp r8, r4 rtems_per_filesystem_mount_routine routine, void *routine_arg ) { rtems_chain_node *node = NULL; bool stop = false; 28bc: 03a0a000 moveq sl, #0 rtems_libio_lock(); for ( 28c0: 1a000002 bne 28d0 28c4: ea000009 b 28f0 <== NOT EXECUTED node = rtems_chain_first( &mount_chain ); !rtems_chain_is_tail( &mount_chain, node ) && !stop; 28c8: e3500000 cmp r0, #0 28cc: 1a000007 bne 28f0 node = rtems_chain_next( node ) ) { const rtems_filesystem_mount_table_entry_t *mt_entry = (rtems_filesystem_mount_table_entry_t *) node; stop = (*routine)( mt_entry, routine_arg ); 28d0: e1a00008 mov r0, r8 28d4: e1a01006 mov r1, r6 28d8: e1a0e00f mov lr, pc 28dc: e12fff15 bx r5 } rtems_libio_unlock(); return stop; } 28e0: e5988000 ldr r8, [r8] { rtems_chain_node *node = NULL; bool stop = false; rtems_libio_lock(); for ( 28e4: e1580004 cmp r8, r4 node = rtems_chain_next( node ) ) { const rtems_filesystem_mount_table_entry_t *mt_entry = (rtems_filesystem_mount_table_entry_t *) node; stop = (*routine)( mt_entry, routine_arg ); 28e8: e1a0a000 mov sl, r0 { rtems_chain_node *node = NULL; bool stop = false; rtems_libio_lock(); for ( 28ec: 1afffff5 bne 28c8 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 28f0: e5970000 ldr r0, [r7] 28f4: eb000c9e bl 5b74 stop = (*routine)( mt_entry, routine_arg ); } rtems_libio_unlock(); return stop; } 28f8: e1a0000a mov r0, sl 28fc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} =============================================================================== 00002304 : int rtems_filesystem_prefix_separators( const char *pathname, int pathnamelen ) { 2304: e92d4070 push {r4, r5, r6, lr} 2308: e1a05000 mov r5, r0 /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 230c: e5d00000 ldrb r0, [r0] 2310: e3510000 cmp r1, #0 2314: 13500000 cmpne r0, #0 2318: 03a04000 moveq r4, #0 231c: 13a04001 movne r4, #1 2320: e1a06001 mov r6, r1 ) { /* * Eat any separators at start of the path. */ int stripped = 0; 2324: 13a04000 movne r4, #0 while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 2328: 1a000005 bne 2344 232c: ea000007 b 2350 <== NOT EXECUTED 2330: e5f50001 ldrb r0, [r5, #1]! { pathname++; pathnamelen--; stripped++; 2334: e2844001 add r4, r4, #1 { /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 2338: e1560004 cmp r6, r4 233c: 13500000 cmpne r0, #0 2340: 0a000002 beq 2350 2344: eb0003be bl 3244 2348: e3500000 cmp r0, #0 234c: 1afffff7 bne 2330 pathname++; pathnamelen--; stripped++; } return stripped; } 2350: e1a00004 mov r0, r4 2354: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== 00002f3c : } return 0; } int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *)) { 2f3c: e92d4070 push {r4, r5, r6, lr} 2f40: 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 ) ); 2f44: e3a00008 mov r0, #8 } return 0; } int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *)) { 2f48: 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 ) ); 2f4c: eb000107 bl 3370 *key = new_key; new_key->val = NULL; 2f50: e3a03000 mov r3, #0 * pointer to the buffer that will hold the value of the key itself. * We have to to this, because the others functions on this interface * deal with the value of the key, as used with the POSIX API. */ /* Do not pull your hair, trust me this works. :-) */ __gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) ); 2f54: e1a04000 mov r4, r0 *key = new_key; 2f58: 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 ); 2f5c: e1a01004 mov r1, r4 2f60: e1a00003 mov r0, r3 2f64: 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; 2f68: e8840028 stm r4, {r3, r5} "gxx_wrappers: create key=%x, dtor=%x, new_key=%x\n", key, dtor, new_key ); #endif /* register with RTEMS the buffer that will hold the key values */ status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor ); 2f6c: eb000f5b bl 6ce0 if ( status == RTEMS_SUCCESSFUL ) 2f70: e3500000 cmp r0, #0 2f74: 08bd8070 popeq {r4, r5, r6, pc} return 0; free( new_key ); 2f78: e1a00004 mov r0, r4 <== NOT EXECUTED 2f7c: ebffff87 bl 2da0 <== NOT EXECUTED return -1; 2f80: e3e00000 mvn r0, #0 <== NOT EXECUTED } 2f84: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== 00002ebc : /* uncomment this if you need to debug this interface */ /*#define DEBUG_GXX_WRAPPERS 1*/ int rtems_gxx_once(__gthread_once_t *once, void (*func) (void)) { 2ebc: e92d4070 push {r4, r5, r6, lr} #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: once=%x, func=%x\n", *once, func ); #endif if ( *(volatile __gthread_once_t *)once == 0 ) { 2ec0: e5903000 ldr r3, [r0] 2ec4: e3530000 cmp r3, #0 /* uncomment this if you need to debug this interface */ /*#define DEBUG_GXX_WRAPPERS 1*/ int rtems_gxx_once(__gthread_once_t *once, void (*func) (void)) { 2ec8: e24dd004 sub sp, sp, #4 2ecc: e1a04000 mov r4, r0 2ed0: e1a05001 mov r5, r1 #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: once=%x, func=%x\n", *once, func ); #endif if ( *(volatile __gthread_once_t *)once == 0 ) { 2ed4: 0a000002 beq 2ee4 rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); if ( o == 0 ) (*func)(); } return 0; } 2ed8: e3a00000 mov r0, #0 2edc: e28dd004 add sp, sp, #4 2ee0: e8bd8070 pop {r4, r5, r6, pc} if ( *(volatile __gthread_once_t *)once == 0 ) { rtems_mode saveMode; __gthread_once_t o; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); 2ee4: e3a00c01 mov r0, #256 ; 0x100 2ee8: e1a01000 mov r1, r0 2eec: e1a0200d mov r2, sp 2ef0: eb000f03 bl 6b04 if ( (o = *(volatile __gthread_once_t *)once) == 0 ) { 2ef4: e5943000 ldr r3, [r4] 2ef8: e3530000 cmp r3, #0 if ( *(volatile __gthread_once_t *)once == 0 ) { rtems_mode saveMode; __gthread_once_t o; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); 2efc: e1a0600d mov r6, sp if ( (o = *(volatile __gthread_once_t *)once) == 0 ) { 2f00: 1a000008 bne 2f28 *(volatile __gthread_once_t *)once = 1; 2f04: e3a03001 mov r3, #1 2f08: e5843000 str r3, [r4] } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 2f0c: e3a01c01 mov r1, #256 ; 0x100 2f10: e1a0200d mov r2, sp 2f14: e59d0000 ldr r0, [sp] 2f18: eb000ef9 bl 6b04 if ( o == 0 ) (*func)(); 2f1c: e1a0e00f mov lr, pc 2f20: e12fff15 bx r5 2f24: eaffffeb b 2ed8 rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); if ( (o = *(volatile __gthread_once_t *)once) == 0 ) { *(volatile __gthread_once_t *)once = 1; } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 2f28: e59d0000 ldr r0, [sp] <== NOT EXECUTED 2f2c: e3a01c01 mov r1, #256 ; 0x100 <== NOT EXECUTED 2f30: e1a0200d mov r2, sp <== NOT EXECUTED 2f34: eb000ef2 bl 6b04 <== NOT EXECUTED 2f38: eaffffe6 b 2ed8 <== NOT EXECUTED =============================================================================== 00007418 : rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 7418: e59f3150 ldr r3, [pc, #336] ; 7570 741c: e593c000 ldr ip, [r3] rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; 7420: e59f314c ldr r3, [pc, #332] ; 7574 if ( rtems_interrupt_is_in_progress() ) 7424: e35c0000 cmp ip, #0 rtems_status_code rtems_io_register_driver( rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { 7428: e92d4030 push {r4, r5, lr} 742c: e1a04000 mov r4, r0 rtems_device_major_number major_limit = _IO_Number_of_drivers; 7430: e5930000 ldr r0, [r3] if ( rtems_interrupt_is_in_progress() ) return RTEMS_CALLED_FROM_ISR; 7434: 13a00012 movne r0, #18 rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 7438: 18bd8030 popne {r4, r5, pc} return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 743c: e3520000 cmp r2, #0 7440: 0a00003f beq 7544 return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; if ( driver_table == NULL ) 7444: e3510000 cmp r1, #0 if ( registered_major == NULL ) return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 7448: e5820000 str r0, [r2] if ( driver_table == NULL ) 744c: 0a00003c beq 7544 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 7450: e591c000 ldr ip, [r1] 7454: e35c0000 cmp ip, #0 7458: 0a000036 beq 7538 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 745c: e1500004 cmp r0, r4 7460: 9a000027 bls 7504 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 7464: e59f010c ldr r0, [pc, #268] ; 7578 7468: e590c000 ldr ip, [r0] 746c: e28cc001 add ip, ip, #1 7470: e580c000 str ip, [r0] return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 7474: e3540000 cmp r4, #0 7478: 1a000023 bne 750c static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 747c: e593c000 ldr ip, [r3] rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 7480: e35c0000 cmp ip, #0 7484: 0a000030 beq 754c 7488: e59fe0ec ldr lr, [pc, #236] ; 757c 748c: e59e3000 ldr r3, [lr] 7490: ea000003 b 74a4 7494: e2844001 add r4, r4, #1 7498: e15c0004 cmp ip, r4 749c: e2833018 add r3, r3, #24 74a0: 9a000005 bls 74bc static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 74a4: e5930000 ldr r0, [r3] 74a8: e3500000 cmp r0, #0 74ac: 1afffff8 bne 7494 74b0: e5930004 ldr r0, [r3, #4] 74b4: e3500000 cmp r0, #0 74b8: 1afffff5 bne 7494 } /* Assigns invalid value in case of failure */ *major = m; if ( m != n ) 74bc: e15c0004 cmp ip, r4 74c0: 1084c084 addne ip, r4, r4, lsl #1 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 74c4: e5824000 str r4, [r2] if ( m != n ) 74c8: 11a0c18c lslne ip, ip, #3 74cc: 0a00001f beq 7550 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 74d0: e59e5000 ldr r5, [lr] 74d4: e1a0e001 mov lr, r1 74d8: e8be000f ldm lr!, {r0, r1, r2, r3} 74dc: e085c00c add ip, r5, ip 74e0: e8ac000f stmia ip!, {r0, r1, r2, r3} 74e4: e89e0003 ldm lr, {r0, r1} 74e8: e88c0003 stm ip, {r0, r1} _Thread_Enable_dispatch(); 74ec: eb000753 bl 9240 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 74f0: e3a01000 mov r1, #0 74f4: e1a00004 mov r0, r4 74f8: e1a02001 mov r2, r1 } 74fc: e8bd4030 pop {r4, r5, lr} _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 7500: ea00213d b f9fc if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) return RTEMS_INVALID_NUMBER; 7504: e3a0000a mov r0, #10 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 7508: e8bd8030 pop {r4, r5, pc} _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 750c: e59fe068 ldr lr, [pc, #104] ; 757c 7510: e084c084 add ip, r4, r4, lsl #1 7514: e59e3000 ldr r3, [lr] 7518: e1a0c18c lsl ip, ip, #3 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 751c: e793000c ldr r0, [r3, ip] 7520: e3500000 cmp r0, #0 _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 7524: e083300c add r3, r3, ip static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 7528: 0a00000b beq 755c major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); 752c: eb000743 bl 9240 <_Thread_Enable_dispatch> return RTEMS_RESOURCE_IN_USE; 7530: e3a0000c mov r0, #12 7534: e8bd8030 pop {r4, r5, pc} static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 7538: e591c004 ldr ip, [r1, #4] 753c: e35c0000 cmp ip, #0 7540: 1affffc5 bne 745c if ( driver_table == NULL ) return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; 7544: e3a00009 mov r0, #9 7548: e8bd8030 pop {r4, r5, pc} if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 754c: e5824000 str r4, [r2] <== NOT EXECUTED if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); 7550: eb00073a bl 9240 <_Thread_Enable_dispatch> *major = m; if ( m != n ) return RTEMS_SUCCESSFUL; return RTEMS_TOO_MANY; 7554: e3a00005 mov r0, #5 if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); return sc; 7558: e8bd8030 pop {r4, r5, pc} static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 755c: e5933004 ldr r3, [r3, #4] 7560: e3530000 cmp r3, #0 7564: 1afffff0 bne 752c if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 7568: e5824000 str r4, [r2] 756c: eaffffd7 b 74d0 =============================================================================== 00002488 : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 2488: e92d4010 push {r4, lr} rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 248c: e59f30b8 ldr r3, [pc, #184] ; 254c 2490: e5934000 ldr r4, [r3] 2494: e3540000 cmp r4, #0 * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 2498: e24dd004 sub sp, sp, #4 rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 249c: 0a000017 beq 2500 { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 24a0: e1a00004 mov r0, r4 24a4: e3a01038 mov r1, #56 ; 0x38 24a8: ebffff42 bl 21b8 24ac: e59f309c ldr r3, [pc, #156] ; 2550 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 24b0: e3500000 cmp r0, #0 uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 24b4: e1a02000 mov r2, r0 24b8: e5830000 str r0, [r3] sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 24bc: 0a000020 beq 2544 rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; 24c0: e59f308c ldr r3, [pc, #140] ; 2554 for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 24c4: e3540001 cmp r4, #1 rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; 24c8: e5830000 str r0, [r3] for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 24cc: 9a000009 bls 24f8 * rtems_libio_init * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) 24d0: e2803038 add r3, r0, #56 ; 0x38 24d4: e3a02001 mov r2, #1 if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) iop->data1 = iop + 1; 24d8: e2822001 add r2, r2, #1 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 24dc: e1520004 cmp r2, r4 iop->data1 = iop + 1; 24e0: e5033004 str r3, [r3, #-4] 24e4: e2833038 add r3, r3, #56 ; 0x38 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 24e8: 1afffffa bne 24d8 * rtems_libio_init * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) 24ec: e2422001 sub r2, r2, #1 24f0: e0622182 rsb r2, r2, r2, lsl #3 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 24f4: e0802182 add r2, r0, r2, lsl #3 iop->data1 = iop + 1; iop->data1 = NULL; 24f8: e3a03000 mov r3, #0 24fc: e5823034 str r3, [r2, #52] ; 0x34 /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( 2500: e59fc050 ldr ip, [pc, #80] ; 2558 2504: e59f0050 ldr r0, [pc, #80] ; 255c 2508: e3a01001 mov r1, #1 250c: e3a02054 mov r2, #84 ; 0x54 2510: e3a03000 mov r3, #0 2514: e58dc000 str ip, [sp] 2518: eb000cb2 bl 57e8 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 251c: e3500000 cmp r0, #0 2520: 1a000006 bne 2540 /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) 2524: e59f3034 ldr r3, [pc, #52] ; 2560 2528: e5933000 ldr r3, [r3] 252c: e3530000 cmp r3, #0 (* rtems_fs_init_helper)(); 2530: 11a0e00f movne lr, pc 2534: 112fff13 bxne r3 } 2538: e28dd004 add sp, sp, #4 253c: e8bd8010 pop {r4, pc} RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) rtems_fatal_error_occurred( rc ); 2540: eb000eeb bl 60f4 <== NOT EXECUTED if (rtems_libio_number_iops > 0) { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); 2544: e280001a add r0, r0, #26 2548: eb000ee9 bl 60f4 =============================================================================== 0000a598 : uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { a598: e2002006 and r2, r0, #6 a59c: e3520006 cmp r2, #6 */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) { a5a0: e1a03000 mov r3, r0 uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { fcntl_flags |= O_RDWR; a5a4: 03a00002 moveq r0, #2 uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { a5a8: 0a000002 beq a5b8 fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { a5ac: e3130002 tst r3, #2 fcntl_flags |= O_RDONLY; a5b0: 13a00000 movne r0, #0 { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { a5b4: 0a000006 beq a5d4 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 ) { a5b8: e3130001 tst r3, #1 fcntl_flags |= O_NONBLOCK; a5bc: 13800901 orrne r0, r0, #16384 ; 0x4000 } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { a5c0: e3130c02 tst r3, #512 ; 0x200 fcntl_flags |= O_APPEND; a5c4: 13800008 orrne r0, r0, #8 } if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { a5c8: e3130b01 tst r3, #1024 ; 0x400 fcntl_flags |= O_CREAT; a5cc: 13800c02 orrne r0, r0, #512 ; 0x200 } return fcntl_flags; } a5d0: e12fff1e bx lr ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { fcntl_flags |= O_RDWR; a5d4: e3130004 tst r3, #4 <== NOT EXECUTED a5d8: 03a00000 moveq r0, #0 <== NOT EXECUTED a5dc: 13a00001 movne r0, #1 <== NOT EXECUTED a5e0: eafffff4 b a5b8 <== NOT EXECUTED =============================================================================== 00005d58 : ) { const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) 5d58: e3500001 cmp r0, #1 const char *rtems_object_get_api_class_name( int the_api, int the_class ) { 5d5c: e52de004 push {lr} ; (str lr, [sp, #-4]!) const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) 5d60: 0a00000d beq 5d9c api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) 5d64: e3500002 cmp r0, #2 5d68: 0a000004 beq 5d80 api_assoc = rtems_object_api_classic_assoc; #ifdef RTEMS_POSIX_API else if ( the_api == OBJECTS_POSIX_API ) 5d6c: e3500003 cmp r0, #3 api_assoc = rtems_object_api_posix_assoc; 5d70: 059f003c ldreq r0, [pc, #60] ; 5db4 if ( the_api == OBJECTS_INTERNAL_API ) api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) api_assoc = rtems_object_api_classic_assoc; #ifdef RTEMS_POSIX_API else if ( the_api == OBJECTS_POSIX_API ) 5d74: 0a000002 beq 5d84 api_assoc = rtems_object_api_posix_assoc; #endif else return "BAD API"; 5d78: e59f0038 ldr r0, [pc, #56] ; 5db8 5d7c: e49df004 pop {pc} ; (ldr pc, [sp], #4) const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) api_assoc = rtems_object_api_classic_assoc; 5d80: e59f0034 ldr r0, [pc, #52] ; 5dbc else if ( the_api == OBJECTS_POSIX_API ) api_assoc = rtems_object_api_posix_assoc; #endif else return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); 5d84: eb00137c bl ab7c if ( class_assoc ) 5d88: e3500000 cmp r0, #0 return class_assoc->name; 5d8c: 15900000 ldrne r0, [r0] api_assoc = rtems_object_api_posix_assoc; #endif else return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); if ( class_assoc ) 5d90: 149df004 popne {pc} ; (ldrne pc, [sp], #4) return class_assoc->name; return "BAD CLASS"; 5d94: e59f0024 ldr r0, [pc, #36] ; 5dc0 } 5d98: e49df004 pop {pc} ; (ldr pc, [sp], #4) { const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) api_assoc = rtems_object_api_internal_assoc; 5d9c: e59f0020 ldr r0, [pc, #32] ; 5dc4 else if ( the_api == OBJECTS_POSIX_API ) api_assoc = rtems_object_api_posix_assoc; #endif else return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); 5da0: eb001375 bl ab7c if ( class_assoc ) 5da4: e3500000 cmp r0, #0 return class_assoc->name; 5da8: 15900000 ldrne r0, [r0] api_assoc = rtems_object_api_posix_assoc; #endif else return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); if ( class_assoc ) 5dac: 149df004 popne {pc} ; (ldrne pc, [sp], #4) 5db0: eafffff7 b 5d94 =============================================================================== 00001a14 : void rtems_print_buffer( const unsigned char *buffer, int length ) { 1a14: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} int i, mod, max; if ( !length ) return; 1a18: e3510000 cmp r1, #0 void rtems_print_buffer( const unsigned char *buffer, int length ) { 1a1c: e24dd078 sub sp, sp, #120 ; 0x78 1a20: e1a0b000 mov fp, r0 int i, mod, max; if ( !length ) return; 1a24: 0a000037 beq 1b08 mod = length % 16; 1a28: e1a03fc1 asr r3, r1, #31 1a2c: e1a03e23 lsr r3, r3, #28 1a30: e081a003 add sl, r1, r3 1a34: e20aa00f and sl, sl, #15 1a38: e063a00a rsb sl, r3, sl max = length - mod; 1a3c: e06a9001 rsb r9, sl, r1 for ( i=0 ; i 1a48: e59f71f4 ldr r7, [pc, #500] ; 1c44 1a4c: e3a08000 mov r8, #0 1a50: e1a0400d mov r4, sp { int i; char line_buffer[120]; line_buffer[0] = '\0'; 1a54: e3a03000 mov r3, #0 1a58: e5cd3000 strb r3, [sp] static inline void Dump_Line( const unsigned char *buffer, int length ); void rtems_print_buffer( 1a5c: e08b6008 add r6, fp, r8 int i; char line_buffer[120]; line_buffer[0] = '\0'; for( i=0 ; i 1a70: e1a0200d mov r2, sp int i; char line_buffer[120]; line_buffer[0] = '\0'; for( i=0 ; i int i; char line_buffer[120]; line_buffer[0] = '\0'; for( i=0 ; i sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] ); for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|" ); 1a84: e1a0000d mov r0, sp 1a88: eb00359d bl f104 1a8c: e59f11b8 ldr r1, [pc, #440] ; 1c4c 1a90: e0840000 add r0, r4, r0 1a94: e3a02002 mov r2, #2 1a98: eb0033d1 bl e9e4 for( i=0 ; i 1ac0: e1a0200d mov r2, sp for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|" ); for( i=0 ; i for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|" ); for( i=0 ; i isprint( buffer[ i ] ) ? buffer[ i ] : '.' ); for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|\n" ); 1ad4: e1a0000d mov r0, sp 1ad8: eb003589 bl f104 1adc: e59f1170 ldr r1, [pc, #368] ; 1c54 1ae0: e3a02003 mov r2, #3 1ae4: e0840000 add r0, r4, r0 1ae8: eb0033bd bl e9e4 mod = length % 16; max = length - mod; for ( i=0 ; i mod = length % 16; max = length - mod; for ( i=0 ; i Dump_Line( &buffer[ i ], 16 ); if ( mod ) 1b00: e35a0000 cmp sl, #0 1b04: 1a000001 bne 1b10 Dump_Line( &buffer[ max ], mod ); } 1b08: e28dd078 add sp, sp, #120 ; 0x78 1b0c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} { int i; char line_buffer[120]; line_buffer[0] = '\0'; 1b10: e3a05000 mov r5, #0 for ( i=0 ; i 1b24: e1a0400d mov r4, sp sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] ); 1b28: e7d93005 ldrb r3, [r9, r5] 1b2c: e1a0000d mov r0, sp 1b30: e59f1110 ldr r1, [pc, #272] ; 1c48 1b34: e1a0200d mov r2, sp int i; char line_buffer[120]; line_buffer[0] = '\0'; for( i=0 ; i int i; char line_buffer[120]; line_buffer[0] = '\0'; for( i=0 ; i sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] ); for( ; i<16 ; i++ ) 1b48: e35a000f cmp sl, #15 1b4c: d1a0500a movle r5, sl 1b50: ca000034 bgt 1c28 strcat( line_buffer, " " ); 1b54: e1a0000d mov r0, sp 1b58: eb003569 bl f104 line_buffer[0] = '\0'; for( i=0 ; i 1b64: e0840000 add r0, r4, r0 1b68: e3a02004 mov r2, #4 1b6c: eb00339c bl e9e4 line_buffer[0] = '\0'; for( i=0 ; i strcat( line_buffer, " " ); strcat( line_buffer, "|" ); 1b78: e1a0000d mov r0, sp 1b7c: eb003560 bl f104 1b80: e59f10c4 ldr r1, [pc, #196] ; 1c4c 1b84: e0840000 add r0, r4, r0 1b88: e3a02002 mov r2, #2 1b8c: eb003394 bl e9e4 for( i=0 ; i 1b9c: e59f70a0 ldr r7, [pc, #160] ; 1c44 1ba0: e3a05000 mov r5, #0 sprintf( line_buffer, "%s%c", line_buffer, isprint( buffer[ i ] ) ? buffer[ i ] : '.' ); 1ba4: e7d93005 ldrb r3, [r9, r5] 1ba8: e5972000 ldr r2, [r7] 1bac: e0822003 add r2, r2, r3 1bb0: e5d22001 ldrb r2, [r2, #1] for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|" ); for( i=0 ; i 1bc4: e1a0200d mov r2, sp for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|" ); for( i=0 ; i for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|" ); for( i=0 ; i sprintf( line_buffer, "%s%c", line_buffer, isprint( buffer[ i ] ) ? buffer[ i ] : '.' ); for( ; i<16 ; i++ ) 1bd8: e35a000f cmp sl, #15 1bdc: ca000008 bgt 1c04 strcat( line_buffer, " " ); 1be0: e1a0000d mov r0, sp 1be4: eb003546 bl f104 strcat( line_buffer, "|" ); for( i=0 ; i 1bf0: e0840000 add r0, r4, r0 1bf4: e3a02002 mov r2, #2 1bf8: eb003379 bl e9e4 strcat( line_buffer, "|" ); for( i=0 ; i strcat( line_buffer, " " ); strcat( line_buffer, "|\n" ); 1c04: e1a0000d mov r0, sp 1c08: eb00353d bl f104 1c0c: e59f1040 ldr r1, [pc, #64] ; 1c54 1c10: e0840000 add r0, r4, r0 1c14: e3a02003 mov r2, #3 1c18: eb003371 bl e9e4 printk( line_buffer ); 1c1c: e1a0000d mov r0, sp 1c20: eb0005f0 bl 33e8 1c24: eaffffb7 b 1b08 sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] ); for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|" ); 1c28: e1a0000d mov r0, sp <== NOT EXECUTED 1c2c: eb003534 bl f104 <== NOT EXECUTED 1c30: e59f1014 ldr r1, [pc, #20] ; 1c4c <== NOT EXECUTED 1c34: e0840000 add r0, r4, r0 <== NOT EXECUTED 1c38: e3a02002 mov r2, #2 <== NOT EXECUTED 1c3c: eb003368 bl e9e4 <== NOT EXECUTED 1c40: eaffffd5 b 1b9c <== NOT EXECUTED =============================================================================== 000025e0 : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 25e0: e92d4830 push {r4, r5, fp, lr} Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 25e4: e59f4074 ldr r4, [pc, #116] ; 2660 25e8: e5943004 ldr r3, [r4, #4] ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 25ec: e59300bc ldr r0, [r3, #188] ; 0xbc /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 25f0: e28db00c add fp, sp, #12 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 25f4: e15b0000 cmp fp, r0 return false; 25f8: 33a05000 movcc r5, #0 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 25fc: 3a000004 bcc 2614 return false; } if ( sp > (the_stack->area + the_stack->size) ) { 2600: e59350b8 ldr r5, [r3, #184] ; 0xb8 2604: e0805005 add r5, r0, r5 } /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) 2608: e15b0005 cmp fp, r5 260c: 83a05000 movhi r5, #0 2610: 93a05001 movls r5, #1 /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 2614: e59f3048 ldr r3, [pc, #72] ; 2664 2618: e5933008 ldr r3, [r3, #8] 261c: 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; 2620: 03a01001 moveq r1, #1 /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 2624: 0a000005 beq 2640 pattern_ok = (!memcmp( 2628: e59f1038 ldr r1, [pc, #56] ; 2668 262c: e2800008 add r0, r0, #8 2630: e3a02010 mov r2, #16 2634: eb003b9f bl 114b8 2638: e2701001 rsbs r1, r0, #1 263c: 33a01000 movcc r1, #0 /* * Let's report as much as we can. */ if ( !sp_ok || !pattern_ok ) { 2640: e3550000 cmp r5, #0 2644: 0a000003 beq 2658 2648: e3510000 cmp r1, #0 264c: 0a000001 beq 2658 /* * The Stack Pointer and the Pattern Area are OK so return false. */ return false; } 2650: e3a00000 mov r0, #0 2654: e8bd8830 pop {r4, r5, fp, pc} /* * Let's report as much as we can. */ if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 2658: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED 265c: ebffff98 bl 24c4 <== NOT EXECUTED =============================================================================== 00002578 : */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 2578: e92d4810 push {r4, fp, lr} Stack_Control *the_stack = &running->Start.Initial_stack; void *pattern; bool sp_ok; bool pattern_ok = true; pattern = Stack_check_Get_pattern_area(the_stack); 257c: e59030bc ldr r3, [r0, #188] ; 0xbc */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 2580: e28db008 add fp, sp, #8 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 2584: e15b0003 cmp fp, r3 */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 2588: e1a04000 mov r4, r0 Stack_Control *the_stack = &running->Start.Initial_stack; void *pattern; bool sp_ok; bool pattern_ok = true; pattern = Stack_check_Get_pattern_area(the_stack); 258c: e2830008 add r0, r3, #8 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 2590: 3a000003 bcc 25a4 return false; } if ( sp > (the_stack->area + the_stack->size) ) { 2594: e59420b8 ldr r2, [r4, #184] ; 0xb8 2598: e0833002 add r3, r3, r2 259c: e15b0003 cmp fp, r3 25a0: 9a000006 bls 25c0 /* * Check for an out of bounds stack pointer or an overwrite */ sp_ok = Stack_check_Frame_pointer_in_range( the_stack ); pattern_ok = (!memcmp( pattern, 25a4: e59f1030 ldr r1, [pc, #48] ; 25dc <== NOT EXECUTED 25a8: e3a02010 mov r2, #16 <== NOT EXECUTED 25ac: eb003bc1 bl 114b8 <== NOT EXECUTED 25b0: e2701001 rsbs r1, r0, #1 <== NOT EXECUTED 25b4: 33a01000 movcc r1, #0 <== NOT EXECUTED (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( running, pattern_ok ); 25b8: e1a00004 mov r0, r4 25bc: ebffffc0 bl 24c4 /* * Check for an out of bounds stack pointer or an overwrite */ sp_ok = Stack_check_Frame_pointer_in_range( the_stack ); pattern_ok = (!memcmp( pattern, 25c0: e59f1014 ldr r1, [pc, #20] ; 25dc 25c4: e3a02010 mov r2, #16 25c8: eb003bba bl 114b8 (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 25cc: e3500000 cmp r0, #0 25d0: 08bd8810 popeq {r4, fp, pc} 25d4: e3a01000 mov r1, #0 25d8: eafffff6 b 25b8 =============================================================================== 0000c308 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { c308: e92d40f0 push {r4, r5, r6, r7, lr} STRING_TO_INPUT_TYPE result; char *end; if ( !n ) c30c: e2515000 subs r5, r1, #0 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { c310: e1a04000 mov r4, r0 c314: e24dd004 sub sp, sp, #4 c318: e1a06002 mov r6, r2 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; c31c: 03a00009 moveq r0, #9 ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) c320: 0a000013 beq c374 return RTEMS_INVALID_ADDRESS; errno = 0; c324: eb000bce bl f264 <__errno> c328: e3a03000 mov r3, #0 c32c: 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 ); c330: e1a0100d mov r1, sp if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; c334: e5853000 str r3, [r5] #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); c338: e1a00004 mov r0, r4 c33c: e3a02010 mov r2, #16 c340: eb0018f4 bl 12718 #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 ) c344: e3560000 cmp r6, #0 *endptr = end; c348: 159d3000 ldrne r3, [sp] #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) c34c: 059d3000 ldreq r3, [sp] *endptr = end; c350: 15863000 strne r3, [r6] /* nothing was converted */ if ( end == s ) c354: e1540003 cmp r4, r3 *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); c358: e1a07000 mov r7, r0 if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; c35c: 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 ) c360: 0a000003 beq c374 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) c364: e3770001 cmn r7, #1 c368: 0a000003 beq c37c if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; c36c: e5857000 str r7, [r5] #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; c370: e3a00000 mov r0, #0 } c374: e28dd004 add sp, sp, #4 c378: e8bd80f0 pop {r4, r5, r6, r7, pc} return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) c37c: eb000bb8 bl f264 <__errno> <== NOT EXECUTED c380: e5903000 ldr r3, [r0] <== NOT EXECUTED c384: e3530022 cmp r3, #34 ; 0x22 <== NOT EXECUTED return RTEMS_INVALID_NUMBER; c388: 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)) c38c: 1afffff6 bne c36c <== NOT EXECUTED c390: eafffff7 b c374 <== NOT EXECUTED =============================================================================== 00001ed4 : int rtems_tarfs_load( char *mountpoint, uint8_t *tar_image, size_t tar_size ) { 1ed4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 1ed8: e24ddf6a sub sp, sp, #424 ; 0x1a8 1edc: e1a06001 mov r6, r1 1ee0: e1a07002 mov r7, r2 1ee4: e58d0014 str r0, [sp, #20] int offset; unsigned long nblocks; IMFS_jnode_t *node; int status; status = rtems_filesystem_evaluate_path( 1ee8: eb0043c8 bl 12e10 1eec: e28d2e19 add r2, sp, #400 ; 0x190 1ef0: e1a01000 mov r1, r0 1ef4: e58d2008 str r2, [sp, #8] 1ef8: e59d0014 ldr r0, [sp, #20] 1efc: e3a02000 mov r2, #0 1f00: e28d3e19 add r3, sp, #400 ; 0x190 1f04: e58d2000 str r2, [sp] 1f08: eb0002c0 bl 2a10 strlen(mountpoint), 0, &root_loc, 0 ); if (status != 0) 1f0c: e3500000 cmp r0, #0 return -1; 1f10: 13e02000 mvnne r2, #0 strlen(mountpoint), 0, &root_loc, 0 ); if (status != 0) 1f14: e58d0010 str r0, [sp, #16] return -1; 1f18: 158d2010 strne r2, [sp, #16] strlen(mountpoint), 0, &root_loc, 0 ); if (status != 0) 1f1c: 1a000032 bne 1fec return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) 1f20: e59d319c ldr r3, [sp, #412] ; 0x19c 1f24: e59f21d4 ldr r2, [pc, #468] ; 2100 1f28: e1530002 cmp r3, r2 1f2c: 059da010 ldreq sl, [sp, #16] 1f30: 1a00006b bne 20e4 /* * Create an IMFS node structure pointing to tar image memory. */ offset = 0; while (1) { if (offset + 512 > tar_size) 1f34: e28a4c02 add r4, sl, #512 ; 0x200 * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; 1f38: e28d3f5f add r3, sp, #380 ; 0x17c /* * Create an IMFS node structure pointing to tar image memory. */ offset = 0; while (1) { if (offset + 512 > tar_size) 1f3c: e1540007 cmp r4, r7 hdr_ptr = (char *) &tar_image[offset]; offset += 512; if (strncmp(&hdr_ptr[257], "ustar", 5)) break; strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); 1f40: e28d5f46 add r5, sp, #280 ; 0x118 * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; 1f44: e58d3004 str r3, [sp, #4] /* * Create an IMFS node structure pointing to tar image memory. */ offset = 0; while (1) { if (offset + 512 > tar_size) 1f48: 8a000027 bhi 1fec break; /* * Read a header. */ hdr_ptr = (char *) &tar_image[offset]; 1f4c: e086a00a add sl, r6, sl offset += 512; if (strncmp(&hdr_ptr[257], "ustar", 5)) 1f50: e28a0c01 add r0, sl, #256 ; 0x100 1f54: e2800001 add r0, r0, #1 1f58: e59f11a4 ldr r1, [pc, #420] ; 2104 1f5c: e3a02005 mov r2, #5 1f60: eb0043c2 bl 12e70 1f64: e2508000 subs r8, r0, #0 1f68: 1a00001f bne 1fec break; strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); 1f6c: e3a02063 mov r2, #99 ; 0x63 1f70: e1a0100a mov r1, sl 1f74: e1a00005 mov r0, r5 1f78: eb00441d bl 12ff4 filename[MAX_NAME_FIELD_SIZE] = '\0'; 1f7c: e5cd817b strb r8, [sp, #379] ; 0x17b linkflag = hdr_ptr[156]; file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8); 1f80: e3a01008 mov r1, #8 1f84: e28a0064 add r0, sl, #100 ; 0x64 break; strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); filename[MAX_NAME_FIELD_SIZE] = '\0'; linkflag = hdr_ptr[156]; 1f88: e5dab09c ldrb fp, [sl, #156] ; 0x9c file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8); 1f8c: eb001fee bl 9f4c <_rtems_octal2ulong> file_size = _rtems_octal2ulong(&hdr_ptr[124], 12); 1f90: 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); 1f94: e1a09000 mov r9, r0 file_size = _rtems_octal2ulong(&hdr_ptr[124], 12); 1f98: e28a007c add r0, sl, #124 ; 0x7c 1f9c: eb001fea bl 9f4c <_rtems_octal2ulong> hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8); 1fa0: 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); 1fa4: e1a08000 mov r8, r0 hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8); 1fa8: e28a0094 add r0, sl, #148 ; 0x94 1fac: eb001fe6 bl 9f4c <_rtems_octal2ulong> 1fb0: e1a03000 mov r3, r0 if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum) 1fb4: e1a0000a mov r0, sl 1fb8: e58d300c str r3, [sp, #12] 1fbc: eb0020ef bl a380 <_rtems_tar_header_checksum> 1fc0: e59d300c ldr r3, [sp, #12] 1fc4: e1500003 cmp r0, r3 1fc8: 1a000007 bne 1fec * 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) { 1fcc: e35b0035 cmp fp, #53 ; 0x35 1fd0: 0a00001a beq 2040 * 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) { 1fd4: e35b0030 cmp fp, #48 ; 0x30 1fd8: 0a000006 beq 1ff8 0 ); if (status != 0) return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) 1fdc: e1a0a004 mov sl, r4 /* * Create an IMFS node structure pointing to tar image memory. */ offset = 0; while (1) { if (offset + 512 > tar_size) 1fe0: e28a4c02 add r4, sl, #512 ; 0x200 1fe4: e1540007 cmp r4, r7 1fe8: 9affffd7 bls 1f4c nblocks = (((file_size) + 511) & ~511) / 512; offset += 512 * nblocks; } } return status; } 1fec: e59d0010 ldr r0, [sp, #16] 1ff0: e28ddf6a add sp, sp, #424 ; 0x1a8 1ff4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; 1ff8: e59dc008 ldr ip, [sp, #8] 1ffc: e59de004 ldr lr, [sp, #4] 2000: e8bc000f ldm ip!, {r0, r1, r2, r3} 2004: e8ae000f stmia lr!, {r0, r1, r2, r3} 2008: e59cc000 ldr ip, [ip] if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { 200c: e1a00005 mov r0, r5 2010: e28d1f5f add r1, sp, #380 ; 0x17c 2014: e28d2f69 add r2, sp, #420 ; 0x1a4 * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; 2018: e58ec000 str ip, [lr] if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { 201c: eb00230a bl ac4c 2020: e250a000 subs sl, r0, #0 2024: 0a00001d beq 20a0 ); node->info.linearfile.size = file_size; node->info.linearfile.direct = &tar_image[offset]; } nblocks = (((file_size) + 511) & ~511) / 512; 2028: e2888f7f add r8, r8, #508 ; 0x1fc <== NOT EXECUTED 202c: e2888003 add r8, r8, #3 <== NOT EXECUTED 2030: e1a084a8 lsr r8, r8, #9 <== NOT EXECUTED offset += 512 * nblocks; 2034: e0844488 add r4, r4, r8, lsl #9 <== NOT EXECUTED 0 ); if (status != 0) return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) 2038: e1a0a004 mov sl, r4 203c: eaffffe7 b 1fe0 * - 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); 2040: e59d1014 ldr r1, [sp, #20] 2044: e28d0018 add r0, sp, #24 2048: eb0041ac bl 12700 if (full_filename[strlen(full_filename)-1] != '/') 204c: e28d0018 add r0, sp, #24 2050: eb00436e bl 12e10 2054: e28def6a add lr, sp, #424 ; 0x1a8 2058: e08e3000 add r3, lr, r0 205c: e5533191 ldrb r3, [r3, #-401] ; 0x191 2060: e353002f cmp r3, #47 ; 0x2f 2064: 0a000004 beq 207c strcat(full_filename, "/"); 2068: e28d2018 add r2, sp, #24 <== NOT EXECUTED 206c: e0820000 add r0, r2, r0 <== NOT EXECUTED 2070: e59f1090 ldr r1, [pc, #144] ; 2108 <== NOT EXECUTED 2074: e3a02002 mov r2, #2 <== NOT EXECUTED 2078: eb003e89 bl 11aa4 <== NOT EXECUTED strcat(full_filename, filename); 207c: e1a01005 mov r1, r5 2080: e28d0018 add r0, sp, #24 2084: eb0040e6 bl 12424 mkdir(full_filename, S_IRWXU | S_IRWXG | S_IRWXO); 2088: e3a01f7f mov r1, #508 ; 0x1fc 208c: e28d0018 add r0, sp, #24 2090: e2811003 add r1, r1, #3 2094: eb0004c0 bl 339c 0 ); if (status != 0) return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) 2098: e1a0a004 mov sl, r4 209c: eaffffcf b 1fe0 loc = root_loc; if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { node = IMFS_create_node( &loc, IMFS_LINEAR_FILE, (char *)name, (file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG, 20a0: e1a03b89 lsl r3, r9, #23 20a4: 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( 20a8: e3833902 orr r3, r3, #32768 ; 0x8000 20ac: e3a01006 mov r1, #6 20b0: e28d0f5f add r0, sp, #380 ; 0x17c 20b4: e59d21a4 ldr r2, [sp, #420] ; 0x1a4 20b8: e58da000 str sl, [sp] 20bc: eb002133 bl a590 &loc, IMFS_LINEAR_FILE, (char *)name, (file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG, NULL ); node->info.linearfile.size = file_size; 20c0: e5808050 str r8, [r0, #80] ; 0x50 node->info.linearfile.direct = &tar_image[offset]; } nblocks = (((file_size) + 511) & ~511) / 512; 20c4: e2888f7f add r8, r8, #508 ; 0x1fc 20c8: e2888003 add r8, r8, #3 IMFS_LINEAR_FILE, (char *)name, (file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG, NULL ); node->info.linearfile.size = file_size; node->info.linearfile.direct = &tar_image[offset]; 20cc: e0863004 add r3, r6, r4 } nblocks = (((file_size) + 511) & ~511) / 512; 20d0: e1a084a8 lsr r8, r8, #9 &loc, IMFS_LINEAR_FILE, (char *)name, (file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG, NULL ); node->info.linearfile.size = file_size; 20d4: e580a054 str sl, [r0, #84] ; 0x54 node->info.linearfile.direct = &tar_image[offset]; 20d8: e5803058 str r3, [r0, #88] ; 0x58 } nblocks = (((file_size) + 511) & ~511) / 512; offset += 512 * nblocks; 20dc: e0844488 add r4, r4, r8, lsl #9 20e0: eaffffd4 b 2038 0 ); if (status != 0) return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) 20e4: e59f2020 ldr r2, [pc, #32] ; 210c 20e8: e1530002 cmp r3, r2 20ec: 01a0a000 moveq sl, r0 20f0: 0affff8f beq 1f34 return -1; 20f4: e3e03000 mvn r3, #0 20f8: e58d3010 str r3, [sp, #16] 20fc: eaffffba b 1fec =============================================================================== 0000daa8 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { daa8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) daac: e2525000 subs r5, r2, #0 rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { dab0: e1a04000 mov r4, r0 dab4: e1a06001 mov r6, r1 bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; dab8: 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 ) dabc: 08bd8ff0 popeq {r4, r5, r6, r7, r8, r9, sl, fp, pc} return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; dac0: e59f9148 ldr r9, [pc, #328] ; dc10 dac4: e5997004 ldr r7, [r9, #4] api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; dac8: e5d7a074 ldrb sl, [r7, #116] ; 0x74 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; dacc: e59780f8 ldr r8, [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 ) dad0: 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; dad4: e35a0000 cmp sl, #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; dad8: e5d8b008 ldrb fp, [r8, #8] executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; dadc: 03a0ac01 moveq sl, #256 ; 0x100 dae0: 13a0a000 movne sl, #0 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) dae4: e3530000 cmp r3, #0 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; dae8: 138aac02 orrne sl, sl, #512 ; 0x200 old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; daec: e35b0000 cmp fp, #0 daf0: 03a0bb01 moveq fp, #1024 ; 0x400 daf4: 13a0b000 movne fp, #0 old_mode |= _ISR_Get_level(); daf8: ebffee78 bl 94e0 <_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; dafc: e18bb000 orr fp, fp, r0 old_mode |= _ISR_Get_level(); db00: e18ba00a orr sl, fp, sl *previous_mode_set = old_mode; /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) db04: e3160c01 tst r6, #256 ; 0x100 old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; db08: e585a000 str sl, [r5] /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) db0c: 0a000003 beq db20 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; db10: e3140c01 tst r4, #256 ; 0x100 db14: 13a03000 movne r3, #0 db18: 03a03001 moveq r3, #1 db1c: e5c73074 strb r3, [r7, #116] ; 0x74 if ( mask & RTEMS_TIMESLICE_MASK ) { db20: e3160c02 tst r6, #512 ; 0x200 db24: 1a000028 bne dbcc } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) db28: e3160080 tst r6, #128 ; 0x80 db2c: 1a00002f bne dbf0 * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { db30: e2166b01 ands r6, r6, #1024 ; 0x400 db34: 0a000012 beq db84 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( db38: 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 ) { db3c: e5d82008 ldrb r2, [r8, #8] * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( db40: 13a03000 movne r3, #0 db44: 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 ) { db48: e1520003 cmp r2, r3 /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; db4c: 03a06000 moveq r6, #0 if ( mask & RTEMS_ASR_MASK ) { is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { db50: 0a00000b beq db84 asr->is_enabled = is_asr_enabled; db54: e5c83008 strb r3, [r8, #8] static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( db58: e10f3000 mrs r3, CPSR db5c: e3832080 orr r2, r3, #128 ; 0x80 db60: e129f002 msr CPSR_fc, r2 { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); _signals = information->signals_pending; db64: e5981018 ldr r1, [r8, #24] information->signals_pending = information->signals_posted; db68: e5982014 ldr r2, [r8, #20] information->signals_posted = _signals; db6c: e5881014 str r1, [r8, #20] rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); _signals = information->signals_pending; information->signals_pending = information->signals_posted; db70: e5882018 str r2, [r8, #24] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( db74: e129f003 msr CPSR_fc, r3 _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { db78: e5986014 ldr r6, [r8, #20] db7c: e3560000 cmp r6, #0 /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; db80: 13a06001 movne r6, #1 needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { db84: e59f3088 ldr r3, [pc, #136] ; dc14 db88: e5933000 ldr r3, [r3] db8c: e3530003 cmp r3, #3 if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; db90: 13a00000 movne r0, #0 needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { db94: 18bd8ff0 popne {r4, r5, r6, r7, r8, r9, sl, fp, pc} { Thread_Control *executing; executing = _Thread_Executing; if ( are_signals_pending || db98: e3560000 cmp r6, #0 bool are_signals_pending ) { Thread_Control *executing; executing = _Thread_Executing; db9c: e5993004 ldr r3, [r9, #4] if ( are_signals_pending || dba0: 1a000015 bne dbfc dba4: e59f2064 ldr r2, [pc, #100] ; dc10 dba8: e5922008 ldr r2, [r2, #8] dbac: e1530002 cmp r3, r2 if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; dbb0: 01a00006 moveq r0, r6 dbb4: 08bd8ff0 popeq {r4, r5, r6, r7, r8, r9, sl, fp, pc} (!_Thread_Is_heir( executing ) && executing->is_preemptible) ) { dbb8: e5d33074 ldrb r3, [r3, #116] ; 0x74 dbbc: e3530000 cmp r3, #0 dbc0: 1a00000d bne dbfc dbc4: e1a00006 mov r0, r6 <== NOT EXECUTED } dbc8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED */ if ( mask & RTEMS_PREEMPT_MASK ) executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; if ( mask & RTEMS_TIMESLICE_MASK ) { if ( _Modes_Is_timeslice(mode_set) ) { dbcc: e2143c02 ands r3, r4, #512 ; 0x200 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice; dbd0: 159f3040 ldrne r3, [pc, #64] ; dc18 dbd4: 15933000 ldrne r3, [r3] if ( mask & RTEMS_PREEMPT_MASK ) executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; if ( mask & RTEMS_TIMESLICE_MASK ) { if ( _Modes_Is_timeslice(mode_set) ) { executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; dbd8: 13a02001 movne r2, #1 dbdc: 1587207c strne r2, [r7, #124] ; 0x7c executing->cpu_time_budget = _Thread_Ticks_per_timeslice; dbe0: 15873078 strne r3, [r7, #120] ; 0x78 } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; dbe4: 0587307c streq r3, [r7, #124] ; 0x7c } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) dbe8: e3160080 tst r6, #128 ; 0x80 dbec: 0affffcf beq db30 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); dbf0: e2040080 and r0, r4, #128 ; 0x80 dbf4: ebffee34 bl 94cc <_CPU_ISR_Set_level> dbf8: eaffffcc b db30 _Thread_Dispatch_necessary = true; dbfc: e3a03001 mov r3, #1 dc00: e5c93010 strb r3, [r9, #16] } } if ( _System_state_Is_up( _System_state_Get() ) ) { if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); dc04: ebffe854 bl 7d5c <_Thread_Dispatch> } return RTEMS_SUCCESSFUL; dc08: e3a00000 mov r0, #0 dc0c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 00003804 : } } rtems_status_code rtems_termios_close (void *arg) { 3804: e92d4070 push {r4, r5, r6, lr} rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; rtems_status_code sc; sc = rtems_semaphore_obtain( 3808: e59f51a4 ldr r5, [pc, #420] ; 39b4 rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 380c: e5903000 ldr r3, [r0] rtems_status_code sc; sc = rtems_semaphore_obtain( 3810: e3a01000 mov r1, #0 } } rtems_status_code rtems_termios_close (void *arg) { 3814: e1a06000 mov r6, r0 rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; rtems_status_code sc; sc = rtems_semaphore_obtain( 3818: e1a02001 mov r2, r1 381c: e5950000 ldr r0, [r5] rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 3820: e5934034 ldr r4, [r3, #52] ; 0x34 rtems_status_code sc; sc = rtems_semaphore_obtain( 3824: eb000889 bl 5a50 rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 3828: e3500000 cmp r0, #0 382c: 1a00005f bne 39b0 rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 3830: e5943008 ldr r3, [r4, #8] 3834: e2433001 sub r3, r3, #1 3838: e3530000 cmp r3, #0 383c: e5843008 str r3, [r4, #8] 3840: 1a00002f bne 3904 if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 3844: e59420cc ldr r2, [r4, #204] ; 0xcc 3848: e59f3168 ldr r3, [pc, #360] ; 39b8 384c: e0833282 add r3, r3, r2, lsl #5 3850: e5931004 ldr r1, [r3, #4] 3854: e3510000 cmp r1, #0 3858: 0a00003e beq 3958 /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 385c: e1a00004 mov r0, r4 3860: e1a0e00f mov lr, pc 3864: e12fff11 bx r1 } drainOutput (tty); rtems_semaphore_release (tty->osem); } if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 3868: e59430b4 ldr r3, [r4, #180] ; 0xb4 386c: e3530002 cmp r3, #2 3870: 0a000044 beq 3988 rtems_fatal_error_occurred (sc); sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT ); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if (tty->device.lastClose) 3874: e594309c ldr r3, [r4, #156] ; 0x9c 3878: e3530000 cmp r3, #0 (*tty->device.lastClose)(tty->major, tty->minor, arg); 387c: 1284000c addne r0, r4, #12 3880: 18900003 ldmne r0, {r0, r1} 3884: 11a02006 movne r2, r6 3888: 11a0e00f movne lr, pc 388c: 112fff13 bxne r3 if (tty->forw == NULL) { 3890: e5943000 ldr r3, [r4] 3894: e3530000 cmp r3, #0 3898: 0a000026 beq 3938 rtems_termios_ttyTail = tty->back; if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; } } else { tty->forw->back = tty->back; 389c: e5942004 ldr r2, [r4, #4] 38a0: e5832004 str r2, [r3, #4] 38a4: e5942004 ldr r2, [r4, #4] } if (tty->back == NULL) { 38a8: e3520000 cmp r2, #0 38ac: 0a00001b beq 3920 rtems_termios_ttyHead = tty->forw; if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; } } else { tty->back->forw = tty->forw; 38b0: e5823000 str r3, [r2] } rtems_semaphore_delete (tty->isem); 38b4: e5940014 ldr r0, [r4, #20] 38b8: eb00083b bl 59ac rtems_semaphore_delete (tty->osem); 38bc: e5940018 ldr r0, [r4, #24] 38c0: eb000839 bl 59ac rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 38c4: e594008c ldr r0, [r4, #140] ; 0x8c 38c8: eb000837 bl 59ac if ((tty->device.pollRead == NULL) || 38cc: e59430a0 ldr r3, [r4, #160] ; 0xa0 38d0: e3530000 cmp r3, #0 38d4: 0a00000e beq 3914 38d8: e59430b4 ldr r3, [r4, #180] ; 0xb4 38dc: e3530002 cmp r3, #2 38e0: 0a00000b beq 3914 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore); free (tty->rawInBuf.theBuf); 38e4: e5940058 ldr r0, [r4, #88] ; 0x58 38e8: ebfffa9f bl 236c free (tty->rawOutBuf.theBuf); 38ec: e594007c ldr r0, [r4, #124] ; 0x7c 38f0: ebfffa9d bl 236c free (tty->cbuf); 38f4: e594001c ldr r0, [r4, #28] 38f8: ebfffa9b bl 236c free (tty); 38fc: e1a00004 mov r0, r4 3900: ebfffa99 bl 236c } rtems_semaphore_release (rtems_termios_ttyMutex); 3904: e5950000 ldr r0, [r5] 3908: eb000899 bl 5b74 return RTEMS_SUCCESSFUL; } 390c: e3a00000 mov r0, #0 3910: e8bd8070 pop {r4, r5, r6, pc} rtems_semaphore_delete (tty->isem); rtems_semaphore_delete (tty->osem); rtems_semaphore_delete (tty->rawOutBuf.Semaphore); if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore); 3914: e5940068 ldr r0, [r4, #104] ; 0x68 3918: eb000823 bl 59ac 391c: eafffff0 b 38e4 } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; 3920: e59f2094 ldr r2, [pc, #148] ; 39bc if ( rtems_termios_ttyHead != NULL ) { 3924: e3530000 cmp r3, #0 } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; 3928: e5823000 str r3, [r2] if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; 392c: 13a02000 movne r2, #0 3930: 15832004 strne r2, [r3, #4] 3934: eaffffde b 38b4 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; 3938: e5942004 ldr r2, [r4, #4] 393c: e59f107c ldr r1, [pc, #124] ; 39c0 if ( rtems_termios_ttyTail != NULL ) { 3940: e3520000 cmp r2, #0 rtems_fatal_error_occurred (sc); } if (tty->device.lastClose) (*tty->device.lastClose)(tty->major, tty->minor, arg); if (tty->forw == NULL) { rtems_termios_ttyTail = tty->back; 3944: e5812000 str r2, [r1] if ( rtems_termios_ttyTail != NULL ) { 3948: 0afffff4 beq 3920 rtems_termios_ttyTail->forw = NULL; 394c: e5823000 str r3, [r2] 3950: e5943000 ldr r3, [r4] 3954: eaffffd5 b 38b0 sc = rtems_termios_linesw[tty->t_line].l_close(tty); } else { /* * default: just flush output buffer */ sc = rtems_semaphore_obtain(tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 3958: e5940018 ldr r0, [r4, #24] 395c: e1a02001 mov r2, r1 3960: eb00083a bl 5a50 if (sc != RTEMS_SUCCESSFUL) { 3964: e3500000 cmp r0, #0 3968: 1a000010 bne 39b0 rtems_fatal_error_occurred (sc); } drainOutput (tty); 396c: e1a00004 mov r0, r4 3970: ebfffe4e bl 32b0 rtems_semaphore_release (tty->osem); 3974: e5940018 ldr r0, [r4, #24] 3978: eb00087d bl 5b74 } if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 397c: e59430b4 ldr r3, [r4, #180] ; 0xb4 3980: e3530002 cmp r3, #2 3984: 1affffba bne 3874 /* * send "terminate" to I/O tasks */ sc = rtems_event_send( tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT ); 3988: e59400c4 ldr r0, [r4, #196] ; 0xc4 398c: e3a01001 mov r1, #1 3990: eb000707 bl 55b4 if (sc != RTEMS_SUCCESSFUL) 3994: e3500000 cmp r0, #0 3998: 1a000004 bne 39b0 rtems_fatal_error_occurred (sc); sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT ); 399c: e59400c8 ldr r0, [r4, #200] ; 0xc8 39a0: e3a01001 mov r1, #1 39a4: eb000702 bl 55b4 if (sc != RTEMS_SUCCESSFUL) 39a8: e3500000 cmp r0, #0 39ac: 0affffb0 beq 3874 rtems_fatal_error_occurred (sc); 39b0: eb0009cf bl 60f4 <== NOT EXECUTED =============================================================================== 00004fb8 : rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 4fb8: e590c090 ldr ip, [r0, #144] ; 0x90 if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 4fbc: e59020b4 ldr r2, [r0, #180] ; 0xb4 rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 4fc0: e08c1001 add r1, ip, r1 if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 4fc4: e3520002 cmp r2, #2 * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 4fc8: e52de004 push {lr} ; (str lr, [sp, #-4]!) rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 4fcc: e5801090 str r1, [r0, #144] ; 0x90 if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 4fd0: 0a00000c beq 5008 if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); return 0; /* nothing to output in IRQ... */ } if (tty->t_line == PPPDISC ) { 4fd4: e59030cc ldr r3, [r0, #204] ; 0xcc 4fd8: e3530005 cmp r3, #5 4fdc: 0a000001 beq 4fe8 } return 0; /* nothing to output in IRQ... */ } return rtems_termios_refill_transmitter(tty); } 4fe0: 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); 4fe4: eaffff55 b 4d40 if (tty->t_line == PPPDISC ) { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 4fe8: e59f303c ldr r3, [pc, #60] ; 502c 4fec: e59330b4 ldr r3, [r3, #180] ; 0xb4 4ff0: e3530000 cmp r3, #0 4ff4: 0a00000a beq 5024 rtems_termios_linesw[tty->t_line].l_start(tty); 4ff8: e1a0e00f mov lr, pc 4ffc: e12fff13 bx r3 } return 0; /* nothing to output in IRQ... */ 5000: e3a00000 mov r0, #0 5004: e49df004 pop {pc} ; (ldr pc, [sp], #4) if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, TERMIOS_TX_START_EVENT); 5008: e59000c8 ldr r0, [r0, #200] ; 0xc8 500c: e1a01002 mov r1, r2 5010: eb000167 bl 55b4 if (sc != RTEMS_SUCCESSFUL) 5014: e2503000 subs r3, r0, #0 rtems_fatal_error_occurred (sc); return 0; /* nothing to output in IRQ... */ 5018: 01a00003 moveq r0, r3 if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) 501c: 049df004 popeq {pc} ; (ldreq pc, [sp], #4) rtems_fatal_error_occurred (sc); 5020: eb000433 bl 60f4 * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { rtems_termios_linesw[tty->t_line].l_start(tty); } return 0; /* nothing to output in IRQ... */ 5024: e1a00003 mov r0, r3 <== NOT EXECUTED } return rtems_termios_refill_transmitter(tty); } 5028: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== 000049c0 : * 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) { 49c0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { 49c4: e59030cc ldr r3, [r0, #204] ; 0xcc 49c8: e59f72e0 ldr r7, [pc, #736] ; 4cb0 49cc: e0873283 add r3, r7, r3, lsl #5 49d0: e5939010 ldr r9, [r3, #16] 49d4: 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) { 49d8: e24dd008 sub sp, sp, #8 49dc: e1a04000 mov r4, r0 49e0: e1a05001 mov r5, r1 49e4: e1a06002 mov r6, r2 char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { 49e8: 0a00001e beq 4a68 while (len--) { 49ec: e3520000 cmp r2, #0 49f0: 0a00000b beq 4a24 49f4: e3a08000 mov r8, #0 49f8: ea000002 b 4a08 49fc: e59430cc ldr r3, [r4, #204] ; 0xcc 4a00: e0873283 add r3, r7, r3, lsl #5 4a04: e5939010 ldr r9, [r3, #16] c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 4a08: e7d50008 ldrb r0, [r5, r8] 4a0c: e1a01004 mov r1, r4 4a10: e2888001 add r8, r8, #1 4a14: e1a0e00f mov lr, pc 4a18: e12fff19 bx r9 int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { 4a1c: e1580006 cmp r8, r6 4a20: 1afffff5 bne 49fc } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 4a24: e594a0e4 ldr sl, [r4, #228] ; 0xe4 4a28: e35a0000 cmp sl, #0 (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); tty->tty_rcvwakeup = 1; } return 0; 4a2c: 13a0a000 movne sl, #0 } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 4a30: 1a000009 bne 4a5c 4a34: e59430dc ldr r3, [r4, #220] ; 0xdc 4a38: e3530000 cmp r3, #0 (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); tty->tty_rcvwakeup = 1; } return 0; 4a3c: 01a0a003 moveq sl, r3 } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 4a40: 0a000005 beq 4a5c (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 4a44: e2840030 add r0, r4, #48 ; 0x30 4a48: e59410e0 ldr r1, [r4, #224] ; 0xe0 4a4c: e1a0e00f mov lr, pc 4a50: e12fff13 bx r3 tty->tty_rcvwakeup = 1; 4a54: e3a03001 mov r3, #1 4a58: e58430e4 str r3, [r4, #228] ; 0xe4 } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; } 4a5c: e1a0000a mov r0, sl 4a60: e28dd008 add sp, sp, #8 4a64: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 4a68: e2803030 add r3, r0, #48 ; 0x30 4a6c: e58d3000 str r3, [sp] tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 4a70: e3560000 cmp r6, #0 if ((tty->flow_ctrl & FL_OSTOP) || (tty->rawOutBufState == rob_idle)) { /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; (*tty->device.write)(tty->minor, 4a74: e280304a add r3, r0, #74 ; 0x4a 4a78: e58d3004 str r3, [sp, #4] 4a7c: e1a0b009 mov fp, r9 tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 4a80: 0a000044 beq 4b98 c = *buf++; /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 4a84: e59430b8 ldr r3, [r4, #184] ; 0xb8 4a88: e3130c02 tst r3, #512 ; 0x200 } return 0; } while (len--) { c = *buf++; 4a8c: e4d58001 ldrb r8, [r5], #1 /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 4a90: 0a000005 beq 4aac /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 4a94: e5d4304a ldrb r3, [r4, #74] ; 0x4a 4a98: e1530008 cmp r3, r8 4a9c: 0a000058 beq 4c04 /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 4aa0: e5d43049 ldrb r3, [r4, #73] ; 0x49 4aa4: e1530008 cmp r3, r8 4aa8: 0a000041 beq 4bb4 /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; flow_rcv = true; } } if (flow_rcv) { 4aac: e3590000 cmp r9, #0 4ab0: 1a000043 bne 4bc4 } /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 4ab4: e5940060 ldr r0, [r4, #96] ; 0x60 4ab8: e5941064 ldr r1, [r4, #100] ; 0x64 4abc: e2800001 add r0, r0, #1 4ac0: eb003326 bl 11760 <__umodsi3> 4ac4: e1a07000 mov r7, r0 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 4ac8: e10fa000 mrs sl, CPSR 4acc: e38a3080 orr r3, sl, #128 ; 0x80 4ad0: e129f003 msr CPSR_fc, r3 /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 4ad4: e594305c ldr r3, [r4, #92] ; 0x5c 4ad8: e5940064 ldr r0, [r4, #100] ; 0x64 4adc: e0630000 rsb r0, r3, r0 % tty->rawInBuf.Size) > tty->highwater) && 4ae0: e5941064 ldr r1, [r4, #100] ; 0x64 4ae4: e0800007 add r0, r0, r7 4ae8: eb00331c bl 11760 <__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) 4aec: e59430c0 ldr r3, [r4, #192] ; 0xc0 4af0: e1500003 cmp r0, r3 4af4: 9a000010 bls 4b3c % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { 4af8: 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) && 4afc: e3130001 tst r3, #1 <== NOT EXECUTED 4b00: 1a00000d bne 4b3c <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; 4b04: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 4b08: e3833001 orr r3, r3, #1 <== NOT EXECUTED 4b0c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 4b10: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 4b14: e3c33fff bic r3, r3, #1020 ; 0x3fc <== NOT EXECUTED 4b18: e3c33001 bic r3, r3, #1 <== NOT EXECUTED 4b1c: e1a03a83 lsl r3, r3, #21 <== NOT EXECUTED 4b20: e1a03aa3 lsr r3, r3, #21 <== NOT EXECUTED 4b24: e3530b01 cmp r3, #1024 ; 0x400 <== NOT EXECUTED 4b28: 0a000047 beq 4c4c <== NOT EXECUTED /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) { 4b2c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 4b30: e2033f41 and r3, r3, #260 ; 0x104 <== NOT EXECUTED 4b34: e3530c01 cmp r3, #256 ; 0x100 <== NOT EXECUTED 4b38: 0a000052 beq 4c88 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 4b3c: e129f00a msr CPSR_fc, sl } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { 4b40: e594305c ldr r3, [r4, #92] ; 0x5c 4b44: e1530007 cmp r3, r7 dropped++; 4b48: 028bb001 addeq fp, fp, #1 } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { 4b4c: 0a00000e beq 4b8c dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; 4b50: e5943058 ldr r3, [r4, #88] ; 0x58 4b54: e7c38007 strb r8, [r3, r7] tty->rawInBuf.Tail = newTail; /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 4b58: e59430e4 ldr r3, [r4, #228] ; 0xe4 4b5c: e3530000 cmp r3, #0 if (newTail == tty->rawInBuf.Head) { dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; tty->rawInBuf.Tail = newTail; 4b60: 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 )) { 4b64: 1a000008 bne 4b8c 4b68: e59430dc ldr r3, [r4, #220] ; 0xdc 4b6c: e3530000 cmp r3, #0 4b70: 0a000005 beq 4b8c (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 4b74: e59d0000 ldr r0, [sp] <== NOT EXECUTED 4b78: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED 4b7c: e1a0e00f mov lr, pc <== NOT EXECUTED 4b80: e12fff13 bx r3 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 4b84: e3a03001 mov r3, #1 <== NOT EXECUTED 4b88: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED 4b8c: e2466001 sub r6, r6, #1 tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 4b90: e3560000 cmp r6, #0 4b94: 1affffba bne 4a84 } } } } tty->rawInBufDropped += dropped; 4b98: e5943078 ldr r3, [r4, #120] ; 0x78 4b9c: e083300b add r3, r3, fp 4ba0: e5843078 str r3, [r4, #120] ; 0x78 rtems_semaphore_release (tty->rawInBuf.Semaphore); 4ba4: e5940068 ldr r0, [r4, #104] ; 0x68 4ba8: e1a0a00b mov sl, fp 4bac: eb0003f0 bl 5b74 return dropped; 4bb0: eaffffa9 b 4a5c flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 4bb4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 4bb8: e3c33010 bic r3, r3, #16 <== NOT EXECUTED 4bbc: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { 4bc0: e3a09001 mov r9, #1 <== NOT EXECUTED flow_rcv = true; } } if (flow_rcv) { /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 4bc4: e59430b8 ldr r3, [r4, #184] ; 0xb8 4bc8: e2033030 and r3, r3, #48 ; 0x30 4bcc: e3530020 cmp r3, #32 4bd0: 1affffed bne 4b8c static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 4bd4: e10f7000 mrs r7, CPSR <== NOT EXECUTED 4bd8: e3873080 orr r3, r7, #128 ; 0x80 <== NOT EXECUTED 4bdc: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; 4be0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 4be4: e5942094 ldr r2, [r4, #148] ; 0x94 <== NOT EXECUTED if (flow_rcv) { /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; 4be8: e3c33020 bic r3, r3, #32 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 4bec: e3520000 cmp r2, #0 <== NOT EXECUTED if (flow_rcv) { /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; 4bf0: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 4bf4: 1a00000c bne 4c2c <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 4bf8: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); tty->tty_rcvwakeup = 1; 4bfc: e2466001 sub r6, r6, #1 <== NOT EXECUTED 4c00: eaffffe2 b 4b90 <== NOT EXECUTED /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { if (c == tty->termios.c_cc[VSTART]) { 4c04: e5d42049 ldrb r2, [r4, #73] ; 0x49 4c08: e1520003 cmp r2, r3 /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 4c0c: 059430b8 ldreq r3, [r4, #184] ; 0xb8 } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 4c10: 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; 4c14: 02233010 eoreq r3, r3, #16 } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 4c18: 13833010 orrne r3, r3, #16 /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { if (c == tty->termios.c_cc[VSTART]) { /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 4c1c: 058430b8 streq r3, [r4, #184] ; 0xb8 } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 4c20: 158430b8 strne r3, [r4, #184] ; 0xb8 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--) { 4c24: e3a09001 mov r9, #1 4c28: eaffffe5 b 4bc4 tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)( tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); 4c2c: 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)( 4c30: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED 4c34: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 4c38: e0811003 add r1, r1, r3 <== NOT EXECUTED 4c3c: e3a02001 mov r2, #1 <== NOT EXECUTED 4c40: e1a0e00f mov lr, pc <== NOT EXECUTED 4c44: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 4c48: eaffffea b 4bf8 <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) == (FL_MDXOF ) ) { if ((tty->flow_ctrl & FL_OSTOP) || 4c4c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 4c50: e3130020 tst r3, #32 <== NOT EXECUTED 4c54: 1a000002 bne 4c64 <== NOT EXECUTED 4c58: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 4c5c: e3530000 cmp r3, #0 <== NOT EXECUTED 4c60: 1affffb5 bne 4b3c <== 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; 4c64: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 4c68: e3833002 orr r3, r3, #2 <== NOT EXECUTED 4c6c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED (*tty->device.write)(tty->minor, 4c70: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 4c74: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED 4c78: e3a02001 mov r2, #1 <== NOT EXECUTED 4c7c: e1a0e00f mov lr, pc <== NOT EXECUTED 4c80: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 4c84: eaffffac b 4b3c <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) { tty->flow_ctrl |= FL_IRTSOFF; 4c88: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 4c8c: e59430ac ldr r3, [r4, #172] ; 0xac <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) { tty->flow_ctrl |= FL_IRTSOFF; 4c90: e3822004 orr r2, r2, #4 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 4c94: e3530000 cmp r3, #0 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) { tty->flow_ctrl |= FL_IRTSOFF; 4c98: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 4c9c: 0affffa6 beq 4b3c <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 4ca0: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 4ca4: e1a0e00f mov lr, pc <== NOT EXECUTED 4ca8: e12fff13 bx r3 <== NOT EXECUTED 4cac: eaffffa2 b 4b3c <== NOT EXECUTED =============================================================================== 000039dc : rtems_status_code rtems_termios_ioctl (void *arg) { rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 39dc: e5902000 ldr r2, [r0] } } rtems_status_code rtems_termios_ioctl (void *arg) { 39e0: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 39e4: e5925034 ldr r5, [r2, #52] ; 0x34 struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; 39e8: e3a03000 mov r3, #0 } } rtems_status_code rtems_termios_ioctl (void *arg) { 39ec: e1a04000 mov r4, r0 rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; 39f0: e580300c str r3, [r0, #12] sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 39f4: e1a01003 mov r1, r3 39f8: e5950018 ldr r0, [r5, #24] 39fc: e1a02003 mov r2, r3 rtems_status_code rtems_termios_ioctl (void *arg) { rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; 3a00: e5947008 ldr r7, [r4, #8] rtems_status_code sc; args->ioctl_return = 0; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 3a04: eb000811 bl 5a50 if (sc != RTEMS_SUCCESSFUL) { 3a08: e2506000 subs r6, r0, #0 3a0c: 1a00000e bne 3a4c args->ioctl_return = sc; return sc; } switch (args->command) { 3a10: e5943004 ldr r3, [r4, #4] 3a14: e3530004 cmp r3, #4 3a18: 0a000006 beq 3a38 3a1c: 8a00000d bhi 3a58 3a20: e3530002 cmp r3, #2 3a24: 0a000020 beq 3aac 3a28: 9a000087 bls 3c4c if (tty->device.setAttributes) (*tty->device.setAttributes)(tty->minor, &tty->termios); break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 3a2c: e1a00005 mov r0, r5 3a30: ebfffe1e bl 32b0 break; 3a34: ea000002 b 3a44 case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; break; case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 3a38: e897000c ldm r7, {r2, r3} 3a3c: e58520dc str r2, [r5, #220] ; 0xdc 3a40: e58530e0 str r3, [r5, #224] ; 0xe0 *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 3a44: e5950018 ldr r0, [r5, #24] 3a48: eb000849 bl 5b74 args->ioctl_return = sc; 3a4c: e584600c str r6, [r4, #12] return sc; } 3a50: e1a00006 mov r0, r6 3a54: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { 3a58: e3a02a46 mov r2, #286720 ; 0x46000 3a5c: e2822e67 add r2, r2, #1648 ; 0x670 3a60: e282213d add r2, r2, #1073741839 ; 0x4000000f 3a64: e1530002 cmp r3, r2 3a68: 0a00006b beq 3c1c 3a6c: 8a000082 bhi 3c7c 3a70: e3530005 cmp r3, #5 3a74: 0a0000a5 beq 3d10 default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 3a78: e59520cc ldr r2, [r5, #204] ; 0xcc 3a7c: e59f3334 ldr r3, [pc, #820] ; 3db8 3a80: e0833282 add r3, r3, r2, lsl #5 3a84: e5933018 ldr r3, [r3, #24] 3a88: e3530000 cmp r3, #0 sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); } else { sc = RTEMS_INVALID_NUMBER; 3a8c: 03a0600a moveq r6, #10 args->ioctl_return = sc; return sc; } switch (args->command) { default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 3a90: 0affffeb beq 3a44 sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 3a94: e1a00005 mov r0, r5 3a98: e1a01004 mov r1, r4 3a9c: e1a0e00f mov lr, pc 3aa0: e12fff13 bx r3 3aa4: e1a06000 mov r6, r0 3aa8: eaffffe5 b 3a44 case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; break; case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 3aac: e594e008 ldr lr, [r4, #8] 3ab0: e2857030 add r7, r5, #48 ; 0x30 3ab4: e8be000f ldm lr!, {r0, r1, r2, r3} 3ab8: e1a0c007 mov ip, r7 3abc: e8ac000f stmia ip!, {r0, r1, r2, r3} 3ac0: e8be000f ldm lr!, {r0, r1, r2, r3} 3ac4: e8ac000f stmia ip!, {r0, r1, r2, r3} /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 3ac8: e59520b8 ldr r2, [r5, #184] ; 0xb8 case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; break; case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 3acc: e59e3000 ldr r3, [lr] /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 3ad0: e3120c02 tst r2, #512 ; 0x200 case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; break; case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 3ad4: 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) && 3ad8: 0a000012 beq 3b28 !(tty->termios.c_iflag & IXON)) { 3adc: e5953030 ldr r3, [r5, #48] ; 0x30 /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 3ae0: e3130b01 tst r3, #1024 ; 0x400 3ae4: 1a00000f bne 3b28 !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 3ae8: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED 3aec: e3c33e21 bic r3, r3, #528 ; 0x210 <== NOT EXECUTED 3af0: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 3af4: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED 3af8: e3130020 tst r3, #32 <== NOT EXECUTED 3afc: 0a000009 beq 3b28 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 3b00: e10f8000 mrs r8, CPSR <== NOT EXECUTED 3b04: e3883080 orr r3, r8, #128 ; 0x80 <== NOT EXECUTED 3b08: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; 3b0c: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 3b10: e5952094 ldr r2, [r5, #148] ; 0x94 <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; 3b14: e3c33020 bic r3, r3, #32 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 3b18: e3520000 cmp r2, #0 <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; 3b1c: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 3b20: 1a00009c bne 3d98 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 3b24: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && !(tty->termios.c_iflag & IXOFF)) { 3b28: e59530b8 ldr r3, [r5, #184] ; 0xb8 3b2c: e3130b01 tst r3, #1024 ; 0x400 3b30: 0a000008 beq 3b58 3b34: e5953030 ldr r3, [r5, #48] ; 0x30 3b38: e3130a01 tst r3, #4096 ; 0x1000 3b3c: 1a000005 bne 3b58 /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 3b40: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED 3b44: e3c33b01 bic r3, r3, #1024 ; 0x400 <== NOT EXECUTED 3b48: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); 3b4c: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED 3b50: e3c33002 bic r3, r3, #2 <== NOT EXECUTED 3b54: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && !(tty->termios.c_cflag & CRTSCTS)) { 3b58: e59530b8 ldr r3, [r5, #184] ; 0xb8 3b5c: e3130c01 tst r3, #256 ; 0x100 3b60: 05952038 ldreq r2, [r5, #56] ; 0x38 3b64: 0a000012 beq 3bb4 3b68: e5952038 ldr r2, [r5, #56] ; 0x38 <== NOT EXECUTED 3b6c: e3520000 cmp r2, #0 <== NOT EXECUTED 3b70: ba00007c blt 3d68 <== NOT EXECUTED /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 3b74: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED 3b78: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED 3b7c: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && (tty->device.startRemoteTx != NULL)) { 3b80: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED 3b84: e3130004 tst r3, #4 <== NOT EXECUTED 3b88: 0a000006 beq 3ba8 <== NOT EXECUTED 3b8c: e59530b0 ldr r3, [r5, #176] ; 0xb0 <== NOT EXECUTED 3b90: e3530000 cmp r3, #0 <== NOT EXECUTED 3b94: 0a000003 beq 3ba8 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 3b98: e5950010 ldr r0, [r5, #16] <== NOT EXECUTED 3b9c: e1a0e00f mov lr, pc <== NOT EXECUTED 3ba0: e12fff13 bx r3 <== NOT EXECUTED 3ba4: e5952038 ldr r2, [r5, #56] ; 0x38 <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 3ba8: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED 3bac: e3c33004 bic r3, r3, #4 <== NOT EXECUTED 3bb0: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED /* * check for flow control options to be switched on */ /* check for incoming RTS/CTS flow control switched on */ if (tty->termios.c_cflag & CRTSCTS) { 3bb4: e3520000 cmp r2, #0 3bb8: ba00006a blt 3d68 tty->flow_ctrl |= FL_MDRTS; } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 3bbc: e5953030 ldr r3, [r5, #48] ; 0x30 3bc0: e3130a01 tst r3, #4096 ; 0x1000 tty->flow_ctrl |= FL_MDXOF; 3bc4: 159520b8 ldrne r2, [r5, #184] ; 0xb8 3bc8: 13822b01 orrne r2, r2, #1024 ; 0x400 3bcc: 158520b8 strne r2, [r5, #184] ; 0xb8 } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { 3bd0: e3130b01 tst r3, #1024 ; 0x400 tty->flow_ctrl |= FL_MDXON; 3bd4: 159530b8 ldrne r3, [r5, #184] ; 0xb8 tty->termios = *(struct termios *)args->buffer; /* check for and process change in flow control options */ termios_set_flowctrl(tty); if (tty->termios.c_lflag & ICANON) { 3bd8: e595803c ldr r8, [r5, #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; 3bdc: 13833c02 orrne r3, r3, #512 ; 0x200 3be0: 158530b8 strne r3, [r5, #184] ; 0xb8 tty->termios = *(struct termios *)args->buffer; /* check for and process change in flow control options */ termios_set_flowctrl(tty); if (tty->termios.c_lflag & ICANON) { 3be4: e2188002 ands r8, r8, #2 3be8: 0a00004c beq 3d20 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 3bec: e3a03000 mov r3, #0 3bf0: e585306c str r3, [r5, #108] ; 0x6c tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 3bf4: e5853070 str r3, [r5, #112] ; 0x70 tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 3bf8: e5853074 str r3, [r5, #116] ; 0x74 } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) 3bfc: e59530a8 ldr r3, [r5, #168] ; 0xa8 3c00: e3530000 cmp r3, #0 3c04: 0affff8e beq 3a44 (*tty->device.setAttributes)(tty->minor, &tty->termios); 3c08: e5950010 ldr r0, [r5, #16] 3c0c: e1a01007 mov r1, r7 3c10: e1a0e00f mov lr, pc 3c14: e12fff13 bx r3 3c18: eaffff89 b 3a44 case TIOCGETD: *(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 3c1c: e5952060 ldr r2, [r5, #96] ; 0x60 <== NOT EXECUTED 3c20: e595305c ldr r3, [r5, #92] ; 0x5c <== NOT EXECUTED if ( rawnc < 0 ) 3c24: e0523003 subs r3, r2, r3 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; 3c28: 45952064 ldrmi r2, [r5, #100] ; 0x64 <== NOT EXECUTED 3c2c: 40833002 addmi r3, r3, r2 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 3c30: e2851020 add r1, r5, #32 <== NOT EXECUTED 3c34: e8910006 ldm r1, {r1, r2} <== NOT EXECUTED 3c38: e0412002 sub r2, r1, r2 <== NOT EXECUTED 3c3c: e5941008 ldr r1, [r4, #8] <== NOT EXECUTED 3c40: e0823003 add r3, r2, r3 <== NOT EXECUTED 3c44: e5813000 str r3, [r1] <== NOT EXECUTED } break; 3c48: eaffff7d b 3a44 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { 3c4c: e3530001 cmp r3, #1 3c50: 1affff88 bne 3a78 sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 3c54: e5947008 ldr r7, [r4, #8] 3c58: e285c030 add ip, r5, #48 ; 0x30 3c5c: e8bc000f ldm ip!, {r0, r1, r2, r3} 3c60: e1a0e007 mov lr, r7 3c64: e8ae000f stmia lr!, {r0, r1, r2, r3} 3c68: e8bc000f ldm ip!, {r0, r1, r2, r3} 3c6c: e8ae000f stmia lr!, {r0, r1, r2, r3} 3c70: e59c3000 ldr r3, [ip] 3c74: e58e3000 str r3, [lr] break; 3c78: eaffff71 b 3a44 sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { 3c7c: e3a02a47 mov r2, #290816 ; 0x47000 3c80: e2822e41 add r2, r2, #1040 ; 0x410 3c84: e2822129 add r2, r2, #1073741834 ; 0x4000000a 3c88: e1530002 cmp r3, r2 3c8c: 0a00001b beq 3d00 3c90: e3a02a47 mov r2, #290816 ; 0x47000 3c94: e2822e41 add r2, r2, #1040 ; 0x410 3c98: e282212e add r2, r2, #-2147483637 ; 0x8000000b 3c9c: e1530002 cmp r3, r2 3ca0: 1affff74 bne 3a78 #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 3ca4: e59f710c ldr r7, [pc, #268] ; 3db8 3ca8: e59530cc ldr r3, [r5, #204] ; 0xcc 3cac: e0873283 add r3, r7, r3, lsl #5 3cb0: e5933004 ldr r3, [r3, #4] 3cb4: e3530000 cmp r3, #0 3cb8: 0a000003 beq 3ccc sc = rtems_termios_linesw[tty->t_line].l_close(tty); 3cbc: e1a00005 mov r0, r5 3cc0: e1a0e00f mov lr, pc 3cc4: e12fff13 bx r3 3cc8: e1a06000 mov r6, r0 } tty->t_line=*(int*)(args->buffer); 3ccc: e5943008 ldr r3, [r4, #8] 3cd0: e5932000 ldr r2, [r3] tty->t_sc = NULL; /* ensure that no more valid data */ /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 3cd4: e7973282 ldr r3, [r7, r2, lsl #5] * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { sc = rtems_termios_linesw[tty->t_line].l_close(tty); } tty->t_line=*(int*)(args->buffer); 3cd8: e58520cc str r2, [r5, #204] ; 0xcc tty->t_sc = NULL; /* ensure that no more valid data */ /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 3cdc: e3530000 cmp r3, #0 */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { sc = rtems_termios_linesw[tty->t_line].l_close(tty); } tty->t_line=*(int*)(args->buffer); tty->t_sc = NULL; /* ensure that no more valid data */ 3ce0: e3a02000 mov r2, #0 3ce4: e58520d0 str r2, [r5, #208] ; 0xd0 /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 3ce8: 0affff55 beq 3a44 sc = rtems_termios_linesw[tty->t_line].l_open(tty); 3cec: e1a00005 mov r0, r5 3cf0: e1a0e00f mov lr, pc 3cf4: e12fff13 bx r3 3cf8: e1a06000 mov r6, r0 3cfc: eaffff50 b 3a44 } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; 3d00: e5943008 ldr r3, [r4, #8] 3d04: e59520cc ldr r2, [r5, #204] ; 0xcc 3d08: e5832000 str r2, [r3] break; 3d0c: eaffff4c b 3a44 case RTEMS_IO_TCDRAIN: drainOutput (tty); break; case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 3d10: e897000c ldm r7, {r2, r3} 3d14: e58520d4 str r2, [r5, #212] ; 0xd4 3d18: e58530d8 str r3, [r5, #216] ; 0xd8 break; 3d1c: eaffff48 b 3a44 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] * 3d20: e5d5a046 ldrb sl, [r5, #70] ; 0x46 rtems_clock_get_ticks_per_second() / 10; 3d24: eb00059d bl 53a0 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] * 3d28: e000009a mul r0, sl, r0 rtems_clock_get_ticks_per_second() / 10; 3d2c: e59f3088 ldr r3, [pc, #136] ; 3dbc 3d30: e0831390 umull r1, r3, r0, r3 if (tty->termios.c_cc[VTIME]) { 3d34: e5d52046 ldrb r2, [r5, #70] ; 0x46 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * rtems_clock_get_ticks_per_second() / 10; 3d38: e1a031a3 lsr r3, r3, #3 if (tty->termios.c_cc[VTIME]) { 3d3c: e3520000 cmp r2, #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] * 3d40: e5853054 str r3, [r5, #84] ; 0x54 rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 3d44: 0a00000b beq 3d78 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) 3d48: e5d52047 ldrb r2, [r5, #71] ; 0x47 tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 3d4c: e3520000 cmp r2, #0 3d50: 01a02003 moveq r2, r3 3d54: 13a02000 movne r2, #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; 3d58: e585806c str r8, [r5, #108] ; 0x6c tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; 3d5c: e5853070 str r3, [r5, #112] ; 0x70 if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 3d60: e5852074 str r2, [r5, #116] ; 0x74 3d64: eaffffa4 b 3bfc /* * check for flow control options to be switched on */ /* check for incoming RTS/CTS flow control switched on */ if (tty->termios.c_cflag & CRTSCTS) { tty->flow_ctrl |= FL_MDRTS; 3d68: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED 3d6c: e3833c01 orr r3, r3, #256 ; 0x100 <== NOT EXECUTED 3d70: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED 3d74: eaffff90 b 3bbc <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { 3d78: e5d53047 ldrb r3, [r5, #71] ; 0x47 3d7c: e3530000 cmp r3, #0 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 3d80: 03a03001 moveq r3, #1 tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 3d84: 1585206c strne r2, [r5, #108] ; 0x6c tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 3d88: 15852070 strne r2, [r5, #112] ; 0x70 tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 3d8c: 15852074 strne r2, [r5, #116] ; 0x74 } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 3d90: 0585306c streq r3, [r5, #108] ; 0x6c 3d94: eaffff98 b 3bfc tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)( tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 3d98: e5953084 ldr r3, [r5, #132] ; 0x84 <== NOT EXECUTED rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)( 3d9c: e595107c ldr r1, [r5, #124] ; 0x7c <== NOT EXECUTED 3da0: e5950010 ldr r0, [r5, #16] <== NOT EXECUTED 3da4: e0811003 add r1, r1, r3 <== NOT EXECUTED 3da8: e3a02001 mov r2, #1 <== NOT EXECUTED 3dac: e1a0e00f mov lr, pc <== NOT EXECUTED 3db0: e595f0a4 ldr pc, [r5, #164] ; 0xa4 <== NOT EXECUTED 3db4: eaffff5a b 3b24 <== NOT EXECUTED =============================================================================== 0000332c : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 332c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain( 3330: e59f74b4 ldr r7, [pc, #1204] ; 37ec rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 3334: e1a06001 mov r6, r1 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain( 3338: e3a01000 mov r1, #0 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 333c: e24dd01c sub sp, sp, #28 3340: e1a05000 mov r5, r0 3344: e1a08002 mov r8, r2 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain( 3348: e5970000 ldr r0, [r7] 334c: e1a02001 mov r2, r1 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 3350: e58d3014 str r3, [sp, #20] struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain( 3354: eb0009bd bl 5a50 rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 3358: e250a000 subs sl, r0, #0 335c: 1a000021 bne 33e8 return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 3360: e59fb488 ldr fp, [pc, #1160] ; 37f0 3364: e59b9000 ldr r9, [fp] 3368: e3590000 cmp r9, #0 336c: 0a00002d beq 3428 3370: e1a04009 mov r4, r9 3374: ea000002 b 3384 3378: e5944000 ldr r4, [r4] 337c: e3540000 cmp r4, #0 3380: 0a000028 beq 3428 if ((tty->major == major) && (tty->minor == minor)) 3384: e594300c ldr r3, [r4, #12] 3388: e1530005 cmp r3, r5 338c: 1afffff9 bne 3378 3390: e5943010 ldr r3, [r4, #16] 3394: e1530006 cmp r3, r6 3398: 1afffff6 bne 3378 if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; if (!tty->refcount++) { 339c: e5943008 ldr r3, [r4, #8] */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 33a0: e5981000 ldr r1, [r8] if (!tty->refcount++) { 33a4: e2832001 add r2, r3, #1 33a8: e3530000 cmp r3, #0 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 33ac: e5814034 str r4, [r1, #52] ; 0x34 if (!tty->refcount++) { 33b0: e5842008 str r2, [r4, #8] 33b4: 1a000009 bne 33e0 if (tty->device.firstOpen) 33b8: e5943098 ldr r3, [r4, #152] ; 0x98 33bc: e3530000 cmp r3, #0 (*tty->device.firstOpen)(major, minor, arg); 33c0: 11a00005 movne r0, r5 33c4: 11a01006 movne r1, r6 33c8: 11a02008 movne r2, r8 33cc: 11a0e00f movne lr, pc 33d0: 112fff13 bxne r3 /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 33d4: e59430b4 ldr r3, [r4, #180] ; 0xb4 33d8: e3530002 cmp r3, #2 33dc: 0a000004 beq 33f4 tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); 33e0: e5970000 ldr r0, [r7] 33e4: eb0009e2 bl 5b74 return RTEMS_SUCCESSFUL; } 33e8: e1a0000a mov r0, sl 33ec: e28dd01c add sp, sp, #28 33f0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_start( 33f4: e59400c4 ldr r0, [r4, #196] ; 0xc4 33f8: e59f13f4 ldr r1, [pc, #1012] ; 37f4 33fc: e1a02004 mov r2, r4 3400: eb000aaf bl 5ec4 tty->rxTaskId, rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 3404: e3500000 cmp r0, #0 3408: 1a0000da bne 3778 rtems_fatal_error_occurred (sc); sc = rtems_task_start( 340c: e59400c8 ldr r0, [r4, #200] ; 0xc8 3410: e59f13e0 ldr r1, [pc, #992] ; 37f8 3414: e1a02004 mov r2, r4 3418: eb000aa9 bl 5ec4 tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 341c: e3500000 cmp r0, #0 3420: 0affffee beq 33e0 3424: ea0000d3 b 3778 <== NOT EXECUTED static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 3428: e3a00001 mov r0, #1 342c: e3a010e8 mov r1, #232 ; 0xe8 3430: ebfffb60 bl 21b8 if (tty == NULL) { 3434: e3500000 cmp r0, #0 static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 3438: e58d0018 str r0, [sp, #24] 343c: e1a04000 mov r4, r0 if (tty == NULL) { 3440: 0a0000b7 beq 3724 return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 3444: e59f03b0 ldr r0, [pc, #944] ; 37fc 3448: e59d1018 ldr r1, [sp, #24] 344c: e5903000 ldr r3, [r0] 3450: e5813064 str r3, [r1, #100] ; 0x64 tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 3454: e5910064 ldr r0, [r1, #100] ; 0x64 3458: ebfffc9d bl 26d4 345c: e59d2018 ldr r2, [sp, #24] if (tty->rawInBuf.theBuf == NULL) { 3460: e3500000 cmp r0, #0 } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 3464: e1a03000 mov r3, r0 3468: e5820058 str r0, [r2, #88] ; 0x58 if (tty->rawInBuf.theBuf == NULL) { 346c: 0a0000b0 beq 3734 return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 3470: e59fc384 ldr ip, [pc, #900] ; 37fc 3474: e59de018 ldr lr, [sp, #24] 3478: e59c2004 ldr r2, [ip, #4] 347c: e58e2088 str r2, [lr, #136] ; 0x88 tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 3480: e59e0088 ldr r0, [lr, #136] ; 0x88 3484: e58d300c str r3, [sp, #12] 3488: ebfffc91 bl 26d4 348c: e1a02000 mov r2, r0 if (tty->rawOutBuf.theBuf == NULL) { 3490: e3500000 cmp r0, #0 } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 3494: e59d0018 ldr r0, [sp, #24] if (tty->rawOutBuf.theBuf == NULL) { 3498: e59d300c ldr r3, [sp, #12] } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 349c: e580207c str r2, [r0, #124] ; 0x7c if (tty->rawOutBuf.theBuf == NULL) { 34a0: 0a00009b beq 3714 return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 34a4: e59f1350 ldr r1, [pc, #848] ; 37fc 34a8: e5910008 ldr r0, [r1, #8] 34ac: e58d2010 str r2, [sp, #16] 34b0: e58d300c str r3, [sp, #12] 34b4: ebfffc86 bl 26d4 34b8: e59dc018 ldr ip, [sp, #24] if (tty->cbuf == NULL) { 34bc: e3500000 cmp r0, #0 return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 34c0: e58c001c str r0, [ip, #28] if (tty->cbuf == NULL) { 34c4: e59d2010 ldr r2, [sp, #16] 34c8: 0a00008e beq 3708 return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 34cc: e59de018 ldr lr, [sp, #24] 34d0: e3a03000 mov r3, #0 /* * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) 34d4: e1590003 cmp r9, r3 /* * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; 34d8: e58e3004 str r3, [lr, #4] return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 34dc: e58e30d4 str r3, [lr, #212] ; 0xd4 tty->tty_snd.sw_arg = NULL; 34e0: e58e30d8 str r3, [lr, #216] ; 0xd8 tty->tty_rcv.sw_pfn = NULL; 34e4: e58e30dc str r3, [lr, #220] ; 0xdc tty->tty_rcv.sw_arg = NULL; 34e8: e58e30e0 str r3, [lr, #224] ; 0xe0 tty->tty_rcvwakeup = 0; 34ec: e58e30e4 str r3, [lr, #228] ; 0xe4 tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) 34f0: e59f3308 ldr r3, [pc, #776] ; 3800 34f4: e5932000 ldr r2, [r3] */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; 34f8: e59d0018 ldr r0, [sp, #24] /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( rtems_build_name ('T', 'R', 'i', c), 34fc: e59f12f8 ldr r1, [pc, #760] ; 37fc * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; 3500: 1589e004 strne lr, [r9, #4] rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) 3504: e3520000 cmp r2, #0 rtems_termios_ttyTail = tty; 3508: 05830000 streq r0, [r3] */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; 350c: e58b0000 str r0, [fp] /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( rtems_build_name ('T', 'R', 'i', c), 3510: e5d1000c ldrb r0, [r1, #12] tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; 3514: e58e9000 str r9, [lr] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 3518: e59d2018 ldr r2, [sp, #24] rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; tty->minor = minor; 351c: e59d9018 ldr r9, [sp, #24] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 3520: e3800315 orr r0, r0, #1409286144 ; 0x54000000 3524: e3800852 orr r0, r0, #5373952 ; 0x520000 3528: e282c014 add ip, r2, #20 rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; tty->minor = minor; 352c: e5896010 str r6, [r9, #16] tty->major = major; 3530: e589500c str r5, [r9, #12] /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 3534: e3a03000 mov r3, #0 3538: e3800c69 orr r0, r0, #26880 ; 0x6900 353c: e3a01001 mov r1, #1 3540: e3a02054 mov r2, #84 ; 0x54 3544: e58dc000 str ip, [sp] 3548: eb0008a6 bl 57e8 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) 354c: e2503000 subs r3, r0, #0 /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( rtems_build_name ('T', 'R', 'i', c), 3550: e59f92a4 ldr r9, [pc, #676] ; 37fc 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->isem); if (sc != RTEMS_SUCCESSFUL) 3554: 1a000087 bne 3778 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( rtems_build_name ('T', 'R', 'o', c), 3558: e5d9000c ldrb r0, [r9, #12] RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->isem); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 355c: e59db018 ldr fp, [sp, #24] 3560: e3800315 orr r0, r0, #1409286144 ; 0x54000000 3564: e3800852 orr r0, r0, #5373952 ; 0x520000 3568: e28bc018 add ip, fp, #24 356c: e3a01001 mov r1, #1 3570: e3800c6f orr r0, r0, #28416 ; 0x6f00 3574: e3a02054 mov r2, #84 ; 0x54 3578: e58dc000 str ip, [sp] 357c: eb000899 bl 57e8 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) 3580: e2501000 subs r1, r0, #0 3584: 1a00007b bne 3778 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( rtems_build_name ('T', 'R', 'x', c), 3588: e5d9000c ldrb r0, [r9, #12] RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->osem); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 358c: e59de018 ldr lr, [sp, #24] 3590: e3800315 orr r0, r0, #1409286144 ; 0x54000000 3594: e3800852 orr r0, r0, #5373952 ; 0x520000 3598: e28ec08c add ip, lr, #140 ; 0x8c 359c: e3800b1e orr r0, r0, #30720 ; 0x7800 35a0: e3a02020 mov r2, #32 35a4: e1a03001 mov r3, r1 35a8: e58dc000 str ip, [sp] 35ac: eb00088d bl 57e8 rtems_build_name ('T', 'R', 'x', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 35b0: e250e000 subs lr, r0, #0 35b4: 1a00006f bne 3778 tty->rawOutBufState = rob_idle; /* * Set callbacks */ tty->device = *callbacks; 35b8: e59db014 ldr fp, [sp, #20] 35bc: e8bb000f ldm fp!, {r0, r1, r2, r3} 35c0: e58db014 str fp, [sp, #20] 35c4: e59db018 ldr fp, [sp, #24] 35c8: e28bc098 add ip, fp, #152 ; 0x98 35cc: e8ac000f stmia ip!, {r0, r1, r2, r3} 35d0: e59db014 ldr fp, [sp, #20] 35d4: e89b000f ldm fp, {r0, r1, r2, r3} 35d8: e88c000f stm ip, {r0, r1, r2, r3} /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 35dc: e59dc018 ldr ip, [sp, #24] 35e0: e59c30b4 ldr r3, [ip, #180] ; 0xb4 35e4: 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; 35e8: e58ce094 str lr, [ip, #148] ; 0x94 tty->device = *callbacks; /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 35ec: 0a000062 beq 377c &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 35f0: e59d9018 ldr r9, [sp, #24] 35f4: e59930a0 ldr r3, [r9, #160] ; 0xa0 35f8: e3530000 cmp r3, #0 35fc: 0a00004f beq 3740 3600: e59930b4 ldr r3, [r9, #180] ; 0xb4 3604: e3530002 cmp r3, #2 3608: 0a00004c beq 3740 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; 360c: e59d0018 ldr r0, [sp, #24] tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; 3610: 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; 3614: e58030b8 str r3, [r0, #184] ; 0xb8 tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 3618: e59f11dc ldr r1, [pc, #476] ; 37fc /* 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; 361c: e590b064 ldr fp, [r0, #100] ; 0x64 tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 3620: e5d1900c ldrb r9, [r1, #12] /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 3624: e1a0b0ab lsr fp, fp, #1 tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 3628: e359007a cmp r9, #122 ; 0x7a /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 362c: e58db008 str fp, [sp, #8] tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 3630: e289b001 add fp, r9, #1 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 3634: e59d9018 ldr r9, [sp, #24] tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = 3638: e3a02c82 mov r2, #33280 ; 0x8200 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'; 363c: e5c9304c strb r3, [r9, #76] ; 0x4c tty->termios.c_cc[VEOL2] = '\000'; 3640: e5c93051 strb r3, [r9, #81] ; 0x51 tty->termios.c_cc[VSTART] = '\021'; 3644: e3a03011 mov r3, #17 3648: e5c93049 strb r3, [r9, #73] ; 0x49 * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = 364c: e282203b add r2, r2, #59 ; 0x3b tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; 3650: e3a03013 mov r3, #19 3654: e5c9304a strb r3, [r9, #74] ; 0x4a * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = 3658: e589203c str r2, [r9, #60] ; 0x3c tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; 365c: e3a0301a mov r3, #26 tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; 3660: e3a02003 mov r2, #3 3664: e5c92041 strb r2, [r9, #65] ; 0x41 tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; 3668: e5c9304b strb r3, [r9, #75] ; 0x4b 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; 366c: e590e064 ldr lr, [r0, #100] ; 0x64 tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; 3670: e3a0201c mov r2, #28 tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; 3674: e3a03012 mov r3, #18 tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; 3678: e5c92042 strb r2, [r9, #66] ; 0x42 tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; 367c: e5c9304d strb r3, [r9, #77] ; 0x4d tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; 3680: e3a0207f mov r2, #127 ; 0x7f tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; 3684: e3a0300f mov r3, #15 tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; 3688: e5c92043 strb r2, [r9, #67] ; 0x43 tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; 368c: e5c9304e strb r3, [r9, #78] ; 0x4e ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; 3690: e3a02015 mov r2, #21 tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; 3694: e3a03017 mov r3, #23 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; 3698: e08ee08e add lr, lr, lr, lsl #1 ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; 369c: e5c92044 strb r2, [r9, #68] ; 0x44 tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; 36a0: e5c9304f strb r3, [r9, #79] ; 0x4f tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; 36a4: e3a02004 mov r2, #4 tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; tty->termios.c_cc[VLNEXT] = '\026'; 36a8: e3a03016 mov r3, #22 tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; 36ac: e1a0e12e lsr lr, lr, #2 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 36b0: e3a0cc25 mov ip, #9472 ; 0x2500 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'; 36b4: e5c92045 strb r2, [r9, #69] ; 0x45 tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; tty->termios.c_cc[VLNEXT] = '\026'; 36b8: e5c93050 strb r3, [r9, #80] ; 0x50 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 36bc: e28cc002 add ip, ip, #2 tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 36c0: e58db014 str fp, [sp, #20] 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; 36c4: e589e0c0 str lr, [r9, #192] ; 0xc0 /* * Bump name characer */ if (c++ == 'z') 36c8: e59fe12c ldr lr, [pc, #300] ; 37fc /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; 36cc: e3a00b06 mov r0, #6144 ; 0x1800 tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 36d0: e3a01e8b mov r1, #2224 ; 0x8b0 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 36d4: e589c030 str ip, [r9, #48] ; 0x30 /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 36d8: e59db008 ldr fp, [sp, #8] tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 36dc: e59dc014 ldr ip, [sp, #20] /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; 36e0: e2800005 add r0, r0, #5 tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 36e4: e281100d add r1, r1, #13 tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') c = 'a'; 36e8: 0282205d addeq r2, r2, #93 ; 0x5d 36ec: 01a0300e moveq r3, lr tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 36f0: e5cec00c strb ip, [lr, #12] /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; 36f4: e5890034 str r0, [r9, #52] ; 0x34 tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 36f8: e5891038 str r1, [r9, #56] ; 0x38 /* 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; 36fc: e589b0bc str fp, [r9, #188] ; 0xbc tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') c = 'a'; 3700: 05c3200c strbeq r2, [r3, #12] 3704: eaffff24 b 339c /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf)); 3708: e1a00002 mov r0, r2 <== NOT EXECUTED 370c: ebfffb16 bl 236c <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 3710: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED 3714: e1a00003 mov r0, r3 3718: ebfffb13 bl 236c free(tty); 371c: e59d0018 ldr r0, [sp, #24] 3720: ebfffb11 bl 236c rtems_semaphore_release (rtems_termios_ttyMutex); 3724: e5970000 ldr r0, [r7] 3728: eb000911 bl 5b74 return RTEMS_NO_MEMORY; 372c: e3a0a01a mov sl, #26 3730: eaffff2c b 33e8 * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); if (tty->rawInBuf.theBuf == NULL) { free(tty); 3734: e1a00002 mov r0, r2 3738: ebfffb0b bl 236c 373c: eafffff8 b 3724 } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( rtems_build_name ('T', 'R', 'r', c), 3740: e59fb0b4 ldr fp, [pc, #180] ; 37fc 3744: e5db000c ldrb r0, [fp, #12] rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 3748: e59de018 ldr lr, [sp, #24] 374c: e3800315 orr r0, r0, #1409286144 ; 0x54000000 3750: e3a01000 mov r1, #0 3754: e3800852 orr r0, r0, #5373952 ; 0x520000 3758: e28ec068 add ip, lr, #104 ; 0x68 375c: e3800c72 orr r0, r0, #29184 ; 0x7200 3760: e3a02024 mov r2, #36 ; 0x24 3764: e1a03001 mov r3, r1 3768: e58dc000 str ip, [sp] 376c: eb00081d bl 57e8 rtems_build_name ('T', 'R', 'r', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->rawInBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 3770: e3500000 cmp r0, #0 3774: 0affffa4 beq 360c rtems_fatal_error_occurred (sc); sc = rtems_task_start( tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 3778: eb000a5d bl 60f4 /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_create ( rtems_build_name ('T', 'x', 'T', c), 377c: e5d9000c ldrb r0, [r9, #12] /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_create ( 3780: e3800315 orr r0, r0, #1409286144 ; 0x54000000 3784: e380071e orr r0, r0, #7864320 ; 0x780000 3788: e28cc0c8 add ip, ip, #200 ; 0xc8 378c: e3800b15 orr r0, r0, #21504 ; 0x5400 3790: e3a0100a mov r1, #10 3794: e3a02b01 mov r2, #1024 ; 0x400 3798: e3a03c05 mov r3, #1280 ; 0x500 379c: e58de000 str lr, [sp] 37a0: e58dc004 str ip, [sp, #4] 37a4: eb00091c bl 5c1c TERMIOS_TXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->txTaskId); if (sc != RTEMS_SUCCESSFUL) 37a8: e250e000 subs lr, r0, #0 37ac: 1afffff1 bne 3778 rtems_fatal_error_occurred (sc); sc = rtems_task_create ( rtems_build_name ('R', 'x', 'T', c), 37b0: e5d9000c ldrb r0, [r9, #12] RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->txTaskId); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 37b4: e59d2018 ldr r2, [sp, #24] 37b8: e3800452 orr r0, r0, #1375731712 ; 0x52000000 37bc: e380071e orr r0, r0, #7864320 ; 0x780000 37c0: e282c0c4 add ip, r2, #196 ; 0xc4 37c4: e3800b15 orr r0, r0, #21504 ; 0x5400 37c8: e3a01009 mov r1, #9 37cc: e3a02b01 mov r2, #1024 ; 0x400 37d0: e3a03c05 mov r3, #1280 ; 0x500 37d4: e58de000 str lr, [sp] 37d8: e58dc004 str ip, [sp, #4] 37dc: eb00090e bl 5c1c TERMIOS_RXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) 37e0: e3500000 cmp r0, #0 37e4: 0affff81 beq 35f0 37e8: eaffffe2 b 3778 <== NOT EXECUTED =============================================================================== 00003dc0 : const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 3dc0: e59230b4 ldr r3, [r2, #180] ; 0xb4 3dc4: e3530000 cmp r3, #0 * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 3dc8: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} 3dcc: e1a04002 mov r4, r2 3dd0: e1a0a000 mov sl, r0 3dd4: e1a08001 mov r8, r1 const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 3dd8: 0a000038 beq 3ec0 (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 3ddc: e3510000 cmp r1, #0 if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; 3de0: e5927080 ldr r7, [r2, #128] ; 0x80 while (len) { 3de4: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc} * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) { tty->rawOutBufState = rob_wait; 3de8: e3a06002 mov r6, #2 (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; 3dec: e3a09001 mov r9, #1 * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 3df0: e5941088 ldr r1, [r4, #136] ; 0x88 3df4: e2870001 add r0, r7, #1 3df8: eb003658 bl 11760 <__umodsi3> 3dfc: e1a07000 mov r7, r0 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 3e00: e10f3000 mrs r3, CPSR 3e04: e3832080 orr r2, r3, #128 ; 0x80 3e08: e129f002 msr CPSR_fc, r2 rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) { 3e0c: e5945084 ldr r5, [r4, #132] ; 0x84 3e10: e1550000 cmp r5, r0 3e14: 1a00000d bne 3e50 tty->rawOutBufState = rob_wait; 3e18: e5846094 str r6, [r4, #148] ; 0x94 static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 3e1c: e129f003 msr CPSR_fc, r3 rtems_interrupt_enable (level); sc = rtems_semaphore_obtain( 3e20: e3a01000 mov r1, #0 3e24: e594008c ldr r0, [r4, #140] ; 0x8c 3e28: e1a02001 mov r2, r1 3e2c: eb000707 bl 5a50 tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 3e30: e3500000 cmp r0, #0 3e34: 1a000027 bne 3ed8 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 3e38: e10f3000 mrs r3, CPSR 3e3c: e3832080 orr r2, r3, #128 ; 0x80 3e40: e129f002 msr CPSR_fc, r2 * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) { 3e44: e5942084 ldr r2, [r4, #132] ; 0x84 3e48: e1520005 cmp r2, r5 3e4c: 0afffff1 beq 3e18 tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; 3e50: e4da1001 ldrb r1, [sl], #1 * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; rtems_interrupt_disable (level); 3e54: e1a05003 mov r5, r3 tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; 3e58: e594207c ldr r2, [r4, #124] ; 0x7c 3e5c: e5943080 ldr r3, [r4, #128] ; 0x80 3e60: e7c21003 strb r1, [r2, r3] tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { 3e64: e5943094 ldr r3, [r4, #148] ; 0x94 3e68: e3530000 cmp r3, #0 if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; tty->rawOutBuf.Head = newHead; 3e6c: e5847080 str r7, [r4, #128] ; 0x80 if (tty->rawOutBufState == rob_idle) { 3e70: 1a000006 bne 3e90 /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 3e74: e59430b8 ldr r3, [r4, #184] ; 0xb8 3e78: e3130010 tst r3, #16 3e7c: 0a000007 beq 3ea0 (*tty->device.write)(tty->minor, (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; 3e80: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3e84: e3833020 orr r3, r3, #32 <== NOT EXECUTED 3e88: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED } tty->rawOutBufState = rob_busy; 3e8c: e5849094 str r9, [r4, #148] ; 0x94 static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 3e90: e129f005 msr CPSR_fc, r5 if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 3e94: e2588001 subs r8, r8, #1 3e98: 1affffd4 bne 3df0 3e9c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { (*tty->device.write)(tty->minor, (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 3ea0: e5943084 ldr r3, [r4, #132] ; 0x84 tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { (*tty->device.write)(tty->minor, 3ea4: e594107c ldr r1, [r4, #124] ; 0x7c 3ea8: e5940010 ldr r0, [r4, #16] 3eac: e0811003 add r1, r1, r3 3eb0: e3a02001 mov r2, #1 3eb4: e1a0e00f mov lr, pc 3eb8: e594f0a4 ldr pc, [r4, #164] ; 0xa4 3ebc: eafffff2 b 3e8c unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); 3ec0: e5920010 ldr r0, [r2, #16] 3ec4: e1a0100a mov r1, sl 3ec8: e1a02008 mov r2, r8 3ecc: e1a0e00f mov lr, pc 3ed0: e594f0a4 ldr pc, [r4, #164] ; 0xa4 return; 3ed4: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} tty->rawOutBufState = rob_wait; rtems_interrupt_enable (level); sc = rtems_semaphore_obtain( tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 3ed8: eb000885 bl 60f4 <== NOT EXECUTED =============================================================================== 000045f8 : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 45f8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 45fc: e5903000 ldr r3, [r0] 4600: 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); 4604: e3a01000 mov r1, #0 return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 4608: e1a09000 mov r9, r0 460c: e24dd008 sub sp, sp, #8 struct rtems_termios_tty *tty = args->iop->data1; uint32_t count = args->count; char *buffer = args->buffer; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 4610: e5940014 ldr r0, [r4, #20] 4614: e1a02001 mov r2, r1 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; 4618: e5998010 ldr r8, [r9, #16] char *buffer = args->buffer; 461c: e599a00c ldr sl, [r9, #12] rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 4620: eb00050a bl 5a50 if (sc != RTEMS_SUCCESSFUL) 4624: e3500000 cmp r0, #0 4628: e58d0000 str r0, [sp] 462c: 1a00000e bne 466c return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 4630: e59420cc ldr r2, [r4, #204] ; 0xcc 4634: e59f3370 ldr r3, [pc, #880] ; 49ac 4638: e0833282 add r3, r3, r2, lsl #5 463c: e5933008 ldr r3, [r3, #8] 4640: e3530000 cmp r3, #0 4644: 0a00000b beq 4678 sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 4648: e1a00004 mov r0, r4 464c: e1a01009 mov r1, r9 4650: e1a0e00f mov lr, pc 4654: e12fff13 bx r3 tty->tty_rcvwakeup = 0; 4658: e3a03000 mov r3, #0 sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 465c: e58d0000 str r0, [sp] tty->tty_rcvwakeup = 0; 4660: e58430e4 str r3, [r4, #228] ; 0xe4 rtems_semaphore_release (tty->isem); 4664: e5940014 ldr r0, [r4, #20] 4668: eb000541 bl 5b74 } args->bytes_moved = args->count - count; tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } 466c: e59d0000 ldr r0, [sp] 4670: e28dd008 add sp, sp, #8 4674: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { 4678: e5942024 ldr r2, [r4, #36] ; 0x24 467c: e5943020 ldr r3, [r4, #32] 4680: e1520003 cmp r2, r3 4684: 0a000018 beq 46ec sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 4688: e3580000 cmp r8, #0 468c: 0a00000e beq 46cc 4690: e2842020 add r2, r4, #32 4694: e892000c ldm r2, {r2, r3} 4698: e1530002 cmp r3, r2 469c: ba000003 blt 46b0 46a0: ea000009 b 46cc <== NOT EXECUTED 46a4: e5942020 ldr r2, [r4, #32] 46a8: e1520003 cmp r2, r3 46ac: da000006 ble 46cc *buffer++ = tty->cbuf[tty->cindex++]; 46b0: e594201c ldr r2, [r4, #28] 46b4: e7d22003 ldrb r2, [r2, r3] sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 46b8: e2588001 subs r8, r8, #1 *buffer++ = tty->cbuf[tty->cindex++]; 46bc: e2833001 add r3, r3, #1 46c0: e4ca2001 strb r2, [sl], #1 46c4: e5843024 str r3, [r4, #36] ; 0x24 sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 46c8: 1afffff5 bne 46a4 *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 46cc: e5993010 ldr r3, [r9, #16] 46d0: e0688003 rsb r8, r8, r3 tty->tty_rcvwakeup = 0; 46d4: e3a03000 mov r3, #0 } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 46d8: e5898018 str r8, [r9, #24] tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); 46dc: e5940014 ldr r0, [r4, #20] while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; tty->tty_rcvwakeup = 0; 46e0: e58430e4 str r3, [r4, #228] ; 0xe4 rtems_semaphore_release (tty->isem); 46e4: eb000522 bl 5b74 return sc; 46e8: eaffffdf b 466c } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; if (tty->device.pollRead != NULL && 46ec: e59430a0 ldr r3, [r4, #160] ; 0xa0 rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; 46f0: e59d1000 ldr r1, [sp] tty->read_start_column = tty->column; 46f4: e5942028 ldr r2, [r4, #40] ; 0x28 if (tty->device.pollRead != NULL && 46f8: e3530000 cmp r3, #0 rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; 46fc: e5841020 str r1, [r4, #32] 4700: e5841024 str r1, [r4, #36] ; 0x24 tty->read_start_column = tty->column; 4704: e584202c str r2, [r4, #44] ; 0x2c if (tty->device.pollRead != NULL && 4708: 0a000002 beq 4718 470c: e59420b4 ldr r2, [r4, #180] ; 0xb4 4710: e3520000 cmp r2, #0 4714: 0a000068 beq 48bc 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)( 4718: e2843049 add r3, r4, #73 ; 0x49 if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 471c: e3a0bc02 mov fp, #512 ; 0x200 * Fill the input buffer from the raw input queue */ static rtems_status_code fillBufferQueue (struct rtems_termios_tty *tty) { rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; 4720: e5946074 ldr r6, [r4, #116] ; 0x74 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && (tty->ccount < (CBUFSIZE-1))) { 4724: e59f7284 ldr r7, [pc, #644] ; 49b0 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)( 4728: e58d3004 str r3, [sp, #4] static rtems_status_code fillBufferQueue (struct rtems_termios_tty *tty) { rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; rtems_status_code sc; int wait = (int)1; 472c: e3a05001 mov r5, #1 if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 4730: e28bb002 add fp, fp, #2 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 4734: e594205c ldr r2, [r4, #92] ; 0x5c 4738: e5943060 ldr r3, [r4, #96] ; 0x60 473c: e1520003 cmp r2, r3 4740: 0a000048 beq 4868 (tty->ccount < (CBUFSIZE-1))) { 4744: e5972008 ldr r2, [r7, #8] while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 4748: e5943020 ldr r3, [r4, #32] (tty->ccount < (CBUFSIZE-1))) { 474c: e2422001 sub r2, r2, #1 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 4750: e1520003 cmp r2, r3 4754: ca00000f bgt 4798 4758: ea000042 b 4868 <== NOT EXECUTED } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { if (siproc (c, tty)) 475c: e1a00006 mov r0, r6 4760: e1a01004 mov r1, r4 4764: ebffff57 bl 44c8 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 4768: e594205c ldr r2, [r4, #92] ; 0x5c 476c: e5943060 ldr r3, [r4, #96] ; 0x60 } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { if (siproc (c, tty)) wait = 0; 4770: e3500000 cmp r0, #0 4774: 13a05000 movne r5, #0 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 4778: e1520003 cmp r2, r3 } else { siproc (c, tty); if (tty->ccount >= tty->termios.c_cc[VMIN]) wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; 477c: e5946070 ldr r6, [r4, #112] ; 0x70 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 4780: 0a000038 beq 4868 (tty->ccount < (CBUFSIZE-1))) { 4784: e5973008 ldr r3, [r7, #8] while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 4788: e5942020 ldr r2, [r4, #32] (tty->ccount < (CBUFSIZE-1))) { 478c: e2433001 sub r3, r3, #1 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 4790: e1520003 cmp r2, r3 4794: aa000033 bge 4868 (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; 4798: e594005c ldr r0, [r4, #92] ; 0x5c 479c: e5941064 ldr r1, [r4, #100] ; 0x64 47a0: e2800001 add r0, r0, #1 47a4: eb0033ed bl 11760 <__umodsi3> c = tty->rawInBuf.theBuf[newHead]; 47a8: e5943058 ldr r3, [r4, #88] ; 0x58 47ac: e7d36000 ldrb r6, [r3, r0] tty->rawInBuf.Head = newHead; 47b0: e584005c str r0, [r4, #92] ; 0x5c if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 47b4: e5943060 ldr r3, [r4, #96] ; 0x60 47b8: e5942064 ldr r2, [r4, #100] ; 0x64 47bc: e0823003 add r3, r2, r3 % tty->rawInBuf.Size) 47c0: e0600003 rsb r0, r0, r3 47c4: e5941064 ldr r1, [r4, #100] ; 0x64 47c8: eb0033e4 bl 11760 <__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) 47cc: e59430bc ldr r3, [r4, #188] ; 0xbc 47d0: e1500003 cmp r0, r3 47d4: 2a000014 bcs 482c % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 47d8: e59430b8 ldr r3, [r4, #184] ; 0xb8 47dc: e3c33001 bic r3, r3, #1 47e0: e58430b8 str r3, [r4, #184] ; 0xb8 /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 47e4: e59430b8 ldr r3, [r4, #184] ; 0xb8 47e8: e3c33f7f bic r3, r3, #508 ; 0x1fc 47ec: e3c33001 bic r3, r3, #1 47f0: e1a03b03 lsl r3, r3, #22 47f4: e1a03b23 lsr r3, r3, #22 47f8: e153000b cmp r3, fp 47fc: 0a000022 beq 488c && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)( tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { 4800: e59430b8 ldr r3, [r4, #184] ; 0xb8 4804: e3130c01 tst r3, #256 ; 0x100 4808: 0a000007 beq 482c tty->flow_ctrl &= ~FL_IRTSOFF; 480c: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 4810: e59430b0 ldr r3, [r4, #176] ; 0xb0 <== NOT EXECUTED || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)( tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { tty->flow_ctrl &= ~FL_IRTSOFF; 4814: e3c22004 bic r2, r2, #4 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 4818: e3530000 cmp r3, #0 <== NOT EXECUTED || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)( tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { tty->flow_ctrl &= ~FL_IRTSOFF; 481c: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { tty->device.startRemoteTx(tty->minor); 4820: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED 4824: 11a0e00f movne lr, pc <== NOT EXECUTED 4828: 112fff13 bxne r3 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 482c: e594303c ldr r3, [r4, #60] ; 0x3c 4830: e3130002 tst r3, #2 4834: 1affffc8 bne 475c if (siproc (c, tty)) wait = 0; } else { siproc (c, tty); 4838: e1a00006 mov r0, r6 <== NOT EXECUTED 483c: e1a01004 mov r1, r4 <== NOT EXECUTED 4840: ebffff20 bl 44c8 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 4844: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED 4848: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED wait = 0; 484c: e1520003 cmp r2, r3 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 4850: e594205c ldr r2, [r4, #92] ; 0x5c <== NOT EXECUTED 4854: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED if (siproc (c, tty)) wait = 0; } else { siproc (c, tty); if (tty->ccount >= tty->termios.c_cc[VMIN]) wait = 0; 4858: a3a05000 movge r5, #0 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 485c: e1520003 cmp r2, r3 <== NOT EXECUTED } else { siproc (c, tty); if (tty->ccount >= tty->termios.c_cc[VMIN]) wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; 4860: e5946070 ldr r6, [r4, #112] ; 0x70 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 4864: 1affffc6 bne 4784 <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 4868: e3550000 cmp r5, #0 486c: 0affff85 beq 4688 sc = rtems_semaphore_obtain( 4870: e2840068 add r0, r4, #104 ; 0x68 4874: e8900003 ldm r0, {r0, r1} 4878: e1a02006 mov r2, r6 487c: eb000473 bl 5a50 tty->rawInBuf.Semaphore, tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 4880: e3500000 cmp r0, #0 4884: 0affffaa beq 4734 4888: eaffff7e b 4688 <== NOT EXECUTED < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) 488c: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 4890: e3530000 cmp r3, #0 <== NOT EXECUTED 4894: 0a000002 beq 48a4 <== NOT EXECUTED || (tty->flow_ctrl & FL_OSTOP))) { 4898: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 489c: e3130020 tst r3, #32 <== NOT EXECUTED 48a0: 0affffd6 beq 4800 <== NOT EXECUTED /* XON should be sent now... */ (*tty->device.write)( 48a4: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 48a8: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED 48ac: e3a02001 mov r2, #1 <== NOT EXECUTED 48b0: e1a0e00f mov lr, pc <== NOT EXECUTED 48b4: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 48b8: eaffffdb b 482c <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 48bc: e594203c ldr r2, [r4, #60] ; 0x3c 48c0: e3120002 tst r2, #2 48c4: 0a00000b beq 48f8 for (;;) { n = (*tty->device.pollRead)(tty->minor); 48c8: e5940010 ldr r0, [r4, #16] 48cc: e1a0e00f mov lr, pc 48d0: e12fff13 bx r3 if (n < 0) { 48d4: e3500000 cmp r0, #0 rtems_task_wake_after (1); } else { if (siproc (n, tty)) 48d8: e1a01004 mov r1, r4 48dc: e20000ff and r0, r0, #255 ; 0xff int n; if (tty->termios.c_lflag & ICANON) { for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { 48e0: ba00002d blt 499c rtems_task_wake_after (1); } else { if (siproc (n, tty)) 48e4: ebfffef7 bl 44c8 48e8: e3500000 cmp r0, #0 48ec: 1affff65 bne 4688 static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 48f0: e59430a0 ldr r3, [r4, #160] ; 0xa0 48f4: eafffff3 b 48c8 } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 48f8: eb0002b0 bl 53c0 48fc: e1a05000 mov r5, r0 for (;;) { n = (*tty->device.pollRead)(tty->minor); 4900: e5940010 ldr r0, [r4, #16] 4904: e1a0e00f mov lr, pc 4908: e594f0a0 ldr pc, [r4, #160] ; 0xa0 if (n < 0) { 490c: e3500000 cmp r0, #0 4910: ba00000c blt 4948 break; } } rtems_task_wake_after (1); } else { siproc (n, tty); 4914: e20000ff and r0, r0, #255 ; 0xff 4918: e1a01004 mov r1, r4 491c: ebfffee9 bl 44c8 if (tty->ccount >= tty->termios.c_cc[VMIN]) 4920: e5d43047 ldrb r3, [r4, #71] ; 0x47 4924: e5942020 ldr r2, [r4, #32] 4928: e1520003 cmp r2, r3 492c: aaffff55 bge 4688 break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 4930: e3530000 cmp r3, #0 4934: 0afffff1 beq 4900 4938: e5d43046 ldrb r3, [r4, #70] ; 0x46 493c: e3530000 cmp r3, #0 4940: 0affffee beq 4900 4944: eaffffeb b 48f8 then = rtems_clock_get_ticks_since_boot(); for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { if (tty->termios.c_cc[VMIN]) { 4948: e5d43047 ldrb r3, [r4, #71] ; 0x47 494c: e3530000 cmp r3, #0 4950: 0a000008 beq 4978 if (tty->termios.c_cc[VTIME] && tty->ccount) { 4954: e5d43046 ldrb r3, [r4, #70] ; 0x46 4958: e3530000 cmp r3, #0 495c: 0a000002 beq 496c 4960: e5943020 ldr r3, [r4, #32] 4964: e3530000 cmp r3, #0 4968: 1a000005 bne 4984 now = rtems_clock_get_ticks_since_boot(); if ((now - then) > tty->vtimeTicks) { break; } } rtems_task_wake_after (1); 496c: e3a00001 mov r0, #1 4970: eb00056d bl 5f2c 4974: eaffffe1 b 4900 if ((now - then) > tty->vtimeTicks) { break; } } } else { if (!tty->termios.c_cc[VTIME]) 4978: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED 497c: e3530000 cmp r3, #0 <== NOT EXECUTED 4980: 0affff40 beq 4688 <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); 4984: eb00028d bl 53c0 if ((now - then) > tty->vtimeTicks) { 4988: e5943054 ldr r3, [r4, #84] ; 0x54 498c: e0650000 rsb r0, r5, r0 4990: e1500003 cmp r0, r3 4994: 9afffff4 bls 496c 4998: eaffff3a b 4688 if (tty->termios.c_lflag & ICANON) { for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { rtems_task_wake_after (1); 499c: e3a00001 mov r0, #1 49a0: eb000561 bl 5f2c static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 49a4: e59430a0 ldr r3, [r4, #160] ; 0xa0 49a8: eaffffc6 b 48c8 =============================================================================== 00004d40 : int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) 4d40: e59030b8 ldr r3, [r0, #184] ; 0xb8 4d44: e3c33fff bic r3, r3, #1020 ; 0x3fc 4d48: e1a03a83 lsl r3, r3, #21 4d4c: e3a02b01 mov r2, #1024 ; 0x400 4d50: e1a03aa3 lsr r3, r3, #21 4d54: e2822001 add r2, r2, #1 4d58: 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) { 4d5c: e92d4070 push {r4, r5, r6, lr} 4d60: 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)) 4d64: 0a000048 beq 4e8c tty->flow_ctrl |= FL_ISNTXOF; rtems_interrupt_enable(level); nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) == FL_ISNTXOF) { 4d68: e59030b8 ldr r3, [r0, #184] ; 0xb8 4d6c: e2033003 and r3, r3, #3 4d70: e3530002 cmp r3, #2 4d74: 0a000056 beq 4ed4 tty->flow_ctrl &= ~FL_ISNTXOF; rtems_interrupt_enable(level); nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 4d78: e5902080 ldr r2, [r0, #128] ; 0x80 4d7c: e5903084 ldr r3, [r0, #132] ; 0x84 4d80: e1520003 cmp r2, r3 4d84: 0a00002a beq 4e34 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 4d88: e10f3000 mrs r3, CPSR 4d8c: e3832080 orr r2, r3, #128 ; 0x80 4d90: e129f002 msr CPSR_fc, r2 return 0; } rtems_interrupt_disable(level); len = tty->t_dqlen; tty->t_dqlen = 0; 4d94: e3a02000 mov r2, #0 } return 0; } rtems_interrupt_disable(level); len = tty->t_dqlen; 4d98: e5900090 ldr r0, [r0, #144] ; 0x90 tty->t_dqlen = 0; 4d9c: e5842090 str r2, [r4, #144] ; 0x90 static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 4da0: e129f003 msr CPSR_fc, r3 rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 4da4: e5943084 ldr r3, [r4, #132] ; 0x84 4da8: e5941088 ldr r1, [r4, #136] ; 0x88 4dac: e0800003 add r0, r0, r3 4db0: eb00326a bl 11760 <__umodsi3> tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 4db4: e5943094 ldr r3, [r4, #148] ; 0x94 4db8: 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; 4dbc: e1a05000 mov r5, r0 tty->rawOutBuf.Tail = newTail; 4dc0: e5840084 str r0, [r4, #132] ; 0x84 if (tty->rawOutBufState == rob_wait) { 4dc4: 0a00002d beq 4e80 * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); } if (newTail == tty->rawOutBuf.Head) { 4dc8: e5943080 ldr r3, [r4, #128] ; 0x80 4dcc: e1530005 cmp r3, r5 4dd0: 0a00001f beq 4e54 if ( tty->tty_snd.sw_pfn != NULL) { (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); } } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) 4dd4: e59430b8 ldr r3, [r4, #184] ; 0xb8 4dd8: e2033e21 and r3, r3, #528 ; 0x210 4ddc: e3530e21 cmp r3, #528 ; 0x210 4de0: 0a00004d beq 4f1c nToSend = 0; } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 4de4: e5943080 ldr r3, [r4, #128] ; 0x80 4de8: e1550003 cmp r5, r3 nToSend = tty->rawOutBuf.Size - newTail; 4dec: 85946088 ldrhi r6, [r4, #136] ; 0x88 else nToSend = tty->rawOutBuf.Head - newTail; 4df0: 95946080 ldrls r6, [r4, #128] ; 0x80 /* when flow control XON or XOF, don't send blocks of data */ /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { 4df4: e59430b8 ldr r3, [r4, #184] ; 0xb8 } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) nToSend = tty->rawOutBuf.Size - newTail; 4df8: 80656006 rsbhi r6, r5, r6 else nToSend = tty->rawOutBuf.Head - newTail; 4dfc: 90656006 rsbls r6, r5, r6 /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)( 4e00: e594107c ldr r1, [r4, #124] ; 0x7c else nToSend = tty->rawOutBuf.Head - newTail; /* when flow control XON or XOF, don't send blocks of data */ /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { 4e04: e3130c06 tst r3, #1536 ; 0x600 4e08: 13a06001 movne r6, #1 nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ 4e0c: e3a03001 mov r3, #1 nToSend = tty->rawOutBuf.Head - newTail; /* when flow control XON or XOF, don't send blocks of data */ /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { nToSend = 1; 4e10: e1a02006 mov r2, r6 } tty->rawOutBufState = rob_busy; /*apm*/ 4e14: e5843094 str r3, [r4, #148] ; 0x94 (*tty->device.write)( 4e18: e5940010 ldr r0, [r4, #16] 4e1c: e0811005 add r1, r1, r5 4e20: e1a0e00f mov lr, pc 4e24: e594f0a4 ldr pc, [r4, #164] ; 0xa4 tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 4e28: e5845084 str r5, [r4, #132] ; 0x84 } return nToSend; } 4e2c: e1a00006 mov r0, r6 4e30: e8bd8070 pop {r4, r5, r6, pc} } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 4e34: e5903094 ldr r3, [r0, #148] ; 0x94 4e38: e3530002 cmp r3, #2 /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); } return 0; 4e3c: 13a06000 movne r6, #0 } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 4e40: 1afffff9 bne 4e2c /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 4e44: e590008c ldr r0, [r0, #140] ; 0x8c <== NOT EXECUTED 4e48: eb000349 bl 5b74 <== NOT EXECUTED } return 0; 4e4c: e3a06000 mov r6, #0 <== NOT EXECUTED 4e50: eafffff5 b 4e2c <== NOT EXECUTED nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 4e54: e59430d4 ldr r3, [r4, #212] ; 0xd4 if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 4e58: e3a06000 mov r6, #0 nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 4e5c: e1530006 cmp r3, r6 if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 4e60: e5846094 str r6, [r4, #148] ; 0x94 nToSend = 0; 4e64: 01a06003 moveq r6, r3 /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 4e68: 0affffee beq 4e28 (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 4e6c: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED 4e70: e59410d8 ldr r1, [r4, #216] ; 0xd8 <== NOT EXECUTED 4e74: e1a0e00f mov lr, pc <== NOT EXECUTED 4e78: e12fff13 bx r3 <== NOT EXECUTED 4e7c: eaffffe9 b 4e28 <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 4e80: e594008c ldr r0, [r4, #140] ; 0x8c 4e84: eb00033a bl 5b74 4e88: eaffffce b 4dc8 /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); 4e8c: e284104a add r1, r4, #74 ; 0x4a <== NOT EXECUTED 4e90: e3a02001 mov r2, #1 <== NOT EXECUTED 4e94: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED 4e98: e1a0e00f mov lr, pc <== NOT EXECUTED 4e9c: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 4ea0: e10f3000 mrs r3, CPSR <== NOT EXECUTED 4ea4: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 4ea8: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED rtems_interrupt_disable(level); tty->t_dqlen--; 4eac: e5941090 ldr r1, [r4, #144] ; 0x90 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 4eb0: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 4eb4: e2411001 sub r1, r1, #1 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 4eb8: e3822002 orr r2, r2, #2 <== NOT EXECUTED == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 4ebc: e5841090 str r1, [r4, #144] ; 0x90 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 4ec0: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 4ec4: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED rtems_interrupt_enable(level); nToSend = 1; 4ec8: e3a06001 mov r6, #1 <== NOT EXECUTED tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 4ecc: e1a00006 mov r0, r6 <== NOT EXECUTED 4ed0: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED * FIXME: this .write call will generate another * dequeue callback. This will advance the "Tail" in the data * buffer, although the corresponding data is not yet out! * Therefore the dequeue "length" should be reduced by 1 */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); 4ed4: e2841049 add r1, r4, #73 ; 0x49 <== NOT EXECUTED 4ed8: e3a02001 mov r2, #1 <== NOT EXECUTED 4edc: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED 4ee0: e1a0e00f mov lr, pc <== NOT EXECUTED 4ee4: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 4ee8: e10f3000 mrs r3, CPSR <== NOT EXECUTED 4eec: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 4ef0: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED rtems_interrupt_disable(level); tty->t_dqlen--; 4ef4: e5941090 ldr r1, [r4, #144] ; 0x90 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 4ef8: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED * Therefore the dequeue "length" should be reduced by 1 */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 4efc: e2411001 sub r1, r1, #1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 4f00: e3c22002 bic r2, r2, #2 <== NOT EXECUTED * Therefore the dequeue "length" should be reduced by 1 */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 4f04: e5841090 str r1, [r4, #144] ; 0x90 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 4f08: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 4f0c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED rtems_interrupt_enable(level); nToSend = 1; 4f10: e3a06001 mov r6, #1 <== NOT EXECUTED tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 4f14: e1a00006 mov r0, r6 <== NOT EXECUTED 4f18: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 4f1c: e10f3000 mrs r3, CPSR <== NOT EXECUTED 4f20: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 4f24: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); tty->flow_ctrl |= FL_OSTOP; 4f28: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED 4f2c: e3822020 orr r2, r2, #32 <== NOT EXECUTED 4f30: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 4f34: e3a02001 mov r2, #1 <== NOT EXECUTED 4f38: e5842094 str r2, [r4, #148] ; 0x94 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 4f3c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED rtems_interrupt_enable(level); nToSend = 0; 4f40: e3a06000 mov r6, #0 <== NOT EXECUTED 4f44: eaffffb7 b 4e28 <== NOT EXECUTED =============================================================================== 00004cb4 : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 4cb4: e92d40f0 push {r4, r5, r6, r7, lr} 4cb8: e24dd008 sub sp, sp, #8 4cbc: e1a04000 mov r4, r0 4cc0: e28d7007 add r7, sp, #7 while (1) { /* * wait for rtems event */ rtems_event_receive( 4cc4: e3a06000 mov r6, #0 4cc8: ea000005 b 4ce4 } /* * do something */ c = tty->device.pollRead(tty->minor); 4ccc: e5940010 ldr r0, [r4, #16] 4cd0: e1a0e00f mov lr, pc 4cd4: e594f0a0 ldr pc, [r4, #160] ; 0xa0 if (c != EOF) { 4cd8: e3700001 cmn r0, #1 } /* * do something */ c = tty->device.pollRead(tty->minor); 4cdc: e1a03000 mov r3, r0 if (c != EOF) { 4ce0: 1a000010 bne 4d28 while (1) { /* * wait for rtems event */ rtems_event_receive( 4ce4: e1a0300d mov r3, sp 4ce8: e3a01002 mov r1, #2 4cec: e3a02000 mov r2, #0 4cf0: e3a00003 mov r0, #3 4cf4: eb0001d1 bl 5440 (TERMIOS_RX_PROC_EVENT | TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event ); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { 4cf8: e59d3000 ldr r3, [sp] 4cfc: e3130001 tst r3, #1 4d00: 0afffff1 beq 4ccc tty->rxTaskId = 0; 4d04: e58460c4 str r6, [r4, #196] ; 0xc4 <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 4d08: e1a00006 mov r0, r6 <== NOT EXECUTED 4d0c: eb000411 bl 5d58 <== NOT EXECUTED } /* * do something */ c = tty->device.pollRead(tty->minor); 4d10: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 4d14: e1a0e00f mov lr, pc <== NOT EXECUTED 4d18: e594f0a0 ldr pc, [r4, #160] ; 0xa0 <== NOT EXECUTED if (c != EOF) { 4d1c: e3700001 cmn r0, #1 <== NOT EXECUTED } /* * do something */ c = tty->device.pollRead(tty->minor); 4d20: e1a03000 mov r3, r0 <== NOT EXECUTED if (c != EOF) { 4d24: 0affffee beq 4ce4 <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( tty,&c_buf,1); 4d28: e1a00004 mov r0, r4 4d2c: e1a01007 mov r1, r7 4d30: e3a02001 mov r2, #1 c = tty->device.pollRead(tty->minor); if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c; 4d34: e5cd3007 strb r3, [sp, #7] rtems_termios_enqueue_raw_characters ( tty,&c_buf,1); 4d38: ebffff20 bl 49c0 4d3c: eaffffe8 b 4ce4 =============================================================================== 00004f48 : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 4f48: e92d40f0 push {r4, r5, r6, r7, lr} 4f4c: e59f6060 ldr r6, [pc, #96] ; 4fb4 4f50: e24dd004 sub sp, sp, #4 4f54: e1a04000 mov r4, r0 while (1) { /* * wait for rtems event */ rtems_event_receive( 4f58: e3a07000 mov r7, #0 4f5c: ea000008 b 4f84 } /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 4f60: e59430cc ldr r3, [r4, #204] ; 0xcc 4f64: e0863283 add r3, r6, r3, lsl #5 4f68: e5933014 ldr r3, [r3, #20] 4f6c: e3530000 cmp r3, #0 rtems_termios_linesw[tty->t_line].l_start(tty); 4f70: e1a00004 mov r0, r4 4f74: 11a0e00f movne lr, pc 4f78: 112fff13 bxne r3 } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 4f7c: e1a00004 mov r0, r4 4f80: ebffff6e bl 4d40 while (1) { /* * wait for rtems event */ rtems_event_receive( 4f84: e1a0300d mov r3, sp 4f88: e3a01002 mov r1, #2 4f8c: e3a02000 mov r2, #0 4f90: e3a00003 mov r0, #3 4f94: eb000129 bl 5440 (TERMIOS_TX_START_EVENT | TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event ); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { 4f98: e59d3000 ldr r3, [sp] 4f9c: e3130001 tst r3, #1 4fa0: 0affffee beq 4f60 tty->txTaskId = 0; 4fa4: e58470c8 str r7, [r4, #200] ; 0xc8 <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 4fa8: e1a00007 mov r0, r7 <== NOT EXECUTED 4fac: eb000369 bl 5d58 <== NOT EXECUTED 4fb0: eaffffea b 4f60 <== NOT EXECUTED =============================================================================== 00004528 : rtems_status_code rtems_termios_write (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 4528: e5903000 ldr r3, [r0] rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 452c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 4530: e5934034 ldr r4, [r3, #52] ; 0x34 rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 4534: e3a01000 mov r1, #0 rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 4538: e1a05000 mov r5, r0 rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 453c: e1a02001 mov r2, r1 4540: e5940018 ldr r0, [r4, #24] 4544: eb000541 bl 5a50 if (sc != RTEMS_SUCCESSFUL) 4548: e2506000 subs r6, r0, #0 454c: 1a00000c bne 4584 return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 4550: e59420cc ldr r2, [r4, #204] ; 0xcc 4554: e59f3098 ldr r3, [pc, #152] ; 45f4 4558: e0833282 add r3, r3, r2, lsl #5 455c: e593300c ldr r3, [r3, #12] 4560: e3530000 cmp r3, #0 4564: 0a000008 beq 458c sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 4568: e1a00004 mov r0, r4 456c: e1a01005 mov r1, r5 4570: e1a0e00f mov lr, pc 4574: e12fff13 bx r3 4578: e1a06000 mov r6, r0 rtems_semaphore_release (tty->osem); 457c: e5940018 ldr r0, [r4, #24] 4580: eb00057b bl 5b74 rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; } rtems_semaphore_release (tty->osem); return sc; } 4584: e1a00006 mov r0, r6 4588: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} if (rtems_termios_linesw[tty->t_line].l_write != NULL) { sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { 458c: e5943034 ldr r3, [r4, #52] ; 0x34 4590: e3130001 tst r3, #1 4594: 0a000011 beq 45e0 uint32_t count = args->count; 4598: e5958010 ldr r8, [r5, #16] char *buffer = args->buffer; while (count--) 459c: e3580000 cmp r8, #0 rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; 45a0: e595a00c ldr sl, [r5, #12] while (count--) 45a4: 01a03006 moveq r3, r6 45a8: 0a000007 beq 45cc 45ac: e1a07006 mov r7, r6 oproc (*buffer++, tty); 45b0: e7da0007 ldrb r0, [sl, r7] 45b4: e1a01004 mov r1, r4 45b8: e2877001 add r7, r7, #1 45bc: ebfffe46 bl 3edc return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 45c0: e1570008 cmp r7, r8 45c4: 1afffff9 bne 45b0 oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; 45c8: e5953010 ldr r3, [r5, #16] 45cc: e5853018 str r3, [r5, #24] } rtems_semaphore_release (tty->osem); 45d0: e5940018 ldr r0, [r4, #24] 45d4: eb000566 bl 5b74 return sc; } 45d8: e1a00006 mov r0, r6 45dc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} char *buffer = args->buffer; while (count--) oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); 45e0: e285000c add r0, r5, #12 <== NOT EXECUTED 45e4: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED 45e8: e1a02004 mov r2, r4 <== NOT EXECUTED 45ec: ebfffdf3 bl 3dc0 <== NOT EXECUTED 45f0: eafffff4 b 45c8 <== NOT EXECUTED =============================================================================== 00006e50 : { int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) { 6e50: e3100202 tst r0, #536870912 ; 0x20000000 static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 6e54: e92d41f0 push {r4, r5, r6, r7, r8, lr} 6e58: e1a04000 mov r4, r0 6e5c: e1a08001 mov r8, r1 6e60: e1a06002 mov r6, r2 int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) { 6e64: 0a00000d beq 6ea0 if (rtems_panic_in_progress++) 6e68: e59f212c ldr r2, [pc, #300] ; 6f9c 6e6c: e5921000 ldr r1, [r2] 6e70: e2813001 add r3, r1, #1 6e74: e3510000 cmp r1, #0 6e78: e5823000 str r3, [r2] 6e7c: 0a000004 beq 6e94 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 6e80: e59f3118 ldr r3, [pc, #280] ; 6fa0 <== NOT EXECUTED 6e84: e5931000 ldr r1, [r3] <== NOT EXECUTED 6e88: e2811001 add r1, r1, #1 <== NOT EXECUTED 6e8c: e5831000 str r1, [r3] <== NOT EXECUTED RTEMS_COMPILER_MEMORY_BARRIER(); 6e90: e5923000 ldr r3, [r2] <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 6e94: e3530002 cmp r3, #2 return 0; 6e98: c3a06000 movgt r6, #0 if (error_flag & RTEMS_ERROR_PANIC) { if (rtems_panic_in_progress++) _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 6e9c: ca000024 bgt 6f34 return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 6ea0: e59f50fc ldr r5, [pc, #252] ; 6fa4 6ea4: e5953000 ldr r3, [r5] 6ea8: e5930008 ldr r0, [r3, #8] 6eac: eb003312 bl 13afc status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 6eb0: e2147101 ands r7, r4, #1073741824 ; 0x40000000 return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ status = error_flag & ~RTEMS_ERROR_MASK; 6eb4: e3c44207 bic r4, r4, #1879048192 ; 0x70000000 if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 6eb8: 1a00002a bne 6f68 #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); 6ebc: e5953000 ldr r3, [r5] 6ec0: e1a02006 mov r2, r6 6ec4: e1a01008 mov r1, r8 6ec8: e593000c ldr r0, [r3, #12] 6ecc: eb004b77 bl 19cb0 if (status) 6ed0: e3540000 cmp r4, #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); 6ed4: e1a06000 mov r6, r0 if (status) 6ed8: 1a000017 bne 6f3c chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { 6edc: e3570000 cmp r7, #0 6ee0: 0a00000b beq 6f14 if ((local_errno > 0) && *strerror(local_errno)) 6ee4: da000004 ble 6efc 6ee8: e1a00007 mov r0, r7 6eec: eb0036eb bl 14aa0 6ef0: e5d03000 ldrb r3, [r0] 6ef4: e3530000 cmp r3, #0 6ef8: 1a00001d bne 6f74 chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 6efc: e5953000 ldr r3, [r5] 6f00: e59f10a0 ldr r1, [pc, #160] ; 6fa8 6f04: e593000c ldr r0, [r3, #12] 6f08: e1a02007 mov r2, r7 6f0c: eb0033e0 bl 13e94 6f10: e0866000 add r6, r6, r0 } chars_written += fprintf(stderr, "\n"); 6f14: e5953000 ldr r3, [r5] 6f18: e59f108c ldr r1, [pc, #140] ; 6fac 6f1c: e593000c ldr r0, [r3, #12] 6f20: eb0033db bl 13e94 (void) fflush(stderr); 6f24: 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"); 6f28: e0806006 add r6, r0, r6 (void) fflush(stderr); 6f2c: e593000c ldr r0, [r3, #12] 6f30: eb0032f1 bl 13afc return chars_written; } 6f34: e1a00006 mov r0, r6 6f38: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 6f3c: e59f3060 ldr r3, [pc, #96] ; 6fa4 6f40: e5933000 ldr r3, [r3] 6f44: e1a00004 mov r0, r4 6f48: e593400c ldr r4, [r3, #12] 6f4c: ebffffbb bl 6e40 6f50: e59f1058 ldr r1, [pc, #88] ; 6fb0 6f54: e1a02000 mov r2, r0 6f58: e1a00004 mov r0, r4 6f5c: eb0033cc bl 13e94 #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += 6f60: e0866000 add r6, r6, r0 6f64: eaffffdc b 6edc (void) fflush(stdout); /* in case stdout/stderr same */ status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ local_errno = errno; 6f68: eb0031ec bl 13720 <__errno> 6f6c: e5907000 ldr r7, [r0] 6f70: eaffffd1 b 6ebc chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { if ((local_errno > 0) && *strerror(local_errno)) chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 6f74: e5953000 ldr r3, [r5] 6f78: e1a00007 mov r0, r7 6f7c: e593400c ldr r4, [r3, #12] 6f80: eb0036c6 bl 14aa0 6f84: e59f1028 ldr r1, [pc, #40] ; 6fb4 6f88: e1a02000 mov r2, r0 6f8c: e1a00004 mov r0, r4 6f90: eb0033bf bl 13e94 6f94: e0866000 add r6, r6, r0 6f98: eaffffdd b 6f14 =============================================================================== 00002a9c : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 2a9c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} int c; unsigned int i = 0; unsigned int limit = INT_MAX; int sign = 0; 2aa0: e3a06000 mov r6, #0 int d; for (;;) { c = getc(fp); 2aa4: e59f90f8 ldr r9, [pc, #248] ; 2ba4 limit++; continue; } sign = 1; } if (!isdigit(c)) 2aa8: e59f80f8 ldr r8, [pc, #248] ; 2ba8 return 0; d = c - '0'; if ((i > (limit / 10)) 2aac: e59fa0f8 ldr sl, [pc, #248] ; 2bac /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 2ab0: e1a04000 mov r4, r0 2ab4: e1a0b001 mov fp, r1 int c; unsigned int i = 0; unsigned int limit = INT_MAX; 2ab8: e3e07102 mvn r7, #-2147483648 ; 0x80000000 */ static int scanInt(FILE *fp, int *val) { int c; unsigned int i = 0; 2abc: e1a05006 mov r5, r6 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 2ac0: e5943004 ldr r3, [r4, #4] 2ac4: e2433001 sub r3, r3, #1 2ac8: e3530000 cmp r3, #0 2acc: e5843004 str r3, [r4, #4] 2ad0: ba00001d blt 2b4c 2ad4: e5943000 ldr r3, [r4] 2ad8: e4d30001 ldrb r0, [r3], #1 if (c == ':') 2adc: e350003a cmp r0, #58 ; 0x3a unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 2ae0: e5843000 str r3, [r4] if (c == ':') 2ae4: 0a00001d beq 2b60 break; if (sign == 0) { 2ae8: e3560000 cmp r6, #0 2aec: 1a000004 bne 2b04 if (c == '-') { 2af0: e350002d cmp r0, #45 ; 0x2d sign = -1; limit++; 2af4: 02877001 addeq r7, r7, #1 c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { sign = -1; 2af8: 03e06000 mvneq r6, #0 for (;;) { c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { 2afc: 0affffef beq 2ac0 sign = -1; limit++; continue; } sign = 1; 2b00: e3a06001 mov r6, #1 } if (!isdigit(c)) 2b04: e5983000 ldr r3, [r8] 2b08: e0833000 add r3, r3, r0 2b0c: e5d33001 ldrb r3, [r3, #1] 2b10: e2133004 ands r3, r3, #4 2b14: 0a00001e beq 2b94 return 0; d = c - '0'; if ((i > (limit / 10)) 2b18: e083279a umull r2, r3, sl, r7 2b1c: e15501a3 cmp r5, r3, lsr #3 2b20: 8a000019 bhi 2b8c } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; 2b24: e2400030 sub r0, r0, #48 ; 0x30 2b28: 11a03105 lslne r3, r5, #2 if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) 2b2c: 0a000011 beq 2b78 return 0; i = i * 10 + d; 2b30: e0835005 add r5, r3, r5 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 2b34: e5943004 ldr r3, [r4, #4] 2b38: e2433001 sub r3, r3, #1 2b3c: e3530000 cmp r3, #0 return 0; d = c - '0'; if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 2b40: e0805085 add r5, r0, r5, lsl #1 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 2b44: e5843004 str r3, [r4, #4] 2b48: aaffffe1 bge 2ad4 2b4c: e5990000 ldr r0, [r9] <== NOT EXECUTED 2b50: e1a01004 mov r1, r4 <== NOT EXECUTED 2b54: eb003697 bl 105b8 <__srget_r> <== NOT EXECUTED if (c == ':') 2b58: e350003a cmp r0, #58 ; 0x3a <== NOT EXECUTED 2b5c: 1affffe1 bne 2ae8 <== NOT EXECUTED if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; } if (sign == 0) 2b60: e3560000 cmp r6, #0 2b64: 0a00000c beq 2b9c return 0; *val = i * sign; 2b68: e0050596 mul r5, r6, r5 return 1; 2b6c: e3a00001 mov r0, #1 return 0; i = i * 10 + d; } if (sign == 0) return 0; *val = i * sign; 2b70: e58b5000 str r5, [fp] return 1; 2b74: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) 2b78: e1a03105 lsl r3, r5, #2 2b7c: e0832005 add r2, r3, r5 2b80: e0472082 sub r2, r7, r2, lsl #1 2b84: e1500002 cmp r0, r2 2b88: 9affffe8 bls 2b30 return 0; 2b8c: e3a00000 mov r0, #0 2b90: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} continue; } sign = 1; } if (!isdigit(c)) return 0; 2b94: e1a00003 mov r0, r3 2b98: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; } if (sign == 0) return 0; 2b9c: e1a00006 mov r0, r6 <== NOT EXECUTED *val = i * sign; return 1; } 2ba0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED =============================================================================== 00002ca4 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 2ca4: e92d41f0 push {r4, r5, r6, r7, r8, lr} 2ca8: e24dd014 sub sp, sp, #20 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 2cac: e28d5008 add r5, sp, #8 2cb0: e28d4004 add r4, sp, #4 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 2cb4: e58d2008 str r2, [sp, #8] 2cb8: e58d3004 str r3, [sp, #4] int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 2cbc: e3a06000 mov r6, #0 2cc0: e1a02005 mov r2, r5 2cc4: e1a03004 mov r3, r4 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 2cc8: e1a07000 mov r7, r0 2ccc: e1a08001 mov r8, r1 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 2cd0: e58d6000 str r6, [sp] 2cd4: ebffffb5 bl 2bb0 2cd8: e3500000 cmp r0, #0 2cdc: 1a000001 bne 2ce8 grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; return 1; } 2ce0: e28dd014 add sp, sp, #20 2ce4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) 2ce8: e1a00007 mov r0, r7 2cec: e2881004 add r1, r8, #4 2cf0: e1a02005 mov r2, r5 2cf4: e1a03004 mov r3, r4 2cf8: e58d6000 str r6, [sp] 2cfc: ebffffab bl 2bb0 2d00: e3500000 cmp r0, #0 2d04: 0afffff5 beq 2ce0 || !scanInt(fp, &grgid) 2d08: e1a00007 mov r0, r7 2d0c: e28d1010 add r1, sp, #16 2d10: ebffff61 bl 2a9c 2d14: e3500000 cmp r0, #0 2d18: 0afffff0 beq 2ce0 || !scanString(fp, &grmem, &buffer, &bufsize, 1)) 2d1c: e3a06001 mov r6, #1 2d20: e1a00007 mov r0, r7 2d24: e28d100c add r1, sp, #12 2d28: e1a02005 mov r2, r5 2d2c: e1a03004 mov r3, r4 2d30: e58d6000 str r6, [sp] 2d34: ebffff9d bl 2bb0 2d38: e3500000 cmp r0, #0 2d3c: 0affffe7 beq 2ce0 return 0; grp->gr_gid = grgid; 2d40: e1dd31b0 ldrh r3, [sp, #16] /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 2d44: e59d100c ldr r1, [sp, #12] if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) return 0; grp->gr_gid = grgid; 2d48: e1c830b8 strh r3, [r8, #8] /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 2d4c: e5d13000 ldrb r3, [r1] 2d50: e3530000 cmp r3, #0 2d54: 03a06017 moveq r6, #23 2d58: 0a000007 beq 2d7c 2d5c: e1a02001 mov r2, r1 if(*cp == ',') 2d60: e353002c cmp r3, #44 ; 0x2c grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 2d64: e5f23001 ldrb r3, [r2, #1]! if(*cp == ',') memcount++; 2d68: 02866001 addeq r6, r6, #1 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 2d6c: e3530000 cmp r3, #0 2d70: 1afffffa bne 2d60 2d74: e1a06106 lsl r6, r6, #2 2d78: e2866013 add r6, r6, #19 } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 2d7c: e59d3004 ldr r3, [sp, #4] 2d80: e1530006 cmp r3, r6 return 0; 2d84: 33a00000 movcc r0, #0 } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 2d88: 3affffd4 bcc 2ce0 return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 2d8c: e59d0008 ldr r0, [sp, #8] 2d90: e280000f add r0, r0, #15 2d94: e3c0000f bic r0, r0, #15 2d98: e588000c str r0, [r8, #12] /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 2d9c: e5801000 str r1, [r0] for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 2da0: e59d200c ldr r2, [sp, #12] 2da4: e5d23000 ldrb r3, [r2] 2da8: e3530000 cmp r3, #0 2dac: 0a000010 beq 2df4 } /* * Extract a single group record from the database */ static int scangr( 2db0: e2822001 add r2, r2, #1 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 2db4: e3a01001 mov r1, #1 if(*cp == ',') { *cp = '\0'; 2db8: e3a00000 mov r0, #0 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') { 2dbc: e353002c cmp r3, #44 ; 0x2c *cp = '\0'; 2dc0: 05420001 strbeq r0, [r2, #-1] grp->gr_mem[memcount++] = cp + 1; 2dc4: 0598300c ldreq r3, [r8, #12] 2dc8: 07832101 streq r2, [r3, r1, lsl #2] /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 2dcc: e4d23001 ldrb r3, [r2], #1 if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; 2dd0: 02811001 addeq r1, r1, #1 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 2dd4: e3530000 cmp r3, #0 2dd8: 1afffff7 bne 2dbc 2ddc: e598000c ldr r0, [r8, #12] 2de0: e1a01101 lsl r1, r1, #2 if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 2de4: e3a03000 mov r3, #0 2de8: e7803001 str r3, [r0, r1] return 1; 2dec: e3a00001 mov r0, #1 2df0: eaffffba b 2ce0 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 2df4: e3a01004 mov r1, #4 <== NOT EXECUTED 2df8: eafffff9 b 2de4 <== NOT EXECUTED =============================================================================== 00008b4c : int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { 8b4c: e92d4010 push {r4, lr} 8b50: e24dd004 sub sp, sp, #4 8b54: e1a04000 mov r4, r0 * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 8b58: e1a00001 mov r0, r1 8b5c: e1a0100d mov r1, sp 8b60: eb001670 bl e528 <_POSIX_Absolute_timeout_to_ticks> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) 8b64: e3500003 cmp r0, #3 8b68: 0a000005 beq 8b84 do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 8b6c: e1a00004 mov r0, r4 8b70: e3a01000 mov r1, #0 8b74: e59d2000 ldr r2, [sp] 8b78: eb001986 bl f198 <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED lock_status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) rtems_set_errno_and_return_minus_one( ETIMEDOUT ); } return lock_status; } 8b7c: e28dd004 add sp, sp, #4 8b80: e8bd8010 pop {r4, pc} */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 8b84: e1a00004 mov r0, r4 8b88: e3a01001 mov r1, #1 8b8c: e59d2000 ldr r2, [sp] 8b90: eb001980 bl f198 <_POSIX_Semaphore_Wait_support> 8b94: eafffff8 b 8b7c =============================================================================== 000063a4 : struct sigaction *oact ) { ISR_Level level; if ( oact ) 63a4: e2523000 subs r3, r2, #0 *oact = _POSIX_signals_Vectors[ sig ]; 63a8: 159f20c4 ldrne r2, [pc, #196] ; 6474 int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { 63ac: e92d4070 push {r4, r5, r6, lr} 63b0: e1a05001 mov r5, r1 ISR_Level level; if ( oact ) *oact = _POSIX_signals_Vectors[ sig ]; 63b4: 10801080 addne r1, r0, r0, lsl #1 63b8: 10822101 addne r2, r2, r1, lsl #2 int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { 63bc: e1a04000 mov r4, r0 ISR_Level level; if ( oact ) *oact = _POSIX_signals_Vectors[ sig ]; 63c0: 18920007 ldmne r2, {r0, r1, r2} 63c4: 18830007 stmne r3, {r0, r1, r2} if ( !sig ) 63c8: e3540000 cmp r4, #0 63cc: 0a000023 beq 6460 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 63d0: e2443001 sub r3, r4, #1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 63d4: e353001f cmp r3, #31 63d8: 8a000020 bhi 6460 * * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) 63dc: e3540009 cmp r4, #9 63e0: 0a00001e beq 6460 /* * Evaluate the new action structure and set the global signal vector * appropriately. */ if ( act ) { 63e4: e3550000 cmp r5, #0 63e8: 0a00001a beq 6458 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 63ec: e10f6000 mrs r6, CPSR 63f0: e3863080 orr r3, r6, #128 ; 0x80 63f4: 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 ) { 63f8: e5953008 ldr r3, [r5, #8] 63fc: e3530000 cmp r3, #0 6400: 0a000009 beq 642c _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; } else { _POSIX_signals_Clear_process_signals( sig ); 6404: e1a00004 mov r0, r4 6408: eb001743 bl c11c <_POSIX_signals_Clear_process_signals> _POSIX_signals_Vectors[ sig ] = *act; 640c: e59f3060 ldr r3, [pc, #96] ; 6474 6410: e8950007 ldm r5, {r0, r1, r2} 6414: e0844084 add r4, r4, r4, lsl #1 6418: e0834104 add r4, r3, r4, lsl #2 641c: e8840007 stm r4, {r0, r1, r2} static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 6420: 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; 6424: e3a00000 mov r0, #0 6428: e8bd8070 pop {r4, r5, r6, pc} * we can just copy the provided sigaction structure into the vectors. */ _ISR_Disable( level ); if ( act->sa_handler == SIG_DFL ) { _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; 642c: e0844084 add r4, r4, r4, lsl #1 6430: e59f3040 ldr r3, [pc, #64] ; 6478 6434: e1a04104 lsl r4, r4, #2 6438: e0833004 add r3, r3, r4 643c: e8930007 ldm r3, {r0, r1, r2} 6440: e59f302c ldr r3, [pc, #44] ; 6474 6444: e0834004 add r4, r3, r4 6448: e8840007 stm r4, {r0, r1, r2} 644c: 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; 6450: e3a00000 mov r0, #0 6454: e8bd8070 pop {r4, r5, r6, pc} 6458: e1a00005 mov r0, r5 <== NOT EXECUTED } 645c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) rtems_set_errno_and_return_minus_one( EINVAL ); 6460: eb0023a5 bl f2fc <__errno> 6464: e3a03016 mov r3, #22 6468: e5803000 str r3, [r0] 646c: e3e00000 mvn r0, #0 6470: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== 00008a14 : int sigwait( const sigset_t *set, int *sig ) { 8a14: e92d4010 push {r4, lr} 8a18: e1a04001 mov r4, r1 int status; status = sigtimedwait( set, NULL, NULL ); 8a1c: e3a01000 mov r1, #0 8a20: e1a02001 mov r2, r1 8a24: ebffff7f bl 8828 if ( status != -1 ) { 8a28: e3700001 cmn r0, #1 8a2c: 0a000005 beq 8a48 if ( sig ) 8a30: e3540000 cmp r4, #0 *sig = status; 8a34: 15840000 strne r0, [r4] return 0; 8a38: 13a00000 movne r0, #0 int status; status = sigtimedwait( set, NULL, NULL ); if ( status != -1 ) { if ( sig ) 8a3c: 18bd8010 popne {r4, pc} *sig = status; return 0; 8a40: e1a00004 mov r0, r4 <== NOT EXECUTED } return errno; } 8a44: e8bd8010 pop {r4, pc} <== NOT EXECUTED if ( sig ) *sig = status; return 0; } return errno; 8a48: eb002305 bl 11664 <__errno> 8a4c: e5900000 ldr r0, [r0] 8a50: e8bd8010 pop {r4, pc} =============================================================================== 000044c8 : int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 44c8: e591303c ldr r3, [r1, #60] ; 0x3c 44cc: e3c33f61 bic r3, r3, #388 ; 0x184 44d0: e3c33003 bic r3, r3, #3 44d4: e1a03a03 lsl r3, r3, #20 44d8: e1a03a23 lsr r3, r3, #20 44dc: e3530000 cmp r3, #0 /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 44e0: e92d4030 push {r4, r5, lr} 44e4: e1a04001 mov r4, r1 44e8: 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)) { 44ec: 1a000001 bne 44f8 } else { i = iproc (c, tty); } return i; } 44f0: 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); 44f4: eaffff7f b 42f8 <== NOT EXECUTED /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 44f8: e3a01000 mov r1, #0 44fc: e1a02001 mov r2, r1 4500: e5940018 ldr r0, [r4, #24] 4504: eb000551 bl 5a50 i = iproc (c, tty); 4508: e1a01004 mov r1, r4 450c: e1a00005 mov r0, r5 4510: ebffff78 bl 42f8 4514: e1a05000 mov r5, r0 rtems_semaphore_release (tty->osem); 4518: e5940018 ldr r0, [r4, #24] 451c: eb000594 bl 5b74 } else { i = iproc (c, tty); } return i; } 4520: e1a00005 mov r0, r5 4524: e8bd8030 pop {r4, r5, pc} =============================================================================== 000061c4 : #include int unlink( const char *path ) { 61c4: e92d40f0 push {r4, r5, r6, r7, lr} 61c8: e24dd030 sub sp, sp, #48 ; 0x30 61cc: e1a07000 mov r7, r0 /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 61d0: ebfff453 bl 3324 if ( parentpathlen == 0 ) 61d4: e2505000 subs r5, r0, #0 61d8: 1a000039 bne 62c4 rtems_filesystem_get_start_loc( path, &i, &parentloc ); 61dc: e28d4018 add r4, sp, #24 61e0: e1a00007 mov r0, r7 61e4: e28d102c add r1, sp, #44 ; 0x2c 61e8: e1a02004 mov r2, r4 61ec: ebfff85e bl 436c const char *name; rtems_filesystem_location_info_t parentloc; rtems_filesystem_location_info_t loc; int i; int result; bool free_parentloc = false; 61f0: e1a06005 mov r6, r5 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 61f4: e1a0e004 mov lr, r4 61f8: e8be000f ldm lr!, {r0, r1, r2, r3} 61fc: e28dc004 add ip, sp, #4 6200: e8ac000f stmia ip!, {r0, r1, r2, r3} name = path + parentpathlen; 6204: e0875005 add r5, r7, r5 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 6208: e59e3000 ldr r3, [lr] name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 620c: e1a00005 mov r0, r5 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 6210: e58c3000 str r3, [ip] name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 6214: eb003363 bl 12fa8 6218: e1a01000 mov r1, r0 621c: e1a00005 mov r0, r5 6220: ebfff44e bl 3360 6224: e0857000 add r7, r5, r0 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 6228: e1a00007 mov r0, r7 622c: eb00335d bl 12fa8 6230: e28d5004 add r5, sp, #4 6234: e1a01000 mov r1, r0 6238: e3a02000 mov r2, #0 623c: e1a00007 mov r0, r7 6240: e1a03005 mov r3, r5 6244: e58d2000 str r2, [sp] 6248: ebfff403 bl 325c 0, &loc, false ); if ( result != 0 ) { 624c: e3500000 cmp r0, #0 6250: 1a000013 bne 62a4 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return -1; } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { 6254: e1a00005 mov r0, r5 6258: e59d3010 ldr r3, [sp, #16] 625c: e1a0e00f mov lr, pc 6260: e593f010 ldr pc, [r3, #16] 6264: e3500001 cmp r0, #1 6268: 0a000021 beq 62f4 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( EISDIR ); } result = (*loc.ops->unlink_h)( &parentloc, &loc ); 626c: e1a01005 mov r1, r5 6270: e59d3010 ldr r3, [sp, #16] 6274: e1a00004 mov r0, r4 6278: e1a0e00f mov lr, pc 627c: e593f00c ldr pc, [r3, #12] 6280: e1a07000 mov r7, r0 rtems_filesystem_freenode( &loc ); 6284: e1a00005 mov r0, r5 6288: ebfff449 bl 33b4 if ( free_parentloc ) 628c: e3560000 cmp r6, #0 rtems_filesystem_freenode( &parentloc ); 6290: 11a00004 movne r0, r4 6294: 1bfff446 blne 33b4 return result; } 6298: e1a00007 mov r0, r7 629c: e28dd030 add sp, sp, #48 ; 0x30 62a0: e8bd80f0 pop {r4, r5, r6, r7, pc} name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) 62a4: e3560000 cmp r6, #0 62a8: 1a000001 bne 62b4 rtems_filesystem_freenode( &parentloc ); return -1; 62ac: e3e07000 mvn r7, #0 62b0: eafffff8 b 6298 <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 62b4: e1a00004 mov r0, r4 62b8: ebfff43d bl 33b4 return -1; 62bc: e3e07000 mvn r7, #0 62c0: eafffff4 b 6298 parentpathlen = rtems_filesystem_dirname ( path ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( path, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path( path, parentpathlen, 62c4: e3a03000 mov r3, #0 62c8: e28d4018 add r4, sp, #24 62cc: e58d3000 str r3, [sp] 62d0: e3a02002 mov r2, #2 62d4: e1a00007 mov r0, r7 62d8: e1a01005 mov r1, r5 62dc: e1a03004 mov r3, r4 62e0: ebfff3f9 bl 32cc RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 62e4: e3500000 cmp r0, #0 62e8: 1affffef bne 62ac return -1; free_parentloc = true; 62ec: e3a06001 mov r6, #1 62f0: eaffffbf b 61f4 rtems_filesystem_freenode( &parentloc ); return -1; } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); 62f4: e1a00005 mov r0, r5 62f8: ebfff42d bl 33b4 if ( free_parentloc ) 62fc: e3560000 cmp r6, #0 rtems_filesystem_freenode( &parentloc ); 6300: 11a00004 movne r0, r4 6304: 1bfff42a blne 33b4 rtems_set_errno_and_return_minus_one( EISDIR ); 6308: eb002f67 bl 120ac <__errno> 630c: e3a03015 mov r3, #21 6310: e5803000 str r3, [r0] 6314: e3e07000 mvn r7, #0 6318: eaffffde b 6298 =============================================================================== 0000638c : */ int unmount( const char *path ) { 638c: e92d4070 push {r4, r5, r6, lr} 6390: e24dd018 sub sp, sp, #24 6394: 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 ) ) 6398: eb002818 bl 10400 639c: e28d4004 add r4, sp, #4 63a0: e1a01000 mov r1, r0 63a4: e3a0c001 mov ip, #1 63a8: e1a00005 mov r0, r5 63ac: e3a02000 mov r2, #0 63b0: e1a03004 mov r3, r4 63b4: e58dc000 str ip, [sp] 63b8: ebfff332 bl 3088 63bc: e3500000 cmp r0, #0 63c0: 1a00001a bne 6430 return -1; mt_entry = loc.mt_entry; 63c4: 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 ){ 63c8: e59d3004 ldr r3, [sp, #4] 63cc: e595201c ldr r2, [r5, #28] 63d0: e1520003 cmp r2, r3 63d4: 1a00002d bne 6490 /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 63d8: e1a00004 mov r0, r4 63dc: ebfff363 bl 3170 * 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 ) 63e0: e59f30f8 ldr r3, [pc, #248] ; 64e0 63e4: e5933000 ldr r3, [r3] 63e8: e5933014 ldr r3, [r3, #20] 63ec: e1530005 cmp r3, r5 63f0: 0a00002d beq 64ac /* * Verify there are no file systems below the path specified */ if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point, 63f4: e59f00e8 ldr r0, [pc, #232] ; 64e4 63f8: e595102c ldr r1, [r5, #44] ; 0x2c 63fc: ebfff5af bl 3ac0 6400: e3500000 cmp r0, #0 6404: 1a000028 bne 64ac * 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 ) 6408: e1a00005 mov r0, r5 640c: ebfff451 bl 3558 6410: e3500001 cmp r0, #1 6414: 0a000024 beq 64ac * 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 ) 6418: e5953014 ldr r3, [r5, #20] 641c: e1a00005 mov r0, r5 6420: e1a0e00f mov lr, pc 6424: e593f028 ldr pc, [r3, #40] ; 0x28 6428: e2506000 subs r6, r0, #0 642c: 0a000002 beq 643c */ 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; 6430: e3e00000 mvn r0, #0 rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 6434: e28dd018 add sp, sp, #24 6438: e8bd8070 pop {r4, r5, r6, pc} * NOTE: Fatal error is called in a case which should never happen * This was response was questionable but the best we could * come up with. */ if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){ 643c: e5953028 ldr r3, [r5, #40] ; 0x28 6440: e1a00005 mov r0, r5 6444: e1a0e00f mov lr, pc 6448: e593f02c ldr pc, [r3, #44] ; 0x2c 644c: e2504000 subs r4, r0, #0 6450: 1a00001a bne 64c0 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 ); 6454: e59f608c ldr r6, [pc, #140] ; 64e8 6458: e1a01004 mov r1, r4 645c: e1a02004 mov r2, r4 6460: e5960000 ldr r0, [r6] 6464: eb00028c bl 6e9c */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 6468: e1a00005 mov r0, r5 646c: eb0004f2 bl 783c <_Chain_Extract> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 6470: e5960000 ldr r0, [r6] 6474: eb0002d1 bl 6fc0 /* * 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 ); 6478: e2850008 add r0, r5, #8 647c: ebfff33b bl 3170 free( mt_entry ); 6480: e1a00005 mov r0, r5 6484: ebfff33e bl 3184 return 0; 6488: e1a00004 mov r0, r4 648c: eaffffe8 b 6434 /* * Verify this is the root node for the file system to be unmounted. */ if ( fs_root_loc->node_access != loc.node_access ){ rtems_filesystem_freenode( &loc ); 6490: e1a00004 mov r0, r4 6494: ebfff335 bl 3170 rtems_set_errno_and_return_minus_one( EACCES ); 6498: eb002260 bl ee20 <__errno> 649c: e3a0300d mov r3, #13 64a0: e5803000 str r3, [r0] 64a4: e3e00000 mvn r0, #0 64a8: eaffffe1 b 6434 * descriptors that are currently active and reference nodes in the * file system that we are trying to unmount */ if ( rtems_libio_is_open_files_in_fs( mt_entry ) == 1 ) rtems_set_errno_and_return_minus_one( EBUSY ); 64ac: eb00225b bl ee20 <__errno> 64b0: e3a03010 mov r3, #16 64b4: e5803000 str r3, [r0] 64b8: e3e00000 mvn r0, #0 64bc: eaffffdc b 6434 * This was response was questionable but the best we could * come up with. */ if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){ if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) 64c0: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED 64c4: e1a00005 mov r0, r5 <== NOT EXECUTED 64c8: e1a0e00f mov lr, pc <== NOT EXECUTED 64cc: e593f020 ldr pc, [r3, #32] <== NOT EXECUTED 64d0: e3500000 cmp r0, #0 <== NOT EXECUTED 64d4: 0affffd5 beq 6430 <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 64d8: e1a00006 mov r0, r6 <== NOT EXECUTED 64dc: eb000400 bl 74e4 <== NOT EXECUTED =============================================================================== 00005030 : */ void vprintk( const char *fmt, va_list ap ) { 5030: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 5034: e1a0a000 mov sl, r0 for (; *fmt != '\0'; fmt++) { 5038: e5d00000 ldrb r0, [r0] */ void vprintk( const char *fmt, va_list ap ) { 503c: e24dd01c sub sp, sp, #28 for (; *fmt != '\0'; fmt++) { 5040: e3500000 cmp r0, #0 */ void vprintk( const char *fmt, va_list ap ) { 5044: e58d1000 str r1, [sp] for (; *fmt != '\0'; fmt++) { 5048: 0a00006e beq 5208 bool sign = false; char lead = ' '; char c; if (*fmt != '%') { BSP_output_char(*fmt); 504c: e59f8340 ldr r8, [pc, #832] ; 5394 * console is not yet initialized or in ISR's. * * Arguments: * as in printf: fmt - format string, ... - unnamed arguments. */ void vprintk( 5050: e28db008 add fp, sp, #8 bool minus = false; bool sign = false; char lead = ' '; char c; if (*fmt != '%') { 5054: e3500025 cmp r0, #37 ; 0x25 5058: 1a00006d bne 5214 BSP_output_char(*fmt); continue; } fmt++; if (*fmt == '0' ) { 505c: e5fa3001 ldrb r3, [sl, #1]! 5060: e3530030 cmp r3, #48 ; 0x30 lead = '0'; fmt++; 5064: 05fa3001 ldrbeq r3, [sl, #1]! BSP_output_char(*fmt); continue; } fmt++; if (*fmt == '0' ) { lead = '0'; 5068: 03a02030 moveq r2, #48 ; 0x30 unsigned base = 0; unsigned width = 0; bool lflag = false; bool minus = false; bool sign = false; char lead = ' '; 506c: 13a02020 movne r2, #32 BSP_output_char(*fmt); continue; } fmt++; if (*fmt == '0' ) { lead = '0'; 5070: 058d2004 streq r2, [sp, #4] unsigned base = 0; unsigned width = 0; bool lflag = false; bool minus = false; bool sign = false; char lead = ' '; 5074: 158d2004 strne r2, [sp, #4] fmt++; if (*fmt == '0' ) { lead = '0'; fmt++; } if (*fmt == '-' ) { 5078: e353002d cmp r3, #45 ; 0x2d minus = true; fmt++; 507c: 05fa3001 ldrbeq r3, [sl, #1]! } while (*fmt >= '0' && *fmt <= '9' ) { 5080: e2432030 sub r2, r3, #48 ; 0x30 if (*fmt == '0' ) { lead = '0'; fmt++; } if (*fmt == '-' ) { minus = true; 5084: 03a09001 moveq r9, #1 { for (; *fmt != '\0'; fmt++) { unsigned base = 0; unsigned width = 0; bool lflag = false; bool minus = false; 5088: 13a09000 movne r9, #0 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 508c: e3520009 cmp r2, #9 5090: 83a06000 movhi r6, #0 5094: 8a000009 bhi 50c0 * console is not yet initialized or in ISR's. * * Arguments: * as in printf: fmt - format string, ... - unnamed arguments. */ void vprintk( 5098: e28a2001 add r2, sl, #1 509c: e3a06000 mov r6, #0 if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { width *= 10; 50a0: e0866106 add r6, r6, r6, lsl #2 width += ((unsigned) *fmt - '0'); 50a4: e0836086 add r6, r3, r6, lsl #1 50a8: e1a0a002 mov sl, r2 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 50ac: e4d23001 ldrb r3, [r2], #1 50b0: e2431030 sub r1, r3, #48 ; 0x30 50b4: e3510009 cmp r1, #9 width *= 10; width += ((unsigned) *fmt - '0'); 50b8: e2466030 sub r6, r6, #48 ; 0x30 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 50bc: 9afffff7 bls 50a0 width *= 10; width += ((unsigned) *fmt - '0'); fmt++; } if ((c = *fmt) == 'l') { 50c0: e353006c cmp r3, #108 ; 0x6c lflag = true; c = *++fmt; 50c4: 05fa3001 ldrbeq r3, [sl, #1]! } if ( c == 'c' ) { 50c8: e3530063 cmp r3, #99 ; 0x63 50cc: 0a00008c beq 5304 /* need a cast here since va_arg() only takes fully promoted types */ char chr = (char) va_arg(ap, int); BSP_output_char(chr); continue; } if ( c == 's' ) { 50d0: e3530073 cmp r3, #115 ; 0x73 50d4: 0a000054 beq 522c continue; } /* must be a numeric format or something unsupported */ if ( c == 'o' || c == 'O' ) { 50d8: e353006f cmp r3, #111 ; 0x6f 50dc: 1353004f cmpne r3, #79 ; 0x4f base = 8; sign = false; 50e0: 03a03000 moveq r3, #0 50e4: 03a09008 moveq r9, #8 continue; } /* must be a numeric format or something unsupported */ if ( c == 'o' || c == 'O' ) { 50e8: 0a000009 beq 5114 base = 8; sign = false; } else if ( c == 'i' || c == 'I' || 50ec: e3530069 cmp r3, #105 ; 0x69 50f0: 13530049 cmpne r3, #73 ; 0x49 50f4: 0a000004 beq 510c c == 'd' || c == 'D' ) { 50f8: e3530064 cmp r3, #100 ; 0x64 50fc: 13530044 cmpne r3, #68 ; 0x44 5100: 13a01000 movne r1, #0 5104: 03a01001 moveq r1, #1 5108: 1a000087 bne 532c base = 10; sign = true; 510c: e3a03001 mov r3, #1 5110: e3a0900a mov r9, #10 } else { BSP_output_char(c); continue; } printNum( 5114: e59d2000 ldr r2, [sp] unsigned long unsigned_num; unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { 5118: e3530000 cmp r3, #0 } else { BSP_output_char(c); continue; } printNum( 511c: e5927000 ldr r7, [r2] lflag ? va_arg(ap, long) : (long) va_arg(ap, int), 5120: e2822004 add r2, r2, #4 5124: e58d2000 str r2, [sp] unsigned long unsigned_num; unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { 5128: 0a000001 beq 5134 512c: e3570000 cmp r7, #0 5130: ba000090 blt 5378 } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 5134: e1a00007 mov r0, r7 5138: e1a01009 mov r1, r9 513c: eb003141 bl 11648 <__aeabi_uidiv> 5140: e3500000 cmp r0, #0 5144: e1a04000 mov r4, r0 5148: e1a05000 mov r5, r0 514c: 01a04007 moveq r4, r7 5150: 03a07001 moveq r7, #1 5154: 0a000010 beq 519c 5158: e20930ff and r3, r9, #255 ; 0xff 515c: e1a02007 mov r2, r7 if (maxwidth) maxwidth--; } else { unsigned_num = (unsigned long) num; } count = 0; 5160: e3a05000 mov r5, #0 5164: e1a07003 mov r7, r3 5168: ea000001 b 5174 while ((n = unsigned_num / base) > 0) { 516c: e1a02004 mov r2, r4 5170: e1a04000 mov r4, r0 toPrint[count++] = (char) (unsigned_num - (n * base)); 5174: e0030794 mul r3, r4, r7 5178: e0633002 rsb r3, r3, r2 517c: e7cb3005 strb r3, [fp, r5] } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 5180: e1a00004 mov r0, r4 5184: e1a01009 mov r1, r9 5188: eb00312e bl 11648 <__aeabi_uidiv> 518c: e3500000 cmp r0, #0 toPrint[count++] = (char) (unsigned_num - (n * base)); 5190: e2855001 add r5, r5, #1 } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 5194: 1afffff4 bne 516c 5198: e2857001 add r7, r5, #1 toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; 519c: e28d301c add r3, sp, #28 51a0: e0835005 add r5, r3, r5 for (n=maxwidth ; n > count; n-- ) 51a4: e1570006 cmp r7, r6 count = 0; while ((n = unsigned_num / base) > 0) { toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; 51a8: e5454014 strb r4, [r5, #-20] for (n=maxwidth ; n > count; n-- ) 51ac: 2a000006 bcs 51cc 51b0: e59d4004 ldr r4, [sp, #4] BSP_output_char(lead); 51b4: e1a00004 mov r0, r4 toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) 51b8: e2466001 sub r6, r6, #1 BSP_output_char(lead); 51bc: e1a0e00f mov lr, pc 51c0: e598f000 ldr pc, [r8] toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) 51c4: e1570006 cmp r7, r6 51c8: 3afffff9 bcc 51b4 BSP_output_char(lead); for (n = 0; n < count; n++) { 51cc: e3570000 cmp r7, #0 51d0: 0a000009 beq 51fc * console is not yet initialized or in ISR's. * * Arguments: * as in printf: fmt - format string, ... - unnamed arguments. */ void vprintk( 51d4: e08b5007 add r5, fp, r7 51d8: e3a04000 mov r4, #0 for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 51dc: e5753001 ldrb r3, [r5, #-1]! 51e0: e59f21b0 ldr r2, [pc, #432] ; 5398 toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 51e4: e2844001 add r4, r4, #1 BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 51e8: e7d20003 ldrb r0, [r2, r3] 51ec: e1a0e00f mov lr, pc 51f0: e598f000 ldr pc, [r8] toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 51f4: e1570004 cmp r7, r4 51f8: 8afffff7 bhi 51dc void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { 51fc: e5fa0001 ldrb r0, [sl, #1]! 5200: e3500000 cmp r0, #0 5204: 1affff92 bne 5054 sign, width, lead ); } } 5208: e28dd01c add sp, sp, #28 520c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} } else if ( c == 'x' || c == 'X' ) { base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; } else { BSP_output_char(c); 5210: e1a00003 mov r0, r3 5214: e1a0e00f mov lr, pc 5218: e598f000 ldr pc, [r8] void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { 521c: e5fa0001 ldrb r0, [sl, #1]! 5220: e3500000 cmp r0, #0 5224: 1affff8a bne 5054 5228: eafffff6 b 5208 } if ( c == 's' ) { unsigned i, len; char *s, *str; str = va_arg(ap, char *); 522c: e59d2000 ldr r2, [sp] 5230: e5925000 ldr r5, [r2] if ( str == NULL ) { str = ""; 5234: e59f3160 ldr r3, [pc, #352] ; 539c 5238: e3550000 cmp r5, #0 523c: 01a05003 moveq r5, r3 } /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) 5240: e5d54000 ldrb r4, [r5] } if ( c == 's' ) { unsigned i, len; char *s, *str; str = va_arg(ap, char *); 5244: e2822004 add r2, r2, #4 if ( str == NULL ) { str = ""; } /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) 5248: e3540000 cmp r4, #0 } if ( c == 's' ) { unsigned i, len; char *s, *str; str = va_arg(ap, char *); 524c: e58d2000 str r2, [sp] if ( str == NULL ) { str = ""; } /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) 5250: 0a000005 beq 526c 5254: e1a03005 mov r3, r5 5258: e3a04000 mov r4, #0 525c: e5f32001 ldrb r2, [r3, #1]! 5260: e3520000 cmp r2, #0 5264: e2844001 add r4, r4, #1 5268: 1afffffb bne 525c ; /* leading spaces */ if ( !minus ) 526c: e3590000 cmp r9, #0 5270: 1a000008 bne 5298 for ( i=len ; i 527c: e1a07004 mov r7, r4 BSP_output_char(' '); 5280: e3a00020 mov r0, #32 for ( len=0, s=str ; *s ; len++, s++ ) ; /* leading spaces */ if ( !minus ) for ( i=len ; i BSP_output_char(' '); /* no width option */ if (width == 0) { 5298: e3560000 cmp r6, #0 529c: 1a000002 bne 52ac width = len; } /* output the string */ for ( i=0 ; i 52a8: e1a06004 mov r6, r4 52ac: e5d50000 ldrb r0, [r5] 52b0: e3500000 cmp r0, #0 52b4: 0a000004 beq 52cc BSP_output_char(*str); 52b8: e1a0e00f mov lr, pc 52bc: e598f000 ldr pc, [r8] if (width == 0) { width = len; } /* output the string */ for ( i=0 ; i BSP_output_char(*str); /* trailing spaces */ if ( minus ) 52cc: e3590000 cmp r9, #0 52d0: 0affffc9 beq 51fc for ( i=len ; i BSP_output_char(' '); 52dc: e3a00020 mov r0, #32 for ( i=0 ; i void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { 52f4: e5fa0001 ldrb r0, [sl, #1]! 52f8: e3500000 cmp r0, #0 52fc: 1affff54 bne 5054 5300: eaffffc0 b 5208 <== NOT EXECUTED lflag = true; c = *++fmt; } if ( c == 'c' ) { /* need a cast here since va_arg() only takes fully promoted types */ char chr = (char) va_arg(ap, int); 5304: e59d3000 ldr r3, [sp] 5308: e2834004 add r4, r3, #4 BSP_output_char(chr); 530c: e5d30000 ldrb r0, [r3] 5310: e1a0e00f mov lr, pc 5314: e598f000 ldr pc, [r8] lflag = true; c = *++fmt; } if ( c == 'c' ) { /* need a cast here since va_arg() only takes fully promoted types */ char chr = (char) va_arg(ap, int); 5318: e58d4000 str r4, [sp] void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { 531c: e5fa0001 ldrb r0, [sl, #1]! 5320: e3500000 cmp r0, #0 5324: 1affff4a bne 5054 5328: eaffffb6 b 5208 <== NOT EXECUTED if ( c == 'o' || c == 'O' ) { base = 8; sign = false; } else if ( c == 'i' || c == 'I' || c == 'd' || c == 'D' ) { base = 10; sign = true; } else if ( c == 'u' || c == 'U' ) { 532c: e3530075 cmp r3, #117 ; 0x75 5330: 13530055 cmpne r3, #85 ; 0x55 5334: 13a00000 movne r0, #0 5338: 03a00001 moveq r0, #1 base = 10; sign = false; 533c: 01a03001 moveq r3, r1 5340: 03a0900a moveq r9, #10 if ( c == 'o' || c == 'O' ) { base = 8; sign = false; } else if ( c == 'i' || c == 'I' || c == 'd' || c == 'D' ) { base = 10; sign = true; } else if ( c == 'u' || c == 'U' ) { 5344: 0affff72 beq 5114 base = 10; sign = false; } else if ( c == 'x' || c == 'X' ) { 5348: e3530078 cmp r3, #120 ; 0x78 534c: 13530058 cmpne r3, #88 ; 0x58 5350: 13a01000 movne r1, #0 5354: 03a01001 moveq r1, #1 base = 16; sign = false; 5358: 01a03000 moveq r3, r0 535c: 03a09010 moveq r9, #16 } else if ( c == 'i' || c == 'I' || c == 'd' || c == 'D' ) { base = 10; sign = true; } else if ( c == 'u' || c == 'U' ) { base = 10; sign = false; } else if ( c == 'x' || c == 'X' ) { 5360: 0affff6b beq 5114 base = 16; sign = false; } else if ( c == 'p' ) { 5364: e3530070 cmp r3, #112 ; 0x70 5368: 1affffa8 bne 5210 base = 16; sign = false; lflag = true; 536c: e1a03001 mov r3, r1 5370: e3a09010 mov r9, #16 5374: eaffff66 b 5114 unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { BSP_output_char('-'); 5378: e3a0002d mov r0, #45 ; 0x2d 537c: e1a0e00f mov lr, pc 5380: e598f000 ldr pc, [r8] unsigned_num = (unsigned long) -num; if (maxwidth) maxwidth--; 5384: e3560000 cmp r6, #0 unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { BSP_output_char('-'); unsigned_num = (unsigned long) -num; 5388: e2677000 rsb r7, r7, #0 if (maxwidth) maxwidth--; 538c: 12466001 subne r6, r6, #1 5390: eaffff67 b 5134 =============================================================================== 00006834 : int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); 6834: e59f315c ldr r3, [pc, #348] ; 6998 6838: e5933000 ldr r3, [r3] 683c: e1500003 cmp r0, r3 ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { 6840: e92d41f0 push {r4, r5, r6, r7, r8, lr} 6844: e1a05002 mov r5, r2 int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); 6848: 2a00004b bcs 697c iop = rtems_libio_iop( fd ); 684c: e59f3148 ldr r3, [pc, #328] ; 699c 6850: e5933000 ldr r3, [r3] 6854: e0600180 rsb r0, r0, r0, lsl #3 6858: e0838180 add r8, r3, r0, lsl #3 rtems_libio_check_is_open( iop ); 685c: e5983014 ldr r3, [r8, #20] 6860: e3130c01 tst r3, #256 ; 0x100 6864: 0a000044 beq 697c rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 6868: e3130004 tst r3, #4 686c: 0a00003c beq 6964 /* * Argument validation on IO vector */ if ( !iov ) 6870: e3510000 cmp r1, #0 6874: 0a00003a beq 6964 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 6878: e3520000 cmp r2, #0 687c: da000038 ble 6964 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 6880: e3520b01 cmp r2, #1024 ; 0x400 6884: ca000036 bgt 6964 rtems_set_errno_and_return_minus_one( EINVAL ); 6888: e1a04001 mov r4, r1 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 688c: e3a0cc7f mov ip, #32512 ; 0x7f00 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 6890: e3a01000 mov r1, #0 6894: e1a02004 mov r2, r4 6898: e3a06001 mov r6, #1 689c: e1a07001 mov r7, r1 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 68a0: e28cc0ff add ip, ip, #255 ; 0xff 68a4: ea000000 b 68ac if ( iov[v].iov_len ) all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; 68a8: e1a07003 mov r7, r3 /* * iov[v].iov_len cannot be less than 0 because size_t is unsigned. * So we only check for zero. */ if ( iov[v].iov_base == 0 ) 68ac: e5923000 ldr r3, [r2] 68b0: e3530000 cmp r3, #0 * this loop does that check as well and sets "all-zero" appropriately. * The variable "all_zero" is used as an early exit point before * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { 68b4: e2811001 add r1, r1, #1 /* * iov[v].iov_len cannot be less than 0 because size_t is unsigned. * So we only check for zero. */ if ( iov[v].iov_base == 0 ) 68b8: 0a000029 beq 6964 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) 68bc: e5920004 ldr r0, [r2, #4] all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; 68c0: e0873000 add r3, r7, r0 */ if ( iov[v].iov_base == 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) all_zeros = false; 68c4: e3500000 cmp r0, #0 68c8: 13a06000 movne r6, #0 /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 68cc: e1570003 cmp r7, r3 68d0: d153000c cmple r3, ip 68d4: d3a07000 movle r7, #0 68d8: c3a07001 movgt r7, #1 68dc: ca000020 bgt 6964 * this loop does that check as well and sets "all-zero" appropriately. * The variable "all_zero" is used as an early exit point before * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { 68e0: e1550001 cmp r5, r1 68e4: e2822008 add r2, r2, #8 68e8: caffffee bgt 68a8 } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { 68ec: e3560000 cmp r6, #0 68f0: 1a00001f bne 6974 68f4: e1a07006 mov r7, r6 68f8: ea000003 b 690c } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 68fc: e2866001 add r6, r6, #1 6900: e1550006 cmp r5, r6 6904: e2844008 add r4, r4, #8 6908: da000019 ble 6974 /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) 690c: e5942004 ldr r2, [r4, #4] 6910: e3520000 cmp r2, #0 6914: 0afffff8 beq 68fc continue; bytes = (*iop->pathinfo.handlers->write_h)( 6918: e5941000 ldr r1, [r4] 691c: e5983020 ldr r3, [r8, #32] 6920: e1a00008 mov r0, r8 6924: e1a0e00f mov lr, pc 6928: e593f00c ldr pc, [r3, #12] iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) 692c: e3500000 cmp r0, #0 6930: ba000016 blt 6990 return -1; if ( bytes > 0 ) { 6934: 0a000006 beq 6954 iop->offset += bytes; 6938: e288300c add r3, r8, #12 693c: e893000c ldm r3, {r2, r3} 6940: e0922000 adds r2, r2, r0 6944: e0a33fc0 adc r3, r3, r0, asr #31 6948: e588200c str r2, [r8, #12] 694c: e5883010 str r3, [r8, #16] total += bytes; 6950: e0877000 add r7, r7, r0 } if (bytes != iov[ v ].iov_len) 6954: e5943004 ldr r3, [r4, #4] 6958: e1500003 cmp r0, r3 695c: 0affffe6 beq 68fc 6960: ea000003 b 6974 <== NOT EXECUTED /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); 6964: eb0021c4 bl f07c <__errno> 6968: e3a03016 mov r3, #22 696c: e5803000 str r3, [r0] 6970: e3e07000 mvn r7, #0 if (bytes != iov[ v ].iov_len) break; } return total; } 6974: e1a00007 mov r0, r7 6978: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 697c: eb0021be bl f07c <__errno> 6980: e3a03009 mov r3, #9 6984: e5803000 str r3, [r0] 6988: e3e07000 mvn r7, #0 698c: eafffff8 b 6974 iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) return -1; 6990: e3e07000 mvn r7, #0 <== NOT EXECUTED 6994: eafffff6 b 6974 <== NOT EXECUTED